diff --git a/docs/build/bundle.bb4107a4.js b/docs/build/bundle.36b5894e.js similarity index 98% rename from docs/build/bundle.bb4107a4.js rename to docs/build/bundle.36b5894e.js index a7162327c..c86b84f4a 100644 --- a/docs/build/bundle.bb4107a4.js +++ b/docs/build/bundle.36b5894e.js @@ -2904,6 +2904,17 @@ eval("/* WEBPACK VAR INJECTION */(function(global) {/**\n * lodash (Custom Build /***/ }), +/***/ "./node_modules/lodash.uniqby/index.js": +/*!*********************************************!*\ + !*** ./node_modules/lodash.uniqby/index.js ***! + \*********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("/* WEBPACK VAR INJECTION */(function(global, module) {/**\n * lodash (Custom Build) \n * Build: `lodash modularize exports=\"npm\" -o ./`\n * Copyright jQuery Foundation and other contributors \n * Released under MIT license \n * Based on Underscore.js 1.8.3 \n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/** Used as the `TypeError` message for \"Functions\" methods. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used to compose bitmasks for comparison styles. */\nvar UNORDERED_COMPARE_FLAG = 1,\n PARTIAL_COMPARE_FLAG = 2;\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0,\n MAX_SAFE_INTEGER = 9007199254740991;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n promiseTag = '[object Promise]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to match property names within property paths. */\nvar reIsDeepProp = /\\.|\\[(?:[^[\\]]*|([\"'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,\n reIsPlainProp = /^\\w*$/,\n reLeadingDot = /^\\./,\n rePropName = /[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g;\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to match backslashes in property paths. */\nvar reEscapeChar = /\\\\(\\\\)?/g;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/** Used to identify `toStringTag` values of typed arrays. */\nvar typedArrayTags = {};\ntypedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\ntypedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\ntypedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\ntypedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\ntypedArrayTags[uint32Tag] = true;\ntypedArrayTags[argsTag] = typedArrayTags[arrayTag] =\ntypedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\ntypedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\ntypedArrayTags[errorTag] = typedArrayTags[funcTag] =\ntypedArrayTags[mapTag] = typedArrayTags[numberTag] =\ntypedArrayTags[objectTag] = typedArrayTags[regexpTag] =\ntypedArrayTags[setTag] = typedArrayTags[stringTag] =\ntypedArrayTags[weakMapTag] = false;\n\n/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Detect free variable `process` from Node.js. */\nvar freeProcess = moduleExports && freeGlobal.process;\n\n/** Used to access faster Node.js helpers. */\nvar nodeUtil = (function() {\n try {\n return freeProcess && freeProcess.binding('util');\n } catch (e) {}\n}());\n\n/* Node.js helper references. */\nvar nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n/**\n * A specialized version of `_.includes` for arrays without support for\n * specifying an index to search from.\n *\n * @private\n * @param {Array} [array] The array to inspect.\n * @param {*} target The value to search for.\n * @returns {boolean} Returns `true` if `target` is found, else `false`.\n */\nfunction arrayIncludes(array, value) {\n var length = array ? array.length : 0;\n return !!length && baseIndexOf(array, value, 0) > -1;\n}\n\n/**\n * This function is like `arrayIncludes` except that it accepts a comparator.\n *\n * @private\n * @param {Array} [array] The array to inspect.\n * @param {*} target The value to search for.\n * @param {Function} comparator The comparator invoked per element.\n * @returns {boolean} Returns `true` if `target` is found, else `false`.\n */\nfunction arrayIncludesWith(array, value, comparator) {\n var index = -1,\n length = array ? array.length : 0;\n\n while (++index < length) {\n if (comparator(value, array[index])) {\n return true;\n }\n }\n return false;\n}\n\n/**\n * A specialized version of `_.some` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n */\nfunction arraySome(array, predicate) {\n var index = -1,\n length = array ? array.length : 0;\n\n while (++index < length) {\n if (predicate(array[index], index, array)) {\n return true;\n }\n }\n return false;\n}\n\n/**\n * The base implementation of `_.findIndex` and `_.findLastIndex` without\n * support for iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Function} predicate The function invoked per iteration.\n * @param {number} fromIndex The index to search from.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction baseFindIndex(array, predicate, fromIndex, fromRight) {\n var length = array.length,\n index = fromIndex + (fromRight ? 1 : -1);\n\n while ((fromRight ? index-- : ++index < length)) {\n if (predicate(array[index], index, array)) {\n return index;\n }\n }\n return -1;\n}\n\n/**\n * The base implementation of `_.indexOf` without `fromIndex` bounds checks.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} fromIndex The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction baseIndexOf(array, value, fromIndex) {\n if (value !== value) {\n return baseFindIndex(array, baseIsNaN, fromIndex);\n }\n var index = fromIndex - 1,\n length = array.length;\n\n while (++index < length) {\n if (array[index] === value) {\n return index;\n }\n }\n return -1;\n}\n\n/**\n * The base implementation of `_.isNaN` without support for number objects.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.\n */\nfunction baseIsNaN(value) {\n return value !== value;\n}\n\n/**\n * The base implementation of `_.property` without support for deep paths.\n *\n * @private\n * @param {string} key The key of the property to get.\n * @returns {Function} Returns the new accessor function.\n */\nfunction baseProperty(key) {\n return function(object) {\n return object == null ? undefined : object[key];\n };\n}\n\n/**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\nfunction baseTimes(n, iteratee) {\n var index = -1,\n result = Array(n);\n\n while (++index < n) {\n result[index] = iteratee(index);\n }\n return result;\n}\n\n/**\n * The base implementation of `_.unary` without support for storing metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n */\nfunction baseUnary(func) {\n return function(value) {\n return func(value);\n };\n}\n\n/**\n * Checks if a cache value for `key` exists.\n *\n * @private\n * @param {Object} cache The cache to query.\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction cacheHas(cache, key) {\n return cache.has(key);\n}\n\n/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n return object == null ? undefined : object[key];\n}\n\n/**\n * Checks if `value` is a host object in IE < 9.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a host object, else `false`.\n */\nfunction isHostObject(value) {\n // Many host objects are `Object` objects that can coerce to strings\n // despite having improperly defined `toString` methods.\n var result = false;\n if (value != null && typeof value.toString != 'function') {\n try {\n result = !!(value + '');\n } catch (e) {}\n }\n return result;\n}\n\n/**\n * Converts `map` to its key-value pairs.\n *\n * @private\n * @param {Object} map The map to convert.\n * @returns {Array} Returns the key-value pairs.\n */\nfunction mapToArray(map) {\n var index = -1,\n result = Array(map.size);\n\n map.forEach(function(value, key) {\n result[++index] = [key, value];\n });\n return result;\n}\n\n/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n}\n\n/**\n * Converts `set` to an array of its values.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the values.\n */\nfunction setToArray(set) {\n var index = -1,\n result = Array(set.size);\n\n set.forEach(function(value) {\n result[++index] = value;\n });\n return result;\n}\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype,\n funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar objectToString = objectProto.toString;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/** Built-in value references. */\nvar Symbol = root.Symbol,\n Uint8Array = root.Uint8Array,\n propertyIsEnumerable = objectProto.propertyIsEnumerable,\n splice = arrayProto.splice;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeKeys = overArg(Object.keys, Object);\n\n/* Built-in method references that are verified to be native. */\nvar DataView = getNative(root, 'DataView'),\n Map = getNative(root, 'Map'),\n Promise = getNative(root, 'Promise'),\n Set = getNative(root, 'Set'),\n WeakMap = getNative(root, 'WeakMap'),\n nativeCreate = getNative(Object, 'create');\n\n/** Used to detect maps, sets, and weakmaps. */\nvar dataViewCtorString = toSource(DataView),\n mapCtorString = toSource(Map),\n promiseCtorString = toSource(Promise),\n setCtorString = toSource(Set),\n weakMapCtorString = toSource(WeakMap);\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined,\n symbolToString = symbolProto ? symbolProto.toString : undefined;\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n var index = -1,\n length = entries ? entries.length : 0;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n}\n\n/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n return this.has(key) && delete this.__data__[key];\n}\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key);\n}\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n var data = this.__data__;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n var index = -1,\n length = entries ? entries.length : 0;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n this.__data__ = [];\n}\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n return true;\n}\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n}\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n}\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n var index = -1,\n length = entries ? entries.length : 0;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n}\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n return getMapData(this, key)['delete'](key);\n}\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n return getMapData(this, key).get(key);\n}\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n return getMapData(this, key).has(key);\n}\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n getMapData(this, key).set(key, value);\n return this;\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\n/**\n *\n * Creates an array cache object to store unique values.\n *\n * @private\n * @constructor\n * @param {Array} [values] The values to cache.\n */\nfunction SetCache(values) {\n var index = -1,\n length = values ? values.length : 0;\n\n this.__data__ = new MapCache;\n while (++index < length) {\n this.add(values[index]);\n }\n}\n\n/**\n * Adds `value` to the array cache.\n *\n * @private\n * @name add\n * @memberOf SetCache\n * @alias push\n * @param {*} value The value to cache.\n * @returns {Object} Returns the cache instance.\n */\nfunction setCacheAdd(value) {\n this.__data__.set(value, HASH_UNDEFINED);\n return this;\n}\n\n/**\n * Checks if `value` is in the array cache.\n *\n * @private\n * @name has\n * @memberOf SetCache\n * @param {*} value The value to search for.\n * @returns {number} Returns `true` if `value` is found, else `false`.\n */\nfunction setCacheHas(value) {\n return this.__data__.has(value);\n}\n\n// Add methods to `SetCache`.\nSetCache.prototype.add = SetCache.prototype.push = setCacheAdd;\nSetCache.prototype.has = setCacheHas;\n\n/**\n * Creates a stack cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Stack(entries) {\n this.__data__ = new ListCache(entries);\n}\n\n/**\n * Removes all key-value entries from the stack.\n *\n * @private\n * @name clear\n * @memberOf Stack\n */\nfunction stackClear() {\n this.__data__ = new ListCache;\n}\n\n/**\n * Removes `key` and its value from the stack.\n *\n * @private\n * @name delete\n * @memberOf Stack\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction stackDelete(key) {\n return this.__data__['delete'](key);\n}\n\n/**\n * Gets the stack value for `key`.\n *\n * @private\n * @name get\n * @memberOf Stack\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction stackGet(key) {\n return this.__data__.get(key);\n}\n\n/**\n * Checks if a stack value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Stack\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction stackHas(key) {\n return this.__data__.has(key);\n}\n\n/**\n * Sets the stack `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Stack\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the stack cache instance.\n */\nfunction stackSet(key, value) {\n var cache = this.__data__;\n if (cache instanceof ListCache) {\n var pairs = cache.__data__;\n if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n pairs.push([key, value]);\n return this;\n }\n cache = this.__data__ = new MapCache(pairs);\n }\n cache.set(key, value);\n return this;\n}\n\n// Add methods to `Stack`.\nStack.prototype.clear = stackClear;\nStack.prototype['delete'] = stackDelete;\nStack.prototype.get = stackGet;\nStack.prototype.has = stackHas;\nStack.prototype.set = stackSet;\n\n/**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\nfunction arrayLikeKeys(value, inherited) {\n // Safari 8.1 makes `arguments.callee` enumerable in strict mode.\n // Safari 9 makes `arguments.length` enumerable in strict mode.\n var result = (isArray(value) || isArguments(value))\n ? baseTimes(value.length, String)\n : [];\n\n var length = result.length,\n skipIndexes = !!length;\n\n for (var key in value) {\n if ((inherited || hasOwnProperty.call(value, key)) &&\n !(skipIndexes && (key == 'length' || isIndex(key, length)))) {\n result.push(key);\n }\n }\n return result;\n}\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n}\n\n/**\n * The base implementation of `_.get` without support for default values.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @returns {*} Returns the resolved value.\n */\nfunction baseGet(object, path) {\n path = isKey(path, object) ? [path] : castPath(path);\n\n var index = 0,\n length = path.length;\n\n while (object != null && index < length) {\n object = object[toKey(path[index++])];\n }\n return (index && index == length) ? object : undefined;\n}\n\n/**\n * The base implementation of `getTag`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n return objectToString.call(value);\n}\n\n/**\n * The base implementation of `_.hasIn` without support for deep paths.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {Array|string} key The key to check.\n * @returns {boolean} Returns `true` if `key` exists, else `false`.\n */\nfunction baseHasIn(object, key) {\n return object != null && key in Object(object);\n}\n\n/**\n * The base implementation of `_.isEqual` which supports partial comparisons\n * and tracks traversed objects.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {Function} [customizer] The function to customize comparisons.\n * @param {boolean} [bitmask] The bitmask of comparison flags.\n * The bitmask may be composed of the following flags:\n * 1 - Unordered comparison\n * 2 - Partial comparison\n * @param {Object} [stack] Tracks traversed `value` and `other` objects.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n */\nfunction baseIsEqual(value, other, customizer, bitmask, stack) {\n if (value === other) {\n return true;\n }\n if (value == null || other == null || (!isObject(value) && !isObjectLike(other))) {\n return value !== value && other !== other;\n }\n return baseIsEqualDeep(value, other, baseIsEqual, customizer, bitmask, stack);\n}\n\n/**\n * A specialized version of `baseIsEqual` for arrays and objects which performs\n * deep comparisons and tracks traversed objects enabling objects with circular\n * references to be compared.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Function} [customizer] The function to customize comparisons.\n * @param {number} [bitmask] The bitmask of comparison flags. See `baseIsEqual`\n * for more details.\n * @param {Object} [stack] Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction baseIsEqualDeep(object, other, equalFunc, customizer, bitmask, stack) {\n var objIsArr = isArray(object),\n othIsArr = isArray(other),\n objTag = arrayTag,\n othTag = arrayTag;\n\n if (!objIsArr) {\n objTag = getTag(object);\n objTag = objTag == argsTag ? objectTag : objTag;\n }\n if (!othIsArr) {\n othTag = getTag(other);\n othTag = othTag == argsTag ? objectTag : othTag;\n }\n var objIsObj = objTag == objectTag && !isHostObject(object),\n othIsObj = othTag == objectTag && !isHostObject(other),\n isSameTag = objTag == othTag;\n\n if (isSameTag && !objIsObj) {\n stack || (stack = new Stack);\n return (objIsArr || isTypedArray(object))\n ? equalArrays(object, other, equalFunc, customizer, bitmask, stack)\n : equalByTag(object, other, objTag, equalFunc, customizer, bitmask, stack);\n }\n if (!(bitmask & PARTIAL_COMPARE_FLAG)) {\n var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),\n othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');\n\n if (objIsWrapped || othIsWrapped) {\n var objUnwrapped = objIsWrapped ? object.value() : object,\n othUnwrapped = othIsWrapped ? other.value() : other;\n\n stack || (stack = new Stack);\n return equalFunc(objUnwrapped, othUnwrapped, customizer, bitmask, stack);\n }\n }\n if (!isSameTag) {\n return false;\n }\n stack || (stack = new Stack);\n return equalObjects(object, other, equalFunc, customizer, bitmask, stack);\n}\n\n/**\n * The base implementation of `_.isMatch` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The object to inspect.\n * @param {Object} source The object of property values to match.\n * @param {Array} matchData The property names, values, and compare flags to match.\n * @param {Function} [customizer] The function to customize comparisons.\n * @returns {boolean} Returns `true` if `object` is a match, else `false`.\n */\nfunction baseIsMatch(object, source, matchData, customizer) {\n var index = matchData.length,\n length = index,\n noCustomizer = !customizer;\n\n if (object == null) {\n return !length;\n }\n object = Object(object);\n while (index--) {\n var data = matchData[index];\n if ((noCustomizer && data[2])\n ? data[1] !== object[data[0]]\n : !(data[0] in object)\n ) {\n return false;\n }\n }\n while (++index < length) {\n data = matchData[index];\n var key = data[0],\n objValue = object[key],\n srcValue = data[1];\n\n if (noCustomizer && data[2]) {\n if (objValue === undefined && !(key in object)) {\n return false;\n }\n } else {\n var stack = new Stack;\n if (customizer) {\n var result = customizer(objValue, srcValue, key, object, source, stack);\n }\n if (!(result === undefined\n ? baseIsEqual(srcValue, objValue, customizer, UNORDERED_COMPARE_FLAG | PARTIAL_COMPARE_FLAG, stack)\n : result\n )) {\n return false;\n }\n }\n }\n return true;\n}\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\nfunction baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = (isFunction(value) || isHostObject(value)) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n}\n\n/**\n * The base implementation of `_.isTypedArray` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n */\nfunction baseIsTypedArray(value) {\n return isObjectLike(value) &&\n isLength(value.length) && !!typedArrayTags[objectToString.call(value)];\n}\n\n/**\n * The base implementation of `_.iteratee`.\n *\n * @private\n * @param {*} [value=_.identity] The value to convert to an iteratee.\n * @returns {Function} Returns the iteratee.\n */\nfunction baseIteratee(value) {\n // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9.\n // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details.\n if (typeof value == 'function') {\n return value;\n }\n if (value == null) {\n return identity;\n }\n if (typeof value == 'object') {\n return isArray(value)\n ? baseMatchesProperty(value[0], value[1])\n : baseMatches(value);\n }\n return property(value);\n}\n\n/**\n * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeys(object) {\n if (!isPrototype(object)) {\n return nativeKeys(object);\n }\n var result = [];\n for (var key in Object(object)) {\n if (hasOwnProperty.call(object, key) && key != 'constructor') {\n result.push(key);\n }\n }\n return result;\n}\n\n/**\n * The base implementation of `_.matches` which doesn't clone `source`.\n *\n * @private\n * @param {Object} source The object of property values to match.\n * @returns {Function} Returns the new spec function.\n */\nfunction baseMatches(source) {\n var matchData = getMatchData(source);\n if (matchData.length == 1 && matchData[0][2]) {\n return matchesStrictComparable(matchData[0][0], matchData[0][1]);\n }\n return function(object) {\n return object === source || baseIsMatch(object, source, matchData);\n };\n}\n\n/**\n * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.\n *\n * @private\n * @param {string} path The path of the property to get.\n * @param {*} srcValue The value to match.\n * @returns {Function} Returns the new spec function.\n */\nfunction baseMatchesProperty(path, srcValue) {\n if (isKey(path) && isStrictComparable(srcValue)) {\n return matchesStrictComparable(toKey(path), srcValue);\n }\n return function(object) {\n var objValue = get(object, path);\n return (objValue === undefined && objValue === srcValue)\n ? hasIn(object, path)\n : baseIsEqual(srcValue, objValue, undefined, UNORDERED_COMPARE_FLAG | PARTIAL_COMPARE_FLAG);\n };\n}\n\n/**\n * A specialized version of `baseProperty` which supports deep paths.\n *\n * @private\n * @param {Array|string} path The path of the property to get.\n * @returns {Function} Returns the new accessor function.\n */\nfunction basePropertyDeep(path) {\n return function(object) {\n return baseGet(object, path);\n };\n}\n\n/**\n * The base implementation of `_.toString` which doesn't convert nullish\n * values to empty strings.\n *\n * @private\n * @param {*} value The value to process.\n * @returns {string} Returns the string.\n */\nfunction baseToString(value) {\n // Exit early for strings to avoid a performance hit in some environments.\n if (typeof value == 'string') {\n return value;\n }\n if (isSymbol(value)) {\n return symbolToString ? symbolToString.call(value) : '';\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n}\n\n/**\n * The base implementation of `_.uniqBy` without support for iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new duplicate free array.\n */\nfunction baseUniq(array, iteratee, comparator) {\n var index = -1,\n includes = arrayIncludes,\n length = array.length,\n isCommon = true,\n result = [],\n seen = result;\n\n if (comparator) {\n isCommon = false;\n includes = arrayIncludesWith;\n }\n else if (length >= LARGE_ARRAY_SIZE) {\n var set = iteratee ? null : createSet(array);\n if (set) {\n return setToArray(set);\n }\n isCommon = false;\n includes = cacheHas;\n seen = new SetCache;\n }\n else {\n seen = iteratee ? [] : result;\n }\n outer:\n while (++index < length) {\n var value = array[index],\n computed = iteratee ? iteratee(value) : value;\n\n value = (comparator || value !== 0) ? value : 0;\n if (isCommon && computed === computed) {\n var seenIndex = seen.length;\n while (seenIndex--) {\n if (seen[seenIndex] === computed) {\n continue outer;\n }\n }\n if (iteratee) {\n seen.push(computed);\n }\n result.push(value);\n }\n else if (!includes(seen, computed, comparator)) {\n if (seen !== result) {\n seen.push(computed);\n }\n result.push(value);\n }\n }\n return result;\n}\n\n/**\n * Casts `value` to a path array if it's not one.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {Array} Returns the cast property path array.\n */\nfunction castPath(value) {\n return isArray(value) ? value : stringToPath(value);\n}\n\n/**\n * Creates a set object of `values`.\n *\n * @private\n * @param {Array} values The values to add to the set.\n * @returns {Object} Returns the new set.\n */\nvar createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) {\n return new Set(values);\n};\n\n/**\n * A specialized version of `baseIsEqualDeep` for arrays with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Array} array The array to compare.\n * @param {Array} other The other array to compare.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Function} customizer The function to customize comparisons.\n * @param {number} bitmask The bitmask of comparison flags. See `baseIsEqual`\n * for more details.\n * @param {Object} stack Tracks traversed `array` and `other` objects.\n * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.\n */\nfunction equalArrays(array, other, equalFunc, customizer, bitmask, stack) {\n var isPartial = bitmask & PARTIAL_COMPARE_FLAG,\n arrLength = array.length,\n othLength = other.length;\n\n if (arrLength != othLength && !(isPartial && othLength > arrLength)) {\n return false;\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(array);\n if (stacked && stack.get(other)) {\n return stacked == other;\n }\n var index = -1,\n result = true,\n seen = (bitmask & UNORDERED_COMPARE_FLAG) ? new SetCache : undefined;\n\n stack.set(array, other);\n stack.set(other, array);\n\n // Ignore non-index properties.\n while (++index < arrLength) {\n var arrValue = array[index],\n othValue = other[index];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, arrValue, index, other, array, stack)\n : customizer(arrValue, othValue, index, array, other, stack);\n }\n if (compared !== undefined) {\n if (compared) {\n continue;\n }\n result = false;\n break;\n }\n // Recursively compare arrays (susceptible to call stack limits).\n if (seen) {\n if (!arraySome(other, function(othValue, othIndex) {\n if (!seen.has(othIndex) &&\n (arrValue === othValue || equalFunc(arrValue, othValue, customizer, bitmask, stack))) {\n return seen.add(othIndex);\n }\n })) {\n result = false;\n break;\n }\n } else if (!(\n arrValue === othValue ||\n equalFunc(arrValue, othValue, customizer, bitmask, stack)\n )) {\n result = false;\n break;\n }\n }\n stack['delete'](array);\n stack['delete'](other);\n return result;\n}\n\n/**\n * A specialized version of `baseIsEqualDeep` for comparing objects of\n * the same `toStringTag`.\n *\n * **Note:** This function only supports comparing values with tags of\n * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {string} tag The `toStringTag` of the objects to compare.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Function} customizer The function to customize comparisons.\n * @param {number} bitmask The bitmask of comparison flags. See `baseIsEqual`\n * for more details.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalByTag(object, other, tag, equalFunc, customizer, bitmask, stack) {\n switch (tag) {\n case dataViewTag:\n if ((object.byteLength != other.byteLength) ||\n (object.byteOffset != other.byteOffset)) {\n return false;\n }\n object = object.buffer;\n other = other.buffer;\n\n case arrayBufferTag:\n if ((object.byteLength != other.byteLength) ||\n !equalFunc(new Uint8Array(object), new Uint8Array(other))) {\n return false;\n }\n return true;\n\n case boolTag:\n case dateTag:\n case numberTag:\n // Coerce booleans to `1` or `0` and dates to milliseconds.\n // Invalid dates are coerced to `NaN`.\n return eq(+object, +other);\n\n case errorTag:\n return object.name == other.name && object.message == other.message;\n\n case regexpTag:\n case stringTag:\n // Coerce regexes to strings and treat strings, primitives and objects,\n // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring\n // for more details.\n return object == (other + '');\n\n case mapTag:\n var convert = mapToArray;\n\n case setTag:\n var isPartial = bitmask & PARTIAL_COMPARE_FLAG;\n convert || (convert = setToArray);\n\n if (object.size != other.size && !isPartial) {\n return false;\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(object);\n if (stacked) {\n return stacked == other;\n }\n bitmask |= UNORDERED_COMPARE_FLAG;\n\n // Recursively compare objects (susceptible to call stack limits).\n stack.set(object, other);\n var result = equalArrays(convert(object), convert(other), equalFunc, customizer, bitmask, stack);\n stack['delete'](object);\n return result;\n\n case symbolTag:\n if (symbolValueOf) {\n return symbolValueOf.call(object) == symbolValueOf.call(other);\n }\n }\n return false;\n}\n\n/**\n * A specialized version of `baseIsEqualDeep` for objects with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Function} customizer The function to customize comparisons.\n * @param {number} bitmask The bitmask of comparison flags. See `baseIsEqual`\n * for more details.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalObjects(object, other, equalFunc, customizer, bitmask, stack) {\n var isPartial = bitmask & PARTIAL_COMPARE_FLAG,\n objProps = keys(object),\n objLength = objProps.length,\n othProps = keys(other),\n othLength = othProps.length;\n\n if (objLength != othLength && !isPartial) {\n return false;\n }\n var index = objLength;\n while (index--) {\n var key = objProps[index];\n if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {\n return false;\n }\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(object);\n if (stacked && stack.get(other)) {\n return stacked == other;\n }\n var result = true;\n stack.set(object, other);\n stack.set(other, object);\n\n var skipCtor = isPartial;\n while (++index < objLength) {\n key = objProps[index];\n var objValue = object[key],\n othValue = other[key];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, objValue, key, other, object, stack)\n : customizer(objValue, othValue, key, object, other, stack);\n }\n // Recursively compare objects (susceptible to call stack limits).\n if (!(compared === undefined\n ? (objValue === othValue || equalFunc(objValue, othValue, customizer, bitmask, stack))\n : compared\n )) {\n result = false;\n break;\n }\n skipCtor || (skipCtor = key == 'constructor');\n }\n if (result && !skipCtor) {\n var objCtor = object.constructor,\n othCtor = other.constructor;\n\n // Non `Object` object instances with different constructors are not equal.\n if (objCtor != othCtor &&\n ('constructor' in object && 'constructor' in other) &&\n !(typeof objCtor == 'function' && objCtor instanceof objCtor &&\n typeof othCtor == 'function' && othCtor instanceof othCtor)) {\n result = false;\n }\n }\n stack['delete'](object);\n stack['delete'](other);\n return result;\n}\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n}\n\n/**\n * Gets the property names, values, and compare flags of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the match data of `object`.\n */\nfunction getMatchData(object) {\n var result = keys(object),\n length = result.length;\n\n while (length--) {\n var key = result[length],\n value = object[key];\n\n result[length] = [key, value, isStrictComparable(value)];\n }\n return result;\n}\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n}\n\n/**\n * Gets the `toStringTag` of `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nvar getTag = baseGetTag;\n\n// Fallback for data views, maps, sets, and weak maps in IE 11,\n// for data views in Edge < 14, and promises in Node.js.\nif ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||\n (Map && getTag(new Map) != mapTag) ||\n (Promise && getTag(Promise.resolve()) != promiseTag) ||\n (Set && getTag(new Set) != setTag) ||\n (WeakMap && getTag(new WeakMap) != weakMapTag)) {\n getTag = function(value) {\n var result = objectToString.call(value),\n Ctor = result == objectTag ? value.constructor : undefined,\n ctorString = Ctor ? toSource(Ctor) : undefined;\n\n if (ctorString) {\n switch (ctorString) {\n case dataViewCtorString: return dataViewTag;\n case mapCtorString: return mapTag;\n case promiseCtorString: return promiseTag;\n case setCtorString: return setTag;\n case weakMapCtorString: return weakMapTag;\n }\n }\n return result;\n };\n}\n\n/**\n * Checks if `path` exists on `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @param {Function} hasFunc The function to check properties.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n */\nfunction hasPath(object, path, hasFunc) {\n path = isKey(path, object) ? [path] : castPath(path);\n\n var result,\n index = -1,\n length = path.length;\n\n while (++index < length) {\n var key = toKey(path[index]);\n if (!(result = object != null && hasFunc(object, key))) {\n break;\n }\n object = object[key];\n }\n if (result) {\n return result;\n }\n var length = object ? object.length : 0;\n return !!length && isLength(length) && isIndex(key, length) &&\n (isArray(object) || isArguments(object));\n}\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n length = length == null ? MAX_SAFE_INTEGER : length;\n return !!length &&\n (typeof value == 'number' || reIsUint.test(value)) &&\n (value > -1 && value % 1 == 0 && value < length);\n}\n\n/**\n * Checks if `value` is a property name and not a property path.\n *\n * @private\n * @param {*} value The value to check.\n * @param {Object} [object] The object to query keys on.\n * @returns {boolean} Returns `true` if `value` is a property name, else `false`.\n */\nfunction isKey(value, object) {\n if (isArray(value)) {\n return false;\n }\n var type = typeof value;\n if (type == 'number' || type == 'symbol' || type == 'boolean' ||\n value == null || isSymbol(value)) {\n return true;\n }\n return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||\n (object != null && value in Object(object));\n}\n\n/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n}\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n}\n\n/**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\nfunction isPrototype(value) {\n var Ctor = value && value.constructor,\n proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n return value === proto;\n}\n\n/**\n * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` if suitable for strict\n * equality comparisons, else `false`.\n */\nfunction isStrictComparable(value) {\n return value === value && !isObject(value);\n}\n\n/**\n * A specialized version of `matchesProperty` for source values suitable\n * for strict equality comparisons, i.e. `===`.\n *\n * @private\n * @param {string} key The key of the property to get.\n * @param {*} srcValue The value to match.\n * @returns {Function} Returns the new spec function.\n */\nfunction matchesStrictComparable(key, srcValue) {\n return function(object) {\n if (object == null) {\n return false;\n }\n return object[key] === srcValue &&\n (srcValue !== undefined || (key in Object(object)));\n };\n}\n\n/**\n * Converts `string` to a property path array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the property path array.\n */\nvar stringToPath = memoize(function(string) {\n string = toString(string);\n\n var result = [];\n if (reLeadingDot.test(string)) {\n result.push('');\n }\n string.replace(rePropName, function(match, number, quote, string) {\n result.push(quote ? string.replace(reEscapeChar, '$1') : (number || match));\n });\n return result;\n});\n\n/**\n * Converts `value` to a string key if it's not a string or symbol.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {string|symbol} Returns the key.\n */\nfunction toKey(value) {\n if (typeof value == 'string' || isSymbol(value)) {\n return value;\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n}\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to process.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n}\n\n/**\n * This method is like `_.uniq` except that it accepts `iteratee` which is\n * invoked for each element in `array` to generate the criterion by which\n * uniqueness is computed. The iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {Function} [iteratee=_.identity]\n * The iteratee invoked per element.\n * @returns {Array} Returns the new duplicate free array.\n * @example\n *\n * _.uniqBy([2.1, 1.2, 2.3], Math.floor);\n * // => [2.1, 1.2]\n *\n * // The `_.property` iteratee shorthand.\n * _.uniqBy([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x');\n * // => [{ 'x': 1 }, { 'x': 2 }]\n */\nfunction uniqBy(array, iteratee) {\n return (array && array.length)\n ? baseUniq(array, baseIteratee(iteratee, 2))\n : [];\n}\n\n/**\n * Creates a function that memoizes the result of `func`. If `resolver` is\n * provided, it determines the cache key for storing the result based on the\n * arguments provided to the memoized function. By default, the first argument\n * provided to the memoized function is used as the map cache key. The `func`\n * is invoked with the `this` binding of the memoized function.\n *\n * **Note:** The cache is exposed as the `cache` property on the memoized\n * function. Its creation may be customized by replacing the `_.memoize.Cache`\n * constructor with one whose instances implement the\n * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)\n * method interface of `delete`, `get`, `has`, and `set`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to have its output memoized.\n * @param {Function} [resolver] The function to resolve the cache key.\n * @returns {Function} Returns the new memoized function.\n * @example\n *\n * var object = { 'a': 1, 'b': 2 };\n * var other = { 'c': 3, 'd': 4 };\n *\n * var values = _.memoize(_.values);\n * values(object);\n * // => [1, 2]\n *\n * values(other);\n * // => [3, 4]\n *\n * object.a = 2;\n * values(object);\n * // => [1, 2]\n *\n * // Modify the result cache.\n * values.cache.set(object, ['a', 'b']);\n * values(object);\n * // => ['a', 'b']\n *\n * // Replace `_.memoize.Cache`.\n * _.memoize.Cache = WeakMap;\n */\nfunction memoize(func, resolver) {\n if (typeof func != 'function' || (resolver && typeof resolver != 'function')) {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n var memoized = function() {\n var args = arguments,\n key = resolver ? resolver.apply(this, args) : args[0],\n cache = memoized.cache;\n\n if (cache.has(key)) {\n return cache.get(key);\n }\n var result = func.apply(this, args);\n memoized.cache = cache.set(key, result);\n return result;\n };\n memoized.cache = new (memoize.Cache || MapCache);\n return memoized;\n}\n\n// Assign cache to `_.memoize`.\nmemoize.Cache = MapCache;\n\n/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nfunction isArguments(value) {\n // Safari 8.1 makes `arguments.callee` enumerable in strict mode.\n return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') &&\n (!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag);\n}\n\n/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n}\n\n/**\n * This method is like `_.isArrayLike` except that it also checks if `value`\n * is an object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array-like object,\n * else `false`.\n * @example\n *\n * _.isArrayLikeObject([1, 2, 3]);\n * // => true\n *\n * _.isArrayLikeObject(document.body.children);\n * // => true\n *\n * _.isArrayLikeObject('abc');\n * // => false\n *\n * _.isArrayLikeObject(_.noop);\n * // => false\n */\nfunction isArrayLikeObject(value) {\n return isObjectLike(value) && isArrayLike(value);\n}\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 8-9 which returns 'object' for typed array and other constructors.\n var tag = isObject(value) ? objectToString.call(value) : '';\n return tag == funcTag || tag == genTag;\n}\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\n/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return !!value && (type == 'object' || type == 'function');\n}\n\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return !!value && typeof value == 'object';\n}\n\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\nfunction isSymbol(value) {\n return typeof value == 'symbol' ||\n (isObjectLike(value) && objectToString.call(value) == symbolTag);\n}\n\n/**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\nvar isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\n/**\n * Converts `value` to a string. An empty string is returned for `null`\n * and `undefined` values. The sign of `-0` is preserved.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {string} Returns the string.\n * @example\n *\n * _.toString(null);\n * // => ''\n *\n * _.toString(-0);\n * // => '-0'\n *\n * _.toString([1, 2, 3]);\n * // => '1,2,3'\n */\nfunction toString(value) {\n return value == null ? '' : baseToString(value);\n}\n\n/**\n * Gets the value at `path` of `object`. If the resolved value is\n * `undefined`, the `defaultValue` is returned in its place.\n *\n * @static\n * @memberOf _\n * @since 3.7.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @param {*} [defaultValue] The value returned for `undefined` resolved values.\n * @returns {*} Returns the resolved value.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n *\n * _.get(object, 'a[0].b.c');\n * // => 3\n *\n * _.get(object, ['a', '0', 'b', 'c']);\n * // => 3\n *\n * _.get(object, 'a.b.c', 'default');\n * // => 'default'\n */\nfunction get(object, path, defaultValue) {\n var result = object == null ? undefined : baseGet(object, path);\n return result === undefined ? defaultValue : result;\n}\n\n/**\n * Checks if `path` is a direct or inherited property of `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n * @example\n *\n * var object = _.create({ 'a': _.create({ 'b': 2 }) });\n *\n * _.hasIn(object, 'a');\n * // => true\n *\n * _.hasIn(object, 'a.b');\n * // => true\n *\n * _.hasIn(object, ['a', 'b']);\n * // => true\n *\n * _.hasIn(object, 'b');\n * // => false\n */\nfunction hasIn(object, path) {\n return object != null && hasPath(object, path, baseHasIn);\n}\n\n/**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\nfunction keys(object) {\n return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n}\n\n/**\n * This method returns the first argument it receives.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @param {*} value Any value.\n * @returns {*} Returns `value`.\n * @example\n *\n * var object = { 'a': 1 };\n *\n * console.log(_.identity(object) === object);\n * // => true\n */\nfunction identity(value) {\n return value;\n}\n\n/**\n * This method returns `undefined`.\n *\n * @static\n * @memberOf _\n * @since 2.3.0\n * @category Util\n * @example\n *\n * _.times(2, _.noop);\n * // => [undefined, undefined]\n */\nfunction noop() {\n // No operation performed.\n}\n\n/**\n * Creates a function that returns the value at `path` of a given object.\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Util\n * @param {Array|string} path The path of the property to get.\n * @returns {Function} Returns the new accessor function.\n * @example\n *\n * var objects = [\n * { 'a': { 'b': 2 } },\n * { 'a': { 'b': 1 } }\n * ];\n *\n * _.map(objects, _.property('a.b'));\n * // => [2, 1]\n *\n * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b');\n * // => [1, 2]\n */\nfunction property(path) {\n return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path);\n}\n\nmodule.exports = uniqBy;\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../webpack/buildin/global.js */ \"./node_modules/webpack/buildin/global.js\"), __webpack_require__(/*! ./../webpack/buildin/module.js */ \"./node_modules/webpack/buildin/module.js\")(module)))\n\n//# sourceURL=webpack:///./node_modules/lodash.uniqby/index.js?"); + +/***/ }), + /***/ "./node_modules/lodash.uniqueid/index.js": /*!***********************************************!*\ !*** ./node_modules/lodash.uniqueid/index.js ***! @@ -11642,7 +11653,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) * /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Channel\", function() { return Channel; });\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/objectSpread */ \"./node_modules/@babel/runtime/helpers/objectSpread.js\");\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/regenerator */ \"./node_modules/@babel/runtime/regenerator/index.js\");\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ \"./node_modules/@babel/runtime/helpers/asyncToGenerator.js\");\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ \"./node_modules/@babel/runtime/helpers/assertThisInitialized.js\");\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/extends */ \"./node_modules/@babel/runtime/helpers/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ \"./node_modules/@babel/runtime/helpers/classCallCheck.js\");\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ \"./node_modules/@babel/runtime/helpers/createClass.js\");\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ \"./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js\");\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ \"./node_modules/@babel/runtime/helpers/getPrototypeOf.js\");\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @babel/runtime/helpers/inherits */ \"./node_modules/@babel/runtime/helpers/inherits.js\");\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var _context__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../context */ \"./src/context.js\");\n/* harmony import */ var _LoadingIndicator__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./LoadingIndicator */ \"./src/components/LoadingIndicator.js\");\n/* harmony import */ var uuid_v4__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! uuid/v4 */ \"./node_modules/uuid/v4.js\");\n/* harmony import */ var uuid_v4__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(uuid_v4__WEBPACK_IMPORTED_MODULE_14__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_15__);\n/* harmony import */ var seamless_immutable__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! seamless-immutable */ \"./node_modules/seamless-immutable/seamless-immutable.development.js\");\n/* harmony import */ var seamless_immutable__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(seamless_immutable__WEBPACK_IMPORTED_MODULE_16__);\n/* harmony import */ var visibilityjs__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! visibilityjs */ \"./node_modules/visibilityjs/index.js\");\n/* harmony import */ var visibilityjs__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(visibilityjs__WEBPACK_IMPORTED_MODULE_17__);\n/* harmony import */ var stream_chat__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! stream-chat */ \"./node_modules/stream-chat/dist/browser.es.js\");\n/* harmony import */ var _MessageSimple__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./MessageSimple */ \"./src/components/MessageSimple.js\");\n/* harmony import */ var _Attachment__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./Attachment */ \"./src/components/Attachment.js\");\n/* harmony import */ var lodash_debounce__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! lodash/debounce */ \"./node_modules/lodash/debounce.js\");\n/* harmony import */ var lodash_debounce__WEBPACK_IMPORTED_MODULE_21___default = /*#__PURE__*/__webpack_require__.n(lodash_debounce__WEBPACK_IMPORTED_MODULE_21__);\n/* harmony import */ var lodash_throttle__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! lodash/throttle */ \"./node_modules/lodash/throttle.js\");\n/* harmony import */ var lodash_throttle__WEBPACK_IMPORTED_MODULE_22___default = /*#__PURE__*/__webpack_require__.n(lodash_throttle__WEBPACK_IMPORTED_MODULE_22__);\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n/**\n * Channel - Wrapper component for a channel. It needs to be place inside of the Chat component.\n * ChannelHeader, MessageList, Thread and MessageInput should be used as children of the Channel component.\n *\n * @example ./docs/Channel.md\n * @extends PureComponent\n */\n\nvar Channel =\n/*#__PURE__*/\nfunction (_PureComponent) {\n _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_9___default()(Channel, _PureComponent);\n\n function Channel(props) {\n var _this;\n\n _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_5___default()(this, Channel);\n\n _this = _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_7___default()(this, _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_8___default()(Channel).call(this, props));\n _this.state = {\n error: false\n };\n return _this;\n }\n\n _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_6___default()(Channel, [{\n key: \"render\",\n value: function render() {\n if (!this.props.channel.cid) {\n return null; //
Select a channel
;\n } // We use a wrapper to make sure the key variable is set.\n // this ensures that if you switch channel the component is recreated\n\n\n return react__WEBPACK_IMPORTED_MODULE_11___default.a.createElement(ChannelInner, _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_4___default()({}, this.props, {\n key: this.props.channel.cid\n }));\n }\n }]);\n\n return Channel;\n}(react__WEBPACK_IMPORTED_MODULE_11__[\"PureComponent\"]);\n\n_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_10___default()(Channel, \"propTypes\", {\n /** Which channel to connect to, will initialize the channel if it's not initialized yet */\n channel: prop_types__WEBPACK_IMPORTED_MODULE_15___default.a.shape({\n watch: prop_types__WEBPACK_IMPORTED_MODULE_15___default.a.func\n }).isRequired,\n\n /** Client is passed automatically via the Chat Context */\n client: prop_types__WEBPACK_IMPORTED_MODULE_15___default.a.object.isRequired,\n\n /** The loading indicator to use */\n LoadingIndicator: prop_types__WEBPACK_IMPORTED_MODULE_15___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_15___default.a.node, prop_types__WEBPACK_IMPORTED_MODULE_15___default.a.func]),\n Message: prop_types__WEBPACK_IMPORTED_MODULE_15___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_15___default.a.node, prop_types__WEBPACK_IMPORTED_MODULE_15___default.a.func]),\n Attachment: prop_types__WEBPACK_IMPORTED_MODULE_15___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_15___default.a.node, prop_types__WEBPACK_IMPORTED_MODULE_15___default.a.func]),\n\n /** Function to be called when a @mention is clicked. Function has access to the DOM event and the target user object */\n onMentionsClick: prop_types__WEBPACK_IMPORTED_MODULE_15___default.a.func,\n\n /** Function to be called when hovering over a @mention. Function has access to the DOM event and the target user object */\n onMentionsHover: prop_types__WEBPACK_IMPORTED_MODULE_15___default.a.func\n});\n\n_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_10___default()(Channel, \"defaultProps\", {\n LoadingIndicator: _LoadingIndicator__WEBPACK_IMPORTED_MODULE_13__[\"LoadingIndicator\"],\n Message: _MessageSimple__WEBPACK_IMPORTED_MODULE_19__[\"MessageSimple\"],\n Attachment: _Attachment__WEBPACK_IMPORTED_MODULE_20__[\"Attachment\"]\n});\n\nvar ChannelInner =\n/*#__PURE__*/\nfunction (_PureComponent2) {\n _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_9___default()(ChannelInner, _PureComponent2);\n\n function ChannelInner(props) {\n var _this2;\n\n _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_5___default()(this, ChannelInner);\n\n _this2 = _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_7___default()(this, _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_8___default()(ChannelInner).call(this, props));\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_10___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3___default()(_this2), \"renderLoading\", function () {\n var Loader = _this2.props.LoadingIndicator;\n return react__WEBPACK_IMPORTED_MODULE_11___default.a.createElement(Loader, {\n isLoading: true\n });\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_10___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3___default()(_this2), \"openThread\", function (message, e) {\n if (e && e.preventDefault) {\n e.preventDefault();\n }\n\n var channel = _this2.props.channel;\n var threadMessages = channel.state.threads[message.id] || [];\n\n _this2.setState({\n thread: message,\n threadMessages: threadMessages\n });\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_10___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3___default()(_this2), \"loadMoreThread\",\n /*#__PURE__*/\n _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2___default()(\n /*#__PURE__*/\n _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function _callee() {\n var channel, parentID, oldMessages, oldestMessageID, limit, queryResponse, hasMore, threadMessages;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n if (!_this2.state.threadLoadingMore) {\n _context.next = 2;\n break;\n }\n\n return _context.abrupt(\"return\");\n\n case 2:\n _this2.setState({\n threadLoadingMore: true\n });\n\n channel = _this2.props.channel;\n parentID = _this2.state.thread.id;\n oldMessages = channel.state.threads[parentID] || [];\n oldestMessageID = oldMessages[0] ? oldMessages[0].id : null;\n limit = 50;\n _context.next = 10;\n return channel.getReplies(parentID, {\n limit: limit,\n id_lt: oldestMessageID\n });\n\n case 10:\n queryResponse = _context.sent;\n hasMore = queryResponse.messages.length === limit;\n threadMessages = channel.state.threads[parentID] || []; // next set loadingMore to false so we can start asking for more data...\n\n _this2._loadMoreThreadFinishedDebounced(hasMore, threadMessages);\n\n case 14:\n case \"end\":\n return _context.stop();\n }\n }\n }, _callee);\n })));\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_10___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3___default()(_this2), \"loadMoreThreadFinished\", function (threadHasMore, threadMessages) {\n _this2.setState({\n threadLoadingMore: false,\n threadHasMore: threadHasMore,\n threadMessages: threadMessages\n });\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_10___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3___default()(_this2), \"closeThread\", function (e) {\n if (e && e.preventDefault) {\n e.preventDefault();\n }\n\n _this2.setState({\n thread: null,\n threadMessages: []\n });\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_10___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3___default()(_this2), \"updateMessage\", function (updatedMessage, extraState) {\n var channel = _this2.props.channel;\n extraState = extraState || {}; // adds the message to the local channel state..\n // this adds to both the main channel state as well as any reply threads\n\n channel.state.addMessageSorted(updatedMessage); // update the Channel component state\n\n if (_this2.state.thread && updatedMessage.parent_id) {\n extraState.threadMessages = channel.state.threads[updatedMessage.parent_id] || [];\n }\n\n _this2.setState(_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default()({\n messages: channel.state.messages\n }, extraState));\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_10___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3___default()(_this2), \"removeMessage\", function (message) {\n var channel = _this2.props.channel;\n channel.state.removeMessage(message);\n\n _this2.setState({\n messages: channel.state.messages\n });\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_10___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3___default()(_this2), \"createMessagePreview\", function (text, attachments, parent, mentioned_users) {\n // create a preview of the message\n var clientSideID = \"\".concat(_this2.props.client.userID, \"-\") + uuid_v4__WEBPACK_IMPORTED_MODULE_14___default()();\n var message = {\n text: text,\n html: text,\n __html: text,\n //id: tmpID,\n id: clientSideID,\n type: 'regular',\n status: 'sending',\n user: _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default()({\n id: _this2.props.client.userID\n }, _this2.props.client.user),\n created_at: new Date(),\n attachments: attachments,\n mentioned_users: mentioned_users,\n reactions: []\n };\n\n if (parent && parent.id) {\n message.parent_id = parent.id;\n }\n\n return message;\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_10___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3___default()(_this2), \"_sendMessage\",\n /*#__PURE__*/\n function () {\n var _ref2 = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2___default()(\n /*#__PURE__*/\n _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function _callee2(message) {\n var text, attachments, id, parent_id, mentioned_users, messageData, messageResponse;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function _callee2$(_context2) {\n while (1) {\n switch (_context2.prev = _context2.next) {\n case 0:\n text = message.text, attachments = message.attachments, id = message.id, parent_id = message.parent_id, mentioned_users = message.mentioned_users;\n messageData = {\n text: text,\n attachments: attachments,\n mentioned_users: mentioned_users,\n id: id,\n parent_id: parent_id\n };\n _context2.prev = 2;\n _context2.next = 5;\n return _this2.props.channel.sendMessage(messageData);\n\n case 5:\n messageResponse = _context2.sent;\n\n // replace it after send is completed\n if (messageResponse.message) {\n messageResponse.message.status = 'received';\n\n _this2.updateMessage(messageResponse.message);\n }\n\n _context2.next = 13;\n break;\n\n case 9:\n _context2.prev = 9;\n _context2.t0 = _context2[\"catch\"](2);\n // set the message to failed..\n message.status = 'failed';\n\n _this2.updateMessage(message);\n\n case 13:\n case \"end\":\n return _context2.stop();\n }\n }\n }, _callee2, null, [[2, 9]]);\n }));\n\n return function (_x) {\n return _ref2.apply(this, arguments);\n };\n }());\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_10___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3___default()(_this2), \"sendMessage\",\n /*#__PURE__*/\n function () {\n var _ref4 = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2___default()(\n /*#__PURE__*/\n _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function _callee3(_ref3) {\n var text, _ref3$attachments, attachments, _ref3$mentioned_users, mentioned_users, parent, messagePreview;\n\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function _callee3$(_context3) {\n while (1) {\n switch (_context3.prev = _context3.next) {\n case 0:\n text = _ref3.text, _ref3$attachments = _ref3.attachments, attachments = _ref3$attachments === void 0 ? [] : _ref3$attachments, _ref3$mentioned_users = _ref3.mentioned_users, mentioned_users = _ref3$mentioned_users === void 0 ? [] : _ref3$mentioned_users, parent = _ref3.parent;\n\n // remove error messages upon submit\n _this2.props.channel.state.filterErrorMessages(); // create a local preview message to show in the UI\n\n\n messagePreview = _this2.createMessagePreview(text, attachments, parent, mentioned_users); // first we add the message to the UI\n\n _this2.updateMessage(messagePreview, {\n messageInput: '',\n commands: [],\n userAutocomplete: []\n });\n\n _context3.next = 6;\n return _this2._sendMessage(messagePreview);\n\n case 6:\n case \"end\":\n return _context3.stop();\n }\n }\n }, _callee3);\n }));\n\n return function (_x2) {\n return _ref4.apply(this, arguments);\n };\n }());\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_10___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3___default()(_this2), \"retrySendMessage\",\n /*#__PURE__*/\n function () {\n var _ref5 = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2___default()(\n /*#__PURE__*/\n _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function _callee4(message) {\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function _callee4$(_context4) {\n while (1) {\n switch (_context4.prev = _context4.next) {\n case 0:\n // set the message status to sending\n message = message.asMutable();\n message.status = 'sending';\n\n _this2.updateMessage(message); // actually try to send the message...\n\n\n _context4.next = 5;\n return _this2._sendMessage(message);\n\n case 5:\n case \"end\":\n return _context4.stop();\n }\n }\n }, _callee4);\n }));\n\n return function (_x3) {\n return _ref5.apply(this, arguments);\n };\n }());\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_10___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3___default()(_this2), \"handleEvent\", function (e) {\n var channel = _this2.props.channel;\n var threadMessages = [];\n var threadState = {};\n\n if (_this2.state.thread) {\n threadMessages = channel.state.threads[_this2.state.thread.id] || [];\n threadState['threadMessages'] = threadMessages;\n }\n\n if (_this2.state.thread && e.message && e.message.id === _this2.state.thread.id) {\n threadState['thread'] = channel.state.messageToImmutable(e.message);\n }\n\n if (Object.keys(threadState).length > 0) {\n // TODO: in theory we should do 1 setState call not 2,\n // However the setStateThrottled doesn't support this\n _this2.setState(threadState);\n }\n\n if (e.type === 'message.new') {\n var mainChannelUpdated = true;\n\n if (e.message.parent_id && !e.message.show_in_channel) {\n mainChannelUpdated = false;\n }\n\n if (mainChannelUpdated && e.message.user.id !== _this2.props.client.userID) {\n if (visibilityjs__WEBPACK_IMPORTED_MODULE_17___default.a.state() === 'visible') {\n _this2._markReadThrottled(channel);\n } else {\n var unread = channel.countUnread(_this2.lastRead);\n document.title = \"(\".concat(unread, \") \").concat(_this2.originalTitle);\n }\n }\n }\n\n _this2._setStateThrottled({\n messages: channel.state.messages,\n watchers: channel.state.watchers,\n read: channel.state.read,\n typing: channel.state.typing,\n watcher_count: channel.state.watcher_count\n });\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_10___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3___default()(_this2), \"markRead\", function (channel) {\n if (!channel.getConfig().read_events) {\n return;\n }\n\n _this2.lastRead = new Date();\n Object(stream_chat__WEBPACK_IMPORTED_MODULE_18__[\"logChatPromiseExecution\"])(channel.markRead(), 'mark read');\n\n if (_this2.originalTitle) {\n document.title = _this2.originalTitle;\n }\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_10___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3___default()(_this2), \"loadMore\",\n /*#__PURE__*/\n _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2___default()(\n /*#__PURE__*/\n _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function _callee5() {\n var oldestID, perPage, queryResponse, hasMore;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function _callee5$(_context5) {\n while (1) {\n switch (_context5.prev = _context5.next) {\n case 0:\n if (!_this2.state.loadingMore) {\n _context5.next = 2;\n break;\n }\n\n return _context5.abrupt(\"return\");\n\n case 2:\n _this2.setState({\n loadingMore: true\n });\n\n oldestID = _this2.state.messages[0] ? _this2.state.messages[0].id : null;\n perPage = 100;\n _context5.prev = 5;\n _context5.next = 8;\n return _this2.props.channel.query({\n messages: {\n limit: perPage,\n id_lt: oldestID\n }\n });\n\n case 8:\n queryResponse = _context5.sent;\n _context5.next = 16;\n break;\n\n case 11:\n _context5.prev = 11;\n _context5.t0 = _context5[\"catch\"](5);\n console.warn('message pagination request failed with error', _context5.t0);\n\n _this2.setState({\n loadingMore: false\n });\n\n return _context5.abrupt(\"return\");\n\n case 16:\n hasMore = queryResponse.messages.length === perPage;\n\n _this2._loadMoreFinishedDebounced(hasMore, _this2.props.channel.state.messages);\n\n case 18:\n case \"end\":\n return _context5.stop();\n }\n }\n }, _callee5, null, [[5, 11]]);\n })));\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_10___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3___default()(_this2), \"_onMentionsHoverOrClick\", function (e, mentioned_users) {\n if (!_this2.props.onMentionsHover && !_this2.props.onMentionsClick) return;\n var tagName = e.target.tagName.toLowerCase();\n var textContent = e.target.innerHTML.replace('*', '');\n\n if (tagName === 'strong' && textContent[0] === '@') {\n var userName = textContent.replace('@', '');\n var user = mentioned_users.find(function (user) {\n return user.name === userName || user.id === userName;\n });\n\n if (_this2.props.onMentionsHover && typeof _this2.props.onMentionsHover === 'function' && e.type === 'mouseover') {\n _this2.props.onMentionsHover(e, user);\n }\n\n if (_this2.props.onMentionsClick && e.type === 'click' && typeof _this2.props.onMentionsClick === 'function') {\n _this2.props.onMentionsClick(e, user);\n }\n }\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_10___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3___default()(_this2), \"loadMoreFinished\", function (hasMore, messages) {\n _this2.setState({\n loadingMore: false,\n hasMore: hasMore,\n messages: messages\n });\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_10___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3___default()(_this2), \"getContext\", function () {\n return _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default()({}, _this2.state, {\n client: _this2.props.client,\n channel: _this2.props.channel,\n Message: _this2.props.Message,\n Attachment: _this2.props.Attachment,\n multipleUploads: _this2.props.multipleUploads,\n acceptedFiles: _this2.props.acceptedFiles,\n maxNumberOfFiles: _this2.props.maxNumberOfFiles,\n updateMessage: _this2.updateMessage,\n removeMessage: _this2.removeMessage,\n sendMessage: _this2.sendMessage,\n retrySendMessage: _this2.retrySendMessage,\n resetNotification: _this2.resetNotification,\n loadMore: _this2.loadMore,\n listenToScroll: _this2.listenToScroll,\n // thread related\n openThread: _this2.openThread,\n closeThread: _this2.closeThread,\n loadMoreThread: _this2.loadMoreThread,\n onMentionsClick: _this2._onMentionsHoverOrClick,\n onMentionsHover: _this2._onMentionsHoverOrClick\n });\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_10___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3___default()(_this2), \"renderComponent\", function () {\n return _this2.props.children;\n });\n\n _this2.state = {\n error: false,\n // Loading the intial content of the channel\n loading: true,\n // Loading more messages\n loadingMore: false,\n hasMore: true,\n messages: seamless_immutable__WEBPACK_IMPORTED_MODULE_16___default()([]),\n online: true,\n typing: seamless_immutable__WEBPACK_IMPORTED_MODULE_16___default()({}),\n watchers: seamless_immutable__WEBPACK_IMPORTED_MODULE_16___default()({}),\n members: seamless_immutable__WEBPACK_IMPORTED_MODULE_16___default()({}),\n read: seamless_immutable__WEBPACK_IMPORTED_MODULE_16___default()({}),\n thread: false,\n threadMessages: [],\n threadLoadingMore: false,\n threadHasMore: true\n }; // hard limit to prevent you from scrolling faster than 1 page per 2 seconds\n\n _this2._loadMoreFinishedDebounced = lodash_debounce__WEBPACK_IMPORTED_MODULE_21___default()(_this2.loadMoreFinished, 2000, {\n leading: true,\n trailing: true\n }); // hard limit to prevent you from scrolling faster than 1 page per 2 seconds\n\n _this2._loadMoreThreadFinishedDebounced = lodash_debounce__WEBPACK_IMPORTED_MODULE_21___default()(_this2.loadMoreThreadFinished, 2000, {\n leading: true,\n trailing: true\n });\n _this2._markReadThrottled = lodash_throttle__WEBPACK_IMPORTED_MODULE_22___default()(_this2.markRead, 500, {\n leading: true,\n trailing: true\n });\n _this2._setStateThrottled = lodash_throttle__WEBPACK_IMPORTED_MODULE_22___default()(_this2.setState, 500, {\n leading: true,\n trailing: true\n });\n return _this2;\n }\n\n _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_6___default()(ChannelInner, [{\n key: \"componentDidMount\",\n value: function () {\n var _componentDidMount = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2___default()(\n /*#__PURE__*/\n _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function _callee6() {\n var channel, errored;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function _callee6$(_context6) {\n while (1) {\n switch (_context6.prev = _context6.next) {\n case 0:\n channel = this.props.channel;\n errored = false;\n\n if (channel.initialized) {\n _context6.next = 12;\n break;\n }\n\n _context6.prev = 3;\n _context6.next = 6;\n return channel.watch();\n\n case 6:\n _context6.next = 12;\n break;\n\n case 8:\n _context6.prev = 8;\n _context6.t0 = _context6[\"catch\"](3);\n this.setState({\n error: true\n });\n errored = true;\n\n case 12:\n this.originalTitle = document.title;\n this.lastRead = new Date();\n\n if (!errored) {\n this.copyChannelState();\n this.listenToChanges();\n }\n\n case 15:\n case \"end\":\n return _context6.stop();\n }\n }\n }, _callee6, this, [[3, 8]]);\n }));\n\n function componentDidMount() {\n return _componentDidMount.apply(this, arguments);\n }\n\n return componentDidMount;\n }()\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n this.props.channel.off(this.handleEvent);\n\n this._loadMoreFinishedDebounced.cancel();\n\n this._loadMoreThreadFinishedDebounced.cancel();\n\n if (this.visibilityListener) {\n visibilityjs__WEBPACK_IMPORTED_MODULE_17___default.a.unbind(this.visibilityListener);\n }\n }\n }, {\n key: \"copyChannelState\",\n value: function copyChannelState() {\n var channel = this.props.channel;\n this.setState({\n messages: channel.state.messages,\n read: channel.state.read,\n watchers: channel.state.watchers,\n members: channel.state.members,\n watcher_count: channel.state.watcher_count,\n loading: false,\n typing: {}\n });\n channel.markRead();\n }\n }, {\n key: \"removeEphemeralMessages\",\n value: function removeEphemeralMessages() {\n var c = this.props.channel;\n c.state.selectRegularMessages();\n this.setState({\n messages: c.state.messages\n });\n }\n }, {\n key: \"listenToChanges\",\n value: function listenToChanges() {\n var _this3 = this;\n\n // The more complex sync logic is done in chat.js\n // listen to client.connection.recovered and all channel events\n this.props.client.on('connection.recovered', this.handleEvent);\n var channel = this.props.channel;\n channel.on(this.handleEvent);\n this.boundMarkRead = this.markRead.bind(this, channel);\n this.visibilityListener = visibilityjs__WEBPACK_IMPORTED_MODULE_17___default.a.change(function (e, state) {\n if (state === 'visible') {\n _this3.boundMarkRead();\n }\n });\n }\n }, {\n key: \"render\",\n value: function render() {\n var core;\n\n if (this.state.error) {\n core = react__WEBPACK_IMPORTED_MODULE_11___default.a.createElement(\"div\", null, \"Error: \", this.state.error.message);\n } else if (this.state.loading) {\n core = react__WEBPACK_IMPORTED_MODULE_11___default.a.createElement(_LoadingIndicator__WEBPACK_IMPORTED_MODULE_13__[\"LoadingIndicator\"], {\n size: 25,\n isLoading: true\n });\n } else if (!this.props.channel || !this.props.channel.watch) {\n core = react__WEBPACK_IMPORTED_MODULE_11___default.a.createElement(\"div\", null, \"Channel Missing\");\n } else {\n core = react__WEBPACK_IMPORTED_MODULE_11___default.a.createElement(_context__WEBPACK_IMPORTED_MODULE_12__[\"ChannelContext\"].Provider, {\n value: this.getContext()\n }, react__WEBPACK_IMPORTED_MODULE_11___default.a.createElement(\"div\", {\n className: \"str-chat__container\"\n }, this.renderComponent()));\n }\n\n return react__WEBPACK_IMPORTED_MODULE_11___default.a.createElement(\"div\", {\n className: \"str-chat str-chat-channel \".concat(this.props.theme)\n }, core);\n }\n }]);\n\n return ChannelInner;\n}(react__WEBPACK_IMPORTED_MODULE_11__[\"PureComponent\"]);\n\n_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_10___default()(ChannelInner, \"propTypes\", {\n /** Which channel to connect to */\n channel: prop_types__WEBPACK_IMPORTED_MODULE_15___default.a.shape({\n watch: prop_types__WEBPACK_IMPORTED_MODULE_15___default.a.func\n }).isRequired,\n\n /** Client is passed via the Chat Context */\n client: prop_types__WEBPACK_IMPORTED_MODULE_15___default.a.object.isRequired,\n\n /** The loading indicator to use */\n LoadingIndicator: prop_types__WEBPACK_IMPORTED_MODULE_15___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_15___default.a.node, prop_types__WEBPACK_IMPORTED_MODULE_15___default.a.func])\n});\n\nChannel = Object(_context__WEBPACK_IMPORTED_MODULE_12__[\"withChatContext\"])(Channel);\n\n\n//# sourceURL=webpack:///./src/components/Channel.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Channel\", function() { return Channel; });\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/objectSpread */ \"./node_modules/@babel/runtime/helpers/objectSpread.js\");\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/regenerator */ \"./node_modules/@babel/runtime/regenerator/index.js\");\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ \"./node_modules/@babel/runtime/helpers/asyncToGenerator.js\");\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ \"./node_modules/@babel/runtime/helpers/assertThisInitialized.js\");\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/extends */ \"./node_modules/@babel/runtime/helpers/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ \"./node_modules/@babel/runtime/helpers/classCallCheck.js\");\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ \"./node_modules/@babel/runtime/helpers/createClass.js\");\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ \"./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js\");\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ \"./node_modules/@babel/runtime/helpers/getPrototypeOf.js\");\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @babel/runtime/helpers/inherits */ \"./node_modules/@babel/runtime/helpers/inherits.js\");\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var _context__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../context */ \"./src/context.js\");\n/* harmony import */ var _LoadingIndicator__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./LoadingIndicator */ \"./src/components/LoadingIndicator.js\");\n/* harmony import */ var uuid_v4__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! uuid/v4 */ \"./node_modules/uuid/v4.js\");\n/* harmony import */ var uuid_v4__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(uuid_v4__WEBPACK_IMPORTED_MODULE_14__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_15__);\n/* harmony import */ var seamless_immutable__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! seamless-immutable */ \"./node_modules/seamless-immutable/seamless-immutable.development.js\");\n/* harmony import */ var seamless_immutable__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(seamless_immutable__WEBPACK_IMPORTED_MODULE_16__);\n/* harmony import */ var visibilityjs__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! visibilityjs */ \"./node_modules/visibilityjs/index.js\");\n/* harmony import */ var visibilityjs__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(visibilityjs__WEBPACK_IMPORTED_MODULE_17__);\n/* harmony import */ var stream_chat__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! stream-chat */ \"./node_modules/stream-chat/dist/browser.es.js\");\n/* harmony import */ var _MessageSimple__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./MessageSimple */ \"./src/components/MessageSimple.js\");\n/* harmony import */ var _Attachment__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./Attachment */ \"./src/components/Attachment.js\");\n/* harmony import */ var lodash_debounce__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! lodash/debounce */ \"./node_modules/lodash/debounce.js\");\n/* harmony import */ var lodash_debounce__WEBPACK_IMPORTED_MODULE_21___default = /*#__PURE__*/__webpack_require__.n(lodash_debounce__WEBPACK_IMPORTED_MODULE_21__);\n/* harmony import */ var lodash_throttle__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! lodash/throttle */ \"./node_modules/lodash/throttle.js\");\n/* harmony import */ var lodash_throttle__WEBPACK_IMPORTED_MODULE_22___default = /*#__PURE__*/__webpack_require__.n(lodash_throttle__WEBPACK_IMPORTED_MODULE_22__);\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n/**\n * Channel - Wrapper component for a channel. It needs to be place inside of the Chat component.\n * ChannelHeader, MessageList, Thread and MessageInput should be used as children of the Channel component.\n *\n * @example ./docs/Channel.md\n * @extends PureComponent\n */\n\nvar Channel =\n/*#__PURE__*/\nfunction (_PureComponent) {\n _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_9___default()(Channel, _PureComponent);\n\n function Channel(props) {\n var _this;\n\n _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_5___default()(this, Channel);\n\n _this = _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_7___default()(this, _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_8___default()(Channel).call(this, props));\n _this.state = {\n error: false\n };\n return _this;\n }\n\n _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_6___default()(Channel, [{\n key: \"render\",\n value: function render() {\n if (!this.props.channel.cid) {\n return null; //
Select a channel
;\n } // We use a wrapper to make sure the key variable is set.\n // this ensures that if you switch channel the component is recreated\n\n\n return react__WEBPACK_IMPORTED_MODULE_11___default.a.createElement(ChannelInner, _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_4___default()({}, this.props, {\n key: this.props.channel.cid\n }));\n }\n }]);\n\n return Channel;\n}(react__WEBPACK_IMPORTED_MODULE_11__[\"PureComponent\"]);\n\n_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_10___default()(Channel, \"propTypes\", {\n /** Which channel to connect to, will initialize the channel if it's not initialized yet */\n channel: prop_types__WEBPACK_IMPORTED_MODULE_15___default.a.shape({\n watch: prop_types__WEBPACK_IMPORTED_MODULE_15___default.a.func\n }).isRequired,\n\n /** Client is passed automatically via the Chat Context */\n client: prop_types__WEBPACK_IMPORTED_MODULE_15___default.a.object.isRequired,\n\n /** The loading indicator to use */\n LoadingIndicator: prop_types__WEBPACK_IMPORTED_MODULE_15___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_15___default.a.node, prop_types__WEBPACK_IMPORTED_MODULE_15___default.a.func]),\n Message: prop_types__WEBPACK_IMPORTED_MODULE_15___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_15___default.a.node, prop_types__WEBPACK_IMPORTED_MODULE_15___default.a.func]),\n Attachment: prop_types__WEBPACK_IMPORTED_MODULE_15___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_15___default.a.node, prop_types__WEBPACK_IMPORTED_MODULE_15___default.a.func]),\n\n /** Function to be called when a @mention is clicked. Function has access to the DOM event and the target user object */\n onMentionsClick: prop_types__WEBPACK_IMPORTED_MODULE_15___default.a.func,\n\n /** Function to be called when hovering over a @mention. Function has access to the DOM event and the target user object */\n onMentionsHover: prop_types__WEBPACK_IMPORTED_MODULE_15___default.a.func\n});\n\n_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_10___default()(Channel, \"defaultProps\", {\n LoadingIndicator: _LoadingIndicator__WEBPACK_IMPORTED_MODULE_13__[\"LoadingIndicator\"],\n Message: _MessageSimple__WEBPACK_IMPORTED_MODULE_19__[\"MessageSimple\"],\n Attachment: _Attachment__WEBPACK_IMPORTED_MODULE_20__[\"Attachment\"]\n});\n\nvar ChannelInner =\n/*#__PURE__*/\nfunction (_PureComponent2) {\n _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_9___default()(ChannelInner, _PureComponent2);\n\n function ChannelInner(props) {\n var _this2;\n\n _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_5___default()(this, ChannelInner);\n\n _this2 = _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_7___default()(this, _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_8___default()(ChannelInner).call(this, props));\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_10___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3___default()(_this2), \"renderLoading\", function () {\n var Loader = _this2.props.LoadingIndicator;\n return react__WEBPACK_IMPORTED_MODULE_11___default.a.createElement(Loader, {\n isLoading: true\n });\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_10___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3___default()(_this2), \"openThread\", function (message, e) {\n if (e && e.preventDefault) {\n e.preventDefault();\n }\n\n var channel = _this2.props.channel;\n var threadMessages = channel.state.threads[message.id] || [];\n\n _this2.setState({\n thread: message,\n threadMessages: threadMessages\n });\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_10___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3___default()(_this2), \"loadMoreThread\",\n /*#__PURE__*/\n _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2___default()(\n /*#__PURE__*/\n _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function _callee() {\n var channel, parentID, oldMessages, oldestMessageID, limit, queryResponse, hasMore, threadMessages;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n if (!_this2.state.threadLoadingMore) {\n _context.next = 2;\n break;\n }\n\n return _context.abrupt(\"return\");\n\n case 2:\n _this2.setState({\n threadLoadingMore: true\n });\n\n channel = _this2.props.channel;\n parentID = _this2.state.thread.id;\n oldMessages = channel.state.threads[parentID] || [];\n oldestMessageID = oldMessages[0] ? oldMessages[0].id : null;\n limit = 50;\n _context.next = 10;\n return channel.getReplies(parentID, {\n limit: limit,\n id_lt: oldestMessageID\n });\n\n case 10:\n queryResponse = _context.sent;\n hasMore = queryResponse.messages.length === limit;\n threadMessages = channel.state.threads[parentID] || []; // next set loadingMore to false so we can start asking for more data...\n\n _this2._loadMoreThreadFinishedDebounced(hasMore, threadMessages);\n\n case 14:\n case \"end\":\n return _context.stop();\n }\n }\n }, _callee);\n })));\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_10___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3___default()(_this2), \"loadMoreThreadFinished\", function (threadHasMore, threadMessages) {\n _this2.setState({\n threadLoadingMore: false,\n threadHasMore: threadHasMore,\n threadMessages: threadMessages\n });\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_10___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3___default()(_this2), \"closeThread\", function (e) {\n if (e && e.preventDefault) {\n e.preventDefault();\n }\n\n _this2.setState({\n thread: null,\n threadMessages: []\n });\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_10___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3___default()(_this2), \"updateMessage\", function (updatedMessage, extraState) {\n var channel = _this2.props.channel;\n extraState = extraState || {}; // adds the message to the local channel state..\n // this adds to both the main channel state as well as any reply threads\n\n channel.state.addMessageSorted(updatedMessage); // update the Channel component state\n\n if (_this2.state.thread && updatedMessage.parent_id) {\n extraState.threadMessages = channel.state.threads[updatedMessage.parent_id] || [];\n }\n\n _this2.setState(_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default()({\n messages: channel.state.messages\n }, extraState));\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_10___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3___default()(_this2), \"removeMessage\", function (message) {\n var channel = _this2.props.channel;\n channel.state.removeMessage(message);\n\n _this2.setState({\n messages: channel.state.messages\n });\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_10___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3___default()(_this2), \"createMessagePreview\", function (text, attachments, parent, mentioned_users) {\n // create a preview of the message\n var clientSideID = \"\".concat(_this2.props.client.userID, \"-\") + uuid_v4__WEBPACK_IMPORTED_MODULE_14___default()();\n var message = {\n text: text,\n html: text,\n __html: text,\n //id: tmpID,\n id: clientSideID,\n type: 'regular',\n status: 'sending',\n user: _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default()({\n id: _this2.props.client.userID\n }, _this2.props.client.user),\n created_at: new Date(),\n attachments: attachments,\n mentioned_users: mentioned_users,\n reactions: []\n };\n\n if (parent && parent.id) {\n message.parent_id = parent.id;\n }\n\n return message;\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_10___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3___default()(_this2), \"_sendMessage\",\n /*#__PURE__*/\n function () {\n var _ref2 = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2___default()(\n /*#__PURE__*/\n _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function _callee2(message) {\n var text, attachments, id, parent_id, mentioned_users, messageData, messageResponse;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function _callee2$(_context2) {\n while (1) {\n switch (_context2.prev = _context2.next) {\n case 0:\n text = message.text, attachments = message.attachments, id = message.id, parent_id = message.parent_id, mentioned_users = message.mentioned_users;\n messageData = {\n text: text,\n attachments: attachments,\n mentioned_users: mentioned_users,\n id: id,\n parent_id: parent_id\n };\n _context2.prev = 2;\n _context2.next = 5;\n return _this2.props.channel.sendMessage(messageData);\n\n case 5:\n messageResponse = _context2.sent;\n\n // replace it after send is completed\n if (messageResponse.message) {\n messageResponse.message.status = 'received';\n\n _this2.updateMessage(messageResponse.message);\n }\n\n _context2.next = 13;\n break;\n\n case 9:\n _context2.prev = 9;\n _context2.t0 = _context2[\"catch\"](2);\n // set the message to failed..\n message.status = 'failed';\n\n _this2.updateMessage(message);\n\n case 13:\n case \"end\":\n return _context2.stop();\n }\n }\n }, _callee2, null, [[2, 9]]);\n }));\n\n return function (_x) {\n return _ref2.apply(this, arguments);\n };\n }());\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_10___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3___default()(_this2), \"sendMessage\",\n /*#__PURE__*/\n function () {\n var _ref4 = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2___default()(\n /*#__PURE__*/\n _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function _callee3(_ref3) {\n var text, _ref3$attachments, attachments, _ref3$mentioned_users, mentioned_users, parent, messagePreview;\n\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function _callee3$(_context3) {\n while (1) {\n switch (_context3.prev = _context3.next) {\n case 0:\n text = _ref3.text, _ref3$attachments = _ref3.attachments, attachments = _ref3$attachments === void 0 ? [] : _ref3$attachments, _ref3$mentioned_users = _ref3.mentioned_users, mentioned_users = _ref3$mentioned_users === void 0 ? [] : _ref3$mentioned_users, parent = _ref3.parent;\n\n // remove error messages upon submit\n _this2.props.channel.state.filterErrorMessages(); // create a local preview message to show in the UI\n\n\n messagePreview = _this2.createMessagePreview(text, attachments, parent, mentioned_users); // first we add the message to the UI\n\n _this2.updateMessage(messagePreview, {\n messageInput: '',\n commands: [],\n userAutocomplete: []\n });\n\n _context3.next = 6;\n return _this2._sendMessage(messagePreview);\n\n case 6:\n case \"end\":\n return _context3.stop();\n }\n }\n }, _callee3);\n }));\n\n return function (_x2) {\n return _ref4.apply(this, arguments);\n };\n }());\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_10___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3___default()(_this2), \"retrySendMessage\",\n /*#__PURE__*/\n function () {\n var _ref5 = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2___default()(\n /*#__PURE__*/\n _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function _callee4(message) {\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function _callee4$(_context4) {\n while (1) {\n switch (_context4.prev = _context4.next) {\n case 0:\n // set the message status to sending\n message = message.asMutable();\n message.status = 'sending';\n\n _this2.updateMessage(message); // actually try to send the message...\n\n\n _context4.next = 5;\n return _this2._sendMessage(message);\n\n case 5:\n case \"end\":\n return _context4.stop();\n }\n }\n }, _callee4);\n }));\n\n return function (_x3) {\n return _ref5.apply(this, arguments);\n };\n }());\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_10___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3___default()(_this2), \"handleEvent\", function (e) {\n var channel = _this2.props.channel;\n var threadMessages = [];\n var threadState = {};\n\n if (_this2.state.thread) {\n threadMessages = channel.state.threads[_this2.state.thread.id] || [];\n threadState['threadMessages'] = threadMessages;\n }\n\n if (_this2.state.thread && e.message && e.message.id === _this2.state.thread.id) {\n threadState['thread'] = channel.state.messageToImmutable(e.message);\n }\n\n if (Object.keys(threadState).length > 0) {\n // TODO: in theory we should do 1 setState call not 2,\n // However the setStateThrottled doesn't support this\n _this2.setState(threadState);\n }\n\n if (e.type === 'message.new') {\n var mainChannelUpdated = true;\n\n if (e.message.parent_id && !e.message.show_in_channel) {\n mainChannelUpdated = false;\n }\n\n if (mainChannelUpdated && e.message.user.id !== _this2.props.client.userID) {\n if (visibilityjs__WEBPACK_IMPORTED_MODULE_17___default.a.state() === 'visible') {\n _this2._markReadThrottled(channel);\n } else {\n var unread = channel.countUnread(_this2.lastRead);\n document.title = \"(\".concat(unread, \") \").concat(_this2.originalTitle);\n }\n }\n }\n\n _this2._setStateThrottled({\n messages: channel.state.messages,\n watchers: channel.state.watchers,\n read: channel.state.read,\n typing: channel.state.typing,\n watcher_count: channel.state.watcher_count\n });\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_10___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3___default()(_this2), \"markRead\", function (channel) {\n if (!channel.getConfig().read_events) {\n return;\n }\n\n _this2.lastRead = new Date();\n Object(stream_chat__WEBPACK_IMPORTED_MODULE_18__[\"logChatPromiseExecution\"])(channel.markRead(), 'mark read');\n\n if (_this2.originalTitle) {\n document.title = _this2.originalTitle;\n }\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_10___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3___default()(_this2), \"loadMore\",\n /*#__PURE__*/\n _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2___default()(\n /*#__PURE__*/\n _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function _callee5() {\n var oldestID, perPage, queryResponse, hasMore;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function _callee5$(_context5) {\n while (1) {\n switch (_context5.prev = _context5.next) {\n case 0:\n if (!_this2.state.loadingMore) {\n _context5.next = 2;\n break;\n }\n\n return _context5.abrupt(\"return\");\n\n case 2:\n _this2.setState({\n loadingMore: true\n });\n\n oldestID = _this2.state.messages[0] ? _this2.state.messages[0].id : null;\n perPage = 100;\n _context5.prev = 5;\n _context5.next = 8;\n return _this2.props.channel.query({\n messages: {\n limit: perPage,\n id_lt: oldestID\n }\n });\n\n case 8:\n queryResponse = _context5.sent;\n _context5.next = 16;\n break;\n\n case 11:\n _context5.prev = 11;\n _context5.t0 = _context5[\"catch\"](5);\n console.warn('message pagination request failed with error', _context5.t0);\n\n _this2.setState({\n loadingMore: false\n });\n\n return _context5.abrupt(\"return\");\n\n case 16:\n hasMore = queryResponse.messages.length === perPage;\n\n _this2._loadMoreFinishedDebounced(hasMore, _this2.props.channel.state.messages);\n\n case 18:\n case \"end\":\n return _context5.stop();\n }\n }\n }, _callee5, null, [[5, 11]]);\n })));\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_10___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3___default()(_this2), \"_onMentionsHoverOrClick\", function (e, mentioned_users) {\n if (!_this2.props.onMentionsHover && !_this2.props.onMentionsClick) return;\n var tagName = e.target.tagName.toLowerCase();\n var textContent = e.target.innerHTML.replace('*', '');\n\n if (tagName === 'strong' && textContent[0] === '@') {\n var userName = textContent.replace('@', '');\n var user = mentioned_users.find(function (user) {\n return user.name === userName || user.id === userName;\n });\n\n if (_this2.props.onMentionsHover && typeof _this2.props.onMentionsHover === 'function' && e.type === 'mouseover') {\n _this2.props.onMentionsHover(e, user);\n }\n\n if (_this2.props.onMentionsClick && e.type === 'click' && typeof _this2.props.onMentionsClick === 'function') {\n _this2.props.onMentionsClick(e, user);\n }\n }\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_10___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3___default()(_this2), \"loadMoreFinished\", function (hasMore, messages) {\n _this2.setState({\n loadingMore: false,\n hasMore: hasMore,\n messages: messages\n });\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_10___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3___default()(_this2), \"getContext\", function () {\n return _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default()({}, _this2.state, {\n client: _this2.props.client,\n channel: _this2.props.channel,\n Message: _this2.props.Message,\n Attachment: _this2.props.Attachment,\n multipleUploads: _this2.props.multipleUploads,\n acceptedFiles: _this2.props.acceptedFiles,\n maxNumberOfFiles: _this2.props.maxNumberOfFiles,\n updateMessage: _this2.updateMessage,\n removeMessage: _this2.removeMessage,\n sendMessage: _this2.sendMessage,\n retrySendMessage: _this2.retrySendMessage,\n resetNotification: _this2.resetNotification,\n loadMore: _this2.loadMore,\n listenToScroll: _this2.listenToScroll,\n // thread related\n openThread: _this2.openThread,\n closeThread: _this2.closeThread,\n loadMoreThread: _this2.loadMoreThread,\n onMentionsClick: _this2._onMentionsHoverOrClick,\n onMentionsHover: _this2._onMentionsHoverOrClick\n });\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_10___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3___default()(_this2), \"renderComponent\", function () {\n return _this2.props.children;\n });\n\n _this2.state = {\n error: false,\n // Loading the intial content of the channel\n loading: true,\n // Loading more messages\n loadingMore: false,\n hasMore: true,\n messages: seamless_immutable__WEBPACK_IMPORTED_MODULE_16___default()([]),\n online: true,\n typing: seamless_immutable__WEBPACK_IMPORTED_MODULE_16___default()({}),\n watchers: seamless_immutable__WEBPACK_IMPORTED_MODULE_16___default()({}),\n members: seamless_immutable__WEBPACK_IMPORTED_MODULE_16___default()({}),\n read: seamless_immutable__WEBPACK_IMPORTED_MODULE_16___default()({}),\n thread: false,\n threadMessages: [],\n threadLoadingMore: false,\n threadHasMore: true\n }; // hard limit to prevent you from scrolling faster than 1 page per 2 seconds\n\n _this2._loadMoreFinishedDebounced = lodash_debounce__WEBPACK_IMPORTED_MODULE_21___default()(_this2.loadMoreFinished, 2000, {\n leading: true,\n trailing: true\n }); // hard limit to prevent you from scrolling faster than 1 page per 2 seconds\n\n _this2._loadMoreThreadFinishedDebounced = lodash_debounce__WEBPACK_IMPORTED_MODULE_21___default()(_this2.loadMoreThreadFinished, 2000, {\n leading: true,\n trailing: true\n });\n _this2._markReadThrottled = lodash_throttle__WEBPACK_IMPORTED_MODULE_22___default()(_this2.markRead, 500, {\n leading: true,\n trailing: true\n });\n _this2._setStateThrottled = lodash_throttle__WEBPACK_IMPORTED_MODULE_22___default()(_this2.setState, 500, {\n leading: true,\n trailing: true\n });\n return _this2;\n }\n\n _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_6___default()(ChannelInner, [{\n key: \"componentDidMount\",\n value: function () {\n var _componentDidMount = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2___default()(\n /*#__PURE__*/\n _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function _callee6() {\n var channel, errored;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function _callee6$(_context6) {\n while (1) {\n switch (_context6.prev = _context6.next) {\n case 0:\n channel = this.props.channel;\n errored = false;\n\n if (channel.initialized) {\n _context6.next = 12;\n break;\n }\n\n _context6.prev = 3;\n _context6.next = 6;\n return channel.watch();\n\n case 6:\n _context6.next = 12;\n break;\n\n case 8:\n _context6.prev = 8;\n _context6.t0 = _context6[\"catch\"](3);\n this.setState({\n error: true\n });\n errored = true;\n\n case 12:\n this.originalTitle = document.title;\n this.lastRead = new Date();\n\n if (!errored) {\n this.copyChannelState();\n this.listenToChanges();\n }\n\n case 15:\n case \"end\":\n return _context6.stop();\n }\n }\n }, _callee6, this, [[3, 8]]);\n }));\n\n function componentDidMount() {\n return _componentDidMount.apply(this, arguments);\n }\n\n return componentDidMount;\n }()\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n this.props.client.off('connection.recovered', this.handleEvent);\n this.props.channel.off(this.handleEvent);\n\n this._loadMoreFinishedDebounced.cancel();\n\n this._loadMoreThreadFinishedDebounced.cancel();\n\n if (this.visibilityListener) {\n visibilityjs__WEBPACK_IMPORTED_MODULE_17___default.a.unbind(this.visibilityListener);\n }\n }\n }, {\n key: \"copyChannelState\",\n value: function copyChannelState() {\n var channel = this.props.channel;\n this.setState({\n messages: channel.state.messages,\n read: channel.state.read,\n watchers: channel.state.watchers,\n members: channel.state.members,\n watcher_count: channel.state.watcher_count,\n loading: false,\n typing: {}\n });\n channel.markRead();\n }\n }, {\n key: \"removeEphemeralMessages\",\n value: function removeEphemeralMessages() {\n var c = this.props.channel;\n c.state.selectRegularMessages();\n this.setState({\n messages: c.state.messages\n });\n }\n }, {\n key: \"listenToChanges\",\n value: function listenToChanges() {\n var _this3 = this;\n\n // The more complex sync logic is done in chat.js\n // listen to client.connection.recovered and all channel events\n this.props.client.on('connection.recovered', this.handleEvent);\n var channel = this.props.channel;\n channel.on(this.handleEvent);\n this.boundMarkRead = this.markRead.bind(this, channel);\n this.visibilityListener = visibilityjs__WEBPACK_IMPORTED_MODULE_17___default.a.change(function (e, state) {\n if (state === 'visible') {\n _this3.boundMarkRead();\n }\n });\n }\n }, {\n key: \"render\",\n value: function render() {\n var core;\n\n if (this.state.error) {\n core = react__WEBPACK_IMPORTED_MODULE_11___default.a.createElement(\"div\", null, \"Error: \", this.state.error.message);\n } else if (this.state.loading) {\n core = react__WEBPACK_IMPORTED_MODULE_11___default.a.createElement(_LoadingIndicator__WEBPACK_IMPORTED_MODULE_13__[\"LoadingIndicator\"], {\n size: 25,\n isLoading: true\n });\n } else if (!this.props.channel || !this.props.channel.watch) {\n core = react__WEBPACK_IMPORTED_MODULE_11___default.a.createElement(\"div\", null, \"Channel Missing\");\n } else {\n core = react__WEBPACK_IMPORTED_MODULE_11___default.a.createElement(_context__WEBPACK_IMPORTED_MODULE_12__[\"ChannelContext\"].Provider, {\n value: this.getContext()\n }, react__WEBPACK_IMPORTED_MODULE_11___default.a.createElement(\"div\", {\n className: \"str-chat__container\"\n }, this.renderComponent()));\n }\n\n return react__WEBPACK_IMPORTED_MODULE_11___default.a.createElement(\"div\", {\n className: \"str-chat str-chat-channel \".concat(this.props.theme)\n }, core);\n }\n }]);\n\n return ChannelInner;\n}(react__WEBPACK_IMPORTED_MODULE_11__[\"PureComponent\"]);\n\n_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_10___default()(ChannelInner, \"propTypes\", {\n /** Which channel to connect to */\n channel: prop_types__WEBPACK_IMPORTED_MODULE_15___default.a.shape({\n watch: prop_types__WEBPACK_IMPORTED_MODULE_15___default.a.func\n }).isRequired,\n\n /** Client is passed via the Chat Context */\n client: prop_types__WEBPACK_IMPORTED_MODULE_15___default.a.object.isRequired,\n\n /** The loading indicator to use */\n LoadingIndicator: prop_types__WEBPACK_IMPORTED_MODULE_15___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_15___default.a.node, prop_types__WEBPACK_IMPORTED_MODULE_15___default.a.func])\n});\n\nChannel = Object(_context__WEBPACK_IMPORTED_MODULE_12__[\"withChatContext\"])(Channel);\n\n\n//# sourceURL=webpack:///./src/components/Channel.js?"); /***/ }), @@ -11666,7 +11677,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) * /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"ChannelList\", function() { return ChannelList; });\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/regenerator */ \"./node_modules/@babel/runtime/regenerator/index.js\");\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ \"./node_modules/@babel/runtime/helpers/toConsumableArray.js\");\n/* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/objectSpread */ \"./node_modules/@babel/runtime/helpers/objectSpread.js\");\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ \"./node_modules/@babel/runtime/helpers/asyncToGenerator.js\");\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ \"./node_modules/@babel/runtime/helpers/classCallCheck.js\");\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ \"./node_modules/@babel/runtime/helpers/createClass.js\");\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ \"./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js\");\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ \"./node_modules/@babel/runtime/helpers/getPrototypeOf.js\");\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ \"./node_modules/@babel/runtime/helpers/assertThisInitialized.js\");\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @babel/runtime/helpers/inherits */ \"./node_modules/@babel/runtime/helpers/inherits.js\");\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_12__);\n/* harmony import */ var seamless_immutable__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! seamless-immutable */ \"./node_modules/seamless-immutable/seamless-immutable.development.js\");\n/* harmony import */ var seamless_immutable__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(seamless_immutable__WEBPACK_IMPORTED_MODULE_13__);\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../utils */ \"./src/utils.js\");\n/* harmony import */ var _ChannelPreviewLastMessage__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./ChannelPreviewLastMessage */ \"./src/components/ChannelPreviewLastMessage.js\");\n/* harmony import */ var _ChannelPreview__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./ChannelPreview */ \"./src/components/ChannelPreview.js\");\n/* harmony import */ var _LoadingIndicator__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./LoadingIndicator */ \"./src/components/LoadingIndicator.js\");\n/* harmony import */ var _LoadMorePaginator__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./LoadMorePaginator */ \"./src/components/LoadMorePaginator.js\");\n/* harmony import */ var _context__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../context */ \"./src/context.js\");\n/* harmony import */ var _ChannelListTeam__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./ChannelListTeam */ \"./src/components/ChannelListTeam.js\");\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n/**\n * ChannelList - A preview list of channels, allowing you to select the channel you want to open\n * @extends PureComponent\n * @example ./docs/ChannelList.md\n */\n\nvar ChannelList =\n/*#__PURE__*/\nfunction (_PureComponent) {\n _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_9___default()(ChannelList, _PureComponent);\n\n function ChannelList(props) {\n var _this;\n\n _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_4___default()(this, ChannelList);\n\n _this = _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_6___default()(this, _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_7___default()(ChannelList).call(this, props));\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_10___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_this), \"queryChannels\",\n /*#__PURE__*/\n _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_3___default()(\n /*#__PURE__*/\n _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee() {\n var _this$props, options, filters, sort, offset, newOptions, channelPromise, channelQueryResponse;\n\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n _this$props = _this.props, options = _this$props.options, filters = _this$props.filters, sort = _this$props.sort;\n offset = _this.state.offset;\n\n _this.setState({\n refreshing: true\n });\n\n newOptions = _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_2___default()({}, options);\n if (!options.limit) newOptions.limit = 30;\n channelPromise = _this.props.client.queryChannels(filters, sort, _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_2___default()({}, newOptions, {\n offset: offset\n }));\n _context.prev = 6;\n channelQueryResponse = channelPromise;\n\n if (!Object(_utils__WEBPACK_IMPORTED_MODULE_14__[\"isPromise\"])(channelQueryResponse)) {\n _context.next = 13;\n break;\n }\n\n _context.next = 11;\n return channelPromise;\n\n case 11:\n channelQueryResponse = _context.sent;\n\n if (offset === 0 && channelQueryResponse.length >= 1) {\n _this.props.setActiveChannel(channelQueryResponse[0]);\n }\n\n case 13:\n _this.setState(function (prevState) {\n var channels = [].concat(_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_1___default()(prevState.channels), _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_1___default()(channelQueryResponse));\n return {\n channels: channels,\n // not unique somehow needs more checking\n loadingChannels: false,\n offset: channels.length,\n hasNextPage: channelQueryResponse.length >= newOptions.limit ? true : false,\n refreshing: false\n };\n });\n\n _context.next = 20;\n break;\n\n case 16:\n _context.prev = 16;\n _context.t0 = _context[\"catch\"](6);\n console.warn(_context.t0);\n\n _this.setState({\n error: true,\n refreshing: false\n });\n\n case 20:\n case \"end\":\n return _context.stop();\n }\n }\n }, _callee, null, [[6, 16]]);\n })));\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_10___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_this), \"handleEvent\",\n /*#__PURE__*/\n function () {\n var _ref2 = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_3___default()(\n /*#__PURE__*/\n _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee2(e) {\n var channel, _channel;\n\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function _callee2$(_context2) {\n while (1) {\n switch (_context2.prev = _context2.next) {\n case 0:\n if (e.type === 'message.new') {\n _this.moveChannelUp(e.cid);\n } // move channel to start\n\n\n if (!(e.type === 'notification.message_new')) {\n _context2.next = 6;\n break;\n }\n\n _context2.next = 4;\n return _this.getChannel(e.cid);\n\n case 4:\n channel = _context2.sent;\n\n // move channel to starting position\n _this.setState(function (prevState) {\n return {\n channels: [].concat(_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_1___default()(channel), _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_1___default()(prevState.channels))\n };\n });\n\n case 6:\n if (!(e.type === 'notification.added_to_channel')) {\n _context2.next = 15;\n break;\n }\n\n if (!(_this.props.onAddedToChannel && typeof _this.props.onAddedToChannel === 'function')) {\n _context2.next = 11;\n break;\n }\n\n _this.props.onAddedToChannel(e);\n\n _context2.next = 15;\n break;\n\n case 11:\n _context2.next = 13;\n return _this.getChannel(e.channel.cid);\n\n case 13:\n _channel = _context2.sent;\n\n _this.setState(function (prevState) {\n return {\n channels: [].concat(_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_1___default()(_channel), _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_1___default()(prevState.channels))\n };\n });\n\n case 15:\n // remove from channel\n if (e.type === 'notification.removed_from_channel') {\n if (_this.props.onRemovedFromChannel && typeof _this.props.onRemovedFromChannel === 'function') {\n _this.props.onRemovedFromChannel(e);\n } else {\n _this.setState(function (prevState) {\n var channels = prevState.channels.filter(function (channel) {\n return channel.cid !== e.channel.cid;\n });\n return {\n channels: channels\n };\n });\n }\n }\n\n return _context2.abrupt(\"return\", null);\n\n case 17:\n case \"end\":\n return _context2.stop();\n }\n }\n }, _callee2);\n }));\n\n return function (_x) {\n return _ref2.apply(this, arguments);\n };\n }());\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_10___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_this), \"getChannel\",\n /*#__PURE__*/\n function () {\n var _ref3 = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_3___default()(\n /*#__PURE__*/\n _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee3(cid) {\n var channelPromise, channelQueryResponse;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function _callee3$(_context3) {\n while (1) {\n switch (_context3.prev = _context3.next) {\n case 0:\n channelPromise = _this.props.client.queryChannels({\n cid: cid\n });\n _context3.prev = 1;\n channelQueryResponse = channelPromise;\n\n if (!Object(_utils__WEBPACK_IMPORTED_MODULE_14__[\"isPromise\"])(channelQueryResponse)) {\n _context3.next = 7;\n break;\n }\n\n _context3.next = 6;\n return channelPromise;\n\n case 6:\n channelQueryResponse = _context3.sent;\n\n case 7:\n return _context3.abrupt(\"return\", channelQueryResponse);\n\n case 10:\n _context3.prev = 10;\n _context3.t0 = _context3[\"catch\"](1);\n console.warn(_context3.t0);\n\n case 13:\n case \"end\":\n return _context3.stop();\n }\n }\n }, _callee3, null, [[1, 10]]);\n }));\n\n return function (_x2) {\n return _ref3.apply(this, arguments);\n };\n }());\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_10___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_this), \"moveChannelUp\", function (cid) {\n var channels = _this.state.channels; // get channel index\n\n var channelIndex = _this.state.channels.findIndex(function (channel) {\n return channel.cid === cid;\n });\n\n if (channelIndex === 0) return; // get channel from channels\n\n var channel = channels[channelIndex]; //remove channel from current position\n\n channels.splice(channelIndex, 1); //add channel at the start\n\n channels.unshift(channel); // set new channel state\n\n _this.setState({\n channels: _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_1___default()(channels)\n });\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_10___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_this), \"loadNextPage\", function () {\n _this.queryChannels();\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_10___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_this), \"closeMenu\", function () {\n _this.menuButton.current.checked = false;\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_10___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_this), \"_renderChannel\", function (item) {\n var _this$props2 = _this.props,\n Preview = _this$props2.Preview,\n setActiveChannel = _this$props2.setActiveChannel,\n channel = _this$props2.channel;\n var args = {\n channel: item,\n activeChannel: channel,\n closeMenu: _this.closeMenu,\n Preview: Preview,\n setActiveChannel: setActiveChannel,\n key: item.id\n };\n return Object(_utils__WEBPACK_IMPORTED_MODULE_14__[\"smartRender\"])(_ChannelPreview__WEBPACK_IMPORTED_MODULE_16__[\"ChannelPreview\"], _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_2___default()({}, args));\n });\n\n _this.state = {\n // list of channels\n channels: seamless_immutable__WEBPACK_IMPORTED_MODULE_13___default()([]),\n // loading channels\n loadingChannels: true,\n // error loading channels\n refreshing: false,\n hasNextPage: false,\n offset: 0,\n error: false\n };\n _this.menuButton = react__WEBPACK_IMPORTED_MODULE_11___default.a.createRef();\n return _this;\n }\n\n _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_5___default()(ChannelList, [{\n key: \"componentDidCatch\",\n value: function componentDidCatch(error, info) {\n console.warn(error, info);\n }\n }, {\n key: \"componentDidMount\",\n value: function () {\n var _componentDidMount = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_3___default()(\n /*#__PURE__*/\n _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee4() {\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function _callee4$(_context4) {\n while (1) {\n switch (_context4.prev = _context4.next) {\n case 0:\n _context4.next = 2;\n return this.queryChannels();\n\n case 2:\n this.listenToChanges();\n\n case 3:\n case \"end\":\n return _context4.stop();\n }\n }\n }, _callee4, this);\n }));\n\n function componentDidMount() {\n return _componentDidMount.apply(this, arguments);\n }\n\n return componentDidMount;\n }()\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n this.props.client.off(this.handleEvent);\n }\n }, {\n key: \"listenToChanges\",\n value: function listenToChanges() {\n this.props.client.on(this.handleEvent);\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this2 = this;\n\n var _this$props3 = this.props,\n List = _this$props3.List,\n Paginator = _this$props3.Paginator;\n var _this$state = this.state,\n channels = _this$state.channels,\n loadingChannels = _this$state.loadingChannels,\n refreshing = _this$state.refreshing,\n hasNextPage = _this$state.hasNextPage;\n return react__WEBPACK_IMPORTED_MODULE_11___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_11___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_11___default.a.createElement(\"input\", {\n type: \"checkbox\",\n id: \"str-chat-channel-checkbox\",\n ref: this.menuButton,\n className: \"str-chat-channel-checkbox\"\n }), react__WEBPACK_IMPORTED_MODULE_11___default.a.createElement(\"label\", {\n htmlFor: \"str-chat-channel-checkbox\",\n className: \"str-chat-channel-list-burger\"\n }, react__WEBPACK_IMPORTED_MODULE_11___default.a.createElement(\"div\", null)), react__WEBPACK_IMPORTED_MODULE_11___default.a.createElement(\"div\", {\n className: \"str-chat str-chat-channel-list \".concat(this.props.theme, \" \").concat(this.props.open ? 'str-chat-channel-list--open' : ''),\n ref: this.channelList\n }, react__WEBPACK_IMPORTED_MODULE_11___default.a.createElement(List, {\n loading: loadingChannels,\n error: this.state.error\n }, Object(_utils__WEBPACK_IMPORTED_MODULE_14__[\"smartRender\"])(Paginator, {\n loadNextPage: this.loadNextPage,\n hasNextPage: hasNextPage,\n refreshing: refreshing,\n children: channels.map(function (item) {\n return _this2._renderChannel(item);\n })\n }))));\n }\n }], [{\n key: \"getDerivedStateFromError\",\n value: function getDerivedStateFromError() {\n return {\n error: true\n };\n }\n }]);\n\n return ChannelList;\n}(react__WEBPACK_IMPORTED_MODULE_11__[\"PureComponent\"]);\n\n_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_10___default()(ChannelList, \"propTypes\", {\n /** The Preview to use, defaults to ChannelPreviewLastMessage */\n Preview: prop_types__WEBPACK_IMPORTED_MODULE_12___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_12___default.a.node, prop_types__WEBPACK_IMPORTED_MODULE_12___default.a.func]),\n\n /** The loading indicator to use */\n LoadingIndicator: prop_types__WEBPACK_IMPORTED_MODULE_12___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_12___default.a.node, prop_types__WEBPACK_IMPORTED_MODULE_12___default.a.func]),\n List: prop_types__WEBPACK_IMPORTED_MODULE_12___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_12___default.a.node, prop_types__WEBPACK_IMPORTED_MODULE_12___default.a.func]),\n Paginator: prop_types__WEBPACK_IMPORTED_MODULE_12___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_12___default.a.node, prop_types__WEBPACK_IMPORTED_MODULE_12___default.a.func]),\n\n /** Function that overrides default behaviour when users gets added to a channel */\n onAddedToChannel: prop_types__WEBPACK_IMPORTED_MODULE_12___default.a.func,\n\n /** Function that overrides default behaviour when users gets removed from a channel */\n onRemovedFromChannel: prop_types__WEBPACK_IMPORTED_MODULE_12___default.a.func,\n\n /** Object containing query filters */\n filters: prop_types__WEBPACK_IMPORTED_MODULE_12___default.a.object,\n\n /** Object containing query options */\n options: prop_types__WEBPACK_IMPORTED_MODULE_12___default.a.object,\n\n /** Object containing sort parameters */\n sort: prop_types__WEBPACK_IMPORTED_MODULE_12___default.a.object\n});\n\n_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_10___default()(ChannelList, \"defaultProps\", {\n Preview: _ChannelPreviewLastMessage__WEBPACK_IMPORTED_MODULE_15__[\"ChannelPreviewLastMessage\"],\n LoadingIndicator: _LoadingIndicator__WEBPACK_IMPORTED_MODULE_17__[\"LoadingIndicator\"],\n List: _ChannelListTeam__WEBPACK_IMPORTED_MODULE_20__[\"ChannelListTeam\"],\n Paginator: _LoadMorePaginator__WEBPACK_IMPORTED_MODULE_18__[\"LoadMorePaginator\"],\n filters: {},\n options: {},\n sort: {}\n});\n\nChannelList = Object(_context__WEBPACK_IMPORTED_MODULE_19__[\"withChatContext\"])(ChannelList);\n\n\n//# sourceURL=webpack:///./src/components/ChannelList.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"ChannelList\", function() { return ChannelList; });\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/regenerator */ \"./node_modules/@babel/runtime/regenerator/index.js\");\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ \"./node_modules/@babel/runtime/helpers/toConsumableArray.js\");\n/* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/objectSpread */ \"./node_modules/@babel/runtime/helpers/objectSpread.js\");\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ \"./node_modules/@babel/runtime/helpers/asyncToGenerator.js\");\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ \"./node_modules/@babel/runtime/helpers/classCallCheck.js\");\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ \"./node_modules/@babel/runtime/helpers/createClass.js\");\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ \"./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js\");\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ \"./node_modules/@babel/runtime/helpers/getPrototypeOf.js\");\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ \"./node_modules/@babel/runtime/helpers/assertThisInitialized.js\");\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @babel/runtime/helpers/inherits */ \"./node_modules/@babel/runtime/helpers/inherits.js\");\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_12__);\n/* harmony import */ var seamless_immutable__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! seamless-immutable */ \"./node_modules/seamless-immutable/seamless-immutable.development.js\");\n/* harmony import */ var seamless_immutable__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(seamless_immutable__WEBPACK_IMPORTED_MODULE_13__);\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../utils */ \"./src/utils.js\");\n/* harmony import */ var _ChannelPreviewLastMessage__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./ChannelPreviewLastMessage */ \"./src/components/ChannelPreviewLastMessage.js\");\n/* harmony import */ var _ChannelPreview__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./ChannelPreview */ \"./src/components/ChannelPreview.js\");\n/* harmony import */ var _LoadingIndicator__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./LoadingIndicator */ \"./src/components/LoadingIndicator.js\");\n/* harmony import */ var _LoadMorePaginator__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./LoadMorePaginator */ \"./src/components/LoadMorePaginator.js\");\n/* harmony import */ var _context__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../context */ \"./src/context.js\");\n/* harmony import */ var _ChannelListTeam__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./ChannelListTeam */ \"./src/components/ChannelListTeam.js\");\n/* harmony import */ var lodash_uniqby__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! lodash.uniqby */ \"./node_modules/lodash.uniqby/index.js\");\n/* harmony import */ var lodash_uniqby__WEBPACK_IMPORTED_MODULE_21___default = /*#__PURE__*/__webpack_require__.n(lodash_uniqby__WEBPACK_IMPORTED_MODULE_21__);\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n/**\n * ChannelList - A preview list of channels, allowing you to select the channel you want to open\n * @extends PureComponent\n * @example ./docs/ChannelList.md\n */\n\nvar ChannelList =\n/*#__PURE__*/\nfunction (_PureComponent) {\n _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_9___default()(ChannelList, _PureComponent);\n\n function ChannelList(_props) {\n var _this;\n\n _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_4___default()(this, ChannelList);\n\n _this = _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_6___default()(this, _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_7___default()(ChannelList).call(this, _props));\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_10___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_this), \"queryChannels\",\n /*#__PURE__*/\n _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_3___default()(\n /*#__PURE__*/\n _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee() {\n var _this$props, options, filters, sort, offset, newOptions, channelPromise, channelQueryResponse;\n\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n _this$props = _this.props, options = _this$props.options, filters = _this$props.filters, sort = _this$props.sort;\n offset = _this.state.offset;\n\n _this.setState({\n refreshing: true\n });\n\n newOptions = _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_2___default()({}, options);\n if (!options.limit) newOptions.limit = 30;\n channelPromise = _this.props.client.queryChannels(filters, sort, _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_2___default()({}, newOptions, {\n offset: offset\n }));\n _context.prev = 6;\n channelQueryResponse = channelPromise;\n\n if (!Object(_utils__WEBPACK_IMPORTED_MODULE_14__[\"isPromise\"])(channelQueryResponse)) {\n _context.next = 13;\n break;\n }\n\n _context.next = 11;\n return channelPromise;\n\n case 11:\n channelQueryResponse = _context.sent;\n\n if (offset === 0 && channelQueryResponse.length >= 1) {\n _this.props.setActiveChannel(channelQueryResponse[0]);\n }\n\n case 13:\n _this.setState(function (prevState) {\n var channels = [].concat(_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_1___default()(prevState.channels), _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_1___default()(channelQueryResponse));\n return {\n channels: channels,\n // not unique somehow needs more checking\n loadingChannels: false,\n offset: channels.length,\n hasNextPage: channelQueryResponse.length >= newOptions.limit ? true : false,\n refreshing: false\n };\n });\n\n _context.next = 20;\n break;\n\n case 16:\n _context.prev = 16;\n _context.t0 = _context[\"catch\"](6);\n console.warn(_context.t0);\n\n _this.setState({\n error: true,\n refreshing: false\n });\n\n case 20:\n case \"end\":\n return _context.stop();\n }\n }\n }, _callee, null, [[6, 16]]);\n })));\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_10___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_this), \"handleEvent\",\n /*#__PURE__*/\n function () {\n var _ref2 = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_3___default()(\n /*#__PURE__*/\n _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee2(e) {\n var channel, _channel;\n\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function _callee2$(_context2) {\n while (1) {\n switch (_context2.prev = _context2.next) {\n case 0:\n if (e.type === 'message.new') {\n _this.moveChannelUp(e.cid);\n } // make sure to re-render the channel list after connection is recovered\n\n\n if (e.type === 'connection.recovered') {\n _this.setState(function (prevState) {\n return {\n connectionRecoveredCount: prevState.connectionRecoveredCount + 1\n };\n });\n } // move channel to start\n\n\n if (!(e.type === 'notification.message_new')) {\n _context2.next = 7;\n break;\n }\n\n _context2.next = 5;\n return _this.getChannel(e.channel.type, e.channel.id);\n\n case 5:\n channel = _context2.sent;\n\n // move channel to starting position\n _this.setState(function (prevState) {\n return {\n channels: lodash_uniqby__WEBPACK_IMPORTED_MODULE_21___default()([channel].concat(_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_1___default()(prevState.channels)), 'cid')\n };\n });\n\n case 7:\n if (!(e.type === 'notification.added_to_channel')) {\n _context2.next = 16;\n break;\n }\n\n if (!(_this.props.onAddedToChannel && typeof _this.props.onAddedToChannel === 'function')) {\n _context2.next = 12;\n break;\n }\n\n _this.props.onAddedToChannel(e);\n\n _context2.next = 16;\n break;\n\n case 12:\n _context2.next = 14;\n return _this.getChannel(e.channel.type, e.channel.id);\n\n case 14:\n _channel = _context2.sent;\n\n _this.setState(function (prevState) {\n return {\n channels: lodash_uniqby__WEBPACK_IMPORTED_MODULE_21___default()([_channel].concat(_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_1___default()(prevState.channels)), 'cid')\n };\n });\n\n case 16:\n // remove from channel\n if (e.type === 'notification.removed_from_channel') {\n if (_this.props.onRemovedFromChannel && typeof _this.props.onRemovedFromChannel === 'function') {\n _this.props.onRemovedFromChannel(e);\n } else {\n _this.setState(function (prevState) {\n var channels = prevState.channels.filter(function (channel) {\n return channel.cid !== e.channel.cid;\n });\n return {\n channels: channels\n };\n });\n }\n }\n\n return _context2.abrupt(\"return\", null);\n\n case 18:\n case \"end\":\n return _context2.stop();\n }\n }\n }, _callee2);\n }));\n\n return function (_x) {\n return _ref2.apply(this, arguments);\n };\n }());\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_10___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_this), \"getChannel\",\n /*#__PURE__*/\n function () {\n var _ref3 = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_3___default()(\n /*#__PURE__*/\n _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee3(type, id) {\n var channel;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function _callee3$(_context3) {\n while (1) {\n switch (_context3.prev = _context3.next) {\n case 0:\n channel = _this.props.client.channel(type, id);\n _context3.next = 3;\n return channel.watch();\n\n case 3:\n return _context3.abrupt(\"return\", channel);\n\n case 4:\n case \"end\":\n return _context3.stop();\n }\n }\n }, _callee3);\n }));\n\n return function (_x2, _x3) {\n return _ref3.apply(this, arguments);\n };\n }());\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_10___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_this), \"moveChannelUp\", function (cid) {\n var channels = _this.state.channels; // get channel index\n\n var channelIndex = _this.state.channels.findIndex(function (channel) {\n return channel.cid === cid;\n });\n\n if (channelIndex === 0) return; // get channel from channels\n\n var channel = channels[channelIndex]; //remove channel from current position\n\n channels.splice(channelIndex, 1); //add channel at the start\n\n channels.unshift(channel); // set new channel state\n\n _this.setState({\n channels: _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_1___default()(channels)\n });\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_10___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_this), \"loadNextPage\", function () {\n _this.queryChannels();\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_10___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_this), \"closeMenu\", function () {\n _this.menuButton.current.checked = false;\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_10___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_this), \"_renderChannel\", function (item) {\n var _this$props2 = _this.props,\n Preview = _this$props2.Preview,\n setActiveChannel = _this$props2.setActiveChannel,\n channel = _this$props2.channel;\n var props = {\n channel: item,\n activeChannel: channel,\n closeMenu: _this.closeMenu,\n Preview: Preview,\n setActiveChannel: setActiveChannel,\n key: item.id,\n connectionRecoveredCount: _this.state.connectionRecoveredCount\n };\n return Object(_utils__WEBPACK_IMPORTED_MODULE_14__[\"smartRender\"])(_ChannelPreview__WEBPACK_IMPORTED_MODULE_16__[\"ChannelPreview\"], _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_2___default()({}, props));\n });\n\n _this.state = {\n // list of channels\n channels: seamless_immutable__WEBPACK_IMPORTED_MODULE_13___default()([]),\n // loading channels\n loadingChannels: true,\n // error loading channels\n refreshing: false,\n hasNextPage: false,\n offset: 0,\n error: false,\n connectionRecoveredCount: 0\n };\n _this.menuButton = react__WEBPACK_IMPORTED_MODULE_11___default.a.createRef();\n return _this;\n }\n\n _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_5___default()(ChannelList, [{\n key: \"componentDidCatch\",\n value: function componentDidCatch(error, info) {\n console.warn(error, info);\n }\n }, {\n key: \"componentDidMount\",\n value: function () {\n var _componentDidMount = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_3___default()(\n /*#__PURE__*/\n _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee4() {\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function _callee4$(_context4) {\n while (1) {\n switch (_context4.prev = _context4.next) {\n case 0:\n _context4.next = 2;\n return this.queryChannels();\n\n case 2:\n this.listenToChanges();\n\n case 3:\n case \"end\":\n return _context4.stop();\n }\n }\n }, _callee4, this);\n }));\n\n function componentDidMount() {\n return _componentDidMount.apply(this, arguments);\n }\n\n return componentDidMount;\n }()\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n this.props.client.off(this.handleEvent);\n }\n }, {\n key: \"listenToChanges\",\n value: function listenToChanges() {\n this.props.client.on(this.handleEvent);\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this2 = this;\n\n var _this$props3 = this.props,\n List = _this$props3.List,\n Paginator = _this$props3.Paginator;\n var _this$state = this.state,\n channels = _this$state.channels,\n loadingChannels = _this$state.loadingChannels,\n refreshing = _this$state.refreshing,\n hasNextPage = _this$state.hasNextPage;\n return react__WEBPACK_IMPORTED_MODULE_11___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_11___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_11___default.a.createElement(\"input\", {\n type: \"checkbox\",\n id: \"str-chat-channel-checkbox\",\n ref: this.menuButton,\n className: \"str-chat-channel-checkbox\"\n }), react__WEBPACK_IMPORTED_MODULE_11___default.a.createElement(\"label\", {\n htmlFor: \"str-chat-channel-checkbox\",\n className: \"str-chat-channel-list-burger\"\n }, react__WEBPACK_IMPORTED_MODULE_11___default.a.createElement(\"div\", null)), react__WEBPACK_IMPORTED_MODULE_11___default.a.createElement(\"div\", {\n className: \"str-chat str-chat-channel-list \".concat(this.props.theme, \" \").concat(this.props.open ? 'str-chat-channel-list--open' : ''),\n ref: this.channelList\n }, react__WEBPACK_IMPORTED_MODULE_11___default.a.createElement(List, {\n loading: loadingChannels,\n error: this.state.error\n }, Object(_utils__WEBPACK_IMPORTED_MODULE_14__[\"smartRender\"])(Paginator, {\n loadNextPage: this.loadNextPage,\n hasNextPage: hasNextPage,\n refreshing: refreshing,\n children: channels.map(function (item) {\n return _this2._renderChannel(item);\n })\n }))));\n }\n }], [{\n key: \"getDerivedStateFromError\",\n value: function getDerivedStateFromError() {\n return {\n error: true\n };\n }\n }]);\n\n return ChannelList;\n}(react__WEBPACK_IMPORTED_MODULE_11__[\"PureComponent\"]);\n\n_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_10___default()(ChannelList, \"propTypes\", {\n /** The Preview to use, defaults to ChannelPreviewLastMessage */\n Preview: prop_types__WEBPACK_IMPORTED_MODULE_12___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_12___default.a.node, prop_types__WEBPACK_IMPORTED_MODULE_12___default.a.func]),\n\n /** The loading indicator to use */\n LoadingIndicator: prop_types__WEBPACK_IMPORTED_MODULE_12___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_12___default.a.node, prop_types__WEBPACK_IMPORTED_MODULE_12___default.a.func]),\n List: prop_types__WEBPACK_IMPORTED_MODULE_12___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_12___default.a.node, prop_types__WEBPACK_IMPORTED_MODULE_12___default.a.func]),\n Paginator: prop_types__WEBPACK_IMPORTED_MODULE_12___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_12___default.a.node, prop_types__WEBPACK_IMPORTED_MODULE_12___default.a.func]),\n\n /** Function that overrides default behaviour when users gets added to a channel */\n onAddedToChannel: prop_types__WEBPACK_IMPORTED_MODULE_12___default.a.func,\n\n /** Function that overrides default behaviour when users gets removed from a channel */\n onRemovedFromChannel: prop_types__WEBPACK_IMPORTED_MODULE_12___default.a.func,\n\n /** Object containing query filters */\n filters: prop_types__WEBPACK_IMPORTED_MODULE_12___default.a.object,\n\n /** Object containing query options */\n options: prop_types__WEBPACK_IMPORTED_MODULE_12___default.a.object,\n\n /** Object containing sort parameters */\n sort: prop_types__WEBPACK_IMPORTED_MODULE_12___default.a.object\n});\n\n_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_10___default()(ChannelList, \"defaultProps\", {\n Preview: _ChannelPreviewLastMessage__WEBPACK_IMPORTED_MODULE_15__[\"ChannelPreviewLastMessage\"],\n LoadingIndicator: _LoadingIndicator__WEBPACK_IMPORTED_MODULE_17__[\"LoadingIndicator\"],\n List: _ChannelListTeam__WEBPACK_IMPORTED_MODULE_20__[\"ChannelListTeam\"],\n Paginator: _LoadMorePaginator__WEBPACK_IMPORTED_MODULE_18__[\"LoadMorePaginator\"],\n filters: {},\n options: {},\n sort: {}\n});\n\nChannelList = Object(_context__WEBPACK_IMPORTED_MODULE_19__[\"withChatContext\"])(ChannelList);\n\n\n//# sourceURL=webpack:///./src/components/ChannelList.js?"); /***/ }), @@ -12288,7 +12299,7 @@ eval("\nvar content = __webpack_require__(/*! !./node_modules/postcss-loader/src /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -eval("__webpack_require__(/*! /Users/tommaso/src/stream-chat-react/dist/css/index.css */\"./dist/css/index.css\");\n__webpack_require__(/*! /Users/tommaso/src/stream-chat-react/styleguidist.css */\"./styleguidist.css\");\nmodule.exports = __webpack_require__(/*! /Users/tommaso/src/stream-chat-react/node_modules/react-styleguidist/lib/index */\"./node_modules/react-styleguidist/lib/index.js\");\n\n\n//# sourceURL=webpack:///multi_./dist/css/index.css_./styleguidist.css_./node_modules/react-styleguidist/lib/index?"); +eval("__webpack_require__(/*! /Users/tommaso/src/go_development/src/github.com/GetStream/chat/staging/stream-chat-react/dist/css/index.css */\"./dist/css/index.css\");\n__webpack_require__(/*! /Users/tommaso/src/go_development/src/github.com/GetStream/chat/staging/stream-chat-react/styleguidist.css */\"./styleguidist.css\");\nmodule.exports = __webpack_require__(/*! /Users/tommaso/src/go_development/src/github.com/GetStream/chat/staging/stream-chat-react/node_modules/react-styleguidist/lib/index */\"./node_modules/react-styleguidist/lib/index.js\");\n\n\n//# sourceURL=webpack:///multi_./dist/css/index.css_./styleguidist.css_./node_modules/react-styleguidist/lib/index?"); /***/ }) diff --git a/docs/index.html b/docs/index.html index 65a760d81..1db70bb57 100644 --- a/docs/index.html +++ b/docs/index.html @@ -1 +1 @@ -React Chat - Docs
\ No newline at end of file +React Chat - Docs
\ No newline at end of file diff --git a/examples/commerce/yarn.lock b/examples/commerce/yarn.lock index b827d43a5..4bf4aed9b 100644 --- a/examples/commerce/yarn.lock +++ b/examples/commerce/yarn.lock @@ -5380,6 +5380,11 @@ lodash.uniq@^4.5.0: version "4.5.0" resolved "https://registry.yarnpkg.com/lodash.uniq/-/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773" +lodash.uniqby@^4.7.0: + version "4.7.0" + resolved "https://registry.yarnpkg.com/lodash.uniqby/-/lodash.uniqby-4.7.0.tgz#d99c07a669e9e6d24e1362dfe266c67616af1302" + integrity sha1-2ZwHpmnp5tJOE2Lf4mbGdhavEwI= + lodash.uniqueid@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/lodash.uniqueid/-/lodash.uniqueid-4.0.1.tgz#3268f26a7c88e4f4b1758d679271814e31fa5b26" @@ -8187,10 +8192,10 @@ stream-browserify@^2.0.2: version "0.0.0" uid "" -stream-chat@^0.13.2: - version "0.13.2" - resolved "https://registry.yarnpkg.com/stream-chat/-/stream-chat-0.13.2.tgz#df50bf8e789317911a217e58b98501aa9052c865" - integrity sha512-vZBpC6zMpoMXsdsq5jZ2sPXhHTHklmASNhnk3iViFdVZSfBTnC9wAbkT3IbkyTmLCnC1hcT25COIfe9oNZyHAQ== +stream-chat@^0.13.3: + version "0.13.3" + resolved "https://registry.yarnpkg.com/stream-chat/-/stream-chat-0.13.3.tgz#f7daf6596088d707f058be300e754bde2006e22a" + integrity sha512-ehlx9PGlk8M0actRBhZiuMShzwQuUOCopL3b/AFefe316WnvaiRunY8F63Bb/vBIgB9v70NIAkKjFdDRbtOmfQ== dependencies: "@babel/runtime" "^7.3.1" axios "^0.18.0" diff --git a/examples/livestream/yarn.lock b/examples/livestream/yarn.lock index 85b480eb1..830e23f0f 100644 --- a/examples/livestream/yarn.lock +++ b/examples/livestream/yarn.lock @@ -5380,6 +5380,11 @@ lodash.uniq@^4.5.0: version "4.5.0" resolved "https://registry.yarnpkg.com/lodash.uniq/-/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773" +lodash.uniqby@^4.7.0: + version "4.7.0" + resolved "https://registry.yarnpkg.com/lodash.uniqby/-/lodash.uniqby-4.7.0.tgz#d99c07a669e9e6d24e1362dfe266c67616af1302" + integrity sha1-2ZwHpmnp5tJOE2Lf4mbGdhavEwI= + lodash.uniqueid@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/lodash.uniqueid/-/lodash.uniqueid-4.0.1.tgz#3268f26a7c88e4f4b1758d679271814e31fa5b26" @@ -8187,10 +8192,10 @@ stream-browserify@^2.0.2: version "0.0.0" uid "" -stream-chat@^0.13.2: - version "0.13.2" - resolved "https://registry.yarnpkg.com/stream-chat/-/stream-chat-0.13.2.tgz#df50bf8e789317911a217e58b98501aa9052c865" - integrity sha512-vZBpC6zMpoMXsdsq5jZ2sPXhHTHklmASNhnk3iViFdVZSfBTnC9wAbkT3IbkyTmLCnC1hcT25COIfe9oNZyHAQ== +stream-chat@^0.13.3: + version "0.13.3" + resolved "https://registry.yarnpkg.com/stream-chat/-/stream-chat-0.13.3.tgz#f7daf6596088d707f058be300e754bde2006e22a" + integrity sha512-ehlx9PGlk8M0actRBhZiuMShzwQuUOCopL3b/AFefe316WnvaiRunY8F63Bb/vBIgB9v70NIAkKjFdDRbtOmfQ== dependencies: "@babel/runtime" "^7.3.1" axios "^0.18.0" diff --git a/examples/team/yarn.lock b/examples/team/yarn.lock index def66d38f..b06429c4b 100644 --- a/examples/team/yarn.lock +++ b/examples/team/yarn.lock @@ -5450,6 +5450,11 @@ lodash.uniq@^4.5.0: version "4.5.0" resolved "https://registry.yarnpkg.com/lodash.uniq/-/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773" +lodash.uniqby@^4.7.0: + version "4.7.0" + resolved "https://registry.yarnpkg.com/lodash.uniqby/-/lodash.uniqby-4.7.0.tgz#d99c07a669e9e6d24e1362dfe266c67616af1302" + integrity sha1-2ZwHpmnp5tJOE2Lf4mbGdhavEwI= + lodash.uniqueid@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/lodash.uniqueid/-/lodash.uniqueid-4.0.1.tgz#3268f26a7c88e4f4b1758d679271814e31fa5b26" @@ -8259,10 +8264,10 @@ stream-browserify@^2.0.1, stream-browserify@^2.0.2: version "0.0.0" uid "" -stream-chat@^0.13.2: - version "0.13.2" - resolved "https://registry.yarnpkg.com/stream-chat/-/stream-chat-0.13.2.tgz#df50bf8e789317911a217e58b98501aa9052c865" - integrity sha512-vZBpC6zMpoMXsdsq5jZ2sPXhHTHklmASNhnk3iViFdVZSfBTnC9wAbkT3IbkyTmLCnC1hcT25COIfe9oNZyHAQ== +stream-chat@^0.13.3: + version "0.13.3" + resolved "https://registry.yarnpkg.com/stream-chat/-/stream-chat-0.13.3.tgz#f7daf6596088d707f058be300e754bde2006e22a" + integrity sha512-ehlx9PGlk8M0actRBhZiuMShzwQuUOCopL3b/AFefe316WnvaiRunY8F63Bb/vBIgB9v70NIAkKjFdDRbtOmfQ== dependencies: "@babel/runtime" "^7.3.1" axios "^0.18.0" diff --git a/package.json b/package.json index b8607c234..7ad74a5a6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "stream-chat-react", - "version": "0.6.3", + "version": "0.6.4", "description": "React components to create chat conversations or livestream style chat", "author": "GetStream", "homepage": "https://getstream.io/chat/",