diff x/static/js/8007.3025c802.chunk.js @ 125:49f3d3878413 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit 5ea1f9c1eef1de76232e69aa6d34cda77d90d566
author fubar
date Sat, 05 Oct 2024 23:58:05 +0000
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/x/static/js/8007.3025c802.chunk.js	Sat Oct 05 23:58:05 2024 +0000
@@ -0,0 +1,3 @@
+/*! For license information please see 8007.3025c802.chunk.js.LICENSE.txt */
+"use strict";(globalThis.webpackChunk_jbrowse_web=globalThis.webpackChunk_jbrowse_web||[]).push([[8007],{39975:()=>{},47046:(e,t,r)=>{r.d(t,{A:()=>a});class n{}class i{constructor(){this.signals=new Set,this.abortController=new AbortController}addSignal(e=new n){if(this.signal.aborted)throw new Error("cannot add a signal, already aborted!");this.signals.add(e),e.aborted?this.handleAborted(e):"function"==typeof e.addEventListener&&e.addEventListener("abort",(()=>{this.handleAborted(e)}))}handleAborted(e){this.signals.delete(e),0===this.signals.size&&this.abortController.abort()}get signal(){return this.abortController.signal}abort(){this.abortController.abort()}}class o{constructor(){this.callbacks=new Set}addCallback(e=()=>{}){this.callbacks.add(e),e(this.currentMessage)}callback(e){this.currentMessage=e;for(const t of this.callbacks)t(e)}}class a{constructor({fill:e,cache:t}){if("function"!=typeof e)throw new TypeError("must pass a fill function");if("object"!=typeof t)throw new TypeError("must pass a cache object");if("function"!=typeof t.get||"function"!=typeof t.set||"function"!=typeof t.delete)throw new TypeError("cache must implement get(key), set(key, val), and and delete(key)");this.cache=t,this.fillCallback=e}static isAbortException(e){return"AbortError"===e.name||"ERR_ABORTED"===e.code||"AbortError: aborted"===e.message||"Error: aborted"===e.message}evict(e,t){this.cache.get(e)===t&&this.cache.delete(e)}fill(e,t,r,n){const a=new i,s=new o;s.addCallback(n);const u={aborter:a,promise:this.fillCallback(t,a.signal,(e=>{s.callback(e)})),settled:!1,statusReporter:s,get aborted(){return this.aborter.signal.aborted}};u.aborter.addSignal(r),u.aborter.signal.addEventListener("abort",(()=>{u.settled||this.evict(e,u)})),u.promise.then((()=>{u.settled=!0}),(()=>{u.settled=!0,this.evict(e,u)})).catch((e=>{throw console.error(e),e})),this.cache.set(e,u)}static checkSinglePromise(e,t){function r(){if(null==t?void 0:t.aborted)throw Object.assign(new Error("aborted"),{code:"ERR_ABORTED"})}return e.then((e=>(r(),e)),(e=>{throw r(),e}))}has(e){return this.cache.has(e)}get(e,t,r,n){if(!r&&t instanceof AbortSignal)throw new TypeError("second get argument appears to be an AbortSignal, perhaps you meant to pass `null` for the fill data?");const i=this.cache.get(e);return i?i.aborted&&!i.settled?(this.evict(e,i),this.get(e,t,r,n)):i.settled?i.promise:(i.aborter.addSignal(r),i.statusReporter.addCallback(n),a.checkSinglePromise(i.promise,r)):(this.fill(e,t,r,n),a.checkSinglePromise(this.cache.get(e).promise,r))}delete(e){const t=this.cache.get(e);t&&(t.settled||t.aborter.abort(),this.cache.delete(e))}clear(){const e=this.cache.keys();let t=0;for(let r=e.next();!r.done;r=e.next())this.delete(r.value),t+=1;return t}}},96757:(e,t,r)=>{r.d(t,{A:()=>o});var n=r(74893),i=r(69500);const o=(0,n.A)((0,i.jsx)("path",{d:"M4 8h4V4H4zm6 12h4v-4h-4zm-6 0h4v-4H4zm0-6h4v-4H4zm6 0h4v-4h-4zm6-10v4h4V4zm-6 4h4V4h-4zm6 6h4v-4h-4zm0 6h4v-4h-4z"}),"Apps")},25762:(e,t,r)=>{r.d(t,{A:()=>o});var n=r(74893),i=r(69500);const o=(0,n.A)((0,i.jsx)("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6zM19 4h-3.5l-1-1h-5l-1 1H5v2h14z"}),"Delete")},39548:(e,t,r)=>{r.d(t,{A:()=>o});var n=r(74893),i=r(69500);const o=(0,n.A)((0,i.jsx)("path",{d:"M20.5 11H19V7c0-1.1-.9-2-2-2h-4V3.5C13 2.12 11.88 1 10.5 1S8 2.12 8 3.5V5H4c-1.1 0-1.99.9-1.99 2v3.8H3.5c1.49 0 2.7 1.21 2.7 2.7s-1.21 2.7-2.7 2.7H2V20c0 1.1.9 2 2 2h3.8v-1.5c0-1.49 1.21-2.7 2.7-2.7s2.7 1.21 2.7 2.7V22H17c1.1 0 2-.9 2-2v-4h1.5c1.38 0 2.5-1.12 2.5-2.5S21.88 11 20.5 11"}),"Extension")},29078:(e,t,r)=>{r.d(t,{A:()=>o});var n=r(74893),i=r(69500);const o=(0,n.A)((0,i.jsx)("path",{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12zm-1 4 6 6v10c0 1.1-.9 2-2 2H7.99C6.89 23 6 22.1 6 21l.01-14c0-1.1.89-2 1.99-2zm-1 7h5.5L14 6.5z"}),"FileCopy")},91194:(e,t,r)=>{r.d(t,{A:()=>o});var n=r(74893),i=r(69500);const o=(0,n.A)((0,i.jsx)("path",{d:"M19 9h-4V3H9v6H5l7 7zM5 18v2h14v-2z"}),"GetApp")},51469:(e,t,r)=>{r.d(t,{A:()=>o});var n=r(74893),i=r(69500);const o=(0,n.A)((0,i.jsx)("path",{d:"M8.59 16.59 13.17 12 8.59 7.41 10 6l6 6-6 6z"}),"KeyboardArrowRight")},67386:(e,t,r)=>{r.d(t,{A:()=>o});var n=r(74893),i=r(69500);const o=(0,n.A)((0,i.jsx)("path",{d:"M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3z"}),"Launch")},922:(e,t,r)=>{r.d(t,{A:()=>o});var n=r(74893),i=r(69500);const o=(0,n.A)((0,i.jsx)("path",{d:"M3 18h18v-2H3zm0-5h18v-2H3zm0-7v2h18V6z"}),"Menu")},550:(e,t,r)=>{r.d(t,{A:()=>o});var n=r(74893),i=r(69500);const o=(0,n.A)((0,i.jsx)("path",{d:"M5 4v2h14V4zm0 10h4v6h6v-6h4l-7-7z"}),"Publish")},83105:(e,t,r)=>{r.d(t,{A:()=>o});var n=r(74893),i=r(69500);const o=(0,n.A)((0,i.jsx)("path",{d:"M18.4 10.6C16.55 8.99 14.15 8 11.5 8c-4.65 0-8.58 3.03-9.96 7.22L3.9 16c1.05-3.19 4.05-5.5 7.6-5.5 1.95 0 3.73.72 5.12 1.88L13 16h9V7z"}),"Redo")},89024:(e,t,r)=>{r.d(t,{A:()=>o});var n=r(74893),i=r(69500);const o=(0,n.A)((0,i.jsx)("path",{d:"M17 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V7zm-5 16c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3m3-10H5V5h10z"}),"Save")},22168:(e,t,r)=>{r.d(t,{A:()=>o});var n=r(74893),i=r(69500);const o=(0,n.A)((0,i.jsx)("path",{d:"M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.09.63-.09.94s.02.64.07.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6"}),"Settings")},37702:(e,t,r)=>{r.d(t,{A:()=>o});var n=r(74893),i=r(69500);const o=(0,n.A)((0,i.jsx)("path",{d:"M18 16.08c-.76 0-1.44.3-1.96.77L8.91 12.7c.05-.23.09-.46.09-.7s-.04-.47-.09-.7l7.05-4.11c.54.5 1.25.81 2.04.81 1.66 0 3-1.34 3-3s-1.34-3-3-3-3 1.34-3 3c0 .24.04.47.09.7L8.04 9.81C7.5 9.31 6.79 9 6 9c-1.66 0-3 1.34-3 3s1.34 3 3 3c.79 0 1.5-.31 2.04-.81l7.12 4.16c-.05.21-.08.43-.08.65 0 1.61 1.31 2.92 2.92 2.92s2.92-1.31 2.92-2.92-1.31-2.92-2.92-2.92"}),"Share")},62424:(e,t,r)=>{r.d(t,{A:()=>o});var n=r(74893),i=r(69500);const o=(0,n.A)((0,i.jsx)("path",{d:"M2 20h20v-4H2zm2-3h2v2H4zM2 4v4h20V4zm4 3H4V5h2zm-4 7h20v-4H2zm2-3h2v2H4z"}),"Storage")},73299:(e,t,r)=>{r.d(t,{A:()=>o});var n=r(74893),i=r(69500);const o=(0,n.A)((0,i.jsx)("path",{d:"M12.5 8c-2.65 0-5.05.99-6.9 2.6L2 7v9h9l-3.62-3.62c1.39-1.16 3.16-1.88 5.12-1.88 3.54 0 6.55 2.31 7.6 5.5l2.37-.78C21.08 11.03 17.15 8 12.5 8"}),"Undo")},27281:(e,t,r)=>{r.d(t,{A:()=>g});var n=r(7552),i=r(93878),o=r(70799),a=r(51148),s=r(60129),u=r(4785),l=r(15622),c=r(58520),f=r(943),p=r(33761),h=r(85693);function d(e){return(0,h.Ay)("MuiAppBar",e)}(0,p.A)("MuiAppBar",["root","positionFixed","positionAbsolute","positionSticky","positionStatic","positionRelative","colorDefault","colorPrimary","colorSecondary","colorInherit","colorTransparent","colorError","colorInfo","colorSuccess","colorWarning"]);var b=r(69500);const v=(e,t)=>e?`${e?.replace(")","")}, ${t})`:t,y=(0,a.Ay)(f.A,{name:"MuiAppBar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[`position${(0,l.A)(r.position)}`],t[`color${(0,l.A)(r.color)}`]]}})((0,s.A)((({theme:e})=>({display:"flex",flexDirection:"column",width:"100%",boxSizing:"border-box",flexShrink:0,variants:[{props:{position:"fixed"},style:{position:"fixed",zIndex:(e.vars||e).zIndex.appBar,top:0,left:"auto",right:0,"@media print":{position:"absolute"}}},{props:{position:"absolute"},style:{position:"absolute",zIndex:(e.vars||e).zIndex.appBar,top:0,left:"auto",right:0}},{props:{position:"sticky"},style:{position:"sticky",zIndex:(e.vars||e).zIndex.appBar,top:0,left:"auto",right:0}},{props:{position:"static"},style:{position:"static"}},{props:{position:"relative"},style:{position:"relative"}},{props:{color:"inherit"},style:{"--AppBar-color":"inherit"}},{props:{color:"default"},style:{"--AppBar-background":e.vars?e.vars.palette.AppBar.defaultBg:e.palette.grey[100],"--AppBar-color":e.vars?e.vars.palette.text.primary:e.palette.getContrastText(e.palette.grey[100]),...e.applyStyles("dark",{"--AppBar-background":e.vars?e.vars.palette.AppBar.defaultBg:e.palette.grey[900],"--AppBar-color":e.vars?e.vars.palette.text.primary:e.palette.getContrastText(e.palette.grey[900])})}},...Object.entries(e.palette).filter((0,c.A)(["contrastText"])).map((([t])=>({props:{color:t},style:{"--AppBar-background":(e.vars??e).palette[t].main,"--AppBar-color":(e.vars??e).palette[t].contrastText}}))),{props:e=>!0===e.enableColorOnDark&&!["inherit","transparent"].includes(e.color),style:{backgroundColor:"var(--AppBar-background)",color:"var(--AppBar-color)"}},{props:e=>!1===e.enableColorOnDark&&!["inherit","transparent"].includes(e.color),style:{backgroundColor:"var(--AppBar-background)",color:"var(--AppBar-color)",...e.applyStyles("dark",{backgroundColor:e.vars?v(e.vars.palette.AppBar.darkBg,"var(--AppBar-background)"):null,color:e.vars?v(e.vars.palette.AppBar.darkColor,"var(--AppBar-color)"):null})}},{props:{color:"transparent"},style:{"--AppBar-background":"transparent","--AppBar-color":"inherit",backgroundColor:"var(--AppBar-background)",color:"var(--AppBar-color)",...e.applyStyles("dark",{backgroundImage:"none"})}}]})))),g=n.forwardRef((function(e,t){const r=(0,u.b)({props:e,name:"MuiAppBar"}),{className:n,color:a="primary",enableColorOnDark:s=!1,position:c="fixed",...f}=r,p={...r,color:a,position:c,enableColorOnDark:s},h=(e=>{const{color:t,position:r,classes:n}=e,i={root:["root",`color${(0,l.A)(t)}`,`position${(0,l.A)(r)}`]};return(0,o.A)(i,d,n)})(p);return(0,b.jsx)(y,{square:!0,component:"header",ownerState:p,elevation:4,className:(0,i.A)(h.root,n,"fixed"===c&&"mui-fixed"),ref:t,...f})}))},16179:(e,t,r)=>{r.d(t,{Ay:()=>h,qy:()=>u,rf:()=>l});var n=r(7552),i=r(69743),o=r(4785),a=r(69500);const s="function"==typeof(0,i.Dp)({}),u=(e,t)=>({WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",boxSizing:"border-box",WebkitTextSizeAdjust:"100%",...t&&!e.vars&&{colorScheme:e.palette.mode}}),l=e=>({color:(e.vars||e).palette.text.primary,...e.typography.body1,backgroundColor:(e.vars||e).palette.background.default,"@media print":{backgroundColor:(e.vars||e).palette.common.white}}),c=(e,t=!1)=>{const r={};t&&e.colorSchemes&&"function"==typeof e.getColorSchemeSelector&&Object.entries(e.colorSchemes).forEach((([t,n])=>{const i=e.getColorSchemeSelector(t);i.startsWith("@")?r[i]={":root":{colorScheme:n.palette?.mode}}:r[i.replace(/\s*&/,"")]={colorScheme:n.palette?.mode}}));let n={html:u(e,t),"*, *::before, *::after":{boxSizing:"inherit"},"strong, b":{fontWeight:e.typography.fontWeightBold},body:{margin:0,...l(e),"&::backdrop":{backgroundColor:(e.vars||e).palette.background.default}},...r};const i=e.components?.MuiCssBaseline?.styleOverrides;return i&&(n=[n,i]),n},f="mui-ecs",p=(0,i.Dp)(s?({theme:e,enableColorScheme:t})=>c(e,t):({theme:e})=>(e=>{const t=c(e,!1),r=Array.isArray(t)?t[0]:t;return!e.vars&&r&&(r.html[`:root:has(${f})`]={colorScheme:e.palette.mode}),e.colorSchemes&&Object.entries(e.colorSchemes).forEach((([t,n])=>{const i=e.getColorSchemeSelector(t);i.startsWith("@")?r[i]={[`:root:not(:has(.${f}))`]:{colorScheme:n.palette?.mode}}:r[i.replace(/\s*&/,"")]={[`&:not(:has(.${f}))`]:{colorScheme:n.palette?.mode}}})),t})(e)),h=function(e){const t=(0,o.b)({props:e,name:"MuiCssBaseline"}),{children:r,enableColorScheme:i=!1}=t;return(0,a.jsxs)(n.Fragment,{children:[s&&(0,a.jsx)(p,{enableColorScheme:i}),!s&&!i&&(0,a.jsx)("span",{className:f,style:{display:"none"}}),r]})}},62859:(e,t,r)=>{r.d(t,{A:()=>v});var n=r(7552),i=r(93878),o=r(70799),a=r(48054),s=r(15622),u=r(1791),l=r(55270),c=r(51148),f=r(60129),p=r(58520),h=r(4785),d=r(69500);const b=(0,c.Ay)(a.A,{name:"MuiFab",slot:"Root",shouldForwardProp:e=>(0,l.A)(e)||"classes"===e,overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[r.variant],t[`size${(0,s.A)(r.size)}`],"inherit"===r.color&&t.colorInherit,t[(0,s.A)(r.size)],t[r.color]]}})((0,f.A)((({theme:e})=>({...e.typography.button,minHeight:36,transition:e.transitions.create(["background-color","box-shadow","border-color"],{duration:e.transitions.duration.short}),borderRadius:"50%",padding:0,minWidth:0,width:56,height:56,zIndex:(e.vars||e).zIndex.fab,boxShadow:(e.vars||e).shadows[6],"&:active":{boxShadow:(e.vars||e).shadows[12]},color:e.vars?e.vars.palette.text.primary:e.palette.getContrastText?.(e.palette.grey[300]),backgroundColor:(e.vars||e).palette.grey[300],"&:hover":{backgroundColor:(e.vars||e).palette.grey.A100,"@media (hover: none)":{backgroundColor:(e.vars||e).palette.grey[300]},textDecoration:"none"},[`&.${u.A.focusVisible}`]:{boxShadow:(e.vars||e).shadows[6]},variants:[{props:{size:"small"},style:{width:40,height:40}},{props:{size:"medium"},style:{width:48,height:48}},{props:{variant:"extended"},style:{borderRadius:24,padding:"0 16px",width:"auto",minHeight:"auto",minWidth:48,height:48}},{props:{variant:"extended",size:"small"},style:{width:"auto",padding:"0 8px",borderRadius:17,minWidth:34,height:34}},{props:{variant:"extended",size:"medium"},style:{width:"auto",padding:"0 16px",borderRadius:20,minWidth:40,height:40}},{props:{color:"inherit"},style:{color:"inherit"}}]}))),(0,f.A)((({theme:e})=>({variants:[...Object.entries(e.palette).filter((0,p.A)(["dark","contrastText"])).map((([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].contrastText,backgroundColor:(e.vars||e).palette[t].main,"&:hover":{backgroundColor:(e.vars||e).palette[t].dark,"@media (hover: none)":{backgroundColor:(e.vars||e).palette[t].main}}}})))]}))),(0,f.A)((({theme:e})=>({[`&.${u.A.disabled}`]:{color:(e.vars||e).palette.action.disabled,boxShadow:(e.vars||e).shadows[0],backgroundColor:(e.vars||e).palette.action.disabledBackground}})))),v=n.forwardRef((function(e,t){const r=(0,h.b)({props:e,name:"MuiFab"}),{children:n,className:a,color:l="default",component:c="button",disabled:f=!1,disableFocusRipple:p=!1,focusVisibleClassName:v,size:y="large",variant:g="circular",...m}=r,_={...r,color:l,component:c,disabled:f,disableFocusRipple:p,size:y,variant:g},w=(e=>{const{color:t,variant:r,classes:n,size:i}=e,a={root:["root",r,`size${(0,s.A)(i)}`,"inherit"===t?"colorInherit":t]},l=(0,o.A)(a,u.C,n);return{...n,...l}})(_);return(0,d.jsx)(b,{className:(0,i.A)(w.root,a),component:c,disabled:f,focusRipple:!p,focusVisibleClassName:(0,i.A)(w.focusVisible,v),ownerState:_,ref:t,...m,classes:w,children:n})}))},1791:(e,t,r)=>{r.d(t,{A:()=>a,C:()=>o});var n=r(33761),i=r(85693);function o(e){return(0,i.Ay)("MuiFab",e)}const a=(0,n.A)("MuiFab",["root","primary","secondary","extended","circular","focusVisible","disabled","colorInherit","sizeSmall","sizeMedium","sizeLarge","info","error","warning","success"])},17515:(e,t,r)=>{r.d(t,{A:()=>p});var n=r(7552),i=r(93878),o=r(70799),a=r(51148),s=r(60129),u=r(4785),l=r(89663),c=r(69500);const f=(0,a.Ay)("div",{name:"MuiToolbar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,!r.disableGutters&&t.gutters,t[r.variant]]}})((0,s.A)((({theme:e})=>({position:"relative",display:"flex",alignItems:"center",variants:[{props:({ownerState:e})=>!e.disableGutters,style:{paddingLeft:e.spacing(2),paddingRight:e.spacing(2),[e.breakpoints.up("sm")]:{paddingLeft:e.spacing(3),paddingRight:e.spacing(3)}}},{props:{variant:"dense"},style:{minHeight:48}},{props:{variant:"regular"},style:e.mixins.toolbar}]})))),p=n.forwardRef((function(e,t){const r=(0,u.b)({props:e,name:"MuiToolbar"}),{className:n,component:a="div",disableGutters:s=!1,variant:p="regular",...h}=r,d={...r,component:a,disableGutters:s,variant:p},b=(e=>{const{classes:t,disableGutters:r,variant:n}=e,i={root:["root",!r&&"gutters",n]};return(0,o.A)(i,l.U,t)})(d);return(0,c.jsx)(f,{as:a,className:(0,i.A)(b.root,n),ref:t,ownerState:d,...h})}))},89663:(e,t,r)=>{r.d(t,{A:()=>a,U:()=>o});var n=r(33761),i=r(85693);function o(e){return(0,i.Ay)("MuiToolbar",e)}const a=(0,n.A)("MuiToolbar",["root","gutters","regular","dense"])},35068:e=>{var t=function(e){return function(e){return!!e&&"object"==typeof e}(e)&&!function(e){var t=Object.prototype.toString.call(e);return"[object RegExp]"===t||"[object Date]"===t||function(e){return e.$$typeof===r}(e)}(e)},r="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function n(e,t){return!1!==t.clone&&t.isMergeableObject(e)?s((r=e,Array.isArray(r)?[]:{}),e,t):e;var r}function i(e,t,r){return e.concat(t).map((function(e){return n(e,r)}))}function o(e){return Object.keys(e).concat(function(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter((function(t){return Object.propertyIsEnumerable.call(e,t)})):[]}(e))}function a(e,t){try{return t in e}catch(e){return!1}}function s(e,r,u){(u=u||{}).arrayMerge=u.arrayMerge||i,u.isMergeableObject=u.isMergeableObject||t,u.cloneUnlessOtherwiseSpecified=n;var l=Array.isArray(r);return l===Array.isArray(e)?l?u.arrayMerge(e,r,u):function(e,t,r){var i={};return r.isMergeableObject(e)&&o(e).forEach((function(t){i[t]=n(e[t],r)})),o(t).forEach((function(o){(function(e,t){return a(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))})(e,o)||(a(e,o)&&r.isMergeableObject(t[o])?i[o]=function(e,t){if(!t.customMerge)return s;var r=t.customMerge(e);return"function"==typeof r?r:s}(o,r)(e[o],t[o],r):i[o]=n(t[o],r))})),i}(e,r,u):n(r,u)}s.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce((function(e,r){return s(e,r,t)}),{})};var u=s;e.exports=u},78245:(e,t,r)=>{r.d(t,{A:()=>o});var n=r(35451);function i(e){return("object"==typeof e&&null!==e&&"message"in e?e.message:`${e}`).replace(/\.$/,"")}class o{async getBufferFromResponse(e){const t=await e.arrayBuffer();return n.hp.from(t)}constructor(e,t={}){this.baseOverrides={},this.url=e;const r=t.fetch||globalThis.fetch.bind(globalThis);if(!r)throw new TypeError("no fetch function supplied, and none found in global environment");t.overrides&&(this.baseOverrides=t.overrides),this.fetchImplementation=r}async fetch(e,t){let r;try{r=await this.fetchImplementation(e,t)}catch(n){if(!`${n}`.includes("Failed to fetch"))throw new Error(`${i(n)} fetching ${e}`,{cause:n});console.warn(`generic-filehandle: refetching ${e} to attempt to work around chrome CORS header caching bug`);try{r=await this.fetchImplementation(e,{...t,cache:"reload"})}catch(t){throw new Error(`${i(t)} fetching ${e}`,{cause:t})}}return r}async read(e,t=0,r,n=0,i={}){const{headers:o={},signal:a,overrides:s={}}=i;r<1/0?o.range=`bytes=${n}-${n+r}`:r===1/0&&0!==n&&(o.range=`bytes=${n}-`);const u=await this.fetch(this.url,{...this.baseOverrides,...s,headers:{...o,...s.headers,...this.baseOverrides.headers},method:"GET",redirect:"follow",mode:"cors",signal:a});if(!u.ok)throw new Error(`HTTP ${u.status} fetching ${this.url}`);if(200===u.status&&0===n||206===u.status){const n=await this.getBufferFromResponse(u),i=n.copy(e,t,0,Math.min(r,n.length)),o=u.headers.get("content-range"),a=/\/(\d+)$/.exec(o||"");return(null==a?void 0:a[1])&&(this._stat={size:parseInt(a[1],10)}),{bytesRead:i,buffer:e}}if(200===u.status)throw new Error(`${this.url} fetch returned status 200, expected 206`);throw new Error(`HTTP ${u.status} fetching ${this.url}`)}async readFile(e={}){let t,r;"string"==typeof e?(t=e,r={}):(t=e.encoding,r=e,delete r.encoding);const{headers:n={},signal:i,overrides:o={}}=r,a=await this.fetch(this.url,{headers:n,method:"GET",redirect:"follow",mode:"cors",signal:i,...this.baseOverrides,...o});if(200!==a.status)throw new Error(`HTTP ${a.status} fetching ${this.url}`);if("utf8"===t)return a.text();if(t)throw new Error(`unsupported encoding: ${t}`);return this.getBufferFromResponse(a)}async stat(){if(!this._stat){const e=n.hp.allocUnsafe(10);if(await this.read(e,0,10,0),!this._stat)throw new Error(`unable to determine size of file at ${this.url}`)}return this._stat}async close(){}}},8167:(e,t,r)=>{r.d(t,{P:()=>p});var n,i,o=r(7552),a=r(89059),s=r(77173),u="function"==typeof Symbol&&Symbol.for,l=null!==(i=null===(n=Object.getOwnPropertyDescriptor((function(){}),"name"))||void 0===n?void 0:n.configurable)&&void 0!==i&&i,c=u?Symbol.for("react.forward_ref"):"function"==typeof o.forwardRef&&(0,o.forwardRef)((function(e){return null})).$$typeof,f=u?Symbol.for("react.memo"):"function"==typeof o.memo&&(0,o.memo)((function(e){return null})).$$typeof;function p(e,t){var r;if(f&&e.$$typeof===f)throw new Error("[mobx-react-lite] You are trying to use `observer` on a function component wrapped in either another `observer` or `React.memo`. The observer already applies 'React.memo' for you.");if((0,a.P)())return e;var n=null!==(r=null==t?void 0:t.forwardRef)&&void 0!==r&&r,i=e,u=e.displayName||e.name;if(c&&e.$$typeof===c&&(n=!0,"function"!=typeof(i=e.render)))throw new Error("[mobx-react-lite] `render` property of ForwardRef was not a function");var p,d,b=function(e,t){return(0,s.q)((function(){return i(e,t)}),u)};return b.displayName=e.displayName,l&&Object.defineProperty(b,"name",{value:e.name,writable:!0,configurable:!0}),e.contextTypes&&(b.contextTypes=e.contextTypes),n&&(b=(0,o.forwardRef)(b)),b=(0,o.memo)(b),p=e,d=b,Object.keys(p).forEach((function(e){h[e]||Object.defineProperty(d,e,Object.getOwnPropertyDescriptor(p,e))})),b}var h={$$typeof:!0,render:!0,compare:!0,type:!0,displayName:!0}},36422:(e,t,r)=>{r.r(t),r.d(t,{addDisposer:()=>W,addMiddleware:()=>xe,applyAction:()=>_e,applyPatch:()=>_,applySnapshot:()=>A,cast:()=>X,castFlowReturn:()=>Vt,castToReferenceSnapshot:()=>Q,castToSnapshot:()=>Z,clone:()=>H,createActionTrackingMiddleware:()=>ve,createActionTrackingMiddleware2:()=>ge,decorate:()=>Ce,destroy:()=>$,detach:()=>U,escapeJsonPath:()=>zt,flow:()=>It,getChildType:()=>y,getEnv:()=>K,getIdentifier:()=>D,getLivelinessChecking:()=>s,getMembers:()=>J,getNodeId:()=>ee,getParent:()=>T,getParentOfType:()=>x,getPath:()=>I,getPathParts:()=>V,getPropertyMembers:()=>Y,getRelativePath:()=>F,getRoot:()=>C,getRunningActionContext:()=>Ve,getSnapshot:()=>S,getType:()=>v,hasParent:()=>k,hasParentOfType:()=>E,isActionContextChildOf:()=>Me,isActionContextThisOrChildOf:()=>Re,isAlive:()=>G,isArrayType:()=>er,isFrozenType:()=>Lr,isIdentifierType:()=>Zr,isLateType:()=>Mr,isLiteralType:()=>wr,isMapType:()=>Yt,isModelType:()=>ar,isOptionalType:()=>xr,isPrimitiveType:()=>gr,isProtected:()=>j,isReferenceType:()=>Wr,isRefinementType:()=>Pr,isRoot:()=>N,isStateTreeNode:()=>Je,isType:()=>he,isUnionType:()=>Sr,isValidReference:()=>L,joinJsonPath:()=>Bt,onAction:()=>Oe,onPatch:()=>g,onSnapshot:()=>m,process:()=>st,protect:()=>O,recordActions:()=>we,recordPatches:()=>w,resolveIdentifier:()=>R,resolvePath:()=>M,setLivelinessChecking:()=>a,setLivelynessChecking:()=>u,splitJsonPath:()=>Ft,t:()=>rn,toGenerator:()=>Mt,toGeneratorFunction:()=>Nt,tryReference:()=>z,tryResolve:()=>B,typecheck:()=>$e,types:()=>rn,unescapeJsonPath:()=>Lt,unprotect:()=>P,walk:()=>q});var n,i=r(42489),o="warn";function a(e){o=e}function s(){return o}function u(e){a(e)}!function(e){e.afterCreate="afterCreate",e.afterAttach="afterAttach",e.afterCreationFinalization="afterCreationFinalization",e.beforeDetach="beforeDetach",e.beforeDestroy="beforeDestroy"}(n||(n={}));var l=function(e,t){return l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},l(e,t)};function c(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}l(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var f=function(){return f=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},f.apply(this,arguments)};function p(e,t){var r,n,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=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++,n=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],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}}function h(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function d(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a}function b(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(d(arguments[t]));return e}function v(e){return Xe(e,1),Ze(e).type}function y(e,t){return Xe(e,1),Ze(e).getChildType(t)}function g(e,t){return Xe(e,1),Tt(),Ze(e).onPatch(t)}function m(e,t){return Xe(e,1),Tt(),Ze(e).onSnapshot(t)}function _(e,t){Xe(e,1),kt(),Ze(e).applyPatches(vt(t))}function w(e,t){Xe(e,1);var r,n={patches:[],inversePatches:[]},i={},o={get recording(){return!!r},get patches(){return i.patches||(i.patches=n.patches.slice()),i.patches},get reversedInversePatches(){return i.reversedInversePatches||(i.reversedInversePatches=n.inversePatches.slice().reverse()),i.reversedInversePatches},get inversePatches(){return i.inversePatches||(i.inversePatches=n.inversePatches.slice()),i.inversePatches},stop:function(){r&&(r(),r=void 0)},resume:function(){r||(r=g(e,(function(e,r){t&&!t(e,r,Ve())||(n.patches.push(e),n.inversePatches.push(r),i.patches=void 0,i.inversePatches=void 0,i.reversedInversePatches=void 0)})))},replay:function(t){_(t||e,n.patches)},undo:function(t){_(t||e,n.inversePatches.slice().reverse())}};return o.resume(),o}function O(e){Xe(e,1);var t=Ze(e);if(!t.isRoot)throw pt("`protect` can only be invoked on root nodes");t.isProtectionEnabled=!0}function P(e){Xe(e,1);var t=Ze(e);if(!t.isRoot)throw pt("`unprotect` can only be invoked on root nodes");t.isProtectionEnabled=!1}function j(e){return Ze(e).isProtected}function A(e,t){return Xe(e,1),Ze(e).applySnapshot(t)}function S(e,t){void 0===t&&(t=!0),Xe(e,1);var r=Ze(e);return t?r.snapshot:r.type.getSnapshot(r,!1)}function k(e,t){void 0===t&&(t=1),Xe(e,1),Et(0,0,0);for(var r=Ze(e).parent;r;){if(0==--t)return!0;r=r.parent}return!1}function T(e,t){void 0===t&&(t=1),Xe(e,1),Et(0,0,0);for(var r=t,n=Ze(e).parent;n;){if(0==--r)return n.storedValue;n=n.parent}throw pt("Failed to find the parent of "+Ze(e)+" at depth "+t)}function E(e,t){Xe(e,1),de(t,2);for(var r=Ze(e).parent;r;){if(t.is(r.storedValue))return!0;r=r.parent}return!1}function x(e,t){Xe(e,1),de(t,2);for(var r=Ze(e).parent;r;){if(t.is(r.storedValue))return r.storedValue;r=r.parent}throw pt("Failed to find the parent of "+Ze(e)+" of a given type")}function C(e){return Xe(e,1),Ze(e).root.storedValue}function I(e){return Xe(e,1),Ze(e).path}function V(e){return Xe(e,1),Ft(Ze(e).path)}function N(e){return Xe(e,1),Ze(e).isRoot}function M(e,t){Xe(e,1),xt();var r=nt(Ze(e),t);return r?r.value:void 0}function R(e,t,r){de(e,1),Xe(t,2),kt();var n=Ze(t).root.identifierCache.resolve(e,Qr(r));return null==n?void 0:n.value}function D(e){return Xe(e,1),Ze(e).identifier}function z(e,t){void 0===t&&(t=!0);try{var r=e();if(null==r)return;if(Je(r))return t?G(r)?r:void 0:r;throw pt("The reference to be checked is not one of node, null or undefined")}catch(e){if(e instanceof Fr)return;throw e}}function L(e,t){void 0===t&&(t=!0);try{var r=e();if(null==r)return!1;if(Je(r))return!t||G(r);throw pt("The reference to be checked is not one of node, null or undefined")}catch(e){if(e instanceof Fr)return!1;throw e}}function B(e,t){Xe(e,1),xt();var r=nt(Ze(e),t,!1);if(void 0!==r)try{return r.value}catch(e){return}}function F(e,t){return Xe(e,1),Xe(t,2),rt(Ze(e),Ze(t))}function H(e,t){void 0===t&&(t=!0),Xe(e,1);var r=Ze(e);return r.type.create(r.snapshot,!0===t?r.root.environment:!1===t?void 0:t)}function U(e){return Xe(e,1),Ze(e).detach(),e}function $(e){Xe(e,1);var t=Ze(e);t.isRoot?t.die():t.parent.removeChild(t.subpath)}function G(e){return Xe(e,1),Ze(e).observableIsAlive}function W(e,t){return Xe(e,1),Tt(),Ze(e).addDisposer(t),t}function K(e){return Xe(e,1),Ze(e).root.environment||ct}function q(e,t){Xe(e,1),Tt();var r=Ze(e);r.getChildren().forEach((function(e){Je(e.storedValue)&&q(e.storedValue,t)})),t(r.storedValue)}function Y(e){var t;return kt(t=Je(e)?v(e):e),{name:t.name,properties:f({},t.properties)}}function J(e){var t=Ze(e).type,r=f(f({},Y(t)),{actions:[],volatile:[],views:[],flowActions:[]});return Object.getOwnPropertyNames(e).forEach((function(t){if(!(t in r.properties)){var n=Object.getOwnPropertyDescriptor(e,t);n.get?(0,i.isComputedProp)(e,t)?r.views.push(t):r.volatile.push(t):(!0===n.value._isFlowAction&&r.flowActions.push(t),!0===n.value._isMSTAction?r.actions.push(t):(0,i.isObservableProp)(e,t)?r.volatile.push(t):r.views.push(t))}})),r}function X(e){return e}function Z(e){return e}function Q(e){return e}function ee(e){return Xe(e,1),Ze(e).nodeId}var te=function(){function e(e,t,r,n){Object.defineProperty(this,"type",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"environment",{enumerable:!0,configurable:!0,writable:!0,value:n}),Object.defineProperty(this,"_escapedSubpath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_subpath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_subpathUponDeath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_pathUponDeath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"storedValue",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"aliveAtom",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_state",{enumerable:!0,configurable:!0,writable:!0,value:Ge.INITIALIZING}),Object.defineProperty(this,"_hookSubscribers",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_parent",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"pathAtom",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.environment=n,this.baseSetParent(t,r)}return Object.defineProperty(e.prototype,"subpath",{get:function(){return this._subpath},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"subpathUponDeath",{get:function(){return this._subpathUponDeath},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"pathUponDeath",{get:function(){return this._pathUponDeath},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"value",{get:function(){return this.type.getValue(this)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"state",{get:function(){return this._state},set:function(e){var t=this.isAlive;this._state=e;var r=this.isAlive;this.aliveAtom&&t!==r&&this.aliveAtom.reportChanged()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"fireInternalHook",{enumerable:!1,configurable:!0,writable:!0,value:function(e){this._hookSubscribers&&this._hookSubscribers.emit(e,this,e)}}),Object.defineProperty(e.prototype,"registerHook",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){return this._hookSubscribers||(this._hookSubscribers=new Pt),this._hookSubscribers.register(e,t)}}),Object.defineProperty(e.prototype,"parent",{get:function(){return this._parent},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"getReconciliationType",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this.type}}),Object.defineProperty(e.prototype,"baseSetParent",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){this._parent=e,this._subpath=t,this._escapedSubpath=void 0,this.pathAtom&&this.pathAtom.reportChanged()}}),Object.defineProperty(e.prototype,"path",{get:function(){return this.getEscapedPath(!0)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"getEscapedPath",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return e&&(this.pathAtom||(this.pathAtom=(0,i.createAtom)("path")),this.pathAtom.reportObserved()),this.parent?(void 0===this._escapedSubpath&&(this._escapedSubpath=this._subpath?zt(this._subpath):""),this.parent.getEscapedPath(e)+"/"+this._escapedSubpath):""}}),Object.defineProperty(e.prototype,"isRoot",{get:function(){return null===this.parent},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isAlive",{get:function(){return this.state!==Ge.DEAD},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isDetaching",{get:function(){return this.state===Ge.DETACHING},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"observableIsAlive",{get:function(){return this.aliveAtom||(this.aliveAtom=(0,i.createAtom)("alive")),this.aliveAtom.reportObserved(),this.isAlive},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"baseFinalizeCreation",{enumerable:!1,configurable:!0,writable:!0,value:function(e){if(this.state===Ge.CREATED){if(this.parent){if(this.parent.state!==Ge.FINALIZED)return;this.fireHook(n.afterAttach)}this.state=Ge.FINALIZED,e&&e()}}}),Object.defineProperty(e.prototype,"baseFinalizeDeath",{enumerable:!1,configurable:!0,writable:!0,value:function(){this._hookSubscribers&&this._hookSubscribers.clearAll(),this._subpathUponDeath=this._subpath,this._pathUponDeath=this.getEscapedPath(!1),this.baseSetParent(null,""),this.state=Ge.DEAD}}),Object.defineProperty(e.prototype,"baseAboutToDie",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.fireHook(n.beforeDestroy)}}),e}(),re=function(e){function t(t,r,n,i,o){var a=e.call(this,t,r,n,i)||this;try{a.storedValue=t.createNewInstance(o)}catch(e){throw a.state=Ge.DEAD,e}return a.state=Ge.CREATED,a.finalizeCreation(),a}return c(t,e),Object.defineProperty(t.prototype,"root",{get:function(){if(!this.parent)throw pt("This scalar node is not part of a tree");return this.parent.root},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"setParent",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){var r=this.parent!==e,n=this.subpath!==t;(r||n)&&(this.environment=void 0,this.baseSetParent(this.parent,t))}}),Object.defineProperty(t.prototype,"snapshot",{get:function(){return this.getSnapshot()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this.type.getSnapshot(this)}}),Object.defineProperty(t.prototype,"toString",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e=(this.isAlive?this.path:this.pathUponDeath)||"<root>";return this.type.name+"@"+e+(this.isAlive?"":" [dead]")}}),Object.defineProperty(t.prototype,"die",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.isAlive&&this.state!==Ge.DETACHING&&(this.aboutToDie(),this.finalizeDeath())}}),Object.defineProperty(t.prototype,"finalizeCreation",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.baseFinalizeCreation()}}),Object.defineProperty(t.prototype,"aboutToDie",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.baseAboutToDie()}}),Object.defineProperty(t.prototype,"finalizeDeath",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.baseFinalizeDeath()}}),Object.defineProperty(t.prototype,"fireHook",{enumerable:!1,configurable:!0,writable:!0,value:function(e){this.fireInternalHook(e)}}),t}(te);re.prototype.die=(0,i.action)(re.prototype.die);var ne,ie,oe=1,ae={onError:function(e){throw e}},se=function(e){function t(t,r,n,o,a){var s=e.call(this,t,r,n,o)||this;if(Object.defineProperty(s,"nodeId",{enumerable:!0,configurable:!0,writable:!0,value:++oe}),Object.defineProperty(s,"identifierAttribute",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(s,"identifier",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(s,"unnormalizedIdentifier",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(s,"identifierCache",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(s,"isProtectionEnabled",{enumerable:!0,configurable:!0,writable:!0,value:!0}),Object.defineProperty(s,"middlewares",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(s,"hasSnapshotPostProcessor",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(s,"_applyPatches",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(s,"_applySnapshot",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(s,"_autoUnbox",{enumerable:!0,configurable:!0,writable:!0,value:!0}),Object.defineProperty(s,"_isRunningAction",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(s,"_hasSnapshotReaction",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(s,"_observableInstanceState",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(s,"_childNodes",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(s,"_initialSnapshot",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(s,"_cachedInitialSnapshot",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(s,"_cachedInitialSnapshotCreated",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(s,"_snapshotComputed",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(s,"_snapshotUponDeath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(s,"_internalEvents",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),s._snapshotComputed=(0,i.computed)((function(){return s.getSnapshot()})),s.unbox=s.unbox.bind(s),s._initialSnapshot=a,s.identifierAttribute=t.identifierAttribute,r||(s.identifierCache=new Ke),s._childNodes=t.initializeChildNodes(s,s._initialSnapshot),s.identifier=null,s.unnormalizedIdentifier=null,s.identifierAttribute&&s._initialSnapshot){var u=s._initialSnapshot[s.identifierAttribute];if(void 0===u){var l=s._childNodes[s.identifierAttribute];l&&(u=l.value)}if("string"!=typeof u&&"number"!=typeof u)throw pt("Instance identifier '"+s.identifierAttribute+"' for type '"+s.type.name+"' must be a string or a number");s.identifier=Qr(u),s.unnormalizedIdentifier=u}return r?r.root.identifierCache.addNodeToCache(s):s.identifierCache.addNodeToCache(s),s}return c(t,e),Object.defineProperty(t.prototype,"applyPatches",{enumerable:!1,configurable:!0,writable:!0,value:function(e){this.createObservableInstanceIfNeeded(),this._applyPatches(e)}}),Object.defineProperty(t.prototype,"applySnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e){this.createObservableInstanceIfNeeded(),this._applySnapshot(e)}}),Object.defineProperty(t.prototype,"createObservableInstanceIfNeeded",{enumerable:!1,configurable:!0,writable:!0,value:function(e){void 0===e&&(e=!0),0===this._observableInstanceState&&this.createObservableInstance(e)}}),Object.defineProperty(t.prototype,"createObservableInstance",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t,r,i,o;void 0===e&&(e=!0),this._observableInstanceState=1;for(var a=[],s=this.parent;s&&0===s._observableInstanceState;)a.unshift(s),s=s.parent;try{for(var u=h(a),l=u.next();!l.done;l=u.next())(d=l.value).createObservableInstanceIfNeeded(!1)}catch(e){t={error:e}}finally{try{l&&!l.done&&(r=u.return)&&r.call(u)}finally{if(t)throw t.error}}var c=this.type;try{this.storedValue=c.createNewInstance(this._childNodes),this.preboot(),this._isRunningAction=!0,c.finalizeNewInstance(this,this.storedValue)}catch(e){throw this.state=Ge.DEAD,e}finally{this._isRunningAction=!1}if(this._observableInstanceState=2,this._snapshotComputed.trackAndCompute(),this.isRoot&&this._addSnapshotReaction(),this._childNodes=ct,this.state=Ge.CREATED,e){this.fireHook(n.afterCreate),this.finalizeCreation();try{for(var f=h(a.reverse()),p=f.next();!p.done;p=f.next()){var d;(d=p.value).fireHook(n.afterCreate),d.finalizeCreation()}}catch(e){i={error:e}}finally{try{p&&!p.done&&(o=f.return)&&o.call(f)}finally{if(i)throw i.error}}}}}),Object.defineProperty(t.prototype,"root",{get:function(){var e=this.parent;return e?e.root:this},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"clearParent",{enumerable:!1,configurable:!0,writable:!0,value:function(){if(this.parent){this.fireHook(n.beforeDetach);var e=this.state;this.state=Ge.DETACHING;var t=this.root,r=t.environment,i=t.identifierCache.splitCache(this);try{this.parent.removeChild(this.subpath),this.baseSetParent(null,""),this.environment=r,this.identifierCache=i}finally{this.state=e}}}}),Object.defineProperty(t.prototype,"setParent",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){var r=e!==this.parent,i=t!==this.subpath;(r||i)&&(r?(this.environment=void 0,e.root.identifierCache.mergeCache(this),this.baseSetParent(e,t),this.fireHook(n.afterAttach)):i&&this.baseSetParent(this.parent,t))}}),Object.defineProperty(t.prototype,"fireHook",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=this;this.fireInternalHook(e);var r=this.storedValue&&"object"==typeof this.storedValue&&this.storedValue[e];"function"==typeof r&&(i._allowStateChangesInsideComputed?(0,i._allowStateChangesInsideComputed)((function(){r.apply(t.storedValue)})):r.apply(this.storedValue))}}),Object.defineProperty(t.prototype,"snapshot",{get:function(){return this.hasSnapshotPostProcessor&&this.createObservableInstanceIfNeeded(),this._snapshotComputed.get()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this.isAlive?2===this._observableInstanceState?this._getActualSnapshot():this._getCachedInitialSnapshot():this._snapshotUponDeath}}),Object.defineProperty(t.prototype,"_getActualSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this.type.getSnapshot(this)}}),Object.defineProperty(t.prototype,"_getCachedInitialSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(){if(!this._cachedInitialSnapshotCreated){var e=this.type,t=this._childNodes,r=this._initialSnapshot;this._cachedInitialSnapshot=e.processInitialSnapshot(t,r),this._cachedInitialSnapshotCreated=!0}return this._cachedInitialSnapshot}}),Object.defineProperty(t.prototype,"isRunningAction",{enumerable:!1,configurable:!0,writable:!0,value:function(){return!!this._isRunningAction||!this.isRoot&&this.parent.isRunningAction()}}),Object.defineProperty(t.prototype,"assertAlive",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t,r=s();if(!this.isAlive&&"ignore"!==r){var n=this._getAssertAliveError(e);switch(r){case"error":throw pt(n);case"warn":t=n,console.warn(new Error("[mobx-state-tree] "+t))}}}}),Object.defineProperty(t.prototype,"_getAssertAliveError",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=this.getEscapedPath(!1)||this.pathUponDeath||"",r=e.subpath&&zt(e.subpath)||"",n=e.actionContext||Ae();n&&"action"!==n.type&&n.parentActionEvent&&(n=n.parentActionEvent);var i="";return n&&null!=n.name&&(i=(n&&n.context&&I(n.context)||t)+"."+n.name+"()"),"You are trying to read or write to an object that is no longer part of a state tree. (Object type: '"+this.type.name+"', Path upon death: '"+t+"', Subpath: '"+r+"', Action: '"+i+"'). Either detach nodes first, or don't use objects after removing / replacing them in the tree."}}),Object.defineProperty(t.prototype,"getChildNode",{enumerable:!1,configurable:!0,writable:!0,value:function(e){this.assertAlive({subpath:e}),this._autoUnbox=!1;try{return 2===this._observableInstanceState?this.type.getChildNode(this,e):this._childNodes[e]}finally{this._autoUnbox=!0}}}),Object.defineProperty(t.prototype,"getChildren",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.assertAlive(ct),this._autoUnbox=!1;try{return 2===this._observableInstanceState?this.type.getChildren(this):ot(this._childNodes)}finally{this._autoUnbox=!0}}}),Object.defineProperty(t.prototype,"getChildType",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return this.type.getChildType(e)}}),Object.defineProperty(t.prototype,"isProtected",{get:function(){return this.root.isProtectionEnabled},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"assertWritable",{enumerable:!1,configurable:!0,writable:!0,value:function(e){if(this.assertAlive(e),!this.isRunningAction()&&this.isProtected)throw pt("Cannot modify '"+this+"', the object is protected and can only be modified by using an action.")}}),Object.defineProperty(t.prototype,"removeChild",{enumerable:!1,configurable:!0,writable:!0,value:function(e){this.type.removeChild(this,e)}}),Object.defineProperty(t.prototype,"unbox",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return e?(this.assertAlive({subpath:e.subpath||e.subpathUponDeath}),this._autoUnbox?e.value:e):e}}),Object.defineProperty(t.prototype,"toString",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e=(this.isAlive?this.path:this.pathUponDeath)||"<root>",t=this.identifier?"(id: "+this.identifier+")":"";return this.type.name+"@"+e+t+(this.isAlive?"":" [dead]")}}),Object.defineProperty(t.prototype,"finalizeCreation",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e=this;this.baseFinalizeCreation((function(){var t,r;try{for(var i=h(e.getChildren()),o=i.next();!o.done;o=i.next())o.value.finalizeCreation()}catch(e){t={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}e.fireInternalHook(n.afterCreationFinalization)}))}}),Object.defineProperty(t.prototype,"detach",{enumerable:!1,configurable:!0,writable:!0,value:function(){if(!this.isAlive)throw pt("Error while detaching, node is not alive.");this.clearParent()}}),Object.defineProperty(t.prototype,"preboot",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e=this;this._applyPatches=Ee(this.storedValue,"@APPLY_PATCHES",(function(t){t.forEach((function(t){if(t.path){var r=Ft(t.path);it(e,r.slice(0,-1)).applyPatchLocally(r[r.length-1],t)}else e.type.applySnapshot(e,t.value)}))})),this._applySnapshot=Ee(this.storedValue,"@APPLY_SNAPSHOT",(function(t){if(t!==e.snapshot)return e.type.applySnapshot(e,t)})),wt(this.storedValue,"$treenode",this),wt(this.storedValue,"toJSON",et)}}),Object.defineProperty(t.prototype,"die",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.isAlive&&this.state!==Ge.DETACHING&&(this.aboutToDie(),this.finalizeDeath())}}),Object.defineProperty(t.prototype,"aboutToDie",{enumerable:!1,configurable:!0,writable:!0,value:function(){0!==this._observableInstanceState&&(this.getChildren().forEach((function(e){e.aboutToDie()})),this.baseAboutToDie(),this._internalEventsEmit("dispose"),this._internalEventsClear("dispose"))}}),Object.defineProperty(t.prototype,"finalizeDeath",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.getChildren().forEach((function(e){e.finalizeDeath()})),this.root.identifierCache.notifyDied(this);var e=this.snapshot;this._snapshotUponDeath=e,this._internalEventsClearAll(),this.baseFinalizeDeath()}}),Object.defineProperty(t.prototype,"onSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return this._addSnapshotReaction(),this._internalEventsRegister("snapshot",e)}}),Object.defineProperty(t.prototype,"emitSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e){this._internalEventsEmit("snapshot",e)}}),Object.defineProperty(t.prototype,"onPatch",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return this._internalEventsRegister("patch",e)}}),Object.defineProperty(t.prototype,"emitPatch",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){if(this._internalEventsHasSubscribers("patch")){var r=function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];for(var n=0;n<t.length;n++){var i=t[n];for(var o in i)e[o]=i[o]}return e}({},e,{path:t.path.substr(this.path.length)+"/"+e.path}),n=d(function(e){if(!("oldValue"in e))throw pt("Patches without `oldValue` field cannot be inversed");return[Rt(e),Dt(e)]}(r),2),i=n[0],o=n[1];this._internalEventsEmit("patch",i,o)}this.parent&&this.parent.emitPatch(e,t)}}),Object.defineProperty(t.prototype,"hasDisposer",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return this._internalEventsHas("dispose",e)}}),Object.defineProperty(t.prototype,"addDisposer",{enumerable:!1,configurable:!0,writable:!0,value:function(e){if(this.hasDisposer(e))throw pt("cannot add a disposer when it is already registered for execution");this._internalEventsRegister("dispose",e,!0)}}),Object.defineProperty(t.prototype,"removeDisposer",{enumerable:!1,configurable:!0,writable:!0,value:function(e){if(!this._internalEventsHas("dispose",e))throw pt("cannot remove a disposer which was never registered for execution");this._internalEventsUnregister("dispose",e)}}),Object.defineProperty(t.prototype,"removeMiddleware",{enumerable:!1,configurable:!0,writable:!0,value:function(e){if(this.middlewares){var t=this.middlewares.indexOf(e);t>=0&&this.middlewares.splice(t,1)}}}),Object.defineProperty(t.prototype,"addMiddleWare",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){var r=this;void 0===t&&(t=!0);var n={handler:e,includeHooks:t};return this.middlewares?this.middlewares.push(n):this.middlewares=[n],function(){r.removeMiddleware(n)}}}),Object.defineProperty(t.prototype,"applyPatchLocally",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){this.assertWritable({subpath:e}),this.createObservableInstanceIfNeeded(),this.type.applyPatchLocally(this,e,t)}}),Object.defineProperty(t.prototype,"_addSnapshotReaction",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e=this;if(!this._hasSnapshotReaction){var t=(0,i.reaction)((function(){return e.snapshot}),(function(t){return e.emitSnapshot(t)}),ae);this.addDisposer(t),this._hasSnapshotReaction=!0}}}),Object.defineProperty(t.prototype,"_internalEventsHasSubscribers",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return!!this._internalEvents&&this._internalEvents.hasSubscribers(e)}}),Object.defineProperty(t.prototype,"_internalEventsRegister",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r){return void 0===r&&(r=!1),this._internalEvents||(this._internalEvents=new Pt),this._internalEvents.register(e,t,r)}}),Object.defineProperty(t.prototype,"_internalEventsHas",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){return!!this._internalEvents&&this._internalEvents.has(e,t)}}),Object.defineProperty(t.prototype,"_internalEventsUnregister",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){this._internalEvents&&this._internalEvents.unregister(e,t)}}),Object.defineProperty(t.prototype,"_internalEventsEmit",{enumerable:!1,configurable:!0,writable:!0,value:function(e){for(var t,r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];this._internalEvents&&(t=this._internalEvents).emit.apply(t,b([e],r))}}),Object.defineProperty(t.prototype,"_internalEventsClear",{enumerable:!1,configurable:!0,writable:!0,value:function(e){this._internalEvents&&this._internalEvents.clear(e)}}),Object.defineProperty(t.prototype,"_internalEventsClearAll",{enumerable:!1,configurable:!0,writable:!0,value:function(){this._internalEvents&&this._internalEvents.clearAll()}}),t}(te);se.prototype.createObservableInstance=(0,i.action)(se.prototype.createObservableInstance),se.prototype.detach=(0,i.action)(se.prototype.detach),se.prototype.die=(0,i.action)(se.prototype.die),function(e){e[e.String=1]="String",e[e.Number=2]="Number",e[e.Boolean=4]="Boolean",e[e.Date=8]="Date",e[e.Literal=16]="Literal",e[e.Array=32]="Array",e[e.Map=64]="Map",e[e.Object=128]="Object",e[e.Frozen=256]="Frozen",e[e.Optional=512]="Optional",e[e.Reference=1024]="Reference",e[e.Identifier=2048]="Identifier",e[e.Late=4096]="Late",e[e.Refinement=8192]="Refinement",e[e.Union=16384]="Union",e[e.Null=32768]="Null",e[e.Undefined=65536]="Undefined",e[e.Integer=131072]="Integer",e[e.Custom=262144]="Custom",e[e.SnapshotProcessor=524288]="SnapshotProcessor",e[e.Lazy=1048576]="Lazy",e[e.Finite=2097152]="Finite",e[e.Float=4194304]="Float"}(ie||(ie={}));var ue="cannotDetermine",le=Symbol("$type"),ce=function(){function e(e){Object.defineProperty(this,ne,{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"C",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"S",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"T",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"N",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"isType",{enumerable:!0,configurable:!0,writable:!0,value:!0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name=e}return Object.defineProperty(e.prototype,"create",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){return Ue(this,e),this.instantiate(null,"",t,e).value}}),Object.defineProperty(e.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){throw pt("unimplemented method")}}),Object.defineProperty(e.prototype,"isAssignableFrom",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return e===this}}),Object.defineProperty(e.prototype,"validate",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){if(Qe(e)){var r=v(e);return this.isAssignableFrom(r)?Be():Fe(t,e)}return this.isValidSnapshot(e,t)}}),Object.defineProperty(e.prototype,"is",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return 0===this.validate(e,[{path:"",type:this}]).length}}),Object.defineProperty(e.prototype,"Type",{get:function(){throw pt("Factory.Type should not be actually called. It is just a Type signature that can be used at compile time with Typescript, by using `typeof type.Type`")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"TypeWithoutSTN",{get:function(){throw pt("Factory.TypeWithoutSTN should not be actually called. It is just a Type signature that can be used at compile time with Typescript, by using `typeof type.TypeWithoutSTN`")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"SnapshotType",{get:function(){throw pt("Factory.SnapshotType should not be actually called. It is just a Type signature that can be used at compile time with Typescript, by using `typeof type.SnapshotType`")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"CreationType",{get:function(){throw pt("Factory.CreationType should not be actually called. It is just a Type signature that can be used at compile time with Typescript, by using `typeof type.CreationType`")},enumerable:!1,configurable:!0}),e}();ne=le,ce.prototype.create=(0,i.action)(ce.prototype.create);var fe=function(e){function t(t){var r=e.call(this,t)||this;return Object.defineProperty(r,"identifierAttribute",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),r}return c(t,e),Object.defineProperty(t.prototype,"create",{enumerable:!1,configurable:!0,writable:!0,value:function(t,r){return void 0===t&&(t=this.getDefaultSnapshot()),e.prototype.create.call(this,t,r)}}),Object.defineProperty(t.prototype,"getValue",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return e.createObservableInstanceIfNeeded(),e.storedValue}}),Object.defineProperty(t.prototype,"isMatchingSnapshotId",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){return!e.identifierAttribute||e.identifier===Qr(t[e.identifierAttribute])}}),Object.defineProperty(t.prototype,"tryToReconcileNode",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){return!(e.isDetaching||e.snapshot!==t&&(!Je(t)||Ze(t)!==e)&&(e.type!==this||!gt(t)||Je(t)||!this.isMatchingSnapshotId(e,t)||(e.applySnapshot(t),0)))}}),Object.defineProperty(t.prototype,"reconcile",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r,n){if(this.tryToReconcileNode(e,t))return e.setParent(r,n),e;if(e.die(),Je(t)&&this.isAssignableFrom(v(t))){var i=Ze(t);return i.setParent(r,n),i}return this.instantiate(r,n,void 0,t)}}),Object.defineProperty(t.prototype,"getSubTypes",{enumerable:!1,configurable:!0,writable:!0,value:function(){return null}}),t}(ce);fe.prototype.create=(0,i.action)(fe.prototype.create);var pe=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return c(t,e),Object.defineProperty(t.prototype,"createNewInstance",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return e}}),Object.defineProperty(t.prototype,"getValue",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return e.storedValue}}),Object.defineProperty(t.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return e.storedValue}}),Object.defineProperty(t.prototype,"reconcile",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r,n){if(!e.isDetaching&&e.type===this&&e.storedValue===t)return e;var i=this.instantiate(r,n,void 0,t);return e.die(),i}}),Object.defineProperty(t.prototype,"getSubTypes",{enumerable:!1,configurable:!0,writable:!0,value:function(){return null}}),t}(ce);function he(e){return"object"==typeof e&&e&&!0===e.isType}function de(e,t){kt()}var be=new Map;function ve(e){return function(t,r,n){switch(t.type){case"action":if(e.filter&&!0!==e.filter(t))return r(t);var i=e.onStart(t);e.onResume(t,i),be.set(t.id,{call:t,context:i,async:!1});try{var o=r(t);return e.onSuspend(t,i),!1===be.get(t.id).async&&(be.delete(t.id),e.onSuccess(t,i,o)),o}catch(r){throw be.delete(t.id),e.onFail(t,i,r),r}case"flow_spawn":return(a=be.get(t.rootId)).async=!0,r(t);case"flow_resume":case"flow_resume_error":var a=be.get(t.rootId);e.onResume(t,a.context);try{return r(t)}finally{e.onSuspend(t,a.context)}case"flow_throw":return a=be.get(t.rootId),be.delete(t.rootId),e.onFail(t,a.context,t.args[0]),r(t);case"flow_return":return a=be.get(t.rootId),be.delete(t.rootId),e.onSuccess(t,a.context,t.args[0]),r(t)}}}var ye=function(){function e(e,t){Object.defineProperty(this,"hooks",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"call",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(this,"flowsPending",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"running",{enumerable:!0,configurable:!0,writable:!0,value:!0}),e&&e.onStart(t)}return Object.defineProperty(e.prototype,"finish",{enumerable:!1,configurable:!0,writable:!0,value:function(e){this.running&&(this.running=!1,this.hooks&&this.hooks.onFinish(this.call,e))}}),Object.defineProperty(e.prototype,"incFlowsPending",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.flowsPending++}}),Object.defineProperty(e.prototype,"decFlowsPending",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.flowsPending--}}),Object.defineProperty(e.prototype,"hasFlowsPending",{get:function(){return this.flowsPending>0},enumerable:!1,configurable:!0}),e}();function ge(e){var t=new Map;return function(r,n){var i=r.parentActionEvent?t.get(r.parentActionEvent.id):void 0;if("action"===r.type){var o=f(f({},r),{env:i&&i.call.env,parentCall:i&&i.call}),a=!e.filter||e.filter(o),s=new ye(a?e:void 0,o);t.set(r.id,s);var u=void 0;try{u=n(r)}catch(e){throw t.delete(r.id),s.finish(e),e}return s.hasFlowsPending||(t.delete(r.id),s.finish()),u}if(!i)return n(r);switch(r.type){case"flow_spawn":return i.incFlowsPending(),n(r);case"flow_resume":case"flow_resume_error":return n(r);case"flow_throw":var l=r.args[0];try{return n(r)}finally{i.decFlowsPending(),i.hasFlowsPending||(t.delete(r.parentActionEvent.id),i.finish(l))}case"flow_return":try{return n(r)}finally{i.decFlowsPending(),i.hasFlowsPending||(t.delete(r.parentActionEvent.id),i.finish())}}}}function me(e){return{$MST_UNSERIALIZABLE:!0,type:e}}function _e(e,t){Xe(e,1),kt(),(0,i.runInAction)((function(){vt(t).forEach((function(t){return function(e,t){var r=B(e,t.path||"");if(!r)throw pt("Invalid action path: "+(t.path||""));var n=Ze(r);if("@APPLY_PATCHES"===t.name)return _.call(null,r,t.args[0]);if("@APPLY_SNAPSHOT"===t.name)return A.call(null,r,t.args[0]);if("function"!=typeof r[t.name])throw pt("Action '"+t.name+"' does not exist in '"+n.path+"'");return r[t.name].apply(r,t.args?t.args.map((function(e){return(t=e)&&"object"==typeof t&&"$MST_DATE"in t?new Date(t.$MST_DATE):t;var t})):[])}(e,t)}))}))}function we(e,t){Xe(e,1);var r,n=[],i=function(e){(!t||t(e,Ve()))&&n.push(e)},o={actions:n,get recording(){return!!r},stop:function(){r&&(r(),r=void 0)},resume:function(){r||(r=Oe(e,i))},replay:function(e){_e(e,n)}};return o.resume(),o}function Oe(e,t,r){return void 0===r&&(r=!1),Xe(e,1),xe(e,(function(n,i){if("action"===n.type&&n.id===n.rootId){var o=Ze(n.context),a={name:n.name,path:rt(Ze(e),o),args:n.args.map((function(e,t){return function(e,t,r,n){if(n instanceof Date)return{$MST_DATE:n.getTime()};if(mt(n))return n;if(Je(n))return me("[MSTNode: "+v(n).name+"]");if("function"==typeof n)return me("[function]");if("object"==typeof n&&!yt(n)&&!bt(n))return me("[object "+(n&&n.constructor&&n.constructor.name||"Complex Object")+"]");try{return JSON.stringify(n),n}catch(e){return me(""+e)}}(0,n.name,0,e)}))};if(r){var s=i(n);return t(a),s}return t(a),i(n)}return i(n)}))}var Pe,je=1;function Ae(){return Pe}function Se(){return je++}function ke(e,t){var r=Ze(e.context);"action"===e.type&&r.assertAlive({actionContext:e});var o=r._isRunningAction;r._isRunningAction=!0;var a=Pe;Pe=e;try{return function(e,t,r){var o=new Ie(e,r);if(o.isEmpty)return(0,i.action)(r).apply(null,t.args);var a=null;return function e(t){var s=o.getNextMiddleware(),u=s&&s.handler;return u?!s.includeHooks&&n[t.name]?e(t):(u(t,(function(t,r){a=e(t),r&&(a=r(a))}),(function(e){a=e})),a):(0,i.action)(r).apply(null,t.args)}(t)}(r,e,t)}finally{Pe=a,r._isRunningAction=o}}function Te(e){if(e)return"action"===e.type?e:e.parentActionEvent}function Ee(e,t,r){var n=function(){var n=Se(),i=Pe,o=Te(i);return ke({type:"action",name:t,id:n,args:jt(arguments),context:e,tree:C(e),rootId:i?i.rootId:n,parentId:i?i.id:0,allParentIds:i?b(i.allParentIds,[i.id]):[],parentEvent:i,parentActionEvent:o},r)};return n._isMSTAction=!0,n._isFlowAction=r._isFlowAction,n}function xe(e,t,r){return void 0===r&&(r=!0),Ze(e).addMiddleWare(t,r)}function Ce(e,t,r){void 0===r&&(r=!0);var n={handler:e,includeHooks:r};return t.$mst_middleware=t.$mst_middleware||[],t.$mst_middleware.push(n),t}var Ie=function(){function e(e,t){Object.defineProperty(this,"arrayIndex",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"inArrayIndex",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"middlewares",{enumerable:!0,configurable:!0,writable:!0,value:[]}),t.$mst_middleware&&this.middlewares.push(t.$mst_middleware);for(var r=e;r;)r.middlewares&&this.middlewares.push(r.middlewares),r=r.parent}return Object.defineProperty(e.prototype,"isEmpty",{get:function(){return this.middlewares.length<=0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"getNextMiddleware",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e=this.middlewares[this.arrayIndex];if(e)return e[this.inArrayIndex++]||(this.arrayIndex++,this.inArrayIndex=0,this.getNextMiddleware())}}),e}();function Ve(){for(var e=Ae();e&&"action"!==e.type;)e=e.parentActionEvent;return e}function Ne(e,t,r){for(var n="number"==typeof t?t:t.id,i=r?e:e.parentActionEvent;i;){if(i.id===n)return!0;i=i.parentActionEvent}return!1}function Me(e,t){return Ne(e,t,!1)}function Re(e,t){return Ne(e,t,!0)}function De(e){return"function"==typeof e?"<function"+(e.name?" "+e.name:"")+">":Je(e)?"<"+e+">":"`"+function(e){try{return JSON.stringify(e)}catch(e){return"<Unserializable: "+e+">"}}(e)+"`"}function ze(e){var t=e.value,r=e.context[e.context.length-1].type,n=e.context.map((function(e){return e.path})).filter((function(e){return e.length>0})).join("/"),i=n.length>0?'at path "/'+n+'" ':"",o=Je(t)?"value of type "+Ze(t).type.name+":":mt(t)?"value":"snapshot",a=r&&Je(t)&&r.is(Ze(t).snapshot);return""+i+o+" "+De(t)+" is not assignable "+(r?"to type: `"+r.name+"`":"")+(e.message?" ("+e.message+")":"")+(r?gr(r)||mt(t)?".":", expected an instance of `"+r.name+"` or a snapshot like `"+r.describe()+"` instead."+(a?" (Note that a snapshot of the provided value is compatible with the targeted type)":""):".")}function Le(e,t,r){return e.concat([{path:t,type:r}])}function Be(){return lt}function Fe(e,t,r){return[{context:e,value:t,message:r}]}function He(e){return e.reduce((function(e,t){return e.concat(t)}),[])}function Ue(e,t){"undefined"!=typeof process&&$e(e,t)}function $e(e,t){var r=e.validate(t,[{path:"",type:e}]);if(r.length>0)throw pt(function(e,t,r){var n;if(0!==r.length)return"Error while converting "+(((n=De(t)).length<280?n:n.substring(0,272)+"......"+n.substring(n.length-8))+" to `")+e.name+"`:\n\n    "+r.map(ze).join("\n    ")}(e,t,r))}var Ge,We=0,Ke=function(){function e(){Object.defineProperty(this,"cacheId",{enumerable:!0,configurable:!0,writable:!0,value:We++}),Object.defineProperty(this,"cache",{enumerable:!0,configurable:!0,writable:!0,value:i.observable.map()}),Object.defineProperty(this,"lastCacheModificationPerId",{enumerable:!0,configurable:!0,writable:!0,value:i.observable.map()})}return Object.defineProperty(e.prototype,"updateLastCacheModificationPerId",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=this.lastCacheModificationPerId.get(e);this.lastCacheModificationPerId.set(e,void 0===t?1:t+1)}}),Object.defineProperty(e.prototype,"getLastCacheModificationPerId",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=this.lastCacheModificationPerId.get(e)||0;return this.cacheId+"-"+t}}),Object.defineProperty(e.prototype,"addNodeToCache",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){if(void 0===t&&(t=!0),e.identifierAttribute){var r=e.identifier;this.cache.has(r)||this.cache.set(r,i.observable.array([],ft));var n=this.cache.get(r);if(-1!==n.indexOf(e))throw pt("Already registered");n.push(e),t&&this.updateLastCacheModificationPerId(r)}}}),Object.defineProperty(e.prototype,"mergeCache",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=this;(0,i.values)(e.identifierCache.cache).forEach((function(e){return e.forEach((function(e){t.addNodeToCache(e)}))}))}}),Object.defineProperty(e.prototype,"notifyDied",{enumerable:!1,configurable:!0,writable:!0,value:function(e){if(e.identifierAttribute){var t=e.identifier,r=this.cache.get(t);r&&(r.remove(e),r.length||this.cache.delete(t),this.updateLastCacheModificationPerId(e.identifier))}}}),Object.defineProperty(e.prototype,"splitCache",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var r=this,n=new e,o=t.path+"/";return(0,i.entries)(this.cache).forEach((function(e){for(var i=d(e,2),a=i[0],s=i[1],u=!1,l=s.length-1;l>=0;l--){var c=s[l];c!==t&&0!==c.path.indexOf(o)||(n.addNodeToCache(c,!1),s.splice(l,1),s.length||r.cache.delete(a),u=!0)}u&&r.updateLastCacheModificationPerId(a)})),n}}),Object.defineProperty(e.prototype,"has",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){var r=this.cache.get(t);return!!r&&r.some((function(t){return e.isAssignableFrom(t.type)}))}}),Object.defineProperty(e.prototype,"resolve",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){var r=this.cache.get(t);if(!r)return null;var n=r.filter((function(t){return e.isAssignableFrom(t.type)}));switch(n.length){case 0:return null;case 1:return n[0];default:throw pt("Cannot resolve a reference to type '"+e.name+"' with id: '"+t+"' unambigously, there are multiple candidates: "+n.map((function(e){return e.path})).join(", "))}}}),e}();function qe(e,t,r,n,i){var o=Qe(i);if(o){if(o.parent)throw pt("Cannot add an object to a state tree if it is already part of the same or another state tree. Tried to assign an object to '"+(t?t.path:"")+"/"+r+"', but it lives already at '"+o.path+"'");return t&&o.setParent(t,r),o}return new se(e,t,r,n,i)}function Ye(e,t,r,n,i){return new re(e,t,r,n,i)}function Je(e){return!(!e||!e.$treenode)}function Xe(e,t){kt()}function Ze(e){if(!Je(e))throw pt("Value "+e+" is no MST Node");return e.$treenode}function Qe(e){return e&&e.$treenode||null}function et(){return Ze(this).snapshot}!function(e){e[e.INITIALIZING=0]="INITIALIZING",e[e.CREATED=1]="CREATED",e[e.FINALIZED=2]="FINALIZED",e[e.DETACHING=3]="DETACHING",e[e.DEAD=4]="DEAD"}(Ge||(Ge={}));var tt=function(e){return".."};function rt(e,t){if(e.root!==t.root)throw pt("Cannot calculate relative path: objects '"+e+"' and '"+t+"' are not part of the same object tree");for(var r=Ft(e.path),n=Ft(t.path),i=0;i<r.length&&r[i]===n[i];i++);return r.slice(i).map(tt).join("/")+Bt(n.slice(i))}function nt(e,t,r){return void 0===r&&(r=!0),it(e,Ft(t),r)}function it(e,t,r){void 0===r&&(r=!0);var n=e;try{for(var i=0;i<t.length;i++){var o=t[i];if(".."===o){if(n=n.parent)continue}else{if("."===o)continue;if(n){if(n instanceof re){var a=n.value;Je(a)&&(n=Ze(a))}if(n instanceof se&&n.getChildType(o)&&(n=n.getChildNode(o)))continue}}throw pt("Could not resolve '"+o+"' in path '"+(Bt(t.slice(0,i))||"/")+"' while resolving '"+Bt(t)+"'")}}catch(e){if(!r)return;throw e}return n}function ot(e){if(!e)return lt;var t=Object.keys(e);if(!t.length)return lt;var r=new Array(t.length);return t.forEach((function(t,n){r[n]=e[t]})),r}var at="See https://github.com/mobxjs/mobx-state-tree/issues/399 for more information. Note that the middleware event types starting with `process` now start with `flow`.";function st(e){return St("process","`process()` has been renamed to `flow()`. "+at),It(e)}var ut=Object.toString(),lt=Object.freeze([]),ct=Object.freeze({}),ft=(0,i._getGlobalState)().useProxies?{deep:!1}:{deep:!1,proxy:!1};function pt(e){return void 0===e&&(e="Illegal state"),new Error("[mobx-state-tree] "+e)}function ht(e){return e}Object.freeze(ft);var dt=Number.isInteger;function bt(e){return Array.isArray(e)||(0,i.isObservableArray)(e)}function vt(e){return e?bt(e)?e:[e]:lt}function yt(e){var t;if(null===e||"object"!=typeof e)return!1;var r=Object.getPrototypeOf(e);return null==r||(null===(t=r.constructor)||void 0===t?void 0:t.toString())===ut}function gt(e){return!(null===e||"object"!=typeof e||e instanceof Date||e instanceof RegExp)}function mt(e,t){return void 0===t&&(t=!0),null==e||"string"==typeof e||"number"==typeof e||"boolean"==typeof e||t&&e instanceof Date}function _t(e){return"function"!=typeof e}function wt(e,t,r){!function(e,t,r){(0,i.isObservableObject)(e)?(0,i.defineProperty)(e,t,r):Object.defineProperty(e,t,r)}(e,t,{enumerable:!1,writable:!1,configurable:!0,value:r})}var Ot=function(){function e(){Object.defineProperty(this,"handlers",{enumerable:!0,configurable:!0,writable:!0,value:[]})}return Object.defineProperty(e.prototype,"hasSubscribers",{get:function(){return this.handlers.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"register",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){var r=this;return void 0===t&&(t=!1),t?this.handlers.unshift(e):this.handlers.push(e),function(){r.unregister(e)}}}),Object.defineProperty(e.prototype,"has",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return this.handlers.indexOf(e)>=0}}),Object.defineProperty(e.prototype,"unregister",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=this.handlers.indexOf(e);t>=0&&this.handlers.splice(t,1)}}),Object.defineProperty(e.prototype,"clear",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.handlers.length=0}}),Object.defineProperty(e.prototype,"emit",{enumerable:!1,configurable:!0,writable:!0,value:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.handlers.slice().forEach((function(t){return t.apply(void 0,b(e))}))}}),e}(),Pt=function(){function e(){Object.defineProperty(this,"eventHandlers",{enumerable:!0,configurable:!0,writable:!0,value:void 0})}return Object.defineProperty(e.prototype,"hasSubscribers",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=this.eventHandlers&&this.eventHandlers[e];return!!t&&t.hasSubscribers}}),Object.defineProperty(e.prototype,"register",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r){void 0===r&&(r=!1),this.eventHandlers||(this.eventHandlers={});var n=this.eventHandlers[e];return n||(n=this.eventHandlers[e]=new Ot),n.register(t,r)}}),Object.defineProperty(e.prototype,"has",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){var r=this.eventHandlers&&this.eventHandlers[e];return!!r&&r.has(t)}}),Object.defineProperty(e.prototype,"unregister",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){var r=this.eventHandlers&&this.eventHandlers[e];r&&r.unregister(t)}}),Object.defineProperty(e.prototype,"clear",{enumerable:!1,configurable:!0,writable:!0,value:function(e){this.eventHandlers&&delete this.eventHandlers[e]}}),Object.defineProperty(e.prototype,"clearAll",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.eventHandlers=void 0}}),Object.defineProperty(e.prototype,"emit",{enumerable:!1,configurable:!0,writable:!0,value:function(e){for(var t,r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];var i=this.eventHandlers&&this.eventHandlers[e];i&&(t=i).emit.apply(t,b(r))}}),e}();function jt(e){for(var t=new Array(e.length),r=0;r<e.length;r++)t[r]=e[r];return t}function At(e,t){return 0===e.indexOf(t)}var St=function(e,t){};function kt(e,t,r,n){}function Tt(e,t){}function Et(e,t,r,n){}function xt(e,t,r){void 0===r&&(r=!0)}function Ct(e){"function"==typeof queueMicrotask?queueMicrotask(e):"function"==typeof setImmediate?setImmediate(e):setTimeout(e,1)}function It(e){return function(e,t){var r=function(){var n=Se(),i=Ae();if(!i)throw pt("a mst flow must always have a parent context");var o=Te(i);if(!o)throw pt("a mst flow must always have a parent action context");var a={name:e,id:n,tree:i.tree,context:i.context,parentId:i.id,allParentIds:b(i.allParentIds,[i.id]),rootId:i.rootId,parentEvent:i,parentActionEvent:o},s=arguments;function u(e,t,n){return e.$mst_middleware=r.$mst_middleware,ke(f(f({},a),{type:t,args:[n]}),e)}return new Promise((function(e,n){var i,o=function(){i=t.apply(null,arguments),l(void 0)};function l(e){var t;try{var r=u((function(e){t=i.next(e)}),"flow_resume",e);r instanceof Error&&(t=i.throw(r))}catch(e){return void Ct((function(){u((function(t){n(e)}),"flow_throw",e)}))}p(t)}function c(e){var t;try{u((function(e){t=i.throw(e)}),"flow_resume_error",e)}catch(e){return void Ct((function(){u((function(t){n(e)}),"flow_throw",e)}))}p(t)}function p(t){if(!t.done){if(!t.value||"function"!=typeof t.value.then)throw pt("Only promises can be yielded to `async`, got: "+t);return t.value.then(l,c)}Ct((function(){u((function(t){e(t)}),"flow_return",t.value)}))}o.$mst_middleware=r.$mst_middleware,ke(f(f({},a),{type:"flow_spawn",args:jt(s)}),o)}))};return r._isFlowAction=!0,r}(e.name,e)}function Vt(e){return e}function Nt(e){return function(){var t,r=[];for(t=0;t<arguments.length;t++)r[t]=arguments[t];return p(this,(function(t){switch(t.label){case 0:return[4,e.apply(void 0,b(r))];case 1:return[2,t.sent()]}}))}}function Mt(e){return p(this,(function(t){switch(t.label){case 0:return[4,e];case 1:return[2,t.sent()]}}))}function Rt(e){switch(e.op){case"add":return{op:"add",path:e.path,value:e.value};case"remove":return{op:"remove",path:e.path};case"replace":return{op:"replace",path:e.path,value:e.value}}}function Dt(e){switch(e.op){case"add":return{op:"remove",path:e.path};case"remove":return{op:"add",path:e.path,value:e.oldValue};case"replace":return{op:"replace",path:e.path,value:e.oldValue}}}function zt(e){return 1==("number"==typeof e)?""+e:-1===e.indexOf("/")&&-1===e.indexOf("~")?e:e.replace(/~/g,"~0").replace(/\//g,"~1")}function Lt(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function Bt(e){if(0===e.length)return"";var t=function(e){return e.map(zt).join("/")};return"."===e[0]||".."===e[0]?t(e):"/"+t(e)}function Ft(e){var t=e.split("/").map(Lt);if(!(""===e||"."===e||".."===e||At(e,"/")||At(e,"./")||At(e,"../")))throw pt("a json path must be either rooted, empty or relative, but got '"+e+"'");return""===t[0]&&t.shift(),t}St.ids={};var Ht,Ut=Symbol("$preProcessorFailed"),$t=function(e){function t(t,r,n){var i=e.call(this,n||t.name)||this;return Object.defineProperty(i,"_subtype",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(i,"_processors",{enumerable:!0,configurable:!0,writable:!0,value:r}),i}return c(t,e),Object.defineProperty(t.prototype,"flags",{get:function(){return this._subtype.flags|ie.SnapshotProcessor},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return"snapshotProcessor("+this._subtype.describe()+")"}}),Object.defineProperty(t.prototype,"preProcessSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return this._processors.preProcessor?this._processors.preProcessor.call(null,e):e}}),Object.defineProperty(t.prototype,"preProcessSnapshotSafe",{enumerable:!1,configurable:!0,writable:!0,value:function(e){try{return this.preProcessSnapshot(e)}catch(e){return Ut}}}),Object.defineProperty(t.prototype,"postProcessSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){return this._processors.postProcessor?this._processors.postProcessor.call(null,e,t.storedValue):e}}),Object.defineProperty(t.prototype,"_fixNode",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=this;!function(e,t){for(var r,n,i=[],o=2;o<arguments.length;o++)i[o-2]=arguments[o];try{for(var a=h(i),s=a.next();!s.done;s=a.next()){var u=s.value;e[u]=t[u].bind(t)}}catch(e){r={error:e}}finally{try{s&&!s.done&&(n=a.return)&&n.call(a)}finally{if(r)throw r.error}}}(e.type,this,"create"),e instanceof se&&(e.hasSnapshotPostProcessor=!!this._processors.postProcessor);var r=e.getSnapshot;e.getSnapshot=function(){return t.postProcessSnapshot(r.call(e),e)},Sr(this._subtype)||(e.getReconciliationType=function(){return t})}}),Object.defineProperty(t.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r,n){var i=Je(n)?n:this.preProcessSnapshot(n),o=this._subtype.instantiate(e,t,r,i);return this._fixNode(o),o}}),Object.defineProperty(t.prototype,"reconcile",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r,n){var i=this._subtype.reconcile(e,Je(t)?t:this.preProcessSnapshot(t),r,n);return i!==e&&this._fixNode(i),i}}),Object.defineProperty(t.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){void 0===t&&(t=!0);var r=this._subtype.getSnapshot(e);return t?this.postProcessSnapshot(r,e):r}}),Object.defineProperty(t.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){var r=this.preProcessSnapshotSafe(e);return r===Ut?Fe(t,e,"Failed to preprocess value"):this._subtype.validate(r,t)}}),Object.defineProperty(t.prototype,"getSubTypes",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this._subtype}}),Object.defineProperty(t.prototype,"is",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=he(e)?this._subtype:Je(e)?S(e,!1):this.preProcessSnapshotSafe(e);return t!==Ut&&0===this._subtype.validate(t,[{path:"",type:this._subtype}]).length}}),Object.defineProperty(t.prototype,"isAssignableFrom",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return this._subtype.isAssignableFrom(e)}}),Object.defineProperty(t.prototype,"isMatchingSnapshotId",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){if(!(this._subtype instanceof fe))return!1;var r=this.preProcessSnapshot(t);return this._subtype.isMatchingSnapshotId(e,r)}}),t}(ce),Gt="Map.put can only be used to store complex values that have an identifier type attribute";function Wt(e,t){var r,n,i=e.getSubTypes();if(i===ue)return!1;if(i){var o=vt(i);try{for(var a=h(o),s=a.next();!s.done;s=a.next())if(!Wt(s.value,t))return!1}catch(e){r={error:e}}finally{try{s&&!s.done&&(n=a.return)&&n.call(a)}finally{if(r)throw r.error}}}return e instanceof or&&t.push(e),!0}!function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.YES=1]="YES",e[e.NO=2]="NO"}(Ht||(Ht={}));var Kt=function(e){function t(t,r){return e.call(this,t,i.observable.ref.enhancer,r)||this}return c(t,e),Object.defineProperty(t.prototype,"get",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return e.prototype.get.call(this,""+t)}}),Object.defineProperty(t.prototype,"has",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return e.prototype.has.call(this,""+t)}}),Object.defineProperty(t.prototype,"delete",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return e.prototype.delete.call(this,""+t)}}),Object.defineProperty(t.prototype,"set",{enumerable:!1,configurable:!0,writable:!0,value:function(t,r){return e.prototype.set.call(this,""+t,r)}}),Object.defineProperty(t.prototype,"put",{enumerable:!1,configurable:!0,writable:!0,value:function(e){if(!e)throw pt("Map.put cannot be used to set empty values");if(Je(e)){var t=Ze(e);if(null===t.identifier)throw pt(Gt);return this.set(t.identifier,e),e}if(gt(e)){var r=Ze(this),n=r.type;if(n.identifierMode!==Ht.YES)throw pt(Gt);var i=e[n.mapIdentifierAttribute];if(!en(i)){var o=this.put(n.getChildType().create(e,r.environment));return this.put(S(o))}var a=Qr(i);return this.set(a,e),this.get(a)}throw pt("Map.put can only be used to store complex values")}}),t}(i.ObservableMap),qt=function(e){function t(t,r,n){void 0===n&&(n=[]);var i=e.call(this,t)||this;return Object.defineProperty(i,"_subType",{enumerable:!0,configurable:!0,writable:!0,value:r}),Object.defineProperty(i,"identifierMode",{enumerable:!0,configurable:!0,writable:!0,value:Ht.UNKNOWN}),Object.defineProperty(i,"mapIdentifierAttribute",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(i,"flags",{enumerable:!0,configurable:!0,writable:!0,value:ie.Map}),Object.defineProperty(i,"hookInitializers",{enumerable:!0,configurable:!0,writable:!0,value:[]}),i._determineIdentifierMode(),i.hookInitializers=n,i}return c(t,e),Object.defineProperty(t.prototype,"hooks",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var r=this.hookInitializers.length>0?this.hookInitializers.concat(e):[e];return new t(this.name,this._subType,r)}}),Object.defineProperty(t.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r,n){return this._determineIdentifierMode(),qe(this,e,t,r,n)}}),Object.defineProperty(t.prototype,"_determineIdentifierMode",{enumerable:!1,configurable:!0,writable:!0,value:function(){if(this.identifierMode===Ht.UNKNOWN){var e=[];if(Wt(this._subType,e)){var t=e.reduce((function(e,t){if(!t.identifierAttribute)return e;if(e&&e!==t.identifierAttribute)throw pt("The objects in a map should all have the same identifier attribute, expected '"+e+"', but child of type '"+t.name+"' declared attribute '"+t.identifierAttribute+"' as identifier");return t.identifierAttribute}),void 0);t?(this.identifierMode=Ht.YES,this.mapIdentifierAttribute=t):this.identifierMode=Ht.NO}}}}),Object.defineProperty(t.prototype,"initializeChildNodes",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){void 0===t&&(t={});var r=e.type._subType,n={};return Object.keys(t).forEach((function(i){n[i]=r.instantiate(e,i,void 0,t[i])})),n}}),Object.defineProperty(t.prototype,"createNewInstance",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return new Kt(e,this.name)}}),Object.defineProperty(t.prototype,"finalizeNewInstance",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){(0,i._interceptReads)(t,e.unbox),e.type.hookInitializers.forEach((function(e){var r=e(t);Object.keys(r).forEach((function(e){var n=r[e],i=Ee(t,e,n);wt(t,e,i)}))})),(0,i.intercept)(t,this.willChange),(0,i.observe)(t,this.didChange)}}),Object.defineProperty(t.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this.name}}),Object.defineProperty(t.prototype,"getChildren",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return(0,i.values)(e.storedValue)}}),Object.defineProperty(t.prototype,"getChildNode",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){var r=e.storedValue.get(""+t);if(!r)throw pt("Not a child "+t);return r}}),Object.defineProperty(t.prototype,"willChange",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=Ze(e.object),r=e.name;t.assertWritable({subpath:r});var n=t.type,i=n._subType;switch(e.type){case"update":var o=e.newValue;if(o===e.object.get(r))return null;Ue(i,o),e.newValue=i.reconcile(t.getChildNode(r),e.newValue,t,r),n.processIdentifier(r,e.newValue);break;case"add":Ue(i,e.newValue),e.newValue=i.instantiate(t,r,void 0,e.newValue),n.processIdentifier(r,e.newValue)}return e}}),Object.defineProperty(t.prototype,"processIdentifier",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){if(this.identifierMode===Ht.YES&&t instanceof se){var r=t.identifier;if(r!==e)throw pt("A map of objects containing an identifier should always store the object under their own identifier. Trying to store key '"+r+"', but expected: '"+e+"'")}}}),Object.defineProperty(t.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t={};return e.getChildren().forEach((function(e){t[e.subpath]=e.snapshot})),t}}),Object.defineProperty(t.prototype,"processInitialSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t={};return Object.keys(e).forEach((function(r){t[r]=e[r].getSnapshot()})),t}}),Object.defineProperty(t.prototype,"didChange",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=Ze(e.object);switch(e.type){case"update":return void t.emitPatch({op:"replace",path:zt(e.name),value:e.newValue.snapshot,oldValue:e.oldValue?e.oldValue.snapshot:void 0},t);case"add":return void t.emitPatch({op:"add",path:zt(e.name),value:e.newValue.snapshot,oldValue:void 0},t);case"delete":var r=e.oldValue.snapshot;return e.oldValue.die(),void t.emitPatch({op:"remove",path:zt(e.name),oldValue:r},t)}}}),Object.defineProperty(t.prototype,"applyPatchLocally",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r){var n=e.storedValue;switch(r.op){case"add":case"replace":n.set(t,r.value);break;case"remove":n.delete(t)}}}),Object.defineProperty(t.prototype,"applySnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){Ue(this,t);var r=e.storedValue,n={};if(Array.from(r.keys()).forEach((function(e){n[e]=!1})),t)for(var i in t)r.set(i,t[i]),n[""+i]=!0;Object.keys(n).forEach((function(e){!1===n[e]&&r.delete(e)}))}}),Object.defineProperty(t.prototype,"getChildType",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this._subType}}),Object.defineProperty(t.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){var r=this;return yt(e)?He(Object.keys(e).map((function(n){return r._subType.validate(e[n],Le(t,n,r._subType))}))):Fe(t,e,"Value is not a plain object")}}),Object.defineProperty(t.prototype,"getDefaultSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(){return ct}}),Object.defineProperty(t.prototype,"removeChild",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){e.storedValue.delete(t)}}),t}(fe);function Yt(e){return he(e)&&(e.flags&ie.Map)>0}qt.prototype.applySnapshot=(0,i.action)(qt.prototype.applySnapshot);var Jt=function(e){function t(t,r,n){void 0===n&&(n=[]);var i=e.call(this,t)||this;return Object.defineProperty(i,"_subType",{enumerable:!0,configurable:!0,writable:!0,value:r}),Object.defineProperty(i,"flags",{enumerable:!0,configurable:!0,writable:!0,value:ie.Array}),Object.defineProperty(i,"hookInitializers",{enumerable:!0,configurable:!0,writable:!0,value:[]}),i.hookInitializers=n,i}return c(t,e),Object.defineProperty(t.prototype,"hooks",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var r=this.hookInitializers.length>0?this.hookInitializers.concat(e):[e];return new t(this.name,this._subType,r)}}),Object.defineProperty(t.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r,n){return qe(this,e,t,r,n)}}),Object.defineProperty(t.prototype,"initializeChildNodes",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){void 0===t&&(t=[]);var r=e.type._subType,n={};return t.forEach((function(t,i){var o=""+i;n[o]=r.instantiate(e,o,void 0,t)})),n}}),Object.defineProperty(t.prototype,"createNewInstance",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=f(f({},ft),{name:this.name});return i.observable.array(ot(e),t)}}),Object.defineProperty(t.prototype,"finalizeNewInstance",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){(0,i._getAdministration)(t).dehancer=e.unbox,e.type.hookInitializers.forEach((function(e){var r=e(t);Object.keys(r).forEach((function(e){var n=r[e],i=Ee(t,e,n);wt(t,e,i)}))})),(0,i.intercept)(t,this.willChange),(0,i.observe)(t,this.didChange)}}),Object.defineProperty(t.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this.name}}),Object.defineProperty(t.prototype,"getChildren",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return e.storedValue.slice()}}),Object.defineProperty(t.prototype,"getChildNode",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){var r=Number(t);if(r<e.storedValue.length)return e.storedValue[r];throw pt("Not a child: "+t)}}),Object.defineProperty(t.prototype,"willChange",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=Ze(e.object);t.assertWritable({subpath:""+e.index});var r=t.type._subType,n=t.getChildren();switch(e.type){case"update":if(e.newValue===e.object[e.index])return null;var i=Xt(t,r,[n[e.index]],[e.newValue],[e.index]);if(!i)return null;e.newValue=i[0];break;case"splice":var o=e.index,a=e.removedCount,s=e.added,u=Xt(t,r,n.slice(o,o+a),s,s.map((function(e,t){return o+t})));if(!u)return null;e.added=u;for(var l=o+a;l<n.length;l++)n[l].setParent(t,""+(l+s.length-a))}return e}}),Object.defineProperty(t.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return e.getChildren().map((function(e){return e.snapshot}))}}),Object.defineProperty(t.prototype,"processInitialSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=[];return Object.keys(e).forEach((function(r){t.push(e[r].getSnapshot())})),t}}),Object.defineProperty(t.prototype,"didChange",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=Ze(e.object);switch(e.type){case"update":return void t.emitPatch({op:"replace",path:""+e.index,value:e.newValue.snapshot,oldValue:e.oldValue?e.oldValue.snapshot:void 0},t);case"splice":for(var r=e.removedCount-1;r>=0;r--)t.emitPatch({op:"remove",path:""+(e.index+r),oldValue:e.removed[r].snapshot},t);for(r=0;r<e.addedCount;r++)t.emitPatch({op:"add",path:""+(e.index+r),value:t.getChildNode(""+(e.index+r)).snapshot,oldValue:void 0},t);return}}}),Object.defineProperty(t.prototype,"applyPatchLocally",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r){var n=e.storedValue,i="-"===t?n.length:Number(t);switch(r.op){case"replace":n[i]=r.value;break;case"add":n.splice(i,0,r.value);break;case"remove":n.splice(i,1)}}}),Object.defineProperty(t.prototype,"applySnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){Ue(this,t),e.storedValue.replace(t)}}),Object.defineProperty(t.prototype,"getChildType",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this._subType}}),Object.defineProperty(t.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){var r=this;return bt(e)?He(e.map((function(e,n){return r._subType.validate(e,Le(t,""+n,r._subType))}))):Fe(t,e,"Value is not an array")}}),Object.defineProperty(t.prototype,"getDefaultSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(){return lt}}),Object.defineProperty(t.prototype,"removeChild",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){e.storedValue.splice(Number(t),1)}}),t}(fe);function Xt(e,t,r,n,i){for(var o,a=!0,s=0;;s++){var u=s<=n.length-1,l=r[s],c=u?n[s]:void 0,f=""+i[s];if(((o=c)instanceof re||o instanceof se)&&(c=c.storedValue),!l&&!u)break;if(u)if(l)if(Qt(l,c))r[s]=Zt(t,e,f,c,l);else{for(var p=void 0,h=s;h<r.length;h++)if(Qt(r[h],c)){p=r.splice(h,1)[0];break}a=!1,d=Zt(t,e,f,c,p),r.splice(s,0,d)}else{if(Je(c)&&Ze(c).parent===e)throw pt("Cannot add an object to a state tree if it is already part of the same or another state tree. Tried to assign an object to '"+e.path+"/"+f+"', but it lives already at '"+Ze(c).path+"'");a=!1;var d=Zt(t,e,f,c);r.splice(s,0,d)}else a=!1,r.splice(s,1),l instanceof se&&l.createObservableInstanceIfNeeded(),l.die(),s--}return a?null:r}function Zt(e,t,r,n,i){Ue(e,n);var o=function(){if(Je(n)){var o=Ze(n);if(o.assertAlive(ct),null!==o.parent&&o.parent===t)return o.setParent(t,r),o}return i?e.reconcile(i,n,t,r):e.instantiate(t,r,void 0,n)}();return i&&i!==o&&(i instanceof se&&i.createObservableInstanceIfNeeded(),i.die()),o}function Qt(e,t){if(!e.isAlive)return!1;if(Je(t)){var r=Ze(t);return r.isAlive&&r===e}if(e.snapshot===t)return!0;if(!(e instanceof se))return!1;var n=e.getReconciliationType();return null!==e.identifier&&e.identifierAttribute&&yt(t)&&n.is(t)&&n.isMatchingSnapshotId(e,t)}function er(e){return he(e)&&(e.flags&ie.Array)>0}Jt.prototype.applySnapshot=(0,i.action)(Jt.prototype.applySnapshot);var tr="preProcessSnapshot",rr="postProcessSnapshot";function nr(){return Ze(this).toString()}var ir={name:"AnonymousModel",properties:{},initializers:lt};var or=function(e){function t(t){var r,i,o,a=e.call(this,t.name||ir.name)||this;return Object.defineProperty(a,"flags",{enumerable:!0,configurable:!0,writable:!0,value:ie.Object}),Object.defineProperty(a,"initializers",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(a,"properties",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(a,"preProcessor",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(a,"postProcessor",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(a,"propertyNames",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(a,"named",{enumerable:!0,configurable:!0,writable:!0,value:function(e){return a.cloneAndEnhance({name:e})}}),Object.defineProperty(a,"props",{enumerable:!0,configurable:!0,writable:!0,value:function(e){return a.cloneAndEnhance({properties:e})}}),Object.defineProperty(a,"preProcessSnapshot",{enumerable:!0,configurable:!0,writable:!0,value:function(e){var t=a.preProcessor;return t?a.cloneAndEnhance({preProcessor:function(r){return t(e(r))}}):a.cloneAndEnhance({preProcessor:e})}}),Object.defineProperty(a,"postProcessSnapshot",{enumerable:!0,configurable:!0,writable:!0,value:function(e){var t=a.postProcessor;return t?a.cloneAndEnhance({postProcessor:function(r){return e(t(r))}}):a.cloneAndEnhance({postProcessor:e})}}),Object.assign(a,ir,t),a.properties=(r=a.properties,i=Object.keys(r),o=new Set,i.forEach((function(e){if(o.has(e))throw pt(e+" is declared twice in the model. Model should not contain the same keys");o.add(e)})),i.reduce((function(e,t){if(t in n)throw pt("Hook '"+t+"' was defined as property. Hooks should be defined as part of the actions");var i=Object.getOwnPropertyDescriptor(r,t);if("get"in i)throw pt("Getters are not supported as properties. Please use views instead");var o=i.value;if(null==o)throw pt("The default value of an attribute cannot be null or undefined as the type cannot be inferred. Did you mean `types.maybe(someType)`?");if(mt(o))e[t]=Tr(function(e){switch(typeof e){case"string":return ur;case"number":return lr;case"boolean":return hr;case"object":if(e instanceof Date)return yr}throw pt("Cannot determine primitive type from value "+e)}(o),o);else if(o instanceof qt)e[t]=Tr(o,{});else if(o instanceof Jt)e[t]=Tr(o,[]);else if(!he(o))throw pt("Invalid type definition for property '"+t+"', cannot infer a type from a value like '"+o+"' ("+typeof o+")");return e}),f({},r))),a.properties,a.propertyNames=Object.keys(a.properties),a.identifierAttribute=a._getIdentifierAttribute(),a}return c(t,e),Object.defineProperty(t.prototype,"_getIdentifierAttribute",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e=void 0;return this.forAllProps((function(t,r){if(r.flags&ie.Identifier){if(e)throw pt("Cannot define property '"+t+"' as object identifier, property '"+e+"' is already defined as identifier property");e=t}})),e}}),Object.defineProperty(t.prototype,"cloneAndEnhance",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return new t({name:e.name||this.name,properties:Object.assign({},this.properties,e.properties),initializers:this.initializers.concat(e.initializers||[]),preProcessor:e.preProcessor||this.preProcessor,postProcessor:e.postProcessor||this.postProcessor})}}),Object.defineProperty(t.prototype,"actions",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=this;return this.cloneAndEnhance({initializers:[function(r){return t.instantiateActions(r,e(r)),r}]})}}),Object.defineProperty(t.prototype,"instantiateActions",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){if(!yt(t))throw pt("actions initializer should return a plain object containing actions");Object.keys(t).forEach((function(r){if(r===tr)throw pt("Cannot define action '"+tr+"', it should be defined using 'type.preProcessSnapshot(fn)' instead");if(r===rr)throw pt("Cannot define action '"+rr+"', it should be defined using 'type.postProcessSnapshot(fn)' instead");var i=t[r],o=e[r];if(r in n&&o){var a=i;i=function(){o.apply(null,arguments),a.apply(null,arguments)}}var s=i.$mst_middleware,u=i.bind(t);u._isFlowAction=i._isFlowAction||!1,u.$mst_middleware=s;var l=Ee(e,r,u);t[r]=l,wt(e,r,l)}))}}),Object.defineProperty(t.prototype,"volatile",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=this;if("function"!=typeof e)throw pt("You passed an "+typeof e+" to volatile state as an argument, when function is expected");return this.cloneAndEnhance({initializers:[function(r){return t.instantiateVolatileState(r,e(r)),r}]})}}),Object.defineProperty(t.prototype,"instantiateVolatileState",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){if(!yt(t))throw pt("volatile state initializer should return a plain object containing state");(0,i.set)(e,t)}}),Object.defineProperty(t.prototype,"extend",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=this;return this.cloneAndEnhance({initializers:[function(r){var n=e(r),i=n.actions,o=n.views,a=n.state,s=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]])}return r}(n,["actions","views","state"]);for(var u in s)throw pt("The `extend` function should return an object with a subset of the fields 'actions', 'views' and 'state'. Found invalid key '"+u+"'");return a&&t.instantiateVolatileState(r,a),o&&t.instantiateViews(r,o),i&&t.instantiateActions(r,i),r}]})}}),Object.defineProperty(t.prototype,"views",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=this;return this.cloneAndEnhance({initializers:[function(r){return t.instantiateViews(r,e(r)),r}]})}}),Object.defineProperty(t.prototype,"instantiateViews",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){if(!yt(t))throw pt("views initializer should return a plain object containing views");Object.getOwnPropertyNames(t).forEach((function(r){var n,o=Object.getOwnPropertyDescriptor(t,r);if("get"in o)(0,i.defineProperty)(e,r,o),(0,i.makeObservable)(e,((n={})[r]=i.computed,n));else{if("function"!=typeof o.value)throw pt("A view member should either be a function or getter based property");wt(e,r,o.value)}}))}}),Object.defineProperty(t.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r,n){return qe(this,e,t,r,Je(n)?n:this.applySnapshotPreProcessor(n))}}),Object.defineProperty(t.prototype,"initializeChildNodes",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){void 0===t&&(t={});var r=e.type,n={};return r.forAllProps((function(r,i){n[r]=i.instantiate(e,r,void 0,t[r])})),n}}),Object.defineProperty(t.prototype,"createNewInstance",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=f(f({},ft),{name:this.name});return i.observable.object(e,ct,t)}}),Object.defineProperty(t.prototype,"finalizeNewInstance",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){wt(t,"toString",nr),this.forAllProps((function(r){(0,i._interceptReads)(t,r,e.unbox)})),this.initializers.reduce((function(e,t){return t(e)}),t),(0,i.intercept)(t,this.willChange),(0,i.observe)(t,this.didChange)}}),Object.defineProperty(t.prototype,"willChange",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=e,r=Ze(t.object),n=t.name;r.assertWritable({subpath:n});var i=r.type.properties[n];return i&&(Ue(i,t.newValue),t.newValue=i.reconcile(r.getChildNode(n),t.newValue,r,n)),t}}),Object.defineProperty(t.prototype,"didChange",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=e,r=Ze(t.object);if(r.type.properties[t.name]){var n=t.oldValue?t.oldValue.snapshot:void 0;r.emitPatch({op:"replace",path:zt(t.name),value:t.newValue.snapshot,oldValue:n},r)}}}),Object.defineProperty(t.prototype,"getChildren",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=this,r=[];return this.forAllProps((function(n){r.push(t.getChildNode(e,n))})),r}}),Object.defineProperty(t.prototype,"getChildNode",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){var r;if(!(t in this.properties))throw pt("Not a value property: "+t);var n=(0,i._getAdministration)(e.storedValue,t),o=null===(r=n.raw)||void 0===r?void 0:r.call(n);if(!o)throw pt("Node not available for property "+t);return o}}),Object.defineProperty(t.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){var r=this;void 0===t&&(t=!0);var n={};return this.forAllProps((function(t,o){try{(0,i.getAtom)(e.storedValue,t).reportObserved()}catch(e){throw pt(t+" property is declared twice")}n[t]=r.getChildNode(e,t).snapshot})),t?this.applySnapshotPostProcessor(n):n}}),Object.defineProperty(t.prototype,"processInitialSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t={};return Object.keys(e).forEach((function(r){t[r]=e[r].getSnapshot()})),this.applySnapshotPostProcessor(t)}}),Object.defineProperty(t.prototype,"applyPatchLocally",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r){if("replace"!==r.op&&"add"!==r.op)throw pt("object does not support operation "+r.op);e.storedValue[t]=r.value}}),Object.defineProperty(t.prototype,"applySnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){Ue(this,t);var r=this.applySnapshotPreProcessor(t);this.forAllProps((function(t){e.storedValue[t]=r[t]}))}}),Object.defineProperty(t.prototype,"applySnapshotPreProcessor",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=this.preProcessor;return t?t.call(null,e):e}}),Object.defineProperty(t.prototype,"applySnapshotPostProcessor",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=this.postProcessor;return t?t.call(null,e):e}}),Object.defineProperty(t.prototype,"getChildType",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return xt(),this.properties[e]}}),Object.defineProperty(t.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){var r=this,n=this.applySnapshotPreProcessor(e);return yt(n)?He(this.propertyNames.map((function(e){return r.properties[e].validate(n[e],Le(t,e,r.properties[e]))}))):Fe(t,n,"Value is not a plain object")}}),Object.defineProperty(t.prototype,"forAllProps",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=this;this.propertyNames.forEach((function(r){return e(r,t.properties[r])}))}}),Object.defineProperty(t.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e=this;return"{ "+this.propertyNames.map((function(t){return t+": "+e.properties[t].describe()})).join("; ")+" }"}}),Object.defineProperty(t.prototype,"getDefaultSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(){return ct}}),Object.defineProperty(t.prototype,"removeChild",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){e.storedValue[t]=void 0}}),t}(fe);function ar(e){return he(e)&&(e.flags&ie.Object)>0}or.prototype.applySnapshot=(0,i.action)(or.prototype.applySnapshot);var sr=function(e){function t(t,r,n,i){void 0===i&&(i=ht);var o=e.call(this,t)||this;return Object.defineProperty(o,"flags",{enumerable:!0,configurable:!0,writable:!0,value:r}),Object.defineProperty(o,"checker",{enumerable:!0,configurable:!0,writable:!0,value:n}),Object.defineProperty(o,"initializer",{enumerable:!0,configurable:!0,writable:!0,value:i}),o.flags=r,o}return c(t,e),Object.defineProperty(t.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this.name}}),Object.defineProperty(t.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r,n){return Ye(this,e,t,r,n)}}),Object.defineProperty(t.prototype,"createNewInstance",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return this.initializer(e)}}),Object.defineProperty(t.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){return mt(e)&&this.checker(e)?Be():Fe(t,e,"Value is not a "+("Date"===this.name?"Date or a unix milliseconds timestamp":this.name))}}),t}(pe),ur=new sr("string",ie.String,(function(e){return"string"==typeof e})),lr=new sr("number",ie.Number,(function(e){return"number"==typeof e})),cr=new sr("integer",ie.Integer,(function(e){return dt(e)})),fr=new sr("float",ie.Float,(function(e){return t=e,Number(t)===t&&t%1!=0;var t})),pr=new sr("finite",ie.Finite,(function(e){return t=e,Number.isFinite(t);var t})),hr=new sr("boolean",ie.Boolean,(function(e){return"boolean"==typeof e})),dr=new sr("null",ie.Null,(function(e){return null===e})),br=new sr("undefined",ie.Undefined,(function(e){return void 0===e})),vr=new sr("Date",ie.Date,(function(e){return"number"==typeof e||e instanceof Date}),(function(e){return e instanceof Date?e:new Date(e)}));vr.getSnapshot=function(e){return e.storedValue.getTime()};var yr=vr;function gr(e){return he(e)&&(e.flags&(ie.String|ie.Number|ie.Integer|ie.Boolean|ie.Date))>0}var mr=function(e){function t(t){var r=e.call(this,JSON.stringify(t))||this;return Object.defineProperty(r,"value",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(r,"flags",{enumerable:!0,configurable:!0,writable:!0,value:ie.Literal}),r.value=t,r}return c(t,e),Object.defineProperty(t.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r,n){return Ye(this,e,t,r,n)}}),Object.defineProperty(t.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return JSON.stringify(this.value)}}),Object.defineProperty(t.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){return mt(e)&&e===this.value?Be():Fe(t,e,"Value is not a literal "+JSON.stringify(this.value))}}),t}(pe);function _r(e){return new mr(e)}function wr(e){return he(e)&&(e.flags&ie.Literal)>0}var Or=function(e){function t(t,r,n,i){var o=e.call(this,t)||this;return Object.defineProperty(o,"_subtype",{enumerable:!0,configurable:!0,writable:!0,value:r}),Object.defineProperty(o,"_predicate",{enumerable:!0,configurable:!0,writable:!0,value:n}),Object.defineProperty(o,"_message",{enumerable:!0,configurable:!0,writable:!0,value:i}),o}return c(t,e),Object.defineProperty(t.prototype,"flags",{get:function(){return this._subtype.flags|ie.Refinement},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this.name}}),Object.defineProperty(t.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r,n){return this._subtype.instantiate(e,t,r,n)}}),Object.defineProperty(t.prototype,"isAssignableFrom",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return this._subtype.isAssignableFrom(e)}}),Object.defineProperty(t.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){var r=this._subtype.validate(e,t);if(r.length>0)return r;var n=Je(e)?Ze(e).snapshot:e;return this._predicate(n)?Be():Fe(t,e,this._message(e))}}),Object.defineProperty(t.prototype,"reconcile",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r,n){return this._subtype.reconcile(e,t,r,n)}}),Object.defineProperty(t.prototype,"getSubTypes",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this._subtype}}),t}(ce);function Pr(e){return(e.flags&ie.Refinement)>0}var jr=function(e){function t(t,r,n){var i=e.call(this,t)||this;return Object.defineProperty(i,"_types",{enumerable:!0,configurable:!0,writable:!0,value:r}),Object.defineProperty(i,"_dispatcher",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(i,"_eager",{enumerable:!0,configurable:!0,writable:!0,value:!0}),n=f({eager:!0,dispatcher:void 0},n),i._dispatcher=n.dispatcher,n.eager||(i._eager=!1),i}return c(t,e),Object.defineProperty(t.prototype,"flags",{get:function(){var e=ie.Union;return this._types.forEach((function(t){e|=t.flags})),e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isAssignableFrom",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return this._types.some((function(t){return t.isAssignableFrom(e)}))}}),Object.defineProperty(t.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return"("+this._types.map((function(e){return e.describe()})).join(" | ")+")"}}),Object.defineProperty(t.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r,n){var i=this.determineType(n,void 0);if(!i)throw pt("No matching type for union "+this.describe());return i.instantiate(e,t,r,n)}}),Object.defineProperty(t.prototype,"reconcile",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r,n){var i=this.determineType(t,e.getReconciliationType());if(!i)throw pt("No matching type for union "+this.describe());return i.reconcile(e,t,r,n)}}),Object.defineProperty(t.prototype,"determineType",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){return this._dispatcher?this._dispatcher(e):t?t.is(e)?t:this._types.filter((function(e){return e!==t})).find((function(t){return t.is(e)})):this._types.find((function(t){return t.is(e)}))}}),Object.defineProperty(t.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){if(this._dispatcher)return this._dispatcher(e).validate(e,t);for(var r=[],n=0,i=0;i<this._types.length;i++){var o=this._types[i].validate(e,t);if(0===o.length){if(this._eager)return Be();n++}else r.push(o)}return 1===n?Be():Fe(t,e,"No type is applicable for the union").concat(He(r))}}),Object.defineProperty(t.prototype,"getSubTypes",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this._types}}),t}(ce);function Ar(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var n=he(e)?void 0:e,i=he(e)?b([e],t):t,o="("+i.map((function(e){return e.name})).join(" | ")+")";return new jr(o,i,n)}function Sr(e){return(e.flags&ie.Union)>0}var kr=function(e){function t(t,r,n){var i=e.call(this,t.name)||this;return Object.defineProperty(i,"_subtype",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(i,"_defaultValue",{enumerable:!0,configurable:!0,writable:!0,value:r}),Object.defineProperty(i,"optionalValues",{enumerable:!0,configurable:!0,writable:!0,value:n}),i}return c(t,e),Object.defineProperty(t.prototype,"flags",{get:function(){return this._subtype.flags|ie.Optional},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this._subtype.describe()+"?"}}),Object.defineProperty(t.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r,n){if(this.optionalValues.indexOf(n)>=0){var i=this.getDefaultInstanceOrSnapshot();return this._subtype.instantiate(e,t,r,i)}return this._subtype.instantiate(e,t,r,n)}}),Object.defineProperty(t.prototype,"reconcile",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r,n){return this._subtype.reconcile(e,this.optionalValues.indexOf(t)<0&&this._subtype.is(t)?t:this.getDefaultInstanceOrSnapshot(),r,n)}}),Object.defineProperty(t.prototype,"getDefaultInstanceOrSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e="function"==typeof this._defaultValue?this._defaultValue():this._defaultValue;return"function"==typeof this._defaultValue&&Ue(this,e),e}}),Object.defineProperty(t.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){return this.optionalValues.indexOf(e)>=0?Be():this._subtype.validate(e,t)}}),Object.defineProperty(t.prototype,"isAssignableFrom",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return this._subtype.isAssignableFrom(e)}}),Object.defineProperty(t.prototype,"getSubTypes",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this._subtype}}),t}(ce);function Tr(e,t,r){return function(e,t){if("function"!=typeof t&&Je(t))throw pt("default value cannot be an instance, pass a snapshot or a function that creates an instance/snapshot instead");de()}(0,t),new kr(e,t,r||Er)}var Er=[void 0];function xr(e){return he(e)&&(e.flags&ie.Optional)>0}var Cr=Tr(br,void 0),Ir=Tr(dr,null);function Vr(e){return de(),Ar(e,Cr)}var Nr=function(e){function t(t,r){var n=e.call(this,t)||this;return Object.defineProperty(n,"_definition",{enumerable:!0,configurable:!0,writable:!0,value:r}),Object.defineProperty(n,"_subType",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),n}return c(t,e),Object.defineProperty(t.prototype,"flags",{get:function(){return(this._subType?this._subType.flags:0)|ie.Late},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"getSubType",{enumerable:!1,configurable:!0,writable:!0,value:function(e){if(!this._subType){var t=void 0;try{t=this._definition()}catch(e){if(!(e instanceof ReferenceError))throw e;t=void 0}if(e&&void 0===t)throw pt("Late type seems to be used too early, the definition (still) returns undefined");t&&(this._subType=t)}return this._subType}}),Object.defineProperty(t.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r,n){return this.getSubType(!0).instantiate(e,t,r,n)}}),Object.defineProperty(t.prototype,"reconcile",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r,n){return this.getSubType(!0).reconcile(e,t,r,n)}}),Object.defineProperty(t.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e=this.getSubType(!1);return e?e.name:"<uknown late type>"}}),Object.defineProperty(t.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){var r=this.getSubType(!1);return r?r.validate(e,t):Be()}}),Object.defineProperty(t.prototype,"isAssignableFrom",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=this.getSubType(!1);return!!t&&t.isAssignableFrom(e)}}),Object.defineProperty(t.prototype,"getSubTypes",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this.getSubType(!1)||ue}}),t}(ce);function Mr(e){return he(e)&&(e.flags&ie.Late)>0}var Rr=function(e){function t(t,r){var n=e.call(this,t)||this;return Object.defineProperty(n,"options",{enumerable:!0,configurable:!0,writable:!0,value:r}),Object.defineProperty(n,"flags",{enumerable:!0,configurable:!0,writable:!0,value:ie.Lazy}),Object.defineProperty(n,"loadedType",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(n,"pendingNodeList",{enumerable:!0,configurable:!0,writable:!0,value:i.observable.array()}),(0,i.when)((function(){return n.pendingNodeList.length>0&&n.pendingNodeList.some((function(e){return e.isAlive&&n.options.shouldLoadPredicate(e.parent?e.parent.value:null)}))}),(function(){n.options.loadType().then((0,i.action)((function(e){n.loadedType=e,n.pendingNodeList.forEach((function(e){e.parent&&n.loadedType&&e.parent.applyPatches([{op:"replace",path:"/"+e.subpath,value:e.snapshot}])}))})))})),n}return c(t,e),Object.defineProperty(t.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return"<lazy "+this.name+">"}}),Object.defineProperty(t.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r,n){var o=this;if(this.loadedType)return this.loadedType.instantiate(e,t,r,n);var a=Ye(this,e,t,r,n);return this.pendingNodeList.push(a),(0,i.when)((function(){return!a.isAlive}),(function(){return o.pendingNodeList.splice(o.pendingNodeList.indexOf(a),1)})),a}}),Object.defineProperty(t.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){return this.loadedType?this.loadedType.validate(e,t):_t(e)?Be():Fe(t,e,"Value is not serializable and cannot be lazy")}}),Object.defineProperty(t.prototype,"reconcile",{enumerable:!1,configurable:!0,writable:!0,value:function(t,r,n,i){return this.loadedType?(t.die(),this.loadedType.instantiate(n,i,n.environment,r)):e.prototype.reconcile.call(this,t,r,n,i)}}),t}(pe),Dr=function(e){function t(t){var r=e.call(this,t?"frozen("+t.name+")":"frozen")||this;return Object.defineProperty(r,"subType",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(r,"flags",{enumerable:!0,configurable:!0,writable:!0,value:ie.Frozen}),r}return c(t,e),Object.defineProperty(t.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return"<any immutable value>"}}),Object.defineProperty(t.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r,n){return Ye(this,e,t,r,n)}}),Object.defineProperty(t.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){return _t(e)?this.subType?this.subType.validate(e,t):Be():Fe(t,e,"Value is not serializable and cannot be frozen")}}),t}(pe),zr=new Dr;function Lr(e){return he(e)&&(e.flags&ie.Frozen)>0}var Br=function(){function e(e,t){if(Object.defineProperty(this,"targetType",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(this,"identifier",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"node",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"resolvedReference",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),en(e))this.identifier=e;else{if(!Je(e))throw pt("Can only store references to tree nodes or identifiers, got: '"+e+"'");var r=Ze(e);if(!r.identifierAttribute)throw pt("Can only store references with a defined identifier attribute.");var n=r.unnormalizedIdentifier;if(null==n)throw pt("Can only store references to tree nodes with a defined identifier.");this.identifier=n}}return Object.defineProperty(e.prototype,"updateResolvedReference",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=Qr(this.identifier),r=e.root,n=r.identifierCache.getLastCacheModificationPerId(t);if(!this.resolvedReference||this.resolvedReference.lastCacheModification!==n){var i=this.targetType,o=r.identifierCache.resolve(i,t);if(!o)throw new Fr("[mobx-state-tree] Failed to resolve reference '"+this.identifier+"' to type '"+this.targetType.name+"' (from node: "+e.path+")");this.resolvedReference={node:o,lastCacheModification:n}}}}),Object.defineProperty(e.prototype,"resolvedValue",{get:function(){return this.updateResolvedReference(this.node),this.resolvedReference.node.value},enumerable:!1,configurable:!0}),e}(),Fr=function(e){function t(r){var n=e.call(this,r)||this;return Object.setPrototypeOf(n,t.prototype),n}return c(t,e),t}(Error),Hr=function(e){function t(t,r){var n=e.call(this,"reference("+t.name+")")||this;return Object.defineProperty(n,"targetType",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(n,"onInvalidated",{enumerable:!0,configurable:!0,writable:!0,value:r}),Object.defineProperty(n,"flags",{enumerable:!0,configurable:!0,writable:!0,value:ie.Reference}),n}return c(t,e),Object.defineProperty(t.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this.name}}),Object.defineProperty(t.prototype,"isAssignableFrom",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return this.targetType.isAssignableFrom(e)}}),Object.defineProperty(t.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){return en(e)?Be():Fe(t,e,"Value is not a valid identifier, which is a string or a number")}}),Object.defineProperty(t.prototype,"fireInvalidated",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r,n){var i=t.parent;if(i&&i.isAlive){var o=i.storedValue;o&&this.onInvalidated({cause:e,parent:o,invalidTarget:n?n.storedValue:void 0,invalidId:r,replaceRef:function(e){_(t.root.storedValue,{op:"replace",value:e,path:t.path})},removeRef:function(){ar(i.type)?this.replaceRef(void 0):_(t.root.storedValue,{op:"remove",path:t.path})}})}}}),Object.defineProperty(t.prototype,"addTargetNodeWatcher",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){var r=this,i=this.getValue(e);if(i){var o=Ze(i),a=function(i,a){var s=function(e){switch(e){case n.beforeDestroy:return"destroy";case n.beforeDetach:return"detach";default:return}}(a);s&&r.fireInvalidated(s,e,t,o)},s=o.registerHook(n.beforeDetach,a),u=o.registerHook(n.beforeDestroy,a);return function(){s(),u()}}}}),Object.defineProperty(t.prototype,"watchTargetNodeForInvalidations",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r){var i=this;if(this.onInvalidated){var o;e.registerHook(n.beforeDestroy,(function(){o&&o()}));var a=function(n){o&&o();var a=e.parent,s=a&&a.storedValue;a&&a.isAlive&&s&&((r?r.get(t,s):e.root.identifierCache.has(i.targetType,Qr(t)))?o=i.addTargetNodeWatcher(e,t):n||i.fireInvalidated("invalidSnapshotReference",e,t,null))};e.state===Ge.FINALIZED?a(!0):(e.isRoot||e.root.registerHook(n.afterCreationFinalization,(function(){e.parent&&e.parent.createObservableInstanceIfNeeded()})),e.registerHook(n.afterAttach,(function(){a(!1)})))}}}),t}(pe),Ur=function(e){function t(t,r){return e.call(this,t,r)||this}return c(t,e),Object.defineProperty(t.prototype,"getValue",{enumerable:!1,configurable:!0,writable:!0,value:function(e){if(e.isAlive)return e.storedValue.resolvedValue}}),Object.defineProperty(t.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return e.storedValue.identifier}}),Object.defineProperty(t.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r,n){var i=Je(n)?D(n):n,o=new Br(n,this.targetType),a=Ye(this,e,t,r,o);return o.node=a,this.watchTargetNodeForInvalidations(a,i,void 0),a}}),Object.defineProperty(t.prototype,"reconcile",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r,n){if(!e.isDetaching&&e.type===this){var i=Je(t),o=e.storedValue;if(!i&&o.identifier===t||i&&o.resolvedValue===t)return e.setParent(r,n),e}var a=this.instantiate(r,n,void 0,t);return e.die(),a}}),t}(Hr),$r=function(e){function t(t,r,n){var i=e.call(this,t,n)||this;return Object.defineProperty(i,"options",{enumerable:!0,configurable:!0,writable:!0,value:r}),i}return c(t,e),Object.defineProperty(t.prototype,"getValue",{enumerable:!1,configurable:!0,writable:!0,value:function(e){if(e.isAlive)return this.options.get(e.storedValue,e.parent?e.parent.storedValue:null)}}),Object.defineProperty(t.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return e.storedValue}}),Object.defineProperty(t.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r,n){var i=Je(n)?this.options.set(n,e?e.storedValue:null):n,o=Ye(this,e,t,r,i);return this.watchTargetNodeForInvalidations(o,i,this.options),o}}),Object.defineProperty(t.prototype,"reconcile",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r,n){var i=Je(t)?this.options.set(t,e?e.storedValue:null):t;if(!e.isDetaching&&e.type===this&&e.storedValue===i)return e.setParent(r,n),e;var o=this.instantiate(r,n,void 0,i);return e.die(),o}}),t}(Hr);function Gr(e,t){de();var r=t||void 0,n=t?t.onInvalidated:void 0;return r&&(r.get||r.set)?new $r(e,{get:r.get,set:r.set},n):new Ur(e,n)}function Wr(e){return(e.flags&ie.Reference)>0}var Kr=function(e){function t(t,r){var n=e.call(this,t)||this;return Object.defineProperty(n,"validType",{enumerable:!0,configurable:!0,writable:!0,value:r}),Object.defineProperty(n,"flags",{enumerable:!0,configurable:!0,writable:!0,value:ie.Identifier}),n}return c(t,e),Object.defineProperty(t.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r,n){if(!(e&&e.type instanceof or))throw pt("Identifier types can only be instantiated as direct child of a model type");return Ye(this,e,t,r,n)}}),Object.defineProperty(t.prototype,"reconcile",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r,n){if(e.storedValue!==t)throw pt("Tried to change identifier from '"+e.storedValue+"' to '"+t+"'. Changing identifiers is not allowed.");return e.setParent(r,n),e}}),Object.defineProperty(t.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){return typeof e!==this.validType?Fe(t,e,"Value is not a valid "+this.describe()+", expected a "+this.validType):Be()}}),t}(pe),qr=function(e){function t(){var t=e.call(this,"identifier","string")||this;return Object.defineProperty(t,"flags",{enumerable:!0,configurable:!0,writable:!0,value:ie.Identifier}),t}return c(t,e),Object.defineProperty(t.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return"identifier"}}),t}(Kr),Yr=function(e){function t(){return e.call(this,"identifierNumber","number")||this}return c(t,e),Object.defineProperty(t.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return e.storedValue}}),Object.defineProperty(t.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return"identifierNumber"}}),t}(Kr),Jr=new qr,Xr=new Yr;function Zr(e){return he(e)&&(e.flags&ie.Identifier)>0}function Qr(e){return""+e}function en(e){return"string"==typeof e||"number"==typeof e}var tn=function(e){function t(t){var r=e.call(this,t.name)||this;return Object.defineProperty(r,"options",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(r,"flags",{enumerable:!0,configurable:!0,writable:!0,value:ie.Custom}),r}return c(t,e),Object.defineProperty(t.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this.name}}),Object.defineProperty(t.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){if(this.options.isTargetType(e))return Be();var r=this.options.getValidationMessage(e);return r?Fe(t,e,"Invalid value for type '"+this.name+"': "+r):Be()}}),Object.defineProperty(t.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return this.options.toSnapshot(e.storedValue)}}),Object.defineProperty(t.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r,n){return Ye(this,e,t,r,this.options.isTargetType(n)?n:this.options.fromSnapshot(n,e&&e.root.environment))}}),Object.defineProperty(t.prototype,"reconcile",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r,n){var i=!this.options.isTargetType(t);if(!e.isDetaching&&e.type===this&&(i?t===e.snapshot:t===e.storedValue))return e.setParent(r,n),e;var o=i?this.options.fromSnapshot(t,r.root.environment):t,a=this.instantiate(r,n,void 0,o);return e.die(),a}}),t}(pe),rn={enumeration:function(e,t){var r="string"==typeof e?t:e,n=Ar.apply(void 0,b(r.map((function(e){return _r(""+e)}))));return"string"==typeof e&&(n.name=e),n},model:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r="string"==typeof e[0]?e.shift():"AnonymousModel",n=e.shift()||{};return new or({name:r,properties:n})},compose:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r="string"==typeof e[0],n=r?e[0]:"AnonymousModel";return r&&e.shift(),e.reduce((function(e,t){return e.cloneAndEnhance({name:e.name+"_"+t.name,properties:t.properties,initializers:t.initializers,preProcessor:function(r){return t.applySnapshotPreProcessor(e.applySnapshotPreProcessor(r))},postProcessor:function(r){return t.applySnapshotPostProcessor(e.applySnapshotPostProcessor(r))}})})).named(n)},custom:function(e){return new tn(e)},reference:Gr,safeReference:function(e,t){var r=Gr(e,f(f({},t),{onInvalidated:function(e){t&&t.onInvalidated&&t.onInvalidated(e),e.removeRef()}}));return t&&!1===t.acceptsUndefined?r:Vr(r)},union:Ar,optional:Tr,literal:_r,maybe:Vr,maybeNull:function(e){return de(),Ar(e,Ir)},refinement:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r="string"==typeof e[0]?e.shift():he(e[0])?e[0].name:null,n=e[0],i=e[1],o=e[2]?e[2]:function(e){return"Value does not respect the refinement predicate"};return de(),xt(),new Or(r,n,i,o)},string:ur,boolean:hr,number:lr,integer:cr,float:fr,finite:pr,Date:yr,map:function(e){return new qt("Map<string, "+e.name+">",e)},array:function(e){return de(),new Jt(e.name+"[]",e)},frozen:function(e){return 0===arguments.length?zr:he(e)?new Dr(e):Tr(zr,e)},identifier:Jr,identifierNumber:Xr,late:function(e,t){var r="string"==typeof e?e:"late("+e.toString()+")";return new Nr(r,"string"==typeof e?t:e)},lazy:function(e,t){return new Rr(e,t)},undefined:br,null:dr,snapshotProcessor:function(e,t,r){return de(),new $t(e,t,r)}}},42489:(e,t,r)=>{function n(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];throw new Error("number"==typeof e?"[MobX] minified error nr: "+e+(r.length?" "+r.map(String).join(","):"")+". Find the full error at: https://github.com/mobxjs/mobx/blob/main/packages/mobx/src/errors.ts":"[MobX] "+e)}r.r(t),r.d(t,{$mobx:()=>W,FlowCancellationError:()=>br,ObservableMap:()=>wn,ObservableSet:()=>jn,Reaction:()=>xt,_allowStateChanges:()=>Ye,_allowStateChangesInsideComputed:()=>qt,_allowStateReadsEnd:()=>dt,_allowStateReadsStart:()=>ht,_autoAction:()=>Kt,_endAction:()=>qe,_getAdministration:()=>Wn,_getGlobalState:()=>wt,_interceptReads:()=>Pr,_isComputingDerivation:()=>st,_resetGlobalState:()=>Ot,_startAction:()=>Ke,action:()=>Wt,autorun:()=>Jt,comparer:()=>J,computed:()=>Be,configure:()=>ur,createAtom:()=>Y,defineProperty:()=>zr,entries:()=>Vr,extendObservable:()=>lr,flow:()=>mr,flowResult:()=>wr,get:()=>Dr,getAtom:()=>Gn,getDebugName:()=>Kn,getDependencyTree:()=>cr,getObserverTree:()=>pr,has:()=>Rr,intercept:()=>jr,isAction:()=>Yt,isBoxedObservable:()=>Qe,isComputed:()=>Sr,isComputedProp:()=>kr,isFlow:()=>Or,isFlowCancellationError:()=>vr,isObservable:()=>Er,isObservableArray:()=>yn,isObservableMap:()=>On,isObservableObject:()=>In,isObservableProp:()=>xr,isObservableSet:()=>An,keys:()=>Cr,makeAutoObservable:()=>on,makeObservable:()=>rn,observable:()=>Re,observe:()=>Br,onBecomeObserved:()=>rr,onBecomeUnobserved:()=>nr,onReactionError:()=>Ct,override:()=>ee,ownKeys:()=>Lr,reaction:()=>Qt,remove:()=>Mr,runInAction:()=>qt,set:()=>Nr,spy:()=>Dt,toJS:()=>Ur,trace:()=>$r,transaction:()=>Gr,untracked:()=>ct,values:()=>Ir,when:()=>Wr});var i={};function o(){return"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==r.g?r.g:"undefined"!=typeof self?self:i}var a=Object.assign,s=Object.getOwnPropertyDescriptor,u=Object.defineProperty,l=Object.prototype,c=[];Object.freeze(c);var f={};Object.freeze(f);var p="undefined"!=typeof Proxy,h=Object.toString();function d(){p||n("Proxy not available")}function b(e){var t=!1;return function(){if(!t)return t=!0,e.apply(this,arguments)}}var v=function(){};function y(e){return"function"==typeof e}function g(e){switch(typeof e){case"string":case"symbol":case"number":return!0}return!1}function m(e){return null!==e&&"object"==typeof e}function _(e){if(!m(e))return!1;var t=Object.getPrototypeOf(e);if(null==t)return!0;var r=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r.toString()===h}function w(e){var t=null==e?void 0:e.constructor;return!!t&&("GeneratorFunction"===t.name||"GeneratorFunction"===t.displayName)}function O(e,t,r){u(e,t,{enumerable:!1,writable:!0,configurable:!0,value:r})}function P(e,t,r){u(e,t,{enumerable:!1,writable:!1,configurable:!0,value:r})}function j(e,t){var r="isMobX"+e;return t.prototype[r]=!0,function(e){return m(e)&&!0===e[r]}}function A(e){return null!=e&&"[object Map]"===Object.prototype.toString.call(e)}function S(e){return null!=e&&"[object Set]"===Object.prototype.toString.call(e)}var k=void 0!==Object.getOwnPropertySymbols,T="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:k?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames;function E(e){return null===e?null:"object"==typeof e?""+e:e}function x(e,t){return l.hasOwnProperty.call(e,t)}var C=Object.getOwnPropertyDescriptors||function(e){var t={};return T(e).forEach((function(r){t[r]=s(e,r)})),t};function I(e,t){return!!(e&t)}function V(e,t,r){return r?e|=t:e&=~t,e}function N(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function M(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,F(n.key),n)}}function R(e,t,r){return t&&M(e.prototype,t),r&&M(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function D(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(r)return(r=r.call(e)).next.bind(r);if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return N(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?N(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function z(){return z=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},z.apply(null,arguments)}function L(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,B(e,t)}function B(e,t){return B=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},B(e,t)}function F(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}var H=Symbol("mobx-stored-annotations");function U(e){return Object.assign((function(t,r){if(G(r))return e.decorate_20223_(t,r);$(t,r,e)}),e)}function $(e,t,r){x(e,H)||O(e,H,z({},e[H])),function(e){return e.annotationType_===Q}(r)||(e[H][t]=r)}function G(e){return"object"==typeof e&&"string"==typeof e.kind}var W=Symbol("mobx administration"),K=function(){function e(e){void 0===e&&(e="Atom"),this.name_=void 0,this.flags_=0,this.observers_=new Set,this.lastAccessedBy_=0,this.lowestObserverState_=tt.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 Tt(this)},t.reportChanged=function(){St(),Et(this),kt()},t.toString=function(){return this.name_},R(e,[{key:"isBeingObserved",get:function(){return I(this.flags_,e.isBeingObservedMask_)},set:function(t){this.flags_=V(this.flags_,e.isBeingObservedMask_,t)}},{key:"isPendingUnobservation",get:function(){return I(this.flags_,e.isPendingUnobservationMask_)},set:function(t){this.flags_=V(this.flags_,e.isPendingUnobservationMask_,t)}},{key:"diffValue",get:function(){return I(this.flags_,e.diffValueMask_)?1:0},set:function(t){this.flags_=V(this.flags_,e.diffValueMask_,1===t)}}])}();K.isBeingObservedMask_=1,K.isPendingUnobservationMask_=2,K.diffValueMask_=4;var q=j("Atom",K);function Y(e,t,r){void 0===t&&(t=v),void 0===r&&(r=v);var n=new K(e);return t!==v&&rr(n,t),r!==v&&nr(n,r),n}var J={identity:function(e,t){return e===t},structural:function(e,t){return Jn(e,t)},default:function(e,t){return Object.is?Object.is(e,t):e===t?0!==e||1/e==1/t:e!=e&&t!=t},shallow:function(e,t){return Jn(e,t,1)}};function X(e,t,r){return Er(e)?e:Array.isArray(e)?Re.array(e,{name:r}):_(e)?Re.object(e,void 0,{name:r}):A(e)?Re.map(e,{name:r}):S(e)?Re.set(e,{name:r}):"function"!=typeof e||Yt(e)||Or(e)?e:w(e)?mr(e):Kt(r,e)}function Z(e){return e}var Q="override",ee=U({annotationType_:Q,make_:function(e,t){return 0},extend_:function(e,t,r,i){n("'"+this.annotationType_+"' can only be used with 'makeObservable'")},decorate_20223_:function(e,t){console.warn("'"+this.annotationType_+"' cannot be used with decorators - this is a no-op")}});function te(e,t){return{annotationType_:e,options_:t,make_:re,extend_:ne,decorate_20223_:ie}}function re(e,t,r,n){var i;if(null!=(i=this.options_)&&i.bound)return null===this.extend_(e,t,r,!1)?0:1;if(n===e.target_)return null===this.extend_(e,t,r,!1)?0:2;if(Yt(r.value))return 1;var o=oe(e,this,t,r,!1);return u(n,t,o),2}function ne(e,t,r,n){var i=oe(e,this,t,r);return e.defineProperty_(t,i,n)}function ie(e,t){var r=t.kind,i=t.name,o=t.addInitializer,a=this;if("field"!=r){var s,u,l,c,f,p;if("method"==r)return Yt(e)||(u=e,e=Ge(null!=(l=null==(c=a.options_)?void 0:c.name)?l:i.toString(),u,null!=(f=null==(p=a.options_)?void 0:p.autoAction)&&f)),null!=(s=this.options_)&&s.bound&&o((function(){var e=this,t=e[i].bind(e);t.isMobxAction=!0,e[i]=t})),e;n("Cannot apply '"+a.annotationType_+"' to '"+String(i)+"' (kind: "+r+"):\n'"+a.annotationType_+"' can only be used on properties with a function value.")}else o((function(){$(this,i,a)}))}function oe(e,t,r,n,i){var o,a,s,u,l,c,f,p;void 0===i&&(i=_t.safeDescriptors),p=n,t.annotationType_,p.value;var h,d=n.value;return null!=(o=t.options_)&&o.bound&&(d=d.bind(null!=(h=e.proxy_)?h:e.target_)),{value:Ge(null!=(a=null==(s=t.options_)?void 0:s.name)?a:r.toString(),d,null!=(u=null==(l=t.options_)?void 0:l.autoAction)&&u,null!=(c=t.options_)&&c.bound?null!=(f=e.proxy_)?f:e.target_:void 0),configurable:!i||e.isPlainObject_,enumerable:!1,writable:!i}}function ae(e,t){return{annotationType_:e,options_:t,make_:se,extend_:ue,decorate_20223_:le}}function se(e,t,r,n){var i;if(n===e.target_)return null===this.extend_(e,t,r,!1)?0:2;if(null!=(i=this.options_)&&i.bound&&(!x(e.target_,t)||!Or(e.target_[t]))&&null===this.extend_(e,t,r,!1))return 0;if(Or(r.value))return 1;var o=ce(e,this,0,r,!1,!1);return u(n,t,o),2}function ue(e,t,r,n){var i,o=ce(e,this,0,r,null==(i=this.options_)?void 0:i.bound);return e.defineProperty_(t,o,n)}function le(e,t){var r,n=t.name,i=t.addInitializer;return Or(e)||(e=mr(e)),null!=(r=this.options_)&&r.bound&&i((function(){var e=this,t=e[n].bind(e);t.isMobXFlow=!0,e[n]=t})),e}function ce(e,t,r,n,i,o){var a;void 0===o&&(o=_t.safeDescriptors),a=n,t.annotationType_,a.value;var s,u=n.value;return Or(u)||(u=mr(u)),i&&((u=u.bind(null!=(s=e.proxy_)?s:e.target_)).isMobXFlow=!0),{value:u,configurable:!o||e.isPlainObject_,enumerable:!1,writable:!o}}function fe(e,t){return{annotationType_:e,options_:t,make_:pe,extend_:he,decorate_20223_:de}}function pe(e,t,r){return null===this.extend_(e,t,r,!1)?0:1}function he(e,t,r,n){return i=r,this.annotationType_,i.get,e.defineComputedProperty_(t,z({},this.options_,{get:r.get,set:r.set}),n);var i}function de(e,t){var r=this,n=t.name;return(0,t.addInitializer)((function(){var t=En(this)[W],i=z({},r.options_,{get:e,context:this});i.name||(i.name="ObservableObject."+n.toString()),t.values_.set(n,new et(i))})),function(){return this[W].getObservablePropValue_(n)}}function be(e,t){return{annotationType_:e,options_:t,make_:ve,extend_:ye,decorate_20223_:ge}}function ve(e,t,r){return null===this.extend_(e,t,r,!1)?0:1}function ye(e,t,r,n){var i,o;return this.annotationType_,e.defineObservableProperty_(t,r.value,null!=(i=null==(o=this.options_)?void 0:o.enhancer)?i:X,n)}function ge(e,t){var r=this,n=t.kind,i=t.name,o=new WeakSet;function a(e,t){var n,a,s=En(e)[W],u=new Ze(t,null!=(n=null==(a=r.options_)?void 0:a.enhancer)?n:X,"ObservableObject."+i.toString(),!1);s.values_.set(i,u),o.add(e)}if("accessor"==n)return{get:function(){return o.has(this)||a(this,e.get.call(this)),this[W].getObservablePropValue_(i)},set:function(e){return o.has(this)||a(this,e),this[W].setObservablePropValue_(i,e)},init:function(e){return o.has(this)||a(this,e),e}}}var me="true",_e=we();function we(e){return{annotationType_:me,options_:e,make_:Oe,extend_:Pe,decorate_20223_:je}}function Oe(e,t,r,n){var i,o,a,s;if(r.get)return Be.make_(e,t,r,n);if(r.set){var l=Ge(t.toString(),r.set);return n===e.target_?null===e.defineProperty_(t,{configurable:!_t.safeDescriptors||e.isPlainObject_,set:l})?0:2:(u(n,t,{configurable:!0,set:l}),2)}if(n!==e.target_&&"function"==typeof r.value)return w(r.value)?(null!=(s=this.options_)&&s.autoBind?mr.bound:mr).make_(e,t,r,n):(null!=(a=this.options_)&&a.autoBind?Kt.bound:Kt).make_(e,t,r,n);var c,f=!1===(null==(i=this.options_)?void 0:i.deep)?Re.ref:Re;return"function"==typeof r.value&&null!=(o=this.options_)&&o.autoBind&&(r.value=r.value.bind(null!=(c=e.proxy_)?c:e.target_)),f.make_(e,t,r,n)}function Pe(e,t,r,n){var i,o,a;return r.get?Be.extend_(e,t,r,n):r.set?e.defineProperty_(t,{configurable:!_t.safeDescriptors||e.isPlainObject_,set:Ge(t.toString(),r.set)},n):("function"==typeof r.value&&null!=(i=this.options_)&&i.autoBind&&(r.value=r.value.bind(null!=(a=e.proxy_)?a:e.target_)),(!1===(null==(o=this.options_)?void 0:o.deep)?Re.ref:Re).extend_(e,t,r,n))}function je(e,t){n("'"+this.annotationType_+"' cannot be used as a decorator")}var Ae={deep:!0,name:void 0,defaultDecorator:void 0,proxy:!0};function Se(e){return e||Ae}Object.freeze(Ae);var ke=be("observable"),Te=be("observable.ref",{enhancer:Z}),Ee=be("observable.shallow",{enhancer:function(e,t,r){return null==e||In(e)||yn(e)||On(e)||An(e)?e:Array.isArray(e)?Re.array(e,{name:r,deep:!1}):_(e)?Re.object(e,void 0,{name:r,deep:!1}):A(e)?Re.map(e,{name:r,deep:!1}):S(e)?Re.set(e,{name:r,deep:!1}):void 0}}),xe=be("observable.struct",{enhancer:function(e,t){return Jn(e,t)?t:e}}),Ce=U(ke);function Ie(e){return!0===e.deep?X:!1===e.deep?Z:(t=e.defaultDecorator)&&null!=(r=null==(n=t.options_)?void 0:n.enhancer)?r:X;var t,r,n}function Ve(e,t,r){return G(t)?ke.decorate_20223_(e,t):g(t)?void $(e,t,ke):Er(e)?e:_(e)?Re.object(e,t,r):Array.isArray(e)?Re.array(e,t):A(e)?Re.map(e,t):S(e)?Re.set(e,t):"object"==typeof e&&null!==e?e:Re.box(e,t)}a(Ve,Ce);var Ne,Me,Re=a(Ve,{box:function(e,t){var r=Se(t);return new Ze(e,Ie(r),r.name,!0,r.equals)},array:function(e,t){var r=Se(t);return(!1===_t.useProxies||!1===r.proxy?$n:cn)(e,Ie(r),r.name)},map:function(e,t){var r=Se(t);return new wn(e,Ie(r),r.name)},set:function(e,t){var r=Se(t);return new jn(e,Ie(r),r.name)},object:function(e,t,r){return qn((function(){return lr(!1===_t.useProxies||!1===(null==r?void 0:r.proxy)?En({},r):function(e,t){var r,n;return d(),null!=(n=(r=(e=En(e,t))[W]).proxy_)?n:r.proxy_=new Proxy(e,Yr)}({},r),e,t)}))},ref:U(Te),shallow:U(Ee),deep:Ce,struct:U(xe)}),De="computed",ze=fe(De),Le=fe("computed.struct",{equals:J.structural}),Be=function(e,t){if(G(t))return ze.decorate_20223_(e,t);if(g(t))return $(e,t,ze);if(_(e))return U(fe(De,e));var r=_(t)?t:{};return r.get=e,r.name||(r.name=e.name||""),new et(r)};Object.assign(Be,ze),Be.struct=U(Le);var Fe=0,He=1,Ue=null!=(Ne=null==(Me=s((function(){}),"name"))?void 0:Me.configurable)&&Ne,$e={value:"action",configurable:!0,writable:!1,enumerable:!1};function Ge(e,t,r,n){function i(){return We(e,r,t,n||this,arguments)}return void 0===r&&(r=!1),i.isMobxAction=!0,i.toString=function(){return t.toString()},Ue&&($e.value=e,u(i,"name",$e)),i}function We(e,t,r,n,i){var o=Ke(0,t);try{return r.apply(n,i)}catch(e){throw o.error_=e,e}finally{qe(o)}}function Ke(e,t,r,n){var i=_t.trackingDerivation,o=!t||!i;St();var a=_t.allowStateChanges;o&&(ft(),a=Je(!0));var s={runAsAction_:o,prevDerivation_:i,prevAllowStateChanges_:a,prevAllowStateReads_:ht(!0),notifySpy_:!1,startTime_:0,actionId_:He++,parentActionId_:Fe};return Fe=s.actionId_,s}function qe(e){Fe!==e.actionId_&&n(30),Fe=e.parentActionId_,void 0!==e.error_&&(_t.suppressReactionErrors=!0),Xe(e.prevAllowStateChanges_),dt(e.prevAllowStateReads_),kt(),e.runAsAction_&&pt(e.prevDerivation_),_t.suppressReactionErrors=!1}function Ye(e,t){var r=Je(e);try{return t()}finally{Xe(r)}}function Je(e){var t=_t.allowStateChanges;return _t.allowStateChanges=e,t}function Xe(e){_t.allowStateChanges=e}var Ze=function(e){function t(t,r,n,i,o){var a;return void 0===n&&(n="ObservableValue"),void 0===i&&(i=!0),void 0===o&&(o=J.default),(a=e.call(this,n)||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=r,a.name_=n,a.equals=o,a.value_=r(t,void 0,n),a}L(t,e);var r=t.prototype;return r.dehanceValue=function(e){return void 0!==this.dehancer?this.dehancer(e):e},r.set=function(e){this.value_,(e=this.prepareNewValue_(e))!==_t.UNCHANGED&&this.setNewValue_(e)},r.prepareNewValue_=function(e){if(Jr(this)){var t=Zr(this,{object:this,type:sn,newValue:e});if(!t)return _t.UNCHANGED;e=t.newValue}return e=this.enhancer(e,this.value_,this.name_),this.equals(this.value_,e)?_t.UNCHANGED:e},r.setNewValue_=function(e){var t=this.value_;this.value_=e,this.reportChanged(),Qr(this)&&tn(this,{type:sn,object:this,newValue:e,oldValue:t})},r.get=function(){return this.reportObserved(),this.dehanceValue(this.value_)},r.intercept_=function(e){return Xr(this,e)},r.observe_=function(e,t){return t&&e({observableKind:"value",debugObjectName:this.name_,object:this,type:sn,newValue:this.value_,oldValue:void 0}),en(this,e)},r.raw=function(){return this.value_},r.toJSON=function(){return this.get()},r.toString=function(){return this.name_+"["+this.value_+"]"},r.valueOf=function(){return E(this.get())},r[Symbol.toPrimitive]=function(){return this.valueOf()},t}(K),Qe=j("ObservableValue",Ze),et=function(){function e(e){this.dependenciesState_=tt.NOT_TRACKING_,this.observing_=[],this.newObserving_=null,this.observers_=new Set,this.runId_=0,this.lastAccessedBy_=0,this.lowestObserverState_=tt.UP_TO_DATE_,this.unboundDepsCount_=0,this.value_=new it(null),this.name_=void 0,this.triggeredBy_=void 0,this.flags_=0,this.derivation=void 0,this.setter_=void 0,this.isTracing_=rt.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||n(31),this.derivation=e.get,this.name_=e.name||"ComputedValue",e.set&&(this.setter_=Ge("ComputedValue-setter",e.set)),this.equals_=e.equals||(e.compareStructural||e.struct?J.structural:J.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_===tt.UP_TO_DATE_&&(e.lowestObserverState_=tt.POSSIBLY_STALE_,e.observers_.forEach((function(e){e.dependenciesState_===tt.UP_TO_DATE_&&(e.dependenciesState_=tt.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&&n(32,this.name_,this.derivation),0!==_t.inBatch||0!==this.observers_.size||this.keepAlive_){if(Tt(this),at(this)){var e=_t.trackingContext;this.keepAlive_&&!e&&(_t.trackingContext=this),this.trackAndCompute()&&function(e){e.lowestObserverState_!==tt.STALE_&&(e.lowestObserverState_=tt.STALE_,e.observers_.forEach((function(t){t.dependenciesState_===tt.POSSIBLY_STALE_?t.dependenciesState_=tt.STALE_:t.dependenciesState_===tt.UP_TO_DATE_&&(e.lowestObserverState_=tt.UP_TO_DATE_)})))}(this),_t.trackingContext=e}}else at(this)&&(this.warnAboutUntrackedRead_(),St(),this.value_=this.computeValue_(!1),kt());var t=this.value_;if(ot(t))throw t.cause;return t},t.set=function(e){if(this.setter_){this.isRunningSetter&&n(33,this.name_),this.isRunningSetter=!0;try{this.setter_.call(this.scope_,e)}finally{this.isRunningSetter=!1}}else n(34,this.name_)},t.trackAndCompute=function(){var e=this.value_,t=this.dependenciesState_===tt.NOT_TRACKING_,r=this.computeValue_(!0),n=t||ot(e)||ot(r)||!this.equals_(e,r);return n&&(this.value_=r),n},t.computeValue_=function(e){this.isComputing=!0;var t,r=Je(!1);if(e)t=ut(this,this.derivation,this.scope_);else if(!0===_t.disableErrorBoundaries)t=this.derivation.call(this.scope_);else try{t=this.derivation.call(this.scope_)}catch(e){t=new it(e)}return Xe(r),this.isComputing=!1,t},t.suspend_=function(){this.keepAlive_||(lt(this),this.value_=void 0)},t.observe_=function(e,t){var r=this,n=!0,i=void 0;return Jt((function(){var o=r.get();if(!n||t){var a=ft();e({observableKind:"computed",debugObjectName:r.name_,type:sn,object:r,newValue:o,oldValue:i}),pt(a)}n=!1,i=o}))},t.warnAboutUntrackedRead_=function(){},t.toString=function(){return this.name_+"["+this.derivation.toString()+"]"},t.valueOf=function(){return E(this.get())},t[Symbol.toPrimitive]=function(){return this.valueOf()},R(e,[{key:"isComputing",get:function(){return I(this.flags_,e.isComputingMask_)},set:function(t){this.flags_=V(this.flags_,e.isComputingMask_,t)}},{key:"isRunningSetter",get:function(){return I(this.flags_,e.isRunningSetterMask_)},set:function(t){this.flags_=V(this.flags_,e.isRunningSetterMask_,t)}},{key:"isBeingObserved",get:function(){return I(this.flags_,e.isBeingObservedMask_)},set:function(t){this.flags_=V(this.flags_,e.isBeingObservedMask_,t)}},{key:"isPendingUnobservation",get:function(){return I(this.flags_,e.isPendingUnobservationMask_)},set:function(t){this.flags_=V(this.flags_,e.isPendingUnobservationMask_,t)}},{key:"diffValue",get:function(){return I(this.flags_,e.diffValueMask_)?1:0},set:function(t){this.flags_=V(this.flags_,e.diffValueMask_,1===t)}}])}();et.isComputingMask_=1,et.isRunningSetterMask_=2,et.isBeingObservedMask_=4,et.isPendingUnobservationMask_=8,et.diffValueMask_=16;var tt,rt,nt=j("ComputedValue",et);!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_"}(tt||(tt={})),function(e){e[e.NONE=0]="NONE",e[e.LOG=1]="LOG",e[e.BREAK=2]="BREAK"}(rt||(rt={}));var it=function(e){this.cause=void 0,this.cause=e};function ot(e){return e instanceof it}function at(e){switch(e.dependenciesState_){case tt.UP_TO_DATE_:return!1;case tt.NOT_TRACKING_:case tt.STALE_:return!0;case tt.POSSIBLY_STALE_:for(var t=ht(!0),r=ft(),n=e.observing_,i=n.length,o=0;o<i;o++){var a=n[o];if(nt(a)){if(_t.disableErrorBoundaries)a.get();else try{a.get()}catch(e){return pt(r),dt(t),!0}if(e.dependenciesState_===tt.STALE_)return pt(r),dt(t),!0}}return bt(e),pt(r),dt(t),!1}}function st(){return null!==_t.trackingDerivation}function ut(e,t,r){var n=ht(!0);bt(e),e.newObserving_=new Array(0===e.runId_?100:e.observing_.length),e.unboundDepsCount_=0,e.runId_=++_t.runId;var i,o=_t.trackingDerivation;if(_t.trackingDerivation=e,_t.inBatch++,!0===_t.disableErrorBoundaries)i=t.call(r);else try{i=t.call(r)}catch(e){i=new it(e)}return _t.inBatch--,_t.trackingDerivation=o,function(e){for(var t=e.observing_,r=e.observing_=e.newObserving_,n=tt.UP_TO_DATE_,i=0,o=e.unboundDepsCount_,a=0;a<o;a++){var s=r[a];0===s.diffValue&&(s.diffValue=1,i!==a&&(r[i]=s),i++),s.dependenciesState_>n&&(n=s.dependenciesState_)}for(r.length=i,e.newObserving_=null,o=t.length;o--;){var u=t[o];0===u.diffValue&&jt(u,e),u.diffValue=0}for(;i--;){var l=r[i];1===l.diffValue&&(l.diffValue=0,Pt(l,e))}n!==tt.UP_TO_DATE_&&(e.dependenciesState_=n,e.onBecomeStale_())}(e),dt(n),i}function lt(e){var t=e.observing_;e.observing_=[];for(var r=t.length;r--;)jt(t[r],e);e.dependenciesState_=tt.NOT_TRACKING_}function ct(e){var t=ft();try{return e()}finally{pt(t)}}function ft(){var e=_t.trackingDerivation;return _t.trackingDerivation=null,e}function pt(e){_t.trackingDerivation=e}function ht(e){var t=_t.allowStateReads;return _t.allowStateReads=e,t}function dt(e){_t.allowStateReads=e}function bt(e){if(e.dependenciesState_!==tt.UP_TO_DATE_){e.dependenciesState_=tt.UP_TO_DATE_;for(var t=e.observing_,r=t.length;r--;)t[r].lowestObserverState_=tt.UP_TO_DATE_}}var vt=["mobxGuid","spyListeners","enforceActions","computedRequiresReaction","reactionRequiresObservable","observableRequiresReaction","allowStateReads","disableErrorBoundaries","runId","UNCHANGED","useProxies"],yt=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},gt=!0,mt=!1,_t=function(){var e=o();return e.__mobxInstanceCount>0&&!e.__mobxGlobals&&(gt=!1),e.__mobxGlobals&&e.__mobxGlobals.version!==(new yt).version&&(gt=!1),gt?e.__mobxGlobals?(e.__mobxInstanceCount+=1,e.__mobxGlobals.UNCHANGED||(e.__mobxGlobals.UNCHANGED={}),e.__mobxGlobals):(e.__mobxInstanceCount=1,e.__mobxGlobals=new yt):(setTimeout((function(){mt||n(35)}),1),new yt)}();function wt(){return _t}function Ot(){var e=new yt;for(var t in e)-1===vt.indexOf(t)&&(_t[t]=e[t]);_t.allowStateChanges=!_t.enforceActions}function Pt(e,t){e.observers_.add(t),e.lowestObserverState_>t.dependenciesState_&&(e.lowestObserverState_=t.dependenciesState_)}function jt(e,t){e.observers_.delete(t),0===e.observers_.size&&At(e)}function At(e){!1===e.isPendingUnobservation&&(e.isPendingUnobservation=!0,_t.pendingUnobservations.push(e))}function St(){_t.inBatch++}function kt(){if(0==--_t.inBatch){Nt();for(var e=_t.pendingUnobservations,t=0;t<e.length;t++){var r=e[t];r.isPendingUnobservation=!1,0===r.observers_.size&&(r.isBeingObserved&&(r.isBeingObserved=!1,r.onBUO()),r instanceof et&&r.suspend_())}_t.pendingUnobservations=[]}}function Tt(e){var t=_t.trackingDerivation;return null!==t?(t.runId_!==e.lastAccessedBy_&&(e.lastAccessedBy_=t.runId_,t.newObserving_[t.unboundDepsCount_++]=e,!e.isBeingObserved&&_t.trackingContext&&(e.isBeingObserved=!0,e.onBO())),e.isBeingObserved):(0===e.observers_.size&&_t.inBatch>0&&At(e),!1)}function Et(e){e.lowestObserverState_!==tt.STALE_&&(e.lowestObserverState_=tt.STALE_,e.observers_.forEach((function(e){e.dependenciesState_===tt.UP_TO_DATE_&&e.onBecomeStale_(),e.dependenciesState_=tt.STALE_})))}var xt=function(){function e(e,t,r,n){void 0===e&&(e="Reaction"),this.name_=void 0,this.onInvalidate_=void 0,this.errorHandler_=void 0,this.requiresObservable_=void 0,this.observing_=[],this.newObserving_=[],this.dependenciesState_=tt.NOT_TRACKING_,this.runId_=0,this.unboundDepsCount_=0,this.flags_=0,this.isTracing_=rt.NONE,this.name_=e,this.onInvalidate_=t,this.errorHandler_=r,this.requiresObservable_=n}var t=e.prototype;return t.onBecomeStale_=function(){this.schedule_()},t.schedule_=function(){this.isScheduled||(this.isScheduled=!0,_t.pendingReactions.push(this),Nt())},t.runReaction_=function(){if(!this.isDisposed){St(),this.isScheduled=!1;var e=_t.trackingContext;if(_t.trackingContext=this,at(this)){this.isTrackPending=!0;try{this.onInvalidate_()}catch(e){this.reportExceptionInDerivation_(e)}}_t.trackingContext=e,kt()}},t.track=function(e){if(!this.isDisposed){St(),this.isRunning=!0;var t=_t.trackingContext;_t.trackingContext=this;var r=ut(this,e,void 0);_t.trackingContext=t,this.isRunning=!1,this.isTrackPending=!1,this.isDisposed&&lt(this),ot(r)&&this.reportExceptionInDerivation_(r.cause),kt()}},t.reportExceptionInDerivation_=function(e){var t=this;if(this.errorHandler_)this.errorHandler_(e,this);else{if(_t.disableErrorBoundaries)throw e;var r="[mobx] uncaught error in '"+this+"'";_t.suppressReactionErrors||console.error(r,e),_t.globalReactionErrorHandlers.forEach((function(r){return r(e,t)}))}},t.dispose=function(){this.isDisposed||(this.isDisposed=!0,this.isRunning||(St(),lt(this),kt()))},t.getDisposer_=function(e){var t=this,r=function r(){t.dispose(),null==e||null==e.removeEventListener||e.removeEventListener("abort",r)};return null==e||null==e.addEventListener||e.addEventListener("abort",r),r[W]=this,r},t.toString=function(){return"Reaction["+this.name_+"]"},t.trace=function(e){void 0===e&&(e=!1)},R(e,[{key:"isDisposed",get:function(){return I(this.flags_,e.isDisposedMask_)},set:function(t){this.flags_=V(this.flags_,e.isDisposedMask_,t)}},{key:"isScheduled",get:function(){return I(this.flags_,e.isScheduledMask_)},set:function(t){this.flags_=V(this.flags_,e.isScheduledMask_,t)}},{key:"isTrackPending",get:function(){return I(this.flags_,e.isTrackPendingMask_)},set:function(t){this.flags_=V(this.flags_,e.isTrackPendingMask_,t)}},{key:"isRunning",get:function(){return I(this.flags_,e.isRunningMask_)},set:function(t){this.flags_=V(this.flags_,e.isRunningMask_,t)}},{key:"diffValue",get:function(){return I(this.flags_,e.diffValueMask_)?1:0},set:function(t){this.flags_=V(this.flags_,e.diffValueMask_,1===t)}}])}();function Ct(e){return _t.globalReactionErrorHandlers.push(e),function(){var t=_t.globalReactionErrorHandlers.indexOf(e);t>=0&&_t.globalReactionErrorHandlers.splice(t,1)}}xt.isDisposedMask_=1,xt.isScheduledMask_=2,xt.isTrackPendingMask_=4,xt.isRunningMask_=8,xt.diffValueMask_=16;var It=100,Vt=function(e){return e()};function Nt(){_t.inBatch>0||_t.isRunningReactions||Vt(Mt)}function Mt(){_t.isRunningReactions=!0;for(var e=_t.pendingReactions,t=0;e.length>0;){++t===It&&(console.error("[mobx] cycle in reaction: "+e[0]),e.splice(0));for(var r=e.splice(0),n=0,i=r.length;n<i;n++)r[n].runReaction_()}_t.isRunningReactions=!1}var Rt=j("Reaction",xt);function Dt(e){return console.warn("[mobx.spy] Is a no-op in production builds"),function(){}}var zt="action",Lt="autoAction",Bt="<unnamed action>",Ft=te(zt),Ht=te("action.bound",{bound:!0}),Ut=te(Lt,{autoAction:!0}),$t=te("autoAction.bound",{autoAction:!0,bound:!0});function Gt(e){return function(t,r){return y(t)?Ge(t.name||Bt,t,e):y(r)?Ge(t,r,e):G(r)?(e?Ut:Ft).decorate_20223_(t,r):g(r)?$(t,r,e?Ut:Ft):g(t)?U(te(e?Lt:zt,{name:t,autoAction:e})):void 0}}var Wt=Gt(!1);Object.assign(Wt,Ft);var Kt=Gt(!0);function qt(e){return We(e.name,!1,e,this,void 0)}function Yt(e){return y(e)&&!0===e.isMobxAction}function Jt(e,t){var r,n,i,o;void 0===t&&(t=f);var a,s=null!=(r=null==(n=t)?void 0:n.name)?r:"Autorun";if(t.scheduler||t.delay){var u=Zt(t),l=!1;a=new xt(s,(function(){l||(l=!0,u((function(){l=!1,a.isDisposed||a.track(c)})))}),t.onError,t.requiresObservable)}else a=new xt(s,(function(){this.track(c)}),t.onError,t.requiresObservable);function c(){e(a)}return null!=(i=t)&&null!=(i=i.signal)&&i.aborted||a.schedule_(),a.getDisposer_(null==(o=t)?void 0:o.signal)}Object.assign(Kt,Ut),Wt.bound=U(Ht),Kt.bound=U($t);var Xt=function(e){return e()};function Zt(e){return e.scheduler?e.scheduler:e.delay?function(t){return setTimeout(t,e.delay)}:Xt}function Qt(e,t,r){var n,i,o;void 0===r&&(r=f);var a,s,u,l=null!=(n=r.name)?n:"Reaction",c=Wt(l,r.onError?(a=r.onError,s=t,function(){try{return s.apply(this,arguments)}catch(e){a.call(this,e)}}):t),p=!r.scheduler&&!r.delay,h=Zt(r),d=!0,b=!1,v=r.compareStructural?J.structural:r.equals||J.default,y=new xt(l,(function(){d||p?g():b||(b=!0,h(g))}),r.onError,r.requiresObservable);function g(){if(b=!1,!y.isDisposed){var t=!1,n=u;y.track((function(){var r=Ye(!1,(function(){return e(y)}));t=d||!v(u,r),u=r})),(d&&r.fireImmediately||!d&&t)&&c(u,n,y),d=!1}}return null!=(i=r)&&null!=(i=i.signal)&&i.aborted||y.schedule_(),y.getDisposer_(null==(o=r)?void 0:o.signal)}var er="onBO",tr="onBUO";function rr(e,t,r){return ir(er,e,t,r)}function nr(e,t,r){return ir(tr,e,t,r)}function ir(e,t,r,n){var i="function"==typeof n?Gn(t,r):Gn(t),o=y(n)?n:r,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 or="never",ar="always",sr="observed";function ur(e){!0===e.isolateGlobalState&&function(){if((_t.pendingReactions.length||_t.inBatch||_t.isRunningReactions)&&n(36),mt=!0,gt){var e=o();0==--e.__mobxInstanceCount&&(e.__mobxGlobals=void 0),_t=new yt}}();var t,r,i=e.useProxies,a=e.enforceActions;if(void 0!==i&&(_t.useProxies=i===ar||i!==or&&"undefined"!=typeof Proxy),"ifavailable"===i&&(_t.verifyProxies=!0),void 0!==a){var s=a===ar?ar:a===sr;_t.enforceActions=s,_t.allowStateChanges=!0!==s&&s!==ar}["computedRequiresReaction","reactionRequiresObservable","observableRequiresReaction","disableErrorBoundaries","safeDescriptors"].forEach((function(t){t in e&&(_t[t]=!!e[t])})),_t.allowStateReads=!_t.observableRequiresReaction,e.reactionScheduler&&(t=e.reactionScheduler,r=Vt,Vt=function(e){return t((function(){return r(e)}))})}function lr(e,t,r,n){var i=C(t);return qn((function(){var t=En(e,n)[W];T(i).forEach((function(e){t.extend_(e,i[e],!r||!(e in r)||r[e])}))})),e}function cr(e,t){return fr(Gn(e,t))}function fr(e){var t,r={name:e.name_};return e.observing_&&e.observing_.length>0&&(r.dependencies=(t=e.observing_,Array.from(new Set(t))).map(fr)),r}function pr(e,t){return hr(Gn(e,t))}function hr(e){var t={name:e.name_};return function(e){return e.observers_&&e.observers_.size>0}(e)&&(t.observers=Array.from(function(e){return e.observers_}(e)).map(hr)),t}var dr=0;function br(){this.message="FLOW_CANCELLED"}function vr(e){return e instanceof br}br.prototype=Object.create(Error.prototype);var yr=ae("flow"),gr=ae("flow.bound",{bound:!0}),mr=Object.assign((function(e,t){if(G(t))return yr.decorate_20223_(e,t);if(g(t))return $(e,t,yr);var r=e,n=r.name||"<unnamed flow>",i=function(){var e,t=arguments,i=++dr,o=Wt(n+" - runid: "+i+" - init",r).apply(this,t),a=void 0,s=new Promise((function(t,r){var s=0;function u(e){var t;a=void 0;try{t=Wt(n+" - runid: "+i+" - yield "+s++,o.next).call(o,e)}catch(e){return r(e)}c(t)}function l(e){var t;a=void 0;try{t=Wt(n+" - runid: "+i+" - yield "+s++,o.throw).call(o,e)}catch(e){return r(e)}c(t)}function c(e){if(!y(null==e?void 0:e.then))return e.done?t(e.value):(a=Promise.resolve(e.value)).then(u,l);e.then(c,r)}e=r,u(void 0)}));return s.cancel=Wt(n+" - runid: "+i+" - cancel",(function(){try{a&&_r(a);var t=o.return(void 0),r=Promise.resolve(t.value);r.then(v,v),_r(r),e(new br)}catch(t){e(t)}})),s};return i.isMobXFlow=!0,i}),yr);function _r(e){y(e.cancel)&&e.cancel()}function wr(e){return e}function Or(e){return!0===(null==e?void 0:e.isMobXFlow)}function Pr(e,t,r){var n;return On(e)||yn(e)||Qe(e)?n=Wn(e):In(e)&&(n=Wn(e,t)),n.dehancer="function"==typeof t?t:r,function(){n.dehancer=void 0}}function jr(e,t,r){return y(r)?function(e,t,r){return Wn(e,t).intercept_(r)}(e,t,r):function(e,t){return Wn(e).intercept_(t)}(e,t)}function Ar(e,t){if(void 0===t)return nt(e);if(!1===In(e))return!1;if(!e[W].values_.has(t))return!1;var r=Gn(e,t);return nt(r)}function Sr(e){return Ar(e)}function kr(e,t){return Ar(e,t)}function Tr(e,t){return!!e&&(void 0!==t?!!In(e)&&e[W].values_.has(t):In(e)||!!e[W]||q(e)||Rt(e)||nt(e))}function Er(e){return Tr(e)}function xr(e,t){return Tr(e,t)}function Cr(e){return In(e)?e[W].keys_():On(e)||An(e)?Array.from(e.keys()):yn(e)?e.map((function(e,t){return t})):void n(5)}function Ir(e){return In(e)?Cr(e).map((function(t){return e[t]})):On(e)?Cr(e).map((function(t){return e.get(t)})):An(e)?Array.from(e.values()):yn(e)?e.slice():void n(6)}function Vr(e){return In(e)?Cr(e).map((function(t){return[t,e[t]]})):On(e)?Cr(e).map((function(t){return[t,e.get(t)]})):An(e)?Array.from(e.entries()):yn(e)?e.map((function(e,t){return[t,e]})):void n(7)}function Nr(e,t,r){if(2!==arguments.length||An(e))In(e)?e[W].set_(t,r):On(e)?e.set(t,r):An(e)?e.add(t):yn(e)?("number"!=typeof t&&(t=parseInt(t,10)),t<0&&n("Invalid index: '"+t+"'"),St(),t>=e.length&&(e.length=t+1),e[t]=r,kt()):n(8);else{St();var i=t;try{for(var o in i)Nr(e,o,i[o])}finally{kt()}}}function Mr(e,t){In(e)?e[W].delete_(t):On(e)||An(e)?e.delete(t):yn(e)?("number"!=typeof t&&(t=parseInt(t,10)),e.splice(t,1)):n(9)}function Rr(e,t){return In(e)?e[W].has_(t):On(e)||An(e)?e.has(t):yn(e)?t>=0&&t<e.length:void n(10)}function Dr(e,t){if(Rr(e,t))return In(e)?e[W].get_(t):On(e)?e.get(t):yn(e)?e[t]:void n(11)}function zr(e,t,r){if(In(e))return e[W].defineProperty_(t,r);n(39)}function Lr(e){if(In(e))return e[W].ownKeys_();n(38)}function Br(e,t,r,n){return y(r)?function(e,t,r,n){return Wn(e,t).observe_(r,n)}(e,t,r,n):function(e,t,r){return Wn(e).observe_(t,r)}(e,t,r)}function Fr(e,t,r){return e.set(t,r),r}function Hr(e,t){if(null==e||"object"!=typeof e||e instanceof Date||!Er(e))return e;if(Qe(e)||nt(e))return Hr(e.get(),t);if(t.has(e))return t.get(e);if(yn(e)){var r=Fr(t,e,new Array(e.length));return e.forEach((function(e,n){r[n]=Hr(e,t)})),r}if(An(e)){var n=Fr(t,e,new Set);return e.forEach((function(e){n.add(Hr(e,t))})),n}if(On(e)){var i=Fr(t,e,new Map);return e.forEach((function(e,r){i.set(r,Hr(e,t))})),i}var o=Fr(t,e,{});return Lr(e).forEach((function(r){l.propertyIsEnumerable.call(e,r)&&(o[r]=Hr(e[r],t))})),o}function Ur(e,t){return Hr(e,new Map)}function $r(){}function Gr(e,t){void 0===t&&(t=void 0),St();try{return e.apply(t)}finally{kt()}}function Wr(e,t,r){return 1===arguments.length||t&&"object"==typeof t?function(e,t){var r,n,i;if(null!=t&&null!=(r=t.signal)&&r.aborted)return Object.assign(Promise.reject(new Error("WHEN_ABORTED")),{cancel:function(){return null}});var o=new Promise((function(r,o){var a,s=Kr(e,r,z({},t,{onError:o}));n=function(){s(),o(new Error("WHEN_CANCELLED"))},i=function(){s(),o(new Error("WHEN_ABORTED"))},null==t||null==(a=t.signal)||null==a.addEventListener||a.addEventListener("abort",i)})).finally((function(){var e;return null==t||null==(e=t.signal)||null==e.removeEventListener?void 0:e.removeEventListener("abort",i)}));return o.cancel=n,o}(e,t):Kr(e,t,r||{})}function Kr(e,t,r){var n;if("number"==typeof r.timeout){var i=new Error("WHEN_TIMEOUT");n=setTimeout((function(){if(!a[W].isDisposed){if(a(),!r.onError)throw i;r.onError(i)}}),r.timeout)}r.name="When";var o=Ge("When-effect",t),a=Jt((function(t){Ye(!1,e)&&(t.dispose(),n&&clearTimeout(n),o())}),r);return a}function qr(e){return e[W]}mr.bound=U(gr);var Yr={has:function(e,t){return qr(e).has_(t)},get:function(e,t){return qr(e).get_(t)},set:function(e,t,r){var n;return!!g(t)&&(null==(n=qr(e).set_(t,r,!0))||n)},deleteProperty:function(e,t){var r;return!!g(t)&&(null==(r=qr(e).delete_(t,!0))||r)},defineProperty:function(e,t,r){var n;return null==(n=qr(e).defineProperty_(t,r))||n},ownKeys:function(e){return qr(e).ownKeys_()},preventExtensions:function(e){n(13)}};function Jr(e){return void 0!==e.interceptors_&&e.interceptors_.length>0}function Xr(e,t){var r=e.interceptors_||(e.interceptors_=[]);return r.push(t),b((function(){var e=r.indexOf(t);-1!==e&&r.splice(e,1)}))}function Zr(e,t){var r=ft();try{for(var i=[].concat(e.interceptors_||[]),o=0,a=i.length;o<a&&((t=i[o](t))&&!t.type&&n(14),t);o++);return t}finally{pt(r)}}function Qr(e){return void 0!==e.changeListeners_&&e.changeListeners_.length>0}function en(e,t){var r=e.changeListeners_||(e.changeListeners_=[]);return r.push(t),b((function(){var e=r.indexOf(t);-1!==e&&r.splice(e,1)}))}function tn(e,t){var r=ft(),n=e.changeListeners_;if(n){for(var i=0,o=(n=n.slice()).length;i<o;i++)n[i](t);pt(r)}}function rn(e,t,r){return qn((function(){var n=En(e,r)[W];null!=t||(t=function(e){return x(e,H)||O(e,H,z({},e[H])),e[H]}(e)),T(t).forEach((function(e){return n.make_(e,t[e])}))})),e}var nn=Symbol("mobx-keys");function on(e,t,r){return _(e)?lr(e,e,t,r):(qn((function(){var n=En(e,r)[W];if(!e[nn]){var i=Object.getPrototypeOf(e),o=new Set([].concat(T(e),T(i)));o.delete("constructor"),o.delete(W),O(i,nn,o)}e[nn].forEach((function(e){return n.make_(e,!t||!(e in t)||t[e])}))})),e)}var an="splice",sn="update",un={get:function(e,t){var r=e[W];return t===W?r:"length"===t?r.getArrayLength_():"string"!=typeof t||isNaN(t)?x(fn,t)?fn[t]:e[t]:r.get_(parseInt(t))},set:function(e,t,r){var n=e[W];return"length"===t&&n.setArrayLength_(r),"symbol"==typeof t||isNaN(t)?e[t]=r:n.set_(parseInt(t),r),!0},preventExtensions:function(){n(15)}},ln=function(){function e(e,t,r,n){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_=r,this.legacyMode_=n,this.atom_=new K(e),this.enhancer_=function(e,r){return t(e,r,"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 Xr(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}),en(this,e)},t.getArrayLength_=function(){return this.atom_.reportObserved(),this.values_.length},t.setArrayLength_=function(e){("number"!=typeof e||isNaN(e)||e<0)&&n("Out of range: "+e);var t=this.values_.length;if(e!==t)if(e>t){for(var r=new Array(e-t),i=0;i<e-t;i++)r[i]=void 0;this.spliceWithArray_(t,0,r)}else this.spliceWithArray_(e,t-e)},t.updateArrayLength_=function(e,t){e!==this.lastKnownLength_&&n(16),this.lastKnownLength_+=t,this.legacyMode_&&t>0&&Un(e+t+1)},t.spliceWithArray_=function(e,t,r){var n=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===r&&(r=c),Jr(this)){var o=Zr(this,{object:this.proxy_,type:an,index:e,removedCount:t,added:r});if(!o)return c;t=o.removedCount,r=o.added}if(r=0===r.length?r:r.map((function(e){return n.enhancer_(e,void 0)})),this.legacyMode_){var a=r.length-t;this.updateArrayLength_(i,a)}var s=this.spliceItemsIntoValues_(e,t,r);return 0===t&&0===r.length||this.notifyArraySplice_(e,r,s),this.dehanceValues_(s)},t.spliceItemsIntoValues_=function(e,t,r){var n;if(r.length<1e4)return(n=this.values_).splice.apply(n,[e,t].concat(r));var i=this.values_.slice(e,e+t),o=this.values_.slice(e+t);this.values_.length+=r.length-t;for(var a=0;a<r.length;a++)this.values_[e+a]=r[a];for(var s=0;s<o.length;s++)this.values_[e+r.length+s]=o[s];return i},t.notifyArrayChildUpdate_=function(e,t,r){var n=!this.owned_&&!1,i=Qr(this),o=i||n?{observableKind:"array",object:this.proxy_,type:sn,debugObjectName:this.atom_.name_,index:e,newValue:t,oldValue:r}:null;this.atom_.reportChanged(),i&&tn(this,o)},t.notifyArraySplice_=function(e,t,r){var n=!this.owned_&&!1,i=Qr(this),o=i||n?{observableKind:"array",object:this.proxy_,debugObjectName:this.atom_.name_,type:an,index:e,removed:r,added:t,removedCount:r.length,addedCount:t.length}:null;this.atom_.reportChanged(),i&&tn(this,o)},t.get_=function(e){if(!(this.legacyMode_&&e>=this.values_.length))return this.atom_.reportObserved(),this.dehanceValue_(this.values_[e]);console.warn("[mobx] Out of bounds read: "+e)},t.set_=function(e,t){var r=this.values_;if(this.legacyMode_&&e>r.length&&n(17,e,r.length),e<r.length){this.atom_;var i=r[e];if(Jr(this)){var o=Zr(this,{type:sn,object:this.proxy_,index:e,newValue:t});if(!o)return;t=o.newValue}(t=this.enhancer_(t,i))!==i&&(r[e]=t,this.notifyArrayChildUpdate_(e,t,i))}else{for(var a=new Array(e+1-r.length),s=0;s<a.length-1;s++)a[s]=void 0;a[a.length-1]=t,this.spliceWithArray_(r.length,0,a)}},e}();function cn(e,t,r,n){return void 0===r&&(r="ObservableArray"),void 0===n&&(n=!1),d(),qn((function(){var i=new ln(r,t,n,!1);P(i.values_,W,i);var o=new Proxy(i.values_,un);return i.proxy_=o,e&&e.length&&i.spliceWithArray_(0,0,e),o}))}var fn={clear:function(){return this.splice(0)},replace:function(e){var t=this[W];return t.spliceWithArray_(0,t.values_.length,e)},toJSON:function(){return this.slice()},splice:function(e,t){for(var r=arguments.length,n=new Array(r>2?r-2:0),i=2;i<r;i++)n[i-2]=arguments[i];var o=this[W];switch(arguments.length){case 0:return[];case 1:return o.spliceWithArray_(e);case 2:return o.spliceWithArray_(e,t)}return o.spliceWithArray_(e,t,n)},spliceWithArray:function(e,t,r){return this[W].spliceWithArray_(e,t,r)},push:function(){for(var e=this[W],t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return e.spliceWithArray_(e.values_.length,0,r),e.values_.length},pop:function(){return this.splice(Math.max(this[W].values_.length-1,0),1)[0]},shift:function(){return this.splice(0,1)[0]},unshift:function(){for(var e=this[W],t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return e.spliceWithArray_(0,0,r),e.values_.length},reverse:function(){return _t.trackingDerivation&&n(37,"reverse"),this.replace(this.slice().reverse()),this},sort:function(){_t.trackingDerivation&&n(37,"sort");var e=this.slice();return e.sort.apply(e,arguments),this.replace(e),this},remove:function(e){var t=this[W],r=t.dehanceValues_(t.values_).indexOf(e);return r>-1&&(this.splice(r,1),!0)}};function pn(e,t){"function"==typeof Array.prototype[e]&&(fn[e]=t(e))}function hn(e){return function(){var t=this[W];t.atom_.reportObserved();var r=t.dehanceValues_(t.values_);return r[e].apply(r,arguments)}}function dn(e){return function(t,r){var n=this,i=this[W];return i.atom_.reportObserved(),i.dehanceValues_(i.values_)[e]((function(e,i){return t.call(r,e,i,n)}))}}function bn(e){return function(){var t=this,r=this[W];r.atom_.reportObserved();var n=r.dehanceValues_(r.values_),i=arguments[0];return arguments[0]=function(e,r,n){return i(e,r,n,t)},n[e].apply(n,arguments)}}pn("at",hn),pn("concat",hn),pn("flat",hn),pn("includes",hn),pn("indexOf",hn),pn("join",hn),pn("lastIndexOf",hn),pn("slice",hn),pn("toString",hn),pn("toLocaleString",hn),pn("toSorted",hn),pn("toSpliced",hn),pn("with",hn),pn("every",dn),pn("filter",dn),pn("find",dn),pn("findIndex",dn),pn("findLast",dn),pn("findLastIndex",dn),pn("flatMap",dn),pn("forEach",dn),pn("map",dn),pn("some",dn),pn("toReversed",dn),pn("reduce",bn),pn("reduceRight",bn);var vn=j("ObservableArrayAdministration",ln);function yn(e){return m(e)&&vn(e[W])}var gn={},mn="add",_n="delete",wn=function(){function e(e,t,r){var i=this;void 0===t&&(t=X),void 0===r&&(r="ObservableMap"),this.enhancer_=void 0,this.name_=void 0,this[W]=gn,this.data_=void 0,this.hasMap_=void 0,this.keysAtom_=void 0,this.interceptors_=void 0,this.changeListeners_=void 0,this.dehancer=void 0,this.enhancer_=t,this.name_=r,y(Map)||n(18),qn((function(){i.keysAtom_=Y("ObservableMap.keys()"),i.data_=new Map,i.hasMap_=new Map,e&&i.merge(e)}))}var t=e.prototype;return t.has_=function(e){return this.data_.has(e)},t.has=function(e){var t=this;if(!_t.trackingDerivation)return this.has_(e);var r=this.hasMap_.get(e);if(!r){var n=r=new Ze(this.has_(e),Z,"ObservableMap.key?",!1);this.hasMap_.set(e,n),nr(n,(function(){return t.hasMap_.delete(e)}))}return r.get()},t.set=function(e,t){var r=this.has_(e);if(Jr(this)){var n=Zr(this,{type:r?sn:mn,object:this,newValue:t,name:e});if(!n)return this;t=n.newValue}return r?this.updateValue_(e,t):this.addValue_(e,t),this},t.delete=function(e){var t=this;if(this.keysAtom_,Jr(this)&&!Zr(this,{type:_n,object:this,name:e}))return!1;if(this.has_(e)){var r=Qr(this),n=r?{observableKind:"map",debugObjectName:this.name_,type:_n,object:this,oldValue:this.data_.get(e).value_,name:e}:null;return Gr((function(){var r;t.keysAtom_.reportChanged(),null==(r=t.hasMap_.get(e))||r.setNewValue_(!1),t.data_.get(e).setNewValue_(void 0),t.data_.delete(e)})),r&&tn(this,n),!0}return!1},t.updateValue_=function(e,t){var r=this.data_.get(e);if((t=r.prepareNewValue_(t))!==_t.UNCHANGED){var n=Qr(this),i=n?{observableKind:"map",debugObjectName:this.name_,type:sn,object:this,oldValue:r.value_,name:e,newValue:t}:null;r.setNewValue_(t),n&&tn(this,i)}},t.addValue_=function(e,t){var r=this;this.keysAtom_,Gr((function(){var n,i=new Ze(t,r.enhancer_,"ObservableMap.key",!1);r.data_.set(e,i),t=i.value_,null==(n=r.hasMap_.get(e))||n.setNewValue_(!0),r.keysAtom_.reportChanged()}));var n=Qr(this),i=n?{observableKind:"map",debugObjectName:this.name_,type:mn,object:this,name:e,newValue:t}:null;n&&tn(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 Qn({next:function(){var r=t.next(),n=r.done,i=r.value;return{done:n,value:n?void 0:e.get(i)}}})},t.entries=function(){var e=this,t=this.keys();return Qn({next:function(){var r=t.next(),n=r.done,i=r.value;return{done:n,value:n?void 0:[i,e.get(i)]}}})},t[Symbol.iterator]=function(){return this.entries()},t.forEach=function(e,t){for(var r,n=D(this);!(r=n()).done;){var i=r.value,o=i[0],a=i[1];e.call(t,a,o,this)}},t.merge=function(e){var t=this;return On(e)&&(e=new Map(e)),Gr((function(){var r,i,o;_(e)?function(e){var t=Object.keys(e);if(!k)return t;var r=Object.getOwnPropertySymbols(e);return r.length?[].concat(t,r.filter((function(t){return l.propertyIsEnumerable.call(e,t)}))):t}(e).forEach((function(r){return t.set(r,e[r])})):Array.isArray(e)?e.forEach((function(e){var r=e[0],n=e[1];return t.set(r,n)})):A(e)?(r=e,i=Object.getPrototypeOf(r),o=Object.getPrototypeOf(i),null!==Object.getPrototypeOf(o)&&n(19,e),e.forEach((function(e,r){return t.set(r,e)}))):null!=e&&n(20,e)})),this},t.clear=function(){var e=this;Gr((function(){ct((function(){for(var t,r=D(e.keys());!(t=r()).done;){var n=t.value;e.delete(n)}}))}))},t.replace=function(e){var t=this;return Gr((function(){for(var r,i=function(e){if(A(e)||On(e))return e;if(Array.isArray(e))return new Map(e);if(_(e)){var t=new Map;for(var r in e)t.set(r,e[r]);return t}return n(21,e)}(e),o=new Map,a=!1,s=D(t.data_.keys());!(r=s()).done;){var u=r.value;if(!i.has(u))if(t.delete(u))a=!0;else{var l=t.data_.get(u);o.set(u,l)}}for(var c,f=D(i.entries());!(c=f()).done;){var p=c.value,h=p[0],d=p[1],b=t.data_.has(h);if(t.set(h,d),t.data_.has(h)){var v=t.data_.get(h);o.set(h,v),b||(a=!0)}}if(!a)if(t.data_.size!==o.size)t.keysAtom_.reportChanged();else for(var y=t.data_.keys(),g=o.keys(),m=y.next(),w=g.next();!m.done;){if(m.value!==w.value){t.keysAtom_.reportChanged();break}m=y.next(),w=g.next()}t.data_=o})),this},t.toString=function(){return"[object ObservableMap]"},t.toJSON=function(){return Array.from(this)},t.observe_=function(e,t){return en(this,e)},t.intercept_=function(e){return Xr(this,e)},R(e,[{key:"size",get:function(){return this.keysAtom_.reportObserved(),this.data_.size}},{key:Symbol.toStringTag,get:function(){return"Map"}}])}(),On=j("ObservableMap",wn),Pn={},jn=function(){function e(e,t,r){var i=this;void 0===t&&(t=X),void 0===r&&(r="ObservableSet"),this.name_=void 0,this[W]=Pn,this.data_=new Set,this.atom_=void 0,this.changeListeners_=void 0,this.interceptors_=void 0,this.dehancer=void 0,this.enhancer_=void 0,this.name_=r,y(Set)||n(22),this.enhancer_=function(e,n){return t(e,n,r)},qn((function(){i.atom_=Y(i.name_),e&&i.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;Gr((function(){ct((function(){for(var t,r=D(e.data_.values());!(t=r()).done;){var n=t.value;e.delete(n)}}))}))},t.forEach=function(e,t){for(var r,n=D(this);!(r=n()).done;){var i=r.value;e.call(t,i,i,this)}},t.add=function(e){var t=this;if(this.atom_,Jr(this)&&!Zr(this,{type:mn,object:this,newValue:e}))return this;if(!this.has(e)){Gr((function(){t.data_.add(t.enhancer_(e,void 0)),t.atom_.reportChanged()}));var r=Qr(this),n=r?{observableKind:"set",debugObjectName:this.name_,type:mn,object:this,newValue:e}:null;r&&tn(this,n)}return this},t.delete=function(e){var t=this;if(Jr(this)&&!Zr(this,{type:_n,object:this,oldValue:e}))return!1;if(this.has(e)){var r=Qr(this),n=r?{observableKind:"set",debugObjectName:this.name_,type:_n,object:this,oldValue:e}:null;return Gr((function(){t.atom_.reportChanged(),t.data_.delete(e)})),r&&tn(this,n),!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()),r=Array.from(this.values());return Qn({next:function(){var n=e;return e+=1,n<r.length?{value:[t[n],r[n]],done:!1}:{done:!0}}})},t.keys=function(){return this.values()},t.values=function(){this.atom_.reportObserved();var e=this,t=0,r=Array.from(this.data_.values());return Qn({next:function(){return t<r.length?{value:e.dehanceValue_(r[t++]),done:!1}:{done:!0}}})},t.intersection=function(e){return S(e)&&!An(e)?e.intersection(this):new Set(this).intersection(e)},t.union=function(e){return S(e)&&!An(e)?e.union(this):new Set(this).union(e)},t.difference=function(e){return new Set(this).difference(e)},t.symmetricDifference=function(e){return S(e)&&!An(e)?e.symmetricDifference(this):new Set(this).symmetricDifference(e)},t.isSubsetOf=function(e){return new Set(this).isSubsetOf(e)},t.isSupersetOf=function(e){return new Set(this).isSupersetOf(e)},t.isDisjointFrom=function(e){return S(e)&&!An(e)?e.isDisjointFrom(this):new Set(this).isDisjointFrom(e)},t.replace=function(e){var t=this;return An(e)&&(e=new Set(e)),Gr((function(){Array.isArray(e)||S(e)?(t.clear(),e.forEach((function(e){return t.add(e)}))):null!=e&&n("Cannot initialize set from "+e)})),this},t.observe_=function(e,t){return en(this,e)},t.intercept_=function(e){return Xr(this,e)},t.toJSON=function(){return Array.from(this)},t.toString=function(){return"[object ObservableSet]"},t[Symbol.iterator]=function(){return this.values()},R(e,[{key:"size",get:function(){return this.atom_.reportObserved(),this.data_.size}},{key:Symbol.toStringTag,get:function(){return"Set"}}])}(),An=j("ObservableSet",jn),Sn=Object.create(null),kn="remove",Tn=function(){function e(e,t,r,n){void 0===t&&(t=new Map),void 0===n&&(n=_e),this.target_=void 0,this.values_=void 0,this.name_=void 0,this.defaultAnnotation_=void 0,this.keysAtom_=void 0,this.changeListeners_=void 0,this.interceptors_=void 0,this.proxy_=void 0,this.isPlainObject_=void 0,this.appliedAnnotations_=void 0,this.pendingKeys_=void 0,this.target_=e,this.values_=t,this.name_=r,this.defaultAnnotation_=n,this.keysAtom_=new K("ObservableObject.keys"),this.isPlainObject_=_(this.target_)}var t=e.prototype;return t.getObservablePropValue_=function(e){return this.values_.get(e).get()},t.setObservablePropValue_=function(e,t){var r=this.values_.get(e);if(r instanceof et)return r.set(t),!0;if(Jr(this)){var n=Zr(this,{type:sn,object:this.proxy_||this.target_,name:e,newValue:t});if(!n)return null;t=n.newValue}if((t=r.prepareNewValue_(t))!==_t.UNCHANGED){var i=Qr(this),o=i?{type:sn,observableKind:"object",debugObjectName:this.name_,object:this.proxy_||this.target_,oldValue:r.value_,name:e,newValue:t}:null;r.setNewValue_(t),i&&tn(this,o)}return!0},t.get_=function(e){return _t.trackingDerivation&&!x(this.target_,e)&&this.has_(e),this.target_[e]},t.set_=function(e,t,r){return void 0===r&&(r=!1),x(this.target_,e)?this.values_.has(e)?this.setObservablePropValue_(e,t):r?Reflect.set(this.target_,e,t):(this.target_[e]=t,!0):this.extend_(e,{value:t,enumerable:!0,writable:!0,configurable:!0},this.defaultAnnotation_,r)},t.has_=function(e){if(!_t.trackingDerivation)return e in this.target_;this.pendingKeys_||(this.pendingKeys_=new Map);var t=this.pendingKeys_.get(e);return t||(t=new Ze(e in this.target_,Z,"ObservableObject.key?",!1),this.pendingKeys_.set(e,t)),t.get()},t.make_=function(e,t){if(!0===t&&(t=this.defaultAnnotation_),!1!==t){if(!(e in this.target_)){var r;if(null!=(r=this.target_[H])&&r[e])return;n(1,t.annotationType_,this.name_+"."+e.toString())}for(var i=this.target_;i&&i!==l;){var o=s(i,e);if(o){var a=t.make_(this,e,o,i);if(0===a)return;if(1===a)break}i=Object.getPrototypeOf(i)}Vn(this,0,e)}},t.extend_=function(e,t,r,n){if(void 0===n&&(n=!1),!0===r&&(r=this.defaultAnnotation_),!1===r)return this.defineProperty_(e,t,n);var i=r.extend_(this,e,t,n);return i&&Vn(this,0,e),i},t.defineProperty_=function(e,t,r){void 0===r&&(r=!1),this.keysAtom_;try{St();var n=this.delete_(e);if(!n)return n;if(Jr(this)){var i=Zr(this,{object:this.proxy_||this.target_,name:e,type:mn,newValue:t.value});if(!i)return null;var o=i.newValue;t.value!==o&&(t=z({},t,{value:o}))}if(r){if(!Reflect.defineProperty(this.target_,e,t))return!1}else u(this.target_,e,t);this.notifyPropertyAddition_(e,t.value)}finally{kt()}return!0},t.defineObservableProperty_=function(e,t,r,n){void 0===n&&(n=!1),this.keysAtom_;try{St();var i=this.delete_(e);if(!i)return i;if(Jr(this)){var o=Zr(this,{object:this.proxy_||this.target_,name:e,type:mn,newValue:t});if(!o)return null;t=o.newValue}var a=Cn(e),s={configurable:!_t.safeDescriptors||this.isPlainObject_,enumerable:!0,get:a.get,set:a.set};if(n){if(!Reflect.defineProperty(this.target_,e,s))return!1}else u(this.target_,e,s);var l=new Ze(t,r,"ObservableObject.key",!1);this.values_.set(e,l),this.notifyPropertyAddition_(e,l.value_)}finally{kt()}return!0},t.defineComputedProperty_=function(e,t,r){void 0===r&&(r=!1),this.keysAtom_;try{St();var n=this.delete_(e);if(!n)return n;if(Jr(this)&&!Zr(this,{object:this.proxy_||this.target_,name:e,type:mn,newValue:void 0}))return null;t.name||(t.name="ObservableObject.key"),t.context=this.proxy_||this.target_;var i=Cn(e),o={configurable:!_t.safeDescriptors||this.isPlainObject_,enumerable:!1,get:i.get,set:i.set};if(r){if(!Reflect.defineProperty(this.target_,e,o))return!1}else u(this.target_,e,o);this.values_.set(e,new et(t)),this.notifyPropertyAddition_(e,void 0)}finally{kt()}return!0},t.delete_=function(e,t){if(void 0===t&&(t=!1),this.keysAtom_,!x(this.target_,e))return!0;if(Jr(this)&&!Zr(this,{object:this.proxy_||this.target_,name:e,type:kn}))return null;try{var r;St();var n,i=Qr(this),o=this.values_.get(e),a=void 0;if(!o&&i&&(a=null==(n=s(this.target_,e))?void 0:n.value),t){if(!Reflect.deleteProperty(this.target_,e))return!1}else delete this.target_[e];if(o&&(this.values_.delete(e),o instanceof Ze&&(a=o.value_),Et(o)),this.keysAtom_.reportChanged(),null==(r=this.pendingKeys_)||null==(r=r.get(e))||r.set(e in this.target_),i){var u={type:kn,observableKind:"object",object:this.proxy_||this.target_,debugObjectName:this.name_,oldValue:a,name:e};i&&tn(this,u)}}finally{kt()}return!0},t.observe_=function(e,t){return en(this,e)},t.intercept_=function(e){return Xr(this,e)},t.notifyPropertyAddition_=function(e,t){var r,n=Qr(this);if(n){var i=n?{type:mn,observableKind:"object",debugObjectName:this.name_,object:this.proxy_||this.target_,name:e,newValue:t}:null;n&&tn(this,i)}null==(r=this.pendingKeys_)||null==(r=r.get(e))||r.set(!0),this.keysAtom_.reportChanged()},t.ownKeys_=function(){return this.keysAtom_.reportObserved(),T(this.target_)},t.keys_=function(){return this.keysAtom_.reportObserved(),Object.keys(this.target_)},e}();function En(e,t){var r;if(x(e,W))return e;var n=null!=(r=null==t?void 0:t.name)?r:"ObservableObject",i=new Tn(e,new Map,String(n),function(e){var t;return e?null!=(t=e.defaultDecorator)?t:we(e):void 0}(t));return O(e,W,i),e}var xn=j("ObservableObjectAdministration",Tn);function Cn(e){return Sn[e]||(Sn[e]={get:function(){return this[W].getObservablePropValue_(e)},set:function(t){return this[W].setObservablePropValue_(e,t)}})}function In(e){return!!m(e)&&xn(e[W])}function Vn(e,t,r){var n;null==(n=e.target_[H])||delete n[r]}var Nn,Mn,Rn=Fn(0),Dn=function(){var e=!1,t={};return Object.defineProperty(t,"0",{set:function(){e=!0}}),Object.create(t)[0]=1,!1===e}(),zn=0,Ln=function(){};Nn=Ln,Mn=Array.prototype,Object.setPrototypeOf?Object.setPrototypeOf(Nn.prototype,Mn):void 0!==Nn.prototype.__proto__?Nn.prototype.__proto__=Mn:Nn.prototype=Mn;var Bn=function(e){function t(t,r,n,i){var o;return void 0===n&&(n="ObservableArray"),void 0===i&&(i=!1),o=e.call(this)||this,qn((function(){var e=new ln(n,r,i,!0);e.proxy_=o,P(o,W,e),t&&t.length&&o.spliceWithArray(0,0,t),Dn&&Object.defineProperty(o,"0",Rn)})),o}L(t,e);var r=t.prototype;return r.concat=function(){this[W].atom_.reportObserved();for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return Array.prototype.concat.apply(this.slice(),t.map((function(e){return yn(e)?e.slice():e})))},r[Symbol.iterator]=function(){var e=this,t=0;return Qn({next:function(){return t<e.length?{value:e[t++],done:!1}:{done:!0,value:void 0}}})},R(t,[{key:"length",get:function(){return this[W].getArrayLength_()},set:function(e){this[W].setArrayLength_(e)}},{key:Symbol.toStringTag,get:function(){return"Array"}}])}(Ln);function Fn(e){return{enumerable:!1,configurable:!0,get:function(){return this[W].get_(e)},set:function(t){this[W].set_(e,t)}}}function Hn(e){u(Bn.prototype,""+e,Fn(e))}function Un(e){if(e>zn){for(var t=zn;t<e+100;t++)Hn(t);zn=e}}function $n(e,t,r){return new Bn(e,t,r)}function Gn(e,t){if("object"==typeof e&&null!==e){if(yn(e))return void 0!==t&&n(23),e[W].atom_;if(An(e))return e.atom_;if(On(e)){if(void 0===t)return e.keysAtom_;var r=e.data_.get(t)||e.hasMap_.get(t);return r||n(25,t,Kn(e)),r}if(In(e)){if(!t)return n(26);var i=e[W].values_.get(t);return i||n(27,t,Kn(e)),i}if(q(e)||nt(e)||Rt(e))return e}else if(y(e)&&Rt(e[W]))return e[W];n(28)}function Wn(e,t){return e||n(29),void 0!==t?Wn(Gn(e,t)):q(e)||nt(e)||Rt(e)||On(e)||An(e)?e:e[W]?e[W]:void n(24,e)}function Kn(e,t){var r;if(void 0!==t)r=Gn(e,t);else{if(Yt(e))return e.name;r=In(e)||On(e)||An(e)?Wn(e):Gn(e)}return r.name_}function qn(e){var t=ft(),r=Je(!0);St();try{return e()}finally{kt(),Xe(r),pt(t)}}Object.entries(fn).forEach((function(e){var t=e[0],r=e[1];"concat"!==t&&O(Bn.prototype,t,r)})),Un(1e3);var Yn=l.toString;function Jn(e,t,r){return void 0===r&&(r=-1),Xn(e,t,r)}function Xn(e,t,r,n,i){if(e===t)return 0!==e||1/e==1/t;if(null==e||null==t)return!1;if(e!=e)return t!=t;var o=typeof e;if("function"!==o&&"object"!==o&&"object"!=typeof t)return!1;var a=Yn.call(e);if(a!==Yn.call(t))return!1;switch(a){case"[object RegExp]":case"[object String]":return""+e==""+t;case"[object Number]":return+e!=+e?+t!=+t:0==+e?1/+e==1/t:+e==+t;case"[object Date]":case"[object Boolean]":return+e==+t;case"[object Symbol]":return"undefined"!=typeof Symbol&&Symbol.valueOf.call(e)===Symbol.valueOf.call(t);case"[object Map]":case"[object Set]":r>=0&&r++}e=Zn(e),t=Zn(t);var s="[object Array]"===a;if(!s){if("object"!=typeof e||"object"!=typeof t)return!1;var u=e.constructor,l=t.constructor;if(u!==l&&!(y(u)&&u instanceof u&&y(l)&&l instanceof l)&&"constructor"in e&&"constructor"in t)return!1}if(0===r)return!1;r<0&&(r=-1),i=i||[];for(var c=(n=n||[]).length;c--;)if(n[c]===e)return i[c]===t;if(n.push(e),i.push(t),s){if((c=e.length)!==t.length)return!1;for(;c--;)if(!Xn(e[c],t[c],r-1,n,i))return!1}else{var f,p=Object.keys(e);if(c=p.length,Object.keys(t).length!==c)return!1;for(;c--;)if(!x(t,f=p[c])||!Xn(e[f],t[f],r-1,n,i))return!1}return n.pop(),i.pop(),!0}function Zn(e){return yn(e)?e.slice():A(e)||On(e)||S(e)||An(e)?Array.from(e.entries()):e}function Qn(e){return e[Symbol.iterator]=ei,e}function ei(){return this}["Symbol","Map","Set"].forEach((function(e){void 0===o()[e]&&n("MobX requires global '"+e+"' to be available or polyfilled")})),"object"==typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__&&__MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobx({spy:Dt,extras:{getDebugName:Kn},$mobx:W})},83504:(e,t,r)=>{r.d(t,{Q:()=>o});var n=r(7552);function i(){return{replace(e){window.history.replaceState(e.state,"",e.search||"?")},push(e){window.history.pushState(e.state,"",e.search||"?")},get location(){return window.location}}}const o=({children:e})=>{const[t]=(0,n.useState)(i);return e(t)}},430:(e,t,r)=>{r.d(t,{QueryParamProvider:()=>w,StringParam:()=>n,useQueryParam:()=>S});const n={encode:function(e){return null==e?e:String(e)},decode:function(e){const t=function(e,t){if(null==e)return e;if(0===e.length&&(!t||t&&""!==e))return null;const r=e instanceof Array?e[0]:e;return null==r||t||""!==r?r:null}(e,!0);return null==t?t:String(t)}};'{}[],":'.split("").map((e=>[e,encodeURIComponent(e)]));var i=r(7552);const o=new class{constructor(){this.paramsMap=new Map,this.registeredParams=new Map}set(e,t,r,n){this.paramsMap.set(e,{stringified:t,decoded:r,decode:n})}has(e,t,r){if(!this.paramsMap.has(e))return!1;const n=this.paramsMap.get(e);return!!n&&n.stringified===t&&(null==r||n.decode===r)}get(e){var t;if(this.paramsMap.has(e))return null==(t=this.paramsMap.get(e))?void 0:t.decoded}registerParams(e){for(const t of e){const e=this.registeredParams.get(t)||0;this.registeredParams.set(t,e+1)}}unregisterParams(e){for(const t of e){const e=(this.registeredParams.get(t)||0)-1;e<=0?(this.registeredParams.delete(t),this.paramsMap.has(t)&&this.paramsMap.delete(t)):this.registeredParams.set(t,e)}}clear(){this.paramsMap.clear(),this.registeredParams.clear()}};function a(e,t,r,n){var i;if(!r||!t.length)return e;let o={...e},a=!1;for(const e of t)Object.prototype.hasOwnProperty.call(o,e)||(o[e]=null!=(i=r[e])?i:n,a=!0);return a?o:e}const s=Object.prototype.hasOwnProperty;function u(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!=e&&t!=t}function l(e,t,r){var n,i;if(u(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;const o=Object.keys(e),a=Object.keys(t);if(o.length!==a.length)return!1;for(let a=0;a<o.length;a++){const l=null!=(i=null==(n=null==r?void 0:r[o[a]])?void 0:n.equals)?i:u;if(!s.call(t,o[a])||!l(e[o[a]],t[o[a]]))return!1}return!0}function c(e,t,r){const n={},i=Object.keys(t);for(const o of i){const i=t[o],a=e[o];let s;if(r.has(o,a,i.decode))s=r.get(o);else{if(s=i.decode(a),i.equals&&r.has(o,a)){const e=r.get(o);i.equals(s,e)&&(s=e)}void 0!==s&&r.set(o,a,s,i.decode)}void 0===s&&void 0!==i.default&&(s=i.default),n[o]=s}return n}function f(){let e;return function(t,r,n){const i=c(t,r,n);return null!=e&&l(e,i)?e:(e=i,i)}}let p,h,d,b={};const v=(e,t,r)=>{if(p===t&&d===e&&h===r)return b;p=t,d=e;const n=e(null!=t?t:"");h=r;const i=function(e){if(e)return Object.fromEntries(e.split("\n").map((e=>e.split("\0"))))}(r);for(let[e,t]of Object.entries(n)){(null==i?void 0:i[e])&&(delete n[e],e=i[e],n[e]=t);const r=b[e];l(t,r)&&(n[e]=r)}return b=n,n};function y(e,t){null==t&&(t={});const r={...e,...t};return t.params&&e.params&&(r.params={...e.params,...t.params}),r}const g={adapter:{},options:{searchStringToObject:function(e){const t=new URLSearchParams(e),r={};for(let[e,n]of t)Object.prototype.hasOwnProperty.call(r,e)?Array.isArray(r[e])?r[e].push(n):r[e]=[r[e],n]:r[e]=n;return r},objectToSearchString:function(e){const t=new URLSearchParams,r=Object.entries(e);for(const[e,n]of r)if(null!=n)if(Array.isArray(n))for(const r of n)t.append(e,null!=r?r:"");else t.append(e,n);return t.toString()},updateType:"pushIn",includeKnownParams:void 0,includeAllParams:!1,removeDefaultsFromUrl:!1,enableBatching:!1,skipUpdateWhenNoChange:!0}},m=i.createContext(g);function _({children:e,adapter:t,options:r}){const{adapter:n,options:o}=i.useContext(m),a=i.useMemo((()=>({adapter:null!=t?t:n,options:y(o,r)})),[t,r,n,o]);return i.createElement(m.Provider,{value:a},e)}function w({children:e,adapter:t,options:r}){const n=t;return n?i.createElement(n,null,(t=>i.createElement(_,{adapter:t,options:r},e))):i.createElement(_,{options:r},e)}function O({changes:e,updateType:t,currentSearchString:r,paramConfigMap:n,options:i}){const{searchStringToObject:s,objectToSearchString:u}=i;let l;null==t&&(t=i.updateType);const f=v(s,r),p=a(n,Object.keys(e),i.params);let h,d;return h="function"==typeof e?e(c(f,p,o)):e,l=function(e,t){const r={},n=Object.keys(t);for(const i of n){const n=t[i];e[i]?r[i]=e[i].encode(t[i]):r[i]=null==n?n:String(n)}return r}(p,h),i.removeDefaultsFromUrl&&function(e,t){var r;for(const n in e)void 0!==(null==(r=t[n])?void 0:r.default)&&void 0!==e[n]&&t[n].encode(t[n].default)===e[n]&&(e[n]=void 0)}(l,p),l=function(e,t){var r;let n={};for(const i in e)null!=(null==(r=t[i])?void 0:r.urlName)?n[t[i].urlName]=e[i]:n[i]=e[i];return n}(l,p),d=u("push"===t||"replace"===t?l:{...f,...l}),(null==d?void 0:d.length)&&"?"!==d[0]&&(d=`?${d}`),null!=d?d:""}const P=e=>e(),j=e=>setTimeout((()=>e()),0),A=[];const S=(e,t,r)=>{const s=(0,i.useMemo)((()=>({[e]:null!=t?t:"inherit"})),[e,t]),[u,l]=function(e,t){const{adapter:r,options:s}=function(){const e=i.useContext(m);if(void 0===e||e===g)throw new Error("useQueryParams must be used within a QueryParamProvider");return e}(),[u]=(0,i.useState)(f),{paramConfigMap:l,options:c}=function(e,t){let r,n;return void 0===e?(r={},n=t):Array.isArray(e)?(r=Object.fromEntries(e.map((e=>[e,"inherit"]))),n=t):(r=e,n=t),{paramConfigMap:r,options:n}}(e,t),p=(0,i.useMemo)((()=>y(s,c)),[s,c]);let h=function(e,t){var r,i,o;const a={};let s=!1;const u=Object.keys(e);let l=u;if(t.includeKnownParams||!1!==t.includeKnownParams&&0===u.length){const e=Object.keys(null!=(r=t.params)?r:{});l.push(...e)}for(const r of l){const u=e[r];null==u||"object"!=typeof u?(s=!0,a[r]=null!=(o=null==(i=t.params)?void 0:i[r])?o:n):a[r]=u}return s?a:e}(l,p);const d=v(p.searchStringToObject,r.location.search,function(e){let t;for(const r in e)if(e[r].urlName){const n=`${e[r].urlName}\0${r}`;t?t.push(n):t=[n]}return t?t.join("\n"):void 0}(h));p.includeAllParams&&(h=a(h,Object.keys(d),p.params,n));const b=u(d,h,o),_=Object.keys(h).join("\0");(0,i.useEffect)((()=>{const e=_.split("\0");return o.registerParams(e),()=>{o.unregisterParams(e)}}),[_]);const w={adapter:r,paramConfigMap:h,options:p},S=(0,i.useRef)(w);null==S.current&&(S.current=w),(0,i.useEffect)((()=>{S.current.adapter=r,S.current.paramConfigMap=h,S.current.options=p}),[r,h,p]);const[k]=(0,i.useState)((()=>(e,t)=>{const{adapter:r,paramConfigMap:n,options:i}=S.current;null==t&&(t=i.updateType),function(e,{immediate:t}={}){A.push(e);let r=t?P:j;1===A.length&&r((()=>{const t=A.slice();A.length=0;const r=t[0].currentSearchString;let n;for(let e=0;e<t.length;++e)n=O(0===e?t[e]:{...t[e],currentSearchString:n});e.options.skipUpdateWhenNoChange&&n===r||function({searchString:e,adapter:t,navigate:r,updateType:n}){const i={...t.location,search:e};r&&("string"==typeof n&&n.startsWith("replace")?t.replace(i):t.push(i))}({searchString:null!=n?n:"",adapter:t[t.length-1].adapter,navigate:!0,updateType:t[t.length-1].updateType})}))}({changes:e,updateType:t,currentSearchString:r.location.search,paramConfigMap:n,options:i,adapter:r},{immediate:!i.enableBatching})}));return[b,k]}(s,r);return[u[e],(0,i.useCallback)(((t,r)=>l("function"==typeof t?r=>{const n=t(r[e]);return{[e]:n}}:{[e]:t},r)),[e,l])]}}}]);
+//# sourceMappingURL=8007.3025c802.chunk.js.map
\ No newline at end of file