UNPKG

photoeditorsdk

Version:

The most comprehensive photo editor SDK for HTML5

1 lines 1.49 MB
var iJ=Object.create;var Bu=Object.defineProperty;var ID=Object.getOwnPropertyDescriptor;var rJ=Object.getOwnPropertyNames;var oJ=Object.getPrototypeOf;var nJ=Object.prototype.hasOwnProperty;var sJ=(i,t,e)=>t in i?Bu(i,t,{enumerable:true,configurable:true,writable:true,value:e}):i[t]=e;var DD=i=>Bu(i,"__esModule",{value:true});var d=(i,t)=>()=>(i&&(t=i(i=0)),t);var Wt=(i,t)=>()=>(t||i((t={exports:{}}).exports,t),t.exports);var ue=(i,t)=>{for(var e in t)Bu(i,e,{get:t[e],enumerable:true})};var ED=(i,t,e,r)=>{if(t&&typeof t==="object"||typeof t==="function"){for(let o of rJ(t))if(!nJ.call(i,o)&&(e||o!=="default"))Bu(i,o,{get:()=>t[o],enumerable:!(r=ID(t,o))||r.enumerable})}return i};var y=(i,t)=>{return ED(DD(Bu(i!=null?iJ(oJ(i)):{},"default",!t&&i&&i.__esModule?{get:()=>i.default,enumerable:true}:{value:i,enumerable:true})),i)};var Mi=(i=>{return(t,e)=>{return i&&i.get(t)||(e=ED(DD({}),t,1),i&&i.set(t,e),e)}})(typeof WeakMap!=="undefined"?new WeakMap:0);var f=(i,t,e,r)=>{var o=r>1?void 0:r?ID(t,e):t;for(var n=i.length-1,s;n>=0;n--)if(s=i[n])o=(r?s(t,e,o):s(o))||o;if(r&&o)Bu(t,e,o);return o};var X=(i,t,e)=>{sJ(i,typeof t!=="symbol"?t+"":t,e);return e};function Hm(){if(typeof window!=="undefined"){return window}if(typeof global!=="undefined"){return global}if(typeof self!=="undefined"){return self}return lJ}function vr(){return++at.mobxGuid}function de(i){da(false,i);throw"X"}function da(i,t){if(!i)throw new Error("[mobx] "+(t||aJ))}function es(i,t){if(true)return false;if(t){return es("'"+i+"', use '"+t+"' instead.")}if(FD.indexOf(i)!==-1)return false;FD.push(i);console.error("[mobx] Deprecated: "+i);return true}function kv(i){var t=false;return function(){if(t)return;t=true;return i.apply(this,arguments)}}function cJ(i){var t=[];i.forEach(function(e){if(t.indexOf(e)===-1)t.push(e)});return t}function Iv(i){return i!==null&&typeof i==="object"}function zu(i){if(i===null||typeof i!=="object")return false;var t=Object.getPrototypeOf(i);return t===Object.prototype||t===null}function uJ(i){if(Uu(i)||nn(i)){return i}else if(Array.isArray(i)){return new Map(i)}else if(zu(i)){var t=new Map;for(var e in i){t.set(e,i[e])}return t}else{return de("Cannot convert to map from '"+i+"'")}}function dJ(i,t){for(var e=0;e<t.length;e++){ss(i,t[e],i[t[e]])}}function ss(i,t,e){Object.defineProperty(i,t,{enumerable:false,writable:true,configurable:true,value:e})}function Gm(i,t,e){Object.defineProperty(i,t,{enumerable:false,writable:false,configurable:true,value:e})}function mJ(i,t){if(false)de("Cannot make property '"+t+"' observable, it is not configurable and writable in the target object")}function ba(i,t){var e="isMobX"+i;t.prototype[e]=true;return function(r){return Iv(r)&&r[e]===true}}function pJ(i,t){return typeof i==="number"&&typeof t==="number"&&isNaN(i)&&isNaN(t)}function Uu(i){if(Hm().Map!==void 0&&i instanceof Hm().Map)return true;return false}function Vm(i){return i instanceof Set}function is(i){var t=[];while(true){var e=i.next();if(e.done)break;t.push(e.value)}return t}function GD(){return typeof Symbol==="function"&&Symbol.toPrimitive||"@@toPrimitive"}function VD(i){return i===null?null:typeof i==="object"?""+i:i}function OD(i,t){var e=i.next();while(!e.done){t(e.value);e=i.next()}}function jD(){return typeof Symbol==="function"&&Symbol.iterator||"@@iterator"}function Dv(i,t){Gm(i,jD(),t)}function Wm(i){i[jD()]=hJ;return i}function Ev(){return typeof Symbol==="function"&&Symbol.toStringTag||"@@toStringTag"}function hJ(){return this}function xg(i,t,e){if(t===void 0){t=RD}if(e===void 0){e=RD}var r=new _g(i);YJ(r,t);lE(r,e);return r}function $D(i,t){return i===t}function fJ(i,t){return zv(i,t)}function gJ(i,t){return zv(i,t,1)}function bJ(i,t){return pJ(i,t)||$D(i,t)}function KD(i,t){yv(i,t);function e(){this.constructor=i}i.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}function _v(i,t){var e=typeof Symbol==="function"&&i[Symbol.iterator];if(!e)return i;var r=e.call(i),o,n=[],s;try{while((t===void 0||t-- >0)&&!(o=r.next()).done)n.push(o.value)}catch(a){s={error:a}}finally{try{if(o&&!o.done&&(e=r["return"]))e.call(r)}finally{if(s)throw s.error}}return n}function xv(){for(var i=[],t=0;t<arguments.length;t++)i=i.concat(_v(arguments[t]));return i}function xJ(i,t){var e=t?yJ:_J;return e[i]||(e[i]={configurable:true,enumerable:t,get:function(){Ol(this);return this[i]},set:function(r){Ol(this);this[i]=r}})}function Ol(i){if(i.__mobxDidRunLazyInitializers===true)return;var t=i.__mobxDecorators;if(t){ss(i,"__mobxDidRunLazyInitializers",true);for(var e in t){var r=t[e];r.propertyCreator(i,r.prop,r.descriptor,r.decoratorTarget,r.decoratorArguments)}}}function XD(i,t){return function e(){var r;var o=function n(s,a,l,c){if(c===true){t(s,a,l,s,r);return null}if(false)de("This function is a decorator, but it wasn't invoked like a decorator");if(!Object.prototype.hasOwnProperty.call(s,"__mobxDecorators")){var u=s.__mobxDecorators;ss(s,"__mobxDecorators",Ee({},u))}s.__mobxDecorators[a]={prop:a,propertyCreator:t,descriptor:l,decoratorTarget:s,decoratorArguments:r};return xJ(a,i)};if(vJ(arguments)){r=mg;return o.apply(null,arguments)}else{r=Array.prototype.slice.call(arguments);return o}}}function vJ(i){return(i.length===2||i.length===3)&&typeof i[1]==="string"||i.length===4&&i[3]===true}function jm(i,t,e){if(yg(i))return i;if(Array.isArray(i))return Z.array(i,{name:e});if(zu(i))return Z.object(i,void 0,{name:e});if(Uu(i))return Z.map(i,{name:e});if(Vm(i))return Z.set(i,{name:e});return i}function CJ(i,t,e){if(i===void 0||i===null)return i;if(Bl(i)||Ml(i)||nn(i)||ya(i))return i;if(Array.isArray(i))return Z.array(i,{name:e,deep:false});if(zu(i))return Z.object(i,void 0,{name:e,deep:false});if(Uu(i))return Z.map(i,{name:e,deep:false});if(Vm(i))return Z.set(i,{name:e,deep:false});return de(false)}function vg(i){return i}function SJ(i,t,e){if(false)throw"observable.struct should not be used with observable values";if(zv(i,t))return t;return i}function Cg(i){da(i);var t=XD(true,function(r,o,n,s,a){if(false){da(!n||!n.get,'@observable cannot be used on getter (property "'+o+'"), use @computed instead.')}var l=n?n.initializer?n.initializer.call(r):n.value:void 0;mZ(r,o,l,i)});var e=typeof process!=="undefined"&&process.env&&false?function r(){if(arguments.length<2)return de("Incorrect decorator invocation. @observable decorator doesn't expect any arguments");return t.apply(null,arguments)}:t;e.enhancer=i;return e}function Mu(i){if(i===null||i===void 0)return qD;if(typeof i==="string")return{name:i,deep:true};if(false){if(typeof i!=="object")return de("expected options object");Object.keys(i).forEach(assertValidOption)}return i}function lg(i){return i.defaultDecorator?i.defaultDecorator.enhancer:i.deep===false?vg:jm}function IJ(i,t,e){if(typeof arguments[1]==="string"){return Rv.apply(null,arguments)}if(yg(i))return i;var r=zu(i)?Z.object(i,t,e):Array.isArray(i)?Z.array(i,t):Uu(i)?Z.map(i,t):Vm(i)?Z.set(i,t):i;if(r!==i)return r;de(false)}function ts(i){de("Expected one or two arguments to observable."+i+". Did you accidentally try to use observable."+i+" as decorator?")}function Nm(i){return i instanceof fg}function vv(i){switch(i.dependenciesState){case qt.UP_TO_DATE:return false;case qt.NOT_TRACKING:case qt.STALE:return true;case qt.POSSIBLY_STALE:{var t=Pl(true);var e=Nu();var r=i.observing,o=r.length;for(var n=0;n<o;n++){var s=r[n];if(Sg(s)){if(at.disableErrorBoundaries){s.get()}else{try{s.get()}catch(a){ma(e);rs(t);return true}}if(i.dependenciesState===qt.STALE){ma(e);rs(t);return true}}}ZD(i);ma(e);rs(t);return false}}}function Lu(i){var t=i.observers.length>0;if(at.computationDepth>0&&t)de(false);if(!at.allowStateChanges&&(t||at.enforceActions==="strict"))de(false)}function EJ(i){if(false){console.warn("[mobx] Observable "+i.name+" being read outside a reactive context")}}function JD(i,t,e){var r=Pl(true);ZD(i);i.newObserving=new Array(i.observing.length+100);i.unboundDepsCount=0;i.runId=++at.runId;var o=at.trackingDerivation;at.trackingDerivation=i;var n;if(at.disableErrorBoundaries===true){n=t.call(e)}else{try{n=t.call(e)}catch(s){n=new fg(s)}}at.trackingDerivation=o;RJ(i);if(i.observing.length===0){FJ(i)}rs(r);return n}function FJ(i){if(true)return;if(at.reactionRequiresObservable||i.requiresObservable){console.warn("[mobx] Derivation "+i.name+" is created/updated without reading any observable value")}}function RJ(i){var t=i.observing;var e=i.observing=i.newObserving;var r=qt.UP_TO_DATE;var o=0,n=i.unboundDepsCount;for(var s=0;s<n;s++){var a=e[s];if(a.diffValue===0){a.diffValue=1;if(o!==s)e[o]=a;o++}if(a.dependenciesState>r){r=a.dependenciesState}}e.length=o;i.newObserving=null;n=t.length;while(n--){var a=t[n];if(a.diffValue===0){iE(a,i)}a.diffValue=0}while(o--){var a=e[o];if(a.diffValue===1){a.diffValue=0;LJ(a,i)}}if(r!==qt.UP_TO_DATE){i.dependenciesState=r;i.onBecomeStale()}}function Cv(i){var t=i.observing;i.observing=[];var e=t.length;while(e--)iE(t[e],i);i.dependenciesState=qt.NOT_TRACKING}function Ov(i){var t=Nu();var e=i();ma(t);return e}function Nu(){var i=at.trackingDerivation;at.trackingDerivation=null;return i}function ma(i){at.trackingDerivation=i}function Pl(i){var t=at.allowStateReads;at.allowStateReads=i;return t}function rs(i){at.allowStateReads=i}function ZD(i){if(i.dependenciesState===qt.UP_TO_DATE)return;i.dependenciesState=qt.UP_TO_DATE;var t=i.observing;var e=t.length;while(e--)t[e].lowestObserverState=qt.UP_TO_DATE}function Rl(i,t){if(false){da(typeof t==="function","`action` can only be invoked on functions");if(typeof i!=="string"||!i)de("actions should have valid names, got: '"+i+"'")}var e=function(){return QD(i,t,this,arguments)};if(false){if(_pt){Object.defineProperty(e,"name",{value:i})}}e.isMobxAction=true;return e}function QD(i,t,e,r){var o=AJ(i,e,r);try{return t.apply(e,r)}catch(n){o.error=n;throw n}finally{BJ(o)}}function AJ(i,t,e){var r=gi()&&!!i;var o=0;if(r){o=Date.now();var n=e&&e.length||0;var s=new Array(n);if(n>0)for(var a=0;a<n;a++)s[a]=e[a];xo({type:"action",name:i,object:t,arguments:s})}var l=Nu();os();var c=$m(true);var u=Pl(true);var m={prevDerivation:l,prevAllowStateChanges:c,prevAllowStateReads:u,notifySpy:r,startTime:o,actionId:OJ++,parentActionId:gg};gg=m.actionId;return m}function BJ(i){if(gg!==i.actionId){de("invalid action stack. did you forget to finish an action?")}gg=i.parentActionId;if(i.error!==void 0){at.suppressReactionErrors=true}Km(i.prevAllowStateChanges);rs(i.prevAllowStateReads);ns();ma(i.prevDerivation);if(i.notifySpy){vo({time:Date.now()-i.startTime})}at.suppressReactionErrors=false}function tE(i,t){var e=$m(i);var r;try{r=t()}finally{Km(e)}return r}function $m(i){var t=at.allowStateChanges;at.allowStateChanges=i;return t}function Km(i){at.allowStateChanges=i}function MJ(){if(at.pendingReactions.length||at.inBatch||at.isRunningReactions)de("isolateGlobalState should be called before MobX is running any reactions");eE=true;if(dg){if(--Hm().__mobxInstanceCount===0)Hm().__mobxGlobals=void 0;at=new ug}}function LJ(i,t){var e=i.observers.length;if(e){i.observersIndexes[t.__mapid]=e}i.observers[e]=t;if(i.lowestObserverState>t.dependenciesState)i.lowestObserverState=t.dependenciesState}function iE(i,t){if(i.observers.length===1){i.observers.length=0;rE(i)}else{var e=i.observers;var r=i.observersIndexes;var o=e.pop();if(o!==t){var n=r[t.__mapid]||0;if(n){r[o.__mapid]=n}else{delete r[o.__mapid]}e[n]=o}delete r[t.__mapid]}}function rE(i){if(i.isPendingUnobservation===false){i.isPendingUnobservation=true;at.pendingUnobservations.push(i)}}function os(){at.inBatch++}function ns(){if(--at.inBatch===0){aE();var i=at.pendingUnobservations;for(var t=0;t<i.length;t++){var e=i[t];e.isPendingUnobservation=false;if(e.observers.length===0){if(e.isBeingObserved){e.isBeingObserved=false;e.onBecomeUnobserved()}if(e instanceof ha){e.suspend()}}}at.pendingUnobservations=[]}}function oE(i){EJ(i);var t=at.trackingDerivation;if(t!==null){if(t.runId!==i.lastAccessedBy){i.lastAccessedBy=t.runId;t.newObserving[t.unboundDepsCount++]=i;if(!i.isBeingObserved){i.isBeingObserved=true;i.onBecomeObserved()}}return true}else if(i.observers.length===0&&at.inBatch>0){rE(i)}return false}function zJ(i){if(i.lowestObserverState===qt.STALE)return;i.lowestObserverState=qt.STALE;var t=i.observers;var e=t.length;while(e--){var r=t[e];if(r.dependenciesState===qt.UP_TO_DATE){if(r.isTracing!==_o.NONE){nE(r,i)}r.onBecomeStale()}r.dependenciesState=qt.STALE}}function UJ(i){if(i.lowestObserverState===qt.STALE)return;i.lowestObserverState=qt.STALE;var t=i.observers;var e=t.length;while(e--){var r=t[e];if(r.dependenciesState===qt.POSSIBLY_STALE)r.dependenciesState=qt.STALE;else if(r.dependenciesState===qt.UP_TO_DATE)i.lowestObserverState=qt.UP_TO_DATE}}function NJ(i){if(i.lowestObserverState!==qt.UP_TO_DATE)return;i.lowestObserverState=qt.POSSIBLY_STALE;var t=i.observers;var e=t.length;while(e--){var r=t[e];if(r.dependenciesState===qt.UP_TO_DATE){r.dependenciesState=qt.POSSIBLY_STALE;if(r.isTracing!==_o.NONE){nE(r,i)}r.onBecomeStale()}}}function nE(i,t){console.log("[mobx.trace] '"+i.name+"' is invalidated due to a change in: '"+t.name+"'");if(i.isTracing===_o.BREAK){var e=[];sE(Bv(i),e,1);new Function("debugger;\n/*\nTracing '"+i.name+"'\n\nYou are entering this break point because derivation '"+i.name+"' is being traced and '"+t.name+"' is now forcing it to update.\nJust follow the stacktrace you should now see in the devtools to see precisely what piece of your code is causing this update\nThe stackframe you are looking for is at least ~6-8 stack-frames up.\n\n"+(i instanceof ha?i.derivation.toString().replace(/[*]\//g,"/"):"")+"\n\nThe dependencies for this derivation are:\n\n"+e.join("\n")+"\n*/\n ")()}}function sE(i,t,e){if(t.length>=1e3){t.push("(and many more)");return}t.push(""+new Array(e).join(" ")+i.name);if(i.dependencies)i.dependencies.forEach(function(r){return sE(r,t,e+1)})}function aE(){if(at.inBatch>0||at.isRunningReactions)return;Sv(HJ)}function HJ(){at.isRunningReactions=true;var i=at.pendingReactions;var t=0;while(i.length>0){if(++t===PD){console.error("Reaction doesn't converge to a stable state after "+PD+" iterations."+(" Probably there is a cycle in the reactive function: "+i[0]));i.splice(0)}var e=i.splice(0);for(var r=0,o=e.length;r<o;r++)e[r].runReaction()}at.isRunningReactions=false}function WJ(i){var t=Sv;Sv=function(e){return i(function(){return t(e)})}}function gi(){return!!at.spyListeners.length}function Al(i){if(!at.spyListeners.length)return;var t=at.spyListeners;for(var e=0,r=t.length;e<r;e++)t[e](i)}function xo(i){var t=Ee(Ee({},i),{spyReportStart:true});Al(t)}function vo(i){if(i)Al(Ee(Ee({},i),{spyReportEnd:true}));else Al(GJ)}function Av(i){at.spyListeners.push(i);return kv(function(){at.spyListeners=at.spyListeners.filter(function(t){return t!==i})})}function VJ(){de(false)}function MD(i){return function(t,e,r){if(r){if(false){return de("@action cannot be used with getters")}if(r.value){return{value:Rl(i,r.value),enumerable:false,configurable:true,writable:true}}var o=r.initializer;return{enumerable:false,configurable:true,writable:true,initializer:function(){return Rl(i,o.call(this))}}}return jJ(i).apply(this,arguments)}}function jJ(i){return function(t,e,r){Object.defineProperty(t,e,{configurable:true,enumerable:false,get:function(){return void 0},set:function(o){ss(this,e,v(i,o))}})}}function $J(i,t,e,r){if(r===true){bv(i,t,e.value);return null}if(e){return{configurable:true,enumerable:false,get:function(){bv(this,t,e.value||e.initializer.call(this));return this[t]},set:VJ}}return{enumerable:false,configurable:true,set:function(o){bv(this,t,o)},get:function(){return void 0}}}function Ge(i,t){var e=typeof i==="string"?i:i.name||"<unnamed action>";var r=typeof i==="function"?i:t;if(false){da(typeof r==="function"&&r.length===0,"`runInAction` expects a function without arguments");if(typeof e!=="string"||!e)de("actions should have valid names, got: '"+e+"'")}return QD(e,r,this,void 0)}function bv(i,t,e){ss(i,t,Rl(t,e.bind(i)))}function KJ(i,t){if(t===void 0){t=WD}if(false){da(typeof i==="function","Autorun expects a function as first argument");da(isAction(i)===false,"Autorun does not accept actions since actions are untrackable")}var e=t&&t.name||i.name||"Autorun@"+vr();var r=!t.scheduler&&!t.delay;var o;if(r){o=new fa(e,function(){this.track(a)},t.onError,t.requiresObservable)}else{var n=qJ(t);var s=false;o=new fa(e,function(){if(!s){s=true;n(function(){s=false;if(!o.isDisposed)o.track(a)})}},t.onError,t.requiresObservable)}function a(){i(o)}o.schedule();return o.getDisposer()}function qJ(i){return i.scheduler?i.scheduler:i.delay?function(t){return setTimeout(t,i.delay)}:XJ}function YJ(i,t,e){return cE("onBecomeObserved",i,t,e)}function lE(i,t,e){return cE("onBecomeUnobserved",i,t,e)}function cE(i,t,e,r){var o=typeof r==="function"?ga(t,e):ga(t);var n=typeof r==="function"?r:e;var s=o[i];if(typeof s!=="function")return de(false);o[i]=function(){s.call(this);n.call(this)};return function(){o[i]=s}}function wg(i){var t=i.enforceActions,e=i.computedRequiresReaction,r=i.computedConfigurable,o=i.disableErrorBoundaries,n=i.arrayBuffer,s=i.reactionScheduler,a=i.reactionRequiresObservable,l=i.observableRequiresReaction;if(i.isolateGlobalState===true){MJ()}if(t!==void 0){if(typeof t==="boolean"||t==="strict")es(`Deprecated value for 'enforceActions', use 'false' => '"never"', 'true' => '"observed"', '"strict"' => "'always'" instead`);var c=void 0;switch(t){case true:case"observed":c=true;break;case false:case"never":c=false;break;case"strict":case"always":c="strict";break;default:de("Invalid value for 'enforceActions': '"+t+"', expected 'never', 'always' or 'observed'")}at.enforceActions=c;at.allowStateChanges=c===true||c==="strict"?false:true}if(e!==void 0){at.computedRequiresReaction=!!e}if(a!==void 0){at.reactionRequiresObservable=!!a}if(l!==void 0){at.observableRequiresReaction=!!l;at.allowStateReads=!at.observableRequiresReaction}if(r!==void 0){at.computedConfigurable=!!r}if(o!==void 0){if(o===true)console.warn("WARNING: Debug feature only. MobX will NOT recover from errors if this is on.");at.disableErrorBoundaries=!!o}if(typeof n==="number"){Mv(n)}if(s){WJ(s)}}function JJ(i,t,e,r){if(false){da(arguments.length>=2&&arguments.length<=4,"'extendObservable' expected 2-4 arguments");da(typeof i==="object","'extendObservable' expects an object as first argument");da(!nn(i),"'extendObservable' should not be used on maps, use map.merge instead");da(!yg(t),"Extending an object with another observable (object) is not supported. Please construct an explicit propertymap, using `toJS` if need. See issue #540");if(e){for(var o in e)if(!(o in t))de("Trying to declare a decorator for unspecified property '"+o+"'")}}r=Mu(r);var n=r.defaultDecorator||(r.deep===false?YD:Rv);Ol(i);Lv(i,r.name,n.enhancer);os();try{var s=Object.getOwnPropertyNames(t);for(var a=0,l=s.length;a<l;a++){var o=s[a];var c=Object.getOwnPropertyDescriptor(t,o);if(false){if(isComputed(c.value))de("Passing a 'computed' as initial property value is no longer supported by extendObservable. Use a getter or decorator instead")}var u=e&&o in e?e[o]:c.get?hg:n;if(false)return de("Not a valid decorator for '"+o+"', got: "+u);var m=u(i,o,c,true);if(m)Object.defineProperty(i,o,m)}}finally{ns()}return i}function Bv(i,t){return uE(ga(i,t))}function uE(i){var t={name:i.name};if(i.observing&&i.observing.length>0)t.dependencies=cJ(i.observing).map(uE);return t}function ZJ(){this.message="FLOW_CANCELLED"}function QJ(i,t){if(i===null||i===void 0)return false;if(t!==void 0){if(false)return de("isObservable(object, propertyName) is not supported for arrays and maps. Use map.has or array.length instead.");if(Bl(i)){var e=i.$mobx;return e.values&&!!e.values[t]}return false}return Bl(i)||!!i.$mobx||Fv(i)||bg(i)||Sg(i)}function yg(i){if(arguments.length!==1)de(false);return QJ(i)}function tZ(i){if(Bl(i)){return i.$mobx.getKeys()}if(nn(i)){return is(i.keys())}if(ya(i)){return is(i.keys())}if(Ml(i)){return i.map(function(t,e){return e})}return de(false)}function Pu(i,t,e,r){if(r.detectCycles)i.set(t,e);return e}function ua(i,t,e){if(!t.recurseEverything&&!yg(i))return i;if(typeof i!=="object")return i;if(i===null)return null;if(i instanceof Date)return i;if(PJ(i))return ua(i.get(),t,e);if(yg(i))tZ(i);var r=t.detectCycles===true;if(r&&i!==null&&e.has(i)){return e.get(i)}if(Ml(i)||Array.isArray(i)){var o=Pu(e,i,[],t);var n=i.map(function(g){return ua(g,t,e)});o.length=n.length;for(var s=0,a=n.length;s<a;s++)o[s]=n[s];return o}if(ya(i)||Object.getPrototypeOf(i)===Set.prototype){if(t.exportMapsAsObjects===false){var l=Pu(e,i,new Set,t);i.forEach(function(g){l.add(ua(g,t,e))});return l}else{var c=Pu(e,i,[],t);i.forEach(function(g){c.push(ua(g,t,e))});return c}}if(nn(i)||Object.getPrototypeOf(i)===Map.prototype){if(t.exportMapsAsObjects===false){var u=Pu(e,i,new Map,t);i.forEach(function(g,_){u.set(_,ua(g,t,e))});return u}else{var m=Pu(e,i,{},t);i.forEach(function(g,_){m[_]=ua(g,t,e)});return m}}var p=Pu(e,i,{},t);for(var h in i){p[h]=ua(i[h],t,e)}return p}function lt(i,t){if(typeof t==="boolean")t={detectCycles:t};if(!t)t=eZ;t.detectCycles=t.detectCycles===void 0?t.recurseEverything===true:t.detectCycles===true;var e;if(t.detectCycles)e=new Map;return ua(i,t,e)}function iZ(){var i=[];for(var t=0;t<arguments.length;t++){i[t]=arguments[t]}var e=false;if(typeof i[i.length-1]==="boolean")e=i.pop();var r=rZ(i);if(!r){return de(false)}if(r.isTracing===_o.NONE){console.log("[mobx.trace] '"+r.name+"' tracing enabled")}r.isTracing=e?_o.BREAK:_o.LOG}function rZ(i){switch(i.length){case 0:return at.trackingDerivation;case 1:return ga(i[0]);case 2:return ga(i[0],i[1])}}function tn(i,t){if(t===void 0){t=void 0}os();try{return i.apply(t)}finally{ns()}}function en(i){return i.interceptors!==void 0&&i.interceptors.length>0}function Xm(i,t){var e=i.interceptors||(i.interceptors=[]);e.push(t);return kv(function(){var r=e.indexOf(t);if(r!==-1)e.splice(r,1)})}function rn(i,t){var e=Nu();try{var r=i.interceptors;if(r)for(var o=0,n=r.length;o<n;o++){t=r[o](t);da(!t||t.type,"Intercept handlers should return nothing or a change object");if(!t)break}return t}finally{ma(e)}}function Co(i){return i.changeListeners!==void 0&&i.changeListeners.length>0}function qm(i,t){var e=i.changeListeners||(i.changeListeners=[]);e.push(t);return kv(function(){var r=e.indexOf(t);if(r!==-1)e.splice(r,1)})}function So(i,t){var e=Nu();var r=i.changeListeners;if(!r)return;r=r.slice();for(var o=0,n=r.length;o<n;o++){r[o](t)}ma(e)}function sZ(i,t){if(typeof Object["setPrototypeOf"]!=="undefined"){Object["setPrototypeOf"](i.prototype,t)}else if(typeof i.prototype.__proto__!=="undefined"){i.prototype.__proto__=t}else{i["prototype"]=t}}function mE(i){return{enumerable:false,configurable:false,get:function(){return this.get(i)},set:function(t){this.set(i,t)}}}function lZ(i){Object.defineProperty(on.prototype,""+i,mE(i))}function Mv(i){for(var t=wv;t<i;t++)lZ(t);wv=i}function Ml(i){return Iv(i)&&cZ(i.$mobx)}function cg(i){if(i&&i.toString)return i.toString();else return new String(i).toString()}function Lv(i,t,e){if(t===void 0){t=""}if(e===void 0){e=jm}var r=i.$mobx;if(r)return r;if(!zu(i))t=(i.constructor.name||"ObservableObject")+"@"+vr();if(!t)t="ObservableObject@"+vr();r=new pE(i,t,e);Gm(i,"$mobx",r);return r}function mZ(i,t,e,r){var o=Lv(i);mJ(i,t);if(en(o)){var n=rn(o,{object:i,name:t,type:"add",newValue:e});if(!n)return;e=n.newValue}var s=o.values[t]=new pa(e,r,o.name+"."+t,false);e=s.value;Object.defineProperty(i,t,hZ(t));if(o.keys)o.keys.push(t);gZ(o,i,t,e)}function pZ(i,t,e){var r=Lv(i);e.name=r.name+"."+t;e.context=i;r.values[t]=new ha(e);Object.defineProperty(i,t,fZ(t))}function hZ(i){return LD[i]||(LD[i]={configurable:true,enumerable:true,get:function(){return this.$mobx.read(this,i)},set:function(t){this.$mobx.write(this,i,t)}})}function UD(i){var t=i.$mobx;if(!t){Ol(i);return i.$mobx}return t}function fZ(i){return zD[i]||(zD[i]={configurable:at.computedConfigurable,enumerable:false,get:function(){return UD(this).read(this,i)},set:function(t){UD(this).write(this,i,t)}})}function gZ(i,t,e,r){var o=Co(i);var n=gi();var s=o||n?{type:"add",object:t,name:e,newValue:r}:null;if(n)xo(Ee(Ee({},s),{name:i.name,key:e}));if(o)So(i,s);if(n)vo()}function Bl(i){if(Iv(i)){Ol(i);return bZ(i.$mobx)}return false}function ga(i,t){if(typeof i==="object"&&i!==null){if(Ml(i)){if(t!==void 0)de(false);return i.$mobx.atom}if(ya(i)){return i.$mobx}if(nn(i)){var e=i;if(t===void 0)return e._keysAtom;var r=e._data.get(t)||e._hasMap.get(t);if(!r)de(false);return r}Ol(i);if(t&&!i.$mobx)i[t];if(Bl(i)){if(!t)return de(false);var r=i.$mobx.values[t];if(!r)de(false);return r}if(Fv(i)||Sg(i)||bg(i)){return i}}else if(typeof i==="function"){if(bg(i.$mobx)){return i.$mobx}}return de(false)}function hE(i,t){if(!i)de("Expecting some object");if(t!==void 0)return hE(ga(i,t));if(Fv(i)||Sg(i)||bg(i))return i;if(nn(i)||ya(i))return i;Ol(i);if(i.$mobx)return i.$mobx;de(false)}function yZ(i,t){var e;if(t!==void 0)e=ga(i,t);else if(Bl(i)||nn(i)||ya(i))e=hE(i);else e=ga(i);return e.name}function zv(i,t,e){if(e===void 0){e=-1}return Tv(i,t,e)}function Tv(i,t,e,r,o){if(i===t)return i!==0||1/i===1/t;if(i==null||t==null)return false;if(i!==i)return t!==t;var n=typeof i;if(n!=="function"&&n!=="object"&&typeof t!="object")return false;i=HD(i);t=HD(t);var s=ND.call(i);if(s!==ND.call(t))return false;switch(s){case"[object RegExp]":case"[object String]":return""+i===""+t;case"[object Number]":if(+i!==+i)return+t!==+t;return+i===0?1/+i===1/t:+i===+t;case"[object Date]":case"[object Boolean]":return+i===+t;case"[object Symbol]":return typeof Symbol!=="undefined"&&Symbol.valueOf.call(i)===Symbol.valueOf.call(t)}var a=s==="[object Array]";if(!a){if(typeof i!="object"||typeof t!="object")return false;var l=i.constructor,c=t.constructor;if(l!==c&&!(typeof l==="function"&&l instanceof l&&typeof c==="function"&&c instanceof c)&&("constructor"in i&&"constructor"in t)){return false}}if(e===0){return false}else if(e<0){e=-1}r=r||[];o=o||[];var u=r.length;while(u--){if(r[u]===i)return o[u]===t}r.push(i);o.push(t);if(a){u=i.length;if(u!==t.length)return false;while(u--){if(!Tv(i[u],t[u],e-1,r,o))return false}}else{var m=Object.keys(i);var p=void 0;u=m.length;if(Object.keys(t).length!==u)return false;while(u--){p=m[u];if(!(_Z(t,p)&&Tv(i[p],t[p],e-1,r,o)))return false}}r.pop();o.pop();return true}function HD(i){if(Ml(i))return i.peek();if(Uu(i)||nn(i))return is(i.entries());if(Vm(i)||ya(i))return is(i.entries());return i}function _Z(i,t){return Object.prototype.hasOwnProperty.call(i,t)}var aJ,mg,WD,lJ,FD,RD,_g,Fv,pg,yv,Ee,yJ,_J,qD,wJ,Rv,TJ,YD,kJ,AD,Z,hg,DJ,C,qt,_o,fg,gg,OJ,BD,_pt,pa,PJ,ha,Sg,ug,dg,eE,at,fa,PD,Sv,bg,GJ,v,XJ,eZ,oZ,nZ,wv,Pv,dE,on,aZ,cZ,uZ,Tg,nn,dZ,kg,ya,pE,LD,zD,bZ,ND,Uv,xpt;var wt=d(()=>{aJ="An invariant failed, however the error is obfuscated because this is an production build.";mg=[];Object.freeze(mg);WD={};Object.freeze(WD);lJ={};FD=[];RD=function(){};_g=function(){function i(t){if(t===void 0){t="Atom@"+vr()}this.name=t;this.isPendingUnobservation=false;this.isBeingObserved=false;this.observers=[];this.observersIndexes={};this.diffValue=0;this.lastAccessedBy=0;this.lowestObserverState=qt.NOT_TRACKING}i.prototype.onBecomeUnobserved=function(){};i.prototype.onBecomeObserved=function(){};i.prototype.reportObserved=function(){return oE(this)};i.prototype.reportChanged=function(){os();zJ(this);ns()};i.prototype.toString=function(){return this.name};return i}();Fv=ba("Atom",_g);pg={identity:$D,structural:fJ,default:bJ,shallow:gJ};yv=function(i,t){yv=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var o in r)if(r.hasOwnProperty(o))e[o]=r[o]};return yv(i,t)};Ee=function(){Ee=Object.assign||function i(t){for(var e,r=1,o=arguments.length;r<o;r++){e=arguments[r];for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n))t[n]=e[n]}return t};return Ee.apply(this,arguments)};yJ={};_J={};qD={deep:true,name:void 0,defaultDecorator:void 0};wJ={deep:false,name:void 0,defaultDecorator:void 0};Object.freeze(qD);Object.freeze(wJ);Rv=Cg(jm);TJ=Cg(CJ);YD=Cg(vg);kJ=Cg(SJ);AD={box:function(i,t){if(arguments.length>2)ts("box");var e=Mu(t);return new pa(i,lg(e),e.name,true,e.equals)},shallowBox:function(i,t){if(arguments.length>2)ts("shallowBox");es("observable.shallowBox","observable.box(value, { deep: false })");return Z.box(i,{name:t,deep:false})},array:function(i,t){if(arguments.length>2)ts("array");var e=Mu(t);return new on(i,lg(e),e.name)},shallowArray:function(i,t){if(arguments.length>2)ts("shallowArray");es("observable.shallowArray","observable.array(values, { deep: false })");return Z.array(i,{name:t,deep:false})},map:function(i,t){if(arguments.length>2)ts("map");var e=Mu(t);return new Tg(i,lg(e),e.name)},shallowMap:function(i,t){if(arguments.length>2)ts("shallowMap");es("observable.shallowMap","observable.map(values, { deep: false })");return Z.map(i,{name:t,deep:false})},set:function(i,t){if(arguments.length>2)ts("set");var e=Mu(t);return new kg(i,lg(e),e.name)},object:function(i,t,e){if(typeof arguments[1]==="string")ts("object");var r=Mu(e);return JJ({},i,t,r)},shallowObject:function(i,t){if(typeof arguments[1]==="string")ts("shallowObject");es("observable.shallowObject","observable.object(values, {}, { deep: false })");return Z.object(i,{},{name:t,deep:false})},ref:YD,shallow:TJ,deep:Rv,struct:kJ};Z=IJ;Object.keys(AD).forEach(function(i){return Z[i]=AD[i]});hg=XD(false,function(i,t,e,r,o){if(false){da(e&&e.get,"Trying to declare a computed value for unspecified getter '"+t+"'")}var n=e.get,s=e.set;var a=o[0]||{};pZ(i,t,Ee({get:n,set:s},a))});DJ=hg({equals:pg.structural});C=function i(t,e,r){if(typeof e==="string"){return hg.apply(null,arguments)}if(t!==null&&typeof t==="object"&&arguments.length===1){return hg.apply(null,arguments)}if(false){da(typeof t==="function","First argument to `computed` should be an expression.");da(arguments.length<3,"Computed takes one or two arguments if used as function")}var o=typeof e==="object"?e:{};o.get=t;o.set=typeof e==="function"?e:o.set;o.name=o.name||t.name||"";return new ha(o)};C.struct=DJ;(function(i){i[i["NOT_TRACKING"]=-1]="NOT_TRACKING";i[i["UP_TO_DATE"]=0]="UP_TO_DATE";i[i["POSSIBLY_STALE"]=1]="POSSIBLY_STALE";i[i["STALE"]=2]="STALE"})(qt||(qt={}));(function(i){i[i["NONE"]=0]="NONE";i[i["LOG"]=1]="LOG";i[i["BREAK"]=2]="BREAK"})(_o||(_o={}));fg=function(){function i(t){this.cause=t}return i}();gg=0;OJ=1;BD=Object.getOwnPropertyDescriptor(function(){},"name");_pt=BD&&BD.configurable;pa=function(i){KD(t,i);function t(e,r,o,n,s){if(o===void 0){o="ObservableValue@"+vr()}if(n===void 0){n=true}if(s===void 0){s=pg.default}var a=i.call(this,o)||this;a.enhancer=r;a.name=o;a.equals=s;a.hasUnreportedChange=false;a.value=r(e,void 0,o);if(n&&gi()){Al({type:"create",name:a.name,newValue:""+a.value})}return a}t.prototype.dehanceValue=function(e){if(this.dehancer!==void 0)return this.dehancer(e);return e};t.prototype.set=function(e){var r=this.value;e=this.prepareNewValue(e);if(e!==at.UNCHANGED){var o=gi();if(o){xo({type:"update",name:this.name,newValue:e,oldValue:r})}this.setNewValue(e);if(o)vo()}};t.prototype.prepareNewValue=function(e){Lu(this);if(en(this)){var r=rn(this,{object:this,type:"update",newValue:e});if(!r)return at.UNCHANGED;e=r.newValue}e=this.enhancer(e,this.value,this.name);return this.equals(this.value,e)?at.UNCHANGED:e};t.prototype.setNewValue=function(e){var r=this.value;this.value=e;this.reportChanged();if(Co(this)){So(this,{type:"update",object:this,newValue:e,oldValue:r})}};t.prototype.get=function(){this.reportObserved();return this.dehanceValue(this.value)};t.prototype.intercept=function(e){return Xm(this,e)};t.prototype.observe=function(e,r){if(r)e({object:this,type:"update",newValue:this.value,oldValue:void 0});return qm(this,e)};t.prototype.toJSON=function(){return this.get()};t.prototype.toString=function(){return this.name+"["+this.value+"]"};t.prototype.valueOf=function(){return VD(this.get())};return t}(_g);pa.prototype[GD()]=pa.prototype.valueOf;PJ=ba("ObservableValue",pa);ha=function(){function i(t){this.dependenciesState=qt.NOT_TRACKING;this.observing=[];this.newObserving=null;this.isBeingObserved=false;this.isPendingUnobservation=false;this.observers=[];this.observersIndexes={};this.diffValue=0;this.runId=0;this.lastAccessedBy=0;this.lowestObserverState=qt.UP_TO_DATE;this.unboundDepsCount=0;this.__mapid="#"+vr();this.value=new fg(null);this.isComputing=false;this.isRunningSetter=false;this.isTracing=_o.NONE;da(t.get,"missing option for computed: get");this.derivation=t.get;this.name=t.name||"ComputedValue@"+vr();if(t.set)this.setter=Rl(this.name+"-setter",t.set);this.equals=t.equals||(t.compareStructural||t.struct?pg.structural:pg.default);this.scope=t.context;this.requiresReaction=!!t.requiresReaction;this.keepAlive=!!t.keepAlive}i.prototype.onBecomeStale=function(){NJ(this)};i.prototype.onBecomeUnobserved=function(){};i.prototype.onBecomeObserved=function(){};i.prototype.get=function(){if(this.isComputing)de("Cycle detected in computation "+this.name+": "+this.derivation);if(at.inBatch===0&&this.observers.length===0&&!this.keepAlive){if(vv(this)){this.warnAboutUntrackedRead();os();this.value=this.computeValue(false);ns()}}else{oE(this);if(vv(this)){if(this.trackAndCompute())UJ(this)}}var t=this.value;if(Nm(t))throw t.cause;return t};i.prototype.peek=function(){var t=this.computeValue(false);if(Nm(t))throw t.cause;return t};i.prototype.set=function(t){if(this.setter){da(!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=true;try{this.setter.call(this.scope,t)}finally{this.isRunningSetter=false}}else da(false,false)};i.prototype.trackAndCompute=function(){if(gi()){Al({object:this.scope,type:"compute",name:this.name})}var t=this.value;var e=this.dependenciesState===qt.NOT_TRACKING;var r=this.computeValue(true);var o=e||Nm(t)||Nm(r)||!this.equals(t,r);if(o){this.value=r}return o};i.prototype.computeValue=function(t){this.isComputing=true;at.computationDepth++;var e;if(t){e=JD(this,this.derivation,this.scope)}else{if(at.disableErrorBoundaries===true){e=this.derivation.call(this.scope)}else{try{e=this.derivation.call(this.scope)}catch(r){e=new fg(r)}}}at.computationDepth--;this.isComputing=false;return e};i.prototype.suspend=function(){if(!this.keepAlive){Cv(this);this.value=void 0}};i.prototype.observe=function(t,e){var r=this;var o=true;var n=void 0;return KJ(function(){var s=r.get();if(!o||e){var a=Nu();t({type:"update",object:r,newValue:s,oldValue:n});ma(a)}o=false;n=s})};i.prototype.warnAboutUntrackedRead=function(){if(true)return;if(this.requiresReaction===true){de("[mobx] Computed value "+this.name+" is read outside a reactive context")}if(this.isTracing!==_o.NONE){console.log("[mobx.trace] '"+this.name+"' is being read outside a reactive context. Doing a full recompute")}if(at.computedRequiresReaction){console.warn("[mobx] Computed value "+this.name+" is being read outside a reactive context. Doing a full recompute")}};i.prototype.toJSON=function(){return this.get()};i.prototype.toString=function(){return this.name+"["+this.derivation.toString()+"]"};i.prototype.valueOf=function(){return VD(this.get())};return i}();ha.prototype[GD()]=ha.prototype.valueOf;Sg=ba("ComputedValue",ha);ug=function(){function i(){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=false;this.allowStateChanges=true;this.allowStateReads=true;this.enforceActions=false;this.spyListeners=[];this.globalReactionErrorHandlers=[];this.computedRequiresReaction=false;this.reactionRequiresObservable=false;this.observableRequiresReaction=false;this.computedConfigurable=false;this.disableErrorBoundaries=false;this.suppressReactionErrors=false}return i}();dg=true;eE=false;at=function(){var i=Hm();if(i.__mobxInstanceCount>0&&!i.__mobxGlobals)dg=false;if(i.__mobxGlobals&&i.__mobxGlobals.version!==new ug().version)dg=false;if(!dg){setTimeout(function(){if(!eE){de("There are multiple, different versions of MobX active. Make sure MobX is loaded only once or use `configure({ isolateGlobalState: true })`")}},1);return new ug}else if(i.__mobxGlobals){i.__mobxInstanceCount+=1;if(!i.__mobxGlobals.UNCHANGED)i.__mobxGlobals.UNCHANGED={};return i.__mobxGlobals}else{i.__mobxInstanceCount=1;return i.__mobxGlobals=new ug}}();fa=function(){function i(t,e,r,o){if(t===void 0){t="Reaction@"+vr()}if(o===void 0){o=false}this.name=t;this.onInvalidate=e;this.errorHandler=r;this.requiresObservable=o;this.observing=[];this.newObserving=[];this.dependenciesState=qt.NOT_TRACKING;this.diffValue=0;this.runId=0;this.unboundDepsCount=0;this.__mapid="#"+vr();this.isDisposed=false;this._isScheduled=false;this._isTrackPending=false;this._isRunning=false;this.isTracing=_o.NONE}i.prototype.onBecomeStale=function(){this.schedule()};i.prototype.schedule=function(){if(!this._isScheduled){this._isScheduled=true;at.pendingReactions.push(this);aE()}};i.prototype.isScheduled=function(){return this._isScheduled};i.prototype.runReaction=function(){if(!this.isDisposed){os();this._isScheduled=false;if(vv(this)){this._isTrackPending=true;try{this.onInvalidate();if(this._isTrackPending&&gi()){Al({name:this.name,type:"scheduled-reaction"})}}catch(t){this.reportExceptionInDerivation(t)}}ns()}};i.prototype.track=function(t){os();var e=gi();var r;if(e){r=Date.now();xo({name:this.name,type:"reaction"})}this._isRunning=true;var o=JD(this,t,void 0);this._isRunning=false;this._isTrackPending=false;if(this.isDisposed){Cv(this)}if(Nm(o))this.reportExceptionInDerivation(o.cause);if(e){vo({time:Date.now()-r})}ns()};i.prototype.reportExceptionInDerivation=function(t){var e=this;if(this.errorHandler){this.errorHandler(t,this);return}if(at.disableErrorBoundaries)throw t;var r="[mobx] Encountered an uncaught exception that was thrown by a reaction or observer component, in: '"+this+"'";if(at.suppressReactionErrors){console.warn("[mobx] (error in reaction '"+this.name+"' suppressed, fix error of causing action below)")}else{console.error(r,t)}if(gi()){Al({type:"error",name:this.name,message:r,error:""+t})}at.globalReactionErrorHandlers.forEach(function(o){return o(t,e)})};i.prototype.dispose=function(){if(!this.isDisposed){this.isDisposed=true;if(!this._isRunning){os();Cv(this);ns()}}};i.prototype.getDisposer=function(){var t=this.dispose.bind(this);t.$mobx=this;return t};i.prototype.toString=function(){return"Reaction["+this.name+"]"};i.prototype.trace=function(t){if(t===void 0){t=false}iZ(this,t)};return i}();PD=100;Sv=function(i){return i()};bg=ba("Reaction",fa);GJ={spyReportEnd:true};v=function i(t,e,r,o){if(arguments.length===1&&typeof t==="function")return Rl(t.name||"<unnamed action>",t);if(arguments.length===2&&typeof e==="function")return Rl(t,e);if(arguments.length===1&&typeof t==="string")return MD(t);if(o===true){t[e]=Rl(t.name||e,r.value)}else{return MD(e).apply(null,arguments)}};v.bound=$J;XJ=function(i){return i()};ZJ.prototype=Object.create(Error.prototype);eZ={detectCycles:true,exportMapsAsObjects:true,recurseEverything:false};oZ=1e4;nZ=function(){var i=false;var t={};Object.defineProperty(t,"0",{set:function(){i=true}});Object.create(t)["0"]=1;return i===false}();wv=0;Pv=function(){function i(){}return i}();sZ(Pv,Array.prototype);if(Object.isFrozen(Array)){["constructor","push","shift","concat","pop","unshift","replace","find","findIndex","splice","reverse","sort"].forEach(function(i){Object.defineProperty(Pv.prototype,i,{configurable:true,writable:true,value:Array.prototype[i]})})}dE=function(){function i(t,e,r,o){this.array=r;this.owned=o;this.values=[];this.lastKnownLength=0;this.atom=new _g(t||"ObservableArray@"+vr());this.enhancer=function(n,s){return e(n,s,t+"[..]")}}i.prototype.dehanceValue=function(t){if(this.dehancer!==void 0)return this.dehancer(t);return t};i.prototype.dehanceValues=function(t){if(this.dehancer!==void 0&&t.length>0)return t.map(this.dehancer);return t};i.prototype.intercept=function(t){return Xm(this,t)};i.prototype.observe=function(t,e){if(e===void 0){e=false}if(e){t({object:this.array,type:"splice",index:0,added:this.values.slice(),addedCount:this.values.length,removed:[],removedCount:0})}return qm(this,t)};i.prototype.getArrayLength=function(){this.atom.reportObserved();return this.values.length};i.prototype.setArrayLength=function(t){if(typeof t!=="number"||t<0)throw new Error("[mobx.array] Out of range: "+t);var e=this.values.length;if(t===e)return;else if(t>e){var r=new Array(t-e);for(var o=0;o<t-e;o++)r[o]=void 0;this.spliceWithArray(e,0,r)}else this.spliceWithArray(t,e-t)};i.prototype.updateArrayLength=function(t,e){if(t!==this.lastKnownLength)throw new Error("[mobx] Modification exception: the internal structure of an observable array was changed. Did you use peek() to change it?");this.lastKnownLength+=e;if(e>0&&t+e+1>wv)Mv(t+e+1)};i.prototype.spliceWithArray=function(t,e,r){var o=this;Lu(this.atom);var n=this.values.length;if(t===void 0)t=0;else if(t>n)t=n;else if(t<0)t=Math.max(0,n+t);if(arguments.length===1)e=n-t;else if(e===void 0||e===null)e=0;else e=Math.max(0,Math.min(e,n-t));if(r===void 0)r=mg;if(en(this)){var s=rn(this,{object:this.array,type:"splice",index:t,removedCount:e,added:r});if(!s)return mg;e=s.removedCount;r=s.added}r=r.length===0?r:r.map(function(c){return o.enhancer(c,void 0)});var a=r.length-e;this.updateArrayLength(n,a);var l=this.spliceItemsIntoValues(t,e,r);if(e!==0||r.length!==0)this.notifyArraySplice(t,r,l);return this.dehanceValues(l)};i.prototype.spliceItemsIntoValues=function(t,e,r){var o;if(r.length<oZ){return(o=this.values).splice.apply(o,xv([t,e],r))}else{var n=this.values.slice(t,t+e);this.values=this.values.slice(0,t).concat(r,this.values.slice(t+e));return n}};i.prototype.notifyArrayChildUpdate=function(t,e,r){var o=!this.owned&&gi();var n=Co(this);var s=n||o?{object:this.array,type:"update",index:t,newValue:e,oldValue:r}:null;if(o)xo(Ee(Ee({},s),{name:this.atom.name}));this.atom.reportChanged();if(n)So(this,s);if(o)vo()};i.prototype.notifyArraySplice=function(t,e,r){var o=!this.owned&&gi();var n=Co(this);var s=n||o?{object:this.array,type:"splice",index:t,removed:r,added:e,removedCount:r.length,addedCount:e.length}:null;if(o)xo(Ee(Ee({},s),{name:this.atom.name}));this.atom.reportChanged();if(n)So(this,s);if(o)vo()};return i}();on=function(i){KD(t,i);function t(e,r,o,n){if(o===void 0){o="ObservableArray@"+vr()}if(n===void 0){n=false}var s=i.call(this)||this;var a=new dE(o,r,s,n);Gm(s,"$mobx",a);if(e&&e.length){var l=$m(true);s.spliceWithArray(0,0,e);Km(l)}if(nZ){Object.defineProperty(a.array,"0",aZ)}return s}t.prototype.intercept=function(e){return this.$mobx.intercept(e)};t.prototype.observe=function(e,r){if(r===void 0){r=false}return this.$mobx.observe(e,r)};t.prototype.clear=function(){return this.splice(0)};t.prototype.concat=function(){var e=[];for(var r=0;r<arguments.length;r++){e[r]=arguments[r]}this.$mobx.atom.reportObserved();return Array.prototype.concat.apply(this.peek(),e.map(function(o){return Ml(o)?o.peek():o}))};t.prototype.replace=function(e){return this.$mobx.spliceWithArray(0,this.$mobx.values.length,e)};t.prototype.toJS=function(){return this.slice()};t.prototype.toJSON=function(){return this.toJS()};t.prototype.peek=function(){this.$mobx.atom.reportObserved();return this.$mobx.dehanceValues(this.$mobx.values)};t.prototype.find=function(e,r,o){if(o===void 0){o=0}if(arguments.length===3)es("The array.find fromIndex argument to find will not be supported anymore in the next major");var n=this.findIndex.apply(this,arguments);return n===-1?void 0:this.get(n)};t.prototype.findIndex=function(e,r,o){if(o===void 0){o=0}if(arguments.length===3)es("The array.findIndex fromIndex argument to find will not be supported anymore in the next major");var n=this.peek(),s=n.length;for(var a=o;a<s;a++)if(e.call(r,n[a],a,this))return a;return-1};t.prototype.splice=function(e,r){var o=[];for(var n=2;n<arguments.length;n++){o[n-2]=arguments[n]}switch(arguments.length){case 0:return[];case 1:return this.$mobx.spliceWithArray(e);case 2:return this.$mobx.spliceWithArray(e,r)}return this.$mobx.spliceWithArray(e,r,o)};t.prototype.spliceWithArray=function(e,r,o){return this.$mobx.spliceWithArray(e,r,o)};t.prototype.push=function(){var e=[];for(var r=0;r<arguments.length;r++){e[r]=arguments[r]}var o=this.$mobx;o.spliceWithArray(o.values.length,0,e);return o.values.length};t.prototype.pop=function(){return this.splice(Math.max(this.$mobx.values.length-1,0),1)[0]};t.prototype.shift=function(){return this.splice(0,1)[0]};t.prototype.unshift=function(){var e=[];for(var r=0;r<arguments.length;r++){e[r]=arguments[r]}var o=this.$mobx;o.spliceWithArray(0,0,e);return o.values.length};t.prototype.reverse=function(){var e=this.slice();return e.reverse.apply(e,arguments)};t.prototype.sort=function(e){var r=this.slice();return r.sort.apply(r,arguments)};t.prototype.remove=function(e){var r=this.$mobx.dehanceValues(this.$mobx.values).indexOf(e);if(r>-1){this.splice(r,1);return true}return false};t.prototype.move=function(e,r){es("observableArray.move is deprecated, use .slice() & .replace() instead");function o(a){if(a<0){throw new Error("[mobx.array] Index out of bounds: "+a+" is negative")}var l=this.$mobx.values.length;if(a>=l){throw new Error("[mobx.array] Index out of bounds: "+a+" is not smaller than "+l)}}o.call(this,e);o.call(this,r);if(e===r){return}var n=this.$mobx.values;var s;if(e<r){s=xv(n.slice(0,e),n.slice(e+1,r+1),[n[e]],n.slice(r+1))}else{s=xv(n.slice(0,r),[n[e]],n.slice(r,e),n.slice(e+1))}this.replace(s)};t.prototype.get=function(e){var r=this.$mobx;if(r){if(e<r.values.length){r.atom.reportObserved();return r.dehanceValue(r.values[e])}console.warn("[mobx.array] Attempt to read an array index ("+e+") that is out of bounds ("+r.values.length+"). Please check length first. Out of bound indices will not be tracked by MobX")}return void 0};t.prototype.set=function(e,r){var o=this.$mobx;var n=o.values;if(e<n.length){Lu(o.atom);var s=n[e];if(en(o)){var a=rn(o,{type:"update",object:this,index:e,newValue:r});if(!a)return;r=a.newValue}r=o.enhancer(r,s);var l=r!==s;if(l){n[e]=r;o.notifyArrayChildUpdate(e,r,s)}}else if(e===n.length){o.spliceWithArray(e,0,[r])}else{throw new Error("[mobx.array] Index out of bounds, "+e+" is larger than "+n.length)}};return t}(Pv);Dv(on.prototype,function(){this.$mobx.atom.reportObserved();var i=this;var t=0;return Wm({next:function(){return t<i.length?{value:i[t++],done:false}:{done:true,value:void 0}}})});Object.defineProperty(on.prototype,"length",{enumerable:false,configurable:true,get:function(){return this.$mobx.getArrayLength()},set:function(i){this.$mobx.setArrayLength(i)}});ss(on.prototype,Ev(),"Array");["indexOf","join","lastIndexOf","slice","toString","toLocaleString"].forEach(function(i){var t=Array.prototype[i];da(typeof t==="function","Base function not defined on Array prototype: '"+i+"'");ss(on.prototype,i,function(){return t.apply(this.peek(),arguments)})});["every","filter","forEach","map","some"].forEach(function(i){var t=Array.prototype[i];da(typeof t==="function","Base function not defined on Array prototype: '"+i+"'");ss(on.prototype,i,function(e,r){var o=this;var n=this.$mobx;n.atom.reportObserved();var s=n.dehanceValues(n.values);return s[i](function(a,l){return e.call(r,a,l,o)},r)})});["reduce","reduceRight"].forEach(function(i){ss(on.prototype,i,function(){var t=this;var e=this.$mobx;e.atom.reportObserved();var r=arguments[0];arguments[0]=function(o,n,s){n=e.dehanceValue(n);return r(o,n,s,t)};return e.values[i].apply(e.values,arguments)})});dJ(on.prototype,["constructor","intercept","observe","clear","concat","get","replace","toJS","toJSON","peek","find","findIndex","splice","spliceWithArray","push","pop","set","shift","unshift","reverse","sort","remove","move","toString","toLocaleString"]);aZ=mE(0);Mv(1e3);cZ=ba("ObservableArrayAdministration",dE);uZ={};Tg=function(){function i(t,e,r){if(e===void 0){e=jm}if(r===void 0){r="ObservableMap@"+vr()}this.enhancer=e;this.name=r;this.$mobx=uZ;this._keysAtom=xg(this.name+".keys()");if(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)}i.prototype._has=function(t){return this._data.has(t)};i.prototype.has=function(t){var e=this;if(!at.trackingDerivation)return this._has(t);var r=this._hasMap.get(t);if(!r){var o=r=new pa(this._has(t),vg,this.name+"."+cg(t)+"?",false);this._hasMap.set(t,o);lE(o,function(){return e._hasMap.delete(t)})}return r.get()};i.prototype.set=function(t,e){var r=this._has(t);if(en(this)){var o=rn(this,{type:r?"update":"add",object:this,newValue:e,name:t});if(!o)return this;e=o.newValue}if(r){this._updateValue(t,e)}else{this._addValue(t,e)}return this};i.prototype.delete=function(t){var e=this;Lu(this._keysAtom);if(en(this)){var r=rn(this,{type:"delete",object:this,name:t});if(!r)return false}if(this._has(t)){var o=gi();var n=Co(this);var r=n||o?{type:"delete",object:this,oldValue:this._data.get(t).value,name:t}:null;if(o)xo(Ee(Ee({},r),{name:this.name,key:t}));tn(function(){e._keysAtom.reportChanged();e._updateHasMapEntry(t,false);var a=e._data.get(t);a.setNewValue(void 0);e._data.delete(t)});if(n)So(this,r);if(o)vo();return true}return false};i.prototype._updateHasMapEntry=function(t,e){var r=this._hasMap.get(t);if(r){r.setNewValue(e)}};i.prototype._updateValue=function(t,e){var r=this._data.get(t);e=r.prepareNewValue(e);if(e!==at.UNCHANGED){var o=gi();var n=Co(this);var s=n||o?{type:"update",object:this,oldValue:r.value,name:t,newValue:e}:null;if(o)xo(Ee(Ee({},s),{name:this.name,key:t}));r.setNewValue(e);if(n)So(this,s);if(o)vo()}};i.prototype._addValue=function(t,e){var r=this;Lu(this._keysAtom);tn(functio