ancer) ? o : Q, r ) ); } var fe = he(); function he(e) { return { annotationType_: 'true', options_: e, make_: me, extend_: ge }; } function me(e, t, n, r) { var o, i, a, s; if (n.get) return je.make_(e, t, n, r); if (n.set) { var l = Me(t.toString(), n.set); return r === e.target_ ? null === e.defineProperty_(t, { configurable: !lt.safeDescriptors || e.isPlainObject_, set: l }) ? 0 : 2 : (p(r, t, { configurable: !0, set: l }), 2); } if (r !== e.target_ && 'function' == typeof n.value) return O(n.value) ? ((null == (s = this.options_) ? void 0 : s.autoBind) ? Ut.bound : Ut ).make_(e, t, n, r) : ((null == (a = this.options_) ? void 0 : a.autoBind) ? At.bound : At ).make_(e, t, n, r); var c, u = !1 === (null == (o = this.options_) ? void 0 : o.deep) ? Ae.ref : Ae; return ( 'function' == typeof n.value && (null == (i = this.options_) ? void 0 : i.autoBind) && (n.value = n.value.bind(null != (c = e.proxy_) ? c : e.target_)), u.make_(e, t, n, r) ); } function ge(e, t, n, r) { var o, i, a; return n.get ? je.extend_(e, t, n, r) : n.set ? e.defineProperty_( t, { configurable: !lt.safeDescriptors || e.isPlainObject_, set: Me(t.toString(), n.set) }, r ) : ('function' == typeof n.value && (null == (o = this.options_) ? void 0 : o.autoBind) && (n.value = n.value.bind( null != (a = e.proxy_) ? a : e.target_ )), (!1 === (null == (i = this.options_) ? void 0 : i.deep) ? Ae.ref : Ae ).extend_(e, t, n, r)); } var ye = { deep: !0, name: void 0, defaultDecorator: void 0, proxy: !0 }; function ve(e) { return e || ye; } Object.freeze(ye); var be = ue('observable'), we = ue('observable.ref', { enhancer: X }), xe = ue('observable.shallow', { enhancer: function (e, t, n) { return null == e || Tn(e) || gn(e) || _n(e) || En(e) ? e : Array.isArray(e) ? Ae.array(e, { name: n, deep: !1 }) : _(e) ? Ae.object(e, void 0, { name: n, deep: !1 }) : A(e) ? Ae.map(e, { name: n, deep: !1 }) : $(e) ? Ae.set(e, { name: n, deep: !1 }) : void 0; } }), ke = ue('observable.struct', { enhancer: function (e, t) { return Yn(e, t) ? t : e; } }), _e = B(be); function Oe(e) { return !0 === e.deep ? Q : !1 === e.deep ? X : (t = e.defaultDecorator) && null != (n = null == (r = t.options_) ? void 0 : r.enhancer) ? n : Q; var t, n, r; } function Se(e, t, n) { if (!x(t)) return qt(e) ? e : _(e) ? Ae.object(e, t, n) : Array.isArray(e) ? Ae.array(e, t) : A(e) ? Ae.map(e, t) : $(e) ? Ae.set(e, t) : 'object' == typeof e && null !== e ? e : Ae.box(e, t); q(e, t, be); } Object.assign(Se, _e); var Ee, Pe, Ae = c(Se, { box: function (e, t) { var n = ve(t); return new Be(e, Oe(n), n.name, !0, n.equals); }, array: function (e, t) { var n = ve(t); return (!1 === lt.useProxies || !1 === n.proxy ? Vn : sn)( e, Oe(n), n.name ); }, map: function (e, t) { var n = ve(t); return new kn(e, Oe(n), n.name); }, set: function (e, t) { var n = ve(t); return new Sn(e, Oe(n), n.name); }, object: function (e, t, n) { return (function (e, t, n, r) { var o = I(t), i = Cn(e, r)[W]; pt(); try { R(o).forEach(function (e) { i.extend_(e, o[e], !n || !(e in n) || n[e]); }); } finally { dt(); } return e; })( !1 === lt.useProxies || !1 === (null == n ? void 0 : n.proxy) ? Cn({}, n) : (function (e, t) { var n, r; return ( y(), null != (r = (n = (e = Cn(e, t))[W]).proxy_) ? r : (n.proxy_ = new Proxy(e, Kt)) ); })({}, n), e, t ); }, ref: B(we), shallow: B(xe), deep: _e, struct: B(ke) }), $e = 'computed', Ce = se($e), Re = se('computed.struct', { equals: G.structural }), je = function (e, t) { if (x(t)) return q(e, t, Ce); if (_(e)) return B(se($e, e)); var n = _(t) ? t : {}; return (n.get = e), n.name || (n.name = e.name || ''), new He(n); }; Object.assign(je, Ce), (je.struct = B(Re)); var Te, Ie = 0, Ne = 1, De = null != (Ee = null == (Pe = u(function () {}, 'name')) ? void 0 : Pe.configurable) && Ee, Le = { value: 'action', configurable: !0, writable: !1, enumerable: !1 }; function Me(e, t, n, r) { function o() { return Fe(0, n, t, r || this, arguments); } return ( void 0 === n && (n = !1), (o.isMobxAction = !0), De && ((Le.value = e), Object.defineProperty(o, 'name', Le)), o ); } function Fe(e, t, n, r, o) { var i = (function (e, t, n, r) { var o = lt.trackingDerivation, i = !t || !o; pt(); var a = lt.allowStateChanges; i && (et(), (a = ze(!0))); var s = { runAsAction_: i, prevDerivation_: o, prevAllowStateChanges_: a, prevAllowStateReads_: nt(!0), notifySpy_: !1, startTime_: 0, actionId_: Ne++, parentActionId_: Ie }; return (Ie = s.actionId_), s; })(0, t); try { return n.apply(r, o); } catch (e) { throw ((i.error_ = e), e); } finally { !(function (e) { Ie !== e.actionId_ && a(30), (Ie = e.parentActionId_), void 0 !== e.error_ && (lt.suppressReactionErrors = !0), Ue(e.prevAllowStateChanges_), rt(e.prevAllowStateReads_), dt(), e.runAsAction_ && tt(e.prevDerivation_), (lt.suppressReactionErrors = !1); })(i); } } function ze(e) { var t = lt.allowStateChanges; return (lt.allowStateChanges = e), t; } function Ue(e) { lt.allowStateChanges = e; } Te = Symbol.toPrimitive; var Ve, Be = (function (e) { function t(t, n, r, o, i) { var a; return ( void 0 === r && (r = 'ObservableValue'), void 0 === o && (o = !0), void 0 === i && (i = G.default), ((a = e.call(this, r) || this).enhancer = void 0), (a.name_ = void 0), (a.equals = void 0), (a.hasUnreportedChange_ = !1), (a.interceptors_ = void 0), (a.changeListeners_ = void 0), (a.value_ = void 0), (a.dehancer = void 0), (a.enhancer = n), (a.name_ = r), (a.equals = i), (a.value_ = n(t, void 0, r)), a ); } M(t, e); var n = t.prototype; return ( (n.dehanceValue = function (e) { return void 0 !== this.dehancer ? this.dehancer(e) : e; }), (n.set = function (e) { this.value_, (e = this.prepareNewValue_(e)) !== lt.UNCHANGED && this.setNewValue_(e); }), (n.prepareNewValue_ = function (e) { if (Gt(this)) { var t = Xt(this, { object: this, type: rn, newValue: e }); if (!t) return lt.UNCHANGED; e = t.newValue; } return ( (e = this.enhancer(e, this.value_, this.name_)), this.equals(this.value_, e) ? lt.UNCHANGED : e ); }), (n.setNewValue_ = function (e) { var t = this.value_; (this.value_ = e), this.reportChanged(), Jt(this) && en(this, { type: rn, object: this, newValue: e, oldValue: t }); }), (n.get = function () { return this.reportObserved(), this.dehanceValue(this.value_); }), (n.intercept_ = function (e) { return Qt(this, e); }), (n.observe_ = function (e, t) { return ( t && e({ observableKind: 'value', debugObjectName: this.name_, object: this, type: rn, newValue: this.value_, oldValue: void 0 }), Zt(this, e) ); }), (n.raw = function () { return this.value_; }), (n.toJSON = function () { return this.get(); }), (n.toString = function () { return this.name_ + '[' + this.value_ + ']'; }), (n.valueOf = function () { return j(this.get()); }), (n[Te] = function () { return this.valueOf(); }), t ); })(H); Ve = Symbol.toPrimitive; var qe, We, He = (function () { function e(e) { (this.dependenciesState_ = qe.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_ = qe.UP_TO_DATE_), (this.unboundDepsCount_ = 0), (this.value_ = new Ke(null)), (this.name_ = void 0), (this.triggeredBy_ = void 0), (this.isComputing_ = !1), (this.isRunningSetter_ = !1), (this.derivation = void 0), (this.setter_ = void 0), (this.isTracing_ = We.NONE), (this.scope_ = void 0), (this.equals_ = void 0), (this.requiresReaction_ = void 0), (this.keepAlive_ = void 0), (this.onBOL = void 0), (this.onBUOL = void 0), e.get || a(31), (this.derivation = e.get), (this.name_ = e.name || 'ComputedValue'), e.set && (this.setter_ = Me('ComputedValue-setter', e.set)), (this.equals_ = e.equals || (e.compareStructural || e.struct ? G.structural : G.default)), (this.scope_ = e.context), (this.requiresReaction_ = !!e.requiresReaction), (this.keepAlive_ = !!e.keepAlive); } var t = e.prototype; return ( (t.onBecomeStale_ = function () { var e; (e = this).lowestObserverState_ === qe.UP_TO_DATE_ && ((e.lowestObserverState_ = qe.POSSIBLY_STALE_), e.observers_.forEach(function (e) { e.dependenciesState_ === qe.UP_TO_DATE_ && ((e.dependenciesState_ = qe.POSSIBLY_STALE_), e.onBecomeStale_()); })); }), (t.onBO = function () { this.onBOL && this.onBOL.forEach(function (e) { return e(); }); }), (t.onBUO = function () { this.onBUOL && this.onBUOL.forEach(function (e) { return e(); }); }), (t.get = function () { if ( (this.isComputing_ && a(32, this.name_, this.derivation), 0 !== lt.inBatch || 0 !== this.observers_.size || this.keepAlive_) ) { if ((ft(this), Qe(this))) { var e = lt.trackingContext; this.keepAlive_ && !e && (lt.trackingContext = this), this.trackAndCompute() && (t = this).lowestObserverState_ !== qe.STALE_ && ((t.lowestObserverState_ = qe.STALE_), t.observers_.forEach(function (e) { e.dependenciesState_ === qe.POSSIBLY_STALE_ ? (e.dependenciesState_ = qe.STALE_) : e.dependenciesState_ === qe.UP_TO_DATE_ && (t.lowestObserverState_ = qe.UP_TO_DATE_); })), (lt.trackingContext = e); } } else Qe(this) && (this.warnAboutUntrackedRead_(), pt(), (this.value_ = this.computeValue_(!1)), dt()); var t, n = this.value_; if (Ge(n)) throw n.cause; return n; }), (t.set = function (e) { if (this.setter_) { this.isRunningSetter_ && a(33, this.name_), (this.isRunningSetter_ = !0); try { this.setter_.call(this.scope_, e); } finally { this.isRunningSetter_ = !1; } } else a(34, this.name_); }), (t.trackAndCompute = function () { var e = this.value_, t = this.dependenciesState_ === qe.NOT_TRACKING_, n = this.computeValue_(!0), r = t || Ge(e) || Ge(n) || !this.equals_(e, n); return r && (this.value_ = n), r; }), (t.computeValue_ = function (e) { this.isComputing_ = !0; var t, n = ze(!1); if (e) t = Xe(this, this.derivation, this.scope_); else if (!0 === lt.disableErrorBoundaries) t = this.derivation.call(this.scope_); else try { t = this.derivation.call(this.scope_); } catch (e) { t = new Ke(e); } return Ue(n), (this.isComputing_ = !1), t; }), (t.suspend_ = function () { this.keepAlive_ || (Je(this), (this.value_ = void 0)); }), (t.observe_ = function (e, t) { var n = this, r = !0, o = void 0; return (function (e, t) { var n, r; void 0 === t && (t = h); var o, i = null != (n = null == (r = t) ? void 0 : r.name) ? n : 'Autorun'; if (t.scheduler || t.delay) { var a = (function (e) { return e.scheduler ? e.scheduler : e.delay ? function (t) { return setTimeout(t, e.delay); } : Ct; })(t), s = !1; o = new mt( i, function () { s || ((s = !0), a(function () { (s = !1), o.isDisposed_ || o.track(l); })); }, t.onError, t.requiresObservable ); } else o = new mt( i, function () { this.track(l); }, t.onError, t.requiresObservable ); function l() { e(o); } return o.schedule_(), o.getDisposer_(); })(function () { var i = n.get(); if (!r || t) { var a = et(); e({ observableKind: 'computed', debugObjectName: n.name_, type: rn, object: n, newValue: i, oldValue: o }), tt(a); } (r = !1), (o = i); }); }), (t.warnAboutUntrackedRead_ = function () {}), (t.toString = function () { return this.name_ + '[' + this.derivation.toString() + ']'; }), (t.valueOf = function () { return j(this.get()); }), (t[Ve] = function () { return this.valueOf(); }), e ); })(), Ye = P('ComputedValue', He); !(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_'); })(qe || (qe = {})), (function (e) { (e[(e.NONE = 0)] = 'NONE'), (e[(e.LOG = 1)] = 'LOG'), (e[(e.BREAK = 2)] = 'BREAK'); })(We || (We = {})); var Ke = function (e) { (this.cause = void 0), (this.cause = e); }; function Ge(e) { return e instanceof Ke; } function Qe(e) { switch (e.dependenciesState_) { case qe.UP_TO_DATE_: return !1; case qe.NOT_TRACKING_: case qe.STALE_: return !0; case qe.POSSIBLY_STALE_: for ( var t = nt(!0), n = et(), r = e.observing_, o = r.length, i = 0; i < o; i++ ) { var a = r[i]; if (Ye(a)) { if (lt.disableErrorBoundaries) a.get(); else try { a.get(); } catch (e) { return tt(n), rt(t), !0; } if (e.dependenciesState_ === qe.STALE_) return tt(n), rt(t), !0; } } return ot(e), tt(n), rt(t), !1; } } function Xe(e, t, n) { var r = nt(!0); ot(e), (e.newObserving_ = new Array(e.observing_.length + 100)), (e.unboundDepsCount_ = 0), (e.runId_ = ++lt.runId); var o, i = lt.trackingDerivation; if ( ((lt.trackingDerivation = e), lt.inBatch++, !0 === lt.disableErrorBoundaries) ) o = t.call(n); else try { o = t.call(n); } catch (e) { o = new Ke(e); } return ( lt.inBatch--, (lt.trackingDerivation = i), (function (e) { for ( var t = e.observing_, n = (e.observing_ = e.newObserving_), r = qe.UP_TO_DATE_, o = 0, i = e.unboundDepsCount_, a = 0; a < i; a++ ) { var s = n[a]; 0 === s.diffValue_ && ((s.diffValue_ = 1), o !== a && (n[o] = s), o++), s.dependenciesState_ > r && (r = s.dependenciesState_); } for (n.length = o, e.newObserving_ = null, i = t.length; i--; ) { var l = t[i]; 0 === l.diffValue_ && ct(l, e), (l.diffValue_ = 0); } for (; o--; ) { var c = n[o]; 1 === c.diffValue_ && ((c.diffValue_ = 0), (p = e), (u = c).observers_.add(p), u.lowestObserverState_ > p.dependenciesState_ && (u.lowestObserverState_ = p.dependenciesState_)); } var u, p; r !== qe.UP_TO_DATE_ && ((e.dependenciesState_ = r), e.onBecomeStale_()); })(e), rt(r), o ); } function Je(e) { var t = e.observing_; e.observing_ = []; for (var n = t.length; n--; ) ct(t[n], e); e.dependenciesState_ = qe.NOT_TRACKING_; } function Ze(e) { var t = et(); try { return e(); } finally { tt(t); } } function et() { var e = lt.trackingDerivation; return (lt.trackingDerivation = null), e; } function tt(e) { lt.trackingDerivation = e; } function nt(e) { var t = lt.allowStateReads; return (lt.allowStateReads = e), t; } function rt(e) { lt.allowStateReads = e; } function ot(e) { if (e.dependenciesState_ !== qe.UP_TO_DATE_) { e.dependenciesState_ = qe.UP_TO_DATE_; for (var t = e.observing_, n = t.length; n--; ) t[n].lowestObserverState_ = qe.UP_TO_DATE_; } } var it = function () { (this.version = 6), (this.UNCHANGED = {}), (this.trackingDerivation = null), (this.trackingContext = null), (this.runId = 0), (this.mobxGuid = 0), (this.inBatch = 0), (this.pendingUnobservations = []), (this.pendingReactions = []), (this.isRunningReactions = !1), (this.allowStateChanges = !1), (this.allowStateReads = !0), (this.enforceActions = !0), (this.spyListeners = []), (this.globalReactionErrorHandlers = []), (this.computedRequiresReaction = !1), (this.reactionRequiresObservable = !1), (this.observableRequiresReaction = !1), (this.disableErrorBoundaries = !1), (this.suppressReactionErrors = !1), (this.useProxies = !0), (this.verifyProxies = !1), (this.safeDescriptors = !0); }, at = !0, st = !1, lt = (function () { var e = l(); return ( e.__mobxInstanceCount > 0 && !e.__mobxGlobals && (at = !1), e.__mobxGlobals && e.__mobxGlobals.version !== new it().version && (at = !1), at ? e.__mobxGlobals ? ((e.__mobxInstanceCount += 1), e.__mobxGlobals.UNCHANGED || (e.__mobxGlobals.UNCHANGED = {}), e.__mobxGlobals) : ((e.__mobxInstanceCount = 1), (e.__mobxGlobals = new it())) : (setTimeout(function () { st || a(35); }, 1), new it()) ); })(); function ct(e, t) { e.observers_.delete(t), 0 === e.observers_.size && ut(e); } function ut(e) { !1 === e.isPendingUnobservation_ && ((e.isPendingUnobservation_ = !0), lt.pendingUnobservations.push(e)); } function pt() { lt.inBatch++; } function dt() { if (0 == --lt.inBatch) { yt(); for (var e = lt.pendingUnobservations, t = 0; t < e.length; t++) { var n = e[t]; (n.isPendingUnobservation_ = !1), 0 === n.observers_.size && (n.isBeingObserved_ && ((n.isBeingObserved_ = !1), n.onBUO()), n instanceof He && n.suspend_()); } lt.pendingUnobservations = []; } } function ft(e) { var t = lt.trackingDerivation; return null !== t ? (t.runId_ !== e.lastAccessedBy_ && ((e.lastAccessedBy_ = t.runId_), (t.newObserving_[t.unboundDepsCount_++] = e), !e.isBeingObserved_ && lt.trackingContext && ((e.isBeingObserved_ = !0), e.onBO())), !0) : (0 === e.observers_.size && lt.inBatch > 0 && ut(e), !1); } function ht(e) { e.lowestObserverState_ !== qe.STALE_ && ((e.lowestObserverState_ = qe.STALE_), e.observers_.forEach(function (e) { e.dependenciesState_ === qe.UP_TO_DATE_ && e.onBecomeStale_(), (e.dependenciesState_ = qe.STALE_); })); } var mt = (function () { function e(e, t, n, r) { void 0 === e && (e = 'Reaction'), void 0 === r && (r = !1), (this.name_ = void 0), (this.onInvalidate_ = void 0), (this.errorHandler_ = void 0), (this.requiresObservable_ = void 0), (this.observing_ = []), (this.newObserving_ = []), (this.dependenciesState_ = qe.NOT_TRACKING_), (this.diffValue_ = 0), (this.runId_ = 0), (this.unboundDepsCount_ = 0), (this.isDisposed_ = !1), (this.isScheduled_ = !1), (this.isTrackPending_ = !1), (this.isRunning_ = !1), (this.isTracing_ = We.NONE), (this.name_ = e), (this.onInvalidate_ = t), (this.errorHandler_ = n), (this.requiresObservable_ = r); } var t = e.prototype; return ( (t.onBecomeStale_ = function () { this.schedule_(); }), (t.schedule_ = function () { this.isScheduled_ || ((this.isScheduled_ = !0), lt.pendingReactions.push(this), yt()); }), (t.isScheduled = function () { return this.isScheduled_; }), (t.runReaction_ = function () { if (!this.isDisposed_) { pt(), (this.isScheduled_ = !1); var e = lt.trackingContext; if (((lt.trackingContext = this), Qe(this))) { this.isTrackPending_ = !0; try { this.onInvalidate_(); } catch (e) { this.reportExceptionInDerivation_(e); } } (lt.trackingContext = e), dt(); } }), (t.track = function (e) { if (!this.isDisposed_) { pt(), (this.isRunning_ = !0); var t = lt.trackingContext; lt.trackingContext = this; var n = Xe(this, e, void 0); (lt.trackingContext = t), (this.isRunning_ = !1), (this.isTrackPending_ = !1), this.isDisposed_ && Je(this), Ge(n) && this.reportExceptionInDerivation_(n.cause), dt(); } }), (t.reportExceptionInDerivation_ = function (e) { var t = this; if (this.errorHandler_) this.errorHandler_(e, this); else { if (lt.disableErrorBoundaries) throw e; var n = "[mobx] uncaught error in '" + this + "'"; lt.suppressReactionErrors || console.error(n, e), lt.globalReactionErrorHandlers.forEach(function (n) { return n(e, t); }); } }), (t.dispose = function () { this.isDisposed_ || ((this.isDisposed_ = !0), this.isRunning_ || (pt(), Je(this), dt())); }), (t.getDisposer_ = function () { var e = this.dispose.bind(this); return (e[W] = this), e; }), (t.toString = function () { return 'Reaction[' + this.name_ + ']'; }), (t.trace = function (e) { void 0 === e && (e = !1), (function () { a('trace() is not available in production builds'); for ( var e = !1, t = arguments.length, n = new Array(t), r = 0; r < t; r++ ) n[r] = arguments[r]; 'boolean' == typeof n[n.length - 1] && (e = n.pop()); var o = Wt(n); if (!o) return a( "'trace(break?)' can only be used inside a tracked computed value or a Reaction. Consider passing in the computed value or reaction explicitly" ); o.isTracing_ === We.NONE && console.log( "[mobx.trace] '" + o.name_ + "' tracing enabled" ), (o.isTracing_ = e ? We.BREAK : We.LOG); })(this, e); }), e ); })(), gt = function (e) { return e(); }; function yt() { lt.inBatch > 0 || lt.isRunningReactions || gt(vt); } function vt() { lt.isRunningReactions = !0; for (var e = lt.pendingReactions, t = 0; e.length > 0; ) { 100 == ++t && (console.error('[mobx] cycle in reaction: ' + e[0]), e.splice(0)); for (var n = e.splice(0), r = 0, o = n.length; r < o; r++) n[r].runReaction_(); } lt.isRunningReactions = !1; } var bt = P('Reaction', mt), wt = 'action', xt = 'autoAction', kt = Z(wt), _t = Z('action.bound', { bound: !0 }), Ot = Z(xt, { autoAction: !0 }), St = Z('autoAction.bound', { autoAction: !0, bound: !0 }); function Et(e) { return function (t, n) { return w(t) ? Me(t.name || '', t, e) : w(n) ? Me(t, n, e) : x(n) ? q(t, n, e ? Ot : kt) : x(t) ? B(Z(e ? xt : wt, { name: t, autoAction: e })) : void 0; }; } var Pt = Et(!1); Object.assign(Pt, kt); var At = Et(!0); function $t(e) { return w(e) && !0 === e.isMobxAction; } Object.assign(At, Ot), (Pt.bound = B(_t)), (At.bound = B(St)); var Ct = function (e) { return e(); }; var Rt = 'onBO'; function jt(e, t, n) { return Tt('onBUO', e, t, n); } function Tt(e, t, n, r) { var o = 'function' == typeof r ? Bn(t, n) : Bn(t), i = w(r) ? r : n, a = e + 'L'; return ( o[a] ? o[a].add(i) : (o[a] = new Set([i])), function () { var e = o[a]; e && (e.delete(i), 0 === e.size && delete o[a]); } ); } var It = 'always'; function Nt(e) { !0 === e.isolateGlobalState && (function () { if ( ((lt.pendingReactions.length || lt.inBatch || lt.isRunningReactions) && a(36), (st = !0), at) ) { var e = l(); 0 == --e.__mobxInstanceCount && (e.__mobxGlobals = void 0), (lt = new it()); } })(); var t, n, r = e.useProxies, o = e.enforceActions; if ( (void 0 !== r && (lt.useProxies = r === It || ('never' !== r && 'undefined' != typeof Proxy)), 'ifavailable' === r && (lt.verifyProxies = !0), void 0 !== o) ) { var i = o === It ? It : 'observed' === o; (lt.enforceActions = i), (lt.allowStateChanges = !0 !== i && i !== It); } [ 'computedRequiresReaction', 'reactionRequiresObservable', 'observableRequiresReaction', 'disableErrorBoundaries', 'safeDescriptors' ].forEach(function (t) { t in e && (lt[t] = !!e[t]); }), (lt.allowStateReads = !lt.observableRequiresReaction), e.reactionScheduler && ((t = e.reactionScheduler), (n = gt), (gt = function (e) { return t(function () { return n(e); }); })); } function Dt(e) { var t, n = { name: e.name_ }; return ( e.observing_ && e.observing_.length > 0 && (n.dependencies = ((t = e.observing_), Array.from(new Set(t))).map(Dt)), n ); } var Lt = 0; function Mt() { this.message = 'FLOW_CANCELLED'; } Mt.prototype = Object.create(Error.prototype); var Ft = re('flow'), zt = re('flow.bound', { bound: !0 }), Ut = Object.assign(function (e, t) { if (x(t)) return q(e, t, Ft); var n = e, r = n.name || '', o = function () { var e, t = this, o = arguments, i = ++Lt, a = Pt(r + ' - runid: ' + i + ' - init', n).apply(t, o), s = void 0, l = new Promise(function (t, n) { var o = 0; function l(e) { var t; s = void 0; try { t = Pt( r + ' - runid: ' + i + ' - yield ' + o++, a.next ).call(a, e); } catch (e) { return n(e); } u(t); } function c(e) { var t; s = void 0; try { t = Pt( r + ' - runid: ' + i + ' - yield ' + o++, a.throw ).call(a, e); } catch (e) { return n(e); } u(t); } function u(e) { if (!w(null == e ? void 0 : e.then)) return e.done ? t(e.value) : (s = Promise.resolve(e.value)).then(l, c); e.then(u, n); } (e = n), l(void 0); }); return ( (l.cancel = Pt( r + ' - runid: ' + i + ' - cancel', function () { try { s && Vt(s); var t = a.return(void 0), n = Promise.resolve(t.value); n.then(b, b), Vt(n), e(new Mt()); } catch (t) { e(t); } } )), l ); }; return (o.isMobXFlow = !0), o; }, Ft); function Vt(e) { w(e.cancel) && e.cancel(); } function Bt(e) { return !0 === (null == e ? void 0 : e.isMobXFlow); } function qt(e) { return (function (e, t) { return ( !!e && (void 0 !== t ? !!Tn(e) && e[W].values_.has(t) : Tn(e) || !!e[W] || Y(e) || bt(e) || Ye(e)) ); })(e); } function Wt(e) { switch (e.length) { case 0: return lt.trackingDerivation; case 1: return Bn(e[0]); case 2: return Bn(e[0], e[1]); } } function Ht(e, t) { void 0 === t && (t = void 0), pt(); try { return e.apply(t); } finally { dt(); } } function Yt(e) { return e[W]; } Ut.bound = B(zt); var Kt = { has: function (e, t) { return Yt(e).has_(t); }, get: function (e, t) { return Yt(e).get_(t); }, set: function (e, t, n) { var r; return !!x(t) && (null == (r = Yt(e).set_(t, n, !0)) || r); }, deleteProperty: function (e, t) { var n; return !!x(t) && (null == (n = Yt(e).delete_(t, !0)) || n); }, defineProperty: function (e, t, n) { var r; return null == (r = Yt(e).defineProperty_(t, n)) || r; }, ownKeys: function (e) { return Yt(e).ownKeys_(); }, preventExtensions: function (e) { a(13); } }; function Gt(e) { return void 0 !== e.interceptors_ && e.interceptors_.length > 0; } function Qt(e, t) { var n = e.interceptors_ || (e.interceptors_ = []); return ( n.push(t), v(function () { var e = n.indexOf(t); -1 !== e && n.splice(e, 1); }) ); } function Xt(e, t) { var n = et(); try { for ( var r = [].concat(e.interceptors_ || []), o = 0, i = r.length; o < i && ((t = r[o](t)) && !t.type && a(14), t); o++ ); return t; } finally { tt(n); } } function Jt(e) { return void 0 !== e.changeListeners_ && e.changeListeners_.length > 0; } function Zt(e, t) { var n = e.changeListeners_ || (e.changeListeners_ = []); return ( n.push(t), v(function () { var e = n.indexOf(t); -1 !== e && n.splice(e, 1); }) ); } function en(e, t) { var n = et(), r = e.changeListeners_; if (r) { for (var o = 0, i = (r = r.slice()).length; o < i; o++) r[o](t); tt(n); } } function tn(e, t, n) { var r = Cn(e, n)[W]; pt(); try { null != t || (t = (function (e) { return T(e, V) || S(e, V, L({}, e[V])), e[V]; })(e)), R(t).forEach(function (e) { return r.make_(e, t[e]); }); } finally { dt(); } return e; } var nn = 'splice', rn = 'update', on = { get: function (e, t) { var n = e[W]; return t === W ? n : 'length' === t ? n.getArrayLength_() : 'string' != typeof t || isNaN(t) ? T(ln, t) ? ln[t] : e[t] : n.get_(parseInt(t)); }, set: function (e, t, n) { var r = e[W]; return ( 'length' === t && r.setArrayLength_(n), 'symbol' == typeof t || isNaN(t) ? (e[t] = n) : r.set_(parseInt(t), n), !0 ); }, preventExtensions: function () { a(15); } }, an = (function () { function e(e, t, n, r) { void 0 === e && (e = 'ObservableArray'), (this.owned_ = void 0), (this.legacyMode_ = void 0), (this.atom_ = void 0), (this.values_ = []), (this.interceptors_ = void 0), (this.changeListeners_ = void 0), (this.enhancer_ = void 0), (this.dehancer = void 0), (this.proxy_ = void 0), (this.lastKnownLength_ = 0), (this.owned_ = n), (this.legacyMode_ = r), (this.atom_ = new H(e)), (this.enhancer_ = function (e, n) { return t(e, n, 'ObservableArray[..]'); }); } var t = e.prototype; return ( (t.dehanceValue_ = function (e) { return void 0 !== this.dehancer ? this.dehancer(e) : e; }), (t.dehanceValues_ = function (e) { return void 0 !== this.dehancer && e.length > 0 ? e.map(this.dehancer) : e; }), (t.intercept_ = function (e) { return Qt(this, e); }), (t.observe_ = function (e, t) { return ( void 0 === t && (t = !1), t && e({ observableKind: 'array', object: this.proxy_, debugObjectName: this.atom_.name_, type: 'splice', index: 0, added: this.values_.slice(), addedCount: this.values_.length, removed: [], removedCount: 0 }), Zt(this, e) ); }), (t.getArrayLength_ = function () { return this.atom_.reportObserved(), this.values_.length; }), (t.setArrayLength_ = function (e) { ('number' != typeof e || e < 0) && a('Out of range: ' + e); var t = this.values_.length; if (e !== t) if (e > t) { for (var n = new Array(e - t), r = 0; r < e - t; r++) n[r] = void 0; this.spliceWithArray_(t, 0, n); } else this.spliceWithArray_(e, t - e); }), (t.updateArrayLength_ = function (e, t) { e !== this.lastKnownLength_ && a(16), (this.lastKnownLength_ += t), this.legacyMode_ && t > 0 && Un(e + t + 1); }), (t.spliceWithArray_ = function (e, t, n) { var r = this; this.atom_; var o = this.values_.length; if ( (void 0 === e ? (e = 0) : e > o ? (e = o) : e < 0 && (e = Math.max(0, o + e)), (t = 1 === arguments.length ? o - e : null == t ? 0 : Math.max(0, Math.min(t, o - e))), void 0 === n && (n = f), Gt(this)) ) { var i = Xt(this, { object: this.proxy_, type: nn, index: e, removedCount: t, added: n }); if (!i) return f; (t = i.removedCount), (n = i.added); } if ( ((n = 0 === n.length ? n : n.map(function (e) { return r.enhancer_(e, void 0); })), this.legacyMode_) ) { var a = n.length - t; this.updateArrayLength_(o, a); } var s = this.spliceItemsIntoValues_(e, t, n); return ( (0 === t && 0 === n.length) || this.notifyArraySplice_(e, n, s), this.dehanceValues_(s) ); }), (t.spliceItemsIntoValues_ = function (e, t, n) { var r; if (n.length < 1e4) return (r = this.values_).splice.apply(r, [e, t].concat(n)); var o = this.values_.slice(e, e + t), i = this.values_.slice(e + t); this.values_.length = e + n.length - t; for (var a = 0; a < n.length; a++) this.values_[e + a] = n[a]; for (var s = 0; s < i.length; s++) this.values_[e + n.length + s] = i[s]; return o; }), (t.notifyArrayChildUpdate_ = function (e, t, n) { var r = !this.owned_ && !1, o = Jt(this), i = o || r ? { observableKind: 'array', object: this.proxy_, type: rn, debugObjectName: this.atom_.name_, index: e, newValue: t, oldValue: n } : null; this.atom_.reportChanged(), o && en(this, i); }), (t.notifyArraySplice_ = function (e, t, n) { var r = !this.owned_ && !1, o = Jt(this), i = o || r ? { observableKind: 'array', object: this.proxy_, debugObjectName: this.atom_.name_, type: nn, index: e, removed: n, added: t, removedCount: n.length, addedCount: t.length } : null; this.atom_.reportChanged(), o && en(this, i); }), (t.get_ = function (e) { if (e < this.values_.length) return ( this.atom_.reportObserved(), this.dehanceValue_(this.values_[e]) ); console.warn( '[mobx.array] Attempt to read an array index (' + e + ') that is out of bounds (' + this.values_.length + '). Please check length first. Out of bound indices will not be tracked by MobX' ); }), (t.set_ = function (e, t) { var n = this.values_; if (e < n.length) { this.atom_; var r = n[e]; if (Gt(this)) { var o = Xt(this, { type: rn, object: this.proxy_, index: e, newValue: t }); if (!o) return; t = o.newValue; } (t = this.enhancer_(t, r)) !== r && ((n[e] = t), this.notifyArrayChildUpdate_(e, t, r)); } else e === n.length ? this.spliceWithArray_(e, 0, [t]) : a(17, e, n.length); }), e ); })(); function sn(e, t, n, r) { void 0 === n && (n = 'ObservableArray'), void 0 === r && (r = !1), y(); var o = new an(n, t, r, !1); E(o.values_, W, o); var i = new Proxy(o.values_, on); if (((o.proxy_ = i), e && e.length)) { var a = ze(!0); o.spliceWithArray_(0, 0, e), Ue(a); } return i; } var ln = { clear: function () { return this.splice(0); }, replace: function (e) { var t = this[W]; return t.spliceWithArray_(0, t.values_.length, e); }, toJSON: function () { return this.slice(); }, splice: function (e, t) { for ( var n = arguments.length, r = new Array(n > 2 ? n - 2 : 0), o = 2; o < n; o++ ) r[o - 2] = arguments[o]; var i = this[W]; switch (arguments.length) { case 0: return []; case 1: return i.spliceWithArray_(e); case 2: return i.spliceWithArray_(e, t); } return i.spliceWithArray_(e, t, r); }, spliceWithArray: function (e, t, n) { return this[W].spliceWithArray_(e, t, n); }, push: function () { for ( var e = this[W], t = arguments.length, n = new Array(t), r = 0; r < t; r++ ) n[r] = arguments[r]; return e.spliceWithArray_(e.values_.length, 0, n), e.values_.length; }, pop: function () { return this.splice(Math.max(this[W].values_.length - 1, 0), 1)[0]; }, shift: function () { return this.splice(0, 1)[0]; }, unshift: function () { for ( var e = this[W], t = arguments.length, n = new Array(t), r = 0; r < t; r++ ) n[r] = arguments[r]; return e.spliceWithArray_(0, 0, n), e.values_.length; }, reverse: function () { return ( lt.trackingDerivation && a(37, 'reverse'), this.replace(this.slice().reverse()), this ); }, sort: function () { lt.trackingDerivation && a(37, 'sort'); var e = this.slice(); return e.sort.apply(e, arguments), this.replace(e), this; }, remove: function (e) { var t = this[W], n = t.dehanceValues_(t.values_).indexOf(e); return n > -1 && (this.splice(n, 1), !0); } }; function cn(e, t) { 'function' == typeof Array.prototype[e] && (ln[e] = t(e)); } function un(e) { return function () { var t = this[W]; t.atom_.reportObserved(); var n = t.dehanceValues_(t.values_); return n[e].apply(n, arguments); }; } function pn(e) { return function (t, n) { var r = this, o = this[W]; return ( o.atom_.reportObserved(), o.dehanceValues_(o.values_)[e](function (e, o) { return t.call(n, e, o, r); }) ); }; } function dn(e) { return function () { var t = this, n = this[W]; n.atom_.reportObserved(); var r = n.dehanceValues_(n.values_), o = arguments[0]; return ( (arguments[0] = function (e, n, r) { return o(e, n, r, t); }), r[e].apply(r, arguments) ); }; } cn('concat', un), cn('flat', un), cn('includes', un), cn('indexOf', un), cn('join', un), cn('lastIndexOf', un), cn('slice', un), cn('toString', un), cn('toLocaleString', un), cn('every', pn), cn('filter', pn), cn('find', pn), cn('findIndex', pn), cn('flatMap', pn), cn('forEach', pn), cn('map', pn), cn('some', pn), cn('reduce', dn), cn('reduceRight', dn); var fn, hn, mn = P('ObservableArrayAdministration', an); function gn(e) { return k(e) && mn(e[W]); } var yn = {}, vn = 'add', bn = 'delete'; (fn = Symbol.iterator), (hn = Symbol.toStringTag); var wn, xn, kn = (function () { function e(e, t, n) { void 0 === t && (t = Q), void 0 === n && (n = 'ObservableMap'), (this.enhancer_ = void 0), (this.name_ = void 0), (this[W] = yn), (this.data_ = void 0), (this.hasMap_ = void 0), (this.keysAtom_ = void 0), (this.interceptors_ = void 0), (this.changeListeners_ = void 0), (this.dehancer = void 0), (this.enhancer_ = t), (this.name_ = n), w(Map) || a(18), (this.keysAtom_ = K('ObservableMap.keys()')), (this.data_ = new Map()), (this.hasMap_ = new Map()), this.merge(e); } var t = e.prototype; return ( (t.has_ = function (e) { return this.data_.has(e); }), (t.has = function (e) { var t = this; if (!lt.trackingDerivation) return this.has_(e); var n = this.hasMap_.get(e); if (!n) { var r = (n = new Be( this.has_(e), X, 'ObservableMap.key?', !1 )); this.hasMap_.set(e, r), jt(r, function () { return t.hasMap_.delete(e); }); } return n.get(); }), (t.set = function (e, t) { var n = this.has_(e); if (Gt(this)) { var r = Xt(this, { type: n ? rn : vn, object: this, newValue: t, name: e }); if (!r) return this; t = r.newValue; } return n ? this.updateValue_(e, t) : this.addValue_(e, t), this; }), (t.delete = function (e) { var t = this; if ( (this.keysAtom_, Gt(this) && !Xt(this, { type: bn, object: this, name: e })) ) return !1; if (this.has_(e)) { var n = Jt(this), r = n ? { observableKind: 'map', debugObjectName: this.name_, type: bn, object: this, oldValue: this.data_.get(e).value_, name: e } : null; return ( Ht(function () { t.keysAtom_.reportChanged(), t.updateHasMapEntry_(e, !1), t.data_.get(e).setNewValue_(void 0), t.data_.delete(e); }), n && en(this, r), !0 ); } return !1; }), (t.updateHasMapEntry_ = function (e, t) { var n = this.hasMap_.get(e); n && n.setNewValue_(t); }), (t.updateValue_ = function (e, t) { var n = this.data_.get(e); if ((t = n.prepareNewValue_(t)) !== lt.UNCHANGED) { var r = Jt(this), o = r ? { observableKind: 'map', debugObjectName: this.name_, type: rn, object: this, oldValue: n.value_, name: e, newValue: t } : null; n.setNewValue_(t), r && en(this, o); } }), (t.addValue_ = function (e, t) { var n = this; this.keysAtom_, Ht(function () { var r = new Be(t, n.enhancer_, 'ObservableMap.key', !1); n.data_.set(e, r), (t = r.value_), n.updateHasMapEntry_(e, !0), n.keysAtom_.reportChanged(); }); var r = Jt(this), o = r ? { observableKind: 'map', debugObjectName: this.name_, type: vn, object: this, name: e, newValue: t } : null; r && en(this, o); }), (t.get = function (e) { return this.has(e) ? this.dehanceValue_(this.data_.get(e).get()) : this.dehanceValue_(void 0); }), (t.dehanceValue_ = function (e) { return void 0 !== this.dehancer ? this.dehancer(e) : e; }), (t.keys = function () { return this.keysAtom_.reportObserved(), this.data_.keys(); }),