diff --git a/commands/adm.py b/commands/adm.py index 18dea65..f6822a7 100644 --- a/commands/adm.py +++ b/commands/adm.py @@ -62,6 +62,7 @@ ("command channel remove ", "stop a command responding on a channel"), ("radio pathhash [1|2|3]", "show/set this radio's outgoing path-hash width"), ("advert ", "send a flood or zero-hop advertisement"), + ("advert interval ", "send a flood advert every N hours (0 disables)"), ("status", "bot health and runtime stats"), ("reload", "rescan commands/ and reload plugins"), ("restart", "full teardown + reinit (re-reads config)"), @@ -724,10 +725,30 @@ async def _radio_pathhash(ctx, args): async def _cmd_advert(ctx, rest): parts = rest.split() if not parts: - return "Usage: !adm advert " + return "Usage: !adm advert >" mode = parts[0].lower() + if mode == "interval": + if len(parts) < 2: + cur = ctx.bot.advert_interval_hours + return ( + f"Flood advert interval: {cur}h" + f"{' (disabled)' if cur == 0 else ''}. " + "Set with: !adm advert interval (0 disables)" + ) + try: + hours = int(parts[1]) + except ValueError: + return f"Invalid interval: {parts[1]!r}. Use a whole number of hours." + try: + res = await ctx.bot.mgmt.radio_set_advert_interval(hours, **_actor(ctx)) + except MgmtError as e: + return e.message + n = res["interval_hours"] + if n == 0: + return "Periodic flood advert disabled" + return f"Flood advert every {n}h" if mode not in ("flood", "zero"): - return f"Unknown advert mode: {mode!r}. Use 'flood' or 'zero'." + return f"Unknown advert mode: {mode!r}. Use 'flood', 'zero', or 'interval'." flood = mode == "flood" try: await ctx.bot.mgmt.send_advert(flood, **_actor(ctx)) diff --git a/management.py b/management.py index ad1f483..d0e4623 100644 --- a/management.py +++ b/management.py @@ -598,6 +598,32 @@ async def send_advert( ) return {"flood": flood, "ok": ok} + async def radio_advert_interval( + self, *, actor_pubkey=None, actor_name=None, + ) -> dict: + """Current periodic flood-advert interval (hours; 0 = disabled). + Read-only, not audited.""" + return {"interval_hours": self.bot.advert_interval_hours} + + async def radio_set_advert_interval( + self, interval_hours, + *, actor_pubkey=None, actor_name=None, + ) -> dict: + """Set the periodic flood-advert interval in hours (0 = disabled). + Persists to the database. Audited as 'radio.advert_interval'.""" + try: + interval_hours = int(interval_hours) + except (TypeError, ValueError): + raise MgmtError("interval must be a whole number of hours", "invalid") + if not (0 <= interval_hours <= 168): + raise MgmtError("interval must be between 0 and 168 hours", "invalid") + await self.bot.set_advert_interval(interval_hours) + await self._audit( + actor_pubkey, actor_name, "radio.advert_interval", None, + f"interval={interval_hours}h", + ) + return {"interval_hours": self.bot.advert_interval_hours} + # ================================================================== # Radio contact-table rollover # ================================================================== diff --git a/mcbot.conf.example b/mcbot.conf.example index b1ac6d5..b8ddc42 100644 --- a/mcbot.conf.example +++ b/mcbot.conf.example @@ -115,6 +115,13 @@ owner_pubkeys = 0000000000000000000000000000000000000000000000000000000000000000 ;radio_evict_max_per_run = 50 ;radio_evict_min_interval = 120 +; Periodic flood advert: send a flood advertisement every N hours (0 = +; disabled). This is only the FIRST-RUN SEED — on first start it is copied +; into the database, after which the DB value is authoritative and managed at +; runtime via '!adm advert interval N' or the web Manage->Radio page (changes +; persist across restarts). Edit this only to change the initial default. +;advert_interval_hours = 0 + ; Environment variables for the bot and command scripts. ; Each key here is exported into the process environment at startup, so ; command scripts can read it via os.environ (e.g. commands/pws.py reads diff --git a/mcbot.py b/mcbot.py index aa6538f..a976386 100755 --- a/mcbot.py +++ b/mcbot.py @@ -434,6 +434,11 @@ class Config: radio_evict_protect_types: set = field(default_factory=set) radio_evict_max_per_run: int = 50 # safety cap on removals per run radio_evict_min_interval: float = 120 # seconds debounce for auto runs + # Periodic flood-advert interval in hours (0 = disabled). This is only the + # SEED: on first run it is written to bot_meta, after which the DB value is + # authoritative and runtime-managed (via '!adm advert interval N' and the + # web Manage->Radio page). Edit this only to change the first-run default. + advert_interval_hours: int = 0 # --- web admin UI / API ([web] section) --- web_enabled: bool = False web_host: str = "127.0.0.1" # 0.0.0.0 to expose on all interfaces @@ -538,6 +543,9 @@ def load_config(args) -> Config: cfg.radio_evict_min_interval = parser["bot"].getfloat( "radio_evict_min_interval", cfg.radio_evict_min_interval ) + cfg.advert_interval_hours = parser["bot"].getint( + "advert_interval_hours", cfg.advert_interval_hours + ) protect_raw = parser["bot"].get("radio_evict_protect_types", "") if protect_raw.strip(): cfg.radio_evict_protect_types = parse_contact_types( @@ -1243,6 +1251,13 @@ def __init__(self, cfg: Config, log: logging.Logger): self.evict_headroom: int = cfg.radio_evict_headroom self._evict_lock = asyncio.Lock() self._last_auto_evict: float = 0.0 # monotonic + # periodic flood advert. seeded from cfg, then DB-authoritative (loaded + # via _load_advert_interval at startup, persisted by set_advert_interval). + # _last_flood_advert (monotonic) anchors the schedule; the periodic task + # measures the interval from it, and any flood advert (manual or + # periodic) refreshes it. + self.advert_interval_hours: int = cfg.advert_interval_hours + self._last_flood_advert: float = 0.0 # channel logging filter def _parse_log_channels(self) -> None: @@ -3477,8 +3492,46 @@ async def send_advert(self, flood: bool): p.get("error_code") or p.get("code_string"), p.get("reason"), ) + if flood: + # anchor the periodic-advert schedule to the most recent flood + # advert, whatever its source, so the interval is "at least N hours + # between flood adverts". + self._last_flood_advert = time.monotonic() return ev + # --- periodic flood advert (interval seeded from config, then DB-managed) --- + async def _load_advert_interval(self) -> None: + # DB is authoritative; seed it from config on first run (key absent). + row = await self.db.fetchone( + "SELECT value FROM bot_meta WHERE key='advert_interval_hours'" + ) + val = row["value"] if row else None + if val is not None and str(val).lstrip("-").isdigit(): + self.advert_interval_hours = max(0, int(val)) + else: + self.advert_interval_hours = self.cfg.advert_interval_hours + await self.db.execute( + "INSERT INTO bot_meta(key,value) VALUES('advert_interval_hours',?) " + "ON CONFLICT(key) DO UPDATE SET value=excluded.value", + (str(self.advert_interval_hours),), + ) + + async def set_advert_interval(self, hours: int) -> None: + # update the runtime value, persist to the DB, and restart the schedule + # from now (so a change doesn't trigger an immediate overdue advert). + self.advert_interval_hours = max(0, int(hours)) + self._last_flood_advert = time.monotonic() + await self.db.execute( + "INSERT INTO bot_meta(key,value) VALUES('advert_interval_hours',?) " + "ON CONFLICT(key) DO UPDATE SET value=excluded.value", + (str(self.advert_interval_hours),), + ) + self.logger.info( + "flood advert interval set to %dh%s", + self.advert_interval_hours, + " (disabled)" if self.advert_interval_hours == 0 else "", + ) + async def send_channel_text(self, channel_idx: int, text: str): # single-shot channel send (channel messages have no ACK). returns # the radio Event (or None); logs a rejection. no exception on error. @@ -3645,6 +3698,7 @@ async def run(self) -> int: await self._program_channels_on_radio() await self._bootstrap_admin_state() await self.seed_command_configs() + await self._load_advert_interval() # ensure radio contact-table headroom on startup (device_info + # contacts have been synced above; owners are bootstrapped into @@ -3750,7 +3804,31 @@ async def periodic_contacts(): except Exception: self.logger.exception("periodic contacts sync failed") + async def periodic_advert(): + # anchor the schedule to startup so the first periodic advert is a + # full interval away (no immediate flood on boot). Reads the + # runtime-mutable interval each tick, so changes take effect within + # the poll period without a restart. + self._last_flood_advert = time.monotonic() + while not self.stop_event.is_set(): + try: + await asyncio.wait_for(self.stop_event.wait(), timeout=60.0) + break + except asyncio.TimeoutError: + pass + hrs = self.advert_interval_hours + if hrs and hrs > 0: + if time.monotonic() >= self._last_flood_advert + hrs * 3600: + try: + self.logger.info( + "periodic flood advert (every %dh)", hrs + ) + await self.send_advert(flood=True) + except Exception: + self.logger.exception("periodic flood advert failed") + periodic_task = asyncio.create_task(periodic_contacts()) + advert_task = asyncio.create_task(periodic_advert()) self._start_web() @@ -3758,7 +3836,7 @@ async def periodic_contacts(): try: await self.stop_event.wait() finally: - await self.shutdown([periodic_task]) + await self.shutdown([periodic_task, advert_task]) return 0 def _start_web(self) -> None: diff --git a/tests/test_advert_interval.py b/tests/test_advert_interval.py new file mode 100644 index 0000000..dbcd9ae --- /dev/null +++ b/tests/test_advert_interval.py @@ -0,0 +1,135 @@ +#!/usr/bin/env python3 +"""Periodic flood-advert interval: config seeds the DB on first run, then the +DB value is authoritative and runtime-managed (persisted, validated, audited). + +Run: /home/steve/dev/meshcore/meshcore-bot/venv/bin/python tests/test_advert_interval.py +""" + +import asyncio +import sys +import time +from pathlib import Path +from types import SimpleNamespace + +sys.path.insert(0, str(Path(__file__).resolve().parent.parent)) + +import mcbot # noqa: E402 +from management import MgmtError # noqa: E402 + +_failures = 0 + + +def check(cond, msg): + global _failures + print(f" {'ok' if cond else 'FAIL'}: {msg}") + if not cond: + _failures += 1 + + +def make_bot(*, advert_interval_hours=0): + cfg = mcbot.Config() + cfg.db_path = Path(":memory:") + cfg.advert_interval_hours = advert_interval_hours + log = mcbot.logging.getLogger("test-advert") + log.addHandler(mcbot.logging.NullHandler()) + log.propagate = False + return mcbot.MCBot(cfg, log) + + +async def meta(bot): + row = await bot.db.fetchone( + "SELECT value FROM bot_meta WHERE key='advert_interval_hours'" + ) + return row["value"] if row else None + + +async def test_seed_from_config_when_db_empty(): + print("test_seed_from_config_when_db_empty") + bot = make_bot(advert_interval_hours=3) + await bot._load_advert_interval() + check(bot.advert_interval_hours == 3, "seeded interval from config") + check(await meta(bot) == "3", "config value written to bot_meta") + bot.db.close() + + +async def test_db_is_authoritative_over_config(): + print("test_db_is_authoritative_over_config") + bot = make_bot(advert_interval_hours=3) + await bot.db.execute( + "INSERT INTO bot_meta(key,value) VALUES('advert_interval_hours','5')" + ) + await bot._load_advert_interval() + check(bot.advert_interval_hours == 5, "DB value wins over config") + bot.db.close() + + +async def test_set_persists_and_resets_schedule(): + print("test_set_persists_and_resets_schedule") + bot = make_bot() + bot._last_flood_advert = 0.0 + await bot.set_advert_interval(7) + check(bot.advert_interval_hours == 7, "in-memory value updated") + check(await meta(bot) == "7", "value persisted to bot_meta") + check(bot._last_flood_advert > 0, "schedule baseline reset to now") + await bot.set_advert_interval(0) + check(bot.advert_interval_hours == 0 and await meta(bot) == "0", "disable persists") + bot.db.close() + + +async def test_mgmt_validation_and_audit(): + print("test_mgmt_validation_and_audit") + bot = make_bot() + r = await bot.mgmt.radio_set_advert_interval(4) + check(r == {"interval_hours": 4}, "valid set returns interval") + check(await meta(bot) == "4", "mgmt set persisted") + g = await bot.mgmt.radio_advert_interval() + check(g == {"interval_hours": 4}, "get returns current interval") + for bad in (-1, 169, "abc"): + try: + await bot.mgmt.radio_set_advert_interval(bad) + check(False, f"invalid interval {bad!r} should raise") + except MgmtError: + check(True, f"invalid interval {bad!r} rejected") + # audit row written for the successful set + row = await bot.db.fetchone( + "SELECT detail FROM bot_audit_log WHERE action='radio.advert_interval' " + "ORDER BY id DESC LIMIT 1" + ) + check(row is not None and "interval=4h" in row["detail"], "set is audited") + bot.db.close() + + +async def test_send_advert_anchors_schedule(): + print("test_send_advert_anchors_schedule") + bot = make_bot() + + async def fake_send_advert(flood=False): + return SimpleNamespace(type=SimpleNamespace(name="OK"), payload={}) + + bot.mc = SimpleNamespace(commands=SimpleNamespace(send_advert=fake_send_advert)) + bot._last_flood_advert = 0.0 + await bot.send_advert(flood=False) + check(bot._last_flood_advert == 0.0, "zero-hop advert does not anchor schedule") + await bot.send_advert(flood=True) + check(bot._last_flood_advert > 0, "flood advert anchors schedule") + bot.db.close() + + +async def main(): + for t in ( + test_seed_from_config_when_db_empty, + test_db_is_authoritative_over_config, + test_set_persists_and_resets_schedule, + test_mgmt_validation_and_audit, + test_send_advert_anchors_schedule, + ): + await t() + print() + if _failures: + print(f"FAILED: {_failures} check(s)") + sys.exit(1) + print("ALL TESTS PASSED") + + +if __name__ == "__main__": + asyncio.run(main()) diff --git a/web-ui/src/views/Manage.vue b/web-ui/src/views/Manage.vue index 5abf09a..3475399 100644 --- a/web-ui/src/views/Manage.vue +++ b/web-ui/src/views/Manage.vue @@ -62,6 +62,8 @@ async function loadTab(key, force = false) { const r = await api(endpoints[key]) data.value[key] = decorate(key, r) if (key === 'contacts') rememberContactTypes(data.value[key]) + // Radio tab shows the current periodic flood-advert interval. + if (key === 'radio') await loadAdvertInterval() // users/groups tabs (and the Users "create bot user" form) need the // list of group names for their group pickers. if ( @@ -235,6 +237,25 @@ async function sendAdvert() { advertSending.value = false } +// ---- periodic flood advert interval (hours; 0 = disabled) ---- +const advertInterval = ref(0) +async function loadAdvertInterval() { + try { + const r = await api('/radio/advert-interval') + advertInterval.value = r.interval_hours + } catch (e) { + error.value = e.message + } +} +async function applyAdvertInterval() { + const n = Number(advertInterval.value) + await run( + api('/radio/advert-interval', { method: 'POST', json: { interval_hours: n } }), + n > 0 ? `Flood advert every ${n}h` : 'Periodic flood advert disabled', + ) + await loadAdvertInterval() +} + // ---- radio contact-table rollover ---- const contactStatus = ref(null) const statusLoading = ref(false) @@ -676,6 +697,23 @@ onMounted(() => loadTab('stats')) +
+ + + + 0 = disabled. Bot sends a flood advert every N hours; persists in the + database (mcbot.conf only seeds the first-run default). + +
+
diff --git a/webapi/routers/dbadmin.py b/webapi/routers/dbadmin.py index 799ae31..ef8aa6f 100644 --- a/webapi/routers/dbadmin.py +++ b/webapi/routers/dbadmin.py @@ -498,3 +498,27 @@ async def radio_contacts_policy( ) except MgmtError as e: raise http_for_mgmt(e) + + +@router.get("/radio/advert-interval") +async def radio_advert_interval( + bot=Depends(get_bot), identity: str = Depends(require_auth), +): + return await bot.mgmt.radio_advert_interval(**actor_kwargs(identity)) + + +class AdvertIntervalBody(BaseModel): + interval_hours: int = 0 + + +@router.post("/radio/advert-interval") +async def radio_set_advert_interval( + body: AdvertIntervalBody, + bot=Depends(get_bot), identity: str = Depends(require_auth), +): + try: + return await bot.mgmt.radio_set_advert_interval( + body.interval_hours, **actor_kwargs(identity), + ) + except MgmtError as e: + raise http_for_mgmt(e) diff --git a/webapi/static/assets/index-0UQo_2i_.js b/webapi/static/assets/index-0UQo_2i_.js new file mode 100644 index 0000000..c34eefa --- /dev/null +++ b/webapi/static/assets/index-0UQo_2i_.js @@ -0,0 +1,37 @@ +(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))s(o);new MutationObserver(o=>{for(const l of o)if(l.type==="childList")for(const r of l.addedNodes)r.tagName==="LINK"&&r.rel==="modulepreload"&&s(r)}).observe(document,{childList:!0,subtree:!0});function n(o){const l={};return o.integrity&&(l.integrity=o.integrity),o.referrerPolicy&&(l.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?l.credentials="include":o.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function s(o){if(o.ep)return;o.ep=!0;const l=n(o);fetch(o.href,l)}})();/** +* @vue/shared v3.5.35 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/function ao(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const ke={},sn=[],xt=()=>{},Pl=()=>!1,cs=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),us=e=>e.startsWith("onUpdate:"),Ve=Object.assign,co=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},fi=Object.prototype.hasOwnProperty,be=(e,t)=>fi.call(e,t),ee=Array.isArray,on=e=>Dn(e)==="[object Map]",dn=e=>Dn(e)==="[object Set]",Po=e=>Dn(e)==="[object Date]",oe=e=>typeof e=="function",Te=e=>typeof e=="string",ft=e=>typeof e=="symbol",we=e=>e!==null&&typeof e=="object",Il=e=>(we(e)||oe(e))&&oe(e.then)&&oe(e.catch),Nl=Object.prototype.toString,Dn=e=>Nl.call(e),di=e=>Dn(e).slice(8,-1),$l=e=>Dn(e)==="[object Object]",fs=e=>Te(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,bn=ao(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),ds=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},hi=/-\w/g,Je=ds(e=>e.replace(hi,t=>t.slice(1).toUpperCase())),pi=/\B([A-Z])/g,Kt=ds(e=>e.replace(pi,"-$1").toLowerCase()),hs=ds(e=>e.charAt(0).toUpperCase()+e.slice(1)),Ts=ds(e=>e?`on${hs(e)}`:""),wt=(e,t)=>!Object.is(e,t),Jn=(e,...t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:s,value:n})},ps=e=>{const t=parseFloat(e);return isNaN(t)?e:t};let Io;const ms=()=>Io||(Io=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function uo(e){if(ee(e)){const t={};for(let n=0;n{if(n){const s=n.split(vi);s.length>1&&(t[s[0].trim()]=s[1].trim())}}),t}function Qe(e){let t="";if(Te(e))t=e;else if(ee(e))for(let n=0;nUt(n,t))}const Ll=e=>!!(e&&e.__v_isRef===!0),R=e=>Te(e)?e:e==null?"":ee(e)||we(e)&&(e.toString===Nl||!oe(e.toString))?Ll(e)?R(e.value):JSON.stringify(e,jl,2):String(e),jl=(e,t)=>Ll(t)?jl(e,t.value):on(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[s,o],l)=>(n[Ps(s,l)+" =>"]=o,n),{})}:dn(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>Ps(n))}:ft(t)?Ps(t):we(t)&&!ee(t)&&!$l(t)?String(t):t,Ps=(e,t="")=>{var n;return ft(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};/** +* @vue/reactivity v3.5.35 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/let De;class Vl{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this._warnOnRun=!0,this.__v_skip=!0,!t&&De&&(De.active?(this.parent=De,this.index=(De.scopes||(De.scopes=[])).push(this)-1):(this._active=!1,this._warnOnRun=!1))}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t0&&--this._on===0){if(De===this)De=this.prevScope;else{let t=De;for(;t;){if(t.prevScope===this){t.prevScope=this.prevScope;break}t=t.prevScope}}this.prevScope=void 0}}stop(t){if(this._active){this._active=!1;let n,s;for(n=0,s=this.effects.length;n0)return;if(xn){let t=xn;for(xn=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;wn;){let t=wn;for(wn=void 0;t;){const n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(s){e||(e=s)}t=n}}if(e)throw e}function Gl(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Wl(e){let t,n=e.depsTail,s=n;for(;s;){const o=s.prevDep;s.version===-1?(s===n&&(n=o),mo(s),ki(s)):t=s,s.dep.activeLink=s.prevActiveLink,s.prevActiveLink=void 0,s=o}e.deps=t,e.depsTail=n}function Ws(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(ql(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function ql(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===Tn)||(e.globalVersion=Tn,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!Ws(e))))return;e.flags|=2;const t=e.dep,n=Se,s=ht;Se=e,ht=!0;try{Gl(e);const o=e.fn(e._value);(t.version===0||wt(o,e._value))&&(e.flags|=128,e._value=o,t.version++)}catch(o){throw t.version++,o}finally{Se=n,ht=s,Wl(e),e.flags&=-3}}function mo(e,t=!1){const{dep:n,prevSub:s,nextSub:o}=e;if(s&&(s.nextSub=o,e.prevSub=void 0),o&&(o.prevSub=s,e.nextSub=void 0),n.subs===e&&(n.subs=s,!s&&n.computed)){n.computed.flags&=-5;for(let l=n.computed.deps;l;l=l.nextDep)mo(l,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function ki(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let ht=!0;const zl=[];function It(){zl.push(ht),ht=!1}function Nt(){const e=zl.pop();ht=e===void 0?!0:e}function No(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=Se;Se=void 0;try{t()}finally{Se=n}}}let Tn=0;class Ci{constructor(t,n){this.sub=t,this.dep=n,this.version=n.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class vo{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(t){if(!Se||!ht||Se===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==Se)n=this.activeLink=new Ci(Se,this),Se.deps?(n.prevDep=Se.depsTail,Se.depsTail.nextDep=n,Se.depsTail=n):Se.deps=Se.depsTail=n,Jl(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const s=n.nextDep;s.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=s),n.prevDep=Se.depsTail,n.nextDep=void 0,Se.depsTail.nextDep=n,Se.depsTail=n,Se.deps===n&&(Se.deps=s)}return n}trigger(t){this.version++,Tn++,this.notify(t)}notify(t){ho();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{po()}}}function Jl(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let s=t.deps;s;s=s.nextDep)Jl(s)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const es=new WeakMap,Yt=Symbol(""),qs=Symbol(""),Pn=Symbol("");function Ue(e,t,n){if(ht&&Se){let s=es.get(e);s||es.set(e,s=new Map);let o=s.get(n);o||(s.set(n,o=new vo),o.map=s,o.key=n),o.track()}}function Rt(e,t,n,s,o,l){const r=es.get(e);if(!r){Tn++;return}const i=a=>{a&&a.trigger()};if(ho(),t==="clear")r.forEach(i);else{const a=ee(e),f=a&&fs(n);if(a&&n==="length"){const u=Number(s);r.forEach((h,g)=>{(g==="length"||g===Pn||!ft(g)&&g>=u)&&i(h)})}else switch((n!==void 0||r.has(void 0))&&i(r.get(n)),f&&i(r.get(Pn)),t){case"add":a?f&&i(r.get("length")):(i(r.get(Yt)),on(e)&&i(r.get(qs)));break;case"delete":a||(i(r.get(Yt)),on(e)&&i(r.get(qs)));break;case"set":on(e)&&i(r.get(Yt));break}}po()}function Si(e,t){const n=es.get(e);return n&&n.get(t)}function Zt(e){const t=ve(e);return t===e?t:(Ue(t,"iterate",Pn),st(e)?t:t.map(pt))}function vs(e){return Ue(e=ve(e),"iterate",Pn),e}function yt(e,t){return $t(e)?rn(Pt(e)?pt(t):t):pt(t)}const Ei={__proto__:null,[Symbol.iterator](){return Ns(this,Symbol.iterator,e=>yt(this,e))},concat(...e){return Zt(this).concat(...e.map(t=>ee(t)?Zt(t):t))},entries(){return Ns(this,"entries",e=>(e[1]=yt(this,e[1]),e))},every(e,t){return Ct(this,"every",e,t,void 0,arguments)},filter(e,t){return Ct(this,"filter",e,t,n=>n.map(s=>yt(this,s)),arguments)},find(e,t){return Ct(this,"find",e,t,n=>yt(this,n),arguments)},findIndex(e,t){return Ct(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return Ct(this,"findLast",e,t,n=>yt(this,n),arguments)},findLastIndex(e,t){return Ct(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return Ct(this,"forEach",e,t,void 0,arguments)},includes(...e){return $s(this,"includes",e)},indexOf(...e){return $s(this,"indexOf",e)},join(e){return Zt(this).join(e)},lastIndexOf(...e){return $s(this,"lastIndexOf",e)},map(e,t){return Ct(this,"map",e,t,void 0,arguments)},pop(){return mn(this,"pop")},push(...e){return mn(this,"push",e)},reduce(e,...t){return $o(this,"reduce",e,t)},reduceRight(e,...t){return $o(this,"reduceRight",e,t)},shift(){return mn(this,"shift")},some(e,t){return Ct(this,"some",e,t,void 0,arguments)},splice(...e){return mn(this,"splice",e)},toReversed(){return Zt(this).toReversed()},toSorted(e){return Zt(this).toSorted(e)},toSpliced(...e){return Zt(this).toSpliced(...e)},unshift(...e){return mn(this,"unshift",e)},values(){return Ns(this,"values",e=>yt(this,e))}};function Ns(e,t,n){const s=vs(e),o=s[t]();return s!==e&&!st(e)&&(o._next=o.next,o.next=()=>{const l=o._next();return l.done||(l.value=n(l.value)),l}),o}const Ai=Array.prototype;function Ct(e,t,n,s,o,l){const r=vs(e),i=r!==e&&!st(e),a=r[t];if(a!==Ai[t]){const h=a.apply(e,l);return i?pt(h):h}let f=n;r!==e&&(i?f=function(h,g){return n.call(this,yt(e,h),g,e)}:n.length>2&&(f=function(h,g){return n.call(this,h,g,e)}));const u=a.call(r,f,s);return i&&o?o(u):u}function $o(e,t,n,s){const o=vs(e),l=o!==e&&!st(e);let r=n,i=!1;o!==e&&(l?(i=s.length===0,r=function(f,u,h){return i&&(i=!1,f=yt(e,f)),n.call(this,f,yt(e,u),h,e)}):n.length>3&&(r=function(f,u,h){return n.call(this,f,u,h,e)}));const a=o[t](r,...s);return i?yt(e,a):a}function $s(e,t,n){const s=ve(e);Ue(s,"iterate",Pn);const o=s[t](...n);return(o===-1||o===!1)&&gs(n[0])?(n[0]=ve(n[0]),s[t](...n)):o}function mn(e,t,n=[]){It(),ho();const s=ve(e)[t].apply(e,n);return po(),Nt(),s}const Ri=ao("__proto__,__v_isRef,__isVue"),Yl=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(ft));function Oi(e){ft(e)||(e=String(e));const t=ve(this);return Ue(t,"has",e),t.hasOwnProperty(e)}class Ql{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,s){if(n==="__v_skip")return t.__v_skip;const o=this._isReadonly,l=this._isShallow;if(n==="__v_isReactive")return!o;if(n==="__v_isReadonly")return o;if(n==="__v_isShallow")return l;if(n==="__v_raw")return s===(o?l?Vi:tr:l?er:Zl).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(s)?t:void 0;const r=ee(t);if(!o){let a;if(r&&(a=Ei[n]))return a;if(n==="hasOwnProperty")return Oi}const i=Reflect.get(t,n,Pe(t)?t:s);if((ft(n)?Yl.has(n):Ri(n))||(o||Ue(t,"get",n),l))return i;if(Pe(i)){const a=r&&fs(n)?i:i.value;return o&&we(a)?Js(a):a}return we(i)?o?Js(i):Ln(i):i}}class Xl extends Ql{constructor(t=!1){super(!1,t)}set(t,n,s,o){let l=t[n];const r=ee(t)&&fs(n);if(!this._isShallow){const f=$t(l);if(!st(s)&&!$t(s)&&(l=ve(l),s=ve(s)),!r&&Pe(l)&&!Pe(s))return f||(l.value=s),!0}const i=r?Number(n)e,Gn=e=>Reflect.getPrototypeOf(e);function $i(e,t,n){return function(...s){const o=this.__v_raw,l=ve(o),r=on(l),i=e==="entries"||e===Symbol.iterator&&r,a=e==="keys"&&r,f=o[e](...s),u=n?zs:t?rn:pt;return!t&&Ue(l,"iterate",a?qs:Yt),Ve(Object.create(f),{next(){const{value:h,done:g}=f.next();return g?{value:h,done:g}:{value:i?[u(h[0]),u(h[1])]:u(h),done:g}}})}}function Wn(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function Mi(e,t){const n={get(o){const l=this.__v_raw,r=ve(l),i=ve(o);e||(wt(o,i)&&Ue(r,"get",o),Ue(r,"get",i));const{has:a}=Gn(r),f=t?zs:e?rn:pt;if(a.call(r,o))return f(l.get(o));if(a.call(r,i))return f(l.get(i));l!==r&&l.get(o)},get size(){const o=this.__v_raw;return!e&&Ue(ve(o),"iterate",Yt),o.size},has(o){const l=this.__v_raw,r=ve(l),i=ve(o);return e||(wt(o,i)&&Ue(r,"has",o),Ue(r,"has",i)),o===i?l.has(o):l.has(o)||l.has(i)},forEach(o,l){const r=this,i=r.__v_raw,a=ve(i),f=t?zs:e?rn:pt;return!e&&Ue(a,"iterate",Yt),i.forEach((u,h)=>o.call(l,f(u),f(h),r))}};return Ve(n,e?{add:Wn("add"),set:Wn("set"),delete:Wn("delete"),clear:Wn("clear")}:{add(o){const l=ve(this),r=Gn(l),i=ve(o),a=!t&&!st(o)&&!$t(o)?i:o;return r.has.call(l,a)||wt(o,a)&&r.has.call(l,o)||wt(i,a)&&r.has.call(l,i)||(l.add(a),Rt(l,"add",a,a)),this},set(o,l){!t&&!st(l)&&!$t(l)&&(l=ve(l));const r=ve(this),{has:i,get:a}=Gn(r);let f=i.call(r,o);f||(o=ve(o),f=i.call(r,o));const u=a.call(r,o);return r.set(o,l),f?wt(l,u)&&Rt(r,"set",o,l):Rt(r,"add",o,l),this},delete(o){const l=ve(this),{has:r,get:i}=Gn(l);let a=r.call(l,o);a||(o=ve(o),a=r.call(l,o)),i&&i.call(l,o);const f=l.delete(o);return a&&Rt(l,"delete",o,void 0),f},clear(){const o=ve(this),l=o.size!==0,r=o.clear();return l&&Rt(o,"clear",void 0,void 0),r}}),["keys","values","entries",Symbol.iterator].forEach(o=>{n[o]=$i(o,e,t)}),n}function go(e,t){const n=Mi(e,t);return(s,o,l)=>o==="__v_isReactive"?!e:o==="__v_isReadonly"?e:o==="__v_raw"?s:Reflect.get(be(n,o)&&o in s?n:s,o,l)}const Di={get:go(!1,!1)},Li={get:go(!1,!0)},ji={get:go(!0,!1)};const Zl=new WeakMap,er=new WeakMap,tr=new WeakMap,Vi=new WeakMap;function Fi(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Ln(e){return $t(e)?e:_o(e,!1,Pi,Di,Zl)}function nr(e){return _o(e,!1,Ni,Li,er)}function Js(e){return _o(e,!0,Ii,ji,tr)}function _o(e,t,n,s,o){if(!we(e)||e.__v_raw&&!(t&&e.__v_isReactive)||e.__v_skip||!Object.isExtensible(e))return e;const l=o.get(e);if(l)return l;const r=Fi(di(e));if(r===0)return e;const i=new Proxy(e,r===2?s:n);return o.set(e,i),i}function Pt(e){return $t(e)?Pt(e.__v_raw):!!(e&&e.__v_isReactive)}function $t(e){return!!(e&&e.__v_isReadonly)}function st(e){return!!(e&&e.__v_isShallow)}function gs(e){return e?!!e.__v_raw:!1}function ve(e){const t=e&&e.__v_raw;return t?ve(t):e}function yo(e){return!be(e,"__v_skip")&&Object.isExtensible(e)&&Ml(e,"__v_skip",!0),e}const pt=e=>we(e)?Ln(e):e,rn=e=>we(e)?Js(e):e;function Pe(e){return e?e.__v_isRef===!0:!1}function ne(e){return sr(e,!1)}function Ui(e){return sr(e,!0)}function sr(e,t){return Pe(e)?e:new Hi(e,t)}class Hi{constructor(t,n){this.dep=new vo,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:ve(t),this._value=n?t:pt(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){const n=this._rawValue,s=this.__v_isShallow||st(t)||$t(t);t=s?t:ve(t),wt(t,n)&&(this._rawValue=t,this._value=s?t:pt(t),this.dep.trigger())}}function kt(e){return Pe(e)?e.value:e}const Bi={get:(e,t,n)=>t==="__v_raw"?e:kt(Reflect.get(e,t,n)),set:(e,t,n,s)=>{const o=e[t];return Pe(o)&&!Pe(n)?(o.value=n,!0):Reflect.set(e,t,n,s)}};function or(e){return Pt(e)?e:new Proxy(e,Bi)}function Ki(e){const t=ee(e)?new Array(e.length):{};for(const n in e)t[n]=Wi(e,n);return t}class Gi{constructor(t,n,s){this._object=t,this._defaultValue=s,this.__v_isRef=!0,this._value=void 0,this._key=ft(n)?n:String(n),this._raw=ve(t);let o=!0,l=t;if(!ee(t)||ft(this._key)||!fs(this._key))do o=!gs(l)||st(l);while(o&&(l=l.__v_raw));this._shallow=o}get value(){let t=this._object[this._key];return this._shallow&&(t=kt(t)),this._value=t===void 0?this._defaultValue:t}set value(t){if(this._shallow&&Pe(this._raw[this._key])){const n=this._object[this._key];if(Pe(n)){n.value=t;return}}this._object[this._key]=t}get dep(){return Si(this._raw,this._key)}}function Wi(e,t,n){return new Gi(e,t,n)}class qi{constructor(t,n,s){this.fn=t,this.setter=n,this._value=void 0,this.dep=new vo(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Tn-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=s}notify(){if(this.flags|=16,!(this.flags&8)&&Se!==this)return Kl(this,!0),!0}get value(){const t=this.dep.track();return ql(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function zi(e,t,n=!1){let s,o;return oe(e)?s=e:(s=e.get,o=e.set),new qi(s,o,n)}const qn={},ts=new WeakMap;let zt;function Ji(e,t=!1,n=zt){if(n){let s=ts.get(n);s||ts.set(n,s=[]),s.push(e)}}function Yi(e,t,n=ke){const{immediate:s,deep:o,once:l,scheduler:r,augmentJob:i,call:a}=n,f=O=>o?O:st(O)||o===!1||o===0?Ot(O,1):Ot(O);let u,h,g,b,N=!1,P=!1;if(Pe(e)?(h=()=>e.value,N=st(e)):Pt(e)?(h=()=>f(e),N=!0):ee(e)?(P=!0,N=e.some(O=>Pt(O)||st(O)),h=()=>e.map(O=>{if(Pe(O))return O.value;if(Pt(O))return f(O);if(oe(O))return a?a(O,2):O()})):oe(e)?t?h=a?()=>a(e,2):e:h=()=>{if(g){It();try{g()}finally{Nt()}}const O=zt;zt=u;try{return a?a(e,3,[b]):e(b)}finally{zt=O}}:h=xt,t&&o){const O=h,j=o===!0?1/0:o;h=()=>Ot(O(),j)}const F=Ul(),q=()=>{u.stop(),F&&F.active&&co(F.effects,u)};if(l&&t){const O=t;t=(...j)=>{O(...j),q()}}let $=P?new Array(e.length).fill(qn):qn;const H=O=>{if(!(!(u.flags&1)||!u.dirty&&!O))if(t){const j=u.run();if(o||N||(P?j.some((z,ue)=>wt(z,$[ue])):wt(j,$))){g&&g();const z=zt;zt=u;try{const ue=[j,$===qn?void 0:P&&$[0]===qn?[]:$,b];$=j,a?a(t,3,ue):t(...ue)}finally{zt=z}}}else u.run()};return i&&i(H),u=new Hl(h),u.scheduler=r?()=>r(H,!1):H,b=O=>Ji(O,!1,u),g=u.onStop=()=>{const O=ts.get(u);if(O){if(a)a(O,4);else for(const j of O)j();ts.delete(u)}},t?s?H(!0):$=u.run():r?r(H.bind(null,!0),!0):u.run(),q.pause=u.pause.bind(u),q.resume=u.resume.bind(u),q.stop=q,q}function Ot(e,t=1/0,n){if(t<=0||!we(e)||e.__v_skip||(n=n||new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,Pe(e))Ot(e.value,t,n);else if(ee(e))for(let s=0;s{Ot(s,t,n)});else if($l(e)){for(const s in e)Ot(e[s],t,n);for(const s of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,s)&&Ot(e[s],t,n)}return e}/** +* @vue/runtime-core v3.5.35 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/function jn(e,t,n,s){try{return s?e(...s):e()}catch(o){_s(o,t,n)}}function mt(e,t,n,s){if(oe(e)){const o=jn(e,t,n,s);return o&&Il(o)&&o.catch(l=>{_s(l,t,n)}),o}if(ee(e)){const o=[];for(let l=0;l>>1,o=ze[s],l=In(o);l=In(n)?ze.push(e):ze.splice(Xi(t),0,e),e.flags|=1,rr()}}function rr(){ns||(ns=lr.then(ar))}function Zi(e){ee(e)?ln.push(...e):jt&&e.id===-1?jt.splice(tn+1,0,e):e.flags&1||(ln.push(e),e.flags|=1),rr()}function Mo(e,t,n=_t+1){for(;nIn(n)-In(s));if(ln.length=0,jt){jt.push(...t);return}for(jt=t,tn=0;tne.id==null?e.flags&2?-1:1/0:e.id;function ar(e){try{for(_t=0;_t{s._d&&rs(-1);const l=ss(t);let r;try{r=e(...o)}finally{ss(l),s._d&&rs(1)}return r};return s._n=!0,s._c=!0,s._d=!0,s}function je(e,t){if(tt===null)return e;const n=Cs(tt),s=e.dirs||(e.dirs=[]);for(let o=0;o1)return n&&oe(t)?t.call(s&&s.proxy):t}}function ea(){return!!(Mr()||Qt)}const ta=Symbol.for("v-scx"),na=()=>ct(ta);function kn(e,t,n){return ur(e,t,n)}function ur(e,t,n=ke){const{immediate:s,deep:o,flush:l,once:r}=n,i=Ve({},n),a=t&&s||!t&&l!=="post";let f;if($n){if(l==="sync"){const b=na();f=b.__watcherHandles||(b.__watcherHandles=[])}else if(!a){const b=()=>{};return b.stop=xt,b.resume=xt,b.pause=xt,b}}const u=He;i.call=(b,N,P)=>mt(b,u,N,P);let h=!1;l==="post"?i.scheduler=b=>{Ye(b,u&&u.suspense)}:l!=="sync"&&(h=!0,i.scheduler=(b,N)=>{N?b():bo(b)}),i.augmentJob=b=>{t&&(b.flags|=4),h&&(b.flags|=2,u&&(b.id=u.uid,b.i=u))};const g=Yi(e,t,i);return $n&&(f?f.push(g):a&&g()),g}function sa(e,t,n){const s=this.proxy,o=Te(e)?e.includes(".")?fr(s,e):()=>s[e]:e.bind(s,s);let l;oe(t)?l=t:(l=t.handler,n=t);const r=Fn(this),i=ur(o,l.bind(s),n);return r(),i}function fr(e,t){const n=t.split(".");return()=>{let s=e;for(let o=0;oe.__isTeleport,Ms=Symbol("_leaveCb");function wo(e,t){e.shapeFlag&6&&e.component?(e.transition=t,wo(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function dr(e,t){return oe(e)?Ve({name:e.name},t,{setup:e}):e}function hr(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function Do(e,t){let n;return!!((n=Object.getOwnPropertyDescriptor(e,t))&&!n.configurable)}const os=new WeakMap;function Cn(e,t,n,s,o=!1){if(ee(e)){e.forEach((P,F)=>Cn(P,t&&(ee(t)?t[F]:t),n,s,o));return}if(Sn(s)&&!o){s.shapeFlag&512&&s.type.__asyncResolved&&s.component.subTree.component&&Cn(e,t,n,s.component.subTree);return}const l=s.shapeFlag&4?Cs(s.component):s.el,r=o?null:l,{i,r:a}=e,f=t&&t.r,u=i.refs===ke?i.refs={}:i.refs,h=i.setupState,g=ve(h),b=h===ke?Pl:P=>Do(u,P)?!1:be(g,P),N=(P,F)=>!(F&&Do(u,F));if(f!=null&&f!==a){if(Lo(t),Te(f))u[f]=null,b(f)&&(h[f]=null);else if(Pe(f)){const P=t;N(f,P.k)&&(f.value=null),P.k&&(u[P.k]=null)}}if(oe(a))jn(a,i,12,[r,u]);else{const P=Te(a),F=Pe(a);if(P||F){const q=()=>{if(e.f){const $=P?b(a)?h[a]:u[a]:N()||!e.k?a.value:u[e.k];if(o)ee($)&&co($,l);else if(ee($))$.includes(l)||$.push(l);else if(P)u[a]=[l],b(a)&&(h[a]=u[a]);else{const H=[l];N(a,e.k)&&(a.value=H),e.k&&(u[e.k]=H)}}else P?(u[a]=r,b(a)&&(h[a]=r)):F&&(N(a,e.k)&&(a.value=r),e.k&&(u[e.k]=r))};if(r){const $=()=>{q(),os.delete(e)};$.id=-1,os.set(e,$),Ye($,n)}else Lo(e),q()}}}function Lo(e){const t=os.get(e);t&&(t.flags|=8,os.delete(e))}ms().requestIdleCallback;ms().cancelIdleCallback;const Sn=e=>!!e.type.__asyncLoader,pr=e=>e.type.__isKeepAlive;function ra(e,t){mr(e,"a",t)}function ia(e,t){mr(e,"da",t)}function mr(e,t,n=He){const s=e.__wdc||(e.__wdc=()=>{let o=n;for(;o;){if(o.isDeactivated)return;o=o.parent}return e()});if(ys(t,s,n),n){let o=n.parent;for(;o&&o.parent;)pr(o.parent.vnode)&&aa(s,t,n,o),o=o.parent}}function aa(e,t,n,s){const o=ys(t,e,s,!0);ws(()=>{co(s[t],o)},n)}function ys(e,t,n=He,s=!1){if(n){const o=n[e]||(n[e]=[]),l=t.__weh||(t.__weh=(...r)=>{It();const i=Fn(n),a=mt(t,n,e,r);return i(),Nt(),a});return s?o.unshift(l):o.push(l),l}}const Mt=e=>(t,n=He)=>{(!$n||e==="sp")&&ys(e,(...s)=>t(...s),n)},ca=Mt("bm"),bs=Mt("m"),ua=Mt("bu"),fa=Mt("u"),da=Mt("bum"),ws=Mt("um"),ha=Mt("sp"),pa=Mt("rtg"),ma=Mt("rtc");function va(e,t=He){ys("ec",e,t)}const ga="components";function jo(e,t){return ya(ga,e,!0,t)||e}const _a=Symbol.for("v-ndc");function ya(e,t,n=!0,s=!1){const o=tt||He;if(o){const l=o.type;{const i=oc(l,!1);if(i&&(i===t||i===Je(t)||i===hs(Je(t))))return l}const r=Vo(o[e]||l[e],t)||Vo(o.appContext[e],t);return!r&&s?l:r}}function Vo(e,t){return e&&(e[t]||e[Je(t)]||e[hs(Je(t))])}function me(e,t,n,s){let o;const l=n,r=ee(e);if(r||Te(e)){const i=r&&Pt(e);let a=!1,f=!1;i&&(a=!st(e),f=$t(e),e=vs(e)),o=new Array(e.length);for(let u=0,h=e.length;ut(i,a,void 0,l));else{const i=Object.keys(e);o=new Array(i.length);for(let a=0,f=i.length;ae?Dr(e)?Cs(e):Ys(e.parent):null,En=Ve(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>Ys(e.parent),$root:e=>Ys(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>gr(e),$forceUpdate:e=>e.f||(e.f=()=>{bo(e.update)}),$nextTick:e=>e.n||(e.n=Vn.bind(e.proxy)),$watch:e=>sa.bind(e)}),Ds=(e,t)=>e!==ke&&!e.__isScriptSetup&&be(e,t),ba={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:s,data:o,props:l,accessCache:r,type:i,appContext:a}=e;if(t[0]!=="$"){const g=r[t];if(g!==void 0)switch(g){case 1:return s[t];case 2:return o[t];case 4:return n[t];case 3:return l[t]}else{if(Ds(s,t))return r[t]=1,s[t];if(o!==ke&&be(o,t))return r[t]=2,o[t];if(be(l,t))return r[t]=3,l[t];if(n!==ke&&be(n,t))return r[t]=4,n[t];Qs&&(r[t]=0)}}const f=En[t];let u,h;if(f)return t==="$attrs"&&Ue(e.attrs,"get",""),f(e);if((u=i.__cssModules)&&(u=u[t]))return u;if(n!==ke&&be(n,t))return r[t]=4,n[t];if(h=a.config.globalProperties,be(h,t))return h[t]},set({_:e},t,n){const{data:s,setupState:o,ctx:l}=e;return Ds(o,t)?(o[t]=n,!0):s!==ke&&be(s,t)?(s[t]=n,!0):be(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(l[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:s,appContext:o,props:l,type:r}},i){let a;return!!(n[i]||e!==ke&&i[0]!=="$"&&be(e,i)||Ds(t,i)||be(l,i)||be(s,i)||be(En,i)||be(o.config.globalProperties,i)||(a=r.__cssModules)&&a[i])},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:be(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function Fo(e){return ee(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}let Qs=!0;function wa(e){const t=gr(e),n=e.proxy,s=e.ctx;Qs=!1,t.beforeCreate&&Uo(t.beforeCreate,e,"bc");const{data:o,computed:l,methods:r,watch:i,provide:a,inject:f,created:u,beforeMount:h,mounted:g,beforeUpdate:b,updated:N,activated:P,deactivated:F,beforeDestroy:q,beforeUnmount:$,destroyed:H,unmounted:O,render:j,renderTracked:z,renderTriggered:ue,errorCaptured:le,serverPrefetch:re,expose:B,inheritAttrs:J,components:he,directives:X,filters:Ce}=t;if(f&&xa(f,s,null),r)for(const te in r){const fe=r[te];oe(fe)&&(s[te]=fe.bind(n))}if(o){const te=o.call(n,n);we(te)&&(e.data=Ln(te))}if(Qs=!0,l)for(const te in l){const fe=l[te],dt=oe(fe)?fe.bind(n,n):oe(fe.get)?fe.get.bind(n,n):xt,Xe=!oe(fe)&&oe(fe.set)?fe.set.bind(n):xt,Ze=_e({get:dt,set:Xe});Object.defineProperty(s,te,{enumerable:!0,configurable:!0,get:()=>Ze.value,set:Fe=>Ze.value=Fe})}if(i)for(const te in i)vr(i[te],s,n,te);if(a){const te=oe(a)?a.call(n):a;Reflect.ownKeys(te).forEach(fe=>{Qn(fe,te[fe])})}u&&Uo(u,e,"c");function xe(te,fe){ee(fe)?fe.forEach(dt=>te(dt.bind(n))):fe&&te(fe.bind(n))}if(xe(ca,h),xe(bs,g),xe(ua,b),xe(fa,N),xe(ra,P),xe(ia,F),xe(va,le),xe(ma,z),xe(pa,ue),xe(da,$),xe(ws,O),xe(ha,re),ee(B))if(B.length){const te=e.exposed||(e.exposed={});B.forEach(fe=>{Object.defineProperty(te,fe,{get:()=>n[fe],set:dt=>n[fe]=dt,enumerable:!0})})}else e.exposed||(e.exposed={});j&&e.render===xt&&(e.render=j),J!=null&&(e.inheritAttrs=J),he&&(e.components=he),X&&(e.directives=X),re&&hr(e)}function xa(e,t,n=xt){ee(e)&&(e=Xs(e));for(const s in e){const o=e[s];let l;we(o)?"default"in o?l=ct(o.from||s,o.default,!0):l=ct(o.from||s):l=ct(o),Pe(l)?Object.defineProperty(t,s,{enumerable:!0,configurable:!0,get:()=>l.value,set:r=>l.value=r}):t[s]=l}}function Uo(e,t,n){mt(ee(e)?e.map(s=>s.bind(t.proxy)):e.bind(t.proxy),t,n)}function vr(e,t,n,s){let o=s.includes(".")?fr(n,s):()=>n[s];if(Te(e)){const l=t[e];oe(l)&&kn(o,l)}else if(oe(e))kn(o,e.bind(n));else if(we(e))if(ee(e))e.forEach(l=>vr(l,t,n,s));else{const l=oe(e.handler)?e.handler.bind(n):t[e.handler];oe(l)&&kn(o,l,e)}}function gr(e){const t=e.type,{mixins:n,extends:s}=t,{mixins:o,optionsCache:l,config:{optionMergeStrategies:r}}=e.appContext,i=l.get(t);let a;return i?a=i:!o.length&&!n&&!s?a=t:(a={},o.length&&o.forEach(f=>ls(a,f,r,!0)),ls(a,t,r)),we(t)&&l.set(t,a),a}function ls(e,t,n,s=!1){const{mixins:o,extends:l}=t;l&&ls(e,l,n,!0),o&&o.forEach(r=>ls(e,r,n,!0));for(const r in t)if(!(s&&r==="expose")){const i=ka[r]||n&&n[r];e[r]=i?i(e[r],t[r]):t[r]}return e}const ka={data:Ho,props:Bo,emits:Bo,methods:_n,computed:_n,beforeCreate:We,created:We,beforeMount:We,mounted:We,beforeUpdate:We,updated:We,beforeDestroy:We,beforeUnmount:We,destroyed:We,unmounted:We,activated:We,deactivated:We,errorCaptured:We,serverPrefetch:We,components:_n,directives:_n,watch:Sa,provide:Ho,inject:Ca};function Ho(e,t){return t?e?function(){return Ve(oe(e)?e.call(this,this):e,oe(t)?t.call(this,this):t)}:t:e}function Ca(e,t){return _n(Xs(e),Xs(t))}function Xs(e){if(ee(e)){const t={};for(let n=0;nt==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${Je(t)}Modifiers`]||e[`${Kt(t)}Modifiers`];function Oa(e,t,...n){if(e.isUnmounted)return;const s=e.vnode.props||ke;let o=n;const l=t.startsWith("update:"),r=l&&Ra(s,t.slice(7));r&&(r.trim&&(o=n.map(u=>Te(u)?u.trim():u)),r.number&&(o=n.map(ps)));let i,a=s[i=Ts(t)]||s[i=Ts(Je(t))];!a&&l&&(a=s[i=Ts(Kt(t))]),a&&mt(a,e,6,o);const f=s[i+"Once"];if(f){if(!e.emitted)e.emitted={};else if(e.emitted[i])return;e.emitted[i]=!0,mt(f,e,6,o)}}const Ta=new WeakMap;function yr(e,t,n=!1){const s=n?Ta:t.emitsCache,o=s.get(e);if(o!==void 0)return o;const l=e.emits;let r={},i=!1;if(!oe(e)){const a=f=>{const u=yr(f,t,!0);u&&(i=!0,Ve(r,u))};!n&&t.mixins.length&&t.mixins.forEach(a),e.extends&&a(e.extends),e.mixins&&e.mixins.forEach(a)}return!l&&!i?(we(e)&&s.set(e,null),null):(ee(l)?l.forEach(a=>r[a]=null):Ve(r,l),we(e)&&s.set(e,r),r)}function xs(e,t){return!e||!cs(t)?!1:(t=t.slice(2).replace(/Once$/,""),be(e,t[0].toLowerCase()+t.slice(1))||be(e,Kt(t))||be(e,t))}function Ko(e){const{type:t,vnode:n,proxy:s,withProxy:o,propsOptions:[l],slots:r,attrs:i,emit:a,render:f,renderCache:u,props:h,data:g,setupState:b,ctx:N,inheritAttrs:P}=e,F=ss(e);let q,$;try{if(n.shapeFlag&4){const O=o||s,j=O;q=bt(f.call(j,O,u,h,b,g,N)),$=i}else{const O=t;q=bt(O.length>1?O(h,{attrs:i,slots:r,emit:a}):O(h,null)),$=t.props?i:Pa(i)}}catch(O){An.length=0,_s(O,e,1),q=Le(Ht)}let H=q;if($&&P!==!1){const O=Object.keys($),{shapeFlag:j}=H;O.length&&j&7&&(l&&O.some(us)&&($=Ia($,l)),H=an(H,$,!1,!0))}return n.dirs&&(H=an(H,null,!1,!0),H.dirs=H.dirs?H.dirs.concat(n.dirs):n.dirs),n.transition&&wo(H,n.transition),q=H,ss(F),q}const Pa=e=>{let t;for(const n in e)(n==="class"||n==="style"||cs(n))&&((t||(t={}))[n]=e[n]);return t},Ia=(e,t)=>{const n={};for(const s in e)(!us(s)||!(s.slice(9)in t))&&(n[s]=e[s]);return n};function Na(e,t,n){const{props:s,children:o,component:l}=e,{props:r,children:i,patchFlag:a}=t,f=l.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&a>=0){if(a&1024)return!0;if(a&16)return s?Go(s,r,f):!!r;if(a&8){const u=t.dynamicProps;for(let h=0;hObject.create(wr),kr=e=>Object.getPrototypeOf(e)===wr;function Ma(e,t,n,s=!1){const o={},l=xr();e.propsDefaults=Object.create(null),Cr(e,t,o,l);for(const r in e.propsOptions[0])r in o||(o[r]=void 0);n?e.props=s?o:nr(o):e.type.props?e.props=o:e.props=l,e.attrs=l}function Da(e,t,n,s){const{props:o,attrs:l,vnode:{patchFlag:r}}=e,i=ve(o),[a]=e.propsOptions;let f=!1;if((s||r>0)&&!(r&16)){if(r&8){const u=e.vnode.dynamicProps;for(let h=0;h{a=!0;const[g,b]=Sr(h,t,!0);Ve(r,g),b&&i.push(...b)};!n&&t.mixins.length&&t.mixins.forEach(u),e.extends&&u(e.extends),e.mixins&&e.mixins.forEach(u)}if(!l&&!a)return we(e)&&s.set(e,sn),sn;if(ee(l))for(let u=0;ue==="_"||e==="_ctx"||e==="$stable",ko=e=>ee(e)?e.map(bt):[bt(e)],ja=(e,t,n)=>{if(t._n)return t;const s=Yn((...o)=>ko(t(...o)),n);return s._c=!1,s},Er=(e,t,n)=>{const s=e._ctx;for(const o in e){if(xo(o))continue;const l=e[o];if(oe(l))t[o]=ja(o,l,s);else if(l!=null){const r=ko(l);t[o]=()=>r}}},Ar=(e,t)=>{const n=ko(t);e.slots.default=()=>n},Rr=(e,t,n)=>{for(const s in t)(n||!xo(s))&&(e[s]=t[s])},Va=(e,t,n)=>{const s=e.slots=xr();if(e.vnode.shapeFlag&32){const o=t._;o?(Rr(s,t,n),n&&Ml(s,"_",o,!0)):Er(t,s)}else t&&Ar(e,t)},Fa=(e,t,n)=>{const{vnode:s,slots:o}=e;let l=!0,r=ke;if(s.shapeFlag&32){const i=t._;i?n&&i===1?l=!1:Rr(o,t,n):(l=!t.$stable,Er(t,o)),r=t}else t&&(Ar(e,t),r={default:1});if(l)for(const i in o)!xo(i)&&r[i]==null&&delete o[i]},Ye=Ga;function Ua(e){return Ha(e)}function Ha(e,t){const n=ms();n.__VUE__=!0;const{insert:s,remove:o,patchProp:l,createElement:r,createText:i,createComment:a,setText:f,setElementText:u,parentNode:h,nextSibling:g,setScopeId:b=xt,insertStaticContent:N}=e,P=(d,m,_,x=null,E=null,w=null,M=void 0,T=null,I=!!m.dynamicChildren)=>{if(d===m)return;d&&!vn(d,m)&&(x=S(d),Fe(d,E,w,!0),d=null),m.patchFlag===-2&&(I=!1,m.dynamicChildren=null);const{type:A,ref:Y,shapeFlag:V}=m;switch(A){case ks:F(d,m,_,x);break;case Ht:q(d,m,_,x);break;case js:d==null&&$(m,_,x,M);break;case Z:he(d,m,_,x,E,w,M,T,I);break;default:V&1?j(d,m,_,x,E,w,M,T,I):V&6?X(d,m,_,x,E,w,M,T,I):(V&64||V&128)&&A.process(d,m,_,x,E,w,M,T,I,W)}Y!=null&&E?Cn(Y,d&&d.ref,w,m||d,!m):Y==null&&d&&d.ref!=null&&Cn(d.ref,null,w,d,!0)},F=(d,m,_,x)=>{if(d==null)s(m.el=i(m.children),_,x);else{const E=m.el=d.el;m.children!==d.children&&f(E,m.children)}},q=(d,m,_,x)=>{d==null?s(m.el=a(m.children||""),_,x):m.el=d.el},$=(d,m,_,x)=>{[d.el,d.anchor]=N(d.children,m,_,x,d.el,d.anchor)},H=({el:d,anchor:m},_,x)=>{let E;for(;d&&d!==m;)E=g(d),s(d,_,x),d=E;s(m,_,x)},O=({el:d,anchor:m})=>{let _;for(;d&&d!==m;)_=g(d),o(d),d=_;o(m)},j=(d,m,_,x,E,w,M,T,I)=>{if(m.type==="svg"?M="svg":m.type==="math"&&(M="mathml"),d==null)z(m,_,x,E,w,M,T,I);else{const A=d.el&&d.el._isVueCE?d.el:null;try{A&&A._beginPatch(),re(d,m,E,w,M,T,I)}finally{A&&A._endPatch()}}},z=(d,m,_,x,E,w,M,T)=>{let I,A;const{props:Y,shapeFlag:V,transition:G,dirs:Q}=d;if(I=d.el=r(d.type,w,Y&&Y.is,Y),V&8?u(I,d.children):V&16&&le(d.children,I,null,x,E,Ls(d,w),M,T),Q&&Wt(d,null,x,"created"),ue(I,d,d.scopeId,M,x),Y){for(const se in Y)se!=="value"&&!bn(se)&&l(I,se,null,Y[se],w,x);"value"in Y&&l(I,"value",null,Y.value,w),(A=Y.onVnodeBeforeMount)&>(A,x,d)}Q&&Wt(d,null,x,"beforeMount");const ie=Ba(E,G);ie&&G.beforeEnter(I),s(I,m,_),((A=Y&&Y.onVnodeMounted)||ie||Q)&&Ye(()=>{try{A&>(A,x,d),ie&&G.enter(I),Q&&Wt(d,null,x,"mounted")}finally{}},E)},ue=(d,m,_,x,E)=>{if(_&&b(d,_),x)for(let w=0;w{for(let A=I;A{const T=m.el=d.el;let{patchFlag:I,dynamicChildren:A,dirs:Y}=m;I|=d.patchFlag&16;const V=d.props||ke,G=m.props||ke;let Q;if(_&&qt(_,!1),(Q=G.onVnodeBeforeUpdate)&>(Q,_,m,d),Y&&Wt(m,d,_,"beforeUpdate"),_&&qt(_,!0),(V.innerHTML&&G.innerHTML==null||V.textContent&&G.textContent==null)&&u(T,""),A?B(d.dynamicChildren,A,T,_,x,Ls(m,E),w):M||fe(d,m,T,null,_,x,Ls(m,E),w,!1),I>0){if(I&16)J(T,V,G,_,E);else if(I&2&&V.class!==G.class&&l(T,"class",null,G.class,E),I&4&&l(T,"style",V.style,G.style,E),I&8){const ie=m.dynamicProps;for(let se=0;se{Q&>(Q,_,m,d),Y&&Wt(m,d,_,"updated")},x)},B=(d,m,_,x,E,w,M)=>{for(let T=0;T{if(m!==_){if(m!==ke)for(const w in m)!bn(w)&&!(w in _)&&l(d,w,m[w],null,E,x);for(const w in _){if(bn(w))continue;const M=_[w],T=m[w];M!==T&&w!=="value"&&l(d,w,T,M,E,x)}"value"in _&&l(d,"value",m.value,_.value,E)}},he=(d,m,_,x,E,w,M,T,I)=>{const A=m.el=d?d.el:i(""),Y=m.anchor=d?d.anchor:i("");let{patchFlag:V,dynamicChildren:G,slotScopeIds:Q}=m;Q&&(T=T?T.concat(Q):Q),d==null?(s(A,_,x),s(Y,_,x),le(m.children||[],_,Y,E,w,M,T,I)):V>0&&V&64&&G&&d.dynamicChildren&&d.dynamicChildren.length===G.length?(B(d.dynamicChildren,G,_,E,w,M,T),(m.key!=null||E&&m===E.subTree)&&Or(d,m,!0)):fe(d,m,_,Y,E,w,M,T,I)},X=(d,m,_,x,E,w,M,T,I)=>{m.slotScopeIds=T,d==null?m.shapeFlag&512?E.ctx.activate(m,_,x,M,I):Ce(m,_,x,E,w,M,I):Ie(d,m,I)},Ce=(d,m,_,x,E,w,M)=>{const T=d.component=Za(d,x,E);if(pr(d)&&(T.ctx.renderer=W),ec(T,!1,M),T.asyncDep){if(E&&E.registerDep(T,xe,M),!d.el){const I=T.subTree=Le(Ht);q(null,I,m,_),d.placeholder=I.el}}else xe(T,d,m,_,E,w,M)},Ie=(d,m,_)=>{const x=m.component=d.component;if(Na(d,m,_))if(x.asyncDep&&!x.asyncResolved){te(x,m,_);return}else x.next=m,x.update();else m.el=d.el,x.vnode=m},xe=(d,m,_,x,E,w,M)=>{const T=()=>{if(d.isMounted){let{next:V,bu:G,u:Q,parent:ie,vnode:se}=d;{const rt=Tr(d);if(rt){V&&(V.el=se.el,te(d,V,M)),rt.asyncDep.then(()=>{Ye(()=>{d.isUnmounted||A()},E)});return}}let pe=V,Ae;qt(d,!1),V?(V.el=se.el,te(d,V,M)):V=se,G&&Jn(G),(Ae=V.props&&V.props.onVnodeBeforeUpdate)&>(Ae,ie,V,se),qt(d,!0);const Re=Ko(d),lt=d.subTree;d.subTree=Re,P(lt,Re,h(lt.el),S(lt),d,E,w),V.el=Re.el,pe===null&&$a(d,Re.el),Q&&Ye(Q,E),(Ae=V.props&&V.props.onVnodeUpdated)&&Ye(()=>gt(Ae,ie,V,se),E)}else{let V;const{el:G,props:Q}=m,{bm:ie,m:se,parent:pe,root:Ae,type:Re}=d,lt=Sn(m);qt(d,!1),ie&&Jn(ie),!lt&&(V=Q&&Q.onVnodeBeforeMount)&>(V,pe,m),qt(d,!0);{Ae.ce&&Ae.ce._hasShadowRoot()&&Ae.ce._injectChildStyle(Re,d.parent?d.parent.type:void 0);const rt=d.subTree=Ko(d);P(null,rt,_,x,d,E,w),m.el=rt.el}if(se&&Ye(se,E),!lt&&(V=Q&&Q.onVnodeMounted)){const rt=m;Ye(()=>gt(V,pe,rt),E)}(m.shapeFlag&256||pe&&Sn(pe.vnode)&&pe.vnode.shapeFlag&256)&&d.a&&Ye(d.a,E),d.isMounted=!0,m=_=x=null}};d.scope.on();const I=d.effect=new Hl(T);d.scope.off();const A=d.update=I.run.bind(I),Y=d.job=I.runIfDirty.bind(I);Y.i=d,Y.id=d.uid,I.scheduler=()=>bo(Y),qt(d,!0),A()},te=(d,m,_)=>{m.component=d;const x=d.vnode.props;d.vnode=m,d.next=null,Da(d,m.props,x,_),Fa(d,m.children,_),It(),Mo(d),Nt()},fe=(d,m,_,x,E,w,M,T,I=!1)=>{const A=d&&d.children,Y=d?d.shapeFlag:0,V=m.children,{patchFlag:G,shapeFlag:Q}=m;if(G>0){if(G&128){Xe(A,V,_,x,E,w,M,T,I);return}else if(G&256){dt(A,V,_,x,E,w,M,T,I);return}}Q&8?(Y&16&&Ne(A,E,w),V!==A&&u(_,V)):Y&16?Q&16?Xe(A,V,_,x,E,w,M,T,I):Ne(A,E,w,!0):(Y&8&&u(_,""),Q&16&&le(V,_,x,E,w,M,T,I))},dt=(d,m,_,x,E,w,M,T,I)=>{d=d||sn,m=m||sn;const A=d.length,Y=m.length,V=Math.min(A,Y);let G;for(G=0;GY?Ne(d,E,w,!0,!1,V):le(m,_,x,E,w,M,T,I,V)},Xe=(d,m,_,x,E,w,M,T,I)=>{let A=0;const Y=m.length;let V=d.length-1,G=Y-1;for(;A<=V&&A<=G;){const Q=d[A],ie=m[A]=I?At(m[A]):bt(m[A]);if(vn(Q,ie))P(Q,ie,_,null,E,w,M,T,I);else break;A++}for(;A<=V&&A<=G;){const Q=d[V],ie=m[G]=I?At(m[G]):bt(m[G]);if(vn(Q,ie))P(Q,ie,_,null,E,w,M,T,I);else break;V--,G--}if(A>V){if(A<=G){const Q=G+1,ie=QG)for(;A<=V;)Fe(d[A],E,w,!0),A++;else{const Q=A,ie=A,se=new Map;for(A=ie;A<=G;A++){const Ge=m[A]=I?At(m[A]):bt(m[A]);Ge.key!=null&&se.set(Ge.key,A)}let pe,Ae=0;const Re=G-ie+1;let lt=!1,rt=0;const Gt=new Array(Re);for(A=0;A=Re){Fe(Ge,E,w,!0);continue}let it;if(Ge.key!=null)it=se.get(Ge.key);else for(pe=ie;pe<=G;pe++)if(Gt[pe-ie]===0&&vn(Ge,m[pe])){it=pe;break}it===void 0?Fe(Ge,E,w,!0):(Gt[it-ie]=A+1,it>=rt?rt=it:lt=!0,P(Ge,m[it],_,null,E,w,M,T,I),Ae++)}const Hn=lt?Ka(Gt):sn;for(pe=Hn.length-1,A=Re-1;A>=0;A--){const Ge=ie+A,it=m[Ge],Bn=m[Ge+1],Kn=Ge+1{const{el:w,type:M,transition:T,children:I,shapeFlag:A}=d;if(A&6){Ze(d.component.subTree,m,_,x);return}if(A&128){d.suspense.move(m,_,x);return}if(A&64){M.move(d,m,_,W);return}if(M===Z){s(w,m,_);for(let V=0;VT.enter(w),E));else{const{leave:V,delayLeave:G,afterLeave:Q}=T,ie=()=>{d.ctx.isUnmounted?o(w):s(w,m,_)},se=()=>{const pe=w._isLeaving||!!w[Ms];w._isLeaving&&w[Ms](!0),T.persisted&&!pe?ie():V(w,()=>{ie(),Q&&Q()})};G?G(w,ie,se):se()}else s(w,m,_)},Fe=(d,m,_,x=!1,E=!1)=>{const{type:w,props:M,ref:T,children:I,dynamicChildren:A,shapeFlag:Y,patchFlag:V,dirs:G,cacheIndex:Q,memo:ie}=d;if(V===-2&&(E=!1),T!=null&&(It(),Cn(T,null,_,d,!0),Nt()),Q!=null&&(m.renderCache[Q]=void 0),Y&256){m.ctx.deactivate(d);return}const se=Y&1&&G,pe=!Sn(d);let Ae;if(pe&&(Ae=M&&M.onVnodeBeforeUnmount)&>(Ae,m,d),Y&6)Ke(d.component,_,x);else{if(Y&128){d.suspense.unmount(_,x);return}se&&Wt(d,null,m,"beforeUnmount"),Y&64?d.type.remove(d,m,_,W,x):A&&!A.hasOnce&&(w!==Z||V>0&&V&64)?Ne(A,m,_,!1,!0):(w===Z&&V&384||!E&&Y&16)&&Ne(I,m,_),x&&Be(d)}const Re=ie!=null&&Q==null;(pe&&(Ae=M&&M.onVnodeUnmounted)||se||Re)&&Ye(()=>{Ae&>(Ae,m,d),se&&Wt(d,null,m,"unmounted"),Re&&(d.el=null)},_)},Be=d=>{const{type:m,el:_,anchor:x,transition:E}=d;if(m===Z){ot(_,x);return}if(m===js){O(d);return}const w=()=>{o(_),E&&!E.persisted&&E.afterLeave&&E.afterLeave()};if(d.shapeFlag&1&&E&&!E.persisted){const{leave:M,delayLeave:T}=E,I=()=>M(_,w);T?T(d.el,w,I):I()}else w()},ot=(d,m)=>{let _;for(;d!==m;)_=g(d),o(d),d=_;o(m)},Ke=(d,m,_)=>{const{bum:x,scope:E,job:w,subTree:M,um:T,m:I,a:A}=d;qo(I),qo(A),x&&Jn(x),E.stop(),w&&(w.flags|=8,Fe(M,d,m,_)),T&&Ye(T,m),Ye(()=>{d.isUnmounted=!0},m)},Ne=(d,m,_,x=!1,E=!1,w=0)=>{for(let M=w;M{if(d.shapeFlag&6)return S(d.component.subTree);if(d.shapeFlag&128)return d.suspense.next();const m=g(d.anchor||d.el),_=m&&m[oa];return _?g(_):m};let U=!1;const L=(d,m,_)=>{let x;d==null?m._vnode&&(Fe(m._vnode,null,null,!0),x=m._vnode.component):P(m._vnode||null,d,m,null,null,null,_),m._vnode=d,U||(U=!0,Mo(x),ir(),U=!1)},W={p:P,um:Fe,m:Ze,r:Be,mt:Ce,mc:le,pc:fe,pbc:B,n:S,o:e};return{render:L,hydrate:void 0,createApp:Aa(L)}}function Ls({type:e,props:t},n){return n==="svg"&&e==="foreignObject"||n==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function qt({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function Ba(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function Or(e,t,n=!1){const s=e.children,o=t.children;if(ee(s)&&ee(o))for(let l=0;l>1,e[n[i]]0&&(t[s]=n[l-1]),n[l]=s)}}for(l=n.length,r=n[l-1];l-- >0;)n[l]=r,r=t[r];return n}function Tr(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Tr(t)}function qo(e){if(e)for(let t=0;te.__isSuspense;function Ga(e,t){t&&t.pendingBranch?ee(e)?t.effects.push(...e):t.effects.push(e):Zi(e)}const Z=Symbol.for("v-fgt"),ks=Symbol.for("v-txt"),Ht=Symbol.for("v-cmt"),js=Symbol.for("v-stc"),An=[];let nt=null;function k(e=!1){An.push(nt=e?null:[])}function Wa(){An.pop(),nt=An[An.length-1]||null}let Nn=1;function rs(e,t=!1){Nn+=e,e<0&&nt&&t&&(nt.hasOnce=!0)}function Nr(e){return e.dynamicChildren=Nn>0?nt||sn:null,Wa(),Nn>0&&nt&&nt.push(e),e}function C(e,t,n,s,o,l){return Nr(c(e,t,n,s,o,l,!0))}function qa(e,t,n,s,o){return Nr(Le(e,t,n,s,o,!0))}function is(e){return e?e.__v_isVNode===!0:!1}function vn(e,t){return e.type===t.type&&e.key===t.key}const $r=({key:e})=>e??null,Xn=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?Te(e)||Pe(e)||oe(e)?{i:tt,r:e,k:t,f:!!n}:e:null);function c(e,t=null,n=null,s=0,o=null,l=e===Z?0:1,r=!1,i=!1){const a={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&$r(t),ref:t&&Xn(t),scopeId:cr,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:l,patchFlag:s,dynamicProps:o,dynamicChildren:null,appContext:null,ctx:tt};return i?(Co(a,n),l&128&&e.normalize(a)):n&&(a.shapeFlag|=Te(n)?8:16),Nn>0&&!r&&nt&&(a.patchFlag>0||l&6)&&a.patchFlag!==32&&nt.push(a),a}const Le=za;function za(e,t=null,n=null,s=0,o=null,l=!1){if((!e||e===_a)&&(e=Ht),is(e)){const i=an(e,t,!0);return n&&Co(i,n),Nn>0&&!l&&nt&&(i.shapeFlag&6?nt[nt.indexOf(e)]=i:nt.push(i)),i.patchFlag=-2,i}if(lc(e)&&(e=e.__vccOpts),t){t=Ja(t);let{class:i,style:a}=t;i&&!Te(i)&&(t.class=Qe(i)),we(a)&&(gs(a)&&!ee(a)&&(a=Ve({},a)),t.style=uo(a))}const r=Te(e)?1:Ir(e)?128:la(e)?64:we(e)?4:oe(e)?2:0;return c(e,t,n,s,o,r,l,!0)}function Ja(e){return e?gs(e)||kr(e)?Ve({},e):e:null}function an(e,t,n=!1,s=!1){const{props:o,ref:l,patchFlag:r,children:i,transition:a}=e,f=t?Ya(o||{},t):o,u={__v_isVNode:!0,__v_skip:!0,type:e.type,props:f,key:f&&$r(f),ref:t&&t.ref?n&&l?ee(l)?l.concat(Xn(t)):[l,Xn(t)]:Xn(t):l,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:i,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==Z?r===-1?16:r|16:r,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:a,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&an(e.ssContent),ssFallback:e.ssFallback&&an(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return a&&s&&wo(u,a.clone(u)),u}function ge(e=" ",t=0){return Le(ks,null,e,t)}function Ee(e="",t=!1){return t?(k(),qa(Ht,null,e)):Le(Ht,null,e)}function bt(e){return e==null||typeof e=="boolean"?Le(Ht):ee(e)?Le(Z,null,e.slice()):is(e)?At(e):Le(ks,null,String(e))}function At(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:an(e)}function Co(e,t){let n=0;const{shapeFlag:s}=e;if(t==null)t=null;else if(ee(t))n=16;else if(typeof t=="object")if(s&65){const o=t.default;o&&(o._c&&(o._d=!1),Co(e,o()),o._c&&(o._d=!0));return}else{n=32;const o=t._;!o&&!kr(t)?t._ctx=tt:o===3&&tt&&(tt.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else oe(t)?(t={default:t,_ctx:tt},n=32):(t=String(t),s&64?(n=16,t=[ge(t)]):n=8);e.children=t,e.shapeFlag|=n}function Ya(...e){const t={};for(let n=0;nHe||tt;let as,eo;{const e=ms(),t=(n,s)=>{let o;return(o=e[n])||(o=e[n]=[]),o.push(s),l=>{o.length>1?o.forEach(r=>r(l)):o[0](l)}};as=t("__VUE_INSTANCE_SETTERS__",n=>He=n),eo=t("__VUE_SSR_SETTERS__",n=>$n=n)}const Fn=e=>{const t=He;return as(e),e.scope.on(),()=>{e.scope.off(),as(t)}},zo=()=>{He&&He.scope.off(),as(null)};function Dr(e){return e.vnode.shapeFlag&4}let $n=!1;function ec(e,t=!1,n=!1){t&&eo(t);const{props:s,children:o}=e.vnode,l=Dr(e);Ma(e,s,l,t),Va(e,o,n||t);const r=l?tc(e,t):void 0;return t&&eo(!1),r}function tc(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,ba);const{setup:s}=n;if(s){It();const o=e.setupContext=s.length>1?sc(e):null,l=Fn(e),r=jn(s,e,0,[e.props,o]),i=Il(r);if(Nt(),l(),(i||e.sp)&&!Sn(e)&&hr(e),i){if(r.then(zo,zo),t)return r.then(a=>{Jo(e,a)}).catch(a=>{_s(a,e,0)});e.asyncDep=r}else Jo(e,r)}else Lr(e)}function Jo(e,t,n){oe(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:we(t)&&(e.setupState=or(t)),Lr(e)}function Lr(e,t,n){const s=e.type;e.render||(e.render=s.render||xt);{const o=Fn(e);It();try{wa(e)}finally{Nt(),o()}}}const nc={get(e,t){return Ue(e,"get",""),e[t]}};function sc(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,nc),slots:e.slots,emit:e.emit,expose:t}}function Cs(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(or(yo(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in En)return En[n](e)},has(t,n){return n in t||n in En}})):e.proxy}function oc(e,t=!0){return oe(e)?e.displayName||e.name:e.name||t&&e.__name}function lc(e){return oe(e)&&"__vccOpts"in e}const _e=(e,t)=>zi(e,t,$n);function jr(e,t,n){try{rs(-1);const s=arguments.length;return s===2?we(t)&&!ee(t)?is(t)?Le(e,null,[t]):Le(e,t):Le(e,null,t):(s>3?n=Array.prototype.slice.call(arguments,2):s===3&&is(n)&&(n=[n]),Le(e,t,n))}finally{rs(1)}}const rc="3.5.35";/** +* @vue/runtime-dom v3.5.35 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/let to;const Yo=typeof window<"u"&&window.trustedTypes;if(Yo)try{to=Yo.createPolicy("vue",{createHTML:e=>e})}catch{}const Vr=to?e=>to.createHTML(e):e=>e,ic="http://www.w3.org/2000/svg",ac="http://www.w3.org/1998/Math/MathML",Et=typeof document<"u"?document:null,Qo=Et&&Et.createElement("template"),cc={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,s)=>{const o=t==="svg"?Et.createElementNS(ic,e):t==="mathml"?Et.createElementNS(ac,e):n?Et.createElement(e,{is:n}):Et.createElement(e);return e==="select"&&s&&s.multiple!=null&&o.setAttribute("multiple",s.multiple),o},createText:e=>Et.createTextNode(e),createComment:e=>Et.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Et.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,s,o,l){const r=n?n.previousSibling:t.lastChild;if(o&&(o===l||o.nextSibling))for(;t.insertBefore(o.cloneNode(!0),n),!(o===l||!(o=o.nextSibling)););else{Qo.innerHTML=Vr(s==="svg"?`${e}`:s==="mathml"?`${e}`:e);const i=Qo.content;if(s==="svg"||s==="mathml"){const a=i.firstChild;for(;a.firstChild;)i.appendChild(a.firstChild);i.removeChild(a)}t.insertBefore(i,n)}return[r?r.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},uc=Symbol("_vtc");function fc(e,t,n){const s=e[uc];s&&(t=(t?[t,...s]:[...s]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const Xo=Symbol("_vod"),dc=Symbol("_vsh"),hc=Symbol(""),pc=/(?:^|;)\s*display\s*:/;function mc(e,t,n){const s=e.style,o=Te(n);let l=!1;if(n&&!o){if(t)if(Te(t))for(const r of t.split(";")){const i=r.slice(0,r.indexOf(":")).trim();n[i]==null&&yn(s,i,"")}else for(const r in t)n[r]==null&&yn(s,r,"");for(const r in n){r==="display"&&(l=!0);const i=n[r];i!=null?gc(e,r,!Te(t)&&t?t[r]:void 0,i)||yn(s,r,i):yn(s,r,"")}}else if(o){if(t!==n){const r=s[hc];r&&(n+=";"+r),s.cssText=n,l=pc.test(n)}}else t&&e.removeAttribute("style");Xo in e&&(e[Xo]=l?s.display:"",e[dc]&&(s.display="none"))}const Zo=/\s*!important$/;function yn(e,t,n){if(ee(n))n.forEach(s=>yn(e,t,s));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const s=vc(e,t);Zo.test(n)?e.setProperty(Kt(s),n.replace(Zo,""),"important"):e[s]=n}}const el=["Webkit","Moz","ms"],Vs={};function vc(e,t){const n=Vs[t];if(n)return n;let s=Je(t);if(s!=="filter"&&s in e)return Vs[t]=s;s=hs(s);for(let o=0;oFs||(wc.then(()=>Fs=0),Fs=Date.now());function kc(e,t){const n=s=>{if(!s._vts)s._vts=Date.now();else if(s._vts<=n.attached)return;const o=n.value;if(ee(o)){const l=s.stopImmediatePropagation;s.stopImmediatePropagation=()=>{l.call(s),s._stopped=!0};const r=o.slice(),i=[s];for(let a=0;ae.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,Cc=(e,t,n,s,o,l)=>{const r=o==="svg";t==="class"?fc(e,s,r):t==="style"?mc(e,n,s):cs(t)?us(t)||yc(e,t,n,s,l):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):Sc(e,t,s,r))?(sl(e,t,s),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&nl(e,t,s,r,l,t!=="value")):e._isVueCE&&(Ec(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!Te(s)))?sl(e,Je(t),s,l,t):(t==="true-value"?e._trueValue=s:t==="false-value"&&(e._falseValue=s),nl(e,t,s,r))};function Sc(e,t,n,s){if(s)return!!(t==="innerHTML"||t==="textContent"||t in e&&rl(t)&&oe(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||t==="sandbox"&&e.tagName==="IFRAME"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const o=e.tagName;if(o==="IMG"||o==="VIDEO"||o==="CANVAS"||o==="SOURCE")return!1}return rl(t)&&Te(n)?!1:t in e}function Ec(e,t){const n=e._def.props;if(!n)return!1;const s=Je(t);return Array.isArray(n)?n.some(o=>Je(o)===s):Object.keys(n).some(o=>Je(o)===s)}const Bt=e=>{const t=e.props["onUpdate:modelValue"]||!1;return ee(t)?n=>Jn(t,n):t};function Ac(e){e.target.composing=!0}function il(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const ut=Symbol("_assign");function al(e,t,n){return t&&(e=e.trim()),n&&(e=ps(e)),e}const et={created(e,{modifiers:{lazy:t,trim:n,number:s}},o){e[ut]=Bt(o);const l=s||o.props&&o.props.type==="number";Tt(e,t?"change":"input",r=>{r.target.composing||e[ut](al(e.value,n,l))}),(n||l)&&Tt(e,"change",()=>{e.value=al(e.value,n,l)}),t||(Tt(e,"compositionstart",Ac),Tt(e,"compositionend",il),Tt(e,"change",il))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:s,trim:o,number:l}},r){if(e[ut]=Bt(r),e.composing)return;const i=(l||e.type==="number")&&!/^0\d/.test(e.value)?ps(e.value):e.value,a=t??"";if(i===a)return;const f=e.getRootNode();(f instanceof Document||f instanceof ShadowRoot)&&f.activeElement===e&&e.type!=="range"&&(s&&t===n||o&&e.value.trim()===a)||(e.value=a)}},Rc={deep:!0,created(e,t,n){e[ut]=Bt(n),Tt(e,"change",()=>{const s=e._modelValue,o=cn(e),l=e.checked,r=e[ut];if(ee(s)){const i=fo(s,o),a=i!==-1;if(l&&!a)r(s.concat(o));else if(!l&&a){const f=[...s];f.splice(i,1),r(f)}}else if(dn(s)){const i=new Set(s);l?i.add(o):i.delete(o),r(i)}else r(Fr(e,l))})},mounted:cl,beforeUpdate(e,t,n){e[ut]=Bt(n),cl(e,t,n)}};function cl(e,{value:t,oldValue:n},s){e._modelValue=t;let o;if(ee(t))o=fo(t,s.props.value)>-1;else if(dn(t))o=t.has(s.props.value);else{if(t===n)return;o=Ut(t,Fr(e,!0))}e.checked!==o&&(e.checked=o)}const ul={created(e,{value:t},n){e.checked=Ut(t,n.props.value),e[ut]=Bt(n),Tt(e,"change",()=>{e[ut](cn(e))})},beforeUpdate(e,{value:t,oldValue:n},s){e[ut]=Bt(s),t!==n&&(e.checked=Ut(t,s.props.value))}},Oc={deep:!0,created(e,{value:t,modifiers:{number:n}},s){const o=dn(t);Tt(e,"change",()=>{const l=Array.prototype.filter.call(e.options,r=>r.selected).map(r=>n?ps(cn(r)):cn(r));e[ut](e.multiple?o?new Set(l):l:l[0]),e._assigning=!0,Vn(()=>{e._assigning=!1})}),e[ut]=Bt(s)},mounted(e,{value:t}){fl(e,t)},beforeUpdate(e,t,n){e[ut]=Bt(n)},updated(e,{value:t}){e._assigning||fl(e,t)}};function fl(e,t){const n=e.multiple,s=ee(t);if(!(n&&!s&&!dn(t))){for(let o=0,l=e.options.length;oString(f)===String(i)):r.selected=fo(t,i)>-1}else r.selected=t.has(i);else if(Ut(cn(r),t)){e.selectedIndex!==o&&(e.selectedIndex=o);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function cn(e){return"_value"in e?e._value:e.value}function Fr(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const Tc=["ctrl","shift","alt","meta"],Pc={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>Tc.some(n=>e[`${n}Key`]&&!t.includes(n))},zn=(e,t)=>{if(!e)return e;const n=e._withMods||(e._withMods={}),s=t.join(".");return n[s]||(n[s]=(o,...l)=>{for(let r=0;r{const n=e._withKeys||(e._withKeys={}),s=t.join(".");return n[s]||(n[s]=o=>{if(!("key"in o))return;const l=Kt(o.key);if(t.some(r=>r===l||Ic[r]===l))return e(o)})},Nc=Ve({patchProp:Cc},cc);let dl;function $c(){return dl||(dl=Ua(Nc))}const Mc=(...e)=>{const t=$c().createApp(...e),{mount:n}=t;return t.mount=s=>{const o=Lc(s);if(!o)return;const l=t._component;!oe(l)&&!l.render&&!l.template&&(l.template=o.innerHTML),o.nodeType===1&&(o.textContent="");const r=n(o,!1,Dc(o));return o instanceof Element&&(o.removeAttribute("v-cloak"),o.setAttribute("data-v-app","")),r},t};function Dc(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function Lc(e){return Te(e)?document.querySelector(e):e}/*! + * pinia v2.3.1 + * (c) 2025 Eduardo San Martin Morote + * @license MIT + */let Ur;const Ss=e=>Ur=e,Hr=Symbol();function no(e){return e&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]"&&typeof e.toJSON!="function"}var Rn;(function(e){e.direct="direct",e.patchObject="patch object",e.patchFunction="patch function"})(Rn||(Rn={}));function jc(){const e=Fl(!0),t=e.run(()=>ne({}));let n=[],s=[];const o=yo({install(l){Ss(o),o._a=l,l.provide(Hr,o),l.config.globalProperties.$pinia=o,s.forEach(r=>n.push(r)),s=[]},use(l){return this._a?n.push(l):s.push(l),this},_p:n,_a:null,_e:e,_s:new Map,state:t});return o}const Br=()=>{};function hl(e,t,n,s=Br){e.push(t);const o=()=>{const l=e.indexOf(t);l>-1&&(e.splice(l,1),s())};return!n&&Ul()&&xi(o),o}function en(e,...t){e.slice().forEach(n=>{n(...t)})}const Vc=e=>e(),pl=Symbol(),Us=Symbol();function so(e,t){e instanceof Map&&t instanceof Map?t.forEach((n,s)=>e.set(s,n)):e instanceof Set&&t instanceof Set&&t.forEach(e.add,e);for(const n in t){if(!t.hasOwnProperty(n))continue;const s=t[n],o=e[n];no(o)&&no(s)&&e.hasOwnProperty(n)&&!Pe(s)&&!Pt(s)?e[n]=so(o,s):e[n]=s}return e}const Fc=Symbol();function Uc(e){return!no(e)||!e.hasOwnProperty(Fc)}const{assign:Lt}=Object;function Hc(e){return!!(Pe(e)&&e.effect)}function Bc(e,t,n,s){const{state:o,actions:l,getters:r}=t,i=n.state.value[e];let a;function f(){i||(n.state.value[e]=o?o():{});const u=Ki(n.state.value[e]);return Lt(u,l,Object.keys(r||{}).reduce((h,g)=>(h[g]=yo(_e(()=>{Ss(n);const b=n._s.get(e);return r[g].call(b,b)})),h),{}))}return a=Kr(e,f,t,n,s,!0),a}function Kr(e,t,n={},s,o,l){let r;const i=Lt({actions:{}},n),a={deep:!0};let f,u,h=[],g=[],b;const N=s.state.value[e];!l&&!N&&(s.state.value[e]={});let P;function F(le){let re;f=u=!1,typeof le=="function"?(le(s.state.value[e]),re={type:Rn.patchFunction,storeId:e,events:b}):(so(s.state.value[e],le),re={type:Rn.patchObject,payload:le,storeId:e,events:b});const B=P=Symbol();Vn().then(()=>{P===B&&(f=!0)}),u=!0,en(h,re,s.state.value[e])}const q=l?function(){const{state:re}=n,B=re?re():{};this.$patch(J=>{Lt(J,B)})}:Br;function $(){r.stop(),h=[],g=[],s._s.delete(e)}const H=(le,re="")=>{if(pl in le)return le[Us]=re,le;const B=function(){Ss(s);const J=Array.from(arguments),he=[],X=[];function Ce(te){he.push(te)}function Ie(te){X.push(te)}en(g,{args:J,name:B[Us],store:j,after:Ce,onError:Ie});let xe;try{xe=le.apply(this&&this.$id===e?this:j,J)}catch(te){throw en(X,te),te}return xe instanceof Promise?xe.then(te=>(en(he,te),te)).catch(te=>(en(X,te),Promise.reject(te))):(en(he,xe),xe)};return B[pl]=!0,B[Us]=re,B},O={_p:s,$id:e,$onAction:hl.bind(null,g),$patch:F,$reset:q,$subscribe(le,re={}){const B=hl(h,le,re.detached,()=>J()),J=r.run(()=>kn(()=>s.state.value[e],he=>{(re.flush==="sync"?u:f)&&le({storeId:e,type:Rn.direct,events:b},he)},Lt({},a,re)));return B},$dispose:$},j=Ln(O);s._s.set(e,j);const ue=(s._a&&s._a.runWithContext||Vc)(()=>s._e.run(()=>(r=Fl()).run(()=>t({action:H}))));for(const le in ue){const re=ue[le];if(Pe(re)&&!Hc(re)||Pt(re))l||(N&&Uc(re)&&(Pe(re)?re.value=N[le]:so(re,N[le])),s.state.value[e][le]=re);else if(typeof re=="function"){const B=H(re,le);ue[le]=B,i.actions[le]=re}}return Lt(j,ue),Lt(ve(j),ue),Object.defineProperty(j,"$state",{get:()=>s.state.value[e],set:le=>{F(re=>{Lt(re,le)})}}),s._p.forEach(le=>{Lt(j,r.run(()=>le({store:j,app:s._a,pinia:s,options:i})))}),N&&l&&n.hydrate&&n.hydrate(j.$state,N),f=!0,u=!0,j}/*! #__NO_SIDE_EFFECTS__ */function Kc(e,t,n){let s,o;const l=typeof t=="function";s=e,o=l?n:t;function r(i,a){const f=ea();return i=i||(f?ct(Hr,null):null),i&&Ss(i),i=Ur,i._s.has(s)||(l?Kr(s,t,o,i):Bc(s,o,i)),i._s.get(s)}return r.$id=s,r}/*! + * vue-router v4.6.4 + * (c) 2025 Eduardo San Martin Morote + * @license MIT + */const nn=typeof document<"u";function Gr(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function Gc(e){return e.__esModule||e[Symbol.toStringTag]==="Module"||e.default&&Gr(e.default)}const ye=Object.assign;function Hs(e,t){const n={};for(const s in t){const o=t[s];n[s]=vt(o)?o.map(e):e(o)}return n}const On=()=>{},vt=Array.isArray;function ml(e,t){const n={};for(const s in e)n[s]=s in t?t[s]:e[s];return n}const Wr=/#/g,Wc=/&/g,qc=/\//g,zc=/=/g,Jc=/\?/g,qr=/\+/g,Yc=/%5B/g,Qc=/%5D/g,zr=/%5E/g,Xc=/%60/g,Jr=/%7B/g,Zc=/%7C/g,Yr=/%7D/g,eu=/%20/g;function So(e){return e==null?"":encodeURI(""+e).replace(Zc,"|").replace(Yc,"[").replace(Qc,"]")}function tu(e){return So(e).replace(Jr,"{").replace(Yr,"}").replace(zr,"^")}function oo(e){return So(e).replace(qr,"%2B").replace(eu,"+").replace(Wr,"%23").replace(Wc,"%26").replace(Xc,"`").replace(Jr,"{").replace(Yr,"}").replace(zr,"^")}function nu(e){return oo(e).replace(zc,"%3D")}function su(e){return So(e).replace(Wr,"%23").replace(Jc,"%3F")}function ou(e){return su(e).replace(qc,"%2F")}function Mn(e){if(e==null)return null;try{return decodeURIComponent(""+e)}catch{}return""+e}const lu=/\/$/,ru=e=>e.replace(lu,"");function Bs(e,t,n="/"){let s,o={},l="",r="";const i=t.indexOf("#");let a=t.indexOf("?");return a=i>=0&&a>i?-1:a,a>=0&&(s=t.slice(0,a),l=t.slice(a,i>0?i:t.length),o=e(l.slice(1))),i>=0&&(s=s||t.slice(0,i),r=t.slice(i,t.length)),s=uu(s??t,n),{fullPath:s+l+r,path:s,query:o,hash:Mn(r)}}function iu(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function vl(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function au(e,t,n){const s=t.matched.length-1,o=n.matched.length-1;return s>-1&&s===o&&un(t.matched[s],n.matched[o])&&Qr(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function un(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function Qr(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var n in e)if(!cu(e[n],t[n]))return!1;return!0}function cu(e,t){return vt(e)?gl(e,t):vt(t)?gl(t,e):(e==null?void 0:e.valueOf())===(t==null?void 0:t.valueOf())}function gl(e,t){return vt(t)?e.length===t.length&&e.every((n,s)=>n===t[s]):e.length===1&&e[0]===t}function uu(e,t){if(e.startsWith("/"))return e;if(!e)return t;const n=t.split("/"),s=e.split("/"),o=s[s.length-1];(o===".."||o===".")&&s.push("");let l=n.length-1,r,i;for(r=0;r1&&l--;else break;return n.slice(0,l).join("/")+"/"+s.slice(r).join("/")}const Dt={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};let lo=function(e){return e.pop="pop",e.push="push",e}({}),Ks=function(e){return e.back="back",e.forward="forward",e.unknown="",e}({});function fu(e){if(!e)if(nn){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),ru(e)}const du=/^[^#]+#/;function hu(e,t){return e.replace(du,"#")+t}function pu(e,t){const n=document.documentElement.getBoundingClientRect(),s=e.getBoundingClientRect();return{behavior:t.behavior,left:s.left-n.left-(t.left||0),top:s.top-n.top-(t.top||0)}}const Es=()=>({left:window.scrollX,top:window.scrollY});function mu(e){let t;if("el"in e){const n=e.el,s=typeof n=="string"&&n.startsWith("#"),o=typeof n=="string"?s?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!o)return;t=pu(o,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.scrollX,t.top!=null?t.top:window.scrollY)}function _l(e,t){return(history.state?history.state.position-t:-1)+e}const ro=new Map;function vu(e,t){ro.set(e,t)}function gu(e){const t=ro.get(e);return ro.delete(e),t}function _u(e){return typeof e=="string"||e&&typeof e=="object"}function Xr(e){return typeof e=="string"||typeof e=="symbol"}let Oe=function(e){return e[e.MATCHER_NOT_FOUND=1]="MATCHER_NOT_FOUND",e[e.NAVIGATION_GUARD_REDIRECT=2]="NAVIGATION_GUARD_REDIRECT",e[e.NAVIGATION_ABORTED=4]="NAVIGATION_ABORTED",e[e.NAVIGATION_CANCELLED=8]="NAVIGATION_CANCELLED",e[e.NAVIGATION_DUPLICATED=16]="NAVIGATION_DUPLICATED",e}({});const Zr=Symbol("");Oe.MATCHER_NOT_FOUND+"",Oe.NAVIGATION_GUARD_REDIRECT+"",Oe.NAVIGATION_ABORTED+"",Oe.NAVIGATION_CANCELLED+"",Oe.NAVIGATION_DUPLICATED+"";function fn(e,t){return ye(new Error,{type:e,[Zr]:!0},t)}function St(e,t){return e instanceof Error&&Zr in e&&(t==null||!!(e.type&t))}const yu=["params","query","hash"];function bu(e){if(typeof e=="string")return e;if(e.path!=null)return e.path;const t={};for(const n of yu)n in e&&(t[n]=e[n]);return JSON.stringify(t,null,2)}function wu(e){const t={};if(e===""||e==="?")return t;const n=(e[0]==="?"?e.slice(1):e).split("&");for(let s=0;so&&oo(o)):[s&&oo(s)]).forEach(o=>{o!==void 0&&(t+=(t.length?"&":"")+n,o!=null&&(t+="="+o))})}return t}function xu(e){const t={};for(const n in e){const s=e[n];s!==void 0&&(t[n]=vt(s)?s.map(o=>o==null?null:""+o):s==null?s:""+s)}return t}const ku=Symbol(""),bl=Symbol(""),As=Symbol(""),Eo=Symbol(""),io=Symbol("");function gn(){let e=[];function t(s){return e.push(s),()=>{const o=e.indexOf(s);o>-1&&e.splice(o,1)}}function n(){e=[]}return{add:t,list:()=>e.slice(),reset:n}}function Vt(e,t,n,s,o,l=r=>r()){const r=s&&(s.enterCallbacks[o]=s.enterCallbacks[o]||[]);return()=>new Promise((i,a)=>{const f=g=>{g===!1?a(fn(Oe.NAVIGATION_ABORTED,{from:n,to:t})):g instanceof Error?a(g):_u(g)?a(fn(Oe.NAVIGATION_GUARD_REDIRECT,{from:t,to:g})):(r&&s.enterCallbacks[o]===r&&typeof g=="function"&&r.push(g),i())},u=l(()=>e.call(s&&s.instances[o],t,n,f));let h=Promise.resolve(u);e.length<3&&(h=h.then(f)),h.catch(g=>a(g))})}function Gs(e,t,n,s,o=l=>l()){const l=[];for(const r of e)for(const i in r.components){let a=r.components[i];if(!(t!=="beforeRouteEnter"&&!r.instances[i]))if(Gr(a)){const f=(a.__vccOpts||a)[t];f&&l.push(Vt(f,n,s,r,i,o))}else{let f=a();l.push(()=>f.then(u=>{if(!u)throw new Error(`Couldn't resolve component "${i}" at "${r.path}"`);const h=Gc(u)?u.default:u;r.mods[i]=u,r.components[i]=h;const g=(h.__vccOpts||h)[t];return g&&Vt(g,n,s,r,i,o)()}))}}return l}function Cu(e,t){const n=[],s=[],o=[],l=Math.max(t.matched.length,e.matched.length);for(let r=0;run(f,i))?s.push(i):n.push(i));const a=e.matched[r];a&&(t.matched.find(f=>un(f,a))||o.push(a))}return[n,s,o]}/*! + * vue-router v4.6.4 + * (c) 2025 Eduardo San Martin Morote + * @license MIT + */let Su=()=>location.protocol+"//"+location.host;function ei(e,t){const{pathname:n,search:s,hash:o}=t,l=e.indexOf("#");if(l>-1){let r=o.includes(e.slice(l))?e.slice(l).length:1,i=o.slice(r);return i[0]!=="/"&&(i="/"+i),vl(i,"")}return vl(n,e)+s+o}function Eu(e,t,n,s){let o=[],l=[],r=null;const i=({state:g})=>{const b=ei(e,location),N=n.value,P=t.value;let F=0;if(g){if(n.value=b,t.value=g,r&&r===N){r=null;return}F=P?g.position-P.position:0}else s(b);o.forEach(q=>{q(n.value,N,{delta:F,type:lo.pop,direction:F?F>0?Ks.forward:Ks.back:Ks.unknown})})};function a(){r=n.value}function f(g){o.push(g);const b=()=>{const N=o.indexOf(g);N>-1&&o.splice(N,1)};return l.push(b),b}function u(){if(document.visibilityState==="hidden"){const{history:g}=window;if(!g.state)return;g.replaceState(ye({},g.state,{scroll:Es()}),"")}}function h(){for(const g of l)g();l=[],window.removeEventListener("popstate",i),window.removeEventListener("pagehide",u),document.removeEventListener("visibilitychange",u)}return window.addEventListener("popstate",i),window.addEventListener("pagehide",u),document.addEventListener("visibilitychange",u),{pauseListeners:a,listen:f,destroy:h}}function wl(e,t,n,s=!1,o=!1){return{back:e,current:t,forward:n,replaced:s,position:window.history.length,scroll:o?Es():null}}function Au(e){const{history:t,location:n}=window,s={value:ei(e,n)},o={value:t.state};o.value||l(s.value,{back:null,current:s.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function l(a,f,u){const h=e.indexOf("#"),g=h>-1?(n.host&&document.querySelector("base")?e:e.slice(h))+a:Su()+e+a;try{t[u?"replaceState":"pushState"](f,"",g),o.value=f}catch(b){console.error(b),n[u?"replace":"assign"](g)}}function r(a,f){l(a,ye({},t.state,wl(o.value.back,a,o.value.forward,!0),f,{position:o.value.position}),!0),s.value=a}function i(a,f){const u=ye({},o.value,t.state,{forward:a,scroll:Es()});l(u.current,u,!0),l(a,ye({},wl(s.value,a,null),{position:u.position+1},f),!1),s.value=a}return{location:s,state:o,push:i,replace:r}}function Ru(e){e=fu(e);const t=Au(e),n=Eu(e,t.state,t.location,t.replace);function s(l,r=!0){r||n.pauseListeners(),history.go(l)}const o=ye({location:"",base:e,go:s,createHref:hu.bind(null,e)},t,n);return Object.defineProperty(o,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(o,"state",{enumerable:!0,get:()=>t.state.value}),o}function Ou(e){return e=location.host?e||location.pathname+location.search:"",e.includes("#")||(e+="#"),Ru(e)}let Jt=function(e){return e[e.Static=0]="Static",e[e.Param=1]="Param",e[e.Group=2]="Group",e}({});var Me=function(e){return e[e.Static=0]="Static",e[e.Param=1]="Param",e[e.ParamRegExp=2]="ParamRegExp",e[e.ParamRegExpEnd=3]="ParamRegExpEnd",e[e.EscapeNext=4]="EscapeNext",e}(Me||{});const Tu={type:Jt.Static,value:""},Pu=/[a-zA-Z0-9_]/;function Iu(e){if(!e)return[[]];if(e==="/")return[[Tu]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(b){throw new Error(`ERR (${n})/"${f}": ${b}`)}let n=Me.Static,s=n;const o=[];let l;function r(){l&&o.push(l),l=[]}let i=0,a,f="",u="";function h(){f&&(n===Me.Static?l.push({type:Jt.Static,value:f}):n===Me.Param||n===Me.ParamRegExp||n===Me.ParamRegExpEnd?(l.length>1&&(a==="*"||a==="+")&&t(`A repeatable param (${f}) must be alone in its segment. eg: '/:ids+.`),l.push({type:Jt.Param,value:f,regexp:u,repeatable:a==="*"||a==="+",optional:a==="*"||a==="?"})):t("Invalid state to consume buffer"),f="")}function g(){f+=a}for(;it.length?t.length===1&&t[0]===qe.Static+qe.Segment?1:-1:0}function ti(e,t){let n=0;const s=e.score,o=t.score;for(;n0&&t[t.length-1]<0}const Lu={strict:!1,end:!0,sensitive:!1};function ju(e,t,n){const s=Mu(Iu(e.path),n),o=ye(s,{record:e,parent:t,children:[],alias:[]});return t&&!o.record.aliasOf==!t.record.aliasOf&&t.children.push(o),o}function Vu(e,t){const n=[],s=new Map;t=ml(Lu,t);function o(h){return s.get(h)}function l(h,g,b){const N=!b,P=Sl(h);P.aliasOf=b&&b.record;const F=ml(t,h),q=[P];if("alias"in h){const O=typeof h.alias=="string"?[h.alias]:h.alias;for(const j of O)q.push(Sl(ye({},P,{components:b?b.record.components:P.components,path:j,aliasOf:b?b.record:P})))}let $,H;for(const O of q){const{path:j}=O;if(g&&j[0]!=="/"){const z=g.record.path,ue=z[z.length-1]==="/"?"":"/";O.path=g.record.path+(j&&ue+j)}if($=ju(O,g,F),b?b.alias.push($):(H=H||$,H!==$&&H.alias.push($),N&&h.name&&!El($)&&r(h.name)),ni($)&&a($),P.children){const z=P.children;for(let ue=0;ue{r(H)}:On}function r(h){if(Xr(h)){const g=s.get(h);g&&(s.delete(h),n.splice(n.indexOf(g),1),g.children.forEach(r),g.alias.forEach(r))}else{const g=n.indexOf(h);g>-1&&(n.splice(g,1),h.record.name&&s.delete(h.record.name),h.children.forEach(r),h.alias.forEach(r))}}function i(){return n}function a(h){const g=Hu(h,n);n.splice(g,0,h),h.record.name&&!El(h)&&s.set(h.record.name,h)}function f(h,g){let b,N={},P,F;if("name"in h&&h.name){if(b=s.get(h.name),!b)throw fn(Oe.MATCHER_NOT_FOUND,{location:h});F=b.record.name,N=ye(Cl(g.params,b.keys.filter(H=>!H.optional).concat(b.parent?b.parent.keys.filter(H=>H.optional):[]).map(H=>H.name)),h.params&&Cl(h.params,b.keys.map(H=>H.name))),P=b.stringify(N)}else if(h.path!=null)P=h.path,b=n.find(H=>H.re.test(P)),b&&(N=b.parse(P),F=b.record.name);else{if(b=g.name?s.get(g.name):n.find(H=>H.re.test(g.path)),!b)throw fn(Oe.MATCHER_NOT_FOUND,{location:h,currentLocation:g});F=b.record.name,N=ye({},g.params,h.params),P=b.stringify(N)}const q=[];let $=b;for(;$;)q.unshift($.record),$=$.parent;return{name:F,path:P,params:N,matched:q,meta:Uu(q)}}e.forEach(h=>l(h));function u(){n.length=0,s.clear()}return{addRoute:l,resolve:f,removeRoute:r,clearRoutes:u,getRoutes:i,getRecordMatcher:o}}function Cl(e,t){const n={};for(const s of t)s in e&&(n[s]=e[s]);return n}function Sl(e){const t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:Fu(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}};return Object.defineProperty(t,"mods",{value:{}}),t}function Fu(e){const t={},n=e.props||!1;if("component"in e)t.default=n;else for(const s in e.components)t[s]=typeof n=="object"?n[s]:n;return t}function El(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function Uu(e){return e.reduce((t,n)=>ye(t,n.meta),{})}function Hu(e,t){let n=0,s=t.length;for(;n!==s;){const l=n+s>>1;ti(e,t[l])<0?s=l:n=l+1}const o=Bu(e);return o&&(s=t.lastIndexOf(o,s-1)),s}function Bu(e){let t=e;for(;t=t.parent;)if(ni(t)&&ti(e,t)===0)return t}function ni({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function Al(e){const t=ct(As),n=ct(Eo),s=_e(()=>{const a=kt(e.to);return t.resolve(a)}),o=_e(()=>{const{matched:a}=s.value,{length:f}=a,u=a[f-1],h=n.matched;if(!u||!h.length)return-1;const g=h.findIndex(un.bind(null,u));if(g>-1)return g;const b=Rl(a[f-2]);return f>1&&Rl(u)===b&&h[h.length-1].path!==b?h.findIndex(un.bind(null,a[f-2])):g}),l=_e(()=>o.value>-1&&zu(n.params,s.value.params)),r=_e(()=>o.value>-1&&o.value===n.matched.length-1&&Qr(n.params,s.value.params));function i(a={}){if(qu(a)){const f=t[kt(e.replace)?"replace":"push"](kt(e.to)).catch(On);return e.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>f),f}return Promise.resolve()}return{route:s,href:_e(()=>s.value.href),isActive:l,isExactActive:r,navigate:i}}function Ku(e){return e.length===1?e[0]:e}const Gu=dr({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"},viewTransition:Boolean},useLink:Al,setup(e,{slots:t}){const n=Ln(Al(e)),{options:s}=ct(As),o=_e(()=>({[Ol(e.activeClass,s.linkActiveClass,"router-link-active")]:n.isActive,[Ol(e.exactActiveClass,s.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const l=t.default&&Ku(t.default(n));return e.custom?l:jr("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:o.value},l)}}}),Wu=Gu;function qu(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function zu(e,t){for(const n in t){const s=t[n],o=e[n];if(typeof s=="string"){if(s!==o)return!1}else if(!vt(o)||o.length!==s.length||s.some((l,r)=>l.valueOf()!==o[r].valueOf()))return!1}return!0}function Rl(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const Ol=(e,t,n)=>e??t??n,Ju=dr({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){const s=ct(io),o=_e(()=>e.route||s.value),l=ct(bl,0),r=_e(()=>{let f=kt(l);const{matched:u}=o.value;let h;for(;(h=u[f])&&!h.components;)f++;return f}),i=_e(()=>o.value.matched[r.value]);Qn(bl,_e(()=>r.value+1)),Qn(ku,i),Qn(io,o);const a=ne();return kn(()=>[a.value,i.value,e.name],([f,u,h],[g,b,N])=>{u&&(u.instances[h]=f,b&&b!==u&&f&&f===g&&(u.leaveGuards.size||(u.leaveGuards=b.leaveGuards),u.updateGuards.size||(u.updateGuards=b.updateGuards))),f&&u&&(!b||!un(u,b)||!g)&&(u.enterCallbacks[h]||[]).forEach(P=>P(f))},{flush:"post"}),()=>{const f=o.value,u=e.name,h=i.value,g=h&&h.components[u];if(!g)return Tl(n.default,{Component:g,route:f});const b=h.props[u],N=b?b===!0?f.params:typeof b=="function"?b(f):b:null,F=jr(g,ye({},N,t,{onVnodeUnmounted:q=>{q.component.isUnmounted&&(h.instances[u]=null)},ref:a}));return Tl(n.default,{Component:F,route:f})||F}}});function Tl(e,t){if(!e)return null;const n=e(t);return n.length===1?n[0]:n}const Yu=Ju;function Qu(e){const t=Vu(e.routes,e),n=e.parseQuery||wu,s=e.stringifyQuery||yl,o=e.history,l=gn(),r=gn(),i=gn(),a=Ui(Dt);let f=Dt;nn&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const u=Hs.bind(null,S=>""+S),h=Hs.bind(null,ou),g=Hs.bind(null,Mn);function b(S,U){let L,W;return Xr(S)?(L=t.getRecordMatcher(S),W=U):W=S,t.addRoute(W,L)}function N(S){const U=t.getRecordMatcher(S);U&&t.removeRoute(U)}function P(){return t.getRoutes().map(S=>S.record)}function F(S){return!!t.getRecordMatcher(S)}function q(S,U){if(U=ye({},U||a.value),typeof S=="string"){const _=Bs(n,S,U.path),x=t.resolve({path:_.path},U),E=o.createHref(_.fullPath);return ye(_,x,{params:g(x.params),hash:Mn(_.hash),redirectedFrom:void 0,href:E})}let L;if(S.path!=null)L=ye({},S,{path:Bs(n,S.path,U.path).path});else{const _=ye({},S.params);for(const x in _)_[x]==null&&delete _[x];L=ye({},S,{params:h(_)}),U.params=h(U.params)}const W=t.resolve(L,U),de=S.hash||"";W.params=u(g(W.params));const d=iu(s,ye({},S,{hash:tu(de),path:W.path})),m=o.createHref(d);return ye({fullPath:d,hash:de,query:s===yl?xu(S.query):S.query||{}},W,{redirectedFrom:void 0,href:m})}function $(S){return typeof S=="string"?Bs(n,S,a.value.path):ye({},S)}function H(S,U){if(f!==S)return fn(Oe.NAVIGATION_CANCELLED,{from:U,to:S})}function O(S){return ue(S)}function j(S){return O(ye($(S),{replace:!0}))}function z(S,U){const L=S.matched[S.matched.length-1];if(L&&L.redirect){const{redirect:W}=L;let de=typeof W=="function"?W(S,U):W;return typeof de=="string"&&(de=de.includes("?")||de.includes("#")?de=$(de):{path:de},de.params={}),ye({query:S.query,hash:S.hash,params:de.path!=null?{}:S.params},de)}}function ue(S,U){const L=f=q(S),W=a.value,de=S.state,d=S.force,m=S.replace===!0,_=z(L,W);if(_)return ue(ye($(_),{state:typeof _=="object"?ye({},de,_.state):de,force:d,replace:m}),U||L);const x=L;x.redirectedFrom=U;let E;return!d&&au(s,W,L)&&(E=fn(Oe.NAVIGATION_DUPLICATED,{to:x,from:W}),Ze(W,W,!0,!1)),(E?Promise.resolve(E):B(x,W)).catch(w=>St(w)?St(w,Oe.NAVIGATION_GUARD_REDIRECT)?w:Xe(w):fe(w,x,W)).then(w=>{if(w){if(St(w,Oe.NAVIGATION_GUARD_REDIRECT))return ue(ye({replace:m},$(w.to),{state:typeof w.to=="object"?ye({},de,w.to.state):de,force:d}),U||x)}else w=he(x,W,!0,m,de);return J(x,W,w),w})}function le(S,U){const L=H(S,U);return L?Promise.reject(L):Promise.resolve()}function re(S){const U=ot.values().next().value;return U&&typeof U.runWithContext=="function"?U.runWithContext(S):S()}function B(S,U){let L;const[W,de,d]=Cu(S,U);L=Gs(W.reverse(),"beforeRouteLeave",S,U);for(const _ of W)_.leaveGuards.forEach(x=>{L.push(Vt(x,S,U))});const m=le.bind(null,S,U);return L.push(m),Ne(L).then(()=>{L=[];for(const _ of l.list())L.push(Vt(_,S,U));return L.push(m),Ne(L)}).then(()=>{L=Gs(de,"beforeRouteUpdate",S,U);for(const _ of de)_.updateGuards.forEach(x=>{L.push(Vt(x,S,U))});return L.push(m),Ne(L)}).then(()=>{L=[];for(const _ of d)if(_.beforeEnter)if(vt(_.beforeEnter))for(const x of _.beforeEnter)L.push(Vt(x,S,U));else L.push(Vt(_.beforeEnter,S,U));return L.push(m),Ne(L)}).then(()=>(S.matched.forEach(_=>_.enterCallbacks={}),L=Gs(d,"beforeRouteEnter",S,U,re),L.push(m),Ne(L))).then(()=>{L=[];for(const _ of r.list())L.push(Vt(_,S,U));return L.push(m),Ne(L)}).catch(_=>St(_,Oe.NAVIGATION_CANCELLED)?_:Promise.reject(_))}function J(S,U,L){i.list().forEach(W=>re(()=>W(S,U,L)))}function he(S,U,L,W,de){const d=H(S,U);if(d)return d;const m=U===Dt,_=nn?history.state:{};L&&(W||m?o.replace(S.fullPath,ye({scroll:m&&_&&_.scroll},de)):o.push(S.fullPath,de)),a.value=S,Ze(S,U,L,m),Xe()}let X;function Ce(){X||(X=o.listen((S,U,L)=>{if(!Ke.listening)return;const W=q(S),de=z(W,Ke.currentRoute.value);if(de){ue(ye(de,{replace:!0,force:!0}),W).catch(On);return}f=W;const d=a.value;nn&&vu(_l(d.fullPath,L.delta),Es()),B(W,d).catch(m=>St(m,Oe.NAVIGATION_ABORTED|Oe.NAVIGATION_CANCELLED)?m:St(m,Oe.NAVIGATION_GUARD_REDIRECT)?(ue(ye($(m.to),{force:!0}),W).then(_=>{St(_,Oe.NAVIGATION_ABORTED|Oe.NAVIGATION_DUPLICATED)&&!L.delta&&L.type===lo.pop&&o.go(-1,!1)}).catch(On),Promise.reject()):(L.delta&&o.go(-L.delta,!1),fe(m,W,d))).then(m=>{m=m||he(W,d,!1),m&&(L.delta&&!St(m,Oe.NAVIGATION_CANCELLED)?o.go(-L.delta,!1):L.type===lo.pop&&St(m,Oe.NAVIGATION_ABORTED|Oe.NAVIGATION_DUPLICATED)&&o.go(-1,!1)),J(W,d,m)}).catch(On)}))}let Ie=gn(),xe=gn(),te;function fe(S,U,L){Xe(S);const W=xe.list();return W.length?W.forEach(de=>de(S,U,L)):console.error(S),Promise.reject(S)}function dt(){return te&&a.value!==Dt?Promise.resolve():new Promise((S,U)=>{Ie.add([S,U])})}function Xe(S){return te||(te=!S,Ce(),Ie.list().forEach(([U,L])=>S?L(S):U()),Ie.reset()),S}function Ze(S,U,L,W){const{scrollBehavior:de}=e;if(!nn||!de)return Promise.resolve();const d=!L&&gu(_l(S.fullPath,0))||(W||!L)&&history.state&&history.state.scroll||null;return Vn().then(()=>de(S,U,d)).then(m=>m&&mu(m)).catch(m=>fe(m,S,U))}const Fe=S=>o.go(S);let Be;const ot=new Set,Ke={currentRoute:a,listening:!0,addRoute:b,removeRoute:N,clearRoutes:t.clearRoutes,hasRoute:F,getRoutes:P,resolve:q,options:e,push:O,replace:j,go:Fe,back:()=>Fe(-1),forward:()=>Fe(1),beforeEach:l.add,beforeResolve:r.add,afterEach:i.add,onError:xe.add,isReady:dt,install(S){S.component("RouterLink",Wu),S.component("RouterView",Yu),S.config.globalProperties.$router=Ke,Object.defineProperty(S.config.globalProperties,"$route",{enumerable:!0,get:()=>kt(a)}),nn&&!Be&&a.value===Dt&&(Be=!0,O(o.location).catch(W=>{}));const U={};for(const W in Dt)Object.defineProperty(U,W,{get:()=>a.value[W],enumerable:!0});S.provide(As,Ke),S.provide(Eo,nr(U)),S.provide(io,a);const L=S.unmount;ot.add(S),S.unmount=function(){ot.delete(S),ot.size<1&&(f=Dt,X&&X(),X=null,a.value=Dt,Be=!1,te=!1),L()}}};function Ne(S){return S.reduce((U,L)=>U.then(()=>re(L)),Promise.resolve())}return Ke}function si(){return ct(As)}function Xu(e){return ct(Eo)}const Un=Kc("auth",{state:()=>({token:localStorage.getItem("mcbot_token")||"",identity:localStorage.getItem("mcbot_identity")||""}),actions:{set(e,t){this.token=e,this.identity=t||"",localStorage.setItem("mcbot_token",e),localStorage.setItem("mcbot_identity",this.identity)},clear(){this.token="",this.identity="",localStorage.removeItem("mcbot_token"),localStorage.removeItem("mcbot_identity")}}}),Zu={key:0,class:"nav"},ef={class:"who"},tf={__name:"App",setup(e){const t=Un(),n=Xu(),s=si(),o=_e(()=>n.path!=="/login");function l(){t.clear(),s.push("/login")}return(r,i)=>{const a=jo("router-link"),f=jo("router-view");return k(),C(Z,null,[o.value?(k(),C("nav",Zu,[i[3]||(i[3]=c("span",{class:"brand"},"mcbot",-1)),Le(a,{to:"/messages"},{default:Yn(()=>[...i[0]||(i[0]=[ge("Messages",-1)])]),_:1}),Le(a,{to:"/packets"},{default:Yn(()=>[...i[1]||(i[1]=[ge("Packets",-1)])]),_:1}),Le(a,{to:"/manage"},{default:Yn(()=>[...i[2]||(i[2]=[ge("Manage",-1)])]),_:1}),i[4]||(i[4]=c("span",{class:"spacer"},null,-1)),c("span",ef,R(kt(t).identity||"authenticated"),1),c("button",{onClick:l},"Log out")])):Ee("",!0),Le(f)],64)}}};async function ae(e,t={}){const n=Un(),s={...t.headers||{}};n.token&&(s.Authorization=`Bearer ${n.token}`),t.json!==void 0&&(s["Content-Type"]="application/json",t={...t,body:JSON.stringify(t.json)},delete t.json);const o=await fetch(`/api${e}`,{...t,headers:s});if(o.status===401)throw n.clear(),location.hash.startsWith("#/login")||(location.hash="#/login"),new Error("unauthorized");if(!o.ok){let l=o.statusText;try{l=(await o.json()).detail||l}catch{}throw new Error(l)}return o.json()}function oi(e){const t=Un();return`${location.protocol==="https:"?"wss":"ws"}://${location.host}/api${e}?token=${encodeURIComponent(t.token)}`}const nf={class:"login-wrap"},sf={class:"login-card"},of={key:0,class:"err"},lf=["disabled"],rf={__name:"Login",setup(e){const t=Un(),n=si(),s=ne(""),o=ne(""),l=ne(""),r=ne(""),i=ne(!1);async function a(){r.value="",i.value=!0;try{const u=await ae("/login",{method:"POST",json:{username:s.value,password:o.value}});t.set(u.token,u.user?`user:${u.user}`:""),n.push("/")}catch(u){r.value=u.message||"login failed"}finally{i.value=!1}}async function f(){if(r.value="",!!l.value.trim()){t.set(l.value.trim(),"");try{const u=await ae("/me");t.set(l.value.trim(),u.identity),n.push("/")}catch{t.clear(),r.value="invalid token"}}}return(u,h)=>(k(),C("div",nf,[c("div",sf,[h[3]||(h[3]=c("h2",null,"mcbot admin",-1)),r.value?(k(),C("div",of,R(r.value),1)):Ee("",!0),h[4]||(h[4]=c("label",null,"Username",-1)),je(c("input",{"onUpdate:modelValue":h[0]||(h[0]=g=>s.value=g),onKeyup:Zn(a,["enter"]),autofocus:""},null,544),[[et,s.value]]),h[5]||(h[5]=c("label",null,"Password",-1)),je(c("input",{"onUpdate:modelValue":h[1]||(h[1]=g=>o.value=g),type:"password",onKeyup:Zn(a,["enter"])},null,544),[[et,o.value]]),c("button",{disabled:i.value,onClick:a},"Log in",8,lf),h[6]||(h[6]=c("label",{style:{"margin-top":"10px"}},"…or paste an API token",-1)),je(c("input",{"onUpdate:modelValue":h[2]||(h[2]=g=>l.value=g),placeholder:"bearer token",onKeyup:Zn(f,["enter"])},null,544),[[et,l.value]]),c("button",{onClick:f},"Use token")])]))}};function Ft(e){return String(e).padStart(2,"0")}function li(e){if(!e)return"";const t=new Date(e*1e3);return`${Ft(t.getHours())}:${Ft(t.getMinutes())}:${Ft(t.getSeconds())}`}function ri(e){if(!e)return"";const t=new Date(e*1e3);return`${t.getFullYear()}-${Ft(t.getMonth()+1)}-${Ft(t.getDate())} ${Ft(t.getHours())}:${Ft(t.getMinutes())}:${Ft(t.getSeconds())}`}const af=(e,t)=>{const n=e.__vccOpts||e;for(const[s,o]of t)n[s]=o;return n},cf={class:"panes"},uf={class:"pane",style:{flex:"0 0 170px"}},ff={class:"body"},df=["onClick"],hf={class:"pane",style:{flex:"1"}},pf={key:0,class:"toolbar"},mf={key:0,class:"err"},vf={key:1,class:"muted"},gf={class:"body"},_f={key:0,class:"decoded"},yf={class:"kv"},bf={class:"mono"},wf={class:"kv"},xf={class:"k"},kf={key:1},Cf={class:"toolbar"},Sf={class:"chk"},Ef={class:"chk"},Af=["disabled"],Rf={class:"toolbar"},Of={class:"chk"},Tf={style:{"border-top":"1px solid var(--border, #333)"}},Pf={class:"toolbar"},If=["disabled"],Nf={key:0,class:"decoded"},$f={class:"kv"},Mf={class:"muted"},Df={class:"mono"},Lf={class:"toolbar"},jf={class:"chk"},Vf={class:"chk"},Ff=["disabled"],Uf={class:"decoded"},Hf={style:{margin:"12px 0 4px"}},Bf={class:"kv"},Kf={class:"k"},Gf={class:"kv"},Wf={class:"k mono"},qf={key:2},zf={class:"toolbar"},Jf={class:"mono muted"},Yf=["onClick"],Qf={key:3},Xf={class:"toolbar"},Zf={id:"newUserContacts"},ed=["value"],td=["value"],nd=["disabled"],sd={class:"mono muted"},od=["onChange"],ld=["value"],rd={class:"chips"},id=["onClick"],ad={style:{"white-space":"normal"}},cd=["onClick"],ud=["onClick"],fd=["onClick"],dd={key:4},hd={class:"toolbar"},pd={key:0,class:"muted"},md={key:0,class:"muted"},vd=["checked","disabled","onChange"],gd=["onChange"],_d=["value"],yd={class:"chips"},bd=["onClick"],wd=["disabled","onClick"],xd={key:5},kd=["checked","onChange"],Cd=["checked","onChange"],Sd=["checked","onChange"],Ed=["value","onChange"],Ad=["onChange"],Rd=["value"],Od={class:"chips"},Td={key:0,class:"muted"},Pd=["onClick"],Id={key:6,class:"contacts-split"},Nd={class:"pane",style:{flex:"1.6","min-width":"0"}},$d={class:"toolbar"},Md={class:"chk"},Dd=["checked"],Ld=["checked","onChange"],jd=["disabled"],Vd={class:"muted"},Fd={class:"body"},Ud={key:0},Hd={key:0},Bd={key:0},Kd={key:0},Gd={key:0},Wd={key:0},qd=["onClick"],zd=["checked","onChange"],Jd=["title"],Yd={class:"pane contact-detail"},Qd={class:"body"},Xd={key:0,class:"empty"},Zd={key:1,class:"decoded"},eh={class:"kv"},th={class:"k"},nh={key:7},sh=["title"],oh={key:8,class:"empty"},lh={__name:"Manage",setup(e){const t=[{key:"stats",label:"Overview"},{key:"radio",label:"Radio"},{key:"contacts",label:"Contacts"},{key:"channels",label:"Channels"},{key:"users",label:"Users"},{key:"groups",label:"Groups"},{key:"command-config",label:"Commands"},{key:"audit",label:"Audit log"}],n=ne("stats"),s=ne({}),o=ne([]),l=ne([]),r=ne([]),i=ne(""),a=ne(""),f=ne({name:"",key:""}),u=ne({name:"",commands:""}),h=ne({sel:"",group:""}),g={stats:"/stats",radio:"/device-info",contacts:"/contacts?limit=500",channels:"/channels",users:"/users",groups:"/groups","command-config":"/command-config",audit:"/audit?limit=200"};function b(v,p){const K=p.items||p;if(v==="command-config"&&Array.isArray(K))for(const ce of K){let y=[];try{y=ce.allowed_channels?JSON.parse(ce.allowed_channels):[]}catch{y=[]}ce._chans=y}return K}async function N(v,p=!1){if(n.value=v,i.value="",a.value="",!(s.value[v]&&!p))try{const K=await ae(g[v]);if(s.value[v]=b(v,K),v==="contacts"&&Kn(s.value[v]),v==="radio"&&await Ze(),(v==="users"||v==="groups"||v==="contacts")&&!o.value.length){const ce=await ae("/groups");o.value=ce.items.map(y=>y.name)}if(v==="users"&&!s.value.contacts){const ce=await ae(g.contacts);s.value.contacts=b("contacts",ce)}if(v==="groups"&&!l.value.length){const ce=await ae("/command-config");l.value=ce.items.map(y=>y.command).sort()}if(v==="command-config"&&!r.value.length){const ce=await ae("/channels");r.value=ce.items.map(y=>y.name)}}catch(K){i.value=K.message}}const P=v=>N(v,!0);async function F(v,p,K=[]){i.value="",a.value="";try{await v,p&&(a.value=p)}catch(ce){i.value=ce.message}for(const ce of K)await P(ce)}function q(v){const p=s.value["command-config"];if(!p)return;const K=p.findIndex(y=>y.command===v.command);if(K===-1)return;let ce=[];try{ce=v.allowed_channels?JSON.parse(v.allowed_channels):[]}catch{ce=[]}p[K]={...p[K],...v,_chans:ce}}async function $(v,p){i.value="",a.value="";try{const K=await ae(`/command-config/${encodeURIComponent(v)}`,{method:"PATCH",json:p});q(K),a.value=`${v}: saved`}catch(K){i.value=K.message,await P("command-config")}}function H(v,p){!p||v._chans.includes(p)||$(v.command,{allowed_channels:[...v._chans,p]})}function O(v,p){$(v.command,{allowed_channels:v._chans.filter(K=>K!==p)})}async function j(){const v={name:f.value.name.trim()};f.value.key.trim()&&(v.key=f.value.key.trim()),v.name&&(await F(ae("/channels",{method:"POST",json:v}),`added ${v.name}`,["channels"]),i.value||(f.value={name:"",key:""}))}function z(v){confirm(`Remove channel ${v}? This clears its radio slot.`)&&F(ae(`/channels/${encodeURIComponent(v)}`,{method:"DELETE"}),`removed ${v}`,["channels"])}function ue(v,p){p&&F(ae(`/users/${v}/groups`,{method:"POST",json:{group:p}}),"group added",["users"])}function le(v,p){F(ae(`/users/${v}/groups/${encodeURIComponent(p)}`,{method:"DELETE"}),"group removed",["users"])}function re(v,p){const K=prompt("New alias:",p||"");K!==null&&F(ae(`/users/${v}`,{method:"PATCH",json:{name:K}}),"renamed",["users"])}function B(v,p){confirm(`Delete user ${p||v.slice(0,12)} from the bot?`)&&F(ae(`/users/${v}`,{method:"DELETE"}),"deleted",["users"])}function J(v){const p=(v.groups||[]).includes("blocked"),K=p?ae(`/users/${v.pubkey}/block`,{method:"DELETE"}):ae(`/users/${v.pubkey}/block`,{method:"POST"});F(K,p?"unblocked":"blocked",["users"])}async function he(){const v=u.value.name.trim();if(!v)return;const p=u.value.commands.split(",").map(K=>K.trim()).filter(Boolean);await F(ae("/groups",{method:"POST",json:{name:v,commands:p}}),`group ${v} created`,["groups"]),i.value||(u.value={name:"",commands:""})}function X(v){confirm(`Delete group ${v}?`)&&F(ae(`/groups/${encodeURIComponent(v)}`,{method:"DELETE"}),"deleted",["groups"])}function Ce(v,p){p&&F(ae(`/groups/${encodeURIComponent(v)}/commands`,{method:"POST",json:{command:p}}),`granted ${p} to ${v}`,["groups"])}function Ie(v,p){p&&F(ae(`/groups/${encodeURIComponent(v)}/commands/${encodeURIComponent(p)}`,{method:"DELETE"}),`revoked ${p} from ${v}`,["groups"])}function xe(v,p){F(ae(`/groups/${encodeURIComponent(v)}/all-users`,{method:p?"POST":"DELETE"}),p?`${v}: now includes all users`:`${v}: explicit members only`,["groups"])}const te=ne("zero"),fe=ne(!1);async function dt(){fe.value||(fe.value=!0,await F(ae("/radio/advert",{method:"POST",json:{flood:te.value==="flood"}}),`${te.value==="flood"?"flood":"zero-hop"} advert sent`),fe.value=!1)}const Xe=ne(0);async function Ze(){try{const v=await ae("/radio/advert-interval");Xe.value=v.interval_hours}catch(v){i.value=v.message}}async function Fe(){const v=Number(Xe.value);await F(ae("/radio/advert-interval",{method:"POST",json:{interval_hours:v}}),v>0?`Flood advert every ${v}h`:"Periodic flood advert disabled"),await Ze()}const Be=ne(null),ot=ne(!1),Ke=ne(!1),Ne=ne({enabled:!0,headroom:8});async function S(){if(!ot.value){ot.value=!0,i.value="";try{const v=await ae("/radio/contacts-status");Be.value=v,Ne.value={enabled:v.policy.enabled,headroom:v.policy.headroom}}catch(v){i.value=v.message}ot.value=!1}}async function U(){await F(ae("/radio/contacts-policy",{method:"POST",json:{enabled:Ne.value.enabled,headroom:Number(Ne.value.headroom)}}),"Eviction policy updated (runtime only — set radio_evict_* in mcbot.conf to persist)"),await S()}async function L(){if(!Ke.value){Ke.value=!0,i.value="",a.value="";try{const v=await ae("/radio/evict-contacts",{method:"POST",json:{dry_run:!0}}),p=v.evicted||[];if(!p.length){a.value=`Nothing to evict (used ${v.used}/${v.max??"?"}).`,Ke.value=!1;return}const K=p.map($e=>$e.name||$e.pubkey.slice(0,12)),ce=K.slice(0,20).join(` +`),y=K.length>20?` +…and ${K.length-20} more`:"";if(!confirm(`Evict ${p.length} stale contact(s) from the radio? + +${ce}${y}`)){Ke.value=!1;return}const D=await ae("/radio/evict-contacts",{method:"POST",json:{}});a.value=`Evicted ${D.evicted.length} contact(s)`+(D.failed?`, ${D.failed} failed`:"")+(D.shortfall?`, ${D.shortfall} short (protected)`:"")}catch(v){i.value=v.message}Ke.value=!1,await S()}}const W=[{title:"Identity",keys:[["self_info.name","Name"],["self_info.public_key","Public key",{mono:!0}],["device_info.model","Model"],["device_info.ver","Firmware version"],["device_info.fw ver","Firmware code"],["device_info.fw_build","Firmware build"]]},{title:"Radio",keys:[["self_info.radio_freq","Frequency",{unit:"MHz"}],["self_info.radio_bw","Bandwidth",{unit:"kHz"}],["self_info.radio_sf","Spreading factor"],["self_info.radio_cr","Coding rate"],["self_info.tx_power","TX power",{unit:"dBm"}],["self_info.max_tx_power","Max TX power",{unit:"dBm"}],["device_info.path_hash_mode","Out path-hash mode",{fmt:v=>`${Number(v)+1} byte(s)/hop`}]]},{title:"Advertising",keys:[["self_info.adv_type","Advertised type"],["self_info.adv_lat","Latitude"],["self_info.adv_lon","Longitude"],["self_info.adv_loc_policy","Location-share policy"]]},{title:"Capacity",keys:[["device_info.max_channels","Max channels"],["device_info.max_contacts","Max contacts"]]},{title:"Battery / memory",keys:[["battery.level","Battery",{unit:"mV"}],["battery.total_kb","Total memory",{unit:"kB"}],["battery.used_kb","Used memory",{unit:"kB"}]]},{title:"Other",keys:[["device_info.ble_pin","BLE PIN"],["device_info.repeat","Repeater mode"],["self_info.manual_add_contacts","Manual contact add"],["self_info.multi_acks","Multi-acks"],["self_info.telemetry_mode_base","Telemetry: base"],["self_info.telemetry_mode_env","Telemetry: env"],["self_info.telemetry_mode_loc","Telemetry: location"]]}],de=new Set(W.flatMap(v=>v.keys.map(p=>p[0])));function d(v){if(v==null)return null;try{return JSON.parse(v)}catch{return v}}function m(v,p){const K=d(v.value);if(K==null||K==="")return"";if(p!=null&&p.fmt)return p.fmt(K);let ce=typeof K=="object"?JSON.stringify(K):String(K);return p!=null&&p.unit&&(ce=`${ce} ${p.unit}`),ce}const _=_e(()=>{const v=new Map;for(const p of s.value.radio||[])v.set(p.key,p);return v}),x=_e(()=>[...s.value.radio||[]].filter(v=>!de.has(v.key)).sort((v,p)=>v.key.localeCompare(p.key))),E={1:"Comp",2:"Rptr",3:"Room",4:"Sens"};function w(v){return v==null?"?":E[v]||String(v)}function M(v){return v&&v.length>14?`${v.slice(0,6)}...${v.slice(-6)}`:v||""}function T(v){if(!v)return"";const p=new Date(v*1e3),K=ce=>String(ce).padStart(2,"0");return`${p.getFullYear()}-${K(p.getMonth()+1)}-${K(p.getDate())} ${K(p.getHours())}:${K(p.getMinutes())}`}const I=_e(()=>o.value.filter(v=>v!=="public"&&v!=="blocked"));function A(v){return`${v.adv_name||"(unnamed)"} — ${v.public_key}`}function Y(){const v=h.value.sel.trim();if(!v)return"";const p=(s.value.contacts||[]).find(K=>A(K)===v);return p?p.public_key:/^[0-9a-fA-F]{64}$/.test(v)?v.toLowerCase():""}async function V(){const v=Y();if(!v){alert("Pick a contact from the list (or paste a 64-hex pubkey).");return}if(!h.value.group){alert("Choose an initial group.");return}i.value="",a.value="";try{await ae("/users",{method:"POST",json:{pubkey:v,group:h.value.group}}),a.value=`bot user created and added to ${h.value.group}`,h.value={sel:"",group:""},await P("users")}catch(p){alert(p.message)}}const G=ne(""),Q=ne(new Set),ie=ne(new Set),se=ne({col:"adv_name",dir:"asc"}),pe=ne(new Set),Ae=ne(null),Re=_e(()=>(s.value.contacts||[]).find(v=>v.public_key===Ae.value)||null);function lt(v){Ae.value=v.public_key}const rt=_e(()=>{const v=Re.value;if(!v)return[];let p;v.out_path_len===-1?p="flood (no path)":v.out_path_len===0?p="direct (0 hops)":v.out_path?p=`${v.out_path} (${v.out_path_len} hop${v.out_path_len===1?"":"s"})`:p=`${v.out_path_len??"?"} hop(s)`;const K=v.adv_lat!=null&&v.adv_lon!=null?`${v.adv_lat}, ${v.adv_lon}`:"—";return[["name",v.adv_name||"—",!1],["type",w(v.type),!1],["public key",v.public_key,!0],["flags",v.flags??"—",!1],["out path",p,!0],["path hash mode",v.out_path_hash_mode??"—",!1],["location (lat, lon)",K,!1],["last advert",T(v.last_advert)||"—",!1],["last modified",T(v.lastmod)||"—",!1],["first seen",T(v.first_seen_at)||"—",!1],["last synced",T(v.last_synced_at)||"—",!1]]}),Gt=_e(()=>[...ie.value].sort()),Hn=_e(()=>Q.value.size===0),Ge=v=>!Q.value.has(v);function it(v){Q.value=v?new Set:new Set(ie.value)}function Bn(v,p){const K=new Set(Q.value);p?K.delete(v):K.add(v),Q.value=K}function Kn(v){let p=null;for(const K of v){const ce=w(K.type);ie.value.has(ce)||(p=p||new Set(ie.value),p.add(ce))}p&&(ie.value=p)}function Xt(v){se.value.col===v?se.value={col:v,dir:se.value.dir==="asc"?"desc":"asc"}:se.value={col:v,dir:"asc"}}function ai(v){const p=new Set(pe.value);p.has(v)?p.delete(v):p.add(v),pe.value=p}const Rs=_e(()=>(s.value.contacts||[]).filter(v=>pe.value.has(v.public_key))),Ao=_e(()=>Rs.value.length>0);async function ci(){const v=Rs.value;if(!v.length)return;const p=v.map(at=>at.adv_name||at.public_key.slice(0,12)),K=p.slice(0,20).join(` +`),ce=p.length>20?` +…and ${p.length-20} more`:"";if(!confirm(`Delete ${v.length} contact(s)? + +${K}${ce}`))return;i.value="",a.value="";let y=0,D=0,$e="";for(const at of v)try{await ae(`/contacts/${encodeURIComponent(at.public_key)}`,{method:"DELETE"}),y++}catch(Os){D++,$e=`${Os.message} (${at.adv_name||at.public_key.slice(0,12)})`}pe.value=new Set,await P("contacts"),a.value=D?`Deleted ${y}, ${D} failed`:`Deleted ${y} contact(s)`,$e&&(i.value=$e)}const Ro=_e(()=>{const v=s.value.contacts||[],p=G.value.toLowerCase().trim(),K=Q.value,ce=v.filter(at=>K.size&&K.has(w(at.type))?!1:p?(at.public_key||"").toLowerCase().includes(p)||(at.adv_name||"").toLowerCase().includes(p):!0),{col:y,dir:D}=se.value,$e=D==="asc"?1:-1;return ce.sort((at,Os)=>{const hn=at[y],pn=Os[y];return hn==null&&pn==null?0:hn==null?1:pn==null?-1:typeof hn=="number"&&typeof pn=="number"?(hn-pn)*$e:String(hn).localeCompare(String(pn))*$e}),ce});function Oo(v){return v&&v.length?Object.keys(v[0]).filter(p=>!p.startsWith("_")):[]}function ui(v){return v==null?"":Array.isArray(v)?v.join(", "):typeof v=="object"?JSON.stringify(v):String(v)}function To(v,p){return p==="ts"&&v[p]?ri(v[p]):ui(v[p])}return bs(()=>N("stats")),(v,p)=>{var K,ce;return k(),C("div",cf,[c("div",uf,[p[20]||(p[20]=c("h3",null,"Manage",-1)),c("div",ff,[c("table",null,[c("tbody",null,[(k(),C(Z,null,me(t,y=>c("tr",{key:y.key,class:Qe(["clickable",{selected:n.value===y.key}]),onClick:D=>N(y.key)},[c("td",null,R(y.label),1)],10,df)),64))])])])]),c("div",hf,[c("h3",null,R((K=t.find(y=>y.key===n.value))==null?void 0:K.label),1),i.value||a.value?(k(),C("div",pf,[i.value?(k(),C("span",mf,R(i.value),1)):Ee("",!0),a.value?(k(),C("span",vf,R(a.value),1)):Ee("",!0)])):Ee("",!0),c("div",gf,[n.value==="stats"&&s.value.stats?(k(),C("div",_f,[c("div",yf,[p[21]||(p[21]=c("div",{class:"k"},"identity",-1)),c("div",bf,R(((ce=s.value.stats.identity)==null?void 0:ce.pubkey)||"—"),1),p[22]||(p[22]=c("div",{class:"k"},"events seen",-1)),c("div",null,R(s.value.stats.event_count),1),p[23]||(p[23]=c("div",{class:"k"},"commands loaded",-1)),c("div",null,R(s.value.stats.commands_loaded),1)]),p[24]||(p[24]=c("h4",null,"Counts",-1)),c("div",wf,[(k(!0),C(Z,null,me(s.value.stats.counts,(y,D)=>(k(),C(Z,{key:D},[c("div",xf,R(D),1),c("div",null,R(y),1)],64))),128))])])):n.value==="radio"?(k(),C("div",kf,[c("div",Cf,[c("label",Sf,[je(c("input",{type:"radio",value:"zero","onUpdate:modelValue":p[0]||(p[0]=y=>te.value=y)},null,512),[[ul,te.value]]),p[25]||(p[25]=ge(" Zero hop ",-1))]),c("label",Ef,[je(c("input",{type:"radio",value:"flood","onUpdate:modelValue":p[1]||(p[1]=y=>te.value=y)},null,512),[[ul,te.value]]),p[26]||(p[26]=ge(" Flood ",-1))]),c("button",{disabled:fe.value,onClick:dt},R(fe.value?"Sending…":"Advert"),9,Af),p[27]||(p[27]=c("span",{class:"muted"}," Zero-hop reaches direct neighbors only; flood propagates through the mesh. ",-1))]),c("div",Rf,[c("label",Of,[p[28]||(p[28]=ge(" Flood advert interval (hours) ",-1)),je(c("input",{type:"number",min:"0","onUpdate:modelValue":p[2]||(p[2]=y=>Xe.value=y),style:{width:"5em"}},null,512),[[et,Xe.value,void 0,{number:!0}]])]),c("button",{onClick:Fe},"Apply"),p[29]||(p[29]=c("span",{class:"muted"}," 0 = disabled. Bot sends a flood advert every N hours; persists in the database (mcbot.conf only seeds the first-run default). ",-1))]),c("div",Tf,[c("div",Pf,[p[30]||(p[30]=c("strong",null,"Contact table",-1)),c("button",{disabled:ot.value,onClick:S},R(ot.value?"Checking…":"Check contact table"),9,If),p[31]||(p[31]=c("span",{class:"muted"},"Reads the radio's contact list (takes a few seconds).",-1))]),Be.value?(k(),C("div",Nf,[c("div",$f,[p[32]||(p[32]=c("div",{class:"k"},"Used / max",-1)),c("div",null,[ge(R(Be.value.used)+" / "+R(Be.value.max??"?")+" ",1),c("span",Mf,"("+R(Be.value.free??"?")+" free)",1)]),p[33]||(p[33]=c("div",{class:"k"},"Protected / evictable",-1)),c("div",null,R(Be.value.protected)+" protected, "+R(Be.value.eligible)+" evictable",1),p[34]||(p[34]=c("div",{class:"k"},"Firmware autoadd byte",-1)),c("div",Df,R(Be.value.autoadd_raw??"n/a"),1)]),c("div",Lf,[c("label",jf,[je(c("input",{type:"checkbox","onUpdate:modelValue":p[3]||(p[3]=y=>Ne.value.enabled=y)},null,512),[[Rc,Ne.value.enabled]]),p[35]||(p[35]=ge(" Auto-evict (startup + when full) ",-1))]),c("label",Vf,[p[36]||(p[36]=ge(" Headroom ",-1)),je(c("input",{type:"number",min:"1",max:"100","onUpdate:modelValue":p[4]||(p[4]=y=>Ne.value.headroom=y),style:{width:"4em"}},null,512),[[et,Ne.value.headroom,void 0,{number:!0}]])]),c("button",{onClick:U},"Apply"),c("button",{disabled:Ke.value,onClick:L},R(Ke.value?"Evicting…":"Evict to headroom now"),9,Ff)]),p[37]||(p[37]=c("p",{class:"muted",style:{margin:"4px 12px 8px"}}," Evicts the stalest contacts from the radio (bot users, owners, and recent DM peers are protected; the bot's database keeps the full archive). Policy changes here are runtime only — set radio_evict_* in mcbot.conf to persist across restarts. ",-1))])):Ee("",!0)]),c("div",Uf,[(k(),C(Z,null,me(W,y=>(k(),C(Z,{key:y.title},[c("h4",Hf,R(y.title),1),c("div",Bf,[(k(!0),C(Z,null,me(y.keys,D=>{var $e;return k(),C(Z,{key:D[0]},[c("div",Kf,R(D[1]),1),c("div",{class:Qe({mono:($e=D[2])==null?void 0:$e.mono})},R(m(_.value.get(D[0])||{},D[2])||"—"),3)],64)}),128))])],64))),64)),x.value.length?(k(),C(Z,{key:0},[p[38]||(p[38]=c("h4",{style:{margin:"12px 0 4px"}},"Unrecognized",-1)),c("div",Gf,[(k(!0),C(Z,null,me(x.value,y=>(k(),C(Z,{key:y.key},[c("div",Wf,R(y.key),1),c("div",null,R(m(y)||"—"),1)],64))),128))])],64)):Ee("",!0)])])):n.value==="channels"?(k(),C("div",qf,[c("div",zf,[je(c("input",{"onUpdate:modelValue":p[5]||(p[5]=y=>f.value.name=y),placeholder:"name (e.g. #bot or MyChan)",style:{flex:"1"}},null,512),[[et,f.value.name]]),je(c("input",{"onUpdate:modelValue":p[6]||(p[6]=y=>f.value.key=y),placeholder:"hex key (non-# only)",style:{flex:"1"}},null,512),[[et,f.value.key]]),c("button",{onClick:j},"Add channel")]),c("table",null,[p[39]||(p[39]=c("thead",null,[c("tr",null,[c("th",null,"idx"),c("th",null,"name"),c("th",null,"secret"),c("th")])],-1)),c("tbody",null,[(k(!0),C(Z,null,me(s.value.channels,y=>(k(),C("tr",{key:y.channel_idx},[c("td",null,R(y.channel_idx),1),c("td",null,R(y.name),1),c("td",Jf,R((y.secret_hex||"").slice(0,12))+"…",1),c("td",null,[c("button",{onClick:D=>z(y.name)},"remove",8,Yf)])]))),128))])])])):n.value==="users"?(k(),C("div",Qf,[c("div",Xf,[je(c("input",{"onUpdate:modelValue":p[7]||(p[7]=y=>h.value.sel=y),list:"newUserContacts",placeholder:"add bot user: search a contact…",style:{flex:"0 0 320px"}},null,512),[[et,h.value.sel]]),c("datalist",Zf,[(k(!0),C(Z,null,me(s.value.contacts||[],y=>(k(),C("option",{key:y.public_key,value:A(y)},null,8,ed))),128))]),je(c("select",{"onUpdate:modelValue":p[8]||(p[8]=y=>h.value.group=y)},[p[40]||(p[40]=c("option",{value:""},"initial group…",-1)),(k(!0),C(Z,null,me(I.value,y=>(k(),C("option",{key:y,value:y},R(y),9,td))),128))],512),[[Oc,h.value.group]]),c("button",{disabled:!Y()||!h.value.group,onClick:V}," Add bot user ",8,nd)]),c("table",null,[p[42]||(p[42]=c("thead",null,[c("tr",null,[c("th",null,"name"),c("th",null,"pubkey"),c("th",{style:{width:"130px"}},"add group"),c("th",null,"groups"),c("th",null,"actions")])],-1)),c("tbody",null,[(k(!0),C(Z,null,me(s.value.users,y=>(k(),C("tr",{key:y.pubkey},[c("td",null,R(y.name||"?"),1),c("td",sd,R(y.pubkey.slice(0,12)),1),c("td",null,[c("select",{onChange:D=>{ue(y.pubkey,D.target.value),D.target.value=""}},[p[41]||(p[41]=c("option",{value:""},"+ group…",-1)),(k(!0),C(Z,null,me(o.value,D=>(k(),C("option",{key:D,value:D},R(D),9,ld))),128))],40,od)]),c("td",rd,[(k(!0),C(Z,null,me(y.groups,D=>(k(),C("span",{key:D,class:"tag"},[ge(R(D)+" ",1),c("a",{href:"#",onClick:zn($e=>le(y.pubkey,D),["prevent"]),title:"remove"},"×",8,id)]))),128))]),c("td",ad,[c("button",{onClick:D=>re(y.pubkey,y.name)},"rename",8,cd),c("button",{onClick:D=>J(y)},R((y.groups||[]).includes("blocked")?"unblock":"block"),9,ud),c("button",{onClick:D=>B(y.pubkey,y.name)},"delete",8,fd)])]))),128))])])])):n.value==="groups"?(k(),C("div",dd,[c("div",hd,[je(c("input",{"onUpdate:modelValue":p[9]||(p[9]=y=>u.value.name=y),placeholder:"new group name"},null,512),[[et,u.value.name]]),je(c("input",{"onUpdate:modelValue":p[10]||(p[10]=y=>u.value.commands=y),placeholder:"commands (comma list, optional)",style:{flex:"1"}},null,512),[[et,u.value.commands]]),c("button",{onClick:he},"Create group")]),c("table",null,[p[45]||(p[45]=c("thead",null,[c("tr",null,[c("th",null,"name"),c("th",null,"users"),c("th",{title:"Every user is a member (the * membership)"},"all users"),c("th",{style:{width:"150px"}},"grant command"),c("th",null,"commands"),c("th")])],-1)),c("tbody",null,[(k(!0),C(Z,null,me(s.value.groups,y=>(k(),C("tr",{key:y.name},[c("td",null,[ge(R(y.name),1),y.is_system?(k(),C("span",pd," [sys]")):Ee("",!0)]),c("td",null,[ge(R(y.nusers),1),y.all_users?(k(),C("span",md," +*")):Ee("",!0)]),c("td",null,[c("input",{type:"checkbox",checked:y.all_users,disabled:y.name==="blocked",title:"Include all users (*) in this group",onChange:D=>xe(y.name,D.target.checked)},null,40,vd)]),c("td",null,[c("select",{onChange:D=>{Ce(y.name,D.target.value),D.target.value=""}},[p[43]||(p[43]=c("option",{value:""},"+ command…",-1)),p[44]||(p[44]=c("option",{value:"*"},"* (all commands)",-1)),(k(!0),C(Z,null,me(l.value,D=>(k(),C("option",{key:D,value:D},R(D),9,_d))),128))],40,gd)]),c("td",yd,[(k(!0),C(Z,null,me(y.commands,D=>(k(),C("span",{key:D,class:"tag"},[ge(R(D)+" ",1),c("a",{href:"#",onClick:zn($e=>Ie(y.name,D),["prevent"]),title:"revoke"},"×",8,bd)]))),128))]),c("td",null,[c("button",{disabled:y.is_system,onClick:D=>X(y.name)},"delete",8,wd)])]))),128))])])])):n.value==="command-config"?(k(),C("div",xd,[c("table",null,[p[47]||(p[47]=c("thead",null,[c("tr",null,[c("th",null,"command"),c("th",null,"enabled"),c("th",null,"allow_dm"),c("th",null,"dm_only"),c("th",null,"cooldown"),c("th",{style:{width:"140px"}},"allow channel"),c("th",null,"allowed channels")])],-1)),c("tbody",null,[(k(!0),C(Z,null,me(s.value["command-config"],y=>(k(),C("tr",{key:y.command},[c("td",null,R(y.command),1),c("td",null,[c("input",{type:"checkbox",checked:!!y.enabled,onChange:D=>$(y.command,{enabled:D.target.checked})},null,40,kd)]),c("td",null,[c("input",{type:"checkbox",checked:!!y.allow_dm,onChange:D=>$(y.command,{allow_dm:D.target.checked})},null,40,Cd)]),c("td",null,[c("input",{type:"checkbox",checked:!!y.dm_only,onChange:D=>$(y.command,{dm_only:D.target.checked})},null,40,Sd)]),c("td",null,[c("input",{type:"number",value:y.cooldown_seconds,style:{width:"64px"},onChange:D=>$(y.command,{cooldown_seconds:Number(D.target.value)})},null,40,Ed)]),c("td",null,[c("select",{onChange:D=>{H(y,D.target.value),D.target.value=""}},[p[46]||(p[46]=c("option",{value:""},"+ channel…",-1)),(k(!0),C(Z,null,me(r.value,D=>(k(),C("option",{key:D,value:D},R(D),9,Rd))),128))],40,Ad)]),c("td",Od,[y._chans.length?Ee("",!0):(k(),C("span",Td,"(any)")),(k(!0),C(Z,null,me(y._chans,D=>(k(),C("span",{key:D,class:"tag"},[ge(R(D)+" ",1),c("a",{href:"#",onClick:zn($e=>O(y,D),["prevent"]),title:"remove"},"×",8,Pd)]))),128))])]))),128))])])])):n.value==="contacts"?(k(),C("div",Id,[c("div",Nd,[c("div",$d,[je(c("input",{"onUpdate:modelValue":p[11]||(p[11]=y=>G.value=y),placeholder:"search name or pubkey…",style:{flex:"0 0 260px"}},null,512),[[et,G.value]]),c("label",Md,[c("input",{type:"checkbox",checked:Hn.value,onChange:p[12]||(p[12]=y=>it(y.target.checked))},null,40,Dd),p[48]||(p[48]=ge(" All ",-1))]),(k(!0),C(Z,null,me(Gt.value,y=>(k(),C("label",{key:y,class:"chk"},[c("input",{type:"checkbox",checked:Ge(y),onChange:D=>Bn(y,D.target.checked)},null,40,Ld),ge(" "+R(y),1)]))),128)),c("button",{disabled:!Ao.value,onClick:ci}," Delete"+R(Ao.value?` (${Rs.value.length})`:""),9,jd),c("span",Vd,R(Ro.value.length)+" shown",1)]),c("div",Fd,[c("table",null,[c("thead",null,[c("tr",null,[p[55]||(p[55]=c("th",{style:{width:"24px"}},null,-1)),c("th",{class:"sortable",onClick:p[13]||(p[13]=y=>Xt("public_key"))},[p[49]||(p[49]=ge(" pubkey",-1)),se.value.col==="public_key"?(k(),C("span",Ud,R(se.value.dir==="asc"?"▲":"▼"),1)):Ee("",!0)]),c("th",{class:"sortable",onClick:p[14]||(p[14]=y=>Xt("adv_name"))},[p[50]||(p[50]=ge(" name",-1)),se.value.col==="adv_name"?(k(),C("span",Hd,R(se.value.dir==="asc"?"▲":"▼"),1)):Ee("",!0)]),c("th",{class:"sortable",onClick:p[15]||(p[15]=y=>Xt("type"))},[p[51]||(p[51]=ge(" type",-1)),se.value.col==="type"?(k(),C("span",Bd,R(se.value.dir==="asc"?"▲":"▼"),1)):Ee("",!0)]),c("th",{class:"sortable",onClick:p[16]||(p[16]=y=>Xt("adv_lat"))},[p[52]||(p[52]=ge(" lat",-1)),se.value.col==="adv_lat"?(k(),C("span",Kd,R(se.value.dir==="asc"?"▲":"▼"),1)):Ee("",!0)]),c("th",{class:"sortable",onClick:p[17]||(p[17]=y=>Xt("adv_lon"))},[p[53]||(p[53]=ge(" lon",-1)),se.value.col==="adv_lon"?(k(),C("span",Gd,R(se.value.dir==="asc"?"▲":"▼"),1)):Ee("",!0)]),c("th",{class:"sortable",onClick:p[18]||(p[18]=y=>Xt("last_synced_at"))},[p[54]||(p[54]=ge(" last synced",-1)),se.value.col==="last_synced_at"?(k(),C("span",Wd,R(se.value.dir==="asc"?"▲":"▼"),1)):Ee("",!0)])])]),c("tbody",null,[(k(!0),C(Z,null,me(Ro.value,y=>(k(),C("tr",{key:y.public_key,class:Qe(["clickable",{selected:Re.value&&Re.value.public_key===y.public_key}]),onClick:D=>lt(y)},[c("td",null,[c("input",{type:"checkbox",checked:pe.value.has(y.public_key),onChange:D=>ai(y.public_key),onClick:p[19]||(p[19]=zn(()=>{},["stop"]))},null,40,zd)]),c("td",{class:"mono",title:y.public_key},R(M(y.public_key)),9,Jd),c("td",null,R(y.adv_name||""),1),c("td",null,R(w(y.type)),1),c("td",null,R(y.adv_lat??""),1),c("td",null,R(y.adv_lon??""),1),c("td",null,R(T(y.last_synced_at)),1)],10,qd))),128))])])])]),c("div",Yd,[p[56]||(p[56]=c("h3",null,"Contact",-1)),c("div",Qd,[Re.value?(k(),C("div",Zd,[c("div",eh,[(k(!0),C(Z,null,me(rt.value,y=>(k(),C(Z,{key:y[0]},[c("div",th,R(y[0]),1),c("div",{class:Qe({mono:y[2]}),style:{"word-break":"break-all"}},R(y[1]),3)],64))),128))])])):(k(),C("div",Xd,"select a contact"))])])])):Array.isArray(s.value[n.value])?(k(),C("table",nh,[c("thead",null,[c("tr",null,[(k(!0),C(Z,null,me(Oo(s.value[n.value]),y=>(k(),C("th",{key:y},R(y),1))),128))])]),c("tbody",null,[(k(!0),C(Z,null,me(s.value[n.value],(y,D)=>(k(),C("tr",{key:D},[(k(!0),C(Z,null,me(Oo(s.value[n.value]),$e=>(k(),C("td",{key:$e,title:To(y,$e)},R(To(y,$e)),9,sh))),128))]))),128))])])):(k(),C("div",oh,"loading…"))])])])}}},rh=af(lh,[["__scopeId","data-v-6d1bbf98"]]),ih={class:"panes"},ah={class:"side-col"},ch={class:"pane",style:{flex:"1 1 0","min-height":"160px"}},uh={class:"body"},fh=["onClick"],dh={class:"muted"},hh={class:"pane",style:{flex:"1 1 0","min-height":"200px"}},ph={class:"toolbar"},mh={class:"body"},vh=["onClick"],gh={class:"muted mono"},_h={class:"pane",style:{flex:"1"}},yh={key:0,class:"err",style:{padding:"10px"}},bh={key:1,class:"empty"},wh={class:"meta"},xh={class:"who"},kh={key:0},Ch=["href"],Sh={key:1,class:"mention"},Eh={class:"toolbar"},Ah=["placeholder","disabled"],Rh=["disabled"],Oh={key:0,class:"err",style:{padding:"0 12px 8px"}},Th={__name:"Messages",setup(e){const t=ne([]),n=ne(null),s=ne(null),o=ne([]),l=ne(null),r=ne([]),i=ne(""),a=ne(""),f=ne(""),u=ne(!1),h=ne("");let g=null;const b=_e(()=>{const B=i.value.toLowerCase();return B?r.value.filter(J=>(J.adv_name||"").toLowerCase().includes(B)||(J.public_key||"").toLowerCase().includes(B)):r.value}),N=_e(()=>{if(typeof n.value=="number"){const B=t.value.find(J=>J.channel_idx===n.value);return{kind:"channel",idx:n.value,label:(B==null?void 0:B.name)||`#${n.value}`}}return n.value==="dm"&&s.value?{kind:"dm",pubkey:s.value.public_key,label:s.value.adv_name||s.value.public_key.slice(0,12)}:null}),P=_e(()=>N.value?`Message ${N.value.label}…`:"Pick a channel or a contact to send to…");async function F(){t.value=(await ae("/channels")).items,n.value===null&&t.value.length&&H(t.value[0].channel_idx)}async function q(){r.value=(await ae("/contacts?limit=500")).items}async function $(){await Vn();const B=l.value;B&&(B.scrollTop=B.scrollHeight)}async function H(B){n.value=B,s.value=null;const J=await ae(`/channel-messages?channel_idx=${B}&limit=100`);o.value=J.items.slice().reverse(),await $()}async function O(){n.value="dm",s.value=null;const B=await ae("/direct-messages?limit=100");o.value=B.items.slice().reverse(),await $()}async function j(B){n.value="dm",s.value=B;const J=await ae(`/direct-messages?pubkey=${encodeURIComponent(B.public_key)}&limit=100`);o.value=J.items.slice().reverse(),await $()}async function z(){const B=f.value.trim();if(!(!B||!N.value||u.value)){u.value=!0,h.value="";try{N.value.kind==="channel"?await ae("/send/channel",{method:"POST",json:{channel_idx:N.value.idx,text:B}}):await ae("/send/dm",{method:"POST",json:{pubkey:N.value.pubkey,text:B}}),f.value=""}catch(J){h.value=J.message}finally{u.value=!1}}}function ue(B,J){if(!B||!J)return B||"";const he=`${J}: `;return B.startsWith(he)?B.slice(he.length):B}const le=/(https?:\/\/[^\s<>]+)|@\[([^\]]+)\]/g;function re(B){const J=ue(B.text,B.sender_name),he=[];let X=0,Ce;for(le.lastIndex=0;(Ce=le.exec(J))!==null;){if(Ce.index>X&&he.push({type:"text",value:J.slice(X,Ce.index)}),Ce[1]){const Ie=Ce[1].match(/^(.*?)([.,;:!?)]+)$/);Ie?(he.push({type:"link",value:Ie[1]}),he.push({type:"text",value:Ie[2]})):he.push({type:"link",value:Ce[1]})}else he.push({type:"mention",value:Ce[2]});X=le.lastIndex}return X{try{await F(),await q()}catch(B){a.value=B.message}g=new WebSocket(oi("/ws/messages")),g.onmessage=B=>{const J=JSON.parse(B.data),he=l.value,X=he?he.scrollHeight-he.scrollTop-he.clientHeight<60:!0;let Ce=!1;n.value==="dm"&&J.kind==="dm"?(!s.value||J.sender_pubkey===s.value.public_key)&&(o.value.push(J),Ce=!0):J.kind==="channel"&&J.channel_idx===n.value&&(o.value.push(J),Ce=!0),o.value.length>300&&o.value.shift(),Ce&&X&&$()}}),ws(()=>g&&g.close()),(B,J)=>{var he;return k(),C("div",ih,[c("div",ah,[c("div",ch,[J[3]||(J[3]=c("h3",null,"Channels",-1)),c("div",uh,[c("table",null,[c("tbody",null,[(k(!0),C(Z,null,me(t.value,X=>(k(),C("tr",{key:X.channel_idx,class:Qe(["clickable",{selected:n.value===X.channel_idx}]),onClick:Ce=>H(X.channel_idx)},[c("td",null,[ge(R(X.name)+" ",1),c("span",dh,"#"+R(X.channel_idx),1)])],10,fh))),128)),c("tr",{class:Qe(["clickable",{selected:n.value==="dm"&&!s.value}]),onClick:O},[...J[2]||(J[2]=[c("td",null,"✉ Direct messages",-1)])],2)])])])]),c("div",hh,[c("h3",null,"Contacts ("+R(r.value.length)+")",1),c("div",ph,[je(c("input",{"onUpdate:modelValue":J[0]||(J[0]=X=>i.value=X),placeholder:"search",style:{flex:"1"}},null,512),[[et,i.value]])]),c("div",mh,[c("table",null,[c("tbody",null,[(k(!0),C(Z,null,me(b.value,X=>(k(),C("tr",{key:X.public_key,class:Qe(["clickable",{selected:s.value&&s.value.public_key===X.public_key}]),onClick:Ce=>j(X),title:"Open a DM conversation with this contact"},[c("td",null,[ge(R(X.adv_name||"(unnamed)"),1),J[4]||(J[4]=c("br",null,null,-1)),c("span",gh,R(X.public_key.slice(0,12)),1)])],10,vh))),128))])])])])]),c("div",_h,[c("h3",null,R(n.value==="dm"?s.value?`DM · ${s.value.adv_name||s.value.public_key.slice(0,12)}`:"Direct messages":((he=t.value.find(X=>X.channel_idx===n.value))==null?void 0:he.name)||"Messages"),1),c("div",{class:"body",ref_key:"msgBody",ref:l},[a.value?(k(),C("div",yh,R(a.value),1)):Ee("",!0),o.value.length?Ee("",!0):(k(),C("div",bh,"no messages")),(k(!0),C(Z,null,me(o.value,X=>{var Ce;return k(),C("div",{key:X.id,class:Qe(["msg",{out:X.is_outgoing}])},[c("div",wh,[c("span",xh,R(X.is_outgoing?"→ me":X.sender_name||((Ce=X.sender_pubkey)==null?void 0:Ce.slice(0,12))||"?"),1),ge(" · "+R(kt(li)(X.received_at))+" ",1),X.snr!=null?(k(),C("span",kh,"· snr "+R(X.snr),1)):Ee("",!0)]),c("div",null,[(k(!0),C(Z,null,me(re(X),(Ie,xe)=>(k(),C(Z,{key:xe},[Ie.type==="link"?(k(),C("a",{key:0,href:Ie.value,target:"_blank",rel:"noopener noreferrer"},R(Ie.value),9,Ch)):Ie.type==="mention"?(k(),C("span",Sh,"@["+R(Ie.value)+"]",1)):(k(),C(Z,{key:2},[ge(R(Ie.value),1)],64))],64))),128))])],2)}),128))],512),c("div",Eh,[je(c("input",{style:{flex:"1"},placeholder:P.value,"onUpdate:modelValue":J[1]||(J[1]=X=>f.value=X),disabled:!N.value||u.value,onKeyup:Zn(z,["enter"])},null,40,Ah),[[et,f.value]]),c("button",{disabled:!N.value||u.value||!f.value.trim(),onClick:z},R(u.value?"Sending…":"Send"),9,Rh)]),h.value?(k(),C("div",Oh,R(h.value),1)):Ee("",!0)])])}}},Ph={class:"hexdump"},Ih=["onMouseenter"],Nh={key:0},$h={key:1},Mh={key:0,class:"empty"},Dh={__name:"HexDump",props:{hex:{type:String,default:""},activeRange:{type:Object,default:null}},emits:["hover-offset"],setup(e,{emit:t}){const n=e,s=t,o=_e(()=>{const r=(n.hex||"").replace(/\s+/g,""),i=[];for(let a=0;a+2<=r.length;a+=2)i.push(r.slice(a,a+2));return i});function l(r){const i=n.activeRange;return i&&r>=i.offset&&r(k(),C("div",Ph,[(k(!0),C(Z,null,me(o.value,(a,f)=>(k(),C("span",{key:f,class:Qe(["hexbyte",{active:l(f)}]),onMouseenter:u=>s("hover-offset",f),onMouseleave:i[0]||(i[0]=u=>s("hover-offset",null))},[ge(R(a),1),(f+1)%16===0?(k(),C("span",Nh,[...i[1]||(i[1]=[c("br",null,null,-1)])])):(k(),C("span",$h))],42,Ih))),128)),o.value.length?Ee("",!0):(k(),C("div",Mh,"no raw bytes"))]))}},Lh=["onMouseenter"],jh={class:"fname"},Vh={class:"fmeta"},Fh={class:"fval"},Uh={key:0,class:"fval muted"},Hh={key:1,class:"fmeta"},Bh={key:0,class:"decoded"},Kh={class:"kv"},Gh={class:"k"},Wh={class:"mono"},qh={__name:"FieldBreakout",props:{fields:{type:Array,default:()=>[]},decoded:{type:Object,default:null},activeIndex:{type:Number,default:-1}},emits:["hover-field"],setup(e,{emit:t}){const n=t;function s(r){return r==="timestamp"||r.endsWith("_timestamp")||r.endsWith("_at")}function o(r,i){return s(r)?ri(i):l(i)}function l(r){return r==null?"":typeof r=="object"?JSON.stringify(r):String(r)}return(r,i)=>(k(),C("div",null,[(k(!0),C(Z,null,me(e.fields,(a,f)=>(k(),C("div",{key:f,class:Qe(["field-row",{active:f===e.activeIndex}]),onMouseenter:u=>n("hover-field",f),onMouseleave:i[0]||(i[0]=u=>n("hover-field",-1))},[c("div",jh,R(a.name),1),c("div",Vh,"offset "+R(a.offset)+" · "+R(a.length)+" byte(s)",1),c("div",Fh,R(a.hex),1),a.value!==null&&a.value!==void 0?(k(),C("div",Uh,R(l(a.value)),1)):Ee("",!0),a.description?(k(),C("div",Hh,R(a.description),1)):Ee("",!0)],42,Lh))),128)),e.decoded?(k(),C("div",Bh,[i[1]||(i[1]=c("h4",{style:{margin:"6px 0"}},"Decoded payload",-1)),c("div",Kh,[(k(!0),C(Z,null,me(e.decoded,(a,f)=>(k(),C(Z,{key:f},[c("div",Gh,R(f),1),c("div",Wh,R(o(f,a)),1)],64))),128))])])):Ee("",!0)]))}},zh={class:"panes"},Jh={class:"pane",style:{flex:"1.3"}},Yh={class:"toolbar"},Qh={class:"chk"},Xh=["checked"],Zh=["checked","onChange"],ep={class:"muted"},tp={key:0,class:"err"},np={class:"body"},sp=["onClick"],op={class:"pane",style:{flex:"1"}},lp={class:"body"},rp={key:0,class:"empty"},ip={key:1,class:"empty"},ap={key:0,class:"err",style:{padding:"0 12px"}},cp={key:3,class:"empty"},up={__name:"Packets",setup(e){const t=ne([]),n=ne(new Set),s=ne(new Set),o=ne(null),l=ne(null),r=ne(-1),i=ne("");let a=null;const f=_e(()=>[...s.value].sort()),u=_e(()=>n.value.size===0),h=O=>!n.value.has(O),g=_e(()=>n.value.size===0?t.value:t.value.filter(O=>!n.value.has(O.packet_type)));function b(O){let j=null;for(const z of O)z.packet_type&&!s.value.has(z.packet_type)&&(j=j||new Set(s.value),j.add(z.packet_type));j&&(s.value=j)}function N(O){n.value=O?new Set:new Set(s.value)}function P(O,j){const z=new Set(n.value);j?z.delete(O):z.add(O),n.value=z}const F=_e(()=>{if(!l.value||r.value<0)return null;const O=l.value.fields[r.value];return O?{offset:O.offset,length:O.length}:null});async function q(){try{const O=await ae("/packets?limit=200");t.value=O.items,b(O.items)}catch(O){i.value=O.message}}async function $(O){if(o.value=O,l.value=null,r.value=-1,!!O.has_raw)try{l.value=await ae("/packets/decode",{method:"POST",json:{packet_id:O.id}})}catch(j){i.value=j.message}}function H(O){if(O===null||!l.value){r.value=-1;return}const j=l.value.fields.findIndex(z=>O>=z.offset&&O{q(),a=new WebSocket(oi("/ws/packets")),a.onmessage=O=>{const j=JSON.parse(O.data);t.value.unshift(j),t.value.length>500&&t.value.pop(),b([j])}}),ws(()=>a&&a.close()),(O,j)=>(k(),C("div",zh,[c("div",Jh,[j[4]||(j[4]=c("h3",null,"Packets (live)",-1)),c("div",Yh,[c("label",Qh,[c("input",{type:"checkbox",checked:u.value,onChange:j[0]||(j[0]=z=>N(z.target.checked))},null,40,Xh),j[2]||(j[2]=ge(" All ",-1))]),(k(!0),C(Z,null,me(f.value,z=>(k(),C("label",{key:z,class:"chk"},[c("input",{type:"checkbox",checked:h(z),onChange:ue=>P(z,ue.target.checked)},null,40,Zh),ge(" "+R(z),1)]))),128)),c("span",ep,R(g.value.length)+" shown",1),i.value?(k(),C("span",tp,R(i.value),1)):Ee("",!0)]),c("div",np,[c("table",null,[j[3]||(j[3]=c("thead",null,[c("tr",null,[c("th",null,"time"),c("th",null,"type"),c("th",null,"from"),c("th",null,"ch"),c("th",null,"text"),c("th",null,"raw")])],-1)),c("tbody",null,[(k(!0),C(Z,null,me(g.value,z=>(k(),C("tr",{key:z.id,class:Qe(["clickable",{selected:o.value&&o.value.id===z.id}]),onClick:ue=>$(z)},[c("td",null,R(kt(li)(z.received_at)),1),c("td",null,R(z.packet_type),1),c("td",null,R(z.sender_name||z.sender_pubkey_prefix||""),1),c("td",null,R(z.channel_idx??""),1),c("td",null,R(z.text||""),1),c("td",null,R(z.has_raw?"●":""),1)],10,sp))),128))])])])]),c("div",op,[j[6]||(j[6]=c("h3",null,"Inspector",-1)),c("div",lp,[o.value?o.value.has_raw?l.value?(k(),C(Z,{key:2},[Le(Dh,{hex:l.value.raw_hex,"active-range":F.value,onHoverOffset:H},null,8,["hex","active-range"]),l.value.error?(k(),C("div",ap,R(l.value.error),1)):Ee("",!0),Le(qh,{fields:l.value.fields,decoded:l.value.decoded,"active-index":r.value,onHoverField:j[1]||(j[1]=z=>r.value=z)},null,8,["fields","decoded","active-index"])],64)):(k(),C("div",cp,"decoding…")):(k(),C("div",ip,[...j[5]||(j[5]=[ge(" no raw bytes for this packet",-1),c("br",null,null,-1),c("span",{class:"muted"},"(only RX_LOG_DATA packets carry on-air bytes)",-1)])])):(k(),C("div",rp,"select a packet"))])])]))}},fp=[{path:"/login",component:rf,meta:{public:!0}},{path:"/",redirect:"/messages"},{path:"/manage",component:rh},{path:"/messages",component:Th},{path:"/packets",component:up}],ii=Qu({history:Ou(),routes:fp});ii.beforeEach(e=>{const t=Un();if(!e.meta.public&&!t.token)return"/login";if(e.path==="/login"&&t.token)return"/"});Mc(tf).use(jc()).use(ii).mount("#app"); diff --git a/webapi/static/assets/index-DMY7Y8d2.css b/webapi/static/assets/index-DGkh-RoD.css similarity index 97% rename from webapi/static/assets/index-DMY7Y8d2.css rename to webapi/static/assets/index-DGkh-RoD.css index 96148e7..19f9b20 100644 --- a/webapi/static/assets/index-DMY7Y8d2.css +++ b/webapi/static/assets/index-DGkh-RoD.css @@ -1 +1 @@ -.contacts-split[data-v-089f2d2f]{display:flex;gap:10px;height:100%;min-height:0;padding:10px;box-sizing:border-box}.contact-detail[data-v-089f2d2f]{flex:1;min-width:240px;max-width:440px}:root{--bg: #0f1419;--panel: #161c24;--panel2: #1c242e;--border: #2a3340;--text: #cdd6e0;--muted: #7d8a99;--accent: #4aa3ff;--accent-dim: #1f3a55;--ok: #4ec98a;--warn: #e0b341;--err: #e06b6b;--mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace}*{box-sizing:border-box}html,body,#app{height:100%;margin:0}body{background:var(--bg);color:var(--text);font:14px/1.45 system-ui,-apple-system,Segoe UI,Roboto,sans-serif}a{color:var(--accent);text-decoration:none}#app{display:flex;flex-direction:column}.nav{display:flex;align-items:center;gap:4px;padding:8px 14px;background:var(--panel);border-bottom:1px solid var(--border)}.nav .brand{font-weight:700;margin-right:16px;color:#fff}.nav a{padding:6px 12px;border-radius:6px;color:var(--muted)}.nav a.router-link-active{background:var(--accent-dim);color:#fff}.nav .spacer{flex:1}.nav .who{color:var(--muted);font-size:12px;margin-right:10px}.page{flex:1;min-height:0;padding:14px;overflow:auto}.panes{flex:1;min-height:0;display:flex;gap:10px;padding:10px}.pane{background:var(--panel);border:1px solid var(--border);border-radius:8px;display:flex;flex-direction:column;min-height:0;overflow:hidden}.pane>h3{margin:0;padding:8px 12px;font-size:12px;text-transform:uppercase;letter-spacing:.04em;color:var(--muted);border-bottom:1px solid var(--border)}.pane>.body{flex:1;min-height:0;overflow:auto}.side-col{flex:0 0 240px;display:flex;flex-direction:column;gap:10px;min-height:0}button{background:var(--accent-dim);color:#fff;border:1px solid var(--border);border-radius:6px;padding:6px 12px;cursor:pointer;font:inherit}button:hover{border-color:var(--accent)}button:disabled{opacity:.5;cursor:not-allowed}input,select,textarea{background:var(--panel2);color:var(--text);border:1px solid var(--border);border-radius:6px;padding:6px 9px;font:inherit}input:focus,select:focus,textarea:focus{outline:1px solid var(--accent)}table{width:100%;border-collapse:collapse;font-size:13px}th,td{text-align:left;padding:5px 9px;border-bottom:1px solid var(--border);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:320px}th{color:var(--muted);position:sticky;top:0;background:var(--panel)}th.sortable{cursor:pointer;-webkit-user-select:none;user-select:none}th.sortable:hover{color:var(--text)}tr.clickable{cursor:pointer}tr.clickable:hover td{background:var(--panel2)}tr.selected td{background:var(--accent-dim)}.mono{font-family:var(--mono)}.muted{color:var(--muted)}.tag{display:inline-block;padding:1px 7px;border-radius:10px;background:var(--panel2);border:1px solid var(--border);font-size:11px;margin:0 3px 3px 0}td.chips{white-space:normal;overflow:visible;max-width:none}.toolbar{display:flex;gap:8px;align-items:center;padding:8px 12px;border-bottom:1px solid var(--border);flex-wrap:wrap}.toolbar label.chk{display:inline-flex;align-items:center;gap:4px;font-size:12px;color:var(--muted);cursor:pointer;-webkit-user-select:none;user-select:none;white-space:nowrap}.toolbar label.chk input{margin:0}.err{color:var(--err)}.empty{padding:20px;color:var(--muted);text-align:center}.login-wrap{display:flex;align-items:center;justify-content:center;flex:1}.login-card{background:var(--panel);border:1px solid var(--border);border-radius:10px;padding:26px;width:320px;display:flex;flex-direction:column;gap:12px}.login-card h2{margin:0 0 6px}.login-card label{font-size:12px;color:var(--muted)}.login-card input{width:100%}.msg{padding:6px 12px;border-bottom:1px solid var(--border)}.msg .meta{font-size:11px;color:var(--muted)}.msg.out{background:#13241b}.msg .who{color:var(--accent);font-weight:600}.msg .mention{color:var(--accent);font-weight:600;background:var(--accent-dim);padding:0 4px;border-radius:4px}.msg a{word-break:break-all}.hexdump{font-family:var(--mono);font-size:13px;padding:10px;line-height:1.7}.hexbyte{padding:1px 2px;border-radius:3px;cursor:default}.hexbyte.active{background:var(--accent);color:#00121f}.field-row{padding:6px 12px;border-bottom:1px solid var(--border);cursor:default}.field-row.active{background:var(--accent-dim)}.field-row .fname{font-weight:600}.field-row .fmeta{font-size:11px;color:var(--muted)}.field-row .fval{font-family:var(--mono);font-size:12px;word-break:break-all}.decoded{padding:10px 12px}.decoded pre{white-space:pre-wrap;word-break:break-all;margin:0}.kv{display:grid;grid-template-columns:max-content 1fr;gap:2px 12px}.kv .k{color:var(--muted)} +.contacts-split[data-v-6d1bbf98]{display:flex;gap:10px;height:100%;min-height:0;padding:10px;box-sizing:border-box}.contact-detail[data-v-6d1bbf98]{flex:1;min-width:240px;max-width:440px}:root{--bg: #0f1419;--panel: #161c24;--panel2: #1c242e;--border: #2a3340;--text: #cdd6e0;--muted: #7d8a99;--accent: #4aa3ff;--accent-dim: #1f3a55;--ok: #4ec98a;--warn: #e0b341;--err: #e06b6b;--mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace}*{box-sizing:border-box}html,body,#app{height:100%;margin:0}body{background:var(--bg);color:var(--text);font:14px/1.45 system-ui,-apple-system,Segoe UI,Roboto,sans-serif}a{color:var(--accent);text-decoration:none}#app{display:flex;flex-direction:column}.nav{display:flex;align-items:center;gap:4px;padding:8px 14px;background:var(--panel);border-bottom:1px solid var(--border)}.nav .brand{font-weight:700;margin-right:16px;color:#fff}.nav a{padding:6px 12px;border-radius:6px;color:var(--muted)}.nav a.router-link-active{background:var(--accent-dim);color:#fff}.nav .spacer{flex:1}.nav .who{color:var(--muted);font-size:12px;margin-right:10px}.page{flex:1;min-height:0;padding:14px;overflow:auto}.panes{flex:1;min-height:0;display:flex;gap:10px;padding:10px}.pane{background:var(--panel);border:1px solid var(--border);border-radius:8px;display:flex;flex-direction:column;min-height:0;overflow:hidden}.pane>h3{margin:0;padding:8px 12px;font-size:12px;text-transform:uppercase;letter-spacing:.04em;color:var(--muted);border-bottom:1px solid var(--border)}.pane>.body{flex:1;min-height:0;overflow:auto}.side-col{flex:0 0 240px;display:flex;flex-direction:column;gap:10px;min-height:0}button{background:var(--accent-dim);color:#fff;border:1px solid var(--border);border-radius:6px;padding:6px 12px;cursor:pointer;font:inherit}button:hover{border-color:var(--accent)}button:disabled{opacity:.5;cursor:not-allowed}input,select,textarea{background:var(--panel2);color:var(--text);border:1px solid var(--border);border-radius:6px;padding:6px 9px;font:inherit}input:focus,select:focus,textarea:focus{outline:1px solid var(--accent)}table{width:100%;border-collapse:collapse;font-size:13px}th,td{text-align:left;padding:5px 9px;border-bottom:1px solid var(--border);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:320px}th{color:var(--muted);position:sticky;top:0;background:var(--panel)}th.sortable{cursor:pointer;-webkit-user-select:none;user-select:none}th.sortable:hover{color:var(--text)}tr.clickable{cursor:pointer}tr.clickable:hover td{background:var(--panel2)}tr.selected td{background:var(--accent-dim)}.mono{font-family:var(--mono)}.muted{color:var(--muted)}.tag{display:inline-block;padding:1px 7px;border-radius:10px;background:var(--panel2);border:1px solid var(--border);font-size:11px;margin:0 3px 3px 0}td.chips{white-space:normal;overflow:visible;max-width:none}.toolbar{display:flex;gap:8px;align-items:center;padding:8px 12px;border-bottom:1px solid var(--border);flex-wrap:wrap}.toolbar label.chk{display:inline-flex;align-items:center;gap:4px;font-size:12px;color:var(--muted);cursor:pointer;-webkit-user-select:none;user-select:none;white-space:nowrap}.toolbar label.chk input{margin:0}.err{color:var(--err)}.empty{padding:20px;color:var(--muted);text-align:center}.login-wrap{display:flex;align-items:center;justify-content:center;flex:1}.login-card{background:var(--panel);border:1px solid var(--border);border-radius:10px;padding:26px;width:320px;display:flex;flex-direction:column;gap:12px}.login-card h2{margin:0 0 6px}.login-card label{font-size:12px;color:var(--muted)}.login-card input{width:100%}.msg{padding:6px 12px;border-bottom:1px solid var(--border)}.msg .meta{font-size:11px;color:var(--muted)}.msg.out{background:#13241b}.msg .who{color:var(--accent);font-weight:600}.msg .mention{color:var(--accent);font-weight:600;background:var(--accent-dim);padding:0 4px;border-radius:4px}.msg a{word-break:break-all}.hexdump{font-family:var(--mono);font-size:13px;padding:10px;line-height:1.7}.hexbyte{padding:1px 2px;border-radius:3px;cursor:default}.hexbyte.active{background:var(--accent);color:#00121f}.field-row{padding:6px 12px;border-bottom:1px solid var(--border);cursor:default}.field-row.active{background:var(--accent-dim)}.field-row .fname{font-weight:600}.field-row .fmeta{font-size:11px;color:var(--muted)}.field-row .fval{font-family:var(--mono);font-size:12px;word-break:break-all}.decoded{padding:10px 12px}.decoded pre{white-space:pre-wrap;word-break:break-all;margin:0}.kv{display:grid;grid-template-columns:max-content 1fr;gap:2px 12px}.kv .k{color:var(--muted)} diff --git a/webapi/static/assets/index-y0UCdFy8.js b/webapi/static/assets/index-y0UCdFy8.js deleted file mode 100644 index 4b1dcd7..0000000 --- a/webapi/static/assets/index-y0UCdFy8.js +++ /dev/null @@ -1,37 +0,0 @@ -(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))s(o);new MutationObserver(o=>{for(const l of o)if(l.type==="childList")for(const r of l.addedNodes)r.tagName==="LINK"&&r.rel==="modulepreload"&&s(r)}).observe(document,{childList:!0,subtree:!0});function n(o){const l={};return o.integrity&&(l.integrity=o.integrity),o.referrerPolicy&&(l.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?l.credentials="include":o.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function s(o){if(o.ep)return;o.ep=!0;const l=n(o);fetch(o.href,l)}})();/** -* @vue/shared v3.5.35 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/function ro(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const ke={},sn=[],wt=()=>{},Ol=()=>!1,as=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),cs=e=>e.startsWith("onUpdate:"),Fe=Object.assign,io=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},ai=Object.prototype.hasOwnProperty,be=(e,t)=>ai.call(e,t),ee=Array.isArray,on=e=>Dn(e)==="[object Map]",dn=e=>Dn(e)==="[object Set]",Oo=e=>Dn(e)==="[object Date]",se=e=>typeof e=="function",Te=e=>typeof e=="string",ct=e=>typeof e=="symbol",we=e=>e!==null&&typeof e=="object",Tl=e=>(we(e)||se(e))&&se(e.then)&&se(e.catch),Pl=Object.prototype.toString,Dn=e=>Pl.call(e),ci=e=>Dn(e).slice(8,-1),Il=e=>Dn(e)==="[object Object]",us=e=>Te(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,bn=ro(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),fs=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},ui=/-\w/g,Je=fs(e=>e.replace(ui,t=>t.slice(1).toUpperCase())),fi=/\B([A-Z])/g,Kt=fs(e=>e.replace(fi,"-$1").toLowerCase()),ds=fs(e=>e.charAt(0).toUpperCase()+e.slice(1)),Rs=fs(e=>e?`on${ds(e)}`:""),bt=(e,t)=>!Object.is(e,t),zn=(e,...t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:s,value:n})},hs=e=>{const t=parseFloat(e);return isNaN(t)?e:t};let To;const ps=()=>To||(To=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function ao(e){if(ee(e)){const t={};for(let n=0;n{if(n){const s=n.split(hi);s.length>1&&(t[s[0].trim()]=s[1].trim())}}),t}function Ze(e){let t="";if(Te(e))t=e;else if(ee(e))for(let n=0;nUt(n,t))}const Ml=e=>!!(e&&e.__v_isRef===!0),R=e=>Te(e)?e:e==null?"":ee(e)||we(e)&&(e.toString===Pl||!se(e.toString))?Ml(e)?R(e.value):JSON.stringify(e,Dl,2):String(e),Dl=(e,t)=>Ml(t)?Dl(e,t.value):on(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[s,o],l)=>(n[Os(s,l)+" =>"]=o,n),{})}:dn(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>Os(n))}:ct(t)?Os(t):we(t)&&!ee(t)&&!Il(t)?String(t):t,Os=(e,t="")=>{var n;return ct(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};/** -* @vue/reactivity v3.5.35 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/let De;class Ll{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this._warnOnRun=!0,this.__v_skip=!0,!t&&De&&(De.active?(this.parent=De,this.index=(De.scopes||(De.scopes=[])).push(this)-1):(this._active=!1,this._warnOnRun=!1))}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t0&&--this._on===0){if(De===this)De=this.prevScope;else{let t=De;for(;t;){if(t.prevScope===this){t.prevScope=this.prevScope;break}t=t.prevScope}}this.prevScope=void 0}}stop(t){if(this._active){this._active=!1;let n,s;for(n=0,s=this.effects.length;n0)return;if(xn){let t=xn;for(xn=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;wn;){let t=wn;for(wn=void 0;t;){const n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(s){e||(e=s)}t=n}}if(e)throw e}function Bl(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Kl(e){let t,n=e.depsTail,s=n;for(;s;){const o=s.prevDep;s.version===-1?(s===n&&(n=o),ho(s),bi(s)):t=s,s.dep.activeLink=s.prevActiveLink,s.prevActiveLink=void 0,s=o}e.deps=t,e.depsTail=n}function Ks(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Gl(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function Gl(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===Tn)||(e.globalVersion=Tn,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!Ks(e))))return;e.flags|=2;const t=e.dep,n=Se,s=ft;Se=e,ft=!0;try{Bl(e);const o=e.fn(e._value);(t.version===0||bt(o,e._value))&&(e.flags|=128,e._value=o,t.version++)}catch(o){throw t.version++,o}finally{Se=n,ft=s,Kl(e),e.flags&=-3}}function ho(e,t=!1){const{dep:n,prevSub:s,nextSub:o}=e;if(s&&(s.nextSub=o,e.prevSub=void 0),o&&(o.prevSub=s,e.nextSub=void 0),n.subs===e&&(n.subs=s,!s&&n.computed)){n.computed.flags&=-5;for(let l=n.computed.deps;l;l=l.nextDep)ho(l,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function bi(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let ft=!0;const Wl=[];function It(){Wl.push(ft),ft=!1}function Nt(){const e=Wl.pop();ft=e===void 0?!0:e}function Po(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=Se;Se=void 0;try{t()}finally{Se=n}}}let Tn=0;class wi{constructor(t,n){this.sub=t,this.dep=n,this.version=n.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class po{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(t){if(!Se||!ft||Se===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==Se)n=this.activeLink=new wi(Se,this),Se.deps?(n.prevDep=Se.depsTail,Se.depsTail.nextDep=n,Se.depsTail=n):Se.deps=Se.depsTail=n,ql(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const s=n.nextDep;s.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=s),n.prevDep=Se.depsTail,n.nextDep=void 0,Se.depsTail.nextDep=n,Se.depsTail=n,Se.deps===n&&(Se.deps=s)}return n}trigger(t){this.version++,Tn++,this.notify(t)}notify(t){uo();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{fo()}}}function ql(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let s=t.deps;s;s=s.nextDep)ql(s)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const Zn=new WeakMap,Yt=Symbol(""),Gs=Symbol(""),Pn=Symbol("");function Be(e,t,n){if(ft&&Se){let s=Zn.get(e);s||Zn.set(e,s=new Map);let o=s.get(n);o||(s.set(n,o=new po),o.map=s,o.key=n),o.track()}}function Rt(e,t,n,s,o,l){const r=Zn.get(e);if(!r){Tn++;return}const i=a=>{a&&a.trigger()};if(uo(),t==="clear")r.forEach(i);else{const a=ee(e),f=a&&us(n);if(a&&n==="length"){const u=Number(s);r.forEach((h,_)=>{(_==="length"||_===Pn||!ct(_)&&_>=u)&&i(h)})}else switch((n!==void 0||r.has(void 0))&&i(r.get(n)),f&&i(r.get(Pn)),t){case"add":a?f&&i(r.get("length")):(i(r.get(Yt)),on(e)&&i(r.get(Gs)));break;case"delete":a||(i(r.get(Yt)),on(e)&&i(r.get(Gs)));break;case"set":on(e)&&i(r.get(Yt));break}}fo()}function xi(e,t){const n=Zn.get(e);return n&&n.get(t)}function Zt(e){const t=me(e);return t===e?t:(Be(t,"iterate",Pn),nt(e)?t:t.map(dt))}function ms(e){return Be(e=me(e),"iterate",Pn),e}function _t(e,t){return $t(e)?rn(Pt(e)?dt(t):t):dt(t)}const ki={__proto__:null,[Symbol.iterator](){return Ps(this,Symbol.iterator,e=>_t(this,e))},concat(...e){return Zt(this).concat(...e.map(t=>ee(t)?Zt(t):t))},entries(){return Ps(this,"entries",e=>(e[1]=_t(this,e[1]),e))},every(e,t){return Ct(this,"every",e,t,void 0,arguments)},filter(e,t){return Ct(this,"filter",e,t,n=>n.map(s=>_t(this,s)),arguments)},find(e,t){return Ct(this,"find",e,t,n=>_t(this,n),arguments)},findIndex(e,t){return Ct(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return Ct(this,"findLast",e,t,n=>_t(this,n),arguments)},findLastIndex(e,t){return Ct(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return Ct(this,"forEach",e,t,void 0,arguments)},includes(...e){return Is(this,"includes",e)},indexOf(...e){return Is(this,"indexOf",e)},join(e){return Zt(this).join(e)},lastIndexOf(...e){return Is(this,"lastIndexOf",e)},map(e,t){return Ct(this,"map",e,t,void 0,arguments)},pop(){return mn(this,"pop")},push(...e){return mn(this,"push",e)},reduce(e,...t){return Io(this,"reduce",e,t)},reduceRight(e,...t){return Io(this,"reduceRight",e,t)},shift(){return mn(this,"shift")},some(e,t){return Ct(this,"some",e,t,void 0,arguments)},splice(...e){return mn(this,"splice",e)},toReversed(){return Zt(this).toReversed()},toSorted(e){return Zt(this).toSorted(e)},toSpliced(...e){return Zt(this).toSpliced(...e)},unshift(...e){return mn(this,"unshift",e)},values(){return Ps(this,"values",e=>_t(this,e))}};function Ps(e,t,n){const s=ms(e),o=s[t]();return s!==e&&!nt(e)&&(o._next=o.next,o.next=()=>{const l=o._next();return l.done||(l.value=n(l.value)),l}),o}const Ci=Array.prototype;function Ct(e,t,n,s,o,l){const r=ms(e),i=r!==e&&!nt(e),a=r[t];if(a!==Ci[t]){const h=a.apply(e,l);return i?dt(h):h}let f=n;r!==e&&(i?f=function(h,_){return n.call(this,_t(e,h),_,e)}:n.length>2&&(f=function(h,_){return n.call(this,h,_,e)}));const u=a.call(r,f,s);return i&&o?o(u):u}function Io(e,t,n,s){const o=ms(e),l=o!==e&&!nt(e);let r=n,i=!1;o!==e&&(l?(i=s.length===0,r=function(f,u,h){return i&&(i=!1,f=_t(e,f)),n.call(this,f,_t(e,u),h,e)}):n.length>3&&(r=function(f,u,h){return n.call(this,f,u,h,e)}));const a=o[t](r,...s);return i?_t(e,a):a}function Is(e,t,n){const s=me(e);Be(s,"iterate",Pn);const o=s[t](...n);return(o===-1||o===!1)&&vs(n[0])?(n[0]=me(n[0]),s[t](...n)):o}function mn(e,t,n=[]){It(),uo();const s=me(e)[t].apply(e,n);return fo(),Nt(),s}const Si=ro("__proto__,__v_isRef,__isVue"),zl=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(ct));function Ei(e){ct(e)||(e=String(e));const t=me(this);return Be(t,"has",e),t.hasOwnProperty(e)}class Jl{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,s){if(n==="__v_skip")return t.__v_skip;const o=this._isReadonly,l=this._isShallow;if(n==="__v_isReactive")return!o;if(n==="__v_isReadonly")return o;if(n==="__v_isShallow")return l;if(n==="__v_raw")return s===(o?l?Di:Zl:l?Xl:Ql).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(s)?t:void 0;const r=ee(t);if(!o){let a;if(r&&(a=ki[n]))return a;if(n==="hasOwnProperty")return Ei}const i=Reflect.get(t,n,Pe(t)?t:s);if((ct(n)?zl.has(n):Si(n))||(o||Be(t,"get",n),l))return i;if(Pe(i)){const a=r&&us(n)?i:i.value;return o&&we(a)?qs(a):a}return we(i)?o?qs(i):Ln(i):i}}class Yl extends Jl{constructor(t=!1){super(!1,t)}set(t,n,s,o){let l=t[n];const r=ee(t)&&us(n);if(!this._isShallow){const f=$t(l);if(!nt(s)&&!$t(s)&&(l=me(l),s=me(s)),!r&&Pe(l)&&!Pe(s))return f||(l.value=s),!0}const i=r?Number(n)e,Kn=e=>Reflect.getPrototypeOf(e);function Pi(e,t,n){return function(...s){const o=this.__v_raw,l=me(o),r=on(l),i=e==="entries"||e===Symbol.iterator&&r,a=e==="keys"&&r,f=o[e](...s),u=n?Ws:t?rn:dt;return!t&&Be(l,"iterate",a?Gs:Yt),Fe(Object.create(f),{next(){const{value:h,done:_}=f.next();return _?{value:h,done:_}:{value:i?[u(h[0]),u(h[1])]:u(h),done:_}}})}}function Gn(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function Ii(e,t){const n={get(o){const l=this.__v_raw,r=me(l),i=me(o);e||(bt(o,i)&&Be(r,"get",o),Be(r,"get",i));const{has:a}=Kn(r),f=t?Ws:e?rn:dt;if(a.call(r,o))return f(l.get(o));if(a.call(r,i))return f(l.get(i));l!==r&&l.get(o)},get size(){const o=this.__v_raw;return!e&&Be(me(o),"iterate",Yt),o.size},has(o){const l=this.__v_raw,r=me(l),i=me(o);return e||(bt(o,i)&&Be(r,"has",o),Be(r,"has",i)),o===i?l.has(o):l.has(o)||l.has(i)},forEach(o,l){const r=this,i=r.__v_raw,a=me(i),f=t?Ws:e?rn:dt;return!e&&Be(a,"iterate",Yt),i.forEach((u,h)=>o.call(l,f(u),f(h),r))}};return Fe(n,e?{add:Gn("add"),set:Gn("set"),delete:Gn("delete"),clear:Gn("clear")}:{add(o){const l=me(this),r=Kn(l),i=me(o),a=!t&&!nt(o)&&!$t(o)?i:o;return r.has.call(l,a)||bt(o,a)&&r.has.call(l,o)||bt(i,a)&&r.has.call(l,i)||(l.add(a),Rt(l,"add",a,a)),this},set(o,l){!t&&!nt(l)&&!$t(l)&&(l=me(l));const r=me(this),{has:i,get:a}=Kn(r);let f=i.call(r,o);f||(o=me(o),f=i.call(r,o));const u=a.call(r,o);return r.set(o,l),f?bt(l,u)&&Rt(r,"set",o,l):Rt(r,"add",o,l),this},delete(o){const l=me(this),{has:r,get:i}=Kn(l);let a=r.call(l,o);a||(o=me(o),a=r.call(l,o)),i&&i.call(l,o);const f=l.delete(o);return a&&Rt(l,"delete",o,void 0),f},clear(){const o=me(this),l=o.size!==0,r=o.clear();return l&&Rt(o,"clear",void 0,void 0),r}}),["keys","values","entries",Symbol.iterator].forEach(o=>{n[o]=Pi(o,e,t)}),n}function mo(e,t){const n=Ii(e,t);return(s,o,l)=>o==="__v_isReactive"?!e:o==="__v_isReadonly"?e:o==="__v_raw"?s:Reflect.get(be(n,o)&&o in s?n:s,o,l)}const Ni={get:mo(!1,!1)},$i={get:mo(!1,!0)},Mi={get:mo(!0,!1)};const Ql=new WeakMap,Xl=new WeakMap,Zl=new WeakMap,Di=new WeakMap;function Li(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Ln(e){return $t(e)?e:vo(e,!1,Ri,Ni,Ql)}function er(e){return vo(e,!1,Ti,$i,Xl)}function qs(e){return vo(e,!0,Oi,Mi,Zl)}function vo(e,t,n,s,o){if(!we(e)||e.__v_raw&&!(t&&e.__v_isReactive)||e.__v_skip||!Object.isExtensible(e))return e;const l=o.get(e);if(l)return l;const r=Li(ci(e));if(r===0)return e;const i=new Proxy(e,r===2?s:n);return o.set(e,i),i}function Pt(e){return $t(e)?Pt(e.__v_raw):!!(e&&e.__v_isReactive)}function $t(e){return!!(e&&e.__v_isReadonly)}function nt(e){return!!(e&&e.__v_isShallow)}function vs(e){return e?!!e.__v_raw:!1}function me(e){const t=e&&e.__v_raw;return t?me(t):e}function go(e){return!be(e,"__v_skip")&&Object.isExtensible(e)&&Nl(e,"__v_skip",!0),e}const dt=e=>we(e)?Ln(e):e,rn=e=>we(e)?qs(e):e;function Pe(e){return e?e.__v_isRef===!0:!1}function ne(e){return tr(e,!1)}function ji(e){return tr(e,!0)}function tr(e,t){return Pe(e)?e:new Vi(e,t)}class Vi{constructor(t,n){this.dep=new po,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:me(t),this._value=n?t:dt(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){const n=this._rawValue,s=this.__v_isShallow||nt(t)||$t(t);t=s?t:me(t),bt(t,n)&&(this._rawValue=t,this._value=s?t:dt(t),this.dep.trigger())}}function xt(e){return Pe(e)?e.value:e}const Fi={get:(e,t,n)=>t==="__v_raw"?e:xt(Reflect.get(e,t,n)),set:(e,t,n,s)=>{const o=e[t];return Pe(o)&&!Pe(n)?(o.value=n,!0):Reflect.set(e,t,n,s)}};function nr(e){return Pt(e)?e:new Proxy(e,Fi)}function Ui(e){const t=ee(e)?new Array(e.length):{};for(const n in e)t[n]=Bi(e,n);return t}class Hi{constructor(t,n,s){this._object=t,this._defaultValue=s,this.__v_isRef=!0,this._value=void 0,this._key=ct(n)?n:String(n),this._raw=me(t);let o=!0,l=t;if(!ee(t)||ct(this._key)||!us(this._key))do o=!vs(l)||nt(l);while(o&&(l=l.__v_raw));this._shallow=o}get value(){let t=this._object[this._key];return this._shallow&&(t=xt(t)),this._value=t===void 0?this._defaultValue:t}set value(t){if(this._shallow&&Pe(this._raw[this._key])){const n=this._object[this._key];if(Pe(n)){n.value=t;return}}this._object[this._key]=t}get dep(){return xi(this._raw,this._key)}}function Bi(e,t,n){return new Hi(e,t,n)}class Ki{constructor(t,n,s){this.fn=t,this.setter=n,this._value=void 0,this.dep=new po(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Tn-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=s}notify(){if(this.flags|=16,!(this.flags&8)&&Se!==this)return Hl(this,!0),!0}get value(){const t=this.dep.track();return Gl(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function Gi(e,t,n=!1){let s,o;return se(e)?s=e:(s=e.get,o=e.set),new Ki(s,o,n)}const Wn={},es=new WeakMap;let zt;function Wi(e,t=!1,n=zt){if(n){let s=es.get(n);s||es.set(n,s=[]),s.push(e)}}function qi(e,t,n=ke){const{immediate:s,deep:o,once:l,scheduler:r,augmentJob:i,call:a}=n,f=O=>o?O:nt(O)||o===!1||o===0?Ot(O,1):Ot(O);let u,h,_,b,N=!1,T=!1;if(Pe(e)?(h=()=>e.value,N=nt(e)):Pt(e)?(h=()=>f(e),N=!0):ee(e)?(T=!0,N=e.some(O=>Pt(O)||nt(O)),h=()=>e.map(O=>{if(Pe(O))return O.value;if(Pt(O))return f(O);if(se(O))return a?a(O,2):O()})):se(e)?t?h=a?()=>a(e,2):e:h=()=>{if(_){It();try{_()}finally{Nt()}}const O=zt;zt=u;try{return a?a(e,3,[b]):e(b)}finally{zt=O}}:h=wt,t&&o){const O=h,V=o===!0?1/0:o;h=()=>Ot(O(),V)}const U=Vl(),z=()=>{u.stop(),U&&U.active&&io(U.effects,u)};if(l&&t){const O=t;t=(...V)=>{O(...V),z()}}let $=T?new Array(e.length).fill(Wn):Wn;const B=O=>{if(!(!(u.flags&1)||!u.dirty&&!O))if(t){const V=u.run();if(o||N||(T?V.some((J,ae)=>bt(J,$[ae])):bt(V,$))){_&&_();const J=zt;zt=u;try{const ae=[V,$===Wn?void 0:T&&$[0]===Wn?[]:$,b];$=V,a?a(t,3,ae):t(...ae)}finally{zt=J}}}else u.run()};return i&&i(B),u=new Fl(h),u.scheduler=r?()=>r(B,!1):B,b=O=>Wi(O,!1,u),_=u.onStop=()=>{const O=es.get(u);if(O){if(a)a(O,4);else for(const V of O)V();es.delete(u)}},t?s?B(!0):$=u.run():r?r(B.bind(null,!0),!0):u.run(),z.pause=u.pause.bind(u),z.resume=u.resume.bind(u),z.stop=z,z}function Ot(e,t=1/0,n){if(t<=0||!we(e)||e.__v_skip||(n=n||new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,Pe(e))Ot(e.value,t,n);else if(ee(e))for(let s=0;s{Ot(s,t,n)});else if(Il(e)){for(const s in e)Ot(e[s],t,n);for(const s of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,s)&&Ot(e[s],t,n)}return e}/** -* @vue/runtime-core v3.5.35 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/function jn(e,t,n,s){try{return s?e(...s):e()}catch(o){gs(o,t,n)}}function ht(e,t,n,s){if(se(e)){const o=jn(e,t,n,s);return o&&Tl(o)&&o.catch(l=>{gs(l,t,n)}),o}if(ee(e)){const o=[];for(let l=0;l>>1,o=ze[s],l=In(o);l=In(n)?ze.push(e):ze.splice(Ji(t),0,e),e.flags|=1,or()}}function or(){ts||(ts=sr.then(rr))}function Yi(e){ee(e)?ln.push(...e):jt&&e.id===-1?jt.splice(tn+1,0,e):e.flags&1||(ln.push(e),e.flags|=1),or()}function No(e,t,n=gt+1){for(;nIn(n)-In(s));if(ln.length=0,jt){jt.push(...t);return}for(jt=t,tn=0;tne.id==null?e.flags&2?-1:1/0:e.id;function rr(e){try{for(gt=0;gt{s._d&&ls(-1);const l=ns(t);let r;try{r=e(...o)}finally{ns(l),s._d&&ls(1)}return r};return s._n=!0,s._c=!0,s._d=!0,s}function He(e,t){if(et===null)return e;const n=ks(et),s=e.dirs||(e.dirs=[]);for(let o=0;o1)return n&&se(t)?t.call(s&&s.proxy):t}}function Qi(){return!!(Nr()||Qt)}const Xi=Symbol.for("v-scx"),Zi=()=>it(Xi);function kn(e,t,n){return ar(e,t,n)}function ar(e,t,n=ke){const{immediate:s,deep:o,flush:l,once:r}=n,i=Fe({},n),a=t&&s||!t&&l!=="post";let f;if($n){if(l==="sync"){const b=Zi();f=b.__watcherHandles||(b.__watcherHandles=[])}else if(!a){const b=()=>{};return b.stop=wt,b.resume=wt,b.pause=wt,b}}const u=Ke;i.call=(b,N,T)=>ht(b,u,N,T);let h=!1;l==="post"?i.scheduler=b=>{Xe(b,u&&u.suspense)}:l!=="sync"&&(h=!0,i.scheduler=(b,N)=>{N?b():_o(b)}),i.augmentJob=b=>{t&&(b.flags|=4),h&&(b.flags|=2,u&&(b.id=u.uid,b.i=u))};const _=qi(e,t,i);return $n&&(f?f.push(_):a&&_()),_}function ea(e,t,n){const s=this.proxy,o=Te(e)?e.includes(".")?cr(s,e):()=>s[e]:e.bind(s,s);let l;se(t)?l=t:(l=t.handler,n=t);const r=Fn(this),i=ar(o,l.bind(s),n);return r(),i}function cr(e,t){const n=t.split(".");return()=>{let s=e;for(let o=0;oe.__isTeleport,Ns=Symbol("_leaveCb");function yo(e,t){e.shapeFlag&6&&e.component?(e.transition=t,yo(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function ur(e,t){return se(e)?Fe({name:e.name},t,{setup:e}):e}function fr(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function $o(e,t){let n;return!!((n=Object.getOwnPropertyDescriptor(e,t))&&!n.configurable)}const ss=new WeakMap;function Cn(e,t,n,s,o=!1){if(ee(e)){e.forEach((T,U)=>Cn(T,t&&(ee(t)?t[U]:t),n,s,o));return}if(Sn(s)&&!o){s.shapeFlag&512&&s.type.__asyncResolved&&s.component.subTree.component&&Cn(e,t,n,s.component.subTree);return}const l=s.shapeFlag&4?ks(s.component):s.el,r=o?null:l,{i,r:a}=e,f=t&&t.r,u=i.refs===ke?i.refs={}:i.refs,h=i.setupState,_=me(h),b=h===ke?Ol:T=>$o(u,T)?!1:be(_,T),N=(T,U)=>!(U&&$o(u,U));if(f!=null&&f!==a){if(Mo(t),Te(f))u[f]=null,b(f)&&(h[f]=null);else if(Pe(f)){const T=t;N(f,T.k)&&(f.value=null),T.k&&(u[T.k]=null)}}if(se(a))jn(a,i,12,[r,u]);else{const T=Te(a),U=Pe(a);if(T||U){const z=()=>{if(e.f){const $=T?b(a)?h[a]:u[a]:N()||!e.k?a.value:u[e.k];if(o)ee($)&&io($,l);else if(ee($))$.includes(l)||$.push(l);else if(T)u[a]=[l],b(a)&&(h[a]=u[a]);else{const B=[l];N(a,e.k)&&(a.value=B),e.k&&(u[e.k]=B)}}else T?(u[a]=r,b(a)&&(h[a]=r)):U&&(N(a,e.k)&&(a.value=r),e.k&&(u[e.k]=r))};if(r){const $=()=>{z(),ss.delete(e)};$.id=-1,ss.set(e,$),Xe($,n)}else Mo(e),z()}}}function Mo(e){const t=ss.get(e);t&&(t.flags|=8,ss.delete(e))}ps().requestIdleCallback;ps().cancelIdleCallback;const Sn=e=>!!e.type.__asyncLoader,dr=e=>e.type.__isKeepAlive;function sa(e,t){hr(e,"a",t)}function oa(e,t){hr(e,"da",t)}function hr(e,t,n=Ke){const s=e.__wdc||(e.__wdc=()=>{let o=n;for(;o;){if(o.isDeactivated)return;o=o.parent}return e()});if(_s(t,s,n),n){let o=n.parent;for(;o&&o.parent;)dr(o.parent.vnode)&&la(s,t,n,o),o=o.parent}}function la(e,t,n,s){const o=_s(t,e,s,!0);bs(()=>{io(s[t],o)},n)}function _s(e,t,n=Ke,s=!1){if(n){const o=n[e]||(n[e]=[]),l=t.__weh||(t.__weh=(...r)=>{It();const i=Fn(n),a=ht(t,n,e,r);return i(),Nt(),a});return s?o.unshift(l):o.push(l),l}}const Mt=e=>(t,n=Ke)=>{(!$n||e==="sp")&&_s(e,(...s)=>t(...s),n)},ra=Mt("bm"),ys=Mt("m"),ia=Mt("bu"),aa=Mt("u"),ca=Mt("bum"),bs=Mt("um"),ua=Mt("sp"),fa=Mt("rtg"),da=Mt("rtc");function ha(e,t=Ke){_s("ec",e,t)}const pa="components";function Do(e,t){return va(pa,e,!0,t)||e}const ma=Symbol.for("v-ndc");function va(e,t,n=!0,s=!1){const o=et||Ke;if(o){const l=o.type;{const i=tc(l,!1);if(i&&(i===t||i===Je(t)||i===ds(Je(t))))return l}const r=Lo(o[e]||l[e],t)||Lo(o.appContext[e],t);return!r&&s?l:r}}function Lo(e,t){return e&&(e[t]||e[Je(t)]||e[ds(Je(t))])}function pe(e,t,n,s){let o;const l=n,r=ee(e);if(r||Te(e)){const i=r&&Pt(e);let a=!1,f=!1;i&&(a=!nt(e),f=$t(e),e=ms(e)),o=new Array(e.length);for(let u=0,h=e.length;ut(i,a,void 0,l));else{const i=Object.keys(e);o=new Array(i.length);for(let a=0,f=i.length;ae?$r(e)?ks(e):zs(e.parent):null,En=Fe(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>zs(e.parent),$root:e=>zs(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>mr(e),$forceUpdate:e=>e.f||(e.f=()=>{_o(e.update)}),$nextTick:e=>e.n||(e.n=Vn.bind(e.proxy)),$watch:e=>ea.bind(e)}),$s=(e,t)=>e!==ke&&!e.__isScriptSetup&&be(e,t),ga={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:s,data:o,props:l,accessCache:r,type:i,appContext:a}=e;if(t[0]!=="$"){const _=r[t];if(_!==void 0)switch(_){case 1:return s[t];case 2:return o[t];case 4:return n[t];case 3:return l[t]}else{if($s(s,t))return r[t]=1,s[t];if(o!==ke&&be(o,t))return r[t]=2,o[t];if(be(l,t))return r[t]=3,l[t];if(n!==ke&&be(n,t))return r[t]=4,n[t];Js&&(r[t]=0)}}const f=En[t];let u,h;if(f)return t==="$attrs"&&Be(e.attrs,"get",""),f(e);if((u=i.__cssModules)&&(u=u[t]))return u;if(n!==ke&&be(n,t))return r[t]=4,n[t];if(h=a.config.globalProperties,be(h,t))return h[t]},set({_:e},t,n){const{data:s,setupState:o,ctx:l}=e;return $s(o,t)?(o[t]=n,!0):s!==ke&&be(s,t)?(s[t]=n,!0):be(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(l[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:s,appContext:o,props:l,type:r}},i){let a;return!!(n[i]||e!==ke&&i[0]!=="$"&&be(e,i)||$s(t,i)||be(l,i)||be(s,i)||be(En,i)||be(o.config.globalProperties,i)||(a=r.__cssModules)&&a[i])},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:be(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function jo(e){return ee(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}let Js=!0;function _a(e){const t=mr(e),n=e.proxy,s=e.ctx;Js=!1,t.beforeCreate&&Vo(t.beforeCreate,e,"bc");const{data:o,computed:l,methods:r,watch:i,provide:a,inject:f,created:u,beforeMount:h,mounted:_,beforeUpdate:b,updated:N,activated:T,deactivated:U,beforeDestroy:z,beforeUnmount:$,destroyed:B,unmounted:O,render:V,renderTracked:J,renderTriggered:ae,errorCaptured:oe,serverPrefetch:le,expose:K,inheritAttrs:Y,components:de,directives:Q,filters:Ce}=t;if(f&&ya(f,s,null),r)for(const te in r){const ce=r[te];se(ce)&&(s[te]=ce.bind(n))}if(o){const te=o.call(n,n);we(te)&&(e.data=Ln(te))}if(Js=!0,l)for(const te in l){const ce=l[te],ut=se(ce)?ce.bind(n,n):se(ce.get)?ce.get.bind(n,n):wt,je=!se(ce)&&se(ce.set)?ce.set.bind(n):wt,Ue=ve({get:ut,set:je});Object.defineProperty(s,te,{enumerable:!0,configurable:!0,get:()=>Ue.value,set:Ae=>Ue.value=Ae})}if(i)for(const te in i)pr(i[te],s,n,te);if(a){const te=se(a)?a.call(n):a;Reflect.ownKeys(te).forEach(ce=>{Yn(ce,te[ce])})}u&&Vo(u,e,"c");function xe(te,ce){ee(ce)?ce.forEach(ut=>te(ut.bind(n))):ce&&te(ce.bind(n))}if(xe(ra,h),xe(ys,_),xe(ia,b),xe(aa,N),xe(sa,T),xe(oa,U),xe(ha,oe),xe(da,J),xe(fa,ae),xe(ca,$),xe(bs,O),xe(ua,le),ee(K))if(K.length){const te=e.exposed||(e.exposed={});K.forEach(ce=>{Object.defineProperty(te,ce,{get:()=>n[ce],set:ut=>n[ce]=ut,enumerable:!0})})}else e.exposed||(e.exposed={});V&&e.render===wt&&(e.render=V),Y!=null&&(e.inheritAttrs=Y),de&&(e.components=de),Q&&(e.directives=Q),le&&fr(e)}function ya(e,t,n=wt){ee(e)&&(e=Ys(e));for(const s in e){const o=e[s];let l;we(o)?"default"in o?l=it(o.from||s,o.default,!0):l=it(o.from||s):l=it(o),Pe(l)?Object.defineProperty(t,s,{enumerable:!0,configurable:!0,get:()=>l.value,set:r=>l.value=r}):t[s]=l}}function Vo(e,t,n){ht(ee(e)?e.map(s=>s.bind(t.proxy)):e.bind(t.proxy),t,n)}function pr(e,t,n,s){let o=s.includes(".")?cr(n,s):()=>n[s];if(Te(e)){const l=t[e];se(l)&&kn(o,l)}else if(se(e))kn(o,e.bind(n));else if(we(e))if(ee(e))e.forEach(l=>pr(l,t,n,s));else{const l=se(e.handler)?e.handler.bind(n):t[e.handler];se(l)&&kn(o,l,e)}}function mr(e){const t=e.type,{mixins:n,extends:s}=t,{mixins:o,optionsCache:l,config:{optionMergeStrategies:r}}=e.appContext,i=l.get(t);let a;return i?a=i:!o.length&&!n&&!s?a=t:(a={},o.length&&o.forEach(f=>os(a,f,r,!0)),os(a,t,r)),we(t)&&l.set(t,a),a}function os(e,t,n,s=!1){const{mixins:o,extends:l}=t;l&&os(e,l,n,!0),o&&o.forEach(r=>os(e,r,n,!0));for(const r in t)if(!(s&&r==="expose")){const i=ba[r]||n&&n[r];e[r]=i?i(e[r],t[r]):t[r]}return e}const ba={data:Fo,props:Uo,emits:Uo,methods:_n,computed:_n,beforeCreate:We,created:We,beforeMount:We,mounted:We,beforeUpdate:We,updated:We,beforeDestroy:We,beforeUnmount:We,destroyed:We,unmounted:We,activated:We,deactivated:We,errorCaptured:We,serverPrefetch:We,components:_n,directives:_n,watch:xa,provide:Fo,inject:wa};function Fo(e,t){return t?e?function(){return Fe(se(e)?e.call(this,this):e,se(t)?t.call(this,this):t)}:t:e}function wa(e,t){return _n(Ys(e),Ys(t))}function Ys(e){if(ee(e)){const t={};for(let n=0;nt==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${Je(t)}Modifiers`]||e[`${Kt(t)}Modifiers`];function Ea(e,t,...n){if(e.isUnmounted)return;const s=e.vnode.props||ke;let o=n;const l=t.startsWith("update:"),r=l&&Sa(s,t.slice(7));r&&(r.trim&&(o=n.map(u=>Te(u)?u.trim():u)),r.number&&(o=n.map(hs)));let i,a=s[i=Rs(t)]||s[i=Rs(Je(t))];!a&&l&&(a=s[i=Rs(Kt(t))]),a&&ht(a,e,6,o);const f=s[i+"Once"];if(f){if(!e.emitted)e.emitted={};else if(e.emitted[i])return;e.emitted[i]=!0,ht(f,e,6,o)}}const Aa=new WeakMap;function gr(e,t,n=!1){const s=n?Aa:t.emitsCache,o=s.get(e);if(o!==void 0)return o;const l=e.emits;let r={},i=!1;if(!se(e)){const a=f=>{const u=gr(f,t,!0);u&&(i=!0,Fe(r,u))};!n&&t.mixins.length&&t.mixins.forEach(a),e.extends&&a(e.extends),e.mixins&&e.mixins.forEach(a)}return!l&&!i?(we(e)&&s.set(e,null),null):(ee(l)?l.forEach(a=>r[a]=null):Fe(r,l),we(e)&&s.set(e,r),r)}function ws(e,t){return!e||!as(t)?!1:(t=t.slice(2).replace(/Once$/,""),be(e,t[0].toLowerCase()+t.slice(1))||be(e,Kt(t))||be(e,t))}function Ho(e){const{type:t,vnode:n,proxy:s,withProxy:o,propsOptions:[l],slots:r,attrs:i,emit:a,render:f,renderCache:u,props:h,data:_,setupState:b,ctx:N,inheritAttrs:T}=e,U=ns(e);let z,$;try{if(n.shapeFlag&4){const O=o||s,V=O;z=yt(f.call(V,O,u,h,b,_,N)),$=i}else{const O=t;z=yt(O.length>1?O(h,{attrs:i,slots:r,emit:a}):O(h,null)),$=t.props?i:Ra(i)}}catch(O){An.length=0,gs(O,e,1),z=Le(Ht)}let B=z;if($&&T!==!1){const O=Object.keys($),{shapeFlag:V}=B;O.length&&V&7&&(l&&O.some(cs)&&($=Oa($,l)),B=an(B,$,!1,!0))}return n.dirs&&(B=an(B,null,!1,!0),B.dirs=B.dirs?B.dirs.concat(n.dirs):n.dirs),n.transition&&yo(B,n.transition),z=B,ns(U),z}const Ra=e=>{let t;for(const n in e)(n==="class"||n==="style"||as(n))&&((t||(t={}))[n]=e[n]);return t},Oa=(e,t)=>{const n={};for(const s in e)(!cs(s)||!(s.slice(9)in t))&&(n[s]=e[s]);return n};function Ta(e,t,n){const{props:s,children:o,component:l}=e,{props:r,children:i,patchFlag:a}=t,f=l.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&a>=0){if(a&1024)return!0;if(a&16)return s?Bo(s,r,f):!!r;if(a&8){const u=t.dynamicProps;for(let h=0;hObject.create(yr),wr=e=>Object.getPrototypeOf(e)===yr;function Ia(e,t,n,s=!1){const o={},l=br();e.propsDefaults=Object.create(null),xr(e,t,o,l);for(const r in e.propsOptions[0])r in o||(o[r]=void 0);n?e.props=s?o:er(o):e.type.props?e.props=o:e.props=l,e.attrs=l}function Na(e,t,n,s){const{props:o,attrs:l,vnode:{patchFlag:r}}=e,i=me(o),[a]=e.propsOptions;let f=!1;if((s||r>0)&&!(r&16)){if(r&8){const u=e.vnode.dynamicProps;for(let h=0;h{a=!0;const[_,b]=kr(h,t,!0);Fe(r,_),b&&i.push(...b)};!n&&t.mixins.length&&t.mixins.forEach(u),e.extends&&u(e.extends),e.mixins&&e.mixins.forEach(u)}if(!l&&!a)return we(e)&&s.set(e,sn),sn;if(ee(l))for(let u=0;ue==="_"||e==="_ctx"||e==="$stable",wo=e=>ee(e)?e.map(yt):[yt(e)],Ma=(e,t,n)=>{if(t._n)return t;const s=Jn((...o)=>wo(t(...o)),n);return s._c=!1,s},Cr=(e,t,n)=>{const s=e._ctx;for(const o in e){if(bo(o))continue;const l=e[o];if(se(l))t[o]=Ma(o,l,s);else if(l!=null){const r=wo(l);t[o]=()=>r}}},Sr=(e,t)=>{const n=wo(t);e.slots.default=()=>n},Er=(e,t,n)=>{for(const s in t)(n||!bo(s))&&(e[s]=t[s])},Da=(e,t,n)=>{const s=e.slots=br();if(e.vnode.shapeFlag&32){const o=t._;o?(Er(s,t,n),n&&Nl(s,"_",o,!0)):Cr(t,s)}else t&&Sr(e,t)},La=(e,t,n)=>{const{vnode:s,slots:o}=e;let l=!0,r=ke;if(s.shapeFlag&32){const i=t._;i?n&&i===1?l=!1:Er(o,t,n):(l=!t.$stable,Cr(t,o)),r=t}else t&&(Sr(e,t),r={default:1});if(l)for(const i in o)!bo(i)&&r[i]==null&&delete o[i]},Xe=Ha;function ja(e){return Va(e)}function Va(e,t){const n=ps();n.__VUE__=!0;const{insert:s,remove:o,patchProp:l,createElement:r,createText:i,createComment:a,setText:f,setElementText:u,parentNode:h,nextSibling:_,setScopeId:b=wt,insertStaticContent:N}=e,T=(d,p,g,x=null,E=null,w=null,M=void 0,I=null,P=!!p.dynamicChildren)=>{if(d===p)return;d&&!vn(d,p)&&(x=S(d),Ae(d,E,w,!0),d=null),p.patchFlag===-2&&(P=!1,p.dynamicChildren=null);const{type:A,ref:W,shapeFlag:D}=p;switch(A){case xs:U(d,p,g,x);break;case Ht:z(d,p,g,x);break;case Ds:d==null&&$(p,g,x,M);break;case Z:de(d,p,g,x,E,w,M,I,P);break;default:D&1?V(d,p,g,x,E,w,M,I,P):D&6?Q(d,p,g,x,E,w,M,I,P):(D&64||D&128)&&A.process(d,p,g,x,E,w,M,I,P,q)}W!=null&&E?Cn(W,d&&d.ref,w,p||d,!p):W==null&&d&&d.ref!=null&&Cn(d.ref,null,w,d,!0)},U=(d,p,g,x)=>{if(d==null)s(p.el=i(p.children),g,x);else{const E=p.el=d.el;p.children!==d.children&&f(E,p.children)}},z=(d,p,g,x)=>{d==null?s(p.el=a(p.children||""),g,x):p.el=d.el},$=(d,p,g,x)=>{[d.el,d.anchor]=N(d.children,p,g,x,d.el,d.anchor)},B=({el:d,anchor:p},g,x)=>{let E;for(;d&&d!==p;)E=_(d),s(d,g,x),d=E;s(p,g,x)},O=({el:d,anchor:p})=>{let g;for(;d&&d!==p;)g=_(d),o(d),d=g;o(p)},V=(d,p,g,x,E,w,M,I,P)=>{if(p.type==="svg"?M="svg":p.type==="math"&&(M="mathml"),d==null)J(p,g,x,E,w,M,I,P);else{const A=d.el&&d.el._isVueCE?d.el:null;try{A&&A._beginPatch(),le(d,p,E,w,M,I,P)}finally{A&&A._endPatch()}}},J=(d,p,g,x,E,w,M,I)=>{let P,A;const{props:W,shapeFlag:D,transition:F,dirs:X}=d;if(P=d.el=r(d.type,w,W&&W.is,W),D&8?u(P,d.children):D&16&&oe(d.children,P,null,x,E,Ms(d,w),M,I),X&&Wt(d,null,x,"created"),ae(P,d,d.scopeId,M,x),W){for(const he in W)he!=="value"&&!bn(he)&&l(P,he,null,W[he],w,x);"value"in W&&l(P,"value",null,W.value,w),(A=W.onVnodeBeforeMount)&&vt(A,x,d)}X&&Wt(d,null,x,"beforeMount");const fe=Fa(E,F);fe&&F.beforeEnter(P),s(P,p,g),((A=W&&W.onVnodeMounted)||fe||X)&&Xe(()=>{try{A&&vt(A,x,d),fe&&F.enter(P),X&&Wt(d,null,x,"mounted")}finally{}},E)},ae=(d,p,g,x,E)=>{if(g&&b(d,g),x)for(let w=0;w{for(let A=P;A{const I=p.el=d.el;let{patchFlag:P,dynamicChildren:A,dirs:W}=p;P|=d.patchFlag&16;const D=d.props||ke,F=p.props||ke;let X;if(g&&qt(g,!1),(X=F.onVnodeBeforeUpdate)&&vt(X,g,p,d),W&&Wt(p,d,g,"beforeUpdate"),g&&qt(g,!0),(D.innerHTML&&F.innerHTML==null||D.textContent&&F.textContent==null)&&u(I,""),A?K(d.dynamicChildren,A,I,g,x,Ms(p,E),w):M||ce(d,p,I,null,g,x,Ms(p,E),w,!1),P>0){if(P&16)Y(I,D,F,g,E);else if(P&2&&D.class!==F.class&&l(I,"class",null,F.class,E),P&4&&l(I,"style",D.style,F.style,E),P&8){const fe=p.dynamicProps;for(let he=0;he{X&&vt(X,g,p,d),W&&Wt(p,d,g,"updated")},x)},K=(d,p,g,x,E,w,M)=>{for(let I=0;I{if(p!==g){if(p!==ke)for(const w in p)!bn(w)&&!(w in g)&&l(d,w,p[w],null,E,x);for(const w in g){if(bn(w))continue;const M=g[w],I=p[w];M!==I&&w!=="value"&&l(d,w,I,M,E,x)}"value"in g&&l(d,"value",p.value,g.value,E)}},de=(d,p,g,x,E,w,M,I,P)=>{const A=p.el=d?d.el:i(""),W=p.anchor=d?d.anchor:i("");let{patchFlag:D,dynamicChildren:F,slotScopeIds:X}=p;X&&(I=I?I.concat(X):X),d==null?(s(A,g,x),s(W,g,x),oe(p.children||[],g,W,E,w,M,I,P)):D>0&&D&64&&F&&d.dynamicChildren&&d.dynamicChildren.length===F.length?(K(d.dynamicChildren,F,g,E,w,M,I),(p.key!=null||E&&p===E.subTree)&&Ar(d,p,!0)):ce(d,p,g,W,E,w,M,I,P)},Q=(d,p,g,x,E,w,M,I,P)=>{p.slotScopeIds=I,d==null?p.shapeFlag&512?E.ctx.activate(p,g,x,M,P):Ce(p,g,x,E,w,M,P):Ie(d,p,P)},Ce=(d,p,g,x,E,w,M)=>{const I=d.component=Ya(d,x,E);if(dr(d)&&(I.ctx.renderer=q),Qa(I,!1,M),I.asyncDep){if(E&&E.registerDep(I,xe,M),!d.el){const P=I.subTree=Le(Ht);z(null,P,p,g),d.placeholder=P.el}}else xe(I,d,p,g,E,w,M)},Ie=(d,p,g)=>{const x=p.component=d.component;if(Ta(d,p,g))if(x.asyncDep&&!x.asyncResolved){te(x,p,g);return}else x.next=p,x.update();else p.el=d.el,x.vnode=p},xe=(d,p,g,x,E,w,M)=>{const I=()=>{if(d.isMounted){let{next:D,bu:F,u:X,parent:fe,vnode:he}=d;{const ot=Rr(d);if(ot){D&&(D.el=he.el,te(d,D,M)),ot.asyncDep.then(()=>{Xe(()=>{d.isUnmounted||A()},E)});return}}let ge=D,Re;qt(d,!1),D?(D.el=he.el,te(d,D,M)):D=he,F&&zn(F),(Re=D.props&&D.props.onVnodeBeforeUpdate)&&vt(Re,fe,D,he),qt(d,!0);const Ne=Ho(d),st=d.subTree;d.subTree=Ne,T(st,Ne,h(st.el),S(st),d,E,w),D.el=Ne.el,ge===null&&Pa(d,Ne.el),X&&Xe(X,E),(Re=D.props&&D.props.onVnodeUpdated)&&Xe(()=>vt(Re,fe,D,he),E)}else{let D;const{el:F,props:X}=p,{bm:fe,m:he,parent:ge,root:Re,type:Ne}=d,st=Sn(p);qt(d,!1),fe&&zn(fe),!st&&(D=X&&X.onVnodeBeforeMount)&&vt(D,ge,p),qt(d,!0);{Re.ce&&Re.ce._hasShadowRoot()&&Re.ce._injectChildStyle(Ne,d.parent?d.parent.type:void 0);const ot=d.subTree=Ho(d);T(null,ot,g,x,d,E,w),p.el=ot.el}if(he&&Xe(he,E),!st&&(D=X&&X.onVnodeMounted)){const ot=p;Xe(()=>vt(D,ge,ot),E)}(p.shapeFlag&256||ge&&Sn(ge.vnode)&&ge.vnode.shapeFlag&256)&&d.a&&Xe(d.a,E),d.isMounted=!0,p=g=x=null}};d.scope.on();const P=d.effect=new Fl(I);d.scope.off();const A=d.update=P.run.bind(P),W=d.job=P.runIfDirty.bind(P);W.i=d,W.id=d.uid,P.scheduler=()=>_o(W),qt(d,!0),A()},te=(d,p,g)=>{p.component=d;const x=d.vnode.props;d.vnode=p,d.next=null,Na(d,p.props,x,g),La(d,p.children,g),It(),No(d),Nt()},ce=(d,p,g,x,E,w,M,I,P=!1)=>{const A=d&&d.children,W=d?d.shapeFlag:0,D=p.children,{patchFlag:F,shapeFlag:X}=p;if(F>0){if(F&128){je(A,D,g,x,E,w,M,I,P);return}else if(F&256){ut(A,D,g,x,E,w,M,I,P);return}}X&8?(W&16&&Qe(A,E,w),D!==A&&u(g,D)):W&16?X&16?je(A,D,g,x,E,w,M,I,P):Qe(A,E,w,!0):(W&8&&u(g,""),X&16&&oe(D,g,x,E,w,M,I,P))},ut=(d,p,g,x,E,w,M,I,P)=>{d=d||sn,p=p||sn;const A=d.length,W=p.length,D=Math.min(A,W);let F;for(F=0;FW?Qe(d,E,w,!0,!1,D):oe(p,g,x,E,w,M,I,P,D)},je=(d,p,g,x,E,w,M,I,P)=>{let A=0;const W=p.length;let D=d.length-1,F=W-1;for(;A<=D&&A<=F;){const X=d[A],fe=p[A]=P?At(p[A]):yt(p[A]);if(vn(X,fe))T(X,fe,g,null,E,w,M,I,P);else break;A++}for(;A<=D&&A<=F;){const X=d[D],fe=p[F]=P?At(p[F]):yt(p[F]);if(vn(X,fe))T(X,fe,g,null,E,w,M,I,P);else break;D--,F--}if(A>D){if(A<=F){const X=F+1,fe=XF)for(;A<=D;)Ae(d[A],E,w,!0),A++;else{const X=A,fe=A,he=new Map;for(A=fe;A<=F;A++){const Ge=p[A]=P?At(p[A]):yt(p[A]);Ge.key!=null&&he.set(Ge.key,A)}let ge,Re=0;const Ne=F-fe+1;let st=!1,ot=0;const Gt=new Array(Ne);for(A=0;A=Ne){Ae(Ge,E,w,!0);continue}let Ve;if(Ge.key!=null)Ve=he.get(Ge.key);else for(ge=fe;ge<=F;ge++)if(Gt[ge-fe]===0&&vn(Ge,p[ge])){Ve=ge;break}Ve===void 0?Ae(Ge,E,w,!0):(Gt[Ve-fe]=A+1,Ve>=ot?ot=Ve:st=!0,T(Ge,p[Ve],g,null,E,w,M,I,P),Re++)}const Hn=st?Ua(Gt):sn;for(ge=Hn.length-1,A=Ne-1;A>=0;A--){const Ge=fe+A,Ve=p[Ge],Bn=p[Ge+1],Xt=Ge+1{const{el:w,type:M,transition:I,children:P,shapeFlag:A}=d;if(A&6){Ue(d.component.subTree,p,g,x);return}if(A&128){d.suspense.move(p,g,x);return}if(A&64){M.move(d,p,g,q);return}if(M===Z){s(w,p,g);for(let D=0;DI.enter(w),E));else{const{leave:D,delayLeave:F,afterLeave:X}=I,fe=()=>{d.ctx.isUnmounted?o(w):s(w,p,g)},he=()=>{const ge=w._isLeaving||!!w[Ns];w._isLeaving&&w[Ns](!0),I.persisted&&!ge?fe():D(w,()=>{fe(),X&&X()})};F?F(w,fe,he):he()}else s(w,p,g)},Ae=(d,p,g,x=!1,E=!1)=>{const{type:w,props:M,ref:I,children:P,dynamicChildren:A,shapeFlag:W,patchFlag:D,dirs:F,cacheIndex:X,memo:fe}=d;if(D===-2&&(E=!1),I!=null&&(It(),Cn(I,null,g,d,!0),Nt()),X!=null&&(p.renderCache[X]=void 0),W&256){p.ctx.deactivate(d);return}const he=W&1&&F,ge=!Sn(d);let Re;if(ge&&(Re=M&&M.onVnodeBeforeUnmount)&&vt(Re,p,d),W&6)kt(d.component,g,x);else{if(W&128){d.suspense.unmount(g,x);return}he&&Wt(d,null,p,"beforeUnmount"),W&64?d.type.remove(d,p,g,q,x):A&&!A.hasOnce&&(w!==Z||D>0&&D&64)?Qe(A,p,g,!1,!0):(w===Z&&D&384||!E&&W&16)&&Qe(P,p,g),x&&Ye(d)}const Ne=fe!=null&&X==null;(ge&&(Re=M&&M.onVnodeUnmounted)||he||Ne)&&Xe(()=>{Re&&vt(Re,p,d),he&&Wt(d,null,p,"unmounted"),Ne&&(d.el=null)},g)},Ye=d=>{const{type:p,el:g,anchor:x,transition:E}=d;if(p===Z){mt(g,x);return}if(p===Ds){O(d);return}const w=()=>{o(g),E&&!E.persisted&&E.afterLeave&&E.afterLeave()};if(d.shapeFlag&1&&E&&!E.persisted){const{leave:M,delayLeave:I}=E,P=()=>M(g,w);I?I(d.el,w,P):P()}else w()},mt=(d,p)=>{let g;for(;d!==p;)g=_(d),o(d),d=g;o(p)},kt=(d,p,g)=>{const{bum:x,scope:E,job:w,subTree:M,um:I,m:P,a:A}=d;Go(P),Go(A),x&&zn(x),E.stop(),w&&(w.flags|=8,Ae(M,d,p,g)),I&&Xe(I,p),Xe(()=>{d.isUnmounted=!0},p)},Qe=(d,p,g,x=!1,E=!1,w=0)=>{for(let M=w;M{if(d.shapeFlag&6)return S(d.component.subTree);if(d.shapeFlag&128)return d.suspense.next();const p=_(d.anchor||d.el),g=p&&p[ta];return g?_(g):p};let H=!1;const j=(d,p,g)=>{let x;d==null?p._vnode&&(Ae(p._vnode,null,null,!0),x=p._vnode.component):T(p._vnode||null,d,p,null,null,null,g),p._vnode=d,H||(H=!0,No(x),lr(),H=!1)},q={p:T,um:Ae,m:Ue,r:Ye,mt:Ce,mc:oe,pc:ce,pbc:K,n:S,o:e};return{render:j,hydrate:void 0,createApp:Ca(j)}}function Ms({type:e,props:t},n){return n==="svg"&&e==="foreignObject"||n==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function qt({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function Fa(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function Ar(e,t,n=!1){const s=e.children,o=t.children;if(ee(s)&&ee(o))for(let l=0;l>1,e[n[i]]0&&(t[s]=n[l-1]),n[l]=s)}}for(l=n.length,r=n[l-1];l-- >0;)n[l]=r,r=t[r];return n}function Rr(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Rr(t)}function Go(e){if(e)for(let t=0;te.__isSuspense;function Ha(e,t){t&&t.pendingBranch?ee(e)?t.effects.push(...e):t.effects.push(e):Yi(e)}const Z=Symbol.for("v-fgt"),xs=Symbol.for("v-txt"),Ht=Symbol.for("v-cmt"),Ds=Symbol.for("v-stc"),An=[];let tt=null;function k(e=!1){An.push(tt=e?null:[])}function Ba(){An.pop(),tt=An[An.length-1]||null}let Nn=1;function ls(e,t=!1){Nn+=e,e<0&&tt&&t&&(tt.hasOnce=!0)}function Pr(e){return e.dynamicChildren=Nn>0?tt||sn:null,Ba(),Nn>0&&tt&&tt.push(e),e}function C(e,t,n,s,o,l){return Pr(c(e,t,n,s,o,l,!0))}function Ka(e,t,n,s,o){return Pr(Le(e,t,n,s,o,!0))}function rs(e){return e?e.__v_isVNode===!0:!1}function vn(e,t){return e.type===t.type&&e.key===t.key}const Ir=({key:e})=>e??null,Qn=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?Te(e)||Pe(e)||se(e)?{i:et,r:e,k:t,f:!!n}:e:null);function c(e,t=null,n=null,s=0,o=null,l=e===Z?0:1,r=!1,i=!1){const a={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Ir(t),ref:t&&Qn(t),scopeId:ir,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:l,patchFlag:s,dynamicProps:o,dynamicChildren:null,appContext:null,ctx:et};return i?(xo(a,n),l&128&&e.normalize(a)):n&&(a.shapeFlag|=Te(n)?8:16),Nn>0&&!r&&tt&&(a.patchFlag>0||l&6)&&a.patchFlag!==32&&tt.push(a),a}const Le=Ga;function Ga(e,t=null,n=null,s=0,o=null,l=!1){if((!e||e===ma)&&(e=Ht),rs(e)){const i=an(e,t,!0);return n&&xo(i,n),Nn>0&&!l&&tt&&(i.shapeFlag&6?tt[tt.indexOf(e)]=i:tt.push(i)),i.patchFlag=-2,i}if(nc(e)&&(e=e.__vccOpts),t){t=Wa(t);let{class:i,style:a}=t;i&&!Te(i)&&(t.class=Ze(i)),we(a)&&(vs(a)&&!ee(a)&&(a=Fe({},a)),t.style=ao(a))}const r=Te(e)?1:Tr(e)?128:na(e)?64:we(e)?4:se(e)?2:0;return c(e,t,n,s,o,r,l,!0)}function Wa(e){return e?vs(e)||wr(e)?Fe({},e):e:null}function an(e,t,n=!1,s=!1){const{props:o,ref:l,patchFlag:r,children:i,transition:a}=e,f=t?qa(o||{},t):o,u={__v_isVNode:!0,__v_skip:!0,type:e.type,props:f,key:f&&Ir(f),ref:t&&t.ref?n&&l?ee(l)?l.concat(Qn(t)):[l,Qn(t)]:Qn(t):l,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:i,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==Z?r===-1?16:r|16:r,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:a,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&an(e.ssContent),ssFallback:e.ssFallback&&an(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return a&&s&&yo(u,a.clone(u)),u}function _e(e=" ",t=0){return Le(xs,null,e,t)}function Ee(e="",t=!1){return t?(k(),Ka(Ht,null,e)):Le(Ht,null,e)}function yt(e){return e==null||typeof e=="boolean"?Le(Ht):ee(e)?Le(Z,null,e.slice()):rs(e)?At(e):Le(xs,null,String(e))}function At(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:an(e)}function xo(e,t){let n=0;const{shapeFlag:s}=e;if(t==null)t=null;else if(ee(t))n=16;else if(typeof t=="object")if(s&65){const o=t.default;o&&(o._c&&(o._d=!1),xo(e,o()),o._c&&(o._d=!0));return}else{n=32;const o=t._;!o&&!wr(t)?t._ctx=et:o===3&&et&&(et.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else se(t)?(t={default:t,_ctx:et},n=32):(t=String(t),s&64?(n=16,t=[_e(t)]):n=8);e.children=t,e.shapeFlag|=n}function qa(...e){const t={};for(let n=0;nKe||et;let is,Xs;{const e=ps(),t=(n,s)=>{let o;return(o=e[n])||(o=e[n]=[]),o.push(s),l=>{o.length>1?o.forEach(r=>r(l)):o[0](l)}};is=t("__VUE_INSTANCE_SETTERS__",n=>Ke=n),Xs=t("__VUE_SSR_SETTERS__",n=>$n=n)}const Fn=e=>{const t=Ke;return is(e),e.scope.on(),()=>{e.scope.off(),is(t)}},Wo=()=>{Ke&&Ke.scope.off(),is(null)};function $r(e){return e.vnode.shapeFlag&4}let $n=!1;function Qa(e,t=!1,n=!1){t&&Xs(t);const{props:s,children:o}=e.vnode,l=$r(e);Ia(e,s,l,t),Da(e,o,n||t);const r=l?Xa(e,t):void 0;return t&&Xs(!1),r}function Xa(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,ga);const{setup:s}=n;if(s){It();const o=e.setupContext=s.length>1?ec(e):null,l=Fn(e),r=jn(s,e,0,[e.props,o]),i=Tl(r);if(Nt(),l(),(i||e.sp)&&!Sn(e)&&fr(e),i){if(r.then(Wo,Wo),t)return r.then(a=>{qo(e,a)}).catch(a=>{gs(a,e,0)});e.asyncDep=r}else qo(e,r)}else Mr(e)}function qo(e,t,n){se(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:we(t)&&(e.setupState=nr(t)),Mr(e)}function Mr(e,t,n){const s=e.type;e.render||(e.render=s.render||wt);{const o=Fn(e);It();try{_a(e)}finally{Nt(),o()}}}const Za={get(e,t){return Be(e,"get",""),e[t]}};function ec(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,Za),slots:e.slots,emit:e.emit,expose:t}}function ks(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(nr(go(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in En)return En[n](e)},has(t,n){return n in t||n in En}})):e.proxy}function tc(e,t=!0){return se(e)?e.displayName||e.name:e.name||t&&e.__name}function nc(e){return se(e)&&"__vccOpts"in e}const ve=(e,t)=>Gi(e,t,$n);function Dr(e,t,n){try{ls(-1);const s=arguments.length;return s===2?we(t)&&!ee(t)?rs(t)?Le(e,null,[t]):Le(e,t):Le(e,null,t):(s>3?n=Array.prototype.slice.call(arguments,2):s===3&&rs(n)&&(n=[n]),Le(e,t,n))}finally{ls(1)}}const sc="3.5.35";/** -* @vue/runtime-dom v3.5.35 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/let Zs;const zo=typeof window<"u"&&window.trustedTypes;if(zo)try{Zs=zo.createPolicy("vue",{createHTML:e=>e})}catch{}const Lr=Zs?e=>Zs.createHTML(e):e=>e,oc="http://www.w3.org/2000/svg",lc="http://www.w3.org/1998/Math/MathML",Et=typeof document<"u"?document:null,Jo=Et&&Et.createElement("template"),rc={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,s)=>{const o=t==="svg"?Et.createElementNS(oc,e):t==="mathml"?Et.createElementNS(lc,e):n?Et.createElement(e,{is:n}):Et.createElement(e);return e==="select"&&s&&s.multiple!=null&&o.setAttribute("multiple",s.multiple),o},createText:e=>Et.createTextNode(e),createComment:e=>Et.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Et.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,s,o,l){const r=n?n.previousSibling:t.lastChild;if(o&&(o===l||o.nextSibling))for(;t.insertBefore(o.cloneNode(!0),n),!(o===l||!(o=o.nextSibling)););else{Jo.innerHTML=Lr(s==="svg"?`${e}`:s==="mathml"?`${e}`:e);const i=Jo.content;if(s==="svg"||s==="mathml"){const a=i.firstChild;for(;a.firstChild;)i.appendChild(a.firstChild);i.removeChild(a)}t.insertBefore(i,n)}return[r?r.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},ic=Symbol("_vtc");function ac(e,t,n){const s=e[ic];s&&(t=(t?[t,...s]:[...s]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const Yo=Symbol("_vod"),cc=Symbol("_vsh"),uc=Symbol(""),fc=/(?:^|;)\s*display\s*:/;function dc(e,t,n){const s=e.style,o=Te(n);let l=!1;if(n&&!o){if(t)if(Te(t))for(const r of t.split(";")){const i=r.slice(0,r.indexOf(":")).trim();n[i]==null&&yn(s,i,"")}else for(const r in t)n[r]==null&&yn(s,r,"");for(const r in n){r==="display"&&(l=!0);const i=n[r];i!=null?pc(e,r,!Te(t)&&t?t[r]:void 0,i)||yn(s,r,i):yn(s,r,"")}}else if(o){if(t!==n){const r=s[uc];r&&(n+=";"+r),s.cssText=n,l=fc.test(n)}}else t&&e.removeAttribute("style");Yo in e&&(e[Yo]=l?s.display:"",e[cc]&&(s.display="none"))}const Qo=/\s*!important$/;function yn(e,t,n){if(ee(n))n.forEach(s=>yn(e,t,s));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const s=hc(e,t);Qo.test(n)?e.setProperty(Kt(s),n.replace(Qo,""),"important"):e[s]=n}}const Xo=["Webkit","Moz","ms"],Ls={};function hc(e,t){const n=Ls[t];if(n)return n;let s=Je(t);if(s!=="filter"&&s in e)return Ls[t]=s;s=ds(s);for(let o=0;ojs||(_c.then(()=>js=0),js=Date.now());function bc(e,t){const n=s=>{if(!s._vts)s._vts=Date.now();else if(s._vts<=n.attached)return;const o=n.value;if(ee(o)){const l=s.stopImmediatePropagation;s.stopImmediatePropagation=()=>{l.call(s),s._stopped=!0};const r=o.slice(),i=[s];for(let a=0;ae.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,wc=(e,t,n,s,o,l)=>{const r=o==="svg";t==="class"?ac(e,s,r):t==="style"?dc(e,n,s):as(t)?cs(t)||vc(e,t,n,s,l):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):xc(e,t,s,r))?(tl(e,t,s),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&el(e,t,s,r,l,t!=="value")):e._isVueCE&&(kc(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!Te(s)))?tl(e,Je(t),s,l,t):(t==="true-value"?e._trueValue=s:t==="false-value"&&(e._falseValue=s),el(e,t,s,r))};function xc(e,t,n,s){if(s)return!!(t==="innerHTML"||t==="textContent"||t in e&&ol(t)&&se(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||t==="sandbox"&&e.tagName==="IFRAME"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const o=e.tagName;if(o==="IMG"||o==="VIDEO"||o==="CANVAS"||o==="SOURCE")return!1}return ol(t)&&Te(n)?!1:t in e}function kc(e,t){const n=e._def.props;if(!n)return!1;const s=Je(t);return Array.isArray(n)?n.some(o=>Je(o)===s):Object.keys(n).some(o=>Je(o)===s)}const Bt=e=>{const t=e.props["onUpdate:modelValue"]||!1;return ee(t)?n=>zn(t,n):t};function Cc(e){e.target.composing=!0}function ll(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const at=Symbol("_assign");function rl(e,t,n){return t&&(e=e.trim()),n&&(e=hs(e)),e}const rt={created(e,{modifiers:{lazy:t,trim:n,number:s}},o){e[at]=Bt(o);const l=s||o.props&&o.props.type==="number";Tt(e,t?"change":"input",r=>{r.target.composing||e[at](rl(e.value,n,l))}),(n||l)&&Tt(e,"change",()=>{e.value=rl(e.value,n,l)}),t||(Tt(e,"compositionstart",Cc),Tt(e,"compositionend",ll),Tt(e,"change",ll))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:s,trim:o,number:l}},r){if(e[at]=Bt(r),e.composing)return;const i=(l||e.type==="number")&&!/^0\d/.test(e.value)?hs(e.value):e.value,a=t??"";if(i===a)return;const f=e.getRootNode();(f instanceof Document||f instanceof ShadowRoot)&&f.activeElement===e&&e.type!=="range"&&(s&&t===n||o&&e.value.trim()===a)||(e.value=a)}},Sc={deep:!0,created(e,t,n){e[at]=Bt(n),Tt(e,"change",()=>{const s=e._modelValue,o=cn(e),l=e.checked,r=e[at];if(ee(s)){const i=co(s,o),a=i!==-1;if(l&&!a)r(s.concat(o));else if(!l&&a){const f=[...s];f.splice(i,1),r(f)}}else if(dn(s)){const i=new Set(s);l?i.add(o):i.delete(o),r(i)}else r(jr(e,l))})},mounted:il,beforeUpdate(e,t,n){e[at]=Bt(n),il(e,t,n)}};function il(e,{value:t,oldValue:n},s){e._modelValue=t;let o;if(ee(t))o=co(t,s.props.value)>-1;else if(dn(t))o=t.has(s.props.value);else{if(t===n)return;o=Ut(t,jr(e,!0))}e.checked!==o&&(e.checked=o)}const al={created(e,{value:t},n){e.checked=Ut(t,n.props.value),e[at]=Bt(n),Tt(e,"change",()=>{e[at](cn(e))})},beforeUpdate(e,{value:t,oldValue:n},s){e[at]=Bt(s),t!==n&&(e.checked=Ut(t,s.props.value))}},Ec={deep:!0,created(e,{value:t,modifiers:{number:n}},s){const o=dn(t);Tt(e,"change",()=>{const l=Array.prototype.filter.call(e.options,r=>r.selected).map(r=>n?hs(cn(r)):cn(r));e[at](e.multiple?o?new Set(l):l:l[0]),e._assigning=!0,Vn(()=>{e._assigning=!1})}),e[at]=Bt(s)},mounted(e,{value:t}){cl(e,t)},beforeUpdate(e,t,n){e[at]=Bt(n)},updated(e,{value:t}){e._assigning||cl(e,t)}};function cl(e,t){const n=e.multiple,s=ee(t);if(!(n&&!s&&!dn(t))){for(let o=0,l=e.options.length;oString(f)===String(i)):r.selected=co(t,i)>-1}else r.selected=t.has(i);else if(Ut(cn(r),t)){e.selectedIndex!==o&&(e.selectedIndex=o);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function cn(e){return"_value"in e?e._value:e.value}function jr(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const Ac=["ctrl","shift","alt","meta"],Rc={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>Ac.some(n=>e[`${n}Key`]&&!t.includes(n))},qn=(e,t)=>{if(!e)return e;const n=e._withMods||(e._withMods={}),s=t.join(".");return n[s]||(n[s]=(o,...l)=>{for(let r=0;r{const n=e._withKeys||(e._withKeys={}),s=t.join(".");return n[s]||(n[s]=o=>{if(!("key"in o))return;const l=Kt(o.key);if(t.some(r=>r===l||Oc[r]===l))return e(o)})},Tc=Fe({patchProp:wc},rc);let ul;function Pc(){return ul||(ul=ja(Tc))}const Ic=(...e)=>{const t=Pc().createApp(...e),{mount:n}=t;return t.mount=s=>{const o=$c(s);if(!o)return;const l=t._component;!se(l)&&!l.render&&!l.template&&(l.template=o.innerHTML),o.nodeType===1&&(o.textContent="");const r=n(o,!1,Nc(o));return o instanceof Element&&(o.removeAttribute("v-cloak"),o.setAttribute("data-v-app","")),r},t};function Nc(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function $c(e){return Te(e)?document.querySelector(e):e}/*! - * pinia v2.3.1 - * (c) 2025 Eduardo San Martin Morote - * @license MIT - */let Vr;const Cs=e=>Vr=e,Fr=Symbol();function eo(e){return e&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]"&&typeof e.toJSON!="function"}var Rn;(function(e){e.direct="direct",e.patchObject="patch object",e.patchFunction="patch function"})(Rn||(Rn={}));function Mc(){const e=jl(!0),t=e.run(()=>ne({}));let n=[],s=[];const o=go({install(l){Cs(o),o._a=l,l.provide(Fr,o),l.config.globalProperties.$pinia=o,s.forEach(r=>n.push(r)),s=[]},use(l){return this._a?n.push(l):s.push(l),this},_p:n,_a:null,_e:e,_s:new Map,state:t});return o}const Ur=()=>{};function fl(e,t,n,s=Ur){e.push(t);const o=()=>{const l=e.indexOf(t);l>-1&&(e.splice(l,1),s())};return!n&&Vl()&&yi(o),o}function en(e,...t){e.slice().forEach(n=>{n(...t)})}const Dc=e=>e(),dl=Symbol(),Vs=Symbol();function to(e,t){e instanceof Map&&t instanceof Map?t.forEach((n,s)=>e.set(s,n)):e instanceof Set&&t instanceof Set&&t.forEach(e.add,e);for(const n in t){if(!t.hasOwnProperty(n))continue;const s=t[n],o=e[n];eo(o)&&eo(s)&&e.hasOwnProperty(n)&&!Pe(s)&&!Pt(s)?e[n]=to(o,s):e[n]=s}return e}const Lc=Symbol();function jc(e){return!eo(e)||!e.hasOwnProperty(Lc)}const{assign:Lt}=Object;function Vc(e){return!!(Pe(e)&&e.effect)}function Fc(e,t,n,s){const{state:o,actions:l,getters:r}=t,i=n.state.value[e];let a;function f(){i||(n.state.value[e]=o?o():{});const u=Ui(n.state.value[e]);return Lt(u,l,Object.keys(r||{}).reduce((h,_)=>(h[_]=go(ve(()=>{Cs(n);const b=n._s.get(e);return r[_].call(b,b)})),h),{}))}return a=Hr(e,f,t,n,s,!0),a}function Hr(e,t,n={},s,o,l){let r;const i=Lt({actions:{}},n),a={deep:!0};let f,u,h=[],_=[],b;const N=s.state.value[e];!l&&!N&&(s.state.value[e]={});let T;function U(oe){let le;f=u=!1,typeof oe=="function"?(oe(s.state.value[e]),le={type:Rn.patchFunction,storeId:e,events:b}):(to(s.state.value[e],oe),le={type:Rn.patchObject,payload:oe,storeId:e,events:b});const K=T=Symbol();Vn().then(()=>{T===K&&(f=!0)}),u=!0,en(h,le,s.state.value[e])}const z=l?function(){const{state:le}=n,K=le?le():{};this.$patch(Y=>{Lt(Y,K)})}:Ur;function $(){r.stop(),h=[],_=[],s._s.delete(e)}const B=(oe,le="")=>{if(dl in oe)return oe[Vs]=le,oe;const K=function(){Cs(s);const Y=Array.from(arguments),de=[],Q=[];function Ce(te){de.push(te)}function Ie(te){Q.push(te)}en(_,{args:Y,name:K[Vs],store:V,after:Ce,onError:Ie});let xe;try{xe=oe.apply(this&&this.$id===e?this:V,Y)}catch(te){throw en(Q,te),te}return xe instanceof Promise?xe.then(te=>(en(de,te),te)).catch(te=>(en(Q,te),Promise.reject(te))):(en(de,xe),xe)};return K[dl]=!0,K[Vs]=le,K},O={_p:s,$id:e,$onAction:fl.bind(null,_),$patch:U,$reset:z,$subscribe(oe,le={}){const K=fl(h,oe,le.detached,()=>Y()),Y=r.run(()=>kn(()=>s.state.value[e],de=>{(le.flush==="sync"?u:f)&&oe({storeId:e,type:Rn.direct,events:b},de)},Lt({},a,le)));return K},$dispose:$},V=Ln(O);s._s.set(e,V);const ae=(s._a&&s._a.runWithContext||Dc)(()=>s._e.run(()=>(r=jl()).run(()=>t({action:B}))));for(const oe in ae){const le=ae[oe];if(Pe(le)&&!Vc(le)||Pt(le))l||(N&&jc(le)&&(Pe(le)?le.value=N[oe]:to(le,N[oe])),s.state.value[e][oe]=le);else if(typeof le=="function"){const K=B(le,oe);ae[oe]=K,i.actions[oe]=le}}return Lt(V,ae),Lt(me(V),ae),Object.defineProperty(V,"$state",{get:()=>s.state.value[e],set:oe=>{U(le=>{Lt(le,oe)})}}),s._p.forEach(oe=>{Lt(V,r.run(()=>oe({store:V,app:s._a,pinia:s,options:i})))}),N&&l&&n.hydrate&&n.hydrate(V.$state,N),f=!0,u=!0,V}/*! #__NO_SIDE_EFFECTS__ */function Uc(e,t,n){let s,o;const l=typeof t=="function";s=e,o=l?n:t;function r(i,a){const f=Qi();return i=i||(f?it(Fr,null):null),i&&Cs(i),i=Vr,i._s.has(s)||(l?Hr(s,t,o,i):Fc(s,o,i)),i._s.get(s)}return r.$id=s,r}/*! - * vue-router v4.6.4 - * (c) 2025 Eduardo San Martin Morote - * @license MIT - */const nn=typeof document<"u";function Br(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function Hc(e){return e.__esModule||e[Symbol.toStringTag]==="Module"||e.default&&Br(e.default)}const ye=Object.assign;function Fs(e,t){const n={};for(const s in t){const o=t[s];n[s]=pt(o)?o.map(e):e(o)}return n}const On=()=>{},pt=Array.isArray;function hl(e,t){const n={};for(const s in e)n[s]=s in t?t[s]:e[s];return n}const Kr=/#/g,Bc=/&/g,Kc=/\//g,Gc=/=/g,Wc=/\?/g,Gr=/\+/g,qc=/%5B/g,zc=/%5D/g,Wr=/%5E/g,Jc=/%60/g,qr=/%7B/g,Yc=/%7C/g,zr=/%7D/g,Qc=/%20/g;function ko(e){return e==null?"":encodeURI(""+e).replace(Yc,"|").replace(qc,"[").replace(zc,"]")}function Xc(e){return ko(e).replace(qr,"{").replace(zr,"}").replace(Wr,"^")}function no(e){return ko(e).replace(Gr,"%2B").replace(Qc,"+").replace(Kr,"%23").replace(Bc,"%26").replace(Jc,"`").replace(qr,"{").replace(zr,"}").replace(Wr,"^")}function Zc(e){return no(e).replace(Gc,"%3D")}function eu(e){return ko(e).replace(Kr,"%23").replace(Wc,"%3F")}function tu(e){return eu(e).replace(Kc,"%2F")}function Mn(e){if(e==null)return null;try{return decodeURIComponent(""+e)}catch{}return""+e}const nu=/\/$/,su=e=>e.replace(nu,"");function Us(e,t,n="/"){let s,o={},l="",r="";const i=t.indexOf("#");let a=t.indexOf("?");return a=i>=0&&a>i?-1:a,a>=0&&(s=t.slice(0,a),l=t.slice(a,i>0?i:t.length),o=e(l.slice(1))),i>=0&&(s=s||t.slice(0,i),r=t.slice(i,t.length)),s=iu(s??t,n),{fullPath:s+l+r,path:s,query:o,hash:Mn(r)}}function ou(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function pl(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function lu(e,t,n){const s=t.matched.length-1,o=n.matched.length-1;return s>-1&&s===o&&un(t.matched[s],n.matched[o])&&Jr(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function un(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function Jr(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var n in e)if(!ru(e[n],t[n]))return!1;return!0}function ru(e,t){return pt(e)?ml(e,t):pt(t)?ml(t,e):(e==null?void 0:e.valueOf())===(t==null?void 0:t.valueOf())}function ml(e,t){return pt(t)?e.length===t.length&&e.every((n,s)=>n===t[s]):e.length===1&&e[0]===t}function iu(e,t){if(e.startsWith("/"))return e;if(!e)return t;const n=t.split("/"),s=e.split("/"),o=s[s.length-1];(o===".."||o===".")&&s.push("");let l=n.length-1,r,i;for(r=0;r1&&l--;else break;return n.slice(0,l).join("/")+"/"+s.slice(r).join("/")}const Dt={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};let so=function(e){return e.pop="pop",e.push="push",e}({}),Hs=function(e){return e.back="back",e.forward="forward",e.unknown="",e}({});function au(e){if(!e)if(nn){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),su(e)}const cu=/^[^#]+#/;function uu(e,t){return e.replace(cu,"#")+t}function fu(e,t){const n=document.documentElement.getBoundingClientRect(),s=e.getBoundingClientRect();return{behavior:t.behavior,left:s.left-n.left-(t.left||0),top:s.top-n.top-(t.top||0)}}const Ss=()=>({left:window.scrollX,top:window.scrollY});function du(e){let t;if("el"in e){const n=e.el,s=typeof n=="string"&&n.startsWith("#"),o=typeof n=="string"?s?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!o)return;t=fu(o,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.scrollX,t.top!=null?t.top:window.scrollY)}function vl(e,t){return(history.state?history.state.position-t:-1)+e}const oo=new Map;function hu(e,t){oo.set(e,t)}function pu(e){const t=oo.get(e);return oo.delete(e),t}function mu(e){return typeof e=="string"||e&&typeof e=="object"}function Yr(e){return typeof e=="string"||typeof e=="symbol"}let Oe=function(e){return e[e.MATCHER_NOT_FOUND=1]="MATCHER_NOT_FOUND",e[e.NAVIGATION_GUARD_REDIRECT=2]="NAVIGATION_GUARD_REDIRECT",e[e.NAVIGATION_ABORTED=4]="NAVIGATION_ABORTED",e[e.NAVIGATION_CANCELLED=8]="NAVIGATION_CANCELLED",e[e.NAVIGATION_DUPLICATED=16]="NAVIGATION_DUPLICATED",e}({});const Qr=Symbol("");Oe.MATCHER_NOT_FOUND+"",Oe.NAVIGATION_GUARD_REDIRECT+"",Oe.NAVIGATION_ABORTED+"",Oe.NAVIGATION_CANCELLED+"",Oe.NAVIGATION_DUPLICATED+"";function fn(e,t){return ye(new Error,{type:e,[Qr]:!0},t)}function St(e,t){return e instanceof Error&&Qr in e&&(t==null||!!(e.type&t))}const vu=["params","query","hash"];function gu(e){if(typeof e=="string")return e;if(e.path!=null)return e.path;const t={};for(const n of vu)n in e&&(t[n]=e[n]);return JSON.stringify(t,null,2)}function _u(e){const t={};if(e===""||e==="?")return t;const n=(e[0]==="?"?e.slice(1):e).split("&");for(let s=0;so&&no(o)):[s&&no(s)]).forEach(o=>{o!==void 0&&(t+=(t.length?"&":"")+n,o!=null&&(t+="="+o))})}return t}function yu(e){const t={};for(const n in e){const s=e[n];s!==void 0&&(t[n]=pt(s)?s.map(o=>o==null?null:""+o):s==null?s:""+s)}return t}const bu=Symbol(""),_l=Symbol(""),Es=Symbol(""),Co=Symbol(""),lo=Symbol("");function gn(){let e=[];function t(s){return e.push(s),()=>{const o=e.indexOf(s);o>-1&&e.splice(o,1)}}function n(){e=[]}return{add:t,list:()=>e.slice(),reset:n}}function Vt(e,t,n,s,o,l=r=>r()){const r=s&&(s.enterCallbacks[o]=s.enterCallbacks[o]||[]);return()=>new Promise((i,a)=>{const f=_=>{_===!1?a(fn(Oe.NAVIGATION_ABORTED,{from:n,to:t})):_ instanceof Error?a(_):mu(_)?a(fn(Oe.NAVIGATION_GUARD_REDIRECT,{from:t,to:_})):(r&&s.enterCallbacks[o]===r&&typeof _=="function"&&r.push(_),i())},u=l(()=>e.call(s&&s.instances[o],t,n,f));let h=Promise.resolve(u);e.length<3&&(h=h.then(f)),h.catch(_=>a(_))})}function Bs(e,t,n,s,o=l=>l()){const l=[];for(const r of e)for(const i in r.components){let a=r.components[i];if(!(t!=="beforeRouteEnter"&&!r.instances[i]))if(Br(a)){const f=(a.__vccOpts||a)[t];f&&l.push(Vt(f,n,s,r,i,o))}else{let f=a();l.push(()=>f.then(u=>{if(!u)throw new Error(`Couldn't resolve component "${i}" at "${r.path}"`);const h=Hc(u)?u.default:u;r.mods[i]=u,r.components[i]=h;const _=(h.__vccOpts||h)[t];return _&&Vt(_,n,s,r,i,o)()}))}}return l}function wu(e,t){const n=[],s=[],o=[],l=Math.max(t.matched.length,e.matched.length);for(let r=0;run(f,i))?s.push(i):n.push(i));const a=e.matched[r];a&&(t.matched.find(f=>un(f,a))||o.push(a))}return[n,s,o]}/*! - * vue-router v4.6.4 - * (c) 2025 Eduardo San Martin Morote - * @license MIT - */let xu=()=>location.protocol+"//"+location.host;function Xr(e,t){const{pathname:n,search:s,hash:o}=t,l=e.indexOf("#");if(l>-1){let r=o.includes(e.slice(l))?e.slice(l).length:1,i=o.slice(r);return i[0]!=="/"&&(i="/"+i),pl(i,"")}return pl(n,e)+s+o}function ku(e,t,n,s){let o=[],l=[],r=null;const i=({state:_})=>{const b=Xr(e,location),N=n.value,T=t.value;let U=0;if(_){if(n.value=b,t.value=_,r&&r===N){r=null;return}U=T?_.position-T.position:0}else s(b);o.forEach(z=>{z(n.value,N,{delta:U,type:so.pop,direction:U?U>0?Hs.forward:Hs.back:Hs.unknown})})};function a(){r=n.value}function f(_){o.push(_);const b=()=>{const N=o.indexOf(_);N>-1&&o.splice(N,1)};return l.push(b),b}function u(){if(document.visibilityState==="hidden"){const{history:_}=window;if(!_.state)return;_.replaceState(ye({},_.state,{scroll:Ss()}),"")}}function h(){for(const _ of l)_();l=[],window.removeEventListener("popstate",i),window.removeEventListener("pagehide",u),document.removeEventListener("visibilitychange",u)}return window.addEventListener("popstate",i),window.addEventListener("pagehide",u),document.addEventListener("visibilitychange",u),{pauseListeners:a,listen:f,destroy:h}}function yl(e,t,n,s=!1,o=!1){return{back:e,current:t,forward:n,replaced:s,position:window.history.length,scroll:o?Ss():null}}function Cu(e){const{history:t,location:n}=window,s={value:Xr(e,n)},o={value:t.state};o.value||l(s.value,{back:null,current:s.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function l(a,f,u){const h=e.indexOf("#"),_=h>-1?(n.host&&document.querySelector("base")?e:e.slice(h))+a:xu()+e+a;try{t[u?"replaceState":"pushState"](f,"",_),o.value=f}catch(b){console.error(b),n[u?"replace":"assign"](_)}}function r(a,f){l(a,ye({},t.state,yl(o.value.back,a,o.value.forward,!0),f,{position:o.value.position}),!0),s.value=a}function i(a,f){const u=ye({},o.value,t.state,{forward:a,scroll:Ss()});l(u.current,u,!0),l(a,ye({},yl(s.value,a,null),{position:u.position+1},f),!1),s.value=a}return{location:s,state:o,push:i,replace:r}}function Su(e){e=au(e);const t=Cu(e),n=ku(e,t.state,t.location,t.replace);function s(l,r=!0){r||n.pauseListeners(),history.go(l)}const o=ye({location:"",base:e,go:s,createHref:uu.bind(null,e)},t,n);return Object.defineProperty(o,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(o,"state",{enumerable:!0,get:()=>t.state.value}),o}function Eu(e){return e=location.host?e||location.pathname+location.search:"",e.includes("#")||(e+="#"),Su(e)}let Jt=function(e){return e[e.Static=0]="Static",e[e.Param=1]="Param",e[e.Group=2]="Group",e}({});var Me=function(e){return e[e.Static=0]="Static",e[e.Param=1]="Param",e[e.ParamRegExp=2]="ParamRegExp",e[e.ParamRegExpEnd=3]="ParamRegExpEnd",e[e.EscapeNext=4]="EscapeNext",e}(Me||{});const Au={type:Jt.Static,value:""},Ru=/[a-zA-Z0-9_]/;function Ou(e){if(!e)return[[]];if(e==="/")return[[Au]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(b){throw new Error(`ERR (${n})/"${f}": ${b}`)}let n=Me.Static,s=n;const o=[];let l;function r(){l&&o.push(l),l=[]}let i=0,a,f="",u="";function h(){f&&(n===Me.Static?l.push({type:Jt.Static,value:f}):n===Me.Param||n===Me.ParamRegExp||n===Me.ParamRegExpEnd?(l.length>1&&(a==="*"||a==="+")&&t(`A repeatable param (${f}) must be alone in its segment. eg: '/:ids+.`),l.push({type:Jt.Param,value:f,regexp:u,repeatable:a==="*"||a==="+",optional:a==="*"||a==="?"})):t("Invalid state to consume buffer"),f="")}function _(){f+=a}for(;it.length?t.length===1&&t[0]===qe.Static+qe.Segment?1:-1:0}function Zr(e,t){let n=0;const s=e.score,o=t.score;for(;n0&&t[t.length-1]<0}const $u={strict:!1,end:!0,sensitive:!1};function Mu(e,t,n){const s=Iu(Ou(e.path),n),o=ye(s,{record:e,parent:t,children:[],alias:[]});return t&&!o.record.aliasOf==!t.record.aliasOf&&t.children.push(o),o}function Du(e,t){const n=[],s=new Map;t=hl($u,t);function o(h){return s.get(h)}function l(h,_,b){const N=!b,T=kl(h);T.aliasOf=b&&b.record;const U=hl(t,h),z=[T];if("alias"in h){const O=typeof h.alias=="string"?[h.alias]:h.alias;for(const V of O)z.push(kl(ye({},T,{components:b?b.record.components:T.components,path:V,aliasOf:b?b.record:T})))}let $,B;for(const O of z){const{path:V}=O;if(_&&V[0]!=="/"){const J=_.record.path,ae=J[J.length-1]==="/"?"":"/";O.path=_.record.path+(V&&ae+V)}if($=Mu(O,_,U),b?b.alias.push($):(B=B||$,B!==$&&B.alias.push($),N&&h.name&&!Cl($)&&r(h.name)),ei($)&&a($),T.children){const J=T.children;for(let ae=0;ae{r(B)}:On}function r(h){if(Yr(h)){const _=s.get(h);_&&(s.delete(h),n.splice(n.indexOf(_),1),_.children.forEach(r),_.alias.forEach(r))}else{const _=n.indexOf(h);_>-1&&(n.splice(_,1),h.record.name&&s.delete(h.record.name),h.children.forEach(r),h.alias.forEach(r))}}function i(){return n}function a(h){const _=Vu(h,n);n.splice(_,0,h),h.record.name&&!Cl(h)&&s.set(h.record.name,h)}function f(h,_){let b,N={},T,U;if("name"in h&&h.name){if(b=s.get(h.name),!b)throw fn(Oe.MATCHER_NOT_FOUND,{location:h});U=b.record.name,N=ye(xl(_.params,b.keys.filter(B=>!B.optional).concat(b.parent?b.parent.keys.filter(B=>B.optional):[]).map(B=>B.name)),h.params&&xl(h.params,b.keys.map(B=>B.name))),T=b.stringify(N)}else if(h.path!=null)T=h.path,b=n.find(B=>B.re.test(T)),b&&(N=b.parse(T),U=b.record.name);else{if(b=_.name?s.get(_.name):n.find(B=>B.re.test(_.path)),!b)throw fn(Oe.MATCHER_NOT_FOUND,{location:h,currentLocation:_});U=b.record.name,N=ye({},_.params,h.params),T=b.stringify(N)}const z=[];let $=b;for(;$;)z.unshift($.record),$=$.parent;return{name:U,path:T,params:N,matched:z,meta:ju(z)}}e.forEach(h=>l(h));function u(){n.length=0,s.clear()}return{addRoute:l,resolve:f,removeRoute:r,clearRoutes:u,getRoutes:i,getRecordMatcher:o}}function xl(e,t){const n={};for(const s of t)s in e&&(n[s]=e[s]);return n}function kl(e){const t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:Lu(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}};return Object.defineProperty(t,"mods",{value:{}}),t}function Lu(e){const t={},n=e.props||!1;if("component"in e)t.default=n;else for(const s in e.components)t[s]=typeof n=="object"?n[s]:n;return t}function Cl(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function ju(e){return e.reduce((t,n)=>ye(t,n.meta),{})}function Vu(e,t){let n=0,s=t.length;for(;n!==s;){const l=n+s>>1;Zr(e,t[l])<0?s=l:n=l+1}const o=Fu(e);return o&&(s=t.lastIndexOf(o,s-1)),s}function Fu(e){let t=e;for(;t=t.parent;)if(ei(t)&&Zr(e,t)===0)return t}function ei({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function Sl(e){const t=it(Es),n=it(Co),s=ve(()=>{const a=xt(e.to);return t.resolve(a)}),o=ve(()=>{const{matched:a}=s.value,{length:f}=a,u=a[f-1],h=n.matched;if(!u||!h.length)return-1;const _=h.findIndex(un.bind(null,u));if(_>-1)return _;const b=El(a[f-2]);return f>1&&El(u)===b&&h[h.length-1].path!==b?h.findIndex(un.bind(null,a[f-2])):_}),l=ve(()=>o.value>-1&&Gu(n.params,s.value.params)),r=ve(()=>o.value>-1&&o.value===n.matched.length-1&&Jr(n.params,s.value.params));function i(a={}){if(Ku(a)){const f=t[xt(e.replace)?"replace":"push"](xt(e.to)).catch(On);return e.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>f),f}return Promise.resolve()}return{route:s,href:ve(()=>s.value.href),isActive:l,isExactActive:r,navigate:i}}function Uu(e){return e.length===1?e[0]:e}const Hu=ur({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"},viewTransition:Boolean},useLink:Sl,setup(e,{slots:t}){const n=Ln(Sl(e)),{options:s}=it(Es),o=ve(()=>({[Al(e.activeClass,s.linkActiveClass,"router-link-active")]:n.isActive,[Al(e.exactActiveClass,s.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const l=t.default&&Uu(t.default(n));return e.custom?l:Dr("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:o.value},l)}}}),Bu=Hu;function Ku(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function Gu(e,t){for(const n in t){const s=t[n],o=e[n];if(typeof s=="string"){if(s!==o)return!1}else if(!pt(o)||o.length!==s.length||s.some((l,r)=>l.valueOf()!==o[r].valueOf()))return!1}return!0}function El(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const Al=(e,t,n)=>e??t??n,Wu=ur({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){const s=it(lo),o=ve(()=>e.route||s.value),l=it(_l,0),r=ve(()=>{let f=xt(l);const{matched:u}=o.value;let h;for(;(h=u[f])&&!h.components;)f++;return f}),i=ve(()=>o.value.matched[r.value]);Yn(_l,ve(()=>r.value+1)),Yn(bu,i),Yn(lo,o);const a=ne();return kn(()=>[a.value,i.value,e.name],([f,u,h],[_,b,N])=>{u&&(u.instances[h]=f,b&&b!==u&&f&&f===_&&(u.leaveGuards.size||(u.leaveGuards=b.leaveGuards),u.updateGuards.size||(u.updateGuards=b.updateGuards))),f&&u&&(!b||!un(u,b)||!_)&&(u.enterCallbacks[h]||[]).forEach(T=>T(f))},{flush:"post"}),()=>{const f=o.value,u=e.name,h=i.value,_=h&&h.components[u];if(!_)return Rl(n.default,{Component:_,route:f});const b=h.props[u],N=b?b===!0?f.params:typeof b=="function"?b(f):b:null,U=Dr(_,ye({},N,t,{onVnodeUnmounted:z=>{z.component.isUnmounted&&(h.instances[u]=null)},ref:a}));return Rl(n.default,{Component:U,route:f})||U}}});function Rl(e,t){if(!e)return null;const n=e(t);return n.length===1?n[0]:n}const qu=Wu;function zu(e){const t=Du(e.routes,e),n=e.parseQuery||_u,s=e.stringifyQuery||gl,o=e.history,l=gn(),r=gn(),i=gn(),a=ji(Dt);let f=Dt;nn&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const u=Fs.bind(null,S=>""+S),h=Fs.bind(null,tu),_=Fs.bind(null,Mn);function b(S,H){let j,q;return Yr(S)?(j=t.getRecordMatcher(S),q=H):q=S,t.addRoute(q,j)}function N(S){const H=t.getRecordMatcher(S);H&&t.removeRoute(H)}function T(){return t.getRoutes().map(S=>S.record)}function U(S){return!!t.getRecordMatcher(S)}function z(S,H){if(H=ye({},H||a.value),typeof S=="string"){const g=Us(n,S,H.path),x=t.resolve({path:g.path},H),E=o.createHref(g.fullPath);return ye(g,x,{params:_(x.params),hash:Mn(g.hash),redirectedFrom:void 0,href:E})}let j;if(S.path!=null)j=ye({},S,{path:Us(n,S.path,H.path).path});else{const g=ye({},S.params);for(const x in g)g[x]==null&&delete g[x];j=ye({},S,{params:h(g)}),H.params=h(H.params)}const q=t.resolve(j,H),ue=S.hash||"";q.params=u(_(q.params));const d=ou(s,ye({},S,{hash:Xc(ue),path:q.path})),p=o.createHref(d);return ye({fullPath:d,hash:ue,query:s===gl?yu(S.query):S.query||{}},q,{redirectedFrom:void 0,href:p})}function $(S){return typeof S=="string"?Us(n,S,a.value.path):ye({},S)}function B(S,H){if(f!==S)return fn(Oe.NAVIGATION_CANCELLED,{from:H,to:S})}function O(S){return ae(S)}function V(S){return O(ye($(S),{replace:!0}))}function J(S,H){const j=S.matched[S.matched.length-1];if(j&&j.redirect){const{redirect:q}=j;let ue=typeof q=="function"?q(S,H):q;return typeof ue=="string"&&(ue=ue.includes("?")||ue.includes("#")?ue=$(ue):{path:ue},ue.params={}),ye({query:S.query,hash:S.hash,params:ue.path!=null?{}:S.params},ue)}}function ae(S,H){const j=f=z(S),q=a.value,ue=S.state,d=S.force,p=S.replace===!0,g=J(j,q);if(g)return ae(ye($(g),{state:typeof g=="object"?ye({},ue,g.state):ue,force:d,replace:p}),H||j);const x=j;x.redirectedFrom=H;let E;return!d&&lu(s,q,j)&&(E=fn(Oe.NAVIGATION_DUPLICATED,{to:x,from:q}),Ue(q,q,!0,!1)),(E?Promise.resolve(E):K(x,q)).catch(w=>St(w)?St(w,Oe.NAVIGATION_GUARD_REDIRECT)?w:je(w):ce(w,x,q)).then(w=>{if(w){if(St(w,Oe.NAVIGATION_GUARD_REDIRECT))return ae(ye({replace:p},$(w.to),{state:typeof w.to=="object"?ye({},ue,w.to.state):ue,force:d}),H||x)}else w=de(x,q,!0,p,ue);return Y(x,q,w),w})}function oe(S,H){const j=B(S,H);return j?Promise.reject(j):Promise.resolve()}function le(S){const H=mt.values().next().value;return H&&typeof H.runWithContext=="function"?H.runWithContext(S):S()}function K(S,H){let j;const[q,ue,d]=wu(S,H);j=Bs(q.reverse(),"beforeRouteLeave",S,H);for(const g of q)g.leaveGuards.forEach(x=>{j.push(Vt(x,S,H))});const p=oe.bind(null,S,H);return j.push(p),Qe(j).then(()=>{j=[];for(const g of l.list())j.push(Vt(g,S,H));return j.push(p),Qe(j)}).then(()=>{j=Bs(ue,"beforeRouteUpdate",S,H);for(const g of ue)g.updateGuards.forEach(x=>{j.push(Vt(x,S,H))});return j.push(p),Qe(j)}).then(()=>{j=[];for(const g of d)if(g.beforeEnter)if(pt(g.beforeEnter))for(const x of g.beforeEnter)j.push(Vt(x,S,H));else j.push(Vt(g.beforeEnter,S,H));return j.push(p),Qe(j)}).then(()=>(S.matched.forEach(g=>g.enterCallbacks={}),j=Bs(d,"beforeRouteEnter",S,H,le),j.push(p),Qe(j))).then(()=>{j=[];for(const g of r.list())j.push(Vt(g,S,H));return j.push(p),Qe(j)}).catch(g=>St(g,Oe.NAVIGATION_CANCELLED)?g:Promise.reject(g))}function Y(S,H,j){i.list().forEach(q=>le(()=>q(S,H,j)))}function de(S,H,j,q,ue){const d=B(S,H);if(d)return d;const p=H===Dt,g=nn?history.state:{};j&&(q||p?o.replace(S.fullPath,ye({scroll:p&&g&&g.scroll},ue)):o.push(S.fullPath,ue)),a.value=S,Ue(S,H,j,p),je()}let Q;function Ce(){Q||(Q=o.listen((S,H,j)=>{if(!kt.listening)return;const q=z(S),ue=J(q,kt.currentRoute.value);if(ue){ae(ye(ue,{replace:!0,force:!0}),q).catch(On);return}f=q;const d=a.value;nn&&hu(vl(d.fullPath,j.delta),Ss()),K(q,d).catch(p=>St(p,Oe.NAVIGATION_ABORTED|Oe.NAVIGATION_CANCELLED)?p:St(p,Oe.NAVIGATION_GUARD_REDIRECT)?(ae(ye($(p.to),{force:!0}),q).then(g=>{St(g,Oe.NAVIGATION_ABORTED|Oe.NAVIGATION_DUPLICATED)&&!j.delta&&j.type===so.pop&&o.go(-1,!1)}).catch(On),Promise.reject()):(j.delta&&o.go(-j.delta,!1),ce(p,q,d))).then(p=>{p=p||de(q,d,!1),p&&(j.delta&&!St(p,Oe.NAVIGATION_CANCELLED)?o.go(-j.delta,!1):j.type===so.pop&&St(p,Oe.NAVIGATION_ABORTED|Oe.NAVIGATION_DUPLICATED)&&o.go(-1,!1)),Y(q,d,p)}).catch(On)}))}let Ie=gn(),xe=gn(),te;function ce(S,H,j){je(S);const q=xe.list();return q.length?q.forEach(ue=>ue(S,H,j)):console.error(S),Promise.reject(S)}function ut(){return te&&a.value!==Dt?Promise.resolve():new Promise((S,H)=>{Ie.add([S,H])})}function je(S){return te||(te=!S,Ce(),Ie.list().forEach(([H,j])=>S?j(S):H()),Ie.reset()),S}function Ue(S,H,j,q){const{scrollBehavior:ue}=e;if(!nn||!ue)return Promise.resolve();const d=!j&&pu(vl(S.fullPath,0))||(q||!j)&&history.state&&history.state.scroll||null;return Vn().then(()=>ue(S,H,d)).then(p=>p&&du(p)).catch(p=>ce(p,S,H))}const Ae=S=>o.go(S);let Ye;const mt=new Set,kt={currentRoute:a,listening:!0,addRoute:b,removeRoute:N,clearRoutes:t.clearRoutes,hasRoute:U,getRoutes:T,resolve:z,options:e,push:O,replace:V,go:Ae,back:()=>Ae(-1),forward:()=>Ae(1),beforeEach:l.add,beforeResolve:r.add,afterEach:i.add,onError:xe.add,isReady:ut,install(S){S.component("RouterLink",Bu),S.component("RouterView",qu),S.config.globalProperties.$router=kt,Object.defineProperty(S.config.globalProperties,"$route",{enumerable:!0,get:()=>xt(a)}),nn&&!Ye&&a.value===Dt&&(Ye=!0,O(o.location).catch(q=>{}));const H={};for(const q in Dt)Object.defineProperty(H,q,{get:()=>a.value[q],enumerable:!0});S.provide(Es,kt),S.provide(Co,er(H)),S.provide(lo,a);const j=S.unmount;mt.add(S),S.unmount=function(){mt.delete(S),mt.size<1&&(f=Dt,Q&&Q(),Q=null,a.value=Dt,Ye=!1,te=!1),j()}}};function Qe(S){return S.reduce((H,j)=>H.then(()=>le(j)),Promise.resolve())}return kt}function ti(){return it(Es)}function Ju(e){return it(Co)}const Un=Uc("auth",{state:()=>({token:localStorage.getItem("mcbot_token")||"",identity:localStorage.getItem("mcbot_identity")||""}),actions:{set(e,t){this.token=e,this.identity=t||"",localStorage.setItem("mcbot_token",e),localStorage.setItem("mcbot_identity",this.identity)},clear(){this.token="",this.identity="",localStorage.removeItem("mcbot_token"),localStorage.removeItem("mcbot_identity")}}}),Yu={key:0,class:"nav"},Qu={class:"who"},Xu={__name:"App",setup(e){const t=Un(),n=Ju(),s=ti(),o=ve(()=>n.path!=="/login");function l(){t.clear(),s.push("/login")}return(r,i)=>{const a=Do("router-link"),f=Do("router-view");return k(),C(Z,null,[o.value?(k(),C("nav",Yu,[i[3]||(i[3]=c("span",{class:"brand"},"mcbot",-1)),Le(a,{to:"/messages"},{default:Jn(()=>[...i[0]||(i[0]=[_e("Messages",-1)])]),_:1}),Le(a,{to:"/packets"},{default:Jn(()=>[...i[1]||(i[1]=[_e("Packets",-1)])]),_:1}),Le(a,{to:"/manage"},{default:Jn(()=>[...i[2]||(i[2]=[_e("Manage",-1)])]),_:1}),i[4]||(i[4]=c("span",{class:"spacer"},null,-1)),c("span",Qu,R(xt(t).identity||"authenticated"),1),c("button",{onClick:l},"Log out")])):Ee("",!0),Le(f)],64)}}};async function ie(e,t={}){const n=Un(),s={...t.headers||{}};n.token&&(s.Authorization=`Bearer ${n.token}`),t.json!==void 0&&(s["Content-Type"]="application/json",t={...t,body:JSON.stringify(t.json)},delete t.json);const o=await fetch(`/api${e}`,{...t,headers:s});if(o.status===401)throw n.clear(),location.hash.startsWith("#/login")||(location.hash="#/login"),new Error("unauthorized");if(!o.ok){let l=o.statusText;try{l=(await o.json()).detail||l}catch{}throw new Error(l)}return o.json()}function ni(e){const t=Un();return`${location.protocol==="https:"?"wss":"ws"}://${location.host}/api${e}?token=${encodeURIComponent(t.token)}`}const Zu={class:"login-wrap"},ef={class:"login-card"},tf={key:0,class:"err"},nf=["disabled"],sf={__name:"Login",setup(e){const t=Un(),n=ti(),s=ne(""),o=ne(""),l=ne(""),r=ne(""),i=ne(!1);async function a(){r.value="",i.value=!0;try{const u=await ie("/login",{method:"POST",json:{username:s.value,password:o.value}});t.set(u.token,u.user?`user:${u.user}`:""),n.push("/")}catch(u){r.value=u.message||"login failed"}finally{i.value=!1}}async function f(){if(r.value="",!!l.value.trim()){t.set(l.value.trim(),"");try{const u=await ie("/me");t.set(l.value.trim(),u.identity),n.push("/")}catch{t.clear(),r.value="invalid token"}}}return(u,h)=>(k(),C("div",Zu,[c("div",ef,[h[3]||(h[3]=c("h2",null,"mcbot admin",-1)),r.value?(k(),C("div",tf,R(r.value),1)):Ee("",!0),h[4]||(h[4]=c("label",null,"Username",-1)),He(c("input",{"onUpdate:modelValue":h[0]||(h[0]=_=>s.value=_),onKeyup:Xn(a,["enter"]),autofocus:""},null,544),[[rt,s.value]]),h[5]||(h[5]=c("label",null,"Password",-1)),He(c("input",{"onUpdate:modelValue":h[1]||(h[1]=_=>o.value=_),type:"password",onKeyup:Xn(a,["enter"])},null,544),[[rt,o.value]]),c("button",{disabled:i.value,onClick:a},"Log in",8,nf),h[6]||(h[6]=c("label",{style:{"margin-top":"10px"}},"…or paste an API token",-1)),He(c("input",{"onUpdate:modelValue":h[2]||(h[2]=_=>l.value=_),placeholder:"bearer token",onKeyup:Xn(f,["enter"])},null,544),[[rt,l.value]]),c("button",{onClick:f},"Use token")])]))}};function Ft(e){return String(e).padStart(2,"0")}function si(e){if(!e)return"";const t=new Date(e*1e3);return`${Ft(t.getHours())}:${Ft(t.getMinutes())}:${Ft(t.getSeconds())}`}function oi(e){if(!e)return"";const t=new Date(e*1e3);return`${t.getFullYear()}-${Ft(t.getMonth()+1)}-${Ft(t.getDate())} ${Ft(t.getHours())}:${Ft(t.getMinutes())}:${Ft(t.getSeconds())}`}const of=(e,t)=>{const n=e.__vccOpts||e;for(const[s,o]of t)n[s]=o;return n},lf={class:"panes"},rf={class:"pane",style:{flex:"0 0 170px"}},af={class:"body"},cf=["onClick"],uf={class:"pane",style:{flex:"1"}},ff={key:0,class:"toolbar"},df={key:0,class:"err"},hf={key:1,class:"muted"},pf={class:"body"},mf={key:0,class:"decoded"},vf={class:"kv"},gf={class:"mono"},_f={class:"kv"},yf={class:"k"},bf={key:1},wf={class:"toolbar"},xf={class:"chk"},kf={class:"chk"},Cf=["disabled"],Sf={style:{"border-top":"1px solid var(--border, #333)"}},Ef={class:"toolbar"},Af=["disabled"],Rf={key:0,class:"decoded"},Of={class:"kv"},Tf={class:"muted"},Pf={class:"mono"},If={class:"toolbar"},Nf={class:"chk"},$f={class:"chk"},Mf=["disabled"],Df={class:"decoded"},Lf={style:{margin:"12px 0 4px"}},jf={class:"kv"},Vf={class:"k"},Ff={class:"kv"},Uf={class:"k mono"},Hf={key:2},Bf={class:"toolbar"},Kf={class:"mono muted"},Gf=["onClick"],Wf={key:3},qf={class:"toolbar"},zf={id:"newUserContacts"},Jf=["value"],Yf=["value"],Qf=["disabled"],Xf={class:"mono muted"},Zf=["onChange"],ed=["value"],td={class:"chips"},nd=["onClick"],sd={style:{"white-space":"normal"}},od=["onClick"],ld=["onClick"],rd=["onClick"],id={key:4},ad={class:"toolbar"},cd={key:0,class:"muted"},ud={key:0,class:"muted"},fd=["checked","disabled","onChange"],dd=["onChange"],hd=["value"],pd={class:"chips"},md=["onClick"],vd=["disabled","onClick"],gd={key:5},_d=["checked","onChange"],yd=["checked","onChange"],bd=["checked","onChange"],wd=["value","onChange"],xd=["onChange"],kd=["value"],Cd={class:"chips"},Sd={key:0,class:"muted"},Ed=["onClick"],Ad={key:6,class:"contacts-split"},Rd={class:"pane",style:{flex:"1.6","min-width":"0"}},Od={class:"toolbar"},Td={class:"chk"},Pd=["checked"],Id=["checked","onChange"],Nd=["disabled"],$d={class:"muted"},Md={class:"body"},Dd={key:0},Ld={key:0},jd={key:0},Vd={key:0},Fd={key:0},Ud={key:0},Hd=["onClick"],Bd=["checked","onChange"],Kd=["title"],Gd={class:"pane contact-detail"},Wd={class:"body"},qd={key:0,class:"empty"},zd={key:1,class:"decoded"},Jd={class:"kv"},Yd={class:"k"},Qd={key:7},Xd=["title"],Zd={key:8,class:"empty"},eh={__name:"Manage",setup(e){const t=[{key:"stats",label:"Overview"},{key:"radio",label:"Radio"},{key:"contacts",label:"Contacts"},{key:"channels",label:"Channels"},{key:"users",label:"Users"},{key:"groups",label:"Groups"},{key:"command-config",label:"Commands"},{key:"audit",label:"Audit log"}],n=ne("stats"),s=ne({}),o=ne([]),l=ne([]),r=ne([]),i=ne(""),a=ne(""),f=ne({name:"",key:""}),u=ne({name:"",commands:""}),h=ne({sel:"",group:""}),_={stats:"/stats",radio:"/device-info",contacts:"/contacts?limit=500",channels:"/channels",users:"/users",groups:"/groups","command-config":"/command-config",audit:"/audit?limit=200"};function b(v,m){const G=m.items||m;if(v==="command-config"&&Array.isArray(G))for(const re of G){let y=[];try{y=re.allowed_channels?JSON.parse(re.allowed_channels):[]}catch{y=[]}re._chans=y}return G}async function N(v,m=!1){if(n.value=v,i.value="",a.value="",!(s.value[v]&&!m))try{const G=await ie(_[v]);if(s.value[v]=b(v,G),v==="contacts"&&Ge(s.value[v]),(v==="users"||v==="groups"||v==="contacts")&&!o.value.length){const re=await ie("/groups");o.value=re.items.map(y=>y.name)}if(v==="users"&&!s.value.contacts){const re=await ie(_.contacts);s.value.contacts=b("contacts",re)}if(v==="groups"&&!l.value.length){const re=await ie("/command-config");l.value=re.items.map(y=>y.command).sort()}if(v==="command-config"&&!r.value.length){const re=await ie("/channels");r.value=re.items.map(y=>y.name)}}catch(G){i.value=G.message}}const T=v=>N(v,!0);async function U(v,m,G=[]){i.value="",a.value="";try{await v,m&&(a.value=m)}catch(re){i.value=re.message}for(const re of G)await T(re)}function z(v){const m=s.value["command-config"];if(!m)return;const G=m.findIndex(y=>y.command===v.command);if(G===-1)return;let re=[];try{re=v.allowed_channels?JSON.parse(v.allowed_channels):[]}catch{re=[]}m[G]={...m[G],...v,_chans:re}}async function $(v,m){i.value="",a.value="";try{const G=await ie(`/command-config/${encodeURIComponent(v)}`,{method:"PATCH",json:m});z(G),a.value=`${v}: saved`}catch(G){i.value=G.message,await T("command-config")}}function B(v,m){!m||v._chans.includes(m)||$(v.command,{allowed_channels:[...v._chans,m]})}function O(v,m){$(v.command,{allowed_channels:v._chans.filter(G=>G!==m)})}async function V(){const v={name:f.value.name.trim()};f.value.key.trim()&&(v.key=f.value.key.trim()),v.name&&(await U(ie("/channels",{method:"POST",json:v}),`added ${v.name}`,["channels"]),i.value||(f.value={name:"",key:""}))}function J(v){confirm(`Remove channel ${v}? This clears its radio slot.`)&&U(ie(`/channels/${encodeURIComponent(v)}`,{method:"DELETE"}),`removed ${v}`,["channels"])}function ae(v,m){m&&U(ie(`/users/${v}/groups`,{method:"POST",json:{group:m}}),"group added",["users"])}function oe(v,m){U(ie(`/users/${v}/groups/${encodeURIComponent(m)}`,{method:"DELETE"}),"group removed",["users"])}function le(v,m){const G=prompt("New alias:",m||"");G!==null&&U(ie(`/users/${v}`,{method:"PATCH",json:{name:G}}),"renamed",["users"])}function K(v,m){confirm(`Delete user ${m||v.slice(0,12)} from the bot?`)&&U(ie(`/users/${v}`,{method:"DELETE"}),"deleted",["users"])}function Y(v){const m=(v.groups||[]).includes("blocked"),G=m?ie(`/users/${v.pubkey}/block`,{method:"DELETE"}):ie(`/users/${v.pubkey}/block`,{method:"POST"});U(G,m?"unblocked":"blocked",["users"])}async function de(){const v=u.value.name.trim();if(!v)return;const m=u.value.commands.split(",").map(G=>G.trim()).filter(Boolean);await U(ie("/groups",{method:"POST",json:{name:v,commands:m}}),`group ${v} created`,["groups"]),i.value||(u.value={name:"",commands:""})}function Q(v){confirm(`Delete group ${v}?`)&&U(ie(`/groups/${encodeURIComponent(v)}`,{method:"DELETE"}),"deleted",["groups"])}function Ce(v,m){m&&U(ie(`/groups/${encodeURIComponent(v)}/commands`,{method:"POST",json:{command:m}}),`granted ${m} to ${v}`,["groups"])}function Ie(v,m){m&&U(ie(`/groups/${encodeURIComponent(v)}/commands/${encodeURIComponent(m)}`,{method:"DELETE"}),`revoked ${m} from ${v}`,["groups"])}function xe(v,m){U(ie(`/groups/${encodeURIComponent(v)}/all-users`,{method:m?"POST":"DELETE"}),m?`${v}: now includes all users`:`${v}: explicit members only`,["groups"])}const te=ne("zero"),ce=ne(!1);async function ut(){ce.value||(ce.value=!0,await U(ie("/radio/advert",{method:"POST",json:{flood:te.value==="flood"}}),`${te.value==="flood"?"flood":"zero-hop"} advert sent`),ce.value=!1)}const je=ne(null),Ue=ne(!1),Ae=ne(!1),Ye=ne({enabled:!0,headroom:8});async function mt(){if(!Ue.value){Ue.value=!0,i.value="";try{const v=await ie("/radio/contacts-status");je.value=v,Ye.value={enabled:v.policy.enabled,headroom:v.policy.headroom}}catch(v){i.value=v.message}Ue.value=!1}}async function kt(){await U(ie("/radio/contacts-policy",{method:"POST",json:{enabled:Ye.value.enabled,headroom:Number(Ye.value.headroom)}}),"Eviction policy updated (runtime only — set radio_evict_* in mcbot.conf to persist)"),await mt()}async function Qe(){if(!Ae.value){Ae.value=!0,i.value="",a.value="";try{const v=await ie("/radio/evict-contacts",{method:"POST",json:{dry_run:!0}}),m=v.evicted||[];if(!m.length){a.value=`Nothing to evict (used ${v.used}/${v.max??"?"}).`,Ae.value=!1;return}const G=m.map($e=>$e.name||$e.pubkey.slice(0,12)),re=G.slice(0,20).join(` -`),y=G.length>20?` -…and ${G.length-20} more`:"";if(!confirm(`Evict ${m.length} stale contact(s) from the radio? - -${re}${y}`)){Ae.value=!1;return}const L=await ie("/radio/evict-contacts",{method:"POST",json:{}});a.value=`Evicted ${L.evicted.length} contact(s)`+(L.failed?`, ${L.failed} failed`:"")+(L.shortfall?`, ${L.shortfall} short (protected)`:"")}catch(v){i.value=v.message}Ae.value=!1,await mt()}}const S=[{title:"Identity",keys:[["self_info.name","Name"],["self_info.public_key","Public key",{mono:!0}],["device_info.model","Model"],["device_info.ver","Firmware version"],["device_info.fw ver","Firmware code"],["device_info.fw_build","Firmware build"]]},{title:"Radio",keys:[["self_info.radio_freq","Frequency",{unit:"MHz"}],["self_info.radio_bw","Bandwidth",{unit:"kHz"}],["self_info.radio_sf","Spreading factor"],["self_info.radio_cr","Coding rate"],["self_info.tx_power","TX power",{unit:"dBm"}],["self_info.max_tx_power","Max TX power",{unit:"dBm"}],["device_info.path_hash_mode","Out path-hash mode",{fmt:v=>`${Number(v)+1} byte(s)/hop`}]]},{title:"Advertising",keys:[["self_info.adv_type","Advertised type"],["self_info.adv_lat","Latitude"],["self_info.adv_lon","Longitude"],["self_info.adv_loc_policy","Location-share policy"]]},{title:"Capacity",keys:[["device_info.max_channels","Max channels"],["device_info.max_contacts","Max contacts"]]},{title:"Battery / memory",keys:[["battery.level","Battery",{unit:"mV"}],["battery.total_kb","Total memory",{unit:"kB"}],["battery.used_kb","Used memory",{unit:"kB"}]]},{title:"Other",keys:[["device_info.ble_pin","BLE PIN"],["device_info.repeat","Repeater mode"],["self_info.manual_add_contacts","Manual contact add"],["self_info.multi_acks","Multi-acks"],["self_info.telemetry_mode_base","Telemetry: base"],["self_info.telemetry_mode_env","Telemetry: env"],["self_info.telemetry_mode_loc","Telemetry: location"]]}],H=new Set(S.flatMap(v=>v.keys.map(m=>m[0])));function j(v){if(v==null)return null;try{return JSON.parse(v)}catch{return v}}function q(v,m){const G=j(v.value);if(G==null||G==="")return"";if(m!=null&&m.fmt)return m.fmt(G);let re=typeof G=="object"?JSON.stringify(G):String(G);return m!=null&&m.unit&&(re=`${re} ${m.unit}`),re}const ue=ve(()=>{const v=new Map;for(const m of s.value.radio||[])v.set(m.key,m);return v}),d=ve(()=>[...s.value.radio||[]].filter(v=>!H.has(v.key)).sort((v,m)=>v.key.localeCompare(m.key))),p={1:"Comp",2:"Rptr",3:"Room",4:"Sens"};function g(v){return v==null?"?":p[v]||String(v)}function x(v){return v&&v.length>14?`${v.slice(0,6)}...${v.slice(-6)}`:v||""}function E(v){if(!v)return"";const m=new Date(v*1e3),G=re=>String(re).padStart(2,"0");return`${m.getFullYear()}-${G(m.getMonth()+1)}-${G(m.getDate())} ${G(m.getHours())}:${G(m.getMinutes())}`}const w=ve(()=>o.value.filter(v=>v!=="public"&&v!=="blocked"));function M(v){return`${v.adv_name||"(unnamed)"} — ${v.public_key}`}function I(){const v=h.value.sel.trim();if(!v)return"";const m=(s.value.contacts||[]).find(G=>M(G)===v);return m?m.public_key:/^[0-9a-fA-F]{64}$/.test(v)?v.toLowerCase():""}async function P(){const v=I();if(!v){alert("Pick a contact from the list (or paste a 64-hex pubkey).");return}if(!h.value.group){alert("Choose an initial group.");return}i.value="",a.value="";try{await ie("/users",{method:"POST",json:{pubkey:v,group:h.value.group}}),a.value=`bot user created and added to ${h.value.group}`,h.value={sel:"",group:""},await T("users")}catch(m){alert(m.message)}}const A=ne(""),W=ne(new Set),D=ne(new Set),F=ne({col:"adv_name",dir:"asc"}),X=ne(new Set),fe=ne(null),he=ve(()=>(s.value.contacts||[]).find(v=>v.public_key===fe.value)||null);function ge(v){fe.value=v.public_key}const Re=ve(()=>{const v=he.value;if(!v)return[];let m;v.out_path_len===-1?m="flood (no path)":v.out_path_len===0?m="direct (0 hops)":v.out_path?m=`${v.out_path} (${v.out_path_len} hop${v.out_path_len===1?"":"s"})`:m=`${v.out_path_len??"?"} hop(s)`;const G=v.adv_lat!=null&&v.adv_lon!=null?`${v.adv_lat}, ${v.adv_lon}`:"—";return[["name",v.adv_name||"—",!1],["type",g(v.type),!1],["public key",v.public_key,!0],["flags",v.flags??"—",!1],["out path",m,!0],["path hash mode",v.out_path_hash_mode??"—",!1],["location (lat, lon)",G,!1],["last advert",E(v.last_advert)||"—",!1],["last modified",E(v.lastmod)||"—",!1],["first seen",E(v.first_seen_at)||"—",!1],["last synced",E(v.last_synced_at)||"—",!1]]}),Ne=ve(()=>[...D.value].sort()),st=ve(()=>W.value.size===0),ot=v=>!W.value.has(v);function Gt(v){W.value=v?new Set:new Set(D.value)}function Hn(v,m){const G=new Set(W.value);m?G.delete(v):G.add(v),W.value=G}function Ge(v){let m=null;for(const G of v){const re=g(G.type);D.value.has(re)||(m=m||new Set(D.value),m.add(re))}m&&(D.value=m)}function Ve(v){F.value.col===v?F.value={col:v,dir:F.value.dir==="asc"?"desc":"asc"}:F.value={col:v,dir:"asc"}}function Bn(v){const m=new Set(X.value);m.has(v)?m.delete(v):m.add(v),X.value=m}const Xt=ve(()=>(s.value.contacts||[]).filter(v=>X.value.has(v.public_key))),So=ve(()=>Xt.value.length>0);async function ri(){const v=Xt.value;if(!v.length)return;const m=v.map(lt=>lt.adv_name||lt.public_key.slice(0,12)),G=m.slice(0,20).join(` -`),re=m.length>20?` -…and ${m.length-20} more`:"";if(!confirm(`Delete ${v.length} contact(s)? - -${G}${re}`))return;i.value="",a.value="";let y=0,L=0,$e="";for(const lt of v)try{await ie(`/contacts/${encodeURIComponent(lt.public_key)}`,{method:"DELETE"}),y++}catch(As){L++,$e=`${As.message} (${lt.adv_name||lt.public_key.slice(0,12)})`}X.value=new Set,await T("contacts"),a.value=L?`Deleted ${y}, ${L} failed`:`Deleted ${y} contact(s)`,$e&&(i.value=$e)}const Eo=ve(()=>{const v=s.value.contacts||[],m=A.value.toLowerCase().trim(),G=W.value,re=v.filter(lt=>G.size&&G.has(g(lt.type))?!1:m?(lt.public_key||"").toLowerCase().includes(m)||(lt.adv_name||"").toLowerCase().includes(m):!0),{col:y,dir:L}=F.value,$e=L==="asc"?1:-1;return re.sort((lt,As)=>{const hn=lt[y],pn=As[y];return hn==null&&pn==null?0:hn==null?1:pn==null?-1:typeof hn=="number"&&typeof pn=="number"?(hn-pn)*$e:String(hn).localeCompare(String(pn))*$e}),re});function Ao(v){return v&&v.length?Object.keys(v[0]).filter(m=>!m.startsWith("_")):[]}function ii(v){return v==null?"":Array.isArray(v)?v.join(", "):typeof v=="object"?JSON.stringify(v):String(v)}function Ro(v,m){return m==="ts"&&v[m]?oi(v[m]):ii(v[m])}return ys(()=>N("stats")),(v,m)=>{var G,re;return k(),C("div",lf,[c("div",rf,[m[19]||(m[19]=c("h3",null,"Manage",-1)),c("div",af,[c("table",null,[c("tbody",null,[(k(),C(Z,null,pe(t,y=>c("tr",{key:y.key,class:Ze(["clickable",{selected:n.value===y.key}]),onClick:L=>N(y.key)},[c("td",null,R(y.label),1)],10,cf)),64))])])])]),c("div",uf,[c("h3",null,R((G=t.find(y=>y.key===n.value))==null?void 0:G.label),1),i.value||a.value?(k(),C("div",ff,[i.value?(k(),C("span",df,R(i.value),1)):Ee("",!0),a.value?(k(),C("span",hf,R(a.value),1)):Ee("",!0)])):Ee("",!0),c("div",pf,[n.value==="stats"&&s.value.stats?(k(),C("div",mf,[c("div",vf,[m[20]||(m[20]=c("div",{class:"k"},"identity",-1)),c("div",gf,R(((re=s.value.stats.identity)==null?void 0:re.pubkey)||"—"),1),m[21]||(m[21]=c("div",{class:"k"},"events seen",-1)),c("div",null,R(s.value.stats.event_count),1),m[22]||(m[22]=c("div",{class:"k"},"commands loaded",-1)),c("div",null,R(s.value.stats.commands_loaded),1)]),m[23]||(m[23]=c("h4",null,"Counts",-1)),c("div",_f,[(k(!0),C(Z,null,pe(s.value.stats.counts,(y,L)=>(k(),C(Z,{key:L},[c("div",yf,R(L),1),c("div",null,R(y),1)],64))),128))])])):n.value==="radio"?(k(),C("div",bf,[c("div",wf,[c("label",xf,[He(c("input",{type:"radio",value:"zero","onUpdate:modelValue":m[0]||(m[0]=y=>te.value=y)},null,512),[[al,te.value]]),m[24]||(m[24]=_e(" Zero hop ",-1))]),c("label",kf,[He(c("input",{type:"radio",value:"flood","onUpdate:modelValue":m[1]||(m[1]=y=>te.value=y)},null,512),[[al,te.value]]),m[25]||(m[25]=_e(" Flood ",-1))]),c("button",{disabled:ce.value,onClick:ut},R(ce.value?"Sending…":"Advert"),9,Cf),m[26]||(m[26]=c("span",{class:"muted"}," Zero-hop reaches direct neighbors only; flood propagates through the mesh. ",-1))]),c("div",Sf,[c("div",Ef,[m[27]||(m[27]=c("strong",null,"Contact table",-1)),c("button",{disabled:Ue.value,onClick:mt},R(Ue.value?"Checking…":"Check contact table"),9,Af),m[28]||(m[28]=c("span",{class:"muted"},"Reads the radio's contact list (takes a few seconds).",-1))]),je.value?(k(),C("div",Rf,[c("div",Of,[m[29]||(m[29]=c("div",{class:"k"},"Used / max",-1)),c("div",null,[_e(R(je.value.used)+" / "+R(je.value.max??"?")+" ",1),c("span",Tf,"("+R(je.value.free??"?")+" free)",1)]),m[30]||(m[30]=c("div",{class:"k"},"Protected / evictable",-1)),c("div",null,R(je.value.protected)+" protected, "+R(je.value.eligible)+" evictable",1),m[31]||(m[31]=c("div",{class:"k"},"Firmware autoadd byte",-1)),c("div",Pf,R(je.value.autoadd_raw??"n/a"),1)]),c("div",If,[c("label",Nf,[He(c("input",{type:"checkbox","onUpdate:modelValue":m[2]||(m[2]=y=>Ye.value.enabled=y)},null,512),[[Sc,Ye.value.enabled]]),m[32]||(m[32]=_e(" Auto-evict (startup + when full) ",-1))]),c("label",$f,[m[33]||(m[33]=_e(" Headroom ",-1)),He(c("input",{type:"number",min:"1",max:"100","onUpdate:modelValue":m[3]||(m[3]=y=>Ye.value.headroom=y),style:{width:"4em"}},null,512),[[rt,Ye.value.headroom,void 0,{number:!0}]])]),c("button",{onClick:kt},"Apply"),c("button",{disabled:Ae.value,onClick:Qe},R(Ae.value?"Evicting…":"Evict to headroom now"),9,Mf)]),m[34]||(m[34]=c("p",{class:"muted",style:{margin:"4px 12px 8px"}}," Evicts the stalest contacts from the radio (bot users, owners, and recent DM peers are protected; the bot's database keeps the full archive). Policy changes here are runtime only — set radio_evict_* in mcbot.conf to persist across restarts. ",-1))])):Ee("",!0)]),c("div",Df,[(k(),C(Z,null,pe(S,y=>(k(),C(Z,{key:y.title},[c("h4",Lf,R(y.title),1),c("div",jf,[(k(!0),C(Z,null,pe(y.keys,L=>{var $e;return k(),C(Z,{key:L[0]},[c("div",Vf,R(L[1]),1),c("div",{class:Ze({mono:($e=L[2])==null?void 0:$e.mono})},R(q(ue.value.get(L[0])||{},L[2])||"—"),3)],64)}),128))])],64))),64)),d.value.length?(k(),C(Z,{key:0},[m[35]||(m[35]=c("h4",{style:{margin:"12px 0 4px"}},"Unrecognized",-1)),c("div",Ff,[(k(!0),C(Z,null,pe(d.value,y=>(k(),C(Z,{key:y.key},[c("div",Uf,R(y.key),1),c("div",null,R(q(y)||"—"),1)],64))),128))])],64)):Ee("",!0)])])):n.value==="channels"?(k(),C("div",Hf,[c("div",Bf,[He(c("input",{"onUpdate:modelValue":m[4]||(m[4]=y=>f.value.name=y),placeholder:"name (e.g. #bot or MyChan)",style:{flex:"1"}},null,512),[[rt,f.value.name]]),He(c("input",{"onUpdate:modelValue":m[5]||(m[5]=y=>f.value.key=y),placeholder:"hex key (non-# only)",style:{flex:"1"}},null,512),[[rt,f.value.key]]),c("button",{onClick:V},"Add channel")]),c("table",null,[m[36]||(m[36]=c("thead",null,[c("tr",null,[c("th",null,"idx"),c("th",null,"name"),c("th",null,"secret"),c("th")])],-1)),c("tbody",null,[(k(!0),C(Z,null,pe(s.value.channels,y=>(k(),C("tr",{key:y.channel_idx},[c("td",null,R(y.channel_idx),1),c("td",null,R(y.name),1),c("td",Kf,R((y.secret_hex||"").slice(0,12))+"…",1),c("td",null,[c("button",{onClick:L=>J(y.name)},"remove",8,Gf)])]))),128))])])])):n.value==="users"?(k(),C("div",Wf,[c("div",qf,[He(c("input",{"onUpdate:modelValue":m[6]||(m[6]=y=>h.value.sel=y),list:"newUserContacts",placeholder:"add bot user: search a contact…",style:{flex:"0 0 320px"}},null,512),[[rt,h.value.sel]]),c("datalist",zf,[(k(!0),C(Z,null,pe(s.value.contacts||[],y=>(k(),C("option",{key:y.public_key,value:M(y)},null,8,Jf))),128))]),He(c("select",{"onUpdate:modelValue":m[7]||(m[7]=y=>h.value.group=y)},[m[37]||(m[37]=c("option",{value:""},"initial group…",-1)),(k(!0),C(Z,null,pe(w.value,y=>(k(),C("option",{key:y,value:y},R(y),9,Yf))),128))],512),[[Ec,h.value.group]]),c("button",{disabled:!I()||!h.value.group,onClick:P}," Add bot user ",8,Qf)]),c("table",null,[m[39]||(m[39]=c("thead",null,[c("tr",null,[c("th",null,"name"),c("th",null,"pubkey"),c("th",{style:{width:"130px"}},"add group"),c("th",null,"groups"),c("th",null,"actions")])],-1)),c("tbody",null,[(k(!0),C(Z,null,pe(s.value.users,y=>(k(),C("tr",{key:y.pubkey},[c("td",null,R(y.name||"?"),1),c("td",Xf,R(y.pubkey.slice(0,12)),1),c("td",null,[c("select",{onChange:L=>{ae(y.pubkey,L.target.value),L.target.value=""}},[m[38]||(m[38]=c("option",{value:""},"+ group…",-1)),(k(!0),C(Z,null,pe(o.value,L=>(k(),C("option",{key:L,value:L},R(L),9,ed))),128))],40,Zf)]),c("td",td,[(k(!0),C(Z,null,pe(y.groups,L=>(k(),C("span",{key:L,class:"tag"},[_e(R(L)+" ",1),c("a",{href:"#",onClick:qn($e=>oe(y.pubkey,L),["prevent"]),title:"remove"},"×",8,nd)]))),128))]),c("td",sd,[c("button",{onClick:L=>le(y.pubkey,y.name)},"rename",8,od),c("button",{onClick:L=>Y(y)},R((y.groups||[]).includes("blocked")?"unblock":"block"),9,ld),c("button",{onClick:L=>K(y.pubkey,y.name)},"delete",8,rd)])]))),128))])])])):n.value==="groups"?(k(),C("div",id,[c("div",ad,[He(c("input",{"onUpdate:modelValue":m[8]||(m[8]=y=>u.value.name=y),placeholder:"new group name"},null,512),[[rt,u.value.name]]),He(c("input",{"onUpdate:modelValue":m[9]||(m[9]=y=>u.value.commands=y),placeholder:"commands (comma list, optional)",style:{flex:"1"}},null,512),[[rt,u.value.commands]]),c("button",{onClick:de},"Create group")]),c("table",null,[m[42]||(m[42]=c("thead",null,[c("tr",null,[c("th",null,"name"),c("th",null,"users"),c("th",{title:"Every user is a member (the * membership)"},"all users"),c("th",{style:{width:"150px"}},"grant command"),c("th",null,"commands"),c("th")])],-1)),c("tbody",null,[(k(!0),C(Z,null,pe(s.value.groups,y=>(k(),C("tr",{key:y.name},[c("td",null,[_e(R(y.name),1),y.is_system?(k(),C("span",cd," [sys]")):Ee("",!0)]),c("td",null,[_e(R(y.nusers),1),y.all_users?(k(),C("span",ud," +*")):Ee("",!0)]),c("td",null,[c("input",{type:"checkbox",checked:y.all_users,disabled:y.name==="blocked",title:"Include all users (*) in this group",onChange:L=>xe(y.name,L.target.checked)},null,40,fd)]),c("td",null,[c("select",{onChange:L=>{Ce(y.name,L.target.value),L.target.value=""}},[m[40]||(m[40]=c("option",{value:""},"+ command…",-1)),m[41]||(m[41]=c("option",{value:"*"},"* (all commands)",-1)),(k(!0),C(Z,null,pe(l.value,L=>(k(),C("option",{key:L,value:L},R(L),9,hd))),128))],40,dd)]),c("td",pd,[(k(!0),C(Z,null,pe(y.commands,L=>(k(),C("span",{key:L,class:"tag"},[_e(R(L)+" ",1),c("a",{href:"#",onClick:qn($e=>Ie(y.name,L),["prevent"]),title:"revoke"},"×",8,md)]))),128))]),c("td",null,[c("button",{disabled:y.is_system,onClick:L=>Q(y.name)},"delete",8,vd)])]))),128))])])])):n.value==="command-config"?(k(),C("div",gd,[c("table",null,[m[44]||(m[44]=c("thead",null,[c("tr",null,[c("th",null,"command"),c("th",null,"enabled"),c("th",null,"allow_dm"),c("th",null,"dm_only"),c("th",null,"cooldown"),c("th",{style:{width:"140px"}},"allow channel"),c("th",null,"allowed channels")])],-1)),c("tbody",null,[(k(!0),C(Z,null,pe(s.value["command-config"],y=>(k(),C("tr",{key:y.command},[c("td",null,R(y.command),1),c("td",null,[c("input",{type:"checkbox",checked:!!y.enabled,onChange:L=>$(y.command,{enabled:L.target.checked})},null,40,_d)]),c("td",null,[c("input",{type:"checkbox",checked:!!y.allow_dm,onChange:L=>$(y.command,{allow_dm:L.target.checked})},null,40,yd)]),c("td",null,[c("input",{type:"checkbox",checked:!!y.dm_only,onChange:L=>$(y.command,{dm_only:L.target.checked})},null,40,bd)]),c("td",null,[c("input",{type:"number",value:y.cooldown_seconds,style:{width:"64px"},onChange:L=>$(y.command,{cooldown_seconds:Number(L.target.value)})},null,40,wd)]),c("td",null,[c("select",{onChange:L=>{B(y,L.target.value),L.target.value=""}},[m[43]||(m[43]=c("option",{value:""},"+ channel…",-1)),(k(!0),C(Z,null,pe(r.value,L=>(k(),C("option",{key:L,value:L},R(L),9,kd))),128))],40,xd)]),c("td",Cd,[y._chans.length?Ee("",!0):(k(),C("span",Sd,"(any)")),(k(!0),C(Z,null,pe(y._chans,L=>(k(),C("span",{key:L,class:"tag"},[_e(R(L)+" ",1),c("a",{href:"#",onClick:qn($e=>O(y,L),["prevent"]),title:"remove"},"×",8,Ed)]))),128))])]))),128))])])])):n.value==="contacts"?(k(),C("div",Ad,[c("div",Rd,[c("div",Od,[He(c("input",{"onUpdate:modelValue":m[10]||(m[10]=y=>A.value=y),placeholder:"search name or pubkey…",style:{flex:"0 0 260px"}},null,512),[[rt,A.value]]),c("label",Td,[c("input",{type:"checkbox",checked:st.value,onChange:m[11]||(m[11]=y=>Gt(y.target.checked))},null,40,Pd),m[45]||(m[45]=_e(" All ",-1))]),(k(!0),C(Z,null,pe(Ne.value,y=>(k(),C("label",{key:y,class:"chk"},[c("input",{type:"checkbox",checked:ot(y),onChange:L=>Hn(y,L.target.checked)},null,40,Id),_e(" "+R(y),1)]))),128)),c("button",{disabled:!So.value,onClick:ri}," Delete"+R(So.value?` (${Xt.value.length})`:""),9,Nd),c("span",$d,R(Eo.value.length)+" shown",1)]),c("div",Md,[c("table",null,[c("thead",null,[c("tr",null,[m[52]||(m[52]=c("th",{style:{width:"24px"}},null,-1)),c("th",{class:"sortable",onClick:m[12]||(m[12]=y=>Ve("public_key"))},[m[46]||(m[46]=_e(" pubkey",-1)),F.value.col==="public_key"?(k(),C("span",Dd,R(F.value.dir==="asc"?"▲":"▼"),1)):Ee("",!0)]),c("th",{class:"sortable",onClick:m[13]||(m[13]=y=>Ve("adv_name"))},[m[47]||(m[47]=_e(" name",-1)),F.value.col==="adv_name"?(k(),C("span",Ld,R(F.value.dir==="asc"?"▲":"▼"),1)):Ee("",!0)]),c("th",{class:"sortable",onClick:m[14]||(m[14]=y=>Ve("type"))},[m[48]||(m[48]=_e(" type",-1)),F.value.col==="type"?(k(),C("span",jd,R(F.value.dir==="asc"?"▲":"▼"),1)):Ee("",!0)]),c("th",{class:"sortable",onClick:m[15]||(m[15]=y=>Ve("adv_lat"))},[m[49]||(m[49]=_e(" lat",-1)),F.value.col==="adv_lat"?(k(),C("span",Vd,R(F.value.dir==="asc"?"▲":"▼"),1)):Ee("",!0)]),c("th",{class:"sortable",onClick:m[16]||(m[16]=y=>Ve("adv_lon"))},[m[50]||(m[50]=_e(" lon",-1)),F.value.col==="adv_lon"?(k(),C("span",Fd,R(F.value.dir==="asc"?"▲":"▼"),1)):Ee("",!0)]),c("th",{class:"sortable",onClick:m[17]||(m[17]=y=>Ve("last_synced_at"))},[m[51]||(m[51]=_e(" last synced",-1)),F.value.col==="last_synced_at"?(k(),C("span",Ud,R(F.value.dir==="asc"?"▲":"▼"),1)):Ee("",!0)])])]),c("tbody",null,[(k(!0),C(Z,null,pe(Eo.value,y=>(k(),C("tr",{key:y.public_key,class:Ze(["clickable",{selected:he.value&&he.value.public_key===y.public_key}]),onClick:L=>ge(y)},[c("td",null,[c("input",{type:"checkbox",checked:X.value.has(y.public_key),onChange:L=>Bn(y.public_key),onClick:m[18]||(m[18]=qn(()=>{},["stop"]))},null,40,Bd)]),c("td",{class:"mono",title:y.public_key},R(x(y.public_key)),9,Kd),c("td",null,R(y.adv_name||""),1),c("td",null,R(g(y.type)),1),c("td",null,R(y.adv_lat??""),1),c("td",null,R(y.adv_lon??""),1),c("td",null,R(E(y.last_synced_at)),1)],10,Hd))),128))])])])]),c("div",Gd,[m[53]||(m[53]=c("h3",null,"Contact",-1)),c("div",Wd,[he.value?(k(),C("div",zd,[c("div",Jd,[(k(!0),C(Z,null,pe(Re.value,y=>(k(),C(Z,{key:y[0]},[c("div",Yd,R(y[0]),1),c("div",{class:Ze({mono:y[2]}),style:{"word-break":"break-all"}},R(y[1]),3)],64))),128))])])):(k(),C("div",qd,"select a contact"))])])])):Array.isArray(s.value[n.value])?(k(),C("table",Qd,[c("thead",null,[c("tr",null,[(k(!0),C(Z,null,pe(Ao(s.value[n.value]),y=>(k(),C("th",{key:y},R(y),1))),128))])]),c("tbody",null,[(k(!0),C(Z,null,pe(s.value[n.value],(y,L)=>(k(),C("tr",{key:L},[(k(!0),C(Z,null,pe(Ao(s.value[n.value]),$e=>(k(),C("td",{key:$e,title:Ro(y,$e)},R(Ro(y,$e)),9,Xd))),128))]))),128))])])):(k(),C("div",Zd,"loading…"))])])])}}},th=of(eh,[["__scopeId","data-v-089f2d2f"]]),nh={class:"panes"},sh={class:"side-col"},oh={class:"pane",style:{flex:"1 1 0","min-height":"160px"}},lh={class:"body"},rh=["onClick"],ih={class:"muted"},ah={class:"pane",style:{flex:"1 1 0","min-height":"200px"}},ch={class:"toolbar"},uh={class:"body"},fh=["onClick"],dh={class:"muted mono"},hh={class:"pane",style:{flex:"1"}},ph={key:0,class:"err",style:{padding:"10px"}},mh={key:1,class:"empty"},vh={class:"meta"},gh={class:"who"},_h={key:0},yh=["href"],bh={key:1,class:"mention"},wh={class:"toolbar"},xh=["placeholder","disabled"],kh=["disabled"],Ch={key:0,class:"err",style:{padding:"0 12px 8px"}},Sh={__name:"Messages",setup(e){const t=ne([]),n=ne(null),s=ne(null),o=ne([]),l=ne(null),r=ne([]),i=ne(""),a=ne(""),f=ne(""),u=ne(!1),h=ne("");let _=null;const b=ve(()=>{const K=i.value.toLowerCase();return K?r.value.filter(Y=>(Y.adv_name||"").toLowerCase().includes(K)||(Y.public_key||"").toLowerCase().includes(K)):r.value}),N=ve(()=>{if(typeof n.value=="number"){const K=t.value.find(Y=>Y.channel_idx===n.value);return{kind:"channel",idx:n.value,label:(K==null?void 0:K.name)||`#${n.value}`}}return n.value==="dm"&&s.value?{kind:"dm",pubkey:s.value.public_key,label:s.value.adv_name||s.value.public_key.slice(0,12)}:null}),T=ve(()=>N.value?`Message ${N.value.label}…`:"Pick a channel or a contact to send to…");async function U(){t.value=(await ie("/channels")).items,n.value===null&&t.value.length&&B(t.value[0].channel_idx)}async function z(){r.value=(await ie("/contacts?limit=500")).items}async function $(){await Vn();const K=l.value;K&&(K.scrollTop=K.scrollHeight)}async function B(K){n.value=K,s.value=null;const Y=await ie(`/channel-messages?channel_idx=${K}&limit=100`);o.value=Y.items.slice().reverse(),await $()}async function O(){n.value="dm",s.value=null;const K=await ie("/direct-messages?limit=100");o.value=K.items.slice().reverse(),await $()}async function V(K){n.value="dm",s.value=K;const Y=await ie(`/direct-messages?pubkey=${encodeURIComponent(K.public_key)}&limit=100`);o.value=Y.items.slice().reverse(),await $()}async function J(){const K=f.value.trim();if(!(!K||!N.value||u.value)){u.value=!0,h.value="";try{N.value.kind==="channel"?await ie("/send/channel",{method:"POST",json:{channel_idx:N.value.idx,text:K}}):await ie("/send/dm",{method:"POST",json:{pubkey:N.value.pubkey,text:K}}),f.value=""}catch(Y){h.value=Y.message}finally{u.value=!1}}}function ae(K,Y){if(!K||!Y)return K||"";const de=`${Y}: `;return K.startsWith(de)?K.slice(de.length):K}const oe=/(https?:\/\/[^\s<>]+)|@\[([^\]]+)\]/g;function le(K){const Y=ae(K.text,K.sender_name),de=[];let Q=0,Ce;for(oe.lastIndex=0;(Ce=oe.exec(Y))!==null;){if(Ce.index>Q&&de.push({type:"text",value:Y.slice(Q,Ce.index)}),Ce[1]){const Ie=Ce[1].match(/^(.*?)([.,;:!?)]+)$/);Ie?(de.push({type:"link",value:Ie[1]}),de.push({type:"text",value:Ie[2]})):de.push({type:"link",value:Ce[1]})}else de.push({type:"mention",value:Ce[2]});Q=oe.lastIndex}return Q{try{await U(),await z()}catch(K){a.value=K.message}_=new WebSocket(ni("/ws/messages")),_.onmessage=K=>{const Y=JSON.parse(K.data),de=l.value,Q=de?de.scrollHeight-de.scrollTop-de.clientHeight<60:!0;let Ce=!1;n.value==="dm"&&Y.kind==="dm"?(!s.value||Y.sender_pubkey===s.value.public_key)&&(o.value.push(Y),Ce=!0):Y.kind==="channel"&&Y.channel_idx===n.value&&(o.value.push(Y),Ce=!0),o.value.length>300&&o.value.shift(),Ce&&Q&&$()}}),bs(()=>_&&_.close()),(K,Y)=>{var de;return k(),C("div",nh,[c("div",sh,[c("div",oh,[Y[3]||(Y[3]=c("h3",null,"Channels",-1)),c("div",lh,[c("table",null,[c("tbody",null,[(k(!0),C(Z,null,pe(t.value,Q=>(k(),C("tr",{key:Q.channel_idx,class:Ze(["clickable",{selected:n.value===Q.channel_idx}]),onClick:Ce=>B(Q.channel_idx)},[c("td",null,[_e(R(Q.name)+" ",1),c("span",ih,"#"+R(Q.channel_idx),1)])],10,rh))),128)),c("tr",{class:Ze(["clickable",{selected:n.value==="dm"&&!s.value}]),onClick:O},[...Y[2]||(Y[2]=[c("td",null,"✉ Direct messages",-1)])],2)])])])]),c("div",ah,[c("h3",null,"Contacts ("+R(r.value.length)+")",1),c("div",ch,[He(c("input",{"onUpdate:modelValue":Y[0]||(Y[0]=Q=>i.value=Q),placeholder:"search",style:{flex:"1"}},null,512),[[rt,i.value]])]),c("div",uh,[c("table",null,[c("tbody",null,[(k(!0),C(Z,null,pe(b.value,Q=>(k(),C("tr",{key:Q.public_key,class:Ze(["clickable",{selected:s.value&&s.value.public_key===Q.public_key}]),onClick:Ce=>V(Q),title:"Open a DM conversation with this contact"},[c("td",null,[_e(R(Q.adv_name||"(unnamed)"),1),Y[4]||(Y[4]=c("br",null,null,-1)),c("span",dh,R(Q.public_key.slice(0,12)),1)])],10,fh))),128))])])])])]),c("div",hh,[c("h3",null,R(n.value==="dm"?s.value?`DM · ${s.value.adv_name||s.value.public_key.slice(0,12)}`:"Direct messages":((de=t.value.find(Q=>Q.channel_idx===n.value))==null?void 0:de.name)||"Messages"),1),c("div",{class:"body",ref_key:"msgBody",ref:l},[a.value?(k(),C("div",ph,R(a.value),1)):Ee("",!0),o.value.length?Ee("",!0):(k(),C("div",mh,"no messages")),(k(!0),C(Z,null,pe(o.value,Q=>{var Ce;return k(),C("div",{key:Q.id,class:Ze(["msg",{out:Q.is_outgoing}])},[c("div",vh,[c("span",gh,R(Q.is_outgoing?"→ me":Q.sender_name||((Ce=Q.sender_pubkey)==null?void 0:Ce.slice(0,12))||"?"),1),_e(" · "+R(xt(si)(Q.received_at))+" ",1),Q.snr!=null?(k(),C("span",_h,"· snr "+R(Q.snr),1)):Ee("",!0)]),c("div",null,[(k(!0),C(Z,null,pe(le(Q),(Ie,xe)=>(k(),C(Z,{key:xe},[Ie.type==="link"?(k(),C("a",{key:0,href:Ie.value,target:"_blank",rel:"noopener noreferrer"},R(Ie.value),9,yh)):Ie.type==="mention"?(k(),C("span",bh,"@["+R(Ie.value)+"]",1)):(k(),C(Z,{key:2},[_e(R(Ie.value),1)],64))],64))),128))])],2)}),128))],512),c("div",wh,[He(c("input",{style:{flex:"1"},placeholder:T.value,"onUpdate:modelValue":Y[1]||(Y[1]=Q=>f.value=Q),disabled:!N.value||u.value,onKeyup:Xn(J,["enter"])},null,40,xh),[[rt,f.value]]),c("button",{disabled:!N.value||u.value||!f.value.trim(),onClick:J},R(u.value?"Sending…":"Send"),9,kh)]),h.value?(k(),C("div",Ch,R(h.value),1)):Ee("",!0)])])}}},Eh={class:"hexdump"},Ah=["onMouseenter"],Rh={key:0},Oh={key:1},Th={key:0,class:"empty"},Ph={__name:"HexDump",props:{hex:{type:String,default:""},activeRange:{type:Object,default:null}},emits:["hover-offset"],setup(e,{emit:t}){const n=e,s=t,o=ve(()=>{const r=(n.hex||"").replace(/\s+/g,""),i=[];for(let a=0;a+2<=r.length;a+=2)i.push(r.slice(a,a+2));return i});function l(r){const i=n.activeRange;return i&&r>=i.offset&&r(k(),C("div",Eh,[(k(!0),C(Z,null,pe(o.value,(a,f)=>(k(),C("span",{key:f,class:Ze(["hexbyte",{active:l(f)}]),onMouseenter:u=>s("hover-offset",f),onMouseleave:i[0]||(i[0]=u=>s("hover-offset",null))},[_e(R(a),1),(f+1)%16===0?(k(),C("span",Rh,[...i[1]||(i[1]=[c("br",null,null,-1)])])):(k(),C("span",Oh))],42,Ah))),128)),o.value.length?Ee("",!0):(k(),C("div",Th,"no raw bytes"))]))}},Ih=["onMouseenter"],Nh={class:"fname"},$h={class:"fmeta"},Mh={class:"fval"},Dh={key:0,class:"fval muted"},Lh={key:1,class:"fmeta"},jh={key:0,class:"decoded"},Vh={class:"kv"},Fh={class:"k"},Uh={class:"mono"},Hh={__name:"FieldBreakout",props:{fields:{type:Array,default:()=>[]},decoded:{type:Object,default:null},activeIndex:{type:Number,default:-1}},emits:["hover-field"],setup(e,{emit:t}){const n=t;function s(r){return r==="timestamp"||r.endsWith("_timestamp")||r.endsWith("_at")}function o(r,i){return s(r)?oi(i):l(i)}function l(r){return r==null?"":typeof r=="object"?JSON.stringify(r):String(r)}return(r,i)=>(k(),C("div",null,[(k(!0),C(Z,null,pe(e.fields,(a,f)=>(k(),C("div",{key:f,class:Ze(["field-row",{active:f===e.activeIndex}]),onMouseenter:u=>n("hover-field",f),onMouseleave:i[0]||(i[0]=u=>n("hover-field",-1))},[c("div",Nh,R(a.name),1),c("div",$h,"offset "+R(a.offset)+" · "+R(a.length)+" byte(s)",1),c("div",Mh,R(a.hex),1),a.value!==null&&a.value!==void 0?(k(),C("div",Dh,R(l(a.value)),1)):Ee("",!0),a.description?(k(),C("div",Lh,R(a.description),1)):Ee("",!0)],42,Ih))),128)),e.decoded?(k(),C("div",jh,[i[1]||(i[1]=c("h4",{style:{margin:"6px 0"}},"Decoded payload",-1)),c("div",Vh,[(k(!0),C(Z,null,pe(e.decoded,(a,f)=>(k(),C(Z,{key:f},[c("div",Fh,R(f),1),c("div",Uh,R(o(f,a)),1)],64))),128))])])):Ee("",!0)]))}},Bh={class:"panes"},Kh={class:"pane",style:{flex:"1.3"}},Gh={class:"toolbar"},Wh={class:"chk"},qh=["checked"],zh=["checked","onChange"],Jh={class:"muted"},Yh={key:0,class:"err"},Qh={class:"body"},Xh=["onClick"],Zh={class:"pane",style:{flex:"1"}},ep={class:"body"},tp={key:0,class:"empty"},np={key:1,class:"empty"},sp={key:0,class:"err",style:{padding:"0 12px"}},op={key:3,class:"empty"},lp={__name:"Packets",setup(e){const t=ne([]),n=ne(new Set),s=ne(new Set),o=ne(null),l=ne(null),r=ne(-1),i=ne("");let a=null;const f=ve(()=>[...s.value].sort()),u=ve(()=>n.value.size===0),h=O=>!n.value.has(O),_=ve(()=>n.value.size===0?t.value:t.value.filter(O=>!n.value.has(O.packet_type)));function b(O){let V=null;for(const J of O)J.packet_type&&!s.value.has(J.packet_type)&&(V=V||new Set(s.value),V.add(J.packet_type));V&&(s.value=V)}function N(O){n.value=O?new Set:new Set(s.value)}function T(O,V){const J=new Set(n.value);V?J.delete(O):J.add(O),n.value=J}const U=ve(()=>{if(!l.value||r.value<0)return null;const O=l.value.fields[r.value];return O?{offset:O.offset,length:O.length}:null});async function z(){try{const O=await ie("/packets?limit=200");t.value=O.items,b(O.items)}catch(O){i.value=O.message}}async function $(O){if(o.value=O,l.value=null,r.value=-1,!!O.has_raw)try{l.value=await ie("/packets/decode",{method:"POST",json:{packet_id:O.id}})}catch(V){i.value=V.message}}function B(O){if(O===null||!l.value){r.value=-1;return}const V=l.value.fields.findIndex(J=>O>=J.offset&&O{z(),a=new WebSocket(ni("/ws/packets")),a.onmessage=O=>{const V=JSON.parse(O.data);t.value.unshift(V),t.value.length>500&&t.value.pop(),b([V])}}),bs(()=>a&&a.close()),(O,V)=>(k(),C("div",Bh,[c("div",Kh,[V[4]||(V[4]=c("h3",null,"Packets (live)",-1)),c("div",Gh,[c("label",Wh,[c("input",{type:"checkbox",checked:u.value,onChange:V[0]||(V[0]=J=>N(J.target.checked))},null,40,qh),V[2]||(V[2]=_e(" All ",-1))]),(k(!0),C(Z,null,pe(f.value,J=>(k(),C("label",{key:J,class:"chk"},[c("input",{type:"checkbox",checked:h(J),onChange:ae=>T(J,ae.target.checked)},null,40,zh),_e(" "+R(J),1)]))),128)),c("span",Jh,R(_.value.length)+" shown",1),i.value?(k(),C("span",Yh,R(i.value),1)):Ee("",!0)]),c("div",Qh,[c("table",null,[V[3]||(V[3]=c("thead",null,[c("tr",null,[c("th",null,"time"),c("th",null,"type"),c("th",null,"from"),c("th",null,"ch"),c("th",null,"text"),c("th",null,"raw")])],-1)),c("tbody",null,[(k(!0),C(Z,null,pe(_.value,J=>(k(),C("tr",{key:J.id,class:Ze(["clickable",{selected:o.value&&o.value.id===J.id}]),onClick:ae=>$(J)},[c("td",null,R(xt(si)(J.received_at)),1),c("td",null,R(J.packet_type),1),c("td",null,R(J.sender_name||J.sender_pubkey_prefix||""),1),c("td",null,R(J.channel_idx??""),1),c("td",null,R(J.text||""),1),c("td",null,R(J.has_raw?"●":""),1)],10,Xh))),128))])])])]),c("div",Zh,[V[6]||(V[6]=c("h3",null,"Inspector",-1)),c("div",ep,[o.value?o.value.has_raw?l.value?(k(),C(Z,{key:2},[Le(Ph,{hex:l.value.raw_hex,"active-range":U.value,onHoverOffset:B},null,8,["hex","active-range"]),l.value.error?(k(),C("div",sp,R(l.value.error),1)):Ee("",!0),Le(Hh,{fields:l.value.fields,decoded:l.value.decoded,"active-index":r.value,onHoverField:V[1]||(V[1]=J=>r.value=J)},null,8,["fields","decoded","active-index"])],64)):(k(),C("div",op,"decoding…")):(k(),C("div",np,[...V[5]||(V[5]=[_e(" no raw bytes for this packet",-1),c("br",null,null,-1),c("span",{class:"muted"},"(only RX_LOG_DATA packets carry on-air bytes)",-1)])])):(k(),C("div",tp,"select a packet"))])])]))}},rp=[{path:"/login",component:sf,meta:{public:!0}},{path:"/",redirect:"/messages"},{path:"/manage",component:th},{path:"/messages",component:Sh},{path:"/packets",component:lp}],li=zu({history:Eu(),routes:rp});li.beforeEach(e=>{const t=Un();if(!e.meta.public&&!t.token)return"/login";if(e.path==="/login"&&t.token)return"/"});Ic(Xu).use(Mc()).use(li).mount("#app"); diff --git a/webapi/static/index.html b/webapi/static/index.html index 06241ae..c13ca91 100644 --- a/webapi/static/index.html +++ b/webapi/static/index.html @@ -4,8 +4,8 @@ mcbot admin - - + +