/** 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 e(t,n,r){function o(a,s){if(!n[a]){if(!t[a]){var u="function"==typeof require&&require;if(!s&&u)return u(a,!0);if(i)return i(a,!0);var c=new Error("Cannot find module '"+a+"'");throw c.code="MODULE_NOT_FOUND",c}var l=n[a]={exports:{}};t[a][0].call(l.exports,function(e){var n=t[a][1][e];return o(n?n:e)},l,l.exports,e,t,n,r)}return n[a].exports}for(var i="function"==typeof require&&require,a=0;a<r.length;a++)o(r[a]);return o}({1:[function(e,t,n){(function(e){"use strict";function r(e){return function(t,n,r){return r&&"function"==typeof r.value?(r.value=M(e,r.value),r.enumerable=!1,r.configurable=!0,r):Wt(e).apply(this,arguments)}}function o(e,t,n){var r="string"==typeof e?e:e.name||"<unnamed action>",o="function"==typeof e?e:t,i="function"==typeof e?t:n;return _t("function"==typeof o,yt("m002")),_t(0===o.length,yt("m003")),_t("string"==typeof r&&r.length>0,"actions should have valid names, got: '"+r+"'"),B(r,o,i,void 0)}function i(e){return"function"==typeof e&&e.isMobxAction===!0}function a(e,t,n){var r=function(){return B(t,n,e,arguments)};r.isMobxAction=!0,Vt(e,t,r)}function s(e,t,n){function r(){a(u)}var o,a,s;"string"==typeof e?(o=e,a=t,s=n):(o=e.name||"Autorun@"+wt(),a=e,s=t),_t("function"==typeof a,yt("m004")),_t(i(a)===!1,yt("m005")),s&&(a=a.bind(s));var u=new bn(o,function(){this.track(r)});return u.schedule(),u.getDisposer()}function u(e,t,n,r){var o,i,a,u;return"string"==typeof e?(o=e,i=t,a=n,u=r):(o="When@"+wt(),i=e,a=t,u=n),s(o,function(e){if(i.call(u)){e.dispose();var t=te();a.call(u),ne(t)}})}function c(e,t,n,r){function o(){s(p)}var a,s,u,c;"string"==typeof e?(a=e,s=t,u=n,c=r):(a=e.name||"AutorunAsync@"+wt(),s=e,u=t,c=n),_t(i(s)===!1,yt("m006")),void 0===u&&(u=1),c&&(s=s.bind(c));var l=!1,p=new bn(a,function(){l||(l=!0,setTimeout(function(){l=!1,p.isDisposed||p.track(o)},u))});return p.schedule(),p.getDisposer()}function l(e,t,n){function r(){if(!u.isDisposed){var n=!1;u.track(function(){var t=e(u);n=Et(o.compareStructural,i,t),i=t}),a&&o.fireImmediately&&t(i,u),a||n!==!0||t(i,u),a&&(a=!1)}}arguments.length>3&&xt(yt("m007")),Be(e)&&xt(yt("m008"));var o;o="object"==typeof n?n:{},o.name=o.name||e.name||t.name||"Reaction@"+wt(),o.fireImmediately=n===!0||o.fireImmediately===!0,o.delay=o.delay||0,o.compareStructural=o.compareStructural||o.struct||!1,t=Yt(o.name,o.context?t.bind(o.context):t),o.context&&(e=e.bind(o.context));var i,a=!0,s=!1,u=new bn(o.name,function(){o.delay<1?r():s||(s=!0,setTimeout(function(){s=!1,r()},o.delay))});return u.schedule(),u.getDisposer()}function p(e){return pt(function(t,n,r,o,i){_t(void 0!==i,yt("m009")),_t("function"==typeof i.get,yt("m010")),tt(Qe(t,""),n,i.get,i.set,e,!1)},function(e){var t=this.$mobx.values[e];if(void 0!==t)return t.get()},function(e,t){this.$mobx.values[e].set(t)},!1,!1)}function f(e,t){_t("function"==typeof e&&e.length<2,"createTransformer expects a function that accepts one argument");var n={},r=vn.resetId,o=function(r){function o(t,n){var o=r.call(this,function(){return e(n)},void 0,!1,"Transformer-"+e.name+"-"+t,void 0)||this;return o.sourceIdentifier=t,o.sourceObject=n,o}return Kt(o,r),o.prototype.onBecomeUnobserved=function(){var e=this.value;r.prototype.onBecomeUnobserved.call(this),delete n[this.sourceIdentifier],t&&t(e,this.sourceObject)},o}(cn);return function(e){r!==vn.resetId&&(n={},r=vn.resetId);var t=h(e),i=n[t];return i?i.get():(i=n[t]=new o(t,e),i.get())}}function h(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=wt(),Vt(e,"$transformId",t)),t}function d(e,t){return q()||console.warn(yt("m013")),Xt(e,{context:t}).get()}function v(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return m(e,Ue,t)}function b(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return m(e,He,t)}function m(e,t,n){_t(arguments.length>=2,yt("m014")),_t("object"==typeof e,yt("m015")),_t(!kn(e),yt("m016")),n.forEach(function(e){_t("object"==typeof e,yt("m017")),_t(!j(e),yt("m018"))});for(var r=Qe(e),o={},i=n.length-1;i>=0;i--){var a=n[i];for(var s in a)if(o[s]!==!0&&Dt(a,s)){if(o[s]=!0,e===a&&!Pt(e,s))continue;var u=Object.getOwnPropertyDescriptor(a,s);Ze(r,s,u,t)}}return e}function y(e,t){return g(ut(e,t))}function g(e){var t={name:e.name};return e.observing&&e.observing.length>0&&(t.dependencies=At(e.observing).map(g)),t}function w(e,t){return x(ut(e,t))}function x(e){var t={name:e.name};return ue(e)&&(t.observers=ce(e).map(x)),t}function _(e,t,n){return"function"==typeof n?S(e,t,n):O(e,t)}function O(e,t){return ct(e).intercept(t)}function S(e,t,n){return ct(e,t).intercept(n)}function A(e,t){if(null===e||void 0===e)return!1;if(void 0!==t){if(st(e)===!1)return!1;return pn(ut(e,t))}return pn(e)}function j(e,t){if(null===e||void 0===e)return!1;if(void 0!==t){if(Fe(e)||kn(e))throw new Error(yt("m019"));if(st(e)){var n=e.$mobx;return n.values&&!!n.values[t]}return!1}return st(e)||!!e.$mobx||un(e)||yn(e)||pn(e)}function I(e){if(void 0===e&&(e=void 0),"string"==typeof arguments[1])return Qt.apply(null,arguments);if(_t(arguments.length<=1,yt("m021")),_t(!Be(e),yt("m020")),j(e))return e;var t=Ue(e,void 0,void 0);return t!==e?t:on.box(e)}function T(e){xt("Expected one or two arguments to observable."+e+". Did you accidentally try to use observable."+e+" as decorator?")}function k(e){return _t(!!e,":("),pt(function(t,n,r,o,i){$t(t,n),_t(!i||!i.get,yt("m022")),et(Qe(t,void 0),n,r,e)},function(e){var t=this.$mobx.values[e];if(void 0!==t)return t.get()},function(e,t){it(this,e,t)},!0,!1)}function E(e,t,n,r){return"function"==typeof n?R(e,t,n,r):D(e,t,n)}function D(e,t,n){return ct(e).observe(t,n)}function R(e,t,n,r){return ct(e,t).observe(n,r)}function V(e,t,n){function r(r){return t&&n.push([e,r]),r}if(void 0===t&&(t=!0),void 0===n&&(n=[]),j(e)){if(t&&null===n&&(n=[]),t&&null!==e&&"object"==typeof e)for(var o=0,i=n.length;o<i;o++)if(n[o][0]===e)return n[o][1];if(Fe(e)){var a=r([]),s=e.map(function(e){return V(e,t,n)});a.length=s.length;for(var o=0,i=s.length;o<i;o++)a[o]=s[o];return a}if(st(e)){var a=r({});for(var u in e)a[u]=V(e[u],t,n);return a}if(kn(e)){var c=r({});return e.forEach(function(e,r){return c[r]=V(e,t,n)}),c}if($n(e))return V(e.get(),t,n)}return e}function L(e,t){return void 0===t&&(t=void 0),Ot(yt("m023")),P.apply(void 0,arguments)}function P(e,t){return void 0===t&&(t=void 0),B("",e)}function $(e){return console.log(e),e}function C(e,t){switch(arguments.length){case 0:if(e=vn.trackingDerivation,!e)return $(yt("m024"));break;case 2:e=ut(e,t)}return e=ut(e),pn(e)?$(e.whyRun()):yn(e)?$(e.whyRun()):xt(yt("m025"))}function M(e,t){_t("function"==typeof t,yt("m026")),_t("string"==typeof e&&e.length>0,"actions should have valid names, got: '"+e+"'");var n=function(){return B(e,t,this,arguments)};return n.originalFn=t,n.isMobxAction=!0,n}function B(e,t,n,r){var o=N(e,t,n,r);try{return t.apply(n,r)}finally{U(o)}}function N(e,t,n,r){var o=Se()&&!!e,i=0;if(o){i=Date.now();var a=r&&r.length||0,s=new Array(a);if(a>0)for(var u=0;u<a;u++)s[u]=r[u];je({type:"action",name:e,fn:t,object:n,arguments:s})}var c=te();return he(),{prevDerivation:c,prevAllowStateChanges:K(!0),notifySpy:o,startTime:i}}function U(e){W(e.prevAllowStateChanges),de(),ne(e.prevDerivation),e.notifySpy&&Ie({time:Date.now()-e.startTime})}function z(e){_t(null===vn.trackingDerivation,yt("m028")),vn.strictMode=e,vn.allowStateChanges=!e}function H(){return vn.strictMode}function G(e,t){var n,r=K(e);try{n=t()}finally{W(r)}return n}function K(e){var t=vn.allowStateChanges;return vn.allowStateChanges=e,t}function W(e){vn.allowStateChanges=e}function J(e){return e instanceof fn}function Y(e){switch(e.dependenciesState){case ln.UP_TO_DATE:return!1;case ln.NOT_TRACKING:case ln.STALE:return!0;case ln.POSSIBLY_STALE:for(var t=te(),n=e.observing,r=n.length,o=0;o<r;o++){var i=n[o];if(pn(i)){try{i.get()}catch(e){return ne(t),!0}if(e.dependenciesState===ln.STALE)return ne(t),!0}}return re(e),ne(t),!1}}function q(){return null!==vn.trackingDerivation}function F(e){var t=e.observers.length>0;vn.computationDepth>0&&t&&xt(yt("m031")+e.name),!vn.allowStateChanges&&t&&xt(yt(vn.strictMode?"m030a":"m030b")+e.name)}function X(e,t,n){re(e),e.newObserving=new Array(e.observing.length+100),e.unboundDepsCount=0,e.runId=++vn.runId;var r=vn.trackingDerivation;vn.trackingDerivation=e;var o;try{o=t.call(n)}catch(e){o=new fn(e)}return vn.trackingDerivation=r,Q(e),o}function Q(e){var t=e.observing,n=e.observing=e.newObserving;e.newObserving=null;for(var r=0,o=e.unboundDepsCount,i=0;i<o;i++){var a=n[i];0===a.diffValue&&(a.diffValue=1,r!==i&&(n[r]=a),r++)}for(n.length=r,o=t.length;o--;){var a=t[o];0===a.diffValue&&pe(a,e),a.diffValue=0}for(;r--;){var a=n[r];1===a.diffValue&&(a.diffValue=0,le(a,e))}}function Z(e){for(var t=e.observing,n=t.length;n--;)pe(t[n],e);e.dependenciesState=ln.NOT_TRACKING,t.length=0}function ee(e){var t=te(),n=e();return ne(t),n}function te(){var e=vn.trackingDerivation;return vn.trackingDerivation=null,e}function ne(e){vn.trackingDerivation=e}function re(e){if(e.dependenciesState!==ln.UP_TO_DATE){e.dependenciesState=ln.UP_TO_DATE;for(var t=e.observing,n=t.length;n--;)t[n].lowestObserverState=ln.UP_TO_DATE}}function oe(){var e=gt(),t=vn;if(e.__mobservableTrackingStack||e.__mobservableViewStack)throw new Error("[mobx] An incompatible version of mobservable is already loaded.");if(e.__mobxGlobal&&e.__mobxGlobal.version!==t.version)throw new Error("[mobx] An incompatible version of mobx is already loaded.");e.__mobxGlobal?vn=e.__mobxGlobal:e.__mobxGlobal=t}function ie(){return vn}function ae(){}function se(){vn.resetId++;var e=new dn;for(var t in e)hn.indexOf(t)===-1&&(vn[t]=e[t]);vn.allowStateChanges=!vn.strictMode}function ue(e){return e.observers&&e.observers.length>0}function ce(e){return e.observers}function le(e,t){var n=e.observers.length;n&&(e.observersIndexes[t.__mapid]=n),e.observers[n]=t,e.lowestObserverState>t.dependenciesState&&(e.lowestObserverState=t.dependenciesState)}function pe(e,t){if(1===e.observers.length)e.observers.length=0,fe(e);else{var n=e.observers,r=e.observersIndexes,o=n.pop();if(o!==t){var i=r[t.__mapid]||0;i?r[o.__mapid]=i:delete r[o.__mapid],n[i]=o}delete r[t.__mapid]}}function fe(e){e.isPendingUnobservation||(e.isPendingUnobservation=!0,vn.pendingUnobservations.push(e))}function he(){vn.inBatch++}function de(){if(0===--vn.inBatch){xe();for(var e=vn.pendingUnobservations,t=0;t<e.length;t++){var n=e[t];n.isPendingUnobservation=!1,0===n.observers.length&&n.onBecomeUnobserved()}vn.pendingUnobservations=[]}}function ve(e){var t=vn.trackingDerivation;null!==t?t.runId!==e.lastAccessedBy&&(e.lastAccessedBy=t.runId,t.newObserving[t.unboundDepsCount++]=e):0===e.observers.length&&fe(e)}function be(e){if(e.lowestObserverState!==ln.STALE){e.lowestObserverState=ln.STALE;for(var t=e.observers,n=t.length;n--;){var r=t[n];r.dependenciesState===ln.UP_TO_DATE&&r.onBecomeStale(),r.dependenciesState=ln.STALE}}}function me(e){if(e.lowestObserverState!==ln.STALE){e.lowestObserverState=ln.STALE;for(var t=e.observers,n=t.length;n--;){var r=t[n];r.dependenciesState===ln.POSSIBLY_STALE?r.dependenciesState=ln.STALE:r.dependenciesState===ln.UP_TO_DATE&&(e.lowestObserverState=ln.UP_TO_DATE)}}}function ye(e){if(e.lowestObserverState===ln.UP_TO_DATE){e.lowestObserverState=ln.POSSIBLY_STALE;for(var t=e.observers,n=t.length;n--;){var r=t[n];r.dependenciesState===ln.UP_TO_DATE&&(r.dependenciesState=ln.POSSIBLY_STALE,r.onBecomeStale())}}}function ge(e){_t(this&&this.$mobx&&yn(this.$mobx),"Invalid `this`"),_t(!this.$mobx.errorHandler,"Only one onErrorHandler can be registered"),this.$mobx.errorHandler=e}function we(e){return vn.globalReactionErrorHandlers.push(e),function(){var t=vn.globalReactionErrorHandlers.indexOf(e);t>=0&&vn.globalReactionErrorHandlers.splice(t,1)}}function xe(){vn.inBatch>0||vn.isRunningReactions||mn(_e)}function _e(){vn.isRunningReactions=!0;for(var e=vn.pendingReactions,t=0;e.length>0;){100===++t&&(console.error("Reaction doesn't converge to a stable state after 100 iterations. Probably there is a cycle in the reactive function: "+e[0]),e.splice(0));for(var n=e.splice(0),r=0,o=n.length;r<o;r++)n[r].runReaction()}vn.isRunningReactions=!1}function Oe(e){var t=mn;mn=function(n){return e(function(){return t(n)})}}function Se(){return!!vn.spyListeners.length}function Ae(e){if(vn.spyListeners.length)for(var t=vn.spyListeners,n=0,r=t.length;n<r;n++)t[n](e)}function je(e){Ae(kt({},e,{spyReportStart:!0}))}function Ie(e){Ae(e?kt({},e,gn):gn)}function Te(e){return vn.spyListeners.push(e),St(function(){var t=vn.spyListeners.indexOf(e);t!==-1&&vn.spyListeners.splice(t,1)})}function ke(e){return e.interceptors&&e.interceptors.length>0}function Ee(e,t){var n=e.interceptors||(e.interceptors=[]);return n.push(t),St(function(){var e=n.indexOf(t);e!==-1&&n.splice(e,1)})}function De(e,t){var n=te();try{var r=e.interceptors;if(r)for(var o=0,i=r.length;o<i&&(t=r[o](t),_t(!t||t.type,"Intercept handlers should return nothing or a change object"),t);o++);return t}finally{ne(n)}}function Re(e){return e.changeListeners&&e.changeListeners.length>0}function Ve(e,t){var n=e.changeListeners||(e.changeListeners=[]);return n.push(t),St(function(){var e=n.indexOf(t);e!==-1&&n.splice(e,1)})}function Le(e,t){var n=te(),r=e.changeListeners;if(r){r=r.slice();for(var o=0,i=r.length;o<i;o++)r[o](t);ne(n)}}function Pe(e){return Ot("asReference is deprecated, use observable.ref instead"),on.ref(e)}function $e(e){return Ot("asStructure is deprecated. Use observable.struct, computed.struct or reaction options instead."),on.struct(e)}function Ce(e){return Ot("asFlat is deprecated, use observable.shallow instead"),on.shallow(e)}function Me(e){return Ot("asMap is deprecated, use observable.map or observable.shallowMap instead"),on.map(e||{})}function Be(e){return"object"==typeof e&&null!==e&&e.isMobxModifierDescriptor===!0}function Ne(e,t){return _t(!Be(t),"Modifiers cannot be nested"),{isMobxModifierDescriptor:!0,initialValue:t,enhancer:e}}function Ue(e,t,n){return Be(e)&&xt("You tried to assign a modifier wrapped value to a collection, please define modifiers when creating the collection, not when modifying it"),j(e)?e:Array.isArray(e)?on.array(e,n):Tt(e)?on.object(e,n):zt(e)?on.shallowMap(e,n):e}function ze(e,t,n){return Be(e)&&xt("You tried to assign a modifier wrapped value to a collection, please define modifiers when creating the collection, not when modifying it"),void 0===e||null===e?e:st(e)||Fe(e)||kn(e)?e:Array.isArray(e)?on.shallowArray(e,n):Tt(e)?on.shallowObject(e,n):zt(e)?on.shallowMap(e,n):xt("The shallow modifier / decorator can only used in combination with arrays, objects and maps")}function He(e){return e}function Ge(e,t,n){if(Mt(e,t))return t;if(j(e))return e;if(Array.isArray(e))return new Sn(e,Ge,n);if(zt(e))return new Tn(e,Ge,n);if(Tt(e)){var r={};return Qe(r,n),m(r,Ge,[e]),r}return e}function Ke(e,t,n){return Mt(e,t)?t:e}function We(e){var t=Je(e),n=Ye(e);Object.defineProperty(Sn.prototype,""+e,{enumerable:!1,configurable:!0,set:t,get:n})}function Je(e){return function(t){var n=this.$mobx,r=n.values;if(e<r.length){F(n.atom);var o=r[e];if(ke(n)){var i=De(n,{type:"update",object:n.array,index:e,newValue:t});if(!i)return;t=i.newValue}t=n.enhancer(t,o);t!==o&&(r[e]=t,n.notifyArrayChildUpdate(e,t,o))}else{if(e!==r.length)throw new Error("[mobx.array] Index out of bounds, "+e+" is larger than "+r.length);n.spliceWithArray(e,0,[t])}}}function Ye(e){return function(){var t=this.$mobx;if(t){if(e<t.values.length)return t.atom.reportObserved(),t.values[e];console.warn("[mobx.array] Attempt to read an array index ("+e+") that is out of bounds ("+t.values.length+"). Please check length first. Out of bound indices will not be tracked by MobX")}}}function qe(e){for(var t=xn;t<e;t++)We(t);xn=e}function Fe(e){return It(e)&&jn(e.$mobx)}function Xe(e){return Ot("`mobx.map` is deprecated, use `new ObservableMap` or `mobx.observable.map` instead"),on.map(e)}function Qe(e,t){if(st(e))return e.$mobx;_t(Object.isExtensible(e),yt("m035")),Tt(e)||(t=(e.constructor.name||"ObservableObject")+"@"+wt()),t||(t="ObservableObject@"+wt());var n=new En(e,t);return Lt(e,"$mobx",n),n}function Ze(e,t,n,r){if(e.values[t])return _t("value"in n,"The property "+t+" in "+e.name+" is already observable, cannot redefine it as computed property"),void(e.target[t]=n.value);if("value"in n)if(Be(n.value)){var o=n.value;et(e,t,o.initialValue,o.enhancer)}else i(n.value)&&n.value.autoBind===!0?a(e.target,t,n.value.originalFn):pn(n.value)?nt(e,t,n.value):et(e,t,n.value,r);else tt(e,t,n.get,n.set,!1,!0)}function et(e,t,n,r){if($t(e.target,t),ke(e)){var o=De(e,{object:e.target,name:t,type:"add",newValue:n});if(!o)return;n=o.newValue}n=(e.values[t]=new Pn(n,r,e.name+"."+t,!1)).value,Object.defineProperty(e.target,t,rt(t)),at(e,e.target,t,n)}function tt(e,t,n,r,o,i){i&&$t(e.target,t),e.values[t]=new cn(n,e.target,o,e.name+"."+t,r),i&&Object.defineProperty(e.target,t,ot(t))}function nt(e,t,n){var r=e.name+"."+t;n.name=r,n.scope||(n.scope=e.target),e.values[t]=n,Object.defineProperty(e.target,t,ot(t))}function rt(e){return Dn[e]||(Dn[e]={configurable:!0,enumerable:!0,get:function(){return this.$mobx.values[e].get()},set:function(t){it(this,e,t)}})}function ot(e){return Rn[e]||(Rn[e]={configurable:!0,enumerable:!1,get:function(){return this.$mobx.values[e].get()},set:function(t){return this.$mobx.values[e].set(t)}})}function it(e,t,n){var r=e.$mobx,o=r.values[t];if(ke(r)){var i=De(r,{type:"update",object:e,name:t,newValue:n});if(!i)return;n=i.newValue}if(n=o.prepareNewValue(n),n!==Ln){var a=Re(r),s=Se(),i=a||s?{type:"update",object:e,oldValue:o.value,name:t,newValue:n}:null;s&&je(i),o.setNewValue(n),a&&Le(r,i),s&&Ie()}}function at(e,t,n,r){var o=Re(e),i=Se(),a=o||i?{type:"add",object:t,name:n,newValue:r}:null;i&&je(a),o&&Le(e,a),i&&Ie()}function st(e){return!!It(e)&&(ht(e),Vn(e.$mobx))}function ut(e,t){if("object"==typeof e&&null!==e){if(Fe(e))return _t(void 0===t,yt("m036")),e.$mobx.atom;if(kn(e)){var n=e;if(void 0===t)return ut(n._keys);var r=n._data[t]||n._hasMap[t];return _t(!!r,"the entry '"+t+"' does not exist in the observable map '"+lt(e)+"'"),r}if(ht(e),st(e)){if(!t)return xt("please specify a property");var o=e.$mobx.values[t];return _t(!!o,"no observable property '"+t+"' found on the observable object '"+lt(e)+"'"),o}if(un(e)||pn(e)||yn(e))return e}else if("function"==typeof e&&yn(e.$mobx))return e.$mobx;return xt("Cannot obtain atom from "+e)}function ct(e,t){return _t(e,"Expecting some object"),void 0!==t?ct(ut(e,t)):un(e)||pn(e)||yn(e)?e:kn(e)?e:(ht(e),e.$mobx?e.$mobx:void _t(!1,"Cannot obtain administration from "+e))}function lt(e,t){var n;return n=void 0!==t?ut(e,t):st(e)||kn(e)?ct(e):ut(e),n.name}function pt(e,t,n,r,o){function i(i,a,s,u,c){if(void 0===c&&(c=0),_t(o||dt(arguments),"This function is a decorator, but it wasn't invoked like a decorator"),s){Dt(i,"__mobxLazyInitializers")||Vt(i,"__mobxLazyInitializers",i.__mobxLazyInitializers&&i.__mobxLazyInitializers.slice()||[]);var l=s.value,p=s.initializer;return i.__mobxLazyInitializers.push(function(t){e(t,a,p?p.call(t):l,u,s)}),{enumerable:r,configurable:!0,get:function(){return this.__mobxDidRunLazyInitializers!==!0&&ht(this),t.call(this,a)},set:function(e){this.__mobxDidRunLazyInitializers!==!0&&ht(this),n.call(this,a,e)}}}var f={enumerable:r,configurable:!0,get:function(){return this.__mobxInitializedProps&&this.__mobxInitializedProps[a]===!0||ft(this,a,void 0,e,u,s),t.call(this,a)},set:function(t){this.__mobxInitializedProps&&this.__mobxInitializedProps[a]===!0?n.call(this,a,t):ft(this,a,t,e,u,s)}};return(arguments.length<3||5===arguments.length&&c<3)&&Object.defineProperty(i,a,f),f}return o?function(){if(dt(arguments))return i.apply(null,arguments);var e=arguments,t=arguments.length;return function(n,r,o){return i(n,r,o,e,t)}}:i}function ft(e,t,n,r,o,i){Dt(e,"__mobxInitializedProps")||Vt(e,"__mobxInitializedProps",{}),e.__mobxInitializedProps[t]=!0,r(e,t,n,o,i)}function ht(e){e.__mobxDidRunLazyInitializers!==!0&&e.__mobxLazyInitializers&&(Vt(e,"__mobxDidRunLazyInitializers",!0),e.__mobxDidRunLazyInitializers&&e.__mobxLazyInitializers.forEach(function(t){return t(e)}))}function dt(e){return(2===e.length||3===e.length)&&"string"==typeof e[1]}function vt(){return"function"==typeof Symbol&&Symbol.iterator||"@@iterator"}function bt(e){_t(e.__$$iterating!==!0,"Illegal state: cannot recycle array as iterator"),Lt(e,"__$$iterating",!0);var t=-1;return Lt(e,"next",function(){return t++,{done:t>=this.length,value:t<this.length?this[t]:void 0}}),e}function mt(e,t){Lt(e,vt(),t)}function yt(e){return Cn[e]}function gt(){return e}function wt(){return++vn.mobxGuid}function xt(e,t){throw _t(!1,e,t),"X"}function _t(e,t,n){if(!e)throw new Error("[mobx] Invariant failed: "+t+(n?" in '"+n+"'":""))}function Ot(e){return Bn.indexOf(e)===-1&&(Bn.push(e),console.error("[mobx] Deprecated: "+e),!0)}function St(e){var t=!1;return function(){if(!t)return t=!0,e.apply(this,arguments)}}function At(e){var t=[];return e.forEach(function(e){t.indexOf(e)===-1&&t.push(e)}),t}function jt(e,t,n){return void 0===t&&(t=100),void 0===n&&(n=" - "),e?""+e.slice(0,t).join(n)+(e.length>t?" (... and "+(e.length-t)+"more)":""):""}function It(e){return null!==e&&"object"==typeof e}function Tt(e){if(null===e||"object"!=typeof e)return!1;var t=Object.getPrototypeOf(e);return t===Object.prototype||null===t}function kt(){for(var e=arguments[0],t=1,n=arguments.length;t<n;t++){var r=arguments[t];for(var o in r)Dt(r,o)&&(e[o]=r[o])}return e}function Et(e,t,n){return"number"==typeof t&&isNaN(t)?"number"!=typeof n||!isNaN(n):e?!Mt(t,n):t!==n}function Dt(e,t){return Un.call(e,t)}function Rt(e,t){for(var n=0;n<t.length;n++)Vt(e,t[n],e[t[n]])}function Vt(e,t,n){Object.defineProperty(e,t,{enumerable:!1,writable:!0,configurable:!0,value:n})}function Lt(e,t,n){Object.defineProperty(e,t,{enumerable:!1,writable:!1,configurable:!0,value:n})}function Pt(e,t){var n=Object.getOwnPropertyDescriptor(e,t);return!n||n.configurable!==!1&&n.writable!==!1}function $t(e,t){_t(Pt(e,t),"Cannot make property '"+t+"' observable, it is not configurable and writable in the target object")}function Ct(e){var t=[];for(var n in e)t.push(n);return t}function Mt(e,t){if(null===e&&null===t)return!0;if(void 0===e&&void 0===t)return!0;if("object"!=typeof e)return e===t;var n=Nt(e),r=Ut(e);if(n!==Nt(t))return!1;if(r!==Ut(t))return!1;if(n){if(e.length!==t.length)return!1;for(var o=e.length-1;o>=0;o--)if(!Mt(e[o],t[o]))return!1;return!0}if(r){if(e.size!==t.size)return!1;var i=!0;return e.forEach(function(e,n){i=i&&Mt(t.get(n),e)}),i}if("object"==typeof e&&"object"==typeof t){if(null===e||null===t)return!1;if(Ut(e)&&Ut(t))return e.size===t.size&&Mt(on.shallowMap(e).entries(),on.shallowMap(t).entries());if(Ct(e).length!==Ct(t).length)return!1;for(var a in e){if(!(a in t))return!1;if(!Mt(e[a],t[a]))return!1}return!0}return!1}function Bt(e,t){var n="isMobX"+e;return t.prototype[n]=!0,function(e){return It(e)&&e[n]===!0}}function Nt(e){return Array.isArray(e)||Fe(e)}function Ut(e){return zt(e)||kn(e)}function zt(e){return void 0!==gt().Map&&e instanceof gt().Map}function Ht(){return"function"==typeof Symbol&&Symbol.toPrimitive||"@@toPrimitive"}function Gt(e){return null===e?null:"object"==typeof e?""+e:e}var Kt=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(n,"__esModule",{value:!0}),ae(),n.extras={allowStateChanges:G,deepEqual:Mt,getAtom:ut,getDebugName:lt,getDependencyTree:y,getAdministration:ct,getGlobalState:ie,getObserverTree:w,isComputingDerivation:q,isSpyEnabled:Se,onReactionError:we,resetGlobalState:se,shareGlobalState:oe,spyReport:Ae,spyReportEnd:Ie,spyReportStart:je,setReactionScheduler:Oe},"object"==typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__&&__MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobx(t.exports),t.exports.default=t.exports;var Wt=pt(function(e,t,n,r,o){Vt(e,t,Yt(r&&1===r.length?r[0]:n.name||t||"<unnamed action>",n))},function(e){return this[e]},function(){_t(!1,yt("m001"))},!1,!0),Jt=pt(function(e,t,n){a(e,t,n)},function(e){return this[e]},function(){_t(!1,yt("m001"))},!1,!1),Yt=function(e,t,n,o){return 1===arguments.length&&"function"==typeof e?M(e.name||"<unnamed action>",e):2===arguments.length&&"function"==typeof t?M(e,t):1===arguments.length&&"string"==typeof e?r(e):r(t).apply(null,arguments)};n.action=Yt,Yt.bound=function(e,t,n){if("function"==typeof e){var r=M("<not yet bound action>",e);return r.autoBind=!0,r}return Jt.apply(null,arguments)},n.runInAction=o,n.isAction=i,n.autorun=s,n.when=u,n.autorunAsync=c,n.reaction=l;var qt=p(!1),Ft=p(!0),Xt=function(e,t,n){if("string"==typeof t)return qt.apply(null,arguments);_t("function"==typeof e,yt("m011")),_t(arguments.length<3,yt("m012"));var r="object"==typeof t?t:{};return r.setter="function"==typeof t?t:r.setter,new cn(e,r.context,r.compareStructural||r.struct||!1,r.name||e.name||"",r.setter)};n.computed=Xt,Xt.struct=Ft,n.createTransformer=f,n.expr=d,n.extendObservable=v,n.extendShallowObservable=b,n.intercept=_,n.isComputed=A,n.isObservable=j;var Qt=k(Ue),Zt=k(ze),en=k(He),tn=k(Ge),nn=k(Ke),rn=function(){function e(){}return e.prototype.box=function(e,t){return arguments.length>2&&T("box"),new Pn(e,Ue,t)},e.prototype.shallowBox=function(e,t){return arguments.length>2&&T("shallowBox"),new Pn(e,He,t)},e.prototype.array=function(e,t){return arguments.length>2&&T("array"),new Sn(e,Ue,t)},e.prototype.shallowArray=function(e,t){return arguments.length>2&&T("shallowArray"),new Sn(e,He,t)},e.prototype.map=function(e,t){return arguments.length>2&&T("map"),new Tn(e,Ue,t)},e.prototype.shallowMap=function(e,t){return arguments.length>2&&T("shallowMap"),new Tn(e,He,t)},e.prototype.object=function(e,t){arguments.length>2&&T("object");var n={};return Qe(n,t),v(n,e),n},e.prototype.shallowObject=function(e,t){arguments.length>2&&T("shallowObject");var n={};return Qe(n,t),b(n,e),n},e.prototype.ref=function(){return arguments.length<2?Ne(He,arguments[0]):en.apply(null,arguments)},e.prototype.shallow=function(){return arguments.length<2?Ne(ze,arguments[0]):Zt.apply(null,arguments)},e.prototype.deep=function(){return arguments.length<2?Ne(Ue,arguments[0]):Qt.apply(null,arguments)},e.prototype.struct=function(){return arguments.length<2?Ne(Ge,arguments[0]):tn.apply(null,arguments)},e}();n.IObservableFactories=rn;var on=I;n.observable=on,Object.keys(rn.prototype).forEach(function(e){return on[e]=rn.prototype[e]}),on.deep.struct=on.struct,on.ref.struct=function(){return arguments.length<2?Ne(Ke,arguments[0]):nn.apply(null,arguments)},n.observe=E,n.toJS=V,n.transaction=L,n.whyRun=C,n.useStrict=z,n.isStrictModeEnabled=H;var an=function(){function e(e){void 0===e&&(e="Atom@"+wt()),this.name=e,this.isPendingUnobservation=!0,this.observers=[],this.observersIndexes={},this.diffValue=0,this.lastAccessedBy=0,this.lowestObserverState=ln.NOT_TRACKING}return e.prototype.onBecomeUnobserved=function(){},e.prototype.reportObserved=function(){ve(this)},e.prototype.reportChanged=function(){he(),be(this),de()},e.prototype.toString=function(){return this.name},e}();n.BaseAtom=an;var sn=function(e){function t(t,n,r){void 0===t&&(t="Atom@"+wt()),void 0===n&&(n=Nn),void 0===r&&(r=Nn);var o=e.call(this,t)||this;return o.name=t,o.onBecomeObservedHandler=n,o.onBecomeUnobservedHandler=r,o.isPendingUnobservation=!1,o.isBeingTracked=!1,o}return Kt(t,e),t.prototype.reportObserved=function(){return he(),e.prototype.reportObserved.call(this),this.isBeingTracked||(this.isBeingTracked=!0,this.onBecomeObservedHandler()),de(),!!vn.trackingDerivation},t.prototype.onBecomeUnobserved=function(){this.isBeingTracked=!1,this.onBecomeUnobservedHandler()},t}(an);n.Atom=sn;var un=Bt("Atom",an),cn=function(){function e(e,t,n,r,o){this.derivation=e,this.scope=t,this.compareStructural=n,this.dependenciesState=ln.NOT_TRACKING,this.observing=[],this.newObserving=null,this.isPendingUnobservation=!1,this.observers=[],this.observersIndexes={},this.diffValue=0,this.runId=0,this.lastAccessedBy=0,this.lowestObserverState=ln.UP_TO_DATE,this.unboundDepsCount=0,this.__mapid="#"+wt(),this.value=void 0,this.isComputing=!1,this.isRunningSetter=!1,this.name=r||"ComputedValue@"+wt(),o&&(this.setter=M(r+"-setter",o))}return e.prototype.onBecomeStale=function(){ye(this)},e.prototype.onBecomeUnobserved=function(){_t(this.dependenciesState!==ln.NOT_TRACKING,yt("m029")),Z(this),this.value=void 0},e.prototype.get=function(){_t(!this.isComputing,"Cycle detected in computation "+this.name,this.derivation),0===vn.inBatch?(he(),Y(this)&&(this.value=this.computeValue(!1)),de()):(ve(this),Y(this)&&this.trackAndCompute()&&me(this));var e=this.value;if(J(e))throw e.cause;return e},e.prototype.peek=function(){var e=this.computeValue(!1);if(J(e))throw e.cause;return e},e.prototype.set=function(e){if(this.setter){_t(!this.isRunningSetter,"The setter of computed value '"+this.name+"' is trying to update itself. Did you intend to update an _observable_ value, instead of the computed property?"),this.isRunningSetter=!0;try{this.setter.call(this.scope,e)}finally{this.isRunningSetter=!1}}else _t(!1,"[ComputedValue '"+this.name+"'] It is not possible to assign a new value to a computed value.")},e.prototype.trackAndCompute=function(){Se()&&Ae({object:this.scope,type:"compute",fn:this.derivation});var e=this.value,t=this.value=this.computeValue(!0);return J(t)||Et(this.compareStructural,t,e)},e.prototype.computeValue=function(e){this.isComputing=!0,vn.computationDepth++;var t;if(e)t=X(this,this.derivation,this.scope);else try{t=this.derivation.call(this.scope)}catch(e){t=new fn(e)}return vn.computationDepth--,this.isComputing=!1,t},e.prototype.observe=function(e,t){var n=this,r=!0,o=void 0;return s(function(){var i=n.get();if(!r||t){var a=te();e({type:"update",object:n,newValue:i,oldValue:o}),ne(a)}r=!1,o=i})},e.prototype.toJSON=function(){return this.get()},e.prototype.toString=function(){return this.name+"["+this.derivation.toString()+"]"},e.prototype.valueOf=function(){return Gt(this.get())},e.prototype.whyRun=function(){var e=Boolean(vn.trackingDerivation),t=At(this.isComputing?this.newObserving:this.observing).map(function(e){return e.name}),n=At(ce(this).map(function(e){return e.name}));return"\nWhyRun? computation '"+this.name+"':\n * Running because: "+(e?"[active] the value of this computation is needed by a reaction":this.isComputing?"[get] The value of this computed was requested outside a reaction":"[idle] not running at the moment")+"\n"+(this.dependenciesState===ln.NOT_TRACKING?yt("m032"):" * This computation will re-run if any of the following observables changes:\n    "+jt(t)+"\n    "+(this.isComputing&&e?" (... or any observable accessed during the remainder of the current run)":"")+"\n\t"+yt("m038")+"\n\n  * If the outcome of this computation changes, the following observers will be re-run:\n    "+jt(n)+"\n")},e}();cn.prototype[Ht()]=cn.prototype.valueOf;var ln,pn=Bt("ComputedValue",cn);!function(e){e[e.NOT_TRACKING=-1]="NOT_TRACKING",e[e.UP_TO_DATE=0]="UP_TO_DATE",e[e.POSSIBLY_STALE=1]="POSSIBLY_STALE",e[e.STALE=2]="STALE"}(ln||(ln={})),n.IDerivationState=ln;var fn=function(){function e(e){this.cause=e}return e}();n.untracked=ee;var hn=["mobxGuid","resetId","spyListeners","strictMode","runId"],dn=function(){function e(){this.version=5,this.trackingDerivation=null,this.computationDepth=0,this.runId=0,this.mobxGuid=0,this.inBatch=0,this.pendingUnobservations=[],
this.pendingReactions=[],this.isRunningReactions=!1,this.allowStateChanges=!0,this.strictMode=!1,this.resetId=0,this.spyListeners=[],this.globalReactionErrorHandlers=[]}return e}(),vn=new dn,bn=function(){function e(e,t){void 0===e&&(e="Reaction@"+wt()),this.name=e,this.onInvalidate=t,this.observing=[],this.newObserving=[],this.dependenciesState=ln.NOT_TRACKING,this.diffValue=0,this.runId=0,this.unboundDepsCount=0,this.__mapid="#"+wt(),this.isDisposed=!1,this._isScheduled=!1,this._isTrackPending=!1,this._isRunning=!1}return e.prototype.onBecomeStale=function(){this.schedule()},e.prototype.schedule=function(){this._isScheduled||(this._isScheduled=!0,vn.pendingReactions.push(this),xe())},e.prototype.isScheduled=function(){return this._isScheduled},e.prototype.runReaction=function(){this.isDisposed||(he(),this._isScheduled=!1,Y(this)&&(this._isTrackPending=!0,this.onInvalidate(),this._isTrackPending&&Se()&&Ae({object:this,type:"scheduled-reaction"})),de())},e.prototype.track=function(e){he();var t,n=Se();n&&(t=Date.now(),je({object:this,type:"reaction",fn:e})),this._isRunning=!0;var r=X(this,e,void 0);this._isRunning=!1,this._isTrackPending=!1,this.isDisposed&&Z(this),J(r)&&this.reportExceptionInDerivation(r.cause),n&&Ie({time:Date.now()-t}),de()},e.prototype.reportExceptionInDerivation=function(e){var t=this;if(this.errorHandler)return void this.errorHandler(e,this);var n="[mobx] Encountered an uncaught exception that was thrown by a reaction or observer component, in: '"+this,r=yt("m037");console.error(n||r,e),Se()&&Ae({type:"error",message:n,error:e,object:this}),vn.globalReactionErrorHandlers.forEach(function(n){return n(e,t)})},e.prototype.dispose=function(){this.isDisposed||(this.isDisposed=!0,this._isRunning||(he(),Z(this),de()))},e.prototype.getDisposer=function(){var e=this.dispose.bind(this);return e.$mobx=this,e.onError=ge,e},e.prototype.toString=function(){return"Reaction["+this.name+"]"},e.prototype.whyRun=function(){var e=At(this._isRunning?this.newObserving: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    "+jt(e)+"\n    "+(this._isRunning?" (... or any observable accessed during the remainder of the current run)":"")+"\n\t"+yt("m038")+"\n"},e}();n.Reaction=bn;var mn=function(e){return e()},yn=Bt("Reaction",bn),gn={spyReportEnd:!0};n.spy=Te,n.asReference=Pe,n.asStructure=$e,n.asFlat=Ce,n.asMap=Me,n.isModifierDescriptor=Be;var wn=function(){var e=!1,t={};return Object.defineProperty(t,"0",{set:function(){e=!0}}),Object.create(t)[0]=1,e===!1}(),xn=0,_n=function(){function e(){}return e}();_n.prototype=[];var On=function(){function e(e,t,n,r){this.array=n,this.owned=r,this.lastKnownLength=0,this.interceptors=null,this.changeListeners=null,this.atom=new an(e||"ObservableArray@"+wt()),this.enhancer=function(n,r){return t(n,r,e+"[..]")}}return e.prototype.intercept=function(e){return Ee(this,e)},e.prototype.observe=function(e,t){return void 0===t&&(t=!1),t&&e({object:this.array,type:"splice",index:0,added:this.values.slice(),addedCount:this.values.length,removed:[],removedCount:0}),Ve(this,e)},e.prototype.getArrayLength=function(){return this.atom.reportObserved(),this.values.length},e.prototype.setArrayLength=function(e){if("number"!=typeof e||e<0)throw new Error("[mobx.array] Out of range: "+e);var t=this.values.length;if(e!==t)if(e>t){for(var n=new Array(e-t),r=0;r<e-t;r++)n[r]=void 0;this.spliceWithArray(t,0,n)}else this.spliceWithArray(e,t-e)},e.prototype.updateArrayLength=function(e,t){if(e!==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+=t,t>0&&e+t+1>xn&&qe(e+t+1)},e.prototype.spliceWithArray=function(e,t,n){var r=this;F(this.atom);var o=this.values.length;if(void 0===e?e=0:e>o?e=o:e<0&&(e=Math.max(0,o+e)),t=1===arguments.length?o-e:void 0===t||null===t?0:Math.max(0,Math.min(t,o-e)),void 0===n&&(n=[]),ke(this)){var i=De(this,{object:this.array,type:"splice",index:e,removedCount:t,added:n});if(!i)return Mn;t=i.removedCount,n=i.added}n=n.map(function(e){return r.enhancer(e,void 0)});var a=n.length-t;this.updateArrayLength(o,a);var s=this.spliceItemsIntoValues(e,t,n);return 0===t&&0===n.length||this.notifyArraySplice(e,n,s),s},e.prototype.spliceItemsIntoValues=function(e,t,n){if(n.length<1e4)return(o=this.values).splice.apply(o,[e,t].concat(n));var r=this.values.slice(e,e+t);return this.values=this.values.slice(0,e).concat(n,this.values.slice(e+t)),r;var o},e.prototype.notifyArrayChildUpdate=function(e,t,n){var r=!this.owned&&Se(),o=Re(this),i=o||r?{object:this.array,type:"update",index:e,newValue:t,oldValue:n}:null;r&&je(i),this.atom.reportChanged(),o&&Le(this,i),r&&Ie()},e.prototype.notifyArraySplice=function(e,t,n){var r=!this.owned&&Se(),o=Re(this),i=o||r?{object:this.array,type:"splice",index:e,removed:n,added:t,removedCount:n.length,addedCount:t.length}:null;r&&je(i),this.atom.reportChanged(),o&&Le(this,i),r&&Ie()},e}(),Sn=function(e){function t(t,n,r,o){void 0===r&&(r="ObservableArray@"+wt()),void 0===o&&(o=!1);var i=e.call(this)||this,a=new On(r,n,i,o);return Lt(i,"$mobx",a),t&&t.length?(a.updateArrayLength(0,t.length),a.values=t.map(function(e){return n(e,void 0,r+"[..]")}),a.notifyArraySplice(0,a.values.slice(),Mn)):a.values=[],wn&&Object.defineProperty(a.array,"0",An),i}return Kt(t,e),t.prototype.intercept=function(e){return this.$mobx.intercept(e)},t.prototype.observe=function(e,t){return void 0===t&&(t=!1),this.$mobx.observe(e,t)},t.prototype.clear=function(){return this.splice(0)},t.prototype.concat=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return this.$mobx.atom.reportObserved(),Array.prototype.concat.apply(this.peek(),e.map(function(e){return Fe(e)?e.peek():e}))},t.prototype.replace=function(e){return this.$mobx.spliceWithArray(0,this.$mobx.values.length,e)},t.prototype.toJS=function(){return this.slice()},t.prototype.toJSON=function(){return this.toJS()},t.prototype.peek=function(){return this.$mobx.values},t.prototype.find=function(e,t,n){void 0===n&&(n=0),this.$mobx.atom.reportObserved();for(var r=this.$mobx.values,o=r.length,i=n;i<o;i++)if(e.call(t,r[i],i,this))return r[i]},t.prototype.splice=function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];switch(arguments.length){case 0:return[];case 1:return this.$mobx.spliceWithArray(e);case 2:return this.$mobx.spliceWithArray(e,t)}return this.$mobx.spliceWithArray(e,t,n)},t.prototype.spliceWithArray=function(e,t,n){return this.$mobx.spliceWithArray(e,t,n)},t.prototype.push=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=this.$mobx;return n.spliceWithArray(n.values.length,0,e),n.values.length},t.prototype.pop=function(){return this.splice(Math.max(this.$mobx.values.length-1,0),1)[0]},t.prototype.shift=function(){return this.splice(0,1)[0]},t.prototype.unshift=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=this.$mobx;return n.spliceWithArray(0,0,e),n.values.length},t.prototype.reverse=function(){this.$mobx.atom.reportObserved();var e=this.slice();return e.reverse.apply(e,arguments)},t.prototype.sort=function(e){this.$mobx.atom.reportObserved();var t=this.slice();return t.sort.apply(t,arguments)},t.prototype.remove=function(e){var t=this.$mobx.values.indexOf(e);return t>-1&&(this.splice(t,1),!0)},t.prototype.move=function(e,t){function n(e){if(e<0)throw new Error("[mobx.array] Index out of bounds: "+e+" is negative");var t=this.$mobx.values.length;if(e>=t)throw new Error("[mobx.array] Index out of bounds: "+e+" is not smaller than "+t)}if(n.call(this,e),n.call(this,t),e!==t){var r,o=this.$mobx.values;r=e<t?o.slice(0,e).concat(o.slice(e+1,t+1),[o[e]],o.slice(t+1)):o.slice(0,t).concat([o[e]],o.slice(t,e),o.slice(e+1)),this.replace(r)}},t.prototype.toString=function(){return this.$mobx.atom.reportObserved(),Array.prototype.toString.apply(this.$mobx.values,arguments)},t.prototype.toLocaleString=function(){return this.$mobx.atom.reportObserved(),Array.prototype.toLocaleString.apply(this.$mobx.values,arguments)},t}(_n);mt(Sn.prototype,function(){return bt(this.slice())}),Rt(Sn.prototype,["constructor","intercept","observe","clear","concat","replace","toJS","toJSON","peek","find","splice","spliceWithArray","push","pop","shift","unshift","reverse","sort","remove","move","toString","toLocaleString"]),Object.defineProperty(Sn.prototype,"length",{enumerable:!1,configurable:!0,get:function(){return this.$mobx.getArrayLength()},set:function(e){this.$mobx.setArrayLength(e)}}),["every","filter","forEach","indexOf","join","lastIndexOf","map","reduce","reduceRight","slice","some"].forEach(function(e){var t=Array.prototype[e];_t("function"==typeof t,"Base function not defined on Array prototype: '"+e+"'"),Vt(Sn.prototype,e,function(){return this.$mobx.atom.reportObserved(),t.apply(this.$mobx.values,arguments)})});var An={configurable:!0,enumerable:!1,set:Je(0),get:Ye(0)};qe(1e3);var jn=Bt("ObservableArrayAdministration",On);n.isObservableArray=Fe;var In={},Tn=function(){function e(e,t,n){void 0===t&&(t=Ue),void 0===n&&(n="ObservableMap@"+wt()),this.enhancer=t,this.name=n,this.$mobx=In,this._data={},this._hasMap={},this._keys=new Sn(void 0,He,this.name+".keys()",!0),this.interceptors=null,this.changeListeners=null,this.merge(e)}return e.prototype._has=function(e){return void 0!==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())},e.prototype.set=function(e,t){this.assertValidKey(e),e=""+e;var n=this._has(e);if(ke(this)){var r=De(this,{type:n?"update":"add",object:this,newValue:t,name:e});if(!r)return this;t=r.newValue}return n?this._updateValue(e,t):this._addValue(e,t),this},e.prototype.delete=function(e){var t=this;if(this.assertValidKey(e),e=""+e,ke(this)){var n=De(this,{type:"delete",object:this,name:e});if(!n)return!1}if(this._has(e)){var r=Se(),o=Re(this),n=o||r?{type:"delete",object:this,oldValue:this._data[e].value,name:e}:null;return r&&je(n),P(function(){t._keys.remove(e),t._updateHasMapEntry(e,!1),t._data[e].setNewValue(void 0),t._data[e]=void 0}),o&&Le(this,n),r&&Ie(),!0}return!1},e.prototype._updateHasMapEntry=function(e,t){var n=this._hasMap[e];return n?n.setNewValue(t):n=this._hasMap[e]=new Pn(t,He,this.name+"."+e+"?",!1),n},e.prototype._updateValue=function(e,t){var n=this._data[e];if(t=n.prepareNewValue(t),t!==Ln){var r=Se(),o=Re(this),i=o||r?{type:"update",object:this,oldValue:n.value,name:e,newValue:t}:null;r&&je(i),n.setNewValue(t),o&&Le(this,i),r&&Ie()}},e.prototype._addValue=function(e,t){var n=this;P(function(){t=(n._data[e]=new Pn(t,n.enhancer,n.name+"."+e,!1)).value,n._updateHasMapEntry(e,!0),n._keys.push(e)});var r=Se(),o=Re(this),i=o||r?{type:"add",object:this,name:e,newValue:t}:null;r&&je(i),o&&Le(this,i),r&&Ie()},e.prototype.get=function(e){if(e=""+e,this.has(e))return this._data[e].get()},e.prototype.keys=function(){return bt(this._keys.slice())},e.prototype.values=function(){return bt(this._keys.map(this.get,this))},e.prototype.entries=function(){var e=this;return bt(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,n)})},e.prototype.merge=function(e){var t=this;return kn(e)&&(e=e.toJS()),P(function(){Tt(e)?Object.keys(e).forEach(function(n){return t.set(n,e[n])}):Array.isArray(e)?e.forEach(function(e){var n=e[0],r=e[1];return t.set(n,r)}):zt(e)?e.forEach(function(e,n){return t.set(n,e)}):null!==e&&void 0!==e&&xt("Cannot initialize map from "+e)}),this},e.prototype.clear=function(){var e=this;P(function(){ee(function(){e.keys().forEach(e.delete,e)})})},e.prototype.replace=function(e){var t=this;return P(function(){t.clear(),t.merge(e)}),this},Object.defineProperty(e.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),e.prototype.toJS=function(){var e=this,t={};return this.keys().forEach(function(n){return t[n]=e.get(n)}),t},e.prototype.toJSON=function(){return this.toJS()},e.prototype.isValidKey=function(e){return null!==e&&void 0!==e&&("string"==typeof e||"number"==typeof e||"boolean"==typeof e)},e.prototype.assertValidKey=function(e){if(!this.isValidKey(e))throw new Error("[mobx.map] Invalid key: '"+e+"', only strings, numbers and booleans are accepted as key in observable maps.")},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 _t(t!==!0,yt("m033")),Ve(this,e)},e.prototype.intercept=function(e){return Ee(this,e)},e}();n.ObservableMap=Tn,mt(Tn.prototype,function(){return this.entries()}),n.map=Xe;var kn=Bt("ObservableMap",Tn);n.isObservableMap=kn;var En=function(){function e(e,t){this.target=e,this.name=t,this.values={},this.changeListeners=null,this.interceptors=null}return e.prototype.observe=function(e,t){return _t(t!==!0,"`observe` doesn't support the fire immediately property for observable objects."),Ve(this,e)},e.prototype.intercept=function(e){return Ee(this,e)},e}(),Dn={},Rn={},Vn=Bt("ObservableObjectAdministration",En);n.isObservableObject=st;var Ln={},Pn=function(e){function t(t,n,r,o){void 0===r&&(r="ObservableValue@"+wt()),void 0===o&&(o=!0);var i=e.call(this,r)||this;return i.enhancer=n,i.hasUnreportedChange=!1,i.value=n(t,void 0,r),o&&Se()&&Ae({type:"create",object:i,newValue:i.value}),i}return Kt(t,e),t.prototype.set=function(e){var t=this.value;if(e=this.prepareNewValue(e),e!==Ln){var n=Se();n&&je({type:"update",object:this,newValue:e,oldValue:t}),this.setNewValue(e),n&&Ie()}},t.prototype.prepareNewValue=function(e){if(F(this),ke(this)){var t=De(this,{object:this,type:"update",newValue:e});if(!t)return Ln;e=t.newValue}return e=this.enhancer(e,this.value,this.name),this.value!==e?e:Ln},t.prototype.setNewValue=function(e){var t=this.value;this.value=e,this.reportChanged(),Re(this)&&Le(this,{type:"update",object:this,newValue:e,oldValue:t})},t.prototype.get=function(){return this.reportObserved(),this.value},t.prototype.intercept=function(e){return Ee(this,e)},t.prototype.observe=function(e,t){return t&&e({object:this,type:"update",newValue:this.value,oldValue:void 0}),Ve(this,e)},t.prototype.toJSON=function(){return this.get()},t.prototype.toString=function(){return this.name+"["+this.value+"]"},t.prototype.valueOf=function(){return Gt(this.get())},t}(an);Pn.prototype[Ht()]=Pn.prototype.valueOf;var $n=Bt("ObservableValue",Pn);n.isBoxedObservable=$n;var Cn={m001:"It is not allowed to assign new values to @action fields",m002:"`runInAction` expects a function",m003:"`runInAction` expects a function without arguments",m004:"autorun expects a function",m005:"Warning: attempted to pass an action to autorun. Actions are untracked and will not trigger on state changes. Use `reaction` or wrap only your state modification code in an action.",m006:"Warning: attempted to pass an action to autorunAsync. Actions are untracked and will not trigger on state changes. Use `reaction` or wrap only your state modification code in an action.",m007:"reaction only accepts 2 or 3 arguments. If migrating from MobX 2, please provide an options object",m008:"wrapping reaction expression in `asReference` is no longer supported, use options object instead",m009:"@computed can only be used on getter functions, like: '@computed get myProps() { return ...; }'. It looks like it was used on a property.",m010:"@computed can only be used on getter functions, like: '@computed get myProps() { return ...; }'",m011:"First argument to `computed` should be an expression. If using computed as decorator, don't pass it arguments",m012:"computed takes one or two arguments if used as function",m013:"[mobx.expr] 'expr' should only be used inside other reactive functions.",m014:"extendObservable expected 2 or more arguments",m015:"extendObservable expects an object as first argument",m016:"extendObservable should not be used on maps, use map.merge instead",m017:"all arguments of extendObservable should be objects",m018:"extending an object with another observable (object) is not supported. Please construct an explicit propertymap, using `toJS` if need. See issue #540",m019:"[mobx.isObservable] isObservable(object, propertyName) is not supported for arrays and maps. Use map.has or array.length instead.",m020:"modifiers can only be used for individual object properties",m021:"observable expects zero or one arguments",m022:"@observable can not be used on getters, use @computed instead",m023:"Using `transaction` is deprecated, use `runInAction` or `(@)action` instead.",m024:"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 its value.",m025:"whyRun can only be used on reactions and computed values",m026:"`action` can only be invoked on functions",m028:"It is not allowed to set `useStrict` when a derivation is running",m029:"INTERNAL ERROR only onBecomeUnobserved shouldn't be called twice in a row",m030a:"Since strict-mode is enabled, changing observed observable values outside actions is not allowed. Please wrap the code in an `action` if this change is intended. Tried to modify: ",m030b:"Side effects like changing state are not allowed at this point. Are you trying to modify state from, for example, the render function of a React component? Tried to modify: ",m031:"Computed values are not allowed to not cause side effects by changing observables that are already being observed. Tried to modify: ",m032:"* This computation is suspended (not in use by any reaction) and won't run automatically.\n\tDidn't expect this computation to be suspended at this point?\n\t  1. Make sure this computation is used by a reaction (reaction, autorun, observer).\n\t  2. Check whether you are using this computation synchronously (in the same stack as they reaction that needs it).",m033:"`observe` doesn't support the fire immediately property for observable maps.",m034:"`mobx.map` is deprecated, use `new ObservableMap` or `mobx.observable.map` instead",m035:"Cannot make the designated object observable; it is not extensible",m036:"It is not possible to get index atoms from arrays",m037:'Hi there! I\'m sorry you have just run into an exception.\nIf your debugger ends up here, know that some reaction (like the render() of an observer component, autorun or reaction)\nthrew an exception and that mobx caught it, to avoid that it brings the rest of your application down.\nThe original cause of the exception (the code that caused this reaction to run (again)), is still in the stack.\n\nHowever, more interesting is the actual stack trace of the error itself.\nHopefully the error is an instanceof Error, because in that case you can inspect the original stack of the error from where it was thrown.\nSee `error.stack` property, or press the very subtle "(...)" link you see near the console.error message that probably brought you here.\nThat stack is more interesting than the stack of this console.error itself.\n\nIf the exception you see is an exception you created yourself, make sure to use `throw new Error("Oops")` instead of `throw "Oops"`,\nbecause the javascript environment will only preserve the original stack trace in the first form.\n\nYou can also make sure the debugger pauses the next time this very same exception is thrown by enabling "Pause on caught exception".\n(Note that it might pause on many other, unrelated exception as well).\n\nIf that all doesn\'t help you out, feel free to open an issue https://github.com/mobxjs/mobx/issues!\n',m038:"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"},Mn=[];Object.freeze(Mn);var Bn=[],Nn=function(){},Un=Object.prototype.hasOwnProperty;n.isArrayLike=Nt}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}]},{},[1])(1)});
//# sourceMappingURL=lib/mobx.umd.min.js.map