{"version":3,"file":"g1.min.js","sources":["../src/namespace_util.js","../src/types.js","../src/datafilter.js","../node_modules/lodash-es/_freeGlobal.js","../node_modules/lodash-es/_root.js","../node_modules/lodash-es/_Symbol.js","../node_modules/lodash-es/_getRawTag.js","../node_modules/lodash-es/_objectToString.js","../node_modules/lodash-es/_baseGetTag.js","../node_modules/lodash-es/isObject.js","../node_modules/lodash-es/isFunction.js","../node_modules/lodash-es/_coreJsData.js","../node_modules/lodash-es/_isMasked.js","../node_modules/lodash-es/_toSource.js","../node_modules/lodash-es/_baseIsNative.js","../node_modules/lodash-es/_getNative.js","../node_modules/lodash-es/_getValue.js","../node_modules/lodash-es/_nativeCreate.js","../node_modules/lodash-es/_hashGet.js","../node_modules/lodash-es/_hashHas.js","../node_modules/lodash-es/_Hash.js","../node_modules/lodash-es/eq.js","../node_modules/lodash-es/_assocIndexOf.js","../node_modules/lodash-es/_hashClear.js","../node_modules/lodash-es/_hashDelete.js","../node_modules/lodash-es/_hashSet.js","../node_modules/lodash-es/_listCacheDelete.js","../node_modules/lodash-es/_ListCache.js","../node_modules/lodash-es/_listCacheClear.js","../node_modules/lodash-es/_listCacheGet.js","../node_modules/lodash-es/_listCacheHas.js","../node_modules/lodash-es/_listCacheSet.js","../node_modules/lodash-es/_Map.js","../node_modules/lodash-es/_getMapData.js","../node_modules/lodash-es/_isKeyable.js","../node_modules/lodash-es/_MapCache.js","../node_modules/lodash-es/_mapCacheClear.js","../node_modules/lodash-es/_mapCacheDelete.js","../node_modules/lodash-es/_mapCacheGet.js","../node_modules/lodash-es/_mapCacheHas.js","../node_modules/lodash-es/_mapCacheSet.js","../node_modules/lodash-es/_SetCache.js","../node_modules/lodash-es/_baseIsNaN.js","../node_modules/lodash-es/_arrayIncludes.js","../node_modules/lodash-es/_baseIndexOf.js","../node_modules/lodash-es/_strictIndexOf.js","../node_modules/lodash-es/_baseFindIndex.js","../node_modules/lodash-es/_arrayIncludesWith.js","../node_modules/lodash-es/_cacheHas.js","../node_modules/lodash-es/_setCacheAdd.js","../node_modules/lodash-es/_setCacheHas.js","../node_modules/lodash-es/_Set.js","../node_modules/lodash-es/_setToArray.js","../node_modules/lodash-es/_createSet.js","../node_modules/lodash-es/noop.js","../node_modules/lodash-es/_baseUniq.js","../node_modules/lodash-es/_castSlice.js","../node_modules/lodash-es/_baseSlice.js","../node_modules/lodash-es/_hasUnicode.js","../node_modules/lodash-es/_unicodeToArray.js","../node_modules/lodash-es/_stringToArray.js","../node_modules/lodash-es/_asciiToArray.js","../node_modules/lodash-es/isArray.js","../node_modules/lodash-es/isObjectLike.js","../node_modules/lodash-es/isSymbol.js","../node_modules/lodash-es/_baseToString.js","../node_modules/lodash-es/_arrayMap.js","../node_modules/lodash-es/toString.js","../node_modules/lodash-es/upperFirst.js","../node_modules/lodash-es/_createCaseFirst.js","../node_modules/lodash-es/_Stack.js","../node_modules/lodash-es/_stackClear.js","../node_modules/lodash-es/_stackDelete.js","../node_modules/lodash-es/_stackGet.js","../node_modules/lodash-es/_stackHas.js","../node_modules/lodash-es/_stackSet.js","../node_modules/lodash-es/_defineProperty.js","../node_modules/lodash-es/_baseAssignValue.js","../node_modules/lodash-es/_assignValue.js","../node_modules/lodash-es/_copyObject.js","../node_modules/lodash-es/_baseIsArguments.js","../node_modules/lodash-es/isArguments.js","../node_modules/lodash-es/isBuffer.js","../node_modules/lodash-es/stubFalse.js","../node_modules/lodash-es/_isIndex.js","../node_modules/lodash-es/isLength.js","../node_modules/lodash-es/_baseIsTypedArray.js","../node_modules/lodash-es/_baseUnary.js","../node_modules/lodash-es/_nodeUtil.js","../node_modules/lodash-es/isTypedArray.js","../node_modules/lodash-es/_arrayLikeKeys.js","../node_modules/lodash-es/_baseTimes.js","../node_modules/lodash-es/_isPrototype.js","../node_modules/lodash-es/_overArg.js","../node_modules/lodash-es/_nativeKeys.js","../node_modules/lodash-es/_baseKeys.js","../node_modules/lodash-es/isArrayLike.js","../node_modules/lodash-es/keys.js","../node_modules/lodash-es/_baseKeysIn.js","../node_modules/lodash-es/_nativeKeysIn.js","../node_modules/lodash-es/keysIn.js","../node_modules/lodash-es/_cloneBuffer.js","../node_modules/lodash-es/stubArray.js","../node_modules/lodash-es/_getSymbols.js","../node_modules/lodash-es/_arrayFilter.js","../node_modules/lodash-es/_arrayPush.js","../node_modules/lodash-es/_getPrototype.js","../node_modules/lodash-es/_getSymbolsIn.js","../node_modules/lodash-es/_baseGetAllKeys.js","../node_modules/lodash-es/_getAllKeys.js","../node_modules/lodash-es/_getAllKeysIn.js","../node_modules/lodash-es/_DataView.js","../node_modules/lodash-es/_Promise.js","../node_modules/lodash-es/_WeakMap.js","../node_modules/lodash-es/_getTag.js","../node_modules/lodash-es/_initCloneArray.js","../node_modules/lodash-es/_Uint8Array.js","../node_modules/lodash-es/_cloneArrayBuffer.js","../node_modules/lodash-es/_cloneRegExp.js","../node_modules/lodash-es/_cloneSymbol.js","../node_modules/lodash-es/_initCloneByTag.js","../node_modules/lodash-es/_cloneDataView.js","../node_modules/lodash-es/_cloneTypedArray.js","../node_modules/lodash-es/_baseCreate.js","../node_modules/lodash-es/isMap.js","../node_modules/lodash-es/_baseIsMap.js","../node_modules/lodash-es/isSet.js","../node_modules/lodash-es/_baseIsSet.js","../node_modules/lodash-es/_baseClone.js","../node_modules/lodash-es/_copyArray.js","../node_modules/lodash-es/_initCloneObject.js","../node_modules/lodash-es/_copySymbolsIn.js","../node_modules/lodash-es/_baseAssignIn.js","../node_modules/lodash-es/_copySymbols.js","../node_modules/lodash-es/_baseAssign.js","../node_modules/lodash-es/_arrayEach.js","../node_modules/lodash-es/_arraySome.js","../node_modules/lodash-es/_equalArrays.js","../node_modules/lodash-es/_mapToArray.js","../node_modules/lodash-es/_equalByTag.js","../node_modules/lodash-es/_equalObjects.js","../node_modules/lodash-es/_baseIsEqualDeep.js","../node_modules/lodash-es/_baseIsEqual.js","../node_modules/lodash-es/_baseIsMatch.js","../node_modules/lodash-es/_isStrictComparable.js","../node_modules/lodash-es/_matchesStrictComparable.js","../node_modules/lodash-es/_baseMatches.js","../node_modules/lodash-es/_getMatchData.js","../node_modules/lodash-es/_isKey.js","../node_modules/lodash-es/memoize.js","../node_modules/lodash-es/_stringToPath.js","../node_modules/lodash-es/_memoizeCapped.js","../node_modules/lodash-es/_castPath.js","../node_modules/lodash-es/_toKey.js","../node_modules/lodash-es/_baseGet.js","../node_modules/lodash-es/_baseHasIn.js","../node_modules/lodash-es/hasIn.js","../node_modules/lodash-es/_hasPath.js","../node_modules/lodash-es/_baseMatchesProperty.js","../node_modules/lodash-es/get.js","../node_modules/lodash-es/identity.js","../node_modules/lodash-es/property.js","../node_modules/lodash-es/_baseProperty.js","../node_modules/lodash-es/_basePropertyDeep.js","../node_modules/lodash-es/iteratee.js","../node_modules/lodash-es/_baseIteratee.js","../node_modules/d3-array/src/ascending.js","../node_modules/d3-array/src/bisect.js","../node_modules/d3-array/src/bisector.js","../node_modules/d3-array/src/extent.js","../src/scale.js","../src/parsetransform.js","../node_modules/lodash-es/uniq.js","../src/sanddance.js","../src/url.js","../src/_util.js","../src/urlfilter.js","../index-urlfilter.js","../src/ajaxchain.js","../index-ajax.js","../node_modules/deepmerge/dist/es.js","../src/event.js","../src/dropdown.js","../index-dropdown.js","../index-event.js","../src/formhandler.js","../index-formhandler.js","../src/highlight.js","../index-highlight.js","../index-leaflet.js","../src/leaflet-utils.js","../src/search.js","../index-search.js","../src/template.js","../src/urlchange.js","../index-template.js","../index-urlchange.js","../index-translate.js","../src/translate.js","../src/fuzzysearch.js","../src/package.js"],"sourcesContent":["export function namespace(search, name) {\n // Return an object with all keys in search that begin with `:` or\n // do not have a `:` in them.\n // If name is false-y, return search\n if (!name)\n return search\n var result = {}\n for (var key in search) {\n var parts = key.split(':')\n if (parts.length == 1)\n result[parts[0]] = search[key]\n else if (parts[0] === name)\n result[parts[1]] = search[key]\n }\n return result\n}\n","// state_transition[old_state][current_type] -> new_state\n// type: undefined and type: null are mapped to state 'null', i.e. missing values\nvar state_transitions = {\n 'null': {\n 'null': { state: 'null' },\n 'date': { state: 'date' },\n 'number': { state: 'number' },\n 'boolean': { state: 'boolean' },\n 'string': { state: 'string' },\n 'object': { state: 'object' },\n 'mixed': { state: 'mixed', end: true }\n },\n 'date': {\n 'null': { state: 'date' },\n 'undefined': { state: 'date' },\n 'date': { state: 'date' },\n 'default': { state: 'mixed', end: true }\n },\n 'number': {\n 'null': { state: 'number' },\n 'undefined': { state: 'number' },\n 'number': { state: 'number' },\n 'default': { state: 'mixed', end: true }\n },\n 'boolean': {\n 'null': { state: 'boolean' },\n 'undefined': { state: 'boolean' },\n 'boolean': { state: 'boolean' },\n 'default': { state: 'mixed', end: true }\n },\n 'string': {\n 'null': { state: 'string' },\n 'undefined': { state: 'string' },\n 'string': { state: 'string' },\n 'default': { state: 'mixed', end: true }\n },\n 'object': {\n 'null': { state: 'object' },\n 'object': { state: 'object' },\n 'undefined': { state: 'object' },\n 'default': { state: 'mixed', end: true }\n },\n 'mixed': {\n 'default': { state: 'mixed', end: true }\n }\n}\n\n\nexport function types(data, options) {\n var result = {}\n if (!data || !data.length)\n return result\n\n options = options || {}\n options.convert = options.convert || false\n options.limit = options.limit || 1000\n var limit = (options.limit < data.length) ? options.limit : data.length\n var ignore = options.ignore = options.ignore || [null, undefined]\n var columns = Object.keys(data[0])\n\n for (var columnIndex = 0; columnIndex < columns.length; columnIndex++) {\n var column = columns[columnIndex]\n var result_type = 'null'\n for (var index = 0; index < limit; index++) {\n var row = data[index]\n var value = row[column]\n\n if (columnIndex == 0) {\n Object.keys(data[index]).forEach(function (value) {\n if (columns.indexOf(value) == -1)\n columns.push(value)\n })\n }\n\n // Ignore if the value is missing\n if (!(column in row))\n continue\n // Ignore values that are in the ignore list\n if (ignore.indexOf(value) >= 0)\n continue\n // Identify type (date, object, number, boolean, string, undefined, null)\n var type = typeof value\n if (value === undefined || value === null)\n type = 'null'\n else if (type == 'object' && !isNaN(Date.parse(value)))\n type = 'date'\n else if (options.convert) {\n // We use parseFloat AND isFinite because\n // parseFloat('2018-01') is 2018 but isFinite('2018-01') is false\n // Also, 'NaN', 'Infinity' and '-Infinity' should be treated as numbers\n if ((!isNaN(parseFloat(value)) && isFinite(value)) || ['NaN', 'Infinity', '-Infinity'].indexOf(value) >= 0)\n type = 'number'\n else if (!isNaN(Date.parse(value)))\n type = 'date'\n else if (['true', 'false'].indexOf(value) != -1)\n type = 'boolean'\n }\n\n // Apply the state change\n var state_transition = state_transitions[type]\n var change = state_transition[result_type] || state_transition['default']\n result_type = change['state']\n if (change['end'])\n break\n }\n result[column] = result_type\n }\n return result\n}\n","import { namespace } from './namespace_util.js'\nimport { types } from './types.js'\n\nfunction isEqual(value, compare_with, criteria_satisfied) {\n // to handle: ( ...Shape!&... ) or ( ...&Shape&... )\n if (!value) {\n return criteria_satisfied ? (compare_with == null) : (compare_with != null)\n }\n return value.indexOf(compare_with) != -1 ? !criteria_satisfied : criteria_satisfied\n}\n\nfunction greater_than(value, compare_with, include_equals) {\n if ((isNaN(compare_with) && Date.parse(compare_with))) {\n compare_with = Date.parse(compare_with)\n }\n if ((isNaN(value) && Date.parse(value))) {\n value = Date.parse(value)\n }\n return include_equals ? (compare_with >= value) : (compare_with > value)\n}\nvar operators = {\n '=': function (value, compare_with) {\n return isEqual(value, compare_with, false)\n },\n '!': function (value, compare_with) {\n return isEqual(value, compare_with, true)\n },\n '>': function (value, compare_with) {\n return greater_than(value, compare_with, false)\n },\n '<': function (value, compare_with) {\n return greater_than(compare_with, value, false)\n },\n '>~': function (value, compare_with) {\n return greater_than(value, compare_with, true)\n },\n '<~': function (value, compare_with) {\n return greater_than(compare_with, value, true)\n },\n '~': function (value, compare_with) {\n return isEqual(compare_with, value[0], false)\n },\n '!~': function (value, compare_with) {\n return isEqual(compare_with, value[0], true)\n }\n}\n\nvar sorting = {\n 'string': function (value, compare_with, order) {\n if (!order) order = 'asc'\n // swap if 'desc'\n if (order == 'desc')\n value = [compare_with, compare_with = value][0]\n\n return value.localeCompare(compare_with)\n },\n 'number': function (value, compare_with, order) {\n if (!order) order = 'asc'\n // swap if 'desc'\n if (order == 'desc')\n value = [compare_with, compare_with = value][0]\n\n return value - compare_with\n }\n}\n\nfunction clone_pluck(source, include_keys, exclude_keys) {\n if (include_keys.length == 0) include_keys = Object.keys(source)\n var new_obj = {}\n include_keys.forEach(function (key) {\n if (exclude_keys.indexOf(key) < 0) new_obj[key] = source[key]\n })\n return new_obj\n}\n\n\n\nexport function datafilter(data, filters, dataset_name) {\n filters = filters || []\n\n var result = data\n var operator, value\n\n // url namespace sanitize\n filters = namespace(filters, dataset_name)\n\n var data_types = types(data, { convert: true })\n\n // apply WHERE clause\n for (var key in filters) {\n if (key[0] == '_') continue\n var operator_index = (key.match(/(!|>|>~|<|<~|~|!~)$/)) ? key.match(/(!|>|>~|<|<~|~|!~)$/).index : key.length\n operator = (key.slice(operator_index) != '') ? key.slice(operator_index) : '='\n value = (filters[key][0] != \"\") ? filters[key] : null\n\n var col = key.slice(0, operator_index)\n if (data_types[col] == 'number') {\n value = value.map(function(val) { return parseFloat(val)})\n } else if (data_types[col] == 'boolean') {\n value = value.map(function(val){ return String(val) == 'true' ? true : false})\n } else if (data_types[col] == 'date') {\n value = value.map(function(val) { return Date.parse(val) })\n }\n\n result = result.filter(function (row) {\n return (typeof row[col] != 'undefined') ? operators[operator](value, row[col]) : true\n })\n }\n\n var offset = parseInt(filters['_offset']) || 0\n var limit = parseInt(filters['_limit']) || 1000\n\n result = result.slice(offset, (offset + limit))\n\n // apply SELECT clause\n if (filters['_c']) {\n var exclude_cols = [], include_cols = []\n filters['_c'].forEach(function (column) {\n column[0] == '-' ? exclude_cols.push(column.slice(1)) : include_cols.push(column)\n })\n result = result.map(function (row) {\n return clone_pluck(row, include_cols, exclude_cols)\n })\n }\n\n if (filters['_sort']) {\n result.sort(function (a, b) {\n var swap_rows = false\n filters['_sort'].forEach(function (sort) {\n var order = (sort[0] == '-') ? 'desc' : 'asc'\n if (sort[0] == '-') sort = sort.substr(1)\n if (typeof a[sort] == 'undefined') return\n // if sort.column evaluates to false, it will proceed with evaluating || expression\n var type = (isNaN(a[sort])) ? 'string' : 'number'\n swap_rows = swap_rows || sorting[type](a[sort], b[sort], order)\n })\n return swap_rows\n })\n }\n\n return result\n}\n","/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nexport default freeGlobal;\n","import freeGlobal from './_freeGlobal.js';\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\nexport default root;\n","import root from './_root.js';\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nexport default Symbol;\n","import Symbol from './_Symbol.js';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\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 nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\nexport default getRawTag;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\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 nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\nexport default objectToString;\n","import Symbol from './_Symbol.js';\nimport getRawTag from './_getRawTag.js';\nimport objectToString from './_objectToString.js';\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\nexport default baseGetTag;\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 != null && (type == 'object' || type == 'function');\n}\n\nexport default isObject;\n","import baseGetTag from './_baseGetTag.js';\nimport isObject from './isObject.js';\n\n/** `Object#toString` result references. */\nvar asyncTag = '[object AsyncFunction]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n proxyTag = '[object Proxy]';\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 if (!isObject(value)) {\n return false;\n }\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 9 which returns 'object' for typed arrays and other constructors.\n var tag = baseGetTag(value);\n return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n}\n\nexport default isFunction;\n","import root from './_root.js';\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\nexport default coreJsData;\n","import coreJsData from './_coreJsData.js';\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/**\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\nexport default isMasked;\n","/** Used for built-in method references. */\nvar funcProto = Function.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to convert.\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\nexport default toSource;\n","import isFunction from './isFunction.js';\nimport isMasked from './_isMasked.js';\nimport isObject from './isObject.js';\nimport toSource from './_toSource.js';\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 detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n objectProto = Object.prototype;\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/** 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/**\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) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n}\n\nexport default baseIsNative;\n","import baseIsNative from './_baseIsNative.js';\nimport getValue from './_getValue.js';\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\nexport default getNative;\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\nexport default getValue;\n","import getNative from './_getNative.js';\n\n/* Built-in method references that are verified to be native. */\nvar nativeCreate = getNative(Object, 'create');\n\nexport default nativeCreate;\n","import nativeCreate from './_nativeCreate.js';\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\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\nexport default hashGet;\n","import nativeCreate from './_nativeCreate.js';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\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\nexport default hashHas;\n","import hashClear from './_hashClear.js';\nimport hashDelete from './_hashDelete.js';\nimport hashGet from './_hashGet.js';\nimport hashHas from './_hashHas.js';\nimport hashSet from './_hashSet.js';\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 == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\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\nexport default Hash;\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\nexport default eq;\n","import eq from './eq.js';\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\nexport default assocIndexOf;\n","import nativeCreate from './_nativeCreate.js';\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 this.size = 0;\n}\n\nexport default hashClear;\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 var result = this.has(key) && delete this.__data__[key];\n this.size -= result ? 1 : 0;\n return result;\n}\n\nexport default hashDelete;\n","import nativeCreate from './_nativeCreate.js';\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\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 this.size += this.has(key) ? 0 : 1;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n}\n\nexport default hashSet;\n","import assocIndexOf from './_assocIndexOf.js';\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype;\n\n/** Built-in value references. */\nvar splice = arrayProto.splice;\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 --this.size;\n return true;\n}\n\nexport default listCacheDelete;\n","import listCacheClear from './_listCacheClear.js';\nimport listCacheDelete from './_listCacheDelete.js';\nimport listCacheGet from './_listCacheGet.js';\nimport listCacheHas from './_listCacheHas.js';\nimport listCacheSet from './_listCacheSet.js';\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 == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\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\nexport default ListCache;\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 this.size = 0;\n}\n\nexport default listCacheClear;\n","import assocIndexOf from './_assocIndexOf.js';\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\nexport default listCacheGet;\n","import assocIndexOf from './_assocIndexOf.js';\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\nexport default listCacheHas;\n","import assocIndexOf from './_assocIndexOf.js';\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 ++this.size;\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n}\n\nexport default listCacheSet;\n","import getNative from './_getNative.js';\nimport root from './_root.js';\n\n/* Built-in method references that are verified to be native. */\nvar Map = getNative(root, 'Map');\n\nexport default Map;\n","import isKeyable from './_isKeyable.js';\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\nexport default getMapData;\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\nexport default isKeyable;\n","import mapCacheClear from './_mapCacheClear.js';\nimport mapCacheDelete from './_mapCacheDelete.js';\nimport mapCacheGet from './_mapCacheGet.js';\nimport mapCacheHas from './_mapCacheHas.js';\nimport mapCacheSet from './_mapCacheSet.js';\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 == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\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\nexport default MapCache;\n","import Hash from './_Hash.js';\nimport ListCache from './_ListCache.js';\nimport Map from './_Map.js';\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.size = 0;\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n}\n\nexport default mapCacheClear;\n","import getMapData from './_getMapData.js';\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 var result = getMapData(this, key)['delete'](key);\n this.size -= result ? 1 : 0;\n return result;\n}\n\nexport default mapCacheDelete;\n","import getMapData from './_getMapData.js';\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\nexport default mapCacheGet;\n","import getMapData from './_getMapData.js';\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\nexport default mapCacheHas;\n","import getMapData from './_getMapData.js';\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 var data = getMapData(this, key),\n size = data.size;\n\n data.set(key, value);\n this.size += data.size == size ? 0 : 1;\n return this;\n}\n\nexport default mapCacheSet;\n","import MapCache from './_MapCache.js';\nimport setCacheAdd from './_setCacheAdd.js';\nimport setCacheHas from './_setCacheHas.js';\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 == null ? 0 : values.length;\n\n this.__data__ = new MapCache;\n while (++index < length) {\n this.add(values[index]);\n }\n}\n\n// Add methods to `SetCache`.\nSetCache.prototype.add = SetCache.prototype.push = setCacheAdd;\nSetCache.prototype.has = setCacheHas;\n\nexport default SetCache;\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\nexport default baseIsNaN;\n","import baseIndexOf from './_baseIndexOf.js';\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 == null ? 0 : array.length;\n return !!length && baseIndexOf(array, value, 0) > -1;\n}\n\nexport default arrayIncludes;\n","import baseFindIndex from './_baseFindIndex.js';\nimport baseIsNaN from './_baseIsNaN.js';\nimport strictIndexOf from './_strictIndexOf.js';\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 return value === value\n ? strictIndexOf(array, value, fromIndex)\n : baseFindIndex(array, baseIsNaN, fromIndex);\n}\n\nexport default baseIndexOf;\n","/**\n * A specialized version of `_.indexOf` which performs strict equality\n * comparisons of values, i.e. `===`.\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 strictIndexOf(array, value, fromIndex) {\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\nexport default strictIndexOf;\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\nexport default baseFindIndex;\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 == null ? 0 : array.length;\n\n while (++index < length) {\n if (comparator(value, array[index])) {\n return true;\n }\n }\n return false;\n}\n\nexport default arrayIncludesWith;\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\nexport default cacheHas;\n","/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\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\nexport default setCacheAdd;\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\nexport default setCacheHas;\n","import getNative from './_getNative.js';\nimport root from './_root.js';\n\n/* Built-in method references that are verified to be native. */\nvar Set = getNative(root, 'Set');\n\nexport default Set;\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\nexport default setToArray;\n","import Set from './_Set.js';\nimport noop from './noop.js';\nimport setToArray from './_setToArray.js';\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\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\nexport default createSet;\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\nexport default noop;\n","import SetCache from './_SetCache.js';\nimport arrayIncludes from './_arrayIncludes.js';\nimport arrayIncludesWith from './_arrayIncludesWith.js';\nimport cacheHas from './_cacheHas.js';\nimport createSet from './_createSet.js';\nimport setToArray from './_setToArray.js';\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\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\nexport default baseUniq;\n","import baseSlice from './_baseSlice.js';\n\n/**\n * Casts `array` to a slice if it's needed.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {number} start The start position.\n * @param {number} [end=array.length] The end position.\n * @returns {Array} Returns the cast slice.\n */\nfunction castSlice(array, start, end) {\n var length = array.length;\n end = end === undefined ? length : end;\n return (!start && end >= length) ? array : baseSlice(array, start, end);\n}\n\nexport default castSlice;\n","/**\n * The base implementation of `_.slice` without an iteratee call guard.\n *\n * @private\n * @param {Array} array The array to slice.\n * @param {number} [start=0] The start position.\n * @param {number} [end=array.length] The end position.\n * @returns {Array} Returns the slice of `array`.\n */\nfunction baseSlice(array, start, end) {\n var index = -1,\n length = array.length;\n\n if (start < 0) {\n start = -start > length ? 0 : (length + start);\n }\n end = end > length ? length : end;\n if (end < 0) {\n end += length;\n }\n length = start > end ? 0 : ((end - start) >>> 0);\n start >>>= 0;\n\n var result = Array(length);\n while (++index < length) {\n result[index] = array[index + start];\n }\n return result;\n}\n\nexport default baseSlice;\n","/** Used to compose unicode character classes. */\nvar rsAstralRange = '\\\\ud800-\\\\udfff',\n rsComboMarksRange = '\\\\u0300-\\\\u036f',\n reComboHalfMarksRange = '\\\\ufe20-\\\\ufe2f',\n rsComboSymbolsRange = '\\\\u20d0-\\\\u20ff',\n rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,\n rsVarRange = '\\\\ufe0e\\\\ufe0f';\n\n/** Used to compose unicode capture groups. */\nvar rsZWJ = '\\\\u200d';\n\n/** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */\nvar reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']');\n\n/**\n * Checks if `string` contains Unicode symbols.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {boolean} Returns `true` if a symbol is found, else `false`.\n */\nfunction hasUnicode(string) {\n return reHasUnicode.test(string);\n}\n\nexport default hasUnicode;\n","/** Used to compose unicode character classes. */\nvar rsAstralRange = '\\\\ud800-\\\\udfff',\n rsComboMarksRange = '\\\\u0300-\\\\u036f',\n reComboHalfMarksRange = '\\\\ufe20-\\\\ufe2f',\n rsComboSymbolsRange = '\\\\u20d0-\\\\u20ff',\n rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,\n rsVarRange = '\\\\ufe0e\\\\ufe0f';\n\n/** Used to compose unicode capture groups. */\nvar rsAstral = '[' + rsAstralRange + ']',\n rsCombo = '[' + rsComboRange + ']',\n rsFitz = '\\\\ud83c[\\\\udffb-\\\\udfff]',\n rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',\n rsNonAstral = '[^' + rsAstralRange + ']',\n rsRegional = '(?:\\\\ud83c[\\\\udde6-\\\\uddff]){2}',\n rsSurrPair = '[\\\\ud800-\\\\udbff][\\\\udc00-\\\\udfff]',\n rsZWJ = '\\\\u200d';\n\n/** Used to compose unicode regexes. */\nvar reOptMod = rsModifier + '?',\n rsOptVar = '[' + rsVarRange + ']?',\n rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',\n rsSeq = rsOptVar + reOptMod + rsOptJoin,\n rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')';\n\n/** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */\nvar reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g');\n\n/**\n * Converts a Unicode `string` to an array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the converted array.\n */\nfunction unicodeToArray(string) {\n return string.match(reUnicode) || [];\n}\n\nexport default unicodeToArray;\n","import asciiToArray from './_asciiToArray.js';\nimport hasUnicode from './_hasUnicode.js';\nimport unicodeToArray from './_unicodeToArray.js';\n\n/**\n * Converts `string` to an array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the converted array.\n */\nfunction stringToArray(string) {\n return hasUnicode(string)\n ? unicodeToArray(string)\n : asciiToArray(string);\n}\n\nexport default stringToArray;\n","/**\n * Converts an ASCII `string` to an array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the converted array.\n */\nfunction asciiToArray(string) {\n return string.split('');\n}\n\nexport default asciiToArray;\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\nexport default isArray;\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 != null && typeof value == 'object';\n}\n\nexport default isObjectLike;\n","import baseGetTag from './_baseGetTag.js';\nimport isObjectLike from './isObjectLike.js';\n\n/** `Object#toString` result references. */\nvar symbolTag = '[object Symbol]';\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) && baseGetTag(value) == symbolTag);\n}\n\nexport default isSymbol;\n","import Symbol from './_Symbol.js';\nimport arrayMap from './_arrayMap.js';\nimport isArray from './isArray.js';\nimport isSymbol from './isSymbol.js';\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolToString = symbolProto ? symbolProto.toString : undefined;\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 (isArray(value)) {\n // Recursively convert values (susceptible to call stack limits).\n return arrayMap(value, baseToString) + '';\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\nexport default baseToString;\n","/**\n * A specialized version of `_.map` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n */\nfunction arrayMap(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length,\n result = Array(length);\n\n while (++index < length) {\n result[index] = iteratee(array[index], index, array);\n }\n return result;\n}\n\nexport default arrayMap;\n","import baseToString from './_baseToString.js';\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 convert.\n * @returns {string} Returns the converted 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\nexport default toString;\n","import createCaseFirst from './_createCaseFirst.js';\n\n/**\n * Converts the first character of `string` to upper case.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the converted string.\n * @example\n *\n * _.upperFirst('fred');\n * // => 'Fred'\n *\n * _.upperFirst('FRED');\n * // => 'FRED'\n */\nvar upperFirst = createCaseFirst('toUpperCase');\n\nexport default upperFirst;\n","import castSlice from './_castSlice.js';\nimport hasUnicode from './_hasUnicode.js';\nimport stringToArray from './_stringToArray.js';\nimport toString from './toString.js';\n\n/**\n * Creates a function like `_.lowerFirst`.\n *\n * @private\n * @param {string} methodName The name of the `String` case method to use.\n * @returns {Function} Returns the new case function.\n */\nfunction createCaseFirst(methodName) {\n return function(string) {\n string = toString(string);\n\n var strSymbols = hasUnicode(string)\n ? stringToArray(string)\n : undefined;\n\n var chr = strSymbols\n ? strSymbols[0]\n : string.charAt(0);\n\n var trailing = strSymbols\n ? castSlice(strSymbols, 1).join('')\n : string.slice(1);\n\n return chr[methodName]() + trailing;\n };\n}\n\nexport default createCaseFirst;\n","import ListCache from './_ListCache.js';\nimport stackClear from './_stackClear.js';\nimport stackDelete from './_stackDelete.js';\nimport stackGet from './_stackGet.js';\nimport stackHas from './_stackHas.js';\nimport stackSet from './_stackSet.js';\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 var data = this.__data__ = new ListCache(entries);\n this.size = data.size;\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\nexport default Stack;\n","import ListCache from './_ListCache.js';\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 this.size = 0;\n}\n\nexport default stackClear;\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 var data = this.__data__,\n result = data['delete'](key);\n\n this.size = data.size;\n return result;\n}\n\nexport default stackDelete;\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\nexport default stackGet;\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\nexport default stackHas;\n","import ListCache from './_ListCache.js';\nimport Map from './_Map.js';\nimport MapCache from './_MapCache.js';\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\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 data = this.__data__;\n if (data instanceof ListCache) {\n var pairs = data.__data__;\n if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n pairs.push([key, value]);\n this.size = ++data.size;\n return this;\n }\n data = this.__data__ = new MapCache(pairs);\n }\n data.set(key, value);\n this.size = data.size;\n return this;\n}\n\nexport default stackSet;\n","import getNative from './_getNative.js';\n\nvar defineProperty = (function() {\n try {\n var func = getNative(Object, 'defineProperty');\n func({}, '', {});\n return func;\n } catch (e) {}\n}());\n\nexport default defineProperty;\n","import defineProperty from './_defineProperty.js';\n\n/**\n * The base implementation of `assignValue` and `assignMergeValue` without\n * value checks.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction baseAssignValue(object, key, value) {\n if (key == '__proto__' && defineProperty) {\n defineProperty(object, key, {\n 'configurable': true,\n 'enumerable': true,\n 'value': value,\n 'writable': true\n });\n } else {\n object[key] = value;\n }\n}\n\nexport default baseAssignValue;\n","import baseAssignValue from './_baseAssignValue.js';\nimport eq from './eq.js';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Assigns `value` to `key` of `object` if the existing value is not equivalent\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignValue(object, key, value) {\n var objValue = object[key];\n if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n}\n\nexport default assignValue;\n","import assignValue from './_assignValue.js';\nimport baseAssignValue from './_baseAssignValue.js';\n\n/**\n * Copies properties of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy properties from.\n * @param {Array} props The property identifiers to copy.\n * @param {Object} [object={}] The object to copy properties to.\n * @param {Function} [customizer] The function to customize copied values.\n * @returns {Object} Returns `object`.\n */\nfunction copyObject(source, props, object, customizer) {\n var isNew = !object;\n object || (object = {});\n\n var index = -1,\n length = props.length;\n\n while (++index < length) {\n var key = props[index];\n\n var newValue = customizer\n ? customizer(object[key], source[key], key, object, source)\n : undefined;\n\n if (newValue === undefined) {\n newValue = source[key];\n }\n if (isNew) {\n baseAssignValue(object, key, newValue);\n } else {\n assignValue(object, key, newValue);\n }\n }\n return object;\n}\n\nexport default copyObject;\n","import baseGetTag from './_baseGetTag.js';\nimport isObjectLike from './isObjectLike.js';\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]';\n\n/**\n * The base implementation of `_.isArguments`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n */\nfunction baseIsArguments(value) {\n return isObjectLike(value) && baseGetTag(value) == argsTag;\n}\n\nexport default baseIsArguments;\n","import baseIsArguments from './_baseIsArguments.js';\nimport isObjectLike from './isObjectLike.js';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\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 */\nvar isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\n return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n !propertyIsEnumerable.call(value, 'callee');\n};\n\nexport default isArguments;\n","import root from './_root.js';\nimport stubFalse from './stubFalse.js';\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/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;\n\n/**\n * Checks if `value` is a buffer.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n * @example\n *\n * _.isBuffer(new Buffer(2));\n * // => true\n *\n * _.isBuffer(new Uint8Array(2));\n * // => false\n */\nvar isBuffer = nativeIsBuffer || stubFalse;\n\nexport default isBuffer;\n","/**\n * This method returns `false`.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {boolean} Returns `false`.\n * @example\n *\n * _.times(2, _.stubFalse);\n * // => [false, false]\n */\nfunction stubFalse() {\n return false;\n}\n\nexport default stubFalse;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\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 var type = typeof value;\n length = length == null ? MAX_SAFE_INTEGER : length;\n\n return !!length &&\n (type == 'number' ||\n (type != 'symbol' && reIsUint.test(value))) &&\n (value > -1 && value % 1 == 0 && value < length);\n}\n\nexport default isIndex;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\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\nexport default isLength;\n","import baseGetTag from './_baseGetTag.js';\nimport isLength from './isLength.js';\nimport isObjectLike from './isObjectLike.js';\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 mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\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 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/**\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[baseGetTag(value)];\n}\n\nexport default baseIsTypedArray;\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\nexport default baseUnary;\n","import freeGlobal from './_freeGlobal.js';\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 // Use `util.types` for Node.js 10+.\n var types = freeModule && freeModule.require && freeModule.require('util').types;\n\n if (types) {\n return types;\n }\n\n // Legacy `process.binding('util')` for Node.js < 10.\n return freeProcess && freeProcess.binding && freeProcess.binding('util');\n } catch (e) {}\n}());\n\nexport default nodeUtil;\n","import baseIsTypedArray from './_baseIsTypedArray.js';\nimport baseUnary from './_baseUnary.js';\nimport nodeUtil from './_nodeUtil.js';\n\n/* Node.js helper references. */\nvar nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\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\nexport default isTypedArray;\n","import baseTimes from './_baseTimes.js';\nimport isArguments from './isArguments.js';\nimport isArray from './isArray.js';\nimport isBuffer from './isBuffer.js';\nimport isIndex from './_isIndex.js';\nimport isTypedArray from './isTypedArray.js';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\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 var isArr = isArray(value),\n isArg = !isArr && isArguments(value),\n isBuff = !isArr && !isArg && isBuffer(value),\n isType = !isArr && !isArg && !isBuff && isTypedArray(value),\n skipIndexes = isArr || isArg || isBuff || isType,\n result = skipIndexes ? baseTimes(value.length, String) : [],\n length = result.length;\n\n for (var key in value) {\n if ((inherited || hasOwnProperty.call(value, key)) &&\n !(skipIndexes && (\n // Safari 9 has enumerable `arguments.length` in strict mode.\n key == 'length' ||\n // Node.js 0.10 has enumerable non-index properties on buffers.\n (isBuff && (key == 'offset' || key == 'parent')) ||\n // PhantomJS 2 has enumerable non-index properties on typed arrays.\n (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||\n // Skip index properties.\n isIndex(key, length)\n ))) {\n result.push(key);\n }\n }\n return result;\n}\n\nexport default arrayLikeKeys;\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\nexport default baseTimes;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\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\nexport default isPrototype;\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\nexport default overArg;\n","import overArg from './_overArg.js';\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeKeys = overArg(Object.keys, Object);\n\nexport default nativeKeys;\n","import isPrototype from './_isPrototype.js';\nimport nativeKeys from './_nativeKeys.js';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\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\nexport default baseKeys;\n","import isFunction from './isFunction.js';\nimport isLength from './isLength.js';\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\nexport default isArrayLike;\n","import arrayLikeKeys from './_arrayLikeKeys.js';\nimport baseKeys from './_baseKeys.js';\nimport isArrayLike from './isArrayLike.js';\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\nexport default keys;\n","import isObject from './isObject.js';\nimport isPrototype from './_isPrototype.js';\nimport nativeKeysIn from './_nativeKeysIn.js';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keysIn` 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 baseKeysIn(object) {\n if (!isObject(object)) {\n return nativeKeysIn(object);\n }\n var isProto = isPrototype(object),\n result = [];\n\n for (var key in object) {\n if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {\n result.push(key);\n }\n }\n return result;\n}\n\nexport default baseKeysIn;\n","/**\n * This function is like\n * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * except that it includes inherited enumerable properties.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction nativeKeysIn(object) {\n var result = [];\n if (object != null) {\n for (var key in Object(object)) {\n result.push(key);\n }\n }\n return result;\n}\n\nexport default nativeKeysIn;\n","import arrayLikeKeys from './_arrayLikeKeys.js';\nimport baseKeysIn from './_baseKeysIn.js';\nimport isArrayLike from './isArrayLike.js';\n\n/**\n * Creates an array of the own and inherited enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\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 * _.keysIn(new Foo);\n * // => ['a', 'b', 'c'] (iteration order is not guaranteed)\n */\nfunction keysIn(object) {\n return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);\n}\n\nexport default keysIn;\n","import root from './_root.js';\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/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined,\n allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined;\n\n/**\n * Creates a clone of `buffer`.\n *\n * @private\n * @param {Buffer} buffer The buffer to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Buffer} Returns the cloned buffer.\n */\nfunction cloneBuffer(buffer, isDeep) {\n if (isDeep) {\n return buffer.slice();\n }\n var length = buffer.length,\n result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);\n\n buffer.copy(result);\n return result;\n}\n\nexport default cloneBuffer;\n","/**\n * This method returns a new empty array.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {Array} Returns the new empty array.\n * @example\n *\n * var arrays = _.times(2, _.stubArray);\n *\n * console.log(arrays);\n * // => [[], []]\n *\n * console.log(arrays[0] === arrays[1]);\n * // => false\n */\nfunction stubArray() {\n return [];\n}\n\nexport default stubArray;\n","import arrayFilter from './_arrayFilter.js';\nimport stubArray from './stubArray.js';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbols = !nativeGetSymbols ? stubArray : function(object) {\n if (object == null) {\n return [];\n }\n object = Object(object);\n return arrayFilter(nativeGetSymbols(object), function(symbol) {\n return propertyIsEnumerable.call(object, symbol);\n });\n};\n\nexport default getSymbols;\n","/**\n * A specialized version of `_.filter` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\nfunction arrayFilter(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (predicate(value, index, array)) {\n result[resIndex++] = value;\n }\n }\n return result;\n}\n\nexport default arrayFilter;\n","/**\n * Appends the elements of `values` to `array`.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to append.\n * @returns {Array} Returns `array`.\n */\nfunction arrayPush(array, values) {\n var index = -1,\n length = values.length,\n offset = array.length;\n\n while (++index < length) {\n array[offset + index] = values[index];\n }\n return array;\n}\n\nexport default arrayPush;\n","import overArg from './_overArg.js';\n\n/** Built-in value references. */\nvar getPrototype = overArg(Object.getPrototypeOf, Object);\n\nexport default getPrototype;\n","import arrayPush from './_arrayPush.js';\nimport getPrototype from './_getPrototype.js';\nimport getSymbols from './_getSymbols.js';\nimport stubArray from './stubArray.js';\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own and inherited enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {\n var result = [];\n while (object) {\n arrayPush(result, getSymbols(object));\n object = getPrototype(object);\n }\n return result;\n};\n\nexport default getSymbolsIn;\n","import arrayPush from './_arrayPush.js';\nimport isArray from './isArray.js';\n\n/**\n * The base implementation of `getAllKeys` and `getAllKeysIn` which uses\n * `keysFunc` and `symbolsFunc` to get the enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @param {Function} symbolsFunc The function to get the symbols of `object`.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction baseGetAllKeys(object, keysFunc, symbolsFunc) {\n var result = keysFunc(object);\n return isArray(object) ? result : arrayPush(result, symbolsFunc(object));\n}\n\nexport default baseGetAllKeys;\n","import baseGetAllKeys from './_baseGetAllKeys.js';\nimport getSymbols from './_getSymbols.js';\nimport keys from './keys.js';\n\n/**\n * Creates an array of own enumerable property names and symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeys(object) {\n return baseGetAllKeys(object, keys, getSymbols);\n}\n\nexport default getAllKeys;\n","import baseGetAllKeys from './_baseGetAllKeys.js';\nimport getSymbolsIn from './_getSymbolsIn.js';\nimport keysIn from './keysIn.js';\n\n/**\n * Creates an array of own and inherited enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeysIn(object) {\n return baseGetAllKeys(object, keysIn, getSymbolsIn);\n}\n\nexport default getAllKeysIn;\n","import getNative from './_getNative.js';\nimport root from './_root.js';\n\n/* Built-in method references that are verified to be native. */\nvar DataView = getNative(root, 'DataView');\n\nexport default DataView;\n","import getNative from './_getNative.js';\nimport root from './_root.js';\n\n/* Built-in method references that are verified to be native. */\nvar Promise = getNative(root, 'Promise');\n\nexport default Promise;\n","import getNative from './_getNative.js';\nimport root from './_root.js';\n\n/* Built-in method references that are verified to be native. */\nvar WeakMap = getNative(root, 'WeakMap');\n\nexport default WeakMap;\n","import DataView from './_DataView.js';\nimport Map from './_Map.js';\nimport Promise from './_Promise.js';\nimport Set from './_Set.js';\nimport WeakMap from './_WeakMap.js';\nimport baseGetTag from './_baseGetTag.js';\nimport toSource from './_toSource.js';\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]',\n objectTag = '[object Object]',\n promiseTag = '[object Promise]',\n setTag = '[object Set]',\n weakMapTag = '[object WeakMap]';\n\nvar dataViewTag = '[object DataView]';\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/**\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 and promises in Node.js < 6.\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 = baseGetTag(value),\n Ctor = result == objectTag ? value.constructor : undefined,\n ctorString = Ctor ? toSource(Ctor) : '';\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\nexport default getTag;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Initializes an array clone.\n *\n * @private\n * @param {Array} array The array to clone.\n * @returns {Array} Returns the initialized clone.\n */\nfunction initCloneArray(array) {\n var length = array.length,\n result = new array.constructor(length);\n\n // Add properties assigned by `RegExp#exec`.\n if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {\n result.index = array.index;\n result.input = array.input;\n }\n return result;\n}\n\nexport default initCloneArray;\n","import root from './_root.js';\n\n/** Built-in value references. */\nvar Uint8Array = root.Uint8Array;\n\nexport default Uint8Array;\n","import Uint8Array from './_Uint8Array.js';\n\n/**\n * Creates a clone of `arrayBuffer`.\n *\n * @private\n * @param {ArrayBuffer} arrayBuffer The array buffer to clone.\n * @returns {ArrayBuffer} Returns the cloned array buffer.\n */\nfunction cloneArrayBuffer(arrayBuffer) {\n var result = new arrayBuffer.constructor(arrayBuffer.byteLength);\n new Uint8Array(result).set(new Uint8Array(arrayBuffer));\n return result;\n}\n\nexport default cloneArrayBuffer;\n","/** Used to match `RegExp` flags from their coerced string values. */\nvar reFlags = /\\w*$/;\n\n/**\n * Creates a clone of `regexp`.\n *\n * @private\n * @param {Object} regexp The regexp to clone.\n * @returns {Object} Returns the cloned regexp.\n */\nfunction cloneRegExp(regexp) {\n var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));\n result.lastIndex = regexp.lastIndex;\n return result;\n}\n\nexport default cloneRegExp;\n","import Symbol from './_Symbol.js';\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * Creates a clone of the `symbol` object.\n *\n * @private\n * @param {Object} symbol The symbol object to clone.\n * @returns {Object} Returns the cloned symbol object.\n */\nfunction cloneSymbol(symbol) {\n return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};\n}\n\nexport default cloneSymbol;\n","import cloneArrayBuffer from './_cloneArrayBuffer.js';\nimport cloneDataView from './_cloneDataView.js';\nimport cloneRegExp from './_cloneRegExp.js';\nimport cloneSymbol from './_cloneSymbol.js';\nimport cloneTypedArray from './_cloneTypedArray.js';\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]';\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/**\n * Initializes an object clone based on its `toStringTag`.\n *\n * **Note:** This function only supports cloning values with tags of\n * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.\n *\n * @private\n * @param {Object} object The object to clone.\n * @param {string} tag The `toStringTag` of the object to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneByTag(object, tag, isDeep) {\n var Ctor = object.constructor;\n switch (tag) {\n case arrayBufferTag:\n return cloneArrayBuffer(object);\n\n case boolTag:\n case dateTag:\n return new Ctor(+object);\n\n case dataViewTag:\n return cloneDataView(object, isDeep);\n\n case float32Tag: case float64Tag:\n case int8Tag: case int16Tag: case int32Tag:\n case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:\n return cloneTypedArray(object, isDeep);\n\n case mapTag:\n return new Ctor;\n\n case numberTag:\n case stringTag:\n return new Ctor(object);\n\n case regexpTag:\n return cloneRegExp(object);\n\n case setTag:\n return new Ctor;\n\n case symbolTag:\n return cloneSymbol(object);\n }\n}\n\nexport default initCloneByTag;\n","import cloneArrayBuffer from './_cloneArrayBuffer.js';\n\n/**\n * Creates a clone of `dataView`.\n *\n * @private\n * @param {Object} dataView The data view to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned data view.\n */\nfunction cloneDataView(dataView, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;\n return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);\n}\n\nexport default cloneDataView;\n","import cloneArrayBuffer from './_cloneArrayBuffer.js';\n\n/**\n * Creates a clone of `typedArray`.\n *\n * @private\n * @param {Object} typedArray The typed array to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned typed array.\n */\nfunction cloneTypedArray(typedArray, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;\n return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);\n}\n\nexport default cloneTypedArray;\n","import isObject from './isObject.js';\n\n/** Built-in value references. */\nvar objectCreate = Object.create;\n\n/**\n * The base implementation of `_.create` without support for assigning\n * properties to the created object.\n *\n * @private\n * @param {Object} proto The object to inherit from.\n * @returns {Object} Returns the new object.\n */\nvar baseCreate = (function() {\n function object() {}\n return function(proto) {\n if (!isObject(proto)) {\n return {};\n }\n if (objectCreate) {\n return objectCreate(proto);\n }\n object.prototype = proto;\n var result = new object;\n object.prototype = undefined;\n return result;\n };\n}());\n\nexport default baseCreate;\n","import baseIsMap from './_baseIsMap.js';\nimport baseUnary from './_baseUnary.js';\nimport nodeUtil from './_nodeUtil.js';\n\n/* Node.js helper references. */\nvar nodeIsMap = nodeUtil && nodeUtil.isMap;\n\n/**\n * Checks if `value` is classified as a `Map` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n * @example\n *\n * _.isMap(new Map);\n * // => true\n *\n * _.isMap(new WeakMap);\n * // => false\n */\nvar isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;\n\nexport default isMap;\n","import getTag from './_getTag.js';\nimport isObjectLike from './isObjectLike.js';\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]';\n\n/**\n * The base implementation of `_.isMap` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n */\nfunction baseIsMap(value) {\n return isObjectLike(value) && getTag(value) == mapTag;\n}\n\nexport default baseIsMap;\n","import baseIsSet from './_baseIsSet.js';\nimport baseUnary from './_baseUnary.js';\nimport nodeUtil from './_nodeUtil.js';\n\n/* Node.js helper references. */\nvar nodeIsSet = nodeUtil && nodeUtil.isSet;\n\n/**\n * Checks if `value` is classified as a `Set` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n * @example\n *\n * _.isSet(new Set);\n * // => true\n *\n * _.isSet(new WeakSet);\n * // => false\n */\nvar isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;\n\nexport default isSet;\n","import getTag from './_getTag.js';\nimport isObjectLike from './isObjectLike.js';\n\n/** `Object#toString` result references. */\nvar setTag = '[object Set]';\n\n/**\n * The base implementation of `_.isSet` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n */\nfunction baseIsSet(value) {\n return isObjectLike(value) && getTag(value) == setTag;\n}\n\nexport default baseIsSet;\n","import Stack from './_Stack.js';\nimport arrayEach from './_arrayEach.js';\nimport assignValue from './_assignValue.js';\nimport baseAssign from './_baseAssign.js';\nimport baseAssignIn from './_baseAssignIn.js';\nimport cloneBuffer from './_cloneBuffer.js';\nimport copyArray from './_copyArray.js';\nimport copySymbols from './_copySymbols.js';\nimport copySymbolsIn from './_copySymbolsIn.js';\nimport getAllKeys from './_getAllKeys.js';\nimport getAllKeysIn from './_getAllKeysIn.js';\nimport getTag from './_getTag.js';\nimport initCloneArray from './_initCloneArray.js';\nimport initCloneByTag from './_initCloneByTag.js';\nimport initCloneObject from './_initCloneObject.js';\nimport isArray from './isArray.js';\nimport isBuffer from './isBuffer.js';\nimport isMap from './isMap.js';\nimport isObject from './isObject.js';\nimport isSet from './isSet.js';\nimport keys from './keys.js';\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1,\n CLONE_FLAT_FLAG = 2,\n CLONE_SYMBOLS_FLAG = 4;\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 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 identify `toStringTag` values supported by `_.clone`. */\nvar cloneableTags = {};\ncloneableTags[argsTag] = cloneableTags[arrayTag] =\ncloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =\ncloneableTags[boolTag] = cloneableTags[dateTag] =\ncloneableTags[float32Tag] = cloneableTags[float64Tag] =\ncloneableTags[int8Tag] = cloneableTags[int16Tag] =\ncloneableTags[int32Tag] = cloneableTags[mapTag] =\ncloneableTags[numberTag] = cloneableTags[objectTag] =\ncloneableTags[regexpTag] = cloneableTags[setTag] =\ncloneableTags[stringTag] = cloneableTags[symbolTag] =\ncloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =\ncloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;\ncloneableTags[errorTag] = cloneableTags[funcTag] =\ncloneableTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.clone` and `_.cloneDeep` which tracks\n * traversed objects.\n *\n * @private\n * @param {*} value The value to clone.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Deep clone\n * 2 - Flatten inherited properties\n * 4 - Clone symbols\n * @param {Function} [customizer] The function to customize cloning.\n * @param {string} [key] The key of `value`.\n * @param {Object} [object] The parent object of `value`.\n * @param {Object} [stack] Tracks traversed objects and their clone counterparts.\n * @returns {*} Returns the cloned value.\n */\nfunction baseClone(value, bitmask, customizer, key, object, stack) {\n var result,\n isDeep = bitmask & CLONE_DEEP_FLAG,\n isFlat = bitmask & CLONE_FLAT_FLAG,\n isFull = bitmask & CLONE_SYMBOLS_FLAG;\n\n if (customizer) {\n result = object ? customizer(value, key, object, stack) : customizer(value);\n }\n if (result !== undefined) {\n return result;\n }\n if (!isObject(value)) {\n return value;\n }\n var isArr = isArray(value);\n if (isArr) {\n result = initCloneArray(value);\n if (!isDeep) {\n return copyArray(value, result);\n }\n } else {\n var tag = getTag(value),\n isFunc = tag == funcTag || tag == genTag;\n\n if (isBuffer(value)) {\n return cloneBuffer(value, isDeep);\n }\n if (tag == objectTag || tag == argsTag || (isFunc && !object)) {\n result = (isFlat || isFunc) ? {} : initCloneObject(value);\n if (!isDeep) {\n return isFlat\n ? copySymbolsIn(value, baseAssignIn(result, value))\n : copySymbols(value, baseAssign(result, value));\n }\n } else {\n if (!cloneableTags[tag]) {\n return object ? value : {};\n }\n result = initCloneByTag(value, tag, isDeep);\n }\n }\n // Check for circular references and return its corresponding clone.\n stack || (stack = new Stack);\n var stacked = stack.get(value);\n if (stacked) {\n return stacked;\n }\n stack.set(value, result);\n\n if (isSet(value)) {\n value.forEach(function(subValue) {\n result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));\n });\n } else if (isMap(value)) {\n value.forEach(function(subValue, key) {\n result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n }\n\n var keysFunc = isFull\n ? (isFlat ? getAllKeysIn : getAllKeys)\n : (isFlat ? keysIn : keys);\n\n var props = isArr ? undefined : keysFunc(value);\n arrayEach(props || value, function(subValue, key) {\n if (props) {\n key = subValue;\n subValue = value[key];\n }\n // Recursively populate clone (susceptible to call stack limits).\n assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n return result;\n}\n\nexport default baseClone;\n","/**\n * Copies the values of `source` to `array`.\n *\n * @private\n * @param {Array} source The array to copy values from.\n * @param {Array} [array=[]] The array to copy values to.\n * @returns {Array} Returns `array`.\n */\nfunction copyArray(source, array) {\n var index = -1,\n length = source.length;\n\n array || (array = Array(length));\n while (++index < length) {\n array[index] = source[index];\n }\n return array;\n}\n\nexport default copyArray;\n","import baseCreate from './_baseCreate.js';\nimport getPrototype from './_getPrototype.js';\nimport isPrototype from './_isPrototype.js';\n\n/**\n * Initializes an object clone.\n *\n * @private\n * @param {Object} object The object to clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneObject(object) {\n return (typeof object.constructor == 'function' && !isPrototype(object))\n ? baseCreate(getPrototype(object))\n : {};\n}\n\nexport default initCloneObject;\n","import copyObject from './_copyObject.js';\nimport getSymbolsIn from './_getSymbolsIn.js';\n\n/**\n * Copies own and inherited symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\nfunction copySymbolsIn(source, object) {\n return copyObject(source, getSymbolsIn(source), object);\n}\n\nexport default copySymbolsIn;\n","import copyObject from './_copyObject.js';\nimport keysIn from './keysIn.js';\n\n/**\n * The base implementation of `_.assignIn` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\nfunction baseAssignIn(object, source) {\n return object && copyObject(source, keysIn(source), object);\n}\n\nexport default baseAssignIn;\n","import copyObject from './_copyObject.js';\nimport getSymbols from './_getSymbols.js';\n\n/**\n * Copies own symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\nfunction copySymbols(source, object) {\n return copyObject(source, getSymbols(source), object);\n}\n\nexport default copySymbols;\n","import copyObject from './_copyObject.js';\nimport keys from './keys.js';\n\n/**\n * The base implementation of `_.assign` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\nfunction baseAssign(object, source) {\n return object && copyObject(source, keys(source), object);\n}\n\nexport default baseAssign;\n","/**\n * A specialized version of `_.forEach` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns `array`.\n */\nfunction arrayEach(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (iteratee(array[index], index, array) === false) {\n break;\n }\n }\n return array;\n}\n\nexport default arrayEach;\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 == null ? 0 : array.length;\n\n while (++index < length) {\n if (predicate(array[index], index, array)) {\n return true;\n }\n }\n return false;\n}\n\nexport default arraySome;\n","import SetCache from './_SetCache.js';\nimport arraySome from './_arraySome.js';\nimport cacheHas from './_cacheHas.js';\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\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 {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\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, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_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 & COMPARE_UNORDERED_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 (!cacheHas(seen, othIndex) &&\n (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {\n return seen.push(othIndex);\n }\n })) {\n result = false;\n break;\n }\n } else if (!(\n arrValue === othValue ||\n equalFunc(arrValue, othValue, bitmask, customizer, stack)\n )) {\n result = false;\n break;\n }\n }\n stack['delete'](array);\n stack['delete'](other);\n return result;\n}\n\nexport default equalArrays;\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\nexport default mapToArray;\n","import Symbol from './_Symbol.js';\nimport Uint8Array from './_Uint8Array.js';\nimport eq from './eq.js';\nimport equalArrays from './_equalArrays.js';\nimport mapToArray from './_mapToArray.js';\nimport setToArray from './_setToArray.js';\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]';\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\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 {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\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, bitmask, customizer, equalFunc, 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 & COMPARE_PARTIAL_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 |= COMPARE_UNORDERED_FLAG;\n\n // Recursively compare objects (susceptible to call stack limits).\n stack.set(object, other);\n var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, 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\nexport default equalByTag;\n","import getAllKeys from './_getAllKeys.js';\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\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 {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\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, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n objProps = getAllKeys(object),\n objLength = objProps.length,\n othProps = getAllKeys(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, bitmask, customizer, 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\nexport default equalObjects;\n","import Stack from './_Stack.js';\nimport equalArrays from './_equalArrays.js';\nimport equalByTag from './_equalByTag.js';\nimport equalObjects from './_equalObjects.js';\nimport getTag from './_getTag.js';\nimport isArray from './isArray.js';\nimport isBuffer from './isBuffer.js';\nimport isTypedArray from './isTypedArray.js';\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n objectTag = '[object Object]';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\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 {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\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, bitmask, customizer, equalFunc, stack) {\n var objIsArr = isArray(object),\n othIsArr = isArray(other),\n objTag = objIsArr ? arrayTag : getTag(object),\n othTag = othIsArr ? arrayTag : getTag(other);\n\n objTag = objTag == argsTag ? objectTag : objTag;\n othTag = othTag == argsTag ? objectTag : othTag;\n\n var objIsObj = objTag == objectTag,\n othIsObj = othTag == objectTag,\n isSameTag = objTag == othTag;\n\n if (isSameTag && isBuffer(object)) {\n if (!isBuffer(other)) {\n return false;\n }\n objIsArr = true;\n objIsObj = false;\n }\n if (isSameTag && !objIsObj) {\n stack || (stack = new Stack);\n return (objIsArr || isTypedArray(object))\n ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)\n : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);\n }\n if (!(bitmask & COMPARE_PARTIAL_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, bitmask, customizer, stack);\n }\n }\n if (!isSameTag) {\n return false;\n }\n stack || (stack = new Stack);\n return equalObjects(object, other, bitmask, customizer, equalFunc, stack);\n}\n\nexport default baseIsEqualDeep;\n","import baseIsEqualDeep from './_baseIsEqualDeep.js';\nimport isObjectLike from './isObjectLike.js';\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 {boolean} bitmask The bitmask flags.\n * 1 - Unordered comparison\n * 2 - Partial comparison\n * @param {Function} [customizer] The function to customize comparisons.\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, bitmask, customizer, stack) {\n if (value === other) {\n return true;\n }\n if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {\n return value !== value && other !== other;\n }\n return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);\n}\n\nexport default baseIsEqual;\n","import Stack from './_Stack.js';\nimport baseIsEqual from './_baseIsEqual.js';\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\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, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack)\n : result\n )) {\n return false;\n }\n }\n }\n return true;\n}\n\nexport default baseIsMatch;\n","import isObject from './isObject.js';\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\nexport default isStrictComparable;\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\nexport default matchesStrictComparable;\n","import baseIsMatch from './_baseIsMatch.js';\nimport getMatchData from './_getMatchData.js';\nimport matchesStrictComparable from './_matchesStrictComparable.js';\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\nexport default baseMatches;\n","import isStrictComparable from './_isStrictComparable.js';\nimport keys from './keys.js';\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\nexport default getMatchData;\n","import isArray from './isArray.js';\nimport isSymbol from './isSymbol.js';\n\n/** Used to match property names within property paths. */\nvar reIsDeepProp = /\\.|\\[(?:[^[\\]]*|([\"'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,\n reIsPlainProp = /^\\w*$/;\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\nexport default isKey;\n","import MapCache from './_MapCache.js';\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\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 `clear`, `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 != null && 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) || cache;\n return result;\n };\n memoized.cache = new (memoize.Cache || MapCache);\n return memoized;\n}\n\n// Expose `MapCache`.\nmemoize.Cache = MapCache;\n\nexport default memoize;\n","import memoizeCapped from './_memoizeCapped.js';\n\n/** Used to match property names within property paths. */\nvar rePropName = /[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g;\n\n/** Used to match backslashes in property paths. */\nvar reEscapeChar = /\\\\(\\\\)?/g;\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 = memoizeCapped(function(string) {\n var result = [];\n if (string.charCodeAt(0) === 46 /* . */) {\n result.push('');\n }\n string.replace(rePropName, function(match, number, quote, subString) {\n result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));\n });\n return result;\n});\n\nexport default stringToPath;\n","import memoize from './memoize.js';\n\n/** Used as the maximum memoize cache size. */\nvar MAX_MEMOIZE_SIZE = 500;\n\n/**\n * A specialized version of `_.memoize` which clears the memoized function's\n * cache when it exceeds `MAX_MEMOIZE_SIZE`.\n *\n * @private\n * @param {Function} func The function to have its output memoized.\n * @returns {Function} Returns the new memoized function.\n */\nfunction memoizeCapped(func) {\n var result = memoize(func, function(key) {\n if (cache.size === MAX_MEMOIZE_SIZE) {\n cache.clear();\n }\n return key;\n });\n\n var cache = result.cache;\n return result;\n}\n\nexport default memoizeCapped;\n","import isArray from './isArray.js';\nimport isKey from './_isKey.js';\nimport stringToPath from './_stringToPath.js';\nimport toString from './toString.js';\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 * @param {Object} [object] The object to query keys on.\n * @returns {Array} Returns the cast property path array.\n */\nfunction castPath(value, object) {\n if (isArray(value)) {\n return value;\n }\n return isKey(value, object) ? [value] : stringToPath(toString(value));\n}\n\nexport default castPath;\n","import isSymbol from './isSymbol.js';\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\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\nexport default toKey;\n","import castPath from './_castPath.js';\nimport toKey from './_toKey.js';\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 = castPath(path, object);\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\nexport default baseGet;\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\nexport default baseHasIn;\n","import baseHasIn from './_baseHasIn.js';\nimport hasPath from './_hasPath.js';\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\nexport default hasIn;\n","import castPath from './_castPath.js';\nimport isArguments from './isArguments.js';\nimport isArray from './isArray.js';\nimport isIndex from './_isIndex.js';\nimport isLength from './isLength.js';\nimport toKey from './_toKey.js';\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 = castPath(path, object);\n\n var index = -1,\n length = path.length,\n result = false;\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 || ++index != length) {\n return result;\n }\n length = object == null ? 0 : object.length;\n return !!length && isLength(length) && isIndex(key, length) &&\n (isArray(object) || isArguments(object));\n}\n\nexport default hasPath;\n","import baseIsEqual from './_baseIsEqual.js';\nimport get from './get.js';\nimport hasIn from './hasIn.js';\nimport isKey from './_isKey.js';\nimport isStrictComparable from './_isStrictComparable.js';\nimport matchesStrictComparable from './_matchesStrictComparable.js';\nimport toKey from './_toKey.js';\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\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, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);\n };\n}\n\nexport default baseMatchesProperty;\n","import baseGet from './_baseGet.js';\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\nexport default get;\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\nexport default identity;\n","import baseProperty from './_baseProperty.js';\nimport basePropertyDeep from './_basePropertyDeep.js';\nimport isKey from './_isKey.js';\nimport toKey from './_toKey.js';\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\nexport default property;\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\nexport default baseProperty;\n","import baseGet from './_baseGet.js';\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\nexport default basePropertyDeep;\n","import baseClone from './_baseClone.js';\nimport baseIteratee from './_baseIteratee.js';\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1;\n\n/**\n * Creates a function that invokes `func` with the arguments of the created\n * function. If `func` is a property name, the created function returns the\n * property value for a given element. If `func` is an array or object, the\n * created function returns `true` for elements that contain the equivalent\n * source properties, otherwise it returns `false`.\n *\n * @static\n * @since 4.0.0\n * @memberOf _\n * @category Util\n * @param {*} [func=_.identity] The value to convert to a callback.\n * @returns {Function} Returns the callback.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36, 'active': true },\n * { 'user': 'fred', 'age': 40, 'active': false }\n * ];\n *\n * // The `_.matches` iteratee shorthand.\n * _.filter(users, _.iteratee({ 'user': 'barney', 'active': true }));\n * // => [{ 'user': 'barney', 'age': 36, 'active': true }]\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.filter(users, _.iteratee(['user', 'fred']));\n * // => [{ 'user': 'fred', 'age': 40 }]\n *\n * // The `_.property` iteratee shorthand.\n * _.map(users, _.iteratee('user'));\n * // => ['barney', 'fred']\n *\n * // Create custom iteratee shorthands.\n * _.iteratee = _.wrap(_.iteratee, function(iteratee, func) {\n * return !_.isRegExp(func) ? iteratee(func) : function(string) {\n * return func.test(string);\n * };\n * });\n *\n * _.filter(['abc', 'def'], /ef/);\n * // => ['def']\n */\nfunction iteratee(func) {\n return baseIteratee(typeof func == 'function' ? func : baseClone(func, CLONE_DEEP_FLAG));\n}\n\nexport default iteratee;\n","import baseMatches from './_baseMatches.js';\nimport baseMatchesProperty from './_baseMatchesProperty.js';\nimport identity from './identity.js';\nimport isArray from './isArray.js';\nimport property from './property.js';\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\nexport default baseIteratee;\n","export default function(a, b) {\n return a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN;\n}\n","import ascending from \"./ascending.js\";\nimport bisector from \"./bisector.js\";\n\nvar ascendingBisect = bisector(ascending);\nexport var bisectRight = ascendingBisect.right;\nexport var bisectLeft = ascendingBisect.left;\nexport default bisectRight;\n","import ascending from \"./ascending.js\";\n\nexport default function(compare) {\n if (compare.length === 1) compare = ascendingComparator(compare);\n return {\n left: function(a, x, lo, hi) {\n if (lo == null) lo = 0;\n if (hi == null) hi = a.length;\n while (lo < hi) {\n var mid = lo + hi >>> 1;\n if (compare(a[mid], x) < 0) lo = mid + 1;\n else hi = mid;\n }\n return lo;\n },\n right: function(a, x, lo, hi) {\n if (lo == null) lo = 0;\n if (hi == null) hi = a.length;\n while (lo < hi) {\n var mid = lo + hi >>> 1;\n if (compare(a[mid], x) > 0) hi = mid;\n else lo = mid + 1;\n }\n return lo;\n }\n };\n}\n\nfunction ascendingComparator(f) {\n return function(d, x) {\n return ascending(f(d), x);\n };\n}\n","export default function(values, valueof) {\n let min;\n let max;\n if (valueof === undefined) {\n for (const value of values) {\n if (value != null) {\n if (min === undefined) {\n if (value >= value) min = max = value;\n } else {\n if (min > value) min = value;\n if (max < value) max = value;\n }\n }\n }\n } else {\n let index = -1;\n for (let value of values) {\n if ((value = valueof(value, ++index, values)) != null) {\n if (min === undefined) {\n if (value >= value) min = max = value;\n } else {\n if (min > value) min = value;\n if (max < value) max = value;\n }\n }\n }\n }\n return [min, max];\n}\n","/*\n## scale\n\nConverts a configuration into a d3 scale function. This is used to extract a\ndifferent value for each data point. For example:\n\n```js\nvar color_scale = g1.scale({\n metric: 'age',\n scheme: 'RdYlGn'\n}, data)\n// Returns a color scale that maps the age column to the red - yellow - green color scheme\n```\n\n### scale attributes\n\n- metric can be one of:\n - string: column name\n - `function(d, i)` that returns a value for each item in the data\n- scheme: color scheme to interpolate to\n- scale: d3 scale to use. Defaults to linear\n- range: set the range of the scale\n- domain: override the domain (which defaults to the extent of the data metric)\n\nNEW SPEC:\n- scale: 'linear' or 'quantile'\n- domain: {metric: 'col_name'}\n- range: for array or {scheme: 'Blues', count: 6}\n\n\nTODO:\n- Support multi-metric domains\n- Support order_by on aggregate of metrics\n- Support clamp, round for quantitative scales\n- Support nice\n*/\n\nimport uniq from 'lodash-es/uniq'\nimport upperFirst from 'lodash-es/upperFirst'\nimport iteratee from 'lodash-es/iteratee'\nimport { extent } from 'd3-array'\n\n\nvar scale_types = {\n 'Ordinal': 'discrete',\n 'Band': 'discrete',\n 'Point': 'discrete',\n 'Linear': 'continuous',\n 'Log': 'continuous',\n 'Pow': 'continuous',\n 'Sqrt': 'continuous',\n 'Sequential': 'continuous',\n 'Quantile': 'quantile', // Exception because domain is entire dataset\n 'Quantize': 'discretizing',\n 'Threshold': 'discretizing'\n },\n renames = { Sequential: 'Linear' },\n domain_function = {\n discrete: uniq,\n quantile: d => d,\n discretizing: extent,\n continuous: extent\n }\n\nfunction backward_compat(config, _scale) {\n if (config.scheme && !Array.isArray(config.range)) {\n config.range = { scheme: config.scheme }\n if (scale_types[_scale] != 'continuous' && config.count) config.range.count = config.count\n }\n if (!config.domain) config.domain = { metric: config.metric }\n config.metric = config.domain.metric || config.metric\n return config\n}\n\nfunction get_domain(data, config_domain, metric, scale) {\n return Array.isArray(config_domain) && scale != 'Quantile' ? config_domain\n : domain_function[scale_types[scale]](data.map(iteratee(metric)))\n}\n\nfunction get_range(config_range, _scale) {\n return Array.isArray(config_range) ? config_range\n : scale_types[_scale] == 'continuous' ? [0, 1]\n : get_colors_from_scheme(get_scheme(config_range.scheme), config_range.count)\n}\n\nfunction flip(array, reverse) {\n return reverse ? array.slice().reverse() : array\n}\n\nfunction get_scheme(scheme) {\n return d3[scheme.startsWith('scheme') ? scheme : 'scheme' + upperFirst(scheme)]\n}\n\nfunction get_colors_from_scheme(scheme, count) {\n // For discrete colors ranges, like schemeBlues, k value is [3, 9]. So, the first 3 values are empty\n return Object.values(scheme).length !== scheme.length ? scheme[count ? count : scheme.length - 1] : scheme\n}\n\nfunction scale(data, config) {\n var _scale = upperFirst(config.scale || 'Linear')\n\n config = backward_compat(config, _scale)\n\n var result = d3['scale' + (renames[_scale] || _scale)]()\n .domain(get_domain(data, config.domain, config.metric, _scale))\n .range(flip(get_range(config.range, _scale), config.range.reverse === true || config.reverse))\n\n return (scale_types[_scale] == 'continuous' && !Array.isArray(config.range)) ?\n (val) => d3['interpolate' + config.range.scheme](result(typeof val === 'object' ? iteratee(config.metric)(val) : val))\n : (val) => result(typeof val === 'object' ? iteratee(config.metric)(val) : val)\n}\n\nexport { scale }\n","/* This is extracted from\n\nhttps://github.com/d3/d3-interpolate/blob/master/src/transform/parse.js\nhttps://github.com/d3/d3-interpolate/blob/master/src/transform/decompose.js\n\nTODO: import parseSvg directly from d3 instead of re-writing.\n\n*/\nvar svgNode\nvar degrees = 180 / Math.PI\nvar identity = {translateX: 0, translateY: 0}\n\nexport function parseSvg(value) {\n if (value == null) return identity\n if (!svgNode) svgNode = document.createElementNS('http://www.w3.org/2000/svg', 'g')\n svgNode.setAttribute('transform', value)\n if (!(value = svgNode.transform.baseVal.consolidate())) return identity\n value = value.matrix\n return decompose(value.a, value.b, value.c, value.d, value.e, value.f)\n}\n\nfunction decompose(a, b, c, d, e, f) {\n var scaleX, scaleY, skewX\n if (scaleX = Math.sqrt(a * a + b * b)) a /= scaleX, b /= scaleX\n if (skewX = a * c + b * d) c -= a * skewX, d -= b * skewX\n if (scaleY = Math.sqrt(c * c + d * d)) c /= scaleY, d /= scaleY, skewX /= scaleY\n if (a * d < b * c) a = -a, b = -b, skewX = -skewX, scaleX = -scaleX\n return {\n translateX: e,\n translateY: f,\n rotate: Math.atan2(b, a) * degrees,\n skewX: Math.atan(skewX) * degrees,\n scaleX: scaleX,\n scaleY: scaleY\n }\n}\n","import baseUniq from './_baseUniq.js';\n\n/**\n * Creates a duplicate-free version of an array, using\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons, in which only the first occurrence of each element\n * is kept. The order of result values is determined by the order they occur\n * in the array.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @returns {Array} Returns the new duplicate free array.\n * @example\n *\n * _.uniq([2, 1, 2]);\n * // => [2, 1]\n */\nfunction uniq(array) {\n return (array && array.length) ? baseUniq(array) : [];\n}\n\nexport default uniq;\n","import { scale } from './scale.js'\nimport { parseSvg } from './parsetransform.js'\nexport { sanddance }\n\nfunction SanddanceException(message, options) {\n this.message = message\n this.options = options\n}\nfunction pop(dict, key, value) {\n if (key in dict) {\n value = dict[key]\n delete dict[key]\n }\n return value\n}\n// A replacement for Object.assign()\nfunction copy(target) {\n for (var i=1, l=arguments.length; i val2 ? +1 : items[a][1] - items[b][1]\n })\n // invert the indices in ascending or descending order\n ascending = !ascending && typeof ascending != 'undefined'\n for (var i = 0, l = indices.length, inv = []; i < l; i++)\n inv[indices[i]] = ascending ? i : l - i - 1\n indices = inv\n }\n return indices\n}\n\n\n// If an options value is an object, treat it as a scale configuration.\n// Replace it with the scale function\nfunction update_scale(data, options) {\n for (var key in options)\n if (typeof options[key] == 'object')\n options[key] = scale(data, options[key])\n return options\n}\n\nvar namespace = '.sanddance'\nvar layout_map = {\n grid: sanddance_grid,\n hexpack: sanddance_hexpack,\n spiral: sanddance_spiral\n}\n\nfunction sanddance(attrs, options) {\n options = options || {}\n var dispatch = d3.dispatch('init', 'start', 'end')\n var layout_props\n if (options.layout) {\n layout_props = layout_map[options.layout](attrs, options)\n attrs = layout_props.attrs\n options = layout_props.options\n }\n var duration = options.duration\n var speed = options.speed\n var delay = options.delay || 0\n var easing = options.easing || d3.easeLinear\n var filter = options.filter\n var x = options.x\n var y = options.y\n\n var result = function (selection) {\n dispatch.call('init', selection)\n var filtered = filter ? selection.filter(filter) : selection\n\n var transition = filtered.transition()\n .ease(easing)\n\n if (x || y) {\n var x_fn = typeof x == 'function' ? x : function () { return x }\n var y_fn = typeof y == 'function' ? y : function () { return y }\n transition.attr('transform', function(d, i) {\n var x = x_fn(d, i)\n var y = y_fn(d, i)\n this.dataset['_sd_x'] = x\n this.dataset['_sd_y'] = y\n return 'translate(' + x + ',' + y + ')'\n })\n }\n\n for (var key in attrs)\n transition = transition.attr(key, attrs[key])\n\n // Note: duration = 0 is a valid duration\n if ('duration' in options)\n transition = transition.duration(duration)\n else if (speed)\n transition = transition.duration(function (d) {\n var transform = parseSvg(this.getAttribute('transform'))\n var x1 = transform.translateX\n var y1 = transform.translateY\n // TODO (Anand): Need a better way of identifying where the element will be\n // across transforms and setting x, y\n var x2 = this.dataset['_sd_x']\n var y2 = this.dataset['_sd_y']\n var distance = dist(x1, y1, x2, y2)\n var _speed = typeof speed == 'function' ? speed(d) : speed\n return distance / _speed * 1000\n })\n\n if (delay)\n transition = transition.delay(function (d) {\n return typeof delay == 'function' ? delay(d) : delay\n })\n\n // Set up event handling.\n // sanddance.on('start') is triggered when the first transition begins\n var count_end = filtered.size(),\n count_start = 0\n transition.on('start.count', function () {\n if (count_start === 0)\n dispatch.call('start', selection)\n count_start++\n })\n // sanddance.on('end') is triggered when the last transition stops (ends / interrupted)\n transition.on('end interrupt', function () {\n count_end--\n if (count_end > 0)\n return\n else if (count_end === 0)\n return dispatch.call('end', selection)\n else\n throw new SanddanceException('sanddance: Invalid count: ' + count_end, options)\n })\n }\n result.on = function (event, callback) {\n dispatch.on(event + namespace, callback)\n return result\n }\n // Returns a new sanddance with updated attributes\n result.update = function (update_attrs, update_options) {\n return sanddance(copy({}, attrs, update_attrs), copy({}, options, update_options))\n }\n return result\n}\n\nsanddance.chain = function () {\n for (var i = 0, l = arguments.length - 1; i < l; i++) {\n (function (prev, next) {\n prev.on('end' + namespace, function () { this.call(next) })\n })(arguments[i], arguments[i + 1])\n }\n return arguments[0]\n}\n\nfunction sanddance_grid (attrs, options) {\n var data = options.data\n var width = options.width\n var height = options.height\n var area = width * height / data.length\n var element_width = Math.sqrt(area)\n var elements_per_row = Math.ceil(width / element_width)\n var num_rows = Math.ceil(data.length / elements_per_row)\n var element_height = element_width * num_rows\n var filter = options.filter\n data = filter ? data.filter(function (d, i) { return filter(d, i) }) : data\n var indices = sort(data, options.sort, options.ascending)\n\n attrs.transform = function (d, i) {\n // TODO: pre-compute these into a pos[] array\n i = indices[i]\n var col = i % elements_per_row\n var row = Math.floor(i / elements_per_row)\n var x = this.dataset['_sd_x'] = col * element_width\n var y = this.dataset['_sd_y'] = element_height - ((row + 1) * element_width)\n return 'translate(' + x + ',' + y + ')'\n }\n return {attrs: update_scale(data, attrs), options: options}\n}\n\nfunction sanddance_hexpack (attrs, options) {\n var data = options.data\n var filter = options.filter\n data = filter ? data.filter(function (d, i) { return filter(d, i) }) : data\n var indices = sort(data, options.sort, options.sort_ascending)\n var count = data.length\n var pos = [[0, 0]],\n l = 1, // level\n n = 0, // number of items filled so far\n i\n while (n < count) {\n for (i = 0; i >= 1 - l; i--) pos.push([l, i]) // top-right\n for (i = l; i >= 1; i--) pos.push([i, -l]) // top\n for (i = 0; i >= 1 - l; i--) pos.push([i, -l - i]) // top left\n for (i = 0; i <= l - 1; i++) pos.push([-l, i]) // bottom left\n for (i = -l; i <= -1; i++) pos.push([i, l]) // bottom\n for (i = 0; i <= l - 1; i++) pos.push([i, l - i]) // bottom right\n n += l * 6 // increment number of items filled\n l++ // move to next level\n }\n // Pre-compute positions\n var width = options.width\n var height = options.height\n var diameter = 2 * l - 1\n var size_x = width / diameter\n var size_y = height / diameter\n var cos = size_x * Math.cos(Math.PI * 60 / 180)\n var sin = size_y * Math.sin(Math.PI * 60 / 180)\n pos = pos.slice(0, count).map(function (row) {\n return [row[0] * size_x + row[1] * cos + width / 2, row[1] * sin + height / 2]\n })\n attrs.transform = function (d, i) {\n i = indices[i]\n var p = pos[i]\n return 'translate(' + p[0] + ',' + p[1] + ')'\n }\n return {attrs: update_scale(data, attrs), options: options}\n}\n\nfunction sanddance_spiral (attrs, options) {\n var data = options.data\n var filter = options.filter\n data = filter ? data.filter(function (d, i) { return filter(d, i) }) : data\n var indices = sort(data, options.sort, options.sort_ascending)\n var radius = pop(options, 'spiral_size')\n var angle = pop(options, 'spiral_angle') * Math.PI / 180\n var pos = data.map(function (d, i) {\n return [\n (i * radius) * Math.cos(i * angle),\n (i * radius) * Math.sin(i * angle)\n ]\n })\n attrs.transform = function (d, i) {\n i = indices[i]\n return 'translate(' + pos[i][0] + ',' + pos[i][1] + ')'\n }\n return {attrs: update_scale(data, attrs), options: options}\n}\n","/*\n url.parse() provides results consistent with window.location.\n\n 0 href Full URL source\n 1 protocol http, https, etc\n 2 origin username:password@hostname:port\n 4 username username\n 5 password password\n - host NOT IMPLEMENTED\n 6 hostname hostname\n 7 port port\n 9 pathname full path, excluding hash\n 12 search search parameters\n 13 hash url fragment\n\n The following are not part of window.location, but provided anyway.\n\n 3 userinfo username:password\n 8 relative: Everything after origin\n 10 directory: Directory part of pathname\n 11 file: File part of pathname\n - searchKey search as an ordered dict of strings\n - searchList search as an ordered dict of arrays\n */\n\nvar\n _url_parse_key = ['href','protocol','origin','userinfo','username','password','hostname','port','relative','pathname','directory','file','search','hash'],\n _url_parse_qname = ['searchKey', 'searchList'],\n _url_parse_strict = /^(?:([^:\\/?#]+):)?(?:\\/\\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\\/?#]*)(?::(\\d*))?))?((((?:[^?#\\/]*\\/)*)([^?#]*))(?:\\?([^#]*))?(?:#(.*))?)/, // eslint-disable-line\n _url_parse_search = /(?:^|&)([^&=]*)=?([^&]*)/g\n\nvar _decode_uri_component = function(s) { return decodeURIComponent(s.replace(/\\+/g, '%20')) },\n _encode_uri_component = encodeURIComponent\n\nexport function parse(str) {\n /* Based on parseUri 1.2.2: http://blog.stevenlevithan.com/archives/parseuri\n MIT License\n */\n var uri = {\n toString: unparse,\n join: join,\n update: update\n },\n m = _url_parse_strict.exec(str || ''),\n i = 14\n\n while (i--) uri[_url_parse_key[i]] = m[i] || ''\n\n var search_key = uri[_url_parse_qname[0]] = {},\n search_list = uri[_url_parse_qname[1]] = {}\n uri[_url_parse_key[12]].replace(_url_parse_search, function ($0, key, val) {\n if (key) {\n key = _decode_uri_component(key)\n val = _decode_uri_component(val)\n search_key[key] = val\n search_list[key] = search_list[key] || []\n search_list[key].push(val)\n }\n })\n\n return uri\n}\n\n\n// Converts the URL parts back into the original URL.\nexport function unparse(self) {\n self = self || this\n var protocol = self[_url_parse_key[1]] || 'http',\n username = self[_url_parse_key[4]],\n password = self[_url_parse_key[5]],\n hostname = self[_url_parse_key[6]],\n port = self[_url_parse_key[7]],\n pathname = self[_url_parse_key[9]],\n search = self[_url_parse_key[12]],\n hash = self[_url_parse_key[13]],\n search_key = self[_url_parse_qname[0]],\n search_list = self[_url_parse_qname[1]],\n parts = hostname ? [protocol, '://'] : [],\n qparts = [],\n key, vals, i, l\n if (username) {\n parts.push(username)\n if (password) parts.push(':', password)\n parts.push('@')\n }\n parts.push(hostname)\n if (port) parts.push(':', port)\n parts.push(pathname || (hostname ? '/' : ''))\n if (search) {\n parts.push('?', search)\n } else {\n if (search_list) {\n for (key in search_list) {\n for (i=0, vals=search_list[key], l=vals.length; i 1) {\n // Leading slash clears the URL\n if (!i) {\n sources[0] = frag\n ptr = 1\n }\n // Trailing slash is appended\n if (i == l - 1) sources[ptr] = frag\n }\n } else {\n sources[ptr] = frag\n if (i < l - 1) ptr++\n }\n }\n\n // Set .pathname, .directory, .file.\n var path = self[_url_parse_key[9]] = sources.slice(0, ptr + 1).join('/'),\n parts = path.split(/\\//),\n relative = [path]\n if (self[_url_parse_key[12]]) relative.push('?', self[_url_parse_key[12]])\n if (self[_url_parse_key[13]]) relative.push('#', self[_url_parse_key[13]])\n self[_url_parse_key[8]] = relative.join('') // relative\n self[_url_parse_key[10]] = parts.slice(0, parts.length - 1).join('/') + '/' // directory\n self[_url_parse_key[11]] = parts[parts.length - 1] // file\n\n return self\n}\n\n\nexport function update(args, mode) {\n var self = this,\n search_key = self[_url_parse_qname[0]],\n search_list = self[_url_parse_qname[1]],\n qparts = [],\n modes = {},\n key, val, i, l, hash, search_list_key, result\n\n if (mode) {\n // Ensure that mode is a string\n mode = '' + mode\n // If the mode is like a=add&b=toggle, treat it like URL search params and\n // convert it into a dictionary\n if (mode.match(/[&=]/))\n modes = parse('?' + mode).searchKey\n // If the mode is just a string like add, del, toggle, apply it to all keys\n else\n for (key in args)\n modes[key] = mode\n }\n\n for (key in args) {\n val = args[key]\n if (val === null) {\n search_list[key] = []\n } else {\n if (!Array.isArray(val)) val = [val]\n if (!modes[key])\n search_list[key] = val\n else {\n // Ensure that search_list[key] exists\n if (!(key in search_list)) search_list[key] = []\n\n // Prepare a hash for lookup\n for (hash={}, i=0, l=val.length; i:` or\n // do not have a `:` in them.\n // If name is false-y, return search\n if (!name)\n return search\n var result = {}\n for (var key in search) {\n var parts = key.split(':')\n if (parts.length == 1)\n result[parts[0]] = search[key]\n else if (parts[0] === name)\n result[parts[1]] = search[key]\n }\n return result\n}\n","// jQuery utilities.\n// These are NOT jQuery plugins. They accept a $node directly.\n// These are NOT exposed as part of the API. Purely internal.\n\n// Return all values that match the selector\n// AMONG and UNDER the $node\nexport function findall($node, selector) {\n return $node.filter(selector).add($node.find(selector))\n}\n\n// Return all values that DO NOT match the selector\n// AMONG and UNDER the $node. Complement of findall\nexport function notall($node, selector) {\n return $node.not(selector).add($node.not(selector))\n}\n\n// Returns true if data attribute is present\n// But if the value is \"false\", \"off\", \"n\" or \"no\" in any case, returns false (like YAML)\n// Returns default_value if data attribute is missing\nexport function hasdata($node, key, default_value) {\n var val = $node.data(key)\n if (typeof val == 'undefined' || val === false || val === null)\n return default_value\n if (typeof val == 'string' && val.match(/^(false|off|n|no)$/i))\n return false\n return true\n}\n\n// Return the {width:..., height:...} of the node\nexport function getSize($node) {\n // Ideally, this is just one line:\n // return $node.getBoundingClientRect()\n\n // But see http://stackoverflow.com/q/18153989/100904\n // and https://bugzilla.mozilla.org/show_bug.cgi?id=530985\n // If the contents exceed the bounds of an element,\n // getBoundingClientRect() failes in Firefox.\n\n // So set display:block, get $().width(), and unset display:block\n $node = $($node)\n var old_display = $node.css('display'),\n result = {}\n if (old_display != 'block')\n $node.css('display', 'block')\n result.width = $node.width()\n result.height = $node.height()\n if (old_display != 'block')\n $node.css('display', old_display)\n return result\n}\n","import { parse } from './url.js'\nimport { hasdata } from './_util.js'\n\nvar container_options = {\n attr: 'href',\n event: 'click change submit',\n selector: '.urlfilter',\n src: 'src'\n}\nvar event_namespace = '.urlfilter'\n\nexport function urlfilter(options) {\n var $self = this\n // If there are no elements in the selection, exit silently\n if ($self.length == 0)\n return\n var doc = $self[0].ownerDocument\n var settings = $.extend({}, container_options, options || {}, this.dataset)\n var default_remove = settings.remove || hasdata($self, 'remove')\n var events = settings.event.split(/\\s+/).map(function (v) { return v + event_namespace }).join(' ')\n // options.location and options.history are used purely for testing\n var loc = settings.location || (doc.defaultView || doc.parentWindow).location\n var hist = settings.history || (doc.defaultView || doc.parentWindow).history\n return $self\n .on(events, settings.selector, function (e) {\n var $this = $(this),\n mode = $this.data('mode') || settings.mode,\n target = $this.data('target') || settings.target,\n src = $this.data('src') || settings.src,\n remove = hasdata($this, 'remove', default_remove),\n href\n if (e.type == 'change' || $(e.target).is(':input:not(:button)')) {\n var key = encodeURIComponent($this.attr('id') || $this.attr('name'))\n var val = encodeURIComponent($this.val())\n href = '?' + key + '=' + val\n }\n else if (e.type == 'submit' || $(e.target).is('form')) {\n e.preventDefault()\n href = '?' + $this.serialize()\n }\n else if (e.type == 'click') {\n if ($(e.target).is('a'))\n e.preventDefault()\n href = $this.attr(settings.attr)\n } else\n return\n\n var url = parse(href),\n q = url.searchList\n\n function target_url(url) {\n var result = parse(url)\n .join(href, { query: false, hash: false })\n .update(q, mode)\n if (remove) {\n var missing_keys = {}\n for (var key in result.searchKey)\n if (result.searchKey[key] === '')\n missing_keys[key] = null\n result.update(missing_keys)\n }\n return result.toString()\n }\n\n // If the target is... the URL is get/set at\n // ------------------------ ---------------------\n // unspecified (=> window) location.href\n // 'pushState' location.href\n // '#' location.hash\n // anything else $(target).data(src)\n if (!target)\n loc.href = target_url(loc.href)\n else if (target == '#')\n loc.hash = target_url(loc.hash.replace(/^#/, ''))\n else if (target.match(/^pushstate$/i))\n hist.pushState({}, '', target_url(loc.href))\n else {\n $(target).each(function () {\n var $target = $(this)\n var url = target_url($target.attr(src))\n $target.attr(src, url).load(url, function () {\n $target.trigger({ type: 'load', url: url })\n })\n })\n }\n $this.trigger({ type: 'urlfilter', url: url })\n })\n}\n","export { version } from './src/package.js'\nimport { parse, unparse, join, update } from './src/url.js'\n\nexport var url = {\n parse: parse,\n unparse: unparse,\n join: join,\n update: update\n}\n\nimport { urlfilter } from './src/urlfilter.js'\n\nif (typeof jQuery != 'undefined') {\n jQuery.extend(jQuery.fn, {\n urlfilter: urlfilter\n })\n}\n","export function ajaxchain(request, $self, requests, responses) {\n $self = $self || $('
')\n requests = requests || []\n responses = responses || []\n if (!('limit' in request))\n request.limit = 10\n request.limit--\n $.ajax(request)\n .done(function (response, status, xhr) {\n requests.push(request)\n responses.push(response)\n $self.trigger({ type: 'load', request: request, response: response, xhr: xhr })\n if (request.chain && request.limit > 0) {\n try {\n var updates = request.chain(response, request, xhr)\n } catch (e) {\n $self.trigger({ type: 'error', request: request, xhr: xhr, exception: e })\n // eslint-disable-next-line no-console\n console.warn('$.ajaxchain: chain() exception', e)\n }\n if ($.isPlainObject(updates) && !$.isEmptyObject(updates)) {\n var new_request = $.extend(true, {}, request, updates)\n var next = ajaxchain(new_request, $self, requests, responses)\n }\n }\n if (!next)\n $self.trigger({ type: 'done', request: requests, response: responses })\n })\n .fail(function (xhr, testStatus, error) {\n $self.trigger({ type: 'error', request: request, xhr: xhr })\n $self.trigger({ type: 'done', request: requests, response: responses })\n // eslint-disable-next-line no-console\n console.warn('$.ajaxchain: ajax error', error)\n })\n return $self\n}\n\n// Chain through a list of URLs in order\najaxchain.list = function (urls) {\n return function (response, request) {\n var next = urls.indexOf(request.url) + 1\n if (next < urls.length)\n return { url: urls[next] }\n }\n}\n\n// Used by Twitter, YouTube\n// Google: .cursor('data.pageToken', 'nextPageToken')\n// Twitter: .cursor('data.cursor', 'next_cursor')\n// Facebook: .cursor('url', 'paging.next')\nif (typeof _ == 'undefined')\n ajaxchain.cursor = function () {\n throw new Error('ajaxchain.cursor requires lodash')\n }\nelse\n ajaxchain.cursor = function (target, source) {\n return function (response) {\n var key = _.get(response, source)\n if (key)\n return _.set({}, target, key)\n }\n }\n","export { version } from './src/package.js'\nimport { ajaxchain } from './src/ajaxchain.js'\n\nif (typeof jQuery != 'undefined') {\n jQuery.extend(jQuery, {\n ajaxchain: ajaxchain\n })\n}\n","var isMergeableObject = function isMergeableObject(value) {\n\treturn isNonNullObject(value)\n\t\t&& !isSpecial(value)\n};\n\nfunction isNonNullObject(value) {\n\treturn !!value && typeof value === 'object'\n}\n\nfunction isSpecial(value) {\n\tvar stringValue = Object.prototype.toString.call(value);\n\n\treturn stringValue === '[object RegExp]'\n\t\t|| stringValue === '[object Date]'\n\t\t|| isReactElement(value)\n}\n\n// see https://github.com/facebook/react/blob/b5ac963fb791d1298e7f396236383bc955f916c1/src/isomorphic/classic/element/ReactElement.js#L21-L25\nvar canUseSymbol = typeof Symbol === 'function' && Symbol.for;\nvar REACT_ELEMENT_TYPE = canUseSymbol ? Symbol.for('react.element') : 0xeac7;\n\nfunction isReactElement(value) {\n\treturn value.$$typeof === REACT_ELEMENT_TYPE\n}\n\nfunction emptyTarget(val) {\n\treturn Array.isArray(val) ? [] : {}\n}\n\nfunction cloneUnlessOtherwiseSpecified(value, options) {\n\treturn (options.clone !== false && options.isMergeableObject(value))\n\t\t? deepmerge(emptyTarget(value), value, options)\n\t\t: value\n}\n\nfunction defaultArrayMerge(target, source, options) {\n\treturn target.concat(source).map(function(element) {\n\t\treturn cloneUnlessOtherwiseSpecified(element, options)\n\t})\n}\n\nfunction mergeObject(target, source, options) {\n\tvar destination = {};\n\tif (options.isMergeableObject(target)) {\n\t\tObject.keys(target).forEach(function(key) {\n\t\t\tdestination[key] = cloneUnlessOtherwiseSpecified(target[key], options);\n\t\t});\n\t}\n\tObject.keys(source).forEach(function(key) {\n\t\tif (!options.isMergeableObject(source[key]) || !target[key]) {\n\t\t\tdestination[key] = cloneUnlessOtherwiseSpecified(source[key], options);\n\t\t} else {\n\t\t\tdestination[key] = deepmerge(target[key], source[key], options);\n\t\t}\n\t});\n\treturn destination\n}\n\nfunction deepmerge(target, source, options) {\n\toptions = options || {};\n\toptions.arrayMerge = options.arrayMerge || defaultArrayMerge;\n\toptions.isMergeableObject = options.isMergeableObject || isMergeableObject;\n\n\tvar sourceIsArray = Array.isArray(source);\n\tvar targetIsArray = Array.isArray(target);\n\tvar sourceAndTargetTypesMatch = sourceIsArray === targetIsArray;\n\n\tif (!sourceAndTargetTypesMatch) {\n\t\treturn cloneUnlessOtherwiseSpecified(source, options)\n\t} else if (sourceIsArray) {\n\t\treturn options.arrayMerge(target, source, options)\n\t} else {\n\t\treturn mergeObject(target, source, options)\n\t}\n}\n\ndeepmerge.all = function deepmergeAll(array, options) {\n\tif (!Array.isArray(array)) {\n\t\tthrow new Error('first argument should be an array')\n\t}\n\n\treturn array.reduce(function(prev, next) {\n\t\treturn deepmerge(prev, next, options)\n\t}, {})\n};\n\nvar deepmerge_1 = deepmerge;\n\nexport default deepmerge_1;\n","var _event\ntry {\n new Event('click')\n _event = function(name, options) {\n // On Firefox, you needed to send the right event subclass. This is no longer a problem.\n // See https://developer.mozilla.org/en-US/docs/Web/Reference/Events for the list\n // if (name.match(/click$|^mouse|^menu$/)) return new MouseEvent(name, options)\n // else if (name.match(/^key/)) return new KeyboardEvent(name, options)\n // else if (name.match(/^focus|^blur$/)) return new FocusEvent(name, options)\n return new Event(name, options)\n }\n} catch (e) {\n // The old fashioned way, for IE\n _event = function(name, options) {\n var evt = document.createEvent('event')\n evt.initEvent(name, options.bubbles, options.cancelable)\n return evt\n }\n}\n\nexport function dispatch(name, options) {\n return this.each(function() {\n this.dispatchEvent(_event(name, $.extend({\n bubbles: true,\n cancelable: true\n }, options)))\n })\n}\n","import * as default_templates from './dropdown.template.html'\nimport deepmerge from 'deepmerge'\n\nvar default_options = {\n target: '',\n multiple: false,\n value_key: 'value',\n label_key: 'label'\n}\n\nexport function dropdown(js_options) {\n var self = $(this)\n var options = deepmerge(default_options, js_options)\n\n self.html(_.template(default_templates['template_dropdown'])(options))\n\n if (options.data) {\n render(options.data)\n // Set the default\n if (options.value)\n self.find('.selectpicker').val(options.value).selectpicker('refresh')\n // trigger 'load' event\n self.trigger({type: 'load'})\n }\n else if (options.url) {\n render(['Loading...'])\n $.ajax(options.url)\n .fail(function(xhr, status, message) {\n // load error template\n self.html(_.template(default_templates['template_error'])({message: message}))\n })\n .done(function(response) {\n render(response)\n self.find('.selectpicker').selectpicker('refresh')\n self.trigger({type: 'load'})\n })\n }\n\n function render(data) {\n options.data = data\n if (options.key) {\n // urlfilter\n self.urlfilter({\n selector: 'select.urlfilter',\n target: options.target,\n event: 'change',\n remove: true\n })\n }\n // re-render dropdown template options with fetched data\n var template = typeof data[0] == 'object' ? 'template_dropdown_object' : 'template_dropdown_options'\n self.find('.selectpicker')\n .html(_.template(default_templates[template])(options))\n .selectpicker(options.options)\n }\n\n return this\n}\n","export { version } from './src/package.js'\nimport { dropdown } from './src/dropdown.js'\n\nif (typeof jQuery != 'undefined') {\n jQuery.extend(jQuery.fn, {\n dropdown: dropdown\n })\n}\n","export { version } from './src/package.js'\nimport { dispatch } from './src/event.js'\n\nif (typeof jQuery != 'undefined') {\n jQuery.extend(jQuery.fn, {\n dispatch: dispatch\n })\n}\n","// Import HTML sections as variables using rollup-plugin-htmlparts.js.\n// See rollup.config.js for usage.\n// Each section is imported as a minified variable string.\nimport * as default_templates from './formhandler.template.html'\nimport { parse } from './url.js'\nimport { namespace } from './namespace_util.js'\nimport { datafilter } from './datafilter.js'\n\n// Render components in this order. The empty component is the root component.\nvar components = ['', 'table', 'edit', 'add', 'page', 'size', 'count', 'export', 'filters', 'error', 'table_grid']\nvar default_options = {\n table: true,\n edit: false,\n add: false,\n page: true,\n pageSize: 100,\n size: true,\n sizeValues: [10, 20, 50, 100, 500, 1000],\n count: true,\n export: true,\n exportFormats: {\n xlsx: 'Excel',\n csv: 'CSV',\n json: 'JSON',\n html: 'HTML'\n },\n filters: true,\n onhashchange: true\n}\nvar meta_headers = ['filters', 'ignored', 'excluded', 'sort', 'offset', 'limit', 'count']\n\nvar default_filters = {\n text: { '': 'Equals...', '!': 'Does not equal...', '~': 'Contains...', '!~': 'Does not contain...' },\n number: { '': 'Equals...', '!': 'Does not equal...', '<': 'Less than...', '>': 'Greater than...' },\n date: { '': 'Equals...', '!': 'Does not equal...', '<': 'Before...', '>': 'After...' }\n}\n\n// Set default values for column specifications\n// function col_defaults(colinfo, data) {\nfunction col_defaults(colinfo) {\n // Sort defaults\n if (!('sort' in colinfo) || colinfo.sort === true)\n colinfo.sort = { '': 'Sort ascending', '-': 'Sort descending' }\n else if (typeof colinfo.sort != 'object')\n colinfo.sort = {}\n\n // Type defaults\n colinfo.type = colinfo.type || 'text'\n\n // Filters defaults\n if (!('filters' in colinfo) || (colinfo.filters === true))\n colinfo.filters = default_filters[colinfo.type]\n\n // Hideable defaults\n if (!('hideable' in colinfo))\n colinfo.hideable = true\n\n // Hide defaults\n if (!('hide' in colinfo))\n colinfo.hide = false\n}\n\n\nexport function formhandler(js_options) {\n if (!js_options)\n js_options = {}\n\n this.each(function () {\n var $this = $(this)\n // Convert all .urlfilter classes into url filters that update location.hash\n $this.urlfilter({\n selector: '.urlfilter, .page-link',\n target: '#',\n remove: true // auto-remove empty values\n })\n\n // Pre-process options\n var options = $.extend({}, default_options, js_options, $this.data())\n\n if (!options.columns)\n options.columns = []\n else if (typeof options.columns == 'string')\n options.columns = _.map(options.columns.split(/\\s*,\\s*/), function (col) { return { name: col } })\n\n // Compile all templates\n var template = {}\n _.each(components, function (name) {\n var tmpl = options[name ? name + 'Template' : 'template'] || default_templates['template_' + name] || 'NA'\n template[name] = _.template(tmpl)\n })\n\n function draw_table(data, args, meta) {\n // Add metadata\n meta.rows = data.length\n meta.columns = data.length ? _.map(data[0], function (val, col) { return { name: col } }) : []\n\n // If any column name is '*', show all columns\n var star_col = _.find(options.columns, function (o) { return o['name'] === '*' })\n if (star_col) {\n var action_header_cols = _.cloneDeep(meta.columns)\n _.map(options.columns, function (option_col) {\n var found = _.find(meta.columns, function (o) { return o['name'] === option_col.name })\n if (!found && option_col.name !== '*')\n action_header_cols.push(option_col)\n })\n\n action_header_cols = _.map(action_header_cols, function (col) {\n var options_col = _.find(options.columns, function (o) { return o['name'] === col.name })\n return options_col ? options_col : $.extend({}, star_col, col)\n })\n }\n\n options.columns = action_header_cols ? action_header_cols : options.columns\n\n // Render all components into respective targets\n var template_data = {\n data: data,\n meta: meta,\n args: args,\n options: options,\n idcount: 0,\n parse: parse,\n col_defaults: col_defaults,\n isEdit: false,\n isAdd: false,\n templates: default_templates,\n notify: notify.bind(this, $this, template),\n failHandler: failHandler.bind(this, $this, template)\n }\n // Store template_data in $this\n $this.data('formhandler', template_data)\n\n _.each(components, function (name) {\n render_template(name, template_data, options, $this, template)\n })\n if (options.add)\n addHandler($this, template_data, options, template)\n if (options.edit)\n editHandler($this, template_data, options, template)\n }\n\n function render() {\n var url_args = parse(location.hash.replace(/^#/, '')).searchList\n url_args = namespace(url_args, options.name)\n // Create arguments passed to the FormHandler. Override with the user URL args\n var args = _.extend({\n c: options.columns.map(function (d) { return d.name }),\n _limit: options.pageSize,\n _format: 'json',\n _meta: 'y'\n }, url_args)\n $('.loader', $this).removeClass('d-none')\n\n function done(data, status, xhr) {\n var meta = {}\n _.each(meta_headers, function (header) {\n var val = xhr ? xhr.getResponseHeader('Fh-Data-' + header) : null\n if (val !== null)\n meta[header] = JSON.parse(val)\n })\n if (typeof options.transform == 'function') {\n var result = options.transform({ data: data, meta: meta, options: options, args: args }) || {}\n data = 'data' in result ? result.data : data\n meta = 'meta' in result ? result.meta : meta\n }\n\n // To support data-src that doesn't poin to formhandler url pattern\n if (_.isEmpty(meta) && options.page && options.size) {\n meta['offset'] = args._offset ? parseInt(args._offset) : 0\n meta['limit'] = parseInt(args._limit)\n meta['count'] = data.length\n data = datafilter(data, args)\n }\n\n draw_table(data, args, meta)\n $this.trigger({ type: 'load', formdata: data, meta: meta, args: args, options: options })\n }\n\n if (options.data && typeof (options.data) == 'object') {\n options.edit = false\n options.add = false\n done(options.data)\n }\n else {\n $.ajax(options.src, {\n dataType: 'json',\n data: args,\n traditional: true\n }).done(done)\n .always(function () { $('.loader', $this).addClass('d-none') })\n .fail(failHandler.bind(this, $this, template))\n }\n }\n\n modalHandler($this)\n\n actionHandler($this, options, template)\n\n // Re-render every time the URL changes\n if (options.onhashchange)\n $(window).on('hashchange', render)\n // Initialize\n render()\n })\n\n return this\n}\n\nfunction modalHandler($this) {\n // Handle modal dialog\n $this\n .on('shown.bs.modal', '.formhandler-table-modal', function (e) {\n var $el = $(e.relatedTarget)\n var template_data = $this.data('formhandler')\n var op = $el.data('op')\n var col = $el.closest('[data-col]').data('col')\n var val = ''\n // If there is a value, show it, and allow user to remove the filter\n if (template_data.args[col + op]) {\n val = template_data.args[col + op].join(',')\n $('.remove-action', this).attr('href', '?' + col + op + '=').show()\n } else\n $('.remove-action', this).hide()\n $('input', this).val(val).attr('name', col + op).focus()\n $('label', this).text($el.text())\n })\n .on('submit', 'form', function (e) {\n e.preventDefault()\n var filter = parse('?' + $(this).serialize()).searchKey\n $(this).closest('.formhandler-table-modal').modal('hide')\n window.location.hash = '#' + parse(location.hash.replace(/^#/, '')).update(filter)\n })\n}\n\nfunction render_template(name, data, options, $this, template) {\n // Disable components if required. But root component '' is always displayed\n if (name && !options[name])\n return\n\n var target\n // The root '' component is rendered into $this.\n if (!name)\n target = $this\n else {\n // Rest are rendered into . under $this\n\n if (options[name] == 'grid') name = 'table_grid'\n var selector = options[name + 'Target'] || '.' + name\n target = $(selector, $this)\n // But if they don't exist, treat the selector as a global selecctor\n if (target.length == 0)\n target = $(selector)\n }\n target.html(template[name](data))\n}\n\n\nfunction addHandler($this, template_data, options, template) {\n\n $('.add button', $this)\n .on('click', function () {\n var add_btn = $('.add button', $this)\n var edit_btn = $('.edit button', $this)\n if (add_btn.html().toLowerCase() == 'save') {\n add_btn.html('Add')\n edit_btn.prop('disabled', false)\n var columns_data = $('.new-row td[data-key]')\n\n $('.loader', $this).removeClass('d-none')\n var data = {}\n\n $.each(columns_data, function (key, column) {\n data[column.getAttribute('data-key')] = $(column).children().val()\n })\n // if no changes made to new empty celled row, rerender the table.\n if (!_.some(data)) {\n $('.loader', $this).addClass('d-none')\n template_data.isAdd = false\n render_template('table', template_data, options, $this, template)\n return\n }\n\n $.ajax(options.src, {\n method: 'POST',\n dataType: 'json',\n data: data\n }).done(function () {\n template_data.data.unshift(data)\n template_data.isAdd = false\n render_template('table', template_data, options, $this, template)\n if (options.add.done) options.add.done()\n }).always(function () { $('.loader', $this).addClass('d-none') })\n .fail(failHandler.bind(this, $this, template))\n } else if (add_btn.html().toLowerCase() == 'add') {\n add_btn.html('Save')\n edit_btn.prop('disabled', true)\n template_data.isAdd = true\n render_template('table', template_data, options, $this, template)\n add_edit_events($this, add_btn)\n }\n })\n}\n\nfunction editHandler($this, template_data, options, template) {\n $('.edit button', $this)\n .on('click', function () {\n var edit_btn = $('.edit button', $this)\n var add_btn = $('.add button', $this)\n if (edit_btn.html().toLowerCase() == 'save') {\n var edited_rows = $('.edited-row')\n if (edited_rows.length > 0)\n $('.loader', $this).removeClass('d-none')\n\n var all_ajax = []\n var allRowsValid = true\n $.each(edited_rows, function (key, edited_row) {\n var data = JSON.parse(edited_row.getAttribute('data-val'))\n var rowIndex = edited_row.getAttribute('data-row')\n for (key in data) {\n // TODO: refactor to identify editable columns other than using data-key attrs on tag\n $('td[data-key=\"' + (remove_quotes(key)) + '\"] :input', edited_row).each(function() {\n if (this.checkValidity()) {\n $(this).removeClass('is-invalid')\n data[key] = template_data['data'][rowIndex][key] = $(this).val()\n } else {\n $(this).addClass('is-invalid')\n allRowsValid = false\n }\n })\n }\n\n all_ajax.push(\n $.ajax(options.src, {\n method: 'PUT',\n dataType: 'json',\n data: data\n }).fail(failHandler.bind(this, $this, template))\n .always(function () {\n $('.loader', $this).addClass('d-none')\n if (options.add.editFunction) options.add.editFunction()\n })\n )\n })\n\n if (!allRowsValid) return\n $.when.apply($, all_ajax).then(function () {\n $('.loader', $this).addClass('d-none')\n edit_btn.html('Edit') // TODO: remove hardcoding of name Edit\n add_btn.prop('disabled', false)\n if (options.edit.done) options.edit.done()\n })\n\n template_data.isEdit = false\n render_template('table', template_data, options, $this, template)\n } else if (edit_btn.html().toLowerCase() == 'edit') {\n edit_btn.html('Save') // TODO: remove hardcoding of name Save\n add_btn.prop('disabled', true)\n template_data.isEdit = true\n render_template('table', template_data, options, $this, template)\n add_edit_events($this, edit_btn)\n $this.trigger({ type: 'editmode' })\n }\n })\n}\n\nfunction actionHandler($this, options, template) {\n var default_actions = {\n 'delete': function (arg) {\n return $.ajax(options.src, { method: 'DELETE', dataType: 'json', data: arg.row })\n .done(function () { $('tr[data-row=\"' + arg.index + '\"]', $this).remove() })\n }\n }\n $this.on('click', '[data-action]', function () {\n var arg = {\n row: $(this).closest('[data-val]').data('val'),\n index: $(this).closest('[data-row]').data('row'),\n notify: notify.bind(this, $this, template)\n }\n var action = $(this).data('action')\n\n var method = (options.actions && (options.actions.filter(function (each_action) { return action in each_action }).length > 0))\n ? options.actions.filter(function (each_action) { return action in each_action })[0][action]\n : default_actions[action]\n\n var deferred = method(arg)\n if (deferred && deferred.always) {\n $('.loader', $this).removeClass('d-none')\n deferred\n .always(function () { $('.loader', $this).addClass('d-none') })\n .fail(failHandler.bind(this, $this, template))\n }\n })\n}\n\n\nfunction remove_quotes(str) {\n return str.toString().replace(/[\"']/g, '')\n}\n\nfunction notify($this, template, message) {\n var $note = $('.note', $this)\n if (!$note.length)\n $note = $('
').appendTo($this)\n $note.html(template['error']({ message: message }))\n}\n\nfunction failHandler($this, template, xhr, status, message) {\n var error = status + ': ' + message\n if (xhr.readyState == 0)\n error += ' (cannot connect to server)'\n notify($this, template, error)\n}\n\n\nfunction add_edit_events($this, save_btn) {\n $('tbody :input', $this)\n // When the user types something, mark the row as changed\n .on('change', function () {\n $(this).parents('tr').addClass('edited-row')\n })\n // When the user presses Enter, click on the \"Save\" button\n .on('keypress', function (e) {\n if (e.keyCode == 13) {\n $(this).blur() // Remove focus so that change / .edited-row is triggered\n save_btn.trigger('click')\n }\n })\n // Focus on the first element\n .eq(0).focus()\n}\n","export { version } from './src/package.js'\nimport { formhandler } from './src/formhandler.js'\n// FormHandler requires $().urlfilter\nexport { url } from './index-urlfilter.js'\n\nif (typeof jQuery != 'undefined') {\n jQuery.extend(jQuery.fn, {\n formhandler: formhandler\n })\n}\n","import { findall } from './_util.js'\n\nvar container_options = {\n selector: '[data-toggle=\"highlight\"]',\n target: '.highlight-target',\n mode: 'hover',\n classes: 'active'\n}\n\nexport function highlight(options) {\n this.each(function() {\n var settings = $.extend({}, container_options, options, this.dataset)\n var container = this\n // Loop through all triggers in the container. This may include the container itself\n findall($(this), settings.selector).each(function () {\n var opts = $.extend({}, settings, this.dataset)\n var $this = $(this).off('.g1.highlight')\n var event = opts.mode == 'click' ? 'click.g1.highlight' : 'mouseenter.g1.highlight mouseleave.g1.highlight'\n $this.on(event, function () {\n // When the trigger is triggered, toggle the target classes and fire a highlight event\n var target = $(opts.target, container).toggleClass(opts.classes)\n $this.trigger({ type: 'highlight', target: target })\n })\n })\n })\n return this\n}\n","export { version } from './src/package.js'\nimport { highlight } from './src/highlight.js'\n\nif (typeof jQuery != 'undefined') {\n jQuery.extend(jQuery.fn, {\n highlight: highlight\n })\n}\n","export { version } from './src/package.js'\nimport { leaflet_topojson } from './src/leaflet-utils.js'\n\nif (typeof L !== 'undefined')\n L.TopoJSON = L.GeoJSON.extend({\n addData: leaflet_topojson\n })\n","export function leaflet_topojson(json) {\n if (json.type === 'Topology')\n for (var key in json.objects)\n L.GeoJSON.prototype.addData.call(this, topojson.feature(json, json.objects[key]))\n else\n L.GeoJSON.prototype.addData.call(this, json)\n}\n","// data- attribute to store the last performed search\nvar _lastsearch_attr = 'search-last'\n// data- attribute to store granular search results\nvar _search_results = 'search-results'\n\nvar container_options = {\n selector: '[data-search]',\n hideClass: '',\n showClass: '',\n transform: 'strip',\n change: 'words',\n}\n\nexport function search(options) {\n var settings = $.extend({}, container_options, options, this.data())\n this\n .off('.g.search')\n .on('keyup.g.search change.g.search', settings.selector, run_search)\n .on('refresh.g.search', refresh)\n .on('search.g.search', function (e) {\n refresh(e)\n run_search(e)\n })\n // If the container *IS* the trigger, run search\n this.filter(settings.selector)\n .on('keyup.g.search change.g.search', run_search)\n return this\n\n // Extract & transform search strings. Cache in input's dataset.search_results\n // Return the search strings.\n function refresh(e) {\n var opts = $.extend({}, settings, e.target.dataset)\n var search_text = opts.search == '@text' ?\n function (el) { return el.textContent } :\n function (el) { return el.getAttribute(opts.search) }\n var transform = search.transforms[opts.transform]\n var result = $(opts.target).map(function() {\n var s = search_text(this)\n return { el: $(this), original: s, text: transform(s), show: true }\n }).get()\n $(e.target).data(_search_results, result)\n .removeData(_lastsearch_attr)\n return result\n }\n\n function run_search(e) {\n var opts = $.extend({}, settings, e.target.dataset)\n var $el = $(e.target)\n var out = {\n type: 'shown.g.search',\n searchText: $el.val()\n }\n out.search = search.changes[opts.change](search.transforms[opts.transform](out.searchText))\n var lastsearch = $el.data(_lastsearch_attr)\n if (lastsearch == out.search)\n return\n $el.data(_lastsearch_attr, out.search)\n\n var hidecls = opts.hideClass,\n showcls = opts.showClass,\n re = new RegExp(out.search || '.*')\n out.results = $el.data(_search_results) || refresh(e)\n out.matches = out.results.length\n out.results.forEach(function (cell) {\n var show = cell.text.match(re)\n if (show !== cell.show) {\n if (hidecls) cell.el[!show ? 'addClass' : 'removeClass'](hidecls)\n if (showcls) cell.el[show ? 'addClass' : 'removeClass'](showcls)\n cell.show = show\n }\n if (!show) out.matches--\n })\n $el.trigger(out)\n }\n}\n\nsearch.transforms = {\n strip: function (s) { return (s || '').toLowerCase().replace(/\\s+/g, ' ').replace(/^ /, '').replace(/ $/, '') }\n}\nsearch.changes = {\n words: function (s) { return s.replace(/\\s+/g, '.*') }\n}\n","export { version } from './src/package.js'\nimport { search } from './src/search.js'\n\nif (typeof jQuery != 'undefined') {\n jQuery.extend(jQuery.fn, {\n search: search\n })\n}\n","import { findall } from './_util.js'\n\nvar _renderer = 'g1.template.render'\nvar _compiled = 'g1.template.compiled'\nvar _prev_created = 'g1.template.prev_created'\n\n\nfunction subtemplates($main) {\n // Takes a main template as a jQuery node with data-template-=\"selector\" attributes.\n // Return an object of {name: selector}\n return _.chain($main.data())\n .pickBy(function (val, key) { return key.match(/^template/) })\n .mapKeys(function (val, key) { return key.replace(/^template/, '').toLowerCase() })\n .value()\n}\n\nexport function template(data, options) {\n options = options || {}\n var self = this\n var selector = options.selector || self.data('selector') || 'script[type=\"text/html\"],template'\n\n // Pre-create the template rendering function\n // Store this in .data('template.function')\n findall(self, selector).each(function () {\n var $this = $(this)\n // If we want to dispose the last target, just dispose it.\n if (data === 'dispose') {\n var $oldtarget = $this.data(_prev_created)\n if ($oldtarget)\n $oldtarget.remove()\n return $this.trigger({\n type: 'template',\n templatedata: data,\n target: $oldtarget\n })\n }\n var renderer = $this.data(_renderer)\n // If the renderer is already present, just use it. Else compile it\n if (renderer)\n renderer(data, options)\n // If there are subtemplate dependencies, compile them\n else if (_.size(subtemplates($this)))\n dependent_templates($this, self, data, options)\n // If there aren't, then compile immediately.\n else\n make_template($this, data, options)\n })\n return this\n}\n\nfunction dependent_templates(selector, self, data, options) {\n var uncompiled_selectors = _.pickBy(subtemplates(selector), function (sel) {\n return !$(sel).data(_compiled)\n })\n return Promise.all(\n _.map(uncompiled_selectors, function (sel) { return dependent_templates($(sel), self, data, options) })\n ).then(function () {\n return Promise.all(\n _.union(\n _.map(uncompiled_selectors, function (sel) { return make_template($(sel), data, options) }),\n make_template(selector, data, options)\n )\n )\n })\n .catch(function (error) { console.error(error) }) // eslint-disable-line no-console\n}\n\nfunction make_template($this, data, options) {\n // Compile templates. If the template has src=\"\", load it and then compile it.\n // The result is in $this.data(_compiled) (via make_template_sync).\n var html = $this.html()\n // Contents of script are regular strings. Contents of template are escaped\n if (!$this.is('script'))\n html = _.unescape(html)\n\n var src = $this.attr('src')\n if (src) {\n // If the AJAX load succeeds, render the loaded template\n // Else render the contents, with an additional xhr variable\n return $.get(src).done(function (html) {\n make_template_sync($this, html, data, options)\n }).fail(function (xhr) {\n data.xhr = xhr\n make_template_sync($this, html, data, options)\n })\n }\n // If no src= is specified, just render the contents\n else make_template_sync($this, html, data, options)\n}\n\n\n// Bind a template renderer to the node $this.data('template.render')\n// This renderer function accepts (data, options) and creates\n// - runs the html template, parses the result, and create a target node\n// - appends the target node after $this (clearing any previous target nodes)\n// - stores the target node in $this.data('template.target')\n// - triggers a template event (with .templatedata, .target)\n// - returns the target node\nfunction make_template_sync($this, html, data, default_options) {\n var compiled_template = _.template(html)\n var $created\n\n // $this.data(_compiled) has the compiled template. This adds sub-template\n // variables from data-template-* attributes.\n $this.data(_compiled, function (subtemplate_data) {\n subtemplate_data = _.extend(\n {$node: $this, $data: $this.data()},\n _.mapValues(subtemplates($this), function (selector) { return $(selector).data(_compiled) }),\n subtemplate_data || {}\n )\n return compiled_template(subtemplate_data)\n })\n\n function renderer(data, options) {\n html = $this.data(_compiled)(data)\n // Get options. DOM data-* over-rides JS options\n var append = $this.data('append') || (options ? options.append : default_options.append)\n var target = $this.data('target') || (options ? options.target : default_options.target)\n var engine = $this.data('engine') || (options ? options.engine : default_options.engine)\n if (!engine || typeof engine == 'string')\n engine = template.engines[engine] || template.engines['default']\n // If we're appending the contents, just add the text\n if (append) {\n $created = $($.parseHTML(html.trim()))\n // If we're appending to a target node, just append to it.\n if (target)\n $(target).append($created)\n // If no target node, add BEFORE template. Future appends will be in sequence\n else\n $this.before($created)\n }\n // If we're not appending, replace the contents using the renderer\n else {\n // The engine must return the created nodes. See template.engines spec below\n $created = engine($this, target, html)\n // Store the created nodes for future reference. See template.engines spec below\n $this.data(_prev_created, $created)\n }\n // Trigger the template event. Use \"templatedata\" since \".data\" is reserved\n $this.trigger({ type: 'template', templatedata: data, target: $created })\n return $created\n }\n $this.data(_renderer, renderer)\n return $this.data('target') !== false ? renderer(data) : null\n}\n\n\n// $.fn.template.engines is a registry of rendering engines. Each entry is a\n// function that accepts 3 parameters:\n// $this: the