Socket
Socket
Sign inDemoInstall

mobx

Package Overview
Dependencies
Maintainers
1
Versions
251
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mobx - npm Package Compare versions

Comparing version 2.1.4 to 2.1.5

4

CHANGELOG.md

@@ -0,1 +1,5 @@

# 2.1.5
* Fix #222 (by @andykog) run `observe` callback of computed properties in untracked mode.
# 2.1.4

@@ -2,0 +6,0 @@

35

lib/mobx.js

@@ -0,1 +1,2 @@

"use strict";
var __extends = (this && this.__extends) || function (d, b) {

@@ -131,3 +132,3 @@ for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];

return Transformer;
})(ComputedValue);
}(ComputedValue));
return function (object) {

@@ -423,5 +424,5 @@ if (resetId !== globalState.resetId) {

if (source instanceof ObservableMap) {
var res = cache({});
source.forEach(function (value, key) { return res[key] = toJSON(value, detectCycles, __alreadySeen); });
return res;
var res_1 = cache({});
source.forEach(function (value, key) { return res_1[key] = toJSON(value, detectCycles, __alreadySeen); });
return res_1;
}

@@ -488,3 +489,3 @@ if (typeof source === "object" && isPlainObject(source)) {

return Atom;
})();
}());
exports.Atom = Atom;

@@ -566,3 +567,5 @@ var ComputedValue = (function () {

if (!firstTime || fireImmediately) {
globalState.inUntracked++;
listener(newValue, prevValue);
globalState.inUntracked--;
}

@@ -577,3 +580,3 @@ firstTime = false;

return ComputedValue;
})();
}());
function isComputingDerivation() {

@@ -664,3 +667,3 @@ return globalState.derivationStack.length > 0;

return MobXGlobals;
})();
}());
var globalState = (function () {

@@ -787,3 +790,3 @@ var res = new MobXGlobals();

return Reaction;
})();
}());
exports.Reaction = Reaction;

@@ -843,3 +846,3 @@ var MAX_REACTION_ITERATIONS = 100;

return AsReference;
})();
}());
var AsStructure = (function () {

@@ -851,3 +854,3 @@ function AsStructure(value) {

return AsStructure;
})();
}());
var AsFlat = (function () {

@@ -859,3 +862,3 @@ function AsFlat(value) {

return AsFlat;
})();
}());
function getValueModeFromValue(value, defaultMode) {

@@ -917,3 +920,3 @@ if (value instanceof AsReference)

return StubArray;
})();
}());
StubArray.prototype = [];

@@ -1105,3 +1108,3 @@ function getArrayLength(adm) {

return ObservableArray;
})(StubArray);
}(StubArray));
makeNonEnumerable(ObservableArray.prototype, [

@@ -1368,3 +1371,3 @@ "constructor",

return ObservableMap;
})();
}());
exports.ObservableMap = ObservableMap;

@@ -1509,3 +1512,3 @@ function map(initialValues, valueModifier) {

return ObservableValue;
})(Atom);
}(Atom));
var SimpleEventEmitter = (function () {

@@ -1537,3 +1540,3 @@ function SimpleEventEmitter() {

return SimpleEventEmitter;
})();
}());
exports.SimpleEventEmitter = SimpleEventEmitter;

@@ -1540,0 +1543,0 @@ var EMPTY_ARRAY = [];

/** MobX - (c) Michel Weststrate 2015, 2016 - MIT Licensed */
function B(e,t){o(e,"autorun methods cannot have modifiers"),n("function"==typeof e,"autorun expects a function"),n(0===e.length,"autorun expects a function without arguments"),t&&(e=e.bind(t));var r=new O(e.name||"Autorun",function(){this.track(e)});return r.schedule(),r.getDisposer()}function ee(r,o,t){var n=!1,e=B(function(){r.call(t)&&(e?e():n=!0,o.call(t))});return n&&e(),e}function We(e,t,n){return m("`autorunUntil` is deprecated, please use `when`."),ee.apply(null,arguments)}function Qe(e,n,o){void 0===n&&(n=1),o&&(e=e.bind(o));var r=!1,t=new O(e.name||"AutorunAsync",function(){r||(r=!0,setTimeout(function(){r=!1,t.isDisposed||t.track(e)},n))});return t.schedule(),t.getDisposer()}function k(e,t,n,r){return arguments.length<3&&"function"==typeof e?Xe(e,t):Z.apply(null,arguments)}function Xe(r,o){var t=E(r,e.Recursive),i=t[0],n=t[1];return new p(n,o,i===e.Structure,n.name||"ComputedValue")}function Z(i,t,o,a){if(1===arguments.length){var u=i;return function(e,t,n){return Z.call(null,e,t,n,u)}}n(o&&o.hasOwnProperty("get"),"@computed can only be used on getter functions, like: '@computed get myProps() { return ...; }'"),I(i,t);var r={},s=o.get;return n("object"==typeof i,"The @observable decorator can only be used on objects",t),n("function"==typeof s,"@observable expects a getter function if used on a property.",t),n(!o.set,"@observable properties cannot have a setter.",t),n(0===s.length,"@observable getter functions should not take arguments.",t),r.configurable=!0,r.enumerable=!1,r.get=function(){return S(j(this,void 0,e.Recursive),t,a&&a.asStructure===!0?z(s):s),this[t]},r.set=te,o?r:void Object.defineProperty(i,t,r)}function te(){throw new Error("[ComputedValue] It is not allowed to assign new values to computed properties.")}function He(e,o){n("function"==typeof e&&1===e.length,"createTransformer expects a function that accepts one argument");var r={},i=t.resetId,s=function(t){function n(n,r){t.call(this,function(){return e(r)},null,!1,"Transformer-"+e.name+"-"+n),this.sourceIdentifier=n,this.sourceObject=r}return P(n,t),n.prototype.onBecomeUnobserved=function(){var e=this.value;t.prototype.onBecomeUnobserved.call(this),delete r[this.sourceIdentifier],o&&o(e,this.sourceObject)},n}(p);return function(o){i!==t.resetId&&(r={},i=t.resetId);var n=Ke(o),e=r[n];return e?e.get():(e=r[n]=new s(n,o),e.get())}}function Ke(e){if(null===e||"object"!=typeof e)throw new Error("[mobx] transform expected some kind of object, got: "+e);var t=e.$transformId;return void 0===t&&(t=l(),Object.defineProperty(e,"$transformId",{configurable:!0,writable:!0,enumerable:!1,value:t})),t}function ze(e,t){return N()||console.warn("[mobx.expr] 'expr' should only be used inside other reactive functions."),k(e,t).get()}function oe(t){for(var o=[],r=1;r<arguments.length;r++)o[r-1]=arguments[r];return n(arguments.length>=2,"extendObservable expected 2 or more arguments"),n("object"==typeof t,"extendObservable expects an object as first argument"),n(!(t instanceof h),"extendObservable should not be used on maps, use map.merge instead"),o.forEach(function(r){n("object"==typeof r,"all arguments of extendObservable should be objects"),ie(t,r,e.Recursive,null)}),t}function ie(e,t,r,o){var i=j(e,o,r);for(var n in t)if(t.hasOwnProperty(n)){if(e===t&&!be(e,n))continue;S(i,n,t[n])}return e}function se(e,n){var r=t.allowStateChanges;t.allowStateChanges=e;var o=n();return t.allowStateChanges=r,o}function a(e,n,t){void 0===t&&(t=!1),u&&u.emit({id:e.id,name:e.name+"@"+e.id,node:e,state:n,changed:t})}function Ve(e){return ae(e)}function ae(e){var t={id:e.id,name:e.name+"@"+e.id};return e.observing&&e.observing.length&&(t.dependencies=ye(e.observing).map(ae)),t}function Me(e){return fe(e)}function fe(e){var t={id:e.id,name:e.name+"@"+e.id};return e.observers&&e.observers.length&&(t.observers=ye(e.observers).map(fe)),t}function De(n){var e=[],t=!1;return function(r){(n||r.changed)&&e.push(r),t||(t=!0,setTimeout(function(){console[console.table?"table":"dir"](e),e=[],t=!1},1))}}function Pe(e,t){void 0===e&&(e=!1),u||(u=new f);var n=t?function(n){(e||n.changed)&&t(n)}:De(e),r=u.on(n);return Oe(function(){r(),0===u.listeners.length&&(u=null)})}function y(e,t){if(null===e||void 0===e)return!1;if(void 0!==t){if(e instanceof h||e instanceof i)throw new Error("[mobx.isObservable] isObservable(object, propertyName) is not supported for arrays and maps. Use map.has or array.length instead.");if(g(e)){var n=e.$mobx;return n.values&&!!n.values[t]}return!1}return!!e.$mobx||e instanceof w||e instanceof O||e instanceof p}function Ae(i,t,r){if(n(arguments.length>=2&&arguments.length<=3,"Illegal decorator config",t),I(i,t),r&&r.hasOwnProperty("get"))return m("Using @observable on computed values is deprecated. Use @computed instead."),k.apply(null,arguments);var o={};return n("object"==typeof i,"The @observable decorator can only be used on objects",t),o.configurable=!0,o.enumerable=!0,o.get=function(){var o=this,n=void 0;return r&&r.initializer&&(n=r.initializer(),"function"==typeof n&&(n=$(n))),se(!0,function(){S(j(o,void 0,e.Recursive),t,n)}),this[t]},o.set=function(n){S(j(this,void 0,e.Recursive),t,"function"==typeof n?$(n):n)},r?o:void Object.defineProperty(i,t,o)}function ve(t,a){if("string"==typeof arguments[1])return Ae.apply(null,arguments);if(n(1===arguments.length||2===arguments.length,"observable expects one or two arguments"),y(t))return t;var s=E(t,e.Recursive),o=s[0],i=s[1],u=o===e.Reference?r.Reference:_e(i);switch(u){case r.Array:case r.PlainObject:return _(i,o);case r.Reference:case r.ComplexObject:return new v(i,o);case r.ComplexFunction:throw new Error("[mobx.observable] To be able to make a function reactive it should not have arguments. If you need an observable reference to a function, use `observable(asReference(f))`");case r.ViewFunction:return m("Use `computed(expr)` instead of `observable(expr)`"),k(t,a)}n(!1,"Illegal State")}function _e(e){return null===e||void 0===e?r.Reference:"function"==typeof e?e.length?r.ComplexFunction:r.ViewFunction:Array.isArray(e)||e instanceof i?r.Array:"object"==typeof e?c(e)?r.PlainObject:r.ComplexObject:r.Reference}function F(t,n,e,r){return"function"==typeof e?we(t,n,e,r):Y(t,n,e)}function Y(e,t,r){return A(e)?e.observe(t):M(e)?e.observe(t):g(e)?Ue(e,t,r):e instanceof v||e instanceof p?e.observe(t,r):c(e)?Y(ve(e),t,r):void n(!1,"first argument of observe should be some observable value or plain object")}function we(e,t,r,o){var i="[mobx.observe] the provided observable map has no key with name: "+t;if(M(e)){if(!e._has(t))throw new Error(i);return F(e._data[t],r)}if(g(e)){if(!y(e,t))throw new Error(i);return F(e.$mobx.values[t],r,o)}return c(e)?(oe(e,{property:e[t]}),we(e,t,r,o)):void n(!1,"first argument of observe should be an (observable)object or observableMap if a property name is given")}function b(e,n,t){function s(r){return n&&t.push([e,r]),r}if(void 0===n&&(n=!0),void 0===t&&(t=null),n&&null===t&&(t=[]),n&&null!==e&&"object"==typeof e)for(var o=0,u=t.length;u>o;o++)if(t[o][0]===e)return t[o][1];if(!e)return e;if(Array.isArray(e)||e instanceof i){var r=s([]);return r.push.apply(r,e.map(function(e){return b(e,n,t)})),r}if(e instanceof h){var r=s({});return e.forEach(function(e,o){return r[o]=b(e,n,t)}),r}if("object"==typeof e&&c(e)){var r=s({});for(var a in e)e.hasOwnProperty(a)&&(r[a]=b(e[a],n,t));return r}return y(e)&&e.$mobx instanceof v?b(e(),n,t):e}function xe(e){n(e.isDirty,"atom not dirty"),e.isDirty=!1,a(e,"READY",!0),K(e,!0)}function N(){return t.derivationStack.length>0}function J(){n(t.allowStateChanges,"It is not allowed to change the state when a computed value is being evaluated. Use 'autorun' to create reactive functions with side-effects. Or use 'extras.allowStateChanges(true, block)' to supress this message.")}function je(e){1===++e.dependencyStaleCount&&(a(e,"STALE"),ge(e))}function ke(e,t){if(n(e.dependencyStaleCount>0,"unexpected ready notification"),t&&(e.dependencyChangeCount+=1),0===--e.dependencyStaleCount)if(e.dependencyChangeCount>0){e.dependencyChangeCount=0,a(e,"PENDING");var r=e.onDependenciesReady();K(e,r)}else a(e,"READY",!1),K(e,!1)}function de(e,r){var n=!0,o=e.observing;e.observing=[],t.derivationStack.push(e);try{var i=r();return n=!1,Ee(e,o),i}finally{n&&(console.error("[mobx] An uncaught exception occurred while calculating your computed value, autorun or transformer. Or inside the render method of a React component. These methods should never throw exceptions as MobX will usually not be able to recover from them. "+("Please enable 'Pause on (caught) exceptions' in your debugger to find the root cause. In: '"+e.name+"#"+e.id+"'")),U())}}function Ee(r,u){t.derivationStack.length-=1;for(var i=pe(r.observing,u),o=i[0],s=i[1],e=0,a=o.length;a>e;e++){var c=o[e];n(!he(r,c),"Cycle detected",r),qe(o[e],r)}for(var e=0,a=s.length;a>e;e++)G(s[e],r)}function he(r,n){var e=n.observing;if(void 0===e)return!1;if(-1!==e.indexOf(n))return!0;for(var o=e.length,t=0;o>t;t++)if(he(r,e[t]))return!0;return!1}function l(){return++t.mobxGuid}function Be(){}function U(){t.resetId++;var n=new ue;for(var e in n)"mobxGuid"!==e&&"resetId"!==e&&(t[e]=n[e])}function qe(e,r){var t=e.observers,n=t.length;t[n]=r,0===n&&e.onBecomeObserved()}function G(t,r){var e=t.observers,n=e.indexOf(r);-1!==n&&e.splice(n,1),0===e.length&&t.onBecomeUnobserved()}function Q(n){if(!(t.inUntracked>0)){var o=t.derivationStack,i=o.length;if(i>0){var e=o[i-1].observing,r=e.length;e[r-1]!==n&&e[r-2]!==n&&(e[r]=n)}}}function ge(e){var t=e.observers.slice();t.forEach(je),e.staleObservers=e.staleObservers.concat(t)}function K(e,t){e.staleObservers.splice(0).forEach(function(e){return ke(e,t)})}function et(e){m("This feature is experimental and might be removed in a future minor release. Please report if you use this feature in production: https://github.com/mobxjs/mobx/issues/49"),t.inUntracked++;var n=e();return t.inUntracked--,n}function H(){if(!(t.isRunningReactions===!0||t.inTransaction>0)){t.isRunningReactions=!0;for(var e=t.pendingReactions,o=0;e.length>0;){if(++o===Se)throw new Error("Reaction doesn't converge to a stable state. Probably there is a cycle in the reactive function: "+e[0].toString());for(var r=e.splice(0),n=0,i=r.length;i>n;n++)r[n].runReaction()}t.isRunningReactions=!1}}function d(r,o){t.inTransaction+=1;var i=r.call(o);if(0===--t.inTransaction){for(var n=t.changedAtoms.splice(0),e=0,s=n.length;s>e;e++)xe(n[e]);H()}return i}function $(e){return new D(e)}function z(e){return new R(e)}function X(e){return new L(e)}function E(t,n){return t instanceof D?[e.Reference,t.value]:t instanceof R?[e.Structure,t.value]:t instanceof L?[e.Flat,t.value]:[n,t]}function Ze(t){return t===$?e.Reference:t===z?e.Structure:t===X?e.Flat:(n(void 0===t,"Cannot determine value mode from function. Please pass in one of these: mobx.asReference, mobx.asStructure or mobx.asFlat, got: "+t),e.Recursive)}function _(t,a,s){var r;if(y(t))return t;switch(a){case e.Reference:return t;case e.Flat:o(t,"Items inside 'asFlat' cannot have modifiers"),r=e.Reference;break;case e.Structure:o(t,"Items inside 'asStructure' cannot have modifiers"),r=e.Structure;break;case e.Recursive:i=E(t,e.Recursive),r=i[0],t=i[1];break;default:n(!1,"Illegal State")}return Array.isArray(t)&&Object.isExtensible(t)?le(t,r,s):c(t)&&Object.isExtensible(t)?ie(t,t,r,s):t;var i}function o(e,t){if(e instanceof D||e instanceof R||e instanceof L)throw new Error("[mobx] asStructure / asReference / asFlat cannot be used here. "+t)}function Ye(e){return e.atom.reportObserved(),e.values.length}function Ne(n,e){if("number"!=typeof e||0>e)throw new Error("[mobx.array] Out of range: "+e);var t=n.values.length;e!==t&&(e>t?s(n,t,0,new Array(e-t)):s(n,e,t-e))}function re(n,t,e){if(t!==n.lastKnownLength)throw new Error("[mobx] Modification exception: the internal structure of an observable array was changed. Did you use peek() to change it?");J(),n.lastKnownLength+=e,e>0&&t+e>V&&ce(t+e)}function s(o,e,n,t){var r=o.values.length;if(!(void 0!==t&&0!==t.length||0!==n&&0!==r))return[];void 0===e?e=0:e>r?e=r:0>e&&(e=Math.max(0,r+e)),n=2===arguments.length?r-e:void 0===n||null===n?0:Math.max(0,Math.min(n,r-e)),t=void 0===t?C:t.map(o.makeChildReactive);var a=t.length-n;re(o,r,a);var i=(s=o.values).splice.apply(s,[e,n].concat(t));return Te(o,e,i,t),i;var s}function Ge(t){return o(t,"Array values cannot have modifiers"),this.mode===e.Flat||this.mode===e.Reference?t:_(t,this.mode,this.atom.name+"@"+this.atom.id+" / ArrayEntry")}function Le(e,t,n){e.atom.reportChanged(),e.changeEvent&&e.changeEvent.emit({object:e.array,type:"update",index:t,oldValue:n})}function Te(e,r,t,n){(0!==t.length||0!==n.length)&&(e.atom.reportChanged(),e.changeEvent&&e.changeEvent.emit({object:e.array,type:"splice",index:r,addedCount:n.length,removed:t}))}function Fe(t){Object.defineProperty(i.prototype,""+t,{enumerable:!1,configurable:!1,set:function(n){var r=this.$mobx,i=r.values;if(o(n,"Modifiers cannot be used on array values. For non-reactive array values use makeReactive(asFlat(array))."),t<i.length){J();var a=i[t],u=r.mode===e.Structure?!x(a,n):a!==n;u&&(i[t]=r.makeChildReactive(n),Le(r,t,a))}else{if(t!==i.length)throw new Error("[mobx.array] Index out of bounds, "+t+" is larger than "+i.length);s(r,t,0,[n])}},get:function(){var e=this.$mobx;return e&&t<e.values.length?(e.atom.reportObserved(),e.values[t]):void 0}})}function ce(t){for(var e=V;t>e;e++)Fe(e);V=t}function le(e,t,n){return new i(e,t,n)}function Ie(t){return m("fastArray is deprecated. Please use `observable(asFlat([]))`"),le(t,e.Flat,null)}function A(e){return e instanceof i}function $e(e,t){return new h(e,t)}function M(e){return e instanceof h}function j(t,n,r){if(void 0===r&&(r=e.Recursive),t.$mobx){if(t.$mobx.type!==T)throw new Error("The given object is observable but not an observable object");return t.$mobx}c(t)||(n=t.constructor.name),n||(n="ObservableObject");var o={type:T,values:{},events:void 0,id:l(),target:t,name:n,mode:r};return Object.defineProperty(t,"$mobx",{enumerable:!1,configurable:!1,writable:!1,value:o}),o}function S(e,t,n){e.values[t]?e.target[t]=n:Ce(e,t,n)}function Ce(e,r,t){I(e.target,r);var n,o=e.name+"@"+e.id+' / Prop "'+r+'"',i=!0;"function"==typeof t&&0===t.length?n=new p(t,e.target,!1,o):t instanceof R&&"function"==typeof t.value&&0===t.value.length?n=new p(t.value,e.target,!0,o):(i=!1,n=new v(t,e.mode,o)),e.values[r]=n,Object.defineProperty(e.target,r,{configurable:!0,enumerable:!i,get:function(){return n.get()},set:i?te:function(t){var o=n.value;n.set(t)&&void 0!==e.events&&e.events.emit({type:"update",object:this,name:r,oldValue:o})}}),void 0!==e.events&&e.events.emit({type:"add",object:e.target,name:r})}function Ue(e,r,o){n(g(e),"Expected observable object"),n(o!==!0,"`observe` doesn't support the fire immediately property for observable objects.");var t=e.$mobx;return void 0===t.events&&(t.events=new f),e.$mobx.events.on(r)}function g(e){return e&&e.$mobx&&e.$mobx.type===T}function n(t,n,e){if(!t)throw new Error("[mobx] Invariant failed: "+n+(e?" in '"+e+"'":""))}function m(e){-1===W.indexOf(e)&&(W.push(e),console.error("[mobx] Deprecated: "+e))}function Oe(t){var e=!1;return function(){return e?void 0:(e=!0,t.apply(this,arguments))}}function ye(t){var e=[];return t.forEach(function(t){-1===e.indexOf(t)&&e.push(t)}),e}function c(e){return null!==e&&"object"==typeof e&&Object.getPrototypeOf(e)===Object.prototype}function me(n,e,t){return n?!x(e,t):e!==t}function Re(n,t){for(var e=0;e<t.length;e++)Object.defineProperty(n,t[e],{configurable:!0,writable:!0,enumerable:!1,value:n[t[e]]})}function be(t,n){var e=Object.getOwnPropertyDescriptor(t,n);return!e||e.configurable!==!1&&e.writable!==!1}function I(t,e){n(be(t,e),"Cannot make property '"+e+"' observable, it is not configurable and writable in the target object")}function x(e,t){if(null===e&&null===t)return!0;if(void 0===e&&void 0===t)return!0;var o=Array.isArray(e)||A(e);if(o!==(Array.isArray(t)||A(t)))return!1;if(o){if(e.length!==t.length)return!1;for(var n=e.length;n>=0;n--)if(!x(e[n],t[n]))return!1;return!0}if("object"==typeof e&&"object"==typeof t){if(null===e||null===t)return!1;if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var r in e){if(!t.hasOwnProperty(r))return!1;if(!x(e[r],t[r]))return!1}return!0}return e===t}function pe(n,r){if(!r||!r.length)return[n,[]];if(!n||!n.length)return[[],r];for(var o=[],i=[],e=0,s=0,h=n.length,c=!1,t=0,a=0,l=r.length,u=!1,f=!1;!f&&!c;){if(!u){if(h>e&&l>t&&n[e]===r[t]){if(e++,t++,e===h&&t===l)return[o,i];continue}s=e,a=t,u=!0}a+=1,s+=1,a>=l&&(f=!0),s>=h&&(c=!0),c||n[s]!==r[t]?f||r[a]!==n[e]||(i.push.apply(i,r.slice(t,a)),t=a+1,e++,u=!1):(o.push.apply(o,n.slice(e,s)),e=s+1,t++,u=!1)}return o.push.apply(o,n.slice(e)),i.push.apply(i,r.slice(t)),[o,i]}var P=this&&this.__extends||function(t,e){function r(){this.constructor=t}for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)};Be(),exports._={quickDiff:pe,resetGlobalState:U},exports.extras={allowStateChanges:se,getDependencyTree:Ve,getObserverTree:Me,isComputingDerivation:N,resetGlobalState:U,trackTransitions:Pe},exports.autorun=B,exports.when=ee,exports.autorunUntil=We,exports.autorunAsync=Qe,exports.computed=k,exports.createTransformer=He,exports.expr=ze,exports.extendObservable=oe;var u=null;exports.isObservable=y,exports.observable=ve;var r;!function(e){e[e.Reference=0]="Reference",e[e.PlainObject=1]="PlainObject",e[e.ComplexObject=2]="ComplexObject",e[e.Array=3]="Array",e[e.ViewFunction=4]="ViewFunction",e[e.ComplexFunction=5]="ComplexFunction"}(r||(r={})),exports.observe=F,exports.toJSON=b;var w=function(){function e(e,t,n){void 0===e&&(e="Atom"),void 0===t&&(t=q),void 0===n&&(n=q),this.name=e,this.onBecomeObserved=t,this.onBecomeUnobserved=n,this.id=l(),this.isDirty=!1,this.staleObservers=[],this.observers=[]}return e.prototype.reportObserved=function(){Q(this)},e.prototype.reportChanged=function(){this.isDirty||(this.reportStale(),this.reportReady())},e.prototype.reportStale=function(){this.isDirty||(this.isDirty=!0,a(this,"STALE"),ge(this))},e.prototype.reportReady=function(){n(this.isDirty,"atom not dirty"),t.inTransaction>0?t.changedAtoms.push(this):(xe(this),H())},e.prototype.toString=function(){return this.name+"@"+this.id},e}();exports.Atom=w;var p=function(){function e(n,r,i,e){var o=this;void 0===e&&(e="ComputedValue"),this.derivation=n,this.scope=r,this.compareStructural=i,this.name=e,this.id=l(),this.isLazy=!0,this.isComputing=!1,this.staleObservers=[],this.observers=[],this.observing=[],this.dependencyChangeCount=0,this.dependencyStaleCount=0,this.value=void 0,this.peek=function(){o.isComputing=!0,t.isComputingComputedValue++;var e=t.allowStateChanges;t.allowStateChanges=!1;var i=n.call(r);return t.allowStateChanges=e,t.isComputingComputedValue--,o.isComputing=!1,i}}return e.prototype.onBecomeObserved=function(){},e.prototype.onBecomeUnobserved=function(){for(var e=0,t=this.observing.length;t>e;e++)G(this.observing[e],this);this.observing=[],this.isLazy=!0,this.value=void 0},e.prototype.onDependenciesReady=function(){var e=this.trackAndCompute();return a(this,"READY",e),e},e.prototype.get=function(){if(n(!this.isComputing,"Cycle detected",this.derivation),Q(this),this.dependencyStaleCount>0)return this.peek();if(this.isLazy){if(!N())return this.peek();this.isLazy=!1,this.trackAndCompute()}return this.value},e.prototype.set=function(e){throw new Error("[ComputedValue '"+name+"'] It is not possible to assign a new value to a computed value.")},e.prototype.trackAndCompute=function(){var e=this.value;return this.value=de(this,this.peek),me(this.compareStructural,this.value,e)},e.prototype.observe=function(n,r){var o=this,e=!0,t=void 0;return B(function(){var i=o.get();(!e||r)&&n(i,t),e=!1,t=i})},e.prototype.toString=function(){return this.name+"@"+this.id+"["+this.derivation.toString()+"]"},e}(),ue=function(){function e(){this.version=1,this.derivationStack=[],this.mobxGuid=0,this.inTransaction=0,this.inUntracked=0,this.isRunningReactions=!1,this.changedAtoms=[],this.pendingReactions=[],this.allowStateChanges=!0,this.resetId=0}return e}(),t=function(){var e=new ue;if(global.__mobservableTrackingStack||global.__mobservableViewStack)throw new Error("[mobx] An incompatible version of mobservable is already loaded.");if(global.__mobxGlobal&&global.__mobxGlobal.version!==e.version)throw new Error("[mobx] An incompatible version of mobx is already loaded.");return global.__mobxGlobal?global.__mobxGlobal:global.__mobxGlobal=e}();exports.untracked=et;var O=function(){function e(e,t){void 0===e&&(e="Reaction"),this.name=e,this.onInvalidate=t,this.id=l(),this.staleObservers=C,this.observers=C,this.observing=[],this.dependencyChangeCount=0,this.dependencyStaleCount=0,this.isDisposed=!1,this._isScheduled=!1}return e.prototype.onBecomeObserved=function(){},e.prototype.onBecomeUnobserved=function(){},e.prototype.onDependenciesReady=function(){return this.schedule(),!1},e.prototype.schedule=function(){this._isScheduled||(this._isScheduled=!0,t.pendingReactions.push(this),H())},e.prototype.isScheduled=function(){return this.dependencyStaleCount>0||this._isScheduled},e.prototype.runReaction=function(){this.isDisposed||(this._isScheduled=!1,this.onInvalidate(),a(this,"READY",!0))},e.prototype.track=function(e){de(this,e)},e.prototype.dispose=function(){if(!this.isDisposed){this.isDisposed=!0;for(var t=this.observing.splice(0),e=0,n=t.length;n>e;e++)G(t[e],this)}},e.prototype.getDisposer=function(){var e=this.dispose.bind(this);return e.$mobx=this,e},e.prototype.toString=function(){return"Reaction["+this.name+"]"},e}();exports.Reaction=O;var Se=100;exports.transaction=d;var e;!function(e){e[e.Recursive=0]="Recursive",e[e.Reference=1]="Reference",e[e.Structure=2]="Structure",e[e.Flat=3]="Flat"}(e||(e={})),exports.asReference=$,exports.asStructure=z,exports.asFlat=X;var D=function(){function e(e){this.value=e,o(e,"Modifiers are not allowed to be nested")}return e}(),R=function(){function e(e){this.value=e,o(e,"Modifiers are not allowed to be nested")}return e}(),L=function(){function e(e){this.value=e,o(e,"Modifiers are not allowed to be nested")}return e}(),V=0,ne=function(){function e(){}return e}();ne.prototype=[];var i=function(t){function e(n,r,o){t.call(this);var e=this.$mobx={atom:new w(o||"ObservableArray"),values:void 0,changeEvent:void 0,lastKnownLength:0,mode:r,array:this,makeChildReactive:function(t){return Ge.call(e,t)}};Object.defineProperty(this,"$mobx",{enumerable:!1,configurable:!1,writable:!1}),n&&n.length?(re(e,0,n.length),e.values=n.map(e.makeChildReactive)):e.values=[]}return P(e,t),e.prototype.observe=function(t,e){return void 0===e&&(e=!1),void 0===this.$mobx.changeEvent&&(this.$mobx.changeEvent=new f),e&&t({object:this,type:"splice",index:0,addedCount:this.$mobx.values.length,removed:[]}),this.$mobx.changeEvent.on(t)},e.prototype.clear=function(){return this.splice(0)},e.prototype.replace=function(e){return s(this.$mobx,0,this.$mobx.values.length,e)},e.prototype.toJSON=function(){return this.$mobx.atom.reportObserved(),this.$mobx.values.slice()},e.prototype.peek=function(){return this.$mobx.values},e.prototype.find=function(r,o,t){void 0===t&&(t=0),this.$mobx.atom.reportObserved();for(var n=this.$mobx.values,i=n.length,e=t;i>e;e++)if(r.call(o,n[e],e,this))return n[e];return null},e.prototype.splice=function(t,n){for(var r=[],e=2;e<arguments.length;e++)r[e-2]=arguments[e];switch(arguments.length){case 0:return[];case 1:return s(this.$mobx,t);case 2:return s(this.$mobx,t,n)}return s(this.$mobx,t,n,r)},e.prototype.push=function(){for(var t=[],e=0;e<arguments.length;e++)t[e-0]=arguments[e];return s(this.$mobx,this.$mobx.values.length,0,t),this.$mobx.values.length},e.prototype.pop=function(){return this.splice(Math.max(this.$mobx.values.length-1,0),1)[0]},e.prototype.shift=function(){return this.splice(0,1)[0]},e.prototype.unshift=function(){for(var t=[],e=0;e<arguments.length;e++)t[e-0]=arguments[e];return s(this.$mobx,0,0,t),this.$mobx.values.length},e.prototype.reverse=function(){this.$mobx.atom.reportObserved();var e=this.slice();return e.reverse.apply(e,arguments)},e.prototype.sort=function(t){this.$mobx.atom.reportObserved();var e=this.slice();return e.sort.apply(e,arguments)},e.prototype.remove=function(t){var e=this.$mobx.values.indexOf(t);return e>-1?(this.splice(e,1),!0):!1},e.prototype.toString=function(){return"[mobx.array] "+Array.prototype.toString.apply(this.$mobx.values,arguments)},e.prototype.toLocaleString=function(){return"[mobx.array] "+Array.prototype.toLocaleString.apply(this.$mobx.values,arguments)},e}(ne);Re(i.prototype,["constructor","observe","clear","replace","toJSON","peek","find","splice","push","pop","shift","unshift","reverse","sort","remove","toString","toLocaleString"]),Object.defineProperty(i.prototype,"length",{enumerable:!1,configurable:!0,get:function(){return Ye(this.$mobx)},set:function(e){Ne(this.$mobx,e)}}),["concat","every","filter","forEach","indexOf","join","lastIndexOf","map","reduce","reduceRight","slice","some"].forEach(function(e){var t=Array.prototype[e];Object.defineProperty(i.prototype,e,{configurable:!1,writable:!0,enumerable:!1,value:function(){return this.$mobx.atom.reportObserved(),t.apply(this.$mobx.values,arguments)}})}),ce(1e3),exports.fastArray=Ie,exports.isObservableArray=A;var Je={},h=function(){function t(t,n){var r=this;this.$mobx=Je,this._data={},this._hasMap={},this._events=void 0,this.name="ObservableMap",this.id=l(),this._keys=new i(null,e.Reference,this.name+"@"+this.id+" / keys()"),this._valueMode=Ze(n),c(t)?this.merge(t):Array.isArray(t)&&t.forEach(function(e){var t=e[0],n=e[1];return r.set(t,n)})}return t.prototype._has=function(e){return"undefined"!=typeof this._data[e]},t.prototype.has=function(e){return this.isValidKey(e)?this._hasMap[e]?this._hasMap[e].get():this._updateHasMapEntry(e,!1).get():!1},t.prototype.set=function(e,n){var t=this;if(this.assertValidKey(e),o(n,"[mobx.map.set] Expected unwrapped value to be inserted to key '"+e+"'. If you need to use modifiers pass them as second argument to the constructor"),this._has(e)){var r=this._data[e].value,i=this._data[e].set(n);i&&this._events&&this._events.emit({type:"update",object:this,name:e,oldValue:r})}else d(function(){t._data[e]=new v(n,t._valueMode,t.name+"@"+t.id+' / Entry "'+e+'"'),t._updateHasMapEntry(e,!0),t._keys.push(e)}),this._events&&this._events.emit({type:"add",object:this,name:e})},t.prototype.delete=function(e){var t=this;if(this._has(e)){var n=this._data[e].value;d(function(){t._keys.remove(e),t._updateHasMapEntry(e,!1);var n=t._data[e];n.set(void 0),t._data[e]=void 0}),this._events&&this._events.emit({type:"delete",object:this,name:e,oldValue:n})}},t.prototype._updateHasMapEntry=function(n,r){var t=this._hasMap[n];return t?t.set(r):t=this._hasMap[n]=new v(r,e.Reference,this.name+"@"+this.id+' / Contains "'+n+'"'),t},t.prototype.get=function(e){return this.has(e)?this._data[e].get():void 0},t.prototype.keys=function(){return this._keys.slice()},t.prototype.values=function(){return this.keys().map(this.get,this)},t.prototype.entries=function(){var e=this;return this.keys().map(function(t){return[t,e.get(t)]})},t.prototype.forEach=function(e,t){var n=this;this.keys().forEach(function(r){return e.call(t,n.get(r),r)})},t.prototype.merge=function(e){var n=this;return d(function(){e instanceof t?e.keys().forEach(function(t){return n.set(t,e.get(t))}):Object.keys(e).forEach(function(t){return n.set(t,e[t])})}),this},t.prototype.clear=function(){var e=this;d(function(){e.keys().forEach(e.delete,e)})},Object.defineProperty(t.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),t.prototype.toJs=function(){var t=this,e={};return this.keys().forEach(function(n){return e[n]=t.get(n)}),e},t.prototype.isValidKey=function(e){return null===e||void 0===e?!1:"string"!=typeof e&&"number"!=typeof e?!1:!0},t.prototype.assertValidKey=function(e){if(!this.isValidKey(e))throw new Error("[mobx.map] Invalid key: '"+e+"'")},t.prototype.toString=function(){var e=this;return"[mobx.map { "+this.keys().map(function(t){return t+": "+e.get(t)}).join(", ")+" }]"},t.prototype.observe=function(e){return this._events||(this._events=new f),this._events.on(e)},t}();exports.ObservableMap=h,exports.map=$e,exports.isObservableMap=M;var T={};exports.isObservableObject=g;var v=function(n){function t(o,i,t){void 0===t&&(t="ObservableValue"),n.call(this,t),this.mode=i,this.hasUnreportedChange=!1,this.events=null,this.value=void 0;var r=E(o,e.Recursive),s=r[0],a=r[1];this.mode===e.Recursive&&(this.mode=s),this.value=_(a,this.mode,this.name)}return P(t,n),t.prototype.set=function(t){o(t,"Modifiers cannot be used on non-initial values."),J();var n=this.value,r=me(this.mode===e.Structure,n,t);return r&&(this.value=_(t,this.mode,this.name),this.reportChanged(),this.events&&this.events.emit(t,n)),r},t.prototype.get=function(){return this.reportObserved(),this.value},t.prototype.observe=function(e,t){return this.events||(this.events=new f),t&&e(this.value,void 0),this.events.on(e)},t.prototype.toString=function(){return this.name+"@"+this.id+"["+this.value+"]"},t}(w),f=function(){function e(){this.listeners=[]}return e.prototype.emit=function(){for(var t=this.listeners.slice(),e=0,n=t.length;n>e;e++)t[e].apply(null,arguments)},e.prototype.on=function(e){var t=this;return this.listeners.push(e),Oe(function(){var n=t.listeners.indexOf(e);-1!==n&&t.listeners.splice(n,1)})},e.prototype.once=function(t){var e=this.on(function(){e(),t.apply(this,arguments)});return e},e}();exports.SimpleEventEmitter=f;var C=[];Object.freeze(C);var W=[],q=function(){};
"use strict";function B(e,t){o(e,"autorun methods cannot have modifiers"),n("function"==typeof e,"autorun expects a function"),n(0===e.length,"autorun expects a function without arguments"),t&&(e=e.bind(t));var r=new O(e.name||"Autorun",function(){this.track(e)});return r.schedule(),r.getDisposer()}function ee(r,o,t){var n=!1,e=B(function(){r.call(t)&&(e?e():n=!0,o.call(t))});return n&&e(),e}function We(e,t,n){return m("`autorunUntil` is deprecated, please use `when`."),ee.apply(null,arguments)}function Qe(e,n,o){void 0===n&&(n=1),o&&(e=e.bind(o));var r=!1,t=new O(e.name||"AutorunAsync",function(){r||(r=!0,setTimeout(function(){r=!1,t.isDisposed||t.track(e)},n))});return t.schedule(),t.getDisposer()}function k(e,t,n,r){return arguments.length<3&&"function"==typeof e?Xe(e,t):Z.apply(null,arguments)}function Xe(r,o){var e=E(r,t.Recursive),i=e[0],n=e[1];return new p(n,o,i===t.Structure,n.name||"ComputedValue")}function Z(i,e,o,a){if(1===arguments.length){var u=i;return function(e,t,n){return Z.call(null,e,t,n,u)}}n(o&&o.hasOwnProperty("get"),"@computed can only be used on getter functions, like: '@computed get myProps() { return ...; }'"),I(i,e);var r={},s=o.get;return n("object"==typeof i,"The @observable decorator can only be used on objects",e),n("function"==typeof s,"@observable expects a getter function if used on a property.",e),n(!o.set,"@observable properties cannot have a setter.",e),n(0===s.length,"@observable getter functions should not take arguments.",e),r.configurable=!0,r.enumerable=!1,r.get=function(){return S(j(this,void 0,t.Recursive),e,a&&a.asStructure===!0?z(s):s),this[e]},r.set=te,o?r:void Object.defineProperty(i,e,r)}function te(){throw new Error("[ComputedValue] It is not allowed to assign new values to computed properties.")}function He(t,o){n("function"==typeof t&&1===t.length,"createTransformer expects a function that accepts one argument");var r={},i=e.resetId,s=function(e){function n(n,r){e.call(this,function(){return t(r)},null,!1,"Transformer-"+t.name+"-"+n),this.sourceIdentifier=n,this.sourceObject=r}return P(n,e),n.prototype.onBecomeUnobserved=function(){var t=this.value;e.prototype.onBecomeUnobserved.call(this),delete r[this.sourceIdentifier],o&&o(t,this.sourceObject)},n}(p);return function(o){i!==e.resetId&&(r={},i=e.resetId);var n=Ke(o),t=r[n];return t?t.get():(t=r[n]=new s(n,o),t.get())}}function Ke(e){if(null===e||"object"!=typeof e)throw new Error("[mobx] transform expected some kind of object, got: "+e);var t=e.$transformId;return void 0===t&&(t=l(),Object.defineProperty(e,"$transformId",{configurable:!0,writable:!0,enumerable:!1,value:t})),t}function ze(e,t){return N()||console.warn("[mobx.expr] 'expr' should only be used inside other reactive functions."),k(e,t).get()}function oe(e){for(var o=[],r=1;r<arguments.length;r++)o[r-1]=arguments[r];return n(arguments.length>=2,"extendObservable expected 2 or more arguments"),n("object"==typeof e,"extendObservable expects an object as first argument"),n(!(e instanceof h),"extendObservable should not be used on maps, use map.merge instead"),o.forEach(function(r){n("object"==typeof r,"all arguments of extendObservable should be objects"),ie(e,r,t.Recursive,null)}),e}function ie(e,t,r,o){var i=j(e,o,r);for(var n in t)if(t.hasOwnProperty(n)){if(e===t&&!be(e,n))continue;S(i,n,t[n])}return e}function se(t,n){var r=e.allowStateChanges;e.allowStateChanges=t;var o=n();return e.allowStateChanges=r,o}function a(e,n,t){void 0===t&&(t=!1),u&&u.emit({id:e.id,name:e.name+"@"+e.id,node:e,state:n,changed:t})}function Ve(e){return ae(e)}function ae(e){var t={id:e.id,name:e.name+"@"+e.id};return e.observing&&e.observing.length&&(t.dependencies=ye(e.observing).map(ae)),t}function Me(e){return fe(e)}function fe(e){var t={id:e.id,name:e.name+"@"+e.id};return e.observers&&e.observers.length&&(t.observers=ye(e.observers).map(fe)),t}function De(n){var e=[],t=!1;return function(r){(n||r.changed)&&e.push(r),t||(t=!0,setTimeout(function(){console[console.table?"table":"dir"](e),e=[],t=!1},1))}}function Pe(e,t){void 0===e&&(e=!1),u||(u=new f);var n=t?function(n){(e||n.changed)&&t(n)}:De(e),r=u.on(n);return Oe(function(){r(),0===u.listeners.length&&(u=null)})}function y(e,t){if(null===e||void 0===e)return!1;if(void 0!==t){if(e instanceof h||e instanceof i)throw new Error("[mobx.isObservable] isObservable(object, propertyName) is not supported for arrays and maps. Use map.has or array.length instead.");if(g(e)){var n=e.$mobx;return n.values&&!!n.values[t]}return!1}return!!e.$mobx||e instanceof w||e instanceof O||e instanceof p}function Ae(i,e,r){if(n(arguments.length>=2&&arguments.length<=3,"Illegal decorator config",e),I(i,e),r&&r.hasOwnProperty("get"))return m("Using @observable on computed values is deprecated. Use @computed instead."),k.apply(null,arguments);var o={};return n("object"==typeof i,"The @observable decorator can only be used on objects",e),o.configurable=!0,o.enumerable=!0,o.get=function(){var o=this,n=void 0;return r&&r.initializer&&(n=r.initializer(),"function"==typeof n&&(n=$(n))),se(!0,function(){S(j(o,void 0,t.Recursive),e,n)}),this[e]},o.set=function(n){S(j(this,void 0,t.Recursive),e,"function"==typeof n?$(n):n)},r?o:void Object.defineProperty(i,e,o)}function ve(e,a){if("string"==typeof arguments[1])return Ae.apply(null,arguments);if(n(1===arguments.length||2===arguments.length,"observable expects one or two arguments"),y(e))return e;var s=E(e,t.Recursive),o=s[0],i=s[1],u=o===t.Reference?r.Reference:_e(i);switch(u){case r.Array:case r.PlainObject:return _(i,o);case r.Reference:case r.ComplexObject:return new v(i,o);case r.ComplexFunction:throw new Error("[mobx.observable] To be able to make a function reactive it should not have arguments. If you need an observable reference to a function, use `observable(asReference(f))`");case r.ViewFunction:return m("Use `computed(expr)` instead of `observable(expr)`"),k(e,a)}n(!1,"Illegal State")}function _e(e){return null===e||void 0===e?r.Reference:"function"==typeof e?e.length?r.ComplexFunction:r.ViewFunction:Array.isArray(e)||e instanceof i?r.Array:"object"==typeof e?c(e)?r.PlainObject:r.ComplexObject:r.Reference}function F(t,n,e,r){return"function"==typeof e?we(t,n,e,r):Y(t,n,e)}function Y(e,t,r){return A(e)?e.observe(t):M(e)?e.observe(t):g(e)?Ue(e,t,r):e instanceof v||e instanceof p?e.observe(t,r):c(e)?Y(ve(e),t,r):void n(!1,"first argument of observe should be some observable value or plain object")}function we(e,t,r,o){var i="[mobx.observe] the provided observable map has no key with name: "+t;if(M(e)){if(!e._has(t))throw new Error(i);return F(e._data[t],r)}if(g(e)){if(!y(e,t))throw new Error(i);return F(e.$mobx.values[t],r,o)}return c(e)?(oe(e,{property:e[t]}),we(e,t,r,o)):void n(!1,"first argument of observe should be an (observable)object or observableMap if a property name is given")}function b(e,n,t){function s(r){return n&&t.push([e,r]),r}if(void 0===n&&(n=!0),void 0===t&&(t=null),n&&null===t&&(t=[]),n&&null!==e&&"object"==typeof e)for(var o=0,l=t.length;l>o;o++)if(t[o][0]===e)return t[o][1];if(!e)return e;if(Array.isArray(e)||e instanceof i){var r=s([]);return r.push.apply(r,e.map(function(e){return b(e,n,t)})),r}if(e instanceof h){var u=s({});return e.forEach(function(e,r){return u[r]=b(e,n,t)}),u}if("object"==typeof e&&c(e)){var r=s({});for(var a in e)e.hasOwnProperty(a)&&(r[a]=b(e[a],n,t));return r}return y(e)&&e.$mobx instanceof v?b(e(),n,t):e}function xe(e){n(e.isDirty,"atom not dirty"),e.isDirty=!1,a(e,"READY",!0),K(e,!0)}function N(){return e.derivationStack.length>0}function J(){n(e.allowStateChanges,"It is not allowed to change the state when a computed value is being evaluated. Use 'autorun' to create reactive functions with side-effects. Or use 'extras.allowStateChanges(true, block)' to supress this message.")}function je(e){1===++e.dependencyStaleCount&&(a(e,"STALE"),ge(e))}function ke(e,t){if(n(e.dependencyStaleCount>0,"unexpected ready notification"),t&&(e.dependencyChangeCount+=1),0===--e.dependencyStaleCount)if(e.dependencyChangeCount>0){e.dependencyChangeCount=0,a(e,"PENDING");var r=e.onDependenciesReady();K(e,r)}else a(e,"READY",!1),K(e,!1)}function de(t,r){var n=!0,o=t.observing;t.observing=[],e.derivationStack.push(t);try{var i=r();return n=!1,Ee(t,o),i}finally{n&&(console.error("[mobx] An uncaught exception occurred while calculating your computed value, autorun or transformer. Or inside the render method of a React component. These methods should never throw exceptions as MobX will usually not be able to recover from them. "+("Please enable 'Pause on (caught) exceptions' in your debugger to find the root cause. In: '"+t.name+"#"+t.id+"'")),U())}}function Ee(r,u){e.derivationStack.length-=1;for(var i=pe(r.observing,u),o=i[0],s=i[1],t=0,a=o.length;a>t;t++){var c=o[t];n(!he(r,c),"Cycle detected",r),qe(o[t],r)}for(var t=0,a=s.length;a>t;t++)G(s[t],r)}function he(r,n){var e=n.observing;if(void 0===e)return!1;if(-1!==e.indexOf(n))return!0;for(var o=e.length,t=0;o>t;t++)if(he(r,e[t]))return!0;return!1}function l(){return++e.mobxGuid}function Be(){}function U(){e.resetId++;var n=new ue;for(var t in n)"mobxGuid"!==t&&"resetId"!==t&&(e[t]=n[t])}function qe(e,r){var t=e.observers,n=t.length;t[n]=r,0===n&&e.onBecomeObserved()}function G(t,r){var e=t.observers,n=e.indexOf(r);-1!==n&&e.splice(n,1),0===e.length&&t.onBecomeUnobserved()}function Q(n){if(!(e.inUntracked>0)){var o=e.derivationStack,i=o.length;if(i>0){var t=o[i-1].observing,r=t.length;t[r-1]!==n&&t[r-2]!==n&&(t[r]=n)}}}function ge(e){var t=e.observers.slice();t.forEach(je),e.staleObservers=e.staleObservers.concat(t)}function K(e,t){e.staleObservers.splice(0).forEach(function(e){return ke(e,t)})}function et(t){m("This feature is experimental and might be removed in a future minor release. Please report if you use this feature in production: https://github.com/mobxjs/mobx/issues/49"),e.inUntracked++;var n=t();return e.inUntracked--,n}function H(){if(!(e.isRunningReactions===!0||e.inTransaction>0)){e.isRunningReactions=!0;for(var t=e.pendingReactions,o=0;t.length>0;){if(++o===Se)throw new Error("Reaction doesn't converge to a stable state. Probably there is a cycle in the reactive function: "+t[0].toString());for(var r=t.splice(0),n=0,i=r.length;i>n;n++)r[n].runReaction()}e.isRunningReactions=!1}}function d(r,o){e.inTransaction+=1;var i=r.call(o);if(0===--e.inTransaction){for(var n=e.changedAtoms.splice(0),t=0,s=n.length;s>t;t++)xe(n[t]);H()}return i}function $(e){return new D(e)}function z(e){return new R(e)}function X(e){return new L(e)}function E(e,n){return e instanceof D?[t.Reference,e.value]:e instanceof R?[t.Structure,e.value]:e instanceof L?[t.Flat,e.value]:[n,e]}function Ze(e){return e===$?t.Reference:e===z?t.Structure:e===X?t.Flat:(n(void 0===e,"Cannot determine value mode from function. Please pass in one of these: mobx.asReference, mobx.asStructure or mobx.asFlat, got: "+e),t.Recursive)}function _(e,a,s){var r;if(y(e))return e;switch(a){case t.Reference:return e;case t.Flat:o(e,"Items inside 'asFlat' cannot have modifiers"),r=t.Reference;break;case t.Structure:o(e,"Items inside 'asStructure' cannot have modifiers"),r=t.Structure;break;case t.Recursive:i=E(e,t.Recursive),r=i[0],e=i[1];break;default:n(!1,"Illegal State")}return Array.isArray(e)&&Object.isExtensible(e)?le(e,r,s):c(e)&&Object.isExtensible(e)?ie(e,e,r,s):e;var i}function o(e,t){if(e instanceof D||e instanceof R||e instanceof L)throw new Error("[mobx] asStructure / asReference / asFlat cannot be used here. "+t)}function Ye(e){return e.atom.reportObserved(),e.values.length}function Ne(n,e){if("number"!=typeof e||0>e)throw new Error("[mobx.array] Out of range: "+e);var t=n.values.length;e!==t&&(e>t?s(n,t,0,new Array(e-t)):s(n,e,t-e))}function re(n,t,e){if(t!==n.lastKnownLength)throw new Error("[mobx] Modification exception: the internal structure of an observable array was changed. Did you use peek() to change it?");J(),n.lastKnownLength+=e,e>0&&t+e>V&&ce(t+e)}function s(o,e,n,t){var r=o.values.length;if(!(void 0!==t&&0!==t.length||0!==n&&0!==r))return[];void 0===e?e=0:e>r?e=r:0>e&&(e=Math.max(0,r+e)),n=2===arguments.length?r-e:void 0===n||null===n?0:Math.max(0,Math.min(n,r-e)),t=void 0===t?C:t.map(o.makeChildReactive);var a=t.length-n;re(o,r,a);var i=(s=o.values).splice.apply(s,[e,n].concat(t));return Te(o,e,i,t),i;var s}function Ge(e){return o(e,"Array values cannot have modifiers"),this.mode===t.Flat||this.mode===t.Reference?e:_(e,this.mode,this.atom.name+"@"+this.atom.id+" / ArrayEntry")}function Le(e,t,n){e.atom.reportChanged(),e.changeEvent&&e.changeEvent.emit({object:e.array,type:"update",index:t,oldValue:n})}function Te(e,r,t,n){(0!==t.length||0!==n.length)&&(e.atom.reportChanged(),e.changeEvent&&e.changeEvent.emit({object:e.array,type:"splice",index:r,addedCount:n.length,removed:t}))}function Fe(e){Object.defineProperty(i.prototype,""+e,{enumerable:!1,configurable:!1,set:function(n){var r=this.$mobx,i=r.values;if(o(n,"Modifiers cannot be used on array values. For non-reactive array values use makeReactive(asFlat(array))."),e<i.length){J();var a=i[e],u=r.mode===t.Structure?!x(a,n):a!==n;u&&(i[e]=r.makeChildReactive(n),Le(r,e,a))}else{if(e!==i.length)throw new Error("[mobx.array] Index out of bounds, "+e+" is larger than "+i.length);s(r,e,0,[n])}},get:function(){var t=this.$mobx;return t&&e<t.values.length?(t.atom.reportObserved(),t.values[e]):void 0}})}function ce(t){for(var e=V;t>e;e++)Fe(e);V=t}function le(e,t,n){return new i(e,t,n)}function Ie(e){return m("fastArray is deprecated. Please use `observable(asFlat([]))`"),le(e,t.Flat,null)}function A(e){return e instanceof i}function $e(e,t){return new h(e,t)}function M(e){return e instanceof h}function j(e,n,r){if(void 0===r&&(r=t.Recursive),e.$mobx){if(e.$mobx.type!==T)throw new Error("The given object is observable but not an observable object");return e.$mobx}c(e)||(n=e.constructor.name),n||(n="ObservableObject");var o={type:T,values:{},events:void 0,id:l(),target:e,name:n,mode:r};return Object.defineProperty(e,"$mobx",{enumerable:!1,configurable:!1,writable:!1,value:o}),o}function S(e,t,n){e.values[t]?e.target[t]=n:Ce(e,t,n)}function Ce(e,r,t){I(e.target,r);var n,o=e.name+"@"+e.id+' / Prop "'+r+'"',i=!0;"function"==typeof t&&0===t.length?n=new p(t,e.target,!1,o):t instanceof R&&"function"==typeof t.value&&0===t.value.length?n=new p(t.value,e.target,!0,o):(i=!1,n=new v(t,e.mode,o)),e.values[r]=n,Object.defineProperty(e.target,r,{configurable:!0,enumerable:!i,get:function(){return n.get()},set:i?te:function(t){var o=n.value;n.set(t)&&void 0!==e.events&&e.events.emit({type:"update",object:this,name:r,oldValue:o})}}),void 0!==e.events&&e.events.emit({type:"add",object:e.target,name:r})}function Ue(e,r,o){n(g(e),"Expected observable object"),n(o!==!0,"`observe` doesn't support the fire immediately property for observable objects.");var t=e.$mobx;return void 0===t.events&&(t.events=new f),e.$mobx.events.on(r)}function g(e){return e&&e.$mobx&&e.$mobx.type===T}function n(t,n,e){if(!t)throw new Error("[mobx] Invariant failed: "+n+(e?" in '"+e+"'":""))}function m(e){-1===W.indexOf(e)&&(W.push(e),console.error("[mobx] Deprecated: "+e))}function Oe(t){var e=!1;return function(){return e?void 0:(e=!0,t.apply(this,arguments))}}function ye(t){var e=[];return t.forEach(function(t){-1===e.indexOf(t)&&e.push(t)}),e}function c(e){return null!==e&&"object"==typeof e&&Object.getPrototypeOf(e)===Object.prototype}function me(n,e,t){return n?!x(e,t):e!==t}function Re(n,t){for(var e=0;e<t.length;e++)Object.defineProperty(n,t[e],{configurable:!0,writable:!0,enumerable:!1,value:n[t[e]]})}function be(t,n){var e=Object.getOwnPropertyDescriptor(t,n);return!e||e.configurable!==!1&&e.writable!==!1}function I(t,e){n(be(t,e),"Cannot make property '"+e+"' observable, it is not configurable and writable in the target object")}function x(e,t){if(null===e&&null===t)return!0;if(void 0===e&&void 0===t)return!0;var o=Array.isArray(e)||A(e);if(o!==(Array.isArray(t)||A(t)))return!1;if(o){if(e.length!==t.length)return!1;for(var n=e.length;n>=0;n--)if(!x(e[n],t[n]))return!1;return!0}if("object"==typeof e&&"object"==typeof t){if(null===e||null===t)return!1;if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var r in e){if(!t.hasOwnProperty(r))return!1;if(!x(e[r],t[r]))return!1}return!0}return e===t}function pe(n,r){if(!r||!r.length)return[n,[]];if(!n||!n.length)return[[],r];for(var o=[],i=[],e=0,s=0,h=n.length,c=!1,t=0,a=0,l=r.length,u=!1,f=!1;!f&&!c;){if(!u){if(h>e&&l>t&&n[e]===r[t]){if(e++,t++,e===h&&t===l)return[o,i];continue}s=e,a=t,u=!0}a+=1,s+=1,a>=l&&(f=!0),s>=h&&(c=!0),c||n[s]!==r[t]?f||r[a]!==n[e]||(i.push.apply(i,r.slice(t,a)),t=a+1,e++,u=!1):(o.push.apply(o,n.slice(e,s)),e=s+1,t++,u=!1)}return o.push.apply(o,n.slice(e)),i.push.apply(i,r.slice(t)),[o,i]}var P=this&&this.__extends||function(t,e){function r(){this.constructor=t}for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)};Be(),exports._={quickDiff:pe,resetGlobalState:U},exports.extras={allowStateChanges:se,getDependencyTree:Ve,getObserverTree:Me,isComputingDerivation:N,resetGlobalState:U,trackTransitions:Pe},exports.autorun=B,exports.when=ee,exports.autorunUntil=We,exports.autorunAsync=Qe,exports.computed=k,exports.createTransformer=He,exports.expr=ze,exports.extendObservable=oe;var u=null;exports.isObservable=y,exports.observable=ve;var r;!function(e){e[e.Reference=0]="Reference",e[e.PlainObject=1]="PlainObject",e[e.ComplexObject=2]="ComplexObject",e[e.Array=3]="Array",e[e.ViewFunction=4]="ViewFunction",e[e.ComplexFunction=5]="ComplexFunction"}(r||(r={})),exports.observe=F,exports.toJSON=b;var w=function(){function t(e,t,n){void 0===e&&(e="Atom"),void 0===t&&(t=q),void 0===n&&(n=q),this.name=e,this.onBecomeObserved=t,this.onBecomeUnobserved=n,this.id=l(),this.isDirty=!1,this.staleObservers=[],this.observers=[]}return t.prototype.reportObserved=function(){Q(this)},t.prototype.reportChanged=function(){this.isDirty||(this.reportStale(),this.reportReady())},t.prototype.reportStale=function(){this.isDirty||(this.isDirty=!0,a(this,"STALE"),ge(this))},t.prototype.reportReady=function(){n(this.isDirty,"atom not dirty"),e.inTransaction>0?e.changedAtoms.push(this):(xe(this),H())},t.prototype.toString=function(){return this.name+"@"+this.id},t}();exports.Atom=w;var p=function(){function t(n,r,i,t){var o=this;void 0===t&&(t="ComputedValue"),this.derivation=n,this.scope=r,this.compareStructural=i,this.name=t,this.id=l(),this.isLazy=!0,this.isComputing=!1,this.staleObservers=[],this.observers=[],this.observing=[],this.dependencyChangeCount=0,this.dependencyStaleCount=0,this.value=void 0,this.peek=function(){o.isComputing=!0,e.isComputingComputedValue++;var t=e.allowStateChanges;e.allowStateChanges=!1;var i=n.call(r);return e.allowStateChanges=t,e.isComputingComputedValue--,o.isComputing=!1,i}}return t.prototype.onBecomeObserved=function(){},t.prototype.onBecomeUnobserved=function(){for(var e=0,t=this.observing.length;t>e;e++)G(this.observing[e],this);this.observing=[],this.isLazy=!0,this.value=void 0},t.prototype.onDependenciesReady=function(){var e=this.trackAndCompute();return a(this,"READY",e),e},t.prototype.get=function(){if(n(!this.isComputing,"Cycle detected",this.derivation),Q(this),this.dependencyStaleCount>0)return this.peek();if(this.isLazy){if(!N())return this.peek();this.isLazy=!1,this.trackAndCompute()}return this.value},t.prototype.set=function(e){throw new Error("[ComputedValue '"+name+"'] It is not possible to assign a new value to a computed value.")},t.prototype.trackAndCompute=function(){var e=this.value;return this.value=de(this,this.peek),me(this.compareStructural,this.value,e)},t.prototype.observe=function(r,o){var i=this,t=!0,n=void 0;return B(function(){var s=i.get();(!t||o)&&(e.inUntracked++,r(s,n),e.inUntracked--),t=!1,n=s})},t.prototype.toString=function(){return this.name+"@"+this.id+"["+this.derivation.toString()+"]"},t}(),ue=function(){function e(){this.version=1,this.derivationStack=[],this.mobxGuid=0,this.inTransaction=0,this.inUntracked=0,this.isRunningReactions=!1,this.changedAtoms=[],this.pendingReactions=[],this.allowStateChanges=!0,this.resetId=0}return e}(),e=function(){var e=new ue;if(global.__mobservableTrackingStack||global.__mobservableViewStack)throw new Error("[mobx] An incompatible version of mobservable is already loaded.");if(global.__mobxGlobal&&global.__mobxGlobal.version!==e.version)throw new Error("[mobx] An incompatible version of mobx is already loaded.");return global.__mobxGlobal?global.__mobxGlobal:global.__mobxGlobal=e}();exports.untracked=et;var O=function(){function t(e,t){void 0===e&&(e="Reaction"),this.name=e,this.onInvalidate=t,this.id=l(),this.staleObservers=C,this.observers=C,this.observing=[],this.dependencyChangeCount=0,this.dependencyStaleCount=0,this.isDisposed=!1,this._isScheduled=!1}return t.prototype.onBecomeObserved=function(){},t.prototype.onBecomeUnobserved=function(){},t.prototype.onDependenciesReady=function(){return this.schedule(),!1},t.prototype.schedule=function(){this._isScheduled||(this._isScheduled=!0,e.pendingReactions.push(this),H())},t.prototype.isScheduled=function(){return this.dependencyStaleCount>0||this._isScheduled},t.prototype.runReaction=function(){this.isDisposed||(this._isScheduled=!1,this.onInvalidate(),a(this,"READY",!0))},t.prototype.track=function(e){de(this,e)},t.prototype.dispose=function(){if(!this.isDisposed){this.isDisposed=!0;for(var t=this.observing.splice(0),e=0,n=t.length;n>e;e++)G(t[e],this)}},t.prototype.getDisposer=function(){var e=this.dispose.bind(this);return e.$mobx=this,e},t.prototype.toString=function(){return"Reaction["+this.name+"]"},t}();exports.Reaction=O;var Se=100;exports.transaction=d;var t;!function(e){e[e.Recursive=0]="Recursive",e[e.Reference=1]="Reference",e[e.Structure=2]="Structure",e[e.Flat=3]="Flat"}(t||(t={})),exports.asReference=$,exports.asStructure=z,exports.asFlat=X;var D=function(){function e(e){this.value=e,o(e,"Modifiers are not allowed to be nested")}return e}(),R=function(){function e(e){this.value=e,o(e,"Modifiers are not allowed to be nested")}return e}(),L=function(){function e(e){this.value=e,o(e,"Modifiers are not allowed to be nested")}return e}(),V=0,ne=function(){function e(){}return e}();ne.prototype=[];var i=function(t){function e(n,r,o){t.call(this);var e=this.$mobx={atom:new w(o||"ObservableArray"),values:void 0,changeEvent:void 0,lastKnownLength:0,mode:r,array:this,makeChildReactive:function(t){return Ge.call(e,t)}};Object.defineProperty(this,"$mobx",{enumerable:!1,configurable:!1,writable:!1}),n&&n.length?(re(e,0,n.length),e.values=n.map(e.makeChildReactive)):e.values=[]}return P(e,t),e.prototype.observe=function(t,e){return void 0===e&&(e=!1),void 0===this.$mobx.changeEvent&&(this.$mobx.changeEvent=new f),e&&t({object:this,type:"splice",index:0,addedCount:this.$mobx.values.length,removed:[]}),this.$mobx.changeEvent.on(t)},e.prototype.clear=function(){return this.splice(0)},e.prototype.replace=function(e){return s(this.$mobx,0,this.$mobx.values.length,e)},e.prototype.toJSON=function(){return this.$mobx.atom.reportObserved(),this.$mobx.values.slice()},e.prototype.peek=function(){return this.$mobx.values},e.prototype.find=function(r,o,t){void 0===t&&(t=0),this.$mobx.atom.reportObserved();for(var n=this.$mobx.values,i=n.length,e=t;i>e;e++)if(r.call(o,n[e],e,this))return n[e];return null},e.prototype.splice=function(t,n){for(var r=[],e=2;e<arguments.length;e++)r[e-2]=arguments[e];switch(arguments.length){case 0:return[];case 1:return s(this.$mobx,t);case 2:return s(this.$mobx,t,n)}return s(this.$mobx,t,n,r)},e.prototype.push=function(){for(var t=[],e=0;e<arguments.length;e++)t[e-0]=arguments[e];return s(this.$mobx,this.$mobx.values.length,0,t),this.$mobx.values.length},e.prototype.pop=function(){return this.splice(Math.max(this.$mobx.values.length-1,0),1)[0]},e.prototype.shift=function(){return this.splice(0,1)[0]},e.prototype.unshift=function(){for(var t=[],e=0;e<arguments.length;e++)t[e-0]=arguments[e];return s(this.$mobx,0,0,t),this.$mobx.values.length},e.prototype.reverse=function(){this.$mobx.atom.reportObserved();var e=this.slice();return e.reverse.apply(e,arguments)},e.prototype.sort=function(t){this.$mobx.atom.reportObserved();var e=this.slice();return e.sort.apply(e,arguments)},e.prototype.remove=function(t){var e=this.$mobx.values.indexOf(t);return e>-1?(this.splice(e,1),!0):!1},e.prototype.toString=function(){return"[mobx.array] "+Array.prototype.toString.apply(this.$mobx.values,arguments)},e.prototype.toLocaleString=function(){return"[mobx.array] "+Array.prototype.toLocaleString.apply(this.$mobx.values,arguments)},e}(ne);Re(i.prototype,["constructor","observe","clear","replace","toJSON","peek","find","splice","push","pop","shift","unshift","reverse","sort","remove","toString","toLocaleString"]),Object.defineProperty(i.prototype,"length",{enumerable:!1,configurable:!0,get:function(){return Ye(this.$mobx)},set:function(e){Ne(this.$mobx,e)}}),["concat","every","filter","forEach","indexOf","join","lastIndexOf","map","reduce","reduceRight","slice","some"].forEach(function(e){var t=Array.prototype[e];Object.defineProperty(i.prototype,e,{configurable:!1,writable:!0,enumerable:!1,value:function(){return this.$mobx.atom.reportObserved(),t.apply(this.$mobx.values,arguments)}})}),ce(1e3),exports.fastArray=Ie,exports.isObservableArray=A;var Je={},h=function(){function e(e,n){var r=this;this.$mobx=Je,this._data={},this._hasMap={},this._events=void 0,this.name="ObservableMap",this.id=l(),this._keys=new i(null,t.Reference,this.name+"@"+this.id+" / keys()"),this._valueMode=Ze(n),c(e)?this.merge(e):Array.isArray(e)&&e.forEach(function(e){var t=e[0],n=e[1];return r.set(t,n)})}return e.prototype._has=function(e){return"undefined"!=typeof this._data[e]},e.prototype.has=function(e){return this.isValidKey(e)?this._hasMap[e]?this._hasMap[e].get():this._updateHasMapEntry(e,!1).get():!1},e.prototype.set=function(e,n){var t=this;if(this.assertValidKey(e),o(n,"[mobx.map.set] Expected unwrapped value to be inserted to key '"+e+"'. If you need to use modifiers pass them as second argument to the constructor"),this._has(e)){var r=this._data[e].value,i=this._data[e].set(n);i&&this._events&&this._events.emit({type:"update",object:this,name:e,oldValue:r})}else d(function(){t._data[e]=new v(n,t._valueMode,t.name+"@"+t.id+' / Entry "'+e+'"'),t._updateHasMapEntry(e,!0),t._keys.push(e)}),this._events&&this._events.emit({type:"add",object:this,name:e})},e.prototype.delete=function(e){var t=this;if(this._has(e)){var n=this._data[e].value;d(function(){t._keys.remove(e),t._updateHasMapEntry(e,!1);var n=t._data[e];n.set(void 0),t._data[e]=void 0}),this._events&&this._events.emit({type:"delete",object:this,name:e,oldValue:n})}},e.prototype._updateHasMapEntry=function(n,r){var e=this._hasMap[n];return e?e.set(r):e=this._hasMap[n]=new v(r,t.Reference,this.name+"@"+this.id+' / Contains "'+n+'"'),e},e.prototype.get=function(e){return this.has(e)?this._data[e].get():void 0},e.prototype.keys=function(){return this._keys.slice()},e.prototype.values=function(){return this.keys().map(this.get,this)},e.prototype.entries=function(){var e=this;return this.keys().map(function(t){return[t,e.get(t)]})},e.prototype.forEach=function(e,t){var n=this;this.keys().forEach(function(r){return e.call(t,n.get(r),r)})},e.prototype.merge=function(t){var n=this;return d(function(){t instanceof e?t.keys().forEach(function(e){return n.set(e,t.get(e))}):Object.keys(t).forEach(function(e){return n.set(e,t[e])})}),this},e.prototype.clear=function(){var e=this;d(function(){e.keys().forEach(e.delete,e)})},Object.defineProperty(e.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),e.prototype.toJs=function(){var t=this,e={};return this.keys().forEach(function(n){return e[n]=t.get(n)}),e},e.prototype.isValidKey=function(e){return null===e||void 0===e?!1:"string"!=typeof e&&"number"!=typeof e?!1:!0},e.prototype.assertValidKey=function(e){if(!this.isValidKey(e))throw new Error("[mobx.map] Invalid key: '"+e+"'")},e.prototype.toString=function(){var e=this;return"[mobx.map { "+this.keys().map(function(t){return t+": "+e.get(t)}).join(", ")+" }]"},e.prototype.observe=function(e){return this._events||(this._events=new f),this._events.on(e)},e}();exports.ObservableMap=h,exports.map=$e,exports.isObservableMap=M;var T={};exports.isObservableObject=g;var v=function(n){function e(o,i,e){void 0===e&&(e="ObservableValue"),n.call(this,e),this.mode=i,this.hasUnreportedChange=!1,this.events=null,this.value=void 0;var r=E(o,t.Recursive),s=r[0],a=r[1];this.mode===t.Recursive&&(this.mode=s),this.value=_(a,this.mode,this.name)}return P(e,n),e.prototype.set=function(e){o(e,"Modifiers cannot be used on non-initial values."),J();var n=this.value,r=me(this.mode===t.Structure,n,e);return r&&(this.value=_(e,this.mode,this.name),this.reportChanged(),this.events&&this.events.emit(e,n)),r},e.prototype.get=function(){return this.reportObserved(),this.value},e.prototype.observe=function(e,t){return this.events||(this.events=new f),t&&e(this.value,void 0),this.events.on(e)},e.prototype.toString=function(){return this.name+"@"+this.id+"["+this.value+"]"},e}(w),f=function(){function e(){this.listeners=[]}return e.prototype.emit=function(){for(var t=this.listeners.slice(),e=0,n=t.length;n>e;e++)t[e].apply(null,arguments)},e.prototype.on=function(e){var t=this;return this.listeners.push(e),Oe(function(){var n=t.listeners.indexOf(e);-1!==n&&t.listeners.splice(n,1)})},e.prototype.once=function(t){var e=this.on(function(){e(),t.apply(this,arguments)});return e},e}();exports.SimpleEventEmitter=f;var C=[];Object.freeze(C);var W=[],q=function(){};
//# sourceMappingURL=lib/mobx.min.js.map
(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.mobx = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
(function (global){
"use strict";
var __extends = (this && this.__extends) || function (d, b) {

@@ -133,3 +134,3 @@ for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];

return Transformer;
})(ComputedValue);
}(ComputedValue));
return function (object) {

@@ -425,5 +426,5 @@ if (resetId !== globalState.resetId) {

if (source instanceof ObservableMap) {
var res = cache({});
source.forEach(function (value, key) { return res[key] = toJSON(value, detectCycles, __alreadySeen); });
return res;
var res_1 = cache({});
source.forEach(function (value, key) { return res_1[key] = toJSON(value, detectCycles, __alreadySeen); });
return res_1;
}

@@ -490,3 +491,3 @@ if (typeof source === "object" && isPlainObject(source)) {

return Atom;
})();
}());
exports.Atom = Atom;

@@ -568,3 +569,5 @@ var ComputedValue = (function () {

if (!firstTime || fireImmediately) {
globalState.inUntracked++;
listener(newValue, prevValue);
globalState.inUntracked--;
}

@@ -579,3 +582,3 @@ firstTime = false;

return ComputedValue;
})();
}());
function isComputingDerivation() {

@@ -666,3 +669,3 @@ return globalState.derivationStack.length > 0;

return MobXGlobals;
})();
}());
var globalState = (function () {

@@ -789,3 +792,3 @@ var res = new MobXGlobals();

return Reaction;
})();
}());
exports.Reaction = Reaction;

@@ -845,3 +848,3 @@ var MAX_REACTION_ITERATIONS = 100;

return AsReference;
})();
}());
var AsStructure = (function () {

@@ -853,3 +856,3 @@ function AsStructure(value) {

return AsStructure;
})();
}());
var AsFlat = (function () {

@@ -861,3 +864,3 @@ function AsFlat(value) {

return AsFlat;
})();
}());
function getValueModeFromValue(value, defaultMode) {

@@ -919,3 +922,3 @@ if (value instanceof AsReference)

return StubArray;
})();
}());
StubArray.prototype = [];

@@ -1107,3 +1110,3 @@ function getArrayLength(adm) {

return ObservableArray;
})(StubArray);
}(StubArray));
makeNonEnumerable(ObservableArray.prototype, [

@@ -1370,3 +1373,3 @@ "constructor",

return ObservableMap;
})();
}());
exports.ObservableMap = ObservableMap;

@@ -1511,3 +1514,3 @@ function map(initialValues, valueModifier) {

return ObservableValue;
})(Atom);
}(Atom));
var SimpleEventEmitter = (function () {

@@ -1539,3 +1542,3 @@ function SimpleEventEmitter() {

return SimpleEventEmitter;
})();
}());
exports.SimpleEventEmitter = SimpleEventEmitter;

@@ -1542,0 +1545,0 @@ var EMPTY_ARRAY = [];

/** MobX - (c) Michel Weststrate 2015, 2016 - MIT Licensed */
!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.mobx=e()}}(function(){return function a(e,t,n){function r(o,l){if(!t[o]){if(!e[o]){var u="function"==typeof require&&require;if(!l&&u)return u(o,!0);if(i)return i(o,!0);var c=new Error("Cannot find module '"+o+"'");throw c.code="MODULE_NOT_FOUND",c}var s=t[o]={exports:{}};e[o][0].call(s.exports,function(t){var n=e[o][1][t];return r(n?n:t)},s,s.exports,a,e,t,n)}return t[o].exports}for(var i="function"==typeof require&&require,o=0;o<n.length;o++)r(n[o]);return r}({1:[function(t,n,e){(function(c){function F(e,t){i(e,"autorun methods cannot have modifiers"),r("function"==typeof e,"autorun expects a function"),r(0===e.length,"autorun expects a function without arguments"),t&&(e=e.bind(t));var n=new $(e.name||"Autorun",function(){this.track(e)});return n.schedule(),n.getDisposer()}function ye(r,o,t){var n=!1,e=F(function(){r.call(t)&&(e?e():n=!0,o.call(t))});return n&&e(),e}function Be(e,t,n){return x("`autorunUntil` is deprecated, please use `when`."),ye.apply(null,arguments)}function Ue(e,n,o){void 0===n&&(n=1),o&&(e=e.bind(o));var r=!1,t=new $(e.name||"AutorunAsync",function(){r||(r=!0,setTimeout(function(){r=!1,t.isDisposed||t.track(e)},n))});return t.schedule(),t.getDisposer()}function C(e,t,n,r){return arguments.length<3&&"function"==typeof e?Ie(e,t):te.apply(null,arguments)}function Ie(r,o){var e=R(r,t.Recursive),i=e[0],n=e[1];return new b(n,o,i===t.Structure,n.name||"ComputedValue")}function te(i,e,o,s){if(1===arguments.length){var u=i;return function(e,t,n){return te.call(null,e,t,n,u)}}r(o&&o.hasOwnProperty("get"),"@computed can only be used on getter functions, like: '@computed get myProps() { return ...; }'"),B(i,e);var n={},a=o.get;return r("object"==typeof i,"The @observable decorator can only be used on objects",e),r("function"==typeof a,"@observable expects a getter function if used on a property.",e),r(!o.set,"@observable properties cannot have a setter.",e),r(0===a.length,"@observable getter functions should not take arguments.",e),n.configurable=!0,n.enumerable=!1,n.get=function(){return P(O(this,void 0,t.Recursive),e,s&&s.asStructure===!0?V(a):a),this[e]},n.set=Q,o?n:void Object.defineProperty(i,e,n)}function Q(){throw new Error("[ComputedValue] It is not allowed to assign new values to computed properties.")}function Pe(e,o){r("function"==typeof e&&1===e.length,"createTransformer expects a function that accepts one argument");var t={},i=n.resetId,a=function(n){function r(t,r){n.call(this,function(){return e(r)},null,!1,"Transformer-"+e.name+"-"+t),this.sourceIdentifier=t,this.sourceObject=r}return T(r,n),r.prototype.onBecomeUnobserved=function(){var e=this.value;n.prototype.onBecomeUnobserved.call(this),delete t[this.sourceIdentifier],o&&o(e,this.sourceObject)},r}(b);return function(o){i!==n.resetId&&(t={},i=n.resetId);var r=tt(o),e=t[r];return e?e.get():(e=t[r]=new a(r,o),e.get())}}function tt(e){if(null===e||"object"!=typeof e)throw new Error("[mobx] transform expected some kind of object, got: "+e);var t=e.$transformId;return void 0===t&&(t=h(),Object.defineProperty(e,"$transformId",{configurable:!0,writable:!0,enumerable:!1,value:t})),t}function Ke(e,t){return J()||console.warn("[mobx.expr] 'expr' should only be used inside other reactive functions."),C(e,t).get()}function ve(e){for(var o=[],n=1;n<arguments.length;n++)o[n-1]=arguments[n];return r(arguments.length>=2,"extendObservable expected 2 or more arguments"),r("object"==typeof e,"extendObservable expects an object as first argument"),r(!(e instanceof v),"extendObservable should not be used on maps, use map.merge instead"),o.forEach(function(n){r("object"==typeof n,"all arguments of extendObservable should be objects"),be(e,n,t.Recursive,null)}),e}function be(e,t,r,o){var i=O(e,o,r);for(var n in t)if(t.hasOwnProperty(n)){if(e===t&&!re(e,n))continue;P(i,n,t[n])}return e}function ge(e,t){var r=n.allowStateChanges;n.allowStateChanges=e;var o=t();return n.allowStateChanges=r,o}function f(e,n,t){void 0===t&&(t=!1),l&&l.emit({id:e.id,name:e.name+"@"+e.id,node:e,state:n,changed:t})}function Ve(e){return W(e)}function W(e){var t={id:e.id,name:e.name+"@"+e.id};return e.observing&&e.observing.length&&(t.dependencies=ee(e.observing).map(W)),t}function et(e){return ie(e)}function ie(e){var t={id:e.id,name:e.name+"@"+e.id};return e.observers&&e.observers.length&&(t.observers=ee(e.observers).map(ie)),t}function _e(n){var e=[],t=!1;return function(r){(n||r.changed)&&e.push(r),t||(t=!0,setTimeout(function(){console[console.table?"table":"dir"](e),e=[],t=!1},1))}}function De(e,t){void 0===e&&(e=!1),l||(l=new d);var n=t?function(n){(e||n.changed)&&t(n)}:_e(e),r=l.on(n);return Z(function(){r(),0===l.listeners.length&&(l=null)})}function w(e,t){if(null===e||void 0===e)return!1;if(void 0!==t){if(e instanceof v||e instanceof a)throw new Error("[mobx.isObservable] isObservable(object, propertyName) is not supported for arrays and maps. Use map.has or array.length instead.");if(m(e)){var n=e.$mobx;return n.values&&!!n.values[t]}return!1}return!!e.$mobx||e instanceof D||e instanceof $||e instanceof b}function Le(i,e,n){if(r(arguments.length>=2&&arguments.length<=3,"Illegal decorator config",e),B(i,e),n&&n.hasOwnProperty("get"))return x("Using @observable on computed values is deprecated. Use @computed instead."),C.apply(null,arguments);var o={};return r("object"==typeof i,"The @observable decorator can only be used on objects",e),o.configurable=!0,o.enumerable=!0,o.get=function(){var o=this,r=void 0;return n&&n.initializer&&(r=n.initializer(),"function"==typeof r&&(r=j(r))),ge(!0,function(){P(O(o,void 0,t.Recursive),e,r)}),this[e]},o.set=function(n){P(O(this,void 0,t.Recursive),e,"function"==typeof n?j(n):n)},n?o:void Object.defineProperty(i,e,o)}function he(e,s){if("string"==typeof arguments[1])return Le.apply(null,arguments);if(r(1===arguments.length||2===arguments.length,"observable expects one or two arguments"),w(e))return e;var a=R(e,t.Recursive),n=a[0],i=a[1],u=n===t.Reference?o.Reference:We(i);switch(u){case o.Array:case o.PlainObject:return _(i,n);case o.Reference:case o.ComplexObject:return new p(i,n);case o.ComplexFunction:throw new Error("[mobx.observable] To be able to make a function reactive it should not have arguments. If you need an observable reference to a function, use `observable(asReference(f))`");case o.ViewFunction:return x("Use `computed(expr)` instead of `observable(expr)`"),C(e,s)}r(!1,"Illegal State")}function We(e){return null===e||void 0===e?o.Reference:"function"==typeof e?e.length?o.ComplexFunction:o.ViewFunction:Array.isArray(e)||e instanceof a?o.Array:"object"==typeof e?u(e)?o.PlainObject:o.ComplexObject:o.Reference}function Y(t,n,e,r){return"function"==typeof e?Se(t,n,e,r):xe(t,n,e)}function xe(e,t,n){return E(e)?e.observe(t):M(e)?e.observe(t):m(e)?Qe(e,t,n):e instanceof p||e instanceof b?e.observe(t,n):u(e)?xe(he(e),t,n):void r(!1,"first argument of observe should be some observable value or plain object")}function Se(e,t,n,o){var i="[mobx.observe] the provided observable map has no key with name: "+t;if(M(e)){if(!e._has(t))throw new Error(i);return Y(e._data[t],n)}if(m(e)){if(!w(e,t))throw new Error(i);return Y(e.$mobx.values[t],n,o)}return u(e)?(ve(e,{property:e[t]}),Se(e,t,n,o)):void r(!1,"first argument of observe should be an (observable)object or observableMap if a property name is given")}function y(e,n,t){function i(r){return n&&t.push([e,r]),r}if(void 0===n&&(n=!0),void 0===t&&(t=null),n&&null===t&&(t=[]),n&&null!==e&&"object"==typeof e)for(var o=0,c=t.length;c>o;o++)if(t[o][0]===e)return t[o][1];if(!e)return e;if(Array.isArray(e)||e instanceof a){var r=i([]);return r.push.apply(r,e.map(function(e){return y(e,n,t)})),r}if(e instanceof v){var r=i({});return e.forEach(function(e,o){return r[o]=y(e,n,t)}),r}if("object"==typeof e&&u(e)){var r=i({});for(var s in e)e.hasOwnProperty(s)&&(r[s]=y(e[s],n,t));return r}return w(e)&&e.$mobx instanceof p?y(e(),n,t):e}function oe(e){r(e.isDirty,"atom not dirty"),e.isDirty=!1,f(e,"READY",!0),L(e,!0)}function J(){return n.derivationStack.length>0}function q(){r(n.allowStateChanges,"It is not allowed to change the state when a computed value is being evaluated. Use 'autorun' to create reactive functions with side-effects. Or use 'extras.allowStateChanges(true, block)' to supress this message.")}function He(e){1===++e.dependencyStaleCount&&(f(e,"STALE"),Oe(e))}function Je(e,t){if(r(e.dependencyStaleCount>0,"unexpected ready notification"),t&&(e.dependencyChangeCount+=1),0===--e.dependencyStaleCount)if(e.dependencyChangeCount>0){e.dependencyChangeCount=0,f(e,"PENDING");var n=e.onDependenciesReady();L(e,n)}else f(e,"READY",!1),L(e,!1)}function ce(e,r){var t=!0,o=e.observing;e.observing=[],n.derivationStack.push(e);try{var i=r();return t=!1,Ze(e,o),i}finally{t&&(console.error("[mobx] An uncaught exception occurred while calculating your computed value, autorun or transformer. Or inside the render method of a React component. These methods should never throw exceptions as MobX will usually not be able to recover from them. "+("Please enable 'Pause on (caught) exceptions' in your debugger to find the root cause. In: '"+e.name+"#"+e.id+"'")),z())}}function Ze(t,u){n.derivationStack.length-=1;for(var i=ae(t.observing,u),o=i[0],a=i[1],e=0,s=o.length;s>e;e++){var c=o[e];r(!le(t,c),"Cycle detected",t),Ae(o[e],t)}for(var e=0,s=a.length;s>e;e++)G(a[e],t)}function le(r,n){var e=n.observing;if(void 0===e)return!1;if(-1!==e.indexOf(n))return!0;for(var o=e.length,t=0;o>t;t++)if(le(r,e[t]))return!0;return!1}function h(){return++n.mobxGuid}function Re(){}function z(){n.resetId++;var t=new fe;for(var e in t)"mobxGuid"!==e&&"resetId"!==e&&(n[e]=t[e])}function Ae(e,r){var t=e.observers,n=t.length;t[n]=r,0===n&&e.onBecomeObserved()}function G(t,r){var e=t.observers,n=e.indexOf(r);-1!==n&&e.splice(n,1),0===e.length&&t.onBecomeUnobserved()}function we(t){if(!(n.inUntracked>0)){var o=n.derivationStack,i=o.length;if(i>0){var e=o[i-1].observing,r=e.length;e[r-1]!==t&&e[r-2]!==t&&(e[r]=t)}}}function Oe(e){var t=e.observers.slice();t.forEach(He),e.staleObservers=e.staleObservers.concat(t)}function L(e,t){e.staleObservers.splice(0).forEach(function(e){return Je(e,t)})}function qe(e){x("This feature is experimental and might be removed in a future minor release. Please report if you use this feature in production: https://github.com/mobxjs/mobx/issues/49"),n.inUntracked++;var t=e();return n.inUntracked--,t}function U(){if(!(n.isRunningReactions===!0||n.inTransaction>0)){n.isRunningReactions=!0;for(var e=n.pendingReactions,o=0;e.length>0;){if(++o===Ge)throw new Error("Reaction doesn't converge to a stable state. Probably there is a cycle in the reactive function: "+e[0].toString());for(var r=e.splice(0),t=0,i=r.length;i>t;t++)r[t].runReaction()}n.isRunningReactions=!1}}function g(r,o){n.inTransaction+=1;var i=r.call(o);if(0===--n.inTransaction){for(var t=n.changedAtoms.splice(0),e=0,a=t.length;a>e;e++)oe(t[e]);U()}return i}function j(e){return new I(e)}function V(e){return new S(e)}function ue(e){return new K(e)}function R(e,n){return e instanceof I?[t.Reference,e.value]:e instanceof S?[t.Structure,e.value]:e instanceof K?[t.Flat,e.value]:[n,e]}function Ce(e){return e===j?t.Reference:e===V?t.Structure:e===ue?t.Flat:(r(void 0===e,"Cannot determine value mode from function. Please pass in one of these: mobx.asReference, mobx.asStructure or mobx.asFlat, got: "+e),t.Recursive)}function _(e,s,a){var n;if(w(e))return e;switch(s){case t.Reference:return e;case t.Flat:i(e,"Items inside 'asFlat' cannot have modifiers"),n=t.Reference;break;case t.Structure:i(e,"Items inside 'asStructure' cannot have modifiers"),n=t.Structure;break;case t.Recursive:o=R(e,t.Recursive),n=o[0],e=o[1];break;default:r(!1,"Illegal State")}return Array.isArray(e)&&Object.isExtensible(e)?X(e,n,a):u(e)&&Object.isExtensible(e)?be(e,e,n,a):e;var o}function i(e,t){if(e instanceof I||e instanceof S||e instanceof K)throw new Error("[mobx] asStructure / asReference / asFlat cannot be used here. "+t)}function Ee(e){return e.atom.reportObserved(),e.values.length}function $e(n,e){if("number"!=typeof e||0>e)throw new Error("[mobx.array] Out of range: "+e);var t=n.values.length;e!==t&&(e>t?s(n,t,0,new Array(e-t)):s(n,e,t-e))}function pe(n,t,e){if(t!==n.lastKnownLength)throw new Error("[mobx] Modification exception: the internal structure of an observable array was changed. Did you use peek() to change it?");q(),n.lastKnownLength+=e,e>0&&t+e>N&&de(t+e)}function s(o,e,n,t){var r=o.values.length;if(!(void 0!==t&&0!==t.length||0!==n&&0!==r))return[];void 0===e?e=0:e>r?e=r:0>e&&(e=Math.max(0,r+e)),n=2===arguments.length?r-e:void 0===n||null===n?0:Math.max(0,Math.min(n,r-e)),t=void 0===t?A:t.map(o.makeChildReactive);var s=t.length-n;pe(o,r,s);var i=(a=o.values).splice.apply(a,[e,n].concat(t));return Fe(o,e,i,t),i;var a}function nt(e){return i(e,"Array values cannot have modifiers"),this.mode===t.Flat||this.mode===t.Reference?e:_(e,this.mode,this.atom.name+"@"+this.atom.id+" / ArrayEntry")}function Me(e,t,n){e.atom.reportChanged(),e.changeEvent&&e.changeEvent.emit({object:e.array,type:"update",index:t,oldValue:n})}function Fe(e,r,t,n){(0!==t.length||0!==n.length)&&(e.atom.reportChanged(),e.changeEvent&&e.changeEvent.emit({object:e.array,type:"splice",index:r,addedCount:n.length,removed:t}))}function Te(e){Object.defineProperty(a.prototype,""+e,{enumerable:!1,configurable:!1,set:function(n){var r=this.$mobx,o=r.values;if(i(n,"Modifiers cannot be used on array values. For non-reactive array values use makeReactive(asFlat(array))."),e<o.length){q();var a=o[e],u=r.mode===t.Structure?!k(a,n):a!==n;u&&(o[e]=r.makeChildReactive(n),Me(r,e,a))}else{if(e!==o.length)throw new Error("[mobx.array] Index out of bounds, "+e+" is larger than "+o.length);s(r,e,0,[n])}},get:function(){var t=this.$mobx;return t&&e<t.values.length?(t.atom.reportObserved(),t.values[e]):void 0}})}function de(t){for(var e=N;t>e;e++)Te(e);N=t}function X(e,t,n){return new a(e,t,n)}function ze(e){return x("fastArray is deprecated. Please use `observable(asFlat([]))`"),X(e,t.Flat,null)}function E(e){return e instanceof a}function Ne(e,t){return new v(e,t)}function M(e){return e instanceof v}function O(e,n,r){if(void 0===r&&(r=t.Recursive),e.$mobx){if(e.$mobx.type!==H)throw new Error("The given object is observable but not an observable object");return e.$mobx}u(e)||(n=e.constructor.name),n||(n="ObservableObject");var o={type:H,values:{},events:void 0,id:h(),target:e,name:n,mode:r};return Object.defineProperty(e,"$mobx",{enumerable:!1,configurable:!1,writable:!1,value:o}),o}function P(e,t,n){e.values[t]?e.target[t]=n:Xe(e,t,n)}function Xe(e,r,t){B(e.target,r);var n,o=e.name+"@"+e.id+' / Prop "'+r+'"',i=!0;"function"==typeof t&&0===t.length?n=new b(t,e.target,!1,o):t instanceof S&&"function"==typeof t.value&&0===t.value.length?n=new b(t.value,e.target,!0,o):(i=!1,n=new p(t,e.mode,o)),e.values[r]=n,Object.defineProperty(e.target,r,{configurable:!0,enumerable:!i,get:function(){return n.get()},set:i?Q:function(t){var o=n.value;n.set(t)&&void 0!==e.events&&e.events.emit({type:"update",object:this,name:r,oldValue:o})}}),void 0!==e.events&&e.events.emit({type:"add",object:e.target,name:r})}function Qe(e,n,o){r(m(e),"Expected observable object"),r(o!==!0,"`observe` doesn't support the fire immediately property for observable objects.");var t=e.$mobx;return void 0===t.events&&(t.events=new d),e.$mobx.events.on(n)}function m(e){return e&&e.$mobx&&e.$mobx.type===H}function r(t,n,e){if(!t)throw new Error("[mobx] Invariant failed: "+n+(e?" in '"+e+"'":""))}function x(e){-1===je.indexOf(e)&&(je.push(e),console.error("[mobx] Deprecated: "+e))}function Z(t){var e=!1;return function(){return e?void 0:(e=!0,t.apply(this,arguments))}}function ee(t){var e=[];return t.forEach(function(t){-1===e.indexOf(t)&&e.push(t)}),e}function u(e){return null!==e&&"object"==typeof e&&Object.getPrototypeOf(e)===Object.prototype}function ne(n,e,t){return n?!k(e,t):e!==t}function ke(n,t){for(var e=0;e<t.length;e++)Object.defineProperty(n,t[e],{configurable:!0,writable:!0,enumerable:!1,value:n[t[e]]})}function re(t,n){var e=Object.getOwnPropertyDescriptor(t,n);return!e||e.configurable!==!1&&e.writable!==!1}function B(t,e){r(re(t,e),"Cannot make property '"+e+"' observable, it is not configurable and writable in the target object")}function k(e,t){if(null===e&&null===t)return!0;if(void 0===e&&void 0===t)return!0;var o=Array.isArray(e)||E(e);if(o!==(Array.isArray(t)||E(t)))return!1;if(o){if(e.length!==t.length)return!1;for(var n=e.length;n>=0;n--)if(!k(e[n],t[n]))return!1;return!0}if("object"==typeof e&&"object"==typeof t){if(null===e||null===t)return!1;if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var r in e){if(!t.hasOwnProperty(r))return!1;if(!k(e[r],t[r]))return!1}return!0}return e===t}function ae(n,r){if(!r||!r.length)return[n,[]];if(!n||!n.length)return[[],r];for(var o=[],i=[],e=0,a=0,h=n.length,c=!1,t=0,s=0,l=r.length,u=!1,f=!1;!f&&!c;){if(!u){if(h>e&&l>t&&n[e]===r[t]){if(e++,t++,e===h&&t===l)return[o,i];continue}a=e,s=t,u=!0}s+=1,a+=1,s>=l&&(f=!0),a>=h&&(c=!0),c||n[a]!==r[t]?f||r[s]!==n[e]||(i.push.apply(i,r.slice(t,s)),t=s+1,e++,u=!1):(o.push.apply(o,n.slice(e,a)),e=a+1,t++,u=!1)}return o.push.apply(o,n.slice(e)),i.push.apply(i,r.slice(t)),[o,i]}var T=this&&this.__extends||function(t,e){function r(){this.constructor=t}for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)};Re(),e._={quickDiff:ae,resetGlobalState:z},e.extras={allowStateChanges:ge,getDependencyTree:Ve,getObserverTree:et,isComputingDerivation:J,resetGlobalState:z,trackTransitions:De},e.autorun=F,e.when=ye,e.autorunUntil=Be,e.autorunAsync=Ue,e.computed=C,e.createTransformer=Pe,e.expr=Ke,e.extendObservable=ve;var l=null;e.isObservable=w,e.observable=he;var o;!function(e){e[e.Reference=0]="Reference",e[e.PlainObject=1]="PlainObject",e[e.ComplexObject=2]="ComplexObject",e[e.Array=3]="Array",e[e.ViewFunction=4]="ViewFunction",e[e.ComplexFunction=5]="ComplexFunction"}(o||(o={})),e.observe=Y,e.toJSON=y;var D=function(){function e(e,t,n){void 0===e&&(e="Atom"),void 0===t&&(t=se),void 0===n&&(n=se),this.name=e,this.onBecomeObserved=t,this.onBecomeUnobserved=n,this.id=h(),this.isDirty=!1,this.staleObservers=[],this.observers=[]}return e.prototype.reportObserved=function(){we(this)},e.prototype.reportChanged=function(){this.isDirty||(this.reportStale(),this.reportReady())},e.prototype.reportStale=function(){this.isDirty||(this.isDirty=!0,f(this,"STALE"),Oe(this))},e.prototype.reportReady=function(){r(this.isDirty,"atom not dirty"),n.inTransaction>0?n.changedAtoms.push(this):(oe(this),U())},e.prototype.toString=function(){return this.name+"@"+this.id},e}();e.Atom=D;var b=function(){function e(t,r,i,e){var o=this;void 0===e&&(e="ComputedValue"),this.derivation=t,this.scope=r,this.compareStructural=i,this.name=e,this.id=h(),this.isLazy=!0,this.isComputing=!1,this.staleObservers=[],this.observers=[],this.observing=[],this.dependencyChangeCount=0,this.dependencyStaleCount=0,this.value=void 0,this.peek=function(){o.isComputing=!0,n.isComputingComputedValue++;var e=n.allowStateChanges;n.allowStateChanges=!1;var i=t.call(r);return n.allowStateChanges=e,n.isComputingComputedValue--,o.isComputing=!1,i}}return e.prototype.onBecomeObserved=function(){},e.prototype.onBecomeUnobserved=function(){for(var e=0,t=this.observing.length;t>e;e++)G(this.observing[e],this);this.observing=[],this.isLazy=!0,this.value=void 0},e.prototype.onDependenciesReady=function(){var e=this.trackAndCompute();return f(this,"READY",e),e},e.prototype.get=function(){if(r(!this.isComputing,"Cycle detected",this.derivation),we(this),this.dependencyStaleCount>0)return this.peek();if(this.isLazy){if(!J())return this.peek();this.isLazy=!1,this.trackAndCompute()}return this.value},e.prototype.set=function(e){throw new Error("[ComputedValue '"+name+"'] It is not possible to assign a new value to a computed value.")},e.prototype.trackAndCompute=function(){var e=this.value;return this.value=ce(this,this.peek),ne(this.compareStructural,this.value,e)},e.prototype.observe=function(n,r){var o=this,e=!0,t=void 0;return F(function(){var i=o.get();(!e||r)&&n(i,t),e=!1,t=i})},e.prototype.toString=function(){return this.name+"@"+this.id+"["+this.derivation.toString()+"]"},e}(),fe=function(){function e(){this.version=1,this.derivationStack=[],this.mobxGuid=0,this.inTransaction=0,this.inUntracked=0,this.isRunningReactions=!1,this.changedAtoms=[],this.pendingReactions=[],this.allowStateChanges=!0,this.resetId=0}return e}(),n=function(){var e=new fe;if(c.__mobservableTrackingStack||c.__mobservableViewStack)throw new Error("[mobx] An incompatible version of mobservable is already loaded.");if(c.__mobxGlobal&&c.__mobxGlobal.version!==e.version)throw new Error("[mobx] An incompatible version of mobx is already loaded.");return c.__mobxGlobal?c.__mobxGlobal:c.__mobxGlobal=e}();e.untracked=qe;var $=function(){function e(e,t){void 0===e&&(e="Reaction"),this.name=e,this.onInvalidate=t,this.id=h(),this.staleObservers=A,this.observers=A,this.observing=[],this.dependencyChangeCount=0,this.dependencyStaleCount=0,this.isDisposed=!1,this._isScheduled=!1}return e.prototype.onBecomeObserved=function(){},e.prototype.onBecomeUnobserved=function(){},e.prototype.onDependenciesReady=function(){return this.schedule(),!1},e.prototype.schedule=function(){this._isScheduled||(this._isScheduled=!0,n.pendingReactions.push(this),U())},e.prototype.isScheduled=function(){return this.dependencyStaleCount>0||this._isScheduled},e.prototype.runReaction=function(){this.isDisposed||(this._isScheduled=!1,this.onInvalidate(),f(this,"READY",!0))},e.prototype.track=function(e){ce(this,e)},e.prototype.dispose=function(){if(!this.isDisposed){this.isDisposed=!0;for(var t=this.observing.splice(0),e=0,n=t.length;n>e;e++)G(t[e],this)}},e.prototype.getDisposer=function(){var e=this.dispose.bind(this);return e.$mobx=this,e},e.prototype.toString=function(){return"Reaction["+this.name+"]"},e}();e.Reaction=$;var Ge=100;e.transaction=g;var t;!function(e){e[e.Recursive=0]="Recursive",e[e.Reference=1]="Reference",e[e.Structure=2]="Structure",e[e.Flat=3]="Flat"}(t||(t={})),e.asReference=j,e.asStructure=V,e.asFlat=ue;var I=function(){function e(e){this.value=e,i(e,"Modifiers are not allowed to be nested")}return e}(),S=function(){function e(e){this.value=e,i(e,"Modifiers are not allowed to be nested")}return e}(),K=function(){function e(e){this.value=e,i(e,"Modifiers are not allowed to be nested")}return e}(),N=0,me=function(){function e(){}return e}();me.prototype=[];var a=function(t){function e(n,r,o){t.call(this);var e=this.$mobx={atom:new D(o||"ObservableArray"),values:void 0,changeEvent:void 0,lastKnownLength:0,mode:r,array:this,makeChildReactive:function(t){return nt.call(e,t)}};Object.defineProperty(this,"$mobx",{enumerable:!1,configurable:!1,writable:!1}),n&&n.length?(pe(e,0,n.length),e.values=n.map(e.makeChildReactive)):e.values=[]}return T(e,t),e.prototype.observe=function(t,e){return void 0===e&&(e=!1),void 0===this.$mobx.changeEvent&&(this.$mobx.changeEvent=new d),e&&t({object:this,type:"splice",index:0,addedCount:this.$mobx.values.length,removed:[]}),this.$mobx.changeEvent.on(t)},e.prototype.clear=function(){return this.splice(0)},e.prototype.replace=function(e){return s(this.$mobx,0,this.$mobx.values.length,e)},e.prototype.toJSON=function(){return this.$mobx.atom.reportObserved(),this.$mobx.values.slice()},e.prototype.peek=function(){return this.$mobx.values},e.prototype.find=function(r,o,t){void 0===t&&(t=0),this.$mobx.atom.reportObserved();for(var n=this.$mobx.values,i=n.length,e=t;i>e;e++)if(r.call(o,n[e],e,this))return n[e];return null},e.prototype.splice=function(t,n){for(var r=[],e=2;e<arguments.length;e++)r[e-2]=arguments[e];switch(arguments.length){case 0:return[];case 1:return s(this.$mobx,t);case 2:return s(this.$mobx,t,n)}return s(this.$mobx,t,n,r)},e.prototype.push=function(){for(var t=[],e=0;e<arguments.length;e++)t[e-0]=arguments[e];return s(this.$mobx,this.$mobx.values.length,0,t),this.$mobx.values.length},e.prototype.pop=function(){return this.splice(Math.max(this.$mobx.values.length-1,0),1)[0]},e.prototype.shift=function(){return this.splice(0,1)[0]},e.prototype.unshift=function(){for(var t=[],e=0;e<arguments.length;e++)t[e-0]=arguments[e];return s(this.$mobx,0,0,t),this.$mobx.values.length},e.prototype.reverse=function(){this.$mobx.atom.reportObserved();var e=this.slice();return e.reverse.apply(e,arguments)},e.prototype.sort=function(t){this.$mobx.atom.reportObserved();var e=this.slice();return e.sort.apply(e,arguments)},e.prototype.remove=function(t){var e=this.$mobx.values.indexOf(t);return e>-1?(this.splice(e,1),!0):!1},e.prototype.toString=function(){return"[mobx.array] "+Array.prototype.toString.apply(this.$mobx.values,arguments)},e.prototype.toLocaleString=function(){return"[mobx.array] "+Array.prototype.toLocaleString.apply(this.$mobx.values,arguments)},e}(me);ke(a.prototype,["constructor","observe","clear","replace","toJSON","peek","find","splice","push","pop","shift","unshift","reverse","sort","remove","toString","toLocaleString"]),Object.defineProperty(a.prototype,"length",{enumerable:!1,configurable:!0,get:function(){return Ee(this.$mobx)},set:function(e){$e(this.$mobx,e)}}),["concat","every","filter","forEach","indexOf","join","lastIndexOf","map","reduce","reduceRight","slice","some"].forEach(function(e){var t=Array.prototype[e];Object.defineProperty(a.prototype,e,{configurable:!1,writable:!0,enumerable:!1,value:function(){return this.$mobx.atom.reportObserved(),t.apply(this.$mobx.values,arguments)}})}),de(1e3),e.fastArray=ze,e.isObservableArray=E;var Ye={},v=function(){function e(e,n){var r=this;this.$mobx=Ye,this._data={},this._hasMap={},this._events=void 0,this.name="ObservableMap",this.id=h(),this._keys=new a(null,t.Reference,this.name+"@"+this.id+" / keys()"),this._valueMode=Ce(n),u(e)?this.merge(e):Array.isArray(e)&&e.forEach(function(e){var t=e[0],n=e[1];return r.set(t,n)})}return e.prototype._has=function(e){return"undefined"!=typeof this._data[e]},e.prototype.has=function(e){return this.isValidKey(e)?this._hasMap[e]?this._hasMap[e].get():this._updateHasMapEntry(e,!1).get():!1},e.prototype.set=function(e,n){var t=this;if(this.assertValidKey(e),i(n,"[mobx.map.set] Expected unwrapped value to be inserted to key '"+e+"'. If you need to use modifiers pass them as second argument to the constructor"),this._has(e)){var r=this._data[e].value,o=this._data[e].set(n);o&&this._events&&this._events.emit({type:"update",object:this,name:e,oldValue:r})}else g(function(){t._data[e]=new p(n,t._valueMode,t.name+"@"+t.id+' / Entry "'+e+'"'),t._updateHasMapEntry(e,!0),t._keys.push(e)}),this._events&&this._events.emit({type:"add",object:this,name:e})},e.prototype.delete=function(e){var t=this;if(this._has(e)){var n=this._data[e].value;g(function(){t._keys.remove(e),t._updateHasMapEntry(e,!1);var n=t._data[e];n.set(void 0),t._data[e]=void 0}),this._events&&this._events.emit({type:"delete",object:this,name:e,oldValue:n})}},e.prototype._updateHasMapEntry=function(n,r){var e=this._hasMap[n];return e?e.set(r):e=this._hasMap[n]=new p(r,t.Reference,this.name+"@"+this.id+' / Contains "'+n+'"'),e},e.prototype.get=function(e){return this.has(e)?this._data[e].get():void 0},e.prototype.keys=function(){return this._keys.slice()},e.prototype.values=function(){return this.keys().map(this.get,this)},e.prototype.entries=function(){var e=this;return this.keys().map(function(t){return[t,e.get(t)]})},e.prototype.forEach=function(e,t){var n=this;this.keys().forEach(function(r){return e.call(t,n.get(r),r)})},e.prototype.merge=function(t){var n=this;return g(function(){t instanceof e?t.keys().forEach(function(e){return n.set(e,t.get(e))}):Object.keys(t).forEach(function(e){return n.set(e,t[e])})}),this},e.prototype.clear=function(){var e=this;g(function(){e.keys().forEach(e.delete,e)})},Object.defineProperty(e.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),e.prototype.toJs=function(){var t=this,e={};return this.keys().forEach(function(n){return e[n]=t.get(n)}),e},e.prototype.isValidKey=function(e){return null===e||void 0===e?!1:"string"!=typeof e&&"number"!=typeof e?!1:!0},e.prototype.assertValidKey=function(e){if(!this.isValidKey(e))throw new Error("[mobx.map] Invalid key: '"+e+"'")},e.prototype.toString=function(){var e=this;return"[mobx.map { "+this.keys().map(function(t){return t+": "+e.get(t)}).join(", ")+" }]"},e.prototype.observe=function(e){return this._events||(this._events=new d),this._events.on(e)},e}();e.ObservableMap=v,e.map=Ne,e.isObservableMap=M;var H={};e.isObservableObject=m;var p=function(n){function e(o,i,e){void 0===e&&(e="ObservableValue"),n.call(this,e),this.mode=i,this.hasUnreportedChange=!1,this.events=null,this.value=void 0;var r=R(o,t.Recursive),a=r[0],s=r[1];this.mode===t.Recursive&&(this.mode=a),this.value=_(s,this.mode,this.name)}return T(e,n),e.prototype.set=function(e){i(e,"Modifiers cannot be used on non-initial values."),q();var n=this.value,r=ne(this.mode===t.Structure,n,e);return r&&(this.value=_(e,this.mode,this.name),this.reportChanged(),this.events&&this.events.emit(e,n)),r},e.prototype.get=function(){return this.reportObserved(),this.value},e.prototype.observe=function(e,t){return this.events||(this.events=new d),t&&e(this.value,void 0),this.events.on(e)},e.prototype.toString=function(){return this.name+"@"+this.id+"["+this.value+"]"},e}(D),d=function(){function e(){this.listeners=[]}return e.prototype.emit=function(){for(var t=this.listeners.slice(),e=0,n=t.length;n>e;e++)t[e].apply(null,arguments)},e.prototype.on=function(e){var t=this;return this.listeners.push(e),Z(function(){var n=t.listeners.indexOf(e);-1!==n&&t.listeners.splice(n,1)})},e.prototype.once=function(t){var e=this.on(function(){e(),t.apply(this,arguments)});return e},e}();e.SimpleEventEmitter=d;var A=[];Object.freeze(A);var je=[],se=function(){}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}]},{},[1])(1)});
!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.mobx=e()}}(function(){return function a(e,t,n){function r(o,l){if(!t[o]){if(!e[o]){var u="function"==typeof require&&require;if(!l&&u)return u(o,!0);if(i)return i(o,!0);var c=new Error("Cannot find module '"+o+"'");throw c.code="MODULE_NOT_FOUND",c}var s=t[o]={exports:{}};e[o][0].call(s.exports,function(t){var n=e[o][1][t];return r(n?n:t)},s,s.exports,a,e,t,n)}return t[o].exports}for(var i="function"==typeof require&&require,o=0;o<n.length;o++)r(n[o]);return r}({1:[function(t,n,e){(function(c){"use strict";function F(e,t){i(e,"autorun methods cannot have modifiers"),r("function"==typeof e,"autorun expects a function"),r(0===e.length,"autorun expects a function without arguments"),t&&(e=e.bind(t));var n=new $(e.name||"Autorun",function(){this.track(e)});return n.schedule(),n.getDisposer()}function ye(r,o,t){var n=!1,e=F(function(){r.call(t)&&(e?e():n=!0,o.call(t))});return n&&e(),e}function Be(e,t,n){return x("`autorunUntil` is deprecated, please use `when`."),ye.apply(null,arguments)}function Ve(e,n,o){void 0===n&&(n=1),o&&(e=e.bind(o));var r=!1,t=new $(e.name||"AutorunAsync",function(){r||(r=!0,setTimeout(function(){r=!1,t.isDisposed||t.track(e)},n))});return t.schedule(),t.getDisposer()}function C(e,t,n,r){return arguments.length<3&&"function"==typeof e?Ie(e,t):te.apply(null,arguments)}function Ie(r,o){var e=R(r,n.Recursive),i=e[0],t=e[1];return new b(t,o,i===n.Structure,t.name||"ComputedValue")}function te(i,e,o,s){if(1===arguments.length){var u=i;return function(e,t,n){return te.call(null,e,t,n,u)}}r(o&&o.hasOwnProperty("get"),"@computed can only be used on getter functions, like: '@computed get myProps() { return ...; }'"),B(i,e);var t={},a=o.get;return r("object"==typeof i,"The @observable decorator can only be used on objects",e),r("function"==typeof a,"@observable expects a getter function if used on a property.",e),r(!o.set,"@observable properties cannot have a setter.",e),r(0===a.length,"@observable getter functions should not take arguments.",e),t.configurable=!0,t.enumerable=!1,t.get=function(){return P(O(this,void 0,n.Recursive),e,s&&s.asStructure===!0?U(a):a),this[e]},t.set=Q,o?t:void Object.defineProperty(i,e,t)}function Q(){throw new Error("[ComputedValue] It is not allowed to assign new values to computed properties.")}function Pe(e,o){r("function"==typeof e&&1===e.length,"createTransformer expects a function that accepts one argument");var n={},i=t.resetId,a=function(t){function r(n,r){t.call(this,function(){return e(r)},null,!1,"Transformer-"+e.name+"-"+n),this.sourceIdentifier=n,this.sourceObject=r}return T(r,t),r.prototype.onBecomeUnobserved=function(){var e=this.value;t.prototype.onBecomeUnobserved.call(this),delete n[this.sourceIdentifier],o&&o(e,this.sourceObject)},r}(b);return function(o){i!==t.resetId&&(n={},i=t.resetId);var r=tt(o),e=n[r];return e?e.get():(e=n[r]=new a(r,o),e.get())}}function tt(e){if(null===e||"object"!=typeof e)throw new Error("[mobx] transform expected some kind of object, got: "+e);var t=e.$transformId;return void 0===t&&(t=h(),Object.defineProperty(e,"$transformId",{configurable:!0,writable:!0,enumerable:!1,value:t})),t}function Ke(e,t){return J()||console.warn("[mobx.expr] 'expr' should only be used inside other reactive functions."),C(e,t).get()}function ve(e){for(var o=[],t=1;t<arguments.length;t++)o[t-1]=arguments[t];return r(arguments.length>=2,"extendObservable expected 2 or more arguments"),r("object"==typeof e,"extendObservable expects an object as first argument"),r(!(e instanceof v),"extendObservable should not be used on maps, use map.merge instead"),o.forEach(function(t){r("object"==typeof t,"all arguments of extendObservable should be objects"),be(e,t,n.Recursive,null)}),e}function be(e,t,r,o){var i=O(e,o,r);for(var n in t)if(t.hasOwnProperty(n)){if(e===t&&!re(e,n))continue;P(i,n,t[n])}return e}function ge(e,n){var r=t.allowStateChanges;t.allowStateChanges=e;var o=n();return t.allowStateChanges=r,o}function f(e,n,t){void 0===t&&(t=!1),l&&l.emit({id:e.id,name:e.name+"@"+e.id,node:e,state:n,changed:t})}function Ue(e){return W(e)}function W(e){var t={id:e.id,name:e.name+"@"+e.id};return e.observing&&e.observing.length&&(t.dependencies=ee(e.observing).map(W)),t}function et(e){return ie(e)}function ie(e){var t={id:e.id,name:e.name+"@"+e.id};return e.observers&&e.observers.length&&(t.observers=ee(e.observers).map(ie)),t}function ke(n){var e=[],t=!1;return function(r){(n||r.changed)&&e.push(r),t||(t=!0,setTimeout(function(){console[console.table?"table":"dir"](e),e=[],t=!1},1))}}function De(e,t){void 0===e&&(e=!1),l||(l=new d);var n=t?function(n){(e||n.changed)&&t(n)}:ke(e),r=l.on(n);return Z(function(){r(),0===l.listeners.length&&(l=null)})}function w(e,t){if(null===e||void 0===e)return!1;if(void 0!==t){if(e instanceof v||e instanceof a)throw new Error("[mobx.isObservable] isObservable(object, propertyName) is not supported for arrays and maps. Use map.has or array.length instead.");if(m(e)){var n=e.$mobx;return n.values&&!!n.values[t]}return!1}return!!e.$mobx||e instanceof D||e instanceof $||e instanceof b}function Le(i,e,t){if(r(arguments.length>=2&&arguments.length<=3,"Illegal decorator config",e),B(i,e),t&&t.hasOwnProperty("get"))return x("Using @observable on computed values is deprecated. Use @computed instead."),C.apply(null,arguments);var o={};return r("object"==typeof i,"The @observable decorator can only be used on objects",e),o.configurable=!0,o.enumerable=!0,o.get=function(){var o=this,r=void 0;return t&&t.initializer&&(r=t.initializer(),"function"==typeof r&&(r=j(r))),ge(!0,function(){P(O(o,void 0,n.Recursive),e,r)}),this[e]},o.set=function(t){P(O(this,void 0,n.Recursive),e,"function"==typeof t?j(t):t)},t?o:void Object.defineProperty(i,e,o)}function he(e,s){if("string"==typeof arguments[1])return Le.apply(null,arguments);if(r(1===arguments.length||2===arguments.length,"observable expects one or two arguments"),w(e))return e;var a=R(e,n.Recursive),t=a[0],i=a[1],u=t===n.Reference?o.Reference:We(i);switch(u){case o.Array:case o.PlainObject:return k(i,t);case o.Reference:case o.ComplexObject:return new p(i,t);case o.ComplexFunction:throw new Error("[mobx.observable] To be able to make a function reactive it should not have arguments. If you need an observable reference to a function, use `observable(asReference(f))`");case o.ViewFunction:return x("Use `computed(expr)` instead of `observable(expr)`"),C(e,s)}r(!1,"Illegal State")}function We(e){return null===e||void 0===e?o.Reference:"function"==typeof e?e.length?o.ComplexFunction:o.ViewFunction:Array.isArray(e)||e instanceof a?o.Array:"object"==typeof e?u(e)?o.PlainObject:o.ComplexObject:o.Reference}function Y(t,n,e,r){return"function"==typeof e?Se(t,n,e,r):xe(t,n,e)}function xe(e,t,n){return E(e)?e.observe(t):M(e)?e.observe(t):m(e)?Qe(e,t,n):e instanceof p||e instanceof b?e.observe(t,n):u(e)?xe(he(e),t,n):void r(!1,"first argument of observe should be some observable value or plain object")}function Se(e,t,n,o){var i="[mobx.observe] the provided observable map has no key with name: "+t;if(M(e)){if(!e._has(t))throw new Error(i);return Y(e._data[t],n)}if(m(e)){if(!w(e,t))throw new Error(i);return Y(e.$mobx.values[t],n,o)}return u(e)?(ve(e,{property:e[t]}),Se(e,t,n,o)):void r(!1,"first argument of observe should be an (observable)object or observableMap if a property name is given")}function y(e,n,t){function i(r){return n&&t.push([e,r]),r}if(void 0===n&&(n=!0),void 0===t&&(t=null),n&&null===t&&(t=[]),n&&null!==e&&"object"==typeof e)for(var o=0,l=t.length;l>o;o++)if(t[o][0]===e)return t[o][1];if(!e)return e;if(Array.isArray(e)||e instanceof a){var r=i([]);return r.push.apply(r,e.map(function(e){return y(e,n,t)})),r}if(e instanceof v){var c=i({});return e.forEach(function(e,r){return c[r]=y(e,n,t)}),c}if("object"==typeof e&&u(e)){var r=i({});for(var s in e)e.hasOwnProperty(s)&&(r[s]=y(e[s],n,t));return r}return w(e)&&e.$mobx instanceof p?y(e(),n,t):e}function oe(e){r(e.isDirty,"atom not dirty"),e.isDirty=!1,f(e,"READY",!0),L(e,!0)}function J(){return t.derivationStack.length>0}function q(){r(t.allowStateChanges,"It is not allowed to change the state when a computed value is being evaluated. Use 'autorun' to create reactive functions with side-effects. Or use 'extras.allowStateChanges(true, block)' to supress this message.")}function He(e){1===++e.dependencyStaleCount&&(f(e,"STALE"),Oe(e))}function Je(e,t){if(r(e.dependencyStaleCount>0,"unexpected ready notification"),t&&(e.dependencyChangeCount+=1),0===--e.dependencyStaleCount)if(e.dependencyChangeCount>0){e.dependencyChangeCount=0,f(e,"PENDING");var n=e.onDependenciesReady();L(e,n)}else f(e,"READY",!1),L(e,!1)}function ce(e,r){var n=!0,o=e.observing;e.observing=[],t.derivationStack.push(e);try{var i=r();return n=!1,Ze(e,o),i}finally{n&&(console.error("[mobx] An uncaught exception occurred while calculating your computed value, autorun or transformer. Or inside the render method of a React component. These methods should never throw exceptions as MobX will usually not be able to recover from them. "+("Please enable 'Pause on (caught) exceptions' in your debugger to find the root cause. In: '"+e.name+"#"+e.id+"'")),z())}}function Ze(n,u){t.derivationStack.length-=1;for(var i=ae(n.observing,u),o=i[0],a=i[1],e=0,s=o.length;s>e;e++){var c=o[e];r(!le(n,c),"Cycle detected",n),Ae(o[e],n)}for(var e=0,s=a.length;s>e;e++)G(a[e],n)}function le(r,n){var e=n.observing;if(void 0===e)return!1;if(-1!==e.indexOf(n))return!0;for(var o=e.length,t=0;o>t;t++)if(le(r,e[t]))return!0;return!1}function h(){return++t.mobxGuid}function Re(){}function z(){t.resetId++;var n=new fe;for(var e in n)"mobxGuid"!==e&&"resetId"!==e&&(t[e]=n[e])}function Ae(e,r){var t=e.observers,n=t.length;t[n]=r,0===n&&e.onBecomeObserved()}function G(t,r){var e=t.observers,n=e.indexOf(r);-1!==n&&e.splice(n,1),0===e.length&&t.onBecomeUnobserved()}function we(n){if(!(t.inUntracked>0)){var o=t.derivationStack,i=o.length;if(i>0){var e=o[i-1].observing,r=e.length;e[r-1]!==n&&e[r-2]!==n&&(e[r]=n)}}}function Oe(e){var t=e.observers.slice();t.forEach(He),e.staleObservers=e.staleObservers.concat(t)}function L(e,t){e.staleObservers.splice(0).forEach(function(e){return Je(e,t)})}function qe(e){x("This feature is experimental and might be removed in a future minor release. Please report if you use this feature in production: https://github.com/mobxjs/mobx/issues/49"),t.inUntracked++;var n=e();return t.inUntracked--,n}function V(){if(!(t.isRunningReactions===!0||t.inTransaction>0)){t.isRunningReactions=!0;for(var e=t.pendingReactions,o=0;e.length>0;){if(++o===Ge)throw new Error("Reaction doesn't converge to a stable state. Probably there is a cycle in the reactive function: "+e[0].toString());for(var r=e.splice(0),n=0,i=r.length;i>n;n++)r[n].runReaction()}t.isRunningReactions=!1}}function g(r,o){t.inTransaction+=1;var i=r.call(o);if(0===--t.inTransaction){for(var n=t.changedAtoms.splice(0),e=0,a=n.length;a>e;e++)oe(n[e]);V()}return i}function j(e){return new I(e)}function U(e){return new S(e)}function ue(e){return new K(e)}function R(e,t){return e instanceof I?[n.Reference,e.value]:e instanceof S?[n.Structure,e.value]:e instanceof K?[n.Flat,e.value]:[t,e]}function Ce(e){return e===j?n.Reference:e===U?n.Structure:e===ue?n.Flat:(r(void 0===e,"Cannot determine value mode from function. Please pass in one of these: mobx.asReference, mobx.asStructure or mobx.asFlat, got: "+e),n.Recursive)}function k(e,s,a){var t;if(w(e))return e;switch(s){case n.Reference:return e;case n.Flat:i(e,"Items inside 'asFlat' cannot have modifiers"),t=n.Reference;break;case n.Structure:i(e,"Items inside 'asStructure' cannot have modifiers"),t=n.Structure;break;case n.Recursive:o=R(e,n.Recursive),t=o[0],e=o[1];break;default:r(!1,"Illegal State")}return Array.isArray(e)&&Object.isExtensible(e)?X(e,t,a):u(e)&&Object.isExtensible(e)?be(e,e,t,a):e;var o}function i(e,t){if(e instanceof I||e instanceof S||e instanceof K)throw new Error("[mobx] asStructure / asReference / asFlat cannot be used here. "+t)}function Ee(e){return e.atom.reportObserved(),e.values.length}function $e(n,e){if("number"!=typeof e||0>e)throw new Error("[mobx.array] Out of range: "+e);var t=n.values.length;e!==t&&(e>t?s(n,t,0,new Array(e-t)):s(n,e,t-e))}function pe(n,t,e){if(t!==n.lastKnownLength)throw new Error("[mobx] Modification exception: the internal structure of an observable array was changed. Did you use peek() to change it?");q(),n.lastKnownLength+=e,e>0&&t+e>N&&de(t+e)}function s(o,e,n,t){var r=o.values.length;if(!(void 0!==t&&0!==t.length||0!==n&&0!==r))return[];void 0===e?e=0:e>r?e=r:0>e&&(e=Math.max(0,r+e)),n=2===arguments.length?r-e:void 0===n||null===n?0:Math.max(0,Math.min(n,r-e)),t=void 0===t?A:t.map(o.makeChildReactive);var s=t.length-n;pe(o,r,s);var i=(a=o.values).splice.apply(a,[e,n].concat(t));return Fe(o,e,i,t),i;var a}function nt(e){return i(e,"Array values cannot have modifiers"),this.mode===n.Flat||this.mode===n.Reference?e:k(e,this.mode,this.atom.name+"@"+this.atom.id+" / ArrayEntry")}function Me(e,t,n){e.atom.reportChanged(),e.changeEvent&&e.changeEvent.emit({object:e.array,type:"update",index:t,oldValue:n})}function Fe(e,r,t,n){(0!==t.length||0!==n.length)&&(e.atom.reportChanged(),e.changeEvent&&e.changeEvent.emit({object:e.array,type:"splice",index:r,addedCount:n.length,removed:t}))}function Te(e){Object.defineProperty(a.prototype,""+e,{enumerable:!1,configurable:!1,set:function(t){var r=this.$mobx,o=r.values;if(i(t,"Modifiers cannot be used on array values. For non-reactive array values use makeReactive(asFlat(array))."),e<o.length){q();var a=o[e],u=r.mode===n.Structure?!_(a,t):a!==t;u&&(o[e]=r.makeChildReactive(t),Me(r,e,a))}else{if(e!==o.length)throw new Error("[mobx.array] Index out of bounds, "+e+" is larger than "+o.length);s(r,e,0,[t])}},get:function(){var t=this.$mobx;return t&&e<t.values.length?(t.atom.reportObserved(),t.values[e]):void 0}})}function de(t){for(var e=N;t>e;e++)Te(e);N=t}function X(e,t,n){return new a(e,t,n)}function ze(e){return x("fastArray is deprecated. Please use `observable(asFlat([]))`"),X(e,n.Flat,null)}function E(e){return e instanceof a}function Ne(e,t){return new v(e,t)}function M(e){return e instanceof v}function O(e,t,r){if(void 0===r&&(r=n.Recursive),e.$mobx){if(e.$mobx.type!==H)throw new Error("The given object is observable but not an observable object");return e.$mobx}u(e)||(t=e.constructor.name),t||(t="ObservableObject");var o={type:H,values:{},events:void 0,id:h(),target:e,name:t,mode:r};return Object.defineProperty(e,"$mobx",{enumerable:!1,configurable:!1,writable:!1,value:o}),o}function P(e,t,n){e.values[t]?e.target[t]=n:Xe(e,t,n)}function Xe(e,r,t){B(e.target,r);var n,o=e.name+"@"+e.id+' / Prop "'+r+'"',i=!0;"function"==typeof t&&0===t.length?n=new b(t,e.target,!1,o):t instanceof S&&"function"==typeof t.value&&0===t.value.length?n=new b(t.value,e.target,!0,o):(i=!1,n=new p(t,e.mode,o)),e.values[r]=n,Object.defineProperty(e.target,r,{configurable:!0,enumerable:!i,get:function(){return n.get()},set:i?Q:function(t){var o=n.value;n.set(t)&&void 0!==e.events&&e.events.emit({type:"update",object:this,name:r,oldValue:o})}}),void 0!==e.events&&e.events.emit({type:"add",object:e.target,name:r})}function Qe(e,n,o){r(m(e),"Expected observable object"),r(o!==!0,"`observe` doesn't support the fire immediately property for observable objects.");var t=e.$mobx;return void 0===t.events&&(t.events=new d),e.$mobx.events.on(n)}function m(e){return e&&e.$mobx&&e.$mobx.type===H}function r(t,n,e){if(!t)throw new Error("[mobx] Invariant failed: "+n+(e?" in '"+e+"'":""))}function x(e){-1===je.indexOf(e)&&(je.push(e),console.error("[mobx] Deprecated: "+e))}function Z(t){var e=!1;return function(){return e?void 0:(e=!0,t.apply(this,arguments))}}function ee(t){var e=[];return t.forEach(function(t){-1===e.indexOf(t)&&e.push(t)}),e}function u(e){return null!==e&&"object"==typeof e&&Object.getPrototypeOf(e)===Object.prototype}function ne(n,e,t){return n?!_(e,t):e!==t}function _e(n,t){for(var e=0;e<t.length;e++)Object.defineProperty(n,t[e],{configurable:!0,writable:!0,enumerable:!1,value:n[t[e]]})}function re(t,n){var e=Object.getOwnPropertyDescriptor(t,n);return!e||e.configurable!==!1&&e.writable!==!1}function B(t,e){r(re(t,e),"Cannot make property '"+e+"' observable, it is not configurable and writable in the target object")}function _(e,t){if(null===e&&null===t)return!0;if(void 0===e&&void 0===t)return!0;var o=Array.isArray(e)||E(e);if(o!==(Array.isArray(t)||E(t)))return!1;if(o){if(e.length!==t.length)return!1;for(var n=e.length;n>=0;n--)if(!_(e[n],t[n]))return!1;return!0}if("object"==typeof e&&"object"==typeof t){if(null===e||null===t)return!1;if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var r in e){if(!t.hasOwnProperty(r))return!1;if(!_(e[r],t[r]))return!1}return!0}return e===t}function ae(n,r){if(!r||!r.length)return[n,[]];if(!n||!n.length)return[[],r];for(var o=[],i=[],e=0,a=0,h=n.length,c=!1,t=0,s=0,l=r.length,u=!1,f=!1;!f&&!c;){if(!u){if(h>e&&l>t&&n[e]===r[t]){if(e++,t++,e===h&&t===l)return[o,i];continue}a=e,s=t,u=!0}s+=1,a+=1,s>=l&&(f=!0),a>=h&&(c=!0),c||n[a]!==r[t]?f||r[s]!==n[e]||(i.push.apply(i,r.slice(t,s)),t=s+1,e++,u=!1):(o.push.apply(o,n.slice(e,a)),e=a+1,t++,u=!1)}return o.push.apply(o,n.slice(e)),i.push.apply(i,r.slice(t)),[o,i]}var T=this&&this.__extends||function(t,e){function r(){this.constructor=t}for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)};Re(),e._={quickDiff:ae,resetGlobalState:z},e.extras={allowStateChanges:ge,getDependencyTree:Ue,getObserverTree:et,isComputingDerivation:J,resetGlobalState:z,trackTransitions:De},e.autorun=F,e.when=ye,e.autorunUntil=Be,e.autorunAsync=Ve,e.computed=C,e.createTransformer=Pe,e.expr=Ke,e.extendObservable=ve;var l=null;e.isObservable=w,e.observable=he;var o;!function(e){e[e.Reference=0]="Reference",e[e.PlainObject=1]="PlainObject",e[e.ComplexObject=2]="ComplexObject",e[e.Array=3]="Array",e[e.ViewFunction=4]="ViewFunction",e[e.ComplexFunction=5]="ComplexFunction"}(o||(o={})),e.observe=Y,e.toJSON=y;var D=function(){function e(e,t,n){void 0===e&&(e="Atom"),void 0===t&&(t=se),void 0===n&&(n=se),this.name=e,this.onBecomeObserved=t,this.onBecomeUnobserved=n,this.id=h(),this.isDirty=!1,this.staleObservers=[],this.observers=[]}return e.prototype.reportObserved=function(){we(this)},e.prototype.reportChanged=function(){this.isDirty||(this.reportStale(),this.reportReady())},e.prototype.reportStale=function(){this.isDirty||(this.isDirty=!0,f(this,"STALE"),Oe(this))},e.prototype.reportReady=function(){r(this.isDirty,"atom not dirty"),t.inTransaction>0?t.changedAtoms.push(this):(oe(this),V())},e.prototype.toString=function(){return this.name+"@"+this.id},e}();e.Atom=D;var b=function(){function e(n,r,i,e){var o=this;void 0===e&&(e="ComputedValue"),this.derivation=n,this.scope=r,this.compareStructural=i,this.name=e,this.id=h(),this.isLazy=!0,this.isComputing=!1,this.staleObservers=[],this.observers=[],this.observing=[],this.dependencyChangeCount=0,this.dependencyStaleCount=0,this.value=void 0,this.peek=function(){o.isComputing=!0,t.isComputingComputedValue++;var e=t.allowStateChanges;t.allowStateChanges=!1;var i=n.call(r);return t.allowStateChanges=e,t.isComputingComputedValue--,o.isComputing=!1,i}}return e.prototype.onBecomeObserved=function(){},e.prototype.onBecomeUnobserved=function(){for(var e=0,t=this.observing.length;t>e;e++)G(this.observing[e],this);this.observing=[],this.isLazy=!0,this.value=void 0},e.prototype.onDependenciesReady=function(){var e=this.trackAndCompute();return f(this,"READY",e),e},e.prototype.get=function(){if(r(!this.isComputing,"Cycle detected",this.derivation),we(this),this.dependencyStaleCount>0)return this.peek();if(this.isLazy){if(!J())return this.peek();this.isLazy=!1,this.trackAndCompute()}return this.value},e.prototype.set=function(e){throw new Error("[ComputedValue '"+name+"'] It is not possible to assign a new value to a computed value.")},e.prototype.trackAndCompute=function(){var e=this.value;return this.value=ce(this,this.peek),ne(this.compareStructural,this.value,e)},e.prototype.observe=function(r,o){var i=this,e=!0,n=void 0;return F(function(){var a=i.get();(!e||o)&&(t.inUntracked++,r(a,n),t.inUntracked--),e=!1,n=a})},e.prototype.toString=function(){return this.name+"@"+this.id+"["+this.derivation.toString()+"]"},e}(),fe=function(){function e(){this.version=1,this.derivationStack=[],this.mobxGuid=0,this.inTransaction=0,this.inUntracked=0,this.isRunningReactions=!1,this.changedAtoms=[],this.pendingReactions=[],this.allowStateChanges=!0,this.resetId=0}return e}(),t=function(){var e=new fe;if(c.__mobservableTrackingStack||c.__mobservableViewStack)throw new Error("[mobx] An incompatible version of mobservable is already loaded.");if(c.__mobxGlobal&&c.__mobxGlobal.version!==e.version)throw new Error("[mobx] An incompatible version of mobx is already loaded.");return c.__mobxGlobal?c.__mobxGlobal:c.__mobxGlobal=e}();e.untracked=qe;var $=function(){function e(e,t){void 0===e&&(e="Reaction"),this.name=e,this.onInvalidate=t,this.id=h(),this.staleObservers=A,this.observers=A,this.observing=[],this.dependencyChangeCount=0,this.dependencyStaleCount=0,this.isDisposed=!1,this._isScheduled=!1}return e.prototype.onBecomeObserved=function(){},e.prototype.onBecomeUnobserved=function(){},e.prototype.onDependenciesReady=function(){return this.schedule(),!1},e.prototype.schedule=function(){this._isScheduled||(this._isScheduled=!0,t.pendingReactions.push(this),V())},e.prototype.isScheduled=function(){return this.dependencyStaleCount>0||this._isScheduled},e.prototype.runReaction=function(){this.isDisposed||(this._isScheduled=!1,this.onInvalidate(),f(this,"READY",!0))},e.prototype.track=function(e){ce(this,e)},e.prototype.dispose=function(){if(!this.isDisposed){this.isDisposed=!0;for(var t=this.observing.splice(0),e=0,n=t.length;n>e;e++)G(t[e],this)}},e.prototype.getDisposer=function(){var e=this.dispose.bind(this);return e.$mobx=this,e},e.prototype.toString=function(){return"Reaction["+this.name+"]"},e}();e.Reaction=$;var Ge=100;e.transaction=g;var n;!function(e){e[e.Recursive=0]="Recursive",e[e.Reference=1]="Reference",e[e.Structure=2]="Structure",e[e.Flat=3]="Flat"}(n||(n={})),e.asReference=j,e.asStructure=U,e.asFlat=ue;var I=function(){function e(e){this.value=e,i(e,"Modifiers are not allowed to be nested")}return e}(),S=function(){function e(e){this.value=e,i(e,"Modifiers are not allowed to be nested")}return e}(),K=function(){function e(e){this.value=e,i(e,"Modifiers are not allowed to be nested")}return e}(),N=0,me=function(){function e(){}return e}();me.prototype=[];var a=function(t){function e(n,r,o){t.call(this);var e=this.$mobx={atom:new D(o||"ObservableArray"),values:void 0,changeEvent:void 0,lastKnownLength:0,mode:r,array:this,makeChildReactive:function(t){return nt.call(e,t)}};Object.defineProperty(this,"$mobx",{enumerable:!1,configurable:!1,writable:!1}),n&&n.length?(pe(e,0,n.length),e.values=n.map(e.makeChildReactive)):e.values=[]}return T(e,t),e.prototype.observe=function(t,e){return void 0===e&&(e=!1),void 0===this.$mobx.changeEvent&&(this.$mobx.changeEvent=new d),e&&t({object:this,type:"splice",index:0,addedCount:this.$mobx.values.length,removed:[]}),this.$mobx.changeEvent.on(t)},e.prototype.clear=function(){return this.splice(0)},e.prototype.replace=function(e){return s(this.$mobx,0,this.$mobx.values.length,e)},e.prototype.toJSON=function(){return this.$mobx.atom.reportObserved(),this.$mobx.values.slice()},e.prototype.peek=function(){return this.$mobx.values},e.prototype.find=function(r,o,t){void 0===t&&(t=0),this.$mobx.atom.reportObserved();for(var n=this.$mobx.values,i=n.length,e=t;i>e;e++)if(r.call(o,n[e],e,this))return n[e];return null},e.prototype.splice=function(t,n){for(var r=[],e=2;e<arguments.length;e++)r[e-2]=arguments[e];switch(arguments.length){case 0:return[];case 1:return s(this.$mobx,t);case 2:return s(this.$mobx,t,n)}return s(this.$mobx,t,n,r)},e.prototype.push=function(){for(var t=[],e=0;e<arguments.length;e++)t[e-0]=arguments[e];return s(this.$mobx,this.$mobx.values.length,0,t),this.$mobx.values.length},e.prototype.pop=function(){return this.splice(Math.max(this.$mobx.values.length-1,0),1)[0]},e.prototype.shift=function(){return this.splice(0,1)[0]},e.prototype.unshift=function(){for(var t=[],e=0;e<arguments.length;e++)t[e-0]=arguments[e];return s(this.$mobx,0,0,t),this.$mobx.values.length},e.prototype.reverse=function(){this.$mobx.atom.reportObserved();var e=this.slice();return e.reverse.apply(e,arguments)},e.prototype.sort=function(t){this.$mobx.atom.reportObserved();var e=this.slice();return e.sort.apply(e,arguments)},e.prototype.remove=function(t){var e=this.$mobx.values.indexOf(t);return e>-1?(this.splice(e,1),!0):!1},e.prototype.toString=function(){return"[mobx.array] "+Array.prototype.toString.apply(this.$mobx.values,arguments)},e.prototype.toLocaleString=function(){return"[mobx.array] "+Array.prototype.toLocaleString.apply(this.$mobx.values,arguments)},e}(me);_e(a.prototype,["constructor","observe","clear","replace","toJSON","peek","find","splice","push","pop","shift","unshift","reverse","sort","remove","toString","toLocaleString"]),Object.defineProperty(a.prototype,"length",{enumerable:!1,configurable:!0,get:function(){return Ee(this.$mobx)},set:function(e){$e(this.$mobx,e)}}),["concat","every","filter","forEach","indexOf","join","lastIndexOf","map","reduce","reduceRight","slice","some"].forEach(function(e){var t=Array.prototype[e];Object.defineProperty(a.prototype,e,{configurable:!1,writable:!0,enumerable:!1,value:function(){return this.$mobx.atom.reportObserved(),t.apply(this.$mobx.values,arguments)}})}),de(1e3),e.fastArray=ze,e.isObservableArray=E;var Ye={},v=function(){function e(e,t){var r=this;this.$mobx=Ye,this._data={},this._hasMap={},this._events=void 0,this.name="ObservableMap",this.id=h(),this._keys=new a(null,n.Reference,this.name+"@"+this.id+" / keys()"),this._valueMode=Ce(t),u(e)?this.merge(e):Array.isArray(e)&&e.forEach(function(e){var t=e[0],n=e[1];return r.set(t,n)})}return e.prototype._has=function(e){return"undefined"!=typeof this._data[e]},e.prototype.has=function(e){return this.isValidKey(e)?this._hasMap[e]?this._hasMap[e].get():this._updateHasMapEntry(e,!1).get():!1},e.prototype.set=function(e,n){var t=this;if(this.assertValidKey(e),i(n,"[mobx.map.set] Expected unwrapped value to be inserted to key '"+e+"'. If you need to use modifiers pass them as second argument to the constructor"),this._has(e)){var r=this._data[e].value,o=this._data[e].set(n);o&&this._events&&this._events.emit({type:"update",object:this,name:e,oldValue:r})}else g(function(){t._data[e]=new p(n,t._valueMode,t.name+"@"+t.id+' / Entry "'+e+'"'),t._updateHasMapEntry(e,!0),t._keys.push(e)}),this._events&&this._events.emit({type:"add",object:this,name:e})},e.prototype.delete=function(e){var t=this;if(this._has(e)){var n=this._data[e].value;g(function(){t._keys.remove(e),t._updateHasMapEntry(e,!1);var n=t._data[e];n.set(void 0),t._data[e]=void 0}),this._events&&this._events.emit({type:"delete",object:this,name:e,oldValue:n})}},e.prototype._updateHasMapEntry=function(t,r){var e=this._hasMap[t];return e?e.set(r):e=this._hasMap[t]=new p(r,n.Reference,this.name+"@"+this.id+' / Contains "'+t+'"'),e},e.prototype.get=function(e){return this.has(e)?this._data[e].get():void 0},e.prototype.keys=function(){return this._keys.slice()},e.prototype.values=function(){return this.keys().map(this.get,this)},e.prototype.entries=function(){var e=this;return this.keys().map(function(t){return[t,e.get(t)]})},e.prototype.forEach=function(e,t){var n=this;this.keys().forEach(function(r){return e.call(t,n.get(r),r)})},e.prototype.merge=function(t){var n=this;return g(function(){t instanceof e?t.keys().forEach(function(e){return n.set(e,t.get(e))}):Object.keys(t).forEach(function(e){return n.set(e,t[e])})}),this},e.prototype.clear=function(){var e=this;g(function(){e.keys().forEach(e.delete,e)})},Object.defineProperty(e.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),e.prototype.toJs=function(){var t=this,e={};return this.keys().forEach(function(n){return e[n]=t.get(n)}),e},e.prototype.isValidKey=function(e){return null===e||void 0===e?!1:"string"!=typeof e&&"number"!=typeof e?!1:!0},e.prototype.assertValidKey=function(e){if(!this.isValidKey(e))throw new Error("[mobx.map] Invalid key: '"+e+"'")},e.prototype.toString=function(){var e=this;return"[mobx.map { "+this.keys().map(function(t){return t+": "+e.get(t)}).join(", ")+" }]"},e.prototype.observe=function(e){return this._events||(this._events=new d),this._events.on(e)},e}();e.ObservableMap=v,e.map=Ne,e.isObservableMap=M;var H={};e.isObservableObject=m;var p=function(t){function e(o,i,e){void 0===e&&(e="ObservableValue"),t.call(this,e),this.mode=i,this.hasUnreportedChange=!1,this.events=null,this.value=void 0;var r=R(o,n.Recursive),a=r[0],s=r[1];this.mode===n.Recursive&&(this.mode=a),this.value=k(s,this.mode,this.name)}return T(e,t),e.prototype.set=function(e){i(e,"Modifiers cannot be used on non-initial values."),q();var t=this.value,r=ne(this.mode===n.Structure,t,e);return r&&(this.value=k(e,this.mode,this.name),this.reportChanged(),this.events&&this.events.emit(e,t)),r},e.prototype.get=function(){return this.reportObserved(),this.value},e.prototype.observe=function(e,t){return this.events||(this.events=new d),t&&e(this.value,void 0),this.events.on(e)},e.prototype.toString=function(){return this.name+"@"+this.id+"["+this.value+"]"},e}(D),d=function(){function e(){this.listeners=[]}return e.prototype.emit=function(){for(var t=this.listeners.slice(),e=0,n=t.length;n>e;e++)t[e].apply(null,arguments)},e.prototype.on=function(e){var t=this;return this.listeners.push(e),Z(function(){var n=t.listeners.indexOf(e);-1!==n&&t.listeners.splice(n,1)})},e.prototype.once=function(t){var e=this.on(function(){e(),t.apply(this,arguments)});return e},e}();e.SimpleEventEmitter=d;var A=[];Object.freeze(A);var je=[],se=function(){}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}]},{},[1])(1)});
//# sourceMappingURL=lib/mobx.umd.min.js.map
{
"name": "mobx",
"version": "2.1.4",
"version": "2.1.5",
"description": "Simple, scalable state management.",

@@ -5,0 +5,0 @@ "main": "lib/mobx.js",

@@ -0,4 +1,5 @@

<img src="docs/mobx.png" alt="logo" height="120" align="right" />
# MobX
## _Simple, scalable state management_
_Simple, scalable state management_

@@ -8,3 +9,3 @@ [![Build Status](https://travis-ci.org/mobxjs/mobx.svg?branch=master)](https://travis-ci.org/mobxjs/mobx)

[![Join the chat at https://gitter.im/mobxjs/mobx](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/mobxjs/mobx?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![#mobservable channel on reactiflux discord](https://img.shields.io/badge/discord-%23mobx%20%40reactiflux-blue.svg)](https://discord.gg/0ZcbPKXt5bYAa2J1)
[![#mobx channel on reactiflux discord](https://img.shields.io/badge/discord-%23mobx%20%40reactiflux-blue.svg)](https://discord.gg/0ZcbPKXt5bYAa2J1)

@@ -14,4 +15,6 @@ * Installation: `npm install mobx --save`. React bindings: `npm install mobx-react --save`

* Api documentation (including ES5, ES6, Typescript examples): https://mobxjs.github.io/mobx
* Videos: [Screencast: intro to MobX](https://www.youtube.com/watch?v=K8dr8BMU7-8) &mdash; State Management Is Easy, React Amsterdam 2016 conf (coming soon) ([slides](https://speakerdeck.com/mweststrate/state-management-is-easy-introduction-to-mobx)) &mdash; [Transparent Reactive Programming and Mutable Data, Reactive2015 conf](https://www.youtube.com/watch?v=FEwLwiizlk0) ([slides](https://speakerdeck.com/mweststrate/react-transparent-reactive-programming-and-mutable-data-structures))
---
## Introduction
MobX is a battle tested library that makes state management simple and scalable by transparently applying functional reactive programming (TFRP).

@@ -24,2 +27,4 @@ The philosophy behind MobX is very simple:

<img alt="MobX unidirectional flow" src="docs/flow.png" height="200" align="center" />
React and MobX together are a powerful combination. React renders the application state by providing mechanisms to translate it into a tree of renderable components. MobX provides the mechanism to store and update the application state that React then uses.

@@ -29,6 +34,2 @@

## MobX was formerly known as Mobservable.
To use install pre- 2.0 `mobx*` compatible packages, use `mobservable` instead of `mobx`.
See the [changelog](https://github.com/mobxjs/mobx/blob/master/CHANGELOG.md) for all the details.
## Core concepts

@@ -147,3 +148,3 @@

### Referential integrity is guaranteed
Since data doesn't need to be normalized, and MobX automatically tracks the relations between state and derivations, you get referential integrity for free. Rendering something that is accessed through three levels of indirection? No problem, MobX will track them and re-render whenever one of the references changes. As a result staleness bugs are a thing of the past. As a programmer you might forget that changing some data might influence an seemingly unrelated component in a corner case. MobX won't forget.
Since data doesn't need to be normalized, and MobX automatically tracks the relations between state and derivations, you get referential integrity for free. Rendering something that is accessed through three levels of indirection? No problem, MobX will track them and re-render whenever one of the references changes. As a result staleness bugs are a thing of the past. As a programmer you might forget that changing some data might influence a seemingly unrelated component in a corner case. MobX won't forget.

@@ -157,3 +158,3 @@ ### Simpler actions are easier to maintain

Secondly MobX sees the causality between derivations so it can order them in such a way that no derivation has to run twice or introduces a glitch.
How that works? See this [in-depth explanation of MobX](https://medium.com/@mweststrate/becoming-fully-reactive-an-in-depth-explanation-of-mobservable-55995262a254#.a2j1rww8g).
How that works? See this [in-depth explanation of MobX](https://medium.com/@mweststrate/becoming-fully-reactive-an-in-depth-explanation-of-mobservable-55995262a254).

@@ -174,15 +175,39 @@ ### Easy interoperability

## Further examples and documentation
## Further resources and documentation
### Get Started
* [Getting Started](https://mobxjs.github.io/mobx/getting-started.html) Ten minute, interactive introduction (with just ES5)
* [Full API documentation](http://mobxjs.github.io/mobx/)
* Ten minute, [interactive introduction](https://mobxjs.github.io/mobx/getting-started.html) (with just ES5)
* Boilerplate and example projects for ES5, Babel, Typescript can be found in the [MobX](https://github.com/mobxjs) organization on github.
* [react-mobservable-boilerplate](https://github.com/mweststrate/react-mobservable-boilerplate) Clone the boilerplate repository containing the above example
* [MobX Github](https://github.com/mobxjs) Further boilerplate and example projects for ES5, Babel and Typescript can be found in the organization on github
Blogs & Videos:
* [Reactive 2015 Conference Talk on MobX (mobservable): React, transparent reactive programming and mutable data structures](https://www.youtube.com/watch?v=FEwLwiizlk0)
### Blogs & Videos
* [Screencast: intro to MobX](https://www.youtube.com/watch?v=K8dr8BMU7-8) State Management Is Easy, React Amsterdam 2016 conf (coming soon) ([slides](https://speakerdeck.com/mweststrate/state-management-is-easy-introduction-to-mobx))
* [Reactive 2015 Conference](https://www.youtube.com/watch?v=FEwLwiizlk0) Talk on MobX (mobservable): React, transparent reactive programming and mutable data structures ([slides](https://speakerdeck.com/mweststrate/react-transparent-reactive-programming-and-mutable-data-structures))
* [Making React reactive: the pursuit of high performing, easily maintainable React apps](https://www.mendix.com/tech-blog/making-react-reactive-pursuit-high-performing-easily-maintainable-react-apps/)
* [Becoming fully reactive: an in-depth explanation of Mobservable](https://medium.com/@mweststrate/becoming-fully-reactive-an-in-depth-explanation-of-mobservable-55995262a254#.a2j1rww8g)
* [Becoming fully reactive: an in-depth explanation of MobX](https://medium.com/@mweststrate/becoming-fully-reactive-an-in-depth-explanation-of-mobservable-55995262a254#.a2j1rww8g)
* [Pure rendering in the light of time and state](https://medium.com/@mweststrate/pure-rendering-in-the-light-of-time-and-state-4b537d8d40b1)
* [SurviveJS interview on MobX, React and Flux](http://survivejs.com/blog/mobservable-interview/)
* [MobX Interview](http://survivejs.com/blog/mobx-interview/) SurviveJS interview on MobX, React and Flux
### Related projects
* [mobx-connect](https://github.com/nightwolfz/mobx-connect) MobX @connect decorator for react components. Similar to redux's @connect.
* [rfx-stack](https://github.com/foxhound87/rfx-stack) RFX Stack - Universal App featuring: React + Feathers + MobX
* [mobx-reactor](https://github.com/amsb/mobx-reactor) Connect MobX data stores to functional stateless React components with async actions and unidirectional data flow.
* [mobx-model](https://github.com/ikido/mobx-model) Simplify mobx data stores that mimic backend models
* [rx-mobx](https://github.com/chicoxyzzy/rx-mobx) Convert Mobx observables to RxJS and vice versa
* [mobx-store](https://github.com/AriaFallah/mobx-store) A lowdb inspired data store with declarative querying, observable state, and easy undo/redo.
* [reaxor](https://github.com/KadoBOT/reaxor) Boilerplate for better state management, styling, testing and cleaner code
* [Smalldots MobX Store](https://github.com/smalldots/mobx-store) Store API for MobX
_Feel free to create a PR to add your own!_
### More examples
* [mobx-react-todomvc](https://github.com/mobxjs/mobx-react-todomvc) TodoMVC reference implementation on top of react-mobx-boilerplate
* [mobx-react-typescript](https://github.com/contacts-mvc/mobx-react-typescript) An example project using Typescript
* [TodoMVC Benchmarking](https://github.com/mweststrate/mobx-todomvc)
* [mobservable-demo](https://github.com/survivejs/mobservable-demo) The ports of the _Notes_ and _Kanban_ examples from the book "SurviveJS - Webpack and React" to mobservable.
* [react-particles-experiment](https://github.com/mobxjs/react-particles-experiment) MobX port of React-Particles-Experiment, showing MobX + Flux action dispatching
* A simple webshop using [React + mobx](https://jsfiddle.net/mweststrate/46vL0phw) or [JQuery + mobx](http://jsfiddle.net/mweststrate/vxn7qgdw).
* [Simple timer](https://jsfiddle.net/mweststrate/wgbe4guu/) application in JSFiddle.
## What others are saying...

@@ -193,3 +218,3 @@

> _We ported the book Notes and Kanban examples to Mobservable. Check out [the source](https://github.com/survivejs-demos/mobx-demo) to see how this worked out. Compared to the original I was definitely positively surprised. MobX seems like a good fit for these problems._
> _We ported the book Notes and Kanban examples to MobX. Check out [the source](https://github.com/survivejs-demos/mobx-demo) to see how this worked out. Compared to the original I was definitely positively surprised. MobX seems like a good fit for these problems._
> &dash; Juho Vepsäläinen, author of "SurviveJS - Webpack and React" and jster.net curator

@@ -203,3 +228,3 @@

More testimonials from people using MobX in production can be found on [medium: functional reactive flux blog](https://medium.com/@kenneth_chau/the-2-fundamental-laws-of-flux-and-the-functional-reactive-flux-c9368ac008d3#.h41y0i22h), [hacker news](https://news.ycombinator.com/item?id=11181980), [reddit 1](https://www.reddit.com/r/reactjs/comments/46m2zg/has_anybody_used_mobservable_for_their_react/), [reddit 2](https://www.reddit.com/r/javascript/comments/47omi9/mobx_20_previously_mobservable_has_been_released/) or on twitter under the [#mobx](https://twitter.com/search?q=mobx&src=typd) and [#mobservable](https://twitter.com/search?q=mobservable&src=typd) hashtags.
More testimonials from people using MobX in production can be found on [medium: functional reactive flux blog](https://medium.com/@kenneth_chau/the-2-fundamental-laws-of-flux-and-the-functional-reactive-flux-c9368ac008d3#.h41y0i22h), [hacker news](https://news.ycombinator.com/item?id=11181980), [reddit 1](https://www.reddit.com/r/reactjs/comments/46m2zg/has_anybody_used_mobservable_for_their_react/), [reddit 2](https://www.reddit.com/r/javascript/comments/47omi9/mobx_20_previously_mobservable_has_been_released/) or on twitter under the [#mobx](https://twitter.com/search?q=mobx&src=typd) tag.

@@ -217,1 +242,5 @@ ## Contributing

Then use `lib/mobx.umd.js` or `lib/mobx.umd.min.js`
## MobX was formerly known as Mobservable.
See the [changelog](https://github.com/mobxjs/mobx/blob/master/CHANGELOG.md#200) for all the details about `mobservable` to `mobx`.

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc