From 937d3bdea6f9e739c4de32bba890814d7b193d78 Mon Sep 17 00:00:00 2001 From: akira Date: Sun, 4 Sep 2022 18:44:54 +0000 Subject: [PATCH] update --- .ipynb_checkpoints/Untitled1-checkpoint.ipynb | 6 + .ipynb_checkpoints/momentjs-checkpoint.ipynb | 6 + .ipynb_checkpoints/qs-checkpoint.ipynb | 4 +- .ipynb_checkpoints/μ-checkpoint.ipynb | 278 + Untitled1.ipynb | 6 + momentjs.ipynb | 41 + qs.ipynb | 4 +- resources/.ipynb_checkpoints/u-checkpoint.js | 5143 +++++++++++++++++ .../.ipynb_checkpoints/u-min-checkpoint.js | 1 + resources/u-min.js | 1 + resources/u.js | 5143 +++++++++++++++++ μ.ipynb | 278 + 12 files changed, 10909 insertions(+), 2 deletions(-) create mode 100644 .ipynb_checkpoints/Untitled1-checkpoint.ipynb create mode 100644 .ipynb_checkpoints/momentjs-checkpoint.ipynb create mode 100644 .ipynb_checkpoints/μ-checkpoint.ipynb create mode 100644 Untitled1.ipynb create mode 100644 momentjs.ipynb create mode 100644 resources/.ipynb_checkpoints/u-checkpoint.js create mode 100644 resources/.ipynb_checkpoints/u-min-checkpoint.js create mode 100644 resources/u-min.js create mode 100644 resources/u.js create mode 100644 μ.ipynb diff --git a/.ipynb_checkpoints/Untitled1-checkpoint.ipynb b/.ipynb_checkpoints/Untitled1-checkpoint.ipynb new file mode 100644 index 0000000..363fcab --- /dev/null +++ b/.ipynb_checkpoints/Untitled1-checkpoint.ipynb @@ -0,0 +1,6 @@ +{ + "cells": [], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 5 +} diff --git a/.ipynb_checkpoints/momentjs-checkpoint.ipynb b/.ipynb_checkpoints/momentjs-checkpoint.ipynb new file mode 100644 index 0000000..363fcab --- /dev/null +++ b/.ipynb_checkpoints/momentjs-checkpoint.ipynb @@ -0,0 +1,6 @@ +{ + "cells": [], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 5 +} diff --git a/.ipynb_checkpoints/qs-checkpoint.ipynb b/.ipynb_checkpoints/qs-checkpoint.ipynb index e2bb1ac..cb9115a 100644 --- a/.ipynb_checkpoints/qs-checkpoint.ipynb +++ b/.ipynb_checkpoints/qs-checkpoint.ipynb @@ -7,7 +7,9 @@ "source": [ "# qs\n", "- A querystring parsing and stringifying library with some added security.\n", - "- [https://www.npmjs.com/package/qs](https://www.npmjs.com/package/qs)\n" + "- [https://www.npmjs.com/package/qs](https://www.npmjs.com/package/qs)\n", + "\n", + "冲突处理 git merge remotes/origin/master master" ] }, { diff --git a/.ipynb_checkpoints/μ-checkpoint.ipynb b/.ipynb_checkpoints/μ-checkpoint.ipynb new file mode 100644 index 0000000..2368184 --- /dev/null +++ b/.ipynb_checkpoints/μ-checkpoint.ipynb @@ -0,0 +1,278 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "id": "19016eb2-043d-446f-9949-6ba6e3eda6ec", + "metadata": {}, + "source": [ + "# μ\n", + "μ is a JavaScript library for encoding/decoding state (JavaScript object) in URL. Define a spec for the state, based on which the encoding is done. Manage the state with versioning.\n", + "\n", + "https://github.com/ananthakumaran/u" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "id": "dcc14dfe-fcdc-43f1-9c6d-3538d8f7ec28", + "metadata": { + "collapsed": true, + "jupyter": { + "outputs_hidden": true, + "source_hidden": true + }, + "tags": [] + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{\n", + " version: 1,\n", + " spec: { encode: [Function: encode], decode: [Function: decode] },\n", + " jsonSpec: {\n", + " lookingFor: [ 'oneOf', 'bride', 'groom' ],\n", + " age: [ 'tuple', [Array], [Array] ],\n", + " religion: [\n", + " 'oneOf', 'Hindu',\n", + " 'Muslim', 'Christian',\n", + " 'Sikh', 'Parsi',\n", + " 'Jain', 'Buddhist',\n", + " 'Jewish', 'No Religion',\n", + " 'Spiritual', 'Other'\n", + " ],\n", + " motherTongue: [\n", + " 'oneOf', 'Assamese',\n", + " 'Bengali', 'English',\n", + " 'Gujarati', 'Hindi',\n", + " 'Kannada', 'Konkani',\n", + " 'Malayalam', 'Marathi',\n", + " 'Marwari', 'Odia',\n", + " 'Punjabi', 'Sindhi',\n", + " 'Tamil', 'Telugu',\n", + " 'Urdu'\n", + " ],\n", + " onlyProfileWithPhoto: [ 'boolean' ]\n", + " },\n", + " encodedVersion: 'b',\n", + " migrate: [Function (anonymous)]\n", + "}\n" + ] + }, + { + "data": { + "text/plain": [ + "undefined" + ] + }, + "execution_count": 5, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "import {fromJson, encode, decode} from \"./resources/u\"\n", + "var spec = {\n", + " lookingFor: ['oneOf', 'bride', 'groom'],\n", + " age: ['tuple', ['integer'] /* min */, ['integer'] /* max */],\n", + " religion: ['oneOf', 'Hindu', 'Muslim', 'Christian', 'Sikh', 'Parsi', 'Jain', 'Buddhist', 'Jewish', 'No Religion', 'Spiritual', 'Other'],\n", + " motherTongue: ['oneOf', 'Assamese', 'Bengali', 'English', 'Gujarati', 'Hindi', 'Kannada', 'Konkani', 'Malayalam', 'Marathi', 'Marwari', 'Odia', 'Punjabi', 'Sindhi', 'Tamil', 'Telugu', 'Urdu'],\n", + " onlyProfileWithPhoto: ['boolean']\n", + "};\n", + "\n", + "var v1 = fromJson(1, spec);\n", + "console.log(v1)" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "id": "b6ba3e69-75a8-4e7b-817f-eafabd3c0214", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "{\n", + " age: [ 25, 30 ],\n", + " lookingFor: 'bride',\n", + " motherTongue: 'Bengali',\n", + " onlyProfileWithPhoto: true,\n", + " religion: 'Hindu'\n", + "}" + ] + }, + "execution_count": 7, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "import {fromJson, encode, decode} from \"./resources/u\"\n", + "var encodedv1 = encode(v1, {lookingFor: 'bride', age: [25, 30], religion: 'Hindu', motherTongue: 'Bengali', onlyProfileWithPhoto: true});\n", + "//=> 'bHhc9I-aqa'\n", + "decode([v1], encodedv1) //=> {lookingFor: 'bride', age: [25, 30], religion: 'Hindu', motherTongue: 'Bengali', onlyProfileWithPhoto: true});\n" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "id": "666b73b0-58e6-4d13-a09a-ec88b2f048d5", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "{\n", + " age: [ 25, 30 ],\n", + " lookingFor: 'bride',\n", + " maritialStatus: 'Never Married',\n", + " motherTongue: 'Bengali',\n", + " onlyProfileWithPhoto: true,\n", + " religion: 'Hindu'\n", + "}" + ] + }, + "execution_count": 13, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "import {fromJson, encode, decode} from \"./resources/u\"\n", + "import _ from \"lodash\"\n", + "var newSpec = _.extend({}, spec, {\n", + " maritialStatus: ['oneOf', \"Doesn't Matter\", 'Never Married', 'Divorced', 'Widowed', 'Awaiting Divorce', 'Annulled']\n", + "});\n", + "var v2 = fromJson(2, newSpec, function (old) {\n", + " old.maritialStatus = \"Doesn't Matter\";\n", + " return old;\n", + "});\n", + "\n", + "decode([v1, v2], encodedv1) //=> {lookingFor: 'bride', age: [25, 30], religion: 'Hindu', motherTongue: 'Bengali', onlyProfileWithPhoto: true, maritialStatus: \"Doesn't Matter\"});\n", + "var encodedv2 = encode(v2, {lookingFor: 'bride', age: [25, 30], religion: 'Hindu', motherTongue: 'Bengali', onlyProfileWithPhoto: true, maritialStatus: 'Never Married'});\n", + "//=> 'cHlc9I-aHaa'\n", + "decode([v1, v2], encodedv2) //=> {lookingFor: 'bride', age: [25, 30], religion: 'Hindu', motherTongue: 'Bengali', onlyProfileWithPhoto: true, maritialStatus: 'Never Married'});" + ] + }, + { + "cell_type": "markdown", + "id": "cb0e6939-675a-4345-9e2f-27922fc888d3", + "metadata": {}, + "source": [ + "# μ [![Build Status](https://travis-ci.org/ananthakumaran/u.svg?branch=master)](https://travis-ci.org/ananthakumaran/u)\n", + "\n", + "Without μ:\n", + "`http://app.com/url#%7B%22lookingFor%22:%22bride%22,%22age%22:%5B25,30%5D,%22religion%22:%22Hindu%22,%22motherTongue%22:%22Bengali%22,%22onlyProfileWithPhoto%22:true%7D`\n", + "\n", + "With μ:\n", + "`http://app.com/url#bHhc9I-aqa`\n", + "\n", + "μ is a JavaScript library for encoding/decoding state (JavaScript\n", + "object) in URL. Define a spec for the state, based on which the\n", + "encoding is done. Manage the state with versioning.\n", + "\n", + "## Example\n", + "\n", + "Import the library\n", + "\n", + "`import {fromJson, encode, decode} from \"u\";`\n", + "\n", + "Define the spec.\n", + "\n", + "```javascript\n", + "var spec = {\n", + " lookingFor: ['oneOf', 'bride', 'groom'],\n", + " age: ['tuple', ['integer'] /* min */, ['integer'] /* max */],\n", + " religion: ['oneOf', 'Hindu', 'Muslim', 'Christian', 'Sikh', 'Parsi', 'Jain', 'Buddhist', 'Jewish', 'No Religion', 'Spiritual', 'Other'],\n", + " motherTongue: ['oneOf', 'Assamese', 'Bengali', 'English', 'Gujarati', 'Hindi', 'Kannada', 'Konkani', 'Malayalam', 'Marathi', 'Marwari', 'Odia', 'Punjabi', 'Sindhi', 'Tamil', 'Telugu', 'Urdu'],\n", + " onlyProfileWithPhoto: ['boolean']\n", + "};\n", + "\n", + "var v1 = fromJson(1, spec);\n", + "```\n", + "\n", + "Encode the object/state.\n", + "\n", + "```javascript\n", + "var encodedv1 = encode(v1, {lookingFor: 'bride', age: [25, 30], religion: 'Hindu', motherTongue: 'Bengali', onlyProfileWithPhoto: true});\n", + "//=> 'bHhc9I-aqa'\n", + "decode([v1], encodedv1) //=> {lookingFor: 'bride', age: [25, 30], religion: 'Hindu', motherTongue: 'Bengali', onlyProfileWithPhoto: true});\n", + "```\n", + "\n", + "Update your spec, as your application state space grows. Use versioning to\n", + "encode/decode state.\n", + "\n", + "```javascript\n", + "var newSpec = _.extend({}, spec, {\n", + " maritialStatus: ['oneOf', \"Doesn't Matter\", 'Never Married', 'Divorced', 'Widowed', 'Awaiting Divorce', 'Annulled']\n", + "});\n", + "var v2 = fromJson(2, newSpec, function (old) {\n", + " old.maritialStatus = \"Doesn't Matter\";\n", + " return old;\n", + "});\n", + "\n", + "decode([v1, v2], encodedv1) //=> {lookingFor: 'bride', age: [25, 30], religion: 'Hindu', motherTongue: 'Bengali', onlyProfileWithPhoto: true, maritialStatus: \"Doesn't Matter\"});\n", + "var encodedv2 = encode(v2, {lookingFor: 'bride', age: [25, 30], religion: 'Hindu', motherTongue: 'Bengali', onlyProfileWithPhoto: true, maritialStatus: 'Never Married'});\n", + "//=> 'cHlc9I-aHaa'\n", + "decode([v1, v2], encodedv2) //=> {lookingFor: 'bride', age: [25, 30], religion: 'Hindu', motherTongue: 'Bengali', onlyProfileWithPhoto: true, maritialStatus: 'Never Married'});\n", + "```\n", + "\n", + "## API\n", + "\n", + "### fromJson(version, spec, [migrate])\n", + "\n", + "**version** - spec version number \n", + "**spec** - used to define the structure and domain of the data.\n", + "\n", + "*structure* \n", + "object is defined using { key: specForValue, ... } \n", + "array is defined using ['array', specForValue ] \n", + "tuple is defined using ['tuple', specForValueAtIndexZero, specForValueAtIndexOne, ...] \n", + "\n", + "*domain* \n", + "domain is defined using [domainName, arg1, arg2, ...]\n", + "\n", + "| Domain | Args | Description |\n", + "---------|------|-------------|\n", + "| oneOf | allowed values | can be considered similar to enum. As we only encode the index position, the value could be anything |\n", + "| integer | | any integer |\n", + "| boolean | | true or false |\n", + "| fixedchar | Size of the string | fixed length string |\n", + "| varchar | | variable length string |\n", + "\n", + "**migrate** - a function that will get called in case where you decode\n", + "an object encoded using older spec. For example, there are three\n", + "versions v1, v2, v3 and you try to decode the string encoded using v1,\n", + "then the migrate method in v2 and v3 will get called with the decoded\n", + "value.\n", + "\n", + "### encode(coder, object)\n", + "\n", + "**coder** - coder created using fromJson \n", + "**object** - object that needs to encoded \n", + "\n", + "### decode(coders, blob)\n", + "\n", + "**coders** - array of coder. \n", + "**blob** - the string that is returned by encode. \n" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "jp-Babel (Node.js)", + "language": "babel", + "name": "babel" + }, + "language_info": { + "file_extension": ".js", + "mimetype": "application/javascript", + "name": "javascript", + "version": "17.9.0" + } + }, + "nbformat": 4, + "nbformat_minor": 5 +} diff --git a/Untitled1.ipynb b/Untitled1.ipynb new file mode 100644 index 0000000..363fcab --- /dev/null +++ b/Untitled1.ipynb @@ -0,0 +1,6 @@ +{ + "cells": [], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 5 +} diff --git a/momentjs.ipynb b/momentjs.ipynb new file mode 100644 index 0000000..f8bbccf --- /dev/null +++ b/momentjs.ipynb @@ -0,0 +1,41 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": 5, + "id": "c3f7fd65-9f5f-452e-a942-04fdd69a6daa", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "1677776563424" + ] + }, + "execution_count": 5, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "import moment from \"moment\"\n", + "moment().add(180,\"days\").valueOf()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "jp-Babel (Node.js)", + "language": "babel", + "name": "babel" + }, + "language_info": { + "file_extension": ".js", + "mimetype": "application/javascript", + "name": "javascript", + "version": "17.9.0" + } + }, + "nbformat": 4, + "nbformat_minor": 5 +} diff --git a/qs.ipynb b/qs.ipynb index e2bb1ac..cb9115a 100644 --- a/qs.ipynb +++ b/qs.ipynb @@ -7,7 +7,9 @@ "source": [ "# qs\n", "- A querystring parsing and stringifying library with some added security.\n", - "- [https://www.npmjs.com/package/qs](https://www.npmjs.com/package/qs)\n" + "- [https://www.npmjs.com/package/qs](https://www.npmjs.com/package/qs)\n", + "\n", + "冲突处理 git merge remotes/origin/master master" ] }, { diff --git a/resources/.ipynb_checkpoints/u-checkpoint.js b/resources/.ipynb_checkpoints/u-checkpoint.js new file mode 100644 index 0000000..0bd1110 --- /dev/null +++ b/resources/.ipynb_checkpoints/u-checkpoint.js @@ -0,0 +1,5143 @@ +(function webpackUniversalModuleDefinition(root, factory) { + if(typeof exports === 'object' && typeof module === 'object') + module.exports = factory(); + else if(typeof define === 'function' && define.amd) + define([], factory); + else if(typeof exports === 'object') + exports["u"] = factory(); + else + root["u"] = factory(); +})(this, function() { +return /******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; + +/******/ // The require function +/******/ function __webpack_require__(moduleId) { + +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) +/******/ return installedModules[moduleId].exports; + +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ exports: {}, +/******/ id: moduleId, +/******/ loaded: false +/******/ }; + +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); + +/******/ // Flag the module as loaded +/******/ module.loaded = true; + +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } + + +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = modules; + +/******/ // expose the module cache +/******/ __webpack_require__.c = installedModules; + +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; + +/******/ // Load entry module and return exports +/******/ return __webpack_require__(0); +/******/ }) +/************************************************************************/ +/******/ ([ +/* 0 */ +/***/ function(module, exports, __webpack_require__) { + + "use strict"; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.register = exports.decode = exports.encode = exports.fromJson = undefined; + + var _coder = __webpack_require__(1); + + Object.defineProperty(exports, "fromJson", { + enumerable: true, + get: function get() { + return _coder.fromJson; + } + }); + Object.defineProperty(exports, "encode", { + enumerable: true, + get: function get() { + return _coder.encode; + } + }); + Object.defineProperty(exports, "decode", { + enumerable: true, + get: function get() { + return _coder.decode; + } + }); + Object.defineProperty(exports, "register", { + enumerable: true, + get: function get() { + return _coder.register; + } + }); + + __webpack_require__(123); + + __webpack_require__(124); + + __webpack_require__(125); + + __webpack_require__(126); + + __webpack_require__(127); + + __webpack_require__(128); + + __webpack_require__(135); + + __webpack_require__(136); + +/***/ }, +/* 1 */ +/***/ function(module, exports, __webpack_require__) { + + "use strict"; + + var _fromPairs = __webpack_require__(2); + + var _fromPairs2 = _interopRequireDefault(_fromPairs); + + var _keys = __webpack_require__(3); + + var _keys2 = _interopRequireDefault(_keys); + + var _isObject = __webpack_require__(14); + + var _isObject2 = _interopRequireDefault(_isObject); + + var _tail = __webpack_require__(21); + + var _tail2 = _interopRequireDefault(_tail); + + var _map = __webpack_require__(26); + + var _map2 = _interopRequireDefault(_map); + + var _isArray = __webpack_require__(17); + + var _isArray2 = _interopRequireDefault(_isArray); + + var _reduce = __webpack_require__(102); + + var _reduce2 = _interopRequireDefault(_reduce); + + var _filter = __webpack_require__(105); + + var _filter2 = _interopRequireDefault(_filter); + + var _sortBy = __webpack_require__(108); + + var _sortBy2 = _interopRequireDefault(_sortBy); + + var _find = __webpack_require__(118); + + var _find2 = _interopRequireDefault(_find); + + var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }(); + + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.register = register; + exports.encode = encode; + exports.decode = decode; + exports.fromJson = fromJson; + + var _core = __webpack_require__(121); + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + + var availableTypes = {}; + + function register(name, type) { + availableTypes[name] = type; + } + + function encode(coder, object) { + var _coder$spec$encode = coder.spec.encode(object); + + var bits = _coder$spec$encode.bits; + var blob = _coder$spec$encode.blob; + + return coder.encodedVersion + (0, _core.toVarN)(bits.length) + (0, _core.bitsToN)(bits) + blob; + } + + function decode(coders, string) { + var version, bitSize; + + var _fromVarN = (0, _core.fromVarN)(string); + + var _fromVarN2 = _slicedToArray(_fromVarN, 2); + + version = _fromVarN2[0]; + string = _fromVarN2[1]; + + var _fromVarN3 = (0, _core.fromVarN)(string); + + var _fromVarN4 = _slicedToArray(_fromVarN3, 2); + + bitSize = _fromVarN4[0]; + string = _fromVarN4[1]; + + var coder = (0, _find2.default)(coders, function (c) { + return c.version === version; + }); + if (!coder) { + throw new Error("Invalid version: " + version); + } + + var bitCharSize = Math.ceil(bitSize / 6); + var bits = (0, _core.nToBits)(string.substr(0, bitCharSize), bitSize); + var blob = string.substr(bitCharSize); + var result = coder.spec.decode({ bits: bits, blob: blob }); + var pendingMigrations = (0, _sortBy2.default)((0, _filter2.default)(coders, function (coder) { + return coder.version > version; + }), 'version'); + return (0, _reduce2.default)(pendingMigrations, function (value, coder) { + return coder.migrate(value); + }, result.value); + } + + function fromJson(version, jsonSpec, migrate) { + function loop(spec) { + if ((0, _isArray2.default)(spec)) { + var method = spec[0]; + if (method === 'tuple') { + return availableTypes.tuple((0, _map2.default)((0, _tail2.default)(spec), loop)); + } else if (method === 'array') { + return availableTypes.array(loop(spec[1])); + } else { + return availableTypes[method].apply(null, (0, _tail2.default)(spec)); + } + } else if ((0, _isObject2.default)(spec)) { + var entries = (0, _keys2.default)(spec).sort(); + return availableTypes.object((0, _fromPairs2.default)((0, _map2.default)(entries, function (key) { + return [key, loop(spec[key])]; + }))); + } + } + + return { + version: version, + spec: loop(jsonSpec), + jsonSpec: jsonSpec, + encodedVersion: (0, _core.toVarN)(version), + migrate: migrate || function (x) { + return x; + } + }; + } + +/***/ }, +/* 2 */ +/***/ function(module, exports) { + + /** + * The inverse of `_.toPairs`; this method returns an object composed + * from key-value `pairs`. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} pairs The key-value pairs. + * @returns {Object} Returns the new object. + * @example + * + * _.fromPairs([['fred', 30], ['barney', 40]]); + * // => { 'fred': 30, 'barney': 40 } + */ + function fromPairs(pairs) { + var index = -1, + length = pairs ? pairs.length : 0, + result = {}; + + while (++index < length) { + var pair = pairs[index]; + result[pair[0]] = pair[1]; + } + return result; + } + + module.exports = fromPairs; + + +/***/ }, +/* 3 */ +/***/ function(module, exports, __webpack_require__) { + + var baseHas = __webpack_require__(4), + baseKeys = __webpack_require__(5), + indexKeys = __webpack_require__(6), + isArrayLike = __webpack_require__(10), + isIndex = __webpack_require__(19), + isPrototype = __webpack_require__(20); + + /** + * Creates an array of the own enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. See the + * [ES spec](http://ecma-international.org/ecma-262/6.0/#sec-object.keys) + * for more details. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keys(new Foo); + * // => ['a', 'b'] (iteration order is not guaranteed) + * + * _.keys('hi'); + * // => ['0', '1'] + */ + function keys(object) { + var isProto = isPrototype(object); + if (!(isProto || isArrayLike(object))) { + return baseKeys(object); + } + var indexes = indexKeys(object), + skipIndexes = !!indexes, + result = indexes || [], + length = result.length; + + for (var key in object) { + if (baseHas(object, key) && + !(skipIndexes && (key == 'length' || isIndex(key, length))) && + !(isProto && key == 'constructor')) { + result.push(key); + } + } + return result; + } + + module.exports = keys; + + +/***/ }, +/* 4 */ +/***/ function(module, exports) { + + /** Used for built-in method references. */ + var objectProto = Object.prototype; + + /** Used to check objects for own properties. */ + var hasOwnProperty = objectProto.hasOwnProperty; + + /** Built-in value references. */ + var getPrototypeOf = Object.getPrototypeOf; + + /** + * The base implementation of `_.has` without support for deep paths. + * + * @private + * @param {Object} object The object to query. + * @param {Array|string} key The key to check. + * @returns {boolean} Returns `true` if `key` exists, else `false`. + */ + function baseHas(object, key) { + // Avoid a bug in IE 10-11 where objects with a [[Prototype]] of `null`, + // that are composed entirely of index properties, return `false` for + // `hasOwnProperty` checks of them. + return hasOwnProperty.call(object, key) || + (typeof object == 'object' && key in object && getPrototypeOf(object) === null); + } + + module.exports = baseHas; + + +/***/ }, +/* 5 */ +/***/ function(module, exports) { + + /* Built-in method references for those with the same name as other `lodash` methods. */ + var nativeKeys = Object.keys; + + /** + * The base implementation of `_.keys` which doesn't skip the constructor + * property of prototypes or treat sparse arrays as dense. + * + * @private + * @type Function + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ + function baseKeys(object) { + return nativeKeys(Object(object)); + } + + module.exports = baseKeys; + + +/***/ }, +/* 6 */ +/***/ function(module, exports, __webpack_require__) { + + var baseTimes = __webpack_require__(7), + isArguments = __webpack_require__(8), + isArray = __webpack_require__(17), + isLength = __webpack_require__(15), + isString = __webpack_require__(18); + + /** + * Creates an array of index keys for `object` values of arrays, + * `arguments` objects, and strings, otherwise `null` is returned. + * + * @private + * @param {Object} object The object to query. + * @returns {Array|null} Returns index keys, else `null`. + */ + function indexKeys(object) { + var length = object ? object.length : undefined; + if (isLength(length) && + (isArray(object) || isString(object) || isArguments(object))) { + return baseTimes(length, String); + } + return null; + } + + module.exports = indexKeys; + + +/***/ }, +/* 7 */ +/***/ function(module, exports) { + + /** + * The base implementation of `_.times` without support for iteratee shorthands + * or max array length checks. + * + * @private + * @param {number} n The number of times to invoke `iteratee`. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the array of results. + */ + function baseTimes(n, iteratee) { + var index = -1, + result = Array(n); + + while (++index < n) { + result[index] = iteratee(index); + } + return result; + } + + module.exports = baseTimes; + + +/***/ }, +/* 8 */ +/***/ function(module, exports, __webpack_require__) { + + var isArrayLikeObject = __webpack_require__(9); + + /** `Object#toString` result references. */ + var argsTag = '[object Arguments]'; + + /** Used for built-in method references. */ + var objectProto = Object.prototype; + + /** Used to check objects for own properties. */ + var hasOwnProperty = objectProto.hasOwnProperty; + + /** + * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) + * of values. + */ + var objectToString = objectProto.toString; + + /** Built-in value references. */ + var propertyIsEnumerable = objectProto.propertyIsEnumerable; + + /** + * Checks if `value` is likely an `arguments` object. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. + * @example + * + * _.isArguments(function() { return arguments; }()); + * // => true + * + * _.isArguments([1, 2, 3]); + * // => false + */ + function isArguments(value) { + // Safari 8.1 incorrectly makes `arguments.callee` enumerable in strict mode. + return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') && + (!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag); + } + + module.exports = isArguments; + + +/***/ }, +/* 9 */ +/***/ function(module, exports, __webpack_require__) { + + var isArrayLike = __webpack_require__(10), + isObjectLike = __webpack_require__(16); + + /** + * This method is like `_.isArrayLike` except that it also checks if `value` + * is an object. + * + * @static + * @memberOf _ + * @type Function + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array-like object, else `false`. + * @example + * + * _.isArrayLikeObject([1, 2, 3]); + * // => true + * + * _.isArrayLikeObject(document.body.children); + * // => true + * + * _.isArrayLikeObject('abc'); + * // => false + * + * _.isArrayLikeObject(_.noop); + * // => false + */ + function isArrayLikeObject(value) { + return isObjectLike(value) && isArrayLike(value); + } + + module.exports = isArrayLikeObject; + + +/***/ }, +/* 10 */ +/***/ function(module, exports, __webpack_require__) { + + var getLength = __webpack_require__(11), + isFunction = __webpack_require__(13), + isLength = __webpack_require__(15); + + /** + * Checks if `value` is array-like. A value is considered array-like if it's + * not a function and has a `value.length` that's an integer greater than or + * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`. + * + * @static + * @memberOf _ + * @type Function + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is array-like, else `false`. + * @example + * + * _.isArrayLike([1, 2, 3]); + * // => true + * + * _.isArrayLike(document.body.children); + * // => true + * + * _.isArrayLike('abc'); + * // => true + * + * _.isArrayLike(_.noop); + * // => false + */ + function isArrayLike(value) { + return value != null && + !(typeof value == 'function' && isFunction(value)) && isLength(getLength(value)); + } + + module.exports = isArrayLike; + + +/***/ }, +/* 11 */ +/***/ function(module, exports, __webpack_require__) { + + var baseProperty = __webpack_require__(12); + + /** + * Gets the "length" property value of `object`. + * + * **Note:** This function is used to avoid a [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792) + * that affects Safari on at least iOS 8.1-8.3 ARM64. + * + * @private + * @param {Object} object The object to query. + * @returns {*} Returns the "length" value. + */ + var getLength = baseProperty('length'); + + module.exports = getLength; + + +/***/ }, +/* 12 */ +/***/ function(module, exports) { + + /** + * The base implementation of `_.property` without support for deep paths. + * + * @private + * @param {string} key The key of the property to get. + * @returns {Function} Returns the new function. + */ + function baseProperty(key) { + return function(object) { + return object == null ? undefined : object[key]; + }; + } + + module.exports = baseProperty; + + +/***/ }, +/* 13 */ +/***/ function(module, exports, __webpack_require__) { + + var isObject = __webpack_require__(14); + + /** `Object#toString` result references. */ + var funcTag = '[object Function]', + genTag = '[object GeneratorFunction]'; + + /** Used for built-in method references. */ + var objectProto = Object.prototype; + + /** + * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) + * of values. + */ + var objectToString = objectProto.toString; + + /** + * Checks if `value` is classified as a `Function` object. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. + * @example + * + * _.isFunction(_); + * // => true + * + * _.isFunction(/abc/); + * // => false + */ + function isFunction(value) { + // The use of `Object#toString` avoids issues with the `typeof` operator + // in Safari 8 which returns 'object' for typed array constructors, and + // PhantomJS 1.9 which returns 'function' for `NodeList` instances. + var tag = isObject(value) ? objectToString.call(value) : ''; + return tag == funcTag || tag == genTag; + } + + module.exports = isFunction; + + +/***/ }, +/* 14 */ +/***/ function(module, exports) { + + /** + * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`. + * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(_.noop); + * // => true + * + * _.isObject(null); + * // => false + */ + function isObject(value) { + var type = typeof value; + return !!value && (type == 'object' || type == 'function'); + } + + module.exports = isObject; + + +/***/ }, +/* 15 */ +/***/ function(module, exports) { + + /** Used as references for various `Number` constants. */ + var MAX_SAFE_INTEGER = 9007199254740991; + + /** + * Checks if `value` is a valid array-like length. + * + * **Note:** This function is loosely based on [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength). + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. + * @example + * + * _.isLength(3); + * // => true + * + * _.isLength(Number.MIN_VALUE); + * // => false + * + * _.isLength(Infinity); + * // => false + * + * _.isLength('3'); + * // => false + */ + function isLength(value) { + return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; + } + + module.exports = isLength; + + +/***/ }, +/* 16 */ +/***/ function(module, exports) { + + /** + * Checks if `value` is object-like. A value is object-like if it's not `null` + * and has a `typeof` result of "object". + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + * @example + * + * _.isObjectLike({}); + * // => true + * + * _.isObjectLike([1, 2, 3]); + * // => true + * + * _.isObjectLike(_.noop); + * // => false + * + * _.isObjectLike(null); + * // => false + */ + function isObjectLike(value) { + return !!value && typeof value == 'object'; + } + + module.exports = isObjectLike; + + +/***/ }, +/* 17 */ +/***/ function(module, exports) { + + /** + * Checks if `value` is classified as an `Array` object. + * + * @static + * @memberOf _ + * @type Function + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. + * @example + * + * _.isArray([1, 2, 3]); + * // => true + * + * _.isArray(document.body.children); + * // => false + * + * _.isArray('abc'); + * // => false + * + * _.isArray(_.noop); + * // => false + */ + var isArray = Array.isArray; + + module.exports = isArray; + + +/***/ }, +/* 18 */ +/***/ function(module, exports, __webpack_require__) { + + var isArray = __webpack_require__(17), + isObjectLike = __webpack_require__(16); + + /** `Object#toString` result references. */ + var stringTag = '[object String]'; + + /** Used for built-in method references. */ + var objectProto = Object.prototype; + + /** + * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) + * of values. + */ + var objectToString = objectProto.toString; + + /** + * Checks if `value` is classified as a `String` primitive or object. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. + * @example + * + * _.isString('abc'); + * // => true + * + * _.isString(1); + * // => false + */ + function isString(value) { + return typeof value == 'string' || + (!isArray(value) && isObjectLike(value) && objectToString.call(value) == stringTag); + } + + module.exports = isString; + + +/***/ }, +/* 19 */ +/***/ function(module, exports) { + + /** Used as references for various `Number` constants. */ + var MAX_SAFE_INTEGER = 9007199254740991; + + /** Used to detect unsigned integer values. */ + var reIsUint = /^(?:0|[1-9]\d*)$/; + + /** + * Checks if `value` is a valid array-like index. + * + * @private + * @param {*} value The value to check. + * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. + * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. + */ + function isIndex(value, length) { + value = (typeof value == 'number' || reIsUint.test(value)) ? +value : -1; + length = length == null ? MAX_SAFE_INTEGER : length; + return value > -1 && value % 1 == 0 && value < length; + } + + module.exports = isIndex; + + +/***/ }, +/* 20 */ +/***/ function(module, exports) { + + /** Used for built-in method references. */ + var objectProto = Object.prototype; + + /** + * Checks if `value` is likely a prototype object. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a prototype, else `false`. + */ + function isPrototype(value) { + var Ctor = value && value.constructor, + proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto; + + return value === proto; + } + + module.exports = isPrototype; + + +/***/ }, +/* 21 */ +/***/ function(module, exports, __webpack_require__) { + + var drop = __webpack_require__(22); + + /** + * Gets all but the first element of `array`. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to query. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.tail([1, 2, 3]); + * // => [2, 3] + */ + function tail(array) { + return drop(array, 1); + } + + module.exports = tail; + + +/***/ }, +/* 22 */ +/***/ function(module, exports, __webpack_require__) { + + var baseSlice = __webpack_require__(23), + toInteger = __webpack_require__(24); + + /** + * Creates a slice of `array` with `n` elements dropped from the beginning. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to query. + * @param {number} [n=1] The number of elements to drop. + * @param- {Object} [guard] Enables use as an iteratee for functions like `_.map`. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.drop([1, 2, 3]); + * // => [2, 3] + * + * _.drop([1, 2, 3], 2); + * // => [3] + * + * _.drop([1, 2, 3], 5); + * // => [] + * + * _.drop([1, 2, 3], 0); + * // => [1, 2, 3] + */ + function drop(array, n, guard) { + var length = array ? array.length : 0; + if (!length) { + return []; + } + n = (guard || n === undefined) ? 1 : toInteger(n); + return baseSlice(array, n < 0 ? 0 : n, length); + } + + module.exports = drop; + + +/***/ }, +/* 23 */ +/***/ function(module, exports) { + + /** + * The base implementation of `_.slice` without an iteratee call guard. + * + * @private + * @param {Array} array The array to slice. + * @param {number} [start=0] The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns the slice of `array`. + */ + function baseSlice(array, start, end) { + var index = -1, + length = array.length; + + if (start < 0) { + start = -start > length ? 0 : (length + start); + } + end = end > length ? length : end; + if (end < 0) { + end += length; + } + length = start > end ? 0 : ((end - start) >>> 0); + start >>>= 0; + + var result = Array(length); + while (++index < length) { + result[index] = array[index + start]; + } + return result; + } + + module.exports = baseSlice; + + +/***/ }, +/* 24 */ +/***/ function(module, exports, __webpack_require__) { + + var toNumber = __webpack_require__(25); + + /** Used as references for various `Number` constants. */ + var INFINITY = 1 / 0, + MAX_INTEGER = 1.7976931348623157e+308; + + /** + * Converts `value` to an integer. + * + * **Note:** This function is loosely based on [`ToInteger`](http://www.ecma-international.org/ecma-262/6.0/#sec-tointeger). + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to convert. + * @returns {number} Returns the converted integer. + * @example + * + * _.toInteger(3); + * // => 3 + * + * _.toInteger(Number.MIN_VALUE); + * // => 0 + * + * _.toInteger(Infinity); + * // => 1.7976931348623157e+308 + * + * _.toInteger('3'); + * // => 3 + */ + function toInteger(value) { + if (!value) { + return value === 0 ? value : 0; + } + value = toNumber(value); + if (value === INFINITY || value === -INFINITY) { + var sign = (value < 0 ? -1 : 1); + return sign * MAX_INTEGER; + } + var remainder = value % 1; + return value === value ? (remainder ? value - remainder : value) : 0; + } + + module.exports = toInteger; + + +/***/ }, +/* 25 */ +/***/ function(module, exports, __webpack_require__) { + + var isFunction = __webpack_require__(13), + isObject = __webpack_require__(14); + + /** Used as references for various `Number` constants. */ + var NAN = 0 / 0; + + /** Used to match leading and trailing whitespace. */ + var reTrim = /^\s+|\s+$/g; + + /** Used to detect bad signed hexadecimal string values. */ + var reIsBadHex = /^[-+]0x[0-9a-f]+$/i; + + /** Used to detect binary string values. */ + var reIsBinary = /^0b[01]+$/i; + + /** Used to detect octal string values. */ + var reIsOctal = /^0o[0-7]+$/i; + + /** Built-in method references without a dependency on `root`. */ + var freeParseInt = parseInt; + + /** + * Converts `value` to a number. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to process. + * @returns {number} Returns the number. + * @example + * + * _.toNumber(3); + * // => 3 + * + * _.toNumber(Number.MIN_VALUE); + * // => 5e-324 + * + * _.toNumber(Infinity); + * // => Infinity + * + * _.toNumber('3'); + * // => 3 + */ + function toNumber(value) { + if (isObject(value)) { + var other = isFunction(value.valueOf) ? value.valueOf() : value; + value = isObject(other) ? (other + '') : other; + } + if (typeof value != 'string') { + return value === 0 ? value : +value; + } + value = value.replace(reTrim, ''); + var isBinary = reIsBinary.test(value); + return (isBinary || reIsOctal.test(value)) + ? freeParseInt(value.slice(2), isBinary ? 2 : 8) + : (reIsBadHex.test(value) ? NAN : +value); + } + + module.exports = toNumber; + + +/***/ }, +/* 26 */ +/***/ function(module, exports, __webpack_require__) { + + var arrayMap = __webpack_require__(27), + baseIteratee = __webpack_require__(28), + baseMap = __webpack_require__(96), + isArray = __webpack_require__(17); + + /** + * Creates an array of values by running each element in `collection` through + * `iteratee`. The iteratee is invoked with three arguments: + * (value, index|key, collection). + * + * Many lodash methods are guarded to work as iteratees for methods like + * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`. + * + * The guarded methods are: + * `ary`, `curry`, `curryRight`, `drop`, `dropRight`, `every`, `fill`, + * `invert`, `parseInt`, `random`, `range`, `rangeRight`, `slice`, `some`, + * `sortBy`, `take`, `takeRight`, `template`, `trim`, `trimEnd`, `trimStart`, + * and `words` + * + * @static + * @memberOf _ + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function|Object|string} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new mapped array. + * @example + * + * function square(n) { + * return n * n; + * } + * + * _.map([4, 8], square); + * // => [16, 64] + * + * _.map({ 'a': 4, 'b': 8 }, square); + * // => [16, 64] (iteration order is not guaranteed) + * + * var users = [ + * { 'user': 'barney' }, + * { 'user': 'fred' } + * ]; + * + * // The `_.property` iteratee shorthand. + * _.map(users, 'user'); + * // => ['barney', 'fred'] + */ + function map(collection, iteratee) { + var func = isArray(collection) ? arrayMap : baseMap; + return func(collection, baseIteratee(iteratee, 3)); + } + + module.exports = map; + + +/***/ }, +/* 27 */ +/***/ function(module, exports) { + + /** + * A specialized version of `_.map` for arrays without support for iteratee + * shorthands. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the new mapped array. + */ + function arrayMap(array, iteratee) { + var index = -1, + length = array.length, + result = Array(length); + + while (++index < length) { + result[index] = iteratee(array[index], index, array); + } + return result; + } + + module.exports = arrayMap; + + +/***/ }, +/* 28 */ +/***/ function(module, exports, __webpack_require__) { + + var baseMatches = __webpack_require__(29), + baseMatchesProperty = __webpack_require__(80), + identity = __webpack_require__(93), + isArray = __webpack_require__(17), + property = __webpack_require__(94); + + /** + * The base implementation of `_.iteratee`. + * + * @private + * @param {*} [value=_.identity] The value to convert to an iteratee. + * @returns {Function} Returns the iteratee. + */ + function baseIteratee(value) { + var type = typeof value; + if (type == 'function') { + return value; + } + if (value == null) { + return identity; + } + if (type == 'object') { + return isArray(value) + ? baseMatchesProperty(value[0], value[1]) + : baseMatches(value); + } + return property(value); + } + + module.exports = baseIteratee; + + +/***/ }, +/* 29 */ +/***/ function(module, exports, __webpack_require__) { + + var baseIsMatch = __webpack_require__(30), + getMatchData = __webpack_require__(76); + + /** + * The base implementation of `_.matches` which doesn't clone `source`. + * + * @private + * @param {Object} source The object of property values to match. + * @returns {Function} Returns the new function. + */ + function baseMatches(source) { + var matchData = getMatchData(source); + if (matchData.length == 1 && matchData[0][2]) { + var key = matchData[0][0], + value = matchData[0][1]; + + return function(object) { + if (object == null) { + return false; + } + return object[key] === value && + (value !== undefined || (key in Object(object))); + }; + } + return function(object) { + return object === source || baseIsMatch(object, source, matchData); + }; + } + + module.exports = baseMatches; + + +/***/ }, +/* 30 */ +/***/ function(module, exports, __webpack_require__) { + + var Stack = __webpack_require__(31), + baseIsEqual = __webpack_require__(63); + + /** Used to compose bitmasks for comparison styles. */ + var UNORDERED_COMPARE_FLAG = 1, + PARTIAL_COMPARE_FLAG = 2; + + /** + * The base implementation of `_.isMatch` without support for iteratee shorthands. + * + * @private + * @param {Object} object The object to inspect. + * @param {Object} source The object of property values to match. + * @param {Array} matchData The property names, values, and compare flags to match. + * @param {Function} [customizer] The function to customize comparisons. + * @returns {boolean} Returns `true` if `object` is a match, else `false`. + */ + function baseIsMatch(object, source, matchData, customizer) { + var index = matchData.length, + length = index, + noCustomizer = !customizer; + + if (object == null) { + return !length; + } + object = Object(object); + while (index--) { + var data = matchData[index]; + if ((noCustomizer && data[2]) + ? data[1] !== object[data[0]] + : !(data[0] in object) + ) { + return false; + } + } + while (++index < length) { + data = matchData[index]; + var key = data[0], + objValue = object[key], + srcValue = data[1]; + + if (noCustomizer && data[2]) { + if (objValue === undefined && !(key in object)) { + return false; + } + } else { + var stack = new Stack, + result = customizer ? customizer(objValue, srcValue, key, object, source, stack) : undefined; + + if (!(result === undefined + ? baseIsEqual(srcValue, objValue, customizer, UNORDERED_COMPARE_FLAG | PARTIAL_COMPARE_FLAG, stack) + : result + )) { + return false; + } + } + } + return true; + } + + module.exports = baseIsMatch; + + +/***/ }, +/* 31 */ +/***/ function(module, exports, __webpack_require__) { + + var stackClear = __webpack_require__(32), + stackDelete = __webpack_require__(33), + stackGet = __webpack_require__(37), + stackHas = __webpack_require__(39), + stackSet = __webpack_require__(41); + + /** + * Creates a stack cache object to store key-value pairs. + * + * @private + * @param {Array} [values] The values to cache. + */ + function Stack(values) { + var index = -1, + length = values ? values.length : 0; + + this.clear(); + while (++index < length) { + var entry = values[index]; + this.set(entry[0], entry[1]); + } + } + + // Add functions to the `Stack` cache. + Stack.prototype.clear = stackClear; + Stack.prototype['delete'] = stackDelete; + Stack.prototype.get = stackGet; + Stack.prototype.has = stackHas; + Stack.prototype.set = stackSet; + + module.exports = Stack; + + +/***/ }, +/* 32 */ +/***/ function(module, exports) { + + /** + * Removes all key-value entries from the stack. + * + * @private + * @name clear + * @memberOf Stack + */ + function stackClear() { + this.__data__ = { 'array': [], 'map': null }; + } + + module.exports = stackClear; + + +/***/ }, +/* 33 */ +/***/ function(module, exports, __webpack_require__) { + + var assocDelete = __webpack_require__(34); + + /** + * Removes `key` and its value from the stack. + * + * @private + * @name delete + * @memberOf Stack + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ + function stackDelete(key) { + var data = this.__data__, + array = data.array; + + return array ? assocDelete(array, key) : data.map['delete'](key); + } + + module.exports = stackDelete; + + +/***/ }, +/* 34 */ +/***/ function(module, exports, __webpack_require__) { + + var assocIndexOf = __webpack_require__(35); + + /** Used for built-in method references. */ + var arrayProto = Array.prototype; + + /** Built-in value references. */ + var splice = arrayProto.splice; + + /** + * Removes `key` and its value from the associative array. + * + * @private + * @param {Array} array The array to query. + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ + function assocDelete(array, key) { + var index = assocIndexOf(array, key); + if (index < 0) { + return false; + } + var lastIndex = array.length - 1; + if (index == lastIndex) { + array.pop(); + } else { + splice.call(array, index, 1); + } + return true; + } + + module.exports = assocDelete; + + +/***/ }, +/* 35 */ +/***/ function(module, exports, __webpack_require__) { + + var eq = __webpack_require__(36); + + /** + * Gets the index at which the first occurrence of `key` is found in `array` + * of key-value pairs. + * + * @private + * @param {Array} array The array to search. + * @param {*} key The key to search for. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + function assocIndexOf(array, key) { + var length = array.length; + while (length--) { + if (eq(array[length][0], key)) { + return length; + } + } + return -1; + } + + module.exports = assocIndexOf; + + +/***/ }, +/* 36 */ +/***/ function(module, exports) { + + /** + * Performs a [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) + * comparison between two values to determine if they are equivalent. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * var object = { 'user': 'fred' }; + * var other = { 'user': 'fred' }; + * + * _.eq(object, object); + * // => true + * + * _.eq(object, other); + * // => false + * + * _.eq('a', 'a'); + * // => true + * + * _.eq('a', Object('a')); + * // => false + * + * _.eq(NaN, NaN); + * // => true + */ + function eq(value, other) { + return value === other || (value !== value && other !== other); + } + + module.exports = eq; + + +/***/ }, +/* 37 */ +/***/ function(module, exports, __webpack_require__) { + + var assocGet = __webpack_require__(38); + + /** + * Gets the stack value for `key`. + * + * @private + * @name get + * @memberOf Stack + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ + function stackGet(key) { + var data = this.__data__, + array = data.array; + + return array ? assocGet(array, key) : data.map.get(key); + } + + module.exports = stackGet; + + +/***/ }, +/* 38 */ +/***/ function(module, exports, __webpack_require__) { + + var assocIndexOf = __webpack_require__(35); + + /** + * Gets the associative array value for `key`. + * + * @private + * @param {Array} array The array to query. + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ + function assocGet(array, key) { + var index = assocIndexOf(array, key); + return index < 0 ? undefined : array[index][1]; + } + + module.exports = assocGet; + + +/***/ }, +/* 39 */ +/***/ function(module, exports, __webpack_require__) { + + var assocHas = __webpack_require__(40); + + /** + * Checks if a stack value for `key` exists. + * + * @private + * @name has + * @memberOf Stack + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + function stackHas(key) { + var data = this.__data__, + array = data.array; + + return array ? assocHas(array, key) : data.map.has(key); + } + + module.exports = stackHas; + + +/***/ }, +/* 40 */ +/***/ function(module, exports, __webpack_require__) { + + var assocIndexOf = __webpack_require__(35); + + /** + * Checks if an associative array value for `key` exists. + * + * @private + * @param {Array} array The array to query. + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + function assocHas(array, key) { + return assocIndexOf(array, key) > -1; + } + + module.exports = assocHas; + + +/***/ }, +/* 41 */ +/***/ function(module, exports, __webpack_require__) { + + var MapCache = __webpack_require__(42), + assocSet = __webpack_require__(61); + + /** Used as the size to enable large array optimizations. */ + var LARGE_ARRAY_SIZE = 200; + + /** + * Sets the stack `key` to `value`. + * + * @private + * @name set + * @memberOf Stack + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the stack cache object. + */ + function stackSet(key, value) { + var data = this.__data__, + array = data.array; + + if (array) { + if (array.length < (LARGE_ARRAY_SIZE - 1)) { + assocSet(array, key, value); + } else { + data.array = null; + data.map = new MapCache(array); + } + } + var map = data.map; + if (map) { + map.set(key, value); + } + return this; + } + + module.exports = stackSet; + + +/***/ }, +/* 42 */ +/***/ function(module, exports, __webpack_require__) { + + var mapClear = __webpack_require__(43), + mapDelete = __webpack_require__(53), + mapGet = __webpack_require__(57), + mapHas = __webpack_require__(59), + mapSet = __webpack_require__(60); + + /** + * Creates a map cache object to store key-value pairs. + * + * @private + * @param {Array} [values] The values to cache. + */ + function MapCache(values) { + var index = -1, + length = values ? values.length : 0; + + this.clear(); + while (++index < length) { + var entry = values[index]; + this.set(entry[0], entry[1]); + } + } + + // Add functions to the `MapCache`. + MapCache.prototype.clear = mapClear; + MapCache.prototype['delete'] = mapDelete; + MapCache.prototype.get = mapGet; + MapCache.prototype.has = mapHas; + MapCache.prototype.set = mapSet; + + module.exports = MapCache; + + +/***/ }, +/* 43 */ +/***/ function(module, exports, __webpack_require__) { + + var Hash = __webpack_require__(44), + Map = __webpack_require__(49); + + /** + * Removes all key-value entries from the map. + * + * @private + * @name clear + * @memberOf MapCache + */ + function mapClear() { + this.__data__ = { 'hash': new Hash, 'map': Map ? new Map : [], 'string': new Hash }; + } + + module.exports = mapClear; + + +/***/ }, +/* 44 */ +/***/ function(module, exports, __webpack_require__) { + + var nativeCreate = __webpack_require__(45); + + /** Used for built-in method references. */ + var objectProto = Object.prototype; + + /** + * Creates an hash object. + * + * @private + * @returns {Object} Returns the new hash object. + */ + function Hash() {} + + // Avoid inheriting from `Object.prototype` when possible. + Hash.prototype = nativeCreate ? nativeCreate(null) : objectProto; + + module.exports = Hash; + + +/***/ }, +/* 45 */ +/***/ function(module, exports, __webpack_require__) { + + var getNative = __webpack_require__(46); + + /* Built-in method references that are verified to be native. */ + var nativeCreate = getNative(Object, 'create'); + + module.exports = nativeCreate; + + +/***/ }, +/* 46 */ +/***/ function(module, exports, __webpack_require__) { + + var isNative = __webpack_require__(47); + + /** + * Gets the native function at `key` of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {string} key The key of the method to get. + * @returns {*} Returns the function if it's native, else `undefined`. + */ + function getNative(object, key) { + var value = object == null ? undefined : object[key]; + return isNative(value) ? value : undefined; + } + + module.exports = getNative; + + +/***/ }, +/* 47 */ +/***/ function(module, exports, __webpack_require__) { + + var isFunction = __webpack_require__(13), + isHostObject = __webpack_require__(48), + isObjectLike = __webpack_require__(16); + + /** Used to match `RegExp` [syntax characters](http://ecma-international.org/ecma-262/6.0/#sec-patterns). */ + var reRegExpChar = /[\\^$.*+?()[\]{}|]/g; + + /** Used to detect host constructors (Safari > 5). */ + var reIsHostCtor = /^\[object .+?Constructor\]$/; + + /** Used for built-in method references. */ + var objectProto = Object.prototype; + + /** Used to resolve the decompiled source of functions. */ + var funcToString = Function.prototype.toString; + + /** Used to check objects for own properties. */ + var hasOwnProperty = objectProto.hasOwnProperty; + + /** Used to detect if a method is native. */ + var reIsNative = RegExp('^' + + funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&') + .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' + ); + + /** + * Checks if `value` is a native function. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a native function, else `false`. + * @example + * + * _.isNative(Array.prototype.push); + * // => true + * + * _.isNative(_); + * // => false + */ + function isNative(value) { + if (value == null) { + return false; + } + if (isFunction(value)) { + return reIsNative.test(funcToString.call(value)); + } + return isObjectLike(value) && + (isHostObject(value) ? reIsNative : reIsHostCtor).test(value); + } + + module.exports = isNative; + + +/***/ }, +/* 48 */ +/***/ function(module, exports) { + + /** + * Checks if `value` is a host object in IE < 9. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a host object, else `false`. + */ + function isHostObject(value) { + // Many host objects are `Object` objects that can coerce to strings + // despite having improperly defined `toString` methods. + var result = false; + if (value != null && typeof value.toString != 'function') { + try { + result = !!(value + ''); + } catch (e) {} + } + return result; + } + + module.exports = isHostObject; + + +/***/ }, +/* 49 */ +/***/ function(module, exports, __webpack_require__) { + + var getNative = __webpack_require__(46), + root = __webpack_require__(50); + + /* Built-in method references that are verified to be native. */ + var Map = getNative(root, 'Map'); + + module.exports = Map; + + +/***/ }, +/* 50 */ +/***/ function(module, exports, __webpack_require__) { + + /* WEBPACK VAR INJECTION */(function(module, global) {var checkGlobal = __webpack_require__(52); + + /** Used to determine if values are of the language type `Object`. */ + var objectTypes = { + 'function': true, + 'object': true + }; + + /** Detect free variable `exports`. */ + var freeExports = (objectTypes[typeof exports] && exports && !exports.nodeType) ? exports : null; + + /** Detect free variable `module`. */ + var freeModule = (objectTypes[typeof module] && module && !module.nodeType) ? module : null; + + /** Detect free variable `global` from Node.js. */ + var freeGlobal = checkGlobal(freeExports && freeModule && typeof global == 'object' && global); + + /** Detect free variable `self`. */ + var freeSelf = checkGlobal(objectTypes[typeof self] && self); + + /** Detect free variable `window`. */ + var freeWindow = checkGlobal(objectTypes[typeof window] && window); + + /** Detect `this` as the global object. */ + var thisGlobal = checkGlobal(objectTypes[typeof this] && this); + + /** + * Used as a reference to the global object. + * + * The `this` value is used if it's the global object to avoid Greasemonkey's + * restricted `window` object, otherwise the `window` object is used. + */ + var root = freeGlobal || ((freeWindow !== (thisGlobal && thisGlobal.window)) && freeWindow) || freeSelf || thisGlobal || Function('return this')(); + + module.exports = root; + + /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(51)(module), (function() { return this; }()))) + +/***/ }, +/* 51 */ +/***/ function(module, exports) { + + module.exports = function(module) { + if(!module.webpackPolyfill) { + module.deprecate = function() {}; + module.paths = []; + // module.parent = undefined by default + module.children = []; + module.webpackPolyfill = 1; + } + return module; + } + + +/***/ }, +/* 52 */ +/***/ function(module, exports) { + + /** + * Checks if `value` is a global object. + * + * @private + * @param {*} value The value to check. + * @returns {null|Object} Returns `value` if it's a global object, else `null`. + */ + function checkGlobal(value) { + return (value && value.Object === Object) ? value : null; + } + + module.exports = checkGlobal; + + +/***/ }, +/* 53 */ +/***/ function(module, exports, __webpack_require__) { + + var Map = __webpack_require__(49), + assocDelete = __webpack_require__(34), + hashDelete = __webpack_require__(54), + isKeyable = __webpack_require__(56); + + /** + * Removes `key` and its value from the map. + * + * @private + * @name delete + * @memberOf MapCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ + function mapDelete(key) { + var data = this.__data__; + if (isKeyable(key)) { + return hashDelete(typeof key == 'string' ? data.string : data.hash, key); + } + return Map ? data.map['delete'](key) : assocDelete(data.map, key); + } + + module.exports = mapDelete; + + +/***/ }, +/* 54 */ +/***/ function(module, exports, __webpack_require__) { + + var hashHas = __webpack_require__(55); + + /** + * Removes `key` and its value from the hash. + * + * @private + * @param {Object} hash The hash to modify. + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ + function hashDelete(hash, key) { + return hashHas(hash, key) && delete hash[key]; + } + + module.exports = hashDelete; + + +/***/ }, +/* 55 */ +/***/ function(module, exports, __webpack_require__) { + + var nativeCreate = __webpack_require__(45); + + /** Used for built-in method references. */ + var objectProto = Object.prototype; + + /** Used to check objects for own properties. */ + var hasOwnProperty = objectProto.hasOwnProperty; + + /** + * Checks if a hash value for `key` exists. + * + * @private + * @param {Object} hash The hash to query. + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + function hashHas(hash, key) { + return nativeCreate ? hash[key] !== undefined : hasOwnProperty.call(hash, key); + } + + module.exports = hashHas; + + +/***/ }, +/* 56 */ +/***/ function(module, exports) { + + /** + * Checks if `value` is suitable for use as unique object key. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is suitable, else `false`. + */ + function isKeyable(value) { + var type = typeof value; + return type == 'number' || type == 'boolean' || + (type == 'string' && value !== '__proto__') || value == null; + } + + module.exports = isKeyable; + + +/***/ }, +/* 57 */ +/***/ function(module, exports, __webpack_require__) { + + var Map = __webpack_require__(49), + assocGet = __webpack_require__(38), + hashGet = __webpack_require__(58), + isKeyable = __webpack_require__(56); + + /** + * Gets the map value for `key`. + * + * @private + * @name get + * @memberOf MapCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ + function mapGet(key) { + var data = this.__data__; + if (isKeyable(key)) { + return hashGet(typeof key == 'string' ? data.string : data.hash, key); + } + return Map ? data.map.get(key) : assocGet(data.map, key); + } + + module.exports = mapGet; + + +/***/ }, +/* 58 */ +/***/ function(module, exports, __webpack_require__) { + + var nativeCreate = __webpack_require__(45); + + /** Used to stand-in for `undefined` hash values. */ + var HASH_UNDEFINED = '__lodash_hash_undefined__'; + + /** Used for built-in method references. */ + var objectProto = Object.prototype; + + /** Used to check objects for own properties. */ + var hasOwnProperty = objectProto.hasOwnProperty; + + /** + * Gets the hash value for `key`. + * + * @private + * @param {Object} hash The hash to query. + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ + function hashGet(hash, key) { + if (nativeCreate) { + var result = hash[key]; + return result === HASH_UNDEFINED ? undefined : result; + } + return hasOwnProperty.call(hash, key) ? hash[key] : undefined; + } + + module.exports = hashGet; + + +/***/ }, +/* 59 */ +/***/ function(module, exports, __webpack_require__) { + + var Map = __webpack_require__(49), + assocHas = __webpack_require__(40), + hashHas = __webpack_require__(55), + isKeyable = __webpack_require__(56); + + /** + * Checks if a map value for `key` exists. + * + * @private + * @name has + * @memberOf MapCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + function mapHas(key) { + var data = this.__data__; + if (isKeyable(key)) { + return hashHas(typeof key == 'string' ? data.string : data.hash, key); + } + return Map ? data.map.has(key) : assocHas(data.map, key); + } + + module.exports = mapHas; + + +/***/ }, +/* 60 */ +/***/ function(module, exports, __webpack_require__) { + + var Map = __webpack_require__(49), + assocSet = __webpack_require__(61), + hashSet = __webpack_require__(62), + isKeyable = __webpack_require__(56); + + /** + * Sets the map `key` to `value`. + * + * @private + * @name set + * @memberOf MapCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the map cache object. + */ + function mapSet(key, value) { + var data = this.__data__; + if (isKeyable(key)) { + hashSet(typeof key == 'string' ? data.string : data.hash, key, value); + } else if (Map) { + data.map.set(key, value); + } else { + assocSet(data.map, key, value); + } + return this; + } + + module.exports = mapSet; + + +/***/ }, +/* 61 */ +/***/ function(module, exports, __webpack_require__) { + + var assocIndexOf = __webpack_require__(35); + + /** + * Sets the associative array `key` to `value`. + * + * @private + * @param {Array} array The array to modify. + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + */ + function assocSet(array, key, value) { + var index = assocIndexOf(array, key); + if (index < 0) { + array.push([key, value]); + } else { + array[index][1] = value; + } + } + + module.exports = assocSet; + + +/***/ }, +/* 62 */ +/***/ function(module, exports, __webpack_require__) { + + var nativeCreate = __webpack_require__(45); + + /** Used to stand-in for `undefined` hash values. */ + var HASH_UNDEFINED = '__lodash_hash_undefined__'; + + /** + * Sets the hash `key` to `value`. + * + * @private + * @param {Object} hash The hash to modify. + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + */ + function hashSet(hash, key, value) { + hash[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value; + } + + module.exports = hashSet; + + +/***/ }, +/* 63 */ +/***/ function(module, exports, __webpack_require__) { + + var baseIsEqualDeep = __webpack_require__(64), + isObject = __webpack_require__(14), + isObjectLike = __webpack_require__(16); + + /** + * The base implementation of `_.isEqual` which supports partial comparisons + * and tracks traversed objects. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @param {Function} [customizer] The function to customize comparisons. + * @param {boolean} [bitmask] The bitmask of comparison flags. + * The bitmask may be composed of the following flags: + * 1 - Unordered comparison + * 2 - Partial comparison + * @param {Object} [stack] Tracks traversed `value` and `other` objects. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + */ + function baseIsEqual(value, other, customizer, bitmask, stack) { + if (value === other) { + return true; + } + if (value == null || other == null || (!isObject(value) && !isObjectLike(other))) { + return value !== value && other !== other; + } + return baseIsEqualDeep(value, other, baseIsEqual, customizer, bitmask, stack); + } + + module.exports = baseIsEqual; + + +/***/ }, +/* 64 */ +/***/ function(module, exports, __webpack_require__) { + + var Stack = __webpack_require__(31), + equalArrays = __webpack_require__(65), + equalByTag = __webpack_require__(67), + equalObjects = __webpack_require__(72), + getTag = __webpack_require__(73), + isArray = __webpack_require__(17), + isHostObject = __webpack_require__(48), + isTypedArray = __webpack_require__(75); + + /** Used to compose bitmasks for comparison styles. */ + var PARTIAL_COMPARE_FLAG = 2; + + /** `Object#toString` result references. */ + var argsTag = '[object Arguments]', + arrayTag = '[object Array]', + objectTag = '[object Object]'; + + /** Used for built-in method references. */ + var objectProto = Object.prototype; + + /** Used to check objects for own properties. */ + var hasOwnProperty = objectProto.hasOwnProperty; + + /** + * A specialized version of `baseIsEqual` for arrays and objects which performs + * deep comparisons and tracks traversed objects enabling objects with circular + * references to be compared. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Function} [customizer] The function to customize comparisons. + * @param {number} [bitmask] The bitmask of comparison flags. See `baseIsEqual` for more details. + * @param {Object} [stack] Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ + function baseIsEqualDeep(object, other, equalFunc, customizer, bitmask, stack) { + var objIsArr = isArray(object), + othIsArr = isArray(other), + objTag = arrayTag, + othTag = arrayTag; + + if (!objIsArr) { + objTag = getTag(object); + if (objTag == argsTag) { + objTag = objectTag; + } else if (objTag != objectTag) { + objIsArr = isTypedArray(object); + } + } + if (!othIsArr) { + othTag = getTag(other); + if (othTag == argsTag) { + othTag = objectTag; + } else if (othTag != objectTag) { + othIsArr = isTypedArray(other); + } + } + var objIsObj = objTag == objectTag && !isHostObject(object), + othIsObj = othTag == objectTag && !isHostObject(other), + isSameTag = objTag == othTag; + + if (isSameTag && !(objIsArr || objIsObj)) { + return equalByTag(object, other, objTag, equalFunc, customizer, bitmask); + } + var isPartial = bitmask & PARTIAL_COMPARE_FLAG; + if (!isPartial) { + var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'), + othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__'); + + if (objIsWrapped || othIsWrapped) { + return equalFunc(objIsWrapped ? object.value() : object, othIsWrapped ? other.value() : other, customizer, bitmask, stack); + } + } + if (!isSameTag) { + return false; + } + stack || (stack = new Stack); + return (objIsArr ? equalArrays : equalObjects)(object, other, equalFunc, customizer, bitmask, stack); + } + + module.exports = baseIsEqualDeep; + + +/***/ }, +/* 65 */ +/***/ function(module, exports, __webpack_require__) { + + var arraySome = __webpack_require__(66); + + /** Used to compose bitmasks for comparison styles. */ + var UNORDERED_COMPARE_FLAG = 1, + PARTIAL_COMPARE_FLAG = 2; + + /** + * A specialized version of `baseIsEqualDeep` for arrays with support for + * partial deep comparisons. + * + * @private + * @param {Array} array The array to compare. + * @param {Array} other The other array to compare. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Function} [customizer] The function to customize comparisons. + * @param {number} [bitmask] The bitmask of comparison flags. See `baseIsEqual` for more details. + * @param {Object} [stack] Tracks traversed `array` and `other` objects. + * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`. + */ + function equalArrays(array, other, equalFunc, customizer, bitmask, stack) { + var index = -1, + isPartial = bitmask & PARTIAL_COMPARE_FLAG, + isUnordered = bitmask & UNORDERED_COMPARE_FLAG, + arrLength = array.length, + othLength = other.length; + + if (arrLength != othLength && !(isPartial && othLength > arrLength)) { + return false; + } + // Assume cyclic values are equal. + var stacked = stack.get(array); + if (stacked) { + return stacked == other; + } + var result = true; + stack.set(array, other); + + // Ignore non-index properties. + while (++index < arrLength) { + var arrValue = array[index], + othValue = other[index]; + + if (customizer) { + var compared = isPartial + ? customizer(othValue, arrValue, index, other, array, stack) + : customizer(arrValue, othValue, index, array, other, stack); + } + if (compared !== undefined) { + if (compared) { + continue; + } + result = false; + break; + } + // Recursively compare arrays (susceptible to call stack limits). + if (isUnordered) { + if (!arraySome(other, function(othValue) { + return arrValue === othValue || equalFunc(arrValue, othValue, customizer, bitmask, stack); + })) { + result = false; + break; + } + } else if (!(arrValue === othValue || equalFunc(arrValue, othValue, customizer, bitmask, stack))) { + result = false; + break; + } + } + stack['delete'](array); + return result; + } + + module.exports = equalArrays; + + +/***/ }, +/* 66 */ +/***/ function(module, exports) { + + /** + * A specialized version of `_.some` for arrays without support for iteratee + * shorthands. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if any element passes the predicate check, else `false`. + */ + function arraySome(array, predicate) { + var index = -1, + length = array.length; + + while (++index < length) { + if (predicate(array[index], index, array)) { + return true; + } + } + return false; + } + + module.exports = arraySome; + + +/***/ }, +/* 67 */ +/***/ function(module, exports, __webpack_require__) { + + var Symbol = __webpack_require__(68), + Uint8Array = __webpack_require__(69), + mapToArray = __webpack_require__(70), + setToArray = __webpack_require__(71); + + /** Used to compose bitmasks for comparison styles. */ + var UNORDERED_COMPARE_FLAG = 1, + PARTIAL_COMPARE_FLAG = 2; + + /** `Object#toString` result references. */ + var boolTag = '[object Boolean]', + dateTag = '[object Date]', + errorTag = '[object Error]', + mapTag = '[object Map]', + numberTag = '[object Number]', + regexpTag = '[object RegExp]', + setTag = '[object Set]', + stringTag = '[object String]', + symbolTag = '[object Symbol]'; + + var arrayBufferTag = '[object ArrayBuffer]'; + + /** Used to convert symbols to primitives and strings. */ + var symbolProto = Symbol ? Symbol.prototype : undefined, + symbolValueOf = Symbol ? symbolProto.valueOf : undefined; + + /** + * A specialized version of `baseIsEqualDeep` for comparing objects of + * the same `toStringTag`. + * + * **Note:** This function only supports comparing values with tags of + * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {string} tag The `toStringTag` of the objects to compare. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Function} [customizer] The function to customize comparisons. + * @param {number} [bitmask] The bitmask of comparison flags. See `baseIsEqual` for more details. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ + function equalByTag(object, other, tag, equalFunc, customizer, bitmask) { + switch (tag) { + case arrayBufferTag: + if ((object.byteLength != other.byteLength) || + !equalFunc(new Uint8Array(object), new Uint8Array(other))) { + return false; + } + return true; + + case boolTag: + case dateTag: + // Coerce dates and booleans to numbers, dates to milliseconds and booleans + // to `1` or `0` treating invalid dates coerced to `NaN` as not equal. + return +object == +other; + + case errorTag: + return object.name == other.name && object.message == other.message; + + case numberTag: + // Treat `NaN` vs. `NaN` as equal. + return (object != +object) ? other != +other : object == +other; + + case regexpTag: + case stringTag: + // Coerce regexes to strings and treat strings primitives and string + // objects as equal. See https://es5.github.io/#x15.10.6.4 for more details. + return object == (other + ''); + + case mapTag: + var convert = mapToArray; + + case setTag: + var isPartial = bitmask & PARTIAL_COMPARE_FLAG; + convert || (convert = setToArray); + + // Recursively compare objects (susceptible to call stack limits). + return (isPartial || object.size == other.size) && + equalFunc(convert(object), convert(other), customizer, bitmask | UNORDERED_COMPARE_FLAG); + + case symbolTag: + return !!Symbol && (symbolValueOf.call(object) == symbolValueOf.call(other)); + } + return false; + } + + module.exports = equalByTag; + + +/***/ }, +/* 68 */ +/***/ function(module, exports, __webpack_require__) { + + var root = __webpack_require__(50); + + /** Built-in value references. */ + var Symbol = root.Symbol; + + module.exports = Symbol; + + +/***/ }, +/* 69 */ +/***/ function(module, exports, __webpack_require__) { + + var root = __webpack_require__(50); + + /** Built-in value references. */ + var Uint8Array = root.Uint8Array; + + module.exports = Uint8Array; + + +/***/ }, +/* 70 */ +/***/ function(module, exports) { + + /** + * Converts `map` to an array. + * + * @private + * @param {Object} map The map to convert. + * @returns {Array} Returns the converted array. + */ + function mapToArray(map) { + var index = -1, + result = Array(map.size); + + map.forEach(function(value, key) { + result[++index] = [key, value]; + }); + return result; + } + + module.exports = mapToArray; + + +/***/ }, +/* 71 */ +/***/ function(module, exports) { + + /** + * Converts `set` to an array. + * + * @private + * @param {Object} set The set to convert. + * @returns {Array} Returns the converted array. + */ + function setToArray(set) { + var index = -1, + result = Array(set.size); + + set.forEach(function(value) { + result[++index] = value; + }); + return result; + } + + module.exports = setToArray; + + +/***/ }, +/* 72 */ +/***/ function(module, exports, __webpack_require__) { + + var baseHas = __webpack_require__(4), + keys = __webpack_require__(3); + + /** Used to compose bitmasks for comparison styles. */ + var PARTIAL_COMPARE_FLAG = 2; + + /** + * A specialized version of `baseIsEqualDeep` for objects with support for + * partial deep comparisons. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Function} [customizer] The function to customize comparisons. + * @param {number} [bitmask] The bitmask of comparison flags. See `baseIsEqual` for more details. + * @param {Object} [stack] Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ + function equalObjects(object, other, equalFunc, customizer, bitmask, stack) { + var isPartial = bitmask & PARTIAL_COMPARE_FLAG, + objProps = keys(object), + objLength = objProps.length, + othProps = keys(other), + othLength = othProps.length; + + if (objLength != othLength && !isPartial) { + return false; + } + var index = objLength; + while (index--) { + var key = objProps[index]; + if (!(isPartial ? key in other : baseHas(other, key))) { + return false; + } + } + // Assume cyclic values are equal. + var stacked = stack.get(object); + if (stacked) { + return stacked == other; + } + var result = true; + stack.set(object, other); + + var skipCtor = isPartial; + while (++index < objLength) { + key = objProps[index]; + var objValue = object[key], + othValue = other[key]; + + if (customizer) { + var compared = isPartial + ? customizer(othValue, objValue, key, other, object, stack) + : customizer(objValue, othValue, key, object, other, stack); + } + // Recursively compare objects (susceptible to call stack limits). + if (!(compared === undefined + ? (objValue === othValue || equalFunc(objValue, othValue, customizer, bitmask, stack)) + : compared + )) { + result = false; + break; + } + skipCtor || (skipCtor = key == 'constructor'); + } + if (result && !skipCtor) { + var objCtor = object.constructor, + othCtor = other.constructor; + + // Non `Object` object instances with different constructors are not equal. + if (objCtor != othCtor && + ('constructor' in object && 'constructor' in other) && + !(typeof objCtor == 'function' && objCtor instanceof objCtor && + typeof othCtor == 'function' && othCtor instanceof othCtor)) { + result = false; + } + } + stack['delete'](object); + return result; + } + + module.exports = equalObjects; + + +/***/ }, +/* 73 */ +/***/ function(module, exports, __webpack_require__) { + + var Map = __webpack_require__(49), + Set = __webpack_require__(74); + + /** `Object#toString` result references. */ + var mapTag = '[object Map]', + objectTag = '[object Object]', + setTag = '[object Set]'; + + /** Used for built-in method references. */ + var objectProto = Object.prototype; + + /** Used to resolve the decompiled source of functions. */ + var funcToString = Function.prototype.toString; + + /** + * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) + * of values. + */ + var objectToString = objectProto.toString; + + /** Used to detect maps and sets. */ + var mapCtorString = Map ? funcToString.call(Map) : '', + setCtorString = Set ? funcToString.call(Set) : ''; + + /** + * Gets the `toStringTag` of `value`. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the `toStringTag`. + */ + function getTag(value) { + return objectToString.call(value); + } + + // Fallback for IE 11 providing `toStringTag` values for maps and sets. + if ((Map && getTag(new Map) != mapTag) || (Set && getTag(new Set) != setTag)) { + getTag = function(value) { + var result = objectToString.call(value), + Ctor = result == objectTag ? value.constructor : null, + ctorString = typeof Ctor == 'function' ? funcToString.call(Ctor) : ''; + + if (ctorString) { + if (ctorString == mapCtorString) { + return mapTag; + } + if (ctorString == setCtorString) { + return setTag; + } + } + return result; + }; + } + + module.exports = getTag; + + +/***/ }, +/* 74 */ +/***/ function(module, exports, __webpack_require__) { + + var getNative = __webpack_require__(46), + root = __webpack_require__(50); + + /* Built-in method references that are verified to be native. */ + var Set = getNative(root, 'Set'); + + module.exports = Set; + + +/***/ }, +/* 75 */ +/***/ function(module, exports, __webpack_require__) { + + var isLength = __webpack_require__(15), + isObjectLike = __webpack_require__(16); + + /** `Object#toString` result references. */ + var argsTag = '[object Arguments]', + arrayTag = '[object Array]', + boolTag = '[object Boolean]', + dateTag = '[object Date]', + errorTag = '[object Error]', + funcTag = '[object Function]', + mapTag = '[object Map]', + numberTag = '[object Number]', + objectTag = '[object Object]', + regexpTag = '[object RegExp]', + setTag = '[object Set]', + stringTag = '[object String]', + weakMapTag = '[object WeakMap]'; + + var arrayBufferTag = '[object ArrayBuffer]', + float32Tag = '[object Float32Array]', + float64Tag = '[object Float64Array]', + int8Tag = '[object Int8Array]', + int16Tag = '[object Int16Array]', + int32Tag = '[object Int32Array]', + uint8Tag = '[object Uint8Array]', + uint8ClampedTag = '[object Uint8ClampedArray]', + uint16Tag = '[object Uint16Array]', + uint32Tag = '[object Uint32Array]'; + + /** Used to identify `toStringTag` values of typed arrays. */ + var typedArrayTags = {}; + typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = + typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = + typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = + typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = + typedArrayTags[uint32Tag] = true; + typedArrayTags[argsTag] = typedArrayTags[arrayTag] = + typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = + typedArrayTags[dateTag] = typedArrayTags[errorTag] = + typedArrayTags[funcTag] = typedArrayTags[mapTag] = + typedArrayTags[numberTag] = typedArrayTags[objectTag] = + typedArrayTags[regexpTag] = typedArrayTags[setTag] = + typedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false; + + /** Used for built-in method references. */ + var objectProto = Object.prototype; + + /** + * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) + * of values. + */ + var objectToString = objectProto.toString; + + /** + * Checks if `value` is classified as a typed array. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. + * @example + * + * _.isTypedArray(new Uint8Array); + * // => true + * + * _.isTypedArray([]); + * // => false + */ + function isTypedArray(value) { + return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[objectToString.call(value)]; + } + + module.exports = isTypedArray; + + +/***/ }, +/* 76 */ +/***/ function(module, exports, __webpack_require__) { + + var isStrictComparable = __webpack_require__(77), + toPairs = __webpack_require__(78); + + /** + * Gets the property names, values, and compare flags of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the match data of `object`. + */ + function getMatchData(object) { + var result = toPairs(object), + length = result.length; + + while (length--) { + result[length][2] = isStrictComparable(result[length][1]); + } + return result; + } + + module.exports = getMatchData; + + +/***/ }, +/* 77 */ +/***/ function(module, exports, __webpack_require__) { + + var isObject = __webpack_require__(14); + + /** + * Checks if `value` is suitable for strict equality comparisons, i.e. `===`. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` if suitable for strict + * equality comparisons, else `false`. + */ + function isStrictComparable(value) { + return value === value && !isObject(value); + } + + module.exports = isStrictComparable; + + +/***/ }, +/* 78 */ +/***/ function(module, exports, __webpack_require__) { + + var baseToPairs = __webpack_require__(79), + keys = __webpack_require__(3); + + /** + * Creates an array of own enumerable key-value pairs for `object`. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the new array of key-value pairs. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.toPairs(new Foo); + * // => [['a', 1], ['b', 2]] (iteration order is not guaranteed) + */ + function toPairs(object) { + return baseToPairs(object, keys(object)); + } + + module.exports = toPairs; + + +/***/ }, +/* 79 */ +/***/ function(module, exports, __webpack_require__) { + + var arrayMap = __webpack_require__(27); + + /** + * The base implementation of `_.toPairs` and `_.toPairsIn` which creates an array + * of key-value pairs for `object` corresponding to the property names of `props`. + * + * @private + * @param {Object} object The object to query. + * @param {Array} props The property names to get values for. + * @returns {Object} Returns the new array of key-value pairs. + */ + function baseToPairs(object, props) { + return arrayMap(props, function(key) { + return [key, object[key]]; + }); + } + + module.exports = baseToPairs; + + +/***/ }, +/* 80 */ +/***/ function(module, exports, __webpack_require__) { + + var baseIsEqual = __webpack_require__(63), + get = __webpack_require__(81), + hasIn = __webpack_require__(88); + + /** Used to compose bitmasks for comparison styles. */ + var UNORDERED_COMPARE_FLAG = 1, + PARTIAL_COMPARE_FLAG = 2; + + /** + * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`. + * + * @private + * @param {string} path The path of the property to get. + * @param {*} srcValue The value to match. + * @returns {Function} Returns the new function. + */ + function baseMatchesProperty(path, srcValue) { + return function(object) { + var objValue = get(object, path); + return (objValue === undefined && objValue === srcValue) + ? hasIn(object, path) + : baseIsEqual(srcValue, objValue, undefined, UNORDERED_COMPARE_FLAG | PARTIAL_COMPARE_FLAG); + }; + } + + module.exports = baseMatchesProperty; + + +/***/ }, +/* 81 */ +/***/ function(module, exports, __webpack_require__) { + + var baseGet = __webpack_require__(82); + + /** + * Gets the value at `path` of `object`. If the resolved value is + * `undefined` the `defaultValue` is used in its place. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path of the property to get. + * @param {*} [defaultValue] The value returned if the resolved value is `undefined`. + * @returns {*} Returns the resolved value. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 3 } }] }; + * + * _.get(object, 'a[0].b.c'); + * // => 3 + * + * _.get(object, ['a', '0', 'b', 'c']); + * // => 3 + * + * _.get(object, 'a.b.c', 'default'); + * // => 'default' + */ + function get(object, path, defaultValue) { + var result = object == null ? undefined : baseGet(object, path); + return result === undefined ? defaultValue : result; + } + + module.exports = get; + + +/***/ }, +/* 82 */ +/***/ function(module, exports, __webpack_require__) { + + var baseToPath = __webpack_require__(83), + isKey = __webpack_require__(87); + + /** + * The base implementation of `_.get` without support for default values. + * + * @private + * @param {Object} object The object to query. + * @param {Array|string} path The path of the property to get. + * @returns {*} Returns the resolved value. + */ + function baseGet(object, path) { + path = isKey(path, object) ? [path + ''] : baseToPath(path); + + var index = 0, + length = path.length; + + while (object != null && index < length) { + object = object[path[index++]]; + } + return (index && index == length) ? object : undefined; + } + + module.exports = baseGet; + + +/***/ }, +/* 83 */ +/***/ function(module, exports, __webpack_require__) { + + var isArray = __webpack_require__(17), + stringToPath = __webpack_require__(84); + + /** + * The base implementation of `_.toPath` which only converts `value` to a + * path if it's not one. + * + * @private + * @param {*} value The value to process. + * @returns {Array} Returns the property path array. + */ + function baseToPath(value) { + return isArray(value) ? value : stringToPath(value); + } + + module.exports = baseToPath; + + +/***/ }, +/* 84 */ +/***/ function(module, exports, __webpack_require__) { + + var toString = __webpack_require__(85); + + /** Used to match property names within property paths. */ + var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]/g; + + /** Used to match backslashes in property paths. */ + var reEscapeChar = /\\(\\)?/g; + + /** + * Converts `string` to a property path array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the property path array. + */ + function stringToPath(string) { + var result = []; + toString(string).replace(rePropName, function(match, number, quote, string) { + result.push(quote ? string.replace(reEscapeChar, '$1') : (number || match)); + }); + return result; + } + + module.exports = stringToPath; + + +/***/ }, +/* 85 */ +/***/ function(module, exports, __webpack_require__) { + + var Symbol = __webpack_require__(68), + isSymbol = __webpack_require__(86); + + /** Used as references for various `Number` constants. */ + var INFINITY = 1 / 0; + + /** Used to convert symbols to primitives and strings. */ + var symbolProto = Symbol ? Symbol.prototype : undefined, + symbolToString = Symbol ? symbolProto.toString : undefined; + + /** + * Converts `value` to a string if it's not one. An empty string is returned + * for `null` and `undefined` values. The sign of `-0` is preserved. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to process. + * @returns {string} Returns the string. + * @example + * + * _.toString(null); + * // => '' + * + * _.toString(-0); + * // => '-0' + * + * _.toString([1, 2, 3]); + * // => '1,2,3' + */ + function toString(value) { + // Exit early for strings to avoid a performance hit in some environments. + if (typeof value == 'string') { + return value; + } + if (value == null) { + return ''; + } + if (isSymbol(value)) { + return Symbol ? symbolToString.call(value) : ''; + } + var result = (value + ''); + return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; + } + + module.exports = toString; + + +/***/ }, +/* 86 */ +/***/ function(module, exports, __webpack_require__) { + + var isObjectLike = __webpack_require__(16); + + /** `Object#toString` result references. */ + var symbolTag = '[object Symbol]'; + + /** Used for built-in method references. */ + var objectProto = Object.prototype; + + /** + * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) + * of values. + */ + var objectToString = objectProto.toString; + + /** + * Checks if `value` is classified as a `Symbol` primitive or object. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. + * @example + * + * _.isSymbol(Symbol.iterator); + * // => true + * + * _.isSymbol('abc'); + * // => false + */ + function isSymbol(value) { + return typeof value == 'symbol' || + (isObjectLike(value) && objectToString.call(value) == symbolTag); + } + + module.exports = isSymbol; + + +/***/ }, +/* 87 */ +/***/ function(module, exports, __webpack_require__) { + + var isArray = __webpack_require__(17); + + /** Used to match property names within property paths. */ + var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, + reIsPlainProp = /^\w*$/; + + /** + * Checks if `value` is a property name and not a property path. + * + * @private + * @param {*} value The value to check. + * @param {Object} [object] The object to query keys on. + * @returns {boolean} Returns `true` if `value` is a property name, else `false`. + */ + function isKey(value, object) { + if (typeof value == 'number') { + return true; + } + return !isArray(value) && + (reIsPlainProp.test(value) || !reIsDeepProp.test(value) || + (object != null && value in Object(object))); + } + + module.exports = isKey; + + +/***/ }, +/* 88 */ +/***/ function(module, exports, __webpack_require__) { + + var baseHasIn = __webpack_require__(89), + hasPath = __webpack_require__(90); + + /** + * Checks if `path` is a direct or inherited property of `object`. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path to check. + * @returns {boolean} Returns `true` if `path` exists, else `false`. + * @example + * + * var object = _.create({ 'a': _.create({ 'b': _.create({ 'c': 3 }) }) }); + * + * _.hasIn(object, 'a'); + * // => true + * + * _.hasIn(object, 'a.b.c'); + * // => true + * + * _.hasIn(object, ['a', 'b', 'c']); + * // => true + * + * _.hasIn(object, 'b'); + * // => false + */ + function hasIn(object, path) { + return hasPath(object, path, baseHasIn); + } + + module.exports = hasIn; + + +/***/ }, +/* 89 */ +/***/ function(module, exports) { + + /** + * The base implementation of `_.hasIn` without support for deep paths. + * + * @private + * @param {Object} object The object to query. + * @param {Array|string} key The key to check. + * @returns {boolean} Returns `true` if `key` exists, else `false`. + */ + function baseHasIn(object, key) { + return key in Object(object); + } + + module.exports = baseHasIn; + + +/***/ }, +/* 90 */ +/***/ function(module, exports, __webpack_require__) { + + var baseToPath = __webpack_require__(83), + isArguments = __webpack_require__(8), + isArray = __webpack_require__(17), + isIndex = __webpack_require__(19), + isKey = __webpack_require__(87), + isLength = __webpack_require__(15), + isString = __webpack_require__(18), + last = __webpack_require__(91), + parent = __webpack_require__(92); + + /** + * Checks if `path` exists on `object`. + * + * @private + * @param {Object} object The object to query. + * @param {Array|string} path The path to check. + * @param {Function} hasFunc The function to check properties. + * @returns {boolean} Returns `true` if `path` exists, else `false`. + */ + function hasPath(object, path, hasFunc) { + if (object == null) { + return false; + } + var result = hasFunc(object, path); + if (!result && !isKey(path)) { + path = baseToPath(path); + object = parent(object, path); + if (object != null) { + path = last(path); + result = hasFunc(object, path); + } + } + var length = object ? object.length : undefined; + return result || ( + !!length && isLength(length) && isIndex(path, length) && + (isArray(object) || isString(object) || isArguments(object)) + ); + } + + module.exports = hasPath; + + +/***/ }, +/* 91 */ +/***/ function(module, exports) { + + /** + * Gets the last element of `array`. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to query. + * @returns {*} Returns the last element of `array`. + * @example + * + * _.last([1, 2, 3]); + * // => 3 + */ + function last(array) { + var length = array ? array.length : 0; + return length ? array[length - 1] : undefined; + } + + module.exports = last; + + +/***/ }, +/* 92 */ +/***/ function(module, exports, __webpack_require__) { + + var baseSlice = __webpack_require__(23), + get = __webpack_require__(81); + + /** + * Gets the parent value at `path` of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {Array} path The path to get the parent value of. + * @returns {*} Returns the parent value. + */ + function parent(object, path) { + return path.length == 1 ? object : get(object, baseSlice(path, 0, -1)); + } + + module.exports = parent; + + +/***/ }, +/* 93 */ +/***/ function(module, exports) { + + /** + * This method returns the first argument provided to it. + * + * @static + * @memberOf _ + * @category Util + * @param {*} value Any value. + * @returns {*} Returns `value`. + * @example + * + * var object = { 'user': 'fred' }; + * + * _.identity(object) === object; + * // => true + */ + function identity(value) { + return value; + } + + module.exports = identity; + + +/***/ }, +/* 94 */ +/***/ function(module, exports, __webpack_require__) { + + var baseProperty = __webpack_require__(12), + basePropertyDeep = __webpack_require__(95), + isKey = __webpack_require__(87); + + /** + * Creates a function that returns the value at `path` of a given object. + * + * @static + * @memberOf _ + * @category Util + * @param {Array|string} path The path of the property to get. + * @returns {Function} Returns the new function. + * @example + * + * var objects = [ + * { 'a': { 'b': { 'c': 2 } } }, + * { 'a': { 'b': { 'c': 1 } } } + * ]; + * + * _.map(objects, _.property('a.b.c')); + * // => [2, 1] + * + * _.map(_.sortBy(objects, _.property(['a', 'b', 'c'])), 'a.b.c'); + * // => [1, 2] + */ + function property(path) { + return isKey(path) ? baseProperty(path) : basePropertyDeep(path); + } + + module.exports = property; + + +/***/ }, +/* 95 */ +/***/ function(module, exports, __webpack_require__) { + + var baseGet = __webpack_require__(82); + + /** + * A specialized version of `baseProperty` which supports deep paths. + * + * @private + * @param {Array|string} path The path of the property to get. + * @returns {Function} Returns the new function. + */ + function basePropertyDeep(path) { + return function(object) { + return baseGet(object, path); + }; + } + + module.exports = basePropertyDeep; + + +/***/ }, +/* 96 */ +/***/ function(module, exports, __webpack_require__) { + + var baseEach = __webpack_require__(97), + isArrayLike = __webpack_require__(10); + + /** + * The base implementation of `_.map` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the new mapped array. + */ + function baseMap(collection, iteratee) { + var index = -1, + result = isArrayLike(collection) ? Array(collection.length) : []; + + baseEach(collection, function(value, key, collection) { + result[++index] = iteratee(value, key, collection); + }); + return result; + } + + module.exports = baseMap; + + +/***/ }, +/* 97 */ +/***/ function(module, exports, __webpack_require__) { + + var baseForOwn = __webpack_require__(98), + createBaseEach = __webpack_require__(101); + + /** + * The base implementation of `_.forEach` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array|Object} Returns `collection`. + */ + var baseEach = createBaseEach(baseForOwn); + + module.exports = baseEach; + + +/***/ }, +/* 98 */ +/***/ function(module, exports, __webpack_require__) { + + var baseFor = __webpack_require__(99), + keys = __webpack_require__(3); + + /** + * The base implementation of `_.forOwn` without support for iteratee shorthands. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Object} Returns `object`. + */ + function baseForOwn(object, iteratee) { + return object && baseFor(object, iteratee, keys); + } + + module.exports = baseForOwn; + + +/***/ }, +/* 99 */ +/***/ function(module, exports, __webpack_require__) { + + var createBaseFor = __webpack_require__(100); + + /** + * The base implementation of `baseForIn` and `baseForOwn` which iterates + * over `object` properties returned by `keysFunc` invoking `iteratee` for + * each property. Iteratee functions may exit iteration early by explicitly + * returning `false`. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {Function} keysFunc The function to get the keys of `object`. + * @returns {Object} Returns `object`. + */ + var baseFor = createBaseFor(); + + module.exports = baseFor; + + +/***/ }, +/* 100 */ +/***/ function(module, exports) { + + /** + * Creates a base function for methods like `_.forIn`. + * + * @private + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new base function. + */ + function createBaseFor(fromRight) { + return function(object, iteratee, keysFunc) { + var index = -1, + iterable = Object(object), + props = keysFunc(object), + length = props.length; + + while (length--) { + var key = props[fromRight ? length : ++index]; + if (iteratee(iterable[key], key, iterable) === false) { + break; + } + } + return object; + }; + } + + module.exports = createBaseFor; + + +/***/ }, +/* 101 */ +/***/ function(module, exports, __webpack_require__) { + + var isArrayLike = __webpack_require__(10); + + /** + * Creates a `baseEach` or `baseEachRight` function. + * + * @private + * @param {Function} eachFunc The function to iterate over a collection. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new base function. + */ + function createBaseEach(eachFunc, fromRight) { + return function(collection, iteratee) { + if (collection == null) { + return collection; + } + if (!isArrayLike(collection)) { + return eachFunc(collection, iteratee); + } + var length = collection.length, + index = fromRight ? length : -1, + iterable = Object(collection); + + while ((fromRight ? index-- : ++index < length)) { + if (iteratee(iterable[index], index, iterable) === false) { + break; + } + } + return collection; + }; + } + + module.exports = createBaseEach; + + +/***/ }, +/* 102 */ +/***/ function(module, exports, __webpack_require__) { + + var arrayReduce = __webpack_require__(103), + baseEach = __webpack_require__(97), + baseIteratee = __webpack_require__(28), + baseReduce = __webpack_require__(104), + isArray = __webpack_require__(17); + + /** + * Reduces `collection` to a value which is the accumulated result of running + * each element in `collection` through `iteratee`, where each successive + * invocation is supplied the return value of the previous. If `accumulator` + * is not provided the first element of `collection` is used as the initial + * value. The iteratee is invoked with four arguments: + * (accumulator, value, index|key, collection). + * + * Many lodash methods are guarded to work as iteratees for methods like + * `_.reduce`, `_.reduceRight`, and `_.transform`. + * + * The guarded methods are: + * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`, + * and `sortBy` + * + * @static + * @memberOf _ + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @param {*} [accumulator] The initial value. + * @returns {*} Returns the accumulated value. + * @example + * + * _.reduce([1, 2], function(sum, n) { + * return sum + n; + * }, 0); + * // => 3 + * + * _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) { + * (result[value] || (result[value] = [])).push(key); + * return result; + * }, {}); + * // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed) + */ + function reduce(collection, iteratee, accumulator) { + var func = isArray(collection) ? arrayReduce : baseReduce, + initAccum = arguments.length < 3; + + return func(collection, baseIteratee(iteratee, 4), accumulator, initAccum, baseEach); + } + + module.exports = reduce; + + +/***/ }, +/* 103 */ +/***/ function(module, exports) { + + /** + * A specialized version of `_.reduce` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {*} [accumulator] The initial value. + * @param {boolean} [initAccum] Specify using the first element of `array` as the initial value. + * @returns {*} Returns the accumulated value. + */ + function arrayReduce(array, iteratee, accumulator, initAccum) { + var index = -1, + length = array.length; + + if (initAccum && length) { + accumulator = array[++index]; + } + while (++index < length) { + accumulator = iteratee(accumulator, array[index], index, array); + } + return accumulator; + } + + module.exports = arrayReduce; + + +/***/ }, +/* 104 */ +/***/ function(module, exports) { + + /** + * The base implementation of `_.reduce` and `_.reduceRight`, without support + * for iteratee shorthands, which iterates over `collection` using `eachFunc`. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {*} accumulator The initial value. + * @param {boolean} initAccum Specify using the first or last element of `collection` as the initial value. + * @param {Function} eachFunc The function to iterate over `collection`. + * @returns {*} Returns the accumulated value. + */ + function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) { + eachFunc(collection, function(value, index, collection) { + accumulator = initAccum + ? (initAccum = false, value) + : iteratee(accumulator, value, index, collection); + }); + return accumulator; + } + + module.exports = baseReduce; + + +/***/ }, +/* 105 */ +/***/ function(module, exports, __webpack_require__) { + + var arrayFilter = __webpack_require__(106), + baseFilter = __webpack_require__(107), + baseIteratee = __webpack_require__(28), + isArray = __webpack_require__(17); + + /** + * Iterates over elements of `collection`, returning an array of all elements + * `predicate` returns truthy for. The predicate is invoked with three arguments: + * (value, index|key, collection). + * + * @static + * @memberOf _ + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function|Object|string} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': true }, + * { 'user': 'fred', 'age': 40, 'active': false } + * ]; + * + * _.filter(users, function(o) { return !o.active; }); + * // => objects for ['fred'] + * + * // The `_.matches` iteratee shorthand. + * _.filter(users, { 'age': 36, 'active': true }); + * // => objects for ['barney'] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.filter(users, ['active', false]); + * // => objects for ['fred'] + * + * // The `_.property` iteratee shorthand. + * _.filter(users, 'active'); + * // => objects for ['barney'] + */ + function filter(collection, predicate) { + var func = isArray(collection) ? arrayFilter : baseFilter; + return func(collection, baseIteratee(predicate, 3)); + } + + module.exports = filter; + + +/***/ }, +/* 106 */ +/***/ function(module, exports) { + + /** + * A specialized version of `_.filter` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + */ + function arrayFilter(array, predicate) { + var index = -1, + length = array.length, + resIndex = -1, + result = []; + + while (++index < length) { + var value = array[index]; + if (predicate(value, index, array)) { + result[++resIndex] = value; + } + } + return result; + } + + module.exports = arrayFilter; + + +/***/ }, +/* 107 */ +/***/ function(module, exports, __webpack_require__) { + + var baseEach = __webpack_require__(97); + + /** + * The base implementation of `_.filter` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + */ + function baseFilter(collection, predicate) { + var result = []; + baseEach(collection, function(value, index, collection) { + if (predicate(value, index, collection)) { + result.push(value); + } + }); + return result; + } + + module.exports = baseFilter; + + +/***/ }, +/* 108 */ +/***/ function(module, exports, __webpack_require__) { + + var baseFlatten = __webpack_require__(109), + baseOrderBy = __webpack_require__(111), + isIterateeCall = __webpack_require__(115), + rest = __webpack_require__(116); + + /** + * Creates an array of elements, sorted in ascending order by the results of + * running each element in a collection through each iteratee. This method + * performs a stable sort, that is, it preserves the original sort order of + * equal elements. The iteratees are invoked with one argument: (value). + * + * @static + * @memberOf _ + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {...(Function|Function[]|Object|Object[]|string|string[])} [iteratees=[_.identity]] + * The iteratees to sort by, specified individually or in arrays. + * @returns {Array} Returns the new sorted array. + * @example + * + * var users = [ + * { 'user': 'fred', 'age': 48 }, + * { 'user': 'barney', 'age': 36 }, + * { 'user': 'fred', 'age': 42 }, + * { 'user': 'barney', 'age': 34 } + * ]; + * + * _.sortBy(users, function(o) { return o.user; }); + * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 42]] + * + * _.sortBy(users, ['user', 'age']); + * // => objects for [['barney', 34], ['barney', 36], ['fred', 42], ['fred', 48]] + * + * _.sortBy(users, 'user', function(o) { + * return Math.floor(o.age / 10); + * }); + * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 42]] + */ + var sortBy = rest(function(collection, iteratees) { + if (collection == null) { + return []; + } + var length = iteratees.length; + if (length > 1 && isIterateeCall(collection, iteratees[0], iteratees[1])) { + iteratees = []; + } else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) { + iteratees.length = 1; + } + return baseOrderBy(collection, baseFlatten(iteratees), []); + }); + + module.exports = sortBy; + + +/***/ }, +/* 109 */ +/***/ function(module, exports, __webpack_require__) { + + var arrayPush = __webpack_require__(110), + isArguments = __webpack_require__(8), + isArray = __webpack_require__(17), + isArrayLikeObject = __webpack_require__(9); + + /** + * The base implementation of `_.flatten` with support for restricting flattening. + * + * @private + * @param {Array} array The array to flatten. + * @param {boolean} [isDeep] Specify a deep flatten. + * @param {boolean} [isStrict] Restrict flattening to arrays-like objects. + * @param {Array} [result=[]] The initial result value. + * @returns {Array} Returns the new flattened array. + */ + function baseFlatten(array, isDeep, isStrict, result) { + result || (result = []); + + var index = -1, + length = array.length; + + while (++index < length) { + var value = array[index]; + if (isArrayLikeObject(value) && + (isStrict || isArray(value) || isArguments(value))) { + if (isDeep) { + // Recursively flatten arrays (susceptible to call stack limits). + baseFlatten(value, isDeep, isStrict, result); + } else { + arrayPush(result, value); + } + } else if (!isStrict) { + result[result.length] = value; + } + } + return result; + } + + module.exports = baseFlatten; + + +/***/ }, +/* 110 */ +/***/ function(module, exports) { + + /** + * Appends the elements of `values` to `array`. + * + * @private + * @param {Array} array The array to modify. + * @param {Array} values The values to append. + * @returns {Array} Returns `array`. + */ + function arrayPush(array, values) { + var index = -1, + length = values.length, + offset = array.length; + + while (++index < length) { + array[offset + index] = values[index]; + } + return array; + } + + module.exports = arrayPush; + + +/***/ }, +/* 111 */ +/***/ function(module, exports, __webpack_require__) { + + var arrayMap = __webpack_require__(27), + baseIteratee = __webpack_require__(28), + baseMap = __webpack_require__(96), + baseSortBy = __webpack_require__(112), + compareMultiple = __webpack_require__(113); + + /** + * The base implementation of `_.orderBy` without param guards. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by. + * @param {string[]} orders The sort orders of `iteratees`. + * @returns {Array} Returns the new sorted array. + */ + function baseOrderBy(collection, iteratees, orders) { + var index = -1, + toIteratee = baseIteratee; + + iteratees = arrayMap(iteratees.length ? iteratees : Array(1), function(iteratee) { + return toIteratee(iteratee); + }); + + var result = baseMap(collection, function(value, key, collection) { + var criteria = arrayMap(iteratees, function(iteratee) { + return iteratee(value); + }); + return { 'criteria': criteria, 'index': ++index, 'value': value }; + }); + + return baseSortBy(result, function(object, other) { + return compareMultiple(object, other, orders); + }); + } + + module.exports = baseOrderBy; + + +/***/ }, +/* 112 */ +/***/ function(module, exports) { + + /** + * The base implementation of `_.sortBy` which uses `comparer` to define + * the sort order of `array` and replaces criteria objects with their + * corresponding values. + * + * @private + * @param {Array} array The array to sort. + * @param {Function} comparer The function to define sort order. + * @returns {Array} Returns `array`. + */ + function baseSortBy(array, comparer) { + var length = array.length; + + array.sort(comparer); + while (length--) { + array[length] = array[length].value; + } + return array; + } + + module.exports = baseSortBy; + + +/***/ }, +/* 113 */ +/***/ function(module, exports, __webpack_require__) { + + var compareAscending = __webpack_require__(114); + + /** + * Used by `_.orderBy` to compare multiple properties of a value to another + * and stable sort them. + * + * If `orders` is unspecified, all values are sorted in ascending order. Otherwise, + * specify an order of "desc" for descending or "asc" for ascending sort order + * of corresponding values. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {boolean[]|string[]} orders The order to sort by for each property. + * @returns {number} Returns the sort order indicator for `object`. + */ + function compareMultiple(object, other, orders) { + var index = -1, + objCriteria = object.criteria, + othCriteria = other.criteria, + length = objCriteria.length, + ordersLength = orders.length; + + while (++index < length) { + var result = compareAscending(objCriteria[index], othCriteria[index]); + if (result) { + if (index >= ordersLength) { + return result; + } + var order = orders[index]; + return result * (order == 'desc' ? -1 : 1); + } + } + // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications + // that causes it, under certain circumstances, to provide the same value for + // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247 + // for more details. + // + // This also ensures a stable sort in V8 and other engines. + // See https://code.google.com/p/v8/issues/detail?id=90 for more details. + return object.index - other.index; + } + + module.exports = compareMultiple; + + +/***/ }, +/* 114 */ +/***/ function(module, exports) { + + /** + * Compares values to sort them in ascending order. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {number} Returns the sort order indicator for `value`. + */ + function compareAscending(value, other) { + if (value !== other) { + var valIsNull = value === null, + valIsUndef = value === undefined, + valIsReflexive = value === value; + + var othIsNull = other === null, + othIsUndef = other === undefined, + othIsReflexive = other === other; + + if ((value > other && !othIsNull) || !valIsReflexive || + (valIsNull && !othIsUndef && othIsReflexive) || + (valIsUndef && othIsReflexive)) { + return 1; + } + if ((value < other && !valIsNull) || !othIsReflexive || + (othIsNull && !valIsUndef && valIsReflexive) || + (othIsUndef && valIsReflexive)) { + return -1; + } + } + return 0; + } + + module.exports = compareAscending; + + +/***/ }, +/* 115 */ +/***/ function(module, exports, __webpack_require__) { + + var eq = __webpack_require__(36), + isArrayLike = __webpack_require__(10), + isIndex = __webpack_require__(19), + isObject = __webpack_require__(14); + + /** + * Checks if the provided arguments are from an iteratee call. + * + * @private + * @param {*} value The potential iteratee value argument. + * @param {*} index The potential iteratee index or key argument. + * @param {*} object The potential iteratee object argument. + * @returns {boolean} Returns `true` if the arguments are from an iteratee call, else `false`. + */ + function isIterateeCall(value, index, object) { + if (!isObject(object)) { + return false; + } + var type = typeof index; + if (type == 'number' + ? (isArrayLike(object) && isIndex(index, object.length)) + : (type == 'string' && index in object)) { + return eq(object[index], value); + } + return false; + } + + module.exports = isIterateeCall; + + +/***/ }, +/* 116 */ +/***/ function(module, exports, __webpack_require__) { + + var apply = __webpack_require__(117), + toInteger = __webpack_require__(24); + + /** Used as the `TypeError` message for "Functions" methods. */ + var FUNC_ERROR_TEXT = 'Expected a function'; + + /* Built-in method references for those with the same name as other `lodash` methods. */ + var nativeMax = Math.max; + + /** + * Creates a function that invokes `func` with the `this` binding of the + * created function and arguments from `start` and beyond provided as an array. + * + * **Note:** This method is based on the [rest parameter](https://mdn.io/rest_parameters). + * + * @static + * @memberOf _ + * @category Function + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @returns {Function} Returns the new function. + * @example + * + * var say = _.rest(function(what, names) { + * return what + ' ' + _.initial(names).join(', ') + + * (_.size(names) > 1 ? ', & ' : '') + _.last(names); + * }); + * + * say('hello', 'fred', 'barney', 'pebbles'); + * // => 'hello fred, barney, & pebbles' + */ + function rest(func, start) { + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + start = nativeMax(start === undefined ? (func.length - 1) : toInteger(start), 0); + return function() { + var args = arguments, + index = -1, + length = nativeMax(args.length - start, 0), + array = Array(length); + + while (++index < length) { + array[index] = args[start + index]; + } + switch (start) { + case 0: return func.call(this, array); + case 1: return func.call(this, args[0], array); + case 2: return func.call(this, args[0], args[1], array); + } + var otherArgs = Array(start + 1); + index = -1; + while (++index < start) { + otherArgs[index] = args[index]; + } + otherArgs[start] = array; + return apply(func, this, otherArgs); + }; + } + + module.exports = rest; + + +/***/ }, +/* 117 */ +/***/ function(module, exports) { + + /** + * A faster alternative to `Function#apply`, this function invokes `func` + * with the `this` binding of `thisArg` and the arguments of `args`. + * + * @private + * @param {Function} func The function to invoke. + * @param {*} thisArg The `this` binding of `func`. + * @param {...*} args The arguments to invoke `func` with. + * @returns {*} Returns the result of `func`. + */ + function apply(func, thisArg, args) { + var length = args.length; + switch (length) { + case 0: return func.call(thisArg); + case 1: return func.call(thisArg, args[0]); + case 2: return func.call(thisArg, args[0], args[1]); + case 3: return func.call(thisArg, args[0], args[1], args[2]); + } + return func.apply(thisArg, args); + } + + module.exports = apply; + + +/***/ }, +/* 118 */ +/***/ function(module, exports, __webpack_require__) { + + var baseEach = __webpack_require__(97), + baseFind = __webpack_require__(119), + baseFindIndex = __webpack_require__(120), + baseIteratee = __webpack_require__(28), + isArray = __webpack_require__(17); + + /** + * Iterates over elements of `collection`, returning the first element + * `predicate` returns truthy for. The predicate is invoked with three arguments: + * (value, index|key, collection). + * + * @static + * @memberOf _ + * @category Collection + * @param {Array|Object} collection The collection to search. + * @param {Function|Object|string} [predicate=_.identity] The function invoked per iteration. + * @returns {*} Returns the matched element, else `undefined`. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': true }, + * { 'user': 'fred', 'age': 40, 'active': false }, + * { 'user': 'pebbles', 'age': 1, 'active': true } + * ]; + * + * _.find(users, function(o) { return o.age < 40; }); + * // => object for 'barney' + * + * // The `_.matches` iteratee shorthand. + * _.find(users, { 'age': 1, 'active': true }); + * // => object for 'pebbles' + * + * // The `_.matchesProperty` iteratee shorthand. + * _.find(users, ['active', false]); + * // => object for 'fred' + * + * // The `_.property` iteratee shorthand. + * _.find(users, 'active'); + * // => object for 'barney' + */ + function find(collection, predicate) { + predicate = baseIteratee(predicate, 3); + if (isArray(collection)) { + var index = baseFindIndex(collection, predicate); + return index > -1 ? collection[index] : undefined; + } + return baseFind(collection, predicate, baseEach); + } + + module.exports = find; + + +/***/ }, +/* 119 */ +/***/ function(module, exports) { + + /** + * The base implementation of methods like `_.find` and `_.findKey`, without + * support for iteratee shorthands, which iterates over `collection` using + * `eachFunc`. + * + * @private + * @param {Array|Object} collection The collection to search. + * @param {Function} predicate The function invoked per iteration. + * @param {Function} eachFunc The function to iterate over `collection`. + * @param {boolean} [retKey] Specify returning the key of the found element instead of the element itself. + * @returns {*} Returns the found element or its key, else `undefined`. + */ + function baseFind(collection, predicate, eachFunc, retKey) { + var result; + eachFunc(collection, function(value, key, collection) { + if (predicate(value, key, collection)) { + result = retKey ? key : value; + return false; + } + }); + return result; + } + + module.exports = baseFind; + + +/***/ }, +/* 120 */ +/***/ function(module, exports) { + + /** + * The base implementation of `_.findIndex` and `_.findLastIndex` without + * support for iteratee shorthands. + * + * @private + * @param {Array} array The array to search. + * @param {Function} predicate The function invoked per iteration. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + function baseFindIndex(array, predicate, fromRight) { + var length = array.length, + index = fromRight ? length : -1; + + while ((fromRight ? index-- : ++index < length)) { + if (predicate(array[index], index, array)) { + return index; + } + } + return -1; + } + + module.exports = baseFindIndex; + + +/***/ }, +/* 121 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + var _map = __webpack_require__(26); + + var _map2 = _interopRequireDefault(_map); + + var _reduce = __webpack_require__(102); + + var _reduce2 = _interopRequireDefault(_reduce); + + var _repeat = __webpack_require__(122); + + var _repeat2 = _interopRequireDefault(_repeat); + + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.none = exports.notNone = undefined; + exports.bitsRequired = bitsRequired; + exports.paddedBinary = paddedBinary; + exports.isNone = isNone; + exports.concat = concat; + exports.toN = toN; + exports.fromN = fromN; + exports.fromVarN = fromVarN; + exports.toVarN = toVarN; + exports.paddedN = paddedN; + exports.bitsToN = bitsToN; + exports.nToBits = nToBits; + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + + function bitsRequired(maxValue) { + if (maxValue === 0) { + return 1; + } + return Math.floor(Math.log(maxValue) / Math.LN2) + 1; + } + + function paddedBinary(value, bitSize) { + var binary = value.toString(2); + if (binary.length > bitSize) { + throw new Error('Invalid value or bitSize: can\'t fit ' + value + ' in ' + bitSize + ' bits'); + } + + return (0, _repeat2.default)('0', bitSize - binary.length) + binary; + } + + var notNone = exports.notNone = paddedBinary(0, 1); + var none = exports.none = paddedBinary(1, 1); + + function isNone(bits) { + return bits && bits.length >= 1 && bits[0] === none[0]; + } + + function concat(encoded) { + return (0, _reduce2.default)(encoded, function (acc, obj) { + return { bits: acc.bits + (obj.bits || ''), blob: acc.blob + (obj.blob || '') }; + }, { bits: '', blob: '' }); + } + + var availableCharacters = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890_-'; + var base = availableCharacters.length; // 64 + + function toN(x) { + if (x < 0) { + throw new Error('Invalid number: can\'t encode negative number ' + x); + } + + var result = ''; + while (x >= base) { + result = availableCharacters[x % base] + result; + x = Math.floor(x / base); + } + + result = availableCharacters[x] + result; + return result; + } + + function fromN(n) { + var x = 0, + index; + for (var i = 0; i < n.length; i++) { + index = availableCharacters.indexOf(n[i]); + if (index === -1) { + throw new Error('Invalid number: can\'t decode ' + n); + } + x += index * Math.pow(base, n.length - i - 1); + } + return x; + } + + function fromVarN(string) { + var str = string; + var value = 0; + var hasMore = true; + while (hasMore) { + if (str.length === 0) { + throw new Error('Invalid number: can\'t decode ' + string); + } + var byte = str[0]; + str = str.substr(1); + var n = fromN(byte); + hasMore = n > 31; + value = value << 5 | n & 31; + } + return [value, str]; + } + + function toVarN(n) { + var result = ''; + var charsRequired = Math.ceil(bitsRequired(n) / 5); + var bits = paddedBinary(n, charsRequired * 5); + while (bits) { + var part = bits.substr(0, 5); + bits = bits.substr(5); + part = (bits.length === 0 ? '0' : '1') + part; + result += bitsToN(part); + } + return result; + } + + function paddedN(x, charSize) { + var r = toN(x); + if (r.length > charSize) { + throw new Error('Invalid charSize: can\'t encode ' + x + ' in ' + charSize + ' chars'); + } + + return (0, _repeat2.default)(availableCharacters[0], charSize - r.length) + r; + } + + function bitsToN(bits) { + var result = '', + char; + while (bits) { + char = bits.substr(0, 6); + bits = bits.substr(6); + + if (char.length < 6) { + char += (0, _repeat2.default)('0', 6 - char.length); + } + result += toN(parseInt(char, 2)); + } + + return result; + } + + function nToBits(chars, bitSize) { + return (0, _map2.default)(chars, function (c) { + return paddedBinary(fromN(c), 6); + }).join('').substr(0, bitSize); + } + +/***/ }, +/* 122 */ +/***/ function(module, exports, __webpack_require__) { + + var toInteger = __webpack_require__(24), + toString = __webpack_require__(85); + + /** Used as references for various `Number` constants. */ + var MAX_SAFE_INTEGER = 9007199254740991; + + /* Built-in method references for those with the same name as other `lodash` methods. */ + var nativeFloor = Math.floor; + + /** + * Repeats the given string `n` times. + * + * @static + * @memberOf _ + * @category String + * @param {string} [string=''] The string to repeat. + * @param {number} [n=0] The number of times to repeat the string. + * @returns {string} Returns the repeated string. + * @example + * + * _.repeat('*', 3); + * // => '***' + * + * _.repeat('abc', 2); + * // => 'abcabc' + * + * _.repeat('abc', 0); + * // => '' + */ + function repeat(string, n) { + string = toString(string); + n = toInteger(n); + + var result = ''; + if (!string || n < 1 || n > MAX_SAFE_INTEGER) { + return result; + } + // Leverage the exponentiation by squaring algorithm for a faster repeat. + // See https://en.wikipedia.org/wiki/Exponentiation_by_squaring for more details. + do { + if (n % 2) { + result += string; + } + n = nativeFloor(n / 2); + string += string; + } while (n); + + return result; + } + + module.exports = repeat; + + +/***/ }, +/* 123 */ +/***/ function(module, exports, __webpack_require__) { + + "use strict"; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.default = oneOf; + + var _core = __webpack_require__(121); + + var _coder = __webpack_require__(1); + + function oneOf() { + for (var _len = arguments.length, choices = Array(_len), _key = 0; _key < _len; _key++) { + choices[_key] = arguments[_key]; + } + + var bitSize = (0, _core.bitsRequired)(choices.length - 1); + return { + encode: function encode(choice) { + var index = choices.indexOf(choice); + if (index === -1) { + throw new Error("Invalid choice: " + choice + " is not one of " + choices.join(',')); + } + return { bits: (0, _core.paddedBinary)(index, bitSize), blob: '' }; + }, + + decode: function decode(_ref) { + var bits = _ref.bits; + var blob = _ref.blob; + + var index = parseInt(bits.substr(0, bitSize), 2); + return { + value: choices[index], + rest: { bits: bits.substring(bitSize), blob: blob } + }; + } + }; + } + + (0, _coder.register)('oneOf', oneOf); + +/***/ }, +/* 124 */ +/***/ function(module, exports, __webpack_require__) { + + "use strict"; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.default = boolean; + + var _oneOf = __webpack_require__(123); + + var _oneOf2 = _interopRequireDefault(_oneOf); + + var _coder = __webpack_require__(1); + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + + function boolean() { + return (0, _oneOf2.default)(true, false); + } + + (0, _coder.register)('boolean', boolean); + +/***/ }, +/* 125 */ +/***/ function(module, exports, __webpack_require__) { + + "use strict"; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.default = integer; + + var _core = __webpack_require__(121); + + var _coder = __webpack_require__(1); + + function integer() { + return { + encode: function encode(int) { + var binary = Math.abs(int).toString(2); + var bits = (0, _core.paddedBinary)(binary.length, 6) + (int > 0 ? '1' : '0') + binary; + return { bits: bits, blob: '' }; + }, + decode: function decode(_ref) { + var bits = _ref.bits; + var blob = _ref.blob; + + var size = parseInt(bits.substr(0, 6), 2); + bits = bits.substr(6); + var sign = bits[0] === '1' ? 1 : -1; + bits = bits.substr(1); + return { + value: sign * parseInt(bits.substr(0, size), 2), + rest: { bits: bits.substr(size), blob: blob } + }; + } + }; + } + + (0, _coder.register)('integer', integer); + +/***/ }, +/* 126 */ +/***/ function(module, exports, __webpack_require__) { + + "use strict"; + + var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }(); + + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.default = varchar; + + var _core = __webpack_require__(121); + + var _coder = __webpack_require__(1); + + function varchar() { + return { + encode: function encode(string) { + return { bits: '', blob: (0, _core.toVarN)(string.length) + string }; + }, + decode: function decode(_ref) { + var bits = _ref.bits; + var blob = _ref.blob; + + var size; + + var _fromVarN = (0, _core.fromVarN)(blob); + + var _fromVarN2 = _slicedToArray(_fromVarN, 2); + + size = _fromVarN2[0]; + blob = _fromVarN2[1]; + + return { + value: blob.substr(0, size), + rest: { bits: bits, blob: blob.substr(size) } + }; + } + }; + } + + (0, _coder.register)('varchar', varchar); + +/***/ }, +/* 127 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.default = fixedChar; + + var _coder = __webpack_require__(1); + + function fixedChar(size) { + return { + encode: function encode(string) { + return { bits: '', blob: string.toString() }; + }, + decode: function decode(_ref) { + var bits = _ref.bits; + var blob = _ref.blob; + + return { + value: blob.substr(0, size), + rest: { bits: bits, blob: blob.substr(size) } + }; + } + }; + } + + (0, _coder.register)('fixedchar', fixedChar); + +/***/ }, +/* 128 */ +/***/ function(module, exports, __webpack_require__) { + + "use strict"; + + var _each = __webpack_require__(129); + + var _each2 = _interopRequireDefault(_each); + + var _has = __webpack_require__(133); + + var _has2 = _interopRequireDefault(_has); + + var _map = __webpack_require__(26); + + var _map2 = _interopRequireDefault(_map); + + var _flatten = __webpack_require__(134); + + var _flatten2 = _interopRequireDefault(_flatten); + + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.object = object; + + var _core = __webpack_require__(121); + + var _coder = __webpack_require__(1); + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + + function object(entries) { + return { + encode: function encode(object) { + return (0, _core.concat)((0, _flatten2.default)((0, _map2.default)(entries, function (entry, key) { + if ((0, _has2.default)(object, key)) { + return [{ bits: _core.notNone }, entry.encode(object[key])]; + } + return { bits: _core.none }; + }))); + }, + decode: function decode(_ref) { + var bits = _ref.bits; + var blob = _ref.blob; + + var object = {}; + (0, _each2.default)(entries, function (entry, key) { + if ((0, _core.isNone)(bits)) { + bits = bits.substr(1); + return; + } else { + bits = bits.substr(1); + } + + var result = entry.decode({ bits: bits, blob: blob }); + bits = result.rest.bits; + blob = result.rest.blob; + object[key] = result.value; + }); + return { value: object, rest: { bits: bits, blob: blob } }; + } + }; + } + + (0, _coder.register)('object', object); + +/***/ }, +/* 129 */ +/***/ function(module, exports, __webpack_require__) { + + module.exports = __webpack_require__(130); + + +/***/ }, +/* 130 */ +/***/ function(module, exports, __webpack_require__) { + + var arrayEach = __webpack_require__(131), + baseEach = __webpack_require__(97), + isArray = __webpack_require__(17), + toFunction = __webpack_require__(132); + + /** + * Iterates over elements of `collection` invoking `iteratee` for each element. + * The iteratee is invoked with three arguments: (value, index|key, collection). + * Iteratee functions may exit iteration early by explicitly returning `false`. + * + * **Note:** As with other "Collections" methods, objects with a "length" property + * are iterated like arrays. To avoid this behavior use `_.forIn` or `_.forOwn` + * for object iteration. + * + * @static + * @memberOf _ + * @alias each + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array|Object} Returns `collection`. + * @example + * + * _([1, 2]).forEach(function(value) { + * console.log(value); + * }); + * // => logs `1` then `2` + * + * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) { + * console.log(key); + * }); + * // => logs 'a' then 'b' (iteration order is not guaranteed) + */ + function forEach(collection, iteratee) { + return (typeof iteratee == 'function' && isArray(collection)) + ? arrayEach(collection, iteratee) + : baseEach(collection, toFunction(iteratee)); + } + + module.exports = forEach; + + +/***/ }, +/* 131 */ +/***/ function(module, exports) { + + /** + * A specialized version of `_.forEach` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns `array`. + */ + function arrayEach(array, iteratee) { + var index = -1, + length = array.length; + + while (++index < length) { + if (iteratee(array[index], index, array) === false) { + break; + } + } + return array; + } + + module.exports = arrayEach; + + +/***/ }, +/* 132 */ +/***/ function(module, exports, __webpack_require__) { + + var identity = __webpack_require__(93); + + /** + * Converts `value` to a function if it's not one. + * + * @private + * @param {*} value The value to process. + * @returns {Function} Returns the function. + */ + function toFunction(value) { + return typeof value == 'function' ? value : identity; + } + + module.exports = toFunction; + + +/***/ }, +/* 133 */ +/***/ function(module, exports, __webpack_require__) { + + var baseHas = __webpack_require__(4), + hasPath = __webpack_require__(90); + + /** + * Checks if `path` is a direct property of `object`. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path to check. + * @returns {boolean} Returns `true` if `path` exists, else `false`. + * @example + * + * var object = { 'a': { 'b': { 'c': 3 } } }; + * var other = _.create({ 'a': _.create({ 'b': _.create({ 'c': 3 }) }) }); + * + * _.has(object, 'a'); + * // => true + * + * _.has(object, 'a.b.c'); + * // => true + * + * _.has(object, ['a', 'b', 'c']); + * // => true + * + * _.has(other, 'a'); + * // => false + */ + function has(object, path) { + return hasPath(object, path, baseHas); + } + + module.exports = has; + + +/***/ }, +/* 134 */ +/***/ function(module, exports, __webpack_require__) { + + var baseFlatten = __webpack_require__(109); + + /** + * Flattens `array` a single level. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to flatten. + * @returns {Array} Returns the new flattened array. + * @example + * + * _.flatten([1, [2, 3, [4]]]); + * // => [1, 2, 3, [4]] + */ + function flatten(array) { + var length = array ? array.length : 0; + return length ? baseFlatten(array) : []; + } + + module.exports = flatten; + + +/***/ }, +/* 135 */ +/***/ function(module, exports, __webpack_require__) { + + "use strict"; + + var _each = __webpack_require__(129); + + var _each2 = _interopRequireDefault(_each); + + var _map = __webpack_require__(26); + + var _map2 = _interopRequireDefault(_map); + + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.tuple = tuple; + + var _core = __webpack_require__(121); + + var _coder = __webpack_require__(1); + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + + function tuple(entries) { + return { + encode: function encode(array) { + return (0, _core.concat)((0, _map2.default)(entries, function (entry, i) { + return entry.encode(array[i]); + })); + }, + decode: function decode(rest) { + var array = []; + (0, _each2.default)(entries, function (entry, i) { + var result = entry.decode(rest); + array[i] = result.value; + rest = result.rest; + }); + return { value: array, rest: rest }; + } + }; + } + + (0, _coder.register)('tuple', tuple); + +/***/ }, +/* 136 */ +/***/ function(module, exports, __webpack_require__) { + + "use strict"; + + var _map = __webpack_require__(26); + + var _map2 = _interopRequireDefault(_map); + + var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }(); + + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.array = array; + + var _core = __webpack_require__(121); + + var _coder = __webpack_require__(1); + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + + function array(entry) { + return { + encode: function encode(array) { + return (0, _core.concat)([{ blob: (0, _core.toVarN)(array.length) }].concat((0, _map2.default)(array, entry.encode))); + }, + decode: function decode(_ref) { + var bits = _ref.bits; + var blob = _ref.blob; + + var size; + + var _fromVarN = (0, _core.fromVarN)(blob); + + var _fromVarN2 = _slicedToArray(_fromVarN, 2); + + size = _fromVarN2[0]; + blob = _fromVarN2[1]; + + var rest = { bits: bits, blob: blob }; + var array = [], + result, + i; + for (i = 0; i < size; i++) { + result = entry.decode(rest); + array[i] = result.value; + rest = result.rest; + } + return { value: array, rest: rest }; + } + }; + } + + (0, _coder.register)('array', array); + +/***/ } +/******/ ]) +}); +; \ No newline at end of file diff --git a/resources/.ipynb_checkpoints/u-min-checkpoint.js b/resources/.ipynb_checkpoints/u-min-checkpoint.js new file mode 100644 index 0000000..868857d --- /dev/null +++ b/resources/.ipynb_checkpoints/u-min-checkpoint.js @@ -0,0 +1 @@ +!function(t,r){"object"==typeof exports&&"object"==typeof module?module.exports=r():"function"==typeof define&&define.amd?define([],r):"object"==typeof exports?exports.u=r():t.u=r()}(this,function(){return function(t){function r(e){if(n[e])return n[e].exports;var o=n[e]={exports:{},id:e,loaded:!1};return t[e].call(o.exports,o,o.exports,r),o.loaded=!0,o.exports}var n={};return r.m=t,r.c=n,r.p="",r(0)}([function(t,r,n){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.register=r.decode=r.encode=r.fromJson=void 0;var e=n(2);Object.defineProperty(r,"fromJson",{enumerable:!0,get:function(){return e.fromJson}}),Object.defineProperty(r,"encode",{enumerable:!0,get:function(){return e.encode}}),Object.defineProperty(r,"decode",{enumerable:!0,get:function(){return e.decode}}),Object.defineProperty(r,"register",{enumerable:!0,get:function(){return e.register}}),n(25),n(51),n(53),n(56),n(52),n(54),n(55),n(50)},function(t,r){var n=Array.isArray;t.exports=n},function(t,r,n){"use strict";function e(t){return t&&t.__esModule?t:{"default":t}}function o(t,r){E[t]=r}function u(t,r){var n=t.spec.encode(r),e=n.bits,o=n.blob;return t.encodedVersion+(0,P.toVarN)(e.length)+(0,P.bitsToN)(e)+o}function i(t,r){var n,e,o=(0,P.fromVarN)(r),u=N(o,2);n=u[0],r=u[1];var i=(0,P.fromVarN)(r),c=N(i,2);e=c[0],r=c[1];var a=(0,M["default"])(t,function(t){return t.version===n});if(!a)throw new Error("Invalid version: "+n);var f=Math.ceil(e/6),s=(0,P.nToBits)(r.substr(0,f),e),l=r.substr(f),v=a.spec.decode({bits:s,blob:l}),p=(0,A["default"])((0,O["default"])(t,function(t){return t.version>n}),"version");return(0,_["default"])(p,function(t,r){return r.migrate(t)},v.value)}function c(t,r,n){function e(t){if((0,g["default"])(t)){var r=t[0];return"tuple"===r?E.tuple((0,y["default"])((0,d["default"])(t),e)):"array"===r?E.array(e(t[1])):E[r].apply(null,(0,d["default"])(t))}if((0,p["default"])(t)){var n=(0,l["default"])(t).sort();return E.object((0,f["default"])((0,y["default"])(n,function(r){return[r,e(t[r])]})))}}return{version:t,spec:e(r),jsonSpec:r,encodedVersion:(0,P.toVarN)(t),migrate:n||function(t){return t}}}var a=n(122),f=e(a),s=n(16),l=e(s),v=n(5),p=e(v),b=n(133),d=e(b),h=n(10),y=e(h),x=n(1),g=e(x),j=n(48),_=e(j),m=n(118),O=e(m),w=n(132),A=e(w),S=n(119),M=e(S),N=function(){function t(t,r){var n=[],e=!0,o=!1,u=void 0;try{for(var i,c=t[Symbol.iterator]();!(e=(i=c.next()).done)&&(n.push(i.value),!r||n.length!==r);e=!0);}catch(a){o=!0,u=a}finally{try{!e&&c["return"]&&c["return"]()}finally{if(o)throw u}}return n}return function(r,n){if(Array.isArray(r))return r;if(Symbol.iterator in Object(r))return t(r,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();Object.defineProperty(r,"__esModule",{value:!0}),r.register=o,r.encode=u,r.decode=i,r.fromJson=c;var P=n(3),E={}},function(t,r,n){"use strict";function e(t){return t&&t.__esModule?t:{"default":t}}function o(t){return 0===t?1:Math.floor(Math.log(t)/Math.LN2)+1}function u(t,r){var n=t.toString(2);if(n.length>r)throw new Error("Invalid value or bitSize: can't fit "+t+" in "+r+" bits");return(0,j["default"])("0",r-n.length)+n}function i(t){return t&&t.length>=1&&t[0]===_[0]}function c(t){return(0,x["default"])(t,function(t,r){return{bits:t.bits+(r.bits||""),blob:t.blob+(r.blob||"")}},{bits:"",blob:""})}function a(t){if(0>t)throw new Error("Invalid number: can't encode negative number "+t);for(var r="";t>=O;)r=m[t%O]+r,t=Math.floor(t/O);return r=m[t]+r}function f(t){for(var r,n=0,e=0;e31,n=n<<5|31&u}return[n,r]}function l(t){for(var r="",n=Math.ceil(o(t)/5),e=u(t,5*n);e;){var i=e.substr(0,5);e=e.substr(5),i=(0===e.length?"0":"1")+i,r+=p(i)}return r}function v(t,r){var n=a(t);if(n.length>r)throw new Error("Invalid charSize: can't encode "+t+" in "+r+" chars");return(0,j["default"])(m[0],r-n.length)+n}function p(t){for(var r,n="";t;)r=t.substr(0,6),t=t.substr(6),r.length<6&&(r+=(0,j["default"])("0",6-r.length)),n+=a(parseInt(r,2));return n}function b(t,r){return(0,h["default"])(t,function(t){return u(f(t),6)}).join("").substr(0,r)}var d=n(10),h=e(d),y=n(48),x=e(y),g=n(130),j=e(g);Object.defineProperty(r,"__esModule",{value:!0}),r.none=r.notNone=void 0,r.bitsRequired=o,r.paddedBinary=u,r.isNone=i,r.concat=c,r.toN=a,r.fromN=f,r.fromVarN=s,r.toVarN=l,r.paddedN=v,r.bitsToN=p,r.nToBits=b;var _=(r.notNone=u(0,1),r.none=u(1,1)),m="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890_-",O=m.length},function(t,r,n){var e=n(19),o=n(14),u=e(o,"Map");t.exports=u},function(t,r){function n(t){var r=typeof t;return!!t&&("object"==r||"function"==r)}t.exports=n},function(t,r){function n(t){return!!t&&"object"==typeof t}t.exports=n},function(t,r,n){var e=n(71),o=n(87),u=o(e);t.exports=u},function(t,r,n){function e(t){var r=typeof t;return"function"==r?t:null==t?i:"object"==r?c(t)?u(t[0],t[1]):o(t):a(t)}var o=n(76),u=n(77),i=n(45),c=n(1),a=n(129);t.exports=e},function(t,r,n){function e(t){return null!=t&&!("function"==typeof t&&u(t))&&i(o(t))}var o=n(92),u=n(23),i=n(15);t.exports=e},function(t,r,n){function e(t,r){var n=c(t)?o:i;return n(t,u(r,3))}var o=n(17),u=n(8),i=n(35),c=n(1);t.exports=e},function(t,r,n){function e(t,r){for(var n=t.length;n--;)if(o(t[n][0],r))return n;return-1}var o=n(43);t.exports=e},function(t,r){function n(t){var r=typeof t;return"number"==r||"boolean"==r||"string"==r&&"__proto__"!==t||null==t}t.exports=n},function(t,r,n){var e=n(19),o=e(Object,"create");t.exports=o},function(t,r,n){(function(t,e){var o=n(84),u={"function":!0,object:!0},i=u[typeof r]&&r&&!r.nodeType?r:null,c=u[typeof t]&&t&&!t.nodeType?t:null,a=o(i&&c&&"object"==typeof e&&e),f=o(u[typeof self]&&self),s=o(u[typeof window]&&window),l=o(u[typeof this]&&this),v=a||s!==(l&&l.window)&&s||f||l||Function("return this")();t.exports=v}).call(r,n(136)(t),function(){return this}())},function(t,r){function n(t){return"number"==typeof t&&t>-1&&t%1==0&&e>=t}var e=9007199254740991;t.exports=n},function(t,r,n){function e(t){var r=f(t);if(!r&&!c(t))return u(t);var n=i(t),e=!!n,s=n||[],l=s.length;for(var v in t)!o(t,v)||e&&("length"==v||a(v,l))||r&&"constructor"==v||s.push(v);return s}var o=n(18),u=n(75),i=n(98),c=n(9),a=n(20),f=n(100);t.exports=e},function(t,r){function n(t,r){for(var n=-1,e=t.length,o=Array(e);++n-1&&t%1==0&&r>t}var e=9007199254740991,o=/^(?:0|[1-9]\d*)$/;t.exports=n},function(t,r,n){function e(t,r){return"number"==typeof t?!0:!o(t)&&(i.test(t)||!u.test(t)||null!=r&&t in Object(r))}var o=n(1),u=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,i=/^\w*$/;t.exports=e},function(t,r,n){function e(t){return o(t)&&c.call(t,"callee")&&(!f.call(t,"callee")||a.call(t)==u)}var o=n(46),u="[object Arguments]",i=Object.prototype,c=i.hasOwnProperty,a=i.toString,f=i.propertyIsEnumerable;t.exports=e},function(t,r,n){function e(t){var r=o(t)?a.call(t):"";return r==u||r==i}var o=n(5),u="[object Function]",i="[object GeneratorFunction]",c=Object.prototype,a=c.toString;t.exports=e},function(t,r,n){function e(t){if(!t)return 0===t?t:0;if(t=o(t),t===u||t===-u){var r=0>t?-1:1;return r*i}var n=t%1;return t===t?n?t-n:t:0}var o=n(134),u=1/0,i=1.7976931348623157e308;t.exports=e},function(t,r,n){"use strict";function e(){for(var t=arguments.length,r=Array(t),n=0;t>n;n++)r[n]=arguments[n];var e=(0,o.bitsRequired)(r.length-1);return{encode:function(t){var n=r.indexOf(t);if(-1===n)throw new Error("Invalid choice: "+t+" is not one of "+r.join(","));return{bits:(0,o.paddedBinary)(n,e),blob:""}},decode:function(t){var n=t.bits,o=t.blob,u=parseInt(n.substr(0,e),2);return{value:r[u],rest:{bits:n.substring(e),blob:o}}}}}Object.defineProperty(r,"__esModule",{value:!0}),r["default"]=e;var o=n(3),u=n(2);(0,u.register)("oneOf",e)},function(t,r,n){function e(t){var r=-1,n=t?t.length:0;for(this.clear();++rn)return!1;var e=t.length-1;return n==e?t.pop():i.call(t,n,1),!0}var o=n(11),u=Array.prototype,i=u.splice;t.exports=e},function(t,r,n){function e(t,r){var n=o(t,r);return 0>n?void 0:t[n][1]}var o=n(11);t.exports=e},function(t,r,n){function e(t,r){return o(t,r)>-1}var o=n(11);t.exports=e},function(t,r,n){function e(t,r,n){var e=o(t,r);0>e?t.push([r,n]):t[e][1]=n}var o=n(11);t.exports=e},function(t,r,n){function e(t,r,n,a){a||(a=[]);for(var f=-1,s=t.length;++fn;)t=t[r[n++]];return n&&n==e?t:void 0}var o=n(38),u=n(21);t.exports=e},function(t,r,n){function e(t,r,n,c,a){return t===r?!0:null==t||null==r||!u(t)&&!i(r)?t!==t&&r!==r:o(t,r,e,n,c,a)}var o=n(73),u=n(5),i=n(6);t.exports=e},function(t,r,n){function e(t,r){var n=-1,e=u(t)?Array(t.length):[];return o(t,function(t,o,u){e[++n]=r(t,o,u)}),e}var o=n(7),u=n(9);t.exports=e},function(t,r){function n(t){return function(r){return null==r?void 0:r[t]}}t.exports=n},function(t,r){function n(t,r,n){var e=-1,o=t.length;0>r&&(r=-r>o?0:o+r),n=n>o?o:n,0>n&&(n+=o),o=r>n?0:n-r>>>0,r>>>=0;for(var u=Array(o);++es;s++)f=t.decode(l),v[s]=f.value,l=f.rest;return{value:v,rest:l}}}}var u=n(10),i=e(u),c=function(){function t(t,r){var n=[],e=!0,o=!1,u=void 0;try{for(var i,c=t[Symbol.iterator]();!(e=(i=c.next()).done)&&(n.push(i.value),!r||n.length!==r);e=!0);}catch(a){o=!0,u=a}finally{try{!e&&c["return"]&&c["return"]()}finally{if(o)throw u}}return n}return function(r,n){if(Array.isArray(r))return r;if(Symbol.iterator in Object(r))return t(r,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();Object.defineProperty(r,"__esModule",{value:!0}),r.array=o;var a=n(3),f=n(2);(0,f.register)("array",o)},function(t,r,n){"use strict";function e(t){return t&&t.__esModule?t:{"default":t}}function o(){return(0,i["default"])(!0,!1)}Object.defineProperty(r,"__esModule",{value:!0}),r["default"]=o;var u=n(25),i=e(u),c=n(2);(0,c.register)("boolean",o)},function(t,r,n){"use strict";function e(t){return{encode:function(t){return{bits:"",blob:t.toString()}},decode:function(r){var n=r.bits,e=r.blob;return{value:e.substr(0,t),rest:{bits:n,blob:e.substr(t)}}}}}Object.defineProperty(r,"__esModule",{value:!0}),r["default"]=e;var o=n(2);(0,o.register)("fixedchar",e)},function(t,r,n){"use strict";function e(){return{encode:function(t){var r=Math.abs(t).toString(2),n=(0,o.paddedBinary)(r.length,6)+(t>0?"1":"0")+r;return{bits:n,blob:""}},decode:function(t){var r=t.bits,n=t.blob,e=parseInt(r.substr(0,6),2);r=r.substr(6);var o="1"===r[0]?1:-1;return r=r.substr(1),{value:o*parseInt(r.substr(0,e),2),rest:{bits:r.substr(e),blob:n}}}}}Object.defineProperty(r,"__esModule",{value:!0}),r["default"]=e;var o=n(3),u=n(2);(0,u.register)("integer",e)},function(t,r,n){"use strict";function e(t){return t&&t.__esModule?t:{"default":t}}function o(t){return{encode:function(r){return(0,p.concat)((0,v["default"])((0,s["default"])(t,function(t,n){return(0,a["default"])(r,n)?[{bits:p.notNone},t.encode(r[n])]:{bits:p.none}})))},decode:function(r){var n=r.bits,e=r.blob,o={};return(0,i["default"])(t,function(t,r){if((0,p.isNone)(n))return void(n=n.substr(1));n=n.substr(1);var u=t.decode({bits:n,blob:e});n=u.rest.bits,e=u.rest.blob,o[r]=u.value}),{value:o,rest:{bits:n,blob:e}}}}}var u=n(42),i=e(u),c=n(123),a=e(c),f=n(10),s=e(f),l=n(120),v=e(l);Object.defineProperty(r,"__esModule",{value:!0}),r.object=o;var p=n(3),b=n(2);(0,b.register)("object",o)},function(t,r,n){"use strict";function e(t){return t&&t.__esModule?t:{"default":t}}function o(t){return{encode:function(r){return(0,f.concat)((0,a["default"])(t,function(t,n){return t.encode(r[n])}))},decode:function(r){var n=[];return(0,i["default"])(t,function(t,e){var o=t.decode(r);n[e]=o.value,r=o.rest}),{value:n,rest:r}}}}var u=n(42),i=e(u),c=n(10),a=e(c);Object.defineProperty(r,"__esModule",{value:!0}),r.tuple=o;var f=n(3),s=n(2);(0,s.register)("tuple",o)},function(t,r,n){"use strict";function e(){return{encode:function(t){return{bits:"",blob:(0,u.toVarN)(t.length)+t}},decode:function(t){var r,n=t.bits,e=t.blob,i=(0,u.fromVarN)(e),c=o(i,2);return r=c[0],e=c[1],{value:e.substr(0,r),rest:{bits:n,blob:e.substr(r)}}}}}var o=function(){function t(t,r){var n=[],e=!0,o=!1,u=void 0;try{for(var i,c=t[Symbol.iterator]();!(e=(i=c.next()).done)&&(n.push(i.value),!r||n.length!==r);e=!0);}catch(a){o=!0,u=a}finally{try{!e&&c["return"]&&c["return"]()}finally{if(o)throw u}}return n}return function(r,n){if(Array.isArray(r))return r;if(Symbol.iterator in Object(r))return t(r,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();Object.defineProperty(r,"__esModule",{value:!0}),r["default"]=e;var u=n(3),i=n(2);(0,i.register)("varchar",e)},function(t,r,n){function e(){}var o=n(13),u=Object.prototype;e.prototype=o?o(null):u,t.exports=e},function(t,r,n){function e(t){var r=-1,n=t?t.length:0;for(this.clear();++rr&&!u||!o||n&&!i&&c||e&&c)return 1;if(r>t&&!n||!c||u&&!e&&o||i&&o)return-1}return 0}t.exports=n},function(t,r,n){function e(t,r,n){for(var e=-1,u=t.criteria,i=r.criteria,c=u.length,a=n.length;++e=a)return f;var s=n[e];return f*("desc"==s?-1:1)}}return t.index-r.index}var o=n(85);t.exports=e},function(t,r,n){function e(t,r){return function(n,e){if(null==n)return n;if(!o(n))return t(n,e);for(var u=n.length,i=r?u:-1,c=Object(n);(r?i--:++iv))return!1;var b=a.get(t);if(b)return b==r;var d=!0;for(a.set(t,r);++fr?0:r,e)):[]}var o=n(37),u=n(24);t.exports=e},function(t,r,n){function e(t,r){var n=c(t)?o:u;return n(t,i(r,3))}var o=n(63),u=n(67),i=n(8),c=n(1);t.exports=e},function(t,r,n){function e(t,r){if(r=c(r,3),a(t)){var n=i(t,r);return n>-1?t[n]:void 0}return u(t,r,o)}var o=n(7),u=n(68),i=n(69),c=n(8),a=n(1);t.exports=e},function(t,r,n){function e(t){var r=t?t.length:0;return r?o(t):[]}var o=n(32);t.exports=e},function(t,r,n){function e(t,r){return"function"==typeof r&&i(t)?o(t,r):u(t,c(r))}var o=n(62),u=n(7),i=n(1),c=n(116);t.exports=e},function(t,r){function n(t){for(var r=-1,n=t?t.length:0,e={};++rr||r>i)return n;do r%2&&(n+=t),r=c(r/2),t+=t;while(r);return n}var o=n(24),u=n(49),i=9007199254740991,c=Math.floor;t.exports=e},function(t,r,n){function e(t,r){if("function"!=typeof t)throw new TypeError(i);return r=c(void 0===r?t.length-1:u(r),0),function(){for(var n=arguments,e=-1,u=c(n.length-r,0),i=Array(u);++e1&&u(t,r[0],r[1])?r=[]:n>2&&u(r[0],r[1],r[2])&&(r.length=1),o(t,e(r),[])});t.exports=c},function(t,r,n){function e(t){return o(t,1)}var o=n(117);t.exports=e},function(t,r,n){function e(t){if(u(t)){var r=o(t.valueOf)?t.valueOf():t;t=u(r)?r+"":r}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(c,"");var n=f.test(t);return n||s.test(t)?l(t.slice(2),n?2:8):a.test(t)?i:+t}var o=n(23),u=n(5),i=NaN,c=/^\s+|\s+$/g,a=/^[-+]0x[0-9a-f]+$/i,f=/^0b[01]+$/i,s=/^0o[0-7]+$/i,l=parseInt;t.exports=e},function(t,r,n){function e(t){return o(t,u(t))}var o=n(83),u=n(16);t.exports=e},function(t,r){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children=[],t.webpackPolyfill=1),t}}])}); \ No newline at end of file diff --git a/resources/u-min.js b/resources/u-min.js new file mode 100644 index 0000000..868857d --- /dev/null +++ b/resources/u-min.js @@ -0,0 +1 @@ +!function(t,r){"object"==typeof exports&&"object"==typeof module?module.exports=r():"function"==typeof define&&define.amd?define([],r):"object"==typeof exports?exports.u=r():t.u=r()}(this,function(){return function(t){function r(e){if(n[e])return n[e].exports;var o=n[e]={exports:{},id:e,loaded:!1};return t[e].call(o.exports,o,o.exports,r),o.loaded=!0,o.exports}var n={};return r.m=t,r.c=n,r.p="",r(0)}([function(t,r,n){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.register=r.decode=r.encode=r.fromJson=void 0;var e=n(2);Object.defineProperty(r,"fromJson",{enumerable:!0,get:function(){return e.fromJson}}),Object.defineProperty(r,"encode",{enumerable:!0,get:function(){return e.encode}}),Object.defineProperty(r,"decode",{enumerable:!0,get:function(){return e.decode}}),Object.defineProperty(r,"register",{enumerable:!0,get:function(){return e.register}}),n(25),n(51),n(53),n(56),n(52),n(54),n(55),n(50)},function(t,r){var n=Array.isArray;t.exports=n},function(t,r,n){"use strict";function e(t){return t&&t.__esModule?t:{"default":t}}function o(t,r){E[t]=r}function u(t,r){var n=t.spec.encode(r),e=n.bits,o=n.blob;return t.encodedVersion+(0,P.toVarN)(e.length)+(0,P.bitsToN)(e)+o}function i(t,r){var n,e,o=(0,P.fromVarN)(r),u=N(o,2);n=u[0],r=u[1];var i=(0,P.fromVarN)(r),c=N(i,2);e=c[0],r=c[1];var a=(0,M["default"])(t,function(t){return t.version===n});if(!a)throw new Error("Invalid version: "+n);var f=Math.ceil(e/6),s=(0,P.nToBits)(r.substr(0,f),e),l=r.substr(f),v=a.spec.decode({bits:s,blob:l}),p=(0,A["default"])((0,O["default"])(t,function(t){return t.version>n}),"version");return(0,_["default"])(p,function(t,r){return r.migrate(t)},v.value)}function c(t,r,n){function e(t){if((0,g["default"])(t)){var r=t[0];return"tuple"===r?E.tuple((0,y["default"])((0,d["default"])(t),e)):"array"===r?E.array(e(t[1])):E[r].apply(null,(0,d["default"])(t))}if((0,p["default"])(t)){var n=(0,l["default"])(t).sort();return E.object((0,f["default"])((0,y["default"])(n,function(r){return[r,e(t[r])]})))}}return{version:t,spec:e(r),jsonSpec:r,encodedVersion:(0,P.toVarN)(t),migrate:n||function(t){return t}}}var a=n(122),f=e(a),s=n(16),l=e(s),v=n(5),p=e(v),b=n(133),d=e(b),h=n(10),y=e(h),x=n(1),g=e(x),j=n(48),_=e(j),m=n(118),O=e(m),w=n(132),A=e(w),S=n(119),M=e(S),N=function(){function t(t,r){var n=[],e=!0,o=!1,u=void 0;try{for(var i,c=t[Symbol.iterator]();!(e=(i=c.next()).done)&&(n.push(i.value),!r||n.length!==r);e=!0);}catch(a){o=!0,u=a}finally{try{!e&&c["return"]&&c["return"]()}finally{if(o)throw u}}return n}return function(r,n){if(Array.isArray(r))return r;if(Symbol.iterator in Object(r))return t(r,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();Object.defineProperty(r,"__esModule",{value:!0}),r.register=o,r.encode=u,r.decode=i,r.fromJson=c;var P=n(3),E={}},function(t,r,n){"use strict";function e(t){return t&&t.__esModule?t:{"default":t}}function o(t){return 0===t?1:Math.floor(Math.log(t)/Math.LN2)+1}function u(t,r){var n=t.toString(2);if(n.length>r)throw new Error("Invalid value or bitSize: can't fit "+t+" in "+r+" bits");return(0,j["default"])("0",r-n.length)+n}function i(t){return t&&t.length>=1&&t[0]===_[0]}function c(t){return(0,x["default"])(t,function(t,r){return{bits:t.bits+(r.bits||""),blob:t.blob+(r.blob||"")}},{bits:"",blob:""})}function a(t){if(0>t)throw new Error("Invalid number: can't encode negative number "+t);for(var r="";t>=O;)r=m[t%O]+r,t=Math.floor(t/O);return r=m[t]+r}function f(t){for(var r,n=0,e=0;e31,n=n<<5|31&u}return[n,r]}function l(t){for(var r="",n=Math.ceil(o(t)/5),e=u(t,5*n);e;){var i=e.substr(0,5);e=e.substr(5),i=(0===e.length?"0":"1")+i,r+=p(i)}return r}function v(t,r){var n=a(t);if(n.length>r)throw new Error("Invalid charSize: can't encode "+t+" in "+r+" chars");return(0,j["default"])(m[0],r-n.length)+n}function p(t){for(var r,n="";t;)r=t.substr(0,6),t=t.substr(6),r.length<6&&(r+=(0,j["default"])("0",6-r.length)),n+=a(parseInt(r,2));return n}function b(t,r){return(0,h["default"])(t,function(t){return u(f(t),6)}).join("").substr(0,r)}var d=n(10),h=e(d),y=n(48),x=e(y),g=n(130),j=e(g);Object.defineProperty(r,"__esModule",{value:!0}),r.none=r.notNone=void 0,r.bitsRequired=o,r.paddedBinary=u,r.isNone=i,r.concat=c,r.toN=a,r.fromN=f,r.fromVarN=s,r.toVarN=l,r.paddedN=v,r.bitsToN=p,r.nToBits=b;var _=(r.notNone=u(0,1),r.none=u(1,1)),m="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890_-",O=m.length},function(t,r,n){var e=n(19),o=n(14),u=e(o,"Map");t.exports=u},function(t,r){function n(t){var r=typeof t;return!!t&&("object"==r||"function"==r)}t.exports=n},function(t,r){function n(t){return!!t&&"object"==typeof t}t.exports=n},function(t,r,n){var e=n(71),o=n(87),u=o(e);t.exports=u},function(t,r,n){function e(t){var r=typeof t;return"function"==r?t:null==t?i:"object"==r?c(t)?u(t[0],t[1]):o(t):a(t)}var o=n(76),u=n(77),i=n(45),c=n(1),a=n(129);t.exports=e},function(t,r,n){function e(t){return null!=t&&!("function"==typeof t&&u(t))&&i(o(t))}var o=n(92),u=n(23),i=n(15);t.exports=e},function(t,r,n){function e(t,r){var n=c(t)?o:i;return n(t,u(r,3))}var o=n(17),u=n(8),i=n(35),c=n(1);t.exports=e},function(t,r,n){function e(t,r){for(var n=t.length;n--;)if(o(t[n][0],r))return n;return-1}var o=n(43);t.exports=e},function(t,r){function n(t){var r=typeof t;return"number"==r||"boolean"==r||"string"==r&&"__proto__"!==t||null==t}t.exports=n},function(t,r,n){var e=n(19),o=e(Object,"create");t.exports=o},function(t,r,n){(function(t,e){var o=n(84),u={"function":!0,object:!0},i=u[typeof r]&&r&&!r.nodeType?r:null,c=u[typeof t]&&t&&!t.nodeType?t:null,a=o(i&&c&&"object"==typeof e&&e),f=o(u[typeof self]&&self),s=o(u[typeof window]&&window),l=o(u[typeof this]&&this),v=a||s!==(l&&l.window)&&s||f||l||Function("return this")();t.exports=v}).call(r,n(136)(t),function(){return this}())},function(t,r){function n(t){return"number"==typeof t&&t>-1&&t%1==0&&e>=t}var e=9007199254740991;t.exports=n},function(t,r,n){function e(t){var r=f(t);if(!r&&!c(t))return u(t);var n=i(t),e=!!n,s=n||[],l=s.length;for(var v in t)!o(t,v)||e&&("length"==v||a(v,l))||r&&"constructor"==v||s.push(v);return s}var o=n(18),u=n(75),i=n(98),c=n(9),a=n(20),f=n(100);t.exports=e},function(t,r){function n(t,r){for(var n=-1,e=t.length,o=Array(e);++n-1&&t%1==0&&r>t}var e=9007199254740991,o=/^(?:0|[1-9]\d*)$/;t.exports=n},function(t,r,n){function e(t,r){return"number"==typeof t?!0:!o(t)&&(i.test(t)||!u.test(t)||null!=r&&t in Object(r))}var o=n(1),u=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,i=/^\w*$/;t.exports=e},function(t,r,n){function e(t){return o(t)&&c.call(t,"callee")&&(!f.call(t,"callee")||a.call(t)==u)}var o=n(46),u="[object Arguments]",i=Object.prototype,c=i.hasOwnProperty,a=i.toString,f=i.propertyIsEnumerable;t.exports=e},function(t,r,n){function e(t){var r=o(t)?a.call(t):"";return r==u||r==i}var o=n(5),u="[object Function]",i="[object GeneratorFunction]",c=Object.prototype,a=c.toString;t.exports=e},function(t,r,n){function e(t){if(!t)return 0===t?t:0;if(t=o(t),t===u||t===-u){var r=0>t?-1:1;return r*i}var n=t%1;return t===t?n?t-n:t:0}var o=n(134),u=1/0,i=1.7976931348623157e308;t.exports=e},function(t,r,n){"use strict";function e(){for(var t=arguments.length,r=Array(t),n=0;t>n;n++)r[n]=arguments[n];var e=(0,o.bitsRequired)(r.length-1);return{encode:function(t){var n=r.indexOf(t);if(-1===n)throw new Error("Invalid choice: "+t+" is not one of "+r.join(","));return{bits:(0,o.paddedBinary)(n,e),blob:""}},decode:function(t){var n=t.bits,o=t.blob,u=parseInt(n.substr(0,e),2);return{value:r[u],rest:{bits:n.substring(e),blob:o}}}}}Object.defineProperty(r,"__esModule",{value:!0}),r["default"]=e;var o=n(3),u=n(2);(0,u.register)("oneOf",e)},function(t,r,n){function e(t){var r=-1,n=t?t.length:0;for(this.clear();++rn)return!1;var e=t.length-1;return n==e?t.pop():i.call(t,n,1),!0}var o=n(11),u=Array.prototype,i=u.splice;t.exports=e},function(t,r,n){function e(t,r){var n=o(t,r);return 0>n?void 0:t[n][1]}var o=n(11);t.exports=e},function(t,r,n){function e(t,r){return o(t,r)>-1}var o=n(11);t.exports=e},function(t,r,n){function e(t,r,n){var e=o(t,r);0>e?t.push([r,n]):t[e][1]=n}var o=n(11);t.exports=e},function(t,r,n){function e(t,r,n,a){a||(a=[]);for(var f=-1,s=t.length;++fn;)t=t[r[n++]];return n&&n==e?t:void 0}var o=n(38),u=n(21);t.exports=e},function(t,r,n){function e(t,r,n,c,a){return t===r?!0:null==t||null==r||!u(t)&&!i(r)?t!==t&&r!==r:o(t,r,e,n,c,a)}var o=n(73),u=n(5),i=n(6);t.exports=e},function(t,r,n){function e(t,r){var n=-1,e=u(t)?Array(t.length):[];return o(t,function(t,o,u){e[++n]=r(t,o,u)}),e}var o=n(7),u=n(9);t.exports=e},function(t,r){function n(t){return function(r){return null==r?void 0:r[t]}}t.exports=n},function(t,r){function n(t,r,n){var e=-1,o=t.length;0>r&&(r=-r>o?0:o+r),n=n>o?o:n,0>n&&(n+=o),o=r>n?0:n-r>>>0,r>>>=0;for(var u=Array(o);++es;s++)f=t.decode(l),v[s]=f.value,l=f.rest;return{value:v,rest:l}}}}var u=n(10),i=e(u),c=function(){function t(t,r){var n=[],e=!0,o=!1,u=void 0;try{for(var i,c=t[Symbol.iterator]();!(e=(i=c.next()).done)&&(n.push(i.value),!r||n.length!==r);e=!0);}catch(a){o=!0,u=a}finally{try{!e&&c["return"]&&c["return"]()}finally{if(o)throw u}}return n}return function(r,n){if(Array.isArray(r))return r;if(Symbol.iterator in Object(r))return t(r,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();Object.defineProperty(r,"__esModule",{value:!0}),r.array=o;var a=n(3),f=n(2);(0,f.register)("array",o)},function(t,r,n){"use strict";function e(t){return t&&t.__esModule?t:{"default":t}}function o(){return(0,i["default"])(!0,!1)}Object.defineProperty(r,"__esModule",{value:!0}),r["default"]=o;var u=n(25),i=e(u),c=n(2);(0,c.register)("boolean",o)},function(t,r,n){"use strict";function e(t){return{encode:function(t){return{bits:"",blob:t.toString()}},decode:function(r){var n=r.bits,e=r.blob;return{value:e.substr(0,t),rest:{bits:n,blob:e.substr(t)}}}}}Object.defineProperty(r,"__esModule",{value:!0}),r["default"]=e;var o=n(2);(0,o.register)("fixedchar",e)},function(t,r,n){"use strict";function e(){return{encode:function(t){var r=Math.abs(t).toString(2),n=(0,o.paddedBinary)(r.length,6)+(t>0?"1":"0")+r;return{bits:n,blob:""}},decode:function(t){var r=t.bits,n=t.blob,e=parseInt(r.substr(0,6),2);r=r.substr(6);var o="1"===r[0]?1:-1;return r=r.substr(1),{value:o*parseInt(r.substr(0,e),2),rest:{bits:r.substr(e),blob:n}}}}}Object.defineProperty(r,"__esModule",{value:!0}),r["default"]=e;var o=n(3),u=n(2);(0,u.register)("integer",e)},function(t,r,n){"use strict";function e(t){return t&&t.__esModule?t:{"default":t}}function o(t){return{encode:function(r){return(0,p.concat)((0,v["default"])((0,s["default"])(t,function(t,n){return(0,a["default"])(r,n)?[{bits:p.notNone},t.encode(r[n])]:{bits:p.none}})))},decode:function(r){var n=r.bits,e=r.blob,o={};return(0,i["default"])(t,function(t,r){if((0,p.isNone)(n))return void(n=n.substr(1));n=n.substr(1);var u=t.decode({bits:n,blob:e});n=u.rest.bits,e=u.rest.blob,o[r]=u.value}),{value:o,rest:{bits:n,blob:e}}}}}var u=n(42),i=e(u),c=n(123),a=e(c),f=n(10),s=e(f),l=n(120),v=e(l);Object.defineProperty(r,"__esModule",{value:!0}),r.object=o;var p=n(3),b=n(2);(0,b.register)("object",o)},function(t,r,n){"use strict";function e(t){return t&&t.__esModule?t:{"default":t}}function o(t){return{encode:function(r){return(0,f.concat)((0,a["default"])(t,function(t,n){return t.encode(r[n])}))},decode:function(r){var n=[];return(0,i["default"])(t,function(t,e){var o=t.decode(r);n[e]=o.value,r=o.rest}),{value:n,rest:r}}}}var u=n(42),i=e(u),c=n(10),a=e(c);Object.defineProperty(r,"__esModule",{value:!0}),r.tuple=o;var f=n(3),s=n(2);(0,s.register)("tuple",o)},function(t,r,n){"use strict";function e(){return{encode:function(t){return{bits:"",blob:(0,u.toVarN)(t.length)+t}},decode:function(t){var r,n=t.bits,e=t.blob,i=(0,u.fromVarN)(e),c=o(i,2);return r=c[0],e=c[1],{value:e.substr(0,r),rest:{bits:n,blob:e.substr(r)}}}}}var o=function(){function t(t,r){var n=[],e=!0,o=!1,u=void 0;try{for(var i,c=t[Symbol.iterator]();!(e=(i=c.next()).done)&&(n.push(i.value),!r||n.length!==r);e=!0);}catch(a){o=!0,u=a}finally{try{!e&&c["return"]&&c["return"]()}finally{if(o)throw u}}return n}return function(r,n){if(Array.isArray(r))return r;if(Symbol.iterator in Object(r))return t(r,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();Object.defineProperty(r,"__esModule",{value:!0}),r["default"]=e;var u=n(3),i=n(2);(0,i.register)("varchar",e)},function(t,r,n){function e(){}var o=n(13),u=Object.prototype;e.prototype=o?o(null):u,t.exports=e},function(t,r,n){function e(t){var r=-1,n=t?t.length:0;for(this.clear();++rr&&!u||!o||n&&!i&&c||e&&c)return 1;if(r>t&&!n||!c||u&&!e&&o||i&&o)return-1}return 0}t.exports=n},function(t,r,n){function e(t,r,n){for(var e=-1,u=t.criteria,i=r.criteria,c=u.length,a=n.length;++e=a)return f;var s=n[e];return f*("desc"==s?-1:1)}}return t.index-r.index}var o=n(85);t.exports=e},function(t,r,n){function e(t,r){return function(n,e){if(null==n)return n;if(!o(n))return t(n,e);for(var u=n.length,i=r?u:-1,c=Object(n);(r?i--:++iv))return!1;var b=a.get(t);if(b)return b==r;var d=!0;for(a.set(t,r);++fr?0:r,e)):[]}var o=n(37),u=n(24);t.exports=e},function(t,r,n){function e(t,r){var n=c(t)?o:u;return n(t,i(r,3))}var o=n(63),u=n(67),i=n(8),c=n(1);t.exports=e},function(t,r,n){function e(t,r){if(r=c(r,3),a(t)){var n=i(t,r);return n>-1?t[n]:void 0}return u(t,r,o)}var o=n(7),u=n(68),i=n(69),c=n(8),a=n(1);t.exports=e},function(t,r,n){function e(t){var r=t?t.length:0;return r?o(t):[]}var o=n(32);t.exports=e},function(t,r,n){function e(t,r){return"function"==typeof r&&i(t)?o(t,r):u(t,c(r))}var o=n(62),u=n(7),i=n(1),c=n(116);t.exports=e},function(t,r){function n(t){for(var r=-1,n=t?t.length:0,e={};++rr||r>i)return n;do r%2&&(n+=t),r=c(r/2),t+=t;while(r);return n}var o=n(24),u=n(49),i=9007199254740991,c=Math.floor;t.exports=e},function(t,r,n){function e(t,r){if("function"!=typeof t)throw new TypeError(i);return r=c(void 0===r?t.length-1:u(r),0),function(){for(var n=arguments,e=-1,u=c(n.length-r,0),i=Array(u);++e1&&u(t,r[0],r[1])?r=[]:n>2&&u(r[0],r[1],r[2])&&(r.length=1),o(t,e(r),[])});t.exports=c},function(t,r,n){function e(t){return o(t,1)}var o=n(117);t.exports=e},function(t,r,n){function e(t){if(u(t)){var r=o(t.valueOf)?t.valueOf():t;t=u(r)?r+"":r}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(c,"");var n=f.test(t);return n||s.test(t)?l(t.slice(2),n?2:8):a.test(t)?i:+t}var o=n(23),u=n(5),i=NaN,c=/^\s+|\s+$/g,a=/^[-+]0x[0-9a-f]+$/i,f=/^0b[01]+$/i,s=/^0o[0-7]+$/i,l=parseInt;t.exports=e},function(t,r,n){function e(t){return o(t,u(t))}var o=n(83),u=n(16);t.exports=e},function(t,r){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children=[],t.webpackPolyfill=1),t}}])}); \ No newline at end of file diff --git a/resources/u.js b/resources/u.js new file mode 100644 index 0000000..0bd1110 --- /dev/null +++ b/resources/u.js @@ -0,0 +1,5143 @@ +(function webpackUniversalModuleDefinition(root, factory) { + if(typeof exports === 'object' && typeof module === 'object') + module.exports = factory(); + else if(typeof define === 'function' && define.amd) + define([], factory); + else if(typeof exports === 'object') + exports["u"] = factory(); + else + root["u"] = factory(); +})(this, function() { +return /******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; + +/******/ // The require function +/******/ function __webpack_require__(moduleId) { + +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) +/******/ return installedModules[moduleId].exports; + +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ exports: {}, +/******/ id: moduleId, +/******/ loaded: false +/******/ }; + +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); + +/******/ // Flag the module as loaded +/******/ module.loaded = true; + +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } + + +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = modules; + +/******/ // expose the module cache +/******/ __webpack_require__.c = installedModules; + +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; + +/******/ // Load entry module and return exports +/******/ return __webpack_require__(0); +/******/ }) +/************************************************************************/ +/******/ ([ +/* 0 */ +/***/ function(module, exports, __webpack_require__) { + + "use strict"; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.register = exports.decode = exports.encode = exports.fromJson = undefined; + + var _coder = __webpack_require__(1); + + Object.defineProperty(exports, "fromJson", { + enumerable: true, + get: function get() { + return _coder.fromJson; + } + }); + Object.defineProperty(exports, "encode", { + enumerable: true, + get: function get() { + return _coder.encode; + } + }); + Object.defineProperty(exports, "decode", { + enumerable: true, + get: function get() { + return _coder.decode; + } + }); + Object.defineProperty(exports, "register", { + enumerable: true, + get: function get() { + return _coder.register; + } + }); + + __webpack_require__(123); + + __webpack_require__(124); + + __webpack_require__(125); + + __webpack_require__(126); + + __webpack_require__(127); + + __webpack_require__(128); + + __webpack_require__(135); + + __webpack_require__(136); + +/***/ }, +/* 1 */ +/***/ function(module, exports, __webpack_require__) { + + "use strict"; + + var _fromPairs = __webpack_require__(2); + + var _fromPairs2 = _interopRequireDefault(_fromPairs); + + var _keys = __webpack_require__(3); + + var _keys2 = _interopRequireDefault(_keys); + + var _isObject = __webpack_require__(14); + + var _isObject2 = _interopRequireDefault(_isObject); + + var _tail = __webpack_require__(21); + + var _tail2 = _interopRequireDefault(_tail); + + var _map = __webpack_require__(26); + + var _map2 = _interopRequireDefault(_map); + + var _isArray = __webpack_require__(17); + + var _isArray2 = _interopRequireDefault(_isArray); + + var _reduce = __webpack_require__(102); + + var _reduce2 = _interopRequireDefault(_reduce); + + var _filter = __webpack_require__(105); + + var _filter2 = _interopRequireDefault(_filter); + + var _sortBy = __webpack_require__(108); + + var _sortBy2 = _interopRequireDefault(_sortBy); + + var _find = __webpack_require__(118); + + var _find2 = _interopRequireDefault(_find); + + var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }(); + + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.register = register; + exports.encode = encode; + exports.decode = decode; + exports.fromJson = fromJson; + + var _core = __webpack_require__(121); + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + + var availableTypes = {}; + + function register(name, type) { + availableTypes[name] = type; + } + + function encode(coder, object) { + var _coder$spec$encode = coder.spec.encode(object); + + var bits = _coder$spec$encode.bits; + var blob = _coder$spec$encode.blob; + + return coder.encodedVersion + (0, _core.toVarN)(bits.length) + (0, _core.bitsToN)(bits) + blob; + } + + function decode(coders, string) { + var version, bitSize; + + var _fromVarN = (0, _core.fromVarN)(string); + + var _fromVarN2 = _slicedToArray(_fromVarN, 2); + + version = _fromVarN2[0]; + string = _fromVarN2[1]; + + var _fromVarN3 = (0, _core.fromVarN)(string); + + var _fromVarN4 = _slicedToArray(_fromVarN3, 2); + + bitSize = _fromVarN4[0]; + string = _fromVarN4[1]; + + var coder = (0, _find2.default)(coders, function (c) { + return c.version === version; + }); + if (!coder) { + throw new Error("Invalid version: " + version); + } + + var bitCharSize = Math.ceil(bitSize / 6); + var bits = (0, _core.nToBits)(string.substr(0, bitCharSize), bitSize); + var blob = string.substr(bitCharSize); + var result = coder.spec.decode({ bits: bits, blob: blob }); + var pendingMigrations = (0, _sortBy2.default)((0, _filter2.default)(coders, function (coder) { + return coder.version > version; + }), 'version'); + return (0, _reduce2.default)(pendingMigrations, function (value, coder) { + return coder.migrate(value); + }, result.value); + } + + function fromJson(version, jsonSpec, migrate) { + function loop(spec) { + if ((0, _isArray2.default)(spec)) { + var method = spec[0]; + if (method === 'tuple') { + return availableTypes.tuple((0, _map2.default)((0, _tail2.default)(spec), loop)); + } else if (method === 'array') { + return availableTypes.array(loop(spec[1])); + } else { + return availableTypes[method].apply(null, (0, _tail2.default)(spec)); + } + } else if ((0, _isObject2.default)(spec)) { + var entries = (0, _keys2.default)(spec).sort(); + return availableTypes.object((0, _fromPairs2.default)((0, _map2.default)(entries, function (key) { + return [key, loop(spec[key])]; + }))); + } + } + + return { + version: version, + spec: loop(jsonSpec), + jsonSpec: jsonSpec, + encodedVersion: (0, _core.toVarN)(version), + migrate: migrate || function (x) { + return x; + } + }; + } + +/***/ }, +/* 2 */ +/***/ function(module, exports) { + + /** + * The inverse of `_.toPairs`; this method returns an object composed + * from key-value `pairs`. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} pairs The key-value pairs. + * @returns {Object} Returns the new object. + * @example + * + * _.fromPairs([['fred', 30], ['barney', 40]]); + * // => { 'fred': 30, 'barney': 40 } + */ + function fromPairs(pairs) { + var index = -1, + length = pairs ? pairs.length : 0, + result = {}; + + while (++index < length) { + var pair = pairs[index]; + result[pair[0]] = pair[1]; + } + return result; + } + + module.exports = fromPairs; + + +/***/ }, +/* 3 */ +/***/ function(module, exports, __webpack_require__) { + + var baseHas = __webpack_require__(4), + baseKeys = __webpack_require__(5), + indexKeys = __webpack_require__(6), + isArrayLike = __webpack_require__(10), + isIndex = __webpack_require__(19), + isPrototype = __webpack_require__(20); + + /** + * Creates an array of the own enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. See the + * [ES spec](http://ecma-international.org/ecma-262/6.0/#sec-object.keys) + * for more details. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keys(new Foo); + * // => ['a', 'b'] (iteration order is not guaranteed) + * + * _.keys('hi'); + * // => ['0', '1'] + */ + function keys(object) { + var isProto = isPrototype(object); + if (!(isProto || isArrayLike(object))) { + return baseKeys(object); + } + var indexes = indexKeys(object), + skipIndexes = !!indexes, + result = indexes || [], + length = result.length; + + for (var key in object) { + if (baseHas(object, key) && + !(skipIndexes && (key == 'length' || isIndex(key, length))) && + !(isProto && key == 'constructor')) { + result.push(key); + } + } + return result; + } + + module.exports = keys; + + +/***/ }, +/* 4 */ +/***/ function(module, exports) { + + /** Used for built-in method references. */ + var objectProto = Object.prototype; + + /** Used to check objects for own properties. */ + var hasOwnProperty = objectProto.hasOwnProperty; + + /** Built-in value references. */ + var getPrototypeOf = Object.getPrototypeOf; + + /** + * The base implementation of `_.has` without support for deep paths. + * + * @private + * @param {Object} object The object to query. + * @param {Array|string} key The key to check. + * @returns {boolean} Returns `true` if `key` exists, else `false`. + */ + function baseHas(object, key) { + // Avoid a bug in IE 10-11 where objects with a [[Prototype]] of `null`, + // that are composed entirely of index properties, return `false` for + // `hasOwnProperty` checks of them. + return hasOwnProperty.call(object, key) || + (typeof object == 'object' && key in object && getPrototypeOf(object) === null); + } + + module.exports = baseHas; + + +/***/ }, +/* 5 */ +/***/ function(module, exports) { + + /* Built-in method references for those with the same name as other `lodash` methods. */ + var nativeKeys = Object.keys; + + /** + * The base implementation of `_.keys` which doesn't skip the constructor + * property of prototypes or treat sparse arrays as dense. + * + * @private + * @type Function + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ + function baseKeys(object) { + return nativeKeys(Object(object)); + } + + module.exports = baseKeys; + + +/***/ }, +/* 6 */ +/***/ function(module, exports, __webpack_require__) { + + var baseTimes = __webpack_require__(7), + isArguments = __webpack_require__(8), + isArray = __webpack_require__(17), + isLength = __webpack_require__(15), + isString = __webpack_require__(18); + + /** + * Creates an array of index keys for `object` values of arrays, + * `arguments` objects, and strings, otherwise `null` is returned. + * + * @private + * @param {Object} object The object to query. + * @returns {Array|null} Returns index keys, else `null`. + */ + function indexKeys(object) { + var length = object ? object.length : undefined; + if (isLength(length) && + (isArray(object) || isString(object) || isArguments(object))) { + return baseTimes(length, String); + } + return null; + } + + module.exports = indexKeys; + + +/***/ }, +/* 7 */ +/***/ function(module, exports) { + + /** + * The base implementation of `_.times` without support for iteratee shorthands + * or max array length checks. + * + * @private + * @param {number} n The number of times to invoke `iteratee`. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the array of results. + */ + function baseTimes(n, iteratee) { + var index = -1, + result = Array(n); + + while (++index < n) { + result[index] = iteratee(index); + } + return result; + } + + module.exports = baseTimes; + + +/***/ }, +/* 8 */ +/***/ function(module, exports, __webpack_require__) { + + var isArrayLikeObject = __webpack_require__(9); + + /** `Object#toString` result references. */ + var argsTag = '[object Arguments]'; + + /** Used for built-in method references. */ + var objectProto = Object.prototype; + + /** Used to check objects for own properties. */ + var hasOwnProperty = objectProto.hasOwnProperty; + + /** + * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) + * of values. + */ + var objectToString = objectProto.toString; + + /** Built-in value references. */ + var propertyIsEnumerable = objectProto.propertyIsEnumerable; + + /** + * Checks if `value` is likely an `arguments` object. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. + * @example + * + * _.isArguments(function() { return arguments; }()); + * // => true + * + * _.isArguments([1, 2, 3]); + * // => false + */ + function isArguments(value) { + // Safari 8.1 incorrectly makes `arguments.callee` enumerable in strict mode. + return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') && + (!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag); + } + + module.exports = isArguments; + + +/***/ }, +/* 9 */ +/***/ function(module, exports, __webpack_require__) { + + var isArrayLike = __webpack_require__(10), + isObjectLike = __webpack_require__(16); + + /** + * This method is like `_.isArrayLike` except that it also checks if `value` + * is an object. + * + * @static + * @memberOf _ + * @type Function + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array-like object, else `false`. + * @example + * + * _.isArrayLikeObject([1, 2, 3]); + * // => true + * + * _.isArrayLikeObject(document.body.children); + * // => true + * + * _.isArrayLikeObject('abc'); + * // => false + * + * _.isArrayLikeObject(_.noop); + * // => false + */ + function isArrayLikeObject(value) { + return isObjectLike(value) && isArrayLike(value); + } + + module.exports = isArrayLikeObject; + + +/***/ }, +/* 10 */ +/***/ function(module, exports, __webpack_require__) { + + var getLength = __webpack_require__(11), + isFunction = __webpack_require__(13), + isLength = __webpack_require__(15); + + /** + * Checks if `value` is array-like. A value is considered array-like if it's + * not a function and has a `value.length` that's an integer greater than or + * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`. + * + * @static + * @memberOf _ + * @type Function + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is array-like, else `false`. + * @example + * + * _.isArrayLike([1, 2, 3]); + * // => true + * + * _.isArrayLike(document.body.children); + * // => true + * + * _.isArrayLike('abc'); + * // => true + * + * _.isArrayLike(_.noop); + * // => false + */ + function isArrayLike(value) { + return value != null && + !(typeof value == 'function' && isFunction(value)) && isLength(getLength(value)); + } + + module.exports = isArrayLike; + + +/***/ }, +/* 11 */ +/***/ function(module, exports, __webpack_require__) { + + var baseProperty = __webpack_require__(12); + + /** + * Gets the "length" property value of `object`. + * + * **Note:** This function is used to avoid a [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792) + * that affects Safari on at least iOS 8.1-8.3 ARM64. + * + * @private + * @param {Object} object The object to query. + * @returns {*} Returns the "length" value. + */ + var getLength = baseProperty('length'); + + module.exports = getLength; + + +/***/ }, +/* 12 */ +/***/ function(module, exports) { + + /** + * The base implementation of `_.property` without support for deep paths. + * + * @private + * @param {string} key The key of the property to get. + * @returns {Function} Returns the new function. + */ + function baseProperty(key) { + return function(object) { + return object == null ? undefined : object[key]; + }; + } + + module.exports = baseProperty; + + +/***/ }, +/* 13 */ +/***/ function(module, exports, __webpack_require__) { + + var isObject = __webpack_require__(14); + + /** `Object#toString` result references. */ + var funcTag = '[object Function]', + genTag = '[object GeneratorFunction]'; + + /** Used for built-in method references. */ + var objectProto = Object.prototype; + + /** + * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) + * of values. + */ + var objectToString = objectProto.toString; + + /** + * Checks if `value` is classified as a `Function` object. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. + * @example + * + * _.isFunction(_); + * // => true + * + * _.isFunction(/abc/); + * // => false + */ + function isFunction(value) { + // The use of `Object#toString` avoids issues with the `typeof` operator + // in Safari 8 which returns 'object' for typed array constructors, and + // PhantomJS 1.9 which returns 'function' for `NodeList` instances. + var tag = isObject(value) ? objectToString.call(value) : ''; + return tag == funcTag || tag == genTag; + } + + module.exports = isFunction; + + +/***/ }, +/* 14 */ +/***/ function(module, exports) { + + /** + * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`. + * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(_.noop); + * // => true + * + * _.isObject(null); + * // => false + */ + function isObject(value) { + var type = typeof value; + return !!value && (type == 'object' || type == 'function'); + } + + module.exports = isObject; + + +/***/ }, +/* 15 */ +/***/ function(module, exports) { + + /** Used as references for various `Number` constants. */ + var MAX_SAFE_INTEGER = 9007199254740991; + + /** + * Checks if `value` is a valid array-like length. + * + * **Note:** This function is loosely based on [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength). + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. + * @example + * + * _.isLength(3); + * // => true + * + * _.isLength(Number.MIN_VALUE); + * // => false + * + * _.isLength(Infinity); + * // => false + * + * _.isLength('3'); + * // => false + */ + function isLength(value) { + return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; + } + + module.exports = isLength; + + +/***/ }, +/* 16 */ +/***/ function(module, exports) { + + /** + * Checks if `value` is object-like. A value is object-like if it's not `null` + * and has a `typeof` result of "object". + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + * @example + * + * _.isObjectLike({}); + * // => true + * + * _.isObjectLike([1, 2, 3]); + * // => true + * + * _.isObjectLike(_.noop); + * // => false + * + * _.isObjectLike(null); + * // => false + */ + function isObjectLike(value) { + return !!value && typeof value == 'object'; + } + + module.exports = isObjectLike; + + +/***/ }, +/* 17 */ +/***/ function(module, exports) { + + /** + * Checks if `value` is classified as an `Array` object. + * + * @static + * @memberOf _ + * @type Function + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. + * @example + * + * _.isArray([1, 2, 3]); + * // => true + * + * _.isArray(document.body.children); + * // => false + * + * _.isArray('abc'); + * // => false + * + * _.isArray(_.noop); + * // => false + */ + var isArray = Array.isArray; + + module.exports = isArray; + + +/***/ }, +/* 18 */ +/***/ function(module, exports, __webpack_require__) { + + var isArray = __webpack_require__(17), + isObjectLike = __webpack_require__(16); + + /** `Object#toString` result references. */ + var stringTag = '[object String]'; + + /** Used for built-in method references. */ + var objectProto = Object.prototype; + + /** + * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) + * of values. + */ + var objectToString = objectProto.toString; + + /** + * Checks if `value` is classified as a `String` primitive or object. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. + * @example + * + * _.isString('abc'); + * // => true + * + * _.isString(1); + * // => false + */ + function isString(value) { + return typeof value == 'string' || + (!isArray(value) && isObjectLike(value) && objectToString.call(value) == stringTag); + } + + module.exports = isString; + + +/***/ }, +/* 19 */ +/***/ function(module, exports) { + + /** Used as references for various `Number` constants. */ + var MAX_SAFE_INTEGER = 9007199254740991; + + /** Used to detect unsigned integer values. */ + var reIsUint = /^(?:0|[1-9]\d*)$/; + + /** + * Checks if `value` is a valid array-like index. + * + * @private + * @param {*} value The value to check. + * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. + * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. + */ + function isIndex(value, length) { + value = (typeof value == 'number' || reIsUint.test(value)) ? +value : -1; + length = length == null ? MAX_SAFE_INTEGER : length; + return value > -1 && value % 1 == 0 && value < length; + } + + module.exports = isIndex; + + +/***/ }, +/* 20 */ +/***/ function(module, exports) { + + /** Used for built-in method references. */ + var objectProto = Object.prototype; + + /** + * Checks if `value` is likely a prototype object. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a prototype, else `false`. + */ + function isPrototype(value) { + var Ctor = value && value.constructor, + proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto; + + return value === proto; + } + + module.exports = isPrototype; + + +/***/ }, +/* 21 */ +/***/ function(module, exports, __webpack_require__) { + + var drop = __webpack_require__(22); + + /** + * Gets all but the first element of `array`. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to query. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.tail([1, 2, 3]); + * // => [2, 3] + */ + function tail(array) { + return drop(array, 1); + } + + module.exports = tail; + + +/***/ }, +/* 22 */ +/***/ function(module, exports, __webpack_require__) { + + var baseSlice = __webpack_require__(23), + toInteger = __webpack_require__(24); + + /** + * Creates a slice of `array` with `n` elements dropped from the beginning. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to query. + * @param {number} [n=1] The number of elements to drop. + * @param- {Object} [guard] Enables use as an iteratee for functions like `_.map`. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.drop([1, 2, 3]); + * // => [2, 3] + * + * _.drop([1, 2, 3], 2); + * // => [3] + * + * _.drop([1, 2, 3], 5); + * // => [] + * + * _.drop([1, 2, 3], 0); + * // => [1, 2, 3] + */ + function drop(array, n, guard) { + var length = array ? array.length : 0; + if (!length) { + return []; + } + n = (guard || n === undefined) ? 1 : toInteger(n); + return baseSlice(array, n < 0 ? 0 : n, length); + } + + module.exports = drop; + + +/***/ }, +/* 23 */ +/***/ function(module, exports) { + + /** + * The base implementation of `_.slice` without an iteratee call guard. + * + * @private + * @param {Array} array The array to slice. + * @param {number} [start=0] The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns the slice of `array`. + */ + function baseSlice(array, start, end) { + var index = -1, + length = array.length; + + if (start < 0) { + start = -start > length ? 0 : (length + start); + } + end = end > length ? length : end; + if (end < 0) { + end += length; + } + length = start > end ? 0 : ((end - start) >>> 0); + start >>>= 0; + + var result = Array(length); + while (++index < length) { + result[index] = array[index + start]; + } + return result; + } + + module.exports = baseSlice; + + +/***/ }, +/* 24 */ +/***/ function(module, exports, __webpack_require__) { + + var toNumber = __webpack_require__(25); + + /** Used as references for various `Number` constants. */ + var INFINITY = 1 / 0, + MAX_INTEGER = 1.7976931348623157e+308; + + /** + * Converts `value` to an integer. + * + * **Note:** This function is loosely based on [`ToInteger`](http://www.ecma-international.org/ecma-262/6.0/#sec-tointeger). + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to convert. + * @returns {number} Returns the converted integer. + * @example + * + * _.toInteger(3); + * // => 3 + * + * _.toInteger(Number.MIN_VALUE); + * // => 0 + * + * _.toInteger(Infinity); + * // => 1.7976931348623157e+308 + * + * _.toInteger('3'); + * // => 3 + */ + function toInteger(value) { + if (!value) { + return value === 0 ? value : 0; + } + value = toNumber(value); + if (value === INFINITY || value === -INFINITY) { + var sign = (value < 0 ? -1 : 1); + return sign * MAX_INTEGER; + } + var remainder = value % 1; + return value === value ? (remainder ? value - remainder : value) : 0; + } + + module.exports = toInteger; + + +/***/ }, +/* 25 */ +/***/ function(module, exports, __webpack_require__) { + + var isFunction = __webpack_require__(13), + isObject = __webpack_require__(14); + + /** Used as references for various `Number` constants. */ + var NAN = 0 / 0; + + /** Used to match leading and trailing whitespace. */ + var reTrim = /^\s+|\s+$/g; + + /** Used to detect bad signed hexadecimal string values. */ + var reIsBadHex = /^[-+]0x[0-9a-f]+$/i; + + /** Used to detect binary string values. */ + var reIsBinary = /^0b[01]+$/i; + + /** Used to detect octal string values. */ + var reIsOctal = /^0o[0-7]+$/i; + + /** Built-in method references without a dependency on `root`. */ + var freeParseInt = parseInt; + + /** + * Converts `value` to a number. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to process. + * @returns {number} Returns the number. + * @example + * + * _.toNumber(3); + * // => 3 + * + * _.toNumber(Number.MIN_VALUE); + * // => 5e-324 + * + * _.toNumber(Infinity); + * // => Infinity + * + * _.toNumber('3'); + * // => 3 + */ + function toNumber(value) { + if (isObject(value)) { + var other = isFunction(value.valueOf) ? value.valueOf() : value; + value = isObject(other) ? (other + '') : other; + } + if (typeof value != 'string') { + return value === 0 ? value : +value; + } + value = value.replace(reTrim, ''); + var isBinary = reIsBinary.test(value); + return (isBinary || reIsOctal.test(value)) + ? freeParseInt(value.slice(2), isBinary ? 2 : 8) + : (reIsBadHex.test(value) ? NAN : +value); + } + + module.exports = toNumber; + + +/***/ }, +/* 26 */ +/***/ function(module, exports, __webpack_require__) { + + var arrayMap = __webpack_require__(27), + baseIteratee = __webpack_require__(28), + baseMap = __webpack_require__(96), + isArray = __webpack_require__(17); + + /** + * Creates an array of values by running each element in `collection` through + * `iteratee`. The iteratee is invoked with three arguments: + * (value, index|key, collection). + * + * Many lodash methods are guarded to work as iteratees for methods like + * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`. + * + * The guarded methods are: + * `ary`, `curry`, `curryRight`, `drop`, `dropRight`, `every`, `fill`, + * `invert`, `parseInt`, `random`, `range`, `rangeRight`, `slice`, `some`, + * `sortBy`, `take`, `takeRight`, `template`, `trim`, `trimEnd`, `trimStart`, + * and `words` + * + * @static + * @memberOf _ + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function|Object|string} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new mapped array. + * @example + * + * function square(n) { + * return n * n; + * } + * + * _.map([4, 8], square); + * // => [16, 64] + * + * _.map({ 'a': 4, 'b': 8 }, square); + * // => [16, 64] (iteration order is not guaranteed) + * + * var users = [ + * { 'user': 'barney' }, + * { 'user': 'fred' } + * ]; + * + * // The `_.property` iteratee shorthand. + * _.map(users, 'user'); + * // => ['barney', 'fred'] + */ + function map(collection, iteratee) { + var func = isArray(collection) ? arrayMap : baseMap; + return func(collection, baseIteratee(iteratee, 3)); + } + + module.exports = map; + + +/***/ }, +/* 27 */ +/***/ function(module, exports) { + + /** + * A specialized version of `_.map` for arrays without support for iteratee + * shorthands. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the new mapped array. + */ + function arrayMap(array, iteratee) { + var index = -1, + length = array.length, + result = Array(length); + + while (++index < length) { + result[index] = iteratee(array[index], index, array); + } + return result; + } + + module.exports = arrayMap; + + +/***/ }, +/* 28 */ +/***/ function(module, exports, __webpack_require__) { + + var baseMatches = __webpack_require__(29), + baseMatchesProperty = __webpack_require__(80), + identity = __webpack_require__(93), + isArray = __webpack_require__(17), + property = __webpack_require__(94); + + /** + * The base implementation of `_.iteratee`. + * + * @private + * @param {*} [value=_.identity] The value to convert to an iteratee. + * @returns {Function} Returns the iteratee. + */ + function baseIteratee(value) { + var type = typeof value; + if (type == 'function') { + return value; + } + if (value == null) { + return identity; + } + if (type == 'object') { + return isArray(value) + ? baseMatchesProperty(value[0], value[1]) + : baseMatches(value); + } + return property(value); + } + + module.exports = baseIteratee; + + +/***/ }, +/* 29 */ +/***/ function(module, exports, __webpack_require__) { + + var baseIsMatch = __webpack_require__(30), + getMatchData = __webpack_require__(76); + + /** + * The base implementation of `_.matches` which doesn't clone `source`. + * + * @private + * @param {Object} source The object of property values to match. + * @returns {Function} Returns the new function. + */ + function baseMatches(source) { + var matchData = getMatchData(source); + if (matchData.length == 1 && matchData[0][2]) { + var key = matchData[0][0], + value = matchData[0][1]; + + return function(object) { + if (object == null) { + return false; + } + return object[key] === value && + (value !== undefined || (key in Object(object))); + }; + } + return function(object) { + return object === source || baseIsMatch(object, source, matchData); + }; + } + + module.exports = baseMatches; + + +/***/ }, +/* 30 */ +/***/ function(module, exports, __webpack_require__) { + + var Stack = __webpack_require__(31), + baseIsEqual = __webpack_require__(63); + + /** Used to compose bitmasks for comparison styles. */ + var UNORDERED_COMPARE_FLAG = 1, + PARTIAL_COMPARE_FLAG = 2; + + /** + * The base implementation of `_.isMatch` without support for iteratee shorthands. + * + * @private + * @param {Object} object The object to inspect. + * @param {Object} source The object of property values to match. + * @param {Array} matchData The property names, values, and compare flags to match. + * @param {Function} [customizer] The function to customize comparisons. + * @returns {boolean} Returns `true` if `object` is a match, else `false`. + */ + function baseIsMatch(object, source, matchData, customizer) { + var index = matchData.length, + length = index, + noCustomizer = !customizer; + + if (object == null) { + return !length; + } + object = Object(object); + while (index--) { + var data = matchData[index]; + if ((noCustomizer && data[2]) + ? data[1] !== object[data[0]] + : !(data[0] in object) + ) { + return false; + } + } + while (++index < length) { + data = matchData[index]; + var key = data[0], + objValue = object[key], + srcValue = data[1]; + + if (noCustomizer && data[2]) { + if (objValue === undefined && !(key in object)) { + return false; + } + } else { + var stack = new Stack, + result = customizer ? customizer(objValue, srcValue, key, object, source, stack) : undefined; + + if (!(result === undefined + ? baseIsEqual(srcValue, objValue, customizer, UNORDERED_COMPARE_FLAG | PARTIAL_COMPARE_FLAG, stack) + : result + )) { + return false; + } + } + } + return true; + } + + module.exports = baseIsMatch; + + +/***/ }, +/* 31 */ +/***/ function(module, exports, __webpack_require__) { + + var stackClear = __webpack_require__(32), + stackDelete = __webpack_require__(33), + stackGet = __webpack_require__(37), + stackHas = __webpack_require__(39), + stackSet = __webpack_require__(41); + + /** + * Creates a stack cache object to store key-value pairs. + * + * @private + * @param {Array} [values] The values to cache. + */ + function Stack(values) { + var index = -1, + length = values ? values.length : 0; + + this.clear(); + while (++index < length) { + var entry = values[index]; + this.set(entry[0], entry[1]); + } + } + + // Add functions to the `Stack` cache. + Stack.prototype.clear = stackClear; + Stack.prototype['delete'] = stackDelete; + Stack.prototype.get = stackGet; + Stack.prototype.has = stackHas; + Stack.prototype.set = stackSet; + + module.exports = Stack; + + +/***/ }, +/* 32 */ +/***/ function(module, exports) { + + /** + * Removes all key-value entries from the stack. + * + * @private + * @name clear + * @memberOf Stack + */ + function stackClear() { + this.__data__ = { 'array': [], 'map': null }; + } + + module.exports = stackClear; + + +/***/ }, +/* 33 */ +/***/ function(module, exports, __webpack_require__) { + + var assocDelete = __webpack_require__(34); + + /** + * Removes `key` and its value from the stack. + * + * @private + * @name delete + * @memberOf Stack + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ + function stackDelete(key) { + var data = this.__data__, + array = data.array; + + return array ? assocDelete(array, key) : data.map['delete'](key); + } + + module.exports = stackDelete; + + +/***/ }, +/* 34 */ +/***/ function(module, exports, __webpack_require__) { + + var assocIndexOf = __webpack_require__(35); + + /** Used for built-in method references. */ + var arrayProto = Array.prototype; + + /** Built-in value references. */ + var splice = arrayProto.splice; + + /** + * Removes `key` and its value from the associative array. + * + * @private + * @param {Array} array The array to query. + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ + function assocDelete(array, key) { + var index = assocIndexOf(array, key); + if (index < 0) { + return false; + } + var lastIndex = array.length - 1; + if (index == lastIndex) { + array.pop(); + } else { + splice.call(array, index, 1); + } + return true; + } + + module.exports = assocDelete; + + +/***/ }, +/* 35 */ +/***/ function(module, exports, __webpack_require__) { + + var eq = __webpack_require__(36); + + /** + * Gets the index at which the first occurrence of `key` is found in `array` + * of key-value pairs. + * + * @private + * @param {Array} array The array to search. + * @param {*} key The key to search for. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + function assocIndexOf(array, key) { + var length = array.length; + while (length--) { + if (eq(array[length][0], key)) { + return length; + } + } + return -1; + } + + module.exports = assocIndexOf; + + +/***/ }, +/* 36 */ +/***/ function(module, exports) { + + /** + * Performs a [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) + * comparison between two values to determine if they are equivalent. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * var object = { 'user': 'fred' }; + * var other = { 'user': 'fred' }; + * + * _.eq(object, object); + * // => true + * + * _.eq(object, other); + * // => false + * + * _.eq('a', 'a'); + * // => true + * + * _.eq('a', Object('a')); + * // => false + * + * _.eq(NaN, NaN); + * // => true + */ + function eq(value, other) { + return value === other || (value !== value && other !== other); + } + + module.exports = eq; + + +/***/ }, +/* 37 */ +/***/ function(module, exports, __webpack_require__) { + + var assocGet = __webpack_require__(38); + + /** + * Gets the stack value for `key`. + * + * @private + * @name get + * @memberOf Stack + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ + function stackGet(key) { + var data = this.__data__, + array = data.array; + + return array ? assocGet(array, key) : data.map.get(key); + } + + module.exports = stackGet; + + +/***/ }, +/* 38 */ +/***/ function(module, exports, __webpack_require__) { + + var assocIndexOf = __webpack_require__(35); + + /** + * Gets the associative array value for `key`. + * + * @private + * @param {Array} array The array to query. + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ + function assocGet(array, key) { + var index = assocIndexOf(array, key); + return index < 0 ? undefined : array[index][1]; + } + + module.exports = assocGet; + + +/***/ }, +/* 39 */ +/***/ function(module, exports, __webpack_require__) { + + var assocHas = __webpack_require__(40); + + /** + * Checks if a stack value for `key` exists. + * + * @private + * @name has + * @memberOf Stack + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + function stackHas(key) { + var data = this.__data__, + array = data.array; + + return array ? assocHas(array, key) : data.map.has(key); + } + + module.exports = stackHas; + + +/***/ }, +/* 40 */ +/***/ function(module, exports, __webpack_require__) { + + var assocIndexOf = __webpack_require__(35); + + /** + * Checks if an associative array value for `key` exists. + * + * @private + * @param {Array} array The array to query. + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + function assocHas(array, key) { + return assocIndexOf(array, key) > -1; + } + + module.exports = assocHas; + + +/***/ }, +/* 41 */ +/***/ function(module, exports, __webpack_require__) { + + var MapCache = __webpack_require__(42), + assocSet = __webpack_require__(61); + + /** Used as the size to enable large array optimizations. */ + var LARGE_ARRAY_SIZE = 200; + + /** + * Sets the stack `key` to `value`. + * + * @private + * @name set + * @memberOf Stack + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the stack cache object. + */ + function stackSet(key, value) { + var data = this.__data__, + array = data.array; + + if (array) { + if (array.length < (LARGE_ARRAY_SIZE - 1)) { + assocSet(array, key, value); + } else { + data.array = null; + data.map = new MapCache(array); + } + } + var map = data.map; + if (map) { + map.set(key, value); + } + return this; + } + + module.exports = stackSet; + + +/***/ }, +/* 42 */ +/***/ function(module, exports, __webpack_require__) { + + var mapClear = __webpack_require__(43), + mapDelete = __webpack_require__(53), + mapGet = __webpack_require__(57), + mapHas = __webpack_require__(59), + mapSet = __webpack_require__(60); + + /** + * Creates a map cache object to store key-value pairs. + * + * @private + * @param {Array} [values] The values to cache. + */ + function MapCache(values) { + var index = -1, + length = values ? values.length : 0; + + this.clear(); + while (++index < length) { + var entry = values[index]; + this.set(entry[0], entry[1]); + } + } + + // Add functions to the `MapCache`. + MapCache.prototype.clear = mapClear; + MapCache.prototype['delete'] = mapDelete; + MapCache.prototype.get = mapGet; + MapCache.prototype.has = mapHas; + MapCache.prototype.set = mapSet; + + module.exports = MapCache; + + +/***/ }, +/* 43 */ +/***/ function(module, exports, __webpack_require__) { + + var Hash = __webpack_require__(44), + Map = __webpack_require__(49); + + /** + * Removes all key-value entries from the map. + * + * @private + * @name clear + * @memberOf MapCache + */ + function mapClear() { + this.__data__ = { 'hash': new Hash, 'map': Map ? new Map : [], 'string': new Hash }; + } + + module.exports = mapClear; + + +/***/ }, +/* 44 */ +/***/ function(module, exports, __webpack_require__) { + + var nativeCreate = __webpack_require__(45); + + /** Used for built-in method references. */ + var objectProto = Object.prototype; + + /** + * Creates an hash object. + * + * @private + * @returns {Object} Returns the new hash object. + */ + function Hash() {} + + // Avoid inheriting from `Object.prototype` when possible. + Hash.prototype = nativeCreate ? nativeCreate(null) : objectProto; + + module.exports = Hash; + + +/***/ }, +/* 45 */ +/***/ function(module, exports, __webpack_require__) { + + var getNative = __webpack_require__(46); + + /* Built-in method references that are verified to be native. */ + var nativeCreate = getNative(Object, 'create'); + + module.exports = nativeCreate; + + +/***/ }, +/* 46 */ +/***/ function(module, exports, __webpack_require__) { + + var isNative = __webpack_require__(47); + + /** + * Gets the native function at `key` of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {string} key The key of the method to get. + * @returns {*} Returns the function if it's native, else `undefined`. + */ + function getNative(object, key) { + var value = object == null ? undefined : object[key]; + return isNative(value) ? value : undefined; + } + + module.exports = getNative; + + +/***/ }, +/* 47 */ +/***/ function(module, exports, __webpack_require__) { + + var isFunction = __webpack_require__(13), + isHostObject = __webpack_require__(48), + isObjectLike = __webpack_require__(16); + + /** Used to match `RegExp` [syntax characters](http://ecma-international.org/ecma-262/6.0/#sec-patterns). */ + var reRegExpChar = /[\\^$.*+?()[\]{}|]/g; + + /** Used to detect host constructors (Safari > 5). */ + var reIsHostCtor = /^\[object .+?Constructor\]$/; + + /** Used for built-in method references. */ + var objectProto = Object.prototype; + + /** Used to resolve the decompiled source of functions. */ + var funcToString = Function.prototype.toString; + + /** Used to check objects for own properties. */ + var hasOwnProperty = objectProto.hasOwnProperty; + + /** Used to detect if a method is native. */ + var reIsNative = RegExp('^' + + funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&') + .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' + ); + + /** + * Checks if `value` is a native function. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a native function, else `false`. + * @example + * + * _.isNative(Array.prototype.push); + * // => true + * + * _.isNative(_); + * // => false + */ + function isNative(value) { + if (value == null) { + return false; + } + if (isFunction(value)) { + return reIsNative.test(funcToString.call(value)); + } + return isObjectLike(value) && + (isHostObject(value) ? reIsNative : reIsHostCtor).test(value); + } + + module.exports = isNative; + + +/***/ }, +/* 48 */ +/***/ function(module, exports) { + + /** + * Checks if `value` is a host object in IE < 9. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a host object, else `false`. + */ + function isHostObject(value) { + // Many host objects are `Object` objects that can coerce to strings + // despite having improperly defined `toString` methods. + var result = false; + if (value != null && typeof value.toString != 'function') { + try { + result = !!(value + ''); + } catch (e) {} + } + return result; + } + + module.exports = isHostObject; + + +/***/ }, +/* 49 */ +/***/ function(module, exports, __webpack_require__) { + + var getNative = __webpack_require__(46), + root = __webpack_require__(50); + + /* Built-in method references that are verified to be native. */ + var Map = getNative(root, 'Map'); + + module.exports = Map; + + +/***/ }, +/* 50 */ +/***/ function(module, exports, __webpack_require__) { + + /* WEBPACK VAR INJECTION */(function(module, global) {var checkGlobal = __webpack_require__(52); + + /** Used to determine if values are of the language type `Object`. */ + var objectTypes = { + 'function': true, + 'object': true + }; + + /** Detect free variable `exports`. */ + var freeExports = (objectTypes[typeof exports] && exports && !exports.nodeType) ? exports : null; + + /** Detect free variable `module`. */ + var freeModule = (objectTypes[typeof module] && module && !module.nodeType) ? module : null; + + /** Detect free variable `global` from Node.js. */ + var freeGlobal = checkGlobal(freeExports && freeModule && typeof global == 'object' && global); + + /** Detect free variable `self`. */ + var freeSelf = checkGlobal(objectTypes[typeof self] && self); + + /** Detect free variable `window`. */ + var freeWindow = checkGlobal(objectTypes[typeof window] && window); + + /** Detect `this` as the global object. */ + var thisGlobal = checkGlobal(objectTypes[typeof this] && this); + + /** + * Used as a reference to the global object. + * + * The `this` value is used if it's the global object to avoid Greasemonkey's + * restricted `window` object, otherwise the `window` object is used. + */ + var root = freeGlobal || ((freeWindow !== (thisGlobal && thisGlobal.window)) && freeWindow) || freeSelf || thisGlobal || Function('return this')(); + + module.exports = root; + + /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(51)(module), (function() { return this; }()))) + +/***/ }, +/* 51 */ +/***/ function(module, exports) { + + module.exports = function(module) { + if(!module.webpackPolyfill) { + module.deprecate = function() {}; + module.paths = []; + // module.parent = undefined by default + module.children = []; + module.webpackPolyfill = 1; + } + return module; + } + + +/***/ }, +/* 52 */ +/***/ function(module, exports) { + + /** + * Checks if `value` is a global object. + * + * @private + * @param {*} value The value to check. + * @returns {null|Object} Returns `value` if it's a global object, else `null`. + */ + function checkGlobal(value) { + return (value && value.Object === Object) ? value : null; + } + + module.exports = checkGlobal; + + +/***/ }, +/* 53 */ +/***/ function(module, exports, __webpack_require__) { + + var Map = __webpack_require__(49), + assocDelete = __webpack_require__(34), + hashDelete = __webpack_require__(54), + isKeyable = __webpack_require__(56); + + /** + * Removes `key` and its value from the map. + * + * @private + * @name delete + * @memberOf MapCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ + function mapDelete(key) { + var data = this.__data__; + if (isKeyable(key)) { + return hashDelete(typeof key == 'string' ? data.string : data.hash, key); + } + return Map ? data.map['delete'](key) : assocDelete(data.map, key); + } + + module.exports = mapDelete; + + +/***/ }, +/* 54 */ +/***/ function(module, exports, __webpack_require__) { + + var hashHas = __webpack_require__(55); + + /** + * Removes `key` and its value from the hash. + * + * @private + * @param {Object} hash The hash to modify. + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ + function hashDelete(hash, key) { + return hashHas(hash, key) && delete hash[key]; + } + + module.exports = hashDelete; + + +/***/ }, +/* 55 */ +/***/ function(module, exports, __webpack_require__) { + + var nativeCreate = __webpack_require__(45); + + /** Used for built-in method references. */ + var objectProto = Object.prototype; + + /** Used to check objects for own properties. */ + var hasOwnProperty = objectProto.hasOwnProperty; + + /** + * Checks if a hash value for `key` exists. + * + * @private + * @param {Object} hash The hash to query. + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + function hashHas(hash, key) { + return nativeCreate ? hash[key] !== undefined : hasOwnProperty.call(hash, key); + } + + module.exports = hashHas; + + +/***/ }, +/* 56 */ +/***/ function(module, exports) { + + /** + * Checks if `value` is suitable for use as unique object key. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is suitable, else `false`. + */ + function isKeyable(value) { + var type = typeof value; + return type == 'number' || type == 'boolean' || + (type == 'string' && value !== '__proto__') || value == null; + } + + module.exports = isKeyable; + + +/***/ }, +/* 57 */ +/***/ function(module, exports, __webpack_require__) { + + var Map = __webpack_require__(49), + assocGet = __webpack_require__(38), + hashGet = __webpack_require__(58), + isKeyable = __webpack_require__(56); + + /** + * Gets the map value for `key`. + * + * @private + * @name get + * @memberOf MapCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ + function mapGet(key) { + var data = this.__data__; + if (isKeyable(key)) { + return hashGet(typeof key == 'string' ? data.string : data.hash, key); + } + return Map ? data.map.get(key) : assocGet(data.map, key); + } + + module.exports = mapGet; + + +/***/ }, +/* 58 */ +/***/ function(module, exports, __webpack_require__) { + + var nativeCreate = __webpack_require__(45); + + /** Used to stand-in for `undefined` hash values. */ + var HASH_UNDEFINED = '__lodash_hash_undefined__'; + + /** Used for built-in method references. */ + var objectProto = Object.prototype; + + /** Used to check objects for own properties. */ + var hasOwnProperty = objectProto.hasOwnProperty; + + /** + * Gets the hash value for `key`. + * + * @private + * @param {Object} hash The hash to query. + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ + function hashGet(hash, key) { + if (nativeCreate) { + var result = hash[key]; + return result === HASH_UNDEFINED ? undefined : result; + } + return hasOwnProperty.call(hash, key) ? hash[key] : undefined; + } + + module.exports = hashGet; + + +/***/ }, +/* 59 */ +/***/ function(module, exports, __webpack_require__) { + + var Map = __webpack_require__(49), + assocHas = __webpack_require__(40), + hashHas = __webpack_require__(55), + isKeyable = __webpack_require__(56); + + /** + * Checks if a map value for `key` exists. + * + * @private + * @name has + * @memberOf MapCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + function mapHas(key) { + var data = this.__data__; + if (isKeyable(key)) { + return hashHas(typeof key == 'string' ? data.string : data.hash, key); + } + return Map ? data.map.has(key) : assocHas(data.map, key); + } + + module.exports = mapHas; + + +/***/ }, +/* 60 */ +/***/ function(module, exports, __webpack_require__) { + + var Map = __webpack_require__(49), + assocSet = __webpack_require__(61), + hashSet = __webpack_require__(62), + isKeyable = __webpack_require__(56); + + /** + * Sets the map `key` to `value`. + * + * @private + * @name set + * @memberOf MapCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the map cache object. + */ + function mapSet(key, value) { + var data = this.__data__; + if (isKeyable(key)) { + hashSet(typeof key == 'string' ? data.string : data.hash, key, value); + } else if (Map) { + data.map.set(key, value); + } else { + assocSet(data.map, key, value); + } + return this; + } + + module.exports = mapSet; + + +/***/ }, +/* 61 */ +/***/ function(module, exports, __webpack_require__) { + + var assocIndexOf = __webpack_require__(35); + + /** + * Sets the associative array `key` to `value`. + * + * @private + * @param {Array} array The array to modify. + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + */ + function assocSet(array, key, value) { + var index = assocIndexOf(array, key); + if (index < 0) { + array.push([key, value]); + } else { + array[index][1] = value; + } + } + + module.exports = assocSet; + + +/***/ }, +/* 62 */ +/***/ function(module, exports, __webpack_require__) { + + var nativeCreate = __webpack_require__(45); + + /** Used to stand-in for `undefined` hash values. */ + var HASH_UNDEFINED = '__lodash_hash_undefined__'; + + /** + * Sets the hash `key` to `value`. + * + * @private + * @param {Object} hash The hash to modify. + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + */ + function hashSet(hash, key, value) { + hash[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value; + } + + module.exports = hashSet; + + +/***/ }, +/* 63 */ +/***/ function(module, exports, __webpack_require__) { + + var baseIsEqualDeep = __webpack_require__(64), + isObject = __webpack_require__(14), + isObjectLike = __webpack_require__(16); + + /** + * The base implementation of `_.isEqual` which supports partial comparisons + * and tracks traversed objects. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @param {Function} [customizer] The function to customize comparisons. + * @param {boolean} [bitmask] The bitmask of comparison flags. + * The bitmask may be composed of the following flags: + * 1 - Unordered comparison + * 2 - Partial comparison + * @param {Object} [stack] Tracks traversed `value` and `other` objects. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + */ + function baseIsEqual(value, other, customizer, bitmask, stack) { + if (value === other) { + return true; + } + if (value == null || other == null || (!isObject(value) && !isObjectLike(other))) { + return value !== value && other !== other; + } + return baseIsEqualDeep(value, other, baseIsEqual, customizer, bitmask, stack); + } + + module.exports = baseIsEqual; + + +/***/ }, +/* 64 */ +/***/ function(module, exports, __webpack_require__) { + + var Stack = __webpack_require__(31), + equalArrays = __webpack_require__(65), + equalByTag = __webpack_require__(67), + equalObjects = __webpack_require__(72), + getTag = __webpack_require__(73), + isArray = __webpack_require__(17), + isHostObject = __webpack_require__(48), + isTypedArray = __webpack_require__(75); + + /** Used to compose bitmasks for comparison styles. */ + var PARTIAL_COMPARE_FLAG = 2; + + /** `Object#toString` result references. */ + var argsTag = '[object Arguments]', + arrayTag = '[object Array]', + objectTag = '[object Object]'; + + /** Used for built-in method references. */ + var objectProto = Object.prototype; + + /** Used to check objects for own properties. */ + var hasOwnProperty = objectProto.hasOwnProperty; + + /** + * A specialized version of `baseIsEqual` for arrays and objects which performs + * deep comparisons and tracks traversed objects enabling objects with circular + * references to be compared. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Function} [customizer] The function to customize comparisons. + * @param {number} [bitmask] The bitmask of comparison flags. See `baseIsEqual` for more details. + * @param {Object} [stack] Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ + function baseIsEqualDeep(object, other, equalFunc, customizer, bitmask, stack) { + var objIsArr = isArray(object), + othIsArr = isArray(other), + objTag = arrayTag, + othTag = arrayTag; + + if (!objIsArr) { + objTag = getTag(object); + if (objTag == argsTag) { + objTag = objectTag; + } else if (objTag != objectTag) { + objIsArr = isTypedArray(object); + } + } + if (!othIsArr) { + othTag = getTag(other); + if (othTag == argsTag) { + othTag = objectTag; + } else if (othTag != objectTag) { + othIsArr = isTypedArray(other); + } + } + var objIsObj = objTag == objectTag && !isHostObject(object), + othIsObj = othTag == objectTag && !isHostObject(other), + isSameTag = objTag == othTag; + + if (isSameTag && !(objIsArr || objIsObj)) { + return equalByTag(object, other, objTag, equalFunc, customizer, bitmask); + } + var isPartial = bitmask & PARTIAL_COMPARE_FLAG; + if (!isPartial) { + var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'), + othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__'); + + if (objIsWrapped || othIsWrapped) { + return equalFunc(objIsWrapped ? object.value() : object, othIsWrapped ? other.value() : other, customizer, bitmask, stack); + } + } + if (!isSameTag) { + return false; + } + stack || (stack = new Stack); + return (objIsArr ? equalArrays : equalObjects)(object, other, equalFunc, customizer, bitmask, stack); + } + + module.exports = baseIsEqualDeep; + + +/***/ }, +/* 65 */ +/***/ function(module, exports, __webpack_require__) { + + var arraySome = __webpack_require__(66); + + /** Used to compose bitmasks for comparison styles. */ + var UNORDERED_COMPARE_FLAG = 1, + PARTIAL_COMPARE_FLAG = 2; + + /** + * A specialized version of `baseIsEqualDeep` for arrays with support for + * partial deep comparisons. + * + * @private + * @param {Array} array The array to compare. + * @param {Array} other The other array to compare. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Function} [customizer] The function to customize comparisons. + * @param {number} [bitmask] The bitmask of comparison flags. See `baseIsEqual` for more details. + * @param {Object} [stack] Tracks traversed `array` and `other` objects. + * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`. + */ + function equalArrays(array, other, equalFunc, customizer, bitmask, stack) { + var index = -1, + isPartial = bitmask & PARTIAL_COMPARE_FLAG, + isUnordered = bitmask & UNORDERED_COMPARE_FLAG, + arrLength = array.length, + othLength = other.length; + + if (arrLength != othLength && !(isPartial && othLength > arrLength)) { + return false; + } + // Assume cyclic values are equal. + var stacked = stack.get(array); + if (stacked) { + return stacked == other; + } + var result = true; + stack.set(array, other); + + // Ignore non-index properties. + while (++index < arrLength) { + var arrValue = array[index], + othValue = other[index]; + + if (customizer) { + var compared = isPartial + ? customizer(othValue, arrValue, index, other, array, stack) + : customizer(arrValue, othValue, index, array, other, stack); + } + if (compared !== undefined) { + if (compared) { + continue; + } + result = false; + break; + } + // Recursively compare arrays (susceptible to call stack limits). + if (isUnordered) { + if (!arraySome(other, function(othValue) { + return arrValue === othValue || equalFunc(arrValue, othValue, customizer, bitmask, stack); + })) { + result = false; + break; + } + } else if (!(arrValue === othValue || equalFunc(arrValue, othValue, customizer, bitmask, stack))) { + result = false; + break; + } + } + stack['delete'](array); + return result; + } + + module.exports = equalArrays; + + +/***/ }, +/* 66 */ +/***/ function(module, exports) { + + /** + * A specialized version of `_.some` for arrays without support for iteratee + * shorthands. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if any element passes the predicate check, else `false`. + */ + function arraySome(array, predicate) { + var index = -1, + length = array.length; + + while (++index < length) { + if (predicate(array[index], index, array)) { + return true; + } + } + return false; + } + + module.exports = arraySome; + + +/***/ }, +/* 67 */ +/***/ function(module, exports, __webpack_require__) { + + var Symbol = __webpack_require__(68), + Uint8Array = __webpack_require__(69), + mapToArray = __webpack_require__(70), + setToArray = __webpack_require__(71); + + /** Used to compose bitmasks for comparison styles. */ + var UNORDERED_COMPARE_FLAG = 1, + PARTIAL_COMPARE_FLAG = 2; + + /** `Object#toString` result references. */ + var boolTag = '[object Boolean]', + dateTag = '[object Date]', + errorTag = '[object Error]', + mapTag = '[object Map]', + numberTag = '[object Number]', + regexpTag = '[object RegExp]', + setTag = '[object Set]', + stringTag = '[object String]', + symbolTag = '[object Symbol]'; + + var arrayBufferTag = '[object ArrayBuffer]'; + + /** Used to convert symbols to primitives and strings. */ + var symbolProto = Symbol ? Symbol.prototype : undefined, + symbolValueOf = Symbol ? symbolProto.valueOf : undefined; + + /** + * A specialized version of `baseIsEqualDeep` for comparing objects of + * the same `toStringTag`. + * + * **Note:** This function only supports comparing values with tags of + * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {string} tag The `toStringTag` of the objects to compare. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Function} [customizer] The function to customize comparisons. + * @param {number} [bitmask] The bitmask of comparison flags. See `baseIsEqual` for more details. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ + function equalByTag(object, other, tag, equalFunc, customizer, bitmask) { + switch (tag) { + case arrayBufferTag: + if ((object.byteLength != other.byteLength) || + !equalFunc(new Uint8Array(object), new Uint8Array(other))) { + return false; + } + return true; + + case boolTag: + case dateTag: + // Coerce dates and booleans to numbers, dates to milliseconds and booleans + // to `1` or `0` treating invalid dates coerced to `NaN` as not equal. + return +object == +other; + + case errorTag: + return object.name == other.name && object.message == other.message; + + case numberTag: + // Treat `NaN` vs. `NaN` as equal. + return (object != +object) ? other != +other : object == +other; + + case regexpTag: + case stringTag: + // Coerce regexes to strings and treat strings primitives and string + // objects as equal. See https://es5.github.io/#x15.10.6.4 for more details. + return object == (other + ''); + + case mapTag: + var convert = mapToArray; + + case setTag: + var isPartial = bitmask & PARTIAL_COMPARE_FLAG; + convert || (convert = setToArray); + + // Recursively compare objects (susceptible to call stack limits). + return (isPartial || object.size == other.size) && + equalFunc(convert(object), convert(other), customizer, bitmask | UNORDERED_COMPARE_FLAG); + + case symbolTag: + return !!Symbol && (symbolValueOf.call(object) == symbolValueOf.call(other)); + } + return false; + } + + module.exports = equalByTag; + + +/***/ }, +/* 68 */ +/***/ function(module, exports, __webpack_require__) { + + var root = __webpack_require__(50); + + /** Built-in value references. */ + var Symbol = root.Symbol; + + module.exports = Symbol; + + +/***/ }, +/* 69 */ +/***/ function(module, exports, __webpack_require__) { + + var root = __webpack_require__(50); + + /** Built-in value references. */ + var Uint8Array = root.Uint8Array; + + module.exports = Uint8Array; + + +/***/ }, +/* 70 */ +/***/ function(module, exports) { + + /** + * Converts `map` to an array. + * + * @private + * @param {Object} map The map to convert. + * @returns {Array} Returns the converted array. + */ + function mapToArray(map) { + var index = -1, + result = Array(map.size); + + map.forEach(function(value, key) { + result[++index] = [key, value]; + }); + return result; + } + + module.exports = mapToArray; + + +/***/ }, +/* 71 */ +/***/ function(module, exports) { + + /** + * Converts `set` to an array. + * + * @private + * @param {Object} set The set to convert. + * @returns {Array} Returns the converted array. + */ + function setToArray(set) { + var index = -1, + result = Array(set.size); + + set.forEach(function(value) { + result[++index] = value; + }); + return result; + } + + module.exports = setToArray; + + +/***/ }, +/* 72 */ +/***/ function(module, exports, __webpack_require__) { + + var baseHas = __webpack_require__(4), + keys = __webpack_require__(3); + + /** Used to compose bitmasks for comparison styles. */ + var PARTIAL_COMPARE_FLAG = 2; + + /** + * A specialized version of `baseIsEqualDeep` for objects with support for + * partial deep comparisons. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Function} [customizer] The function to customize comparisons. + * @param {number} [bitmask] The bitmask of comparison flags. See `baseIsEqual` for more details. + * @param {Object} [stack] Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ + function equalObjects(object, other, equalFunc, customizer, bitmask, stack) { + var isPartial = bitmask & PARTIAL_COMPARE_FLAG, + objProps = keys(object), + objLength = objProps.length, + othProps = keys(other), + othLength = othProps.length; + + if (objLength != othLength && !isPartial) { + return false; + } + var index = objLength; + while (index--) { + var key = objProps[index]; + if (!(isPartial ? key in other : baseHas(other, key))) { + return false; + } + } + // Assume cyclic values are equal. + var stacked = stack.get(object); + if (stacked) { + return stacked == other; + } + var result = true; + stack.set(object, other); + + var skipCtor = isPartial; + while (++index < objLength) { + key = objProps[index]; + var objValue = object[key], + othValue = other[key]; + + if (customizer) { + var compared = isPartial + ? customizer(othValue, objValue, key, other, object, stack) + : customizer(objValue, othValue, key, object, other, stack); + } + // Recursively compare objects (susceptible to call stack limits). + if (!(compared === undefined + ? (objValue === othValue || equalFunc(objValue, othValue, customizer, bitmask, stack)) + : compared + )) { + result = false; + break; + } + skipCtor || (skipCtor = key == 'constructor'); + } + if (result && !skipCtor) { + var objCtor = object.constructor, + othCtor = other.constructor; + + // Non `Object` object instances with different constructors are not equal. + if (objCtor != othCtor && + ('constructor' in object && 'constructor' in other) && + !(typeof objCtor == 'function' && objCtor instanceof objCtor && + typeof othCtor == 'function' && othCtor instanceof othCtor)) { + result = false; + } + } + stack['delete'](object); + return result; + } + + module.exports = equalObjects; + + +/***/ }, +/* 73 */ +/***/ function(module, exports, __webpack_require__) { + + var Map = __webpack_require__(49), + Set = __webpack_require__(74); + + /** `Object#toString` result references. */ + var mapTag = '[object Map]', + objectTag = '[object Object]', + setTag = '[object Set]'; + + /** Used for built-in method references. */ + var objectProto = Object.prototype; + + /** Used to resolve the decompiled source of functions. */ + var funcToString = Function.prototype.toString; + + /** + * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) + * of values. + */ + var objectToString = objectProto.toString; + + /** Used to detect maps and sets. */ + var mapCtorString = Map ? funcToString.call(Map) : '', + setCtorString = Set ? funcToString.call(Set) : ''; + + /** + * Gets the `toStringTag` of `value`. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the `toStringTag`. + */ + function getTag(value) { + return objectToString.call(value); + } + + // Fallback for IE 11 providing `toStringTag` values for maps and sets. + if ((Map && getTag(new Map) != mapTag) || (Set && getTag(new Set) != setTag)) { + getTag = function(value) { + var result = objectToString.call(value), + Ctor = result == objectTag ? value.constructor : null, + ctorString = typeof Ctor == 'function' ? funcToString.call(Ctor) : ''; + + if (ctorString) { + if (ctorString == mapCtorString) { + return mapTag; + } + if (ctorString == setCtorString) { + return setTag; + } + } + return result; + }; + } + + module.exports = getTag; + + +/***/ }, +/* 74 */ +/***/ function(module, exports, __webpack_require__) { + + var getNative = __webpack_require__(46), + root = __webpack_require__(50); + + /* Built-in method references that are verified to be native. */ + var Set = getNative(root, 'Set'); + + module.exports = Set; + + +/***/ }, +/* 75 */ +/***/ function(module, exports, __webpack_require__) { + + var isLength = __webpack_require__(15), + isObjectLike = __webpack_require__(16); + + /** `Object#toString` result references. */ + var argsTag = '[object Arguments]', + arrayTag = '[object Array]', + boolTag = '[object Boolean]', + dateTag = '[object Date]', + errorTag = '[object Error]', + funcTag = '[object Function]', + mapTag = '[object Map]', + numberTag = '[object Number]', + objectTag = '[object Object]', + regexpTag = '[object RegExp]', + setTag = '[object Set]', + stringTag = '[object String]', + weakMapTag = '[object WeakMap]'; + + var arrayBufferTag = '[object ArrayBuffer]', + float32Tag = '[object Float32Array]', + float64Tag = '[object Float64Array]', + int8Tag = '[object Int8Array]', + int16Tag = '[object Int16Array]', + int32Tag = '[object Int32Array]', + uint8Tag = '[object Uint8Array]', + uint8ClampedTag = '[object Uint8ClampedArray]', + uint16Tag = '[object Uint16Array]', + uint32Tag = '[object Uint32Array]'; + + /** Used to identify `toStringTag` values of typed arrays. */ + var typedArrayTags = {}; + typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = + typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = + typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = + typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = + typedArrayTags[uint32Tag] = true; + typedArrayTags[argsTag] = typedArrayTags[arrayTag] = + typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = + typedArrayTags[dateTag] = typedArrayTags[errorTag] = + typedArrayTags[funcTag] = typedArrayTags[mapTag] = + typedArrayTags[numberTag] = typedArrayTags[objectTag] = + typedArrayTags[regexpTag] = typedArrayTags[setTag] = + typedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false; + + /** Used for built-in method references. */ + var objectProto = Object.prototype; + + /** + * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) + * of values. + */ + var objectToString = objectProto.toString; + + /** + * Checks if `value` is classified as a typed array. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. + * @example + * + * _.isTypedArray(new Uint8Array); + * // => true + * + * _.isTypedArray([]); + * // => false + */ + function isTypedArray(value) { + return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[objectToString.call(value)]; + } + + module.exports = isTypedArray; + + +/***/ }, +/* 76 */ +/***/ function(module, exports, __webpack_require__) { + + var isStrictComparable = __webpack_require__(77), + toPairs = __webpack_require__(78); + + /** + * Gets the property names, values, and compare flags of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the match data of `object`. + */ + function getMatchData(object) { + var result = toPairs(object), + length = result.length; + + while (length--) { + result[length][2] = isStrictComparable(result[length][1]); + } + return result; + } + + module.exports = getMatchData; + + +/***/ }, +/* 77 */ +/***/ function(module, exports, __webpack_require__) { + + var isObject = __webpack_require__(14); + + /** + * Checks if `value` is suitable for strict equality comparisons, i.e. `===`. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` if suitable for strict + * equality comparisons, else `false`. + */ + function isStrictComparable(value) { + return value === value && !isObject(value); + } + + module.exports = isStrictComparable; + + +/***/ }, +/* 78 */ +/***/ function(module, exports, __webpack_require__) { + + var baseToPairs = __webpack_require__(79), + keys = __webpack_require__(3); + + /** + * Creates an array of own enumerable key-value pairs for `object`. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the new array of key-value pairs. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.toPairs(new Foo); + * // => [['a', 1], ['b', 2]] (iteration order is not guaranteed) + */ + function toPairs(object) { + return baseToPairs(object, keys(object)); + } + + module.exports = toPairs; + + +/***/ }, +/* 79 */ +/***/ function(module, exports, __webpack_require__) { + + var arrayMap = __webpack_require__(27); + + /** + * The base implementation of `_.toPairs` and `_.toPairsIn` which creates an array + * of key-value pairs for `object` corresponding to the property names of `props`. + * + * @private + * @param {Object} object The object to query. + * @param {Array} props The property names to get values for. + * @returns {Object} Returns the new array of key-value pairs. + */ + function baseToPairs(object, props) { + return arrayMap(props, function(key) { + return [key, object[key]]; + }); + } + + module.exports = baseToPairs; + + +/***/ }, +/* 80 */ +/***/ function(module, exports, __webpack_require__) { + + var baseIsEqual = __webpack_require__(63), + get = __webpack_require__(81), + hasIn = __webpack_require__(88); + + /** Used to compose bitmasks for comparison styles. */ + var UNORDERED_COMPARE_FLAG = 1, + PARTIAL_COMPARE_FLAG = 2; + + /** + * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`. + * + * @private + * @param {string} path The path of the property to get. + * @param {*} srcValue The value to match. + * @returns {Function} Returns the new function. + */ + function baseMatchesProperty(path, srcValue) { + return function(object) { + var objValue = get(object, path); + return (objValue === undefined && objValue === srcValue) + ? hasIn(object, path) + : baseIsEqual(srcValue, objValue, undefined, UNORDERED_COMPARE_FLAG | PARTIAL_COMPARE_FLAG); + }; + } + + module.exports = baseMatchesProperty; + + +/***/ }, +/* 81 */ +/***/ function(module, exports, __webpack_require__) { + + var baseGet = __webpack_require__(82); + + /** + * Gets the value at `path` of `object`. If the resolved value is + * `undefined` the `defaultValue` is used in its place. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path of the property to get. + * @param {*} [defaultValue] The value returned if the resolved value is `undefined`. + * @returns {*} Returns the resolved value. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 3 } }] }; + * + * _.get(object, 'a[0].b.c'); + * // => 3 + * + * _.get(object, ['a', '0', 'b', 'c']); + * // => 3 + * + * _.get(object, 'a.b.c', 'default'); + * // => 'default' + */ + function get(object, path, defaultValue) { + var result = object == null ? undefined : baseGet(object, path); + return result === undefined ? defaultValue : result; + } + + module.exports = get; + + +/***/ }, +/* 82 */ +/***/ function(module, exports, __webpack_require__) { + + var baseToPath = __webpack_require__(83), + isKey = __webpack_require__(87); + + /** + * The base implementation of `_.get` without support for default values. + * + * @private + * @param {Object} object The object to query. + * @param {Array|string} path The path of the property to get. + * @returns {*} Returns the resolved value. + */ + function baseGet(object, path) { + path = isKey(path, object) ? [path + ''] : baseToPath(path); + + var index = 0, + length = path.length; + + while (object != null && index < length) { + object = object[path[index++]]; + } + return (index && index == length) ? object : undefined; + } + + module.exports = baseGet; + + +/***/ }, +/* 83 */ +/***/ function(module, exports, __webpack_require__) { + + var isArray = __webpack_require__(17), + stringToPath = __webpack_require__(84); + + /** + * The base implementation of `_.toPath` which only converts `value` to a + * path if it's not one. + * + * @private + * @param {*} value The value to process. + * @returns {Array} Returns the property path array. + */ + function baseToPath(value) { + return isArray(value) ? value : stringToPath(value); + } + + module.exports = baseToPath; + + +/***/ }, +/* 84 */ +/***/ function(module, exports, __webpack_require__) { + + var toString = __webpack_require__(85); + + /** Used to match property names within property paths. */ + var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]/g; + + /** Used to match backslashes in property paths. */ + var reEscapeChar = /\\(\\)?/g; + + /** + * Converts `string` to a property path array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the property path array. + */ + function stringToPath(string) { + var result = []; + toString(string).replace(rePropName, function(match, number, quote, string) { + result.push(quote ? string.replace(reEscapeChar, '$1') : (number || match)); + }); + return result; + } + + module.exports = stringToPath; + + +/***/ }, +/* 85 */ +/***/ function(module, exports, __webpack_require__) { + + var Symbol = __webpack_require__(68), + isSymbol = __webpack_require__(86); + + /** Used as references for various `Number` constants. */ + var INFINITY = 1 / 0; + + /** Used to convert symbols to primitives and strings. */ + var symbolProto = Symbol ? Symbol.prototype : undefined, + symbolToString = Symbol ? symbolProto.toString : undefined; + + /** + * Converts `value` to a string if it's not one. An empty string is returned + * for `null` and `undefined` values. The sign of `-0` is preserved. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to process. + * @returns {string} Returns the string. + * @example + * + * _.toString(null); + * // => '' + * + * _.toString(-0); + * // => '-0' + * + * _.toString([1, 2, 3]); + * // => '1,2,3' + */ + function toString(value) { + // Exit early for strings to avoid a performance hit in some environments. + if (typeof value == 'string') { + return value; + } + if (value == null) { + return ''; + } + if (isSymbol(value)) { + return Symbol ? symbolToString.call(value) : ''; + } + var result = (value + ''); + return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; + } + + module.exports = toString; + + +/***/ }, +/* 86 */ +/***/ function(module, exports, __webpack_require__) { + + var isObjectLike = __webpack_require__(16); + + /** `Object#toString` result references. */ + var symbolTag = '[object Symbol]'; + + /** Used for built-in method references. */ + var objectProto = Object.prototype; + + /** + * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) + * of values. + */ + var objectToString = objectProto.toString; + + /** + * Checks if `value` is classified as a `Symbol` primitive or object. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. + * @example + * + * _.isSymbol(Symbol.iterator); + * // => true + * + * _.isSymbol('abc'); + * // => false + */ + function isSymbol(value) { + return typeof value == 'symbol' || + (isObjectLike(value) && objectToString.call(value) == symbolTag); + } + + module.exports = isSymbol; + + +/***/ }, +/* 87 */ +/***/ function(module, exports, __webpack_require__) { + + var isArray = __webpack_require__(17); + + /** Used to match property names within property paths. */ + var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, + reIsPlainProp = /^\w*$/; + + /** + * Checks if `value` is a property name and not a property path. + * + * @private + * @param {*} value The value to check. + * @param {Object} [object] The object to query keys on. + * @returns {boolean} Returns `true` if `value` is a property name, else `false`. + */ + function isKey(value, object) { + if (typeof value == 'number') { + return true; + } + return !isArray(value) && + (reIsPlainProp.test(value) || !reIsDeepProp.test(value) || + (object != null && value in Object(object))); + } + + module.exports = isKey; + + +/***/ }, +/* 88 */ +/***/ function(module, exports, __webpack_require__) { + + var baseHasIn = __webpack_require__(89), + hasPath = __webpack_require__(90); + + /** + * Checks if `path` is a direct or inherited property of `object`. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path to check. + * @returns {boolean} Returns `true` if `path` exists, else `false`. + * @example + * + * var object = _.create({ 'a': _.create({ 'b': _.create({ 'c': 3 }) }) }); + * + * _.hasIn(object, 'a'); + * // => true + * + * _.hasIn(object, 'a.b.c'); + * // => true + * + * _.hasIn(object, ['a', 'b', 'c']); + * // => true + * + * _.hasIn(object, 'b'); + * // => false + */ + function hasIn(object, path) { + return hasPath(object, path, baseHasIn); + } + + module.exports = hasIn; + + +/***/ }, +/* 89 */ +/***/ function(module, exports) { + + /** + * The base implementation of `_.hasIn` without support for deep paths. + * + * @private + * @param {Object} object The object to query. + * @param {Array|string} key The key to check. + * @returns {boolean} Returns `true` if `key` exists, else `false`. + */ + function baseHasIn(object, key) { + return key in Object(object); + } + + module.exports = baseHasIn; + + +/***/ }, +/* 90 */ +/***/ function(module, exports, __webpack_require__) { + + var baseToPath = __webpack_require__(83), + isArguments = __webpack_require__(8), + isArray = __webpack_require__(17), + isIndex = __webpack_require__(19), + isKey = __webpack_require__(87), + isLength = __webpack_require__(15), + isString = __webpack_require__(18), + last = __webpack_require__(91), + parent = __webpack_require__(92); + + /** + * Checks if `path` exists on `object`. + * + * @private + * @param {Object} object The object to query. + * @param {Array|string} path The path to check. + * @param {Function} hasFunc The function to check properties. + * @returns {boolean} Returns `true` if `path` exists, else `false`. + */ + function hasPath(object, path, hasFunc) { + if (object == null) { + return false; + } + var result = hasFunc(object, path); + if (!result && !isKey(path)) { + path = baseToPath(path); + object = parent(object, path); + if (object != null) { + path = last(path); + result = hasFunc(object, path); + } + } + var length = object ? object.length : undefined; + return result || ( + !!length && isLength(length) && isIndex(path, length) && + (isArray(object) || isString(object) || isArguments(object)) + ); + } + + module.exports = hasPath; + + +/***/ }, +/* 91 */ +/***/ function(module, exports) { + + /** + * Gets the last element of `array`. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to query. + * @returns {*} Returns the last element of `array`. + * @example + * + * _.last([1, 2, 3]); + * // => 3 + */ + function last(array) { + var length = array ? array.length : 0; + return length ? array[length - 1] : undefined; + } + + module.exports = last; + + +/***/ }, +/* 92 */ +/***/ function(module, exports, __webpack_require__) { + + var baseSlice = __webpack_require__(23), + get = __webpack_require__(81); + + /** + * Gets the parent value at `path` of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {Array} path The path to get the parent value of. + * @returns {*} Returns the parent value. + */ + function parent(object, path) { + return path.length == 1 ? object : get(object, baseSlice(path, 0, -1)); + } + + module.exports = parent; + + +/***/ }, +/* 93 */ +/***/ function(module, exports) { + + /** + * This method returns the first argument provided to it. + * + * @static + * @memberOf _ + * @category Util + * @param {*} value Any value. + * @returns {*} Returns `value`. + * @example + * + * var object = { 'user': 'fred' }; + * + * _.identity(object) === object; + * // => true + */ + function identity(value) { + return value; + } + + module.exports = identity; + + +/***/ }, +/* 94 */ +/***/ function(module, exports, __webpack_require__) { + + var baseProperty = __webpack_require__(12), + basePropertyDeep = __webpack_require__(95), + isKey = __webpack_require__(87); + + /** + * Creates a function that returns the value at `path` of a given object. + * + * @static + * @memberOf _ + * @category Util + * @param {Array|string} path The path of the property to get. + * @returns {Function} Returns the new function. + * @example + * + * var objects = [ + * { 'a': { 'b': { 'c': 2 } } }, + * { 'a': { 'b': { 'c': 1 } } } + * ]; + * + * _.map(objects, _.property('a.b.c')); + * // => [2, 1] + * + * _.map(_.sortBy(objects, _.property(['a', 'b', 'c'])), 'a.b.c'); + * // => [1, 2] + */ + function property(path) { + return isKey(path) ? baseProperty(path) : basePropertyDeep(path); + } + + module.exports = property; + + +/***/ }, +/* 95 */ +/***/ function(module, exports, __webpack_require__) { + + var baseGet = __webpack_require__(82); + + /** + * A specialized version of `baseProperty` which supports deep paths. + * + * @private + * @param {Array|string} path The path of the property to get. + * @returns {Function} Returns the new function. + */ + function basePropertyDeep(path) { + return function(object) { + return baseGet(object, path); + }; + } + + module.exports = basePropertyDeep; + + +/***/ }, +/* 96 */ +/***/ function(module, exports, __webpack_require__) { + + var baseEach = __webpack_require__(97), + isArrayLike = __webpack_require__(10); + + /** + * The base implementation of `_.map` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the new mapped array. + */ + function baseMap(collection, iteratee) { + var index = -1, + result = isArrayLike(collection) ? Array(collection.length) : []; + + baseEach(collection, function(value, key, collection) { + result[++index] = iteratee(value, key, collection); + }); + return result; + } + + module.exports = baseMap; + + +/***/ }, +/* 97 */ +/***/ function(module, exports, __webpack_require__) { + + var baseForOwn = __webpack_require__(98), + createBaseEach = __webpack_require__(101); + + /** + * The base implementation of `_.forEach` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array|Object} Returns `collection`. + */ + var baseEach = createBaseEach(baseForOwn); + + module.exports = baseEach; + + +/***/ }, +/* 98 */ +/***/ function(module, exports, __webpack_require__) { + + var baseFor = __webpack_require__(99), + keys = __webpack_require__(3); + + /** + * The base implementation of `_.forOwn` without support for iteratee shorthands. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Object} Returns `object`. + */ + function baseForOwn(object, iteratee) { + return object && baseFor(object, iteratee, keys); + } + + module.exports = baseForOwn; + + +/***/ }, +/* 99 */ +/***/ function(module, exports, __webpack_require__) { + + var createBaseFor = __webpack_require__(100); + + /** + * The base implementation of `baseForIn` and `baseForOwn` which iterates + * over `object` properties returned by `keysFunc` invoking `iteratee` for + * each property. Iteratee functions may exit iteration early by explicitly + * returning `false`. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {Function} keysFunc The function to get the keys of `object`. + * @returns {Object} Returns `object`. + */ + var baseFor = createBaseFor(); + + module.exports = baseFor; + + +/***/ }, +/* 100 */ +/***/ function(module, exports) { + + /** + * Creates a base function for methods like `_.forIn`. + * + * @private + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new base function. + */ + function createBaseFor(fromRight) { + return function(object, iteratee, keysFunc) { + var index = -1, + iterable = Object(object), + props = keysFunc(object), + length = props.length; + + while (length--) { + var key = props[fromRight ? length : ++index]; + if (iteratee(iterable[key], key, iterable) === false) { + break; + } + } + return object; + }; + } + + module.exports = createBaseFor; + + +/***/ }, +/* 101 */ +/***/ function(module, exports, __webpack_require__) { + + var isArrayLike = __webpack_require__(10); + + /** + * Creates a `baseEach` or `baseEachRight` function. + * + * @private + * @param {Function} eachFunc The function to iterate over a collection. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new base function. + */ + function createBaseEach(eachFunc, fromRight) { + return function(collection, iteratee) { + if (collection == null) { + return collection; + } + if (!isArrayLike(collection)) { + return eachFunc(collection, iteratee); + } + var length = collection.length, + index = fromRight ? length : -1, + iterable = Object(collection); + + while ((fromRight ? index-- : ++index < length)) { + if (iteratee(iterable[index], index, iterable) === false) { + break; + } + } + return collection; + }; + } + + module.exports = createBaseEach; + + +/***/ }, +/* 102 */ +/***/ function(module, exports, __webpack_require__) { + + var arrayReduce = __webpack_require__(103), + baseEach = __webpack_require__(97), + baseIteratee = __webpack_require__(28), + baseReduce = __webpack_require__(104), + isArray = __webpack_require__(17); + + /** + * Reduces `collection` to a value which is the accumulated result of running + * each element in `collection` through `iteratee`, where each successive + * invocation is supplied the return value of the previous. If `accumulator` + * is not provided the first element of `collection` is used as the initial + * value. The iteratee is invoked with four arguments: + * (accumulator, value, index|key, collection). + * + * Many lodash methods are guarded to work as iteratees for methods like + * `_.reduce`, `_.reduceRight`, and `_.transform`. + * + * The guarded methods are: + * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`, + * and `sortBy` + * + * @static + * @memberOf _ + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @param {*} [accumulator] The initial value. + * @returns {*} Returns the accumulated value. + * @example + * + * _.reduce([1, 2], function(sum, n) { + * return sum + n; + * }, 0); + * // => 3 + * + * _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) { + * (result[value] || (result[value] = [])).push(key); + * return result; + * }, {}); + * // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed) + */ + function reduce(collection, iteratee, accumulator) { + var func = isArray(collection) ? arrayReduce : baseReduce, + initAccum = arguments.length < 3; + + return func(collection, baseIteratee(iteratee, 4), accumulator, initAccum, baseEach); + } + + module.exports = reduce; + + +/***/ }, +/* 103 */ +/***/ function(module, exports) { + + /** + * A specialized version of `_.reduce` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {*} [accumulator] The initial value. + * @param {boolean} [initAccum] Specify using the first element of `array` as the initial value. + * @returns {*} Returns the accumulated value. + */ + function arrayReduce(array, iteratee, accumulator, initAccum) { + var index = -1, + length = array.length; + + if (initAccum && length) { + accumulator = array[++index]; + } + while (++index < length) { + accumulator = iteratee(accumulator, array[index], index, array); + } + return accumulator; + } + + module.exports = arrayReduce; + + +/***/ }, +/* 104 */ +/***/ function(module, exports) { + + /** + * The base implementation of `_.reduce` and `_.reduceRight`, without support + * for iteratee shorthands, which iterates over `collection` using `eachFunc`. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {*} accumulator The initial value. + * @param {boolean} initAccum Specify using the first or last element of `collection` as the initial value. + * @param {Function} eachFunc The function to iterate over `collection`. + * @returns {*} Returns the accumulated value. + */ + function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) { + eachFunc(collection, function(value, index, collection) { + accumulator = initAccum + ? (initAccum = false, value) + : iteratee(accumulator, value, index, collection); + }); + return accumulator; + } + + module.exports = baseReduce; + + +/***/ }, +/* 105 */ +/***/ function(module, exports, __webpack_require__) { + + var arrayFilter = __webpack_require__(106), + baseFilter = __webpack_require__(107), + baseIteratee = __webpack_require__(28), + isArray = __webpack_require__(17); + + /** + * Iterates over elements of `collection`, returning an array of all elements + * `predicate` returns truthy for. The predicate is invoked with three arguments: + * (value, index|key, collection). + * + * @static + * @memberOf _ + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function|Object|string} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': true }, + * { 'user': 'fred', 'age': 40, 'active': false } + * ]; + * + * _.filter(users, function(o) { return !o.active; }); + * // => objects for ['fred'] + * + * // The `_.matches` iteratee shorthand. + * _.filter(users, { 'age': 36, 'active': true }); + * // => objects for ['barney'] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.filter(users, ['active', false]); + * // => objects for ['fred'] + * + * // The `_.property` iteratee shorthand. + * _.filter(users, 'active'); + * // => objects for ['barney'] + */ + function filter(collection, predicate) { + var func = isArray(collection) ? arrayFilter : baseFilter; + return func(collection, baseIteratee(predicate, 3)); + } + + module.exports = filter; + + +/***/ }, +/* 106 */ +/***/ function(module, exports) { + + /** + * A specialized version of `_.filter` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + */ + function arrayFilter(array, predicate) { + var index = -1, + length = array.length, + resIndex = -1, + result = []; + + while (++index < length) { + var value = array[index]; + if (predicate(value, index, array)) { + result[++resIndex] = value; + } + } + return result; + } + + module.exports = arrayFilter; + + +/***/ }, +/* 107 */ +/***/ function(module, exports, __webpack_require__) { + + var baseEach = __webpack_require__(97); + + /** + * The base implementation of `_.filter` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + */ + function baseFilter(collection, predicate) { + var result = []; + baseEach(collection, function(value, index, collection) { + if (predicate(value, index, collection)) { + result.push(value); + } + }); + return result; + } + + module.exports = baseFilter; + + +/***/ }, +/* 108 */ +/***/ function(module, exports, __webpack_require__) { + + var baseFlatten = __webpack_require__(109), + baseOrderBy = __webpack_require__(111), + isIterateeCall = __webpack_require__(115), + rest = __webpack_require__(116); + + /** + * Creates an array of elements, sorted in ascending order by the results of + * running each element in a collection through each iteratee. This method + * performs a stable sort, that is, it preserves the original sort order of + * equal elements. The iteratees are invoked with one argument: (value). + * + * @static + * @memberOf _ + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {...(Function|Function[]|Object|Object[]|string|string[])} [iteratees=[_.identity]] + * The iteratees to sort by, specified individually or in arrays. + * @returns {Array} Returns the new sorted array. + * @example + * + * var users = [ + * { 'user': 'fred', 'age': 48 }, + * { 'user': 'barney', 'age': 36 }, + * { 'user': 'fred', 'age': 42 }, + * { 'user': 'barney', 'age': 34 } + * ]; + * + * _.sortBy(users, function(o) { return o.user; }); + * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 42]] + * + * _.sortBy(users, ['user', 'age']); + * // => objects for [['barney', 34], ['barney', 36], ['fred', 42], ['fred', 48]] + * + * _.sortBy(users, 'user', function(o) { + * return Math.floor(o.age / 10); + * }); + * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 42]] + */ + var sortBy = rest(function(collection, iteratees) { + if (collection == null) { + return []; + } + var length = iteratees.length; + if (length > 1 && isIterateeCall(collection, iteratees[0], iteratees[1])) { + iteratees = []; + } else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) { + iteratees.length = 1; + } + return baseOrderBy(collection, baseFlatten(iteratees), []); + }); + + module.exports = sortBy; + + +/***/ }, +/* 109 */ +/***/ function(module, exports, __webpack_require__) { + + var arrayPush = __webpack_require__(110), + isArguments = __webpack_require__(8), + isArray = __webpack_require__(17), + isArrayLikeObject = __webpack_require__(9); + + /** + * The base implementation of `_.flatten` with support for restricting flattening. + * + * @private + * @param {Array} array The array to flatten. + * @param {boolean} [isDeep] Specify a deep flatten. + * @param {boolean} [isStrict] Restrict flattening to arrays-like objects. + * @param {Array} [result=[]] The initial result value. + * @returns {Array} Returns the new flattened array. + */ + function baseFlatten(array, isDeep, isStrict, result) { + result || (result = []); + + var index = -1, + length = array.length; + + while (++index < length) { + var value = array[index]; + if (isArrayLikeObject(value) && + (isStrict || isArray(value) || isArguments(value))) { + if (isDeep) { + // Recursively flatten arrays (susceptible to call stack limits). + baseFlatten(value, isDeep, isStrict, result); + } else { + arrayPush(result, value); + } + } else if (!isStrict) { + result[result.length] = value; + } + } + return result; + } + + module.exports = baseFlatten; + + +/***/ }, +/* 110 */ +/***/ function(module, exports) { + + /** + * Appends the elements of `values` to `array`. + * + * @private + * @param {Array} array The array to modify. + * @param {Array} values The values to append. + * @returns {Array} Returns `array`. + */ + function arrayPush(array, values) { + var index = -1, + length = values.length, + offset = array.length; + + while (++index < length) { + array[offset + index] = values[index]; + } + return array; + } + + module.exports = arrayPush; + + +/***/ }, +/* 111 */ +/***/ function(module, exports, __webpack_require__) { + + var arrayMap = __webpack_require__(27), + baseIteratee = __webpack_require__(28), + baseMap = __webpack_require__(96), + baseSortBy = __webpack_require__(112), + compareMultiple = __webpack_require__(113); + + /** + * The base implementation of `_.orderBy` without param guards. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by. + * @param {string[]} orders The sort orders of `iteratees`. + * @returns {Array} Returns the new sorted array. + */ + function baseOrderBy(collection, iteratees, orders) { + var index = -1, + toIteratee = baseIteratee; + + iteratees = arrayMap(iteratees.length ? iteratees : Array(1), function(iteratee) { + return toIteratee(iteratee); + }); + + var result = baseMap(collection, function(value, key, collection) { + var criteria = arrayMap(iteratees, function(iteratee) { + return iteratee(value); + }); + return { 'criteria': criteria, 'index': ++index, 'value': value }; + }); + + return baseSortBy(result, function(object, other) { + return compareMultiple(object, other, orders); + }); + } + + module.exports = baseOrderBy; + + +/***/ }, +/* 112 */ +/***/ function(module, exports) { + + /** + * The base implementation of `_.sortBy` which uses `comparer` to define + * the sort order of `array` and replaces criteria objects with their + * corresponding values. + * + * @private + * @param {Array} array The array to sort. + * @param {Function} comparer The function to define sort order. + * @returns {Array} Returns `array`. + */ + function baseSortBy(array, comparer) { + var length = array.length; + + array.sort(comparer); + while (length--) { + array[length] = array[length].value; + } + return array; + } + + module.exports = baseSortBy; + + +/***/ }, +/* 113 */ +/***/ function(module, exports, __webpack_require__) { + + var compareAscending = __webpack_require__(114); + + /** + * Used by `_.orderBy` to compare multiple properties of a value to another + * and stable sort them. + * + * If `orders` is unspecified, all values are sorted in ascending order. Otherwise, + * specify an order of "desc" for descending or "asc" for ascending sort order + * of corresponding values. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {boolean[]|string[]} orders The order to sort by for each property. + * @returns {number} Returns the sort order indicator for `object`. + */ + function compareMultiple(object, other, orders) { + var index = -1, + objCriteria = object.criteria, + othCriteria = other.criteria, + length = objCriteria.length, + ordersLength = orders.length; + + while (++index < length) { + var result = compareAscending(objCriteria[index], othCriteria[index]); + if (result) { + if (index >= ordersLength) { + return result; + } + var order = orders[index]; + return result * (order == 'desc' ? -1 : 1); + } + } + // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications + // that causes it, under certain circumstances, to provide the same value for + // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247 + // for more details. + // + // This also ensures a stable sort in V8 and other engines. + // See https://code.google.com/p/v8/issues/detail?id=90 for more details. + return object.index - other.index; + } + + module.exports = compareMultiple; + + +/***/ }, +/* 114 */ +/***/ function(module, exports) { + + /** + * Compares values to sort them in ascending order. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {number} Returns the sort order indicator for `value`. + */ + function compareAscending(value, other) { + if (value !== other) { + var valIsNull = value === null, + valIsUndef = value === undefined, + valIsReflexive = value === value; + + var othIsNull = other === null, + othIsUndef = other === undefined, + othIsReflexive = other === other; + + if ((value > other && !othIsNull) || !valIsReflexive || + (valIsNull && !othIsUndef && othIsReflexive) || + (valIsUndef && othIsReflexive)) { + return 1; + } + if ((value < other && !valIsNull) || !othIsReflexive || + (othIsNull && !valIsUndef && valIsReflexive) || + (othIsUndef && valIsReflexive)) { + return -1; + } + } + return 0; + } + + module.exports = compareAscending; + + +/***/ }, +/* 115 */ +/***/ function(module, exports, __webpack_require__) { + + var eq = __webpack_require__(36), + isArrayLike = __webpack_require__(10), + isIndex = __webpack_require__(19), + isObject = __webpack_require__(14); + + /** + * Checks if the provided arguments are from an iteratee call. + * + * @private + * @param {*} value The potential iteratee value argument. + * @param {*} index The potential iteratee index or key argument. + * @param {*} object The potential iteratee object argument. + * @returns {boolean} Returns `true` if the arguments are from an iteratee call, else `false`. + */ + function isIterateeCall(value, index, object) { + if (!isObject(object)) { + return false; + } + var type = typeof index; + if (type == 'number' + ? (isArrayLike(object) && isIndex(index, object.length)) + : (type == 'string' && index in object)) { + return eq(object[index], value); + } + return false; + } + + module.exports = isIterateeCall; + + +/***/ }, +/* 116 */ +/***/ function(module, exports, __webpack_require__) { + + var apply = __webpack_require__(117), + toInteger = __webpack_require__(24); + + /** Used as the `TypeError` message for "Functions" methods. */ + var FUNC_ERROR_TEXT = 'Expected a function'; + + /* Built-in method references for those with the same name as other `lodash` methods. */ + var nativeMax = Math.max; + + /** + * Creates a function that invokes `func` with the `this` binding of the + * created function and arguments from `start` and beyond provided as an array. + * + * **Note:** This method is based on the [rest parameter](https://mdn.io/rest_parameters). + * + * @static + * @memberOf _ + * @category Function + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @returns {Function} Returns the new function. + * @example + * + * var say = _.rest(function(what, names) { + * return what + ' ' + _.initial(names).join(', ') + + * (_.size(names) > 1 ? ', & ' : '') + _.last(names); + * }); + * + * say('hello', 'fred', 'barney', 'pebbles'); + * // => 'hello fred, barney, & pebbles' + */ + function rest(func, start) { + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + start = nativeMax(start === undefined ? (func.length - 1) : toInteger(start), 0); + return function() { + var args = arguments, + index = -1, + length = nativeMax(args.length - start, 0), + array = Array(length); + + while (++index < length) { + array[index] = args[start + index]; + } + switch (start) { + case 0: return func.call(this, array); + case 1: return func.call(this, args[0], array); + case 2: return func.call(this, args[0], args[1], array); + } + var otherArgs = Array(start + 1); + index = -1; + while (++index < start) { + otherArgs[index] = args[index]; + } + otherArgs[start] = array; + return apply(func, this, otherArgs); + }; + } + + module.exports = rest; + + +/***/ }, +/* 117 */ +/***/ function(module, exports) { + + /** + * A faster alternative to `Function#apply`, this function invokes `func` + * with the `this` binding of `thisArg` and the arguments of `args`. + * + * @private + * @param {Function} func The function to invoke. + * @param {*} thisArg The `this` binding of `func`. + * @param {...*} args The arguments to invoke `func` with. + * @returns {*} Returns the result of `func`. + */ + function apply(func, thisArg, args) { + var length = args.length; + switch (length) { + case 0: return func.call(thisArg); + case 1: return func.call(thisArg, args[0]); + case 2: return func.call(thisArg, args[0], args[1]); + case 3: return func.call(thisArg, args[0], args[1], args[2]); + } + return func.apply(thisArg, args); + } + + module.exports = apply; + + +/***/ }, +/* 118 */ +/***/ function(module, exports, __webpack_require__) { + + var baseEach = __webpack_require__(97), + baseFind = __webpack_require__(119), + baseFindIndex = __webpack_require__(120), + baseIteratee = __webpack_require__(28), + isArray = __webpack_require__(17); + + /** + * Iterates over elements of `collection`, returning the first element + * `predicate` returns truthy for. The predicate is invoked with three arguments: + * (value, index|key, collection). + * + * @static + * @memberOf _ + * @category Collection + * @param {Array|Object} collection The collection to search. + * @param {Function|Object|string} [predicate=_.identity] The function invoked per iteration. + * @returns {*} Returns the matched element, else `undefined`. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': true }, + * { 'user': 'fred', 'age': 40, 'active': false }, + * { 'user': 'pebbles', 'age': 1, 'active': true } + * ]; + * + * _.find(users, function(o) { return o.age < 40; }); + * // => object for 'barney' + * + * // The `_.matches` iteratee shorthand. + * _.find(users, { 'age': 1, 'active': true }); + * // => object for 'pebbles' + * + * // The `_.matchesProperty` iteratee shorthand. + * _.find(users, ['active', false]); + * // => object for 'fred' + * + * // The `_.property` iteratee shorthand. + * _.find(users, 'active'); + * // => object for 'barney' + */ + function find(collection, predicate) { + predicate = baseIteratee(predicate, 3); + if (isArray(collection)) { + var index = baseFindIndex(collection, predicate); + return index > -1 ? collection[index] : undefined; + } + return baseFind(collection, predicate, baseEach); + } + + module.exports = find; + + +/***/ }, +/* 119 */ +/***/ function(module, exports) { + + /** + * The base implementation of methods like `_.find` and `_.findKey`, without + * support for iteratee shorthands, which iterates over `collection` using + * `eachFunc`. + * + * @private + * @param {Array|Object} collection The collection to search. + * @param {Function} predicate The function invoked per iteration. + * @param {Function} eachFunc The function to iterate over `collection`. + * @param {boolean} [retKey] Specify returning the key of the found element instead of the element itself. + * @returns {*} Returns the found element or its key, else `undefined`. + */ + function baseFind(collection, predicate, eachFunc, retKey) { + var result; + eachFunc(collection, function(value, key, collection) { + if (predicate(value, key, collection)) { + result = retKey ? key : value; + return false; + } + }); + return result; + } + + module.exports = baseFind; + + +/***/ }, +/* 120 */ +/***/ function(module, exports) { + + /** + * The base implementation of `_.findIndex` and `_.findLastIndex` without + * support for iteratee shorthands. + * + * @private + * @param {Array} array The array to search. + * @param {Function} predicate The function invoked per iteration. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + function baseFindIndex(array, predicate, fromRight) { + var length = array.length, + index = fromRight ? length : -1; + + while ((fromRight ? index-- : ++index < length)) { + if (predicate(array[index], index, array)) { + return index; + } + } + return -1; + } + + module.exports = baseFindIndex; + + +/***/ }, +/* 121 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + var _map = __webpack_require__(26); + + var _map2 = _interopRequireDefault(_map); + + var _reduce = __webpack_require__(102); + + var _reduce2 = _interopRequireDefault(_reduce); + + var _repeat = __webpack_require__(122); + + var _repeat2 = _interopRequireDefault(_repeat); + + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.none = exports.notNone = undefined; + exports.bitsRequired = bitsRequired; + exports.paddedBinary = paddedBinary; + exports.isNone = isNone; + exports.concat = concat; + exports.toN = toN; + exports.fromN = fromN; + exports.fromVarN = fromVarN; + exports.toVarN = toVarN; + exports.paddedN = paddedN; + exports.bitsToN = bitsToN; + exports.nToBits = nToBits; + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + + function bitsRequired(maxValue) { + if (maxValue === 0) { + return 1; + } + return Math.floor(Math.log(maxValue) / Math.LN2) + 1; + } + + function paddedBinary(value, bitSize) { + var binary = value.toString(2); + if (binary.length > bitSize) { + throw new Error('Invalid value or bitSize: can\'t fit ' + value + ' in ' + bitSize + ' bits'); + } + + return (0, _repeat2.default)('0', bitSize - binary.length) + binary; + } + + var notNone = exports.notNone = paddedBinary(0, 1); + var none = exports.none = paddedBinary(1, 1); + + function isNone(bits) { + return bits && bits.length >= 1 && bits[0] === none[0]; + } + + function concat(encoded) { + return (0, _reduce2.default)(encoded, function (acc, obj) { + return { bits: acc.bits + (obj.bits || ''), blob: acc.blob + (obj.blob || '') }; + }, { bits: '', blob: '' }); + } + + var availableCharacters = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890_-'; + var base = availableCharacters.length; // 64 + + function toN(x) { + if (x < 0) { + throw new Error('Invalid number: can\'t encode negative number ' + x); + } + + var result = ''; + while (x >= base) { + result = availableCharacters[x % base] + result; + x = Math.floor(x / base); + } + + result = availableCharacters[x] + result; + return result; + } + + function fromN(n) { + var x = 0, + index; + for (var i = 0; i < n.length; i++) { + index = availableCharacters.indexOf(n[i]); + if (index === -1) { + throw new Error('Invalid number: can\'t decode ' + n); + } + x += index * Math.pow(base, n.length - i - 1); + } + return x; + } + + function fromVarN(string) { + var str = string; + var value = 0; + var hasMore = true; + while (hasMore) { + if (str.length === 0) { + throw new Error('Invalid number: can\'t decode ' + string); + } + var byte = str[0]; + str = str.substr(1); + var n = fromN(byte); + hasMore = n > 31; + value = value << 5 | n & 31; + } + return [value, str]; + } + + function toVarN(n) { + var result = ''; + var charsRequired = Math.ceil(bitsRequired(n) / 5); + var bits = paddedBinary(n, charsRequired * 5); + while (bits) { + var part = bits.substr(0, 5); + bits = bits.substr(5); + part = (bits.length === 0 ? '0' : '1') + part; + result += bitsToN(part); + } + return result; + } + + function paddedN(x, charSize) { + var r = toN(x); + if (r.length > charSize) { + throw new Error('Invalid charSize: can\'t encode ' + x + ' in ' + charSize + ' chars'); + } + + return (0, _repeat2.default)(availableCharacters[0], charSize - r.length) + r; + } + + function bitsToN(bits) { + var result = '', + char; + while (bits) { + char = bits.substr(0, 6); + bits = bits.substr(6); + + if (char.length < 6) { + char += (0, _repeat2.default)('0', 6 - char.length); + } + result += toN(parseInt(char, 2)); + } + + return result; + } + + function nToBits(chars, bitSize) { + return (0, _map2.default)(chars, function (c) { + return paddedBinary(fromN(c), 6); + }).join('').substr(0, bitSize); + } + +/***/ }, +/* 122 */ +/***/ function(module, exports, __webpack_require__) { + + var toInteger = __webpack_require__(24), + toString = __webpack_require__(85); + + /** Used as references for various `Number` constants. */ + var MAX_SAFE_INTEGER = 9007199254740991; + + /* Built-in method references for those with the same name as other `lodash` methods. */ + var nativeFloor = Math.floor; + + /** + * Repeats the given string `n` times. + * + * @static + * @memberOf _ + * @category String + * @param {string} [string=''] The string to repeat. + * @param {number} [n=0] The number of times to repeat the string. + * @returns {string} Returns the repeated string. + * @example + * + * _.repeat('*', 3); + * // => '***' + * + * _.repeat('abc', 2); + * // => 'abcabc' + * + * _.repeat('abc', 0); + * // => '' + */ + function repeat(string, n) { + string = toString(string); + n = toInteger(n); + + var result = ''; + if (!string || n < 1 || n > MAX_SAFE_INTEGER) { + return result; + } + // Leverage the exponentiation by squaring algorithm for a faster repeat. + // See https://en.wikipedia.org/wiki/Exponentiation_by_squaring for more details. + do { + if (n % 2) { + result += string; + } + n = nativeFloor(n / 2); + string += string; + } while (n); + + return result; + } + + module.exports = repeat; + + +/***/ }, +/* 123 */ +/***/ function(module, exports, __webpack_require__) { + + "use strict"; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.default = oneOf; + + var _core = __webpack_require__(121); + + var _coder = __webpack_require__(1); + + function oneOf() { + for (var _len = arguments.length, choices = Array(_len), _key = 0; _key < _len; _key++) { + choices[_key] = arguments[_key]; + } + + var bitSize = (0, _core.bitsRequired)(choices.length - 1); + return { + encode: function encode(choice) { + var index = choices.indexOf(choice); + if (index === -1) { + throw new Error("Invalid choice: " + choice + " is not one of " + choices.join(',')); + } + return { bits: (0, _core.paddedBinary)(index, bitSize), blob: '' }; + }, + + decode: function decode(_ref) { + var bits = _ref.bits; + var blob = _ref.blob; + + var index = parseInt(bits.substr(0, bitSize), 2); + return { + value: choices[index], + rest: { bits: bits.substring(bitSize), blob: blob } + }; + } + }; + } + + (0, _coder.register)('oneOf', oneOf); + +/***/ }, +/* 124 */ +/***/ function(module, exports, __webpack_require__) { + + "use strict"; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.default = boolean; + + var _oneOf = __webpack_require__(123); + + var _oneOf2 = _interopRequireDefault(_oneOf); + + var _coder = __webpack_require__(1); + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + + function boolean() { + return (0, _oneOf2.default)(true, false); + } + + (0, _coder.register)('boolean', boolean); + +/***/ }, +/* 125 */ +/***/ function(module, exports, __webpack_require__) { + + "use strict"; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.default = integer; + + var _core = __webpack_require__(121); + + var _coder = __webpack_require__(1); + + function integer() { + return { + encode: function encode(int) { + var binary = Math.abs(int).toString(2); + var bits = (0, _core.paddedBinary)(binary.length, 6) + (int > 0 ? '1' : '0') + binary; + return { bits: bits, blob: '' }; + }, + decode: function decode(_ref) { + var bits = _ref.bits; + var blob = _ref.blob; + + var size = parseInt(bits.substr(0, 6), 2); + bits = bits.substr(6); + var sign = bits[0] === '1' ? 1 : -1; + bits = bits.substr(1); + return { + value: sign * parseInt(bits.substr(0, size), 2), + rest: { bits: bits.substr(size), blob: blob } + }; + } + }; + } + + (0, _coder.register)('integer', integer); + +/***/ }, +/* 126 */ +/***/ function(module, exports, __webpack_require__) { + + "use strict"; + + var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }(); + + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.default = varchar; + + var _core = __webpack_require__(121); + + var _coder = __webpack_require__(1); + + function varchar() { + return { + encode: function encode(string) { + return { bits: '', blob: (0, _core.toVarN)(string.length) + string }; + }, + decode: function decode(_ref) { + var bits = _ref.bits; + var blob = _ref.blob; + + var size; + + var _fromVarN = (0, _core.fromVarN)(blob); + + var _fromVarN2 = _slicedToArray(_fromVarN, 2); + + size = _fromVarN2[0]; + blob = _fromVarN2[1]; + + return { + value: blob.substr(0, size), + rest: { bits: bits, blob: blob.substr(size) } + }; + } + }; + } + + (0, _coder.register)('varchar', varchar); + +/***/ }, +/* 127 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.default = fixedChar; + + var _coder = __webpack_require__(1); + + function fixedChar(size) { + return { + encode: function encode(string) { + return { bits: '', blob: string.toString() }; + }, + decode: function decode(_ref) { + var bits = _ref.bits; + var blob = _ref.blob; + + return { + value: blob.substr(0, size), + rest: { bits: bits, blob: blob.substr(size) } + }; + } + }; + } + + (0, _coder.register)('fixedchar', fixedChar); + +/***/ }, +/* 128 */ +/***/ function(module, exports, __webpack_require__) { + + "use strict"; + + var _each = __webpack_require__(129); + + var _each2 = _interopRequireDefault(_each); + + var _has = __webpack_require__(133); + + var _has2 = _interopRequireDefault(_has); + + var _map = __webpack_require__(26); + + var _map2 = _interopRequireDefault(_map); + + var _flatten = __webpack_require__(134); + + var _flatten2 = _interopRequireDefault(_flatten); + + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.object = object; + + var _core = __webpack_require__(121); + + var _coder = __webpack_require__(1); + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + + function object(entries) { + return { + encode: function encode(object) { + return (0, _core.concat)((0, _flatten2.default)((0, _map2.default)(entries, function (entry, key) { + if ((0, _has2.default)(object, key)) { + return [{ bits: _core.notNone }, entry.encode(object[key])]; + } + return { bits: _core.none }; + }))); + }, + decode: function decode(_ref) { + var bits = _ref.bits; + var blob = _ref.blob; + + var object = {}; + (0, _each2.default)(entries, function (entry, key) { + if ((0, _core.isNone)(bits)) { + bits = bits.substr(1); + return; + } else { + bits = bits.substr(1); + } + + var result = entry.decode({ bits: bits, blob: blob }); + bits = result.rest.bits; + blob = result.rest.blob; + object[key] = result.value; + }); + return { value: object, rest: { bits: bits, blob: blob } }; + } + }; + } + + (0, _coder.register)('object', object); + +/***/ }, +/* 129 */ +/***/ function(module, exports, __webpack_require__) { + + module.exports = __webpack_require__(130); + + +/***/ }, +/* 130 */ +/***/ function(module, exports, __webpack_require__) { + + var arrayEach = __webpack_require__(131), + baseEach = __webpack_require__(97), + isArray = __webpack_require__(17), + toFunction = __webpack_require__(132); + + /** + * Iterates over elements of `collection` invoking `iteratee` for each element. + * The iteratee is invoked with three arguments: (value, index|key, collection). + * Iteratee functions may exit iteration early by explicitly returning `false`. + * + * **Note:** As with other "Collections" methods, objects with a "length" property + * are iterated like arrays. To avoid this behavior use `_.forIn` or `_.forOwn` + * for object iteration. + * + * @static + * @memberOf _ + * @alias each + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array|Object} Returns `collection`. + * @example + * + * _([1, 2]).forEach(function(value) { + * console.log(value); + * }); + * // => logs `1` then `2` + * + * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) { + * console.log(key); + * }); + * // => logs 'a' then 'b' (iteration order is not guaranteed) + */ + function forEach(collection, iteratee) { + return (typeof iteratee == 'function' && isArray(collection)) + ? arrayEach(collection, iteratee) + : baseEach(collection, toFunction(iteratee)); + } + + module.exports = forEach; + + +/***/ }, +/* 131 */ +/***/ function(module, exports) { + + /** + * A specialized version of `_.forEach` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns `array`. + */ + function arrayEach(array, iteratee) { + var index = -1, + length = array.length; + + while (++index < length) { + if (iteratee(array[index], index, array) === false) { + break; + } + } + return array; + } + + module.exports = arrayEach; + + +/***/ }, +/* 132 */ +/***/ function(module, exports, __webpack_require__) { + + var identity = __webpack_require__(93); + + /** + * Converts `value` to a function if it's not one. + * + * @private + * @param {*} value The value to process. + * @returns {Function} Returns the function. + */ + function toFunction(value) { + return typeof value == 'function' ? value : identity; + } + + module.exports = toFunction; + + +/***/ }, +/* 133 */ +/***/ function(module, exports, __webpack_require__) { + + var baseHas = __webpack_require__(4), + hasPath = __webpack_require__(90); + + /** + * Checks if `path` is a direct property of `object`. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path to check. + * @returns {boolean} Returns `true` if `path` exists, else `false`. + * @example + * + * var object = { 'a': { 'b': { 'c': 3 } } }; + * var other = _.create({ 'a': _.create({ 'b': _.create({ 'c': 3 }) }) }); + * + * _.has(object, 'a'); + * // => true + * + * _.has(object, 'a.b.c'); + * // => true + * + * _.has(object, ['a', 'b', 'c']); + * // => true + * + * _.has(other, 'a'); + * // => false + */ + function has(object, path) { + return hasPath(object, path, baseHas); + } + + module.exports = has; + + +/***/ }, +/* 134 */ +/***/ function(module, exports, __webpack_require__) { + + var baseFlatten = __webpack_require__(109); + + /** + * Flattens `array` a single level. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to flatten. + * @returns {Array} Returns the new flattened array. + * @example + * + * _.flatten([1, [2, 3, [4]]]); + * // => [1, 2, 3, [4]] + */ + function flatten(array) { + var length = array ? array.length : 0; + return length ? baseFlatten(array) : []; + } + + module.exports = flatten; + + +/***/ }, +/* 135 */ +/***/ function(module, exports, __webpack_require__) { + + "use strict"; + + var _each = __webpack_require__(129); + + var _each2 = _interopRequireDefault(_each); + + var _map = __webpack_require__(26); + + var _map2 = _interopRequireDefault(_map); + + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.tuple = tuple; + + var _core = __webpack_require__(121); + + var _coder = __webpack_require__(1); + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + + function tuple(entries) { + return { + encode: function encode(array) { + return (0, _core.concat)((0, _map2.default)(entries, function (entry, i) { + return entry.encode(array[i]); + })); + }, + decode: function decode(rest) { + var array = []; + (0, _each2.default)(entries, function (entry, i) { + var result = entry.decode(rest); + array[i] = result.value; + rest = result.rest; + }); + return { value: array, rest: rest }; + } + }; + } + + (0, _coder.register)('tuple', tuple); + +/***/ }, +/* 136 */ +/***/ function(module, exports, __webpack_require__) { + + "use strict"; + + var _map = __webpack_require__(26); + + var _map2 = _interopRequireDefault(_map); + + var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }(); + + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.array = array; + + var _core = __webpack_require__(121); + + var _coder = __webpack_require__(1); + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + + function array(entry) { + return { + encode: function encode(array) { + return (0, _core.concat)([{ blob: (0, _core.toVarN)(array.length) }].concat((0, _map2.default)(array, entry.encode))); + }, + decode: function decode(_ref) { + var bits = _ref.bits; + var blob = _ref.blob; + + var size; + + var _fromVarN = (0, _core.fromVarN)(blob); + + var _fromVarN2 = _slicedToArray(_fromVarN, 2); + + size = _fromVarN2[0]; + blob = _fromVarN2[1]; + + var rest = { bits: bits, blob: blob }; + var array = [], + result, + i; + for (i = 0; i < size; i++) { + result = entry.decode(rest); + array[i] = result.value; + rest = result.rest; + } + return { value: array, rest: rest }; + } + }; + } + + (0, _coder.register)('array', array); + +/***/ } +/******/ ]) +}); +; \ No newline at end of file diff --git a/μ.ipynb b/μ.ipynb new file mode 100644 index 0000000..2368184 --- /dev/null +++ b/μ.ipynb @@ -0,0 +1,278 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "id": "19016eb2-043d-446f-9949-6ba6e3eda6ec", + "metadata": {}, + "source": [ + "# μ\n", + "μ is a JavaScript library for encoding/decoding state (JavaScript object) in URL. Define a spec for the state, based on which the encoding is done. Manage the state with versioning.\n", + "\n", + "https://github.com/ananthakumaran/u" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "id": "dcc14dfe-fcdc-43f1-9c6d-3538d8f7ec28", + "metadata": { + "collapsed": true, + "jupyter": { + "outputs_hidden": true, + "source_hidden": true + }, + "tags": [] + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{\n", + " version: 1,\n", + " spec: { encode: [Function: encode], decode: [Function: decode] },\n", + " jsonSpec: {\n", + " lookingFor: [ 'oneOf', 'bride', 'groom' ],\n", + " age: [ 'tuple', [Array], [Array] ],\n", + " religion: [\n", + " 'oneOf', 'Hindu',\n", + " 'Muslim', 'Christian',\n", + " 'Sikh', 'Parsi',\n", + " 'Jain', 'Buddhist',\n", + " 'Jewish', 'No Religion',\n", + " 'Spiritual', 'Other'\n", + " ],\n", + " motherTongue: [\n", + " 'oneOf', 'Assamese',\n", + " 'Bengali', 'English',\n", + " 'Gujarati', 'Hindi',\n", + " 'Kannada', 'Konkani',\n", + " 'Malayalam', 'Marathi',\n", + " 'Marwari', 'Odia',\n", + " 'Punjabi', 'Sindhi',\n", + " 'Tamil', 'Telugu',\n", + " 'Urdu'\n", + " ],\n", + " onlyProfileWithPhoto: [ 'boolean' ]\n", + " },\n", + " encodedVersion: 'b',\n", + " migrate: [Function (anonymous)]\n", + "}\n" + ] + }, + { + "data": { + "text/plain": [ + "undefined" + ] + }, + "execution_count": 5, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "import {fromJson, encode, decode} from \"./resources/u\"\n", + "var spec = {\n", + " lookingFor: ['oneOf', 'bride', 'groom'],\n", + " age: ['tuple', ['integer'] /* min */, ['integer'] /* max */],\n", + " religion: ['oneOf', 'Hindu', 'Muslim', 'Christian', 'Sikh', 'Parsi', 'Jain', 'Buddhist', 'Jewish', 'No Religion', 'Spiritual', 'Other'],\n", + " motherTongue: ['oneOf', 'Assamese', 'Bengali', 'English', 'Gujarati', 'Hindi', 'Kannada', 'Konkani', 'Malayalam', 'Marathi', 'Marwari', 'Odia', 'Punjabi', 'Sindhi', 'Tamil', 'Telugu', 'Urdu'],\n", + " onlyProfileWithPhoto: ['boolean']\n", + "};\n", + "\n", + "var v1 = fromJson(1, spec);\n", + "console.log(v1)" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "id": "b6ba3e69-75a8-4e7b-817f-eafabd3c0214", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "{\n", + " age: [ 25, 30 ],\n", + " lookingFor: 'bride',\n", + " motherTongue: 'Bengali',\n", + " onlyProfileWithPhoto: true,\n", + " religion: 'Hindu'\n", + "}" + ] + }, + "execution_count": 7, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "import {fromJson, encode, decode} from \"./resources/u\"\n", + "var encodedv1 = encode(v1, {lookingFor: 'bride', age: [25, 30], religion: 'Hindu', motherTongue: 'Bengali', onlyProfileWithPhoto: true});\n", + "//=> 'bHhc9I-aqa'\n", + "decode([v1], encodedv1) //=> {lookingFor: 'bride', age: [25, 30], religion: 'Hindu', motherTongue: 'Bengali', onlyProfileWithPhoto: true});\n" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "id": "666b73b0-58e6-4d13-a09a-ec88b2f048d5", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "{\n", + " age: [ 25, 30 ],\n", + " lookingFor: 'bride',\n", + " maritialStatus: 'Never Married',\n", + " motherTongue: 'Bengali',\n", + " onlyProfileWithPhoto: true,\n", + " religion: 'Hindu'\n", + "}" + ] + }, + "execution_count": 13, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "import {fromJson, encode, decode} from \"./resources/u\"\n", + "import _ from \"lodash\"\n", + "var newSpec = _.extend({}, spec, {\n", + " maritialStatus: ['oneOf', \"Doesn't Matter\", 'Never Married', 'Divorced', 'Widowed', 'Awaiting Divorce', 'Annulled']\n", + "});\n", + "var v2 = fromJson(2, newSpec, function (old) {\n", + " old.maritialStatus = \"Doesn't Matter\";\n", + " return old;\n", + "});\n", + "\n", + "decode([v1, v2], encodedv1) //=> {lookingFor: 'bride', age: [25, 30], religion: 'Hindu', motherTongue: 'Bengali', onlyProfileWithPhoto: true, maritialStatus: \"Doesn't Matter\"});\n", + "var encodedv2 = encode(v2, {lookingFor: 'bride', age: [25, 30], religion: 'Hindu', motherTongue: 'Bengali', onlyProfileWithPhoto: true, maritialStatus: 'Never Married'});\n", + "//=> 'cHlc9I-aHaa'\n", + "decode([v1, v2], encodedv2) //=> {lookingFor: 'bride', age: [25, 30], religion: 'Hindu', motherTongue: 'Bengali', onlyProfileWithPhoto: true, maritialStatus: 'Never Married'});" + ] + }, + { + "cell_type": "markdown", + "id": "cb0e6939-675a-4345-9e2f-27922fc888d3", + "metadata": {}, + "source": [ + "# μ [![Build Status](https://travis-ci.org/ananthakumaran/u.svg?branch=master)](https://travis-ci.org/ananthakumaran/u)\n", + "\n", + "Without μ:\n", + "`http://app.com/url#%7B%22lookingFor%22:%22bride%22,%22age%22:%5B25,30%5D,%22religion%22:%22Hindu%22,%22motherTongue%22:%22Bengali%22,%22onlyProfileWithPhoto%22:true%7D`\n", + "\n", + "With μ:\n", + "`http://app.com/url#bHhc9I-aqa`\n", + "\n", + "μ is a JavaScript library for encoding/decoding state (JavaScript\n", + "object) in URL. Define a spec for the state, based on which the\n", + "encoding is done. Manage the state with versioning.\n", + "\n", + "## Example\n", + "\n", + "Import the library\n", + "\n", + "`import {fromJson, encode, decode} from \"u\";`\n", + "\n", + "Define the spec.\n", + "\n", + "```javascript\n", + "var spec = {\n", + " lookingFor: ['oneOf', 'bride', 'groom'],\n", + " age: ['tuple', ['integer'] /* min */, ['integer'] /* max */],\n", + " religion: ['oneOf', 'Hindu', 'Muslim', 'Christian', 'Sikh', 'Parsi', 'Jain', 'Buddhist', 'Jewish', 'No Religion', 'Spiritual', 'Other'],\n", + " motherTongue: ['oneOf', 'Assamese', 'Bengali', 'English', 'Gujarati', 'Hindi', 'Kannada', 'Konkani', 'Malayalam', 'Marathi', 'Marwari', 'Odia', 'Punjabi', 'Sindhi', 'Tamil', 'Telugu', 'Urdu'],\n", + " onlyProfileWithPhoto: ['boolean']\n", + "};\n", + "\n", + "var v1 = fromJson(1, spec);\n", + "```\n", + "\n", + "Encode the object/state.\n", + "\n", + "```javascript\n", + "var encodedv1 = encode(v1, {lookingFor: 'bride', age: [25, 30], religion: 'Hindu', motherTongue: 'Bengali', onlyProfileWithPhoto: true});\n", + "//=> 'bHhc9I-aqa'\n", + "decode([v1], encodedv1) //=> {lookingFor: 'bride', age: [25, 30], religion: 'Hindu', motherTongue: 'Bengali', onlyProfileWithPhoto: true});\n", + "```\n", + "\n", + "Update your spec, as your application state space grows. Use versioning to\n", + "encode/decode state.\n", + "\n", + "```javascript\n", + "var newSpec = _.extend({}, spec, {\n", + " maritialStatus: ['oneOf', \"Doesn't Matter\", 'Never Married', 'Divorced', 'Widowed', 'Awaiting Divorce', 'Annulled']\n", + "});\n", + "var v2 = fromJson(2, newSpec, function (old) {\n", + " old.maritialStatus = \"Doesn't Matter\";\n", + " return old;\n", + "});\n", + "\n", + "decode([v1, v2], encodedv1) //=> {lookingFor: 'bride', age: [25, 30], religion: 'Hindu', motherTongue: 'Bengali', onlyProfileWithPhoto: true, maritialStatus: \"Doesn't Matter\"});\n", + "var encodedv2 = encode(v2, {lookingFor: 'bride', age: [25, 30], religion: 'Hindu', motherTongue: 'Bengali', onlyProfileWithPhoto: true, maritialStatus: 'Never Married'});\n", + "//=> 'cHlc9I-aHaa'\n", + "decode([v1, v2], encodedv2) //=> {lookingFor: 'bride', age: [25, 30], religion: 'Hindu', motherTongue: 'Bengali', onlyProfileWithPhoto: true, maritialStatus: 'Never Married'});\n", + "```\n", + "\n", + "## API\n", + "\n", + "### fromJson(version, spec, [migrate])\n", + "\n", + "**version** - spec version number \n", + "**spec** - used to define the structure and domain of the data.\n", + "\n", + "*structure* \n", + "object is defined using { key: specForValue, ... } \n", + "array is defined using ['array', specForValue ] \n", + "tuple is defined using ['tuple', specForValueAtIndexZero, specForValueAtIndexOne, ...] \n", + "\n", + "*domain* \n", + "domain is defined using [domainName, arg1, arg2, ...]\n", + "\n", + "| Domain | Args | Description |\n", + "---------|------|-------------|\n", + "| oneOf | allowed values | can be considered similar to enum. As we only encode the index position, the value could be anything |\n", + "| integer | | any integer |\n", + "| boolean | | true or false |\n", + "| fixedchar | Size of the string | fixed length string |\n", + "| varchar | | variable length string |\n", + "\n", + "**migrate** - a function that will get called in case where you decode\n", + "an object encoded using older spec. For example, there are three\n", + "versions v1, v2, v3 and you try to decode the string encoded using v1,\n", + "then the migrate method in v2 and v3 will get called with the decoded\n", + "value.\n", + "\n", + "### encode(coder, object)\n", + "\n", + "**coder** - coder created using fromJson \n", + "**object** - object that needs to encoded \n", + "\n", + "### decode(coders, blob)\n", + "\n", + "**coders** - array of coder. \n", + "**blob** - the string that is returned by encode. \n" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "jp-Babel (Node.js)", + "language": "babel", + "name": "babel" + }, + "language_info": { + "file_extension": ".js", + "mimetype": "application/javascript", + "name": "javascript", + "version": "17.9.0" + } + }, + "nbformat": 4, + "nbformat_minor": 5 +}