From 81fe44c46c6a5f864812b464f7b431da25427383 Mon Sep 17 00:00:00 2001 From: Gilles Seerden Date: Thu, 20 Apr 2017 11:18:29 +0200 Subject: [PATCH] preserve Symbol(observable) when connecting the store the object created by redux createStore has a key of Symbol(observable). $ngRedux's provider looses that key when connecting the store. As a result, we can't use $ngRedux's store in ng2Redux's provideStore. https://github.com/angular-redux/store/issues/256 --- dist/ng-redux.js | 1048 ++++++++++++++++++++----------------- dist/ng-redux.min.js | 4 +- src/components/ngRedux.js | 7 +- 3 files changed, 587 insertions(+), 472 deletions(-) diff --git a/dist/ng-redux.js b/dist/ng-redux.js index 74ba00c..f7ec7f6 100644 --- a/dist/ng-redux.js +++ b/dist/ng-redux.js @@ -42,7 +42,7 @@ /************************************************************************/ /******/ ([ /* 0 */ -/***/ function(module, exports, __webpack_require__) { +/***/ (function(module, exports, __webpack_require__) { 'use strict'; @@ -56,15 +56,15 @@ exports.default = angular.module('ngRedux', []).provider('$ngRedux', _ngRedux2.default).name; -/***/ }, +/***/ }), /* 1 */ -/***/ function(module, exports, __webpack_require__) { +/***/ (function(module, exports, __webpack_require__) { 'use strict'; exports.__esModule = true; - var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; }; + var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; exports.default = ngReduxProvider; @@ -72,33 +72,33 @@ var _connector2 = _interopRequireDefault(_connector); - var _invariant = __webpack_require__(20); + var _invariant = __webpack_require__(27); var _invariant2 = _interopRequireDefault(_invariant); var _redux = __webpack_require__(5); - var _digestMiddleware = __webpack_require__(37); + var _digestMiddleware = __webpack_require__(44); var _digestMiddleware2 = _interopRequireDefault(_digestMiddleware); - var _lodash = __webpack_require__(28); + var _lodash = __webpack_require__(35); var _lodash2 = _interopRequireDefault(_lodash); - var _lodash3 = __webpack_require__(38); + var _lodash3 = __webpack_require__(45); var _lodash4 = _interopRequireDefault(_lodash3); - var _lodash5 = __webpack_require__(25); + var _lodash5 = __webpack_require__(32); var _lodash6 = _interopRequireDefault(_lodash5); - var _lodash7 = __webpack_require__(26); + var _lodash7 = __webpack_require__(33); var _lodash8 = _interopRequireDefault(_lodash7); - var _lodash9 = __webpack_require__(39); + var _lodash9 = __webpack_require__(46); var _lodash10 = _interopRequireDefault(_lodash9); @@ -143,21 +143,19 @@ var resolvedStoreEnhancer = (0, _lodash10.default)(_storeEnhancers, resolveStoreEnhancer); if (_reducerIsObject) { - (function () { - var getReducerKey = function getReducerKey(key) { - return isString(_reducer[key]) ? $injector.get(_reducer[key]) : _reducer[key]; - }; + var getReducerKey = function getReducerKey(key) { + return isString(_reducer[key]) ? $injector.get(_reducer[key]) : _reducer[key]; + }; - var resolveReducerKey = function resolveReducerKey(result, key) { - var _assign; + var resolveReducerKey = function resolveReducerKey(result, key) { + var _assign; - return (0, _lodash2.default)({}, result, (_assign = {}, _assign[key] = getReducerKey(key), _assign)); - }; + return (0, _lodash2.default)({}, result, (_assign = {}, _assign[key] = getReducerKey(key), _assign)); + }; - var reducersObj = Object.keys(_reducer).reduce(resolveReducerKey, {}); + var reducersObj = Object.keys(_reducer).reduce(resolveReducerKey, {}); - _reducer = (0, _redux.combineReducers)(reducersObj); - })(); + _reducer = (0, _redux.combineReducers)(reducersObj); } var finalCreateStore = resolvedStoreEnhancer ? _redux.compose.apply(undefined, resolvedStoreEnhancer)(_redux.createStore) : _redux.createStore; @@ -173,9 +171,9 @@ this.$get.$inject = ['$injector']; } -/***/ }, +/***/ }), /* 2 */ -/***/ function(module, exports, __webpack_require__) { +/***/ (function(module, exports, __webpack_require__) { 'use strict'; @@ -190,23 +188,23 @@ var _wrapActionCreators2 = _interopRequireDefault(_wrapActionCreators); - var _invariant = __webpack_require__(20); + var _invariant = __webpack_require__(27); var _invariant2 = _interopRequireDefault(_invariant); - var _lodash = __webpack_require__(21); + var _lodash = __webpack_require__(28); var _lodash2 = _interopRequireDefault(_lodash); - var _lodash3 = __webpack_require__(26); + var _lodash3 = __webpack_require__(33); var _lodash4 = _interopRequireDefault(_lodash3); - var _lodash5 = __webpack_require__(27); + var _lodash5 = __webpack_require__(34); var _lodash6 = _interopRequireDefault(_lodash5); - var _lodash7 = __webpack_require__(28); + var _lodash7 = __webpack_require__(35); var _lodash8 = _interopRequireDefault(_lodash7); @@ -268,7 +266,7 @@ } function getStateSlice(state, mapStateToScope) { - var shouldReturnObject = arguments.length <= 2 || arguments[2] === undefined ? true : arguments[2]; + var shouldReturnObject = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true; var slice = mapStateToScope(state); @@ -281,9 +279,9 @@ return slice; } -/***/ }, +/***/ }), /* 3 */ -/***/ function(module, exports) { +/***/ (function(module, exports) { 'use strict'; @@ -317,9 +315,9 @@ return true; } -/***/ }, +/***/ }), /* 4 */ -/***/ function(module, exports, __webpack_require__) { +/***/ (function(module, exports, __webpack_require__) { 'use strict'; @@ -334,9 +332,9 @@ }; } -/***/ }, +/***/ }), /* 5 */ -/***/ function(module, exports, __webpack_require__) { +/***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(process) {'use strict'; @@ -347,27 +345,27 @@ var _createStore2 = _interopRequireDefault(_createStore); - var _combineReducers = __webpack_require__(15); + var _combineReducers = __webpack_require__(22); var _combineReducers2 = _interopRequireDefault(_combineReducers); - var _bindActionCreators = __webpack_require__(17); + var _bindActionCreators = __webpack_require__(24); var _bindActionCreators2 = _interopRequireDefault(_bindActionCreators); - var _applyMiddleware = __webpack_require__(18); + var _applyMiddleware = __webpack_require__(25); var _applyMiddleware2 = _interopRequireDefault(_applyMiddleware); - var _compose = __webpack_require__(19); + var _compose = __webpack_require__(26); var _compose2 = _interopRequireDefault(_compose); - var _warning = __webpack_require__(16); + var _warning = __webpack_require__(23); var _warning2 = _interopRequireDefault(_warning); - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } /* * This is a dummy function to check if the function name has been altered by minification. @@ -376,19 +374,19 @@ function isCrushed() {} if (process.env.NODE_ENV !== 'production' && typeof isCrushed.name === 'string' && isCrushed.name !== 'isCrushed') { - (0, _warning2["default"])('You are currently using minified code outside of NODE_ENV === \'production\'. ' + 'This means that you are running a slower development build of Redux. ' + 'You can use loose-envify (https://github.com/zertosh/loose-envify) for browserify ' + 'or DefinePlugin for webpack (http://stackoverflow.com/questions/30030031) ' + 'to ensure you have the correct code for your production build.'); + (0, _warning2['default'])('You are currently using minified code outside of NODE_ENV === \'production\'. ' + 'This means that you are running a slower development build of Redux. ' + 'You can use loose-envify (https://github.com/zertosh/loose-envify) for browserify ' + 'or DefinePlugin for webpack (http://stackoverflow.com/questions/30030031) ' + 'to ensure you have the correct code for your production build.'); } - exports.createStore = _createStore2["default"]; - exports.combineReducers = _combineReducers2["default"]; - exports.bindActionCreators = _bindActionCreators2["default"]; - exports.applyMiddleware = _applyMiddleware2["default"]; - exports.compose = _compose2["default"]; + exports.createStore = _createStore2['default']; + exports.combineReducers = _combineReducers2['default']; + exports.bindActionCreators = _bindActionCreators2['default']; + exports.applyMiddleware = _applyMiddleware2['default']; + exports.compose = _compose2['default']; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(6))) -/***/ }, +/***/ }), /* 6 */ -/***/ function(module, exports) { +/***/ (function(module, exports) { // shim for using process in browser var process = module.exports = {}; @@ -401,35 +399,83 @@ var cachedSetTimeout; var cachedClearTimeout; + function defaultSetTimout() { + throw new Error('setTimeout has not been defined'); + } + function defaultClearTimeout () { + throw new Error('clearTimeout has not been defined'); + } (function () { try { - cachedSetTimeout = setTimeout; - } catch (e) { - cachedSetTimeout = function () { - throw new Error('setTimeout is not defined'); + if (typeof setTimeout === 'function') { + cachedSetTimeout = setTimeout; + } else { + cachedSetTimeout = defaultSetTimout; } + } catch (e) { + cachedSetTimeout = defaultSetTimout; } try { - cachedClearTimeout = clearTimeout; - } catch (e) { - cachedClearTimeout = function () { - throw new Error('clearTimeout is not defined'); + if (typeof clearTimeout === 'function') { + cachedClearTimeout = clearTimeout; + } else { + cachedClearTimeout = defaultClearTimeout; } + } catch (e) { + cachedClearTimeout = defaultClearTimeout; } } ()) function runTimeout(fun) { if (cachedSetTimeout === setTimeout) { + //normal enviroments in sane situations return setTimeout(fun, 0); - } else { - return cachedSetTimeout.call(null, fun, 0); } + // if setTimeout wasn't available but was latter defined + if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) { + cachedSetTimeout = setTimeout; + return setTimeout(fun, 0); + } + try { + // when when somebody has screwed with setTimeout but no I.E. maddness + return cachedSetTimeout(fun, 0); + } catch(e){ + try { + // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally + return cachedSetTimeout.call(null, fun, 0); + } catch(e){ + // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error + return cachedSetTimeout.call(this, fun, 0); + } + } + + } function runClearTimeout(marker) { if (cachedClearTimeout === clearTimeout) { - clearTimeout(marker); - } else { - cachedClearTimeout.call(null, marker); + //normal enviroments in sane situations + return clearTimeout(marker); + } + // if clearTimeout wasn't available but was latter defined + if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) { + cachedClearTimeout = clearTimeout; + return clearTimeout(marker); } + try { + // when when somebody has screwed with setTimeout but no I.E. maddness + return cachedClearTimeout(marker); + } catch (e){ + try { + // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally + return cachedClearTimeout.call(null, marker); + } catch (e){ + // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error. + // Some versions of I.E. have different rules for clearTimeout vs setTimeout + return cachedClearTimeout.call(this, marker); + } + } + + + } var queue = []; var draining = false; @@ -524,25 +570,25 @@ process.umask = function() { return 0; }; -/***/ }, +/***/ }), /* 7 */ -/***/ function(module, exports, __webpack_require__) { +/***/ (function(module, exports, __webpack_require__) { 'use strict'; exports.__esModule = true; exports.ActionTypes = undefined; - exports["default"] = createStore; + exports['default'] = createStore; var _isPlainObject = __webpack_require__(8); var _isPlainObject2 = _interopRequireDefault(_isPlainObject); - var _symbolObservable = __webpack_require__(13); + var _symbolObservable = __webpack_require__(18); var _symbolObservable2 = _interopRequireDefault(_symbolObservable); - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } /** * These are private action types reserved by Redux. @@ -565,7 +611,7 @@ * @param {Function} reducer A function that returns the next state tree, given * the current state tree and the action to handle. * - * @param {any} [initialState] The initial state. You may optionally specify it + * @param {any} [preloadedState] The initial state. You may optionally specify it * to hydrate the state from the server in universal apps, or to restore a * previously serialized user session. * If you use `combineReducers` to produce the root reducer function, this must be @@ -579,12 +625,12 @@ * @returns {Store} A Redux store that lets you read the state, dispatch actions * and subscribe to changes. */ - function createStore(reducer, initialState, enhancer) { + function createStore(reducer, preloadedState, enhancer) { var _ref2; - if (typeof initialState === 'function' && typeof enhancer === 'undefined') { - enhancer = initialState; - initialState = undefined; + if (typeof preloadedState === 'function' && typeof enhancer === 'undefined') { + enhancer = preloadedState; + preloadedState = undefined; } if (typeof enhancer !== 'undefined') { @@ -592,7 +638,7 @@ throw new Error('Expected the enhancer to be a function.'); } - return enhancer(createStore)(reducer, initialState); + return enhancer(createStore)(reducer, preloadedState); } if (typeof reducer !== 'function') { @@ -600,7 +646,7 @@ } var currentReducer = reducer; - var currentState = initialState; + var currentState = preloadedState; var currentListeners = []; var nextListeners = currentListeners; var isDispatching = false; @@ -692,7 +738,7 @@ * return something else (for example, a Promise you can await). */ function dispatch(action) { - if (!(0, _isPlainObject2["default"])(action)) { + if (!(0, _isPlainObject2['default'])(action)) { throw new Error('Actions must be plain objects. ' + 'Use custom middleware for async actions.'); } @@ -757,7 +803,6 @@ * be used to unsubscribe the observable from the store, and prevent further * emission of values from the observable. */ - subscribe: function subscribe(observer) { if (typeof observer !== 'object') { throw new TypeError('Expected the observer to be an object.'); @@ -773,7 +818,7 @@ var unsubscribe = outerSubscribe(observeState); return { unsubscribe: unsubscribe }; } - }, _ref[_symbolObservable2["default"]] = function () { + }, _ref[_symbolObservable2['default']] = function () { return this; }, _ref; } @@ -788,25 +833,26 @@ subscribe: subscribe, getState: getState, replaceReducer: replaceReducer - }, _ref2[_symbolObservable2["default"]] = observable, _ref2; + }, _ref2[_symbolObservable2['default']] = observable, _ref2; } -/***/ }, +/***/ }), /* 8 */ -/***/ function(module, exports, __webpack_require__) { +/***/ (function(module, exports, __webpack_require__) { - var getPrototype = __webpack_require__(9), - isHostObject = __webpack_require__(11), - isObjectLike = __webpack_require__(12); + var baseGetTag = __webpack_require__(9), + getPrototype = __webpack_require__(15), + isObjectLike = __webpack_require__(17); /** `Object#toString` result references. */ var objectTag = '[object Object]'; /** Used for built-in method references. */ - var objectProto = Object.prototype; + var funcProto = Function.prototype, + objectProto = Object.prototype; /** Used to resolve the decompiled source of functions. */ - var funcToString = Function.prototype.toString; + var funcToString = funcProto.toString; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; @@ -814,13 +860,6 @@ /** Used to infer the `Object` constructor. */ var objectCtorString = funcToString.call(Object); - /** - * Used to resolve the - * [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) - * of values. - */ - var objectToString = objectProto.toString; - /** * Checks if `value` is a plain object, that is, an object created by the * `Object` constructor or one with a `[[Prototype]]` of `null`. @@ -830,8 +869,7 @@ * @since 0.8.0 * @category Lang * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a plain object, - * else `false`. + * @returns {boolean} Returns `true` if `value` is a plain object, else `false`. * @example * * function Foo() { @@ -851,8 +889,7 @@ * // => true */ function isPlainObject(value) { - if (!isObjectLike(value) || - objectToString.call(value) != objectTag || isHostObject(value)) { + if (!isObjectLike(value) || baseGetTag(value) != objectTag) { return false; } var proto = getPrototype(value); @@ -860,84 +897,201 @@ return true; } var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor; - return (typeof Ctor == 'function' && - Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString); + return typeof Ctor == 'function' && Ctor instanceof Ctor && + funcToString.call(Ctor) == objectCtorString; } module.exports = isPlainObject; -/***/ }, +/***/ }), /* 9 */ -/***/ function(module, exports, __webpack_require__) { +/***/ (function(module, exports, __webpack_require__) { - var overArg = __webpack_require__(10); + var Symbol = __webpack_require__(10), + getRawTag = __webpack_require__(13), + objectToString = __webpack_require__(14); - /* Built-in method references for those with the same name as other `lodash` methods. */ - var nativeGetPrototype = Object.getPrototypeOf; + /** `Object#toString` result references. */ + var nullTag = '[object Null]', + undefinedTag = '[object Undefined]'; + + /** Built-in value references. */ + var symToStringTag = Symbol ? Symbol.toStringTag : undefined; /** - * Gets the `[[Prototype]]` of `value`. + * The base implementation of `getTag` without fallbacks for buggy environments. * * @private * @param {*} value The value to query. - * @returns {null|Object} Returns the `[[Prototype]]`. + * @returns {string} Returns the `toStringTag`. */ - var getPrototype = overArg(nativeGetPrototype, Object); + function baseGetTag(value) { + if (value == null) { + return value === undefined ? undefinedTag : nullTag; + } + return (symToStringTag && symToStringTag in Object(value)) + ? getRawTag(value) + : objectToString(value); + } - module.exports = getPrototype; + module.exports = baseGetTag; -/***/ }, +/***/ }), /* 10 */ -/***/ function(module, exports) { +/***/ (function(module, exports, __webpack_require__) { + + var root = __webpack_require__(11); + + /** Built-in value references. */ + var Symbol = root.Symbol; + + module.exports = Symbol; + + +/***/ }), +/* 11 */ +/***/ (function(module, exports, __webpack_require__) { + + var freeGlobal = __webpack_require__(12); + + /** Detect free variable `self`. */ + var freeSelf = typeof self == 'object' && self && self.Object === Object && self; + + /** Used as a reference to the global object. */ + var root = freeGlobal || freeSelf || Function('return this')(); + + module.exports = root; + + +/***/ }), +/* 12 */ +/***/ (function(module, exports) { + + /* WEBPACK VAR INJECTION */(function(global) {/** Detect free variable `global` from Node.js. */ + var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; + + module.exports = freeGlobal; + + /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()))) + +/***/ }), +/* 13 */ +/***/ (function(module, exports, __webpack_require__) { + + var Symbol = __webpack_require__(10); + + /** Used for built-in method references. */ + var objectProto = Object.prototype; + + /** Used to check objects for own properties. */ + var hasOwnProperty = objectProto.hasOwnProperty; + + /** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ + var nativeObjectToString = objectProto.toString; + + /** Built-in value references. */ + var symToStringTag = Symbol ? Symbol.toStringTag : undefined; /** - * Creates a function that invokes `func` with its first argument transformed. + * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values. * * @private - * @param {Function} func The function to wrap. - * @param {Function} transform The argument transform. - * @returns {Function} Returns the new function. + * @param {*} value The value to query. + * @returns {string} Returns the raw `toStringTag`. */ - function overArg(func, transform) { - return function(arg) { - return func(transform(arg)); - }; + function getRawTag(value) { + var isOwn = hasOwnProperty.call(value, symToStringTag), + tag = value[symToStringTag]; + + try { + value[symToStringTag] = undefined; + var unmasked = true; + } catch (e) {} + + var result = nativeObjectToString.call(value); + if (unmasked) { + if (isOwn) { + value[symToStringTag] = tag; + } else { + delete value[symToStringTag]; + } + } + return result; } - module.exports = overArg; + module.exports = getRawTag; -/***/ }, -/* 11 */ -/***/ function(module, exports) { +/***/ }), +/* 14 */ +/***/ (function(module, exports) { + + /** Used for built-in method references. */ + var objectProto = Object.prototype; /** - * Checks if `value` is a host object in IE < 9. + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ + var nativeObjectToString = objectProto.toString; + + /** + * Converts `value` to a string using `Object.prototype.toString`. * * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a host object, else `false`. + * @param {*} value The value to convert. + * @returns {string} Returns the converted string. */ - function isHostObject(value) { - // Many host objects are `Object` objects that can coerce to strings - // despite having improperly defined `toString` methods. - var result = false; - if (value != null && typeof value.toString != 'function') { - try { - result = !!(value + ''); - } catch (e) {} - } - return result; + function objectToString(value) { + return nativeObjectToString.call(value); } - module.exports = isHostObject; + module.exports = objectToString; -/***/ }, -/* 12 */ -/***/ function(module, exports) { +/***/ }), +/* 15 */ +/***/ (function(module, exports, __webpack_require__) { + + var overArg = __webpack_require__(16); + + /** Built-in value references. */ + var getPrototype = overArg(Object.getPrototypeOf, Object); + + module.exports = getPrototype; + + +/***/ }), +/* 16 */ +/***/ (function(module, exports) { + + /** + * Creates a unary function that invokes `func` with its argument transformed. + * + * @private + * @param {Function} func The function to wrap. + * @param {Function} transform The argument transform. + * @returns {Function} Returns the new function. + */ + function overArg(func, transform) { + return function(arg) { + return func(transform(arg)); + }; + } + + module.exports = overArg; + + +/***/ }), +/* 17 */ +/***/ (function(module, exports) { /** * Checks if `value` is object-like. A value is object-like if it's not `null` @@ -964,39 +1118,90 @@ * // => false */ function isObjectLike(value) { - return !!value && typeof value == 'object'; + return value != null && typeof value == 'object'; } module.exports = isObjectLike; -/***/ }, -/* 13 */ -/***/ function(module, exports, __webpack_require__) { +/***/ }), +/* 18 */ +/***/ (function(module, exports, __webpack_require__) { - /* WEBPACK VAR INJECTION */(function(global) {/* global window */ - 'use strict'; + module.exports = __webpack_require__(19); - module.exports = __webpack_require__(14)(global || window || this); - /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()))) +/***/ }), +/* 19 */ +/***/ (function(module, exports, __webpack_require__) { -/***/ }, -/* 14 */ -/***/ function(module, exports) { + /* WEBPACK VAR INJECTION */(function(global, module) {'use strict'; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + + var _ponyfill = __webpack_require__(21); + + var _ponyfill2 = _interopRequireDefault(_ponyfill); + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + + var root; /* global window */ + + + if (typeof self !== 'undefined') { + root = self; + } else if (typeof window !== 'undefined') { + root = window; + } else if (typeof global !== 'undefined') { + root = global; + } else if (true) { + root = module; + } else { + root = Function('return this')(); + } + + var result = (0, _ponyfill2['default'])(root); + exports['default'] = result; + /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()), __webpack_require__(20)(module))) + +/***/ }), +/* 20 */ +/***/ (function(module, exports) { + + module.exports = function(module) { + if(!module.webpackPolyfill) { + module.deprecate = function() {}; + module.paths = []; + // module.parent = undefined by default + module.children = []; + module.webpackPolyfill = 1; + } + return module; + } + + +/***/ }), +/* 21 */ +/***/ (function(module, exports) { 'use strict'; - module.exports = function symbolObservablePonyfill(root) { + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports['default'] = symbolObservablePonyfill; + function symbolObservablePonyfill(root) { var result; - var Symbol = root.Symbol; + var _Symbol = root.Symbol; - if (typeof Symbol === 'function') { - if (Symbol.observable) { - result = Symbol.observable; + if (typeof _Symbol === 'function') { + if (_Symbol.observable) { + result = _Symbol.observable; } else { - result = Symbol('observable'); - Symbol.observable = result; + result = _Symbol('observable'); + _Symbol.observable = result; } } else { result = '@@observable'; @@ -1005,15 +1210,14 @@ return result; }; - -/***/ }, -/* 15 */ -/***/ function(module, exports, __webpack_require__) { +/***/ }), +/* 22 */ +/***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(process) {'use strict'; exports.__esModule = true; - exports["default"] = combineReducers; + exports['default'] = combineReducers; var _createStore = __webpack_require__(7); @@ -1021,11 +1225,11 @@ var _isPlainObject2 = _interopRequireDefault(_isPlainObject); - var _warning = __webpack_require__(16); + var _warning = __webpack_require__(23); var _warning2 = _interopRequireDefault(_warning); - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } function getUndefinedStateErrorMessage(key, action) { var actionType = action && action.type; @@ -1034,20 +1238,24 @@ return 'Given action ' + actionName + ', reducer "' + key + '" returned undefined. ' + 'To ignore an action, you must explicitly return the previous state.'; } - function getUnexpectedStateShapeWarningMessage(inputState, reducers, action) { + function getUnexpectedStateShapeWarningMessage(inputState, reducers, action, unexpectedKeyCache) { var reducerKeys = Object.keys(reducers); - var argumentName = action && action.type === _createStore.ActionTypes.INIT ? 'initialState argument passed to createStore' : 'previous state received by the reducer'; + var argumentName = action && action.type === _createStore.ActionTypes.INIT ? 'preloadedState argument passed to createStore' : 'previous state received by the reducer'; if (reducerKeys.length === 0) { return 'Store does not have a valid reducer. Make sure the argument passed ' + 'to combineReducers is an object whose values are reducers.'; } - if (!(0, _isPlainObject2["default"])(inputState)) { + if (!(0, _isPlainObject2['default'])(inputState)) { return 'The ' + argumentName + ' has unexpected type of "' + {}.toString.call(inputState).match(/\s([a-z|A-Z]+)/)[1] + '". Expected argument to be an object with the following ' + ('keys: "' + reducerKeys.join('", "') + '"'); } var unexpectedKeys = Object.keys(inputState).filter(function (key) { - return !reducers.hasOwnProperty(key); + return !reducers.hasOwnProperty(key) && !unexpectedKeyCache[key]; + }); + + unexpectedKeys.forEach(function (key) { + unexpectedKeyCache[key] = true; }); if (unexpectedKeys.length > 0) { @@ -1092,12 +1300,23 @@ var finalReducers = {}; for (var i = 0; i < reducerKeys.length; i++) { var key = reducerKeys[i]; + + if (process.env.NODE_ENV !== 'production') { + if (typeof reducers[key] === 'undefined') { + (0, _warning2['default'])('No reducer provided for key "' + key + '"'); + } + } + if (typeof reducers[key] === 'function') { finalReducers[key] = reducers[key]; } } var finalReducerKeys = Object.keys(finalReducers); + if (process.env.NODE_ENV !== 'production') { + var unexpectedKeyCache = {}; + } + var sanityError; try { assertReducerSanity(finalReducers); @@ -1114,9 +1333,9 @@ } if (process.env.NODE_ENV !== 'production') { - var warningMessage = getUnexpectedStateShapeWarningMessage(state, finalReducers, action); + var warningMessage = getUnexpectedStateShapeWarningMessage(state, finalReducers, action, unexpectedKeyCache); if (warningMessage) { - (0, _warning2["default"])(warningMessage); + (0, _warning2['default'])(warningMessage); } } @@ -1139,14 +1358,14 @@ } /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(6))) -/***/ }, -/* 16 */ -/***/ function(module, exports) { +/***/ }), +/* 23 */ +/***/ (function(module, exports) { 'use strict'; exports.__esModule = true; - exports["default"] = warning; + exports['default'] = warning; /** * Prints a warning in the console if it exists. * @@ -1169,14 +1388,14 @@ /* eslint-enable no-empty */ } -/***/ }, -/* 17 */ -/***/ function(module, exports) { +/***/ }), +/* 24 */ +/***/ (function(module, exports) { 'use strict'; exports.__esModule = true; - exports["default"] = bindActionCreators; + exports['default'] = bindActionCreators; function bindActionCreator(actionCreator, dispatch) { return function () { return dispatch(actionCreator.apply(undefined, arguments)); @@ -1225,9 +1444,9 @@ return boundActionCreators; } -/***/ }, -/* 18 */ -/***/ function(module, exports, __webpack_require__) { +/***/ }), +/* 25 */ +/***/ (function(module, exports, __webpack_require__) { 'use strict'; @@ -1235,13 +1454,13 @@ 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; }; - exports["default"] = applyMiddleware; + exports['default'] = applyMiddleware; - var _compose = __webpack_require__(19); + var _compose = __webpack_require__(26); var _compose2 = _interopRequireDefault(_compose); - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } /** * Creates a store enhancer that applies middleware to the dispatch method @@ -1265,8 +1484,8 @@ } return function (createStore) { - return function (reducer, initialState, enhancer) { - var store = createStore(reducer, initialState, enhancer); + return function (reducer, preloadedState, enhancer) { + var store = createStore(reducer, preloadedState, enhancer); var _dispatch = store.dispatch; var chain = []; @@ -1279,7 +1498,7 @@ chain = middlewares.map(function (middleware) { return middleware(middlewareAPI); }); - _dispatch = _compose2["default"].apply(undefined, chain)(store.dispatch); + _dispatch = _compose2['default'].apply(undefined, chain)(store.dispatch); return _extends({}, store, { dispatch: _dispatch @@ -1288,9 +1507,9 @@ }; } -/***/ }, -/* 19 */ -/***/ function(module, exports) { +/***/ }), +/* 26 */ +/***/ (function(module, exports) { "use strict"; @@ -1316,26 +1535,24 @@ return function (arg) { return arg; }; - } else { - var _ret = function () { - var last = funcs[funcs.length - 1]; - var rest = funcs.slice(0, -1); - return { - v: function v() { - return rest.reduceRight(function (composed, f) { - return f(composed); - }, last.apply(undefined, arguments)); - } - }; - }(); + } - if (typeof _ret === "object") return _ret.v; + if (funcs.length === 1) { + return funcs[0]; } + + var last = funcs[funcs.length - 1]; + var rest = funcs.slice(0, -1); + return function () { + return rest.reduceRight(function (composed, f) { + return f(composed); + }, last.apply(undefined, arguments)); + }; } -/***/ }, -/* 20 */ -/***/ function(module, exports, __webpack_require__) { +/***/ }), +/* 27 */ +/***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(process) {/** * Copyright 2013-2015, Facebook, Inc. @@ -1391,9 +1608,9 @@ /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(6))) -/***/ }, -/* 21 */ -/***/ function(module, exports, __webpack_require__) { +/***/ }), +/* 28 */ +/***/ (function(module, exports, __webpack_require__) { /** * lodash 3.2.0 (Custom Build) @@ -1403,9 +1620,9 @@ * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors * Available under MIT license */ - var baseFor = __webpack_require__(22), - isArguments = __webpack_require__(23), - keysIn = __webpack_require__(24); + var baseFor = __webpack_require__(29), + isArguments = __webpack_require__(30), + keysIn = __webpack_require__(31); /** `Object#toString` result references. */ var objectTag = '[object Object]'; @@ -1500,9 +1717,9 @@ module.exports = isPlainObject; -/***/ }, -/* 22 */ -/***/ function(module, exports) { +/***/ }), +/* 29 */ +/***/ (function(module, exports) { /** * lodash 3.0.3 (Custom Build) @@ -1554,9 +1771,9 @@ module.exports = baseFor; -/***/ }, -/* 23 */ -/***/ function(module, exports) { +/***/ }), +/* 30 */ +/***/ (function(module, exports) { /** * lodash (Custom Build) @@ -1575,19 +1792,6 @@ funcTag = '[object Function]', genTag = '[object GeneratorFunction]'; - /** - * The base implementation of `_.property` without support for deep paths. - * - * @private - * @param {string} key The key of the property to get. - * @returns {Function} Returns the new accessor function. - */ - function baseProperty(key) { - return function(object) { - return object == null ? undefined : object[key]; - }; - } - /** Used for built-in method references. */ var objectProto = Object.prototype; @@ -1596,7 +1800,7 @@ /** * Used to resolve the - * [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) * of values. */ var objectToString = objectProto.toString; @@ -1604,19 +1808,6 @@ /** Built-in value references. */ var propertyIsEnumerable = objectProto.propertyIsEnumerable; - /** - * Gets the "length" property value of `object`. - * - * **Note:** This function is used to avoid a - * [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792) that affects - * Safari on at least iOS 8.1-8.3 ARM64. - * - * @private - * @param {Object} object The object to query. - * @returns {*} Returns the "length" value. - */ - var getLength = baseProperty('length'); - /** * Checks if `value` is likely an `arguments` object. * @@ -1636,7 +1827,7 @@ * // => false */ function isArguments(value) { - // Safari 8.1 incorrectly makes `arguments.callee` enumerable in strict mode. + // Safari 8.1 makes `arguments.callee` enumerable in strict mode. return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') && (!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag); } @@ -1667,7 +1858,7 @@ * // => false */ function isArrayLike(value) { - return value != null && isLength(getLength(value)) && !isFunction(value); + return value != null && isLength(value.length) && !isFunction(value); } /** @@ -1718,8 +1909,7 @@ */ function isFunction(value) { // The use of `Object#toString` avoids issues with the `typeof` operator - // in Safari 8 which returns 'object' for typed array and weak map constructors, - // and PhantomJS 1.9 which returns 'function' for `NodeList` instances. + // in Safari 8-9 which returns 'object' for typed array and other constructors. var tag = isObject(value) ? objectToString.call(value) : ''; return tag == funcTag || tag == genTag; } @@ -1727,16 +1917,15 @@ /** * Checks if `value` is a valid array-like length. * - * **Note:** This function is loosely based on - * [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength). + * **Note:** This method is loosely based on + * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a valid length, - * else `false`. + * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. * @example * * _.isLength(3); @@ -1758,7 +1947,7 @@ /** * Checks if `value` is the - * [language type](http://www.ecma-international.org/ecma-262/6.0/#sec-ecmascript-language-types) + * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) * * @static @@ -1817,9 +2006,9 @@ module.exports = isArguments; -/***/ }, -/* 24 */ -/***/ function(module, exports, __webpack_require__) { +/***/ }), +/* 31 */ +/***/ (function(module, exports, __webpack_require__) { /** * lodash 3.0.8 (Custom Build) @@ -1829,8 +2018,8 @@ * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors * Available under MIT license */ - var isArguments = __webpack_require__(23), - isArray = __webpack_require__(25); + var isArguments = __webpack_require__(30), + isArray = __webpack_require__(32); /** Used to detect unsigned integer values. */ var reIsUint = /^\d+$/; @@ -1955,9 +2144,9 @@ module.exports = keysIn; -/***/ }, -/* 25 */ -/***/ function(module, exports) { +/***/ }), +/* 32 */ +/***/ (function(module, exports) { /** * lodash 3.0.4 (Custom Build) @@ -2141,9 +2330,9 @@ module.exports = isArray; -/***/ }, -/* 26 */ -/***/ function(module, exports) { +/***/ }), +/* 33 */ +/***/ (function(module, exports) { /** * lodash 3.0.8 (Custom Build) @@ -2222,9 +2411,9 @@ module.exports = isFunction; -/***/ }, -/* 27 */ -/***/ function(module, exports) { +/***/ }), +/* 34 */ +/***/ (function(module, exports) { /** * lodash 3.0.2 (Custom Build) @@ -2265,9 +2454,9 @@ module.exports = isObject; -/***/ }, -/* 28 */ -/***/ function(module, exports, __webpack_require__) { +/***/ }), +/* 35 */ +/***/ (function(module, exports, __webpack_require__) { /** * lodash 3.2.0 (Custom Build) @@ -2277,9 +2466,9 @@ * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors * Available under MIT license */ - var baseAssign = __webpack_require__(29), - createAssigner = __webpack_require__(33), - keys = __webpack_require__(31); + var baseAssign = __webpack_require__(36), + createAssigner = __webpack_require__(40), + keys = __webpack_require__(38); /** * A specialized version of `_.assign` for customizing assigned values without @@ -2351,9 +2540,9 @@ module.exports = assign; -/***/ }, -/* 29 */ -/***/ function(module, exports, __webpack_require__) { +/***/ }), +/* 36 */ +/***/ (function(module, exports, __webpack_require__) { /** * lodash 3.2.0 (Custom Build) @@ -2363,8 +2552,8 @@ * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors * Available under MIT license */ - var baseCopy = __webpack_require__(30), - keys = __webpack_require__(31); + var baseCopy = __webpack_require__(37), + keys = __webpack_require__(38); /** * The base implementation of `_.assign` without support for argument juggling, @@ -2384,9 +2573,9 @@ module.exports = baseAssign; -/***/ }, -/* 30 */ -/***/ function(module, exports) { +/***/ }), +/* 37 */ +/***/ (function(module, exports) { /** * lodash 3.0.1 (Custom Build) @@ -2422,9 +2611,9 @@ module.exports = baseCopy; -/***/ }, -/* 31 */ -/***/ function(module, exports, __webpack_require__) { +/***/ }), +/* 38 */ +/***/ (function(module, exports, __webpack_require__) { /** * lodash 3.1.2 (Custom Build) @@ -2434,9 +2623,9 @@ * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors * Available under MIT license */ - var getNative = __webpack_require__(32), - isArguments = __webpack_require__(23), - isArray = __webpack_require__(25); + var getNative = __webpack_require__(39), + isArguments = __webpack_require__(30), + isArray = __webpack_require__(32); /** Used to detect unsigned integer values. */ var reIsUint = /^\d+$/; @@ -2664,9 +2853,9 @@ module.exports = keys; -/***/ }, -/* 32 */ -/***/ function(module, exports) { +/***/ }), +/* 39 */ +/***/ (function(module, exports) { /** * lodash 3.9.1 (Custom Build) @@ -2807,9 +2996,9 @@ module.exports = getNative; -/***/ }, -/* 33 */ -/***/ function(module, exports, __webpack_require__) { +/***/ }), +/* 40 */ +/***/ (function(module, exports, __webpack_require__) { /** * lodash 3.1.1 (Custom Build) @@ -2819,9 +3008,9 @@ * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors * Available under MIT license */ - var bindCallback = __webpack_require__(34), - isIterateeCall = __webpack_require__(35), - restParam = __webpack_require__(36); + var bindCallback = __webpack_require__(41), + isIterateeCall = __webpack_require__(42), + restParam = __webpack_require__(43); /** * Creates a function that assigns properties of source object(s) to a given @@ -2865,9 +3054,9 @@ module.exports = createAssigner; -/***/ }, -/* 34 */ -/***/ function(module, exports) { +/***/ }), +/* 41 */ +/***/ (function(module, exports) { /** * lodash 3.0.1 (Custom Build) @@ -2936,9 +3125,9 @@ module.exports = bindCallback; -/***/ }, -/* 35 */ -/***/ function(module, exports) { +/***/ }), +/* 42 */ +/***/ (function(module, exports) { /** * lodash 3.0.9 (Custom Build) @@ -3074,9 +3263,9 @@ module.exports = isIterateeCall; -/***/ }, -/* 36 */ -/***/ function(module, exports) { +/***/ }), +/* 43 */ +/***/ (function(module, exports) { /** * lodash 3.6.1 (Custom Build) @@ -3147,9 +3336,9 @@ module.exports = restParam; -/***/ }, -/* 37 */ -/***/ function(module, exports) { +/***/ }), +/* 44 */ +/***/ (function(module, exports) { "use strict"; @@ -3165,9 +3354,9 @@ }; } -/***/ }, -/* 38 */ -/***/ function(module, exports) { +/***/ }), +/* 45 */ +/***/ (function(module, exports) { /* WEBPACK VAR INJECTION */(function(global) {/** * lodash (Custom Build) @@ -3222,7 +3411,7 @@ /** * Used to match `RegExp` - * [syntax characters](http://ecma-international.org/ecma-262/6.0/#sec-patterns). + * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns). */ var reRegExpChar = /[\\^$.*+?()[\]{}|]/g; @@ -3307,7 +3496,7 @@ * specifying an index to search from. * * @private - * @param {Array} [array] The array to search. + * @param {Array} [array] The array to inspect. * @param {*} target The value to search for. * @returns {boolean} Returns `true` if `target` is found, else `false`. */ @@ -3321,7 +3510,7 @@ * support for iteratee shorthands. * * @private - * @param {Array} array The array to search. + * @param {Array} array The array to inspect. * @param {Function} predicate The function invoked per iteration. * @param {number} fromIndex The index to search from. * @param {boolean} [fromRight] Specify iterating from right to left. @@ -3343,7 +3532,7 @@ * The base implementation of `_.indexOf` without `fromIndex` bounds checks. * * @private - * @param {Array} array The array to search. + * @param {Array} array The array to inspect. * @param {*} value The value to search for. * @param {number} fromIndex The index to search from. * @returns {number} Returns the index of the matched value, else `-1`. @@ -3451,7 +3640,8 @@ } /** Used for built-in method references. */ - var objectProto = Object.prototype; + var funcProto = Function.prototype, + objectProto = Object.prototype; /** Used to detect overreaching core-js shims. */ var coreJsData = root['__core-js_shared__']; @@ -3463,14 +3653,14 @@ }()); /** Used to resolve the decompiled source of functions. */ - var funcToString = Function.prototype.toString; + var funcToString = funcProto.toString; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** * Used to resolve the - * [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) * of values. */ var objectToString = objectProto.toString; @@ -3647,7 +3837,7 @@ function createCtor(Ctor) { return function() { // Use a `switch` statement to work with class constructors. See - // http://ecma-international.org/ecma-262/6.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist + // http://ecma-international.org/ecma-262/7.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist // for more details. var args = arguments; switch (args.length) { @@ -4151,15 +4341,14 @@ */ function isFunction(value) { // The use of `Object#toString` avoids issues with the `typeof` operator - // in Safari 8 which returns 'object' for typed array and weak map constructors, - // and PhantomJS 1.9 which returns 'function' for `NodeList` instances. + // in Safari 8-9 which returns 'object' for typed array and other constructors. var tag = isObject(value) ? objectToString.call(value) : ''; return tag == funcTag || tag == genTag; } /** * Checks if `value` is the - * [language type](http://www.ecma-international.org/ecma-262/6.0/#sec-ecmascript-language-types) + * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) * * @static @@ -4276,7 +4465,7 @@ * Converts `value` to an integer. * * **Note:** This method is loosely based on - * [`ToInteger`](http://www.ecma-international.org/ecma-262/6.0/#sec-tointeger). + * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger). * * @static * @memberOf _ @@ -4336,7 +4525,7 @@ return NAN; } if (isObject(value)) { - var other = isFunction(value.valueOf) ? value.valueOf() : value; + var other = typeof value.valueOf == 'function' ? value.valueOf() : value; value = isObject(other) ? (other + '') : other; } if (typeof value != 'string') { @@ -4401,9 +4590,9 @@ /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()))) -/***/ }, -/* 39 */ -/***/ function(module, exports, __webpack_require__) { +/***/ }), +/* 46 */ +/***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(global, module) {/** * lodash (Custom Build) @@ -4469,7 +4658,7 @@ /** * Used to match `RegExp` - * [syntax characters](http://ecma-international.org/ecma-262/6.0/#sec-patterns). + * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns). */ var reRegExpChar = /[\\^$.*+?()[\]{}|]/g; @@ -4665,7 +4854,7 @@ } /** - * Creates a function that invokes `func` with its first argument transformed. + * Creates a unary function that invokes `func` with its argument transformed. * * @private * @param {Function} func The function to wrap. @@ -4697,6 +4886,7 @@ /** Used for built-in method references. */ var arrayProto = Array.prototype, + funcProto = Function.prototype, objectProto = Object.prototype; /** Used to detect overreaching core-js shims. */ @@ -4709,14 +4899,14 @@ }()); /** Used to resolve the decompiled source of functions. */ - var funcToString = Function.prototype.toString; + var funcToString = funcProto.toString; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** * Used to resolve the - * [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) * of values. */ var objectToString = objectProto.toString; @@ -4734,8 +4924,7 @@ splice = arrayProto.splice; /* Built-in method references for those with the same name as other `lodash` methods. */ - var nativeGetPrototype = Object.getPrototypeOf, - nativeKeys = Object.keys; + var nativeKeys = overArg(Object.keys, Object); /* Built-in method references that are verified to be native. */ var DataView = getNative(root, 'DataView'), @@ -5203,11 +5392,38 @@ Stack.prototype.has = stackHas; Stack.prototype.set = stackSet; + /** + * Creates an array of the enumerable property names of the array-like `value`. + * + * @private + * @param {*} value The value to query. + * @param {boolean} inherited Specify returning inherited property names. + * @returns {Array} Returns the array of property names. + */ + function arrayLikeKeys(value, inherited) { + // Safari 8.1 makes `arguments.callee` enumerable in strict mode. + // Safari 9 makes `arguments.length` enumerable in strict mode. + var result = (isArray(value) || isArguments(value)) + ? baseTimes(value.length, String) + : []; + + var length = result.length, + skipIndexes = !!length; + + for (var key in value) { + if ((inherited || hasOwnProperty.call(value, key)) && + !(skipIndexes && (key == 'length' || isIndex(key, length)))) { + result.push(key); + } + } + return result; + } + /** * Gets the index at which the `key` is found in `array` of key-value pairs. * * @private - * @param {Array} array The array to search. + * @param {Array} array The array to inspect. * @param {*} key The key to search for. * @returns {number} Returns the index of the matched value, else `-1`. */ @@ -5287,23 +5503,6 @@ return objectToString.call(value); } - /** - * The base implementation of `_.has` without support for deep paths. - * - * @private - * @param {Object} [object] The object to query. - * @param {Array|string} key The key to check. - * @returns {boolean} Returns `true` if `key` exists, else `false`. - */ - function baseHas(object, key) { - // Avoid a bug in IE 10-11 where objects with a [[Prototype]] of `null`, - // that are composed entirely of index properties, return `false` for - // `hasOwnProperty` checks of them. - return object != null && - (hasOwnProperty.call(object, key) || - (typeof object == 'object' && key in object && getPrototype(object) === null)); - } - /** * The base implementation of `_.hasIn` without support for deep paths. * @@ -5506,14 +5705,24 @@ } /** - * The base implementation of `_.keys` which doesn't skip the constructor - * property of prototypes or treat sparse arrays as dense. + * The base implementation of `_.keys` which doesn't treat sparse arrays as dense. * * @private * @param {Object} object The object to query. * @returns {Array} Returns the array of property names. */ - var baseKeys = overArg(nativeKeys, Object); + function baseKeys(object) { + if (!isPrototype(object)) { + return nativeKeys(object); + } + var result = []; + for (var key in Object(object)) { + if (hasOwnProperty.call(object, key) && key != 'constructor') { + result.push(key); + } + } + return result; + } /** * The base implementation of `_.map` without support for iteratee shorthands. @@ -5790,7 +5999,7 @@ case regexpTag: case stringTag: // Coerce regexes to strings and treat strings, primitives and objects, - // as equal. See http://www.ecma-international.org/ecma-262/6.0/#sec-regexp.prototype.tostring + // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring // for more details. return object == (other + ''); @@ -5852,7 +6061,7 @@ var index = objLength; while (index--) { var key = objProps[index]; - if (!(isPartial ? key in other : baseHas(other, key))) { + if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) { return false; } } @@ -5903,19 +6112,6 @@ return result; } - /** - * Gets the "length" property value of `object`. - * - * **Note:** This function is used to avoid a - * [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792) that affects - * Safari on at least iOS 8.1-8.3 ARM64. - * - * @private - * @param {Object} object The object to query. - * @returns {*} Returns the "length" value. - */ - var getLength = baseProperty('length'); - /** * Gets the data for `map`. * @@ -5964,15 +6160,6 @@ return baseIsNative(value) ? value : undefined; } - /** - * Gets the `[[Prototype]]` of `value`. - * - * @private - * @param {*} value The value to query. - * @returns {null|Object} Returns the `[[Prototype]]`. - */ - var getPrototype = overArg(nativeGetPrototype, Object); - /** * Gets the `toStringTag` of `value`. * @@ -5983,7 +6170,7 @@ var getTag = baseGetTag; // Fallback for data views, maps, sets, and weak maps in IE 11, - // for data views in Edge, and promises in Node.js. + // for data views in Edge < 14, and promises in Node.js. if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) || (Map && getTag(new Map) != mapTag) || (Promise && getTag(Promise.resolve()) != promiseTag) || @@ -6035,24 +6222,7 @@ } var length = object ? object.length : 0; return !!length && isLength(length) && isIndex(key, length) && - (isArray(object) || isString(object) || isArguments(object)); - } - - /** - * Creates an array of index keys for `object` values of arrays, - * `arguments` objects, and strings, otherwise `null` is returned. - * - * @private - * @param {Object} object The object to query. - * @returns {Array|null} Returns index keys, else `null`. - */ - function indexKeys(object) { - var length = object ? object.length : undefined; - if (isLength(length) && - (isArray(object) || isString(object) || isArguments(object))) { - return baseTimes(length, String); - } - return null; + (isArray(object) || isArguments(object)); } /** @@ -6272,7 +6442,7 @@ * **Note:** The cache is exposed as the `cache` property on the memoized * function. Its creation may be customized by replacing the `_.memoize.Cache` * constructor with one whose instances implement the - * [`Map`](http://ecma-international.org/ecma-262/6.0/#sec-properties-of-the-map-prototype-object) + * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object) * method interface of `delete`, `get`, `has`, and `set`. * * @static @@ -6331,7 +6501,7 @@ /** * Performs a - * [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) * comparison between two values to determine if they are equivalent. * * @static @@ -6384,7 +6554,7 @@ * // => false */ function isArguments(value) { - // Safari 8.1 incorrectly makes `arguments.callee` enumerable in strict mode. + // Safari 8.1 makes `arguments.callee` enumerable in strict mode. return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') && (!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag); } @@ -6440,7 +6610,7 @@ * // => false */ function isArrayLike(value) { - return value != null && isLength(getLength(value)) && !isFunction(value); + return value != null && isLength(value.length) && !isFunction(value); } /** @@ -6491,8 +6661,7 @@ */ function isFunction(value) { // The use of `Object#toString` avoids issues with the `typeof` operator - // in Safari 8 which returns 'object' for typed array and weak map constructors, - // and PhantomJS 1.9 which returns 'function' for `NodeList` instances. + // in Safari 8-9 which returns 'object' for typed array and other constructors. var tag = isObject(value) ? objectToString.call(value) : ''; return tag == funcTag || tag == genTag; } @@ -6500,16 +6669,15 @@ /** * Checks if `value` is a valid array-like length. * - * **Note:** This function is loosely based on - * [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength). + * **Note:** This method is loosely based on + * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a valid length, - * else `false`. + * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. * @example * * _.isLength(3); @@ -6531,7 +6699,7 @@ /** * Checks if `value` is the - * [language type](http://www.ecma-international.org/ecma-262/6.0/#sec-ecmascript-language-types) + * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) * * @static @@ -6587,28 +6755,6 @@ return !!value && typeof value == 'object'; } - /** - * Checks if `value` is classified as a `String` primitive or object. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a string, else `false`. - * @example - * - * _.isString('abc'); - * // => true - * - * _.isString(1); - * // => false - */ - function isString(value) { - return typeof value == 'string' || - (!isArray(value) && isObjectLike(value) && objectToString.call(value) == stringTag); - } - /** * Checks if `value` is classified as a `Symbol` primitive or object. * @@ -6739,7 +6885,7 @@ * Creates an array of the own enumerable property names of `object`. * * **Note:** Non-object values are coerced to objects. See the - * [ES spec](http://ecma-international.org/ecma-262/6.0/#sec-object.keys) + * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) * for more details. * * @static @@ -6764,23 +6910,7 @@ * // => ['0', '1'] */ function keys(object) { - var isProto = isPrototype(object); - if (!(isProto || isArrayLike(object))) { - return baseKeys(object); - } - var indexes = indexKeys(object), - skipIndexes = !!indexes, - result = indexes || [], - length = result.length; - - for (var key in object) { - if (baseHas(object, key) && - !(skipIndexes && (key == 'length' || isIndex(key, length))) && - !(isProto && key == 'constructor')) { - result.push(key); - } - } - return result; + return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object); } /** @@ -6831,23 +6961,7 @@ module.exports = map; - /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()), __webpack_require__(40)(module))) - -/***/ }, -/* 40 */ -/***/ function(module, exports) { - - module.exports = function(module) { - if(!module.webpackPolyfill) { - module.deprecate = function() {}; - module.paths = []; - // module.parent = undefined by default - module.children = []; - module.webpackPolyfill = 1; - } - return module; - } - + /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()), __webpack_require__(20)(module))) -/***/ } +/***/ }) /******/ ]); \ No newline at end of file diff --git a/dist/ng-redux.min.js b/dist/ng-redux.min.js index ed4c3b4..82edeb4 100644 --- a/dist/ng-redux.min.js +++ b/dist/ng-redux.min.js @@ -1,2 +1,2 @@ -!function(t){function n(r){if(e[r])return e[r].exports;var o=e[r]={exports:{},id:r,loaded:!1};return t[r].call(o.exports,o,o.exports,n),o.loaded=!0,o.exports}var e={};return n.m=t,n.c=e,n.p="",n(0)}([function(t,n,e){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}n.__esModule=!0;var o=e(1),u=r(o);n["default"]=angular.module("ngRedux",[]).provider("$ngRedux",u["default"]).name},function(t,n,e){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(){var t=void 0,n=void 0,e=void 0,r=void 0,o=void 0;this.createStoreWith=function(i,c,a,l){(0,f["default"])((0,j["default"])(i)||x(i),"The reducer parameter passed to createStoreWith must be a Function or an Object. Instead received %s.","undefined"==typeof i?"undefined":u(i)),(0,f["default"])(!a||(0,g["default"])(a),"The storeEnhancers parameter passed to createStoreWith must be an Array. Instead received %s.","undefined"==typeof a?"undefined":u(a)),t=i,o=x(i),e=a,n=c||[],r=l},this.$get=function(u){var i=function(t){return A(t)?u.get(t):t},a=(0,m["default"])(n,i),f=function(t){return A(t)?u.get(t):t},s=(0,m["default"])(e,f);o&&!function(){var n=function(n){return A(t[n])?u.get(t[n]):t[n]},e=function(t,e){var r;return(0,v["default"])({},t,(r={},r[e]=n(e),r))},r=Object.keys(t).reduce(e,{});t=(0,l.combineReducers)(r)}();var d=s?l.compose.apply(void 0,s)(l.createStore):l.createStore;a.push((0,p["default"])(u.get("$rootScope")));var h=r?l.applyMiddleware.apply(void 0,a)(d)(t,r):l.applyMiddleware.apply(void 0,a)(d)(t);return(0,v["default"])({},h,{connect:(0,c["default"])(h)})},this.$get.$inject=["$injector"]}n.__esModule=!0;var u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t};n["default"]=o;var i=e(2),c=r(i),a=e(20),f=r(a),l=e(5),s=e(37),p=r(s),d=e(28),v=r(d),h=e(38),y=r(h),b=e(25),g=r(b),_=e(26),j=r(_),w=e(39),m=r(w),O=(0,y["default"])(function(t,n){return("undefined"==typeof n?"undefined":u(n))===t}),x=O("object"),A=O("string")},function(t,n,e){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(t){return function(n,e){var r=n||w,o=(0,v["default"])(e)?(0,l["default"])(e):e||m;(0,p["default"])((0,y["default"])(r),"mapStateToTarget must be a Function. Instead received %s.",r),(0,p["default"])((0,v["default"])(o)||(0,y["default"])(o),"mapDispatchToTarget must be a plain Object or a Function. Instead received %s.",o);var c=i(t.getState(),r,!1),f=(0,y["default"])(c);f&&(r=c,c=i(t.getState(),r));var s=o(t.dispatch);return function(n){(0,p["default"])((0,y["default"])(n)||(0,g["default"])(n),"The target parameter passed to connect must be a Function or a object."),u(n,c,s);var e=t.subscribe(function(){var e=i(t.getState(),r);(0,a["default"])(c,e)||(c=e,u(n,c,s))});return e}}}function u(t,n,e){(0,y["default"])(t)?t(n,e):(0,j["default"])(t,n,e)}function i(t,n){var e=arguments.length<=2||void 0===arguments[2]||arguments[2],r=n(t);return e?(0,p["default"])((0,v["default"])(r),"`mapStateToScope` must return an object. Instead received %s.",r):(0,p["default"])((0,v["default"])(r)||(0,y["default"])(r),"`mapStateToScope` must return an object or a function. Instead received %s.",r),r}n.__esModule=!0,n["default"]=o;var c=e(3),a=r(c),f=e(4),l=r(f),s=e(20),p=r(s),d=e(21),v=r(d),h=e(26),y=r(h),b=e(27),g=r(b),_=e(28),j=r(_),w=function(){return{}},m=function(t){return{dispatch:t}}},function(t,n){"use strict";function e(t,n){if(t===n)return!0;var e=Object.keys(t).filter(function(t){return"$$hashKey"!==t}),r=Object.keys(n).filter(function(t){return"$$hashKey"!==t});if(e.length!==r.length)return!1;for(var o=Object.prototype.hasOwnProperty,u=0;u1)for(var r=1;r0?"Unexpected "+(u.length>1?"keys":"key")+" "+('"'+u.join('", "')+'" found in '+o+". ")+"Expected to find one of the known reducer keys instead: "+('"'+r.join('", "')+'". Unexpected keys will be ignored.'):void 0}function i(t){Object.keys(t).forEach(function(n){var e=t[n],r=e(void 0,{type:a.ActionTypes.INIT});if("undefined"==typeof r)throw new Error('Reducer "'+n+'" returned undefined during initialization. If the state passed to the reducer is undefined, you must explicitly return the initial state. The initial state may not be undefined.');var o="@@redux/PROBE_UNKNOWN_ACTION_"+Math.random().toString(36).substring(7).split("").join(".");if("undefined"==typeof e(void 0,{type:o}))throw new Error('Reducer "'+n+'" returned undefined when probed with a random type. '+("Don't try to handle "+a.ActionTypes.INIT+' or other actions in "redux/*" ')+"namespace. They are considered private. Instead, you must return the current state for any unknown actions, unless it is undefined, in which case you must return the initial state, regardless of the action type. The initial state may not be undefined.")})}function c(n){for(var e=Object.keys(n),r={},c=0;c-1&&t%1==0&&t<=l}function a(t){var n=typeof t;return!!t&&("object"==n||"function"==n)}function f(t){return!!t&&"object"==typeof t}var l=9007199254740991,s="[object Arguments]",p="[object Function]",d="[object GeneratorFunction]",v=Object.prototype,h=v.hasOwnProperty,y=v.toString,b=v.propertyIsEnumerable,g=e("length");t.exports=r},function(t,n,e){function r(t,n){return t="number"==typeof t||f.test(t)?+t:-1,n=null==n?p:n,t>-1&&t%1==0&&t-1&&t%1==0&&t<=p}function u(t){var n=typeof t;return!!t&&("object"==n||"function"==n)}function i(t){if(null==t)return[];u(t)||(t=Object(t));var n=t.length;n=n&&o(n)&&(a(t)||c(t))&&n||0;for(var e=t.constructor,i=-1,f="function"==typeof e&&e.prototype===t,l=Array(n),p=n>0;++i-1&&t%1==0&&t<=b}function u(t){return i(t)&&v.call(t)==f}function i(t){var n=typeof t;return!!t&&("object"==n||"function"==n)}function c(t){return null!=t&&(u(t)?h.test(p.call(t)):e(t)&&l.test(t))}var a="[object Array]",f="[object Function]",l=/^\[object .+?Constructor\]$/,s=Object.prototype,p=Function.prototype.toString,d=s.hasOwnProperty,v=s.toString,h=RegExp("^"+p.call(d).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),y=r(Array,"isArray"),b=9007199254740991,g=y||function(t){return e(t)&&o(t.length)&&v.call(t)==a};t.exports=g},function(t,n){function e(t){var n=r(t)?c.call(t):"";return n==o||n==u}function r(t){var n=typeof t;return!!t&&("object"==n||"function"==n)}var o="[object Function]",u="[object GeneratorFunction]",i=Object.prototype,c=i.toString;t.exports=e},function(t,n){function e(t){var n=typeof t;return!!t&&("object"==n||"function"==n)}t.exports=e},function(t,n,e){function r(t,n,e){for(var r=-1,o=i(n),u=o.length;++r-1&&t%1==0&&t-1&&t%1==0&&t<=b}function c(t){for(var n=f(t),e=n.length,r=e&&t.length,o=!!r&&i(r)&&(p(t)||s(t)),c=-1,a=[];++c0;++r2?e[i-2]:void 0,a=i>2?e[2]:void 0,f=i>1?e[i-1]:void 0;for("function"==typeof c?(c=o(c,f,5),i-=2):(c="function"==typeof f?f:void 0,i-=c?1:0),a&&u(e[0],e[1],a)&&(c=i<3?void 0:c,i=1);++r-1&&t%1==0&&t-1&&t%1==0&&t<=f}function c(t){var n=typeof t;return!!t&&("object"==n||"function"==n)}var a=/^\d+$/,f=9007199254740991,l=e("length");t.exports=u},function(t,n){function e(t,n){if("function"!=typeof t)throw new TypeError(r);return n=o(void 0===n?t.length-1:+n||0,0),function(){for(var e=arguments,r=-1,u=o(e.length-n,0),i=Array(u);++r-1}function u(t,n,e,r){for(var o=t.length,u=e+(r?1:-1);r?u--:++u1&&S.reverse(),d&&f1?"& ":"")+n[r],n=n.join(e>2?", ":" "),t.replace(st,"{\n/* [wrapped with "+n+"] */\n")}function T(t,n){return n=null==n?et:n,!!n&&("number"==typeof t||gt.test(t))&&t>-1&&t%1==0&&t2?t:void 0}(),Ft=Pt?function(t,n,e){var r=n+"";return Pt(t,"toString",{configurable:!0,enumerable:!1,value:L(E(r,I(S(r),e)))})}:V;P.placeholder={},t.exports=P}).call(n,function(){return this}())},function(t,n,e){(function(t,e){function r(t,n){for(var e=-1,r=t?t.length:0,o=Array(r);++e-1}function x(t,n){var e=this.__data__,r=z(e,t);return r<0?e.push([t,n]):e[r][1]=n,this}function A(t){var n=-1,e=t?t.length:0;for(this.clear();++na))return!1;var l=i.get(t);if(l&&i.get(n))return l==n;var s=-1,p=!0,d=u&Gt?new M:void 0;for(i.set(t,n),i.set(n,t);++s-1&&t%1==0&&t-1&&t%1==0&&t<=qt}function Mt(t){var n=typeof t;return!!t&&("object"==n||"function"==n)}function It(t){return!!t&&"object"==typeof t}function Pt(t){return"string"==typeof t||!we(t)&&It(t)&&Kn.call(t)==an}function Ft(t){return"symbol"==typeof t||It(t)&&Kn.call(t)==fn}function Rt(t){return null==t?"":et(t)}function Nt(t,n,e){var r=null==t?void 0:V(t,n);return void 0===r?e:r}function Ct(t,n){return null!=t&&pt(t,n,B)}function Dt(t){var n=gt(t);if(!n&&!Et(t))return ye(t);var e=dt(t),r=!!e,o=e||[],u=o.length;for(var i in t)!G(t,i)||r&&("length"==i||vt(i,u))||n&&"constructor"==i||o.push(i);return o}function Ut(t){return t}function zt(t){return ht(t)?u(wt(t)):nt(t)}var Lt=200,Vt="Expected a function",Wt="__lodash_hash_undefined__",Gt=1,Bt=2,Kt=1/0,qt=9007199254740991,Yt="[object Arguments]",Ht="[object Array]",Zt="[object Boolean]",Jt="[object Date]",Qt="[object Error]",Xt="[object Function]",tn="[object GeneratorFunction]",nn="[object Map]",en="[object Number]",rn="[object Object]",on="[object Promise]",un="[object RegExp]",cn="[object Set]",an="[object String]",fn="[object Symbol]",ln="[object WeakMap]",sn="[object ArrayBuffer]",pn="[object DataView]",dn="[object Float32Array]",vn="[object Float64Array]",hn="[object Int8Array]",yn="[object Int16Array]",bn="[object Int32Array]",gn="[object Uint8Array]",_n="[object Uint8ClampedArray]",jn="[object Uint16Array]",wn="[object Uint32Array]",mn=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,On=/^\w*$/,xn=/^\./,An=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Sn=/[\\^$.*+?()[\]{}|]/g,En=/\\(\\)?/g,Tn=/^\[object .+?Constructor\]$/,$n=/^(?:0|[1-9]\d*)$/,kn={};kn[dn]=kn[vn]=kn[hn]=kn[yn]=kn[bn]=kn[gn]=kn[_n]=kn[jn]=kn[wn]=!0,kn[Yt]=kn[Ht]=kn[sn]=kn[Zt]=kn[pn]=kn[Jt]=kn[Qt]=kn[Xt]=kn[nn]=kn[en]=kn[rn]=kn[un]=kn[cn]=kn[an]=kn[ln]=!1;var Mn="object"==typeof t&&t&&t.Object===Object&&t,In="object"==typeof self&&self&&self.Object===Object&&self,Pn=Mn||In||Function("return this")(),Fn="object"==typeof n&&n&&!n.nodeType&&n,Rn=Fn&&"object"==typeof e&&e&&!e.nodeType&&e,Nn=Rn&&Rn.exports===Fn,Cn=Nn&&Mn.process,Dn=function(){try{return Cn&&Cn.binding("util")}catch(t){}}(),Un=Dn&&Dn.isTypedArray,zn=Array.prototype,Ln=Object.prototype,Vn=Pn["__core-js_shared__"],Wn=function(){var t=/[^.]+$/.exec(Vn&&Vn.keys&&Vn.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),Gn=Function.prototype.toString,Bn=Ln.hasOwnProperty,Kn=Ln.toString,qn=RegExp("^"+Gn.call(Bn).replace(Sn,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Yn=Pn.Symbol,Hn=Pn.Uint8Array,Zn=Ln.propertyIsEnumerable,Jn=zn.splice,Qn=Object.getPrototypeOf,Xn=Object.keys,te=st(Pn,"DataView"),ne=st(Pn,"Map"),ee=st(Pn,"Promise"),re=st(Pn,"Set"),oe=st(Pn,"WeakMap"),ue=st(Object,"create"),ie=mt(te),ce=mt(ne),ae=mt(ee),fe=mt(re),le=mt(oe),se=Yn?Yn.prototype:void 0,pe=se?se.valueOf:void 0,de=se?se.toString:void 0;d.prototype.clear=v,d.prototype["delete"]=h,d.prototype.get=y,d.prototype.has=b,d.prototype.set=g,_.prototype.clear=j,_.prototype["delete"]=w,_.prototype.get=m,_.prototype.has=O,_.prototype.set=x,A.prototype.clear=S,A.prototype["delete"]=E,A.prototype.get=T,A.prototype.has=$,A.prototype.set=k,M.prototype.add=M.prototype.push=I,M.prototype.has=P,F.prototype.clear=R,F.prototype["delete"]=N,F.prototype.get=C,F.prototype.has=D,F.prototype.set=U;var ve=ot(L),he=ut(),ye=s(Xn,Object),be=u("length"),ge=s(Qn,Object),_e=W;(te&&_e(new te(new ArrayBuffer(1)))!=pn||ne&&_e(new ne)!=nn||ee&&_e(ee.resolve())!=on||re&&_e(new re)!=cn||oe&&_e(new oe)!=ln)&&(_e=function(t){var n=Kn.call(t),e=n==rn?t.constructor:void 0,r=e?mt(e):void 0;if(r)switch(r){case ie:return pn;case ce:return nn;case ae:return on;case fe:return cn;case le:return ln}return n});var je=xt(function(t){t=Rt(t);var n=[];return xn.test(t)&&n.push(""),t.replace(An,function(t,e,r,o){n.push(r?o.replace(En,"$1"):e||t)}),n});xt.Cache=A;var we=Array.isArray,me=Un?c(Un):Z;e.exports=Ot}).call(n,function(){return this}(),e(40)(t))},function(t,n){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children=[],t.webpackPolyfill=1),t}}]); \ No newline at end of file +!function(t){function n(r){if(e[r])return e[r].exports;var o=e[r]={exports:{},id:r,loaded:!1};return t[r].call(o.exports,o,o.exports,n),o.loaded=!0,o.exports}var e={};return n.m=t,n.c=e,n.p="",n(0)}([function(t,n,e){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}n.__esModule=!0;var o=e(1),u=r(o);n.default=angular.module("ngRedux",[]).provider("$ngRedux",u.default).name},function(t,n,e){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function o(){var t=void 0,n=void 0,e=void 0,r=void 0,o=void 0;this.createStoreWith=function(i,c,a,l){(0,f.default)((0,j.default)(i)||x(i),"The reducer parameter passed to createStoreWith must be a Function or an Object. Instead received %s.","undefined"==typeof i?"undefined":u(i)),(0,f.default)(!a||(0,g.default)(a),"The storeEnhancers parameter passed to createStoreWith must be an Array. Instead received %s.","undefined"==typeof a?"undefined":u(a)),t=i,o=x(i),e=a,n=c||[],r=l},this.$get=function(u){var i=function(t){return E(t)?u.get(t):t},a=(0,m.default)(n,i),f=function(t){return E(t)?u.get(t):t},s=(0,m.default)(e,f);if(o){var d=function(n){return E(t[n])?u.get(t[n]):t[n]},h=function(t,n){var e;return(0,v.default)({},t,(e={},e[n]=d(n),e))},y=Object.keys(t).reduce(h,{});t=(0,l.combineReducers)(y)}var b=s?l.compose.apply(void 0,s)(l.createStore):l.createStore;a.push((0,p.default)(u.get("$rootScope")));var g=r?l.applyMiddleware.apply(void 0,a)(b)(t,r):l.applyMiddleware.apply(void 0,a)(b)(t);return(0,v.default)({},g,{connect:(0,c.default)(g)})},this.$get.$inject=["$injector"]}n.__esModule=!0;var u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};n.default=o;var i=e(2),c=r(i),a=e(27),f=r(a),l=e(5),s=e(44),p=r(s),d=e(35),v=r(d),h=e(45),y=r(h),b=e(32),g=r(b),_=e(33),j=r(_),w=e(46),m=r(w),O=(0,y.default)(function(t,n){return("undefined"==typeof n?"undefined":u(n))===t}),x=O("object"),E=O("string")},function(t,n,e){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function o(t){return function(n,e){var r=n||w,o=(0,v.default)(e)?(0,l.default)(e):e||m;(0,p.default)((0,y.default)(r),"mapStateToTarget must be a Function. Instead received %s.",r),(0,p.default)((0,v.default)(o)||(0,y.default)(o),"mapDispatchToTarget must be a plain Object or a Function. Instead received %s.",o);var c=i(t.getState(),r,!1),f=(0,y.default)(c);f&&(r=c,c=i(t.getState(),r));var s=o(t.dispatch);return function(n){(0,p.default)((0,y.default)(n)||(0,g.default)(n),"The target parameter passed to connect must be a Function or a object."),u(n,c,s);var e=t.subscribe(function(){var e=i(t.getState(),r);(0,a.default)(c,e)||(c=e,u(n,c,s))});return e}}}function u(t,n,e){(0,y.default)(t)?t(n,e):(0,j.default)(t,n,e)}function i(t,n){var e=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=n(t);return e?(0,p.default)((0,v.default)(r),"`mapStateToScope` must return an object. Instead received %s.",r):(0,p.default)((0,v.default)(r)||(0,y.default)(r),"`mapStateToScope` must return an object or a function. Instead received %s.",r),r}n.__esModule=!0,n.default=o;var c=e(3),a=r(c),f=e(4),l=r(f),s=e(27),p=r(s),d=e(28),v=r(d),h=e(33),y=r(h),b=e(34),g=r(b),_=e(35),j=r(_),w=function(){return{}},m=function(t){return{dispatch:t}}},function(t,n){"use strict";function e(t,n){if(t===n)return!0;var e=Object.keys(t).filter(function(t){return"$$hashKey"!==t}),r=Object.keys(n).filter(function(t){return"$$hashKey"!==t});if(e.length!==r.length)return!1;for(var o=Object.prototype.hasOwnProperty,u=0;u1)for(var e=1;e0?"Unexpected "+(i.length>1?"keys":"key")+" "+('"'+i.join('", "')+'" found in '+u+". ")+"Expected to find one of the known reducer keys instead: "+('"'+o.join('", "')+'". Unexpected keys will be ignored.'):void 0}function i(t){Object.keys(t).forEach(function(n){var e=t[n],r=e(void 0,{type:a.ActionTypes.INIT});if("undefined"==typeof r)throw new Error('Reducer "'+n+'" returned undefined during initialization. If the state passed to the reducer is undefined, you must explicitly return the initial state. The initial state may not be undefined.');var o="@@redux/PROBE_UNKNOWN_ACTION_"+Math.random().toString(36).substring(7).split("").join(".");if("undefined"==typeof e(void 0,{type:o}))throw new Error('Reducer "'+n+'" returned undefined when probed with a random type. '+("Don't try to handle "+a.ActionTypes.INIT+' or other actions in "redux/*" ')+"namespace. They are considered private. Instead, you must return the current state for any unknown actions, unless it is undefined, in which case you must return the initial state, regardless of the action type. The initial state may not be undefined.")})}function c(n){for(var e=Object.keys(n),r={},c=0;c-1&&t%1==0&&t<=f}function c(t){var n=typeof t;return!!t&&("object"==n||"function"==n)}function a(t){return!!t&&"object"==typeof t}var f=9007199254740991,l="[object Arguments]",s="[object Function]",p="[object GeneratorFunction]",d=Object.prototype,v=d.hasOwnProperty,h=d.toString,y=d.propertyIsEnumerable;t.exports=e},function(t,n,e){function r(t,n){return t="number"==typeof t||f.test(t)?+t:-1,n=null==n?p:n,t>-1&&t%1==0&&t-1&&t%1==0&&t<=p}function u(t){var n=typeof t;return!!t&&("object"==n||"function"==n)}function i(t){if(null==t)return[];u(t)||(t=Object(t));var n=t.length;n=n&&o(n)&&(a(t)||c(t))&&n||0;for(var e=t.constructor,i=-1,f="function"==typeof e&&e.prototype===t,l=Array(n),p=n>0;++i-1&&t%1==0&&t<=b}function u(t){return i(t)&&v.call(t)==f}function i(t){var n=typeof t;return!!t&&("object"==n||"function"==n)}function c(t){return null!=t&&(u(t)?h.test(p.call(t)):e(t)&&l.test(t))}var a="[object Array]",f="[object Function]",l=/^\[object .+?Constructor\]$/,s=Object.prototype,p=Function.prototype.toString,d=s.hasOwnProperty,v=s.toString,h=RegExp("^"+p.call(d).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),y=r(Array,"isArray"),b=9007199254740991,g=y||function(t){return e(t)&&o(t.length)&&v.call(t)==a};t.exports=g},function(t,n){function e(t){var n=r(t)?c.call(t):"";return n==o||n==u}function r(t){var n=typeof t;return!!t&&("object"==n||"function"==n)}var o="[object Function]",u="[object GeneratorFunction]",i=Object.prototype,c=i.toString;t.exports=e},function(t,n){function e(t){var n=typeof t;return!!t&&("object"==n||"function"==n)}t.exports=e},function(t,n,e){function r(t,n,e){for(var r=-1,o=i(n),u=o.length;++r-1&&t%1==0&&t-1&&t%1==0&&t<=b}function c(t){for(var n=f(t),e=n.length,r=e&&t.length,o=!!r&&i(r)&&(p(t)||s(t)),c=-1,a=[];++c0;++r2?e[i-2]:void 0,a=i>2?e[2]:void 0,f=i>1?e[i-1]:void 0;for("function"==typeof c?(c=o(c,f,5),i-=2):(c="function"==typeof f?f:void 0,i-=c?1:0),a&&u(e[0],e[1],a)&&(c=i<3?void 0:c,i=1);++r-1&&t%1==0&&t-1&&t%1==0&&t<=f}function c(t){var n=typeof t;return!!t&&("object"==n||"function"==n)}var a=/^\d+$/,f=9007199254740991,l=e("length");t.exports=u},function(t,n){function e(t,n){if("function"!=typeof t)throw new TypeError(r);return n=o(void 0===n?t.length-1:+n||0,0),function(){for(var e=arguments,r=-1,u=o(e.length-n,0),i=Array(u);++r-1}function u(t,n,e,r){for(var o=t.length,u=e+(r?1:-1);r?u--:++u1&&S.reverse(),d&&f1?"& ":"")+n[r],n=n.join(e>2?", ":" "),t.replace(st,"{\n/* [wrapped with "+n+"] */\n")}function T(t,n){return n=null==n?et:n,!!n&&("number"==typeof t||gt.test(t))&&t>-1&&t%1==0&&t2?t:void 0}(),Ft=Nt?function(t,n,e){var r=n+"";return Nt(t,"toString",{configurable:!0,enumerable:!1,value:z(A(r,I(S(r),e)))})}:L;P.placeholder={},t.exports=P}).call(n,function(){return this}())},function(t,n,e){(function(t,e){function r(t,n){for(var e=-1,r=t?t.length:0,o=Array(r);++e-1}function x(t,n){var e=this.__data__,r=z(e,t);return r<0?e.push([t,n]):e[r][1]=n,this}function E(t){var n=-1,e=t?t.length:0;for(this.clear();++na))return!1;var l=i.get(t);if(l&&i.get(n))return l==n;var s=-1,p=!0,d=u&Wt?new M:void 0;for(i.set(t,n),i.set(n,t);++s-1&&t%1==0&&t-1&&t%1==0&&t<=Kt}function Mt(t){var n=typeof t;return!!t&&("object"==n||"function"==n)}function It(t){return!!t&&"object"==typeof t}function Pt(t){return"symbol"==typeof t||It(t)&&Kn.call(t)==an}function Nt(t){return null==t?"":rt(t)}function Ft(t,n,e){var r=null==t?void 0:W(t,n);return void 0===r?e:r}function Rt(t,n){return null!=t&&dt(t,n,B)}function Ct(t){return At(t)?V(t):Q(t)}function Dt(t){return t}function Ut(t){return ht(t)?u(wt(t)):et(t)}var Vt=200,zt="Expected a function",Lt="__lodash_hash_undefined__",Wt=1,Gt=2,Bt=1/0,Kt=9007199254740991,qt="[object Arguments]",Yt="[object Array]",Ht="[object Boolean]",Zt="[object Date]",Jt="[object Error]",Qt="[object Function]",Xt="[object GeneratorFunction]",tn="[object Map]",nn="[object Number]",en="[object Object]",rn="[object Promise]",on="[object RegExp]",un="[object Set]",cn="[object String]",an="[object Symbol]",fn="[object WeakMap]",ln="[object ArrayBuffer]",sn="[object DataView]",pn="[object Float32Array]",dn="[object Float64Array]",vn="[object Int8Array]",hn="[object Int16Array]",yn="[object Int32Array]",bn="[object Uint8Array]",gn="[object Uint8ClampedArray]",_n="[object Uint16Array]",jn="[object Uint32Array]",wn=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,mn=/^\w*$/,On=/^\./,xn=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,En=/[\\^$.*+?()[\]{}|]/g,Sn=/\\(\\)?/g,An=/^\[object .+?Constructor\]$/,Tn=/^(?:0|[1-9]\d*)$/,$n={};$n[pn]=$n[dn]=$n[vn]=$n[hn]=$n[yn]=$n[bn]=$n[gn]=$n[_n]=$n[jn]=!0,$n[qt]=$n[Yt]=$n[ln]=$n[Ht]=$n[sn]=$n[Zt]=$n[Jt]=$n[Qt]=$n[tn]=$n[nn]=$n[en]=$n[on]=$n[un]=$n[cn]=$n[fn]=!1;var kn="object"==typeof t&&t&&t.Object===Object&&t,Mn="object"==typeof self&&self&&self.Object===Object&&self,In=kn||Mn||Function("return this")(),Pn="object"==typeof n&&n&&!n.nodeType&&n,Nn=Pn&&"object"==typeof e&&e&&!e.nodeType&&e,Fn=Nn&&Nn.exports===Pn,Rn=Fn&&kn.process,Cn=function(){try{return Rn&&Rn.binding("util")}catch(t){}}(),Dn=Cn&&Cn.isTypedArray,Un=Array.prototype,Vn=Function.prototype,zn=Object.prototype,Ln=In["__core-js_shared__"],Wn=function(){var t=/[^.]+$/.exec(Ln&&Ln.keys&&Ln.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),Gn=Vn.toString,Bn=zn.hasOwnProperty,Kn=zn.toString,qn=RegExp("^"+Gn.call(Bn).replace(En,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Yn=In.Symbol,Hn=In.Uint8Array,Zn=zn.propertyIsEnumerable,Jn=Un.splice,Qn=s(Object.keys,Object),Xn=pt(In,"DataView"),te=pt(In,"Map"),ne=pt(In,"Promise"),ee=pt(In,"Set"),re=pt(In,"WeakMap"),oe=pt(Object,"create"),ue=mt(Xn),ie=mt(te),ce=mt(ne),ae=mt(ee),fe=mt(re),le=Yn?Yn.prototype:void 0,se=le?le.valueOf:void 0,pe=le?le.toString:void 0;d.prototype.clear=v,d.prototype.delete=h,d.prototype.get=y,d.prototype.has=b,d.prototype.set=g,_.prototype.clear=j,_.prototype.delete=w,_.prototype.get=m,_.prototype.has=O,_.prototype.set=x,E.prototype.clear=S,E.prototype.delete=A,E.prototype.get=T,E.prototype.has=$,E.prototype.set=k,M.prototype.add=M.prototype.push=I,M.prototype.has=P,N.prototype.clear=F,N.prototype.delete=R,N.prototype.get=C,N.prototype.has=D,N.prototype.set=U;var de=ut(L),ve=it(),he=G;(Xn&&he(new Xn(new ArrayBuffer(1)))!=sn||te&&he(new te)!=tn||ne&&he(ne.resolve())!=rn||ee&&he(new ee)!=un||re&&he(new re)!=fn)&&(he=function(t){var n=Kn.call(t),e=n==en?t.constructor:void 0,r=e?mt(e):void 0;if(r)switch(r){case ue:return sn;case ie:return tn;case ce:return rn;case ae:return un;case fe:return fn}return n});var ye=xt(function(t){t=Nt(t);var n=[];return On.test(t)&&n.push(""),t.replace(xn,function(t,e,r,o){n.push(r?o.replace(Sn,"$1"):e||t)}),n});xt.Cache=E;var be=Array.isArray,ge=Dn?c(Dn):Z;e.exports=Ot}).call(n,function(){return this}(),e(20)(t))}]); \ No newline at end of file diff --git a/src/components/ngRedux.js b/src/components/ngRedux.js index 3795279..0ea2335 100644 --- a/src/components/ngRedux.js +++ b/src/components/ngRedux.js @@ -1,6 +1,6 @@ import Connector from './connector'; import invariant from 'invariant'; -import {createStore, applyMiddleware, compose, combineReducers} from 'redux'; +import { createStore, applyMiddleware, compose, combineReducers } from 'redux'; import digestMiddleware from './digestMiddleware'; import assign from 'lodash.assign'; @@ -53,7 +53,7 @@ export default function ngReduxProvider() { const resolvedStoreEnhancer = map(_storeEnhancers, resolveStoreEnhancer); - if(_reducerIsObject) { + if (_reducerIsObject) { const getReducerKey = key => isString(_reducer[key]) ? $injector.get(_reducer[key]) : _reducer[key]; @@ -78,7 +78,8 @@ export default function ngReduxProvider() { ? applyMiddleware(...resolvedMiddleware)(finalCreateStore)(_reducer, _initialState) : applyMiddleware(...resolvedMiddleware)(finalCreateStore)(_reducer); - return assign({}, store, { connect: Connector(store) }); + store.connect = Connector(store); + return store; }; this.$get.$inject = ['$injector'];