Socket
Socket
Sign inDemoInstall

mobx

Package Overview
Dependencies
Maintainers
1
Versions
251
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mobx - npm Package Compare versions

Comparing version 2.3.3 to 2.3.4

8

CHANGELOG.md

@@ -1,3 +0,9 @@

# 3.3.3
# 2.3.4
* Fixed #360: Removed expensive cycle detection (cycles are still detected, but a bit later)
* Fixed #377: `toJS` serialization of Dates and Regexes preserves the original values
* Fixed #379: `@action` decorated methods can now be inherited / overriden
# 2.3.3
* Fixed #186: Log a warning instead of an error if an exception is thrown in a derivation. Fixes issue where React Native would produce unusable error screens (because it shows the first logged error)

@@ -4,0 +10,0 @@ * Fixed #333: Fixed some interoperability issues in combination with `Reflect` / `InversifyJS` decorators. @andykog

4

lib/mobx.min.js
/** MobX - (c) Michel Weststrate 2015, 2016 - MIT Licensed */
"use strict";function H(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 y(o,function(){this.track(e)});return s.schedule(),s.getDisposer()}function Oe(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=H(r,function(){if(o.call(t)){n?n():c=!0;var e=I();a.call(t),j(e)}});return c&&n(),n}function Wt(e,t,n){return a("`autorunUntil` is deprecated, please use `when`."),Oe.apply(null,arguments)}function Jt(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 y(a,function(){s||(s=!0,setTimeout(function(){s=!1,o.isDisposed||o.track(t)},n))});return o.schedule(),o.getDisposer()}function Ft(a,f,x,g,m,_){function b(){if(!l.isDisposed){var e=!1;l.track(function(){var t=d();e=ve(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=m,o=_):(c=a.name||f.name||"Reaction@"+i(),p=a,t=f,r=x,e=g,o=m),void 0===r&&(r=!1),void 0===e&&(e=0);var v=V(p,n.Reference),R=v[0],d=v[1],w=R===n.Structure;o&&(d=d.bind(o),t=le(c,t.bind(o)));var u=!0,h=!1,s=void 0,l=new y(c,function(){1>e?b():h||(h=!0,setTimeout(function(){h=!1,b()},e))});return l.schedule(),l.getDisposer()}function se(e,n,r,o){return arguments.length<3&&"function"==typeof e?Tt(e,n):(t(!r||!r.set,"@observable properties cannot have a setter: "+n),dt.apply(null,arguments))}function Tt(r,o){var e=V(r,n.Recursive),i=e[0],t=e[1];return new f(t,o,i===n.Structure,t.name)}function Re(){throw new Error("[ComputedValue] It is not allowed to assign new values to computed properties.")}function St(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=Ot(o),t=r[n];return t?t.get():(t=r[n]=new a(n,o),t.get())}}function Ot(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(),Object.defineProperty(e,"$transformId",{configurable:!0,writable:!0,enumerable:!1,value:t})),t}function xt(e,t){return X()||console.warn("[mobx.expr] 'expr' should only be used inside other reactive functions."),se(e,t).get()}function oe(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 k),"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"),Ce(e,r,n.Recursive,null)}),e}function Ce(e,t,r,o){var i=ue(e,o,r);for(var n in t)if(t.hasOwnProperty(n)){if(e===t&&!We(e,n))continue;ft(i,n,t[n])}return e}function bt(e,t){return nt(m(e,t))}function nt(e){var t={name:e.name};return e.observing&&e.observing.length&&(t.dependencies=E(e.observing).map(nt)),t}function it(e,t){return et(m(e,t))}function et(e){var t={name:e.name};return e.observers&&e.observers.length&&(t.observers=E(e.observers).map(et)),t}function kt(e,t,n){return"function"==typeof n?He(e,t,n):at(e,t)}function at(e,t){return g(e)&&!h(e)?(a("Passing plain objects to intercept / observe is deprecated and will be removed in 3.0"),d(pe(e)).intercept(t)):d(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"),oe(e,{property:e[t]}),He(e,t,n)):d(e,t).intercept(n)}function B(e,t){if(null===e||void 0===e)return!1;if(void 0!==t){if(e instanceof k||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 O||e instanceof y||e instanceof f}function ut(r,e,n){return t(arguments.length>=2&&arguments.length<=3,"Illegal decorator config",e),Je(r,e),t(!n||!n.get,"@observable can not be used on getters, use @computed instead"),vt.apply(null,arguments)}function pe(e,u){if(void 0===e&&(e=void 0),"string"==typeof arguments[1])return ut.apply(null,arguments);if(t(arguments.length<3,"observable expects zero, one or two arguments"),B(e))return e;var s=V(e,n.Recursive),r=s[0],i=s[1],c=r===n.Reference?o.Reference:At(i);switch(c){case o.Array:case o.PlainObject:return T(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)`"),se(e,u)}t(!1,"Illegal State")}function At(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 Ct(t,n,e,r){return"function"==typeof e?tt(t,n,e,r):Et(t,n,e)}function Et(e,t,n){return g(e)&&!h(e)?(a("Passing plain objects to intercept / observe is deprecated and will be removed in 3.0"),d(pe(e)).observe(t,n)):d(e).observe(t,n)}function tt(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"),oe(e,{property:e[t]}),tt(e,t,n,r)):d(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),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 k){var u=i({});return e.forEach(function(e,r){return u[r]=x(e,n,t)}),u}if(B(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 Vt(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 be(e){return console.log(e),e}function Pt(n,r){switch(arguments.length){case 0:if(n=e.derivationStack[e.derivationStack.length-1],!n)return be("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=m(n,r)}return n=m(n),n instanceof f?be(n.whyRun()):n instanceof y?be(n.whyRun()):void t(!1,"whyRun can only be used on reactions and computed values")}function le(e,t,n,r){return 1===arguments.length&&"function"==typeof e?Ye(e.name||"<unnamed action>",e):2===arguments.length&&"function"==typeof t?Ye(e,t):yt.apply(null,arguments)}function Pe(e){return"function"==typeof e&&e.isMobxAction===!0}function Mt(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+"'"),Qe(n,r,a,void 0)}function Ye(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 Qe(e,n,this,arguments)};return r.isMobxAction=!0,r}function Qe(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 b=I();Ke(d,o,!1);var y=U(!0);try{return p.apply(o,n)}finally{F(y),Be(!1),j(b),a&&c({time:Date.now()-l})}}function Qt(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 Fe(e,t){var n=U(e),r=t();return F(n),r}function U(t){var n=e.allowStateChanges;return e.allowStateChanges=t,n}function F(t){e.allowStateChanges=t}function xe(e){t(e.isDirty,"atom not dirty"),e.isDirty=!1,re(e,!0)}function X(){return e.derivationStack.length>0}function Y(){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 Bt(e){1===++e.dependencyStaleCount&&ke(e)}function Kt(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 De(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,Ut(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()&&R({type:"error",object:this,message:o}),console.warn(o),ee()}}}function Ut(r,u){e.derivationStack.length-=1;for(var i=Me(r.observing,u),o=i[0],a=i[1],n=0,s=o.length;s>n;n++){var c=o[n];t(!ze(r,c),"Cycle detected",r),Nt(o[n],r)}for(var n=0,s=a.length;s>n;n++)ne(a[n],r)}function ze(n,r){if(n===r)return!0;var e=r.observing;if(void 0===e)return!1;for(var o=e.length,t=0;o>t;t++)if(ze(n,e[t]))return!0;return!1}function Ge(e){var t=I(),n=e();return j(t),n}function I(){var t=e.isTracking;return e.isTracking=!1,t}function j(t){e.isTracking=t}function zt(){}function ee(){e.resetId++;var n=new je;for(var t in n)-1===_t.indexOf(t)&&(e[t]=n[t]);e.allowStateChanges=!e.strictMode}function Nt(e,r){var t=e.observers,n=t.length;t[n]=r,0===n&&e.onBecomeObserved()}function ne(t,r){var e=t.observers,n=e.indexOf(r);-1!==n&&e.splice(n,1),0===e.length&&t.onBecomeUnobserved()}function we(n){if(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 ke(e){var t=e.observers.slice();t.forEach(Bt),e.staleObservers=e.staleObservers.concat(t)}function re(e,t){e.staleObservers.splice(0).forEach(function(e){return Kt(e,t)})}function ae(){if(!(e.isRunningReactions===!0||e.inTransaction>0)){e.isRunningReactions=!0;for(var t=e.pendingReactions,o=0;t.length>0;){if(++o===ot)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 J}function R(r){if(!J)return!1;for(var n=e.spyListeners,t=0,o=n.length;o>t;t++)n[t](r)}function s(e){var t=Ze({},e,{spyReportStart:!0});R(t)}function c(e){R(e?Ze({},e,Se):Se)}function Ne(t){return e.spyListeners.push(t),J=e.spyListeners.length>0,$(function(){var n=e.spyListeners.indexOf(t);-1!==n&&e.spyListeners.splice(n,1),J=e.spyListeners.length>0})}function Dt(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?Ne(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 Be(t),r}function Ke(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 Be(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++)xe(o[n]);ae()}t&&r()&&c()}function w(e){return e.interceptors&&e.interceptors.length>0}function M(t,n){var e=t.interceptors||(t.interceptors=[]);return e.push(n),$(function(){var t=e.indexOf(n);-1!==t&&e.splice(t,1)})}function _(o,e){for(var i=I(),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 z(t,n){var e=t.changeListeners||(t.changeListeners=[]);return e.push(n),$(function(){var t=e.indexOf(n);-1!==t&&e.splice(t,1)})}function v(r,n){var o=I(),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 Q(e){return new Z(e)}function te(e){return new N(e)}function _e(e){return new q(e)}function It(e,t){return Le(e,t)}function V(e,t){return e instanceof Z?[n.Reference,e.value]:e instanceof N?[n.Structure,e.value]:e instanceof q?[n.Flat,e.value]:[t,e]}function jt(e){return e===Q?n.Reference:e===te?n.Structure:e===_e?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 T(e,a,i){var r;if(B(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=V(e,n.Recursive),r=o[0],e=o[1];break;default:t(!1,"Illegal State")}return Array.isArray(e)?Ve(e,r,i):g(e)&&Object.isExtensible(e)?Ce(e,e,r,i):e;var o}function p(e,t){if(e instanceof Z||e instanceof N||e instanceof q)throw new Error("[mobx] asStructure / asReference / asFlat cannot be used here. "+t)}function Rt(e){Object.defineProperty(l.prototype,""+e,{enumerable:!1,configurable:!1,set:gt(e),get:mt(e)})}function gt(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){Y();var i=o[e];if(w(r)){var a=_(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?!K(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 mt(e){return function(){var t=this.$mobx;return t&&e<t.values.length?(t.atom.reportObserved(),t.values[e]):void 0}}function Ee(t){for(var e=fe;t>e;e++)Rt(e);fe=t}function Ve(e,t,n){return new l(e,t,n)}function ht(e){return a("fastArray is deprecated. Please use `observable(asFlat([]))`"),Ve(e,n.Flat,null)}function G(e){return e instanceof l}function Le(e,t){return new k(e,t)}function W(e){return e instanceof k}function ue(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 ge(e,t,r);return Object.defineProperty(e,"$mobx",{enumerable:!1,configurable:!1,writable:!1,value:o}),o}function ft(e,t,n){e.values[t]?e.target[t]=n:ce(e,t,n,!0)}function ce(t,n,e,a){a&&Je(t.target,n);var r,o=t.name+"."+n,i=!0;if("function"!=typeof e||0!==e.length||Pe(e))if(e instanceof N&&"function"==typeof e.value&&0===e.value.length)r=new f(e.value,t.target,!0,o);else{if(i=!1,w(t)){var s=_(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?lt(n):pt(n)),i||ct(t,t.target,n,e)}function pt(e){var t=rt[e];return t?t:rt[e]={configurable:!0,enumerable:!0,get:function(){return this.$mobx.values[e].get()},set:function(t){me(this,e,t)}}}function lt(e){var t=Te[e];return t?t:Te[e]={configurable:!0,enumerable:!1,get:function(){return this.$mobx.values[e].get()},set:Re}}function me(o,i,e){var t=o.$mobx,a=t.values[i];if(w(t)){var n=_(t,{type:"update",object:o,name:i,newValue:e});if(!n)return;e=n.newValue}if(e=a.prepareNewValue(e),e!==D){var l=b(t),u=r(),n=v||b?{type:"update",object:o,oldValue:a.value,name:i,newValue:e}:null;u&&s(n),a.setNewValue(e),l&&v(t,n),u&&c()}}function ct(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&&v(t,o),e&&c()}function h(e){return"object"==typeof e&&null!==e?(C(e),e.$mobx instanceof ge):!1}function m(e,n){if("object"==typeof e&&null!==e){if(G(e))return t(void 0===n,"It is not possible to get index atoms from arrays"),e.$mobx.atom;if(W(e)){if(void 0===n)return m(e._keys);var r=e._data[n]||e._hasMap[n];return t(!!r,"the entry '"+n+"' does not exist in the observable map '"+he(e)+"'"),r}if(C(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 '"+he(e)+"'"),o}if(e instanceof O||e instanceof f||e instanceof y)return e}else if("function"==typeof e&&e.$mobx instanceof y)return e.$mobx;t(!1,"Cannot obtain atom from "+e)}function d(e,n){return t(e,"Expection some object"),void 0!==n?d(m(e,n)):e instanceof O||e instanceof f||e instanceof y?e:W(e)?e:(C(e),e.$mobx?e.$mobx:void t(!1,"Cannot obtain administration from "+e))}function he(e,t){var n;return n=void 0!==t?m(e,t):h(e)||W(e)?d(e):m(e),n.name}function de(e,r,o,i,a){function n(s,n,u,l){if(t(a||Xe(arguments),"This function is a decorator, but it wasn't invoked like a decorator"),u){s.hasOwnProperty("__mobxLazyInitializers")||Object.defineProperty(s,"__mobxLazyInitializers",{writable:!1,configurable:!1,enumerable:!1,value:s.__mobxLazyInitializers&&s.__mobxLazyInitializers.slice()||[]});var f=u.value,p=u.initializer;return s.__mobxLazyInitializers.push(function(t){e(t,n,p?p.call(t):f,l,u)}),{enumerable:i,configurable:!0,get:function(){return this.__mobxDidRunLazyInitializers!==!0&&C(this),r.call(this,n)},set:function(e){this.__mobxDidRunLazyInitializers!==!0&&C(this),o.call(this,n,e)}}}var c={enumerable:i,configurable:!0,get:function(){return this.__mobxInitializedProps&&this.__mobxInitializedProps[n]===!0||qe(this,n,void 0,e,l,c),r.call(this,n)},set:function(t){this.__mobxInitializedProps&&this.__mobxInitializedProps[n]===!0?o.call(this,n,t):qe(this,n,t,e,l,c)}};return arguments.length<3&&Object.defineProperty(s,n,c),c}return a?function(){if(Xe(arguments))return n.apply(null,arguments);var e=arguments;return function(t,r,o){return n(t,r,o,e)}}:n}function qe(e,t,n,r,o,i){e.hasOwnProperty("__mobxInitializedProps")||Object.defineProperty(e,"__mobxInitializedProps",{enumerable:!1,configurable:!1,writable:!0,value:{}}),e.__mobxInitializedProps[t]=!0,r(e,t,n,o,i)}function C(e){e.__mobxDidRunLazyInitializers!==!0&&e.__mobxLazyInitializers&&(Object.defineProperty(e,"__mobxDidRunLazyInitializers",{enumerable:!1,configurable:!1,writable:!1,value:!0}),e.__mobxDidRunLazyInitializers&&e.__mobxLazyInitializers.forEach(function(t){return t(e)}))}function Xe(e){return(2===e.length||3===e.length)&&"string"==typeof e[1]}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===Ie.indexOf(e)&&(Ie.push(e),console.error("[mobx] Deprecated: "+e))}function $(t){var e=!1;return function(){return e?void 0:(e=!0,t.apply(this,arguments))}}function E(t){var e=[];return t.forEach(function(t){-1===e.indexOf(t)&&e.push(t)}),e}function ye(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 Ze(){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 ve(n,e,t){return n?!K(e,t):e!==t}function st(n,t){for(var e=0;e<t.length;e++)Object.defineProperty(n,t[e],{configurable:!0,writable:!0,enumerable:!1,value:n[t[e]]})}function We(t,n){var e=Object.getOwnPropertyDescriptor(t,n);return!e||e.configurable!==!1&&e.writable!==!1}function Je(n,e){t(We(n,e),"Cannot make property '"+e+"' observable, it is not configurable and writable in the target object")}function Ue(t){var e=[];for(var n in t)e.push(n);return e}function K(e,t){if(null===e&&null===t)return!0;if(void 0===e&&void 0===t)return!0;var o=Array.isArray(e)||G(e);if(o!==(Array.isArray(t)||G(t)))return!1;if(o){if(e.length!==t.length)return!1;for(var n=e.length;n>=0;n--)if(!K(e[n],t[n]))return!1;return!0}if("object"==typeof e&&"object"==typeof t){if(null===e||null===t)return!1;if(Ue(e).length!==Ue(t).length)return!1;for(var r in e){if(!(r in t))return!1;if(!K(e[r],t[r]))return!1}return!0}return e===t}function Me(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)};zt(),exports.extras={allowStateChanges:Fe,getAtom:m,getDebugName:he,getDependencyTree:bt,getObserverTree:it,isComputingDerivation:X,isSpyEnabled:r,resetGlobalState:ee,spyReport:R,spyReportEnd:c,spyReportStart:s,trackTransitions:Dt},exports._={getAdministration:d,quickDiff:Me,resetGlobalState:ee},exports.autorun=H,exports.when=Oe,exports.autorunUntil=Wt,exports.autorunAsync=Jt,exports.reaction=Ft;var dt=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=ue(i,void 0,n.Recursive);ce(u,a,o?te(r):r,!1)},function(e){return this.$mobx.values[e].get()},Re,!1,!0);exports.computed=se,exports.createTransformer=St,exports.expr=xt,exports.extendObservable=oe,exports.intercept=kt,exports.isObservable=B;var vt=de(function(t,r,e){var o=U(!0);"function"==typeof e&&(e=Q(e));var i=ue(t,void 0,n.Recursive);ce(i,r,e,!0),F(o)},function(e){return this.$mobx.values[e].get()},function(e,t){me(this,e,t)},!0,!1);exports.observable=pe;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=Ct,exports.toJS=x,exports.toJSON=Vt,exports.whyRun=Pt;var yt=de(function(e,t,r,n,o){var a=n&&1===n.length?n[0]:r.name||t||"<unnamed action>",i=le(a,r);o&&o.value&&e.constructor&&e.constructor.prototype?Object.defineProperty(e.constructor.prototype,t,{configurable:!0,enumerable:!1,writable:!1,value:i}):Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:!1,value:i})},function(e){return this[e]},function(){t(!1,"It is not allowed to assign new values to @action fields")},!1,!0);exports.action=le,exports.isAction=Pe,exports.runInAction=Mt,exports.useStrict=Qt;var O=function(){function n(e,t,n){void 0===e&&(e="Atom@"+i()),void 0===t&&(t=Ae),void 0===n&&(n=Ae),this.name=e,this.onBecomeObserved=t,this.onBecomeUnobserved=n,this.isDirty=!1,this.staleObservers=[],this.observers=[]}return n.prototype.reportObserved=function(){we(this)},n.prototype.reportChanged=function(){this.isDirty||(this.reportStale(),this.reportReady())},n.prototype.reportStale=function(){this.isDirty||(this.isDirty=!0,ke(this))},n.prototype.reportReady=function(){t(this.isDirty,"atom not dirty"),e.inTransaction>0?e.changedAtoms.push(this):(xe(this),ae())},n.prototype.toString=function(){return this.name},n}();exports.Atom=O;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=U(!1),t=this.derivation.call(this.scope);return F(e),this.isComputing=!1,t},n.prototype.onBecomeObserved=function(){},n.prototype.onBecomeUnobserved=function(){for(var e=0,t=this.observing.length;t>e;e++)ne(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",this.derivation),we(this),this.dependencyStaleCount>0)return this.peek();if(this.isLazy){if(!X())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()&&R({object:this,type:"compute",fn:this.derivation,target:this.scope});var e=this.value,t=this.value=De(this,this.peek);return ve(this.compareStructural,t,e)},n.prototype.observe=function(n,r){var o=this,e=!0,t=void 0;return H(function(){var i=o.get();if(!e||r){var a=I();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=E(this.observing).map(function(e){return e.name}),r=E(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: "+wt[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 "+ye(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 "+ye(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 wt=(S={},S[u.PEEK]="[peek] The value of this computed value was requested outside an reaction",S[u.INVALIDATED]="[invalidated] Some observables used by this computation did change",S[u.REQUIRED]="[started] This computation is required by another computed value / reaction",S[u.NOT_RUNNING]="[idle] This compution is currently not running",S);exports.untracked=Ge;var _t=["mobxGuid","resetId","spyListeners","strictMode"],je=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 je;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}(),y=function(){function t(e,t){void 0===e&&(e="Reaction@"+i()),this.name=e,this.onInvalidate=t,this.staleObservers=P,this.observers=P,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),ae())},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()&&R({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,De(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++)ne(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=E(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 "+ye(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=y;var ot=100,J=!1,Se={spyReportEnd:!0};exports.spy=Ne,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=Q,exports.asStructure=te,exports.asFlat=_e;var Z=function(){function e(e){this.value=e,p(e,"Modifiers are not allowed to be nested")}return e}(),N=function(){function e(e){this.value=e,p(e,"Modifiers are not allowed to be nested")}return e}(),q=function(){
function e(e){this.value=e,p(e,"Modifiers are not allowed to be nested")}return e}();exports.asMap=It;var fe=0,$e=function(){function e(){}return e}();$e.prototype=[];var Lt=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 O(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:T(e,this.mode,this.atom.name+"[..]")},e.prototype.intercept=function(e){return M(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}),z(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>fe&&Ee(t+e)},e.prototype.spliceWithArray=function(e,n,t){Y();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=[]),w(this)){var o=_(this,{object:this.array,type:"splice",index:e,removedCount:n,added:t});if(!o)return P;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&&v(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&&v(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 Lt(i,o,this,r);Object.defineProperty(this,"$mobx",{enumerable:!1,configurable:!1,writable:!1,value:e}),n&&n.length?(e.updateArrayLength(0,n.length),e.values=n.map(e.makeReactiveArrayItem,e),e.notifyArraySplice(0,e.values.slice(),P)):e.values=[]}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}($e);st(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];Object.defineProperty(l.prototype,e,{configurable:!1,writable:!0,enumerable:!1,value:function(){return this.$mobx.atom.reportObserved(),t.apply(this.$mobx.values,arguments)}})}),Ee(1e3),exports.fastArray=ht,exports.isObservableArray=G;var $t={},k=function(){function e(e,r){var t=this;this.$mobx=$t,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=jt(r),this._valueMode===n.Flat&&(this._valueMode=n.Reference),Fe(!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"),w(this)){var 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,w(this)){var n=_(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&&v(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!==D){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&&v(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&&v(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 this._keys.slice()},e.prototype.values=function(){return this.keys().map(this.get,this)},e.prototype.entries=function(){var e=this;return this.keys().map(function(t){return[t,e.get(t)]})},e.prototype.forEach=function(e,t){var n=this;this.keys().forEach(function(r){return e.call(t,n.get(r),r)})},e.prototype.merge=function(t){var n=this;return 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(){Ge(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."),z(this,e)},e.prototype.intercept=function(e){return M(this,e)},e}();exports.ObservableMap=k,exports.map=Le,exports.isObservableMap=W;var ge=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."),z(this,e)},e.prototype.intercept=function(e){return M(this,e)},e}(),rt={},Te={};exports.isObservableObject=h;var D={},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=V(s,n.Recursive),c=a[0],l=a[1];this.mode===n.Recursive&&(this.mode=c),this.value=T(l,this.mode,this.name),o&&r()&&R({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!==D){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."),Y(),w(this)){var t=_(this,{object:this,type:"update",newValue:e});if(!t)return D;e=t.newValue}var r=ve(this.mode===n.Structure,this.value,e);return r?T(e,this.mode,this.name):D},e.prototype.setNewValue=function(e){var t=this.value;this.value=e,this.reportChanged(),b(this)&&v(this,[e,t])},e.prototype.get=function(){return this.reportObserved(),this.value},e.prototype.intercept=function(e){return M(this,e)},e.prototype.observe=function(e,t){return t&&e(this.value,void 0),z(this,e)},e.prototype.toJSON=function(){return this.get()},e.prototype.toString=function(){return this.name+"["+this.value+"]"},e}(O),Gt=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),$(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=Gt;var P=[];Object.freeze(P);var Ie=[],Ae=function(){},S;
"use strict";function X(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 y(o,function(){this.track(e)});return s.schedule(),s.getDisposer()}function Oe(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=X(r,function(){if(o.call(t)){n?n():c=!0;var e=I();a.call(t),j(e)}});return c&&n(),n}function Wt(e,t,n){return a("`autorunUntil` is deprecated, please use `when`."),Oe.apply(null,arguments)}function Jt(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 y(a,function(){s||(s=!0,setTimeout(function(){s=!1,o.isDisposed||o.track(t)},n))});return o.schedule(),o.getDisposer()}function Ft(a,f,x,g,m,_){function b(){if(!l.isDisposed){var e=!1;l.track(function(){var t=d();e=he(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=m,o=_):(c=a.name||f.name||"Reaction@"+i(),p=a,t=f,r=x,e=g,o=m),void 0===r&&(r=!1),void 0===e&&(e=0);var v=V(p,n.Reference),R=v[0],d=v[1],w=R===n.Structure;o&&(d=d.bind(o),t=de(c,t.bind(o)));var u=!0,h=!1,s=void 0,l=new y(c,function(){1>e?b():h||(h=!0,setTimeout(function(){h=!1,b()},e))});return l.schedule(),l.getDisposer()}function oe(e,n,r,o){return arguments.length<3&&"function"==typeof e?Tt(e,n):(t(!r||!r.set,"@observable properties cannot have a setter: "+n),dt.apply(null,arguments))}function Tt(r,o){var e=V(r,n.Recursive),i=e[0],t=e[1];return new f(t,o,i===n.Structure,t.name)}function Re(){throw new Error("[ComputedValue] It is not allowed to assign new values to computed properties.")}function St(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 ae(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=Ot(o),t=r[n];return t?t.get():(t=r[n]=new a(n,o),t.get())}}function Ot(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(),Object.defineProperty(e,"$transformId",{configurable:!0,writable:!0,enumerable:!1,value:t})),t}function xt(e,t){return Y()||console.warn("[mobx.expr] 'expr' should only be used inside other reactive functions."),oe(e,t).get()}function ie(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 k),"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"),Ce(e,r,n.Recursive,null)}),e}function Ce(e,t,r,o){var i=ce(e,o,r);for(var n in t)if(t.hasOwnProperty(n)){if(e===t&&!Je(e,n))continue;ft(i,n,t[n])}return e}function bt(e,t){return Ze(m(e,t))}function Ze(e){var t={name:e.name};return e.observing&&e.observing.length&&(t.dependencies=E(e.observing).map(Ze)),t}function ot(e,t){return et(m(e,t))}function et(e){var t={name:e.name};return e.observers&&e.observers.length&&(t.observers=E(e.observers).map(et)),t}function kt(e,t,n){return"function"==typeof n?He(e,t,n):it(e,t)}function it(e,t){return g(e)&&!h(e)?(a("Passing plain objects to intercept / observe is deprecated and will be removed in 3.0"),d(fe(e)).intercept(t)):d(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"),ie(e,{property:e[t]}),He(e,t,n)):d(e,t).intercept(n)}function B(e,t){if(null===e||void 0===e)return!1;if(void 0!==t){if(e instanceof k||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 O||e instanceof y||e instanceof f}function at(r,e,n){return t(arguments.length>=2&&arguments.length<=3,"Illegal decorator config",e),Fe(r,e),t(!n||!n.get,"@observable can not be used on getters, use @computed instead"),vt.apply(null,arguments)}function fe(e,u){if(void 0===e&&(e=void 0),"string"==typeof arguments[1])return at.apply(null,arguments);if(t(arguments.length<3,"observable expects zero, one or two arguments"),B(e))return e;var s=V(e,n.Recursive),r=s[0],i=s[1],c=r===n.Reference?o.Reference:At(i);switch(c){case o.Array:case o.PlainObject:return T(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)`"),oe(e,u)}t(!1,"Illegal State")}function At(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 Ct(t,n,e,r){return"function"==typeof e?Qe(t,n,e,r):Et(t,n,e)}function Et(e,t,n){return g(e)&&!h(e)?(a("Passing plain objects to intercept / observe is deprecated and will be removed in 3.0"),d(fe(e)).observe(t,n)):d(e).observe(t,n)}function Qe(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"),ie(e,{property:e[t]}),Qe(e,t,n,r)):d(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 k){var u=i({});return e.forEach(function(e,r){return u[r]=x(e,n,t)}),u}if(B(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 Vt(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 q(e){return console.log(e),e}function Lt(n,r){switch(arguments.length){case 0:if(n=e.derivationStack[e.derivationStack.length-1],!n)return q("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=m(n,r)}return n=m(n),n instanceof f?q(n.whyRun()):n instanceof y?q(n.whyRun()):void t(!1,"whyRun can only be used on reactions and computed values")}function de(e,t,n,r){return 1===arguments.length&&"function"==typeof e?ee(e.name||"<unnamed action>",e):2===arguments.length&&"function"==typeof t?ee(e,t):1===arguments.length&&"string"==typeof e?De(e):De(t).apply(null,arguments)}function De(e){return function(n,r,t){return t&&"function"==typeof t.value?(t.value=ee(e,t.value),t.enumerable=!1,t):yt(e).apply(this,arguments)}}function Ie(e){return"function"==typeof e&&e.isMobxAction===!0}function zt(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+"'"),tt(n,r,a,void 0)}function ee(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 tt(e,n,this,arguments)};return r.isMobxAction=!0,r}function tt(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 b=I();Ge(d,o,!1);var y=U(!0);try{return p.apply(o,n)}finally{F(y),We(!1),j(b),a&&c({time:Date.now()-l})}}function ct(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 nt(e,t){var n=U(e),r=t();return F(n),r}function U(t){var n=e.allowStateChanges;return e.allowStateChanges=t,n}function F(t){e.allowStateChanges=t}function ze(e){t(e.isDirty,"atom not dirty"),e.isDirty=!1,ue(e,!0)}function Y(){return e.derivationStack.length>0}function Z(){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 Bt(e){1===++e.dependencyStaleCount&&we(e)}function Kt(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();ue(e,r)}else ue(e,!1)}function Ae(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,Ut(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()&&R({type:"error",object:this,message:o}),console.warn(o),re()}}}function Ut(n,s){e.derivationStack.length-=1;for(var o=Me(n.observing,s),r=o[0],i=o[1],t=0,a=r.length;a>t;t++){r[t];Mt(r[t],n)}for(var t=0,a=i.length;a>t;t++)se(i[t],n)}function Ne(e){var t=I(),n=e();return j(t),n}function I(){var t=e.isTracking;return e.isTracking=!1,t}function j(t){e.isTracking=t}function Nt(){}function re(){e.resetId++;var n=new je;for(var t in n)-1===_t.indexOf(t)&&(e[t]=n[t]);e.allowStateChanges=!e.strictMode}function Mt(e,r){var t=e.observers,n=t.length;t[n]=r,0===n&&e.onBecomeObserved()}function se(t,r){var e=t.observers,n=e.indexOf(r);-1!==n&&e.splice(n,1),0===e.length&&t.onBecomeUnobserved()}function xe(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 we(e){var t=e.observers.slice();t.forEach(Bt),e.staleObservers=e.staleObservers.concat(t)}function ue(e,t){e.staleObservers.splice(0).forEach(function(e){return Kt(e,t)})}function pe(){if(!(e.isRunningReactions===!0||e.inTransaction>0)){e.isRunningReactions=!0;for(var t=e.pendingReactions,o=0;t.length>0;){if(++o===Qt)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 J}function R(r){if(!J)return!1;for(var n=e.spyListeners,t=0,o=n.length;o>t;t++)n[t](r)}function s(e){var t=Ye({},e,{spyReportStart:!0});R(t)}function c(e){R(e?Ye({},e,Se):Se)}function $e(t){return e.spyListeners.push(t),J=e.spyListeners.length>0,$(function(){var n=e.spyListeners.indexOf(t);-1!==n&&e.spyListeners.splice(n,1),J=e.spyListeners.length>0})}function Dt(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?$e(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 P(n,e,t){void 0===e&&(e=void 0),void 0===t&&(t=!0),Ge(n.name||"anonymous transaction",e,t);var r=n.call(e);return We(t),r}function Ge(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 We(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++)ze(o[n]);pe()}t&&r()&&c()}function w(e){return e.interceptors&&e.interceptors.length>0}function M(t,n){var e=t.interceptors||(t.interceptors=[]);return e.push(n),$(function(){var t=e.indexOf(n);-1!==t&&e.splice(t,1)})}function _(o,e){for(var i=I(),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 z(t,n){var e=t.changeListeners||(t.changeListeners=[]);return e.push(n),$(function(){var t=e.indexOf(n);-1!==t&&e.splice(t,1)})}function v(r,n){var o=I(),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 te(e){return new Q(e)}function ne(e){return new N(e)}function _e(e){return new H(e)}function It(e,t){return Pe(e,t)}function V(e,t){return e instanceof Q?[n.Reference,e.value]:e instanceof N?[n.Structure,e.value]:e instanceof H?[n.Flat,e.value]:[t,e]}function jt(e){return e===te?n.Reference:e===ne?n.Structure:e===_e?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 T(e,a,i){var r;if(B(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=V(e,n.Recursive),r=o[0],e=o[1];break;default:t(!1,"Illegal State")}return Array.isArray(e)?Ve(e,r,i):g(e)&&Object.isExtensible(e)?Ce(e,e,r,i):e;var o}function p(e,t){if(e instanceof Q||e instanceof N||e instanceof H)throw new Error("[mobx] asStructure / asReference / asFlat cannot be used here. "+t)}function Rt(e){Object.defineProperty(l.prototype,""+e,{enumerable:!1,configurable:!1,set:gt(e),get:mt(e)})}function gt(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){Z();var i=o[e];if(w(r)){var a=_(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?!K(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 mt(e){return function(){var t=this.$mobx;return t&&e<t.values.length?(t.atom.reportObserved(),t.values[e]):void 0}}function Ee(t){for(var e=ye;t>e;e++)Rt(e);ye=t}function Ve(e,t,n){return new l(e,t,n)}function ht(e){return a("fastArray is deprecated. Please use `observable(asFlat([]))`"),Ve(e,n.Flat,null)}function G(e){return e instanceof l}function Pe(e,t){return new k(e,t)}function W(e){return e instanceof k}function ce(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 Be(e,t,r);return Object.defineProperty(e,"$mobx",{enumerable:!1,configurable:!1,writable:!1,value:o}),o}function ft(e,t,n){e.values[t]?e.target[t]=n:le(e,t,n,!0)}function le(t,n,e,a){a&&Fe(t.target,n);var r,o=t.name+"."+n,i=!0;if("function"!=typeof e||0!==e.length||Ie(e))if(e instanceof N&&"function"==typeof e.value&&0===e.value.length)r=new f(e.value,t.target,!0,o);else{if(i=!1,w(t)){var s=_(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?lt(n):pt(n)),i||ut(t,t.target,n,e)}function pt(e){var t=Ke[e];return t?t:Ke[e]={configurable:!0,enumerable:!0,get:function(){return this.$mobx.values[e].get()},set:function(t){rt(this,e,t)}}}function lt(e){var t=Le[e];return t?t:Le[e]={configurable:!0,enumerable:!1,get:function(){return this.$mobx.values[e].get()},set:Re}}function rt(o,i,e){var t=o.$mobx,a=t.values[i];if(w(t)){var n=_(t,{type:"update",object:o,name:i,newValue:e});if(!n)return;e=n.newValue}if(e=a.prepareNewValue(e),e!==D){var l=b(t),u=r(),n=v||b?{type:"update",object:o,oldValue:a.value,name:i,newValue:e}:null;u&&s(n),a.setNewValue(e),l&&v(t,n),u&&c()}}function ut(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&&v(t,o),e&&c()}function h(e){return"object"==typeof e&&null!==e?(C(e),e.$mobx instanceof Be):!1}function m(e,n){if("object"==typeof e&&null!==e){if(G(e))return t(void 0===n,"It is not possible to get index atoms from arrays"),e.$mobx.atom;if(W(e)){if(void 0===n)return m(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(C(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 O||e instanceof f||e instanceof y)return e}else if("function"==typeof e&&e.$mobx instanceof y)return e.$mobx;t(!1,"Cannot obtain atom from "+e)}function d(e,n){return t(e,"Expection some object"),void 0!==n?d(m(e,n)):e instanceof O||e instanceof f||e instanceof y?e:W(e)?e:(C(e),e.$mobx?e.$mobx:void t(!1,"Cannot obtain administration from "+e))}function ve(e,t){var n;return n=void 0!==t?m(e,t):h(e)||W(e)?d(e):m(e),n.name}function be(e,r,o,i,a){function n(s,n,u,l){if(t(a||Xe(arguments),"This function is a decorator, but it wasn't invoked like a decorator"),u){s.hasOwnProperty("__mobxLazyInitializers")||Object.defineProperty(s,"__mobxLazyInitializers",{writable:!1,configurable:!1,enumerable:!1,value:s.__mobxLazyInitializers&&s.__mobxLazyInitializers.slice()||[]});var f=u.value,p=u.initializer;return s.__mobxLazyInitializers.push(function(t){e(t,n,p?p.call(t):f,l,u)}),{enumerable:i,configurable:!0,get:function(){return this.__mobxDidRunLazyInitializers!==!0&&C(this),r.call(this,n)},set:function(e){this.__mobxDidRunLazyInitializers!==!0&&C(this),o.call(this,n,e)}}}var c={enumerable:i,configurable:!0,get:function(){return this.__mobxInitializedProps&&this.__mobxInitializedProps[n]===!0||qe(this,n,void 0,e,l,c),r.call(this,n)},set:function(t){this.__mobxInitializedProps&&this.__mobxInitializedProps[n]===!0?o.call(this,n,t):qe(this,n,t,e,l,c)}};return arguments.length<3&&Object.defineProperty(s,n,c),c}return a?function(){if(Xe(arguments))return n.apply(null,arguments);var e=arguments;return function(t,r,o){return n(t,r,o,e)}}:n}function qe(e,t,n,r,o,i){e.hasOwnProperty("__mobxInitializedProps")||Object.defineProperty(e,"__mobxInitializedProps",{enumerable:!1,configurable:!1,writable:!0,value:{}}),e.__mobxInitializedProps[t]=!0,r(e,t,n,o,i)}function C(e){e.__mobxDidRunLazyInitializers!==!0&&e.__mobxLazyInitializers&&(Object.defineProperty(e,"__mobxDidRunLazyInitializers",{enumerable:!1,configurable:!1,writable:!1,value:!0}),e.__mobxDidRunLazyInitializers&&e.__mobxLazyInitializers.forEach(function(t){return t(e)}))}function Xe(e){return(2===e.length||3===e.length)&&"string"==typeof e[1]}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===ke.indexOf(e)&&(ke.push(e),console.error("[mobx] Deprecated: "+e))}function $(t){var e=!1;return function(){return e?void 0:(e=!0,t.apply(this,arguments))}}function E(t){var e=[];return t.forEach(function(t){-1===e.indexOf(t)&&e.push(t)}),e}function me(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 Ye(){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 he(n,e,t){return n?!K(e,t):e!==t}function st(n,t){for(var e=0;e<t.length;e++)Object.defineProperty(n,t[e],{configurable:!0,writable:!0,enumerable:!1,value:n[t[e]]})}function Je(t,n){var e=Object.getOwnPropertyDescriptor(t,n);return!e||e.configurable!==!1&&e.writable!==!1}function Fe(n,e){t(Je(n,e),"Cannot make property '"+e+"' observable, it is not configurable and writable in the target object")}function Ue(t){var e=[];for(var n in t)e.push(n);return e}function K(e,t){if(null===e&&null===t)return!0;if(void 0===e&&void 0===t)return!0;var o=Array.isArray(e)||G(e);if(o!==(Array.isArray(t)||G(t)))return!1;if(o){if(e.length!==t.length)return!1;for(var n=e.length;n>=0;n--)if(!K(e[n],t[n]))return!1;return!0}if("object"==typeof e&&"object"==typeof t){if(null===e||null===t)return!1;if(Ue(e).length!==Ue(t).length)return!1;for(var r in e){if(!(r in t))return!1;if(!K(e[r],t[r]))return!1}return!0}return e===t}function Me(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 ae=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)};Nt(),exports.extras={allowStateChanges:nt,getAtom:m,getDebugName:ve,getDependencyTree:bt,getObserverTree:ot,isComputingDerivation:Y,isSpyEnabled:r,resetGlobalState:re,spyReport:R,spyReportEnd:c,spyReportStart:s,trackTransitions:Dt},exports._={getAdministration:d,quickDiff:Me,resetGlobalState:re},exports.autorun=X,exports.when=Oe,exports.autorunUntil=Wt,exports.autorunAsync=Jt,exports.reaction=Ft;var dt=be(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=ce(i,void 0,n.Recursive);le(u,a,o?ne(r):r,!1)},function(e){return this.$mobx.values[e].get()},Re,!1,!0);exports.computed=oe,exports.createTransformer=St,exports.expr=xt,exports.extendObservable=ie,exports.intercept=kt,exports.isObservable=B;var vt=be(function(t,r,e){var o=U(!0);"function"==typeof e&&(e=te(e));var i=ce(t,void 0,n.Recursive);le(i,r,e,!0),F(o)},function(e){return this.$mobx.values[e].get()},function(e,t){rt(this,e,t)},!0,!1);exports.observable=fe;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=Ct,exports.toJS=x,exports.toJSON=Vt,exports.whyRun=Lt;var yt=be(function(r,t,n,e,a){var o=e&&1===e.length?e[0]:n.name||t||"<unnamed action>",i=de(o,n);Object.defineProperty(r,t,{configurable:!0,enumerable:!1,writable:!1,value:i})},function(e){return this[e]},function(){t(!1,"It is not allowed to assign new values to @action fields")},!1,!0);exports.action=de,exports.isAction=Ie,exports.runInAction=zt,exports.useStrict=ct;var O=function(){function n(e,t,n){void 0===e&&(e="Atom@"+i()),void 0===t&&(t=ge),void 0===n&&(n=ge),this.name=e,this.onBecomeObserved=t,this.onBecomeUnobserved=n,this.isDirty=!1,this.staleObservers=[],this.observers=[]}return n.prototype.reportObserved=function(){xe(this)},n.prototype.reportChanged=function(){this.isDirty||(this.reportStale(),this.reportReady())},n.prototype.reportStale=function(){this.isDirty||(this.isDirty=!0,we(this))},n.prototype.reportReady=function(){t(this.isDirty,"atom not dirty"),e.inTransaction>0?e.changedAtoms.push(this):(ze(this),pe())},n.prototype.toString=function(){return this.name},n}();exports.Atom=O;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=U(!1),t=this.derivation.call(this.scope);return F(e),this.isComputing=!1,t},n.prototype.onBecomeObserved=function(){},n.prototype.onBecomeUnobserved=function(){for(var e=0,t=this.observing.length;t>e;e++)se(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),xe(this),this.dependencyStaleCount>0)return this.peek();if(this.isLazy){if(!Y())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()&&R({object:this,type:"compute",fn:this.derivation,target:this.scope});var e=this.value,t=this.value=Ae(this,this.peek);return he(this.compareStructural,t,e)},n.prototype.observe=function(n,r){var o=this,e=!0,t=void 0;return X(function(){var i=o.get();if(!e||r){var a=I();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=E(this.observing).map(function(e){return e.name}),r=E(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: "+wt[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 "+me(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 "+me(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 wt=(S={},S[u.PEEK]="[peek] The value of this computed value was requested outside an reaction",S[u.INVALIDATED]="[invalidated] Some observables used by this computation did change",S[u.REQUIRED]="[started] This computation is required by another computed value / reaction",S[u.NOT_RUNNING]="[idle] This compution is currently not running",S);exports.untracked=Ne;var _t=["mobxGuid","resetId","spyListeners","strictMode"],je=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 je;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}(),y=function(){function t(e,t){void 0===e&&(e="Reaction@"+i()),this.name=e,this.onInvalidate=t,this.staleObservers=L,this.observers=L,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),pe())},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()&&R({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,Ae(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++)se(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=E(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 "+me(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=y;var Qt=100,J=!1,Se={spyReportEnd:!0};exports.spy=$e,exports.transaction=P;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=te,exports.asStructure=ne,exports.asFlat=_e;var Q=function(){function e(e){this.value=e,p(e,"Modifiers are not allowed to be nested")}return e}(),N=function(){function e(e){this.value=e,p(e,"Modifiers are not allowed to be nested")}return e}(),H=function(){function e(e){this.value=e,p(e,"Modifiers are not allowed to be nested");
}return e}();exports.asMap=It;var ye=0,Te=function(){function e(){}return e}();Te.prototype=[];var Pt=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 O(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:T(e,this.mode,this.atom.name+"[..]")},e.prototype.intercept=function(e){return M(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}),z(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>ye&&Ee(t+e)},e.prototype.spliceWithArray=function(e,n,t){Z();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=[]),w(this)){var o=_(this,{object:this.array,type:"splice",index:e,removedCount:n,added:t});if(!o)return L;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&&v(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&&v(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 Pt(i,o,this,r);Object.defineProperty(this,"$mobx",{enumerable:!1,configurable:!1,writable:!1,value:e}),n&&n.length?(e.updateArrayLength(0,n.length),e.values=n.map(e.makeReactiveArrayItem,e),e.notifyArraySplice(0,e.values.slice(),L)):e.values=[]}return ae(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}(Te);st(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];Object.defineProperty(l.prototype,e,{configurable:!1,writable:!0,enumerable:!1,value:function(){return this.$mobx.atom.reportObserved(),t.apply(this.$mobx.values,arguments)}})}),Ee(1e3),exports.fastArray=ht,exports.isObservableArray=G;var $t={},k=function(){function e(e,r){var t=this;this.$mobx=$t,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=jt(r),this._valueMode===n.Flat&&(this._valueMode=n.Reference),nt(!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"),w(this)){var 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,w(this)){var n=_(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),P(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&&v(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!==D){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&&v(this,a),n&&c()}},e.prototype._addValue=function(e,n){var t=this;P(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&&v(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 this._keys.slice()},e.prototype.values=function(){return this.keys().map(this.get,this)},e.prototype.entries=function(){var e=this;return this.keys().map(function(t){return[t,e.get(t)]})},e.prototype.forEach=function(e,t){var n=this;this.keys().forEach(function(r){return e.call(t,n.get(r),r)})},e.prototype.merge=function(t){var n=this;return P(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;P(function(){Ne(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."),z(this,e)},e.prototype.intercept=function(e){return M(this,e)},e}();exports.ObservableMap=k,exports.map=Pe,exports.isObservableMap=W;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,n){return t(n!==!0,"`observe` doesn't support the fire immediately property for observable objects."),z(this,e)},e.prototype.intercept=function(e){return M(this,e)},e}(),Ke={},Le={};exports.isObservableObject=h;var D={},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=V(s,n.Recursive),c=a[0],l=a[1];this.mode===n.Recursive&&(this.mode=c),this.value=T(l,this.mode,this.name),o&&r()&&R({type:"create",object:this,newValue:this.value})}return ae(e,t),e.prototype.set=function(e){var n=this.value;if(e=this.prepareNewValue(e),e!==D){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."),Z(),w(this)){var t=_(this,{object:this,type:"update",newValue:e});if(!t)return D;e=t.newValue}var r=he(this.mode===n.Structure,this.value,e);return r?T(e,this.mode,this.name):D},e.prototype.setNewValue=function(e){var t=this.value;this.value=e,this.reportChanged(),b(this)&&v(this,[e,t])},e.prototype.get=function(){return this.reportObserved(),this.value},e.prototype.intercept=function(e){return M(this,e)},e.prototype.observe=function(e,t){return t&&e(this.value,void 0),z(this,e)},e.prototype.toJSON=function(){return this.get()},e.prototype.toString=function(){return this.name+"["+this.value+"]"},e}(O),Gt=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),$(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=Gt;var L=[];Object.freeze(L);var ke=[],ge=function(){},S;
//# 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(x){"use strict";function ie(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 d(i,function(){this.track(e)});return a.schedule(),a.getDisposer()}function Ie(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=ie(r,function(){if(i.call(t)){n?n():c=!0;var e=E();o.call(t),C(e)}});return c&&n(),n}function Bt(e,t,n){return a("`autorunUntil` is deprecated, please use `when`."),Ie.apply(null,arguments)}function Wt(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 d(o,function(){a||(a=!0,setTimeout(function(){a=!1,i.isDisposed||i.track(t)},n))});return i.schedule(),i.getDisposer()}function Gt(o,p,w,g,m,_){function y(){if(!l.isDisposed){var e=!1;l.track(function(){var t=v();e=me(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=g,e=m,i=_):(c=o.name||p.name||"Reaction@"+s(),f=o,t=p,n=w,e=g,i=m),void 0===n&&(n=!1),void 0===e&&(e=0);var b=L(f,r.Reference),O=b[0],v=b[1],x=O===r.Structure;i&&(v=v.bind(i),t=he(c,t.bind(i)));var u=!0,h=!1,a=void 0,l=new d(c,function(){1>e?y():h||(h=!0,setTimeout(function(){h=!1,y()},e))});return l.schedule(),l.getDisposer()}function le(e,t,r,i){return arguments.length<3&&"function"==typeof e?Mt(e,t):(n(!r||!r.set,"@observable properties cannot have a setter: "+t),bt.apply(null,arguments))}function Mt(n,i){var e=L(n,r.Recursive),o=e[0],t=e[1];return new h(t,i,o===r.Structure,t.name)}function Se(){throw new Error("[ComputedValue] It is not allowed to assign new values to computed properties.")}function jt(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 ue(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}(h);return function(i){o!==t.resetId&&(r={},o=t.resetId);var n=kt(i),e=r[n];return e?e.get():(e=r[n]=new a(n,i),e.get())}}function kt(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(),Object.defineProperty(e,"$transformId",{configurable:!0,writable:!0,enumerable:!1,value:t})),t}function _t(e,t){return Z()||console.warn("[mobx.expr] 'expr' should only be used inside other reactive functions."),le(e,t).get()}function se(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"),Ve(e,t,r.Recursive,null)}),e}function Ve(e,t,r,i){var o=fe(e,i,r);for(var n in t)if(t.hasOwnProperty(n)){if(e===t&&!Be(e,n))continue;dt(o,n,t[n])}return e}function mt(e,t){return it(b(e,t))}function it(e){var t={name:e.name};return e.observing&&e.observing.length&&(t.dependencies=D(e.observing).map(it)),t}function st(e,t){return nt(b(e,t))}function nt(e){var t={name:e.name};return e.observers&&e.observers.length&&(t.observers=D(e.observers).map(nt)),t}function At(e,t,n){return"function"==typeof n?Ye(e,t,n):ut(e,t)}function ut(e,t){return w(e)&&!y(e)?(a("Passing plain objects to intercept / observe is deprecated and will be removed in 3.0"),v(de(e)).intercept(t)):v(e).intercept(t)}function Ye(e,t,n){return w(e)&&!y(e)?(a("Passing plain objects to intercept / observe is deprecated and will be removed in 3.0"),se(e,{property:e[t]}),Ye(e,t,n)):v(e,t).intercept(n)}function Q(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(y(e)){var n=e.$mobx;return n.values&&!!n.values[t]}return!1}return!!e.$mobx||e instanceof j||e instanceof d||e instanceof h}function lt(r,e,t){return n(arguments.length>=2&&arguments.length<=3,"Illegal decorator config",e),We(r,e),n(!t||!t.get,"@observable can not be used on getters, use @computed instead"),yt.apply(null,arguments)}function de(e,u){if(void 0===e&&(e=void 0),"string"==typeof arguments[1])return lt.apply(null,arguments);if(n(arguments.length<3,"observable expects zero, one or two arguments"),Q(e))return e;var s=L(e,r.Recursive),t=s[0],i=s[1],c=t===r.Reference?o.Reference:It(i);switch(c){case o.Array:case o.PlainObject:return M(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)`"),le(e,u)}n(!1,"Illegal State")}function It(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 Vt(t,n,e,r){return"function"==typeof e?et(t,n,e,r):Dt(t,n,e)}function Dt(e,t,n){return w(e)&&!y(e)?(a("Passing plain objects to intercept / observe is deprecated and will be removed in 3.0"),v(de(e)).observe(t,n)):v(e).observe(t,n)}function et(e,t,n,r){return w(e)&&!y(e)?(a("Passing plain objects to intercept / observe is deprecated and will be removed in 3.0"),se(e,{property:e[t]}),et(e,t,n,r)):v(e,t).observe(n,r)}function R(e,n,t){function o(r){return n&&t.push([e,r]),r}if(void 0===n&&(n=!0),void 0===t&&(t=null),n&&null===t&&(t=[]),n&&null!==e&&"object"==typeof e)for(var 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 R(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]=R(e,n,t)}),u}if(Q(e)&&e.$mobx instanceof I)return R(e(),n,t);if(e instanceof I)return R(e.get(),n,t);if("object"==typeof e){var i=o({});for(var c in e)i[c]=R(e[c],n,t);return i}return e}function Lt(n,e,t){return void 0===e&&(e=!0),void 0===t&&(t=null),a("toJSON is deprecated. Use toJS instead"),R.apply(null,arguments)}function ge(e){return console.log(e),e}function Tt(e,r){switch(arguments.length){case 0:if(e=t.derivationStack[t.derivationStack.length-1],!e)return ge("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 h?ge(e.whyRun()):e instanceof d?ge(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?He(e.name||"<unnamed action>",e):2===arguments.length&&"function"==typeof t?He(e,t):gt.apply(null,arguments)}function Pe(e){return"function"==typeof e&&e.isMobxAction===!0}function zt(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 He(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(d,f,r,e){var s=t.derivationStack;n(!(s[s.length-1]instanceof h),"Computed values or transformers should not invoke actions or trigger other side effects");var c,a=i();if(a){c=Date.now();var p=[];if(e)for(var o=0,v=e.length;v>o;o++)p.push(e[o]);u({type:"action",name:d,fn:f,target:r,arguments:p})}var b=E();Ke(d,r,!1);var y=J(!0);try{return f.apply(r,e)}finally{G(y),qe(!1),C(b),a&&l({time:Date.now()-c})}}function Ht(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 Ge(e,t){var n=J(e),r=t();return G(n),r}function J(e){var n=t.allowStateChanges;return t.allowStateChanges=e,n}function G(e){t.allowStateChanges=e}function _e(e){n(e.isDirty,"atom not dirty"),e.isDirty=!1,ae(e,!0)}function Z(){return t.derivationStack.length>0}function ee(){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 Qt(e){1===++e.dependencyStaleCount&&ke(e)}function qt(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();ae(e,r)}else ae(e,!1)}function Ee(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,Jt(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()&&_({type:"error",object:this,message:r}),console.warn(r),ne()}}}function Jt(r,u){t.derivationStack.length-=1;for(var o=ze(r.observing,u),i=o[0],a=o[1],e=0,s=i.length;s>e;e++){var c=i[e];n(!Ue(r,c),"Cycle detected",r),Ut(i[e],r)}for(var e=0,s=a.length;s>e;e++)oe(a[e],r)}function Ue(n,r){if(n===r)return!0;var e=r.observing;if(void 0===e)return!1;for(var i=e.length,t=0;i>t;t++)if(Ue(n,e[t]))return!0;return!1}function Fe(e){var t=E(),n=e();return C(t),n}function E(){var e=t.isTracking;return t.isTracking=!1,e}function C(e){t.isTracking=e}function Ft(){}function ne(){t.resetId++;var n=new Ce;for(var e in n)-1===Rt.indexOf(e)&&(t[e]=n[e]);t.allowStateChanges=!t.strictMode}function Ut(e,r){var t=e.observers,n=t.length;t[n]=r,0===n&&e.onBecomeObserved()}function oe(t,r){var e=t.observers,n=e.indexOf(r);-1!==n&&e.splice(n,1),0===e.length&&t.onBecomeUnobserved()}function Oe(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 ke(e){var t=e.observers.slice();t.forEach(Qt),e.staleObservers=e.staleObservers.concat(t)}function ae(e,t){e.staleObservers.splice(0).forEach(function(e){return qt(e,t)})}function ce(){if(!(t.isRunningReactions===!0||t.inTransaction>0)){t.isRunningReactions=!0;for(var e=t.pendingReactions,i=0;e.length>0;){if(++i===at)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 W}function _(r){if(!W)return!1;for(var n=t.spyListeners,e=0,i=n.length;i>e;e++)n[e](r)}function u(e){var t=tt({},e,{spyReportStart:!0});_(t)}function l(e){_(e?tt({},e,je):je)}function Ne(e){return t.spyListeners.push(e),W=t.spyListeners.length>0,N(function(){var n=t.spyListeners.indexOf(e);-1!==n&&t.spyListeners.splice(n,1),W=t.spyListeners.length>0})}function Pt(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?Ne(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 $(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 qe(t),r}function Ke(r,e,n){void 0===e&&(e=void 0),void 0===n&&(n=!0),t.inTransaction+=1,n&&i()&&u({type:"transaction",target:e,name:r})}function qe(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++)_e(r[n]);ce()}e&&i()&&l()}function S(e){return e.interceptors&&e.interceptors.length>0}function z(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 O(i,e){for(var o=E(),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 m(e){return e.changeListeners&&e.changeListeners.length>0}function F(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 g(r,n){var i=E(),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 H(e){return new te(e)}function re(e){return new U(e)}function Re(e){return new X(e)}function Et(e,t){return $e(e,t)}function L(e,t){return e instanceof te?[r.Reference,e.value]:e instanceof U?[r.Structure,e.value]:e instanceof X?[r.Flat,e.value]:[t,e]}function Ct(e){return e===H?r.Reference:e===re?r.Structure:e===Re?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 M(e,a,o){var t;if(Q(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=L(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)?Ve(e,e,t,o):e;var i}function p(e,t){if(e instanceof te||e instanceof U||e instanceof X)throw new Error("[mobx] asStructure / asReference / asFlat cannot be used here. "+t)}function St(e){Object.defineProperty(f.prototype,""+e,{enumerable:!1,configurable:!1,set:xt(e),get:wt(e)})}function xt(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){ee();var o=i[e];if(S(n)){var a=O(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?!q(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 wt(e){return function(){var t=this.$mobx;return t&&e<t.values.length?(t.atom.reportObserved(),t.values[e]):void 0}}function De(t){for(var e=ve;t>e;e++)St(e);ve=t}function Le(e,t,n){return new f(e,t,n)}function vt(e){return a("fastArray is deprecated. Please use `observable(asFlat([]))`"),Le(e,r.Flat,null)}function K(e){return e instanceof f}function $e(e,t){return new A(e,t)}function B(e){return e instanceof A}function fe(e,t,n){if(void 0===n&&(n=r.Recursive),y(e))return e.$mobx;w(e)||(t=e.constructor.name+"@"+s()),t||(t="ObservableObject@"+s());var i=new xe(e,t,n);return Object.defineProperty(e,"$mobx",{enumerable:!1,configurable:!1,writable:!1,value:i}),i}function dt(e,t,n){e.values[t]?e.target[t]=n:pe(e,t,n,!0)}function pe(t,n,e,a){a&&We(t.target,n);var r,i=t.name+"."+n,o=!0;if("function"!=typeof e||0!==e.length||Pe(e))if(e instanceof U&&"function"==typeof e.value&&0===e.value.length)r=new h(e.value,t.target,!0,i);else{if(o=!1,S(t)){var s=O(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 h(e,t.target,!1,i);t.values[n]=r,a&&Object.defineProperty(t.target,n,o?pt(n):ht(n)),o||ft(t,t.target,n,e)}function ht(e){var t=rt[e];return t?t:rt[e]={configurable:!0,enumerable:!0,get:function(){return this.$mobx.values[e].get()},set:function(t){we(this,e,t)}}}function pt(e){var t=Te[e];return t?t:Te[e]={configurable:!0,enumerable:!1,get:function(){return this.$mobx.values[e].get()},set:Se}}function we(r,o,e){var t=r.$mobx,a=t.values[o];if(S(t)){var n=O(t,{type:"update",object:r,name:o,newValue:e});if(!n)return;e=n.newValue}if(e=a.prepareNewValue(e),e!==P){var c=m(t),s=i(),n=g||m?{type:"update",object:r,oldValue:a.value,name:o,newValue:e}:null;s&&u(n),a.setNewValue(e),c&&g(t,n),s&&l()}}function ft(t,o,a,s){var n=m(t),e=i(),r=n||e?{type:"add",object:o,name:a,newValue:s}:null;e&&u(r),n&&g(t,r),e&&l()}function y(e){return"object"==typeof e&&null!==e?(V(e),e.$mobx instanceof xe):!1}function b(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(B(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 '"+be(e)+"'"),r}if(V(e),y(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 '"+be(e)+"'"),i}if(e instanceof j||e instanceof h||e instanceof d)return e}else if("function"==typeof e&&e.$mobx instanceof d)return e.$mobx;n(!1,"Cannot obtain atom from "+e)}function v(e,t){return n(e,"Expection some object"),void 0!==t?v(b(e,t)):e instanceof j||e instanceof h||e instanceof d?e:B(e)?e:(V(e),e.$mobx?e.$mobx:void n(!1,"Cannot obtain administration from "+e))}function be(e,t){var n;return n=void 0!==t?b(e,t):y(e)||B(e)?v(e):b(e),n.name}function ye(e,r,i,o,a){function t(s,t,u,l){if(n(a||Ze(arguments),"This function is a decorator, but it wasn't invoked like a decorator"),u){s.hasOwnProperty("__mobxLazyInitializers")||Object.defineProperty(s,"__mobxLazyInitializers",{writable:!1,configurable:!1,enumerable:!1,value:s.__mobxLazyInitializers&&s.__mobxLazyInitializers.slice()||[]});var p=u.value,f=u.initializer;return s.__mobxLazyInitializers.push(function(n){e(n,t,f?f.call(n):p,l,u)}),{enumerable:o,configurable:!0,get:function(){return this.__mobxDidRunLazyInitializers!==!0&&V(this),r.call(this,t)},set:function(e){this.__mobxDidRunLazyInitializers!==!0&&V(this),i.call(this,t,e)}}}var c={enumerable:o,configurable:!0,get:function(){return this.__mobxInitializedProps&&this.__mobxInitializedProps[t]===!0||Xe(this,t,void 0,e,l,c),r.call(this,t)},set:function(n){this.__mobxInitializedProps&&this.__mobxInitializedProps[t]===!0?i.call(this,t,n):Xe(this,t,n,e,l,c)}};return arguments.length<3&&Object.defineProperty(s,t,c),c}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 Xe(e,t,n,r,i,o){e.hasOwnProperty("__mobxInitializedProps")||Object.defineProperty(e,"__mobxInitializedProps",{enumerable:!1,configurable:!1,writable:!0,value:{}}),e.__mobxInitializedProps[t]=!0,r(e,t,n,i,o)}function V(e){e.__mobxDidRunLazyInitializers!==!0&&e.__mobxLazyInitializers&&(Object.defineProperty(e,"__mobxDidRunLazyInitializers",{enumerable:!1,configurable:!1,writable:!1,value:!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 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===Ae.indexOf(e)&&(Ae.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 D(t){var e=[];return t.forEach(function(t){-1===e.indexOf(t)&&e.push(t)}),e}function Y(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 tt(){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 me(n,e,t){return n?!q(e,t):e!==t}function ct(n,t){for(var e=0;e<t.length;e++)Object.defineProperty(n,t[e],{configurable:!0,writable:!0,enumerable:!1,value:n[t[e]]})}function Be(t,n){var e=Object.getOwnPropertyDescriptor(t,n);return!e||e.configurable!==!1&&e.writable!==!1}function We(t,e){n(Be(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 q(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;n>=0;n--)if(!q(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(!q(e[r],t[r]))return!1}return!0}return e===t}function ze(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 ue=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)};Ft(),e.extras={allowStateChanges:Ge,getAtom:b,getDebugName:be,getDependencyTree:mt,getObserverTree:st,isComputingDerivation:Z,isSpyEnabled:i,resetGlobalState:ne,spyReport:_,spyReportEnd:l,spyReportStart:u,trackTransitions:Pt},e._={getAdministration:v,quickDiff:ze,resetGlobalState:ne},e.autorun=ie,e.when=Ie,e.autorunUntil=Bt,e.autorunAsync=Wt,e.reaction=Gt;var bt=ye(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=fe(o,void 0,r.Recursive);pe(u,a,i?re(t):t,!1)},function(e){return this.$mobx.values[e].get()},Se,!1,!0);e.computed=le,e.createTransformer=jt,e.expr=_t,e.extendObservable=se,e.intercept=At,e.isObservable=Q;var yt=ye(function(t,n,e){var i=J(!0);"function"==typeof e&&(e=H(e));var o=fe(t,void 0,r.Recursive);pe(o,n,e,!0),G(i)},function(e){return this.$mobx.values[e].get()},function(e,t){we(this,e,t)},!0,!1);e.observable=de;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=Vt,e.toJS=R,e.toJSON=Lt,e.whyRun=Tt;var gt=ye(function(e,t,r,n,i){var a=n&&1===n.length?n[0]:r.name||t||"<unnamed action>",o=he(a,r);i&&i.value&&e.constructor&&e.constructor.prototype?Object.defineProperty(e.constructor.prototype,t,{configurable:!0,enumerable:!1,writable:!1,value:o}):Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:!1,value: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=Pe,e.runInAction=zt,e.useStrict=Ht;var j=function(){function e(e,t,n){void 0===e&&(e="Atom@"+s()),void 0===t&&(t=ot),void 0===n&&(n=ot),this.name=e,this.onBecomeObserved=t,this.onBecomeUnobserved=n,this.isDirty=!1,this.staleObservers=[],this.observers=[]}return e.prototype.reportObserved=function(){Oe(this)},e.prototype.reportChanged=function(){this.isDirty||(this.reportStale(),this.reportReady())},e.prototype.reportStale=function(){this.isDirty||(this.isDirty=!0,ke(this))},e.prototype.reportReady=function(){n(this.isDirty,"atom not dirty"),t.inTransaction>0?t.changedAtoms.push(this):(_e(this),ce())},e.prototype.toString=function(){return this.name},e}();e.Atom=j;var c,h=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=J(!1),t=this.derivation.call(this.scope);return G(e),this.isComputing=!1,t},e.prototype.onBecomeObserved=function(){},e.prototype.onBecomeUnobserved=function(){for(var e=0,t=this.observing.length;t>e;e++)oe(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",this.derivation),Oe(this),this.dependencyStaleCount>0)return this.peek();if(this.isLazy){if(!Z())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()&&_({object:this,type:"compute",fn:this.derivation,target:this.scope});var e=this.value,t=this.value=Ee(this,this.peek);return me(this.compareStructural,t,e)},e.prototype.observe=function(n,r){var i=this,e=!0,t=void 0;return ie(function(){var o=i.get();if(!e||r){var a=E();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=D(this.observing).map(function(e){return e.name}),r=D(this.observers).map(function(e){return e.name}),e=this.isComputing?n?this.observers.length>0?c.INVALIDATED:c.REQUIRED:c.PEEK:c.NOT_RUNNING;if(e===c.REQUIRED){var i=t.derivationStack[t.derivationStack.length-2];i&&r.push(i.name)}return"\nWhyRun? computation '"+this.name+"':\n * Running because: "+Ot[e]+" "+(e===c.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 "+Y(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 "+Y(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"}(c||(c={}));var Ot=(k={},k[c.PEEK]="[peek] The value of this computed value was requested outside an reaction",k[c.INVALIDATED]="[invalidated] Some observables used by this computation did change",k[c.REQUIRED]="[started] This computation is required by another computed value / reaction",k[c.NOT_RUNNING]="[idle] This compution is currently not running",k);e.untracked=Fe;var Rt=["mobxGuid","resetId","spyListeners","strictMode"],Ce=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 Ce;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}(),d=function(){function e(e,t){void 0===e&&(e="Reaction@"+s()),this.name=e,this.onInvalidate=t,this.staleObservers=T,this.observers=T,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),ce())},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()&&_({object:this,type:"scheduled-reaction"}))},e.prototype.track=function(e){var t,n=i();n&&(t=Date.now(),u({object:this,type:"reaction",fn:e})),this._isRunning=!0,Ee(this,e),this._isRunning=!1,this._isTrackPending=!1,n&&l({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++)oe(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=D(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 "+Y(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=d;var at=100,W=!1,je={spyReportEnd:!0};e.spy=Ne,e.transaction=$;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=H,e.asStructure=re,e.asFlat=Re;var te=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}(),X=function(){function e(e){this.value=e,p(e,"Modifiers are not allowed to be nested")}return e}();e.asMap=Et;var ve=0,Me=function(){function e(){}return e}();Me.prototype=[];var $t=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@"+s())}return e.prototype.makeReactiveArrayItem=function(e){return p(e,"Array values cannot have modifiers"),this.mode===r.Flat||this.mode===r.Reference?e:M(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}),F(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>ve&&De(t+e)},e.prototype.spliceWithArray=function(e,n,t){ee();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=O(this,{object:this.array,type:"splice",index:e,removedCount:n,added:t});if(!i)return T;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=m(this),n=t||e?{object:this.array,type:"update",index:r,newValue:o,oldValue:a}:null;e&&u(n),this.atom.reportChanged(),t&&g(this,n),e&&l()},e.prototype.notifyArraySplice=function(a,t,n){var e=!this.owned&&i(),r=m(this),o=r||e?{object:this.array,type:"splice",index:a,removed:n,added:t,removedCount:n.length,addedCount:t.length}:null;e&&u(o),this.atom.reportChanged(),r&&g(this,o),e&&l()},e}(),f=function(t){function e(n,i,o,r){void 0===r&&(r=!1),t.call(this);var e=new $t(o,i,this,r);Object.defineProperty(this,"$mobx",{enumerable:!1,configurable:!1,writable:!1,value:e}),n&&n.length?(e.updateArrayLength(0,n.length),e.values=n.map(e.makeReactiveArrayItem,e),e.notifyArraySplice(0,e.values.slice(),T)):e.values=[]}return ue(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}(Me);ct(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];Object.defineProperty(f.prototype,e,{configurable:!1,writable:!0,enumerable:!1,value:function(){return this.$mobx.atom.reportObserved(),t.apply(this.$mobx.values,arguments)}})}),De(1e3),e.fastArray=vt,e.isObservableArray=K;var Nt={},A=function(){function e(e,n){var t=this;this.$mobx=Nt,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=Ct(n),this._valueMode===r.Flat&&(this._valueMode=r.Reference),Ge(!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=O(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=O(this,{type:"delete",object:this,name:e});if(!n)return}if(this._has(e)){var r=i(),o=m(this),n=o||r?{type:"delete",object:this,oldValue:this._data[e].value,name:e}:null;r&&u(n),$(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&&g(this,n),r&&l()}},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!==P){var n=i(),o=m(this),a=o||n?{type:"update",object:this,oldValue:t.value,name:r,newValue:e}:null;n&&u(a),t.setNewValue(e),o&&g(this,a),n&&l()}},e.prototype._addValue=function(e,n){var t=this;$(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=m(this),a=o||r?{type:"add",object:this,name:e,newValue:n}:null;r&&u(a),o&&g(this,a),r&&l()},e.prototype.get=function(e){return e=""+e,this.has(e)?this._data[e].get():void 0},e.prototype.keys=function(){return this._keys.slice()},e.prototype.values=function(){return this.keys().map(this.get,this)},e.prototype.entries=function(){var e=this;return this.keys().map(function(t){return[t,e.get(t)]})},e.prototype.forEach=function(e,t){var n=this;this.keys().forEach(function(r){return e.call(t,n.get(r),r)})},e.prototype.merge=function(t){var n=this;return $(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;$(function(){Fe(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."),F(this,e)},e.prototype.intercept=function(e){return z(this,e)},e}();e.ObservableMap=A,e.map=$e,e.isObservableMap=B;var xe=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."),F(this,e)},e.prototype.intercept=function(e){return z(this,e)},e}(),rt={},Te={};e.isObservableObject=y;var P={},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=L(a,r.Recursive),c=o[0],l=o[1];this.mode===r.Recursive&&(this.mode=c),this.value=M(l,this.mode,this.name),n&&i()&&_({type:"create",object:this,newValue:this.value})}return ue(e,t),e.prototype.set=function(e){var n=this.value;if(e=this.prepareNewValue(e),e!==P){var t=i();t&&u({type:"update",object:this,newValue:e,oldValue:n}),this.setNewValue(e),t&&l()}},e.prototype.prepareNewValue=function(e){if(p(e,"Modifiers cannot be used on non-initial values."),ee(),S(this)){var t=O(this,{object:this,type:"update",newValue:e});if(!t)return P;e=t.newValue}var n=me(this.mode===r.Structure,this.value,e);return n?M(e,this.mode,this.name):P},e.prototype.setNewValue=function(e){var t=this.value;this.value=e,this.reportChanged(),m(this)&&g(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),F(this,e)},e.prototype.toJSON=function(){return this.get()},e.prototype.toString=function(){return this.name+"["+this.value+"]"},e}(j),Kt=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),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=Kt;var T=[];Object.freeze(T);var k,Ae=[],ot=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 oe(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 d(i,function(){this.track(e)});return a.schedule(),a.getDisposer()}function ke(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=oe(r,function(){if(i.call(t)){n?n():c=!0;var e=E();o.call(t),C(e)}});return c&&n(),n}function Bt(e,t,n){return a("`autorunUntil` is deprecated, please use `when`."),ke.apply(null,arguments)}function Wt(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 d(o,function(){a||(a=!0,setTimeout(function(){a=!1,i.isDisposed||i.track(t)},n))});return i.schedule(),i.getDisposer()}function Gt(o,p,w,g,m,_){function b(){if(!l.isDisposed){var e=!1;l.track(function(){var t=v();e=ye(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=g,e=m,i=_):(c=o.name||p.name||"Reaction@"+s(),f=o,t=p,n=w,e=g,i=m),void 0===n&&(n=!1),void 0===e&&(e=0);var y=L(f,r.Reference),R=y[0],v=y[1],x=R===r.Structure;i&&(v=v.bind(i),t=be(c,t.bind(i)));var u=!0,h=!1,a=void 0,l=new d(c,function(){1>e?b():h||(h=!0,setTimeout(function(){h=!1,b()},e))});return l.schedule(),l.getDisposer()}function se(e,t,r,i){return arguments.length<3&&"function"==typeof e?Mt(e,t):(n(!r||!r.set,"@observable properties cannot have a setter: "+t),yt.apply(null,arguments))}function Mt(n,i){var e=L(n,r.Recursive),o=e[0],t=e[1];return new h(t,i,o===r.Structure,t.name)}function Se(){throw new Error("[ComputedValue] It is not allowed to assign new values to computed properties.")}function At(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 ce(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}(h);return function(i){o!==t.resetId&&(r={},o=t.resetId);var n=kt(i),e=r[n];return e?e.get():(e=r[n]=new a(n,i),e.get())}}function kt(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(),Object.defineProperty(e,"$transformId",{configurable:!0,writable:!0,enumerable:!1,value:t})),t}function _t(e,t){return ee()||console.warn("[mobx.expr] 'expr' should only be used inside other reactive functions."),se(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 j),"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"),Ve(e,t,r.Recursive,null)}),e}function Ve(e,t,r,i){var o=pe(e,i,r);for(var n in t)if(t.hasOwnProperty(n)){if(e===t&&!We(e,n))continue;dt(o,n,t[n])}return e}function mt(e,t){return tt(y(e,t))}function tt(e){var t={name:e.name};return e.observing&&e.observing.length&&(t.dependencies=D(e.observing).map(tt)),t}function at(e,t){return nt(y(e,t))}function nt(e){var t={name:e.name};return e.observers&&e.observers.length&&(t.observers=D(e.observers).map(nt)),t}function jt(e,t,n){return"function"==typeof n?Ye(e,t,n):st(e,t)}function st(e,t){return w(e)&&!b(e)?(a("Passing plain objects to intercept / observe is deprecated and will be removed in 3.0"),v(ve(e)).intercept(t)):v(e).intercept(t)}function Ye(e,t,n){return w(e)&&!b(e)?(a("Passing plain objects to intercept / observe is deprecated and will be removed in 3.0"),ue(e,{property:e[t]}),Ye(e,t,n)):v(e,t).intercept(n)}function Q(e,t){if(null===e||void 0===e)return!1;if(void 0!==t){if(e instanceof j||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(b(e)){var n=e.$mobx;return n.values&&!!n.values[t]}return!1}return!!e.$mobx||e instanceof A||e instanceof d||e instanceof h}function ut(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"),bt.apply(null,arguments)}function ve(e,u){if(void 0===e&&(e=void 0),"string"==typeof arguments[1])return ut.apply(null,arguments);if(n(arguments.length<3,"observable expects zero, one or two arguments"),Q(e))return e;var s=L(e,r.Recursive),t=s[0],i=s[1],c=t===r.Reference?o.Reference:It(i);switch(c){case o.Array:case o.PlainObject:return M(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)`"),se(e,u)}n(!1,"Illegal State")}function It(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 Vt(t,n,e,r){return"function"==typeof e?Qe(t,n,e,r):Dt(t,n,e)}function Dt(e,t,n){return w(e)&&!b(e)?(a("Passing plain objects to intercept / observe is deprecated and will be removed in 3.0"),v(ve(e)).observe(t,n)):v(e).observe(t,n)}function Qe(e,t,n,r){return w(e)&&!b(e)?(a("Passing plain objects to intercept / observe is deprecated and will be removed in 3.0"),ue(e,{property:e[t]}),Qe(e,t,n,r)):v(e,t).observe(n,r)}function O(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 O(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 j){var u=o({});return e.forEach(function(e,r){return u[r]=O(e,n,t)}),u}if(Q(e)&&e.$mobx instanceof I)return O(e(),n,t);if(e instanceof I)return O(e.get(),n,t);if("object"==typeof e){var i=o({});for(var c in e)i[c]=O(e[c],n,t);return i}return e}function Lt(n,e,t){return void 0===e&&(e=!0),void 0===t&&(t=null),a("toJSON is deprecated. Use toJS instead"),O.apply(null,arguments)}function X(e){return console.log(e),e}function Tt(e,r){switch(arguments.length){case 0:if(e=t.derivationStack[t.derivationStack.length-1],!e)return X("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 h?X(e.whyRun()):e instanceof d?X(e.whyRun()):void n(!1,"whyRun can only be used on reactions and computed values")}function be(e,t,n,r){return 1===arguments.length&&"function"==typeof e?re(e.name||"<unnamed action>",e):2===arguments.length&&"function"==typeof t?re(e,t):1===arguments.length&&"string"==typeof e?Ee(e):Ee(t).apply(null,arguments)}function Ee(e){return function(n,r,t){return t&&"function"==typeof t.value?(t.value=re(e,t.value),t.enumerable=!1,t):gt(e).apply(this,arguments)}}function Ie(e){return"function"==typeof e&&e.isMobxAction===!0}function Ft(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+"'"),He(t,r,a,void 0)}function re(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 He(e,t,this,arguments)};return r.isMobxAction=!0,r}function He(d,f,r,e){var s=t.derivationStack;n(!(s[s.length-1]instanceof h),"Computed values or transformers should not invoke actions or trigger other side effects");var c,a=i();if(a){c=Date.now();var p=[];if(e)for(var o=0,v=e.length;v>o;o++)p.push(e[o]);u({type:"action",name:d,fn:f,target:r,arguments:p})}var y=E();Fe(d,r,!1);var b=J(!0);try{return f.apply(r,e)}finally{G(b),Ke(!1),C(y),a&&l({time:Date.now()-c})}}function ft(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 rt(e,t){var n=J(e),r=t();return G(n),r}function J(e){var n=t.allowStateChanges;return t.allowStateChanges=e,n}function G(e){t.allowStateChanges=e}function Ue(e){n(e.isDirty,"atom not dirty"),e.isDirty=!1,fe(e,!0)}function ee(){return t.derivationStack.length>0}function te(){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 Qt(e){1===++e.dependencyStaleCount&&Re(e)}function qt(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();fe(e,r)}else fe(e,!1)}function je(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,Jt(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()&&_({type:"error",object:this,message:r}),console.warn(r),ae()}}}function Jt(n,s){t.derivationStack.length-=1;for(var i=ze(n.observing,s),r=i[0],o=i[1],e=0,a=r.length;a>e;e++){r[e];zt(r[e],n)}for(var e=0,a=o.length;a>e;e++)le(o[e],n)}function Ne(e){var t=E(),n=e();return C(t),n}function E(){var e=t.isTracking;return t.isTracking=!1,e}function C(e){t.isTracking=e}function Ut(){}function ae(){t.resetId++;var n=new Ce;for(var e in n)-1===Ot.indexOf(e)&&(t[e]=n[e]);t.allowStateChanges=!t.strictMode}function zt(e,r){var t=e.observers,n=t.length;t[n]=r,0===n&&e.onBecomeObserved()}function le(t,r){var e=t.observers,n=e.indexOf(r);-1!==n&&e.splice(n,1),0===e.length&&t.onBecomeUnobserved()}function _e(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 Re(e){var t=e.observers.slice();t.forEach(Qt),e.staleObservers=e.staleObservers.concat(t)}function fe(e,t){e.staleObservers.splice(0).forEach(function(e){return qt(e,t)})}function de(){if(!(t.isRunningReactions===!0||t.inTransaction>0)){t.isRunningReactions=!0;for(var e=t.pendingReactions,i=0;e.length>0;){if(++i===Ht)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 W}function _(r){if(!W)return!1;for(var n=t.spyListeners,e=0,i=n.length;i>e;e++)n[e](r)}function u(e){var t=et({},e,{spyReportStart:!0});_(t)}function l(e){_(e?et({},e,Ae):Ae)}function Me(e){return t.spyListeners.push(e),W=t.spyListeners.length>0,N(function(){var n=t.spyListeners.indexOf(e);-1!==n&&t.spyListeners.splice(n,1),W=t.spyListeners.length>0})}function Pt(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?Me(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 $(n,e,t){void 0===e&&(e=void 0),void 0===t&&(t=!0),Fe(n.name||"anonymous transaction",e,t);var r=n.call(e);return Ke(t),r}function Fe(r,e,n){void 0===e&&(e=void 0),void 0===n&&(n=!0),t.inTransaction+=1,n&&i()&&u({type:"transaction",target:e,name:r})}function Ke(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++)Ue(r[n]);de()}e&&i()&&l()}function S(e){return e.interceptors&&e.interceptors.length>0}function z(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=E(),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 m(e){return e.changeListeners&&e.changeListeners.length>0}function F(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 g(r,n){var i=E(),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 H(e){return new ne(e)}function ie(e){return new U(e)}function Oe(e){return new Y(e)}function Et(e,t){return $e(e,t)}function L(e,t){return e instanceof ne?[r.Reference,e.value]:e instanceof U?[r.Structure,e.value]:e instanceof Y?[r.Flat,e.value]:[t,e]}function Ct(e){return e===H?r.Reference:e===ie?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 M(e,a,o){var t;if(Q(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=L(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)?Ve(e,e,t,o):e;var i}function p(e,t){if(e instanceof ne||e instanceof U||e instanceof Y)throw new Error("[mobx] asStructure / asReference / asFlat cannot be used here. "+t)}function St(e){Object.defineProperty(f.prototype,""+e,{enumerable:!1,configurable:!1,set:xt(e),get:wt(e)})}function xt(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){te();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?!q(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 wt(e){return function(){var t=this.$mobx;return t&&e<t.values.length?(t.atom.reportObserved(),t.values[e]):void 0}}function De(t){for(var e=we;t>e;e++)St(e);we=t}function Le(e,t,n){return new f(e,t,n)}function vt(e){return a("fastArray is deprecated. Please use `observable(asFlat([]))`"),Le(e,r.Flat,null)}function K(e){return e instanceof f}function $e(e,t){return new j(e,t)}function B(e){return e instanceof j}function pe(e,t,n){if(void 0===n&&(n=r.Recursive),b(e))return e.$mobx;w(e)||(t=e.constructor.name+"@"+s()),t||(t="ObservableObject@"+s());var i=new qe(e,t,n);return Object.defineProperty(e,"$mobx",{enumerable:!1,configurable:!1,writable:!1,value:i}),i}function dt(e,t,n){e.values[t]?e.target[t]=n:he(e,t,n,!0)}function he(t,n,e,a){a&&Ge(t.target,n);var r,i=t.name+"."+n,o=!0;if("function"!=typeof e||0!==e.length||Ie(e))if(e instanceof U&&"function"==typeof e.value&&0===e.value.length)r=new h(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 h(e,t.target,!1,i);t.values[n]=r,a&&Object.defineProperty(t.target,n,o?pt(n):ht(n)),o||lt(t,t.target,n,e)}function ht(e){var t=Be[e];return t?t:Be[e]={configurable:!0,enumerable:!0,get:function(){return this.$mobx.values[e].get()},set:function(t){xe(this,e,t)}}}function pt(e){var t=Pe[e];return t?t:Pe[e]={configurable:!0,enumerable:!1,get:function(){return this.$mobx.values[e].get()},set:Se}}function xe(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!==P){var c=m(t),s=i(),n=g||m?{type:"update",object:r,oldValue:a.value,name:o,newValue:e}:null;s&&u(n),a.setNewValue(e),c&&g(t,n),s&&l()}}function lt(t,o,a,s){var n=m(t),e=i(),r=n||e?{type:"add",object:o,name:a,newValue:s}:null;e&&u(r),n&&g(t,r),e&&l()}function b(e){return"object"==typeof e&&null!==e?(V(e),e.$mobx instanceof qe):!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(B(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 '"+me(e)+"'"),r}if(V(e),b(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 '"+me(e)+"'"),i}if(e instanceof A||e instanceof h||e instanceof d)return e}else if("function"==typeof e&&e.$mobx instanceof d)return e.$mobx;n(!1,"Cannot obtain atom from "+e)}function v(e,t){return n(e,"Expection some object"),void 0!==t?v(y(e,t)):e instanceof A||e instanceof h||e instanceof d?e:B(e)?e:(V(e),e.$mobx?e.$mobx:void n(!1,"Cannot obtain administration from "+e))}function me(e,t){var n;return n=void 0!==t?y(e,t):b(e)||B(e)?v(e):y(e),n.name}function ge(e,r,i,o,a){function t(s,t,u,l){if(n(a||Ze(arguments),"This function is a decorator, but it wasn't invoked like a decorator"),u){s.hasOwnProperty("__mobxLazyInitializers")||Object.defineProperty(s,"__mobxLazyInitializers",{writable:!1,configurable:!1,enumerable:!1,value:s.__mobxLazyInitializers&&s.__mobxLazyInitializers.slice()||[]});var p=u.value,f=u.initializer;return s.__mobxLazyInitializers.push(function(n){e(n,t,f?f.call(n):p,l,u)}),{enumerable:o,configurable:!0,get:function(){return this.__mobxDidRunLazyInitializers!==!0&&V(this),r.call(this,t)},set:function(e){this.__mobxDidRunLazyInitializers!==!0&&V(this),i.call(this,t,e)}}}var c={enumerable:o,configurable:!0,get:function(){return this.__mobxInitializedProps&&this.__mobxInitializedProps[t]===!0||Xe(this,t,void 0,e,l,c),r.call(this,t)},set:function(n){this.__mobxInitializedProps&&this.__mobxInitializedProps[t]===!0?i.call(this,t,n):Xe(this,t,n,e,l,c)}};return arguments.length<3&&Object.defineProperty(s,t,c),c}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 Xe(e,t,n,r,i,o){e.hasOwnProperty("__mobxInitializedProps")||Object.defineProperty(e,"__mobxInitializedProps",{enumerable:!1,configurable:!1,writable:!0,value:{}}),e.__mobxInitializedProps[t]=!0,r(e,t,n,i,o)}function V(e){e.__mobxDidRunLazyInitializers!==!0&&e.__mobxLazyInitializers&&(Object.defineProperty(e,"__mobxDidRunLazyInitializers",{enumerable:!1,configurable:!1,writable:!1,value:!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 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===it.indexOf(e)&&(it.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 D(t){var e=[];return t.forEach(function(t){-1===e.indexOf(t)&&e.push(t)}),e}function Z(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 et(){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 ye(n,e,t){return n?!q(e,t):e!==t}function ct(n,t){for(var e=0;e<t.length;e++)Object.defineProperty(n,t[e],{configurable:!0,writable:!0,enumerable:!1,value:n[t[e]]})}function We(t,n){var e=Object.getOwnPropertyDescriptor(t,n);return!e||e.configurable!==!1&&e.writable!==!1}function Ge(t,e){n(We(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 q(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;n>=0;n--)if(!q(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(!q(e[r],t[r]))return!1}return!0}return e===t}function ze(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 ce=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)};Ut(),e.extras={allowStateChanges:rt,getAtom:y,getDebugName:me,getDependencyTree:mt,getObserverTree:at,isComputingDerivation:ee,isSpyEnabled:i,resetGlobalState:ae,spyReport:_,spyReportEnd:l,spyReportStart:u,trackTransitions:Pt},e._={getAdministration:v,quickDiff:ze,resetGlobalState:ae},e.autorun=oe,e.when=ke,e.autorunUntil=Bt,e.autorunAsync=Wt,e.reaction=Gt;var yt=ge(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=pe(o,void 0,r.Recursive);he(u,a,i?ie(t):t,!1)},function(e){return this.$mobx.values[e].get()},Se,!1,!0);e.computed=se,e.createTransformer=At,e.expr=_t,e.extendObservable=ue,e.intercept=jt,e.isObservable=Q;var bt=ge(function(t,n,e){var i=J(!0);"function"==typeof e&&(e=H(e));var o=pe(t,void 0,r.Recursive);he(o,n,e,!0),G(i)},function(e){return this.$mobx.values[e].get()},function(e,t){xe(this,e,t)},!0,!1);e.observable=ve;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=Vt,e.toJS=O,e.toJSON=Lt,e.whyRun=Tt;var gt=ge(function(r,t,n,e,a){var i=e&&1===e.length?e[0]:n.name||t||"<unnamed action>",o=be(i,n);Object.defineProperty(r,t,{configurable:!0,enumerable:!1,writable:!1,value:o})},function(e){return this[e]},function(){n(!1,"It is not allowed to assign new values to @action fields")},!1,!0);e.action=be,e.isAction=Ie,e.runInAction=Ft,e.useStrict=ft;var A=function(){function e(e,t,n){void 0===e&&(e="Atom@"+s()),void 0===t&&(t=ot),void 0===n&&(n=ot),this.name=e,this.onBecomeObserved=t,this.onBecomeUnobserved=n,this.isDirty=!1,this.staleObservers=[],this.observers=[]}return e.prototype.reportObserved=function(){_e(this)},e.prototype.reportChanged=function(){this.isDirty||(this.reportStale(),this.reportReady())},e.prototype.reportStale=function(){this.isDirty||(this.isDirty=!0,Re(this))},e.prototype.reportReady=function(){n(this.isDirty,"atom not dirty"),t.inTransaction>0?t.changedAtoms.push(this):(Ue(this),de())},e.prototype.toString=function(){return this.name},e}();e.Atom=A;var c,h=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=J(!1),t=this.derivation.call(this.scope);return G(e),this.isComputing=!1,t},e.prototype.onBecomeObserved=function(){},e.prototype.onBecomeUnobserved=function(){for(var e=0,t=this.observing.length;t>e;e++)le(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),_e(this),this.dependencyStaleCount>0)return this.peek();if(this.isLazy){if(!ee())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()&&_({object:this,type:"compute",fn:this.derivation,target:this.scope});var e=this.value,t=this.value=je(this,this.peek);return ye(this.compareStructural,t,e)},e.prototype.observe=function(n,r){var i=this,e=!0,t=void 0;return oe(function(){var o=i.get();if(!e||r){var a=E();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=D(this.observing).map(function(e){return e.name}),r=D(this.observers).map(function(e){return e.name}),e=this.isComputing?n?this.observers.length>0?c.INVALIDATED:c.REQUIRED:c.PEEK:c.NOT_RUNNING;if(e===c.REQUIRED){var i=t.derivationStack[t.derivationStack.length-2];i&&r.push(i.name)}return"\nWhyRun? computation '"+this.name+"':\n * Running because: "+Rt[e]+" "+(e===c.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 "+Z(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 "+Z(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"}(c||(c={}));var Rt=(k={},k[c.PEEK]="[peek] The value of this computed value was requested outside an reaction",k[c.INVALIDATED]="[invalidated] Some observables used by this computation did change",k[c.REQUIRED]="[started] This computation is required by another computed value / reaction",k[c.NOT_RUNNING]="[idle] This compution is currently not running",k);e.untracked=Ne;var Ot=["mobxGuid","resetId","spyListeners","strictMode"],Ce=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 Ce;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}(),d=function(){function e(e,t){void 0===e&&(e="Reaction@"+s()),this.name=e,this.onInvalidate=t,this.staleObservers=T,this.observers=T,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),de())},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()&&_({object:this,type:"scheduled-reaction"}))},e.prototype.track=function(e){var t,n=i();n&&(t=Date.now(),u({object:this,type:"reaction",fn:e})),this._isRunning=!0,je(this,e),this._isRunning=!1,this._isTrackPending=!1,n&&l({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++)le(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=D(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 "+Z(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=d;var Ht=100,W=!1,Ae={spyReportEnd:!0};e.spy=Me,e.transaction=$;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=H,e.asStructure=ie,e.asFlat=Oe;var ne=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}(),Y=function(){function e(e){this.value=e,p(e,"Modifiers are not allowed to be nested")}return e}();e.asMap=Et;var we=0,Te=function(){function e(){}return e}();Te.prototype=[];var $t=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 A(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:M(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}),F(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>we&&De(t+e)},e.prototype.spliceWithArray=function(e,n,t){te();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 T;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=m(this),n=t||e?{object:this.array,type:"update",index:r,newValue:o,oldValue:a}:null;e&&u(n),this.atom.reportChanged(),t&&g(this,n),e&&l()},e.prototype.notifyArraySplice=function(a,t,n){var e=!this.owned&&i(),r=m(this),o=r||e?{object:this.array,type:"splice",index:a,removed:n,added:t,removedCount:n.length,addedCount:t.length}:null;e&&u(o),this.atom.reportChanged(),r&&g(this,o),e&&l()},e}(),f=function(t){function e(n,i,o,r){void 0===r&&(r=!1),t.call(this);var e=new $t(o,i,this,r);Object.defineProperty(this,"$mobx",{enumerable:!1,configurable:!1,writable:!1,value:e}),n&&n.length?(e.updateArrayLength(0,n.length),e.values=n.map(e.makeReactiveArrayItem,e),e.notifyArraySplice(0,e.values.slice(),T)):e.values=[]}return ce(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}(Te);ct(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];Object.defineProperty(f.prototype,e,{configurable:!1,writable:!0,enumerable:!1,value:function(){return this.$mobx.atom.reportObserved(),t.apply(this.$mobx.values,arguments)}})}),De(1e3),e.fastArray=vt,e.isObservableArray=K;var Nt={},j=function(){function e(e,n){var t=this;this.$mobx=Nt,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=Ct(n),this._valueMode===r.Flat&&(this._valueMode=r.Reference),rt(!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=m(this),n=o||r?{type:"delete",object:this,oldValue:this._data[e].value,name:e}:null;r&&u(n),$(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&&g(this,n),r&&l()}},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!==P){var n=i(),o=m(this),a=o||n?{type:"update",object:this,oldValue:t.value,name:r,newValue:e}:null;n&&u(a),t.setNewValue(e),o&&g(this,a),n&&l()}},e.prototype._addValue=function(e,n){var t=this;$(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=m(this),a=o||r?{type:"add",object:this,name:e,newValue:n}:null;r&&u(a),o&&g(this,a),r&&l()},e.prototype.get=function(e){return e=""+e,this.has(e)?this._data[e].get():void 0},e.prototype.keys=function(){return this._keys.slice()},e.prototype.values=function(){return this.keys().map(this.get,this)},e.prototype.entries=function(){var e=this;return this.keys().map(function(t){return[t,e.get(t)]})},e.prototype.forEach=function(e,t){var n=this;this.keys().forEach(function(r){return e.call(t,n.get(r),r)})},e.prototype.merge=function(t){var n=this;return $(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;$(function(){Ne(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."),F(this,e)},e.prototype.intercept=function(e){return z(this,e)},e}();e.ObservableMap=j,e.map=$e,e.isObservableMap=B;var qe=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."),F(this,e)},e.prototype.intercept=function(e){return z(this,e)},e}(),Be={},Pe={};e.isObservableObject=b;var P={},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=L(a,r.Recursive),c=o[0],l=o[1];this.mode===r.Recursive&&(this.mode=c),this.value=M(l,this.mode,this.name),n&&i()&&_({type:"create",object:this,newValue:this.value})}return ce(e,t),e.prototype.set=function(e){var n=this.value;if(e=this.prepareNewValue(e),e!==P){var t=i();t&&u({type:"update",object:this,newValue:e,oldValue:n}),this.setNewValue(e),t&&l()}},e.prototype.prepareNewValue=function(e){if(p(e,"Modifiers cannot be used on non-initial values."),te(),S(this)){var t=R(this,{object:this,type:"update",newValue:e});if(!t)return P;e=t.newValue}var n=ye(this.mode===r.Structure,this.value,e);return n?M(e,this.mode,this.name):P},e.prototype.setNewValue=function(e){var t=this.value;this.value=e,this.reportChanged(),m(this)&&g(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),F(this,e)},e.prototype.toJSON=function(){return this.get()},e.prototype.toString=function(){return this.name+"["+this.value+"]"},e}(A),Kt=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),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=Kt;var T=[];Object.freeze(T);var k,it=[],ot=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.3",
"version": "2.3.4",
"description": "Simple, scalable state management.",

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

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

* [Transparent Reactive Programming and Mutable Data, Reactive2015 conf](https://www.youtube.com/watch?v=FEwLwiizlk0) ([slides](https://speakerdeck.com/mweststrate/react-transparent-reactive-programming-and-mutable-data-structures))
* More tutorials, blogs and videos can be found on the [MobX homepage](http://mobxjs.github.io/mobx/faq/blogs.html)
* [Boilerplates and related projects](http://mobxjs.github.io/mobx/faq/related.html)
## Introduction

@@ -52,3 +55,3 @@

Using `@observable` is like turning a value into a spreadsheet cell. But unlike spreadsheets, these values can be not just primitive values, but references, objects and arrays as well. You can even [define your own](http://mobxjs.github.io/mobx/refguide/extending.html) observable data sources.
Using `@observable` is like turning a value into a spreadsheet cell. But unlike spreadsheets, not only can these values be primitive values, but references, objects and arrays as well. You can even [define your own](http://mobxjs.github.io/mobx/refguide/extending.html) observable data sources.

@@ -205,45 +208,7 @@ ### Computed values

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

@@ -263,7 +228,5 @@

More testimonials from people using MobX in production can be found on [medium: functional reactive flux blog](https://medium.com/@kenneth_chau/the-2-fundamental-laws-of-flux-and-the-functional-reactive-flux-c9368ac008d3#.h41y0i22h), [hacker news](https://news.ycombinator.com/item?id=11181980), [reddit 1](https://www.reddit.com/r/reactjs/comments/46m2zg/has_anybody_used_mobservable_for_their_react/), [reddit 2](https://www.reddit.com/r/javascript/comments/47omi9/mobx_20_previously_mobservable_has_been_released/) or on twitter under the [#mobx](https://twitter.com/search?q=mobx&src=typd) tag.
## Contributing
* Feel free to send pull requests.
* Feel free to send small pull requests. Please discuss new features or big changes in a GitHub issue first.
* Use `npm test` to run the basic test suite, `npm run coverage` for the test suite with coverage and `npm run perf` for the performance tests.

@@ -270,0 +233,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