diff --git a/CHANGELOG.md b/CHANGELOG.md index 120c1dc..efa3dcd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +## 1.3.0 (December 31, 2015) + +- **[NEW]** Store hot-reloading via `reactor.replaceStores(stores)` which replaces the implementation of a store without resetting its underlying state value. See [hot reloading example](https://github.com/optimizely/nuclear-js/tree/master/examples/hot-reloading). +- **[NEW]** Support for more granular options for logging and triggering invariants in the NuclearJS runtime. See [API Docs](https://github.com/optimizely/nuclear-js/blob/master/docs/src/docs/07-api.md) for details. + ## 1.2.1 (November 5, 2015) - **[FIXED]** Observers of the entire app state not triggering on actions from a late registered store diff --git a/TODO.md b/TODO.md index ceb0c57..636b989 100644 --- a/TODO.md +++ b/TODO.md @@ -3,7 +3,7 @@ TODO for `1.3.0` - [x] add documentation for all new reactor options - [x] add tests for all new reactor options - - [ ] link the nuclear-js package from the hot reloadable example + - [x] link the nuclear-js package from the hot reloadable example - [ ] link `0.3.0` of `nuclear-js-react-addons` in hot reloadable example - [ ] add `nuclear-js-react-addons` link in example and documentation - [ ] publish doc site diff --git a/bower.json b/bower.json index b0b4959..396ab8f 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "nuclear-js", - "version": "1.2.1", + "version": "1.3.0", "homepage": "https://github.com/optimizely/nuclear-js", "authors": [ "Jordan Garcia" diff --git a/dist/nuclear.js b/dist/nuclear.js index 51721c2..68a25ed 100644 --- a/dist/nuclear.js +++ b/dist/nuclear.js @@ -5487,6 +5487,8 @@ return /******/ (function(modules) { // webpackBootstrap var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); + function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } } + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } @@ -5503,7 +5505,7 @@ return /******/ (function(modules) { // webpackBootstrap var _reactorFns = __webpack_require__(8); - var _reactorFns2 = _interopRequireDefault(_reactorFns); + var fns = _interopRequireWildcard(_reactorFns); var _keyPath = __webpack_require__(11); @@ -5531,8 +5533,12 @@ return /******/ (function(modules) { // webpackBootstrap _classCallCheck(this, Reactor); + var debug = !!config.debug; + var baseOptions = debug ? _reactorRecords.DEBUG_OPTIONS : _reactorRecords.PROD_OPTIONS; var initialReactorState = new _reactorRecords.ReactorState({ - debug: config.debug + debug: debug, + // merge config options with the defaults + options: baseOptions.merge(config.options || {}) }); this.prevReactorState = initialReactorState; @@ -5557,7 +5563,7 @@ return /******/ (function(modules) { // webpackBootstrap _createClass(Reactor, [{ key: 'evaluate', value: function evaluate(keyPathOrGetter) { - var _fns$evaluate = _reactorFns2['default'].evaluate(this.reactorState, keyPathOrGetter); + var _fns$evaluate = fns.evaluate(this.reactorState, keyPathOrGetter); var result = _fns$evaluate.result; var reactorState = _fns$evaluate.reactorState; @@ -5603,14 +5609,14 @@ return /******/ (function(modules) { // webpackBootstrap getter = []; } - var _fns$addObserver = _reactorFns2['default'].addObserver(this.observerState, getter, handler); + var _fns$addObserver = fns.addObserver(this.observerState, getter, handler); var observerState = _fns$addObserver.observerState; var entry = _fns$addObserver.entry; this.observerState = observerState; return function () { - _this.observerState = _reactorFns2['default'].removeObserverByEntry(_this.observerState, entry); + _this.observerState = fns.removeObserverByEntry(_this.observerState, entry); }; } }, { @@ -5623,7 +5629,7 @@ return /******/ (function(modules) { // webpackBootstrap throw new Error('Must call unobserve with a Getter'); } - this.observerState = _reactorFns2['default'].removeObserver(this.observerState, getter, handler); + this.observerState = fns.removeObserver(this.observerState, getter, handler); } /** @@ -5635,15 +5641,17 @@ return /******/ (function(modules) { // webpackBootstrap key: 'dispatch', value: function dispatch(actionType, payload) { if (this.__batchDepth === 0) { - if (this.__isDispatching) { - this.__isDispatching = false; - throw new Error('Dispatch may not be called while a dispatch is in progress'); + if (fns.getOption(this.reactorState, 'throwOnDispatchInDispatch')) { + if (this.__isDispatching) { + this.__isDispatching = false; + throw new Error('Dispatch may not be called while a dispatch is in progress'); + } } this.__isDispatching = true; } try { - this.reactorState = _reactorFns2['default'].dispatch(this.reactorState, actionType, payload); + this.reactorState = fns.dispatch(this.reactorState, actionType, payload); } catch (e) { this.__isDispatching = false; throw e; @@ -5683,15 +5691,26 @@ return /******/ (function(modules) { // webpackBootstrap } /** - * @param {Store[]} stores + * @param {Object} stores */ }, { key: 'registerStores', value: function registerStores(stores) { - this.reactorState = _reactorFns2['default'].registerStores(this.reactorState, stores); + this.reactorState = fns.registerStores(this.reactorState, stores); this.__notify(); } + /** + * Replace store implementation (handlers) without modifying the app state or calling getInitialState + * Useful for hot reloading + * @param {Object} stores + */ + }, { + key: 'replaceStores', + value: function replaceStores(stores) { + this.reactorState = fns.replaceStores(this.reactorState, stores); + } + /** * Returns a plain object representing the application state * @return {Object} @@ -5699,7 +5718,7 @@ return /******/ (function(modules) { // webpackBootstrap }, { key: 'serialize', value: function serialize() { - return _reactorFns2['default'].serialize(this.reactorState); + return fns.serialize(this.reactorState); } /** @@ -5708,7 +5727,7 @@ return /******/ (function(modules) { // webpackBootstrap }, { key: 'loadState', value: function loadState(state) { - this.reactorState = _reactorFns2['default'].loadState(this.reactorState, state); + this.reactorState = fns.loadState(this.reactorState, state); this.__notify(); } @@ -5718,7 +5737,7 @@ return /******/ (function(modules) { // webpackBootstrap }, { key: 'reset', value: function reset() { - var newState = _reactorFns2['default'].reset(this.reactorState); + var newState = fns.reset(this.reactorState); this.reactorState = newState; this.prevReactorState = newState; this.observerState = new _reactorRecords.ObserverState(); @@ -5766,8 +5785,8 @@ return /******/ (function(modules) { // webpackBootstrap var getter = entry.get('getter'); var handler = entry.get('handler'); - var prevEvaluateResult = _reactorFns2['default'].evaluate(_this2.prevReactorState, getter); - var currEvaluateResult = _reactorFns2['default'].evaluate(_this2.reactorState, getter); + var prevEvaluateResult = fns.evaluate(_this2.prevReactorState, getter); + var currEvaluateResult = fns.evaluate(_this2.reactorState, getter); _this2.prevReactorState = prevEvaluateResult.reactorState; _this2.reactorState = currEvaluateResult.reactorState; @@ -5780,7 +5799,7 @@ return /******/ (function(modules) { // webpackBootstrap } }); - var nextReactorState = _reactorFns2['default'].resetDirtyStores(this.reactorState); + var nextReactorState = fns.resetDirtyStores(this.reactorState); this.prevReactorState = nextReactorState; this.reactorState = nextReactorState; @@ -5890,6 +5909,22 @@ return /******/ (function(modules) { // webpackBootstrap 'use strict'; + Object.defineProperty(exports, '__esModule', { + value: true + }); + exports.registerStores = registerStores; + exports.replaceStores = replaceStores; + exports.dispatch = dispatch; + exports.loadState = loadState; + exports.addObserver = addObserver; + exports.getOption = getOption; + exports.removeObserver = removeObserver; + exports.removeObserverByEntry = removeObserverByEntry; + exports.reset = reset; + exports.evaluate = evaluate; + exports.serialize = serialize; + exports.resetDirtyStores = resetDirtyStores; + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } var _immutable = __webpack_require__(3); @@ -5925,9 +5960,8 @@ return /******/ (function(modules) { // webpackBootstrap * @param {Object} stores * @return {ReactorState} */ - exports.registerStores = function (reactorState, stores) { - var debug = reactorState.get('debug'); + function registerStores(reactorState, stores) { return reactorState.withMutations(function (reactorState) { (0, _utils.each)(stores, function (store, id) { if (reactorState.getIn(['stores', id])) { @@ -5938,7 +5972,10 @@ return /******/ (function(modules) { // webpackBootstrap var initialState = store.getInitialState(); - if (debug && !(0, _immutableHelpers.isImmutableValue)(initialState)) { + if (initialState === undefined && getOption(reactorState, 'throwOnUndefinedStoreReturnValue')) { + throw new Error('Store getInitialState() must return a value, did you forget a return statement'); + } + if (getOption(reactorState, 'throwOnNonImmutableStore') && !(0, _immutableHelpers.isImmutableValue)(initialState)) { throw new Error('Store getInitialState() must return an immutable value, did you forget to call toImmutable'); } @@ -5954,7 +5991,25 @@ return /******/ (function(modules) { // webpackBootstrap }); incrementId(reactorState); }); - }; + } + + /** + * Overrides the store implementation without resetting the value of that particular part of the app state + * this is useful when doing hot reloading of stores. + * @param {ReactorState} reactorState + * @param {Object} stores + * @return {ReactorState} + */ + + function replaceStores(reactorState, stores) { + return reactorState.withMutations(function (reactorState) { + (0, _utils.each)(stores, function (store, id) { + reactorState.update('stores', function (stores) { + return stores.set(id, store); + }); + }); + }); + } /** * @param {ReactorState} reactorState @@ -5962,15 +6017,17 @@ return /******/ (function(modules) { // webpackBootstrap * @param {*} payload * @return {ReactorState} */ - exports.dispatch = function (reactorState, actionType, payload) { + + function dispatch(reactorState, actionType, payload) { + if (actionType === undefined && getOption(reactorState, 'throwOnUndefinedActionType')) { + throw new Error('`dispatch` cannot be called with an `undefined` action type.'); + } + var currState = reactorState.get('state'); - var debug = reactorState.get('debug'); var dirtyStores = reactorState.get('dirtyStores'); var nextState = currState.withMutations(function (state) { - if (debug) { - _logging2['default'].dispatchStart(actionType, payload); - } + _logging2['default'].dispatchStart(reactorState, actionType, payload); // let each store handle the message reactorState.get('stores').forEach(function (store, id) { @@ -5981,13 +6038,13 @@ return /******/ (function(modules) { // webpackBootstrap newState = store.handle(currState, actionType, payload); } catch (e) { // ensure console.group is properly closed - _logging2['default'].dispatchError(e.message); + _logging2['default'].dispatchError(reactorState, e.message); throw e; } - if (debug && newState === undefined) { + if (newState === undefined && getOption(reactorState, 'throwOnUndefinedStoreReturnValue')) { var errorMsg = 'Store handler must return a value, did you forget a return statement'; - _logging2['default'].dispatchError(errorMsg); + _logging2['default'].dispatchError(reactorState, errorMsg); throw new Error(errorMsg); } @@ -5997,15 +6054,9 @@ return /******/ (function(modules) { // webpackBootstrap // if the store state changed add store to list of dirty stores dirtyStores = dirtyStores.add(id); } - - if (debug) { - _logging2['default'].storeHandled(id, currState, newState); - } }); - if (debug) { - _logging2['default'].dispatchEnd(state); - } + _logging2['default'].dispatchEnd(reactorState, state, dirtyStores); }); var nextReactorState = reactorState.set('state', nextState).set('dirtyStores', dirtyStores).update('storeStates', function (storeStates) { @@ -6013,14 +6064,15 @@ return /******/ (function(modules) { // webpackBootstrap }); return incrementId(nextReactorState); - }; + } /** * @param {ReactorState} reactorState * @param {Immutable.Map} state * @return {ReactorState} */ - exports.loadState = function (reactorState, state) { + + function loadState(reactorState, state) { var dirtyStores = []; var stateToLoad = (0, _immutableHelpers.toImmutable)({}).withMutations(function (stateToLoad) { (0, _utils.each)(state, function (serializedStoreState, storeId) { @@ -6043,7 +6095,7 @@ return /******/ (function(modules) { // webpackBootstrap }).update('storeStates', function (storeStates) { return incrementStoreStates(storeStates, dirtyStores); }); - }; + } /** * Adds a change observer whenever a certain part of the reactor state changes @@ -6062,7 +6114,8 @@ return /******/ (function(modules) { // webpackBootstrap * @param {function} handler * @return {ObserveResult} */ - exports.addObserver = function (observerState, getter, handler) { + + function addObserver(observerState, getter, handler) { // use the passed in getter as the key so we can rely on a byreference call for unobserve var getterKey = getter; if ((0, _keyPath.isKeyPath)(getter)) { @@ -6090,7 +6143,7 @@ return /******/ (function(modules) { // webpackBootstrap storeDeps.forEach(function (storeId) { var path = ['stores', storeId]; if (!map.hasIn(path)) { - map.setIn(path, _immutable2['default'].Set([])); + map.setIn(path, _immutable2['default'].Set()); } map.updateIn(['stores', storeId], function (observerIds) { return observerIds.add(currId); @@ -6105,7 +6158,21 @@ return /******/ (function(modules) { // webpackBootstrap observerState: updatedObserverState, entry: entry }; - }; + } + + /** + * @param {ReactorState} reactorState + * @param {String} option + * @return {Boolean} + */ + + function getOption(reactorState, option) { + var value = reactorState.getIn(['options', option]); + if (value === undefined) { + throw new Error('Invalid option: ' + option); + } + return value; + } /** * Use cases @@ -6120,7 +6187,8 @@ return /******/ (function(modules) { // webpackBootstrap * @param {Function} handler * @return {ObserverState} */ - exports.removeObserver = function (observerState, getter, handler) { + + function removeObserver(observerState, getter, handler) { var entriesToRemove = observerState.get('observersMap').filter(function (entry) { // use the getterKey in the case of a keyPath is transformed to a getter in addObserver var entryGetter = entry.get('getterKey'); @@ -6138,10 +6206,10 @@ return /******/ (function(modules) { // webpackBootstrap return observerState.withMutations(function (map) { entriesToRemove.forEach(function (entry) { - return exports.removeObserverByEntry(map, entry); + return removeObserverByEntry(map, entry); }); }); - }; + } /** * Removes an observer entry by id from the observerState @@ -6149,7 +6217,8 @@ return /******/ (function(modules) { // webpackBootstrap * @param {Immutable.Map} entry * @return {ObserverState} */ - exports.removeObserverByEntry = function (observerState, entry) { + + function removeObserverByEntry(observerState, entry) { return observerState.withMutations(function (map) { var id = entry.get('id'); var storeDeps = entry.get('storeDeps'); @@ -6172,14 +6241,14 @@ return /******/ (function(modules) { // webpackBootstrap map.removeIn(['observersMap', id]); }); - }; + } /** * @param {ReactorState} reactorState * @return {ReactorState} */ - exports.reset = function (reactorState) { - var debug = reactorState.get('debug'); + + function reset(reactorState) { var prevState = reactorState.get('state'); return reactorState.withMutations(function (reactorState) { @@ -6188,10 +6257,10 @@ return /******/ (function(modules) { // webpackBootstrap storeMap.forEach(function (store, id) { var storeState = prevState.get(id); var resetStoreState = store.handleReset(storeState); - if (debug && resetStoreState === undefined) { + if (resetStoreState === undefined && getOption(reactorState, 'throwOnUndefinedStoreReturnValue')) { throw new Error('Store handleReset() must return a value, did you forget a return statement'); } - if (debug && !(0, _immutableHelpers.isImmutableValue)(resetStoreState)) { + if (getOption(reactorState, 'throwOnNonImmutableStore') && !(0, _immutableHelpers.isImmutableValue)(resetStoreState)) { throw new Error('Store reset state must be an immutable value, did you forget to call toImmutable'); } reactorState.setIn(['state', id], resetStoreState); @@ -6200,16 +6269,17 @@ return /******/ (function(modules) { // webpackBootstrap reactorState.update('storeStates', function (storeStates) { return incrementStoreStates(storeStates, storeIds); }); - exports.resetDirtyStores(reactorState); + resetDirtyStores(reactorState); }); - }; + } /** * @param {ReactorState} reactorState * @param {KeyPath|Gettter} keyPathOrGetter * @return {EvaluateResult} */ - exports.evaluate = function evaluate(reactorState, keyPathOrGetter) { + + function evaluate(reactorState, keyPathOrGetter) { var state = reactorState.get('state'); if ((0, _keyPath.isKeyPath)(keyPathOrGetter)) { @@ -6233,14 +6303,15 @@ return /******/ (function(modules) { // webpackBootstrap var evaluatedValue = (0, _getter.getComputeFn)(keyPathOrGetter).apply(null, args); return evaluateResult(evaluatedValue, cacheValue(reactorState, keyPathOrGetter, evaluatedValue)); - }; + } /** * Returns serialized state for all stores * @param {ReactorState} reactorState * @return {Object} */ - exports.serialize = function (reactorState) { + + function serialize(reactorState) { var serialized = {}; reactorState.get('stores').forEach(function (store, id) { var storeState = reactorState.getIn(['state', id]); @@ -6250,16 +6321,17 @@ return /******/ (function(modules) { // webpackBootstrap } }); return serialized; - }; + } /** * Returns serialized state for all stores * @param {ReactorState} reactorState * @return {ReactorState} */ - exports.resetDirtyStores = function (reactorState) { + + function resetDirtyStores(reactorState) { return reactorState.set('dirtyStores', _immutable2['default'].Set()); - }; + } /** * Currently cache keys are always getters by reference @@ -6361,15 +6433,24 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, /* 9 */ -/***/ function(module, exports) { +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + var _reactorFns = __webpack_require__(8); /* eslint-disable no-console */ /** * Wraps a Reactor.react invocation in a console.group + * @param {ReactorState} reactorState + * @param {String} type + * @param {*} payload */ - 'use strict'; + exports.dispatchStart = function (reactorState, type, payload) { + if (!(0, _reactorFns.getOption)(reactorState, 'logDispatches')) { + return; + } - exports.dispatchStart = function (type, payload) { if (console.group) { console.groupCollapsed('Dispatch: %s', type); console.group('payload'); @@ -6378,24 +6459,30 @@ return /******/ (function(modules) { // webpackBootstrap } }; - exports.dispatchError = function (error) { + exports.dispatchError = function (reactorState, error) { + if (!(0, _reactorFns.getOption)(reactorState, 'logDispatches')) { + return; + } + if (console.group) { console.debug('Dispatch error: ' + error); console.groupEnd(); } }; - exports.storeHandled = function (id, before, after) { - if (console.group) { - if (before !== after) { - console.debug('Store ' + id + ' handled action'); - } + exports.dispatchEnd = function (reactorState, state, dirtyStores) { + if (!(0, _reactorFns.getOption)(reactorState, 'logDispatches')) { + return; } - }; - exports.dispatchEnd = function (state) { if (console.group) { - console.debug('Dispatch done, new state: ', state.toJS()); + if ((0, _reactorFns.getOption)(reactorState, 'logDirtyStores')) { + console.log('Stores updated:', dirtyStores.toList().toJS()); + } + + if ((0, _reactorFns.getOption)(reactorState, 'logAppState')) { + console.debug('Dispatch done, new state: ', state.toJS()); + } console.groupEnd(); } }; @@ -6588,39 +6675,69 @@ return /******/ (function(modules) { // webpackBootstrap value: true }); - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - var _immutable = __webpack_require__(3); - var _immutable2 = _interopRequireDefault(_immutable); + var PROD_OPTIONS = (0, _immutable.Map)({ + // logs information for each dispatch + logDispatches: false, + // log the entire app state after each dispatch + logAppState: false, + // logs what stores changed after a dispatch + logDirtyStores: false, + // if true, throws an error when dispatching an `undefined` actionType + throwOnUndefinedActionType: false, + // if true, throws an error if a store returns undefined + throwOnUndefinedStoreReturnValue: false, + // if true, throws an error if a store.getInitialState() returns a non immutable value + throwOnNonImmutableStore: false, + // if true, throws when dispatching in dispatch + throwOnDispatchInDispatch: false + }); - var ReactorState = _immutable2['default'].Record({ + exports.PROD_OPTIONS = PROD_OPTIONS; + var DEBUG_OPTIONS = (0, _immutable.Map)({ + // logs information for each dispatch + logDispatches: true, + // log the entire app state after each dispatch + logAppState: true, + // logs what stores changed after a dispatch + logDirtyStores: true, + // if true, throws an error when dispatching an `undefined` actionType + throwOnUndefinedActionType: true, + // if true, throws an error if a store returns undefined + throwOnUndefinedStoreReturnValue: true, + // if true, throws an error if a store.getInitialState() returns a non immutable value + throwOnNonImmutableStore: true, + // if true, throws when dispatching in dispatch + throwOnDispatchInDispatch: true + }); + + exports.DEBUG_OPTIONS = DEBUG_OPTIONS; + var ReactorState = (0, _immutable.Record)({ dispatchId: 0, - state: _immutable2['default'].Map(), - stores: _immutable2['default'].Map(), - cache: _immutable2['default'].Map(), + state: (0, _immutable.Map)(), + stores: (0, _immutable.Map)(), + cache: (0, _immutable.Map)(), // maintains a mapping of storeId => state id (monotomically increasing integer whenever store state changes) - storeStates: _immutable2['default'].Map(), - dirtyStores: _immutable2['default'].Set(), - debug: false + storeStates: (0, _immutable.Map)(), + dirtyStores: (0, _immutable.Set)(), + debug: false, + // production defaults + options: PROD_OPTIONS }); - var ObserverState = _immutable2['default'].Record({ + exports.ReactorState = ReactorState; + var ObserverState = (0, _immutable.Record)({ // observers registered to any store change - any: _immutable2['default'].Set([]), + any: (0, _immutable.Set)(), // observers registered to specific store changes - stores: _immutable2['default'].Map({}), + stores: (0, _immutable.Map)({}), - observersMap: _immutable2['default'].Map({}), + observersMap: (0, _immutable.Map)({}), nextId: 1 }); - - exports['default'] = { - ReactorState: ReactorState, - ObserverState: ObserverState - }; - module.exports = exports['default']; + exports.ObserverState = ObserverState; /***/ } /******/ ]) diff --git a/dist/nuclear.min.js b/dist/nuclear.min.js index ff511e9..68fc1f8 100644 --- a/dist/nuclear.min.js +++ b/dist/nuclear.min.js @@ -1,3 +1,3 @@ -!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.Nuclear=e():t.Nuclear=e()}(this,function(){return function(t){function e(n){if(r[n])return r[n].exports;var i=r[n]={exports:{},id:n,loaded:!1};return t[n].call(i.exports,i,i.exports,e),i.loaded=!0,i.exports}var r={};return e.m=t,e.c=r,e.p="",e(0)}([function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0}),r(1);var i=r(2),o=n(i),u=r(6),a=n(u),s=r(3),c=n(s),f=r(5),h=r(11),p=r(10),l=r(7),_=n(l);e["default"]={Reactor:a["default"],Store:o["default"],Immutable:c["default"],isKeyPath:h.isKeyPath,isGetter:p.isGetter,toJS:f.toJS,toImmutable:f.toImmutable,isImmutable:f.isImmutable,createReactMixin:_["default"]},t.exports=e["default"]},function(t,e){"use strict";try{window.console&&console.log||(console={log:function(){},debug:function(){},info:function(){},warn:function(){},error:function(){}})}catch(r){}},function(t,e,r){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t){return t instanceof c}Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function t(t,e){for(var r=0;ri;i++)n[i]=t[i+e];return n}function o(t){return void 0===t.size&&(t.size=t.__iterate(a)),t.size}function u(t,e){if("number"!=typeof e){var r=+e;if(""+r!==e)return NaN;e=r}return 0>e?o(t)+e:e}function a(){return!0}function s(t,e,r){return(0===t||void 0!==r&&-r>=t)&&(void 0===e||void 0!==r&&e>=r)}function c(t,e){return h(t,e,0)}function f(t,e){return h(t,e,e)}function h(t,e,r){return void 0===t?r:0>t?Math.max(0,e+t):void 0===e?t:Math.min(e,t)}function p(t){return d(t)?t:x(t)}function l(t){return y(t)?t:q(t)}function _(t){return g(t)?t:k(t)}function v(t){return d(t)&&!m(t)?t:A(t)}function d(t){return!(!t||!t[_r])}function y(t){return!(!t||!t[vr])}function g(t){return!(!t||!t[dr])}function m(t){return y(t)||g(t)}function w(t){return!(!t||!t[yr])}function S(t){this.next=t}function b(t,e,r,n){var i=0===t?e:1===t?r:[e,r];return n?n.value=i:n={value:i,done:!1},n}function I(){return{value:void 0,done:!0}}function z(t){return!!E(t)}function M(t){return t&&"function"==typeof t.next}function D(t){var e=E(t);return e&&e.call(t)}function E(t){var e=t&&(Sr&&t[Sr]||t[br]);return"function"==typeof e?e:void 0}function O(t){return t&&"number"==typeof t.length}function x(t){return null===t||void 0===t?L():d(t)?t.toSeq():J(t)}function q(t){return null===t||void 0===t?L().toKeyedSeq():d(t)?y(t)?t.toSeq():t.fromEntrySeq():T(t)}function k(t){return null===t||void 0===t?L():d(t)?y(t)?t.entrySeq():t.toIndexedSeq():B(t)}function A(t){return(null===t||void 0===t?L():d(t)?y(t)?t.entrySeq():t:B(t)).toSetSeq()}function j(t){this._array=t,this.size=t.length}function R(t){var e=Object.keys(t);this._object=t,this._keys=e,this.size=e.length}function K(t){this._iterable=t,this.size=t.length||t.size}function P(t){this._iterator=t,this._iteratorCache=[]}function U(t){return!(!t||!t[zr])}function L(){return Mr||(Mr=new j([]))}function T(t){var e=Array.isArray(t)?new j(t).fromEntrySeq():M(t)?new P(t).fromEntrySeq():z(t)?new K(t).fromEntrySeq():"object"==typeof t?new R(t):void 0;if(!e)throw new TypeError("Expected Array or iterable object of [k, v] entries, or keyed object: "+t);return e}function B(t){var e=W(t);if(!e)throw new TypeError("Expected Array or iterable object of values: "+t);return e}function J(t){var e=W(t)||"object"==typeof t&&new R(t);if(!e)throw new TypeError("Expected Array or iterable object of values, or keyed object: "+t);return e}function W(t){return O(t)?new j(t):M(t)?new P(t):z(t)?new K(t):void 0}function C(t,e,r,n){var i=t._cache;if(i){for(var o=i.length-1,u=0;o>=u;u++){var a=i[r?o-u:u];if(e(a[1],n?a[0]:u,t)===!1)return u+1}return u}return t.__iterateUncached(e,r)}function F(t,e,r,n){var i=t._cache;if(i){var o=i.length-1,u=0;return new S(function(){var t=i[r?o-u:u];return u++>o?I():b(e,n?t[0]:u-1,t[1])})}return t.__iteratorUncached(e,r)}function N(){throw TypeError("Abstract")}function G(){}function H(){}function V(){}function X(t,e){if(t===e||t!==t&&e!==e)return!0;if(!t||!e)return!1;if("function"==typeof t.valueOf&&"function"==typeof e.valueOf){if(t=t.valueOf(),e=e.valueOf(),t===e||t!==t&&e!==e)return!0;if(!t||!e)return!1}return"function"==typeof t.equals&&"function"==typeof e.equals&&t.equals(e)?!0:!1}function Y(t,e){return e?Q(e,t,"",{"":t}):Z(t)}function Q(t,e,r,n){return Array.isArray(e)?t.call(n,r,k(e).map(function(r,n){return Q(t,r,n,e)})):$(e)?t.call(n,r,q(e).map(function(r,n){return Q(t,r,n,e)})):e}function Z(t){return Array.isArray(t)?k(t).map(Z).toList():$(t)?q(t).map(Z).toMap():t}function $(t){return t&&(t.constructor===Object||void 0===t.constructor)}function tt(t){return t>>>1&1073741824|3221225471&t}function et(t){if(t===!1||null===t||void 0===t)return 0;if("function"==typeof t.valueOf&&(t=t.valueOf(),t===!1||null===t||void 0===t))return 0;if(t===!0)return 1;var e=typeof t;if("number"===e){var r=0|t;for(r!==t&&(r^=4294967295*t);t>4294967295;)t/=4294967295,r^=t;return tt(r)}return"string"===e?t.length>jr?rt(t):nt(t):"function"==typeof t.hashCode?t.hashCode():it(t)}function rt(t){var e=Pr[t];return void 0===e&&(e=nt(t),Kr===Rr&&(Kr=0,Pr={}),Kr++,Pr[t]=e),e}function nt(t){for(var e=0,r=0;r0)switch(t.nodeType){case 1:return t.uniqueID;case 9:return t.documentElement&&t.documentElement.uniqueID}}function ut(t,e){if(!t)throw new Error(e)}function at(t){ut(t!==1/0,"Cannot perform this action with an infinite size.")}function st(t,e){this._iter=t,this._useKeys=e,this.size=t.size}function ct(t){this._iter=t,this.size=t.size}function ft(t){this._iter=t,this.size=t.size}function ht(t){this._iter=t,this.size=t.size}function pt(t){var e=jt(t);return e._iter=t,e.size=t.size,e.flip=function(){return t},e.reverse=function(){var e=t.reverse.apply(this);return e.flip=function(){return t.reverse()},e},e.has=function(e){return t.includes(e)},e.includes=function(e){return t.has(e)},e.cacheResult=Rt,e.__iterateUncached=function(e,r){var n=this;return t.__iterate(function(t,r){return e(r,t,n)!==!1},r)},e.__iteratorUncached=function(e,r){if(e===wr){var n=t.__iterator(e,r);return new S(function(){var t=n.next();if(!t.done){var e=t.value[0];t.value[0]=t.value[1],t.value[1]=e}return t})}return t.__iterator(e===mr?gr:mr,r)},e}function lt(t,e,r){var n=jt(t);return n.size=t.size,n.has=function(e){return t.has(e)},n.get=function(n,i){var o=t.get(n,hr);return o===hr?i:e.call(r,o,n,t)},n.__iterateUncached=function(n,i){var o=this;return t.__iterate(function(t,i,u){return n(e.call(r,t,i,u),i,o)!==!1},i)},n.__iteratorUncached=function(n,i){var o=t.__iterator(wr,i);return new S(function(){var i=o.next();if(i.done)return i;var u=i.value,a=u[0];return b(n,a,e.call(r,u[1],a,t),i)})},n}function _t(t,e){var r=jt(t);return r._iter=t,r.size=t.size,r.reverse=function(){return t},t.flip&&(r.flip=function(){var e=pt(t);return e.reverse=function(){return t.flip()},e}),r.get=function(r,n){return t.get(e?r:-1-r,n)},r.has=function(r){return t.has(e?r:-1-r)},r.includes=function(e){return t.includes(e)},r.cacheResult=Rt,r.__iterate=function(e,r){var n=this;return t.__iterate(function(t,r){return e(t,r,n)},!r)},r.__iterator=function(e,r){return t.__iterator(e,!r)},r}function vt(t,e,r,n){var i=jt(t);return n&&(i.has=function(n){var i=t.get(n,hr);return i!==hr&&!!e.call(r,i,n,t)},i.get=function(n,i){var o=t.get(n,hr);return o!==hr&&e.call(r,o,n,t)?o:i}),i.__iterateUncached=function(i,o){var u=this,a=0;return t.__iterate(function(t,o,s){return e.call(r,t,o,s)?(a++,i(t,n?o:a-1,u)):void 0},o),a},i.__iteratorUncached=function(i,o){var u=t.__iterator(wr,o),a=0;return new S(function(){for(;;){var o=u.next();if(o.done)return o;var s=o.value,c=s[0],f=s[1];if(e.call(r,f,c,t))return b(i,n?c:a++,f,o)}})},i}function dt(t,e,r){var n=Ut().asMutable();return t.__iterate(function(i,o){n.update(e.call(r,i,o,t),0,function(t){return t+1})}),n.asImmutable()}function yt(t,e,r){var n=y(t),i=(w(t)?Ie():Ut()).asMutable();t.__iterate(function(o,u){i.update(e.call(r,o,u,t),function(t){return t=t||[],t.push(n?[u,o]:o),t})});var o=At(t);return i.map(function(e){return xt(t,o(e))})}function gt(t,e,r,n){var i=t.size;if(void 0!==e&&(e=0|e),void 0!==r&&(r=0|r),s(e,r,i))return t;var o=c(e,i),a=f(r,i);if(o!==o||a!==a)return gt(t.toSeq().cacheResult(),e,r,n);var h,p=a-o;p===p&&(h=0>p?0:p);var l=jt(t);return l.size=0===h?h:t.size&&h||void 0,!n&&U(t)&&h>=0&&(l.get=function(e,r){return e=u(this,e),e>=0&&h>e?t.get(e+o,r):r}),l.__iterateUncached=function(e,r){var i=this;if(0===h)return 0;if(r)return this.cacheResult().__iterate(e,r);var u=0,a=!0,s=0;return t.__iterate(function(t,r){return a&&(a=u++h)return I();var t=i.next();return n||e===mr?t:e===gr?b(e,a-1,void 0,t):b(e,a-1,t.value[1],t)})},l}function mt(t,e,r){var n=jt(t);return n.__iterateUncached=function(n,i){var o=this;if(i)return this.cacheResult().__iterate(n,i);var u=0;return t.__iterate(function(t,i,a){return e.call(r,t,i,a)&&++u&&n(t,i,o)}),u},n.__iteratorUncached=function(n,i){var o=this;if(i)return this.cacheResult().__iterator(n,i);var u=t.__iterator(wr,i),a=!0;return new S(function(){if(!a)return I();var t=u.next();if(t.done)return t;var i=t.value,s=i[0],c=i[1];return e.call(r,c,s,o)?n===wr?t:b(n,s,c,t):(a=!1,I())})},n}function wt(t,e,r,n){var i=jt(t);return i.__iterateUncached=function(i,o){var u=this;if(o)return this.cacheResult().__iterate(i,o);var a=!0,s=0;return t.__iterate(function(t,o,c){return a&&(a=e.call(r,t,o,c))?void 0:(s++,i(t,n?o:s-1,u))}),s},i.__iteratorUncached=function(i,o){var u=this;if(o)return this.cacheResult().__iterator(i,o);var a=t.__iterator(wr,o),s=!0,c=0;return new S(function(){var t,o,f;do{if(t=a.next(),t.done)return n||i===mr?t:i===gr?b(i,c++,void 0,t):b(i,c++,t.value[1],t);var h=t.value;o=h[0],f=h[1],s&&(s=e.call(r,f,o,u))}while(s);return i===wr?t:b(i,o,f,t)})},i}function St(t,e){var r=y(t),n=[t].concat(e).map(function(t){return d(t)?r&&(t=l(t)):t=r?T(t):B(Array.isArray(t)?t:[t]),t}).filter(function(t){return 0!==t.size});if(0===n.length)return t;if(1===n.length){var i=n[0];if(i===t||r&&y(i)||g(t)&&g(i))return i}var o=new j(n);return r?o=o.toKeyedSeq():g(t)||(o=o.toSetSeq()),o=o.flatten(!0),o.size=n.reduce(function(t,e){if(void 0!==t){var r=e.size;if(void 0!==r)return t+r}},0),o}function bt(t,e,r){var n=jt(t);return n.__iterateUncached=function(n,i){function o(t,s){var c=this;t.__iterate(function(t,i){return(!e||e>s)&&d(t)?o(t,s+1):n(t,r?i:u++,c)===!1&&(a=!0),!a},i)}var u=0,a=!1;return o(t,0),u},n.__iteratorUncached=function(n,i){var o=t.__iterator(n,i),u=[],a=0;return new S(function(){for(;o;){var t=o.next();if(t.done===!1){var s=t.value;if(n===wr&&(s=s[1]),e&&!(u.length0}function Ot(t,e,r){var n=jt(t);return n.size=new j(r).map(function(t){return t.size}).min(),n.__iterate=function(t,e){for(var r,n=this.__iterator(mr,e),i=0;!(r=n.next()).done&&t(r.value,i++,this)!==!1;);return i},n.__iteratorUncached=function(t,n){var i=r.map(function(t){return t=p(t),D(n?t.reverse():t)}),o=0,u=!1;return new S(function(){var r;return u||(r=i.map(function(t){return t.next()}),u=r.some(function(t){return t.done})),u?I():b(t,o++,e.apply(null,r.map(function(t){return t.value})))})},n}function xt(t,e){return U(t)?e:t.constructor(e)}function qt(t){if(t!==Object(t))throw new TypeError("Expected [K, V] tuple: "+t)}function kt(t){return at(t.size),o(t)}function At(t){return y(t)?l:g(t)?_:v}function jt(t){return Object.create((y(t)?q:g(t)?k:A).prototype)}function Rt(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):x.prototype.cacheResult.call(this)}function Kt(t,e){return t>e?1:e>t?-1:0}function Pt(t){var e=D(t);if(!e){if(!O(t))throw new TypeError("Expected iterable or array-like: "+t);e=D(p(t))}return e}function Ut(t){return null===t||void 0===t?Vt():Lt(t)&&!w(t)?t:Vt().withMutations(function(e){var r=l(t);at(r.size),r.forEach(function(t,r){return e.set(r,t)})})}function Lt(t){return!(!t||!t[Ur])}function Tt(t,e){this.ownerID=t,this.entries=e}function Bt(t,e,r){this.ownerID=t,this.bitmap=e,this.nodes=r}function Jt(t,e,r){this.ownerID=t,this.count=e,this.nodes=r}function Wt(t,e,r){this.ownerID=t,this.keyHash=e,this.entries=r}function Ct(t,e,r){this.ownerID=t,this.keyHash=e,this.entry=r}function Ft(t,e,r){this._type=e,this._reverse=r,this._stack=t._root&&Gt(t._root)}function Nt(t,e){return b(t,e[0],e[1])}function Gt(t,e){return{node:t,index:0,__prev:e}}function Ht(t,e,r,n){var i=Object.create(Lr);return i.size=t,i._root=e,i.__ownerID=r,i.__hash=n,i.__altered=!1,i}function Vt(){return Tr||(Tr=Ht(0))}function Xt(t,r,n){var i,o;if(t._root){var u=e(pr),a=e(lr);if(i=Yt(t._root,t.__ownerID,0,void 0,r,n,u,a),!a.value)return t;o=t.size+(u.value?n===hr?-1:1:0)}else{if(n===hr)return t;o=1,i=new Tt(t.__ownerID,[[r,n]])}return t.__ownerID?(t.size=o,t._root=i,t.__hash=void 0,t.__altered=!0,t):i?Ht(o,i):Vt()}function Yt(t,e,n,i,o,u,a,s){return t?t.update(e,n,i,o,u,a,s):u===hr?t:(r(s),r(a),new Ct(e,i,[o,u]))}function Qt(t){return t.constructor===Ct||t.constructor===Wt}function Zt(t,e,r,n,i){if(t.keyHash===n)return new Wt(e,n,[t.entry,i]);var o,u=(0===r?t.keyHash:t.keyHash>>>r)&fr,a=(0===r?n:n>>>r)&fr,s=u===a?[Zt(t,e,r+sr,n,i)]:(o=new Ct(e,n,i),a>u?[t,o]:[o,t]);return new Bt(e,1<a;a++,s<<=1){var f=e[a];void 0!==f&&a!==n&&(i|=s,u[o++]=f)}return new Bt(t,i,u)}function ee(t,e,r,n,i){for(var o=0,u=new Array(cr),a=0;0!==r;a++,r>>>=1)u[a]=1&r?e[o++]:void 0;return u[n]=i,new Jt(t,o+1,u)}function re(t,e,r){for(var n=[],i=0;i>1&1431655765,t=(858993459&t)+(t>>2&858993459),t=t+(t>>4)&252645135,t+=t>>8,t+=t>>16,127&t}function ae(t,e,r,n){var o=n?t:i(t);return o[e]=r,o}function se(t,e,r,n){var i=t.length+1;if(n&&e+1===i)return t[e]=r,t;for(var o=new Array(i),u=0,a=0;i>a;a++)a===e?(o[a]=r,u=-1):o[a]=t[a+u];return o}function ce(t,e,r){var n=t.length-1;if(r&&e===n)return t.pop(),t;for(var i=new Array(n),o=0,u=0;n>u;u++)u===e&&(o=1),i[u]=t[u+o];return i}function fe(t){var e=ve();if(null===t||void 0===t)return e;if(he(t))return t;var r=_(t),n=r.size;return 0===n?e:(at(n),n>0&&cr>n?_e(0,n,sr,null,new pe(r.toArray())):e.withMutations(function(t){t.setSize(n),r.forEach(function(e,r){return t.set(r,e)})}))}function he(t){return!(!t||!t[Cr])}function pe(t,e){this.array=t,this.ownerID=e}function le(t,e){function r(t,e,r){return 0===e?n(t,r):i(t,e,r)}function n(t,r){var n=r===a?s&&s.array:t&&t.array,i=r>o?0:o-r,c=u-r;return c>cr&&(c=cr),function(){if(i===c)return Gr;var t=e?--c:i++;return n&&n[t]}}function i(t,n,i){var a,s=t&&t.array,c=i>o?0:o-i>>n,f=(u-i>>n)+1;return f>cr&&(f=cr),function(){for(;;){if(a){var t=a();if(t!==Gr)return t;a=null}if(c===f)return Gr;var o=e?--f:c++;a=r(s&&s[o],n-sr,i+(o<=t.size||0>r)return t.withMutations(function(t){0>r?we(t,r).set(0,n):we(t,0,r+1).set(r,n)});r+=t._origin;var i=t._tail,o=t._root,a=e(lr);return r>=be(t._capacity)?i=ye(i,t.__ownerID,0,r,n,a):o=ye(o,t.__ownerID,t._level,r,n,a),a.value?t.__ownerID?(t._root=o,t._tail=i,t.__hash=void 0,t.__altered=!0,t):_e(t._origin,t._capacity,t._level,o,i):t}function ye(t,e,n,i,o,u){var a=i>>>n&fr,s=t&&a0){var f=t&&t.array[a],h=ye(f,e,n-sr,i,o,u);return h===f?t:(c=ge(t,e),c.array[a]=h,c)}return s&&t.array[a]===o?t:(r(u),c=ge(t,e),void 0===o&&a===c.array.length-1?c.array.pop():c.array[a]=o,c)}function ge(t,e){return e&&t&&e===t.ownerID?t:new pe(t?t.array.slice():[],e)}function me(t,e){if(e>=be(t._capacity))return t._tail;if(e<1<0;)r=r.array[e>>>n&fr],n-=sr;return r}}function we(t,e,r){void 0!==e&&(e=0|e),void 0!==r&&(r=0|r);var i=t.__ownerID||new n,o=t._origin,u=t._capacity,a=o+e,s=void 0===r?u:0>r?u+r:o+r;if(a===o&&s===u)return t;if(a>=s)return t.clear();for(var c=t._level,f=t._root,h=0;0>a+h;)f=new pe(f&&f.array.length?[void 0,f]:[],i),c+=sr,h+=1<=1<l?me(t,s-1):l>p?new pe([],i):_;if(_&&l>p&&u>a&&_.array.length){f=ge(f,i);for(var d=f,y=c;y>sr;y-=sr){var g=p>>>y&fr;d=d.array[g]=ge(d.array[g],i)}d.array[p>>>sr&fr]=_}if(u>s&&(v=v&&v.removeAfter(i,0,s)),a>=l)a-=l,s-=l,c=sr,f=null,v=v&&v.removeBefore(i,0,a);else if(a>o||p>l){for(h=0;f;){var m=a>>>c&fr;if(m!==l>>>c&fr)break;m&&(h+=(1<o&&(f=f.removeBefore(i,c,a-h)),f&&p>l&&(f=f.removeAfter(i,c,l-h)),h&&(a-=h,s-=h)}return t.__ownerID?(t.size=s-a,t._origin=a,t._capacity=s,t._level=c,t._root=f,t._tail=v,t.__hash=void 0,t.__altered=!0,t):_e(a,s,c,f,v)}function Se(t,e,r){for(var n=[],i=0,o=0;oi&&(i=a.size),d(u)||(a=a.map(function(t){return Y(t)})),n.push(a)}return i>t.size&&(t=t.setSize(i)),ie(t,e,n)}function be(t){return cr>t?0:t-1>>>sr<=cr&&u.size>=2*o.size?(i=u.filter(function(t,e){return void 0!==t&&a!==e}),n=i.toKeyedSeq().map(function(t){return t[0]}).flip().toMap(),t.__ownerID&&(n.__ownerID=i.__ownerID=t.__ownerID)):(n=o.remove(e),i=a===u.size-1?u.pop():u.set(a,void 0))}else if(s){if(r===u.get(a)[1])return t;n=o,i=u.set(a,[e,r])}else n=o.set(e,u.size),i=u.set(u.size,[e,r]);return t.__ownerID?(t.size=n.size,t._map=n,t._list=i,t.__hash=void 0,t):Me(n,i)}function Oe(t){return null===t||void 0===t?ke():xe(t)?t:ke().unshiftAll(t)}function xe(t){return!(!t||!t[Vr])}function qe(t,e,r,n){var i=Object.create(Xr);return i.size=t,i._head=e,i.__ownerID=r,i.__hash=n,i.__altered=!1,i}function ke(){return Yr||(Yr=qe(0))}function Ae(t){return null===t||void 0===t?Pe():je(t)&&!w(t)?t:Pe().withMutations(function(e){var r=v(t);at(r.size),r.forEach(function(t){return e.add(t)})})}function je(t){return!(!t||!t[Qr])}function Re(t,e){return t.__ownerID?(t.size=e.size,t._map=e,t):e===t._map?t:0===e.size?t.__empty():t.__make(e)}function Ke(t,e){var r=Object.create(Zr);return r.size=t?t.size:0,r._map=t,r.__ownerID=e,r}function Pe(){return $r||($r=Ke(Vt()))}function Ue(t){return null===t||void 0===t?Be():Le(t)?t:Be().withMutations(function(e){var r=v(t);at(r.size),r.forEach(function(t){return e.add(t)})})}function Le(t){return je(t)&&w(t)}function Te(t,e){var r=Object.create(tn);return r.size=t?t.size:0,r._map=t,r.__ownerID=e,r}function Be(){return en||(en=Te(De()))}function Je(t,e){var r,n=function(o){if(o instanceof n)return o;if(!(this instanceof n))return new n(o);if(!r){r=!0;var u=Object.keys(t);Fe(i,u),i.size=u.length,i._name=e,i._keys=u,i._defaultValues=t}this._map=Ut(o)},i=n.prototype=Object.create(rn);return i.constructor=n,n}function We(t,e,r){var n=Object.create(Object.getPrototypeOf(t));return n._map=e,n.__ownerID=r,n}function Ce(t){return t._name||t.constructor.name||"Record"}function Fe(t,e){try{e.forEach(Ne.bind(void 0,t))}catch(r){}}function Ne(t,e){Object.defineProperty(t,e,{get:function(){return this.get(e)},set:function(t){ut(this.__ownerID,"Cannot set on an immutable record."),this.set(e,t)}})}function Ge(t,e){if(t===e)return!0;if(!d(e)||void 0!==t.size&&void 0!==e.size&&t.size!==e.size||void 0!==t.__hash&&void 0!==e.__hash&&t.__hash!==e.__hash||y(t)!==y(e)||g(t)!==g(e)||w(t)!==w(e))return!1;if(0===t.size&&0===e.size)return!0;var r=!m(t);if(w(t)){var n=t.entries();return e.every(function(t,e){var i=n.next().value;return i&&X(i[1],t)&&(r||X(i[0],e))})&&n.next().done}var i=!1;if(void 0===t.size)if(void 0===e.size)"function"==typeof t.cacheResult&&t.cacheResult();else{i=!0;var o=t;t=e,e=o}var u=!0,a=e.__iterate(function(e,n){return(r?t.has(e):i?X(e,t.get(n,hr)):X(t.get(n,hr),e))?void 0:(u=!1,!1)});return u&&t.size===a}function He(t,e,r){if(!(this instanceof He))return new He(t,e,r);if(ut(0!==r,"Cannot step a Range by 0"),t=t||0,void 0===e&&(e=1/0),r=void 0===r?1:Math.abs(r),t>e&&(r=-r),this._start=t,this._end=e,this._step=r,this.size=Math.max(0,Math.ceil((e-t)/r-1)+1),0===this.size){if(nn)return nn;nn=this}}function Ve(t,e){if(!(this instanceof Ve))return new Ve(t,e);if(this._value=t,this.size=void 0===e?1/0:Math.max(0,e),0===this.size){if(on)return on;on=this}}function Xe(t,e){var r=function(r){t.prototype[r]=e[r]};return Object.keys(e).forEach(r),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(e).forEach(r),t}function Ye(t,e){return e}function Qe(t,e){return[e,t]}function Ze(t){return function(){return!t.apply(this,arguments)}}function $e(t){return function(){return-t.apply(this,arguments)}}function tr(t){return"string"==typeof t?JSON.stringify(t):t}function er(){return i(arguments)}function rr(t,e){return e>t?1:t>e?-1:0}function nr(t){if(t.size===1/0)return 0;var e=w(t),r=y(t),n=e?1:0,i=t.__iterate(r?e?function(t,e){n=31*n+or(et(t),et(e))|0}:function(t,e){n=n+or(et(t),et(e))|0}:e?function(t){n=31*n+et(t)|0}:function(t){n=n+et(t)|0});return ir(i,n)}function ir(t,e){return e=Er(e,3432918353),e=Er(e<<15|e>>>-15,461845907),e=Er(e<<13|e>>>-13,5),e=(e+3864292196|0)^t,e=Er(e^e>>>16,2246822507),e=Er(e^e>>>13,3266489909),e=tt(e^e>>>16)}function or(t,e){return t^e+2654435769+(t<<6)+(t>>2)|0}var ur=Array.prototype.slice,ar="delete",sr=5,cr=1<=i;i++)if(t(r[e?n-i:i],i,this)===!1)return i+1;return i},j.prototype.__iterator=function(t,e){var r=this._array,n=r.length-1,i=0;return new S(function(){return i>n?I():b(t,i,r[e?n-i++:i++])})},t(R,q),R.prototype.get=function(t,e){return void 0===e||this.has(t)?this._object[t]:e},R.prototype.has=function(t){return this._object.hasOwnProperty(t)},R.prototype.__iterate=function(t,e){for(var r=this._object,n=this._keys,i=n.length-1,o=0;i>=o;o++){var u=n[e?i-o:o];if(t(r[u],u,this)===!1)return o+1}return o},R.prototype.__iterator=function(t,e){var r=this._object,n=this._keys,i=n.length-1,o=0;return new S(function(){var u=n[e?i-o:o];return o++>i?I():b(t,u,r[u])})},R.prototype[yr]=!0,t(K,k),K.prototype.__iterateUncached=function(t,e){if(e)return this.cacheResult().__iterate(t,e);var r=this._iterable,n=D(r),i=0;if(M(n))for(var o;!(o=n.next()).done&&t(o.value,i++,this)!==!1;);return i},K.prototype.__iteratorUncached=function(t,e){if(e)return this.cacheResult().__iterator(t,e);var r=this._iterable,n=D(r);if(!M(n))return new S(I);var i=0;return new S(function(){var e=n.next();return e.done?e:b(t,i++,e.value)})},t(P,k),P.prototype.__iterateUncached=function(t,e){if(e)return this.cacheResult().__iterate(t,e);for(var r=this._iterator,n=this._iteratorCache,i=0;i=n.length){var e=r.next();if(e.done)return e;n[i]=e.value}return b(t,i,n[i++])})};var Mr;t(N,p),t(G,N),t(H,N),t(V,N),N.Keyed=G,N.Indexed=H,N.Set=V;var Dr,Er="function"==typeof Math.imul&&-2===Math.imul(4294967295,2)?Math.imul:function(t,e){t=0|t,e=0|e;var r=65535&t,n=65535&e;return r*n+((t>>>16)*n+r*(e>>>16)<<16>>>0)|0},Or=Object.isExtensible,xr=function(){try{return Object.defineProperty({},"@",{}),!0}catch(t){return!1}}(),qr="function"==typeof WeakMap;qr&&(Dr=new WeakMap);var kr=0,Ar="__immutablehash__";"function"==typeof Symbol&&(Ar=Symbol(Ar));var jr=16,Rr=255,Kr=0,Pr={};t(st,q),st.prototype.get=function(t,e){return this._iter.get(t,e)},st.prototype.has=function(t){return this._iter.has(t)},st.prototype.valueSeq=function(){return this._iter.valueSeq()},st.prototype.reverse=function(){var t=this,e=_t(this,!0);return this._useKeys||(e.valueSeq=function(){return t._iter.toSeq().reverse()}),e},st.prototype.map=function(t,e){var r=this,n=lt(this,t,e);return this._useKeys||(n.valueSeq=function(){return r._iter.toSeq().map(t,e)}),n},st.prototype.__iterate=function(t,e){var r,n=this;return this._iter.__iterate(this._useKeys?function(e,r){return t(e,r,n)}:(r=e?kt(this):0,function(i){return t(i,e?--r:r++,n)}),e)},st.prototype.__iterator=function(t,e){if(this._useKeys)return this._iter.__iterator(t,e);var r=this._iter.__iterator(mr,e),n=e?kt(this):0;return new S(function(){var i=r.next();return i.done?i:b(t,e?--n:n++,i.value,i)})},st.prototype[yr]=!0,t(ct,k),ct.prototype.includes=function(t){return this._iter.includes(t)},ct.prototype.__iterate=function(t,e){var r=this,n=0;return this._iter.__iterate(function(e){return t(e,n++,r)},e)},ct.prototype.__iterator=function(t,e){var r=this._iter.__iterator(mr,e),n=0;return new S(function(){var e=r.next();return e.done?e:b(t,n++,e.value,e)})},t(ft,A),ft.prototype.has=function(t){return this._iter.includes(t)},ft.prototype.__iterate=function(t,e){var r=this;return this._iter.__iterate(function(e){return t(e,e,r)},e)},ft.prototype.__iterator=function(t,e){var r=this._iter.__iterator(mr,e);return new S(function(){var e=r.next();return e.done?e:b(t,e.value,e.value,e)})},t(ht,q),ht.prototype.entrySeq=function(){return this._iter.toSeq()},ht.prototype.__iterate=function(t,e){var r=this;return this._iter.__iterate(function(e){if(e){qt(e);var n=d(e);return t(n?e.get(1):e[1],n?e.get(0):e[0],r)}},e)},ht.prototype.__iterator=function(t,e){var r=this._iter.__iterator(mr,e);return new S(function(){for(;;){var e=r.next();if(e.done)return e;var n=e.value; -if(n){qt(n);var i=d(n);return b(t,i?n.get(0):n[0],i?n.get(1):n[1],e)}}})},ct.prototype.cacheResult=st.prototype.cacheResult=ft.prototype.cacheResult=ht.prototype.cacheResult=Rt,t(Ut,G),Ut.prototype.toString=function(){return this.__toString("Map {","}")},Ut.prototype.get=function(t,e){return this._root?this._root.get(0,void 0,t,e):e},Ut.prototype.set=function(t,e){return Xt(this,t,e)},Ut.prototype.setIn=function(t,e){return this.updateIn(t,hr,function(){return e})},Ut.prototype.remove=function(t){return Xt(this,t,hr)},Ut.prototype.deleteIn=function(t){return this.updateIn(t,function(){return hr})},Ut.prototype.update=function(t,e,r){return 1===arguments.length?t(this):this.updateIn([t],e,r)},Ut.prototype.updateIn=function(t,e,r){r||(r=e,e=void 0);var n=oe(this,Pt(t),e,r);return n===hr?void 0:n},Ut.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):Vt()},Ut.prototype.merge=function(){return re(this,void 0,arguments)},Ut.prototype.mergeWith=function(t){var e=ur.call(arguments,1);return re(this,t,e)},Ut.prototype.mergeIn=function(t){var e=ur.call(arguments,1);return this.updateIn(t,Vt(),function(t){return"function"==typeof t.merge?t.merge.apply(t,e):e[e.length-1]})},Ut.prototype.mergeDeep=function(){return re(this,ne(void 0),arguments)},Ut.prototype.mergeDeepWith=function(t){var e=ur.call(arguments,1);return re(this,ne(t),e)},Ut.prototype.mergeDeepIn=function(t){var e=ur.call(arguments,1);return this.updateIn(t,Vt(),function(t){return"function"==typeof t.mergeDeep?t.mergeDeep.apply(t,e):e[e.length-1]})},Ut.prototype.sort=function(t){return Ie(Mt(this,t))},Ut.prototype.sortBy=function(t,e){return Ie(Mt(this,e,t))},Ut.prototype.withMutations=function(t){var e=this.asMutable();return t(e),e.wasAltered()?e.__ensureOwner(this.__ownerID):this},Ut.prototype.asMutable=function(){return this.__ownerID?this:this.__ensureOwner(new n)},Ut.prototype.asImmutable=function(){return this.__ensureOwner()},Ut.prototype.wasAltered=function(){return this.__altered},Ut.prototype.__iterator=function(t,e){return new Ft(this,t,e)},Ut.prototype.__iterate=function(t,e){var r=this,n=0;return this._root&&this._root.iterate(function(e){return n++,t(e[1],e[0],r)},e),n},Ut.prototype.__ensureOwner=function(t){return t===this.__ownerID?this:t?Ht(this.size,this._root,t,this.__hash):(this.__ownerID=t,this.__altered=!1,this)},Ut.isMap=Lt;var Ur="@@__IMMUTABLE_MAP__@@",Lr=Ut.prototype;Lr[Ur]=!0,Lr[ar]=Lr.remove,Lr.removeIn=Lr.deleteIn,Tt.prototype.get=function(t,e,r,n){for(var i=this.entries,o=0,u=i.length;u>o;o++)if(X(r,i[o][0]))return i[o][1];return n},Tt.prototype.update=function(t,e,n,o,u,a,s){for(var c=u===hr,f=this.entries,h=0,p=f.length;p>h&&!X(o,f[h][0]);h++);var l=p>h;if(l?f[h][1]===u:c)return this;if(r(s),(c||!l)&&r(a),!c||1!==f.length){if(!l&&!c&&f.length>=Br)return $t(t,f,o,u);var _=t&&t===this.ownerID,v=_?f:i(f);return l?c?h===p-1?v.pop():v[h]=v.pop():v[h]=[o,u]:v.push([o,u]),_?(this.entries=v,this):new Tt(t,v)}},Bt.prototype.get=function(t,e,r,n){void 0===e&&(e=et(r));var i=1<<((0===t?e:e>>>t)&fr),o=this.bitmap;return 0===(o&i)?n:this.nodes[ue(o&i-1)].get(t+sr,e,r,n)},Bt.prototype.update=function(t,e,r,n,i,o,u){void 0===r&&(r=et(n));var a=(0===e?r:r>>>e)&fr,s=1<=Jr)return ee(t,p,c,a,_);if(f&&!_&&2===p.length&&Qt(p[1^h]))return p[1^h];if(f&&_&&1===p.length&&Qt(_))return _;var v=t&&t===this.ownerID,d=f?_?c:c^s:c|s,y=f?_?ae(p,h,_,v):ce(p,h,v):se(p,h,_,v);return v?(this.bitmap=d,this.nodes=y,this):new Bt(t,d,y)},Jt.prototype.get=function(t,e,r,n){void 0===e&&(e=et(r));var i=(0===t?e:e>>>t)&fr,o=this.nodes[i];return o?o.get(t+sr,e,r,n):n},Jt.prototype.update=function(t,e,r,n,i,o,u){void 0===r&&(r=et(n));var a=(0===e?r:r>>>e)&fr,s=i===hr,c=this.nodes,f=c[a];if(s&&!f)return this;var h=Yt(f,t,e+sr,r,n,i,o,u);if(h===f)return this;var p=this.count;if(f){if(!h&&(p--,Wr>p))return te(t,c,p,a)}else p++;var l=t&&t===this.ownerID,_=ae(c,a,h,l);return l?(this.count=p,this.nodes=_,this):new Jt(t,p,_)},Wt.prototype.get=function(t,e,r,n){for(var i=this.entries,o=0,u=i.length;u>o;o++)if(X(r,i[o][0]))return i[o][1];return n},Wt.prototype.update=function(t,e,n,o,u,a,s){void 0===n&&(n=et(o));var c=u===hr;if(n!==this.keyHash)return c?this:(r(s),r(a),Zt(this,t,e,n,[o,u]));for(var f=this.entries,h=0,p=f.length;p>h&&!X(o,f[h][0]);h++);var l=p>h;if(l?f[h][1]===u:c)return this;if(r(s),(c||!l)&&r(a),c&&2===p)return new Ct(t,this.keyHash,f[1^h]);var _=t&&t===this.ownerID,v=_?f:i(f);return l?c?h===p-1?v.pop():v[h]=v.pop():v[h]=[o,u]:v.push([o,u]),_?(this.entries=v,this):new Wt(t,this.keyHash,v)},Ct.prototype.get=function(t,e,r,n){return X(r,this.entry[0])?this.entry[1]:n},Ct.prototype.update=function(t,e,n,i,o,u,a){var s=o===hr,c=X(i,this.entry[0]);return(c?o===this.entry[1]:s)?this:(r(a),s?void r(u):c?t&&t===this.ownerID?(this.entry[1]=o,this):new Ct(t,this.keyHash,[i,o]):(r(u),Zt(this,t,e,et(i),[i,o])))},Tt.prototype.iterate=Wt.prototype.iterate=function(t,e){for(var r=this.entries,n=0,i=r.length-1;i>=n;n++)if(t(r[e?i-n:n])===!1)return!1},Bt.prototype.iterate=Jt.prototype.iterate=function(t,e){for(var r=this.nodes,n=0,i=r.length-1;i>=n;n++){var o=r[e?i-n:n];if(o&&o.iterate(t,e)===!1)return!1}},Ct.prototype.iterate=function(t,e){return t(this.entry)},t(Ft,S),Ft.prototype.next=function(){for(var t=this._type,e=this._stack;e;){var r,n=e.node,i=e.index++;if(n.entry){if(0===i)return Nt(t,n.entry)}else if(n.entries){if(r=n.entries.length-1,r>=i)return Nt(t,n.entries[this._reverse?r-i:i])}else if(r=n.nodes.length-1,r>=i){var o=n.nodes[this._reverse?r-i:i];if(o){if(o.entry)return Nt(t,o.entry);e=this._stack=Gt(o,e)}continue}e=this._stack=this._stack.__prev}return I()};var Tr,Br=cr/4,Jr=cr/2,Wr=cr/4;t(fe,H),fe.of=function(){return this(arguments)},fe.prototype.toString=function(){return this.__toString("List [","]")},fe.prototype.get=function(t,e){if(t=u(this,t),t>=0&&t>>e&fr;if(n>=this.array.length)return new pe([],t);var i,o=0===n;if(e>0){var u=this.array[n];if(i=u&&u.removeBefore(t,e-sr,r),i===u&&o)return this}if(o&&!i)return this;var a=ge(this,t);if(!o)for(var s=0;n>s;s++)a.array[s]=void 0;return i&&(a.array[n]=i),a},pe.prototype.removeAfter=function(t,e,r){if(r===(e?1<>>e&fr;if(n>=this.array.length)return this;var i;if(e>0){var o=this.array[n];if(i=o&&o.removeAfter(t,e-sr,r),i===o&&n===this.array.length-1)return this}var u=ge(this,t);return u.array.splice(n+1),i&&(u.array[n]=i),u};var Nr,Gr={};t(Ie,Ut),Ie.of=function(){return this(arguments)},Ie.prototype.toString=function(){return this.__toString("OrderedMap {","}")},Ie.prototype.get=function(t,e){var r=this._map.get(t);return void 0!==r?this._list.get(r)[1]:e},Ie.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._map.clear(),this._list.clear(),this):De()},Ie.prototype.set=function(t,e){return Ee(this,t,e)},Ie.prototype.remove=function(t){return Ee(this,t,hr)},Ie.prototype.wasAltered=function(){return this._map.wasAltered()||this._list.wasAltered()},Ie.prototype.__iterate=function(t,e){var r=this;return this._list.__iterate(function(e){return e&&t(e[1],e[0],r)},e)},Ie.prototype.__iterator=function(t,e){return this._list.fromEntrySeq().__iterator(t,e)},Ie.prototype.__ensureOwner=function(t){if(t===this.__ownerID)return this;var e=this._map.__ensureOwner(t),r=this._list.__ensureOwner(t);return t?Me(e,r,t,this.__hash):(this.__ownerID=t,this._map=e,this._list=r,this)},Ie.isOrderedMap=ze,Ie.prototype[yr]=!0,Ie.prototype[ar]=Ie.prototype.remove;var Hr;t(Oe,H),Oe.of=function(){return this(arguments)},Oe.prototype.toString=function(){return this.__toString("Stack [","]")},Oe.prototype.get=function(t,e){var r=this._head;for(t=u(this,t);r&&t--;)r=r.next;return r?r.value:e},Oe.prototype.peek=function(){return this._head&&this._head.value},Oe.prototype.push=function(){if(0===arguments.length)return this;for(var t=this.size+arguments.length,e=this._head,r=arguments.length-1;r>=0;r--)e={value:arguments[r],next:e};return this.__ownerID?(this.size=t,this._head=e,this.__hash=void 0,this.__altered=!0,this):qe(t,e)},Oe.prototype.pushAll=function(t){if(t=_(t),0===t.size)return this;at(t.size);var e=this.size,r=this._head;return t.reverse().forEach(function(t){e++,r={value:t,next:r}}),this.__ownerID?(this.size=e,this._head=r,this.__hash=void 0,this.__altered=!0,this):qe(e,r)},Oe.prototype.pop=function(){return this.slice(1)},Oe.prototype.unshift=function(){return this.push.apply(this,arguments)},Oe.prototype.unshiftAll=function(t){return this.pushAll(t)},Oe.prototype.shift=function(){return this.pop.apply(this,arguments)},Oe.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._head=void 0,this.__hash=void 0,this.__altered=!0,this):ke()},Oe.prototype.slice=function(t,e){if(s(t,e,this.size))return this;var r=c(t,this.size),n=f(e,this.size);if(n!==this.size)return H.prototype.slice.call(this,t,e);for(var i=this.size-r,o=this._head;r--;)o=o.next;return this.__ownerID?(this.size=i,this._head=o,this.__hash=void 0,this.__altered=!0,this):qe(i,o)},Oe.prototype.__ensureOwner=function(t){return t===this.__ownerID?this:t?qe(this.size,this._head,t,this.__hash):(this.__ownerID=t,this.__altered=!1,this)},Oe.prototype.__iterate=function(t,e){if(e)return this.reverse().__iterate(t);for(var r=0,n=this._head;n&&t(n.value,r++,this)!==!1;)n=n.next;return r},Oe.prototype.__iterator=function(t,e){if(e)return this.reverse().__iterator(t);var r=0,n=this._head;return new S(function(){if(n){var e=n.value;return n=n.next,b(t,r++,e)}return I()})},Oe.isStack=xe;var Vr="@@__IMMUTABLE_STACK__@@",Xr=Oe.prototype;Xr[Vr]=!0,Xr.withMutations=Lr.withMutations,Xr.asMutable=Lr.asMutable,Xr.asImmutable=Lr.asImmutable,Xr.wasAltered=Lr.wasAltered;var Yr;t(Ae,V),Ae.of=function(){return this(arguments)},Ae.fromKeys=function(t){return this(l(t).keySeq())},Ae.prototype.toString=function(){return this.__toString("Set {","}")},Ae.prototype.has=function(t){return this._map.has(t)},Ae.prototype.add=function(t){return Re(this,this._map.set(t,!0))},Ae.prototype.remove=function(t){return Re(this,this._map.remove(t))},Ae.prototype.clear=function(){return Re(this,this._map.clear())},Ae.prototype.union=function(){var t=ur.call(arguments,0);return t=t.filter(function(t){return 0!==t.size}),0===t.length?this:0!==this.size||this.__ownerID||1!==t.length?this.withMutations(function(e){for(var r=0;r1?" by "+this._step:"")+" ]"},He.prototype.get=function(t,e){return this.has(t)?this._start+u(this,t)*this._step:e},He.prototype.includes=function(t){var e=(t-this._start)/this._step;return e>=0&&e=e?new He(0,0):new He(this.get(t,this._end),this.get(e,this._end),this._step))},He.prototype.indexOf=function(t){var e=t-this._start;if(e%this._step===0){var r=e/this._step;if(r>=0&&r=o;o++){if(t(i,o,this)===!1)return o+1;i+=e?-n:n}return o},He.prototype.__iterator=function(t,e){var r=this.size-1,n=this._step,i=e?this._start+r*n:this._start,o=0;return new S(function(){var u=i;return i+=e?-n:n,o>r?I():b(t,o++,u)})},He.prototype.equals=function(t){return t instanceof He?this._start===t._start&&this._end===t._end&&this._step===t._step:Ge(this,t)};var nn;t(Ve,k),Ve.prototype.toString=function(){return 0===this.size?"Repeat []":"Repeat [ "+this._value+" "+this.size+" times ]"},Ve.prototype.get=function(t,e){return this.has(t)?this._value:e},Ve.prototype.includes=function(t){return X(this._value,t)},Ve.prototype.slice=function(t,e){var r=this.size;return s(t,e,r)?this:new Ve(this._value,f(e,r)-c(t,r))},Ve.prototype.reverse=function(){return this},Ve.prototype.indexOf=function(t){return X(this._value,t)?0:-1},Ve.prototype.lastIndexOf=function(t){return X(this._value,t)?this.size:-1},Ve.prototype.__iterate=function(t,e){for(var r=0;rt?this.count():this.size);var n=this.slice(0,t);return xt(this,1===r?n:n.concat(i(arguments,2),this.slice(t+e)))},findLastIndex:function(t,e){var r=this.toKeyedSeq().findLastKey(t,e);return void 0===r?-1:r},first:function(){return this.get(0)},flatten:function(t){return xt(this,bt(this,t,!1))},get:function(t,e){return t=u(this,t),0>t||this.size===1/0||void 0!==this.size&&t>this.size?e:this.find(function(e,r){return r===t},void 0,e)},has:function(t){return t=u(this,t),t>=0&&(void 0!==this.size?this.size===1/0||t-1&&t%1===0&&t<=Number.MAX_VALUE}var i=Function.prototype.bind;e.isString=function(t){return"string"==typeof t||"[object String]"===r(t)},e.isArray=Array.isArray||function(t){return"[object Array]"===r(t)},"function"!=typeof/./&&"object"!=typeof Int8Array?e.isFunction=function(t){return"function"==typeof t||!1}:e.isFunction=function(t){return"[object Function]"===toString.call(t)},e.isObject=function(t){var e=typeof t;return"function"===e||"object"===e&&!!t},e.extend=function(t){var e=arguments.length;if(!t||2>e)return t||{};for(var r=1;e>r;r++)for(var n=arguments[r],i=Object.keys(n),o=i.length,u=0;o>u;u++){var a=i[u];t[a]=n[a]}return t},e.clone=function(t){return e.isObject(t)?e.isArray(t)?t.slice():e.extend({},t):t},e.each=function(t,e,r){var i,o,u=t?t.length:0,a=-1;if(r&&(o=e,e=function(t,e,n){return o.call(r,t,e,n)}),n(u))for(;++an;n++)r[n]=arguments[n];return new(i.apply(t,[null].concat(r)))};return e.__proto__=t,e.prototype=t.prototype,e}},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function i(t){return c["default"].Iterable.isIterable(t)}function o(t){return i(t)||!f.isObject(t)}function u(t){return i(t)?t.toJS():t}function a(t){return i(t)?t:c["default"].fromJS(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.isImmutable=i,e.isImmutableValue=o,e.toJS=u,e.toImmutable=a;var s=r(3),c=n(s),f=r(4)},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function i(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var u=function(){function t(t,e){for(var r=0;r0)){var e=this.reactorState.get("dirtyStores");if(0!==e.size){var r=s["default"].Set().withMutations(function(r){r.union(t.observerState.get("any")),e.forEach(function(e){var n=t.observerState.getIn(["stores",e]);n&&r.union(n)})});r.forEach(function(e){var r=t.observerState.getIn(["observersMap",e]);if(r){var n=r.get("getter"),i=r.get("handler"),o=p["default"].evaluate(t.prevReactorState,n),u=p["default"].evaluate(t.reactorState,n);t.prevReactorState=o.reactorState,t.reactorState=u.reactorState;var a=o.result,c=u.result;s["default"].is(a,c)||i.call(null,c)}});var n=p["default"].resetDirtyStores(this.reactorState);this.prevReactorState=n,this.reactorState=n}}}},{key:"batchStart",value:function(){this.__batchDepth++; -}},{key:"batchEnd",value:function(){if(this.__batchDepth--,this.__batchDepth<=0){this.__isDispatching=!0;try{this.__notify()}catch(t){throw this.__isDispatching=!1,t}this.__isDispatching=!1}}}]),t}();e["default"]=d.toFactory(g),t.exports=e["default"]},function(t,e,r){"use strict";function n(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function i(t,e){var r={};return o.each(e,function(e,n){r[n]=t.evaluate(e)}),r}Object.defineProperty(e,"__esModule",{value:!0});var o=r(4);e["default"]=function(t){return{getInitialState:function(){return i(t,this.getDataBindings())},componentDidMount:function(){var e=this;this.__unwatchFns=[],o.each(this.getDataBindings(),function(r,i){var o=t.observe(r,function(t){e.setState(n({},i,t))});e.__unwatchFns.push(o)})},componentWillUnmount:function(){for(;this.__unwatchFns.length;)this.__unwatchFns.shift()()}}},t.exports=e["default"]},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){return new w({result:t,reactorState:e})}function o(t){return t}function u(t,e){var r=o(e);return t.getIn(["cache",r])}function a(t,e){var r=u(t,e);if(!r)return!1;var n=r.get("storeStates");return 0===n.size?!1:n.every(function(e,r){return t.getIn(["storeStates",r])===e})}function s(t,e,r){var n=o(e),i=t.get("dispatchId"),u=y.getStoreDeps(e),a=d.toImmutable({}).withMutations(function(e){u.forEach(function(r){var n=t.getIn(["storeStates",r]);e.set(r,n)})});return t.setIn(["cache",n],l["default"].Map({value:r,storeStates:a,dispatchId:i}))}function c(t,e){var r=o(e);return t.getIn(["cache",r,"value"])}function f(t){return t.update("dispatchId",function(t){return t+1})}function h(t,e){return t.withMutations(function(t){e.forEach(function(e){var r=t.has(e)?t.get(e)+1:1;t.set(e,r)})})}var p=r(3),l=n(p),_=r(9),v=n(_),d=r(5),y=r(10),g=r(11),m=r(4),w=l["default"].Record({result:null,reactorState:null});e.registerStores=function(t,e){var r=t.get("debug");return t.withMutations(function(t){m.each(e,function(e,n){t.getIn(["stores",n])&&console.warn("Store already defined for id = "+n);var i=e.getInitialState();if(r&&!d.isImmutableValue(i))throw new Error("Store getInitialState() must return an immutable value, did you forget to call toImmutable");t.update("stores",function(t){return t.set(n,e)}).update("state",function(t){return t.set(n,i)}).update("dirtyStores",function(t){return t.add(n)}).update("storeStates",function(t){return h(t,[n])})}),f(t)})},e.dispatch=function(t,e,r){var n=t.get("state"),i=t.get("debug"),o=t.get("dirtyStores"),u=n.withMutations(function(n){i&&v["default"].dispatchStart(e,r),t.get("stores").forEach(function(t,u){var a=n.get(u),s=void 0;try{s=t.handle(a,e,r)}catch(c){throw v["default"].dispatchError(c.message),c}if(i&&void 0===s){var f="Store handler must return a value, did you forget a return statement";throw v["default"].dispatchError(f),new Error(f)}n.set(u,s),a!==s&&(o=o.add(u)),i&&v["default"].storeHandled(u,a,s)}),i&&v["default"].dispatchEnd(n)}),a=t.set("state",u).set("dirtyStores",o).update("storeStates",function(t){return h(t,o)});return f(a)},e.loadState=function(t,e){var r=[],n=d.toImmutable({}).withMutations(function(n){m.each(e,function(e,i){var o=t.getIn(["stores",i]);if(o){var u=o.deserialize(e);void 0!==u&&(n.set(i,u),r.push(i))}})}),i=l["default"].Set(r);return t.update("state",function(t){return t.merge(n)}).update("dirtyStores",function(t){return t.union(i)}).update("storeStates",function(t){return h(t,r)})},e.addObserver=function(t,e,r){var n=e;g.isKeyPath(e)&&(e=y.fromKeyPath(e));var i=t.get("nextId"),o=y.getStoreDeps(e),u=l["default"].Map({id:i,storeDeps:o,getterKey:n,getter:e,handler:r}),a=void 0;return a=0===o.size?t.update("any",function(t){return t.add(i)}):t.withMutations(function(t){o.forEach(function(e){var r=["stores",e];t.hasIn(r)||t.setIn(r,l["default"].Set([])),t.updateIn(["stores",e],function(t){return t.add(i)})})}),a=a.set("nextId",i+1).setIn(["observersMap",i],u),{observerState:a,entry:u}},e.removeObserver=function(t,r,n){var i=t.get("observersMap").filter(function(t){var e=t.get("getterKey"),i=!n||t.get("handler")===n;return i?g.isKeyPath(r)&&g.isKeyPath(e)?g.isEqual(r,e):r===e:!1});return t.withMutations(function(t){i.forEach(function(r){return e.removeObserverByEntry(t,r)})})},e.removeObserverByEntry=function(t,e){return t.withMutations(function(t){var r=e.get("id"),n=e.get("storeDeps");0===n.size?t.update("any",function(t){return t.remove(r)}):n.forEach(function(e){t.updateIn(["stores",e],function(t){return t?t.remove(r):t})}),t.removeIn(["observersMap",r])})},e.reset=function(t){var r=t.get("debug"),n=t.get("state");return t.withMutations(function(t){var i=t.get("stores"),o=i.keySeq().toJS();i.forEach(function(e,i){var o=n.get(i),u=e.handleReset(o);if(r&&void 0===u)throw new Error("Store handleReset() must return a value, did you forget a return statement");if(r&&!d.isImmutableValue(u))throw new Error("Store reset state must be an immutable value, did you forget to call toImmutable");t.setIn(["state",i],u)}),t.update("storeStates",function(t){return h(t,o)}),e.resetDirtyStores(t)})},e.evaluate=function S(t,e){var r=t.get("state");if(g.isKeyPath(e))return i(r.getIn(e),t);if(!y.isGetter(e))throw new Error("evaluate must be passed a keyPath or Getter");if(a(t,e))return i(c(t,e),t);var n=y.getDeps(e).map(function(e){return S(t,e).result}),o=y.getComputeFn(e).apply(null,n);return i(o,s(t,e,o))},e.serialize=function(t){var e={};return t.get("stores").forEach(function(r,n){var i=t.getIn(["state",n]),o=r.serialize(i);void 0!==o&&(e[n]=o)}),e},e.resetDirtyStores=function(t){return t.set("dirtyStores",l["default"].Set())}},function(t,e){"use strict";e.dispatchStart=function(t,e){console.group&&(console.groupCollapsed("Dispatch: %s",t),console.group("payload"),console.debug(e),console.groupEnd())},e.dispatchError=function(t){console.group&&(console.debug("Dispatch error: "+t),console.groupEnd())},e.storeHandled=function(t,e,r){console.group&&e!==r&&console.debug("Store "+t+" handled action")},e.dispatchEnd=function(t){console.group&&(console.debug("Dispatch done, new state: ",t.toJS()),console.groupEnd())}},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function i(t){return p.isArray(t)&&p.isFunction(t[t.length-1])}function o(t){return t[t.length-1]}function u(t){return t.slice(0,t.length-1)}function a(t,e){e||(e=h["default"].Set());var r=h["default"].Set().withMutations(function(e){if(!i(t))throw new Error("getFlattenedDeps must be passed a Getter");u(t).forEach(function(t){if(l.isKeyPath(t))e.add(f.List(t));else{if(!i(t))throw new Error("Invalid getter, each dependency must be a KeyPath or Getter");e.union(a(t))}})});return e.union(r)}function s(t){if(!l.isKeyPath(t))throw new Error("Cannot create Getter from KeyPath: "+t);return[t,_]}function c(t){if(t.hasOwnProperty("__storeDeps"))return t.__storeDeps;var e=a(t).map(function(t){return t.first()}).filter(function(t){return!!t});return Object.defineProperty(t,"__storeDeps",{enumerable:!1,configurable:!1,writable:!1,value:e}),e}Object.defineProperty(e,"__esModule",{value:!0});var f=r(3),h=n(f),p=r(4),l=r(11),_=function(t){return t};e["default"]={isGetter:i,getComputeFn:o,getFlattenedDeps:a,getStoreDeps:c,getDeps:u,fromKeyPath:s},t.exports=e["default"]},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function i(t){return s.isArray(t)&&!s.isFunction(t[t.length-1])}function o(t,e){var r=a["default"].List(t),n=a["default"].List(e);return a["default"].is(r,n)}Object.defineProperty(e,"__esModule",{value:!0}),e.isKeyPath=i,e.isEqual=o;var u=r(3),a=n(u),s=r(4)},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0});var i=r(3),o=n(i),u=o["default"].Record({dispatchId:0,state:o["default"].Map(),stores:o["default"].Map(),cache:o["default"].Map(),storeStates:o["default"].Map(),dirtyStores:o["default"].Set(),debug:!1}),a=o["default"].Record({any:o["default"].Set([]),stores:o["default"].Map({}),observersMap:o["default"].Map({}),nextId:1});e["default"]={ReactorState:u,ObserverState:a},t.exports=e["default"]}])}); \ No newline at end of file +!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.Nuclear=e():t.Nuclear=e()}(this,function(){return function(t){function e(n){if(r[n])return r[n].exports;var i=r[n]={exports:{},id:n,loaded:!1};return t[n].call(i.exports,i,i.exports,e),i.loaded=!0,i.exports}var r={};return e.m=t,e.c=r,e.p="",e(0)}([function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0}),r(1);var i=r(2),o=n(i),u=r(6),a=n(u),s=r(3),c=n(s),f=r(5),h=r(11),p=r(10),l=r(7),_=n(l);e["default"]={Reactor:a["default"],Store:o["default"],Immutable:c["default"],isKeyPath:h.isKeyPath,isGetter:p.isGetter,toJS:f.toJS,toImmutable:f.toImmutable,isImmutable:f.isImmutable,createReactMixin:_["default"]},t.exports=e["default"]},function(t,e){"use strict";try{window.console&&console.log||(console={log:function(){},debug:function(){},info:function(){},warn:function(){},error:function(){}})}catch(r){}},function(t,e,r){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t){return t instanceof c}Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function t(t,e){for(var r=0;ri;i++)n[i]=t[i+e];return n}function o(t){return void 0===t.size&&(t.size=t.__iterate(a)),t.size}function u(t,e){if("number"!=typeof e){var r=+e;if(""+r!==e)return NaN;e=r}return 0>e?o(t)+e:e}function a(){return!0}function s(t,e,r){return(0===t||void 0!==r&&-r>=t)&&(void 0===e||void 0!==r&&e>=r)}function c(t,e){return h(t,e,0)}function f(t,e){return h(t,e,e)}function h(t,e,r){return void 0===t?r:0>t?Math.max(0,e+t):void 0===e?t:Math.min(e,t)}function p(t){return d(t)?t:q(t)}function l(t){return y(t)?t:x(t)}function _(t){return g(t)?t:k(t)}function v(t){return d(t)&&!m(t)?t:A(t)}function d(t){return!(!t||!t[_r])}function y(t){return!(!t||!t[vr])}function g(t){return!(!t||!t[dr])}function m(t){return y(t)||g(t)}function S(t){return!(!t||!t[yr])}function w(t){this.next=t}function b(t,e,r,n){var i=0===t?e:1===t?r:[e,r];return n?n.value=i:n={value:i,done:!1},n}function I(){return{value:void 0,done:!0}}function z(t){return!!M(t)}function D(t){return t&&"function"==typeof t.next}function O(t){var e=M(t);return e&&e.call(t)}function M(t){var e=t&&(wr&&t[wr]||t[br]);return"function"==typeof e?e:void 0}function E(t){return t&&"number"==typeof t.length}function q(t){return null===t||void 0===t?T():d(t)?t.toSeq():J(t)}function x(t){return null===t||void 0===t?T().toKeyedSeq():d(t)?y(t)?t.toSeq():t.fromEntrySeq():L(t)}function k(t){return null===t||void 0===t?T():d(t)?y(t)?t.entrySeq():t.toIndexedSeq():B(t)}function A(t){return(null===t||void 0===t?T():d(t)?y(t)?t.entrySeq():t:B(t)).toSetSeq()}function j(t){this._array=t,this.size=t.length}function R(t){var e=Object.keys(t);this._object=t,this._keys=e,this.size=e.length}function K(t){this._iterable=t,this.size=t.length||t.size}function U(t){this._iterator=t,this._iteratorCache=[]}function P(t){return!(!t||!t[zr])}function T(){return Dr||(Dr=new j([]))}function L(t){var e=Array.isArray(t)?new j(t).fromEntrySeq():D(t)?new U(t).fromEntrySeq():z(t)?new K(t).fromEntrySeq():"object"==typeof t?new R(t):void 0;if(!e)throw new TypeError("Expected Array or iterable object of [k, v] entries, or keyed object: "+t);return e}function B(t){var e=W(t);if(!e)throw new TypeError("Expected Array or iterable object of values: "+t);return e}function J(t){var e=W(t)||"object"==typeof t&&new R(t);if(!e)throw new TypeError("Expected Array or iterable object of values, or keyed object: "+t);return e}function W(t){return E(t)?new j(t):D(t)?new U(t):z(t)?new K(t):void 0}function N(t,e,r,n){var i=t._cache;if(i){for(var o=i.length-1,u=0;o>=u;u++){var a=i[r?o-u:u];if(e(a[1],n?a[0]:u,t)===!1)return u+1}return u}return t.__iterateUncached(e,r)}function C(t,e,r,n){var i=t._cache;if(i){var o=i.length-1,u=0;return new w(function(){var t=i[r?o-u:u];return u++>o?I():b(e,n?t[0]:u-1,t[1])})}return t.__iteratorUncached(e,r)}function F(){throw TypeError("Abstract")}function V(){}function G(){}function H(){}function X(t,e){if(t===e||t!==t&&e!==e)return!0;if(!t||!e)return!1;if("function"==typeof t.valueOf&&"function"==typeof e.valueOf){if(t=t.valueOf(),e=e.valueOf(),t===e||t!==t&&e!==e)return!0;if(!t||!e)return!1}return"function"==typeof t.equals&&"function"==typeof e.equals&&t.equals(e)?!0:!1}function Y(t,e){return e?Q(e,t,"",{"":t}):Z(t)}function Q(t,e,r,n){return Array.isArray(e)?t.call(n,r,k(e).map(function(r,n){return Q(t,r,n,e)})):$(e)?t.call(n,r,x(e).map(function(r,n){return Q(t,r,n,e)})):e}function Z(t){return Array.isArray(t)?k(t).map(Z).toList():$(t)?x(t).map(Z).toMap():t}function $(t){return t&&(t.constructor===Object||void 0===t.constructor)}function tt(t){return t>>>1&1073741824|3221225471&t}function et(t){if(t===!1||null===t||void 0===t)return 0;if("function"==typeof t.valueOf&&(t=t.valueOf(),t===!1||null===t||void 0===t))return 0;if(t===!0)return 1;var e=typeof t;if("number"===e){var r=0|t;for(r!==t&&(r^=4294967295*t);t>4294967295;)t/=4294967295,r^=t;return tt(r)}return"string"===e?t.length>jr?rt(t):nt(t):"function"==typeof t.hashCode?t.hashCode():it(t)}function rt(t){var e=Ur[t];return void 0===e&&(e=nt(t),Kr===Rr&&(Kr=0,Ur={}),Kr++,Ur[t]=e),e}function nt(t){for(var e=0,r=0;r0)switch(t.nodeType){case 1:return t.uniqueID;case 9:return t.documentElement&&t.documentElement.uniqueID}}function ut(t,e){if(!t)throw new Error(e)}function at(t){ut(t!==1/0,"Cannot perform this action with an infinite size.")}function st(t,e){this._iter=t,this._useKeys=e,this.size=t.size}function ct(t){this._iter=t,this.size=t.size}function ft(t){this._iter=t,this.size=t.size}function ht(t){this._iter=t,this.size=t.size}function pt(t){var e=jt(t);return e._iter=t,e.size=t.size,e.flip=function(){return t},e.reverse=function(){var e=t.reverse.apply(this);return e.flip=function(){return t.reverse()},e},e.has=function(e){return t.includes(e)},e.includes=function(e){return t.has(e)},e.cacheResult=Rt,e.__iterateUncached=function(e,r){var n=this;return t.__iterate(function(t,r){return e(r,t,n)!==!1},r)},e.__iteratorUncached=function(e,r){if(e===Sr){var n=t.__iterator(e,r);return new w(function(){var t=n.next();if(!t.done){var e=t.value[0];t.value[0]=t.value[1],t.value[1]=e}return t})}return t.__iterator(e===mr?gr:mr,r)},e}function lt(t,e,r){var n=jt(t);return n.size=t.size,n.has=function(e){return t.has(e)},n.get=function(n,i){var o=t.get(n,hr);return o===hr?i:e.call(r,o,n,t)},n.__iterateUncached=function(n,i){var o=this;return t.__iterate(function(t,i,u){return n(e.call(r,t,i,u),i,o)!==!1},i)},n.__iteratorUncached=function(n,i){var o=t.__iterator(Sr,i);return new w(function(){var i=o.next();if(i.done)return i;var u=i.value,a=u[0];return b(n,a,e.call(r,u[1],a,t),i)})},n}function _t(t,e){var r=jt(t);return r._iter=t,r.size=t.size,r.reverse=function(){return t},t.flip&&(r.flip=function(){var e=pt(t);return e.reverse=function(){return t.flip()},e}),r.get=function(r,n){return t.get(e?r:-1-r,n)},r.has=function(r){return t.has(e?r:-1-r)},r.includes=function(e){return t.includes(e)},r.cacheResult=Rt,r.__iterate=function(e,r){var n=this;return t.__iterate(function(t,r){return e(t,r,n)},!r)},r.__iterator=function(e,r){return t.__iterator(e,!r)},r}function vt(t,e,r,n){var i=jt(t);return n&&(i.has=function(n){var i=t.get(n,hr);return i!==hr&&!!e.call(r,i,n,t)},i.get=function(n,i){var o=t.get(n,hr);return o!==hr&&e.call(r,o,n,t)?o:i}),i.__iterateUncached=function(i,o){var u=this,a=0;return t.__iterate(function(t,o,s){return e.call(r,t,o,s)?(a++,i(t,n?o:a-1,u)):void 0},o),a},i.__iteratorUncached=function(i,o){var u=t.__iterator(Sr,o),a=0;return new w(function(){for(;;){var o=u.next();if(o.done)return o;var s=o.value,c=s[0],f=s[1];if(e.call(r,f,c,t))return b(i,n?c:a++,f,o)}})},i}function dt(t,e,r){var n=Pt().asMutable();return t.__iterate(function(i,o){n.update(e.call(r,i,o,t),0,function(t){return t+1})}),n.asImmutable()}function yt(t,e,r){var n=y(t),i=(S(t)?Ie():Pt()).asMutable();t.__iterate(function(o,u){i.update(e.call(r,o,u,t),function(t){return t=t||[],t.push(n?[u,o]:o),t})});var o=At(t);return i.map(function(e){return qt(t,o(e))})}function gt(t,e,r,n){var i=t.size;if(void 0!==e&&(e=0|e),void 0!==r&&(r=0|r),s(e,r,i))return t;var o=c(e,i),a=f(r,i);if(o!==o||a!==a)return gt(t.toSeq().cacheResult(),e,r,n);var h,p=a-o;p===p&&(h=0>p?0:p);var l=jt(t);return l.size=0===h?h:t.size&&h||void 0,!n&&P(t)&&h>=0&&(l.get=function(e,r){return e=u(this,e),e>=0&&h>e?t.get(e+o,r):r}),l.__iterateUncached=function(e,r){var i=this;if(0===h)return 0;if(r)return this.cacheResult().__iterate(e,r);var u=0,a=!0,s=0;return t.__iterate(function(t,r){return a&&(a=u++h)return I();var t=i.next();return n||e===mr?t:e===gr?b(e,a-1,void 0,t):b(e,a-1,t.value[1],t)})},l}function mt(t,e,r){var n=jt(t);return n.__iterateUncached=function(n,i){var o=this;if(i)return this.cacheResult().__iterate(n,i);var u=0;return t.__iterate(function(t,i,a){return e.call(r,t,i,a)&&++u&&n(t,i,o)}),u},n.__iteratorUncached=function(n,i){var o=this;if(i)return this.cacheResult().__iterator(n,i);var u=t.__iterator(Sr,i),a=!0;return new w(function(){if(!a)return I();var t=u.next();if(t.done)return t;var i=t.value,s=i[0],c=i[1];return e.call(r,c,s,o)?n===Sr?t:b(n,s,c,t):(a=!1,I())})},n}function St(t,e,r,n){var i=jt(t);return i.__iterateUncached=function(i,o){var u=this;if(o)return this.cacheResult().__iterate(i,o);var a=!0,s=0;return t.__iterate(function(t,o,c){return a&&(a=e.call(r,t,o,c))?void 0:(s++,i(t,n?o:s-1,u))}),s},i.__iteratorUncached=function(i,o){var u=this;if(o)return this.cacheResult().__iterator(i,o);var a=t.__iterator(Sr,o),s=!0,c=0;return new w(function(){var t,o,f;do{if(t=a.next(),t.done)return n||i===mr?t:i===gr?b(i,c++,void 0,t):b(i,c++,t.value[1],t);var h=t.value;o=h[0],f=h[1],s&&(s=e.call(r,f,o,u))}while(s);return i===Sr?t:b(i,o,f,t)})},i}function wt(t,e){var r=y(t),n=[t].concat(e).map(function(t){return d(t)?r&&(t=l(t)):t=r?L(t):B(Array.isArray(t)?t:[t]),t}).filter(function(t){return 0!==t.size});if(0===n.length)return t;if(1===n.length){var i=n[0];if(i===t||r&&y(i)||g(t)&&g(i))return i}var o=new j(n);return r?o=o.toKeyedSeq():g(t)||(o=o.toSetSeq()),o=o.flatten(!0),o.size=n.reduce(function(t,e){if(void 0!==t){var r=e.size;if(void 0!==r)return t+r}},0),o}function bt(t,e,r){var n=jt(t);return n.__iterateUncached=function(n,i){function o(t,s){var c=this;t.__iterate(function(t,i){return(!e||e>s)&&d(t)?o(t,s+1):n(t,r?i:u++,c)===!1&&(a=!0),!a},i)}var u=0,a=!1;return o(t,0),u},n.__iteratorUncached=function(n,i){var o=t.__iterator(n,i),u=[],a=0;return new w(function(){for(;o;){var t=o.next();if(t.done===!1){var s=t.value;if(n===Sr&&(s=s[1]),e&&!(u.length0}function Et(t,e,r){var n=jt(t);return n.size=new j(r).map(function(t){return t.size}).min(),n.__iterate=function(t,e){for(var r,n=this.__iterator(mr,e),i=0;!(r=n.next()).done&&t(r.value,i++,this)!==!1;);return i},n.__iteratorUncached=function(t,n){var i=r.map(function(t){return t=p(t),O(n?t.reverse():t)}),o=0,u=!1;return new w(function(){var r;return u||(r=i.map(function(t){return t.next()}),u=r.some(function(t){return t.done})),u?I():b(t,o++,e.apply(null,r.map(function(t){return t.value})))})},n}function qt(t,e){return P(t)?e:t.constructor(e)}function xt(t){if(t!==Object(t))throw new TypeError("Expected [K, V] tuple: "+t)}function kt(t){return at(t.size),o(t)}function At(t){return y(t)?l:g(t)?_:v}function jt(t){return Object.create((y(t)?x:g(t)?k:A).prototype)}function Rt(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):q.prototype.cacheResult.call(this)}function Kt(t,e){return t>e?1:e>t?-1:0}function Ut(t){var e=O(t);if(!e){if(!E(t))throw new TypeError("Expected iterable or array-like: "+t);e=O(p(t))}return e}function Pt(t){return null===t||void 0===t?Ht():Tt(t)&&!S(t)?t:Ht().withMutations(function(e){var r=l(t);at(r.size),r.forEach(function(t,r){return e.set(r,t)})})}function Tt(t){return!(!t||!t[Pr])}function Lt(t,e){this.ownerID=t,this.entries=e}function Bt(t,e,r){this.ownerID=t,this.bitmap=e,this.nodes=r}function Jt(t,e,r){this.ownerID=t,this.count=e,this.nodes=r}function Wt(t,e,r){this.ownerID=t,this.keyHash=e,this.entries=r}function Nt(t,e,r){this.ownerID=t,this.keyHash=e,this.entry=r}function Ct(t,e,r){this._type=e,this._reverse=r,this._stack=t._root&&Vt(t._root)}function Ft(t,e){return b(t,e[0],e[1])}function Vt(t,e){return{node:t,index:0,__prev:e}}function Gt(t,e,r,n){var i=Object.create(Tr);return i.size=t,i._root=e,i.__ownerID=r,i.__hash=n,i.__altered=!1,i}function Ht(){return Lr||(Lr=Gt(0))}function Xt(t,r,n){var i,o;if(t._root){var u=e(pr),a=e(lr);if(i=Yt(t._root,t.__ownerID,0,void 0,r,n,u,a),!a.value)return t;o=t.size+(u.value?n===hr?-1:1:0)}else{if(n===hr)return t;o=1,i=new Lt(t.__ownerID,[[r,n]])}return t.__ownerID?(t.size=o,t._root=i,t.__hash=void 0,t.__altered=!0,t):i?Gt(o,i):Ht()}function Yt(t,e,n,i,o,u,a,s){return t?t.update(e,n,i,o,u,a,s):u===hr?t:(r(s),r(a),new Nt(e,i,[o,u]))}function Qt(t){return t.constructor===Nt||t.constructor===Wt}function Zt(t,e,r,n,i){if(t.keyHash===n)return new Wt(e,n,[t.entry,i]);var o,u=(0===r?t.keyHash:t.keyHash>>>r)&fr,a=(0===r?n:n>>>r)&fr,s=u===a?[Zt(t,e,r+sr,n,i)]:(o=new Nt(e,n,i),a>u?[t,o]:[o,t]);return new Bt(e,1<a;a++,s<<=1){var f=e[a];void 0!==f&&a!==n&&(i|=s,u[o++]=f)}return new Bt(t,i,u)}function ee(t,e,r,n,i){for(var o=0,u=new Array(cr),a=0;0!==r;a++,r>>>=1)u[a]=1&r?e[o++]:void 0;return u[n]=i,new Jt(t,o+1,u)}function re(t,e,r){for(var n=[],i=0;i>1&1431655765,t=(858993459&t)+(t>>2&858993459),t=t+(t>>4)&252645135,t+=t>>8,t+=t>>16,127&t}function ae(t,e,r,n){var o=n?t:i(t);return o[e]=r,o}function se(t,e,r,n){var i=t.length+1;if(n&&e+1===i)return t[e]=r,t;for(var o=new Array(i),u=0,a=0;i>a;a++)a===e?(o[a]=r,u=-1):o[a]=t[a+u];return o}function ce(t,e,r){var n=t.length-1;if(r&&e===n)return t.pop(),t;for(var i=new Array(n),o=0,u=0;n>u;u++)u===e&&(o=1),i[u]=t[u+o];return i}function fe(t){var e=ve();if(null===t||void 0===t)return e;if(he(t))return t;var r=_(t),n=r.size;return 0===n?e:(at(n),n>0&&cr>n?_e(0,n,sr,null,new pe(r.toArray())):e.withMutations(function(t){t.setSize(n),r.forEach(function(e,r){return t.set(r,e)})}))}function he(t){return!(!t||!t[Nr])}function pe(t,e){this.array=t,this.ownerID=e}function le(t,e){function r(t,e,r){return 0===e?n(t,r):i(t,e,r)}function n(t,r){var n=r===a?s&&s.array:t&&t.array,i=r>o?0:o-r,c=u-r;return c>cr&&(c=cr),function(){if(i===c)return Vr;var t=e?--c:i++;return n&&n[t]}}function i(t,n,i){var a,s=t&&t.array,c=i>o?0:o-i>>n,f=(u-i>>n)+1;return f>cr&&(f=cr),function(){for(;;){if(a){var t=a();if(t!==Vr)return t;a=null}if(c===f)return Vr;var o=e?--f:c++;a=r(s&&s[o],n-sr,i+(o<=t.size||0>r)return t.withMutations(function(t){0>r?Se(t,r).set(0,n):Se(t,0,r+1).set(r,n)});r+=t._origin;var i=t._tail,o=t._root,a=e(lr);return r>=be(t._capacity)?i=ye(i,t.__ownerID,0,r,n,a):o=ye(o,t.__ownerID,t._level,r,n,a),a.value?t.__ownerID?(t._root=o,t._tail=i,t.__hash=void 0,t.__altered=!0,t):_e(t._origin,t._capacity,t._level,o,i):t}function ye(t,e,n,i,o,u){var a=i>>>n&fr,s=t&&a0){var f=t&&t.array[a],h=ye(f,e,n-sr,i,o,u);return h===f?t:(c=ge(t,e),c.array[a]=h,c)}return s&&t.array[a]===o?t:(r(u),c=ge(t,e),void 0===o&&a===c.array.length-1?c.array.pop():c.array[a]=o,c)}function ge(t,e){return e&&t&&e===t.ownerID?t:new pe(t?t.array.slice():[],e)}function me(t,e){if(e>=be(t._capacity))return t._tail;if(e<1<0;)r=r.array[e>>>n&fr],n-=sr;return r}}function Se(t,e,r){void 0!==e&&(e=0|e),void 0!==r&&(r=0|r);var i=t.__ownerID||new n,o=t._origin,u=t._capacity,a=o+e,s=void 0===r?u:0>r?u+r:o+r;if(a===o&&s===u)return t;if(a>=s)return t.clear();for(var c=t._level,f=t._root,h=0;0>a+h;)f=new pe(f&&f.array.length?[void 0,f]:[],i),c+=sr,h+=1<=1<l?me(t,s-1):l>p?new pe([],i):_;if(_&&l>p&&u>a&&_.array.length){f=ge(f,i);for(var d=f,y=c;y>sr;y-=sr){var g=p>>>y&fr;d=d.array[g]=ge(d.array[g],i)}d.array[p>>>sr&fr]=_}if(u>s&&(v=v&&v.removeAfter(i,0,s)),a>=l)a-=l,s-=l,c=sr,f=null,v=v&&v.removeBefore(i,0,a);else if(a>o||p>l){for(h=0;f;){var m=a>>>c&fr;if(m!==l>>>c&fr)break;m&&(h+=(1<o&&(f=f.removeBefore(i,c,a-h)),f&&p>l&&(f=f.removeAfter(i,c,l-h)),h&&(a-=h,s-=h)}return t.__ownerID?(t.size=s-a,t._origin=a,t._capacity=s,t._level=c,t._root=f,t._tail=v,t.__hash=void 0,t.__altered=!0,t):_e(a,s,c,f,v)}function we(t,e,r){for(var n=[],i=0,o=0;oi&&(i=a.size),d(u)||(a=a.map(function(t){return Y(t)})),n.push(a)}return i>t.size&&(t=t.setSize(i)),ie(t,e,n)}function be(t){return cr>t?0:t-1>>>sr<=cr&&u.size>=2*o.size?(i=u.filter(function(t,e){return void 0!==t&&a!==e}),n=i.toKeyedSeq().map(function(t){return t[0]}).flip().toMap(),t.__ownerID&&(n.__ownerID=i.__ownerID=t.__ownerID)):(n=o.remove(e),i=a===u.size-1?u.pop():u.set(a,void 0))}else if(s){if(r===u.get(a)[1])return t;n=o,i=u.set(a,[e,r])}else n=o.set(e,u.size),i=u.set(u.size,[e,r]);return t.__ownerID?(t.size=n.size,t._map=n,t._list=i,t.__hash=void 0,t):De(n,i)}function Ee(t){return null===t||void 0===t?ke():qe(t)?t:ke().unshiftAll(t)}function qe(t){return!(!t||!t[Hr])}function xe(t,e,r,n){var i=Object.create(Xr);return i.size=t,i._head=e,i.__ownerID=r,i.__hash=n,i.__altered=!1,i}function ke(){return Yr||(Yr=xe(0))}function Ae(t){return null===t||void 0===t?Ue():je(t)&&!S(t)?t:Ue().withMutations(function(e){var r=v(t);at(r.size),r.forEach(function(t){return e.add(t)})})}function je(t){return!(!t||!t[Qr])}function Re(t,e){return t.__ownerID?(t.size=e.size,t._map=e,t):e===t._map?t:0===e.size?t.__empty():t.__make(e)}function Ke(t,e){var r=Object.create(Zr);return r.size=t?t.size:0,r._map=t,r.__ownerID=e,r}function Ue(){return $r||($r=Ke(Ht()))}function Pe(t){return null===t||void 0===t?Be():Te(t)?t:Be().withMutations(function(e){var r=v(t);at(r.size),r.forEach(function(t){return e.add(t)})})}function Te(t){return je(t)&&S(t)}function Le(t,e){var r=Object.create(tn);return r.size=t?t.size:0,r._map=t,r.__ownerID=e,r}function Be(){return en||(en=Le(Oe()))}function Je(t,e){var r,n=function(o){if(o instanceof n)return o;if(!(this instanceof n))return new n(o);if(!r){r=!0;var u=Object.keys(t);Ce(i,u),i.size=u.length,i._name=e,i._keys=u,i._defaultValues=t}this._map=Pt(o)},i=n.prototype=Object.create(rn);return i.constructor=n,n}function We(t,e,r){var n=Object.create(Object.getPrototypeOf(t));return n._map=e,n.__ownerID=r,n}function Ne(t){return t._name||t.constructor.name||"Record"}function Ce(t,e){try{e.forEach(Fe.bind(void 0,t))}catch(r){}}function Fe(t,e){Object.defineProperty(t,e,{get:function(){return this.get(e)},set:function(t){ut(this.__ownerID,"Cannot set on an immutable record."),this.set(e,t)}})}function Ve(t,e){if(t===e)return!0;if(!d(e)||void 0!==t.size&&void 0!==e.size&&t.size!==e.size||void 0!==t.__hash&&void 0!==e.__hash&&t.__hash!==e.__hash||y(t)!==y(e)||g(t)!==g(e)||S(t)!==S(e))return!1;if(0===t.size&&0===e.size)return!0;var r=!m(t);if(S(t)){var n=t.entries();return e.every(function(t,e){var i=n.next().value;return i&&X(i[1],t)&&(r||X(i[0],e))})&&n.next().done}var i=!1;if(void 0===t.size)if(void 0===e.size)"function"==typeof t.cacheResult&&t.cacheResult();else{i=!0;var o=t;t=e,e=o}var u=!0,a=e.__iterate(function(e,n){return(r?t.has(e):i?X(e,t.get(n,hr)):X(t.get(n,hr),e))?void 0:(u=!1,!1)});return u&&t.size===a}function Ge(t,e,r){if(!(this instanceof Ge))return new Ge(t,e,r);if(ut(0!==r,"Cannot step a Range by 0"),t=t||0,void 0===e&&(e=1/0),r=void 0===r?1:Math.abs(r),t>e&&(r=-r),this._start=t,this._end=e,this._step=r,this.size=Math.max(0,Math.ceil((e-t)/r-1)+1),0===this.size){if(nn)return nn;nn=this}}function He(t,e){if(!(this instanceof He))return new He(t,e);if(this._value=t,this.size=void 0===e?1/0:Math.max(0,e),0===this.size){if(on)return on;on=this}}function Xe(t,e){var r=function(r){t.prototype[r]=e[r]};return Object.keys(e).forEach(r),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(e).forEach(r),t}function Ye(t,e){return e}function Qe(t,e){return[e,t]}function Ze(t){return function(){return!t.apply(this,arguments)}}function $e(t){return function(){return-t.apply(this,arguments)}}function tr(t){return"string"==typeof t?JSON.stringify(t):t}function er(){return i(arguments)}function rr(t,e){return e>t?1:t>e?-1:0}function nr(t){if(t.size===1/0)return 0;var e=S(t),r=y(t),n=e?1:0,i=t.__iterate(r?e?function(t,e){n=31*n+or(et(t),et(e))|0}:function(t,e){n=n+or(et(t),et(e))|0}:e?function(t){n=31*n+et(t)|0}:function(t){n=n+et(t)|0});return ir(i,n)}function ir(t,e){return e=Mr(e,3432918353),e=Mr(e<<15|e>>>-15,461845907),e=Mr(e<<13|e>>>-13,5),e=(e+3864292196|0)^t,e=Mr(e^e>>>16,2246822507),e=Mr(e^e>>>13,3266489909),e=tt(e^e>>>16)}function or(t,e){return t^e+2654435769+(t<<6)+(t>>2)|0}var ur=Array.prototype.slice,ar="delete",sr=5,cr=1<=i;i++)if(t(r[e?n-i:i],i,this)===!1)return i+1;return i},j.prototype.__iterator=function(t,e){var r=this._array,n=r.length-1,i=0;return new w(function(){return i>n?I():b(t,i,r[e?n-i++:i++])})},t(R,x),R.prototype.get=function(t,e){return void 0===e||this.has(t)?this._object[t]:e},R.prototype.has=function(t){return this._object.hasOwnProperty(t)},R.prototype.__iterate=function(t,e){for(var r=this._object,n=this._keys,i=n.length-1,o=0;i>=o;o++){var u=n[e?i-o:o];if(t(r[u],u,this)===!1)return o+1}return o},R.prototype.__iterator=function(t,e){var r=this._object,n=this._keys,i=n.length-1,o=0;return new w(function(){var u=n[e?i-o:o];return o++>i?I():b(t,u,r[u])})},R.prototype[yr]=!0,t(K,k),K.prototype.__iterateUncached=function(t,e){if(e)return this.cacheResult().__iterate(t,e);var r=this._iterable,n=O(r),i=0;if(D(n))for(var o;!(o=n.next()).done&&t(o.value,i++,this)!==!1;);return i},K.prototype.__iteratorUncached=function(t,e){if(e)return this.cacheResult().__iterator(t,e);var r=this._iterable,n=O(r);if(!D(n))return new w(I);var i=0;return new w(function(){var e=n.next();return e.done?e:b(t,i++,e.value)})},t(U,k),U.prototype.__iterateUncached=function(t,e){if(e)return this.cacheResult().__iterate(t,e);for(var r=this._iterator,n=this._iteratorCache,i=0;i=n.length){var e=r.next();if(e.done)return e;n[i]=e.value}return b(t,i,n[i++])})};var Dr;t(F,p),t(V,F),t(G,F),t(H,F),F.Keyed=V,F.Indexed=G,F.Set=H;var Or,Mr="function"==typeof Math.imul&&-2===Math.imul(4294967295,2)?Math.imul:function(t,e){t=0|t,e=0|e;var r=65535&t,n=65535&e;return r*n+((t>>>16)*n+r*(e>>>16)<<16>>>0)|0},Er=Object.isExtensible,qr=function(){try{return Object.defineProperty({},"@",{}),!0}catch(t){return!1}}(),xr="function"==typeof WeakMap;xr&&(Or=new WeakMap);var kr=0,Ar="__immutablehash__";"function"==typeof Symbol&&(Ar=Symbol(Ar));var jr=16,Rr=255,Kr=0,Ur={};t(st,x),st.prototype.get=function(t,e){return this._iter.get(t,e)},st.prototype.has=function(t){return this._iter.has(t)},st.prototype.valueSeq=function(){return this._iter.valueSeq()},st.prototype.reverse=function(){var t=this,e=_t(this,!0);return this._useKeys||(e.valueSeq=function(){return t._iter.toSeq().reverse()}),e},st.prototype.map=function(t,e){var r=this,n=lt(this,t,e);return this._useKeys||(n.valueSeq=function(){return r._iter.toSeq().map(t,e)}),n},st.prototype.__iterate=function(t,e){var r,n=this;return this._iter.__iterate(this._useKeys?function(e,r){return t(e,r,n)}:(r=e?kt(this):0,function(i){return t(i,e?--r:r++,n)}),e)},st.prototype.__iterator=function(t,e){if(this._useKeys)return this._iter.__iterator(t,e);var r=this._iter.__iterator(mr,e),n=e?kt(this):0;return new w(function(){var i=r.next();return i.done?i:b(t,e?--n:n++,i.value,i)})},st.prototype[yr]=!0,t(ct,k),ct.prototype.includes=function(t){return this._iter.includes(t)},ct.prototype.__iterate=function(t,e){var r=this,n=0;return this._iter.__iterate(function(e){return t(e,n++,r)},e)},ct.prototype.__iterator=function(t,e){var r=this._iter.__iterator(mr,e),n=0;return new w(function(){var e=r.next();return e.done?e:b(t,n++,e.value,e)})},t(ft,A),ft.prototype.has=function(t){return this._iter.includes(t)},ft.prototype.__iterate=function(t,e){var r=this;return this._iter.__iterate(function(e){return t(e,e,r)},e)},ft.prototype.__iterator=function(t,e){var r=this._iter.__iterator(mr,e);return new w(function(){var e=r.next();return e.done?e:b(t,e.value,e.value,e)})},t(ht,x),ht.prototype.entrySeq=function(){return this._iter.toSeq()},ht.prototype.__iterate=function(t,e){var r=this;return this._iter.__iterate(function(e){if(e){xt(e);var n=d(e);return t(n?e.get(1):e[1],n?e.get(0):e[0],r)}},e)},ht.prototype.__iterator=function(t,e){var r=this._iter.__iterator(mr,e);return new w(function(){for(;;){var e=r.next();if(e.done)return e;var n=e.value; +if(n){xt(n);var i=d(n);return b(t,i?n.get(0):n[0],i?n.get(1):n[1],e)}}})},ct.prototype.cacheResult=st.prototype.cacheResult=ft.prototype.cacheResult=ht.prototype.cacheResult=Rt,t(Pt,V),Pt.prototype.toString=function(){return this.__toString("Map {","}")},Pt.prototype.get=function(t,e){return this._root?this._root.get(0,void 0,t,e):e},Pt.prototype.set=function(t,e){return Xt(this,t,e)},Pt.prototype.setIn=function(t,e){return this.updateIn(t,hr,function(){return e})},Pt.prototype.remove=function(t){return Xt(this,t,hr)},Pt.prototype.deleteIn=function(t){return this.updateIn(t,function(){return hr})},Pt.prototype.update=function(t,e,r){return 1===arguments.length?t(this):this.updateIn([t],e,r)},Pt.prototype.updateIn=function(t,e,r){r||(r=e,e=void 0);var n=oe(this,Ut(t),e,r);return n===hr?void 0:n},Pt.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):Ht()},Pt.prototype.merge=function(){return re(this,void 0,arguments)},Pt.prototype.mergeWith=function(t){var e=ur.call(arguments,1);return re(this,t,e)},Pt.prototype.mergeIn=function(t){var e=ur.call(arguments,1);return this.updateIn(t,Ht(),function(t){return"function"==typeof t.merge?t.merge.apply(t,e):e[e.length-1]})},Pt.prototype.mergeDeep=function(){return re(this,ne(void 0),arguments)},Pt.prototype.mergeDeepWith=function(t){var e=ur.call(arguments,1);return re(this,ne(t),e)},Pt.prototype.mergeDeepIn=function(t){var e=ur.call(arguments,1);return this.updateIn(t,Ht(),function(t){return"function"==typeof t.mergeDeep?t.mergeDeep.apply(t,e):e[e.length-1]})},Pt.prototype.sort=function(t){return Ie(Dt(this,t))},Pt.prototype.sortBy=function(t,e){return Ie(Dt(this,e,t))},Pt.prototype.withMutations=function(t){var e=this.asMutable();return t(e),e.wasAltered()?e.__ensureOwner(this.__ownerID):this},Pt.prototype.asMutable=function(){return this.__ownerID?this:this.__ensureOwner(new n)},Pt.prototype.asImmutable=function(){return this.__ensureOwner()},Pt.prototype.wasAltered=function(){return this.__altered},Pt.prototype.__iterator=function(t,e){return new Ct(this,t,e)},Pt.prototype.__iterate=function(t,e){var r=this,n=0;return this._root&&this._root.iterate(function(e){return n++,t(e[1],e[0],r)},e),n},Pt.prototype.__ensureOwner=function(t){return t===this.__ownerID?this:t?Gt(this.size,this._root,t,this.__hash):(this.__ownerID=t,this.__altered=!1,this)},Pt.isMap=Tt;var Pr="@@__IMMUTABLE_MAP__@@",Tr=Pt.prototype;Tr[Pr]=!0,Tr[ar]=Tr.remove,Tr.removeIn=Tr.deleteIn,Lt.prototype.get=function(t,e,r,n){for(var i=this.entries,o=0,u=i.length;u>o;o++)if(X(r,i[o][0]))return i[o][1];return n},Lt.prototype.update=function(t,e,n,o,u,a,s){for(var c=u===hr,f=this.entries,h=0,p=f.length;p>h&&!X(o,f[h][0]);h++);var l=p>h;if(l?f[h][1]===u:c)return this;if(r(s),(c||!l)&&r(a),!c||1!==f.length){if(!l&&!c&&f.length>=Br)return $t(t,f,o,u);var _=t&&t===this.ownerID,v=_?f:i(f);return l?c?h===p-1?v.pop():v[h]=v.pop():v[h]=[o,u]:v.push([o,u]),_?(this.entries=v,this):new Lt(t,v)}},Bt.prototype.get=function(t,e,r,n){void 0===e&&(e=et(r));var i=1<<((0===t?e:e>>>t)&fr),o=this.bitmap;return 0===(o&i)?n:this.nodes[ue(o&i-1)].get(t+sr,e,r,n)},Bt.prototype.update=function(t,e,r,n,i,o,u){void 0===r&&(r=et(n));var a=(0===e?r:r>>>e)&fr,s=1<=Jr)return ee(t,p,c,a,_);if(f&&!_&&2===p.length&&Qt(p[1^h]))return p[1^h];if(f&&_&&1===p.length&&Qt(_))return _;var v=t&&t===this.ownerID,d=f?_?c:c^s:c|s,y=f?_?ae(p,h,_,v):ce(p,h,v):se(p,h,_,v);return v?(this.bitmap=d,this.nodes=y,this):new Bt(t,d,y)},Jt.prototype.get=function(t,e,r,n){void 0===e&&(e=et(r));var i=(0===t?e:e>>>t)&fr,o=this.nodes[i];return o?o.get(t+sr,e,r,n):n},Jt.prototype.update=function(t,e,r,n,i,o,u){void 0===r&&(r=et(n));var a=(0===e?r:r>>>e)&fr,s=i===hr,c=this.nodes,f=c[a];if(s&&!f)return this;var h=Yt(f,t,e+sr,r,n,i,o,u);if(h===f)return this;var p=this.count;if(f){if(!h&&(p--,Wr>p))return te(t,c,p,a)}else p++;var l=t&&t===this.ownerID,_=ae(c,a,h,l);return l?(this.count=p,this.nodes=_,this):new Jt(t,p,_)},Wt.prototype.get=function(t,e,r,n){for(var i=this.entries,o=0,u=i.length;u>o;o++)if(X(r,i[o][0]))return i[o][1];return n},Wt.prototype.update=function(t,e,n,o,u,a,s){void 0===n&&(n=et(o));var c=u===hr;if(n!==this.keyHash)return c?this:(r(s),r(a),Zt(this,t,e,n,[o,u]));for(var f=this.entries,h=0,p=f.length;p>h&&!X(o,f[h][0]);h++);var l=p>h;if(l?f[h][1]===u:c)return this;if(r(s),(c||!l)&&r(a),c&&2===p)return new Nt(t,this.keyHash,f[1^h]);var _=t&&t===this.ownerID,v=_?f:i(f);return l?c?h===p-1?v.pop():v[h]=v.pop():v[h]=[o,u]:v.push([o,u]),_?(this.entries=v,this):new Wt(t,this.keyHash,v)},Nt.prototype.get=function(t,e,r,n){return X(r,this.entry[0])?this.entry[1]:n},Nt.prototype.update=function(t,e,n,i,o,u,a){var s=o===hr,c=X(i,this.entry[0]);return(c?o===this.entry[1]:s)?this:(r(a),s?void r(u):c?t&&t===this.ownerID?(this.entry[1]=o,this):new Nt(t,this.keyHash,[i,o]):(r(u),Zt(this,t,e,et(i),[i,o])))},Lt.prototype.iterate=Wt.prototype.iterate=function(t,e){for(var r=this.entries,n=0,i=r.length-1;i>=n;n++)if(t(r[e?i-n:n])===!1)return!1},Bt.prototype.iterate=Jt.prototype.iterate=function(t,e){for(var r=this.nodes,n=0,i=r.length-1;i>=n;n++){var o=r[e?i-n:n];if(o&&o.iterate(t,e)===!1)return!1}},Nt.prototype.iterate=function(t,e){return t(this.entry)},t(Ct,w),Ct.prototype.next=function(){for(var t=this._type,e=this._stack;e;){var r,n=e.node,i=e.index++;if(n.entry){if(0===i)return Ft(t,n.entry)}else if(n.entries){if(r=n.entries.length-1,r>=i)return Ft(t,n.entries[this._reverse?r-i:i])}else if(r=n.nodes.length-1,r>=i){var o=n.nodes[this._reverse?r-i:i];if(o){if(o.entry)return Ft(t,o.entry);e=this._stack=Vt(o,e)}continue}e=this._stack=this._stack.__prev}return I()};var Lr,Br=cr/4,Jr=cr/2,Wr=cr/4;t(fe,G),fe.of=function(){return this(arguments)},fe.prototype.toString=function(){return this.__toString("List [","]")},fe.prototype.get=function(t,e){if(t=u(this,t),t>=0&&t>>e&fr;if(n>=this.array.length)return new pe([],t);var i,o=0===n;if(e>0){var u=this.array[n];if(i=u&&u.removeBefore(t,e-sr,r),i===u&&o)return this}if(o&&!i)return this;var a=ge(this,t);if(!o)for(var s=0;n>s;s++)a.array[s]=void 0;return i&&(a.array[n]=i),a},pe.prototype.removeAfter=function(t,e,r){if(r===(e?1<>>e&fr;if(n>=this.array.length)return this;var i;if(e>0){var o=this.array[n];if(i=o&&o.removeAfter(t,e-sr,r),i===o&&n===this.array.length-1)return this}var u=ge(this,t);return u.array.splice(n+1),i&&(u.array[n]=i),u};var Fr,Vr={};t(Ie,Pt),Ie.of=function(){return this(arguments)},Ie.prototype.toString=function(){return this.__toString("OrderedMap {","}")},Ie.prototype.get=function(t,e){var r=this._map.get(t);return void 0!==r?this._list.get(r)[1]:e},Ie.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._map.clear(),this._list.clear(),this):Oe()},Ie.prototype.set=function(t,e){return Me(this,t,e)},Ie.prototype.remove=function(t){return Me(this,t,hr)},Ie.prototype.wasAltered=function(){return this._map.wasAltered()||this._list.wasAltered()},Ie.prototype.__iterate=function(t,e){var r=this;return this._list.__iterate(function(e){return e&&t(e[1],e[0],r)},e)},Ie.prototype.__iterator=function(t,e){return this._list.fromEntrySeq().__iterator(t,e)},Ie.prototype.__ensureOwner=function(t){if(t===this.__ownerID)return this;var e=this._map.__ensureOwner(t),r=this._list.__ensureOwner(t);return t?De(e,r,t,this.__hash):(this.__ownerID=t,this._map=e,this._list=r,this)},Ie.isOrderedMap=ze,Ie.prototype[yr]=!0,Ie.prototype[ar]=Ie.prototype.remove;var Gr;t(Ee,G),Ee.of=function(){return this(arguments)},Ee.prototype.toString=function(){return this.__toString("Stack [","]")},Ee.prototype.get=function(t,e){var r=this._head;for(t=u(this,t);r&&t--;)r=r.next;return r?r.value:e},Ee.prototype.peek=function(){return this._head&&this._head.value},Ee.prototype.push=function(){if(0===arguments.length)return this;for(var t=this.size+arguments.length,e=this._head,r=arguments.length-1;r>=0;r--)e={value:arguments[r],next:e};return this.__ownerID?(this.size=t,this._head=e,this.__hash=void 0,this.__altered=!0,this):xe(t,e)},Ee.prototype.pushAll=function(t){if(t=_(t),0===t.size)return this;at(t.size);var e=this.size,r=this._head;return t.reverse().forEach(function(t){e++,r={value:t,next:r}}),this.__ownerID?(this.size=e,this._head=r,this.__hash=void 0,this.__altered=!0,this):xe(e,r)},Ee.prototype.pop=function(){return this.slice(1)},Ee.prototype.unshift=function(){return this.push.apply(this,arguments)},Ee.prototype.unshiftAll=function(t){return this.pushAll(t)},Ee.prototype.shift=function(){return this.pop.apply(this,arguments)},Ee.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._head=void 0,this.__hash=void 0,this.__altered=!0,this):ke()},Ee.prototype.slice=function(t,e){if(s(t,e,this.size))return this;var r=c(t,this.size),n=f(e,this.size);if(n!==this.size)return G.prototype.slice.call(this,t,e);for(var i=this.size-r,o=this._head;r--;)o=o.next;return this.__ownerID?(this.size=i,this._head=o,this.__hash=void 0,this.__altered=!0,this):xe(i,o)},Ee.prototype.__ensureOwner=function(t){return t===this.__ownerID?this:t?xe(this.size,this._head,t,this.__hash):(this.__ownerID=t,this.__altered=!1,this)},Ee.prototype.__iterate=function(t,e){if(e)return this.reverse().__iterate(t);for(var r=0,n=this._head;n&&t(n.value,r++,this)!==!1;)n=n.next;return r},Ee.prototype.__iterator=function(t,e){if(e)return this.reverse().__iterator(t);var r=0,n=this._head;return new w(function(){if(n){var e=n.value;return n=n.next,b(t,r++,e)}return I()})},Ee.isStack=qe;var Hr="@@__IMMUTABLE_STACK__@@",Xr=Ee.prototype;Xr[Hr]=!0,Xr.withMutations=Tr.withMutations,Xr.asMutable=Tr.asMutable,Xr.asImmutable=Tr.asImmutable,Xr.wasAltered=Tr.wasAltered;var Yr;t(Ae,H),Ae.of=function(){return this(arguments)},Ae.fromKeys=function(t){return this(l(t).keySeq())},Ae.prototype.toString=function(){return this.__toString("Set {","}")},Ae.prototype.has=function(t){return this._map.has(t)},Ae.prototype.add=function(t){return Re(this,this._map.set(t,!0))},Ae.prototype.remove=function(t){return Re(this,this._map.remove(t))},Ae.prototype.clear=function(){return Re(this,this._map.clear())},Ae.prototype.union=function(){var t=ur.call(arguments,0);return t=t.filter(function(t){return 0!==t.size}),0===t.length?this:0!==this.size||this.__ownerID||1!==t.length?this.withMutations(function(e){for(var r=0;r1?" by "+this._step:"")+" ]"},Ge.prototype.get=function(t,e){return this.has(t)?this._start+u(this,t)*this._step:e},Ge.prototype.includes=function(t){var e=(t-this._start)/this._step;return e>=0&&e=e?new Ge(0,0):new Ge(this.get(t,this._end),this.get(e,this._end),this._step))},Ge.prototype.indexOf=function(t){var e=t-this._start;if(e%this._step===0){var r=e/this._step;if(r>=0&&r=o;o++){if(t(i,o,this)===!1)return o+1;i+=e?-n:n}return o},Ge.prototype.__iterator=function(t,e){var r=this.size-1,n=this._step,i=e?this._start+r*n:this._start,o=0;return new w(function(){var u=i;return i+=e?-n:n,o>r?I():b(t,o++,u)})},Ge.prototype.equals=function(t){return t instanceof Ge?this._start===t._start&&this._end===t._end&&this._step===t._step:Ve(this,t)};var nn;t(He,k),He.prototype.toString=function(){return 0===this.size?"Repeat []":"Repeat [ "+this._value+" "+this.size+" times ]"},He.prototype.get=function(t,e){return this.has(t)?this._value:e},He.prototype.includes=function(t){return X(this._value,t)},He.prototype.slice=function(t,e){var r=this.size;return s(t,e,r)?this:new He(this._value,f(e,r)-c(t,r))},He.prototype.reverse=function(){return this},He.prototype.indexOf=function(t){return X(this._value,t)?0:-1},He.prototype.lastIndexOf=function(t){return X(this._value,t)?this.size:-1},He.prototype.__iterate=function(t,e){for(var r=0;rt?this.count():this.size);var n=this.slice(0,t);return qt(this,1===r?n:n.concat(i(arguments,2),this.slice(t+e)))},findLastIndex:function(t,e){var r=this.toKeyedSeq().findLastKey(t,e);return void 0===r?-1:r},first:function(){return this.get(0)},flatten:function(t){return qt(this,bt(this,t,!1))},get:function(t,e){return t=u(this,t),0>t||this.size===1/0||void 0!==this.size&&t>this.size?e:this.find(function(e,r){return r===t},void 0,e)},has:function(t){return t=u(this,t),t>=0&&(void 0!==this.size?this.size===1/0||t-1&&t%1===0&&t<=Number.MAX_VALUE}var i=Function.prototype.bind;e.isString=function(t){return"string"==typeof t||"[object String]"===r(t)},e.isArray=Array.isArray||function(t){return"[object Array]"===r(t)},"function"!=typeof/./&&"object"!=typeof Int8Array?e.isFunction=function(t){return"function"==typeof t||!1}:e.isFunction=function(t){return"[object Function]"===toString.call(t)},e.isObject=function(t){var e=typeof t;return"function"===e||"object"===e&&!!t},e.extend=function(t){var e=arguments.length;if(!t||2>e)return t||{};for(var r=1;e>r;r++)for(var n=arguments[r],i=Object.keys(n),o=i.length,u=0;o>u;u++){var a=i[u];t[a]=n[a]}return t},e.clone=function(t){return e.isObject(t)?e.isArray(t)?t.slice():e.extend({},t):t},e.each=function(t,e,r){var i,o,u=t?t.length:0,a=-1;if(r&&(o=e,e=function(t,e,n){return o.call(r,t,e,n)}),n(u))for(;++an;n++)r[n]=arguments[n];return new(i.apply(t,[null].concat(r)))};return e.__proto__=t,e.prototype=t.prototype,e}},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function i(t){return c["default"].Iterable.isIterable(t)}function o(t){return i(t)||!f.isObject(t)}function u(t){return i(t)?t.toJS():t}function a(t){return i(t)?t:c["default"].fromJS(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.isImmutable=i,e.isImmutableValue=o,e.toJS=u,e.toImmutable=a;var s=r(3),c=n(s),f=r(4)},function(t,e,r){"use strict";function n(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e["default"]=t,e}function i(t){return t&&t.__esModule?t:{"default":t}}function o(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function u(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var r=0;r0)){var e=this.reactorState.get("dirtyStores");if(0!==e.size){var r=c["default"].Set().withMutations(function(r){r.union(t.observerState.get("any")),e.forEach(function(e){var n=t.observerState.getIn(["stores",e]);n&&r.union(n)})});r.forEach(function(e){var r=t.observerState.getIn(["observersMap",e]);if(r){var n=r.get("getter"),i=r.get("handler"),o=l.evaluate(t.prevReactorState,n),u=l.evaluate(t.reactorState,n);t.prevReactorState=o.reactorState, +t.reactorState=u.reactorState;var a=o.result,s=u.result;c["default"].is(a,s)||i.call(null,s)}});var n=l.resetDirtyStores(this.reactorState);this.prevReactorState=n,this.reactorState=n}}}},{key:"batchStart",value:function(){this.__batchDepth++}},{key:"batchEnd",value:function(){if(this.__batchDepth--,this.__batchDepth<=0){this.__isDispatching=!0;try{this.__notify()}catch(t){throw this.__isDispatching=!1,t}this.__isDispatching=!1}}}]),t}();e["default"]=y.toFactory(m),t.exports=e["default"]},function(t,e,r){"use strict";function n(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function i(t,e){var r={};return o.each(e,function(e,n){r[n]=t.evaluate(e)}),r}Object.defineProperty(e,"__esModule",{value:!0});var o=r(4);e["default"]=function(t){return{getInitialState:function(){return i(t,this.getDataBindings())},componentDidMount:function(){var e=this;this.__unwatchFns=[],o.each(this.getDataBindings(),function(r,i){var o=t.observe(r,function(t){e.setState(n({},i,t))});e.__unwatchFns.push(o)})},componentWillUnmount:function(){for(;this.__unwatchFns.length;)this.__unwatchFns.shift()()}}},t.exports=e["default"]},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){return new A({result:t,reactorState:e})}function o(t,e){return t.withMutations(function(t){k.each(e,function(e,r){t.getIn(["stores",r])&&console.warn("Store already defined for id = "+r);var n=e.getInitialState();if(void 0===n&&f(t,"throwOnUndefinedStoreReturnValue"))throw new Error("Store getInitialState() must return a value, did you forget a return statement");if(f(t,"throwOnNonImmutableStore")&&!E.isImmutableValue(n))throw new Error("Store getInitialState() must return an immutable value, did you forget to call toImmutable");t.update("stores",function(t){return t.set(r,e)}).update("state",function(t){return t.set(r,n)}).update("dirtyStores",function(t){return t.add(r)}).update("storeStates",function(t){return I(t,[r])})}),b(t)})}function u(t,e){return t.withMutations(function(t){k.each(e,function(e,r){t.update("stores",function(t){return t.set(r,e)})})})}function a(t,e,r){if(void 0===e&&f(t,"throwOnUndefinedActionType"))throw new Error("`dispatch` cannot be called with an `undefined` action type.");var n=t.get("state"),i=t.get("dirtyStores"),o=n.withMutations(function(n){M["default"].dispatchStart(t,e,r),t.get("stores").forEach(function(o,u){var a=n.get(u),s=void 0;try{s=o.handle(a,e,r)}catch(c){throw M["default"].dispatchError(t,c.message),c}if(void 0===s&&f(t,"throwOnUndefinedStoreReturnValue")){var h="Store handler must return a value, did you forget a return statement";throw M["default"].dispatchError(t,h),new Error(h)}n.set(u,s),a!==s&&(i=i.add(u))}),M["default"].dispatchEnd(t,n,i)}),u=t.set("state",o).set("dirtyStores",i).update("storeStates",function(t){return I(t,i)});return b(u)}function s(t,e){var r=[],n=E.toImmutable({}).withMutations(function(n){k.each(e,function(e,i){var o=t.getIn(["stores",i]);if(o){var u=o.deserialize(e);void 0!==u&&(n.set(i,u),r.push(i))}})}),i=D["default"].Set(r);return t.update("state",function(t){return t.merge(n)}).update("dirtyStores",function(t){return t.union(i)}).update("storeStates",function(t){return I(t,r)})}function c(t,e,r){var n=e;x.isKeyPath(e)&&(e=q.fromKeyPath(e));var i=t.get("nextId"),o=q.getStoreDeps(e),u=D["default"].Map({id:i,storeDeps:o,getterKey:n,getter:e,handler:r}),a=void 0;return a=0===o.size?t.update("any",function(t){return t.add(i)}):t.withMutations(function(t){o.forEach(function(e){var r=["stores",e];t.hasIn(r)||t.setIn(r,D["default"].Set()),t.updateIn(["stores",e],function(t){return t.add(i)})})}),a=a.set("nextId",i+1).setIn(["observersMap",i],u),{observerState:a,entry:u}}function f(t,e){var r=t.getIn(["options",e]);if(void 0===r)throw new Error("Invalid option: "+e);return r}function h(t,e,r){var n=t.get("observersMap").filter(function(t){var n=t.get("getterKey"),i=!r||t.get("handler")===r;return i?x.isKeyPath(e)&&x.isKeyPath(n)?x.isEqual(e,n):e===n:!1});return t.withMutations(function(t){n.forEach(function(e){return p(t,e)})})}function p(t,e){return t.withMutations(function(t){var r=e.get("id"),n=e.get("storeDeps");0===n.size?t.update("any",function(t){return t.remove(r)}):n.forEach(function(e){t.updateIn(["stores",e],function(t){return t?t.remove(r):t})}),t.removeIn(["observersMap",r])})}function l(t){var e=t.get("state");return t.withMutations(function(t){var r=t.get("stores"),n=r.keySeq().toJS();r.forEach(function(r,n){var i=e.get(n),o=r.handleReset(i);if(void 0===o&&f(t,"throwOnUndefinedStoreReturnValue"))throw new Error("Store handleReset() must return a value, did you forget a return statement");if(f(t,"throwOnNonImmutableStore")&&!E.isImmutableValue(o))throw new Error("Store reset state must be an immutable value, did you forget to call toImmutable");t.setIn(["state",n],o)}),t.update("storeStates",function(t){return I(t,n)}),d(t)})}function _(t,e){var r=t.get("state");if(x.isKeyPath(e))return i(r.getIn(e),t);if(!q.isGetter(e))throw new Error("evaluate must be passed a keyPath or Getter");if(m(t,e))return i(w(t,e),t);var n=q.getDeps(e).map(function(e){return _(t,e).result}),o=q.getComputeFn(e).apply(null,n);return i(o,S(t,e,o))}function v(t){var e={};return t.get("stores").forEach(function(r,n){var i=t.getIn(["state",n]),o=r.serialize(i);void 0!==o&&(e[n]=o)}),e}function d(t){return t.set("dirtyStores",D["default"].Set())}function y(t){return t}function g(t,e){var r=y(e);return t.getIn(["cache",r])}function m(t,e){var r=g(t,e);if(!r)return!1;var n=r.get("storeStates");return 0===n.size?!1:n.every(function(e,r){return t.getIn(["storeStates",r])===e})}function S(t,e,r){var n=y(e),i=t.get("dispatchId"),o=q.getStoreDeps(e),u=E.toImmutable({}).withMutations(function(e){o.forEach(function(r){var n=t.getIn(["storeStates",r]);e.set(r,n)})});return t.setIn(["cache",n],D["default"].Map({value:r,storeStates:u,dispatchId:i}))}function w(t,e){var r=y(e);return t.getIn(["cache",r,"value"])}function b(t){return t.update("dispatchId",function(t){return t+1})}function I(t,e){return t.withMutations(function(t){e.forEach(function(e){var r=t.has(e)?t.get(e)+1:1;t.set(e,r)})})}Object.defineProperty(e,"__esModule",{value:!0}),e.registerStores=o,e.replaceStores=u,e.dispatch=a,e.loadState=s,e.addObserver=c,e.getOption=f,e.removeObserver=h,e.removeObserverByEntry=p,e.reset=l,e.evaluate=_,e.serialize=v,e.resetDirtyStores=d;var z=r(3),D=n(z),O=r(9),M=n(O),E=r(5),q=r(10),x=r(11),k=r(4),A=D["default"].Record({result:null,reactorState:null})},function(t,e,r){"use strict";var n=r(8);e.dispatchStart=function(t,e,r){n.getOption(t,"logDispatches")&&console.group&&(console.groupCollapsed("Dispatch: %s",e),console.group("payload"),console.debug(r),console.groupEnd())},e.dispatchError=function(t,e){n.getOption(t,"logDispatches")&&console.group&&(console.debug("Dispatch error: "+e),console.groupEnd())},e.dispatchEnd=function(t,e,r){n.getOption(t,"logDispatches")&&console.group&&(n.getOption(t,"logDirtyStores")&&console.log("Stores updated:",r.toList().toJS()),n.getOption(t,"logAppState")&&console.debug("Dispatch done, new state: ",e.toJS()),console.groupEnd())}},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function i(t){return p.isArray(t)&&p.isFunction(t[t.length-1])}function o(t){return t[t.length-1]}function u(t){return t.slice(0,t.length-1)}function a(t,e){e||(e=h["default"].Set());var r=h["default"].Set().withMutations(function(e){if(!i(t))throw new Error("getFlattenedDeps must be passed a Getter");u(t).forEach(function(t){if(l.isKeyPath(t))e.add(f.List(t));else{if(!i(t))throw new Error("Invalid getter, each dependency must be a KeyPath or Getter");e.union(a(t))}})});return e.union(r)}function s(t){if(!l.isKeyPath(t))throw new Error("Cannot create Getter from KeyPath: "+t);return[t,_]}function c(t){if(t.hasOwnProperty("__storeDeps"))return t.__storeDeps;var e=a(t).map(function(t){return t.first()}).filter(function(t){return!!t});return Object.defineProperty(t,"__storeDeps",{enumerable:!1,configurable:!1,writable:!1,value:e}),e}Object.defineProperty(e,"__esModule",{value:!0});var f=r(3),h=n(f),p=r(4),l=r(11),_=function(t){return t};e["default"]={isGetter:i,getComputeFn:o,getFlattenedDeps:a,getStoreDeps:c,getDeps:u,fromKeyPath:s},t.exports=e["default"]},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function i(t){return s.isArray(t)&&!s.isFunction(t[t.length-1])}function o(t,e){var r=a["default"].List(t),n=a["default"].List(e);return a["default"].is(r,n)}Object.defineProperty(e,"__esModule",{value:!0}),e.isKeyPath=i,e.isEqual=o;var u=r(3),a=n(u),s=r(4)},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(3),i=n.Map({logDispatches:!1,logAppState:!1,logDirtyStores:!1,throwOnUndefinedActionType:!1,throwOnUndefinedStoreReturnValue:!1,throwOnNonImmutableStore:!1,throwOnDispatchInDispatch:!1});e.PROD_OPTIONS=i;var o=n.Map({logDispatches:!0,logAppState:!0,logDirtyStores:!0,throwOnUndefinedActionType:!0,throwOnUndefinedStoreReturnValue:!0,throwOnNonImmutableStore:!0,throwOnDispatchInDispatch:!0});e.DEBUG_OPTIONS=o;var u=n.Record({dispatchId:0,state:n.Map(),stores:n.Map(),cache:n.Map(),storeStates:n.Map(),dirtyStores:n.Set(),debug:!1,options:i});e.ReactorState=u;var a=n.Record({any:n.Set(),stores:n.Map({}),observersMap:n.Map({}),nextId:1});e.ObserverState=a}])}); \ No newline at end of file diff --git a/examples/hot-reloading/package.json b/examples/hot-reloading/package.json index 46fee4f..76d1f85 100644 --- a/examples/hot-reloading/package.json +++ b/examples/hot-reloading/package.json @@ -11,6 +11,8 @@ "license": "MIT", "dependencies": { "react": "^0.14.3", + "nuclear-js": "^1.3.0", + "nuclear-js-react-addons": "^0.3.1", "react-dom": "^0.14.3" }, "devDependencies": { diff --git a/package.json b/package.json index 827f266..905f7ae 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "nuclear-js", - "version": "1.2.1", + "version": "1.3.0", "description": "Immutable, reactive Flux architecture. UI Agnostic.", "main": "dist/nuclear.js", "scripts": {