From ca445de74e3473ace9734e57662f56ab68fb368d Mon Sep 17 00:00:00 2001 From: Josh Perez Date: Fri, 25 Mar 2016 15:47:12 -0700 Subject: [PATCH] Checking in dist --- dist/alt.js | 1 + dist/alt.min.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/dist/alt.js b/dist/alt.js index 637a7cd8..6c83bcef 100644 --- a/dist/alt.js +++ b/dist/alt.js @@ -1600,6 +1600,7 @@ return /******/ (function(modules) { // webpackBootstrap loadCounter -= 1; action(intercept(x, action, args)); if (isError) throw x; + return x; } return fire; diff --git a/dist/alt.min.js b/dist/alt.min.js index 854116dd..f5633473 100644 --- a/dist/alt.min.js +++ b/dist/alt.min.js @@ -1 +1 @@ -!function(t,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define([],n):"object"==typeof exports?exports.Alt=n():t.Alt=n()}(this,function(){return function(t){function n(r){if(e[r])return e[r].exports;var i=e[r]={exports:{},id:r,loaded:!1};return t[r].call(i.exports,i,i.exports,n),i.loaded=!0,i.exports}var e={};return n.m=t,n.c=e,n.p="",n(0)}([function(t,n,e){t.exports=e(6)},function(t,n){"use strict";function e(t){var n=t.constructor;return!!t&&"[object Object]"===Object.prototype.toString.call(t)&&o(n)&&!Object.isFrozen(t)&&(n instanceof n||"AltStore"===t.type)}function r(t,n){n.forEach(function(n){Object.keys(Object(n)).forEach(function(e){t(e,n[e])})})}function i(t){for(var n=arguments.length,e=Array(n>1?n-1:0),i=1;n>i;i++)e[i-1]=arguments[i];return r(function(n,e){return t[n]=e},e),t}Object.defineProperty(n,"__esModule",{value:!0}),n.isMutableObject=e,n.eachObject=r,n.assign=i;var o=n.isFunction=function(t){return"function"==typeof t}},function(t,n,e){"use strict";function r(t){if(t&&t.__esModule)return t;var n={};if(null!=t)for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&(n[e]=t[e]);return n["default"]=t,n}function i(t,n){var e=n?v:y,r=n?t.prototype:t;return Object.getOwnPropertyNames(r).reduce(function(t,n){return-1!==e.indexOf(n)?t:(t[n]=r[n],t)},{})}function o(t){var n=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];return t===Function.prototype?n:o(Object.getPrototypeOf(t),g.assign(n,i(t,!0)))}function a(t){"undefined"!=typeof console&&console.warn(new ReferenceError(t))}function s(t,n){for(var e=0,r=n;Object.hasOwnProperty.call(t,r);)r=n+String(++e);return r}function c(t){return t.replace(/[a-z]([A-Z])/g,function(t){return String(t[0])+"_"+String(t[1].toLowerCase())}).toUpperCase()}function u(t){if(void 0===t)return null;for(var n=arguments.length,e=Array(n>1?n-1:0),r=1;n>r;r++)e[r-1]=arguments[r];return e.length?[t].concat(e):t}function f(t,n,e,r){return{type:n,payload:e,meta:h({dispatchId:t},r),id:t,action:n,data:e,details:r}}function l(t,n,e,r){var i=n.dispatch(e);if(void 0===i)return null;var o=n.id,a=o,s=o,c={id:o,namespace:a,name:s},u=function(t){return r.dispatch(o,t,c)};return g.isFunction(i)?i(u,r):r.dispatcher.dispatch(f(t,o,i,c))}function p(){}var h=Object.assign||function(t){for(var n=1;n=0&&t.splice(i,1)},i=function(n){t.push(n);var e=function(){return r(n)};return{dispose:e}},o=function(i){if(n)throw new Error("Cannot push while pushing");n=!0;try{t.forEach(function(t){return t(i)})}finally{n=!1,e=e.filter(r)}};return{subscribe:i,push:o,unsubscribe:r,subscriptions:t}}t.exports=e},function(t,n){function e(){u=!1,a.length?c=a.concat(c):f=-1,c.length&&r()}function r(){if(!u){var t=setTimeout(e);u=!0;for(var n=c.length;n;){for(a=c,c=[];++f1)for(var e=1;eo;o++)e[o]=arguments[o];var a=r.apply(i,e),f=a;return void 0===a||l["default"](a)||(s.isFunction(a)?f=a(c,t):c(a)),void 0===a&&u.warn("An action was called but nothing was dispatched"),f};f.defer=function(){for(var t=arguments.length,n=Array(t),e=0;t>e;e++)n[e]=arguments[e];return setTimeout(function(){return f.apply(null,n)})},f.id=o,f.data=a;var p=t.actions[n],h=u.uid(p,e);p[h]=f;var d=u.formatAsConstant(h);return p[d]=o,f}Object.defineProperty(n,"__esModule",{value:!0}),n["default"]=o;var a=e(1),s=i(a),c=e(2),u=i(c),f=e(14),l=r(f);t.exports=n["default"]},function(t,n,e){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t){if(t&&t.__esModule)return t;var n={};if(null!=t)for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&(n[e]=t[e]);return n["default"]=t,n}function o(t,n){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!n||"object"!=typeof n&&"function"!=typeof n?t:n}function a(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function, not "+typeof n);t.prototype=Object.create(n&&n.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),n&&(Object.setPrototypeOf?Object.setPrototypeOf(t,n):t.__proto__=n)}function s(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var c=e(11),u=e(10),f=i(u),l=e(1),p=i(l),h=e(9),d=i(h),g=e(2),y=i(g),v=e(5),b=r(v),m=function(){function t(){var n=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];s(this,t),this.config=n,this.serialize=n.serialize||JSON.stringify,this.deserialize=n.deserialize||JSON.parse,this.dispatcher=n.dispatcher||new c.Dispatcher,this.batchingFunction=n.batchingFunction||function(t){return t()},this.actions={global:{}},this.stores={},this.storeTransforms=n.storeTransforms||[],this.trapAsync=!1,this._actionsRegistry={},this._initSnapshot={},this._lastSnapshot={}}return t.prototype.dispatch=function(){function t(t,n,e){var r=this;this.batchingFunction(function(){var i=Math.random().toString(18).substr(2,16);if(t.hasOwnProperty("type")&&t.hasOwnProperty("payload")){var o={id:t.type,namespace:t.type,name:t.type};return r.dispatcher.dispatch(y.fsa(i,t.type,t.payload,o))}return t.id&&t.dispatch?y.dispatch(i,t,n,r):r.dispatcher.dispatch(y.fsa(i,t,n,e))})}return t}(),t.prototype.createUnsavedStore=function(){function t(t){var n=t.displayName||"";d.createStoreConfig(this.config,t);for(var e=d.transformStore(this.storeTransforms,t),r=arguments.length,i=Array(r>1?r-1:0),o=1;r>o;o++)i[o-1]=arguments[o];return p.isFunction(e)?d.createStoreFromClass.apply(d,[this,e,n].concat(i)):d.createStoreFromObject(this,e,n)}return t}(),t.prototype.createStore=function(){function t(t,n){var e=n||t.displayName||t.name||"";d.createStoreConfig(this.config,t);var r=d.transformStore(this.storeTransforms,t);(this.stores[e]||!e)&&(this.stores[e]?y.warn("A store named "+String(e)+" already exists, double check your store names or pass in your own custom identifier for each store"):y.warn("Store name was not specified"),e=y.uid(this.stores,e));for(var i=arguments.length,o=Array(i>2?i-2:0),a=2;i>a;a++)o[a-2]=arguments[a];var s=p.isFunction(r)?d.createStoreFromClass.apply(d,[this,r,e].concat(o)):d.createStoreFromObject(this,r,e);return this.stores[e]=s,f.saveInitialSnapshot(this,e),s}return t}(),t.prototype.generateActions=function(){function t(){for(var t={name:"global"},n=arguments.length,e=Array(n),r=0;n>r;r++)e[r]=arguments[r];return this.createActions(e.reduce(function(t,n){return t[n]=y.dispatchIdentity,t},t))}return t}(),t.prototype.createAction=function(){function t(t,n,e){return b["default"](this,"global",t,n,e)}return t}(),t.prototype.createActions=function(){function t(t){var n=this,e=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],r={},i=y.uid(this._actionsRegistry,t.displayName||t.name||"Unknown");if(p.isFunction(t)){p.assign(r,y.getPrototypeChain(t));for(var c=function(t){function n(){s(this,n);for(var e=arguments.length,r=Array(e),i=0;e>i;i++)r[i]=arguments[i];return o(this,t.call.apply(t,[this].concat(r)))}return a(n,t),n.prototype.generateActions=function(){function t(){for(var t=arguments.length,n=Array(t),e=0;t>e;e++)n[e]=arguments[e];n.forEach(function(t){r[t]=y.dispatchIdentity})}return t}(),n}(t),u=arguments.length,f=Array(u>2?u-2:0),l=2;u>l;l++)f[l-2]=arguments[l];p.assign(r,new(Function.prototype.bind.apply(c,[null].concat(f))))}else p.assign(r,t);return this.actions[i]=this.actions[i]||{},p.eachObject(function(t,r){if(!p.isFunction(r))return void(e[t]=r);e[t]=b["default"](n,i,t,r,e);var o=y.formatAsConstant(t);e[o]=e[t].id},[r]),e}return t}(),t.prototype.takeSnapshot=function(){function t(){for(var t=arguments.length,n=Array(t),e=0;t>e;e++)n[e]=arguments[e];var r=f.snapshot(this,n);return p.assign(this._lastSnapshot,r),this.serialize(r)}return t}(),t.prototype.rollback=function(){function t(){f.setAppState(this,this.serialize(this._lastSnapshot),function(t){t.lifecycle("rollback"),t.emitChange()})}return t}(),t.prototype.recycle=function(){function t(){for(var t=arguments.length,n=Array(t),e=0;t>e;e++)n[e]=arguments[e];var r=n.length?f.filterSnapshots(this,this._initSnapshot,n):this._initSnapshot;f.setAppState(this,this.serialize(r),function(t){t.lifecycle("init"),t.emitChange()})}return t}(),t.prototype.flush=function(){function t(){var t=this.serialize(f.snapshot(this));return this.recycle(),t}return t}(),t.prototype.bootstrap=function(){function t(t){f.setAppState(this,t,function(t,n){t.lifecycle("bootstrap",n),t.emitChange()})}return t}(),t.prototype.prepare=function(){function t(t,n){var e={};if(!t.displayName)throw new ReferenceError("Store provided does not have a name");return e[t.displayName]=n,this.serialize(e)}return t}(),t.prototype.addActions=function(){function t(t,n){for(var e=arguments.length,r=Array(e>2?e-2:0),i=2;e>i;i++)r[i-2]=arguments[i];this.actions[t]=Array.isArray(n)?this.generateActions.apply(this,n):this.createActions.apply(this,[n].concat(r))}return t}(),t.prototype.addStore=function(){function t(t,n){for(var e=arguments.length,r=Array(e>2?e-2:0),i=2;e>i;i++)r[i-2]=arguments[i];this.createStore.apply(this,[n,t].concat(r))}return t}(),t.prototype.getActions=function(){function t(t){return this.actions[t]}return t}(),t.prototype.getStore=function(){function t(t){return this.stores[t]}return t}(),t.debug=function(){function t(t,n,e){var r="alt.js.org",i=e;return i||"undefined"==typeof window||(i=window),"undefined"!=typeof i&&(i[r]=i[r]||[],i[r].push({name:t,alt:n})),n}return t}(),t}();n["default"]=m,t.exports=n["default"]},function(t,n,e){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t){if(t&&t.__esModule)return t;var n={};if(null!=t)for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&(n[e]=t[e]);return n["default"]=t,n}function o(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var a=e(1),s=i(a),c=e(3),u=r(c),f=function(){function t(n,e,r,i){var a=this;o(this,t);var c=e.lifecycleEvents;this.transmitter=u["default"](),this.lifecycle=function(t,n){c[t]&&c[t].push(n)},this.state=r,this.alt=n,this.preventDefault=!1,this.displayName=e.displayName,this.boundListeners=e.boundListeners,this.StoreModel=i,this.reduce=e.reduce||function(t){return t};var f=e.output||function(t){return t};this.emitChange=function(){return a.transmitter.push(f(a.state))};var l=function(t,n){try{return t()}catch(r){if(e.handlesOwnErrors)return a.lifecycle("error",{error:r,payload:n,state:a.state}),!1;throw r}};s.assign(this,e.publicMethods),this.dispatchToken=n.dispatcher.register(function(t){a.preventDefault=!1,a.lifecycle("beforeEach",{payload:t,state:a.state});var n=e.actionListeners[t.action];if(n||e.otherwise){var r=void 0;r=n?l(function(){return n.filter(Boolean).every(function(n){return n.call(e,t.data,t.action)!==!1})},t):l(function(){return e.otherwise(t.data,t.action)},t),r===!1||a.preventDefault||a.emitChange()}e.reduce&&(l(function(){var n=e.reduce(a.state,t);void 0!==n&&(a.state=n)},t),a.preventDefault||a.emitChange()),a.lifecycle("afterEach",{payload:t,state:a.state})}),this.lifecycle("init")}return t.prototype.listen=function(){function t(t){var n=this;if(!s.isFunction(t))throw new TypeError("listen expects a function");return this.transmitter.subscribe(t),function(){return n.unlisten(t)}}return t}(),t.prototype.unlisten=function(){function t(t){this.lifecycle("unlisten"),this.transmitter.unsubscribe(t)}return t}(),t.prototype.getState=function(){function t(){return this.StoreModel.config.getState.call(this,this.state)}return t}(),t}();n["default"]=f,t.exports=n["default"]},function(t,n,e){"use strict";function r(t){if(t&&t.__esModule)return t;var n={};if(null!=t)for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&(n[e]=t[e]);return n["default"]=t,n}function i(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(n,"__esModule",{value:!0});var o=e(3),a=i(o),s=e(1),c=r(s),u={waitFor:function(){function t(){for(var t=arguments.length,n=Array(t),e=0;t>e;e++)n[e]=arguments[e];if(!n.length)throw new ReferenceError("Dispatch tokens not provided");var r=n;1===n.length&&(r=Array.isArray(n[0])?n[0]:n);var i=r.map(function(t){return t.dispatchToken||t});this.dispatcher.waitFor(i)}return t}(),exportAsync:function(){function t(t){this.registerAsync(t)}return t}(),registerAsync:function(){function t(t){var n=this,e=0,r=c.isFunction(t)?t(this.alt):t,i=Object.keys(r).reduce(function(t,i){var o=r[i],a=c.isFunction(o)?o(n):o,s=["success","error","loading"];return s.forEach(function(t){if(a[t]&&!a[t].id)throw new Error(String(t)+" handler must be an action function")}),t[i]=function(){for(var t=arguments.length,r=Array(t),i=0;t>i;i++)r[i]=arguments[i];var o=n.getInstance().getState(),s=a.local&&a.local.apply(a,[o].concat(r)),c=a.shouldFetch?a.shouldFetch.apply(a,[o].concat(r)):null==s,u=a.interceptResponse||function(t){return t},f=function(){function t(t,i){return function(o){var a=function(){function n(){if(e-=1,t(u(o,t,r)),i)throw o}return n}();return n.alt.trapAsync?function(){return a()}:a()}}return t}();return c?(e+=1,a.loading&&a.loading(u(null,a.loading,r)),a.remote.apply(a,[o].concat(r)).then(f(a.success),f(a.error,1))):(n.emitChange(),s)},t},{});this.exportPublicMethods(i),this.exportPublicMethods({isLoading:function(){function t(){return e>0}return t}()})}return t}(),exportPublicMethods:function(){function t(t){var n=this;c.eachObject(function(t,e){if(!c.isFunction(e))throw new TypeError("exportPublicMethods expects a function");n.publicMethods[t]=e},[t])}return t}(),emitChange:function(){function t(){this.getInstance().emitChange()}return t}(),on:function(){function t(t,n){"error"===t&&(this.handlesOwnErrors=!0);var e=this.lifecycleEvents[t]||a["default"]();return this.lifecycleEvents[t]=e,e.subscribe(n.bind(this))}return t}(),bindAction:function(){function t(t,n){if(!t)throw new ReferenceError("Invalid action reference passed in");if(!c.isFunction(n))throw new TypeError("bindAction expects a function");var e=t.id?t.id:t;this.actionListeners[e]=this.actionListeners[e]||[],this.actionListeners[e].push(n.bind(this)),this.boundListeners.push(e)}return t}(),bindActions:function(){function t(t){var n=this;c.eachObject(function(t,e){var r=/./,i=t.replace(r,function(t){return"on"+String(t[0].toUpperCase())});if(n[t]&&n[i])throw new ReferenceError("You have multiple action handlers bound to an action: "+(String(t)+" and "+String(i)));var o=n[t]||n[i];o&&n.bindAction(e,o)},[t])}return t}(),bindListeners:function(){function t(t){var n=this;c.eachObject(function(t,e){var r=n[t];if(!r)throw new ReferenceError(String(t)+" defined but does not exist in "+String(n.displayName));Array.isArray(e)?e.forEach(function(t){n.bindAction(t,r)}):n.bindAction(e,r)},[t])}return t}()};n["default"]=u,t.exports=n["default"]},function(t,n,e){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t){if(t&&t.__esModule)return t;var n={};if(null!=t)for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&(n[e]=t[e]);return n["default"]=t,n}function o(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}function a(t,n){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!n||"object"!=typeof n&&"function"!=typeof n?t:n}function s(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function, not "+typeof n);t.prototype=Object.create(n&&n.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),n&&(Object.setPrototypeOf?Object.setPrototypeOf(t,n):t.__proto__=n)}function c(t,n,e){if(e){var r=n.StoreModel.config,i=v.isFunction(e)?e(n.state):e;n.state=r.setState.call(t,n.state,i),t.alt.dispatcher.isDispatching()||t.emitChange()}}function u(t,n,e,r){return v.assign(t,_["default"],{displayName:e,alt:n,dispatcher:n.dispatcher,preventDefault:function(){function t(){this.getInstance().preventDefault=!0}return t}(),boundListeners:[],lifecycleEvents:{},actionListeners:{},publicMethods:{},handlesOwnErrors:!1},r)}function f(t,n){n.config=v.assign({getState:function(){function t(t){return Array.isArray(t)?t.slice():v.isMutableObject(t)?v.assign({},t):t}return t}(),setState:function(){function t(t,n){return v.isMutableObject(n)?v.assign(t,n):n}return t}()},t,n.config)}function l(t,n){return t.reduce(function(t,n){return n(t)},n)}function p(t,n,e){var r=void 0,i=u({},t,e,v.assign({getInstance:function(){function t(){return r}return t}(),setState:function(){function t(t){c(this,r,t)}return t}()},n));return i.bindListeners&&_["default"].bindListeners.call(i,i.bindListeners),i.observe&&_["default"].bindListeners.call(i,i.observe(t)),i.lifecycle&&v.eachObject(function(t,n){_["default"].on.call(i,t,n)},[i.lifecycle]),r=v.assign(new m["default"](t,i,void 0!==i.state?i.state:{},n),i.publicMethods,{displayName:e,config:n.config})}function h(t,n,e){var r=void 0,i=n.config,f=function(t){function n(){o(this,n);for(var e=arguments.length,r=Array(e),i=0;e>i;i++)r[i]=arguments[i];return a(this,t.call.apply(t,[this].concat(r)))}return s(n,t),n}(n);u(f.prototype,t,e,{type:"AltStore",getInstance:function(){function t(){return r}return t}(),setState:function(){function t(t){c(this,r,t)}return t}()});for(var l=arguments.length,p=Array(l>3?l-3:0),h=3;l>h;h++)p[h-3]=arguments[h];var d=new(Function.prototype.bind.apply(f,[null].concat(p)));return i.bindListeners&&d.bindListeners(i.bindListeners),i.datasource&&d.registerAsync(i.datasource),r=v.assign(new m["default"](t,d,void 0!==d.state?d.state:d,n),g.getInternalMethods(n),i.publicMethods,{displayName:e})}Object.defineProperty(n,"__esModule",{value:!0}),n.createStoreConfig=f,n.transformStore=l,n.createStoreFromObject=p,n.createStoreFromClass=h;var d=e(2),g=i(d),y=e(1),v=i(y),b=e(7),m=r(b),w=e(8),_=r(w)},function(t,n,e){"use strict";function r(t){if(t&&t.__esModule)return t;var n={};if(null!=t)for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&(n[e]=t[e]);return n["default"]=t,n}function i(t,n,e){var r=t.deserialize(n);u.eachObject(function(n,i){var o=t.stores[n];o&&!function(){var t=o.StoreModel.config,a=o.state;t.onDeserialize&&(r[n]=t.onDeserialize(i)||i),u.isMutableObject(a)?(u.eachObject(function(t){return delete a[t]},[a]),u.assign(a,r[n])):o.state=r[n],e(o,o.state)}()},[r])}function o(t){var n=arguments.length<=1||void 0===arguments[1]?[]:arguments[1],e=n.length?n:Object.keys(t.stores);return e.reduce(function(n,e){var r=e.displayName||e,i=t.stores[r],o=i.StoreModel.config;i.lifecycle("snapshot");var a=o.onSerialize&&o.onSerialize(i.state);return n[r]=a?a:i.getState(),n},{})}function a(t,n){var e=t.deserialize(t.serialize(t.stores[n].state));t._initSnapshot[n]=e,t._lastSnapshot[n]=e}function s(t,n,e){return e.reduce(function(t,e){var r=e.displayName||e;if(!n[r])throw new ReferenceError(String(r)+" is not a valid store");return t[r]=n[r],t},{})}Object.defineProperty(n,"__esModule",{value:!0}),n.setAppState=i,n.snapshot=o,n.saveInitialSnapshot=a,n.filterSnapshots=s;var c=e(1),u=r(c)},function(t,n,e){t.exports.Dispatcher=e(12)},function(t,n,e){(function(r){"use strict";function i(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}n.__esModule=!0;var o=e(13),a="ID_",s=function(){function t(){i(this,t),this._callbacks={},this._isDispatching=!1,this._isHandled={},this._isPending={},this._lastID=1}return t.prototype.register=function(t){var n=a+this._lastID++;return this._callbacks[n]=t,n},t.prototype.unregister=function(t){this._callbacks[t]?void 0:"production"!==r.env.NODE_ENV?o(!1,"Dispatcher.unregister(...): `%s` does not map to a registered callback.",t):o(!1),delete this._callbacks[t]},t.prototype.waitFor=function(t){this._isDispatching?void 0:"production"!==r.env.NODE_ENV?o(!1,"Dispatcher.waitFor(...): Must be invoked while dispatching."):o(!1);for(var n=0;n1?n-1:0),i=1;n>i;i++)e[i-1]=arguments[i];return r(function(n,e){return t[n]=e},e),t}Object.defineProperty(n,"__esModule",{value:!0}),n.isMutableObject=e,n.eachObject=r,n.assign=i;var o=n.isFunction=function(t){return"function"==typeof t}},function(t,n,e){"use strict";function r(t){if(t&&t.__esModule)return t;var n={};if(null!=t)for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&(n[e]=t[e]);return n["default"]=t,n}function i(t,n){var e=n?v:y,r=n?t.prototype:t;return Object.getOwnPropertyNames(r).reduce(function(t,n){return-1!==e.indexOf(n)?t:(t[n]=r[n],t)},{})}function o(t){var n=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];return t===Function.prototype?n:o(Object.getPrototypeOf(t),g.assign(n,i(t,!0)))}function a(t){"undefined"!=typeof console&&console.warn(new ReferenceError(t))}function s(t,n){for(var e=0,r=n;Object.hasOwnProperty.call(t,r);)r=n+String(++e);return r}function c(t){return t.replace(/[a-z]([A-Z])/g,function(t){return String(t[0])+"_"+String(t[1].toLowerCase())}).toUpperCase()}function u(t){if(void 0===t)return null;for(var n=arguments.length,e=Array(n>1?n-1:0),r=1;n>r;r++)e[r-1]=arguments[r];return e.length?[t].concat(e):t}function f(t,n,e,r){return{type:n,payload:e,meta:h({dispatchId:t},r),id:t,action:n,data:e,details:r}}function l(t,n,e,r){var i=n.dispatch(e);if(void 0===i)return null;var o=n.id,a=o,s=o,c={id:o,namespace:a,name:s},u=function(t){return r.dispatch(o,t,c)};return g.isFunction(i)?i(u,r):r.dispatcher.dispatch(f(t,o,i,c))}function p(){}var h=Object.assign||function(t){for(var n=1;n=0&&t.splice(i,1)},i=function(n){t.push(n);var e=function(){return r(n)};return{dispose:e}},o=function(i){if(n)throw new Error("Cannot push while pushing");n=!0;try{t.forEach(function(t){return t(i)})}finally{n=!1,e=e.filter(r)}};return{subscribe:i,push:o,unsubscribe:r,subscriptions:t}}t.exports=e},function(t,n){function e(){u=!1,a.length?c=a.concat(c):f=-1,c.length&&r()}function r(){if(!u){var t=setTimeout(e);u=!0;for(var n=c.length;n;){for(a=c,c=[];++f1)for(var e=1;eo;o++)e[o]=arguments[o];var a=r.apply(i,e),f=a;return void 0===a||(0,l["default"])(a)||(s.isFunction(a)?f=a(c,t):c(a)),void 0===a&&u.warn("An action was called but nothing was dispatched"),f};f.defer=function(){for(var t=arguments.length,n=Array(t),e=0;t>e;e++)n[e]=arguments[e];return setTimeout(function(){return f.apply(null,n)})},f.id=o,f.data=a;var p=t.actions[n],h=u.uid(p,e);p[h]=f;var d=u.formatAsConstant(h);return p[d]=o,f}Object.defineProperty(n,"__esModule",{value:!0}),n["default"]=o;var a=e(1),s=i(a),c=e(2),u=i(c),f=e(14),l=r(f);t.exports=n["default"]},function(t,n,e){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t){if(t&&t.__esModule)return t;var n={};if(null!=t)for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&(n[e]=t[e]);return n["default"]=t,n}function o(t,n){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!n||"object"!=typeof n&&"function"!=typeof n?t:n}function a(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function, not "+typeof n);t.prototype=Object.create(n&&n.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),n&&(Object.setPrototypeOf?Object.setPrototypeOf(t,n):t.__proto__=n)}function s(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var c=e(11),u=e(10),f=i(u),l=e(1),p=i(l),h=e(9),d=i(h),g=e(2),y=i(g),v=e(5),b=r(v),m=function(){function t(){var n=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];s(this,t),this.config=n,this.serialize=n.serialize||JSON.stringify,this.deserialize=n.deserialize||JSON.parse,this.dispatcher=n.dispatcher||new c.Dispatcher,this.batchingFunction=n.batchingFunction||function(t){return t()},this.actions={global:{}},this.stores={},this.storeTransforms=n.storeTransforms||[],this.trapAsync=!1,this._actionsRegistry={},this._initSnapshot={},this._lastSnapshot={}}return t.prototype.dispatch=function(){function t(t,n,e){var r=this;this.batchingFunction(function(){var i=Math.random().toString(18).substr(2,16);if(t.hasOwnProperty("type")&&t.hasOwnProperty("payload")){var o={id:t.type,namespace:t.type,name:t.type};return r.dispatcher.dispatch(y.fsa(i,t.type,t.payload,o))}return t.id&&t.dispatch?y.dispatch(i,t,n,r):r.dispatcher.dispatch(y.fsa(i,t,n,e))})}return t}(),t.prototype.createUnsavedStore=function(){function t(t){var n=t.displayName||"";d.createStoreConfig(this.config,t);for(var e=d.transformStore(this.storeTransforms,t),r=arguments.length,i=Array(r>1?r-1:0),o=1;r>o;o++)i[o-1]=arguments[o];return p.isFunction(e)?d.createStoreFromClass.apply(d,[this,e,n].concat(i)):d.createStoreFromObject(this,e,n)}return t}(),t.prototype.createStore=function(){function t(t,n){var e=n||t.displayName||t.name||"";d.createStoreConfig(this.config,t);var r=d.transformStore(this.storeTransforms,t);(this.stores[e]||!e)&&(this.stores[e]?y.warn("A store named "+String(e)+" already exists, double check your store names or pass in your own custom identifier for each store"):y.warn("Store name was not specified"),e=y.uid(this.stores,e));for(var i=arguments.length,o=Array(i>2?i-2:0),a=2;i>a;a++)o[a-2]=arguments[a];var s=p.isFunction(r)?d.createStoreFromClass.apply(d,[this,r,e].concat(o)):d.createStoreFromObject(this,r,e);return this.stores[e]=s,f.saveInitialSnapshot(this,e),s}return t}(),t.prototype.generateActions=function(){function t(){for(var t={name:"global"},n=arguments.length,e=Array(n),r=0;n>r;r++)e[r]=arguments[r];return this.createActions(e.reduce(function(t,n){return t[n]=y.dispatchIdentity,t},t))}return t}(),t.prototype.createAction=function(){function t(t,n,e){return(0,b["default"])(this,"global",t,n,e)}return t}(),t.prototype.createActions=function(){function t(t){var n=this,e=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],r={},i=y.uid(this._actionsRegistry,t.displayName||t.name||"Unknown");if(p.isFunction(t)){p.assign(r,y.getPrototypeChain(t));for(var c=function(t){function n(){s(this,n);for(var e=arguments.length,r=Array(e),i=0;e>i;i++)r[i]=arguments[i];return o(this,t.call.apply(t,[this].concat(r)))}return a(n,t),n.prototype.generateActions=function(){function t(){for(var t=arguments.length,n=Array(t),e=0;t>e;e++)n[e]=arguments[e];n.forEach(function(t){r[t]=y.dispatchIdentity})}return t}(),n}(t),u=arguments.length,f=Array(u>2?u-2:0),l=2;u>l;l++)f[l-2]=arguments[l];p.assign(r,new(Function.prototype.bind.apply(c,[null].concat(f))))}else p.assign(r,t);return this.actions[i]=this.actions[i]||{},p.eachObject(function(t,r){if(!p.isFunction(r))return void(e[t]=r);e[t]=(0,b["default"])(n,i,t,r,e);var o=y.formatAsConstant(t);e[o]=e[t].id},[r]),e}return t}(),t.prototype.takeSnapshot=function(){function t(){for(var t=arguments.length,n=Array(t),e=0;t>e;e++)n[e]=arguments[e];var r=f.snapshot(this,n);return p.assign(this._lastSnapshot,r),this.serialize(r)}return t}(),t.prototype.rollback=function(){function t(){f.setAppState(this,this.serialize(this._lastSnapshot),function(t){t.lifecycle("rollback"),t.emitChange()})}return t}(),t.prototype.recycle=function(){function t(){for(var t=arguments.length,n=Array(t),e=0;t>e;e++)n[e]=arguments[e];var r=n.length?f.filterSnapshots(this,this._initSnapshot,n):this._initSnapshot;f.setAppState(this,this.serialize(r),function(t){t.lifecycle("init"),t.emitChange()})}return t}(),t.prototype.flush=function(){function t(){var t=this.serialize(f.snapshot(this));return this.recycle(),t}return t}(),t.prototype.bootstrap=function(){function t(t){f.setAppState(this,t,function(t,n){t.lifecycle("bootstrap",n),t.emitChange()})}return t}(),t.prototype.prepare=function(){function t(t,n){var e={};if(!t.displayName)throw new ReferenceError("Store provided does not have a name");return e[t.displayName]=n,this.serialize(e)}return t}(),t.prototype.addActions=function(){function t(t,n){for(var e=arguments.length,r=Array(e>2?e-2:0),i=2;e>i;i++)r[i-2]=arguments[i];this.actions[t]=Array.isArray(n)?this.generateActions.apply(this,n):this.createActions.apply(this,[n].concat(r))}return t}(),t.prototype.addStore=function(){function t(t,n){for(var e=arguments.length,r=Array(e>2?e-2:0),i=2;e>i;i++)r[i-2]=arguments[i];this.createStore.apply(this,[n,t].concat(r))}return t}(),t.prototype.getActions=function(){function t(t){return this.actions[t]}return t}(),t.prototype.getStore=function(){function t(t){return this.stores[t]}return t}(),t.debug=function(){function t(t,n,e){var r="alt.js.org",i=e;return i||"undefined"==typeof window||(i=window),"undefined"!=typeof i&&(i[r]=i[r]||[],i[r].push({name:t,alt:n})),n}return t}(),t}();n["default"]=m,t.exports=n["default"]},function(t,n,e){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t){if(t&&t.__esModule)return t;var n={};if(null!=t)for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&(n[e]=t[e]);return n["default"]=t,n}function o(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var a=e(1),s=i(a),c=e(3),u=r(c),f=function(){function t(n,e,r,i){var a=this;o(this,t);var c=e.lifecycleEvents;this.transmitter=(0,u["default"])(),this.lifecycle=function(t,n){c[t]&&c[t].push(n)},this.state=r,this.alt=n,this.preventDefault=!1,this.displayName=e.displayName,this.boundListeners=e.boundListeners,this.StoreModel=i,this.reduce=e.reduce||function(t){return t};var f=e.output||function(t){return t};this.emitChange=function(){return a.transmitter.push(f(a.state))};var l=function(t,n){try{return t()}catch(r){if(e.handlesOwnErrors)return a.lifecycle("error",{error:r,payload:n,state:a.state}),!1;throw r}};s.assign(this,e.publicMethods),this.dispatchToken=n.dispatcher.register(function(t){a.preventDefault=!1,a.lifecycle("beforeEach",{payload:t,state:a.state});var n=e.actionListeners[t.action];if(n||e.otherwise){var r=void 0;r=n?l(function(){return n.filter(Boolean).every(function(n){return n.call(e,t.data,t.action)!==!1})},t):l(function(){return e.otherwise(t.data,t.action)},t),r===!1||a.preventDefault||a.emitChange()}e.reduce&&(l(function(){var n=e.reduce(a.state,t);void 0!==n&&(a.state=n)},t),a.preventDefault||a.emitChange()),a.lifecycle("afterEach",{payload:t,state:a.state})}),this.lifecycle("init")}return t.prototype.listen=function(){function t(t){var n=this;if(!s.isFunction(t))throw new TypeError("listen expects a function");return this.transmitter.subscribe(t),function(){return n.unlisten(t)}}return t}(),t.prototype.unlisten=function(){function t(t){this.lifecycle("unlisten"),this.transmitter.unsubscribe(t)}return t}(),t.prototype.getState=function(){function t(){return this.StoreModel.config.getState.call(this,this.state)}return t}(),t}();n["default"]=f,t.exports=n["default"]},function(t,n,e){"use strict";function r(t){if(t&&t.__esModule)return t;var n={};if(null!=t)for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&(n[e]=t[e]);return n["default"]=t,n}function i(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(n,"__esModule",{value:!0});var o=e(3),a=i(o),s=e(1),c=r(s),u={waitFor:function(){function t(){for(var t=arguments.length,n=Array(t),e=0;t>e;e++)n[e]=arguments[e];if(!n.length)throw new ReferenceError("Dispatch tokens not provided");var r=n;1===n.length&&(r=Array.isArray(n[0])?n[0]:n);var i=r.map(function(t){return t.dispatchToken||t});this.dispatcher.waitFor(i)}return t}(),exportAsync:function(){function t(t){this.registerAsync(t)}return t}(),registerAsync:function(){function t(t){var n=this,e=0,r=c.isFunction(t)?t(this.alt):t,i=Object.keys(r).reduce(function(t,i){var o=r[i],a=c.isFunction(o)?o(n):o,s=["success","error","loading"];return s.forEach(function(t){if(a[t]&&!a[t].id)throw new Error(String(t)+" handler must be an action function")}),t[i]=function(){for(var t=arguments.length,r=Array(t),i=0;t>i;i++)r[i]=arguments[i];var o=n.getInstance().getState(),s=a.local&&a.local.apply(a,[o].concat(r)),c=a.shouldFetch?a.shouldFetch.apply(a,[o].concat(r)):null==s,u=a.interceptResponse||function(t){return t},f=function(){function t(t,i){return function(o){var a=function(){function n(){if(e-=1,t(u(o,t,r)),i)throw o;return o}return n}();return n.alt.trapAsync?function(){return a()}:a()}}return t}();return c?(e+=1,a.loading&&a.loading(u(null,a.loading,r)),a.remote.apply(a,[o].concat(r)).then(f(a.success),f(a.error,1))):(n.emitChange(),s)},t},{});this.exportPublicMethods(i),this.exportPublicMethods({isLoading:function(){function t(){return e>0}return t}()})}return t}(),exportPublicMethods:function(){function t(t){var n=this;c.eachObject(function(t,e){if(!c.isFunction(e))throw new TypeError("exportPublicMethods expects a function");n.publicMethods[t]=e},[t])}return t}(),emitChange:function(){function t(){this.getInstance().emitChange()}return t}(),on:function(){function t(t,n){"error"===t&&(this.handlesOwnErrors=!0);var e=this.lifecycleEvents[t]||(0,a["default"])();return this.lifecycleEvents[t]=e,e.subscribe(n.bind(this))}return t}(),bindAction:function(){function t(t,n){if(!t)throw new ReferenceError("Invalid action reference passed in");if(!c.isFunction(n))throw new TypeError("bindAction expects a function");var e=t.id?t.id:t;this.actionListeners[e]=this.actionListeners[e]||[],this.actionListeners[e].push(n.bind(this)),this.boundListeners.push(e)}return t}(),bindActions:function(){function t(t){var n=this;c.eachObject(function(t,e){var r=/./,i=t.replace(r,function(t){return"on"+String(t[0].toUpperCase())});if(n[t]&&n[i])throw new ReferenceError("You have multiple action handlers bound to an action: "+(String(t)+" and "+String(i)));var o=n[t]||n[i];o&&n.bindAction(e,o)},[t])}return t}(),bindListeners:function(){function t(t){var n=this;c.eachObject(function(t,e){var r=n[t];if(!r)throw new ReferenceError(String(t)+" defined but does not exist in "+String(n.displayName));Array.isArray(e)?e.forEach(function(t){n.bindAction(t,r)}):n.bindAction(e,r)},[t])}return t}()};n["default"]=u,t.exports=n["default"]},function(t,n,e){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t){if(t&&t.__esModule)return t;var n={};if(null!=t)for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&(n[e]=t[e]);return n["default"]=t,n}function o(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}function a(t,n){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!n||"object"!=typeof n&&"function"!=typeof n?t:n}function s(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function, not "+typeof n);t.prototype=Object.create(n&&n.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),n&&(Object.setPrototypeOf?Object.setPrototypeOf(t,n):t.__proto__=n)}function c(t,n,e){if(e){var r=n.StoreModel.config,i=v.isFunction(e)?e(n.state):e;n.state=r.setState.call(t,n.state,i),t.alt.dispatcher.isDispatching()||t.emitChange()}}function u(t,n,e,r){return v.assign(t,_["default"],{displayName:e,alt:n,dispatcher:n.dispatcher,preventDefault:function(){function t(){this.getInstance().preventDefault=!0}return t}(),boundListeners:[],lifecycleEvents:{},actionListeners:{},publicMethods:{},handlesOwnErrors:!1},r)}function f(t,n){n.config=v.assign({getState:function(){function t(t){return Array.isArray(t)?t.slice():v.isMutableObject(t)?v.assign({},t):t}return t}(),setState:function(){function t(t,n){return v.isMutableObject(n)?v.assign(t,n):n}return t}()},t,n.config)}function l(t,n){return t.reduce(function(t,n){return n(t)},n)}function p(t,n,e){var r=void 0,i=u({},t,e,v.assign({getInstance:function(){function t(){return r}return t}(),setState:function(){function t(t){c(this,r,t)}return t}()},n));return i.bindListeners&&_["default"].bindListeners.call(i,i.bindListeners),i.observe&&_["default"].bindListeners.call(i,i.observe(t)),i.lifecycle&&v.eachObject(function(t,n){_["default"].on.call(i,t,n)},[i.lifecycle]),r=v.assign(new m["default"](t,i,void 0!==i.state?i.state:{},n),i.publicMethods,{displayName:e,config:n.config})}function h(t,n,e){var r=void 0,i=n.config,f=function(t){function n(){o(this,n);for(var e=arguments.length,r=Array(e),i=0;e>i;i++)r[i]=arguments[i];return a(this,t.call.apply(t,[this].concat(r)))}return s(n,t),n}(n);u(f.prototype,t,e,{type:"AltStore",getInstance:function(){function t(){return r}return t}(),setState:function(){function t(t){c(this,r,t)}return t}()});for(var l=arguments.length,p=Array(l>3?l-3:0),h=3;l>h;h++)p[h-3]=arguments[h];var d=new(Function.prototype.bind.apply(f,[null].concat(p)));return i.bindListeners&&d.bindListeners(i.bindListeners),i.datasource&&d.registerAsync(i.datasource),r=v.assign(new m["default"](t,d,void 0!==d.state?d.state:d,n),g.getInternalMethods(n),i.publicMethods,{displayName:e})}Object.defineProperty(n,"__esModule",{value:!0}),n.createStoreConfig=f,n.transformStore=l,n.createStoreFromObject=p,n.createStoreFromClass=h;var d=e(2),g=i(d),y=e(1),v=i(y),b=e(7),m=r(b),w=e(8),_=r(w)},function(t,n,e){"use strict";function r(t){if(t&&t.__esModule)return t;var n={};if(null!=t)for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&(n[e]=t[e]);return n["default"]=t,n}function i(t,n,e){var r=t.deserialize(n);u.eachObject(function(n,i){var o=t.stores[n];o&&!function(){var t=o.StoreModel.config,a=o.state;t.onDeserialize&&(r[n]=t.onDeserialize(i)||i),u.isMutableObject(a)?(u.eachObject(function(t){return delete a[t]},[a]),u.assign(a,r[n])):o.state=r[n],e(o,o.state)}()},[r])}function o(t){var n=arguments.length<=1||void 0===arguments[1]?[]:arguments[1],e=n.length?n:Object.keys(t.stores);return e.reduce(function(n,e){var r=e.displayName||e,i=t.stores[r],o=i.StoreModel.config;i.lifecycle("snapshot");var a=o.onSerialize&&o.onSerialize(i.state);return n[r]=a?a:i.getState(),n},{})}function a(t,n){var e=t.deserialize(t.serialize(t.stores[n].state));t._initSnapshot[n]=e,t._lastSnapshot[n]=e}function s(t,n,e){return e.reduce(function(t,e){var r=e.displayName||e;if(!n[r])throw new ReferenceError(String(r)+" is not a valid store");return t[r]=n[r],t},{})}Object.defineProperty(n,"__esModule",{value:!0}),n.setAppState=i,n.snapshot=o,n.saveInitialSnapshot=a,n.filterSnapshots=s;var c=e(1),u=r(c)},function(t,n,e){t.exports.Dispatcher=e(12)},function(t,n,e){(function(r){"use strict";function i(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}n.__esModule=!0;var o=e(13),a="ID_",s=function(){function t(){i(this,t),this._callbacks={},this._isDispatching=!1,this._isHandled={},this._isPending={},this._lastID=1}return t.prototype.register=function(t){var n=a+this._lastID++;return this._callbacks[n]=t,n},t.prototype.unregister=function(t){this._callbacks[t]?void 0:"production"!==r.env.NODE_ENV?o(!1,"Dispatcher.unregister(...): `%s` does not map to a registered callback.",t):o(!1),delete this._callbacks[t]},t.prototype.waitFor=function(t){this._isDispatching?void 0:"production"!==r.env.NODE_ENV?o(!1,"Dispatcher.waitFor(...): Must be invoked while dispatching."):o(!1);for(var n=0;n