/*! For license information please see vendor.chunk.3440f068cba18feafeb9.js.LICENSE.txt */ (window.webpackJsonp=window.webpackJsonp||[]).push([[21],{"./node_modules/@babel/runtime/helpers/esm/extends.js":function(e,t,n){"use strict";function r(){return(r=Object.assign||function(e){for(var t=1;t=0||(o[n]=e[n]);return o}n.d(t,"a",(function(){return r}))},"./node_modules/core-decorators/es/core-decorators.js":function(e,t,n){"use strict";n.r(t),n.d(t,"override",(function(){return F})),n.d(t,"deprecate",(function(){return B})),n.d(t,"deprecated",(function(){return B})),n.d(t,"suppressWarnings",(function(){return Y})),n.d(t,"memoize",(function(){return te})),n.d(t,"autobind",(function(){return se})),n.d(t,"readonly",(function(){return fe})),n.d(t,"enumerable",(function(){return de})),n.d(t,"nonenumerable",(function(){return ve})),n.d(t,"nonconfigurable",(function(){return me})),n.d(t,"debounce",(function(){return Se})),n.d(t,"throttle",(function(){return Te})),n.d(t,"decorate",(function(){return Pe})),n.d(t,"mixin",(function(){return Re})),n.d(t,"mixins",(function(){return Re})),n.d(t,"lazyInitialize",(function(){return i})),n.d(t,"time",(function(){return Ue})),n.d(t,"extendDescriptor",(function(){return Ke})),n.d(t,"profile",(function(){return Xe})),n.d(t,"applyDecorators",(function(){return et}));var r=Object.defineProperty;function o(e,t,n){var o=n.configurable,i=n.enumerable,a=n.initializer,u=n.value;return{configurable:o,enumerable:i,get:function(){if(this!==e){var n=a?a.call(this):u;return r(this,t,{configurable:o,enumerable:i,writable:!0,value:n}),n}},set:O(t)}}function i(){for(var e=arguments.length,t=Array(e),n=0;n1&&void 0!==arguments[1]?arguments[1]:t.key,r=arguments[2];return n+r}))}},{key:"key",get:function(){return this.childDescriptor.key}},{key:"parentNotation",get:function(){return this.parentKlass.constructor.name+"#"+this.parentPropertySignature}},{key:"childNotation",get:function(){return this.childKlass.constructor.name+"#"+this.childPropertySignature}},{key:"parentTopic",get:function(){return this._getTopic(this.parentDescriptor)}},{key:"childTopic",get:function(){return this._getTopic(this.childDescriptor)}},{key:"parentPropertySignature",get:function(){return this._extractTopicSignature(this.parentTopic)}},{key:"childPropertySignature",get:function(){return this._extractTopicSignature(this.childTopic)}}]),I(e,[{key:"assert",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";!0!==e&&this.error("{child} does not properly override {parent}"+t)}},{key:"error",value:function(e){var t=this;throw e=e.replace("{parent}",(function(e){return t.parentNotation})).replace("{child}",(function(e){return t.childNotation})),new SyntaxError(e)}}]),e}();function D(e){return e.hasOwnProperty("value")?"data":e.hasOwnProperty("get")||e.hasOwnProperty("set")?"accessor":"data"}function M(e,t,n){n.assert(e.length===t.length)}function V(e,t,n){var r=D(e),o=D(t);switch(r!==o&&n.error('descriptor types do not match. {parent} is "'+r+'", {child} is "'+o+'"'),o){case"data":!function(e,t,n){var r=A(e.value),o=A(t.value);switch("undefined"===r&&"undefined"===o&&n.error("descriptor values are both undefined. (class properties are are not currently supported)'"),r!==o&&("function"===o&&void 0===r||void 0!==r)&&n.error('value types do not match. {parent} is "'+r+'", {child} is "'+o+'"'),o){case"function":M(e.value,t.value,n);break;default:n.error('Unexpected error. Please file a bug with: {parent} is "'+r+'", {child} is "'+o+'"')}}(e,t,n);break;case"accessor":!function(e,t,n){var r="function"==typeof e.get,o="function"==typeof t.get,i="function"==typeof e.set,a="function"==typeof t.set;(r||o)&&(!r&&i&&n.error("{parent} is setter but {child} is getter"),!o&&a&&n.error("{parent} is getter but {child} is setter"),M(e.get,t.get,n)),(i||a)&&(!i&&r&&n.error("{parent} is getter but {child} is setter"),!a&&o&&n.error("{parent} is setter but {child} is getter"),M(e.set,t.set,n))}(e,t,n)}}var z=[function(e){return e.toLowerCase()},function(e){return e.toUpperCase()},function(e){return e+"s"},function(e){return e.slice(0,-1)},function(e){return e.slice(1,e.length)}];function L(e,t,n){n.key=t;var r=Object.getPrototypeOf(e),o=Object.getOwnPropertyDescriptor(r,t),i=new R(r,e,o,n);if(void 0===o){var a=function(e,t){for(var n=0,r=z.length;nl||"function"==typeof l&&l.apply(this,arguments))&&(c.profile(a),t.profileLastRan=e);try{return f.apply(this,arguments)}finally{c.profileEnd(a)}}})}function Xe(){for(var e=arguments.length,t=Array(e),n=0;n=0;p--){var d=a[p];"."===d?i(a,p):".."===d?(i(a,p),f++):f&&(i(a,p),f--)}if(!s)for(;f--;f)a.unshift("..");!s||""===a[0]||a[0]&&o(a[0])||a.unshift("");var h=a.join("/");return n&&"/"!==h.substr(-1)&&(h+="/"),h};function u(e){return e.valueOf?e.valueOf():Object.prototype.valueOf.call(e)}var l=function e(t,n){if(t===n)return!0;if(null==t||null==n)return!1;if(Array.isArray(t))return Array.isArray(n)&&t.length===n.length&&t.every((function(t,r){return e(t,n[r])}));if("object"==typeof t||"object"==typeof n){var r=u(t),o=u(n);return r!==t||o!==n?e(r,o):Object.keys(Object.assign({},t,n)).every((function(r){return e(t[r],n[r])}))}return!1},s=n("./node_modules/tiny-invariant/dist/tiny-invariant.esm.js");function c(e){return"/"===e.charAt(0)?e:"/"+e}function f(e){return"/"===e.charAt(0)?e.substr(1):e}function p(e,t){return function(e,t){return 0===e.toLowerCase().indexOf(t.toLowerCase())&&-1!=="/?#".indexOf(e.charAt(t.length))}(e,t)?e.substr(t.length):e}function d(e){return"/"===e.charAt(e.length-1)?e.slice(0,-1):e}function h(e){var t=e.pathname,n=e.search,r=e.hash,o=t||"/";return n&&"?"!==n&&(o+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(o+="#"===r.charAt(0)?r:"#"+r),o}function v(e,t,n,o){var i;"string"==typeof e?(i=function(e){var t=e||"/",n="",r="",o=t.indexOf("#");-1!==o&&(r=t.substr(o),t=t.substr(0,o));var i=t.indexOf("?");return-1!==i&&(n=t.substr(i),t=t.substr(0,i)),{pathname:t,search:"?"===n?"":n,hash:"#"===r?"":r}}(e)).state=t:(void 0===(i=Object(r.a)({},e)).pathname&&(i.pathname=""),i.search?"?"!==i.search.charAt(0)&&(i.search="?"+i.search):i.search="",i.hash?"#"!==i.hash.charAt(0)&&(i.hash="#"+i.hash):i.hash="",void 0!==t&&void 0===i.state&&(i.state=t));try{i.pathname=decodeURI(i.pathname)}catch(e){throw e instanceof URIError?new URIError('Pathname "'+i.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):e}return n&&(i.key=n),o?i.pathname?"/"!==i.pathname.charAt(0)&&(i.pathname=a(i.pathname,o.pathname)):i.pathname=o.pathname:i.pathname||(i.pathname="/"),i}function y(e,t){return e.pathname===t.pathname&&e.search===t.search&&e.hash===t.hash&&e.key===t.key&&l(e.state,t.state)}function m(){var e=null;var t=[];return{setPrompt:function(t){return e=t,function(){e===t&&(e=null)}},confirmTransitionTo:function(t,n,r,o){if(null!=e){var i="function"==typeof e?e(t,n):e;"string"==typeof i?"function"==typeof r?r(i,o):o(!0):o(!1!==i)}else o(!0)},appendListener:function(e){var n=!0;function r(){n&&e.apply(void 0,arguments)}return t.push(r),function(){n=!1,t=t.filter((function(e){return e!==r}))}},notifyListeners:function(){for(var e=arguments.length,n=new Array(e),r=0;rt?n.splice(t,n.length-t,r):n.push(r),f({action:"PUSH",location:r,index:t,entries:n})}}))},replace:function(e,t){var r=v(e,t,p(),w.location);c.confirmTransitionTo(r,"REPLACE",n,(function(e){e&&(w.entries[w.index]=r,f({action:"REPLACE",location:r}))}))},go:g,goBack:function(){g(-1)},goForward:function(){g(1)},canGo:function(e){var t=w.index+e;return t>=0&&t=n.cleanAt&&(n.reaction.dispose(),t.current=null,m.delete(t))})),m.size>0&&b()}var w=!1,S=[];var x={};function _(e){return"observer"+e}function E(e,t,n){if(void 0===t&&(t="observed"),void 0===n&&(n=x),d())return e();var o,a=function(e){return function(){w?S.push(e):e()}}((n.useForceUpdate||u.d)()),l=i.a.useRef(null);if(!l.current){var s=new r.Reaction(_(t),(function(){c.mounted?a():(s.dispose(),l.current=null)})),c=function(e){return{cleanAt:Date.now()+y,reaction:e}}(s);l.current=c,o=l,m.add(o),b()}var f=l.current.reaction;return i.a.useDebugValue(f,h),i.a.useEffect((function(){var e;return e=l,m.delete(e),l.current?l.current.mounted=!0:(l.current={reaction:new r.Reaction(_(t),(function(){a()})),cleanAt:1/0},a()),function(){l.current.reaction.dispose(),l.current=null}}),[]),function(e){w=!0,S=[];try{var t=e();w=!1;var n=S.length>0?S:void 0;return i.a.useLayoutEffect((function(){n&&n.forEach((function(e){return e()}))}),[n]),t}finally{w=!1}}((function(){var t,n;if(f.track((function(){try{t=e()}catch(e){n=e}})),n)throw n;return t}))}var T=function(){return(T=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a};function A(e,t){if(!t||void 0!==e){0;var n=j(i.a.useState((function(){return Object(r.observable)(e,{},{deep:!1})})),1)[0];return Object(r.runInAction)((function(){Object.assign(n,e)})),n}}function I(e){return A(e,!1)}function N(e,t){var n=A(t,!0);return i.a.useState((function(){var t=Object(r.observable)(e(n));return Object(u.c)(t)&&Object(r.runInAction)((function(){Object.keys(t).forEach((function(e){var n,o,i=t[e];"function"==typeof i&&(t[e]=(n=i,o=t,function(){for(var e=[],t=0;t0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a};function i(){var e=o(Object(r.useState)(0),2)[1];return Object(r.useCallback)((function(){e((function(e){return e+1}))}),[])}function a(e){if(!e||"object"!=typeof e)return!1;var t=Object.getPrototypeOf(e);return!t||t===Object.prototype}function u(e){return"function"==typeof Symbol?Symbol.for(e):"__$mobx-react "+e+"__"}var l={};function s(){return"undefined"!=typeof window?window:void 0!==e?e:"undefined"!=typeof self?self:l}}).call(this,n("./node_modules/webpack/buildin/global.js"))},"./node_modules/mobx-react/dist/mobxreact.esm.js":function(e,t,n){"use strict";n.r(t),n.d(t,"MobXProviderContext",(function(){return R})),n.d(t,"PropTypes",(function(){return q})),n.d(t,"Provider",(function(){return D})),n.d(t,"disposeOnUnmount",(function(){return H})),n.d(t,"inject",(function(){return z})),n.d(t,"observer",(function(){return I}));var r=n("./node_modules/mobx/lib/mobx.module.js"),o=n("./node_modules/react/index.js"),i=n.n(o),a=n("./node_modules/mobx-react-lite/es/index.js");n.d(t,"Observer",(function(){return a.a})),n.d(t,"isUsingStaticRendering",(function(){return a.b})),n.d(t,"observerBatching",(function(){return a.d})),n.d(t,"useAsObservableSource",(function(){return a.e})),n.d(t,"useLocalStore",(function(){return a.f})),n.d(t,"useObserver",(function(){return a.g})),n.d(t,"useStaticRendering",(function(){return a.h}));var u=0;var l={};function s(e){return l[e]||(l[e]=function(e){if("function"==typeof Symbol)return Symbol(e);var t="__$mobx-react "+e+" ("+u+")";return u++,t}(e)),l[e]}function c(e,t){if(f(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(var o=0;o2?r-2:0),i=2;i"}function O(e){var t=this;if(!0===Object(a.b)())return e.call(this);d(this,x,!1),d(this,_,!1);var n=T(this),i=e.bind(this),u=!1,l=new r.Reaction(n+".render()",(function(){if(!u&&(u=!0,!0!==t[S])){var e=!0;try{d(t,_,!0),t[x]||o.Component.prototype.forceUpdate.call(t),e=!1}finally{d(t,_,!1),e&&l.dispose()}}}));function s(){u=!1;var e=void 0,t=void 0;if(l.track((function(){try{t=Object(r._allowStateChanges)(!1,i)}catch(t){e=t}})),e)throw e;return t}return l.reactComponent=this,s[g]=l,this.render=s,s.call(this)}function k(e,t){return Object(a.b)()&&console.warn("[mobx-react] It seems that a re-rendering of a React component is triggered while in static (server-side) mode. Please make sure components are rendered only once server-side."),this.state!==t||!c(this.props,e)}function P(e,t){var n=s("reactProp_"+t+"_valueHolder"),o=s("reactProp_"+t+"_atomHolder");function i(){return this[o]||d(this,o,Object(r.createAtom)("reactive "+t)),this[o]}Object.defineProperty(e,t,{configurable:!0,enumerable:!0,get:function(){var e=!1;return r._allowStateReadsStart&&r._allowStateReadsEnd&&(e=Object(r._allowStateReadsStart)(!0)),i.call(this).reportObserved(),r._allowStateReadsStart&&r._allowStateReadsEnd&&Object(r._allowStateReadsEnd)(e),this[n]},set:function(e){this[_]||c(this[n],e)?d(this,n,e):(d(this,n,e),d(this,x,!0),i.call(this).reportChanged(),d(this,x,!1))}})}var C="function"==typeof Symbol&&Symbol.for,j=C?Symbol.for("react.forward_ref"):"function"==typeof o.forwardRef&&Object(o.forwardRef)((function(e){return null})).$$typeof,A=C?Symbol.for("react.memo"):"function"==typeof o.memo&&Object(o.memo)((function(e){return null})).$$typeof;function I(e){if(!0===e.isMobxInjector&&console.warn("Mobx observer: You are trying to use 'observer' on a component that already has 'inject'. Please apply 'observer' before applying 'inject'"),A&&e.$$typeof===A)throw new Error("Mobx observer: You are trying to use 'observer' on a function component wrapped in either another observer or 'React.memo'. The observer already applies 'React.memo' for you.");if(j&&e.$$typeof===j){var t=e.render;if("function"!=typeof t)throw new Error("render property of ForwardRef was not a function");return Object(o.forwardRef)((function(){var e=arguments;return Object(o.createElement)(a.a,null,(function(){return t.apply(void 0,e)}))}))}return"function"!=typeof e||e.prototype&&e.prototype.render||e.isReactClass||Object.prototype.isPrototypeOf.call(o.Component,e)?E(e):Object(a.c)(e)}function N(){return(N=Object.assign||function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,["children"]),r=i.a.useContext(R),o=i.a.useRef(N({},r,n)).current;return i.a.createElement(R.Provider,{value:o},t)}function M(e,t,n,r){var o,a,u,l=i.a.forwardRef((function(n,r){var o=N({},n),a=i.a.useContext(R);return Object.assign(o,e(a||{},o)||{}),r&&(o.ref=r),i.a.createElement(t,o)}));return r&&(l=I(l)),l.isMobxInjector=!0,o=t,a=l,u=Object.getOwnPropertyNames(Object.getPrototypeOf(o)),Object.getOwnPropertyNames(o).forEach((function(e){p[e]||-1!==u.indexOf(e)||Object.defineProperty(a,e,Object.getOwnPropertyDescriptor(o,e))})),l.wrappedComponent=t,l.displayName=function(e,t){var n,r=e.displayName||e.name||e.constructor&&e.constructor.name||"Component";n=t?"inject-with-"+t+"("+r+")":"inject("+r+")";return n}(t,n),l}function V(e){return function(t,n){return e.forEach((function(e){if(!(e in n)){if(!(e in t))throw new Error("MobX injector: Store '"+e+"' is not available! Make sure it is provided by some Provider");n[e]=t[e]}})),n}}function z(){for(var e=arguments.length,t=new Array(e),n=0;n6?l-6:0),c=6;c>",u=u||o,null==n[o]){if(t){var r=null===n[o]?"null":"undefined";return new Error("The "+a+" `"+u+"` is marked as required in `"+i+"`, but its value is `"+r+"`.")}return null}return e.apply(void 0,[n,o,i,a,u].concat(s))}))}var n=t.bind(null,!1);return n.isRequired=t.bind(null,!0),n}function B(e){var t=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":function(e,t){return"symbol"===e||("Symbol"===t["@@toStringTag"]||"function"==typeof Symbol&&t instanceof Symbol)}(t,e)?"symbol":t}function W(e,t){return $((function(n,o,i,a,u){return Object(r.untracked)((function(){if(e&&B(n[o])===t.toLowerCase())return null;var a;switch(t){case"Array":a=r.isObservableArray;break;case"Object":a=r.isObservableObject;break;case"Map":a=r.isObservableMap;break;default:throw new Error("Unexpected mobxType: "+t)}var l=n[o];if(!a(l)){var s=function(e){var t=B(e);if("object"===t){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return t}(l),c=e?" or javascript `"+t.toLowerCase()+"`":"";return new Error("Invalid prop `"+u+"` of type `"+s+"` supplied to `"+i+"`, expected `mobx.Observable"+t+"`"+c+".")}return null}))}))}function K(e,t){return $((function(n,o,i,a,u){for(var l=arguments.length,s=new Array(l>5?l-5:0),c=5;c=0;u--)(o=e[u])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}function h(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function y(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function m(){for(var e=[],t=0;t";return this.type.name+"@"+e+(this.isAlive?"":" [dead]")},t.prototype.die=function(){this.isAlive&&this.state!==Be.DETACHING&&(this.aboutToDie(),this.finalizeDeath())},t.prototype.finalizeCreation=function(){this.baseFinalizeCreation()},t.prototype.aboutToDie=function(){this.baseAboutToDie()},t.prototype.finalizeDeath=function(){this.baseFinalizeDeath()},t.prototype.fireHook=function(e){this.fireInternalHook(e)},d([i.action],t.prototype,"die",null),t}(oe),ae=1,ue={onError:function(e){throw e}},le=function(e){function t(t,n,r,o,i){var a=e.call(this,t,n,r,o)||this;if(a.nodeId=++ae,a.isProtectionEnabled=!0,a._autoUnbox=!0,a._isRunningAction=!1,a._hasSnapshotReaction=!1,a._observableInstanceState=0,a._cachedInitialSnapshotCreated=!1,a.unbox=a.unbox.bind(a),a._initialSnapshot=mt(i),a.identifierAttribute=t.identifierAttribute,n||(a.identifierCache=new Ke),a._childNodes=t.initializeChildNodes(a,a._initialSnapshot),a.identifier=null,a.unnormalizedIdentifier=null,a.identifierAttribute&&a._initialSnapshot){var u=a._initialSnapshot[a.identifierAttribute];if(void 0===u){var l=a._childNodes[a.identifierAttribute];l&&(u=l.value)}if("string"!=typeof u&&"number"!=typeof u)throw st("Instance identifier '"+a.identifierAttribute+"' for type '"+a.type.name+"' must be a string or a number");a.identifier=Kn(u),a.unnormalizedIdentifier=u}return n?n.root.identifierCache.addNodeToCache(a):a.identifierCache.addNodeToCache(a),a}return f(t,e),t.prototype.applyPatches=function(e){this.createObservableInstanceIfNeeded(),this._applyPatches(e)},t.prototype.applySnapshot=function(e){this.createObservableInstanceIfNeeded(),this._applySnapshot(e)},t.prototype.createObservableInstanceIfNeeded=function(){0===this._observableInstanceState&&this.createObservableInstance()},t.prototype.createObservableInstance=function(){var e,t;this._observableInstanceState=1;for(var n=[],r=this.parent;r&&0===r._observableInstanceState;)n.unshift(r),r=r.parent;try{for(var a=v(n),u=a.next();!u.done;u=a.next()){u.value.createObservableInstanceIfNeeded()}}catch(t){e={error:t}}finally{try{u&&!u.done&&(t=a.return)&&t.call(a)}finally{if(e)throw e.error}}var l,s,c=this.type;try{this.storedValue=c.createNewInstance(this._childNodes),this.preboot(),this._isRunningAction=!0,c.finalizeNewInstance(this,this.storedValue)}catch(e){throw this.state=Be.DEAD,e}finally{this._isRunningAction=!1}this._observableInstanceState=2,l=this,s="snapshot",Object(i.getAtom)(l,s).trackAndCompute(),this.isRoot&&this._addSnapshotReaction(),this._childNodes=ut,this.state=Be.CREATED,this.fireHook(o.afterCreate),this.finalizeCreation()},Object.defineProperty(t.prototype,"root",{get:function(){var e=this.parent;return e?e.root:this},enumerable:!1,configurable:!0}),t.prototype.clearParent=function(){if(this.parent){this.fireHook(o.beforeDetach);var e=this.state;this.state=Be.DETACHING;var t=this.root,n=t.environment,r=t.identifierCache.splitCache(this);try{this.parent.removeChild(this.subpath),this.baseSetParent(null,""),this.environment=n,this.identifierCache=r}finally{this.state=e}}},t.prototype.setParent=function(e,t){var n=e!==this.parent,r=t!==this.subpath;(n||r)&&(n?(this.environment=void 0,e.root.identifierCache.mergeCache(this),this.baseSetParent(e,t),this.fireHook(o.afterAttach)):r&&this.baseSetParent(this.parent,t))},t.prototype.fireHook=function(e){var t=this;this.fireInternalHook(e);var n=this.storedValue&&"object"==typeof this.storedValue&&this.storedValue[e];"function"==typeof n&&(i._allowStateChangesInsideComputed?Object(i._allowStateChangesInsideComputed)((function(){n.apply(t.storedValue)})):n.apply(this.storedValue))},Object.defineProperty(t.prototype,"snapshot",{get:function(){return mt(this.getSnapshot())},enumerable:!1,configurable:!0}),t.prototype.getSnapshot=function(){return this.isAlive?2===this._observableInstanceState?this._getActualSnapshot():this._getCachedInitialSnapshot():this._snapshotUponDeath},t.prototype._getActualSnapshot=function(){return this.type.getSnapshot(this)},t.prototype._getCachedInitialSnapshot=function(){if(!this._cachedInitialSnapshotCreated){var e=this.type,t=this._childNodes,n=this._initialSnapshot;this._cachedInitialSnapshot=e.processInitialSnapshot(t,n),this._cachedInitialSnapshotCreated=!0}return this._cachedInitialSnapshot},t.prototype.isRunningAction=function(){return!!this._isRunningAction||!this.isRoot&&this.parent.isRunningAction()},t.prototype.assertAlive=function(e){var t=l();if(!this.isAlive&&"ignore"!==t){var n=this._getAssertAliveError(e);switch(t){case"error":throw st(n);case"warn":Et(n)}}},t.prototype._getAssertAliveError=function(e){var t=this.getEscapedPath(!1)||this.pathUponDeath||"",n=e.subpath&&Mt(e.subpath)||"",r=e.actionContext||Ee();r&&"action"!==r.type&&r.parentActionEvent&&(r=r.parentActionEvent);var o="";r&&null!=r.name&&(o=(r&&r.context&&R(r.context)||t)+"."+r.name+"()");return"You are trying to read or write to an object that is no longer part of a state tree. (Object type: '"+this.type.name+"', Path upon death: '"+t+"', Subpath: '"+n+"', Action: '"+o+"'). Either detach nodes first, or don't use objects after removing / replacing them in the tree."},t.prototype.getChildNode=function(e){this.assertAlive({subpath:e}),this._autoUnbox=!1;try{return 2===this._observableInstanceState?this.type.getChildNode(this,e):this._childNodes[e]}finally{this._autoUnbox=!0}},t.prototype.getChildren=function(){this.assertAlive(ut),this._autoUnbox=!1;try{return 2===this._observableInstanceState?this.type.getChildren(this):ot(this._childNodes)}finally{this._autoUnbox=!0}},t.prototype.getChildType=function(e){return this.type.getChildType(e)},Object.defineProperty(t.prototype,"isProtected",{get:function(){return this.root.isProtectionEnabled},enumerable:!1,configurable:!0}),t.prototype.assertWritable=function(e){if(this.assertAlive(e),!this.isRunningAction()&&this.isProtected)throw st("Cannot modify '"+this+"', the object is protected and can only be modified by using an action.")},t.prototype.removeChild=function(e){this.type.removeChild(this,e)},t.prototype.unbox=function(e){return e?(this.assertAlive({subpath:e.subpath||e.subpathUponDeath}),this._autoUnbox?e.value:e):e},t.prototype.toString=function(){var e=(this.isAlive?this.path:this.pathUponDeath)||"",t=this.identifier?"(id: "+this.identifier+")":"";return this.type.name+"@"+e+t+(this.isAlive?"":" [dead]")},t.prototype.finalizeCreation=function(){var e=this;this.baseFinalizeCreation((function(){var t,n;try{for(var r=v(e.getChildren()),i=r.next();!i.done;i=r.next()){i.value.finalizeCreation()}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}e.fireInternalHook(o.afterCreationFinalization)}))},t.prototype.detach=function(){if(!this.isAlive)throw st("Error while detaching, node is not alive.");this.clearParent()},t.prototype.preboot=function(){var e=this;this._applyPatches=Pe(this.storedValue,"@APPLY_PATCHES",(function(t){t.forEach((function(t){var n=Lt(t.path);rt(e,n.slice(0,-1)).applyPatchLocally(n[n.length-1],t)}))})),this._applySnapshot=Pe(this.storedValue,"@APPLY_SNAPSHOT",(function(t){if(t!==e.snapshot)return e.type.applySnapshot(e,t)})),bt(this.storedValue,"$treenode",this),bt(this.storedValue,"toJSON",Ze)},t.prototype.die=function(){this.isAlive&&this.state!==Be.DETACHING&&(this.aboutToDie(),this.finalizeDeath())},t.prototype.aboutToDie=function(){0!==this._observableInstanceState&&(this.getChildren().forEach((function(e){e.aboutToDie()})),this.baseAboutToDie(),this._internalEventsEmit("dispose"),this._internalEventsClear("dispose"))},t.prototype.finalizeDeath=function(){this.getChildren().forEach((function(e){e.finalizeDeath()})),this.root.identifierCache.notifyDied(this);var e=this.snapshot;this._snapshotUponDeath=e,this._internalEventsClearAll(),this.baseFinalizeDeath()},t.prototype.onSnapshot=function(e){return this._addSnapshotReaction(),this._internalEventsRegister("snapshot",e)},t.prototype.emitSnapshot=function(e){this._internalEventsEmit("snapshot",e)},t.prototype.onPatch=function(e){return this._internalEventsRegister("patch",e)},t.prototype.emitPatch=function(e,t){if(this._internalEventsHasSubscribers("patch")){var n=y(function(e){if(!("oldValue"in e))throw st("Patches without `oldValue` field cannot be inversed");return[Rt(e),Dt(e)]}(function(e){for(var t=[],n=1;n=0&&this.middlewares.splice(t,1)}},t.prototype.addMiddleWare=function(e,t){var n=this;void 0===t&&(t=!0);var r={handler:e,includeHooks:t};return this.middlewares?this.middlewares.push(r):this.middlewares=[r],function(){n.removeMiddleware(r)}},t.prototype.applyPatchLocally=function(e,t){this.assertWritable({subpath:e}),this.createObservableInstanceIfNeeded(),this.type.applyPatchLocally(this,e,t)},t.prototype._addSnapshotReaction=function(){var e=this;if(!this._hasSnapshotReaction){var t=Object(i.reaction)((function(){return e.snapshot}),(function(t){return e.emitSnapshot(t)}),ue);this.addDisposer(t),this._hasSnapshotReaction=!0}},t.prototype._internalEventsHasSubscribers=function(e){return!!this._internalEvents&&this._internalEvents.hasSubscribers(e)},t.prototype._internalEventsRegister=function(e,t,n){return void 0===n&&(n=!1),this._internalEvents||(this._internalEvents=new wt),this._internalEvents.register(e,t,n)},t.prototype._internalEventsHas=function(e,t){return!!this._internalEvents&&this._internalEvents.has(e,t)},t.prototype._internalEventsUnregister=function(e,t){this._internalEvents&&this._internalEvents.unregister(e,t)},t.prototype._internalEventsEmit=function(e){for(var t,n=[],r=1;r0},enumerable:!1,configurable:!0}),e}();function me(e){var t=new WeakMap;return function(n,r){var o=n.parentActionEvent?t.get(n.parentActionEvent):void 0;if("action"===n.type){var i=p(p({},n),{env:o&&o.call.env,parentCall:o&&o.call}),a=!e.filter||e.filter(i),u=new ye(a?e:void 0,i);t.set(n,u);var l=void 0;try{l=r(n)}catch(e){throw u.finish(e),e}return u.hasFlowsPending||u.finish(),l}if(!o)return r(n);switch(n.type){case"flow_spawn":return o.incFlowsPending(),r(n);case"flow_resume":case"flow_resume_error":return r(n);case"flow_throw":var s=n.args[0];try{return r(n)}finally{o.decFlowsPending(),o.hasFlowsPending||o.finish(s)}case"flow_return":try{return r(n)}finally{o.decFlowsPending(),o.hasFlowsPending||o.finish()}}}}function be(e){return{$MST_UNSERIALIZABLE:!0,type:e}}function ge(e,t){Ye(e,1),Tt(t,(function(e){return"object"==typeof e}),"object or array",2),Object(i.runInAction)((function(){dt(t).forEach((function(t){return function(e,t){var n=H(e,t.path||"");if(!n)throw st("Invalid action path: "+(t.path||""));var r=Xe(n);if("@APPLY_PATCHES"===t.name)return x.call(null,n,t.args[0]);if("@APPLY_SNAPSHOT"===t.name)return k.call(null,n,t.args[0]);if("function"!=typeof n[t.name])throw st("Action '"+t.name+"' does not exist in '"+r.path+"'");return n[t.name].apply(n,t.args?t.args.map((function(e){return(t=e)&&"object"==typeof t&&"$MST_DATE"in t?new Date(t.$MST_DATE):t;var t})):[])}(e,t)}))}))}function we(e,t){Ye(e,1);var n,r=[],o=function(e){(!t||t(e,Ie()))&&r.push(e)},i={actions:r,get recording(){return!!n},stop:function(){n&&(n(),n=void 0)},resume:function(){n||(n=Se(e,o))},replay:function(e){ge(e,r)}};return i.resume(),i}function Se(e,t,n){return void 0===n&&(n=!1),Ye(e,1),Ce(e,(function(r,o){if("action"===r.type&&r.id===r.rootId){var i=Xe(r.context),a={name:r.name,path:tt(Xe(e),i),args:r.args.map((function(e,t){return function(e,t,n,r){if(r instanceof Date)return{$MST_DATE:r.getTime()};if(yt(r))return r;if(Qe(r))return be("[MSTNode: "+b(r).name+"]");if("function"==typeof r)return be("[function]");if("object"==typeof r&&!ht(r)&&!pt(r))return be("[object "+(r&&r.constructor&&r.constructor.name||"Complex Object")+"]");try{return JSON.stringify(r),r}catch(e){return be(""+e)}}(0,r.name,0,e)}))};if(n){var u=o(r);return t(a),u}return t(a),o(r)}return o(r)}))}var xe,_e=1;function Ee(){return xe}function Te(){return _e++}function Oe(e,t){var n=Xe(e.context);"action"===e.type&&n.assertAlive({actionContext:e});var r=n._isRunningAction;n._isRunningAction=!0;var a=xe;xe=e;try{return function(e,t,n){var r=new Ae(e,n);if(r.isEmpty)return Object(i.action)(n).apply(null,t.args);var a=null;return function e(t){var u=r.getNextMiddleware(),l=u&&u.handler;return l?!u.includeHooks&&o[t.name]?e(t):(l(t,(function(t,n){!0,a=e(t),n&&(a=n(a))}),(function(e){!0,a=e})),a):Object(i.action)(n).apply(null,t.args)}(t)}(n,e,t)}finally{xe=a,n._isRunningAction=r}}function ke(e){if(e)return"action"===e.type?e:e.parentActionEvent}function Pe(e,t,n){var r=function(){var r=Te(),o=xe,i=ke(o);return Oe({type:"action",name:t,id:r,args:St(arguments),context:e,tree:N(e),rootId:o?o.rootId:r,parentId:o?o.id:0,allParentIds:o?m(o.allParentIds,[o.id]):[],parentEvent:o,parentActionEvent:i},n)};return r._isMSTAction=!0,r}function Ce(e,t,n){void 0===n&&(n=!0);var r=Xe(e);return r.addMiddleWare(t,n)}function je(e,t,n){void 0===n&&(n=!0);var r={handler:e,includeHooks:n};return t.$mst_middleware=t.$mst_middleware||[],t.$mst_middleware.push(r),t}var Ae=function(){function e(e,t){this.arrayIndex=0,this.inArrayIndex=0,this.middlewares=[],t.$mst_middleware&&this.middlewares.push(t.$mst_middleware);for(var n=e;n;)n.middlewares&&this.middlewares.push(n.middlewares),n=n.parent}return Object.defineProperty(e.prototype,"isEmpty",{get:function(){return this.middlewares.length<=0},enumerable:!1,configurable:!0}),e.prototype.getNextMiddleware=function(){var e=this.middlewares[this.arrayIndex];if(e){var t=e[this.inArrayIndex++];return t||(this.arrayIndex++,this.inArrayIndex=0,this.getNextMiddleware())}},e}();function Ie(){for(var e=Ee();e&&"action"!==e.type;)e=e.parentActionEvent;return e}function Ne(e,t,n){for(var r="number"==typeof t?t:t.id,o=n?e:e.parentActionEvent;o;){if(o.id===r)return!0;o=o.parentActionEvent}return!1}function Re(e,t){return Ne(e,t,!1)}function De(e,t){return Ne(e,t,!0)}function Me(e){return"function"==typeof e?"":Qe(e)?"<"+e+">":"`"+function(e){try{return JSON.stringify(e)}catch(e){return""}}(e)+"`"}function Ve(e){var t=e.value,n=e.context[e.context.length-1].type,r=e.context.map((function(e){return e.path})).filter((function(e){return e.length>0})).join("/"),o=r.length>0?'at path "/'+r+'" ':"",i=Qe(t)?"value of type "+Xe(t).type.name+":":yt(t)?"value":"snapshot",a=n&&Qe(t)&&n.is(Xe(t).snapshot);return""+o+i+" "+Me(t)+" is not assignable "+(n?"to type: `"+n.name+"`":"")+(e.message?" ("+e.message+")":"")+(n?pn(n)||yt(t)?".":", expected an instance of `"+n.name+"` or a snapshot like `"+n.describe()+"` instead."+(a?" (Note that a snapshot of the provided value is compatible with the targeted type)":""):".")}function ze(e,t,n){return e.concat([{path:t,type:n}])}function Le(){return at}function Fe(e,t,n){return[{context:e,value:t,message:n}]}function Ue(e){return e.reduce((function(e,t){return e.concat(t)}),[])}function He(t,n){void 0!==e&&e.env&&"true"===e.env.ENABLE_TYPE_CHECK&&$e(t,n)}function $e(e,t){var n=e.validate(t,[{path:"",type:e}]);if(n.length>0)throw st(function(e,t,n){if(0===n.length)return;return"Error while converting "+(r=Me(t),(r.length<280?r:r.substring(0,272)+"......"+r.substring(r.length-8))+" to `")+e.name+"`:\n\n "+n.map(Ve).join("\n ");var r}(e,t,n))}var Be,We=0,Ke=function(){function e(){this.cacheId=We++,this.cache=i.observable.map(),this.lastCacheModificationPerId=i.observable.map()}return e.prototype.updateLastCacheModificationPerId=function(e){var t=this.lastCacheModificationPerId.get(e);this.lastCacheModificationPerId.set(e,void 0===t?1:t+1)},e.prototype.getLastCacheModificationPerId=function(e){var t=this.lastCacheModificationPerId.get(e)||0;return this.cacheId+"-"+t},e.prototype.addNodeToCache=function(e,t){if(void 0===t&&(t=!0),e.identifierAttribute){var n=e.identifier;this.cache.has(n)||this.cache.set(n,i.observable.array([],lt));var r=this.cache.get(n);if(-1!==r.indexOf(e))throw st("Already registered");r.push(e),t&&this.updateLastCacheModificationPerId(n)}},e.prototype.mergeCache=function(e){var t=this;Object(i.values)(e.identifierCache.cache).forEach((function(e){return e.forEach((function(e){t.addNodeToCache(e)}))}))},e.prototype.notifyDied=function(e){if(e.identifierAttribute){var t=e.identifier,n=this.cache.get(t);n&&(n.remove(e),n.length||this.cache.delete(t),this.updateLastCacheModificationPerId(e.identifier))}},e.prototype.splitCache=function(t){var n=this,r=new e,o=t.path;return Object(i.entries)(this.cache).forEach((function(e){for(var t=y(e,2),i=t[0],a=t[1],u=!1,l=a.length-1;l>=0;l--)0===a[l].path.indexOf(o)&&(r.addNodeToCache(a[l],!1),a.splice(l,1),u=!0);u&&n.updateLastCacheModificationPerId(i)})),r},e.prototype.has=function(e,t){var n=this.cache.get(t);return!!n&&n.some((function(t){return e.isAssignableFrom(t.type)}))},e.prototype.resolve=function(e,t){var n=this.cache.get(t);if(!n)return null;var r=n.filter((function(t){return e.isAssignableFrom(t.type)}));switch(r.length){case 0:return null;case 1:return r[0];default:throw st("Cannot resolve a reference to type '"+e.name+"' with id: '"+t+"' unambigously, there are multiple candidates: "+r.map((function(e){return e.path})).join(", "))}},e}();function qe(e,t,n,r,o){var i=Je(o);if(i){if(i.parent)throw st("Cannot add an object to a state tree if it is already part of the same or another state tree. Tried to assign an object to '"+(t?t.path:"")+"/"+n+"', but it lives already at '"+i.path+"'");return t&&i.setParent(t,n),i}return new le(e,t,n,r,o)}function Ge(e,t,n,r,o){return new ie(e,t,n,r,o)}function Qe(e){return!(!e||!e.$treenode)}function Ye(e,t){Tt(e,Qe,"mobx-state-tree node",t)}function Xe(e){if(!Qe(e))throw st("Value "+e+" is no MST Node");return e.$treenode}function Je(e){return e&&e.$treenode||null}function Ze(){return Xe(this).snapshot}!function(e){e[e.INITIALIZING=0]="INITIALIZING",e[e.CREATED=1]="CREATED",e[e.FINALIZED=2]="FINALIZED",e[e.DETACHING=3]="DETACHING",e[e.DEAD=4]="DEAD"}(Be||(Be={}));var et=function(e){return".."};function tt(e,t){if(e.root!==t.root)throw st("Cannot calculate relative path: objects '"+e+"' and '"+t+"' are not part of the same object tree");for(var n=Lt(e.path),r=Lt(t.path),o=0;o0},enumerable:!1,configurable:!0}),e.prototype.register=function(e,t){var n=this;return void 0===t&&(t=!1),t?this.handlers.unshift(e):this.handlers.push(e),function(){n.unregister(e)}},e.prototype.has=function(e){return this.handlers.indexOf(e)>=0},e.prototype.unregister=function(e){var t=this.handlers.indexOf(e);t>=0&&this.handlers.splice(t,1)},e.prototype.clear=function(){this.handlers.length=0},e.prototype.emit=function(){for(var e=[],t=0;t0?this.hookInitializers.concat(e):[e];return new t(this.name,this._subType,n)},t.prototype.instantiate=function(e,t,n,r){return this._determineIdentifierMode(),qe(this,e,t,n,r)},t.prototype._determineIdentifierMode=function(){if(this.identifierMode===Ut.UNKNOWN){var e=[];if(function e(t,n){var r,o,i=t.getSubTypes();if("cannotDetermine"===i)return!1;if(i){var a=dt(i);try{for(var u=v(a),l=u.next();!l.done;l=u.next()){if(!e(l.value,n))return!1}}catch(e){r={error:e}}finally{try{l&&!l.done&&(o=u.return)&&o.call(u)}finally{if(r)throw r.error}}}return t instanceof en&&n.push(t),!0}(this._subType,e)){var t=void 0;e.forEach((function(e){if(e.identifierAttribute){if(t&&t!==e.identifierAttribute)throw st("The objects in a map should all have the same identifier attribute, expected '"+t+"', but child of type '"+e.name+"' declared attribute '"+e.identifierAttribute+"' as identifier");t=e.identifierAttribute}})),t?(this.identifierMode=Ut.YES,this.mapIdentifierAttribute=t):this.identifierMode=Ut.NO}}},t.prototype.initializeChildNodes=function(e,t){void 0===t&&(t={});var n=e.type._subType,r={};return Object.keys(t).forEach((function(o){r[o]=n.instantiate(e,o,void 0,t[o])})),r},t.prototype.createNewInstance=function(e){return new $t(e)},t.prototype.finalizeNewInstance=function(e,t){Object(i._interceptReads)(t,e.unbox),e.type.hookInitializers.forEach((function(e){var n=e(t);Object.keys(n).forEach((function(e){var r=n[e],o=Pe(t,e,r);bt(t,e,o)}))})),Object(i.intercept)(t,this.willChange),Object(i.observe)(t,this.didChange)},t.prototype.describe=function(){return"Map"},t.prototype.getChildren=function(e){return Object(i.values)(e.storedValue)},t.prototype.getChildNode=function(e,t){var n=e.storedValue.get(""+t);if(!n)throw st("Not a child "+t);return n},t.prototype.willChange=function(e){var t=Xe(e.object),n=e.name;t.assertWritable({subpath:n});var r=t.type,o=r._subType;switch(e.type){case"update":var i=e.newValue;if(i===e.object.get(n))return null;He(o,i),e.newValue=o.reconcile(t.getChildNode(n),e.newValue,t,n),r.processIdentifier(n,e.newValue);break;case"add":He(o,e.newValue),e.newValue=o.instantiate(t,n,void 0,e.newValue),r.processIdentifier(n,e.newValue)}return e},t.prototype.processIdentifier=function(e,t){if(this.identifierMode===Ut.YES&&t instanceof le){var n=t.identifier;if(n!==e)throw st("A map of objects containing an identifier should always store the object under their own identifier. Trying to store key '"+n+"', but expected: '"+e+"'")}},t.prototype.getSnapshot=function(e){var t={};return e.getChildren().forEach((function(e){t[e.subpath]=e.snapshot})),t},t.prototype.processInitialSnapshot=function(e){var t={};return Object.keys(e).forEach((function(n){t[n]=e[n].getSnapshot()})),t},t.prototype.didChange=function(e){var t=Xe(e.object);switch(e.type){case"update":return void t.emitPatch({op:"replace",path:Mt(e.name),value:e.newValue.snapshot,oldValue:e.oldValue?e.oldValue.snapshot:void 0},t);case"add":return void t.emitPatch({op:"add",path:Mt(e.name),value:e.newValue.snapshot,oldValue:void 0},t);case"delete":var n=e.oldValue.snapshot;return e.oldValue.die(),void t.emitPatch({op:"remove",path:Mt(e.name),oldValue:n},t)}},t.prototype.applyPatchLocally=function(e,t,n){var r=e.storedValue;switch(n.op){case"add":case"replace":r.set(t,n.value);break;case"remove":r.delete(t)}},t.prototype.applySnapshot=function(e,t){He(this,t);var n=e.storedValue,r={};if(Array.from(n.keys()).forEach((function(e){r[e]=!1})),t)for(var o in t)n.set(o,t[o]),r[""+o]=!0;Object.keys(r).forEach((function(e){!1===r[e]&&n.delete(e)}))},t.prototype.getChildType=function(){return this._subType},t.prototype.isValidSnapshot=function(e,t){var n=this;return ht(e)?Ue(Object.keys(e).map((function(r){return n._subType.validate(e[r],ze(t,r,n._subType))}))):Fe(t,e,"Value is not a plain object")},t.prototype.getDefaultSnapshot=function(){return ut},t.prototype.removeChild=function(e,t){e.storedValue.delete(t)},d([i.action],t.prototype,"applySnapshot",null),t}(ce);function Wt(e){return pe(e)&&(e.flags&re.Map)>0}var Kt=function(e){function t(t,n,r){void 0===r&&(r=[]);var o=e.call(this,t)||this;return o._subType=n,o.flags=re.Array,o.hookInitializers=[],o.hookInitializers=r,o}return f(t,e),t.prototype.hooks=function(e){var n=this.hookInitializers.length>0?this.hookInitializers.concat(e):[e];return new t(this.name,this._subType,n)},t.prototype.instantiate=function(e,t,n,r){return qe(this,e,t,n,r)},t.prototype.initializeChildNodes=function(e,t){void 0===t&&(t=[]);var n=e.type._subType,r={};return t.forEach((function(t,o){var i=""+o;r[i]=n.instantiate(e,i,void 0,t)})),r},t.prototype.createNewInstance=function(e){return i.observable.array(ot(e),lt)},t.prototype.finalizeNewInstance=function(e,t){Object(i._getAdministration)(t).dehancer=e.unbox,e.type.hookInitializers.forEach((function(e){var n=e(t);Object.keys(n).forEach((function(e){var r=n[e],o=Pe(t,e,r);bt(t,e,o)}))})),Object(i.intercept)(t,this.willChange),Object(i.observe)(t,this.didChange)},t.prototype.describe=function(){return this._subType.describe()+"[]"},t.prototype.getChildren=function(e){return e.storedValue.slice()},t.prototype.getChildNode=function(e,t){var n=Number(t);if(n=0;n--)t.emitPatch({op:"remove",path:""+(e.index+n),oldValue:e.removed[n].snapshot},t);for(n=0;n0}function Xt(){return Xe(this).toString()}var Jt={name:"AnonymousModel",properties:{},initializers:at};function Zt(e){return Object.keys(e).reduce((function(e,t){var n,r,i;if(t in o)throw st("Hook '"+t+"' was defined as property. Hooks should be defined as part of the actions");var a=Object.getOwnPropertyDescriptor(e,t);if("get"in a)throw st("Getters are not supported as properties. Please use views instead");var u=a.value;if(null==u)throw st("The default value of an attribute cannot be null or undefined as the type cannot be inferred. Did you mean `types.maybe(someType)`?");if(yt(u))return Object.assign({},e,((n={})[t]=xn(function(e){switch(typeof e){case"string":return rn;case"number":return on;case"boolean":return un;case"object":if(e instanceof Date)return fn}throw st("Cannot determine primitive type from value "+e)}(u),u),n));if(u instanceof Bt)return Object.assign({},e,((r={})[t]=xn(u,{}),r));if(u instanceof Kt)return Object.assign({},e,((i={})[t]=xn(u,[]),i));if(pe(u))return e;throw st("Invalid type definition for property '"+t+"', cannot infer a type from a value like '"+u+"' ("+typeof u+")")}),e)}var en=function(e){function t(t){var n=e.call(this,t.name||Jt.name)||this;return n.flags=re.Object,n.named=function(e){return n.cloneAndEnhance({name:e})},n.props=function(e){return n.cloneAndEnhance({properties:e})},n.preProcessSnapshot=function(e){var t=n.preProcessor;return t?n.cloneAndEnhance({preProcessor:function(n){return t(e(n))}}):n.cloneAndEnhance({preProcessor:e})},n.postProcessSnapshot=function(e){var t=n.postProcessor;return t?n.cloneAndEnhance({postProcessor:function(n){return e(t(n))}}):n.cloneAndEnhance({postProcessor:e})},Object.assign(n,Jt,t),n.properties=Zt(n.properties),n.properties,n.propertyNames=Object.keys(n.properties),n.identifierAttribute=n._getIdentifierAttribute(),n}return f(t,e),t.prototype._getIdentifierAttribute=function(){var e=void 0;return this.forAllProps((function(t,n){if(n.flags&re.Identifier){if(e)throw st("Cannot define property '"+t+"' as object identifier, property '"+e+"' is already defined as identifier property");e=t}})),e},t.prototype.cloneAndEnhance=function(e){return new t({name:e.name||this.name,properties:Object.assign({},this.properties,e.properties),initializers:this.initializers.concat(e.initializers||[]),preProcessor:e.preProcessor||this.preProcessor,postProcessor:e.postProcessor||this.postProcessor})},t.prototype.actions=function(e){var t=this;return this.cloneAndEnhance({initializers:[function(n){return t.instantiateActions(n,e(n)),n}]})},t.prototype.instantiateActions=function(e,t){if(!ht(t))throw st("actions initializer should return a plain object containing actions");Object.keys(t).forEach((function(n){if("preProcessSnapshot"===n)throw st("Cannot define action 'preProcessSnapshot', it should be defined using 'type.preProcessSnapshot(fn)' instead");if("postProcessSnapshot"===n)throw st("Cannot define action 'postProcessSnapshot', it should be defined using 'type.postProcessSnapshot(fn)' instead");var r=t[n],i=e[n];if(n in o&&i){var a=r;r=function(){i.apply(null,arguments),a.apply(null,arguments)}}var u=r.$mst_middleware,l=r.bind(t);l.$mst_middleware=u;var s=Pe(e,n,l);t[n]=s,bt(e,n,s)}))},t.prototype.volatile=function(e){var t=this;if("function"!=typeof e)throw st("You passed an "+typeof e+" to volatile state as an argument, when function is expected");return this.cloneAndEnhance({initializers:[function(n){return t.instantiateVolatileState(n,e(n)),n}]})},t.prototype.instantiateVolatileState=function(e,t){if(!ht(t))throw st("volatile state initializer should return a plain object containing state");Object(i.set)(e,t)},t.prototype.extend=function(e){var t=this;return this.cloneAndEnhance({initializers:[function(n){var r=e(n),o=r.actions,i=r.views,a=r.state,u=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o0}var nn=function(e){function t(t,n,r,o){void 0===o&&(o=ct);var i=e.call(this,t)||this;return i.flags=n,i.checker=r,i.initializer=o,i.flags=n,i}return f(t,e),t.prototype.describe=function(){return this.name},t.prototype.instantiate=function(e,t,n,r){return Ge(this,e,t,n,r)},t.prototype.createNewInstance=function(e){return this.initializer(e)},t.prototype.isValidSnapshot=function(e,t){return yt(e)&&this.checker(e)?Le():Fe(t,e,"Value is not a "+("Date"===this.name?"Date or a unix milliseconds timestamp":this.name))},t}(fe),rn=new nn("string",re.String,(function(e){return"string"==typeof e})),on=new nn("number",re.Number,(function(e){return"number"==typeof e})),an=new nn("integer",re.Integer,(function(e){return ft(e)})),un=new nn("boolean",re.Boolean,(function(e){return"boolean"==typeof e})),ln=new nn("null",re.Null,(function(e){return null===e})),sn=new nn("undefined",re.Undefined,(function(e){return void 0===e})),cn=new nn("Date",re.Date,(function(e){return"number"==typeof e||e instanceof Date}),(function(e){return e instanceof Date?e:new Date(e)}));cn.getSnapshot=function(e){return e.storedValue.getTime()};var fn=cn;function pn(e){return pe(e)&&(e.flags&(re.String|re.Number|re.Integer|re.Boolean|re.Date))>0}var dn=function(e){function t(t){var n=e.call(this,JSON.stringify(t))||this;return n.flags=re.Literal,n.value=t,n}return f(t,e),t.prototype.instantiate=function(e,t,n,r){return Ge(this,e,t,n,r)},t.prototype.describe=function(){return JSON.stringify(this.value)},t.prototype.isValidSnapshot=function(e,t){return yt(e)&&e===this.value?Le():Fe(t,e,"Value is not a literal "+JSON.stringify(this.value))},t}(fe);function hn(e){return Tt(),new dn(e)}function vn(e){return pe(e)&&(e.flags&re.Literal)>0}var yn=function(e){function t(t,n,r,o){var i=e.call(this,t)||this;return i._subtype=n,i._predicate=r,i._message=o,i}return f(t,e),Object.defineProperty(t.prototype,"flags",{get:function(){return this._subtype.flags|re.Refinement},enumerable:!1,configurable:!0}),t.prototype.describe=function(){return this.name},t.prototype.instantiate=function(e,t,n,r){return this._subtype.instantiate(e,t,n,r)},t.prototype.isAssignableFrom=function(e){return this._subtype.isAssignableFrom(e)},t.prototype.isValidSnapshot=function(e,t){var n=this._subtype.validate(e,t);if(n.length>0)return n;var r=Qe(e)?Xe(e).snapshot:e;return this._predicate(r)?Le():Fe(t,e,this._message(e))},t.prototype.reconcile=function(e,t,n,r){return this._subtype.reconcile(e,t,n,r)},t.prototype.getSubTypes=function(){return this._subtype},t}(se);function mn(e){return(e.flags&re.Refinement)>0}var bn=function(e){function t(t,n,r){var o=e.call(this,t)||this;return o._types=n,o._eager=!0,r=p({eager:!0,dispatcher:void 0},r),o._dispatcher=r.dispatcher,r.eager||(o._eager=!1),o}return f(t,e),Object.defineProperty(t.prototype,"flags",{get:function(){var e=re.Union;return this._types.forEach((function(t){e|=t.flags})),e},enumerable:!1,configurable:!0}),t.prototype.isAssignableFrom=function(e){return this._types.some((function(t){return t.isAssignableFrom(e)}))},t.prototype.describe=function(){return"("+this._types.map((function(e){return e.describe()})).join(" | ")+")"},t.prototype.instantiate=function(e,t,n,r){var o=this.determineType(r,void 0);if(!o)throw st("No matching type for union "+this.describe());return o.instantiate(e,t,n,r)},t.prototype.reconcile=function(e,t,n,r){var o=this.determineType(t,e.type);if(!o)throw st("No matching type for union "+this.describe());return o.reconcile(e,t,n,r)},t.prototype.determineType=function(e,t){return this._dispatcher?this._dispatcher(e):t?t.is(e)?t:this._types.filter((function(e){return e!==t})).find((function(t){return t.is(e)})):this._types.find((function(t){return t.is(e)}))},t.prototype.isValidSnapshot=function(e,t){if(this._dispatcher)return this._dispatcher(e).validate(e,t);for(var n=[],r=0,o=0;o0}var Sn=function(e){function t(t,n,r){var o=e.call(this,t.name)||this;return o._subtype=t,o._defaultValue=n,o.optionalValues=r,o}return f(t,e),Object.defineProperty(t.prototype,"flags",{get:function(){return this._subtype.flags|re.Optional},enumerable:!1,configurable:!0}),t.prototype.describe=function(){return this._subtype.describe()+"?"},t.prototype.instantiate=function(e,t,n,r){if(this.optionalValues.indexOf(r)>=0){var o=this.getDefaultInstanceOrSnapshot();return this._subtype.instantiate(e,t,n,o)}return this._subtype.instantiate(e,t,n,r)},t.prototype.reconcile=function(e,t,n,r){return this._subtype.reconcile(e,this.optionalValues.indexOf(t)<0&&this._subtype.is(t)?t:this.getDefaultInstanceOrSnapshot(),n,r)},t.prototype.getDefaultInstanceOrSnapshot=function(){var e="function"==typeof this._defaultValue?this._defaultValue():this._defaultValue;return"function"==typeof this._defaultValue&&He(this,e),e},t.prototype.isValidSnapshot=function(e,t){return this.optionalValues.indexOf(e)>=0?Le():this._subtype.validate(e,t)},t.prototype.isAssignableFrom=function(e){return this._subtype.isAssignableFrom(e)},t.prototype.getSubTypes=function(){return this._subtype},t}(se);function xn(e,t,n){return function(e,t){if("function"!=typeof t&&Qe(t))throw st("default value cannot be an instance, pass a snapshot or a function that creates an instance/snapshot instead");de(e,1)}(e,t),new Sn(e,t,n||_n)}var _n=[void 0];function En(e){return pe(e)&&(e.flags&re.Optional)>0}var Tn=xn(sn,void 0),On=xn(ln,null);function kn(e){return de(e,1),gn(e,Tn)}var Pn=function(e){function t(t,n){var r=e.call(this,t)||this;return r._definition=n,r}return f(t,e),Object.defineProperty(t.prototype,"flags",{get:function(){return(this._subType?this._subType.flags:0)|re.Late},enumerable:!1,configurable:!0}),t.prototype.getSubType=function(e){if(!this._subType){var t=void 0;try{t=this._definition()}catch(e){if(!(e instanceof ReferenceError))throw e;t=void 0}if(e&&void 0===t)throw st("Late type seems to be used too early, the definition (still) returns undefined");t&&(this._subType=t)}return this._subType},t.prototype.instantiate=function(e,t,n,r){return this.getSubType(!0).instantiate(e,t,n,r)},t.prototype.reconcile=function(e,t,n,r){return this.getSubType(!0).reconcile(e,t,n,r)},t.prototype.describe=function(){var e=this.getSubType(!1);return e?e.name:""},t.prototype.isValidSnapshot=function(e,t){var n=this.getSubType(!1);return n?n.validate(e,t):Le()},t.prototype.isAssignableFrom=function(e){var t=this.getSubType(!1);return!!t&&t.isAssignableFrom(e)},t.prototype.getSubTypes=function(){var e=this.getSubType(!1);return e||"cannotDetermine"},t}(se);function Cn(e){return pe(e)&&(e.flags&re.Late)>0}var jn=function(e){function t(t){var n=e.call(this,t?"frozen("+t.name+")":"frozen")||this;return n.subType=t,n.flags=re.Frozen,n}return f(t,e),t.prototype.describe=function(){return""},t.prototype.instantiate=function(e,t,n,r){return Ge(this,e,t,n,r)},t.prototype.isValidSnapshot=function(e,t){return function(e){return"function"!=typeof e}(e)?this.subType?this.subType.validate(e,t):Le():Fe(t,e,"Value is not serializable and cannot be frozen")},t}(fe),An=new jn;function In(e){return pe(e)&&(e.flags&re.Frozen)>0}var Nn=function(){function e(e,t){if(this.targetType=t,qn(e))this.identifier=e;else{if(!Qe(e))throw st("Can only store references to tree nodes or identifiers, got: '"+e+"'");var n=Xe(e);if(!n.identifierAttribute)throw st("Can only store references with a defined identifier attribute.");var r=n.unnormalizedIdentifier;if(null==r)throw st("Can only store references to tree nodes with a defined identifier.");this.identifier=r}}return e.prototype.updateResolvedReference=function(e){var t=Kn(this.identifier),n=e.root,r=n.identifierCache.getLastCacheModificationPerId(t);if(!this.resolvedReference||this.resolvedReference.lastCacheModification!==r){var o=this.targetType,i=n.identifierCache.resolve(o,t);if(!i)throw new Rn("[mobx-state-tree] Failed to resolve reference '"+this.identifier+"' to type '"+this.targetType.name+"' (from node: "+e.path+")");this.resolvedReference={node:i,lastCacheModification:r}}},Object.defineProperty(e.prototype,"resolvedValue",{get:function(){return this.updateResolvedReference(this.node),this.resolvedReference.node.value},enumerable:!1,configurable:!0}),e}(),Rn=function(e){function t(n){var r=e.call(this,n)||this;return Object.setPrototypeOf(r,t.prototype),r}return f(t,e),t}(Error),Dn=function(e){function t(t,n){var r=e.call(this,"reference("+t.name+")")||this;return r.targetType=t,r.onInvalidated=n,r.flags=re.Reference,r}return f(t,e),t.prototype.describe=function(){return this.name},t.prototype.isAssignableFrom=function(e){return this.targetType.isAssignableFrom(e)},t.prototype.isValidSnapshot=function(e,t){return qn(e)?Le():Fe(t,e,"Value is not a valid identifier, which is a string or a number")},t.prototype.fireInvalidated=function(e,t,n,r){var o=t.parent;if(o&&o.isAlive){var i=o.storedValue;i&&this.onInvalidated({cause:e,parent:i,invalidTarget:r?r.storedValue:void 0,invalidId:n,replaceRef:function(e){x(t.root.storedValue,{op:"replace",value:e,path:t.path})},removeRef:function(){tn(o.type)?this.replaceRef(void 0):x(t.root.storedValue,{op:"remove",path:t.path})}})}},t.prototype.addTargetNodeWatcher=function(e,t){var n=this,r=this.getValue(e);if(r){var i=Xe(r),a=function(r,a){var u=function(e){switch(e){case o.beforeDestroy:return"destroy";case o.beforeDetach:return"detach";default:return}}(a);u&&n.fireInvalidated(u,e,t,i)},u=i.registerHook(o.beforeDetach,a),l=i.registerHook(o.beforeDestroy,a);return function(){u(),l()}}},t.prototype.watchTargetNodeForInvalidations=function(e,t,n){var r=this;if(this.onInvalidated){var i;e.registerHook(o.beforeDestroy,(function(){i&&i()}));var a=function(o){i&&i();var a=e.parent,u=a&&a.storedValue;if(a&&a.isAlive&&u){(n?!!n.get(t,u):e.root.identifierCache.has(r.targetType,Kn(t)))?i=r.addTargetNodeWatcher(e,t):o||r.fireInvalidated("invalidSnapshotReference",e,t,null)}};e.state===Be.FINALIZED?a(!0):(e.isRoot||e.root.registerHook(o.afterCreationFinalization,(function(){e.parent&&e.parent.createObservableInstanceIfNeeded()})),e.registerHook(o.afterAttach,(function(){a(!1)})))}},t}(fe),Mn=function(e){function t(t,n){return e.call(this,t,n)||this}return f(t,e),t.prototype.getValue=function(e){if(e.isAlive)return e.storedValue.resolvedValue},t.prototype.getSnapshot=function(e){return e.storedValue.identifier},t.prototype.instantiate=function(e,t,n,r){var o=Qe(r)?L(r):r,i=new Nn(r,this.targetType),a=Ge(this,e,t,n,i);return i.node=a,this.watchTargetNodeForInvalidations(a,o,void 0),a},t.prototype.reconcile=function(e,t,n,r){if(!e.isDetaching&&e.type===this){var o=Qe(t),i=e.storedValue;if(!o&&i.identifier===t||o&&i.resolvedValue===t)return e.setParent(n,r),e}var a=this.instantiate(n,r,void 0,t);return e.die(),a},t}(Dn),Vn=function(e){function t(t,n,r){var o=e.call(this,t,r)||this;return o.options=n,o}return f(t,e),t.prototype.getValue=function(e){if(e.isAlive)return this.options.get(e.storedValue,e.parent?e.parent.storedValue:null)},t.prototype.getSnapshot=function(e){return e.storedValue},t.prototype.instantiate=function(e,t,n,r){var o=Qe(r)?this.options.set(r,e?e.storedValue:null):r,i=Ge(this,e,t,n,o);return this.watchTargetNodeForInvalidations(i,o,this.options),i},t.prototype.reconcile=function(e,t,n,r){var o=Qe(t)?this.options.set(t,e?e.storedValue:null):t;if(!e.isDetaching&&e.type===this&&e.storedValue===o)return e.setParent(n,r),e;var i=this.instantiate(n,r,void 0,o);return e.die(),i},t}(Dn);function zn(e,t){de(e,1);var n=t||void 0,r=t?t.onInvalidated:void 0;return n&&(n.get||n.set)?new Vn(e,{get:n.get,set:n.set},r):new Mn(e,r)}function Ln(e){return(e.flags&re.Reference)>0}var Fn=function(e){function t(t,n){var r=e.call(this,t)||this;return r.validType=n,r.flags=re.Identifier,r}return f(t,e),t.prototype.instantiate=function(e,t,n,r){if(!(e&&e.type instanceof en))throw st("Identifier types can only be instantiated as direct child of a model type");return Ge(this,e,t,n,r)},t.prototype.reconcile=function(e,t,n,r){if(e.storedValue!==t)throw st("Tried to change identifier from '"+e.storedValue+"' to '"+t+"'. Changing identifiers is not allowed.");return e.setParent(n,r),e},t.prototype.isValidSnapshot=function(e,t){return typeof e!==this.validType?Fe(t,e,"Value is not a valid "+this.describe()+", expected a "+this.validType):Le()},t}(fe),Un=function(e){function t(){var t=e.call(this,"identifier","string")||this;return t.flags=re.Identifier,t}return f(t,e),t.prototype.describe=function(){return"identifier"},t}(Fn),Hn=function(e){function t(){return e.call(this,"identifierNumber","number")||this}return f(t,e),t.prototype.getSnapshot=function(e){return e.storedValue},t.prototype.describe=function(){return"identifierNumber"},t}(Fn),$n=new Un,Bn=new Hn;function Wn(e){return pe(e)&&(e.flags&re.Identifier)>0}function Kn(e){return""+e}function qn(e){return"string"==typeof e||"number"==typeof e}var Gn=function(e){function t(t){var n=e.call(this,t.name)||this;return n.options=t,n.flags=re.Custom,n}return f(t,e),t.prototype.describe=function(){return this.name},t.prototype.isValidSnapshot=function(e,t){if(this.options.isTargetType(e))return Le();var n=this.options.getValidationMessage(e);return n?Fe(t,e,"Invalid value for type '"+this.name+"': "+n):Le()},t.prototype.getSnapshot=function(e){return this.options.toSnapshot(e.storedValue)},t.prototype.instantiate=function(e,t,n,r){return Ge(this,e,t,n,this.options.isTargetType(r)?r:this.options.fromSnapshot(r,e&&e.root.environment))},t.prototype.reconcile=function(e,t,n,r){var o=!this.options.isTargetType(t);if(!e.isDetaching&&(e.type===this&&(o?t===e.snapshot:t===e.storedValue)))return e.setParent(n,r),e;var i=o?this.options.fromSnapshot(t,n.root.environment):t,a=this.instantiate(n,r,void 0,i);return e.die(),a},t}(fe),Qn={enumeration:function(e,t){var n="string"==typeof e?t:e,r=gn.apply(void 0,m(n.map((function(e){return hn(""+e)}))));return"string"==typeof e&&(r.name=e),r},model:function(){for(var e=[],t=0;t",e)},array:function(e){return de(e,1),new Kt(e.name+"[]",e)},frozen:function(e){return 0===arguments.length?An:pe(e)?new jn(e):xn(An,e)},identifier:$n,identifierNumber:Bn,late:function(e,t){var n="string"==typeof e?e:"late("+e.toString()+")",r="string"==typeof e?t:e;return new Pn(n,r)},undefined:sn,null:ln,snapshotProcessor:function(e,t,n){return de(e,1),new Ft(e,t,n)}}}.call(this,n("./node_modules/process/browser.js"),n("./node_modules/timers-browserify/main.js").setImmediate)},"./node_modules/mobx/lib/mobx.module.js":function(e,t,n){"use strict";n.r(t),function(e,r){n.d(t,"$mobx",(function(){return x})),n.d(t,"FlowCancellationError",(function(){return Ot})),n.d(t,"IDerivationState",(function(){return Z})),n.d(t,"ObservableMap",(function(){return Sn})),n.d(t,"ObservableSet",(function(){return En})),n.d(t,"Reaction",(function(){return Ge})),n.d(t,"_allowStateChanges",(function(){return Ee})),n.d(t,"_allowStateChangesInsideComputed",(function(){return ke})),n.d(t,"_allowStateReadsEnd",(function(){return ve})),n.d(t,"_allowStateReadsStart",(function(){return he})),n.d(t,"_endAction",(function(){return _e})),n.d(t,"_getAdministration",(function(){return Rn})),n.d(t,"_getGlobalState",(function(){return Le})),n.d(t,"_interceptReads",(function(){return jt})),n.d(t,"_isComputingDerivation",(function(){return ue})),n.d(t,"_resetGlobalState",(function(){return Fe})),n.d(t,"_startAction",(function(){return xe})),n.d(t,"action",(function(){return it})),n.d(t,"autorun",(function(){return st})),n.d(t,"comparer",(function(){return O})),n.d(t,"computed",(function(){return re})),n.d(t,"configure",(function(){return yt})),n.d(t,"createAtom",(function(){return T})),n.d(t,"decorate",(function(){return mt})),n.d(t,"entries",(function(){return Ft})),n.d(t,"extendObservable",(function(){return bt})),n.d(t,"flow",(function(){return Pt})),n.d(t,"get",(function(){return Bt})),n.d(t,"getAtom",(function(){return Nn})),n.d(t,"getDebugName",(function(){return Dn})),n.d(t,"getDependencyTree",(function(){return St})),n.d(t,"getObserverTree",(function(){return _t})),n.d(t,"has",(function(){return $t})),n.d(t,"intercept",(function(){return At})),n.d(t,"isAction",(function(){return ut})),n.d(t,"isArrayLike",(function(){return v})),n.d(t,"isBoxedObservable",(function(){return Ce})),n.d(t,"isComputed",(function(){return Nt})),n.d(t,"isComputedProp",(function(){return Rt})),n.d(t,"isFlowCancellationError",(function(){return kt})),n.d(t,"isObservable",(function(){return Mt})),n.d(t,"isObservableArray",(function(){return bn})),n.d(t,"isObservableMap",(function(){return xn})),n.d(t,"isObservableObject",(function(){return In})),n.d(t,"isObservableProp",(function(){return Vt})),n.d(t,"isObservableSet",(function(){return Tn})),n.d(t,"keys",(function(){return zt})),n.d(t,"observable",(function(){return X})),n.d(t,"observe",(function(){return Wt})),n.d(t,"onBecomeObserved",(function(){return dt})),n.d(t,"onBecomeUnobserved",(function(){return ht})),n.d(t,"onReactionError",(function(){return Qe})),n.d(t,"reaction",(function(){return pt})),n.d(t,"remove",(function(){return Ht})),n.d(t,"runInAction",(function(){return at})),n.d(t,"set",(function(){return Ut})),n.d(t,"spy",(function(){return tt})),n.d(t,"toJS",(function(){return Gt})),n.d(t,"trace",(function(){return Qt})),n.d(t,"transaction",(function(){return Xt})),n.d(t,"untracked",(function(){return fe})),n.d(t,"values",(function(){return Lt})),n.d(t,"when",(function(){return Jt}));var o=[];Object.freeze(o);var i={};function a(){return++ze.mobxGuid}function u(e){throw l(!1,e),"X"}function l(e,t){if(!e)throw new Error("[mobx] "+(t||"An invariant failed, however the error is obfuscated because this is a production build."))}Object.freeze(i);function s(e){var t=!1;return function(){if(!t)return t=!0,e.apply(this,arguments)}}var c=function(){};function f(e){return null!==e&&"object"==typeof e}function p(e){if(null===e||"object"!=typeof e)return!1;var t=Object.getPrototypeOf(e);return t===Object.prototype||null===t}function d(e,t,n){Object.defineProperty(e,t,{enumerable:!1,writable:!0,configurable:!0,value:n})}function h(e,t){var n="isMobX"+e;return t.prototype[n]=!0,function(e){return f(e)&&!0===e[n]}}function v(e){return Array.isArray(e)||bn(e)}function y(e){return e instanceof Map}function m(e){return e instanceof Set}function b(e){var t=new Set;for(var n in e)t.add(n);return Object.getOwnPropertySymbols(e).forEach((function(n){Object.getOwnPropertyDescriptor(e,n).enumerable&&t.add(n)})),Array.from(t)}function g(e){return e&&e.toString?e.toString():new String(e).toString()}function w(e){return null===e?null:"object"==typeof e?""+e:e}var S="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,x=Symbol("mobx administration"),_=function(){function e(e){void 0===e&&(e="Atom@"+a()),this.name=e,this.isPendingUnobservation=!1,this.isBeingObserved=!1,this.observers=new Set,this.diffValue=0,this.lastAccessedBy=0,this.lowestObserverState=Z.NOT_TRACKING}return e.prototype.onBecomeObserved=function(){this.onBecomeObservedListeners&&this.onBecomeObservedListeners.forEach((function(e){return e()}))},e.prototype.onBecomeUnobserved=function(){this.onBecomeUnobservedListeners&&this.onBecomeUnobservedListeners.forEach((function(e){return e()}))},e.prototype.reportObserved=function(){return Ke(this)},e.prototype.reportChanged=function(){Be(),function(e){if(e.lowestObserverState===Z.STALE)return;e.lowestObserverState=Z.STALE,e.observers.forEach((function(t){t.dependenciesState===Z.UP_TO_DATE&&(t.isTracing!==ee.NONE&&qe(t,e),t.onBecomeStale()),t.dependenciesState=Z.STALE}))}(this),We()},e.prototype.toString=function(){return this.name},e}(),E=h("Atom",_);function T(e,t,n){void 0===t&&(t=c),void 0===n&&(n=c);var r=new _(e);return t!==c&&dt(r,t),n!==c&&ht(r,n),r}var O={identity:function(e,t){return e===t},structural:function(e,t){return Vn(e,t)},default:function(e,t){return Object.is(e,t)},shallow:function(e,t){return Vn(e,t,1)}},k=function(e,t){return(k=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])})(e,t)};var P=function(){return(P=Object.assign||function(e){for(var t,n=1,r=arguments.length;n=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}}function j(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function A(){for(var e=[],t=0;t2&&J("box");var n=B(t);return new Pe(e,Q(n),n.name,!0,n.equals)},array:function(e,t){arguments.length>2&&J("array");var n=B(t);return dn(e,Q(n),n.name)},map:function(e,t){arguments.length>2&&J("map");var n=B(t);return new Sn(e,Q(n),n.name)},set:function(e,t){arguments.length>2&&J("set");var n=B(t);return new En(e,Q(n),n.name)},object:function(e,t,n){"string"==typeof arguments[1]&&J("object");var r=B(n);if(!1===r.proxy)return bt({},e,t,r);var o=gt(r),i=bt({},void 0,void 0,r),a=on(i);return wt(a,e,t,o),a},ref:q,shallow:K,deep:W,struct:G},X=function(e,t,n){if("string"==typeof arguments[1]||"symbol"==typeof arguments[1])return W.apply(null,arguments);if(Mt(e))return e;var r=p(e)?X.object(e,t,n):Array.isArray(e)?X.array(e,t):y(e)?X.map(e,t):m(e)?X.set(e,t):e;if(r!==e)return r;u(!1)};function J(e){u("Expected one or two arguments to observable."+e+". Did you accidentally try to use observable."+e+" as decorator?")}Object.keys(Y).forEach((function(e){return X[e]=Y[e]}));var Z,ee,te=z(!1,(function(e,t,n,r,o){var i=n.get,a=n.set,u=o[0]||{};kn(e).addComputedProp(e,t,P({get:i,set:a,context:e},u))})),ne=te({equals:O.structural}),re=function(e,t,n){if("string"==typeof t)return te.apply(null,arguments);if(null!==e&&"object"==typeof e&&1===arguments.length)return te.apply(null,arguments);var r="object"==typeof t?t:{};return r.get=e,r.set="function"==typeof t?t:r.set,r.name=r.name||e.name||"",new je(r)};re.struct=ne,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"}(Z||(Z={})),function(e){e[e.NONE=0]="NONE",e[e.LOG=1]="LOG",e[e.BREAK=2]="BREAK"}(ee||(ee={}));var oe=function(e){this.cause=e};function ie(e){return e instanceof oe}function ae(e){switch(e.dependenciesState){case Z.UP_TO_DATE:return!1;case Z.NOT_TRACKING:case Z.STALE:return!0;case Z.POSSIBLY_STALE:for(var t=he(!0),n=pe(),r=e.observing,o=r.length,i=0;i0;ze.computationDepth>0&&t&&u(!1),ze.allowStateChanges||!t&&"strict"!==ze.enforceActions||u(!1)}function se(e,t,n){var r=he(!0);ye(e),e.newObserving=new Array(e.observing.length+100),e.unboundDepsCount=0,e.runId=++ze.runId;var o,i=ze.trackingDerivation;if(ze.trackingDerivation=e,!0===ze.disableErrorBoundaries)o=t.call(n);else try{o=t.call(n)}catch(e){o=new oe(e)}return ze.trackingDerivation=i,function(e){for(var t=e.observing,n=e.observing=e.newObserving,r=Z.UP_TO_DATE,o=0,i=e.unboundDepsCount,a=0;ar&&(r=u.dependenciesState)}n.length=o,e.newObserving=null,i=t.length;for(;i--;){0===(u=t[i]).diffValue&&He(u,e),u.diffValue=0}for(;o--;){var u;1===(u=n[o]).diffValue&&(u.diffValue=0,Ue(u,e))}r!==Z.UP_TO_DATE&&(e.dependenciesState=r,e.onBecomeStale())}(e),ve(r),o}function ce(e){var t=e.observing;e.observing=[];for(var n=t.length;n--;)He(t[n],e);e.dependenciesState=Z.NOT_TRACKING}function fe(e){var t=pe();try{return e()}finally{de(t)}}function pe(){var e=ze.trackingDerivation;return ze.trackingDerivation=null,e}function de(e){ze.trackingDerivation=e}function he(e){var t=ze.allowStateReads;return ze.allowStateReads=e,t}function ve(e){ze.allowStateReads=e}function ye(e){if(e.dependenciesState!==Z.UP_TO_DATE){e.dependenciesState=Z.UP_TO_DATE;for(var t=e.observing,n=t.length;n--;)t[n].lowestObserverState=Z.UP_TO_DATE}}var me=0,be=1,ge=Object.getOwnPropertyDescriptor((function(){}),"name");ge&&ge.configurable;function we(e,t,n){var r=function(){return Se(e,t,n||this,arguments)};return r.isMobxAction=!0,r}function Se(e,t,n,r){var o=xe(e,n,r);try{return t.apply(n,r)}catch(e){throw o.error=e,e}finally{_e(o)}}function xe(e,t,n){var r=0,o=pe();Be();var i={prevDerivation:o,prevAllowStateChanges:Te(!0),prevAllowStateReads:he(!0),notifySpy:!1,startTime:r,actionId:be++,parentActionId:me};return me=i.actionId,i}function _e(e){me!==e.actionId&&u("invalid action stack. did you forget to finish an action?"),me=e.parentActionId,void 0!==e.error&&(ze.suppressReactionErrors=!0),Oe(e.prevAllowStateChanges),ve(e.prevAllowStateReads),We(),de(e.prevDerivation),e.notifySpy,ze.suppressReactionErrors=!1}function Ee(e,t){var n,r=Te(e);try{n=t()}finally{Oe(r)}return n}function Te(e){var t=ze.allowStateChanges;return ze.allowStateChanges=e,t}function Oe(e){ze.allowStateChanges=e}function ke(e){var t,n=ze.computationDepth;ze.computationDepth=0;try{t=e()}finally{ze.computationDepth=n}return t}var Pe=function(e){function t(t,n,r,o,i){void 0===r&&(r="ObservableValue@"+a()),void 0===o&&(o=!0),void 0===i&&(i=O.default);var u=e.call(this,r)||this;return u.enhancer=n,u.name=r,u.equals=i,u.hasUnreportedChange=!1,u.value=n(t,void 0,r),u}return function(e,t){function n(){this.constructor=e}k(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}(t,e),t.prototype.dehanceValue=function(e){return void 0!==this.dehancer?this.dehancer(e):e},t.prototype.set=function(e){this.value;if((e=this.prepareNewValue(e))!==ze.UNCHANGED){0,this.setNewValue(e)}},t.prototype.prepareNewValue=function(e){if(le(this),an(this)){var t=ln(this,{object:this,type:"update",newValue:e});if(!t)return ze.UNCHANGED;e=t.newValue}return e=this.enhancer(e,this.value,this.name),this.equals(this.value,e)?ze.UNCHANGED:e},t.prototype.setNewValue=function(e){var t=this.value;this.value=e,this.reportChanged(),sn(this)&&fn(this,{type:"update",object:this,newValue:e,oldValue:t})},t.prototype.get=function(){return this.reportObserved(),this.dehanceValue(this.value)},t.prototype.intercept=function(e){return un(this,e)},t.prototype.observe=function(e,t){return t&&e({object:this,type:"update",newValue:this.value,oldValue:void 0}),cn(this,e)},t.prototype.toJSON=function(){return this.get()},t.prototype.toString=function(){return this.name+"["+this.value+"]"},t.prototype.valueOf=function(){return w(this.get())},t.prototype[Symbol.toPrimitive]=function(){return this.valueOf()},t}(_),Ce=h("ObservableValue",Pe),je=function(){function e(e){this.dependenciesState=Z.NOT_TRACKING,this.observing=[],this.newObserving=null,this.isBeingObserved=!1,this.isPendingUnobservation=!1,this.observers=new Set,this.diffValue=0,this.runId=0,this.lastAccessedBy=0,this.lowestObserverState=Z.UP_TO_DATE,this.unboundDepsCount=0,this.__mapid="#"+a(),this.value=new oe(null),this.isComputing=!1,this.isRunningSetter=!1,this.isTracing=ee.NONE,l(e.get,"missing option for computed: get"),this.derivation=e.get,this.name=e.name||"ComputedValue@"+a(),e.set&&(this.setter=we(this.name+"-setter",e.set)),this.equals=e.equals||(e.compareStructural||e.struct?O.structural:O.default),this.scope=e.context,this.requiresReaction=!!e.requiresReaction,this.keepAlive=!!e.keepAlive}return e.prototype.onBecomeStale=function(){!function(e){if(e.lowestObserverState!==Z.UP_TO_DATE)return;e.lowestObserverState=Z.POSSIBLY_STALE,e.observers.forEach((function(t){t.dependenciesState===Z.UP_TO_DATE&&(t.dependenciesState=Z.POSSIBLY_STALE,t.isTracing!==ee.NONE&&qe(t,e),t.onBecomeStale())}))}(this)},e.prototype.onBecomeObserved=function(){this.onBecomeObservedListeners&&this.onBecomeObservedListeners.forEach((function(e){return e()}))},e.prototype.onBecomeUnobserved=function(){this.onBecomeUnobservedListeners&&this.onBecomeUnobservedListeners.forEach((function(e){return e()}))},e.prototype.get=function(){this.isComputing&&u("Cycle detected in computation "+this.name+": "+this.derivation),0!==ze.inBatch||0!==this.observers.size||this.keepAlive?(Ke(this),ae(this)&&this.trackAndCompute()&&function(e){if(e.lowestObserverState===Z.STALE)return;e.lowestObserverState=Z.STALE,e.observers.forEach((function(t){t.dependenciesState===Z.POSSIBLY_STALE?t.dependenciesState=Z.STALE:t.dependenciesState===Z.UP_TO_DATE&&(e.lowestObserverState=Z.UP_TO_DATE)}))}(this)):ae(this)&&(this.warnAboutUntrackedRead(),Be(),this.value=this.computeValue(!1),We());var e=this.value;if(ie(e))throw e.cause;return e},e.prototype.peek=function(){var e=this.computeValue(!1);if(ie(e))throw e.cause;return e},e.prototype.set=function(e){if(this.setter){l(!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 l(!1,!1)},e.prototype.trackAndCompute=function(){var e=this.value,t=this.dependenciesState===Z.NOT_TRACKING,n=this.computeValue(!0),r=t||ie(e)||ie(n)||!this.equals(e,n);return r&&(this.value=n),r},e.prototype.computeValue=function(e){var t;if(this.isComputing=!0,ze.computationDepth++,e)t=se(this,this.derivation,this.scope);else if(!0===ze.disableErrorBoundaries)t=this.derivation.call(this.scope);else try{t=this.derivation.call(this.scope)}catch(e){t=new oe(e)}return ze.computationDepth--,this.isComputing=!1,t},e.prototype.suspend=function(){this.keepAlive||(ce(this),this.value=void 0)},e.prototype.observe=function(e,t){var n=this,r=!0,o=void 0;return st((function(){var i=n.get();if(!r||t){var a=pe();e({type:"update",object:n,newValue:i,oldValue:o}),de(a)}r=!1,o=i}))},e.prototype.warnAboutUntrackedRead=function(){},e.prototype.toJSON=function(){return this.get()},e.prototype.toString=function(){return this.name+"["+this.derivation.toString()+"]"},e.prototype.valueOf=function(){return w(this.get())},e.prototype[Symbol.toPrimitive]=function(){return this.valueOf()},e}(),Ae=h("ComputedValue",je),Ie=["mobxGuid","spyListeners","enforceActions","computedRequiresReaction","reactionRequiresObservable","observableRequiresReaction","allowStateReads","disableErrorBoundaries","runId","UNCHANGED"],Ne=function(){this.version=5,this.UNCHANGED={},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.allowStateReads=!0,this.enforceActions=!1,this.spyListeners=[],this.globalReactionErrorHandlers=[],this.computedRequiresReaction=!1,this.reactionRequiresObservable=!1,this.observableRequiresReaction=!1,this.computedConfigurable=!1,this.disableErrorBoundaries=!1,this.suppressReactionErrors=!1},Re={};function De(){return"undefined"!=typeof window?window:void 0!==r?r:"undefined"!=typeof self?self:Re}var Me=!0,Ve=!1,ze=function(){var e=De();return e.__mobxInstanceCount>0&&!e.__mobxGlobals&&(Me=!1),e.__mobxGlobals&&e.__mobxGlobals.version!==(new Ne).version&&(Me=!1),Me?e.__mobxGlobals?(e.__mobxInstanceCount+=1,e.__mobxGlobals.UNCHANGED||(e.__mobxGlobals.UNCHANGED={}),e.__mobxGlobals):(e.__mobxInstanceCount=1,e.__mobxGlobals=new Ne):(setTimeout((function(){Ve||u("There are multiple, different versions of MobX active. Make sure MobX is loaded only once or use `configure({ isolateGlobalState: true })`")}),1),new Ne)}();function Le(){return ze}function Fe(){var e=new Ne;for(var t in e)-1===Ie.indexOf(t)&&(ze[t]=e[t]);ze.allowStateChanges=!ze.enforceActions}function Ue(e,t){e.observers.add(t),e.lowestObserverState>t.dependenciesState&&(e.lowestObserverState=t.dependenciesState)}function He(e,t){e.observers.delete(t),0===e.observers.size&&$e(e)}function $e(e){!1===e.isPendingUnobservation&&(e.isPendingUnobservation=!0,ze.pendingUnobservations.push(e))}function Be(){ze.inBatch++}function We(){if(0==--ze.inBatch){Xe();for(var e=ze.pendingUnobservations,t=0;t0&&$e(e),!1)}function qe(e,t){if(console.log("[mobx.trace] '"+e.name+"' is invalidated due to a change in: '"+t.name+"'"),e.isTracing===ee.BREAK){var n=[];!function e(t,n,r){if(n.length>=1e3)return void n.push("(and many more)");n.push(""+new Array(r).join("\t")+t.name),t.dependencies&&t.dependencies.forEach((function(t){return e(t,n,r+1)}))}(St(e),n,1),new Function("debugger;\n/*\nTracing '"+e.name+"'\n\nYou are entering this break point because derivation '"+e.name+"' is being traced and '"+t.name+"' is now forcing it to update.\nJust follow the stacktrace you should now see in the devtools to see precisely what piece of your code is causing this update\nThe stackframe you are looking for is at least ~6-8 stack-frames up.\n\n"+(e instanceof je?e.derivation.toString().replace(/[*]\//g,"/"):"")+"\n\nThe dependencies for this derivation are:\n\n"+n.join("\n")+"\n*/\n ")()}}var Ge=function(){function e(e,t,n,r){void 0===e&&(e="Reaction@"+a()),void 0===r&&(r=!1),this.name=e,this.onInvalidate=t,this.errorHandler=n,this.requiresObservable=r,this.observing=[],this.newObserving=[],this.dependenciesState=Z.NOT_TRACKING,this.diffValue=0,this.runId=0,this.unboundDepsCount=0,this.__mapid="#"+a(),this.isDisposed=!1,this._isScheduled=!1,this._isTrackPending=!1,this._isRunning=!1,this.isTracing=ee.NONE}return e.prototype.onBecomeStale=function(){this.schedule()},e.prototype.schedule=function(){this._isScheduled||(this._isScheduled=!0,ze.pendingReactions.push(this),Xe())},e.prototype.isScheduled=function(){return this._isScheduled},e.prototype.runReaction=function(){if(!this.isDisposed){if(Be(),this._isScheduled=!1,ae(this)){this._isTrackPending=!0;try{this.onInvalidate(),this._isTrackPending}catch(e){this.reportExceptionInDerivation(e)}}We()}},e.prototype.track=function(e){if(!this.isDisposed){Be();0,this._isRunning=!0;var t=se(this,e,void 0);this._isRunning=!1,this._isTrackPending=!1,this.isDisposed&&ce(this),ie(t)&&this.reportExceptionInDerivation(t.cause),We()}},e.prototype.reportExceptionInDerivation=function(e){var t=this;if(this.errorHandler)this.errorHandler(e,this);else{if(ze.disableErrorBoundaries)throw e;var n="[mobx] Encountered an uncaught exception that was thrown by a reaction or observer component, in: '"+this+"'";ze.suppressReactionErrors?console.warn("[mobx] (error in reaction '"+this.name+"' suppressed, fix error of causing action below)"):console.error(n,e),ze.globalReactionErrorHandlers.forEach((function(n){return n(e,t)}))}},e.prototype.dispose=function(){this.isDisposed||(this.isDisposed=!0,this._isRunning||(Be(),ce(this),We()))},e.prototype.getDisposer=function(){var e=this.dispose.bind(this);return e[x]=this,e},e.prototype.toString=function(){return"Reaction["+this.name+"]"},e.prototype.trace=function(e){void 0===e&&(e=!1),Qt(this,e)},e}();function Qe(e){return ze.globalReactionErrorHandlers.push(e),function(){var t=ze.globalReactionErrorHandlers.indexOf(e);t>=0&&ze.globalReactionErrorHandlers.splice(t,1)}}var Ye=function(e){return e()};function Xe(){ze.inBatch>0||ze.isRunningReactions||Ye(Je)}function Je(){ze.isRunningReactions=!0;for(var e=ze.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",e):2===arguments.length&&"function"==typeof t?we(e,t):1===arguments.length&&"string"==typeof e?rt(e):!0!==r?rt(t).apply(null,arguments):void d(e,t,we(e.name||t,n.value,this))};function at(e,t){return Se("string"==typeof e?e:e.name||"","function"==typeof e?e:t,this,void 0)}function ut(e){return"function"==typeof e&&!0===e.isMobxAction}function lt(e,t,n){d(e,t,we(t,n.bind(e)))}function st(e,t){void 0===t&&(t=i);var n,r=t&&t.name||e.name||"Autorun@"+a();if(!t.scheduler&&!t.delay)n=new Ge(r,(function(){this.track(l)}),t.onError,t.requiresObservable);else{var o=ft(t),u=!1;n=new Ge(r,(function(){u||(u=!0,o((function(){u=!1,n.isDisposed||n.track(l)})))}),t.onError,t.requiresObservable)}function l(){e(n)}return n.schedule(),n.getDisposer()}it.bound=function(e,t,n,r){return!0===r?(lt(e,t,n.value),null):n?{configurable:!0,enumerable:!1,get:function(){return lt(this,t,n.value||n.initializer.call(this)),this[t]},set:nt}:{enumerable:!1,configurable:!0,set:function(e){lt(this,t,e)},get:function(){}}};var ct=function(e){return e()};function ft(e){return e.scheduler?e.scheduler:e.delay?function(t){return setTimeout(t,e.delay)}:ct}function pt(e,t,n){void 0===n&&(n=i);var r,o,u,l=n.name||"Reaction@"+a(),s=it(l,n.onError?(r=n.onError,o=t,function(){try{return o.apply(this,arguments)}catch(e){r.call(this,e)}}):t),c=!n.scheduler&&!n.delay,f=ft(n),p=!0,d=!1,h=n.compareStructural?O.structural:n.equals||O.default,v=new Ge(l,(function(){p||c?y():d||(d=!0,f(y))}),n.onError,n.requiresObservable);function y(){if(d=!1,!v.isDisposed){var t=!1;v.track((function(){var n=e(v);t=p||!h(u,n),u=n})),p&&n.fireImmediately&&s(u,v),p||!0!==t||s(u,v),p&&(p=!1)}}return v.schedule(),v.getDisposer()}function dt(e,t,n){return vt("onBecomeObserved",e,t,n)}function ht(e,t,n){return vt("onBecomeUnobserved",e,t,n)}function vt(e,t,n,r){var o="function"==typeof r?Nn(t,n):Nn(t),i="function"==typeof r?r:n,a=e+"Listeners";return o[a]?o[a].add(i):o[a]=new Set([i]),"function"!=typeof o[e]?u(!1):function(){var e=o[a];e&&(e.delete(i),0===e.size&&delete o[a])}}function yt(e){var t=e.enforceActions,n=e.computedRequiresReaction,r=e.computedConfigurable,o=e.disableErrorBoundaries,i=e.reactionScheduler,a=e.reactionRequiresObservable,l=e.observableRequiresReaction;if(!0===e.isolateGlobalState&&((ze.pendingReactions.length||ze.inBatch||ze.isRunningReactions)&&u("isolateGlobalState should be called before MobX is running any reactions"),Ve=!0,Me&&(0==--De().__mobxInstanceCount&&(De().__mobxGlobals=void 0),ze=new Ne)),void 0!==t){var s=void 0;switch(t){case!0:case"observed":s=!0;break;case!1:case"never":s=!1;break;case"strict":case"always":s="strict";break;default:u("Invalid value for 'enforceActions': '"+t+"', expected 'never', 'always' or 'observed'")}ze.enforceActions=s,ze.allowStateChanges=!0!==s&&"strict"!==s}void 0!==n&&(ze.computedRequiresReaction=!!n),void 0!==a&&(ze.reactionRequiresObservable=!!a),void 0!==l&&(ze.observableRequiresReaction=!!l,ze.allowStateReads=!ze.observableRequiresReaction),void 0!==r&&(ze.computedConfigurable=!!r),void 0!==o&&(!0===o&&console.warn("WARNING: Debug feature only. MobX will NOT recover from errors when `disableErrorBoundaries` is enabled."),ze.disableErrorBoundaries=!!o),i&&et(i)}function mt(e,t){var n="function"==typeof e?e.prototype:e,r=function(e){var r=t[e];Array.isArray(r)||(r=[r]);var o=Object.getOwnPropertyDescriptor(n,e),i=r.reduce((function(t,r){return r(n,e,t)}),o);i&&Object.defineProperty(n,e,i)};for(var o in t)r(o);return e}function bt(e,t,n,r){var o=gt(r=B(r));return V(e),kn(e,r.name,o.enhancer),t&&wt(e,t,n,o),e}function gt(e){return e.defaultDecorator||(!1===e.deep?q:W)}function wt(e,t,n,r){var o,i;Be();try{var a=S(t);try{for(var u=C(a),l=u.next();!l.done;l=u.next()){var s=l.value,c=Object.getOwnPropertyDescriptor(t,s);0;var f=(n&&s in n?n[s]:c.get?te:r)(e,s,c,!0);f&&Object.defineProperty(e,s,f)}}catch(e){o={error:e}}finally{try{l&&!l.done&&(i=u.return)&&i.call(u)}finally{if(o)throw o.error}}}finally{We()}}function St(e,t){return xt(Nn(e,t))}function xt(e){var t,n,r={name:e.name};return e.observing&&e.observing.length>0&&(r.dependencies=(t=e.observing,n=[],t.forEach((function(e){-1===n.indexOf(e)&&n.push(e)})),n).map(xt)),r}function _t(e,t){return Et(Nn(e,t))}function Et(e){var t={name:e.name};return function(e){return e.observers&&e.observers.size>0}(e)&&(t.observers=Array.from(function(e){return e.observers}(e)).map(Et)),t}var Tt=0;function Ot(){this.message="FLOW_CANCELLED"}function kt(e){return e instanceof Ot}function Pt(e){1!==arguments.length&&u("Flow expects 1 argument and cannot be used as decorator");var t=e.name||"";return function(){var n,r=this,o=arguments,i=++Tt,a=it(t+" - runid: "+i+" - init",e).apply(r,o),u=void 0,l=new Promise((function(e,r){var o=0;function l(e){var n;u=void 0;try{n=it(t+" - runid: "+i+" - yield "+o++,a.next).call(a,e)}catch(e){return r(e)}c(n)}function s(e){var n;u=void 0;try{n=it(t+" - runid: "+i+" - yield "+o++,a.throw).call(a,e)}catch(e){return r(e)}c(n)}function c(t){if(!t||"function"!=typeof t.then)return t.done?e(t.value):(u=Promise.resolve(t.value)).then(l,s);t.then(c,r)}n=r,l(void 0)}));return l.cancel=it(t+" - runid: "+i+" - cancel",(function(){try{u&&Ct(u);var e=a.return(void 0),t=Promise.resolve(e.value);t.then(c,c),Ct(t),n(new Ot)}catch(e){n(e)}})),l}}function Ct(e){"function"==typeof e.cancel&&e.cancel()}function jt(e,t,n){var r;if(xn(e)||bn(e)||Ce(e))r=Rn(e);else{if(!In(e))return u(!1);if("string"!=typeof t)return u(!1);r=Rn(e,t)}return void 0!==r.dehancer?u(!1):(r.dehancer="function"==typeof t?t:n,function(){r.dehancer=void 0})}function At(e,t,n){return"function"==typeof n?function(e,t,n){return Rn(e,t).intercept(n)}(e,t,n):function(e,t){return Rn(e).intercept(t)}(e,t)}function It(e,t){if(null==e)return!1;if(void 0!==t){if(!1===In(e))return!1;if(!e[x].values.has(t))return!1;var n=Nn(e,t);return Ae(n)}return Ae(e)}function Nt(e){return arguments.length>1?u(!1):It(e)}function Rt(e,t){return"string"!=typeof t?u(!1):It(e,t)}function Dt(e,t){return null!=e&&(void 0!==t?!!In(e)&&e[x].values.has(t):In(e)||!!e[x]||E(e)||Ze(e)||Ae(e))}function Mt(e){return 1!==arguments.length&&u(!1),Dt(e)}function Vt(e,t){return"string"!=typeof t?u(!1):Dt(e,t)}function zt(e){return In(e)?e[x].getKeys():xn(e)||Tn(e)?Array.from(e.keys()):bn(e)?e.map((function(e,t){return t})):u(!1)}function Lt(e){return In(e)?zt(e).map((function(t){return e[t]})):xn(e)?zt(e).map((function(t){return e.get(t)})):Tn(e)?Array.from(e.values()):bn(e)?e.slice():u(!1)}function Ft(e){return In(e)?zt(e).map((function(t){return[t,e[t]]})):xn(e)?zt(e).map((function(t){return[t,e.get(t)]})):Tn(e)?Array.from(e.entries()):bn(e)?e.map((function(e,t){return[t,e]})):u(!1)}function Ut(e,t,n){if(2!==arguments.length||Tn(e))if(In(e)){var r=e[x],o=r.values.get(t);o?r.write(t,n):r.addObservableProp(t,n,r.defaultEnhancer)}else if(xn(e))e.set(t,n);else if(Tn(e))e.add(t);else{if(!bn(e))return u(!1);"number"!=typeof t&&(t=parseInt(t,10)),l(t>=0,"Not a valid index: '"+t+"'"),Be(),t>=e.length&&(e.length=t+1),e[t]=n,We()}else{Be();var i=t;try{for(var a in i)Ut(e,a,i[a])}finally{We()}}}function Ht(e,t){if(In(e))e[x].remove(t);else if(xn(e))e.delete(t);else if(Tn(e))e.delete(t);else{if(!bn(e))return u(!1);"number"!=typeof t&&(t=parseInt(t,10)),l(t>=0,"Not a valid index: '"+t+"'"),e.splice(t,1)}}function $t(e,t){return In(e)?Rn(e).has(t):xn(e)||Tn(e)?e.has(t):bn(e)?t>=0&&t0}function un(e,t){var n=e.interceptors||(e.interceptors=[]);return n.push(t),s((function(){var e=n.indexOf(t);-1!==e&&n.splice(e,1)}))}function ln(e,t){var n=pe();try{for(var r=A(e.interceptors||[]),o=0,i=r.length;o0}function cn(e,t){var n=e.changeListeners||(e.changeListeners=[]);return n.push(t),s((function(){var e=n.indexOf(t);-1!==e&&n.splice(e,1)}))}function fn(e,t){var n=pe(),r=e.changeListeners;if(r){for(var o=0,i=(r=r.slice()).length;o0?e.map(this.dehancer):e},e.prototype.intercept=function(e){return un(this,e)},e.prototype.observe=function(e,t){return void 0===t&&(t=!1),t&&e({object:this.proxy,type:"splice",index:0,added:this.values.slice(),addedCount:this.values.length,removed:[],removedCount:0}),cn(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;ri?e=i:e<0&&(e=Math.max(0,i+e)),t=1===arguments.length?i-e:null==t?0:Math.max(0,Math.min(t,i-e)),void 0===n&&(n=o),an(this)){var a=ln(this,{object:this.proxy,type:"splice",index:e,removedCount:t,added:n});if(!a)return o;t=a.removedCount,n=a.added}n=0===n.length?n:n.map((function(e){return r.enhancer(e,void 0)}));var u=this.spliceItemsIntoValues(e,t,n);return 0===t&&0===n.length||this.notifyArraySplice(e,n,u),this.dehanceValues(u)},e.prototype.spliceItemsIntoValues=function(e,t,n){var r;if(n.length<1e4)return(r=this.values).splice.apply(r,A([e,t],n));var o=this.values.slice(e,e+t);return this.values=this.values.slice(0,e).concat(n,this.values.slice(e+t)),o},e.prototype.notifyArrayChildUpdate=function(e,t,n){var r=!this.owned&&!1,o=sn(this),i=o||r?{object:this.proxy,type:"update",index:e,newValue:t,oldValue:n}:null;this.atom.reportChanged(),o&&fn(this,i)},e.prototype.notifyArraySplice=function(e,t,n){var r=!this.owned&&!1,o=sn(this),i=o||r?{object:this.proxy,type:"splice",index:e,removed:n,added:t,removedCount:n.length,addedCount:t.length}:null;this.atom.reportChanged(),o&&fn(this,i)},e}(),vn={intercept:function(e){return this[x].intercept(e)},observe:function(e,t){return void 0===t&&(t=!1),this[x].observe(e,t)},clear:function(){return this.splice(0)},replace:function(e){var t=this[x];return t.spliceWithArray(0,t.values.length,e)},toJS:function(){return this.slice()},toJSON:function(){return this.toJS()},splice:function(e,t){for(var n=[],r=2;r-1&&(this.splice(n,1),!0)},get:function(e){var t=this[x];if(t){if(e=0&&r++}t=zn(t),n=zn(n);var l="[object Array]"===u;if(!l){if("object"!=typeof t||"object"!=typeof n)return!1;var s=t.constructor,c=n.constructor;if(s!==c&&!("function"==typeof s&&s instanceof s&&"function"==typeof c&&c instanceof c)&&"constructor"in t&&"constructor"in n)return!1}if(0===r)return!1;r<0&&(r=-1);i=i||[];var f=(o=o||[]).length;for(;f--;)if(o[f]===t)return i[f]===n;if(o.push(t),i.push(n),l){if((f=t.length)!==n.length)return!1;for(;f--;)if(!e(t[f],n[f],r-1,o,i))return!1}else{var p=Object.keys(t),d=void 0;if(f=p.length,Object.keys(n).length!==f)return!1;for(;f--;)if(d=p[f],!Ln(n,d)||!e(t[d],n[d],r-1,o,i))return!1}return o.pop(),i.pop(),!0}(e,t,n)}function zn(e){return bn(e)?e.slice():y(e)||xn(e)||m(e)||Tn(e)?Array.from(e.entries()):e}function Ln(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Fn(e){return e[Symbol.iterator]=Un,e}function Un(){return this}if("undefined"==typeof Proxy||"undefined"==typeof Symbol)throw new Error("[mobx] MobX 5+ requires Proxy and Symbol objects. If your environment doesn't support Symbol or Proxy objects, please downgrade to MobX 4. For React Native Android, consider upgrading JSCore.");"object"==typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__&&__MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobx({spy:tt,extras:{getDebugName:Dn},$mobx:x})}.call(this,n("./node_modules/process/browser.js"),n("./node_modules/webpack/buildin/global.js"))},"./node_modules/object-assign/index.js":function(e,t,n){"use strict";var r=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;function a(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,u,l=a(e),s=1;s1)for(var n=1;n