Socket
Socket
Sign inDemoInstall

mobx

Package Overview
Dependencies
Maintainers
2
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.3.7 to 2.4.0-alpha1

39

lib/mobx.d.ts

@@ -28,2 +28,3 @@ export { IAtom, Atom };

export { Lambda };
export { FastSet, ISetEntry };
export { Iterator };

@@ -117,3 +118,5 @@ export { SimpleEventEmitter, ISimpleEventListener };

staleObservers: any[];
observers: any[];
observers: FastSet<IDerivation>;
diffValue: number;
laRunId: number;
constructor(name?: string, onBecomeObserved?: () => void, onBecomeUnobserved?: () => void);

@@ -131,9 +134,11 @@ reportObserved(): void;

}
interface IDerivation extends IDepTreeNode, IObservable {
interface IDerivation extends IDepTreeNode, IObservable, ISetEntry {
observing: IObservable[];
staleObservers: IDerivation[];
observers: IDerivation[];
observers: FastSet<IDerivation>;
dependencyStaleCount: number;
dependencyChangeCount: number;
onDependenciesReady(): boolean;
runId: number;
l: number;
}

@@ -143,8 +148,10 @@ declare function untracked<T>(action: () => T): T;

name: string;
observers?: IDerivation[];
observers?: FastSet<IDerivation>;
observing?: IObservable[];
}
interface IObservable extends IDepTreeNode {
diffValue: number;
laRunId: number;
staleObservers: IDerivation[];
observers: IDerivation[];
observers: FastSet<IDerivation>;
onBecomeObserved(): any;

@@ -157,4 +164,9 @@ onBecomeUnobserved(): any;

staleObservers: IDerivation[];
observers: IDerivation[];
observing: IObservable[];
observers: FastSet<IDerivation>;
observing: any[];
diffValue: number;
runId: number;
laRunId: number;
l: number;
__mapid: string;
dependencyChangeCount: number;

@@ -324,2 +336,15 @@ dependencyStaleCount: number;

}
interface ISetEntry {
__mapid: string;
}
declare class FastSet<T extends ISetEntry> {
size: number;
data: {};
isEmpty(): boolean;
length: number;
asArray(): T[];
add(value: T): void;
remove(value: T): void;
cloneAndClear(): T[];
}
declare type ISimpleEventListener = {

@@ -326,0 +351,0 @@ (...data: any[]): void;

4

lib/mobx.min.js
/** MobX - (c) Michel Weststrate 2015, 2016 - MIT Licensed */
"use strict";function ae(n,a,u){var o,e,r;"string"==typeof n?(o=n,e=a,r=u):"function"==typeof n&&(o=n.name||"Autorun@"+i(),e=n,r=a),p(e,"autorun methods cannot have modifiers"),t("function"==typeof e,"autorun expects a function"),t(0===e.length,"autorun expects a function without arguments"),r&&(e=e.bind(r));var s=new v(o,function(){this.track(e)});return s.schedule(),s.getDisposer()}function ke(e,s,u,l){var r,o,a,t;"string"==typeof e?(r=e,o=s,a=u,t=l):"function"==typeof e&&(r="When@"+i(),o=e,a=s,t=u);var c=!1,n=ae(r,function(){if(o.call(t)){n?n():c=!0;var e=C();a.call(t),j(e)}});return c&&n(),n}function Zt(e,t,n){return a("`autorunUntil` is deprecated, please use `when`."),ke.apply(null,arguments)}function qt(e,u,c,l){var a,t,n,r;"string"==typeof e?(a=e,t=u,n=c,r=l):"function"==typeof e&&(a=e.name||"AutorunAsync@"+i(),t=e,n=u,r=c),void 0===n&&(n=1),r&&(t=t.bind(r));var s=!1,o=new v(a,function(){s||(s=!0,setTimeout(function(){s=!1,o.isDisposed||o.track(t)},n))});return o.schedule(),o.getDisposer()}function Xt(a,f,x,g,b,_){function m(){if(!l.isDisposed){var e=!1;l.track(function(){var t=d();e=le(w,s,t),s=t}),u&&r&&t(s),u||e!==!0||t(s),u&&(u=!1)}}var c,p,t,r,e,o;"string"==typeof a?(c=a,p=f,t=x,r=g,e=b,o=_):(c=a.name||f.name||"Reaction@"+i(),p=a,t=f,r=x,e=g,o=b),void 0===r&&(r=!1),void 0===e&&(e=0);var y=T(p,n.Reference),R=y[0],d=y[1],w=R===n.Structure;o&&(d=d.bind(o),t=me(c,t.bind(o)));var u=!0,h=!1,s=void 0,l=new v(c,function(){1>e?m():h||(h=!0,setTimeout(function(){h=!1,m()},e))});return l.schedule(),l.getDisposer()}function ce(e,n,r,o){return arguments.length<3&&"function"==typeof e?Wt(e,n):(t(!r||!r.set,"@observable properties cannot have a setter: "+n),gt.apply(null,arguments))}function Wt(r,o){var e=T(r,n.Recursive),i=e[0],t=e[1];return new f(t,o,i===n.Structure,t.name)}function ot(){throw new Error("[ComputedValue] It is not allowed to assign new values to computed properties.")}function Nt(n,o){t("function"==typeof n&&1===n.length,"createTransformer expects a function that accepts one argument");var r={},i=e.resetId,a=function(e){function t(t,r){e.call(this,function(){return n(r)},null,!1,"Transformer-"+n.name+"-"+t),this.sourceIdentifier=t,this.sourceObject=r}return ie(t,e),t.prototype.onBecomeUnobserved=function(){var t=this.value;e.prototype.onBecomeUnobserved.call(this),delete r[this.sourceIdentifier],o&&o(t,this.sourceObject)},t}(f);return function(o){i!==e.resetId&&(r={},i=e.resetId);var n=Pt(o),t=r[n];return t?t.get():(t=r[n]=new a(n,o),t.get())}}function Pt(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=i(),_(e,"$transformId",t)),t}function $t(e,t){return pe()||console.warn("[mobx.expr] 'expr' should only be used inside other reactive functions."),ce(e,t).get()}function se(e){for(var o=[],r=1;r<arguments.length;r++)o[r-1]=arguments[r];return t(arguments.length>=2,"extendObservable expected 2 or more arguments"),t("object"==typeof e,"extendObservable expects an object as first argument"),t(!(e instanceof S),"extendObservable should not be used on maps, use map.merge instead"),o.forEach(function(r){t("object"==typeof r,"all arguments of extendObservable should be objects"),nt(e,r,n.Recursive,null)}),e}function nt(e,t,r,o){var i=te(e,o,r);for(var n in t)if(t.hasOwnProperty(n)){if(e===t&&!Be(e,n))continue;Rt(i,n,t[n])}return e}function Lt(e,t){return et(d(e,t))}function et(e){var t={name:e.name};return e.observing&&e.observing.length&&(t.dependencies=P(e.observing).map(et)),t}function Ct(e,t){return Ze(d(e,t))}function Ze(e){var t={name:e.name};return e.observers&&e.observers.length&&(t.observers=P(e.observers).map(Ze)),t}function kt(e,t,n){return"function"==typeof n?He(e,t,n):St(e,t)}function St(e,t){return g(e)&&!h(e)?(a("Passing plain objects to intercept / observe is deprecated and will be removed in 3.0"),y(H(e)).intercept(t)):y(e).intercept(t)}function He(e,t,n){return g(e)&&!h(e)?(a("Passing plain objects to intercept / observe is deprecated and will be removed in 3.0"),se(e,{property:e[t]}),He(e,t,n)):y(e,t).intercept(n)}function N(e,t){if(null===e||void 0===e)return!1;if(void 0!==t){if(e instanceof S||e instanceof l)throw new Error("[mobx.isObservable] isObservable(object, propertyName) is not supported for arrays and maps. Use map.has or array.length instead.");if(h(e)){var n=e.$mobx;return n.values&&!!n.values[t]}return!1}return!!e.$mobx||e instanceof I||e instanceof v||e instanceof f}function wt(r,e,n){return t(arguments.length>=2&&arguments.length<=3,"Illegal decorator config",e),Qe(r,e),t(!n||!n.get,"@observable can not be used on getters, use @computed instead"),xt.apply(null,arguments)}function H(e,u){if(void 0===e&&(e=void 0),"string"==typeof arguments[1])return wt.apply(null,arguments);if(t(arguments.length<3,"observable expects zero, one or two arguments"),N(e))return e;var s=T(e,n.Recursive),r=s[0],i=s[1],c=r===n.Reference?o.Reference:bt(i);switch(c){case o.Array:case o.PlainObject:return J(i,r);case o.Reference:case o.ComplexObject:return new A(i,r);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 a("Use `computed(expr)` instead of `observable(expr)`"),ce(e,u)}t(!1,"Illegal State")}function bt(e){return null===e||void 0===e?o.Reference:"function"==typeof e?e.length?o.ComplexFunction:o.ViewFunction:Array.isArray(e)||e instanceof l?o.Array:"object"==typeof e?g(e)?o.PlainObject:o.ComplexObject:o.Reference}function yt(t,n,e,r){return"function"==typeof e?Ke(t,n,e,r):nn(t,n,e)}function nn(e,t,n){return g(e)&&!h(e)?(a("Passing plain objects to intercept / observe is deprecated and will be removed in 3.0"),y(H(e)).observe(t,n)):y(e).observe(t,n)}function Ke(e,t,n,r){return g(e)&&!h(e)?(a("Passing plain objects to intercept / observe is deprecated and will be removed in 3.0"),se(e,{property:e[t]}),Ke(e,t,n,r)):y(e,t).observe(n,r)}function x(e,n,t){function i(r){return n&&t.push([e,r]),r}if(void 0===n&&(n=!0),void 0===t&&(t=null),e instanceof Date||e instanceof RegExp)return e;if(n&&null===t&&(t=[]),n&&null!==e&&"object"==typeof e)for(var r=0,s=t.length;s>r;r++)if(t[r][0]===e)return t[r][1];if(!e)return e;if(Array.isArray(e)||e instanceof l){var o=i([]),a=e.map(function(e){return x(e,n,t)});o.length=a.length;for(var r=0,s=a.length;s>r;r++)o[r]=a[r];return o}if(e instanceof S){var u=i({});return e.forEach(function(e,r){return u[r]=x(e,n,t)}),u}if(N(e)&&e.$mobx instanceof A)return x(e(),n,t);if(e instanceof A)return x(e.get(),n,t);if("object"==typeof e){var o=i({});for(var c in e)o[c]=x(e[c],n,t);return o}return e}function en(n,e,t){return void 0===e&&(e=!0),void 0===t&&(t=null),a("toJSON is deprecated. Use toJS instead"),x.apply(null,arguments)}function he(e){return console.log(e),e}function Qt(n,r){switch(arguments.length){case 0:if(n=e.derivationStack[e.derivationStack.length-1],!n)return he("whyRun() can only be used if a derivation is active, or by passing an computed value / reaction explicitly. If you invoked whyRun from inside a computation; the computation is currently suspended but re-evaluating because somebody requested it's value.");break;case 2:n=d(n,r)}return n=d(n),n instanceof f?he(n.whyRun()):n instanceof v?he(n.whyRun()):void t(!1,"whyRun can only be used on reactions and computed values")}function me(e,t,n,r){return 1===arguments.length&&"function"==typeof e?ne(e.name||"<unnamed action>",e):2===arguments.length&&"function"==typeof t?ne(e,t):1===arguments.length&&"string"==typeof e?Ge(e):Ge(t).apply(null,arguments)}function Ge(e){return function(n,r,t){return t&&"function"==typeof t.value?(t.value=ne(e,t.value),t.enumerable=!1,t):_t(e).apply(this,arguments)}}function _e(e){return"function"==typeof e&&e.isMobxAction===!0}function Ft(e,o,i){var n="string"==typeof e?e:e.name||"<unnamed action>",r="function"==typeof e?e:o,a="function"==typeof e?o:i;return t("function"==typeof r,"`runInAction` expects a function"),t(0===r.length,"`runInAction` expects a function without arguments"),t("string"==typeof n&&n.length>0,"actions should have valid names, got: '"+n+"'"),Fe(n,r,a,void 0)}function ne(e,n){t("function"==typeof n,"`action` can only be invoked on functions"),t("string"==typeof e&&e.length>0,"actions should have valid names, got: '"+e+"'");var r=function(){return Fe(e,n,this,arguments)};return r.isMobxAction=!0,r}function Fe(d,p,o,n){var u=e.derivationStack;t(!(u[u.length-1]instanceof f),"Computed values or transformers should not invoke actions or trigger other side effects");var l,a=r();if(a){l=Date.now();var h=[];if(n)for(var i=0,v=n.length;v>i;i++)h.push(n[i]);s({type:"action",name:d,fn:p,target:o,arguments:h})}var y=C();Se(d,o,!1);var m=Q(!0);try{return p.apply(o,n)}finally{G(m),Je(!1),j(y),a&&c({time:Date.now()-l})}}function Tt(n){t(0===e.derivationStack.length,"It is not allowed to set `useStrict` when a derivation is running"),e.strictMode=n,e.allowStateChanges=!n}function Ue(e,t){var n=Q(e),r=t();return G(n),r}function Q(t){var n=e.allowStateChanges;return e.allowStateChanges=t,n}function G(t){e.allowStateChanges=t}function Ne(e){t(e.isDirty,"atom not dirty"),e.isDirty=!1,re(e,!0)}function pe(){return e.derivationStack.length>0&&e.isTracking}function fe(){e.allowStateChanges||t(!1,e.strictMode?"It is not allowed to create or change state outside an `action` when MobX is in strict mode. Wrap the current method in `action` if this state change is intended":"It is not allowed to change the state when a computed value or transformer is being evaluated. Use 'autorun' to create reactive functions with side-effects.")}function mt(e){1===++e.dependencyStaleCount&&Ve(e)}function dt(e,n){if(t(e.dependencyStaleCount>0,"unexpected ready notification"),n&&(e.dependencyChangeCount+=1),0===--e.dependencyStaleCount)if(e.dependencyChangeCount>0){e.dependencyChangeCount=0;var r=e.onDependenciesReady();re(e,r)}else re(e,!1)}function $e(t,i){var n=!0,a=t.observing;t.observing=[],e.derivationStack.push(t);var s=e.isTracking;e.isTracking=!0;try{var u=i.call(t);return n=!1,e.isTracking=s,pt(t,a),u}finally{if(n){var o="[mobx] An uncaught exception occurred while calculating your computed value, autorun or transformer. Or inside the render() method of an observer based React component. These functions should never throw exceptions as MobX will not always be able to recover from them. "+("Please fix the error reported after this message or enable 'Pause on (caught) exceptions' in your debugger to find the root cause. In: '"+t.name+"'");r()&&k({type:"error",object:this,message:o}),console.warn(o),Y()}}}function pt(n,s){e.derivationStack.length-=1;for(var o=qe(n.observing,s),r=o[0],i=o[1],t=0,a=r.length;a>t;t++){r[t];jt(r[t],n)}for(var t=0,a=i.length;a>t;t++)ee(i[t],n)}function Te(e){var t=C(),n=e();return j(t),n}function C(){var t=e.isTracking;return e.isTracking=!1,t}function j(t){e.isTracking=t}function Bt(){}function Y(){e.resetId++;var n=new Ye;for(var t in n)-1===At.indexOf(t)&&(e[t]=n[t]);e.allowStateChanges=!e.strictMode}function jt(e,r){var t=e.observers,n=t.length;t[n]=r,0===n&&e.onBecomeObserved()}function ee(t,r){var e=t.observers,n=e.indexOf(r);-1!==n&&e.splice(n,1),0===e.length&&t.onBecomeUnobserved()}function De(n){if(e.isTracking!==!1){var o=e.derivationStack,t=o[o.length-1].observing,r=t.length;t[r-1]!==n&&t[r-2]!==n&&(t[r]=n)}}function Ve(e){var t=e.observers.slice();t.forEach(mt),e.staleObservers=e.staleObservers.concat(t)}function re(e,t){e.staleObservers.splice(0).forEach(function(e){return dt(e,t)})}function oe(){if(!(e.isRunningReactions===!0||e.inTransaction>0)){e.isRunningReactions=!0;for(var t=e.pendingReactions,o=0;t.length>0;){if(++o===Et)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 r(){return W}function k(r){if(!W)return!1;for(var n=e.spyListeners,t=0,o=n.length;o>t;t++)n[t](r)}function s(e){var t=We({},e,{spyReportStart:!0});k(t)}function c(e){k(e?We({},e,tt):tt)}function Ce(t){return e.spyListeners.push(t),W=e.spyListeners.length>0,B(function(){var n=e.spyListeners.indexOf(t);-1!==n&&e.spyListeners.splice(n,1),W=e.spyListeners.length>0})}function zt(e){return a("trackTransitions is deprecated. Use mobx.spy instead"),"boolean"==typeof e&&(a("trackTransitions only takes a single callback function. If you are using the mobx-react-devtools, please update them first"),e=arguments[1]),e?Ce(e):(a("trackTransitions without callback has been deprecated and is a no-op now. If you are using the mobx-react-devtools, please update them first"),function(){})}function L(n,e,t){void 0===e&&(e=void 0),void 0===t&&(t=!0),Se(n.name||"anonymous transaction",e,t);var r=n.call(e);return Je(t),r}function Se(o,t,n){void 0===t&&(t=void 0),void 0===n&&(n=!0),e.inTransaction+=1,n&&r()&&s({type:"transaction",target:t,name:o})}function Je(t){if(void 0===t&&(t=!0),0===--e.inTransaction){for(var o=e.changedAtoms.splice(0),n=0,i=o.length;i>n;n++)Ne(o[n]);oe()}t&&r()&&c()}function R(e){return e.interceptors&&e.interceptors.length>0}function K(t,n){var e=t.interceptors||(t.interceptors=[]);return e.push(n),B(function(){var t=e.indexOf(n);-1!==t&&e.splice(t,1)})}function w(o,e){for(var i=C(),r=o.interceptors,n=0,a=r.length;a>n;n++)if(e=r[n](e),t(!e||e.type,"Intercept handlers should return nothing or a change object"),!e)return null;return j(i),e}function b(e){return e.changeListeners&&e.changeListeners.length>0}function X(t,n){var e=t.changeListeners||(t.changeListeners=[]);return e.push(n),B(function(){var t=e.indexOf(n);-1!==t&&e.splice(t,1)})}function m(r,n){var o=C(),e=r.changeListeners;if(e){e=e.slice();for(var t=0,i=e.length;i>t;t++)Array.isArray(n)?e[t].apply(null,n):e[t](n);j(o)}}function xe(e){return new ue(e)}function we(e){return new M(e)}function Re(e){return new ge(e)}function ft(e,t){return Ee(e,t)}function T(e,t){return e instanceof ue?[n.Reference,e.value]:e instanceof M?[n.Structure,e.value]:e instanceof ge?[n.Flat,e.value]:[t,e]}function Ht(e){return e===xe?n.Reference:e===we?n.Structure:e===Re?n.Flat:(t(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 J(e,a,i){var r;if(N(e))return e;switch(a){case n.Reference:return e;case n.Flat:p(e,"Items inside 'asFlat' cannot have modifiers"),r=n.Reference;break;case n.Structure:p(e,"Items inside 'asStructure' cannot have modifiers"),r=n.Structure;break;case n.Recursive:o=T(e,n.Recursive),r=o[0],e=o[1];break;default:t(!1,"Illegal State")}return Array.isArray(e)?je(e,r,i):g(e)&&Object.isExtensible(e)?nt(e,e,r,i):e;var o}function p(e,t){if(e instanceof ue||e instanceof M||e instanceof ge)throw new Error("[mobx] asStructure / asReference / asFlat cannot be used here. "+t)}function ht(e){var t=Oe(e),n=Ae(e);Object.defineProperty(l.prototype,""+e,{enumerable:!1,configurable:!0,set:t,get:n})}function Oe(e){return function(t){var r=this.$mobx,o=r.values;if(p(t,"Modifiers cannot be used on array values. For non-reactive array values use makeReactive(asFlat(array))."),e<o.length){fe();var i=o[e];if(R(r)){var a=w(r,{type:"update",object:r.array,index:e,newValue:t});if(!a)return;t=a.newValue}t=r.makeReactiveArrayItem(t);var s=r.mode===n.Structure?!U(i,t):i!==t;s&&(o[e]=t,r.notifyArrayChildUpdate(e,t,i))}else{if(e!==o.length)throw new Error("[mobx.array] Index out of bounds, "+e+" is larger than "+o.length);r.spliceWithArray(e,0,[t])}}}function Ae(e){return function(){var t=this.$mobx;return t&&e<t.values.length?(t.atom.reportObserved(),t.values[e]):void console.warn("[mobx.array] Attempt to read an array index ("+e+") that is out of bounds ("+t.values.length+"). Please check length first. Out of bound indices will not be tracked by MobX")}}function Ie(t){for(var e=ye;t>e;e++)ht(e);ye=t}function je(e,t,n){return new l(e,t,n)}function vt(e){return a("fastArray is deprecated. Please use `observable(asFlat([]))`"),je(e,n.Flat,null)}function z(e){return e instanceof l}function Ee(e,t){return new S(e,t)}function q(e){return e instanceof S}function te(e,t,r){if(void 0===r&&(r=n.Recursive),h(e))return e.$mobx;g(e)||(t=e.constructor.name+"@"+i()),t||(t="ObservableObject@"+i());var o=new it(e,t,r);return $(e,"$mobx",o),o}function Rt(e,t,n){e.values[t]?e.target[t]=n:Z(e,t,n,!0)}function Z(t,n,e,a){a&&Qe(t.target,n);var r,o=t.name+"."+n,i=!0;if("function"!=typeof e||0!==e.length||_e(e))if(e instanceof M&&"function"==typeof e.value&&0===e.value.length)r=new f(e.value,t.target,!0,o);else{if(i=!1,R(t)){var s=w(t,{object:t.target,name:n,type:"add",newValue:e});if(!s)return;e=s.newValue}r=new A(e,t.mode,o,!1),e=r.value}else r=new f(e,t.target,!1,o);t.values[n]=r,a&&Object.defineProperty(t.target,n,i?Dt(n):Vt(n)),i||Kt(t,t.target,n,e)}function Vt(e){var t=at[e];return t?t:at[e]={configurable:!0,enumerable:!0,get:function(){return this.$mobx.values[e].get()},set:function(t){Le(this,e,t)}}}function Dt(e){var t=st[e];return t?t:st[e]={configurable:!0,enumerable:!1,get:function(){return this.$mobx.values[e].get()},set:ot}}function Le(o,i,e){var t=o.$mobx,a=t.values[i];if(R(t)){var n=w(t,{type:"update",object:o,name:i,newValue:e});if(!n)return;e=n.newValue}if(e=a.prepareNewValue(e),e!==E){var l=b(t),u=r(),n=m||b?{type:"update",object:o,oldValue:a.value,name:i,newValue:e}:null;u&&s(n),a.setNewValue(e),l&&m(t,n),u&&c()}}function Kt(t,i,a,u){var n=b(t),e=r(),o=n||e?{type:"add",object:i,name:a,newValue:u}:null;e&&s(o),n&&m(t,o),e&&c()}function h(e){return"object"==typeof e&&null!==e?(V(e),e.$mobx instanceof it):!1}function d(e,n){if("object"==typeof e&&null!==e){if(z(e))return t(void 0===n,"It is not possible to get index atoms from arrays"),e.$mobx.atom;if(q(e)){if(void 0===n)return d(e._keys);var r=e._data[n]||e._hasMap[n];return t(!!r,"the entry '"+n+"' does not exist in the observable map '"+ve(e)+"'"),r}if(V(e),h(e)){t(!!n,"please specify a property");var o=e.$mobx.values[n];return t(!!o,"no observable property '"+n+"' found on the observable object '"+ve(e)+"'"),o}if(e instanceof I||e instanceof f||e instanceof v)return e}else if("function"==typeof e&&e.$mobx instanceof v)return e.$mobx;t(!1,"Cannot obtain atom from "+e)}function y(e,n){return t(e,"Expection some object"),void 0!==n?y(d(e,n)):e instanceof I||e instanceof f||e instanceof v?e:q(e)?e:(V(e),e.$mobx?e.$mobx:void t(!1,"Cannot obtain administration from "+e))}function ve(e,t){var n;return n=void 0!==t?d(e,t):h(e)||q(e)?y(e):d(e),n.name}function de(e,r,o,i,a){function n(u,n,s,c){if(t(a||Me(arguments),"This function is a decorator, but it wasn't invoked like a decorator"),s){u.hasOwnProperty("__mobxLazyInitializers")||_(u,"__mobxLazyInitializers",u.__mobxLazyInitializers&&u.__mobxLazyInitializers.slice()||[]);var p=s.value,l=s.initializer;return u.__mobxLazyInitializers.push(function(t){e(t,n,l?l.call(t):p,c,s)}),{enumerable:i,configurable:!0,get:function(){return this.__mobxDidRunLazyInitializers!==!0&&V(this),r.call(this,n)},set:function(e){this.__mobxDidRunLazyInitializers!==!0&&V(this),o.call(this,n,e)}}}var f={enumerable:i,configurable:!0,get:function(){return this.__mobxInitializedProps&&this.__mobxInitializedProps[n]===!0||Pe(this,n,void 0,e,c,s),r.call(this,n)},set:function(t){this.__mobxInitializedProps&&this.__mobxInitializedProps[n]===!0?o.call(this,n,t):Pe(this,n,t,e,c,s)}};return arguments.length<3&&Object.defineProperty(u,n,s),f}return a?function(){if(Me(arguments))return n.apply(null,arguments);var e=arguments;return function(t,r,o){return n(t,r,o,e)}}:n}function Pe(e,t,n,r,o,i){e.hasOwnProperty("__mobxInitializedProps")||_(e,"__mobxInitializedProps",{}),e.__mobxInitializedProps[t]=!0,r(e,t,n,o,i)}function V(e){e.__mobxDidRunLazyInitializers!==!0&&e.__mobxLazyInitializers&&(_(e,"__mobxDidRunLazyInitializers",!0),e.__mobxDidRunLazyInitializers&&e.__mobxLazyInitializers.forEach(function(t){return t(e)}))}function Me(e){return(2===e.length||3===e.length)&&"string"==typeof e[1]}function It(){return"function"==typeof Symbol&&Symbol.iterator||"@@iterator"}function F(e){t(e[ut]!==!0,"Illegal state: cannot recycle array as iterator"),$(e,ut,!0);var n=-1;return $(e,"next",function(){return n++,{done:n>=this.length,value:n<this.length?this[n]:void 0}}),e}function ze(e,t){$(e,It(),t)}function i(){return++e.mobxGuid}function t(t,n,e){if(!t)throw new Error("[mobx] Invariant failed: "+n+(e?" in '"+e+"'":""))}function a(e){-1===ct.indexOf(e)&&(ct.push(e),console.error("[mobx] Deprecated: "+e))}function B(t){var e=!1;return function(){return e?void 0:(e=!0,t.apply(this,arguments))}}function P(t){var e=[];return t.forEach(function(t){-1===e.indexOf(t)&&e.push(t)}),e}function be(t,e,n){if(void 0===e&&(e=100),void 0===n&&(n=" - "),!t)return"";var r=t.slice(0,e);return""+r.join(n)+(t.length>e?" (... and "+(t.length-e)+"more)":"")}function g(e){return null!==e&&"object"==typeof e&&Object.getPrototypeOf(e)===Object.prototype}function We(){for(var r=arguments[0],e=1,o=arguments.length;o>e;e++){var t=arguments[e];for(var n in t)t.hasOwnProperty(n)&&(r[n]=t[n])}return r}function le(n,e,t){return n?!U(e,t):e!==t}function tn(n,t){for(var e=0;e<t.length;e++)_(n,t[e],n[t[e]])}function _(e,t,n){Object.defineProperty(e,t,{enumerable:!1,writable:!0,configurable:!0,value:n})}function $(e,t,n){Object.defineProperty(e,t,{enumerable:!1,writable:!1,configurable:!1,value:n})}function Be(t,n){var e=Object.getOwnPropertyDescriptor(t,n);return!e||e.configurable!==!1&&e.writable!==!1}function Qe(n,e){t(Be(n,e),"Cannot make property '"+e+"' observable, it is not configurable and writable in the target object")}function Xe(t){var e=[];for(var n in t)e.push(n);return e}function U(e,t){if(null===e&&null===t)return!0;if(void 0===e&&void 0===t)return!0;var o=Array.isArray(e)||z(e);if(o!==(Array.isArray(t)||z(t)))return!1;if(o){if(e.length!==t.length)return!1;for(var n=e.length-1;n>=0;n--)if(!U(e[n],t[n]))return!1;return!0}if("object"==typeof e&&"object"==typeof t){if(null===e||null===t)return!1;if(Xe(e).length!==Xe(t).length)return!1;for(var r in e){if(!(r in t))return!1;if(!U(e[r],t[r]))return!1}return!0}return e===t}function qe(n,r){if(!r||!r.length)return[n,[]];if(!n||!n.length)return[[],r];for(var a=[],s=[],e=0,o=0,f=n.length,c=!1,t=0,i=0,l=r.length,u=!1,p=!1;!p&&!c;){if(!u){if(f>e&&l>t&&n[e]===r[t]){if(e++,t++,e===f&&t===l)return[a,s];continue}o=e,i=t,u=!0}i+=1,o+=1,i>=l&&(p=!0),o>=f&&(c=!0),c||n[o]!==r[t]?p||r[i]!==n[e]||(s=s.concat(r.slice(t,i)),t=i+1,e++,u=!1):(a=a.concat(n.slice(e,o)),e=o+1,t++,u=!1)}return[a.concat(n.slice(e)),s.concat(r.slice(t))]}var ie=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)};Bt(),exports.extras={allowStateChanges:Ue,getAtom:d,getDebugName:ve,getDependencyTree:Lt,getObserverTree:Ct,isComputingDerivation:pe,isSpyEnabled:r,resetGlobalState:Y,spyReport:k,spyReportEnd:c,spyReportStart:s,trackTransitions:zt},exports._={getAdministration:y,quickDiff:qe,resetGlobalState:Y},exports.autorun=ae,exports.when=ke,exports.autorunUntil=Zt,exports.autorunAsync=qt,exports.reaction=Xt;var gt=de(function(i,a,c,e,s){var r=s.get;t("function"==typeof r,"@computed can only be used on getter functions, like: '@computed get myProps() { return ...; }'");var o=!1;e&&1===e.length&&e[0].asStructure===!0&&(o=!0);var u=te(i,void 0,n.Recursive);Z(u,a,o?we(r):r,!1)},function(e){return this.$mobx.values[e].get()},ot,!1,!0);exports.computed=ce,exports.createTransformer=Nt,exports.expr=$t,exports.extendObservable=se,exports.intercept=kt,exports.isObservable=N;var xt=de(function(t,r,e){var o=Q(!0);"function"==typeof e&&(e=xe(e));var i=te(t,void 0,n.Recursive);Z(i,r,e,!0),G(o)},function(e){return this.$mobx.values[e].get()},function(e,t){Le(this,e,t)},!0,!1);exports.observable=H;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={})),exports.observe=yt,exports.toJS=x,exports.toJSON=en,exports.whyRun=Qt;var _t=de(function(r,t,n,e,a){var o=e&&1===e.length?e[0]:n.name||t||"<unnamed action>",i=me(o,n);_(r,t,i)},function(e){return this[e]},function(){t(!1,"It is not allowed to assign new values to @action fields")},!1,!0);exports.action=me,exports.isAction=_e,exports.runInAction=Ft,exports.useStrict=Tt;var I=function(){function n(e,t,n){void 0===e&&(e="Atom@"+i()),void 0===t&&(t=lt),void 0===n&&(n=lt),this.name=e,this.onBecomeObserved=t,this.onBecomeUnobserved=n,this.isDirty=!1,this.staleObservers=[],this.observers=[]}return n.prototype.reportObserved=function(){De(this)},n.prototype.reportChanged=function(){this.isDirty||(this.reportStale(),this.reportReady())},n.prototype.reportStale=function(){this.isDirty||(this.isDirty=!0,Ve(this))},n.prototype.reportReady=function(){t(this.isDirty,"atom not dirty"),e.inTransaction>0?e.changedAtoms.push(this):(Ne(this),oe())},n.prototype.toString=function(){return this.name},n}();exports.Atom=I;var f=function(){function n(e,t,n,r){this.derivation=e,this.scope=t,this.compareStructural=n,this.isLazy=!0,this.isComputing=!1,this.staleObservers=[],this.observers=[],this.observing=[],this.dependencyChangeCount=0,this.dependencyStaleCount=0,this.value=void 0,this.name=r||"ComputedValue@"+i()}return n.prototype.peek=function(){this.isComputing=!0;var e=Q(!1),t=this.derivation.call(this.scope);return G(e),this.isComputing=!1,t},n.prototype.onBecomeObserved=function(){},n.prototype.onBecomeUnobserved=function(){for(var e=0,t=this.observing.length;t>e;e++)ee(this.observing[e],this);this.observing=[],this.isLazy=!0,this.value=void 0},n.prototype.onDependenciesReady=function(){var e=this.trackAndCompute();return e},n.prototype.get=function(){if(t(!this.isComputing,"Cycle detected in computation "+this.name,this.derivation),De(this),this.dependencyStaleCount>0)return this.peek();if(this.isLazy){if(!pe())return this.peek();this.isLazy=!1,this.trackAndCompute()}return this.value},n.prototype.set=function(e){throw new Error("[ComputedValue '"+name+"'] It is not possible to assign a new value to a computed value.")},n.prototype.trackAndCompute=function(){r()&&k({object:this,type:"compute",fn:this.derivation,target:this.scope});var e=this.value,t=this.value=$e(this,this.peek);return le(this.compareStructural,t,e)},n.prototype.observe=function(n,r){var o=this,e=!0,t=void 0;return ae(function(){var i=o.get();if(!e||r){var a=C();n(i,t),j(a)}e=!1,t=i})},n.prototype.toJSON=function(){return this.get()},n.prototype.toString=function(){return this.name+"["+this.derivation.toString()+"]"},n.prototype.whyRun=function(){var n=e.derivationStack.length>0,i=P(this.observing).map(function(e){return e.name}),r=P(this.observers).map(function(e){return e.name}),t=this.isComputing?n?this.observers.length>0?u.INVALIDATED:u.REQUIRED:u.PEEK:u.NOT_RUNNING;if(t===u.REQUIRED){var o=e.derivationStack[e.derivationStack.length-2];o&&r.push(o.name)}return"\nWhyRun? computation '"+this.name+"':\n * Running because: "+Ot[t]+" "+(t===u.NOT_RUNNING&&this.dependencyStaleCount>0?"(a next run is scheduled)":"")+"\n"+(this.isLazy?" * This computation is suspended (not in use by any reaction) and won't run automatically.\n Didn't expect this computation to be suspended at this point?\n 1. Make sure this computation is used by a reaction (reaction, autorun, observer).\n 2. Check whether you are using this computation synchronously (in the same stack as they reaction that needs it).\n":" * This computation will re-run if any of the following observables changes:\n "+be(i)+"\n "+(this.isComputing&&n?" (... or any observable accessed during the remainder of the current run)":"")+"\n Missing items in this list?\n 1. Check whether all used values are properly marked as observable (use isObservable to verify)\n 2. Make sure you didn't dereference values too early. MobX observes props, not primitives. E.g: use 'person.name' instead of 'name' in your computation.\n * If the outcome of this computation changes, the following observers will be re-run:\n "+be(r)+"\n")},n}(),u;!function(e){e[e.PEEK=0]="PEEK",e[e.INVALIDATED=1]="INVALIDATED",e[e.REQUIRED=2]="REQUIRED",e[e.NOT_RUNNING=3]="NOT_RUNNING"}(u||(u={}));var Ot=(O={},O[u.PEEK]="[peek] The value of this computed value was requested outside an reaction",O[u.INVALIDATED]="[invalidated] Some observables used by this computation did change",O[u.REQUIRED]="[started] This computation is required by another computed value / reaction",O[u.NOT_RUNNING]="[idle] This compution is currently not running",O);exports.untracked=Te;var At=["mobxGuid","resetId","spyListeners","strictMode"],Ye=function(){function e(){this.version=2,this.derivationStack=[],this.mobxGuid=0,this.inTransaction=0,this.isTracking=!1,this.isRunningReactions=!1,this.changedAtoms=[],this.pendingReactions=[],this.allowStateChanges=!0,this.strictMode=!1,this.resetId=0,this.spyListeners=[]}return e}(),e=function(){var e=new Ye;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}(),v=function(){function t(e,t){void 0===e&&(e="Reaction@"+i()),this.name=e,this.onInvalidate=t,this.staleObservers=D,this.observers=D,this.observing=[],this.dependencyChangeCount=0,this.dependencyStaleCount=0,this.isDisposed=!1,this._isScheduled=!1,this._isTrackPending=!1,this._isRunning=!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),oe())},t.prototype.isScheduled=function(){return this.dependencyStaleCount>0||this._isScheduled},t.prototype.runReaction=function(){this.isDisposed||(this._isScheduled=!1,this._isTrackPending=!0,this.onInvalidate(),this._isTrackPending&&r()&&k({object:this,type:"scheduled-reaction"}))},t.prototype.track=function(e){var t,n=r();n&&(t=Date.now(),s({object:this,type:"reaction",fn:e})),this._isRunning=!0,$e(this,e),this._isRunning=!1,this._isTrackPending=!1,n&&c({time:Date.now()-t})},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++)ee(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.prototype.whyRun=function(){var e=P(this.observing).map(function(e){return e.name});return"\nWhyRun? reaction '"+this.name+"':\n * Status: ["+(this.isDisposed?"stopped":this._isRunning?"running":this.isScheduled()?"scheduled":"idle")+"]\n * This reaction will re-run if any of the following observables changes:\n "+be(e)+"\n "+(this._isRunning?" (... or any observable accessed during the remainder of the current run)":"")+"\n Missing items in this list?\n 1. Check whether all used values are properly marked as observable (use isObservable to verify)\n 2. Make sure you didn't dereference values too early. MobX observes props, not primitives. E.g: use 'person.name' instead of 'name' in your computation.\n"},t}();exports.Reaction=v;var Et=100,W=!1,tt={spyReportEnd:!0};exports.spy=Ce,exports.transaction=L;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={})),exports.asReference=xe,exports.asStructure=we,exports.asFlat=Re;var ue=function(){function e(e){
this.value=e,p(e,"Modifiers are not allowed to be nested")}return e}(),M=function(){function e(e){this.value=e,p(e,"Modifiers are not allowed to be nested")}return e}(),ge=function(){function e(e){this.value=e,p(e,"Modifiers are not allowed to be nested")}return e}();exports.asMap=ft;var Mt=function(){var e=!1,t={};return Object.defineProperty(t,"0",{set:function(){e=!0}}),Object.create(t)[0]=1,e===!1}(),ye=0,rt=function(){function e(){}return e}();rt.prototype=[];var Ut=function(){function e(e,t,n,r){this.mode=t,this.array=n,this.owned=r,this.lastKnownLength=0,this.interceptors=null,this.changeListeners=null,this.atom=new I(e||"ObservableArray@"+i())}return e.prototype.makeReactiveArrayItem=function(e){return p(e,"Array values cannot have modifiers"),this.mode===n.Flat||this.mode===n.Reference?e:J(e,this.mode,this.atom.name+"[..]")},e.prototype.intercept=function(e){return K(this,e)},e.prototype.observe=function(t,e){return void 0===e&&(e=!1),e&&t({object:this.array,type:"splice",index:0,added:this.values.slice(),addedCount:this.values.length,removed:[],removedCount:0}),X(this,t)},e.prototype.getArrayLength=function(){return this.atom.reportObserved(),this.values.length},e.prototype.setArrayLength=function(e){if("number"!=typeof e||0>e)throw new Error("[mobx.array] Out of range: "+e);var t=this.values.length;e!==t&&(e>t?this.spliceWithArray(t,0,new Array(e-t)):this.spliceWithArray(e,t-e))},e.prototype.updateArrayLength=function(t,e){if(t!==this.lastKnownLength)throw new Error("[mobx] Modification exception: the internal structure of an observable array was changed. Did you use peek() to change it?");this.lastKnownLength+=e,e>0&&t+e+1>ye&&Ie(t+e+1)},e.prototype.spliceWithArray=function(e,n,t){fe();var r=this.values.length;if(void 0===e?e=0:e>r?e=r:0>e&&(e=Math.max(0,r+e)),n=1===arguments.length?r-e:void 0===n||null===n?0:Math.max(0,Math.min(n,r-e)),void 0===t&&(t=[]),R(this)){var o=w(this,{object:this.array,type:"splice",index:e,removedCount:n,added:t});if(!o)return D;n=o.removedCount,t=o.added}t=t.map(this.makeReactiveArrayItem,this);var s=t.length-n;this.updateArrayLength(r,s);var i=(a=this.values).splice.apply(a,[e,n].concat(t));return(0!==n||0!==t.length)&&this.notifyArraySplice(e,t,i),i;var a},e.prototype.notifyArrayChildUpdate=function(o,i,a){var e=!this.owned&&r(),t=b(this),n=t||e?{object:this.array,type:"update",index:o,newValue:i,oldValue:a}:null;e&&s(n),this.atom.reportChanged(),t&&m(this,n),e&&c()},e.prototype.notifyArraySplice=function(a,t,n){var e=!this.owned&&r(),o=b(this),i=o||e?{object:this.array,type:"splice",index:a,removed:n,added:t,removedCount:n.length,addedCount:t.length}:null;e&&s(i),this.atom.reportChanged(),o&&m(this,i),e&&c()},e}(),l=function(t){function e(n,o,i,r){void 0===r&&(r=!1),t.call(this);var e=new Ut(i,o,this,r);$(this,"$mobx",e),n&&n.length?(e.updateArrayLength(0,n.length),e.values=n.map(e.makeReactiveArrayItem,e),e.notifyArraySplice(0,e.values.slice(),D)):e.values=[],Mt&&Object.defineProperty(e.array,"0",Jt)}return ie(e,t),e.prototype.intercept=function(e){return this.$mobx.intercept(e)},e.prototype.observe=function(t,e){return void 0===e&&(e=!1),this.$mobx.observe(t,e)},e.prototype.clear=function(){return this.splice(0)},e.prototype.replace=function(e){return this.$mobx.spliceWithArray(0,this.$mobx.values.length,e)},e.prototype.toJS=function(){return this.slice()},e.prototype.toJSON=function(){return this.toJS()},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]},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 this.$mobx.spliceWithArray(t);case 2:return this.$mobx.spliceWithArray(t,n)}return this.$mobx.spliceWithArray(t,n,r)},e.prototype.push=function(){for(var n=[],e=0;e<arguments.length;e++)n[e-0]=arguments[e];var t=this.$mobx;return t.spliceWithArray(t.values.length,0,n),t.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];var n=this.$mobx;return n.spliceWithArray(0,0,t),n.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}(rt);ze(l.prototype,function(){return F(this.slice())}),tn(l.prototype,["constructor","observe","clear","replace","toJSON","peek","find","splice","push","pop","shift","unshift","reverse","sort","remove","toString","toLocaleString"]),Object.defineProperty(l.prototype,"length",{enumerable:!1,configurable:!0,get:function(){return this.$mobx.getArrayLength()},set:function(e){this.$mobx.setArrayLength(e)}}),["concat","every","filter","forEach","indexOf","join","lastIndexOf","map","reduce","reduceRight","slice","some"].forEach(function(e){var t=Array.prototype[e];_(l.prototype,e,function(){return this.$mobx.atom.reportObserved(),t.apply(this.$mobx.values,arguments)})});var Jt={configurable:!0,enumerable:!1,set:Oe(0),get:Ae(0)};Ie(1e3),exports.fastArray=vt,exports.isObservableArray=z;var Gt={},S=function(){function e(e,r){var t=this;this.$mobx=Gt,this._data={},this._hasMap={},this.name="ObservableMap@"+i(),this._keys=new l(null,n.Reference,this.name+".keys()",!0),this.interceptors=null,this.changeListeners=null,this._valueMode=Ht(r),this._valueMode===n.Flat&&(this._valueMode=n.Reference),Ue(!0,function(){g(e)?t.merge(e):Array.isArray(e)&&e.forEach(function(e){var n=e[0],r=e[1];return t.set(n,r)})})}return e.prototype._has=function(e){return"undefined"!=typeof this._data[e]},e.prototype.has=function(e){return this.isValidKey(e)?(e=""+e,this._hasMap[e]?this._hasMap[e].get():this._updateHasMapEntry(e,!1).get()):!1},e.prototype.set=function(e,t){this.assertValidKey(e),e=""+e;var n=this._has(e);if(p(t,"[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"),R(this)){var r=w(this,{type:n?"update":"add",object:this,newValue:t,name:e});if(!r)return;t=r.newValue}n?this._updateValue(e,t):this._addValue(e,t)},e.prototype.delete=function(e){var t=this;if(this.assertValidKey(e),e=""+e,R(this)){var n=w(this,{type:"delete",object:this,name:e});if(!n)return}if(this._has(e)){var o=r(),i=b(this),n=i||o?{type:"delete",object:this,oldValue:this._data[e].value,name:e}:null;o&&s(n),L(function(){t._keys.remove(e),t._updateHasMapEntry(e,!1);var n=t._data[e];n.setNewValue(void 0),t._data[e]=void 0},void 0,!1),i&&m(this,n),o&&c()}},e.prototype._updateHasMapEntry=function(t,r){var e=this._hasMap[t];return e?e.setNewValue(r):e=this._hasMap[t]=new A(r,n.Reference,this.name+"."+t+"?",!1),e},e.prototype._updateValue=function(o,e){var t=this._data[o];if(e=t.prepareNewValue(e),e!==E){var n=r(),i=b(this),a=i||n?{type:"update",object:this,oldValue:t.value,name:o,newValue:e}:null;n&&s(a),t.setNewValue(e),i&&m(this,a),n&&c()}},e.prototype._addValue=function(e,n){var t=this;L(function(){var r=t._data[e]=new A(n,t._valueMode,t.name+"."+e,!1);n=r.value,t._updateHasMapEntry(e,!0),t._keys.push(e)},void 0,!1);var o=r(),i=b(this),a=i||o?{type:"add",object:this,name:e,newValue:n}:null;o&&s(a),i&&m(this,a),o&&c()},e.prototype.get=function(e){return e=""+e,this.has(e)?this._data[e].get():void 0},e.prototype.keys=function(){return F(this._keys.slice())},e.prototype.values=function(){return F(this._keys.map(this.get,this))},e.prototype.entries=function(){var e=this;return F(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 L(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])})},void 0,!1),this},e.prototype.clear=function(){var e=this;L(function(){Te(function(){e.keys().forEach(e.delete,e)})},void 0,!1)},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.toJs=function(){return a("toJs is deprecated, use toJS instead"),this.toJS()},e.prototype.toJSON=function(){return this.toJS()},e.prototype.isValidKey=function(e){return null===e||void 0===e?!1:"string"!=typeof e&&"number"!=typeof e&&"boolean"!=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 this.name+"[{ "+this.keys().map(function(t){return t+": "+e.get(t)}).join(", ")+" }]"},e.prototype.observe=function(e,n){return t(n!==!0,"`observe` doesn't support the fire immediately property for observable maps."),X(this,e)},e.prototype.intercept=function(e){return K(this,e)},e}();exports.ObservableMap=S,ze(S.prototype,function(){return this.entries()}),exports.map=Ee,exports.isObservableMap=q;var it=function(){function e(e,t,n){this.target=e,this.name=t,this.mode=n,this.values={},this.changeListeners=null,this.interceptors=null}return e.prototype.observe=function(e,n){return t(n!==!0,"`observe` doesn't support the fire immediately property for observable objects."),X(this,e)},e.prototype.intercept=function(e){return K(this,e)},e}(),at={},st={};exports.isObservableObject=h;var E={},A=function(t){function e(s,u,e,o){void 0===e&&(e="ObservableValue@"+i()),void 0===o&&(o=!0),t.call(this,e),this.mode=u,this.hasUnreportedChange=!1,this.value=void 0;var a=T(s,n.Recursive),c=a[0],l=a[1];this.mode===n.Recursive&&(this.mode=c),this.value=J(l,this.mode,this.name),o&&r()&&k({type:"create",object:this,newValue:this.value})}return ie(e,t),e.prototype.set=function(e){var n=this.value;if(e=this.prepareNewValue(e),e!==E){var t=r();t&&s({type:"update",object:this,newValue:e,oldValue:n}),this.setNewValue(e),t&&c()}},e.prototype.prepareNewValue=function(e){if(p(e,"Modifiers cannot be used on non-initial values."),fe(),R(this)){var t=w(this,{object:this,type:"update",newValue:e});if(!t)return E;e=t.newValue}var r=le(this.mode===n.Structure,this.value,e);return r?J(e,this.mode,this.name):E},e.prototype.setNewValue=function(e){var t=this.value;this.value=e,this.reportChanged(),b(this)&&m(this,[e,t])},e.prototype.get=function(){return this.reportObserved(),this.value},e.prototype.intercept=function(e){return K(this,e)},e.prototype.observe=function(e,t){return t&&e(this.value,void 0),X(this,e)},e.prototype.toJSON=function(){return this.get()},e.prototype.toString=function(){return this.name+"["+this.value+"]"},e}(I),ut="__$$iterating",Yt=function(){function e(){this.listeners=[],a("extras.SimpleEventEmitter is deprecated and will be removed in the next major release")}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),B(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=Yt;var D=[];Object.freeze(D);var ct=[],lt=function(){},O;
"use strict";function ce(n,a,u){var i,e,r;"string"==typeof n?(i=n,e=a,r=u):"function"==typeof n&&(i=n.name||"Autorun@"+o(),e=n,r=a),f(e,"autorun methods cannot have modifiers"),t("function"==typeof e,"autorun expects a function"),t(0===e.length,"autorun expects a function without arguments"),r&&(e=e.bind(r));var s=new p(i,function(){this.track(e)});return s.schedule(),s.getDisposer()}function Ce(e,s,u,l){var r,i,a,t;"string"==typeof e?(r=e,i=s,a=u,t=l):"function"==typeof e&&(r="When@"+o(),i=e,a=s,t=u);var c=!1,n=ce(r,function(){if(i.call(t)){n?n():c=!0;var e=A();a.call(t),O(e)}});return c&&n(),n}function on(e,t,n){return a("`autorunUntil` is deprecated, please use `when`."),Ce.apply(null,arguments)}function nn(e,u,c,l){var a,t,n,r;"string"==typeof e?(a=e,t=u,n=c,r=l):"function"==typeof e&&(a=e.name||"AutorunAsync@"+o(),t=e,n=u,r=c),void 0===n&&(n=1),r&&(t=t.bind(r));var s=!1,i=new p(a,function(){s||(s=!0,setTimeout(function(){s=!1,i.isDisposed||i.track(t)},n))});return i.schedule(),i.getDisposer()}function en(a,h,x,g,b,_){function m(){if(!l.isDisposed){var e=!1;l.track(function(){var t=v();e=he(w,s,t),s=t}),u&&r&&t(s),u||e!==!0||t(s),u&&(u=!1)}}var c,f,t,r,e,i;"string"==typeof a?(c=a,f=h,t=x,r=g,e=b,i=_):(c=a.name||h.name||"Reaction@"+o(),f=a,t=h,r=x,e=g,i=b),void 0===r&&(r=!1),void 0===e&&(e=0);var y=T(f,n.Reference),R=y[0],v=y[1],w=R===n.Structure;i&&(v=v.bind(i),t=me(c,t.bind(i)));var u=!0,d=!1,s=void 0,l=new p(c,function(){1>e?m():d||(d=!0,setTimeout(function(){d=!1,m()},e))});return l.schedule(),l.getDisposer()}function se(e,n,r,i){return arguments.length<3&&"function"==typeof e?Zt(e,n):(t(!r||!r.set,"@observable properties cannot have a setter: "+n),wt.apply(null,arguments))}function Zt(r,i){var e=T(r,n.Recursive),o=e[0],t=e[1];return new m(t,i,o===n.Structure,t.name)}function Ne(){throw new Error("[ComputedValue] It is not allowed to assign new values to computed properties.")}function Kt(n,i){t("function"==typeof n&&1===n.length,"createTransformer expects a function that accepts one argument");var r={},o=e.resetId,a=function(e){function t(t,r){e.call(this,function(){return n(r)},null,!1,"Transformer-"+n.name+"-"+t),this.sourceIdentifier=t,this.sourceObject=r}return re(t,e),t.prototype.onBecomeUnobserved=function(){var t=this.value;e.prototype.onBecomeUnobserved.call(this),delete r[this.sourceIdentifier],i&&i(t,this.sourceObject)},t}(m);return function(i){o!==e.resetId&&(r={},o=e.resetId);var n=Jt(i),t=r[n];return t?t.get():(t=r[n]=new a(n,i),t.get())}}function Jt(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=o(),x(e,"$transformId",t)),t}function Ut(e,t){return le()||console.warn("[mobx.expr] 'expr' should only be used inside other reactive functions."),se(e,t).get()}function ae(e){for(var i=[],r=1;r<arguments.length;r++)i[r-1]=arguments[r];return t(arguments.length>=2,"extendObservable expected 2 or more arguments"),t("object"==typeof e,"extendObservable expects an object as first argument"),t(!(e instanceof S),"extendObservable should not be used on maps, use map.merge instead"),i.forEach(function(r){t("object"==typeof r,"all arguments of extendObservable should be objects"),Fe(e,r,n.Recursive,null)}),e}function Fe(e,t,r,i){var o=te(e,i,r);for(var n in t)if(t.hasOwnProperty(n)){if(e===t&&!lt(e,n))continue;qt(o,n,t[n])}return e}function Mt(e,t){return Ge(d(e,t))}function Ge(e){var t={name:e.name};return e.observing&&e.observing.length>0&&(t.dependencies=V(e.observing).map(Ge)),t}function $t(e,t){return Qe(d(e,t))}function Qe(e){var t={name:e.name};return e.observers&&!e.observers.isEmpty()&&(t.observers=V(e.observers.asArray()).map(Qe)),t}function Vt(e,t,n){return"function"==typeof n?et(e,t,n):At(e,t)}function At(e,t){return g(e)&&!y(e)?(a("Passing plain objects to intercept / observe is deprecated and will be removed in 3.0"),b(xe(e)).intercept(t)):b(e).intercept(t)}function et(e,t,n){return g(e)&&!y(e)?(a("Passing plain objects to intercept / observe is deprecated and will be removed in 3.0"),ae(e,{property:e[t]}),et(e,t,n)):b(e,t).intercept(n)}function H(e,t){if(null===e||void 0===e)return!1;if(void 0!==t){if(e instanceof S||e instanceof l)throw new Error("[mobx.isObservable] isObservable(object, propertyName) is not supported for arrays and maps. Use map.has or array.length instead.");if(y(e)){var n=e.$mobx;return n.values&&!!n.values[t]}return!1}return!!e.$mobx||e instanceof j||e instanceof p||e instanceof m}function kt(r,e,n){return t(arguments.length>=2&&arguments.length<=3,"Illegal decorator config",e),_e(r,e),t(!n||!n.get,"@observable can not be used on getters, use @computed instead"),_t.apply(null,arguments)}function xe(e,u){if(void 0===e&&(e=void 0),"string"==typeof arguments[1])return kt.apply(null,arguments);if(t(arguments.length<3,"observable expects zero, one or two arguments"),H(e))return e;var s=T(e,n.Recursive),r=s[0],o=s[1],c=r===n.Reference?i.Reference:Rt(o);switch(c){case i.Array:case i.PlainObject:return J(o,r);case i.Reference:case i.ComplexObject:return new E(o,r);case i.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 i.ViewFunction:return a("Use `computed(expr)` instead of `observable(expr)`"),se(e,u)}t(!1,"Illegal State")}function Rt(e){return null===e||void 0===e?i.Reference:"function"==typeof e?e.length?i.ComplexFunction:i.ViewFunction:Array.isArray(e)||e instanceof l?i.Array:"object"==typeof e?g(e)?i.PlainObject:i.ComplexObject:i.Reference}function xt(t,n,e,r){return"function"==typeof e?ft(t,n,e,r):mt(t,n,e)}function mt(e,t,n){return g(e)&&!y(e)?(a("Passing plain objects to intercept / observe is deprecated and will be removed in 3.0"),b(xe(e)).observe(t,n)):b(e).observe(t,n)}function ft(e,t,n,r){return g(e)&&!y(e)?(a("Passing plain objects to intercept / observe is deprecated and will be removed in 3.0"),ae(e,{property:e[t]}),ft(e,t,n,r)):b(e,t).observe(n,r)}function w(e,n,t){function o(r){return n&&t.push([e,r]),r}if(void 0===n&&(n=!0),void 0===t&&(t=null),e instanceof Date||e instanceof RegExp)return e;if(n&&null===t&&(t=[]),n&&null!==e&&"object"==typeof e)for(var r=0,s=t.length;s>r;r++)if(t[r][0]===e)return t[r][1];if(!e)return e;if(Array.isArray(e)||e instanceof l){var i=o([]),a=e.map(function(e){return w(e,n,t)});i.length=a.length;for(var r=0,s=a.length;s>r;r++)i[r]=a[r];return i}if(e instanceof S){var u=o({});return e.forEach(function(e,r){return u[r]=w(e,n,t)}),u}if(H(e)&&e.$mobx instanceof E)return w(e(),n,t);if(e instanceof E)return w(e.get(),n,t);if("object"==typeof e){var i=o({});for(var c in e)i[c]=w(e[c],n,t);return i}return e}function ht(n,e,t){return void 0===e&&(e=!0),void 0===t&&(t=null),a("toJSON is deprecated. Use toJS instead"),w.apply(null,arguments)}function pe(e){return console.log(e),e}function dt(n,r){switch(arguments.length){case 0:if(n=e.derivationStack[e.derivationStack.length-1],!n)return pe("whyRun() can only be used if a derivation is active, or by passing an computed value / reaction explicitly. If you invoked whyRun from inside a computation; the computation is currently suspended but re-evaluating because somebody requested it's value.");break;case 2:n=d(n,r)}return n=d(n),n instanceof m?pe(n.whyRun()):n instanceof p?pe(n.whyRun()):void t(!1,"whyRun can only be used on reactions and computed values")}function me(e,t,n,r){return 1===arguments.length&&"function"==typeof e?Y(e.name||"<unnamed action>",e):2===arguments.length&&"function"==typeof t?Y(e,t):1===arguments.length&&"string"==typeof e?ut(e):ut(t).apply(null,arguments)}function ut(e){return function(n,r,t){return t&&"function"==typeof t.value?(t.value=Y(e,t.value),t.enumerable=!1,t):St(e).apply(this,arguments)}}function st(e){return"function"==typeof e&&e.isMobxAction===!0}function vt(e,i,o){var n="string"==typeof e?e:e.name||"<unnamed action>",r="function"==typeof e?e:i,a="function"==typeof e?i:o;return t("function"==typeof r,"`runInAction` expects a function"),t(0===r.length,"`runInAction` expects a function without arguments"),t("string"==typeof n&&n.length>0,"actions should have valid names, got: '"+n+"'"),ot(n,r,a,void 0)}function Y(e,n){t("function"==typeof n,"`action` can only be invoked on functions"),t("string"==typeof e&&e.length>0,"actions should have valid names, got: '"+e+"'");var r=function(){return ot(e,n,this,arguments)};return r.isMobxAction=!0,r}function ot(p,f,o,n){var d=e.derivationStack;t(!(d[d.length-1]instanceof m),"Computed values or transformers should not invoke actions or trigger other side effects");var l,s=r();if(s){l=Date.now();var a=n&&n.length||0,h=new Array(a);if(a>0)for(var i=0;a>i;i++)h[i]=n[i];c({type:"action",name:p,fn:f,target:o,arguments:h})}var v=A();ke(p,o,!1);var y=P(!0);try{return f.apply(o,n)}finally{M(y),Re(!1),O(v),s&&u({time:Date.now()-l})}}function yt(n){t(0===e.derivationStack.length,"It is not allowed to set `useStrict` when a derivation is running"),e.strictMode=n,e.allowStateChanges=!n}function rt(e,t){var n=P(e),r=t();return M(n),r}function P(t){var n=e.allowStateChanges;return e.allowStateChanges=t,n}function M(t){e.allowStateChanges=t}function nt(e){t(e.isDirty,"atom not dirty"),e.isDirty=!1,ie(e,!0)}function le(){return e.derivationStack.length>0&&e.isTracking}function fe(){e.allowStateChanges||t(!1,e.strictMode?"It is not allowed to create or change state outside an `action` when MobX is in strict mode. Wrap the current method in `action` if this state change is intended":"It is not allowed to change the state when a computed value or transformer is being evaluated. Use 'autorun' to create reactive functions with side-effects.")}function Ot(e){1===++e.dependencyStaleCount&&Te(e)}function Dt(e,n){if(t(e.dependencyStaleCount>0,"unexpected ready notification"),n&&(e.dependencyChangeCount+=1),0===--e.dependencyStaleCount)if(e.dependencyChangeCount>0){e.dependencyChangeCount=0;var r=e.onDependenciesReady();ie(e,r)}else ie(e,!1)}function Xe(t,s){var n=t.observing;t.observing=new Array(n.length+100),t.l=0,t.runId=++jt,e.derivationStack.push(t);var u=e.isTracking;e.isTracking=!0;var i,o=!0;try{i=s.call(t),o=!1}finally{if(o){var a="[mobx] An uncaught exception occurred while calculating your computed value, autorun or transformer. Or inside the render() method of an observer based React component. These functions should never throw exceptions as MobX will not always be able to recover from them. "+("Please fix the error reported after this message or enable 'Pause on (caught) exceptions' in your debugger to find the root cause. In: '"+t.name+"'");r()&&_({type:"error",object:this,message:a}),console.warn(a),t.l=0,t.observing=n,Z()}else e.isTracking=u,e.derivationStack.length-=1,Lt(t,n)}return i}function Lt(n,r){for(var i=r.length,o=n.observing,a=o.length=n.l,e=0;i>e;e++)r[e].diffValue--;for(var e=0;a>e;e++){var t=o[e];++t.diffValue>0&&(t.diffValue=0,Xt(t,n))}for(var e=0;i>e;e++){var t=r[e];t.diffValue<0&&(t.diffValue=0,Pe(t,n))}}function Be(e){e.observing.forEach(function(t){return Pe(t,e)}),e.observing.length=0,e.l=0}function Ke(e){var t=A(),n=e();return O(t),n}function A(){var t=e.isTracking;return e.isTracking=!1,t}function O(t){e.isTracking=t}function sn(){}function Z(){e.resetId++;var n=new Ze;for(var t in n)-1===Et.indexOf(t)&&(e[t]=n[t]);e.allowStateChanges=!e.strictMode}function Xt(e,t){var n=e.observers.isEmpty();e.observers.add(t),n&&e.onBecomeObserved()}function Pe(e,t){e.observers.remove(t),e.observers.isEmpty()&&e.onBecomeUnobserved()}function ze(n){if(e.isTracking!==!1){var t=e.derivationStack[e.derivationStack.length-1];t.runId!==n.laRunId&&(n.laRunId=t.runId,t.observing[t.l++]=n)}}function Te(e){var t=e.observers.asArray();t.forEach(Ot),e.staleObservers=e.staleObservers.concat(t)}function ie(e,t){e.staleObservers.splice(0).forEach(function(e){return Dt(e,t)})}function oe(){if(!(e.isRunningReactions===!0||e.inTransaction>0)){e.isRunningReactions=!0;for(var t=e.pendingReactions,i=0;t.length>0;){if(++i===Tt)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,o=r.length;o>n;n++)r[n].runReaction()}e.isRunningReactions=!1}}function r(){return F}function _(r){if(!F)return!1;for(var n=e.spyListeners,t=0,i=n.length;i>t;t++)n[t](r)}function c(e){var t=ct({},e,{spyReportStart:!0});_(t)}function u(e){_(e?ct({},e,We):We)}function Ie(t){return e.spyListeners.push(t),F=e.spyListeners.length>0,W(function(){var n=e.spyListeners.indexOf(t);-1!==n&&e.spyListeners.splice(n,1),F=e.spyListeners.length>0})}function tn(e){return a("trackTransitions is deprecated. Use mobx.spy instead"),"boolean"==typeof e&&(a("trackTransitions only takes a single callback function. If you are using the mobx-react-devtools, please update them first"),e=arguments[1]),e?Ie(e):(a("trackTransitions without callback has been deprecated and is a no-op now. If you are using the mobx-react-devtools, please update them first"),function(){})}function L(n,e,t){void 0===e&&(e=void 0),void 0===t&&(t=!0),ke(n.name||"anonymous transaction",e,t);var r=n.call(e);return Re(t),r}function ke(i,t,n){void 0===t&&(t=void 0),void 0===n&&(n=!0),e.inTransaction+=1,n&&r()&&c({type:"transaction",target:t,name:i})}function Re(t){if(void 0===t&&(t=!0),0===--e.inTransaction){for(var i=e.changedAtoms.splice(0),n=0,o=i.length;o>n;n++)nt(i[n]);oe()}t&&r()&&u()}function R(e){return e.interceptors&&e.interceptors.length>0}function B(t,n){var e=t.interceptors||(t.interceptors=[]);return e.push(n),W(function(){var t=e.indexOf(n);-1!==t&&e.splice(t,1)})}function k(i,e){for(var o=A(),r=i.interceptors,n=0,a=r.length;a>n;n++)if(e=r[n](e),t(!e||e.type,"Intercept handlers should return nothing or a change object"),!e)return null;return O(o),e}function h(e){return e.changeListeners&&e.changeListeners.length>0}function q(t,n){var e=t.changeListeners||(t.changeListeners=[]);return e.push(n),W(function(){var t=e.indexOf(n);-1!==t&&e.splice(t,1)})}function v(r,n){var i=A(),e=r.changeListeners;if(e){e=e.slice();for(var t=0,o=e.length;o>t;t++)Array.isArray(n)?e[t].apply(null,n):e[t](n);O(i)}}function we(e){return new ue(e)}function de(e){return new K(e)}function at(e){return new ne(e)}function gt(e,t){return $e(e,t)}function T(e,t){return e instanceof ue?[n.Reference,e.value]:e instanceof K?[n.Structure,e.value]:e instanceof ne?[n.Flat,e.value]:[t,e]}function an(e){return e===we?n.Reference:e===de?n.Structure:e===at?n.Flat:(t(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 J(e,a,o){var r;if(H(e))return e;switch(a){case n.Reference:return e;case n.Flat:f(e,"Items inside 'asFlat' cannot have modifiers"),r=n.Reference;break;case n.Structure:f(e,"Items inside 'asStructure' cannot have modifiers"),r=n.Structure;break;case n.Recursive:i=T(e,n.Recursive),r=i[0],e=i[1];break;default:t(!1,"Illegal State")}return Array.isArray(e)?De(e,r,o):g(e)&&Object.isExtensible(e)?Fe(e,e,r,o):e;var i}function f(e,t){if(e instanceof ue||e instanceof K||e instanceof ne)throw new Error("[mobx] asStructure / asReference / asFlat cannot be used here. "+t)}function Yt(e){var t=Ee(e),n=pt(e);Object.defineProperty(l.prototype,""+e,{enumerable:!1,configurable:!0,set:t,get:n})}function Ee(e){return function(t){var r=this.$mobx,i=r.values;if(f(t,"Modifiers cannot be used on array values. For non-reactive array values use makeReactive(asFlat(array))."),e<i.length){fe();var o=i[e];if(R(r)){var a=k(r,{type:"update",object:r.array,index:e,newValue:t});if(!a)return;t=a.newValue}t=r.makeReactiveArrayItem(t);var s=r.mode===n.Structure?!N(o,t):o!==t;s&&(i[e]=t,r.notifyArrayChildUpdate(e,t,o))}else{if(e!==i.length)throw new Error("[mobx.array] Index out of bounds, "+e+" is larger than "+i.length);r.spliceWithArray(e,0,[t])}}}function pt(e){return function(){var t=this.$mobx;return t&&e<t.values.length?(t.atom.reportObserved(),t.values[e]):void console.warn("[mobx.array] Attempt to read an array index ("+e+") that is out of bounds ("+t.values.length+"). Please check length first. Out of bound indices will not be tracked by MobX")}}function Ve(t){for(var e=be;t>e;e++)Yt(e);be=t}function De(e,t,n){return new l(e,t,n)}function Ht(e){return a("fastArray is deprecated. Please use `observable(asFlat([]))`"),De(e,n.Flat,null)}function z(e){return e instanceof l}function $e(e,t){return new S(e,t)}function Q(e){return e instanceof S}function te(e,t,r){if(void 0===r&&(r=n.Recursive),y(e))return e.$mobx;g(e)||(t=e.constructor.name+"@"+o()),t||(t="ObservableObject@"+o());var i=new Me(e,t,r);return D(e,"$mobx",i),i}function qt(e,t,n){e.values[t]?e.target[t]=n:ee(e,t,n,!0)}function ee(t,n,e,a){a&&_e(t.target,n);var r,i=t.name+"."+n,o=!0;if("function"!=typeof e||0!==e.length||st(e))if(e instanceof K&&"function"==typeof e.value&&0===e.value.length)r=new m(e.value,t.target,!0,i);else{if(o=!1,R(t)){var s=k(t,{object:t.target,name:n,type:"add",newValue:e});if(!s)return;e=s.newValue}r=new E(e,t.mode,i,!1),e=r.value}else r=new m(e,t.target,!1,i);t.values[n]=r,a&&Object.defineProperty(t.target,n,o?Nt(n):Gt(n)),o||Pt(t,t.target,n,e)}function Gt(e){var t=Le[e];return t?t:Le[e]={configurable:!0,enumerable:!0,get:function(){return this.$mobx.values[e].get()},set:function(t){Je(this,e,t)}}}function Nt(e){var t=je[e];return t?t:je[e]={configurable:!0,enumerable:!1,get:function(){return this.$mobx.values[e].get()},set:Ne}}function Je(i,o,e){var t=i.$mobx,a=t.values[o];if(R(t)){var n=k(t,{type:"update",object:i,name:o,newValue:e});if(!n)return;e=n.newValue}if(e=a.prepareNewValue(e),e!==$){var l=h(t),s=r(),n=v||h?{type:"update",object:i,oldValue:a.value,name:o,newValue:e}:null;s&&c(n),a.setNewValue(e),l&&v(t,n),s&&u()}}function Pt(t,o,a,s){var n=h(t),e=r(),i=n||e?{type:"add",object:o,name:a,newValue:s}:null;e&&c(i),n&&v(t,i),e&&u()}function y(e){return"object"==typeof e&&null!==e?(C(e),e.$mobx instanceof Me):!1}function d(e,n){if("object"==typeof e&&null!==e){if(z(e))return t(void 0===n,"It is not possible to get index atoms from arrays"),e.$mobx.atom;if(Q(e)){if(void 0===n)return d(e._keys);var r=e._data[n]||e._hasMap[n];return t(!!r,"the entry '"+n+"' does not exist in the observable map '"+ye(e)+"'"),r}if(C(e),y(e)){t(!!n,"please specify a property");var i=e.$mobx.values[n];return t(!!i,"no observable property '"+n+"' found on the observable object '"+ye(e)+"'"),i}if(e instanceof j||e instanceof m||e instanceof p)return e}else if("function"==typeof e&&e.$mobx instanceof p)return e.$mobx;t(!1,"Cannot obtain atom from "+e)}function b(e,n){return t(e,"Expection some object"),void 0!==n?b(d(e,n)):e instanceof j||e instanceof m||e instanceof p?e:Q(e)?e:(C(e),e.$mobx?e.$mobx:void t(!1,"Cannot obtain administration from "+e))}function ye(e,t){var n;return n=void 0!==t?d(e,t):y(e)||Q(e)?b(e):d(e),n.name}function ve(e,r,i,o,a){function n(u,n,s,c){if(t(a||Ye(arguments),"This function is a decorator, but it wasn't invoked like a decorator"),s){u.hasOwnProperty("__mobxLazyInitializers")||x(u,"__mobxLazyInitializers",u.__mobxLazyInitializers&&u.__mobxLazyInitializers.slice()||[]);var f=s.value,l=s.initializer;return u.__mobxLazyInitializers.push(function(t){e(t,n,l?l.call(t):f,c,s)}),{enumerable:o,configurable:!0,get:function(){return this.__mobxDidRunLazyInitializers!==!0&&C(this),r.call(this,n)},set:function(e){this.__mobxDidRunLazyInitializers!==!0&&C(this),i.call(this,n,e)}}}var p={enumerable:o,configurable:!0,get:function(){return this.__mobxInitializedProps&&this.__mobxInitializedProps[n]===!0||qe(this,n,void 0,e,c,s),r.call(this,n)},set:function(t){this.__mobxInitializedProps&&this.__mobxInitializedProps[n]===!0?i.call(this,n,t):qe(this,n,t,e,c,s)}};return arguments.length<3&&Object.defineProperty(u,n,s),p}return a?function(){if(Ye(arguments))return n.apply(null,arguments);var e=arguments;return function(t,r,i){return n(t,r,i,e)}}:n}function qe(e,t,n,r,i,o){e.hasOwnProperty("__mobxInitializedProps")||x(e,"__mobxInitializedProps",{}),e.__mobxInitializedProps[t]=!0,r(e,t,n,i,o)}function C(e){e.__mobxDidRunLazyInitializers!==!0&&e.__mobxLazyInitializers&&(x(e,"__mobxDidRunLazyInitializers",!0),e.__mobxDidRunLazyInitializers&&e.__mobxLazyInitializers.forEach(function(t){return t(e)}))}function Ye(e){return(2===e.length||3===e.length)&&"string"==typeof e[1]}function Ct(){return"function"==typeof Symbol&&Symbol.iterator||"@@iterator"}function U(e){t(e[Ae]!==!0,"Illegal state: cannot recycle array as iterator"),D(e,Ae,!0);var n=-1;return D(e,"next",function(){return n++,{done:n>=this.length,value:n<this.length?this[n]:void 0}}),e}function tt(e,t){D(e,Ct(),t)}function o(){return++e.mobxGuid}function t(t,n,e){if(!t)throw new Error("[mobx] Invariant failed: "+n+(e?" in '"+e+"'":""))}function a(e){-1===Oe.indexOf(e)&&(Oe.push(e),console.error("[mobx] Deprecated: "+e))}function W(t){var e=!1;return function(){return e?void 0:(e=!0,t.apply(this,arguments))}}function V(t){var e=[];return t.forEach(function(t){-1===e.indexOf(t)&&e.push(t)}),e}function ge(t,e,n){if(void 0===e&&(e=100),void 0===n&&(n=" - "),!t)return"";var r=t.slice(0,e);return""+r.join(n)+(t.length>e?" (... and "+(t.length-e)+"more)":"")}function g(e){return null!==e&&"object"==typeof e&&Object.getPrototypeOf(e)===Object.prototype}function ct(){for(var r=arguments[0],e=1,i=arguments.length;i>e;e++){var t=arguments[e];for(var n in t)t.hasOwnProperty(n)&&(r[n]=t[n])}return r}function he(n,e,t){return n?!N(e,t):e!==t}function zt(n,t){for(var e=0;e<t.length;e++)x(n,t[e],n[t[e]])}function x(e,t,n){Object.defineProperty(e,t,{enumerable:!1,writable:!0,configurable:!0,value:n})}function D(e,t,n){Object.defineProperty(e,t,{enumerable:!1,writable:!1,configurable:!1,value:n})}function lt(t,n){var e=Object.getOwnPropertyDescriptor(t,n);return!e||e.configurable!==!1&&e.writable!==!1}function _e(n,e){t(lt(n,e),"Cannot make property '"+e+"' observable, it is not configurable and writable in the target object")}function it(t){var e=[];for(var n in t)e.push(n);return e}function N(e,t){if(null===e&&null===t)return!0;if(void 0===e&&void 0===t)return!0;var i=Array.isArray(e)||z(e);if(i!==(Array.isArray(t)||z(t)))return!1;if(i){if(e.length!==t.length)return!1;for(var n=e.length-1;n>=0;n--)if(!N(e[n],t[n]))return!1;return!0}if("object"==typeof e&&"object"==typeof t){if(null===e||null===t)return!1;if(it(e).length!==it(t).length)return!1;for(var r in e){if(!(r in t))return!1;if(!N(e[r],t[r]))return!1}return!0}return e===t}function bt(e,t){return t&&t.length?e&&e.length?(t.forEach(function(e){return e.__diff=0}),e.forEach(function(e){return e.__diff=0}),t.forEach(function(e){return e.__diff-=1}),e.forEach(function(e){return e.__diff+=1}),[e.filter(function(e){return 1===e.__diff}),t.filter(function(e){return-1===e.__diff})]):[[],t]:[e,[]]}function un(n,r){if(!r||!r.length)return[n,[]];if(!n||!n.length)return[[],r];for(var a=[],s=[],e=0,i=0,p=n.length,c=!1,t=0,o=0,l=r.length,u=!1,f=!1;!f&&!c;){if(!u){if(p>e&&l>t&&n[e]===r[t]){if(e++,t++,e===p&&t===l)return[a,s];continue}i=e,o=t,u=!0}o+=1,i+=1,o>=l&&(f=!0),i>=p&&(c=!0),c||n[i]!==r[t]?f||r[o]!==n[e]||(s=s.concat(r.slice(t,o)),t=o+1,e++,u=!1):(a=a.concat(n.slice(e,i)),e=i+1,t++,u=!1)}return[a.concat(n.slice(e)),s.concat(r.slice(t))]}var re=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)};sn(),exports.extras={allowStateChanges:rt,getAtom:d,getDebugName:ye,getDependencyTree:Mt,getObserverTree:$t,isComputingDerivation:le,isSpyEnabled:r,resetGlobalState:Z,spyReport:_,spyReportEnd:u,spyReportStart:c,trackTransitions:tn},exports._={getAdministration:b,quickDiff:bt,resetGlobalState:Z},exports.autorun=ce,exports.when=Ce,exports.autorunUntil=on,exports.autorunAsync=nn,exports.reaction=en;var wt=ve(function(o,a,c,e,s){var r=s.get;t("function"==typeof r,"@computed can only be used on getter functions, like: '@computed get myProps() { return ...; }'");var i=!1;e&&1===e.length&&e[0].asStructure===!0&&(i=!0);var u=te(o,void 0,n.Recursive);ee(u,a,i?de(r):r,!1)},function(e){return this.$mobx.values[e].get()},Ne,!1,!0);exports.computed=se,exports.createTransformer=Kt,exports.expr=Ut,exports.extendObservable=ae,exports.intercept=Vt,exports.isObservable=H;var _t=ve(function(t,r,e){var i=P(!0);"function"==typeof e&&(e=we(e));var o=te(t,void 0,n.Recursive);ee(o,r,e,!0),M(i)},function(e){return this.$mobx.values[e].get()},function(e,t){Je(this,e,t)},!0,!1);exports.observable=xe;var i;!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"}(i||(i={})),exports.observe=xt,exports.toJS=w,exports.toJSON=ht,exports.whyRun=dt;var St=ve(function(r,t,n,e,a){var i=e&&1===e.length?e[0]:n.name||t||"<unnamed action>",o=me(i,n);x(r,t,o)},function(e){return this[e]},function(){t(!1,"It is not allowed to assign new values to @action fields")},!1,!0);exports.action=me,exports.isAction=st,exports.runInAction=vt,exports.useStrict=yt;var j=function(){function n(e,t,n){void 0===e&&(e="Atom@"+o()),void 0===t&&(t=Se),void 0===n&&(n=Se),this.name=e,this.onBecomeObserved=t,this.onBecomeUnobserved=n,this.isDirty=!1,this.staleObservers=[],this.observers=new X,this.diffValue=0,this.laRunId=0}return n.prototype.reportObserved=function(){ze(this)},n.prototype.reportChanged=function(){this.isDirty||(this.reportStale(),this.reportReady())},n.prototype.reportStale=function(){this.isDirty||(this.isDirty=!0,Te(this))},n.prototype.reportReady=function(){t(this.isDirty,"atom not dirty"),e.inTransaction>0?e.changedAtoms.push(this):(nt(this),oe())},n.prototype.toString=function(){return this.name},n}();exports.Atom=j;var m=function(){function n(e,t,n,r){this.derivation=e,this.scope=t,this.compareStructural=n,this.isLazy=!0,this.isComputing=!1,this.staleObservers=[],this.observers=new X,this.observing=[],this.diffValue=0,this.runId=0,this.laRunId=0,this.l=0,this.__mapid="#"+o(),this.dependencyChangeCount=0,this.dependencyStaleCount=0,this.value=void 0,this.name=r||"ComputedValue@"+o()}return n.prototype.peek=function(){this.isComputing=!0;var e=P(!1),t=this.derivation.call(this.scope);return M(e),this.isComputing=!1,t},n.prototype.onBecomeObserved=function(){},n.prototype.onBecomeUnobserved=function(){Be(this),this.isLazy=!0,this.value=void 0},n.prototype.onDependenciesReady=function(){var e=this.trackAndCompute();return e},n.prototype.get=function(){if(t(!this.isComputing,"Cycle detected in computation "+this.name,this.derivation),ze(this),this.dependencyStaleCount>0)return this.peek();if(this.isLazy){if(!le())return this.peek();this.isLazy=!1,this.trackAndCompute()}return this.value},n.prototype.set=function(e){throw new Error("[ComputedValue '"+name+"'] It is not possible to assign a new value to a computed value.")},n.prototype.trackAndCompute=function(){r()&&_({object:this,type:"compute",fn:this.derivation,target:this.scope});var e=this.value,t=this.value=Xe(this,this.peek);return he(this.compareStructural,t,e)},n.prototype.observe=function(n,r){var i=this,e=!0,t=void 0;return ce(function(){var o=i.get();if(!e||r){var a=A();n(o,t),O(a)}e=!1,t=o})},n.prototype.toJSON=function(){return this.get()},n.prototype.toString=function(){return this.name+"["+this.derivation.toString()+"]"},n.prototype.whyRun=function(){var n=e.derivationStack.length>0,o=V(this.observing).map(function(e){return e.name}),r=V(this.observers.asArray()).map(function(e){return e.name}),t=this.isComputing?n?this.observers.isEmpty()?s.REQUIRED:s.INVALIDATED:s.PEEK:s.NOT_RUNNING;if(t===s.REQUIRED){var i=e.derivationStack[e.derivationStack.length-2];i&&r.push(i.name)}return"\nWhyRun? computation '"+this.name+"':\n * Running because: "+It[t]+" "+(t===s.NOT_RUNNING&&this.dependencyStaleCount>0?"(a next run is scheduled)":"")+"\n"+(this.isLazy?" * This computation is suspended (not in use by any reaction) and won't run automatically.\n Didn't expect this computation to be suspended at this point?\n 1. Make sure this computation is used by a reaction (reaction, autorun, observer).\n 2. Check whether you are using this computation synchronously (in the same stack as they reaction that needs it).\n":" * This computation will re-run if any of the following observables changes:\n "+ge(o)+"\n "+(this.isComputing&&n?" (... or any observable accessed during the remainder of the current run)":"")+"\n Missing items in this list?\n 1. Check whether all used values are properly marked as observable (use isObservable to verify)\n 2. Make sure you didn't dereference values too early. MobX observes props, not primitives. E.g: use 'person.name' instead of 'name' in your computation.\n * If the outcome of this computation changes, the following observers will be re-run:\n "+ge(r)+"\n")},n}(),s;!function(e){e[e.PEEK=0]="PEEK",e[e.INVALIDATED=1]="INVALIDATED",e[e.REQUIRED=2]="REQUIRED",e[e.NOT_RUNNING=3]="NOT_RUNNING"}(s||(s={}));var It=(I={},I[s.PEEK]="[peek] The value of this computed value was requested outside an reaction",I[s.INVALIDATED]="[invalidated] Some observables used by this computation did change",I[s.REQUIRED]="[started] This computation is required by another computed value / reaction",I[s.NOT_RUNNING]="[idle] This compution is currently not running",I),jt=1;exports.untracked=Ke;var Et=["mobxGuid","resetId","spyListeners","strictMode"],Ze=function(){function e(){this.version=2,this.derivationStack=[],this.mobxGuid=0,this.inTransaction=0,this.isTracking=!1,this.isRunningReactions=!1,this.changedAtoms=[],this.pendingReactions=[],this.allowStateChanges=!0,this.strictMode=!1,this.resetId=0,this.spyListeners=[]}return e}(),e=function(){var e=new Ze;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}(),He,p=function(){function t(e,t){void 0===e&&(e="Reaction@"+o()),this.name=e,this.onInvalidate=t,this.staleObservers=G,this.observers=He||(He=new X),this.observing=[],this.diffValue=0,this.runId=0,this.laRunId=0,this.l=0,this.__mapid="#"+o(),this.dependencyChangeCount=0,this.dependencyStaleCount=0,this.isDisposed=!1,this._isScheduled=!1,this._isTrackPending=!1,this._isRunning=!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),oe())},t.prototype.isScheduled=function(){return this.dependencyStaleCount>0||this._isScheduled},t.prototype.runReaction=function(){this.isDisposed||(this._isScheduled=!1,this._isTrackPending=!0,this.onInvalidate(),this._isTrackPending&&r()&&_({object:this,type:"scheduled-reaction"}))},t.prototype.track=function(e){var t,n=r();n&&(t=Date.now(),c({object:this,type:"reaction",fn:e})),this._isRunning=!0,Xe(this,e),this._isRunning=!1,this._isTrackPending=!1,n&&u({time:Date.now()-t})},t.prototype.dispose=function(){this.isDisposed||(this.isDisposed=!0,Be(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.prototype.whyRun=function(){var e=V(this.observing).map(function(e){return e.name});return"\nWhyRun? reaction '"+this.name+"':\n * Status: ["+(this.isDisposed?"stopped":this._isRunning?"running":this.isScheduled()?"scheduled":"idle")+"]\n * This reaction will re-run if any of the following observables changes:\n "+ge(e)+"\n "+(this._isRunning?" (... or any observable accessed during the remainder of the current run)":"")+"\n Missing items in this list?\n 1. Check whether all used values are properly marked as observable (use isObservable to verify)\n 2. Make sure you didn't dereference values too early. MobX observes props, not primitives. E.g: use 'person.name' instead of 'name' in your computation.\n";
},t}();exports.Reaction=p;var Tt=100,F=!1,We={spyReportEnd:!0};exports.spy=Ie,exports.transaction=L;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={})),exports.asReference=we,exports.asStructure=de,exports.asFlat=at;var ue=function(){function e(e){this.value=e,f(e,"Modifiers are not allowed to be nested")}return e}(),K=function(){function e(e){this.value=e,f(e,"Modifiers are not allowed to be nested")}return e}(),ne=function(){function e(e){this.value=e,f(e,"Modifiers are not allowed to be nested")}return e}();exports.asMap=gt;var Ft=function(){var e=!1,t={};return Object.defineProperty(t,"0",{set:function(){e=!0}}),Object.create(t)[0]=1,e===!1}(),be=0,Ue=function(){function e(){}return e}();Ue.prototype=[];var Wt=function(){function e(e,t,n,r){this.mode=t,this.array=n,this.owned=r,this.lastKnownLength=0,this.interceptors=null,this.changeListeners=null,this.atom=new j(e||"ObservableArray@"+o())}return e.prototype.makeReactiveArrayItem=function(e){return f(e,"Array values cannot have modifiers"),this.mode===n.Flat||this.mode===n.Reference?e:J(e,this.mode,this.atom.name+"[..]")},e.prototype.intercept=function(e){return B(this,e)},e.prototype.observe=function(t,e){return void 0===e&&(e=!1),e&&t({object:this.array,type:"splice",index:0,added:this.values.slice(),addedCount:this.values.length,removed:[],removedCount:0}),q(this,t)},e.prototype.getArrayLength=function(){return this.atom.reportObserved(),this.values.length},e.prototype.setArrayLength=function(e){if("number"!=typeof e||0>e)throw new Error("[mobx.array] Out of range: "+e);var t=this.values.length;e!==t&&(e>t?this.spliceWithArray(t,0,new Array(e-t)):this.spliceWithArray(e,t-e))},e.prototype.updateArrayLength=function(t,e){if(t!==this.lastKnownLength)throw new Error("[mobx] Modification exception: the internal structure of an observable array was changed. Did you use peek() to change it?");this.lastKnownLength+=e,e>0&&t+e+1>be&&Ve(t+e+1)},e.prototype.spliceWithArray=function(e,n,t){fe();var r=this.values.length;if(void 0===e?e=0:e>r?e=r:0>e&&(e=Math.max(0,r+e)),n=1===arguments.length?r-e:void 0===n||null===n?0:Math.max(0,Math.min(n,r-e)),void 0===t&&(t=[]),R(this)){var i=k(this,{object:this.array,type:"splice",index:e,removedCount:n,added:t});if(!i)return G;n=i.removedCount,t=i.added}t=t.map(this.makeReactiveArrayItem,this);var s=t.length-n;this.updateArrayLength(r,s);var o=(a=this.values).splice.apply(a,[e,n].concat(t));return(0!==n||0!==t.length)&&this.notifyArraySplice(e,t,o),o;var a},e.prototype.notifyArrayChildUpdate=function(i,o,a){var e=!this.owned&&r(),t=h(this),n=t||e?{object:this.array,type:"update",index:i,newValue:o,oldValue:a}:null;e&&c(n),this.atom.reportChanged(),t&&v(this,n),e&&u()},e.prototype.notifyArraySplice=function(a,t,n){var e=!this.owned&&r(),i=h(this),o=i||e?{object:this.array,type:"splice",index:a,removed:n,added:t,removedCount:n.length,addedCount:t.length}:null;e&&c(o),this.atom.reportChanged(),i&&v(this,o),e&&u()},e}(),l=function(t){function e(n,i,o,r){void 0===r&&(r=!1),t.call(this);var e=new Wt(o,i,this,r);D(this,"$mobx",e),n&&n.length?(e.updateArrayLength(0,n.length),e.values=n.map(e.makeReactiveArrayItem,e),e.notifyArraySplice(0,e.values.slice(),G)):e.values=[],Ft&&Object.defineProperty(e.array,"0",Bt)}return re(e,t),e.prototype.intercept=function(e){return this.$mobx.intercept(e)},e.prototype.observe=function(t,e){return void 0===e&&(e=!1),this.$mobx.observe(t,e)},e.prototype.clear=function(){return this.splice(0)},e.prototype.replace=function(e){return this.$mobx.spliceWithArray(0,this.$mobx.values.length,e)},e.prototype.toJS=function(){return this.slice()},e.prototype.toJSON=function(){return this.toJS()},e.prototype.peek=function(){return this.$mobx.values},e.prototype.find=function(r,i,t){void 0===t&&(t=0),this.$mobx.atom.reportObserved();for(var n=this.$mobx.values,o=n.length,e=t;o>e;e++)if(r.call(i,n[e],e,this))return n[e]},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 this.$mobx.spliceWithArray(t);case 2:return this.$mobx.spliceWithArray(t,n)}return this.$mobx.spliceWithArray(t,n,r)},e.prototype.push=function(){for(var n=[],e=0;e<arguments.length;e++)n[e-0]=arguments[e];var t=this.$mobx;return t.spliceWithArray(t.values.length,0,n),t.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];var n=this.$mobx;return n.spliceWithArray(0,0,t),n.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}(Ue);tt(l.prototype,function(){return U(this.slice())}),zt(l.prototype,["constructor","observe","clear","replace","toJSON","peek","find","splice","push","pop","shift","unshift","reverse","sort","remove","toString","toLocaleString"]),Object.defineProperty(l.prototype,"length",{enumerable:!1,configurable:!0,get:function(){return this.$mobx.getArrayLength()},set:function(e){this.$mobx.setArrayLength(e)}}),["concat","every","filter","forEach","indexOf","join","lastIndexOf","map","reduce","reduceRight","slice","some"].forEach(function(e){var t=Array.prototype[e];x(l.prototype,e,function(){return this.$mobx.atom.reportObserved(),t.apply(this.$mobx.values,arguments)})});var Bt={configurable:!0,enumerable:!1,set:Ee(0),get:pt(0)};Ve(1e3),exports.fastArray=Ht,exports.isObservableArray=z;var Qt={},S=function(){function e(e,r){var t=this;this.$mobx=Qt,this._data={},this._hasMap={},this.name="ObservableMap@"+o(),this._keys=new l(null,n.Reference,this.name+".keys()",!0),this.interceptors=null,this.changeListeners=null,this._valueMode=an(r),this._valueMode===n.Flat&&(this._valueMode=n.Reference),rt(!0,function(){g(e)?t.merge(e):Array.isArray(e)&&e.forEach(function(e){var n=e[0],r=e[1];return t.set(n,r)})})}return e.prototype._has=function(e){return"undefined"!=typeof this._data[e]},e.prototype.has=function(e){return this.isValidKey(e)?(e=""+e,this._hasMap[e]?this._hasMap[e].get():this._updateHasMapEntry(e,!1).get()):!1},e.prototype.set=function(e,t){this.assertValidKey(e),e=""+e;var n=this._has(e);if(f(t,"[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"),R(this)){var r=k(this,{type:n?"update":"add",object:this,newValue:t,name:e});if(!r)return;t=r.newValue}n?this._updateValue(e,t):this._addValue(e,t)},e.prototype.delete=function(e){var t=this;if(this.assertValidKey(e),e=""+e,R(this)){var n=k(this,{type:"delete",object:this,name:e});if(!n)return}if(this._has(e)){var i=r(),o=h(this),n=o||i?{type:"delete",object:this,oldValue:this._data[e].value,name:e}:null;i&&c(n),L(function(){t._keys.remove(e),t._updateHasMapEntry(e,!1);var n=t._data[e];n.setNewValue(void 0),t._data[e]=void 0},void 0,!1),o&&v(this,n),i&&u()}},e.prototype._updateHasMapEntry=function(t,r){var e=this._hasMap[t];return e?e.setNewValue(r):e=this._hasMap[t]=new E(r,n.Reference,this.name+"."+t+"?",!1),e},e.prototype._updateValue=function(i,e){var t=this._data[i];if(e=t.prepareNewValue(e),e!==$){var n=r(),o=h(this),a=o||n?{type:"update",object:this,oldValue:t.value,name:i,newValue:e}:null;n&&c(a),t.setNewValue(e),o&&v(this,a),n&&u()}},e.prototype._addValue=function(e,n){var t=this;L(function(){var r=t._data[e]=new E(n,t._valueMode,t.name+"."+e,!1);n=r.value,t._updateHasMapEntry(e,!0),t._keys.push(e)},void 0,!1);var i=r(),o=h(this),a=o||i?{type:"add",object:this,name:e,newValue:n}:null;i&&c(a),o&&v(this,a),i&&u()},e.prototype.get=function(e){return e=""+e,this.has(e)?this._data[e].get():void 0},e.prototype.keys=function(){return U(this._keys.slice())},e.prototype.values=function(){return U(this._keys.map(this.get,this))},e.prototype.entries=function(){var e=this;return U(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 L(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])})},void 0,!1),this},e.prototype.clear=function(){var e=this;L(function(){Ke(function(){e.keys().forEach(e.delete,e)})},void 0,!1)},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.toJs=function(){return a("toJs is deprecated, use toJS instead"),this.toJS()},e.prototype.toJSON=function(){return this.toJS()},e.prototype.isValidKey=function(e){return null===e||void 0===e?!1:"string"!=typeof e&&"number"!=typeof e&&"boolean"!=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 this.name+"[{ "+this.keys().map(function(t){return t+": "+e.get(t)}).join(", ")+" }]"},e.prototype.observe=function(e,n){return t(n!==!0,"`observe` doesn't support the fire immediately property for observable maps."),q(this,e)},e.prototype.intercept=function(e){return B(this,e)},e}();exports.ObservableMap=S,tt(S.prototype,function(){return this.entries()}),exports.map=$e,exports.isObservableMap=Q;var Me=function(){function e(e,t,n){this.target=e,this.name=t,this.mode=n,this.values={},this.changeListeners=null,this.interceptors=null}return e.prototype.observe=function(e,n){return t(n!==!0,"`observe` doesn't support the fire immediately property for observable objects."),q(this,e)},e.prototype.intercept=function(e){return B(this,e)},e}(),Le={},je={};exports.isObservableObject=y;var $={},E=function(t){function e(s,u,e,i){void 0===e&&(e="ObservableValue@"+o()),void 0===i&&(i=!0),t.call(this,e),this.mode=u,this.hasUnreportedChange=!1,this.value=void 0;var a=T(s,n.Recursive),c=a[0],l=a[1];this.mode===n.Recursive&&(this.mode=c),this.value=J(l,this.mode,this.name),i&&r()&&_({type:"create",object:this,newValue:this.value})}return re(e,t),e.prototype.set=function(e){var n=this.value;if(e=this.prepareNewValue(e),e!==$){var t=r();t&&c({type:"update",object:this,newValue:e,oldValue:n}),this.setNewValue(e),t&&u()}},e.prototype.prepareNewValue=function(e){if(f(e,"Modifiers cannot be used on non-initial values."),fe(),R(this)){var t=k(this,{object:this,type:"update",newValue:e});if(!t)return $;e=t.newValue}var r=he(this.mode===n.Structure,this.value,e);return r?J(e,this.mode,this.name):$},e.prototype.setNewValue=function(e){var t=this.value;this.value=e,this.reportChanged(),h(this)&&v(this,[e,t])},e.prototype.get=function(){return this.reportObserved(),this.value},e.prototype.intercept=function(e){return B(this,e)},e.prototype.observe=function(e,t){return t&&e(this.value,void 0),q(this,e)},e.prototype.toJSON=function(){return this.get()},e.prototype.toString=function(){return this.name+"["+this.value+"]"},e}(j),Ae="__$$iterating",X=function(){function e(){this.size=0,this.data={}}return e.prototype.isEmpty=function(){return 0===this.size},Object.defineProperty(e.prototype,"length",{get:function(){return this.size},enumerable:!0,configurable:!0}),e.prototype.asArray=function(){var e=new Array(this.size),t=0;for(var n in this.data)e[t]=this.data[n],t++;return e},e.prototype.add=function(e){var t=e.__mapid;t in this.data||(this.data[t]=e,this.size++)},e.prototype.remove=function(e){e.__mapid in this.data&&(delete this.data[e.__mapid],this.size--)},e.prototype.cloneAndClear=function(){var e=this.asArray();return this.data={},this.size=0,e},e}();exports.FastSet=X;var rn=function(){function e(){this.listeners=[],a("extras.SimpleEventEmitter is deprecated and will be removed in the next major release")}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),W(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=rn;var G=[];Object.freeze(G);var Oe=[],Se=function(){},I;
//# sourceMappingURL=lib/mobx.min.js.map
/** 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(i,l){if(!t[i]){if(!e[i]){var u="function"==typeof require&&require;if(!l&&u)return u(i,!0);if(o)return o(i,!0);var c=new Error("Cannot find module '"+i+"'");throw c.code="MODULE_NOT_FOUND",c}var s=t[i]={exports:{}};e[i][0].call(s.exports,function(t){var n=e[i][1][t];return r(n?n:t)},s,s.exports,a,e,t,n)}return t[i].exports}for(var o="function"==typeof require&&require,i=0;i<n.length;i++)r(n[i]);return r}({1:[function(t,n,e){(function(_){"use strict";function te(t,o,u){var i,e,r;"string"==typeof t?(i=t,e=o,r=u):"function"==typeof t&&(i=t.name||"Autorun@"+s(),e=t,r=o),p(e,"autorun methods cannot have modifiers"),n("function"==typeof e,"autorun expects a function"),n(0===e.length,"autorun expects a function without arguments"),r&&(e=e.bind(r));var a=new g(i,function(){this.track(e)});return a.schedule(),a.getDisposer()}function at(e,a,u,l){var r,i,o,t;"string"==typeof e?(r=e,i=a,o=u,t=l):"function"==typeof e&&(r="When@"+s(),i=e,o=a,t=u);var c=!1,n=te(r,function(){if(i.call(t)){n?n():c=!0;var e=V();o.call(t),E(e)}});return c&&n(),n}function rn(e,t,n){return a("`autorunUntil` is deprecated, please use `when`."),at.apply(null,arguments)}function nn(e,u,c,l){var o,t,n,r;"string"==typeof e?(o=e,t=u,n=c,r=l):"function"==typeof e&&(o=e.name||"AutorunAsync@"+s(),t=e,n=u,r=c),void 0===n&&(n=1),r&&(t=t.bind(r));var a=!1,i=new g(o,function(){a||(a=!0,setTimeout(function(){a=!1,i.isDisposed||i.track(t)},n))});return i.schedule(),i.getDisposer()}function tn(o,p,w,b,m,_){function y(){if(!l.isDisposed){var e=!1;l.track(function(){var t=d();e=_e(x,a,t),a=t}),u&&n&&t(a),u||e!==!0||t(a),u&&(u=!1)}}var c,f,t,n,e,i;"string"==typeof o?(c=o,f=p,t=w,n=b,e=m,i=_):(c=o.name||p.name||"Reaction@"+s(),f=o,t=p,n=w,e=b,i=m),void 0===n&&(n=!1),void 0===e&&(e=0);var v=P(f,r.Reference),R=v[0],d=v[1],x=R===r.Structure;i&&(d=d.bind(i),t=re(c,t.bind(i)));var u=!0,h=!1,a=void 0,l=new g(c,function(){1>e?y():h||(h=!0,setTimeout(function(){h=!1,y()},e))});return l.schedule(),l.getDisposer()}function me(e,t,r,i){return arguments.length<3&&"function"==typeof e?Zt(e,t):(n(!r||!r.set,"@observable properties cannot have a setter: "+t),xt.apply(null,arguments))}function Zt(n,i){var e=P(n,r.Recursive),o=e[0],t=e[1];return new m(t,i,o===r.Structure,t.name)}function Be(){throw new Error("[ComputedValue] It is not allowed to assign new values to computed properties.")}function Yt(e,i){n("function"==typeof e&&1===e.length,"createTransformer expects a function that accepts one argument");var r={},o=t.resetId,a=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 Re(n,t),n.prototype.onBecomeUnobserved=function(){var e=this.value;t.prototype.onBecomeUnobserved.call(this),delete r[this.sourceIdentifier],i&&i(e,this.sourceObject)},n}(m);return function(i){o!==t.resetId&&(r={},o=t.resetId);var n=Ht(i),e=r[n];return e?e.get():(e=r[n]=new a(n,i),e.get())}}function Ht(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=s(),A(e,"$transformId",t)),t}function Xt(e,t){return he()||console.warn("[mobx.expr] 'expr' should only be used inside other reactive functions."),me(e,t).get()}function ce(e){for(var i=[],t=1;t<arguments.length;t++)i[t-1]=arguments[t];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 O),"extendObservable should not be used on maps, use map.merge instead"),i.forEach(function(t){n("object"==typeof t,"all arguments of extendObservable should be objects"),ct(e,t,r.Recursive,null)}),e}function ct(e,t,r,i){var o=ie(e,i,r);for(var n in t)if(t.hasOwnProperty(n)){if(e===t&&!We(e,n))continue;bt(o,n,t[n])}return e}function Qt(e,t){return Ie(y(e,t))}function Ie(e){var t={name:e.name};return e.observing&&e.observing.length&&(t.dependencies=N(e.observing).map(Ie)),t}function qt(e,t){return Ce(y(e,t))}function Ce(e){var t={name:e.name};return e.observers&&e.observers.length&&(t.observers=N(e.observers).map(Ce)),t}function Bt(e,t,n){return"function"==typeof n?Qe(e,t,n):Gt(e,t)}function Gt(e,t){return w(e)&&!v(e)?(a("Passing plain objects to intercept / observe is deprecated and will be removed in 3.0"),b(se(e)).intercept(t)):b(e).intercept(t)}function Qe(e,t,n){return w(e)&&!v(e)?(a("Passing plain objects to intercept / observe is deprecated and will be removed in 3.0"),ce(e,{property:e[t]}),Qe(e,t,n)):b(e,t).intercept(n)}function G(e,t){if(null===e||void 0===e)return!1;if(void 0!==t){if(e instanceof O||e instanceof f)throw new Error("[mobx.isObservable] isObservable(object, propertyName) is not supported for arrays and maps. Use map.has or array.length instead.");if(v(e)){var n=e.$mobx;return n.values&&!!n.values[t]}return!1}return!!e.$mobx||e instanceof C||e instanceof g||e instanceof m}function Ft(r,e,t){return n(arguments.length>=2&&arguments.length<=3,"Illegal decorator config",e),Je(r,e),n(!t||!t.get,"@observable can not be used on getters, use @computed instead"),_t.apply(null,arguments)}function se(e,u){if(void 0===e&&(e=void 0),"string"==typeof arguments[1])return Ft.apply(null,arguments);if(n(arguments.length<3,"observable expects zero, one or two arguments"),G(e))return e;var s=P(e,r.Recursive),t=s[0],i=s[1],c=t===r.Reference?o.Reference:Ut(i);switch(c){case o.Array:case o.PlainObject:return Y(i,t);case o.Reference:case o.ComplexObject:return new I(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 a("Use `computed(expr)` instead of `observable(expr)`"),me(e,u)}n(!1,"Illegal State")}function Ut(e){return null===e||void 0===e?o.Reference:"function"==typeof e?e.length?o.ComplexFunction:o.ViewFunction:Array.isArray(e)||e instanceof f?o.Array:"object"==typeof e?w(e)?o.PlainObject:o.ComplexObject:o.Reference}function Nt(t,n,e,r){return"function"==typeof e?ke(t,n,e,r):Pt(t,n,e)}function Pt(e,t,n){return w(e)&&!v(e)?(a("Passing plain objects to intercept / observe is deprecated and will be removed in 3.0"),b(se(e)).observe(t,n)):b(e).observe(t,n)}function ke(e,t,n,r){return w(e)&&!v(e)?(a("Passing plain objects to intercept / observe is deprecated and will be removed in 3.0"),ce(e,{property:e[t]}),ke(e,t,n,r)):b(e,t).observe(n,r)}function k(e,n,t){function o(r){return n&&t.push([e,r]),r}if(void 0===n&&(n=!0),void 0===t&&(t=null),e instanceof Date||e instanceof RegExp)return e;if(n&&null===t&&(t=[]),n&&null!==e&&"object"==typeof e)for(var r=0,s=t.length;s>r;r++)if(t[r][0]===e)return t[r][1];if(!e)return e;if(Array.isArray(e)||e instanceof f){var i=o([]),a=e.map(function(e){return k(e,n,t)});i.length=a.length;for(var r=0,s=a.length;s>r;r++)i[r]=a[r];return i}if(e instanceof O){var u=o({});return e.forEach(function(e,r){return u[r]=k(e,n,t)}),u}if(G(e)&&e.$mobx instanceof I)return k(e(),n,t);if(e instanceof I)return k(e.get(),n,t);if("object"==typeof e){var i=o({});for(var c in e)i[c]=k(e[c],n,t);return i}return e}function Mt(n,e,t){return void 0===e&&(e=!0),void 0===t&&(t=null),a("toJSON is deprecated. Use toJS instead"),k.apply(null,arguments)}function ue(e){return console.log(e),e}function ht(e,r){switch(arguments.length){case 0:if(e=t.derivationStack[t.derivationStack.length-1],!e)return ue("whyRun() can only be used if a derivation is active, or by passing an computed value / reaction explicitly. If you invoked whyRun from inside a computation; the computation is currently suspended but re-evaluating because somebody requested it's value.");break;case 2:e=y(e,r)}return e=y(e),e instanceof m?ue(e.whyRun()):e instanceof g?ue(e.whyRun()):void n(!1,"whyRun can only be used on reactions and computed values")}function re(e,t,n,r){return 1===arguments.length&&"function"==typeof e?ge(e.name||"<unnamed action>",e):2===arguments.length&&"function"==typeof t?ge(e,t):1===arguments.length&&"string"==typeof e?ze(e):ze(t).apply(null,arguments)}function ze(e){return function(n,r,t){return t&&"function"==typeof t.value?(t.value=ge(e,t.value),t.enumerable=!1,t):Ot(e).apply(this,arguments)}}function Ue(e){return"function"==typeof e&&e.isMobxAction===!0}function Tt(e,i,o){var t="string"==typeof e?e:e.name||"<unnamed action>",r="function"==typeof e?e:i,a="function"==typeof e?i:o;return n("function"==typeof r,"`runInAction` expects a function"),n(0===r.length,"`runInAction` expects a function without arguments"),n("string"==typeof t&&t.length>0,"actions should have valid names, got: '"+t+"'"),qe(t,r,a,void 0)}function ge(e,t){n("function"==typeof t,"`action` can only be invoked on functions"),n("string"==typeof e&&e.length>0,"actions should have valid names, got: '"+e+"'");var r=function(){return qe(e,t,this,arguments)};return r.isMobxAction=!0,r}function qe(h,f,r,e){var s=t.derivationStack;n(!(s[s.length-1]instanceof m),"Computed values or transformers should not invoke actions or trigger other side effects");var l,a=i();if(a){l=Date.now();var p=[];if(e)for(var o=0,d=e.length;d>o;o++)p.push(e[o]);c({type:"action",name:h,fn:f,target:r,arguments:p})}var v=V();tt(h,r,!1);var y=Q(!0);try{return f.apply(r,e)}finally{H(y),rt(!1),E(v),a&&u({time:Date.now()-l})}}function Lt(e){n(0===t.derivationStack.length,"It is not allowed to set `useStrict` when a derivation is running"),t.strictMode=e,t.allowStateChanges=!e}function Ye(e,t){var n=Q(e),r=t();return H(n),r}function Q(e){var n=t.allowStateChanges;return t.allowStateChanges=e,n}function H(e){t.allowStateChanges=e}function ot(e){n(e.isDirty,"atom not dirty"),e.isDirty=!1,ne(e,!0)}function he(){return t.derivationStack.length>0&&t.isTracking}function xe(){t.allowStateChanges||n(!1,t.strictMode?"It is not allowed to create or change state outside an `action` when MobX is in strict mode. Wrap the current method in `action` if this state change is intended":"It is not allowed to change the state when a computed value or transformer is being evaluated. Use 'autorun' to create reactive functions with side-effects.")}function Vt(e){1===++e.dependencyStaleCount&&Ne(e)}function Et(e,t){if(n(e.dependencyStaleCount>0,"unexpected ready notification"),t&&(e.dependencyChangeCount+=1),0===--e.dependencyStaleCount)if(e.dependencyChangeCount>0){e.dependencyChangeCount=0;var r=e.onDependenciesReady();ne(e,r)}else ne(e,!1)}function ft(e,o){var n=!0,a=e.observing;e.observing=[],t.derivationStack.push(e);var s=t.isTracking;t.isTracking=!0;try{var u=o.call(e);return n=!1,t.isTracking=s,Ct(e,a),u}finally{if(n){var r="[mobx] An uncaught exception occurred while calculating your computed value, autorun or transformer. Or inside the render() method of an observer based React component. These functions should never throw exceptions as MobX will not always be able to recover from them. "+("Please fix the error reported after this message or enable 'Pause on (caught) exceptions' in your debugger to find the root cause. In: '"+e.name+"'");i()&&x({type:"error",object:this,message:r}),console.warn(r),de()}}}function Ct(n,s){t.derivationStack.length-=1;for(var i=Te(n.observing,s),r=i[0],o=i[1],e=0,a=r.length;a>e;e++){r[e];kt(r[e],n)}for(var e=0,a=o.length;a>e;e++)Z(o[e],n)}function Se(e){var t=V(),n=e();return E(t),n}function V(){var e=t.isTracking;return t.isTracking=!1,e}function E(e){t.isTracking=e}function At(){}function de(){t.resetId++;var n=new pt;for(var e in n)-1===jt.indexOf(e)&&(t[e]=n[e]);t.allowStateChanges=!t.strictMode}function kt(e,r){var t=e.observers,n=t.length;t[n]=r,0===n&&e.onBecomeObserved()}function Z(t,r){var e=t.observers,n=e.indexOf(r);-1!==n&&e.splice(n,1),0===e.length&&t.onBecomeUnobserved()}function Pe(n){if(t.isTracking!==!1){var i=t.derivationStack,e=i[i.length-1].observing,r=e.length;e[r-1]!==n&&e[r-2]!==n&&(e[r]=n)}}function Ne(e){var t=e.observers.slice();t.forEach(Vt),e.staleObservers=e.staleObservers.concat(t)}function ne(e,t){e.staleObservers.splice(0).forEach(function(e){return Et(e,t)})}function oe(){if(!(t.isRunningReactions===!0||t.inTransaction>0)){t.isRunningReactions=!0;for(var e=t.pendingReactions,i=0;e.length>0;){if(++i===Dt)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,o=r.length;o>n;n++)r[n].runReaction()}t.isRunningReactions=!1}}function i(){return q}function x(r){if(!q)return!1;for(var n=t.spyListeners,e=0,i=n.length;i>e;e++)n[e](r)}function c(e){var t=lt({},e,{spyReportStart:!0});x(t)}function u(e){x(e?lt({},e,Ke):Ke)}function Xe(e){return t.spyListeners.push(e),q=t.spyListeners.length>0,X(function(){var n=t.spyListeners.indexOf(e);-1!==n&&t.spyListeners.splice(n,1),q=t.spyListeners.length>0})}function St(e){return a("trackTransitions is deprecated. Use mobx.spy instead"),"boolean"==typeof e&&(a("trackTransitions only takes a single callback function. If you are using the mobx-react-devtools, please update them first"),e=arguments[1]),e?Xe(e):(a("trackTransitions without callback has been deprecated and is a no-op now. If you are using the mobx-react-devtools, please update them first"),function(){})}function L(n,e,t){void 0===e&&(e=void 0),void 0===t&&(t=!0),tt(n.name||"anonymous transaction",e,t);var r=n.call(e);return rt(t),r}function tt(r,e,n){void 0===e&&(e=void 0),void 0===n&&(n=!0),t.inTransaction+=1,n&&i()&&c({type:"transaction",target:e,name:r})}function rt(e){if(void 0===e&&(e=!0),0===--t.inTransaction){for(var r=t.changedAtoms.splice(0),n=0,o=r.length;o>n;n++)ot(r[n]);oe()}e&&i()&&u()}function S(e){return e.interceptors&&e.interceptors.length>0}function z(t,n){var e=t.interceptors||(t.interceptors=[]);return e.push(n),X(function(){var t=e.indexOf(n);-1!==t&&e.splice(t,1)})}function R(i,e){for(var o=V(),r=i.interceptors,t=0,a=r.length;a>t;t++)if(e=r[t](e),n(!e||e.type,"Intercept handlers should return nothing or a change object"),!e)return null;return E(o),e}function d(e){return e.changeListeners&&e.changeListeners.length>0}function W(t,n){var e=t.changeListeners||(t.changeListeners=[]);return e.push(n),X(function(){var t=e.indexOf(n);-1!==t&&e.splice(t,1)})}function h(r,n){var i=V(),e=r.changeListeners;if(e){e=e.slice();for(var t=0,o=e.length;o>t;t++)Array.isArray(n)?e[t].apply(null,n):e[t](n);E(i)}}function ve(e){return new pe(e)}function ye(e){return new U(e)}function Oe(e){return new be(e)}function Rt(e,t){return Me(e,t)}function P(e,t){return e instanceof pe?[r.Reference,e.value]:e instanceof U?[r.Structure,e.value]:e instanceof be?[r.Flat,e.value]:[t,e]}function wt(e){return e===ve?r.Reference:e===ye?r.Structure:e===Oe?r.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),r.Recursive)}function Y(e,a,o){var t;if(G(e))return e;switch(a){case r.Reference:return e;case r.Flat:p(e,"Items inside 'asFlat' cannot have modifiers"),t=r.Reference;break;case r.Structure:p(e,"Items inside 'asStructure' cannot have modifiers"),t=r.Structure;break;case r.Recursive:i=P(e,r.Recursive),t=i[0],e=i[1];break;default:n(!1,"Illegal State")}return Array.isArray(e)?Le(e,t,o):w(e)&&Object.isExtensible(e)?ct(e,e,t,o):e;var i}function p(e,t){if(e instanceof pe||e instanceof U||e instanceof be)throw new Error("[mobx] asStructure / asReference / asFlat cannot be used here. "+t)}function on(e){var t=Ee(e),n=Ve(e);Object.defineProperty(f.prototype,""+e,{enumerable:!1,configurable:!0,set:t,get:n})}function Ee(e){return function(t){var n=this.$mobx,i=n.values;if(p(t,"Modifiers cannot be used on array values. For non-reactive array values use makeReactive(asFlat(array))."),e<i.length){xe();var o=i[e];if(S(n)){var a=R(n,{type:"update",object:n.array,index:e,newValue:t});if(!a)return;t=a.newValue}t=n.makeReactiveArrayItem(t);var s=n.mode===r.Structure?!J(o,t):o!==t;s&&(i[e]=t,n.notifyArrayChildUpdate(e,t,o))}else{if(e!==i.length)throw new Error("[mobx.array] Index out of bounds, "+e+" is larger than "+i.length);n.spliceWithArray(e,0,[t])}}}function Ve(e){return function(){var t=this.$mobx;return t&&e<t.values.length?(t.atom.reportObserved(),t.values[e]):void console.warn("[mobx.array] Attempt to read an array index ("+e+") that is out of bounds ("+t.values.length+"). Please check length first. Out of bound indices will not be tracked by MobX")}}function De(t){for(var e=ee;t>e;e++)on(e);ee=t}function Le(e,t,n){return new f(e,t,n)}function gt(e){return a("fastArray is deprecated. Please use `observable(asFlat([]))`"),Le(e,r.Flat,null)}function K(e){return e instanceof f}function Me(e,t){return new O(e,t)}function F(e){return e instanceof O}function ie(e,t,n){if(void 0===n&&(n=r.Recursive),v(e))return e.$mobx;w(e)||(t=e.constructor.name+"@"+s()),t||(t="ObservableObject@"+s());var i=new je(e,t,n);return T(e,"$mobx",i),i}function bt(e,t,n){e.values[t]?e.target[t]=n:ae(e,t,n,!0)}function ae(t,n,e,a){a&&Je(t.target,n);var r,i=t.name+"."+n,o=!0;if("function"!=typeof e||0!==e.length||Ue(e))if(e instanceof U&&"function"==typeof e.value&&0===e.value.length)r=new m(e.value,t.target,!0,i);else{if(o=!1,S(t)){var s=R(t,{object:t.target,name:n,type:"add",newValue:e});if(!s)return;e=s.newValue}r=new I(e,t.mode,i,!1),e=r.value}else r=new m(e,t.target,!1,i);t.values[n]=r,a&&Object.defineProperty(t.target,n,o?yt(n):mt(n)),o||vt(t,t.target,n,e)}function mt(e){var t=Ae[e];return t?t:Ae[e]={configurable:!0,enumerable:!0,get:function(){return this.$mobx.values[e].get()},set:function(t){Ge(this,e,t)}}}function yt(e){var t=st[e];return t?t:st[e]={configurable:!0,enumerable:!1,get:function(){return this.$mobx.values[e].get()},set:Be}}function Ge(r,o,e){var t=r.$mobx,a=t.values[o];if(S(t)){var n=R(t,{type:"update",object:r,name:o,newValue:e});if(!n)return;e=n.newValue}if(e=a.prepareNewValue(e),e!==M){var l=d(t),s=i(),n=h||d?{type:"update",object:r,oldValue:a.value,name:o,newValue:e}:null;s&&c(n),a.setNewValue(e),l&&h(t,n),s&&u()}}function vt(t,o,a,s){var n=d(t),e=i(),r=n||e?{type:"add",object:o,name:a,newValue:s}:null;e&&c(r),n&&h(t,r),e&&u()}function v(e){return"object"==typeof e&&null!==e?($(e),e.$mobx instanceof je):!1}function y(e,t){if("object"==typeof e&&null!==e){if(K(e))return n(void 0===t,"It is not possible to get index atoms from arrays"),e.$mobx.atom;if(F(e)){if(void 0===t)return y(e._keys);var r=e._data[t]||e._hasMap[t];return n(!!r,"the entry '"+t+"' does not exist in the observable map '"+le(e)+"'"),r}if($(e),v(e)){n(!!t,"please specify a property");var i=e.$mobx.values[t];return n(!!i,"no observable property '"+t+"' found on the observable object '"+le(e)+"'"),i}if(e instanceof C||e instanceof m||e instanceof g)return e}else if("function"==typeof e&&e.$mobx instanceof g)return e.$mobx;n(!1,"Cannot obtain atom from "+e)}function b(e,t){return n(e,"Expection some object"),void 0!==t?b(y(e,t)):e instanceof C||e instanceof m||e instanceof g?e:F(e)?e:($(e),e.$mobx?e.$mobx:void n(!1,"Cannot obtain administration from "+e))}function le(e,t){var n;return n=void 0!==t?y(e,t):v(e)||F(e)?b(e):y(e),n.name}function fe(e,r,i,o,a){function t(u,t,s,c){if(n(a||Ze(arguments),"This function is a decorator, but it wasn't invoked like a decorator"),s){u.hasOwnProperty("__mobxLazyInitializers")||A(u,"__mobxLazyInitializers",u.__mobxLazyInitializers&&u.__mobxLazyInitializers.slice()||[]);var f=s.value,l=s.initializer;return u.__mobxLazyInitializers.push(function(n){e(n,t,l?l.call(n):f,c,s)}),{enumerable:o,configurable:!0,get:function(){return this.__mobxDidRunLazyInitializers!==!0&&$(this),r.call(this,t)},set:function(e){this.__mobxDidRunLazyInitializers!==!0&&$(this),i.call(this,t,e)}}}var p={enumerable:o,configurable:!0,get:function(){return this.__mobxInitializedProps&&this.__mobxInitializedProps[t]===!0||He(this,t,void 0,e,c,s),r.call(this,t)},set:function(n){this.__mobxInitializedProps&&this.__mobxInitializedProps[t]===!0?i.call(this,t,n):He(this,t,n,e,c,s)}};return arguments.length<3&&Object.defineProperty(u,t,s),p}return a?function(){if(Ze(arguments))return t.apply(null,arguments);var e=arguments;return function(n,r,i){return t(n,r,i,e)}}:t}function He(e,t,n,r,i,o){e.hasOwnProperty("__mobxInitializedProps")||A(e,"__mobxInitializedProps",{}),e.__mobxInitializedProps[t]=!0,r(e,t,n,i,o)}function $(e){e.__mobxDidRunLazyInitializers!==!0&&e.__mobxLazyInitializers&&(A(e,"__mobxDidRunLazyInitializers",!0),e.__mobxDidRunLazyInitializers&&e.__mobxLazyInitializers.forEach(function(t){return t(e)}))}function Ze(e){return(2===e.length||3===e.length)&&"string"==typeof e[1]}function $t(){return"function"==typeof Symbol&&Symbol.iterator||"@@iterator"}function B(e){n(e[$e]!==!0,"Illegal state: cannot recycle array as iterator"),T(e,$e,!0);var t=-1;return T(e,"next",function(){return t++,{done:t>=this.length,value:t<this.length?this[t]:void 0}}),e}function nt(e,t){T(e,$t(),t)}function s(){return++t.mobxGuid}function n(t,n,e){if(!t)throw new Error("[mobx] Invariant failed: "+n+(e?" in '"+e+"'":""))}function a(e){-1===ut.indexOf(e)&&(ut.push(e),console.error("[mobx] Deprecated: "+e))}function X(t){var e=!1;return function(){return e?void 0:(e=!0,t.apply(this,arguments))}}function N(t){var e=[];return t.forEach(function(t){-1===e.indexOf(t)&&e.push(t)}),e}function we(t,e,n){if(void 0===e&&(e=100),void 0===n&&(n=" - "),!t)return"";var r=t.slice(0,e);return""+r.join(n)+(t.length>e?" (... and "+(t.length-e)+"more)":"")}function w(e){return null!==e&&"object"==typeof e&&Object.getPrototypeOf(e)===Object.prototype}function lt(){for(var r=arguments[0],e=1,i=arguments.length;i>e;e++){var t=arguments[e];for(var n in t)t.hasOwnProperty(n)&&(r[n]=t[n])}return r}function _e(n,e,t){return n?!J(e,t):e!==t}function dt(n,t){for(var e=0;e<t.length;e++)A(n,t[e],n[t[e]])}function A(e,t,n){Object.defineProperty(e,t,{enumerable:!1,writable:!0,configurable:!0,value:n})}function T(e,t,n){Object.defineProperty(e,t,{enumerable:!1,writable:!1,configurable:!1,value:n})}function We(t,n){var e=Object.getOwnPropertyDescriptor(t,n);return!e||e.configurable!==!1&&e.writable!==!1}function Je(t,e){n(We(t,e),"Cannot make property '"+e+"' observable, it is not configurable and writable in the target object")}function Fe(t){var e=[];for(var n in t)e.push(n);return e}function J(e,t){if(null===e&&null===t)return!0;if(void 0===e&&void 0===t)return!0;var i=Array.isArray(e)||K(e);if(i!==(Array.isArray(t)||K(t)))return!1;if(i){if(e.length!==t.length)return!1;for(var n=e.length-1;n>=0;n--)if(!J(e[n],t[n]))return!1;return!0}if("object"==typeof e&&"object"==typeof t){if(null===e||null===t)return!1;if(Fe(e).length!==Fe(t).length)return!1;for(var r in e){if(!(r in t))return!1;if(!J(e[r],t[r]))return!1}return!0}return e===t}function Te(n,r){if(!r||!r.length)return[n,[]];if(!n||!n.length)return[[],r];for(var a=[],s=[],e=0,i=0,p=n.length,c=!1,t=0,o=0,l=r.length,u=!1,f=!1;!f&&!c;){if(!u){if(p>e&&l>t&&n[e]===r[t]){if(e++,t++,e===p&&t===l)return[a,s];continue}i=e,o=t,u=!0}o+=1,i+=1,o>=l&&(f=!0),i>=p&&(c=!0),c||n[i]!==r[t]?f||r[o]!==n[e]||(s=s.concat(r.slice(t,o)),t=o+1,e++,u=!1):(a=a.concat(n.slice(e,i)),e=i+1,t++,u=!1)}return[a.concat(n.slice(e)),s.concat(r.slice(t))]}var Re=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)};At(),e.extras={allowStateChanges:Ye,getAtom:y,getDebugName:le,getDependencyTree:Qt,getObserverTree:qt,isComputingDerivation:he,isSpyEnabled:i,resetGlobalState:de,spyReport:x,spyReportEnd:u,spyReportStart:c,trackTransitions:St},e._={getAdministration:b,quickDiff:Te,resetGlobalState:de},e.autorun=te,e.when=at,e.autorunUntil=rn,e.autorunAsync=nn,e.reaction=tn;var xt=fe(function(o,a,c,e,s){var t=s.get;n("function"==typeof t,"@computed can only be used on getter functions, like: '@computed get myProps() { return ...; }'");var i=!1;e&&1===e.length&&e[0].asStructure===!0&&(i=!0);var u=ie(o,void 0,r.Recursive);ae(u,a,i?ye(t):t,!1)},function(e){return this.$mobx.values[e].get()},Be,!1,!0);e.computed=me,e.createTransformer=Yt,e.expr=Xt,e.extendObservable=ce,e.intercept=Bt,e.isObservable=G;var _t=fe(function(t,n,e){var i=Q(!0);"function"==typeof e&&(e=ve(e));var o=ie(t,void 0,r.Recursive);ae(o,n,e,!0),H(i)},function(e){return this.$mobx.values[e].get()},function(e,t){Ge(this,e,t)},!0,!1);e.observable=se;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=Nt,e.toJS=k,e.toJSON=Mt,e.whyRun=ht;var Ot=fe(function(r,t,n,e,a){var i=e&&1===e.length?e[0]:n.name||t||"<unnamed action>",o=re(i,n);A(r,t,o)},function(e){return this[e]},function(){n(!1,"It is not allowed to assign new values to @action fields")},!1,!0);e.action=re,e.isAction=Ue,e.runInAction=Tt,e.useStrict=Lt;var C=function(){function e(e,t,n){void 0===e&&(e="Atom@"+s()),void 0===t&&(t=et),void 0===n&&(n=et),this.name=e,this.onBecomeObserved=t,this.onBecomeUnobserved=n,this.isDirty=!1,this.staleObservers=[],this.observers=[]}return e.prototype.reportObserved=function(){Pe(this)},e.prototype.reportChanged=function(){this.isDirty||(this.reportStale(),this.reportReady())},e.prototype.reportStale=function(){this.isDirty||(this.isDirty=!0,Ne(this))},e.prototype.reportReady=function(){n(this.isDirty,"atom not dirty"),t.inTransaction>0?t.changedAtoms.push(this):(ot(this),oe())},e.prototype.toString=function(){return this.name},e}();e.Atom=C;var l,m=function(){function e(e,t,n,r){this.derivation=e,this.scope=t,this.compareStructural=n,this.isLazy=!0,this.isComputing=!1,this.staleObservers=[],this.observers=[],this.observing=[],this.dependencyChangeCount=0,this.dependencyStaleCount=0,this.value=void 0,this.name=r||"ComputedValue@"+s()}return e.prototype.peek=function(){this.isComputing=!0;var e=Q(!1),t=this.derivation.call(this.scope);return H(e),this.isComputing=!1,t},e.prototype.onBecomeObserved=function(){},e.prototype.onBecomeUnobserved=function(){for(var e=0,t=this.observing.length;t>e;e++)Z(this.observing[e],this);this.observing=[],this.isLazy=!0,this.value=void 0},e.prototype.onDependenciesReady=function(){var e=this.trackAndCompute();return e},e.prototype.get=function(){if(n(!this.isComputing,"Cycle detected in computation "+this.name,this.derivation),Pe(this),this.dependencyStaleCount>0)return this.peek();if(this.isLazy){if(!he())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(){i()&&x({object:this,type:"compute",fn:this.derivation,target:this.scope});var e=this.value,t=this.value=ft(this,this.peek);return _e(this.compareStructural,t,e)},e.prototype.observe=function(n,r){var i=this,e=!0,t=void 0;return te(function(){var o=i.get();if(!e||r){var a=V();n(o,t),E(a)}e=!1,t=o})},e.prototype.toJSON=function(){return this.get()},e.prototype.toString=function(){return this.name+"["+this.derivation.toString()+"]"},e.prototype.whyRun=function(){var n=t.derivationStack.length>0,o=N(this.observing).map(function(e){return e.name}),r=N(this.observers).map(function(e){return e.name}),e=this.isComputing?n?this.observers.length>0?l.INVALIDATED:l.REQUIRED:l.PEEK:l.NOT_RUNNING;if(e===l.REQUIRED){var i=t.derivationStack[t.derivationStack.length-2];i&&r.push(i.name)}return"\nWhyRun? computation '"+this.name+"':\n * Running because: "+It[e]+" "+(e===l.NOT_RUNNING&&this.dependencyStaleCount>0?"(a next run is scheduled)":"")+"\n"+(this.isLazy?" * This computation is suspended (not in use by any reaction) and won't run automatically.\n Didn't expect this computation to be suspended at this point?\n 1. Make sure this computation is used by a reaction (reaction, autorun, observer).\n 2. Check whether you are using this computation synchronously (in the same stack as they reaction that needs it).\n":" * This computation will re-run if any of the following observables changes:\n "+we(o)+"\n "+(this.isComputing&&n?" (... or any observable accessed during the remainder of the current run)":"")+"\n Missing items in this list?\n 1. Check whether all used values are properly marked as observable (use isObservable to verify)\n 2. Make sure you didn't dereference values too early. MobX observes props, not primitives. E.g: use 'person.name' instead of 'name' in your computation.\n * If the outcome of this computation changes, the following observers will be re-run:\n "+we(r)+"\n")},e}();!function(e){e[e.PEEK=0]="PEEK",e[e.INVALIDATED=1]="INVALIDATED",e[e.REQUIRED=2]="REQUIRED",e[e.NOT_RUNNING=3]="NOT_RUNNING"}(l||(l={}));var It=(j={},j[l.PEEK]="[peek] The value of this computed value was requested outside an reaction",j[l.INVALIDATED]="[invalidated] Some observables used by this computation did change",j[l.REQUIRED]="[started] This computation is required by another computed value / reaction",j[l.NOT_RUNNING]="[idle] This compution is currently not running",j);e.untracked=Se;var jt=["mobxGuid","resetId","spyListeners","strictMode"],pt=function(){function e(){this.version=2,this.derivationStack=[],this.mobxGuid=0,this.inTransaction=0,this.isTracking=!1,this.isRunningReactions=!1,this.changedAtoms=[],this.pendingReactions=[],this.allowStateChanges=!0,this.strictMode=!1,this.resetId=0,this.spyListeners=[]}return e}(),t=function(){var e=new pt;if(_.__mobservableTrackingStack||_.__mobservableViewStack)throw new Error("[mobx] An incompatible version of mobservable is already loaded.");if(_.__mobxGlobal&&_.__mobxGlobal.version!==e.version)throw new Error("[mobx] An incompatible version of mobx is already loaded.");return _.__mobxGlobal?_.__mobxGlobal:_.__mobxGlobal=e}(),g=function(){function e(e,t){void 0===e&&(e="Reaction@"+s()),this.name=e,this.onInvalidate=t,this.staleObservers=D,this.observers=D,this.observing=[],this.dependencyChangeCount=0,this.dependencyStaleCount=0,this.isDisposed=!1,this._isScheduled=!1,this._isTrackPending=!1,this._isRunning=!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),oe())},e.prototype.isScheduled=function(){return this.dependencyStaleCount>0||this._isScheduled},e.prototype.runReaction=function(){this.isDisposed||(this._isScheduled=!1,this._isTrackPending=!0,this.onInvalidate(),this._isTrackPending&&i()&&x({object:this,type:"scheduled-reaction"}))},e.prototype.track=function(e){var t,n=i();n&&(t=Date.now(),c({object:this,type:"reaction",fn:e})),this._isRunning=!0,ft(this,e),this._isRunning=!1,this._isTrackPending=!1,n&&u({time:Date.now()-t})},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++)Z(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.prototype.whyRun=function(){var e=N(this.observing).map(function(e){return e.name});return"\nWhyRun? reaction '"+this.name+"':\n * Status: ["+(this.isDisposed?"stopped":this._isRunning?"running":this.isScheduled()?"scheduled":"idle")+"]\n * This reaction will re-run if any of the following observables changes:\n "+we(e)+"\n "+(this._isRunning?" (... or any observable accessed during the remainder of the current run)":"")+"\n Missing items in this list?\n 1. Check whether all used values are properly marked as observable (use isObservable to verify)\n 2. Make sure you didn't dereference values too early. MobX observes props, not primitives. E.g: use 'person.name' instead of 'name' in your computation.\n";
},e}();e.Reaction=g;var Dt=100,q=!1,Ke={spyReportEnd:!0};e.spy=Xe,e.transaction=L;var r;!function(e){e[e.Recursive=0]="Recursive",e[e.Reference=1]="Reference",e[e.Structure=2]="Structure",e[e.Flat=3]="Flat"}(r||(r={})),e.asReference=ve,e.asStructure=ye,e.asFlat=Oe;var pe=function(){function e(e){this.value=e,p(e,"Modifiers are not allowed to be nested")}return e}(),U=function(){function e(e){this.value=e,p(e,"Modifiers are not allowed to be nested")}return e}(),be=function(){function e(e){this.value=e,p(e,"Modifiers are not allowed to be nested")}return e}();e.asMap=Rt;var zt=function(){var e=!1,t={};return Object.defineProperty(t,"0",{set:function(){e=!0}}),Object.create(t)[0]=1,e===!1}(),ee=0,it=function(){function e(){}return e}();it.prototype=[];var Jt=function(){function e(e,t,n,r){this.mode=t,this.array=n,this.owned=r,this.lastKnownLength=0,this.interceptors=null,this.changeListeners=null,this.atom=new C(e||"ObservableArray@"+s())}return e.prototype.makeReactiveArrayItem=function(e){return p(e,"Array values cannot have modifiers"),this.mode===r.Flat||this.mode===r.Reference?e:Y(e,this.mode,this.atom.name+"[..]")},e.prototype.intercept=function(e){return z(this,e)},e.prototype.observe=function(t,e){return void 0===e&&(e=!1),e&&t({object:this.array,type:"splice",index:0,added:this.values.slice(),addedCount:this.values.length,removed:[],removedCount:0}),W(this,t)},e.prototype.getArrayLength=function(){return this.atom.reportObserved(),this.values.length},e.prototype.setArrayLength=function(e){if("number"!=typeof e||0>e)throw new Error("[mobx.array] Out of range: "+e);var t=this.values.length;e!==t&&(e>t?this.spliceWithArray(t,0,new Array(e-t)):this.spliceWithArray(e,t-e))},e.prototype.updateArrayLength=function(t,e){if(t!==this.lastKnownLength)throw new Error("[mobx] Modification exception: the internal structure of an observable array was changed. Did you use peek() to change it?");this.lastKnownLength+=e,e>0&&t+e+1>ee&&De(t+e+1)},e.prototype.spliceWithArray=function(e,n,t){xe();var r=this.values.length;if(void 0===e?e=0:e>r?e=r:0>e&&(e=Math.max(0,r+e)),n=1===arguments.length?r-e:void 0===n||null===n?0:Math.max(0,Math.min(n,r-e)),void 0===t&&(t=[]),S(this)){var i=R(this,{object:this.array,type:"splice",index:e,removedCount:n,added:t});if(!i)return D;n=i.removedCount,t=i.added}t=t.map(this.makeReactiveArrayItem,this);var s=t.length-n;this.updateArrayLength(r,s);var o=(a=this.values).splice.apply(a,[e,n].concat(t));return(0!==n||0!==t.length)&&this.notifyArraySplice(e,t,o),o;var a},e.prototype.notifyArrayChildUpdate=function(r,o,a){var e=!this.owned&&i(),t=d(this),n=t||e?{object:this.array,type:"update",index:r,newValue:o,oldValue:a}:null;e&&c(n),this.atom.reportChanged(),t&&h(this,n),e&&u()},e.prototype.notifyArraySplice=function(a,t,n){var e=!this.owned&&i(),r=d(this),o=r||e?{object:this.array,type:"splice",index:a,removed:n,added:t,removedCount:n.length,addedCount:t.length}:null;e&&c(o),this.atom.reportChanged(),r&&h(this,o),e&&u()},e}(),f=function(t){function e(n,i,o,r){void 0===r&&(r=!1),t.call(this);var e=new Jt(o,i,this,r);T(this,"$mobx",e),n&&n.length?(e.updateArrayLength(0,n.length),e.values=n.map(e.makeReactiveArrayItem,e),e.notifyArraySplice(0,e.values.slice(),D)):e.values=[],zt&&Object.defineProperty(e.array,"0",Wt)}return Re(e,t),e.prototype.intercept=function(e){return this.$mobx.intercept(e)},e.prototype.observe=function(t,e){return void 0===e&&(e=!1),this.$mobx.observe(t,e)},e.prototype.clear=function(){return this.splice(0)},e.prototype.replace=function(e){return this.$mobx.spliceWithArray(0,this.$mobx.values.length,e)},e.prototype.toJS=function(){return this.slice()},e.prototype.toJSON=function(){return this.toJS()},e.prototype.peek=function(){return this.$mobx.values},e.prototype.find=function(r,i,t){void 0===t&&(t=0),this.$mobx.atom.reportObserved();for(var n=this.$mobx.values,o=n.length,e=t;o>e;e++)if(r.call(i,n[e],e,this))return n[e]},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 this.$mobx.spliceWithArray(t);case 2:return this.$mobx.spliceWithArray(t,n)}return this.$mobx.spliceWithArray(t,n,r)},e.prototype.push=function(){for(var n=[],e=0;e<arguments.length;e++)n[e-0]=arguments[e];var t=this.$mobx;return t.spliceWithArray(t.values.length,0,n),t.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];var n=this.$mobx;return n.spliceWithArray(0,0,t),n.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}(it);nt(f.prototype,function(){return B(this.slice())}),dt(f.prototype,["constructor","observe","clear","replace","toJSON","peek","find","splice","push","pop","shift","unshift","reverse","sort","remove","toString","toLocaleString"]),Object.defineProperty(f.prototype,"length",{enumerable:!1,configurable:!0,get:function(){return this.$mobx.getArrayLength()},set:function(e){this.$mobx.setArrayLength(e)}}),["concat","every","filter","forEach","indexOf","join","lastIndexOf","map","reduce","reduceRight","slice","some"].forEach(function(e){var t=Array.prototype[e];A(f.prototype,e,function(){return this.$mobx.atom.reportObserved(),t.apply(this.$mobx.values,arguments)})});var Wt={configurable:!0,enumerable:!1,set:Ee(0),get:Ve(0)};De(1e3),e.fastArray=gt,e.isObservableArray=K;var Kt={},O=function(){function e(e,n){var t=this;this.$mobx=Kt,this._data={},this._hasMap={},this.name="ObservableMap@"+s(),this._keys=new f(null,r.Reference,this.name+".keys()",!0),this.interceptors=null,this.changeListeners=null,this._valueMode=wt(n),this._valueMode===r.Flat&&(this._valueMode=r.Reference),Ye(!0,function(){w(e)?t.merge(e):Array.isArray(e)&&e.forEach(function(e){var n=e[0],r=e[1];return t.set(n,r)})})}return e.prototype._has=function(e){return"undefined"!=typeof this._data[e]},e.prototype.has=function(e){return this.isValidKey(e)?(e=""+e,this._hasMap[e]?this._hasMap[e].get():this._updateHasMapEntry(e,!1).get()):!1},e.prototype.set=function(e,t){this.assertValidKey(e),e=""+e;var n=this._has(e);if(p(t,"[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"),S(this)){var r=R(this,{type:n?"update":"add",object:this,newValue:t,name:e});if(!r)return;t=r.newValue}n?this._updateValue(e,t):this._addValue(e,t)},e.prototype.delete=function(e){var t=this;if(this.assertValidKey(e),e=""+e,S(this)){var n=R(this,{type:"delete",object:this,name:e});if(!n)return}if(this._has(e)){var r=i(),o=d(this),n=o||r?{type:"delete",object:this,oldValue:this._data[e].value,name:e}:null;r&&c(n),L(function(){t._keys.remove(e),t._updateHasMapEntry(e,!1);var n=t._data[e];n.setNewValue(void 0),t._data[e]=void 0},void 0,!1),o&&h(this,n),r&&u()}},e.prototype._updateHasMapEntry=function(t,n){var e=this._hasMap[t];return e?e.setNewValue(n):e=this._hasMap[t]=new I(n,r.Reference,this.name+"."+t+"?",!1),e},e.prototype._updateValue=function(r,e){var t=this._data[r];if(e=t.prepareNewValue(e),e!==M){var n=i(),o=d(this),a=o||n?{type:"update",object:this,oldValue:t.value,name:r,newValue:e}:null;n&&c(a),t.setNewValue(e),o&&h(this,a),n&&u()}},e.prototype._addValue=function(e,n){var t=this;L(function(){var r=t._data[e]=new I(n,t._valueMode,t.name+"."+e,!1);n=r.value,t._updateHasMapEntry(e,!0),t._keys.push(e)},void 0,!1);var r=i(),o=d(this),a=o||r?{type:"add",object:this,name:e,newValue:n}:null;r&&c(a),o&&h(this,a),r&&u()},e.prototype.get=function(e){return e=""+e,this.has(e)?this._data[e].get():void 0},e.prototype.keys=function(){return B(this._keys.slice())},e.prototype.values=function(){return B(this._keys.map(this.get,this))},e.prototype.entries=function(){var e=this;return B(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 L(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])})},void 0,!1),this},e.prototype.clear=function(){var e=this;L(function(){Se(function(){e.keys().forEach(e.delete,e)})},void 0,!1)},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.toJs=function(){return a("toJs is deprecated, use toJS instead"),this.toJS()},e.prototype.toJSON=function(){return this.toJS()},e.prototype.isValidKey=function(e){return null===e||void 0===e?!1:"string"!=typeof e&&"number"!=typeof e&&"boolean"!=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 this.name+"[{ "+this.keys().map(function(t){return t+": "+e.get(t)}).join(", ")+" }]"},e.prototype.observe=function(e,t){return n(t!==!0,"`observe` doesn't support the fire immediately property for observable maps."),W(this,e)},e.prototype.intercept=function(e){return z(this,e)},e}();e.ObservableMap=O,nt(O.prototype,function(){return this.entries()}),e.map=Me,e.isObservableMap=F;var je=function(){function e(e,t,n){this.target=e,this.name=t,this.mode=n,this.values={},this.changeListeners=null,this.interceptors=null}return e.prototype.observe=function(e,t){return n(t!==!0,"`observe` doesn't support the fire immediately property for observable objects."),W(this,e)},e.prototype.intercept=function(e){return z(this,e)},e}(),Ae={},st={};e.isObservableObject=v;var M={},I=function(t){function e(a,u,e,n){void 0===e&&(e="ObservableValue@"+s()),void 0===n&&(n=!0),t.call(this,e),this.mode=u,this.hasUnreportedChange=!1,this.value=void 0;var o=P(a,r.Recursive),c=o[0],l=o[1];this.mode===r.Recursive&&(this.mode=c),this.value=Y(l,this.mode,this.name),n&&i()&&x({type:"create",object:this,newValue:this.value})}return Re(e,t),e.prototype.set=function(e){var n=this.value;if(e=this.prepareNewValue(e),e!==M){var t=i();t&&c({type:"update",object:this,newValue:e,oldValue:n}),this.setNewValue(e),t&&u()}},e.prototype.prepareNewValue=function(e){if(p(e,"Modifiers cannot be used on non-initial values."),xe(),S(this)){var t=R(this,{object:this,type:"update",newValue:e});if(!t)return M;e=t.newValue}var n=_e(this.mode===r.Structure,this.value,e);return n?Y(e,this.mode,this.name):M},e.prototype.setNewValue=function(e){var t=this.value;this.value=e,this.reportChanged(),d(this)&&h(this,[e,t])},e.prototype.get=function(){return this.reportObserved(),this.value},e.prototype.intercept=function(e){return z(this,e)},e.prototype.observe=function(e,t){return t&&e(this.value,void 0),W(this,e)},e.prototype.toJSON=function(){return this.get()},e.prototype.toString=function(){return this.name+"["+this.value+"]"},e}(C),$e="__$$iterating",en=function(){function e(){this.listeners=[],a("extras.SimpleEventEmitter is deprecated and will be removed in the next major release")}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),X(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=en;var D=[];Object.freeze(D);var j,ut=[],et=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(i,l){if(!t[i]){if(!e[i]){var u="function"==typeof require&&require;if(!l&&u)return u(i,!0);if(o)return o(i,!0);var c=new Error("Cannot find module '"+i+"'");throw c.code="MODULE_NOT_FOUND",c}var s=t[i]={exports:{}};e[i][0].call(s.exports,function(t){var n=e[i][1][t];return r(n?n:t)},s,s.exports,a,e,t,n)}return t[i].exports}for(var o="function"==typeof require&&require,i=0;i<n.length;i++)r(n[i]);return r}({1:[function(t,n,e){(function(x){"use strict";function te(t,o,u){var i,e,r;"string"==typeof t?(i=t,e=o,r=u):"function"==typeof t&&(i=t.name||"Autorun@"+a(),e=t,r=o),p(e,"autorun methods cannot have modifiers"),n("function"==typeof e,"autorun expects a function"),n(0===e.length,"autorun expects a function without arguments"),r&&(e=e.bind(r));var s=new v(i,function(){this.track(e)});return s.schedule(),s.getDisposer()}function ut(e,s,u,l){var r,i,o,t;"string"==typeof e?(r=e,i=s,o=u,t=l):"function"==typeof e&&(r="When@"+a(),i=e,o=s,t=u);var c=!1,n=te(r,function(){if(i.call(t)){n?n():c=!0;var e=I();o.call(t),C(e)}});return c&&n(),n}function un(e,t,n){return s("`autorunUntil` is deprecated, please use `when`."),ut.apply(null,arguments)}function sn(e,u,c,l){var o,t,n,r;"string"==typeof e?(o=e,t=u,n=c,r=l):"function"==typeof e&&(o=e.name||"AutorunAsync@"+a(),t=e,n=u,r=c),void 0===n&&(n=1),r&&(t=t.bind(r));var s=!1,i=new v(o,function(){s||(s=!0,setTimeout(function(){s=!1,i.isDisposed||i.track(t)},n))});return i.schedule(),i.getDisposer()}function an(o,p,w,g,b,_){function m(){if(!l.isDisposed){var e=!1;l.track(function(){var t=d();e=_e(x,s,t),s=t}),u&&n&&t(s),u||e!==!0||t(s),u&&(u=!1)}}var c,f,t,n,e,i;"string"==typeof o?(c=o,f=p,t=w,n=g,e=b,i=_):(c=o.name||p.name||"Reaction@"+a(),f=o,t=p,n=w,e=g,i=b),void 0===n&&(n=!1),void 0===e&&(e=0);var y=$(f,r.Reference),R=y[0],d=y[1],x=R===r.Structure;i&&(d=d.bind(i),t=he(c,t.bind(i)));var u=!0,h=!1,s=void 0,l=new v(c,function(){1>e?m():h||(h=!0,setTimeout(function(){h=!1,m()},e))});return l.schedule(),l.getDisposer()}function me(e,t,r,i){return arguments.length<3&&"function"==typeof e?rn(e,t):(n(!r||!r.set,"@observable properties cannot have a setter: "+t),_t.apply(null,arguments))}function rn(n,i){var e=$(n,r.Recursive),o=e[0],t=e[1];return new y(t,i,o===r.Structure,t.name)}function Xe(){throw new Error("[ComputedValue] It is not allowed to assign new values to computed properties.")}function nn(e,i){n("function"==typeof e&&1===e.length,"createTransformer expects a function that accepts one argument");var r={},o=t.resetId,a=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 pe(n,t),n.prototype.onBecomeUnobserved=function(){var e=this.value;t.prototype.onBecomeUnobserved.call(this),delete r[this.sourceIdentifier],i&&i(e,this.sourceObject)},n}(y);return function(i){o!==t.resetId&&(r={},o=t.resetId);var n=tn(i),e=r[n];return e?e.get():(e=r[n]=new a(n,i),e.get())}}function tn(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=a(),_(e,"$transformId",t)),t}function en(e,t){return ve()||console.warn("[mobx.expr] 'expr' should only be used inside other reactive functions."),me(e,t).get()}function ue(e){for(var i=[],t=1;t<arguments.length;t++)i[t-1]=arguments[t];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 A),"extendObservable should not be used on maps, use map.merge instead"),i.forEach(function(t){n("object"==typeof t,"all arguments of extendObservable should be objects"),Se(e,t,r.Recursive,null)}),e}function Se(e,t,r,i){var o=ie(e,i,r);for(var n in t)if(t.hasOwnProperty(n)){if(e===t&&!Ke(e,n))continue;gt(o,n,t[n])}return e}function Zt(e,t){return Ce(b(e,t))}function Ce(e){var t={name:e.name};return e.observing&&e.observing.length>0&&(t.dependencies=z(e.observing).map(Ce)),t}function Yt(e,t){return Fe(b(e,t))}function Fe(e){var t={name:e.name};return e.observers&&!e.observers.isEmpty()&&(t.observers=z(e.observers.asArray()).map(Fe)),t}function Ht(e,t,n){return"function"==typeof n?He(e,t,n):Xt(e,t)}function Xt(e,t){return w(e)&&!g(e)?(s("Passing plain objects to intercept / observe is deprecated and will be removed in 3.0"),m(Re(e)).intercept(t)):m(e).intercept(t)}function He(e,t,n){return w(e)&&!g(e)?(s("Passing plain objects to intercept / observe is deprecated and will be removed in 3.0"),ue(e,{property:e[t]}),He(e,t,n)):m(e,t).intercept(n)}function K(e,t){if(null===e||void 0===e)return!1;if(void 0!==t){if(e instanceof A||e instanceof f)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 V||e instanceof v||e instanceof y}function Bt(r,e,t){return n(arguments.length>=2&&arguments.length<=3,"Illegal decorator config",e),Ge(r,e),n(!t||!t.get,"@observable can not be used on getters, use @computed instead"),Rt.apply(null,arguments)}function Re(e,u){if(void 0===e&&(e=void 0),"string"==typeof arguments[1])return Bt.apply(null,arguments);if(n(arguments.length<3,"observable expects zero, one or two arguments"),K(e))return e;var a=$(e,r.Recursive),t=a[0],i=a[1],c=t===r.Reference?o.Reference:Wt(i);switch(c){case o.Array:case o.PlainObject:return H(i,t);case o.Reference:case o.ComplexObject:return new j(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 s("Use `computed(expr)` instead of `observable(expr)`"),me(e,u)}n(!1,"Illegal State")}function Wt(e){return null===e||void 0===e?o.Reference:"function"==typeof e?e.length?o.ComplexFunction:o.ViewFunction:Array.isArray(e)||e instanceof f?o.Array:"object"==typeof e?w(e)?o.PlainObject:o.ComplexObject:o.Reference}function Gt(t,n,e,r){return"function"==typeof e?Ae(t,n,e,r):Ft(t,n,e)}function Ft(e,t,n){return w(e)&&!g(e)?(s("Passing plain objects to intercept / observe is deprecated and will be removed in 3.0"),m(Re(e)).observe(t,n)):m(e).observe(t,n)}function Ae(e,t,n,r){return w(e)&&!g(e)?(s("Passing plain objects to intercept / observe is deprecated and will be removed in 3.0"),ue(e,{property:e[t]}),Ae(e,t,n,r)):m(e,t).observe(n,r)}function k(e,n,t){function o(r){return n&&t.push([e,r]),r}if(void 0===n&&(n=!0),void 0===t&&(t=null),e instanceof Date||e instanceof RegExp)return e;if(n&&null===t&&(t=[]),n&&null!==e&&"object"==typeof e)for(var r=0,s=t.length;s>r;r++)if(t[r][0]===e)return t[r][1];if(!e)return e;if(Array.isArray(e)||e instanceof f){var i=o([]),a=e.map(function(e){return k(e,n,t)});i.length=a.length;for(var r=0,s=a.length;s>r;r++)i[r]=a[r];return i}if(e instanceof A){var u=o({});return e.forEach(function(e,r){return u[r]=k(e,n,t)}),u}if(K(e)&&e.$mobx instanceof j)return k(e(),n,t);if(e instanceof j)return k(e.get(),n,t);if("object"==typeof e){var i=o({});for(var c in e)i[c]=k(e[c],n,t);return i}return e}function Ut(n,e,t){return void 0===e&&(e=!0),void 0===t&&(t=null),s("toJSON is deprecated. Use toJS instead"),k.apply(null,arguments)}function ce(e){return console.log(e),e}function Nt(e,r){switch(arguments.length){case 0:if(e=t.derivationStack[t.derivationStack.length-1],!e)return ce("whyRun() can only be used if a derivation is active, or by passing an computed value / reaction explicitly. If you invoked whyRun from inside a computation; the computation is currently suspended but re-evaluating because somebody requested it's value.");break;case 2:e=b(e,r)}return e=b(e),e instanceof y?ce(e.whyRun()):e instanceof v?ce(e.whyRun()):void n(!1,"whyRun can only be used on reactions and computed values")}function he(e,t,n,r){return 1===arguments.length&&"function"==typeof e?de(e.name||"<unnamed action>",e):2===arguments.length&&"function"==typeof t?de(e,t):1===arguments.length&&"string"==typeof e?qe(e):qe(t).apply(null,arguments)}function qe(e){return function(n,r,t){return t&&"function"==typeof t.value?(t.value=de(e,t.value),t.enumerable=!1,t):Ot(e).apply(this,arguments)}}function Qe(e){return"function"==typeof e&&e.isMobxAction===!0}function Mt(e,i,o){var t="string"==typeof e?e:e.name||"<unnamed action>",r="function"==typeof e?e:i,a="function"==typeof e?i:o;return n("function"==typeof r,"`runInAction` expects a function"),n(0===r.length,"`runInAction` expects a function without arguments"),n("string"==typeof t&&t.length>0,"actions should have valid names, got: '"+t+"'"),tt(t,r,a,void 0)}function de(e,t){n("function"==typeof t,"`action` can only be invoked on functions"),n("string"==typeof e&&e.length>0,"actions should have valid names, got: '"+e+"'");var r=function(){return tt(e,t,this,arguments)};return r.isMobxAction=!0,r}function tt(p,f,o,e){var d=t.derivationStack;n(!(d[d.length-1]instanceof y),"Computed values or transformers should not invoke actions or trigger other side effects");var u,s=i();if(s){u=Date.now();var a=e&&e.length||0,h=new Array(a);if(a>0)for(var r=0;a>r;r++)h[r]=e[r];l({type:"action",name:p,fn:f,target:o,arguments:h})}var v=I();it(p,o,!1);var m=X(!0);try{return f.apply(o,e)}finally{Q(m),ot(!1),C(v),s&&c({time:Date.now()-u})}}function cn(e){n(0===t.derivationStack.length,"It is not allowed to set `useStrict` when a derivation is running"),t.strictMode=e,t.allowStateChanges=!e}function at(e,t){var n=X(e),r=t();return Q(n),r}function X(e){var n=t.allowStateChanges;return t.allowStateChanges=e,n}function Q(e){t.allowStateChanges=e}function ct(e){n(e.isDirty,"atom not dirty"),e.isDirty=!1,ge(e,!0)}function ve(){return t.derivationStack.length>0&&t.isTracking}function ye(){t.allowStateChanges||n(!1,t.strictMode?"It is not allowed to create or change state outside an `action` when MobX is in strict mode. Wrap the current method in `action` if this state change is intended":"It is not allowed to change the state when a computed value or transformer is being evaluated. Use 'autorun' to create reactive functions with side-effects.")}function zt(e){1===++e.dependencyStaleCount&&Ue(e)}function Tt(e,t){if(n(e.dependencyStaleCount>0,"unexpected ready notification"),t&&(e.dependencyChangeCount+=1),0===--e.dependencyStaleCount)if(e.dependencyChangeCount>0){e.dependencyChangeCount=0;var r=e.onDependenciesReady();ge(e,r)}else ge(e,!1)}function ke(e,s){var n=e.observing;e.observing=new Array(n.length+100),e.l=0,e.runId=++Et,t.derivationStack.push(e);var u=t.isTracking;t.isTracking=!0;var r,o=!0;try{r=s.call(e),o=!1}finally{if(o){var a="[mobx] An uncaught exception occurred while calculating your computed value, autorun or transformer. Or inside the render() method of an observer based React component. These functions should never throw exceptions as MobX will not always be able to recover from them. "+("Please fix the error reported after this message or enable 'Pause on (caught) exceptions' in your debugger to find the root cause. In: '"+e.name+"'");i()&&S({type:"error",object:this,message:a}),console.warn(a),e.l=0,e.observing=n,xe()}else t.isTracking=u,t.derivationStack.length-=1,Lt(e,n)}return r}function Lt(n,r){for(var i=r.length,o=n.observing,a=o.length=n.l,e=0;i>e;e++)r[e].diffValue--;for(var e=0;a>e;e++){var t=o[e];++t.diffValue>0&&(t.diffValue=0,Ct(t,n))}for(var e=0;i>e;e++){var t=r[e];t.diffValue<0&&(t.diffValue=0,Me(t,n))}}function Ie(e){e.observing.forEach(function(t){return Me(t,e)}),e.observing.length=0,e.l=0}function je(e){var t=I(),n=e();return C(t),n}function I(){var e=t.isTracking;return t.isTracking=!1,e}function C(e){t.isTracking=e}function Dt(){}function xe(){t.resetId++;var n=new Ve;for(var e in n)-1===Vt.indexOf(e)&&(t[e]=n[e]);t.allowStateChanges=!t.strictMode}function Ct(e,t){var n=e.observers.isEmpty();e.observers.add(t),n&&e.onBecomeObserved()}function Me(e,t){e.observers.remove(t),e.observers.isEmpty()&&e.onBecomeUnobserved()}function Ne(n){if(t.isTracking!==!1){var e=t.derivationStack[t.derivationStack.length-1];e.runId!==n.laRunId&&(n.laRunId=e.runId,e.observing[e.l++]=n)}}function Ue(e){var t=e.observers.asArray();t.forEach(zt),e.staleObservers=e.staleObservers.concat(t)}function ge(e,t){e.staleObservers.splice(0).forEach(function(e){return Tt(e,t)})}function be(){if(!(t.isRunningReactions===!0||t.inTransaction>0)){t.isRunningReactions=!0;for(var e=t.pendingReactions,i=0;e.length>0;){if(++i===$t)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,o=r.length;o>n;n++)r[n].runReaction()}t.isRunningReactions=!1}}function i(){return M}function S(r){if(!M)return!1;for(var n=t.spyListeners,e=0,i=n.length;i>e;e++)n[e](r)}function l(e){var t=ft({},e,{spyReportStart:!0});S(t)}function c(e){S(e?ft({},e,nt):nt)}function Ze(e){return t.spyListeners.push(e),M=t.spyListeners.length>0,N(function(){var n=t.spyListeners.indexOf(e);-1!==n&&t.spyListeners.splice(n,1),M=t.spyListeners.length>0})}function It(e){return s("trackTransitions is deprecated. Use mobx.spy instead"),"boolean"==typeof e&&(s("trackTransitions only takes a single callback function. If you are using the mobx-react-devtools, please update them first"),e=arguments[1]),e?Ze(e):(s("trackTransitions without callback has been deprecated and is a no-op now. If you are using the mobx-react-devtools, please update them first"),function(){})}function D(n,e,t){void 0===e&&(e=void 0),void 0===t&&(t=!0),it(n.name||"anonymous transaction",e,t);var r=n.call(e);return ot(t),r}function it(r,e,n){void 0===e&&(e=void 0),void 0===n&&(n=!0),t.inTransaction+=1,n&&i()&&l({type:"transaction",target:e,name:r})}function ot(e){if(void 0===e&&(e=!0),0===--t.inTransaction){for(var r=t.changedAtoms.splice(0),n=0,o=r.length;o>n;n++)ct(r[n]);be()}e&&i()&&c()}function O(e){return e.interceptors&&e.interceptors.length>0}function U(t,n){var e=t.interceptors||(t.interceptors=[]);return e.push(n),N(function(){var t=e.indexOf(n);-1!==t&&e.splice(t,1)})}function R(i,e){for(var o=I(),r=i.interceptors,t=0,a=r.length;a>t;t++)if(e=r[t](e),n(!e||e.type,"Intercept handlers should return nothing or a change object"),!e)return null;return C(o),e}function d(e){return e.changeListeners&&e.changeListeners.length>0}function G(t,n){var e=t.changeListeners||(t.changeListeners=[]);return e.push(n),N(function(){var t=e.indexOf(n);-1!==t&&e.splice(t,1)})}function h(r,n){var i=I(),e=r.changeListeners;if(e){e=e.slice();for(var t=0,o=e.length;o>t;t++)Array.isArray(n)?e[t].apply(null,n):e[t](n);C(i)}}function se(e){return new ee(e)}function oe(e){return new W(e)}function Oe(e){return new re(e)}function At(e,t){return Pe(e,t)}function $(e,t){return e instanceof ee?[r.Reference,e.value]:e instanceof W?[r.Structure,e.value]:e instanceof re?[r.Flat,e.value]:[t,e]}function kt(e){return e===se?r.Reference:e===oe?r.Structure:e===Oe?r.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),r.Recursive)}function H(e,a,o){var t;if(K(e))return e;switch(a){case r.Reference:return e;case r.Flat:p(e,"Items inside 'asFlat' cannot have modifiers"),t=r.Reference;break;case r.Structure:p(e,"Items inside 'asStructure' cannot have modifiers"),t=r.Structure;break;case r.Recursive:i=$(e,r.Recursive),t=i[0],e=i[1];break;default:n(!1,"Illegal State")}return Array.isArray(e)?Te(e,t,o):w(e)&&Object.isExtensible(e)?Se(e,e,t,o):e;var i}function p(e,t){if(e instanceof ee||e instanceof W||e instanceof re)throw new Error("[mobx] asStructure / asReference / asFlat cannot be used here. "+t)}function St(e){var t=dt(e),n=De(e);Object.defineProperty(f.prototype,""+e,{enumerable:!1,configurable:!0,set:t,get:n})}function dt(e){return function(t){var n=this.$mobx,i=n.values;if(p(t,"Modifiers cannot be used on array values. For non-reactive array values use makeReactive(asFlat(array))."),e<i.length){ye();var o=i[e];if(O(n)){var a=R(n,{type:"update",object:n.array,index:e,newValue:t});if(!a)return;t=a.newValue}t=n.makeReactiveArrayItem(t);var s=n.mode===r.Structure?!B(o,t):o!==t;s&&(i[e]=t,n.notifyArrayChildUpdate(e,t,o))}else{if(e!==i.length)throw new Error("[mobx.array] Index out of bounds, "+e+" is larger than "+i.length);n.spliceWithArray(e,0,[t])}}}function De(e){return function(){var t=this.$mobx;return t&&e<t.values.length?(t.atom.reportObserved(),t.values[e]):void console.warn("[mobx.array] Attempt to read an array index ("+e+") that is out of bounds ("+t.values.length+"). Please check length first. Out of bound indices will not be tracked by MobX")}}function Le(t){for(var e=ne;t>e;e++)St(e);ne=t}function Te(e,t,n){return new f(e,t,n)}function xt(e){return s("fastArray is deprecated. Please use `observable(asFlat([]))`"),Te(e,r.Flat,null)}function Y(e){return e instanceof f}function Pe(e,t){return new A(e,t)}function q(e){return e instanceof A}function ie(e,t,n){if(void 0===n&&(n=r.Recursive),g(e))return e.$mobx;w(e)||(t=e.constructor.name+"@"+a()),t||(t="ObservableObject@"+a());var i=new Be(e,t,n);return P(e,"$mobx",i),i}function gt(e,t,n){e.values[t]?e.target[t]=n:ae(e,t,n,!0)}function ae(t,n,e,a){a&&Ge(t.target,n);var r,i=t.name+"."+n,o=!0;if("function"!=typeof e||0!==e.length||Qe(e))if(e instanceof W&&"function"==typeof e.value&&0===e.value.length)r=new y(e.value,t.target,!0,i);else{if(o=!1,O(t)){var s=R(t,{object:t.target,name:n,type:"add",newValue:e});if(!s)return;e=s.newValue}r=new j(e,t.mode,i,!1),e=r.value}else r=new y(e,t.target,!1,i);t.values[n]=r,a&&Object.defineProperty(t.target,n,o?mt(n):bt(n)),o||yt(t,t.target,n,e)}function bt(e){var t=$e[e];return t?t:$e[e]={configurable:!0,enumerable:!0,get:function(){return this.$mobx.values[e].get()},set:function(t){We(this,e,t)}}}function mt(e){var t=Ee[e];return t?t:Ee[e]={configurable:!0,enumerable:!1,get:function(){return this.$mobx.values[e].get()},set:Xe}}function We(r,o,e){var t=r.$mobx,a=t.values[o];if(O(t)){var n=R(t,{type:"update",object:r,name:o,newValue:e});if(!n)return;e=n.newValue}if(e=a.prepareNewValue(e),e!==T){var u=d(t),s=i(),n=h||d?{type:"update",object:r,oldValue:a.value,name:o,newValue:e}:null;s&&l(n),a.setNewValue(e),u&&h(t,n),s&&c()}}function yt(t,o,a,s){var n=d(t),e=i(),r=n||e?{type:"add",object:o,name:a,newValue:s}:null;e&&l(r),n&&h(t,r),e&&c()}function g(e){return"object"==typeof e&&null!==e?(L(e),e.$mobx instanceof Be):!1}function b(e,t){if("object"==typeof e&&null!==e){if(Y(e))return n(void 0===t,"It is not possible to get index atoms from arrays"),e.$mobx.atom;if(q(e)){if(void 0===t)return b(e._keys);var r=e._data[t]||e._hasMap[t];return n(!!r,"the entry '"+t+"' does not exist in the observable map '"+le(e)+"'"),r}if(L(e),g(e)){n(!!t,"please specify a property");var i=e.$mobx.values[t];return n(!!i,"no observable property '"+t+"' found on the observable object '"+le(e)+"'"),i}if(e instanceof V||e instanceof y||e instanceof v)return e}else if("function"==typeof e&&e.$mobx instanceof v)return e.$mobx;n(!1,"Cannot obtain atom from "+e)}function m(e,t){return n(e,"Expection some object"),void 0!==t?m(b(e,t)):e instanceof V||e instanceof y||e instanceof v?e:q(e)?e:(L(e),e.$mobx?e.$mobx:void n(!1,"Cannot obtain administration from "+e))}function le(e,t){var n;return n=void 0!==t?b(e,t):g(e)||q(e)?m(e):b(e),n.name}function fe(e,r,i,o,a){function t(u,t,s,c){if(n(a||et(arguments),"This function is a decorator, but it wasn't invoked like a decorator"),s){u.hasOwnProperty("__mobxLazyInitializers")||_(u,"__mobxLazyInitializers",u.__mobxLazyInitializers&&u.__mobxLazyInitializers.slice()||[]);var f=s.value,l=s.initializer;return u.__mobxLazyInitializers.push(function(n){e(n,t,l?l.call(n):f,c,s)}),{enumerable:o,configurable:!0,get:function(){return this.__mobxDidRunLazyInitializers!==!0&&L(this),r.call(this,t)},set:function(e){this.__mobxDidRunLazyInitializers!==!0&&L(this),i.call(this,t,e)}}}var p={enumerable:o,configurable:!0,get:function(){return this.__mobxInitializedProps&&this.__mobxInitializedProps[t]===!0||Ye(this,t,void 0,e,c,s),r.call(this,t)},set:function(n){this.__mobxInitializedProps&&this.__mobxInitializedProps[t]===!0?i.call(this,t,n):Ye(this,t,n,e,c,s)}};return arguments.length<3&&Object.defineProperty(u,t,s),p}return a?function(){if(et(arguments))return t.apply(null,arguments);var e=arguments;return function(n,r,i){return t(n,r,i,e)}}:t}function Ye(e,t,n,r,i,o){e.hasOwnProperty("__mobxInitializedProps")||_(e,"__mobxInitializedProps",{}),e.__mobxInitializedProps[t]=!0,r(e,t,n,i,o)}function L(e){e.__mobxDidRunLazyInitializers!==!0&&e.__mobxLazyInitializers&&(_(e,"__mobxDidRunLazyInitializers",!0),e.__mobxDidRunLazyInitializers&&e.__mobxLazyInitializers.forEach(function(t){return t(e)}))}function et(e){return(2===e.length||3===e.length)&&"string"==typeof e[1]}function Pt(){return"function"==typeof Symbol&&Symbol.iterator||"@@iterator"}function Z(e){n(e[st]!==!0,"Illegal state: cannot recycle array as iterator"),P(e,st,!0);var t=-1;return P(e,"next",function(){return t++,{done:t>=this.length,value:t<this.length?this[t]:void 0}}),e}function rt(e,t){P(e,Pt(),t)}function a(){return++t.mobxGuid}function n(t,n,e){if(!t)throw new Error("[mobx] Invariant failed: "+n+(e?" in '"+e+"'":""))}function s(e){-1===lt.indexOf(e)&&(lt.push(e),console.error("[mobx] Deprecated: "+e))}function N(t){var e=!1;return function(){return e?void 0:(e=!0,t.apply(this,arguments))}}function z(t){var e=[];return t.forEach(function(t){-1===e.indexOf(t)&&e.push(t)}),e}function we(t,e,n){if(void 0===e&&(e=100),void 0===n&&(n=" - "),!t)return"";var r=t.slice(0,e);return""+r.join(n)+(t.length>e?" (... and "+(t.length-e)+"more)":"")}function w(e){return null!==e&&"object"==typeof e&&Object.getPrototypeOf(e)===Object.prototype}function ft(){for(var r=arguments[0],e=1,i=arguments.length;i>e;e++){var t=arguments[e];for(var n in t)t.hasOwnProperty(n)&&(r[n]=t[n])}return r}function _e(n,e,t){return n?!B(e,t):e!==t}function vt(n,t){for(var e=0;e<t.length;e++)_(n,t[e],n[t[e]])}function _(e,t,n){Object.defineProperty(e,t,{enumerable:!1,writable:!0,configurable:!0,value:n})}function P(e,t,n){Object.defineProperty(e,t,{enumerable:!1,writable:!1,configurable:!1,value:n})}function Ke(t,n){var e=Object.getOwnPropertyDescriptor(t,n);return!e||e.configurable!==!1&&e.writable!==!1}function Ge(t,e){n(Ke(t,e),"Cannot make property '"+e+"' observable, it is not configurable and writable in the target object")}function Je(t){var e=[];for(var n in t)e.push(n);return e}function B(e,t){if(null===e&&null===t)return!0;if(void 0===e&&void 0===t)return!0;var i=Array.isArray(e)||Y(e);if(i!==(Array.isArray(t)||Y(t)))return!1;if(i){if(e.length!==t.length)return!1;for(var n=e.length-1;n>=0;n--)if(!B(e[n],t[n]))return!1;return!0}if("object"==typeof e&&"object"==typeof t){if(null===e||null===t)return!1;if(Je(e).length!==Je(t).length)return!1;for(var r in e){if(!(r in t))return!1;if(!B(e[r],t[r]))return!1}return!0}return e===t}function wt(e,t){return t&&t.length?e&&e.length?(t.forEach(function(e){return e.__diff=0}),e.forEach(function(e){return e.__diff=0}),t.forEach(function(e){return e.__diff-=1}),e.forEach(function(e){return e.__diff+=1}),[e.filter(function(e){return 1===e.__diff}),t.filter(function(e){return-1===e.__diff})]):[[],t]:[e,[]]}var pe=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)};Dt(),e.extras={allowStateChanges:at,getAtom:b,getDebugName:le,getDependencyTree:Zt,getObserverTree:Yt,isComputingDerivation:ve,isSpyEnabled:i,resetGlobalState:xe,spyReport:S,spyReportEnd:c,spyReportStart:l,trackTransitions:It},e._={getAdministration:m,quickDiff:wt,resetGlobalState:xe},e.autorun=te,e.when=ut,e.autorunUntil=un,e.autorunAsync=sn,e.reaction=an;var _t=fe(function(o,a,c,e,s){var t=s.get;n("function"==typeof t,"@computed can only be used on getter functions, like: '@computed get myProps() { return ...; }'");var i=!1;e&&1===e.length&&e[0].asStructure===!0&&(i=!0);var u=ie(o,void 0,r.Recursive);ae(u,a,i?oe(t):t,!1)},function(e){return this.$mobx.values[e].get()},Xe,!1,!0);e.computed=me,e.createTransformer=nn,e.expr=en,e.extendObservable=ue,e.intercept=Ht,e.isObservable=K;var Rt=fe(function(t,n,e){var i=X(!0);"function"==typeof e&&(e=se(e));var o=ie(t,void 0,r.Recursive);ae(o,n,e,!0),Q(i)},function(e){return this.$mobx.values[e].get()},function(e,t){We(this,e,t)},!0,!1);e.observable=Re;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=Gt,e.toJS=k,e.toJSON=Ut,e.whyRun=Nt;var Ot=fe(function(r,t,n,e,a){var i=e&&1===e.length?e[0]:n.name||t||"<unnamed action>",o=he(i,n);_(r,t,o)},function(e){return this[e]},function(){n(!1,"It is not allowed to assign new values to @action fields")},!1,!0);e.action=he,e.isAction=Qe,e.runInAction=Mt,e.useStrict=cn;var V=function(){function e(e,t,n){void 0===e&&(e="Atom@"+a()),void 0===t&&(t=ht),void 0===n&&(n=ht),this.name=e,this.onBecomeObserved=t,this.onBecomeUnobserved=n,this.isDirty=!1,this.staleObservers=[],this.observers=new F,this.diffValue=0,this.laRunId=0}return e.prototype.reportObserved=function(){Ne(this)},e.prototype.reportChanged=function(){this.isDirty||(this.reportStale(),this.reportReady())},e.prototype.reportStale=function(){this.isDirty||(this.isDirty=!0,Ue(this))},e.prototype.reportReady=function(){n(this.isDirty,"atom not dirty"),t.inTransaction>0?t.changedAtoms.push(this):(ct(this),be())},e.prototype.toString=function(){return this.name},e}();e.Atom=V;var u,y=function(){function e(e,t,n,r){this.derivation=e,this.scope=t,this.compareStructural=n,this.isLazy=!0,this.isComputing=!1,this.staleObservers=[],this.observers=new F,this.observing=[],this.diffValue=0,this.runId=0,this.laRunId=0,this.l=0,this.__mapid="#"+a(),this.dependencyChangeCount=0,this.dependencyStaleCount=0,this.value=void 0,this.name=r||"ComputedValue@"+a()}return e.prototype.peek=function(){this.isComputing=!0;var e=X(!1),t=this.derivation.call(this.scope);return Q(e),this.isComputing=!1,t},e.prototype.onBecomeObserved=function(){},e.prototype.onBecomeUnobserved=function(){Ie(this),this.isLazy=!0,this.value=void 0},e.prototype.onDependenciesReady=function(){var e=this.trackAndCompute();return e},e.prototype.get=function(){if(n(!this.isComputing,"Cycle detected in computation "+this.name,this.derivation),Ne(this),this.dependencyStaleCount>0)return this.peek();if(this.isLazy){if(!ve())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(){i()&&S({object:this,type:"compute",fn:this.derivation,target:this.scope});var e=this.value,t=this.value=ke(this,this.peek);return _e(this.compareStructural,t,e)},e.prototype.observe=function(n,r){var i=this,e=!0,t=void 0;return te(function(){var o=i.get();if(!e||r){var a=I();n(o,t),C(a)}e=!1,t=o})},e.prototype.toJSON=function(){return this.get()},e.prototype.toString=function(){return this.name+"["+this.derivation.toString()+"]"},e.prototype.whyRun=function(){var n=t.derivationStack.length>0,o=z(this.observing).map(function(e){return e.name}),r=z(this.observers.asArray()).map(function(e){return e.name}),e=this.isComputing?n?this.observers.isEmpty()?u.REQUIRED:u.INVALIDATED:u.PEEK:u.NOT_RUNNING;if(e===u.REQUIRED){var i=t.derivationStack[t.derivationStack.length-2];i&&r.push(i.name)}return"\nWhyRun? computation '"+this.name+"':\n * Running because: "+jt[e]+" "+(e===u.NOT_RUNNING&&this.dependencyStaleCount>0?"(a next run is scheduled)":"")+"\n"+(this.isLazy?" * This computation is suspended (not in use by any reaction) and won't run automatically.\n Didn't expect this computation to be suspended at this point?\n 1. Make sure this computation is used by a reaction (reaction, autorun, observer).\n 2. Check whether you are using this computation synchronously (in the same stack as they reaction that needs it).\n":" * This computation will re-run if any of the following observables changes:\n "+we(o)+"\n "+(this.isComputing&&n?" (... or any observable accessed during the remainder of the current run)":"")+"\n Missing items in this list?\n 1. Check whether all used values are properly marked as observable (use isObservable to verify)\n 2. Make sure you didn't dereference values too early. MobX observes props, not primitives. E.g: use 'person.name' instead of 'name' in your computation.\n * If the outcome of this computation changes, the following observers will be re-run:\n "+we(r)+"\n")},e}();!function(e){e[e.PEEK=0]="PEEK",e[e.INVALIDATED=1]="INVALIDATED",e[e.REQUIRED=2]="REQUIRED",e[e.NOT_RUNNING=3]="NOT_RUNNING"}(u||(u={}));var jt=(E={},E[u.PEEK]="[peek] The value of this computed value was requested outside an reaction",E[u.INVALIDATED]="[invalidated] Some observables used by this computation did change",E[u.REQUIRED]="[started] This computation is required by another computed value / reaction",E[u.NOT_RUNNING]="[idle] This compution is currently not running",E),Et=1;e.untracked=je;var ze,Vt=["mobxGuid","resetId","spyListeners","strictMode"],Ve=function(){function e(){this.version=2,this.derivationStack=[],this.mobxGuid=0,this.inTransaction=0,this.isTracking=!1,this.isRunningReactions=!1,this.changedAtoms=[],this.pendingReactions=[],this.allowStateChanges=!0,this.strictMode=!1,this.resetId=0,this.spyListeners=[]}return e}(),t=function(){var e=new Ve;if(x.__mobservableTrackingStack||x.__mobservableViewStack)throw new Error("[mobx] An incompatible version of mobservable is already loaded.");if(x.__mobxGlobal&&x.__mobxGlobal.version!==e.version)throw new Error("[mobx] An incompatible version of mobx is already loaded.");return x.__mobxGlobal?x.__mobxGlobal:x.__mobxGlobal=e}(),v=function(){function e(e,t){void 0===e&&(e="Reaction@"+a()),this.name=e,this.onInvalidate=t,this.staleObservers=J,this.observers=ze||(ze=new F),this.observing=[],this.diffValue=0,this.runId=0,this.laRunId=0,this.l=0,this.__mapid="#"+a(),this.dependencyChangeCount=0,this.dependencyStaleCount=0,this.isDisposed=!1,this._isScheduled=!1,this._isTrackPending=!1,this._isRunning=!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),be())},e.prototype.isScheduled=function(){return this.dependencyStaleCount>0||this._isScheduled},e.prototype.runReaction=function(){this.isDisposed||(this._isScheduled=!1,this._isTrackPending=!0,this.onInvalidate(),this._isTrackPending&&i()&&S({object:this,type:"scheduled-reaction"}))},e.prototype.track=function(e){var t,n=i();n&&(t=Date.now(),l({object:this,type:"reaction",fn:e})),this._isRunning=!0,ke(this,e),this._isRunning=!1,this._isTrackPending=!1,n&&c({time:Date.now()-t})},e.prototype.dispose=function(){this.isDisposed||(this.isDisposed=!0,Ie(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.prototype.whyRun=function(){var e=z(this.observing).map(function(e){return e.name});return"\nWhyRun? reaction '"+this.name+"':\n * Status: ["+(this.isDisposed?"stopped":this._isRunning?"running":this.isScheduled()?"scheduled":"idle")+"]\n * This reaction will re-run if any of the following observables changes:\n "+we(e)+"\n "+(this._isRunning?" (... or any observable accessed during the remainder of the current run)":"")+"\n Missing items in this list?\n 1. Check whether all used values are properly marked as observable (use isObservable to verify)\n 2. Make sure you didn't dereference values too early. MobX observes props, not primitives. E.g: use 'person.name' instead of 'name' in your computation.\n";
},e}();e.Reaction=v;var $t=100,M=!1,nt={spyReportEnd:!0};e.spy=Ze,e.transaction=D;var r;!function(e){e[e.Recursive=0]="Recursive",e[e.Reference=1]="Reference",e[e.Structure=2]="Structure",e[e.Flat=3]="Flat"}(r||(r={})),e.asReference=se,e.asStructure=oe,e.asFlat=Oe;var ee=function(){function e(e){this.value=e,p(e,"Modifiers are not allowed to be nested")}return e}(),W=function(){function e(e){this.value=e,p(e,"Modifiers are not allowed to be nested")}return e}(),re=function(){function e(e){this.value=e,p(e,"Modifiers are not allowed to be nested")}return e}();e.asMap=At;var Jt=function(){var e=!1,t={};return Object.defineProperty(t,"0",{set:function(){e=!0}}),Object.create(t)[0]=1,e===!1}(),ne=0,pt=function(){function e(){}return e}();pt.prototype=[];var Kt=function(){function e(e,t,n,r){this.mode=t,this.array=n,this.owned=r,this.lastKnownLength=0,this.interceptors=null,this.changeListeners=null,this.atom=new V(e||"ObservableArray@"+a())}return e.prototype.makeReactiveArrayItem=function(e){return p(e,"Array values cannot have modifiers"),this.mode===r.Flat||this.mode===r.Reference?e:H(e,this.mode,this.atom.name+"[..]")},e.prototype.intercept=function(e){return U(this,e)},e.prototype.observe=function(t,e){return void 0===e&&(e=!1),e&&t({object:this.array,type:"splice",index:0,added:this.values.slice(),addedCount:this.values.length,removed:[],removedCount:0}),G(this,t)},e.prototype.getArrayLength=function(){return this.atom.reportObserved(),this.values.length},e.prototype.setArrayLength=function(e){if("number"!=typeof e||0>e)throw new Error("[mobx.array] Out of range: "+e);var t=this.values.length;e!==t&&(e>t?this.spliceWithArray(t,0,new Array(e-t)):this.spliceWithArray(e,t-e))},e.prototype.updateArrayLength=function(t,e){if(t!==this.lastKnownLength)throw new Error("[mobx] Modification exception: the internal structure of an observable array was changed. Did you use peek() to change it?");this.lastKnownLength+=e,e>0&&t+e+1>ne&&Le(t+e+1)},e.prototype.spliceWithArray=function(e,n,t){ye();var r=this.values.length;if(void 0===e?e=0:e>r?e=r:0>e&&(e=Math.max(0,r+e)),n=1===arguments.length?r-e:void 0===n||null===n?0:Math.max(0,Math.min(n,r-e)),void 0===t&&(t=[]),O(this)){var i=R(this,{object:this.array,type:"splice",index:e,removedCount:n,added:t});if(!i)return J;n=i.removedCount,t=i.added}t=t.map(this.makeReactiveArrayItem,this);var s=t.length-n;this.updateArrayLength(r,s);var o=(a=this.values).splice.apply(a,[e,n].concat(t));return(0!==n||0!==t.length)&&this.notifyArraySplice(e,t,o),o;var a},e.prototype.notifyArrayChildUpdate=function(r,o,a){var e=!this.owned&&i(),t=d(this),n=t||e?{object:this.array,type:"update",index:r,newValue:o,oldValue:a}:null;e&&l(n),this.atom.reportChanged(),t&&h(this,n),e&&c()},e.prototype.notifyArraySplice=function(a,t,n){var e=!this.owned&&i(),r=d(this),o=r||e?{object:this.array,type:"splice",index:a,removed:n,added:t,removedCount:n.length,addedCount:t.length}:null;e&&l(o),this.atom.reportChanged(),r&&h(this,o),e&&c()},e}(),f=function(t){function e(n,i,o,r){void 0===r&&(r=!1),t.call(this);var e=new Kt(o,i,this,r);P(this,"$mobx",e),n&&n.length?(e.updateArrayLength(0,n.length),e.values=n.map(e.makeReactiveArrayItem,e),e.notifyArraySplice(0,e.values.slice(),J)):e.values=[],Jt&&Object.defineProperty(e.array,"0",qt)}return pe(e,t),e.prototype.intercept=function(e){return this.$mobx.intercept(e)},e.prototype.observe=function(t,e){return void 0===e&&(e=!1),this.$mobx.observe(t,e)},e.prototype.clear=function(){return this.splice(0)},e.prototype.replace=function(e){return this.$mobx.spliceWithArray(0,this.$mobx.values.length,e)},e.prototype.toJS=function(){return this.slice()},e.prototype.toJSON=function(){return this.toJS()},e.prototype.peek=function(){return this.$mobx.values},e.prototype.find=function(r,i,t){void 0===t&&(t=0),this.$mobx.atom.reportObserved();for(var n=this.$mobx.values,o=n.length,e=t;o>e;e++)if(r.call(i,n[e],e,this))return n[e]},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 this.$mobx.spliceWithArray(t);case 2:return this.$mobx.spliceWithArray(t,n)}return this.$mobx.spliceWithArray(t,n,r)},e.prototype.push=function(){for(var n=[],e=0;e<arguments.length;e++)n[e-0]=arguments[e];var t=this.$mobx;return t.spliceWithArray(t.values.length,0,n),t.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];var n=this.$mobx;return n.spliceWithArray(0,0,t),n.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}(pt);rt(f.prototype,function(){return Z(this.slice())}),vt(f.prototype,["constructor","observe","clear","replace","toJSON","peek","find","splice","push","pop","shift","unshift","reverse","sort","remove","toString","toLocaleString"]),Object.defineProperty(f.prototype,"length",{enumerable:!1,configurable:!0,get:function(){return this.$mobx.getArrayLength()},set:function(e){this.$mobx.setArrayLength(e)}}),["concat","every","filter","forEach","indexOf","join","lastIndexOf","map","reduce","reduceRight","slice","some"].forEach(function(e){var t=Array.prototype[e];_(f.prototype,e,function(){return this.$mobx.atom.reportObserved(),t.apply(this.$mobx.values,arguments)})});var qt={configurable:!0,enumerable:!1,set:dt(0),get:De(0)};Le(1e3),e.fastArray=xt,e.isObservableArray=Y;var Qt={},A=function(){function e(e,n){var t=this;this.$mobx=Qt,this._data={},this._hasMap={},this.name="ObservableMap@"+a(),this._keys=new f(null,r.Reference,this.name+".keys()",!0),this.interceptors=null,this.changeListeners=null,this._valueMode=kt(n),this._valueMode===r.Flat&&(this._valueMode=r.Reference),at(!0,function(){w(e)?t.merge(e):Array.isArray(e)&&e.forEach(function(e){var n=e[0],r=e[1];return t.set(n,r)})})}return e.prototype._has=function(e){return"undefined"!=typeof this._data[e]},e.prototype.has=function(e){return this.isValidKey(e)?(e=""+e,this._hasMap[e]?this._hasMap[e].get():this._updateHasMapEntry(e,!1).get()):!1},e.prototype.set=function(e,t){this.assertValidKey(e),e=""+e;var n=this._has(e);if(p(t,"[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"),O(this)){var r=R(this,{type:n?"update":"add",object:this,newValue:t,name:e});if(!r)return;t=r.newValue}n?this._updateValue(e,t):this._addValue(e,t)},e.prototype.delete=function(e){var t=this;if(this.assertValidKey(e),e=""+e,O(this)){var n=R(this,{type:"delete",object:this,name:e});if(!n)return}if(this._has(e)){var r=i(),o=d(this),n=o||r?{type:"delete",object:this,oldValue:this._data[e].value,name:e}:null;r&&l(n),D(function(){t._keys.remove(e),t._updateHasMapEntry(e,!1);var n=t._data[e];n.setNewValue(void 0),t._data[e]=void 0},void 0,!1),o&&h(this,n),r&&c()}},e.prototype._updateHasMapEntry=function(t,n){var e=this._hasMap[t];return e?e.setNewValue(n):e=this._hasMap[t]=new j(n,r.Reference,this.name+"."+t+"?",!1),e},e.prototype._updateValue=function(r,e){var t=this._data[r];if(e=t.prepareNewValue(e),e!==T){var n=i(),o=d(this),a=o||n?{type:"update",object:this,oldValue:t.value,name:r,newValue:e}:null;n&&l(a),t.setNewValue(e),o&&h(this,a),n&&c()}},e.prototype._addValue=function(e,n){var t=this;D(function(){var r=t._data[e]=new j(n,t._valueMode,t.name+"."+e,!1);n=r.value,t._updateHasMapEntry(e,!0),t._keys.push(e)},void 0,!1);var r=i(),o=d(this),a=o||r?{type:"add",object:this,name:e,newValue:n}:null;r&&l(a),o&&h(this,a),r&&c()},e.prototype.get=function(e){return e=""+e,this.has(e)?this._data[e].get():void 0},e.prototype.keys=function(){return Z(this._keys.slice())},e.prototype.values=function(){return Z(this._keys.map(this.get,this))},e.prototype.entries=function(){var e=this;return Z(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])})},void 0,!1),this},e.prototype.clear=function(){var e=this;D(function(){je(function(){e.keys().forEach(e.delete,e)})},void 0,!1)},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.toJs=function(){return s("toJs is deprecated, use toJS instead"),this.toJS()},e.prototype.toJSON=function(){return this.toJS()},e.prototype.isValidKey=function(e){return null===e||void 0===e?!1:"string"!=typeof e&&"number"!=typeof e&&"boolean"!=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 this.name+"[{ "+this.keys().map(function(t){return t+": "+e.get(t)}).join(", ")+" }]"},e.prototype.observe=function(e,t){return n(t!==!0,"`observe` doesn't support the fire immediately property for observable maps."),G(this,e)},e.prototype.intercept=function(e){return U(this,e)},e}();e.ObservableMap=A,rt(A.prototype,function(){return this.entries()}),e.map=Pe,e.isObservableMap=q;var Be=function(){function e(e,t,n){this.target=e,this.name=t,this.mode=n,this.values={},this.changeListeners=null,this.interceptors=null}return e.prototype.observe=function(e,t){return n(t!==!0,"`observe` doesn't support the fire immediately property for observable objects."),G(this,e)},e.prototype.intercept=function(e){return U(this,e)},e}(),$e={},Ee={};e.isObservableObject=g;var T={},j=function(t){function e(s,u,e,n){void 0===e&&(e="ObservableValue@"+a()),void 0===n&&(n=!0),t.call(this,e),this.mode=u,this.hasUnreportedChange=!1,this.value=void 0;var o=$(s,r.Recursive),c=o[0],l=o[1];this.mode===r.Recursive&&(this.mode=c),this.value=H(l,this.mode,this.name),n&&i()&&S({type:"create",object:this,newValue:this.value})}return pe(e,t),e.prototype.set=function(e){var n=this.value;if(e=this.prepareNewValue(e),e!==T){var t=i();t&&l({type:"update",object:this,newValue:e,oldValue:n}),this.setNewValue(e),t&&c()}},e.prototype.prepareNewValue=function(e){if(p(e,"Modifiers cannot be used on non-initial values."),ye(),O(this)){var t=R(this,{object:this,type:"update",newValue:e});if(!t)return T;e=t.newValue}var n=_e(this.mode===r.Structure,this.value,e);return n?H(e,this.mode,this.name):T},e.prototype.setNewValue=function(e){var t=this.value;this.value=e,this.reportChanged(),d(this)&&h(this,[e,t])},e.prototype.get=function(){return this.reportObserved(),this.value},e.prototype.intercept=function(e){return U(this,e)},e.prototype.observe=function(e,t){return t&&e(this.value,void 0),G(this,e)},e.prototype.toJSON=function(){return this.get()},e.prototype.toString=function(){return this.name+"["+this.value+"]"},e}(V),st="__$$iterating",F=function(){function e(){this.size=0,this.data={}}return e.prototype.isEmpty=function(){return 0===this.size},Object.defineProperty(e.prototype,"length",{get:function(){return this.size},enumerable:!0,configurable:!0}),e.prototype.asArray=function(){var e=new Array(this.size),t=0;for(var n in this.data)e[t]=this.data[n],t++;return e},e.prototype.add=function(e){var t=e.__mapid;t in this.data||(this.data[t]=e,this.size++)},e.prototype.remove=function(e){e.__mapid in this.data&&(delete this.data[e.__mapid],this.size--)},e.prototype.cloneAndClear=function(){var e=this.asArray();return this.data={},this.size=0,e},e}();e.FastSet=F;var on=function(){function e(){this.listeners=[],s("extras.SimpleEventEmitter is deprecated and will be removed in the next major release")}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),N(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=on;var J=[];Object.freeze(J);var E,lt=[],ht=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.3.7",
"version": "2.4.0-alpha1",
"description": "Simple, scalable state management.",

@@ -11,3 +11,3 @@ "main": "lib/mobx.js",

"tape": "tape test/*.js | faucet",
"perf": "npm run small-build && time node --expose-gc test/perf/index.js",
"perf": "npm run small-build && PERSIST=true time node --expose-gc test/perf/index.js",
"prepublish": "npm run small-build",

@@ -14,0 +14,0 @@ "quick-build": "tsc",

@@ -47,2 +47,3 @@ <img src="docs/mobx.png" alt="logo" height="120" align="right" />

```javascript
// ESNext class example:
class Todo {

@@ -53,2 +54,21 @@ id = Math.random();

}
// ES5 constructor function example:
function Todo() {
this.id = Math.random()
extendObservable(this, {
title: "",
finished: false
})
}
// ... or just create plain objects:
function createTodo() {
return observable({
id: Math.random(),
title: "",
finished: false
})
}
```

@@ -63,2 +83,3 @@

```javascript
// ESNext class example:
class TodoList {

@@ -70,2 +91,14 @@ @observable todos = [];

}
// ES5 constructor function example:
function TodoList() {
extendObservable(this, {
todos: [],
unfinishedTodoCount: function() {
return this.todos.filter(function (todo) {
return !todo.finished
}).length;
}
})
}
```

@@ -87,2 +120,3 @@ MobX will ensure that `unfinishedTodoCount` is updated automatically when a todo is added or when one of the `finished` properties is modified.

// ESNext decorator / JSX
@observer

@@ -116,2 +150,7 @@ class TodoListView extends Component {

In ES5 a component declaration looks like this:
```javascript
var TodoListView = observer(React.createClass({ /* etc */ }))
```
`observer` turns React (function) components into derivations of the data they render.

@@ -118,0 +157,0 @@

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

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