!function(){var e={d:function(t,n){for(var r in n)e.o(n,r)&&!e.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:n[r]})}};e.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),e.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},e.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var t={};!function(){"use strict";e.r(t),e.d(t,{runTest:function(){return br}});function n(e){ /*ThouShaltNotCache*/ for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;re.length)&&(t=e.length);for(var n=0,r=Array(t);n=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function L(){ /*ThouShaltNotCache*/ return L=Object.assign?Object.assign.bind():function(e){ /*ThouShaltNotCache*/ for(var t=1;tr&&(r=a.dependenciesState_)}n.length=i,e.newObserving_=null,o=t.length;for(;o--;){var u=t[o];0===u.diffValue&&pt(u,e),u.diffValue=0}for(;i--;){var c=n[i];1===c.diffValue&&(c.diffValue=0,vt(c,e))}r!==Ye.UP_TO_DATE_&&(e.dependenciesState_=r,e.onBecomeStale_())}(e),ct(r),i}function it(e){ /*ThouShaltNotCache*/ var t=e.observing_;e.observing_=[];for(var n=t.length;n--;)pt(t[n],e);e.dependenciesState_=Ye.NOT_TRACKING_}function ot(e){ /*ThouShaltNotCache*/ var t=st();try{return e()}finally{at(t)}}function st(){ /*ThouShaltNotCache*/ var e=_t.trackingDerivation;return _t.trackingDerivation=null,e}function at(e){ /*ThouShaltNotCache*/ _t.trackingDerivation=e}function ut(e){ /*ThouShaltNotCache*/ var t=_t.allowStateReads;return _t.allowStateReads=e,t}function ct(e){ /*ThouShaltNotCache*/ _t.allowStateReads=e}function lt(e){ /*ThouShaltNotCache*/ if(e.dependenciesState_!==Ye.UP_TO_DATE_){e.dependenciesState_=Ye.UP_TO_DATE_;for(var t=e.observing_,n=t.length;n--;)t[n].lowestObserverState_=Ye.UP_TO_DATE_}}var ht=function(){ /*ThouShaltNotCache*/ 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},ft=!0,dt=!1,_t=function(){ /*ThouShaltNotCache*/ var e=i();return e.__mobxInstanceCount>0&&!e.__mobxGlobals&&(ft=!1),e.__mobxGlobals&&e.__mobxGlobals.version!==(new ht).version&&(ft=!1),ft?e.__mobxGlobals?(e.__mobxInstanceCount+=1,e.__mobxGlobals.UNCHANGED||(e.__mobxGlobals.UNCHANGED={}),e.__mobxGlobals):(e.__mobxInstanceCount=1,e.__mobxGlobals=new ht):(setTimeout(function(){ /*ThouShaltNotCache*/ dt||n(35)},1),new ht)}();function vt(e,t){ /*ThouShaltNotCache*/ e.observers_.add(t),e.lowestObserverState_>t.dependenciesState_&&(e.lowestObserverState_=t.dependenciesState_)}function pt(e,t){ /*ThouShaltNotCache*/ e.observers_.delete(t),0===e.observers_.size&>(e)}function gt(e){ /*ThouShaltNotCache*/ !1===e.isPendingUnobservation&&(e.isPendingUnobservation=!0,_t.pendingUnobservations.push(e))}function bt(){ /*ThouShaltNotCache*/ _t.inBatch++}function yt(){ /*ThouShaltNotCache*/ if(0===--_t.inBatch){kt();for(var e=_t.pendingUnobservations,t=0;t0&>(e),!1)}function Ot(e){ /*ThouShaltNotCache*/ e.lowestObserverState_!==Ye.STALE_&&(e.lowestObserverState_=Ye.STALE_,e.observers_.forEach(function(e){ /*ThouShaltNotCache*/ e.dependenciesState_===Ye.UP_TO_DATE_&&e.onBecomeStale_(),e.dependenciesState_=Ye.STALE_}))}var wt=function(){ /*ThouShaltNotCache*/ function e(e,t,n,r){ /*ThouShaltNotCache*/ void 0===e&&(e="Reaction"),this.name_=void 0,this.onInvalidate_=void 0,this.errorHandler_=void 0,this.requiresObservable_=void 0,this.observing_=[],this.newObserving_=[],this.dependenciesState_=Ye.NOT_TRACKING_,this.runId_=0,this.unboundDepsCount_=0,this.flags_=0,this.isTracing_=Je.NONE,this.name_=e,this.onInvalidate_=t,this.errorHandler_=n,this.requiresObservable_=r}var t=e.prototype;return t.onBecomeStale_=function(){ /*ThouShaltNotCache*/ this.schedule_()},t.schedule_=function(){ /*ThouShaltNotCache*/ this.isScheduled||(this.isScheduled=!0,_t.pendingReactions.push(this),kt())},t.runReaction_=function(){ /*ThouShaltNotCache*/ if(!this.isDisposed){bt(),this.isScheduled=!1;var e=_t.trackingContext;if(_t.trackingContext=this,tt(this)){this.isTrackPending=!0;try{this.onInvalidate_()}catch(e){this.reportExceptionInDerivation_(e)}}_t.trackingContext=e,yt()}},t.track=function(e){ /*ThouShaltNotCache*/ if(!this.isDisposed){bt();0,this.isRunning=!0;var t=_t.trackingContext;_t.trackingContext=this;var n=rt(this,e,void 0);_t.trackingContext=t,this.isRunning=!1,this.isTrackPending=!1,this.isDisposed&&it(this),et(n)&&this.reportExceptionInDerivation_(n.cause),yt()}},t.reportExceptionInDerivation_=function(e){ /*ThouShaltNotCache*/ var t=this;if(this.errorHandler_)this.errorHandler_(e,this);else{if(_t.disableErrorBoundaries)throw e;var n="[mobx] uncaught error in '"+this+"'";_t.suppressReactionErrors||console.error(n,e),_t.globalReactionErrorHandlers.forEach(function(n){ /*ThouShaltNotCache*/ return n(e,t)})}},t.dispose=function(){ /*ThouShaltNotCache*/ this.isDisposed||(this.isDisposed=!0,this.isRunning||(bt(),it(this),yt()))},t.getDisposer_=function(e){ /*ThouShaltNotCache*/ var t=this,n=function n(){ /*ThouShaltNotCache*/ t.dispose(),null==e||null==e.removeEventListener||e.removeEventListener("abort",n)};return null==e||null==e.addEventListener||e.addEventListener("abort",n),n[H]=this,n},t.toString=function(){ /*ThouShaltNotCache*/ return"Reaction["+this.name_+"]"},t.trace=function(e){ /*ThouShaltNotCache*/ void 0===e&&(e=!1)},D(e,[{key:"isDisposed",get:function(){ /*ThouShaltNotCache*/ return V(this.flags_,e.isDisposedMask_)},set:function(t){ /*ThouShaltNotCache*/ this.flags_=E(this.flags_,e.isDisposedMask_,t)}},{key:"isScheduled",get:function(){ /*ThouShaltNotCache*/ return V(this.flags_,e.isScheduledMask_)},set:function(t){ /*ThouShaltNotCache*/ this.flags_=E(this.flags_,e.isScheduledMask_,t)}},{key:"isTrackPending",get:function(){ /*ThouShaltNotCache*/ return V(this.flags_,e.isTrackPendingMask_)},set:function(t){ /*ThouShaltNotCache*/ this.flags_=E(this.flags_,e.isTrackPendingMask_,t)}},{key:"isRunning",get:function(){ /*ThouShaltNotCache*/ return V(this.flags_,e.isRunningMask_)},set:function(t){ /*ThouShaltNotCache*/ this.flags_=E(this.flags_,e.isRunningMask_,t)}},{key:"diffValue",get:function(){ /*ThouShaltNotCache*/ return V(this.flags_,e.diffValueMask_)?1:0},set:function(t){ /*ThouShaltNotCache*/ this.flags_=E(this.flags_,e.diffValueMask_,1===t)}}])}();wt.isDisposedMask_=1,wt.isScheduledMask_=2,wt.isTrackPendingMask_=4,wt.isRunningMask_=8,wt.diffValueMask_=16;var St=100,At=function(e){ /*ThouShaltNotCache*/ return e()};function kt(){ /*ThouShaltNotCache*/ _t.inBatch>0||_t.isRunningReactions||At(jt)}function jt(){ /*ThouShaltNotCache*/ _t.isRunningReactions=!0;for(var e=_t.pendingReactions,t=0;e.length>0;){++t===St&&(console.error("[mobx] cycle in reaction: "+e[0]),e.splice(0));for(var n=e.splice(0),r=0,i=n.length;r",i=function(){ /*ThouShaltNotCache*/ var e,t=arguments,i=++$t,o=Nt(r+" - runid: "+i+" - init",n).apply(this,t),s=void 0,a=new Promise(function(t,n){ /*ThouShaltNotCache*/ var a=0;function u(e){var t; /*ThouShaltNotCache*/ s=void 0;try{t=Nt(r+" - runid: "+i+" - yield "+a++,o.next).call(o,e)}catch(e){return n(e)}l(t)}function c(e){var t; /*ThouShaltNotCache*/ s=void 0;try{t=Nt(r+" - runid: "+i+" - yield "+a++,o.throw).call(o,e)}catch(e){return n(e)}l(t)}function l(e){ /*ThouShaltNotCache*/ if(!p(null==e?void 0:e.then))return e.done?t(e.value):(s=Promise.resolve(e.value)).then(u,c);e.then(l,n)}e=n,u(void 0)});return a.cancel=Nt(r+" - runid: "+i+" - cancel",function(){ /*ThouShaltNotCache*/ try{s&&Qt(s);var t=o.return(void 0),n=Promise.resolve(t.value);n.then(v,v),Qt(n),e(new Ft)}catch(t){e(t)}}),a};return i.isMobXFlow=!0,i},Xt);function Qt(e){ /*ThouShaltNotCache*/ p(e.cancel)&&e.cancel()}function Zt(e){ /*ThouShaltNotCache*/ return!0===(null==e?void 0:e.isMobXFlow)}function en(e,t){ /*ThouShaltNotCache*/ return!!e&&(void 0!==t?!!Kn(e)&&e[H].values_.has(t):Kn(e)||!!e[H]||$(e)||xt(e)||Qe(e))}function tn(e){return en(e)}function nn(e,t){ /*ThouShaltNotCache*/ void 0===t&&(t=void 0),bt();try{return e.apply(t)}finally{yt()}}function rn(e){ /*ThouShaltNotCache*/ return e[H]}Jt.bound=G(Yt);var on={has:function(e,t){return rn(e).has_(t)},get:function(e,t){ /*ThouShaltNotCache*/ return rn(e).get_(t)},set:function(e,t,n){ /*ThouShaltNotCache*/ var r;return!!g(t)&&(null==(r=rn(e).set_(t,n,!0))||r)},deleteProperty:function(e,t){ /*ThouShaltNotCache*/ var n;return!!g(t)&&(null==(n=rn(e).delete_(t,!0))||n)},defineProperty:function(e,t,n){ /*ThouShaltNotCache*/ var r;return null==(r=rn(e).defineProperty_(t,n))||r},ownKeys:function(e){return rn(e).ownKeys_()},preventExtensions:function(e){ /*ThouShaltNotCache*/ n(13)}};function sn(e){ /*ThouShaltNotCache*/ return void 0!==e.interceptors_&&e.interceptors_.length>0}function an(e,t){ /*ThouShaltNotCache*/ var n=e.interceptors_||(e.interceptors_=[]);return n.push(t),_(function(){ /*ThouShaltNotCache*/ var e=n.indexOf(t);-1!==e&&n.splice(e,1)})}function un(e,t){ /*ThouShaltNotCache*/ var r=st();try{for(var i=[].concat(e.interceptors_||[]),o=0,s=i.length;o0}function ln(e,t){ /*ThouShaltNotCache*/ var n=e.changeListeners_||(e.changeListeners_=[]);return n.push(t),_(function(){ /*ThouShaltNotCache*/ var e=n.indexOf(t);-1!==e&&n.splice(e,1)})}function hn(e,t){ /*ThouShaltNotCache*/ var n=st(),r=e.changeListeners_;if(r){for(var i=0,o=(r=r.slice()).length;i0?e.map(this.dehancer):e},t.intercept_=function(e){ /*ThouShaltNotCache*/ return an(this,e)},t.observe_=function(e,t){ /*ThouShaltNotCache*/ 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}),ln(this,e)},t.getArrayLength_=function(){ /*ThouShaltNotCache*/ return this.atom_.reportObserved(),this.values_.length},t.setArrayLength_=function(e){ /*ThouShaltNotCache*/ ("number"!=typeof e||isNaN(e)||e<0)&&n("Out of range: "+e);var t=this.values_.length;if(e!==t)if(e>t){for(var r=new Array(e-t),i=0;i0&&Zn(e+t+1)},t.spliceWithArray_=function(e,t,n){ /*ThouShaltNotCache*/ var r=this;this.atom_;var i=this.values_.length;if(void 0===e?e=0:e>i?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=c),sn(this)){var o=un(this,{object:this.proxy_,type:dn,index:e,removedCount:t,added:n});if(!o)return c;t=o.removedCount,n=o.added}if(n=0===n.length?n:n.map(function(e){ /*ThouShaltNotCache*/ return r.enhancer_(e,void 0)}),this.legacyMode_){var s=n.length-t;this.updateArrayLength_(i,s)}var a=this.spliceItemsIntoValues_(e,t,n);return 0===t&&0===n.length||this.notifyArraySplice_(e,n,a),this.dehanceValues_(a)},t.spliceItemsIntoValues_=function(e,t,n){var r; /*ThouShaltNotCache*/ if(n.length<1e4)return(r=this.values_).splice.apply(r,[e,t].concat(n));var i=this.values_.slice(e,e+t),o=this.values_.slice(e+t);this.values_.length+=n.length-t;for(var s=0;s=this.values_.length))return this.atom_.reportObserved(),this.dehanceValue_(this.values_[e]);console.warn("[mobx] Out of bounds read: "+e)},t.set_=function(e,t){ /*ThouShaltNotCache*/ var r=this.values_;if(this.legacyMode_&&e>r.length&&n(17,e,r.length),e2?n-2:0),i=2;i-1&&(this.splice(n,1),!0)}};function yn(e,t){ /*ThouShaltNotCache*/ "function"==typeof Array.prototype[e]&&(bn[e]=t(e))}function mn(e){ /*ThouShaltNotCache*/ return function(){ /*ThouShaltNotCache*/ var t=this[H];t.atom_.reportObserved();var n=t.dehanceValues_(t.values_);return n[e].apply(n,arguments)}}function On(e){ /*ThouShaltNotCache*/ return function(t,n){ /*ThouShaltNotCache*/ var r=this,i=this[H];return i.atom_.reportObserved(),i.dehanceValues_(i.values_)[e](function(e,i){ /*ThouShaltNotCache*/ return t.call(n,e,i,r)})}}function wn(e){ /*ThouShaltNotCache*/ return function(){ /*ThouShaltNotCache*/ var t=this,n=this[H];n.atom_.reportObserved();var r=n.dehanceValues_(n.values_),i=arguments[0];return arguments[0]=function(e,n,r){ /*ThouShaltNotCache*/ return i(e,n,r,t)},r[e].apply(r,arguments)}}yn("at",mn),yn("concat",mn),yn("flat",mn),yn("includes",mn),yn("indexOf",mn),yn("join",mn),yn("lastIndexOf",mn),yn("slice",mn),yn("toString",mn),yn("toLocaleString",mn),yn("toSorted",mn),yn("toSpliced",mn),yn("with",mn),yn("every",On),yn("filter",On),yn("find",On),yn("findIndex",On),yn("findLast",On),yn("findLastIndex",On),yn("flatMap",On),yn("forEach",On),yn("map",On),yn("some",On),yn("toReversed",On),yn("reduce",wn),yn("reduceRight",wn);var Sn=S("ObservableArrayAdministration",pn);function An(e){ /*ThouShaltNotCache*/ return b(e)&&Sn(e[H])}var kn={},jn="add",xn="delete",Mn=function(){ /*ThouShaltNotCache*/ function e(e,t,r){ /*ThouShaltNotCache*/ var i=this;void 0===t&&(t=Y),void 0===r&&(r="ObservableMap"),this.enhancer_=void 0,this.name_=void 0,this[H]=kn,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_=r,p(Map)||n(18),ir(function(){ /*ThouShaltNotCache*/ i.keysAtom_=F("ObservableMap.keys()"),i.data_=new Map,i.hasMap_=new Map,e&&i.merge(e)})}var t=e.prototype;return t.has_=function(e){ /*ThouShaltNotCache*/ return this.data_.has(e)},t.has=function(e){ /*ThouShaltNotCache*/ var t=this;if(!_t.trackingDerivation)return this.has_(e);var n=this.hasMap_.get(e);if(!n){var r=n=new Fe(this.has_(e),J,"ObservableMap.key?",!1);this.hasMap_.set(e,r),zt(r,function(){ /*ThouShaltNotCache*/ return t.hasMap_.delete(e)})}return n.get()},t.set=function(e,t){ /*ThouShaltNotCache*/ var n=this.has_(e);if(sn(this)){var r=un(this,{type:n?_n:jn,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){ /*ThouShaltNotCache*/ var t=this;if((this.keysAtom_,sn(this))&&!un(this,{type:xn,object:this,name:e}))return!1;if(this.has_(e)){var n=cn(this),r=n?{observableKind:"map",debugObjectName:this.name_,type:xn,object:this,oldValue:this.data_.get(e).value_,name:e}:null;return nn(function(){ /*ThouShaltNotCache*/ var n;t.keysAtom_.reportChanged(),null==(n=t.hasMap_.get(e))||n.setNewValue_(!1),t.data_.get(e).setNewValue_(void 0),t.data_.delete(e)}),n&&hn(this,r),!0}return!1},t.updateValue_=function(e,t){ /*ThouShaltNotCache*/ var n=this.data_.get(e);if((t=n.prepareNewValue_(t))!==_t.UNCHANGED){var r=cn(this),i=r?{observableKind:"map",debugObjectName:this.name_,type:_n,object:this,oldValue:n.value_,name:e,newValue:t}:null;0,n.setNewValue_(t),r&&hn(this,i)}},t.addValue_=function(e,t){ /*ThouShaltNotCache*/ var n=this;this.keysAtom_,nn(function(){ /*ThouShaltNotCache*/ var r,i=new Fe(t,n.enhancer_,"ObservableMap.key",!1);n.data_.set(e,i),t=i.value_,null==(r=n.hasMap_.get(e))||r.setNewValue_(!0),n.keysAtom_.reportChanged()});var r=cn(this),i=r?{observableKind:"map",debugObjectName:this.name_,type:jn,object:this,name:e,newValue:t}:null;r&&hn(this,i)},t.get=function(e){ /*ThouShaltNotCache*/ return this.has(e)?this.dehanceValue_(this.data_.get(e).get()):this.dehanceValue_(void 0)},t.dehanceValue_=function(e){ /*ThouShaltNotCache*/ return void 0!==this.dehancer?this.dehancer(e):e},t.keys=function(){ /*ThouShaltNotCache*/ return this.keysAtom_.reportObserved(),this.data_.keys()},t.values=function(){ /*ThouShaltNotCache*/ var e=this,t=this.keys();return Tn({next:function(){ /*ThouShaltNotCache*/ var n=t.next(),r=n.done,i=n.value;return{done:r,value:r?void 0:e.get(i)}}})},t.entries=function(){ /*ThouShaltNotCache*/ var e=this,t=this.keys();return Tn({next:function(){ /*ThouShaltNotCache*/ var n=t.next(),r=n.done,i=n.value;return{done:r,value:r?void 0:[i,e.get(i)]}}})},t[Symbol.iterator]=function(){ /*ThouShaltNotCache*/ return this.entries()},t.forEach=function(e,t){ /*ThouShaltNotCache*/ for(var n,r=N(this);!(n=r()).done;){var i=n.value,o=i[0],s=i[1];e.call(t,s,o,this)}},t.merge=function(e){ /*ThouShaltNotCache*/ var t=this;return Pn(e)&&(e=new Map(e)),nn(function(){var r,i,o; /*ThouShaltNotCache*/ y(e)?function(e){ /*ThouShaltNotCache*/ var t=Object.keys(e);if(!j)return t;var n=Object.getOwnPropertySymbols(e);return n.length?[].concat(t,n.filter(function(t){ /*ThouShaltNotCache*/ return u.propertyIsEnumerable.call(e,t)})):t}(e).forEach(function(n){ /*ThouShaltNotCache*/ return t.set(n,e[n])}):Array.isArray(e)?e.forEach(function(e){ /*ThouShaltNotCache*/ var n=e[0],r=e[1];return t.set(n,r)}):A(e)?(r=e,i=Object.getPrototypeOf(r),o=Object.getPrototypeOf(i),null!==Object.getPrototypeOf(o)&&n(19,e),e.forEach(function(e,n){ /*ThouShaltNotCache*/ return t.set(n,e)})):null!=e&&n(20,e)}),this},t.clear=function(){ /*ThouShaltNotCache*/ var e=this;nn(function(){ /*ThouShaltNotCache*/ ot(function(){ /*ThouShaltNotCache*/ for(var t,n=N(e.keys());!(t=n()).done;){var r=t.value;e.delete(r)}})})},t.replace=function(e){ /*ThouShaltNotCache*/ var t=this;return nn(function(){for( /*ThouShaltNotCache*/ var r,i=function(e){ /*ThouShaltNotCache*/ if(A(e)||Pn(e))return e;if(Array.isArray(e))return new Map(e);if(y(e)){var t=new Map;for(var r in e)t.set(r,e[r]);return t}return n(21,e)}(e),o=new Map,s=!1,a=N(t.data_.keys());!(r=a()).done;){var u=r.value;if(!i.has(u))if(t.delete(u))s=!0;else{var c=t.data_.get(u);o.set(u,c)}}for(var l,h=N(i.entries());!(l=h()).done;){var f=l.value,d=f[0],_=f[1],v=t.data_.has(d);if(t.set(d,_),t.data_.has(d)){var p=t.data_.get(d);o.set(d,p),v||(s=!0)}}if(!s)if(t.data_.size!==o.size)t.keysAtom_.reportChanged();else for(var g=t.data_.keys(),b=o.keys(),m=g.next(),O=b.next();!m.done;){if(m.value!==O.value){t.keysAtom_.reportChanged();break}m=g.next(),O=b.next()}t.data_=o}),this},t.toString=function(){ /*ThouShaltNotCache*/ return"[object ObservableMap]"},t.toJSON=function(){ /*ThouShaltNotCache*/ return Array.from(this)},t.observe_=function(e,t){return ln(this,e)},t.intercept_=function(e){ /*ThouShaltNotCache*/ return an(this,e)},D(e,[{key:"size",get:function(){ /*ThouShaltNotCache*/ return this.keysAtom_.reportObserved(),this.data_.size}},{key:Symbol.toStringTag,get:function(){ /*ThouShaltNotCache*/ return"Map"}}])}(),Pn=S("ObservableMap",Mn);function Tn(e){ /*ThouShaltNotCache*/ return e[Symbol.toStringTag]="MapIterator",hr(e)}var Vn={},En=function(){ /*ThouShaltNotCache*/ function e(e,t,r){ /*ThouShaltNotCache*/ var i=this;void 0===t&&(t=Y),void 0===r&&(r="ObservableSet"),this.name_=void 0,this[H]=Vn,this.data_=new Set,this.atom_=void 0,this.changeListeners_=void 0,this.interceptors_=void 0,this.dehancer=void 0,this.enhancer_=void 0,this.name_=r,p(Set)||n(22),this.enhancer_=function(e,n){ /*ThouShaltNotCache*/ return t(e,n,r)},ir(function(){ /*ThouShaltNotCache*/ i.atom_=F(i.name_),e&&i.replace(e)})}var t=e.prototype;return t.dehanceValue_=function(e){ /*ThouShaltNotCache*/ return void 0!==this.dehancer?this.dehancer(e):e},t.clear=function(){ /*ThouShaltNotCache*/ var e=this;nn(function(){ /*ThouShaltNotCache*/ ot(function(){ /*ThouShaltNotCache*/ for(var t,n=N(e.data_.values());!(t=n()).done;){var r=t.value;e.delete(r)}})})},t.forEach=function(e,t){ /*ThouShaltNotCache*/ for(var n,r=N(this);!(n=r()).done;){var i=n.value;e.call(t,i,i,this)}},t.add=function(e){ /*ThouShaltNotCache*/ var t=this;if(this.atom_,sn(this)){var n=un(this,{type:jn,object:this,newValue:e});if(!n)return this;e=n.newValue}if(!this.has(e)){nn(function(){ /*ThouShaltNotCache*/ t.data_.add(t.enhancer_(e,void 0)),t.atom_.reportChanged()});var r=!1,i=cn(this),o=i?{observableKind:"set",debugObjectName:this.name_,type:jn,object:this,newValue:e}:null;r,i&&hn(this,o)}return this},t.delete=function(e){ /*ThouShaltNotCache*/ var t=this;if(sn(this)&&!un(this,{type:xn,object:this,oldValue:e}))return!1;if(this.has(e)){var n=cn(this),r=n?{observableKind:"set",debugObjectName:this.name_,type:xn,object:this,oldValue:e}:null;return nn(function(){ /*ThouShaltNotCache*/ t.atom_.reportChanged(),t.data_.delete(e)}),n&&hn(this,r),!0}return!1},t.has=function(e){ /*ThouShaltNotCache*/ return this.atom_.reportObserved(),this.data_.has(this.dehanceValue_(e))},t.entries=function(){ /*ThouShaltNotCache*/ var e=this.values();return Cn({next:function(){ /*ThouShaltNotCache*/ var t=e.next(),n=t.value,r=t.done;return r?{value:void 0,done:r}:{value:[n,n],done:r}}})},t.keys=function(){ /*ThouShaltNotCache*/ return this.values()},t.values=function(){ /*ThouShaltNotCache*/ this.atom_.reportObserved();var e=this,t=this.data_.values();return Cn({next:function(){ /*ThouShaltNotCache*/ var n=t.next(),r=n.value,i=n.done;return i?{value:void 0,done:i}:{value:e.dehanceValue_(r),done:i}}})},t.intersection=function(e){ /*ThouShaltNotCache*/ return k(e)&&!Rn(e)?e.intersection(this):new Set(this).intersection(e)},t.union=function(e){ /*ThouShaltNotCache*/ return k(e)&&!Rn(e)?e.union(this):new Set(this).union(e)},t.difference=function(e){ /*ThouShaltNotCache*/ return new Set(this).difference(e)},t.symmetricDifference=function(e){ /*ThouShaltNotCache*/ return k(e)&&!Rn(e)?e.symmetricDifference(this):new Set(this).symmetricDifference(e)},t.isSubsetOf=function(e){ /*ThouShaltNotCache*/ return new Set(this).isSubsetOf(e)},t.isSupersetOf=function(e){ /*ThouShaltNotCache*/ return new Set(this).isSupersetOf(e)},t.isDisjointFrom=function(e){ /*ThouShaltNotCache*/ return k(e)&&!Rn(e)?e.isDisjointFrom(this):new Set(this).isDisjointFrom(e)},t.replace=function(e){ /*ThouShaltNotCache*/ var t=this;return Rn(e)&&(e=new Set(e)),nn(function(){ /*ThouShaltNotCache*/ Array.isArray(e)||k(e)?(t.clear(),e.forEach(function(e){ /*ThouShaltNotCache*/ return t.add(e)})):null!=e&&n("Cannot initialize set from "+e)}),this},t.observe_=function(e,t){return ln(this,e)},t.intercept_=function(e){ /*ThouShaltNotCache*/ return an(this,e)},t.toJSON=function(){ /*ThouShaltNotCache*/ return Array.from(this)},t.toString=function(){ /*ThouShaltNotCache*/ return"[object ObservableSet]"},t[Symbol.iterator]=function(){ /*ThouShaltNotCache*/ return this.values()},D(e,[{key:"size",get:function(){ /*ThouShaltNotCache*/ return this.atom_.reportObserved(),this.data_.size}},{key:Symbol.toStringTag,get:function(){ /*ThouShaltNotCache*/ return"Set"}}])}(),Rn=S("ObservableSet",En);function Cn(e){ /*ThouShaltNotCache*/ return e[Symbol.toStringTag]="SetIterator",hr(e)}var Dn=Object.create(null),Nn="remove",Ln=function(){ /*ThouShaltNotCache*/ function e(e,t,n,r){ /*ThouShaltNotCache*/ void 0===t&&(t=new Map),void 0===r&&(r=be),this.target_=void 0,this.values_=void 0,this.name_=void 0,this.defaultAnnotation_=void 0,this.keysAtom_=void 0,this.changeListeners_=void 0,this.interceptors_=void 0,this.proxy_=void 0,this.isPlainObject_=void 0,this.appliedAnnotations_=void 0,this.pendingKeys_=void 0,this.target_=e,this.values_=t,this.name_=n,this.defaultAnnotation_=r,this.keysAtom_=new W("ObservableObject.keys"),this.isPlainObject_=y(this.target_)}var t=e.prototype;return t.getObservablePropValue_=function(e){ /*ThouShaltNotCache*/ return this.values_.get(e).get()},t.setObservablePropValue_=function(e,t){ /*ThouShaltNotCache*/ var n=this.values_.get(e);if(n instanceof Xe)return n.set(t),!0;if(sn(this)){var r=un(this,{type:_n,object:this.proxy_||this.target_,name:e,newValue:t});if(!r)return null;t=r.newValue}if((t=n.prepareNewValue_(t))!==_t.UNCHANGED){var i=cn(this),o=i?{type:_n,observableKind:"object",debugObjectName:this.name_,object:this.proxy_||this.target_,oldValue:n.value_,name:e,newValue:t}:null;0,n.setNewValue_(t),i&&hn(this,o)}return!0},t.get_=function(e){ /*ThouShaltNotCache*/ return _t.trackingDerivation&&!P(this.target_,e)&&this.has_(e),this.target_[e]},t.set_=function(e,t,n){ /*ThouShaltNotCache*/ return void 0===n&&(n=!1),P(this.target_,e)?this.values_.has(e)?this.setObservablePropValue_(e,t):n?Reflect.set(this.target_,e,t):(this.target_[e]=t,!0):this.extend_(e,{value:t,enumerable:!0,writable:!0,configurable:!0},this.defaultAnnotation_,n)},t.has_=function(e){ /*ThouShaltNotCache*/ if(!_t.trackingDerivation)return e in this.target_;this.pendingKeys_||(this.pendingKeys_=new Map);var t=this.pendingKeys_.get(e);return t||(t=new Fe(e in this.target_,J,"ObservableObject.key?",!1),this.pendingKeys_.set(e,t)),t.get()},t.make_=function(e,t){if( /*ThouShaltNotCache*/ !0===t&&(t=this.defaultAnnotation_),!1!==t){if(qn(this,t,e),!(e in this.target_)){var r;if(null!=(r=this.target_[K])&&r[e])return;n(1,t.annotationType_,this.name_+"."+e.toString())}for(var i=this.target_;i&&i!==u;){var o=s(i,e);if(o){var a=t.make_(this,e,o,i);if(0===a)return;if(1===a)break}i=Object.getPrototypeOf(i)}Gn(this,t,e)}},t.extend_=function(e,t,n,r){if( /*ThouShaltNotCache*/ void 0===r&&(r=!1),!0===n&&(n=this.defaultAnnotation_),!1===n)return this.defineProperty_(e,t,r);qn(this,n,e);var i=n.extend_(this,e,t,r);return i&&Gn(this,n,e),i},t.defineProperty_=function(e,t,n){ /*ThouShaltNotCache*/ void 0===n&&(n=!1),this.keysAtom_;try{bt();var r=this.delete_(e);if(!r)return r;if(sn(this)){var i=un(this,{object:this.proxy_||this.target_,name:e,type:jn,newValue:t.value});if(!i)return null;var o=i.newValue;t.value!==o&&(t=L({},t,{value:o}))}if(n){if(!Reflect.defineProperty(this.target_,e,t))return!1}else a(this.target_,e,t);this.notifyPropertyAddition_(e,t.value)}finally{yt()}return!0},t.defineObservableProperty_=function(e,t,n,r){ /*ThouShaltNotCache*/ void 0===r&&(r=!1),this.keysAtom_;try{bt();var i=this.delete_(e);if(!i)return i;if(sn(this)){var o=un(this,{object:this.proxy_||this.target_,name:e,type:jn,newValue:t});if(!o)return null;t=o.newValue}var s=In(e),u={configurable:!_t.safeDescriptors||this.isPlainObject_,enumerable:!0,get:s.get,set:s.set};if(r){if(!Reflect.defineProperty(this.target_,e,u))return!1}else a(this.target_,e,u);var c=new Fe(t,n,"ObservableObject.key",!1);this.values_.set(e,c),this.notifyPropertyAddition_(e,c.value_)}finally{yt()}return!0},t.defineComputedProperty_=function(e,t,n){ /*ThouShaltNotCache*/ void 0===n&&(n=!1),this.keysAtom_;try{bt();var r=this.delete_(e);if(!r)return r;if(sn(this))if(!un(this,{object:this.proxy_||this.target_,name:e,type:jn,newValue:void 0}))return null;t.name||(t.name="ObservableObject.key"),t.context=this.proxy_||this.target_;var i=In(e),o={configurable:!_t.safeDescriptors||this.isPlainObject_,enumerable:!1,get:i.get,set:i.set};if(n){if(!Reflect.defineProperty(this.target_,e,o))return!1}else a(this.target_,e,o);this.values_.set(e,new Xe(t)),this.notifyPropertyAddition_(e,void 0)}finally{yt()}return!0},t.delete_=function(e,t){if( /*ThouShaltNotCache*/ void 0===t&&(t=!1),this.keysAtom_,!P(this.target_,e))return!0;if(sn(this)&&!un(this,{object:this.proxy_||this.target_,name:e,type:Nn}))return null;try{var n;bt();var r,i=cn(this),o=this.values_.get(e),a=void 0;if(!o&&i)a=null==(r=s(this.target_,e))?void 0:r.value;if(t){if(!Reflect.deleteProperty(this.target_,e))return!1}else delete this.target_[e];if(o&&(this.values_.delete(e),o instanceof Fe&&(a=o.value_),Ot(o)),this.keysAtom_.reportChanged(),null==(n=this.pendingKeys_)||null==(n=n.get(e))||n.set(e in this.target_),i){var u={type:Nn,observableKind:"object",object:this.proxy_||this.target_,debugObjectName:this.name_,oldValue:a,name:e};0,i&&hn(this,u)}}finally{yt()}return!0},t.observe_=function(e,t){return ln(this,e)},t.intercept_=function(e){ /*ThouShaltNotCache*/ return an(this,e)},t.notifyPropertyAddition_=function(e,t){ /*ThouShaltNotCache*/ var n,r=cn(this);if(r){var i=r?{type:jn,observableKind:"object",debugObjectName:this.name_,object:this.proxy_||this.target_,name:e,newValue:t}:null;0,r&&hn(this,i)}null==(n=this.pendingKeys_)||null==(n=n.get(e))||n.set(!0),this.keysAtom_.reportChanged()},t.ownKeys_=function(){ /*ThouShaltNotCache*/ return this.keysAtom_.reportObserved(),x(this.target_)},t.keys_=function(){ /*ThouShaltNotCache*/ return this.keysAtom_.reportObserved(),Object.keys(this.target_)},e}();function Bn(e,t){ /*ThouShaltNotCache*/ var n;if(P(e,H))return e;var r=null!=(n=null==t?void 0:t.name)?n:"ObservableObject",i=new Ln(e,new Map,String(r),function(e){ /*ThouShaltNotCache*/ var t;return e?null!=(t=e.defaultDecorator)?t:ye(e):void 0}(t));return O(e,H,i),e}var Un=S("ObservableObjectAdministration",Ln);function In(e){ /*ThouShaltNotCache*/ return Dn[e]||(Dn[e]={get:function(){ /*ThouShaltNotCache*/ return this[H].getObservablePropValue_(e)},set:function(t){ /*ThouShaltNotCache*/ return this[H].setObservablePropValue_(e,t)}})}function Kn(e){ /*ThouShaltNotCache*/ return!!b(e)&&Un(e[H])}function Gn(e,t,n){ /*ThouShaltNotCache*/ var r;null==(r=e.target_[K])||delete r[n]}function qn(e,t,n){}var zn,Hn,Wn=Jn(0),$n=function(){ /*ThouShaltNotCache*/ var e=!1,t={};return Object.defineProperty(t,"0",{set:function(){ /*ThouShaltNotCache*/ e=!0}}),Object.create(t)[0]=1,!1===e}(),Fn=0,Xn=function(){};zn=Xn,Hn=Array.prototype, /*ThouShaltNotCache*/ Object.setPrototypeOf?Object.setPrototypeOf(zn.prototype,Hn):void 0!==zn.prototype.__proto__?zn.prototype.__proto__=Hn:zn.prototype=Hn;var Yn=function(e){ /*ThouShaltNotCache*/ function t(t,n,r,i){ /*ThouShaltNotCache*/ var o;return void 0===r&&(r="ObservableArray"),void 0===i&&(i=!1),o=e.call(this)||this,ir(function(){ /*ThouShaltNotCache*/ var e=new pn(r,n,i,!0);e.proxy_=o,w(o,H,e),t&&t.length&&o.spliceWithArray(0,0,t),$n&&Object.defineProperty(o,"0",Wn)}),o}B(t,e);var n=t.prototype;return n.concat=function(){ /*ThouShaltNotCache*/ this[H].atom_.reportObserved();for(var e=arguments.length,t=new Array(e),n=0;nFn){for(var t=Fn;t=0&&n++}e=cr(e),t=cr(t);var a="[object Array]"===s;if(!a){if("object"!=typeof e||"object"!=typeof t)return!1;var u=e.constructor,c=t.constructor;if(u!==c&&!(p(u)&&u instanceof u&&p(c)&&c instanceof c)&&"constructor"in e&&"constructor"in t)return!1}if(0===n)return!1;n<0&&(n=-1),i=i||[];for(var l=(r=r||[]).length;l--;)if(r[l]===e)return i[l]===t;if(r.push(e),i.push(t),a){if((l=e.length)!==t.length)return!1;for(;l--;)if(!ur(e[l],t[l],n-1,r,i))return!1}else{var h=Object.keys(e),f=h.length;if(Object.keys(t).length!==f)return!1;for(var d=0;d{ /*ThouShaltNotCache*/ t.addStatusUpdate(this,e)})}}class _r{name;people=new Map;messages=[];roomUpdates=[];constructor(e){ /*ThouShaltNotCache*/ fn(this,{name:Ce,people:Ce,messages:Ce,roomUpdates:Ce,messageCount:Be,peopleCount:Be,lastMessage:Be,members:Be,addPerson:Nt,removePerson:Nt,addMessage:Nt,addStatusUpdate:Nt,dispose:Nt}),this.name=e}get messageCount(){ /*ThouShaltNotCache*/ return this.messages.length}get peopleCount(){ /*ThouShaltNotCache*/ return this.people.size}get lastMessage(){ /*ThouShaltNotCache*/ return 0===this.messages.length?null:this.messages[this.messages.length-1]}get members(){ /*ThouShaltNotCache*/ return Array.from(this.people.values())}addPerson(e){ /*ThouShaltNotCache*/ this.people.has(e.id)||(this.people.set(e.id,e),e.addRoom(this))}removePerson(e){ /*ThouShaltNotCache*/ const t=this.people.get(e);t&&(t.removeRoom(this),this.people.delete(e))}addMessage(e){ /*ThouShaltNotCache*/ this.messages.push(e),e.author.setLastMessage(e)}addStatusUpdate(e,t){ /*ThouShaltNotCache*/ this.roomUpdates.push(`${e.name} is now ${t}`),this.roomUpdates.length>20&&(this.roomUpdates=this.roomUpdates.slice(10))}dispose(e){ /*ThouShaltNotCache*/ this.people.forEach(e=>e.removeRoom(this)),e&&e.removeRoom(this.name)}}class vr{static _nextId=0;id;text;author;timestamp;static nextId(){ /*ThouShaltNotCache*/ return vr._nextId++}constructor(e,t){ /*ThouShaltNotCache*/ fn(this,{text:Ce,updateText:Nt}),this.id=vr.nextId(),this.text=e,this.author=t,this.timestamp=new Date}updateText(e){ /*ThouShaltNotCache*/ this.text=e}}class pr{lastMessages=new Map;lastMessage;roomDisposers=new Map;constructor(e){ /*ThouShaltNotCache*/ fn(this,{lastMessages:Ce,updateLastMessage:Nt,addRoom:Nt,removeRoom:Nt}),e.forEach(e=>this.addRoom(e))}addRoom(e){ /*ThouShaltNotCache*/ const t=function(e,t,n){ /*ThouShaltNotCache*/ var r,i,o;void 0===n&&(n=l);var s,a,u,c=null!=(r=n.name)?r:"Reaction",h=Nt(c,n.onError?(s=n.onError,a=t,function(){ /*ThouShaltNotCache*/ try{return a.apply(this,arguments)}catch(e){s.call(this,e)}}):t),f=!n.scheduler&&!n.delay,d=Kt(n),_=!0,v=!1,p=n.compareStructural?X.structural:n.equals||X.default,g=new wt(c,function(){ /*ThouShaltNotCache*/ _||f?b():v||(v=!0,d(b))},n.onError,n.requiresObservable);function b(){if( /*ThouShaltNotCache*/ v=!1,!g.isDisposed){var t=!1,r=u;g.track(function(){ /*ThouShaltNotCache*/ var n=He(!1,function(){ /*ThouShaltNotCache*/ return e(g)});t=_||!p(u,n),u=n}),(_&&n.fireImmediately||!_&&t)&&h(u,r,g),_=!1}}return null!=(i=n)&&null!=(i=i.signal)&&i.aborted||g.schedule_(),g.getDisposer_(null==(o=n)?void 0:o.signal)}(()=>e.lastMessage,t=>{ /*ThouShaltNotCache*/ t&&this.updateLastMessage(e.name,t)});this.roomDisposers.set(e.name,t)}removeRoom(e){ /*ThouShaltNotCache*/ this.roomDisposers.has(e)&&(this.roomDisposers.get(e)(),this.roomDisposers.delete(e),this.lastMessages.delete(e))}updateLastMessage(e,t){ /*ThouShaltNotCache*/ this.lastMessages.set(e,t)}}function gr(e){ /*ThouShaltNotCache*/ if(!e)throw new Error("Assertion failure")}function br(){ /*ThouShaltNotCache*/ const e=[],t=(...t)=>e.push(t.join(" ")),n=new _r("Tech Talk"),r=new _r("General Chat"),i=new _r("Large Meeting Room"),o=new dr(1,"Alice"),s=new dr(2,"Bob");n.addPerson(o),n.addPerson(s),r.addPerson(o);const a=[n,r,i],u=new pr(a);t("\n--- Setting up Large Meeting Room ---");const c=[];for(let e=3;e<203;e++){const t=new dr(e,`Person ${e}`);c.push(t),i.addPerson(t)}t(`[INFO] Added ${i.peopleCount} members to the large room.`),i.addPerson(o),i.addPerson(s),t("[INFO] Added Alice and Bob to the Large Meeting Room."),gr(3===o.rooms.size),gr(o.rooms.has(n)&&o.rooms.has(r)&&o.rooms.has(i)),gr(2===s.rooms.size&&s.rooms.has(n)&&s.rooms.has(i)),t("[PASS] Verified Person.rooms associations with Set.");const l=Ut(()=>{ /*ThouShaltNotCache*/ t("\n--- Global Notifications (Last Messages) ---"),0===u.lastMessages.size?t("No messages yet."):u.lastMessages.forEach((e,n)=>{ /*ThouShaltNotCache*/ t(`[${n}] "${e.text}" - ${e.author.name}`)}),t("------------------------------------------")}),h=Ut(()=>{ /*ThouShaltNotCache*/ a.forEach(e=>{ /*ThouShaltNotCache*/ e.roomUpdates.length>0&&t(`[${e.name} Update] ${e.roomUpdates[e.roomUpdates.length-1]}`)})});t("\n--- Status Update Scenario ---"),o.setStatus("Away"),gr(n.roomUpdates.includes("Alice is now Away")),gr(r.roomUpdates.includes("Alice is now Away")),gr(i.roomUpdates.includes("Alice is now Away")),t("[PASS] Verified that status updates are sent to all of Alice's rooms."),s.setStatus("Busy"),gr(n.roomUpdates.includes("Bob is now Busy")),gr(!r.roomUpdates.includes("Bob is now Busy")),gr(i.roomUpdates.includes("Bob is now Busy")),t("[PASS] Verified that status updates are only sent to Bob's rooms."),t("\n--- Sending Messages & Verifying Notifications ---");const f=new vr("First message to Tech Talk!",o);n.addMessage(f),gr(u.lastMessages.get("Tech Talk")===f),t("[PASS] Verified Tech Talk notification.");for(let e=0;e<20;e++){const t=new vr(`ping ${e}`,o);r.addMessage(t),gr(u.lastMessages.get("General Chat")===t)}t("[PASS] Verified General Chat notification.");for(let e=0;e<=5;e++)for(const e of c){const t=new vr(`Hi, I am ${e.name}`,e);i.addMessage(t),gr(i.lastMessage==t),gr(u.lastMessages.get("Large Meeting Room")===t)}t("[PASS] Verified Large Meeting Room notification.");for(let e=0;e<20;e++){const t=new vr(`ping ${e}`,s);n.addMessage(t),gr(u.lastMessages.get("Tech Talk")===t)}t("[PASS] Verified Tech Talk notification update.");const d=[];for(let e=0;e<10;e++){const t=`General Chat ${e}`,n=new _r(t);d.push(n),u.addRoom(n);for(const e of c.slice(0,10))n.addPerson(e);for(const r of n.members.slice(0,5)){const i=new vr(`ping ${e}`,r);n.addMessage(i),gr(u.lastMessages.get(t)===i)}}return d.forEach(e=>e.dispose(u)),l(),h(),n.dispose(u),r.dispose(u),i.dispose(u),e}}(),MobXBenchmark=t}(); //# sourceMappingURL=bundle.es5.min.js.map