@quantumart/mobx-form-validation-kit
Version:
mobx typescript form control validation
2 lines • 83.4 kB
JavaScript
/*! For license information please see main.js.LICENSE.txt */
(()=>{"use strict";var e={d:(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=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),e.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var t={};e.r(t),e.d(t,{AbstractControl:()=>ar,Delegate:()=>c,FormAbstractGroup:()=>sr,FormArray:()=>cr,FormControl:()=>ur,FormGroup:()=>lr,InputFormControl:()=>Lr,TextAreaFormControl:()=>Nr,ValidationEventTypes:()=>l,absoluteLengthValidator:()=>Ar,absoluteLengthValidatorKey:()=>Pr,combineErrors:()=>h,compairValidatorKey:()=>kr,compareValidator:()=>Dr,invertPatternValidator:()=>gr,isEqualValidator:()=>Tr,isEqualValidatorKey:()=>Cr,maxLengthValidator:()=>jr,maxLengthValidatorKey:()=>wr,maxValueValidator:()=>Er,maxValueValidatorKey:()=>xr,minLengthValidator:()=>Or,minLengthValidatorKey:()=>mr,minValueValidator:()=>Sr,minValueValidatorKey:()=>Vr,noop:()=>f,notContainSpacesValidator:()=>pr,notContainSpacesValidatorKey:()=>br,notEmptyOrSpacesValidator:()=>vr,notEmptyOrSpacesValidatorKey:()=>dr,patternValidator:()=>yr,patternValidatorKey:()=>_r,requiredValidator:()=>hr,requiredValidatorKey:()=>fr,wrapperActivateValidation:()=>Ir,wrapperSequentialCheck:()=>Rr});var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},n(e,t)};function r(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}function i(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{s(r.next(e))}catch(e){o(e)}}function u(e){try{s(r.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,u)}s((r=r.apply(e,t||[])).next())}))}function o(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function u(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}}function a(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function u(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function s(e,t){for(var n=0,r=t.length,i=e.length;n<r;n++,i++)e[i]=t[n];return e}Object.create,Object.create;var l,c=function(){var e=this;Object.defineProperty(this,"funcs",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"addListen",{enumerable:!0,configurable:!0,writable:!0,value:function(t){e.funcs.some((function(e){return e===t}))||e.funcs.push(t)}}),Object.defineProperty(this,"remove",{enumerable:!0,configurable:!0,writable:!0,value:function(t){var n=e.funcs.indexOf(t);n<0||(e.funcs=e.funcs.splice(n,1))}}),Object.defineProperty(this,"call",{enumerable:!0,configurable:!0,writable:!0,value:function(t){var n,r;try{for(var i=a(e.funcs),o=i.next();!o.done;o=i.next())(0,o.value)(t)}catch(e){n={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}}}),Object.defineProperty(this,"dispose",{enumerable:!0,configurable:!0,writable:!0,value:function(){e.funcs=[]}})};!function(e){e[e.Error=0]="Error",e[e.Warning=1]="Warning",e[e.Info=2]="Info",e[e.Success=3]="Success"}(l||(l={}));var f=function(){},h=function(e){return e.reduce((function(e,t){return s(s([],u(e)),u(t))}),[]).filter((function(e){return!!e}))};function d(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];throw new Error("number"==typeof e?"[MobX] minified error nr: "+e+(n.length?" "+n.map(String).join(","):"")+". Find the full error at: https://github.com/mobxjs/mobx/blob/main/packages/mobx/src/errors.ts":"[MobX] "+e)}var v={};function b(){return"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==e.g?e.g:"undefined"!=typeof self?self:v}var p=Object.assign,_=Object.getOwnPropertyDescriptor,y=Object.defineProperty,g=Object.prototype,m=[];Object.freeze(m);var O={};Object.freeze(O);var w="undefined"!=typeof Proxy,j=Object.toString();function P(){w||d("Proxy not available")}function A(e){var t=!1;return function(){if(!t)return t=!0,e.apply(this,arguments)}}var V=function(){};function S(e){return"function"==typeof e}function x(e){switch(typeof e){case"string":case"symbol":case"number":return!0}return!1}function E(e){return null!==e&&"object"==typeof e}function k(e){var t;if(!E(e))return!1;var n=Object.getPrototypeOf(e);return null==n||(null==(t=n.constructor)?void 0:t.toString())===j}function D(e,t,n){y(e,t,{enumerable:!1,writable:!0,configurable:!0,value:n})}function C(e,t,n){y(e,t,{enumerable:!1,writable:!1,configurable:!0,value:n})}function T(e,t){var n="isMobX"+e;return t.prototype[n]=!0,function(e){return E(e)&&!0===e[n]}}function I(e){return e instanceof Map}function R(e){return e instanceof Set}var L=void 0!==Object.getOwnPropertySymbols;var N="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:L?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames;function B(e){return null===e?null:"object"==typeof e?""+e:e}function M(e,t){return g.hasOwnProperty.call(e,t)}var G=Object.getOwnPropertyDescriptors||function(e){var t={};return N(e).forEach((function(n){t[n]=_(e,n)})),t};function K(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function U(e,t,n){return t&&K(e.prototype,t),n&&K(e,n),e}function F(){return F=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},F.apply(this,arguments)}function q(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function z(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function W(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function H(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return W(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?W(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=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.")}return(n=e[Symbol.iterator]()).next.bind(n)}var X=Symbol("mobx-stored-annotations");function Y(e){return Object.assign((function(t,n){J(t,n,e)}),e)}function J(e,t,n){M(e,X)||D(e,X,F({},e[X])),function(e){return e.annotationType_===ie}(n)||(e[X][t]=n)}var $=Symbol("mobx administration"),Q=function(){function e(e){void 0===e&&(e="Atom"),this.name_=void 0,this.isPendingUnobservation_=!1,this.isBeingObserved_=!1,this.observers_=new Set,this.diffValue_=0,this.lastAccessedBy_=0,this.lowestObserverState_=Ye.NOT_TRACKING_,this.onBOL=void 0,this.onBUOL=void 0,this.name_=e}var t=e.prototype;return 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.reportObserved=function(){return yt(this)},t.reportChanged=function(){pt(),gt(this),_t()},t.toString=function(){return this.name_},e}(),Z=T("Atom",Q);function ee(e,t,n){void 0===t&&(t=V),void 0===n&&(n=V);var r=new Q(e);return t!==V&&Gt(Bt,r,t,undefined),n!==V&&Mt(r,n),r}var te={identity:function(e,t){return e===t},structural:function(e,t){return Zn(e,t)},default:function(e,t){return Object.is(e,t)},shallow:function(e,t){return Zn(e,t,1)}};function ne(e,t,n){return Ht(e)?e:Array.isArray(e)?Ce.array(e,{name:n}):k(e)?Ce.object(e,void 0,{name:n}):I(e)?Ce.map(e,{name:n}):R(e)?Ce.set(e,{name:n}):e}function re(e){return e}var ie="override";function oe(e,t){return{annotationType_:e,options_:t,make_:ae,extend_:ue}}function ae(e,t){for(var n,r,i,o=!1,a=e.target_,u=null!=(n=null==(r=this.options_)?void 0:r.bound)&&n;a&&a!==g;){var s=_(a,t);if(s){if(a===e.target_||u){var l=se(e,this,t,s);if(!e.defineProperty_(t,l))return;if(o=!0,u)break}if(a!==e.target_){if(Tt(s.value)){o=!0;break}var c=se(e,this,t,s,!1);y(a,t,c),o=!0}}a=Object.getPrototypeOf(a)}o?Gn(e,0,t):(null==(i=e.target_[X])?void 0:i[t])||d(1,this.annotationType_,e.name_+"."+t.toString())}function ue(e,t,n,r){var i=se(e,this,t,n);return e.defineProperty_(t,i,r)}function se(e,t,n,r,i){var o,a,u,s,l,c;void 0===i&&(i=ht.safeDescriptors),c=r,t.annotationType_,c.value;var f,h=r.value;return(null==(o=t.options_)?void 0:o.bound)&&(h=h.bind(null!=(f=e.proxy_)?f:e.target_)),{value:Ue(null!=(a=null==(u=t.options_)?void 0:u.name)?a:n.toString(),h,null!=(s=null==(l=t.options_)?void 0:l.autoAction)&&s),configurable:!i||e.isPlainObject_,enumerable:!1,writable:!i}}function le(e,t){return{annotationType_:e,options_:t,make_:ce,extend_:fe}}function ce(e,t){for(var n,r=!1,i=e.target_;i&&i!==g;){var o=_(i,t);if(o){if(i!==e.target_){if(Wt(o.value)){r=!0;break}var a=he(e,this,0,o,!1);y(i,t,a)}else{var u=he(e,this,0,o);if(!e.defineProperty_(t,u))return}r=!0}i=Object.getPrototypeOf(i)}r?Gn(e,0,t):(null==(n=e.target_[X])?void 0:n[t])||d(1,this.annotationType_,e.name_+"."+t.toString())}function fe(e,t,n,r){var i=he(e,this,0,n);return e.defineProperty_(t,i,r)}function he(e,t,n,r,i){var o;return void 0===i&&(i=ht.safeDescriptors),o=r,t.annotationType_,o.value,{value:qt(r.value),configurable:!i||e.isPlainObject_,enumerable:!1,writable:!i}}function de(e,t){return{annotationType_:e,options_:t,make_:ve,extend_:be}}function ve(e,t){for(var n,r=e.target_;r&&r!==g;){var i=_(r,t);if(i){if(pe(0,this,0,i),!e.defineComputedProperty_(t,F({},this.options_,{get:i.get,set:i.set})))return;return void Gn(e,0,t)}r=Object.getPrototypeOf(r)}(null==(n=e.target_[X])?void 0:n[t])||d(1,this.annotationType_,e.name_+"."+t.toString())}function be(e,t,n,r){return pe(0,this,0,n),e.defineComputedProperty_(t,F({},this.options_,{get:n.get,set:n.set}),r)}function pe(e,t,n,r){t.annotationType_,r.get}function _e(e,t){return{annotationType_:e,options_:t,make_:ye,extend_:ge}}function ye(e,t){for(var n,r=e.target_;r&&r!==g;){var i=_(r,t);if(i){var o,a;if(me(0,this),!e.defineObservableProperty_(t,i.value,null!=(o=null==(a=this.options_)?void 0:a.enhancer)?o:ne))return;return void Gn(e,0,t)}r=Object.getPrototypeOf(r)}(null==(n=e.target_[X])?void 0:n[t])||d(1,this.annotationType_,e.name_+"."+t.toString())}function ge(e,t,n,r){var i,o;return me(0,this),e.defineObservableProperty_(t,n.value,null!=(i=null==(o=this.options_)?void 0:o.enhancer)?i:ne,r)}function me(e,t,n,r){t.annotationType_}var Oe={deep:!0,name:void 0,defaultDecorator:void 0,proxy:!0};function we(e){return e||Oe}Object.freeze(Oe);var je=_e("observable"),Pe=_e("observable.ref",{enhancer:re}),Ae=_e("observable.shallow",{enhancer:function(e,t,n){return null==e||Mn(e)||On(e)||xn(e)||Dn(e)?e:Array.isArray(e)?Ce.array(e,{name:n,deep:!1}):k(e)?Ce.object(e,void 0,{name:n,deep:!1}):I(e)?Ce.map(e,{name:n,deep:!1}):R(e)?Ce.set(e,{name:n,deep:!1}):void 0}}),Ve=_e("observable.struct",{enhancer:function(e,t){return Zn(e,t)?t:e}}),Se=Y(je);function xe(e){return!0===e.deep?ne:!1===e.deep?re:(t=e.defaultDecorator)&&null!=(n=null==(r=t.options_)?void 0:r.enhancer)?n:ne;var t,n,r}function Ee(e,t,n){if(!x(t))return Ht(e)?e:k(e)?Ce.object(e,t,n):Array.isArray(e)?Ce.array(e,t):I(e)?Ce.map(e,t):R(e)?Ce.set(e,t):"object"==typeof e&&null!==e?e:Ce.box(e,t);J(e,t,je)}Object.assign(Ee,Se);var ke,De,Ce=p(Ee,{box:function(e,t){var n=we(t);return new Xe(e,xe(n),n.name,!0,n.equals)},array:function(e,t){var n=we(t);return(!1===ht.useProxies||!1===n.proxy?Xn:hn)(e,xe(n),n.name)},map:function(e,t){var n=we(t);return new Sn(e,xe(n),n.name)},set:function(e,t){var n=we(t);return new kn(e,xe(n),n.name)},object:function(e,t,n){return function(e,t,n,r){var i=G(t),o=Ln(e,r)[$];pt();try{N(i).forEach((function(e){o.extend_(e,i[e],!n||!(e in n)||n[e])}))}finally{_t()}return e}(!1===ht.useProxies||!1===(null==n?void 0:n.proxy)?Ln({},n):function(e,t){var n,r;return P(),null!=(r=(n=(e=Ln(e,t))[$]).proxy_)?r:n.proxy_=new Proxy(e,Zt)}({},n),e,t)},ref:Y(Pe),shallow:Y(Ae),deep:Se,struct:Y(Ve)}),Te="computed",Ie=de(Te),Re=de("computed.struct",{equals:te.structural}),Le=function(e,t){if(x(t))return J(e,t,Ie);if(k(e))return Y(de(Te,e));var n=k(t)?t:{};return n.get=e,n.name||(n.name=e.name||""),new $e(n)};Object.assign(Le,Ie),Le.struct=Y(Re);var Ne,Be=0,Me=1,Ge=null!=(ke=null==(De=_((function(){}),"name"))?void 0:De.configurable)&&ke,Ke={value:"action",configurable:!0,writable:!1,enumerable:!1};function Ue(e,t,n,r){function i(){return Fe(0,n,t,r||this,arguments)}return void 0===n&&(n=!1),i.isMobxAction=!0,Ge&&(Ke.value=e,Object.defineProperty(i,"name",Ke)),i}function Fe(e,t,n,r,i){var o=function(e,t,n,r){var i=ht.trackingDerivation,o=!t||!i;pt();var a=ht.allowStateChanges;o&&(ot(),a=ze(!0));var u={runAsAction_:o,prevDerivation_:i,prevAllowStateChanges_:a,prevAllowStateReads_:ut(!0),notifySpy_:!1,startTime_:0,actionId_:Me++,parentActionId_:Be};return Be=u.actionId_,u}(0,t);try{return n.apply(r,i)}catch(e){throw o.error_=e,e}finally{!function(e){Be!==e.actionId_&&d(30),Be=e.parentActionId_,void 0!==e.error_&&(ht.suppressReactionErrors=!0),We(e.prevAllowStateChanges_),st(e.prevAllowStateReads_),_t(),e.runAsAction_&&at(e.prevDerivation_),ht.suppressReactionErrors=!1}(o)}}function qe(e,t){var n=ze(e);try{return t()}finally{We(n)}}function ze(e){var t=ht.allowStateChanges;return ht.allowStateChanges=e,t}function We(e){ht.allowStateChanges=e}Ne=Symbol.toPrimitive;var He,Xe=function(e){function t(t,n,r,i,o){var a;return void 0===r&&(r="ObservableValue"),void 0===i&&(i=!0),void 0===o&&(o=te.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=o,a.value_=n(t,void 0,r),a}q(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))!==ht.UNCHANGED&&this.setNewValue_(e)},n.prepareNewValue_=function(e){if(en(this)){var t=nn(this,{object:this,type:ln,newValue:e});if(!t)return ht.UNCHANGED;e=t.newValue}return e=this.enhancer(e,this.value_,this.name_),this.equals(this.value_,e)?ht.UNCHANGED:e},n.setNewValue_=function(e){var t=this.value_;this.value_=e,this.reportChanged(),rn(this)&&an(this,{type:ln,object:this,newValue:e,oldValue:t})},n.get=function(){return this.reportObserved(),this.dehanceValue(this.value_)},n.intercept_=function(e){return tn(this,e)},n.observe_=function(e,t){return t&&e({observableKind:"value",debugObjectName:this.name_,object:this,type:ln,newValue:this.value_,oldValue:void 0}),on(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 B(this.get())},n[Ne]=function(){return this.valueOf()},t}(Q);He=Symbol.toPrimitive;var Ye,Je,$e=function(){function e(e){this.dependenciesState_=Ye.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_=Ye.UP_TO_DATE_,this.unboundDepsCount_=0,this.value_=new Ze(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_=Je.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||d(31),this.derivation=e.get,this.name_=e.name||"ComputedValue",e.set&&(this.setter_=Ue("ComputedValue-setter",e.set)),this.equals_=e.equals||(e.compareStructural||e.struct?te.structural:te.default),this.scope_=e.context,this.requiresReaction_=!!e.requiresReaction,this.keepAlive_=!!e.keepAlive}var t=e.prototype;return t.onBecomeStale_=function(){!function(e){e.lowestObserverState_===Ye.UP_TO_DATE_&&(e.lowestObserverState_=Ye.POSSIBLY_STALE_,e.observers_.forEach((function(e){e.dependenciesState_===Ye.UP_TO_DATE_&&(e.dependenciesState_=Ye.POSSIBLY_STALE_,e.onBecomeStale_())})))}(this)},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_&&d(32,this.name_,this.derivation),0!==ht.inBatch||0!==this.observers_.size||this.keepAlive_){if(yt(this),tt(this)){var e=ht.trackingContext;this.keepAlive_&&!e&&(ht.trackingContext=this),this.trackAndCompute()&&function(e){e.lowestObserverState_!==Ye.STALE_&&(e.lowestObserverState_=Ye.STALE_,e.observers_.forEach((function(t){t.dependenciesState_===Ye.POSSIBLY_STALE_?t.dependenciesState_=Ye.STALE_:t.dependenciesState_===Ye.UP_TO_DATE_&&(e.lowestObserverState_=Ye.UP_TO_DATE_)})))}(this),ht.trackingContext=e}}else tt(this)&&(this.warnAboutUntrackedRead_(),pt(),this.value_=this.computeValue_(!1),_t());var t=this.value_;if(et(t))throw t.cause;return t},t.set=function(e){if(this.setter_){this.isRunningSetter_&&d(33,this.name_),this.isRunningSetter_=!0;try{this.setter_.call(this.scope_,e)}finally{this.isRunningSetter_=!1}}else d(34,this.name_)},t.trackAndCompute=function(){var e=this.value_,t=this.dependenciesState_===Ye.NOT_TRACKING_,n=this.computeValue_(!0),r=t||et(e)||et(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=nt(this,this.derivation,this.scope_);else if(!0===ht.disableErrorBoundaries)t=this.derivation.call(this.scope_);else try{t=this.derivation.call(this.scope_)}catch(e){t=new Ze(e)}return We(n),this.isComputing_=!1,t},t.suspend_=function(){this.keepAlive_||(rt(this),this.value_=void 0)},t.observe_=function(e,t){var n=this,r=!0,i=void 0;return It((function(){var o=n.get();if(!r||t){var a=ot();e({observableKind:"computed",debugObjectName:n.name_,type:ln,object:n,newValue:o,oldValue:i}),at(a)}r=!1,i=o}))},t.warnAboutUntrackedRead_=function(){},t.toString=function(){return this.name_+"["+this.derivation.toString()+"]"},t.valueOf=function(){return B(this.get())},t[He]=function(){return this.valueOf()},e}(),Qe=T("ComputedValue",$e);!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_"}(Ye||(Ye={})),function(e){e[e.NONE=0]="NONE",e[e.LOG=1]="LOG",e[e.BREAK=2]="BREAK"}(Je||(Je={}));var Ze=function(e){this.cause=void 0,this.cause=e};function et(e){return e instanceof Ze}function tt(e){switch(e.dependenciesState_){case Ye.UP_TO_DATE_:return!1;case Ye.NOT_TRACKING_:case Ye.STALE_:return!0;case Ye.POSSIBLY_STALE_:for(var t=ut(!0),n=ot(),r=e.observing_,i=r.length,o=0;o<i;o++){var a=r[o];if(Qe(a)){if(ht.disableErrorBoundaries)a.get();else try{a.get()}catch(e){return at(n),st(t),!0}if(e.dependenciesState_===Ye.STALE_)return at(n),st(t),!0}}return lt(e),at(n),st(t),!1}}function nt(e,t,n){var r=ut(!0);lt(e),e.newObserving_=new Array(e.observing_.length+100),e.unboundDepsCount_=0,e.runId_=++ht.runId;var i,o=ht.trackingDerivation;if(ht.trackingDerivation=e,ht.inBatch++,!0===ht.disableErrorBoundaries)i=t.call(n);else try{i=t.call(n)}catch(e){i=new Ze(e)}return ht.inBatch--,ht.trackingDerivation=o,function(e){for(var t=e.observing_,n=e.observing_=e.newObserving_,r=Ye.UP_TO_DATE_,i=0,o=e.unboundDepsCount_,a=0;a<o;a++){var u=n[a];0===u.diffValue_&&(u.diffValue_=1,i!==a&&(n[i]=u),i++),u.dependenciesState_>r&&(r=u.dependenciesState_)}for(n.length=i,e.newObserving_=null,o=t.length;o--;){var s=t[o];0===s.diffValue_&&vt(s,e),s.diffValue_=0}for(;i--;){var l=n[i];1===l.diffValue_&&(l.diffValue_=0,dt(l,e))}r!==Ye.UP_TO_DATE_&&(e.dependenciesState_=r,e.onBecomeStale_())}(e),st(r),i}function rt(e){var t=e.observing_;e.observing_=[];for(var n=t.length;n--;)vt(t[n],e);e.dependenciesState_=Ye.NOT_TRACKING_}function it(e){var t=ot();try{return e()}finally{at(t)}}function ot(){var e=ht.trackingDerivation;return ht.trackingDerivation=null,e}function at(e){ht.trackingDerivation=e}function ut(e){var t=ht.allowStateReads;return ht.allowStateReads=e,t}function st(e){ht.allowStateReads=e}function lt(e){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 ct=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},ft=!0,ht=function(){var e=b();return e.__mobxInstanceCount>0&&!e.__mobxGlobals&&(ft=!1),e.__mobxGlobals&&e.__mobxGlobals.version!==(new ct).version&&(ft=!1),ft?e.__mobxGlobals?(e.__mobxInstanceCount+=1,e.__mobxGlobals.UNCHANGED||(e.__mobxGlobals.UNCHANGED={}),e.__mobxGlobals):(e.__mobxInstanceCount=1,e.__mobxGlobals=new ct):(setTimeout((function(){d(35)}),1),new ct)}();function dt(e,t){e.observers_.add(t),e.lowestObserverState_>t.dependenciesState_&&(e.lowestObserverState_=t.dependenciesState_)}function vt(e,t){e.observers_.delete(t),0===e.observers_.size&&bt(e)}function bt(e){!1===e.isPendingUnobservation_&&(e.isPendingUnobservation_=!0,ht.pendingUnobservations.push(e))}function pt(){ht.inBatch++}function _t(){if(0==--ht.inBatch){Ot();for(var e=ht.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 $e&&n.suspend_())}ht.pendingUnobservations=[]}}function yt(e){var t=ht.trackingDerivation;return null!==t?(t.runId_!==e.lastAccessedBy_&&(e.lastAccessedBy_=t.runId_,t.newObserving_[t.unboundDepsCount_++]=e,!e.isBeingObserved_&&ht.trackingContext&&(e.isBeingObserved_=!0,e.onBO())),!0):(0===e.observers_.size&&ht.inBatch>0&&bt(e),!1)}function gt(e){e.lowestObserverState_!==Ye.STALE_&&(e.lowestObserverState_=Ye.STALE_,e.observers_.forEach((function(e){e.dependenciesState_===Ye.UP_TO_DATE_&&e.onBecomeStale_(),e.dependenciesState_=Ye.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_=Ye.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_=Je.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,ht.pendingReactions.push(this),Ot())},t.isScheduled=function(){return this.isScheduled_},t.runReaction_=function(){if(!this.isDisposed_){pt(),this.isScheduled_=!1;var e=ht.trackingContext;if(ht.trackingContext=this,tt(this)){this.isTrackPending_=!0;try{this.onInvalidate_()}catch(e){this.reportExceptionInDerivation_(e)}}ht.trackingContext=e,_t()}},t.track=function(e){if(!this.isDisposed_){pt(),this.isRunning_=!0;var t=ht.trackingContext;ht.trackingContext=this;var n=nt(this,e,void 0);ht.trackingContext=t,this.isRunning_=!1,this.isTrackPending_=!1,this.isDisposed_&&rt(this),et(n)&&this.reportExceptionInDerivation_(n.cause),_t()}},t.reportExceptionInDerivation_=function(e){var t=this;if(this.errorHandler_)this.errorHandler_(e,this);else{if(ht.disableErrorBoundaries)throw e;var n="[mobx] uncaught error in '"+this+"'";ht.suppressReactionErrors||console.error(n,e),ht.globalReactionErrorHandlers.forEach((function(n){return n(e,t)}))}},t.dispose=function(){this.isDisposed_||(this.isDisposed_=!0,this.isRunning_||(pt(),rt(this),_t()))},t.getDisposer_=function(){var e=this.dispose.bind(this);return e[$]=this,e},t.toString=function(){return"Reaction["+this.name_+"]"},t.trace=function(e){void 0===e&&(e=!1),function(){d("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 i=Xt(n);if(!i)return d("'trace(break?)' can only be used inside a tracked computed value or a Reaction. Consider passing in the computed value or reaction explicitly");i.isTracing_===Je.NONE&&console.log("[mobx.trace] '"+i.name_+"' tracing enabled"),i.isTracing_=e?Je.BREAK:Je.LOG}(this,e)},e}();function Ot(){ht.inBatch>0||ht.isRunningReactions||wt()}function wt(){ht.isRunningReactions=!0;for(var e=ht.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,i=n.length;r<i;r++)n[r].runReaction_()}ht.isRunningReactions=!1}var jt=T("Reaction",mt),Pt="action",At="autoAction",Vt=oe(Pt),St=oe("action.bound",{bound:!0}),xt=oe(At,{autoAction:!0}),Et=oe("autoAction.bound",{autoAction:!0,bound:!0});function kt(e){return function(t,n){return S(t)?Ue(t.name||"<unnamed action>",t,e):S(n)?Ue(t,n,e):x(n)?J(t,n,e?xt:Vt):x(t)?Y(oe(e?At:Pt,{name:t,autoAction:e})):void 0}}var Dt=kt(!1);Object.assign(Dt,Vt);var Ct=kt(!0);function Tt(e){return S(e)&&!0===e.isMobxAction}function It(e,t){var n,r;void 0===t&&(t=O);var i,o=null!=(n=null==(r=t)?void 0:r.name)?n:"Autorun";if(t.scheduler||t.delay){var a=Lt(t),u=!1;i=new mt(o,(function(){u||(u=!0,a((function(){u=!1,i.isDisposed_||i.track(s)})))}),t.onError,t.requiresObservable)}else i=new mt(o,(function(){this.track(s)}),t.onError,t.requiresObservable);function s(){e(i)}return i.schedule_(),i.getDisposer_()}Object.assign(Ct,xt),Dt.bound=Y(St),Ct.bound=Y(Et);var Rt=function(e){return e()};function Lt(e){return e.scheduler?e.scheduler:e.delay?function(t){return setTimeout(t,e.delay)}:Rt}function Nt(e,t,n){var r;void 0===n&&(n=O);var i,o,a,u=null!=(r=n.name)?r:"Reaction",s=Dt(u,n.onError?(i=n.onError,o=t,function(){try{return o.apply(this,arguments)}catch(e){i.call(this,e)}}):t),l=!n.scheduler&&!n.delay,c=Lt(n),f=!0,h=!1,d=void 0,v=n.compareStructural?te.structural:n.equals||te.default,b=new mt(u,(function(){f||l?p():h||(h=!0,c(p))}),n.onError,n.requiresObservable);function p(){if(h=!1,!b.isDisposed_){var t=!1;b.track((function(){var n=qe(!1,(function(){return e(b)}));t=f||!v(a,n),d=a,a=n})),(f&&n.fireImmediately||!f&&t)&&s(a,d,b),f=!1}}return b.schedule_(),b.getDisposer_()}var Bt="onBO";function Mt(e,t,n){return Gt("onBUO",e,t,n)}function Gt(e,t,n,r){var i="function"==typeof r?Yn(t,n):Yn(t),o=S(r)?r:n,a=e+"L";return i[a]?i[a].add(o):i[a]=new Set([o]),function(){var e=i[a];e&&(e.delete(o),0===e.size&&delete i[a])}}var Kt=0;function Ut(){this.message="FLOW_CANCELLED"}Ut.prototype=Object.create(Error.prototype);var Ft=le("flow"),qt=Object.assign((function(e,t){if(x(t))return J(e,t,Ft);var n=e,r=n.name||"<unnamed flow>",i=function(){var e,t=this,i=arguments,o=++Kt,a=Dt(r+" - runid: "+o+" - init",n).apply(t,i),u=void 0,s=new Promise((function(t,n){var i=0;function s(e){var t;u=void 0;try{t=Dt(r+" - runid: "+o+" - yield "+i++,a.next).call(a,e)}catch(e){return n(e)}c(t)}function l(e){var t;u=void 0;try{t=Dt(r+" - runid: "+o+" - yield "+i++,a.throw).call(a,e)}catch(e){return n(e)}c(t)}function c(e){if(!S(null==e?void 0:e.then))return e.done?t(e.value):(u=Promise.resolve(e.value)).then(s,l);e.then(c,n)}e=n,s(void 0)}));return s.cancel=Dt(r+" - runid: "+o+" - cancel",(function(){try{u&&zt(u);var t=a.return(void 0),n=Promise.resolve(t.value);n.then(V,V),zt(n),e(new Ut)}catch(t){e(t)}})),s};return i.isMobXFlow=!0,i}),Ft);function zt(e){S(e.cancel)&&e.cancel()}function Wt(e){return!0===(null==e?void 0:e.isMobXFlow)}function Ht(e){return function(e,t){return!!e&&(void 0!==t?!!Mn(e)&&e[$].values_.has(t):Mn(e)||!!e[$]||Z(e)||jt(e)||Qe(e))}(e)}function Xt(e){switch(e.length){case 0:return ht.trackingDerivation;case 1:return Yn(e[0]);case 2:return Yn(e[0],e[1])}}function Yt(e,t){void 0===t&&(t=void 0),pt();try{return e.apply(t)}finally{_t()}}function Jt(e,t,n){var r;"number"==typeof n.timeout&&(r=setTimeout((function(){if(!o[$].isDisposed_){o();var e=new Error("WHEN_TIMEOUT");if(!n.onError)throw e;n.onError(e)}}),n.timeout)),n.name="When";var i=Ue("When-effect",t),o=It((function(t){qe(!1,e)&&(t.dispose(),r&&clearTimeout(r),i())}),n);return o}function $t(e,t){var n,r=new Promise((function(r,i){var o=Jt(e,r,F({},t,{onError:i}));n=function(){o(),i("WHEN_CANCELLED")}}));return r.cancel=n,r}function Qt(e){return e[$]}var Zt={has:function(e,t){return Qt(e).has_(t)},get:function(e,t){return Qt(e).get_(t)},set:function(e,t,n){var r;return!!x(t)&&(null==(r=Qt(e).set_(t,n,!0))||r)},deleteProperty:function(e,t){var n;return!!x(t)&&(null==(n=Qt(e).delete_(t,!0))||n)},defineProperty:function(e,t,n){var r;return null==(r=Qt(e).defineProperty_(t,n))||r},ownKeys:function(e){return Qt(e).ownKeys_()},preventExtensions:function(e){d(13)}};function en(e){return void 0!==e.interceptors_&&e.interceptors_.length>0}function tn(e,t){var n=e.interceptors_||(e.interceptors_=[]);return n.push(t),A((function(){var e=n.indexOf(t);-1!==e&&n.splice(e,1)}))}function nn(e,t){var n=ot();try{for(var r=[].concat(e.interceptors_||[]),i=0,o=r.length;i<o&&((t=r[i](t))&&!t.type&&d(14),t);i++);return t}finally{at(n)}}function rn(e){return void 0!==e.changeListeners_&&e.changeListeners_.length>0}function on(e,t){var n=e.changeListeners_||(e.changeListeners_=[]);return n.push(t),A((function(){var e=n.indexOf(t);-1!==e&&n.splice(e,1)}))}function an(e,t){var n=ot(),r=e.changeListeners_;if(r){for(var i=0,o=(r=r.slice()).length;i<o;i++)r[i](t);at(n)}}function un(e,t,n){var r=Ln(e,n)[$];pt();try{null!=t||(t=function(e){return M(e,X)||D(e,X,F({},e[X])),e[X]}(e)),N(t).forEach((function(e){return r.make_(e,t[e])}))}finally{_t()}return e}var sn="splice",ln="update",cn={get:function(e,t){var n=e[$];return t===$?n:"length"===t?n.getArrayLength_():"string"!=typeof t||isNaN(t)?M(dn,t)?dn[t]:e[t]:n.get_(parseInt(t))},set:function(e,t,n){var r=e[$];return"length"===t&&r.setArrayLength_(n),"symbol"==typeof t||isNaN(t)?e[t]=n:r.set_(parseInt(t),n),!0},preventExtensions:function(){d(15)}},fn=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 Q(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 tn(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}),on(this,e)},t.getArrayLength_=function(){return this.atom_.reportObserved(),this.values_.length},t.setArrayLength_=function(e){("number"!=typeof e||e<0)&&d("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_&&d(16),this.lastKnownLength_+=t,this.legacyMode_&&t>0&&Hn(e+t+1)},t.spliceWithArray_=function(e,t,n){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=m),en(this)){var o=nn(this,{object:this.proxy_,type:sn,index:e,removedCount:t,added:n});if(!o)return m;t=o.removedCount,n=o.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_(i,a)}var u=this.spliceItemsIntoValues_(e,t,n);return 0===t&&0===n.length||this.notifyArraySplice_(e,n,u),this.dehanceValues_(u)},t.spliceItemsIntoValues_=function(e,t,n){var r;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=e+n.length-t;for(var a=0;a<n.length;a++)this.values_[e+a]=n[a];for(var u=0;u<o.length;u++)this.values_[e+n.length+u]=o[u];return i},t.notifyArrayChildUpdate_=function(e,t,n){var r=!this.owned_&&!1,i=rn(this),o=i||r?{observableKind:"array",object:this.proxy_,type:ln,debugObjectName:this.atom_.name_,index:e,newValue:t,oldValue:n}:null;this.atom_.reportChanged(),i&&an(this,o)},t.notifyArraySplice_=function(e,t,n){var r=!this.owned_&&!1,i=rn(this),o=i||r?{observableKind:"array",object:this.proxy_,debugObjectName:this.atom_.name_,type:sn,index:e,removed:n,added:t,removedCount:n.length,addedCount:t.length}:null;this.atom_.reportChanged(),i&&an(this,o)},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(en(this)){var i=nn(this,{type:ln,object:this.proxy_,index:e,newValue:t});if(!i)return;t=i.newValue}(t=this.enhancer_(t,r))!==r&&(n[e]=t,this.notifyArrayChildUpdate_(e,t,r))}else e===n.length?this.spliceWithArray_(e,0,[t]):d(17,e,n.length)},e}();function hn(e,t,n,r){void 0===n&&(n="ObservableArray"),void 0===r&&(r=!1),P();var i=new fn(n,t,r,!1);C(i.values_,$,i);var o=new Proxy(i.values_,cn);if(i.proxy_=o,e&&e.length){var a=ze(!0);i.spliceWithArray_(0,0,e),We(a)}return o}var dn={clear:function(){return this.splice(0)},replace:function(e){var t=this[$];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),i=2;i<n;i++)r[i-2]=arguments[i];var o=this[$];switch(arguments.length){case 0:return[];case 1:return o.spliceWithArray_(e);case 2:return o.spliceWithArray_(e,t)}return o.spliceWithArray_(e,t,r)},spliceWithArray:function(e,t,n){return this[$].spliceWithArray_(e,t,n)},push:function(){for(var e=this[$],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[$].values_.length-1,0),1)[0]},shift:function(){return this.splice(0,1)[0]},unshift:function(){for(var e=this[$],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 ht.trackingDerivation&&d(37,"reverse"),this.replace(this.slice().reverse()),this},sort:function(){ht.trackingDerivation&&d(37,"sort");var e=this.slice();return e.sort.apply(e,arguments),this.replace(e),this},remove:function(e){var t=this[$],n=t.dehanceValues_(t.values_).indexOf(e);return n>-1&&(this.splice(n,1),!0)}};function vn(e,t){"function"==typeof Array.prototype[e]&&(dn[e]=t(e))}function bn(e){return function(){var t=this[$];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,i=this[$];return i.atom_.reportObserved(),i.dehanceValues_(i.values_)[e]((function(e,i){return t.call(n,e,i,r)}))}}function _n(e){return function(){var t=this,n=this[$];n.atom_.reportObserved();var r=n.dehanceValues_(n.values_),i=arguments[0];return arguments[0]=function(e,n,r){return i(e,n,r,t)},r[e].apply(r,arguments)}}vn("concat",bn),vn("flat",bn),vn("includes",bn),vn("indexOf",bn),vn("join",bn),vn("lastIndexOf",bn),vn("slice",bn),vn("toString",bn),vn("toLocaleString",bn),vn("every",pn),vn("filter",pn),vn("find",pn),vn("findIndex",pn),vn("flatMap",pn),vn("forEach",pn),vn("map",pn),vn("some",pn),vn("reduce",_n),vn("reduceRight",_n);var yn,gn,mn=T("ObservableArrayAdministration",fn);function On(e){return E(e)&&mn(e[$])}var wn={},jn="add",Pn="delete";yn=Symbol.iterator,gn=Symbol.toStringTag;var An,Vn,Sn=function(){function e(e,t,n){void 0===t&&(t=ne),void 0===n&&(n="ObservableMap"),this.enhancer_=void 0,this.name_=void 0,this[$]=wn,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,S(Map)||d(18),this.keysAtom_=ee("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(!ht.trackingDerivation)return this.has_(e);var n=this.hasMap_.get(e);if(!n){var r=n=new Xe(this.has_(e),re,"ObservableMap.key?",!1);this.hasMap_.set(e,r),Mt(r,(function(){return t.hasMap_.delete(e)}))}return n.get()},t.set=function(e,t){var n=this.has_(e);if(en(this)){var r=nn(this,{type:n?ln: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){var t=this;if(this.keysAtom_,en(this)&&!nn(this,{type:Pn,object:this,name:e}))return!1;if(this.has_(e)){var n=rn(this),r=n?{observableKind:"map",debugObjectName:this.name_,type:Pn,object:this,oldValue:this.data_.get(e).value_,name:e}:null;return Yt((function(){t.keysAtom_.reportChanged(),t.updateHasMapEntry_(e,!1),t.data_.get(e).setNewValue_(void 0),t.data_.delete(e)})),n&&an(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))!==ht.UNCHANGED){var r=rn(this),i=r?{observableKind:"map",debugObjectName:this.name_,type:ln,object:this,oldValue:n.value_,name:e,newValue:t}:null;n.setNewValue_(t),r&&an(this,i)}},t.addValue_=function(e,t){var n=this;this.keysAtom_,Yt((function(){var r=new Xe(t,n.enhancer_,"ObservableMap.key",!1);n.data_.set(e,r),t=r.value_,n.updateHasMapEntry_(e,!0),n.keysAtom_.reportChanged()}));var r=rn(this),i=r?{observableKind:"map",debugObjectName:this.name_,type:jn,object:this,name:e,newValue:t}:null;r&&an(this,i)},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()},t.values=function(){var e=this,t=this.keys();return nr({next:function(){var n=t.next(),r=n.done,i=n.value;return{done:r,value:r?void 0:e.get(i)}}})},t.entries=function(){var e=this,t=this.keys();return nr({next:function(){var n=t.next(),r=n.done,i=n.value;return{done:r,value:r?void 0:[i,e.get(i)]}}})},t[yn]=function(){return this.entries()},t.forEach=function(e,t){for(var n,r=H(this);!(n=r()).done;){var i=n.value,o=i[0],a=i[1];e.call(t,a,o,this)}},t.merge=function(e){var t=this;return xn(e)&&(e=new Map(e)),Yt((function(){k(e)?function(e){var t=Object.keys(e);if(!L)return t;var n=Object.getOwnPropertySymbols(e);return n.length?[].concat(t,n.filter((function(t){return g.propertyIsEnumerable.call(e,t)}))):t}(e).forEach((function(n){return t.set(n,e[n])})):Array.isArray(e)?e.forEach((function(e){var n=e[0],r=e[1];return t.set(n,r)})):I(e)?(e.constructor!==Map&&d(19,e),e.forEach((function(e,n){return t.set(n,e)}))):null!=e&&d(20,e)})),this},t.clear=function(){var e=this;Yt((function(){it((function(){for(var t,n=H(e.keys());!(t=n()).done;){var r=t.value;e.delete(r)}}))}))},t.replace=function(e){var t=this;return Yt((function(){for(var n,r=function(e){if(I(e)||xn(e))return e;if(Array.isArray(e))return new Map(e);if(k(e)){var t=new Map;for(var n in e)t.set(n,e[n]);return t}return d(21,e)}(e),i=new Map,o=!1,a=H(t.data_.keys());!(n=a()).done;){var u=n.value;if(!r.has(u))if(t.delete(u))o=!0;else{var s=t.data_.get(u);i.set(u,s)}}for(var l,c=H(r.entries());!(l=c()).done;){var f=l.value,h=f[0],v=f[1],b=t.data_.has(h);if(t.set(h,v),t.data_.has(h)){var p=t.data_.get(h);i.set(h,p),b||(o=!0)}}if(!o)if(t.data_.size!==i.size)t.keysAtom_.reportChanged();else for(var _=t.data_.keys(),y=i.keys(),g=_.next(),m=y.next();!g.done;){if(g.value!==m.value){t.keysAtom_.reportChanged();break}g=_.next(),m=y.next()}t.data_=i})),this},t.toString=function(){return"[object ObservableMap]"},t.toJSON=function(){return Array.from(this)},t.observe_=function(e,t){return on(this,e)},t.intercept_=function(e){return tn(this,e)},U(e,[{key:"size",get:function(){return this.keysAtom_.reportObserved(),this.data_.size}},{key:gn,get:function(){return"Map"}}]),e}(),xn=T("ObservableMap",Sn),En={};An=Symbol.iterator,Vn=Symbol.toStringTag;var kn=function(){function e(e,t,n){void 0===t&&(t=ne),void 0===n&&(n="ObservableSet"),this.name_=void 0,this[$]=En,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_=n,S(Set)||d(22),this.atom_=ee(this.name_),this.enhancer_=function(e,r){return t(e,r,n)},e&&this.replace(e)}var t=e.prototype;return t.dehanceValue_=function(e){return void 0!==this.dehancer?this.dehancer(e):e},t.clear=function(){var e=this;Yt((function(){it((function(){for(var t,n=H(e.data_.values());!(t=n()).done;){var r=t.value;e.delete(r)}}))}))},t.forEach=function(e,t){for(var n,r=H(this);!(n=r()).done;){var i=n.value;e.call(t,i,i,this)}},t.add=function(e){var t=this;if(this.atom_,en(this)&&!nn(this,{type:jn,object:this,newValue:e}))return this;if(!this.has(e)){Yt((function(){t.data_.add(t.enhancer_(e,void 0)),t.atom_.reportChanged()}));var n=rn(this),r=n?{observableKind:"set",debugObjectName:this.name_,type:jn,object:this,newValue:e}:null;n&&an(this,r)}return this},t.delete=function(e){var t=this;if(en(this)&&!nn(this,{type:Pn,object:this,oldValue:e}))return!1;if(this.has(e)){var n=rn(this),r=n?{observableKind:"set",debugObjectName:this.name_,type:Pn,object:this,oldValue:e}:null;return Yt((function(){t.atom_.reportChanged(),t.data_.delete(e)})),n&&an(this,r),!0}return!1},t.has=function(e){return this.atom_.reportObserved(),this.data_.has(this.dehanceValue_(e))},t.entries=function(){var e=0,t=Array.from(this.keys()),n=Array.from(this.values());return nr({next:function(){var r=e;return e+=1,r<n.length?{value:[t[r],n[r]],done:!1}:{done:!0}}})},t.keys=function(){return this.values()},t.values=function(){this.atom_.reportObserved();var e=this,t=0,n=Array.from(this.data_.values());return nr({next:function(){return t<n.length?{value:e.dehanceValue_(n[t++]),done:!1}:{done:!0}}})},t.replace=function(e){var t=this;return Dn(e)&&(e=new Set(e)),Yt((function(){Array.isArray(e)||R(e)?(t.clear(),e.forEach((function(e){return t.add(e)}))):null!=e&&d("Cannot initialize set from "+e)})),this},t.observe_=function(e,t){return on(this,e)},t.intercept_=function(e){return tn(this,e)},t.toJSON=function(){return Array.from(this)},t.toString=function(){return"[object ObservableSet]"},t[An]=function(){return this.values()},U(e,[{key:"size",get:function(){return this.atom_.reportObserved(),this.data_.size}},{key:Vn,get:function(){return"Set"}}]),e}(),Dn=T("ObservableSet",kn),Cn=Symbol("mobx-inferred-annotations"),Tn=Object.create(null),In="remove",Rn=function(){function e(e,t,n,r,i){void 0===t&&(t=new Map),void 0===r&&(r=Ce),void 0===i&&(i=!1),this.target_=void 0,this.values_=void 0,this.name_=void 0,this.defaultAnnotation_=void 0,this.autoBind_=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.autoBind_=i,this.keysAtom_=new Q("ObservableObject.keys"),this.isPlainObject_=k(this.target_)}var t=e.prototype;return t.getObservablePropValue_=function(e){return this.values_.get(e).get()},t.setObservablePropValue_=function(e,t){var n=this.values_.get(e);if(n instanceof $e)return n.set(t),!0;if(en(this)){var r=nn(this,{type:ln,object:this.proxy_||this.target_,name:e,newValue:t});if(!r)return null;t=r.newValue}if((t=n.prepareNewValue_(t))!==ht.UNCHANGED){var i=rn(this),o=i?{type:ln,observableKind:"object",debugObjectName:this.name_,object:this.proxy_||this.target_,oldValue:n.value_,name:e,newValue:t}:null;n.setNewValue_(t),i&&an(this,o)}return!0},t.get_=function(e){return ht.trackingDerivation&&!M(this.target_,e)&&this.has_(e),this.target_[e]},t.set_=function(e,t,n){return void 0===n&&(n=!1),M(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){if(!ht.trackingDerivation)return e in this.target_;this.pendingKeys_||(this.pendingKeys_=new Map);var t=this.pendingKeys_.get(e);return t||(t=new Xe(e in this.target_,re,"ObservableObject.key?",!1),this.pendingKeys_.set(e,t)),t.get()},t.make_=function(e,t){!0===t&&(t=this.inferAnnotation_(e)),!1!==t&&t.make_(this,e)},t.extend_=function(e,t,n,r){if(void 0===r&&(r=!1),!0===n&&(n=ir(t,this.defaultAnnotation_,this.autoBind_)),!1===n)return this.defineProperty_(e,t,r);var i=n.extend_(this,e,t,r);return i&&Gn(this,0,e),i},t.inferAnnotation_=function(e){var t,n=null==(t=this.target_[Cn])?void 0:t.get(e);if(n)return n;for(var r=this.target_;r&&r!==g;){var i=_(r,e);if(i){n=ir(i,this.defaultAnnotation_,this.autoBind_);break}r=Object.getPrototypeOf(r)}if(void 0===n&&d(1,"true",e),!this.isPlainObject_){var o=Object.getPrototypeOf(this.target_);M(o,Cn)||D(o,Cn,new Map),o[Cn].set(e,n)}return n},t.defineProperty_=function(e,t,n){void 0===n&&(n=!1);try{pt();var r=this.delete_(e);if(!r)return r;if(en(this)){var i=nn(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=F({},t,{value:o}))}if(n){if(!Reflect.defineProperty(this.target_,e,t))return!1}else y(this.target_,e,t);this.notifyPropertyAddition_(e,t.value)}finally{_t()}return!0},t.defineObservableProperty_=function(e,t,n,r){void 0===r&&(r=!1);try{pt();var i=this.delete_(e);if(!i)return i;if(en(this)){var o=nn(this,{object:this.proxy_||this.target_,name:e,type:jn,newValue:t});if(!o)return null;t=o.newValue}var a=Bn(e),u={configurable:!ht.safeDescriptors||this.isPlainObject_,enumerable:!0,get:a.get,set:a.set};if(r){if(!Reflect.defineProperty(this.target_,e,u))return!1}else y(this.target_,e,u);var s=new Xe(t,n,"ObservableObject.key",!1);this.values_.set(e,s),this.notifyPropertyAddition_(e,s.value_)}finally{_t()}return!0},t.defineComputedProperty_=function(e,t,n){void 0===n&&(n=!1);try{pt();var r=this.delete_(e);if(!r)return r;if(en(this)&&!nn(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=Bn(e),o={configurable:!ht.safeDescriptors||this.isPlainObject_,enumerable:!1,get:i.get,set:i.set};if(n){if(!Reflect.defineProperty(this.target_,e,o))return!1}else y(this.target_,e,o);this.values_.set(e,new $e(t)),this.notifyPropertyAddition_(e,void 0)}finally{_t()}return!0},t.delete_=function(e,t){if(void 0===t&&(t=!1),!M(this.target_,e))return!0;if(en(this)&&!nn(this,{object:this.proxy_||this.target_,name:e,type:In}))return null;try{var n,r;pt();var i,o=rn(this),a=this.values_.get(e),u=void 0;if(!a&&o&&(u=null==(i=_(this.target_,e))?void 0:i.value),t){if(!Reflect.deleteProperty(this.target_,e))return!1}else delete this.target_[e];if(a&&(this.values_.delete(e),a instanceof Xe&&(u=a.value_),gt(a)),this.keysAtom_.reportChanged(),null==(n=this.pendingKeys_)||null==(r=n.get(e))||r.set(e in this.target_),o){var s={type:In,obs