@mjhls/mjh-framework 1.0.203 → 1.0.205

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.
Files changed (74) hide show
  1. package/README.md +1 -1
  2. package/dist/cjs/AD-e2479b7c.js +31 -0
  3. package/dist/cjs/DeckContent.js +430 -0
  4. package/dist/cjs/DeckQueue.js +366 -0
  5. package/dist/cjs/Dfp-d94f7f73.js +97 -0
  6. package/dist/cjs/GridContent.js +613 -0
  7. package/dist/cjs/GroupDeck.js +156 -0
  8. package/dist/cjs/IssueContentDeck.js +81 -0
  9. package/dist/cjs/IssueDeck.js +144 -0
  10. package/dist/cjs/MasterDeck.js +340 -0
  11. package/dist/cjs/Normal-7dd8c339.js +2374 -0
  12. package/dist/cjs/PublicationDeck.js +81 -0
  13. package/dist/cjs/QueueDeckExpanded.js +559 -0
  14. package/dist/cjs/TaxonomyCard-7b5b4298.js +1045 -0
  15. package/dist/cjs/TaxonomyCard.js +18 -0
  16. package/dist/cjs/TemplateNormal.js +29 -0
  17. package/dist/cjs/ThumbnailCard.js +58 -0
  18. package/dist/cjs/Ustream-0d3dd953.js +122 -0
  19. package/dist/cjs/Ustream.js +10 -0
  20. package/dist/cjs/VideoSeriesListing.js +248 -0
  21. package/dist/cjs/YoutubeGroup-f7707ceb.js +228 -0
  22. package/dist/cjs/YoutubeGroup.js +13 -0
  23. package/dist/cjs/_babelHelpers-f321c258.js +119 -0
  24. package/dist/cjs/_commonjsHelpers-3fc1f64e.js +20 -0
  25. package/dist/cjs/debounce-286eb3fb.js +279 -0
  26. package/dist/cjs/entities-3e0b4a16.js +506 -0
  27. package/dist/cjs/get-06aac51b.js +992 -0
  28. package/dist/cjs/index-0d0efcfa.js +610 -0
  29. package/dist/cjs/index-a4c53ff4.js +551 -0
  30. package/dist/cjs/index.es-2289df51.js +5028 -0
  31. package/dist/cjs/index.esm-340d3792.js +113 -0
  32. package/dist/cjs/index.js +12044 -0
  33. package/dist/cjs/isSymbol-311eb805.js +209 -0
  34. package/dist/cjs/main-58839f4e.js +858 -0
  35. package/dist/cjs/visibility-sensor-5c5a7302.js +2251 -0
  36. package/dist/esm/AD-1b2a3dd3.js +26 -0
  37. package/dist/esm/DeckContent.js +424 -0
  38. package/dist/esm/DeckQueue.js +360 -0
  39. package/dist/esm/Dfp-ab7941d3.js +92 -0
  40. package/dist/esm/GridContent.js +607 -0
  41. package/dist/esm/GroupDeck.js +151 -0
  42. package/dist/esm/IssueContentDeck.js +76 -0
  43. package/dist/esm/IssueDeck.js +139 -0
  44. package/dist/esm/MasterDeck.js +334 -0
  45. package/dist/esm/Normal-403c5666.js +2354 -0
  46. package/dist/esm/PublicationDeck.js +76 -0
  47. package/dist/esm/QueueDeckExpanded.js +553 -0
  48. package/dist/esm/TaxonomyCard-f9c93953.js +1039 -0
  49. package/dist/esm/TaxonomyCard.js +12 -0
  50. package/dist/esm/TemplateNormal.js +23 -0
  51. package/dist/esm/ThumbnailCard.js +53 -0
  52. package/dist/esm/Ustream-6bb45fe7.js +116 -0
  53. package/dist/esm/Ustream.js +4 -0
  54. package/dist/esm/VideoSeriesListing.js +242 -0
  55. package/dist/esm/YoutubeGroup-06df4923.js +222 -0
  56. package/dist/esm/YoutubeGroup.js +7 -0
  57. package/dist/esm/_babelHelpers-67c05996.js +111 -0
  58. package/dist/esm/_commonjsHelpers-ae1b5db5.js +15 -0
  59. package/dist/esm/debounce-a0242b4a.js +277 -0
  60. package/dist/esm/entities-e85d3a4a.js +503 -0
  61. package/dist/esm/get-b684ff61.js +990 -0
  62. package/dist/esm/index-3c1ee9ab.js +605 -0
  63. package/dist/esm/index-ca4ff5cb.js +548 -0
  64. package/dist/esm/index.es-f369b3e8.js +5022 -0
  65. package/dist/esm/index.esm-536609db.js +103 -0
  66. package/dist/esm/index.js +11991 -0
  67. package/dist/esm/isSymbol-c2b7d05a.js +203 -0
  68. package/dist/esm/main-dea495b7.js +851 -0
  69. package/dist/esm/visibility-sensor-3cfe6713.js +2243 -0
  70. package/package.json +8 -7
  71. package/dist/index.es.js +0 -30213
  72. package/dist/index.es.js.map +0 -1
  73. package/dist/index.js +0 -30271
  74. package/dist/index.js.map +0 -1
@@ -0,0 +1,992 @@
1
+ 'use strict';
2
+
3
+ var isSymbol$1 = require('./isSymbol-311eb805.js');
4
+
5
+ /**
6
+ * Checks if `value` is classified as an `Array` object.
7
+ *
8
+ * @static
9
+ * @memberOf _
10
+ * @since 0.1.0
11
+ * @category Lang
12
+ * @param {*} value The value to check.
13
+ * @returns {boolean} Returns `true` if `value` is an array, else `false`.
14
+ * @example
15
+ *
16
+ * _.isArray([1, 2, 3]);
17
+ * // => true
18
+ *
19
+ * _.isArray(document.body.children);
20
+ * // => false
21
+ *
22
+ * _.isArray('abc');
23
+ * // => false
24
+ *
25
+ * _.isArray(_.noop);
26
+ * // => false
27
+ */
28
+ var isArray = Array.isArray;
29
+
30
+ var isArray_1 = isArray;
31
+
32
+ /** Used to match property names within property paths. */
33
+ var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
34
+ reIsPlainProp = /^\w*$/;
35
+
36
+ /**
37
+ * Checks if `value` is a property name and not a property path.
38
+ *
39
+ * @private
40
+ * @param {*} value The value to check.
41
+ * @param {Object} [object] The object to query keys on.
42
+ * @returns {boolean} Returns `true` if `value` is a property name, else `false`.
43
+ */
44
+ function isKey(value, object) {
45
+ if (isArray_1(value)) {
46
+ return false;
47
+ }
48
+ var type = typeof value;
49
+ if (type == 'number' || type == 'symbol' || type == 'boolean' ||
50
+ value == null || isSymbol$1.isSymbol_1(value)) {
51
+ return true;
52
+ }
53
+ return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||
54
+ (object != null && value in Object(object));
55
+ }
56
+
57
+ var _isKey = isKey;
58
+
59
+ /** `Object#toString` result references. */
60
+ var asyncTag = '[object AsyncFunction]',
61
+ funcTag = '[object Function]',
62
+ genTag = '[object GeneratorFunction]',
63
+ proxyTag = '[object Proxy]';
64
+
65
+ /**
66
+ * Checks if `value` is classified as a `Function` object.
67
+ *
68
+ * @static
69
+ * @memberOf _
70
+ * @since 0.1.0
71
+ * @category Lang
72
+ * @param {*} value The value to check.
73
+ * @returns {boolean} Returns `true` if `value` is a function, else `false`.
74
+ * @example
75
+ *
76
+ * _.isFunction(_);
77
+ * // => true
78
+ *
79
+ * _.isFunction(/abc/);
80
+ * // => false
81
+ */
82
+ function isFunction(value) {
83
+ if (!isSymbol$1.isObject_1(value)) {
84
+ return false;
85
+ }
86
+ // The use of `Object#toString` avoids issues with the `typeof` operator
87
+ // in Safari 9 which returns 'object' for typed arrays and other constructors.
88
+ var tag = isSymbol$1._baseGetTag(value);
89
+ return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
90
+ }
91
+
92
+ var isFunction_1 = isFunction;
93
+
94
+ /** Used to detect overreaching core-js shims. */
95
+ var coreJsData = isSymbol$1._root['__core-js_shared__'];
96
+
97
+ var _coreJsData = coreJsData;
98
+
99
+ /** Used to detect methods masquerading as native. */
100
+ var maskSrcKey = (function() {
101
+ var uid = /[^.]+$/.exec(_coreJsData && _coreJsData.keys && _coreJsData.keys.IE_PROTO || '');
102
+ return uid ? ('Symbol(src)_1.' + uid) : '';
103
+ }());
104
+
105
+ /**
106
+ * Checks if `func` has its source masked.
107
+ *
108
+ * @private
109
+ * @param {Function} func The function to check.
110
+ * @returns {boolean} Returns `true` if `func` is masked, else `false`.
111
+ */
112
+ function isMasked(func) {
113
+ return !!maskSrcKey && (maskSrcKey in func);
114
+ }
115
+
116
+ var _isMasked = isMasked;
117
+
118
+ /** Used for built-in method references. */
119
+ var funcProto = Function.prototype;
120
+
121
+ /** Used to resolve the decompiled source of functions. */
122
+ var funcToString = funcProto.toString;
123
+
124
+ /**
125
+ * Converts `func` to its source code.
126
+ *
127
+ * @private
128
+ * @param {Function} func The function to convert.
129
+ * @returns {string} Returns the source code.
130
+ */
131
+ function toSource(func) {
132
+ if (func != null) {
133
+ try {
134
+ return funcToString.call(func);
135
+ } catch (e) {}
136
+ try {
137
+ return (func + '');
138
+ } catch (e) {}
139
+ }
140
+ return '';
141
+ }
142
+
143
+ var _toSource = toSource;
144
+
145
+ /**
146
+ * Used to match `RegExp`
147
+ * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
148
+ */
149
+ var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
150
+
151
+ /** Used to detect host constructors (Safari). */
152
+ var reIsHostCtor = /^\[object .+?Constructor\]$/;
153
+
154
+ /** Used for built-in method references. */
155
+ var funcProto$1 = Function.prototype,
156
+ objectProto = Object.prototype;
157
+
158
+ /** Used to resolve the decompiled source of functions. */
159
+ var funcToString$1 = funcProto$1.toString;
160
+
161
+ /** Used to check objects for own properties. */
162
+ var hasOwnProperty = objectProto.hasOwnProperty;
163
+
164
+ /** Used to detect if a method is native. */
165
+ var reIsNative = RegExp('^' +
166
+ funcToString$1.call(hasOwnProperty).replace(reRegExpChar, '\\$&')
167
+ .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
168
+ );
169
+
170
+ /**
171
+ * The base implementation of `_.isNative` without bad shim checks.
172
+ *
173
+ * @private
174
+ * @param {*} value The value to check.
175
+ * @returns {boolean} Returns `true` if `value` is a native function,
176
+ * else `false`.
177
+ */
178
+ function baseIsNative(value) {
179
+ if (!isSymbol$1.isObject_1(value) || _isMasked(value)) {
180
+ return false;
181
+ }
182
+ var pattern = isFunction_1(value) ? reIsNative : reIsHostCtor;
183
+ return pattern.test(_toSource(value));
184
+ }
185
+
186
+ var _baseIsNative = baseIsNative;
187
+
188
+ /**
189
+ * Gets the value at `key` of `object`.
190
+ *
191
+ * @private
192
+ * @param {Object} [object] The object to query.
193
+ * @param {string} key The key of the property to get.
194
+ * @returns {*} Returns the property value.
195
+ */
196
+ function getValue(object, key) {
197
+ return object == null ? undefined : object[key];
198
+ }
199
+
200
+ var _getValue = getValue;
201
+
202
+ /**
203
+ * Gets the native function at `key` of `object`.
204
+ *
205
+ * @private
206
+ * @param {Object} object The object to query.
207
+ * @param {string} key The key of the method to get.
208
+ * @returns {*} Returns the function if it's native, else `undefined`.
209
+ */
210
+ function getNative(object, key) {
211
+ var value = _getValue(object, key);
212
+ return _baseIsNative(value) ? value : undefined;
213
+ }
214
+
215
+ var _getNative = getNative;
216
+
217
+ /* Built-in method references that are verified to be native. */
218
+ var nativeCreate = _getNative(Object, 'create');
219
+
220
+ var _nativeCreate = nativeCreate;
221
+
222
+ /**
223
+ * Removes all key-value entries from the hash.
224
+ *
225
+ * @private
226
+ * @name clear
227
+ * @memberOf Hash
228
+ */
229
+ function hashClear() {
230
+ this.__data__ = _nativeCreate ? _nativeCreate(null) : {};
231
+ this.size = 0;
232
+ }
233
+
234
+ var _hashClear = hashClear;
235
+
236
+ /**
237
+ * Removes `key` and its value from the hash.
238
+ *
239
+ * @private
240
+ * @name delete
241
+ * @memberOf Hash
242
+ * @param {Object} hash The hash to modify.
243
+ * @param {string} key The key of the value to remove.
244
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
245
+ */
246
+ function hashDelete(key) {
247
+ var result = this.has(key) && delete this.__data__[key];
248
+ this.size -= result ? 1 : 0;
249
+ return result;
250
+ }
251
+
252
+ var _hashDelete = hashDelete;
253
+
254
+ /** Used to stand-in for `undefined` hash values. */
255
+ var HASH_UNDEFINED = '__lodash_hash_undefined__';
256
+
257
+ /** Used for built-in method references. */
258
+ var objectProto$1 = Object.prototype;
259
+
260
+ /** Used to check objects for own properties. */
261
+ var hasOwnProperty$1 = objectProto$1.hasOwnProperty;
262
+
263
+ /**
264
+ * Gets the hash value for `key`.
265
+ *
266
+ * @private
267
+ * @name get
268
+ * @memberOf Hash
269
+ * @param {string} key The key of the value to get.
270
+ * @returns {*} Returns the entry value.
271
+ */
272
+ function hashGet(key) {
273
+ var data = this.__data__;
274
+ if (_nativeCreate) {
275
+ var result = data[key];
276
+ return result === HASH_UNDEFINED ? undefined : result;
277
+ }
278
+ return hasOwnProperty$1.call(data, key) ? data[key] : undefined;
279
+ }
280
+
281
+ var _hashGet = hashGet;
282
+
283
+ /** Used for built-in method references. */
284
+ var objectProto$2 = Object.prototype;
285
+
286
+ /** Used to check objects for own properties. */
287
+ var hasOwnProperty$2 = objectProto$2.hasOwnProperty;
288
+
289
+ /**
290
+ * Checks if a hash value for `key` exists.
291
+ *
292
+ * @private
293
+ * @name has
294
+ * @memberOf Hash
295
+ * @param {string} key The key of the entry to check.
296
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
297
+ */
298
+ function hashHas(key) {
299
+ var data = this.__data__;
300
+ return _nativeCreate ? (data[key] !== undefined) : hasOwnProperty$2.call(data, key);
301
+ }
302
+
303
+ var _hashHas = hashHas;
304
+
305
+ /** Used to stand-in for `undefined` hash values. */
306
+ var HASH_UNDEFINED$1 = '__lodash_hash_undefined__';
307
+
308
+ /**
309
+ * Sets the hash `key` to `value`.
310
+ *
311
+ * @private
312
+ * @name set
313
+ * @memberOf Hash
314
+ * @param {string} key The key of the value to set.
315
+ * @param {*} value The value to set.
316
+ * @returns {Object} Returns the hash instance.
317
+ */
318
+ function hashSet(key, value) {
319
+ var data = this.__data__;
320
+ this.size += this.has(key) ? 0 : 1;
321
+ data[key] = (_nativeCreate && value === undefined) ? HASH_UNDEFINED$1 : value;
322
+ return this;
323
+ }
324
+
325
+ var _hashSet = hashSet;
326
+
327
+ /**
328
+ * Creates a hash object.
329
+ *
330
+ * @private
331
+ * @constructor
332
+ * @param {Array} [entries] The key-value pairs to cache.
333
+ */
334
+ function Hash(entries) {
335
+ var index = -1,
336
+ length = entries == null ? 0 : entries.length;
337
+
338
+ this.clear();
339
+ while (++index < length) {
340
+ var entry = entries[index];
341
+ this.set(entry[0], entry[1]);
342
+ }
343
+ }
344
+
345
+ // Add methods to `Hash`.
346
+ Hash.prototype.clear = _hashClear;
347
+ Hash.prototype['delete'] = _hashDelete;
348
+ Hash.prototype.get = _hashGet;
349
+ Hash.prototype.has = _hashHas;
350
+ Hash.prototype.set = _hashSet;
351
+
352
+ var _Hash = Hash;
353
+
354
+ /**
355
+ * Removes all key-value entries from the list cache.
356
+ *
357
+ * @private
358
+ * @name clear
359
+ * @memberOf ListCache
360
+ */
361
+ function listCacheClear() {
362
+ this.__data__ = [];
363
+ this.size = 0;
364
+ }
365
+
366
+ var _listCacheClear = listCacheClear;
367
+
368
+ /**
369
+ * Performs a
370
+ * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
371
+ * comparison between two values to determine if they are equivalent.
372
+ *
373
+ * @static
374
+ * @memberOf _
375
+ * @since 4.0.0
376
+ * @category Lang
377
+ * @param {*} value The value to compare.
378
+ * @param {*} other The other value to compare.
379
+ * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
380
+ * @example
381
+ *
382
+ * var object = { 'a': 1 };
383
+ * var other = { 'a': 1 };
384
+ *
385
+ * _.eq(object, object);
386
+ * // => true
387
+ *
388
+ * _.eq(object, other);
389
+ * // => false
390
+ *
391
+ * _.eq('a', 'a');
392
+ * // => true
393
+ *
394
+ * _.eq('a', Object('a'));
395
+ * // => false
396
+ *
397
+ * _.eq(NaN, NaN);
398
+ * // => true
399
+ */
400
+ function eq(value, other) {
401
+ return value === other || (value !== value && other !== other);
402
+ }
403
+
404
+ var eq_1 = eq;
405
+
406
+ /**
407
+ * Gets the index at which the `key` is found in `array` of key-value pairs.
408
+ *
409
+ * @private
410
+ * @param {Array} array The array to inspect.
411
+ * @param {*} key The key to search for.
412
+ * @returns {number} Returns the index of the matched value, else `-1`.
413
+ */
414
+ function assocIndexOf(array, key) {
415
+ var length = array.length;
416
+ while (length--) {
417
+ if (eq_1(array[length][0], key)) {
418
+ return length;
419
+ }
420
+ }
421
+ return -1;
422
+ }
423
+
424
+ var _assocIndexOf = assocIndexOf;
425
+
426
+ /** Used for built-in method references. */
427
+ var arrayProto = Array.prototype;
428
+
429
+ /** Built-in value references. */
430
+ var splice = arrayProto.splice;
431
+
432
+ /**
433
+ * Removes `key` and its value from the list cache.
434
+ *
435
+ * @private
436
+ * @name delete
437
+ * @memberOf ListCache
438
+ * @param {string} key The key of the value to remove.
439
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
440
+ */
441
+ function listCacheDelete(key) {
442
+ var data = this.__data__,
443
+ index = _assocIndexOf(data, key);
444
+
445
+ if (index < 0) {
446
+ return false;
447
+ }
448
+ var lastIndex = data.length - 1;
449
+ if (index == lastIndex) {
450
+ data.pop();
451
+ } else {
452
+ splice.call(data, index, 1);
453
+ }
454
+ --this.size;
455
+ return true;
456
+ }
457
+
458
+ var _listCacheDelete = listCacheDelete;
459
+
460
+ /**
461
+ * Gets the list cache value for `key`.
462
+ *
463
+ * @private
464
+ * @name get
465
+ * @memberOf ListCache
466
+ * @param {string} key The key of the value to get.
467
+ * @returns {*} Returns the entry value.
468
+ */
469
+ function listCacheGet(key) {
470
+ var data = this.__data__,
471
+ index = _assocIndexOf(data, key);
472
+
473
+ return index < 0 ? undefined : data[index][1];
474
+ }
475
+
476
+ var _listCacheGet = listCacheGet;
477
+
478
+ /**
479
+ * Checks if a list cache value for `key` exists.
480
+ *
481
+ * @private
482
+ * @name has
483
+ * @memberOf ListCache
484
+ * @param {string} key The key of the entry to check.
485
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
486
+ */
487
+ function listCacheHas(key) {
488
+ return _assocIndexOf(this.__data__, key) > -1;
489
+ }
490
+
491
+ var _listCacheHas = listCacheHas;
492
+
493
+ /**
494
+ * Sets the list cache `key` to `value`.
495
+ *
496
+ * @private
497
+ * @name set
498
+ * @memberOf ListCache
499
+ * @param {string} key The key of the value to set.
500
+ * @param {*} value The value to set.
501
+ * @returns {Object} Returns the list cache instance.
502
+ */
503
+ function listCacheSet(key, value) {
504
+ var data = this.__data__,
505
+ index = _assocIndexOf(data, key);
506
+
507
+ if (index < 0) {
508
+ ++this.size;
509
+ data.push([key, value]);
510
+ } else {
511
+ data[index][1] = value;
512
+ }
513
+ return this;
514
+ }
515
+
516
+ var _listCacheSet = listCacheSet;
517
+
518
+ /**
519
+ * Creates an list cache object.
520
+ *
521
+ * @private
522
+ * @constructor
523
+ * @param {Array} [entries] The key-value pairs to cache.
524
+ */
525
+ function ListCache(entries) {
526
+ var index = -1,
527
+ length = entries == null ? 0 : entries.length;
528
+
529
+ this.clear();
530
+ while (++index < length) {
531
+ var entry = entries[index];
532
+ this.set(entry[0], entry[1]);
533
+ }
534
+ }
535
+
536
+ // Add methods to `ListCache`.
537
+ ListCache.prototype.clear = _listCacheClear;
538
+ ListCache.prototype['delete'] = _listCacheDelete;
539
+ ListCache.prototype.get = _listCacheGet;
540
+ ListCache.prototype.has = _listCacheHas;
541
+ ListCache.prototype.set = _listCacheSet;
542
+
543
+ var _ListCache = ListCache;
544
+
545
+ /* Built-in method references that are verified to be native. */
546
+ var Map = _getNative(isSymbol$1._root, 'Map');
547
+
548
+ var _Map = Map;
549
+
550
+ /**
551
+ * Removes all key-value entries from the map.
552
+ *
553
+ * @private
554
+ * @name clear
555
+ * @memberOf MapCache
556
+ */
557
+ function mapCacheClear() {
558
+ this.size = 0;
559
+ this.__data__ = {
560
+ 'hash': new _Hash,
561
+ 'map': new (_Map || _ListCache),
562
+ 'string': new _Hash
563
+ };
564
+ }
565
+
566
+ var _mapCacheClear = mapCacheClear;
567
+
568
+ /**
569
+ * Checks if `value` is suitable for use as unique object key.
570
+ *
571
+ * @private
572
+ * @param {*} value The value to check.
573
+ * @returns {boolean} Returns `true` if `value` is suitable, else `false`.
574
+ */
575
+ function isKeyable(value) {
576
+ var type = typeof value;
577
+ return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
578
+ ? (value !== '__proto__')
579
+ : (value === null);
580
+ }
581
+
582
+ var _isKeyable = isKeyable;
583
+
584
+ /**
585
+ * Gets the data for `map`.
586
+ *
587
+ * @private
588
+ * @param {Object} map The map to query.
589
+ * @param {string} key The reference key.
590
+ * @returns {*} Returns the map data.
591
+ */
592
+ function getMapData(map, key) {
593
+ var data = map.__data__;
594
+ return _isKeyable(key)
595
+ ? data[typeof key == 'string' ? 'string' : 'hash']
596
+ : data.map;
597
+ }
598
+
599
+ var _getMapData = getMapData;
600
+
601
+ /**
602
+ * Removes `key` and its value from the map.
603
+ *
604
+ * @private
605
+ * @name delete
606
+ * @memberOf MapCache
607
+ * @param {string} key The key of the value to remove.
608
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
609
+ */
610
+ function mapCacheDelete(key) {
611
+ var result = _getMapData(this, key)['delete'](key);
612
+ this.size -= result ? 1 : 0;
613
+ return result;
614
+ }
615
+
616
+ var _mapCacheDelete = mapCacheDelete;
617
+
618
+ /**
619
+ * Gets the map value for `key`.
620
+ *
621
+ * @private
622
+ * @name get
623
+ * @memberOf MapCache
624
+ * @param {string} key The key of the value to get.
625
+ * @returns {*} Returns the entry value.
626
+ */
627
+ function mapCacheGet(key) {
628
+ return _getMapData(this, key).get(key);
629
+ }
630
+
631
+ var _mapCacheGet = mapCacheGet;
632
+
633
+ /**
634
+ * Checks if a map value for `key` exists.
635
+ *
636
+ * @private
637
+ * @name has
638
+ * @memberOf MapCache
639
+ * @param {string} key The key of the entry to check.
640
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
641
+ */
642
+ function mapCacheHas(key) {
643
+ return _getMapData(this, key).has(key);
644
+ }
645
+
646
+ var _mapCacheHas = mapCacheHas;
647
+
648
+ /**
649
+ * Sets the map `key` to `value`.
650
+ *
651
+ * @private
652
+ * @name set
653
+ * @memberOf MapCache
654
+ * @param {string} key The key of the value to set.
655
+ * @param {*} value The value to set.
656
+ * @returns {Object} Returns the map cache instance.
657
+ */
658
+ function mapCacheSet(key, value) {
659
+ var data = _getMapData(this, key),
660
+ size = data.size;
661
+
662
+ data.set(key, value);
663
+ this.size += data.size == size ? 0 : 1;
664
+ return this;
665
+ }
666
+
667
+ var _mapCacheSet = mapCacheSet;
668
+
669
+ /**
670
+ * Creates a map cache object to store key-value pairs.
671
+ *
672
+ * @private
673
+ * @constructor
674
+ * @param {Array} [entries] The key-value pairs to cache.
675
+ */
676
+ function MapCache(entries) {
677
+ var index = -1,
678
+ length = entries == null ? 0 : entries.length;
679
+
680
+ this.clear();
681
+ while (++index < length) {
682
+ var entry = entries[index];
683
+ this.set(entry[0], entry[1]);
684
+ }
685
+ }
686
+
687
+ // Add methods to `MapCache`.
688
+ MapCache.prototype.clear = _mapCacheClear;
689
+ MapCache.prototype['delete'] = _mapCacheDelete;
690
+ MapCache.prototype.get = _mapCacheGet;
691
+ MapCache.prototype.has = _mapCacheHas;
692
+ MapCache.prototype.set = _mapCacheSet;
693
+
694
+ var _MapCache = MapCache;
695
+
696
+ /** Error message constants. */
697
+ var FUNC_ERROR_TEXT = 'Expected a function';
698
+
699
+ /**
700
+ * Creates a function that memoizes the result of `func`. If `resolver` is
701
+ * provided, it determines the cache key for storing the result based on the
702
+ * arguments provided to the memoized function. By default, the first argument
703
+ * provided to the memoized function is used as the map cache key. The `func`
704
+ * is invoked with the `this` binding of the memoized function.
705
+ *
706
+ * **Note:** The cache is exposed as the `cache` property on the memoized
707
+ * function. Its creation may be customized by replacing the `_.memoize.Cache`
708
+ * constructor with one whose instances implement the
709
+ * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)
710
+ * method interface of `clear`, `delete`, `get`, `has`, and `set`.
711
+ *
712
+ * @static
713
+ * @memberOf _
714
+ * @since 0.1.0
715
+ * @category Function
716
+ * @param {Function} func The function to have its output memoized.
717
+ * @param {Function} [resolver] The function to resolve the cache key.
718
+ * @returns {Function} Returns the new memoized function.
719
+ * @example
720
+ *
721
+ * var object = { 'a': 1, 'b': 2 };
722
+ * var other = { 'c': 3, 'd': 4 };
723
+ *
724
+ * var values = _.memoize(_.values);
725
+ * values(object);
726
+ * // => [1, 2]
727
+ *
728
+ * values(other);
729
+ * // => [3, 4]
730
+ *
731
+ * object.a = 2;
732
+ * values(object);
733
+ * // => [1, 2]
734
+ *
735
+ * // Modify the result cache.
736
+ * values.cache.set(object, ['a', 'b']);
737
+ * values(object);
738
+ * // => ['a', 'b']
739
+ *
740
+ * // Replace `_.memoize.Cache`.
741
+ * _.memoize.Cache = WeakMap;
742
+ */
743
+ function memoize(func, resolver) {
744
+ if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {
745
+ throw new TypeError(FUNC_ERROR_TEXT);
746
+ }
747
+ var memoized = function() {
748
+ var args = arguments,
749
+ key = resolver ? resolver.apply(this, args) : args[0],
750
+ cache = memoized.cache;
751
+
752
+ if (cache.has(key)) {
753
+ return cache.get(key);
754
+ }
755
+ var result = func.apply(this, args);
756
+ memoized.cache = cache.set(key, result) || cache;
757
+ return result;
758
+ };
759
+ memoized.cache = new (memoize.Cache || _MapCache);
760
+ return memoized;
761
+ }
762
+
763
+ // Expose `MapCache`.
764
+ memoize.Cache = _MapCache;
765
+
766
+ var memoize_1 = memoize;
767
+
768
+ /** Used as the maximum memoize cache size. */
769
+ var MAX_MEMOIZE_SIZE = 500;
770
+
771
+ /**
772
+ * A specialized version of `_.memoize` which clears the memoized function's
773
+ * cache when it exceeds `MAX_MEMOIZE_SIZE`.
774
+ *
775
+ * @private
776
+ * @param {Function} func The function to have its output memoized.
777
+ * @returns {Function} Returns the new memoized function.
778
+ */
779
+ function memoizeCapped(func) {
780
+ var result = memoize_1(func, function(key) {
781
+ if (cache.size === MAX_MEMOIZE_SIZE) {
782
+ cache.clear();
783
+ }
784
+ return key;
785
+ });
786
+
787
+ var cache = result.cache;
788
+ return result;
789
+ }
790
+
791
+ var _memoizeCapped = memoizeCapped;
792
+
793
+ /** Used to match property names within property paths. */
794
+ var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
795
+
796
+ /** Used to match backslashes in property paths. */
797
+ var reEscapeChar = /\\(\\)?/g;
798
+
799
+ /**
800
+ * Converts `string` to a property path array.
801
+ *
802
+ * @private
803
+ * @param {string} string The string to convert.
804
+ * @returns {Array} Returns the property path array.
805
+ */
806
+ var stringToPath = _memoizeCapped(function(string) {
807
+ var result = [];
808
+ if (string.charCodeAt(0) === 46 /* . */) {
809
+ result.push('');
810
+ }
811
+ string.replace(rePropName, function(match, number, quote, subString) {
812
+ result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));
813
+ });
814
+ return result;
815
+ });
816
+
817
+ var _stringToPath = stringToPath;
818
+
819
+ /**
820
+ * A specialized version of `_.map` for arrays without support for iteratee
821
+ * shorthands.
822
+ *
823
+ * @private
824
+ * @param {Array} [array] The array to iterate over.
825
+ * @param {Function} iteratee The function invoked per iteration.
826
+ * @returns {Array} Returns the new mapped array.
827
+ */
828
+ function arrayMap(array, iteratee) {
829
+ var index = -1,
830
+ length = array == null ? 0 : array.length,
831
+ result = Array(length);
832
+
833
+ while (++index < length) {
834
+ result[index] = iteratee(array[index], index, array);
835
+ }
836
+ return result;
837
+ }
838
+
839
+ var _arrayMap = arrayMap;
840
+
841
+ /** Used as references for various `Number` constants. */
842
+ var INFINITY = 1 / 0;
843
+
844
+ /** Used to convert symbols to primitives and strings. */
845
+ var symbolProto = isSymbol$1._Symbol ? isSymbol$1._Symbol.prototype : undefined,
846
+ symbolToString = symbolProto ? symbolProto.toString : undefined;
847
+
848
+ /**
849
+ * The base implementation of `_.toString` which doesn't convert nullish
850
+ * values to empty strings.
851
+ *
852
+ * @private
853
+ * @param {*} value The value to process.
854
+ * @returns {string} Returns the string.
855
+ */
856
+ function baseToString(value) {
857
+ // Exit early for strings to avoid a performance hit in some environments.
858
+ if (typeof value == 'string') {
859
+ return value;
860
+ }
861
+ if (isArray_1(value)) {
862
+ // Recursively convert values (susceptible to call stack limits).
863
+ return _arrayMap(value, baseToString) + '';
864
+ }
865
+ if (isSymbol$1.isSymbol_1(value)) {
866
+ return symbolToString ? symbolToString.call(value) : '';
867
+ }
868
+ var result = (value + '');
869
+ return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
870
+ }
871
+
872
+ var _baseToString = baseToString;
873
+
874
+ /**
875
+ * Converts `value` to a string. An empty string is returned for `null`
876
+ * and `undefined` values. The sign of `-0` is preserved.
877
+ *
878
+ * @static
879
+ * @memberOf _
880
+ * @since 4.0.0
881
+ * @category Lang
882
+ * @param {*} value The value to convert.
883
+ * @returns {string} Returns the converted string.
884
+ * @example
885
+ *
886
+ * _.toString(null);
887
+ * // => ''
888
+ *
889
+ * _.toString(-0);
890
+ * // => '-0'
891
+ *
892
+ * _.toString([1, 2, 3]);
893
+ * // => '1,2,3'
894
+ */
895
+ function toString(value) {
896
+ return value == null ? '' : _baseToString(value);
897
+ }
898
+
899
+ var toString_1 = toString;
900
+
901
+ /**
902
+ * Casts `value` to a path array if it's not one.
903
+ *
904
+ * @private
905
+ * @param {*} value The value to inspect.
906
+ * @param {Object} [object] The object to query keys on.
907
+ * @returns {Array} Returns the cast property path array.
908
+ */
909
+ function castPath(value, object) {
910
+ if (isArray_1(value)) {
911
+ return value;
912
+ }
913
+ return _isKey(value, object) ? [value] : _stringToPath(toString_1(value));
914
+ }
915
+
916
+ var _castPath = castPath;
917
+
918
+ /** Used as references for various `Number` constants. */
919
+ var INFINITY$1 = 1 / 0;
920
+
921
+ /**
922
+ * Converts `value` to a string key if it's not a string or symbol.
923
+ *
924
+ * @private
925
+ * @param {*} value The value to inspect.
926
+ * @returns {string|symbol} Returns the key.
927
+ */
928
+ function toKey(value) {
929
+ if (typeof value == 'string' || isSymbol$1.isSymbol_1(value)) {
930
+ return value;
931
+ }
932
+ var result = (value + '');
933
+ return (result == '0' && (1 / value) == -INFINITY$1) ? '-0' : result;
934
+ }
935
+
936
+ var _toKey = toKey;
937
+
938
+ /**
939
+ * The base implementation of `_.get` without support for default values.
940
+ *
941
+ * @private
942
+ * @param {Object} object The object to query.
943
+ * @param {Array|string} path The path of the property to get.
944
+ * @returns {*} Returns the resolved value.
945
+ */
946
+ function baseGet(object, path) {
947
+ path = _castPath(path, object);
948
+
949
+ var index = 0,
950
+ length = path.length;
951
+
952
+ while (object != null && index < length) {
953
+ object = object[_toKey(path[index++])];
954
+ }
955
+ return (index && index == length) ? object : undefined;
956
+ }
957
+
958
+ var _baseGet = baseGet;
959
+
960
+ /**
961
+ * Gets the value at `path` of `object`. If the resolved value is
962
+ * `undefined`, the `defaultValue` is returned in its place.
963
+ *
964
+ * @static
965
+ * @memberOf _
966
+ * @since 3.7.0
967
+ * @category Object
968
+ * @param {Object} object The object to query.
969
+ * @param {Array|string} path The path of the property to get.
970
+ * @param {*} [defaultValue] The value returned for `undefined` resolved values.
971
+ * @returns {*} Returns the resolved value.
972
+ * @example
973
+ *
974
+ * var object = { 'a': [{ 'b': { 'c': 3 } }] };
975
+ *
976
+ * _.get(object, 'a[0].b.c');
977
+ * // => 3
978
+ *
979
+ * _.get(object, ['a', '0', 'b', 'c']);
980
+ * // => 3
981
+ *
982
+ * _.get(object, 'a.b.c', 'default');
983
+ * // => 'default'
984
+ */
985
+ function get(object, path, defaultValue) {
986
+ var result = object == null ? undefined : _baseGet(object, path);
987
+ return result === undefined ? defaultValue : result;
988
+ }
989
+
990
+ var get_1 = get;
991
+
992
+ exports.get_1 = get_1;