mirror of
https://github.com/XiaoDaiGua-Ray/ray-template.git
synced 2025-06-18 15:49:16 +08:00
30 lines
50 KiB
JavaScript
30 lines
50 KiB
JavaScript
var Wt="An invariant failed, however the error is obfuscated because this is a production build.",Oe=[];Object.freeze(Oe);var ze={};Object.freeze(ze);function g(){return++u.mobxGuid}function h(e){throw q(!1,e),"X"}function q(e,t){if(!e)throw new Error("[mobx] "+(t||Wt))}function pt(e){var t=!1;return function(){if(!t)return t=!0,e.apply(this,arguments)}}var pe=function(){};function Xt(e){var t=[];return e.forEach(function(r){t.indexOf(r)===-1&&t.push(r)}),t}function He(e){return e!==null&&typeof e=="object"}function Q(e){if(e===null||typeof e!="object")return!1;var t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}function kt(e){if(te(e)||w(e))return e;if(Array.isArray(e))return new Map(e);if(Q(e)){var t=new Map;for(var r in e)t.set(r,e[r]);return t}else return h("Cannot convert to map from '"+e+"'")}function ee(e,t,r){Object.defineProperty(e,t,{enumerable:!1,writable:!0,configurable:!0,value:r})}function Yt(e,t,r){Object.defineProperty(e,t,{enumerable:!1,writable:!1,configurable:!0,value:r})}function $t(e,t){var r=Object.getOwnPropertyDescriptor(e,t);return!r||r.configurable!==!1&&r.writable!==!1}function V(e,t){var r="isMobX"+e;return t.prototype[r]=!0,function(n){return He(n)&&n[r]===!0}}function te(e){return e instanceof Map}function fe(e){return e instanceof Set}function dt(e){var t=new Set;for(var r in e)t.add(r);return Object.getOwnPropertySymbols(e).forEach(function(n){Object.getOwnPropertyDescriptor(e,n).enumerable&&t.add(n)}),Array.from(t)}function L(e){return e&&e.toString?e.toString():new String(e).toString()}function yt(e){return e===null?null:typeof e=="object"?""+e:e}var Zt=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,c=Symbol("mobx administration"),re=function(){function e(t){t===void 0&&(t="Atom@"+g()),this.name=t,this.isPendingUnobservation=!1,this.isBeingObserved=!1,this.observers=new Set,this.diffValue=0,this.lastAccessedBy=0,this.lowestObserverState=v.NOT_TRACKING}return e.prototype.onBecomeObserved=function(){this.onBecomeObservedListeners&&this.onBecomeObservedListeners.forEach(function(t){return t()})},e.prototype.onBecomeUnobserved=function(){this.onBecomeUnobservedListeners&&this.onBecomeUnobservedListeners.forEach(function(t){return t()})},e.prototype.reportObserved=function(){return Ct(this)},e.prototype.reportChanged=function(){E(),Ar(this),_()},e.prototype.toString=function(){return this.name},e}(),Fe=V("Atom",re);function bt(e,t,r){t===void 0&&(t=pe),r===void 0&&(r=pe);var n=new re(e);return t!==pe&&Mr(n,t),r!==pe&&Mt(n,r),n}function Qt(e,t){return Ht(e,t)}function er(e,t){return Object.is(e,t)}var k={structural:Qt,default:er};/*! *****************************************************************************
|
|
Copyright (c) Microsoft Corporation. All rights reserved.
|
|
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
|
this file except in compliance with the License. You may obtain a copy of the
|
|
License at http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
|
|
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
|
|
MERCHANTABLITY OR NON-INFRINGEMENT.
|
|
|
|
See the Apache Version 2.0 License for specific language governing permissions
|
|
and limitations under the License.
|
|
***************************************************************************** */var Ie=function(e,t){return Ie=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)n.hasOwnProperty(i)&&(r[i]=n[i])},Ie(e,t)};function tr(e,t){Ie(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var Ae=function(){return Ae=Object.assign||function(t){for(var r,n=1,i=arguments.length;n<i;n++){r=arguments[n];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t},Ae.apply(this,arguments)};function C(e){var t=typeof Symbol=="function"&&e[Symbol.iterator],r=0;return t?t.call(e):{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}}}function X(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,a=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)a.push(i.value)}catch(s){o={error:s}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return a}function Je(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(X(arguments[t]));return e}var Se=Symbol("mobx did run lazy initializers"),ae=Symbol("mobx pending decorators"),rr={},nr={};function ir(e,t){var r=t?rr:nr;return r[e]||(r[e]={configurable:!0,enumerable:t,get:function(){return F(this),this[e]},set:function(n){F(this),this[e]=n}})}function F(e){var t,r;if(e[Se]!==!0){var n=e[ae];if(n){ee(e,Se,!0);var i=Je(Object.getOwnPropertySymbols(n),Object.keys(n));try{for(var a=C(i),o=a.next();!o.done;o=a.next()){var s=o.value,f=n[s];f.propertyCreator(e,f.prop,f.descriptor,f.decoratorTarget,f.decoratorArguments)}}catch(l){t={error:l}}finally{try{o&&!o.done&&(r=a.return)&&r.call(a)}finally{if(t)throw t.error}}}}}function gt(e,t){return function(){var n,i=function(o,s,f,l){if(l===!0)return t(o,s,f,o,n),null;if(!Object.prototype.hasOwnProperty.call(o,ae)){var p=o[ae];ee(o,ae,Ae({},p))}return o[ae][s]={prop:s,propertyCreator:t,descriptor:f,decoratorTarget:o,decoratorArguments:n},ir(s,e)};return ar(arguments)?(n=Oe,i.apply(null,arguments)):(n=Array.prototype.slice.call(arguments),i)}}function ar(e){return(e.length===2||e.length===3)&&(typeof e[1]=="string"||typeof e[1]=="symbol")||e.length===4&&e[3]===!0}function ce(e,t,r){return Ce(e)?e:Array.isArray(e)?O.array(e,{name:r}):Q(e)?O.object(e,void 0,{name:r}):te(e)?O.map(e,{name:r}):fe(e)?O.set(e,{name:r}):e}function or(e,t,r){return e==null||B(e)||G(e)||w(e)||S(e)?e:Array.isArray(e)?O.array(e,{name:r,deep:!1}):Q(e)?O.object(e,void 0,{name:r,deep:!1}):te(e)?O.map(e,{name:r,deep:!1}):fe(e)?O.set(e,{name:r,deep:!1}):h(!1)}function De(e){return e}function sr(e,t,r){return Ht(e,t)?t:e}function Pe(e){q(e);var t=gt(!0,function(n,i,a,o,s){var f=a?a.initializer?a.initializer.call(n):a.value:void 0;Ye(n).addObservableProp(i,f,e)}),r=t;return r.enhancer=e,r}var mt={deep:!0,name:void 0,defaultDecorator:void 0,proxy:!0};Object.freeze(mt);function W(e){return e==null?mt:typeof e=="string"?{name:e,deep:!0,proxy:!0}:e}var We=Pe(ce),ur=Pe(or),Ot=Pe(De),fr=Pe(sr);function de(e){return e.defaultDecorator?e.defaultDecorator.enhancer:e.deep===!1?De:ce}function cr(e,t,r){if(typeof arguments[1]=="string"||typeof arguments[1]=="symbol")return We.apply(null,arguments);if(Ce(e))return e;var n=Q(e)?O.object(e,t,r):Array.isArray(e)?O.array(e,t):te(e)?O.map(e,t):fe(e)?O.set(e,t):e;if(n!==e)return n;h(!1)}var rt={box:function(e,t){arguments.length>2&&ie("box");var r=W(t);return new H(e,de(r),r.name,!0,r.equals)},array:function(e,t){arguments.length>2&&ie("array");var r=W(t);return Hr(e,de(r),r.name)},map:function(e,t){arguments.length>2&&ie("map");var r=W(t);return new Kt(e,de(r),r.name)},set:function(e,t){arguments.length>2&&ie("set");var r=W(t);return new qt(e,de(r),r.name)},object:function(e,t,r){typeof arguments[1]=="string"&&ie("object");var n=W(r);if(n.proxy===!1)return ot({},e,t,n);var i=Nt(n),a=ot({},void 0,void 0,n),o=Kr(a);return Lt(o,e,t,i),o},ref:Ot,shallow:ur,deep:We,struct:fr},O=cr;Object.keys(rt).forEach(function(e){return O[e]=rt[e]});function ie(e){h("Expected one or two arguments to observable."+e+". Did you accidentally try to use observable."+e+" as decorator?")}var we=gt(!1,function(e,t,r,n,i){var a=r.get,o=r.set,s=i[0]||{};Ye(e).addComputedProp(e,t,Ae({get:a,set:o,context:e},s))}),lr=we({equals:k.structural}),hr=function(t,r,n){if(typeof r=="string"||t!==null&&typeof t=="object"&&arguments.length===1)return we.apply(null,arguments);var i=typeof r=="object"?r:{};return i.get=t,i.set=typeof r=="function"?r:i.set,i.name=i.name||t.name||"",new $(i)};hr.struct=lr;var v;(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"})(v||(v={}));var T;(function(e){e[e.NONE=0]="NONE",e[e.LOG=1]="LOG",e[e.BREAK=2]="BREAK"})(T||(T={}));var Ee=function(){function e(t){this.cause=t}return e}();function oe(e){return e instanceof Ee}function Ue(e){switch(e.dependenciesState){case v.UP_TO_DATE:return!1;case v.NOT_TRACKING:case v.STALE:return!0;case v.POSSIBLY_STALE:{for(var t=Xe(!0),r=ne(),n=e.observing,i=n.length,a=0;a<i;a++){var o=n[a];if(Z(o)){if(u.disableErrorBoundaries)o.get();else try{o.get()}catch{return I(r),se(t),!0}if(e.dependenciesState===v.STALE)return I(r),se(t),!0}}return wt(e),I(r),se(t),!1}}}function Y(e){var t=e.observers.size>0;u.computationDepth>0&&t&&h(!1),!u.allowStateChanges&&(t||u.enforceActions==="strict")&&h(!1)}function At(e,t,r){var n=Xe(!0);wt(e),e.newObserving=new Array(e.observing.length+100),e.unboundDepsCount=0,e.runId=++u.runId;var i=u.trackingDerivation;u.trackingDerivation=e;var a;if(u.disableErrorBoundaries===!0)a=t.call(r);else try{a=t.call(r)}catch(o){a=new Ee(o)}return u.trackingDerivation=i,vr(e),se(n),a}function vr(e){for(var t=e.observing,r=e.observing=e.newObserving,n=v.UP_TO_DATE,i=0,a=e.unboundDepsCount,o=0;o<a;o++){var s=r[o];s.diffValue===0&&(s.diffValue=1,i!==o&&(r[i]=s),i++),s.dependenciesState>n&&(n=s.dependenciesState)}for(r.length=i,e.newObserving=null,a=t.length;a--;){var s=t[a];s.diffValue===0&&xt(s,e),s.diffValue=0}for(;i--;){var s=r[i];s.diffValue===1&&(s.diffValue=0,Or(s,e))}n!==v.UP_TO_DATE&&(e.dependenciesState=n,e.onBecomeStale())}function Ve(e){var t=e.observing;e.observing=[];for(var r=t.length;r--;)xt(t[r],e);e.dependenciesState=v.NOT_TRACKING}function St(e){var t=ne();try{return e()}finally{I(t)}}function ne(){var e=u.trackingDerivation;return u.trackingDerivation=null,e}function I(e){u.trackingDerivation=e}function Xe(e){var t=u.allowStateReads;return u.allowStateReads=e,t}function se(e){u.allowStateReads=e}function wt(e){if(e.dependenciesState!==v.UP_TO_DATE){e.dependenciesState=v.UP_TO_DATE;for(var t=e.observing,r=t.length;r--;)t[r].lowestObserverState=v.UP_TO_DATE}}var _e=0,pr=1,nt=Object.getOwnPropertyDescriptor(function(){},"name");nt&&nt.configurable;function z(e,t,r){var n=function(){return Et(e,t,r||this,arguments)};return n.isMobxAction=!0,n}function Et(e,t,r,n){var i=dr();try{return t.apply(r,n)}catch(a){throw i.error=a,a}finally{yr(i)}}function dr(e,t,r){var n=A(),i=0,a=ne();E();var o=je(!0),s=Xe(!0),f={prevDerivation:a,prevAllowStateChanges:o,prevAllowStateReads:s,notifySpy:n,startTime:i,actionId:pr++,parentActionId:_e};return _e=f.actionId,f}function yr(e){_e!==e.actionId&&h("invalid action stack. did you forget to finish an action?"),_e=e.parentActionId,e.error!==void 0&&(u.suppressReactionErrors=!0),Me(e.prevAllowStateChanges),se(e.prevAllowStateReads),_(),I(e.prevDerivation),e.notifySpy,u.suppressReactionErrors=!1}function je(e){var t=u.allowStateChanges;return u.allowStateChanges=e,t}function Me(e){u.allowStateChanges=e}var H=function(e){tr(t,e);function t(r,n,i,a,o){i===void 0&&(i="ObservableValue@"+g()),o===void 0&&(o=k.default);var s=e.call(this,i)||this;return s.enhancer=n,s.name=i,s.equals=o,s.hasUnreportedChange=!1,s.value=n(r,void 0,i),s}return t.prototype.dehanceValue=function(r){return this.dehancer!==void 0?this.dehancer(r):r},t.prototype.set=function(r){this.value,r=this.prepareNewValue(r),r!==u.UNCHANGED&&this.setNewValue(r)},t.prototype.prepareNewValue=function(r){if(Y(this),D(this)){var n=P(this,{object:this,type:"update",newValue:r});if(!n)return u.UNCHANGED;r=n.newValue}return r=this.enhancer(r,this.value,this.name),this.equals(this.value,r)?u.UNCHANGED:r},t.prototype.setNewValue=function(r){var n=this.value;this.value=r,this.reportChanged(),x(this)&&R(this,{type:"update",object:this,newValue:r,oldValue:n})},t.prototype.get=function(){return this.reportObserved(),this.dehanceValue(this.value)},t.prototype.intercept=function(r){return le(this,r)},t.prototype.observe=function(r,n){return n&&r({object:this,type:"update",newValue:this.value,oldValue:void 0}),he(this,r)},t.prototype.toJSON=function(){return this.get()},t.prototype.toString=function(){return this.name+"["+this.value+"]"},t.prototype.valueOf=function(){return yt(this.get())},t.prototype[Symbol.toPrimitive]=function(){return this.valueOf()},t}(re),br=V("ObservableValue",H),$=function(){function e(t){this.dependenciesState=v.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=v.UP_TO_DATE,this.unboundDepsCount=0,this.__mapid="#"+g(),this.value=new Ee(null),this.isComputing=!1,this.isRunningSetter=!1,this.isTracing=T.NONE,q(t.get,"missing option for computed: get"),this.derivation=t.get,this.name=t.name||"ComputedValue@"+g(),t.set&&(this.setter=z(this.name+"-setter",t.set)),this.equals=t.equals||(t.compareStructural||t.struct?k.structural:k.default),this.scope=t.context,this.requiresReaction=!!t.requiresReaction,this.keepAlive=!!t.keepAlive}return e.prototype.onBecomeStale=function(){wr(this)},e.prototype.onBecomeObserved=function(){this.onBecomeObservedListeners&&this.onBecomeObservedListeners.forEach(function(t){return t()})},e.prototype.onBecomeUnobserved=function(){this.onBecomeUnobservedListeners&&this.onBecomeUnobservedListeners.forEach(function(t){return t()})},e.prototype.get=function(){this.isComputing&&h("Cycle detected in computation "+this.name+": "+this.derivation),u.inBatch===0&&this.observers.size===0&&!this.keepAlive?Ue(this)&&(this.warnAboutUntrackedRead(),E(),this.value=this.computeValue(!1),_()):(Ct(this),Ue(this)&&this.trackAndCompute()&&Sr(this));var t=this.value;if(oe(t))throw t.cause;return t},e.prototype.peek=function(){var t=this.computeValue(!1);if(oe(t))throw t.cause;return t},e.prototype.set=function(t){if(this.setter){q(!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,t)}finally{this.isRunningSetter=!1}}else q(!1,!1)},e.prototype.trackAndCompute=function(){var t=this.value,r=this.dependenciesState===v.NOT_TRACKING,n=this.computeValue(!0),i=r||oe(t)||oe(n)||!this.equals(t,n);return i&&(this.value=n),i},e.prototype.computeValue=function(t){this.isComputing=!0,u.computationDepth++;var r;if(t)r=At(this,this.derivation,this.scope);else if(u.disableErrorBoundaries===!0)r=this.derivation.call(this.scope);else try{r=this.derivation.call(this.scope)}catch(n){r=new Ee(n)}return u.computationDepth--,this.isComputing=!1,r},e.prototype.suspend=function(){this.keepAlive||(Ve(this),this.value=void 0)},e.prototype.observe=function(t,r){var n=this,i=!0,a=void 0;return Dr(function(){var o=n.get();if(!i||r){var s=ne();t({type:"update",object:n,newValue:o,oldValue:a}),I(s)}i=!1,a=o})},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 yt(this.get())},e.prototype[Symbol.toPrimitive]=function(){return this.valueOf()},e}(),Z=V("ComputedValue",$),ge=function(){function e(){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}return e}(),gr={};function Ge(){return typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:gr}var me=!0,_t=!1,u=function(){var e=Ge();return e.__mobxInstanceCount>0&&!e.__mobxGlobals&&(me=!1),e.__mobxGlobals&&e.__mobxGlobals.version!==new ge().version&&(me=!1),me?e.__mobxGlobals?(e.__mobxInstanceCount+=1,e.__mobxGlobals.UNCHANGED||(e.__mobxGlobals.UNCHANGED={}),e.__mobxGlobals):(e.__mobxInstanceCount=1,e.__mobxGlobals=new ge):(setTimeout(function(){_t||h("There are multiple, different versions of MobX active. Make sure MobX is loaded only once or use `configure({ isolateGlobalState: true })`")},1),new ge)}();function mr(){(u.pendingReactions.length||u.inBatch||u.isRunningReactions)&&h("isolateGlobalState should be called before MobX is running any reactions"),_t=!0,me&&(--Ge().__mobxInstanceCount===0&&(Ge().__mobxGlobals=void 0),u=new ge)}function en(){return u}function Or(e,t){e.observers.add(t),e.lowestObserverState>t.dependenciesState&&(e.lowestObserverState=t.dependenciesState)}function xt(e,t){e.observers.delete(t),e.observers.size===0&&Rt(e)}function Rt(e){e.isPendingUnobservation===!1&&(e.isPendingUnobservation=!0,u.pendingUnobservations.push(e))}function E(){u.inBatch++}function _(){if(--u.inBatch===0){Pt();for(var e=u.pendingUnobservations,t=0;t<e.length;t++){var r=e[t];r.isPendingUnobservation=!1,r.observers.size===0&&(r.isBeingObserved&&(r.isBeingObserved=!1,r.onBecomeUnobserved()),r instanceof $&&r.suspend())}u.pendingUnobservations=[]}}function Ct(e){var t=u.trackingDerivation;return t!==null?(t.runId!==e.lastAccessedBy&&(e.lastAccessedBy=t.runId,t.newObserving[t.unboundDepsCount++]=e,e.isBeingObserved||(e.isBeingObserved=!0,e.onBecomeObserved())),!0):(e.observers.size===0&&u.inBatch>0&&Rt(e),!1)}function Ar(e){e.lowestObserverState!==v.STALE&&(e.lowestObserverState=v.STALE,e.observers.forEach(function(t){t.dependenciesState===v.UP_TO_DATE&&(t.isTracing!==T.NONE&&Tt(t,e),t.onBecomeStale()),t.dependenciesState=v.STALE}))}function Sr(e){e.lowestObserverState!==v.STALE&&(e.lowestObserverState=v.STALE,e.observers.forEach(function(t){t.dependenciesState===v.POSSIBLY_STALE?t.dependenciesState=v.STALE:t.dependenciesState===v.UP_TO_DATE&&(e.lowestObserverState=v.UP_TO_DATE)}))}function wr(e){e.lowestObserverState===v.UP_TO_DATE&&(e.lowestObserverState=v.POSSIBLY_STALE,e.observers.forEach(function(t){t.dependenciesState===v.UP_TO_DATE&&(t.dependenciesState=v.POSSIBLY_STALE,t.isTracing!==T.NONE&&Tt(t,e),t.onBecomeStale())}))}function Tt(e,t){if(""+e.name+t.name,e.isTracing===T.BREAK){var r=[];Dt(Br(e),r,1),new Function(`debugger;
|
|
/*
|
|
Tracing '`+e.name+`'
|
|
|
|
You are entering this break point because derivation '`+e.name+"' is being traced and '"+t.name+`' is now forcing it to update.
|
|
Just follow the stacktrace you should now see in the devtools to see precisely what piece of your code is causing this update
|
|
The stackframe you are looking for is at least ~6-8 stack-frames up.
|
|
|
|
`+(e instanceof $?e.derivation.toString().replace(/[*]\//g,"/"):"")+`
|
|
|
|
The dependencies for this derivation are:
|
|
|
|
`+r.join(`
|
|
`)+`
|
|
*/
|
|
`)()}}function Dt(e,t,r){if(t.length>=1e3){t.push("(and many more)");return}t.push(""+new Array(r).join(" ")+e.name),e.dependencies&&e.dependencies.forEach(function(n){return Dt(n,t,r+1)})}var xe=function(){function e(t,r,n,i){t===void 0&&(t="Reaction@"+g()),i===void 0&&(i=!1),this.name=t,this.onInvalidate=r,this.errorHandler=n,this.requiresObservable=i,this.observing=[],this.newObserving=[],this.dependenciesState=v.NOT_TRACKING,this.diffValue=0,this.runId=0,this.unboundDepsCount=0,this.__mapid="#"+g(),this.isDisposed=!1,this._isScheduled=!1,this._isTrackPending=!1,this._isRunning=!1,this.isTracing=T.NONE}return e.prototype.onBecomeStale=function(){this.schedule()},e.prototype.schedule=function(){this._isScheduled||(this._isScheduled=!0,u.pendingReactions.push(this),Pt())},e.prototype.isScheduled=function(){return this._isScheduled},e.prototype.runReaction=function(){if(!this.isDisposed){if(E(),this._isScheduled=!1,Ue(this)){this._isTrackPending=!0;try{this.onInvalidate(),this._isTrackPending&&A()}catch(t){this.reportExceptionInDerivation(t)}}_()}},e.prototype.track=function(t){if(!this.isDisposed){E(),this._isRunning=!0;var r=At(this,t,void 0);this._isRunning=!1,this._isTrackPending=!1,this.isDisposed&&Ve(this),oe(r)&&this.reportExceptionInDerivation(r.cause),_()}},e.prototype.reportExceptionInDerivation=function(t){var r=this;if(this.errorHandler){this.errorHandler(t,this);return}if(u.disableErrorBoundaries)throw t;var n="[mobx] Encountered an uncaught exception that was thrown by a reaction or observer component, in: '"+this+"'";u.suppressReactionErrors?console.warn("[mobx] (error in reaction '"+this.name+"' suppressed, fix error of causing action below)"):console.error(n,t),u.globalReactionErrorHandlers.forEach(function(i){return i(t,r)})},e.prototype.dispose=function(){this.isDisposed||(this.isDisposed=!0,this._isRunning||(E(),Ve(this),_()))},e.prototype.getDisposer=function(){var t=this.dispose.bind(this);return t[c]=this,t},e.prototype.toString=function(){return"Reaction["+this.name+"]"},e.prototype.trace=function(t){t===void 0&&(t=!1),Ur(this,t)},e}(),it=100,Ke=function(e){return e()};function Pt(){u.inBatch>0||u.isRunningReactions||Ke(Er)}function Er(){u.isRunningReactions=!0;for(var e=u.pendingReactions,t=0;e.length>0;){++t===it&&(console.error("Reaction doesn't converge to a stable state after "+it+" iterations."+(" Probably there is a cycle in the reactive function: "+e[0])),e.splice(0));for(var r=e.splice(0),n=0,i=r.length;n<i;n++)r[n].runReaction()}u.isRunningReactions=!1}var Re=V("Reaction",xe);function _r(e){var t=Ke;Ke=function(r){return e(function(){return t(r)})}}function A(){return!1}function xr(e){return console.warn("[mobx.spy] Is a no-op in production builds"),function(){}}function Rr(){h(!1)}function at(e){return function(t,r,n){if(n){if(n.value)return{value:z(e,n.value),enumerable:!1,configurable:!0,writable:!0};var i=n.initializer;return{enumerable:!1,configurable:!0,writable:!0,initializer:function(){return z(e,i.call(this))}}}return Cr(e).apply(this,arguments)}}function Cr(e){return function(t,r,n){Object.defineProperty(t,r,{configurable:!0,enumerable:!1,get:function(){},set:function(i){ee(this,r,ke(e,i))}})}}function Tr(e,t,r,n){return n===!0?(Le(e,t,r.value),null):r?{configurable:!0,enumerable:!1,get:function(){return Le(this,t,r.value||r.initializer.call(this)),this[t]},set:Rr}:{enumerable:!1,configurable:!0,set:function(i){Le(this,t,i)},get:function(){}}}var ke=function(t,r,n,i){if(arguments.length===1&&typeof t=="function")return z(t.name||"<unnamed action>",t);if(arguments.length===2&&typeof r=="function")return z(t,r);if(arguments.length===1&&typeof t=="string")return at(t);if(i===!0)ee(t,r,z(t.name||r,n.value,this));else return at(r).apply(null,arguments)};ke.bound=Tr;function tn(e,t){var r=typeof e=="string"?e:e.name||"<unnamed action>",n=typeof e=="function"?e:t;return Et(r,n,this,void 0)}function Le(e,t,r){ee(e,t,z(t,r.bind(e)))}function Dr(e,t){t===void 0&&(t=ze);var r=t&&t.name||e.name||"Autorun@"+g(),n=!t.scheduler&&!t.delay,i;if(n)i=new xe(r,function(){this.track(s)},t.onError,t.requiresObservable);else{var a=jt(t),o=!1;i=new xe(r,function(){o||(o=!0,a(function(){o=!1,i.isDisposed||i.track(s)}))},t.onError,t.requiresObservable)}function s(){e(i)}return i.schedule(),i.getDisposer()}var Pr=function(e){return e()};function jt(e){return e.scheduler?e.scheduler:e.delay?function(t){return setTimeout(t,e.delay)}:Pr}function rn(e,t,r){r===void 0&&(r=ze);var n=r.name||"Reaction@"+g(),i=ke(n,r.onError?jr(r.onError,t):t),a=!r.scheduler&&!r.delay,o=jt(r),s=!0,f=!1,l,p=r.compareStructural?k.structural:r.equals||k.default,d=new xe(n,function(){s||a?y():f||(f=!0,o(y))},r.onError,r.requiresObservable);function y(){if(f=!1,!d.isDisposed){var b=!1;d.track(function(){var m=e(d);b=s||!p(l,m),l=m}),s&&r.fireImmediately&&i(l,d),!s&&b===!0&&i(l,d),s&&(s=!1)}}return d.schedule(),d.getDisposer()}function jr(e,t){return function(){try{return t.apply(this,arguments)}catch(r){e.call(this,r)}}}function Mr(e,t,r){return Bt("onBecomeObserved",e,t)}function Mt(e,t,r){return Bt("onBecomeUnobserved",e,t)}function Bt(e,t,r,n){var i=U(t),a=r,o=e+"Listeners";i[o]?i[o].add(a):i[o]=new Set([a]);var s=i[e];return typeof s!="function"?h(!1):function(){var f=i[o];f&&(f.delete(a),f.size===0&&delete i[o])}}function nn(e){var t=e.enforceActions,r=e.computedRequiresReaction,n=e.computedConfigurable,i=e.disableErrorBoundaries,a=e.reactionScheduler,o=e.reactionRequiresObservable,s=e.observableRequiresReaction;if(mr(),t!==void 0){var f=void 0;switch(t){case!0:case"observed":f=!0;break;case!1:case"never":f=!1;break;case"strict":case"always":f="strict";break;default:h("Invalid value for 'enforceActions': '"+t+"', expected 'never', 'always' or 'observed'")}u.enforceActions=f,u.allowStateChanges=!(f===!0||f==="strict")}r!==void 0&&(u.computedRequiresReaction=!!r),o!==void 0&&(u.reactionRequiresObservable=!!o),s!==void 0&&(u.observableRequiresReaction=!!s,u.allowStateReads=!u.observableRequiresReaction),n!==void 0&&(u.computedConfigurable=!!n),i!==void 0&&(i===!0&&console.warn("WARNING: Debug feature only. MobX will NOT recover from errors when `disableErrorBoundaries` is enabled."),u.disableErrorBoundaries=!!i),a&&_r(a)}function ot(e,t,r,n){n=W(n);var i=Nt(n);return F(e),Ye(e,n.name,i.enhancer),t&&Lt(e,t,r,i),e}function Nt(e){return e.defaultDecorator||(e.deep===!1?Ot:We)}function Lt(e,t,r,n){var i,a,o,s,f,l;E();try{var o=Zt(t);try{for(var p=C(o),d=p.next();!d.done;d=p.next()){var l=d.value,y=Object.getOwnPropertyDescriptor(t,l),b=r&&l in r?r[l]:y.get?we:n,m=b(e,l,y,!0);m&&Object.defineProperty(e,l,m)}}catch(K){i={error:K}}finally{try{d&&!d.done&&(a=p.return)&&a.call(p)}finally{if(i)throw i.error}}}finally{_()}}function Br(e,t){return It(U(e,t))}function It(e){var t={name:e.name};return e.observing&&e.observing.length>0&&(t.dependencies=Xt(e.observing).map(It)),t}function Ut(e,t){if(e==null)return!1;if(t!==void 0){if(B(e)===!1||!e[c].values.has(t))return!1;var r=U(e,t);return Z(r)}return Z(e)}function an(e){return arguments.length>1?h(!1):Ut(e)}function on(e,t){return typeof t!="string"?h(!1):Ut(e,t)}function Nr(e,t){return e==null?!1:B(e)||!!e[c]||Fe(e)||Re(e)||Z(e)}function Ce(e){return arguments.length!==1&&h(!1),Nr(e)}function ue(e){return B(e)?e[c].getKeys():w(e)||S(e)?Array.from(e.keys()):G(e)?e.map(function(t,r){return r}):h(!1)}function sn(e){return B(e)?ue(e).map(function(t){return e[t]}):w(e)?ue(e).map(function(t){return e.get(t)}):S(e)?Array.from(e.values()):G(e)?e.slice():h(!1)}function un(e){return B(e)?ue(e).map(function(t){return[t,e[t]]}):w(e)?ue(e).map(function(t){return[t,e.get(t)]}):S(e)?Array.from(e.entries()):G(e)?e.map(function(t,r){return[r,t]}):h(!1)}function Vt(e,t,r){if(arguments.length===2&&!S(e)){E();var n=t;try{for(var i in n)Vt(e,i,n[i])}finally{_()}return}if(B(e)){var a=e[c],o=a.values.get(t);o?a.write(t,r):a.addObservableProp(t,r,a.defaultEnhancer)}else if(w(e))e.set(t,r);else if(S(e))e.add(t);else if(G(e))typeof t!="number"&&(t=parseInt(t,10)),q(t>=0,"Not a valid index: '"+t+"'"),E(),t>=e.length&&(e.length=t+1),e[t]=r,_();else return h(!1)}function fn(e,t,r,n){return Lr(e,t,r)}function Lr(e,t,r){return $e(e).observe(t,r)}var Ir={detectCycles:!0,exportMapsAsObjects:!0,recurseEverything:!1};function J(e,t,r,n){return n.detectCycles&&e.set(t,r),r}function N(e,t,r){if(!t.recurseEverything&&!Ce(e)||typeof e!="object")return e;if(e===null)return null;if(e instanceof Date)return e;if(br(e))return N(e.get(),t,r);Ce(e)&&ue(e);var n=t.detectCycles===!0;if(n&&e!==null&&r.has(e))return r.get(e);if(G(e)||Array.isArray(e)){var i=J(r,e,[],t),a=e.map(function(b){return N(b,t,r)});i.length=a.length;for(var o=0,s=a.length;o<s;o++)i[o]=a[o];return i}if(S(e)||Object.getPrototypeOf(e)===Set.prototype)if(t.exportMapsAsObjects===!1){var f=J(r,e,new Set,t);return e.forEach(function(b){f.add(N(b,t,r))}),f}else{var l=J(r,e,[],t);return e.forEach(function(b){l.push(N(b,t,r))}),l}if(w(e)||Object.getPrototypeOf(e)===Map.prototype)if(t.exportMapsAsObjects===!1){var p=J(r,e,new Map,t);return e.forEach(function(b,m){p.set(m,N(b,t,r))}),p}else{var d=J(r,e,{},t);return e.forEach(function(b,m){d[m]=N(b,t,r)}),d}var y=J(r,e,{},t);return dt(e).forEach(function(b){y[b]=N(e[b],t,r)}),y}function cn(e,t){typeof t=="boolean"&&(t={detectCycles:t}),t||(t=Ir),t.detectCycles=t.detectCycles===void 0?t.recurseEverything===!0:t.detectCycles===!0;var r;return t.detectCycles&&(r=new Map),N(e,t,r)}function Ur(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=!1;typeof e[e.length-1]=="boolean"&&(r=e.pop());var n=Vr(e);if(!n)return h(!1);n.isTracing===T.NONE&&""+n.name,n.isTracing=r?T.BREAK:T.LOG}function Vr(e){switch(e.length){case 0:return u.trackingDerivation;case 1:return U(e[0]);case 2:return U(e[0],e[1])}}function M(e,t){t===void 0&&(t=void 0),E();try{return e.apply(t)}finally{_()}}function ye(e){return e[c]}function be(e){return typeof e=="string"||typeof e=="number"||typeof e=="symbol"}var Gr={has:function(e,t){if(t===c||t==="constructor"||t===Se)return!0;var r=ye(e);return be(t)?r.has(t):t in e},get:function(e,t){if(t===c||t==="constructor"||t===Se)return e[t];var r=ye(e),n=r.values.get(t);if(n instanceof re){var i=n.get();return i===void 0&&r.has(t),i}return be(t)&&r.has(t),e[t]},set:function(e,t,r){return be(t)?(Vt(e,t,r),!0):!1},deleteProperty:function(e,t){if(!be(t))return!1;var r=ye(e);return r.remove(t),!0},ownKeys:function(e){var t=ye(e);return t.keysAtom.reportObserved(),Reflect.ownKeys(e)},preventExtensions:function(e){return h("Dynamic observable objects cannot be frozen"),!1}};function Kr(e){var t=new Proxy(e,Gr);return e[c].proxy=t,t}function D(e){return e.interceptors!==void 0&&e.interceptors.length>0}function le(e,t){var r=e.interceptors||(e.interceptors=[]);return r.push(t),pt(function(){var n=r.indexOf(t);n!==-1&&r.splice(n,1)})}function P(e,t){var r=ne();try{for(var n=Je(e.interceptors||[]),i=0,a=n.length;i<a&&(t=n[i](t),q(!t||t.type,"Intercept handlers should return nothing or a change object"),!!t);i++);return t}finally{I(r)}}function x(e){return e.changeListeners!==void 0&&e.changeListeners.length>0}function he(e,t){var r=e.changeListeners||(e.changeListeners=[]);return r.push(t),pt(function(){var n=r.indexOf(t);n!==-1&&r.splice(n,1)})}function R(e,t){var r=ne(),n=e.changeListeners;if(n){n=n.slice();for(var i=0,a=n.length;i<a;i++)n[i](t);I(r)}}var qr=1e4,zr={get:function(e,t){return t===c?e[c]:t==="length"?e[c].getArrayLength():typeof t=="number"?j.get.call(e,t):typeof t=="string"&&!isNaN(t)?j.get.call(e,parseInt(t)):j.hasOwnProperty(t)?j[t]:e[t]},set:function(e,t,r){return t==="length"&&e[c].setArrayLength(r),typeof t=="number"&&j.set.call(e,t,r),typeof t=="symbol"||isNaN(t)?e[t]=r:j.set.call(e,parseInt(t),r),!0},preventExtensions:function(e){return h("Observable arrays cannot be frozen"),!1}};function Hr(e,t,r,n){r===void 0&&(r="ObservableArray@"+g()),n===void 0&&(n=!1);var i=new Gt(r,t,n);Yt(i.values,c,i);var a=new Proxy(i.values,zr);if(i.proxy=a,e&&e.length){var o=je(!0);i.spliceWithArray(0,0,e),Me(o)}return a}var Gt=function(){function e(t,r,n){this.owned=n,this.values=[],this.proxy=void 0,this.lastKnownLength=0,this.atom=new re(t||"ObservableArray@"+g()),this.enhancer=function(i,a){return r(i,a,t+"[..]")}}return e.prototype.dehanceValue=function(t){return this.dehancer!==void 0?this.dehancer(t):t},e.prototype.dehanceValues=function(t){return this.dehancer!==void 0&&t.length>0?t.map(this.dehancer):t},e.prototype.intercept=function(t){return le(this,t)},e.prototype.observe=function(t,r){return r===void 0&&(r=!1),r&&t({object:this.proxy,type:"splice",index:0,added:this.values.slice(),addedCount:this.values.length,removed:[],removedCount:0}),he(this,t)},e.prototype.getArrayLength=function(){return this.atom.reportObserved(),this.values.length},e.prototype.setArrayLength=function(t){if(typeof t!="number"||t<0)throw new Error("[mobx.array] Out of range: "+t);var r=this.values.length;if(t!==r)if(t>r){for(var n=new Array(t-r),i=0;i<t-r;i++)n[i]=void 0;this.spliceWithArray(r,0,n)}else this.spliceWithArray(t,r-t)},e.prototype.updateArrayLength=function(t,r){if(t!==this.lastKnownLength)throw new Error("[mobx] Modification exception: the internal structure of an observable array was changed.");this.lastKnownLength+=r},e.prototype.spliceWithArray=function(t,r,n){var i=this;Y(this.atom);var a=this.values.length;if(t===void 0?t=0:t>a?t=a:t<0&&(t=Math.max(0,a+t)),arguments.length===1?r=a-t:r==null?r=0:r=Math.max(0,Math.min(r,a-t)),n===void 0&&(n=Oe),D(this)){var o=P(this,{object:this.proxy,type:"splice",index:t,removedCount:r,added:n});if(!o)return Oe;r=o.removedCount,n=o.added}n=n.length===0?n:n.map(function(f){return i.enhancer(f,void 0)});var s=this.spliceItemsIntoValues(t,r,n);return(r!==0||n.length!==0)&&this.notifyArraySplice(t,n,s),this.dehanceValues(s)},e.prototype.spliceItemsIntoValues=function(t,r,n){var i;if(n.length<qr)return(i=this.values).splice.apply(i,Je([t,r],n));var a=this.values.slice(t,t+r);return this.values=this.values.slice(0,t).concat(n,this.values.slice(t+r)),a},e.prototype.notifyArrayChildUpdate=function(t,r,n){var i=!this.owned&&A(),a=x(this),o=a||i?{object:this.proxy,type:"update",index:t,newValue:r,oldValue:n}:null;this.atom.reportChanged(),a&&R(this,o)},e.prototype.notifyArraySplice=function(t,r,n){var i=!this.owned&&A(),a=x(this),o=a||i?{object:this.proxy,type:"splice",index:t,removed:n,added:r,removedCount:n.length,addedCount:r.length}:null;this.atom.reportChanged(),a&&R(this,o)},e}(),j={intercept:function(e){return this[c].intercept(e)},observe:function(e,t){t===void 0&&(t=!1);var r=this[c];return r.observe(e,t)},clear:function(){return this.splice(0)},replace:function(e){var t=this[c];return t.spliceWithArray(0,t.values.length,e)},toJS:function(){return this.slice()},toJSON:function(){return this.toJS()},splice:function(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var i=this[c];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,r){var n=this[c];return n.spliceWithArray(e,t,r)},push:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=this[c];return r.spliceWithArray(r.values.length,0,e),r.values.length},pop:function(){return this.splice(Math.max(this[c].values.length-1,0),1)[0]},shift:function(){return this.splice(0,1)[0]},unshift:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=this[c];return r.spliceWithArray(0,0,e),r.values.length},reverse:function(){var e=this.slice();return e.reverse.apply(e,arguments)},sort:function(e){var t=this.slice();return t.sort.apply(t,arguments)},remove:function(e){var t=this[c],r=t.dehanceValues(t.values).indexOf(e);return r>-1?(this.splice(r,1),!0):!1},get:function(e){var t=this[c];if(t){if(e<t.values.length)return t.atom.reportObserved(),t.dehanceValue(t.values[e]);console.warn("[mobx.array] Attempt to read an array index ("+e+") that is out of bounds ("+t.values.length+"). Please check length first. Out of bound indices will not be tracked by MobX")}},set:function(e,t){var r=this[c],n=r.values;if(e<n.length){Y(r.atom);var i=n[e];if(D(r)){var a=P(r,{type:"update",object:r.proxy,index:e,newValue:t});if(!a)return;t=a.newValue}t=r.enhancer(t,i);var o=t!==i;o&&(n[e]=t,r.notifyArrayChildUpdate(e,t,i))}else if(e===n.length)r.spliceWithArray(e,0,[t]);else throw new Error("[mobx.array] Index out of bounds, "+e+" is larger than "+n.length)}};["concat","flat","includes","indexOf","join","lastIndexOf","slice","toString","toLocaleString"].forEach(function(e){typeof Array.prototype[e]=="function"&&(j[e]=function(){var t=this[c];t.atom.reportObserved();var r=t.dehanceValues(t.values);return r[e].apply(r,arguments)})});["every","filter","find","findIndex","flatMap","forEach","map","some"].forEach(function(e){typeof Array.prototype[e]=="function"&&(j[e]=function(t,r){var n=this,i=this[c];i.atom.reportObserved();var a=i.dehanceValues(i.values);return a[e](function(o,s){return t.call(r,o,s,n)},r)})});["reduce","reduceRight"].forEach(function(e){j[e]=function(){var t=this,r=this[c];r.atom.reportObserved();var n=arguments[0];return arguments[0]=function(i,a,o){return a=r.dehanceValue(a),n(i,a,o,t)},r.values[e].apply(r.values,arguments)}});var Fr=V("ObservableArrayAdministration",Gt);function G(e){return He(e)&&Fr(e[c])}var st,Jr={},Kt=function(){function e(t,r,n){if(r===void 0&&(r=ce),n===void 0&&(n="ObservableMap@"+g()),this.enhancer=r,this.name=n,this[st]=Jr,this._keysAtom=bt(this.name+".keys()"),this[Symbol.toStringTag]="Map",typeof Map!="function")throw new Error("mobx.map requires Map polyfill for the current browser. Check babel-polyfill or core-js/es6/map.js");this._data=new Map,this._hasMap=new Map,this.merge(t)}return e.prototype._has=function(t){return this._data.has(t)},e.prototype.has=function(t){var r=this;if(!u.trackingDerivation)return this._has(t);var n=this._hasMap.get(t);if(!n){var i=n=new H(this._has(t),De,this.name+"."+L(t)+"?",!1);this._hasMap.set(t,i),Mt(i,function(){return r._hasMap.delete(t)})}return n.get()},e.prototype.set=function(t,r){var n=this._has(t);if(D(this)){var i=P(this,{type:n?"update":"add",object:this,newValue:r,name:t});if(!i)return this;r=i.newValue}return n?this._updateValue(t,r):this._addValue(t,r),this},e.prototype.delete=function(t){var r=this;if(Y(this._keysAtom),D(this)){var n=P(this,{type:"delete",object:this,name:t});if(!n)return!1}if(this._has(t)){var i=A(),a=x(this),n=a||i?{type:"delete",object:this,oldValue:this._data.get(t).value,name:t}:null;return M(function(){r._keysAtom.reportChanged(),r._updateHasMapEntry(t,!1);var s=r._data.get(t);s.setNewValue(void 0),r._data.delete(t)}),a&&R(this,n),!0}return!1},e.prototype._updateHasMapEntry=function(t,r){var n=this._hasMap.get(t);n&&n.setNewValue(r)},e.prototype._updateValue=function(t,r){var n=this._data.get(t);if(r=n.prepareNewValue(r),r!==u.UNCHANGED){var i=A(),a=x(this),o=a||i?{type:"update",object:this,oldValue:n.value,name:t,newValue:r}:null;n.setNewValue(r),a&&R(this,o)}},e.prototype._addValue=function(t,r){var n=this;Y(this._keysAtom),M(function(){var s=new H(r,n.enhancer,n.name+"."+L(t),!1);n._data.set(t,s),r=s.value,n._updateHasMapEntry(t,!0),n._keysAtom.reportChanged()});var i=A(),a=x(this),o=a||i?{type:"add",object:this,name:t,newValue:r}:null;a&&R(this,o)},e.prototype.get=function(t){return this.has(t)?this.dehanceValue(this._data.get(t).get()):this.dehanceValue(void 0)},e.prototype.dehanceValue=function(t){return this.dehancer!==void 0?this.dehancer(t):t},e.prototype.keys=function(){return this._keysAtom.reportObserved(),this._data.keys()},e.prototype.values=function(){var t=this,r=this.keys();return Te({next:function(){var n=r.next(),i=n.done,a=n.value;return{done:i,value:i?void 0:t.get(a)}}})},e.prototype.entries=function(){var t=this,r=this.keys();return Te({next:function(){var n=r.next(),i=n.done,a=n.value;return{done:i,value:i?void 0:[a,t.get(a)]}}})},e.prototype[st=c,Symbol.iterator]=function(){return this.entries()},e.prototype.forEach=function(t,r){var n,i;try{for(var a=C(this),o=a.next();!o.done;o=a.next()){var s=X(o.value,2),f=s[0],l=s[1];t.call(r,l,f,this)}}catch(p){n={error:p}}finally{try{o&&!o.done&&(i=a.return)&&i.call(a)}finally{if(n)throw n.error}}},e.prototype.merge=function(t){var r=this;return w(t)&&(t=t.toJS()),M(function(){var n=je(!0);try{Q(t)?dt(t).forEach(function(i){return r.set(i,t[i])}):Array.isArray(t)?t.forEach(function(i){var a=X(i,2),o=a[0],s=a[1];return r.set(o,s)}):te(t)?(t.constructor!==Map&&h("Cannot initialize from classes that inherit from Map: "+t.constructor.name),t.forEach(function(i,a){return r.set(a,i)})):t!=null&&h("Cannot initialize map from "+t)}finally{Me(n)}}),this},e.prototype.clear=function(){var t=this;M(function(){St(function(){var r,n;try{for(var i=C(t.keys()),a=i.next();!a.done;a=i.next()){var o=a.value;t.delete(o)}}catch(s){r={error:s}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}})})},e.prototype.replace=function(t){var r=this;return M(function(){var n,i,a,o,s=kt(t),f=new Map,l=!1;try{for(var p=C(r._data.keys()),d=p.next();!d.done;d=p.next()){var y=d.value;if(!s.has(y)){var b=r.delete(y);if(b)l=!0;else{var m=r._data.get(y);f.set(y,m)}}}}catch(Ne){n={error:Ne}}finally{try{d&&!d.done&&(i=p.return)&&i.call(p)}finally{if(n)throw n.error}}try{for(var ve=C(s.entries()),K=ve.next();!K.done;K=ve.next()){var Ze=X(K.value,2),y=Ze[0],m=Ze[1],Ft=r._data.has(y);if(r.set(y,m),r._data.has(y)){var Jt=r._data.get(y);f.set(y,Jt),Ft||(l=!0)}}}catch(Ne){a={error:Ne}}finally{try{K&&!K.done&&(o=ve.return)&&o.call(ve)}finally{if(a)throw a.error}}if(!l)if(r._data.size!==f.size)r._keysAtom.reportChanged();else for(var Qe=r._data.keys(),et=f.keys(),Be=Qe.next(),tt=et.next();!Be.done;){if(Be.value!==tt.value){r._keysAtom.reportChanged();break}Be=Qe.next(),tt=et.next()}r._data=f}),this},Object.defineProperty(e.prototype,"size",{get:function(){return this._keysAtom.reportObserved(),this._data.size},enumerable:!0,configurable:!0}),e.prototype.toPOJO=function(){var t,r,n={};try{for(var i=C(this),a=i.next();!a.done;a=i.next()){var o=X(a.value,2),s=o[0],f=o[1];n[typeof s=="symbol"?s:L(s)]=f}}catch(l){t={error:l}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}return n},e.prototype.toJS=function(){return new Map(this)},e.prototype.toJSON=function(){return this.toPOJO()},e.prototype.toString=function(){var t=this;return this.name+"[{ "+Array.from(this.keys()).map(function(r){return L(r)+": "+(""+t.get(r))}).join(", ")+" }]"},e.prototype.observe=function(t,r){return he(this,t)},e.prototype.intercept=function(t){return le(this,t)},e}(),w=V("ObservableMap",Kt),ut,Wr={},qt=function(){function e(t,r,n){if(r===void 0&&(r=ce),n===void 0&&(n="ObservableSet@"+g()),this.name=n,this[ut]=Wr,this._data=new Set,this._atom=bt(this.name),this[Symbol.toStringTag]="Set",typeof Set!="function")throw new Error("mobx.set requires Set polyfill for the current browser. Check babel-polyfill or core-js/es6/set.js");this.enhancer=function(i,a){return r(i,a,n)},t&&this.replace(t)}return e.prototype.dehanceValue=function(t){return this.dehancer!==void 0?this.dehancer(t):t},e.prototype.clear=function(){var t=this;M(function(){St(function(){var r,n;try{for(var i=C(t._data.values()),a=i.next();!a.done;a=i.next()){var o=a.value;t.delete(o)}}catch(s){r={error:s}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}})})},e.prototype.forEach=function(t,r){var n,i;try{for(var a=C(this),o=a.next();!o.done;o=a.next()){var s=o.value;t.call(r,s,s,this)}}catch(f){n={error:f}}finally{try{o&&!o.done&&(i=a.return)&&i.call(a)}finally{if(n)throw n.error}}},Object.defineProperty(e.prototype,"size",{get:function(){return this._atom.reportObserved(),this._data.size},enumerable:!0,configurable:!0}),e.prototype.add=function(t){var r=this;if(Y(this._atom),D(this)){var n=P(this,{type:"add",object:this,newValue:t});if(!n)return this}if(!this.has(t)){M(function(){r._data.add(r.enhancer(t,void 0)),r._atom.reportChanged()});var i=A(),a=x(this),n=a||i?{type:"add",object:this,newValue:t}:null;a&&R(this,n)}return this},e.prototype.delete=function(t){var r=this;if(D(this)){var n=P(this,{type:"delete",object:this,oldValue:t});if(!n)return!1}if(this.has(t)){var i=A(),a=x(this),n=a||i?{type:"delete",object:this,oldValue:t}:null;return M(function(){r._atom.reportChanged(),r._data.delete(t)}),a&&R(this,n),!0}return!1},e.prototype.has=function(t){return this._atom.reportObserved(),this._data.has(this.dehanceValue(t))},e.prototype.entries=function(){var t=0,r=Array.from(this.keys()),n=Array.from(this.values());return Te({next:function(){var i=t;return t+=1,i<n.length?{value:[r[i],n[i]],done:!1}:{done:!0}}})},e.prototype.keys=function(){return this.values()},e.prototype.values=function(){this._atom.reportObserved();var t=this,r=0,n=Array.from(this._data.values());return Te({next:function(){return r<n.length?{value:t.dehanceValue(n[r++]),done:!1}:{done:!0}}})},e.prototype.replace=function(t){var r=this;return S(t)&&(t=t.toJS()),M(function(){var n=je(!0);try{Array.isArray(t)?(r.clear(),t.forEach(function(i){return r.add(i)})):fe(t)?(r.clear(),t.forEach(function(i){return r.add(i)})):t!=null&&h("Cannot initialize set from "+t)}finally{Me(n)}}),this},e.prototype.observe=function(t,r){return he(this,t)},e.prototype.intercept=function(t){return le(this,t)},e.prototype.toJS=function(){return new Set(this)},e.prototype.toString=function(){return this.name+"[ "+Array.from(this).join(", ")+" ]"},e.prototype[ut=c,Symbol.iterator]=function(){return this.values()},e}(),S=V("ObservableSet",qt),zt=function(){function e(t,r,n,i){r===void 0&&(r=new Map),this.target=t,this.values=r,this.name=n,this.defaultEnhancer=i,this.keysAtom=new re(n+".keys")}return e.prototype.read=function(t){return this.values.get(t).get()},e.prototype.write=function(t,r){var n=this.target,i=this.values.get(t);if(i instanceof $){i.set(r);return}if(D(this)){var a=P(this,{type:"update",object:this.proxy||n,name:t,newValue:r});if(!a)return;r=a.newValue}if(r=i.prepareNewValue(r),r!==u.UNCHANGED){var o=x(this),s=A(),a=o||s?{type:"update",object:this.proxy||n,oldValue:i.value,name:t,newValue:r}:null;i.setNewValue(r),o&&R(this,a)}},e.prototype.has=function(t){var r=this.pendingKeys||(this.pendingKeys=new Map),n=r.get(t);if(n)return n.get();var i=!!this.values.get(t);return n=new H(i,De,this.name+"."+L(t)+"?",!1),r.set(t,n),n.get()},e.prototype.addObservableProp=function(t,r,n){n===void 0&&(n=this.defaultEnhancer);var i=this.target;if(D(this)){var a=P(this,{object:this.proxy||i,name:t,type:"add",newValue:r});if(!a)return;r=a.newValue}var o=new H(r,n,this.name+"."+L(t),!1);this.values.set(t,o),r=o.value,Object.defineProperty(i,t,Xr(t)),this.notifyPropertyAddition(t,r)},e.prototype.addComputedProp=function(t,r,n){var i=this.target;n.name=n.name||this.name+"."+L(r),this.values.set(r,new $(n)),(t===i||$t(t,r))&&Object.defineProperty(t,r,kr(r))},e.prototype.remove=function(t){if(this.values.has(t)){var r=this.target;if(D(this)){var n=P(this,{object:this.proxy||r,name:t,type:"remove"});if(!n)return}try{E();var i=x(this),a=A(),o=this.values.get(t),s=o&&o.get();if(o&&o.set(void 0),this.keysAtom.reportChanged(),this.values.delete(t),this.pendingKeys){var f=this.pendingKeys.get(t);f&&f.set(!1)}delete this.target[t];var n=i||a?{type:"remove",object:this.proxy||r,oldValue:s,name:t}:null;i&&R(this,n)}finally{_()}}},e.prototype.illegalAccess=function(t,r){console.warn("Property '"+r+"' of '"+t+"' was accessed through the prototype chain. Use 'decorate' instead to declare the prop or access it statically through it's owner")},e.prototype.observe=function(t,r){return he(this,t)},e.prototype.intercept=function(t){return le(this,t)},e.prototype.notifyPropertyAddition=function(t,r){var n=x(this),i=A(),a=n||i?{type:"add",object:this.proxy||this.target,name:t,newValue:r}:null;if(n&&R(this,a),this.pendingKeys){var o=this.pendingKeys.get(t);o&&o.set(!0)}this.keysAtom.reportChanged()},e.prototype.getKeys=function(){var t,r;this.keysAtom.reportObserved();var n=[];try{for(var i=C(this.values),a=i.next();!a.done;a=i.next()){var o=X(a.value,2),s=o[0],f=o[1];f instanceof H&&n.push(s)}}catch(l){t={error:l}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}return n},e}();function Ye(e,t,r){if(t===void 0&&(t=""),r===void 0&&(r=ce),Object.prototype.hasOwnProperty.call(e,c))return e[c];Q(e)||(t=(e.constructor.name||"ObservableObject")+"@"+g()),t||(t="ObservableObject@"+g());var n=new zt(e,new Map,L(t),r);return ee(e,c,n),n}var ft=Object.create(null),ct=Object.create(null);function Xr(e){return ft[e]||(ft[e]={configurable:!0,enumerable:!0,get:function(){return this[c].read(e)},set:function(t){this[c].write(e,t)}})}function lt(e){var t=e[c];return t||(F(e),e[c])}function kr(e){return ct[e]||(ct[e]={configurable:u.computedConfigurable,enumerable:!1,get:function(){return lt(this).read(e)},set:function(t){lt(this).write(e,t)}})}var Yr=V("ObservableObjectAdministration",zt);function B(e){return He(e)?(F(e),Yr(e[c])):!1}function U(e,t){if(typeof e=="object"&&e!==null){if(G(e))return t!==void 0&&h(!1),e[c].atom;if(S(e))return e[c];if(w(e)){var r=e;if(t===void 0)return r._keysAtom;var n=r._data.get(t)||r._hasMap.get(t);return n||h(!1),n}if(F(e),t&&!e[c]&&e[t],B(e)){if(!t)return h(!1);var n=e[c].values.get(t);return n||h(!1),n}if(Fe(e)||Z(e)||Re(e))return e}else if(typeof e=="function"&&Re(e[c]))return e[c];return h(!1)}function $e(e,t){if(e||h("Expecting some object"),t!==void 0)return $e(U(e,t));if(Fe(e)||Z(e)||Re(e)||w(e)||S(e))return e;if(F(e),e[c])return e[c];h(!1)}function $r(e,t){var r;return t!==void 0?r=U(e,t):B(e)||w(e)||S(e)?r=$e(e):r=U(e),r.name}var ht=Object.prototype.toString;function Ht(e,t,r){return r===void 0&&(r=-1),qe(e,t,r)}function qe(e,t,r,n,i){if(e===t)return e!==0||1/e===1/t;if(e==null||t==null)return!1;if(e!==e)return t!==t;var a=typeof e;if(a!=="function"&&a!=="object"&&typeof t!="object")return!1;var o=ht.call(e);if(o!==ht.call(t))return!1;switch(o){case"[object RegExp]":case"[object String]":return""+e==""+t;case"[object Number]":return+e!=+e?+t!=+t:+e==0?1/+e===1/t:+e==+t;case"[object Date]":case"[object Boolean]":return+e==+t;case"[object Symbol]":return typeof Symbol<"u"&&Symbol.valueOf.call(e)===Symbol.valueOf.call(t);case"[object Map]":case"[object Set]":r>=0&&r++;break}e=vt(e),t=vt(t);var s=o==="[object Array]";if(!s){if(typeof e!="object"||typeof t!="object")return!1;var f=e.constructor,l=t.constructor;if(f!==l&&!(typeof f=="function"&&f instanceof f&&typeof l=="function"&&l instanceof l)&&"constructor"in e&&"constructor"in t)return!1}if(r===0)return!1;r<0&&(r=-1),n=n||[],i=i||[];for(var p=n.length;p--;)if(n[p]===e)return i[p]===t;if(n.push(e),i.push(t),s){if(p=e.length,p!==t.length)return!1;for(;p--;)if(!qe(e[p],t[p],r-1,n,i))return!1}else{var d=Object.keys(e),y=void 0;if(p=d.length,Object.keys(t).length!==p)return!1;for(;p--;)if(y=d[p],!(Zr(t,y)&&qe(e[y],t[y],r-1,n,i)))return!1}return n.pop(),i.pop(),!0}function vt(e){return G(e)?e.slice():te(e)||w(e)||fe(e)||S(e)?Array.from(e.entries()):e}function Zr(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Te(e){return e[Symbol.iterator]=Qr,e}function Qr(){return this}if(typeof Proxy>"u"||typeof Symbol>"u")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.");typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__=="object"&&__MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobx({spy:xr,extras:{getDebugName:$r},$mobx:c});export{c as $,Kt as O,xe as R,hr as a,ke as b,nn as c,bt as d,fn as e,un as f,en as g,B as h,Ce as i,G as j,w as k,ue as l,an as m,M as n,O as o,ot as p,tn as q,rn as r,Vt as s,cn as t,on as u,sn as v,$e as w};
|