@promptctl/cc-candybar 1.166.2 → 1.166.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.mjs +2 -2
  2. package/package.json +5 -5
package/dist/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{createRequire as e}from"node:module";import t from"node:process";import{URL as n,URLSearchParams as r,fileURLToPath as i}from"node:url";import{json as a}from"node:stream/consumers";import o,{basename as s,dirname as c,isAbsolute as l,join as u,sep as d}from"node:path";import f,{closeSync as p,constants as m,existsSync as h,fstatSync as g,linkSync as _,openSync as v,readFileSync as y,readSync as b,rmSync as ee,statSync as x,writeFileSync as S}from"node:fs";import te,{createHash as ne,createHmac as re,randomBytes as ie,randomUUID as ae,timingSafeEqual as oe}from"node:crypto";import C,{homedir as w}from"node:os";import{spawn as se,spawnSync as T}from"node:child_process";import{inspect as ce,parseArgs as le,types as ue}from"node:util";import de from"node:net";import fe from"node:v8";import{open as pe,readFile as me,readdir as he,stat as ge}from"node:fs/promises";import{clearInterval as _e,setImmediate as ve,setInterval as ye}from"node:timers";import{get as be}from"node:https";import{setTimeout as xe}from"node:timers/promises";import{WriteStream as Se}from"node:tty";import{createInterface as Ce}from"node:readline";var we=Object.create,Te=Object.defineProperty,Ee=Object.getOwnPropertyDescriptor,De=Object.getOwnPropertyNames,Oe=Object.getPrototypeOf,ke=Object.prototype.hasOwnProperty,Ae=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),je=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=De(t),a=0,o=i.length,s;a<o;a++)s=i[a],!ke.call(e,s)&&s!==n&&Te(e,s,{get:(e=>t[e]).bind(null,s),enumerable:!(r=Ee(t,s))||r.enumerable});return e},Me=(e,t,n)=>(n=e==null?{}:we(Oe(e)),je(t||!e||!e.__esModule?Te(n,`default`,{value:e,enumerable:!0}):n,e));const Ne=()=>!!process.env.CC_CANDYBAR_DEBUG;function Pe(e){return Ne()?`[DEBUG] ${e()}\n`:``}function E(e,...t){Ne()&&console.error(`[DEBUG] ${e}`,...t)}function Fe(e){let t=null;return([n,r])=>{r!==t&&(t=r,e(n,r))}}const Ie=(e,t)=>E(t),Le=/^[A-Za-z0-9_./,:@%+-][A-Za-z0-9_./,:@%+=-]*$/;function Re(e){return`'${e.replaceAll(`'`,`'\\''`)}'`}function ze(e){return Le.test(e)?e:Re(e)}function Be(e){return`${e.dir===void 0?``:`cd ${ze(e.dir)} && `}${e.env.map(([e,t])=>`${e}=${ze(t)} `).join(``)}${[e.program,...e.args].map(ze).join(` `)}`}const Ve=`cc-extra`;function He(e){return o.join(o.dirname(e),Ve,`src`,`bun-attach.js`)}function Ue(e){return o.join(o.dirname(e),`bun-graph.js`)}const We=`attach-preload.cjs`;function Ge(e){return o.join(o.dirname(e),We)}function Ke(e,t){return Be({...t,env:[...t.env,[`BUN_OPTIONS`,`--preload ${e.replace(/[\\\s]/g,`\\$&`)}`]]})}const qe=e=>!e.startsWith(`.`)&&!e.endsWith(`~`);function Je(e,t){return t.isSymbolicLink()?Buffer.from(f.readlinkSync(e)):f.readFileSync(e)}function Ye(e,t,n=qe){return f.readdirSync(t).filter(n).sort().flatMap(n=>{let r=o.join(t,n),i=f.lstatSync(r,{throwIfNoEntry:!1});return i===void 0?[]:i.isDirectory()?Ye(e,r):[[o.relative(e,r).split(o.sep).join(`/`),Je(r,i)]]})}function Xe(e){let t=te.createHash(`sha256`);for(let[n,r]of e)t.update(n).update(`\0`).update(r).update(`\0`);return t.digest(`hex`)}function Ze(e){return Xe(Ye(e,e))}const Qe=[`Cargo.toml`,`Cargo.lock`,`src`];function $e(e){return Xe(Ye(e,e,e=>Qe.includes(e)))}const et=e=>e.slice(0,7),tt=`1.166.2`;function nt(e){let t=o.dirname(o.dirname(e));return f.existsSync(o.join(t,`src`))?t:null}function rt(){let e=it();if(e===null)throw Error("this bundle carries no source digest (build via `pnpm build`, which stamps it)");return{version:tt,digest:e}}function it(){return`1917d3f8636cbdcb674a8e6c3034aee5e0667c694e01c56197d70ec24d6aca9e`}function at(e){let t=JSON.parse(f.readFileSync(o.join(e,`package.json`),`utf8`)),n=typeof t==`object`&&t?t.version:void 0;if(typeof n!=`string`)throw Error(`${o.join(e,`package.json`)} has no version string`);return n}function ot(e,t){try{let n=nt(i(e));if(n===null)return{kind:`not-source-checkout`};let r=t(),a=Ze(o.join(n,`src`));return a===r.digest?{kind:`current`,root:n,stamp:r}:{kind:`stale`,root:n,source:{version:at(n),digest:a},running:r}}catch(e){return{kind:`unchecked`,reason:e.message}}}function st(e,t){return ue.isNativeError(e)?e.code===`ENOENT`&&t!==void 0&&!h(t)?`working directory does not exist: ${t}`:e.message:String(e)}const ct={"click.pbcopy":1e3,"click.open":1e3,"doctor.tmux":1e3,"doctor.font":1e3,"doctor.process":1e3,"claude-input.type":1e3},lt=new Map;function ut(e){let t=ct[e];if(t===void 0)return{allowed:!0};let n=lt.get(e);if(n===void 0)return{allowed:!0};let r=Date.now()-n;return r>=t?{allowed:!0}:{allowed:!1,minIntervalMs:t,sinceLastMs:r}}function dt(e){lt.set(e,Date.now())}function ft(e){return e.env??process.env}function pt(e,t,n){return{ok:!1,reason:`rate-limited`,stdout:``,stderr:``,exitCode:null,signal:null,error:`rate-limited: ${e} min interval ${t}ms, last start ${n}ms ago`}}let D=null;function mt(e){D=e}let ht=()=>St().forEach(e=>process.emitWarning(e.message));function gt(e){ht=e}const _t=`\$1 == "+" { live[\$2] = 1; next } \$1 == "-" { delete live[\$2]; next } END { for (g in live) groups = groups " -" g; if (groups != "") system("kill -TERM" groups " 2>/dev/null; sleep ${250/1e3}; kill -KILL" groups " 2>/dev/null") }`,O=new Set;let vt=null,yt=null;function bt(e){e!==yt&&(yt=e,ht(e))}function xt(e,t){vt?.process===e&&(vt=null,bt(t))}function St(){return yt===null?[]:[{kind:`lifeline`,message:`programs launched now would outlive their launcher if it died: its launch lifeline ${yt}, and the next launch starts another`}]}function Ct(){D?.onStart(`lifeline`);let e=Date.now(),t;try{t=se(`awk`,[_t],{stdio:[`pipe`,`ignore`,`ignore`],detached:!0})}catch(t){return D?.onEnd(`lifeline`,Date.now()-e),bt(`did not start: ${st(t,void 0)}`),null}D?.onEnd(`lifeline`,Date.now()-e);let n=t.stdin;t.once(`spawn`,()=>{vt?.process===t&&bt(null)}),t.once(`error`,e=>xt(t,`failed: ${e.message}`)),t.once(`exit`,(e,n)=>xt(t,`exited ${n??e}`)),n.on(`error`,e=>xt(t,`pipe failed: ${e.message}`)),t.unref(),n.unref();for(let e of O)n.write(`+ ${e}\n`);return{process:t,pipe:n}}function wt(e){O.add(e),vt??=Ct(),vt?.pipe.write(`+ ${e}\n`)}function Tt(e){O.delete(e),vt?.pipe.write(`- ${e}\n`)}function Et(e,t){try{process.kill(-e,t)}catch(e){if(e.code!==`ESRCH`)throw e}}async function Dt(e){if(e.signal?.aborted)return{ok:!1,reason:`aborted`,stdout:``,stderr:``,exitCode:null,signal:null};let t=ut(e.category);if(!t.allowed)return pt(e.category,t.minIntervalMs,t.sinceLastMs);dt(e.category);let n=Date.now();return D?.onStart(e.category),new Promise(t=>{let r;try{r=se(e.bin,e.args??[],{cwd:e.cwd,env:ft(e),stdio:[`pipe`,`pipe`,`pipe`],detached:!0})}catch(r){D?.onEnd(e.category,Date.now()-n),t({ok:!1,reason:`spawn-error`,stdout:``,stderr:``,exitCode:null,signal:null,error:st(r,e.cwd)});return}let i=r.pid;i!==void 0&&wt(i);let a=``,o=``,s=!1,c=null,l=null,u=null,d=()=>h(`aborted`),f=t=>{s||(s=!0,c&&clearTimeout(c),l&&clearTimeout(l),e.signal?.removeEventListener(`abort`,d),i!==void 0&&Tt(i),D?.onEnd(e.category,Date.now()-n),t())},p=e=>f(()=>t(e)),m=(e,t)=>{try{Et(e,t)}catch(e){p({ok:!1,reason:`signal-refused`,stdout:a,stderr:o,exitCode:null,signal:null,error:e instanceof Error?e.message:String(e)})}},h=t=>{u=t,c&&clearTimeout(c),e.signal?.removeEventListener(`abort`,d);let n=r.pid;n!==void 0&&(l=setTimeout(()=>m(n,`SIGKILL`),250),m(n,`SIGTERM`))};r.stdout?.on(`data`,e=>{a+=e.toString(`utf8`)}),r.stderr?.on(`data`,e=>{o+=e.toString(`utf8`)}),r.on(`error`,t=>{p({ok:!1,reason:`spawn-error`,stdout:a,stderr:o,exitCode:null,signal:null,error:st(t,e.cwd)})}),r.on(`close`,(e,t)=>{if(u!==null){p({ok:!1,reason:u,stdout:a,stderr:o,exitCode:e,signal:t});return}if(e===0){p({ok:!0,stdout:a,stderr:o,exitCode:e});return}p({ok:!1,reason:t?`signal`:`non-zero`,stdout:a,stderr:o,exitCode:e,signal:t})}),e.timeoutMs&&e.timeoutMs>0&&(c=setTimeout(()=>h(`timeout`),e.timeoutMs)),e.signal?.addEventListener(`abort`,d,{once:!0}),e.stdinInput!==void 0&&r.stdin?r.stdin.end(e.stdinInput):r.stdin&&r.stdin.end()})}function Ot(e){let t=ut(e.category);if(!t.allowed)return pt(e.category,t.minIntervalMs,t.sinceLastMs);dt(e.category);let n=Date.now();D?.onStart(e.category);let r=[`pipe`,`pipe`,`pipe`];try{let t=T(e.bin,e.args??[],{cwd:e.cwd,env:ft(e),input:e.stdinInput,timeout:e.timeoutMs&&e.timeoutMs>0?e.timeoutMs:void 0,stdio:r,encoding:`utf8`});D?.onEnd(e.category,Date.now()-n);let i=typeof t.stdout==`string`?t.stdout:``,a=typeof t.stderr==`string`?t.stderr:``;if(t.error)return{ok:!1,reason:t.error.code===`ETIMEDOUT`?`timeout`:`spawn-error`,stdout:i,stderr:a,exitCode:null,signal:t.signal??null,error:st(t.error,e.cwd)};if(t.status===0)return{ok:!0,stdout:i,stderr:a,exitCode:t.status};let o=e.timeoutMs!==void 0&&e.timeoutMs>0;return{ok:!1,reason:t.signal?o&&t.signal===`SIGTERM`?`timeout`:`signal`:`non-zero`,stdout:i,stderr:a,exitCode:t.status,signal:t.signal??null}}catch(t){return D?.onEnd(e.category,Date.now()-n),{ok:!1,reason:`spawn-error`,stdout:``,stderr:``,exitCode:null,signal:null,error:st(t,e.cwd)}}}function kt(e){let t=ut(e.category);if(!t.allowed)return pt(e.category,t.minIntervalMs,t.sinceLastMs);dt(e.category);let n=Date.now();D?.onStart(e.category);let r=At(e);return D?.onEnd(e.category,Date.now()-n),r}function At(e){let t;try{t=se(e.bin,e.args??[],{cwd:e.cwd,env:ft(e),detached:!0,stdio:`ignore`})}catch(t){return{ok:!1,reason:`spawn-error`,stdout:``,stderr:``,exitCode:null,signal:null,error:st(t,e.cwd)}}return t.once(`error`,()=>{}),t.pid===void 0?{ok:!1,reason:`spawn-error`,stdout:``,stderr:``,exitCode:null,signal:null,error:`spawn(${e.bin}): no pid (binary not found or unexecutable)`}:(t.unref(),{ok:!0,stdout:``,stderr:``,exitCode:null})}const jt=e=>e.kind===`exit`?`exit ${e.code}`:`timeout`;function Mt(e,t){dt(e.category);let n=Date.now();D?.onStart(e.category);let r;try{r=se(`/bin/sh`,[`-c`,`out=$1 err=$2 status=$3; shift 3; read go || exit 0; "$@" >"$out" 2>"$err" </dev/null; echo "exit $?" >"$status.$$" && ln "$status.$$" "$status"; rm -f "$status.$$"`,`sh`,t.stdout,t.stderr,t.status,e.bin,...e.args??[]],{cwd:e.cwd,env:ft(e),detached:!0,stdio:[`pipe`,`ignore`,`ignore`]})}catch(t){return D?.onEnd(e.category,Date.now()-n),{ok:!1,error:st(t,e.cwd)}}D?.onEnd(e.category,Date.now()-n),r.once(`error`,()=>{});let i=r.pid,a=r.stdin;return a.on(`error`,()=>{}),i===void 0?(a.destroy(),{ok:!1,error:`spawn(/bin/sh): no pid (shell not found or unexecutable)`}):(r.unref(),a.unref(),{ok:!0,pid:i,release:()=>a.end(`go
2
+ import{createRequire as e}from"node:module";import t from"node:process";import{URL as n,URLSearchParams as r,fileURLToPath as i}from"node:url";import{json as a}from"node:stream/consumers";import o,{basename as s,dirname as c,isAbsolute as l,join as u,sep as d}from"node:path";import f,{closeSync as p,constants as m,existsSync as h,fstatSync as g,linkSync as _,openSync as v,readFileSync as y,readSync as b,rmSync as ee,statSync as x,writeFileSync as S}from"node:fs";import te,{createHash as ne,createHmac as re,randomBytes as ie,randomUUID as ae,timingSafeEqual as oe}from"node:crypto";import C,{homedir as w}from"node:os";import{spawn as se,spawnSync as T}from"node:child_process";import{inspect as ce,parseArgs as le,types as ue}from"node:util";import de from"node:net";import fe from"node:v8";import{open as pe,readFile as me,readdir as he,stat as ge}from"node:fs/promises";import{clearInterval as _e,setImmediate as ve,setInterval as ye}from"node:timers";import{get as be}from"node:https";import{setTimeout as xe}from"node:timers/promises";import{WriteStream as Se}from"node:tty";import{createInterface as Ce}from"node:readline";var we=Object.create,Te=Object.defineProperty,Ee=Object.getOwnPropertyDescriptor,De=Object.getOwnPropertyNames,Oe=Object.getPrototypeOf,ke=Object.prototype.hasOwnProperty,Ae=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),je=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=De(t),a=0,o=i.length,s;a<o;a++)s=i[a],!ke.call(e,s)&&s!==n&&Te(e,s,{get:(e=>t[e]).bind(null,s),enumerable:!(r=Ee(t,s))||r.enumerable});return e},Me=(e,t,n)=>(n=e==null?{}:we(Oe(e)),je(t||!e||!e.__esModule?Te(n,`default`,{value:e,enumerable:!0}):n,e));const Ne=()=>!!process.env.CC_CANDYBAR_DEBUG;function Pe(e){return Ne()?`[DEBUG] ${e()}\n`:``}function E(e,...t){Ne()&&console.error(`[DEBUG] ${e}`,...t)}function Fe(e){let t=null;return([n,r])=>{r!==t&&(t=r,e(n,r))}}const Ie=(e,t)=>E(t),Le=/^[A-Za-z0-9_./,:@%+-][A-Za-z0-9_./,:@%+=-]*$/;function Re(e){return`'${e.replaceAll(`'`,`'\\''`)}'`}function ze(e){return Le.test(e)?e:Re(e)}function Be(e){return`${e.dir===void 0?``:`cd ${ze(e.dir)} && `}${e.env.map(([e,t])=>`${e}=${ze(t)} `).join(``)}${[e.program,...e.args].map(ze).join(` `)}`}const Ve=`cc-extra`;function He(e){return o.join(o.dirname(e),Ve,`src`,`bun-attach.js`)}function Ue(e){return o.join(o.dirname(e),`bun-graph.js`)}const We=`attach-preload.cjs`;function Ge(e){return o.join(o.dirname(e),We)}function Ke(e,t){return Be({...t,env:[...t.env,[`BUN_OPTIONS`,`--preload ${e.replace(/[\\\s]/g,`\\$&`)}`]]})}const qe=e=>!e.startsWith(`.`)&&!e.endsWith(`~`);function Je(e,t){return t.isSymbolicLink()?Buffer.from(f.readlinkSync(e)):f.readFileSync(e)}function Ye(e,t,n=qe){return f.readdirSync(t).filter(n).sort().flatMap(n=>{let r=o.join(t,n),i=f.lstatSync(r,{throwIfNoEntry:!1});return i===void 0?[]:i.isDirectory()?Ye(e,r):[[o.relative(e,r).split(o.sep).join(`/`),Je(r,i)]]})}function Xe(e){let t=te.createHash(`sha256`);for(let[n,r]of e)t.update(n).update(`\0`).update(r).update(`\0`);return t.digest(`hex`)}function Ze(e){return Xe(Ye(e,e))}const Qe=[`Cargo.toml`,`Cargo.lock`,`src`];function $e(e){return Xe(Ye(e,e,e=>Qe.includes(e)))}const et=e=>e.slice(0,7),tt=`1.166.3`;function nt(e){let t=o.dirname(o.dirname(e));return f.existsSync(o.join(t,`src`))?t:null}function rt(){let e=it();if(e===null)throw Error("this bundle carries no source digest (build via `pnpm build`, which stamps it)");return{version:tt,digest:e}}function it(){return`fcae2f91a6735129a70585d7f69f850af93354edce65929a86e5714c067237a8`}function at(e){let t=JSON.parse(f.readFileSync(o.join(e,`package.json`),`utf8`)),n=typeof t==`object`&&t?t.version:void 0;if(typeof n!=`string`)throw Error(`${o.join(e,`package.json`)} has no version string`);return n}function ot(e,t){try{let n=nt(i(e));if(n===null)return{kind:`not-source-checkout`};let r=t(),a=Ze(o.join(n,`src`));return a===r.digest?{kind:`current`,root:n,stamp:r}:{kind:`stale`,root:n,source:{version:at(n),digest:a},running:r}}catch(e){return{kind:`unchecked`,reason:e.message}}}function st(e,t){return ue.isNativeError(e)?e.code===`ENOENT`&&t!==void 0&&!h(t)?`working directory does not exist: ${t}`:e.message:String(e)}const ct={"click.pbcopy":1e3,"click.open":1e3,"doctor.tmux":1e3,"doctor.font":1e3,"doctor.process":1e3,"claude-input.type":1e3},lt=new Map;function ut(e){let t=ct[e];if(t===void 0)return{allowed:!0};let n=lt.get(e);if(n===void 0)return{allowed:!0};let r=Date.now()-n;return r>=t?{allowed:!0}:{allowed:!1,minIntervalMs:t,sinceLastMs:r}}function dt(e){lt.set(e,Date.now())}function ft(e){return e.env??process.env}function pt(e,t,n){return{ok:!1,reason:`rate-limited`,stdout:``,stderr:``,exitCode:null,signal:null,error:`rate-limited: ${e} min interval ${t}ms, last start ${n}ms ago`}}let D=null;function mt(e){D=e}let ht=()=>St().forEach(e=>process.emitWarning(e.message));function gt(e){ht=e}const _t=`\$1 == "+" { live[\$2] = 1; next } \$1 == "-" { delete live[\$2]; next } END { for (g in live) groups = groups " -" g; if (groups != "") system("kill -TERM" groups " 2>/dev/null; sleep ${250/1e3}; kill -KILL" groups " 2>/dev/null") }`,O=new Set;let vt=null,yt=null;function bt(e){e!==yt&&(yt=e,ht(e))}function xt(e,t){vt?.process===e&&(vt=null,bt(t))}function St(){return yt===null?[]:[{kind:`lifeline`,message:`programs launched now would outlive their launcher if it died: its launch lifeline ${yt}, and the next launch starts another`}]}function Ct(){D?.onStart(`lifeline`);let e=Date.now(),t;try{t=se(`awk`,[_t],{stdio:[`pipe`,`ignore`,`ignore`],detached:!0})}catch(t){return D?.onEnd(`lifeline`,Date.now()-e),bt(`did not start: ${st(t,void 0)}`),null}D?.onEnd(`lifeline`,Date.now()-e);let n=t.stdin;t.once(`spawn`,()=>{vt?.process===t&&bt(null)}),t.once(`error`,e=>xt(t,`failed: ${e.message}`)),t.once(`exit`,(e,n)=>xt(t,`exited ${n??e}`)),n.on(`error`,e=>xt(t,`pipe failed: ${e.message}`)),t.unref(),n.unref();for(let e of O)n.write(`+ ${e}\n`);return{process:t,pipe:n}}function wt(e){O.add(e),vt??=Ct(),vt?.pipe.write(`+ ${e}\n`)}function Tt(e){O.delete(e),vt?.pipe.write(`- ${e}\n`)}function Et(e,t){try{process.kill(-e,t)}catch(e){if(e.code!==`ESRCH`)throw e}}async function Dt(e){if(e.signal?.aborted)return{ok:!1,reason:`aborted`,stdout:``,stderr:``,exitCode:null,signal:null};let t=ut(e.category);if(!t.allowed)return pt(e.category,t.minIntervalMs,t.sinceLastMs);dt(e.category);let n=Date.now();return D?.onStart(e.category),new Promise(t=>{let r;try{r=se(e.bin,e.args??[],{cwd:e.cwd,env:ft(e),stdio:[`pipe`,`pipe`,`pipe`],detached:!0})}catch(r){D?.onEnd(e.category,Date.now()-n),t({ok:!1,reason:`spawn-error`,stdout:``,stderr:``,exitCode:null,signal:null,error:st(r,e.cwd)});return}let i=r.pid;i!==void 0&&wt(i);let a=``,o=``,s=!1,c=null,l=null,u=null,d=()=>h(`aborted`),f=t=>{s||(s=!0,c&&clearTimeout(c),l&&clearTimeout(l),e.signal?.removeEventListener(`abort`,d),i!==void 0&&Tt(i),D?.onEnd(e.category,Date.now()-n),t())},p=e=>f(()=>t(e)),m=(e,t)=>{try{Et(e,t)}catch(e){p({ok:!1,reason:`signal-refused`,stdout:a,stderr:o,exitCode:null,signal:null,error:e instanceof Error?e.message:String(e)})}},h=t=>{u=t,c&&clearTimeout(c),e.signal?.removeEventListener(`abort`,d);let n=r.pid;n!==void 0&&(l=setTimeout(()=>m(n,`SIGKILL`),250),m(n,`SIGTERM`))};r.stdout?.on(`data`,e=>{a+=e.toString(`utf8`)}),r.stderr?.on(`data`,e=>{o+=e.toString(`utf8`)}),r.on(`error`,t=>{p({ok:!1,reason:`spawn-error`,stdout:a,stderr:o,exitCode:null,signal:null,error:st(t,e.cwd)})}),r.on(`close`,(e,t)=>{if(u!==null){p({ok:!1,reason:u,stdout:a,stderr:o,exitCode:e,signal:t});return}if(e===0){p({ok:!0,stdout:a,stderr:o,exitCode:e});return}p({ok:!1,reason:t?`signal`:`non-zero`,stdout:a,stderr:o,exitCode:e,signal:t})}),e.timeoutMs&&e.timeoutMs>0&&(c=setTimeout(()=>h(`timeout`),e.timeoutMs)),e.signal?.addEventListener(`abort`,d,{once:!0}),e.stdinInput!==void 0&&r.stdin?r.stdin.end(e.stdinInput):r.stdin&&r.stdin.end()})}function Ot(e){let t=ut(e.category);if(!t.allowed)return pt(e.category,t.minIntervalMs,t.sinceLastMs);dt(e.category);let n=Date.now();D?.onStart(e.category);let r=[`pipe`,`pipe`,`pipe`];try{let t=T(e.bin,e.args??[],{cwd:e.cwd,env:ft(e),input:e.stdinInput,timeout:e.timeoutMs&&e.timeoutMs>0?e.timeoutMs:void 0,stdio:r,encoding:`utf8`});D?.onEnd(e.category,Date.now()-n);let i=typeof t.stdout==`string`?t.stdout:``,a=typeof t.stderr==`string`?t.stderr:``;if(t.error)return{ok:!1,reason:t.error.code===`ETIMEDOUT`?`timeout`:`spawn-error`,stdout:i,stderr:a,exitCode:null,signal:t.signal??null,error:st(t.error,e.cwd)};if(t.status===0)return{ok:!0,stdout:i,stderr:a,exitCode:t.status};let o=e.timeoutMs!==void 0&&e.timeoutMs>0;return{ok:!1,reason:t.signal?o&&t.signal===`SIGTERM`?`timeout`:`signal`:`non-zero`,stdout:i,stderr:a,exitCode:t.status,signal:t.signal??null}}catch(t){return D?.onEnd(e.category,Date.now()-n),{ok:!1,reason:`spawn-error`,stdout:``,stderr:``,exitCode:null,signal:null,error:st(t,e.cwd)}}}function kt(e){let t=ut(e.category);if(!t.allowed)return pt(e.category,t.minIntervalMs,t.sinceLastMs);dt(e.category);let n=Date.now();D?.onStart(e.category);let r=At(e);return D?.onEnd(e.category,Date.now()-n),r}function At(e){let t;try{t=se(e.bin,e.args??[],{cwd:e.cwd,env:ft(e),detached:!0,stdio:`ignore`})}catch(t){return{ok:!1,reason:`spawn-error`,stdout:``,stderr:``,exitCode:null,signal:null,error:st(t,e.cwd)}}return t.once(`error`,()=>{}),t.pid===void 0?{ok:!1,reason:`spawn-error`,stdout:``,stderr:``,exitCode:null,signal:null,error:`spawn(${e.bin}): no pid (binary not found or unexecutable)`}:(t.unref(),{ok:!0,stdout:``,stderr:``,exitCode:null})}const jt=e=>e.kind===`exit`?`exit ${e.code}`:`timeout`;function Mt(e,t){dt(e.category);let n=Date.now();D?.onStart(e.category);let r;try{r=se(`/bin/sh`,[`-c`,`out=$1 err=$2 status=$3; shift 3; read go || exit 0; "$@" >"$out" 2>"$err" </dev/null; echo "exit $?" >"$status.$$" && ln "$status.$$" "$status"; rm -f "$status.$$"`,`sh`,t.stdout,t.stderr,t.status,e.bin,...e.args??[]],{cwd:e.cwd,env:ft(e),detached:!0,stdio:[`pipe`,`ignore`,`ignore`]})}catch(t){return D?.onEnd(e.category,Date.now()-n),{ok:!1,error:st(t,e.cwd)}}D?.onEnd(e.category,Date.now()-n),r.once(`error`,()=>{});let i=r.pid,a=r.stdin;return a.on(`error`,()=>{}),i===void 0?(a.destroy(),{ok:!1,error:`spawn(/bin/sh): no pid (shell not found or unexecutable)`}):(r.unref(),a.unref(),{ok:!0,pid:i,release:()=>a.end(`go
3
3
  `),withdraw:()=>a.end()})}function Nt(e){let t;try{t=y(e,`utf8`).trim()}catch(e){if(e.code===`ENOENT`)return null;throw e}let n=/^exit (\d+)$/.exec(t);if(n)return{kind:`exit`,code:Number(n[1])};if(t===`timeout`)return{kind:`timeout`};throw Error(`${e}: not a job verdict: ${JSON.stringify(t)}`)}function Pt(e){try{return process.kill(-e,0),!0}catch(e){let t=e.code;if(t===`ESRCH`||t===`EPERM`)return!1;throw e}}function Ft(e,t,n){let r=`${t}.${process.pid}`;try{S(r,`${jt(n)}\n`)}catch(e){if(e.code===`ENOENT`)return!1;throw e}let i=!0;try{_(r,t)}catch(e){if(e.code!==`EEXIST`)throw e;i=!1}finally{ee(r,{force:!0})}return Et(e,`SIGTERM`),setTimeout(()=>Et(e,`SIGKILL`),250).unref(),i}function It(e,t,n){let r=Lt(e);f.mkdirSync(o.dirname(r),{recursive:!0});let i=`${r}.tmp`,a=n??f.statSync(r,{throwIfNoEntry:!1})?.mode;try{f.writeFileSync(i,t,a===void 0?{}:{mode:a}),f.renameSync(i,r)}catch(e){throw f.rmSync(i,{force:!0}),e}}function Lt(e){return Rt(e).at(-1)}function Rt(e){let{hops:t,stopped:n}=zt(e);if(n!==null)throw n;return t}function zt(e){let t=[e];try{for(let e=0;e<Vt;e++){let e=Bt(t[t.length-1]);if(e===null)return{hops:t,stopped:null};t.push(e)}return{hops:t,stopped:Error(`${e}: more than ${Vt} symbolic links`)}}catch(e){return{hops:t,stopped:e}}}function Bt(e){try{return f.lstatSync(e).isSymbolicLink()?o.resolve(f.realpathSync(o.dirname(e)),f.readlinkSync(e)):null}catch(e){let{code:t}=e;if(t===`ENOENT`||t===`ENOTDIR`)return null;throw e}}const Vt=40;function Ht(e,t){let n=e[t];return n&&n.length>0?n:void 0}function Ut(e=process.env){let t=Ht(e,`XDG_STATE_HOME`)??o.join(C.homedir(),`.local`,`state`);return o.join(t,`cc-candybar`)}function Wt(){let e=Ht(process.env,`XDG_CACHE_HOME`)??o.join(C.homedir(),`.cache`);return o.join(e,`cc-candybar`)}function Gt(){return Ut()}function k(){return process.env.CC_CANDYBAR_SOCKET||Kt()}function Kt(){let e=C.userInfo().uid;return o.join(`/tmp`,`cc-candybar-${e}`,`socket`)}function qt(e){f.mkdirSync(e,{recursive:!0,mode:448});let t=f.lstatSync(e);if(t.isSymbolicLink())throw Error(`directory is a symlink: ${e}`);if(!t.isDirectory())throw Error(`not a directory: ${e}`);let n=C.userInfo().uid;if(typeof n==`number`&&t.uid!==n)throw Error(`directory is not owned by uid ${n}: ${e} (owner uid=${t.uid})`);if(t.mode&63)throw Error(`directory has unsafe permissions: ${e} (mode=${(t.mode&511).toString(8)}, expected 0700)`)}function Jt(e){qt(o.dirname(e));for(let t of[e,Yt(e)])try{if(f.lstatSync(t).isSymbolicLink())throw Error(`path is a symlink: ${t}`)}catch(e){if(e.code!==`ENOENT`)throw e}}function Yt(e){return`${e}.lease`}function Xt(){return Yt(k())}function Zt(e=process.env){return o.join(Ut(e),`session-state.json`)}function A(){return o.join(Ut(),`settings-history.json`)}function Qt(){let e=process.env.CC_CANDYBAR_DAEMON_REGISTRY_DIR;if(e)return e;let t=C.userInfo().uid;return o.join(`/tmp`,`cc-candybar-${t}`,`daemons`)}function $t(){return o.join(Ut(),`spawn.lock`)}function en(){return o.join(Ut(),`spawn.cooldown`)}function tn(){return o.join(Ut(),`spawn.backoff`)}function nn(){return o.join(Ut(),`watch-probe`)}function rn(e=process.env){return o.join(Ut(e),`daemon.log`)}const an=[`TERM_PROGRAM`,`TERM_PROGRAM_VERSION`,`TERM`,`ITERM_PROFILE`,`XDG_CONFIG_HOME`];function on(e){return Object.fromEntries(an.flatMap(t=>{let n=e[t]??``;return n===``?[]:[[t,n]]}))}const sn=[`native`,`node`,`frames`];function cn(e,t){return{kind:e,bundle:t,source:null}}const ln=Object.keys({termCols:!0,termRows:!0,ssh:!0,tmux:!0,configEnv:!0,claudeConfigDir:!0,terminalEnv:!0,client:!0});function un(e){let t=yn(e.termCols),n=yn(e.termRows),r=bn(e.ssh),i=_n(e.tmux),a=gn(e.configEnv),o=gn(e.claudeConfigDir),s=hn(e.terminalEnv),c=Dn(e.client);return{...t!==void 0&&{termCols:t},...n!==void 0&&{termRows:n},...r!==void 0&&{ssh:r},...i!==void 0&&{tmux:i},...a!==void 0&&{configEnv:a},...o!==void 0&&{claudeConfigDir:o},...s!==void 0&&{terminalEnv:s},...c!==void 0&&{client:c}}}function dn(e,t){return ln.filter(n=>e[n]!==void 0&&t[n]===void 0).map(t=>({hint:t,sent:e[t]}))}function fn(e){return e.length===0?null:`Client hints refused: ${e.map(({hint:e,sent:t})=>`${e}=${JSON.stringify(t)}`).join(`, `)} — is the statusline client older than the daemon? Reinstall it (\`cc-candybar install\`, or \`just install-rust\` in a checkout).`}const pn={unknown:e=>`Unknown flags: ${e}`,"no-value":e=>`${e} names no file — the bar renders with no ${e}`,positional:e=>`Unexpected arguments: ${e}`};function mn(e){let t=Object.keys(pn).flatMap(t=>{let n=e.filter(e=>e.why===t).map(e=>e.arg);return n.length===0?[]:[pn[t](n.join(`, `))]});return t.length===0?null:t.join(`
4
4
  `)}function hn(e){if(typeof e!=`object`||!e||Array.isArray(e))return;let t=e,n=an.filter(e=>t[e]!==void 0);return n.every(e=>typeof t[e]==`string`&&t[e]!==``)?Object.fromEntries(n.map(e=>[e,t[e]])):void 0}function gn(e){return typeof e==`string`&&o.isAbsolute(e)?e:void 0}function _n(e){if(e===null)return null;if(typeof e!=`object`)return;let{socket:t,pane:n,truecolor:r}=e;if(!(typeof t!=`string`||t===``)&&!(typeof n!=`string`||n===``)&&!(r!==null&&(typeof r!=`string`||r===``)))return{socket:t,pane:n,truecolor:r}}const vn=1e4;function yn(e){if(typeof e!=`number`||!Number.isFinite(e))return;let t=Math.floor(e);if(!(t<=0))return t>vn?vn:t}function bn(e){return typeof e==`boolean`?e:void 0}function xn(e){return typeof e==`string`&&e!==``&&e.length<=64?e:null}var Sn=class extends Error{constructor(e){super(e),this.name=`ProtocolError`}};function Cn(e){return wn(JSON.stringify(e))}function wn(e){let t=Buffer.from(e,`utf8`),n=Buffer.alloc(4);return n.writeUInt32BE(t.length,0),Buffer.concat([n,t])}function Tn(e,t){let n=Buffer.alloc(0);return function(r){for(n=Buffer.concat([n,r]);n.length>=4;){let r=n.readUInt32BE(0);if(r>16777216){t(new Sn(`frame too large: ${r}`));return}if(n.length<4+r)return;let i=n.subarray(4,4+r);n=n.subarray(4+r);try{e(JSON.parse(i.toString(`utf8`)))}catch(e){let n=new Sn(e instanceof Error?e.message:String(e));e instanceof Error&&(n.cause=e),t(n);return}}}}function En(e,t,n){return new Promise((r,i)=>{let a=!1,o=t=>{if(!a){a=!0,clearTimeout(s),e.removeAllListeners();try{t()}catch{}}},s=setTimeout(()=>{o(()=>{e.destroy(),i(Error(`TIMEOUT`))})},n-Date.now()),c=Tn(e=>o(()=>r(e)),e=>o(()=>i(e)));e.on(`data`,c),e.on(`error`,e=>o(()=>i(e))),e.on(`close`,()=>o(()=>i(Error(`socket closed before response`)))),e.write(Cn(t))})}function Dn(e){if(typeof e!=`object`||!e||Array.isArray(e))return;let{kind:t,bundle:n,source:r}=e,i=gn(n);return sn.includes(t)&&i!==void 0&&(r===null||typeof r==`string`&&r!==``)?{kind:t,bundle:i,source:r}:void 0}async function j(e,t,n){let r=null;try{r=await Mn(k(),t.connectMs);let i=Date.now()+t.budgetMs,a=e(i),o=await En(r,{v:3,...a},i);return An(a.kind,o,n)}catch(e){return jn(e)}finally{r&&r.destroy()}}function On(e,t){return typeof e==`string`?e:t}function kn(e){return typeof e==`number`&&Number.isInteger(e)&&e>=0?e:0}function An(e,t,n){let r=t;if(r.ok===!0){let r=n(t);return r===void 0?{kind:`permanent`,cause:`malformed_response`,message:`ok response without payload for "${e}" request`}:{kind:`ok`,value:r}}let i=On(r.error,`(no error message)`);switch(r.code){case`VERSION_MISMATCH`:return{kind:`permanent`,cause:`version_mismatch`,clientV:3,daemonV:kn(r.daemonV)};case`TIMEOUT`:return{kind:`transient`,cause:`timeout`,message:i};case`BAD_REQUEST`:return{kind:`permanent`,cause:`bad_request`,message:i};case`RENDER_FAILED`:return{kind:`permanent`,cause:`render_failed`,message:i};case`SWITCHED_OFF`:return{kind:`permanent`,cause:`switched_off`,message:i};default:return{kind:`permanent`,cause:`malformed_response`,message:`unknown error code: ${String(r.code)}`}}}function jn(e){if(e instanceof Sn||e instanceof SyntaxError)return{kind:`permanent`,cause:`malformed_response`,message:e instanceof Error?e.message:String(e)};let t=e instanceof Error?e.message:String(e);return t===`CONNECT_TIMEOUT`||t===`TIMEOUT`?{kind:`transient`,cause:`timeout`,message:t}:t.includes(`ECONNREFUSED`)||t.includes(`ENOENT`)||t.includes(`ENOTSOCK`)?{kind:`transient`,cause:`unreachable`,message:t}:{kind:`transient`,cause:`io_error`,message:t}}function Mn(e,t){return new Promise((n,r)=>{let i=de.createConnection({path:e}),a=setTimeout(()=>{i.destroy(),r(Error(`CONNECT_TIMEOUT`))},t);i.once(`connect`,()=>{clearTimeout(a),n(i)}),i.once(`error`,e=>{clearTimeout(a),r(e)})})}function Nn(e){if(e.kind===`transient`)return`daemon unavailable (${e.cause}: ${e.message})\nHint: daemon may not be running. Run \`cc-candybar\` once to spawn it.`;switch(e.cause){case`version_mismatch`:{let t=e.daemonV===0?`unknown`:`v${e.daemonV}`;return`daemon protocol mismatch (client v${e.clientV} ≠ daemon ${t})`}case`bad_request`:case`render_failed`:case`switched_off`:case`malformed_response`:return`daemon error (${e.cause}): ${e.message}`}}const Pn={connectMs:50,budgetMs:150},Fn={connectMs:50,budgetMs:200};function In(e){let t=e.output;return typeof t==`string`?t:void 0}function Ln(e){return An(`render`,e,In)}function Rn(e,t,n,r){return j(i=>({kind:`render`,hookData:e,args:t,cwd:n,deadline:i,...r}),Pn,In)}function zn(e,t){return j(()=>({kind:`pane-session`,socket:e,pane:t}),Fn,e=>`paneSession`in e?e.paneSession:void 0)}function Bn(e,t){return j(()=>({kind:`click`,verb:e,value:t,clientVersion:tt}),Fn,In)}let Vn=null;function Hn(){if(Vn!==null){try{f.closeSync(Vn.fd)}catch{}Vn=null}}async function Un(e){let t=await f.promises.stat(e).catch(()=>null);if(Vn!==null&&Vn.path===e&&t!==null&&Vn.id===Wn(t))return{held:Vn,size:t.size};Hn(),await f.promises.mkdir(o.dirname(e),{recursive:!0});let n=await new Promise((t,n)=>f.open(e,`a`,(e,r)=>e===null?t(r):n(e))),r=await new Promise((e,t)=>f.fstat(n,(n,r)=>n===null?e(r):t(n)));return Vn={path:e,fd:n,id:Wn(r)},{held:Vn,size:r.size}}function Wn(e){return`${e.dev}:${e.ino}`}function Gn(e,t){return new Promise((n,r)=>f.write(e,t,(e,t)=>e===null?n(t):r(e)))}async function Kn(e){for(let t=2;t>=1;t--)await f.promises.rename(`${e}.${t}`,`${e}.${t+1}`).catch(()=>{});await f.promises.rename(e,`${e}.1`).catch(()=>{})}let qn=[],Jn=0,Yn=0,Xn=0,Zn=null,Qn=!1;const $n=[];let er=!1,tr=!1;function M(e,t){let n=`${new Date().toISOString()} [${e}] ${t}\n`;if(tr||(tr=!0,process.on(`exit`,()=>{er=!0,cr(!0,or)})),qn.push(n),Jn+=Buffer.byteLength(n),Jn>4194304){let e=0;for(;Jn>4194304/2&&e<qn.length-1;){let t=Buffer.byteLength(qn[e]);Jn-=t,Xn+=t,e++}qn.splice(0,e),Yn+=e}er?cr(!0,or):Qn||rr()}function nr(){cr(!1,sr)}async function rr(){Qn=!0;try{for(;qn.length>0;){let e=ir();Zn={bytes:Buffer.from(e),state:{kind:`taken`}};try{await ar(rn(),Zn)}catch(t){Hn(),Zn.state.kind!==`landed`&&ur(e,t)}finally{Zn=null}}}finally{Qn=!1;for(let e of $n.splice(0))e()}}function ir(){let e=(Yn===0?``:`${new Date().toISOString()} [warn] log: ${Yn} earlier line(s) dropped (${Xn} bytes): more than 4194304 bytes were waiting for the disk\n`)+qn.join(``);return qn=[],Jn=0,Yn=0,Xn=0,e}async function ar(e,t){let{held:n,size:r}=await Un(e);if(t.state.kind===`landed`)return;let{bytes:i}=t,a=r+i.length;t.state={kind:`issued`,fd:n.fd,endsAt:a};for(let e=0;e<i.length;){let t=await Gn(n.fd,i.subarray(e));if(t===0)throw Error(`the disk took 0 bytes of a write`);e+=t}if(t.state={kind:`landed`},a>=5242880){Hn();let e=await f.promises.stat(n.path).catch(()=>null);e!==null&&Wn(e)===n.id&&await Kn(n.path)}}const or=1e3,sr=2e3;function cr(e,t){let n=Zn,r=Buffer.alloc(0);n!==null&&n.state.kind===`taken`&&(r=n.bytes,n.state={kind:`landed`});let i=null;if(n!==null&&n.state.kind===`issued`){let{fd:a,endsAt:o}=n.state;try{let s=lr(a,o,t);s<o&&e?(r=n.bytes.subarray(Math.max(0,s-(o-n.bytes.length))),n.state={kind:`landed`}):s<o&&(i={fd:a,endsAt:o})}catch(t){e&&(r=n.bytes,n.state={kind:`landed`}),ur(n.bytes.toString(),t)}}if(r.length===0&&qn.length===0)return;let a=Buffer.concat([r,Buffer.from(ir())]);try{let e=rn();f.mkdirSync(o.dirname(e),{recursive:!0}),f.appendFileSync(e,a),i!==null&&n!==null&&Wn(f.fstatSync(i.fd))===Wn(f.statSync(e))&&(n.state={kind:`issued`,fd:i.fd,endsAt:i.endsAt+a.length})}catch(e){ur(a.toString(),e)}}function lr(e,t,n){let r=performance.now()+n,i=new Int32Array(new SharedArrayBuffer(4));for(;;){let{size:n}=f.fstatSync(e);if(n>=t||performance.now()>=r)return n;Atomics.wait(i,0,0,1)}}function ur(e,t){try{process.stderr.write(`${e}cc-candybar: daemon.log unwritable: ${t.message}\n`)}catch{}}const dr=5e3;function fr(e){let t=[];for(let n of e){let e=n.read();if(e.kind===`text`)return`# memory report from: ${n.name}\n${e.text}`;t.push(`# ${n.name}: unavailable — ${e.reason}`)}return[`# memory report: no probe answered`,...t.length>0?t:[`# no probe is known for this platform`]].join(`
5
5
  `)}const pr=`/usr/bin/footprint`;function mr(e,t){return e===`darwin`?[vr(pr,[`-p`,String(t)]),vr(`/usr/bin/vmmap`,[`--summary`,String(t)])]:e===`linux`?[yr(`/proc/self/smaps_rollup`),yr(`/proc/self/status`)]:[]}function hr(e,t){return e===`darwin`?gr(t,e=>Dt({bin:pr,args:e,timeoutMs:dr,category:`limits.charge`})):async e=>({kind:`charged`,measure:`rss`,bytes:e})}function gr(e,t){return async n=>{let r=await t([`-p`,String(e),`--noCategories`,`-f`,`bytes`]);if(!r.ok)return{kind:`stand-in`,bytes:n,unread:`footprint ${r.reason}${r.error===void 0?``:`: ${r.error}`}${br(r.stderr)}`};let i=_r(r.stdout);return i===null?{kind:`stand-in`,bytes:n,unread:`footprint printed no phys_footprint line`}:{kind:`charged`,measure:`phys_footprint`,bytes:i}}}function _r(e){let t=/^\s*phys_footprint:\s+(\d+) B\s*$/m.exec(e);return t===null?null:Number(t[1])}function vr(e,t){return{name:`${e} ${t.join(` `)}`,read:()=>{let n=Ot({bin:e,args:[...t],timeoutMs:dr,category:`limits.memory-report`});return n.ok?n.stdout.trim().length>0?{kind:`text`,text:n.stdout}:{kind:`unavailable`,reason:`exited 0 but printed nothing`}:{kind:`unavailable`,reason:`${n.reason}${n.error===void 0?``:`: ${n.error}`}${br(n.stderr)}`}}}}function yr(e){return{name:e,read:()=>{try{let t=f.readFileSync(e,`utf8`);return t.trim().length>0?{kind:`text`,text:t}:{kind:`unavailable`,reason:`empty file`}}catch(e){return{kind:`unavailable`,reason:e.message}}}}}function br(e){let t=e.split(`
@@ -61,7 +61,7 @@ import{createRequire as e}from"node:module";import t from"node:process";import{U
61
61
  `).length;if(o>m){m=o;continue}let l=c.slice(r*e,(r+1)*e),u=c.length-(r+1)*e;return[a,...r===n-1&&u>0?[...l.slice(0,-1),Xx([d(`… ${u+1} more rows: ⧉ copy has them all`,null)],{...s,wrap:!1})]:l].join(`
62
62
  `)}}function vS(e,t,n,r){let{label:i,fg:a,bg:o,open:s}=pS(t),c=i===``?[]:[xS(i,new V({bgcolor:o,color:a}).withLink(yS(n,s)))];return SS(e,bS(r),c).join(`
63
63
  `)}function yS(e,t){return Li([{verb:ci,args:[e,px,t]}])}function bS(e){return{endcaps:`plain`,separator:``,width:e.width,wrap:!0,padding:0,colorCompatibility:e.colorCompatibility}}const xS=(e,t)=>new W(`${e} `,{style:t,end:``,overflow:`ignore`});function SS(e,t,n){let r=new V({bgcolor:e.severity.colors.bg,color:e.severity.colors.fg}),i=e=>e===null?r:r.withLink(e),a=Sc(Math.max(2,t.width-1));return e.lines.flatMap((o,s)=>{let c=xS(s===0?e.severity.glyph:` `,r),l=o.flatMap(e=>e.text.split(` `).flatMap(e=>Dc(e,a)).map(t=>xS(t,i(e.link)))),u=s===0?n:[];return Xx([c,...l,...u],t).split(`
64
- `)})}var J=class extends Error{constructor(e){super(e),this.name=`BadVerbArgs`}};function CS(e){try{return e()}catch(e){throw e instanceof URIError?new J(`malformed wire encoding: ${e.message}`):e}}const wS=new Map;function TS(e){let t=DS(e);if(t===null)throw Error(`Palette "${e}" did not resolve in the theme registry — allowed names and the registry are inconsistent`);return t}function ES(e,t){return e===`bar`?t:TS(e)}function DS(e){let t=wS.get(e);if(t!==void 0)return t;let n=Mu(e);return n===null?null:(wS.set(e,n),n)}function OS(e,t){return Eee(e,`${t.hueShift} ${t.chromaScale} ${t.lightnessScale} ${t.lightnessShift}`,()=>pee(e,t))}const Eee=Gg();function kS(e){let t=DS(e);return t===null?null:{kind:`decided`,name:e,value:t}}function AS(e,t,n){let r=kS(e);return r===null?(n(_v(t,`palette`,`"${e}" names no installed theme${ev(e)}`)),MS()):r}function jS(e,t,n){return uv(e,t,n,MS(),kS)}function MS(){return{kind:`decided`,name:tv,value:TS(tv)}}const NS=/^[A-Za-z_][A-Za-z0-9_]*$/;function PS(e){return`#${e+1}`}const FS={rows:{}};function IS(e){return`rows`in e}function LS(e){return Object.fromEntries(e.map((e,t)=>[PS(t),e]))}function RS(e){if(e.kind===`container`&&e.direction===`vertical`){let{kind:t,direction:n,children:r,...i}=e;return{...i,rows:LS(r)}}let{when:t,...n}=e;return{...t!==void 0&&{when:t},rows:LS([n])}}function zS(e){let{rows:t,...n}=e;return{kind:`container`,direction:`vertical`,children:Object.values(t),...n}}function BS(e){return IS(e)?zS(e):e}function*VS(e,t){if(!IS(e)){yield*Jv(e,t);return}yield[zS(e),t];for(let[n,r]of Object.entries(e.rows))yield*Jv(r,`${t}.rows.${n}`)}function HS(e,t){return IS(e)?{...t,...e,rows:{...t.rows,...e.rows}}:RS(e)}function US(e,t){return t.reduce((e,t)=>{let n=t.id??t.seg,r=[...Gv(zS(e.root))].flatMap(e=>e.kind===`segment`?[e]:[]);if(r.some(e=>e.name===t.seg&&(t.id===void 0||Vv(e)===t.id)))return e;let i=r.find(e=>Vv(e)===n);if(i!==void 0)return WS(e,t,`as "${n}", but placement "${n}" is already segment "${i.name}" — give the cell its own id`);let a={kind:`segment`,name:t.seg,...t.id!==void 0&&{id:t.id},insertedBy:t.by},o=Object.entries(e.root.rows).map(([e,n])=>[e,n,GS(n,t.anchor,a,t.relation)]);return o.some(([,,e])=>e!==null)?{...e,root:{...e.root,rows:Object.fromEntries(o.map(([e,t,n])=>[e,n??t]))}}:WS(e,t,`${t.relation} "${t.anchor}", but there is no placement "${t.anchor}"`)},{root:e,unplaced:[]})}function WS(e,t,n){return{...e,unplaced:[...e.unplaced,{cell:t,reason:n}]}}function GS(e,t,n,r){if(e.kind===`segment`&&Vv(e)===t){let{when:t,...i}=e;return{kind:`container`,direction:`horizontal`,children:r===`before`?[n,i]:[i,n],...t!==void 0&&{when:t}}}return e.kind===`container`?KS(e,t,n,r):qS(e,t,n,r)}function KS(e,t,n,r){let i=e.children.findIndex(e=>e.kind===`segment`&&Vv(e)===t);if(i>=0){let t=r===`before`?i:i+1,{when:a}=e.children[i];return{...e,children:[...e.children.slice(0,t),{...n,...a!==void 0&&{when:a}},...e.children.slice(t)]}}for(let[i,a]of e.children.entries()){let o=a.kind===`container`?KS(a,t,n,r):qS(a,t,n,r);if(o!==null)return{...e,children:e.children.map((e,t)=>t===i?o:e)}}return null}function qS(e,t,n,r){let i=!1,a=Wv(e,e=>{let a=KS(e,t,n,r);return i=a!==null,a??e});return i?a:null}function JS(e){if(!IS(e))return!0;let{rows:t,...n}=e;return Object.values(n).some(e=>e!==void 0)||Object.keys(t).length>0}const YS=`default`,XS={};function ZS(e){return[...new Set([YS,...Object.keys(e)])]}function QS(e,t,n){return sv(void 0,e,t,YS,n)}function $S(e,t){let n={[YS]:XS,...e}[t];if(n===void 0)throw Error(`Preset "${t}" is not declared in this config — effectivePresetName collapses unknown names to "${YS}", which always resolves; a miss here means a raw name reached this function without going through that resolution`);return n}function eC(e,t){let n=$S(e.presets,t).root??FS;return{node:zS(HS(n,e.root)),path:JS(n)?`presets.${t}.root`:`root`}}function tC(e,t,n){if(t.length===0)return{config:e,notices:[]};let r=US(e.root,t),i=Object.entries(e.presets).filter(([,e])=>JS(e.root??FS)).map(([n,r])=>({name:n,preset:r,...US(HS(r.root??FS,e.root),t)})),a=new Map,o=e=>({cell:t,reason:n})=>{let r=a.get(t)??new Map;r.set(n,[...r.get(n)??[],e]),a.set(t,r)};(n.root?r.unplaced:[]).forEach(o(`the root`));for(let{name:e,unplaced:t}of i.filter(({name:e})=>n.presets.has(e)))t.forEach(o(`preset "${e}"`));return{config:{...e,root:r.root,presets:{...e.presets,...Object.fromEntries(i.map(({name:e,preset:t,root:n})=>[e,{...t,root:zS(n)}]))}},notices:[...a].flatMap(([e,t])=>[...t].map(([t,n])=>nC(e,`${t} (in ${n.join(`, `)})`)))}}function nC(e,t){return`${e.by.file}: ${e.by.entry} places "${e.seg}" ${t}`}function rC(e,t){return{...e.globals,...$S(e.presets,t).globals}}const iC=new Map;function aC(e,t,n){iC.set(e,{permanent:!0,resolve:t,paletteOf:n})}aC(`themes`,()=>rv(),e=>TS(e));const oC=`placementThemes`;aC(oC,iv,(e,t)=>ES(e,t.palette));for(let{name:e,members:t}of Nb)aC(e,()=>t);function sC(e){return new Map([[`styles`,{members:Object.keys(e.styles),paletteOf:(t,n)=>OS(n.basePalette,e.styles[t])}],[`presets`,{members:ZS(e.presets)}]])}function cC(e){return[...new Set([...iC.keys(),...e.keys()])]}function lC(e,t){if(typeof e!=`string`)return{members:e};let n=t.get(e);if(n)return n;let r=iC.get(e);if(r)return{members:r.resolve(),paletteOf:r.paletteOf};throw Error(dC(e,t))}const uC=new Map([[`looks`,`styles`],[`progressions`,`variations`]]);function dC(e,t){let n=uC.get(e);return`unknown option domain "${e}"${n===void 0?``:` — it was renamed "${n}"; write from: "${n}"`} (have: ${cC(t).join(`, `)})`}const fC=[`set`,`persist`,`copy`,`open`,`reset`,`undo`,`redo`,`back`,`rewind`,`save`,`preset`,`themeDefault`,`doctor`,`slash`,`run`,`do`];function pC(e){return JSON.stringify([e.run,Object.entries(e.env),e.cwd,e.refreshes])}function*mC(e){let t=[];hC(e,(e,n)=>(t.push([n,e]),e)),yield*t}function hC(e,t){if(`copy`in e)return{...e,copy:t(e.copy,`copy`)};if(`open`in e)return{...e,open:t(e.open,`open`)};if(`preset`in e&&e.preset===`delete`)return{...e,name:t(e.name,`name`)};if(`run`in e){let n=e.run.map((e,n)=>t(e,`run.${n}`));return{...e,run:n,env:Object.fromEntries(Object.entries(e.env).map(([e,n])=>[e,t(n,`env.${e}`)]))}}return e}function gC(e){return`from`in e||`int`in e||`insertSegmentFrom`in e}const _C=/"(?:[^"\\]|\\.)*"|'(?:[^'\\]|\\.)*'|`[^`]*`/g;function*vC(e){let t=e.indexOf(`{{`);for(;t!==-1;){let n=``,r=t+2,i=[[0,r]];for(;r<e.length&&!e.startsWith(`}}`,r);){if(e.startsWith(`/*`,r)){let t=e.indexOf(`*/`,r+2);r=t===-1?e.length:t+2,i.push([n.length,r]);continue}let t=r,a=e[r];if(r+=1,a===`"`||a===`'`||a==="`"){for(;r<e.length&&e[r]!==a;)r+=e[r]===`\\`&&a!=="`"?2:1;r+=1}n+=e.slice(t,r)}if(r>=e.length)return;yield{text:n,at:e=>{let[t,n]=i[0];for(let[r,a]of i)r<=e&&([t,n]=[r,a]);return n+e-t}},t=e.indexOf(`{{`,r+2)}}const yC=`[A-Za-z_]\\w*(?:\\.[A-Za-z_]\\w*)*`,bC=RegExp(`^(?:(\\$)(?:\\.(${yC}))?|\\.(${yC})?)(?=[\\s)]|$)`);function xC(e,t,n){let r=bC.exec(e.trimStart());if(r===null)return null;let[i,a]=r[1]===void 0?[t,r[3]]:[n,r[2]];return i===null?null:a===void 0?i:`${i}${a}.`}const SC=/^(\w+)\b\s*([\s\S]*)$/;function*CC(e,t){let n=[t];for(let r of vC(e)){let e=r.text.replace(/^-(?=\s)/,``).trim(),[,i=``,a=``]=SC.exec(e)??[],o=n[n.length-1],s=n.length>1?n[n.length-2]:o;if(i===`end`){n.length>1&&n.pop();continue}if(i===`else`){yield{code:e,dot:s,block:r};let i=/^with\b([\s\S]*)$/.exec(a);n[n.length-1]=i===null?s:xC(i[1],s,t);continue}yield{code:e,dot:o,block:r},i===`if`&&n.push(o),i===`with`&&n.push(xC(a,o,t)),(i===`range`||i===`define`||i===`block`)&&n.push(null)}}const wC=/(?<![.$])\btemplate\s+$/;function*TC(e,t,n){let r=0;for(let i of[...e.matchAll(_C)]){let a=i.index+i[0].length;wC.test(e.slice(r,i.index))&&(yield{name:i[0].slice(1,-1),at:xC(e.slice(a),t,n),index:i.index}),r=a}}function*EC(e,t){let n=new Set;function*r(e,i,a,o){for(let{code:s,dot:c}of[...CC(e,i)]){yield{code:s,dot:c,root:i,via:a};for(let e of[...TC(s,c,i)]){let i=Object.hasOwn(t,e.name)?t[e.name]:void 0,a=`${e.name}\0${e.at??`\0`}`;i===void 0||o.has(e.name)||n.has(a)||(n.add(a),yield*r(i,e.at,e.name,new Set([...o,e.name])))}}}yield*r(e,``,null,new Set)}function DC(e){let t=new Map;return n=>(t.has(n)||t.set(n,e(n)),t.get(n))}const OC=new WeakMap;function kC(e,t){let n=OC.get(t);return n===void 0&&(n=DC(e=>[...EC(e,t)]),OC.set(t,n)),n(e)}const AC=RegExp(`(?<![A-Za-z0-9_)$])(\\$?)\\.(${yC})`,`g`);function*jC({code:e,dot:t,root:n}){let r=e.replace(_C,``);for(let e of[...r.matchAll(AC)]){let r=e[1]===`$`?n:t;r!==null&&(yield`${r}${e[2]}`)}}function MC(e,t){let n=new Map;for(let r of kC(e,t))for(let e of jC(r))n.has(e)||n.set(e,r.via);return n}const NC=/(?<![.$])\b(action|picker|menu|carousel|swatches|swatch|themePreview)\s+$/,PC={action:1,picker:2,menu:1,carousel:2,swatch:1,swatches:2,themePreview:1};function*FC(e){let t=0,n=0,r=0,i=`action`;for(let a of[...e.matchAll(_C)]){let o=e.slice(t,a.index),s=NC.exec(o);if(s!==null)n=PC[s[1]],r=0,i=s[1]===`action`?`action`:`options`;else for(let e of o)e===`(`&&r++,e===`)`&&r--,(r<0||e===`|`&&r===0)&&(n=0);n>0&&r===0&&(yield{name:a[0].slice(1,-1),site:i,index:a.index},n--),t=a.index+a[0].length}}function IC(e,t){let n=new Map;for(let{code:r,via:i}of kC(e,t))for(let{name:e,site:t}of FC(r)){let r=`${e}\0${i??`\0`}`;n.has(r)||n.set(r,{name:e,site:t,via:i})}return[...n.values()]}const LC=/(?<![\w.$])(?:action|picker|menu|carousel|swatches|swatch|themePreview)\s+(?=[^\s"`)|}])/;function RC(e,t){for(let{code:n}of kC(e,t))if(LC.test(n.replace(_C,`""`)))return!0;return!1}const zC=/(?<![\w.$])[A-Za-z_]\w*/g;function BC(e,t){let n=new Set;for(let{code:r}of kC(e,t))for(let[e]of r.replace(_C,``).matchAll(zC))n.add(e);return n}function VC(e,t){return new Set([...HC(e,t)].filter(e=>Object.hasOwn(t,e)))}function HC(e,t){let n=new Set;for(let{code:r,dot:i,root:a}of kC(e,t))for(let{name:e}of TC(r,i,a))n.add(e);return n}const UC=e=>RegExp(`(?<![A-Za-z0-9_)$])(\\$?)\\.${e}(?![A-Za-z0-9_])`,`g`);function WC(e,t,n){let r=UC(t),i=Zb(t),a=[];for(let{dot:t,block:n}of CC(e,``)){let e=n.text.replace(_C,e=>` `.repeat(e.length));for(let i of e.matchAll(r))(i[1]===`$`?``:t)===``&&a.push(n.at(i.index+i[1].length+1));for(let{name:e,index:r}of[...TC(n.text,t,``),...FC(n.text)])i(e)&&a.push(n.at(r+1))}return[...new Set(a)].sort((e,t)=>t-e).reduce((e,r)=>e.slice(0,r)+n+e.slice(r+t.length),e)}function*GC(e){for(let[t,n]of Object.entries(e.variables))yield[t,n,[`variables`,t]];for(let[t,n]of Object.entries(e.segments))for(let[e,r]of Object.entries(n.vars??{}))yield[`${t}.${e}`,r,[`segments`,t,`vars`,e]]}function*KC(e){for(let[t,n]of GC(e))yield[t,n]}function qC(e,t){let n=e.split(`.`);for(let e=n.length;e>0;e--){let r=n.slice(0,e).join(`.`);if(t.has(r))return[r]}let r=`${e}.`;return[...t].filter(e=>e.startsWith(r))}function JC(e,t){return qC(e,t.names).some(n=>!e.startsWith(`${n}.`)||t.documents.has(n))}function YC(e){let t=new Set,n=new Set,r=(e,r)=>{t.add(e),XC(r)&&n.add(e)};for(let[t,n]of KC(e))r(t,n);return{names:t,documents:n,helpers:e.helpers}}function XC(e){return e.kind===`dropped`||e.kind===`source`||(e.kind===`shell`||e.kind===`file`)&&Xv(e.parse)===`json`}const ZC=e=>{try{let t=f.statSync(e,{bigint:!0});return{dev:t.dev,ino:t.ino,birthtimeNs:t.birthtimeNs}}catch(e){let t=e.code;if(t===`ENOENT`||t===`ENOTDIR`)return`gone`;throw e}},QC=(e,t)=>e.dev===t.dev&&e.ino===t.ino&&e.birthtimeNs===t.birthtimeNs,$C=e=>e===`gone`?`gone`:`${e.dev}:${e.ino}:${e.birthtimeNs}`,ew=e=>{try{return ZC(e)}catch(e){return{unreadable:e.code??String(e)}}},tw=e=>typeof e==`string`||`ino`in e?$C(e):`unreadable:${e.unreadable}`,nw=e=>typeof e!=`string`&&`ino`in e;function rw(e){let t=o.basename(e),n=o.dirname(e);for(;;){let r=iw(n);if(r!==null)return{dir:r,name:t,leaf:n===o.dirname(e)};t=o.basename(n),n=o.dirname(n)}}function iw(e){try{return f.statSync(e).isDirectory()?f.realpathSync(e):null}catch{return null}}const aw=(e,t)=>E(t);function ow(e){let t=[],n=!0,r=new Map;for(let i of e.named){let{hops:e,stopped:a}=zt(i);a!==null&&t.push({path:i,reason:a.message});for(let t of e){let{dir:e,name:i,leaf:a}=rw(t);n&&=a;let o=r.has(e)?r.get(e):new Set;o?.add(i),r.set(e,o)}}for(let t of e.whole.map(iw))t!==null&&r.set(t,null);let i={dirs:[...r.entries()].sort(([e],[t])=>e.localeCompare(t)).map(([e,t])=>t===null?{path:e}:{path:e,filenames:[...t].sort()})},a=new Map(i.dirs.map(e=>{let t=ew(e.path);return[e.path,nw(t)?tw(t):null]}));return{key:JSON.stringify([i,[...a]]),targets:i,unbound:[...a.values()].includes(null),bound:a,reached:n,unresolved:t}}function sw(e,t){if(t.kind===`failed`)return t;if(e.kind!==`changed`)return e;if(t.kind===`unknown`)return t;for(let n of t.paths)e.paths.add(n);return e}const cw=(e,t)=>t===null?{kind:`unknown`}:{kind:`changed`,paths:new Set([o.join(e,t)])},lw=e=>({kind:`failed`,reason:`${e.path}: ${e.reason}`}),uw=(e,t)=>e.kind===`listening`&&e.handle===t,dw=e=>`${e.recursive===!0?`tree`:`dir`}:${e.path}`;var fw=class{slots=new Map;dirs=new Map;counters;logger;closed=!1;constructor(e={}){this.counters=e.counters,this.logger=e.logger??aw}acquire(e,t,n){if(this.closed)return{release:()=>{},deaf:t.dirs.map(e=>({kind:`refused`,path:e.path,reason:`the watcher registry is closed`}))};let r=this.slots.get(e);for(let{dir:e}of r?.listeners??[])this.refreshed(e,`acquire`);let i=r??this.opened(e,t),a={onInvalidate:n};return i.holders.add(a),this.makeHandle(i,a)}follow(e,t,n){if(e!==null&&(e.key===t.key||t.unbound))return{watch:e,move:`kept`};let r={key:t.key,handle:this.acquire(t.key,t.targets,n)};return e?.handle.release(),{watch:r,move:`rebound`}}listening(e){let t=this.slots.get(e.key);if(t!==void 0)for(let{dir:e}of t.listeners)e.state.kind===`deaf`&&this.reopen(e,`retry`)}opened(e,t){let n={key:e,listeners:[],holders:new Set,debounce:null};for(let e of t.dirs){let t=this.dirFor(e),r={slot:n,dir:t,filter:e.filenames?new Set(e.filenames):null};t.listeners.add(r),n.listeners.push(r)}return this.slots.set(e,n),this.counters&&(n.listeners.every(e=>e.dir.state.kind===`listening`)?this.counters.watchersOpened++:this.counters.watchRefusals++),n}dirFor(e){let t=dw(e),n=this.dirs.get(t);if(n!==void 0)return this.refreshed(n,`acquire`),n;let r={path:e.path,recursive:e.recursive===!0},i={id:t,...r,listeners:new Set,state:this.open(r,()=>i,`acquire`)};return this.dirs.set(t,i),i}refreshed(e,t){if(e.state.kind===`deaf`){this.reopen(e,t);return}let n=ew(e.path);nw(n)&&tw(n)!==e.state.bound&&this.reopen(e,`the folder at its path was made again`)}reopen(e,t){let n=e.state;n.kind===`listening`&&this.closeHandle(e.path,n.handle,t),e.state=this.open(e,()=>e,t),e.state.kind===`listening`?this.tell(e,{kind:`unknown`}):n.kind===`listening`&&this.tell(e,lw(e.state.deafness))}open(e,t,n){let r=e.path,i=tw(ew(r));try{let a=f.watch(r,{persistent:!1,recursive:e.recursive},(e,n)=>this.heard(t(),a,n));return a.on(`error`,e=>{this.logger(`warn`,`watcher error ${r}: ${e.message}`),this.counters&&this.counters.watchErrors++;let n=t();if(!uw(n.state,a))return;this.closeHandle(r,a,`error`);let i={kind:`failed`,path:r,reason:e.message};n.state={kind:`deaf`,deafness:i},this.tell(n,lw(i))}),this.counters&&this.counters.dirWatchesOpened++,this.logger(`info`,`dir watch opened path=${I(r)} cause=${I(n)}`),{kind:`listening`,handle:a,bound:i}}catch(e){let t=e.message;return this.logger(`warn`,`watch failed ${r}: ${t}`),{kind:`deaf`,deafness:{kind:`refused`,path:r,reason:t}}}}heard(e,t,n){let{state:r}=e;if(!uw(r,t))return;let i=n===o.basename(e.path)&&tw(ew(e.path))!==r.bound;for(let{slot:t,filter:r}of e.listeners)(r===null||n===null||r.has(n)||i)&&this.fire(t,cw(e.path,n));i&&this.refreshed(e,`moved`)}tell(e,t){for(let{slot:n}of e.listeners)this.fire(n,t)}fire(e,t){if(e.debounce!==null){e.debounce.window=sw(e.debounce.window,t);return}let n={window:t,timer:setTimeout(()=>{e.debounce=null;for(let t of e.holders)try{t.onInvalidate(n.window)}catch(t){this.logger(`warn`,`watcher invalidate threw key=${I(e.key)}: ${t.message}`)}},50)};n.timer.unref(),e.debounce=n}makeHandle(e,t){return{get deaf(){return e.listeners.flatMap(({dir:e})=>e.state.kind===`deaf`?[e.state.deafness]:[])},release:()=>{!e.holders.delete(t)||e.holders.size>0||this.slots.get(e.key)===e&&(this.closeSlot(e,`last release`),this.slots.delete(e.key))}}}closeHandle(e,t,n){try{t.close()}catch{}this.counters&&this.counters.dirWatchesClosed++,this.logger(`info`,`dir watch closed path=${I(e)} cause=${I(n)}`)}closeSlot(e,t){e.debounce!==null&&(clearTimeout(e.debounce.timer),e.debounce=null);for(let n of e.listeners){let{dir:e}=n;e.listeners.delete(n),!(e.listeners.size>0)&&(e.state.kind===`listening`&&this.closeHandle(e.path,e.state.handle,t),this.dirs.delete(e.id))}this.counters&&this.counters.watchersClosed++}size(){return this.slots.size}dirWatches(){return[...this.dirs.values()].filter(e=>e.state.kind===`listening`).length}watchedDirs(){return[...this.dirs.values()].map(e=>e.path)}closeAll(){this.closed=!0;for(let e of this.slots.values())this.closeSlot(e,`close`);this.slots.clear()}},pw=Ae((e=>{function t(e,...t){throw Error(`[MobX] minified error nr: ${e}${t.length?` `+t.map(String).join(`,`):``}. See mobx.js.org/errors`)}function n(e){let t=!1;return function(){if(!t)return t=!0,e.apply(this,arguments)}}function r(e){return typeof e==`function`}function i(e){switch(typeof e){case`string`:case`symbol`:case`number`:return!0}return!1}function a(e){return typeof e==`object`&&!!e}function o(e){if(!a(e))return!1;let t=Object.getPrototypeOf(e);if(t==null)return!0;let n=p(t,`constructor`)&&t.constructor;return typeof n==`function`&&n.toString()===Ht}function s(e){let t=e?.constructor;return!!t&&(t.name===`GeneratorFunction`||t.displayName===`GeneratorFunction`)}function c(e,t,n){Rt(e,t,{enumerable:!1,writable:!0,configurable:!0,value:n})}function l(e,t){let n=`isMobX`+e;return t.prototype[n]=!0,function(e){return a(e)&&!0===e[n]}}function u(e){return e!=null&&Object.prototype.toString.call(e)===`[object Map]`}function d(e){return e!=null&&Object.prototype.toString.call(e)===`[object Set]`}function f(e){return e===null?null:typeof e==`object`?``+e:e}function p(e,t){return zt.hasOwnProperty.call(e,t)}function m(e,t){return!!(e&t)}function h(e,t,n){return n?e|=t:e&=~t,e}function g(e,t=Ut,n=Ut){let r=new Kt(e);return t!==Ut&&(r.onBOL=new Set([t])),n!==Ut&&(r.onBUOL=new Set([n])),r}function _(e,t){return jt(e,t)}function v(e,t,n){return e===null||typeof e!=`object`&&typeof e!=`function`||nt(e)?e:Array.isArray(e)?ln.array(e,{name:n}):o(e)?ln.object(e,void 0,{name:n}):u(e)?ln.map(e,{name:n}):d(e)?ln.set(e,{name:n}):typeof e!=`function`||Ge(e)||$e(e)?e:s(e)?qn(e):zn(n,e)}function y(e){return e}function b(e,t){return{t:e,i:t,o:ee,u:x}}function ee(e,t,n,r){var i;return(i=this.i)!=null&&i.bound?this.u(e,t,n,!1)===null?0:1:r===e.h?this.u(e,t,n,!1)===null?0:2:Ge(n.value)?1:(Rt(r,t,te(e,this,t,n,!1)),2)}function x(e,t,n,r){let i=te(e,this,t,n);return e.l(t,i,r)}function S(e,n,r){let{kind:i,name:a,addInitializer:o}=r,s=e,c=e=>{var t;return be(s.i?.name??a.toString(),e,(t=s.i?.autoAction)!=null&&t)};return i==`field`?function(e){var t;let n=e;return Ge(n)||(n=c(n)),(t=s.i)!=null&&t.bound&&(n=n.bind(this),n.isMobxAction=!0),n}:i==`method`?(Ge(n)||(n=c(n)),(l=s.i)!=null&&l.bound&&o(function(){let e=this,t=e[a].bind(e);t.isMobxAction=!0,e[a]=t}),n):void t(43,s.t,String(a),i);var l}function te(e,t,n,r,i=j.safeDescriptors){var a,o,s;let{value:c}=r;return(a=t.i)!=null&&a.bound&&(c=c.bind(e.v??e.h)),{value:be(t.i?.name??n.toString(),c,(o=t.i?.autoAction)!=null&&o,(s=t.i)!=null&&s.bound?e.v??e.h:void 0),configurable:!i||e.p,enumerable:!1,writable:!i}}function ne(e,t){return{t:e,i:t,o:re,u:ie}}function re(e,t,n,r){var i;return r===e.h?this.u(e,t,n,!1)===null?0:2:(i=this.i)!=null&&i.bound&&(!p(e.h,t)||!$e(e.h[t]))&&this.u(e,t,n,!1)===null?0:$e(n.value)?1:(Rt(r,t,oe(e,0,0,n,!1,!1)),2)}function ie(e,t,n,r){let i=oe(e,0,0,n,this.i?.bound);return e.l(t,i,r)}function ae(e,t,n){var r;let{name:i,addInitializer:a}=n;return $e(t)||(t=qn(t)),(r=e.i)!=null&&r.bound&&a(function(){let e=this,t=e[i].bind(e);t.isMobXFlow=!0,e[i]=t}),t}function oe(e,t,n,r,i,a=j.safeDescriptors){let{value:o}=r;return $e(o)||(o=qn(o)),i&&(o=o.bind(e.v??e.h),o.isMobXFlow=!0),{value:o,configurable:!a||e.p,enumerable:!1,writable:!a}}function C(e,t){return{t:e,i:t,o:w,u:se}}function w(e,t,n){return this.u(e,t,n,!1)===null?0:1}function se(e,t,n,r){return e.m(t,It({},this.i,{get:n.get,set:n.set}),r)}function T(e,t,n){function r(e){let n=It({},i.i,{get:t,context:e});return n.name||=`ObservableObject.${a.toString()}`,new xn(n)}let i=e,{name:a,addInitializer:o}=n,s;return o(function(){let e=wt(this)[k],n=this,i=e.j.get(a);i instanceof xn&&i.derivation!==t&&e.j.delete(a),(e.O??=new Map).set(a,()=>r(n))}),function(){let e=this[k],n=e.j.get(a);if(n instanceof xn&&n.derivation!==t){let e=s?.get(this);return e||(e=r(this),(s??=new WeakMap).set(this,e)),e.get()}return e._(a)}}function ce(e,t){return{t:e,i:t,o:le,u:ue}}function le(e,t,n){return this.u(e,t,n,!1)===null?0:1}function ue(e,t,n,r){return e.S(t,n.value,this.i?.A??v,r)}function de(e,t,n){function r(e,t){let n=wt(e)[k];return(n.V??=new Map).set(o,()=>new yn(t,i.i?.A??v,`ObservableObject.${o.toString()}`,!1)),n}let i=e,{kind:a,name:o}=n;if(a===`accessor`)return{get(){return(this[k]??r(this,t.get.call(this)))._(o)},set(e){return(this[k]??r(this,e)).M(o,e)},init(e){return r(this,e),e}}}function fe(e){return{t:Xt,i:e,o:pe,u:me}}function pe(e,t,n,r){var i,a,o;if(n.get)return pn.o(e,t,n,r);if(n.set){let i=Ge(n.set)?n.set:be(t.toString(),n.set);return r===e.h?e.l(t,{configurable:!j.safeDescriptors||e.p,set:i})===null?0:2:(Rt(r,t,{configurable:!0,set:i}),2)}if(r!==e.h&&typeof n.value==`function`)return s(n.value)?((o=this.i)!=null&&o.autoBind?Jn:qn).o(e,t,n,r):((a=this.i)!=null&&a.autoBind?Vn:zn).o(e,t,n,r);let c=!1===this.i?.deep?an:ln;return typeof n.value==`function`&&(i=this.i)!=null&&i.autoBind&&(n.value=n.value.bind(e.v??e.h)),c.o(e,t,n,r)}function me(e,t,n,r){var i;return n.get?pn.u(e,t,n,r):n.set?e.l(t,{configurable:!j.safeDescriptors||e.p,set:be(t.toString(),n.set)},r):(typeof n.value==`function`&&(i=this.i)!=null&&i.autoBind&&(n.value=n.value.bind(e.v??e.h)),(!1===this.i?.deep?an:ln).u(e,t,n,r))}function he(e,t){return It(function(n,r){if(r&&typeof r.kind==`string`)return t(e,n,r)},e)}function ge(e){return e||Qt}function _e(e){return he(e,de)}function ve(e){return!0===e.deep?v:!1===e.deep?y:(t=e.defaultDecorator)&&(n=(r=t.i)?.A)!=null?n:v;var t,n,r}function ye(e){return he(e,T)}function be(e,t,n=!1,r){function i(){return xe(0,n,t,r||this,arguments)}return i.isMobxAction=!0,i.toString=()=>t.toString(),_n&&(vn.value=e,Rt(i,`name`,vn)),i}function xe(e,t,n,r,i){let a=Se(0,t);try{return n.apply(r,i)}catch(e){throw a.N=e,e}finally{Ce(a)}}function Se(e,t){let n=j.trackingDerivation,r=!t||!n;Fe();let i=j.allowStateChanges;r&&Ae();let a={R:r,k:n,C:i,I:j.allowStateReads,P:!1,T:0,B:gn++,D:hn};return hn=a.B,a}function Ce(e){hn!==e.B&&t(30),hn=e.D,e.N!==void 0&&(j.suppressReactionErrors=!0),Ie(),e.R&&je(e.k),j.suppressReactionErrors=!1}function we(e,t){let n=function(e){let t=j.allowStateChanges;return j.allowStateChanges=e,t}(e);try{return t()}finally{(function(e){j.allowStateChanges=e})(n)}}function Te(e){return e instanceof Cn}function Ee(e){switch(e.K){case 0:return!1;case-1:case 2:return!0;case 1:{let t=Ae(),n=e.L,r=n.length;for(let i=0;i<r;i++){let r=n[i];if(Sn(r)){if(j.disableErrorBoundaries)r.get();else try{r.get()}catch{return je(t),!0}if(e.K===2)return je(t),!0}}return Me(e),je(t),!1}}}function De(e,t,n){Me(e),e.$=Array(e.U===0?100:e.L.length),e.W=0,e.U=++j.runId;let r=j.trackingDerivation,i;if(j.trackingDerivation=e,j.inBatch++,!0===j.disableErrorBoundaries)i=t.call(n);else try{i=t.call(n)}catch(e){i=new Cn(e)}return j.inBatch--,j.trackingDerivation=r,function(e){let t=e.L,n=e.L=e.$,r=0,i=0,a=e.W;for(let e=0;e<a;e++){let t=n[e];t.diffValue===0&&(t.diffValue=1,i!==e&&(n[i]=t),i++),t.K>r&&(r=t.K)}for(n.length=i,e.$=null,a=t.length;a--;){let n=t[a];n.diffValue===0&&Pe(n,e),n.diffValue=0}for(;i--;){let t=n[i];t.diffValue===1&&(t.diffValue=0,Ne(t,e))}r!==0&&(e.K=r,e.q())}(e),i}function Oe(e){let t=e.L;e.L=[];let n=t.length;for(;n--;)Pe(t[n],e);e.K=-1}function ke(e){let t=Ae();try{return e()}finally{je(t)}}function Ae(){let e=j.trackingDerivation;return j.trackingDerivation=null,e}function je(e){j.trackingDerivation=e}function Me(e){if(e.K===0)return;e.K=0;let t=e.L,n=t.length;for(;n--;)t[n].F=0}function Ne(e,t){(e.H??=new Set).add(t),e.F>t.K&&(e.F=t.K)}function Pe(e,t){let n=e.H;n&&(n.delete(t),n.size===0&&E(e))}function E(e){!1===e.isPendingUnobservation&&(e.isPendingUnobservation=!0,j.pendingUnobservations.push(e))}function Fe(){j.inBatch++}function Ie(){--j.inBatch===0&&(Be(),!j.isRunningUnobservations&&j.pendingUnobservations.length>0&&function(){j.isRunningUnobservations=!0;try{let e=j.pendingUnobservations;for(let t=0;t<e.length;t++){let n=e[t];n.isPendingUnobservation=!1,n.H&&n.H.size!==0||(n.H=null,n.isBeingObserved&&(n.isBeingObserved=!1,n.onBUO()),n instanceof xn&&n.G())}j.pendingUnobservations=[]}finally{j.isRunningUnobservations=!1}}())}function Le(e){var t;e.isBeingObserved||(e.isBeingObserved=!0,e.onBO(),(t=e.L)==null||t.forEach(Le))}function Re(e){let t=j.trackingDerivation;return t===null?((!e.H||e.H.size===0)&&j.inBatch>0&&E(e),!1):(t.U!==e.J&&(e.J=t.U,t.$[t.W++]=e,!e.isBeingObserved&&j.trackingContext&&(e.isBeingObserved=!0,e.onBO())),e.isBeingObserved)}function ze(e){var t;e.F!==2&&(e.F=2,(t=e.H)==null||t.forEach(e=>{e.K===0&&e.q(),e.K=2}))}function Be(){j.inBatch>0||j.isRunningReactions||An(Ve)}function Ve(){j.isRunningReactions=!0;let e=j.pendingReactions,t=0;for(;e.length>0;){++t===kn&&(console.error(`[mobx] cycle in reaction: ${e[0]}`),e.splice(0));let n=e.splice(0);for(let e=0,t=n.length;e<t;e++)n[e].X()}j.isRunningReactions=!1}function He(e){return he(e,S)}function Ue(e){return function(t,n){return n&&typeof n.kind==`string`?S(e?In:Pn,t,n):r(t)?be(t.name||`<unnamed action>`,t,e):r(n)?be(t,n,e):i(t)?He(b(e?Nn:Mn,{name:t,autoAction:e})):void 0}}function We(e){return xe(0,!1,e,this,void 0)}function Ge(e){return r(e)&&!0===e.isMobxAction}function Ke(e,t=Vt){function n(){e(a)}var r;let i=t?.name??`Autorun`,a;if(t.scheduler||t.delay){let e=qe(t),r=!1;a=new On(i,()=>{r||(r=!0,e(()=>{r=!1,a.isDisposed||a.track(n)}))},t.onError,t.requiresObservable)}else a=new On(i,function(){this.track(n)},t.onError,t.requiresObservable);return t!=null&&(r=t.signal)!=null&&r.aborted||a.Y(),a.Z(t?.signal)}function qe(e){return e.scheduler?e.scheduler:e.delay?t=>setTimeout(t,e.delay):Hn}function Je(e,t,n,i){let a=typeof i==`function`?Dt(t,n):Dt(t),o=r(i)?i:n,s=`${e}L`;return a[s]?a[s].add(o):a[s]=new Set([o]),function(){let e=a[s];e&&(e.delete(o),e.size===0&&delete a[s])}}function Ye(e,t,n,r){let i=Gt(t);return At(()=>{let t=wt(e,r)[k];Wt(i).forEach(e=>{t.u(e,i[e],!n||!(e in n)||n[e])})}),e}function Xe(e){let t={name:e.tt};var n;return e.L&&e.L.length>0&&(t.dependencies=(n=e.L,Array.from(new Set(n))).map(Xe)),t}function Ze(e){let t={name:e.tt};return function(e){return!!e.H&&e.H.size>0}(e)&&(t.observers=Array.from(function(e){return e.H??new Set}(e),Ze)),t}function Qe(e){r(e.cancel)&&e.cancel()}function $e(e){return!0===e?.isMobXFlow}function et(e,t){var n;if(t===void 0)return Sn(e);if(!1===Et(e))return!1;let r=e[k];return(n=r.O)!=null&&n.has(t)?!0:r.j.has(t)?Sn(Dt(e,t)):!1}function tt(e,t){if(!e)return!1;if(t!==void 0){if(Et(e)){var n,r;let i=e[k];return i.j.has(t)||!((n=i.O)==null||!n.has(t))||!((r=i.V)==null||!r.has(t))}return!1}return Et(e)||!!e[k]||qt(e)||jn(e)||Sn(e)}function nt(e){return tt(e)}function rt(e){return Et(e)?e[k].nt():ar(e)||cr(e)?Array.from(e.keys()):xt(e)?e.map((e,t)=>t):void t(5)}function it(e,n){return Et(e)?e[k].et(n):ar(e)||cr(e)?e.has(n):xt(e)?n>=0&&n<e.length:void t(10)}function at(e){if(Et(e))return e[k].it();t(38)}function ot(e,t,n){if(Sn(e)){let r,i=!0;return Ke(()=>{let a=e.get();if(!i||n){let n=Ae();t({observableKind:`computed`,debugObjectName:e.tt,type:Qn,object:e,newValue:a,oldValue:r}),je(n)}i=!1,r=a})}return n&&t({observableKind:`value`,debugObjectName:e.tt,object:e,type:Qn,newValue:e.rt,oldValue:void 0}),ht(e,t)}function st(e,t,n){return e.set(t,n),n}function ct(e,t){if(typeof e!=`object`||!e||e instanceof Date||!nt(e))return e;if(bn(e)||Sn(e))return ct(e.get(),t);if(t.has(e))return t.get(e);if(xt(e)){let n=st(t,e,Array(e.length));return e.forEach((e,r)=>{n[r]=ct(e,t)}),n}if(cr(e)){let n=st(t,e,new Set);return e.forEach(e=>{n.add(ct(e,t))}),n}if(ar(e)){let n=st(t,e,new Map);return e.forEach((e,r)=>{n.set(r,ct(e,t))}),n}{let n=st(t,e,{});return at(e).forEach(r=>{zt.propertyIsEnumerable.call(e,r)&&(n[r]=ct(e[r],t))}),n}}function lt(e,t){Fe();try{return e.apply(t)}finally{Ie()}}function ut(e,t,n){let r;if(typeof n.timeout==`number`){let e=Error(`WHEN_TIMEOUT`);r=setTimeout(()=>{if(!a[k].isDisposed){if(a(),!n.onError)throw e;n.onError(e)}},n.timeout)}n.name=`When`;let i=be(`When-effect`,t);var a=Ke(t=>{we(!1,e)&&(t.dispose(),r&&clearTimeout(r),i())},n);return a}function dt(e){return e[k]}function ft(e){return e.st!==void 0&&e.st.length>0}function pt(e,t){let r=e.st;return r?r.push(t):r=e.st=[t],n(()=>{let e=r.indexOf(t);e!==-1&&r.splice(e,1)})}function D(e,n){let r=Ae();try{let r=[...e.st||[]];for(let e=0,i=r.length;e<i&&((n=r[e](n))&&!n.type&&t(14),n);e++);return n}finally{je(r)}}function mt(e){return e.ot!==void 0&&e.ot.length>0}function ht(e,t){let r=e.ot;return r?r.push(t):r=e.ot=[t],n(()=>{let e=r.indexOf(t);e!==-1&&r.splice(e,1)})}function gt(e,t){let n=Ae(),r=e.ot;if(r){r=r.slice();for(let e=0,n=r.length;e<n;e++)r[e](t);je(n)}}function _t(e,n,r){if(!0===r&&(r=e.ut),!1===r)return;n in e.h||t(1,r.t,`${e.tt}.${n.toString()}`);let i=e.h;for(;i&&i!==zt;){let t=Lt(i,n);if(t){let a=r.o(e,n,t,i);if(a===0)return;if(a===1)break}i=Object.getPrototypeOf(i)}}function O(e,t){typeof Array.prototype[e]==`function`&&(tr[e]=t(e))}function vt(e){return function(){let t=this[k];t.ct.reportObserved();let n=t.ht(t.j);return n[e].apply(n,arguments)}}function yt(e){return function(t,n){let r=this[k];return r.ct.reportObserved(),r.ht(r.j)[e]((e,r)=>t.call(n,e,r,this))}}function bt(e){return function(){let t=this[k];t.ct.reportObserved();let n=t.ht(t.j),r=arguments[0];return arguments[0]=(e,t,n)=>r(e,t,n,this),n[e].apply(n,arguments)}}function xt(e){return a(e)&&M(e[k])}function St(e){return e[Symbol.toStringTag]=`MapIterator`,Pt(e)}function Ct(e){return e[Symbol.toStringTag]=`SetIterator`,Pt(e)}function wt(e,t){if(p(e,k))return e;let n=t?.name??`ObservableObject`;return c(e,k,new dr(e,new Map,String(n),function(e){return e?e.defaultDecorator??function(e){let t=!1!==e.deep,n=!!e.autoBind,r=!t|(n?2:0);return A[r]??(A[r]=fe({deep:t,autoBind:n}))}(e):void 0}(t))),e}function Tt(e){return lr[e]||(lr[e]={get(){return this[k]._(e)},set(t){return this[k].M(e,t)}})}function Et(e){return!!a(e)&&fr(e[k])}function Dt(e,n){if(typeof e==`object`&&e){if(xt(e))return n!==void 0&&t(23),e[k].ct;if(cr(e))return e.ct;if(ar(e)){if(n===void 0)return e.lt;let r=e.ft.get(n)||e.dt.get(n);return r||t(25,n,kt(e)),r}if(Et(e)){if(!n)return t(26);let r=e[k],i=r.j.get(n)??r.vt(n)??r.bt(n);return i||t(27,n,kt(e)),i}if(qt(e)||Sn(e)||jn(e))return e}else if(r(e)&&jn(e[k]))return e[k];t(28)}function Ot(e,n){return e||t(29),n===void 0?qt(e)||Sn(e)||jn(e)||ar(e)||cr(e)?e:e[k]?e[k]:void t(24,e):Ot(Dt(e,n))}function kt(e,t){let n;if(t!==void 0)n=Dt(e,t);else{if(Ge(e))return e.name;n=Et(e)||ar(e)||cr(e)?Ot(e):Dt(e)}return n.tt}function At(e){let t=Ae();Fe();try{return e()}finally{Ie(),je(t)}}function jt(e,t,n=-1){return Mt(e,t,n)}function Mt(e,t,n,i,a){if(e===t)return e!==0||1/e==1/t;if(e==null||t==null)return!1;if(e!=e)return t!=t;let o=typeof e;if(o!==`function`&&o!==`object`&&typeof t!=`object`)return!1;let s=pr.call(e);if(s!==pr.call(t))return!1;switch(s){case`[object RegExp]`:case`[object String]`:return``+e==``+t;case`[object Number]`:return+e==+e?+e==0?1/e==1/t:+e==+t:+t!=+t;case`[object Date]`:case`[object Boolean]`:return+e==+t;case`[object Symbol]`:return typeof Symbol<`u`&&Symbol.valueOf.call(e)===Symbol.valueOf.call(t);case`[object Map]`:case`[object Set]`:n>=0&&n++}e=Nt(e),t=Nt(t);let c=s===`[object Array]`;if(!c){if(typeof e!=`object`||typeof t!=`object`)return!1;let n=e.constructor,i=t.constructor;if(n!==i&&!(r(n)&&n instanceof n&&r(i)&&i instanceof i)&&`constructor`in e&&`constructor`in t)return!1}if(n===0)return!1;n<0&&(n=-1),a||=[];let l=(i||=[]).length;for(;l--;)if(i[l]===e)return a[l]===t;if(i.push(e),a.push(t),c){if(l=e.length,l!==t.length)return!1;for(;l--;)if(!Mt(e[l],t[l],n-1,i,a))return!1}else{let r=Object.keys(e),o=r.length;if(Object.keys(t).length!==o)return!1;for(let s=0;s<o;s++){let o=r[s];if(!p(t,o)||!Mt(e[o],t[o],n-1,i,a))return!1}}return i.pop(),a.pop(),!0}function Nt(e){return xt(e)?e.slice():u(e)||ar(e)||d(e)||cr(e)?Array.from(e.entries()):e}function Pt(e){return e[Symbol.iterator]=Ft,It(Object.create(mr),e)}function Ft(){return this}Object.defineProperty(e,`__esModule`,{value:!0});let It=Object.assign,Lt=Object.getOwnPropertyDescriptor,Rt=Object.defineProperty,zt=Object.prototype,Bt=[];Object.freeze(Bt);let Vt={};Object.freeze(Vt);let Ht=Object.toString(),Ut=()=>{},Wt=Reflect.ownKeys,Gt=Object.getOwnPropertyDescriptors,k=Symbol(`mobx administration`);var Kt=class{constructor(e=`Atom`){this.tt=void 0,this.yt=0,this.H=null,this.J=0,this.F=-1,this.onBOL=void 0,this.onBUOL=void 0,this.tt=e}get isBeingObserved(){return m(this.yt,1)}set isBeingObserved(e){this.yt=h(this.yt,1,e)}get isPendingUnobservation(){return m(this.yt,2)}set isPendingUnobservation(e){this.yt=h(this.yt,2,e)}get diffValue(){return+!!m(this.yt,4)}set diffValue(e){this.yt=h(this.yt,4,e===1)}onBO(){this.onBOL&&this.onBOL.forEach(e=>e())}onBUO(){this.onBUOL&&this.onBUOL.forEach(e=>e())}reportObserved(){return Re(this)}reportChanged(){Fe(),ze(this),Ie()}toString(){return this.tt}};let qt=l(`Atom`,Kt),Jt=Object.is,Yt={t:`override`,o:function(){return 0},u:function(){t(44,this.t)}},Xt=`true`,Zt=fe(),A=[Zt],Qt={deep:!0,name:void 0,defaultDecorator:void 0};Object.freeze(Qt);let $t=ce(`observable`),en=ce(`observable.ref`,{A:y}),tn=ce(`observable.shallow`,{A:function(e,t,n){return e==null||Et(e)||xt(e)||ar(e)||cr(e)?e:Array.isArray(e)?ln.array(e,{name:n,deep:!1}):o(e)?ln.object(e,void 0,{name:n,deep:!1}):u(e)?ln.map(e,{name:n,deep:!1}):d(e)?ln.set(e,{name:n,deep:!1}):void 0}}),nn=ce(`observable.struct`,{A:function(e,t){return jt(e,t)?t:e}}),rn={box(e,t){let n=ge(t);return new yn(e,ve(n),n.name,!0,n.equals)},array(e,t){let n=ge(t);return function(e,t,n=`ObservableArray`,r=!1){return At(()=>{let i=new er(n,t,r);Rt(i.j,k,{enumerable:!1,writable:!1,configurable:!0,value:i});let a=new Proxy(i.j,$n);return i.v=a,e&&e.length&&i.wt(0,0,e),a})}(e,ve(n),n.name)},map(e,t){let n=ge(t);return new ir(e,ve(n),n.name)},set(e,t){let n=ge(t);return new sr(e,ve(n),n.name)},object:(e,t,n)=>At(()=>Ye(function(e,t){var n;return(n=(e=wt(e,t))[k]).v??(n.v=new Proxy(e,Yn))}({},n),e,t))},an=_e(en),on=_e(tn),sn=_e($t),cn=_e(nn);var ln=It(function(e,t,n){return t&&typeof t.kind==`string`?de($t,e,t):nt(e)?e:o(e)?ln.object(e,t,n):Array.isArray(e)?ln.array(e,t):u(e)?ln.map(e,t):d(e)?ln.set(e,t):typeof e==`object`&&e?e:ln.box(e,t)},$t,rn);let un=`computed`,dn=C(un),fn=ye(C(`computed.struct`,{equals:_})),pn=function(e,t){if(t&&typeof t.kind==`string`)return T(dn,e,t);if(o(e))return ye(C(un,e));let n=o(t)?t:{};return n.get=e,n.name||=e.name||``,new xn(n)};var mn;It(pn,dn);let hn=0,gn=1,_n=(mn=Lt(()=>{},`name`)?.configurable)!=null&&mn,vn={value:`action`,configurable:!0,writable:!1,enumerable:!1};var yn=class extends Kt{constructor(e,t,n=`ObservableValue`,r=!0,i=Jt){super(n),this.A=void 0,this.tt=void 0,this.xt=void 0,this.gt=!1,this.st=void 0,this.ot=void 0,this.rt=void 0,this.dehancer=void 0,this.A=t,this.tt=n,this.xt=i,this.rt=t(e,void 0,n)}dehanceValue(e){return this.dehancer===void 0?e:this.dehancer(e)}set(e){(e=this.jt(e))!==j.UNCHANGED&&this.Ot(e)}jt(e){if(ft(this)){let t=D(this,{object:this,type:Qn,newValue:e});if(!t)return j.UNCHANGED;e=t.newValue}return e=this.A(e,this.rt,this.tt),this.xt(this.rt,e)?j.UNCHANGED:e}Ot(e){let t=this.rt;this.rt=e,this.reportChanged(),mt(this)&&gt(this,{type:Qn,object:this,newValue:e,oldValue:t})}get(){return this.reportObserved(),this.dehanceValue(this.rt)}raw(){return this.rt}toJSON(){return this.get()}toString(){return`${this.tt}[${this.rt}]`}valueOf(){return f(this.get())}[Symbol.toPrimitive](){return this.valueOf()}};let bn=l(`ObservableValue`,yn);var xn=class{constructor(e){this.K=-1,this.L=[],this.$=null,this.H=null,this.U=0,this.J=0,this.F=0,this.W=0,this.rt=new Cn(null),this.tt=void 0,this._t=void 0,this.yt=0,this.derivation=void 0,this.St=void 0,this.At=void 0,this.xt=void 0,this.Vt=void 0,this.Mt=void 0,this.onBOL=void 0,this.onBUOL=void 0,e.get||t(31),this.derivation=e.get,this.tt=e.name||`ComputedValue`,e.set&&(this.St=be(`ComputedValue-setter`,e.set)),this.xt=e.equals||Jt,this.At=e.context,this.Vt=e.requiresReaction,this.Mt=!!e.keepAlive}q(){(function(e){var t;e.F===0&&(e.F=1,(t=e.H)==null||t.forEach(e=>{e.K===0&&(e.K=1,e.q())}))})(this)}onBO(){this.onBOL&&this.onBOL.forEach(e=>e())}onBUO(){this.onBUOL&&this.onBUOL.forEach(e=>e())}get isComputing(){return m(this.yt,1)}set isComputing(e){this.yt=h(this.yt,1,e)}get isRunningSetter(){return m(this.yt,2)}set isRunningSetter(e){this.yt=h(this.yt,2,e)}get isBeingObserved(){return m(this.yt,4)}set isBeingObserved(e){this.yt=h(this.yt,4,e)}get isPendingUnobservation(){return m(this.yt,8)}set isPendingUnobservation(e){this.yt=h(this.yt,8,e)}get diffValue(){return+!!m(this.yt,16)}set diffValue(e){this.yt=h(this.yt,16,e===1)}get(){if(this.isComputing&&t(32,this.tt,this.derivation),j.inBatch!==0||this.H&&this.H.size!==0||this.Mt){let e=this.isBeingObserved;if(Re(this),Ee(this)){let e=j.trackingContext;e||!this.Mt&&!this.isBeingObserved||(j.trackingContext=this),this.trackAndCompute()&&function(e){var t;e.F!==2&&(e.F=2,(t=e.H)==null||t.forEach(t=>{t.K===1?t.K=2:t.K===0&&(e.F=0)}))}(this),j.trackingContext=e}else !e&&this.isBeingObserved&&this.L.forEach(Le)}else Ee(this)&&(this.Nt(),Fe(),this.rt=this.Rt(!1),Ie());let e=this.rt;if(Te(e))throw e.cause;return e}set(e){if(this.St){this.isRunningSetter&&t(33,this.tt),this.isRunningSetter=!0;try{this.St.call(this.At,e)}finally{this.isRunningSetter=!1}}else t(34,this.tt)}trackAndCompute(){let e=this.rt,t=this.K===-1,n=this.Rt(!0),r=t||Te(e)||Te(n)||!this.xt(e,n);return r&&(this.rt=n),r}Rt(e){let t;if(this.isComputing=!0,e)t=De(this,this.derivation,this.At);else if(!0===j.disableErrorBoundaries)t=this.derivation.call(this.At);else try{t=this.derivation.call(this.At)}catch(e){t=new Cn(e)}return this.isComputing=!1,t}G(){this.Mt||(Oe(this),this.rt=void 0)}Nt(){}toString(){return`${this.tt}[${this.derivation.toString()}]`}valueOf(){return f(this.get())}[Symbol.toPrimitive](){return this.valueOf()}};let Sn=l(`ComputedValue`,xn);var Cn=class{constructor(e){this.cause=void 0,this.cause=e}};let wn=[`mobxGuid`,`spyListeners`,`enforceActions`,`computedRequiresReaction`,`reactionRequiresObservable`,`observableRequiresReaction`,`allowStateReads`,`disableErrorBoundaries`,`runId`,`UNCHANGED`];var Tn=class{constructor(){this.version=7,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.isRunningUnobservations=!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.safeDescriptors=!0}};let En=!0,Dn=!1,j=function(){let e=globalThis;return e.__mobxInstanceCount>0&&!e.__mobxGlobals&&(En=!1),e.__mobxGlobals&&e.__mobxGlobals.version!==7&&(En=!1),En?e.__mobxGlobals?(e.__mobxInstanceCount+=1,e.__mobxGlobals.UNCHANGED||(e.__mobxGlobals.UNCHANGED={}),e.__mobxGlobals):(e.__mobxInstanceCount=1,e.__mobxGlobals=new Tn):(setTimeout(()=>{Dn||t(35)},1),new Tn)}();var On=class{constructor(e=`Reaction`,t,n,r){this.tt=void 0,this.Et=void 0,this.kt=void 0,this.Ct=void 0,this.L=[],this.$=[],this.K=-1,this.U=0,this.W=0,this.yt=0,this.It=void 0,this.tt=e,this.Et=t,this.kt=n,this.Ct=r}get isDisposed(){return m(this.yt,1)}set isDisposed(e){this.yt=h(this.yt,1,e)}get isScheduled(){return m(this.yt,2)}set isScheduled(e){this.yt=h(this.yt,2,e)}get isTrackPending(){return m(this.yt,4)}set isTrackPending(e){this.yt=h(this.yt,4,e)}get isRunning(){return m(this.yt,8)}set isRunning(e){this.yt=h(this.yt,8,e)}get diffValue(){return+!!m(this.yt,16)}set diffValue(e){this.yt=h(this.yt,16,e===1)}q(){this.Y()}Y(){this.isScheduled||(this.isScheduled=!0,j.pendingReactions.push(this),Be())}X(){if(!this.isDisposed){Fe(),this.isScheduled=!1;let e=j.trackingContext;if(j.trackingContext=this,Ee(this)){this.isTrackPending=!0;try{this.Et()}catch(e){this.Pt(e)}}j.trackingContext=e,Ie()}}track(e){if(this.isDisposed)return;Fe(),this.isRunning=!0;let t=j.trackingContext;j.trackingContext=this;let n=De(this,e,void 0);j.trackingContext=t,this.isRunning=!1,this.isTrackPending=!1,this.isDisposed&&Oe(this),Te(n)&&this.Pt(n.cause),Ie()}Pt(e){if(this.kt)this.kt(e,this);else{if(j.disableErrorBoundaries)throw e;j.suppressReactionErrors||console.error(`[mobx] uncaught error in '${this}'`,e),j.globalReactionErrorHandlers.forEach(t=>t(e,this))}}dispose(){var e;this.isDisposed||(this.isDisposed=!0,(e=this.It)==null||e.call(this),this.isRunning||(Fe(),Oe(this),Ie()))}Z(e){let t=()=>this.dispose();return e!=null&&e.addEventListener&&!this.isDisposed&&(e.addEventListener(`abort`,t),this.It=()=>e.removeEventListener==null?void 0:e.removeEventListener(`abort`,t)),t[k]=this,`dispose`in Symbol&&typeof Symbol.dispose==`symbol`&&(t[Symbol.dispose]=t),t}toString(){return`Reaction[${this.tt}]`}};let kn=100,An=e=>e(),jn=l(`Reaction`,On),Mn=`action`,Nn=`autoAction`,Pn=b(Mn),Fn=b(`action.bound`,{bound:!0}),In=b(Nn,{autoAction:!0}),Ln=b(`autoAction.bound`,{autoAction:!0,bound:!0}),Rn=Ue(!1);It(Rn,Pn);let zn=Ue(!0);It(zn,In);let Bn=He(Fn),Vn=He(Ln),Hn=e=>e(),Un=`always`;var Wn=class extends Error{constructor(){super(`FLOW_CANCELLED`),Object.setPrototypeOf(this,new.target.prototype),this.name=`FlowCancellationError`}toString(){return`Error: ${this.message}`}};let Gn=ne(`flow`),Kn=ne(`flow.bound`,{bound:!0}),qn=It(function(e,t){if(t&&typeof t.kind==`string`)return ae(Gn,e,t);let n=e,i=n.name||`flow`,a=function(){let e=arguments,t=Rn(i,n).apply(this,e),a,o,s=new Promise(function(e,n){function s(e){let r;o=void 0;try{r=Rn(i,t.next).call(t,e)}catch(e){return n(e)}l(r)}function c(e){let r;o=void 0;try{r=Rn(i,t.throw).call(t,e)}catch(e){return n(e)}l(r)}function l(t){if(!r(t?.then))return t.done?e(t.value):(o=Promise.resolve(t.value),o.then(s,c));t.then(l,n)}a=n,s(void 0)});return s.cancel=Rn(i,function(){try{o&&Qe(o);let e=t.return(void 0),n=Promise.resolve(e.value);n.then(Ut,Ut),Qe(n),a(new Wn)}catch(e){a(e)}}),s};return a.isMobXFlow=!0,a},Gn),Jn=he(Kn,ae),Yn={has:(e,t)=>dt(e).et(t),get:(e,t)=>dt(e).Tt(t),set(e,t,n){var r;return!!i(t)&&((r=dt(e).Bt(t,n,!0))==null||r)},deleteProperty(e,t){var n;return!!i(t)&&((n=dt(e).Dt(t,!0))==null||n)},defineProperty(e,t,n){var r;return(r=dt(e).l(t,n))==null||r},ownKeys:e=>dt(e).it(),preventExtensions(e){t(13)}},Xn=Symbol(`mobx-keys`),Zn=`splice`,Qn=`update`,$n={get(e,t){let n=e[k];return t===k?n:t===`length`?n.Kt():typeof t!=`string`||isNaN(t)?p(tr,t)?tr[t]:e[t]:n.Tt(parseInt(t))},set(e,t,n){let r=e[k];return t===`length`?r.Lt(n):typeof t==`symbol`||isNaN(t)?e[t]=n:r.Bt(parseInt(t),n),!0},preventExtensions(){t(15)}};var er=class{constructor(e=`ObservableArray`,t,n){this.$t=void 0,this.ct=void 0,this.j=[],this.st=void 0,this.ot=void 0,this.A=void 0,this.dehancer=void 0,this.v=void 0,this.Ut=0,this.$t=n,this.ct=new Kt(e),this.A=(e,n)=>t(e,n,`ObservableArray[..]`)}Wt(e){return this.dehancer===void 0?e:this.dehancer(e)}ht(e){return this.dehancer!==void 0&&e.length>0?e.map(this.dehancer):e}Kt(){return this.ct.reportObserved(),this.j.length}Lt(e){(!Number.isInteger(e)||e<0)&&t(40,e);let n=this.j.length;if(e!==n)if(e>n){let t=Array.from({length:e-n});this.wt(n,0,t)}else this.wt(e,n-e)}zt(e,n){e!==this.Ut&&t(16),this.Ut+=n}wt(e,t,n){let r=this.j.length;if(e===void 0?e=0:e>r?e=r:e<0&&(e=Math.max(0,r+e)),t=arguments.length===1?r-e:t==null?0:Math.max(0,Math.min(t,r-e)),n===void 0&&(n=Bt),ft(this)){let r=D(this,{object:this.v,type:Zn,index:e,removedCount:t,added:n});if(!r)return Bt;t=r.removedCount,n=r.added}n=n.length===0?n:n.map(e=>this.A(e,void 0));let i=this.qt(e,t,n);return t===0&&n.length===0||this.Ft(e,n,i),this.ht(i)}qt(e,t,n){if(n.length<1e4)return this.j.splice(e,t,...n);{let r=this.j.slice(e,e+t),i=this.j.slice(e+t);this.j.length+=n.length-t;for(let t=0;t<n.length;t++)this.j[e+t]=n[t];for(let t=0;t<i.length;t++)this.j[e+n.length+t]=i[t];return r}}Ht(e,t,n){let r=mt(this),i=r?{observableKind:`array`,object:this.v,type:Qn,debugObjectName:this.ct.tt,index:e,newValue:t,oldValue:n}:null;this.ct.reportChanged(),r&&gt(this,i)}Ft(e,t,n){let r=mt(this),i=r?{observableKind:`array`,object:this.v,debugObjectName:this.ct.tt,type:Zn,index:e,removed:n,added:t,removedCount:n.length,addedCount:t.length}:null;this.ct.reportChanged(),r&&gt(this,i)}Tt(e){return this.ct.reportObserved(),this.Wt(this.j[e])}Bt(e,t){let n=this.j;if(e<n.length){let r=n[e];if(ft(this)){let n=D(this,{type:Qn,object:this.v,index:e,newValue:t});if(!n)return;t=n.newValue}(t=this.A(t,r))!==r&&(n[e]=t,this.Ht(e,t,r))}else{let r=Array.from({length:e+1-n.length});r[r.length-1]=t,this.wt(n.length,0,r)}}},tr={clear(){return this.splice(0)},replace(e){let t=this[k];return t.wt(0,t.j.length,e)},toJSON(){return this.slice()},splice(e,t,...n){let r=this[k];switch(arguments.length){case 0:return[];case 1:return r.wt(e);case 2:return r.wt(e,t)}return r.wt(e,t,n)},spliceWithArray(e,t,n){return this[k].wt(e,t,n)},push(...e){let t=this[k];return t.wt(t.j.length,0,e),t.j.length},pop(){return this.splice(Math.max(this[k].j.length-1,0),1)[0]},shift(){return this.splice(0,1)[0]},unshift(...e){let t=this[k];return t.wt(0,0,e),t.j.length},reverse(){return j.trackingDerivation&&t(37,`reverse`),this.replace(this.slice().reverse()),this},sort(){j.trackingDerivation&&t(37,`sort`);let e=this.slice();return e.sort.apply(e,arguments),this.replace(e),this},remove(e){let t=this[k],n=t.ht(t.j).indexOf(e);return n>-1&&(this.splice(n,1),!0)}};O(`at`,vt),O(`concat`,vt),O(`flat`,vt),O(`includes`,vt),O(`indexOf`,vt),O(`join`,vt),O(`lastIndexOf`,vt),O(`slice`,vt),O(`toString`,vt),O(`toLocaleString`,vt),O(`toSorted`,vt),O(`toSpliced`,vt),O(`with`,vt),O(`every`,yt),O(`filter`,yt),O(`find`,yt),O(`findIndex`,yt),O(`findLast`,yt),O(`findLastIndex`,yt),O(`flatMap`,yt),O(`forEach`,yt),O(`map`,yt),O(`some`,yt),O(`toReversed`,yt),O(`reduce`,bt),O(`reduceRight`,bt);let M=l(`ObservableArrayAdministration`,er),nr={},rr=`delete`;var ir=class{constructor(e,t=v,n=`ObservableMap`){this.A=void 0,this.tt=void 0,this[k]=nr,this.ft=void 0,this.dt=void 0,this.lt=void 0,this.st=void 0,this.ot=void 0,this.dehancer=void 0,this.A=t,this.tt=n,At(()=>{this.lt=g(`ObservableMap.keys()`),this.ft=new Map,this.dt=new Map,e&&this.merge(e)})}et(e){return this.ft.has(e)}has(e){if(!j.trackingDerivation)return this.et(e);let t=this.dt.get(e);if(!t){let n=t=new yn(this.et(e),y,`ObservableMap.key?`,!1);this.dt.set(e,n),n.onBUOL=new Set([()=>this.dt.delete(e)])}return t.get()}set(e,t){let n=this.et(e);if(ft(this)){let r=D(this,{type:n?Qn:`add`,object:this,newValue:t,name:e});if(!r)return this;t=r.newValue}return n?this.Gt(e,t):this.Jt(e,t),this}delete(e){if(ft(this)&&!D(this,{type:rr,object:this,name:e}))return!1;if(this.et(e)){let t=mt(this),n=t?{observableKind:`map`,debugObjectName:this.tt,type:rr,object:this,oldValue:this.ft.get(e).rt,name:e}:null;return lt(()=>{var t;this.lt.reportChanged(),(t=this.dt.get(e))==null||t.Ot(!1),this.ft.get(e).Ot(void 0),this.ft.delete(e)}),t&&gt(this,n),!0}return!1}Gt(e,t){let n=this.ft.get(e);if((t=n.jt(t))!==j.UNCHANGED){let r=mt(this),i=r?{observableKind:`map`,debugObjectName:this.tt,type:Qn,object:this,oldValue:n.rt,name:e,newValue:t}:null;n.Ot(t),r&&gt(this,i)}}Jt(e,t){lt(()=>{var n;let r=new yn(t,this.A,`ObservableMap.key`,!1);this.ft.set(e,r),t=r.rt,(n=this.dt.get(e))==null||n.Ot(!0),this.lt.reportChanged()});let n=mt(this);n&&gt(this,n?{observableKind:`map`,debugObjectName:this.tt,type:`add`,object:this,name:e,newValue:t}:null)}get(e){return this.has(e)?this.Wt(this.ft.get(e).get()):this.Wt(void 0)}getOrInsert(e,t){return this.has(e)||this.set(e,t),this.get(e)}getOrInsertComputed(e,t){return this.has(e)||this.set(e,t(e)),this.get(e)}Wt(e){return this.dehancer===void 0?e:this.dehancer(e)}keys(){return this.lt.reportObserved(),this.ft.keys()}values(){let e=this,t=this.keys();return St({next(){let{done:n,value:r}=t.next();return{done:n,value:n?void 0:e.get(r)}}})}entries(){let e=this,t=this.keys();return St({next(){let{done:n,value:r}=t.next();return{done:n,value:n?void 0:[r,e.get(r)]}}})}[Symbol.iterator](){return this.entries()}forEach(e,t){for(let[n,r]of this)e.call(t,r,n,this)}merge(e){return ar(e)&&(e=new Map(e)),lt(()=>{o(e)?function(e){let t=Object.keys(e),n=Object.getOwnPropertySymbols(e);return n.length?[...t,...n.filter(t=>zt.propertyIsEnumerable.call(e,t))]:t}(e).forEach(t=>this.set(t,e[t])):Array.isArray(e)?e.forEach(([e,t])=>this.set(e,t)):u(e)?(function(e){return Object.getPrototypeOf(Object.getPrototypeOf(Object.getPrototypeOf(e)))===null}(e)||t(19,e),e.forEach((e,t)=>this.set(t,e))):e!=null&&t(20,e)}),this}clear(){lt(()=>{ke(()=>{for(let e of this.keys())this.delete(e)})})}replace(e){return lt(()=>{let n=function(e){if(u(e)||ar(e))return e;if(Array.isArray(e))return new Map(e);if(o(e)){let t=new Map;for(let n in e)t.set(n,e[n]);return t}return t(21,e)}(e),r=new Map,i=!1;for(let e of this.ft.keys())if(!n.has(e))if(this.delete(e))i=!0;else{let t=this.ft.get(e);r.set(e,t)}for(let[e,t]of n.entries()){let n=this.ft.has(e);if(this.set(e,t),this.ft.has(e)){let t=this.ft.get(e);r.set(e,t),n||(i=!0)}}if(!i)if(this.ft.size!==r.size)this.lt.reportChanged();else{let e=this.ft.keys(),t=r.keys(),n=e.next(),i=t.next();for(;!n.done;){if(n.value!==i.value){this.lt.reportChanged();break}n=e.next(),i=t.next()}}this.ft=r}),this}get size(){return this.lt.reportObserved(),this.ft.size}toString(){return`[object ObservableMap]`}toJSON(){return Array.from(this)}get[Symbol.toStringTag](){return`Map`}},ar=l(`ObservableMap`,ir);let or={};var sr=class{constructor(e,t=v,n=`ObservableSet`){this.tt=void 0,this[k]=or,this.ft=new Set,this.ct=void 0,this.ot=void 0,this.st=void 0,this.dehancer=void 0,this.A=void 0,this.tt=n,this.A=(e,r)=>t(e,r,n),At(()=>{this.ct=g(this.tt),e&&this.replace(e)})}Wt(e){return this.dehancer===void 0?e:this.dehancer(e)}clear(){lt(()=>{ke(()=>{for(let e of this.ft.values())this.delete(e)})})}forEach(e,t){for(let n of this)e.call(t,n,n,this)}get size(){return this.ct.reportObserved(),this.ft.size}add(e){if(ft(this)){let t=D(this,{type:`add`,object:this,newValue:e});if(!t)return this;e=t.newValue}if(!this.has(e)){lt(()=>{e=this.A(e,void 0),this.ft.add(e),this.ct.reportChanged()});let t=mt(this);t&&gt(this,t?{observableKind:`set`,debugObjectName:this.tt,type:`add`,object:this,newValue:e}:null)}return this}delete(e){if(ft(this)&&!D(this,{type:rr,object:this,oldValue:e}))return!1;if(this.has(e)){let t=mt(this),n=t?{observableKind:`set`,debugObjectName:this.tt,type:rr,object:this,oldValue:e}:null;return lt(()=>{this.ct.reportChanged(),this.ft.delete(e)}),t&&gt(this,n),!0}return!1}has(e){return this.ct.reportObserved(),this.ft.has(this.Wt(e))}entries(){let e=this.values();return Ct({next(){let{value:t,done:n}=e.next();return n?{value:void 0,done:n}:{value:[t,t],done:n}}})}keys(){return this.values()}values(){this.ct.reportObserved();let e=this,t=this.ft.values();return Ct({next(){let{value:n,done:r}=t.next();return r?{value:void 0,done:r}:{value:e.Wt(n),done:r}}})}intersection(e){return new Set(this).intersection(e)}union(e){return new Set(this).union(e)}difference(e){return new Set(this).difference(e)}symmetricDifference(e){return new Set(this).symmetricDifference(e)}isSubsetOf(e){return new Set(this).isSubsetOf(e)}isSupersetOf(e){return new Set(this).isSupersetOf(e)}isDisjointFrom(e){return new Set(this).isDisjointFrom(e)}replace(e){return cr(e)&&(e=new Set(e)),Array.isArray(e)||d(e)?lt(()=>{let t=d(e)?e:new Set(e);if(t.size!==0)if(this.ft.size!==0){for(let e of this.ft.values())t.has(this.Wt(e))||this.delete(e);t.forEach(e=>this.add(e))}else t.forEach(e=>this.add(e));else this.clear()}):e!=null&&t(41,e),this}toJSON(){return Array.from(this)}toString(){return`[object ObservableSet]`}[Symbol.iterator](){return this.values()}get[Symbol.toStringTag](){return`Set`}},cr=l(`ObservableSet`,sr);let lr=Object.create(null),ur=`remove`;var dr=class{constructor(e,t=new Map,n,r=Zt){this.h=void 0,this.j=void 0,this.tt=void 0,this.ut=void 0,this.lt=void 0,this.ot=void 0,this.st=void 0,this.v=void 0,this.p=void 0,this.Xt=void 0,this.Qt=void 0,this.O=void 0,this.V=void 0,this.h=e,this.j=t,this.tt=n,this.ut=r,this.lt=new Kt(`ObservableObject.keys`),this.p=o(this.h)}_(e){return(this.j.get(e)??this.vt(e)??this.bt(e)).get()}vt(e){let t=this.O?.get(e);if(!t)return;this.O.delete(e),this.O.size===0&&(this.O=void 0);let n=t();return this.j.set(e,n),n}bt(e){let t=this.V?.get(e);if(!t)return;this.V.delete(e),this.V.size===0&&(this.V=void 0);let n=t();return this.j.set(e,n),n}M(e,t){let n=this.j.get(e)??this.vt(e)??this.bt(e);if(n instanceof xn)return n.set(t),!0;if(ft(this)){let n=D(this,{type:Qn,object:this.v||this.h,name:e,newValue:t});if(!n)return null;t=n.newValue}if((t=n.jt(t))!==j.UNCHANGED){let r=mt(this),i=r?{type:Qn,observableKind:`object`,debugObjectName:this.tt,object:this.v||this.h,oldValue:n.rt,name:e,newValue:t}:null;n.Ot(t),r&&gt(this,i)}return!0}Tt(e){return j.trackingDerivation&&!p(this.h,e)&&this.et(e),this.h[e]}Bt(e,t,n=!1){return p(this.h,e)?this.j.has(e)?this.M(e,t):n?Reflect.set(this.h,e,t):(this.h[e]=t,!0):this.u(e,{value:t,enumerable:!0,writable:!0,configurable:!0},this.ut,n)}et(e){if(!j.trackingDerivation)return e in this.h;this.Qt||=new Map;let t=this.Qt.get(e);return t||(t=new yn(e in this.h,y,`ObservableObject.key?`,!1),this.Qt.set(e,t)),t.get()}u(e,t,n,r=!1){return!0===n&&(n=this.ut),!1===n?this.l(e,t,r):n.u(this,e,t,r)}l(e,t,n=!1){try{Fe();let r=this.Dt(e);if(!r)return r;if(ft(this)){let n=D(this,{object:this.v||this.h,name:e,type:`add`,newValue:t.value});if(!n)return null;let{newValue:r}=n;t.value!==r&&(t=It({},t,{value:r}))}if(n){if(!Reflect.defineProperty(this.h,e,t))return!1}else Rt(this.h,e,t);this.Yt(e,t.value)}finally{Ie()}return!0}S(e,t,n,r=!1){try{Fe();let i=this.Dt(e);if(!i)return i;if(ft(this)){let n=D(this,{object:this.v||this.h,name:e,type:`add`,newValue:t});if(!n)return null;t=n.newValue}let a=Tt(e),o={configurable:!j.safeDescriptors||this.p,enumerable:!0,get:a.get,set:a.set};if(r){if(!Reflect.defineProperty(this.h,e,o))return!1}else Rt(this.h,e,o);let s=new yn(t,n,`ObservableObject.key`,!1);this.j.set(e,s),this.Yt(e,s.rt)}finally{Ie()}return!0}m(e,t,n=!1){try{Fe();let r=this.Dt(e);if(!r)return r;if(ft(this)&&!D(this,{object:this.v||this.h,name:e,type:`add`,newValue:void 0}))return null;t.name||=`ObservableObject.key`,t.context=this.v||this.h;let i=Tt(e),a={configurable:!j.safeDescriptors||this.p,enumerable:!1,get:i.get,set:i.set};if(n){if(!Reflect.defineProperty(this.h,e,a))return!1}else Rt(this.h,e,a);this.j.set(e,new xn(t)),this.Yt(e,void 0)}finally{Ie()}return!0}Dt(e,t=!1){if(!p(this.h,e))return!0;if(ft(this)&&!D(this,{object:this.v||this.h,name:e,type:ur}))return null;try{var n;Fe();let r=mt(this),i=this.j.get(e),a;if(i||!r||(a=Lt(this.h,e)?.value),t){if(!Reflect.deleteProperty(this.h,e))return!1}else delete this.h[e];i&&(this.j.delete(e),i instanceof yn&&(a=i.rt),ze(i)),this.lt.reportChanged(),(n=this.Qt)==null||(n=n.get(e))==null||n.set(e in this.h),r&&r&&gt(this,{type:ur,observableKind:`object`,object:this.v||this.h,debugObjectName:this.tt,oldValue:a,name:e})}finally{Ie()}return!0}Yt(e,t){var n;let r=mt(this);r&&r&&gt(this,r?{type:`add`,observableKind:`object`,debugObjectName:this.tt,object:this.v||this.h,name:e,newValue:t}:null),(n=this.Qt)==null||(n=n.get(e))==null||n.set(!0),this.lt.reportChanged()}it(){return this.lt.reportObserved(),Wt(this.h)}nt(){return this.lt.reportObserved(),Object.keys(this.h)}};let fr=l(`ObservableObjectAdministration`,dr),pr=zt.toString,mr=globalThis.Iterator?.prototype||{};e.$mobx=k,e.FlowCancellationError=Wn,e.ObservableMap=ir,e.ObservableSet=sr,e.Reaction=On,e._allowStateChanges=we,e._allowStateChangesInsideComputed=We,e._allowStateReadsEnd=function(e){j.allowStateReads=e},e._allowStateReadsStart=function(e){let t=j.allowStateReads;return j.allowStateReads=e,t},e._autoAction=zn,e._autoActionBound=Vn,e._endAction=Ce,e._getAdministration=Ot,e._getGlobalState=function(){return j},e._interceptReads=function(e,t,n){let r;return ar(e)||xt(e)||bn(e)?r=Ot(e):Et(e)&&(r=Ot(e,t)),r.dehancer=typeof t==`function`?t:n,()=>{r.dehancer=void 0}},e._isComputingDerivation=function(){return j.trackingDerivation!==null},e._resetGlobalState=function(){let e=new Tn;for(let t in e)wn.indexOf(t)===-1&&(j[t]=e[t]);j.allowStateChanges=!j.enforceActions},e._startAction=Se,e.action=Rn,e.actionBound=Bn,e.autorun=Ke,e.compareDefault=Jt,e.compareIdentity=function(e,t){return e===t},e.compareShallow=function(e,t){return jt(e,t,1)},e.compareStructural=_,e.computed=pn,e.computedStruct=fn,e.configure=function(e){!0===e.isolateGlobalState&&function(){if((j.pendingReactions.length||j.inBatch||j.isRunningReactions)&&t(36),Dn=!0,En){let e=globalThis;--e.__mobxInstanceCount===0&&(e.__mobxGlobals=void 0),j=new Tn}}();let{enforceActions:n}=e;if(n!==void 0){let e=n===Un?Un:n===`observed`;j.enforceActions=e,j.allowStateChanges=!0!==e&&e!==Un}[`computedRequiresReaction`,`reactionRequiresObservable`,`observableRequiresReaction`,`disableErrorBoundaries`,`safeDescriptors`].forEach(t=>{t in e&&(j[t]=!!e[t])}),j.allowStateReads=!j.observableRequiresReaction,e.reactionScheduler&&function(e){let t=An;An=n=>e(()=>t(n))}(e.reactionScheduler)},e.createAtom=g,e.defineProperty=function(e,n,r){if(Et(e))return e[k].l(n,r);t(39)},e.entries=function(e){return Et(e)?rt(e).map(t=>[t,e[t]]):ar(e)?rt(e).map(t=>[t,e.get(t)]):cr(e)?Array.from(e.entries()):xt(e)?e.map((e,t)=>[t,e]):void t(7)},e.extendObservable=Ye,e.flow=qn,e.flowBound=Jn,e.flowResult=function(e){return e},e.get=function(e,n){if(it(e,n))return Et(e)?e[k].Tt(n):ar(e)?e.get(n):xt(e)?e[n]:void t(11)},e.getAtom=Dt,e.getDebugName=kt,e.getDependencyTree=function(e,t){return Xe(Dt(e,t))},e.getObserverTree=function(e,t){return Ze(Dt(e,t))},e.has=it,e.intercept=function(e,t,n){return r(n)?function(e,t,n){return pt(Ot(e,t),n)}(e,t,n):function(e,t){return pt(Ot(e),t)}(e,t)},e.isAction=Ge,e.isBoxedObservable=bn,e.isComputed=function(e){return et(e)},e.isComputedProp=function(e,t){return et(e,t)},e.isFlow=$e,e.isFlowCancellationError=function(e){return e instanceof Wn},e.isObservable=nt,e.isObservableArray=xt,e.isObservableMap=ar,e.isObservableObject=Et,e.isObservableProp=function(e,t){return tt(e,t)},e.isObservableSet=cr,e.keys=rt,e.makeAutoObservable=function(e,t,n){return o(e)?Ye(e,e,t,n):(At(()=>{let r=wt(e,n)[k];if(!e[Xn]){let t=Object.getPrototypeOf(e),n=new Set([...Wt(e),...Wt(t)]);n.delete(`constructor`),n.delete(k),c(t,Xn,n)}e[Xn].forEach(e=>_t(r,e,!t||!(e in t)||t[e]))}),e)},e.makeObservable=function(e,t,n){return At(()=>{let r=wt(e,n)[k];Wt(t).forEach(e=>_t(r,e,t[e]))}),e},e.observable=ln,e.observableDeep=sn,e.observableRef=an,e.observableShallow=on,e.observableStruct=cn,e.observe=function(e,t,n,i){return r(n)?function(e,t,n,r){return ot(Ot(e,t),n,r)}(e,t,n,i):function(e,t,n){let r=Ot(e);if(xt(e))n&&t({observableKind:`array`,object:r.v,debugObjectName:r.ct.tt,type:`splice`,index:0,added:r.j.slice(),addedCount:r.j.length,removed:[],removedCount:0});else if(!ar(e)&&!cr(e)&&!Et(e))return ot(r,t,n);return ht(r,t)}(e,t,n)},e.onBecomeObserved=function(e,t,n){return Je(`onBO`,e,t,n)},e.onBecomeUnobserved=function(e,t,n){return Je(`onBUO`,e,t,n)},e.onReactionError=function(e){return j.globalReactionErrorHandlers.push(e),()=>{let t=j.globalReactionErrorHandlers.indexOf(e);t>=0&&j.globalReactionErrorHandlers.splice(t,1)}},e.override=Yt,e.ownKeys=at,e.reaction=function(e,t,n=Vt){function r(){if(p=!1,h.isDisposed)return;let t=!1,r=d;h.track(()=>{let n=we(!1,()=>e(h));t=f||!m(d,n),d=n}),(f&&n.fireImmediately||!f&&t)&&o(d,r,h),f=!1}var i;let a=n.name??`Reaction`,o=Rn(a,n.onError?(s=n.onError,c=t,function(){try{return c.apply(this,arguments)}catch(e){s.call(this,e)}}):t);var s,c;let l=!n.scheduler&&!n.delay,u=qe(n),d,f=!0,p=!1,m=n.equals||Jt,h=new On(a,()=>{f||l?r():p||(p=!0,u(r))},n.onError,n.requiresObservable);return n!=null&&(i=n.signal)!=null&&i.aborted||h.Y(),h.Z(n?.signal)},e.remove=function(e,n){Et(e)?e[k].Dt(n):ar(e)||cr(e)?e.delete(n):xt(e)?(typeof n!=`number`&&(n=parseInt(n,10)),e.splice(n,1)):t(9)},e.runInAction=We,e.set=function e(n,r,i){if(arguments.length===2&&!cr(n)){Fe();let t=r;try{for(let r in t)e(n,r,t[r])}finally{Ie()}return}Et(n)?n[k].Bt(r,i):ar(n)?n.set(r,i):cr(n)?n.add(r):xt(n)?(typeof r!=`number`&&(r=parseInt(r,10)),r<0&&t(42,r),Fe(),r>=n.length&&(n.length=r+1),n[r]=i,Ie()):t(8)},e.spy=function(){return console.warn(`[mobx.spy] Is a no-op in production builds`),function(){}},e.toJS=function(e){return ct(e,new Map)},e.transaction=lt,e.untracked=ke,e.values=function(e){return Et(e)?rt(e).map(t=>e[t]):ar(e)?rt(e).map(t=>e.get(t)):cr(e)?Array.from(e.values()):xt(e)?e.slice():void t(6)},e.when=function(e,t,n){return arguments.length===1||t&&typeof t==`object`?function(e,t){var n;if(t!=null&&(n=t.signal)!=null&&n.aborted)return It(Promise.reject(Error(`WHEN_ABORTED`)),{cancel:()=>null});let r,i,a=new Promise((n,a)=>{var o;let s=ut(e,n,It({},t,{onError:a}));r=()=>{s(),a(Error(`WHEN_CANCELLED`))},i=()=>{s(),a(Error(`WHEN_ABORTED`))},t==null||(o=t.signal)==null||o.addEventListener==null||o.addEventListener(`abort`,i)}).finally(()=>{var e;return t==null||(e=t.signal)==null||e.removeEventListener==null?void 0:e.removeEventListener(`abort`,i)});return a.cancel=r,a}(e,t):ut(e,t,n||{})}})),mw=Ae((e=>{Object.defineProperty(e,`__esModule`,{value:!0});let t={0:`Invalid value for configuration 'enforceActions', expected 'never', 'always' or 'observed'`,1(e,t){return`Cannot apply '${e}' to '${t.toString()}': Field not found.`},5:`'keys()' can only be used on observable objects, arrays, sets and maps`,6:`'values()' can only be used on observable objects, arrays, sets and maps`,7:`'entries()' can only be used on observable objects, arrays and maps`,8:`'set()' can only be used on observable objects, arrays and maps`,9:`'remove()' can only be used on observable objects, arrays and maps`,10:`'has()' can only be used on observable objects, arrays and maps`,11:`'get()' can only be used on observable objects, arrays and maps`,12:`Invalid annotation`,13:`Dynamic observable objects cannot be frozen. If you're passing observables to 3rd party component/function that calls Object.freeze, pass copy instead: toJS(observable)`,14:`Intercept handlers should return nothing or a change object`,15:`Observable arrays cannot be frozen. If you're passing observables to 3rd party component/function that calls Object.freeze, pass copy instead: toJS(observable)`,16:`Modification exception: the internal structure of an observable array was changed.`,19(e){return`Cannot initialize from classes that inherit from Map: `+e.constructor.name},20(e){return`Cannot initialize map from `+e},21(e){return`Cannot convert to map from '${e}'`},23:`It is not possible to get index atoms from arrays`,24(e){return`Cannot obtain administration from `+e},25(e,t){return`the entry '${e}' does not exist in the observable map '${t}'`},26:`please specify a property`,27(e,t){return`no observable property '${e.toString()}' found on the observable object '${t}'`},28(e){return`Cannot obtain atom from `+e},29:`Expecting some object`,30:`invalid action stack. did you forget to finish an action?`,31:`missing option for computed: get`,32(e,t){return`Cycle detected in computation ${e}: ${t}`},33(e){return`The setter of computed value '${e}' is trying to update itself. Did you intend to update an _observable_ value, instead of the computed property?`},34(e){return`[ComputedValue '${e}'] It is not possible to assign a new value to a computed value.`},35:"There are multiple, different versions of MobX active. Make sure MobX is loaded only once or use `configure({ isolateGlobalState: true })`",36:`isolateGlobalState should be called before MobX is running any reactions`,37(e){return`[mobx] \`observableArray.${e}()\` mutates the array in-place, which is not allowed inside a derivation. Use \`array.slice().${e}()\` instead`},38:`'ownKeys()' can only be used on observable objects`,39:`'defineProperty()' can only be used on observable objects`,40(e){return`Out of range: `+e},41(e){return`Cannot initialize set from `+e},42(e){return`Invalid index: '${e}'`},43(e,t,n){return`Cannot apply '${e}' to '${t}' (kind: ${n}):\n'${e}' can only be used on properties with a function value.`},44(e){return`'${e}' can only be used with 'makeObservable'`}};function n(e,...n){{let r=typeof e==`string`?e:t[e];throw typeof r==`function`&&(r=r.apply(null,n)),Error(`[MobX] ${r}`)}}let r=Object.assign,i=Object.getOwnPropertyDescriptor,a=Object.defineProperty,o=Object.prototype,s=[];Object.freeze(s);let c={};Object.freeze(c);let l=Object.toString();function u(){return++A.mobxGuid}function d(e){let t=!1;return function(){if(!t)return t=!0,e.apply(this,arguments)}}let f=()=>{};function p(e){return typeof e==`function`}function m(e){switch(typeof e){case`string`:case`symbol`:case`number`:return!0}return!1}function h(e){return typeof e==`object`&&!!e}function g(e){if(!h(e))return!1;let t=Object.getPrototypeOf(e);if(t==null)return!0;let n=ae(t,`constructor`)&&t.constructor;return typeof n==`function`&&n.toString()===l}function _(e){let t=e?.constructor;return t?t.name===`GeneratorFunction`||t.displayName===`GeneratorFunction`:!1}function v(e,t,n){a(e,t,{enumerable:!1,writable:!0,configurable:!0,value:n})}function y(e,t,n){a(e,t,{enumerable:!1,writable:!1,configurable:!0,value:n})}function b(e,t){let n=`isMobX`+e;return t.prototype[n]=!0,function(e){return h(e)&&e[n]===!0}}function ee(e){return e!=null&&Object.prototype.toString.call(e)===`[object Map]`}function x(e){return Object.getPrototypeOf(Object.getPrototypeOf(Object.getPrototypeOf(e)))===null}function S(e){return e!=null&&Object.prototype.toString.call(e)===`[object Set]`}function te(e){let t=Object.keys(e),n=Object.getOwnPropertySymbols(e);return n.length?[...t,...n.filter(t=>o.propertyIsEnumerable.call(e,t))]:t}let ne=Reflect.ownKeys;function re(e){return typeof e==`string`?e:typeof e==`symbol`?e.toString():new String(e).toString()}function ie(e){return e===null?null:typeof e==`object`?``+e:e}function ae(e,t){return o.hasOwnProperty.call(e,t)}let oe=Object.getOwnPropertyDescriptors;function C(e,t){return!!(e&t)}function w(e,t,n){return n?e|=t:e&=~t,e}function se(e,t){t.includes(e.kind)||n(`The decorator applied to '${String(e.name)}' cannot be used on a ${e.kind} element`)}let T=Symbol(`mobx administration`);var ce=class{constructor(e=`Atom@`+u()){this.name_=void 0,this.flags_=0,this.observers_=null,this.lastAccessedBy_=0,this.lowestObserverState_=-1,this.onBOL=void 0,this.onBUOL=void 0,this.name_=e}get isBeingObserved(){return C(this.flags_,1)}set isBeingObserved(e){this.flags_=w(this.flags_,1,e)}get isPendingUnobservation(){return C(this.flags_,2)}set isPendingUnobservation(e){this.flags_=w(this.flags_,2,e)}get diffValue(){return+!!C(this.flags_,4)}set diffValue(e){this.flags_=w(this.flags_,4,e===1)}onBO(){this.onBOL&&this.onBOL.forEach(e=>e())}onBUO(){this.onBUOL&&this.onBUOL.forEach(e=>e())}reportObserved(){return dn(this)}reportChanged(){sn(),fn(this),cn()}toString(){return this.name_}};let le=b(`Atom`,ce);function ue(e,t=f,n=f){let r=new ce(e);return t!==f&&(r.onBOL=new Set([t])),n!==f&&(r.onBUOL=new Set([n])),r}function de(e,t){return e===t}function fe(e,t){return zi(e,t)}function pe(e,t){return zi(e,t,1)}let me=Object.is;function he(e,t,n){return e===null||typeof e!=`object`&&typeof e!=`function`||Sr(e)?e:Array.isArray(e)?D.array(e,{name:n}):g(e)?D.object(e,void 0,{name:n}):ee(e)?D.map(e,{name:n}):S(e)?D.set(e,{name:n}):typeof e==`function`&&!Vn(e)&&!pr(e)?_(e)?lr(e):Ln(n,e):e}function ge(e,t,r){if(e==null||ji(e)||mi(e)||vi(e)||Ci(e))return e;if(Array.isArray(e))return D.array(e,{name:r,deep:!1});if(g(e))return D.object(e,void 0,{name:r,deep:!1});if(ee(e))return D.map(e,{name:r,deep:!1});if(S(e))return D.set(e,{name:r,deep:!1});n(`The shallow modifier / decorator can only used in combination with arrays, objects, maps and sets`)}function _e(e){return e}function ve(e,t){return Sr(e)&&n(`observable.struct should not be used with observable values`),zi(e,t)?t:e}let ye=`override`,be={annotationType_:ye,make_:Se,extend_:Ce};function xe(e){return e.annotationType_===ye}function Se(e,t){return e.isPlainObject_&&n(`Cannot apply '${this.annotationType_}' to '${e.name_}.${t.toString()}':\n'${this.annotationType_}' cannot be used on plain objects.`),ae(e.appliedAnnotations_,t)||n(`'${e.name_}.${t.toString()}' is annotated with '${this.annotationType_}', but no such annotated member was found on prototype.`),0}function Ce(e,t,r,i){n(44,this.annotationType_)}function we(e,t){return{annotationType_:e,options_:t,make_:Te,extend_:Ee}}function Te(e,t,n,r){var i;return(i=this.options_)!=null&&i.bound?this.extend_(e,t,n,!1)===null?0:1:r===e.target_?this.extend_(e,t,n,!1)===null?0:2:Vn(n.value)?1:(a(r,t,ke(e,this,t,n,!1)),2)}function Ee(e,t,n,r){let i=ke(e,this,t,n);return e.defineProperty_(t,i,r)}function De(e,t,r){se(r,[`method`,`field`]);let{kind:i,name:a,addInitializer:o}=r,s=e,c=e=>St(s.options_?.name??a.toString(),e,s.options_?.autoAction??!1);if(i==`field`)return function(e){var t;let n=e;return Vn(n)||(n=c(n)),(t=s.options_)!=null&&t.bound&&(n=n.bind(this),n.isMobxAction=!0),n};if(i==`method`){var l;return Vn(t)||(t=c(t)),(l=s.options_)!=null&&l.bound&&o(function(){let e=this,t=e[a].bind(e);t.isMobxAction=!0,e[a]=t}),t}n(43,s.annotationType_,String(a),i)}function Oe(e,{annotationType_:t},r,{value:i}){p(i)||n(`Cannot apply '${t}' to '${e.name_}.${r.toString()}':\n'${t}' can only be used on properties with a function value.`)}function ke(e,t,n,r,i=A.safeDescriptors){var a,o;Oe(e,t,n,r);let{value:s}=r;return(a=t.options_)!=null&&a.bound&&(s=s.bind(e.proxy_??e.target_)),{value:St(t.options_?.name??n.toString(),s,t.options_?.autoAction??!1,(o=t.options_)!=null&&o.bound?e.proxy_??e.target_:void 0),configurable:i?e.isPlainObject_:!0,enumerable:!1,writable:!i}}function Ae(e,t){return{annotationType_:e,options_:t,make_:je,extend_:Me}}function je(e,t,n,r){var i;return r===e.target_?this.extend_(e,t,n,!1)===null?0:2:(i=this.options_)!=null&&i.bound&&(!ae(e.target_,t)||!pr(e.target_[t]))&&this.extend_(e,t,n,!1)===null?0:pr(n.value)?1:(a(r,t,E(e,this,t,n,!1,!1)),2)}function Me(e,t,n,r){let i=E(e,this,t,n,this.options_?.bound);return e.defineProperty_(t,i,r)}function Ne(e,t,n){var r;se(n,[`method`]);let{name:i,addInitializer:a}=n;return pr(t)||(t=lr(t)),(r=e.options_)!=null&&r.bound&&a(function(){let e=this,t=e[i].bind(e);t.isMobXFlow=!0,e[i]=t}),t}function Pe(e,{annotationType_:t},r,{value:i}){p(i)||n(`Cannot apply '${t}' to '${e.name_}.${r.toString()}':\n'${t}' can only be used on properties with a generator function value.`)}function E(e,t,n,r,i,a=A.safeDescriptors){Pe(e,t,n,r);let{value:o}=r;return pr(o)||(o=lr(o)),i&&(o=o.bind(e.proxy_??e.target_),o.isMobXFlow=!0),{value:o,configurable:a?e.isPlainObject_:!0,enumerable:!1,writable:!a}}function Fe(e,t){return{annotationType_:e,options_:t,make_:Ie,extend_:Le}}function Ie(e,t,n){return this.extend_(e,t,n,!1)===null?0:1}function Le(e,t,n,i){return ze(e,this,t,n),e.defineComputedProperty_(t,r({},this.options_,{get:n.get,set:n.set}),i)}function Re(e,t,n){se(n,[`getter`]);let i=e,{name:a,addInitializer:o}=n,s;function c(e,n){let o=r({},i.options_,{get:t,context:e});return o.name||=`${n.name_}.${a.toString()}`,new jt(o)}return o(function(){let e=Oi(this)[T],n=this,r=e.values_.get(a);r instanceof jt&&r.derivation!==t&&e.values_.delete(a),(e.lazyComputedKeys_??=new Map).set(a,()=>c(n,e))}),function(){let e=this[T],n=e.values_.get(a);if(n instanceof jt&&n.derivation!==t){let t=s?.get(this);return t||(t=c(this,e),(s??=new WeakMap).set(this,t)),t.get()}return e.getObservablePropValue_(a)}}function ze(e,{annotationType_:t},r,{get:i}){i||n(`Cannot apply '${t}' to '${e.name_}.${r.toString()}':\n'${t}' can only be used on getter(+setter) properties.`)}function Be(e,t){return{annotationType_:e,options_:t,make_:Ve,extend_:He}}function Ve(e,t,n){return this.extend_(e,t,n,!1)===null?0:1}function He(e,t,n,r){return We(e,this,t,n),e.defineObservableProperty_(t,n.value,this.options_?.enhancer_??he,r)}function Ue(e,t,r){if(r.kind===`field`)throw n(`Please use \`@observable accessor ${String(r.name)}\` instead of \`@observable ${String(r.name)}\``);se(r,[`accessor`]);let i=e,{kind:a,name:o}=r;if(a!==`accessor`)return;function s(e,t){let n=Oi(e)[T];return(n.lazyObservableKeys_??=new Map).set(o,()=>new kt(t,i.options_?.enhancer_??he,`${n.name_}.${o.toString()}`,!1)),n}return{get(){return(this[T]??s(this,t.get.call(this))).getObservablePropValue_(o)},set(e){return(this[T]??s(this,e)).setObservablePropValue_(o,e)},init(e){return s(this,e),e}}}function We(e,{annotationType_:t},r,i){`value`in i||n(`Cannot apply '${t}' to '${e.name_}.${r.toString()}':\n'${t}' cannot be used on getter/setter properties`)}let Ge=Ke();function Ke(e){return{annotationType_:`true`,options_:e,make_:Ye,extend_:Xe}}let qe=[Ge];function Je(e){let t=e.deep!==!1,n=!!e.autoBind,r=!t|(n?2:0);return qe[r]??(qe[r]=Ke({deep:t,autoBind:n}))}function Ye(e,t,n,r){var i;if(n.get)return O.make_(e,t,n,r);if(n.set){let i=Vn(n.set)?n.set:St(t.toString(),n.set);return r===e.target_?e.defineProperty_(t,{configurable:A.safeDescriptors?e.isPlainObject_:!0,set:i})===null?0:2:(a(r,t,{configurable:!0,set:i}),2)}if(r!==e.target_&&typeof n.value==`function`){var o;if(_(n.value)){var s;return((s=this.options_)!=null&&s.autoBind?ur:lr).make_(e,t,n,r)}return((o=this.options_)!=null&&o.autoBind?zn:Ln).make_(e,t,n,r)}let c=this.options_?.deep===!1?ut:D;return typeof n.value==`function`&&(i=this.options_)!=null&&i.autoBind&&(n.value=n.value.bind(e.proxy_??e.target_)),c.make_(e,t,n,r)}function Xe(e,t,n,r){var i;return n.get?O.extend_(e,t,n,r):n.set?e.defineProperty_(t,{configurable:A.safeDescriptors?e.isPlainObject_:!0,set:St(t.toString(),n.set)},r):(typeof n.value==`function`&&(i=this.options_)!=null&&i.autoBind&&(n.value=n.value.bind(e.proxy_??e.target_)),(this.options_?.deep===!1?ut:D).extend_(e,t,n,r))}function Ze(e,t){return r(function(r,i){if(i&&typeof i.kind==`string`)return t(e,r,i);n(`Invalid arguments for \`${e.annotationType_}\``)},e)}let Qe={deep:!0,name:void 0,defaultDecorator:void 0};Object.freeze(Qe);function $e(e){return e||Qe}let et=Be(`observable`),tt=Be(`observable.ref`,{enhancer_:_e}),nt=Be(`observable.shallow`,{enhancer_:ge}),rt=Be(`observable.struct`,{enhancer_:ve});function it(e){return Ze(e,Ue)}function at(e){return e.deep===!0?he:e.deep===!1?_e:st(e.defaultDecorator)}function ot(e){return e?e.defaultDecorator??Je(e):void 0}function st(e){return e?e.options_?.enhancer_??he:he}function ct(e,t,n){return t&&typeof t.kind==`string`?Ue(et,e,t):Sr(e)?e:g(e)?D.object(e,t,n):Array.isArray(e)?D.array(e,t):ee(e)?D.map(e,t):S(e)?D.set(e,t):typeof e==`object`&&e?e:D.box(e,t)}let lt={box(e,t){let n=$e(t);return new kt(e,at(n),n.name,!0,n.equals)},array(e,t){let n=$e(t);return si(e,at(n),n.name)},map(e,t){let n=$e(t);return new _i(e,at(n),n.name)},set(e,t){let n=$e(t);return new Si(e,at(n),n.name)},object(e,t,n){return Li(()=>Qn(Kr({},n),e,t))}},ut=it(tt),dt=it(nt),ft=it(et),pt=it(rt);var D=r(ct,et,lt);let mt=`computed`;function ht(e){return Ze(e,Re)}let gt=Fe(mt),_t=ht(Fe(`computed.struct`,{equals:fe})),O=function(e,t){if(t&&typeof t.kind==`string`)return Re(gt,e,t);if(g(e))return ht(Fe(mt,e));p(e)||n("First argument to `computed` should be an expression."),p(t)&&n("A setter as second argument is no longer supported, use `{ set: fn }` option instead");let r=g(t)?t:{};return r.get=e,r.name||=e.name||``,new jt(r)};r(O,gt);let vt=0,yt=1,bt=i(()=>{},`name`)?.configurable??!1,xt={value:`action`,configurable:!0,writable:!1,enumerable:!1};function St(e,t,r=!1,i){p(t)||n("`action` can only be invoked on functions"),(typeof e!=`string`||!e)&&n(`actions should have valid names, got: '${e}'`);function o(){return Ct(e,r,t,i||this,arguments)}return o.isMobxAction=!0,o.toString=()=>t.toString(),bt&&(xt.value=e,a(o,`name`,xt)),o}function Ct(e,t,n,r,i){let a=wt(e,t,r,i);try{return n.apply(r,i)}catch(e){throw a.error_=e,e}finally{Tt(a)}}function wt(e,t,n,r){let i=Sn()&&!!e,a=0;i&&(a=Date.now(),wn({type:j,name:e,object:n,arguments:r?Array.from(r):s}));let o=A.trackingDerivation,c=!t||!o;sn();let l=A.allowStateChanges;c&&(Wt(),l=Dt(!0));let u=A.allowStateReads;k(!0);let d={runAsAction_:c,prevDerivation_:o,prevAllowStateChanges_:l,prevAllowStateReads_:u,notifySpy_:i,startTime_:a,actionId_:yt++,parentActionId_:vt};return vt=d.actionId_,d}function Tt(e){vt!==e.actionId_&&n(30),vt=e.parentActionId_,e.error_!==void 0&&(A.suppressReactionErrors=!0),Ot(e.prevAllowStateChanges_),Kt(e.prevAllowStateReads_),cn(),e.runAsAction_&&Gt(e.prevDerivation_),e.notifySpy_&&En({time:Date.now()-e.startTime_}),A.suppressReactionErrors=!1}function Et(e,t){let n=Dt(e);try{return t()}finally{Ot(n)}}function Dt(e){let t=A.allowStateChanges;return A.allowStateChanges=e,t}function Ot(e){A.allowStateChanges=e}var kt=class extends ce{constructor(e,t,n=`ObservableValue@`+u(),r=!0,i=me){super(n),this.enhancer_=void 0,this.name_=void 0,this.equals_=void 0,this.hasUnreportedChange_=!1,this.interceptors_=void 0,this.changeListeners_=void 0,this.value_=void 0,this.dehancer=void 0,this.enhancer_=t,this.name_=n,this.equals_=i,this.value_=t(e,void 0,n),r&&Sn()&&Cn({type:`create`,object:this,observableKind:`value`,debugObjectName:this.name_,newValue:this.value_})}dehanceValue(e){return this.dehancer===void 0?e:this.dehancer(e)}set(e){let t=this.value_;if(e=this.prepareNewValue_(e),e!==A.UNCHANGED){let n=Sn();n&&wn({type:ii,object:this,observableKind:`value`,debugObjectName:this.name_,newValue:e,oldValue:t}),this.setNewValue_(e),n&&En()}}prepareNewValue_(e){if(Lt(this),qr(this)){let t=Yr(this,{object:this,type:ii,newValue:e});if(!t)return A.UNCHANGED;e=t.newValue}return e=this.enhancer_(e,this.value_,this.name_),this.equals_(this.value_,e)?A.UNCHANGED:e}setNewValue_(e){let t=this.value_;this.value_=e,this.reportChanged(),Xr(this)&&Qr(this,{type:ii,object:this,newValue:e,oldValue:t})}get(){return this.reportObserved(),this.dehanceValue(this.value_)}raw(){return this.value_}toJSON(){return this.get()}toString(){return`${this.name_}[${this.value_}]`}valueOf(){return ie(this.get())}[Symbol.toPrimitive](){return this.valueOf()}};let At=b(`ObservableValue`,kt);var jt=class{constructor(e){this.dependenciesState_=-1,this.observing_=[],this.newObserving_=null,this.observers_=null,this.runId_=0,this.lastAccessedBy_=0,this.lowestObserverState_=0,this.unboundDepsCount_=0,this.value_=new Nt(null),this.name_=void 0,this.triggeredBy_=void 0,this.flags_=0,this.derivation=void 0,this.setter_=void 0,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@`+u(),e.set&&(this.setter_=St(this.name_+`-setter`,e.set)),this.equals_=e.equals||me,this.scope_=e.context,this.requiresReaction_=e.requiresReaction,this.keepAlive_=!!e.keepAlive}onBecomeStale_(){mn(this)}onBO(){this.onBOL&&this.onBOL.forEach(e=>e())}onBUO(){this.onBUOL&&this.onBUOL.forEach(e=>e())}get isComputing(){return C(this.flags_,1)}set isComputing(e){this.flags_=w(this.flags_,1,e)}get isRunningSetter(){return C(this.flags_,2)}set isRunningSetter(e){this.flags_=w(this.flags_,2,e)}get isBeingObserved(){return C(this.flags_,4)}set isBeingObserved(e){this.flags_=w(this.flags_,4,e)}get isPendingUnobservation(){return C(this.flags_,8)}set isPendingUnobservation(e){this.flags_=w(this.flags_,8,e)}get diffValue(){return+!!C(this.flags_,16)}set diffValue(e){this.flags_=w(this.flags_,16,e===1)}get(){if(this.isComputing&&n(32,this.name_,this.derivation),A.inBatch===0&&(!this.observers_||this.observers_.size===0)&&!this.keepAlive_)Ft(this)&&(this.warnAboutUntrackedRead_(),sn(),this.value_=this.computeValue_(!1),cn());else{let e=this.isBeingObserved;if(dn(this),Ft(this)){let e=A.trackingContext;!e&&(this.keepAlive_||this.isBeingObserved)&&(A.trackingContext=this),this.trackAndCompute()&&pn(this),A.trackingContext=e}else !e&&this.isBeingObserved&&this.observing_.forEach(un)}let e=this.value_;if(Pt(e))throw e.cause;return e}set(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_)}trackAndCompute(){let e=this.value_,t=this.dependenciesState_===-1,n=this.computeValue_(!0),r=t||Pt(e)||Pt(n)||!this.equals_(e,n);return r&&(this.value_=n,Sn()&&Cn({observableKind:`computed`,debugObjectName:this.name_,object:this.scope_,type:`update`,oldValue:e,newValue:n})),r}computeValue_(e){this.isComputing=!0;let t=Dt(!1),n;if(e)n=zt(this,this.derivation,this.scope_);else if(A.disableErrorBoundaries===!0)n=this.derivation.call(this.scope_);else try{n=this.derivation.call(this.scope_)}catch(e){n=new Nt(e)}return Ot(t),this.isComputing=!1,n}suspend_(){this.keepAlive_||(Ht(this),this.value_=void 0)}warnAboutUntrackedRead_(){(typeof this.requiresReaction_==`boolean`?this.requiresReaction_:A.computedRequiresReaction)&&console.warn(`[mobx] Computed value '${this.name_}' is being read outside a reactive context. Doing a full recompute.`)}toString(){return`${this.name_}[${this.derivation.toString()}]`}valueOf(){return ie(this.get())}[Symbol.toPrimitive](){return this.valueOf()}};let Mt=b(`ComputedValue`,jt);var Nt=class{constructor(e){this.cause=void 0,this.cause=e}};function Pt(e){return e instanceof Nt}function Ft(e){switch(e.dependenciesState_){case 0:return!1;case-1:case 2:return!0;case 1:{let t=k(!0),n=Wt(),r=e.observing_,i=r.length;for(let a=0;a<i;a++){let i=r[a];if(Mt(i)){if(A.disableErrorBoundaries)i.get();else try{i.get()}catch{return Gt(n),Kt(t),!0}if(e.dependenciesState_===2)return Gt(n),Kt(t),!0}}return qt(e),Gt(n),Kt(t),!1}}}function It(){return A.trackingDerivation!==null}function Lt(e){let t=!!e.observers_&&e.observers_.size>0;!A.allowStateChanges&&(t||A.enforceActions===`always`)&&console.warn(`[MobX] `+(A.enforceActions?`Since strict-mode is enabled, changing (observed) observable values without using an action is not allowed. Tried to modify: `:`Side effects like changing state are not allowed at this point. Are you trying to modify state from, for example, a computed value or the render function of a React component? You can wrap side effects in 'runInAction' (or decorate functions with 'action') if needed. Tried to modify: `)+e.name_)}function Rt(e){!A.allowStateReads&&A.observableRequiresReaction&&console.warn(`[mobx] Observable '${e.name_}' being read outside a reactive context.`)}function zt(e,t,n){let r=k(!0);qt(e),e.newObserving_=Array(e.runId_===0?100:e.observing_.length),e.unboundDepsCount_=0,e.runId_=++A.runId;let i=A.trackingDerivation;A.trackingDerivation=e,A.inBatch++;let a;if(A.disableErrorBoundaries===!0)a=t.call(n);else try{a=t.call(n)}catch(e){a=new Nt(e)}return A.inBatch--,A.trackingDerivation=i,Vt(e),Bt(e),Kt(r),a}function Bt(e){e.observing_.length===0&&(typeof e.requiresObservable_==`boolean`?e.requiresObservable_:A.reactionRequiresObservable)&&console.warn(`[mobx] Derivation '${e.name_}' is created/updated without reading any observable value.`)}function Vt(e){let t=e.observing_,n=e.observing_=e.newObserving_,r=0,i=0,a=e.unboundDepsCount_;for(let e=0;e<a;e++){let t=n[e];t.diffValue===0&&(t.diffValue=1,i!==e&&(n[i]=t),i++),t.dependenciesState_>r&&(r=t.dependenciesState_)}for(n.length=i,e.newObserving_=null,a=t.length;a--;){let n=t[a];n.diffValue===0&&an(n,e),n.diffValue=0}for(;i--;){let t=n[i];t.diffValue===1&&(t.diffValue=0,rn(t,e))}r!==0&&(e.dependenciesState_=r,e.onBecomeStale_())}function Ht(e){let t=e.observing_;e.observing_=[];let n=t.length;for(;n--;)an(t[n],e);e.dependenciesState_=-1}function Ut(e){let t=Wt();try{return e()}finally{Gt(t)}}function Wt(){let e=A.trackingDerivation;return A.trackingDerivation=null,e}function Gt(e){A.trackingDerivation=e}function k(e){let t=A.allowStateReads;return A.allowStateReads=e,t}function Kt(e){A.allowStateReads=e}function qt(e){if(e.dependenciesState_===0)return;e.dependenciesState_=0;let t=e.observing_,n=t.length;for(;n--;)t[n].lowestObserverState_=0}let Jt=[`mobxGuid`,`spyListeners`,`enforceActions`,`computedRequiresReaction`,`reactionRequiresObservable`,`observableRequiresReaction`,`allowStateReads`,`disableErrorBoundaries`,`runId`,`UNCHANGED`];var Yt=class{constructor(){this.version=7,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.isRunningUnobservations=!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.safeDescriptors=!0}};let Xt=!0,Zt=!1,A=function(){let e=globalThis;return e.__mobxInstanceCount>0&&!e.__mobxGlobals&&(Xt=!1),e.__mobxGlobals&&e.__mobxGlobals.version!==7&&(Xt=!1),Xt?e.__mobxGlobals?(e.__mobxInstanceCount+=1,e.__mobxGlobals.UNCHANGED||(e.__mobxGlobals.UNCHANGED={}),e.__mobxGlobals):(e.__mobxInstanceCount=1,e.__mobxGlobals=new Yt):(setTimeout(()=>{Zt||n(35)},1),new Yt)}();function Qt(){if((A.pendingReactions.length||A.inBatch||A.isRunningReactions)&&n(36),Zt=!0,Xt){let e=globalThis;--e.__mobxInstanceCount===0&&(e.__mobxGlobals=void 0),A=new Yt}}function $t(){return A}function en(){let e=new Yt;for(let t in e)Jt.indexOf(t)===-1&&(A[t]=e[t]);A.allowStateChanges=!A.enforceActions}function tn(e){return!!e.observers_&&e.observers_.size>0}function nn(e){return e.observers_??new Set}function rn(e,t){(e.observers_??=new Set).add(t),e.lowestObserverState_>t.dependenciesState_&&(e.lowestObserverState_=t.dependenciesState_)}function an(e,t){let n=e.observers_;n&&(n.delete(t),n.size===0&&on(e))}function on(e){e.isPendingUnobservation===!1&&(e.isPendingUnobservation=!0,A.pendingUnobservations.push(e))}function sn(){A.inBatch++}function cn(){--A.inBatch===0&&(vn(),!A.isRunningUnobservations&&A.pendingUnobservations.length>0&&ln())}function ln(){A.isRunningUnobservations=!0;try{let e=A.pendingUnobservations;for(let t=0;t<e.length;t++){let n=e[t];n.isPendingUnobservation=!1,(!n.observers_||n.observers_.size===0)&&(n.observers_=null,n.isBeingObserved&&(n.isBeingObserved=!1,n.onBUO()),n instanceof jt&&n.suspend_())}A.pendingUnobservations=[]}finally{A.isRunningUnobservations=!1}}function un(e){var t;e.isBeingObserved||(e.isBeingObserved=!0,e.onBO(),(t=e.observing_)==null||t.forEach(un))}function dn(e){Rt(e);let t=A.trackingDerivation;return t===null?((!e.observers_||e.observers_.size===0)&&A.inBatch>0&&on(e),!1):(t.runId_!==e.lastAccessedBy_&&(e.lastAccessedBy_=t.runId_,t.newObserving_[t.unboundDepsCount_++]=e,!e.isBeingObserved&&A.trackingContext&&(e.isBeingObserved=!0,e.onBO())),e.isBeingObserved)}function fn(e){var t;e.lowestObserverState_!==2&&(e.lowestObserverState_=2,(t=e.observers_)==null||t.forEach(e=>{e.dependenciesState_===0&&e.onBecomeStale_(),e.dependenciesState_=2}))}function pn(e){var t;e.lowestObserverState_!==2&&(e.lowestObserverState_=2,(t=e.observers_)==null||t.forEach(t=>{t.dependenciesState_===1?t.dependenciesState_=2:t.dependenciesState_===0&&(e.lowestObserverState_=0)}))}function mn(e){var t;e.lowestObserverState_===0&&(e.lowestObserverState_=1,(t=e.observers_)==null||t.forEach(e=>{e.dependenciesState_===0&&(e.dependenciesState_=1,e.onBecomeStale_())}))}var hn=class{constructor(e=`Reaction@`+u(),t,n,r){this.name_=void 0,this.onInvalidate_=void 0,this.errorHandler_=void 0,this.requiresObservable_=void 0,this.observing_=[],this.newObserving_=[],this.dependenciesState_=-1,this.runId_=0,this.unboundDepsCount_=0,this.flags_=0,this.removeAbortListener_=void 0,this.name_=e,this.onInvalidate_=t,this.errorHandler_=n,this.requiresObservable_=r}get isDisposed(){return C(this.flags_,1)}set isDisposed(e){this.flags_=w(this.flags_,1,e)}get isScheduled(){return C(this.flags_,2)}set isScheduled(e){this.flags_=w(this.flags_,2,e)}get isTrackPending(){return C(this.flags_,4)}set isTrackPending(e){this.flags_=w(this.flags_,4,e)}get isRunning(){return C(this.flags_,8)}set isRunning(e){this.flags_=w(this.flags_,8,e)}get diffValue(){return+!!C(this.flags_,16)}set diffValue(e){this.flags_=w(this.flags_,16,e===1)}onBecomeStale_(){this.schedule_()}schedule_(){this.isScheduled||(this.isScheduled=!0,A.pendingReactions.push(this),vn())}runReaction_(){if(!this.isDisposed){sn(),this.isScheduled=!1;let e=A.trackingContext;if(A.trackingContext=this,Ft(this)){this.isTrackPending=!0;try{this.onInvalidate_(),this.isTrackPending&&Sn()&&Cn({name:this.name_,type:`scheduled-reaction`})}catch(e){this.reportExceptionInDerivation_(e)}}A.trackingContext=e,cn()}}track(e){if(this.isDisposed)return;sn();let t=Sn(),n;t&&(n=Date.now(),wn({name:this.name_,type:`reaction`})),this.isRunning=!0;let r=A.trackingContext;A.trackingContext=this;let i=zt(this,e,void 0);A.trackingContext=r,this.isRunning=!1,this.isTrackPending=!1,this.isDisposed&&Ht(this),Pt(i)&&this.reportExceptionInDerivation_(i.cause),t&&En({time:Date.now()-n}),cn()}reportExceptionInDerivation_(e){if(this.errorHandler_){this.errorHandler_(e,this);return}if(A.disableErrorBoundaries)throw e;let t=`[mobx] Encountered an uncaught exception that was thrown by a reaction or observer component, in: '${this}'`;A.suppressReactionErrors?console.warn(`[mobx] (error in reaction '${this.name_}' suppressed, fix error of causing action below)`):console.error(t,e),Sn()&&Cn({type:`error`,name:this.name_,message:t,error:``+e}),A.globalReactionErrorHandlers.forEach(t=>t(e,this))}dispose(){if(!this.isDisposed){var e;this.isDisposed=!0,(e=this.removeAbortListener_)==null||e.call(this),this.isRunning||(sn(),Ht(this),cn())}}getDisposer_(e){let t=()=>this.dispose();return e!=null&&e.addEventListener&&!this.isDisposed&&(e.addEventListener(`abort`,t),this.removeAbortListener_=()=>e.removeEventListener==null?void 0:e.removeEventListener(`abort`,t)),t[T]=this,`dispose`in Symbol&&typeof Symbol.dispose==`symbol`&&(t[Symbol.dispose]=t),t}toString(){return`Reaction[${this.name_}]`}};function gn(e){return A.globalReactionErrorHandlers.push(e),()=>{let t=A.globalReactionErrorHandlers.indexOf(e);t>=0&&A.globalReactionErrorHandlers.splice(t,1)}}let _n=e=>e();function vn(){A.inBatch>0||A.isRunningReactions||_n(yn)}function yn(){A.isRunningReactions=!0;let e=A.pendingReactions,t=0;for(;e.length>0;){++t===100&&(console.error(`Reaction doesn't converge to a stable state after 100 iterations. Probably there is a cycle in the reactive function: ${e[0]}`),e.splice(0));let n=e.splice(0);for(let e=0,t=n.length;e<t;e++)n[e].runReaction_()}A.isRunningReactions=!1}let bn=b(`Reaction`,hn);function xn(e){let t=_n;_n=n=>e(()=>t(n))}function Sn(){return!!A.spyListeners.length}function Cn(e){if(!A.spyListeners.length)return;let t=A.spyListeners;for(let n=0,r=t.length;n<r;n++)t[n](e)}function wn(e){Cn(r({},e,{spyReportStart:!0}))}let Tn={type:`report-end`,spyReportEnd:!0};function En(e){Cn(e?r({},e,{type:`report-end`,spyReportEnd:!0}):Tn)}function Dn(e){return A.spyListeners.push(e),d(()=>{A.spyListeners=A.spyListeners.filter(t=>t!==e)})}let j=`action`,On=`autoAction`,kn=`<unnamed action>`,An=we(j),jn=we(`action.bound`,{bound:!0}),Mn=we(On,{autoAction:!0}),Nn=we(`autoAction.bound`,{autoAction:!0,bound:!0});function Pn(e){return Ze(e,De)}function Fn(e){return function(t,r){if(r&&typeof r.kind==`string`)return De(e?Mn:An,t,r);if(p(t))return St(t.name||kn,t,e);if(p(r))return St(t,r,e);if(m(t))return Pn(we(e?On:j,{name:t,autoAction:e}));n("Invalid arguments for `action`")}}let In=Fn(!1);r(In,An);let Ln=Fn(!0);r(Ln,Mn);let Rn=Pn(jn),zn=Pn(Nn);function Bn(e){return Ct(e.name||kn,!1,e,this,void 0)}function Vn(e){return p(e)&&e.isMobxAction===!0}function Hn(e,t=c){var r;p(e)||n(`Autorun expects a function as first argument`),Vn(e)&&n(`Autorun does not accept actions since actions are untrackable`);let i=t?.name??(e.name||`Autorun@`+u()),a=!t.scheduler&&!t.delay,o;if(a)o=new hn(i,function(){this.track(s)},t.onError,t.requiresObservable);else{let e=Wn(t),n=!1;o=new hn(i,()=>{n||(n=!0,e(()=>{n=!1,o.isDisposed||o.track(s)}))},t.onError,t.requiresObservable)}function s(){e(o)}return t!=null&&(r=t.signal)!=null&&r.aborted||o.schedule_(),o.getDisposer_(t?.signal)}let Un=e=>e();function Wn(e){return e.scheduler?e.scheduler:e.delay?t=>setTimeout(t,e.delay):Un}function Gn(e,t,r=c){var i;(!p(e)||!p(t))&&n(`First and second argument to reaction should be functions`),g(r)||n(`Third argument of reactions should be an object`);let a=r.name??`Reaction@`+u(),o=In(a,r.onError?Kn(r.onError,t):t),s=!r.scheduler&&!r.delay,l=Wn(r),d=!0,f=!1,m,h=r.equals||me,_=new hn(a,()=>{d||s?v():f||(f=!0,l(v))},r.onError,r.requiresObservable);function v(){if(f=!1,_.isDisposed)return;let t=!1,n=m;_.track(()=>{let n=Et(!1,()=>e(_));t=d||!h(m,n),m=n}),(d&&r.fireImmediately||!d&&t)&&o(m,n,_),d=!1}return r!=null&&(i=r.signal)!=null&&i.aborted||_.schedule_(),_.getDisposer_(r?.signal)}function Kn(e,t){return function(){try{return t.apply(this,arguments)}catch(t){e.call(this,t)}}}function qn(e,t,n){return Yn(`onBO`,e,t,n)}function Jn(e,t,n){return Yn(`onBUO`,e,t,n)}function Yn(e,t,n,r){let i=typeof r==`function`?Pi(t,n):Pi(t),a=p(r)?r:n,o=`${e}L`;return i[o]?i[o].add(a):i[o]=new Set([a]),function(){let e=i[o];e&&(e.delete(a),e.size===0&&delete i[o])}}let Xn=`always`;function Zn(e){e.isolateGlobalState===!0&&Qt();let{enforceActions:t}=e;if(t!==void 0){let e=t===Xn?Xn:t===`observed`;A.enforceActions=e,A.allowStateChanges=!(e===!0||e===Xn)}[`computedRequiresReaction`,`reactionRequiresObservable`,`observableRequiresReaction`,`disableErrorBoundaries`,`safeDescriptors`].forEach(t=>{t in e&&(A[t]=!!e[t])}),A.allowStateReads=!A.observableRequiresReaction,A.disableErrorBoundaries===!0&&console.warn("WARNING: Debug feature only. MobX will NOT recover from errors when `disableErrorBoundaries` is enabled."),e.reactionScheduler&&xn(e.reactionScheduler)}function Qn(e,t,r,i){arguments.length>4&&n(`'extendObservable' expected 2-4 arguments`),typeof e!=`object`&&n(`'extendObservable' expects an object as first argument`),vi(e)&&n(`'extendObservable' should not be used on maps, use map.merge instead`),g(t)||n(`'extendObservable' only accepts plain objects as second argument`),(Sr(t)||Sr(r))&&n(`Extending an object with another observable (object) is not supported`);let a=oe(t);return Li(()=>{let t=Oi(e,i)[T];ne(a).forEach(e=>{t.extend_(e,a[e],r&&e in r?r[e]:!0)})}),e}function $n(e,t){return er(Pi(e,t))}function er(e){let t={name:e.name_};return e.observing_&&e.observing_.length>0&&(t.dependencies=nr(e.observing_).map(er)),t}function tr(e,t){return M(Pi(e,t))}function M(e){let t={name:e.name_};return tn(e)&&(t.observers=Array.from(nn(e),M)),t}function nr(e){return Array.from(new Set(e))}let rr=0;var ir=class extends Error{constructor(){super(`FLOW_CANCELLED`),Object.setPrototypeOf(this,new.target.prototype),this.name=`FlowCancellationError`}toString(){return`Error: ${this.message}`}};function ar(e){return e instanceof ir}function or(e){return Ze(e,Ne)}let sr=Ae(`flow`),cr=Ae(`flow.bound`,{bound:!0}),lr=r(function(e,t){if(t&&typeof t.kind==`string`)return Ne(sr,e,t);arguments.length!==1&&n(`Flow expects single argument with generator function`);let r=e,i=r.name||`<unnamed flow>`,a=function(){let e=this,t=arguments,n=++rr,a=In(`${i} - runid: ${n} - init`,r).apply(e,t),o,s,c=new Promise(function(e,t){let r=0;o=t;function c(e){s=void 0;let o;try{o=In(`${i} - runid: ${n} - yield ${r++}`,a.next).call(a,e)}catch(e){return t(e)}u(o)}function l(e){s=void 0;let o;try{o=In(`${i} - runid: ${n} - yield ${r++}`,a.throw).call(a,e)}catch(e){return t(e)}u(o)}function u(n){if(p(n?.then)){n.then(u,t);return}return n.done?e(n.value):(s=Promise.resolve(n.value),s.then(c,l))}c(void 0)});return c.cancel=In(`${i} - runid: ${n} - cancel`,function(){try{s&&dr(s);let e=a.return(void 0),t=Promise.resolve(e.value);t.then(f,f),dr(t),o(new ir)}catch(e){o(e)}}),c};return a.isMobXFlow=!0,a},sr),ur=or(cr);function dr(e){p(e.cancel)&&e.cancel()}function fr(e){return e}function pr(e){return e?.isMobXFlow===!0}function mr(e,t,r){let i;if(vi(e)||mi(e)||At(e))i=Fi(e);else if(ji(e)){if(!m(t))return n(`InterceptReads can only be used with a specific property, not with an object in general`);i=Fi(e,t)}else return n(`Expected observable map, object or array as first array`);return i.dehancer===void 0?(i.dehancer=typeof t==`function`?t:r,()=>{i.dehancer=void 0}):n(`An intercept reader was already established`)}function hr(e,t,n){return p(n)?_r(e,t,n):gr(e,t)}function gr(e,t){return Jr(Fi(e),t)}function _r(e,t,n){return Jr(Fi(e,t),n)}function vr(e,t){var n;if(t===void 0)return Mt(e);if(ji(e)===!1)return!1;let r=e[T];return(n=r.lazyComputedKeys_)!=null&&n.has(t)?!0:r.values_.has(t)?Mt(Pi(e,t)):!1}function yr(e){return arguments.length>1?n(`isComputed expects only 1 argument. Use isComputedProp to inspect the observability of a property`):vr(e)}function br(e,t){return m(t)?vr(e,t):n(`isComputed expected a property name as second argument`)}function xr(e,t){if(!e)return!1;if(t!==void 0){if(vi(e)||mi(e))return n(`isObservable(object, propertyName) is not supported for arrays and maps. Use map.has or array.length instead.`);if(ji(e)){var r,i;let n=e[T];return n.values_.has(t)||!!((r=n.lazyComputedKeys_)!=null&&r.has(t))||!!((i=n.lazyObservableKeys_)!=null&&i.has(t))}return!1}return ji(e)||!!e[T]||le(e)||bn(e)||Mt(e)}function Sr(e){return arguments.length!==1&&n(`isObservable expects only 1 argument. Use isObservableProp to inspect the observability of a property`),xr(e)}function Cr(e,t){return m(t)?xr(e,t):n(`expected a property name as second argument`)}function wr(e){if(ji(e))return e[T].keys_();if(vi(e)||Ci(e))return Array.from(e.keys());if(mi(e))return e.map((e,t)=>t);n(5)}function Tr(e){if(ji(e))return wr(e).map(t=>e[t]);if(vi(e))return wr(e).map(t=>e.get(t));if(Ci(e))return Array.from(e.values());if(mi(e))return e.slice();n(6)}function Er(e){if(ji(e))return wr(e).map(t=>[t,e[t]]);if(vi(e))return wr(e).map(t=>[t,e.get(t)]);if(Ci(e))return Array.from(e.entries());if(mi(e))return e.map((e,t)=>[t,e]);n(7)}function Dr(e,t,r){if(arguments.length===2&&!Ci(e)){sn();let n=t;try{for(let t in n)Dr(e,t,n[t])}finally{cn()}return}ji(e)?e[T].set_(t,r):vi(e)?e.set(t,r):Ci(e)?e.add(t):mi(e)?(typeof t!=`number`&&(t=parseInt(t,10)),t<0&&n(42,t),sn(),t>=e.length&&(e.length=t+1),e[t]=r,cn()):n(8)}function Or(e,t){ji(e)?e[T].delete_(t):vi(e)||Ci(e)?e.delete(t):mi(e)?(typeof t!=`number`&&(t=parseInt(t,10)),e.splice(t,1)):n(9)}function kr(e,t){if(ji(e))return e[T].has_(t);if(vi(e)||Ci(e))return e.has(t);if(mi(e))return t>=0&&t<e.length;n(10)}function Ar(e,t){if(kr(e,t)){if(ji(e))return e[T].get_(t);if(vi(e))return e.get(t);if(mi(e))return e[t];n(11)}}function jr(e,t,r){if(ji(e))return e[T].defineProperty_(t,r);n(39)}function Mr(e){if(ji(e))return e[T].ownKeys_();n(38)}function Nr(e,t,n,r){return p(n)?Fr(e,t,n,r):Pr(e,t,n)}function Pr(e,t,r){let i=Fi(e);if(mi(e))r&&t({observableKind:`array`,object:i.proxy_,debugObjectName:i.atom_.name_,type:`splice`,index:0,added:i.values_.slice(),addedCount:i.values_.length,removed:[],removedCount:0});else if(vi(e))r===!0&&n("`observe` doesn't support fireImmediately=true in combination with maps.");else if(Ci(e))r===!0&&n("`observe` doesn't support fireImmediately=true in combination with sets.");else if(ji(e))r===!0&&n("`observe` doesn't support the fire immediately property for observable objects.");else return Ir(i,t,r);return Zr(i,t)}function Fr(e,t,n,r){return Ir(Fi(e,t),n,r)}function Ir(e,t,n){if(Mt(e)){let r=!0,i;return Hn(()=>{let a=e.get();if(!r||n){let n=Wt();t({observableKind:`computed`,debugObjectName:e.name_,type:ii,object:e,newValue:a,oldValue:i}),Gt(n)}r=!1,i=a})}return n&&t({observableKind:`value`,debugObjectName:e.name_,object:e,type:ii,newValue:e.value_,oldValue:void 0}),Zr(e,t)}function Lr(e,t,n){return e.set(t,n),n}function Rr(e,t){if(typeof e!=`object`||!e||e instanceof Date||!Sr(e))return e;if(At(e)||Mt(e))return Rr(e.get(),t);if(t.has(e))return t.get(e);if(mi(e)){let n=Lr(t,e,Array(e.length));return e.forEach((e,r)=>{n[r]=Rr(e,t)}),n}if(Ci(e)){let n=Lr(t,e,new Set);return e.forEach(e=>{n.add(Rr(e,t))}),n}if(vi(e)){let n=Lr(t,e,new Map);return e.forEach((e,r)=>{n.set(r,Rr(e,t))}),n}else{let n=Lr(t,e,{});return Mr(e).forEach(r=>{o.propertyIsEnumerable.call(e,r)&&(n[r]=Rr(e[r],t))}),n}}function zr(e,t){return t&&n(`toJS no longer supports options`),Rr(e,new Map)}function Br(e,t=void 0){sn();try{return e.apply(t)}finally{cn()}}function Vr(e,t,n){return arguments.length===1||t&&typeof t==`object`?Ur(e,t):Hr(e,t,n||{})}function Hr(e,t,n){let r;if(typeof n.timeout==`number`){let e=Error(`WHEN_TIMEOUT`);r=setTimeout(()=>{if(!a[T].isDisposed)if(a(),n.onError)n.onError(e);else throw e},n.timeout)}n.name=n.name||`When@`+u();let i=St(n.name+`-effect`,t);var a=Hn(t=>{Et(!1,e)&&(t.dispose(),r&&clearTimeout(r),i())},n);return a}function Ur(e,t){var i;if(t&&t.onError)return n(`the options 'onError' and 'promise' cannot be combined`);if(t!=null&&(i=t.signal)!=null&&i.aborted)return r(Promise.reject(Error(`WHEN_ABORTED`)),{cancel:()=>null});let a,o,s=new Promise((n,i)=>{var s;let c=Hr(e,n,r({},t,{onError:i}));a=()=>{c(),i(Error(`WHEN_CANCELLED`))},o=()=>{c(),i(Error(`WHEN_ABORTED`))},t==null||(s=t.signal)==null||s.addEventListener==null||s.addEventListener(`abort`,o)}).finally(()=>{var e;return t==null||(e=t.signal)==null||e.removeEventListener==null?void 0:e.removeEventListener(`abort`,o)});return s.cancel=a,s}function Wr(e){return e[T]}let Gr={has(e,t){return Wr(e).has_(t)},get(e,t){return Wr(e).get_(t)},set(e,t,n){return m(t)?Wr(e).set_(t,n,!0)??!0:!1},deleteProperty(e,t){return m(t)?Wr(e).delete_(t,!0)??!0:!1},defineProperty(e,t,n){return Wr(e).defineProperty_(t,n)??!0},ownKeys(e){return Wr(e).ownKeys_()},preventExtensions(e){n(13)}};function Kr(e,t){var n;return e=Oi(e,t),(n=e[T]).proxy_??(n.proxy_=new Proxy(e,Gr))}function qr(e){return e.interceptors_!==void 0&&e.interceptors_.length>0}function Jr(e,t){let n=e.interceptors_;return n?n.push(t):n=e.interceptors_=[t],d(()=>{let e=n.indexOf(t);e!==-1&&n.splice(e,1)})}function Yr(e,t){let r=Wt();try{let r=[...e.interceptors_||[]];for(let e=0,i=r.length;e<i&&(t=r[e](t),t&&!t.type&&n(14),t);e++);return t}finally{Gt(r)}}function Xr(e){return e.changeListeners_!==void 0&&e.changeListeners_.length>0}function Zr(e,t){let n=e.changeListeners_;return n?n.push(t):n=e.changeListeners_=[t],d(()=>{let e=n.indexOf(t);e!==-1&&n.splice(e,1)})}function Qr(e,t){let n=Wt(),r=e.changeListeners_;if(r){r=r.slice();for(let e=0,n=r.length;e<n;e++)r[e](t);Gt(n)}}function $r(e,t,n){return Li(()=>{let r=Oi(e,n)[T];ne(t).forEach(e=>ni(r,e,t[e]))}),e}let ei=Symbol(`mobx-keys`);function ti(e,t,r){return!g(e)&&!g(Object.getPrototypeOf(e))&&n(`'makeAutoObservable' can only be used for classes that don't have a superclass`),ji(e)&&n(`makeAutoObservable can only be used on objects not already made observable`),g(e)?Qn(e,e,t,r):(Li(()=>{let n=Oi(e,r)[T];if(!e[ei]){let t=Object.getPrototypeOf(e),n=new Set([...ne(e),...ne(t)]);n.delete(`constructor`),n.delete(T),v(t,ei,n)}e[ei].forEach(e=>ni(n,e,t&&e in t?t[e]:!0))}),e)}function ni(e,t,r){if(r===!0&&(r=e.defaultAnnotation_),r===!1)return;Ni(e,r,t),t in e.target_||n(1,r.annotationType_,`${e.name_}.${t.toString()}`);let a=e.target_;for(;a&&a!==o;){let n=i(a,t);if(n){let i=r.make_(e,t,n,a);if(i===0)return;if(i===1)break}a=Object.getPrototypeOf(a)}Mi(e,r,t)}let ri=`splice`,ii=`update`,ai={get(e,t){let n=e[T];return t===T?n:t===`length`?n.getArrayLength_():typeof t==`string`&&!isNaN(t)?n.get_(parseInt(t)):ae(ci,t)?ci[t]:e[t]},set(e,t,n){let r=e[T];return t===`length`?r.setArrayLength_(n):typeof t==`symbol`||isNaN(t)?e[t]=n:r.set_(parseInt(t),n),!0},preventExtensions(){n(15)}};var oi=class{constructor(e=`ObservableArray@`+u(),t,n){this.owned_=void 0,this.atom_=void 0,this.values_=[],this.interceptors_=void 0,this.changeListeners_=void 0,this.enhancer_=void 0,this.dehancer=void 0,this.proxy_=void 0,this.lastKnownLength_=0,this.owned_=n,this.atom_=new ce(e),this.enhancer_=(n,r)=>t(n,r,e+`[..]`)}dehanceValue_(e){return this.dehancer===void 0?e:this.dehancer(e)}dehanceValues_(e){return this.dehancer!==void 0&&e.length>0?e.map(this.dehancer):e}getArrayLength_(){return this.atom_.reportObserved(),this.values_.length}setArrayLength_(e){(!Number.isInteger(e)||e<0)&&n(40,e);let t=this.values_.length;if(e!==t)if(e>t){let n=Array.from({length:e-t});this.spliceWithArray_(t,0,n)}else this.spliceWithArray_(e,t-e)}updateArrayLength_(e,t){e!==this.lastKnownLength_&&n(16),this.lastKnownLength_+=t}spliceWithArray_(e,t,n){Lt(this.atom_);let r=this.values_.length;if(e===void 0?e=0:e>r?e=r:e<0&&(e=Math.max(0,r+e)),t=arguments.length===1?r-e:t==null?0:Math.max(0,Math.min(t,r-e)),n===void 0&&(n=s),qr(this)){let r=Yr(this,{object:this.proxy_,type:ri,index:e,removedCount:t,added:n});if(!r)return s;t=r.removedCount,n=r.added}n=n.length===0?n:n.map(e=>this.enhancer_(e,void 0));{let e=n.length-t;this.updateArrayLength_(r,e)}let i=this.spliceItemsIntoValues_(e,t,n);return(t!==0||n.length!==0)&&this.notifyArraySplice_(e,n,i),this.dehanceValues_(i)}spliceItemsIntoValues_(e,t,n){if(n.length<1e4)return this.values_.splice(e,t,...n);{let r=this.values_.slice(e,e+t),i=this.values_.slice(e+t);this.values_.length+=n.length-t;for(let t=0;t<n.length;t++)this.values_[e+t]=n[t];for(let t=0;t<i.length;t++)this.values_[e+n.length+t]=i[t];return r}}notifyArrayChildUpdate_(e,t,n){let r=!this.owned_&&Sn(),i=Xr(this),a=i||r?{observableKind:`array`,object:this.proxy_,type:ii,debugObjectName:this.atom_.name_,index:e,newValue:t,oldValue:n}:null;r&&wn(a),this.atom_.reportChanged(),i&&Qr(this,a),r&&En()}notifyArraySplice_(e,t,n){let r=!this.owned_&&Sn(),i=Xr(this),a=i||r?{observableKind:`array`,object:this.proxy_,debugObjectName:this.atom_.name_,type:ri,index:e,removed:n,added:t,removedCount:n.length,addedCount:t.length}:null;r&&wn(a),this.atom_.reportChanged(),i&&Qr(this,a),r&&En()}get_(e){return this.atom_.reportObserved(),this.dehanceValue_(this.values_[e])}set_(e,t){let n=this.values_;if(e<n.length){Lt(this.atom_);let r=n[e];if(qr(this)){let n=Yr(this,{type:ii,object:this.proxy_,index:e,newValue:t});if(!n)return;t=n.newValue}t=this.enhancer_(t,r),t!==r&&(n[e]=t,this.notifyArrayChildUpdate_(e,t,r))}else{let r=Array.from({length:e+1-n.length});r[r.length-1]=t,this.spliceWithArray_(n.length,0,r)}}};function si(e,t,n=`ObservableArray@`+u(),r=!1){return Li(()=>{let i=new oi(n,t,r);y(i.values_,T,i);let a=new Proxy(i.values_,ai);return i.proxy_=a,e&&e.length&&i.spliceWithArray_(0,0,e),a})}var ci={clear(){return this.splice(0)},replace(e){let t=this[T];return t.spliceWithArray_(0,t.values_.length,e)},toJSON(){return this.slice()},splice(e,t,...n){let r=this[T];switch(arguments.length){case 0:return[];case 1:return r.spliceWithArray_(e);case 2:return r.spliceWithArray_(e,t)}return r.spliceWithArray_(e,t,n)},spliceWithArray(e,t,n){return this[T].spliceWithArray_(e,t,n)},push(...e){let t=this[T];return t.spliceWithArray_(t.values_.length,0,e),t.values_.length},pop(){return this.splice(Math.max(this[T].values_.length-1,0),1)[0]},shift(){return this.splice(0,1)[0]},unshift(...e){let t=this[T];return t.spliceWithArray_(0,0,e),t.values_.length},reverse(){return A.trackingDerivation&&n(37,`reverse`),this.replace(this.slice().reverse()),this},sort(){A.trackingDerivation&&n(37,`sort`);let e=this.slice();return e.sort.apply(e,arguments),this.replace(e),this},remove(e){let t=this[T],n=t.dehanceValues_(t.values_).indexOf(e);return n>-1?(this.splice(n,1),!0):!1}};li(`at`,ui),li(`concat`,ui),li(`flat`,ui),li(`includes`,ui),li(`indexOf`,ui),li(`join`,ui),li(`lastIndexOf`,ui),li(`slice`,ui),li(`toString`,ui),li(`toLocaleString`,ui),li(`toSorted`,ui),li(`toSpliced`,ui),li(`with`,ui),li(`every`,di),li(`filter`,di),li(`find`,di),li(`findIndex`,di),li(`findLast`,di),li(`findLastIndex`,di),li(`flatMap`,di),li(`forEach`,di),li(`map`,di),li(`some`,di),li(`toReversed`,di),li(`reduce`,fi),li(`reduceRight`,fi);function li(e,t){typeof Array.prototype[e]==`function`&&(ci[e]=t(e))}function ui(e){return function(){let t=this[T];t.atom_.reportObserved();let n=t.dehanceValues_(t.values_);return n[e].apply(n,arguments)}}function di(e){return function(t,n){let r=this[T];return r.atom_.reportObserved(),r.dehanceValues_(r.values_)[e]((e,r)=>t.call(n,e,r,this))}}function fi(e){return function(){let t=this[T];t.atom_.reportObserved();let n=t.dehanceValues_(t.values_),r=arguments[0];return arguments[0]=(e,t,n)=>r(e,t,n,this),n[e].apply(n,arguments)}}let pi=b(`ObservableArrayAdministration`,oi);function mi(e){return h(e)&&pi(e[T])}let hi={},gi=`delete`;var _i=class{constructor(e,t=he,n=`ObservableMap@`+u()){this.enhancer_=void 0,this.name_=void 0,this[T]=hi,this.data_=void 0,this.hasMap_=void 0,this.keysAtom_=void 0,this.interceptors_=void 0,this.changeListeners_=void 0,this.dehancer=void 0,this.enhancer_=t,this.name_=n,Li(()=>{this.keysAtom_=ue(`${this.name_}.keys()`),this.data_=new Map,this.hasMap_=new Map,e&&this.merge(e)})}has_(e){return this.data_.has(e)}has(e){if(!A.trackingDerivation)return this.has_(e);let t=this.hasMap_.get(e);if(!t){let n=t=new kt(this.has_(e),_e,`${this.name_}.${re(e)}?`,!1);this.hasMap_.set(e,n),n.onBUOL=new Set([()=>this.hasMap_.delete(e)])}return t.get()}set(e,t){let n=this.has_(e);if(qr(this)){let r=Yr(this,{type:n?ii:`add`,object:this,newValue:t,name:e});if(!r)return this;t=r.newValue}return n?this.updateValue_(e,t):this.addValue_(e,t),this}delete(e){if(Lt(this.keysAtom_),qr(this)&&!Yr(this,{type:gi,object:this,name:e}))return!1;if(this.has_(e)){let t=Sn(),n=Xr(this),r=n||t?{observableKind:`map`,debugObjectName:this.name_,type:gi,object:this,oldValue:this.data_.get(e).value_,name:e}:null;return t&&wn(r),Br(()=>{var t;this.keysAtom_.reportChanged(),(t=this.hasMap_.get(e))==null||t.setNewValue_(!1),this.data_.get(e).setNewValue_(void 0),this.data_.delete(e)}),n&&Qr(this,r),t&&En(),!0}return!1}updateValue_(e,t){let n=this.data_.get(e);if(t=n.prepareNewValue_(t),t!==A.UNCHANGED){let r=Sn(),i=Xr(this),a=i||r?{observableKind:`map`,debugObjectName:this.name_,type:ii,object:this,oldValue:n.value_,name:e,newValue:t}:null;r&&wn(a),n.setNewValue_(t),i&&Qr(this,a),r&&En()}}addValue_(e,t){Lt(this.keysAtom_),Br(()=>{var n;let r=new kt(t,this.enhancer_,`${this.name_}.${re(e)}`,!1);this.data_.set(e,r),t=r.value_,(n=this.hasMap_.get(e))==null||n.setNewValue_(!0),this.keysAtom_.reportChanged()});let n=Sn(),r=Xr(this),i=r||n?{observableKind:`map`,debugObjectName:this.name_,type:`add`,object:this,name:e,newValue:t}:null;n&&wn(i),r&&Qr(this,i),n&&En()}get(e){return this.has(e)?this.dehanceValue_(this.data_.get(e).get()):this.dehanceValue_(void 0)}getOrInsert(e,t){return this.has(e)||this.set(e,t),this.get(e)}getOrInsertComputed(e,t){return this.has(e)||this.set(e,t(e)),this.get(e)}dehanceValue_(e){return this.dehancer===void 0?e:this.dehancer(e)}keys(){return this.keysAtom_.reportObserved(),this.data_.keys()}values(){let e=this,t=this.keys();return yi({next(){let{done:n,value:r}=t.next();return{done:n,value:n?void 0:e.get(r)}}})}entries(){let e=this,t=this.keys();return yi({next(){let{done:n,value:r}=t.next();return{done:n,value:n?void 0:[r,e.get(r)]}}})}[Symbol.iterator](){return this.entries()}forEach(e,t){for(let[n,r]of this)e.call(t,r,n,this)}merge(e){return vi(e)&&(e=new Map(e)),Br(()=>{g(e)?te(e).forEach(t=>this.set(t,e[t])):Array.isArray(e)?e.forEach(([e,t])=>this.set(e,t)):ee(e)?(x(e)||n(19,e),e.forEach((e,t)=>this.set(t,e))):e!=null&&n(20,e)}),this}clear(){Br(()=>{Ut(()=>{for(let e of this.keys())this.delete(e)})})}replace(e){return Br(()=>{let t=bi(e),n=new Map,r=!1;for(let e of this.data_.keys())if(!t.has(e))if(this.delete(e))r=!0;else{let t=this.data_.get(e);n.set(e,t)}for(let[e,i]of t.entries()){let t=this.data_.has(e);if(this.set(e,i),this.data_.has(e)){let i=this.data_.get(e);n.set(e,i),t||(r=!0)}}if(!r)if(this.data_.size!==n.size)this.keysAtom_.reportChanged();else{let e=this.data_.keys(),t=n.keys(),r=e.next(),i=t.next();for(;!r.done;){if(r.value!==i.value){this.keysAtom_.reportChanged();break}r=e.next(),i=t.next()}}this.data_=n}),this}get size(){return this.keysAtom_.reportObserved(),this.data_.size}toString(){return`[object ObservableMap]`}toJSON(){return Array.from(this)}get[Symbol.toStringTag](){return`Map`}},vi=b(`ObservableMap`,_i);function yi(e){return e[Symbol.toStringTag]=`MapIterator`,Ui(e)}function bi(e){if(ee(e)||vi(e))return e;if(Array.isArray(e))return new Map(e);if(g(e)){let t=new Map;for(let n in e)t.set(n,e[n]);return t}else return n(21,e)}let xi={};var Si=class{constructor(e,t=he,n=`ObservableSet@`+u()){this.name_=void 0,this[T]=xi,this.data_=new Set,this.atom_=void 0,this.changeListeners_=void 0,this.interceptors_=void 0,this.dehancer=void 0,this.enhancer_=void 0,this.name_=n,this.enhancer_=(e,r)=>t(e,r,n),Li(()=>{this.atom_=ue(this.name_),e&&this.replace(e)})}dehanceValue_(e){return this.dehancer===void 0?e:this.dehancer(e)}clear(){Br(()=>{Ut(()=>{for(let e of this.data_.values())this.delete(e)})})}forEach(e,t){for(let n of this)e.call(t,n,n,this)}get size(){return this.atom_.reportObserved(),this.data_.size}add(e){if(Lt(this.atom_),qr(this)){let t=Yr(this,{type:`add`,object:this,newValue:e});if(!t)return this;e=t.newValue}if(!this.has(e)){Br(()=>{e=this.enhancer_(e,void 0),this.data_.add(e),this.atom_.reportChanged()});let t=Sn(),n=Xr(this),r=n||t?{observableKind:`set`,debugObjectName:this.name_,type:`add`,object:this,newValue:e}:null;t&&wn(r),n&&Qr(this,r),t&&En()}return this}delete(e){if(qr(this)&&!Yr(this,{type:gi,object:this,oldValue:e}))return!1;if(this.has(e)){let t=Sn(),n=Xr(this),r=n||t?{observableKind:`set`,debugObjectName:this.name_,type:gi,object:this,oldValue:e}:null;return t&&wn(r),Br(()=>{this.atom_.reportChanged(),this.data_.delete(e)}),n&&Qr(this,r),t&&En(),!0}return!1}has(e){return this.atom_.reportObserved(),this.data_.has(this.dehanceValue_(e))}entries(){let e=this.values();return wi({next(){let{value:t,done:n}=e.next();return n?{value:void 0,done:n}:{value:[t,t],done:n}}})}keys(){return this.values()}values(){this.atom_.reportObserved();let e=this,t=this.data_.values();return wi({next(){let{value:n,done:r}=t.next();return r?{value:void 0,done:r}:{value:e.dehanceValue_(n),done:r}}})}intersection(e){return new Set(this).intersection(e)}union(e){return new Set(this).union(e)}difference(e){return new Set(this).difference(e)}symmetricDifference(e){return new Set(this).symmetricDifference(e)}isSubsetOf(e){return new Set(this).isSubsetOf(e)}isSupersetOf(e){return new Set(this).isSupersetOf(e)}isDisjointFrom(e){return new Set(this).isDisjointFrom(e)}replace(e){return Ci(e)&&(e=new Set(e)),Array.isArray(e)||S(e)?Br(()=>{let t=S(e)?e:new Set(e);if(t.size===0){this.clear();return}if(this.data_.size===0){t.forEach(e=>this.add(e));return}for(let e of this.data_.values())t.has(this.dehanceValue_(e))||this.delete(e);t.forEach(e=>this.add(e))}):e!=null&&n(41,e),this}toJSON(){return Array.from(this)}toString(){return`[object ObservableSet]`}[Symbol.iterator](){return this.values()}get[Symbol.toStringTag](){return`Set`}},Ci=b(`ObservableSet`,Si);function wi(e){return e[Symbol.toStringTag]=`SetIterator`,Ui(e)}let Ti=Object.create(null),Ei=`remove`;var Di=class{constructor(e,t=new Map,r,i=Ge){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.lazyComputedKeys_=void 0,this.lazyObservableKeys_=void 0,this.target_=e,this.values_=t,this.name_=r,this.defaultAnnotation_=i,this.keysAtom_=new ce(`${this.name_}.keys`),this.isPlainObject_=g(this.target_),Gi(this.defaultAnnotation_)||n(`defaultAnnotation must be valid annotation`),this.appliedAnnotations_={}}getObservablePropValue_(e){return(this.values_.get(e)??this.materializeLazyComputed_(e)??this.materializeLazyObservable_(e)).get()}materializeLazyComputed_(e){let t=this.lazyComputedKeys_?.get(e);if(!t)return;this.lazyComputedKeys_.delete(e),this.lazyComputedKeys_.size===0&&(this.lazyComputedKeys_=void 0);let n=t();return this.values_.set(e,n),n}materializeLazyObservable_(e){let t=this.lazyObservableKeys_?.get(e);if(!t)return;this.lazyObservableKeys_.delete(e),this.lazyObservableKeys_.size===0&&(this.lazyObservableKeys_=void 0);let n=t();return this.values_.set(e,n),n}setObservablePropValue_(e,t){let n=this.values_.get(e)??this.materializeLazyComputed_(e)??this.materializeLazyObservable_(e);if(n instanceof jt)return n.set(t),!0;if(qr(this)){let n=Yr(this,{type:ii,object:this.proxy_||this.target_,name:e,newValue:t});if(!n)return null;t=n.newValue}if(t=n.prepareNewValue_(t),t!==A.UNCHANGED){let r=Xr(this),i=Sn(),a=r||i?{type:ii,observableKind:`object`,debugObjectName:this.name_,object:this.proxy_||this.target_,oldValue:n.value_,name:e,newValue:t}:null;i&&wn(a),n.setNewValue_(t),r&&Qr(this,a),i&&En()}return!0}get_(e){return A.trackingDerivation&&!ae(this.target_,e)&&this.has_(e),this.target_[e]}set_(e,t,n=!1){return ae(this.target_,e)?this.values_.has(e)?this.setObservablePropValue_(e,t):n?Reflect.set(this.target_,e,t):(this.target_[e]=t,!0):this.extend_(e,{value:t,enumerable:!0,writable:!0,configurable:!0},this.defaultAnnotation_,n)}has_(e){if(!A.trackingDerivation)return e in this.target_;this.pendingKeys_||=new Map;let t=this.pendingKeys_.get(e);return t||(t=new kt(e in this.target_,_e,`${this.name_}.${re(e)}?`,!1),this.pendingKeys_.set(e,t)),t.get()}extend_(e,t,n,r=!1){if(n===!0&&(n=this.defaultAnnotation_),n===!1)return this.defineProperty_(e,t,r);Ni(this,n,e);let i=n.extend_(this,e,t,r);return i&&Mi(this,n,e),i}defineProperty_(e,t,n=!1){Lt(this.keysAtom_);try{sn();let i=this.delete_(e);if(!i)return i;if(qr(this)){let n=Yr(this,{object:this.proxy_||this.target_,name:e,type:`add`,newValue:t.value});if(!n)return null;let{newValue:i}=n;t.value!==i&&(t=r({},t,{value:i}))}if(n){if(!Reflect.defineProperty(this.target_,e,t))return!1}else a(this.target_,e,t);this.notifyPropertyAddition_(e,t.value)}finally{cn()}return!0}defineObservableProperty_(e,t,n,r=!1){Lt(this.keysAtom_);try{sn();let i=this.delete_(e);if(!i)return i;if(qr(this)){let n=Yr(this,{object:this.proxy_||this.target_,name:e,type:`add`,newValue:t});if(!n)return null;t=n.newValue}let o=Ai(e),s={configurable:A.safeDescriptors?this.isPlainObject_:!0,enumerable:!0,get:o.get,set:o.set};if(r){if(!Reflect.defineProperty(this.target_,e,s))return!1}else a(this.target_,e,s);let c=new kt(t,n,`${this.name_}.${e.toString()}`,!1);this.values_.set(e,c),this.notifyPropertyAddition_(e,c.value_)}finally{cn()}return!0}defineComputedProperty_(e,t,n=!1){Lt(this.keysAtom_);try{sn();let r=this.delete_(e);if(!r)return r;if(qr(this)&&!Yr(this,{object:this.proxy_||this.target_,name:e,type:`add`,newValue:void 0}))return null;t.name||=`${this.name_}.${e.toString()}`,t.context=this.proxy_||this.target_;let i=Ai(e),o={configurable:A.safeDescriptors?this.isPlainObject_:!0,enumerable:!1,get:i.get,set:i.set};if(n){if(!Reflect.defineProperty(this.target_,e,o))return!1}else a(this.target_,e,o);this.values_.set(e,new jt(t)),this.notifyPropertyAddition_(e,void 0)}finally{cn()}return!0}delete_(e,t=!1){if(Lt(this.keysAtom_),!ae(this.target_,e))return!0;if(qr(this)&&!Yr(this,{object:this.proxy_||this.target_,name:e,type:Ei}))return null;try{var n;sn();let r=Xr(this),a=Sn(),o=this.values_.get(e),s;if(!o&&(r||a)&&(s=i(this.target_,e)?.value),t){if(!Reflect.deleteProperty(this.target_,e))return!1}else delete this.target_[e];if(delete this.appliedAnnotations_[e],o&&(this.values_.delete(e),o instanceof kt&&(s=o.value_),fn(o)),this.keysAtom_.reportChanged(),(n=this.pendingKeys_)==null||(n=n.get(e))==null||n.set(e in this.target_),r||a){let t={type:Ei,observableKind:`object`,object:this.proxy_||this.target_,debugObjectName:this.name_,oldValue:s,name:e};a&&wn(t),r&&Qr(this,t),a&&En()}}finally{cn()}return!0}notifyPropertyAddition_(e,t){var n;let r=Xr(this),i=Sn();if(r||i){let n=r||i?{type:`add`,observableKind:`object`,debugObjectName:this.name_,object:this.proxy_||this.target_,name:e,newValue:t}:null;i&&wn(n),r&&Qr(this,n),i&&En()}(n=this.pendingKeys_)==null||(n=n.get(e))==null||n.set(!0),this.keysAtom_.reportChanged()}ownKeys_(){return this.keysAtom_.reportObserved(),ne(this.target_)}keys_(){return this.keysAtom_.reportObserved(),Object.keys(this.target_)}};function Oi(e,t){if(t&&ji(e)&&n(`Options can't be provided for already observable objects.`),ae(e,T))return Fi(e)instanceof Di||n(`Cannot convert '${Ii(e)}' into observable object:\nThe target is already observable of different type.\nExtending builtins is not supported.`),e;Object.isExtensible(e)||n(`Cannot make the designated object observable; it is not extensible`);let r=t?.name??`${g(e)?`ObservableObject`:e.constructor.name}@${u()}`;return v(e,T,new Di(e,new Map,String(r),ot(t))),e}let ki=b(`ObservableObjectAdministration`,Di);function Ai(e){return Ti[e]||(Ti[e]={get(){return this[T].getObservablePropValue_(e)},set(t){return this[T].setObservablePropValue_(e,t)}})}function ji(e){return h(e)?ki(e[T]):!1}function Mi(e,t,n){e.appliedAnnotations_[n]=t}function Ni(e,t,r){if(Gi(t)||n(`Cannot annotate '${e.name_}.${r.toString()}': Invalid annotation.`),!xe(t)&&ae(e.appliedAnnotations_,r)){let i=`${e.name_}.${r.toString()}`,a=e.appliedAnnotations_[r].annotationType_,o=t.annotationType_;n(`Cannot apply '${o}' to '${i}':\nThe field is already annotated with '${a}'.\nRe-annotating fields is not allowed.\nUse 'override' annotation for methods overridden by subclass.`)}}function Pi(e,t){if(typeof e==`object`&&e){if(mi(e))return t!==void 0&&n(23),e[T].atom_;if(Ci(e))return e.atom_;if(vi(e)){if(t===void 0)return e.keysAtom_;let r=e.data_.get(t)||e.hasMap_.get(t);return r||n(25,t,Ii(e)),r}if(ji(e)){if(!t)return n(26);let r=e[T],i=r.values_.get(t)??r.materializeLazyComputed_(t)??r.materializeLazyObservable_(t);return i||n(27,t,Ii(e)),i}if(le(e)||Mt(e)||bn(e))return e}else if(p(e)&&bn(e[T]))return e[T];n(28)}function Fi(e,t){if(e||n(29),t!==void 0)return Fi(Pi(e,t));if(le(e)||Mt(e)||bn(e)||vi(e)||Ci(e))return e;if(e[T])return e[T];n(24,e)}function Ii(e,t){let n;if(t!==void 0)n=Pi(e,t);else if(Vn(e))return e.name;else n=ji(e)||vi(e)||Ci(e)?Fi(e):Pi(e);return n.name_}function Li(e){let t=Wt(),n=Dt(!0);sn();try{return e()}finally{cn(),Ot(n),Gt(t)}}let Ri=o.toString;function zi(e,t,n=-1){return Bi(e,t,n)}function Bi(e,t,n,r,i){if(e===t)return e!==0||1/e==1/t;if(e==null||t==null)return!1;if(e!==e)return t!==t;let a=typeof e;if(a!==`function`&&a!==`object`&&typeof t!=`object`)return!1;let o=Ri.call(e);if(o!==Ri.call(t))return!1;switch(o){case`[object RegExp]`:case`[object String]`:return``+e==``+t;case`[object Number]`:return+e==+e?+e==0?1/e==1/t:+e==+t:+t!=+t;case`[object Date]`:case`[object Boolean]`:return+e==+t;case`[object Symbol]`:return typeof Symbol<`u`&&Symbol.valueOf.call(e)===Symbol.valueOf.call(t);case`[object Map]`:case`[object Set]`:n>=0&&n++;break}e=Vi(e),t=Vi(t);let s=o===`[object Array]`;if(!s){if(typeof e!=`object`||typeof t!=`object`)return!1;let n=e.constructor,r=t.constructor;if(n!==r&&!(p(n)&&n instanceof n&&p(r)&&r instanceof r)&&`constructor`in e&&`constructor`in t)return!1}if(n===0)return!1;n<0&&(n=-1),r||=[],i||=[];let c=r.length;for(;c--;)if(r[c]===e)return i[c]===t;if(r.push(e),i.push(t),s){if(c=e.length,c!==t.length)return!1;for(;c--;)if(!Bi(e[c],t[c],n-1,r,i))return!1}else{let a=Object.keys(e),o=a.length;if(Object.keys(t).length!==o)return!1;for(let s=0;s<o;s++){let o=a[s];if(!(ae(t,o)&&Bi(e[o],t[o],n-1,r,i)))return!1}}return r.pop(),i.pop(),!0}function Vi(e){return mi(e)?e.slice():ee(e)||vi(e)||S(e)||Ci(e)?Array.from(e.entries()):e}let Hi=globalThis.Iterator?.prototype||{};function Ui(e){return e[Symbol.iterator]=Wi,r(Object.create(Hi),e)}function Wi(){return this}function Gi(e){return e instanceof Object&&typeof e.annotationType_==`string`&&p(e.make_)&&p(e.extend_)}{let e=globalThis;[`Symbol`,`Map`,`Set`,`Proxy`].forEach(t=>{e[t]===void 0&&n(`MobX requires global '${t}' to be available or polyfilled`)})}typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__==`object`&&__MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobx({spy:Dn,extras:{getDebugName:Ii},$mobx:T}),e.$mobx=T,e.FlowCancellationError=ir,e.ObservableMap=_i,e.ObservableSet=Si,e.Reaction=hn,e._allowStateChanges=Et,e._allowStateChangesInsideComputed=Bn,e._allowStateReadsEnd=Kt,e._allowStateReadsStart=k,e._autoAction=Ln,e._autoActionBound=zn,e._endAction=Tt,e._getAdministration=Fi,e._getGlobalState=$t,e._interceptReads=mr,e._isComputingDerivation=It,e._resetGlobalState=en,e._startAction=wt,e.action=In,e.actionBound=Rn,e.autorun=Hn,e.compareDefault=me,e.compareIdentity=de,e.compareShallow=pe,e.compareStructural=fe,e.computed=O,e.computedStruct=_t,e.configure=Zn,e.createAtom=ue,e.defineProperty=jr,e.entries=Er,e.extendObservable=Qn,e.flow=lr,e.flowBound=ur,e.flowResult=fr,e.get=Ar,e.getAtom=Pi,e.getDebugName=Ii,e.getDependencyTree=$n,e.getObserverTree=tr,e.has=kr,e.intercept=hr,e.isAction=Vn,e.isBoxedObservable=At,e.isComputed=yr,e.isComputedProp=br,e.isFlow=pr,e.isFlowCancellationError=ar,e.isObservable=Sr,e.isObservableArray=mi,e.isObservableMap=vi,e.isObservableObject=ji,e.isObservableProp=Cr,e.isObservableSet=Ci,e.keys=wr,e.makeAutoObservable=ti,e.makeObservable=$r,e.observable=D,e.observableDeep=ft,e.observableRef=ut,e.observableShallow=dt,e.observableStruct=pt,e.observe=Nr,e.onBecomeObserved=qn,e.onBecomeUnobserved=Jn,e.onReactionError=gn,e.override=be,e.ownKeys=Mr,e.reaction=Gn,e.remove=Or,e.runInAction=Bn,e.set=Dr,e.spy=Dn,e.toJS=zr,e.transaction=Br,e.untracked=Ut,e.values=Tr,e.when=Vr})),Y=Ae(((e,t)=>{process.env.NODE_ENV===`production`?t.exports=pw():t.exports=mw()}))();function hw(e){if(Array.isArray(e))return Object.freeze(e.map(hw));if(typeof e==`object`&&e){let t=Object.create(null),n=Object.entries(e).sort(([e],[t])=>e<t?-1:+(e>t));for(let[e,r]of n)t[e]=hw(r);return Object.freeze(t)}return e}function gw(e){let t=typeof e;if(t===`string`||t===`number`||t===`boolean`)return t;throw TypeError(`Variable values must be string|number|boolean (got ${t})`)}function _w(e){return typeof e==`string`?e:String(e)}function vw(e){if(typeof e==`number`)return e;if(typeof e==`boolean`)return+!!e;let t=e.trim();if(t===``)throw TypeError(`Cannot cast empty string to number`);let n=Number(t);if(!Number.isFinite(n))throw TypeError(`Cannot cast ${JSON.stringify(e)} to number`);return n}function yw(e){if(typeof e==`boolean`)return e;if(typeof e==`number`){if(e===0||e===1)return e===1;throw TypeError(`Cannot cast number ${e} to bool (only 0 and 1 are accepted)`)}if(e===`true`)return!0;if(e===`false`)return!1;throw TypeError(`Cannot cast ${JSON.stringify(e)} to bool (expected "true" or "false")`)}var bw=class extends Error{constructor(e,t){super(t),this.variable=e}};function xw(e){return e instanceof bw?e:e instanceof Error&&e.cause!==void 0?xw(e.cause):void 0}const Sw=e=>e===$a;var Cw=class{kind=`box`;cell;lastChangedAt;constructor(e,t,n){this.name=e,this.type=t,Sw(n)||Nw(e,t,n,`initial value`),this.cell=Y.observable.box(n,{deep:!1}),this.lastChangedAt=Sw(n)?null:Date.now()}read(){let e=this.cell.get();if(Sw(e))throw new bw(this.name,`variable "${this.name}" has no value yet: nothing has written it`);return e}set(e){Sw(e)||Nw(this.name,this.type,e,`set value`),!Object.is(this.cell.get(),e)&&(this.cell.set(e),this.lastChangedAt=Date.now())}lastUpdatedMs(){return this.lastChangedAt}stored(){return this.cell.get()}},ww=class{cell;constructor(e,t,n){if(this.cell=(0,Y.computed)(t,{keepAlive:!0,...n!==void 0&&{equals:n}}),typeof this.cell.suspend_!=`function`)throw TypeError(`${e}: this MobX's computed has no suspend_; release() cannot unsubscribe it`);if(typeof this.cell.keepAlive_!=`boolean`)throw TypeError(`${e}: this MobX's computed has no keepAlive_ flag; release() cannot lift it`)}read(){return this.cell.get()}release(){this.cell.keepAlive_=!1,this.cell.suspend_()}},Tw=class{constructor(e){this.deriver=e}read(){return this.deriver()}},Ew=class{kind=`computed`;cell;constructor(e,t,n){this.name=e,this.type=t,this.cell=new ww(`Variable "${e}"`,()=>{let e=n();return Nw(this.name,this.type,e,`computed result`),e})}read(){return this.cell.read()}release(){this.cell.release()}lastUpdatedMs(){return null}},Dw=class{kind=`projection`;cell;constructor(e,t,n){this.name=e,this.type=t,this.cell=new Tw(()=>{let e=n();return Nw(this.name,this.type,e,`projection result`),e})}read(){return this.cell.read()}lastUpdatedMs(){return null}},Ow=class{kind=`document`;cell;lastChangedAt;constructor(e,t){this.name=e,this.cell=Y.observable.box(Mw(t),{deep:!1}),this.lastChangedAt=t.kind===`pending`?null:Date.now()}read(){return this.cell.get()}set(e){let t=Mw(e);jw(this.cell.get(),t)||(this.cell.set(t),this.lastChangedAt=Date.now())}lastUpdatedMs(){return this.lastChangedAt}},kw=class{kind=`document`;cell;constructor(e,t){this.name=e,this.cell=new ww(`Variable "${e}"`,()=>Mw(t()),jw)}read(){return this.cell.read()}release(){this.cell.release()}lastUpdatedMs(){return null}};function Aw(e){return JSON.stringify(e)}function jw(e,t){return Aw(e)===Aw(t)}function Mw(e){return e.kind===`ok`?{kind:`ok`,value:hw(e.value)}:e}function Nw(e,t,n,r){let i=gw(n);if(i!==t)throw TypeError(`Variable "${e}": ${r} type ${i} does not match declared type ${t}`)}var Pw=class{constructor(e=null){this.parent=e}nodes=Y.observable.map(void 0,{deep:!1});defineBox(e,t,n){this.declare(e,new Cw(e,t,n))}defineDocument(e,t){this.declare(e,new Ow(e,t))}defineDerivedDocument(e,t){this.declare(e,new kw(e,t))}defineComputed(e,t,n){this.defineDerived(e,t,`computed`,n)}defineDerived(e,t,n,r){let i=e=>this.read(e),a=n===`computed`?Ew:Dw;this.declare(e,new a(e,t,()=>r(i)))}derive(e,t,n){if(this.refuseDisposed(`Derived value "${e}"`),t===`projection`)return new Tw(n);let r=new ww(`Derived value "${e}"`,n);return this.kept.push(r),r}kept=[];read(e){return this.requireVar(e).read()}readDocument(e){let t=this.requireNode(e);if(t.kind!==`document`)throw TypeError(`Variable "${e}" is a ${t.kind}, not a document`);return t.read()}stored(e){let t=this.requireNode(e);if(t.kind===`document`)return t.read();if(t.kind!==`box`)throw TypeError(`Variable "${e}" is a ${t.kind}, not a written node`);return t.stored()}setDocument(e,t){let n=this.requireOwn(e);if(!(n instanceof Ow))throw TypeError(n.kind===`document`?`Variable "${e}" is a derived document: what it reads decides it, and nothing writes it`:`Variable "${e}" is a ${n.kind}, not a document (use defineDocument to create one)`);(0,Y.runInAction)(()=>n.set(t))}setBox(e,t){let n=this.requireOwn(e);if(n.kind!==`box`)throw TypeError(`Variable "${e}" is a ${n.kind}, not a box (use defineBox to create a settable variable)`);(0,Y.runInAction)(()=>n.set(t))}runInAction(e){(0,Y.runInAction)(e)}has(e){return this.nodes.has(e)||(this.parent?.has(e)??!1)}getType(e){return this.requireVar(e).type}getKind(e){return this.requireNode(e).kind}changeKey(e){let t=this.requireNode(e);if(t.kind===`document`){let e=t.read();return e.kind===`pending`?$a:N(Aw(e))}try{return N(String(t.read()))}catch(e){return xw(e)===void 0?N(` failed:${e instanceof Error?e.message:String(e)}`):$a}}getNode(e){let t=this.requireNode(e);return t.kind===`document`?{name:t.name,kind:t.kind,read:()=>t.read(),lastUpdatedMs:()=>t.lastUpdatedMs()}:{name:t.name,type:t.type,kind:t.kind,read:()=>t.read(),lastUpdatedMs:()=>t.lastUpdatedMs()}}names(){return[...this.parent?.names()??[],...this.nodes.keys()]}dispose(){if(this.disposed)return 0;this.disposed=!0;let e=0;return(0,Y.runInAction)(()=>{for(let t of this.nodes.values())(t instanceof Ew||t instanceof kw)&&(t.release(),e++);for(let e of this.kept)e.release()}),e+this.kept.length}disposed=!1;requireNode(e){let t=this.nodes.get(e)??this.parent?.requireNode(e);if(!t)throw ReferenceError(`Unknown variable "${e}"`);return t}requireOwn(e){let t=this.nodes.get(e);if(t!==void 0)return t;throw this.parent?.has(e)?Error(`Variable "${e}" lives in the directory's store; a session's view cannot write it`):ReferenceError(`Unknown variable "${e}"`)}requireVar(e){let t=this.requireNode(e);if(t.kind===`document`)throw TypeError(`Variable "${e}" is a document; read its fields by path (.${e}.<field>)`);return t}refuseDisposed(e){if(this.disposed)throw Error(`${e}: cannot declare on a disposed store`)}declare(e,t){if(this.refuseDisposed(`Variable "${e}"`),this.has(e))throw Error(`Variable "${e}" is already declared`);(0,Y.runInAction)(()=>this.nodes.set(e,t))}},Fw=class extends Error{name=`TemplateError`;kind=`EvalError`;pos;source;constructor(e,t,n={}){super(e,{cause:n.cause}),this.pos=t,this.source=n.source}get sourceSnippet(){return this.source?Ww(this.source,this.pos):``}toString(){let e=`${this.name}: ${this.message}\n at line ${this.pos.line}, column ${this.pos.column}`,t=this.sourceSnippet;return t?`${e}\n\n${t}`:e}},Iw=class extends Fw{name=`ParseError`;kind=`ParseError`;expected;found;constructor(e,t,n={}){super(e,t,n),this.expected=n.expected,this.found=n.found}},Lw=class extends Fw{name=`EvalError`;kind=`EvalError`},Rw=class extends Lw{name=`FuncNotFoundError`;kind=`FuncNotFoundError`;funcName;suggestions;constructor(e,t,n={}){let r=Gw(e,n.available??[]),i=r.length===0?``:` (did you mean: ${r.join(`, `)}?)`;super(`function ${JSON.stringify(e)} is not registered${i}`,t,n),this.funcName=e,this.suggestions=r}},zw=class extends Lw{name=`ArgCountError`;kind=`ArgCountError`;funcName;accepted;got;constructor(e,t,n,r,i={}){let a=t.minimum===t.maximum?`${t.minimum}`:`at least ${t.minimum}`;super(`wrong number of args for ${e}: want ${a} got ${n}`,r,i),this.funcName=e,this.accepted=t,this.got=n}},Bw=class extends Lw{name=`TypeMismatchError`;kind=`TypeMismatchError`;funcName;argIndex;expected;receivedSummary;constructor(e,t,n,r,i,a={}){super(`function ${JSON.stringify(e)} arg ${t}: expected ${n}, but a ${r} flowed in. Pass it through \`unstyled\` (or your engine's flatten function) to convert.`,i,a),this.funcName=e,this.argIndex=t,this.expected=n,this.receivedSummary=r}},Vw=class extends Bw{constructor(e,t,n,r,i={}){super(e,t,`integer`,String(n),r,i),this.message=Number.isInteger(Number(n))?`integer out of range: ${String(n)}`:`expected integer; found ${String(n)}`}},Hw=class extends Lw{name=`MissingFieldError`;kind=`MissingFieldError`;path;constructor(e,t,n={}){super(`field "${e.join(`.`)}" not found on receiver`,t,n),this.path=e}},Uw=class extends Lw{name=`FailError`;kind=`FailError`;constructor(e,t={line:0,column:0,offset:0},n={}){super(e,t,n)}};function Ww(e,t){let n=e.split(`
64
+ `)})}var J=class extends Error{constructor(e){super(e),this.name=`BadVerbArgs`}};function CS(e){try{return e()}catch(e){throw e instanceof URIError?new J(`malformed wire encoding: ${e.message}`):e}}const wS=new Map;function TS(e){let t=DS(e);if(t===null)throw Error(`Palette "${e}" did not resolve in the theme registry — allowed names and the registry are inconsistent`);return t}function ES(e,t){return e===`bar`?t:TS(e)}function DS(e){let t=wS.get(e);if(t!==void 0)return t;let n=Mu(e);return n===null?null:(wS.set(e,n),n)}function OS(e,t){return Eee(e,`${t.hueShift} ${t.chromaScale} ${t.lightnessScale} ${t.lightnessShift}`,()=>pee(e,t))}const Eee=Gg();function kS(e){let t=DS(e);return t===null?null:{kind:`decided`,name:e,value:t}}function AS(e,t,n){let r=kS(e);return r===null?(n(_v(t,`palette`,`"${e}" names no installed theme${ev(e)}`)),MS()):r}function jS(e,t,n){return uv(e,t,n,MS(),kS)}function MS(){return{kind:`decided`,name:tv,value:TS(tv)}}const NS=/^[A-Za-z_][A-Za-z0-9_]*$/;function PS(e){return`#${e+1}`}const FS={rows:{}};function IS(e){return`rows`in e}function LS(e){return Object.fromEntries(e.map((e,t)=>[PS(t),e]))}function RS(e){if(e.kind===`container`&&e.direction===`vertical`){let{kind:t,direction:n,children:r,...i}=e;return{...i,rows:LS(r)}}let{when:t,...n}=e;return{...t!==void 0&&{when:t},rows:LS([n])}}function zS(e){let{rows:t,...n}=e;return{kind:`container`,direction:`vertical`,children:Object.values(t),...n}}function BS(e){return IS(e)?zS(e):e}function*VS(e,t){if(!IS(e)){yield*Jv(e,t);return}yield[zS(e),t];for(let[n,r]of Object.entries(e.rows))yield*Jv(r,`${t}.rows.${n}`)}function HS(e,t){return IS(e)?{...t,...e,rows:{...t.rows,...e.rows}}:RS(e)}function US(e,t){return t.reduce((e,t)=>{let n=t.id??t.seg,r=[...Gv(zS(e.root))].flatMap(e=>e.kind===`segment`?[e]:[]);if(r.some(e=>e.name===t.seg&&(t.id===void 0||Vv(e)===t.id)))return e;let i=r.find(e=>Vv(e)===n);if(i!==void 0)return WS(e,t,`as "${n}", but placement "${n}" is already segment "${i.name}" — give the cell its own id`);let a={kind:`segment`,name:t.seg,...t.id!==void 0&&{id:t.id},insertedBy:t.by},o=Object.entries(e.root.rows).map(([e,n])=>[e,n,GS(n,t.anchor,a,t.relation)]);return o.some(([,,e])=>e!==null)?{...e,root:{...e.root,rows:Object.fromEntries(o.map(([e,t,n])=>[e,n??t]))}}:WS(e,t,`${t.relation} "${t.anchor}", but there is no placement "${t.anchor}"`)},{root:e,unplaced:[]})}function WS(e,t,n){return{...e,unplaced:[...e.unplaced,{cell:t,reason:n}]}}function GS(e,t,n,r){if(e.kind===`segment`&&Vv(e)===t){let{when:t,...i}=e;return{kind:`container`,direction:`horizontal`,children:r===`before`?[n,i]:[i,n],...t!==void 0&&{when:t}}}return e.kind===`container`?KS(e,t,n,r):qS(e,t,n,r)}function KS(e,t,n,r){let i=e.children.findIndex(e=>e.kind===`segment`&&Vv(e)===t);if(i>=0){let t=r===`before`?i:i+1,{when:a}=e.children[i];return{...e,children:[...e.children.slice(0,t),{...n,...a!==void 0&&{when:a}},...e.children.slice(t)]}}for(let[i,a]of e.children.entries()){let o=a.kind===`container`?KS(a,t,n,r):qS(a,t,n,r);if(o!==null)return{...e,children:e.children.map((e,t)=>t===i?o:e)}}return null}function qS(e,t,n,r){let i=!1,a=Wv(e,e=>{let a=KS(e,t,n,r);return i=a!==null,a??e});return i?a:null}function JS(e){if(!IS(e))return!0;let{rows:t,...n}=e;return Object.values(n).some(e=>e!==void 0)||Object.keys(t).length>0}const YS=`default`,XS={};function ZS(e){return[...new Set([YS,...Object.keys(e)])]}function QS(e,t,n){return sv(void 0,e,t,YS,n)}function $S(e,t){let n={[YS]:XS,...e}[t];if(n===void 0)throw Error(`Preset "${t}" is not declared in this config — effectivePresetName collapses unknown names to "${YS}", which always resolves; a miss here means a raw name reached this function without going through that resolution`);return n}function eC(e,t){let n=$S(e.presets,t).root??FS;return{node:zS(HS(n,e.root)),path:JS(n)?`presets.${t}.root`:`root`}}function tC(e,t,n){if(t.length===0)return{config:e,notices:[]};let r=US(e.root,t),i=Object.entries(e.presets).filter(([,e])=>JS(e.root??FS)).map(([n,r])=>({name:n,preset:r,...US(HS(r.root??FS,e.root),t)})),a=new Map,o=e=>({cell:t,reason:n})=>{let r=a.get(t)??new Map;r.set(n,[...r.get(n)??[],e]),a.set(t,r)};(n.root?r.unplaced:[]).forEach(o(`the root`));for(let{name:e,unplaced:t}of i.filter(({name:e})=>n.presets.has(e)))t.forEach(o(`preset "${e}"`));return{config:{...e,root:r.root,presets:{...e.presets,...Object.fromEntries(i.map(({name:e,preset:t,root:n})=>[e,{...t,root:zS(n)}]))}},notices:[...a].flatMap(([e,t])=>[...t].map(([t,n])=>nC(e,`${t} (in ${n.join(`, `)})`)))}}function nC(e,t){return`${e.by.file}: ${e.by.entry} places "${e.seg}" ${t}`}function rC(e,t){return{...e.globals,...$S(e.presets,t).globals}}const iC=new Map;function aC(e,t,n){iC.set(e,{permanent:!0,resolve:t,paletteOf:n})}aC(`themes`,()=>rv(),e=>TS(e));const oC=`placementThemes`;aC(oC,iv,(e,t)=>ES(e,t.palette));for(let{name:e,members:t}of Nb)aC(e,()=>t);function sC(e){return new Map([[`styles`,{members:Object.keys(e.styles),paletteOf:(t,n)=>OS(n.basePalette,e.styles[t])}],[`presets`,{members:ZS(e.presets)}]])}function cC(e){return[...new Set([...iC.keys(),...e.keys()])]}function lC(e,t){if(typeof e!=`string`)return{members:e};let n=t.get(e);if(n)return n;let r=iC.get(e);if(r)return{members:r.resolve(),paletteOf:r.paletteOf};throw Error(dC(e,t))}const uC=new Map([[`looks`,`styles`],[`progressions`,`variations`]]);function dC(e,t){let n=uC.get(e);return`unknown option domain "${e}"${n===void 0?``:` — it was renamed "${n}"; write from: "${n}"`} (have: ${cC(t).join(`, `)})`}const fC=[`set`,`persist`,`copy`,`open`,`reset`,`undo`,`redo`,`back`,`rewind`,`save`,`preset`,`themeDefault`,`doctor`,`slash`,`run`,`do`];function pC(e){return JSON.stringify([e.run,Object.entries(e.env),e.cwd,e.refreshes])}function*mC(e){let t=[];hC(e,(e,n)=>(t.push([n,e]),e)),yield*t}function hC(e,t){if(`copy`in e)return{...e,copy:t(e.copy,`copy`)};if(`open`in e)return{...e,open:t(e.open,`open`)};if(`preset`in e&&e.preset===`delete`)return{...e,name:t(e.name,`name`)};if(`run`in e){let n=e.run.map((e,n)=>t(e,`run.${n}`));return{...e,run:n,env:Object.fromEntries(Object.entries(e.env).map(([e,n])=>[e,t(n,`env.${e}`)]))}}return e}function gC(e){return`from`in e||`int`in e||`insertSegmentFrom`in e}const _C=/"(?:[^"\\]|\\.)*"|'(?:[^'\\]|\\.)*'|`[^`]*`/g;function*vC(e){let t=e.indexOf(`{{`);for(;t!==-1;){let n=``,r=t+2,i=[[0,r]];for(;r<e.length&&!e.startsWith(`}}`,r);){if(e.startsWith(`/*`,r)){let t=e.indexOf(`*/`,r+2);r=t===-1?e.length:t+2,i.push([n.length,r]);continue}let t=r,a=e[r];if(r+=1,a===`"`||a===`'`||a==="`"){for(;r<e.length&&e[r]!==a;)r+=e[r]===`\\`&&a!=="`"?2:1;r+=1}n+=e.slice(t,r)}if(r>=e.length)return;yield{text:n,at:e=>{let[t,n]=i[0];for(let[r,a]of i)r<=e&&([t,n]=[r,a]);return n+e-t}},t=e.indexOf(`{{`,r+2)}}const yC=`[A-Za-z_]\\w*(?:\\.[A-Za-z_]\\w*)*`,bC=RegExp(`^(?:(\\$)(?:\\.(${yC}))?|\\.(${yC})?)(?=[\\s)]|$)`);function xC(e,t,n){let r=bC.exec(e.trimStart());if(r===null)return null;let[i,a]=r[1]===void 0?[t,r[3]]:[n,r[2]];return i===null?null:a===void 0?i:`${i}${a}.`}const SC=/^(\w+)\b\s*([\s\S]*)$/;function*CC(e,t){let n=[t];for(let r of vC(e)){let e=r.text.replace(/^-(?=\s)/,``).trim(),[,i=``,a=``]=SC.exec(e)??[],o=n[n.length-1],s=n.length>1?n[n.length-2]:o;if(i===`end`){n.length>1&&n.pop();continue}if(i===`else`){yield{code:e,dot:s,block:r};let i=/^with\b([\s\S]*)$/.exec(a);n[n.length-1]=i===null?s:xC(i[1],s,t);continue}yield{code:e,dot:o,block:r},i===`if`&&n.push(o),i===`with`&&n.push(xC(a,o,t)),(i===`range`||i===`define`||i===`block`)&&n.push(null)}}const wC=/(?<![.$])\btemplate\s+$/;function*TC(e,t,n){let r=0;for(let i of[...e.matchAll(_C)]){let a=i.index+i[0].length;wC.test(e.slice(r,i.index))&&(yield{name:i[0].slice(1,-1),at:xC(e.slice(a),t,n),index:i.index}),r=a}}function*EC(e,t){let n=new Set;function*r(e,i,a,o){for(let{code:s,dot:c}of[...CC(e,i)]){yield{code:s,dot:c,root:i,via:a};for(let e of[...TC(s,c,i)]){let i=Object.hasOwn(t,e.name)?t[e.name]:void 0,a=`${e.name}\0${e.at??`\0`}`;i===void 0||o.has(e.name)||n.has(a)||(n.add(a),yield*r(i,e.at,e.name,new Set([...o,e.name])))}}}yield*r(e,``,null,new Set)}function DC(e){let t=new Map;return n=>(t.has(n)||t.set(n,e(n)),t.get(n))}const OC=new WeakMap;function kC(e,t){let n=OC.get(t);return n===void 0&&(n=DC(e=>[...EC(e,t)]),OC.set(t,n)),n(e)}const AC=RegExp(`(?<![A-Za-z0-9_)$])(\\$?)\\.(${yC})`,`g`);function*jC({code:e,dot:t,root:n}){let r=e.replace(_C,``);for(let e of[...r.matchAll(AC)]){let r=e[1]===`$`?n:t;r!==null&&(yield`${r}${e[2]}`)}}function MC(e,t){let n=new Map;for(let r of kC(e,t))for(let e of jC(r))n.has(e)||n.set(e,r.via);return n}const NC=/(?<![.$])\b(action|picker|menu|carousel|swatches|swatch|themePreview)\s+$/,PC={action:1,picker:2,menu:1,carousel:2,swatch:1,swatches:2,themePreview:1};function*FC(e){let t=0,n=0,r=0,i=`action`;for(let a of[...e.matchAll(_C)]){let o=e.slice(t,a.index),s=NC.exec(o);if(s!==null)n=PC[s[1]],r=0,i=s[1]===`action`?`action`:`options`;else for(let e of o)e===`(`&&r++,e===`)`&&r--,(r<0||e===`|`&&r===0)&&(n=0);n>0&&r===0&&(yield{name:a[0].slice(1,-1),site:i,index:a.index},n--),t=a.index+a[0].length}}function IC(e,t){let n=new Map;for(let{code:r,via:i}of kC(e,t))for(let{name:e,site:t}of FC(r)){let r=`${e}\0${i??`\0`}`;n.has(r)||n.set(r,{name:e,site:t,via:i})}return[...n.values()]}const LC=/(?<![\w.$])(?:action|picker|menu|carousel|swatches|swatch|themePreview)\s+(?=[^\s"`)|}])/;function RC(e,t){for(let{code:n}of kC(e,t))if(LC.test(n.replace(_C,`""`)))return!0;return!1}const zC=/(?<![\w.$])[A-Za-z_]\w*/g;function BC(e,t){let n=new Set;for(let{code:r}of kC(e,t))for(let[e]of r.replace(_C,``).matchAll(zC))n.add(e);return n}function VC(e,t){return new Set([...HC(e,t)].filter(e=>Object.hasOwn(t,e)))}function HC(e,t){let n=new Set;for(let{code:r,dot:i,root:a}of kC(e,t))for(let{name:e}of TC(r,i,a))n.add(e);return n}const UC=e=>RegExp(`(?<![A-Za-z0-9_)$])(\\$?)\\.${e}(?![A-Za-z0-9_])`,`g`);function WC(e,t,n){let r=UC(t),i=Zb(t),a=[];for(let{dot:t,block:n}of CC(e,``)){let e=n.text.replace(_C,e=>` `.repeat(e.length));for(let i of e.matchAll(r))(i[1]===`$`?``:t)===``&&a.push(n.at(i.index+i[1].length+1));for(let{name:e,index:r}of[...TC(n.text,t,``),...FC(n.text)])i(e)&&a.push(n.at(r+1))}return[...new Set(a)].sort((e,t)=>t-e).reduce((e,r)=>e.slice(0,r)+n+e.slice(r+t.length),e)}function*GC(e){for(let[t,n]of Object.entries(e.variables))yield[t,n,[`variables`,t]];for(let[t,n]of Object.entries(e.segments))for(let[e,r]of Object.entries(n.vars??{}))yield[`${t}.${e}`,r,[`segments`,t,`vars`,e]]}function*KC(e){for(let[t,n]of GC(e))yield[t,n]}function qC(e,t){let n=e.split(`.`);for(let e=n.length;e>0;e--){let r=n.slice(0,e).join(`.`);if(t.has(r))return[r]}let r=`${e}.`;return[...t].filter(e=>e.startsWith(r))}function JC(e,t){return qC(e,t.names).some(n=>!e.startsWith(`${n}.`)||t.documents.has(n))}function YC(e){let t=new Set,n=new Set,r=(e,r)=>{t.add(e),XC(r)&&n.add(e)};for(let[t,n]of KC(e))r(t,n);return{names:t,documents:n,helpers:e.helpers}}function XC(e){return e.kind===`dropped`||e.kind===`source`||(e.kind===`shell`||e.kind===`file`)&&Xv(e.parse)===`json`}const ZC=e=>{try{let t=f.statSync(e,{bigint:!0});return{dev:t.dev,ino:t.ino,birthtimeNs:t.birthtimeNs}}catch(e){let t=e.code;if(t===`ENOENT`||t===`ENOTDIR`)return`gone`;throw e}},QC=(e,t)=>e.dev===t.dev&&e.ino===t.ino&&e.birthtimeNs===t.birthtimeNs,$C=e=>e===`gone`?`gone`:`${e.dev}:${e.ino}:${e.birthtimeNs}`,ew=e=>{try{return ZC(e)}catch(e){return{unreadable:e.code??String(e)}}},tw=e=>typeof e==`string`||`ino`in e?$C(e):`unreadable:${e.unreadable}`,nw=e=>typeof e!=`string`&&`ino`in e;function rw(e){let t=o.basename(e),n=o.dirname(e);for(;;){let r=iw(n);if(r!==null)return{dir:r,name:t,leaf:n===o.dirname(e)};t=o.basename(n),n=o.dirname(n)}}function iw(e){try{return f.statSync(e).isDirectory()?f.realpathSync(e):null}catch{return null}}const aw=(e,t)=>E(t);function ow(e){let t=[],n=!0,r=new Map;for(let i of e.named){let{hops:e,stopped:a}=zt(i);a!==null&&t.push({path:i,reason:a.message});for(let t of e){let{dir:e,name:i,leaf:a}=rw(t);n&&=a;let o=r.has(e)?r.get(e):new Set;o?.add(i),r.set(e,o)}}for(let t of e.whole.map(iw))t!==null&&r.set(t,null);let i={dirs:[...r.entries()].sort(([e],[t])=>e.localeCompare(t)).map(([e,t])=>t===null?{path:e}:{path:e,filenames:[...t].sort()})},a=new Map(i.dirs.map(e=>{let t=ew(e.path);return[e.path,nw(t)?tw(t):null]}));return{key:JSON.stringify([i,[...a]]),targets:i,unbound:[...a.values()].includes(null),bound:a,reached:n,unresolved:t}}function sw(e,t){if(t.kind===`failed`)return t;if(e.kind!==`changed`)return e;if(t.kind===`unknown`)return t;for(let n of t.paths)e.paths.add(n);return e}const cw=(e,t)=>t===null?{kind:`unknown`}:{kind:`changed`,paths:new Set([o.join(e,t)])},lw=e=>({kind:`failed`,reason:`${e.path}: ${e.reason}`}),uw=(e,t)=>e.kind===`listening`&&e.handle===t,dw=e=>`${e.recursive===!0?`tree`:`dir`}:${e.path}`;var fw=class{slots=new Map;dirs=new Map;counters;logger;closed=!1;constructor(e={}){this.counters=e.counters,this.logger=e.logger??aw}acquire(e,t,n){if(this.closed)return{release:()=>{},deaf:t.dirs.map(e=>({kind:`refused`,path:e.path,reason:`the watcher registry is closed`}))};let r=this.slots.get(e);for(let{dir:e}of r?.listeners??[])this.refreshed(e,`acquire`);let i=r??this.opened(e,t),a={onInvalidate:n};return i.holders.add(a),this.makeHandle(i,a)}follow(e,t,n){if(e!==null&&(e.key===t.key||t.unbound))return{watch:e,move:`kept`};let r={key:t.key,handle:this.acquire(t.key,t.targets,n)};return e?.handle.release(),{watch:r,move:`rebound`}}listening(e){let t=this.slots.get(e.key);if(t!==void 0)for(let{dir:e}of t.listeners)e.state.kind===`deaf`&&this.reopen(e,`retry`)}opened(e,t){let n={key:e,listeners:[],holders:new Set,debounce:null};for(let e of t.dirs){let t=this.dirFor(e),r={slot:n,dir:t,filter:e.filenames?new Set(e.filenames):null};t.listeners.add(r),n.listeners.push(r)}return this.slots.set(e,n),this.counters&&(n.listeners.every(e=>e.dir.state.kind===`listening`)?this.counters.watchersOpened++:this.counters.watchRefusals++),n}dirFor(e){let t=dw(e),n=this.dirs.get(t);if(n!==void 0)return this.refreshed(n,`acquire`),n;let r={path:e.path,recursive:e.recursive===!0},i={id:t,...r,listeners:new Set,state:this.open(r,()=>i,`acquire`)};return this.dirs.set(t,i),i}refreshed(e,t){if(e.state.kind===`deaf`){this.reopen(e,t);return}let n=ew(e.path);nw(n)&&tw(n)!==e.state.bound&&this.reopen(e,`the folder at its path was made again`)}reopen(e,t){let n=e.state;n.kind===`listening`&&this.closeHandle(e.path,n.handle,t),e.state=this.open(e,()=>e,t),e.state.kind===`listening`?this.tell(e,{kind:`unknown`}):n.kind===`listening`&&this.tell(e,lw(e.state.deafness))}open(e,t,n){let r=e.path,i=tw(ew(r));try{f.opendirSync(r).closeSync();let a=f.watch(r,{persistent:!1,recursive:e.recursive},(e,n)=>this.heard(t(),a,n));return a.on(`error`,e=>{this.logger(`warn`,`watcher error ${r}: ${e.message}`),this.counters&&this.counters.watchErrors++;let n=t();if(!uw(n.state,a))return;this.closeHandle(r,a,`error`);let i={kind:`failed`,path:r,reason:e.message};n.state={kind:`deaf`,deafness:i},this.tell(n,lw(i))}),this.counters&&this.counters.dirWatchesOpened++,this.logger(`info`,`dir watch opened path=${I(r)} cause=${I(n)}`),{kind:`listening`,handle:a,bound:i}}catch(e){let t=e.message;return this.logger(`warn`,`watch failed ${r}: ${t}`),{kind:`deaf`,deafness:{kind:`refused`,path:r,reason:t}}}}heard(e,t,n){let{state:r}=e;if(!uw(r,t))return;let i=n===o.basename(e.path)&&tw(ew(e.path))!==r.bound;for(let{slot:t,filter:r}of e.listeners)(r===null||n===null||r.has(n)||i)&&this.fire(t,cw(e.path,n));i&&this.refreshed(e,`moved`)}tell(e,t){for(let{slot:n}of e.listeners)this.fire(n,t)}fire(e,t){if(e.debounce!==null){e.debounce.window=sw(e.debounce.window,t);return}let n={window:t,timer:setTimeout(()=>{e.debounce=null;for(let t of e.holders)try{t.onInvalidate(n.window)}catch(t){this.logger(`warn`,`watcher invalidate threw key=${I(e.key)}: ${t.message}`)}},50)};n.timer.unref(),e.debounce=n}makeHandle(e,t){return{get deaf(){return e.listeners.flatMap(({dir:e})=>e.state.kind===`deaf`?[e.state.deafness]:[])},release:()=>{!e.holders.delete(t)||e.holders.size>0||this.slots.get(e.key)===e&&(this.closeSlot(e,`last release`),this.slots.delete(e.key))}}}closeHandle(e,t,n){try{t.close()}catch{}this.counters&&this.counters.dirWatchesClosed++,this.logger(`info`,`dir watch closed path=${I(e)} cause=${I(n)}`)}closeSlot(e,t){e.debounce!==null&&(clearTimeout(e.debounce.timer),e.debounce=null);for(let n of e.listeners){let{dir:e}=n;e.listeners.delete(n),!(e.listeners.size>0)&&(e.state.kind===`listening`&&this.closeHandle(e.path,e.state.handle,t),this.dirs.delete(e.id))}this.counters&&this.counters.watchersClosed++}size(){return this.slots.size}dirWatches(){return[...this.dirs.values()].filter(e=>e.state.kind===`listening`).length}watchedDirs(){return[...this.dirs.values()].map(e=>e.path)}closeAll(){this.closed=!0;for(let e of this.slots.values())this.closeSlot(e,`close`);this.slots.clear()}},pw=Ae((e=>{function t(e,...t){throw Error(`[MobX] minified error nr: ${e}${t.length?` `+t.map(String).join(`,`):``}. See mobx.js.org/errors`)}function n(e){let t=!1;return function(){if(!t)return t=!0,e.apply(this,arguments)}}function r(e){return typeof e==`function`}function i(e){switch(typeof e){case`string`:case`symbol`:case`number`:return!0}return!1}function a(e){return typeof e==`object`&&!!e}function o(e){if(!a(e))return!1;let t=Object.getPrototypeOf(e);if(t==null)return!0;let n=p(t,`constructor`)&&t.constructor;return typeof n==`function`&&n.toString()===Ht}function s(e){let t=e?.constructor;return!!t&&(t.name===`GeneratorFunction`||t.displayName===`GeneratorFunction`)}function c(e,t,n){Rt(e,t,{enumerable:!1,writable:!0,configurable:!0,value:n})}function l(e,t){let n=`isMobX`+e;return t.prototype[n]=!0,function(e){return a(e)&&!0===e[n]}}function u(e){return e!=null&&Object.prototype.toString.call(e)===`[object Map]`}function d(e){return e!=null&&Object.prototype.toString.call(e)===`[object Set]`}function f(e){return e===null?null:typeof e==`object`?``+e:e}function p(e,t){return zt.hasOwnProperty.call(e,t)}function m(e,t){return!!(e&t)}function h(e,t,n){return n?e|=t:e&=~t,e}function g(e,t=Ut,n=Ut){let r=new Kt(e);return t!==Ut&&(r.onBOL=new Set([t])),n!==Ut&&(r.onBUOL=new Set([n])),r}function _(e,t){return jt(e,t)}function v(e,t,n){return e===null||typeof e!=`object`&&typeof e!=`function`||nt(e)?e:Array.isArray(e)?ln.array(e,{name:n}):o(e)?ln.object(e,void 0,{name:n}):u(e)?ln.map(e,{name:n}):d(e)?ln.set(e,{name:n}):typeof e!=`function`||Ge(e)||$e(e)?e:s(e)?qn(e):zn(n,e)}function y(e){return e}function b(e,t){return{t:e,i:t,o:ee,u:x}}function ee(e,t,n,r){var i;return(i=this.i)!=null&&i.bound?this.u(e,t,n,!1)===null?0:1:r===e.h?this.u(e,t,n,!1)===null?0:2:Ge(n.value)?1:(Rt(r,t,te(e,this,t,n,!1)),2)}function x(e,t,n,r){let i=te(e,this,t,n);return e.l(t,i,r)}function S(e,n,r){let{kind:i,name:a,addInitializer:o}=r,s=e,c=e=>{var t;return be(s.i?.name??a.toString(),e,(t=s.i?.autoAction)!=null&&t)};return i==`field`?function(e){var t;let n=e;return Ge(n)||(n=c(n)),(t=s.i)!=null&&t.bound&&(n=n.bind(this),n.isMobxAction=!0),n}:i==`method`?(Ge(n)||(n=c(n)),(l=s.i)!=null&&l.bound&&o(function(){let e=this,t=e[a].bind(e);t.isMobxAction=!0,e[a]=t}),n):void t(43,s.t,String(a),i);var l}function te(e,t,n,r,i=j.safeDescriptors){var a,o,s;let{value:c}=r;return(a=t.i)!=null&&a.bound&&(c=c.bind(e.v??e.h)),{value:be(t.i?.name??n.toString(),c,(o=t.i?.autoAction)!=null&&o,(s=t.i)!=null&&s.bound?e.v??e.h:void 0),configurable:!i||e.p,enumerable:!1,writable:!i}}function ne(e,t){return{t:e,i:t,o:re,u:ie}}function re(e,t,n,r){var i;return r===e.h?this.u(e,t,n,!1)===null?0:2:(i=this.i)!=null&&i.bound&&(!p(e.h,t)||!$e(e.h[t]))&&this.u(e,t,n,!1)===null?0:$e(n.value)?1:(Rt(r,t,oe(e,0,0,n,!1,!1)),2)}function ie(e,t,n,r){let i=oe(e,0,0,n,this.i?.bound);return e.l(t,i,r)}function ae(e,t,n){var r;let{name:i,addInitializer:a}=n;return $e(t)||(t=qn(t)),(r=e.i)!=null&&r.bound&&a(function(){let e=this,t=e[i].bind(e);t.isMobXFlow=!0,e[i]=t}),t}function oe(e,t,n,r,i,a=j.safeDescriptors){let{value:o}=r;return $e(o)||(o=qn(o)),i&&(o=o.bind(e.v??e.h),o.isMobXFlow=!0),{value:o,configurable:!a||e.p,enumerable:!1,writable:!a}}function C(e,t){return{t:e,i:t,o:w,u:se}}function w(e,t,n){return this.u(e,t,n,!1)===null?0:1}function se(e,t,n,r){return e.m(t,It({},this.i,{get:n.get,set:n.set}),r)}function T(e,t,n){function r(e){let n=It({},i.i,{get:t,context:e});return n.name||=`ObservableObject.${a.toString()}`,new xn(n)}let i=e,{name:a,addInitializer:o}=n,s;return o(function(){let e=wt(this)[k],n=this,i=e.j.get(a);i instanceof xn&&i.derivation!==t&&e.j.delete(a),(e.O??=new Map).set(a,()=>r(n))}),function(){let e=this[k],n=e.j.get(a);if(n instanceof xn&&n.derivation!==t){let e=s?.get(this);return e||(e=r(this),(s??=new WeakMap).set(this,e)),e.get()}return e._(a)}}function ce(e,t){return{t:e,i:t,o:le,u:ue}}function le(e,t,n){return this.u(e,t,n,!1)===null?0:1}function ue(e,t,n,r){return e.S(t,n.value,this.i?.A??v,r)}function de(e,t,n){function r(e,t){let n=wt(e)[k];return(n.V??=new Map).set(o,()=>new yn(t,i.i?.A??v,`ObservableObject.${o.toString()}`,!1)),n}let i=e,{kind:a,name:o}=n;if(a===`accessor`)return{get(){return(this[k]??r(this,t.get.call(this)))._(o)},set(e){return(this[k]??r(this,e)).M(o,e)},init(e){return r(this,e),e}}}function fe(e){return{t:Xt,i:e,o:pe,u:me}}function pe(e,t,n,r){var i,a,o;if(n.get)return pn.o(e,t,n,r);if(n.set){let i=Ge(n.set)?n.set:be(t.toString(),n.set);return r===e.h?e.l(t,{configurable:!j.safeDescriptors||e.p,set:i})===null?0:2:(Rt(r,t,{configurable:!0,set:i}),2)}if(r!==e.h&&typeof n.value==`function`)return s(n.value)?((o=this.i)!=null&&o.autoBind?Jn:qn).o(e,t,n,r):((a=this.i)!=null&&a.autoBind?Vn:zn).o(e,t,n,r);let c=!1===this.i?.deep?an:ln;return typeof n.value==`function`&&(i=this.i)!=null&&i.autoBind&&(n.value=n.value.bind(e.v??e.h)),c.o(e,t,n,r)}function me(e,t,n,r){var i;return n.get?pn.u(e,t,n,r):n.set?e.l(t,{configurable:!j.safeDescriptors||e.p,set:be(t.toString(),n.set)},r):(typeof n.value==`function`&&(i=this.i)!=null&&i.autoBind&&(n.value=n.value.bind(e.v??e.h)),(!1===this.i?.deep?an:ln).u(e,t,n,r))}function he(e,t){return It(function(n,r){if(r&&typeof r.kind==`string`)return t(e,n,r)},e)}function ge(e){return e||Qt}function _e(e){return he(e,de)}function ve(e){return!0===e.deep?v:!1===e.deep?y:(t=e.defaultDecorator)&&(n=(r=t.i)?.A)!=null?n:v;var t,n,r}function ye(e){return he(e,T)}function be(e,t,n=!1,r){function i(){return xe(0,n,t,r||this,arguments)}return i.isMobxAction=!0,i.toString=()=>t.toString(),_n&&(vn.value=e,Rt(i,`name`,vn)),i}function xe(e,t,n,r,i){let a=Se(0,t);try{return n.apply(r,i)}catch(e){throw a.N=e,e}finally{Ce(a)}}function Se(e,t){let n=j.trackingDerivation,r=!t||!n;Fe();let i=j.allowStateChanges;r&&Ae();let a={R:r,k:n,C:i,I:j.allowStateReads,P:!1,T:0,B:gn++,D:hn};return hn=a.B,a}function Ce(e){hn!==e.B&&t(30),hn=e.D,e.N!==void 0&&(j.suppressReactionErrors=!0),Ie(),e.R&&je(e.k),j.suppressReactionErrors=!1}function we(e,t){let n=function(e){let t=j.allowStateChanges;return j.allowStateChanges=e,t}(e);try{return t()}finally{(function(e){j.allowStateChanges=e})(n)}}function Te(e){return e instanceof Cn}function Ee(e){switch(e.K){case 0:return!1;case-1:case 2:return!0;case 1:{let t=Ae(),n=e.L,r=n.length;for(let i=0;i<r;i++){let r=n[i];if(Sn(r)){if(j.disableErrorBoundaries)r.get();else try{r.get()}catch{return je(t),!0}if(e.K===2)return je(t),!0}}return Me(e),je(t),!1}}}function De(e,t,n){Me(e),e.$=Array(e.U===0?100:e.L.length),e.W=0,e.U=++j.runId;let r=j.trackingDerivation,i;if(j.trackingDerivation=e,j.inBatch++,!0===j.disableErrorBoundaries)i=t.call(n);else try{i=t.call(n)}catch(e){i=new Cn(e)}return j.inBatch--,j.trackingDerivation=r,function(e){let t=e.L,n=e.L=e.$,r=0,i=0,a=e.W;for(let e=0;e<a;e++){let t=n[e];t.diffValue===0&&(t.diffValue=1,i!==e&&(n[i]=t),i++),t.K>r&&(r=t.K)}for(n.length=i,e.$=null,a=t.length;a--;){let n=t[a];n.diffValue===0&&Pe(n,e),n.diffValue=0}for(;i--;){let t=n[i];t.diffValue===1&&(t.diffValue=0,Ne(t,e))}r!==0&&(e.K=r,e.q())}(e),i}function Oe(e){let t=e.L;e.L=[];let n=t.length;for(;n--;)Pe(t[n],e);e.K=-1}function ke(e){let t=Ae();try{return e()}finally{je(t)}}function Ae(){let e=j.trackingDerivation;return j.trackingDerivation=null,e}function je(e){j.trackingDerivation=e}function Me(e){if(e.K===0)return;e.K=0;let t=e.L,n=t.length;for(;n--;)t[n].F=0}function Ne(e,t){(e.H??=new Set).add(t),e.F>t.K&&(e.F=t.K)}function Pe(e,t){let n=e.H;n&&(n.delete(t),n.size===0&&E(e))}function E(e){!1===e.isPendingUnobservation&&(e.isPendingUnobservation=!0,j.pendingUnobservations.push(e))}function Fe(){j.inBatch++}function Ie(){--j.inBatch===0&&(Be(),!j.isRunningUnobservations&&j.pendingUnobservations.length>0&&function(){j.isRunningUnobservations=!0;try{let e=j.pendingUnobservations;for(let t=0;t<e.length;t++){let n=e[t];n.isPendingUnobservation=!1,n.H&&n.H.size!==0||(n.H=null,n.isBeingObserved&&(n.isBeingObserved=!1,n.onBUO()),n instanceof xn&&n.G())}j.pendingUnobservations=[]}finally{j.isRunningUnobservations=!1}}())}function Le(e){var t;e.isBeingObserved||(e.isBeingObserved=!0,e.onBO(),(t=e.L)==null||t.forEach(Le))}function Re(e){let t=j.trackingDerivation;return t===null?((!e.H||e.H.size===0)&&j.inBatch>0&&E(e),!1):(t.U!==e.J&&(e.J=t.U,t.$[t.W++]=e,!e.isBeingObserved&&j.trackingContext&&(e.isBeingObserved=!0,e.onBO())),e.isBeingObserved)}function ze(e){var t;e.F!==2&&(e.F=2,(t=e.H)==null||t.forEach(e=>{e.K===0&&e.q(),e.K=2}))}function Be(){j.inBatch>0||j.isRunningReactions||An(Ve)}function Ve(){j.isRunningReactions=!0;let e=j.pendingReactions,t=0;for(;e.length>0;){++t===kn&&(console.error(`[mobx] cycle in reaction: ${e[0]}`),e.splice(0));let n=e.splice(0);for(let e=0,t=n.length;e<t;e++)n[e].X()}j.isRunningReactions=!1}function He(e){return he(e,S)}function Ue(e){return function(t,n){return n&&typeof n.kind==`string`?S(e?In:Pn,t,n):r(t)?be(t.name||`<unnamed action>`,t,e):r(n)?be(t,n,e):i(t)?He(b(e?Nn:Mn,{name:t,autoAction:e})):void 0}}function We(e){return xe(0,!1,e,this,void 0)}function Ge(e){return r(e)&&!0===e.isMobxAction}function Ke(e,t=Vt){function n(){e(a)}var r;let i=t?.name??`Autorun`,a;if(t.scheduler||t.delay){let e=qe(t),r=!1;a=new On(i,()=>{r||(r=!0,e(()=>{r=!1,a.isDisposed||a.track(n)}))},t.onError,t.requiresObservable)}else a=new On(i,function(){this.track(n)},t.onError,t.requiresObservable);return t!=null&&(r=t.signal)!=null&&r.aborted||a.Y(),a.Z(t?.signal)}function qe(e){return e.scheduler?e.scheduler:e.delay?t=>setTimeout(t,e.delay):Hn}function Je(e,t,n,i){let a=typeof i==`function`?Dt(t,n):Dt(t),o=r(i)?i:n,s=`${e}L`;return a[s]?a[s].add(o):a[s]=new Set([o]),function(){let e=a[s];e&&(e.delete(o),e.size===0&&delete a[s])}}function Ye(e,t,n,r){let i=Gt(t);return At(()=>{let t=wt(e,r)[k];Wt(i).forEach(e=>{t.u(e,i[e],!n||!(e in n)||n[e])})}),e}function Xe(e){let t={name:e.tt};var n;return e.L&&e.L.length>0&&(t.dependencies=(n=e.L,Array.from(new Set(n))).map(Xe)),t}function Ze(e){let t={name:e.tt};return function(e){return!!e.H&&e.H.size>0}(e)&&(t.observers=Array.from(function(e){return e.H??new Set}(e),Ze)),t}function Qe(e){r(e.cancel)&&e.cancel()}function $e(e){return!0===e?.isMobXFlow}function et(e,t){var n;if(t===void 0)return Sn(e);if(!1===Et(e))return!1;let r=e[k];return(n=r.O)!=null&&n.has(t)?!0:r.j.has(t)?Sn(Dt(e,t)):!1}function tt(e,t){if(!e)return!1;if(t!==void 0){if(Et(e)){var n,r;let i=e[k];return i.j.has(t)||!((n=i.O)==null||!n.has(t))||!((r=i.V)==null||!r.has(t))}return!1}return Et(e)||!!e[k]||qt(e)||jn(e)||Sn(e)}function nt(e){return tt(e)}function rt(e){return Et(e)?e[k].nt():ar(e)||cr(e)?Array.from(e.keys()):xt(e)?e.map((e,t)=>t):void t(5)}function it(e,n){return Et(e)?e[k].et(n):ar(e)||cr(e)?e.has(n):xt(e)?n>=0&&n<e.length:void t(10)}function at(e){if(Et(e))return e[k].it();t(38)}function ot(e,t,n){if(Sn(e)){let r,i=!0;return Ke(()=>{let a=e.get();if(!i||n){let n=Ae();t({observableKind:`computed`,debugObjectName:e.tt,type:Qn,object:e,newValue:a,oldValue:r}),je(n)}i=!1,r=a})}return n&&t({observableKind:`value`,debugObjectName:e.tt,object:e,type:Qn,newValue:e.rt,oldValue:void 0}),ht(e,t)}function st(e,t,n){return e.set(t,n),n}function ct(e,t){if(typeof e!=`object`||!e||e instanceof Date||!nt(e))return e;if(bn(e)||Sn(e))return ct(e.get(),t);if(t.has(e))return t.get(e);if(xt(e)){let n=st(t,e,Array(e.length));return e.forEach((e,r)=>{n[r]=ct(e,t)}),n}if(cr(e)){let n=st(t,e,new Set);return e.forEach(e=>{n.add(ct(e,t))}),n}if(ar(e)){let n=st(t,e,new Map);return e.forEach((e,r)=>{n.set(r,ct(e,t))}),n}{let n=st(t,e,{});return at(e).forEach(r=>{zt.propertyIsEnumerable.call(e,r)&&(n[r]=ct(e[r],t))}),n}}function lt(e,t){Fe();try{return e.apply(t)}finally{Ie()}}function ut(e,t,n){let r;if(typeof n.timeout==`number`){let e=Error(`WHEN_TIMEOUT`);r=setTimeout(()=>{if(!a[k].isDisposed){if(a(),!n.onError)throw e;n.onError(e)}},n.timeout)}n.name=`When`;let i=be(`When-effect`,t);var a=Ke(t=>{we(!1,e)&&(t.dispose(),r&&clearTimeout(r),i())},n);return a}function dt(e){return e[k]}function ft(e){return e.st!==void 0&&e.st.length>0}function pt(e,t){let r=e.st;return r?r.push(t):r=e.st=[t],n(()=>{let e=r.indexOf(t);e!==-1&&r.splice(e,1)})}function D(e,n){let r=Ae();try{let r=[...e.st||[]];for(let e=0,i=r.length;e<i&&((n=r[e](n))&&!n.type&&t(14),n);e++);return n}finally{je(r)}}function mt(e){return e.ot!==void 0&&e.ot.length>0}function ht(e,t){let r=e.ot;return r?r.push(t):r=e.ot=[t],n(()=>{let e=r.indexOf(t);e!==-1&&r.splice(e,1)})}function gt(e,t){let n=Ae(),r=e.ot;if(r){r=r.slice();for(let e=0,n=r.length;e<n;e++)r[e](t);je(n)}}function _t(e,n,r){if(!0===r&&(r=e.ut),!1===r)return;n in e.h||t(1,r.t,`${e.tt}.${n.toString()}`);let i=e.h;for(;i&&i!==zt;){let t=Lt(i,n);if(t){let a=r.o(e,n,t,i);if(a===0)return;if(a===1)break}i=Object.getPrototypeOf(i)}}function O(e,t){typeof Array.prototype[e]==`function`&&(tr[e]=t(e))}function vt(e){return function(){let t=this[k];t.ct.reportObserved();let n=t.ht(t.j);return n[e].apply(n,arguments)}}function yt(e){return function(t,n){let r=this[k];return r.ct.reportObserved(),r.ht(r.j)[e]((e,r)=>t.call(n,e,r,this))}}function bt(e){return function(){let t=this[k];t.ct.reportObserved();let n=t.ht(t.j),r=arguments[0];return arguments[0]=(e,t,n)=>r(e,t,n,this),n[e].apply(n,arguments)}}function xt(e){return a(e)&&M(e[k])}function St(e){return e[Symbol.toStringTag]=`MapIterator`,Pt(e)}function Ct(e){return e[Symbol.toStringTag]=`SetIterator`,Pt(e)}function wt(e,t){if(p(e,k))return e;let n=t?.name??`ObservableObject`;return c(e,k,new dr(e,new Map,String(n),function(e){return e?e.defaultDecorator??function(e){let t=!1!==e.deep,n=!!e.autoBind,r=!t|(n?2:0);return A[r]??(A[r]=fe({deep:t,autoBind:n}))}(e):void 0}(t))),e}function Tt(e){return lr[e]||(lr[e]={get(){return this[k]._(e)},set(t){return this[k].M(e,t)}})}function Et(e){return!!a(e)&&fr(e[k])}function Dt(e,n){if(typeof e==`object`&&e){if(xt(e))return n!==void 0&&t(23),e[k].ct;if(cr(e))return e.ct;if(ar(e)){if(n===void 0)return e.lt;let r=e.ft.get(n)||e.dt.get(n);return r||t(25,n,kt(e)),r}if(Et(e)){if(!n)return t(26);let r=e[k],i=r.j.get(n)??r.vt(n)??r.bt(n);return i||t(27,n,kt(e)),i}if(qt(e)||Sn(e)||jn(e))return e}else if(r(e)&&jn(e[k]))return e[k];t(28)}function Ot(e,n){return e||t(29),n===void 0?qt(e)||Sn(e)||jn(e)||ar(e)||cr(e)?e:e[k]?e[k]:void t(24,e):Ot(Dt(e,n))}function kt(e,t){let n;if(t!==void 0)n=Dt(e,t);else{if(Ge(e))return e.name;n=Et(e)||ar(e)||cr(e)?Ot(e):Dt(e)}return n.tt}function At(e){let t=Ae();Fe();try{return e()}finally{Ie(),je(t)}}function jt(e,t,n=-1){return Mt(e,t,n)}function Mt(e,t,n,i,a){if(e===t)return e!==0||1/e==1/t;if(e==null||t==null)return!1;if(e!=e)return t!=t;let o=typeof e;if(o!==`function`&&o!==`object`&&typeof t!=`object`)return!1;let s=pr.call(e);if(s!==pr.call(t))return!1;switch(s){case`[object RegExp]`:case`[object String]`:return``+e==``+t;case`[object Number]`:return+e==+e?+e==0?1/e==1/t:+e==+t:+t!=+t;case`[object Date]`:case`[object Boolean]`:return+e==+t;case`[object Symbol]`:return typeof Symbol<`u`&&Symbol.valueOf.call(e)===Symbol.valueOf.call(t);case`[object Map]`:case`[object Set]`:n>=0&&n++}e=Nt(e),t=Nt(t);let c=s===`[object Array]`;if(!c){if(typeof e!=`object`||typeof t!=`object`)return!1;let n=e.constructor,i=t.constructor;if(n!==i&&!(r(n)&&n instanceof n&&r(i)&&i instanceof i)&&`constructor`in e&&`constructor`in t)return!1}if(n===0)return!1;n<0&&(n=-1),a||=[];let l=(i||=[]).length;for(;l--;)if(i[l]===e)return a[l]===t;if(i.push(e),a.push(t),c){if(l=e.length,l!==t.length)return!1;for(;l--;)if(!Mt(e[l],t[l],n-1,i,a))return!1}else{let r=Object.keys(e),o=r.length;if(Object.keys(t).length!==o)return!1;for(let s=0;s<o;s++){let o=r[s];if(!p(t,o)||!Mt(e[o],t[o],n-1,i,a))return!1}}return i.pop(),a.pop(),!0}function Nt(e){return xt(e)?e.slice():u(e)||ar(e)||d(e)||cr(e)?Array.from(e.entries()):e}function Pt(e){return e[Symbol.iterator]=Ft,It(Object.create(mr),e)}function Ft(){return this}Object.defineProperty(e,`__esModule`,{value:!0});let It=Object.assign,Lt=Object.getOwnPropertyDescriptor,Rt=Object.defineProperty,zt=Object.prototype,Bt=[];Object.freeze(Bt);let Vt={};Object.freeze(Vt);let Ht=Object.toString(),Ut=()=>{},Wt=Reflect.ownKeys,Gt=Object.getOwnPropertyDescriptors,k=Symbol(`mobx administration`);var Kt=class{constructor(e=`Atom`){this.tt=void 0,this.yt=0,this.H=null,this.J=0,this.F=-1,this.onBOL=void 0,this.onBUOL=void 0,this.tt=e}get isBeingObserved(){return m(this.yt,1)}set isBeingObserved(e){this.yt=h(this.yt,1,e)}get isPendingUnobservation(){return m(this.yt,2)}set isPendingUnobservation(e){this.yt=h(this.yt,2,e)}get diffValue(){return+!!m(this.yt,4)}set diffValue(e){this.yt=h(this.yt,4,e===1)}onBO(){this.onBOL&&this.onBOL.forEach(e=>e())}onBUO(){this.onBUOL&&this.onBUOL.forEach(e=>e())}reportObserved(){return Re(this)}reportChanged(){Fe(),ze(this),Ie()}toString(){return this.tt}};let qt=l(`Atom`,Kt),Jt=Object.is,Yt={t:`override`,o:function(){return 0},u:function(){t(44,this.t)}},Xt=`true`,Zt=fe(),A=[Zt],Qt={deep:!0,name:void 0,defaultDecorator:void 0};Object.freeze(Qt);let $t=ce(`observable`),en=ce(`observable.ref`,{A:y}),tn=ce(`observable.shallow`,{A:function(e,t,n){return e==null||Et(e)||xt(e)||ar(e)||cr(e)?e:Array.isArray(e)?ln.array(e,{name:n,deep:!1}):o(e)?ln.object(e,void 0,{name:n,deep:!1}):u(e)?ln.map(e,{name:n,deep:!1}):d(e)?ln.set(e,{name:n,deep:!1}):void 0}}),nn=ce(`observable.struct`,{A:function(e,t){return jt(e,t)?t:e}}),rn={box(e,t){let n=ge(t);return new yn(e,ve(n),n.name,!0,n.equals)},array(e,t){let n=ge(t);return function(e,t,n=`ObservableArray`,r=!1){return At(()=>{let i=new er(n,t,r);Rt(i.j,k,{enumerable:!1,writable:!1,configurable:!0,value:i});let a=new Proxy(i.j,$n);return i.v=a,e&&e.length&&i.wt(0,0,e),a})}(e,ve(n),n.name)},map(e,t){let n=ge(t);return new ir(e,ve(n),n.name)},set(e,t){let n=ge(t);return new sr(e,ve(n),n.name)},object:(e,t,n)=>At(()=>Ye(function(e,t){var n;return(n=(e=wt(e,t))[k]).v??(n.v=new Proxy(e,Yn))}({},n),e,t))},an=_e(en),on=_e(tn),sn=_e($t),cn=_e(nn);var ln=It(function(e,t,n){return t&&typeof t.kind==`string`?de($t,e,t):nt(e)?e:o(e)?ln.object(e,t,n):Array.isArray(e)?ln.array(e,t):u(e)?ln.map(e,t):d(e)?ln.set(e,t):typeof e==`object`&&e?e:ln.box(e,t)},$t,rn);let un=`computed`,dn=C(un),fn=ye(C(`computed.struct`,{equals:_})),pn=function(e,t){if(t&&typeof t.kind==`string`)return T(dn,e,t);if(o(e))return ye(C(un,e));let n=o(t)?t:{};return n.get=e,n.name||=e.name||``,new xn(n)};var mn;It(pn,dn);let hn=0,gn=1,_n=(mn=Lt(()=>{},`name`)?.configurable)!=null&&mn,vn={value:`action`,configurable:!0,writable:!1,enumerable:!1};var yn=class extends Kt{constructor(e,t,n=`ObservableValue`,r=!0,i=Jt){super(n),this.A=void 0,this.tt=void 0,this.xt=void 0,this.gt=!1,this.st=void 0,this.ot=void 0,this.rt=void 0,this.dehancer=void 0,this.A=t,this.tt=n,this.xt=i,this.rt=t(e,void 0,n)}dehanceValue(e){return this.dehancer===void 0?e:this.dehancer(e)}set(e){(e=this.jt(e))!==j.UNCHANGED&&this.Ot(e)}jt(e){if(ft(this)){let t=D(this,{object:this,type:Qn,newValue:e});if(!t)return j.UNCHANGED;e=t.newValue}return e=this.A(e,this.rt,this.tt),this.xt(this.rt,e)?j.UNCHANGED:e}Ot(e){let t=this.rt;this.rt=e,this.reportChanged(),mt(this)&&gt(this,{type:Qn,object:this,newValue:e,oldValue:t})}get(){return this.reportObserved(),this.dehanceValue(this.rt)}raw(){return this.rt}toJSON(){return this.get()}toString(){return`${this.tt}[${this.rt}]`}valueOf(){return f(this.get())}[Symbol.toPrimitive](){return this.valueOf()}};let bn=l(`ObservableValue`,yn);var xn=class{constructor(e){this.K=-1,this.L=[],this.$=null,this.H=null,this.U=0,this.J=0,this.F=0,this.W=0,this.rt=new Cn(null),this.tt=void 0,this._t=void 0,this.yt=0,this.derivation=void 0,this.St=void 0,this.At=void 0,this.xt=void 0,this.Vt=void 0,this.Mt=void 0,this.onBOL=void 0,this.onBUOL=void 0,e.get||t(31),this.derivation=e.get,this.tt=e.name||`ComputedValue`,e.set&&(this.St=be(`ComputedValue-setter`,e.set)),this.xt=e.equals||Jt,this.At=e.context,this.Vt=e.requiresReaction,this.Mt=!!e.keepAlive}q(){(function(e){var t;e.F===0&&(e.F=1,(t=e.H)==null||t.forEach(e=>{e.K===0&&(e.K=1,e.q())}))})(this)}onBO(){this.onBOL&&this.onBOL.forEach(e=>e())}onBUO(){this.onBUOL&&this.onBUOL.forEach(e=>e())}get isComputing(){return m(this.yt,1)}set isComputing(e){this.yt=h(this.yt,1,e)}get isRunningSetter(){return m(this.yt,2)}set isRunningSetter(e){this.yt=h(this.yt,2,e)}get isBeingObserved(){return m(this.yt,4)}set isBeingObserved(e){this.yt=h(this.yt,4,e)}get isPendingUnobservation(){return m(this.yt,8)}set isPendingUnobservation(e){this.yt=h(this.yt,8,e)}get diffValue(){return+!!m(this.yt,16)}set diffValue(e){this.yt=h(this.yt,16,e===1)}get(){if(this.isComputing&&t(32,this.tt,this.derivation),j.inBatch!==0||this.H&&this.H.size!==0||this.Mt){let e=this.isBeingObserved;if(Re(this),Ee(this)){let e=j.trackingContext;e||!this.Mt&&!this.isBeingObserved||(j.trackingContext=this),this.trackAndCompute()&&function(e){var t;e.F!==2&&(e.F=2,(t=e.H)==null||t.forEach(t=>{t.K===1?t.K=2:t.K===0&&(e.F=0)}))}(this),j.trackingContext=e}else !e&&this.isBeingObserved&&this.L.forEach(Le)}else Ee(this)&&(this.Nt(),Fe(),this.rt=this.Rt(!1),Ie());let e=this.rt;if(Te(e))throw e.cause;return e}set(e){if(this.St){this.isRunningSetter&&t(33,this.tt),this.isRunningSetter=!0;try{this.St.call(this.At,e)}finally{this.isRunningSetter=!1}}else t(34,this.tt)}trackAndCompute(){let e=this.rt,t=this.K===-1,n=this.Rt(!0),r=t||Te(e)||Te(n)||!this.xt(e,n);return r&&(this.rt=n),r}Rt(e){let t;if(this.isComputing=!0,e)t=De(this,this.derivation,this.At);else if(!0===j.disableErrorBoundaries)t=this.derivation.call(this.At);else try{t=this.derivation.call(this.At)}catch(e){t=new Cn(e)}return this.isComputing=!1,t}G(){this.Mt||(Oe(this),this.rt=void 0)}Nt(){}toString(){return`${this.tt}[${this.derivation.toString()}]`}valueOf(){return f(this.get())}[Symbol.toPrimitive](){return this.valueOf()}};let Sn=l(`ComputedValue`,xn);var Cn=class{constructor(e){this.cause=void 0,this.cause=e}};let wn=[`mobxGuid`,`spyListeners`,`enforceActions`,`computedRequiresReaction`,`reactionRequiresObservable`,`observableRequiresReaction`,`allowStateReads`,`disableErrorBoundaries`,`runId`,`UNCHANGED`];var Tn=class{constructor(){this.version=7,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.isRunningUnobservations=!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.safeDescriptors=!0}};let En=!0,Dn=!1,j=function(){let e=globalThis;return e.__mobxInstanceCount>0&&!e.__mobxGlobals&&(En=!1),e.__mobxGlobals&&e.__mobxGlobals.version!==7&&(En=!1),En?e.__mobxGlobals?(e.__mobxInstanceCount+=1,e.__mobxGlobals.UNCHANGED||(e.__mobxGlobals.UNCHANGED={}),e.__mobxGlobals):(e.__mobxInstanceCount=1,e.__mobxGlobals=new Tn):(setTimeout(()=>{Dn||t(35)},1),new Tn)}();var On=class{constructor(e=`Reaction`,t,n,r){this.tt=void 0,this.Et=void 0,this.kt=void 0,this.Ct=void 0,this.L=[],this.$=[],this.K=-1,this.U=0,this.W=0,this.yt=0,this.It=void 0,this.tt=e,this.Et=t,this.kt=n,this.Ct=r}get isDisposed(){return m(this.yt,1)}set isDisposed(e){this.yt=h(this.yt,1,e)}get isScheduled(){return m(this.yt,2)}set isScheduled(e){this.yt=h(this.yt,2,e)}get isTrackPending(){return m(this.yt,4)}set isTrackPending(e){this.yt=h(this.yt,4,e)}get isRunning(){return m(this.yt,8)}set isRunning(e){this.yt=h(this.yt,8,e)}get diffValue(){return+!!m(this.yt,16)}set diffValue(e){this.yt=h(this.yt,16,e===1)}q(){this.Y()}Y(){this.isScheduled||(this.isScheduled=!0,j.pendingReactions.push(this),Be())}X(){if(!this.isDisposed){Fe(),this.isScheduled=!1;let e=j.trackingContext;if(j.trackingContext=this,Ee(this)){this.isTrackPending=!0;try{this.Et()}catch(e){this.Pt(e)}}j.trackingContext=e,Ie()}}track(e){if(this.isDisposed)return;Fe(),this.isRunning=!0;let t=j.trackingContext;j.trackingContext=this;let n=De(this,e,void 0);j.trackingContext=t,this.isRunning=!1,this.isTrackPending=!1,this.isDisposed&&Oe(this),Te(n)&&this.Pt(n.cause),Ie()}Pt(e){if(this.kt)this.kt(e,this);else{if(j.disableErrorBoundaries)throw e;j.suppressReactionErrors||console.error(`[mobx] uncaught error in '${this}'`,e),j.globalReactionErrorHandlers.forEach(t=>t(e,this))}}dispose(){var e;this.isDisposed||(this.isDisposed=!0,(e=this.It)==null||e.call(this),this.isRunning||(Fe(),Oe(this),Ie()))}Z(e){let t=()=>this.dispose();return e!=null&&e.addEventListener&&!this.isDisposed&&(e.addEventListener(`abort`,t),this.It=()=>e.removeEventListener==null?void 0:e.removeEventListener(`abort`,t)),t[k]=this,`dispose`in Symbol&&typeof Symbol.dispose==`symbol`&&(t[Symbol.dispose]=t),t}toString(){return`Reaction[${this.tt}]`}};let kn=100,An=e=>e(),jn=l(`Reaction`,On),Mn=`action`,Nn=`autoAction`,Pn=b(Mn),Fn=b(`action.bound`,{bound:!0}),In=b(Nn,{autoAction:!0}),Ln=b(`autoAction.bound`,{autoAction:!0,bound:!0}),Rn=Ue(!1);It(Rn,Pn);let zn=Ue(!0);It(zn,In);let Bn=He(Fn),Vn=He(Ln),Hn=e=>e(),Un=`always`;var Wn=class extends Error{constructor(){super(`FLOW_CANCELLED`),Object.setPrototypeOf(this,new.target.prototype),this.name=`FlowCancellationError`}toString(){return`Error: ${this.message}`}};let Gn=ne(`flow`),Kn=ne(`flow.bound`,{bound:!0}),qn=It(function(e,t){if(t&&typeof t.kind==`string`)return ae(Gn,e,t);let n=e,i=n.name||`flow`,a=function(){let e=arguments,t=Rn(i,n).apply(this,e),a,o,s=new Promise(function(e,n){function s(e){let r;o=void 0;try{r=Rn(i,t.next).call(t,e)}catch(e){return n(e)}l(r)}function c(e){let r;o=void 0;try{r=Rn(i,t.throw).call(t,e)}catch(e){return n(e)}l(r)}function l(t){if(!r(t?.then))return t.done?e(t.value):(o=Promise.resolve(t.value),o.then(s,c));t.then(l,n)}a=n,s(void 0)});return s.cancel=Rn(i,function(){try{o&&Qe(o);let e=t.return(void 0),n=Promise.resolve(e.value);n.then(Ut,Ut),Qe(n),a(new Wn)}catch(e){a(e)}}),s};return a.isMobXFlow=!0,a},Gn),Jn=he(Kn,ae),Yn={has:(e,t)=>dt(e).et(t),get:(e,t)=>dt(e).Tt(t),set(e,t,n){var r;return!!i(t)&&((r=dt(e).Bt(t,n,!0))==null||r)},deleteProperty(e,t){var n;return!!i(t)&&((n=dt(e).Dt(t,!0))==null||n)},defineProperty(e,t,n){var r;return(r=dt(e).l(t,n))==null||r},ownKeys:e=>dt(e).it(),preventExtensions(e){t(13)}},Xn=Symbol(`mobx-keys`),Zn=`splice`,Qn=`update`,$n={get(e,t){let n=e[k];return t===k?n:t===`length`?n.Kt():typeof t!=`string`||isNaN(t)?p(tr,t)?tr[t]:e[t]:n.Tt(parseInt(t))},set(e,t,n){let r=e[k];return t===`length`?r.Lt(n):typeof t==`symbol`||isNaN(t)?e[t]=n:r.Bt(parseInt(t),n),!0},preventExtensions(){t(15)}};var er=class{constructor(e=`ObservableArray`,t,n){this.$t=void 0,this.ct=void 0,this.j=[],this.st=void 0,this.ot=void 0,this.A=void 0,this.dehancer=void 0,this.v=void 0,this.Ut=0,this.$t=n,this.ct=new Kt(e),this.A=(e,n)=>t(e,n,`ObservableArray[..]`)}Wt(e){return this.dehancer===void 0?e:this.dehancer(e)}ht(e){return this.dehancer!==void 0&&e.length>0?e.map(this.dehancer):e}Kt(){return this.ct.reportObserved(),this.j.length}Lt(e){(!Number.isInteger(e)||e<0)&&t(40,e);let n=this.j.length;if(e!==n)if(e>n){let t=Array.from({length:e-n});this.wt(n,0,t)}else this.wt(e,n-e)}zt(e,n){e!==this.Ut&&t(16),this.Ut+=n}wt(e,t,n){let r=this.j.length;if(e===void 0?e=0:e>r?e=r:e<0&&(e=Math.max(0,r+e)),t=arguments.length===1?r-e:t==null?0:Math.max(0,Math.min(t,r-e)),n===void 0&&(n=Bt),ft(this)){let r=D(this,{object:this.v,type:Zn,index:e,removedCount:t,added:n});if(!r)return Bt;t=r.removedCount,n=r.added}n=n.length===0?n:n.map(e=>this.A(e,void 0));let i=this.qt(e,t,n);return t===0&&n.length===0||this.Ft(e,n,i),this.ht(i)}qt(e,t,n){if(n.length<1e4)return this.j.splice(e,t,...n);{let r=this.j.slice(e,e+t),i=this.j.slice(e+t);this.j.length+=n.length-t;for(let t=0;t<n.length;t++)this.j[e+t]=n[t];for(let t=0;t<i.length;t++)this.j[e+n.length+t]=i[t];return r}}Ht(e,t,n){let r=mt(this),i=r?{observableKind:`array`,object:this.v,type:Qn,debugObjectName:this.ct.tt,index:e,newValue:t,oldValue:n}:null;this.ct.reportChanged(),r&&gt(this,i)}Ft(e,t,n){let r=mt(this),i=r?{observableKind:`array`,object:this.v,debugObjectName:this.ct.tt,type:Zn,index:e,removed:n,added:t,removedCount:n.length,addedCount:t.length}:null;this.ct.reportChanged(),r&&gt(this,i)}Tt(e){return this.ct.reportObserved(),this.Wt(this.j[e])}Bt(e,t){let n=this.j;if(e<n.length){let r=n[e];if(ft(this)){let n=D(this,{type:Qn,object:this.v,index:e,newValue:t});if(!n)return;t=n.newValue}(t=this.A(t,r))!==r&&(n[e]=t,this.Ht(e,t,r))}else{let r=Array.from({length:e+1-n.length});r[r.length-1]=t,this.wt(n.length,0,r)}}},tr={clear(){return this.splice(0)},replace(e){let t=this[k];return t.wt(0,t.j.length,e)},toJSON(){return this.slice()},splice(e,t,...n){let r=this[k];switch(arguments.length){case 0:return[];case 1:return r.wt(e);case 2:return r.wt(e,t)}return r.wt(e,t,n)},spliceWithArray(e,t,n){return this[k].wt(e,t,n)},push(...e){let t=this[k];return t.wt(t.j.length,0,e),t.j.length},pop(){return this.splice(Math.max(this[k].j.length-1,0),1)[0]},shift(){return this.splice(0,1)[0]},unshift(...e){let t=this[k];return t.wt(0,0,e),t.j.length},reverse(){return j.trackingDerivation&&t(37,`reverse`),this.replace(this.slice().reverse()),this},sort(){j.trackingDerivation&&t(37,`sort`);let e=this.slice();return e.sort.apply(e,arguments),this.replace(e),this},remove(e){let t=this[k],n=t.ht(t.j).indexOf(e);return n>-1&&(this.splice(n,1),!0)}};O(`at`,vt),O(`concat`,vt),O(`flat`,vt),O(`includes`,vt),O(`indexOf`,vt),O(`join`,vt),O(`lastIndexOf`,vt),O(`slice`,vt),O(`toString`,vt),O(`toLocaleString`,vt),O(`toSorted`,vt),O(`toSpliced`,vt),O(`with`,vt),O(`every`,yt),O(`filter`,yt),O(`find`,yt),O(`findIndex`,yt),O(`findLast`,yt),O(`findLastIndex`,yt),O(`flatMap`,yt),O(`forEach`,yt),O(`map`,yt),O(`some`,yt),O(`toReversed`,yt),O(`reduce`,bt),O(`reduceRight`,bt);let M=l(`ObservableArrayAdministration`,er),nr={},rr=`delete`;var ir=class{constructor(e,t=v,n=`ObservableMap`){this.A=void 0,this.tt=void 0,this[k]=nr,this.ft=void 0,this.dt=void 0,this.lt=void 0,this.st=void 0,this.ot=void 0,this.dehancer=void 0,this.A=t,this.tt=n,At(()=>{this.lt=g(`ObservableMap.keys()`),this.ft=new Map,this.dt=new Map,e&&this.merge(e)})}et(e){return this.ft.has(e)}has(e){if(!j.trackingDerivation)return this.et(e);let t=this.dt.get(e);if(!t){let n=t=new yn(this.et(e),y,`ObservableMap.key?`,!1);this.dt.set(e,n),n.onBUOL=new Set([()=>this.dt.delete(e)])}return t.get()}set(e,t){let n=this.et(e);if(ft(this)){let r=D(this,{type:n?Qn:`add`,object:this,newValue:t,name:e});if(!r)return this;t=r.newValue}return n?this.Gt(e,t):this.Jt(e,t),this}delete(e){if(ft(this)&&!D(this,{type:rr,object:this,name:e}))return!1;if(this.et(e)){let t=mt(this),n=t?{observableKind:`map`,debugObjectName:this.tt,type:rr,object:this,oldValue:this.ft.get(e).rt,name:e}:null;return lt(()=>{var t;this.lt.reportChanged(),(t=this.dt.get(e))==null||t.Ot(!1),this.ft.get(e).Ot(void 0),this.ft.delete(e)}),t&&gt(this,n),!0}return!1}Gt(e,t){let n=this.ft.get(e);if((t=n.jt(t))!==j.UNCHANGED){let r=mt(this),i=r?{observableKind:`map`,debugObjectName:this.tt,type:Qn,object:this,oldValue:n.rt,name:e,newValue:t}:null;n.Ot(t),r&&gt(this,i)}}Jt(e,t){lt(()=>{var n;let r=new yn(t,this.A,`ObservableMap.key`,!1);this.ft.set(e,r),t=r.rt,(n=this.dt.get(e))==null||n.Ot(!0),this.lt.reportChanged()});let n=mt(this);n&&gt(this,n?{observableKind:`map`,debugObjectName:this.tt,type:`add`,object:this,name:e,newValue:t}:null)}get(e){return this.has(e)?this.Wt(this.ft.get(e).get()):this.Wt(void 0)}getOrInsert(e,t){return this.has(e)||this.set(e,t),this.get(e)}getOrInsertComputed(e,t){return this.has(e)||this.set(e,t(e)),this.get(e)}Wt(e){return this.dehancer===void 0?e:this.dehancer(e)}keys(){return this.lt.reportObserved(),this.ft.keys()}values(){let e=this,t=this.keys();return St({next(){let{done:n,value:r}=t.next();return{done:n,value:n?void 0:e.get(r)}}})}entries(){let e=this,t=this.keys();return St({next(){let{done:n,value:r}=t.next();return{done:n,value:n?void 0:[r,e.get(r)]}}})}[Symbol.iterator](){return this.entries()}forEach(e,t){for(let[n,r]of this)e.call(t,r,n,this)}merge(e){return ar(e)&&(e=new Map(e)),lt(()=>{o(e)?function(e){let t=Object.keys(e),n=Object.getOwnPropertySymbols(e);return n.length?[...t,...n.filter(t=>zt.propertyIsEnumerable.call(e,t))]:t}(e).forEach(t=>this.set(t,e[t])):Array.isArray(e)?e.forEach(([e,t])=>this.set(e,t)):u(e)?(function(e){return Object.getPrototypeOf(Object.getPrototypeOf(Object.getPrototypeOf(e)))===null}(e)||t(19,e),e.forEach((e,t)=>this.set(t,e))):e!=null&&t(20,e)}),this}clear(){lt(()=>{ke(()=>{for(let e of this.keys())this.delete(e)})})}replace(e){return lt(()=>{let n=function(e){if(u(e)||ar(e))return e;if(Array.isArray(e))return new Map(e);if(o(e)){let t=new Map;for(let n in e)t.set(n,e[n]);return t}return t(21,e)}(e),r=new Map,i=!1;for(let e of this.ft.keys())if(!n.has(e))if(this.delete(e))i=!0;else{let t=this.ft.get(e);r.set(e,t)}for(let[e,t]of n.entries()){let n=this.ft.has(e);if(this.set(e,t),this.ft.has(e)){let t=this.ft.get(e);r.set(e,t),n||(i=!0)}}if(!i)if(this.ft.size!==r.size)this.lt.reportChanged();else{let e=this.ft.keys(),t=r.keys(),n=e.next(),i=t.next();for(;!n.done;){if(n.value!==i.value){this.lt.reportChanged();break}n=e.next(),i=t.next()}}this.ft=r}),this}get size(){return this.lt.reportObserved(),this.ft.size}toString(){return`[object ObservableMap]`}toJSON(){return Array.from(this)}get[Symbol.toStringTag](){return`Map`}},ar=l(`ObservableMap`,ir);let or={};var sr=class{constructor(e,t=v,n=`ObservableSet`){this.tt=void 0,this[k]=or,this.ft=new Set,this.ct=void 0,this.ot=void 0,this.st=void 0,this.dehancer=void 0,this.A=void 0,this.tt=n,this.A=(e,r)=>t(e,r,n),At(()=>{this.ct=g(this.tt),e&&this.replace(e)})}Wt(e){return this.dehancer===void 0?e:this.dehancer(e)}clear(){lt(()=>{ke(()=>{for(let e of this.ft.values())this.delete(e)})})}forEach(e,t){for(let n of this)e.call(t,n,n,this)}get size(){return this.ct.reportObserved(),this.ft.size}add(e){if(ft(this)){let t=D(this,{type:`add`,object:this,newValue:e});if(!t)return this;e=t.newValue}if(!this.has(e)){lt(()=>{e=this.A(e,void 0),this.ft.add(e),this.ct.reportChanged()});let t=mt(this);t&&gt(this,t?{observableKind:`set`,debugObjectName:this.tt,type:`add`,object:this,newValue:e}:null)}return this}delete(e){if(ft(this)&&!D(this,{type:rr,object:this,oldValue:e}))return!1;if(this.has(e)){let t=mt(this),n=t?{observableKind:`set`,debugObjectName:this.tt,type:rr,object:this,oldValue:e}:null;return lt(()=>{this.ct.reportChanged(),this.ft.delete(e)}),t&&gt(this,n),!0}return!1}has(e){return this.ct.reportObserved(),this.ft.has(this.Wt(e))}entries(){let e=this.values();return Ct({next(){let{value:t,done:n}=e.next();return n?{value:void 0,done:n}:{value:[t,t],done:n}}})}keys(){return this.values()}values(){this.ct.reportObserved();let e=this,t=this.ft.values();return Ct({next(){let{value:n,done:r}=t.next();return r?{value:void 0,done:r}:{value:e.Wt(n),done:r}}})}intersection(e){return new Set(this).intersection(e)}union(e){return new Set(this).union(e)}difference(e){return new Set(this).difference(e)}symmetricDifference(e){return new Set(this).symmetricDifference(e)}isSubsetOf(e){return new Set(this).isSubsetOf(e)}isSupersetOf(e){return new Set(this).isSupersetOf(e)}isDisjointFrom(e){return new Set(this).isDisjointFrom(e)}replace(e){return cr(e)&&(e=new Set(e)),Array.isArray(e)||d(e)?lt(()=>{let t=d(e)?e:new Set(e);if(t.size!==0)if(this.ft.size!==0){for(let e of this.ft.values())t.has(this.Wt(e))||this.delete(e);t.forEach(e=>this.add(e))}else t.forEach(e=>this.add(e));else this.clear()}):e!=null&&t(41,e),this}toJSON(){return Array.from(this)}toString(){return`[object ObservableSet]`}[Symbol.iterator](){return this.values()}get[Symbol.toStringTag](){return`Set`}},cr=l(`ObservableSet`,sr);let lr=Object.create(null),ur=`remove`;var dr=class{constructor(e,t=new Map,n,r=Zt){this.h=void 0,this.j=void 0,this.tt=void 0,this.ut=void 0,this.lt=void 0,this.ot=void 0,this.st=void 0,this.v=void 0,this.p=void 0,this.Xt=void 0,this.Qt=void 0,this.O=void 0,this.V=void 0,this.h=e,this.j=t,this.tt=n,this.ut=r,this.lt=new Kt(`ObservableObject.keys`),this.p=o(this.h)}_(e){return(this.j.get(e)??this.vt(e)??this.bt(e)).get()}vt(e){let t=this.O?.get(e);if(!t)return;this.O.delete(e),this.O.size===0&&(this.O=void 0);let n=t();return this.j.set(e,n),n}bt(e){let t=this.V?.get(e);if(!t)return;this.V.delete(e),this.V.size===0&&(this.V=void 0);let n=t();return this.j.set(e,n),n}M(e,t){let n=this.j.get(e)??this.vt(e)??this.bt(e);if(n instanceof xn)return n.set(t),!0;if(ft(this)){let n=D(this,{type:Qn,object:this.v||this.h,name:e,newValue:t});if(!n)return null;t=n.newValue}if((t=n.jt(t))!==j.UNCHANGED){let r=mt(this),i=r?{type:Qn,observableKind:`object`,debugObjectName:this.tt,object:this.v||this.h,oldValue:n.rt,name:e,newValue:t}:null;n.Ot(t),r&&gt(this,i)}return!0}Tt(e){return j.trackingDerivation&&!p(this.h,e)&&this.et(e),this.h[e]}Bt(e,t,n=!1){return p(this.h,e)?this.j.has(e)?this.M(e,t):n?Reflect.set(this.h,e,t):(this.h[e]=t,!0):this.u(e,{value:t,enumerable:!0,writable:!0,configurable:!0},this.ut,n)}et(e){if(!j.trackingDerivation)return e in this.h;this.Qt||=new Map;let t=this.Qt.get(e);return t||(t=new yn(e in this.h,y,`ObservableObject.key?`,!1),this.Qt.set(e,t)),t.get()}u(e,t,n,r=!1){return!0===n&&(n=this.ut),!1===n?this.l(e,t,r):n.u(this,e,t,r)}l(e,t,n=!1){try{Fe();let r=this.Dt(e);if(!r)return r;if(ft(this)){let n=D(this,{object:this.v||this.h,name:e,type:`add`,newValue:t.value});if(!n)return null;let{newValue:r}=n;t.value!==r&&(t=It({},t,{value:r}))}if(n){if(!Reflect.defineProperty(this.h,e,t))return!1}else Rt(this.h,e,t);this.Yt(e,t.value)}finally{Ie()}return!0}S(e,t,n,r=!1){try{Fe();let i=this.Dt(e);if(!i)return i;if(ft(this)){let n=D(this,{object:this.v||this.h,name:e,type:`add`,newValue:t});if(!n)return null;t=n.newValue}let a=Tt(e),o={configurable:!j.safeDescriptors||this.p,enumerable:!0,get:a.get,set:a.set};if(r){if(!Reflect.defineProperty(this.h,e,o))return!1}else Rt(this.h,e,o);let s=new yn(t,n,`ObservableObject.key`,!1);this.j.set(e,s),this.Yt(e,s.rt)}finally{Ie()}return!0}m(e,t,n=!1){try{Fe();let r=this.Dt(e);if(!r)return r;if(ft(this)&&!D(this,{object:this.v||this.h,name:e,type:`add`,newValue:void 0}))return null;t.name||=`ObservableObject.key`,t.context=this.v||this.h;let i=Tt(e),a={configurable:!j.safeDescriptors||this.p,enumerable:!1,get:i.get,set:i.set};if(n){if(!Reflect.defineProperty(this.h,e,a))return!1}else Rt(this.h,e,a);this.j.set(e,new xn(t)),this.Yt(e,void 0)}finally{Ie()}return!0}Dt(e,t=!1){if(!p(this.h,e))return!0;if(ft(this)&&!D(this,{object:this.v||this.h,name:e,type:ur}))return null;try{var n;Fe();let r=mt(this),i=this.j.get(e),a;if(i||!r||(a=Lt(this.h,e)?.value),t){if(!Reflect.deleteProperty(this.h,e))return!1}else delete this.h[e];i&&(this.j.delete(e),i instanceof yn&&(a=i.rt),ze(i)),this.lt.reportChanged(),(n=this.Qt)==null||(n=n.get(e))==null||n.set(e in this.h),r&&r&&gt(this,{type:ur,observableKind:`object`,object:this.v||this.h,debugObjectName:this.tt,oldValue:a,name:e})}finally{Ie()}return!0}Yt(e,t){var n;let r=mt(this);r&&r&&gt(this,r?{type:`add`,observableKind:`object`,debugObjectName:this.tt,object:this.v||this.h,name:e,newValue:t}:null),(n=this.Qt)==null||(n=n.get(e))==null||n.set(!0),this.lt.reportChanged()}it(){return this.lt.reportObserved(),Wt(this.h)}nt(){return this.lt.reportObserved(),Object.keys(this.h)}};let fr=l(`ObservableObjectAdministration`,dr),pr=zt.toString,mr=globalThis.Iterator?.prototype||{};e.$mobx=k,e.FlowCancellationError=Wn,e.ObservableMap=ir,e.ObservableSet=sr,e.Reaction=On,e._allowStateChanges=we,e._allowStateChangesInsideComputed=We,e._allowStateReadsEnd=function(e){j.allowStateReads=e},e._allowStateReadsStart=function(e){let t=j.allowStateReads;return j.allowStateReads=e,t},e._autoAction=zn,e._autoActionBound=Vn,e._endAction=Ce,e._getAdministration=Ot,e._getGlobalState=function(){return j},e._interceptReads=function(e,t,n){let r;return ar(e)||xt(e)||bn(e)?r=Ot(e):Et(e)&&(r=Ot(e,t)),r.dehancer=typeof t==`function`?t:n,()=>{r.dehancer=void 0}},e._isComputingDerivation=function(){return j.trackingDerivation!==null},e._resetGlobalState=function(){let e=new Tn;for(let t in e)wn.indexOf(t)===-1&&(j[t]=e[t]);j.allowStateChanges=!j.enforceActions},e._startAction=Se,e.action=Rn,e.actionBound=Bn,e.autorun=Ke,e.compareDefault=Jt,e.compareIdentity=function(e,t){return e===t},e.compareShallow=function(e,t){return jt(e,t,1)},e.compareStructural=_,e.computed=pn,e.computedStruct=fn,e.configure=function(e){!0===e.isolateGlobalState&&function(){if((j.pendingReactions.length||j.inBatch||j.isRunningReactions)&&t(36),Dn=!0,En){let e=globalThis;--e.__mobxInstanceCount===0&&(e.__mobxGlobals=void 0),j=new Tn}}();let{enforceActions:n}=e;if(n!==void 0){let e=n===Un?Un:n===`observed`;j.enforceActions=e,j.allowStateChanges=!0!==e&&e!==Un}[`computedRequiresReaction`,`reactionRequiresObservable`,`observableRequiresReaction`,`disableErrorBoundaries`,`safeDescriptors`].forEach(t=>{t in e&&(j[t]=!!e[t])}),j.allowStateReads=!j.observableRequiresReaction,e.reactionScheduler&&function(e){let t=An;An=n=>e(()=>t(n))}(e.reactionScheduler)},e.createAtom=g,e.defineProperty=function(e,n,r){if(Et(e))return e[k].l(n,r);t(39)},e.entries=function(e){return Et(e)?rt(e).map(t=>[t,e[t]]):ar(e)?rt(e).map(t=>[t,e.get(t)]):cr(e)?Array.from(e.entries()):xt(e)?e.map((e,t)=>[t,e]):void t(7)},e.extendObservable=Ye,e.flow=qn,e.flowBound=Jn,e.flowResult=function(e){return e},e.get=function(e,n){if(it(e,n))return Et(e)?e[k].Tt(n):ar(e)?e.get(n):xt(e)?e[n]:void t(11)},e.getAtom=Dt,e.getDebugName=kt,e.getDependencyTree=function(e,t){return Xe(Dt(e,t))},e.getObserverTree=function(e,t){return Ze(Dt(e,t))},e.has=it,e.intercept=function(e,t,n){return r(n)?function(e,t,n){return pt(Ot(e,t),n)}(e,t,n):function(e,t){return pt(Ot(e),t)}(e,t)},e.isAction=Ge,e.isBoxedObservable=bn,e.isComputed=function(e){return et(e)},e.isComputedProp=function(e,t){return et(e,t)},e.isFlow=$e,e.isFlowCancellationError=function(e){return e instanceof Wn},e.isObservable=nt,e.isObservableArray=xt,e.isObservableMap=ar,e.isObservableObject=Et,e.isObservableProp=function(e,t){return tt(e,t)},e.isObservableSet=cr,e.keys=rt,e.makeAutoObservable=function(e,t,n){return o(e)?Ye(e,e,t,n):(At(()=>{let r=wt(e,n)[k];if(!e[Xn]){let t=Object.getPrototypeOf(e),n=new Set([...Wt(e),...Wt(t)]);n.delete(`constructor`),n.delete(k),c(t,Xn,n)}e[Xn].forEach(e=>_t(r,e,!t||!(e in t)||t[e]))}),e)},e.makeObservable=function(e,t,n){return At(()=>{let r=wt(e,n)[k];Wt(t).forEach(e=>_t(r,e,t[e]))}),e},e.observable=ln,e.observableDeep=sn,e.observableRef=an,e.observableShallow=on,e.observableStruct=cn,e.observe=function(e,t,n,i){return r(n)?function(e,t,n,r){return ot(Ot(e,t),n,r)}(e,t,n,i):function(e,t,n){let r=Ot(e);if(xt(e))n&&t({observableKind:`array`,object:r.v,debugObjectName:r.ct.tt,type:`splice`,index:0,added:r.j.slice(),addedCount:r.j.length,removed:[],removedCount:0});else if(!ar(e)&&!cr(e)&&!Et(e))return ot(r,t,n);return ht(r,t)}(e,t,n)},e.onBecomeObserved=function(e,t,n){return Je(`onBO`,e,t,n)},e.onBecomeUnobserved=function(e,t,n){return Je(`onBUO`,e,t,n)},e.onReactionError=function(e){return j.globalReactionErrorHandlers.push(e),()=>{let t=j.globalReactionErrorHandlers.indexOf(e);t>=0&&j.globalReactionErrorHandlers.splice(t,1)}},e.override=Yt,e.ownKeys=at,e.reaction=function(e,t,n=Vt){function r(){if(p=!1,h.isDisposed)return;let t=!1,r=d;h.track(()=>{let n=we(!1,()=>e(h));t=f||!m(d,n),d=n}),(f&&n.fireImmediately||!f&&t)&&o(d,r,h),f=!1}var i;let a=n.name??`Reaction`,o=Rn(a,n.onError?(s=n.onError,c=t,function(){try{return c.apply(this,arguments)}catch(e){s.call(this,e)}}):t);var s,c;let l=!n.scheduler&&!n.delay,u=qe(n),d,f=!0,p=!1,m=n.equals||Jt,h=new On(a,()=>{f||l?r():p||(p=!0,u(r))},n.onError,n.requiresObservable);return n!=null&&(i=n.signal)!=null&&i.aborted||h.Y(),h.Z(n?.signal)},e.remove=function(e,n){Et(e)?e[k].Dt(n):ar(e)||cr(e)?e.delete(n):xt(e)?(typeof n!=`number`&&(n=parseInt(n,10)),e.splice(n,1)):t(9)},e.runInAction=We,e.set=function e(n,r,i){if(arguments.length===2&&!cr(n)){Fe();let t=r;try{for(let r in t)e(n,r,t[r])}finally{Ie()}return}Et(n)?n[k].Bt(r,i):ar(n)?n.set(r,i):cr(n)?n.add(r):xt(n)?(typeof r!=`number`&&(r=parseInt(r,10)),r<0&&t(42,r),Fe(),r>=n.length&&(n.length=r+1),n[r]=i,Ie()):t(8)},e.spy=function(){return console.warn(`[mobx.spy] Is a no-op in production builds`),function(){}},e.toJS=function(e){return ct(e,new Map)},e.transaction=lt,e.untracked=ke,e.values=function(e){return Et(e)?rt(e).map(t=>e[t]):ar(e)?rt(e).map(t=>e.get(t)):cr(e)?Array.from(e.values()):xt(e)?e.slice():void t(6)},e.when=function(e,t,n){return arguments.length===1||t&&typeof t==`object`?function(e,t){var n;if(t!=null&&(n=t.signal)!=null&&n.aborted)return It(Promise.reject(Error(`WHEN_ABORTED`)),{cancel:()=>null});let r,i,a=new Promise((n,a)=>{var o;let s=ut(e,n,It({},t,{onError:a}));r=()=>{s(),a(Error(`WHEN_CANCELLED`))},i=()=>{s(),a(Error(`WHEN_ABORTED`))},t==null||(o=t.signal)==null||o.addEventListener==null||o.addEventListener(`abort`,i)}).finally(()=>{var e;return t==null||(e=t.signal)==null||e.removeEventListener==null?void 0:e.removeEventListener(`abort`,i)});return a.cancel=r,a}(e,t):ut(e,t,n||{})}})),mw=Ae((e=>{Object.defineProperty(e,`__esModule`,{value:!0});let t={0:`Invalid value for configuration 'enforceActions', expected 'never', 'always' or 'observed'`,1(e,t){return`Cannot apply '${e}' to '${t.toString()}': Field not found.`},5:`'keys()' can only be used on observable objects, arrays, sets and maps`,6:`'values()' can only be used on observable objects, arrays, sets and maps`,7:`'entries()' can only be used on observable objects, arrays and maps`,8:`'set()' can only be used on observable objects, arrays and maps`,9:`'remove()' can only be used on observable objects, arrays and maps`,10:`'has()' can only be used on observable objects, arrays and maps`,11:`'get()' can only be used on observable objects, arrays and maps`,12:`Invalid annotation`,13:`Dynamic observable objects cannot be frozen. If you're passing observables to 3rd party component/function that calls Object.freeze, pass copy instead: toJS(observable)`,14:`Intercept handlers should return nothing or a change object`,15:`Observable arrays cannot be frozen. If you're passing observables to 3rd party component/function that calls Object.freeze, pass copy instead: toJS(observable)`,16:`Modification exception: the internal structure of an observable array was changed.`,19(e){return`Cannot initialize from classes that inherit from Map: `+e.constructor.name},20(e){return`Cannot initialize map from `+e},21(e){return`Cannot convert to map from '${e}'`},23:`It is not possible to get index atoms from arrays`,24(e){return`Cannot obtain administration from `+e},25(e,t){return`the entry '${e}' does not exist in the observable map '${t}'`},26:`please specify a property`,27(e,t){return`no observable property '${e.toString()}' found on the observable object '${t}'`},28(e){return`Cannot obtain atom from `+e},29:`Expecting some object`,30:`invalid action stack. did you forget to finish an action?`,31:`missing option for computed: get`,32(e,t){return`Cycle detected in computation ${e}: ${t}`},33(e){return`The setter of computed value '${e}' is trying to update itself. Did you intend to update an _observable_ value, instead of the computed property?`},34(e){return`[ComputedValue '${e}'] It is not possible to assign a new value to a computed value.`},35:"There are multiple, different versions of MobX active. Make sure MobX is loaded only once or use `configure({ isolateGlobalState: true })`",36:`isolateGlobalState should be called before MobX is running any reactions`,37(e){return`[mobx] \`observableArray.${e}()\` mutates the array in-place, which is not allowed inside a derivation. Use \`array.slice().${e}()\` instead`},38:`'ownKeys()' can only be used on observable objects`,39:`'defineProperty()' can only be used on observable objects`,40(e){return`Out of range: `+e},41(e){return`Cannot initialize set from `+e},42(e){return`Invalid index: '${e}'`},43(e,t,n){return`Cannot apply '${e}' to '${t}' (kind: ${n}):\n'${e}' can only be used on properties with a function value.`},44(e){return`'${e}' can only be used with 'makeObservable'`}};function n(e,...n){{let r=typeof e==`string`?e:t[e];throw typeof r==`function`&&(r=r.apply(null,n)),Error(`[MobX] ${r}`)}}let r=Object.assign,i=Object.getOwnPropertyDescriptor,a=Object.defineProperty,o=Object.prototype,s=[];Object.freeze(s);let c={};Object.freeze(c);let l=Object.toString();function u(){return++A.mobxGuid}function d(e){let t=!1;return function(){if(!t)return t=!0,e.apply(this,arguments)}}let f=()=>{};function p(e){return typeof e==`function`}function m(e){switch(typeof e){case`string`:case`symbol`:case`number`:return!0}return!1}function h(e){return typeof e==`object`&&!!e}function g(e){if(!h(e))return!1;let t=Object.getPrototypeOf(e);if(t==null)return!0;let n=ae(t,`constructor`)&&t.constructor;return typeof n==`function`&&n.toString()===l}function _(e){let t=e?.constructor;return t?t.name===`GeneratorFunction`||t.displayName===`GeneratorFunction`:!1}function v(e,t,n){a(e,t,{enumerable:!1,writable:!0,configurable:!0,value:n})}function y(e,t,n){a(e,t,{enumerable:!1,writable:!1,configurable:!0,value:n})}function b(e,t){let n=`isMobX`+e;return t.prototype[n]=!0,function(e){return h(e)&&e[n]===!0}}function ee(e){return e!=null&&Object.prototype.toString.call(e)===`[object Map]`}function x(e){return Object.getPrototypeOf(Object.getPrototypeOf(Object.getPrototypeOf(e)))===null}function S(e){return e!=null&&Object.prototype.toString.call(e)===`[object Set]`}function te(e){let t=Object.keys(e),n=Object.getOwnPropertySymbols(e);return n.length?[...t,...n.filter(t=>o.propertyIsEnumerable.call(e,t))]:t}let ne=Reflect.ownKeys;function re(e){return typeof e==`string`?e:typeof e==`symbol`?e.toString():new String(e).toString()}function ie(e){return e===null?null:typeof e==`object`?``+e:e}function ae(e,t){return o.hasOwnProperty.call(e,t)}let oe=Object.getOwnPropertyDescriptors;function C(e,t){return!!(e&t)}function w(e,t,n){return n?e|=t:e&=~t,e}function se(e,t){t.includes(e.kind)||n(`The decorator applied to '${String(e.name)}' cannot be used on a ${e.kind} element`)}let T=Symbol(`mobx administration`);var ce=class{constructor(e=`Atom@`+u()){this.name_=void 0,this.flags_=0,this.observers_=null,this.lastAccessedBy_=0,this.lowestObserverState_=-1,this.onBOL=void 0,this.onBUOL=void 0,this.name_=e}get isBeingObserved(){return C(this.flags_,1)}set isBeingObserved(e){this.flags_=w(this.flags_,1,e)}get isPendingUnobservation(){return C(this.flags_,2)}set isPendingUnobservation(e){this.flags_=w(this.flags_,2,e)}get diffValue(){return+!!C(this.flags_,4)}set diffValue(e){this.flags_=w(this.flags_,4,e===1)}onBO(){this.onBOL&&this.onBOL.forEach(e=>e())}onBUO(){this.onBUOL&&this.onBUOL.forEach(e=>e())}reportObserved(){return dn(this)}reportChanged(){sn(),fn(this),cn()}toString(){return this.name_}};let le=b(`Atom`,ce);function ue(e,t=f,n=f){let r=new ce(e);return t!==f&&(r.onBOL=new Set([t])),n!==f&&(r.onBUOL=new Set([n])),r}function de(e,t){return e===t}function fe(e,t){return zi(e,t)}function pe(e,t){return zi(e,t,1)}let me=Object.is;function he(e,t,n){return e===null||typeof e!=`object`&&typeof e!=`function`||Sr(e)?e:Array.isArray(e)?D.array(e,{name:n}):g(e)?D.object(e,void 0,{name:n}):ee(e)?D.map(e,{name:n}):S(e)?D.set(e,{name:n}):typeof e==`function`&&!Vn(e)&&!pr(e)?_(e)?lr(e):Ln(n,e):e}function ge(e,t,r){if(e==null||ji(e)||mi(e)||vi(e)||Ci(e))return e;if(Array.isArray(e))return D.array(e,{name:r,deep:!1});if(g(e))return D.object(e,void 0,{name:r,deep:!1});if(ee(e))return D.map(e,{name:r,deep:!1});if(S(e))return D.set(e,{name:r,deep:!1});n(`The shallow modifier / decorator can only used in combination with arrays, objects, maps and sets`)}function _e(e){return e}function ve(e,t){return Sr(e)&&n(`observable.struct should not be used with observable values`),zi(e,t)?t:e}let ye=`override`,be={annotationType_:ye,make_:Se,extend_:Ce};function xe(e){return e.annotationType_===ye}function Se(e,t){return e.isPlainObject_&&n(`Cannot apply '${this.annotationType_}' to '${e.name_}.${t.toString()}':\n'${this.annotationType_}' cannot be used on plain objects.`),ae(e.appliedAnnotations_,t)||n(`'${e.name_}.${t.toString()}' is annotated with '${this.annotationType_}', but no such annotated member was found on prototype.`),0}function Ce(e,t,r,i){n(44,this.annotationType_)}function we(e,t){return{annotationType_:e,options_:t,make_:Te,extend_:Ee}}function Te(e,t,n,r){var i;return(i=this.options_)!=null&&i.bound?this.extend_(e,t,n,!1)===null?0:1:r===e.target_?this.extend_(e,t,n,!1)===null?0:2:Vn(n.value)?1:(a(r,t,ke(e,this,t,n,!1)),2)}function Ee(e,t,n,r){let i=ke(e,this,t,n);return e.defineProperty_(t,i,r)}function De(e,t,r){se(r,[`method`,`field`]);let{kind:i,name:a,addInitializer:o}=r,s=e,c=e=>St(s.options_?.name??a.toString(),e,s.options_?.autoAction??!1);if(i==`field`)return function(e){var t;let n=e;return Vn(n)||(n=c(n)),(t=s.options_)!=null&&t.bound&&(n=n.bind(this),n.isMobxAction=!0),n};if(i==`method`){var l;return Vn(t)||(t=c(t)),(l=s.options_)!=null&&l.bound&&o(function(){let e=this,t=e[a].bind(e);t.isMobxAction=!0,e[a]=t}),t}n(43,s.annotationType_,String(a),i)}function Oe(e,{annotationType_:t},r,{value:i}){p(i)||n(`Cannot apply '${t}' to '${e.name_}.${r.toString()}':\n'${t}' can only be used on properties with a function value.`)}function ke(e,t,n,r,i=A.safeDescriptors){var a,o;Oe(e,t,n,r);let{value:s}=r;return(a=t.options_)!=null&&a.bound&&(s=s.bind(e.proxy_??e.target_)),{value:St(t.options_?.name??n.toString(),s,t.options_?.autoAction??!1,(o=t.options_)!=null&&o.bound?e.proxy_??e.target_:void 0),configurable:i?e.isPlainObject_:!0,enumerable:!1,writable:!i}}function Ae(e,t){return{annotationType_:e,options_:t,make_:je,extend_:Me}}function je(e,t,n,r){var i;return r===e.target_?this.extend_(e,t,n,!1)===null?0:2:(i=this.options_)!=null&&i.bound&&(!ae(e.target_,t)||!pr(e.target_[t]))&&this.extend_(e,t,n,!1)===null?0:pr(n.value)?1:(a(r,t,E(e,this,t,n,!1,!1)),2)}function Me(e,t,n,r){let i=E(e,this,t,n,this.options_?.bound);return e.defineProperty_(t,i,r)}function Ne(e,t,n){var r;se(n,[`method`]);let{name:i,addInitializer:a}=n;return pr(t)||(t=lr(t)),(r=e.options_)!=null&&r.bound&&a(function(){let e=this,t=e[i].bind(e);t.isMobXFlow=!0,e[i]=t}),t}function Pe(e,{annotationType_:t},r,{value:i}){p(i)||n(`Cannot apply '${t}' to '${e.name_}.${r.toString()}':\n'${t}' can only be used on properties with a generator function value.`)}function E(e,t,n,r,i,a=A.safeDescriptors){Pe(e,t,n,r);let{value:o}=r;return pr(o)||(o=lr(o)),i&&(o=o.bind(e.proxy_??e.target_),o.isMobXFlow=!0),{value:o,configurable:a?e.isPlainObject_:!0,enumerable:!1,writable:!a}}function Fe(e,t){return{annotationType_:e,options_:t,make_:Ie,extend_:Le}}function Ie(e,t,n){return this.extend_(e,t,n,!1)===null?0:1}function Le(e,t,n,i){return ze(e,this,t,n),e.defineComputedProperty_(t,r({},this.options_,{get:n.get,set:n.set}),i)}function Re(e,t,n){se(n,[`getter`]);let i=e,{name:a,addInitializer:o}=n,s;function c(e,n){let o=r({},i.options_,{get:t,context:e});return o.name||=`${n.name_}.${a.toString()}`,new jt(o)}return o(function(){let e=Oi(this)[T],n=this,r=e.values_.get(a);r instanceof jt&&r.derivation!==t&&e.values_.delete(a),(e.lazyComputedKeys_??=new Map).set(a,()=>c(n,e))}),function(){let e=this[T],n=e.values_.get(a);if(n instanceof jt&&n.derivation!==t){let t=s?.get(this);return t||(t=c(this,e),(s??=new WeakMap).set(this,t)),t.get()}return e.getObservablePropValue_(a)}}function ze(e,{annotationType_:t},r,{get:i}){i||n(`Cannot apply '${t}' to '${e.name_}.${r.toString()}':\n'${t}' can only be used on getter(+setter) properties.`)}function Be(e,t){return{annotationType_:e,options_:t,make_:Ve,extend_:He}}function Ve(e,t,n){return this.extend_(e,t,n,!1)===null?0:1}function He(e,t,n,r){return We(e,this,t,n),e.defineObservableProperty_(t,n.value,this.options_?.enhancer_??he,r)}function Ue(e,t,r){if(r.kind===`field`)throw n(`Please use \`@observable accessor ${String(r.name)}\` instead of \`@observable ${String(r.name)}\``);se(r,[`accessor`]);let i=e,{kind:a,name:o}=r;if(a!==`accessor`)return;function s(e,t){let n=Oi(e)[T];return(n.lazyObservableKeys_??=new Map).set(o,()=>new kt(t,i.options_?.enhancer_??he,`${n.name_}.${o.toString()}`,!1)),n}return{get(){return(this[T]??s(this,t.get.call(this))).getObservablePropValue_(o)},set(e){return(this[T]??s(this,e)).setObservablePropValue_(o,e)},init(e){return s(this,e),e}}}function We(e,{annotationType_:t},r,i){`value`in i||n(`Cannot apply '${t}' to '${e.name_}.${r.toString()}':\n'${t}' cannot be used on getter/setter properties`)}let Ge=Ke();function Ke(e){return{annotationType_:`true`,options_:e,make_:Ye,extend_:Xe}}let qe=[Ge];function Je(e){let t=e.deep!==!1,n=!!e.autoBind,r=!t|(n?2:0);return qe[r]??(qe[r]=Ke({deep:t,autoBind:n}))}function Ye(e,t,n,r){var i;if(n.get)return O.make_(e,t,n,r);if(n.set){let i=Vn(n.set)?n.set:St(t.toString(),n.set);return r===e.target_?e.defineProperty_(t,{configurable:A.safeDescriptors?e.isPlainObject_:!0,set:i})===null?0:2:(a(r,t,{configurable:!0,set:i}),2)}if(r!==e.target_&&typeof n.value==`function`){var o;if(_(n.value)){var s;return((s=this.options_)!=null&&s.autoBind?ur:lr).make_(e,t,n,r)}return((o=this.options_)!=null&&o.autoBind?zn:Ln).make_(e,t,n,r)}let c=this.options_?.deep===!1?ut:D;return typeof n.value==`function`&&(i=this.options_)!=null&&i.autoBind&&(n.value=n.value.bind(e.proxy_??e.target_)),c.make_(e,t,n,r)}function Xe(e,t,n,r){var i;return n.get?O.extend_(e,t,n,r):n.set?e.defineProperty_(t,{configurable:A.safeDescriptors?e.isPlainObject_:!0,set:St(t.toString(),n.set)},r):(typeof n.value==`function`&&(i=this.options_)!=null&&i.autoBind&&(n.value=n.value.bind(e.proxy_??e.target_)),(this.options_?.deep===!1?ut:D).extend_(e,t,n,r))}function Ze(e,t){return r(function(r,i){if(i&&typeof i.kind==`string`)return t(e,r,i);n(`Invalid arguments for \`${e.annotationType_}\``)},e)}let Qe={deep:!0,name:void 0,defaultDecorator:void 0};Object.freeze(Qe);function $e(e){return e||Qe}let et=Be(`observable`),tt=Be(`observable.ref`,{enhancer_:_e}),nt=Be(`observable.shallow`,{enhancer_:ge}),rt=Be(`observable.struct`,{enhancer_:ve});function it(e){return Ze(e,Ue)}function at(e){return e.deep===!0?he:e.deep===!1?_e:st(e.defaultDecorator)}function ot(e){return e?e.defaultDecorator??Je(e):void 0}function st(e){return e?e.options_?.enhancer_??he:he}function ct(e,t,n){return t&&typeof t.kind==`string`?Ue(et,e,t):Sr(e)?e:g(e)?D.object(e,t,n):Array.isArray(e)?D.array(e,t):ee(e)?D.map(e,t):S(e)?D.set(e,t):typeof e==`object`&&e?e:D.box(e,t)}let lt={box(e,t){let n=$e(t);return new kt(e,at(n),n.name,!0,n.equals)},array(e,t){let n=$e(t);return si(e,at(n),n.name)},map(e,t){let n=$e(t);return new _i(e,at(n),n.name)},set(e,t){let n=$e(t);return new Si(e,at(n),n.name)},object(e,t,n){return Li(()=>Qn(Kr({},n),e,t))}},ut=it(tt),dt=it(nt),ft=it(et),pt=it(rt);var D=r(ct,et,lt);let mt=`computed`;function ht(e){return Ze(e,Re)}let gt=Fe(mt),_t=ht(Fe(`computed.struct`,{equals:fe})),O=function(e,t){if(t&&typeof t.kind==`string`)return Re(gt,e,t);if(g(e))return ht(Fe(mt,e));p(e)||n("First argument to `computed` should be an expression."),p(t)&&n("A setter as second argument is no longer supported, use `{ set: fn }` option instead");let r=g(t)?t:{};return r.get=e,r.name||=e.name||``,new jt(r)};r(O,gt);let vt=0,yt=1,bt=i(()=>{},`name`)?.configurable??!1,xt={value:`action`,configurable:!0,writable:!1,enumerable:!1};function St(e,t,r=!1,i){p(t)||n("`action` can only be invoked on functions"),(typeof e!=`string`||!e)&&n(`actions should have valid names, got: '${e}'`);function o(){return Ct(e,r,t,i||this,arguments)}return o.isMobxAction=!0,o.toString=()=>t.toString(),bt&&(xt.value=e,a(o,`name`,xt)),o}function Ct(e,t,n,r,i){let a=wt(e,t,r,i);try{return n.apply(r,i)}catch(e){throw a.error_=e,e}finally{Tt(a)}}function wt(e,t,n,r){let i=Sn()&&!!e,a=0;i&&(a=Date.now(),wn({type:j,name:e,object:n,arguments:r?Array.from(r):s}));let o=A.trackingDerivation,c=!t||!o;sn();let l=A.allowStateChanges;c&&(Wt(),l=Dt(!0));let u=A.allowStateReads;k(!0);let d={runAsAction_:c,prevDerivation_:o,prevAllowStateChanges_:l,prevAllowStateReads_:u,notifySpy_:i,startTime_:a,actionId_:yt++,parentActionId_:vt};return vt=d.actionId_,d}function Tt(e){vt!==e.actionId_&&n(30),vt=e.parentActionId_,e.error_!==void 0&&(A.suppressReactionErrors=!0),Ot(e.prevAllowStateChanges_),Kt(e.prevAllowStateReads_),cn(),e.runAsAction_&&Gt(e.prevDerivation_),e.notifySpy_&&En({time:Date.now()-e.startTime_}),A.suppressReactionErrors=!1}function Et(e,t){let n=Dt(e);try{return t()}finally{Ot(n)}}function Dt(e){let t=A.allowStateChanges;return A.allowStateChanges=e,t}function Ot(e){A.allowStateChanges=e}var kt=class extends ce{constructor(e,t,n=`ObservableValue@`+u(),r=!0,i=me){super(n),this.enhancer_=void 0,this.name_=void 0,this.equals_=void 0,this.hasUnreportedChange_=!1,this.interceptors_=void 0,this.changeListeners_=void 0,this.value_=void 0,this.dehancer=void 0,this.enhancer_=t,this.name_=n,this.equals_=i,this.value_=t(e,void 0,n),r&&Sn()&&Cn({type:`create`,object:this,observableKind:`value`,debugObjectName:this.name_,newValue:this.value_})}dehanceValue(e){return this.dehancer===void 0?e:this.dehancer(e)}set(e){let t=this.value_;if(e=this.prepareNewValue_(e),e!==A.UNCHANGED){let n=Sn();n&&wn({type:ii,object:this,observableKind:`value`,debugObjectName:this.name_,newValue:e,oldValue:t}),this.setNewValue_(e),n&&En()}}prepareNewValue_(e){if(Lt(this),qr(this)){let t=Yr(this,{object:this,type:ii,newValue:e});if(!t)return A.UNCHANGED;e=t.newValue}return e=this.enhancer_(e,this.value_,this.name_),this.equals_(this.value_,e)?A.UNCHANGED:e}setNewValue_(e){let t=this.value_;this.value_=e,this.reportChanged(),Xr(this)&&Qr(this,{type:ii,object:this,newValue:e,oldValue:t})}get(){return this.reportObserved(),this.dehanceValue(this.value_)}raw(){return this.value_}toJSON(){return this.get()}toString(){return`${this.name_}[${this.value_}]`}valueOf(){return ie(this.get())}[Symbol.toPrimitive](){return this.valueOf()}};let At=b(`ObservableValue`,kt);var jt=class{constructor(e){this.dependenciesState_=-1,this.observing_=[],this.newObserving_=null,this.observers_=null,this.runId_=0,this.lastAccessedBy_=0,this.lowestObserverState_=0,this.unboundDepsCount_=0,this.value_=new Nt(null),this.name_=void 0,this.triggeredBy_=void 0,this.flags_=0,this.derivation=void 0,this.setter_=void 0,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@`+u(),e.set&&(this.setter_=St(this.name_+`-setter`,e.set)),this.equals_=e.equals||me,this.scope_=e.context,this.requiresReaction_=e.requiresReaction,this.keepAlive_=!!e.keepAlive}onBecomeStale_(){mn(this)}onBO(){this.onBOL&&this.onBOL.forEach(e=>e())}onBUO(){this.onBUOL&&this.onBUOL.forEach(e=>e())}get isComputing(){return C(this.flags_,1)}set isComputing(e){this.flags_=w(this.flags_,1,e)}get isRunningSetter(){return C(this.flags_,2)}set isRunningSetter(e){this.flags_=w(this.flags_,2,e)}get isBeingObserved(){return C(this.flags_,4)}set isBeingObserved(e){this.flags_=w(this.flags_,4,e)}get isPendingUnobservation(){return C(this.flags_,8)}set isPendingUnobservation(e){this.flags_=w(this.flags_,8,e)}get diffValue(){return+!!C(this.flags_,16)}set diffValue(e){this.flags_=w(this.flags_,16,e===1)}get(){if(this.isComputing&&n(32,this.name_,this.derivation),A.inBatch===0&&(!this.observers_||this.observers_.size===0)&&!this.keepAlive_)Ft(this)&&(this.warnAboutUntrackedRead_(),sn(),this.value_=this.computeValue_(!1),cn());else{let e=this.isBeingObserved;if(dn(this),Ft(this)){let e=A.trackingContext;!e&&(this.keepAlive_||this.isBeingObserved)&&(A.trackingContext=this),this.trackAndCompute()&&pn(this),A.trackingContext=e}else !e&&this.isBeingObserved&&this.observing_.forEach(un)}let e=this.value_;if(Pt(e))throw e.cause;return e}set(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_)}trackAndCompute(){let e=this.value_,t=this.dependenciesState_===-1,n=this.computeValue_(!0),r=t||Pt(e)||Pt(n)||!this.equals_(e,n);return r&&(this.value_=n,Sn()&&Cn({observableKind:`computed`,debugObjectName:this.name_,object:this.scope_,type:`update`,oldValue:e,newValue:n})),r}computeValue_(e){this.isComputing=!0;let t=Dt(!1),n;if(e)n=zt(this,this.derivation,this.scope_);else if(A.disableErrorBoundaries===!0)n=this.derivation.call(this.scope_);else try{n=this.derivation.call(this.scope_)}catch(e){n=new Nt(e)}return Ot(t),this.isComputing=!1,n}suspend_(){this.keepAlive_||(Ht(this),this.value_=void 0)}warnAboutUntrackedRead_(){(typeof this.requiresReaction_==`boolean`?this.requiresReaction_:A.computedRequiresReaction)&&console.warn(`[mobx] Computed value '${this.name_}' is being read outside a reactive context. Doing a full recompute.`)}toString(){return`${this.name_}[${this.derivation.toString()}]`}valueOf(){return ie(this.get())}[Symbol.toPrimitive](){return this.valueOf()}};let Mt=b(`ComputedValue`,jt);var Nt=class{constructor(e){this.cause=void 0,this.cause=e}};function Pt(e){return e instanceof Nt}function Ft(e){switch(e.dependenciesState_){case 0:return!1;case-1:case 2:return!0;case 1:{let t=k(!0),n=Wt(),r=e.observing_,i=r.length;for(let a=0;a<i;a++){let i=r[a];if(Mt(i)){if(A.disableErrorBoundaries)i.get();else try{i.get()}catch{return Gt(n),Kt(t),!0}if(e.dependenciesState_===2)return Gt(n),Kt(t),!0}}return qt(e),Gt(n),Kt(t),!1}}}function It(){return A.trackingDerivation!==null}function Lt(e){let t=!!e.observers_&&e.observers_.size>0;!A.allowStateChanges&&(t||A.enforceActions===`always`)&&console.warn(`[MobX] `+(A.enforceActions?`Since strict-mode is enabled, changing (observed) observable values without using an action is not allowed. Tried to modify: `:`Side effects like changing state are not allowed at this point. Are you trying to modify state from, for example, a computed value or the render function of a React component? You can wrap side effects in 'runInAction' (or decorate functions with 'action') if needed. Tried to modify: `)+e.name_)}function Rt(e){!A.allowStateReads&&A.observableRequiresReaction&&console.warn(`[mobx] Observable '${e.name_}' being read outside a reactive context.`)}function zt(e,t,n){let r=k(!0);qt(e),e.newObserving_=Array(e.runId_===0?100:e.observing_.length),e.unboundDepsCount_=0,e.runId_=++A.runId;let i=A.trackingDerivation;A.trackingDerivation=e,A.inBatch++;let a;if(A.disableErrorBoundaries===!0)a=t.call(n);else try{a=t.call(n)}catch(e){a=new Nt(e)}return A.inBatch--,A.trackingDerivation=i,Vt(e),Bt(e),Kt(r),a}function Bt(e){e.observing_.length===0&&(typeof e.requiresObservable_==`boolean`?e.requiresObservable_:A.reactionRequiresObservable)&&console.warn(`[mobx] Derivation '${e.name_}' is created/updated without reading any observable value.`)}function Vt(e){let t=e.observing_,n=e.observing_=e.newObserving_,r=0,i=0,a=e.unboundDepsCount_;for(let e=0;e<a;e++){let t=n[e];t.diffValue===0&&(t.diffValue=1,i!==e&&(n[i]=t),i++),t.dependenciesState_>r&&(r=t.dependenciesState_)}for(n.length=i,e.newObserving_=null,a=t.length;a--;){let n=t[a];n.diffValue===0&&an(n,e),n.diffValue=0}for(;i--;){let t=n[i];t.diffValue===1&&(t.diffValue=0,rn(t,e))}r!==0&&(e.dependenciesState_=r,e.onBecomeStale_())}function Ht(e){let t=e.observing_;e.observing_=[];let n=t.length;for(;n--;)an(t[n],e);e.dependenciesState_=-1}function Ut(e){let t=Wt();try{return e()}finally{Gt(t)}}function Wt(){let e=A.trackingDerivation;return A.trackingDerivation=null,e}function Gt(e){A.trackingDerivation=e}function k(e){let t=A.allowStateReads;return A.allowStateReads=e,t}function Kt(e){A.allowStateReads=e}function qt(e){if(e.dependenciesState_===0)return;e.dependenciesState_=0;let t=e.observing_,n=t.length;for(;n--;)t[n].lowestObserverState_=0}let Jt=[`mobxGuid`,`spyListeners`,`enforceActions`,`computedRequiresReaction`,`reactionRequiresObservable`,`observableRequiresReaction`,`allowStateReads`,`disableErrorBoundaries`,`runId`,`UNCHANGED`];var Yt=class{constructor(){this.version=7,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.isRunningUnobservations=!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.safeDescriptors=!0}};let Xt=!0,Zt=!1,A=function(){let e=globalThis;return e.__mobxInstanceCount>0&&!e.__mobxGlobals&&(Xt=!1),e.__mobxGlobals&&e.__mobxGlobals.version!==7&&(Xt=!1),Xt?e.__mobxGlobals?(e.__mobxInstanceCount+=1,e.__mobxGlobals.UNCHANGED||(e.__mobxGlobals.UNCHANGED={}),e.__mobxGlobals):(e.__mobxInstanceCount=1,e.__mobxGlobals=new Yt):(setTimeout(()=>{Zt||n(35)},1),new Yt)}();function Qt(){if((A.pendingReactions.length||A.inBatch||A.isRunningReactions)&&n(36),Zt=!0,Xt){let e=globalThis;--e.__mobxInstanceCount===0&&(e.__mobxGlobals=void 0),A=new Yt}}function $t(){return A}function en(){let e=new Yt;for(let t in e)Jt.indexOf(t)===-1&&(A[t]=e[t]);A.allowStateChanges=!A.enforceActions}function tn(e){return!!e.observers_&&e.observers_.size>0}function nn(e){return e.observers_??new Set}function rn(e,t){(e.observers_??=new Set).add(t),e.lowestObserverState_>t.dependenciesState_&&(e.lowestObserverState_=t.dependenciesState_)}function an(e,t){let n=e.observers_;n&&(n.delete(t),n.size===0&&on(e))}function on(e){e.isPendingUnobservation===!1&&(e.isPendingUnobservation=!0,A.pendingUnobservations.push(e))}function sn(){A.inBatch++}function cn(){--A.inBatch===0&&(vn(),!A.isRunningUnobservations&&A.pendingUnobservations.length>0&&ln())}function ln(){A.isRunningUnobservations=!0;try{let e=A.pendingUnobservations;for(let t=0;t<e.length;t++){let n=e[t];n.isPendingUnobservation=!1,(!n.observers_||n.observers_.size===0)&&(n.observers_=null,n.isBeingObserved&&(n.isBeingObserved=!1,n.onBUO()),n instanceof jt&&n.suspend_())}A.pendingUnobservations=[]}finally{A.isRunningUnobservations=!1}}function un(e){var t;e.isBeingObserved||(e.isBeingObserved=!0,e.onBO(),(t=e.observing_)==null||t.forEach(un))}function dn(e){Rt(e);let t=A.trackingDerivation;return t===null?((!e.observers_||e.observers_.size===0)&&A.inBatch>0&&on(e),!1):(t.runId_!==e.lastAccessedBy_&&(e.lastAccessedBy_=t.runId_,t.newObserving_[t.unboundDepsCount_++]=e,!e.isBeingObserved&&A.trackingContext&&(e.isBeingObserved=!0,e.onBO())),e.isBeingObserved)}function fn(e){var t;e.lowestObserverState_!==2&&(e.lowestObserverState_=2,(t=e.observers_)==null||t.forEach(e=>{e.dependenciesState_===0&&e.onBecomeStale_(),e.dependenciesState_=2}))}function pn(e){var t;e.lowestObserverState_!==2&&(e.lowestObserverState_=2,(t=e.observers_)==null||t.forEach(t=>{t.dependenciesState_===1?t.dependenciesState_=2:t.dependenciesState_===0&&(e.lowestObserverState_=0)}))}function mn(e){var t;e.lowestObserverState_===0&&(e.lowestObserverState_=1,(t=e.observers_)==null||t.forEach(e=>{e.dependenciesState_===0&&(e.dependenciesState_=1,e.onBecomeStale_())}))}var hn=class{constructor(e=`Reaction@`+u(),t,n,r){this.name_=void 0,this.onInvalidate_=void 0,this.errorHandler_=void 0,this.requiresObservable_=void 0,this.observing_=[],this.newObserving_=[],this.dependenciesState_=-1,this.runId_=0,this.unboundDepsCount_=0,this.flags_=0,this.removeAbortListener_=void 0,this.name_=e,this.onInvalidate_=t,this.errorHandler_=n,this.requiresObservable_=r}get isDisposed(){return C(this.flags_,1)}set isDisposed(e){this.flags_=w(this.flags_,1,e)}get isScheduled(){return C(this.flags_,2)}set isScheduled(e){this.flags_=w(this.flags_,2,e)}get isTrackPending(){return C(this.flags_,4)}set isTrackPending(e){this.flags_=w(this.flags_,4,e)}get isRunning(){return C(this.flags_,8)}set isRunning(e){this.flags_=w(this.flags_,8,e)}get diffValue(){return+!!C(this.flags_,16)}set diffValue(e){this.flags_=w(this.flags_,16,e===1)}onBecomeStale_(){this.schedule_()}schedule_(){this.isScheduled||(this.isScheduled=!0,A.pendingReactions.push(this),vn())}runReaction_(){if(!this.isDisposed){sn(),this.isScheduled=!1;let e=A.trackingContext;if(A.trackingContext=this,Ft(this)){this.isTrackPending=!0;try{this.onInvalidate_(),this.isTrackPending&&Sn()&&Cn({name:this.name_,type:`scheduled-reaction`})}catch(e){this.reportExceptionInDerivation_(e)}}A.trackingContext=e,cn()}}track(e){if(this.isDisposed)return;sn();let t=Sn(),n;t&&(n=Date.now(),wn({name:this.name_,type:`reaction`})),this.isRunning=!0;let r=A.trackingContext;A.trackingContext=this;let i=zt(this,e,void 0);A.trackingContext=r,this.isRunning=!1,this.isTrackPending=!1,this.isDisposed&&Ht(this),Pt(i)&&this.reportExceptionInDerivation_(i.cause),t&&En({time:Date.now()-n}),cn()}reportExceptionInDerivation_(e){if(this.errorHandler_){this.errorHandler_(e,this);return}if(A.disableErrorBoundaries)throw e;let t=`[mobx] Encountered an uncaught exception that was thrown by a reaction or observer component, in: '${this}'`;A.suppressReactionErrors?console.warn(`[mobx] (error in reaction '${this.name_}' suppressed, fix error of causing action below)`):console.error(t,e),Sn()&&Cn({type:`error`,name:this.name_,message:t,error:``+e}),A.globalReactionErrorHandlers.forEach(t=>t(e,this))}dispose(){if(!this.isDisposed){var e;this.isDisposed=!0,(e=this.removeAbortListener_)==null||e.call(this),this.isRunning||(sn(),Ht(this),cn())}}getDisposer_(e){let t=()=>this.dispose();return e!=null&&e.addEventListener&&!this.isDisposed&&(e.addEventListener(`abort`,t),this.removeAbortListener_=()=>e.removeEventListener==null?void 0:e.removeEventListener(`abort`,t)),t[T]=this,`dispose`in Symbol&&typeof Symbol.dispose==`symbol`&&(t[Symbol.dispose]=t),t}toString(){return`Reaction[${this.name_}]`}};function gn(e){return A.globalReactionErrorHandlers.push(e),()=>{let t=A.globalReactionErrorHandlers.indexOf(e);t>=0&&A.globalReactionErrorHandlers.splice(t,1)}}let _n=e=>e();function vn(){A.inBatch>0||A.isRunningReactions||_n(yn)}function yn(){A.isRunningReactions=!0;let e=A.pendingReactions,t=0;for(;e.length>0;){++t===100&&(console.error(`Reaction doesn't converge to a stable state after 100 iterations. Probably there is a cycle in the reactive function: ${e[0]}`),e.splice(0));let n=e.splice(0);for(let e=0,t=n.length;e<t;e++)n[e].runReaction_()}A.isRunningReactions=!1}let bn=b(`Reaction`,hn);function xn(e){let t=_n;_n=n=>e(()=>t(n))}function Sn(){return!!A.spyListeners.length}function Cn(e){if(!A.spyListeners.length)return;let t=A.spyListeners;for(let n=0,r=t.length;n<r;n++)t[n](e)}function wn(e){Cn(r({},e,{spyReportStart:!0}))}let Tn={type:`report-end`,spyReportEnd:!0};function En(e){Cn(e?r({},e,{type:`report-end`,spyReportEnd:!0}):Tn)}function Dn(e){return A.spyListeners.push(e),d(()=>{A.spyListeners=A.spyListeners.filter(t=>t!==e)})}let j=`action`,On=`autoAction`,kn=`<unnamed action>`,An=we(j),jn=we(`action.bound`,{bound:!0}),Mn=we(On,{autoAction:!0}),Nn=we(`autoAction.bound`,{autoAction:!0,bound:!0});function Pn(e){return Ze(e,De)}function Fn(e){return function(t,r){if(r&&typeof r.kind==`string`)return De(e?Mn:An,t,r);if(p(t))return St(t.name||kn,t,e);if(p(r))return St(t,r,e);if(m(t))return Pn(we(e?On:j,{name:t,autoAction:e}));n("Invalid arguments for `action`")}}let In=Fn(!1);r(In,An);let Ln=Fn(!0);r(Ln,Mn);let Rn=Pn(jn),zn=Pn(Nn);function Bn(e){return Ct(e.name||kn,!1,e,this,void 0)}function Vn(e){return p(e)&&e.isMobxAction===!0}function Hn(e,t=c){var r;p(e)||n(`Autorun expects a function as first argument`),Vn(e)&&n(`Autorun does not accept actions since actions are untrackable`);let i=t?.name??(e.name||`Autorun@`+u()),a=!t.scheduler&&!t.delay,o;if(a)o=new hn(i,function(){this.track(s)},t.onError,t.requiresObservable);else{let e=Wn(t),n=!1;o=new hn(i,()=>{n||(n=!0,e(()=>{n=!1,o.isDisposed||o.track(s)}))},t.onError,t.requiresObservable)}function s(){e(o)}return t!=null&&(r=t.signal)!=null&&r.aborted||o.schedule_(),o.getDisposer_(t?.signal)}let Un=e=>e();function Wn(e){return e.scheduler?e.scheduler:e.delay?t=>setTimeout(t,e.delay):Un}function Gn(e,t,r=c){var i;(!p(e)||!p(t))&&n(`First and second argument to reaction should be functions`),g(r)||n(`Third argument of reactions should be an object`);let a=r.name??`Reaction@`+u(),o=In(a,r.onError?Kn(r.onError,t):t),s=!r.scheduler&&!r.delay,l=Wn(r),d=!0,f=!1,m,h=r.equals||me,_=new hn(a,()=>{d||s?v():f||(f=!0,l(v))},r.onError,r.requiresObservable);function v(){if(f=!1,_.isDisposed)return;let t=!1,n=m;_.track(()=>{let n=Et(!1,()=>e(_));t=d||!h(m,n),m=n}),(d&&r.fireImmediately||!d&&t)&&o(m,n,_),d=!1}return r!=null&&(i=r.signal)!=null&&i.aborted||_.schedule_(),_.getDisposer_(r?.signal)}function Kn(e,t){return function(){try{return t.apply(this,arguments)}catch(t){e.call(this,t)}}}function qn(e,t,n){return Yn(`onBO`,e,t,n)}function Jn(e,t,n){return Yn(`onBUO`,e,t,n)}function Yn(e,t,n,r){let i=typeof r==`function`?Pi(t,n):Pi(t),a=p(r)?r:n,o=`${e}L`;return i[o]?i[o].add(a):i[o]=new Set([a]),function(){let e=i[o];e&&(e.delete(a),e.size===0&&delete i[o])}}let Xn=`always`;function Zn(e){e.isolateGlobalState===!0&&Qt();let{enforceActions:t}=e;if(t!==void 0){let e=t===Xn?Xn:t===`observed`;A.enforceActions=e,A.allowStateChanges=!(e===!0||e===Xn)}[`computedRequiresReaction`,`reactionRequiresObservable`,`observableRequiresReaction`,`disableErrorBoundaries`,`safeDescriptors`].forEach(t=>{t in e&&(A[t]=!!e[t])}),A.allowStateReads=!A.observableRequiresReaction,A.disableErrorBoundaries===!0&&console.warn("WARNING: Debug feature only. MobX will NOT recover from errors when `disableErrorBoundaries` is enabled."),e.reactionScheduler&&xn(e.reactionScheduler)}function Qn(e,t,r,i){arguments.length>4&&n(`'extendObservable' expected 2-4 arguments`),typeof e!=`object`&&n(`'extendObservable' expects an object as first argument`),vi(e)&&n(`'extendObservable' should not be used on maps, use map.merge instead`),g(t)||n(`'extendObservable' only accepts plain objects as second argument`),(Sr(t)||Sr(r))&&n(`Extending an object with another observable (object) is not supported`);let a=oe(t);return Li(()=>{let t=Oi(e,i)[T];ne(a).forEach(e=>{t.extend_(e,a[e],r&&e in r?r[e]:!0)})}),e}function $n(e,t){return er(Pi(e,t))}function er(e){let t={name:e.name_};return e.observing_&&e.observing_.length>0&&(t.dependencies=nr(e.observing_).map(er)),t}function tr(e,t){return M(Pi(e,t))}function M(e){let t={name:e.name_};return tn(e)&&(t.observers=Array.from(nn(e),M)),t}function nr(e){return Array.from(new Set(e))}let rr=0;var ir=class extends Error{constructor(){super(`FLOW_CANCELLED`),Object.setPrototypeOf(this,new.target.prototype),this.name=`FlowCancellationError`}toString(){return`Error: ${this.message}`}};function ar(e){return e instanceof ir}function or(e){return Ze(e,Ne)}let sr=Ae(`flow`),cr=Ae(`flow.bound`,{bound:!0}),lr=r(function(e,t){if(t&&typeof t.kind==`string`)return Ne(sr,e,t);arguments.length!==1&&n(`Flow expects single argument with generator function`);let r=e,i=r.name||`<unnamed flow>`,a=function(){let e=this,t=arguments,n=++rr,a=In(`${i} - runid: ${n} - init`,r).apply(e,t),o,s,c=new Promise(function(e,t){let r=0;o=t;function c(e){s=void 0;let o;try{o=In(`${i} - runid: ${n} - yield ${r++}`,a.next).call(a,e)}catch(e){return t(e)}u(o)}function l(e){s=void 0;let o;try{o=In(`${i} - runid: ${n} - yield ${r++}`,a.throw).call(a,e)}catch(e){return t(e)}u(o)}function u(n){if(p(n?.then)){n.then(u,t);return}return n.done?e(n.value):(s=Promise.resolve(n.value),s.then(c,l))}c(void 0)});return c.cancel=In(`${i} - runid: ${n} - cancel`,function(){try{s&&dr(s);let e=a.return(void 0),t=Promise.resolve(e.value);t.then(f,f),dr(t),o(new ir)}catch(e){o(e)}}),c};return a.isMobXFlow=!0,a},sr),ur=or(cr);function dr(e){p(e.cancel)&&e.cancel()}function fr(e){return e}function pr(e){return e?.isMobXFlow===!0}function mr(e,t,r){let i;if(vi(e)||mi(e)||At(e))i=Fi(e);else if(ji(e)){if(!m(t))return n(`InterceptReads can only be used with a specific property, not with an object in general`);i=Fi(e,t)}else return n(`Expected observable map, object or array as first array`);return i.dehancer===void 0?(i.dehancer=typeof t==`function`?t:r,()=>{i.dehancer=void 0}):n(`An intercept reader was already established`)}function hr(e,t,n){return p(n)?_r(e,t,n):gr(e,t)}function gr(e,t){return Jr(Fi(e),t)}function _r(e,t,n){return Jr(Fi(e,t),n)}function vr(e,t){var n;if(t===void 0)return Mt(e);if(ji(e)===!1)return!1;let r=e[T];return(n=r.lazyComputedKeys_)!=null&&n.has(t)?!0:r.values_.has(t)?Mt(Pi(e,t)):!1}function yr(e){return arguments.length>1?n(`isComputed expects only 1 argument. Use isComputedProp to inspect the observability of a property`):vr(e)}function br(e,t){return m(t)?vr(e,t):n(`isComputed expected a property name as second argument`)}function xr(e,t){if(!e)return!1;if(t!==void 0){if(vi(e)||mi(e))return n(`isObservable(object, propertyName) is not supported for arrays and maps. Use map.has or array.length instead.`);if(ji(e)){var r,i;let n=e[T];return n.values_.has(t)||!!((r=n.lazyComputedKeys_)!=null&&r.has(t))||!!((i=n.lazyObservableKeys_)!=null&&i.has(t))}return!1}return ji(e)||!!e[T]||le(e)||bn(e)||Mt(e)}function Sr(e){return arguments.length!==1&&n(`isObservable expects only 1 argument. Use isObservableProp to inspect the observability of a property`),xr(e)}function Cr(e,t){return m(t)?xr(e,t):n(`expected a property name as second argument`)}function wr(e){if(ji(e))return e[T].keys_();if(vi(e)||Ci(e))return Array.from(e.keys());if(mi(e))return e.map((e,t)=>t);n(5)}function Tr(e){if(ji(e))return wr(e).map(t=>e[t]);if(vi(e))return wr(e).map(t=>e.get(t));if(Ci(e))return Array.from(e.values());if(mi(e))return e.slice();n(6)}function Er(e){if(ji(e))return wr(e).map(t=>[t,e[t]]);if(vi(e))return wr(e).map(t=>[t,e.get(t)]);if(Ci(e))return Array.from(e.entries());if(mi(e))return e.map((e,t)=>[t,e]);n(7)}function Dr(e,t,r){if(arguments.length===2&&!Ci(e)){sn();let n=t;try{for(let t in n)Dr(e,t,n[t])}finally{cn()}return}ji(e)?e[T].set_(t,r):vi(e)?e.set(t,r):Ci(e)?e.add(t):mi(e)?(typeof t!=`number`&&(t=parseInt(t,10)),t<0&&n(42,t),sn(),t>=e.length&&(e.length=t+1),e[t]=r,cn()):n(8)}function Or(e,t){ji(e)?e[T].delete_(t):vi(e)||Ci(e)?e.delete(t):mi(e)?(typeof t!=`number`&&(t=parseInt(t,10)),e.splice(t,1)):n(9)}function kr(e,t){if(ji(e))return e[T].has_(t);if(vi(e)||Ci(e))return e.has(t);if(mi(e))return t>=0&&t<e.length;n(10)}function Ar(e,t){if(kr(e,t)){if(ji(e))return e[T].get_(t);if(vi(e))return e.get(t);if(mi(e))return e[t];n(11)}}function jr(e,t,r){if(ji(e))return e[T].defineProperty_(t,r);n(39)}function Mr(e){if(ji(e))return e[T].ownKeys_();n(38)}function Nr(e,t,n,r){return p(n)?Fr(e,t,n,r):Pr(e,t,n)}function Pr(e,t,r){let i=Fi(e);if(mi(e))r&&t({observableKind:`array`,object:i.proxy_,debugObjectName:i.atom_.name_,type:`splice`,index:0,added:i.values_.slice(),addedCount:i.values_.length,removed:[],removedCount:0});else if(vi(e))r===!0&&n("`observe` doesn't support fireImmediately=true in combination with maps.");else if(Ci(e))r===!0&&n("`observe` doesn't support fireImmediately=true in combination with sets.");else if(ji(e))r===!0&&n("`observe` doesn't support the fire immediately property for observable objects.");else return Ir(i,t,r);return Zr(i,t)}function Fr(e,t,n,r){return Ir(Fi(e,t),n,r)}function Ir(e,t,n){if(Mt(e)){let r=!0,i;return Hn(()=>{let a=e.get();if(!r||n){let n=Wt();t({observableKind:`computed`,debugObjectName:e.name_,type:ii,object:e,newValue:a,oldValue:i}),Gt(n)}r=!1,i=a})}return n&&t({observableKind:`value`,debugObjectName:e.name_,object:e,type:ii,newValue:e.value_,oldValue:void 0}),Zr(e,t)}function Lr(e,t,n){return e.set(t,n),n}function Rr(e,t){if(typeof e!=`object`||!e||e instanceof Date||!Sr(e))return e;if(At(e)||Mt(e))return Rr(e.get(),t);if(t.has(e))return t.get(e);if(mi(e)){let n=Lr(t,e,Array(e.length));return e.forEach((e,r)=>{n[r]=Rr(e,t)}),n}if(Ci(e)){let n=Lr(t,e,new Set);return e.forEach(e=>{n.add(Rr(e,t))}),n}if(vi(e)){let n=Lr(t,e,new Map);return e.forEach((e,r)=>{n.set(r,Rr(e,t))}),n}else{let n=Lr(t,e,{});return Mr(e).forEach(r=>{o.propertyIsEnumerable.call(e,r)&&(n[r]=Rr(e[r],t))}),n}}function zr(e,t){return t&&n(`toJS no longer supports options`),Rr(e,new Map)}function Br(e,t=void 0){sn();try{return e.apply(t)}finally{cn()}}function Vr(e,t,n){return arguments.length===1||t&&typeof t==`object`?Ur(e,t):Hr(e,t,n||{})}function Hr(e,t,n){let r;if(typeof n.timeout==`number`){let e=Error(`WHEN_TIMEOUT`);r=setTimeout(()=>{if(!a[T].isDisposed)if(a(),n.onError)n.onError(e);else throw e},n.timeout)}n.name=n.name||`When@`+u();let i=St(n.name+`-effect`,t);var a=Hn(t=>{Et(!1,e)&&(t.dispose(),r&&clearTimeout(r),i())},n);return a}function Ur(e,t){var i;if(t&&t.onError)return n(`the options 'onError' and 'promise' cannot be combined`);if(t!=null&&(i=t.signal)!=null&&i.aborted)return r(Promise.reject(Error(`WHEN_ABORTED`)),{cancel:()=>null});let a,o,s=new Promise((n,i)=>{var s;let c=Hr(e,n,r({},t,{onError:i}));a=()=>{c(),i(Error(`WHEN_CANCELLED`))},o=()=>{c(),i(Error(`WHEN_ABORTED`))},t==null||(s=t.signal)==null||s.addEventListener==null||s.addEventListener(`abort`,o)}).finally(()=>{var e;return t==null||(e=t.signal)==null||e.removeEventListener==null?void 0:e.removeEventListener(`abort`,o)});return s.cancel=a,s}function Wr(e){return e[T]}let Gr={has(e,t){return Wr(e).has_(t)},get(e,t){return Wr(e).get_(t)},set(e,t,n){return m(t)?Wr(e).set_(t,n,!0)??!0:!1},deleteProperty(e,t){return m(t)?Wr(e).delete_(t,!0)??!0:!1},defineProperty(e,t,n){return Wr(e).defineProperty_(t,n)??!0},ownKeys(e){return Wr(e).ownKeys_()},preventExtensions(e){n(13)}};function Kr(e,t){var n;return e=Oi(e,t),(n=e[T]).proxy_??(n.proxy_=new Proxy(e,Gr))}function qr(e){return e.interceptors_!==void 0&&e.interceptors_.length>0}function Jr(e,t){let n=e.interceptors_;return n?n.push(t):n=e.interceptors_=[t],d(()=>{let e=n.indexOf(t);e!==-1&&n.splice(e,1)})}function Yr(e,t){let r=Wt();try{let r=[...e.interceptors_||[]];for(let e=0,i=r.length;e<i&&(t=r[e](t),t&&!t.type&&n(14),t);e++);return t}finally{Gt(r)}}function Xr(e){return e.changeListeners_!==void 0&&e.changeListeners_.length>0}function Zr(e,t){let n=e.changeListeners_;return n?n.push(t):n=e.changeListeners_=[t],d(()=>{let e=n.indexOf(t);e!==-1&&n.splice(e,1)})}function Qr(e,t){let n=Wt(),r=e.changeListeners_;if(r){r=r.slice();for(let e=0,n=r.length;e<n;e++)r[e](t);Gt(n)}}function $r(e,t,n){return Li(()=>{let r=Oi(e,n)[T];ne(t).forEach(e=>ni(r,e,t[e]))}),e}let ei=Symbol(`mobx-keys`);function ti(e,t,r){return!g(e)&&!g(Object.getPrototypeOf(e))&&n(`'makeAutoObservable' can only be used for classes that don't have a superclass`),ji(e)&&n(`makeAutoObservable can only be used on objects not already made observable`),g(e)?Qn(e,e,t,r):(Li(()=>{let n=Oi(e,r)[T];if(!e[ei]){let t=Object.getPrototypeOf(e),n=new Set([...ne(e),...ne(t)]);n.delete(`constructor`),n.delete(T),v(t,ei,n)}e[ei].forEach(e=>ni(n,e,t&&e in t?t[e]:!0))}),e)}function ni(e,t,r){if(r===!0&&(r=e.defaultAnnotation_),r===!1)return;Ni(e,r,t),t in e.target_||n(1,r.annotationType_,`${e.name_}.${t.toString()}`);let a=e.target_;for(;a&&a!==o;){let n=i(a,t);if(n){let i=r.make_(e,t,n,a);if(i===0)return;if(i===1)break}a=Object.getPrototypeOf(a)}Mi(e,r,t)}let ri=`splice`,ii=`update`,ai={get(e,t){let n=e[T];return t===T?n:t===`length`?n.getArrayLength_():typeof t==`string`&&!isNaN(t)?n.get_(parseInt(t)):ae(ci,t)?ci[t]:e[t]},set(e,t,n){let r=e[T];return t===`length`?r.setArrayLength_(n):typeof t==`symbol`||isNaN(t)?e[t]=n:r.set_(parseInt(t),n),!0},preventExtensions(){n(15)}};var oi=class{constructor(e=`ObservableArray@`+u(),t,n){this.owned_=void 0,this.atom_=void 0,this.values_=[],this.interceptors_=void 0,this.changeListeners_=void 0,this.enhancer_=void 0,this.dehancer=void 0,this.proxy_=void 0,this.lastKnownLength_=0,this.owned_=n,this.atom_=new ce(e),this.enhancer_=(n,r)=>t(n,r,e+`[..]`)}dehanceValue_(e){return this.dehancer===void 0?e:this.dehancer(e)}dehanceValues_(e){return this.dehancer!==void 0&&e.length>0?e.map(this.dehancer):e}getArrayLength_(){return this.atom_.reportObserved(),this.values_.length}setArrayLength_(e){(!Number.isInteger(e)||e<0)&&n(40,e);let t=this.values_.length;if(e!==t)if(e>t){let n=Array.from({length:e-t});this.spliceWithArray_(t,0,n)}else this.spliceWithArray_(e,t-e)}updateArrayLength_(e,t){e!==this.lastKnownLength_&&n(16),this.lastKnownLength_+=t}spliceWithArray_(e,t,n){Lt(this.atom_);let r=this.values_.length;if(e===void 0?e=0:e>r?e=r:e<0&&(e=Math.max(0,r+e)),t=arguments.length===1?r-e:t==null?0:Math.max(0,Math.min(t,r-e)),n===void 0&&(n=s),qr(this)){let r=Yr(this,{object:this.proxy_,type:ri,index:e,removedCount:t,added:n});if(!r)return s;t=r.removedCount,n=r.added}n=n.length===0?n:n.map(e=>this.enhancer_(e,void 0));{let e=n.length-t;this.updateArrayLength_(r,e)}let i=this.spliceItemsIntoValues_(e,t,n);return(t!==0||n.length!==0)&&this.notifyArraySplice_(e,n,i),this.dehanceValues_(i)}spliceItemsIntoValues_(e,t,n){if(n.length<1e4)return this.values_.splice(e,t,...n);{let r=this.values_.slice(e,e+t),i=this.values_.slice(e+t);this.values_.length+=n.length-t;for(let t=0;t<n.length;t++)this.values_[e+t]=n[t];for(let t=0;t<i.length;t++)this.values_[e+n.length+t]=i[t];return r}}notifyArrayChildUpdate_(e,t,n){let r=!this.owned_&&Sn(),i=Xr(this),a=i||r?{observableKind:`array`,object:this.proxy_,type:ii,debugObjectName:this.atom_.name_,index:e,newValue:t,oldValue:n}:null;r&&wn(a),this.atom_.reportChanged(),i&&Qr(this,a),r&&En()}notifyArraySplice_(e,t,n){let r=!this.owned_&&Sn(),i=Xr(this),a=i||r?{observableKind:`array`,object:this.proxy_,debugObjectName:this.atom_.name_,type:ri,index:e,removed:n,added:t,removedCount:n.length,addedCount:t.length}:null;r&&wn(a),this.atom_.reportChanged(),i&&Qr(this,a),r&&En()}get_(e){return this.atom_.reportObserved(),this.dehanceValue_(this.values_[e])}set_(e,t){let n=this.values_;if(e<n.length){Lt(this.atom_);let r=n[e];if(qr(this)){let n=Yr(this,{type:ii,object:this.proxy_,index:e,newValue:t});if(!n)return;t=n.newValue}t=this.enhancer_(t,r),t!==r&&(n[e]=t,this.notifyArrayChildUpdate_(e,t,r))}else{let r=Array.from({length:e+1-n.length});r[r.length-1]=t,this.spliceWithArray_(n.length,0,r)}}};function si(e,t,n=`ObservableArray@`+u(),r=!1){return Li(()=>{let i=new oi(n,t,r);y(i.values_,T,i);let a=new Proxy(i.values_,ai);return i.proxy_=a,e&&e.length&&i.spliceWithArray_(0,0,e),a})}var ci={clear(){return this.splice(0)},replace(e){let t=this[T];return t.spliceWithArray_(0,t.values_.length,e)},toJSON(){return this.slice()},splice(e,t,...n){let r=this[T];switch(arguments.length){case 0:return[];case 1:return r.spliceWithArray_(e);case 2:return r.spliceWithArray_(e,t)}return r.spliceWithArray_(e,t,n)},spliceWithArray(e,t,n){return this[T].spliceWithArray_(e,t,n)},push(...e){let t=this[T];return t.spliceWithArray_(t.values_.length,0,e),t.values_.length},pop(){return this.splice(Math.max(this[T].values_.length-1,0),1)[0]},shift(){return this.splice(0,1)[0]},unshift(...e){let t=this[T];return t.spliceWithArray_(0,0,e),t.values_.length},reverse(){return A.trackingDerivation&&n(37,`reverse`),this.replace(this.slice().reverse()),this},sort(){A.trackingDerivation&&n(37,`sort`);let e=this.slice();return e.sort.apply(e,arguments),this.replace(e),this},remove(e){let t=this[T],n=t.dehanceValues_(t.values_).indexOf(e);return n>-1?(this.splice(n,1),!0):!1}};li(`at`,ui),li(`concat`,ui),li(`flat`,ui),li(`includes`,ui),li(`indexOf`,ui),li(`join`,ui),li(`lastIndexOf`,ui),li(`slice`,ui),li(`toString`,ui),li(`toLocaleString`,ui),li(`toSorted`,ui),li(`toSpliced`,ui),li(`with`,ui),li(`every`,di),li(`filter`,di),li(`find`,di),li(`findIndex`,di),li(`findLast`,di),li(`findLastIndex`,di),li(`flatMap`,di),li(`forEach`,di),li(`map`,di),li(`some`,di),li(`toReversed`,di),li(`reduce`,fi),li(`reduceRight`,fi);function li(e,t){typeof Array.prototype[e]==`function`&&(ci[e]=t(e))}function ui(e){return function(){let t=this[T];t.atom_.reportObserved();let n=t.dehanceValues_(t.values_);return n[e].apply(n,arguments)}}function di(e){return function(t,n){let r=this[T];return r.atom_.reportObserved(),r.dehanceValues_(r.values_)[e]((e,r)=>t.call(n,e,r,this))}}function fi(e){return function(){let t=this[T];t.atom_.reportObserved();let n=t.dehanceValues_(t.values_),r=arguments[0];return arguments[0]=(e,t,n)=>r(e,t,n,this),n[e].apply(n,arguments)}}let pi=b(`ObservableArrayAdministration`,oi);function mi(e){return h(e)&&pi(e[T])}let hi={},gi=`delete`;var _i=class{constructor(e,t=he,n=`ObservableMap@`+u()){this.enhancer_=void 0,this.name_=void 0,this[T]=hi,this.data_=void 0,this.hasMap_=void 0,this.keysAtom_=void 0,this.interceptors_=void 0,this.changeListeners_=void 0,this.dehancer=void 0,this.enhancer_=t,this.name_=n,Li(()=>{this.keysAtom_=ue(`${this.name_}.keys()`),this.data_=new Map,this.hasMap_=new Map,e&&this.merge(e)})}has_(e){return this.data_.has(e)}has(e){if(!A.trackingDerivation)return this.has_(e);let t=this.hasMap_.get(e);if(!t){let n=t=new kt(this.has_(e),_e,`${this.name_}.${re(e)}?`,!1);this.hasMap_.set(e,n),n.onBUOL=new Set([()=>this.hasMap_.delete(e)])}return t.get()}set(e,t){let n=this.has_(e);if(qr(this)){let r=Yr(this,{type:n?ii:`add`,object:this,newValue:t,name:e});if(!r)return this;t=r.newValue}return n?this.updateValue_(e,t):this.addValue_(e,t),this}delete(e){if(Lt(this.keysAtom_),qr(this)&&!Yr(this,{type:gi,object:this,name:e}))return!1;if(this.has_(e)){let t=Sn(),n=Xr(this),r=n||t?{observableKind:`map`,debugObjectName:this.name_,type:gi,object:this,oldValue:this.data_.get(e).value_,name:e}:null;return t&&wn(r),Br(()=>{var t;this.keysAtom_.reportChanged(),(t=this.hasMap_.get(e))==null||t.setNewValue_(!1),this.data_.get(e).setNewValue_(void 0),this.data_.delete(e)}),n&&Qr(this,r),t&&En(),!0}return!1}updateValue_(e,t){let n=this.data_.get(e);if(t=n.prepareNewValue_(t),t!==A.UNCHANGED){let r=Sn(),i=Xr(this),a=i||r?{observableKind:`map`,debugObjectName:this.name_,type:ii,object:this,oldValue:n.value_,name:e,newValue:t}:null;r&&wn(a),n.setNewValue_(t),i&&Qr(this,a),r&&En()}}addValue_(e,t){Lt(this.keysAtom_),Br(()=>{var n;let r=new kt(t,this.enhancer_,`${this.name_}.${re(e)}`,!1);this.data_.set(e,r),t=r.value_,(n=this.hasMap_.get(e))==null||n.setNewValue_(!0),this.keysAtom_.reportChanged()});let n=Sn(),r=Xr(this),i=r||n?{observableKind:`map`,debugObjectName:this.name_,type:`add`,object:this,name:e,newValue:t}:null;n&&wn(i),r&&Qr(this,i),n&&En()}get(e){return this.has(e)?this.dehanceValue_(this.data_.get(e).get()):this.dehanceValue_(void 0)}getOrInsert(e,t){return this.has(e)||this.set(e,t),this.get(e)}getOrInsertComputed(e,t){return this.has(e)||this.set(e,t(e)),this.get(e)}dehanceValue_(e){return this.dehancer===void 0?e:this.dehancer(e)}keys(){return this.keysAtom_.reportObserved(),this.data_.keys()}values(){let e=this,t=this.keys();return yi({next(){let{done:n,value:r}=t.next();return{done:n,value:n?void 0:e.get(r)}}})}entries(){let e=this,t=this.keys();return yi({next(){let{done:n,value:r}=t.next();return{done:n,value:n?void 0:[r,e.get(r)]}}})}[Symbol.iterator](){return this.entries()}forEach(e,t){for(let[n,r]of this)e.call(t,r,n,this)}merge(e){return vi(e)&&(e=new Map(e)),Br(()=>{g(e)?te(e).forEach(t=>this.set(t,e[t])):Array.isArray(e)?e.forEach(([e,t])=>this.set(e,t)):ee(e)?(x(e)||n(19,e),e.forEach((e,t)=>this.set(t,e))):e!=null&&n(20,e)}),this}clear(){Br(()=>{Ut(()=>{for(let e of this.keys())this.delete(e)})})}replace(e){return Br(()=>{let t=bi(e),n=new Map,r=!1;for(let e of this.data_.keys())if(!t.has(e))if(this.delete(e))r=!0;else{let t=this.data_.get(e);n.set(e,t)}for(let[e,i]of t.entries()){let t=this.data_.has(e);if(this.set(e,i),this.data_.has(e)){let i=this.data_.get(e);n.set(e,i),t||(r=!0)}}if(!r)if(this.data_.size!==n.size)this.keysAtom_.reportChanged();else{let e=this.data_.keys(),t=n.keys(),r=e.next(),i=t.next();for(;!r.done;){if(r.value!==i.value){this.keysAtom_.reportChanged();break}r=e.next(),i=t.next()}}this.data_=n}),this}get size(){return this.keysAtom_.reportObserved(),this.data_.size}toString(){return`[object ObservableMap]`}toJSON(){return Array.from(this)}get[Symbol.toStringTag](){return`Map`}},vi=b(`ObservableMap`,_i);function yi(e){return e[Symbol.toStringTag]=`MapIterator`,Ui(e)}function bi(e){if(ee(e)||vi(e))return e;if(Array.isArray(e))return new Map(e);if(g(e)){let t=new Map;for(let n in e)t.set(n,e[n]);return t}else return n(21,e)}let xi={};var Si=class{constructor(e,t=he,n=`ObservableSet@`+u()){this.name_=void 0,this[T]=xi,this.data_=new Set,this.atom_=void 0,this.changeListeners_=void 0,this.interceptors_=void 0,this.dehancer=void 0,this.enhancer_=void 0,this.name_=n,this.enhancer_=(e,r)=>t(e,r,n),Li(()=>{this.atom_=ue(this.name_),e&&this.replace(e)})}dehanceValue_(e){return this.dehancer===void 0?e:this.dehancer(e)}clear(){Br(()=>{Ut(()=>{for(let e of this.data_.values())this.delete(e)})})}forEach(e,t){for(let n of this)e.call(t,n,n,this)}get size(){return this.atom_.reportObserved(),this.data_.size}add(e){if(Lt(this.atom_),qr(this)){let t=Yr(this,{type:`add`,object:this,newValue:e});if(!t)return this;e=t.newValue}if(!this.has(e)){Br(()=>{e=this.enhancer_(e,void 0),this.data_.add(e),this.atom_.reportChanged()});let t=Sn(),n=Xr(this),r=n||t?{observableKind:`set`,debugObjectName:this.name_,type:`add`,object:this,newValue:e}:null;t&&wn(r),n&&Qr(this,r),t&&En()}return this}delete(e){if(qr(this)&&!Yr(this,{type:gi,object:this,oldValue:e}))return!1;if(this.has(e)){let t=Sn(),n=Xr(this),r=n||t?{observableKind:`set`,debugObjectName:this.name_,type:gi,object:this,oldValue:e}:null;return t&&wn(r),Br(()=>{this.atom_.reportChanged(),this.data_.delete(e)}),n&&Qr(this,r),t&&En(),!0}return!1}has(e){return this.atom_.reportObserved(),this.data_.has(this.dehanceValue_(e))}entries(){let e=this.values();return wi({next(){let{value:t,done:n}=e.next();return n?{value:void 0,done:n}:{value:[t,t],done:n}}})}keys(){return this.values()}values(){this.atom_.reportObserved();let e=this,t=this.data_.values();return wi({next(){let{value:n,done:r}=t.next();return r?{value:void 0,done:r}:{value:e.dehanceValue_(n),done:r}}})}intersection(e){return new Set(this).intersection(e)}union(e){return new Set(this).union(e)}difference(e){return new Set(this).difference(e)}symmetricDifference(e){return new Set(this).symmetricDifference(e)}isSubsetOf(e){return new Set(this).isSubsetOf(e)}isSupersetOf(e){return new Set(this).isSupersetOf(e)}isDisjointFrom(e){return new Set(this).isDisjointFrom(e)}replace(e){return Ci(e)&&(e=new Set(e)),Array.isArray(e)||S(e)?Br(()=>{let t=S(e)?e:new Set(e);if(t.size===0){this.clear();return}if(this.data_.size===0){t.forEach(e=>this.add(e));return}for(let e of this.data_.values())t.has(this.dehanceValue_(e))||this.delete(e);t.forEach(e=>this.add(e))}):e!=null&&n(41,e),this}toJSON(){return Array.from(this)}toString(){return`[object ObservableSet]`}[Symbol.iterator](){return this.values()}get[Symbol.toStringTag](){return`Set`}},Ci=b(`ObservableSet`,Si);function wi(e){return e[Symbol.toStringTag]=`SetIterator`,Ui(e)}let Ti=Object.create(null),Ei=`remove`;var Di=class{constructor(e,t=new Map,r,i=Ge){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.lazyComputedKeys_=void 0,this.lazyObservableKeys_=void 0,this.target_=e,this.values_=t,this.name_=r,this.defaultAnnotation_=i,this.keysAtom_=new ce(`${this.name_}.keys`),this.isPlainObject_=g(this.target_),Gi(this.defaultAnnotation_)||n(`defaultAnnotation must be valid annotation`),this.appliedAnnotations_={}}getObservablePropValue_(e){return(this.values_.get(e)??this.materializeLazyComputed_(e)??this.materializeLazyObservable_(e)).get()}materializeLazyComputed_(e){let t=this.lazyComputedKeys_?.get(e);if(!t)return;this.lazyComputedKeys_.delete(e),this.lazyComputedKeys_.size===0&&(this.lazyComputedKeys_=void 0);let n=t();return this.values_.set(e,n),n}materializeLazyObservable_(e){let t=this.lazyObservableKeys_?.get(e);if(!t)return;this.lazyObservableKeys_.delete(e),this.lazyObservableKeys_.size===0&&(this.lazyObservableKeys_=void 0);let n=t();return this.values_.set(e,n),n}setObservablePropValue_(e,t){let n=this.values_.get(e)??this.materializeLazyComputed_(e)??this.materializeLazyObservable_(e);if(n instanceof jt)return n.set(t),!0;if(qr(this)){let n=Yr(this,{type:ii,object:this.proxy_||this.target_,name:e,newValue:t});if(!n)return null;t=n.newValue}if(t=n.prepareNewValue_(t),t!==A.UNCHANGED){let r=Xr(this),i=Sn(),a=r||i?{type:ii,observableKind:`object`,debugObjectName:this.name_,object:this.proxy_||this.target_,oldValue:n.value_,name:e,newValue:t}:null;i&&wn(a),n.setNewValue_(t),r&&Qr(this,a),i&&En()}return!0}get_(e){return A.trackingDerivation&&!ae(this.target_,e)&&this.has_(e),this.target_[e]}set_(e,t,n=!1){return ae(this.target_,e)?this.values_.has(e)?this.setObservablePropValue_(e,t):n?Reflect.set(this.target_,e,t):(this.target_[e]=t,!0):this.extend_(e,{value:t,enumerable:!0,writable:!0,configurable:!0},this.defaultAnnotation_,n)}has_(e){if(!A.trackingDerivation)return e in this.target_;this.pendingKeys_||=new Map;let t=this.pendingKeys_.get(e);return t||(t=new kt(e in this.target_,_e,`${this.name_}.${re(e)}?`,!1),this.pendingKeys_.set(e,t)),t.get()}extend_(e,t,n,r=!1){if(n===!0&&(n=this.defaultAnnotation_),n===!1)return this.defineProperty_(e,t,r);Ni(this,n,e);let i=n.extend_(this,e,t,r);return i&&Mi(this,n,e),i}defineProperty_(e,t,n=!1){Lt(this.keysAtom_);try{sn();let i=this.delete_(e);if(!i)return i;if(qr(this)){let n=Yr(this,{object:this.proxy_||this.target_,name:e,type:`add`,newValue:t.value});if(!n)return null;let{newValue:i}=n;t.value!==i&&(t=r({},t,{value:i}))}if(n){if(!Reflect.defineProperty(this.target_,e,t))return!1}else a(this.target_,e,t);this.notifyPropertyAddition_(e,t.value)}finally{cn()}return!0}defineObservableProperty_(e,t,n,r=!1){Lt(this.keysAtom_);try{sn();let i=this.delete_(e);if(!i)return i;if(qr(this)){let n=Yr(this,{object:this.proxy_||this.target_,name:e,type:`add`,newValue:t});if(!n)return null;t=n.newValue}let o=Ai(e),s={configurable:A.safeDescriptors?this.isPlainObject_:!0,enumerable:!0,get:o.get,set:o.set};if(r){if(!Reflect.defineProperty(this.target_,e,s))return!1}else a(this.target_,e,s);let c=new kt(t,n,`${this.name_}.${e.toString()}`,!1);this.values_.set(e,c),this.notifyPropertyAddition_(e,c.value_)}finally{cn()}return!0}defineComputedProperty_(e,t,n=!1){Lt(this.keysAtom_);try{sn();let r=this.delete_(e);if(!r)return r;if(qr(this)&&!Yr(this,{object:this.proxy_||this.target_,name:e,type:`add`,newValue:void 0}))return null;t.name||=`${this.name_}.${e.toString()}`,t.context=this.proxy_||this.target_;let i=Ai(e),o={configurable:A.safeDescriptors?this.isPlainObject_:!0,enumerable:!1,get:i.get,set:i.set};if(n){if(!Reflect.defineProperty(this.target_,e,o))return!1}else a(this.target_,e,o);this.values_.set(e,new jt(t)),this.notifyPropertyAddition_(e,void 0)}finally{cn()}return!0}delete_(e,t=!1){if(Lt(this.keysAtom_),!ae(this.target_,e))return!0;if(qr(this)&&!Yr(this,{object:this.proxy_||this.target_,name:e,type:Ei}))return null;try{var n;sn();let r=Xr(this),a=Sn(),o=this.values_.get(e),s;if(!o&&(r||a)&&(s=i(this.target_,e)?.value),t){if(!Reflect.deleteProperty(this.target_,e))return!1}else delete this.target_[e];if(delete this.appliedAnnotations_[e],o&&(this.values_.delete(e),o instanceof kt&&(s=o.value_),fn(o)),this.keysAtom_.reportChanged(),(n=this.pendingKeys_)==null||(n=n.get(e))==null||n.set(e in this.target_),r||a){let t={type:Ei,observableKind:`object`,object:this.proxy_||this.target_,debugObjectName:this.name_,oldValue:s,name:e};a&&wn(t),r&&Qr(this,t),a&&En()}}finally{cn()}return!0}notifyPropertyAddition_(e,t){var n;let r=Xr(this),i=Sn();if(r||i){let n=r||i?{type:`add`,observableKind:`object`,debugObjectName:this.name_,object:this.proxy_||this.target_,name:e,newValue:t}:null;i&&wn(n),r&&Qr(this,n),i&&En()}(n=this.pendingKeys_)==null||(n=n.get(e))==null||n.set(!0),this.keysAtom_.reportChanged()}ownKeys_(){return this.keysAtom_.reportObserved(),ne(this.target_)}keys_(){return this.keysAtom_.reportObserved(),Object.keys(this.target_)}};function Oi(e,t){if(t&&ji(e)&&n(`Options can't be provided for already observable objects.`),ae(e,T))return Fi(e)instanceof Di||n(`Cannot convert '${Ii(e)}' into observable object:\nThe target is already observable of different type.\nExtending builtins is not supported.`),e;Object.isExtensible(e)||n(`Cannot make the designated object observable; it is not extensible`);let r=t?.name??`${g(e)?`ObservableObject`:e.constructor.name}@${u()}`;return v(e,T,new Di(e,new Map,String(r),ot(t))),e}let ki=b(`ObservableObjectAdministration`,Di);function Ai(e){return Ti[e]||(Ti[e]={get(){return this[T].getObservablePropValue_(e)},set(t){return this[T].setObservablePropValue_(e,t)}})}function ji(e){return h(e)?ki(e[T]):!1}function Mi(e,t,n){e.appliedAnnotations_[n]=t}function Ni(e,t,r){if(Gi(t)||n(`Cannot annotate '${e.name_}.${r.toString()}': Invalid annotation.`),!xe(t)&&ae(e.appliedAnnotations_,r)){let i=`${e.name_}.${r.toString()}`,a=e.appliedAnnotations_[r].annotationType_,o=t.annotationType_;n(`Cannot apply '${o}' to '${i}':\nThe field is already annotated with '${a}'.\nRe-annotating fields is not allowed.\nUse 'override' annotation for methods overridden by subclass.`)}}function Pi(e,t){if(typeof e==`object`&&e){if(mi(e))return t!==void 0&&n(23),e[T].atom_;if(Ci(e))return e.atom_;if(vi(e)){if(t===void 0)return e.keysAtom_;let r=e.data_.get(t)||e.hasMap_.get(t);return r||n(25,t,Ii(e)),r}if(ji(e)){if(!t)return n(26);let r=e[T],i=r.values_.get(t)??r.materializeLazyComputed_(t)??r.materializeLazyObservable_(t);return i||n(27,t,Ii(e)),i}if(le(e)||Mt(e)||bn(e))return e}else if(p(e)&&bn(e[T]))return e[T];n(28)}function Fi(e,t){if(e||n(29),t!==void 0)return Fi(Pi(e,t));if(le(e)||Mt(e)||bn(e)||vi(e)||Ci(e))return e;if(e[T])return e[T];n(24,e)}function Ii(e,t){let n;if(t!==void 0)n=Pi(e,t);else if(Vn(e))return e.name;else n=ji(e)||vi(e)||Ci(e)?Fi(e):Pi(e);return n.name_}function Li(e){let t=Wt(),n=Dt(!0);sn();try{return e()}finally{cn(),Ot(n),Gt(t)}}let Ri=o.toString;function zi(e,t,n=-1){return Bi(e,t,n)}function Bi(e,t,n,r,i){if(e===t)return e!==0||1/e==1/t;if(e==null||t==null)return!1;if(e!==e)return t!==t;let a=typeof e;if(a!==`function`&&a!==`object`&&typeof t!=`object`)return!1;let o=Ri.call(e);if(o!==Ri.call(t))return!1;switch(o){case`[object RegExp]`:case`[object String]`:return``+e==``+t;case`[object Number]`:return+e==+e?+e==0?1/e==1/t:+e==+t:+t!=+t;case`[object Date]`:case`[object Boolean]`:return+e==+t;case`[object Symbol]`:return typeof Symbol<`u`&&Symbol.valueOf.call(e)===Symbol.valueOf.call(t);case`[object Map]`:case`[object Set]`:n>=0&&n++;break}e=Vi(e),t=Vi(t);let s=o===`[object Array]`;if(!s){if(typeof e!=`object`||typeof t!=`object`)return!1;let n=e.constructor,r=t.constructor;if(n!==r&&!(p(n)&&n instanceof n&&p(r)&&r instanceof r)&&`constructor`in e&&`constructor`in t)return!1}if(n===0)return!1;n<0&&(n=-1),r||=[],i||=[];let c=r.length;for(;c--;)if(r[c]===e)return i[c]===t;if(r.push(e),i.push(t),s){if(c=e.length,c!==t.length)return!1;for(;c--;)if(!Bi(e[c],t[c],n-1,r,i))return!1}else{let a=Object.keys(e),o=a.length;if(Object.keys(t).length!==o)return!1;for(let s=0;s<o;s++){let o=a[s];if(!(ae(t,o)&&Bi(e[o],t[o],n-1,r,i)))return!1}}return r.pop(),i.pop(),!0}function Vi(e){return mi(e)?e.slice():ee(e)||vi(e)||S(e)||Ci(e)?Array.from(e.entries()):e}let Hi=globalThis.Iterator?.prototype||{};function Ui(e){return e[Symbol.iterator]=Wi,r(Object.create(Hi),e)}function Wi(){return this}function Gi(e){return e instanceof Object&&typeof e.annotationType_==`string`&&p(e.make_)&&p(e.extend_)}{let e=globalThis;[`Symbol`,`Map`,`Set`,`Proxy`].forEach(t=>{e[t]===void 0&&n(`MobX requires global '${t}' to be available or polyfilled`)})}typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__==`object`&&__MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobx({spy:Dn,extras:{getDebugName:Ii},$mobx:T}),e.$mobx=T,e.FlowCancellationError=ir,e.ObservableMap=_i,e.ObservableSet=Si,e.Reaction=hn,e._allowStateChanges=Et,e._allowStateChangesInsideComputed=Bn,e._allowStateReadsEnd=Kt,e._allowStateReadsStart=k,e._autoAction=Ln,e._autoActionBound=zn,e._endAction=Tt,e._getAdministration=Fi,e._getGlobalState=$t,e._interceptReads=mr,e._isComputingDerivation=It,e._resetGlobalState=en,e._startAction=wt,e.action=In,e.actionBound=Rn,e.autorun=Hn,e.compareDefault=me,e.compareIdentity=de,e.compareShallow=pe,e.compareStructural=fe,e.computed=O,e.computedStruct=_t,e.configure=Zn,e.createAtom=ue,e.defineProperty=jr,e.entries=Er,e.extendObservable=Qn,e.flow=lr,e.flowBound=ur,e.flowResult=fr,e.get=Ar,e.getAtom=Pi,e.getDebugName=Ii,e.getDependencyTree=$n,e.getObserverTree=tr,e.has=kr,e.intercept=hr,e.isAction=Vn,e.isBoxedObservable=At,e.isComputed=yr,e.isComputedProp=br,e.isFlow=pr,e.isFlowCancellationError=ar,e.isObservable=Sr,e.isObservableArray=mi,e.isObservableMap=vi,e.isObservableObject=ji,e.isObservableProp=Cr,e.isObservableSet=Ci,e.keys=wr,e.makeAutoObservable=ti,e.makeObservable=$r,e.observable=D,e.observableDeep=ft,e.observableRef=ut,e.observableShallow=dt,e.observableStruct=pt,e.observe=Nr,e.onBecomeObserved=qn,e.onBecomeUnobserved=Jn,e.onReactionError=gn,e.override=be,e.ownKeys=Mr,e.reaction=Gn,e.remove=Or,e.runInAction=Bn,e.set=Dr,e.spy=Dn,e.toJS=zr,e.transaction=Br,e.untracked=Ut,e.values=Tr,e.when=Vr})),Y=Ae(((e,t)=>{process.env.NODE_ENV===`production`?t.exports=pw():t.exports=mw()}))();function hw(e){if(Array.isArray(e))return Object.freeze(e.map(hw));if(typeof e==`object`&&e){let t=Object.create(null),n=Object.entries(e).sort(([e],[t])=>e<t?-1:+(e>t));for(let[e,r]of n)t[e]=hw(r);return Object.freeze(t)}return e}function gw(e){let t=typeof e;if(t===`string`||t===`number`||t===`boolean`)return t;throw TypeError(`Variable values must be string|number|boolean (got ${t})`)}function _w(e){return typeof e==`string`?e:String(e)}function vw(e){if(typeof e==`number`)return e;if(typeof e==`boolean`)return+!!e;let t=e.trim();if(t===``)throw TypeError(`Cannot cast empty string to number`);let n=Number(t);if(!Number.isFinite(n))throw TypeError(`Cannot cast ${JSON.stringify(e)} to number`);return n}function yw(e){if(typeof e==`boolean`)return e;if(typeof e==`number`){if(e===0||e===1)return e===1;throw TypeError(`Cannot cast number ${e} to bool (only 0 and 1 are accepted)`)}if(e===`true`)return!0;if(e===`false`)return!1;throw TypeError(`Cannot cast ${JSON.stringify(e)} to bool (expected "true" or "false")`)}var bw=class extends Error{constructor(e,t){super(t),this.variable=e}};function xw(e){return e instanceof bw?e:e instanceof Error&&e.cause!==void 0?xw(e.cause):void 0}const Sw=e=>e===$a;var Cw=class{kind=`box`;cell;lastChangedAt;constructor(e,t,n){this.name=e,this.type=t,Sw(n)||Nw(e,t,n,`initial value`),this.cell=Y.observable.box(n,{deep:!1}),this.lastChangedAt=Sw(n)?null:Date.now()}read(){let e=this.cell.get();if(Sw(e))throw new bw(this.name,`variable "${this.name}" has no value yet: nothing has written it`);return e}set(e){Sw(e)||Nw(this.name,this.type,e,`set value`),!Object.is(this.cell.get(),e)&&(this.cell.set(e),this.lastChangedAt=Date.now())}lastUpdatedMs(){return this.lastChangedAt}stored(){return this.cell.get()}},ww=class{cell;constructor(e,t,n){if(this.cell=(0,Y.computed)(t,{keepAlive:!0,...n!==void 0&&{equals:n}}),typeof this.cell.suspend_!=`function`)throw TypeError(`${e}: this MobX's computed has no suspend_; release() cannot unsubscribe it`);if(typeof this.cell.keepAlive_!=`boolean`)throw TypeError(`${e}: this MobX's computed has no keepAlive_ flag; release() cannot lift it`)}read(){return this.cell.get()}release(){this.cell.keepAlive_=!1,this.cell.suspend_()}},Tw=class{constructor(e){this.deriver=e}read(){return this.deriver()}},Ew=class{kind=`computed`;cell;constructor(e,t,n){this.name=e,this.type=t,this.cell=new ww(`Variable "${e}"`,()=>{let e=n();return Nw(this.name,this.type,e,`computed result`),e})}read(){return this.cell.read()}release(){this.cell.release()}lastUpdatedMs(){return null}},Dw=class{kind=`projection`;cell;constructor(e,t,n){this.name=e,this.type=t,this.cell=new Tw(()=>{let e=n();return Nw(this.name,this.type,e,`projection result`),e})}read(){return this.cell.read()}lastUpdatedMs(){return null}},Ow=class{kind=`document`;cell;lastChangedAt;constructor(e,t){this.name=e,this.cell=Y.observable.box(Mw(t),{deep:!1}),this.lastChangedAt=t.kind===`pending`?null:Date.now()}read(){return this.cell.get()}set(e){let t=Mw(e);jw(this.cell.get(),t)||(this.cell.set(t),this.lastChangedAt=Date.now())}lastUpdatedMs(){return this.lastChangedAt}},kw=class{kind=`document`;cell;constructor(e,t){this.name=e,this.cell=new ww(`Variable "${e}"`,()=>Mw(t()),jw)}read(){return this.cell.read()}release(){this.cell.release()}lastUpdatedMs(){return null}};function Aw(e){return JSON.stringify(e)}function jw(e,t){return Aw(e)===Aw(t)}function Mw(e){return e.kind===`ok`?{kind:`ok`,value:hw(e.value)}:e}function Nw(e,t,n,r){let i=gw(n);if(i!==t)throw TypeError(`Variable "${e}": ${r} type ${i} does not match declared type ${t}`)}var Pw=class{constructor(e=null){this.parent=e}nodes=Y.observable.map(void 0,{deep:!1});defineBox(e,t,n){this.declare(e,new Cw(e,t,n))}defineDocument(e,t){this.declare(e,new Ow(e,t))}defineDerivedDocument(e,t){this.declare(e,new kw(e,t))}defineComputed(e,t,n){this.defineDerived(e,t,`computed`,n)}defineDerived(e,t,n,r){let i=e=>this.read(e),a=n===`computed`?Ew:Dw;this.declare(e,new a(e,t,()=>r(i)))}derive(e,t,n){if(this.refuseDisposed(`Derived value "${e}"`),t===`projection`)return new Tw(n);let r=new ww(`Derived value "${e}"`,n);return this.kept.push(r),r}kept=[];read(e){return this.requireVar(e).read()}readDocument(e){let t=this.requireNode(e);if(t.kind!==`document`)throw TypeError(`Variable "${e}" is a ${t.kind}, not a document`);return t.read()}stored(e){let t=this.requireNode(e);if(t.kind===`document`)return t.read();if(t.kind!==`box`)throw TypeError(`Variable "${e}" is a ${t.kind}, not a written node`);return t.stored()}setDocument(e,t){let n=this.requireOwn(e);if(!(n instanceof Ow))throw TypeError(n.kind===`document`?`Variable "${e}" is a derived document: what it reads decides it, and nothing writes it`:`Variable "${e}" is a ${n.kind}, not a document (use defineDocument to create one)`);(0,Y.runInAction)(()=>n.set(t))}setBox(e,t){let n=this.requireOwn(e);if(n.kind!==`box`)throw TypeError(`Variable "${e}" is a ${n.kind}, not a box (use defineBox to create a settable variable)`);(0,Y.runInAction)(()=>n.set(t))}runInAction(e){(0,Y.runInAction)(e)}has(e){return this.nodes.has(e)||(this.parent?.has(e)??!1)}getType(e){return this.requireVar(e).type}getKind(e){return this.requireNode(e).kind}changeKey(e){let t=this.requireNode(e);if(t.kind===`document`){let e=t.read();return e.kind===`pending`?$a:N(Aw(e))}try{return N(String(t.read()))}catch(e){return xw(e)===void 0?N(` failed:${e instanceof Error?e.message:String(e)}`):$a}}getNode(e){let t=this.requireNode(e);return t.kind===`document`?{name:t.name,kind:t.kind,read:()=>t.read(),lastUpdatedMs:()=>t.lastUpdatedMs()}:{name:t.name,type:t.type,kind:t.kind,read:()=>t.read(),lastUpdatedMs:()=>t.lastUpdatedMs()}}names(){return[...this.parent?.names()??[],...this.nodes.keys()]}dispose(){if(this.disposed)return 0;this.disposed=!0;let e=0;return(0,Y.runInAction)(()=>{for(let t of this.nodes.values())(t instanceof Ew||t instanceof kw)&&(t.release(),e++);for(let e of this.kept)e.release()}),e+this.kept.length}disposed=!1;requireNode(e){let t=this.nodes.get(e)??this.parent?.requireNode(e);if(!t)throw ReferenceError(`Unknown variable "${e}"`);return t}requireOwn(e){let t=this.nodes.get(e);if(t!==void 0)return t;throw this.parent?.has(e)?Error(`Variable "${e}" lives in the directory's store; a session's view cannot write it`):ReferenceError(`Unknown variable "${e}"`)}requireVar(e){let t=this.requireNode(e);if(t.kind===`document`)throw TypeError(`Variable "${e}" is a document; read its fields by path (.${e}.<field>)`);return t}refuseDisposed(e){if(this.disposed)throw Error(`${e}: cannot declare on a disposed store`)}declare(e,t){if(this.refuseDisposed(`Variable "${e}"`),this.has(e))throw Error(`Variable "${e}" is already declared`);(0,Y.runInAction)(()=>this.nodes.set(e,t))}},Fw=class extends Error{name=`TemplateError`;kind=`EvalError`;pos;source;constructor(e,t,n={}){super(e,{cause:n.cause}),this.pos=t,this.source=n.source}get sourceSnippet(){return this.source?Ww(this.source,this.pos):``}toString(){let e=`${this.name}: ${this.message}\n at line ${this.pos.line}, column ${this.pos.column}`,t=this.sourceSnippet;return t?`${e}\n\n${t}`:e}},Iw=class extends Fw{name=`ParseError`;kind=`ParseError`;expected;found;constructor(e,t,n={}){super(e,t,n),this.expected=n.expected,this.found=n.found}},Lw=class extends Fw{name=`EvalError`;kind=`EvalError`},Rw=class extends Lw{name=`FuncNotFoundError`;kind=`FuncNotFoundError`;funcName;suggestions;constructor(e,t,n={}){let r=Gw(e,n.available??[]),i=r.length===0?``:` (did you mean: ${r.join(`, `)}?)`;super(`function ${JSON.stringify(e)} is not registered${i}`,t,n),this.funcName=e,this.suggestions=r}},zw=class extends Lw{name=`ArgCountError`;kind=`ArgCountError`;funcName;accepted;got;constructor(e,t,n,r,i={}){let a=t.minimum===t.maximum?`${t.minimum}`:`at least ${t.minimum}`;super(`wrong number of args for ${e}: want ${a} got ${n}`,r,i),this.funcName=e,this.accepted=t,this.got=n}},Bw=class extends Lw{name=`TypeMismatchError`;kind=`TypeMismatchError`;funcName;argIndex;expected;receivedSummary;constructor(e,t,n,r,i,a={}){super(`function ${JSON.stringify(e)} arg ${t}: expected ${n}, but a ${r} flowed in. Pass it through \`unstyled\` (or your engine's flatten function) to convert.`,i,a),this.funcName=e,this.argIndex=t,this.expected=n,this.receivedSummary=r}},Vw=class extends Bw{constructor(e,t,n,r,i={}){super(e,t,`integer`,String(n),r,i),this.message=Number.isInteger(Number(n))?`integer out of range: ${String(n)}`:`expected integer; found ${String(n)}`}},Hw=class extends Lw{name=`MissingFieldError`;kind=`MissingFieldError`;path;constructor(e,t,n={}){super(`field "${e.join(`.`)}" not found on receiver`,t,n),this.path=e}},Uw=class extends Lw{name=`FailError`;kind=`FailError`;constructor(e,t={line:0,column:0,offset:0},n={}){super(e,t,n)}};function Ww(e,t){let n=e.split(`
65
65
  `),r=t.line-1,i=[];if(r-1>=0&&r-1<n.length&&i.push({num:r,text:n[r-1]??``}),r>=0&&r<n.length&&i.push({num:r+1,text:n[r]??``}),r+1<n.length&&i.push({num:r+2,text:n[r+1]??``}),i.length===0)return``;let a=String(i[i.length-1]?.num??1).length,o=[];for(let e of i)if(o.push(` ${String(e.num).padStart(a,` `)} | ${e.text}`),e.num===t.line){let e=` ${` `.repeat(a)} | `,n=` `.repeat(Math.max(0,t.column-1));o.push(`${e}${n}^`)}return o.join(`
66
66
  `)}function Gw(e,t){if(t.length===0)return[];let n=t.map(t=>({name:t,dist:Kw(e,t)})).sort((e,t)=>e.dist-t.dist),r=Math.max(2,Math.floor(e.length/2));return n.filter(e=>e.dist<=r).slice(0,3).map(e=>e.name)}function Kw(e,t){if(e===t)return 0;let n=e.length,r=t.length;if(n===0)return r;if(r===0)return n;let i=Array(r+1),a=Array(r+1);for(let e=0;e<=r;e++)i[e]=e;for(let o=1;o<=n;o++){a[0]=o;for(let n=1;n<=r;n++){let r=e[o-1]===t[n-1]?0:1;a[n]=Math.min((a[n-1]??0)+1,(i[n]??0)+1,(i[n-1]??0)+r)}for(let e=0;e<=r;e++)i[e]=a[e]??0}return i[r]??0}function qw(e){throw Error(`unhandled node kind: ${JSON.stringify(e)}`)}const Jw=new Map([[`if`,`If`],[`else`,`Else`],[`end`,`End`],[`range`,`Range`],[`with`,`With`],[`break`,`Break`],[`continue`,`Continue`],[`define`,`Define`],[`template`,`Template`],[`block`,`Block`],[`true`,`Bool`],[`false`,`Bool`],[`nil`,`Nil`]]),Yw={left:`{{`,right:`}}`};var Xw=class{src;leftDelim;rightDelim;offset=0;line=1;column=1;mode=`text`;pending;constructor(e,t=Yw){this.src=e,this.leftDelim=t.left,this.rightDelim=t.right}pos(){return{line:this.line,column:this.column,offset:this.offset}}err(e,t,n={}){return new Iw(e,t,{...n,source:this.src})}next(){if(this.pending){let e=this.pending;return this.pending=void 0,e}return this.read()}peek(){return this.pending||=this.read(),this.pending}read(){switch(this.mode){case`text`:return this.readText();case`action`:return this.readAction();case`done`:return this.makeToken(`EOF`,``,this.pos())}}readText(){if(this.offset>=this.src.length)return this.mode=`done`,this.makeToken(`EOF`,``,this.pos());let e=this.pos(),t=this.offset;for(;t<this.src.length&&!this.src.startsWith(this.leftDelim,t);)t+=1;let n=t<this.src.length&&this.src[t+this.leftDelim.length]===`-`,r=t;if(n)for(;r>this.offset&&Zw(this.src[r-1]??``);)--r;if(r>this.offset){let t=this.src.slice(this.offset,r);return this.advanceTo(r),this.makeToken(`Text`,t,e)}return this.advanceTo(t),this.emitLeftDelim(n)}emitLeftDelim(e){let t=this.pos();if(this.advanceBy(this.leftDelim.length),e)for(this.advanceBy(1);Zw(this.src[this.offset]??``);)this.advanceBy(1);return this.mode=`action`,this.src.startsWith(`/*`,this.offset)?this.readComment(t,e):this.makeToken(`LeftDelim`,e?`${this.leftDelim}-`:this.leftDelim,t,e?{trimLeft:!0}:{})}readComment(e,t){this.advanceBy(2);let n=this.offset,r=this.src.indexOf(`*/`,this.offset);if(r===-1)throw this.err(`unclosed comment`,e,{expected:`*/${this.rightDelim}`,found:`end of input`});this.advanceTo(r);let i=this.src.slice(n,r).trim();for(this.advanceBy(2);Zw(this.src[this.offset]??``);)this.advanceBy(1);let a=!1;if(this.src[this.offset]===`-`&&(a=!0,this.advanceBy(1)),!this.src.startsWith(this.rightDelim,this.offset))throw this.err(`expected \`${this.rightDelim}\` to close comment`,this.pos(),{expected:this.rightDelim,found:this.src[this.offset]??`end of input`});if(this.advanceBy(this.rightDelim.length),a)for(;Zw(this.src[this.offset]??``);)this.advanceBy(1);return this.mode=`text`,this.makeToken(`Comment`,i,e,{...t?{trimLeft:!0}:{},...a?{trimRight:!0}:{}})}readAction(){if(this.skipActionSpaces(),this.src.startsWith(`-${this.rightDelim}`,this.offset)){let e=this.pos();for(this.advanceBy(1+this.rightDelim.length),this.mode=`text`;Zw(this.src[this.offset]??``);)this.advanceBy(1);return this.makeToken(`RightDelim`,`-${this.rightDelim}`,e,{trimRight:!0})}if(this.src.startsWith(this.rightDelim,this.offset)){let e=this.pos();return this.advanceBy(this.rightDelim.length),this.mode=`text`,this.makeToken(`RightDelim`,this.rightDelim,e)}if(this.offset>=this.src.length)throw this.err(`unclosed action`,this.pos(),{expected:this.rightDelim,found:`end of input`});let e=this.src[this.offset],t=this.pos();switch(e){case`(`:return this.advanceBy(1),this.makeToken(`LeftParen`,`(`,t);case`)`:return this.advanceBy(1),this.makeToken(`RightParen`,`)`,t);case`|`:return this.advanceBy(1),this.makeToken(`Pipe`,`|`,t);case`,`:return this.advanceBy(1),this.makeToken(`Comma`,`,`,t);case`:`:if(this.src[this.offset+1]===`=`)return this.advanceBy(2),this.makeToken(`Declare`,`:=`,t);throw this.err("expected `:=`",t,{expected:`:=`,found:`:`});case`=`:return this.advanceBy(1),this.makeToken(`Assign`,`=`,t);case`"`:return this.readQuotedString(t);case"`":return this.readRawString(t);case`'`:return this.readChar(t)}if(e===`$`)return this.readVariable(t);if(e!==void 0&&($w(e)||Qw(e)&&$w(this.src[this.offset+1]??``)||e===`.`&&$w(this.src[this.offset+1]??``)))return this.readNumber(t);if(e===`.`)return this.readDotOrField(t);if(e!==void 0&&iT(e))return this.readIdentifier(t);throw this.err(`unexpected character ${JSON.stringify(e)}`,t,{found:e??`end of input`})}readQuotedString(e){let t=this.offset;for(this.advanceBy(1);this.offset<this.src.length;){let n=this.src[this.offset];if(n===`\\`){this.advanceBy(1),this.offset<this.src.length&&this.advanceBy(1);continue}if(n===`
67
67
  `)throw this.err(`newline in interpreted string`,e,{found:`\\n`});if(n===`"`)return this.advanceBy(1),this.makeToken(`String`,this.src.slice(t,this.offset),e);this.advanceBy(1)}throw this.err(`unterminated string literal`,e,{expected:`"`,found:`end of input`})}readRawString(e){let t=this.offset;for(this.advanceBy(1);this.offset<this.src.length;){if(this.src[this.offset]==="`")return this.advanceBy(1),this.makeToken(`String`,this.src.slice(t,this.offset),e);this.advanceBy(1)}throw this.err(`unterminated raw string literal`,e,{expected:"`",found:`end of input`})}readChar(e){let t=this.offset;for(this.advanceBy(1);this.offset<this.src.length;){let n=this.src[this.offset];if(n===`\\`){this.advanceBy(1),this.offset<this.src.length&&this.advanceBy(1);continue}if(n===`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@promptctl/cc-candybar",
3
- "version": "1.166.2",
3
+ "version": "1.166.3",
4
4
  "description": "Statusline renderer for Claude Code — a JSON5-configurable DSL with daemon-cached data sources, byte-clean palette-aware composition, and OSC8 click verbs.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.mjs",
@@ -102,9 +102,9 @@
102
102
  "typescript": "^5.0.0"
103
103
  },
104
104
  "optionalDependencies": {
105
- "@promptctl/cc-candybar-darwin-arm64": "1.166.2",
106
- "@promptctl/cc-candybar-darwin-x64": "1.166.2",
107
- "@promptctl/cc-candybar-linux-arm64": "1.166.2",
108
- "@promptctl/cc-candybar-linux-x64": "1.166.2"
105
+ "@promptctl/cc-candybar-darwin-arm64": "1.166.3",
106
+ "@promptctl/cc-candybar-darwin-x64": "1.166.3",
107
+ "@promptctl/cc-candybar-linux-arm64": "1.166.3",
108
+ "@promptctl/cc-candybar-linux-x64": "1.166.3"
109
109
  }
110
110
  }