├── .gitignore
├── examples
├── simple
│ ├── .babelrc
│ ├── index.html
│ ├── webpack.config.dev.js
│ ├── server.js
│ ├── src
│ │ ├── Form.js
│ │ └── index.js
│ └── package.json
└── advanced
│ ├── .babelrc
│ ├── index.html
│ ├── webpack.config.dev.js
│ ├── server.js
│ ├── src
│ ├── App.js
│ ├── index.js
│ └── User.js
│ └── package.json
├── .babelrc
├── src
├── constants.js
├── initialStateReducer.js
├── setStateByPath.js
├── replaceStateByPath.js
├── connectSlicedState.js
├── index.js
├── connection.js
├── utils
│ └── defaultMemoize.js
├── wrapReducerWithSetGlobalState.js
├── update.js
└── withState.js
├── .eslintrc
├── webpack.config.js
├── LICENSE
├── package.json
├── README.md
└── dist
└── index.js
/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
2 |
--------------------------------------------------------------------------------
/examples/simple/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | "presets": ["react", "es2015"],
3 | "plugins": ["transform-object-rest-spread"]
4 | }
--------------------------------------------------------------------------------
/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | "presets": [
3 | "react",
4 | "es2015"
5 | ],
6 | "plugins": ["babel-plugin-transform-object-rest-spread"]
7 | }
--------------------------------------------------------------------------------
/src/constants.js:
--------------------------------------------------------------------------------
1 | export const SET_STATE_BY_PATH = 'reduceless/SET_GLOBAL_STATE';
2 | export const REPLACE_STATE_BY_PATH = 'reduceless/REPLACE_STATE_BY_PATH';
3 |
--------------------------------------------------------------------------------
/examples/advanced/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | "presets": ["react", "es2016"],
3 | "plugins": ["transform-object-rest-spread", "transform-decorators-legacy", "transform-class-properties"]
4 | }
--------------------------------------------------------------------------------
/src/initialStateReducer.js:
--------------------------------------------------------------------------------
1 | export default function initialStateReducer(initialState = {}) {
2 | return (state = initialState, action) => state; // eslint-disable-line no-unused-vars
3 | }
4 |
--------------------------------------------------------------------------------
/src/setStateByPath.js:
--------------------------------------------------------------------------------
1 | import {SET_STATE_BY_PATH} from './constants';
2 |
3 | const setStateByPath = (path, value) => {
4 | return {
5 | type: SET_STATE_BY_PATH,
6 | path,
7 | value,
8 | };
9 | };
10 |
11 | export default setStateByPath;
12 |
13 |
--------------------------------------------------------------------------------
/src/replaceStateByPath.js:
--------------------------------------------------------------------------------
1 | import {REPLACE_STATE_BY_PATH} from './constants';
2 |
3 | const replaceStateByPath = (path, value) => {
4 | return {
5 | type: REPLACE_STATE_BY_PATH,
6 | path,
7 | value,
8 | };
9 | };
10 |
11 | export default replaceStateByPath;
12 |
13 |
--------------------------------------------------------------------------------
/examples/advanced/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Reduceless examples
6 |
7 |
8 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/examples/simple/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Reduceless examples
6 |
7 |
8 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.eslintrc:
--------------------------------------------------------------------------------
1 | {
2 | "parser": "babel-eslint",
3 | "extends": "eslint-config-airbnb",
4 | "rules": {
5 | "no-console": 0,
6 | "comma-dangle": [2, "always-multiline"],
7 | "id-length": 0,
8 | "indent": [2, 2, {"SwitchCase": 1}],
9 | "object-curly-spacing": 0,
10 | "quote-props": 0,
11 | "no-unused-expressions": 0,
12 | "max-len": [2, 140, 2, {
13 | "ignoreUrls": true,
14 | "ignoreComments": true
15 | }],
16 | "no-else-return": 0,
17 | "arrow-body-style": 0
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/src/connectSlicedState.js:
--------------------------------------------------------------------------------
1 | import connection from './connection';
2 | import withState from './withState';
3 |
4 | /**
5 | * Connect provided component to `path` part of the redux state
6 | * @param path
7 | * @param stateName
8 | * @param setStateName
9 | * @param replaceStateName
10 | * @returns {Function}
11 | */
12 | export default function connectSlicedState(path, stateName = 'state', setStateName = 'setState', replaceStateName = 'replaceState') {
13 | return connection([
14 | withState(path, stateName, setStateName, replaceStateName),
15 | ]);
16 | }
17 |
--------------------------------------------------------------------------------
/src/index.js:
--------------------------------------------------------------------------------
1 | import update from './update';
2 | import setStateByPath from './setStateByPath';
3 | import replaceStateByPath from './replaceStateByPath';
4 | import wrapReducerWithSetGlobalState from './wrapReducerWithSetGlobalState';
5 | import connectSlicedState from './connectSlicedState';
6 | import initialStateReducer from './initialStateReducer';
7 | import withState from './withState';
8 | import connection from './connection';
9 |
10 | export {
11 | update,
12 | wrapReducerWithSetGlobalState,
13 | setStateByPath,
14 | replaceStateByPath,
15 | connectSlicedState,
16 | initialStateReducer,
17 | withState,
18 | connection,
19 | };
20 |
--------------------------------------------------------------------------------
/src/connection.js:
--------------------------------------------------------------------------------
1 | import {connect} from 'react-redux';
2 |
3 | /**
4 | * Connect provided component to `path` part of the redux state
5 | * @param connectors
6 | * @returns {Function}
7 | */
8 | export default function connections(connectors = []) {
9 | return WrappedComponent => {
10 | return connect(
11 | state => state,
12 | dispatch => ({dispatch}),
13 | (state, {dispatch}, props) => {
14 | return connectors.reduce((newProps, connector) => {
15 | return {
16 | ...newProps,
17 | ...connector(state, {dispatch}, props),
18 | };
19 | }, {...props});
20 | }
21 | )(WrappedComponent);
22 | };
23 | }
24 |
--------------------------------------------------------------------------------
/examples/advanced/webpack.config.dev.js:
--------------------------------------------------------------------------------
1 | var path = require('path');
2 | var webpack = require('webpack');
3 |
4 | module.exports = {
5 | devtool: 'eval',
6 | entry: [
7 | 'webpack-hot-middleware/client',
8 | './src/index'
9 | ],
10 | output: {
11 | path: path.join(__dirname, 'dist'),
12 | filename: 'bundle.js',
13 | publicPath: '/dist/'
14 | },
15 | plugins: [
16 | new webpack.optimize.OccurenceOrderPlugin(),
17 | new webpack.HotModuleReplacementPlugin(),
18 | ],
19 | module: {
20 | loaders: [
21 | {
22 | test: /\.js$/,
23 | loaders: ['babel'],
24 | include: [path.join(__dirname, 'src'), path.join(__dirname, '../../src')]
25 | },
26 | ]
27 | }
28 | };
--------------------------------------------------------------------------------
/examples/simple/webpack.config.dev.js:
--------------------------------------------------------------------------------
1 | var path = require('path');
2 | var webpack = require('webpack');
3 |
4 | module.exports = {
5 | devtool: 'eval',
6 | entry: [
7 | 'webpack-hot-middleware/client',
8 | './src/index'
9 | ],
10 | output: {
11 | path: path.join(__dirname, 'dist'),
12 | filename: 'bundle.js',
13 | publicPath: '/dist/'
14 | },
15 | plugins: [
16 | new webpack.optimize.OccurenceOrderPlugin(),
17 | new webpack.HotModuleReplacementPlugin(),
18 | ],
19 | module: {
20 | loaders: [
21 | {
22 | test: /\.js$/,
23 | loaders: ['babel'],
24 | include: [path.join(__dirname, 'src'), path.join(__dirname, '../../src')]
25 | },
26 | ]
27 | }
28 | };
--------------------------------------------------------------------------------
/examples/simple/server.js:
--------------------------------------------------------------------------------
1 | var path = require('path');
2 | var express = require('express');
3 | var webpack = require('webpack');
4 | var config = require('./webpack.config.dev');
5 |
6 | var app = express();
7 | var compiler = webpack(config);
8 |
9 | app.use(require('webpack-dev-middleware')(compiler, {
10 | noInfo: true,
11 | publicPath: config.output.publicPath
12 | }));
13 |
14 | app.use(require('webpack-hot-middleware')(compiler));
15 |
16 | app.get('*', function(req, res) {
17 | res.sendFile(path.join(__dirname, 'index.html'));
18 | });
19 |
20 | app.listen(3030, 'localhost', function(err) {
21 | if (err) {
22 | console.log(err);
23 | return;
24 | }
25 |
26 | console.log('Listening at http://localhost:3030');
27 | });
--------------------------------------------------------------------------------
/examples/advanced/server.js:
--------------------------------------------------------------------------------
1 | var path = require('path');
2 | var express = require('express');
3 | var webpack = require('webpack');
4 | var config = require('./webpack.config.dev');
5 |
6 | var app = express();
7 | var compiler = webpack(config);
8 |
9 | app.use(require('webpack-dev-middleware')(compiler, {
10 | noInfo: true,
11 | publicPath: config.output.publicPath
12 | }));
13 |
14 | app.use(require('webpack-hot-middleware')(compiler));
15 |
16 | app.get('*', function(req, res) {
17 | res.sendFile(path.join(__dirname, 'index.html'));
18 | });
19 |
20 | app.listen(3030, 'localhost', function(err) {
21 | if (err) {
22 | console.log(err);
23 | return;
24 | }
25 |
26 | console.log('Listening at http://localhost:3030');
27 | });
--------------------------------------------------------------------------------
/src/utils/defaultMemoize.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Memoizing function.
3 | *
4 | * Copied from `reselect` library.
5 | * https://github.com/reactjs/reselect/blob/master/src/index.js
6 | *
7 | */
8 |
9 |
10 | function defaultEqualityCheck(a, b) {
11 | return a === b;
12 | }
13 |
14 | export function defaultMemoize(func, equalityCheck = defaultEqualityCheck) {
15 | let lastArgs = null;
16 | let lastResult = null;
17 | return (...args) => {
18 | if (
19 | lastArgs !== null &&
20 | lastArgs.length === args.length &&
21 | args.every((value, index) => equalityCheck(value, lastArgs[index]))
22 | ) {
23 | return lastResult;
24 | }
25 | lastResult = func(...args);
26 | lastArgs = args;
27 | return lastResult;
28 | };
29 | }
30 |
--------------------------------------------------------------------------------
/src/wrapReducerWithSetGlobalState.js:
--------------------------------------------------------------------------------
1 | import {SET_STATE_BY_PATH, REPLACE_STATE_BY_PATH} from './constants';
2 | import update from './update';
3 | import get from 'lodash/get';
4 |
5 | const setGlobalStateReducer = (state = {}, action) => {
6 | switch (action.type) {
7 | case SET_STATE_BY_PATH:
8 | const oldState = get(state, action.path, {});
9 | const newValue = {
10 | ...oldState,
11 | ...action.value,
12 | };
13 | return update(state, action.path, newValue);
14 | case REPLACE_STATE_BY_PATH:
15 | return update(state, action.path, action.value);
16 | default:
17 | return state;
18 | }
19 | };
20 |
21 | const wrapReducerWithSetGlobalState = (reducer = (s) => s) => {
22 | return (state = {}, action) => {
23 | const updatedState = setGlobalStateReducer(state, action);
24 | return reducer(updatedState, action);
25 | };
26 | };
27 |
28 | export default wrapReducerWithSetGlobalState;
29 |
--------------------------------------------------------------------------------
/examples/advanced/src/App.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import {connectSlicedState} from '../../../src';
3 | import User from './User';
4 |
5 | /**
6 | * You can use decorators to simplify you code even more.
7 | * You can override prop names with `connectSlicedState(path, stateName, setStateName, replaceStateName)`
8 | * You can send `null` instead of any prop name if you don't need this prop at all
9 | */
10 | @connectSlicedState('site.settings.background', 'background', null, null)
11 | class App extends React.Component {
12 | render() {
13 | const {background} = this.props;
14 | return (
15 |
26 |
29 |
30 | )
31 | }
32 | }
33 |
34 | export default App;
35 |
--------------------------------------------------------------------------------
/webpack.config.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | var webpack = require('webpack')
4 |
5 | var reactExternal = {
6 | root: 'React',
7 | commonjs2: 'react',
8 | commonjs: 'react',
9 | amd: 'react',
10 | };
11 |
12 | var reduxExternal = {
13 | root: 'Redux',
14 | commonjs2: 'redux',
15 | commonjs: 'redux',
16 | amd: 'redux',
17 | };
18 |
19 | var reactReduxExternal = {
20 | root: 'React-redux',
21 | commonjs2: 'react-redux',
22 | commonjs: 'react-redux',
23 | amd: 'react-redux',
24 | };
25 |
26 | module.exports = {
27 | externals: {
28 | 'react': reactExternal,
29 | 'redux': reduxExternal,
30 | 'react-redux': reactReduxExternal,
31 | },
32 | module: {
33 | loaders: [
34 | { test: /\.js$/, loaders: ['babel-loader'], exclude: /node_modules/ }
35 | ]
36 | },
37 | output: {
38 | library: 'Reduceless',
39 | libraryTarget: 'umd'
40 | },
41 | plugins: [
42 | new webpack.optimize.OccurenceOrderPlugin(),
43 | new webpack.optimize.DedupePlugin(),
44 | ]
45 | };
46 |
--------------------------------------------------------------------------------
/examples/simple/src/Form.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import {connectSlicedState} from '../../../src';
3 |
4 | const Form = ({state, setState, replaceState}) => {
5 | return (
6 |
7 |
12 |
setState({'checked': !state.checked})}/>
16 |
setState({'text': e.target.value})}/>
19 |
20 | Checkbox: {state.checked.toString()}
21 |
22 |
23 | Text: {state.text}
24 |
25 |
26 | )
27 | }
28 |
29 | // Here magic is happening.
30 | // We are connecting our component to part of the state at 'test.contactsPage.leftBlock.form'
31 | export default connectSlicedState('test.contactsPage.leftBlock.form')(Form);
32 |
--------------------------------------------------------------------------------
/examples/simple/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "reduceless-example-one",
3 | "version": "0.0.1",
4 | "description": "",
5 | "main": "webpack.config.dev.js",
6 | "scripts": {
7 | "start": "node server.js"
8 | },
9 | "repository": {
10 | "type": "git",
11 | "url": "git+https://github.com/trashgenerator/reduceless.git"
12 | },
13 | "keywords": [
14 | "redux",
15 | "react"
16 | ],
17 | "author": "Alexander Nosov",
18 | "license": "MIT",
19 | "bugs": {
20 | "url": "https://github.com/trashgenerator/reduceless/issues"
21 | },
22 | "homepage": "https://github.com/trashgenerator/reduceless#readme",
23 | "dependencies": {
24 | "babel-core": "^6.7.7",
25 | "babel-polyfill": "^6.7.4",
26 | "babel-preset-react": "^6.5.0",
27 | "eslint": "^2.9.0",
28 | "express": "^4.13.4",
29 | "path": "^0.12.7",
30 | "react": "^15.0.2",
31 | "react-dom": "^15.0.2",
32 | "react-redux": "^4.4.5",
33 | "redux": "^3.5.2",
34 | "webpack": "^1.13.0",
35 | "webpack-dev-middleware": "^1.6.1",
36 | "webpack-hot-middleware": "^2.10.0"
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/src/update.js:
--------------------------------------------------------------------------------
1 | import clone from 'lodash/clone';
2 | import set from 'lodash/set';
3 | import isArray from 'lodash/isArray';
4 | import head from 'lodash/head';
5 | import tail from 'lodash/tail';
6 | import map from 'lodash/map';
7 |
8 |
9 | const update = (obj, path, nextValue) => {
10 | const pathArr = isArray(path) ? path : path.split('.');
11 | let newObj;
12 | if (!pathArr.length) {
13 | return nextValue;
14 | } else {
15 | if (!obj[pathArr[0]]) {
16 | newObj = clone(obj);
17 | set(newObj, pathArr, nextValue);
18 | return newObj;
19 | } else if (isArray(obj)) {
20 | newObj = clone(obj);
21 | newObj[head(pathArr)] = update(newObj[head(pathArr)], tail(pathArr), nextValue);
22 | return newObj;
23 | } else {
24 | newObj = {};
25 | map(obj, (value, key) => {
26 | if (key === pathArr[0]) {
27 | newObj[key] = update(value, tail(pathArr), nextValue);
28 | } else {
29 | newObj[key] = obj[key];
30 | }
31 | });
32 | return newObj;
33 | }
34 | }
35 | };
36 |
37 | export default update;
38 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2016 Alexander Nosov
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/examples/advanced/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "reduceless-example-two",
3 | "version": "0.0.1",
4 | "description": "",
5 | "main": "webpack.config.dev.js",
6 | "scripts": {
7 | "start": "node server.js"
8 | },
9 | "repository": {
10 | "type": "git",
11 | "url": "git+https://github.com/trashgenerator/reduceless.git"
12 | },
13 | "keywords": [
14 | "redux",
15 | "react"
16 | ],
17 | "author": "Alexander Nosov",
18 | "license": "MIT",
19 | "bugs": {
20 | "url": "https://github.com/trashgenerator/reduceless/issues"
21 | },
22 | "homepage": "https://github.com/trashgenerator/reduceless#readme",
23 | "dependencies": {
24 | "babel-core": "^6.7.7",
25 | "babel-plugin-transform-class-properties": "^6.9.0",
26 | "babel-plugin-transform-decorators-legacy": "^1.3.4",
27 | "babel-polyfill": "^6.7.4",
28 | "babel-preset-es2016": "^6.0.11",
29 | "babel-preset-react": "^6.5.0",
30 | "eslint": "^2.9.0",
31 | "express": "^4.13.4",
32 | "path": "^0.12.7",
33 | "react": "^15.0.2",
34 | "react-dom": "^15.0.2",
35 | "react-redux": "^4.4.5",
36 | "redux": "^3.5.2",
37 | "webpack": "^1.13.0",
38 | "webpack-dev-middleware": "^1.6.1",
39 | "webpack-hot-middleware": "^2.10.0"
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/examples/simple/src/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import {render} from 'react-dom';
3 | import {Provider} from 'react-redux';
4 | import {createStore, combineReducers, compose} from 'redux';
5 | import {wrapReducerWithSetGlobalState, initialStateReducer} from '../../../src';
6 | import Form from './Form';
7 |
8 | // wrap your reducers
9 | const reducer = wrapReducerWithSetGlobalState(
10 | // Your normal reducers go here
11 | combineReducers({
12 | // reducer1,
13 | // reducer2,
14 |
15 | // you can use `initialStateReducer` if you don't need any complex functionality inside
16 | test: initialStateReducer({
17 | contactsPage: {
18 | leftBlock: {
19 | form: {
20 | checked: false,
21 | text: '',
22 | }
23 | }
24 | }
25 | })
26 | })
27 | );
28 |
29 | // Usual react+redux stuff here
30 | const configureStore = () => {
31 | return compose(
32 | window.devToolsExtension ? window.devToolsExtension() : f => f
33 | )(createStore)(reducer);
34 | }
35 |
36 | const store = configureStore();
37 |
38 | class Root extends React.Component {
39 | render() {
40 | return (
41 |
46 | );
47 | }
48 | }
49 |
50 | render( , document.getElementById('root'));
51 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "reduceless",
3 | "version": "0.2.4",
4 | "description": "Redux helpers",
5 | "main": "dist/index.js",
6 | "peerDependencies": {
7 | "react": "^15.0.2",
8 | "react-redux": "^4.4.5",
9 | "redux": "^3.5.2"
10 | },
11 | "dependencies": {},
12 | "devDependencies": {
13 | "babel-cli": "^6.7.7",
14 | "babel-core": "^6.7.7",
15 | "babel-eslint": "^6.0.3",
16 | "babel-loader": "^6.2.4",
17 | "babel-plugin-transform-object-rest-spread": "^6.6.5",
18 | "babel-preset-es2015": "^6.6.0",
19 | "babel-preset-react": "^6.5.0",
20 | "eslint": "^2.8.0",
21 | "eslint-config-airbnb": "^8.0.0",
22 | "eslint-plugin-import": "^1.5.0",
23 | "eslint-plugin-jsx-a11y": "^1.0.2",
24 | "eslint-plugin-react": "^5.0.1",
25 | "lodash": "^4.11.1",
26 | "webpack": "^1.13.0"
27 | },
28 | "scripts": {
29 | "build": "webpack src/index.js dist/index.js",
30 | "eslint": "eslint src/ --fix"
31 | },
32 | "repository": {
33 | "type": "git",
34 | "url": "git+https://github.com/trashgenerator/reduceless.git"
35 | },
36 | "keywords": [
37 | "redux",
38 | "react"
39 | ],
40 | "author": "Alexander Nosov",
41 | "license": "MIT",
42 | "bugs": {
43 | "url": "https://github.com/trashgenerator/reduceless/issues"
44 | },
45 | "homepage": "https://github.com/trashgenerator/reduceless#readme"
46 | }
47 |
--------------------------------------------------------------------------------
/examples/advanced/src/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import {render} from 'react-dom';
3 | import {Provider} from 'react-redux';
4 | import {createStore, combineReducers, compose} from 'redux';
5 | import {wrapReducerWithSetGlobalState, initialStateReducer} from '../../../src';
6 | import App from './App';
7 |
8 | // wrap your reducers
9 | const reducer = wrapReducerWithSetGlobalState(
10 | // Your normal reducers go here
11 | combineReducers({
12 | // reducer1,
13 | // reducer2,
14 |
15 | // you can use `initialStateReducer` if you don't need any complex functionality inside
16 | site: initialStateReducer({
17 | pages: {
18 | userPage: {
19 | selectedTab: 'tab1',
20 | },
21 | someOtherPage: {
22 | // ...
23 | }
24 | },
25 | entities: {
26 | users: {
27 | 'id1': {
28 | name: 'John Snow',
29 | isDead: true,
30 | },
31 | // ...
32 | }
33 | },
34 | settings: {
35 | background: 'white'
36 | }
37 | })
38 | })
39 | );
40 |
41 | // Usual react+redux stuff here
42 | const configureStore = () => {
43 | return compose(
44 | window.devToolsExtension ? window.devToolsExtension() : f => f
45 | )(createStore)(reducer);
46 | }
47 |
48 | const store = configureStore();
49 |
50 | class Root extends React.Component {
51 | render() {
52 | return (
53 |
58 | );
59 | }
60 | }
61 |
62 | render( , document.getElementById('root'));
63 |
--------------------------------------------------------------------------------
/src/withState.js:
--------------------------------------------------------------------------------
1 | import get from 'lodash/get';
2 | import isFunction from 'lodash/isFunction';
3 | import setStateByPath from './setStateByPath';
4 | import replaceStateByPath from './replaceStateByPath';
5 | import {defaultMemoize} from './utils/defaultMemoize';
6 |
7 | // action creators that can be memoized
8 | const setStateCreator = (realPath, dispatch) => newState => dispatch(setStateByPath(realPath, newState));
9 | const replaceStateCreator = (realPath, dispatch) => newState => dispatch(replaceStateByPath(realPath, newState));
10 |
11 | /**
12 | * Connect provided component to `path` part of the redux state
13 | *
14 | * Generated props are cached. So your component will not be rerendered if state slice didn't change.
15 | *
16 | * @param path
17 | * @param stateName
18 | * @param setStateName
19 | * @param replaceStateName
20 | * @returns {Function}
21 | */
22 | export default function withState(path, stateName = 'state', setStateName = 'setState', replaceStateName = 'replaceState') {
23 | // memoizing action creators.
24 | const setStateCreatorMemoized = defaultMemoize(setStateCreator);
25 | const replaceStateCreatorMemoized = defaultMemoize(replaceStateCreator);
26 |
27 | return (state, {dispatch}, props) => {
28 | const realPath = isFunction(path) ? path(props) : path;
29 | const slicedState = get(state, realPath);
30 | const result = {
31 | ...props,
32 | };
33 | if (stateName) {
34 | result[stateName] = slicedState;
35 | }
36 | if (setStateName) {
37 | result[setStateName] = setStateCreatorMemoized(realPath, dispatch);
38 | }
39 | if (replaceStateName) {
40 | result[replaceStateName] = replaceStateCreatorMemoized(realPath, dispatch);
41 | }
42 | return result;
43 | };
44 | }
45 |
--------------------------------------------------------------------------------
/examples/advanced/src/User.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import {connection, withState} from '../../../src';
3 | import _ from 'lodash'
4 |
5 | /**
6 | * You can use `connection` to use `connect` function from `react-redux` to connect multiple things at once
7 | *
8 | */
9 | @connection([
10 | withState('site.pages.userPage.selectedTab', 'selectedTab', null, 'selectTab'),
11 | withState(props => `site.entities.users.${props.userId}`, 'user', 'updateUser', null),
12 | withState('site.settings.background', 'background', null, 'changeBackground'),
13 | ])
14 | class User extends React.Component {
15 | changeBackground = () => {
16 | const {background, changeBackground} = this.props;
17 | const backgrounds = ['white', 'red', 'blue']
18 | changeBackground(_.sample(_.without(backgrounds, background)));
19 | }
20 |
21 | render() {
22 | const {selectedTab, selectTab, user, updateUser, background} = this.props;
23 | return (
24 |
53 | )
54 | }
55 | }
56 |
57 | export default User;
58 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Reduceless
2 | Simple abstraction over Redux to make state management as easy as React's vanilla `setState()` but with advantages of Redux.
3 |
4 | The idea is easy: you connect component to a slice of your Redux state to give this component full control over this part of the state. It can read from this state and write to it in React style with `setState` and `replaceState`. You don't need any custom reducers, actions or constants to do it. Just read state and write to it.
5 |
6 | Don't worry you are still able to use Redux in the normal way. It's just set of helper to avoid boilerplate for simple actions.
7 |
8 | ## Installation
9 |
10 | ```sh
11 | npm install reduceless --save
12 | ```
13 |
14 | ## How to use:
15 | 1.wrap your root reducer with `wrapReducerWithSetGlobalState`
16 |
17 | ```js
18 | import {wrapReducerWithSetGlobalState} from 'reduceless';
19 |
20 | const reducer = wrapReducerWithSetGlobalState(
21 | // Your normal reducers are going here
22 | // combineReducers({
23 | // reducer1,
24 | // reducer2,
25 | // })
26 | );
27 | ```
28 |
29 | 2.connect your component to a slice of your state
30 |
31 | ```js
32 | import {connectSlicedState} from 'reduceless';
33 |
34 | @connectSlicedState('pages.blogs.data.activePost')
35 | const PostForm = ({state, setState, replaceState}) => {
36 | return (
37 |
38 | setState({'checked': !state.checked})}/>
42 |
43 | value: {state.checked.toString()}
44 |
45 | )
46 | }
47 | ```
48 |
49 | `PostForm` component will recieve part of your Redux state located at `pages.blogs.data.activePost` in `state` prop. Component can change it using `setState(newState)` and `replaceState(newState)` props. This path could even not exist. It will be created automatically when component will write to it.
50 |
51 | 3.[Optional] Use can use `replaceStateByPath` and `setStateByPath` action creators for advanced scenarios.
52 |
53 | ```js
54 | import {connectSlicedState} from 'reduceless';
55 | import _ from 'lodash';
56 |
57 | const Form = ({checked, setChecked}) => {
58 | return (
59 |
60 | setChecked({'checked': !state.checked})}/>
64 |
65 | value: {checked.toString()}
66 |
67 | )
68 | }
69 |
70 | export default connect(
71 | (state, props) => ({
72 | checked: _.get(state, 'pages.blogs.data.activePost'),
73 | }),
74 | dispatch => ({
75 | setChecked: checked => dispatch(replaceStateByPath('pages.blogs.data.activePost', checked)),
76 | })
77 | )(Form);
78 | ```
79 |
80 | Still no actions, reducers or constants.
81 |
82 | 4.[Optional] use initialReducer
83 | // TODO
84 |
85 | ## Basic API
86 | ###`wrapReducerWithSetGlobalState(reducer)`
87 | Wraps your reducer(probably at root level but you can use it in any level of your reducers tree) with another reducer that catches events sent by `reduceless`(`SET_STATE_BY_PATH`, `REPLACE_STATE_BY_PATH`).
88 |
89 | ###`connectSlicedState(path)(component)`
90 | Connects your `component` to a slice of your redux state located at `path`. Sends following props to the `component`:
91 |
92 | 1. `state` - slice of the state located at `path`. It doesn't matter what exaclty is stored there. It could be object, array, simple value. Actually there could be no such path in your state at all. In that case you will get `state === undefined` so you can use `defaultProps` to populate this prop.
93 |
94 | 2. `setState(newState)` – action (already wrapped in dispatch) that will _merge_ slice of the state located at `path` with `newState`. If this path does not exist in your redux state it will be created. Calls `setStateByPath` under the hood.
95 |
96 | 4. `replaceState(newState)` – action (already wrapped in dispatch) that will _replace_ slice of the state located at `path` with `newState`. If this path is does not exist in your redux state it will be created. Calls `replaceStateByPath` under the hood.
97 |
98 | ## Advanced API
99 | ###`setStateByPath(path, newState)`
100 | Action creator that merges state located by `path` with `newState`.
101 |
102 | ```js
103 | dispatch(setStateByPath('posts.3.data', {title: 'new title'}))
104 | ```
105 |
106 | ### `replaceStateByPath(path, newState)`
107 | Action creator that merges state located by `path` with `newState`.
108 |
109 | ```js
110 | dispatch(replaceStateByPath('posts.3.data.title', 'new title'))
111 | ```
112 |
--------------------------------------------------------------------------------
/dist/index.js:
--------------------------------------------------------------------------------
1 | (function webpackUniversalModuleDefinition(root, factory) {
2 | if(typeof exports === 'object' && typeof module === 'object')
3 | module.exports = factory(require("react-redux"));
4 | else if(typeof define === 'function' && define.amd)
5 | define(["react-redux"], factory);
6 | else if(typeof exports === 'object')
7 | exports["Reduceless"] = factory(require("react-redux"));
8 | else
9 | root["Reduceless"] = factory(root["React-redux"]);
10 | })(this, function(__WEBPACK_EXTERNAL_MODULE_149__) {
11 | return /******/ (function(modules) { // webpackBootstrap
12 | /******/ // The module cache
13 | /******/ var installedModules = {};
14 |
15 | /******/ // The require function
16 | /******/ function __webpack_require__(moduleId) {
17 |
18 | /******/ // Check if module is in cache
19 | /******/ if(installedModules[moduleId])
20 | /******/ return installedModules[moduleId].exports;
21 |
22 | /******/ // Create a new module (and put it into the cache)
23 | /******/ var module = installedModules[moduleId] = {
24 | /******/ exports: {},
25 | /******/ id: moduleId,
26 | /******/ loaded: false
27 | /******/ };
28 |
29 | /******/ // Execute the module function
30 | /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
31 |
32 | /******/ // Flag the module as loaded
33 | /******/ module.loaded = true;
34 |
35 | /******/ // Return the exports of the module
36 | /******/ return module.exports;
37 | /******/ }
38 |
39 |
40 | /******/ // expose the modules object (__webpack_modules__)
41 | /******/ __webpack_require__.m = modules;
42 |
43 | /******/ // expose the module cache
44 | /******/ __webpack_require__.c = installedModules;
45 |
46 | /******/ // __webpack_public_path__
47 | /******/ __webpack_require__.p = "";
48 |
49 | /******/ // Load entry module and return exports
50 | /******/ return __webpack_require__(0);
51 | /******/ })
52 | /************************************************************************/
53 | /******/ ([
54 | /* 0 */
55 | /***/ function(module, exports, __webpack_require__) {
56 |
57 | 'use strict';
58 |
59 | Object.defineProperty(exports, "__esModule", {
60 | value: true
61 | });
62 | exports.connection = exports.withState = exports.initialStateReducer = exports.connectSlicedState = exports.replaceStateByPath = exports.setStateByPath = exports.wrapReducerWithSetGlobalState = exports.update = undefined;
63 |
64 | var _update = __webpack_require__(29);
65 |
66 | var _update2 = _interopRequireDefault(_update);
67 |
68 | var _setStateByPath = __webpack_require__(28);
69 |
70 | var _setStateByPath2 = _interopRequireDefault(_setStateByPath);
71 |
72 | var _replaceStateByPath = __webpack_require__(27);
73 |
74 | var _replaceStateByPath2 = _interopRequireDefault(_replaceStateByPath);
75 |
76 | var _wrapReducerWithSetGlobalState = __webpack_require__(62);
77 |
78 | var _wrapReducerWithSetGlobalState2 = _interopRequireDefault(_wrapReducerWithSetGlobalState);
79 |
80 | var _connectSlicedState = __webpack_require__(59);
81 |
82 | var _connectSlicedState2 = _interopRequireDefault(_connectSlicedState);
83 |
84 | var _initialStateReducer = __webpack_require__(60);
85 |
86 | var _initialStateReducer2 = _interopRequireDefault(_initialStateReducer);
87 |
88 | var _withState = __webpack_require__(30);
89 |
90 | var _withState2 = _interopRequireDefault(_withState);
91 |
92 | var _connection = __webpack_require__(26);
93 |
94 | var _connection2 = _interopRequireDefault(_connection);
95 |
96 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
97 |
98 | exports.update = _update2.default;
99 | exports.wrapReducerWithSetGlobalState = _wrapReducerWithSetGlobalState2.default;
100 | exports.setStateByPath = _setStateByPath2.default;
101 | exports.replaceStateByPath = _replaceStateByPath2.default;
102 | exports.connectSlicedState = _connectSlicedState2.default;
103 | exports.initialStateReducer = _initialStateReducer2.default;
104 | exports.withState = _withState2.default;
105 | exports.connection = _connection2.default;
106 |
107 | /***/ },
108 | /* 1 */
109 | /***/ function(module, exports) {
110 |
111 | /**
112 | * Checks if `value` is classified as an `Array` object.
113 | *
114 | * @static
115 | * @memberOf _
116 | * @since 0.1.0
117 | * @type {Function}
118 | * @category Lang
119 | * @param {*} value The value to check.
120 | * @returns {boolean} Returns `true` if `value` is correctly classified,
121 | * else `false`.
122 | * @example
123 | *
124 | * _.isArray([1, 2, 3]);
125 | * // => true
126 | *
127 | * _.isArray(document.body.children);
128 | * // => false
129 | *
130 | * _.isArray('abc');
131 | * // => false
132 | *
133 | * _.isArray(_.noop);
134 | * // => false
135 | */
136 | var isArray = Array.isArray;
137 |
138 | module.exports = isArray;
139 |
140 |
141 | /***/ },
142 | /* 2 */
143 | /***/ function(module, exports, __webpack_require__) {
144 |
145 | /* WEBPACK VAR INJECTION */(function(module, global) {var checkGlobal = __webpack_require__(94);
146 |
147 | /** Used to determine if values are of the language type `Object`. */
148 | var objectTypes = {
149 | 'function': true,
150 | 'object': true
151 | };
152 |
153 | /** Detect free variable `exports`. */
154 | var freeExports = (objectTypes[typeof exports] && exports && !exports.nodeType)
155 | ? exports
156 | : undefined;
157 |
158 | /** Detect free variable `module`. */
159 | var freeModule = (objectTypes[typeof module] && module && !module.nodeType)
160 | ? module
161 | : undefined;
162 |
163 | /** Detect free variable `global` from Node.js. */
164 | var freeGlobal = checkGlobal(freeExports && freeModule && typeof global == 'object' && global);
165 |
166 | /** Detect free variable `self`. */
167 | var freeSelf = checkGlobal(objectTypes[typeof self] && self);
168 |
169 | /** Detect free variable `window`. */
170 | var freeWindow = checkGlobal(objectTypes[typeof window] && window);
171 |
172 | /** Detect `this` as the global object. */
173 | var thisGlobal = checkGlobal(objectTypes[typeof this] && this);
174 |
175 | /**
176 | * Used as a reference to the global object.
177 | *
178 | * The `this` value is used if it's the global object to avoid Greasemonkey's
179 | * restricted `window` object, otherwise the `window` object is used.
180 | */
181 | var root = freeGlobal ||
182 | ((freeWindow !== (thisGlobal && thisGlobal.window)) && freeWindow) ||
183 | freeSelf || thisGlobal || Function('return this')();
184 |
185 | module.exports = root;
186 |
187 | /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(58)(module), (function() { return this; }())))
188 |
189 | /***/ },
190 | /* 3 */
191 | /***/ function(module, exports) {
192 |
193 | /**
194 | * Checks if `value` is the
195 | * [language type](http://www.ecma-international.org/ecma-262/6.0/#sec-ecmascript-language-types)
196 | * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
197 | *
198 | * @static
199 | * @memberOf _
200 | * @since 0.1.0
201 | * @category Lang
202 | * @param {*} value The value to check.
203 | * @returns {boolean} Returns `true` if `value` is an object, else `false`.
204 | * @example
205 | *
206 | * _.isObject({});
207 | * // => true
208 | *
209 | * _.isObject([1, 2, 3]);
210 | * // => true
211 | *
212 | * _.isObject(_.noop);
213 | * // => true
214 | *
215 | * _.isObject(null);
216 | * // => false
217 | */
218 | function isObject(value) {
219 | var type = typeof value;
220 | return !!value && (type == 'object' || type == 'function');
221 | }
222 |
223 | module.exports = isObject;
224 |
225 |
226 | /***/ },
227 | /* 4 */
228 | /***/ function(module, exports, __webpack_require__) {
229 |
230 | var getNative = __webpack_require__(5),
231 | root = __webpack_require__(2);
232 |
233 | /* Built-in method references that are verified to be native. */
234 | var Map = getNative(root, 'Map');
235 |
236 | module.exports = Map;
237 |
238 |
239 | /***/ },
240 | /* 5 */
241 | /***/ function(module, exports, __webpack_require__) {
242 |
243 | var isNative = __webpack_require__(138);
244 |
245 | /**
246 | * Gets the native function at `key` of `object`.
247 | *
248 | * @private
249 | * @param {Object} object The object to query.
250 | * @param {string} key The key of the method to get.
251 | * @returns {*} Returns the function if it's native, else `undefined`.
252 | */
253 | function getNative(object, key) {
254 | var value = object[key];
255 | return isNative(value) ? value : undefined;
256 | }
257 |
258 | module.exports = getNative;
259 |
260 |
261 | /***/ },
262 | /* 6 */
263 | /***/ function(module, exports, __webpack_require__) {
264 |
265 | var baseHas = __webpack_require__(40),
266 | baseKeys = __webpack_require__(84),
267 | indexKeys = __webpack_require__(115),
268 | isArrayLike = __webpack_require__(13),
269 | isIndex = __webpack_require__(24),
270 | isPrototype = __webpack_require__(49);
271 |
272 | /**
273 | * Creates an array of the own enumerable property names of `object`.
274 | *
275 | * **Note:** Non-object values are coerced to objects. See the
276 | * [ES spec](http://ecma-international.org/ecma-262/6.0/#sec-object.keys)
277 | * for more details.
278 | *
279 | * @static
280 | * @since 0.1.0
281 | * @memberOf _
282 | * @category Object
283 | * @param {Object} object The object to query.
284 | * @returns {Array} Returns the array of property names.
285 | * @example
286 | *
287 | * function Foo() {
288 | * this.a = 1;
289 | * this.b = 2;
290 | * }
291 | *
292 | * Foo.prototype.c = 3;
293 | *
294 | * _.keys(new Foo);
295 | * // => ['a', 'b'] (iteration order is not guaranteed)
296 | *
297 | * _.keys('hi');
298 | * // => ['0', '1']
299 | */
300 | function keys(object) {
301 | var isProto = isPrototype(object);
302 | if (!(isProto || isArrayLike(object))) {
303 | return baseKeys(object);
304 | }
305 | var indexes = indexKeys(object),
306 | skipIndexes = !!indexes,
307 | result = indexes || [],
308 | length = result.length;
309 |
310 | for (var key in object) {
311 | if (baseHas(object, key) &&
312 | !(skipIndexes && (key == 'length' || isIndex(key, length))) &&
313 | !(isProto && key == 'constructor')) {
314 | result.push(key);
315 | }
316 | }
317 | return result;
318 | }
319 |
320 | module.exports = keys;
321 |
322 |
323 | /***/ },
324 | /* 7 */
325 | /***/ function(module, exports, __webpack_require__) {
326 |
327 | var isArray = __webpack_require__(1),
328 | isSymbol = __webpack_require__(16);
329 |
330 | /** Used to match property names within property paths. */
331 | var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
332 | reIsPlainProp = /^\w*$/;
333 |
334 | /**
335 | * Checks if `value` is a property name and not a property path.
336 | *
337 | * @private
338 | * @param {*} value The value to check.
339 | * @param {Object} [object] The object to query keys on.
340 | * @returns {boolean} Returns `true` if `value` is a property name, else `false`.
341 | */
342 | function isKey(value, object) {
343 | if (isArray(value)) {
344 | return false;
345 | }
346 | var type = typeof value;
347 | if (type == 'number' || type == 'symbol' || type == 'boolean' ||
348 | value == null || isSymbol(value)) {
349 | return true;
350 | }
351 | return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||
352 | (object != null && value in Object(object));
353 | }
354 |
355 | module.exports = isKey;
356 |
357 |
358 | /***/ },
359 | /* 8 */
360 | /***/ function(module, exports, __webpack_require__) {
361 |
362 | var isSymbol = __webpack_require__(16);
363 |
364 | /** Used as references for various `Number` constants. */
365 | var INFINITY = 1 / 0;
366 |
367 | /**
368 | * Converts `value` to a string key if it's not a string or symbol.
369 | *
370 | * @private
371 | * @param {*} value The value to inspect.
372 | * @returns {string|symbol} Returns the key.
373 | */
374 | function toKey(value) {
375 | if (typeof value == 'string' || isSymbol(value)) {
376 | return value;
377 | }
378 | var result = (value + '');
379 | return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
380 | }
381 |
382 | module.exports = toKey;
383 |
384 |
385 | /***/ },
386 | /* 9 */
387 | /***/ function(module, exports) {
388 |
389 | /**
390 | * Checks if `value` is object-like. A value is object-like if it's not `null`
391 | * and has a `typeof` result of "object".
392 | *
393 | * @static
394 | * @memberOf _
395 | * @since 4.0.0
396 | * @category Lang
397 | * @param {*} value The value to check.
398 | * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
399 | * @example
400 | *
401 | * _.isObjectLike({});
402 | * // => true
403 | *
404 | * _.isObjectLike([1, 2, 3]);
405 | * // => true
406 | *
407 | * _.isObjectLike(_.noop);
408 | * // => false
409 | *
410 | * _.isObjectLike(null);
411 | * // => false
412 | */
413 | function isObjectLike(value) {
414 | return !!value && typeof value == 'object';
415 | }
416 |
417 | module.exports = isObjectLike;
418 |
419 |
420 | /***/ },
421 | /* 10 */
422 | /***/ function(module, exports, __webpack_require__) {
423 |
424 | var eq = __webpack_require__(55);
425 |
426 | /**
427 | * Gets the index at which the `key` is found in `array` of key-value pairs.
428 | *
429 | * @private
430 | * @param {Array} array The array to search.
431 | * @param {*} key The key to search for.
432 | * @returns {number} Returns the index of the matched value, else `-1`.
433 | */
434 | function assocIndexOf(array, key) {
435 | var length = array.length;
436 | while (length--) {
437 | if (eq(array[length][0], key)) {
438 | return length;
439 | }
440 | }
441 | return -1;
442 | }
443 |
444 | module.exports = assocIndexOf;
445 |
446 |
447 | /***/ },
448 | /* 11 */
449 | /***/ function(module, exports) {
450 |
451 | /**
452 | * Checks if `value` is suitable for use as unique object key.
453 | *
454 | * @private
455 | * @param {*} value The value to check.
456 | * @returns {boolean} Returns `true` if `value` is suitable, else `false`.
457 | */
458 | function isKeyable(value) {
459 | var type = typeof value;
460 | return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
461 | ? (value !== '__proto__')
462 | : (value === null);
463 | }
464 |
465 | module.exports = isKeyable;
466 |
467 |
468 | /***/ },
469 | /* 12 */
470 | /***/ function(module, exports, __webpack_require__) {
471 |
472 | var getNative = __webpack_require__(5);
473 |
474 | /* Built-in method references that are verified to be native. */
475 | var nativeCreate = getNative(Object, 'create');
476 |
477 | module.exports = nativeCreate;
478 |
479 |
480 | /***/ },
481 | /* 13 */
482 | /***/ function(module, exports, __webpack_require__) {
483 |
484 | var getLength = __webpack_require__(109),
485 | isFunction = __webpack_require__(14),
486 | isLength = __webpack_require__(15);
487 |
488 | /**
489 | * Checks if `value` is array-like. A value is considered array-like if it's
490 | * not a function and has a `value.length` that's an integer greater than or
491 | * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
492 | *
493 | * @static
494 | * @memberOf _
495 | * @since 4.0.0
496 | * @category Lang
497 | * @param {*} value The value to check.
498 | * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
499 | * @example
500 | *
501 | * _.isArrayLike([1, 2, 3]);
502 | * // => true
503 | *
504 | * _.isArrayLike(document.body.children);
505 | * // => true
506 | *
507 | * _.isArrayLike('abc');
508 | * // => true
509 | *
510 | * _.isArrayLike(_.noop);
511 | * // => false
512 | */
513 | function isArrayLike(value) {
514 | return value != null && isLength(getLength(value)) && !isFunction(value);
515 | }
516 |
517 | module.exports = isArrayLike;
518 |
519 |
520 | /***/ },
521 | /* 14 */
522 | /***/ function(module, exports, __webpack_require__) {
523 |
524 | var isObject = __webpack_require__(3);
525 |
526 | /** `Object#toString` result references. */
527 | var funcTag = '[object Function]',
528 | genTag = '[object GeneratorFunction]';
529 |
530 | /** Used for built-in method references. */
531 | var objectProto = Object.prototype;
532 |
533 | /**
534 | * Used to resolve the
535 | * [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
536 | * of values.
537 | */
538 | var objectToString = objectProto.toString;
539 |
540 | /**
541 | * Checks if `value` is classified as a `Function` object.
542 | *
543 | * @static
544 | * @memberOf _
545 | * @since 0.1.0
546 | * @category Lang
547 | * @param {*} value The value to check.
548 | * @returns {boolean} Returns `true` if `value` is correctly classified,
549 | * else `false`.
550 | * @example
551 | *
552 | * _.isFunction(_);
553 | * // => true
554 | *
555 | * _.isFunction(/abc/);
556 | * // => false
557 | */
558 | function isFunction(value) {
559 | // The use of `Object#toString` avoids issues with the `typeof` operator
560 | // in Safari 8 which returns 'object' for typed array and weak map constructors,
561 | // and PhantomJS 1.9 which returns 'function' for `NodeList` instances.
562 | var tag = isObject(value) ? objectToString.call(value) : '';
563 | return tag == funcTag || tag == genTag;
564 | }
565 |
566 | module.exports = isFunction;
567 |
568 |
569 | /***/ },
570 | /* 15 */
571 | /***/ function(module, exports) {
572 |
573 | /** Used as references for various `Number` constants. */
574 | var MAX_SAFE_INTEGER = 9007199254740991;
575 |
576 | /**
577 | * Checks if `value` is a valid array-like length.
578 | *
579 | * **Note:** This function is loosely based on
580 | * [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength).
581 | *
582 | * @static
583 | * @memberOf _
584 | * @since 4.0.0
585 | * @category Lang
586 | * @param {*} value The value to check.
587 | * @returns {boolean} Returns `true` if `value` is a valid length,
588 | * else `false`.
589 | * @example
590 | *
591 | * _.isLength(3);
592 | * // => true
593 | *
594 | * _.isLength(Number.MIN_VALUE);
595 | * // => false
596 | *
597 | * _.isLength(Infinity);
598 | * // => false
599 | *
600 | * _.isLength('3');
601 | * // => false
602 | */
603 | function isLength(value) {
604 | return typeof value == 'number' &&
605 | value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
606 | }
607 |
608 | module.exports = isLength;
609 |
610 |
611 | /***/ },
612 | /* 16 */
613 | /***/ function(module, exports, __webpack_require__) {
614 |
615 | var isObjectLike = __webpack_require__(9);
616 |
617 | /** `Object#toString` result references. */
618 | var symbolTag = '[object Symbol]';
619 |
620 | /** Used for built-in method references. */
621 | var objectProto = Object.prototype;
622 |
623 | /**
624 | * Used to resolve the
625 | * [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
626 | * of values.
627 | */
628 | var objectToString = objectProto.toString;
629 |
630 | /**
631 | * Checks if `value` is classified as a `Symbol` primitive or object.
632 | *
633 | * @static
634 | * @memberOf _
635 | * @since 4.0.0
636 | * @category Lang
637 | * @param {*} value The value to check.
638 | * @returns {boolean} Returns `true` if `value` is correctly classified,
639 | * else `false`.
640 | * @example
641 | *
642 | * _.isSymbol(Symbol.iterator);
643 | * // => true
644 | *
645 | * _.isSymbol('abc');
646 | * // => false
647 | */
648 | function isSymbol(value) {
649 | return typeof value == 'symbol' ||
650 | (isObjectLike(value) && objectToString.call(value) == symbolTag);
651 | }
652 |
653 | module.exports = isSymbol;
654 |
655 |
656 | /***/ },
657 | /* 17 */
658 | /***/ function(module, exports) {
659 |
660 | 'use strict';
661 |
662 | Object.defineProperty(exports, "__esModule", {
663 | value: true
664 | });
665 | var SET_STATE_BY_PATH = exports.SET_STATE_BY_PATH = 'reduceless/SET_GLOBAL_STATE';
666 | var REPLACE_STATE_BY_PATH = exports.REPLACE_STATE_BY_PATH = 'reduceless/REPLACE_STATE_BY_PATH';
667 |
668 | /***/ },
669 | /* 18 */
670 | /***/ function(module, exports, __webpack_require__) {
671 |
672 | var stackClear = __webpack_require__(124),
673 | stackDelete = __webpack_require__(125),
674 | stackGet = __webpack_require__(126),
675 | stackHas = __webpack_require__(127),
676 | stackSet = __webpack_require__(128);
677 |
678 | /**
679 | * Creates a stack cache object to store key-value pairs.
680 | *
681 | * @private
682 | * @constructor
683 | * @param {Array} [values] The values to cache.
684 | */
685 | function Stack(values) {
686 | var index = -1,
687 | length = values ? values.length : 0;
688 |
689 | this.clear();
690 | while (++index < length) {
691 | var entry = values[index];
692 | this.set(entry[0], entry[1]);
693 | }
694 | }
695 |
696 | // Add methods to `Stack`.
697 | Stack.prototype.clear = stackClear;
698 | Stack.prototype['delete'] = stackDelete;
699 | Stack.prototype.get = stackGet;
700 | Stack.prototype.has = stackHas;
701 | Stack.prototype.set = stackSet;
702 |
703 | module.exports = Stack;
704 |
705 |
706 | /***/ },
707 | /* 19 */
708 | /***/ function(module, exports, __webpack_require__) {
709 |
710 | var root = __webpack_require__(2);
711 |
712 | /** Built-in value references. */
713 | var Symbol = root.Symbol;
714 |
715 | module.exports = Symbol;
716 |
717 |
718 | /***/ },
719 | /* 20 */
720 | /***/ function(module, exports, __webpack_require__) {
721 |
722 | var eq = __webpack_require__(55);
723 |
724 | /** Used for built-in method references. */
725 | var objectProto = Object.prototype;
726 |
727 | /** Used to check objects for own properties. */
728 | var hasOwnProperty = objectProto.hasOwnProperty;
729 |
730 | /**
731 | * Assigns `value` to `key` of `object` if the existing value is not equivalent
732 | * using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
733 | * for equality comparisons.
734 | *
735 | * @private
736 | * @param {Object} object The object to modify.
737 | * @param {string} key The key of the property to assign.
738 | * @param {*} value The value to assign.
739 | */
740 | function assignValue(object, key, value) {
741 | var objValue = object[key];
742 | if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||
743 | (value === undefined && !(key in object))) {
744 | object[key] = value;
745 | }
746 | }
747 |
748 | module.exports = assignValue;
749 |
750 |
751 | /***/ },
752 | /* 21 */
753 | /***/ function(module, exports, __webpack_require__) {
754 |
755 | var isArray = __webpack_require__(1),
756 | stringToPath = __webpack_require__(129);
757 |
758 | /**
759 | * Casts `value` to a path array if it's not one.
760 | *
761 | * @private
762 | * @param {*} value The value to inspect.
763 | * @returns {Array} Returns the cast property path array.
764 | */
765 | function castPath(value) {
766 | return isArray(value) ? value : stringToPath(value);
767 | }
768 |
769 | module.exports = castPath;
770 |
771 |
772 | /***/ },
773 | /* 22 */
774 | /***/ function(module, exports, __webpack_require__) {
775 |
776 | var Uint8Array = __webpack_require__(32);
777 |
778 | /**
779 | * Creates a clone of `arrayBuffer`.
780 | *
781 | * @private
782 | * @param {ArrayBuffer} arrayBuffer The array buffer to clone.
783 | * @returns {ArrayBuffer} Returns the cloned array buffer.
784 | */
785 | function cloneArrayBuffer(arrayBuffer) {
786 | var result = new arrayBuffer.constructor(arrayBuffer.byteLength);
787 | new Uint8Array(result).set(new Uint8Array(arrayBuffer));
788 | return result;
789 | }
790 |
791 | module.exports = cloneArrayBuffer;
792 |
793 |
794 | /***/ },
795 | /* 23 */
796 | /***/ function(module, exports) {
797 |
798 | /**
799 | * Checks if `value` is a host object in IE < 9.
800 | *
801 | * @private
802 | * @param {*} value The value to check.
803 | * @returns {boolean} Returns `true` if `value` is a host object, else `false`.
804 | */
805 | function isHostObject(value) {
806 | // Many host objects are `Object` objects that can coerce to strings
807 | // despite having improperly defined `toString` methods.
808 | var result = false;
809 | if (value != null && typeof value.toString != 'function') {
810 | try {
811 | result = !!(value + '');
812 | } catch (e) {}
813 | }
814 | return result;
815 | }
816 |
817 | module.exports = isHostObject;
818 |
819 |
820 | /***/ },
821 | /* 24 */
822 | /***/ function(module, exports) {
823 |
824 | /** Used as references for various `Number` constants. */
825 | var MAX_SAFE_INTEGER = 9007199254740991;
826 |
827 | /** Used to detect unsigned integer values. */
828 | var reIsUint = /^(?:0|[1-9]\d*)$/;
829 |
830 | /**
831 | * Checks if `value` is a valid array-like index.
832 | *
833 | * @private
834 | * @param {*} value The value to check.
835 | * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
836 | * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
837 | */
838 | function isIndex(value, length) {
839 | length = length == null ? MAX_SAFE_INTEGER : length;
840 | return !!length &&
841 | (typeof value == 'number' || reIsUint.test(value)) &&
842 | (value > -1 && value % 1 == 0 && value < length);
843 | }
844 |
845 | module.exports = isIndex;
846 |
847 |
848 | /***/ },
849 | /* 25 */
850 | /***/ function(module, exports, __webpack_require__) {
851 |
852 | var baseGet = __webpack_require__(39);
853 |
854 | /**
855 | * Gets the value at `path` of `object`. If the resolved value is
856 | * `undefined`, the `defaultValue` is used in its place.
857 | *
858 | * @static
859 | * @memberOf _
860 | * @since 3.7.0
861 | * @category Object
862 | * @param {Object} object The object to query.
863 | * @param {Array|string} path The path of the property to get.
864 | * @param {*} [defaultValue] The value returned for `undefined` resolved values.
865 | * @returns {*} Returns the resolved value.
866 | * @example
867 | *
868 | * var object = { 'a': [{ 'b': { 'c': 3 } }] };
869 | *
870 | * _.get(object, 'a[0].b.c');
871 | * // => 3
872 | *
873 | * _.get(object, ['a', '0', 'b', 'c']);
874 | * // => 3
875 | *
876 | * _.get(object, 'a.b.c', 'default');
877 | * // => 'default'
878 | */
879 | function get(object, path, defaultValue) {
880 | var result = object == null ? undefined : baseGet(object, path);
881 | return result === undefined ? defaultValue : result;
882 | }
883 |
884 | module.exports = get;
885 |
886 |
887 | /***/ },
888 | /* 26 */
889 | /***/ function(module, exports, __webpack_require__) {
890 |
891 | 'use strict';
892 |
893 | Object.defineProperty(exports, "__esModule", {
894 | value: true
895 | });
896 |
897 | var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
898 |
899 | exports.default = connections;
900 |
901 | var _reactRedux = __webpack_require__(149);
902 |
903 | /**
904 | * Connect provided component to `path` part of the redux state
905 | * @param connectors
906 | * @returns {Function}
907 | */
908 | function connections() {
909 | var connectors = arguments.length <= 0 || arguments[0] === undefined ? [] : arguments[0];
910 |
911 | return function (WrappedComponent) {
912 | return (0, _reactRedux.connect)(function (state) {
913 | return state;
914 | }, function (dispatch) {
915 | return { dispatch: dispatch };
916 | }, function (state, _ref, props) {
917 | var dispatch = _ref.dispatch;
918 |
919 | return connectors.reduce(function (newProps, connector) {
920 | return _extends({}, newProps, connector(state, { dispatch: dispatch }, props));
921 | }, _extends({}, props));
922 | })(WrappedComponent);
923 | };
924 | }
925 |
926 | /***/ },
927 | /* 27 */
928 | /***/ function(module, exports, __webpack_require__) {
929 |
930 | 'use strict';
931 |
932 | Object.defineProperty(exports, "__esModule", {
933 | value: true
934 | });
935 |
936 | var _constants = __webpack_require__(17);
937 |
938 | var replaceStateByPath = function replaceStateByPath(path, value) {
939 | return {
940 | type: _constants.REPLACE_STATE_BY_PATH,
941 | path: path,
942 | value: value
943 | };
944 | };
945 |
946 | exports.default = replaceStateByPath;
947 |
948 | /***/ },
949 | /* 28 */
950 | /***/ function(module, exports, __webpack_require__) {
951 |
952 | 'use strict';
953 |
954 | Object.defineProperty(exports, "__esModule", {
955 | value: true
956 | });
957 |
958 | var _constants = __webpack_require__(17);
959 |
960 | var setStateByPath = function setStateByPath(path, value) {
961 | return {
962 | type: _constants.SET_STATE_BY_PATH,
963 | path: path,
964 | value: value
965 | };
966 | };
967 |
968 | exports.default = setStateByPath;
969 |
970 | /***/ },
971 | /* 29 */
972 | /***/ function(module, exports, __webpack_require__) {
973 |
974 | 'use strict';
975 |
976 | Object.defineProperty(exports, "__esModule", {
977 | value: true
978 | });
979 |
980 | var _clone = __webpack_require__(130);
981 |
982 | var _clone2 = _interopRequireDefault(_clone);
983 |
984 | var _set = __webpack_require__(143);
985 |
986 | var _set2 = _interopRequireDefault(_set);
987 |
988 | var _isArray = __webpack_require__(1);
989 |
990 | var _isArray2 = _interopRequireDefault(_isArray);
991 |
992 | var _head = __webpack_require__(134);
993 |
994 | var _head2 = _interopRequireDefault(_head);
995 |
996 | var _tail = __webpack_require__(144);
997 |
998 | var _tail2 = _interopRequireDefault(_tail);
999 |
1000 | var _map = __webpack_require__(140);
1001 |
1002 | var _map2 = _interopRequireDefault(_map);
1003 |
1004 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
1005 |
1006 | var update = function update(obj, path, nextValue) {
1007 | var pathArr = (0, _isArray2.default)(path) ? path : path.split('.');
1008 | var newObj = void 0;
1009 | if (!pathArr.length) {
1010 | return nextValue;
1011 | } else {
1012 | if (!obj[pathArr[0]]) {
1013 | newObj = (0, _clone2.default)(obj);
1014 | (0, _set2.default)(newObj, pathArr, nextValue);
1015 | return newObj;
1016 | } else if ((0, _isArray2.default)(obj)) {
1017 | newObj = (0, _clone2.default)(obj);
1018 | newObj[(0, _head2.default)(pathArr)] = update(newObj[(0, _head2.default)(pathArr)], (0, _tail2.default)(pathArr), nextValue);
1019 | return newObj;
1020 | } else {
1021 | newObj = {};
1022 | (0, _map2.default)(obj, function (value, key) {
1023 | if (key === pathArr[0]) {
1024 | newObj[key] = update(value, (0, _tail2.default)(pathArr), nextValue);
1025 | } else {
1026 | newObj[key] = obj[key];
1027 | }
1028 | });
1029 | return newObj;
1030 | }
1031 | }
1032 | };
1033 |
1034 | exports.default = update;
1035 |
1036 | /***/ },
1037 | /* 30 */
1038 | /***/ function(module, exports, __webpack_require__) {
1039 |
1040 | 'use strict';
1041 |
1042 | Object.defineProperty(exports, "__esModule", {
1043 | value: true
1044 | });
1045 |
1046 | var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
1047 |
1048 | exports.default = withState;
1049 |
1050 | var _get = __webpack_require__(25);
1051 |
1052 | var _get2 = _interopRequireDefault(_get);
1053 |
1054 | var _isFunction = __webpack_require__(14);
1055 |
1056 | var _isFunction2 = _interopRequireDefault(_isFunction);
1057 |
1058 | var _setStateByPath = __webpack_require__(28);
1059 |
1060 | var _setStateByPath2 = _interopRequireDefault(_setStateByPath);
1061 |
1062 | var _replaceStateByPath = __webpack_require__(27);
1063 |
1064 | var _replaceStateByPath2 = _interopRequireDefault(_replaceStateByPath);
1065 |
1066 | var _defaultMemoize = __webpack_require__(61);
1067 |
1068 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
1069 |
1070 | // action creators that can be memoized
1071 | var setStateCreator = function setStateCreator(realPath, dispatch) {
1072 | return function (newState) {
1073 | return dispatch((0, _setStateByPath2.default)(realPath, newState));
1074 | };
1075 | };
1076 | var replaceStateCreator = function replaceStateCreator(realPath, dispatch) {
1077 | return function (newState) {
1078 | return dispatch((0, _replaceStateByPath2.default)(realPath, newState));
1079 | };
1080 | };
1081 |
1082 | /**
1083 | * Connect provided component to `path` part of the redux state
1084 | *
1085 | * Generated props are cached. So your component will not be rerendered if state slice didn't change.
1086 | *
1087 | * @param path
1088 | * @param stateName
1089 | * @param setStateName
1090 | * @param replaceStateName
1091 | * @returns {Function}
1092 | */
1093 | function withState(path) {
1094 | var stateName = arguments.length <= 1 || arguments[1] === undefined ? 'state' : arguments[1];
1095 | var setStateName = arguments.length <= 2 || arguments[2] === undefined ? 'setState' : arguments[2];
1096 | var replaceStateName = arguments.length <= 3 || arguments[3] === undefined ? 'replaceState' : arguments[3];
1097 |
1098 | // memoizing action creators.
1099 | var setStateCreatorMemoized = (0, _defaultMemoize.defaultMemoize)(setStateCreator);
1100 | var replaceStateCreatorMemoized = (0, _defaultMemoize.defaultMemoize)(replaceStateCreator);
1101 |
1102 | return function (state, _ref, props) {
1103 | var dispatch = _ref.dispatch;
1104 |
1105 | var realPath = (0, _isFunction2.default)(path) ? path(props) : path;
1106 | var slicedState = (0, _get2.default)(state, realPath);
1107 | var result = _extends({}, props);
1108 | if (stateName) {
1109 | result[stateName] = slicedState;
1110 | }
1111 | if (setStateName) {
1112 | result[setStateName] = setStateCreatorMemoized(realPath, dispatch);
1113 | }
1114 | if (replaceStateName) {
1115 | result[replaceStateName] = replaceStateCreatorMemoized(realPath, dispatch);
1116 | }
1117 | return result;
1118 | };
1119 | }
1120 |
1121 | /***/ },
1122 | /* 31 */
1123 | /***/ function(module, exports, __webpack_require__) {
1124 |
1125 | var mapClear = __webpack_require__(119),
1126 | mapDelete = __webpack_require__(120),
1127 | mapGet = __webpack_require__(121),
1128 | mapHas = __webpack_require__(122),
1129 | mapSet = __webpack_require__(123);
1130 |
1131 | /**
1132 | * Creates a map cache object to store key-value pairs.
1133 | *
1134 | * @private
1135 | * @constructor
1136 | * @param {Array} [values] The values to cache.
1137 | */
1138 | function MapCache(values) {
1139 | var index = -1,
1140 | length = values ? values.length : 0;
1141 |
1142 | this.clear();
1143 | while (++index < length) {
1144 | var entry = values[index];
1145 | this.set(entry[0], entry[1]);
1146 | }
1147 | }
1148 |
1149 | // Add methods to `MapCache`.
1150 | MapCache.prototype.clear = mapClear;
1151 | MapCache.prototype['delete'] = mapDelete;
1152 | MapCache.prototype.get = mapGet;
1153 | MapCache.prototype.has = mapHas;
1154 | MapCache.prototype.set = mapSet;
1155 |
1156 | module.exports = MapCache;
1157 |
1158 |
1159 | /***/ },
1160 | /* 32 */
1161 | /***/ function(module, exports, __webpack_require__) {
1162 |
1163 | var root = __webpack_require__(2);
1164 |
1165 | /** Built-in value references. */
1166 | var Uint8Array = root.Uint8Array;
1167 |
1168 | module.exports = Uint8Array;
1169 |
1170 |
1171 | /***/ },
1172 | /* 33 */
1173 | /***/ function(module, exports) {
1174 |
1175 | /**
1176 | * A specialized version of `_.map` for arrays without support for iteratee
1177 | * shorthands.
1178 | *
1179 | * @private
1180 | * @param {Array} array The array to iterate over.
1181 | * @param {Function} iteratee The function invoked per iteration.
1182 | * @returns {Array} Returns the new mapped array.
1183 | */
1184 | function arrayMap(array, iteratee) {
1185 | var index = -1,
1186 | length = array.length,
1187 | result = Array(length);
1188 |
1189 | while (++index < length) {
1190 | result[index] = iteratee(array[index], index, array);
1191 | }
1192 | return result;
1193 | }
1194 |
1195 | module.exports = arrayMap;
1196 |
1197 |
1198 | /***/ },
1199 | /* 34 */
1200 | /***/ function(module, exports) {
1201 |
1202 | /**
1203 | * A specialized version of `_.reduce` for arrays without support for
1204 | * iteratee shorthands.
1205 | *
1206 | * @private
1207 | * @param {Array} array The array to iterate over.
1208 | * @param {Function} iteratee The function invoked per iteration.
1209 | * @param {*} [accumulator] The initial value.
1210 | * @param {boolean} [initAccum] Specify using the first element of `array` as
1211 | * the initial value.
1212 | * @returns {*} Returns the accumulated value.
1213 | */
1214 | function arrayReduce(array, iteratee, accumulator, initAccum) {
1215 | var index = -1,
1216 | length = array.length;
1217 |
1218 | if (initAccum && length) {
1219 | accumulator = array[++index];
1220 | }
1221 | while (++index < length) {
1222 | accumulator = iteratee(accumulator, array[index], index, array);
1223 | }
1224 | return accumulator;
1225 | }
1226 |
1227 | module.exports = arrayReduce;
1228 |
1229 |
1230 | /***/ },
1231 | /* 35 */
1232 | /***/ function(module, exports, __webpack_require__) {
1233 |
1234 | var assocIndexOf = __webpack_require__(10);
1235 |
1236 | /** Used for built-in method references. */
1237 | var arrayProto = Array.prototype;
1238 |
1239 | /** Built-in value references. */
1240 | var splice = arrayProto.splice;
1241 |
1242 | /**
1243 | * Removes `key` and its value from the associative array.
1244 | *
1245 | * @private
1246 | * @param {Array} array The array to modify.
1247 | * @param {string} key The key of the value to remove.
1248 | * @returns {boolean} Returns `true` if the entry was removed, else `false`.
1249 | */
1250 | function assocDelete(array, key) {
1251 | var index = assocIndexOf(array, key);
1252 | if (index < 0) {
1253 | return false;
1254 | }
1255 | var lastIndex = array.length - 1;
1256 | if (index == lastIndex) {
1257 | array.pop();
1258 | } else {
1259 | splice.call(array, index, 1);
1260 | }
1261 | return true;
1262 | }
1263 |
1264 | module.exports = assocDelete;
1265 |
1266 |
1267 | /***/ },
1268 | /* 36 */
1269 | /***/ function(module, exports, __webpack_require__) {
1270 |
1271 | var assocIndexOf = __webpack_require__(10);
1272 |
1273 | /**
1274 | * Gets the associative array value for `key`.
1275 | *
1276 | * @private
1277 | * @param {Array} array The array to query.
1278 | * @param {string} key The key of the value to get.
1279 | * @returns {*} Returns the entry value.
1280 | */
1281 | function assocGet(array, key) {
1282 | var index = assocIndexOf(array, key);
1283 | return index < 0 ? undefined : array[index][1];
1284 | }
1285 |
1286 | module.exports = assocGet;
1287 |
1288 |
1289 | /***/ },
1290 | /* 37 */
1291 | /***/ function(module, exports, __webpack_require__) {
1292 |
1293 | var assocIndexOf = __webpack_require__(10);
1294 |
1295 | /**
1296 | * Checks if an associative array value for `key` exists.
1297 | *
1298 | * @private
1299 | * @param {Array} array The array to query.
1300 | * @param {string} key The key of the entry to check.
1301 | * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
1302 | */
1303 | function assocHas(array, key) {
1304 | return assocIndexOf(array, key) > -1;
1305 | }
1306 |
1307 | module.exports = assocHas;
1308 |
1309 |
1310 | /***/ },
1311 | /* 38 */
1312 | /***/ function(module, exports, __webpack_require__) {
1313 |
1314 | var assocIndexOf = __webpack_require__(10);
1315 |
1316 | /**
1317 | * Sets the associative array `key` to `value`.
1318 | *
1319 | * @private
1320 | * @param {Array} array The array to modify.
1321 | * @param {string} key The key of the value to set.
1322 | * @param {*} value The value to set.
1323 | */
1324 | function assocSet(array, key, value) {
1325 | var index = assocIndexOf(array, key);
1326 | if (index < 0) {
1327 | array.push([key, value]);
1328 | } else {
1329 | array[index][1] = value;
1330 | }
1331 | }
1332 |
1333 | module.exports = assocSet;
1334 |
1335 |
1336 | /***/ },
1337 | /* 39 */
1338 | /***/ function(module, exports, __webpack_require__) {
1339 |
1340 | var castPath = __webpack_require__(21),
1341 | isKey = __webpack_require__(7),
1342 | toKey = __webpack_require__(8);
1343 |
1344 | /**
1345 | * The base implementation of `_.get` without support for default values.
1346 | *
1347 | * @private
1348 | * @param {Object} object The object to query.
1349 | * @param {Array|string} path The path of the property to get.
1350 | * @returns {*} Returns the resolved value.
1351 | */
1352 | function baseGet(object, path) {
1353 | path = isKey(path, object) ? [path] : castPath(path);
1354 |
1355 | var index = 0,
1356 | length = path.length;
1357 |
1358 | while (object != null && index < length) {
1359 | object = object[toKey(path[index++])];
1360 | }
1361 | return (index && index == length) ? object : undefined;
1362 | }
1363 |
1364 | module.exports = baseGet;
1365 |
1366 |
1367 | /***/ },
1368 | /* 40 */
1369 | /***/ function(module, exports, __webpack_require__) {
1370 |
1371 | var getPrototype = __webpack_require__(45);
1372 |
1373 | /** Used for built-in method references. */
1374 | var objectProto = Object.prototype;
1375 |
1376 | /** Used to check objects for own properties. */
1377 | var hasOwnProperty = objectProto.hasOwnProperty;
1378 |
1379 | /**
1380 | * The base implementation of `_.has` without support for deep paths.
1381 | *
1382 | * @private
1383 | * @param {Object} object The object to query.
1384 | * @param {Array|string} key The key to check.
1385 | * @returns {boolean} Returns `true` if `key` exists, else `false`.
1386 | */
1387 | function baseHas(object, key) {
1388 | // Avoid a bug in IE 10-11 where objects with a [[Prototype]] of `null`,
1389 | // that are composed entirely of index properties, return `false` for
1390 | // `hasOwnProperty` checks of them.
1391 | return hasOwnProperty.call(object, key) ||
1392 | (typeof object == 'object' && key in object && getPrototype(object) === null);
1393 | }
1394 |
1395 | module.exports = baseHas;
1396 |
1397 |
1398 | /***/ },
1399 | /* 41 */
1400 | /***/ function(module, exports, __webpack_require__) {
1401 |
1402 | var baseIsEqualDeep = __webpack_require__(81),
1403 | isObject = __webpack_require__(3),
1404 | isObjectLike = __webpack_require__(9);
1405 |
1406 | /**
1407 | * The base implementation of `_.isEqual` which supports partial comparisons
1408 | * and tracks traversed objects.
1409 | *
1410 | * @private
1411 | * @param {*} value The value to compare.
1412 | * @param {*} other The other value to compare.
1413 | * @param {Function} [customizer] The function to customize comparisons.
1414 | * @param {boolean} [bitmask] The bitmask of comparison flags.
1415 | * The bitmask may be composed of the following flags:
1416 | * 1 - Unordered comparison
1417 | * 2 - Partial comparison
1418 | * @param {Object} [stack] Tracks traversed `value` and `other` objects.
1419 | * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
1420 | */
1421 | function baseIsEqual(value, other, customizer, bitmask, stack) {
1422 | if (value === other) {
1423 | return true;
1424 | }
1425 | if (value == null || other == null || (!isObject(value) && !isObjectLike(other))) {
1426 | return value !== value && other !== other;
1427 | }
1428 | return baseIsEqualDeep(value, other, baseIsEqual, customizer, bitmask, stack);
1429 | }
1430 |
1431 | module.exports = baseIsEqual;
1432 |
1433 |
1434 | /***/ },
1435 | /* 42 */
1436 | /***/ function(module, exports) {
1437 |
1438 | /**
1439 | * The base implementation of `_.property` without support for deep paths.
1440 | *
1441 | * @private
1442 | * @param {string} key The key of the property to get.
1443 | * @returns {Function} Returns the new function.
1444 | */
1445 | function baseProperty(key) {
1446 | return function(object) {
1447 | return object == null ? undefined : object[key];
1448 | };
1449 | }
1450 |
1451 | module.exports = baseProperty;
1452 |
1453 |
1454 | /***/ },
1455 | /* 43 */
1456 | /***/ function(module, exports, __webpack_require__) {
1457 |
1458 | var assignValue = __webpack_require__(20);
1459 |
1460 | /**
1461 | * Copies properties of `source` to `object`.
1462 | *
1463 | * @private
1464 | * @param {Object} source The object to copy properties from.
1465 | * @param {Array} props The property identifiers to copy.
1466 | * @param {Object} [object={}] The object to copy properties to.
1467 | * @param {Function} [customizer] The function to customize copied values.
1468 | * @returns {Object} Returns `object`.
1469 | */
1470 | function copyObject(source, props, object, customizer) {
1471 | object || (object = {});
1472 |
1473 | var index = -1,
1474 | length = props.length;
1475 |
1476 | while (++index < length) {
1477 | var key = props[index];
1478 |
1479 | var newValue = customizer
1480 | ? customizer(object[key], source[key], key, object, source)
1481 | : source[key];
1482 |
1483 | assignValue(object, key, newValue);
1484 | }
1485 | return object;
1486 | }
1487 |
1488 | module.exports = copyObject;
1489 |
1490 |
1491 | /***/ },
1492 | /* 44 */
1493 | /***/ function(module, exports, __webpack_require__) {
1494 |
1495 | var arraySome = __webpack_require__(72);
1496 |
1497 | /** Used to compose bitmasks for comparison styles. */
1498 | var UNORDERED_COMPARE_FLAG = 1,
1499 | PARTIAL_COMPARE_FLAG = 2;
1500 |
1501 | /**
1502 | * A specialized version of `baseIsEqualDeep` for arrays with support for
1503 | * partial deep comparisons.
1504 | *
1505 | * @private
1506 | * @param {Array} array The array to compare.
1507 | * @param {Array} other The other array to compare.
1508 | * @param {Function} equalFunc The function to determine equivalents of values.
1509 | * @param {Function} customizer The function to customize comparisons.
1510 | * @param {number} bitmask The bitmask of comparison flags. See `baseIsEqual`
1511 | * for more details.
1512 | * @param {Object} stack Tracks traversed `array` and `other` objects.
1513 | * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.
1514 | */
1515 | function equalArrays(array, other, equalFunc, customizer, bitmask, stack) {
1516 | var index = -1,
1517 | isPartial = bitmask & PARTIAL_COMPARE_FLAG,
1518 | isUnordered = bitmask & UNORDERED_COMPARE_FLAG,
1519 | arrLength = array.length,
1520 | othLength = other.length;
1521 |
1522 | if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
1523 | return false;
1524 | }
1525 | // Assume cyclic values are equal.
1526 | var stacked = stack.get(array);
1527 | if (stacked) {
1528 | return stacked == other;
1529 | }
1530 | var result = true;
1531 | stack.set(array, other);
1532 |
1533 | // Ignore non-index properties.
1534 | while (++index < arrLength) {
1535 | var arrValue = array[index],
1536 | othValue = other[index];
1537 |
1538 | if (customizer) {
1539 | var compared = isPartial
1540 | ? customizer(othValue, arrValue, index, other, array, stack)
1541 | : customizer(arrValue, othValue, index, array, other, stack);
1542 | }
1543 | if (compared !== undefined) {
1544 | if (compared) {
1545 | continue;
1546 | }
1547 | result = false;
1548 | break;
1549 | }
1550 | // Recursively compare arrays (susceptible to call stack limits).
1551 | if (isUnordered) {
1552 | if (!arraySome(other, function(othValue) {
1553 | return arrValue === othValue ||
1554 | equalFunc(arrValue, othValue, customizer, bitmask, stack);
1555 | })) {
1556 | result = false;
1557 | break;
1558 | }
1559 | } else if (!(
1560 | arrValue === othValue ||
1561 | equalFunc(arrValue, othValue, customizer, bitmask, stack)
1562 | )) {
1563 | result = false;
1564 | break;
1565 | }
1566 | }
1567 | stack['delete'](array);
1568 | return result;
1569 | }
1570 |
1571 | module.exports = equalArrays;
1572 |
1573 |
1574 | /***/ },
1575 | /* 45 */
1576 | /***/ function(module, exports) {
1577 |
1578 | /* Built-in method references for those with the same name as other `lodash` methods. */
1579 | var nativeGetPrototype = Object.getPrototypeOf;
1580 |
1581 | /**
1582 | * Gets the `[[Prototype]]` of `value`.
1583 | *
1584 | * @private
1585 | * @param {*} value The value to query.
1586 | * @returns {null|Object} Returns the `[[Prototype]]`.
1587 | */
1588 | function getPrototype(value) {
1589 | return nativeGetPrototype(Object(value));
1590 | }
1591 |
1592 | module.exports = getPrototype;
1593 |
1594 |
1595 | /***/ },
1596 | /* 46 */
1597 | /***/ function(module, exports) {
1598 |
1599 | /** Built-in value references. */
1600 | var getOwnPropertySymbols = Object.getOwnPropertySymbols;
1601 |
1602 | /**
1603 | * Creates an array of the own enumerable symbol properties of `object`.
1604 | *
1605 | * @private
1606 | * @param {Object} object The object to query.
1607 | * @returns {Array} Returns the array of symbols.
1608 | */
1609 | function getSymbols(object) {
1610 | // Coerce `object` to an object to avoid non-object errors in V8.
1611 | // See https://bugs.chromium.org/p/v8/issues/detail?id=3443 for more details.
1612 | return getOwnPropertySymbols(Object(object));
1613 | }
1614 |
1615 | // Fallback for IE < 11.
1616 | if (!getOwnPropertySymbols) {
1617 | getSymbols = function() {
1618 | return [];
1619 | };
1620 | }
1621 |
1622 | module.exports = getSymbols;
1623 |
1624 |
1625 | /***/ },
1626 | /* 47 */
1627 | /***/ function(module, exports, __webpack_require__) {
1628 |
1629 | var DataView = __webpack_require__(63),
1630 | Map = __webpack_require__(4),
1631 | Promise = __webpack_require__(65),
1632 | Set = __webpack_require__(66),
1633 | WeakMap = __webpack_require__(67),
1634 | toSource = __webpack_require__(54);
1635 |
1636 | /** `Object#toString` result references. */
1637 | var mapTag = '[object Map]',
1638 | objectTag = '[object Object]',
1639 | promiseTag = '[object Promise]',
1640 | setTag = '[object Set]',
1641 | weakMapTag = '[object WeakMap]';
1642 |
1643 | var dataViewTag = '[object DataView]';
1644 |
1645 | /** Used for built-in method references. */
1646 | var objectProto = Object.prototype;
1647 |
1648 | /**
1649 | * Used to resolve the
1650 | * [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
1651 | * of values.
1652 | */
1653 | var objectToString = objectProto.toString;
1654 |
1655 | /** Used to detect maps, sets, and weakmaps. */
1656 | var dataViewCtorString = toSource(DataView),
1657 | mapCtorString = toSource(Map),
1658 | promiseCtorString = toSource(Promise),
1659 | setCtorString = toSource(Set),
1660 | weakMapCtorString = toSource(WeakMap);
1661 |
1662 | /**
1663 | * Gets the `toStringTag` of `value`.
1664 | *
1665 | * @private
1666 | * @param {*} value The value to query.
1667 | * @returns {string} Returns the `toStringTag`.
1668 | */
1669 | function getTag(value) {
1670 | return objectToString.call(value);
1671 | }
1672 |
1673 | // Fallback for data views, maps, sets, and weak maps in IE 11,
1674 | // for data views in Edge, and promises in Node.js.
1675 | if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||
1676 | (Map && getTag(new Map) != mapTag) ||
1677 | (Promise && getTag(Promise.resolve()) != promiseTag) ||
1678 | (Set && getTag(new Set) != setTag) ||
1679 | (WeakMap && getTag(new WeakMap) != weakMapTag)) {
1680 | getTag = function(value) {
1681 | var result = objectToString.call(value),
1682 | Ctor = result == objectTag ? value.constructor : undefined,
1683 | ctorString = Ctor ? toSource(Ctor) : undefined;
1684 |
1685 | if (ctorString) {
1686 | switch (ctorString) {
1687 | case dataViewCtorString: return dataViewTag;
1688 | case mapCtorString: return mapTag;
1689 | case promiseCtorString: return promiseTag;
1690 | case setCtorString: return setTag;
1691 | case weakMapCtorString: return weakMapTag;
1692 | }
1693 | }
1694 | return result;
1695 | };
1696 | }
1697 |
1698 | module.exports = getTag;
1699 |
1700 |
1701 | /***/ },
1702 | /* 48 */
1703 | /***/ function(module, exports, __webpack_require__) {
1704 |
1705 | var nativeCreate = __webpack_require__(12);
1706 |
1707 | /** Used for built-in method references. */
1708 | var objectProto = Object.prototype;
1709 |
1710 | /** Used to check objects for own properties. */
1711 | var hasOwnProperty = objectProto.hasOwnProperty;
1712 |
1713 | /**
1714 | * Checks if a hash value for `key` exists.
1715 | *
1716 | * @private
1717 | * @param {Object} hash The hash to query.
1718 | * @param {string} key The key of the entry to check.
1719 | * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
1720 | */
1721 | function hashHas(hash, key) {
1722 | return nativeCreate ? hash[key] !== undefined : hasOwnProperty.call(hash, key);
1723 | }
1724 |
1725 | module.exports = hashHas;
1726 |
1727 |
1728 | /***/ },
1729 | /* 49 */
1730 | /***/ function(module, exports) {
1731 |
1732 | /** Used for built-in method references. */
1733 | var objectProto = Object.prototype;
1734 |
1735 | /**
1736 | * Checks if `value` is likely a prototype object.
1737 | *
1738 | * @private
1739 | * @param {*} value The value to check.
1740 | * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
1741 | */
1742 | function isPrototype(value) {
1743 | var Ctor = value && value.constructor,
1744 | proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;
1745 |
1746 | return value === proto;
1747 | }
1748 |
1749 | module.exports = isPrototype;
1750 |
1751 |
1752 | /***/ },
1753 | /* 50 */
1754 | /***/ function(module, exports, __webpack_require__) {
1755 |
1756 | var isObject = __webpack_require__(3);
1757 |
1758 | /**
1759 | * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.
1760 | *
1761 | * @private
1762 | * @param {*} value The value to check.
1763 | * @returns {boolean} Returns `true` if `value` if suitable for strict
1764 | * equality comparisons, else `false`.
1765 | */
1766 | function isStrictComparable(value) {
1767 | return value === value && !isObject(value);
1768 | }
1769 |
1770 | module.exports = isStrictComparable;
1771 |
1772 |
1773 | /***/ },
1774 | /* 51 */
1775 | /***/ function(module, exports) {
1776 |
1777 | /**
1778 | * Converts `map` to an array.
1779 | *
1780 | * @private
1781 | * @param {Object} map The map to convert.
1782 | * @returns {Array} Returns the converted array.
1783 | */
1784 | function mapToArray(map) {
1785 | var index = -1,
1786 | result = Array(map.size);
1787 |
1788 | map.forEach(function(value, key) {
1789 | result[++index] = [key, value];
1790 | });
1791 | return result;
1792 | }
1793 |
1794 | module.exports = mapToArray;
1795 |
1796 |
1797 | /***/ },
1798 | /* 52 */
1799 | /***/ function(module, exports) {
1800 |
1801 | /**
1802 | * A specialized version of `matchesProperty` for source values suitable
1803 | * for strict equality comparisons, i.e. `===`.
1804 | *
1805 | * @private
1806 | * @param {string} key The key of the property to get.
1807 | * @param {*} srcValue The value to match.
1808 | * @returns {Function} Returns the new function.
1809 | */
1810 | function matchesStrictComparable(key, srcValue) {
1811 | return function(object) {
1812 | if (object == null) {
1813 | return false;
1814 | }
1815 | return object[key] === srcValue &&
1816 | (srcValue !== undefined || (key in Object(object)));
1817 | };
1818 | }
1819 |
1820 | module.exports = matchesStrictComparable;
1821 |
1822 |
1823 | /***/ },
1824 | /* 53 */
1825 | /***/ function(module, exports) {
1826 |
1827 | /**
1828 | * Converts `set` to an array.
1829 | *
1830 | * @private
1831 | * @param {Object} set The set to convert.
1832 | * @returns {Array} Returns the converted array.
1833 | */
1834 | function setToArray(set) {
1835 | var index = -1,
1836 | result = Array(set.size);
1837 |
1838 | set.forEach(function(value) {
1839 | result[++index] = value;
1840 | });
1841 | return result;
1842 | }
1843 |
1844 | module.exports = setToArray;
1845 |
1846 |
1847 | /***/ },
1848 | /* 54 */
1849 | /***/ function(module, exports) {
1850 |
1851 | /** Used to resolve the decompiled source of functions. */
1852 | var funcToString = Function.prototype.toString;
1853 |
1854 | /**
1855 | * Converts `func` to its source code.
1856 | *
1857 | * @private
1858 | * @param {Function} func The function to process.
1859 | * @returns {string} Returns the source code.
1860 | */
1861 | function toSource(func) {
1862 | if (func != null) {
1863 | try {
1864 | return funcToString.call(func);
1865 | } catch (e) {}
1866 | try {
1867 | return (func + '');
1868 | } catch (e) {}
1869 | }
1870 | return '';
1871 | }
1872 |
1873 | module.exports = toSource;
1874 |
1875 |
1876 | /***/ },
1877 | /* 55 */
1878 | /***/ function(module, exports) {
1879 |
1880 | /**
1881 | * Performs a
1882 | * [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
1883 | * comparison between two values to determine if they are equivalent.
1884 | *
1885 | * @static
1886 | * @memberOf _
1887 | * @since 4.0.0
1888 | * @category Lang
1889 | * @param {*} value The value to compare.
1890 | * @param {*} other The other value to compare.
1891 | * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
1892 | * @example
1893 | *
1894 | * var object = { 'user': 'fred' };
1895 | * var other = { 'user': 'fred' };
1896 | *
1897 | * _.eq(object, object);
1898 | * // => true
1899 | *
1900 | * _.eq(object, other);
1901 | * // => false
1902 | *
1903 | * _.eq('a', 'a');
1904 | * // => true
1905 | *
1906 | * _.eq('a', Object('a'));
1907 | * // => false
1908 | *
1909 | * _.eq(NaN, NaN);
1910 | * // => true
1911 | */
1912 | function eq(value, other) {
1913 | return value === other || (value !== value && other !== other);
1914 | }
1915 |
1916 | module.exports = eq;
1917 |
1918 |
1919 | /***/ },
1920 | /* 56 */
1921 | /***/ function(module, exports, __webpack_require__) {
1922 |
1923 | var isArrayLikeObject = __webpack_require__(136);
1924 |
1925 | /** `Object#toString` result references. */
1926 | var argsTag = '[object Arguments]';
1927 |
1928 | /** Used for built-in method references. */
1929 | var objectProto = Object.prototype;
1930 |
1931 | /** Used to check objects for own properties. */
1932 | var hasOwnProperty = objectProto.hasOwnProperty;
1933 |
1934 | /**
1935 | * Used to resolve the
1936 | * [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
1937 | * of values.
1938 | */
1939 | var objectToString = objectProto.toString;
1940 |
1941 | /** Built-in value references. */
1942 | var propertyIsEnumerable = objectProto.propertyIsEnumerable;
1943 |
1944 | /**
1945 | * Checks if `value` is likely an `arguments` object.
1946 | *
1947 | * @static
1948 | * @memberOf _
1949 | * @since 0.1.0
1950 | * @category Lang
1951 | * @param {*} value The value to check.
1952 | * @returns {boolean} Returns `true` if `value` is correctly classified,
1953 | * else `false`.
1954 | * @example
1955 | *
1956 | * _.isArguments(function() { return arguments; }());
1957 | * // => true
1958 | *
1959 | * _.isArguments([1, 2, 3]);
1960 | * // => false
1961 | */
1962 | function isArguments(value) {
1963 | // Safari 8.1 incorrectly makes `arguments.callee` enumerable in strict mode.
1964 | return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') &&
1965 | (!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag);
1966 | }
1967 |
1968 | module.exports = isArguments;
1969 |
1970 |
1971 | /***/ },
1972 | /* 57 */
1973 | /***/ function(module, exports, __webpack_require__) {
1974 |
1975 | var isArray = __webpack_require__(1),
1976 | isObjectLike = __webpack_require__(9);
1977 |
1978 | /** `Object#toString` result references. */
1979 | var stringTag = '[object String]';
1980 |
1981 | /** Used for built-in method references. */
1982 | var objectProto = Object.prototype;
1983 |
1984 | /**
1985 | * Used to resolve the
1986 | * [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
1987 | * of values.
1988 | */
1989 | var objectToString = objectProto.toString;
1990 |
1991 | /**
1992 | * Checks if `value` is classified as a `String` primitive or object.
1993 | *
1994 | * @static
1995 | * @since 0.1.0
1996 | * @memberOf _
1997 | * @category Lang
1998 | * @param {*} value The value to check.
1999 | * @returns {boolean} Returns `true` if `value` is correctly classified,
2000 | * else `false`.
2001 | * @example
2002 | *
2003 | * _.isString('abc');
2004 | * // => true
2005 | *
2006 | * _.isString(1);
2007 | * // => false
2008 | */
2009 | function isString(value) {
2010 | return typeof value == 'string' ||
2011 | (!isArray(value) && isObjectLike(value) && objectToString.call(value) == stringTag);
2012 | }
2013 |
2014 | module.exports = isString;
2015 |
2016 |
2017 | /***/ },
2018 | /* 58 */
2019 | /***/ function(module, exports) {
2020 |
2021 | module.exports = function(module) {
2022 | if(!module.webpackPolyfill) {
2023 | module.deprecate = function() {};
2024 | module.paths = [];
2025 | // module.parent = undefined by default
2026 | module.children = [];
2027 | module.webpackPolyfill = 1;
2028 | }
2029 | return module;
2030 | }
2031 |
2032 |
2033 | /***/ },
2034 | /* 59 */
2035 | /***/ function(module, exports, __webpack_require__) {
2036 |
2037 | 'use strict';
2038 |
2039 | Object.defineProperty(exports, "__esModule", {
2040 | value: true
2041 | });
2042 | exports.default = connectSlicedState;
2043 |
2044 | var _connection = __webpack_require__(26);
2045 |
2046 | var _connection2 = _interopRequireDefault(_connection);
2047 |
2048 | var _withState = __webpack_require__(30);
2049 |
2050 | var _withState2 = _interopRequireDefault(_withState);
2051 |
2052 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
2053 |
2054 | /**
2055 | * Connect provided component to `path` part of the redux state
2056 | * @param path
2057 | * @param stateName
2058 | * @param setStateName
2059 | * @param replaceStateName
2060 | * @returns {Function}
2061 | */
2062 | function connectSlicedState(path) {
2063 | var stateName = arguments.length <= 1 || arguments[1] === undefined ? 'state' : arguments[1];
2064 | var setStateName = arguments.length <= 2 || arguments[2] === undefined ? 'setState' : arguments[2];
2065 | var replaceStateName = arguments.length <= 3 || arguments[3] === undefined ? 'replaceState' : arguments[3];
2066 |
2067 | return (0, _connection2.default)([(0, _withState2.default)(path, stateName, setStateName, replaceStateName)]);
2068 | }
2069 |
2070 | /***/ },
2071 | /* 60 */
2072 | /***/ function(module, exports) {
2073 |
2074 | "use strict";
2075 |
2076 | Object.defineProperty(exports, "__esModule", {
2077 | value: true
2078 | });
2079 | exports.default = initialStateReducer;
2080 | function initialStateReducer() {
2081 | var initialState = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];
2082 |
2083 | return function () {
2084 | var state = arguments.length <= 0 || arguments[0] === undefined ? initialState : arguments[0];
2085 | var action = arguments[1];
2086 | return state;
2087 | }; // eslint-disable-line no-unused-vars
2088 | }
2089 |
2090 | /***/ },
2091 | /* 61 */
2092 | /***/ function(module, exports) {
2093 |
2094 | "use strict";
2095 |
2096 | Object.defineProperty(exports, "__esModule", {
2097 | value: true
2098 | });
2099 | exports.defaultMemoize = defaultMemoize;
2100 | /**
2101 | * Memoizing function.
2102 | *
2103 | * Copied from `reselect` library.
2104 | * https://github.com/reactjs/reselect/blob/master/src/index.js
2105 | *
2106 | */
2107 |
2108 | function defaultEqualityCheck(a, b) {
2109 | return a === b;
2110 | }
2111 |
2112 | function defaultMemoize(func) {
2113 | var equalityCheck = arguments.length <= 1 || arguments[1] === undefined ? defaultEqualityCheck : arguments[1];
2114 |
2115 | var lastArgs = null;
2116 | var lastResult = null;
2117 | return function () {
2118 | for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
2119 | args[_key] = arguments[_key];
2120 | }
2121 |
2122 | if (lastArgs !== null && lastArgs.length === args.length && args.every(function (value, index) {
2123 | return equalityCheck(value, lastArgs[index]);
2124 | })) {
2125 | return lastResult;
2126 | }
2127 | lastResult = func.apply(undefined, args);
2128 | lastArgs = args;
2129 | return lastResult;
2130 | };
2131 | }
2132 |
2133 | /***/ },
2134 | /* 62 */
2135 | /***/ function(module, exports, __webpack_require__) {
2136 |
2137 | 'use strict';
2138 |
2139 | Object.defineProperty(exports, "__esModule", {
2140 | value: true
2141 | });
2142 |
2143 | var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
2144 |
2145 | var _constants = __webpack_require__(17);
2146 |
2147 | var _update = __webpack_require__(29);
2148 |
2149 | var _update2 = _interopRequireDefault(_update);
2150 |
2151 | var _get = __webpack_require__(25);
2152 |
2153 | var _get2 = _interopRequireDefault(_get);
2154 |
2155 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
2156 |
2157 | var setGlobalStateReducer = function setGlobalStateReducer() {
2158 | var state = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];
2159 | var action = arguments[1];
2160 |
2161 | switch (action.type) {
2162 | case _constants.SET_STATE_BY_PATH:
2163 | var oldState = (0, _get2.default)(state, action.path, {});
2164 | var newValue = _extends({}, oldState, action.value);
2165 | return (0, _update2.default)(state, action.path, newValue);
2166 | case _constants.REPLACE_STATE_BY_PATH:
2167 | return (0, _update2.default)(state, action.path, action.value);
2168 | default:
2169 | return state;
2170 | }
2171 | };
2172 |
2173 | var wrapReducerWithSetGlobalState = function wrapReducerWithSetGlobalState() {
2174 | var reducer = arguments.length <= 0 || arguments[0] === undefined ? function (s) {
2175 | return s;
2176 | } : arguments[0];
2177 |
2178 | return function () {
2179 | var state = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];
2180 | var action = arguments[1];
2181 |
2182 | var updatedState = setGlobalStateReducer(state, action);
2183 | return reducer(updatedState, action);
2184 | };
2185 | };
2186 |
2187 | exports.default = wrapReducerWithSetGlobalState;
2188 |
2189 | /***/ },
2190 | /* 63 */
2191 | /***/ function(module, exports, __webpack_require__) {
2192 |
2193 | var getNative = __webpack_require__(5),
2194 | root = __webpack_require__(2);
2195 |
2196 | /* Built-in method references that are verified to be native. */
2197 | var DataView = getNative(root, 'DataView');
2198 |
2199 | module.exports = DataView;
2200 |
2201 |
2202 | /***/ },
2203 | /* 64 */
2204 | /***/ function(module, exports, __webpack_require__) {
2205 |
2206 | var nativeCreate = __webpack_require__(12);
2207 |
2208 | /** Used for built-in method references. */
2209 | var objectProto = Object.prototype;
2210 |
2211 | /**
2212 | * Creates a hash object.
2213 | *
2214 | * @private
2215 | * @constructor
2216 | * @returns {Object} Returns the new hash object.
2217 | */
2218 | function Hash() {}
2219 |
2220 | // Avoid inheriting from `Object.prototype` when possible.
2221 | Hash.prototype = nativeCreate ? nativeCreate(null) : objectProto;
2222 |
2223 | module.exports = Hash;
2224 |
2225 |
2226 | /***/ },
2227 | /* 65 */
2228 | /***/ function(module, exports, __webpack_require__) {
2229 |
2230 | var getNative = __webpack_require__(5),
2231 | root = __webpack_require__(2);
2232 |
2233 | /* Built-in method references that are verified to be native. */
2234 | var Promise = getNative(root, 'Promise');
2235 |
2236 | module.exports = Promise;
2237 |
2238 |
2239 | /***/ },
2240 | /* 66 */
2241 | /***/ function(module, exports, __webpack_require__) {
2242 |
2243 | var getNative = __webpack_require__(5),
2244 | root = __webpack_require__(2);
2245 |
2246 | /* Built-in method references that are verified to be native. */
2247 | var Set = getNative(root, 'Set');
2248 |
2249 | module.exports = Set;
2250 |
2251 |
2252 | /***/ },
2253 | /* 67 */
2254 | /***/ function(module, exports, __webpack_require__) {
2255 |
2256 | var getNative = __webpack_require__(5),
2257 | root = __webpack_require__(2);
2258 |
2259 | /* Built-in method references that are verified to be native. */
2260 | var WeakMap = getNative(root, 'WeakMap');
2261 |
2262 | module.exports = WeakMap;
2263 |
2264 |
2265 | /***/ },
2266 | /* 68 */
2267 | /***/ function(module, exports) {
2268 |
2269 | /**
2270 | * Adds the key-value `pair` to `map`.
2271 | *
2272 | * @private
2273 | * @param {Object} map The map to modify.
2274 | * @param {Array} pair The key-value pair to add.
2275 | * @returns {Object} Returns `map`.
2276 | */
2277 | function addMapEntry(map, pair) {
2278 | // Don't return `Map#set` because it doesn't return the map instance in IE 11.
2279 | map.set(pair[0], pair[1]);
2280 | return map;
2281 | }
2282 |
2283 | module.exports = addMapEntry;
2284 |
2285 |
2286 | /***/ },
2287 | /* 69 */
2288 | /***/ function(module, exports) {
2289 |
2290 | /**
2291 | * Adds `value` to `set`.
2292 | *
2293 | * @private
2294 | * @param {Object} set The set to modify.
2295 | * @param {*} value The value to add.
2296 | * @returns {Object} Returns `set`.
2297 | */
2298 | function addSetEntry(set, value) {
2299 | set.add(value);
2300 | return set;
2301 | }
2302 |
2303 | module.exports = addSetEntry;
2304 |
2305 |
2306 | /***/ },
2307 | /* 70 */
2308 | /***/ function(module, exports) {
2309 |
2310 | /**
2311 | * A specialized version of `_.forEach` for arrays without support for
2312 | * iteratee shorthands.
2313 | *
2314 | * @private
2315 | * @param {Array} array The array to iterate over.
2316 | * @param {Function} iteratee The function invoked per iteration.
2317 | * @returns {Array} Returns `array`.
2318 | */
2319 | function arrayEach(array, iteratee) {
2320 | var index = -1,
2321 | length = array.length;
2322 |
2323 | while (++index < length) {
2324 | if (iteratee(array[index], index, array) === false) {
2325 | break;
2326 | }
2327 | }
2328 | return array;
2329 | }
2330 |
2331 | module.exports = arrayEach;
2332 |
2333 |
2334 | /***/ },
2335 | /* 71 */
2336 | /***/ function(module, exports) {
2337 |
2338 | /**
2339 | * Appends the elements of `values` to `array`.
2340 | *
2341 | * @private
2342 | * @param {Array} array The array to modify.
2343 | * @param {Array} values The values to append.
2344 | * @returns {Array} Returns `array`.
2345 | */
2346 | function arrayPush(array, values) {
2347 | var index = -1,
2348 | length = values.length,
2349 | offset = array.length;
2350 |
2351 | while (++index < length) {
2352 | array[offset + index] = values[index];
2353 | }
2354 | return array;
2355 | }
2356 |
2357 | module.exports = arrayPush;
2358 |
2359 |
2360 | /***/ },
2361 | /* 72 */
2362 | /***/ function(module, exports) {
2363 |
2364 | /**
2365 | * A specialized version of `_.some` for arrays without support for iteratee
2366 | * shorthands.
2367 | *
2368 | * @private
2369 | * @param {Array} array The array to iterate over.
2370 | * @param {Function} predicate The function invoked per iteration.
2371 | * @returns {boolean} Returns `true` if any element passes the predicate check,
2372 | * else `false`.
2373 | */
2374 | function arraySome(array, predicate) {
2375 | var index = -1,
2376 | length = array.length;
2377 |
2378 | while (++index < length) {
2379 | if (predicate(array[index], index, array)) {
2380 | return true;
2381 | }
2382 | }
2383 | return false;
2384 | }
2385 |
2386 | module.exports = arraySome;
2387 |
2388 |
2389 | /***/ },
2390 | /* 73 */
2391 | /***/ function(module, exports, __webpack_require__) {
2392 |
2393 | var copyObject = __webpack_require__(43),
2394 | keys = __webpack_require__(6);
2395 |
2396 | /**
2397 | * The base implementation of `_.assign` without support for multiple sources
2398 | * or `customizer` functions.
2399 | *
2400 | * @private
2401 | * @param {Object} object The destination object.
2402 | * @param {Object} source The source object.
2403 | * @returns {Object} Returns `object`.
2404 | */
2405 | function baseAssign(object, source) {
2406 | return object && copyObject(source, keys(source), object);
2407 | }
2408 |
2409 | module.exports = baseAssign;
2410 |
2411 |
2412 | /***/ },
2413 | /* 74 */
2414 | /***/ function(module, exports, __webpack_require__) {
2415 |
2416 | var Stack = __webpack_require__(18),
2417 | arrayEach = __webpack_require__(70),
2418 | assignValue = __webpack_require__(20),
2419 | baseAssign = __webpack_require__(73),
2420 | cloneBuffer = __webpack_require__(95),
2421 | copyArray = __webpack_require__(102),
2422 | copySymbols = __webpack_require__(103),
2423 | getAllKeys = __webpack_require__(108),
2424 | getTag = __webpack_require__(47),
2425 | initCloneArray = __webpack_require__(116),
2426 | initCloneByTag = __webpack_require__(117),
2427 | initCloneObject = __webpack_require__(118),
2428 | isArray = __webpack_require__(1),
2429 | isBuffer = __webpack_require__(137),
2430 | isHostObject = __webpack_require__(23),
2431 | isObject = __webpack_require__(3),
2432 | keys = __webpack_require__(6);
2433 |
2434 | /** `Object#toString` result references. */
2435 | var argsTag = '[object Arguments]',
2436 | arrayTag = '[object Array]',
2437 | boolTag = '[object Boolean]',
2438 | dateTag = '[object Date]',
2439 | errorTag = '[object Error]',
2440 | funcTag = '[object Function]',
2441 | genTag = '[object GeneratorFunction]',
2442 | mapTag = '[object Map]',
2443 | numberTag = '[object Number]',
2444 | objectTag = '[object Object]',
2445 | regexpTag = '[object RegExp]',
2446 | setTag = '[object Set]',
2447 | stringTag = '[object String]',
2448 | symbolTag = '[object Symbol]',
2449 | weakMapTag = '[object WeakMap]';
2450 |
2451 | var arrayBufferTag = '[object ArrayBuffer]',
2452 | dataViewTag = '[object DataView]',
2453 | float32Tag = '[object Float32Array]',
2454 | float64Tag = '[object Float64Array]',
2455 | int8Tag = '[object Int8Array]',
2456 | int16Tag = '[object Int16Array]',
2457 | int32Tag = '[object Int32Array]',
2458 | uint8Tag = '[object Uint8Array]',
2459 | uint8ClampedTag = '[object Uint8ClampedArray]',
2460 | uint16Tag = '[object Uint16Array]',
2461 | uint32Tag = '[object Uint32Array]';
2462 |
2463 | /** Used to identify `toStringTag` values supported by `_.clone`. */
2464 | var cloneableTags = {};
2465 | cloneableTags[argsTag] = cloneableTags[arrayTag] =
2466 | cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =
2467 | cloneableTags[boolTag] = cloneableTags[dateTag] =
2468 | cloneableTags[float32Tag] = cloneableTags[float64Tag] =
2469 | cloneableTags[int8Tag] = cloneableTags[int16Tag] =
2470 | cloneableTags[int32Tag] = cloneableTags[mapTag] =
2471 | cloneableTags[numberTag] = cloneableTags[objectTag] =
2472 | cloneableTags[regexpTag] = cloneableTags[setTag] =
2473 | cloneableTags[stringTag] = cloneableTags[symbolTag] =
2474 | cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =
2475 | cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;
2476 | cloneableTags[errorTag] = cloneableTags[funcTag] =
2477 | cloneableTags[weakMapTag] = false;
2478 |
2479 | /**
2480 | * The base implementation of `_.clone` and `_.cloneDeep` which tracks
2481 | * traversed objects.
2482 | *
2483 | * @private
2484 | * @param {*} value The value to clone.
2485 | * @param {boolean} [isDeep] Specify a deep clone.
2486 | * @param {boolean} [isFull] Specify a clone including symbols.
2487 | * @param {Function} [customizer] The function to customize cloning.
2488 | * @param {string} [key] The key of `value`.
2489 | * @param {Object} [object] The parent object of `value`.
2490 | * @param {Object} [stack] Tracks traversed objects and their clone counterparts.
2491 | * @returns {*} Returns the cloned value.
2492 | */
2493 | function baseClone(value, isDeep, isFull, customizer, key, object, stack) {
2494 | var result;
2495 | if (customizer) {
2496 | result = object ? customizer(value, key, object, stack) : customizer(value);
2497 | }
2498 | if (result !== undefined) {
2499 | return result;
2500 | }
2501 | if (!isObject(value)) {
2502 | return value;
2503 | }
2504 | var isArr = isArray(value);
2505 | if (isArr) {
2506 | result = initCloneArray(value);
2507 | if (!isDeep) {
2508 | return copyArray(value, result);
2509 | }
2510 | } else {
2511 | var tag = getTag(value),
2512 | isFunc = tag == funcTag || tag == genTag;
2513 |
2514 | if (isBuffer(value)) {
2515 | return cloneBuffer(value, isDeep);
2516 | }
2517 | if (tag == objectTag || tag == argsTag || (isFunc && !object)) {
2518 | if (isHostObject(value)) {
2519 | return object ? value : {};
2520 | }
2521 | result = initCloneObject(isFunc ? {} : value);
2522 | if (!isDeep) {
2523 | return copySymbols(value, baseAssign(result, value));
2524 | }
2525 | } else {
2526 | if (!cloneableTags[tag]) {
2527 | return object ? value : {};
2528 | }
2529 | result = initCloneByTag(value, tag, baseClone, isDeep);
2530 | }
2531 | }
2532 | // Check for circular references and return its corresponding clone.
2533 | stack || (stack = new Stack);
2534 | var stacked = stack.get(value);
2535 | if (stacked) {
2536 | return stacked;
2537 | }
2538 | stack.set(value, result);
2539 |
2540 | if (!isArr) {
2541 | var props = isFull ? getAllKeys(value) : keys(value);
2542 | }
2543 | // Recursively populate clone (susceptible to call stack limits).
2544 | arrayEach(props || value, function(subValue, key) {
2545 | if (props) {
2546 | key = subValue;
2547 | subValue = value[key];
2548 | }
2549 | assignValue(result, key, baseClone(subValue, isDeep, isFull, customizer, key, value, stack));
2550 | });
2551 | return result;
2552 | }
2553 |
2554 | module.exports = baseClone;
2555 |
2556 |
2557 | /***/ },
2558 | /* 75 */
2559 | /***/ function(module, exports, __webpack_require__) {
2560 |
2561 | var isObject = __webpack_require__(3);
2562 |
2563 | /** Built-in value references. */
2564 | var objectCreate = Object.create;
2565 |
2566 | /**
2567 | * The base implementation of `_.create` without support for assigning
2568 | * properties to the created object.
2569 | *
2570 | * @private
2571 | * @param {Object} prototype The object to inherit from.
2572 | * @returns {Object} Returns the new object.
2573 | */
2574 | function baseCreate(proto) {
2575 | return isObject(proto) ? objectCreate(proto) : {};
2576 | }
2577 |
2578 | module.exports = baseCreate;
2579 |
2580 |
2581 | /***/ },
2582 | /* 76 */
2583 | /***/ function(module, exports, __webpack_require__) {
2584 |
2585 | var baseForOwn = __webpack_require__(78),
2586 | createBaseEach = __webpack_require__(104);
2587 |
2588 | /**
2589 | * The base implementation of `_.forEach` without support for iteratee shorthands.
2590 | *
2591 | * @private
2592 | * @param {Array|Object} collection The collection to iterate over.
2593 | * @param {Function} iteratee The function invoked per iteration.
2594 | * @returns {Array|Object} Returns `collection`.
2595 | */
2596 | var baseEach = createBaseEach(baseForOwn);
2597 |
2598 | module.exports = baseEach;
2599 |
2600 |
2601 | /***/ },
2602 | /* 77 */
2603 | /***/ function(module, exports, __webpack_require__) {
2604 |
2605 | var createBaseFor = __webpack_require__(105);
2606 |
2607 | /**
2608 | * The base implementation of `baseForOwn` which iterates over `object`
2609 | * properties returned by `keysFunc` and invokes `iteratee` for each property.
2610 | * Iteratee functions may exit iteration early by explicitly returning `false`.
2611 | *
2612 | * @private
2613 | * @param {Object} object The object to iterate over.
2614 | * @param {Function} iteratee The function invoked per iteration.
2615 | * @param {Function} keysFunc The function to get the keys of `object`.
2616 | * @returns {Object} Returns `object`.
2617 | */
2618 | var baseFor = createBaseFor();
2619 |
2620 | module.exports = baseFor;
2621 |
2622 |
2623 | /***/ },
2624 | /* 78 */
2625 | /***/ function(module, exports, __webpack_require__) {
2626 |
2627 | var baseFor = __webpack_require__(77),
2628 | keys = __webpack_require__(6);
2629 |
2630 | /**
2631 | * The base implementation of `_.forOwn` without support for iteratee shorthands.
2632 | *
2633 | * @private
2634 | * @param {Object} object The object to iterate over.
2635 | * @param {Function} iteratee The function invoked per iteration.
2636 | * @returns {Object} Returns `object`.
2637 | */
2638 | function baseForOwn(object, iteratee) {
2639 | return object && baseFor(object, iteratee, keys);
2640 | }
2641 |
2642 | module.exports = baseForOwn;
2643 |
2644 |
2645 | /***/ },
2646 | /* 79 */
2647 | /***/ function(module, exports, __webpack_require__) {
2648 |
2649 | var arrayPush = __webpack_require__(71),
2650 | isArray = __webpack_require__(1);
2651 |
2652 | /**
2653 | * The base implementation of `getAllKeys` and `getAllKeysIn` which uses
2654 | * `keysFunc` and `symbolsFunc` to get the enumerable property names and
2655 | * symbols of `object`.
2656 | *
2657 | * @private
2658 | * @param {Object} object The object to query.
2659 | * @param {Function} keysFunc The function to get the keys of `object`.
2660 | * @param {Function} symbolsFunc The function to get the symbols of `object`.
2661 | * @returns {Array} Returns the array of property names and symbols.
2662 | */
2663 | function baseGetAllKeys(object, keysFunc, symbolsFunc) {
2664 | var result = keysFunc(object);
2665 | return isArray(object)
2666 | ? result
2667 | : arrayPush(result, symbolsFunc(object));
2668 | }
2669 |
2670 | module.exports = baseGetAllKeys;
2671 |
2672 |
2673 | /***/ },
2674 | /* 80 */
2675 | /***/ function(module, exports) {
2676 |
2677 | /**
2678 | * The base implementation of `_.hasIn` without support for deep paths.
2679 | *
2680 | * @private
2681 | * @param {Object} object The object to query.
2682 | * @param {Array|string} key The key to check.
2683 | * @returns {boolean} Returns `true` if `key` exists, else `false`.
2684 | */
2685 | function baseHasIn(object, key) {
2686 | return key in Object(object);
2687 | }
2688 |
2689 | module.exports = baseHasIn;
2690 |
2691 |
2692 | /***/ },
2693 | /* 81 */
2694 | /***/ function(module, exports, __webpack_require__) {
2695 |
2696 | var Stack = __webpack_require__(18),
2697 | equalArrays = __webpack_require__(44),
2698 | equalByTag = __webpack_require__(106),
2699 | equalObjects = __webpack_require__(107),
2700 | getTag = __webpack_require__(47),
2701 | isArray = __webpack_require__(1),
2702 | isHostObject = __webpack_require__(23),
2703 | isTypedArray = __webpack_require__(139);
2704 |
2705 | /** Used to compose bitmasks for comparison styles. */
2706 | var PARTIAL_COMPARE_FLAG = 2;
2707 |
2708 | /** `Object#toString` result references. */
2709 | var argsTag = '[object Arguments]',
2710 | arrayTag = '[object Array]',
2711 | objectTag = '[object Object]';
2712 |
2713 | /** Used for built-in method references. */
2714 | var objectProto = Object.prototype;
2715 |
2716 | /** Used to check objects for own properties. */
2717 | var hasOwnProperty = objectProto.hasOwnProperty;
2718 |
2719 | /**
2720 | * A specialized version of `baseIsEqual` for arrays and objects which performs
2721 | * deep comparisons and tracks traversed objects enabling objects with circular
2722 | * references to be compared.
2723 | *
2724 | * @private
2725 | * @param {Object} object The object to compare.
2726 | * @param {Object} other The other object to compare.
2727 | * @param {Function} equalFunc The function to determine equivalents of values.
2728 | * @param {Function} [customizer] The function to customize comparisons.
2729 | * @param {number} [bitmask] The bitmask of comparison flags. See `baseIsEqual`
2730 | * for more details.
2731 | * @param {Object} [stack] Tracks traversed `object` and `other` objects.
2732 | * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
2733 | */
2734 | function baseIsEqualDeep(object, other, equalFunc, customizer, bitmask, stack) {
2735 | var objIsArr = isArray(object),
2736 | othIsArr = isArray(other),
2737 | objTag = arrayTag,
2738 | othTag = arrayTag;
2739 |
2740 | if (!objIsArr) {
2741 | objTag = getTag(object);
2742 | objTag = objTag == argsTag ? objectTag : objTag;
2743 | }
2744 | if (!othIsArr) {
2745 | othTag = getTag(other);
2746 | othTag = othTag == argsTag ? objectTag : othTag;
2747 | }
2748 | var objIsObj = objTag == objectTag && !isHostObject(object),
2749 | othIsObj = othTag == objectTag && !isHostObject(other),
2750 | isSameTag = objTag == othTag;
2751 |
2752 | if (isSameTag && !objIsObj) {
2753 | stack || (stack = new Stack);
2754 | return (objIsArr || isTypedArray(object))
2755 | ? equalArrays(object, other, equalFunc, customizer, bitmask, stack)
2756 | : equalByTag(object, other, objTag, equalFunc, customizer, bitmask, stack);
2757 | }
2758 | if (!(bitmask & PARTIAL_COMPARE_FLAG)) {
2759 | var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),
2760 | othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');
2761 |
2762 | if (objIsWrapped || othIsWrapped) {
2763 | var objUnwrapped = objIsWrapped ? object.value() : object,
2764 | othUnwrapped = othIsWrapped ? other.value() : other;
2765 |
2766 | stack || (stack = new Stack);
2767 | return equalFunc(objUnwrapped, othUnwrapped, customizer, bitmask, stack);
2768 | }
2769 | }
2770 | if (!isSameTag) {
2771 | return false;
2772 | }
2773 | stack || (stack = new Stack);
2774 | return equalObjects(object, other, equalFunc, customizer, bitmask, stack);
2775 | }
2776 |
2777 | module.exports = baseIsEqualDeep;
2778 |
2779 |
2780 | /***/ },
2781 | /* 82 */
2782 | /***/ function(module, exports, __webpack_require__) {
2783 |
2784 | var Stack = __webpack_require__(18),
2785 | baseIsEqual = __webpack_require__(41);
2786 |
2787 | /** Used to compose bitmasks for comparison styles. */
2788 | var UNORDERED_COMPARE_FLAG = 1,
2789 | PARTIAL_COMPARE_FLAG = 2;
2790 |
2791 | /**
2792 | * The base implementation of `_.isMatch` without support for iteratee shorthands.
2793 | *
2794 | * @private
2795 | * @param {Object} object The object to inspect.
2796 | * @param {Object} source The object of property values to match.
2797 | * @param {Array} matchData The property names, values, and compare flags to match.
2798 | * @param {Function} [customizer] The function to customize comparisons.
2799 | * @returns {boolean} Returns `true` if `object` is a match, else `false`.
2800 | */
2801 | function baseIsMatch(object, source, matchData, customizer) {
2802 | var index = matchData.length,
2803 | length = index,
2804 | noCustomizer = !customizer;
2805 |
2806 | if (object == null) {
2807 | return !length;
2808 | }
2809 | object = Object(object);
2810 | while (index--) {
2811 | var data = matchData[index];
2812 | if ((noCustomizer && data[2])
2813 | ? data[1] !== object[data[0]]
2814 | : !(data[0] in object)
2815 | ) {
2816 | return false;
2817 | }
2818 | }
2819 | while (++index < length) {
2820 | data = matchData[index];
2821 | var key = data[0],
2822 | objValue = object[key],
2823 | srcValue = data[1];
2824 |
2825 | if (noCustomizer && data[2]) {
2826 | if (objValue === undefined && !(key in object)) {
2827 | return false;
2828 | }
2829 | } else {
2830 | var stack = new Stack;
2831 | if (customizer) {
2832 | var result = customizer(objValue, srcValue, key, object, source, stack);
2833 | }
2834 | if (!(result === undefined
2835 | ? baseIsEqual(srcValue, objValue, customizer, UNORDERED_COMPARE_FLAG | PARTIAL_COMPARE_FLAG, stack)
2836 | : result
2837 | )) {
2838 | return false;
2839 | }
2840 | }
2841 | }
2842 | return true;
2843 | }
2844 |
2845 | module.exports = baseIsMatch;
2846 |
2847 |
2848 | /***/ },
2849 | /* 83 */
2850 | /***/ function(module, exports, __webpack_require__) {
2851 |
2852 | var baseMatches = __webpack_require__(86),
2853 | baseMatchesProperty = __webpack_require__(87),
2854 | identity = __webpack_require__(135),
2855 | isArray = __webpack_require__(1),
2856 | property = __webpack_require__(142);
2857 |
2858 | /**
2859 | * The base implementation of `_.iteratee`.
2860 | *
2861 | * @private
2862 | * @param {*} [value=_.identity] The value to convert to an iteratee.
2863 | * @returns {Function} Returns the iteratee.
2864 | */
2865 | function baseIteratee(value) {
2866 | // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9.
2867 | // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details.
2868 | if (typeof value == 'function') {
2869 | return value;
2870 | }
2871 | if (value == null) {
2872 | return identity;
2873 | }
2874 | if (typeof value == 'object') {
2875 | return isArray(value)
2876 | ? baseMatchesProperty(value[0], value[1])
2877 | : baseMatches(value);
2878 | }
2879 | return property(value);
2880 | }
2881 |
2882 | module.exports = baseIteratee;
2883 |
2884 |
2885 | /***/ },
2886 | /* 84 */
2887 | /***/ function(module, exports) {
2888 |
2889 | /* Built-in method references for those with the same name as other `lodash` methods. */
2890 | var nativeKeys = Object.keys;
2891 |
2892 | /**
2893 | * The base implementation of `_.keys` which doesn't skip the constructor
2894 | * property of prototypes or treat sparse arrays as dense.
2895 | *
2896 | * @private
2897 | * @param {Object} object The object to query.
2898 | * @returns {Array} Returns the array of property names.
2899 | */
2900 | function baseKeys(object) {
2901 | return nativeKeys(Object(object));
2902 | }
2903 |
2904 | module.exports = baseKeys;
2905 |
2906 |
2907 | /***/ },
2908 | /* 85 */
2909 | /***/ function(module, exports, __webpack_require__) {
2910 |
2911 | var baseEach = __webpack_require__(76),
2912 | isArrayLike = __webpack_require__(13);
2913 |
2914 | /**
2915 | * The base implementation of `_.map` without support for iteratee shorthands.
2916 | *
2917 | * @private
2918 | * @param {Array|Object} collection The collection to iterate over.
2919 | * @param {Function} iteratee The function invoked per iteration.
2920 | * @returns {Array} Returns the new mapped array.
2921 | */
2922 | function baseMap(collection, iteratee) {
2923 | var index = -1,
2924 | result = isArrayLike(collection) ? Array(collection.length) : [];
2925 |
2926 | baseEach(collection, function(value, key, collection) {
2927 | result[++index] = iteratee(value, key, collection);
2928 | });
2929 | return result;
2930 | }
2931 |
2932 | module.exports = baseMap;
2933 |
2934 |
2935 | /***/ },
2936 | /* 86 */
2937 | /***/ function(module, exports, __webpack_require__) {
2938 |
2939 | var baseIsMatch = __webpack_require__(82),
2940 | getMatchData = __webpack_require__(110),
2941 | matchesStrictComparable = __webpack_require__(52);
2942 |
2943 | /**
2944 | * The base implementation of `_.matches` which doesn't clone `source`.
2945 | *
2946 | * @private
2947 | * @param {Object} source The object of property values to match.
2948 | * @returns {Function} Returns the new function.
2949 | */
2950 | function baseMatches(source) {
2951 | var matchData = getMatchData(source);
2952 | if (matchData.length == 1 && matchData[0][2]) {
2953 | return matchesStrictComparable(matchData[0][0], matchData[0][1]);
2954 | }
2955 | return function(object) {
2956 | return object === source || baseIsMatch(object, source, matchData);
2957 | };
2958 | }
2959 |
2960 | module.exports = baseMatches;
2961 |
2962 |
2963 | /***/ },
2964 | /* 87 */
2965 | /***/ function(module, exports, __webpack_require__) {
2966 |
2967 | var baseIsEqual = __webpack_require__(41),
2968 | get = __webpack_require__(25),
2969 | hasIn = __webpack_require__(133),
2970 | isKey = __webpack_require__(7),
2971 | isStrictComparable = __webpack_require__(50),
2972 | matchesStrictComparable = __webpack_require__(52),
2973 | toKey = __webpack_require__(8);
2974 |
2975 | /** Used to compose bitmasks for comparison styles. */
2976 | var UNORDERED_COMPARE_FLAG = 1,
2977 | PARTIAL_COMPARE_FLAG = 2;
2978 |
2979 | /**
2980 | * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.
2981 | *
2982 | * @private
2983 | * @param {string} path The path of the property to get.
2984 | * @param {*} srcValue The value to match.
2985 | * @returns {Function} Returns the new function.
2986 | */
2987 | function baseMatchesProperty(path, srcValue) {
2988 | if (isKey(path) && isStrictComparable(srcValue)) {
2989 | return matchesStrictComparable(toKey(path), srcValue);
2990 | }
2991 | return function(object) {
2992 | var objValue = get(object, path);
2993 | return (objValue === undefined && objValue === srcValue)
2994 | ? hasIn(object, path)
2995 | : baseIsEqual(srcValue, objValue, undefined, UNORDERED_COMPARE_FLAG | PARTIAL_COMPARE_FLAG);
2996 | };
2997 | }
2998 |
2999 | module.exports = baseMatchesProperty;
3000 |
3001 |
3002 | /***/ },
3003 | /* 88 */
3004 | /***/ function(module, exports, __webpack_require__) {
3005 |
3006 | var baseGet = __webpack_require__(39);
3007 |
3008 | /**
3009 | * A specialized version of `baseProperty` which supports deep paths.
3010 | *
3011 | * @private
3012 | * @param {Array|string} path The path of the property to get.
3013 | * @returns {Function} Returns the new function.
3014 | */
3015 | function basePropertyDeep(path) {
3016 | return function(object) {
3017 | return baseGet(object, path);
3018 | };
3019 | }
3020 |
3021 | module.exports = basePropertyDeep;
3022 |
3023 |
3024 | /***/ },
3025 | /* 89 */
3026 | /***/ function(module, exports, __webpack_require__) {
3027 |
3028 | var assignValue = __webpack_require__(20),
3029 | castPath = __webpack_require__(21),
3030 | isIndex = __webpack_require__(24),
3031 | isKey = __webpack_require__(7),
3032 | isObject = __webpack_require__(3),
3033 | toKey = __webpack_require__(8);
3034 |
3035 | /**
3036 | * The base implementation of `_.set`.
3037 | *
3038 | * @private
3039 | * @param {Object} object The object to query.
3040 | * @param {Array|string} path The path of the property to set.
3041 | * @param {*} value The value to set.
3042 | * @param {Function} [customizer] The function to customize path creation.
3043 | * @returns {Object} Returns `object`.
3044 | */
3045 | function baseSet(object, path, value, customizer) {
3046 | path = isKey(path, object) ? [path] : castPath(path);
3047 |
3048 | var index = -1,
3049 | length = path.length,
3050 | lastIndex = length - 1,
3051 | nested = object;
3052 |
3053 | while (nested != null && ++index < length) {
3054 | var key = toKey(path[index]);
3055 | if (isObject(nested)) {
3056 | var newValue = value;
3057 | if (index != lastIndex) {
3058 | var objValue = nested[key];
3059 | newValue = customizer ? customizer(objValue, key, nested) : undefined;
3060 | if (newValue === undefined) {
3061 | newValue = objValue == null
3062 | ? (isIndex(path[index + 1]) ? [] : {})
3063 | : objValue;
3064 | }
3065 | }
3066 | assignValue(nested, key, newValue);
3067 | }
3068 | nested = nested[key];
3069 | }
3070 | return object;
3071 | }
3072 |
3073 | module.exports = baseSet;
3074 |
3075 |
3076 | /***/ },
3077 | /* 90 */
3078 | /***/ function(module, exports) {
3079 |
3080 | /**
3081 | * The base implementation of `_.slice` without an iteratee call guard.
3082 | *
3083 | * @private
3084 | * @param {Array} array The array to slice.
3085 | * @param {number} [start=0] The start position.
3086 | * @param {number} [end=array.length] The end position.
3087 | * @returns {Array} Returns the slice of `array`.
3088 | */
3089 | function baseSlice(array, start, end) {
3090 | var index = -1,
3091 | length = array.length;
3092 |
3093 | if (start < 0) {
3094 | start = -start > length ? 0 : (length + start);
3095 | }
3096 | end = end > length ? length : end;
3097 | if (end < 0) {
3098 | end += length;
3099 | }
3100 | length = start > end ? 0 : ((end - start) >>> 0);
3101 | start >>>= 0;
3102 |
3103 | var result = Array(length);
3104 | while (++index < length) {
3105 | result[index] = array[index + start];
3106 | }
3107 | return result;
3108 | }
3109 |
3110 | module.exports = baseSlice;
3111 |
3112 |
3113 | /***/ },
3114 | /* 91 */
3115 | /***/ function(module, exports) {
3116 |
3117 | /**
3118 | * The base implementation of `_.times` without support for iteratee shorthands
3119 | * or max array length checks.
3120 | *
3121 | * @private
3122 | * @param {number} n The number of times to invoke `iteratee`.
3123 | * @param {Function} iteratee The function invoked per iteration.
3124 | * @returns {Array} Returns the array of results.
3125 | */
3126 | function baseTimes(n, iteratee) {
3127 | var index = -1,
3128 | result = Array(n);
3129 |
3130 | while (++index < n) {
3131 | result[index] = iteratee(index);
3132 | }
3133 | return result;
3134 | }
3135 |
3136 | module.exports = baseTimes;
3137 |
3138 |
3139 | /***/ },
3140 | /* 92 */
3141 | /***/ function(module, exports, __webpack_require__) {
3142 |
3143 | var arrayMap = __webpack_require__(33);
3144 |
3145 | /**
3146 | * The base implementation of `_.toPairs` and `_.toPairsIn` which creates an array
3147 | * of key-value pairs for `object` corresponding to the property names of `props`.
3148 | *
3149 | * @private
3150 | * @param {Object} object The object to query.
3151 | * @param {Array} props The property names to get values for.
3152 | * @returns {Object} Returns the new array of key-value pairs.
3153 | */
3154 | function baseToPairs(object, props) {
3155 | return arrayMap(props, function(key) {
3156 | return [key, object[key]];
3157 | });
3158 | }
3159 |
3160 | module.exports = baseToPairs;
3161 |
3162 |
3163 | /***/ },
3164 | /* 93 */
3165 | /***/ function(module, exports, __webpack_require__) {
3166 |
3167 | var Symbol = __webpack_require__(19),
3168 | isSymbol = __webpack_require__(16);
3169 |
3170 | /** Used as references for various `Number` constants. */
3171 | var INFINITY = 1 / 0;
3172 |
3173 | /** Used to convert symbols to primitives and strings. */
3174 | var symbolProto = Symbol ? Symbol.prototype : undefined,
3175 | symbolToString = symbolProto ? symbolProto.toString : undefined;
3176 |
3177 | /**
3178 | * The base implementation of `_.toString` which doesn't convert nullish
3179 | * values to empty strings.
3180 | *
3181 | * @private
3182 | * @param {*} value The value to process.
3183 | * @returns {string} Returns the string.
3184 | */
3185 | function baseToString(value) {
3186 | // Exit early for strings to avoid a performance hit in some environments.
3187 | if (typeof value == 'string') {
3188 | return value;
3189 | }
3190 | if (isSymbol(value)) {
3191 | return symbolToString ? symbolToString.call(value) : '';
3192 | }
3193 | var result = (value + '');
3194 | return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
3195 | }
3196 |
3197 | module.exports = baseToString;
3198 |
3199 |
3200 | /***/ },
3201 | /* 94 */
3202 | /***/ function(module, exports) {
3203 |
3204 | /**
3205 | * Checks if `value` is a global object.
3206 | *
3207 | * @private
3208 | * @param {*} value The value to check.
3209 | * @returns {null|Object} Returns `value` if it's a global object, else `null`.
3210 | */
3211 | function checkGlobal(value) {
3212 | return (value && value.Object === Object) ? value : null;
3213 | }
3214 |
3215 | module.exports = checkGlobal;
3216 |
3217 |
3218 | /***/ },
3219 | /* 95 */
3220 | /***/ function(module, exports) {
3221 |
3222 | /**
3223 | * Creates a clone of `buffer`.
3224 | *
3225 | * @private
3226 | * @param {Buffer} buffer The buffer to clone.
3227 | * @param {boolean} [isDeep] Specify a deep clone.
3228 | * @returns {Buffer} Returns the cloned buffer.
3229 | */
3230 | function cloneBuffer(buffer, isDeep) {
3231 | if (isDeep) {
3232 | return buffer.slice();
3233 | }
3234 | var result = new buffer.constructor(buffer.length);
3235 | buffer.copy(result);
3236 | return result;
3237 | }
3238 |
3239 | module.exports = cloneBuffer;
3240 |
3241 |
3242 | /***/ },
3243 | /* 96 */
3244 | /***/ function(module, exports, __webpack_require__) {
3245 |
3246 | var cloneArrayBuffer = __webpack_require__(22);
3247 |
3248 | /**
3249 | * Creates a clone of `dataView`.
3250 | *
3251 | * @private
3252 | * @param {Object} dataView The data view to clone.
3253 | * @param {boolean} [isDeep] Specify a deep clone.
3254 | * @returns {Object} Returns the cloned data view.
3255 | */
3256 | function cloneDataView(dataView, isDeep) {
3257 | var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;
3258 | return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);
3259 | }
3260 |
3261 | module.exports = cloneDataView;
3262 |
3263 |
3264 | /***/ },
3265 | /* 97 */
3266 | /***/ function(module, exports, __webpack_require__) {
3267 |
3268 | var addMapEntry = __webpack_require__(68),
3269 | arrayReduce = __webpack_require__(34),
3270 | mapToArray = __webpack_require__(51);
3271 |
3272 | /**
3273 | * Creates a clone of `map`.
3274 | *
3275 | * @private
3276 | * @param {Object} map The map to clone.
3277 | * @param {Function} cloneFunc The function to clone values.
3278 | * @param {boolean} [isDeep] Specify a deep clone.
3279 | * @returns {Object} Returns the cloned map.
3280 | */
3281 | function cloneMap(map, isDeep, cloneFunc) {
3282 | var array = isDeep ? cloneFunc(mapToArray(map), true) : mapToArray(map);
3283 | return arrayReduce(array, addMapEntry, new map.constructor);
3284 | }
3285 |
3286 | module.exports = cloneMap;
3287 |
3288 |
3289 | /***/ },
3290 | /* 98 */
3291 | /***/ function(module, exports) {
3292 |
3293 | /** Used to match `RegExp` flags from their coerced string values. */
3294 | var reFlags = /\w*$/;
3295 |
3296 | /**
3297 | * Creates a clone of `regexp`.
3298 | *
3299 | * @private
3300 | * @param {Object} regexp The regexp to clone.
3301 | * @returns {Object} Returns the cloned regexp.
3302 | */
3303 | function cloneRegExp(regexp) {
3304 | var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));
3305 | result.lastIndex = regexp.lastIndex;
3306 | return result;
3307 | }
3308 |
3309 | module.exports = cloneRegExp;
3310 |
3311 |
3312 | /***/ },
3313 | /* 99 */
3314 | /***/ function(module, exports, __webpack_require__) {
3315 |
3316 | var addSetEntry = __webpack_require__(69),
3317 | arrayReduce = __webpack_require__(34),
3318 | setToArray = __webpack_require__(53);
3319 |
3320 | /**
3321 | * Creates a clone of `set`.
3322 | *
3323 | * @private
3324 | * @param {Object} set The set to clone.
3325 | * @param {Function} cloneFunc The function to clone values.
3326 | * @param {boolean} [isDeep] Specify a deep clone.
3327 | * @returns {Object} Returns the cloned set.
3328 | */
3329 | function cloneSet(set, isDeep, cloneFunc) {
3330 | var array = isDeep ? cloneFunc(setToArray(set), true) : setToArray(set);
3331 | return arrayReduce(array, addSetEntry, new set.constructor);
3332 | }
3333 |
3334 | module.exports = cloneSet;
3335 |
3336 |
3337 | /***/ },
3338 | /* 100 */
3339 | /***/ function(module, exports, __webpack_require__) {
3340 |
3341 | var Symbol = __webpack_require__(19);
3342 |
3343 | /** Used to convert symbols to primitives and strings. */
3344 | var symbolProto = Symbol ? Symbol.prototype : undefined,
3345 | symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;
3346 |
3347 | /**
3348 | * Creates a clone of the `symbol` object.
3349 | *
3350 | * @private
3351 | * @param {Object} symbol The symbol object to clone.
3352 | * @returns {Object} Returns the cloned symbol object.
3353 | */
3354 | function cloneSymbol(symbol) {
3355 | return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};
3356 | }
3357 |
3358 | module.exports = cloneSymbol;
3359 |
3360 |
3361 | /***/ },
3362 | /* 101 */
3363 | /***/ function(module, exports, __webpack_require__) {
3364 |
3365 | var cloneArrayBuffer = __webpack_require__(22);
3366 |
3367 | /**
3368 | * Creates a clone of `typedArray`.
3369 | *
3370 | * @private
3371 | * @param {Object} typedArray The typed array to clone.
3372 | * @param {boolean} [isDeep] Specify a deep clone.
3373 | * @returns {Object} Returns the cloned typed array.
3374 | */
3375 | function cloneTypedArray(typedArray, isDeep) {
3376 | var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;
3377 | return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
3378 | }
3379 |
3380 | module.exports = cloneTypedArray;
3381 |
3382 |
3383 | /***/ },
3384 | /* 102 */
3385 | /***/ function(module, exports) {
3386 |
3387 | /**
3388 | * Copies the values of `source` to `array`.
3389 | *
3390 | * @private
3391 | * @param {Array} source The array to copy values from.
3392 | * @param {Array} [array=[]] The array to copy values to.
3393 | * @returns {Array} Returns `array`.
3394 | */
3395 | function copyArray(source, array) {
3396 | var index = -1,
3397 | length = source.length;
3398 |
3399 | array || (array = Array(length));
3400 | while (++index < length) {
3401 | array[index] = source[index];
3402 | }
3403 | return array;
3404 | }
3405 |
3406 | module.exports = copyArray;
3407 |
3408 |
3409 | /***/ },
3410 | /* 103 */
3411 | /***/ function(module, exports, __webpack_require__) {
3412 |
3413 | var copyObject = __webpack_require__(43),
3414 | getSymbols = __webpack_require__(46);
3415 |
3416 | /**
3417 | * Copies own symbol properties of `source` to `object`.
3418 | *
3419 | * @private
3420 | * @param {Object} source The object to copy symbols from.
3421 | * @param {Object} [object={}] The object to copy symbols to.
3422 | * @returns {Object} Returns `object`.
3423 | */
3424 | function copySymbols(source, object) {
3425 | return copyObject(source, getSymbols(source), object);
3426 | }
3427 |
3428 | module.exports = copySymbols;
3429 |
3430 |
3431 | /***/ },
3432 | /* 104 */
3433 | /***/ function(module, exports, __webpack_require__) {
3434 |
3435 | var isArrayLike = __webpack_require__(13);
3436 |
3437 | /**
3438 | * Creates a `baseEach` or `baseEachRight` function.
3439 | *
3440 | * @private
3441 | * @param {Function} eachFunc The function to iterate over a collection.
3442 | * @param {boolean} [fromRight] Specify iterating from right to left.
3443 | * @returns {Function} Returns the new base function.
3444 | */
3445 | function createBaseEach(eachFunc, fromRight) {
3446 | return function(collection, iteratee) {
3447 | if (collection == null) {
3448 | return collection;
3449 | }
3450 | if (!isArrayLike(collection)) {
3451 | return eachFunc(collection, iteratee);
3452 | }
3453 | var length = collection.length,
3454 | index = fromRight ? length : -1,
3455 | iterable = Object(collection);
3456 |
3457 | while ((fromRight ? index-- : ++index < length)) {
3458 | if (iteratee(iterable[index], index, iterable) === false) {
3459 | break;
3460 | }
3461 | }
3462 | return collection;
3463 | };
3464 | }
3465 |
3466 | module.exports = createBaseEach;
3467 |
3468 |
3469 | /***/ },
3470 | /* 105 */
3471 | /***/ function(module, exports) {
3472 |
3473 | /**
3474 | * Creates a base function for methods like `_.forIn` and `_.forOwn`.
3475 | *
3476 | * @private
3477 | * @param {boolean} [fromRight] Specify iterating from right to left.
3478 | * @returns {Function} Returns the new base function.
3479 | */
3480 | function createBaseFor(fromRight) {
3481 | return function(object, iteratee, keysFunc) {
3482 | var index = -1,
3483 | iterable = Object(object),
3484 | props = keysFunc(object),
3485 | length = props.length;
3486 |
3487 | while (length--) {
3488 | var key = props[fromRight ? length : ++index];
3489 | if (iteratee(iterable[key], key, iterable) === false) {
3490 | break;
3491 | }
3492 | }
3493 | return object;
3494 | };
3495 | }
3496 |
3497 | module.exports = createBaseFor;
3498 |
3499 |
3500 | /***/ },
3501 | /* 106 */
3502 | /***/ function(module, exports, __webpack_require__) {
3503 |
3504 | var Symbol = __webpack_require__(19),
3505 | Uint8Array = __webpack_require__(32),
3506 | equalArrays = __webpack_require__(44),
3507 | mapToArray = __webpack_require__(51),
3508 | setToArray = __webpack_require__(53);
3509 |
3510 | /** Used to compose bitmasks for comparison styles. */
3511 | var UNORDERED_COMPARE_FLAG = 1,
3512 | PARTIAL_COMPARE_FLAG = 2;
3513 |
3514 | /** `Object#toString` result references. */
3515 | var boolTag = '[object Boolean]',
3516 | dateTag = '[object Date]',
3517 | errorTag = '[object Error]',
3518 | mapTag = '[object Map]',
3519 | numberTag = '[object Number]',
3520 | regexpTag = '[object RegExp]',
3521 | setTag = '[object Set]',
3522 | stringTag = '[object String]',
3523 | symbolTag = '[object Symbol]';
3524 |
3525 | var arrayBufferTag = '[object ArrayBuffer]',
3526 | dataViewTag = '[object DataView]';
3527 |
3528 | /** Used to convert symbols to primitives and strings. */
3529 | var symbolProto = Symbol ? Symbol.prototype : undefined,
3530 | symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;
3531 |
3532 | /**
3533 | * A specialized version of `baseIsEqualDeep` for comparing objects of
3534 | * the same `toStringTag`.
3535 | *
3536 | * **Note:** This function only supports comparing values with tags of
3537 | * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
3538 | *
3539 | * @private
3540 | * @param {Object} object The object to compare.
3541 | * @param {Object} other The other object to compare.
3542 | * @param {string} tag The `toStringTag` of the objects to compare.
3543 | * @param {Function} equalFunc The function to determine equivalents of values.
3544 | * @param {Function} customizer The function to customize comparisons.
3545 | * @param {number} bitmask The bitmask of comparison flags. See `baseIsEqual`
3546 | * for more details.
3547 | * @param {Object} stack Tracks traversed `object` and `other` objects.
3548 | * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
3549 | */
3550 | function equalByTag(object, other, tag, equalFunc, customizer, bitmask, stack) {
3551 | switch (tag) {
3552 | case dataViewTag:
3553 | if ((object.byteLength != other.byteLength) ||
3554 | (object.byteOffset != other.byteOffset)) {
3555 | return false;
3556 | }
3557 | object = object.buffer;
3558 | other = other.buffer;
3559 |
3560 | case arrayBufferTag:
3561 | if ((object.byteLength != other.byteLength) ||
3562 | !equalFunc(new Uint8Array(object), new Uint8Array(other))) {
3563 | return false;
3564 | }
3565 | return true;
3566 |
3567 | case boolTag:
3568 | case dateTag:
3569 | // Coerce dates and booleans to numbers, dates to milliseconds and
3570 | // booleans to `1` or `0` treating invalid dates coerced to `NaN` as
3571 | // not equal.
3572 | return +object == +other;
3573 |
3574 | case errorTag:
3575 | return object.name == other.name && object.message == other.message;
3576 |
3577 | case numberTag:
3578 | // Treat `NaN` vs. `NaN` as equal.
3579 | return (object != +object) ? other != +other : object == +other;
3580 |
3581 | case regexpTag:
3582 | case stringTag:
3583 | // Coerce regexes to strings and treat strings, primitives and objects,
3584 | // as equal. See http://www.ecma-international.org/ecma-262/6.0/#sec-regexp.prototype.tostring
3585 | // for more details.
3586 | return object == (other + '');
3587 |
3588 | case mapTag:
3589 | var convert = mapToArray;
3590 |
3591 | case setTag:
3592 | var isPartial = bitmask & PARTIAL_COMPARE_FLAG;
3593 | convert || (convert = setToArray);
3594 |
3595 | if (object.size != other.size && !isPartial) {
3596 | return false;
3597 | }
3598 | // Assume cyclic values are equal.
3599 | var stacked = stack.get(object);
3600 | if (stacked) {
3601 | return stacked == other;
3602 | }
3603 | bitmask |= UNORDERED_COMPARE_FLAG;
3604 | stack.set(object, other);
3605 |
3606 | // Recursively compare objects (susceptible to call stack limits).
3607 | return equalArrays(convert(object), convert(other), equalFunc, customizer, bitmask, stack);
3608 |
3609 | case symbolTag:
3610 | if (symbolValueOf) {
3611 | return symbolValueOf.call(object) == symbolValueOf.call(other);
3612 | }
3613 | }
3614 | return false;
3615 | }
3616 |
3617 | module.exports = equalByTag;
3618 |
3619 |
3620 | /***/ },
3621 | /* 107 */
3622 | /***/ function(module, exports, __webpack_require__) {
3623 |
3624 | var baseHas = __webpack_require__(40),
3625 | keys = __webpack_require__(6);
3626 |
3627 | /** Used to compose bitmasks for comparison styles. */
3628 | var PARTIAL_COMPARE_FLAG = 2;
3629 |
3630 | /**
3631 | * A specialized version of `baseIsEqualDeep` for objects with support for
3632 | * partial deep comparisons.
3633 | *
3634 | * @private
3635 | * @param {Object} object The object to compare.
3636 | * @param {Object} other The other object to compare.
3637 | * @param {Function} equalFunc The function to determine equivalents of values.
3638 | * @param {Function} customizer The function to customize comparisons.
3639 | * @param {number} bitmask The bitmask of comparison flags. See `baseIsEqual`
3640 | * for more details.
3641 | * @param {Object} stack Tracks traversed `object` and `other` objects.
3642 | * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
3643 | */
3644 | function equalObjects(object, other, equalFunc, customizer, bitmask, stack) {
3645 | var isPartial = bitmask & PARTIAL_COMPARE_FLAG,
3646 | objProps = keys(object),
3647 | objLength = objProps.length,
3648 | othProps = keys(other),
3649 | othLength = othProps.length;
3650 |
3651 | if (objLength != othLength && !isPartial) {
3652 | return false;
3653 | }
3654 | var index = objLength;
3655 | while (index--) {
3656 | var key = objProps[index];
3657 | if (!(isPartial ? key in other : baseHas(other, key))) {
3658 | return false;
3659 | }
3660 | }
3661 | // Assume cyclic values are equal.
3662 | var stacked = stack.get(object);
3663 | if (stacked) {
3664 | return stacked == other;
3665 | }
3666 | var result = true;
3667 | stack.set(object, other);
3668 |
3669 | var skipCtor = isPartial;
3670 | while (++index < objLength) {
3671 | key = objProps[index];
3672 | var objValue = object[key],
3673 | othValue = other[key];
3674 |
3675 | if (customizer) {
3676 | var compared = isPartial
3677 | ? customizer(othValue, objValue, key, other, object, stack)
3678 | : customizer(objValue, othValue, key, object, other, stack);
3679 | }
3680 | // Recursively compare objects (susceptible to call stack limits).
3681 | if (!(compared === undefined
3682 | ? (objValue === othValue || equalFunc(objValue, othValue, customizer, bitmask, stack))
3683 | : compared
3684 | )) {
3685 | result = false;
3686 | break;
3687 | }
3688 | skipCtor || (skipCtor = key == 'constructor');
3689 | }
3690 | if (result && !skipCtor) {
3691 | var objCtor = object.constructor,
3692 | othCtor = other.constructor;
3693 |
3694 | // Non `Object` object instances with different constructors are not equal.
3695 | if (objCtor != othCtor &&
3696 | ('constructor' in object && 'constructor' in other) &&
3697 | !(typeof objCtor == 'function' && objCtor instanceof objCtor &&
3698 | typeof othCtor == 'function' && othCtor instanceof othCtor)) {
3699 | result = false;
3700 | }
3701 | }
3702 | stack['delete'](object);
3703 | return result;
3704 | }
3705 |
3706 | module.exports = equalObjects;
3707 |
3708 |
3709 | /***/ },
3710 | /* 108 */
3711 | /***/ function(module, exports, __webpack_require__) {
3712 |
3713 | var baseGetAllKeys = __webpack_require__(79),
3714 | getSymbols = __webpack_require__(46),
3715 | keys = __webpack_require__(6);
3716 |
3717 | /**
3718 | * Creates an array of own enumerable property names and symbols of `object`.
3719 | *
3720 | * @private
3721 | * @param {Object} object The object to query.
3722 | * @returns {Array} Returns the array of property names and symbols.
3723 | */
3724 | function getAllKeys(object) {
3725 | return baseGetAllKeys(object, keys, getSymbols);
3726 | }
3727 |
3728 | module.exports = getAllKeys;
3729 |
3730 |
3731 | /***/ },
3732 | /* 109 */
3733 | /***/ function(module, exports, __webpack_require__) {
3734 |
3735 | var baseProperty = __webpack_require__(42);
3736 |
3737 | /**
3738 | * Gets the "length" property value of `object`.
3739 | *
3740 | * **Note:** This function is used to avoid a
3741 | * [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792) that affects
3742 | * Safari on at least iOS 8.1-8.3 ARM64.
3743 | *
3744 | * @private
3745 | * @param {Object} object The object to query.
3746 | * @returns {*} Returns the "length" value.
3747 | */
3748 | var getLength = baseProperty('length');
3749 |
3750 | module.exports = getLength;
3751 |
3752 |
3753 | /***/ },
3754 | /* 110 */
3755 | /***/ function(module, exports, __webpack_require__) {
3756 |
3757 | var isStrictComparable = __webpack_require__(50),
3758 | toPairs = __webpack_require__(147);
3759 |
3760 | /**
3761 | * Gets the property names, values, and compare flags of `object`.
3762 | *
3763 | * @private
3764 | * @param {Object} object The object to query.
3765 | * @returns {Array} Returns the match data of `object`.
3766 | */
3767 | function getMatchData(object) {
3768 | var result = toPairs(object),
3769 | length = result.length;
3770 |
3771 | while (length--) {
3772 | result[length][2] = isStrictComparable(result[length][1]);
3773 | }
3774 | return result;
3775 | }
3776 |
3777 | module.exports = getMatchData;
3778 |
3779 |
3780 | /***/ },
3781 | /* 111 */
3782 | /***/ function(module, exports, __webpack_require__) {
3783 |
3784 | var castPath = __webpack_require__(21),
3785 | isArguments = __webpack_require__(56),
3786 | isArray = __webpack_require__(1),
3787 | isIndex = __webpack_require__(24),
3788 | isKey = __webpack_require__(7),
3789 | isLength = __webpack_require__(15),
3790 | isString = __webpack_require__(57),
3791 | toKey = __webpack_require__(8);
3792 |
3793 | /**
3794 | * Checks if `path` exists on `object`.
3795 | *
3796 | * @private
3797 | * @param {Object} object The object to query.
3798 | * @param {Array|string} path The path to check.
3799 | * @param {Function} hasFunc The function to check properties.
3800 | * @returns {boolean} Returns `true` if `path` exists, else `false`.
3801 | */
3802 | function hasPath(object, path, hasFunc) {
3803 | path = isKey(path, object) ? [path] : castPath(path);
3804 |
3805 | var result,
3806 | index = -1,
3807 | length = path.length;
3808 |
3809 | while (++index < length) {
3810 | var key = toKey(path[index]);
3811 | if (!(result = object != null && hasFunc(object, key))) {
3812 | break;
3813 | }
3814 | object = object[key];
3815 | }
3816 | if (result) {
3817 | return result;
3818 | }
3819 | var length = object ? object.length : 0;
3820 | return !!length && isLength(length) && isIndex(key, length) &&
3821 | (isArray(object) || isString(object) || isArguments(object));
3822 | }
3823 |
3824 | module.exports = hasPath;
3825 |
3826 |
3827 | /***/ },
3828 | /* 112 */
3829 | /***/ function(module, exports, __webpack_require__) {
3830 |
3831 | var hashHas = __webpack_require__(48);
3832 |
3833 | /**
3834 | * Removes `key` and its value from the hash.
3835 | *
3836 | * @private
3837 | * @param {Object} hash The hash to modify.
3838 | * @param {string} key The key of the value to remove.
3839 | * @returns {boolean} Returns `true` if the entry was removed, else `false`.
3840 | */
3841 | function hashDelete(hash, key) {
3842 | return hashHas(hash, key) && delete hash[key];
3843 | }
3844 |
3845 | module.exports = hashDelete;
3846 |
3847 |
3848 | /***/ },
3849 | /* 113 */
3850 | /***/ function(module, exports, __webpack_require__) {
3851 |
3852 | var nativeCreate = __webpack_require__(12);
3853 |
3854 | /** Used to stand-in for `undefined` hash values. */
3855 | var HASH_UNDEFINED = '__lodash_hash_undefined__';
3856 |
3857 | /** Used for built-in method references. */
3858 | var objectProto = Object.prototype;
3859 |
3860 | /** Used to check objects for own properties. */
3861 | var hasOwnProperty = objectProto.hasOwnProperty;
3862 |
3863 | /**
3864 | * Gets the hash value for `key`.
3865 | *
3866 | * @private
3867 | * @param {Object} hash The hash to query.
3868 | * @param {string} key The key of the value to get.
3869 | * @returns {*} Returns the entry value.
3870 | */
3871 | function hashGet(hash, key) {
3872 | if (nativeCreate) {
3873 | var result = hash[key];
3874 | return result === HASH_UNDEFINED ? undefined : result;
3875 | }
3876 | return hasOwnProperty.call(hash, key) ? hash[key] : undefined;
3877 | }
3878 |
3879 | module.exports = hashGet;
3880 |
3881 |
3882 | /***/ },
3883 | /* 114 */
3884 | /***/ function(module, exports, __webpack_require__) {
3885 |
3886 | var nativeCreate = __webpack_require__(12);
3887 |
3888 | /** Used to stand-in for `undefined` hash values. */
3889 | var HASH_UNDEFINED = '__lodash_hash_undefined__';
3890 |
3891 | /**
3892 | * Sets the hash `key` to `value`.
3893 | *
3894 | * @private
3895 | * @param {Object} hash The hash to modify.
3896 | * @param {string} key The key of the value to set.
3897 | * @param {*} value The value to set.
3898 | */
3899 | function hashSet(hash, key, value) {
3900 | hash[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
3901 | }
3902 |
3903 | module.exports = hashSet;
3904 |
3905 |
3906 | /***/ },
3907 | /* 115 */
3908 | /***/ function(module, exports, __webpack_require__) {
3909 |
3910 | var baseTimes = __webpack_require__(91),
3911 | isArguments = __webpack_require__(56),
3912 | isArray = __webpack_require__(1),
3913 | isLength = __webpack_require__(15),
3914 | isString = __webpack_require__(57);
3915 |
3916 | /**
3917 | * Creates an array of index keys for `object` values of arrays,
3918 | * `arguments` objects, and strings, otherwise `null` is returned.
3919 | *
3920 | * @private
3921 | * @param {Object} object The object to query.
3922 | * @returns {Array|null} Returns index keys, else `null`.
3923 | */
3924 | function indexKeys(object) {
3925 | var length = object ? object.length : undefined;
3926 | if (isLength(length) &&
3927 | (isArray(object) || isString(object) || isArguments(object))) {
3928 | return baseTimes(length, String);
3929 | }
3930 | return null;
3931 | }
3932 |
3933 | module.exports = indexKeys;
3934 |
3935 |
3936 | /***/ },
3937 | /* 116 */
3938 | /***/ function(module, exports) {
3939 |
3940 | /** Used for built-in method references. */
3941 | var objectProto = Object.prototype;
3942 |
3943 | /** Used to check objects for own properties. */
3944 | var hasOwnProperty = objectProto.hasOwnProperty;
3945 |
3946 | /**
3947 | * Initializes an array clone.
3948 | *
3949 | * @private
3950 | * @param {Array} array The array to clone.
3951 | * @returns {Array} Returns the initialized clone.
3952 | */
3953 | function initCloneArray(array) {
3954 | var length = array.length,
3955 | result = array.constructor(length);
3956 |
3957 | // Add properties assigned by `RegExp#exec`.
3958 | if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {
3959 | result.index = array.index;
3960 | result.input = array.input;
3961 | }
3962 | return result;
3963 | }
3964 |
3965 | module.exports = initCloneArray;
3966 |
3967 |
3968 | /***/ },
3969 | /* 117 */
3970 | /***/ function(module, exports, __webpack_require__) {
3971 |
3972 | var cloneArrayBuffer = __webpack_require__(22),
3973 | cloneDataView = __webpack_require__(96),
3974 | cloneMap = __webpack_require__(97),
3975 | cloneRegExp = __webpack_require__(98),
3976 | cloneSet = __webpack_require__(99),
3977 | cloneSymbol = __webpack_require__(100),
3978 | cloneTypedArray = __webpack_require__(101);
3979 |
3980 | /** `Object#toString` result references. */
3981 | var boolTag = '[object Boolean]',
3982 | dateTag = '[object Date]',
3983 | mapTag = '[object Map]',
3984 | numberTag = '[object Number]',
3985 | regexpTag = '[object RegExp]',
3986 | setTag = '[object Set]',
3987 | stringTag = '[object String]',
3988 | symbolTag = '[object Symbol]';
3989 |
3990 | var arrayBufferTag = '[object ArrayBuffer]',
3991 | dataViewTag = '[object DataView]',
3992 | float32Tag = '[object Float32Array]',
3993 | float64Tag = '[object Float64Array]',
3994 | int8Tag = '[object Int8Array]',
3995 | int16Tag = '[object Int16Array]',
3996 | int32Tag = '[object Int32Array]',
3997 | uint8Tag = '[object Uint8Array]',
3998 | uint8ClampedTag = '[object Uint8ClampedArray]',
3999 | uint16Tag = '[object Uint16Array]',
4000 | uint32Tag = '[object Uint32Array]';
4001 |
4002 | /**
4003 | * Initializes an object clone based on its `toStringTag`.
4004 | *
4005 | * **Note:** This function only supports cloning values with tags of
4006 | * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
4007 | *
4008 | * @private
4009 | * @param {Object} object The object to clone.
4010 | * @param {string} tag The `toStringTag` of the object to clone.
4011 | * @param {Function} cloneFunc The function to clone values.
4012 | * @param {boolean} [isDeep] Specify a deep clone.
4013 | * @returns {Object} Returns the initialized clone.
4014 | */
4015 | function initCloneByTag(object, tag, cloneFunc, isDeep) {
4016 | var Ctor = object.constructor;
4017 | switch (tag) {
4018 | case arrayBufferTag:
4019 | return cloneArrayBuffer(object);
4020 |
4021 | case boolTag:
4022 | case dateTag:
4023 | return new Ctor(+object);
4024 |
4025 | case dataViewTag:
4026 | return cloneDataView(object, isDeep);
4027 |
4028 | case float32Tag: case float64Tag:
4029 | case int8Tag: case int16Tag: case int32Tag:
4030 | case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:
4031 | return cloneTypedArray(object, isDeep);
4032 |
4033 | case mapTag:
4034 | return cloneMap(object, isDeep, cloneFunc);
4035 |
4036 | case numberTag:
4037 | case stringTag:
4038 | return new Ctor(object);
4039 |
4040 | case regexpTag:
4041 | return cloneRegExp(object);
4042 |
4043 | case setTag:
4044 | return cloneSet(object, isDeep, cloneFunc);
4045 |
4046 | case symbolTag:
4047 | return cloneSymbol(object);
4048 | }
4049 | }
4050 |
4051 | module.exports = initCloneByTag;
4052 |
4053 |
4054 | /***/ },
4055 | /* 118 */
4056 | /***/ function(module, exports, __webpack_require__) {
4057 |
4058 | var baseCreate = __webpack_require__(75),
4059 | getPrototype = __webpack_require__(45),
4060 | isPrototype = __webpack_require__(49);
4061 |
4062 | /**
4063 | * Initializes an object clone.
4064 | *
4065 | * @private
4066 | * @param {Object} object The object to clone.
4067 | * @returns {Object} Returns the initialized clone.
4068 | */
4069 | function initCloneObject(object) {
4070 | return (typeof object.constructor == 'function' && !isPrototype(object))
4071 | ? baseCreate(getPrototype(object))
4072 | : {};
4073 | }
4074 |
4075 | module.exports = initCloneObject;
4076 |
4077 |
4078 | /***/ },
4079 | /* 119 */
4080 | /***/ function(module, exports, __webpack_require__) {
4081 |
4082 | var Hash = __webpack_require__(64),
4083 | Map = __webpack_require__(4);
4084 |
4085 | /**
4086 | * Removes all key-value entries from the map.
4087 | *
4088 | * @private
4089 | * @name clear
4090 | * @memberOf MapCache
4091 | */
4092 | function mapClear() {
4093 | this.__data__ = {
4094 | 'hash': new Hash,
4095 | 'map': Map ? new Map : [],
4096 | 'string': new Hash
4097 | };
4098 | }
4099 |
4100 | module.exports = mapClear;
4101 |
4102 |
4103 | /***/ },
4104 | /* 120 */
4105 | /***/ function(module, exports, __webpack_require__) {
4106 |
4107 | var Map = __webpack_require__(4),
4108 | assocDelete = __webpack_require__(35),
4109 | hashDelete = __webpack_require__(112),
4110 | isKeyable = __webpack_require__(11);
4111 |
4112 | /**
4113 | * Removes `key` and its value from the map.
4114 | *
4115 | * @private
4116 | * @name delete
4117 | * @memberOf MapCache
4118 | * @param {string} key The key of the value to remove.
4119 | * @returns {boolean} Returns `true` if the entry was removed, else `false`.
4120 | */
4121 | function mapDelete(key) {
4122 | var data = this.__data__;
4123 | if (isKeyable(key)) {
4124 | return hashDelete(typeof key == 'string' ? data.string : data.hash, key);
4125 | }
4126 | return Map ? data.map['delete'](key) : assocDelete(data.map, key);
4127 | }
4128 |
4129 | module.exports = mapDelete;
4130 |
4131 |
4132 | /***/ },
4133 | /* 121 */
4134 | /***/ function(module, exports, __webpack_require__) {
4135 |
4136 | var Map = __webpack_require__(4),
4137 | assocGet = __webpack_require__(36),
4138 | hashGet = __webpack_require__(113),
4139 | isKeyable = __webpack_require__(11);
4140 |
4141 | /**
4142 | * Gets the map value for `key`.
4143 | *
4144 | * @private
4145 | * @name get
4146 | * @memberOf MapCache
4147 | * @param {string} key The key of the value to get.
4148 | * @returns {*} Returns the entry value.
4149 | */
4150 | function mapGet(key) {
4151 | var data = this.__data__;
4152 | if (isKeyable(key)) {
4153 | return hashGet(typeof key == 'string' ? data.string : data.hash, key);
4154 | }
4155 | return Map ? data.map.get(key) : assocGet(data.map, key);
4156 | }
4157 |
4158 | module.exports = mapGet;
4159 |
4160 |
4161 | /***/ },
4162 | /* 122 */
4163 | /***/ function(module, exports, __webpack_require__) {
4164 |
4165 | var Map = __webpack_require__(4),
4166 | assocHas = __webpack_require__(37),
4167 | hashHas = __webpack_require__(48),
4168 | isKeyable = __webpack_require__(11);
4169 |
4170 | /**
4171 | * Checks if a map value for `key` exists.
4172 | *
4173 | * @private
4174 | * @name has
4175 | * @memberOf MapCache
4176 | * @param {string} key The key of the entry to check.
4177 | * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
4178 | */
4179 | function mapHas(key) {
4180 | var data = this.__data__;
4181 | if (isKeyable(key)) {
4182 | return hashHas(typeof key == 'string' ? data.string : data.hash, key);
4183 | }
4184 | return Map ? data.map.has(key) : assocHas(data.map, key);
4185 | }
4186 |
4187 | module.exports = mapHas;
4188 |
4189 |
4190 | /***/ },
4191 | /* 123 */
4192 | /***/ function(module, exports, __webpack_require__) {
4193 |
4194 | var Map = __webpack_require__(4),
4195 | assocSet = __webpack_require__(38),
4196 | hashSet = __webpack_require__(114),
4197 | isKeyable = __webpack_require__(11);
4198 |
4199 | /**
4200 | * Sets the map `key` to `value`.
4201 | *
4202 | * @private
4203 | * @name set
4204 | * @memberOf MapCache
4205 | * @param {string} key The key of the value to set.
4206 | * @param {*} value The value to set.
4207 | * @returns {Object} Returns the map cache instance.
4208 | */
4209 | function mapSet(key, value) {
4210 | var data = this.__data__;
4211 | if (isKeyable(key)) {
4212 | hashSet(typeof key == 'string' ? data.string : data.hash, key, value);
4213 | } else if (Map) {
4214 | data.map.set(key, value);
4215 | } else {
4216 | assocSet(data.map, key, value);
4217 | }
4218 | return this;
4219 | }
4220 |
4221 | module.exports = mapSet;
4222 |
4223 |
4224 | /***/ },
4225 | /* 124 */
4226 | /***/ function(module, exports) {
4227 |
4228 | /**
4229 | * Removes all key-value entries from the stack.
4230 | *
4231 | * @private
4232 | * @name clear
4233 | * @memberOf Stack
4234 | */
4235 | function stackClear() {
4236 | this.__data__ = { 'array': [], 'map': null };
4237 | }
4238 |
4239 | module.exports = stackClear;
4240 |
4241 |
4242 | /***/ },
4243 | /* 125 */
4244 | /***/ function(module, exports, __webpack_require__) {
4245 |
4246 | var assocDelete = __webpack_require__(35);
4247 |
4248 | /**
4249 | * Removes `key` and its value from the stack.
4250 | *
4251 | * @private
4252 | * @name delete
4253 | * @memberOf Stack
4254 | * @param {string} key The key of the value to remove.
4255 | * @returns {boolean} Returns `true` if the entry was removed, else `false`.
4256 | */
4257 | function stackDelete(key) {
4258 | var data = this.__data__,
4259 | array = data.array;
4260 |
4261 | return array ? assocDelete(array, key) : data.map['delete'](key);
4262 | }
4263 |
4264 | module.exports = stackDelete;
4265 |
4266 |
4267 | /***/ },
4268 | /* 126 */
4269 | /***/ function(module, exports, __webpack_require__) {
4270 |
4271 | var assocGet = __webpack_require__(36);
4272 |
4273 | /**
4274 | * Gets the stack value for `key`.
4275 | *
4276 | * @private
4277 | * @name get
4278 | * @memberOf Stack
4279 | * @param {string} key The key of the value to get.
4280 | * @returns {*} Returns the entry value.
4281 | */
4282 | function stackGet(key) {
4283 | var data = this.__data__,
4284 | array = data.array;
4285 |
4286 | return array ? assocGet(array, key) : data.map.get(key);
4287 | }
4288 |
4289 | module.exports = stackGet;
4290 |
4291 |
4292 | /***/ },
4293 | /* 127 */
4294 | /***/ function(module, exports, __webpack_require__) {
4295 |
4296 | var assocHas = __webpack_require__(37);
4297 |
4298 | /**
4299 | * Checks if a stack value for `key` exists.
4300 | *
4301 | * @private
4302 | * @name has
4303 | * @memberOf Stack
4304 | * @param {string} key The key of the entry to check.
4305 | * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
4306 | */
4307 | function stackHas(key) {
4308 | var data = this.__data__,
4309 | array = data.array;
4310 |
4311 | return array ? assocHas(array, key) : data.map.has(key);
4312 | }
4313 |
4314 | module.exports = stackHas;
4315 |
4316 |
4317 | /***/ },
4318 | /* 128 */
4319 | /***/ function(module, exports, __webpack_require__) {
4320 |
4321 | var MapCache = __webpack_require__(31),
4322 | assocSet = __webpack_require__(38);
4323 |
4324 | /** Used as the size to enable large array optimizations. */
4325 | var LARGE_ARRAY_SIZE = 200;
4326 |
4327 | /**
4328 | * Sets the stack `key` to `value`.
4329 | *
4330 | * @private
4331 | * @name set
4332 | * @memberOf Stack
4333 | * @param {string} key The key of the value to set.
4334 | * @param {*} value The value to set.
4335 | * @returns {Object} Returns the stack cache instance.
4336 | */
4337 | function stackSet(key, value) {
4338 | var data = this.__data__,
4339 | array = data.array;
4340 |
4341 | if (array) {
4342 | if (array.length < (LARGE_ARRAY_SIZE - 1)) {
4343 | assocSet(array, key, value);
4344 | } else {
4345 | data.array = null;
4346 | data.map = new MapCache(array);
4347 | }
4348 | }
4349 | var map = data.map;
4350 | if (map) {
4351 | map.set(key, value);
4352 | }
4353 | return this;
4354 | }
4355 |
4356 | module.exports = stackSet;
4357 |
4358 |
4359 | /***/ },
4360 | /* 129 */
4361 | /***/ function(module, exports, __webpack_require__) {
4362 |
4363 | var memoize = __webpack_require__(141),
4364 | toString = __webpack_require__(148);
4365 |
4366 | /** Used to match property names within property paths. */
4367 | var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]/g;
4368 |
4369 | /** Used to match backslashes in property paths. */
4370 | var reEscapeChar = /\\(\\)?/g;
4371 |
4372 | /**
4373 | * Converts `string` to a property path array.
4374 | *
4375 | * @private
4376 | * @param {string} string The string to convert.
4377 | * @returns {Array} Returns the property path array.
4378 | */
4379 | var stringToPath = memoize(function(string) {
4380 | var result = [];
4381 | toString(string).replace(rePropName, function(match, number, quote, string) {
4382 | result.push(quote ? string.replace(reEscapeChar, '$1') : (number || match));
4383 | });
4384 | return result;
4385 | });
4386 |
4387 | module.exports = stringToPath;
4388 |
4389 |
4390 | /***/ },
4391 | /* 130 */
4392 | /***/ function(module, exports, __webpack_require__) {
4393 |
4394 | var baseClone = __webpack_require__(74);
4395 |
4396 | /**
4397 | * Creates a shallow clone of `value`.
4398 | *
4399 | * **Note:** This method is loosely based on the
4400 | * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm)
4401 | * and supports cloning arrays, array buffers, booleans, date objects, maps,
4402 | * numbers, `Object` objects, regexes, sets, strings, symbols, and typed
4403 | * arrays. The own enumerable properties of `arguments` objects are cloned
4404 | * as plain objects. An empty object is returned for uncloneable values such
4405 | * as error objects, functions, DOM nodes, and WeakMaps.
4406 | *
4407 | * @static
4408 | * @memberOf _
4409 | * @since 0.1.0
4410 | * @category Lang
4411 | * @param {*} value The value to clone.
4412 | * @returns {*} Returns the cloned value.
4413 | * @see _.cloneDeep
4414 | * @example
4415 | *
4416 | * var objects = [{ 'a': 1 }, { 'b': 2 }];
4417 | *
4418 | * var shallow = _.clone(objects);
4419 | * console.log(shallow[0] === objects[0]);
4420 | * // => true
4421 | */
4422 | function clone(value) {
4423 | return baseClone(value, false, true);
4424 | }
4425 |
4426 | module.exports = clone;
4427 |
4428 |
4429 | /***/ },
4430 | /* 131 */
4431 | /***/ function(module, exports) {
4432 |
4433 | /**
4434 | * Creates a function that returns `value`.
4435 | *
4436 | * @static
4437 | * @memberOf _
4438 | * @since 2.4.0
4439 | * @category Util
4440 | * @param {*} value The value to return from the new function.
4441 | * @returns {Function} Returns the new function.
4442 | * @example
4443 | *
4444 | * var object = { 'user': 'fred' };
4445 | * var getter = _.constant(object);
4446 | *
4447 | * getter() === object;
4448 | * // => true
4449 | */
4450 | function constant(value) {
4451 | return function() {
4452 | return value;
4453 | };
4454 | }
4455 |
4456 | module.exports = constant;
4457 |
4458 |
4459 | /***/ },
4460 | /* 132 */
4461 | /***/ function(module, exports, __webpack_require__) {
4462 |
4463 | var baseSlice = __webpack_require__(90),
4464 | toInteger = __webpack_require__(145);
4465 |
4466 | /**
4467 | * Creates a slice of `array` with `n` elements dropped from the beginning.
4468 | *
4469 | * @static
4470 | * @memberOf _
4471 | * @since 0.5.0
4472 | * @category Array
4473 | * @param {Array} array The array to query.
4474 | * @param {number} [n=1] The number of elements to drop.
4475 | * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
4476 | * @returns {Array} Returns the slice of `array`.
4477 | * @example
4478 | *
4479 | * _.drop([1, 2, 3]);
4480 | * // => [2, 3]
4481 | *
4482 | * _.drop([1, 2, 3], 2);
4483 | * // => [3]
4484 | *
4485 | * _.drop([1, 2, 3], 5);
4486 | * // => []
4487 | *
4488 | * _.drop([1, 2, 3], 0);
4489 | * // => [1, 2, 3]
4490 | */
4491 | function drop(array, n, guard) {
4492 | var length = array ? array.length : 0;
4493 | if (!length) {
4494 | return [];
4495 | }
4496 | n = (guard || n === undefined) ? 1 : toInteger(n);
4497 | return baseSlice(array, n < 0 ? 0 : n, length);
4498 | }
4499 |
4500 | module.exports = drop;
4501 |
4502 |
4503 | /***/ },
4504 | /* 133 */
4505 | /***/ function(module, exports, __webpack_require__) {
4506 |
4507 | var baseHasIn = __webpack_require__(80),
4508 | hasPath = __webpack_require__(111);
4509 |
4510 | /**
4511 | * Checks if `path` is a direct or inherited property of `object`.
4512 | *
4513 | * @static
4514 | * @memberOf _
4515 | * @since 4.0.0
4516 | * @category Object
4517 | * @param {Object} object The object to query.
4518 | * @param {Array|string} path The path to check.
4519 | * @returns {boolean} Returns `true` if `path` exists, else `false`.
4520 | * @example
4521 | *
4522 | * var object = _.create({ 'a': _.create({ 'b': 2 }) });
4523 | *
4524 | * _.hasIn(object, 'a');
4525 | * // => true
4526 | *
4527 | * _.hasIn(object, 'a.b');
4528 | * // => true
4529 | *
4530 | * _.hasIn(object, ['a', 'b']);
4531 | * // => true
4532 | *
4533 | * _.hasIn(object, 'b');
4534 | * // => false
4535 | */
4536 | function hasIn(object, path) {
4537 | return object != null && hasPath(object, path, baseHasIn);
4538 | }
4539 |
4540 | module.exports = hasIn;
4541 |
4542 |
4543 | /***/ },
4544 | /* 134 */
4545 | /***/ function(module, exports) {
4546 |
4547 | /**
4548 | * Gets the first element of `array`.
4549 | *
4550 | * @static
4551 | * @memberOf _
4552 | * @since 0.1.0
4553 | * @alias first
4554 | * @category Array
4555 | * @param {Array} array The array to query.
4556 | * @returns {*} Returns the first element of `array`.
4557 | * @example
4558 | *
4559 | * _.head([1, 2, 3]);
4560 | * // => 1
4561 | *
4562 | * _.head([]);
4563 | * // => undefined
4564 | */
4565 | function head(array) {
4566 | return (array && array.length) ? array[0] : undefined;
4567 | }
4568 |
4569 | module.exports = head;
4570 |
4571 |
4572 | /***/ },
4573 | /* 135 */
4574 | /***/ function(module, exports) {
4575 |
4576 | /**
4577 | * This method returns the first argument given to it.
4578 | *
4579 | * @static
4580 | * @since 0.1.0
4581 | * @memberOf _
4582 | * @category Util
4583 | * @param {*} value Any value.
4584 | * @returns {*} Returns `value`.
4585 | * @example
4586 | *
4587 | * var object = { 'user': 'fred' };
4588 | *
4589 | * _.identity(object) === object;
4590 | * // => true
4591 | */
4592 | function identity(value) {
4593 | return value;
4594 | }
4595 |
4596 | module.exports = identity;
4597 |
4598 |
4599 | /***/ },
4600 | /* 136 */
4601 | /***/ function(module, exports, __webpack_require__) {
4602 |
4603 | var isArrayLike = __webpack_require__(13),
4604 | isObjectLike = __webpack_require__(9);
4605 |
4606 | /**
4607 | * This method is like `_.isArrayLike` except that it also checks if `value`
4608 | * is an object.
4609 | *
4610 | * @static
4611 | * @memberOf _
4612 | * @since 4.0.0
4613 | * @category Lang
4614 | * @param {*} value The value to check.
4615 | * @returns {boolean} Returns `true` if `value` is an array-like object,
4616 | * else `false`.
4617 | * @example
4618 | *
4619 | * _.isArrayLikeObject([1, 2, 3]);
4620 | * // => true
4621 | *
4622 | * _.isArrayLikeObject(document.body.children);
4623 | * // => true
4624 | *
4625 | * _.isArrayLikeObject('abc');
4626 | * // => false
4627 | *
4628 | * _.isArrayLikeObject(_.noop);
4629 | * // => false
4630 | */
4631 | function isArrayLikeObject(value) {
4632 | return isObjectLike(value) && isArrayLike(value);
4633 | }
4634 |
4635 | module.exports = isArrayLikeObject;
4636 |
4637 |
4638 | /***/ },
4639 | /* 137 */
4640 | /***/ function(module, exports, __webpack_require__) {
4641 |
4642 | /* WEBPACK VAR INJECTION */(function(module) {var constant = __webpack_require__(131),
4643 | root = __webpack_require__(2);
4644 |
4645 | /** Used to determine if values are of the language type `Object`. */
4646 | var objectTypes = {
4647 | 'function': true,
4648 | 'object': true
4649 | };
4650 |
4651 | /** Detect free variable `exports`. */
4652 | var freeExports = (objectTypes[typeof exports] && exports && !exports.nodeType)
4653 | ? exports
4654 | : undefined;
4655 |
4656 | /** Detect free variable `module`. */
4657 | var freeModule = (objectTypes[typeof module] && module && !module.nodeType)
4658 | ? module
4659 | : undefined;
4660 |
4661 | /** Detect the popular CommonJS extension `module.exports`. */
4662 | var moduleExports = (freeModule && freeModule.exports === freeExports)
4663 | ? freeExports
4664 | : undefined;
4665 |
4666 | /** Built-in value references. */
4667 | var Buffer = moduleExports ? root.Buffer : undefined;
4668 |
4669 | /**
4670 | * Checks if `value` is a buffer.
4671 | *
4672 | * @static
4673 | * @memberOf _
4674 | * @since 4.3.0
4675 | * @category Lang
4676 | * @param {*} value The value to check.
4677 | * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.
4678 | * @example
4679 | *
4680 | * _.isBuffer(new Buffer(2));
4681 | * // => true
4682 | *
4683 | * _.isBuffer(new Uint8Array(2));
4684 | * // => false
4685 | */
4686 | var isBuffer = !Buffer ? constant(false) : function(value) {
4687 | return value instanceof Buffer;
4688 | };
4689 |
4690 | module.exports = isBuffer;
4691 |
4692 | /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(58)(module)))
4693 |
4694 | /***/ },
4695 | /* 138 */
4696 | /***/ function(module, exports, __webpack_require__) {
4697 |
4698 | var isFunction = __webpack_require__(14),
4699 | isHostObject = __webpack_require__(23),
4700 | isObject = __webpack_require__(3),
4701 | toSource = __webpack_require__(54);
4702 |
4703 | /**
4704 | * Used to match `RegExp`
4705 | * [syntax characters](http://ecma-international.org/ecma-262/6.0/#sec-patterns).
4706 | */
4707 | var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
4708 |
4709 | /** Used to detect host constructors (Safari). */
4710 | var reIsHostCtor = /^\[object .+?Constructor\]$/;
4711 |
4712 | /** Used for built-in method references. */
4713 | var objectProto = Object.prototype;
4714 |
4715 | /** Used to resolve the decompiled source of functions. */
4716 | var funcToString = Function.prototype.toString;
4717 |
4718 | /** Used to check objects for own properties. */
4719 | var hasOwnProperty = objectProto.hasOwnProperty;
4720 |
4721 | /** Used to detect if a method is native. */
4722 | var reIsNative = RegExp('^' +
4723 | funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&')
4724 | .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
4725 | );
4726 |
4727 | /**
4728 | * Checks if `value` is a native function.
4729 | *
4730 | * @static
4731 | * @memberOf _
4732 | * @since 3.0.0
4733 | * @category Lang
4734 | * @param {*} value The value to check.
4735 | * @returns {boolean} Returns `true` if `value` is a native function,
4736 | * else `false`.
4737 | * @example
4738 | *
4739 | * _.isNative(Array.prototype.push);
4740 | * // => true
4741 | *
4742 | * _.isNative(_);
4743 | * // => false
4744 | */
4745 | function isNative(value) {
4746 | if (!isObject(value)) {
4747 | return false;
4748 | }
4749 | var pattern = (isFunction(value) || isHostObject(value)) ? reIsNative : reIsHostCtor;
4750 | return pattern.test(toSource(value));
4751 | }
4752 |
4753 | module.exports = isNative;
4754 |
4755 |
4756 | /***/ },
4757 | /* 139 */
4758 | /***/ function(module, exports, __webpack_require__) {
4759 |
4760 | var isLength = __webpack_require__(15),
4761 | isObjectLike = __webpack_require__(9);
4762 |
4763 | /** `Object#toString` result references. */
4764 | var argsTag = '[object Arguments]',
4765 | arrayTag = '[object Array]',
4766 | boolTag = '[object Boolean]',
4767 | dateTag = '[object Date]',
4768 | errorTag = '[object Error]',
4769 | funcTag = '[object Function]',
4770 | mapTag = '[object Map]',
4771 | numberTag = '[object Number]',
4772 | objectTag = '[object Object]',
4773 | regexpTag = '[object RegExp]',
4774 | setTag = '[object Set]',
4775 | stringTag = '[object String]',
4776 | weakMapTag = '[object WeakMap]';
4777 |
4778 | var arrayBufferTag = '[object ArrayBuffer]',
4779 | dataViewTag = '[object DataView]',
4780 | float32Tag = '[object Float32Array]',
4781 | float64Tag = '[object Float64Array]',
4782 | int8Tag = '[object Int8Array]',
4783 | int16Tag = '[object Int16Array]',
4784 | int32Tag = '[object Int32Array]',
4785 | uint8Tag = '[object Uint8Array]',
4786 | uint8ClampedTag = '[object Uint8ClampedArray]',
4787 | uint16Tag = '[object Uint16Array]',
4788 | uint32Tag = '[object Uint32Array]';
4789 |
4790 | /** Used to identify `toStringTag` values of typed arrays. */
4791 | var typedArrayTags = {};
4792 | typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =
4793 | typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =
4794 | typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =
4795 | typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =
4796 | typedArrayTags[uint32Tag] = true;
4797 | typedArrayTags[argsTag] = typedArrayTags[arrayTag] =
4798 | typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =
4799 | typedArrayTags[dataViewTag] = typedArrayTags[dateTag] =
4800 | typedArrayTags[errorTag] = typedArrayTags[funcTag] =
4801 | typedArrayTags[mapTag] = typedArrayTags[numberTag] =
4802 | typedArrayTags[objectTag] = typedArrayTags[regexpTag] =
4803 | typedArrayTags[setTag] = typedArrayTags[stringTag] =
4804 | typedArrayTags[weakMapTag] = false;
4805 |
4806 | /** Used for built-in method references. */
4807 | var objectProto = Object.prototype;
4808 |
4809 | /**
4810 | * Used to resolve the
4811 | * [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
4812 | * of values.
4813 | */
4814 | var objectToString = objectProto.toString;
4815 |
4816 | /**
4817 | * Checks if `value` is classified as a typed array.
4818 | *
4819 | * @static
4820 | * @memberOf _
4821 | * @since 3.0.0
4822 | * @category Lang
4823 | * @param {*} value The value to check.
4824 | * @returns {boolean} Returns `true` if `value` is correctly classified,
4825 | * else `false`.
4826 | * @example
4827 | *
4828 | * _.isTypedArray(new Uint8Array);
4829 | * // => true
4830 | *
4831 | * _.isTypedArray([]);
4832 | * // => false
4833 | */
4834 | function isTypedArray(value) {
4835 | return isObjectLike(value) &&
4836 | isLength(value.length) && !!typedArrayTags[objectToString.call(value)];
4837 | }
4838 |
4839 | module.exports = isTypedArray;
4840 |
4841 |
4842 | /***/ },
4843 | /* 140 */
4844 | /***/ function(module, exports, __webpack_require__) {
4845 |
4846 | var arrayMap = __webpack_require__(33),
4847 | baseIteratee = __webpack_require__(83),
4848 | baseMap = __webpack_require__(85),
4849 | isArray = __webpack_require__(1);
4850 |
4851 | /**
4852 | * Creates an array of values by running each element in `collection` thru
4853 | * `iteratee`. The iteratee is invoked with three arguments:
4854 | * (value, index|key, collection).
4855 | *
4856 | * Many lodash methods are guarded to work as iteratees for methods like
4857 | * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`.
4858 | *
4859 | * The guarded methods are:
4860 | * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`,
4861 | * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`,
4862 | * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`,
4863 | * `template`, `trim`, `trimEnd`, `trimStart`, and `words`
4864 | *
4865 | * @static
4866 | * @memberOf _
4867 | * @since 0.1.0
4868 | * @category Collection
4869 | * @param {Array|Object} collection The collection to iterate over.
4870 | * @param {Array|Function|Object|string} [iteratee=_.identity]
4871 | * The function invoked per iteration.
4872 | * @returns {Array} Returns the new mapped array.
4873 | * @example
4874 | *
4875 | * function square(n) {
4876 | * return n * n;
4877 | * }
4878 | *
4879 | * _.map([4, 8], square);
4880 | * // => [16, 64]
4881 | *
4882 | * _.map({ 'a': 4, 'b': 8 }, square);
4883 | * // => [16, 64] (iteration order is not guaranteed)
4884 | *
4885 | * var users = [
4886 | * { 'user': 'barney' },
4887 | * { 'user': 'fred' }
4888 | * ];
4889 | *
4890 | * // The `_.property` iteratee shorthand.
4891 | * _.map(users, 'user');
4892 | * // => ['barney', 'fred']
4893 | */
4894 | function map(collection, iteratee) {
4895 | var func = isArray(collection) ? arrayMap : baseMap;
4896 | return func(collection, baseIteratee(iteratee, 3));
4897 | }
4898 |
4899 | module.exports = map;
4900 |
4901 |
4902 | /***/ },
4903 | /* 141 */
4904 | /***/ function(module, exports, __webpack_require__) {
4905 |
4906 | var MapCache = __webpack_require__(31);
4907 |
4908 | /** Used as the `TypeError` message for "Functions" methods. */
4909 | var FUNC_ERROR_TEXT = 'Expected a function';
4910 |
4911 | /**
4912 | * Creates a function that memoizes the result of `func`. If `resolver` is
4913 | * provided, it determines the cache key for storing the result based on the
4914 | * arguments provided to the memoized function. By default, the first argument
4915 | * provided to the memoized function is used as the map cache key. The `func`
4916 | * is invoked with the `this` binding of the memoized function.
4917 | *
4918 | * **Note:** The cache is exposed as the `cache` property on the memoized
4919 | * function. Its creation may be customized by replacing the `_.memoize.Cache`
4920 | * constructor with one whose instances implement the
4921 | * [`Map`](http://ecma-international.org/ecma-262/6.0/#sec-properties-of-the-map-prototype-object)
4922 | * method interface of `delete`, `get`, `has`, and `set`.
4923 | *
4924 | * @static
4925 | * @memberOf _
4926 | * @since 0.1.0
4927 | * @category Function
4928 | * @param {Function} func The function to have its output memoized.
4929 | * @param {Function} [resolver] The function to resolve the cache key.
4930 | * @returns {Function} Returns the new memoizing function.
4931 | * @example
4932 | *
4933 | * var object = { 'a': 1, 'b': 2 };
4934 | * var other = { 'c': 3, 'd': 4 };
4935 | *
4936 | * var values = _.memoize(_.values);
4937 | * values(object);
4938 | * // => [1, 2]
4939 | *
4940 | * values(other);
4941 | * // => [3, 4]
4942 | *
4943 | * object.a = 2;
4944 | * values(object);
4945 | * // => [1, 2]
4946 | *
4947 | * // Modify the result cache.
4948 | * values.cache.set(object, ['a', 'b']);
4949 | * values(object);
4950 | * // => ['a', 'b']
4951 | *
4952 | * // Replace `_.memoize.Cache`.
4953 | * _.memoize.Cache = WeakMap;
4954 | */
4955 | function memoize(func, resolver) {
4956 | if (typeof func != 'function' || (resolver && typeof resolver != 'function')) {
4957 | throw new TypeError(FUNC_ERROR_TEXT);
4958 | }
4959 | var memoized = function() {
4960 | var args = arguments,
4961 | key = resolver ? resolver.apply(this, args) : args[0],
4962 | cache = memoized.cache;
4963 |
4964 | if (cache.has(key)) {
4965 | return cache.get(key);
4966 | }
4967 | var result = func.apply(this, args);
4968 | memoized.cache = cache.set(key, result);
4969 | return result;
4970 | };
4971 | memoized.cache = new (memoize.Cache || MapCache);
4972 | return memoized;
4973 | }
4974 |
4975 | // Assign cache to `_.memoize`.
4976 | memoize.Cache = MapCache;
4977 |
4978 | module.exports = memoize;
4979 |
4980 |
4981 | /***/ },
4982 | /* 142 */
4983 | /***/ function(module, exports, __webpack_require__) {
4984 |
4985 | var baseProperty = __webpack_require__(42),
4986 | basePropertyDeep = __webpack_require__(88),
4987 | isKey = __webpack_require__(7),
4988 | toKey = __webpack_require__(8);
4989 |
4990 | /**
4991 | * Creates a function that returns the value at `path` of a given object.
4992 | *
4993 | * @static
4994 | * @memberOf _
4995 | * @since 2.4.0
4996 | * @category Util
4997 | * @param {Array|string} path The path of the property to get.
4998 | * @returns {Function} Returns the new function.
4999 | * @example
5000 | *
5001 | * var objects = [
5002 | * { 'a': { 'b': 2 } },
5003 | * { 'a': { 'b': 1 } }
5004 | * ];
5005 | *
5006 | * _.map(objects, _.property('a.b'));
5007 | * // => [2, 1]
5008 | *
5009 | * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b');
5010 | * // => [1, 2]
5011 | */
5012 | function property(path) {
5013 | return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path);
5014 | }
5015 |
5016 | module.exports = property;
5017 |
5018 |
5019 | /***/ },
5020 | /* 143 */
5021 | /***/ function(module, exports, __webpack_require__) {
5022 |
5023 | var baseSet = __webpack_require__(89);
5024 |
5025 | /**
5026 | * Sets the value at `path` of `object`. If a portion of `path` doesn't exist,
5027 | * it's created. Arrays are created for missing index properties while objects
5028 | * are created for all other missing properties. Use `_.setWith` to customize
5029 | * `path` creation.
5030 | *
5031 | * **Note:** This method mutates `object`.
5032 | *
5033 | * @static
5034 | * @memberOf _
5035 | * @since 3.7.0
5036 | * @category Object
5037 | * @param {Object} object The object to modify.
5038 | * @param {Array|string} path The path of the property to set.
5039 | * @param {*} value The value to set.
5040 | * @returns {Object} Returns `object`.
5041 | * @example
5042 | *
5043 | * var object = { 'a': [{ 'b': { 'c': 3 } }] };
5044 | *
5045 | * _.set(object, 'a[0].b.c', 4);
5046 | * console.log(object.a[0].b.c);
5047 | * // => 4
5048 | *
5049 | * _.set(object, ['x', '0', 'y', 'z'], 5);
5050 | * console.log(object.x[0].y.z);
5051 | * // => 5
5052 | */
5053 | function set(object, path, value) {
5054 | return object == null ? object : baseSet(object, path, value);
5055 | }
5056 |
5057 | module.exports = set;
5058 |
5059 |
5060 | /***/ },
5061 | /* 144 */
5062 | /***/ function(module, exports, __webpack_require__) {
5063 |
5064 | var drop = __webpack_require__(132);
5065 |
5066 | /**
5067 | * Gets all but the first element of `array`.
5068 | *
5069 | * @static
5070 | * @memberOf _
5071 | * @since 4.0.0
5072 | * @category Array
5073 | * @param {Array} array The array to query.
5074 | * @returns {Array} Returns the slice of `array`.
5075 | * @example
5076 | *
5077 | * _.tail([1, 2, 3]);
5078 | * // => [2, 3]
5079 | */
5080 | function tail(array) {
5081 | return drop(array, 1);
5082 | }
5083 |
5084 | module.exports = tail;
5085 |
5086 |
5087 | /***/ },
5088 | /* 145 */
5089 | /***/ function(module, exports, __webpack_require__) {
5090 |
5091 | var toNumber = __webpack_require__(146);
5092 |
5093 | /** Used as references for various `Number` constants. */
5094 | var INFINITY = 1 / 0,
5095 | MAX_INTEGER = 1.7976931348623157e+308;
5096 |
5097 | /**
5098 | * Converts `value` to an integer.
5099 | *
5100 | * **Note:** This function is loosely based on
5101 | * [`ToInteger`](http://www.ecma-international.org/ecma-262/6.0/#sec-tointeger).
5102 | *
5103 | * @static
5104 | * @memberOf _
5105 | * @since 4.0.0
5106 | * @category Lang
5107 | * @param {*} value The value to convert.
5108 | * @returns {number} Returns the converted integer.
5109 | * @example
5110 | *
5111 | * _.toInteger(3);
5112 | * // => 3
5113 | *
5114 | * _.toInteger(Number.MIN_VALUE);
5115 | * // => 0
5116 | *
5117 | * _.toInteger(Infinity);
5118 | * // => 1.7976931348623157e+308
5119 | *
5120 | * _.toInteger('3');
5121 | * // => 3
5122 | */
5123 | function toInteger(value) {
5124 | if (!value) {
5125 | return value === 0 ? value : 0;
5126 | }
5127 | value = toNumber(value);
5128 | if (value === INFINITY || value === -INFINITY) {
5129 | var sign = (value < 0 ? -1 : 1);
5130 | return sign * MAX_INTEGER;
5131 | }
5132 | var remainder = value % 1;
5133 | return value === value ? (remainder ? value - remainder : value) : 0;
5134 | }
5135 |
5136 | module.exports = toInteger;
5137 |
5138 |
5139 | /***/ },
5140 | /* 146 */
5141 | /***/ function(module, exports, __webpack_require__) {
5142 |
5143 | var isFunction = __webpack_require__(14),
5144 | isObject = __webpack_require__(3),
5145 | isSymbol = __webpack_require__(16);
5146 |
5147 | /** Used as references for various `Number` constants. */
5148 | var NAN = 0 / 0;
5149 |
5150 | /** Used to match leading and trailing whitespace. */
5151 | var reTrim = /^\s+|\s+$/g;
5152 |
5153 | /** Used to detect bad signed hexadecimal string values. */
5154 | var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
5155 |
5156 | /** Used to detect binary string values. */
5157 | var reIsBinary = /^0b[01]+$/i;
5158 |
5159 | /** Used to detect octal string values. */
5160 | var reIsOctal = /^0o[0-7]+$/i;
5161 |
5162 | /** Built-in method references without a dependency on `root`. */
5163 | var freeParseInt = parseInt;
5164 |
5165 | /**
5166 | * Converts `value` to a number.
5167 | *
5168 | * @static
5169 | * @memberOf _
5170 | * @since 4.0.0
5171 | * @category Lang
5172 | * @param {*} value The value to process.
5173 | * @returns {number} Returns the number.
5174 | * @example
5175 | *
5176 | * _.toNumber(3);
5177 | * // => 3
5178 | *
5179 | * _.toNumber(Number.MIN_VALUE);
5180 | * // => 5e-324
5181 | *
5182 | * _.toNumber(Infinity);
5183 | * // => Infinity
5184 | *
5185 | * _.toNumber('3');
5186 | * // => 3
5187 | */
5188 | function toNumber(value) {
5189 | if (typeof value == 'number') {
5190 | return value;
5191 | }
5192 | if (isSymbol(value)) {
5193 | return NAN;
5194 | }
5195 | if (isObject(value)) {
5196 | var other = isFunction(value.valueOf) ? value.valueOf() : value;
5197 | value = isObject(other) ? (other + '') : other;
5198 | }
5199 | if (typeof value != 'string') {
5200 | return value === 0 ? value : +value;
5201 | }
5202 | value = value.replace(reTrim, '');
5203 | var isBinary = reIsBinary.test(value);
5204 | return (isBinary || reIsOctal.test(value))
5205 | ? freeParseInt(value.slice(2), isBinary ? 2 : 8)
5206 | : (reIsBadHex.test(value) ? NAN : +value);
5207 | }
5208 |
5209 | module.exports = toNumber;
5210 |
5211 |
5212 | /***/ },
5213 | /* 147 */
5214 | /***/ function(module, exports, __webpack_require__) {
5215 |
5216 | var baseToPairs = __webpack_require__(92),
5217 | keys = __webpack_require__(6);
5218 |
5219 | /**
5220 | * Creates an array of own enumerable string keyed-value pairs for `object`
5221 | * which can be consumed by `_.fromPairs`.
5222 | *
5223 | * @static
5224 | * @memberOf _
5225 | * @since 4.0.0
5226 | * @alias entries
5227 | * @category Object
5228 | * @param {Object} object The object to query.
5229 | * @returns {Array} Returns the new array of key-value pairs.
5230 | * @example
5231 | *
5232 | * function Foo() {
5233 | * this.a = 1;
5234 | * this.b = 2;
5235 | * }
5236 | *
5237 | * Foo.prototype.c = 3;
5238 | *
5239 | * _.toPairs(new Foo);
5240 | * // => [['a', 1], ['b', 2]] (iteration order is not guaranteed)
5241 | */
5242 | function toPairs(object) {
5243 | return baseToPairs(object, keys(object));
5244 | }
5245 |
5246 | module.exports = toPairs;
5247 |
5248 |
5249 | /***/ },
5250 | /* 148 */
5251 | /***/ function(module, exports, __webpack_require__) {
5252 |
5253 | var baseToString = __webpack_require__(93);
5254 |
5255 | /**
5256 | * Converts `value` to a string. An empty string is returned for `null`
5257 | * and `undefined` values. The sign of `-0` is preserved.
5258 | *
5259 | * @static
5260 | * @memberOf _
5261 | * @since 4.0.0
5262 | * @category Lang
5263 | * @param {*} value The value to process.
5264 | * @returns {string} Returns the string.
5265 | * @example
5266 | *
5267 | * _.toString(null);
5268 | * // => ''
5269 | *
5270 | * _.toString(-0);
5271 | * // => '-0'
5272 | *
5273 | * _.toString([1, 2, 3]);
5274 | * // => '1,2,3'
5275 | */
5276 | function toString(value) {
5277 | return value == null ? '' : baseToString(value);
5278 | }
5279 |
5280 | module.exports = toString;
5281 |
5282 |
5283 | /***/ },
5284 | /* 149 */
5285 | /***/ function(module, exports) {
5286 |
5287 | module.exports = __WEBPACK_EXTERNAL_MODULE_149__;
5288 |
5289 | /***/ }
5290 | /******/ ])
5291 | });
5292 | ;
--------------------------------------------------------------------------------