@audius/sdk 1.0.34 → 1.0.35

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/dist/legacy.js CHANGED
@@ -599,6 +599,8 @@ function _createForOfIteratorHelper(o, allowArrayLike) {
599
599
  };
600
600
  }
601
601
 
602
+ var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
603
+
602
604
  var Web3;
603
605
 
604
606
  if (typeof window !== 'undefined' && window && window.Web3) {
@@ -36979,9 +36981,9 @@ exports.ChatPermission = void 0;
36979
36981
  })(exports.ChatPermission || (exports.ChatPermission = {}));
36980
36982
 
36981
36983
  var name = "@audius/sdk";
36982
- var version = "1.0.34";
36984
+ var version = "1.0.35";
36983
36985
  var audius = {
36984
- releaseSHA: "8f0ae0d181bf1ee2dcf5ccc26987aaf1d0861903"
36986
+ releaseSHA: "e40315da81c1fcf7d1d43d1b7a4bcefc5d1243d1"
36985
36987
  };
36986
36988
  var description = "";
36987
36989
  var main = "dist/index.cjs.js";
@@ -62691,247 +62693,3431 @@ var syncNodes = /*#__PURE__*/function () {
62691
62693
  };
62692
62694
  }();
62693
62695
 
62694
- var THREE_SECONDS = 3000;
62695
- var MAX_TRIES = 3;
62696
- /** Check if the user's primary creator node is healthy */
62696
+ var freeGlobal$1 = _typeof(commonjsGlobal) == 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;
62697
+ var _freeGlobal = freeGlobal$1;
62697
62698
 
62698
- var checkPrimaryHealthy = /*#__PURE__*/function () {
62699
- var _ref = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(libs, primary, tries) {
62700
- var healthy;
62701
- return regeneratorRuntime.wrap(function _callee$(_context) {
62702
- while (1) {
62703
- switch (_context.prev = _context.next) {
62704
- case 0:
62705
- _context.next = 2;
62706
- return Utils.isHealthy(primary);
62699
+ var freeGlobal = _freeGlobal;
62700
+ /** Detect free variable `self`. */
62707
62701
 
62708
- case 2:
62709
- healthy = _context.sent;
62702
+ var freeSelf = (typeof self === "undefined" ? "undefined" : _typeof(self)) == 'object' && self && self.Object === Object && self;
62703
+ /** Used as a reference to the global object. */
62710
62704
 
62711
- if (!healthy) {
62712
- _context.next = 7;
62713
- break;
62714
- }
62705
+ var root$8 = freeGlobal || freeSelf || Function('return this')();
62706
+ var _root = root$8;
62715
62707
 
62716
- return _context.abrupt("return", healthy);
62708
+ var root$7 = _root;
62709
+ /** Built-in value references. */
62717
62710
 
62718
- case 7:
62719
- if (!(tries === 0)) {
62720
- _context.next = 9;
62721
- break;
62722
- }
62711
+ var _Symbol2 = root$7.Symbol;
62712
+ var _Symbol$4 = _Symbol2;
62723
62713
 
62724
- return _context.abrupt("return", false);
62714
+ var _Symbol$3 = _Symbol$4;
62715
+ /** Used for built-in method references. */
62725
62716
 
62726
- case 9:
62727
- _context.next = 11;
62728
- return Utils.wait(THREE_SECONDS);
62717
+ var objectProto$b = Object.prototype;
62718
+ /** Used to check objects for own properties. */
62729
62719
 
62730
- case 11:
62731
- _context.next = 13;
62732
- return checkPrimaryHealthy(libs, primary, tries - 1);
62720
+ var hasOwnProperty$8 = objectProto$b.hasOwnProperty;
62721
+ /**
62722
+ * Used to resolve the
62723
+ * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
62724
+ * of values.
62725
+ */
62733
62726
 
62734
- case 13:
62735
- return _context.abrupt("return", _context.sent);
62727
+ var nativeObjectToString$1 = objectProto$b.toString;
62728
+ /** Built-in value references. */
62736
62729
 
62737
- case 14:
62738
- case "end":
62739
- return _context.stop();
62740
- }
62741
- }
62742
- }, _callee);
62743
- }));
62730
+ var symToStringTag$1 = _Symbol$3 ? _Symbol$3.toStringTag : undefined;
62731
+ /**
62732
+ * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
62733
+ *
62734
+ * @private
62735
+ * @param {*} value The value to query.
62736
+ * @returns {string} Returns the raw `toStringTag`.
62737
+ */
62744
62738
 
62745
- return function checkPrimaryHealthy(_x, _x2, _x3) {
62746
- return _ref.apply(this, arguments);
62747
- };
62739
+ function getRawTag$1(value) {
62740
+ var isOwn = hasOwnProperty$8.call(value, symToStringTag$1),
62741
+ tag = value[symToStringTag$1];
62742
+
62743
+ try {
62744
+ value[symToStringTag$1] = undefined;
62745
+ var unmasked = true;
62746
+ } catch (e) {}
62747
+
62748
+ var result = nativeObjectToString$1.call(value);
62749
+
62750
+ if (unmasked) {
62751
+ if (isOwn) {
62752
+ value[symToStringTag$1] = tag;
62753
+ } else {
62754
+ delete value[symToStringTag$1];
62755
+ }
62756
+ }
62757
+
62758
+ return result;
62759
+ }
62760
+
62761
+ var _getRawTag = getRawTag$1;
62762
+
62763
+ /** Used for built-in method references. */
62764
+ var objectProto$a = Object.prototype;
62765
+ /**
62766
+ * Used to resolve the
62767
+ * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
62768
+ * of values.
62769
+ */
62770
+
62771
+ var nativeObjectToString = objectProto$a.toString;
62772
+ /**
62773
+ * Converts `value` to a string using `Object.prototype.toString`.
62774
+ *
62775
+ * @private
62776
+ * @param {*} value The value to convert.
62777
+ * @returns {string} Returns the converted string.
62778
+ */
62779
+
62780
+ function objectToString$1(value) {
62781
+ return nativeObjectToString.call(value);
62782
+ }
62783
+
62784
+ var _objectToString = objectToString$1;
62785
+
62786
+ var _Symbol$2 = _Symbol$4,
62787
+ getRawTag = _getRawTag,
62788
+ objectToString = _objectToString;
62789
+ /** `Object#toString` result references. */
62790
+
62791
+ var nullTag = '[object Null]',
62792
+ undefinedTag = '[object Undefined]';
62793
+ /** Built-in value references. */
62794
+
62795
+ var symToStringTag = _Symbol$2 ? _Symbol$2.toStringTag : undefined;
62796
+ /**
62797
+ * The base implementation of `getTag` without fallbacks for buggy environments.
62798
+ *
62799
+ * @private
62800
+ * @param {*} value The value to query.
62801
+ * @returns {string} Returns the `toStringTag`.
62802
+ */
62803
+
62804
+ function baseGetTag$5(value) {
62805
+ if (value == null) {
62806
+ return value === undefined ? undefinedTag : nullTag;
62807
+ }
62808
+
62809
+ return symToStringTag && symToStringTag in Object(value) ? getRawTag(value) : objectToString(value);
62810
+ }
62811
+
62812
+ var _baseGetTag = baseGetTag$5;
62813
+
62814
+ function isObjectLike$5(value) {
62815
+ return value != null && _typeof(value) == 'object';
62816
+ }
62817
+
62818
+ var isObjectLike_1 = isObjectLike$5;
62819
+
62820
+ var baseGetTag$4 = _baseGetTag,
62821
+ isObjectLike$4 = isObjectLike_1;
62822
+ /** `Object#toString` result references. */
62823
+
62824
+ var symbolTag$1 = '[object Symbol]';
62825
+ /**
62826
+ * Checks if `value` is classified as a `Symbol` primitive or object.
62827
+ *
62828
+ * @static
62829
+ * @memberOf _
62830
+ * @since 4.0.0
62831
+ * @category Lang
62832
+ * @param {*} value The value to check.
62833
+ * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
62834
+ * @example
62835
+ *
62836
+ * _.isSymbol(Symbol.iterator);
62837
+ * // => true
62838
+ *
62839
+ * _.isSymbol('abc');
62840
+ * // => false
62841
+ */
62842
+
62843
+ function isSymbol$4(value) {
62844
+ return _typeof(value) == 'symbol' || isObjectLike$4(value) && baseGetTag$4(value) == symbolTag$1;
62845
+ }
62846
+
62847
+ var isSymbol_1 = isSymbol$4;
62848
+
62849
+ var isSymbol$3 = isSymbol_1;
62850
+ /**
62851
+ * The base implementation of methods like `_.max` and `_.min` which accepts a
62852
+ * `comparator` to determine the extremum value.
62853
+ *
62854
+ * @private
62855
+ * @param {Array} array The array to iterate over.
62856
+ * @param {Function} iteratee The iteratee invoked per iteration.
62857
+ * @param {Function} comparator The comparator used to compare values.
62858
+ * @returns {*} Returns the extremum value.
62859
+ */
62860
+
62861
+ function baseExtremum$1(array, iteratee, comparator) {
62862
+ var index = -1,
62863
+ length = array.length;
62864
+
62865
+ while (++index < length) {
62866
+ var value = array[index],
62867
+ current = iteratee(value);
62868
+
62869
+ if (current != null && (computed === undefined ? current === current && !isSymbol$3(current) : comparator(current, computed))) {
62870
+ var computed = current,
62871
+ result = value;
62872
+ }
62873
+ }
62874
+
62875
+ return result;
62876
+ }
62877
+
62878
+ var _baseExtremum = baseExtremum$1;
62879
+
62880
+ /**
62881
+ * The base implementation of `_.gt` which doesn't coerce arguments.
62882
+ *
62883
+ * @private
62884
+ * @param {*} value The value to compare.
62885
+ * @param {*} other The other value to compare.
62886
+ * @returns {boolean} Returns `true` if `value` is greater than `other`,
62887
+ * else `false`.
62888
+ */
62889
+
62890
+ function baseGt$1(value, other) {
62891
+ return value > other;
62892
+ }
62893
+
62894
+ var _baseGt = baseGt$1;
62895
+
62896
+ /**
62897
+ * Removes all key-value entries from the list cache.
62898
+ *
62899
+ * @private
62900
+ * @name clear
62901
+ * @memberOf ListCache
62902
+ */
62903
+
62904
+ function listCacheClear$1() {
62905
+ this.__data__ = [];
62906
+ this.size = 0;
62907
+ }
62908
+
62909
+ var _listCacheClear = listCacheClear$1;
62910
+
62911
+ /**
62912
+ * Performs a
62913
+ * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
62914
+ * comparison between two values to determine if they are equivalent.
62915
+ *
62916
+ * @static
62917
+ * @memberOf _
62918
+ * @since 4.0.0
62919
+ * @category Lang
62920
+ * @param {*} value The value to compare.
62921
+ * @param {*} other The other value to compare.
62922
+ * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
62923
+ * @example
62924
+ *
62925
+ * var object = { 'a': 1 };
62926
+ * var other = { 'a': 1 };
62927
+ *
62928
+ * _.eq(object, object);
62929
+ * // => true
62930
+ *
62931
+ * _.eq(object, other);
62932
+ * // => false
62933
+ *
62934
+ * _.eq('a', 'a');
62935
+ * // => true
62936
+ *
62937
+ * _.eq('a', Object('a'));
62938
+ * // => false
62939
+ *
62940
+ * _.eq(NaN, NaN);
62941
+ * // => true
62942
+ */
62943
+
62944
+ function eq$2(value, other) {
62945
+ return value === other || value !== value && other !== other;
62946
+ }
62947
+
62948
+ var eq_1 = eq$2;
62949
+
62950
+ var eq$1 = eq_1;
62951
+ /**
62952
+ * Gets the index at which the `key` is found in `array` of key-value pairs.
62953
+ *
62954
+ * @private
62955
+ * @param {Array} array The array to inspect.
62956
+ * @param {*} key The key to search for.
62957
+ * @returns {number} Returns the index of the matched value, else `-1`.
62958
+ */
62959
+
62960
+ function assocIndexOf$4(array, key) {
62961
+ var length = array.length;
62962
+
62963
+ while (length--) {
62964
+ if (eq$1(array[length][0], key)) {
62965
+ return length;
62966
+ }
62967
+ }
62968
+
62969
+ return -1;
62970
+ }
62971
+
62972
+ var _assocIndexOf = assocIndexOf$4;
62973
+
62974
+ var assocIndexOf$3 = _assocIndexOf;
62975
+ /** Used for built-in method references. */
62976
+
62977
+ var arrayProto = Array.prototype;
62978
+ /** Built-in value references. */
62979
+
62980
+ var splice = arrayProto.splice;
62981
+ /**
62982
+ * Removes `key` and its value from the list cache.
62983
+ *
62984
+ * @private
62985
+ * @name delete
62986
+ * @memberOf ListCache
62987
+ * @param {string} key The key of the value to remove.
62988
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
62989
+ */
62990
+
62991
+ function listCacheDelete$1(key) {
62992
+ var data = this.__data__,
62993
+ index = assocIndexOf$3(data, key);
62994
+
62995
+ if (index < 0) {
62996
+ return false;
62997
+ }
62998
+
62999
+ var lastIndex = data.length - 1;
63000
+
63001
+ if (index == lastIndex) {
63002
+ data.pop();
63003
+ } else {
63004
+ splice.call(data, index, 1);
63005
+ }
63006
+
63007
+ --this.size;
63008
+ return true;
63009
+ }
63010
+
63011
+ var _listCacheDelete = listCacheDelete$1;
63012
+
63013
+ var assocIndexOf$2 = _assocIndexOf;
63014
+ /**
63015
+ * Gets the list cache value for `key`.
63016
+ *
63017
+ * @private
63018
+ * @name get
63019
+ * @memberOf ListCache
63020
+ * @param {string} key The key of the value to get.
63021
+ * @returns {*} Returns the entry value.
63022
+ */
63023
+
63024
+ function listCacheGet$1(key) {
63025
+ var data = this.__data__,
63026
+ index = assocIndexOf$2(data, key);
63027
+ return index < 0 ? undefined : data[index][1];
63028
+ }
63029
+
63030
+ var _listCacheGet = listCacheGet$1;
63031
+
63032
+ var assocIndexOf$1 = _assocIndexOf;
63033
+ /**
63034
+ * Checks if a list cache value for `key` exists.
63035
+ *
63036
+ * @private
63037
+ * @name has
63038
+ * @memberOf ListCache
63039
+ * @param {string} key The key of the entry to check.
63040
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
63041
+ */
63042
+
63043
+ function listCacheHas$1(key) {
63044
+ return assocIndexOf$1(this.__data__, key) > -1;
63045
+ }
63046
+
63047
+ var _listCacheHas = listCacheHas$1;
63048
+
63049
+ var assocIndexOf = _assocIndexOf;
63050
+ /**
63051
+ * Sets the list cache `key` to `value`.
63052
+ *
63053
+ * @private
63054
+ * @name set
63055
+ * @memberOf ListCache
63056
+ * @param {string} key The key of the value to set.
63057
+ * @param {*} value The value to set.
63058
+ * @returns {Object} Returns the list cache instance.
63059
+ */
63060
+
63061
+ function listCacheSet$1(key, value) {
63062
+ var data = this.__data__,
63063
+ index = assocIndexOf(data, key);
63064
+
63065
+ if (index < 0) {
63066
+ ++this.size;
63067
+ data.push([key, value]);
63068
+ } else {
63069
+ data[index][1] = value;
63070
+ }
63071
+
63072
+ return this;
63073
+ }
63074
+
63075
+ var _listCacheSet = listCacheSet$1;
63076
+
63077
+ var listCacheClear = _listCacheClear,
63078
+ listCacheDelete = _listCacheDelete,
63079
+ listCacheGet = _listCacheGet,
63080
+ listCacheHas = _listCacheHas,
63081
+ listCacheSet = _listCacheSet;
63082
+ /**
63083
+ * Creates an list cache object.
63084
+ *
63085
+ * @private
63086
+ * @constructor
63087
+ * @param {Array} [entries] The key-value pairs to cache.
63088
+ */
63089
+
63090
+ function ListCache$4(entries) {
63091
+ var index = -1,
63092
+ length = entries == null ? 0 : entries.length;
63093
+ this.clear();
63094
+
63095
+ while (++index < length) {
63096
+ var entry = entries[index];
63097
+ this.set(entry[0], entry[1]);
63098
+ }
63099
+ } // Add methods to `ListCache`.
63100
+
63101
+
63102
+ ListCache$4.prototype.clear = listCacheClear;
63103
+ ListCache$4.prototype['delete'] = listCacheDelete;
63104
+ ListCache$4.prototype.get = listCacheGet;
63105
+ ListCache$4.prototype.has = listCacheHas;
63106
+ ListCache$4.prototype.set = listCacheSet;
63107
+ var _ListCache = ListCache$4;
63108
+
63109
+ var ListCache$3 = _ListCache;
63110
+ /**
63111
+ * Removes all key-value entries from the stack.
63112
+ *
63113
+ * @private
63114
+ * @name clear
63115
+ * @memberOf Stack
63116
+ */
63117
+
63118
+ function stackClear$1() {
63119
+ this.__data__ = new ListCache$3();
63120
+ this.size = 0;
63121
+ }
63122
+
63123
+ var _stackClear = stackClear$1;
63124
+
63125
+ /**
63126
+ * Removes `key` and its value from the stack.
63127
+ *
63128
+ * @private
63129
+ * @name delete
63130
+ * @memberOf Stack
63131
+ * @param {string} key The key of the value to remove.
63132
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
63133
+ */
63134
+
63135
+ function stackDelete$1(key) {
63136
+ var data = this.__data__,
63137
+ result = data['delete'](key);
63138
+ this.size = data.size;
63139
+ return result;
63140
+ }
63141
+
63142
+ var _stackDelete = stackDelete$1;
63143
+
63144
+ /**
63145
+ * Gets the stack value for `key`.
63146
+ *
63147
+ * @private
63148
+ * @name get
63149
+ * @memberOf Stack
63150
+ * @param {string} key The key of the value to get.
63151
+ * @returns {*} Returns the entry value.
63152
+ */
63153
+
63154
+ function stackGet$1(key) {
63155
+ return this.__data__.get(key);
63156
+ }
63157
+
63158
+ var _stackGet = stackGet$1;
63159
+
63160
+ /**
63161
+ * Checks if a stack value for `key` exists.
63162
+ *
63163
+ * @private
63164
+ * @name has
63165
+ * @memberOf Stack
63166
+ * @param {string} key The key of the entry to check.
63167
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
63168
+ */
63169
+
63170
+ function stackHas$1(key) {
63171
+ return this.__data__.has(key);
63172
+ }
63173
+
63174
+ var _stackHas = stackHas$1;
63175
+
63176
+ function isObject$3(value) {
63177
+ var type = _typeof(value);
63178
+
63179
+ return value != null && (type == 'object' || type == 'function');
63180
+ }
63181
+
63182
+ var isObject_1 = isObject$3;
63183
+
63184
+ var baseGetTag$3 = _baseGetTag,
63185
+ isObject$2 = isObject_1;
63186
+ /** `Object#toString` result references. */
63187
+
63188
+ var asyncTag = '[object AsyncFunction]',
63189
+ funcTag$1 = '[object Function]',
63190
+ genTag = '[object GeneratorFunction]',
63191
+ proxyTag = '[object Proxy]';
63192
+ /**
63193
+ * Checks if `value` is classified as a `Function` object.
63194
+ *
63195
+ * @static
63196
+ * @memberOf _
63197
+ * @since 0.1.0
63198
+ * @category Lang
63199
+ * @param {*} value The value to check.
63200
+ * @returns {boolean} Returns `true` if `value` is a function, else `false`.
63201
+ * @example
63202
+ *
63203
+ * _.isFunction(_);
63204
+ * // => true
63205
+ *
63206
+ * _.isFunction(/abc/);
63207
+ * // => false
63208
+ */
63209
+
63210
+ function isFunction$2(value) {
63211
+ if (!isObject$2(value)) {
63212
+ return false;
63213
+ } // The use of `Object#toString` avoids issues with the `typeof` operator
63214
+ // in Safari 9 which returns 'object' for typed arrays and other constructors.
63215
+
63216
+
63217
+ var tag = baseGetTag$3(value);
63218
+ return tag == funcTag$1 || tag == genTag || tag == asyncTag || tag == proxyTag;
63219
+ }
63220
+
63221
+ var isFunction_1 = isFunction$2;
63222
+
63223
+ var root$6 = _root;
63224
+ /** Used to detect overreaching core-js shims. */
63225
+
63226
+ var coreJsData$1 = root$6['__core-js_shared__'];
63227
+ var _coreJsData = coreJsData$1;
63228
+
63229
+ var coreJsData = _coreJsData;
63230
+ /** Used to detect methods masquerading as native. */
63231
+
63232
+ var maskSrcKey = function () {
63233
+ var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
63234
+ return uid ? 'Symbol(src)_1.' + uid : '';
62748
63235
  }();
62749
- /** Gets new endpoints from a user's secondaries */
63236
+ /**
63237
+ * Checks if `func` has its source masked.
63238
+ *
63239
+ * @private
63240
+ * @param {Function} func The function to check.
63241
+ * @returns {boolean} Returns `true` if `func` is masked, else `false`.
63242
+ */
62750
63243
 
62751
63244
 
62752
- var getNewPrimary = /*#__PURE__*/function () {
62753
- var _ref2 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2(libs, secondaries) {
62754
- var _iterator, _step, _libs$creatorNode, secondary, syncStatus;
63245
+ function isMasked$1(func) {
63246
+ return !!maskSrcKey && maskSrcKey in func;
63247
+ }
62755
63248
 
62756
- return regeneratorRuntime.wrap(function _callee2$(_context2) {
62757
- while (1) {
62758
- switch (_context2.prev = _context2.next) {
62759
- case 0:
62760
- _iterator = _createForOfIteratorHelper(secondaries);
62761
- _context2.prev = 1;
63249
+ var _isMasked = isMasked$1;
62762
63250
 
62763
- _iterator.s();
63251
+ /** Used for built-in method references. */
63252
+ var funcProto$1 = Function.prototype;
63253
+ /** Used to resolve the decompiled source of functions. */
62764
63254
 
62765
- case 3:
62766
- if ((_step = _iterator.n()).done) {
62767
- _context2.next = 14;
62768
- break;
62769
- }
63255
+ var funcToString$1 = funcProto$1.toString;
63256
+ /**
63257
+ * Converts `func` to its source code.
63258
+ *
63259
+ * @private
63260
+ * @param {Function} func The function to convert.
63261
+ * @returns {string} Returns the source code.
63262
+ */
62770
63263
 
62771
- secondary = _step.value;
62772
- _context2.next = 7;
62773
- return (_libs$creatorNode = libs.creatorNode) === null || _libs$creatorNode === void 0 ? void 0 : _libs$creatorNode.getSyncStatus(secondary);
63264
+ function toSource$2(func) {
63265
+ if (func != null) {
63266
+ try {
63267
+ return funcToString$1.call(func);
63268
+ } catch (e) {}
62774
63269
 
62775
- case 7:
62776
- syncStatus = _context2.sent;
63270
+ try {
63271
+ return func + '';
63272
+ } catch (e) {}
63273
+ }
62777
63274
 
62778
- if (syncStatus) {
62779
- _context2.next = 10;
62780
- break;
62781
- }
63275
+ return '';
63276
+ }
62782
63277
 
62783
- return _context2.abrupt("continue", 12);
63278
+ var _toSource = toSource$2;
62784
63279
 
62785
- case 10:
62786
- if (syncStatus.isBehind) {
62787
- _context2.next = 12;
62788
- break;
62789
- }
63280
+ var isFunction$1 = isFunction_1,
63281
+ isMasked = _isMasked,
63282
+ isObject$1 = isObject_1,
63283
+ toSource$1 = _toSource;
63284
+ /**
63285
+ * Used to match `RegExp`
63286
+ * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
63287
+ */
62790
63288
 
62791
- return _context2.abrupt("return", secondary);
63289
+ var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
63290
+ /** Used to detect host constructors (Safari). */
62792
63291
 
62793
- case 12:
62794
- _context2.next = 3;
62795
- break;
63292
+ var reIsHostCtor = /^\[object .+?Constructor\]$/;
63293
+ /** Used for built-in method references. */
62796
63294
 
62797
- case 14:
62798
- _context2.next = 19;
62799
- break;
63295
+ var funcProto = Function.prototype,
63296
+ objectProto$9 = Object.prototype;
63297
+ /** Used to resolve the decompiled source of functions. */
62800
63298
 
62801
- case 16:
62802
- _context2.prev = 16;
62803
- _context2.t0 = _context2["catch"](1);
63299
+ var funcToString = funcProto.toString;
63300
+ /** Used to check objects for own properties. */
62804
63301
 
62805
- _iterator.e(_context2.t0);
63302
+ var hasOwnProperty$7 = objectProto$9.hasOwnProperty;
63303
+ /** Used to detect if a method is native. */
62806
63304
 
62807
- case 19:
62808
- _context2.prev = 19;
63305
+ var reIsNative = RegExp('^' + funcToString.call(hasOwnProperty$7).replace(reRegExpChar, '\\$&').replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$');
63306
+ /**
63307
+ * The base implementation of `_.isNative` without bad shim checks.
63308
+ *
63309
+ * @private
63310
+ * @param {*} value The value to check.
63311
+ * @returns {boolean} Returns `true` if `value` is a native function,
63312
+ * else `false`.
63313
+ */
62809
63314
 
62810
- _iterator.f();
63315
+ function baseIsNative$1(value) {
63316
+ if (!isObject$1(value) || isMasked(value)) {
63317
+ return false;
63318
+ }
62811
63319
 
62812
- return _context2.finish(19);
63320
+ var pattern = isFunction$1(value) ? reIsNative : reIsHostCtor;
63321
+ return pattern.test(toSource$1(value));
63322
+ }
62813
63323
 
62814
- case 22:
62815
- throw new Error("Could not find valid secondaries for user ".concat(secondaries));
63324
+ var _baseIsNative = baseIsNative$1;
62816
63325
 
62817
- case 23:
62818
- case "end":
62819
- return _context2.stop();
62820
- }
62821
- }
62822
- }, _callee2, null, [[1, 16, 19, 22]]);
62823
- }));
63326
+ /**
63327
+ * Gets the value at `key` of `object`.
63328
+ *
63329
+ * @private
63330
+ * @param {Object} [object] The object to query.
63331
+ * @param {string} key The key of the property to get.
63332
+ * @returns {*} Returns the property value.
63333
+ */
62824
63334
 
62825
- return function getNewPrimary(_x4, _x5) {
62826
- return _ref2.apply(this, arguments);
63335
+ function getValue$1(object, key) {
63336
+ return object == null ? undefined : object[key];
63337
+ }
63338
+
63339
+ var _getValue = getValue$1;
63340
+
63341
+ var baseIsNative = _baseIsNative,
63342
+ getValue = _getValue;
63343
+ /**
63344
+ * Gets the native function at `key` of `object`.
63345
+ *
63346
+ * @private
63347
+ * @param {Object} object The object to query.
63348
+ * @param {string} key The key of the method to get.
63349
+ * @returns {*} Returns the function if it's native, else `undefined`.
63350
+ */
63351
+
63352
+ function getNative$6(object, key) {
63353
+ var value = getValue(object, key);
63354
+ return baseIsNative(value) ? value : undefined;
63355
+ }
63356
+
63357
+ var _getNative = getNative$6;
63358
+
63359
+ var getNative$5 = _getNative,
63360
+ root$5 = _root;
63361
+ /* Built-in method references that are verified to be native. */
63362
+
63363
+ var Map$4 = getNative$5(root$5, 'Map');
63364
+ var _Map = Map$4;
63365
+
63366
+ var getNative$4 = _getNative;
63367
+ /* Built-in method references that are verified to be native. */
63368
+
63369
+ var nativeCreate$4 = getNative$4(Object, 'create');
63370
+ var _nativeCreate = nativeCreate$4;
63371
+
63372
+ var nativeCreate$3 = _nativeCreate;
63373
+ /**
63374
+ * Removes all key-value entries from the hash.
63375
+ *
63376
+ * @private
63377
+ * @name clear
63378
+ * @memberOf Hash
63379
+ */
63380
+
63381
+ function hashClear$1() {
63382
+ this.__data__ = nativeCreate$3 ? nativeCreate$3(null) : {};
63383
+ this.size = 0;
63384
+ }
63385
+
63386
+ var _hashClear = hashClear$1;
63387
+
63388
+ /**
63389
+ * Removes `key` and its value from the hash.
63390
+ *
63391
+ * @private
63392
+ * @name delete
63393
+ * @memberOf Hash
63394
+ * @param {Object} hash The hash to modify.
63395
+ * @param {string} key The key of the value to remove.
63396
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
63397
+ */
63398
+
63399
+ function hashDelete$1(key) {
63400
+ var result = this.has(key) && delete this.__data__[key];
63401
+ this.size -= result ? 1 : 0;
63402
+ return result;
63403
+ }
63404
+
63405
+ var _hashDelete = hashDelete$1;
63406
+
63407
+ var nativeCreate$2 = _nativeCreate;
63408
+ /** Used to stand-in for `undefined` hash values. */
63409
+
63410
+ var HASH_UNDEFINED$2 = '__lodash_hash_undefined__';
63411
+ /** Used for built-in method references. */
63412
+
63413
+ var objectProto$8 = Object.prototype;
63414
+ /** Used to check objects for own properties. */
63415
+
63416
+ var hasOwnProperty$6 = objectProto$8.hasOwnProperty;
63417
+ /**
63418
+ * Gets the hash value for `key`.
63419
+ *
63420
+ * @private
63421
+ * @name get
63422
+ * @memberOf Hash
63423
+ * @param {string} key The key of the value to get.
63424
+ * @returns {*} Returns the entry value.
63425
+ */
63426
+
63427
+ function hashGet$1(key) {
63428
+ var data = this.__data__;
63429
+
63430
+ if (nativeCreate$2) {
63431
+ var result = data[key];
63432
+ return result === HASH_UNDEFINED$2 ? undefined : result;
63433
+ }
63434
+
63435
+ return hasOwnProperty$6.call(data, key) ? data[key] : undefined;
63436
+ }
63437
+
63438
+ var _hashGet = hashGet$1;
63439
+
63440
+ var nativeCreate$1 = _nativeCreate;
63441
+ /** Used for built-in method references. */
63442
+
63443
+ var objectProto$7 = Object.prototype;
63444
+ /** Used to check objects for own properties. */
63445
+
63446
+ var hasOwnProperty$5 = objectProto$7.hasOwnProperty;
63447
+ /**
63448
+ * Checks if a hash value for `key` exists.
63449
+ *
63450
+ * @private
63451
+ * @name has
63452
+ * @memberOf Hash
63453
+ * @param {string} key The key of the entry to check.
63454
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
63455
+ */
63456
+
63457
+ function hashHas$1(key) {
63458
+ var data = this.__data__;
63459
+ return nativeCreate$1 ? data[key] !== undefined : hasOwnProperty$5.call(data, key);
63460
+ }
63461
+
63462
+ var _hashHas = hashHas$1;
63463
+
63464
+ var nativeCreate = _nativeCreate;
63465
+ /** Used to stand-in for `undefined` hash values. */
63466
+
63467
+ var HASH_UNDEFINED$1 = '__lodash_hash_undefined__';
63468
+ /**
63469
+ * Sets the hash `key` to `value`.
63470
+ *
63471
+ * @private
63472
+ * @name set
63473
+ * @memberOf Hash
63474
+ * @param {string} key The key of the value to set.
63475
+ * @param {*} value The value to set.
63476
+ * @returns {Object} Returns the hash instance.
63477
+ */
63478
+
63479
+ function hashSet$1(key, value) {
63480
+ var data = this.__data__;
63481
+ this.size += this.has(key) ? 0 : 1;
63482
+ data[key] = nativeCreate && value === undefined ? HASH_UNDEFINED$1 : value;
63483
+ return this;
63484
+ }
63485
+
63486
+ var _hashSet = hashSet$1;
63487
+
63488
+ var hashClear = _hashClear,
63489
+ hashDelete = _hashDelete,
63490
+ hashGet = _hashGet,
63491
+ hashHas = _hashHas,
63492
+ hashSet = _hashSet;
63493
+ /**
63494
+ * Creates a hash object.
63495
+ *
63496
+ * @private
63497
+ * @constructor
63498
+ * @param {Array} [entries] The key-value pairs to cache.
63499
+ */
63500
+
63501
+ function Hash$1(entries) {
63502
+ var index = -1,
63503
+ length = entries == null ? 0 : entries.length;
63504
+ this.clear();
63505
+
63506
+ while (++index < length) {
63507
+ var entry = entries[index];
63508
+ this.set(entry[0], entry[1]);
63509
+ }
63510
+ } // Add methods to `Hash`.
63511
+
63512
+
63513
+ Hash$1.prototype.clear = hashClear;
63514
+ Hash$1.prototype['delete'] = hashDelete;
63515
+ Hash$1.prototype.get = hashGet;
63516
+ Hash$1.prototype.has = hashHas;
63517
+ Hash$1.prototype.set = hashSet;
63518
+ var _Hash = Hash$1;
63519
+
63520
+ var Hash = _Hash,
63521
+ ListCache$2 = _ListCache,
63522
+ Map$3 = _Map;
63523
+ /**
63524
+ * Removes all key-value entries from the map.
63525
+ *
63526
+ * @private
63527
+ * @name clear
63528
+ * @memberOf MapCache
63529
+ */
63530
+
63531
+ function mapCacheClear$1() {
63532
+ this.size = 0;
63533
+ this.__data__ = {
63534
+ 'hash': new Hash(),
63535
+ 'map': new (Map$3 || ListCache$2)(),
63536
+ 'string': new Hash()
62827
63537
  };
62828
- }();
63538
+ }
62829
63539
 
62830
- var rolloverNodes = /*#__PURE__*/function () {
62831
- var _ref3 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee3(libs, creatorNodeWhitelist, creatorNodeBlacklist) {
62832
- var _libs$userStateManage;
63540
+ var _mapCacheClear = mapCacheClear$1;
62833
63541
 
62834
- var user, primary, healthy, secondaries, _libs$ServiceProvider, _libs$User, _libs$User2, _libs$creatorNode2, _libs$User3, newPrimary, index, newSecondaries, autoselect, newEndpoints, newMetadata;
63542
+ function isKeyable$1(value) {
63543
+ var type = _typeof(value);
62835
63544
 
62836
- return regeneratorRuntime.wrap(function _callee3$(_context3) {
62837
- while (1) {
62838
- switch (_context3.prev = _context3.next) {
62839
- case 0:
62840
- console.debug('Sanity Check - rolloverNodes');
62841
- user = (_libs$userStateManage = libs.userStateManager) === null || _libs$userStateManage === void 0 ? void 0 : _libs$userStateManage.getCurrentUser();
63545
+ return type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean' ? value !== '__proto__' : value === null;
63546
+ }
62842
63547
 
62843
- if (user) {
62844
- _context3.next = 4;
62845
- break;
62846
- }
63548
+ var _isKeyable = isKeyable$1;
62847
63549
 
62848
- return _context3.abrupt("return");
63550
+ var isKeyable = _isKeyable;
63551
+ /**
63552
+ * Gets the data for `map`.
63553
+ *
63554
+ * @private
63555
+ * @param {Object} map The map to query.
63556
+ * @param {string} key The reference key.
63557
+ * @returns {*} Returns the map data.
63558
+ */
62849
63559
 
62850
- case 4:
62851
- primary = CreatorNode.getPrimary(user.creator_node_endpoint);
63560
+ function getMapData$4(map, key) {
63561
+ var data = map.__data__;
63562
+ return isKeyable(key) ? data[typeof key == 'string' ? 'string' : 'hash'] : data.map;
63563
+ }
62852
63564
 
62853
- if (primary) {
62854
- _context3.next = 7;
62855
- break;
62856
- }
63565
+ var _getMapData = getMapData$4;
62857
63566
 
62858
- return _context3.abrupt("return");
63567
+ var getMapData$3 = _getMapData;
63568
+ /**
63569
+ * Removes `key` and its value from the map.
63570
+ *
63571
+ * @private
63572
+ * @name delete
63573
+ * @memberOf MapCache
63574
+ * @param {string} key The key of the value to remove.
63575
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
63576
+ */
62859
63577
 
62860
- case 7:
62861
- _context3.next = 9;
62862
- return checkPrimaryHealthy(libs, primary, MAX_TRIES);
63578
+ function mapCacheDelete$1(key) {
63579
+ var result = getMapData$3(this, key)['delete'](key);
63580
+ this.size -= result ? 1 : 0;
63581
+ return result;
63582
+ }
62863
63583
 
62864
- case 9:
62865
- healthy = _context3.sent;
63584
+ var _mapCacheDelete = mapCacheDelete$1;
62866
63585
 
62867
- if (!(healthy && !(creatorNodeBlacklist !== null && creatorNodeBlacklist !== void 0 && creatorNodeBlacklist.has(primary)))) {
62868
- _context3.next = 12;
62869
- break;
62870
- }
63586
+ var getMapData$2 = _getMapData;
63587
+ /**
63588
+ * Gets the map value for `key`.
63589
+ *
63590
+ * @private
63591
+ * @name get
63592
+ * @memberOf MapCache
63593
+ * @param {string} key The key of the value to get.
63594
+ * @returns {*} Returns the entry value.
63595
+ */
62871
63596
 
62872
- return _context3.abrupt("return");
63597
+ function mapCacheGet$1(key) {
63598
+ return getMapData$2(this, key).get(key);
63599
+ }
62873
63600
 
62874
- case 12:
62875
- secondaries = CreatorNode.getSecondaries(user.creator_node_endpoint);
62876
- _context3.prev = 13;
62877
- _context3.next = 16;
62878
- return getNewPrimary(libs, secondaries);
63601
+ var _mapCacheGet = mapCacheGet$1;
62879
63602
 
62880
- case 16:
62881
- newPrimary = _context3.sent;
62882
- index = secondaries.indexOf(newPrimary); // Get new secondaries and backfill up to 2
63603
+ var getMapData$1 = _getMapData;
63604
+ /**
63605
+ * Checks if a map value for `key` exists.
63606
+ *
63607
+ * @private
63608
+ * @name has
63609
+ * @memberOf MapCache
63610
+ * @param {string} key The key of the entry to check.
63611
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
63612
+ */
62883
63613
 
62884
- newSecondaries = _toConsumableArray(secondaries);
62885
- newSecondaries.splice(index, 1);
62886
- _context3.next = 22;
62887
- return (_libs$ServiceProvider = libs.ServiceProvider) === null || _libs$ServiceProvider === void 0 ? void 0 : _libs$ServiceProvider.autoSelectCreatorNodes({
62888
- numberOfNodes: 2 - newSecondaries.length,
62889
- whitelist: creatorNodeWhitelist,
62890
- // Exclude ones we currently have
62891
- blacklist: new Set([newPrimary].concat(_toConsumableArray(newSecondaries))),
62892
- preferHigherPatchForPrimary: (_libs$User = libs.User) === null || _libs$User === void 0 ? void 0 : _libs$User.preferHigherPatchForPrimary,
62893
- preferHigherPatchForSecondaries: (_libs$User2 = libs.User) === null || _libs$User2 === void 0 ? void 0 : _libs$User2.preferHigherPatchForSecondaries
62894
- });
63614
+ function mapCacheHas$1(key) {
63615
+ return getMapData$1(this, key).has(key);
63616
+ }
62895
63617
 
62896
- case 22:
62897
- autoselect = _context3.sent;
63618
+ var _mapCacheHas = mapCacheHas$1;
62898
63619
 
62899
- if (autoselect) {
62900
- newSecondaries = newSecondaries.concat([autoselect.primary].concat(_toConsumableArray(autoselect.secondaries)));
62901
- } // Set the new endpoint and connect to it
63620
+ var getMapData = _getMapData;
63621
+ /**
63622
+ * Sets the map `key` to `value`.
63623
+ *
63624
+ * @private
63625
+ * @name set
63626
+ * @memberOf MapCache
63627
+ * @param {string} key The key of the value to set.
63628
+ * @param {*} value The value to set.
63629
+ * @returns {Object} Returns the map cache instance.
63630
+ */
62902
63631
 
63632
+ function mapCacheSet$1(key, value) {
63633
+ var data = getMapData(this, key),
63634
+ size = data.size;
63635
+ data.set(key, value);
63636
+ this.size += data.size == size ? 0 : 1;
63637
+ return this;
63638
+ }
62903
63639
 
62904
- newEndpoints = [newPrimary].concat(_toConsumableArray(newSecondaries));
62905
- _context3.next = 27;
62906
- return (_libs$creatorNode2 = libs.creatorNode) === null || _libs$creatorNode2 === void 0 ? void 0 : _libs$creatorNode2.setEndpoint(newEndpoints[0]);
63640
+ var _mapCacheSet = mapCacheSet$1;
62907
63641
 
62908
- case 27:
62909
- // Update the user
62910
- newMetadata = _objectSpread2({}, user);
62911
- newMetadata.creator_node_endpoint = newEndpoints.join(',');
62912
- console.debug("Sanity Check - rolloverNodes - new nodes ".concat(newMetadata.creator_node_endpoint));
62913
- _context3.next = 32;
62914
- return (_libs$User3 = libs.User) === null || _libs$User3 === void 0 ? void 0 : _libs$User3.updateCreator(user.user_id, newMetadata);
63642
+ var mapCacheClear = _mapCacheClear,
63643
+ mapCacheDelete = _mapCacheDelete,
63644
+ mapCacheGet = _mapCacheGet,
63645
+ mapCacheHas = _mapCacheHas,
63646
+ mapCacheSet = _mapCacheSet;
63647
+ /**
63648
+ * Creates a map cache object to store key-value pairs.
63649
+ *
63650
+ * @private
63651
+ * @constructor
63652
+ * @param {Array} [entries] The key-value pairs to cache.
63653
+ */
62915
63654
 
62916
- case 32:
62917
- _context3.next = 37;
62918
- break;
63655
+ function MapCache$3(entries) {
63656
+ var index = -1,
63657
+ length = entries == null ? 0 : entries.length;
63658
+ this.clear();
62919
63659
 
62920
- case 34:
62921
- _context3.prev = 34;
62922
- _context3.t0 = _context3["catch"](13);
62923
- console.error(_context3.t0);
63660
+ while (++index < length) {
63661
+ var entry = entries[index];
63662
+ this.set(entry[0], entry[1]);
63663
+ }
63664
+ } // Add methods to `MapCache`.
62924
63665
 
62925
- case 37:
62926
- case "end":
62927
- return _context3.stop();
62928
- }
62929
- }
62930
- }, _callee3, null, [[13, 34]]);
62931
- }));
62932
63666
 
62933
- return function rolloverNodes(_x6, _x7, _x8) {
62934
- return _ref3.apply(this, arguments);
63667
+ MapCache$3.prototype.clear = mapCacheClear;
63668
+ MapCache$3.prototype['delete'] = mapCacheDelete;
63669
+ MapCache$3.prototype.get = mapCacheGet;
63670
+ MapCache$3.prototype.has = mapCacheHas;
63671
+ MapCache$3.prototype.set = mapCacheSet;
63672
+ var _MapCache = MapCache$3;
63673
+
63674
+ var ListCache$1 = _ListCache,
63675
+ Map$2 = _Map,
63676
+ MapCache$2 = _MapCache;
63677
+ /** Used as the size to enable large array optimizations. */
63678
+
63679
+ var LARGE_ARRAY_SIZE = 200;
63680
+ /**
63681
+ * Sets the stack `key` to `value`.
63682
+ *
63683
+ * @private
63684
+ * @name set
63685
+ * @memberOf Stack
63686
+ * @param {string} key The key of the value to set.
63687
+ * @param {*} value The value to set.
63688
+ * @returns {Object} Returns the stack cache instance.
63689
+ */
63690
+
63691
+ function stackSet$1(key, value) {
63692
+ var data = this.__data__;
63693
+
63694
+ if (data instanceof ListCache$1) {
63695
+ var pairs = data.__data__;
63696
+
63697
+ if (!Map$2 || pairs.length < LARGE_ARRAY_SIZE - 1) {
63698
+ pairs.push([key, value]);
63699
+ this.size = ++data.size;
63700
+ return this;
63701
+ }
63702
+
63703
+ data = this.__data__ = new MapCache$2(pairs);
63704
+ }
63705
+
63706
+ data.set(key, value);
63707
+ this.size = data.size;
63708
+ return this;
63709
+ }
63710
+
63711
+ var _stackSet = stackSet$1;
63712
+
63713
+ var ListCache = _ListCache,
63714
+ stackClear = _stackClear,
63715
+ stackDelete = _stackDelete,
63716
+ stackGet = _stackGet,
63717
+ stackHas = _stackHas,
63718
+ stackSet = _stackSet;
63719
+ /**
63720
+ * Creates a stack cache object to store key-value pairs.
63721
+ *
63722
+ * @private
63723
+ * @constructor
63724
+ * @param {Array} [entries] The key-value pairs to cache.
63725
+ */
63726
+
63727
+ function Stack$2(entries) {
63728
+ var data = this.__data__ = new ListCache(entries);
63729
+ this.size = data.size;
63730
+ } // Add methods to `Stack`.
63731
+
63732
+
63733
+ Stack$2.prototype.clear = stackClear;
63734
+ Stack$2.prototype['delete'] = stackDelete;
63735
+ Stack$2.prototype.get = stackGet;
63736
+ Stack$2.prototype.has = stackHas;
63737
+ Stack$2.prototype.set = stackSet;
63738
+ var _Stack = Stack$2;
63739
+
63740
+ /** Used to stand-in for `undefined` hash values. */
63741
+ var HASH_UNDEFINED = '__lodash_hash_undefined__';
63742
+ /**
63743
+ * Adds `value` to the array cache.
63744
+ *
63745
+ * @private
63746
+ * @name add
63747
+ * @memberOf SetCache
63748
+ * @alias push
63749
+ * @param {*} value The value to cache.
63750
+ * @returns {Object} Returns the cache instance.
63751
+ */
63752
+
63753
+ function setCacheAdd$1(value) {
63754
+ this.__data__.set(value, HASH_UNDEFINED);
63755
+
63756
+ return this;
63757
+ }
63758
+
63759
+ var _setCacheAdd = setCacheAdd$1;
63760
+
63761
+ /**
63762
+ * Checks if `value` is in the array cache.
63763
+ *
63764
+ * @private
63765
+ * @name has
63766
+ * @memberOf SetCache
63767
+ * @param {*} value The value to search for.
63768
+ * @returns {number} Returns `true` if `value` is found, else `false`.
63769
+ */
63770
+
63771
+ function setCacheHas$1(value) {
63772
+ return this.__data__.has(value);
63773
+ }
63774
+
63775
+ var _setCacheHas = setCacheHas$1;
63776
+
63777
+ var MapCache$1 = _MapCache,
63778
+ setCacheAdd = _setCacheAdd,
63779
+ setCacheHas = _setCacheHas;
63780
+ /**
63781
+ *
63782
+ * Creates an array cache object to store unique values.
63783
+ *
63784
+ * @private
63785
+ * @constructor
63786
+ * @param {Array} [values] The values to cache.
63787
+ */
63788
+
63789
+ function SetCache$1(values) {
63790
+ var index = -1,
63791
+ length = values == null ? 0 : values.length;
63792
+ this.__data__ = new MapCache$1();
63793
+
63794
+ while (++index < length) {
63795
+ this.add(values[index]);
63796
+ }
63797
+ } // Add methods to `SetCache`.
63798
+
63799
+
63800
+ SetCache$1.prototype.add = SetCache$1.prototype.push = setCacheAdd;
63801
+ SetCache$1.prototype.has = setCacheHas;
63802
+ var _SetCache = SetCache$1;
63803
+
63804
+ /**
63805
+ * A specialized version of `_.some` for arrays without support for iteratee
63806
+ * shorthands.
63807
+ *
63808
+ * @private
63809
+ * @param {Array} [array] The array to iterate over.
63810
+ * @param {Function} predicate The function invoked per iteration.
63811
+ * @returns {boolean} Returns `true` if any element passes the predicate check,
63812
+ * else `false`.
63813
+ */
63814
+
63815
+ function arraySome$1(array, predicate) {
63816
+ var index = -1,
63817
+ length = array == null ? 0 : array.length;
63818
+
63819
+ while (++index < length) {
63820
+ if (predicate(array[index], index, array)) {
63821
+ return true;
63822
+ }
63823
+ }
63824
+
63825
+ return false;
63826
+ }
63827
+
63828
+ var _arraySome = arraySome$1;
63829
+
63830
+ /**
63831
+ * Checks if a `cache` value for `key` exists.
63832
+ *
63833
+ * @private
63834
+ * @param {Object} cache The cache to query.
63835
+ * @param {string} key The key of the entry to check.
63836
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
63837
+ */
63838
+
63839
+ function cacheHas$1(cache, key) {
63840
+ return cache.has(key);
63841
+ }
63842
+
63843
+ var _cacheHas = cacheHas$1;
63844
+
63845
+ var SetCache = _SetCache,
63846
+ arraySome = _arraySome,
63847
+ cacheHas = _cacheHas;
63848
+ /** Used to compose bitmasks for value comparisons. */
63849
+
63850
+ var COMPARE_PARTIAL_FLAG$5 = 1,
63851
+ COMPARE_UNORDERED_FLAG$3 = 2;
63852
+ /**
63853
+ * A specialized version of `baseIsEqualDeep` for arrays with support for
63854
+ * partial deep comparisons.
63855
+ *
63856
+ * @private
63857
+ * @param {Array} array The array to compare.
63858
+ * @param {Array} other The other array to compare.
63859
+ * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
63860
+ * @param {Function} customizer The function to customize comparisons.
63861
+ * @param {Function} equalFunc The function to determine equivalents of values.
63862
+ * @param {Object} stack Tracks traversed `array` and `other` objects.
63863
+ * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.
63864
+ */
63865
+
63866
+ function equalArrays$2(array, other, bitmask, customizer, equalFunc, stack) {
63867
+ var isPartial = bitmask & COMPARE_PARTIAL_FLAG$5,
63868
+ arrLength = array.length,
63869
+ othLength = other.length;
63870
+
63871
+ if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
63872
+ return false;
63873
+ } // Check that cyclic values are equal.
63874
+
63875
+
63876
+ var arrStacked = stack.get(array);
63877
+ var othStacked = stack.get(other);
63878
+
63879
+ if (arrStacked && othStacked) {
63880
+ return arrStacked == other && othStacked == array;
63881
+ }
63882
+
63883
+ var index = -1,
63884
+ result = true,
63885
+ seen = bitmask & COMPARE_UNORDERED_FLAG$3 ? new SetCache() : undefined;
63886
+ stack.set(array, other);
63887
+ stack.set(other, array); // Ignore non-index properties.
63888
+
63889
+ while (++index < arrLength) {
63890
+ var arrValue = array[index],
63891
+ othValue = other[index];
63892
+
63893
+ if (customizer) {
63894
+ var compared = isPartial ? customizer(othValue, arrValue, index, other, array, stack) : customizer(arrValue, othValue, index, array, other, stack);
63895
+ }
63896
+
63897
+ if (compared !== undefined) {
63898
+ if (compared) {
63899
+ continue;
63900
+ }
63901
+
63902
+ result = false;
63903
+ break;
63904
+ } // Recursively compare arrays (susceptible to call stack limits).
63905
+
63906
+
63907
+ if (seen) {
63908
+ if (!arraySome(other, function (othValue, othIndex) {
63909
+ if (!cacheHas(seen, othIndex) && (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {
63910
+ return seen.push(othIndex);
63911
+ }
63912
+ })) {
63913
+ result = false;
63914
+ break;
63915
+ }
63916
+ } else if (!(arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {
63917
+ result = false;
63918
+ break;
63919
+ }
63920
+ }
63921
+
63922
+ stack['delete'](array);
63923
+ stack['delete'](other);
63924
+ return result;
63925
+ }
63926
+
63927
+ var _equalArrays = equalArrays$2;
63928
+
63929
+ var root$4 = _root;
63930
+ /** Built-in value references. */
63931
+
63932
+ var Uint8Array$2 = root$4.Uint8Array;
63933
+ var _Uint8Array = Uint8Array$2;
63934
+
63935
+ /**
63936
+ * Converts `map` to its key-value pairs.
63937
+ *
63938
+ * @private
63939
+ * @param {Object} map The map to convert.
63940
+ * @returns {Array} Returns the key-value pairs.
63941
+ */
63942
+
63943
+ function mapToArray$1(map) {
63944
+ var index = -1,
63945
+ result = Array(map.size);
63946
+ map.forEach(function (value, key) {
63947
+ result[++index] = [key, value];
63948
+ });
63949
+ return result;
63950
+ }
63951
+
63952
+ var _mapToArray = mapToArray$1;
63953
+
63954
+ /**
63955
+ * Converts `set` to an array of its values.
63956
+ *
63957
+ * @private
63958
+ * @param {Object} set The set to convert.
63959
+ * @returns {Array} Returns the values.
63960
+ */
63961
+
63962
+ function setToArray$1(set) {
63963
+ var index = -1,
63964
+ result = Array(set.size);
63965
+ set.forEach(function (value) {
63966
+ result[++index] = value;
63967
+ });
63968
+ return result;
63969
+ }
63970
+
63971
+ var _setToArray = setToArray$1;
63972
+
63973
+ var _Symbol$1 = _Symbol$4,
63974
+ Uint8Array$1 = _Uint8Array,
63975
+ eq = eq_1,
63976
+ equalArrays$1 = _equalArrays,
63977
+ mapToArray = _mapToArray,
63978
+ setToArray = _setToArray;
63979
+ /** Used to compose bitmasks for value comparisons. */
63980
+
63981
+ var COMPARE_PARTIAL_FLAG$4 = 1,
63982
+ COMPARE_UNORDERED_FLAG$2 = 2;
63983
+ /** `Object#toString` result references. */
63984
+
63985
+ var boolTag$1 = '[object Boolean]',
63986
+ dateTag$1 = '[object Date]',
63987
+ errorTag$1 = '[object Error]',
63988
+ mapTag$2 = '[object Map]',
63989
+ numberTag$1 = '[object Number]',
63990
+ regexpTag$1 = '[object RegExp]',
63991
+ setTag$2 = '[object Set]',
63992
+ stringTag$1 = '[object String]',
63993
+ symbolTag = '[object Symbol]';
63994
+ var arrayBufferTag$1 = '[object ArrayBuffer]',
63995
+ dataViewTag$2 = '[object DataView]';
63996
+ /** Used to convert symbols to primitives and strings. */
63997
+
63998
+ var symbolProto$1 = _Symbol$1 ? _Symbol$1.prototype : undefined,
63999
+ symbolValueOf = symbolProto$1 ? symbolProto$1.valueOf : undefined;
64000
+ /**
64001
+ * A specialized version of `baseIsEqualDeep` for comparing objects of
64002
+ * the same `toStringTag`.
64003
+ *
64004
+ * **Note:** This function only supports comparing values with tags of
64005
+ * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
64006
+ *
64007
+ * @private
64008
+ * @param {Object} object The object to compare.
64009
+ * @param {Object} other The other object to compare.
64010
+ * @param {string} tag The `toStringTag` of the objects to compare.
64011
+ * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
64012
+ * @param {Function} customizer The function to customize comparisons.
64013
+ * @param {Function} equalFunc The function to determine equivalents of values.
64014
+ * @param {Object} stack Tracks traversed `object` and `other` objects.
64015
+ * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
64016
+ */
64017
+
64018
+ function equalByTag$1(object, other, tag, bitmask, customizer, equalFunc, stack) {
64019
+ switch (tag) {
64020
+ case dataViewTag$2:
64021
+ if (object.byteLength != other.byteLength || object.byteOffset != other.byteOffset) {
64022
+ return false;
64023
+ }
64024
+
64025
+ object = object.buffer;
64026
+ other = other.buffer;
64027
+
64028
+ case arrayBufferTag$1:
64029
+ if (object.byteLength != other.byteLength || !equalFunc(new Uint8Array$1(object), new Uint8Array$1(other))) {
64030
+ return false;
64031
+ }
64032
+
64033
+ return true;
64034
+
64035
+ case boolTag$1:
64036
+ case dateTag$1:
64037
+ case numberTag$1:
64038
+ // Coerce booleans to `1` or `0` and dates to milliseconds.
64039
+ // Invalid dates are coerced to `NaN`.
64040
+ return eq(+object, +other);
64041
+
64042
+ case errorTag$1:
64043
+ return object.name == other.name && object.message == other.message;
64044
+
64045
+ case regexpTag$1:
64046
+ case stringTag$1:
64047
+ // Coerce regexes to strings and treat strings, primitives and objects,
64048
+ // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring
64049
+ // for more details.
64050
+ return object == other + '';
64051
+
64052
+ case mapTag$2:
64053
+ var convert = mapToArray;
64054
+
64055
+ case setTag$2:
64056
+ var isPartial = bitmask & COMPARE_PARTIAL_FLAG$4;
64057
+ convert || (convert = setToArray);
64058
+
64059
+ if (object.size != other.size && !isPartial) {
64060
+ return false;
64061
+ } // Assume cyclic values are equal.
64062
+
64063
+
64064
+ var stacked = stack.get(object);
64065
+
64066
+ if (stacked) {
64067
+ return stacked == other;
64068
+ }
64069
+
64070
+ bitmask |= COMPARE_UNORDERED_FLAG$2; // Recursively compare objects (susceptible to call stack limits).
64071
+
64072
+ stack.set(object, other);
64073
+ var result = equalArrays$1(convert(object), convert(other), bitmask, customizer, equalFunc, stack);
64074
+ stack['delete'](object);
64075
+ return result;
64076
+
64077
+ case symbolTag:
64078
+ if (symbolValueOf) {
64079
+ return symbolValueOf.call(object) == symbolValueOf.call(other);
64080
+ }
64081
+
64082
+ }
64083
+
64084
+ return false;
64085
+ }
64086
+
64087
+ var _equalByTag = equalByTag$1;
64088
+
64089
+ /**
64090
+ * Appends the elements of `values` to `array`.
64091
+ *
64092
+ * @private
64093
+ * @param {Array} array The array to modify.
64094
+ * @param {Array} values The values to append.
64095
+ * @returns {Array} Returns `array`.
64096
+ */
64097
+
64098
+ function arrayPush$1(array, values) {
64099
+ var index = -1,
64100
+ length = values.length,
64101
+ offset = array.length;
64102
+
64103
+ while (++index < length) {
64104
+ array[offset + index] = values[index];
64105
+ }
64106
+
64107
+ return array;
64108
+ }
64109
+
64110
+ var _arrayPush = arrayPush$1;
64111
+
64112
+ /**
64113
+ * Checks if `value` is classified as an `Array` object.
64114
+ *
64115
+ * @static
64116
+ * @memberOf _
64117
+ * @since 0.1.0
64118
+ * @category Lang
64119
+ * @param {*} value The value to check.
64120
+ * @returns {boolean} Returns `true` if `value` is an array, else `false`.
64121
+ * @example
64122
+ *
64123
+ * _.isArray([1, 2, 3]);
64124
+ * // => true
64125
+ *
64126
+ * _.isArray(document.body.children);
64127
+ * // => false
64128
+ *
64129
+ * _.isArray('abc');
64130
+ * // => false
64131
+ *
64132
+ * _.isArray(_.noop);
64133
+ * // => false
64134
+ */
64135
+ var isArray$8 = Array.isArray;
64136
+ var isArray_1 = isArray$8;
64137
+
64138
+ var arrayPush = _arrayPush,
64139
+ isArray$7 = isArray_1;
64140
+ /**
64141
+ * The base implementation of `getAllKeys` and `getAllKeysIn` which uses
64142
+ * `keysFunc` and `symbolsFunc` to get the enumerable property names and
64143
+ * symbols of `object`.
64144
+ *
64145
+ * @private
64146
+ * @param {Object} object The object to query.
64147
+ * @param {Function} keysFunc The function to get the keys of `object`.
64148
+ * @param {Function} symbolsFunc The function to get the symbols of `object`.
64149
+ * @returns {Array} Returns the array of property names and symbols.
64150
+ */
64151
+
64152
+ function baseGetAllKeys$1(object, keysFunc, symbolsFunc) {
64153
+ var result = keysFunc(object);
64154
+ return isArray$7(object) ? result : arrayPush(result, symbolsFunc(object));
64155
+ }
64156
+
64157
+ var _baseGetAllKeys = baseGetAllKeys$1;
64158
+
64159
+ /**
64160
+ * A specialized version of `_.filter` for arrays without support for
64161
+ * iteratee shorthands.
64162
+ *
64163
+ * @private
64164
+ * @param {Array} [array] The array to iterate over.
64165
+ * @param {Function} predicate The function invoked per iteration.
64166
+ * @returns {Array} Returns the new filtered array.
64167
+ */
64168
+
64169
+ function arrayFilter$1(array, predicate) {
64170
+ var index = -1,
64171
+ length = array == null ? 0 : array.length,
64172
+ resIndex = 0,
64173
+ result = [];
64174
+
64175
+ while (++index < length) {
64176
+ var value = array[index];
64177
+
64178
+ if (predicate(value, index, array)) {
64179
+ result[resIndex++] = value;
64180
+ }
64181
+ }
64182
+
64183
+ return result;
64184
+ }
64185
+
64186
+ var _arrayFilter = arrayFilter$1;
64187
+
64188
+ /**
64189
+ * This method returns a new empty array.
64190
+ *
64191
+ * @static
64192
+ * @memberOf _
64193
+ * @since 4.13.0
64194
+ * @category Util
64195
+ * @returns {Array} Returns the new empty array.
64196
+ * @example
64197
+ *
64198
+ * var arrays = _.times(2, _.stubArray);
64199
+ *
64200
+ * console.log(arrays);
64201
+ * // => [[], []]
64202
+ *
64203
+ * console.log(arrays[0] === arrays[1]);
64204
+ * // => false
64205
+ */
64206
+
64207
+ function stubArray$1() {
64208
+ return [];
64209
+ }
64210
+
64211
+ var stubArray_1 = stubArray$1;
64212
+
64213
+ var arrayFilter = _arrayFilter,
64214
+ stubArray = stubArray_1;
64215
+ /** Used for built-in method references. */
64216
+
64217
+ var objectProto$6 = Object.prototype;
64218
+ /** Built-in value references. */
64219
+
64220
+ var propertyIsEnumerable$1 = objectProto$6.propertyIsEnumerable;
64221
+ /* Built-in method references for those with the same name as other `lodash` methods. */
64222
+
64223
+ var nativeGetSymbols = Object.getOwnPropertySymbols;
64224
+ /**
64225
+ * Creates an array of the own enumerable symbols of `object`.
64226
+ *
64227
+ * @private
64228
+ * @param {Object} object The object to query.
64229
+ * @returns {Array} Returns the array of symbols.
64230
+ */
64231
+
64232
+ var getSymbols$1 = !nativeGetSymbols ? stubArray : function (object) {
64233
+ if (object == null) {
64234
+ return [];
64235
+ }
64236
+
64237
+ object = Object(object);
64238
+ return arrayFilter(nativeGetSymbols(object), function (symbol) {
64239
+ return propertyIsEnumerable$1.call(object, symbol);
64240
+ });
64241
+ };
64242
+ var _getSymbols = getSymbols$1;
64243
+
64244
+ /**
64245
+ * The base implementation of `_.times` without support for iteratee shorthands
64246
+ * or max array length checks.
64247
+ *
64248
+ * @private
64249
+ * @param {number} n The number of times to invoke `iteratee`.
64250
+ * @param {Function} iteratee The function invoked per iteration.
64251
+ * @returns {Array} Returns the array of results.
64252
+ */
64253
+
64254
+ function baseTimes$1(n, iteratee) {
64255
+ var index = -1,
64256
+ result = Array(n);
64257
+
64258
+ while (++index < n) {
64259
+ result[index] = iteratee(index);
64260
+ }
64261
+
64262
+ return result;
64263
+ }
64264
+
64265
+ var _baseTimes = baseTimes$1;
64266
+
64267
+ var baseGetTag$2 = _baseGetTag,
64268
+ isObjectLike$3 = isObjectLike_1;
64269
+ /** `Object#toString` result references. */
64270
+
64271
+ var argsTag$2 = '[object Arguments]';
64272
+ /**
64273
+ * The base implementation of `_.isArguments`.
64274
+ *
64275
+ * @private
64276
+ * @param {*} value The value to check.
64277
+ * @returns {boolean} Returns `true` if `value` is an `arguments` object,
64278
+ */
64279
+
64280
+ function baseIsArguments$1(value) {
64281
+ return isObjectLike$3(value) && baseGetTag$2(value) == argsTag$2;
64282
+ }
64283
+
64284
+ var _baseIsArguments = baseIsArguments$1;
64285
+
64286
+ var baseIsArguments = _baseIsArguments,
64287
+ isObjectLike$2 = isObjectLike_1;
64288
+ /** Used for built-in method references. */
64289
+
64290
+ var objectProto$5 = Object.prototype;
64291
+ /** Used to check objects for own properties. */
64292
+
64293
+ var hasOwnProperty$4 = objectProto$5.hasOwnProperty;
64294
+ /** Built-in value references. */
64295
+
64296
+ var propertyIsEnumerable = objectProto$5.propertyIsEnumerable;
64297
+ /**
64298
+ * Checks if `value` is likely an `arguments` object.
64299
+ *
64300
+ * @static
64301
+ * @memberOf _
64302
+ * @since 0.1.0
64303
+ * @category Lang
64304
+ * @param {*} value The value to check.
64305
+ * @returns {boolean} Returns `true` if `value` is an `arguments` object,
64306
+ * else `false`.
64307
+ * @example
64308
+ *
64309
+ * _.isArguments(function() { return arguments; }());
64310
+ * // => true
64311
+ *
64312
+ * _.isArguments([1, 2, 3]);
64313
+ * // => false
64314
+ */
64315
+
64316
+ var isArguments$2 = baseIsArguments(function () {
64317
+ return arguments;
64318
+ }()) ? baseIsArguments : function (value) {
64319
+ return isObjectLike$2(value) && hasOwnProperty$4.call(value, 'callee') && !propertyIsEnumerable.call(value, 'callee');
64320
+ };
64321
+ var isArguments_1 = isArguments$2;
64322
+
64323
+ var isBuffer$2 = {exports: {}};
64324
+
64325
+ /**
64326
+ * This method returns `false`.
64327
+ *
64328
+ * @static
64329
+ * @memberOf _
64330
+ * @since 4.13.0
64331
+ * @category Util
64332
+ * @returns {boolean} Returns `false`.
64333
+ * @example
64334
+ *
64335
+ * _.times(2, _.stubFalse);
64336
+ * // => [false, false]
64337
+ */
64338
+
64339
+ function stubFalse() {
64340
+ return false;
64341
+ }
64342
+
64343
+ var stubFalse_1 = stubFalse;
64344
+
64345
+ (function (module, exports) {
64346
+ var root = _root,
64347
+ stubFalse = stubFalse_1;
64348
+ /** Detect free variable `exports`. */
64349
+
64350
+ var freeExports = exports && !exports.nodeType && exports;
64351
+ /** Detect free variable `module`. */
64352
+
64353
+ var freeModule = freeExports && 'object' == 'object' && module && !module.nodeType && module;
64354
+ /** Detect the popular CommonJS extension `module.exports`. */
64355
+
64356
+ var moduleExports = freeModule && freeModule.exports === freeExports;
64357
+ /** Built-in value references. */
64358
+
64359
+ var Buffer = moduleExports ? root.Buffer : undefined;
64360
+ /* Built-in method references for those with the same name as other `lodash` methods. */
64361
+
64362
+ var nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;
64363
+ /**
64364
+ * Checks if `value` is a buffer.
64365
+ *
64366
+ * @static
64367
+ * @memberOf _
64368
+ * @since 4.3.0
64369
+ * @category Lang
64370
+ * @param {*} value The value to check.
64371
+ * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.
64372
+ * @example
64373
+ *
64374
+ * _.isBuffer(new Buffer(2));
64375
+ * // => true
64376
+ *
64377
+ * _.isBuffer(new Uint8Array(2));
64378
+ * // => false
64379
+ */
64380
+
64381
+ var isBuffer = nativeIsBuffer || stubFalse;
64382
+ module.exports = isBuffer;
64383
+ })(isBuffer$2, isBuffer$2.exports);
64384
+
64385
+ var MAX_SAFE_INTEGER$1 = 9007199254740991;
64386
+ /** Used to detect unsigned integer values. */
64387
+
64388
+ var reIsUint = /^(?:0|[1-9]\d*)$/;
64389
+ /**
64390
+ * Checks if `value` is a valid array-like index.
64391
+ *
64392
+ * @private
64393
+ * @param {*} value The value to check.
64394
+ * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
64395
+ * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
64396
+ */
64397
+
64398
+ function isIndex$2(value, length) {
64399
+ var type = _typeof(value);
64400
+
64401
+ length = length == null ? MAX_SAFE_INTEGER$1 : length;
64402
+ return !!length && (type == 'number' || type != 'symbol' && reIsUint.test(value)) && value > -1 && value % 1 == 0 && value < length;
64403
+ }
64404
+
64405
+ var _isIndex = isIndex$2;
64406
+
64407
+ /** Used as references for various `Number` constants. */
64408
+ var MAX_SAFE_INTEGER = 9007199254740991;
64409
+ /**
64410
+ * Checks if `value` is a valid array-like length.
64411
+ *
64412
+ * **Note:** This method is loosely based on
64413
+ * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
64414
+ *
64415
+ * @static
64416
+ * @memberOf _
64417
+ * @since 4.0.0
64418
+ * @category Lang
64419
+ * @param {*} value The value to check.
64420
+ * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
64421
+ * @example
64422
+ *
64423
+ * _.isLength(3);
64424
+ * // => true
64425
+ *
64426
+ * _.isLength(Number.MIN_VALUE);
64427
+ * // => false
64428
+ *
64429
+ * _.isLength(Infinity);
64430
+ * // => false
64431
+ *
64432
+ * _.isLength('3');
64433
+ * // => false
64434
+ */
64435
+
64436
+ function isLength$3(value) {
64437
+ return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
64438
+ }
64439
+
64440
+ var isLength_1 = isLength$3;
64441
+
64442
+ var baseGetTag$1 = _baseGetTag,
64443
+ isLength$2 = isLength_1,
64444
+ isObjectLike$1 = isObjectLike_1;
64445
+ /** `Object#toString` result references. */
64446
+
64447
+ var argsTag$1 = '[object Arguments]',
64448
+ arrayTag$1 = '[object Array]',
64449
+ boolTag = '[object Boolean]',
64450
+ dateTag = '[object Date]',
64451
+ errorTag = '[object Error]',
64452
+ funcTag = '[object Function]',
64453
+ mapTag$1 = '[object Map]',
64454
+ numberTag = '[object Number]',
64455
+ objectTag$2 = '[object Object]',
64456
+ regexpTag = '[object RegExp]',
64457
+ setTag$1 = '[object Set]',
64458
+ stringTag = '[object String]',
64459
+ weakMapTag$1 = '[object WeakMap]';
64460
+ var arrayBufferTag = '[object ArrayBuffer]',
64461
+ dataViewTag$1 = '[object DataView]',
64462
+ float32Tag = '[object Float32Array]',
64463
+ float64Tag = '[object Float64Array]',
64464
+ int8Tag = '[object Int8Array]',
64465
+ int16Tag = '[object Int16Array]',
64466
+ int32Tag = '[object Int32Array]',
64467
+ uint8Tag = '[object Uint8Array]',
64468
+ uint8ClampedTag = '[object Uint8ClampedArray]',
64469
+ uint16Tag = '[object Uint16Array]',
64470
+ uint32Tag = '[object Uint32Array]';
64471
+ /** Used to identify `toStringTag` values of typed arrays. */
64472
+
64473
+ var typedArrayTags = {};
64474
+ typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = typedArrayTags[uint32Tag] = true;
64475
+ typedArrayTags[argsTag$1] = typedArrayTags[arrayTag$1] = typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = typedArrayTags[dataViewTag$1] = typedArrayTags[dateTag] = typedArrayTags[errorTag] = typedArrayTags[funcTag] = typedArrayTags[mapTag$1] = typedArrayTags[numberTag] = typedArrayTags[objectTag$2] = typedArrayTags[regexpTag] = typedArrayTags[setTag$1] = typedArrayTags[stringTag] = typedArrayTags[weakMapTag$1] = false;
64476
+ /**
64477
+ * The base implementation of `_.isTypedArray` without Node.js optimizations.
64478
+ *
64479
+ * @private
64480
+ * @param {*} value The value to check.
64481
+ * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
64482
+ */
64483
+
64484
+ function baseIsTypedArray$1(value) {
64485
+ return isObjectLike$1(value) && isLength$2(value.length) && !!typedArrayTags[baseGetTag$1(value)];
64486
+ }
64487
+
64488
+ var _baseIsTypedArray = baseIsTypedArray$1;
64489
+
64490
+ /**
64491
+ * The base implementation of `_.unary` without support for storing metadata.
64492
+ *
64493
+ * @private
64494
+ * @param {Function} func The function to cap arguments for.
64495
+ * @returns {Function} Returns the new capped function.
64496
+ */
64497
+
64498
+ function baseUnary$1(func) {
64499
+ return function (value) {
64500
+ return func(value);
64501
+ };
64502
+ }
64503
+
64504
+ var _baseUnary = baseUnary$1;
64505
+
64506
+ var _nodeUtil = {exports: {}};
64507
+
64508
+ (function (module, exports) {
64509
+ var freeGlobal = _freeGlobal;
64510
+ /** Detect free variable `exports`. */
64511
+
64512
+ var freeExports = exports && !exports.nodeType && exports;
64513
+ /** Detect free variable `module`. */
64514
+
64515
+ var freeModule = freeExports && 'object' == 'object' && module && !module.nodeType && module;
64516
+ /** Detect the popular CommonJS extension `module.exports`. */
64517
+
64518
+ var moduleExports = freeModule && freeModule.exports === freeExports;
64519
+ /** Detect free variable `process` from Node.js. */
64520
+
64521
+ var freeProcess = moduleExports && freeGlobal.process;
64522
+ /** Used to access faster Node.js helpers. */
64523
+
64524
+ var nodeUtil = function () {
64525
+ try {
64526
+ // Use `util.types` for Node.js 10+.
64527
+ var types = freeModule && freeModule.require && freeModule.require('util').types;
64528
+
64529
+ if (types) {
64530
+ return types;
64531
+ } // Legacy `process.binding('util')` for Node.js < 10.
64532
+
64533
+
64534
+ return freeProcess && freeProcess.binding && freeProcess.binding('util');
64535
+ } catch (e) {}
64536
+ }();
64537
+
64538
+ module.exports = nodeUtil;
64539
+ })(_nodeUtil, _nodeUtil.exports);
64540
+
64541
+ var baseIsTypedArray = _baseIsTypedArray,
64542
+ baseUnary = _baseUnary,
64543
+ nodeUtil = _nodeUtil.exports;
64544
+ /* Node.js helper references. */
64545
+
64546
+ var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
64547
+ /**
64548
+ * Checks if `value` is classified as a typed array.
64549
+ *
64550
+ * @static
64551
+ * @memberOf _
64552
+ * @since 3.0.0
64553
+ * @category Lang
64554
+ * @param {*} value The value to check.
64555
+ * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
64556
+ * @example
64557
+ *
64558
+ * _.isTypedArray(new Uint8Array);
64559
+ * // => true
64560
+ *
64561
+ * _.isTypedArray([]);
64562
+ * // => false
64563
+ */
64564
+
64565
+ var isTypedArray$2 = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
64566
+ var isTypedArray_1 = isTypedArray$2;
64567
+
64568
+ var baseTimes = _baseTimes,
64569
+ isArguments$1 = isArguments_1,
64570
+ isArray$6 = isArray_1,
64571
+ isBuffer$1 = isBuffer$2.exports,
64572
+ isIndex$1 = _isIndex,
64573
+ isTypedArray$1 = isTypedArray_1;
64574
+ /** Used for built-in method references. */
64575
+
64576
+ var objectProto$4 = Object.prototype;
64577
+ /** Used to check objects for own properties. */
64578
+
64579
+ var hasOwnProperty$3 = objectProto$4.hasOwnProperty;
64580
+ /**
64581
+ * Creates an array of the enumerable property names of the array-like `value`.
64582
+ *
64583
+ * @private
64584
+ * @param {*} value The value to query.
64585
+ * @param {boolean} inherited Specify returning inherited property names.
64586
+ * @returns {Array} Returns the array of property names.
64587
+ */
64588
+
64589
+ function arrayLikeKeys$1(value, inherited) {
64590
+ var isArr = isArray$6(value),
64591
+ isArg = !isArr && isArguments$1(value),
64592
+ isBuff = !isArr && !isArg && isBuffer$1(value),
64593
+ isType = !isArr && !isArg && !isBuff && isTypedArray$1(value),
64594
+ skipIndexes = isArr || isArg || isBuff || isType,
64595
+ result = skipIndexes ? baseTimes(value.length, String) : [],
64596
+ length = result.length;
64597
+
64598
+ for (var key in value) {
64599
+ if ((inherited || hasOwnProperty$3.call(value, key)) && !(skipIndexes && ( // Safari 9 has enumerable `arguments.length` in strict mode.
64600
+ key == 'length' || // Node.js 0.10 has enumerable non-index properties on buffers.
64601
+ isBuff && (key == 'offset' || key == 'parent') || // PhantomJS 2 has enumerable non-index properties on typed arrays.
64602
+ isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset') || // Skip index properties.
64603
+ isIndex$1(key, length)))) {
64604
+ result.push(key);
64605
+ }
64606
+ }
64607
+
64608
+ return result;
64609
+ }
64610
+
64611
+ var _arrayLikeKeys = arrayLikeKeys$1;
64612
+
64613
+ /** Used for built-in method references. */
64614
+ var objectProto$3 = Object.prototype;
64615
+ /**
64616
+ * Checks if `value` is likely a prototype object.
64617
+ *
64618
+ * @private
64619
+ * @param {*} value The value to check.
64620
+ * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
64621
+ */
64622
+
64623
+ function isPrototype$1(value) {
64624
+ var Ctor = value && value.constructor,
64625
+ proto = typeof Ctor == 'function' && Ctor.prototype || objectProto$3;
64626
+ return value === proto;
64627
+ }
64628
+
64629
+ var _isPrototype = isPrototype$1;
64630
+
64631
+ /**
64632
+ * Creates a unary function that invokes `func` with its argument transformed.
64633
+ *
64634
+ * @private
64635
+ * @param {Function} func The function to wrap.
64636
+ * @param {Function} transform The argument transform.
64637
+ * @returns {Function} Returns the new function.
64638
+ */
64639
+
64640
+ function overArg$1(func, transform) {
64641
+ return function (arg) {
64642
+ return func(transform(arg));
64643
+ };
64644
+ }
64645
+
64646
+ var _overArg = overArg$1;
64647
+
64648
+ var overArg = _overArg;
64649
+ /* Built-in method references for those with the same name as other `lodash` methods. */
64650
+
64651
+ var nativeKeys$1 = overArg(Object.keys, Object);
64652
+ var _nativeKeys = nativeKeys$1;
64653
+
64654
+ var isPrototype = _isPrototype,
64655
+ nativeKeys = _nativeKeys;
64656
+ /** Used for built-in method references. */
64657
+
64658
+ var objectProto$2 = Object.prototype;
64659
+ /** Used to check objects for own properties. */
64660
+
64661
+ var hasOwnProperty$2 = objectProto$2.hasOwnProperty;
64662
+ /**
64663
+ * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
64664
+ *
64665
+ * @private
64666
+ * @param {Object} object The object to query.
64667
+ * @returns {Array} Returns the array of property names.
64668
+ */
64669
+
64670
+ function baseKeys$1(object) {
64671
+ if (!isPrototype(object)) {
64672
+ return nativeKeys(object);
64673
+ }
64674
+
64675
+ var result = [];
64676
+
64677
+ for (var key in Object(object)) {
64678
+ if (hasOwnProperty$2.call(object, key) && key != 'constructor') {
64679
+ result.push(key);
64680
+ }
64681
+ }
64682
+
64683
+ return result;
64684
+ }
64685
+
64686
+ var _baseKeys = baseKeys$1;
64687
+
64688
+ var isFunction = isFunction_1,
64689
+ isLength$1 = isLength_1;
64690
+ /**
64691
+ * Checks if `value` is array-like. A value is considered array-like if it's
64692
+ * not a function and has a `value.length` that's an integer greater than or
64693
+ * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
64694
+ *
64695
+ * @static
64696
+ * @memberOf _
64697
+ * @since 4.0.0
64698
+ * @category Lang
64699
+ * @param {*} value The value to check.
64700
+ * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
64701
+ * @example
64702
+ *
64703
+ * _.isArrayLike([1, 2, 3]);
64704
+ * // => true
64705
+ *
64706
+ * _.isArrayLike(document.body.children);
64707
+ * // => true
64708
+ *
64709
+ * _.isArrayLike('abc');
64710
+ * // => true
64711
+ *
64712
+ * _.isArrayLike(_.noop);
64713
+ * // => false
64714
+ */
64715
+
64716
+ function isArrayLike$1(value) {
64717
+ return value != null && isLength$1(value.length) && !isFunction(value);
64718
+ }
64719
+
64720
+ var isArrayLike_1 = isArrayLike$1;
64721
+
64722
+ var arrayLikeKeys = _arrayLikeKeys,
64723
+ baseKeys = _baseKeys,
64724
+ isArrayLike = isArrayLike_1;
64725
+ /**
64726
+ * Creates an array of the own enumerable property names of `object`.
64727
+ *
64728
+ * **Note:** Non-object values are coerced to objects. See the
64729
+ * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
64730
+ * for more details.
64731
+ *
64732
+ * @static
64733
+ * @since 0.1.0
64734
+ * @memberOf _
64735
+ * @category Object
64736
+ * @param {Object} object The object to query.
64737
+ * @returns {Array} Returns the array of property names.
64738
+ * @example
64739
+ *
64740
+ * function Foo() {
64741
+ * this.a = 1;
64742
+ * this.b = 2;
64743
+ * }
64744
+ *
64745
+ * Foo.prototype.c = 3;
64746
+ *
64747
+ * _.keys(new Foo);
64748
+ * // => ['a', 'b'] (iteration order is not guaranteed)
64749
+ *
64750
+ * _.keys('hi');
64751
+ * // => ['0', '1']
64752
+ */
64753
+
64754
+ function keys$2(object) {
64755
+ return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
64756
+ }
64757
+
64758
+ var keys_1 = keys$2;
64759
+
64760
+ var baseGetAllKeys = _baseGetAllKeys,
64761
+ getSymbols = _getSymbols,
64762
+ keys$1 = keys_1;
64763
+ /**
64764
+ * Creates an array of own enumerable property names and symbols of `object`.
64765
+ *
64766
+ * @private
64767
+ * @param {Object} object The object to query.
64768
+ * @returns {Array} Returns the array of property names and symbols.
64769
+ */
64770
+
64771
+ function getAllKeys$1(object) {
64772
+ return baseGetAllKeys(object, keys$1, getSymbols);
64773
+ }
64774
+
64775
+ var _getAllKeys = getAllKeys$1;
64776
+
64777
+ var getAllKeys = _getAllKeys;
64778
+ /** Used to compose bitmasks for value comparisons. */
64779
+
64780
+ var COMPARE_PARTIAL_FLAG$3 = 1;
64781
+ /** Used for built-in method references. */
64782
+
64783
+ var objectProto$1 = Object.prototype;
64784
+ /** Used to check objects for own properties. */
64785
+
64786
+ var hasOwnProperty$1 = objectProto$1.hasOwnProperty;
64787
+ /**
64788
+ * A specialized version of `baseIsEqualDeep` for objects with support for
64789
+ * partial deep comparisons.
64790
+ *
64791
+ * @private
64792
+ * @param {Object} object The object to compare.
64793
+ * @param {Object} other The other object to compare.
64794
+ * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
64795
+ * @param {Function} customizer The function to customize comparisons.
64796
+ * @param {Function} equalFunc The function to determine equivalents of values.
64797
+ * @param {Object} stack Tracks traversed `object` and `other` objects.
64798
+ * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
64799
+ */
64800
+
64801
+ function equalObjects$1(object, other, bitmask, customizer, equalFunc, stack) {
64802
+ var isPartial = bitmask & COMPARE_PARTIAL_FLAG$3,
64803
+ objProps = getAllKeys(object),
64804
+ objLength = objProps.length,
64805
+ othProps = getAllKeys(other),
64806
+ othLength = othProps.length;
64807
+
64808
+ if (objLength != othLength && !isPartial) {
64809
+ return false;
64810
+ }
64811
+
64812
+ var index = objLength;
64813
+
64814
+ while (index--) {
64815
+ var key = objProps[index];
64816
+
64817
+ if (!(isPartial ? key in other : hasOwnProperty$1.call(other, key))) {
64818
+ return false;
64819
+ }
64820
+ } // Check that cyclic values are equal.
64821
+
64822
+
64823
+ var objStacked = stack.get(object);
64824
+ var othStacked = stack.get(other);
64825
+
64826
+ if (objStacked && othStacked) {
64827
+ return objStacked == other && othStacked == object;
64828
+ }
64829
+
64830
+ var result = true;
64831
+ stack.set(object, other);
64832
+ stack.set(other, object);
64833
+ var skipCtor = isPartial;
64834
+
64835
+ while (++index < objLength) {
64836
+ key = objProps[index];
64837
+ var objValue = object[key],
64838
+ othValue = other[key];
64839
+
64840
+ if (customizer) {
64841
+ var compared = isPartial ? customizer(othValue, objValue, key, other, object, stack) : customizer(objValue, othValue, key, object, other, stack);
64842
+ } // Recursively compare objects (susceptible to call stack limits).
64843
+
64844
+
64845
+ if (!(compared === undefined ? objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack) : compared)) {
64846
+ result = false;
64847
+ break;
64848
+ }
64849
+
64850
+ skipCtor || (skipCtor = key == 'constructor');
64851
+ }
64852
+
64853
+ if (result && !skipCtor) {
64854
+ var objCtor = object.constructor,
64855
+ othCtor = other.constructor; // Non `Object` object instances with different constructors are not equal.
64856
+
64857
+ if (objCtor != othCtor && 'constructor' in object && 'constructor' in other && !(typeof objCtor == 'function' && objCtor instanceof objCtor && typeof othCtor == 'function' && othCtor instanceof othCtor)) {
64858
+ result = false;
64859
+ }
64860
+ }
64861
+
64862
+ stack['delete'](object);
64863
+ stack['delete'](other);
64864
+ return result;
64865
+ }
64866
+
64867
+ var _equalObjects = equalObjects$1;
64868
+
64869
+ var getNative$3 = _getNative,
64870
+ root$3 = _root;
64871
+ /* Built-in method references that are verified to be native. */
64872
+
64873
+ var DataView$1 = getNative$3(root$3, 'DataView');
64874
+ var _DataView = DataView$1;
64875
+
64876
+ var getNative$2 = _getNative,
64877
+ root$2 = _root;
64878
+ /* Built-in method references that are verified to be native. */
64879
+
64880
+ var Promise$2 = getNative$2(root$2, 'Promise');
64881
+ var _Promise = Promise$2;
64882
+
64883
+ var getNative$1 = _getNative,
64884
+ root$1 = _root;
64885
+ /* Built-in method references that are verified to be native. */
64886
+
64887
+ var Set$2 = getNative$1(root$1, 'Set');
64888
+ var _Set = Set$2;
64889
+
64890
+ var getNative = _getNative,
64891
+ root = _root;
64892
+ /* Built-in method references that are verified to be native. */
64893
+
64894
+ var WeakMap$2 = getNative(root, 'WeakMap');
64895
+ var _WeakMap = WeakMap$2;
64896
+
64897
+ var DataView = _DataView,
64898
+ Map$1 = _Map,
64899
+ Promise$1 = _Promise,
64900
+ Set$1 = _Set,
64901
+ WeakMap$1 = _WeakMap,
64902
+ baseGetTag = _baseGetTag,
64903
+ toSource = _toSource;
64904
+ /** `Object#toString` result references. */
64905
+
64906
+ var mapTag = '[object Map]',
64907
+ objectTag$1 = '[object Object]',
64908
+ promiseTag = '[object Promise]',
64909
+ setTag = '[object Set]',
64910
+ weakMapTag = '[object WeakMap]';
64911
+ var dataViewTag = '[object DataView]';
64912
+ /** Used to detect maps, sets, and weakmaps. */
64913
+
64914
+ var dataViewCtorString = toSource(DataView),
64915
+ mapCtorString = toSource(Map$1),
64916
+ promiseCtorString = toSource(Promise$1),
64917
+ setCtorString = toSource(Set$1),
64918
+ weakMapCtorString = toSource(WeakMap$1);
64919
+ /**
64920
+ * Gets the `toStringTag` of `value`.
64921
+ *
64922
+ * @private
64923
+ * @param {*} value The value to query.
64924
+ * @returns {string} Returns the `toStringTag`.
64925
+ */
64926
+
64927
+ var getTag$1 = baseGetTag; // Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.
64928
+
64929
+ if (DataView && getTag$1(new DataView(new ArrayBuffer(1))) != dataViewTag || Map$1 && getTag$1(new Map$1()) != mapTag || Promise$1 && getTag$1(Promise$1.resolve()) != promiseTag || Set$1 && getTag$1(new Set$1()) != setTag || WeakMap$1 && getTag$1(new WeakMap$1()) != weakMapTag) {
64930
+ getTag$1 = function getTag(value) {
64931
+ var result = baseGetTag(value),
64932
+ Ctor = result == objectTag$1 ? value.constructor : undefined,
64933
+ ctorString = Ctor ? toSource(Ctor) : '';
64934
+
64935
+ if (ctorString) {
64936
+ switch (ctorString) {
64937
+ case dataViewCtorString:
64938
+ return dataViewTag;
64939
+
64940
+ case mapCtorString:
64941
+ return mapTag;
64942
+
64943
+ case promiseCtorString:
64944
+ return promiseTag;
64945
+
64946
+ case setCtorString:
64947
+ return setTag;
64948
+
64949
+ case weakMapCtorString:
64950
+ return weakMapTag;
64951
+ }
64952
+ }
64953
+
64954
+ return result;
64955
+ };
64956
+ }
64957
+
64958
+ var _getTag = getTag$1;
64959
+
64960
+ var Stack$1 = _Stack,
64961
+ equalArrays = _equalArrays,
64962
+ equalByTag = _equalByTag,
64963
+ equalObjects = _equalObjects,
64964
+ getTag = _getTag,
64965
+ isArray$5 = isArray_1,
64966
+ isBuffer = isBuffer$2.exports,
64967
+ isTypedArray = isTypedArray_1;
64968
+ /** Used to compose bitmasks for value comparisons. */
64969
+
64970
+ var COMPARE_PARTIAL_FLAG$2 = 1;
64971
+ /** `Object#toString` result references. */
64972
+
64973
+ var argsTag = '[object Arguments]',
64974
+ arrayTag = '[object Array]',
64975
+ objectTag = '[object Object]';
64976
+ /** Used for built-in method references. */
64977
+
64978
+ var objectProto = Object.prototype;
64979
+ /** Used to check objects for own properties. */
64980
+
64981
+ var hasOwnProperty = objectProto.hasOwnProperty;
64982
+ /**
64983
+ * A specialized version of `baseIsEqual` for arrays and objects which performs
64984
+ * deep comparisons and tracks traversed objects enabling objects with circular
64985
+ * references to be compared.
64986
+ *
64987
+ * @private
64988
+ * @param {Object} object The object to compare.
64989
+ * @param {Object} other The other object to compare.
64990
+ * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
64991
+ * @param {Function} customizer The function to customize comparisons.
64992
+ * @param {Function} equalFunc The function to determine equivalents of values.
64993
+ * @param {Object} [stack] Tracks traversed `object` and `other` objects.
64994
+ * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
64995
+ */
64996
+
64997
+ function baseIsEqualDeep$1(object, other, bitmask, customizer, equalFunc, stack) {
64998
+ var objIsArr = isArray$5(object),
64999
+ othIsArr = isArray$5(other),
65000
+ objTag = objIsArr ? arrayTag : getTag(object),
65001
+ othTag = othIsArr ? arrayTag : getTag(other);
65002
+ objTag = objTag == argsTag ? objectTag : objTag;
65003
+ othTag = othTag == argsTag ? objectTag : othTag;
65004
+ var objIsObj = objTag == objectTag,
65005
+ othIsObj = othTag == objectTag,
65006
+ isSameTag = objTag == othTag;
65007
+
65008
+ if (isSameTag && isBuffer(object)) {
65009
+ if (!isBuffer(other)) {
65010
+ return false;
65011
+ }
65012
+
65013
+ objIsArr = true;
65014
+ objIsObj = false;
65015
+ }
65016
+
65017
+ if (isSameTag && !objIsObj) {
65018
+ stack || (stack = new Stack$1());
65019
+ return objIsArr || isTypedArray(object) ? equalArrays(object, other, bitmask, customizer, equalFunc, stack) : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);
65020
+ }
65021
+
65022
+ if (!(bitmask & COMPARE_PARTIAL_FLAG$2)) {
65023
+ var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),
65024
+ othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');
65025
+
65026
+ if (objIsWrapped || othIsWrapped) {
65027
+ var objUnwrapped = objIsWrapped ? object.value() : object,
65028
+ othUnwrapped = othIsWrapped ? other.value() : other;
65029
+ stack || (stack = new Stack$1());
65030
+ return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);
65031
+ }
65032
+ }
65033
+
65034
+ if (!isSameTag) {
65035
+ return false;
65036
+ }
65037
+
65038
+ stack || (stack = new Stack$1());
65039
+ return equalObjects(object, other, bitmask, customizer, equalFunc, stack);
65040
+ }
65041
+
65042
+ var _baseIsEqualDeep = baseIsEqualDeep$1;
65043
+
65044
+ var baseIsEqualDeep = _baseIsEqualDeep,
65045
+ isObjectLike = isObjectLike_1;
65046
+ /**
65047
+ * The base implementation of `_.isEqual` which supports partial comparisons
65048
+ * and tracks traversed objects.
65049
+ *
65050
+ * @private
65051
+ * @param {*} value The value to compare.
65052
+ * @param {*} other The other value to compare.
65053
+ * @param {boolean} bitmask The bitmask flags.
65054
+ * 1 - Unordered comparison
65055
+ * 2 - Partial comparison
65056
+ * @param {Function} [customizer] The function to customize comparisons.
65057
+ * @param {Object} [stack] Tracks traversed `value` and `other` objects.
65058
+ * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
65059
+ */
65060
+
65061
+ function baseIsEqual$2(value, other, bitmask, customizer, stack) {
65062
+ if (value === other) {
65063
+ return true;
65064
+ }
65065
+
65066
+ if (value == null || other == null || !isObjectLike(value) && !isObjectLike(other)) {
65067
+ return value !== value && other !== other;
65068
+ }
65069
+
65070
+ return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual$2, stack);
65071
+ }
65072
+
65073
+ var _baseIsEqual = baseIsEqual$2;
65074
+
65075
+ var Stack = _Stack,
65076
+ baseIsEqual$1 = _baseIsEqual;
65077
+ /** Used to compose bitmasks for value comparisons. */
65078
+
65079
+ var COMPARE_PARTIAL_FLAG$1 = 1,
65080
+ COMPARE_UNORDERED_FLAG$1 = 2;
65081
+ /**
65082
+ * The base implementation of `_.isMatch` without support for iteratee shorthands.
65083
+ *
65084
+ * @private
65085
+ * @param {Object} object The object to inspect.
65086
+ * @param {Object} source The object of property values to match.
65087
+ * @param {Array} matchData The property names, values, and compare flags to match.
65088
+ * @param {Function} [customizer] The function to customize comparisons.
65089
+ * @returns {boolean} Returns `true` if `object` is a match, else `false`.
65090
+ */
65091
+
65092
+ function baseIsMatch$1(object, source, matchData, customizer) {
65093
+ var index = matchData.length,
65094
+ length = index,
65095
+ noCustomizer = !customizer;
65096
+
65097
+ if (object == null) {
65098
+ return !length;
65099
+ }
65100
+
65101
+ object = Object(object);
65102
+
65103
+ while (index--) {
65104
+ var data = matchData[index];
65105
+
65106
+ if (noCustomizer && data[2] ? data[1] !== object[data[0]] : !(data[0] in object)) {
65107
+ return false;
65108
+ }
65109
+ }
65110
+
65111
+ while (++index < length) {
65112
+ data = matchData[index];
65113
+ var key = data[0],
65114
+ objValue = object[key],
65115
+ srcValue = data[1];
65116
+
65117
+ if (noCustomizer && data[2]) {
65118
+ if (objValue === undefined && !(key in object)) {
65119
+ return false;
65120
+ }
65121
+ } else {
65122
+ var stack = new Stack();
65123
+
65124
+ if (customizer) {
65125
+ var result = customizer(objValue, srcValue, key, object, source, stack);
65126
+ }
65127
+
65128
+ if (!(result === undefined ? baseIsEqual$1(srcValue, objValue, COMPARE_PARTIAL_FLAG$1 | COMPARE_UNORDERED_FLAG$1, customizer, stack) : result)) {
65129
+ return false;
65130
+ }
65131
+ }
65132
+ }
65133
+
65134
+ return true;
65135
+ }
65136
+
65137
+ var _baseIsMatch = baseIsMatch$1;
65138
+
65139
+ var isObject = isObject_1;
65140
+ /**
65141
+ * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.
65142
+ *
65143
+ * @private
65144
+ * @param {*} value The value to check.
65145
+ * @returns {boolean} Returns `true` if `value` if suitable for strict
65146
+ * equality comparisons, else `false`.
65147
+ */
65148
+
65149
+ function isStrictComparable$2(value) {
65150
+ return value === value && !isObject(value);
65151
+ }
65152
+
65153
+ var _isStrictComparable = isStrictComparable$2;
65154
+
65155
+ var isStrictComparable$1 = _isStrictComparable,
65156
+ keys = keys_1;
65157
+ /**
65158
+ * Gets the property names, values, and compare flags of `object`.
65159
+ *
65160
+ * @private
65161
+ * @param {Object} object The object to query.
65162
+ * @returns {Array} Returns the match data of `object`.
65163
+ */
65164
+
65165
+ function getMatchData$1(object) {
65166
+ var result = keys(object),
65167
+ length = result.length;
65168
+
65169
+ while (length--) {
65170
+ var key = result[length],
65171
+ value = object[key];
65172
+ result[length] = [key, value, isStrictComparable$1(value)];
65173
+ }
65174
+
65175
+ return result;
65176
+ }
65177
+
65178
+ var _getMatchData = getMatchData$1;
65179
+
65180
+ /**
65181
+ * A specialized version of `matchesProperty` for source values suitable
65182
+ * for strict equality comparisons, i.e. `===`.
65183
+ *
65184
+ * @private
65185
+ * @param {string} key The key of the property to get.
65186
+ * @param {*} srcValue The value to match.
65187
+ * @returns {Function} Returns the new spec function.
65188
+ */
65189
+
65190
+ function matchesStrictComparable$2(key, srcValue) {
65191
+ return function (object) {
65192
+ if (object == null) {
65193
+ return false;
65194
+ }
65195
+
65196
+ return object[key] === srcValue && (srcValue !== undefined || key in Object(object));
65197
+ };
65198
+ }
65199
+
65200
+ var _matchesStrictComparable = matchesStrictComparable$2;
65201
+
65202
+ var baseIsMatch = _baseIsMatch,
65203
+ getMatchData = _getMatchData,
65204
+ matchesStrictComparable$1 = _matchesStrictComparable;
65205
+ /**
65206
+ * The base implementation of `_.matches` which doesn't clone `source`.
65207
+ *
65208
+ * @private
65209
+ * @param {Object} source The object of property values to match.
65210
+ * @returns {Function} Returns the new spec function.
65211
+ */
65212
+
65213
+ function baseMatches$1(source) {
65214
+ var matchData = getMatchData(source);
65215
+
65216
+ if (matchData.length == 1 && matchData[0][2]) {
65217
+ return matchesStrictComparable$1(matchData[0][0], matchData[0][1]);
65218
+ }
65219
+
65220
+ return function (object) {
65221
+ return object === source || baseIsMatch(object, source, matchData);
65222
+ };
65223
+ }
65224
+
65225
+ var _baseMatches = baseMatches$1;
65226
+
65227
+ var isArray$4 = isArray_1,
65228
+ isSymbol$2 = isSymbol_1;
65229
+ /** Used to match property names within property paths. */
65230
+
65231
+ var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
65232
+ reIsPlainProp = /^\w*$/;
65233
+ /**
65234
+ * Checks if `value` is a property name and not a property path.
65235
+ *
65236
+ * @private
65237
+ * @param {*} value The value to check.
65238
+ * @param {Object} [object] The object to query keys on.
65239
+ * @returns {boolean} Returns `true` if `value` is a property name, else `false`.
65240
+ */
65241
+
65242
+ function isKey$3(value, object) {
65243
+ if (isArray$4(value)) {
65244
+ return false;
65245
+ }
65246
+
65247
+ var type = _typeof(value);
65248
+
65249
+ if (type == 'number' || type == 'symbol' || type == 'boolean' || value == null || isSymbol$2(value)) {
65250
+ return true;
65251
+ }
65252
+
65253
+ return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || object != null && value in Object(object);
65254
+ }
65255
+
65256
+ var _isKey = isKey$3;
65257
+
65258
+ var MapCache = _MapCache;
65259
+ /** Error message constants. */
65260
+
65261
+ var FUNC_ERROR_TEXT = 'Expected a function';
65262
+ /**
65263
+ * Creates a function that memoizes the result of `func`. If `resolver` is
65264
+ * provided, it determines the cache key for storing the result based on the
65265
+ * arguments provided to the memoized function. By default, the first argument
65266
+ * provided to the memoized function is used as the map cache key. The `func`
65267
+ * is invoked with the `this` binding of the memoized function.
65268
+ *
65269
+ * **Note:** The cache is exposed as the `cache` property on the memoized
65270
+ * function. Its creation may be customized by replacing the `_.memoize.Cache`
65271
+ * constructor with one whose instances implement the
65272
+ * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)
65273
+ * method interface of `clear`, `delete`, `get`, `has`, and `set`.
65274
+ *
65275
+ * @static
65276
+ * @memberOf _
65277
+ * @since 0.1.0
65278
+ * @category Function
65279
+ * @param {Function} func The function to have its output memoized.
65280
+ * @param {Function} [resolver] The function to resolve the cache key.
65281
+ * @returns {Function} Returns the new memoized function.
65282
+ * @example
65283
+ *
65284
+ * var object = { 'a': 1, 'b': 2 };
65285
+ * var other = { 'c': 3, 'd': 4 };
65286
+ *
65287
+ * var values = _.memoize(_.values);
65288
+ * values(object);
65289
+ * // => [1, 2]
65290
+ *
65291
+ * values(other);
65292
+ * // => [3, 4]
65293
+ *
65294
+ * object.a = 2;
65295
+ * values(object);
65296
+ * // => [1, 2]
65297
+ *
65298
+ * // Modify the result cache.
65299
+ * values.cache.set(object, ['a', 'b']);
65300
+ * values(object);
65301
+ * // => ['a', 'b']
65302
+ *
65303
+ * // Replace `_.memoize.Cache`.
65304
+ * _.memoize.Cache = WeakMap;
65305
+ */
65306
+
65307
+ function memoize$1(func, resolver) {
65308
+ if (typeof func != 'function' || resolver != null && typeof resolver != 'function') {
65309
+ throw new TypeError(FUNC_ERROR_TEXT);
65310
+ }
65311
+
65312
+ var memoized = function memoized() {
65313
+ var args = arguments,
65314
+ key = resolver ? resolver.apply(this, args) : args[0],
65315
+ cache = memoized.cache;
65316
+
65317
+ if (cache.has(key)) {
65318
+ return cache.get(key);
65319
+ }
65320
+
65321
+ var result = func.apply(this, args);
65322
+ memoized.cache = cache.set(key, result) || cache;
65323
+ return result;
65324
+ };
65325
+
65326
+ memoized.cache = new (memoize$1.Cache || MapCache)();
65327
+ return memoized;
65328
+ } // Expose `MapCache`.
65329
+
65330
+
65331
+ memoize$1.Cache = MapCache;
65332
+ var memoize_1 = memoize$1;
65333
+
65334
+ var memoize = memoize_1;
65335
+ /** Used as the maximum memoize cache size. */
65336
+
65337
+ var MAX_MEMOIZE_SIZE = 500;
65338
+ /**
65339
+ * A specialized version of `_.memoize` which clears the memoized function's
65340
+ * cache when it exceeds `MAX_MEMOIZE_SIZE`.
65341
+ *
65342
+ * @private
65343
+ * @param {Function} func The function to have its output memoized.
65344
+ * @returns {Function} Returns the new memoized function.
65345
+ */
65346
+
65347
+ function memoizeCapped$1(func) {
65348
+ var result = memoize(func, function (key) {
65349
+ if (cache.size === MAX_MEMOIZE_SIZE) {
65350
+ cache.clear();
65351
+ }
65352
+
65353
+ return key;
65354
+ });
65355
+ var cache = result.cache;
65356
+ return result;
65357
+ }
65358
+
65359
+ var _memoizeCapped = memoizeCapped$1;
65360
+
65361
+ var memoizeCapped = _memoizeCapped;
65362
+ /** Used to match property names within property paths. */
65363
+
65364
+ var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
65365
+ /** Used to match backslashes in property paths. */
65366
+
65367
+ var reEscapeChar = /\\(\\)?/g;
65368
+ /**
65369
+ * Converts `string` to a property path array.
65370
+ *
65371
+ * @private
65372
+ * @param {string} string The string to convert.
65373
+ * @returns {Array} Returns the property path array.
65374
+ */
65375
+
65376
+ var stringToPath$1 = memoizeCapped(function (string) {
65377
+ var result = [];
65378
+
65379
+ if (string.charCodeAt(0) === 46
65380
+ /* . */
65381
+ ) {
65382
+ result.push('');
65383
+ }
65384
+
65385
+ string.replace(rePropName, function (match, number, quote, subString) {
65386
+ result.push(quote ? subString.replace(reEscapeChar, '$1') : number || match);
65387
+ });
65388
+ return result;
65389
+ });
65390
+ var _stringToPath = stringToPath$1;
65391
+
65392
+ /**
65393
+ * A specialized version of `_.map` for arrays without support for iteratee
65394
+ * shorthands.
65395
+ *
65396
+ * @private
65397
+ * @param {Array} [array] The array to iterate over.
65398
+ * @param {Function} iteratee The function invoked per iteration.
65399
+ * @returns {Array} Returns the new mapped array.
65400
+ */
65401
+
65402
+ function arrayMap$1(array, iteratee) {
65403
+ var index = -1,
65404
+ length = array == null ? 0 : array.length,
65405
+ result = Array(length);
65406
+
65407
+ while (++index < length) {
65408
+ result[index] = iteratee(array[index], index, array);
65409
+ }
65410
+
65411
+ return result;
65412
+ }
65413
+
65414
+ var _arrayMap = arrayMap$1;
65415
+
65416
+ var _Symbol = _Symbol$4,
65417
+ arrayMap = _arrayMap,
65418
+ isArray$3 = isArray_1,
65419
+ isSymbol$1 = isSymbol_1;
65420
+ /** Used as references for various `Number` constants. */
65421
+
65422
+ var INFINITY$1 = 1 / 0;
65423
+ /** Used to convert symbols to primitives and strings. */
65424
+
65425
+ var symbolProto = _Symbol ? _Symbol.prototype : undefined,
65426
+ symbolToString = symbolProto ? symbolProto.toString : undefined;
65427
+ /**
65428
+ * The base implementation of `_.toString` which doesn't convert nullish
65429
+ * values to empty strings.
65430
+ *
65431
+ * @private
65432
+ * @param {*} value The value to process.
65433
+ * @returns {string} Returns the string.
65434
+ */
65435
+
65436
+ function baseToString$1(value) {
65437
+ // Exit early for strings to avoid a performance hit in some environments.
65438
+ if (typeof value == 'string') {
65439
+ return value;
65440
+ }
65441
+
65442
+ if (isArray$3(value)) {
65443
+ // Recursively convert values (susceptible to call stack limits).
65444
+ return arrayMap(value, baseToString$1) + '';
65445
+ }
65446
+
65447
+ if (isSymbol$1(value)) {
65448
+ return symbolToString ? symbolToString.call(value) : '';
65449
+ }
65450
+
65451
+ var result = value + '';
65452
+ return result == '0' && 1 / value == -INFINITY$1 ? '-0' : result;
65453
+ }
65454
+
65455
+ var _baseToString = baseToString$1;
65456
+
65457
+ var baseToString = _baseToString;
65458
+ /**
65459
+ * Converts `value` to a string. An empty string is returned for `null`
65460
+ * and `undefined` values. The sign of `-0` is preserved.
65461
+ *
65462
+ * @static
65463
+ * @memberOf _
65464
+ * @since 4.0.0
65465
+ * @category Lang
65466
+ * @param {*} value The value to convert.
65467
+ * @returns {string} Returns the converted string.
65468
+ * @example
65469
+ *
65470
+ * _.toString(null);
65471
+ * // => ''
65472
+ *
65473
+ * _.toString(-0);
65474
+ * // => '-0'
65475
+ *
65476
+ * _.toString([1, 2, 3]);
65477
+ * // => '1,2,3'
65478
+ */
65479
+
65480
+ function toString$1(value) {
65481
+ return value == null ? '' : baseToString(value);
65482
+ }
65483
+
65484
+ var toString_1 = toString$1;
65485
+
65486
+ var isArray$2 = isArray_1,
65487
+ isKey$2 = _isKey,
65488
+ stringToPath = _stringToPath,
65489
+ toString = toString_1;
65490
+ /**
65491
+ * Casts `value` to a path array if it's not one.
65492
+ *
65493
+ * @private
65494
+ * @param {*} value The value to inspect.
65495
+ * @param {Object} [object] The object to query keys on.
65496
+ * @returns {Array} Returns the cast property path array.
65497
+ */
65498
+
65499
+ function castPath$2(value, object) {
65500
+ if (isArray$2(value)) {
65501
+ return value;
65502
+ }
65503
+
65504
+ return isKey$2(value, object) ? [value] : stringToPath(toString(value));
65505
+ }
65506
+
65507
+ var _castPath = castPath$2;
65508
+
65509
+ var isSymbol = isSymbol_1;
65510
+ /** Used as references for various `Number` constants. */
65511
+
65512
+ var INFINITY = 1 / 0;
65513
+ /**
65514
+ * Converts `value` to a string key if it's not a string or symbol.
65515
+ *
65516
+ * @private
65517
+ * @param {*} value The value to inspect.
65518
+ * @returns {string|symbol} Returns the key.
65519
+ */
65520
+
65521
+ function toKey$4(value) {
65522
+ if (typeof value == 'string' || isSymbol(value)) {
65523
+ return value;
65524
+ }
65525
+
65526
+ var result = value + '';
65527
+ return result == '0' && 1 / value == -INFINITY ? '-0' : result;
65528
+ }
65529
+
65530
+ var _toKey = toKey$4;
65531
+
65532
+ var castPath$1 = _castPath,
65533
+ toKey$3 = _toKey;
65534
+ /**
65535
+ * The base implementation of `_.get` without support for default values.
65536
+ *
65537
+ * @private
65538
+ * @param {Object} object The object to query.
65539
+ * @param {Array|string} path The path of the property to get.
65540
+ * @returns {*} Returns the resolved value.
65541
+ */
65542
+
65543
+ function baseGet$2(object, path) {
65544
+ path = castPath$1(path, object);
65545
+ var index = 0,
65546
+ length = path.length;
65547
+
65548
+ while (object != null && index < length) {
65549
+ object = object[toKey$3(path[index++])];
65550
+ }
65551
+
65552
+ return index && index == length ? object : undefined;
65553
+ }
65554
+
65555
+ var _baseGet = baseGet$2;
65556
+
65557
+ var baseGet$1 = _baseGet;
65558
+ /**
65559
+ * Gets the value at `path` of `object`. If the resolved value is
65560
+ * `undefined`, the `defaultValue` is returned in its place.
65561
+ *
65562
+ * @static
65563
+ * @memberOf _
65564
+ * @since 3.7.0
65565
+ * @category Object
65566
+ * @param {Object} object The object to query.
65567
+ * @param {Array|string} path The path of the property to get.
65568
+ * @param {*} [defaultValue] The value returned for `undefined` resolved values.
65569
+ * @returns {*} Returns the resolved value.
65570
+ * @example
65571
+ *
65572
+ * var object = { 'a': [{ 'b': { 'c': 3 } }] };
65573
+ *
65574
+ * _.get(object, 'a[0].b.c');
65575
+ * // => 3
65576
+ *
65577
+ * _.get(object, ['a', '0', 'b', 'c']);
65578
+ * // => 3
65579
+ *
65580
+ * _.get(object, 'a.b.c', 'default');
65581
+ * // => 'default'
65582
+ */
65583
+
65584
+ function get$1(object, path, defaultValue) {
65585
+ var result = object == null ? undefined : baseGet$1(object, path);
65586
+ return result === undefined ? defaultValue : result;
65587
+ }
65588
+
65589
+ var get_1 = get$1;
65590
+
65591
+ /**
65592
+ * The base implementation of `_.hasIn` without support for deep paths.
65593
+ *
65594
+ * @private
65595
+ * @param {Object} [object] The object to query.
65596
+ * @param {Array|string} key The key to check.
65597
+ * @returns {boolean} Returns `true` if `key` exists, else `false`.
65598
+ */
65599
+
65600
+ function baseHasIn$1(object, key) {
65601
+ return object != null && key in Object(object);
65602
+ }
65603
+
65604
+ var _baseHasIn = baseHasIn$1;
65605
+
65606
+ var castPath = _castPath,
65607
+ isArguments = isArguments_1,
65608
+ isArray$1 = isArray_1,
65609
+ isIndex = _isIndex,
65610
+ isLength = isLength_1,
65611
+ toKey$2 = _toKey;
65612
+ /**
65613
+ * Checks if `path` exists on `object`.
65614
+ *
65615
+ * @private
65616
+ * @param {Object} object The object to query.
65617
+ * @param {Array|string} path The path to check.
65618
+ * @param {Function} hasFunc The function to check properties.
65619
+ * @returns {boolean} Returns `true` if `path` exists, else `false`.
65620
+ */
65621
+
65622
+ function hasPath$1(object, path, hasFunc) {
65623
+ path = castPath(path, object);
65624
+ var index = -1,
65625
+ length = path.length,
65626
+ result = false;
65627
+
65628
+ while (++index < length) {
65629
+ var key = toKey$2(path[index]);
65630
+
65631
+ if (!(result = object != null && hasFunc(object, key))) {
65632
+ break;
65633
+ }
65634
+
65635
+ object = object[key];
65636
+ }
65637
+
65638
+ if (result || ++index != length) {
65639
+ return result;
65640
+ }
65641
+
65642
+ length = object == null ? 0 : object.length;
65643
+ return !!length && isLength(length) && isIndex(key, length) && (isArray$1(object) || isArguments(object));
65644
+ }
65645
+
65646
+ var _hasPath = hasPath$1;
65647
+
65648
+ var baseHasIn = _baseHasIn,
65649
+ hasPath = _hasPath;
65650
+ /**
65651
+ * Checks if `path` is a direct or inherited property of `object`.
65652
+ *
65653
+ * @static
65654
+ * @memberOf _
65655
+ * @since 4.0.0
65656
+ * @category Object
65657
+ * @param {Object} object The object to query.
65658
+ * @param {Array|string} path The path to check.
65659
+ * @returns {boolean} Returns `true` if `path` exists, else `false`.
65660
+ * @example
65661
+ *
65662
+ * var object = _.create({ 'a': _.create({ 'b': 2 }) });
65663
+ *
65664
+ * _.hasIn(object, 'a');
65665
+ * // => true
65666
+ *
65667
+ * _.hasIn(object, 'a.b');
65668
+ * // => true
65669
+ *
65670
+ * _.hasIn(object, ['a', 'b']);
65671
+ * // => true
65672
+ *
65673
+ * _.hasIn(object, 'b');
65674
+ * // => false
65675
+ */
65676
+
65677
+ function hasIn$1(object, path) {
65678
+ return object != null && hasPath(object, path, baseHasIn);
65679
+ }
65680
+
65681
+ var hasIn_1 = hasIn$1;
65682
+
65683
+ var baseIsEqual = _baseIsEqual,
65684
+ get = get_1,
65685
+ hasIn = hasIn_1,
65686
+ isKey$1 = _isKey,
65687
+ isStrictComparable = _isStrictComparable,
65688
+ matchesStrictComparable = _matchesStrictComparable,
65689
+ toKey$1 = _toKey;
65690
+ /** Used to compose bitmasks for value comparisons. */
65691
+
65692
+ var COMPARE_PARTIAL_FLAG = 1,
65693
+ COMPARE_UNORDERED_FLAG = 2;
65694
+ /**
65695
+ * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.
65696
+ *
65697
+ * @private
65698
+ * @param {string} path The path of the property to get.
65699
+ * @param {*} srcValue The value to match.
65700
+ * @returns {Function} Returns the new spec function.
65701
+ */
65702
+
65703
+ function baseMatchesProperty$1(path, srcValue) {
65704
+ if (isKey$1(path) && isStrictComparable(srcValue)) {
65705
+ return matchesStrictComparable(toKey$1(path), srcValue);
65706
+ }
65707
+
65708
+ return function (object) {
65709
+ var objValue = get(object, path);
65710
+ return objValue === undefined && objValue === srcValue ? hasIn(object, path) : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);
65711
+ };
65712
+ }
65713
+
65714
+ var _baseMatchesProperty = baseMatchesProperty$1;
65715
+
65716
+ /**
65717
+ * This method returns the first argument it receives.
65718
+ *
65719
+ * @static
65720
+ * @since 0.1.0
65721
+ * @memberOf _
65722
+ * @category Util
65723
+ * @param {*} value Any value.
65724
+ * @returns {*} Returns `value`.
65725
+ * @example
65726
+ *
65727
+ * var object = { 'a': 1 };
65728
+ *
65729
+ * console.log(_.identity(object) === object);
65730
+ * // => true
65731
+ */
65732
+
65733
+ function identity$1(value) {
65734
+ return value;
65735
+ }
65736
+
65737
+ var identity_1 = identity$1;
65738
+
65739
+ /**
65740
+ * The base implementation of `_.property` without support for deep paths.
65741
+ *
65742
+ * @private
65743
+ * @param {string} key The key of the property to get.
65744
+ * @returns {Function} Returns the new accessor function.
65745
+ */
65746
+
65747
+ function baseProperty$1(key) {
65748
+ return function (object) {
65749
+ return object == null ? undefined : object[key];
65750
+ };
65751
+ }
65752
+
65753
+ var _baseProperty = baseProperty$1;
65754
+
65755
+ var baseGet = _baseGet;
65756
+ /**
65757
+ * A specialized version of `baseProperty` which supports deep paths.
65758
+ *
65759
+ * @private
65760
+ * @param {Array|string} path The path of the property to get.
65761
+ * @returns {Function} Returns the new accessor function.
65762
+ */
65763
+
65764
+ function basePropertyDeep$1(path) {
65765
+ return function (object) {
65766
+ return baseGet(object, path);
65767
+ };
65768
+ }
65769
+
65770
+ var _basePropertyDeep = basePropertyDeep$1;
65771
+
65772
+ var baseProperty = _baseProperty,
65773
+ basePropertyDeep = _basePropertyDeep,
65774
+ isKey = _isKey,
65775
+ toKey = _toKey;
65776
+ /**
65777
+ * Creates a function that returns the value at `path` of a given object.
65778
+ *
65779
+ * @static
65780
+ * @memberOf _
65781
+ * @since 2.4.0
65782
+ * @category Util
65783
+ * @param {Array|string} path The path of the property to get.
65784
+ * @returns {Function} Returns the new accessor function.
65785
+ * @example
65786
+ *
65787
+ * var objects = [
65788
+ * { 'a': { 'b': 2 } },
65789
+ * { 'a': { 'b': 1 } }
65790
+ * ];
65791
+ *
65792
+ * _.map(objects, _.property('a.b'));
65793
+ * // => [2, 1]
65794
+ *
65795
+ * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b');
65796
+ * // => [1, 2]
65797
+ */
65798
+
65799
+ function property$1(path) {
65800
+ return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path);
65801
+ }
65802
+
65803
+ var property_1 = property$1;
65804
+
65805
+ var baseMatches = _baseMatches,
65806
+ baseMatchesProperty = _baseMatchesProperty,
65807
+ identity = identity_1,
65808
+ isArray = isArray_1,
65809
+ property = property_1;
65810
+ /**
65811
+ * The base implementation of `_.iteratee`.
65812
+ *
65813
+ * @private
65814
+ * @param {*} [value=_.identity] The value to convert to an iteratee.
65815
+ * @returns {Function} Returns the iteratee.
65816
+ */
65817
+
65818
+ function baseIteratee$1(value) {
65819
+ // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9.
65820
+ // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details.
65821
+ if (typeof value == 'function') {
65822
+ return value;
65823
+ }
65824
+
65825
+ if (value == null) {
65826
+ return identity;
65827
+ }
65828
+
65829
+ if (_typeof(value) == 'object') {
65830
+ return isArray(value) ? baseMatchesProperty(value[0], value[1]) : baseMatches(value);
65831
+ }
65832
+
65833
+ return property(value);
65834
+ }
65835
+
65836
+ var _baseIteratee = baseIteratee$1;
65837
+
65838
+ var baseExtremum = _baseExtremum,
65839
+ baseGt = _baseGt,
65840
+ baseIteratee = _baseIteratee;
65841
+ /**
65842
+ * This method is like `_.max` except that it accepts `iteratee` which is
65843
+ * invoked for each element in `array` to generate the criterion by which
65844
+ * the value is ranked. The iteratee is invoked with one argument: (value).
65845
+ *
65846
+ * @static
65847
+ * @memberOf _
65848
+ * @since 4.0.0
65849
+ * @category Math
65850
+ * @param {Array} array The array to iterate over.
65851
+ * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
65852
+ * @returns {*} Returns the maximum value.
65853
+ * @example
65854
+ *
65855
+ * var objects = [{ 'n': 1 }, { 'n': 2 }];
65856
+ *
65857
+ * _.maxBy(objects, function(o) { return o.n; });
65858
+ * // => { 'n': 2 }
65859
+ *
65860
+ * // The `_.property` iteratee shorthand.
65861
+ * _.maxBy(objects, 'n');
65862
+ * // => { 'n': 2 }
65863
+ */
65864
+
65865
+ function maxBy(array, iteratee) {
65866
+ return array && array.length ? baseExtremum(array, baseIteratee(iteratee), baseGt) : undefined;
65867
+ }
65868
+
65869
+ var maxBy_1 = maxBy;
65870
+
65871
+ var THREE_SECONDS = 3000;
65872
+ var MAX_TRIES = 3;
65873
+ /** Check if the user's primary creator node is healthy */
65874
+
65875
+ var checkPrimaryHealthy = /*#__PURE__*/function () {
65876
+ var _ref = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(libs, primary, tries) {
65877
+ var healthy;
65878
+ return regeneratorRuntime.wrap(function _callee$(_context) {
65879
+ while (1) {
65880
+ switch (_context.prev = _context.next) {
65881
+ case 0:
65882
+ _context.next = 2;
65883
+ return Utils.isHealthy(primary);
65884
+
65885
+ case 2:
65886
+ healthy = _context.sent;
65887
+
65888
+ if (!healthy) {
65889
+ _context.next = 7;
65890
+ break;
65891
+ }
65892
+
65893
+ return _context.abrupt("return", healthy);
65894
+
65895
+ case 7:
65896
+ if (!(tries === 0)) {
65897
+ _context.next = 9;
65898
+ break;
65899
+ }
65900
+
65901
+ return _context.abrupt("return", false);
65902
+
65903
+ case 9:
65904
+ _context.next = 11;
65905
+ return Utils.wait(THREE_SECONDS);
65906
+
65907
+ case 11:
65908
+ _context.next = 13;
65909
+ return checkPrimaryHealthy(libs, primary, tries - 1);
65910
+
65911
+ case 13:
65912
+ return _context.abrupt("return", _context.sent);
65913
+
65914
+ case 14:
65915
+ case "end":
65916
+ return _context.stop();
65917
+ }
65918
+ }
65919
+ }, _callee);
65920
+ }));
65921
+
65922
+ return function checkPrimaryHealthy(_x, _x2, _x3) {
65923
+ return _ref.apply(this, arguments);
65924
+ };
65925
+ }();
65926
+ /** Gets new endpoints from a user's secondaries */
65927
+
65928
+
65929
+ var getNewPrimary = /*#__PURE__*/function () {
65930
+ var _ref2 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee3(secondaries, wallet) {
65931
+ var _maxBy;
65932
+
65933
+ var secondaryStatuses, max;
65934
+ return regeneratorRuntime.wrap(function _callee3$(_context3) {
65935
+ while (1) {
65936
+ switch (_context3.prev = _context3.next) {
65937
+ case 0:
65938
+ _context3.next = 2;
65939
+ return Promise.all(secondaries.map( /*#__PURE__*/function () {
65940
+ var _ref3 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2(secondary) {
65941
+ var clockValue;
65942
+ return regeneratorRuntime.wrap(function _callee2$(_context2) {
65943
+ while (1) {
65944
+ switch (_context2.prev = _context2.next) {
65945
+ case 0:
65946
+ _context2.prev = 0;
65947
+ _context2.next = 3;
65948
+ return CreatorNode.getClockValue(secondary, wallet);
65949
+
65950
+ case 3:
65951
+ clockValue = _context2.sent;
65952
+
65953
+ if (!clockValue) {
65954
+ _context2.next = 6;
65955
+ break;
65956
+ }
65957
+
65958
+ return _context2.abrupt("return", {
65959
+ secondary: secondary,
65960
+ clockValue: clockValue
65961
+ });
65962
+
65963
+ case 6:
65964
+ return _context2.abrupt("return", undefined);
65965
+
65966
+ case 9:
65967
+ _context2.prev = 9;
65968
+ _context2.t0 = _context2["catch"](0);
65969
+ console.warn(_context2.t0);
65970
+ return _context2.abrupt("return", undefined);
65971
+
65972
+ case 13:
65973
+ case "end":
65974
+ return _context2.stop();
65975
+ }
65976
+ }
65977
+ }, _callee2, null, [[0, 9]]);
65978
+ }));
65979
+
65980
+ return function (_x6) {
65981
+ return _ref3.apply(this, arguments);
65982
+ };
65983
+ }()));
65984
+
65985
+ case 2:
65986
+ secondaryStatuses = _context3.sent.filter(Boolean);
65987
+ max = (_maxBy = maxBy_1(secondaryStatuses, function (s) {
65988
+ return s === null || s === void 0 ? void 0 : s.clockValue;
65989
+ })) === null || _maxBy === void 0 ? void 0 : _maxBy.secondary;
65990
+
65991
+ if (max) {
65992
+ _context3.next = 6;
65993
+ break;
65994
+ }
65995
+
65996
+ throw new Error("Could not find valid secondaries for user ".concat(secondaries));
65997
+
65998
+ case 6:
65999
+ return _context3.abrupt("return", max);
66000
+
66001
+ case 7:
66002
+ case "end":
66003
+ return _context3.stop();
66004
+ }
66005
+ }
66006
+ }, _callee3);
66007
+ }));
66008
+
66009
+ return function getNewPrimary(_x4, _x5) {
66010
+ return _ref2.apply(this, arguments);
66011
+ };
66012
+ }();
66013
+
66014
+ var rolloverNodes = /*#__PURE__*/function () {
66015
+ var _ref4 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee4(libs, creatorNodeWhitelist, creatorNodeBlacklist) {
66016
+ var _libs$userStateManage;
66017
+
66018
+ var user, primary, healthy, secondaries, _libs$ServiceProvider, _libs$User, _libs$User2, _libs$creatorNode, _libs$User3, newPrimary, index, newSecondaries, autoselect, newEndpoints, newMetadata;
66019
+
66020
+ return regeneratorRuntime.wrap(function _callee4$(_context4) {
66021
+ while (1) {
66022
+ switch (_context4.prev = _context4.next) {
66023
+ case 0:
66024
+ console.debug('Sanity Check - rolloverNodes');
66025
+ user = (_libs$userStateManage = libs.userStateManager) === null || _libs$userStateManage === void 0 ? void 0 : _libs$userStateManage.getCurrentUser();
66026
+
66027
+ if (user) {
66028
+ _context4.next = 4;
66029
+ break;
66030
+ }
66031
+
66032
+ return _context4.abrupt("return");
66033
+
66034
+ case 4:
66035
+ primary = CreatorNode.getPrimary(user.creator_node_endpoint);
66036
+
66037
+ if (primary) {
66038
+ _context4.next = 7;
66039
+ break;
66040
+ }
66041
+
66042
+ return _context4.abrupt("return");
66043
+
66044
+ case 7:
66045
+ _context4.next = 9;
66046
+ return checkPrimaryHealthy(libs, primary, MAX_TRIES);
66047
+
66048
+ case 9:
66049
+ healthy = _context4.sent;
66050
+
66051
+ if (!(healthy && !(creatorNodeBlacklist !== null && creatorNodeBlacklist !== void 0 && creatorNodeBlacklist.has(primary)))) {
66052
+ _context4.next = 12;
66053
+ break;
66054
+ }
66055
+
66056
+ return _context4.abrupt("return");
66057
+
66058
+ case 12:
66059
+ secondaries = CreatorNode.getSecondaries(user.creator_node_endpoint);
66060
+ _context4.prev = 13;
66061
+ _context4.next = 16;
66062
+ return getNewPrimary(secondaries, user.wallet);
66063
+
66064
+ case 16:
66065
+ newPrimary = _context4.sent;
66066
+ index = secondaries.indexOf(newPrimary); // Get new secondaries and backfill up to 2
66067
+
66068
+ newSecondaries = _toConsumableArray(secondaries);
66069
+ newSecondaries.splice(index, 1);
66070
+ _context4.next = 22;
66071
+ return (_libs$ServiceProvider = libs.ServiceProvider) === null || _libs$ServiceProvider === void 0 ? void 0 : _libs$ServiceProvider.autoSelectCreatorNodes({
66072
+ numberOfNodes: 2 - newSecondaries.length,
66073
+ whitelist: creatorNodeWhitelist,
66074
+ // Exclude ones we currently have
66075
+ blacklist: new Set([newPrimary].concat(_toConsumableArray(newSecondaries))),
66076
+ preferHigherPatchForPrimary: (_libs$User = libs.User) === null || _libs$User === void 0 ? void 0 : _libs$User.preferHigherPatchForPrimary,
66077
+ preferHigherPatchForSecondaries: (_libs$User2 = libs.User) === null || _libs$User2 === void 0 ? void 0 : _libs$User2.preferHigherPatchForSecondaries
66078
+ });
66079
+
66080
+ case 22:
66081
+ autoselect = _context4.sent;
66082
+
66083
+ if (autoselect) {
66084
+ newSecondaries = newSecondaries.concat([autoselect.primary].concat(_toConsumableArray(autoselect.secondaries)));
66085
+ } // Set the new endpoint and connect to it
66086
+
66087
+
66088
+ newEndpoints = [newPrimary].concat(_toConsumableArray(newSecondaries));
66089
+ _context4.next = 27;
66090
+ return (_libs$creatorNode = libs.creatorNode) === null || _libs$creatorNode === void 0 ? void 0 : _libs$creatorNode.setEndpoint(newEndpoints[0]);
66091
+
66092
+ case 27:
66093
+ // Update the user
66094
+ newMetadata = _objectSpread2({}, user);
66095
+ newMetadata.creator_node_endpoint = newEndpoints.join(',');
66096
+ console.debug("Sanity Check - rolloverNodes - new nodes ".concat(newMetadata.creator_node_endpoint));
66097
+ _context4.next = 32;
66098
+ return (_libs$User3 = libs.User) === null || _libs$User3 === void 0 ? void 0 : _libs$User3.updateCreator(user.user_id, newMetadata, true
66099
+ /* useEntityManager */
66100
+ );
66101
+
66102
+ case 32:
66103
+ _context4.next = 37;
66104
+ break;
66105
+
66106
+ case 34:
66107
+ _context4.prev = 34;
66108
+ _context4.t0 = _context4["catch"](13);
66109
+ console.error(_context4.t0);
66110
+
66111
+ case 37:
66112
+ case "end":
66113
+ return _context4.stop();
66114
+ }
66115
+ }
66116
+ }, _callee4, null, [[13, 34]]);
66117
+ }));
66118
+
66119
+ return function rolloverNodes(_x7, _x8, _x9) {
66120
+ return _ref4.apply(this, arguments);
62935
66121
  };
62936
66122
  }();
62937
66123