/** 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("prop-types",[],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.PropTypes=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||e)},l,l.exports,e,t,n,r)}return n[a].exports}for(var i="function"==typeof require&&require,a=0;a0}function o(e,t){var n=e.interceptors||(e.interceptors=[]);return n.push(t),Oe(function(){var e=n.indexOf(t);-1!==e&&n.splice(e,1)})}function i(e,t){var n=ht();try{var r=e.interceptors;if(r)for(var o=0,i=r.length;o0}function s(e,t){var n=e.changeListeners||(e.changeListeners=[]);return n.push(t),Oe(function(){var e=n.indexOf(t);-1!==e&&n.splice(e,1)})}function u(e,t){var n=ht(),r=e.changeListeners;if(r){r=r.slice();for(var o=0,i=r.length;o=this.length,value:t0,"actions should have valid names, got: '"+e+"'");var n=function(){return O(e,t,this,arguments)};return n.originalFn=t,n.isMobxAction=!0,n}function O(e,t,n,r){var o=S(e,t,n,r);try{return t.apply(n,r)}finally{I(o)}}function S(e,t,n,r){var o=c()&&!!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",o="function"==typeof e?e:t,i="function"==typeof e?t:n;return xe("function"==typeof o,x("m002")),xe(0===o.length,x("m003")),xe("string"==typeof r&&r.length>0,"actions should have valid names, got: '"+r+"'"),O(r,o,i,void 0)}function V(e){return"function"==typeof e&&!0===e.isMobxAction}function L(e,t,n){var r=function(){return O(t,n,e,arguments)};r.isMobxAction=!0,Te(e,t,r)}function B(e,t){return e===t}function $(e,t){return Ne(e,t)}function U(e,t){return Ve(e,t)||B(e,t)}function z(e,t,n){function r(){i(s)}var o,i,a;"string"==typeof e?(o=e,i=t,a=n):(o=e.name||"Autorun@"+ge(),i=e,a=t),xe("function"==typeof i,x("m004")),xe(!1===V(i),x("m005")),a&&(i=i.bind(a));var s=new Yn(o,function(){this.track(r)});return s.schedule(),s.getDisposer()}function Y(e,t,n,r){var o,i,a,s;return"string"==typeof e?(o=e,i=t,a=n,s=r):(o="When@"+ge(),i=e,a=t,s=n),z(o,function(e){if(i.call(s)){e.dispose();var t=ht();a.call(s),dt(t)}})}function F(e,t,n,r){function o(){a(l)}var i,a,s,u;"string"==typeof e?(i=e,a=t,s=n,u=r):(i=e.name||"AutorunAsync@"+ge(),a=e,s=t,u=n),xe(!1===V(a),x("m006")),void 0===s&&(s=1),u&&(a=a.bind(u));var c=!1,l=new Yn(i,function(){c||(c=!0,setTimeout(function(){c=!1,l.isDisposed||l.track(o)},s))});return l.schedule(),l.getDisposer()}function G(e,t,n){function r(){if(!c.isDisposed){var n=!1;c.track(function(){var t=e(c);n=a||!u(i,t),i=t}),a&&o.fireImmediately&&t(i,c),a||!0!==n||t(i,c),a&&(a=!1)}}arguments.length>3&&we(x("m007")),ce(e)&&we(x("m008"));var o;o="object"==typeof n?n:{},o.name=o.name||e.name||t.name||"Reaction@"+ge(),o.fireImmediately=!0===n||!0===o.fireImmediately,o.delay=o.delay||0,o.compareStructural=o.compareStructural||o.struct||!1,t=hn(o.name,o.context?t.bind(o.context):t),o.context&&(e=e.bind(o.context));var i,a=!0,s=!1,u=o.equals?o.equals:o.compareStructural||o.struct?dn.structural:dn.default,c=new Yn(o.name,function(){a||o.delay<1?r():s||(s=!0,setTimeout(function(){s=!1,r()},o.delay))});return c.schedule(),c.getDisposer()}function W(e,t){if(te(e)&&e.hasOwnProperty("$mobx"))return e.$mobx;xe(Object.isExtensible(e),x("m035")),Ae(e)||(t=(e.constructor.name||"ObservableObject")+"@"+ge()),t||(t="ObservableObject@"+ge());var n=new mn(e,t);return Re(e,"$mobx",n),n}function q(e,t,n,r){if(e.values[t]&&!bn(e.values[t]))return xe("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(ce(n.value)){var o=n.value;H(e,t,o.initialValue,o.enhancer)}else V(n.value)&&!0===n.value.autoBind?L(e.target,t,n.value.originalFn):bn(n.value)?J(e,t,n.value):H(e,t,n.value,r);else K(e,t,n.get,n.set,dn.default,!0)}function H(e,t,n,o){if(Pe(e.target,t),r(e)){var a=i(e,{object:e.target,name:t,type:"add",newValue:n});if(!a)return;n=a.newValue}n=(e.values[t]=new un(n,o,e.name+"."+t,!1)).value,Object.defineProperty(e.target,t,X(t)),ee(e,e.target,t,n)}function K(e,t,n,r,o,i){i&&Pe(e.target,t),e.values[t]=new vn(n,e.target,o,e.name+"."+t,r),i&&Object.defineProperty(e.target,t,Q(t))}function J(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,Q(t))}function X(e){return yn[e]||(yn[e]={configurable:!0,enumerable:!0,get:function(){return this.$mobx.values[e].get()},set:function(t){Z(this,e,t)}})}function Q(e){return gn[e]||(gn[e]={configurable:!0,enumerable:!1,get:function(){return this.$mobx.values[e].get()},set:function(t){return this.$mobx.values[e].set(t)}})}function Z(e,t,n){var o=e.$mobx,s=o.values[t];if(r(o)){var l=i(o,{type:"update",object:e,name:t,newValue:n});if(!l)return;n=l.newValue}if((n=s.prepareNewValue(n))!==sn){var h=a(o),d=c(),l=h||d?{type:"update",object:e,oldValue:s.value,name:t,newValue:n}:null;d&&p(l),s.setNewValue(n),h&&u(o,l),d&&f()}}function ee(e,t,n,r){var o=a(e),i=c(),s=o||i?{type:"add",object:t,name:n,newValue:r}:null;i&&p(s),o&&u(e,s),i&&f()}function te(e){return!!Ee(e)&&(P(e),wn(e.$mobx))}function ne(e,t){if(null===e||void 0===e)return!1;if(void 0!==t){if(w(e)||Tn(e))throw new Error(x("m019"));if(te(e)){var n=e.$mobx;return n.values&&!!n.values[t]}return!1}return te(e)||!!e.$mobx||Jt(e)||Wn(e)||bn(e)}function re(e){return xe(!!e,":("),R(function(t,n,r,o,i){Pe(t,n),xe(!i||!i.get,x("m022")),H(W(t,void 0),n,r,e)},function(e){var t=this.$mobx.values[e];if(void 0!==t)return t.get()},function(e,t){Z(this,e,t)},!0,!1)}function oe(e){for(var t=[],n=1;n=2,x("m014")),xe("object"==typeof e,x("m015")),xe(!Tn(e),x("m016")),n.forEach(function(e){xe("object"==typeof e,x("m017")),xe(!ne(e),x("m018"))});for(var r=W(e),o={},i=n.length-1;i>=0;i--){var a=n[i];for(var s in a)if(!0!==o[s]&&je(a,s)){if(o[s]=!0,e===a&&!ke(e,s))continue;var u=Object.getOwnPropertyDescriptor(a,s);q(r,s,u,t)}}return e}function se(e){if(void 0===e&&(e=void 0),"string"==typeof arguments[1])return xn.apply(null,arguments);if(xe(arguments.length<=1,x("m021")),xe(!ce(e),x("m020")),ne(e))return e;var t=pe(e,void 0,void 0);return t!==e?t:An.box(e)}function ue(e){we("Expected one or two arguments to observable."+e+". Did you accidentally try to use observable."+e+" as decorator?")}function ce(e){return"object"==typeof e&&null!==e&&!0===e.isMobxModifierDescriptor}function le(e,t){return xe(!ce(t),"Modifiers cannot be nested"),{isMobxModifierDescriptor:!0,initialValue:t,enhancer:e}}function pe(e,t,n){return ce(e)&&we("You tried to assign a modifier wrapped value to a collection, please define modifiers when creating the collection, not when modifying it"),ne(e)?e:Array.isArray(e)?An.array(e,n):Ae(e)?An.object(e,n):$e(e)?An.map(e,n):e}function fe(e,t,n){return ce(e)&&we("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:te(e)||w(e)||Tn(e)?e:Array.isArray(e)?An.shallowArray(e,n):Ae(e)?An.shallowObject(e,n):$e(e)?An.shallowMap(e,n):we("The shallow modifier / decorator can only used in combination with arrays, objects and maps")}function he(e){return e}function de(e,t,n){if(Ne(e,t))return t;if(ne(e))return e;if(Array.isArray(e))return new rn(e,de,n);if($e(e))return new jn(e,de,n);if(Ae(e)){var r={};return W(r,n),ae(r,de,[e]),r}return e}function ve(e,t,n){return Ne(e,t)?t:e}function be(e,t){void 0===t&&(t=void 0),Ze();try{return e.apply(t)}finally{et()}}function me(e){return _e("`mobx.map` is deprecated, use `new ObservableMap` or `mobx.observable.map` instead"),An.map(e)}function ye(){return"undefined"!=typeof window?window:e}function ge(){return++Vn.mobxGuid}function we(e,t){throw xe(!1,e,t),"X"}function xe(e,t,n){if(!e)throw new Error("[mobx] Invariant failed: "+t+(n?" in '"+n+"'":""))}function _e(e){return-1===kn.indexOf(e)&&(kn.push(e),console.error("[mobx] Deprecated: "+e),!0)}function Oe(e){var t=!1;return function(){if(!t)return t=!0,e.apply(this,arguments)}}function Se(e){var t=[];return e.forEach(function(e){-1===t.indexOf(e)&&t.push(e)}),t}function Ie(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 Ee(e){return null!==e&&"object"==typeof e}function Ae(e){if(null===e||"object"!=typeof e)return!1;var t=Object.getPrototypeOf(e);return t===Object.prototype||null===t}function De(){for(var e=arguments[0],t=1,n=arguments.length;t=0;o--)if(!Ne(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&&Ne(t.get(n),e)}),i}if("object"==typeof e&&"object"==typeof t){if(null===e||null===t)return!1;if(Be(e)&&Be(t))return e.size===t.size&&Ne(An.shallowMap(e).entries(),An.shallowMap(t).entries());if(Me(e).length!==Me(t).length)return!1;for(var a in e){if(!(a in t))return!1;if(!Ne(e[a],t[a]))return!1}return!0}return!1}function Ce(e,t){var n="isMobX"+e;return t.prototype[n]=!0,function(e){return Ee(e)&&!0===e[n]}}function Ve(e,t){return"number"==typeof e&&"number"==typeof t&&isNaN(e)&&isNaN(t)}function Le(e){return Array.isArray(e)||w(e)}function Be(e){return $e(e)||Tn(e)}function $e(e){return void 0!==ye().Map&&e instanceof ye().Map}function Ue(e){var t;return Ae(e)?t=Object.keys(e):Array.isArray(e)?t=e.map(function(e){return e[0]}):Be(e)?t=Array.from(e.keys()):we("Cannot get keys from "+e),t}function ze(){return"function"==typeof Symbol&&Symbol.toPrimitive||"@@toPrimitive"}function Ye(e){return null===e?null:"object"==typeof e?""+e:e}function Fe(){Bn=!0,ye().__mobxInstanceCount--}function Ge(){_e("Using `shareGlobalState` is not recommended, use peer dependencies instead. See https://github.com/mobxjs/mobx/issues/1082 for details."),Ln=!0;var e=ye(),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 We(){return Vn}function qe(){Vn.resetId++;var e=new Cn;for(var t in e)-1===Nn.indexOf(t)&&(Vn[t]=e[t]);Vn.allowStateChanges=!Vn.strictMode}function He(e){return e.observers&&e.observers.length>0}function Ke(e){return e.observers}function Je(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 Xe(e,t){if(1===e.observers.length)e.observers.length=0,Qe(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 Qe(e){e.isPendingUnobservation||(e.isPendingUnobservation=!0,Vn.pendingUnobservations.push(e))}function Ze(){Vn.inBatch++}function et(){if(0==--Vn.inBatch){yt();for(var e=Vn.pendingUnobservations,t=0;t0;Vn.computationDepth>0&&t&&we(x("m031")+e.name),!Vn.allowStateChanges&&t&&we(x(Vn.strictMode?"m030a":"m030b")+e.name)}function ct(e,t,n){vt(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 zn(e)}return Vn.trackingDerivation=r,lt(e),o}function lt(e){for(var t=e.observing,r=e.observing=e.newObserving,o=n.IDerivationState.UP_TO_DATE,i=0,a=e.unboundDepsCount,s=0;so&&(o=u.dependenciesState)}for(r.length=i,e.newObserving=null,a=t.length;a--;){var u=t[a];0===u.diffValue&&Xe(u,e),u.diffValue=0}for(;i--;){var u=r[i];1===u.diffValue&&(u.diffValue=0,Je(u,e))}o!==n.IDerivationState.UP_TO_DATE&&(e.dependenciesState=o,e.onBecomeStale())}function pt(e){var t=e.observing;e.observing=[];for(var r=t.length;r--;)Xe(t[r],e);e.dependenciesState=n.IDerivationState.NOT_TRACKING}function ft(e){var t=ht(),n=e();return dt(t),n}function ht(){var e=Vn.trackingDerivation;return Vn.trackingDerivation=null,e}function dt(e){Vn.trackingDerivation=e}function vt(e){if(e.dependenciesState!==n.IDerivationState.UP_TO_DATE){e.dependenciesState=n.IDerivationState.UP_TO_DATE;for(var t=e.observing,r=t.length;r--;)t[r].lowestObserverState=n.IDerivationState.UP_TO_DATE}}function bt(e){xe(this&&this.$mobx&&Wn(this.$mobx),"Invalid `this`"),xe(!this.$mobx.errorHandler,"Only one onErrorHandler can be registered"),this.$mobx.errorHandler=e}function mt(e){return Vn.globalReactionErrorHandlers.push(e),function(){var t=Vn.globalReactionErrorHandlers.indexOf(e);t>=0&&Vn.globalReactionErrorHandlers.splice(t,1)}}function yt(){Vn.inBatch>0||Vn.isRunningReactions||Gn(gt)}function gt(){Vn.isRunningReactions=!0;for(var e=Vn.pendingReactions,t=0;e.length>0;){++t===Fn&&(console.error("Reaction doesn't converge to a stable state after "+Fn+" 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;r0&&(t.dependencies=Se(e.observing).map(Yt)),t}function Ft(e,t){return Gt(Et(e,t))}function Gt(e){var t={name:e.name};return He(e)&&(t.observers=Ke(e).map(Gt)),t}function Wt(e,t,n){var r;if(Tn(e)||w(e)||cn(e))r=At(e);else{if(!te(e))return we("Expected observable map, object or array as first array");if("string"!=typeof t)return we("InterceptReads can only be used with a specific property, not with an object in general");r=At(e,t)}return void 0!==r.dehancer?we("An intercept reader was already established"):(r.dehancer="function"==typeof t?t:n,function(){r.dehancer=void 0})}Object.defineProperty(n,"__esModule",{value:!0});var qt=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])},Ht=function(){function e(e){void 0===e&&(e="Atom@"+ge()),this.name=e,this.isPendingUnobservation=!0,this.observers=[],this.observersIndexes={},this.diffValue=0,this.lastAccessedBy=0,this.lowestObserverState=n.IDerivationState.NOT_TRACKING}return e.prototype.onBecomeUnobserved=function(){},e.prototype.reportObserved=function(){tt(this)},e.prototype.reportChanged=function(){Ze(),nt(this),et()},e.prototype.toString=function(){return this.name},e}(),Kt=function(e){function n(t,n,r){void 0===t&&(t="Atom@"+ge()),void 0===n&&(n=Pn),void 0===r&&(r=Pn);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 t(n,e),n.prototype.reportObserved=function(){return Ze(),e.prototype.reportObserved.call(this),this.isBeingTracked||(this.isBeingTracked=!0,this.onBecomeObservedHandler()),et(),!!Vn.trackingDerivation},n.prototype.onBecomeUnobserved=function(){this.isBeingTracked=!1,this.onBecomeUnobservedHandler()},n}(Ht),Jt=Ce("Atom",Ht),Xt={spyReportEnd:!0},Qt="__$$iterating",Zt=function(){var e=!1,t={};return Object.defineProperty(t,"0",{set:function(){e=!0}}),Object.create(t)[0]=1,!1===e}(),en=0,tn=function(){function e(){}return e}();!function(e,t){void 0!==Object.setPrototypeOf?Object.setPrototypeOf(e.prototype,t):void 0!==e.prototype.__proto__?e.prototype.__proto__=t:e.prototype=t}(tn,Array.prototype),Object.isFrozen(Array)&&["constructor","push","shift","concat","pop","unshift","replace","find","findIndex","splice","reverse","sort"].forEach(function(e){Object.defineProperty(tn.prototype,e,{configurable:!0,writable:!0,value:Array.prototype[e]})});var nn=function(){function e(e,t,n,r){this.array=n,this.owned=r,this.values=[],this.lastKnownLength=0,this.interceptors=null,this.changeListeners=null,this.atom=new Ht(e||"ObservableArray@"+ge()),this.enhancer=function(n,r){return t(n,r,e+"[..]")}}return e.prototype.dehanceValue=function(e){return void 0!==this.dehancer?this.dehancer(e):e},e.prototype.dehanceValues=function(e){return void 0!==this.dehancer?e.map(this.dehancer):e},e.prototype.intercept=function(e){return o(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}),s(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;r0&&e+t+1>en&&g(e+t+1)},e.prototype.spliceWithArray=function(e,t,n){var o=this;ut(this.atom);var a=this.values.length;if(void 0===e?e=0:e>a?e=a:e<0&&(e=Math.max(0,a+e)),t=1===arguments.length?a-e:void 0===t||null===t?0:Math.max(0,Math.min(t,a-e)),void 0===n&&(n=[]),r(this)){var s=i(this,{object:this.array,type:"splice",index:e,removedCount:t,added:n});if(!s)return Rn;t=s.removedCount,n=s.added}n=n.map(function(e){return o.enhancer(e,void 0)});var u=n.length-t;this.updateArrayLength(a,u);var c=this.spliceItemsIntoValues(e,t,n);return 0===t&&0===n.length||this.notifyArraySplice(e,n,c),this.dehanceValues(c)},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&&c(),o=a(this),i=o||r?{object:this.array,type:"update",index:e,newValue:t,oldValue:n}:null;r&&p(i),this.atom.reportChanged(),o&&u(this,i),r&&f()},e.prototype.notifyArraySplice=function(e,t,n){var r=!this.owned&&c(),o=a(this),i=o||r?{object:this.array,type:"splice",index:e,removed:n,added:t,removedCount:n.length,addedCount:t.length}:null;r&&p(i),this.atom.reportChanged(),o&&u(this,i),r&&f()},e}(),rn=function(e){function n(t,n,r,o){void 0===r&&(r="ObservableArray@"+ge()),void 0===o&&(o=!1);var i=e.call(this)||this,a=new nn(r,n,i,o);return Re(i,"$mobx",a),t&&t.length&&i.spliceWithArray(0,0,t),Zt&&Object.defineProperty(a.array,"0",on),i}return t(n,e),n.prototype.intercept=function(e){return this.$mobx.intercept(e)},n.prototype.observe=function(e,t){return void 0===t&&(t=!1),this.$mobx.observe(e,t)},n.prototype.clear=function(){return this.splice(0)},n.prototype.concat=function(){for(var e=[],t=0;t-1&&(this.splice(t,1),!0)},n.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";Te(e,t,hn(i,n))},function(e){return this[e]},function(){xe(!1,x("m001"))},!1,!0),fn=R(function(e,t,n){L(e,t,n)},function(e){return this[e]},function(){xe(!1,x("m001"))},!1,!1),hn=function(e,t,n,r){return 1===arguments.length&&"function"==typeof e?_(e.name||"",e):2===arguments.length&&"function"==typeof t?_(e,t):1===arguments.length&&"string"==typeof e?N(e):N(t).apply(null,arguments)};hn.bound=function(e,t,n){if("function"==typeof e){var r=_("",e);return r.autoBind=!0,r}return fn.apply(null,arguments)};var dn={identity:B,structural:$,default:U},vn=function(){function e(e,t,r,o,i){this.derivation=e,this.scope=t,this.equals=r,this.dependenciesState=n.IDerivationState.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=n.IDerivationState.UP_TO_DATE,this.unboundDepsCount=0,this.__mapid="#"+ge(),this.value=new zn(null),this.isComputing=!1,this.isRunningSetter=!1,this.name=o||"ComputedValue@"+ge(),i&&(this.setter=_(o+"-setter",i))}return e.prototype.onBecomeStale=function(){ot(this)},e.prototype.onBecomeUnobserved=function(){pt(this),this.value=void 0},e.prototype.get=function(){xe(!this.isComputing,"Cycle detected in computation "+this.name,this.derivation),0===Vn.inBatch?(Ze(),at(this)&&(this.value=this.computeValue(!1)),et()):(tt(this),at(this)&&this.trackAndCompute()&&rt(this));var e=this.value;if(it(e))throw e.cause;return e},e.prototype.peek=function(){var e=this.computeValue(!1);if(it(e))throw e.cause;return e},e.prototype.set=function(e){if(this.setter){xe(!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 xe(!1,"[ComputedValue '"+this.name+"'] It is not possible to assign a new value to a computed value.")},e.prototype.trackAndCompute=function(){c()&&l({object:this.scope,type:"compute",fn:this.derivation});var e=this.value,t=this.dependenciesState===n.IDerivationState.NOT_TRACKING,r=this.value=this.computeValue(!0);return t||it(e)||it(r)||!this.equals(e,r)},e.prototype.computeValue=function(e){this.isComputing=!0,Vn.computationDepth++;var t;if(e)t=ct(this,this.derivation,this.scope);else try{t=this.derivation.call(this.scope)}catch(e){t=new zn(e)}return Vn.computationDepth--,this.isComputing=!1,t},e.prototype.observe=function(e,t){var n=this,r=!0,o=void 0;return z(function(){var i=n.get();if(!r||t){var a=ht();e({type:"update",object:n,newValue:i,oldValue:o}),dt(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 Ye(this.get())},e.prototype.whyRun=function(){var e=Boolean(Vn.trackingDerivation),t=Se(this.isComputing?this.newObserving:this.observing).map(function(e){return e.name}),r=Se(Ke(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===n.IDerivationState.NOT_TRACKING?x("m032"):" * This computation will re-run if any of the following observables changes:\n "+Ie(t)+"\n "+(this.isComputing&&e?" (... or any observable accessed during the remainder of the current run)":"")+"\n "+x("m038")+"\n\n * If the outcome of this computation changes, the following observers will be re-run:\n "+Ie(r)+"\n")},e}();vn.prototype[ze()]=vn.prototype.valueOf;var bn=Ce("ComputedValue",vn),mn=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 xe(!0!==t,"`observe` doesn't support the fire immediately property for observable objects."),s(this,e)},e.prototype.intercept=function(e){return o(this,e)},e}(),yn={},gn={},wn=Ce("ObservableObjectAdministration",mn),xn=re(pe),_n=re(fe),On=re(he),Sn=re(de),In=re(ve),En={box:function(e,t){return arguments.length>2&&ue("box"),new un(e,pe,t)},shallowBox:function(e,t){return arguments.length>2&&ue("shallowBox"),new un(e,he,t)},array:function(e,t){return arguments.length>2&&ue("array"),new rn(e,pe,t)},shallowArray:function(e,t){return arguments.length>2&&ue("shallowArray"),new rn(e,he,t)},map:function(e,t){return arguments.length>2&&ue("map"),new jn(e,pe,t)},shallowMap:function(e,t){return arguments.length>2&&ue("shallowMap"),new jn(e,he,t)},object:function(e,t){arguments.length>2&&ue("object");var n={};return W(n,t),oe(n,e),n},shallowObject:function(e,t){arguments.length>2&&ue("shallowObject");var n={};return W(n,t),ie(n,e),n},ref:function(){return arguments.length<2?le(he,arguments[0]):On.apply(null,arguments)},shallow:function(){return arguments.length<2?le(fe,arguments[0]):_n.apply(null,arguments)},deep:function(){return arguments.length<2?le(pe,arguments[0]):xn.apply(null,arguments)},struct:function(){return arguments.length<2?le(de,arguments[0]):Sn.apply(null,arguments)}},An=se;Object.keys(En).forEach(function(e){return An[e]=En[e]}),An.deep.struct=An.struct,An.ref.struct=function(){return arguments.length<2?le(ve,arguments[0]):In.apply(null,arguments)};var Dn={},jn=function(){function e(e,t,n){void 0===t&&(t=pe),void 0===n&&(n="ObservableMap@"+ge()),this.enhancer=t,this.name=n,this.$mobx=Dn,this._data=Object.create(null),this._hasMap=Object.create(null),this._keys=new rn(void 0,he,this.name+".keys()",!0),this.interceptors=null,this.changeListeners=null,this.dehancer=void 0,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(r(this)){var o=i(this,{type:n?"update":"add",object:this,newValue:t,name:e});if(!o)return this;t=o.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,r(this)){var n=i(this,{type:"delete",object:this,name:e});if(!n)return!1}if(this._has(e)){var o=c(),s=a(this),n=s||o?{type:"delete",object:this,oldValue:this._data[e].value,name:e}:null;return o&&p(n),be(function(){t._keys.remove(e),t._updateHasMapEntry(e,!1),t._data[e].setNewValue(void 0),t._data[e]=void 0}),s&&u(this,n),o&&f(),!0}return!1},e.prototype._updateHasMapEntry=function(e,t){var n=this._hasMap[e];return n?n.setNewValue(t):n=this._hasMap[e]=new un(t,he,this.name+"."+e+"?",!1),n},e.prototype._updateValue=function(e,t){var n=this._data[e];if((t=n.prepareNewValue(t))!==sn){var r=c(),o=a(this),i=o||r?{type:"update",object:this,oldValue:n.value,name:e,newValue:t}:null;r&&p(i),n.setNewValue(t),o&&u(this,i),r&&f()}},e.prototype._addValue=function(e,t){var n=this;be(function(){var r=n._data[e]=new un(t,n.enhancer,n.name+"."+e,!1);t=r.value,n._updateHasMapEntry(e,!0),n._keys.push(e)});var r=c(),o=a(this),i=o||r?{type:"add",object:this,name:e,newValue:t}:null;r&&p(i),o&&u(this,i),r&&f()},e.prototype.get=function(e){return e=""+e,this.has(e)?this.dehanceValue(this._data[e].get()):this.dehanceValue(void 0)},e.prototype.dehanceValue=function(e){return void 0!==this.dehancer?this.dehancer(e):e},e.prototype.keys=function(){return v(this._keys.slice())},e.prototype.values=function(){return v(this._keys.map(this.get,this))},e.prototype.entries=function(){var e=this;return v(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 Tn(e)&&(e=e.toJS()),be(function(){Ae(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)}):$e(e)?e.forEach(function(e,n){return t.set(n,e)}):null!==e&&void 0!==e&&we("Cannot initialize map from "+e)}),this},e.prototype.clear=function(){var e=this;be(function(){ft(function(){e.keys().forEach(e.delete,e)})})},e.prototype.replace=function(e){var t=this;return be(function(){var n=Ue(e);t.keys().filter(function(e){return-1===n.indexOf(e)}).forEach(function(e){return t.delete(e)}),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 xe(!0!==t,x("m033")),s(this,e)},e.prototype.intercept=function(e){return o(this,e)},e}();b(jn.prototype,function(){return this.entries()});var Tn=Ce("ObservableMap",jn),Rn=[];Object.freeze(Rn);var kn=[],Pn=function(){},Mn=Object.prototype.hasOwnProperty,Nn=["mobxGuid","resetId","spyListeners","strictMode","runId"],Cn=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 Cn,Ln=!1,Bn=!1,$n=!1,Un=ye();Un.__mobxInstanceCount?(Un.__mobxInstanceCount++,setTimeout(function(){Ln||Bn||$n||($n=!0,console.warn("[mobx] Warning: there are multiple mobx instances active. This might lead to unexpected results. See https://github.com/mobxjs/mobx/issues/1082 for details."))})):Un.__mobxInstanceCount=1,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"}(n.IDerivationState||(n.IDerivationState={}));var zn=function(){function e(e){this.cause=e}return e}(),Yn=function(){function e(e,t){void 0===e&&(e="Reaction@"+ge()),this.name=e,this.onInvalidate=t,this.observing=[],this.newObserving=[],this.dependenciesState=n.IDerivationState.NOT_TRACKING,this.diffValue=0,this.runId=0,this.unboundDepsCount=0,this.__mapid="#"+ge(),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),yt())},e.prototype.isScheduled=function(){return this._isScheduled},e.prototype.runReaction=function(){this.isDisposed||(Ze(),this._isScheduled=!1,at(this)&&(this._isTrackPending=!0,this.onInvalidate(),this._isTrackPending&&c()&&l({object:this,type:"scheduled-reaction"})),et())},e.prototype.track=function(e){Ze();var t,n=c();n&&(t=Date.now(),p({object:this,type:"reaction",fn:e})),this._isRunning=!0;var r=ct(this,e,void 0);this._isRunning=!1,this._isTrackPending=!1,this.isDisposed&&pt(this),it(r)&&this.reportExceptionInDerivation(r.cause),n&&f({time:Date.now()-t}),et()},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=x("m037");console.error(n||r,e),c()&&l({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||(Ze(),pt(this),et()))},e.prototype.getDisposer=function(){var e=this.dispose.bind(this);return e.$mobx=this,e.onError=bt,e},e.prototype.toString=function(){return"Reaction["+this.name+"]"},e.prototype.whyRun=function(){var e=Se(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 "+Ie(e)+"\n "+(this._isRunning?" (... or any observable accessed during the remainder of the current run)":"")+"\n\t"+x("m038")+"\n"},e}(),Fn=100,Gn=function(e){return e()},Wn=Ce("Reaction",Yn),qn=It(dn.default),Hn=It(dn.structural),Kn=function(e,t,n){if("string"==typeof t)return qn.apply(null,arguments);xe("function"==typeof e,x("m011")),xe(arguments.length<3,x("m012"));var r="object"==typeof t?t:{};r.setter="function"==typeof t?t:r.setter;var o=r.equals?r.equals:r.compareStructural||r.struct?dn.structural:dn.default;return new vn(e,r.context,o,r.name||e.name||"",r.setter)};Kn.struct=Hn,Kn.equals=It;var Jn={allowStateChanges:D,deepEqual:Ne,getAtom:Et,getDebugName:Dt,getDependencyTree:zt,getAdministration:At,getGlobalState:We,getObserverTree:Ft,interceptReads:Wt,isComputingDerivation:st,isSpyEnabled:c,onReactionError:mt,reserveArrayBuffer:g,resetGlobalState:qe,isolateGlobalState:Fe,shareGlobalState:Ge,spyReport:l,spyReportEnd:f,spyReportStart:p,setReactionScheduler:wt},Xn={Reaction:Yn,untracked:ft,Atom:Kt,BaseAtom:Ht,useStrict:E,isStrictModeEnabled:A,spy:h,comparer:dn,asReference:xt,asFlat:Ot,asStructure:_t,asMap:St,isModifierDescriptor:ce,isObservableObject:te,isBoxedObservable:cn,isObservableArray:w,ObservableMap:jn,isObservableMap:Tn,map:me,transaction:be,observable:An,computed:Kn,isObservable:ne,isComputed:jt,extendObservable:oe,extendShallowObservable:ie,observe:Tt,intercept:Pt,autorun:z,autorunAsync:F,when:Y,reaction:G,action:hn,isAction:V,runInAction:C, expr:Ct,toJS:Vt,createTransformer:Lt,whyRun:Ut,isArrayLike:Le,extras:Jn},Qn=!1;for(var Zn in Xn)!function(e){var t=Xn[e];Object.defineProperty(Xn,e,{get:function(){return Qn||(Qn=!0,console.warn("Using default export (`import mobx from 'mobx'`) is deprecated and won’t work in mobx@4.0.0\nUse `import * as mobx from 'mobx'` instead")),t}})}(Zn);"object"==typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__&&__MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobx({spy:h,extras:Jn}),n.extras=Jn,n.default=Xn,n.Reaction=Yn,n.untracked=ft,n.Atom=Kt,n.BaseAtom=Ht,n.useStrict=E,n.isStrictModeEnabled=A,n.spy=h,n.comparer=dn,n.asReference=xt,n.asFlat=Ot,n.asStructure=_t,n.asMap=St,n.isModifierDescriptor=ce,n.isObservableObject=te,n.isBoxedObservable=cn,n.isObservableArray=w,n.ObservableMap=jn,n.isObservableMap=Tn,n.map=me,n.transaction=be,n.observable=An,n.computed=Kn,n.isObservable=ne,n.isComputed=jt,n.extendObservable=oe,n.extendShallowObservable=ie,n.observe=Tt,n.intercept=Pt,n.autorun=z,n.autorunAsync=F,n.when=Y,n.reaction=G,n.action=hn,n.isAction=V,n.runInAction=C,n.expr=Ct,n.toJS=Vt,n.createTransformer=Lt,n.whyRun=Ut,n.isArrayLike=Le}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}]},{},[1])(1)});