From 419644e775f88ca86e64b1af626db3f7b65f275f Mon Sep 17 00:00:00 2001 From: dop42 Date: Sat, 24 Oct 2026 18:34:51 +0200 Subject: [PATCH] feat(pool): add guided camera aiming and shot power gauge --- .github/workflows/check.yml | 2 + config/pool.lua | 5 +- docs/MANUAL.md | 30 +++++-- lib/client/controls.lua | 5 +- modules/pool/client/camera.lua | 64 +++++++++++++++ modules/pool/client/guide.lua | 57 +++++++++++++ modules/pool/client/input.lua | 10 ++- modules/pool/client/main.lua | 141 ++++++++++++++++++++++++-------- modules/pool/locales.lua | 14 ++++ open77.lua | 5 ++ tests/audit-control-leases.lua | 6 +- tests/audit-pool-camera.lua | 52 ++++++++++++ tests/audit-pool-client.lua | 53 ++++++++++-- tests/ui-pool-lifecycle.mjs | 29 +++++++ ui/src/boot/main.ts | 2 + ui/src/modules/pool/PoolHud.vue | 65 +++++++++++++++ web/index.html | 12 +-- 17 files changed, 491 insertions(+), 61 deletions(-) create mode 100644 modules/pool/client/camera.lua create mode 100644 modules/pool/client/guide.lua create mode 100644 tests/audit-pool-camera.lua create mode 100644 tests/ui-pool-lifecycle.mjs create mode 100644 ui/src/modules/pool/PoolHud.vue diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 8cb84e9d..74beb588 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -24,6 +24,8 @@ jobs: run: node tests/ui-notify-lifecycle.mjs - name: Check modal keyboard ownership run: node tests/ui-spawn-focus.mjs + - name: Pool gauge lifecycle + run: node tests/ui-pool-lifecycle.mjs - name: Garment generator encoding regressions run: node tests/tool-garments.mjs - name: Image CDN catalogue regressions diff --git a/config/pool.lua b/config/pool.lua index 25100505..ec874f18 100644 --- a/config/pool.lua +++ b/config/pool.lua @@ -19,8 +19,9 @@ OPX.Config.MODULES.pool = { north_oak_casino_main = { label = 'North Oak Casino', x = 1003.637, y = 1494.385, z = 246.863, yaw = -178.49, bucket = 0, halfLength = 1.4, halfWidth = 0.68 }, westbrook_luxury_apartment = { label = 'Luxury Apartment', x = 16.227, y = -0.07, z = 135.687, yaw = -31.88, bucket = 0, halfLength = 1.4, halfWidth = 0.68 }, }, - SENSITIVITY = 0.0025, -- radians per physical mouse count - CHARGE_SECONDS = 2.4, + SENSITIVITY = 0.0018, -- radians per physical mouse count + CHARGE_SECONDS = 1.8, + AIM_GUIDE = true, -- straight line to the first ball/cushion; no bounce prediction -- opx_pool_assets reserves these three native recreation aliases globally. -- Do not use them as tents, sleeping bags or gym equipment on this world. MODELS = { diff --git a/docs/MANUAL.md b/docs/MANUAL.md index 1cf39611..492f3971 100644 --- a/docs/MANUAL.md +++ b/docs/MANUAL.md @@ -970,11 +970,31 @@ another resource's props or world nodes. The eye offers **Practise pool** at the configured table. One loaded character holds the practice seat; nearby loaded characters in the same bucket receive -spectator frames. Right-click arms/cancels aim, mouse movement adjusts direction, -holding/releasing left-click charges/fires, **R** resets the balls while unarmed, -and **Backspace** leaves. Walking remains free. Aiming temporarily holds camera -rotation; opening a keyboard-owning UI cancels charge without shooting. The -existing prompts strip shows controls and power without taking WebUI focus. +spectator frames. Entering automatically frames the white ball from behind the +cue. Move the mouse to aim; hold **Shift** for fine adjustments. Holding left-click +charges the shot and releasing fires; the dedicated, unfocused overlay shows a +smooth power gauge. The direction becomes finer while charging. **V** toggles an +overhead view for planning; the mouse wheel adjusts the cue-view height. A dashed +straight guide stops at the first ball or cushion, with a cue-ball contact ring; +it does not predict rebounds or results. Set `AIM_GUIDE = false` to hide it. +`SENSITIVITY` defaults to `0.0018`, `CHARGE_SECONDS` to `1.8`. + +After a shot the camera moves to the table view until authoritative playback has +settled, then returns behind the white ball. Right-click cancels/resumes aiming; +while cancelled the player can walk around and **R** resets the practice balls. +**Backspace** leaves, including while balls move. Position, rotation, jump, dodge +and ordinary interaction are held only during the camera view, through the same +module-owned control leases used by target/police/hauling. UI capture, loss of the +seat, character unload, leaving and stop remove the camera, guide and gauge and +release those claims. Capturing input cancels a charge without firing and does +not automatically resume it when the UI closes. A camera refusal leaves practice +with a friendly notice and records the native reason in operator diagnostics. + +The camera needs `camera.script`; the bounded aiming guide uses `world.debug`. +Its camera/prop work runs per frame; guide geometry is capped at 20 lines and +refreshed every 100 ms with a 200 ms native expiry. The power overlay consumes no +pointer or keyboard and expires stale readings after 500 ms. These are client +presentation features, not new permissions to decide shots or outcomes. The server owns all ball coordinates, collisions, pockets and scratch recovery. Its fixed 120 Hz solver advances to swept ball/rail/pocket contacts, with a bounded diff --git a/lib/client/controls.lua b/lib/client/controls.lua index e864de33..04e469b7 100644 --- a/lib/client/controls.lua +++ b/lib/client/controls.lua @@ -4,7 +4,7 @@ OPX.Controls = {} local claims = {} local known = { allowAim = true, allowShoot = true, allowInteraction = true, - allowWeapons = true, allowDodge = true, allowJump = true, freezeRotation = true } + allowWeapons = true, allowDodge = true, allowJump = true, freezeRotation = true, freezePosition = true } local function held(name, except) for owner, names in pairs(claims) do if owner ~= except and names[name] then return true end end return false @@ -19,7 +19,8 @@ function OPX.Controls.Set(owner, names, take) end local previous, changed = claims[owner] or {}, {} local function apply(name, on) - local value = name == 'freezeRotation' and on or name ~= 'freezeRotation' and not on + local freeze = name == 'freezeRotation' or name == 'freezePosition' + local value = freeze and on or not freeze and not on local ran, ok = pcall(players[name], value) return ran and ok == true end diff --git a/modules/pool/client/camera.lua b/modules/pool/client/camera.lua new file mode 100644 index 00000000..03454b9c --- /dev/null +++ b/modules/pool/client/camera.lua @@ -0,0 +1,64 @@ +--- A cue-ball view and a table view, owned only while this player is shooting. +-- @author dop42 +local M = OPX.Modules.Get('pool') +local Model = M.Model +M.Camera = {} +local C = M.Camera +local id, pose, last, active +local function mix(a, b, amount) return a + (b-a)*amount end +function C.Clear() + -- Destroying our definition restores the view only if THIS camera held it. + -- Never deactivate another camera owned by a different module in Infinity. + if id then + local ok, why = Open77.camera.destroy(id) + if not ok and why ~= 'camera_not_found' then OPX.Note('pool', 'camera cleanup: ' .. tostring(why)) end + end + id, pose, last, active = nil, nil, nil, false +end +function C.Pose(spec, points, angle, overview, height) + local c, s = math.cos(angle), math.sin(angle) + local ball = points[1] + if overview then + local at = Model.World(spec, -c*0.65, -s*0.65) + at.z = at.z+2.35 + local aim = Model.World(spec, 0, 0) + return { position = at, target = aim, fov = 62 } + end + local at = Model.World(spec, ball[1]-c*1.25, ball[2]-s*1.25) + at.z = at.z+height + local aim = Model.World(spec, ball[1]+c*0.45, ball[2]+s*0.45) + aim.z = aim.z+0.015 + return { position = at, target = aim, fov = 52 } +end +function C.Update(spec, points, angle, overview, height, now) + local wanted = C.Pose(spec, points, angle, overview, height) + if not id then + local why + id, why = Open77.camera.create({ position = wanted.position, lookAt = wanted.target, fov = wanted.fov }) + if not id then return false, why end + local ok, refusal = Open77.camera.activate(id, { blendMs = 250 }) + if not ok then C.Clear(); return false, refusal end + pose, last, active = wanted, now, true + return true + end + -- Frame-rate-independent smoothing, including the transition to the table. + local amount = 1-math.exp(-math.max(0, math.min(100, now-last))/80) + last = now + for _, key in ipairs({ 'x', 'y', 'z' }) do + pose.position[key] = mix(pose.position[key], wanted.position[key], amount) + pose.target[key] = mix(pose.target[key], wanted.target[key], amount) + end + pose.fov = mix(pose.fov, wanted.fov, amount) + local ok, why = Open77.camera.setTransform(id, { position = pose.position, fov = pose.fov }) + if not ok then C.Clear(); return false, why end + ok, why = Open77.camera.lookAt(id, pose.target) + if not ok then C.Clear(); return false, why end + return true +end +function C.Check() + if not active then return true end + local snapshot, why = Open77.camera.cameras() + if type(snapshot) ~= 'table' then return false, why end + if snapshot.activeCamera ~= id or snapshot.held ~= true then return false, 'camera_released' end + return true +end diff --git a/modules/pool/client/guide.lua b/modules/pool/client/guide.lua new file mode 100644 index 00000000..c76cb68c --- /dev/null +++ b/modules/pool/client/guide.lua @@ -0,0 +1,57 @@ +--- A bounded straight aiming aid, ending at the first ball or cushion. +-- @author dop42 +local M = OPX.Modules.Get('pool') +local Model = M.Model +M.Guide = {} +local G = M.Guide +local shown, refused, last = false, false, -math.huge +function G.Clear() + if shown then Open77.debugDraw.clear('pool.aim'); shown = false end +end +function G.Reset() G.Clear(); refused, last = false, -math.huge end +function G.End(spec, points, angle) + local x, y, c, s = points[1][1], points[1][2], math.cos(angle), math.sin(angle) + local length = 6 + local r = Model.RADIUS + if math.abs(c) > 1e-6 then length = math.min(length, ((c > 0 and spec.halfLength-r or -spec.halfLength+r)-x)/c) end + if math.abs(s) > 1e-6 then length = math.min(length, ((s > 0 and spec.halfWidth-r or -spec.halfWidth+r)-y)/s) end + for index = 2, Model.BALLS do + local ball = points[index] + if ball[3] then + local dx, dy = ball[1]-x, ball[2]-y + local ahead, side = dx*c+dy*s, dx*s-dy*c + if ahead > 0 and math.abs(side) < r*2 then + local touch = ahead-math.sqrt(math.max(0, r*r*4-side*side)) + if touch >= 0 then length = math.min(length, touch) end + end + end + end + length = math.max(0, length) + return x+c*length, y+s*length, length +end +function G.Draw(spec, points, angle, now) + if refused or now-last < 50 then return end + last = now + local x, y, length = G.End(spec, points, angle) + local ball = points[1] + local lines = {} + local function point(px, py) + local p = Model.World(spec, px, py); p.z = p.z-Model.RADIUS+0.003; return p + end + local count = math.min(12, math.max(1, math.ceil(length/0.08))) + for index = 0, count-1 do + local a, b = index/count, math.min(1, (index+0.55)/count) + lines[#lines+1] = { a = point(ball[1]+(x-ball[1])*a, ball[2]+(y-ball[2])*a), + b = point(ball[1]+(x-ball[1])*b, ball[2]+(y-ball[2])*b), color = '#ADEFFFC0' } + end + for index = 0, 7 do + local a, b = index*math.pi/4, (index+1)*math.pi/4 + lines[#lines+1] = { a = point(x+math.cos(a)*Model.RADIUS, y+math.sin(a)*Model.RADIUS), + b = point(x+math.cos(b)*Model.RADIUS, y+math.sin(b)*Model.RADIUS), color = '#ADEFFFCC' } + end + local ok, why = Open77.debugDraw.set('pool.aim', { lines = lines, ttl = 0.2, maxDistance = 8, thickness = 1.5 }) + if not ok then + refused = true; G.Clear(); OPX.Note('pool', 'aim guide unavailable: ' .. tostring(why)); return + end + shown = true +end diff --git a/modules/pool/client/input.lua b/modules/pool/client/input.lua index 506d7c9e..3fe173fb 100644 --- a/modules/pool/client/input.lua +++ b/modules/pool/client/input.lua @@ -3,7 +3,7 @@ local M = OPX.Modules.Get('pool') M.Input = {} local I = M.Input -function I.New() return { aiming = false, power = 0, angle = 0, previous = {} } end +function I.New() return { aiming = false, power = 0, angle = 0, overview = false, height = 0.5, previous = {} } end function I.Step(state, now, buttons, allowed, captured, delta, sensitivity, seconds) local old, event = state.previous, nil local right = buttons.right and not old.right @@ -16,12 +16,16 @@ function I.Step(state, now, buttons, allowed, captured, delta, sensitivity, seco return { kind = 'leave' } end if right or (buttons.cancel and not old.cancel) then - state.aiming = right and not state.aiming or false + state.aiming = not buttons.cancel and right and not state.aiming or false state.chargedAt, state.power = nil, 0 return { kind = 'aim', visible = state.aiming } end if state.aiming then - state.angle = (state.angle + delta*sensitivity + math.pi) % (2*math.pi) - math.pi + if buttons.overview and not old.overview then state.overview = not state.overview end + -- Finer direction while charging makes small-power shots repeatable. + local gain = buttons.precise and 0.15 or 1 + if state.chargedAt then gain = gain*0.2 end + state.angle = (state.angle + delta*sensitivity*gain + math.pi) % (2*math.pi) - math.pi if left then state.chargedAt = now end if state.chargedAt then state.power = math.max(0.02, math.min(1, (now-state.chargedAt)/seconds)) end if release and state.chargedAt then diff --git a/modules/pool/client/main.lua b/modules/pool/client/main.lua index 37d4db7b..48f51953 100644 --- a/modules/pool/client/main.lua +++ b/modules/pool/client/main.lua @@ -1,18 +1,27 @@ ---- Practice entry, bounded local playback and physical mouse input. +--- Guided practice entry, camera, physical input and authoritative playback. -- @author dop42 local M = OPX.Modules.Get('pool') -local Model, B, I, R = M.Model, M.Playback, M.Input, M.Render -local spec, buffer, input, positions, target, prompts, jobs, lastPacket, subscribed, lastMouse, lastAim, waiting, owned, held, reported, lastControls +local Model, B, I, R, C, G = M.Model, M.Playback, M.Input, M.Render, M.Camera, M.Guide +local spec, buffer, input, positions, target, prompts, jobs, lastPacket, subscribed, lastMouse, lastWheel, lastAim, waiting, owned, held, reported, lastControls +local autoAim, following, shotSeen, hudVisible local function request(action, extra) extra = extra or {} extra.epoch = buffer.epoch extra.revision = buffer.state and buffer.state.revision TriggerServerEvent(M.Event.REQUEST, action, extra) end -local function controls(aiming, on) +local function hideHud() + if hudVisible then OPX.UI.Send('overlay', 'pool:hide', {}); hudVisible = false end +end +local function releaseView() C.Clear(); G.Clear(); hideHud() end +local function controls(view, on) local names = { 'allowAim', 'allowShoot' } - if aiming then names[#names+1] = 'freezeRotation' end - local signature = on and (aiming and 'aim' or 'walk') or 'free' + if view then + names[#names+1], names[#names+2] = 'freezeRotation', 'freezePosition' + names[#names+1], names[#names+2] = 'allowJump', 'allowDodge' + names[#names+1] = 'allowInteraction' + end + local signature = on and (view and 'view' or 'walk') or 'free' if held == signature and (not on or OPX.Now()-lastControls < 250) then return true end if not OPX.Controls.Set('pool', names, on) then return false end held, lastControls = signature, OPX.Now() @@ -22,7 +31,9 @@ end local function clear(leave) if leave and subscribed then request('leave') end owned, subscribed, waiting, positions = false, false, nil, nil - input, buffer, lastMouse = I.New(), B.New(), nil + autoAim, following, shotSeen = false, false, false + input, buffer, lastMouse, lastWheel = I.New(), B.New(), nil, nil + releaseView() controls(false, false) if target then target.SetTargetingEnabled('pool', true) end if prompts then prompts.HideAll('pool') end @@ -43,13 +54,18 @@ end local function receive(packet) if not spec or not subscribed then return end if type(packet) == 'table' and packet.closed == true then clear(true); return end - local oldEpoch = buffer.epoch + local oldEpoch, wasOwned = buffer.epoch, owned if B.Push(buffer, packet, OPX.Now()) then lastPacket = OPX.Now() - if oldEpoch ~= buffer.epoch then input, waiting = I.New(), nil end local nextOwned = buffer.state.owner == Open77.players.localId() - if owned and not nextOwned then input, waiting = I.New(), nil end + if oldEpoch ~= buffer.epoch or (wasOwned and not nextOwned) then + input, waiting, following, shotSeen = I.New(), nil, false, false + releaseView() + end owned = nextOwned + if owned and (not wasOwned or oldEpoch ~= buffer.epoch) then autoAim = true end + if not owned then autoAim, following, shotSeen = false, false, false; releaseView() end + if following and buffer.state.phase == 'rolling' then shotSeen = true end if waiting and (buffer.state.phase == 'rolling' or waiting.revision ~= buffer.state.revision or OPX.Now()-waiting.at > 1500) then waiting = nil end end @@ -63,6 +79,11 @@ local function watch() request('watch') if not R.Check() then clear(true) end end +local function cameraFailure(why) + OPX.Note('pool', 'camera refused: ' .. tostring(why)) + OPX.Toast.Locale('pool.camera', nil, 'error') + clear(true) +end local function draw() if not subscribed or not buffer.state then return end positions = B.Sample(buffer, OPX.Now()) @@ -70,62 +91,113 @@ local function draw() local state = buffer.state local aiming = owned and input.aiming or not owned and state.aiming local angle, power = owned and input.angle or state.angle, owned and input.power or state.power - if not R.Draw(spec, positions, aiming and state.phase == 'ready', angle, power) then clear(true) end + if not R.Draw(spec, positions, aiming and state.phase == 'ready', angle, power) then clear(true); return end + local captured = Open77.input.isCaptured() ~= false + if owned and (input.aiming or following) and not captured then + local ok, why = C.Update(spec, positions, input.angle, following or input.overview, input.height, OPX.Now()) + if not ok then cameraFailure(why); return end + if not input.aiming or state.phase ~= 'ready' then G.Clear() end + else releaseView() end +end +local function axis(name, old) + local value = Model.Number(Open77.input.axis(name), -1e15, 1e15) + return value and old and math.max(-5000, math.min(5000, value-old)) or 0, value end local function press() if not spec then return end local now = OPX.Now() - local mouse = Open77.input.axis('mouseDeltaX') - local delta = Model.Number(mouse, -1e15, 1e15) and lastMouse and math.max(-5000, math.min(5000, mouse-lastMouse)) or 0 - lastMouse = Model.Number(mouse, -1e15, 1e15) + local delta, wheel + delta, lastMouse = axis('mouseDeltaX', lastMouse) + wheel, lastWheel = axis('mouseWheel', lastWheel) local captured = Open77.input.isCaptured() ~= false or lastMouse == nil local can = owned and buffer.state and buffer.state.phase == 'ready' and not waiting and buffer.cursor >= buffer.state.readyAt and distance() <= 3.5 and available() and not R.Failed() local buttons = { right = Open77.input.isDown('mouse2'), left = Open77.input.isDown('mouse1'), - cancel = Open77.input.isDown('ESC'), leave = Open77.input.isDown('BACKSPACE'), rack = Open77.input.isDown('R') } + cancel = Open77.input.isDown('ESC'), leave = Open77.input.isDown('BACKSPACE'), rack = Open77.input.isDown('R'), + overview = Open77.input.isDown('V'), precise = Open77.input.isDown('SHIFT') } + if owned and (distance() > 3.5 or not available() or now-lastPacket > 1500) then clear(true); return end + if owned and not captured and (input.aiming or following) then + local ok, why = C.Check() + if not ok then cameraFailure(why); return end + end + -- Do not resume an interrupted charge or a held click after closing a menu. + if captured then autoAim, following, shotSeen = false, false, false end + if following and can and (shotSeen or not waiting) then + following, shotSeen, autoAim = false, false, true + end + if autoAim and can and positions and not captured then + input.aiming, autoAim, input.previous = true, false, buttons + if not input.aligned then + local _, x, y = distance() + local px, py = Model.Local(spec, x, y) + input.angle, input.aligned = math.atan(positions[1][2]-py, positions[1][1]-px), true + end + end local was = input.aiming local cfg = M.Settings local event = I.Step(input, now/1000, buttons, can, captured, delta, - Model.Number(cfg.SENSITIVITY, 0.0001, 0.02) or 0.0025, Model.Number(cfg.CHARGE_SECONDS, 0.5, 5) or 2.4) - if not was and input.aiming and positions then + Model.Number(cfg.SENSITIVITY, 0.0001, 0.02) or 0.0018, Model.Number(cfg.CHARGE_SECONDS, 0.5, 5) or 1.8) + if not was and input.aiming and positions and not input.aligned then local _, x, y = distance() local px, py = Model.Local(spec, x, y) - input.angle = math.atan(positions[1][2]-py, positions[1][1]-px) + input.angle, input.aligned = math.atan(positions[1][2]-py, positions[1][1]-px), true end - if owned and (distance() > 3.5 or not available() or now-lastPacket > 1500) then clear(true); return end - if not controls(input.aiming, owned) then - if not reported then reported = true; OPX.Note('pool', 'input control lease refused'); OPX.Toast.Locale('pool.models', nil, 'error') end - clear(true); return - end - -- Leave works while rolling too; it does not imply an accepted new shot. - if owned and not captured and buttons.leave and not can then clear(true); return end + if input.aiming then input.height = math.max(0.25, math.min(1.2, input.height+wheel*0.08)) end + if owned and not captured and buttons.leave then clear(true); return end if event then if event.kind == 'leave' then clear(true); return end - if event.kind == 'shoot' or event.kind == 'rack' then waiting = { revision = buffer.state.revision, at = now } end + if event.kind == 'shoot' or event.kind == 'rack' then + waiting = { revision = buffer.state.revision, at = now } + if event.kind == 'shoot' then following, shotSeen = true, false end + end if event.kind ~= 'aim' then request(event.kind, event) end end + if not controls(not captured and (input.aiming or following), owned) then + if not reported then reported = true; OPX.Note('pool', 'input control lease refused'); OPX.Toast.Locale('pool.models', nil, 'error') end + clear(true); return + end if subscribed and owned and now-lastAim >= 100 then lastAim = now request('aim', { visible = input.aiming, angle = input.angle, power = input.power }) end end +local function guide() + if owned and input.aiming and positions and positions[1][3] and buffer.state and buffer.state.phase == 'ready' + and Open77.input.isCaptured() == false and M.Settings.AIM_GUIDE ~= false then + G.Draw(spec, positions, input.angle, OPX.Now()) + else G.Clear() end +end local function strip() - if not owned or not prompts or Open77.input.isCaptured() then if prompts then prompts.HideAll('pool') end; return end + if not owned or Open77.input.isCaptured() then + if prompts then prompts.HideAll('pool') end + hideHud(); return + end local ready = buffer.state and buffer.state.phase == 'ready' and not waiting - prompts.Show('pool', 'practice', { title = spec.label, rows = { + if prompts then prompts.Show('pool', 'practice', { title = spec.label, rows = { { keys = 'RMB', label = locale(ready and 'pool.aim' or 'pool.rolling') }, - { keys = 'LMB', label = locale('pool.charge'), value = locale('pool.power', { power = math.floor(input.power*100) }) }, + { keys = 'LMB', label = locale('pool.charge') }, + { keys = 'SHIFT', label = locale('pool.precise') }, + { keys = 'V', label = locale('pool.overview') }, { keys = 'R', label = locale('pool.rack') }, { keys = 'BACKSPACE', label = locale('pool.leave') }, - } }) + } }) end + if input.aiming or following then + hudVisible = true + OPX.UI.Send('overlay', 'pool:frame', { title = spec.label, power = input.power, + charging = input.chargedAt ~= nil, + phase = following and 'rolling' or 'aim', powerLabel = locale('pool.powerLabel'), + hint = locale(following and 'pool.rolling' or input.chargedAt and 'pool.release' or 'pool.charge'), + view = locale(input.overview and 'pool.tableView' or 'pool.cueView') }) + else hideHud() end end local function frame() press(); draw() end -M.Client = { Receive = receive, Watch = watch, Draw = draw, Input = press, Frame = frame } +M.Client = { Receive = receive, Watch = watch, Draw = draw, Input = press, Frame = frame, Strip = strip, Guide = guide } function M.Init() spec, buffer, input, positions = nil, B.New(), I.New(), nil - jobs, lastPacket, subscribed, lastMouse, lastAim, waiting, owned, held, reported, lastControls = {}, 0, false, nil, 0, nil, false, 'free', false, 0 + jobs, lastPacket, subscribed, lastMouse, lastWheel, lastAim, waiting, owned, held, reported, lastControls = {}, 0, false, nil, nil, 0, nil, false, 'free', false, 0 + autoAim, following, shotSeen, hudVisible = false, false, false, false end function M.Start() - R.Reset() + R.Reset(); G.Reset() spec = Model.Table() if not spec then return end target, prompts = OPX.Api.Get('target'), OPX.Api.Get('prompts') @@ -141,7 +213,8 @@ function M.Start() AddEventHandler(OPX.Event(OPX.Channel.LOCAL, 'character', 'unloaded'), function() clear(true) end) jobs[1] = OPX.Scheduler.Every('pool.watch', 1000, watch) jobs[2] = OPX.Scheduler.Every('pool.frame', 0, frame) - jobs[3] = OPX.Scheduler.Every('pool.strip', 100, strip) + jobs[3] = OPX.Scheduler.Every('pool.strip', 50, strip) + jobs[4] = OPX.Scheduler.Every('pool.guide', 100, guide) end function M.Stop() for _, job in ipairs(jobs or {}) do OPX.Scheduler.Cancel(job) end diff --git a/modules/pool/locales.lua b/modules/pool/locales.lua index 61ef53f2..e9217d84 100644 --- a/modules/pool/locales.lua +++ b/modules/pool/locales.lua @@ -10,6 +10,13 @@ local EN = { ['pool.leave'] = 'Leave the table', ['pool.rolling'] = 'Wait for the balls to stop.', ['pool.power'] = 'Power {power}%', + ['pool.powerLabel'] = 'Shot power', + ['pool.precise'] = 'Fine aim', + ['pool.overview'] = 'Switch table / cue view', + ['pool.release'] = 'Release to shoot · RMB to cancel', + ['pool.tableView'] = 'Table view', + ['pool.cueView'] = 'Cue view', + ['pool.camera'] = 'The aiming view is unavailable. Try again; if this continues, contact an administrator.', ['pool.busy'] = 'Someone is already practising at this table.', ['pool.models'] = 'This table is unavailable. If this seems wrong, please contact an administrator.', ['pool.simulation'] = 'This shot could not be completed. Reset the balls; contact an administrator if it happens again.', @@ -23,6 +30,13 @@ local FR = { ['pool.leave'] = 'Quitter la table', ['pool.rolling'] = 'Attendez que les billes s’arrêtent.', ['pool.power'] = 'Puissance {power} %', + ['pool.powerLabel'] = 'Puissance du tir', + ['pool.precise'] = 'Visée précise', + ['pool.overview'] = 'Vue de table / vue de tir', + ['pool.release'] = 'Relâchez pour tirer · Clic droit pour annuler', + ['pool.tableView'] = 'Vue de table', + ['pool.cueView'] = 'Vue de tir', + ['pool.camera'] = 'La vue de tir est indisponible. Réessayez ; si cela persiste, contactez un administrateur.', ['pool.busy'] = 'Quelqu’un s’entraîne déjà sur cette table.', ['pool.models'] = 'Cette table est indisponible. Si cela vous semble anormal, contactez un administrateur.', ['pool.simulation'] = 'Ce tir n’a pas pu être terminé. Replacez les billes ; contactez un administrateur si cela se reproduit.', diff --git a/open77.lua b/open77.lua index 01585fe8..b9095fa6 100644 --- a/open77.lua +++ b/open77.lua @@ -817,6 +817,8 @@ server_script "modules/pool/server/physics.lua" server_script "modules/pool/server/main.lua" client_script "modules/pool/client/input.lua" client_script "modules/pool/client/render.lua" +client_script "modules/pool/client/camera.lua" +client_script "modules/pool/client/guide.lua" client_script "modules/pool/client/main.lua" shared_script "modules/salvage/module.lua" @@ -1160,6 +1162,9 @@ permissions { -- `permission_denied` and a clean boot, which is what they were checked -- against. A client permission is verified in the game or not at all. "camera.preview", + -- Pool cue-ball and table views; a bounded straight aiming guide. + "camera.script", + "world.debug", -- THE PLAYABLE THIRD-PERSON STYLE (client op77.78): framing, FOV, shoulder, -- blend. `modules/camera/client/main.lua` calls diff --git a/tests/audit-control-leases.lua b/tests/audit-control-leases.lua index f1692b7e..f8a4da57 100644 --- a/tests/audit-control-leases.lua +++ b/tests/audit-control-leases.lua @@ -1,7 +1,7 @@ --- The three existing control owners and pool must compose in one resource VM. local state, refusals, OPX = {}, {}, {} local env = { OPX=OPX, Open77={players={}}, type=type, pairs=pairs, ipairs=ipairs, table=table, pcall=pcall } -for _,name in ipairs({'allowShoot','allowAim','allowInteraction','freezeRotation','allowWeapons','allowJump','allowDodge'}) do +for _,name in ipairs({'allowShoot','allowAim','allowInteraction','freezeRotation','freezePosition','allowWeapons','allowJump','allowDodge'}) do env.Open77.players[name]=function(value) if refusals[name] then return false end state[name]=value; return true @@ -29,4 +29,8 @@ assert(C.Set('police',{'allowShoot'},true)) refusals.freezeRotation=true assert(not C.Set('pool',{'allowShoot','freezeRotation'},true)) assert(state.allowShoot==false, 'failed claim released another owner') +assert(C.Set('cinema',{'freezePosition'},true)) +assert(C.Set('pool',{'freezePosition'},true)) +assert(C.Set('pool',{'freezePosition'},false) and state.freezePosition==true,'pool released another module freeze') +assert(C.Set('cinema',{'freezePosition'},false) and state.freezePosition==false) print('control leases: target/pool/cuffs/carry ownership, partial refusal and rollback passed') diff --git a/tests/audit-pool-camera.lua b/tests/audit-pool-camera.lua new file mode 100644 index 00000000..e648fec8 --- /dev/null +++ b/tests/audit-pool-camera.lua @@ -0,0 +1,52 @@ +--- Camera geometry, ownership, failures and bounded aiming aid using real code. +local M, notes, calls, current, nextId, failAt = {}, {}, {}, nil, 0, nil +local env = setmetatable({ OPX={Modules={Get=function() return M end},Note=function(_,why) notes[#notes+1]=why end},Open77={camera={},debugDraw={}} },{__index=_G}) +for _,name in ipairs({'create','activate','setTransform','lookAt','destroy','cameras'}) do + env.Open77.camera[name]=function(...) + calls[#calls+1]={name,...} + if failAt==name then return false,'test_refused' end + if name=='create' then nextId=nextId+1;return nextId end + if name=='activate' then current=(...);return true end + if name=='destroy' then if current==(...) then current=nil end;return true end + if name=='cameras' then return {held=current~=nil,activeCamera=current} end + return true + end +end +local geometry, cleared +function env.Open77.debugDraw.set(_,g) geometry=g;return true end +function env.Open77.debugDraw.clear() cleared=true;geometry=nil;return true end +for _,file in ipairs({'shared/model','client/camera','client/guide','client/input'}) do assert(loadfile('modules/pool/'..file..'.lua','t',env))() end +local C,G,I=M.Camera,M.Guide,M.Input +local spec={x=100,y=50,z=10,yaw=90,halfLength=1.4,halfWidth=0.68} +local balls={{0,0,true},{0.5,0,true},{0.8,0.3,true}} +local p=C.Pose(spec,balls,0,false,0.5) +assert(math.abs(p.position.x-100)<1e-9 and math.abs(p.position.y-48.75)<1e-9 and p.position.z==10.5,'cue camera not behind white ball in world frame') +assert(p.target.y>50 and p.position.z>p.target.z,'cue view does not look down the shot') +assert(C.Update(spec,balls,0,false,0.5,0) and current==1) +assert(C.Check()) +for now=16,160,16 do assert(C.Update(spec,balls,0.2,true,0.5,now)) end +assert(nextId==1,'camera respawned while orbiting') +local lastPose +for _,row in ipairs(calls) do if row[1]=='setTransform' then lastPose=row[3] end end +assert(lastPose.position.z>11 and lastPose.position.z<12.35,'table transition did not interpolate') +C.Clear();assert(current==nil and C.Check()) +failAt='activate';assert(not C.Update(spec,balls,0,false,0.5,200));assert(current==nil,'refused activation leaked view') +failAt=nil;assert(C.Update(spec,balls,0,false,0.5,210));current=999 +assert(not C.Check(),'lost view ownership not detected');C.Clear();assert(current==999,'clear released another module camera') +current=nil;assert(C.Update(spec,balls,0,false,0.5,220));failAt='setTransform' +assert(not C.Update(spec,balls,0,false,0.5,240) and current==nil,'transform failure kept view') +failAt=nil +local x,y,d=G.End(spec,balls,0) +assert(math.abs(d-(0.5-M.Model.RADIUS*2))<1e-9 and y==0,'guide ignores first ball radius') +balls[2][3]=false;x,y,d=G.End(spec,balls,0) +assert(math.abs(d-(spec.halfLength-M.Model.RADIUS))<1e-9,'guide ignores cushion boundary') +balls[2][3]=true +local cost=0;debug.sethook(function()cost=cost+100 end,'',100) +G.Draw(spec,balls,0,1000);debug.sethook() +assert(geometry and #geometry.lines<=20 and cost<5000,'unbounded guide or instruction budget: '..cost) +G.Clear();assert(cleared and not geometry,'aim guide survived cancellation') +local input=I.New();I.Step(input,0,{right=true},true,false,0,1,1) +I.Step(input,0.1,{precise=true,overview=true},true,false,1,1,1) +assert(math.abs(input.angle-0.15)<1e-9 and input.overview,'precision/view switch failed') +I.Step(input,0.2,{overview=true},true,false,0,1,1);assert(input.overview,'held V toggled repeatedly') +print('pool camera: world framing, reuse, smoothing, ownership/failure cleanup, first-contact guide; guide budget',cost) diff --git a/tests/audit-pool-client.lua b/tests/audit-pool-client.lua index 3a635d47..5aae8eef 100644 --- a/tests/audit-pool-client.lua +++ b/tests/audit-pool-client.lua @@ -3,7 +3,7 @@ local Host = dofile('tests/host.lua') local env, control = Host.Environment('client') local props, nextId, creates, moves, mouse, state = {}, 0, 0, 0, 0, {} local failed, refused = false, nil -for _,name in ipairs({'allowShoot','allowAim','allowInteraction','freezeRotation','allowWeapons','allowJump','allowDodge'}) do +for _,name in ipairs({'allowShoot','allowAim','allowInteraction','freezeRotation','freezePosition','allowWeapons','allowJump','allowDodge'}) do env.Open77.players[name] = function(value) state[name]=value; return true end end env.Open77.players.localId = function() return 7 end @@ -24,6 +24,16 @@ env.Open77.props = { return rows end, } +local camId, cameraHeld, cameraCreated, cameraDestroyed, cameraRefused = nil, false, 0, 0, false +env.Open77.camera = env.Open77.camera or {} +env.Open77.camera.create = function(options) cameraCreated=cameraCreated+1; camId=cameraCreated; return camId end +env.Open77.camera.activate = function(id) if cameraRefused then return false,'camera_held_by:test' end; cameraHeld=true; return true end +env.Open77.camera.destroy = function(id) cameraDestroyed=cameraDestroyed+1; cameraHeld=false; camId=nil; return true end +env.Open77.camera.setTransform = function() return true end +env.Open77.camera.lookAt = function() return true end +env.Open77.camera.cameras = function() return {held=cameraHeld,activeCamera=camId} end +local guideShown=false +env.Open77.debugDraw={set=function() guideShown=true; return true end,clear=function() guideShown=false; return true end} for _,file in ipairs(Host.LoadOrder('open77.lua','client')) do assert(loadfile(file,'t',env))() if file=='config/pool.lua' then env.OPX.Config.MODULES.pool.TABLE={enabled=true,x=100,y=10,z=1,yaw=0,bucket=0,halfLength=1.27,halfWidth=0.635,label='Audit pool'} end @@ -42,6 +52,8 @@ end M.Client.Receive(packet(1,0)) M.Client.Draw(); M.Client.Input() assert(creates==3 and state.allowShoot==false and state.allowAim==false,'practice did not render/hold weapons') +M.Client.Frame(); M.Client.Guide(); M.Client.Strip() +assert(cameraHeld and state.freezePosition==true and guideShown,'entry did not arm a camera/guide') local function measured(fn) local cost=0 debug.sethook(function() cost=cost+100 end,'',100) @@ -57,18 +69,22 @@ for sample=0,6 do burst.frames[#burst.frames+1]={time=sample*1000/120,balls={{-0 worst=math.max(worst,measured(function() M.Client.Receive(burst) end)) local reset=packet(1,0); reset.epoch=3; M.Client.Receive(reset) for _=1,100 do worst=math.max(worst,measured(M.Client.Frame)) end -assert(creates==3 and moves>=300,'movement respawned props') -control.input.down.mouse2=true; M.Client.Input() -assert(state.freezeRotation==true and creates==3,'aim failed to freeze camera') -M.Client.Draw(); assert(creates==4,'cue missing') +assert(creates==4 and moves>=300 and cameraCreated==2,'movement respawned props or camera') +-- Right click cancels the automatically armed view; another press arms it. +control.input.down.mouse2=true; M.Client.Frame() +assert(not cameraHeld and state.freezePosition==false,'cancel kept camera/body frozen') +control.input.down.mouse2=false; M.Client.Frame() +control.input.down.mouse2=true; M.Client.Frame() +assert(state.freezeRotation==true and state.freezePosition==true and cameraHeld,'aim failed to acquire camera/position') +M.Client.Draw(); assert(creates>=4,'cue missing') control.input.down.mouse2=false; control.input.down.mouse1=true; M.Client.Input() control.Advance(1200); control.input.captured=true; M.Client.Input(); M.Client.Draw() -assert(state.freezeRotation==false,'chat capture kept camera frozen') +assert(state.freezeRotation==false and state.freezePosition==false and not cameraHeld and not guideShown,'chat capture kept view/guide/body frozen') for _,message in ipairs(control.serverEvents) do assert(not(message.name==M.Event.REQUEST and message[1]=='shoot'),'captured release fired shot') end control.input.captured=false; control.input.down.mouse1=false; M.Client.Input() -- A server scope revocation immediately drops local props, input and seat. M.Client.Receive({closed=true}) -assert(next(props)==nil and state.allowShoot==true and state.freezeRotation==false,'scope revoke leaked projection') +assert(next(props)==nil and state.allowShoot==true and state.freezeRotation==false and not cameraHeld and not guideShown,'scope revoke leaked projection/view') M.Client.Watch() local resumed=packet(1,0); resumed.epoch=4; M.Client.Receive(resumed); M.Client.Frame() assert(state.allowShoot==false,'practice did not recover after scope resubscribe') @@ -77,7 +93,28 @@ failed=true; M.Client.Watch() assert(next(props)==nil and M.Render.Failed() and state.allowShoot==true,'failed model kept objects or controls') local before=creates M.Client.Draw(); M.Client.Watch(); assert(creates==before,'failed model retry loop') -M.Stop(); assert(next(props)==nil and state.freezeRotation==false,'stop leaked props/controls') +M.Stop(); assert(next(props)==nil and state.freezeRotation==false and state.freezePosition==false and not cameraHeld,'stop leaked props/controls/camera') +-- Refusing a camera must release the seat and every view/control claim. +failed=false; cameraRefused=true +M.Init(); M.Start(); M.Client.Watch() +local denied=packet(1,0); denied.epoch=9; M.Client.Receive(denied) +M.Client.Frame(); M.Client.Frame() +assert(not cameraHeld and state.freezePosition==false and state.allowShoot==true and next(props)==nil,'camera refusal left a practice seat/view') +M.Stop(); cameraRefused=false +-- An accepted shot changes to table view and rearms only after playback settles. +M.Init(); M.Start(); M.Client.Watch() +local ready=packet(1,0); ready.epoch=10; M.Client.Receive(ready) +M.Client.Frame(); M.Client.Frame() +control.input.down.mouse1=true; M.Client.Input(); control.Advance(400) +control.input.down.mouse1=false; M.Client.Frame() +assert(cameraHeld and state.freezePosition==true,'shot dropped the table camera') +local moving=packet(2,50); moving.epoch=10; moving.phase='rolling'; M.Client.Receive(moving); M.Client.Frame() +local settled=packet(3,100); settled.epoch=10;settled.revision=2;settled.readyAt=100 +M.Client.Receive(settled); M.Client.Frame(); control.Advance(200);M.Client.Frame();M.Client.Frame() +assert(cameraHeld and state.freezePosition==true,'settled shot did not rearm the aiming view') +control.input.down.BACKSPACE=true; M.Client.Frame();control.input.down.BACKSPACE=false +assert(not cameraHeld and state.freezePosition==false and not guideShown,'leave failed to release the table view') +M.Stop() -- A just-created native entity may not be transformable until streaming ends. M.Render.Reset(); failed=false local geometry={x=100,y=10,z=1,yaw=0} diff --git a/tests/ui-pool-lifecycle.mjs b/tests/ui-pool-lifecycle.mjs new file mode 100644 index 00000000..faca7e48 --- /dev/null +++ b/tests/ui-pool-lifecycle.mjs @@ -0,0 +1,29 @@ +/** Exercise the actual pool gauge controller, including stale-frame cleanup. */ +import assert from 'node:assert/strict' +import fs from 'node:fs' +import ts from 'typescript' +const source = fs.readFileSync(new URL('../ui/src/modules/pool/PoolHud.vue', import.meta.url), 'utf8') +const script = source.match(/ + + + + diff --git a/web/index.html b/web/index.html index ac7d7255..ce236145 100644 --- a/web/index.html +++ b/web/index.html @@ -6,7 +6,7 @@ no device to fit. Image CDN URLs arrive from the server after the page handshake. --> OPEN//77 @@ -19,20 +19,20 @@ * @vue/shared v3.5.42 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT -**/function Js(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const Ve={},Nn=[],Mn=()=>{},Ri=()=>!1,qo=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),Yo=e=>e.startsWith("onUpdate:"),St=Object.assign,Di=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},ar=Object.prototype.hasOwnProperty,Ke=(e,t)=>ar.call(e,t),Ae=Array.isArray,dn=e=>ho(e)==="[object Map]",Tn=e=>ho(e)==="[object Set]",wl=e=>ho(e)==="[object Date]",je=e=>typeof e=="function",Qe=e=>typeof e=="string",Ft=e=>typeof e=="symbol",ze=e=>e!==null&&typeof e=="object",Ni=e=>(ze(e)||je(e))&&je(e.then)&&je(e.catch),Pi=Object.prototype.toString,ho=e=>Pi.call(e),rr=e=>ho(e).slice(8,-1),Hi=e=>ho(e)==="[object Object]",Qs=e=>Qe(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Qn=Js(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Xo=e=>{const t=Object.create(null);return(n=>t[n]||(t[n]=e(n)))},ur=/-\w/g,yt=Xo(e=>e.replace(ur,t=>t.slice(1).toUpperCase())),cr=/\B([A-Z])/g,on=Xo(e=>e.replace(cr,"-$1").toLowerCase()),Jo=Xo(e=>e.charAt(0).toUpperCase()+e.slice(1)),ds=Xo(e=>e?`on${Jo(e)}`:""),it=(e,t)=>!Object.is(e,t),Oo=(e,...t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:s,value:n})},Qo=e=>{const t=parseFloat(e);return isNaN(t)?e:t},dr=e=>{const t=Qe(e)?Number(e):NaN;return isNaN(t)?e:t};let xl;const es=()=>xl||(xl=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:typeof global!="undefined"?global:{});function Ee(e){if(Ae(e)){const t={};for(let n=0;n{if(n){const s=n.split(vr);s.length>1&&(t[s[0].trim()]=s[1].trim())}}),t}function Z(e){let t="";if(Qe(e))t=e;else if(Ae(e))for(let n=0;nfn(n,t))}const Vi=e=>!!(e&&e.__v_isRef===!0),m=e=>Qe(e)?e:e==null?"":Ae(e)||ze(e)&&(e.toString===Pi||!je(e.toString))?Vi(e)?m(e.value):JSON.stringify(e,ji,2):String(e),ji=(e,t)=>Vi(t)?ji(e,t.value):dn(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[s,o],l)=>(n[fs(s,l)+" =>"]=o,n),{})}:Tn(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>fs(n))}:Ft(t)?fs(t):ze(t)&&!Ae(t)&&!Hi(t)?String(t):t,fs=(e,t="")=>{var n;return Ft(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};/** +**/function Js(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const Ve={},Nn=[],Mn=()=>{},Ri=()=>!1,qo=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),Yo=e=>e.startsWith("onUpdate:"),St=Object.assign,Di=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},ar=Object.prototype.hasOwnProperty,Ke=(e,t)=>ar.call(e,t),Ae=Array.isArray,dn=e=>ho(e)==="[object Map]",Tn=e=>ho(e)==="[object Set]",wl=e=>ho(e)==="[object Date]",je=e=>typeof e=="function",Qe=e=>typeof e=="string",Bt=e=>typeof e=="symbol",ze=e=>e!==null&&typeof e=="object",Ni=e=>(ze(e)||je(e))&&je(e.then)&&je(e.catch),Pi=Object.prototype.toString,ho=e=>Pi.call(e),rr=e=>ho(e).slice(8,-1),Hi=e=>ho(e)==="[object Object]",Qs=e=>Qe(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Qn=Js(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Xo=e=>{const t=Object.create(null);return(n=>t[n]||(t[n]=e(n)))},ur=/-\w/g,yt=Xo(e=>e.replace(ur,t=>t.slice(1).toUpperCase())),cr=/\B([A-Z])/g,on=Xo(e=>e.replace(cr,"-$1").toLowerCase()),Jo=Xo(e=>e.charAt(0).toUpperCase()+e.slice(1)),ds=Xo(e=>e?`on${Jo(e)}`:""),at=(e,t)=>!Object.is(e,t),Oo=(e,...t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:s,value:n})},Qo=e=>{const t=parseFloat(e);return isNaN(t)?e:t},dr=e=>{const t=Qe(e)?Number(e):NaN;return isNaN(t)?e:t};let $l;const es=()=>$l||($l=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:typeof global!="undefined"?global:{});function Te(e){if(Ae(e)){const t={};for(let n=0;n{if(n){const s=n.split(vr);s.length>1&&(t[s[0].trim()]=s[1].trim())}}),t}function Z(e){let t="";if(Qe(e))t=e;else if(Ae(e))for(let n=0;nfn(n,t))}const Vi=e=>!!(e&&e.__v_isRef===!0),m=e=>Qe(e)?e:e==null?"":Ae(e)||ze(e)&&(e.toString===Pi||!je(e.toString))?Vi(e)?m(e.value):JSON.stringify(e,ji,2):String(e),ji=(e,t)=>Vi(t)?ji(e,t.value):dn(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[s,o],l)=>(n[fs(s,l)+" =>"]=o,n),{})}:Tn(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>fs(n))}:Bt(t)?fs(t):ze(t)&&!Ae(t)&&!Hi(t)?String(t):t,fs=(e,t="")=>{var n;return Bt(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};/** * @vue/reactivity v3.5.42 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT -**/let ct;class yr{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&&ct&&(ct.active?(this.parent=ct,this.index=(ct.scopes||(ct.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){const s=this.scopes.slice();for(t=0,n=s.length;t0&&--this._on===0){if(ct===this)ct=this.prevScope;else{let t=ct;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(to){let t=to;for(to=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;eo;){let t=eo;for(eo=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 zi(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Zi(e){let t,n=e.depsTail,s=n;for(;s;){const o=s.prevDep;s.version===-1?(s===n&&(n=o),nl(s),wr(s)):t=s,s.dep.activeLink=s.prevActiveLink,s.prevActiveLink=void 0,s=o}e.deps=t,e.depsTail=n}function Ds(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Gi(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function Gi(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===lo)||(e.globalVersion=lo,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!Ds(e))))return;e.flags|=2;const t=e.dep,n=We,s=Ht;We=e,Ht=!0;try{zi(e);const o=e.fn(e._value);(t.version===0||it(o,e._value))&&(e.flags|=128,e._value=o,t.version++)}catch(o){throw t.version++,o}finally{We=n,Ht=s,Zi(e),e.flags&=-3}}function nl(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)nl(l,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function wr(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 qi=[];function vn(){qi.push(Ht),Ht=!1}function pn(){const e=qi.pop();Ht=e===void 0?!0:e}function Ml(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=We;We=void 0;try{t()}finally{We=n}}}let lo=0;class xr{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 ts{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(!We||!Ht||We===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==We)n=this.activeLink=new xr(We,this),We.deps?(n.prevDep=We.depsTail,We.depsTail.nextDep=n,We.depsTail=n):We.deps=We.depsTail=n,Yi(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=We.depsTail,n.nextDep=void 0,We.depsTail.nextDep=n,We.depsTail=n,We.deps===n&&(We.deps=s)}return n}trigger(t){this.version++,lo++,this.notify(t)}notify(t){el();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{tl()}}}function Yi(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)Yi(s)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const Ns=new WeakMap,Cn=Symbol(""),Ps=Symbol(""),io=Symbol("");function ht(e,t,n){if(Ht&&We){let s=Ns.get(e);s||Ns.set(e,s=new Map);let o=s.get(n);o||(s.set(n,o=new ts),o.map=s,o.key=n),o.track()}}function Qt(e,t,n,s,o,l){const i=Ns.get(e);if(!i){lo++;return}const a=u=>{u&&u.trigger()};if(el(),t==="clear")i.forEach(a);else{const u=Ae(e),p=u&&Qs(n);if(u&&n==="length"){const f=Number(s);i.forEach((h,w)=>{(w==="length"||w===io||!Ft(w)&&w>=f)&&a(h)})}else switch((n!==void 0||i.has(void 0))&&a(i.get(n)),p&&a(i.get(io)),t){case"add":u?p&&a(i.get("length")):(a(i.get(Cn)),dn(e)&&a(i.get(Ps)));break;case"delete":u||(a(i.get(Cn)),dn(e)&&a(i.get(Ps)));break;case"set":dn(e)&&a(i.get(Cn));break}}tl()}function An(e){const t=Be(e);return t===e?t:(ht(t,"iterate",io),Nt(e)?t:t.map(Bt))}function ns(e){return ht(e=Be(e),"iterate",io),e}function Wt(e,t){return nn(e)?Vn(Sn(e)?Bt(t):t):Bt(t)}const $r={__proto__:null,[Symbol.iterator](){return ps(this,Symbol.iterator,e=>Wt(this,e))},concat(...e){return An(this).concat(...e.map(t=>Ae(t)?An(t):t))},entries(){return ps(this,"entries",e=>(e[1]=Wt(this,e[1]),e))},every(e,t){return qt(this,"every",e,t,void 0,arguments)},filter(e,t){return qt(this,"filter",e,t,n=>n.map(s=>Wt(this,s)),arguments)},find(e,t){return qt(this,"find",e,t,n=>Wt(this,n),arguments)},findIndex(e,t){return qt(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return qt(this,"findLast",e,t,n=>Wt(this,n),arguments)},findLastIndex(e,t){return qt(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return qt(this,"forEach",e,t,void 0,arguments)},includes(...e){return hs(this,"includes",e)},indexOf(...e){return hs(this,"indexOf",e)},join(e){return An(this).join(e)},lastIndexOf(...e){return hs(this,"lastIndexOf",e)},map(e,t){return qt(this,"map",e,t,void 0,arguments)},pop(){return zn(this,"pop")},push(...e){return zn(this,"push",e)},reduce(e,...t){return Cl(this,"reduce",e,t)},reduceRight(e,...t){return Cl(this,"reduceRight",e,t)},shift(){return zn(this,"shift")},some(e,t){return qt(this,"some",e,t,void 0,arguments)},splice(...e){return zn(this,"splice",e)},toReversed(){return An(this).toReversed()},toSorted(e){return An(this).toSorted(e)},toSpliced(...e){return An(this).toSpliced(...e)},unshift(...e){return zn(this,"unshift",e)},values(){return ps(this,"values",e=>Wt(this,e))}};function ps(e,t,n){const s=ns(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 Mr=Array.prototype;function qt(e,t,n,s,o,l){const i=ns(e),a=i!==e&&!Nt(e),u=i[t];if(u!==Mr[t]){const h=u.apply(e,l);return a?Bt(h):h}let p=n;i!==e&&(a?p=function(h,w){return n.call(this,Wt(e,h),w,e)}:n.length>2&&(p=function(h,w){return n.call(this,h,w,e)}));const f=u.call(i,p,s);return a&&o?o(f):f}function Cl(e,t,n,s){const o=ns(e),l=o!==e&&!Nt(e);let i=n,a=!1;o!==e&&(l?(a=s.length===0,i=function(p,f,h){return a&&(a=!1,p=Wt(e,p)),n.call(this,p,Wt(e,f),h,e)}):n.length>3&&(i=function(p,f,h){return n.call(this,p,f,h,e)}));const u=o[t](i,...s);return a?Wt(e,u):u}function hs(e,t,n){const s=Be(e);ht(s,"iterate",io);const o=s[t](...n);return(o===-1||o===!1)&&ll(n[0])?(n[0]=Be(n[0]),s[t](...n)):o}function zn(e,t,n=[]){vn(),el();const s=Be(e)[t].apply(e,n);return tl(),pn(),s}const Cr=Js("__proto__,__v_isRef,__isVue"),Xi=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(Ft));function Sr(e){Ft(e)||(e=String(e));const t=Be(this);return ht(t,"has",e),t.hasOwnProperty(e)}class Ji{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?Pr:na:l?ta:ea).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(s)?t:void 0;const i=Ae(t);if(!o){let u;if(i&&(u=$r[n]))return u;if(n==="hasOwnProperty")return Sr}const a=Reflect.get(t,n,Ct(t)?t:s);if((Ft(n)?Xi.has(n):Cr(n))||(o||ht(t,"get",n),l))return a;if(Ct(a)){const u=i&&Qs(n)?a:a.value;return o&&ze(u)?Bn(u):u}return ze(a)?o?Bn(a):mt(a):a}}class Qi extends Ji{constructor(t=!1){super(!1,t)}set(t,n,s,o){let l=t[n];const i=Ae(t)&&Qs(n);if(!this._isShallow){const p=nn(l);if(!Nt(s)&&!nn(s)&&(l=Be(l),s=Be(s)),!i&&Ct(l)&&!Ct(s))return p||(l.value=s),!0}const a=i?Number(n)e,go=e=>Reflect.getPrototypeOf(e);function Or(e,t,n){return function(...s){const o=this.__v_raw,l=Be(o),i=dn(l),a=e==="entries"||e===Symbol.iterator&&i,u=e==="keys"&&i,p=o[e](...s),f=n?Hs:t?Vn:Bt;return!t&&ht(l,"iterate",u?Ps:Cn),St(Object.create(p),{next(){const{value:h,done:w}=p.next();return w?{value:h,done:w}:{value:a?[f(h[0]),f(h[1])]:f(h),done:w}}})}}function bo(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function Ir(e,t){const n={get(o){const l=this.__v_raw,i=Be(l),a=Be(o);e||(it(o,a)&&ht(i,"get",o),ht(i,"get",a));const{has:u}=go(i),p=t?Hs:e?Vn:Bt;if(u.call(i,o))return p(l.get(o));if(u.call(i,a))return p(l.get(a));l!==i&&l.get(o)},get size(){const o=this.__v_raw;return!e&&ht(Be(o),"iterate",Cn),o.size},has(o){const l=this.__v_raw,i=Be(l),a=Be(o);return e||(it(o,a)&&ht(i,"has",o),ht(i,"has",a)),o===a?l.has(o):l.has(o)||l.has(a)},forEach(o,l){const i=this,a=i.__v_raw,u=Be(a),p=t?Hs:e?Vn:Bt;return!e&&ht(u,"iterate",Cn),a.forEach((f,h)=>o.call(l,p(f),p(h),i))}};return St(n,e?{add:bo("add"),set:bo("set"),delete:bo("delete"),clear:bo("clear")}:{add(o){const l=Be(this),i=go(l),a=Be(o),u=!t&&!Nt(o)&&!nn(o)?a:o;return i.has.call(l,u)||it(o,u)&&i.has.call(l,o)||it(a,u)&&i.has.call(l,a)||(l.add(u),Qt(l,"add",u,u)),this},set(o,l){!t&&!Nt(l)&&!nn(l)&&(l=Be(l));const i=Be(this),{has:a,get:u}=go(i);let p=a.call(i,o);p||(o=Be(o),p=a.call(i,o));const f=u.call(i,o);return i.set(o,l),p?it(l,f)&&Qt(i,"set",o,l):Qt(i,"add",o,l),this},delete(o){const l=Be(this),{has:i,get:a}=go(l);let u=i.call(l,o);u||(o=Be(o),u=i.call(l,o)),a&&a.call(l,o);const p=l.delete(o);return u&&Qt(l,"delete",o,void 0),p},clear(){const o=Be(this),l=o.size!==0,i=o.clear();return l&&Qt(o,"clear",void 0,void 0),i}}),["keys","values","entries",Symbol.iterator].forEach(o=>{n[o]=Or(o,e,t)}),n}function ol(e,t){const n=Ir(e,t);return(s,o,l)=>o==="__v_isReactive"?!e:o==="__v_isReadonly"?e:o==="__v_raw"?s:Reflect.get(Ke(n,o)&&o in s?n:s,o,l)}const Rr={get:ol(!1,!1)},Dr={get:ol(!1,!0)},Nr={get:ol(!0,!1)};const ea=new WeakMap,ta=new WeakMap,na=new WeakMap,Pr=new WeakMap;function Hr(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function mt(e){return nn(e)?e:sl(e,!1,Er,Rr,ea)}function Fr(e){return sl(e,!1,Lr,Dr,ta)}function Bn(e){return sl(e,!0,Ar,Nr,na)}function sl(e,t,n,s,o){if(!ze(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 i=Hr(rr(e));if(i===0)return e;const a=new Proxy(e,i===2?s:n);return o.set(e,a),a}function Sn(e){return nn(e)?Sn(e.__v_raw):!!(e&&e.__v_isReactive)}function nn(e){return!!(e&&e.__v_isReadonly)}function Nt(e){return!!(e&&e.__v_isShallow)}function ll(e){return e?!!e.__v_raw:!1}function Be(e){const t=e&&e.__v_raw;return t?Be(t):e}function Br(e){return!Ke(e,"__v_skip")&&Object.isExtensible(e)&&Fi(e,"__v_skip",!0),e}const Bt=e=>ze(e)?mt(e):e,Vn=e=>ze(e)?Bn(e):e;function Ct(e){return e?e.__v_isRef===!0:!1}function S(e){return oa(e,!1)}function at(e){return oa(e,!0)}function oa(e,t){return Ct(e)?e:new Vr(e,t)}class Vr{constructor(t,n){this.dep=new ts,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:Be(t),this._value=n?t:Bt(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)||nn(t);t=s?t:Be(t),it(t,n)&&(this._rawValue=t,this._value=s?t:Bt(t),this.dep.trigger())}}function M(e){return Ct(e)?e.value:e}const jr={get:(e,t,n)=>t==="__v_raw"?e:M(Reflect.get(e,t,n)),set:(e,t,n,s)=>{const o=e[t];return Ct(o)&&!Ct(n)?(o.value=n,!0):Reflect.set(e,t,n,s)}};function sa(e){return Sn(e)?e:new Proxy(e,jr)}class Ur{constructor(t){this.__v_isRef=!0,this._value=void 0;const n=this.dep=new ts,{get:s,set:o}=t(n.track.bind(n),n.trigger.bind(n));this._get=s,this._set=o}get value(){return this._value=this._get()}set value(t){this._set(t)}}function Kr(e){return new Ur(e)}class Wr{constructor(t,n,s){this.fn=t,this.setter=n,this._value=void 0,this.dep=new ts(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=lo-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=s}notify(){if(this.flags|=16,!(this.flags&8)&&We!==this)return Wi(this,!0),!0}get value(){const t=this.dep.track();return Gi(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function zr(e,t,n=!1){let s,o;return je(e)?s=e:(s=e.get,o=e.set),new Wr(s,o,n)}const _o={},Po=new WeakMap;let yn;function Zr(e,t=!1,n=yn){if(n){let s=Po.get(n);s||Po.set(n,s=[]),s.push(e)}}function Gr(e,t,n=Ve){const{immediate:s,deep:o,once:l,scheduler:i,augmentJob:a,call:u}=n,p=D=>o?D:Nt(D)||o===!1||o===0?en(D,1):en(D);let f,h,w,k,F=!1,A=!1;if(Ct(e)?(h=()=>e.value,F=Nt(e)):Sn(e)?(h=()=>p(e),F=!0):Ae(e)?(A=!0,F=e.some(D=>Sn(D)||Nt(D)),h=()=>e.map(D=>{if(Ct(D))return D.value;if(Sn(D))return p(D);if(je(D))return u?u(D,2):D()})):je(e)?t?h=u?()=>u(e,2):e:h=()=>{if(w){vn();try{w()}finally{pn()}}const D=yn;yn=f;try{return u?u(e,3,[k]):e(k)}finally{yn=D}}:h=Mn,t&&o){const D=h,N=o===!0?1/0:o;h=()=>en(D(),N)}const T=kr(),L=()=>{f.stop(),T&&T.active&&Di(T.effects,f)};if(l&&t){const D=t;t=(...N)=>{const q=D(...N);return L(),q}}let E=A?new Array(e.length).fill(_o):_o;const H=D=>{if(!(!(f.flags&1)||!f.dirty&&!D))if(t){const N=f.run();if(D||o||F||(A?N.some((q,W)=>it(q,E[W])):it(N,E))){w&&w();const q=yn;yn=f;try{const W=[N,E===_o?void 0:A&&E[0]===_o?[]:E,k];E=N,u?u(t,3,W):t(...W)}finally{yn=q}}}else f.run()};return a&&a(H),f=new Ui(h),f.scheduler=i?()=>i(H,!1):H,k=D=>Zr(D,!1,f),w=f.onStop=()=>{const D=Po.get(f);if(D){if(u)u(D,4);else for(const N of D)N();Po.delete(f)}},t?s?H(!0):E=f.run():i?i(H.bind(null,!0),!0):f.run(),L.pause=f.pause.bind(f),L.resume=f.resume.bind(f),L.stop=L,L}function en(e,t=1/0,n){if(t<=0||!ze(e)||e.__v_skip||(n=n||new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,Ct(e))en(e.value,t,n);else if(Ae(e))for(let s=0;s{en(s,t,n)});else if(Hi(e)){for(const s in e)en(e[s],t,n);for(const s of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,s)&&en(e[s],t,n)}return e}/** +**/let ct;class yr{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&&ct&&(ct.active?(this.parent=ct,this.index=(ct.scopes||(ct.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){const s=this.scopes.slice();for(t=0,n=s.length;t0&&--this._on===0){if(ct===this)ct=this.prevScope;else{let t=ct;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(to){let t=to;for(to=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;eo;){let t=eo;for(eo=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 zi(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Zi(e){let t,n=e.depsTail,s=n;for(;s;){const o=s.prevDep;s.version===-1?(s===n&&(n=o),nl(s),wr(s)):t=s,s.dep.activeLink=s.prevActiveLink,s.prevActiveLink=void 0,s=o}e.deps=t,e.depsTail=n}function Ds(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Gi(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function Gi(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===lo)||(e.globalVersion=lo,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!Ds(e))))return;e.flags|=2;const t=e.dep,n=We,s=Ht;We=e,Ht=!0;try{zi(e);const o=e.fn(e._value);(t.version===0||at(o,e._value))&&(e.flags|=128,e._value=o,t.version++)}catch(o){throw t.version++,o}finally{We=n,Ht=s,Zi(e),e.flags&=-3}}function nl(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)nl(l,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function wr(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 qi=[];function vn(){qi.push(Ht),Ht=!1}function pn(){const e=qi.pop();Ht=e===void 0?!0:e}function Ml(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=We;We=void 0;try{t()}finally{We=n}}}let lo=0;class $r{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 ts{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(!We||!Ht||We===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==We)n=this.activeLink=new $r(We,this),We.deps?(n.prevDep=We.depsTail,We.depsTail.nextDep=n,We.depsTail=n):We.deps=We.depsTail=n,Yi(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=We.depsTail,n.nextDep=void 0,We.depsTail.nextDep=n,We.depsTail=n,We.deps===n&&(We.deps=s)}return n}trigger(t){this.version++,lo++,this.notify(t)}notify(t){el();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{tl()}}}function Yi(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)Yi(s)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const Ns=new WeakMap,Cn=Symbol(""),Ps=Symbol(""),io=Symbol("");function ht(e,t,n){if(Ht&&We){let s=Ns.get(e);s||Ns.set(e,s=new Map);let o=s.get(n);o||(s.set(n,o=new ts),o.map=s,o.key=n),o.track()}}function Qt(e,t,n,s,o,l){const i=Ns.get(e);if(!i){lo++;return}const a=u=>{u&&u.trigger()};if(el(),t==="clear")i.forEach(a);else{const u=Ae(e),p=u&&Qs(n);if(u&&n==="length"){const f=Number(s);i.forEach((h,w)=>{(w==="length"||w===io||!Bt(w)&&w>=f)&&a(h)})}else switch((n!==void 0||i.has(void 0))&&a(i.get(n)),p&&a(i.get(io)),t){case"add":u?p&&a(i.get("length")):(a(i.get(Cn)),dn(e)&&a(i.get(Ps)));break;case"delete":u||(a(i.get(Cn)),dn(e)&&a(i.get(Ps)));break;case"set":dn(e)&&a(i.get(Cn));break}}tl()}function An(e){const t=Be(e);return t===e?t:(ht(t,"iterate",io),Nt(e)?t:t.map(Vt))}function ns(e){return ht(e=Be(e),"iterate",io),e}function zt(e,t){return nn(e)?Vn(Sn(e)?Vt(t):t):Vt(t)}const xr={__proto__:null,[Symbol.iterator](){return ps(this,Symbol.iterator,e=>zt(this,e))},concat(...e){return An(this).concat(...e.map(t=>Ae(t)?An(t):t))},entries(){return ps(this,"entries",e=>(e[1]=zt(this,e[1]),e))},every(e,t){return qt(this,"every",e,t,void 0,arguments)},filter(e,t){return qt(this,"filter",e,t,n=>n.map(s=>zt(this,s)),arguments)},find(e,t){return qt(this,"find",e,t,n=>zt(this,n),arguments)},findIndex(e,t){return qt(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return qt(this,"findLast",e,t,n=>zt(this,n),arguments)},findLastIndex(e,t){return qt(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return qt(this,"forEach",e,t,void 0,arguments)},includes(...e){return hs(this,"includes",e)},indexOf(...e){return hs(this,"indexOf",e)},join(e){return An(this).join(e)},lastIndexOf(...e){return hs(this,"lastIndexOf",e)},map(e,t){return qt(this,"map",e,t,void 0,arguments)},pop(){return zn(this,"pop")},push(...e){return zn(this,"push",e)},reduce(e,...t){return Cl(this,"reduce",e,t)},reduceRight(e,...t){return Cl(this,"reduceRight",e,t)},shift(){return zn(this,"shift")},some(e,t){return qt(this,"some",e,t,void 0,arguments)},splice(...e){return zn(this,"splice",e)},toReversed(){return An(this).toReversed()},toSorted(e){return An(this).toSorted(e)},toSpliced(...e){return An(this).toSpliced(...e)},unshift(...e){return zn(this,"unshift",e)},values(){return ps(this,"values",e=>zt(this,e))}};function ps(e,t,n){const s=ns(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 Mr=Array.prototype;function qt(e,t,n,s,o,l){const i=ns(e),a=i!==e&&!Nt(e),u=i[t];if(u!==Mr[t]){const h=u.apply(e,l);return a?Vt(h):h}let p=n;i!==e&&(a?p=function(h,w){return n.call(this,zt(e,h),w,e)}:n.length>2&&(p=function(h,w){return n.call(this,h,w,e)}));const f=u.call(i,p,s);return a&&o?o(f):f}function Cl(e,t,n,s){const o=ns(e),l=o!==e&&!Nt(e);let i=n,a=!1;o!==e&&(l?(a=s.length===0,i=function(p,f,h){return a&&(a=!1,p=zt(e,p)),n.call(this,p,zt(e,f),h,e)}):n.length>3&&(i=function(p,f,h){return n.call(this,p,f,h,e)}));const u=o[t](i,...s);return a?zt(e,u):u}function hs(e,t,n){const s=Be(e);ht(s,"iterate",io);const o=s[t](...n);return(o===-1||o===!1)&&ll(n[0])?(n[0]=Be(n[0]),s[t](...n)):o}function zn(e,t,n=[]){vn(),el();const s=Be(e)[t].apply(e,n);return tl(),pn(),s}const Cr=Js("__proto__,__v_isRef,__isVue"),Xi=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(Bt));function Sr(e){Bt(e)||(e=String(e));const t=Be(this);return ht(t,"has",e),t.hasOwnProperty(e)}class Ji{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?Pr:na:l?ta:ea).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(s)?t:void 0;const i=Ae(t);if(!o){let u;if(i&&(u=xr[n]))return u;if(n==="hasOwnProperty")return Sr}const a=Reflect.get(t,n,Ct(t)?t:s);if((Bt(n)?Xi.has(n):Cr(n))||(o||ht(t,"get",n),l))return a;if(Ct(a)){const u=i&&Qs(n)?a:a.value;return o&&ze(u)?Bn(u):u}return ze(a)?o?Bn(a):mt(a):a}}class Qi extends Ji{constructor(t=!1){super(!1,t)}set(t,n,s,o){let l=t[n];const i=Ae(t)&&Qs(n);if(!this._isShallow){const p=nn(l);if(!Nt(s)&&!nn(s)&&(l=Be(l),s=Be(s)),!i&&Ct(l)&&!Ct(s))return p||(l.value=s),!0}const a=i?Number(n)e,go=e=>Reflect.getPrototypeOf(e);function Or(e,t,n){return function(...s){const o=this.__v_raw,l=Be(o),i=dn(l),a=e==="entries"||e===Symbol.iterator&&i,u=e==="keys"&&i,p=o[e](...s),f=n?Hs:t?Vn:Vt;return!t&&ht(l,"iterate",u?Ps:Cn),St(Object.create(p),{next(){const{value:h,done:w}=p.next();return w?{value:h,done:w}:{value:a?[f(h[0]),f(h[1])]:f(h),done:w}}})}}function bo(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function Ir(e,t){const n={get(o){const l=this.__v_raw,i=Be(l),a=Be(o);e||(at(o,a)&&ht(i,"get",o),ht(i,"get",a));const{has:u}=go(i),p=t?Hs:e?Vn:Vt;if(u.call(i,o))return p(l.get(o));if(u.call(i,a))return p(l.get(a));l!==i&&l.get(o)},get size(){const o=this.__v_raw;return!e&&ht(Be(o),"iterate",Cn),o.size},has(o){const l=this.__v_raw,i=Be(l),a=Be(o);return e||(at(o,a)&&ht(i,"has",o),ht(i,"has",a)),o===a?l.has(o):l.has(o)||l.has(a)},forEach(o,l){const i=this,a=i.__v_raw,u=Be(a),p=t?Hs:e?Vn:Vt;return!e&&ht(u,"iterate",Cn),a.forEach((f,h)=>o.call(l,p(f),p(h),i))}};return St(n,e?{add:bo("add"),set:bo("set"),delete:bo("delete"),clear:bo("clear")}:{add(o){const l=Be(this),i=go(l),a=Be(o),u=!t&&!Nt(o)&&!nn(o)?a:o;return i.has.call(l,u)||at(o,u)&&i.has.call(l,o)||at(a,u)&&i.has.call(l,a)||(l.add(u),Qt(l,"add",u,u)),this},set(o,l){!t&&!Nt(l)&&!nn(l)&&(l=Be(l));const i=Be(this),{has:a,get:u}=go(i);let p=a.call(i,o);p||(o=Be(o),p=a.call(i,o));const f=u.call(i,o);return i.set(o,l),p?at(l,f)&&Qt(i,"set",o,l):Qt(i,"add",o,l),this},delete(o){const l=Be(this),{has:i,get:a}=go(l);let u=i.call(l,o);u||(o=Be(o),u=i.call(l,o)),a&&a.call(l,o);const p=l.delete(o);return u&&Qt(l,"delete",o,void 0),p},clear(){const o=Be(this),l=o.size!==0,i=o.clear();return l&&Qt(o,"clear",void 0,void 0),i}}),["keys","values","entries",Symbol.iterator].forEach(o=>{n[o]=Or(o,e,t)}),n}function ol(e,t){const n=Ir(e,t);return(s,o,l)=>o==="__v_isReactive"?!e:o==="__v_isReadonly"?e:o==="__v_raw"?s:Reflect.get(Ke(n,o)&&o in s?n:s,o,l)}const Rr={get:ol(!1,!1)},Dr={get:ol(!1,!0)},Nr={get:ol(!0,!1)};const ea=new WeakMap,ta=new WeakMap,na=new WeakMap,Pr=new WeakMap;function Hr(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function mt(e){return nn(e)?e:sl(e,!1,Er,Rr,ea)}function Fr(e){return sl(e,!1,Lr,Dr,ta)}function Bn(e){return sl(e,!0,Ar,Nr,na)}function sl(e,t,n,s,o){if(!ze(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 i=Hr(rr(e));if(i===0)return e;const a=new Proxy(e,i===2?s:n);return o.set(e,a),a}function Sn(e){return nn(e)?Sn(e.__v_raw):!!(e&&e.__v_isReactive)}function nn(e){return!!(e&&e.__v_isReadonly)}function Nt(e){return!!(e&&e.__v_isShallow)}function ll(e){return e?!!e.__v_raw:!1}function Be(e){const t=e&&e.__v_raw;return t?Be(t):e}function Br(e){return!Ke(e,"__v_skip")&&Object.isExtensible(e)&&Fi(e,"__v_skip",!0),e}const Vt=e=>ze(e)?mt(e):e,Vn=e=>ze(e)?Bn(e):e;function Ct(e){return e?e.__v_isRef===!0:!1}function C(e){return oa(e,!1)}function rt(e){return oa(e,!0)}function oa(e,t){return Ct(e)?e:new Vr(e,t)}class Vr{constructor(t,n){this.dep=new ts,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:Be(t),this._value=n?t:Vt(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)||nn(t);t=s?t:Be(t),at(t,n)&&(this._rawValue=t,this._value=s?t:Vt(t),this.dep.trigger())}}function M(e){return Ct(e)?e.value:e}const jr={get:(e,t,n)=>t==="__v_raw"?e:M(Reflect.get(e,t,n)),set:(e,t,n,s)=>{const o=e[t];return Ct(o)&&!Ct(n)?(o.value=n,!0):Reflect.set(e,t,n,s)}};function sa(e){return Sn(e)?e:new Proxy(e,jr)}class Ur{constructor(t){this.__v_isRef=!0,this._value=void 0;const n=this.dep=new ts,{get:s,set:o}=t(n.track.bind(n),n.trigger.bind(n));this._get=s,this._set=o}get value(){return this._value=this._get()}set value(t){this._set(t)}}function Kr(e){return new Ur(e)}class Wr{constructor(t,n,s){this.fn=t,this.setter=n,this._value=void 0,this.dep=new ts(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=lo-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=s}notify(){if(this.flags|=16,!(this.flags&8)&&We!==this)return Wi(this,!0),!0}get value(){const t=this.dep.track();return Gi(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function zr(e,t,n=!1){let s,o;return je(e)?s=e:(s=e.get,o=e.set),new Wr(s,o,n)}const _o={},Po=new WeakMap;let yn;function Zr(e,t=!1,n=yn){if(n){let s=Po.get(n);s||Po.set(n,s=[]),s.push(e)}}function Gr(e,t,n=Ve){const{immediate:s,deep:o,once:l,scheduler:i,augmentJob:a,call:u}=n,p=D=>o?D:Nt(D)||o===!1||o===0?en(D,1):en(D);let f,h,w,k,F=!1,A=!1;if(Ct(e)?(h=()=>e.value,F=Nt(e)):Sn(e)?(h=()=>p(e),F=!0):Ae(e)?(A=!0,F=e.some(D=>Sn(D)||Nt(D)),h=()=>e.map(D=>{if(Ct(D))return D.value;if(Sn(D))return p(D);if(je(D))return u?u(D,2):D()})):je(e)?t?h=u?()=>u(e,2):e:h=()=>{if(w){vn();try{w()}finally{pn()}}const D=yn;yn=f;try{return u?u(e,3,[k]):e(k)}finally{yn=D}}:h=Mn,t&&o){const D=h,N=o===!0?1/0:o;h=()=>en(D(),N)}const T=kr(),L=()=>{f.stop(),T&&T.active&&Di(T.effects,f)};if(l&&t){const D=t;t=(...N)=>{const q=D(...N);return L(),q}}let E=A?new Array(e.length).fill(_o):_o;const H=D=>{if(!(!(f.flags&1)||!f.dirty&&!D))if(t){const N=f.run();if(D||o||F||(A?N.some((q,W)=>at(q,E[W])):at(N,E))){w&&w();const q=yn;yn=f;try{const W=[N,E===_o?void 0:A&&E[0]===_o?[]:E,k];E=N,u?u(t,3,W):t(...W)}finally{yn=q}}}else f.run()};return a&&a(H),f=new Ui(h),f.scheduler=i?()=>i(H,!1):H,k=D=>Zr(D,!1,f),w=f.onStop=()=>{const D=Po.get(f);if(D){if(u)u(D,4);else for(const N of D)N();Po.delete(f)}},t?s?H(!0):E=f.run():i?i(H.bind(null,!0),!0):f.run(),L.pause=f.pause.bind(f),L.resume=f.resume.bind(f),L.stop=L,L}function en(e,t=1/0,n){if(t<=0||!ze(e)||e.__v_skip||(n=n||new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,Ct(e))en(e.value,t,n);else if(Ae(e))for(let s=0;s{en(s,t,n)});else if(Hi(e)){for(const s in e)en(e[s],t,n);for(const s of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,s)&&en(e[s],t,n)}return e}/** * @vue/runtime-core v3.5.42 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT -**/function mo(e,t,n,s){try{return s?e(...s):e()}catch(o){os(o,t,n)}}function Vt(e,t,n,s){if(je(e)){const o=mo(e,t,n,s);return o&&Ni(o)&&o.catch(l=>{os(l,t,n)}),o}if(Ae(e)){const o=[];for(let l=0;l>>1,o=$t[s],l=ao(o);l=ao(n)?$t.push(e):$t.splice(Yr(t),0,e),e.flags|=1,ia()}}function ia(){Ho||(Ho=la.then(ra))}function Xr(e){if(!Ae(e))rn&&e.id===-1?rn.splice(Ln+1,0,e):e.flags&1||(Pn.push(e),e.flags|=1);else for(let t=0;tao(n)-ao(s));if(Pn.length=0,rn){for(let n=0;ne.id==null?e.flags&2?-1:1/0:e.id;function ra(e){try{for(Kt=0;Kt<$t.length;Kt++){const t=$t[Kt];t&&!(t.flags&8)&&(t.flags&4&&(t.flags&=-2),mo(t,t.i,t.i?15:14),t.flags&4||(t.flags&=-2))}}finally{for(;Kt<$t.length;Kt++){const t=$t[Kt];t&&(t.flags&=-2)}Kt=-1,$t.length=0,aa(),Ho=null,($t.length||Pn.length)&&ra()}}let dt=null,ua=null;function Fo(e){const t=dt;return dt=e,ua=e&&e.type.__scopeId||null,t}function On(e,t=dt,n){if(!t||e._n)return e;const s=(...o)=>{s._d&&jo(-1);const l=Fo(t),i=tn.length;let a;try{a=e(...o)}finally{for(let u=tn.length;u>i;u--)dl();Fo(l),s._d&&jo(1)}return a};return s._n=!0,s._c=!0,s._d=!0,s}function xt(e,t){if(dt===null)return e;const n=us(dt),s=e.dirs||(e.dirs=[]);for(let o=0;o1)return n&&je(t)?t.call(s&&s.proxy):t}}const Qr=Symbol.for("v-scx"),eu=()=>Jr(Qr);function tu(e,t){return ca(e,null,{flush:"sync"})}function bt(e,t,n){return ca(e,t,n)}function ca(e,t,n=Ve){const{immediate:s,deep:o,flush:l,once:i}=n,a=St({},n),u=t&&s||!t&&l!=="post";let p;if(fo){if(l==="sync"){const k=eu();p=k.__watcherHandles||(k.__watcherHandles=[])}else if(!u){const k=()=>{};return k.stop=Mn,k.resume=Mn,k.pause=Mn,k}}const f=Gt;a.call=(k,F,A)=>Vt(k,f,F,A);let h=!1;l==="post"?a.scheduler=k=>{Et(k,f&&f.suspense)}:l!=="sync"&&(h=!0,a.scheduler=(k,F)=>{F?k():il(k)}),a.augmentJob=k=>{t&&(k.flags|=4),h&&(k.flags|=2,f&&(k.id=f.uid,k.i=f))};const w=Gr(e,t,a);return fo&&(p?p.push(w):u&&w()),w}const nu=Symbol("_vte"),ss=e=>e.__isTeleport,Dt=Symbol("_leaveCb"),Zn=Symbol("_enterCb");function ou(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return Lt(()=>{e.isMounted=!0}),ls(()=>{e.isUnmounting=!0}),e}const Rt=[Function,Array],da={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Rt,onEnter:Rt,onAfterEnter:Rt,onEnterCancelled:Rt,onBeforeLeave:Rt,onLeave:Rt,onAfterLeave:Rt,onLeaveCancelled:Rt,onBeforeAppear:Rt,onAppear:Rt,onAfterAppear:Rt,onAppearCancelled:Rt},fa=e=>{const t=e.subTree;return t.component?fa(t.component):t},su={name:"BaseTransition",props:da,setup(e,{slots:t}){const n=rs(),s=ou();return()=>{const o=t.default&&ha(t.default(),!0),l=o&&o.length?va(o):n.subTree?R():void 0;if(!l)return;const i=Be(e),{mode:a}=i;if(s.isLeaving)return ms(l);const u=Bo(l);if(!u)return ms(l);let p=Fs(u,i,s,n,h=>p=h);u.type!==gt&&ro(u,p);let f=n.subTree&&Bo(n.subTree);if(f&&f.type!==gt&&!kn(f,u)&&fa(n).type!==gt){let h=Fs(f,i,s,n);if(ro(f,h),a==="out-in"&&u.type!==gt)return s.isLeaving=!0,h.afterLeave=()=>{s.isLeaving=!1,n.job.flags&8||n.update(),delete h.afterLeave,f=void 0},ms(l);a==="in-out"&&u.type!==gt?h.delayLeave=(w,k,F)=>{const A=pa(s,f);A[String(f.key)]=f,w[Dt]=()=>{k(),w[Dt]=void 0,delete p.delayedLeave,f=void 0},p.delayedLeave=()=>{F(),delete p.delayedLeave,f=void 0}}:f=void 0}else f&&(f=void 0);return l}}};function va(e){let t=e[0];if(e.length>1){for(const n of e)if(n.type!==gt){t=n;break}}return t}const lu=su;function pa(e,t){const{leavingVNodes:n}=e;let s=n.get(t.type);return s||(s=Object.create(null),n.set(t.type,s)),s}function Fs(e,t,n,s,o){const{appear:l,mode:i,persisted:a=!1,onBeforeEnter:u,onEnter:p,onAfterEnter:f,onEnterCancelled:h,onBeforeLeave:w,onLeave:k,onAfterLeave:F,onLeaveCancelled:A,onBeforeAppear:T,onAppear:L,onAfterAppear:E,onAppearCancelled:H}=t,D=String(e.key),N=pa(n,e),q=(I,O)=>{I&&Vt(I,s,9,O)},W=(I,O)=>{const K=O[1];q(I,O),Ae(I)?I.every(V=>V.length<=1)&&K():I.length<=1&&K()},B={mode:i,persisted:a,beforeEnter(I){let O=u;if(!n.isMounted)if(l)O=T||u;else return;I[Dt]&&I[Dt](!0);const K=N[D];K&&kn(e,K)&&K.el[Dt]&&K.el[Dt](),q(O,[I])},enter(I){if(N[D]===e)return;let O=p,K=f,V=h;if(!n.isMounted)if(l)O=L||p,K=E||f,V=H||h;else return;let ge=!1;I[Zn]=se=>{ge||(ge=!0,se?q(V,[I]):q(K,[I]),B.delayedLeave&&B.delayedLeave(),I[Zn]=void 0)};const de=I[Zn].bind(null,!1);O?W(O,[I,de]):de()},leave(I,O){const K=String(e.key);if(I[Zn]&&I[Zn](!0),n.isUnmounting)return O();q(w,[I]);let V=!1;I[Dt]=de=>{V||(V=!0,O(),de?q(A,[I]):q(F,[I]),I[Dt]=void 0,N[K]===e&&delete N[K])};const ge=I[Dt].bind(null,!1);N[K]=e,k?W(k,[I,ge]):ge()},clone(I){const O=Fs(I,t,n,s,o);return o&&o(O),O}};return B}function ms(e){if(al(e))return e=hn(e),e.children=null,e}function Bo(e){if(!al(e))return ss(e.type)&&e.children?va(e.children):e;if(e.component)return e.component.subTree;const{shapeFlag:t,children:n}=e;if(n){if(t&16)return n[0];if(t&32&&je(n.default))return n.default()}}function ro(e,t){if(e.shapeFlag&6&&e.component){e.transition=t;const n=e.component.subTree;ro(ss(n.type)&&Bo(n)||n,t)}else e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function ha(e,t=!1,n){let s=[],o=0;for(let l=0;l1)for(let l=0;lno(A,t&&(Ae(t)?t[T]:t),n,s,o));return}if(Hn(s)&&!o){s.shapeFlag&512&&s.type.__asyncResolved&&s.component.subTree.component&&no(e,t,n,s.component.subTree);return}const l=s.shapeFlag&4?us(s.component):s.el,i=o?null:l,{i:a,r:u}=e,p=t&&t.r,f=a.refs===Ve?a.refs={}:a.refs,h=a.setupState,w=Be(h),k=h===Ve?Ri:A=>Tl(f,A)?!1:Ke(w,A),F=(A,T)=>!(T&&Tl(f,T));if(p!=null&&p!==u){if(El(t),Qe(p))f[p]=null,k(p)&&(h[p]=null);else if(Ct(p)){const A=t;F(p,A.k)&&(p.value=null),A.k&&(f[A.k]=null)}}if(je(u))mo(u,a,12,[i,f]);else{const A=Qe(u),T=Ct(u);if(A||T){const L=()=>{if(e.f){const E=A?k(u)?h[u]:f[u]:F()||!e.k?u.value:f[e.k];if(o)Ae(E)&&Di(E,l);else if(Ae(E))E.includes(l)||E.push(l);else if(A)f[u]=[l],k(u)&&(h[u]=f[u]);else{const H=[l];F(u,e.k)&&(u.value=H),e.k&&(f[e.k]=H)}}else A?(f[u]=i,k(u)&&(h[u]=i)):T&&(F(u,e.k)&&(u.value=i),e.k&&(f[e.k]=i))};if(i){const E=()=>{L(),Vo.delete(e)};E.id=-1,Vo.set(e,E),Et(E,n)}else El(e),L()}}}function El(e){const t=Vo.get(e);t&&(t.flags|=8,Vo.delete(e))}es().requestIdleCallback;es().cancelIdleCallback;const Hn=e=>!!e.type.__asyncLoader,al=e=>e.type.__isKeepAlive;function ma(e,t,n=Gt,s=!1){if(n){const o=n[e]||(n[e]=[]),l=t.__weh||(t.__weh=(...i)=>{vn();const a=fl(n),u=Vt(t,n,e,i);return a(),pn(),u});return s?o.unshift(l):o.push(l),l}}const rl=e=>(t,n=Gt)=>{(!fo||e==="sp")&&ma(e,(...s)=>t(...s),n)},Lt=rl("m"),ls=rl("bum"),rt=rl("um");function au(e,t=Gt){ma("ec",e,t)}const ru="components",ga=Symbol.for("v-ndc");function yo(e){return Qe(e)?uu(ru,e,!1)||e:e||ga}function uu(e,t,n=!0,s=!1){const o=dt||Gt;if(o){const l=o.type;{const a=ju(l,!1);if(a&&(a===t||a===yt(t)||a===Jo(yt(t))))return l}const i=Al(o[e]||l[e],t)||Al(o.appContext[e],t);return!i&&s?l:i}}function Al(e,t){return e&&(e[t]||e[yt(t)]||e[Jo(yt(t))])}function ve(e,t,n,s){let o;const l=n&&n[s],i=Ae(e);if(i||Qe(e)){const a=i&&Sn(e);let u=!1,p=!1;a&&(u=!Nt(e),p=nn(e),e=ns(e)),o=new Array(e.length);for(let f=0,h=e.length;ft(a,u,void 0,l&&l[u]));else{const a=Object.keys(e);o=new Array(a.length);for(let u=0,p=a.length;u0;return c(),pt(ne,null,[Xe("slot",p,s)],f?-2:64)}let i=e[t];i&&i._c&&(i._d=!1);const a=tn.length;c();let u;try{const p=i&&ba(i(n)),f=n.key||l||p&&p.key;u=pt(ne,{key:(f&&!Ft(f)?f:`_${t}`)+(!p&&s?"_fb":"")},p||(s?s():[]),p&&e._===1?64:-2)}catch(p){for(let f=tn.length;f>a;f--)dl();throw p}finally{i&&i._c&&(i._d=!0)}return u}function ba(e){return e.some(t=>uo(t)?!(t.type===gt||t.type===ne&&!ba(t.children)):!0)?e:null}const Bs=e=>e?Na(e)?us(e):Bs(e.parent):null,oo=St(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=>Bs(e.parent),$root:e=>Bs(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>e.type,$forceUpdate:e=>e.f||(e.f=()=>{il(e.update)}),$nextTick:e=>e.n||(e.n=ot.bind(e.proxy)),$watch:e=>Mn}),gs=(e,t)=>e!==Ve&&!e.__isScriptSetup&&Ke(e,t),du={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:s,data:o,props:l,accessCache:i,type:a,appContext:u}=e;if(t[0]!=="$"){const w=i[t];if(w!==void 0)switch(w){case 1:return s[t];case 2:return o[t];case 4:return n[t];case 3:return l[t]}else{if(gs(s,t))return i[t]=1,s[t];if(Ke(l,t))return i[t]=3,l[t];if(n!==Ve&&Ke(n,t))return i[t]=4,n[t];i[t]=0}}const p=oo[t];let f,h;if(p)return t==="$attrs"&&ht(e.attrs,"get",""),p(e);if((f=a.__cssModules)&&(f=f[t]))return f;if(n!==Ve&&Ke(n,t))return i[t]=4,n[t];if(h=u.config.globalProperties,Ke(h,t))return h[t]},set({_:e},t,n){const{data:s,setupState:o,ctx:l}=e;return gs(o,t)?(o[t]=n,!0):Ke(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:i}},a){let u;return!!(n[a]||gs(t,a)||Ke(l,a)||Ke(s,a)||Ke(oo,a)||Ke(o.config.globalProperties,a)||(u=i.__cssModules)&&u[a])},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:Ke(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function Ll(e){return Ae(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}function Ol(e,t){return!e||!t?e||t:Ae(e)&&Ae(t)?e.concat(t):St({},Ll(e),Ll(t))}function _a(){return{app:null,config:{isNativeTag:Ri,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let fu=0;function vu(e,t){return function(s,o=null){je(s)||(s=St({},s)),o!=null&&!ze(o)&&(o=null);const l=_a(),i=new WeakSet,a=[];let u=!1;const p=l.app={_uid:fu++,_component:s,_props:o,_container:null,_context:l,_instance:null,version:Wu,get config(){return l.config},set config(f){},use(f,...h){return i.has(f)||(f&&je(f.install)?(i.add(f),f.install(p,...h)):je(f)&&(i.add(f),f(p,...h))),p},mixin(f){return p},component(f,h){return h?(l.components[f]=h,p):l.components[f]},directive(f,h){return h?(l.directives[f]=h,p):l.directives[f]},mount(f,h,w){if(!u){const k=p._ceVNode||Xe(s,o);return k.appContext=l,w===!0?w="svg":w===!1&&(w=void 0),e(k,f,w),u=!0,p._container=f,f.__vue_app__=p,us(k.component)}},onUnmount(f){a.push(f)},unmount(){u&&(Vt(a,p._instance,16),e(null,p._container),delete p._container.__vue_app__)},provide(f,h){return l.provides[f]=h,p},runWithContext(f){const h=Fn;Fn=p;try{return f()}finally{Fn=h}}};return p}}let Fn=null;function pu(e,t,n=Ve){const s=rs(),o=yt(t),l=on(t),i=ya(e,o),a=Kr((u,p)=>{let f,h=Ve,w;return tu(()=>{const k=e[o];it(f,k)&&(f=k,p())}),{get(){return u(),n.get?n.get(f):f},set(k){const F=n.set?n.set(k):k;if(!it(F,f)&&!(h!==Ve&&it(k,h)))return;const A=s.vnode.props,T=!!(A&&(t in A||o in A||l in A)&&(`onUpdate:${t}`in A||`onUpdate:${o}`in A||`onUpdate:${l}`in A));T||(f=k,p()),s.emit(`update:${t}`,F),it(k,h)&&(it(k,F)&&!it(F,w)||T&&h!==Ve&&!it(F,f))&&p(),h=k,w=F}}});return a[Symbol.iterator]=()=>{let u=0;return{next(){return u<2?{value:u++?i||Ve:a,done:!1}:{done:!0}}}},a}const ya=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${yt(t)}Modifiers`]||e[`${on(t)}Modifiers`];function hu(e,t,...n){if(e.isUnmounted)return;const s=e.vnode.props||Ve;let o=n;const l=t.startsWith("update:"),i=l&&ya(s,t.slice(7));i&&(i.trim&&(o=n.map(f=>Qe(f)?f.trim():f)),i.number&&(o=o.map(Qo)));let a,u=s[a=ds(t)]||s[a=ds(yt(t))];!u&&l&&(u=s[a=ds(on(t))]),u&&Vt(u,e,6,o);const p=s[a+"Once"];if(p){if(!e.emitted)e.emitted={};else if(e.emitted[a])return;e.emitted[a]=!0,Vt(p,e,6,o)}}function mu(e,t,n=!1){const s=t.emitsCache,o=s.get(e);if(o!==void 0)return o;const l=e.emits;let i={};return l?(Ae(l)?l.forEach(a=>i[a]=null):St(i,l),ze(e)&&s.set(e,i),i):(ze(e)&&s.set(e,null),null)}function is(e,t){return!e||!qo(t)?!1:(t=t.slice(2),t=t==="Once"?t:t.replace(/Once$/,""),Ke(e,t[0].toLowerCase()+t.slice(1))||Ke(e,on(t))||Ke(e,t))}function Il(e){const{type:t,vnode:n,proxy:s,withProxy:o,propsOptions:[l],slots:i,attrs:a,emit:u,render:p,renderCache:f,props:h,data:w,setupState:k,ctx:F,inheritAttrs:A}=e,T=Fo(e);let L,E;try{if(n.shapeFlag&4){const D=o||s,N=D;L=zt(p.call(N,D,f,h,k,w,F)),E=a}else{const D=t;L=zt(D.length>1?D(h,{attrs:a,slots:i,emit:u}):D(h,null)),E=t.props?a:gu(a)}}catch(D){tn.length=0,os(D,e,1),L=Xe(gt)}let H=L;if(E&&A!==!1){const D=Object.keys(E),{shapeFlag:N}=H;D.length&&N&7&&(l&&D.some(Yo)&&(E=bu(E,l)),H=hn(H,E,!1,!0))}if(n.dirs&&(H=hn(H,null,!1,!0),H.dirs=H.dirs?H.dirs.concat(n.dirs):n.dirs),n.transition){const D=ss(H.type)&&Bo(H)||H;ro(D,n.transition)}return L=H,Fo(T),L}const gu=e=>{let t;for(const n in e)(n==="class"||n==="style"||qo(n))&&((t||(t={}))[n]=e[n]);return t},bu=(e,t)=>{const n={};for(const s in e)(!Yo(s)||!(s.slice(9)in t))&&(n[s]=e[s]);return n};function _u(e,t,n){const{props:s,children:o,component:l}=e,{props:i,children:a,patchFlag:u}=t,p=l.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&u>=0){if(u&1024)return!0;if(u&16)return s?Rl(s,i,p):!!i;if(u&8){const f=t.dynamicProps;for(let h=0;hObject.create(wa),$a=e=>Object.getPrototypeOf(e)===wa;function ku(e,t,n,s=!1){const o={},l=xa();e.propsDefaults=Object.create(null),Ma(e,t,o,l);for(const i in e.propsOptions[0])i in o||(o[i]=void 0);n?e.props=s?o:Fr(o):e.type.props?e.props=o:e.props=l,e.attrs=l}function wu(e,t,n,s){const{props:o,attrs:l,vnode:{patchFlag:i}}=e,a=Be(o),[u]=e.propsOptions;let p=!1;if((s||i>0)&&!(i&16)){if(i&8){const f=e.vnode.dynamicProps;for(let h=0;he==="_"||e==="_ctx"||e==="$stable",cl=e=>Ae(e)?e.map(zt):[zt(e)],$u=(e,t,n)=>{if(t._n)return t;const s=On((...o)=>cl(t(...o)),n);return s._c=!1,s},Ca=(e,t,n)=>{const s=e._ctx;for(const o in e){if(ul(o))continue;const l=e[o];if(je(l))t[o]=$u(o,l,s);else if(l!=null){const i=cl(l);t[o]=()=>i}}},Sa=(e,t)=>{const n=cl(t);e.slots.default=()=>n},Ta=(e,t,n)=>{for(const s in t)(n||!ul(s))&&(e[s]=t[s])},Mu=(e,t,n)=>{const s=e.slots=xa();if(e.vnode.shapeFlag&32){const o=t._;o?(Ta(s,t,n),n&&Fi(s,"_",o,!0)):Ca(t,s)}else t&&Sa(e,t)},Cu=(e,t,n)=>{const{vnode:s,slots:o}=e;let l=!0,i=Ve;if(s.shapeFlag&32){const a=t._;a?n&&a===1?l=!1:Ta(o,t,n):(l=!t.$stable,Ca(t,o)),i=t}else t&&(Sa(e,t),i={default:1});if(l)for(const a in o)!ul(a)&&i[a]==null&&delete o[a]},Et=Lu;function Su(e){return Tu(e)}function Tu(e,t){const n=es();n.__VUE__=!0;const{insert:s,remove:o,patchProp:l,createElement:i,createText:a,createComment:u,setText:p,setElementText:f,parentNode:h,nextSibling:w,setScopeId:k=Mn,insertStaticContent:F}=e,A=(g,x,_,P=null,j=null,Y=null,ue=void 0,ae=null,oe=!!x.dynamicChildren)=>{if(g===x)return;g&&!kn(g,x)&&(P=le(g),Me(g,j,Y,!0),g=null),x.patchFlag===-2&&(oe=!1,x.dynamicChildren=null);const{type:X,ref:we,shapeFlag:he}=x;switch(X){case as:T(g,x,_,P);break;case gt:L(g,x,_,P);break;case Io:g==null&&E(x,_,P,ue);break;case ne:V(g,x,_,P,j,Y,ue,ae,oe);break;default:he&1?N(g,x,_,P,j,Y,ue,ae,oe):he&6?ge(g,x,_,P,j,Y,ue,ae,oe):(he&64||he&128)&&X.process(g,x,_,P,j,Y,ue,ae,oe,pe)}we!=null&&j?no(we,g&&g.ref,Y,x||g,!x):we==null&&g&&g.ref!=null&&no(g.ref,null,Y,g,!0)},T=(g,x,_,P)=>{if(g==null)s(x.el=a(x.children),_,P);else{const j=x.el=g.el;x.children!==g.children&&p(j,x.children)}},L=(g,x,_,P)=>{g==null?s(x.el=u(x.children||""),_,P):x.el=g.el},E=(g,x,_,P)=>{[g.el,g.anchor]=F(g.children,x,_,P,g.el,g.anchor)},H=({el:g,anchor:x},_,P)=>{let j;for(;g&&g!==x;)j=w(g),s(g,_,P),g=j;s(x,_,P)},D=({el:g,anchor:x})=>{let _;for(;g&&g!==x;)_=w(g),o(g),g=_;o(x)},N=(g,x,_,P,j,Y,ue,ae,oe)=>{if(x.type==="svg"?ue="svg":x.type==="math"&&(ue="mathml"),g==null)q(x,_,P,j,Y,ue,ae,oe);else{const X=g.el&&g.el._isVueCE?g.el:null;try{X&&X._beginPatch(),I(g,x,j,Y,ue,ae,oe)}finally{X&&X._endPatch()}}},q=(g,x,_,P,j,Y,ue,ae)=>{let oe,X;const{props:we,shapeFlag:he,transition:ke,dirs:Se}=g;if(oe=g.el=i(g.type,Y,we&&we.is,we),he&8?f(oe,g.children):he&16&&B(g.children,oe,null,P,j,bs(g,Y),ue,ae),Se&&mn(g,null,P,"created"),W(oe,g,g.scopeId,ue,P),we){for(const _e in we)_e!=="value"&&!Qn(_e)&&l(oe,_e,null,we[_e],Y,P);"value"in we&&l(oe,"value",null,we.value,Y),(X=we.onVnodeBeforeMount)&&Ut(X,P,g)}Se&&mn(g,null,P,"beforeMount");const Te=Eu(j,ke);Te&&ke.beforeEnter(oe),s(oe,x,_),((X=we&&we.onVnodeMounted)||Te||Se)&&Et(()=>{try{X&&Ut(X,P,g),Te&&ke.enter(oe),Se&&mn(g,null,P,"mounted")}finally{}},j)},W=(g,x,_,P,j)=>{if(_&&k(g,_),P)for(let Y=0;Y{for(let X=oe;X{const ae=x.el=g.el;let{patchFlag:oe,dynamicChildren:X,dirs:we}=x;oe|=g.patchFlag&16;const he=g.props||Ve,ke=x.props||Ve;let Se;if(_&&gn(_,!1),(Se=ke.onVnodeBeforeUpdate)&&Ut(Se,_,x,g),we&&mn(x,g,_,"beforeUpdate"),_&&gn(_,!0),X&&(!g.dynamicChildren||g.dynamicChildren.length!==X.length)&&(oe=0,ue=!1,X=null),(he.innerHTML&&ke.innerHTML==null||he.textContent&&ke.textContent==null)&&f(ae,""),X?O(g.dynamicChildren,X,ae,_,P,bs(x,j),Y):ue||re(g,x,ae,null,_,P,bs(x,j),Y,!1),oe>0){if(oe&16)K(ae,he,ke,_,j);else if(oe&2&&he.class!==ke.class&&l(ae,"class",null,ke.class,j),oe&4&&l(ae,"style",he.style,ke.style,j),oe&8){const Te=x.dynamicProps;for(let _e=0;_e{Se&&Ut(Se,_,x,g),we&&mn(x,g,_,"updated")},P)},O=(g,x,_,P,j,Y,ue)=>{for(let ae=0;ae{if(x!==_){if(x!==Ve)for(const Y in x)!Qn(Y)&&!(Y in _)&&l(g,Y,x[Y],null,j,P);for(const Y in _){if(Qn(Y))continue;const ue=_[Y],ae=x[Y];ue!==ae&&Y!=="value"&&l(g,Y,ae,ue,j,P)}"value"in _&&l(g,"value",x.value,_.value,j)}},V=(g,x,_,P,j,Y,ue,ae,oe)=>{const X=x.el=g?g.el:a(""),we=x.anchor=g?g.anchor:a("");let{patchFlag:he,dynamicChildren:ke,slotScopeIds:Se}=x;Se&&(ae=ae?ae.concat(Se):Se),g==null?(s(X,_,P),s(we,_,P),B(x.children||[],_,we,j,Y,ue,ae,oe)):he>0&&he&64&&ke&&g.dynamicChildren&&g.dynamicChildren.length===ke.length?(O(g.dynamicChildren,ke,_,j,Y,ue,ae),(x.key!=null||j&&x===j.subTree)&&Ea(g,x,!0)):re(g,x,_,we,j,Y,ue,ae,oe)},ge=(g,x,_,P,j,Y,ue,ae,oe)=>{x.slotScopeIds=ae,g==null?x.shapeFlag&512?j.ctx.activate(x,_,P,ue,oe):de(x,_,P,j,Y,ue,oe):se(g,x,oe)},de=(g,x,_,P,j,Y,ue)=>{const ae=g.component=Pu(g,P,j);if(al(g)&&(ae.ctx.renderer=pe),Hu(ae,!1,ue),ae.asyncDep){if(j&&j.registerDep(ae,ie,ue),!g.el){const oe=ae.subTree=Xe(gt);L(null,oe,x,_),g.placeholder=oe.el}}else ie(ae,g,x,_,j,Y,ue)},se=(g,x,_)=>{const P=x.component=g.component;if(_u(g,x,_))if(P.asyncDep&&!P.asyncResolved){fe(P,x,_);return}else P.next=x,P.update();else x.el=g.el,P.vnode=x},ie=(g,x,_,P,j,Y,ue)=>{const ae=()=>{if(g.isMounted){let{next:he,bu:ke,u:Se,parent:Te,vnode:_e}=g;{const ut=Aa(g);if(ut){he&&(he.el=_e.el,fe(g,he,ue)),ut.asyncDep.then(()=>{Et(()=>{g.isUnmounted||X()},j)});return}}let Pe=he,Ue;gn(g,!1),he?(he.el=_e.el,fe(g,he,ue)):he=_e,ke&&Oo(ke),(Ue=he.props&&he.props.onVnodeBeforeUpdate)&&Ut(Ue,Te,he,_e),gn(g,!0);const Ye=Il(g),ft=g.subTree;g.subTree=Ye,A(ft,Ye,h(ft.el),le(ft),g,j,Y),he.el=Ye.el,Pe===null&&yu(g,Ye.el),Se&&Et(Se,j),(Ue=he.props&&he.props.onVnodeUpdated)&&Et(()=>Ut(Ue,Te,he,_e),j)}else{let he;const{el:ke,props:Se}=x,{bm:Te,m:_e,parent:Pe,root:Ue,type:Ye}=g,ft=Hn(x);gn(g,!1),Te&&Oo(Te),!ft&&(he=Se&&Se.onVnodeBeforeMount)&&Ut(he,Pe,x),gn(g,!0);{Ue.ce&&Ue.ce._hasShadowRoot()&&Ue.ce._injectChildStyle(Ye,g.parent?g.parent.type:void 0);const ut=g.subTree=Il(g);A(null,ut,_,P,g,j,Y),x.el=ut.el}if(_e&&Et(_e,j),!ft&&(he=Se&&Se.onVnodeMounted)){const ut=x;Et(()=>Ut(he,Pe,ut),j)}(x.shapeFlag&256||Pe&&Hn(Pe.vnode)&&Pe.vnode.shapeFlag&256)&&g.a&&Et(g.a,j),g.isMounted=!0,x=_=P=null}};g.scope.on();const oe=g.effect=new Ui(ae);g.scope.off();const X=g.update=oe.run.bind(oe),we=g.job=oe.runIfDirty.bind(oe);we.i=g,we.id=g.uid,oe.scheduler=()=>il(we),gn(g,!0),X()},fe=(g,x,_)=>{x.component=g;const P=g.vnode.props;g.vnode=x,g.next=null,wu(g,x.props,P,_),Cu(g,x.children,_),vn(),Sl(g),pn()},re=(g,x,_,P,j,Y,ue,ae,oe=!1)=>{const X=g&&g.children,we=g?g.shapeFlag:0,he=x.children,{patchFlag:ke,shapeFlag:Se}=x;if(ke>0){if(ke&128){te(X,he,_,P,j,Y,ue,ae,oe);return}else if(ke&256){Q(X,he,_,P,j,Y,ue,ae,oe);return}}Se&8?(we&16&&Ze(X,j,Y),he!==X&&f(_,he)):we&16?Se&16?te(X,he,_,P,j,Y,ue,ae,oe):Ze(X,j,Y,!0):(we&8&&f(_,""),Se&16&&B(he,_,P,j,Y,ue,ae,oe))},Q=(g,x,_,P,j,Y,ue,ae,oe)=>{g=g||Nn,x=x||Nn;const X=g.length,we=x.length,he=Math.min(X,we);let ke;for(ke=0;kewe?Ze(g,j,Y,!0,!1,he):B(x,_,P,j,Y,ue,ae,oe,he)},te=(g,x,_,P,j,Y,ue,ae,oe)=>{let X=0;const we=x.length;let he=g.length-1,ke=we-1;for(;X<=he&&X<=ke;){const Se=g[X],Te=x[X]=oe?Jt(x[X]):zt(x[X]);if(kn(Se,Te))A(Se,Te,_,null,j,Y,ue,ae,oe);else break;X++}for(;X<=he&&X<=ke;){const Se=g[he],Te=x[ke]=oe?Jt(x[ke]):zt(x[ke]);if(kn(Se,Te))A(Se,Te,_,null,j,Y,ue,ae,oe);else break;he--,ke--}if(X>he){if(X<=ke){const Se=ke+1,Te=Seke)for(;X<=he;)Me(g[X],j,Y,!0),X++;else{const Se=X,Te=X,_e=new Map;for(X=Te;X<=ke;X++){const tt=x[X]=oe?Jt(x[X]):zt(x[X]);tt.key!=null&&_e.set(tt.key,X)}let Pe,Ue=0;const Ye=ke-Te+1;let ft=!1,ut=0;const Tt=new Array(Ye);for(X=0;X=Ye){Me(tt,j,Y,!0);continue}let lt;if(tt.key!=null)lt=_e.get(tt.key);else for(Pe=Te;Pe<=ke;Pe++)if(Tt[Pe-Te]===0&&kn(tt,x[Pe])){lt=Pe;break}lt===void 0?Me(tt,j,Y,!0):(Tt[lt-Te]=X+1,lt>=ut?ut=lt:ft=!0,A(tt,x[lt],_,null,j,Y,ue,ae,oe),Ue++)}const Ot=ft?Au(Tt):Nn;for(Pe=Ot.length-1,X=Ye-1;X>=0;X--){const tt=Te+X,lt=x[tt],jt=x[tt+1],U=tt+1{const{el:Y,type:ue,transition:ae,children:oe,shapeFlag:X}=g;if(X&6){xe(g.component.subTree,x,_,P);return}if(X&128){g.suspense.move(x,_,P);return}if(X&64){ue.move(g,x,_,pe);return}if(ue===ne){s(Y,x,_);for(let he=0;heae.enter(Y),j));else{const{leave:he,delayLeave:ke,afterLeave:Se}=ae,Te=()=>{g.ctx.isUnmounted?o(Y):s(Y,x,_)},_e=()=>{const Pe=Y._isLeaving||!!Y[Dt];Y._isLeaving&&Y[Dt](!0),ae.persisted&&!Pe?Te():he(Y,()=>{Te(),Se&&Se()})};ke?ke(Y,Te,_e):_e()}else s(Y,x,_)},Me=(g,x,_,P=!1,j=!1)=>{const{type:Y,props:ue,ref:ae,children:oe,dynamicChildren:X,shapeFlag:we,patchFlag:he,dirs:ke,cacheIndex:Se,memo:Te}=g;if(he===-2&&(j=!1),ae!=null&&(vn(),no(ae,null,_,g,!0),pn()),Se!=null&&(x.renderCache[Se]=void 0),we&256){x.ctx.deactivate(g);return}const _e=we&1&&ke,Pe=!Hn(g);let Ue;if(Pe&&(Ue=ue&&ue.onVnodeBeforeUnmount)&&Ut(Ue,x,g),we&6)qe(g.component,_,P);else{if(we&128){g.suspense.unmount(_,P);return}_e&&mn(g,null,x,"beforeUnmount"),we&64?g.type.remove(g,x,_,pe,P):X&&!X.hasOnce&&(Y!==ne||he>0&&he&64)?Ze(X,x,_,!1,!0):(Y===ne&&he&384||!j&&we&16)&&Ze(oe,x,_),P&&Ne(g)}const Ye=Te!=null&&Se==null;(Pe&&(Ue=ue&&ue.onVnodeUnmounted)||_e||Ye)&&Et(()=>{Ue&&Ut(Ue,x,g),_e&&mn(g,null,x,"unmounted"),Ye&&(g.el=null)},_)},Ne=g=>{const{type:x,el:_,anchor:P,transition:j}=g;if(x===ne){Re(_,P);return}if(x===Io){D(g);return}const Y=()=>{o(_),j&&!j.persisted&&j.afterLeave&&j.afterLeave()};if(g.shapeFlag&1&&j&&!j.persisted){const{leave:ue,delayLeave:ae}=j,oe=()=>ue(_,Y);ae?ae(g.el,Y,oe):oe()}else Y()},Re=(g,x)=>{let _;for(;g!==x;)_=w(g),o(g),g=_;o(x)},qe=(g,x,_)=>{const{bum:P,scope:j,job:Y,subTree:ue,um:ae,m:oe,a:X}=g;Nl(oe),Nl(X),P&&Oo(P),j.stop(),Y&&(Y.flags|=8,Me(ue,g,x,_)),ae&&Et(ae,x),Et(()=>{g.isUnmounted=!0},x)},Ze=(g,x,_,P=!1,j=!1,Y=0)=>{for(let ue=Y;ue{if(g.shapeFlag&6)return le(g.component.subTree);if(g.shapeFlag&128)return g.suspense.next();const x=w(g.anchor||g.el),_=x&&x[nu];return _?w(_):x};let Ce=!1;const C=(g,x,_)=>{let P;g==null?x._vnode&&(Me(x._vnode,null,null,!0),P=x._vnode.component):A(x._vnode||null,g,x,null,null,null,_),x._vnode=g,Ce||(Ce=!0,Sl(P),aa(),Ce=!1)},pe={p:A,um:Me,m:xe,r:Ne,mt:de,mc:B,pc:re,pbc:O,n:le,o:e};return{render:C,hydrate:void 0,createApp:vu(C)}}function bs({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 gn({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function Eu(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function Ea(e,t,n=!1){const s=e.children,o=t.children;if(Ae(s)&&Ae(o))for(let l=0;l>1,e[n[a]]0&&(t[s]=n[l-1]),n[l]=s)}}for(l=n.length,i=n[l-1];l-- >0;)n[l]=i,i=t[i];return n}function Aa(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Aa(t)}function Nl(e){if(e)for(let t=0;te.__isSuspense;function Lu(e,t){t&&t.pendingBranch?Ae(e)?t.effects.push(...e):t.effects.push(e):Xr(e)}const ne=Symbol.for("v-fgt"),as=Symbol.for("v-txt"),gt=Symbol.for("v-cmt"),Io=Symbol.for("v-stc"),tn=[];let Mt=null;function c(e=!1){tn.push(Mt=e?null:[])}function dl(){tn.pop(),Mt=tn[tn.length-1]||null}let jn=1;function jo(e,t=!1){jn+=e,e<0&&Mt&&t&&(Mt.hasOnce=!0)}function Ia(e){return e.dynamicChildren=jn>0?Mt||Nn:null,dl(),jn>0&&Mt&&Mt.push(e),e}function d(e,t,n,s,o,l){return Ia(r(e,t,n,s,o,l,!0))}function pt(e,t,n,s,o){return Ia(Xe(e,t,n,s,o,!0))}function uo(e){return e?e.__v_isVNode===!0:!1}function kn(e,t){return e.type===t.type&&e.key===t.key}const Ra=({key:e})=>e!=null?e:null,Ro=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?Qe(e)||Ct(e)||je(e)?{i:dt,r:e,k:t,f:!!n}:e:null);function r(e,t=null,n=null,s=0,o=null,l=e===ne?0:1,i=!1,a=!1){const u={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Ra(t),ref:t&&Ro(t),scopeId:ua,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:dt};return a?(Uo(u,n),l&128&&e.normalize(u)):n&&(u.shapeFlag|=Qe(n)?8:16),jn>0&&!i&&Mt&&(u.patchFlag>0||l&6)&&u.patchFlag!==32&&Mt.push(u),u}const Xe=Ou;function Ou(e,t=null,n=null,s=0,o=null,l=!1){if((!e||e===ga)&&(e=gt),uo(e)){const a=hn(e,t,!0);return n&&Uo(a,n),jn>0&&!l&&Mt&&(a.shapeFlag&6?Mt[Mt.indexOf(e)]=a:Mt.push(a)),a.patchFlag=-2,a}if(Uu(e)&&(e=e.__vccOpts),t){t=Iu(t);let{class:a,style:u}=t;a&&!Qe(a)&&(t.class=Z(a)),ze(u)&&(ll(u)&&!Ae(u)&&(u=St({},u)),t.style=Ee(u))}const i=Qe(e)?1:Oa(e)?128:ss(e)?64:ze(e)?4:je(e)?2:0;return r(e,t,n,s,o,i,l,!0)}function Iu(e){return e?ll(e)||$a(e)?St({},e):e:null}function hn(e,t,n=!1,s=!1){const{props:o,ref:l,patchFlag:i,children:a,transition:u}=e,p=t?Ru(o||{},t):o,f={__v_isVNode:!0,__v_skip:!0,type:e.type,props:p,key:p&&Ra(p),ref:t&&t.ref?n&&l?Ae(l)?l.concat(Ro(t)):[l,Ro(t)]:Ro(t):l,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:a,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==ne?i===-1?16:i|16:i,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:u,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&hn(e.ssContent),ssFallback:e.ssFallback&&hn(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return u&&s&&ro(f,u.clone(f)),f}function Zt(e=" ",t=0){return Xe(as,null,e,t)}function Da(e,t){const n=Xe(Io,null,e);return n.staticCount=t,n}function R(e="",t=!1){return t?(c(),pt(gt,null,e)):Xe(gt,null,e)}function zt(e){return e==null||typeof e=="boolean"?Xe(gt):Ae(e)?Xe(ne,null,e.slice()):uo(e)?Jt(e):Xe(as,null,String(e))}function Jt(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:hn(e)}function Uo(e,t){let n=0;const{shapeFlag:s}=e;if(t==null)t=null;else if(Ae(t))n=16;else if(typeof t=="object")if(s&65){const o=t.default;o&&(o._c&&(o._d=!1),Uo(e,o()),o._c&&(o._d=!0));return}else{n=32;const o=t._;!o&&!$a(t)?t._ctx=dt:o===3&&dt&&(dt.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else if(je(t)){if(s&65){Uo(e,{default:t});return}t={default:t,_ctx:dt},n=32}else t=String(t),s&64?(n=16,t=[Zt(t)]):n=8;e.children=t,e.shapeFlag|=n}function Ru(...e){const t={};for(let n=0;nGt||dt;let Ko,co;{const e=es(),t=(n,s)=>{let o;return(o=e[n])||(o=e[n]=[]),o.push(s),l=>{o.length>1?o.forEach(i=>i(l)):o[0](l)}};Ko=t("__VUE_INSTANCE_SETTERS__",n=>Gt=n),co=t("__VUE_SSR_SETTERS__",n=>fo=n)}const fl=e=>{const t=Gt;return Ko(e),e.scope.on(),()=>{e.scope.off(),Ko(t)}},Pl=()=>{Gt&&Gt.scope.off(),Ko(null)};function Na(e){return e.vnode.shapeFlag&4}let fo=!1;function Hu(e,t=!1,n=!1){t&&co(t);const{props:s,children:o}=e.vnode,l=Na(e);ku(e,s,l,t),Mu(e,o,n||t);const i=l?Fu(e,t):void 0;return t&&co(!1),i}function Fu(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,du);const{setup:s}=n;if(s){vn();const o=e.setupContext=s.length>1?Vu(e):null,l=fl(e),i=mo(s,e,0,[e.props,o]),a=Ni(i);if(pn(),l(),(a||e.sp)&&!Hn(e)&&iu(e),a){if(i.then(Pl,Pl),t)return i.then(u=>{co(!0);try{Hl(e,u,t)}finally{co(!1)}}).catch(u=>{os(u,e,0)});e.asyncDep=i}else Hl(e,i)}else Pa(e)}function Hl(e,t,n){je(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:ze(t)&&(e.setupState=sa(t)),Pa(e)}function Pa(e,t,n){const s=e.type;e.render||(e.render=s.render||Mn)}const Bu={get(e,t){return ht(e,"get",""),e[t]}};function Vu(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,Bu),slots:e.slots,emit:e.emit,expose:t}}function us(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(sa(Br(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in oo)return oo[n](e)},has(t,n){return n in t||n in oo}})):e.proxy}function ju(e,t=!0){return je(e)?e.displayName||e.name:e.name||t&&e.__name}function Uu(e){return je(e)&&"__vccOpts"in e}const J=(e,t)=>zr(e,t,fo);function Ku(e,t,n){try{jo(-1);const s=arguments.length;return s===2?ze(t)&&!Ae(t)?uo(t)?Xe(e,null,[t]):Xe(e,t):Xe(e,null,t):(s>3?n=Array.prototype.slice.call(arguments,2):s===3&&uo(n)&&(n=[n]),Xe(e,t,n))}finally{jo(1)}}function Fl(e,t){const n=e.memo;if(n.length!=t.length)return!1;for(let s=0;s0&&Mt&&Mt.push(e),!0}const Wu="3.5.42";/** +**/function mo(e,t,n,s){try{return s?e(...s):e()}catch(o){os(o,t,n)}}function jt(e,t,n,s){if(je(e)){const o=mo(e,t,n,s);return o&&Ni(o)&&o.catch(l=>{os(l,t,n)}),o}if(Ae(e)){const o=[];for(let l=0;l>>1,o=xt[s],l=ao(o);l=ao(n)?xt.push(e):xt.splice(Yr(t),0,e),e.flags|=1,ia()}}function ia(){Ho||(Ho=la.then(ra))}function Xr(e){if(!Ae(e))rn&&e.id===-1?rn.splice(Ln+1,0,e):e.flags&1||(Pn.push(e),e.flags|=1);else for(let t=0;tao(n)-ao(s));if(Pn.length=0,rn){for(let n=0;ne.id==null?e.flags&2?-1:1/0:e.id;function ra(e){try{for(Wt=0;Wt{s._d&&jo(-1);const l=Fo(t),i=tn.length;let a;try{a=e(...o)}finally{for(let u=tn.length;u>i;u--)dl();Fo(l),s._d&&jo(1)}return a};return s._n=!0,s._c=!0,s._d=!0,s}function $t(e,t){if(dt===null)return e;const n=us(dt),s=e.dirs||(e.dirs=[]);for(let o=0;o1)return n&&je(t)?t.call(s&&s.proxy):t}}const Qr=Symbol.for("v-scx"),eu=()=>Jr(Qr);function tu(e,t){return ca(e,null,{flush:"sync"})}function bt(e,t,n){return ca(e,t,n)}function ca(e,t,n=Ve){const{immediate:s,deep:o,flush:l,once:i}=n,a=St({},n),u=t&&s||!t&&l!=="post";let p;if(fo){if(l==="sync"){const k=eu();p=k.__watcherHandles||(k.__watcherHandles=[])}else if(!u){const k=()=>{};return k.stop=Mn,k.resume=Mn,k.pause=Mn,k}}const f=Gt;a.call=(k,F,A)=>jt(k,f,F,A);let h=!1;l==="post"?a.scheduler=k=>{Et(k,f&&f.suspense)}:l!=="sync"&&(h=!0,a.scheduler=(k,F)=>{F?k():il(k)}),a.augmentJob=k=>{t&&(k.flags|=4),h&&(k.flags|=2,f&&(k.id=f.uid,k.i=f))};const w=Gr(e,t,a);return fo&&(p?p.push(w):u&&w()),w}const nu=Symbol("_vte"),ss=e=>e.__isTeleport,Dt=Symbol("_leaveCb"),Zn=Symbol("_enterCb");function ou(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return Lt(()=>{e.isMounted=!0}),ls(()=>{e.isUnmounting=!0}),e}const Rt=[Function,Array],da={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Rt,onEnter:Rt,onAfterEnter:Rt,onEnterCancelled:Rt,onBeforeLeave:Rt,onLeave:Rt,onAfterLeave:Rt,onLeaveCancelled:Rt,onBeforeAppear:Rt,onAppear:Rt,onAfterAppear:Rt,onAppearCancelled:Rt},fa=e=>{const t=e.subTree;return t.component?fa(t.component):t},su={name:"BaseTransition",props:da,setup(e,{slots:t}){const n=rs(),s=ou();return()=>{const o=t.default&&ha(t.default(),!0),l=o&&o.length?va(o):n.subTree?R():void 0;if(!l)return;const i=Be(e),{mode:a}=i;if(s.isLeaving)return ms(l);const u=Bo(l);if(!u)return ms(l);let p=Fs(u,i,s,n,h=>p=h);u.type!==gt&&ro(u,p);let f=n.subTree&&Bo(n.subTree);if(f&&f.type!==gt&&!kn(f,u)&&fa(n).type!==gt){let h=Fs(f,i,s,n);if(ro(f,h),a==="out-in"&&u.type!==gt)return s.isLeaving=!0,h.afterLeave=()=>{s.isLeaving=!1,n.job.flags&8||n.update(),delete h.afterLeave,f=void 0},ms(l);a==="in-out"&&u.type!==gt?h.delayLeave=(w,k,F)=>{const A=pa(s,f);A[String(f.key)]=f,w[Dt]=()=>{k(),w[Dt]=void 0,delete p.delayedLeave,f=void 0},p.delayedLeave=()=>{F(),delete p.delayedLeave,f=void 0}}:f=void 0}else f&&(f=void 0);return l}}};function va(e){let t=e[0];if(e.length>1){for(const n of e)if(n.type!==gt){t=n;break}}return t}const lu=su;function pa(e,t){const{leavingVNodes:n}=e;let s=n.get(t.type);return s||(s=Object.create(null),n.set(t.type,s)),s}function Fs(e,t,n,s,o){const{appear:l,mode:i,persisted:a=!1,onBeforeEnter:u,onEnter:p,onAfterEnter:f,onEnterCancelled:h,onBeforeLeave:w,onLeave:k,onAfterLeave:F,onLeaveCancelled:A,onBeforeAppear:T,onAppear:L,onAfterAppear:E,onAppearCancelled:H}=t,D=String(e.key),N=pa(n,e),q=(I,O)=>{I&&jt(I,s,9,O)},W=(I,O)=>{const K=O[1];q(I,O),Ae(I)?I.every(V=>V.length<=1)&&K():I.length<=1&&K()},B={mode:i,persisted:a,beforeEnter(I){let O=u;if(!n.isMounted)if(l)O=T||u;else return;I[Dt]&&I[Dt](!0);const K=N[D];K&&kn(e,K)&&K.el[Dt]&&K.el[Dt](),q(O,[I])},enter(I){if(N[D]===e)return;let O=p,K=f,V=h;if(!n.isMounted)if(l)O=L||p,K=E||f,V=H||h;else return;let be=!1;I[Zn]=se=>{be||(be=!0,se?q(V,[I]):q(K,[I]),B.delayedLeave&&B.delayedLeave(),I[Zn]=void 0)};const de=I[Zn].bind(null,!1);O?W(O,[I,de]):de()},leave(I,O){const K=String(e.key);if(I[Zn]&&I[Zn](!0),n.isUnmounting)return O();q(w,[I]);let V=!1;I[Dt]=de=>{V||(V=!0,O(),de?q(A,[I]):q(F,[I]),I[Dt]=void 0,N[K]===e&&delete N[K])};const be=I[Dt].bind(null,!1);N[K]=e,k?W(k,[I,be]):be()},clone(I){const O=Fs(I,t,n,s,o);return o&&o(O),O}};return B}function ms(e){if(al(e))return e=hn(e),e.children=null,e}function Bo(e){if(!al(e))return ss(e.type)&&e.children?va(e.children):e;if(e.component)return e.component.subTree;const{shapeFlag:t,children:n}=e;if(n){if(t&16)return n[0];if(t&32&&je(n.default))return n.default()}}function ro(e,t){if(e.shapeFlag&6&&e.component){e.transition=t;const n=e.component.subTree;ro(ss(n.type)&&Bo(n)||n,t)}else e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function ha(e,t=!1,n){let s=[],o=0;for(let l=0;l1)for(let l=0;lno(A,t&&(Ae(t)?t[T]:t),n,s,o));return}if(Hn(s)&&!o){s.shapeFlag&512&&s.type.__asyncResolved&&s.component.subTree.component&&no(e,t,n,s.component.subTree);return}const l=s.shapeFlag&4?us(s.component):s.el,i=o?null:l,{i:a,r:u}=e,p=t&&t.r,f=a.refs===Ve?a.refs={}:a.refs,h=a.setupState,w=Be(h),k=h===Ve?Ri:A=>Tl(f,A)?!1:Ke(w,A),F=(A,T)=>!(T&&Tl(f,T));if(p!=null&&p!==u){if(El(t),Qe(p))f[p]=null,k(p)&&(h[p]=null);else if(Ct(p)){const A=t;F(p,A.k)&&(p.value=null),A.k&&(f[A.k]=null)}}if(je(u))mo(u,a,12,[i,f]);else{const A=Qe(u),T=Ct(u);if(A||T){const L=()=>{if(e.f){const E=A?k(u)?h[u]:f[u]:F()||!e.k?u.value:f[e.k];if(o)Ae(E)&&Di(E,l);else if(Ae(E))E.includes(l)||E.push(l);else if(A)f[u]=[l],k(u)&&(h[u]=f[u]);else{const H=[l];F(u,e.k)&&(u.value=H),e.k&&(f[e.k]=H)}}else A?(f[u]=i,k(u)&&(h[u]=i)):T&&(F(u,e.k)&&(u.value=i),e.k&&(f[e.k]=i))};if(i){const E=()=>{L(),Vo.delete(e)};E.id=-1,Vo.set(e,E),Et(E,n)}else El(e),L()}}}function El(e){const t=Vo.get(e);t&&(t.flags|=8,Vo.delete(e))}es().requestIdleCallback;es().cancelIdleCallback;const Hn=e=>!!e.type.__asyncLoader,al=e=>e.type.__isKeepAlive;function ma(e,t,n=Gt,s=!1){if(n){const o=n[e]||(n[e]=[]),l=t.__weh||(t.__weh=(...i)=>{vn();const a=fl(n),u=jt(t,n,e,i);return a(),pn(),u});return s?o.unshift(l):o.push(l),l}}const rl=e=>(t,n=Gt)=>{(!fo||e==="sp")&&ma(e,(...s)=>t(...s),n)},Lt=rl("m"),ls=rl("bum"),lt=rl("um");function au(e,t=Gt){ma("ec",e,t)}const ru="components",ga=Symbol.for("v-ndc");function yo(e){return Qe(e)?uu(ru,e,!1)||e:e||ga}function uu(e,t,n=!0,s=!1){const o=dt||Gt;if(o){const l=o.type;{const a=ju(l,!1);if(a&&(a===t||a===yt(t)||a===Jo(yt(t))))return l}const i=Al(o[e]||l[e],t)||Al(o.appContext[e],t);return!i&&s?l:i}}function Al(e,t){return e&&(e[t]||e[yt(t)]||e[Jo(yt(t))])}function ve(e,t,n,s){let o;const l=n&&n[s],i=Ae(e);if(i||Qe(e)){const a=i&&Sn(e);let u=!1,p=!1;a&&(u=!Nt(e),p=nn(e),e=ns(e)),o=new Array(e.length);for(let f=0,h=e.length;ft(a,u,void 0,l&&l[u]));else{const a=Object.keys(e);o=new Array(a.length);for(let u=0,p=a.length;u0;return c(),pt(ne,null,[Xe("slot",p,s)],f?-2:64)}let i=e[t];i&&i._c&&(i._d=!1);const a=tn.length;c();let u;try{const p=i&&ba(i(n)),f=n.key||l||p&&p.key;u=pt(ne,{key:(f&&!Bt(f)?f:`_${t}`)+(!p&&s?"_fb":"")},p||(s?s():[]),p&&e._===1?64:-2)}catch(p){for(let f=tn.length;f>a;f--)dl();throw p}finally{i&&i._c&&(i._d=!0)}return u}function ba(e){return e.some(t=>uo(t)?!(t.type===gt||t.type===ne&&!ba(t.children)):!0)?e:null}const Bs=e=>e?Na(e)?us(e):Bs(e.parent):null,oo=St(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=>Bs(e.parent),$root:e=>Bs(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>e.type,$forceUpdate:e=>e.f||(e.f=()=>{il(e.update)}),$nextTick:e=>e.n||(e.n=st.bind(e.proxy)),$watch:e=>Mn}),gs=(e,t)=>e!==Ve&&!e.__isScriptSetup&&Ke(e,t),du={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:s,data:o,props:l,accessCache:i,type:a,appContext:u}=e;if(t[0]!=="$"){const w=i[t];if(w!==void 0)switch(w){case 1:return s[t];case 2:return o[t];case 4:return n[t];case 3:return l[t]}else{if(gs(s,t))return i[t]=1,s[t];if(Ke(l,t))return i[t]=3,l[t];if(n!==Ve&&Ke(n,t))return i[t]=4,n[t];i[t]=0}}const p=oo[t];let f,h;if(p)return t==="$attrs"&&ht(e.attrs,"get",""),p(e);if((f=a.__cssModules)&&(f=f[t]))return f;if(n!==Ve&&Ke(n,t))return i[t]=4,n[t];if(h=u.config.globalProperties,Ke(h,t))return h[t]},set({_:e},t,n){const{data:s,setupState:o,ctx:l}=e;return gs(o,t)?(o[t]=n,!0):Ke(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:i}},a){let u;return!!(n[a]||gs(t,a)||Ke(l,a)||Ke(s,a)||Ke(oo,a)||Ke(o.config.globalProperties,a)||(u=i.__cssModules)&&u[a])},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:Ke(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function Ll(e){return Ae(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}function Ol(e,t){return!e||!t?e||t:Ae(e)&&Ae(t)?e.concat(t):St({},Ll(e),Ll(t))}function _a(){return{app:null,config:{isNativeTag:Ri,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let fu=0;function vu(e,t){return function(s,o=null){je(s)||(s=St({},s)),o!=null&&!ze(o)&&(o=null);const l=_a(),i=new WeakSet,a=[];let u=!1;const p=l.app={_uid:fu++,_component:s,_props:o,_container:null,_context:l,_instance:null,version:Wu,get config(){return l.config},set config(f){},use(f,...h){return i.has(f)||(f&&je(f.install)?(i.add(f),f.install(p,...h)):je(f)&&(i.add(f),f(p,...h))),p},mixin(f){return p},component(f,h){return h?(l.components[f]=h,p):l.components[f]},directive(f,h){return h?(l.directives[f]=h,p):l.directives[f]},mount(f,h,w){if(!u){const k=p._ceVNode||Xe(s,o);return k.appContext=l,w===!0?w="svg":w===!1&&(w=void 0),e(k,f,w),u=!0,p._container=f,f.__vue_app__=p,us(k.component)}},onUnmount(f){a.push(f)},unmount(){u&&(jt(a,p._instance,16),e(null,p._container),delete p._container.__vue_app__)},provide(f,h){return l.provides[f]=h,p},runWithContext(f){const h=Fn;Fn=p;try{return f()}finally{Fn=h}}};return p}}let Fn=null;function pu(e,t,n=Ve){const s=rs(),o=yt(t),l=on(t),i=ya(e,o),a=Kr((u,p)=>{let f,h=Ve,w;return tu(()=>{const k=e[o];at(f,k)&&(f=k,p())}),{get(){return u(),n.get?n.get(f):f},set(k){const F=n.set?n.set(k):k;if(!at(F,f)&&!(h!==Ve&&at(k,h)))return;const A=s.vnode.props,T=!!(A&&(t in A||o in A||l in A)&&(`onUpdate:${t}`in A||`onUpdate:${o}`in A||`onUpdate:${l}`in A));T||(f=k,p()),s.emit(`update:${t}`,F),at(k,h)&&(at(k,F)&&!at(F,w)||T&&h!==Ve&&!at(F,f))&&p(),h=k,w=F}}});return a[Symbol.iterator]=()=>{let u=0;return{next(){return u<2?{value:u++?i||Ve:a,done:!1}:{done:!0}}}},a}const ya=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${yt(t)}Modifiers`]||e[`${on(t)}Modifiers`];function hu(e,t,...n){if(e.isUnmounted)return;const s=e.vnode.props||Ve;let o=n;const l=t.startsWith("update:"),i=l&&ya(s,t.slice(7));i&&(i.trim&&(o=n.map(f=>Qe(f)?f.trim():f)),i.number&&(o=o.map(Qo)));let a,u=s[a=ds(t)]||s[a=ds(yt(t))];!u&&l&&(u=s[a=ds(on(t))]),u&&jt(u,e,6,o);const p=s[a+"Once"];if(p){if(!e.emitted)e.emitted={};else if(e.emitted[a])return;e.emitted[a]=!0,jt(p,e,6,o)}}function mu(e,t,n=!1){const s=t.emitsCache,o=s.get(e);if(o!==void 0)return o;const l=e.emits;let i={};return l?(Ae(l)?l.forEach(a=>i[a]=null):St(i,l),ze(e)&&s.set(e,i),i):(ze(e)&&s.set(e,null),null)}function is(e,t){return!e||!qo(t)?!1:(t=t.slice(2),t=t==="Once"?t:t.replace(/Once$/,""),Ke(e,t[0].toLowerCase()+t.slice(1))||Ke(e,on(t))||Ke(e,t))}function Il(e){const{type:t,vnode:n,proxy:s,withProxy:o,propsOptions:[l],slots:i,attrs:a,emit:u,render:p,renderCache:f,props:h,data:w,setupState:k,ctx:F,inheritAttrs:A}=e,T=Fo(e);let L,E;try{if(n.shapeFlag&4){const D=o||s,N=D;L=Zt(p.call(N,D,f,h,k,w,F)),E=a}else{const D=t;L=Zt(D.length>1?D(h,{attrs:a,slots:i,emit:u}):D(h,null)),E=t.props?a:gu(a)}}catch(D){tn.length=0,os(D,e,1),L=Xe(gt)}let H=L;if(E&&A!==!1){const D=Object.keys(E),{shapeFlag:N}=H;D.length&&N&7&&(l&&D.some(Yo)&&(E=bu(E,l)),H=hn(H,E,!1,!0))}if(n.dirs&&(H=hn(H,null,!1,!0),H.dirs=H.dirs?H.dirs.concat(n.dirs):n.dirs),n.transition){const D=ss(H.type)&&Bo(H)||H;ro(D,n.transition)}return L=H,Fo(T),L}const gu=e=>{let t;for(const n in e)(n==="class"||n==="style"||qo(n))&&((t||(t={}))[n]=e[n]);return t},bu=(e,t)=>{const n={};for(const s in e)(!Yo(s)||!(s.slice(9)in t))&&(n[s]=e[s]);return n};function _u(e,t,n){const{props:s,children:o,component:l}=e,{props:i,children:a,patchFlag:u}=t,p=l.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&u>=0){if(u&1024)return!0;if(u&16)return s?Rl(s,i,p):!!i;if(u&8){const f=t.dynamicProps;for(let h=0;hObject.create(wa),xa=e=>Object.getPrototypeOf(e)===wa;function ku(e,t,n,s=!1){const o={},l=$a();e.propsDefaults=Object.create(null),Ma(e,t,o,l);for(const i in e.propsOptions[0])i in o||(o[i]=void 0);n?e.props=s?o:Fr(o):e.type.props?e.props=o:e.props=l,e.attrs=l}function wu(e,t,n,s){const{props:o,attrs:l,vnode:{patchFlag:i}}=e,a=Be(o),[u]=e.propsOptions;let p=!1;if((s||i>0)&&!(i&16)){if(i&8){const f=e.vnode.dynamicProps;for(let h=0;he==="_"||e==="_ctx"||e==="$stable",cl=e=>Ae(e)?e.map(Zt):[Zt(e)],xu=(e,t,n)=>{if(t._n)return t;const s=On((...o)=>cl(t(...o)),n);return s._c=!1,s},Ca=(e,t,n)=>{const s=e._ctx;for(const o in e){if(ul(o))continue;const l=e[o];if(je(l))t[o]=xu(o,l,s);else if(l!=null){const i=cl(l);t[o]=()=>i}}},Sa=(e,t)=>{const n=cl(t);e.slots.default=()=>n},Ta=(e,t,n)=>{for(const s in t)(n||!ul(s))&&(e[s]=t[s])},Mu=(e,t,n)=>{const s=e.slots=$a();if(e.vnode.shapeFlag&32){const o=t._;o?(Ta(s,t,n),n&&Fi(s,"_",o,!0)):Ca(t,s)}else t&&Sa(e,t)},Cu=(e,t,n)=>{const{vnode:s,slots:o}=e;let l=!0,i=Ve;if(s.shapeFlag&32){const a=t._;a?n&&a===1?l=!1:Ta(o,t,n):(l=!t.$stable,Ca(t,o)),i=t}else t&&(Sa(e,t),i={default:1});if(l)for(const a in o)!ul(a)&&i[a]==null&&delete o[a]},Et=Lu;function Su(e){return Tu(e)}function Tu(e,t){const n=es();n.__VUE__=!0;const{insert:s,remove:o,patchProp:l,createElement:i,createText:a,createComment:u,setText:p,setElementText:f,parentNode:h,nextSibling:w,setScopeId:k=Mn,insertStaticContent:F}=e,A=(g,$,_,P=null,j=null,Y=null,ue=void 0,ae=null,oe=!!$.dynamicChildren)=>{if(g===$)return;g&&!kn(g,$)&&(P=le(g),Me(g,j,Y,!0),g=null),$.patchFlag===-2&&(oe=!1,$.dynamicChildren=null);const{type:X,ref:we,shapeFlag:he}=$;switch(X){case as:T(g,$,_,P);break;case gt:L(g,$,_,P);break;case Io:g==null&&E($,_,P,ue);break;case ne:V(g,$,_,P,j,Y,ue,ae,oe);break;default:he&1?N(g,$,_,P,j,Y,ue,ae,oe):he&6?be(g,$,_,P,j,Y,ue,ae,oe):(he&64||he&128)&&X.process(g,$,_,P,j,Y,ue,ae,oe,pe)}we!=null&&j?no(we,g&&g.ref,Y,$||g,!$):we==null&&g&&g.ref!=null&&no(g.ref,null,Y,g,!0)},T=(g,$,_,P)=>{if(g==null)s($.el=a($.children),_,P);else{const j=$.el=g.el;$.children!==g.children&&p(j,$.children)}},L=(g,$,_,P)=>{g==null?s($.el=u($.children||""),_,P):$.el=g.el},E=(g,$,_,P)=>{[g.el,g.anchor]=F(g.children,$,_,P,g.el,g.anchor)},H=({el:g,anchor:$},_,P)=>{let j;for(;g&&g!==$;)j=w(g),s(g,_,P),g=j;s($,_,P)},D=({el:g,anchor:$})=>{let _;for(;g&&g!==$;)_=w(g),o(g),g=_;o($)},N=(g,$,_,P,j,Y,ue,ae,oe)=>{if($.type==="svg"?ue="svg":$.type==="math"&&(ue="mathml"),g==null)q($,_,P,j,Y,ue,ae,oe);else{const X=g.el&&g.el._isVueCE?g.el:null;try{X&&X._beginPatch(),I(g,$,j,Y,ue,ae,oe)}finally{X&&X._endPatch()}}},q=(g,$,_,P,j,Y,ue,ae)=>{let oe,X;const{props:we,shapeFlag:he,transition:ke,dirs:Se}=g;if(oe=g.el=i(g.type,Y,we&&we.is,we),he&8?f(oe,g.children):he&16&&B(g.children,oe,null,P,j,bs(g,Y),ue,ae),Se&&mn(g,null,P,"created"),W(oe,g,g.scopeId,ue,P),we){for(const ye in we)ye!=="value"&&!Qn(ye)&&l(oe,ye,null,we[ye],Y,P);"value"in we&&l(oe,"value",null,we.value,Y),(X=we.onVnodeBeforeMount)&&Kt(X,P,g)}Se&&mn(g,null,P,"beforeMount");const Ee=Eu(j,ke);Ee&&ke.beforeEnter(oe),s(oe,$,_),((X=we&&we.onVnodeMounted)||Ee||Se)&&Et(()=>{try{X&&Kt(X,P,g),Ee&&ke.enter(oe),Se&&mn(g,null,P,"mounted")}finally{}},j)},W=(g,$,_,P,j)=>{if(_&&k(g,_),P)for(let Y=0;Y{for(let X=oe;X{const ae=$.el=g.el;let{patchFlag:oe,dynamicChildren:X,dirs:we}=$;oe|=g.patchFlag&16;const he=g.props||Ve,ke=$.props||Ve;let Se;if(_&&gn(_,!1),(Se=ke.onVnodeBeforeUpdate)&&Kt(Se,_,$,g),we&&mn($,g,_,"beforeUpdate"),_&&gn(_,!0),X&&(!g.dynamicChildren||g.dynamicChildren.length!==X.length)&&(oe=0,ue=!1,X=null),(he.innerHTML&&ke.innerHTML==null||he.textContent&&ke.textContent==null)&&f(ae,""),X?O(g.dynamicChildren,X,ae,_,P,bs($,j),Y):ue||re(g,$,ae,null,_,P,bs($,j),Y,!1),oe>0){if(oe&16)K(ae,he,ke,_,j);else if(oe&2&&he.class!==ke.class&&l(ae,"class",null,ke.class,j),oe&4&&l(ae,"style",he.style,ke.style,j),oe&8){const Ee=$.dynamicProps;for(let ye=0;ye{Se&&Kt(Se,_,$,g),we&&mn($,g,_,"updated")},P)},O=(g,$,_,P,j,Y,ue)=>{for(let ae=0;ae<$.length;ae++){const oe=g[ae],X=$[ae],we=oe.el&&(oe.type===ne||!kn(oe,X)||oe.shapeFlag&198)?h(oe.el):_;A(oe,X,we,null,P,j,Y,ue,!0)}},K=(g,$,_,P,j)=>{if($!==_){if($!==Ve)for(const Y in $)!Qn(Y)&&!(Y in _)&&l(g,Y,$[Y],null,j,P);for(const Y in _){if(Qn(Y))continue;const ue=_[Y],ae=$[Y];ue!==ae&&Y!=="value"&&l(g,Y,ae,ue,j,P)}"value"in _&&l(g,"value",$.value,_.value,j)}},V=(g,$,_,P,j,Y,ue,ae,oe)=>{const X=$.el=g?g.el:a(""),we=$.anchor=g?g.anchor:a("");let{patchFlag:he,dynamicChildren:ke,slotScopeIds:Se}=$;Se&&(ae=ae?ae.concat(Se):Se),g==null?(s(X,_,P),s(we,_,P),B($.children||[],_,we,j,Y,ue,ae,oe)):he>0&&he&64&&ke&&g.dynamicChildren&&g.dynamicChildren.length===ke.length?(O(g.dynamicChildren,ke,_,j,Y,ue,ae),($.key!=null||j&&$===j.subTree)&&Ea(g,$,!0)):re(g,$,_,we,j,Y,ue,ae,oe)},be=(g,$,_,P,j,Y,ue,ae,oe)=>{$.slotScopeIds=ae,g==null?$.shapeFlag&512?j.ctx.activate($,_,P,ue,oe):de($,_,P,j,Y,ue,oe):se(g,$,oe)},de=(g,$,_,P,j,Y,ue)=>{const ae=g.component=Pu(g,P,j);if(al(g)&&(ae.ctx.renderer=pe),Hu(ae,!1,ue),ae.asyncDep){if(j&&j.registerDep(ae,ie,ue),!g.el){const oe=ae.subTree=Xe(gt);L(null,oe,$,_),g.placeholder=oe.el}}else ie(ae,g,$,_,j,Y,ue)},se=(g,$,_)=>{const P=$.component=g.component;if(_u(g,$,_))if(P.asyncDep&&!P.asyncResolved){fe(P,$,_);return}else P.next=$,P.update();else $.el=g.el,P.vnode=$},ie=(g,$,_,P,j,Y,ue)=>{const ae=()=>{if(g.isMounted){let{next:he,bu:ke,u:Se,parent:Ee,vnode:ye}=g;{const ut=Aa(g);if(ut){he&&(he.el=ye.el,fe(g,he,ue)),ut.asyncDep.then(()=>{Et(()=>{g.isUnmounted||X()},j)});return}}let Pe=he,Ue;gn(g,!1),he?(he.el=ye.el,fe(g,he,ue)):he=ye,ke&&Oo(ke),(Ue=he.props&&he.props.onVnodeBeforeUpdate)&&Kt(Ue,Ee,he,ye),gn(g,!0);const Ye=Il(g),ft=g.subTree;g.subTree=Ye,A(ft,Ye,h(ft.el),le(ft),g,j,Y),he.el=Ye.el,Pe===null&&yu(g,Ye.el),Se&&Et(Se,j),(Ue=he.props&&he.props.onVnodeUpdated)&&Et(()=>Kt(Ue,Ee,he,ye),j)}else{let he;const{el:ke,props:Se}=$,{bm:Ee,m:ye,parent:Pe,root:Ue,type:Ye}=g,ft=Hn($);gn(g,!1),Ee&&Oo(Ee),!ft&&(he=Se&&Se.onVnodeBeforeMount)&&Kt(he,Pe,$),gn(g,!0);{Ue.ce&&Ue.ce._hasShadowRoot()&&Ue.ce._injectChildStyle(Ye,g.parent?g.parent.type:void 0);const ut=g.subTree=Il(g);A(null,ut,_,P,g,j,Y),$.el=ut.el}if(ye&&Et(ye,j),!ft&&(he=Se&&Se.onVnodeMounted)){const ut=$;Et(()=>Kt(he,Pe,ut),j)}($.shapeFlag&256||Pe&&Hn(Pe.vnode)&&Pe.vnode.shapeFlag&256)&&g.a&&Et(g.a,j),g.isMounted=!0,$=_=P=null}};g.scope.on();const oe=g.effect=new Ui(ae);g.scope.off();const X=g.update=oe.run.bind(oe),we=g.job=oe.runIfDirty.bind(oe);we.i=g,we.id=g.uid,oe.scheduler=()=>il(we),gn(g,!0),X()},fe=(g,$,_)=>{$.component=g;const P=g.vnode.props;g.vnode=$,g.next=null,wu(g,$.props,P,_),Cu(g,$.children,_),vn(),Sl(g),pn()},re=(g,$,_,P,j,Y,ue,ae,oe=!1)=>{const X=g&&g.children,we=g?g.shapeFlag:0,he=$.children,{patchFlag:ke,shapeFlag:Se}=$;if(ke>0){if(ke&128){te(X,he,_,P,j,Y,ue,ae,oe);return}else if(ke&256){ee(X,he,_,P,j,Y,ue,ae,oe);return}}Se&8?(we&16&&Ze(X,j,Y),he!==X&&f(_,he)):we&16?Se&16?te(X,he,_,P,j,Y,ue,ae,oe):Ze(X,j,Y,!0):(we&8&&f(_,""),Se&16&&B(he,_,P,j,Y,ue,ae,oe))},ee=(g,$,_,P,j,Y,ue,ae,oe)=>{g=g||Nn,$=$||Nn;const X=g.length,we=$.length,he=Math.min(X,we);let ke;for(ke=0;kewe?Ze(g,j,Y,!0,!1,he):B($,_,P,j,Y,ue,ae,oe,he)},te=(g,$,_,P,j,Y,ue,ae,oe)=>{let X=0;const we=$.length;let he=g.length-1,ke=we-1;for(;X<=he&&X<=ke;){const Se=g[X],Ee=$[X]=oe?Jt($[X]):Zt($[X]);if(kn(Se,Ee))A(Se,Ee,_,null,j,Y,ue,ae,oe);else break;X++}for(;X<=he&&X<=ke;){const Se=g[he],Ee=$[ke]=oe?Jt($[ke]):Zt($[ke]);if(kn(Se,Ee))A(Se,Ee,_,null,j,Y,ue,ae,oe);else break;he--,ke--}if(X>he){if(X<=ke){const Se=ke+1,Ee=Seke)for(;X<=he;)Me(g[X],j,Y,!0),X++;else{const Se=X,Ee=X,ye=new Map;for(X=Ee;X<=ke;X++){const tt=$[X]=oe?Jt($[X]):Zt($[X]);tt.key!=null&&ye.set(tt.key,X)}let Pe,Ue=0;const Ye=ke-Ee+1;let ft=!1,ut=0;const Tt=new Array(Ye);for(X=0;X=Ye){Me(tt,j,Y,!0);continue}let it;if(tt.key!=null)it=ye.get(tt.key);else for(Pe=Ee;Pe<=ke;Pe++)if(Tt[Pe-Ee]===0&&kn(tt,$[Pe])){it=Pe;break}it===void 0?Me(tt,j,Y,!0):(Tt[it-Ee]=X+1,it>=ut?ut=it:ft=!0,A(tt,$[it],_,null,j,Y,ue,ae,oe),Ue++)}const Ot=ft?Au(Tt):Nn;for(Pe=Ot.length-1,X=Ye-1;X>=0;X--){const tt=Ee+X,it=$[tt],Ut=$[tt+1],U=tt+1{const{el:Y,type:ue,transition:ae,children:oe,shapeFlag:X}=g;if(X&6){$e(g.component.subTree,$,_,P);return}if(X&128){g.suspense.move($,_,P);return}if(X&64){ue.move(g,$,_,pe);return}if(ue===ne){s(Y,$,_);for(let he=0;heae.enter(Y),j));else{const{leave:he,delayLeave:ke,afterLeave:Se}=ae,Ee=()=>{g.ctx.isUnmounted?o(Y):s(Y,$,_)},ye=()=>{const Pe=Y._isLeaving||!!Y[Dt];Y._isLeaving&&Y[Dt](!0),ae.persisted&&!Pe?Ee():he(Y,()=>{Ee(),Se&&Se()})};ke?ke(Y,Ee,ye):ye()}else s(Y,$,_)},Me=(g,$,_,P=!1,j=!1)=>{const{type:Y,props:ue,ref:ae,children:oe,dynamicChildren:X,shapeFlag:we,patchFlag:he,dirs:ke,cacheIndex:Se,memo:Ee}=g;if(he===-2&&(j=!1),ae!=null&&(vn(),no(ae,null,_,g,!0),pn()),Se!=null&&($.renderCache[Se]=void 0),we&256){$.ctx.deactivate(g);return}const ye=we&1&&ke,Pe=!Hn(g);let Ue;if(Pe&&(Ue=ue&&ue.onVnodeBeforeUnmount)&&Kt(Ue,$,g),we&6)qe(g.component,_,P);else{if(we&128){g.suspense.unmount(_,P);return}ye&&mn(g,null,$,"beforeUnmount"),we&64?g.type.remove(g,$,_,pe,P):X&&!X.hasOnce&&(Y!==ne||he>0&&he&64)?Ze(X,$,_,!1,!0):(Y===ne&&he&384||!j&&we&16)&&Ze(oe,$,_),P&&Ne(g)}const Ye=Ee!=null&&Se==null;(Pe&&(Ue=ue&&ue.onVnodeUnmounted)||ye||Ye)&&Et(()=>{Ue&&Kt(Ue,$,g),ye&&mn(g,null,$,"unmounted"),Ye&&(g.el=null)},_)},Ne=g=>{const{type:$,el:_,anchor:P,transition:j}=g;if($===ne){Re(_,P);return}if($===Io){D(g);return}const Y=()=>{o(_),j&&!j.persisted&&j.afterLeave&&j.afterLeave()};if(g.shapeFlag&1&&j&&!j.persisted){const{leave:ue,delayLeave:ae}=j,oe=()=>ue(_,Y);ae?ae(g.el,Y,oe):oe()}else Y()},Re=(g,$)=>{let _;for(;g!==$;)_=w(g),o(g),g=_;o($)},qe=(g,$,_)=>{const{bum:P,scope:j,job:Y,subTree:ue,um:ae,m:oe,a:X}=g;Nl(oe),Nl(X),P&&Oo(P),j.stop(),Y&&(Y.flags|=8,Me(ue,g,$,_)),ae&&Et(ae,$),Et(()=>{g.isUnmounted=!0},$)},Ze=(g,$,_,P=!1,j=!1,Y=0)=>{for(let ue=Y;ue{if(g.shapeFlag&6)return le(g.component.subTree);if(g.shapeFlag&128)return g.suspense.next();const $=w(g.anchor||g.el),_=$&&$[nu];return _?w(_):$};let Ce=!1;const S=(g,$,_)=>{let P;g==null?$._vnode&&(Me($._vnode,null,null,!0),P=$._vnode.component):A($._vnode||null,g,$,null,null,null,_),$._vnode=g,Ce||(Ce=!0,Sl(P),aa(),Ce=!1)},pe={p:A,um:Me,m:$e,r:Ne,mt:de,mc:B,pc:re,pbc:O,n:le,o:e};return{render:S,hydrate:void 0,createApp:vu(S)}}function bs({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 gn({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function Eu(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function Ea(e,t,n=!1){const s=e.children,o=t.children;if(Ae(s)&&Ae(o))for(let l=0;l>1,e[n[a]]0&&(t[s]=n[l-1]),n[l]=s)}}for(l=n.length,i=n[l-1];l-- >0;)n[l]=i,i=t[i];return n}function Aa(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Aa(t)}function Nl(e){if(e)for(let t=0;te.__isSuspense;function Lu(e,t){t&&t.pendingBranch?Ae(e)?t.effects.push(...e):t.effects.push(e):Xr(e)}const ne=Symbol.for("v-fgt"),as=Symbol.for("v-txt"),gt=Symbol.for("v-cmt"),Io=Symbol.for("v-stc"),tn=[];let Mt=null;function c(e=!1){tn.push(Mt=e?null:[])}function dl(){tn.pop(),Mt=tn[tn.length-1]||null}let jn=1;function jo(e,t=!1){jn+=e,e<0&&Mt&&t&&(Mt.hasOnce=!0)}function Ia(e){return e.dynamicChildren=jn>0?Mt||Nn:null,dl(),jn>0&&Mt&&Mt.push(e),e}function d(e,t,n,s,o,l){return Ia(r(e,t,n,s,o,l,!0))}function pt(e,t,n,s,o){return Ia(Xe(e,t,n,s,o,!0))}function uo(e){return e?e.__v_isVNode===!0:!1}function kn(e,t){return e.type===t.type&&e.key===t.key}const Ra=({key:e})=>e!=null?e:null,Ro=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?Qe(e)||Ct(e)||je(e)?{i:dt,r:e,k:t,f:!!n}:e:null);function r(e,t=null,n=null,s=0,o=null,l=e===ne?0:1,i=!1,a=!1){const u={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Ra(t),ref:t&&Ro(t),scopeId:ua,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:dt};return a?(Uo(u,n),l&128&&e.normalize(u)):n&&(u.shapeFlag|=Qe(n)?8:16),jn>0&&!i&&Mt&&(u.patchFlag>0||l&6)&&u.patchFlag!==32&&Mt.push(u),u}const Xe=Ou;function Ou(e,t=null,n=null,s=0,o=null,l=!1){if((!e||e===ga)&&(e=gt),uo(e)){const a=hn(e,t,!0);return n&&Uo(a,n),jn>0&&!l&&Mt&&(a.shapeFlag&6?Mt[Mt.indexOf(e)]=a:Mt.push(a)),a.patchFlag=-2,a}if(Uu(e)&&(e=e.__vccOpts),t){t=Iu(t);let{class:a,style:u}=t;a&&!Qe(a)&&(t.class=Z(a)),ze(u)&&(ll(u)&&!Ae(u)&&(u=St({},u)),t.style=Te(u))}const i=Qe(e)?1:Oa(e)?128:ss(e)?64:ze(e)?4:je(e)?2:0;return r(e,t,n,s,o,i,l,!0)}function Iu(e){return e?ll(e)||xa(e)?St({},e):e:null}function hn(e,t,n=!1,s=!1){const{props:o,ref:l,patchFlag:i,children:a,transition:u}=e,p=t?Ru(o||{},t):o,f={__v_isVNode:!0,__v_skip:!0,type:e.type,props:p,key:p&&Ra(p),ref:t&&t.ref?n&&l?Ae(l)?l.concat(Ro(t)):[l,Ro(t)]:Ro(t):l,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:a,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==ne?i===-1?16:i|16:i,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:u,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&hn(e.ssContent),ssFallback:e.ssFallback&&hn(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return u&&s&&ro(f,u.clone(f)),f}function Ft(e=" ",t=0){return Xe(as,null,e,t)}function Da(e,t){const n=Xe(Io,null,e);return n.staticCount=t,n}function R(e="",t=!1){return t?(c(),pt(gt,null,e)):Xe(gt,null,e)}function Zt(e){return e==null||typeof e=="boolean"?Xe(gt):Ae(e)?Xe(ne,null,e.slice()):uo(e)?Jt(e):Xe(as,null,String(e))}function Jt(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:hn(e)}function Uo(e,t){let n=0;const{shapeFlag:s}=e;if(t==null)t=null;else if(Ae(t))n=16;else if(typeof t=="object")if(s&65){const o=t.default;o&&(o._c&&(o._d=!1),Uo(e,o()),o._c&&(o._d=!0));return}else{n=32;const o=t._;!o&&!xa(t)?t._ctx=dt:o===3&&dt&&(dt.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else if(je(t)){if(s&65){Uo(e,{default:t});return}t={default:t,_ctx:dt},n=32}else t=String(t),s&64?(n=16,t=[Ft(t)]):n=8;e.children=t,e.shapeFlag|=n}function Ru(...e){const t={};for(let n=0;nGt||dt;let Ko,co;{const e=es(),t=(n,s)=>{let o;return(o=e[n])||(o=e[n]=[]),o.push(s),l=>{o.length>1?o.forEach(i=>i(l)):o[0](l)}};Ko=t("__VUE_INSTANCE_SETTERS__",n=>Gt=n),co=t("__VUE_SSR_SETTERS__",n=>fo=n)}const fl=e=>{const t=Gt;return Ko(e),e.scope.on(),()=>{e.scope.off(),Ko(t)}},Pl=()=>{Gt&&Gt.scope.off(),Ko(null)};function Na(e){return e.vnode.shapeFlag&4}let fo=!1;function Hu(e,t=!1,n=!1){t&&co(t);const{props:s,children:o}=e.vnode,l=Na(e);ku(e,s,l,t),Mu(e,o,n||t);const i=l?Fu(e,t):void 0;return t&&co(!1),i}function Fu(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,du);const{setup:s}=n;if(s){vn();const o=e.setupContext=s.length>1?Vu(e):null,l=fl(e),i=mo(s,e,0,[e.props,o]),a=Ni(i);if(pn(),l(),(a||e.sp)&&!Hn(e)&&iu(e),a){if(i.then(Pl,Pl),t)return i.then(u=>{co(!0);try{Hl(e,u,t)}finally{co(!1)}}).catch(u=>{os(u,e,0)});e.asyncDep=i}else Hl(e,i)}else Pa(e)}function Hl(e,t,n){je(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:ze(t)&&(e.setupState=sa(t)),Pa(e)}function Pa(e,t,n){const s=e.type;e.render||(e.render=s.render||Mn)}const Bu={get(e,t){return ht(e,"get",""),e[t]}};function Vu(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,Bu),slots:e.slots,emit:e.emit,expose:t}}function us(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(sa(Br(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in oo)return oo[n](e)},has(t,n){return n in t||n in oo}})):e.proxy}function ju(e,t=!0){return je(e)?e.displayName||e.name:e.name||t&&e.__name}function Uu(e){return je(e)&&"__vccOpts"in e}const J=(e,t)=>zr(e,t,fo);function Ku(e,t,n){try{jo(-1);const s=arguments.length;return s===2?ze(t)&&!Ae(t)?uo(t)?Xe(e,null,[t]):Xe(e,t):Xe(e,null,t):(s>3?n=Array.prototype.slice.call(arguments,2):s===3&&uo(n)&&(n=[n]),Xe(e,t,n))}finally{jo(1)}}function Fl(e,t){const n=e.memo;if(n.length!=t.length)return!1;for(let s=0;s0&&Mt&&Mt.push(e),!0}const Wu="3.5.42";/** * @vue/runtime-dom v3.5.42 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT -**/let js;const Bl=typeof window!="undefined"&&window.trustedTypes;if(Bl)try{js=Bl.createPolicy("vue",{createHTML:e=>e})}catch{}const Ha=js?e=>js.createHTML(e):e=>e,zu="http://www.w3.org/2000/svg",Zu="http://www.w3.org/1998/Math/MathML",Xt=typeof document!="undefined"?document:null,Vl=Xt&&Xt.createElement("template"),Gu={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"?Xt.createElementNS(zu,e):t==="mathml"?Xt.createElementNS(Zu,e):n?Xt.createElement(e,{is:n}):Xt.createElement(e);return e==="select"&&s&&s.multiple!=null&&o.setAttribute("multiple",s.multiple),o},createText:e=>Xt.createTextNode(e),createComment:e=>Xt.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Xt.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,s,o,l){const i=n?n.previousSibling:t.lastChild;if(o&&(o===l||o.nextSibling))for(;t.insertBefore(o.cloneNode(!0),n),!(o===l||!(o=o.nextSibling)););else{Vl.innerHTML=Ha(s==="svg"?`${e}`:s==="mathml"?`${e}`:e);const a=Vl.content;if(s==="svg"||s==="mathml"){const u=a.firstChild;for(;u.firstChild;)a.appendChild(u.firstChild);a.removeChild(u)}t.insertBefore(a,n)}return[i?i.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},sn="transition",Gn="animation",vo=Symbol("_vtc"),Fa={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},qu=St({},da,Fa),Yu=e=>(e.displayName="Transition",e.props=qu,e),Xu=Yu((e,{slots:t})=>Ku(lu,Ju(e),t)),bn=(e,t=[])=>{Ae(e)?e.forEach(n=>n(...t)):e&&e(...t)},jl=e=>e?Ae(e)?e.some(t=>t.length>1):e.length>1:!1;function Ju(e){const t={};for(const V in e)V in Fa||(t[V]=e[V]);if(e.css===!1)return t;const{name:n="v",type:s,duration:o,enterFromClass:l=`${n}-enter-from`,enterActiveClass:i=`${n}-enter-active`,enterToClass:a=`${n}-enter-to`,appearFromClass:u=l,appearActiveClass:p=i,appearToClass:f=a,leaveFromClass:h=`${n}-leave-from`,leaveActiveClass:w=`${n}-leave-active`,leaveToClass:k=`${n}-leave-to`}=e,F=Qu(o),A=F&&F[0],T=F&&F[1],{onBeforeEnter:L,onEnter:E,onEnterCancelled:H,onLeave:D,onLeaveCancelled:N,onBeforeAppear:q=L,onAppear:W=E,onAppearCancelled:B=H}=t,I=(V,ge,de,se)=>{V._enterCancelled=se,_n(V,ge?f:a),_n(V,ge?p:i),de&&de()},O=(V,ge)=>{V._isLeaving=!1,_n(V,h),_n(V,k),_n(V,w),ge&&ge()},K=V=>(ge,de)=>{const se=V?W:E,ie=()=>I(ge,V,de);bn(se,[ge,ie]),Ul(()=>{_n(ge,V?u:l),Yt(ge,V?f:a),jl(se)||Kl(ge,s,A,ie)})};return St(t,{onBeforeEnter(V){bn(L,[V]),Yt(V,l),Yt(V,i)},onBeforeAppear(V){bn(q,[V]),Yt(V,u),Yt(V,p)},onEnter:K(!1),onAppear:K(!0),onLeave(V,ge){V._isLeaving=!0;const de=()=>O(V,ge);Yt(V,h),V._enterCancelled?(Yt(V,w),Zl(V)):(Zl(V),Yt(V,w)),Ul(()=>{V._isLeaving&&(_n(V,h),Yt(V,k),jl(D)||Kl(V,s,T,de))}),bn(D,[V,de])},onEnterCancelled(V){I(V,!1,void 0,!0),bn(H,[V])},onAppearCancelled(V){I(V,!0,void 0,!0),bn(B,[V])},onLeaveCancelled(V){O(V),bn(N,[V])}})}function Qu(e){if(e==null)return null;if(ze(e))return[_s(e.enter),_s(e.leave)];{const t=_s(e);return[t,t]}}function _s(e){return dr(e)}function Yt(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[vo]||(e[vo]=new Set)).add(t)}function _n(e,t){t.split(/\s+/).forEach(s=>s&&e.classList.remove(s));const n=e[vo];n&&(n.delete(t),n.size||(e[vo]=void 0))}function Ul(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let ec=0;function Kl(e,t,n,s){const o=e._endId=++ec,l=()=>{o===e._endId&&s()};if(n!=null)return setTimeout(l,n);const{type:i,timeout:a,propCount:u}=tc(e,t);if(!i)return s();const p=i+"end";let f=0;const h=()=>{e.removeEventListener(p,w),l()},w=k=>{k.target===e&&++f>=u&&h()};setTimeout(()=>{f(n[F]||"").split(", "),o=s(`${sn}Delay`),l=s(`${sn}Duration`),i=Wl(o,l),a=s(`${Gn}Delay`),u=s(`${Gn}Duration`),p=Wl(a,u);let f=null,h=0,w=0;t===sn?i>0&&(f=sn,h=i,w=l.length):t===Gn?p>0&&(f=Gn,h=p,w=u.length):(h=Math.max(i,p),f=h>0?i>p?sn:Gn:null,w=f?f===sn?l.length:u.length:0);const k=f===sn&&/\b(?:transform|all)(?:,|$)/.test(s(`${sn}Property`).toString());return{type:f,timeout:h,propCount:w,hasTransform:k}}function Wl(e,t){for(;e.lengthzl(n)+zl(e[s])))}function zl(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function Zl(e){return(e?e.ownerDocument:document).body.offsetHeight}function nc(e,t,n){const s=e[vo];s&&(t=(t?[t,...s]:[...s]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const Wo=Symbol("_vod"),Ba=Symbol("_vsh"),Do={name:"show",beforeMount(e,{value:t},{transition:n}){e[Wo]=e.style.display==="none"?"":e.style.display,n&&t?n.beforeEnter(e):qn(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:s}){!t!=!n&&(s?t?(s.beforeEnter(e),qn(e,!0),s.enter(e)):s.leave(e,()=>{qn(e,!1)}):qn(e,t))},beforeUnmount(e,{value:t}){qn(e,t)}};function qn(e,t){e.style.display=t?e[Wo]:"none",e[Ba]=!t}const oc=Symbol(""),sc=/(?:^|;)\s*display\s*:/;function lc(e,t,n){const s=e.style,o=Qe(n);let l=!1;if(n&&!o){if(t)if(Qe(t))for(const i of t.split(";")){const a=i.slice(0,i.indexOf(":")).trim();n[a]==null&&Xn(s,a,"")}else for(const i in t)n[i]==null&&Xn(s,i,"");for(const i in n){i==="display"&&(l=!0);const a=n[i];a!=null?ac(e,i,!Qe(t)&&t?t[i]:void 0,a)||Xn(s,i,a):Xn(s,i,"")}}else if(o){if(t!==n){const i=s[oc];i&&(n+=";"+i),s.cssText=n,l=sc.test(n)}}else t&&e.removeAttribute("style");Wo in e&&(e[Wo]=l?s.display:"",e[Ba]&&(s.display="none"))}const ko=/\s*!important$/;function Xn(e,t,n){if(Ae(n))n.forEach(s=>Xn(e,t,s));else if(n==null&&(n=""),t.startsWith("--"))ko.test(n)?e.setProperty(t,n.replace(ko,""),"important"):e.setProperty(t,n);else{const s=ic(e,t);ko.test(n)?e.setProperty(on(s),n.replace(ko,""),"important"):e[s]=n}}const Gl=["Webkit","Moz","ms"],ys={};function ic(e,t){const n=ys[t];if(n)return n;let s=yt(t);if(s!=="filter"&&s in e)return ys[t]=s;s=Jo(s);for(let o=0;oks||(vc.then(()=>ks=0),ks=Date.now());function hc(e,t){const n=s=>{if(!s._vts)s._vts=Date.now();else if(s._vts<=n.attached)return;const o=n.value;if(Ae(o)){const l=s.stopImmediatePropagation;s.stopImmediatePropagation=()=>{l.call(s),s._stopped=!0};const i=o.slice(),a=[s];for(let u=0;ue.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,mc=(e,t,n,s,o,l)=>{const i=o==="svg";t==="class"?nc(e,s,i):t==="style"?lc(e,n,s):qo(t)?Yo(t)||uc(e,t,n,s,l):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):gc(e,t,s,i))?(Xl(e,t,s),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&Yl(e,t,s,i,l,t!=="value")):e._isVueCE&&(bc(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!Qe(s)))?Xl(e,yt(t),s,l,t):(t==="true-value"?e._trueValue=s:t==="false-value"&&(e._falseValue=s),Yl(e,t,s,i))};function gc(e,t,n,s){if(s)return!!(t==="innerHTML"||t==="textContent"||t in e&&Ql(t)&&je(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 Ql(t)&&Qe(n)?!1:t in e}function bc(e,t){const n=e._def.props;if(!n)return!1;const s=yt(t);return Array.isArray(n)?n.some(o=>yt(o)===s):Object.keys(n).some(o=>yt(o)===s)}const zo=e=>{const t=e.props["onUpdate:modelValue"]||!1;return Ae(t)?n=>Oo(t,n):t};function _c(e){e.target.composing=!0}function ei(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const $n=Symbol("_assign"),wo=Symbol("_initialValue");function ws(e,t,n){return t&&(e=e.trim()),n&&(e=Qo(e)),e}const un={created(e,{modifiers:{lazy:t,trim:n,number:s}},o){e.parentNode&&(e.type==="text"?e[wo]=e.defaultValue.replace(/[\r\n]/g,""):e.type==="textarea"&&(e[wo]=e.defaultValue.replace(/\r\n?/g,` -`))),e[$n]=zo(o);const l=s||o.props&&o.props.type==="number";wn(e,t?"change":"input",i=>{i.target.composing||e[$n](ws(e.value,n,l))}),(n||l)&&wn(e,"change",()=>{e.value=ws(e.value,n,l)}),t||(wn(e,"compositionstart",_c),wn(e,"compositionend",ei),wn(e,"change",ei))},mounted(e,{value:t,modifiers:{trim:n,number:s}}){const o=t==null?"":t,l=e[wo];delete e[wo],l!==void 0&&(e.type==="text"||e.type==="textarea")&&e.value!==l?e[$n](ws(e.value,n,s)):e.value=o},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:s,trim:o,number:l}},i){if(e[$n]=zo(i),e.composing)return;const a=(l||e.type==="number")&&!/^0\d/.test(e.value)?Qo(e.value):e.value,u=t==null?"":t;if(a===u)return;const p=e.getRootNode();(p instanceof Document||p instanceof ShadowRoot)&&p.activeElement===e&&e.type!=="range"&&(s&&t===n||o&&e.value.trim()===u)||(e.value=u)}},ti={deep:!0,created(e,{value:t,modifiers:{number:n}},s){e._modelValue=t,wn(e,"change",()=>{const o=Array.prototype.filter.call(e.options,u=>u.selected).map(u=>n?Qo(Zo(u)):Zo(u)),l=e.multiple,i=l?Tn(e._modelValue)?new Set(o):o:o[0],a=e._pendingValue=[l,l?Ae(i)?o.slice():o:i];try{e[$n](i)}finally{ot(()=>{e._pendingValue===a&&(e._pendingValue=void 0)})}}),e[$n]=zo(s)},mounted(e,{value:t}){ni(e,t)},beforeUpdate(e,{value:t},n){e._modelValue=t,e[$n]=zo(n)},updated(e,{value:t}){const n=e._pendingValue;e._pendingValue=void 0,(!n||n[0]!==e.multiple||!yc(t,n[1],n[0]))&&ni(e,t)}};function yc(e,t,n){if(!n||Ae(e))return fn(e,t);if(Tn(e)){if(e.size!==t.length)return!1;for(const s of t)if(!e.has(s))return!1;return!0}return!1}function ni(e,t){const n=e.multiple,s=Ae(t);if(!(n&&!s&&!Tn(t))){for(let o=0,l=e.options.length;oString(p)===String(a)):i.selected=_r(t,a)>-1}else i.selected=t.has(a);else if(fn(Zo(i),t)){e.selectedIndex!==o&&(e.selectedIndex=o);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function Zo(e){return"_value"in e?e._value:e.value}const kc=["ctrl","shift","alt","meta"],wc={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)=>kc.some(n=>e[`${n}Key`]&&!t.includes(n))},_t=(e,t)=>{if(!e)return e;const n=e._withMods||(e._withMods={}),s=t.join(".");return n[s]||(n[s]=((o,...l)=>{for(let i=0;i{const n=e._withKeys||(e._withKeys={}),s=t.join(".");return n[s]||(n[s]=(o=>{if(!("key"in o))return;const l=on(o.key);if(t.some(i=>i===l||xc[i]===l))return e(o)}))},$c=St({patchProp:mc},Gu);let oi;function Mc(){return oi||(oi=Su($c))}const Cc=((...e)=>{const t=Mc().createApp(...e),{mount:n}=t;return t.mount=s=>{const o=Tc(s);if(!o)return;const l=t._component;!je(l)&&!l.render&&!l.template&&(l.template=o.innerHTML),o.nodeType===1&&(o.textContent="");const i=n(o,!1,Sc(o));return o instanceof Element&&(o.removeAttribute("v-cloak"),o.setAttribute("data-v-app","")),i},t});function Sc(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function Tc(e){return Qe(e)?document.querySelector(e):e}const Ec="opx:diag",si=20;let xs=0,$s=!1,li=!1;function Us(e){try{return e instanceof Error?`${e.name||"Error"}: ${e.message}`:e==null?String(e):typeof e=="object"?Object.prototype.toString.call(e):String(e)}catch{return""}}function et(e,t){var n;if(!($s||xs>=si)){$s=!0,xs+=1;try{const s=t?`${t}: ${Us(e)}`:Us(e);(n=window.Open77)==null||n.emit(Ec,{surface:Va,text:s.slice(0,400),dropped:xs===si?"budget reached, further reports suppressed":""})}catch{}$s=!1}}function Ie(e,t,n){try{return t()}catch(s){return et(s,e),n}}let Va="unknown";function Ac(e){if(Va=e,li)return;li=!0,window.addEventListener("error",n=>{et(`uncaught ${n.message||"?"} at ${n.filename||"?"}:${n.lineno||0}`)}),window.addEventListener("unhandledrejection",n=>{et(n.reason,"unhandled rejection")});const t=console.error;console.error=function(...n){et(n.map(Us).join(" "));try{t.apply(console,n)}catch{}}}const Ks=new Map,Ms=new Set;let ii=!1;function ja(){const e=window.Open77;return!e&&!ii&&(ii=!0,console.warn("[opx] window.Open77 is absent; nothing will reach Lua")),e}function Lc(e,t){const n=Ks.get(e);if(!(!n||n.size===0))for(const s of Array.from(n))try{s(t!=null?t:{})}catch(o){et(o,`handler ${e}`)}}function Oc(e){if(Ms.has(e))return;const t=ja();if(t){Ms.add(e);try{t.on(e,n=>Lc(e,n))}catch(n){Ms.delete(e),et(n,`on ${e}`)}}}function In(e,t){let n=Ks.get(e);n||(n=new Set,Ks.set(e,n)),n.add(t),Oc(e);let s=!1;return()=>{s||(s=!0,n.delete(t))}}let Ua=!1;const Ka=[];function Ws(e,t){const n=ja();if(n)try{n.emit(e,t)}catch(s){et(s,`emit ${e}`)}}function $e(e,t={}){if(!Ua){Ka.push({channel:e,payload:t});return}Ws(e,t)}function Ic(e,t={}){Ws(e,t),Ua=!0;for(const n of Ka.splice(0))Ws(n.channel,n.payload)}function kt(e){return Array.isArray(e)?e:[]}function $(e,t=""){return typeof e=="string"?e:t}function ee(e,t=0){return typeof e=="number"&&Number.isFinite(e)?e:t}function De(e,t=!1){return typeof e=="boolean"?e:t}function Oe(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)?e:{}}function Ge(e){return kt(e).map(Oe)}function wt(e,t){return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0}const En=mt({focused:!1,strings:{},stringsReady:!1,failed:[]});let Yn=null;const ai=Bn(En),Rc=J(()=>En.focused);function Dc(e){En.focused=e}function Nc(e){const t=Oe(e.strings),n=e.first!==!1,s=e.done!==!1;(n||Yn===null)&&(Yn={});for(const o of Object.keys(t))Yn[o]=$(t[o],o);s&&(En.strings=Yn,Yn=null,En.stringsReady=!0)}function Pc(e){En.failed.includes(e)||En.failed.push(e)}const Un=[];let vl="unknown",Wa=!0,ri=!1;function Hc(e,t){vl=e,Wa=t}function pl(){return Un[Un.length-1]}function za(){const e=pl();Dc(Un.length>0),$e("opx:focus:set",{surface:vl,focus:e!==void 0,owner:e?e.id:""})}function Fc(e){if(e.key!=="Escape")return;const t=pl();if(t){if(e.preventDefault(),!t.onEscape){zs(t);return}try{t.onEscape()}catch(n){et(n,`escape ${t.id}`),zs(t)}}}function Pt(e){if(!Wa)return et(`${e.id} asked for focus on the ${vl} surface`,"focus refused"),()=>{};ri||(ri=!0,window.addEventListener("keydown",Fc,!0)),Un.push(e),za();let t=!1;return()=>{t||(t=!0,zs(e))}}function zs(e){const t=Un.lastIndexOf(e);t!==-1&&(Un.splice(t,1),za())}function po(){const e=pl();return e?e.id:""}function ye(e,t){if(!rs()){et(`useBridge(${e}) called outside setup(); it can never unsubscribe`,"lifecycle");return}const n=In(e,t);rt(n)}function nt(){const e=J(()=>ai.strings);function t(s,o){const l=e.value[s];return typeof l!="string"?ai.stringsReady?s:"":o?l.replace(/\{(\w+)\}/g,(i,a)=>{const u=o[a];return u===void 0?i:String(u)}):l}function n(s){return typeof e.value[s]=="string"}return{t,has:n}}const Bc={class:"stage"},Vc={key:0,class:"passive"},jc={key:0,class:"passive-who op-label"},Uc={key:1,class:"passive-who op-label"},Kc={key:2,class:"passive-who op-label"},Wc={class:"passive-what op-eyebrow"},zc={key:3,class:"prompts"},Zc={class:"prompt"},Gc={class:"cap"},qc={class:"prompt"},Yc={class:"cap"},Xc={key:4,class:"prompts"},Jc={class:"prompt"},Qc={class:"cap"},ed={class:"panel"},td={class:"head"},nd={class:"eyebrow op-eyebrow"},od={class:"title op-label"},sd={key:0,class:"ring-row"},ld={class:"ring-who op-copy"},id={class:"acts"},ad={key:1,class:"live-row"},rd={class:"live-who op-copy"},ud={key:2,class:"live-row"},cd={class:"waiting op-eyebrow"},dd={class:"tabs"},fd=["onClick"],vd={key:3,class:"rows"},pd={class:"who op-copy op-truncate"},hd={key:0,class:"why op-eyebrow"},md=["onClick"],gd=["onClick"],bd={key:0,class:"empty op-copy"},_d={key:4,class:"rows"},yd={class:"who op-copy op-truncate"},kd={class:"why op-eyebrow"},wd={key:0,class:"empty op-copy"},xd=He({__name:"HoloRoot",setup(e){const{t}=nt(),n=S(!1),s=S([]),o=S([]),l=S(null),i=S(null),a=S(null),u=S("contacts"),p=J(()=>l.value!==null),f=J(()=>i.value!==null),h=J(()=>a.value!==null&&$(a.value.kind)!=="contact"),w=J(()=>i.value===null?"?":$(i.value.fromName,$(i.value.name,"?"))),k=J(()=>a.value===null?"?":$(a.value.toName,"?")),F=J(()=>(l.value===null?[]:Ge(l.value.participants)).map(Q=>$(Q.name,"?")).filter(Q=>Q!=="")),A=J(()=>i.value!==null&&$(i.value.kind)==="contact");function T(re){return Ge(re).map(Q=>({id:ee(Q.id),ref:$(Q.ref),name:$(Q.name,"?"),refusal:Q.refusal===void 0||Q.refusal===null?null:$(Q.refusal)})).filter(Q=>Q.id>0||Q.ref!=="")}Lt(()=>{$e("opx:calls:ready",{})}),ye("opx:calls:holo",re=>{Ie("calls:holo",()=>{n.value=re.open===!0,s.value=T(re.rows),o.value=Ge(re.recent).map(Me=>({outcome:$(Me.outcome,"missed"),name:$(Me.name,"?")}));const Q=Oe(re.call);l.value=Object.keys(Q).length>0?Q:null;const te=Oe(re.invite);i.value=Object.keys(te).length>0?te:null,$(re.anchor)!==""&&(de.value=$(re.anchor)),$(re.answerKey)!==""&&(se.value=$(re.answerKey)),$(re.declineKey)!==""&&(ie.value=$(re.declineKey));const xe=Oe(re.outgoing);a.value=Object.keys(xe).length>0?xe:null},void 0)});function L(){$e("opx:calls:close",{})}let E;bt(n,re=>{re&&E===void 0?E=Pt({id:"calls",onEscape:L}):!re&&E!==void 0&&(E(),E=void 0)}),rt(()=>{E==null||E(),E=void 0});function H(re){re.refusal===null&&$e("opx:calls:call",{id:re.id})}function D(){$e("opx:calls:accept",{})}function N(){$e("opx:calls:decline",{})}function q(){$e("opx:calls:hangUp",{})}const W=S(null);bt([n,u],()=>{W.value=null});function B(re){if(re.ref!==""){if(W.value!==re.ref){W.value=re.ref;return}W.value=null,$e("opx:calls:forget",{ref:re.ref})}}function I(){$e("opx:calls:withdraw",{})}const O={contacts:"calls.holo.tab.contacts",recent:"calls.holo.tab.recent"},K={missed:"calls.holo.outcome.missed",unanswered:"calls.holo.outcome.unanswered",declined:"calls.holo.outcome.declined",refused:"calls.holo.outcome.refused"};function V(re){return"calls.error."+re}const ge=J(()=>n.value||f.value||p.value||h.value),de=S("bottom-center"),se=S("Y"),ie=S("X"),fe=J(()=>s.value);return(re,Q)=>ge.value?(c(),d("div",{key:0,class:Z(["holo op-ink",["anchor-"+de.value,{live:!n.value}]])},[r("div",Bc,[Q[3]||(Q[3]=Da('',2)),n.value?R("",!0):(c(),d("div",Vc,[f.value?(c(),d("p",jc,m(w.value),1)):p.value?(c(),d("p",Uc,m(F.value.join(", ")),1)):(c(),d("p",Kc,m(k.value),1)),r("p",Wc,m(f.value?A.value?M(t)("calls.holo.contactOffer"):M(t)("calls.holo.incoming"):p.value?h.value?M(t)("calls.holo.calling",{name:k.value}):M(t)("calls.holo.inCall"):M(t)("calls.holo.dialing")),1),f.value?(c(),d("div",zc,[r("span",Zc,[r("b",Gc,m(se.value),1),Zt(" "+m(A.value?M(t)("calls.holo.yes"):M(t)("calls.holo.answer")),1)]),r("span",qc,[r("b",Yc,m(ie.value),1),Zt(" "+m(A.value?M(t)("calls.holo.no"):M(t)("calls.holo.refuse")),1)])])):(c(),d("div",Xc,[r("span",Jc,[r("b",Qc,m(ie.value),1),Zt(" "+m(a.value!==null?M(t)("calls.holo.withdraw"):M(t)("calls.holo.hangUp")),1)])]))])),n.value?(c(),d("div",{key:1,class:Z(["panel-frame",{"is-ringing":f.value}])},[r("section",ed,[r("header",td,[r("p",nd,m(M(t)("calls.holo.eyebrow")),1),r("h2",od,m(M(t)("calls.holo.title")),1),r("button",{class:"shut op-eyebrow",type:"button",onClick:L},m(M(t)("calls.holo.close")),1)]),f.value?(c(),d("div",sd,[r("p",ld,m(A.value?M(t)("calls.holo.sharing",{name:w.value}):M(t)("calls.holo.ringing",{name:w.value})),1),r("div",id,[r("button",{class:"act yes op-eyebrow",type:"button",onClick:D},m(A.value?M(t)("calls.holo.yes"):M(t)("calls.holo.answer")),1),r("button",{class:"act no op-eyebrow",type:"button",onClick:N},m(A.value?M(t)("calls.holo.no"):M(t)("calls.holo.refuse")),1)])])):R("",!0),p.value?(c(),d("div",ad,[r("p",rd,m(M(t)("calls.holo.live",{names:F.value.join(", ")})),1),r("button",{class:"act no op-eyebrow",type:"button",onClick:q},m(M(t)("calls.holo.hangUp")),1)])):R("",!0),a.value!==null?(c(),d("div",ud,[r("p",cd,m(h.value?M(t)("calls.holo.calling",{name:k.value}):M(t)("calls.holo.offering")),1),r("button",{class:"act no op-eyebrow",type:"button",onClick:I},m(M(t)("calls.holo.withdraw")),1)])):R("",!0),r("nav",dd,[(c(),d(ne,null,ve(["contacts","recent"],te=>r("button",{key:te,class:Z(["tab op-eyebrow",{on:u.value===te}]),type:"button",onClick:xe=>u.value=te},m(M(t)(O[te])),11,fd)),64))]),u.value!=="recent"?(c(),d("ul",vd,[(c(!0),d(ne,null,ve(fe.value,te=>(c(),d("li",{key:te.ref||te.id,class:Z(["row",{off:te.refusal!==null}])},[Q[0]||(Q[0]=r("span",{class:"dot","aria-hidden":"true"},null,-1)),r("span",pd,m(te.name),1),te.refusal!==null?(c(),d("span",hd,m(M(t)(V(te.refusal))),1)):(c(),d("button",{key:1,class:"pill op-eyebrow",type:"button",onClick:xe=>H(te)},m(p.value?M(t)("calls.holo.add"):M(t)("calls.holo.call")),9,md)),te.ref!==""?(c(),d("button",{key:2,class:"pill op-eyebrow",type:"button",onClick:xe=>B(te)},m(W.value===te.ref?M(t)("calls.holo.forgetConfirm"):M(t)("calls.holo.forget")),9,gd)):R("",!0)],2))),128)),fe.value.length===0?(c(),d("li",bd,m(M(t)("calls.holo.noContacts")),1)):R("",!0)])):(c(),d("ul",_d,[(c(!0),d(ne,null,ve(o.value,(te,xe)=>{var Me;return c(),d("li",{key:xe,class:"row off"},[Q[1]||(Q[1]=r("span",{class:"dot","aria-hidden":"true"},null,-1)),r("span",yd,m(te.name),1),r("span",kd,m(M(t)((Me=M(wt)(K,te.outcome))!=null?Me:"calls.holo.outcome.missed")),1)])}),128)),o.value.length===0?(c(),d("li",wd,m(M(t)("calls.holo.noRecent")),1)):R("",!0)]))]),Q[2]||(Q[2]=r("span",{class:"panel-edges","aria-hidden":"true"},null,-1))],2)):R("",!0)])],2)):R("",!0)}}),Fe=(e,t)=>{const n=e.__vccOpts||e;for(const[s,o]of t)n[s]=o;return n},$d=Fe(xd,[["__scopeId","data-v-036bd3f8"]]),Za=S(!1),xo=J(()=>Za.value);function Cs(e){Za.value=e}const Ga=S(0),Md=J(()=>Ga.value);function ui(e){Ga.value=e}const qa=S(0);function ci(e){qa.value=e}const Ya=32,Xa=8,Ja=J(()=>Math.max(0,qa.value+Xa-Ya)),Cd={class:"chat-suggestion-name"},Sd={key:0,class:"chat-suggestion-params"},Td={key:1,class:"chat-suggestion-help op-truncate"},Ed=["maxlength","placeholder"],Ad={key:0,class:"chat-count"},Ld={class:"chat-hints"},Od={key:0,class:"cap op-cap","data-augmented-ui":"tr-clip border"},Id={class:"cap op-cap","data-augmented-ui":"tr-clip border"},Rd={class:"cap op-cap","data-augmented-ui":"tr-clip border"},di=50,Dd=He({__name:"ChatInput",setup(e){const t={"bottom-left":"anchor-bottom-left","bottom-center":"anchor-bottom-center","top-left":"anchor-top-left","top-center":"anchor-top-center"},{t:n}=nt(),s=S(!1),o=S(""),l=S(240),i=S(""),a=S("anchor-bottom-left"),u=S(155),p=S(620),f=S([]),h=S([]),w=S(-1);let k="";const F=S(null),A=S(null),T=S(null);let L=null,E=null,H=null,D=!1;function N(){E!==null&&(clearInterval(E),E=null)}function q(){N();let C=0;const pe=()=>{const be=T.value;if(be===null||document.activeElement===be){N();return}be.focus(),C+=1,C>=20&&N()};ot(pe),E=setInterval(pe,50)}const W=J(()=>{if(o.value.charAt(0)!=="/")return null;const C=o.value.slice(1),pe=C.indexOf(" ");return{name:(pe===-1?C:C.slice(0,pe)).toLowerCase(),onArgs:pe!==-1}}),B=J(()=>{const C=W.value;if(C===null)return[];if(C.onArgs){const pe=f.value.find(be=>be.name.toLowerCase()===C.name);return pe?[pe]:[]}return f.value.filter(pe=>pe.name.toLowerCase().indexOf(C.name)===0).slice(0,8)}),I=J(()=>{var C;return((C=W.value)==null?void 0:C.onArgs)===!0&&B.value.length===1}),O=J(()=>{const C=W.value;if(C===null||!C.onArgs)return-1;const pe=o.value.slice(1);return pe.slice(pe.indexOf(" ")+1).split(/\s+/).length-1}),K=J(()=>o.value.length>=l.value*.8);function V(){o.value="",w.value=-1,k=""}function ge(C){if(C){if(L!==null)return;L=Pt({id:"chat",onEscape:()=>$e("opx:chat:close",{})});return}L!==null&&(L(),L=null)}function de(){const C=F.value;ui(C===null?0:Math.round(C.getBoundingClientRect().height)),ci(A.value===null?0:Math.round(A.value.getBoundingClientRect().height))}function se(){ot(()=>{const C=F.value;C!==null&&(de(),typeof ResizeObserver!="undefined"&&(H!==null&&H.disconnect(),H=new ResizeObserver(de),H.observe(C)))})}function ie(){H!==null&&H.disconnect(),H=null,ui(0),ci(0)}function fe(){s.value=!0,Cs(!0),V(),q(),se(),!D&&(D=!0,window.setTimeout(()=>{var pe,be,g;const C=F.value?getComputedStyle(F.value):null;et(`anchor=${a.value} held=${f.value.length} shown=${B.value.length} offset=${u.value} pos=${(pe=C==null?void 0:C.position)!=null?pe:"?"} left=${(be=C==null?void 0:C.left)!=null?be:"?"} top=${(g=C==null?void 0:C.top)!=null?g:"?"}`,"chat-input state")},250))}function re(){s.value=!1,Cs(!1),N(),ie(),V()}function Q(){const C=B.value[0];C&&(o.value=`/${C.name} `,ot(()=>te()))}function te(){const C=T.value;if(C===null)return;C.focus();const pe=C.value.length;C.setSelectionRange(pe,pe)}function xe(C){var be;const pe=h.value.length;if(pe!==0){if(w.value===-1){if(C>0)return;k=o.value,w.value=pe-1}else{const g=w.value+(C<0?-1:1);if(g<0)return;if(g>=pe){w.value=-1,o.value=k,k="",ot(()=>te());return}w.value=g}o.value=(be=h.value[w.value])!=null?be:"",ot(()=>te())}}function Me(C){C!==""&&(h.value[h.value.length-1]!==C&&h.value.push(C),h.value.length>di&&h.value.splice(0,h.value.length-di))}function Ne(){w.value!==-1&&(w.value=-1,k="")}function Re(C){if(C.key==="Enter"){C.preventDefault(),Me(o.value),$e("opx:chat:submit",{text:o.value});return}if(C.key==="Tab"){if(I.value)return;C.preventDefault(),Q();return}(C.key==="ArrowUp"||C.key==="ArrowDown")&&(C.preventDefault(),xe(C.key==="ArrowUp"?-1:1))}function qe(C){const pe=Oe(C),be=$(pe.name);return be===""?"":pe.optional===!0?`[${be}]`:`<${be}>`}function Ze(C){return kt(C).map(qe).filter(pe=>pe!=="")}function le(C){const pe=Oe(C.suggestion),be=$(pe.name);if(be==="")return;const g={name:be,help:$(pe.help),params:Ze(pe.params)},x=f.value.findIndex(_=>_.name===be);x===-1?f.value.push(g):f.value[x]=g}function Ce(C){const pe=kt(C.suggestions).map(be=>{const g=Oe(be);return{name:$(g.name),help:$(g.help),params:Ze(g.params)}}).filter(be=>be.name!=="");if(C.reset===!1)for(const be of pe){const g=f.value.findIndex(x=>x.name===be.name);g===-1?f.value.push(be):f.value[g]=be}else f.value=pe}return ye("opx:chat:view",C=>{var pe;if($(C.surface)==="interactive")switch($(C.kind)){case"config":l.value=ee(C.maxLength,240),i.value=$(C.placeholder),a.value=(pe=wt(t,$(C.anchor)))!=null?pe:"anchor-bottom-left",u.value=ee(C.offset,155),p.value=ee(C.width,620);break;case"focus":ge(C.hold===!0);break;case"open":fe();break;case"close":re();break;case"suggest":le(C);break;case"unsuggest":{const be=$(C.name);f.value=f.value.filter(g=>g.name!==be);break}case"suggestions":Ce(C);break}}),Lt(()=>{$e("opx:chat:ready",{surface:"interactive"})}),rt(()=>{ge(!1),N(),ie(),Cs(!1)}),(C,pe)=>s.value?(c(),d("div",{key:0,ref_key:"box",ref:F,class:Z(["chat-input",a.value]),style:Ee({"--chat-offset":`${u.value}px`,"--chat-width":`${p.value}px`,"--chat-drop":`${M(Ja)}px`})},[B.value.length>0?(c(),d("ul",{key:0,class:Z(["chat-suggestions",{"is-signature":I.value}]),"data-augmented-ui":"tr-clip border"},[(c(!0),d(ne,null,ve(B.value,(be,g)=>(c(),d("li",{key:be.name,class:Z(["chat-suggestion",{"is-selected":!I.value&&g===0}])},[r("span",Cd,"/"+m(be.name),1),be.params.length>0?(c(),d("span",Sd,[(c(!0),d(ne,null,ve(be.params,(x,_)=>(c(),d("span",{key:x+_,class:Z(["chat-param",{"is-here":I.value&&_===O.value}])},m(x),3))),128))])):R("",!0),be.help?(c(),d("span",Td,m(be.help),1)):R("",!0)],2))),128))],2)):R("",!0),r("div",{ref_key:"row",ref:A,class:"chat-field op-arete","data-augmented-ui":"tr-clip border"},[pe[1]||(pe[1]=r("span",{class:"chat-caret","aria-hidden":"true"},">",-1)),xt(r("input",{ref_key:"field",ref:T,"onUpdate:modelValue":pe[0]||(pe[0]=be=>o.value=be),type:"text",class:"chat-entry",maxlength:l.value,placeholder:i.value,autocomplete:"off",spellcheck:"false",onInput:Ne,onKeydown:Re},null,40,Ed),[[un,o.value]]),K.value?(c(),d("span",Ad,m(l.value-o.value.length),1)):R("",!0),r("span",Ld,[B.value.length>0?(c(),d("kbd",Od,m(M(n)("chat.key.tab")),1)):R("",!0),r("kbd",Id,m(M(n)("chat.key.enter")),1),r("kbd",Rd,m(M(n)("chat.key.escape")),1)])],512)],6)):R("",!0)}}),Nd=Fe(Dd,[["__scopeId","data-v-a3452877"]]),Pd={key:0,class:"chat-author"},Hd={class:"chat-text"},Fd=48,Bd=He({__name:"ChatLog",setup(e){const t={"bottom-left":"anchor-bottom-left","bottom-center":"anchor-bottom-center","top-left":"anchor-top-left","top-center":"anchor-top-center"},n=S([]),s=S(!0),o=S("anchor-bottom-left"),l=S(155),i=S(620),a=S(60),u=S(12e3),p=S(Date.now());let f=null,h=0;const w=J(()=>o.value==="anchor-top-left"||o.value==="anchor-top-center"),k=J(()=>{if(!xo.value)return 0;const E=w.value?Fd:Ya+Ja.value;return Math.max(0,Md.value+Xa-E)});function F(E){return xo.value||u.value<=0?!0:p.value-E.atn.value.filter(F));function T(){const E=n.value[n.value.length-1],H=u.value>0&&!xo.value&&E!==void 0&&Date.now()-E.at{p.value=Date.now(),T()},500):!H&&f!==null&&(clearInterval(f),f=null)}function L(E){const H=Oe(E.line),D=$(H.text);if(D==="")return;h+=1,n.value.push({id:h,kind:$(H.kind,"say"),author:$(H.author),text:D,at:Date.now()});const N=Math.max(1,a.value);n.value.length>N&&n.value.splice(0,n.value.length-N),p.value=Date.now(),T()}return ye("opx:chat:view",E=>{var H;if($(E.surface)==="overlay")switch($(E.kind)){case"config":{o.value=(H=wt(t,$(E.anchor)))!=null?H:"anchor-bottom-left",l.value=ee(E.offset,155),i.value=ee(E.width,620),a.value=ee(E.history,60),u.value=ee(E.fadeMs,12e3),s.value=De(E.visible,!0),T();break}case"line":L(E);break;case"clear":n.value=[],T();break;case"visible":s.value=De(E.visible,!0);break}}),bt(xo,()=>{p.value=Date.now(),T()}),Lt(()=>{$e("opx:chat:ready",{surface:"overlay"})}),rt(()=>{f!==null&&clearInterval(f),f=null}),(E,H)=>s.value&&A.value.length>0?(c(),d("div",{key:0,class:Z(["chat-log",o.value]),style:Ee({"--chat-offset":`${l.value}px`,"--chat-width":`${i.value}px`,"--chat-lift":`${k.value}px`})},[(c(!0),d(ne,null,ve(A.value,D=>(c(),d("p",{key:D.id,class:Z(["chat-line",`is-${D.kind}`])},[D.author?(c(),d("span",Pd,m(D.author),1)):R("",!0),r("span",Hd,m(D.text),1)],2))),128))],6)):R("",!0)}}),Vd=Fe(Bd,[["__scopeId","data-v-fbe70d16"]]),At={interact:["M8 12V5a2 2 0 0 1 4 0v6","M12 9h3l4 4v4l-3 4h-5l-6-7a2 2 0 0 1 3-2Z"],person:["M16 7a4 4 0 1 1-8 0 4 4 0 0 1 8 0Z","M4 21v-3a8 8 0 0 1 16 0v3"],vehicle:["M4 10l2-6h12l2 6","M3 10h18v8H3Z","M5 18v3m14-3v3M6 14h2m8 0h2"],info:["M22 12a10 10 0 1 1-20 0 10 10 0 0 1 20 0Z","M12 11v6m0-10v.2"],lock:["M6 10V7a6 6 0 0 1 12 0v3","M4 10h16v11H4ZM12 14v3"],tool:["M14 3a6 6 0 0 0-6 8l-6 6 5 5 6-6a6 6 0 0 0 8-7l-4 4-5-5 4-4Z"],location:["M20 10c0 6-8 12-8 12S4 16 4 10a8 8 0 1 1 16 0Z","M15 10a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"],box:["M3 7l9-4 9 4v10l-9 4-9-4Z","M3 7l9 4 9-4M12 11v10"],door:["M5 21V3h11l3 2v16","M3 21h18M13 12h.2"],heal:["M9 3h6v6h6v6h-6v6H9v-6H3V9h6Z"],money:["M2 6h20v12H2Z","M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0ZM6 9v.2M18 15v.2"],talk:["M4 4h16v12H9l-5 4Z","M8 9h8M8 12h5"],folder:["M3 6h6l2 2h10v11H3Z"],back:["M15 5l-7 7 7 7"],search:["M11 18a7 7 0 1 1 0-14 7 7 0 0 1 0 14Z","M16.2 16.2 21 21"],filter:["M3 5h18l-7 8.5V20l-4 2v-8.5Z"],list:["M9 6h12M9 12h12M9 18h12","M4 6h.2M4 12h.2M4 18h.2"],star:["M12 3.5l2.7 5.6 6.1.9-4.4 4.3 1 6.2-5.4-2.9-5.4 2.9 1-6.2L3.2 10l6.1-.9Z"],weapon:["M3 7h12l4 4h3v3h-5l-2 5h-4l1-5H7a4 4 0 0 1-4-4Z"],ammo:["M9 21V8l3-5 3 5v13Z","M9 13h6"],shield:["M12 3l8 3v6c0 5.2-3.7 8.4-8 9.6C7.7 20.4 4 17.2 4 12V6Z"],ban:["M22 12a10 10 0 1 1-20 0 10 10 0 0 1 20 0Z","M5 5l14 14"],warning:["M12 3 2.5 20h19Z","M12 10v4m0 3v.2"],eye:["M2 12s4-7 10-7 10 7 10 7-4 7-10 7S2 12 2 12Z","M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"],hidden:["M4 4l16 16","M9.5 5.4A10 10 0 0 1 12 5c6 0 10 7 10 7a18 18 0 0 1-3.2 4","M6.3 8.3A18 18 0 0 0 2 12s4 7 10 7a10 10 0 0 0 3.6-.7"],tag:["M3 3h8l10 10-8 8L3 11Z","M7.5 7.5h.2"],flag:["M5 21V4","M5 5h13l-2.5 4L18 13H5Z"],map:["M9 4 3 6.5v14L9 18l6 2.5 6-2.5v-14L15 6.5Z","M9 4v14M15 6.5v14"],world:["M22 12a10 10 0 1 1-20 0 10 10 0 0 1 20 0Z","M2.5 9h19M2.5 15h19","M12 2a14 14 0 0 1 0 20 14 14 0 0 1 0-20Z"],clock:["M22 12a10 10 0 1 1-20 0 10 10 0 0 1 20 0Z","M12 6.5V12l3.5 2.5"],weather:["M17.5 19H7a4.5 4.5 0 0 1-.6-9 6 6 0 0 1 11.3 2A3.5 3.5 0 0 1 17.5 19Z"],gear:["M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z","M12 2v3m0 14v3M2 12h3m14 0h3M4.9 4.9 7 7m10 10 2.1 2.1M19.1 4.9 17 7M7 17l-2.1 2.1"],refresh:["M20.5 12a8.5 8.5 0 1 1-2.6-6.1","M21 3.5V10h-6.5"],bolt:["M13 2 4 14h7l-1 8 9-12h-7Z"],server:["M3 4.5h18v6H3ZM3 13.5h18v6H3Z","M6.5 7.5h.2M6.5 16.5h.2"],key:["M14 10a4 4 0 1 1-8 0 4 4 0 0 1 8 0Z","M13.5 8.5H21m-3 0v3.5m-2.5-3.5v2.5"],arrow:["M4 12h14","M13 6l6 6-6 6"],plus:["M12 5v14M5 12h14"],minus:["M5 12h14"],trash:["M4 7h16","M10 4h4","M6 7l1.2 14h9.6L18 7","M10 11v6m4-6v6"],heart:["M12 20.5S3.5 15.7 3.5 10A4.5 4.5 0 0 1 12 7.6 4.5 4.5 0 0 1 20.5 10c0 5.7-8.5 10.5-8.5 10.5Z"],emote:["M13.5 4.2a1.8 1.8 0 1 1-3.6 0 1.8 1.8 0 0 1 3.6 0Z","M11.7 8v6","M7 9.5 11.7 8l4.8 1.5","M9 21l2.7-7 3.3 7"],food:["M5 3v7a3 3 0 0 0 6 0V3","M8 3v18","M18 3c-2 2-2 7 0 9v9"],drink:["M6 4h12l-1.5 16h-9Z","M7 10h10"],smoke:["M3 15h13v4H3Z","M13 15v4","M18.5 6c1.8 1.2 1.8 3.3 0 4.5","M21.5 7.5c1.3 1.3 1.3 3.2 0 4.5"]};function fi(e){var t;return(t=wt(At,e))!=null?t:At.interact}const jd=["general","characters","groups","items","lockpick","sound"],Ss=10;function vi(e){const t=Oe(e);return{save:De(t.save),remove:De(t.remove),lock:De(t.lock),key:De(t.key),teleport:De(t.teleport)}}function Ud(e){if(typeof e=="string"&&e!=="")return e;const t=Oe(e),n=ee(t.areaSize,NaN),s=ee(t.speedMultiplier,NaN);return!Number.isFinite(n)||!Number.isFinite(s)?null:{areaSize:n,speedMultiplier:s}}function Qa(e){const t=[];for(const n of kt(e)){const s=Ud(n);s!==null&&t.push(s)}return t}function Ts(e){const t=Oe(e);return{maxDistance:ee(t.maxDistance,2),maxReach:ee(t.maxReach,8),autolockMax:ee(t.autolockMax,3600),nameMax:ee(t.nameMax,64),passcodeMax:ee(t.passcodeMax,32),steps:Qa(t.steps),stepsMax:ee(t.stepsMax,10),groupsMax:ee(t.groupsMax,16),itemsMax:ee(t.itemsMax,8),charactersMax:ee(t.charactersMax,32)}}function pi(e){return kt(e).filter(t=>typeof t=="string")}function Kd(e){return Ge(e).map(t=>({id:ee(t.id,-1),name:$(t.name),state:ee(t.state,1)===0?0:1,distance:ee(t.distance,-1),double:De(t.double),seeded:De(t.seeded)})).filter(t=>t.id>0)}function hl(e){const t=Oe(e),n=ee(t.x,NaN),s=ee(t.y,NaN),o=ee(t.z,NaN);return!Number.isFinite(n)||!Number.isFinite(s)||!Number.isFinite(o)?null:{x:n,y:s,z:o}}function ml(e){return Ge(e).map(t=>({native:$(t.native),coords:hl(t.coords)})).filter(t=>t.native!=="").slice(0,2)}function so(e){return{id:null,name:"",passcode:"",hasPasscode:!1,clearPasscode:!1,autolock:0,maxDistance:e.maxDistance,state:!0,double:!1,auto:!1,lockpick:!1,hideUi:!1,holdOpen:!1,onDuty:!1,doors:[],coords:null,characters:[""],groups:[{name:"",grade:0}],items:[{name:"",metadata:"",remove:!1}],steps:[],lockSound:"",unlockSound:""}}function Wd(e,t){const n=so(e),s=Oe(t);return n.doors=ml(s.doors),n.double=n.doors.length===2,n.coords=hl(s.coords),n}function zd(e,t){const n=Oe(t),s=so(e);s.id=ee(n.id,-1)>0?ee(n.id):null,s.name=$(n.name),s.passcode=$(n.passcode),s.hasPasscode=De(n.hasPasscode)||s.passcode!=="",s.autolock=ee(n.autolock,0),s.maxDistance=ee(n.maxDistance,e.maxDistance),s.state=ee(n.state,1)===1,s.auto=De(n.auto),s.lockpick=De(n.lockpick),s.hideUi=De(n.hideUi),s.holdOpen=De(n.holdOpen),s.onDuty=De(n.onDuty),s.coords=hl(n.coords);const o=ml(n.doors),l=$(n.native);s.doors=o.length>0?o:l!==""?[{native:l,coords:s.coords}]:[],s.double=s.doors.length===2;const i=kt(n.characters).map(f=>typeof f=="number"?String(f):$(f));s.characters=i.length>0?i:[""];const a=[],u=Oe(n.groups);for(const f of Object.keys(u))a.push({name:f,grade:ee(wt(u,f),0)});a.sort((f,h)=>f.name.localeCompare(h.name)),s.groups=a.length>0?a:[{name:"",grade:0}];const p=Ge(n.items).map(f=>({name:$(f.name),metadata:$(f.metadata),remove:De(f.remove)}));return s.items=p.length>0?p:[{name:"",metadata:"",remove:!1}],s.steps=Qa(n.lockpickDifficulty),s.lockSound=$(n.lockSound),s.unlockSound=$(n.unlockSound),s}function hi(e){return{passcode:e.passcode,clearPasscode:e.clearPasscode,autolock:e.autolock,maxDistance:e.maxDistance,state:e.state,auto:e.auto,lockpick:e.lockpick,hideUi:e.hideUi,holdOpen:e.holdOpen,onDuty:e.onDuty,characters:[...e.characters],groups:e.groups.map(t=>({...t})),items:e.items.map(t=>({...t})),steps:e.steps.map(t=>typeof t=="string"?t:{...t}),lockSound:e.lockSound,unlockSound:e.unlockSound}}function er(e){return e.doors.length===(e.double?2:1)}function Zd(e,t){var s;const n={name:e.name.trim()===""?void 0:e.name.trim(),state:e.state,maxDistance:e.maxDistance>0?e.maxDistance:t.maxDistance,autolock:e.autolock>0?Math.floor(e.autolock):void 0,auto:e.auto,lockpick:e.lockpick,hideUi:e.hideUi,holdOpen:e.holdOpen,onDuty:e.onDuty,doors:e.doors.map(o=>{var l,i;return{native:o.native,coords:(i=(l=o.coords)!=null?l:e.coords)!=null?i:void 0}}),coords:(s=e.coords)!=null?s:void 0,characters:e.characters.map(o=>o.trim()).filter(o=>o!==""),groups:e.groups.filter(o=>o.name.trim()!=="").map(o=>({name:o.name.trim(),grade:Math.max(0,Math.floor(o.grade||0))})),items:e.items.filter(o=>o.name.trim()!=="").map(o=>({name:o.name.trim(),metadata:o.metadata.trim()===""?void 0:o.metadata.trim(),remove:o.remove})),lockpickDifficulty:e.steps.length>0?e.steps:void 0,lockSound:e.lockSound===""?void 0:e.lockSound,unlockSound:e.unlockSound===""?void 0:e.unlockSound};return e.clearPasscode?n.passcode="":e.passcode!==""&&(n.passcode=e.passcode),n}function Gd(e){return typeof e=="string"?`doorlock.difficulty.${e}`:"doorlock.ui.custom"}const qd={save:!0,remove:!0};function Yd(e){return wt(qd,e)===!0}function Zs(e){if(Array.isArray(e))return e.map(Zs);if(e!==null&&typeof e=="object"){const t={};for(const[n,s]of Object.entries(e))s!==void 0&&(t[n]=Zs(s));return t}return e}const Xd={list:"opx:doorlock:list",detail:"opx:doorlock:detail",save:"opx:doorlock:save",delete:"opx:doorlock:delete",state:"opx:doorlock:state",key:"opx:doorlock:key",teleport:"opx:doorlock:teleport",pick:"opx:doorlock:pick",dismiss:"opx:doorlock:dismiss"},Jd={class:"list"},Qd={class:"bar"},ef=["title","disabled"],tf={viewBox:"0 0 24 24","aria-hidden":"true"},nf=["d"],of={class:"search op-frame","data-augmented-ui":"tr-clip border"},sf={viewBox:"0 0 24 24","aria-hidden":"true"},lf=["d"],af=["placeholder"],rf={class:"count op-value"},uf={class:"table"},cf={class:"thead op-eyebrow"},df={key:0,class:"empty op-copy"},ff={key:1,class:"empty op-copy"},vf={key:2,class:"rows"},pf=["onDblclick"],hf={class:"c-id op-value"},mf={class:"c-name op-label op-truncate"},gf={key:0,class:"tag op-eyebrow"},bf={key:1,class:"tag op-eyebrow"},_f={class:"c-dist op-value"},yf={class:"c-act"},kf=["title","onClick"],wf={viewBox:"0 0 24 24"},xf=["d"],$f=["title","onClick"],Mf={viewBox:"0 0 24 24"},Cf=["d"],Sf=["disabled","title","onClick"],Tf={viewBox:"0 0 24 24"},Ef=["d"],Af=["disabled","title","onClick"],Lf={viewBox:"0 0 24 24"},Of=["d"],If=["disabled","title","onClick"],Rf={viewBox:"0 0 24 24"},Df=["d"],Nf={key:0,class:"pager"},Pf=["disabled","title"],Hf={class:"op-value"},Ff=["disabled","title"],Bf=He({__name:"DoorList",props:{rows:{},loaded:{type:Boolean},access:{}},emits:["create","edit","copy","teleport","toggle","delete"],setup(e,{emit:t}){const n=e,s=t,{t:o}=nt(),l=S(""),i=S(1),a=S("id"),u=S(!0);function p(L){a.value===L?u.value=!u.value:(a.value=L,u.value=!0)}const f=J(()=>{const L=l.value.toLowerCase().split(/\s+/).filter(N=>N!==""),E=L.length===0?n.rows.slice():n.rows.filter(N=>{const q=`${N.id} ${N.name}`.toLowerCase();return L.every(W=>q.includes(W))}),H=a.value,D=u.value?1:-1;return E.sort((N,q)=>H==="name"?N.name.localeCompare(q.name)*D:H==="distance"?N.distance<0!=q.distance<0?N.distance<0?1:-1:(N.distance-q.distance)*D:(N[H]-q[H])*D),E}),h=J(()=>Math.max(1,Math.ceil(f.value.length/Ss))),w=J(()=>f.value.slice((i.value-1)*Ss,i.value*Ss));bt(l,()=>{i.value=1}),bt(h,L=>{i.value>L&&(i.value=L)});function k(L){var E;return(E=wt(At,L))!=null?E:[]}function F(L){return L.distance<0?o("doorlock.ui.elsewhere"):o("doorlock.ui.metres",{n:L.distance.toFixed(1).replace(".",o("doorlock.ui.decimal"))})}const A=J(()=>{const L=f.value.length;return o(L===0?"doorlock.ui.countZero":L===1?"doorlock.ui.countOne":"doorlock.ui.count",{n:L})});function T(L){return a.value!==L?"":u.value?"▲":"▼"}return(L,E)=>(c(),d("div",Jd,[r("div",Qd,[r("button",{class:Z(["add op-frame",{"is-off":!e.access.save}]),"data-augmented-ui":"tr-clip border",title:e.access.save?M(o)("doorlock.ui.create"):M(o)("doorlock.ui.denied"),disabled:!e.access.save,onClick:E[0]||(E[0]=H=>s("create"))},[(c(),d("svg",tf,[(c(!0),d(ne,null,ve(k("plus"),(H,D)=>(c(),d("path",{key:D,d:H},null,8,nf))),128))]))],10,ef),r("label",of,[(c(),d("svg",sf,[(c(!0),d(ne,null,ve(k("search"),(H,D)=>(c(),d("path",{key:D,d:H},null,8,lf))),128))])),xt(r("input",{"onUpdate:modelValue":E[1]||(E[1]=H=>l.value=H),class:"op-copy",type:"text",placeholder:M(o)("doorlock.ui.search"),maxlength:"64"},null,8,af),[[un,l.value]])]),r("span",rf,m(A.value),1)]),r("div",uf,[r("div",cf,[r("button",{class:"th c-id",onClick:E[2]||(E[2]=H=>p("id"))},m(M(o)("doorlock.ui.col.id"))+" "+m(T("id")),1),r("button",{class:"th c-name",onClick:E[3]||(E[3]=H=>p("name"))},m(M(o)("doorlock.ui.col.name"))+" "+m(T("name")),1),r("button",{class:"th c-state",onClick:E[4]||(E[4]=H=>p("state"))},m(M(o)("doorlock.ui.col.state"))+" "+m(T("state")),1),r("button",{class:"th c-dist",onClick:E[5]||(E[5]=H=>p("distance"))},m(M(o)("doorlock.ui.col.distance"))+" "+m(T("distance")),1),E[8]||(E[8]=r("span",{class:"th c-act"},null,-1))]),e.loaded?w.value.length===0?(c(),d("p",ff,m(M(o)("doorlock.ui.empty")),1)):(c(),d("ul",vf,[(c(!0),d(ne,null,ve(w.value,(H,D)=>(c(),d("li",{key:H.id,class:"op-enter",style:Ee(`--op-slot: ${D}`)},[r("div",{class:"row op-frame","data-augmented-ui":"tr-clip border",onDblclick:N=>s("edit",H.id)},[r("span",hf,"#"+m(H.id),1),r("span",mf,[Zt(m(H.name)+" ",1),H.double?(c(),d("small",gf,m(M(o)("doorlock.ui.doubleTag")),1)):R("",!0),H.seeded?(c(),d("small",bf,m(M(o)("doorlock.ui.seeded")),1)):R("",!0)]),r("span",{class:Z(["c-state op-value",{unlocked:H.state===0}])},m(H.state===1?M(o)("doorlock.ui.locked"):M(o)("doorlock.ui.unlocked")),3),r("span",_f,m(F(H)),1),r("span",yf,[r("button",{class:"icon",title:M(o)("doorlock.ui.action.edit"),onClick:N=>s("edit",H.id)},[(c(),d("svg",wf,[(c(!0),d(ne,null,ve(k("gear"),(N,q)=>(c(),d("path",{key:q,d:N},null,8,xf))),128))]))],8,kf),r("button",{class:"icon",title:M(o)("doorlock.ui.action.copy"),onClick:N=>s("copy",H)},[(c(),d("svg",Mf,[(c(!0),d(ne,null,ve(k("folder"),(N,q)=>(c(),d("path",{key:q,d:N},null,8,Cf))),128))]))],8,$f),r("button",{class:Z(["icon",{off:!e.access.lock}]),disabled:!e.access.lock,title:e.access.lock?M(o)(H.state===1?"doorlock.ui.action.unlock":"doorlock.ui.action.lock"):M(o)("doorlock.ui.denied"),onClick:N=>s("toggle",H)},[(c(),d("svg",Tf,[(c(!0),d(ne,null,ve(k("lock"),(N,q)=>(c(),d("path",{key:q,d:N},null,8,Ef))),128))]))],10,Sf),r("button",{class:Z(["icon",{off:!e.access.teleport}]),disabled:!e.access.teleport,title:e.access.teleport?M(o)("doorlock.ui.action.teleport"):M(o)("doorlock.ui.denied"),onClick:N=>s("teleport",H)},[(c(),d("svg",Lf,[(c(!0),d(ne,null,ve(k("location"),(N,q)=>(c(),d("path",{key:q,d:N},null,8,Of))),128))]))],10,Af),r("button",{class:Z(["icon danger",{off:!e.access.remove}]),disabled:!e.access.remove,title:e.access.remove?M(o)("doorlock.ui.action.delete"):M(o)("doorlock.ui.denied"),onClick:N=>s("delete",H)},[(c(),d("svg",Rf,[(c(!0),d(ne,null,ve(k("trash"),(N,q)=>(c(),d("path",{key:q,d:N},null,8,Df))),128))]))],10,If)])],40,pf)],4))),128))])):(c(),d("p",df,m(M(o)("doorlock.ui.loading")),1))]),h.value>1?(c(),d("nav",Nf,[r("button",{class:Z(["step op-frame",{"is-off":i.value<=1}]),"data-augmented-ui":"tr-clip border",disabled:i.value<=1,title:M(o)("doorlock.ui.prev"),onClick:E[6]||(E[6]=H=>i.value-=1)},"‹",10,Pf),r("span",Hf,m(M(o)("doorlock.ui.page",{page:i.value,pages:h.value})),1),r("button",{class:Z(["step op-frame",{"is-off":i.value>=h.value}]),"data-augmented-ui":"tr-clip border",disabled:i.value>=h.value,title:M(o)("doorlock.ui.next"),onClick:E[7]||(E[7]=H=>i.value+=1)},"›",10,Ff)])):R("",!0)]))}}),Vf=Fe(Bf,[["__scopeId","data-v-3d1fe23c"]]),jf={class:"settings"},Uf={class:"tabs"},Kf={viewBox:"0 0 24 24"},Wf=["d"],zf={class:"op-label op-truncate"},Zf=["disabled","title","onClick"],Gf={viewBox:"0 0 24 24"},qf=["d"],Yf={class:"op-label op-truncate"},Xf={class:"pane"},Jf={key:0,class:"hint op-copy"},Qf={key:1,class:"fields"},ev={class:"grid"},tv={class:"field"},nv={class:"op-eyebrow"},ov=["maxlength","disabled"],sv={class:"field"},lv={class:"op-eyebrow"},iv=["maxlength","disabled","placeholder"],av=["disabled"],rv={class:"op-eyebrow"},uv=["title"],cv={class:"op-eyebrow"},dv=["max","value","disabled"],fv=["title"],vv={class:"op-eyebrow"},pv=["max","value","disabled"],hv={class:"switches"},mv=["disabled","title","onClick"],gv={class:"op-label op-truncate"},bv={class:"doors"},_v={class:"op-eyebrow"},yv={class:"leaves"},kv={key:0,class:"op-copy dim"},wv={key:1,class:"op-copy warn"},xv=["disabled","title"],$v={viewBox:"0 0 24 24"},Mv=["d"],Cv={class:"op-label"},Sv={key:2,class:"rows"},Tv=["onUpdate:modelValue","placeholder","disabled"],Ev=["title","disabled","onClick"],Av={viewBox:"0 0 24 24"},Lv=["d"],Ov=["disabled","title"],Iv={key:3,class:"rows"},Rv=["onUpdate:modelValue","placeholder","disabled"],Dv=["value","placeholder","disabled","onChange"],Nv=["title","disabled","onClick"],Pv={viewBox:"0 0 24 24"},Hv=["d"],Fv=["disabled","title"],Bv={key:4,class:"rows"},Vv=["onUpdate:modelValue","placeholder","disabled"],jv=["onUpdate:modelValue","placeholder","disabled"],Uv=["disabled","onClick"],Kv={class:"op-eyebrow"},Wv=["title","disabled","onClick"],zv={viewBox:"0 0 24 24"},Zv=["d"],Gv=["disabled","title"],qv={key:5,class:"rows"},Yv={key:0,class:"hint op-copy"},Xv=["value","disabled","onChange"],Jv=["value"],Qv={value:"__custom"},ep=["value","title","placeholder","disabled","onChange"],tp=["value","title","placeholder","disabled","onChange"],np=["title","disabled","onClick"],op={viewBox:"0 0 24 24"},sp=["d"],lp=["disabled","title"],ip={key:6,class:"fields"},ap={key:0,class:"hint op-copy"},rp={class:"field"},up={class:"op-eyebrow"},cp=["disabled"],dp={value:""},fp=["value"],vp=["value"],pp={class:"field"},hp={class:"op-eyebrow"},mp=["disabled"],gp={value:""},bp=["value"],_p=["value"],yp={class:"submit"},kp={key:1,class:"notice op-copy"},wp={class:"actions"},xp=["disabled","title"],$p={class:"op-label"},Mp=["title","disabled"],Cp={viewBox:"0 0 24 24"},Sp=["d"],Tp=["disabled","title"],Ep={viewBox:"0 0 24 24"},Ap=["d"],Lp=["disabled","title"],Op={viewBox:"0 0 24 24"},Ip=["d"],Rp=["disabled","title"],Dp={viewBox:"0 0 24 24"},Np=["d"],Pp=He({__name:"DoorSettings",props:Ol({draft:{},defaults:{},access:{},sounds:{},difficulties:{},loading:{type:Boolean},saving:{type:Boolean},hasCopy:{type:Boolean},notice:{}},{tab:{required:!0},tabModifiers:{}}),emits:Ol(["back","submit","pick","apply","copy","key","delete"],["update:tab"]),setup(e,{emit:t}){const n=e,s=pu(e,"tab"),o=t,{t:l}=nt(),i={general:"gear",characters:"person",groups:"shield",items:"box",lockpick:"tool",sound:"bolt"};function a(q){var W;return(W=wt(At,q))!=null?W:[]}const u=J(()=>n.access.save&&!n.loading),p=["state","double","auto","lockpick","hideUi","holdOpen","onDuty"];function f(q){u.value&&(n.draft[q]=!n.draft[q],q==="double"&&!n.draft.double&&n.draft.doors.length>1&&(n.draft.doors=n.draft.doors.slice(0,1)),q==="lockpick"&&!n.draft.lockpick&&s.value==="lockpick"&&(s.value="general"))}function h(q,W,B,I=0){const O=Number(q.target.value);if(!Number.isFinite(O))return W;const K=Math.min(B,Math.max(W,O)),V=10**I;return Math.round(K*V)/V}function w(){n.draft.characters.lengthn.defaults.steps.map(q=>l(Gd(q))).join(", ")),D=J(()=>n.draft.double?2:1),N=J(()=>er(n.draft));return(q,W)=>(c(),d("div",jf,[r("nav",Uf,[r("button",{class:"tab op-frame","data-augmented-ui":"tr-clip border",onClick:W[0]||(W[0]=B=>o("back"))},[(c(),d("svg",Kf,[(c(!0),d(ne,null,ve(a("back"),(B,I)=>(c(),d("path",{key:I,d:B},null,8,Wf))),128))])),r("span",zf,m(M(l)("doorlock.ui.tab.back")),1)]),(c(!0),d(ne,null,ve(M(jd),B=>(c(),d("button",{key:B,class:Z(["tab op-frame",{"is-on":s.value===B,"op-lift":s.value===B,"is-off":B==="lockpick"&&!e.draft.lockpick}]),"data-augmented-ui":"tr-clip border",disabled:B==="lockpick"&&!e.draft.lockpick,title:B==="lockpick"&&!e.draft.lockpick?M(l)("doorlock.ui.lockpickOff"):"",onClick:I=>s.value=B},[(c(),d("svg",Gf,[(c(!0),d(ne,null,ve(a(i[B]),(I,O)=>(c(),d("path",{key:O,d:I},null,8,qf))),128))])),r("span",Yf,m(M(l)(`doorlock.ui.tab.${B}`)),1)],10,Zf))),128))]),r("section",Xf,[e.loading?(c(),d("p",Jf,m(M(l)("doorlock.ui.loading")),1)):s.value==="general"?(c(),d("div",Qf,[r("div",ev,[r("label",tv,[r("span",nv,m(M(l)("doorlock.ui.name")),1),xt(r("input",{"onUpdate:modelValue":W[1]||(W[1]=B=>e.draft.name=B),class:"input op-copy",type:"text",maxlength:e.defaults.nameMax,disabled:!u.value},null,8,ov),[[un,e.draft.name]])]),r("label",sv,[r("span",lv,m(M(l)("doorlock.ui.passcode")),1),xt(r("input",{"onUpdate:modelValue":W[2]||(W[2]=B=>e.draft.passcode=B),class:"input op-copy",type:"text",autocomplete:"off",maxlength:e.defaults.passcodeMax,disabled:!u.value||e.draft.clearPasscode,placeholder:e.draft.hasPasscode?M(l)("doorlock.ui.passcodeKept"):""},null,8,iv),[[un,e.draft.passcode]]),e.draft.hasPasscode?(c(),d("button",{key:0,class:Z(["mini",{on:e.draft.clearPasscode}]),disabled:!u.value,onClick:W[3]||(W[3]=_t(B=>e.draft.clearPasscode=!e.draft.clearPasscode,["prevent"]))},[r("span",{class:Z(["box",{ticked:e.draft.clearPasscode}])},[...W[14]||(W[14]=[r("svg",{viewBox:"0 0 13 13","aria-hidden":"true"},[r("path",{d:"M2.6 6.8 5 9.2 10 3.6"})],-1)])],2),r("span",rv,m(M(l)("doorlock.ui.passcodeClear")),1)],10,av)):R("",!0)]),r("label",{class:"field",title:M(l)("doorlock.ui.autolockHint")},[r("span",cv,m(M(l)("doorlock.ui.autolock")),1),r("input",{class:"input op-value",type:"number",min:"0",max:e.defaults.autolockMax,step:"1",value:e.draft.autolock,disabled:!u.value,onChange:W[4]||(W[4]=B=>e.draft.autolock=h(B,0,e.defaults.autolockMax))},null,40,dv)],8,uv),r("label",{class:"field",title:M(l)("doorlock.ui.maxDistanceHint")},[r("span",vv,m(M(l)("doorlock.ui.maxDistance")),1),r("input",{class:"input op-value",type:"number",min:"0.5",max:e.defaults.maxReach,step:"0.1",value:e.draft.maxDistance,disabled:!u.value,onChange:W[5]||(W[5]=B=>e.draft.maxDistance=h(B,.5,e.defaults.maxReach,1))},null,40,pv)],8,fv)]),r("div",hv,[(c(),d(ne,null,ve(p,B=>r("button",{key:B,class:Z(["switch",{on:e.draft[B]}]),disabled:!u.value,title:M(l)(`doorlock.ui.${B}Hint`),onClick:I=>f(B)},[r("span",{class:Z(["box",{ticked:e.draft[B]}])},[...W[15]||(W[15]=[r("svg",{viewBox:"0 0 13 13","aria-hidden":"true"},[r("path",{d:"M2.6 6.8 5 9.2 10 3.6"})],-1)])],2),r("span",gv,m(M(l)(`doorlock.ui.${B}`)),1)],10,mv)),64))]),r("div",bv,[r("span",_v,m(M(l)("doorlock.ui.doors")),1),r("ul",yv,[(c(!0),d(ne,null,ve(e.draft.doors,(B,I)=>(c(),d("li",{key:B.native,class:"op-value"},m(I+1)+" · "+m(B.native),1))),128)),e.draft.doors.length===0?(c(),d("li",kv,m(M(l)("doorlock.ui.noLeaf")),1)):e.draft.doors.lengtho("pick"))},[(c(),d("svg",$v,[(c(!0),d(ne,null,ve(a("door"),(B,I)=>(c(),d("path",{key:I,d:B},null,8,Mv))),128))])),r("span",Cv,m(M(l)("doorlock.ui.pickWorld")),1)],10,xv)])])):s.value==="characters"?(c(),d("div",Sv,[(c(!0),d(ne,null,ve(e.draft.characters,(B,I)=>(c(),d("div",{key:`c${I}`,class:"line"},[xt(r("input",{"onUpdate:modelValue":O=>e.draft.characters[I]=O,class:"input op-copy",type:"text",maxlength:"32",placeholder:M(l)("doorlock.ui.character"),disabled:!u.value},null,8,Tv),[[un,e.draft.characters[I]]]),r("button",{class:"icon danger",title:M(l)("doorlock.ui.deleteRow"),disabled:!u.value,onClick:O=>e.draft.characters.splice(I,1)},[(c(),d("svg",Av,[(c(!0),d(ne,null,ve(a("trash"),(O,K)=>(c(),d("path",{key:K,d:O},null,8,Lv))),128))]))],8,Ev)]))),128)),r("button",{class:"add op-frame","data-augmented-ui":"tr-clip border",disabled:!u.value,title:M(l)("doorlock.ui.addRow"),onClick:w},"+",8,Ov)])):s.value==="groups"?(c(),d("div",Iv,[(c(!0),d(ne,null,ve(e.draft.groups,(B,I)=>(c(),d("div",{key:`g${I}`,class:"line"},[xt(r("input",{"onUpdate:modelValue":O=>B.name=O,class:"input op-copy",type:"text",maxlength:"48",placeholder:M(l)("doorlock.ui.group"),disabled:!u.value},null,8,Rv),[[un,B.name]]),r("input",{class:"input op-value narrow",type:"number",min:"0",max:"1000",step:"1",value:B.grade,placeholder:M(l)("doorlock.ui.grade"),disabled:!u.value,onChange:O=>B.grade=h(O,0,1e3)},null,40,Dv),r("button",{class:"icon danger",title:M(l)("doorlock.ui.deleteRow"),disabled:!u.value,onClick:O=>e.draft.groups.splice(I,1)},[(c(),d("svg",Pv,[(c(!0),d(ne,null,ve(a("trash"),(O,K)=>(c(),d("path",{key:K,d:O},null,8,Hv))),128))]))],8,Nv)]))),128)),r("button",{class:"add op-frame","data-augmented-ui":"tr-clip border",disabled:!u.value,title:M(l)("doorlock.ui.addRow"),onClick:k},"+",8,Fv)])):s.value==="items"?(c(),d("div",Bv,[(c(!0),d(ne,null,ve(e.draft.items,(B,I)=>(c(),d("div",{key:`i${I}`,class:"line"},[xt(r("input",{"onUpdate:modelValue":O=>B.name=O,class:"input op-copy",type:"text",maxlength:"48",placeholder:M(l)("doorlock.ui.item"),disabled:!u.value},null,8,Vv),[[un,B.name]]),xt(r("input",{"onUpdate:modelValue":O=>B.metadata=O,class:"input op-copy",type:"text",maxlength:"48",placeholder:M(l)("doorlock.ui.metadata"),disabled:!u.value},null,8,jv),[[un,B.metadata]]),r("button",{class:Z(["mini",{on:B.remove}]),disabled:!u.value,onClick:O=>B.remove=!B.remove},[r("span",{class:Z(["box",{ticked:B.remove}])},[...W[16]||(W[16]=[r("svg",{viewBox:"0 0 13 13","aria-hidden":"true"},[r("path",{d:"M2.6 6.8 5 9.2 10 3.6"})],-1)])],2),r("span",Kv,m(M(l)("doorlock.ui.remove")),1)],10,Uv),r("button",{class:"icon danger",title:M(l)("doorlock.ui.deleteRow"),disabled:!u.value,onClick:O=>e.draft.items.splice(I,1)},[(c(),d("svg",zv,[(c(!0),d(ne,null,ve(a("trash"),(O,K)=>(c(),d("path",{key:K,d:O},null,8,Zv))),128))]))],8,Wv)]))),128)),r("button",{class:"add op-frame","data-augmented-ui":"tr-clip border",disabled:!u.value,title:M(l)("doorlock.ui.addRow"),onClick:F},"+",8,Gv)])):s.value==="lockpick"?(c(),d("div",qv,[e.draft.steps.length===0?(c(),d("p",Yv,m(M(l)("doorlock.ui.stepsDefault",{steps:H.value})),1)):R("",!0),(c(!0),d(ne,null,ve(e.draft.steps,(B,I)=>(c(),d("div",{key:`s${I}`,class:"line"},[r("select",{class:"input op-copy",value:T(B),disabled:!u.value,onChange:O=>L(I,O)},[(c(!0),d(ne,null,ve(e.difficulties,O=>(c(),d("option",{key:O,value:O},m(M(l)(`doorlock.difficulty.${O}`)),9,Jv))),128)),r("option",Qv,m(M(l)("doorlock.ui.custom")),1)],40,Xv),typeof B!="string"?(c(),d(ne,{key:0},[r("input",{class:"input op-value narrow",type:"number",min:"1",max:"360",value:B.areaSize,title:M(l)("doorlock.ui.areaHint"),placeholder:M(l)("doorlock.ui.areaSize"),disabled:!u.value,onChange:O=>E(I,"areaSize",O)},null,40,ep),r("input",{class:"input op-value narrow",type:"number",min:"0.1",max:"10",step:"0.05",value:B.speedMultiplier,title:M(l)("doorlock.ui.speedHint"),placeholder:M(l)("doorlock.ui.speed"),disabled:!u.value,onChange:O=>E(I,"speedMultiplier",O)},null,40,tp)],64)):R("",!0),r("button",{class:"icon danger",title:M(l)("doorlock.ui.deleteRow"),disabled:!u.value,onClick:O=>e.draft.steps.splice(I,1)},[(c(),d("svg",op,[(c(!0),d(ne,null,ve(a("trash"),(O,K)=>(c(),d("path",{key:K,d:O},null,8,sp))),128))]))],8,np)]))),128)),r("button",{class:"add op-frame","data-augmented-ui":"tr-clip border",disabled:!u.value,title:M(l)("doorlock.ui.addRow"),onClick:A},"+",8,lp)])):(c(),d("div",ip,[e.sounds.length===0?(c(),d("p",ap,m(M(l)("doorlock.ui.noSounds")),1)):R("",!0),r("label",rp,[r("span",up,m(M(l)("doorlock.ui.lockSound")),1),xt(r("select",{"onUpdate:modelValue":W[7]||(W[7]=B=>e.draft.lockSound=B),class:"input op-copy",disabled:!u.value},[r("option",dp,m(M(l)("doorlock.ui.soundNone")),1),(c(!0),d(ne,null,ve(e.sounds,B=>(c(),d("option",{key:B,value:B},m(B),9,fp))),128)),e.draft.lockSound&&!e.sounds.includes(e.draft.lockSound)?(c(),d("option",{key:0,value:e.draft.lockSound},m(e.draft.lockSound),9,vp)):R("",!0)],8,cp),[[ti,e.draft.lockSound]])]),r("label",pp,[r("span",hp,m(M(l)("doorlock.ui.unlockSound")),1),xt(r("select",{"onUpdate:modelValue":W[8]||(W[8]=B=>e.draft.unlockSound=B),class:"input op-copy",disabled:!u.value},[r("option",gp,m(M(l)("doorlock.ui.soundNone")),1),(c(!0),d(ne,null,ve(e.sounds,B=>(c(),d("option",{key:B,value:B},m(B),9,bp))),128)),e.draft.unlockSound&&!e.sounds.includes(e.draft.unlockSound)?(c(),d("option",{key:0,value:e.draft.unlockSound},m(e.draft.unlockSound),9,_p)):R("",!0)],8,mp),[[ti,e.draft.unlockSound]])])])),r("footer",yp,[e.notice?(c(),d("p",{key:0,class:Z(["notice op-copy",{bad:!e.notice.ok}])},m(e.notice.text),3)):N.value?R("",!0):(c(),d("p",kp,m(M(l)("doorlock.ui.needDoor")),1)),r("div",wp,[r("button",{class:Z(["btn wide op-frame",{"is-on":u.value&&!e.saving,"is-off":!u.value||e.saving}]),"data-augmented-ui":"tr-clip border",disabled:!u.value||e.saving,title:e.access.save?"":M(l)("doorlock.ui.denied"),onClick:W[9]||(W[9]=B=>o("submit"))},[r("span",$p,m(e.saving?M(l)("doorlock.ui.saving"):M(l)("doorlock.ui.submit")),1)],10,xp),r("button",{class:"icon",title:M(l)("doorlock.ui.action.copy"),disabled:e.loading,onClick:W[10]||(W[10]=B=>o("copy"))},[(c(),d("svg",Cp,[(c(!0),d(ne,null,ve(a("folder"),(B,I)=>(c(),d("path",{key:I,d:B},null,8,Sp))),128))]))],8,Mp),r("button",{class:Z(["icon",{off:!e.hasCopy||!u.value}]),disabled:!e.hasCopy||!u.value,title:e.hasCopy?M(l)("doorlock.ui.applyCopy"):M(l)("doorlock.ui.noCopy"),onClick:W[11]||(W[11]=B=>o("apply"))},[(c(),d("svg",Ep,[(c(!0),d(ne,null,ve(a("import"),(B,I)=>(c(),d("path",{key:I,d:B},null,8,Ap))),128))]))],10,Tp),e.draft.id!==null?(c(),d("button",{key:0,class:Z(["icon",{off:!e.access.key}]),disabled:!e.access.key,title:e.access.key?M(l)("doorlock.ui.action.key"):M(l)("doorlock.ui.denied"),onClick:W[12]||(W[12]=B=>o("key"))},[(c(),d("svg",Op,[(c(!0),d(ne,null,ve(a("key"),(B,I)=>(c(),d("path",{key:I,d:B},null,8,Ip))),128))]))],10,Lp)):R("",!0),e.draft.id!==null?(c(),d("button",{key:1,class:Z(["icon danger",{off:!e.access.remove}]),disabled:!e.access.remove,title:e.access.remove?M(l)("doorlock.ui.action.delete"):M(l)("doorlock.ui.denied"),onClick:W[13]||(W[13]=B=>o("delete"))},[(c(),d("svg",Dp,[(c(!0),d(ne,null,ve(a("trash"),(B,I)=>(c(),d("path",{key:I,d:B},null,8,Np))),128))]))],10,Rp)):R("",!0)])])])]))}}),Hp=Fe(Pp,[["__scopeId","data-v-cfa8ad0b"]]),Fp={class:"bay op-bay op-arete","data-augmented-ui":"tr-clip bl-clip border"},Bp={class:"bay-inner op-interlace"},Vp={class:"head"},jp={class:"head-title op-label op-truncate"},Up={key:0,class:"head-mode op-value"},Kp=["title"],Wp={class:"ask op-bay op-arete","data-augmented-ui":"tr-clip bl-clip border"},zp={class:"ask-inner op-interlace"},Zp={class:"op-eyebrow"},Gp={class:"op-copy ask-text"},qp={class:"ask-row"},Yp={class:"op-label"},Xp={class:"op-label"},Jp=240,Qp=He({__name:"DoorlockView",setup(e){const{t}=nt(),n=S(null),s=S(!1),o=S(!0),l=S("list"),i=S(0),a=S("general"),u=S(""),p=S(vi({})),f=S(Ts({})),h=S([]),w=S([]),k=S([]);let F=[];const A=S(!1),T=mt(so(Ts({}))),L=S(null),E=S(!1),H=S(!1),D=S(null),N=S(!1),q=S(null),W=S(null),B=J(()=>l.value==="list"?t("doorlock.ui.title"):T.id===null?t("doorlock.ui.newDoor"):t("doorlock.ui.editDoor",{id:T.id}));function I(_){return typeof _=="string"||typeof _=="number"}function O(_){return n.value!==null&&_.handle===n.value}function K(_,P={}){$e(Xd[_],{...P,handle:n.value})}let V;function ge(_){_&&V===void 0?V=Pt({id:"doorlock",onEscape:()=>{if(q.value!==null){q.value=null;return}K("dismiss")}}):!_&&V!==void 0&&(V(),V=void 0)}function de(_){Object.assign(T,_)}function se(_){de(_!=null?_:so(f.value)),L.value=null,W.value=null,a.value="general",l.value="settings"}function ie(_){N.value=!1,de(so(f.value)),T.id=_,L.value=_,W.value=null,a.value="general",l.value="settings",K("detail",{id:_})}function fe(){l.value="list",L.value=null,H.value=!1,K("list")}function re(){s.value=!1,o.value=!0,k.value=[],F=[],A.value=!1,q.value=null,W.value=null,E.value=!1,L.value=null,H.value=!1}ye("opx:doorlock:open",_=>{Ie("doorlock:open",()=>{if(!I(_.handle))return;Ne(),re(),i.value+=1,n.value=_.handle,p.value=vi(_.access),f.value=Ts(_.defaults),h.value=pi(_.sounds),w.value=pi(_.difficulties),u.value=$(_.mode),s.value=!0;const P=$(_.view,"list"),j=ee(_.edit,-1);P==="edit"&&j>0?ie(j):P==="create"?se(Wd(f.value,_.draft)):l.value="list",ge(!0)},void 0)}),ye("opx:doorlock:rows",_=>{Ie("doorlock:rows",()=>{O(_)&&(ee(_.offset)===0&&(F=[]),F=F.concat(Kd(_.rows)),_.done===!0&&(k.value=F,F=[],A.value=!0))},void 0)}),ye("opx:doorlock:detail",_=>{Ie("doorlock:detail",()=>{if(!O(_))return;const P=zd(f.value,_.door);if(!(L.value===null||P.id!==L.value)){if(L.value=null,N.value){N.value=!1,D.value=hi(P),W.value={ok:!0,text:t("doorlock.ui.copied")},l.value="list";return}de(P)}},void 0)}),ye("opx:doorlock:patch",_=>{Ie("doorlock:patch",()=>{if(!O(_))return;const P=ee(_.id,-1),j=ee(_.state,1)===0?0:1;for(const Y of k.value)Y.id===P&&(Y.state=j)},void 0)}),ye("opx:doorlock:picked",_=>{Ie("doorlock:picked",()=>{if(!O(_))return;if(_.cancelled===!0){H.value=!1;return}const P=ml(_.doors);if(P.length===0)return;T.doors=P,T.double=P.length===2;const j=Ge([_.coords])[0],Y=ee(j.x,NaN),ue=ee(j.y,NaN),ae=ee(j.z,NaN);T.coords=Number.isFinite(Y)&&Number.isFinite(ue)&&Number.isFinite(ae)?{x:Y,y:ue,z:ae}:null,H.value&&(H.value=!1,Re())},void 0)});const Q={save:"doorlock.staff.saved",remove:"doorlock.staff.removed",key:"doorlock.staff.key_given"};function te(_,P){var j;if(_!=="save"&&P>0){const Y=k.value.find(ue=>ue.id===P);return Y?Y.name||`#${P}`:`#${P}`}return T.name||`#${(j=T.id)!=null?j:""}`}function xe(_,P,j,Y,ue=0){var X;if(P)return t((X=wt(Q,_))!=null?X:"doorlock.answer.done",{door:te(_,ue)});const ae=`doorlock.error.${j}`,oe=t(ae,{detail:Y,door:T.name});return oe===ae?t("doorlock.error.invalid"):oe}ye("opx:doorlock:result",_=>{Ie("doorlock:result",()=>{if(!O(_))return;const P=$(_.verb),j=De(_.ok);P==="save"&&(E.value=!1),P==="detail"&&!j&&(L.value=null,l.value="list"),W.value={ok:j,text:xe(P,j,$(_.code),$(_.detail),ee(_.id))},j&&Yd(P)&&l.value==="settings"&&(l.value="list")},void 0)}),ye("opx:doorlock:visible",_=>{Ie("doorlock:visible",()=>{O(_)&&(o.value=_.visible!==!1,ge(s.value&&o.value))},void 0)});let Me;function Ne(){Me!==void 0&&clearTimeout(Me),Me=void 0}ye("opx:doorlock:close",_=>{Ie("doorlock:close",()=>{_.handle!==void 0&&!O(_)||(n.value=null,s.value=!1,q.value=null,ge(!1),Ne(),Me=setTimeout(()=>{Me=void 0,s.value||re()},Jp))},void 0)}),rt(()=>{Ne(),ge(!1)});function Re(){var _;if(!(!p.value.save||E.value)){if(!er(T)){H.value=!0,qe();return}E.value=!0,W.value=null,K("save",{id:(_=T.id)!=null?_:void 0,door:Zs(Zd(T,f.value))})}}function qe(){var _;K("pick",{double:T.double,id:(_=T.id)!=null?_:void 0})}function Ze(_){N.value=!0,L.value=_.id,K("detail",{id:_.id})}function le(){if(D.value===null)return;const _=D.value;Object.assign(T,{..._,characters:[..._.characters],groups:_.groups.map(P=>({...P})),items:_.items.map(P=>({...P})),steps:_.steps.map(P=>typeof P=="string"?P:{...P})}),W.value={ok:!0,text:t("doorlock.ui.applied")}}function Ce(){D.value=hi(T),W.value={ok:!0,text:t("doorlock.ui.copied")}}function C(_,P){p.value.remove&&(q.value={id:_,name:P})}function pe(){q.value!==null&&(K("delete",{id:q.value.id}),q.value=null)}function be(_){p.value.lock&&K("state",{id:_.id,state:_.state===1?0:1})}function g(_){p.value.teleport&&K("teleport",{id:_.id})}function x(){!p.value.key||T.id===null||K("key",{id:T.id})}return(_,P)=>(c(),d("div",{class:Z(["panel op-plane op-ink",{open:s.value&&o.value}])},[r("div",Fp,[r("div",Bp,[r("header",Vp,[P[7]||(P[7]=r("span",{class:"op-eyebrow head-kicker"},"OPX // 77",-1)),r("h1",jp,m(B.value),1),u.value?(c(),d("span",Up,m(M(t)("doorlock.ui.mode",{mode:u.value})),1)):R("",!0),r("button",{class:"close op-frame","data-augmented-ui":"tr-clip border",title:M(t)("doorlock.ui.close"),onClick:P[0]||(P[0]=j=>K("dismiss"))}," × ",8,Kp)]),xt((c(),pt(Vf,{key:i.value,rows:k.value,loaded:A.value,access:p.value,onCreate:P[1]||(P[1]=j=>se()),onEdit:ie,onCopy:Ze,onTeleport:g,onToggle:be,onDelete:P[2]||(P[2]=j=>C(j.id,j.name))},null,8,["rows","loaded","access"])),[[Do,l.value==="list"]]),l.value!=="list"?(c(),pt(Hp,{key:0,tab:a.value,"onUpdate:tab":P[3]||(P[3]=j=>a.value=j),draft:T,defaults:f.value,access:p.value,sounds:h.value,difficulties:w.value,loading:L.value!==null,saving:E.value,"has-copy":D.value!==null,notice:W.value,onBack:fe,onSubmit:Re,onPick:qe,onApply:le,onCopy:Ce,onKey:x,onDelete:P[4]||(P[4]=j=>T.id!==null&&C(T.id,T.name))},null,8,["tab","draft","defaults","access","sounds","difficulties","loading","saving","has-copy","notice"])):R("",!0),l.value==="list"&&W.value?(c(),d("p",{key:1,class:Z(["notice op-copy",{bad:!W.value.ok}])},m(W.value.text),3)):R("",!0)])]),q.value?(c(),d("div",{key:0,class:"veil",onClick:P[6]||(P[6]=_t(j=>q.value=null,["self"]))},[r("div",Wp,[r("div",zp,[r("p",Zp,m(M(t)("doorlock.ui.confirmTitle")),1),r("p",Gp,m(M(t)("doorlock.ui.confirmDelete",{door:q.value.name})),1),r("div",qp,[r("button",{class:"btn op-frame","data-augmented-ui":"tr-clip border",onClick:P[5]||(P[5]=j=>q.value=null)},[r("span",Yp,m(M(t)("doorlock.ui.cancel")),1)]),r("button",{class:"btn danger op-frame is-on","data-augmented-ui":"tr-clip border",onClick:pe},[r("span",Xp,m(M(t)("doorlock.ui.confirm")),1)])])])])])):R("",!0)],2))}}),eh=Fe(Qp,[["__scopeId","data-v-1ab515ce"]]);function th(e,t={}){var h;const n=(h=t.tickMs)!=null?h:250,s=S(Date.now());let o;function l(){o!==void 0&&(clearInterval(o),o=void 0)}function i(){l(),s.value=Date.now(),o=setInterval(()=>{s.value=Date.now(),a.value<=0&&l()},n)}const a=J(()=>Math.max(0,e.value-s.value)),u=J(()=>Math.ceil(a.value/1e3)),p=J(()=>a.value<=0),f=J(()=>{const w=u.value,k=Math.floor(w/60),F=w%60;return`${String(k).padStart(2,"0")}:${String(F).padStart(2,"0")}`});return bt(e,w=>{w>0?i():l()},{immediate:!0}),rt(l),{remainingMs:a,seconds:u,clock:f,done:p,stop:l}}const nh={class:"stage op-plane"},oh={class:"bay op-bay op-arete","data-augmented-ui":"tr-clip bl-clip border"},sh={class:"bay-inner op-interlace"},lh={class:"head"},ih={class:"eyebrow op-eyebrow"},ah={class:"subtitle op-copy"},rh={class:"vitals"},uh={class:"read"},ch={class:"op-eyebrow"},dh={class:"glyph",viewBox:"0 0 24 24","aria-hidden":"true"},fh=["d"],vh={class:"unit op-eyebrow"},ph={class:"read"},hh={class:"op-eyebrow"},mh={class:"glyph",viewBox:"0 0 24 24","aria-hidden":"true"},gh=["d"],bh={class:"figure op-value op-truncate"},_h={class:"read"},yh={class:"op-eyebrow"},kh={class:"glyph",viewBox:"0 0 24 24","aria-hidden":"true"},wh=["d"],xh={class:"figure op-value op-truncate"},$h={class:"choices"},Mh=["aria-pressed"],Ch={class:"mark",viewBox:"0 0 24 24","aria-hidden":"true"},Sh=["d"],Th={class:"choice-text"},Eh={class:"choice-label op-label op-truncate"},Ah={class:"choice-hint op-copy"},Lh=["aria-disabled"],Oh={class:"mark",viewBox:"0 0 24 24","aria-hidden":"true"},Ih=["d"],Rh={class:"choice-text"},Dh={class:"choice-label op-label op-truncate"},Nh={class:"choice-hint op-copy"},Ph=["aria-hidden"],Hh=100,Fh=32,Bh=5e3,Vh="00",jh=He({__name:"DownedView",setup(e){const t={eyebrow:"medic.screen.eyebrow",title:"medic.screen.title",subtitle:"medic.screen.subtitle",vitals:"medic.screen.vitals",bpm:"medic.screen.bpm",down:"medic.screen.down",signal:"medic.screen.signal",signalOff:"medic.screen.signalOff",signalOn:"medic.screen.signalOn",waitLabel:"medic.wait.label",waitHint:"medic.wait.hint",waitActive:"medic.wait.active",waitActiveHint:"medic.wait.activeHint",giveUpLabel:"medic.giveUp.label",giveUpHint:"medic.giveUp.hint",giveUpLocked:"medic.giveUp.locked",giveUpHolding:"medic.giveUp.holding"},n=S(!1),s=S(!1),o=S(!1),l=S(1500),i=S(""),a=S({}),u=S(0),p=S(0),f=S(Date.now()),h=S(!1),w=S(!1),k=th(p);let F,A,T,L,E;function H(Q){var te;return(te=a.value[Q])!=null?te:Q}function D(Q,te){return Q.replace(/\{(\w+)\}/g,(xe,Me)=>{var Ne;return(Ne=te[Me])!=null?Ne:xe})}function N(Q){const te=Math.max(0,Math.ceil(Q/1e3));return`${String(Math.floor(te/60)).padStart(2,"0")}:${String(te%60).padStart(2,"0")}`}const q=J(()=>!k.done.value),W=J(()=>n.value&&!s.value&&!q.value),B=J(()=>N(Math.max(0,f.value-u.value))),I=J(()=>h.value?H(t.giveUpHolding):H(t.giveUpLabel)),O=J(()=>q.value?D(H(t.giveUpLocked),{time:k.clock.value}):H(t.giveUpHint));function K(Q){A!==void 0&&clearInterval(A),A=void 0,L!==void 0&&clearTimeout(L),L=void 0,window.removeEventListener("pointerup",V),window.removeEventListener("pointercancel",V),window.removeEventListener("blur",V);const te=h.value;h.value=!1,w.value=!1,te&&Q&&$e("opx:downed:giveUp",{holding:!1})}function V(){K(!0)}function ge(){!W.value||h.value||(h.value=!0,w.value=!1,$e("opx:downed:giveUp",{holding:!0}),A=setInterval(()=>$e("opx:downed:giveUp",{holding:!0}),Hh),L=setTimeout(()=>{w.value=!0},Fh),window.addEventListener("pointerup",V),window.addEventListener("pointercancel",V),window.addEventListener("blur",V))}function de(){!n.value||s.value||o.value||$e("opx:downed:wait",{})}function se(Q){if(Q){if(F!==void 0)return;F=Pt({id:"downed",onEscape:()=>{}});return}F!==void 0&&(F(),F=void 0)}function ie(){n.value=!1,s.value=!1,o.value=!1,i.value="",k.stop(),K(!1),T!==void 0&&clearInterval(T),T=void 0,E!==void 0&&clearTimeout(E),E=void 0}function fe(Q){const te=Date.now();Object.keys(a.value).length===0&&$e("opx:downed:diag",{text:"show arrived before config; drawing keys"}),o.value=Q.waiting===!0,s.value=Q.suspended===!0,l.value=Math.max(0,ee(Q.holdMs,1500)),u.value=te-Math.max(0,ee(Q.downForMs));const Me=Math.max(0,ee(Q.giveUpInMs));p.value=Me>0?te+Me:0,f.value=te,T===void 0&&(T=setInterval(()=>{f.value=Date.now()},1e3)),s.value&&K(!1),n.value=!0}ye("opx:downed:view",Q=>{Ie("downed:view",()=>{switch($(Q.kind)){case"config":{const te=Oe(Q.text),xe={};for(const Me of Object.keys(te)){const Ne=$(te[Me]);Ne!==""&&(xe[Me]=Ne)}a.value=xe;break}case"show":fe(Q);break;case"hide":ie(),se(!1);break;case"notice":{i.value=$(Q.text),E!==void 0&&clearTimeout(E),E=setTimeout(()=>{i.value=""},Bh);break}case"focus":se(Q.hold===!0);break}},void 0)});function re(Q){if(!n.value||s.value||Q.defaultPrevented)return;const te=Q.key,xe=/^F\d{1,2}$/.test(te)?te:te.length===1?te.toUpperCase():"";/^(F\d{1,2}|[A-Z0-9])$/.test(xe)&&$e("opx:downed:key",{key:xe})}return Lt(()=>{window.addEventListener("keydown",re),$e("opx:downed:ready",{})}),rt(()=>{window.removeEventListener("keydown",re),ie(),se(!1)}),(Q,te)=>(c(),d("div",{class:Z(["room op-ink",{open:n.value,aside:s.value}])},[r("div",nh,[r("div",oh,[r("div",sh,[r("div",lh,[r("span",ih,m(H(t.eyebrow)),1),r("h1",null,m(H(t.title)),1),r("p",ah,m(H(t.subtitle)),1)]),r("dl",rh,[r("div",uh,[r("dt",ch,m(H(t.vitals)),1),r("dd",null,[(c(),d("svg",dh,[(c(!0),d(ne,null,ve(M(At).heart,(xe,Me)=>(c(),d("path",{key:Me,d:xe},null,8,fh))),128))])),r("span",{class:"figure op-value op-truncate"},m(Vh)),r("span",vh,m(H(t.bpm)),1)])]),r("div",ph,[r("dt",hh,m(H(t.down)),1),r("dd",null,[(c(),d("svg",mh,[(c(!0),d(ne,null,ve(M(At).clock,(xe,Me)=>(c(),d("path",{key:Me,d:xe},null,8,gh))),128))])),r("span",bh,m(B.value),1)])]),r("div",_h,[r("dt",yh,m(H(t.signal)),1),r("dd",{class:Z({live:o.value})},[(c(),d("svg",kh,[(c(!0),d(ne,null,ve(M(At).bolt,(xe,Me)=>(c(),d("path",{key:Me,d:xe},null,8,wh))),128))])),r("span",xh,m(o.value?H(t.signalOn):H(t.signalOff)),1)],2)])]),r("div",$h,[r("div",{class:Z(["choice op-frame",{"is-on":o.value}]),"data-augmented-ui":"tr-clip border",role:"button","aria-pressed":o.value,onClick:de},[(c(),d("svg",Ch,[(c(!0),d(ne,null,ve(M(At).heal,(xe,Me)=>(c(),d("path",{key:Me,d:xe},null,8,Sh))),128))])),r("span",Th,[r("span",Eh,m(o.value?H(t.waitActive):H(t.waitLabel)),1),r("span",Ah,m(o.value?H(t.waitActiveHint):H(t.waitHint)),1)])],10,Mh),r("div",{class:Z(["choice give-up op-frame",{"is-off":q.value,"is-on":h.value}]),"data-augmented-ui":"tr-clip border",role:"button","aria-disabled":q.value,onPointerdown:_t(ge,["prevent"]),onPointerleave:te[0]||(te[0]=xe=>K(!0))},[r("span",{class:"charge",style:Ee({transform:w.value?"scaleX(1)":"scaleX(0)",transitionDuration:h.value?`${l.value}ms`:"120ms"})},null,4),(c(),d("svg",Oh,[(c(!0),d(ne,null,ve(M(At).location,(xe,Me)=>(c(),d("path",{key:Me,d:xe},null,8,Ih))),128))])),r("span",Rh,[r("span",Dh,m(I.value),1),r("span",Nh,m(O.value),1)])],42,Lh)]),r("p",{class:"notice op-copy","aria-hidden":!i.value},m(i.value),9,Ph)])])])],2))}}),Uh=Fe(jh,[["__scopeId","data-v-e450af29"]]),Kh={class:"bay-inner"},Wh={class:"head"},zh={class:"head-text"},Zh={class:"eyebrow"},Gh={class:"op-truncate"},qh={key:0,class:"note"},Yh=["data-field"],Xh=["onClick"],Jh={class:"label op-label op-truncate"},Qh={class:"cell"},em=["value","placeholder","onInput"],tm={key:1,class:"rule"},nm={key:2,class:"value op-value op-truncate"},om={key:4,class:"marks"},sm=["onClick"],lm=["onClick"],im={key:1,class:"foot"},am={key:0,class:"hint op-copy"},rm={key:2,class:"keys"},um={class:"cap","data-augmented-ui":"tr-clip border"},cm={class:"cap-label"},dm=240,fm=He({__name:"FormView",setup(e){const{t,has:n}=nt(),s=J(()=>n("form.eyebrow")?t("form.eyebrow"):"FORM"),o={ArrowUp:"up",ArrowDown:"down",ArrowLeft:"left",ArrowRight:"right",Enter:"enter"},l={center:"anchor-center","top-left":"anchor-top-left","top-right":"anchor-top-right",left:"anchor-left",right:"anchor-right"},i=S(null),a=S(!1),u=S(""),p=S(""),f=S(""),h=S(""),w=S(!1),k=S([]),F=S([]),A=S("anchor-center"),T=S(420),L=S(!0),E=S(null),H=new Map;let D=0;const N=J(()=>`width: ${T.value}px`),q=J(()=>k.value.find(le=>le.on)),W=J(()=>A.value.endsWith("right"));function B(le){return le.replace(/[\uDC00-\uDFFF]/g,"").length}function I(le){return Math.max(le.shown.length,le.placeholder.length)+1}function O(le){const Ce=le.max-le.min;if(Ce<=0)return"0%";const C=(le.number-le.min)/Ce;return`${Math.max(0,Math.min(1,C))*100}%`}function K(le){return typeof le=="string"||typeof le=="number"}function V(le){return i.value!==null&&le.handle===i.value}function ge(le){var C;A.value=(C=wt(l,$(le.anchor)))!=null?C:l.center;const Ce=ee(le.width);Ce>0&&(T.value=Math.round(Ce)),L.value=le.dim!==!1}function de(le){u.value=$(le.title)||"INPUT",p.value=$(le.note),f.value=$(le.hint),h.value=$(le.status),w.value=le.statusBad===!0,F.value=Ge(le.keys).map(C=>({key:$(C.key),label:$(C.label)}));const Ce=new Set;k.value=Ge(le.rows).map(C=>{const pe=$(C.kind,"text"),be=pe==="choice"||pe==="slider"?pe:"text",g=$(C.id),x=$(C.text);Ce.add(g);const _=ee(C.ack),P=H.get(g);let j=x;P!==void 0&&(_>=P.seq?H.delete(g):j=P.text);const Y=ee(C.min),ue=ee(C.max,be==="slider"?100:0);return{id:g,kind:be,label:$(C.label),buffer:x,shown:j,value:$(C.value),number:typeof C.number=="number"?C.number:Y+ee(C.fill)*(ue-Y),min:Y,max:be==="slider"?ue:100,placeholder:$(C.placeholder),count:be==="text"&&ue>0?`${B(x)}/${Math.round(ue)}`:"",spin:C.spin===!0,on:C.on===!0}});for(const C of H.keys())Ce.has(C)||H.delete(C);ot(se)}function se(){!a.value||po()!=="form"||Ie("form:caret",()=>{const le=E.value;if(!le)return;const Ce=q.value;if(Ce&&Ce.kind==="text"){const pe=le.querySelector(`[data-field="${CSS.escape(Ce.id)}"] input`);if(pe&&document.activeElement!==pe){pe.focus();const be=pe.value.length;pe.setSelectionRange(be,be)}return}const C=document.activeElement;C instanceof HTMLElement&&C.blur()},void 0)}let ie;function fe(){ie!==void 0&&clearTimeout(ie),ie=void 0}function re(){var Ce;a.value=!1,H.clear();const le=document.activeElement;le instanceof HTMLElement&&((Ce=E.value)!=null&&Ce.contains(le))&&le.blur(),fe(),ie=setTimeout(()=>{ie=void 0,!a.value&&(k.value=[],F.value=[],p.value="",f.value="",h.value="",w.value=!1)},dm)}let Q;function te(le){var C;if(!a.value||po()!=="form"||le.key==="Escape")return;const Ce=o[le.key];Ce!==void 0&&((Ce==="left"||Ce==="right")&&((C=q.value)==null?void 0:C.spin)!==!0||(le.preventDefault(),$e("opx:form:key",{handle:i.value,key:Ce,repeat:le.repeat===!0})))}function xe(le){le?window.addEventListener("keydown",te):window.removeEventListener("keydown",te)}ye("opx:form:open",le=>{Ie("form:open",()=>{K(le.handle)&&(Q==null||Q(),H.clear(),fe(),i.value=le.handle,ge(le),de(le),a.value=!0,xe(!0),Q=Pt({id:"form",onEscape:()=>$e("opx:form:dismiss",{handle:i.value})}))},void 0)}),ye("opx:form:frame",le=>{Ie("form:frame",()=>{V(le)&&de(le)},void 0)}),ye("opx:form:close",le=>{Ie("form:close",()=>{le.handle!==void 0&&!V(le)||(i.value=null,re(),xe(!1),Q==null||Q(),Q=void 0)},void 0)}),rt(()=>{fe(),xe(!1),Q==null||Q()});function Me(le,Ce){D+=1,H.set(le.id,{seq:D,text:Ce}),$e("opx:form:edit",{handle:i.value,id:le.id,seq:D,text:Ce})}const Ne=new WeakMap,Re={beforeUpdate(le){var Ce;document.activeElement===le&&Ne.set(le,{was:le.value,at:(Ce=le.selectionStart)!=null?Ce:le.value.length})},updated(le){const Ce=Ne.get(le);if(Ne.delete(le),Ce===void 0||document.activeElement!==le||Ce.was===le.value)return;const C=Ce.at-(Ce.was.length-le.value.length),pe=Math.max(0,Math.min(le.value.length,C));le.setSelectionRange(pe,pe)}};function qe(le,Ce){$e("opx:form:step",{handle:i.value,id:le.id,direction:Ce})}function Ze(le){le.on||$e("opx:form:focus",{handle:i.value,id:le.id})}return(le,Ce)=>(c(),d("div",{class:Z(["room",{open:a.value}])},[L.value?(c(),d("div",{key:0,class:Z(["scrim",{shown:a.value}])},null,2)):R("",!0),r("div",{class:Z(["strip",[A.value,{end:W.value}]]),style:Ee(N.value)},[r("div",{class:Z(["bay op-bay op-arete",{"is-end":W.value}]),"data-augmented-ui":"tr-clip bl-clip border"},[r("div",Kh,[r("div",Wh,[r("div",zh,[r("span",Zh,m(s.value),1),r("h1",Gh,m(u.value),1)])]),p.value?(c(),d("p",qh,m(p.value),1)):R("",!0),r("ul",{ref_key:"listEl",ref:E,class:"list"},[(c(!0),d(ne,null,ve(k.value,C=>(c(),d("li",{key:C.id,class:"slot","data-field":C.id},[r("div",{class:Z(["field",[`kind-${C.kind}`,{on:C.on}]]),"data-augmented-ui":"tr-clip border",onClick:pe=>Ze(C)},[r("span",Jh,m(C.label),1),r("span",Qh,[C.kind==="text"?xt((c(),d("input",{key:0,class:"entry",type:"text",spellcheck:"false",autocomplete:"off",value:C.shown,placeholder:C.placeholder,style:Ee({"--chars":I(C)}),onInput:pe=>Me(C,pe.target.value)},null,44,em)),[[Re]]):R("",!0),C.kind==="slider"?(c(),d("span",tm,[r("i",{style:Ee({width:O(C)})},null,4)])):R("",!0),C.kind!=="text"?(c(),d("span",nm,m(C.value),1)):R("",!0),C.kind==="text"&&C.count?(c(),d("span",{key:3,class:Z(["count",{quiet:!C.on}])},m(C.count),3)):R("",!0),C.kind==="choice"?(c(),d("span",om,[r("button",{class:"mark",type:"button",onClick:_t(pe=>qe(C,-1),["stop"])},"‹",8,sm),r("button",{class:"mark",type:"button",onClick:_t(pe=>qe(C,1),["stop"])},"›",8,lm)])):R("",!0)])],10,Xh)],8,Yh))),128))],512),f.value||h.value||F.value.length?(c(),d("div",im,[f.value?(c(),d("p",am,m(f.value),1)):R("",!0),h.value?(c(),d("p",{key:1,class:Z(["status",{bad:w.value}])},m(h.value),3)):R("",!0),F.value.length?(c(),d("div",rm,[(c(!0),d(ne,null,ve(F.value,C=>(c(),d("span",{key:C.key,class:"key"},[r("kbd",um,m(C.key),1),r("span",cm,m(C.label),1)]))),128))])):R("",!0)])):R("",!0)])],2)],6)],2))}}),vm=Fe(fm,[["__scopeId","data-v-960ebf0f"]]),pm=["bottom-left","bottom-right","top-left","top-right","top-center","bottom-center"];function $o(e,t){const n=$(e);return pm.indexOf(n)===-1?t:n}function hm(e){return e.indexOf("-right")===-1?"start":"end"}const mm={class:"inner"},gm={class:"label"},bm={key:0,class:"value"},_m=He({__name:"HudInfo",props:{anchor:{default:"top-right"}},setup(e){const{t}=nt(),n=e,s=["neutral","on","warn","bad"],o=at([]),l=J(()=>hm(n.anchor)==="end");function i(a){const u=$(a,"neutral");return s.indexOf(u)===-1?"neutral":u}return ye("opx:hud:info",a=>{o.value=Ge(a.lines).filter(u=>$(u.id)!=="").map(u=>({id:$(u.id),label:$(u.label),value:$(u.value),tone:i(u.tone)}))}),(a,u)=>o.value.length?(c(),d("section",{key:0,class:Z(["info",l.value?"to-end":"to-start"])},[r("div",mm,[(c(!0),d(ne,null,ve(o.value,p=>(c(),d("div",{key:p.id,class:Z(["line",p.tone])},[r("span",gm,m(M(t)(p.label)),1),p.value?(c(),d("span",bm,m(p.value),1)):R("",!0)],2))),128))])],2)):R("",!0)}}),ym=Fe(_m,[["__scopeId","data-v-a84ff7f8"]]),km={key:0,class:"strip"},wm={key:0,class:"icon"},xm={class:"label"},$m={key:0,class:"chip overflow"},Mm={class:"label"},Cm=12,Sm=999,Tm=50,Em=He({__name:"HudStatus",setup(e){const{t}=nt(),n={neutral:"neutral",accent:"accent",ok:"ok",warn:"warn",bad:"bad",shock:"shock",bleed:"bad",burn:"warn",chem:"ok"},s=at([]),o=at(0);let l;ye("opx:hud:status",p=>{var k;const f=Date.now(),h=new Set,w=[];for(const F of Ge(p.chips)){if(w.length>=Cm)break;const A=$(F.id);if(!A||h.has(A))continue;h.add(A);const T=ee(F.remainingMs),L=ee(F.totalMs),E=T>0&&L>0,H=typeof F.progress=="number"?Math.max(0,Math.min(1,F.progress)):-1;w.push({id:A,icon:$(F.icon).slice(0,4),label:$(F.label),tone:(k=wt(n,$(F.tone,"neutral")))!=null?k:"neutral",endsAt:E?f+T:0,totalMs:E?L:0,progress:E?Math.max(0,Math.min(1,T/L)):H})}s.value=w,o.value=Math.max(0,Math.min(Sm,Math.round(ee(p.hidden)))),a()});function i(){const p=Date.now();let f=!1,h=!1;const w=s.value.map(k=>{if(k.endsAt===0)return k;const F=Math.max(0,Math.min(1,(k.endsAt-p)/k.totalMs));return F>0&&(f=!0),Math.abs(F-k.progress)<.002?k:(h=!0,{...k,progress:F})});h&&(s.value=w),f||u()}function a(){l===void 0&&s.value.some(p=>p.endsAt>0)&&(l=setInterval(()=>Ie("hud status tick",i,void 0),Tm))}function u(){l!==void 0&&(clearInterval(l),l=void 0)}return rt(u),(p,f)=>s.value.length?(c(),d("div",km,[(c(!0),d(ne,null,ve(s.value,h=>(c(),d("span",{key:h.id,class:Z(["chip",h.tone]),"data-augmented-ui":"tr-clip border"},[h.icon?(c(),d("span",wm,m(h.icon),1)):R("",!0),r("span",xm,m(M(t)(h.label)),1),h.progress>=0?(c(),d("span",{key:1,class:"time",style:Ee({transform:`scaleX(${Math.max(0,Math.min(1,h.progress))})`})},null,4)):R("",!0)],2))),128)),o.value>0?(c(),d("span",$m,[r("span",Mm,"+"+m(o.value),1)])):R("",!0)])):R("",!0)}}),Am=Fe(Em,[["__scopeId","data-v-9b376df2"]]),gl=mt({bottomRight:0,bottomCenter:0}),Gs=Bn(gl);function Es(e){gl.bottomRight=e>0&&Number.isFinite(e)?Math.round(e):0}function As(e){gl.bottomCenter=e>0&&Number.isFinite(e)?Math.round(e):0}const Lm={class:"dial"},Om={class:"rings",viewBox:"0 0 120 120","aria-hidden":"true"},Im={class:"core"},Rm={class:"speed"},Dm={key:0,class:"unit"},Nm={class:"meta"},Pm={class:"label"},Hm={class:"label"},Fm={class:"fuel-track"},Bm={key:2,class:"chip","data-augmented-ui":"tr-clip border"},Vm={class:"chip-label"},jm=85,Um=250,mi="M23.2 96.8A52 52 0 1 1 96.8 96.8",Ls="M29 91A44 44 0 1 1 91 91",gi="M20.7 99.3A55.5 55.5 0 1 1 99.3 99.3",Km="M25.7 94.3A48.5 48.5 0 1 1 94.3 94.3",bi=200,Wm=He({__name:"HudVehicle",setup(e){const{t}=nt(),n=["neutral","warn","bad"],o=at({active:!1,speed:0,unit:"",gear:"N",rpm:-1,integrity:-1,integrityLabel:"",tone:"neutral",airborne:"",fuel:-1,fuelLabel:"",fuelTone:"neutral"});ye("opx:hud:vehicle",h=>{if(h.active!==!0){o.value={...o.value,active:!1};return}const w=$(h.tone,"neutral"),k=$(h.fuelTone,"neutral");o.value={active:!0,speed:Math.max(0,Math.round(ee(h.speed))),unit:$(h.unit),gear:$(h.gear,"N")||"N",rpm:typeof h.rpm=="number"?Math.max(0,Math.min(100,h.rpm)):-1,integrity:typeof h.integrity=="number"?Math.max(0,Math.min(100,h.integrity)):-1,integrityLabel:t($(h.integrityLabel)),tone:n.indexOf(w)===-1?"neutral":w,airborne:h.airborne===!0?t($(h.airborneLabel)):"",fuel:typeof h.fuel=="number"?Math.max(0,Math.min(100,h.fuel)):-1,fuelLabel:t($(h.fuelLabel)),fuelTone:n.indexOf(k)===-1?"neutral":k}});const l=J(()=>{const h=o.value,w=h.rpm>=0?h.rpm:h.speed/Um*100;return Math.max(0,Math.min(100,w))}),i=S(null);let a=null;function u(){var T;const h=(T=i.value)==null?void 0:T.parentElement;if(!o.value.active||!h){As(0);return}const w=h.getBoundingClientRect(),k=window.innerWidth/2,F=w.leftk-bi,A=w.bottom>window.innerHeight/2;As(F&&A?window.innerHeight-w.top:0)}bt(()=>o.value.active,u,{flush:"post"}),Lt(()=>{window.addEventListener("resize",u),i.value&&typeof ResizeObserver!="undefined"&&(a=new ResizeObserver(u),a.observe(i.value))}),ls(()=>{window.removeEventListener("resize",u),a==null||a.disconnect(),a=null,As(0)});const p=J(()=>o.value.rpm>=jm),f=J(()=>{const h=o.value.gear;return h==="R"?"reverse":h==="N"?"idle":"drive"});return(h,w)=>(c(),d("div",{ref_key:"root",ref:i,class:Z(["vehicle",{live:o.value.active,hot:p.value}])},[r("div",Lm,[(c(),d("svg",Om,[r("path",{class:"shade",d:mi,pathLength:"100"}),r("path",{class:"rail",d:gi,pathLength:"100"}),r("path",{class:"rail",d:Km,pathLength:"100"}),r("path",{class:"redline",d:gi,pathLength:"100"}),r("path",{class:"rpm",d:mi,pathLength:"100",style:Ee({strokeDasharray:l.value+" 100"})},null,4),o.value.integrity>=0?(c(),d(ne,{key:0},[r("path",{class:"shade-in",d:Ls,pathLength:"100"}),r("path",{class:"inner-track",d:Ls,pathLength:"100"}),r("path",{class:Z(["integrity",o.value.tone]),d:Ls,pathLength:"100",style:Ee({strokeDasharray:o.value.integrity+" 100"})},null,6)],64)):R("",!0)])),r("div",Im,[r("span",Rm,m(o.value.speed),1),o.value.unit?(c(),d("span",Dm,m(o.value.unit),1)):R("",!0)]),r("span",{class:Z(["gear",f.value]),"data-augmented-ui":"tr-clip border"},m(o.value.gear),3)]),r("div",Nm,[o.value.integrity>=0?(c(),d("span",{key:0,class:Z(["integrity-row",o.value.tone])},[r("span",Pm,m(o.value.integrityLabel),1),r("b",null,m(Math.round(o.value.integrity))+"%",1)],2)):R("",!0),o.value.fuel>=0?(c(),d("span",{key:1,class:Z(["fuel-row",o.value.fuelTone])},[r("span",Hm,m(o.value.fuelLabel),1),r("span",Fm,[r("span",{class:"fuel-fill",style:Ee({width:o.value.fuel+"%"})},null,4)]),r("b",null,m(Math.round(o.value.fuel))+"%",1)],2)):R("",!0),o.value.airborne?(c(),d("span",Bm,[w[0]||(w[0]=r("span",{class:"chip-icon"},"!",-1)),r("span",Vm,m(o.value.airborne),1)])):R("",!0)])],2))}}),zm=Fe(Wm,[["__scopeId","data-v-2ebf6666"]]),Zm={health:["M8 13.5S2 10 2 6.2A3.2 3.2 0 0 1 8 4.6 3.2 3.2 0 0 1 14 6.2C14 10 8 13.5 8 13.5Z"],armor:["M8 1.8 13.4 4v4.2c0 3.2-2.4 5.3-5.4 6.2-3-0.9-5.4-3-5.4-6.2V4Z"],stamina:["M9.2 1.6 4.2 8.9h3.4l-.8 5.5 5-7.3H8.4Z"],hunger:["M4.4 1.9v4.6a1.6 1.6 0 0 0 3.2 0V1.9","M6 6.5v7.6","M11.6 1.9c-1 0-1.8 1.6-1.8 3.6s.8 2.6 1.8 2.6Z","M11.6 8.1v6"],thirst:["M8 1.8s4.3 4.6 4.3 7.5A4.3 4.3 0 0 1 8 14.2 4.3 4.3 0 0 1 3.7 9.3C3.7 6.4 8 1.8 8 1.8Z"]};function Gm(e){var t;return(t=wt(Zm,e))!=null?t:[]}const qm=["aria-valuenow","aria-label"],Ym={class:"glyph","aria-hidden":"true"},Xm={key:0,viewBox:"0 0 16 16","aria-hidden":"true"},Jm=["d"],Qm={class:"track","data-augmented-ui":"tr-clip border"},eg={class:"bar"},tg={class:"readout"},ng=He({__name:"HudVitals",props:{segments:{default:10},width:{default:210}},setup(e){const{t}=nt(),n=["neutral","health","warn","bad"],s=at([]);function o(u){const p=$(u,"neutral");return n.indexOf(p)===-1?"neutral":p}function l(u){return Math.max(0,Math.min(100,u))/100}function i(u){return Math.round(Math.max(0,Math.min(100,u)))}function a(u){return u.points===null?i(u.value):u.points}return ye("opx:hud:vitals",u=>{s.value=Ge(u.gauges).filter(p=>$(p.id)!=="").map(p=>({id:$(p.id),icon:Gm($(p.icon)),label:$(p.label),value:ee(p.pct),points:p.points===void 0||p.points===null?null:ee(p.points),tone:o(p.tone)}))}),(u,p)=>(c(),d("div",{class:"vitals",style:Ee({"--vitals-width":e.width+"px","--segs":e.segments})},[(c(!0),d(ne,null,ve(s.value,f=>(c(),d("div",{key:f.id,class:Z(["gauge",f.tone]),role:"meter","aria-valuenow":i(f.value),"aria-valuemin":0,"aria-valuemax":100,"aria-label":M(t)(f.label)},[r("span",Ym,[f.icon.length?(c(),d("svg",Xm,[(c(!0),d(ne,null,ve(f.icon,(h,w)=>(c(),d("path",{key:w,d:h},null,8,Jm))),128))])):R("",!0)]),r("span",Qm,[r("span",eg,[r("span",{class:"fill",style:Ee({transform:`scaleX(${l(f.value)})`})},null,4)])]),r("span",tg,m(a(f)),1)],10,qm))),128))],4))}}),og=Fe(ng,[["__scopeId","data-v-3e3bc200"]]),sg={class:"panel"},lg={class:"inner"},ig={class:"head"},ag={key:0,class:"caption op-truncate"},rg=["aria-valuenow"],ug={class:"meter"},cg={key:0,class:"reach"},dg={key:0,class:"mode"},fg={key:1,class:"distance"},vg={key:1,class:"pips"},pg={key:2,class:"keys"},hg={key:0,class:"cap","data-augmented-ui":"tr-clip border"},mg={key:1,class:"cap quiet","data-augmented-ui":"tr-clip border"},gg={key:3,class:"rx","data-augmented-ui":"tr-clip border"},bg=He({__name:"HudVoice",props:{segments:{default:8}},setup(e){const{t}=nt(),n=["idle","detected","talking","muted","offline"],o=at({active:!1,state:"offline",caption:"",mode:"",distance:"",level:0,count:0,index:0,key:"",activation:"",heard:0});ye("opx:hud:voice",i=>{if(i.active!==!0){o.value={...o.value,active:!1};return}const a=$(i.state,"offline"),u=Math.max(0,Math.min(8,Math.round(ee(i.count))));o.value={active:!0,state:n.indexOf(a)===-1?"offline":a,caption:t($(i.caption)),mode:t($(i.mode)),distance:$(i.distance),level:Math.max(0,Math.min(100,ee(i.level))),count:u,index:Math.max(0,Math.min(u,Math.round(ee(i.index)))),key:$(i.key),activation:$(i.activation),heard:Math.max(0,Math.round(ee(i.heard)))}});function l(i){return Math.max(0,Math.min(100,i))/100}return(i,a)=>(c(),d("div",{class:Z(["voice",[o.value.state,{live:o.value.active}]]),style:Ee({"--voice-lift":M(Gs).bottomRight+"px"})},[r("section",sg,[r("div",lg,[r("div",ig,[a[0]||(a[0]=Da('',1)),o.value.caption?(c(),d("span",ag,m(o.value.caption),1)):R("",!0)]),r("span",{class:"track",style:Ee({"--segs":e.segments}),role:"meter","aria-label":"voice","aria-valuenow":Math.round(o.value.level),"aria-valuemin":0,"aria-valuemax":100},[r("span",ug,[r("span",{class:"fill",style:Ee({transform:`translateY(${(1-l(o.value.level))*100}%)`})},null,4)])],12,rg),o.value.mode||o.value.distance?(c(),d("div",cg,[o.value.mode?(c(),d("span",dg,m(o.value.mode),1)):R("",!0),o.value.distance?(c(),d("span",fg,m(o.value.distance),1)):R("",!0)])):R("",!0),o.value.count>0?(c(),d("div",vg,[(c(!0),d(ne,null,ve(o.value.count,u=>(c(),d("i",{key:u,class:Z(["pip",{on:u<=o.value.index}])},null,2))),128))])):R("",!0),o.value.key||o.value.activation?(c(),d("div",pg,[o.value.key?(c(),d("kbd",hg,m(o.value.key),1)):R("",!0),o.value.activation?(c(),d("kbd",mg,m(o.value.activation),1)):R("",!0)])):R("",!0),o.value.heard>0?(c(),d("span",gg,[a[1]||(a[1]=r("span",{class:"rx-icon"},"RX",-1)),r("span",null,m(o.value.heard),1)])):R("",!0)])])],6))}}),_g=Fe(bg,[["__scopeId","data-v-7157fb52"]]),yg={key:0,class:"weapons"},kg={class:"op-label"},wg={class:"rounds"},xg={key:0,class:"op-label"},$g={key:1,class:"reserve"},Mg=He({__name:"HudWeapons",setup(e){const t=at([]),{t:n}=nt();return ye("opx:hud:weapons",s=>{t.value=kt(Oe(s).hands).slice(0,2).map(o=>{const l=Oe(o);return{hand:$(l.hand),magazine:ee(l.magazine),capacity:ee(l.capacity),reserve:ee(l.reserve),ammoId:$(l.ammoId),reloading:De(l.reloading)}})}),(s,o)=>t.value.length?(c(),d("div",yg,[(c(!0),d(ne,null,ve(t.value,(l,i)=>{var a;return c(),d("div",{key:l.hand,class:"hand"},[r("span",kg,m(M(n)(`inventory.ui.${l.hand==="left"?"leftHandLabel":"rightHand"}`)),1),r("span",wg,[Zt(m(l.magazine),1),r("small",null," / "+m(l.capacity),1)]),l.reloading?(c(),d("span",xg,m(M(n)("inventory.ui.reloading")),1)):i===0||l.ammoId!==((a=t.value[0])==null?void 0:a.ammoId)?(c(),d("span",$g," + "+m(l.reserve),1)):R("",!0)])}),128))])):R("",!0)}}),Cg=Fe(Mg,[["__scopeId","data-v-f96d277e"]]),Sg=He({__name:"HudRoot",setup(e){const t={anchor:"bottom-left",infoAnchor:"top-right",statusAnchor:"bottom-left",statusOffset:120,vehicleAnchor:"bottom-center",width:210,segments:10,voiceSegments:8},n=at(t),s=S(!0);return ye("opx:hud:config",o=>{const l=$o(o.anchor,t.anchor),i=Math.round(ee(o.segments,t.segments)),a=Math.round(ee(o.voiceSegments,t.voiceSegments)),u=ee(o.width,t.width),p=ee(o.statusOffset,t.statusOffset);n.value={anchor:l,infoAnchor:$o(o.infoAnchor,t.infoAnchor),statusAnchor:$o(o.statusAnchor,l),statusOffset:p>=0?Math.round(p):t.statusOffset,vehicleAnchor:$o(o.vehicleAnchor,t.vehicleAnchor),width:u>0?Math.round(u):t.width,segments:i>=2?i:t.segments,voiceSegments:a>=2?a:t.voiceSegments}}),ye("opx:hud:show",o=>{s.value=o.visible!==!1}),Lt(()=>{$e("opx:hud:ready",{})}),(o,l)=>(c(),d("div",{class:Z(["hud",{open:s.value}])},[r("div",{class:Z(["at",n.value.anchor])},[Xe(og,{segments:n.value.segments,width:n.value.width},null,8,["segments","width"])],2),r("div",{class:Z(["at",n.value.infoAnchor])},[Xe(ym,{anchor:n.value.infoAnchor},null,8,["anchor"])],2),r("div",{class:Z(["at",n.value.statusAnchor]),style:Ee({"--block-offset":n.value.statusOffset+"px"})},[Xe(Am)],6),r("div",{class:Z(["at",n.value.vehicleAnchor])},[Xe(zm)],2),Xe(_g,{segments:n.value.voiceSegments},null,8,["segments"]),Xe(Cg)],2))}}),Tg=Fe(Sg,[["__scopeId","data-v-5d56b870"]]),Eg="opx:reply",Ag=5e3;class bl extends Error{constructor(t){super(t),this.name="BridgeError",this.localeKey=t}}const Go=new Map;let _i=0,tr="ui",yi=!1;function Lg(e){tr=e}function Og(){yi||(yi=!0,In(Eg,e=>{const t=$(e.ref),n=Go.get(t);if(n){if(Go.delete(t),clearTimeout(n.timer),e.ok===!1){n.reject(new bl($(e.error,"error.rpc_failed")));return}n.resolve(Oe(e.data))}}))}function Ig(e,t={},n={}){Og(),_i+=1;const s=`${tr}:${_i}`,o=ee(n.timeoutMs,Ag);return new Promise((l,i)=>{const a=setTimeout(()=>{Go.delete(s),et(`no reply on ${e} after ${o}ms`,"rpc timeout"),i(new bl("error.rpc_timeout"))},o);Go.set(s,{resolve:l,reject:i,timer:a,channel:e}),$e(e,{...t,ref:s})})}const nr=at(Object.create(null));let Os=-1,Mo=0,Co=new Map;function Rg(e){if(!e||typeof e!="object")return;const t=e,n=t.revision,s=t.index,o=t.total;if(typeof n!="number"||!Number.isSafeInteger(n)||n6250||!Array.isArray(t.entries)||t.entries.length>8)return;const l=[];for(const a of t.entries){if(!a||typeof a!="object")continue;const{name:u,url:p}=a;if(!(typeof u!="string"||u.length>192||typeof p!="string"||p.length>1024||!/^[A-Za-z0-9_.-]+(?:\/[A-Za-z0-9_.-]+)*$/.test(u)||u.split("/").some(f=>f==="."||f==="..")))try{const f=new URL(p);f.protocol==="https:"&&!f.username&&!f.password&&l.push({name:u,url:p})}catch{}}if(n!==Os&&(Os=n,Mo=o,Co=new Map),o!==Mo||(Co.set(s,l),Co.size!==Mo))return;const i=Object.create(null);for(let a=1;a<=Mo;a++)for(const u of Co.get(a)||[])i[u.name]=u.url;nr.value=i}function _l(e,t){const n=t||`${e}.png`;return nr.value[n]||""}function Dg(e,t){return _l(e,t&&t.image?t.image:"")}function yl(e){const t=e.trim().split(/\s+/).filter(Boolean);return t.length===0?"?":t.length===1?t[0].slice(0,2).toUpperCase():(t[0][0]+t[1][0]).toUpperCase()}function or(e,t,n){const s=e.metadata.label;if(typeof s=="string"&&s)return s;const o=t?t.label:"";return o||e.name||n}function sr(e,t,n){return(t?t.weight:n)*e.count}function No(e,t){const n=t.labels.kg||"kg",s=t.labels.g||"g";if(e<1e3)return`${Math.round(e)}${s}`;const o=e/1e3,l=o>=100?Math.round(o):Math.round(o*10)/10;return`${String(l).replace(".",t.labels.decimal||".")}${n}`}function ki(e,t){return t<=0?0:Math.max(0,Math.min(100,e/t*100))}function lr(e){const t=e.metadata.durability;return typeof t!="number"||!Number.isFinite(t)?-1:Math.max(0,Math.min(1,t>1?t/100:t))}function ir(e){const t=e.metadata.ammo;return typeof t!="number"||!Number.isFinite(t)?-1:Math.max(0,Math.round(t))}function Ng(e){const t=e.metadata.serial;return typeof t=="string"?t:""}const Pg=["data-augmented-ui","data-slot"],Hg={key:0,class:"key"},Fg={class:"art"},Bg=["src"],Vg={key:1,class:"initials"},jg={key:0,class:"count"},Ug={key:1,class:"rounds"},Kg={class:"foot"},Wg={class:"name op-truncate"},zg={class:"mass"},Zg=He({__name:"InventorySlot",props:{index:{},stack:{},entry:{},config:{},hotkey:{},selected:{type:Boolean},over:{type:Boolean},dragging:{type:Boolean},muted:{type:Boolean},broken:{}},emits:["grab","open","hover","broke"],setup(e,{emit:t}){const n=e,s=t,o=J(()=>n.stack?or(n.stack,n.entry,n.config.labels.unknown||"?"):""),l=J(()=>n.stack?Dg(n.stack.name,n.entry):""),i=J(()=>n.stack?No(sr(n.stack,n.entry,n.config.defaultWeight),n.config):""),a=J(()=>n.stack?ir(n.stack):-1),u=J(()=>n.stack?lr(n.stack):-1),p=J(()=>u.value<0?"":u.value<.25?"spent":u.value<.6?"worn":"");function f(){n.stack&&s("broke",n.stack.name)}const h=J(()=>n.stack!==null&&l.value!==""&&!n.broken.has(n.stack.name));return(w,k)=>{var F;return c(),d("div",{class:Z(["cell",{filled:e.stack!==null,selected:e.selected,over:e.over,dragging:e.dragging,muted:e.muted,weapon:((F=e.entry)==null?void 0:F.weapon)===!0}]),"data-augmented-ui":e.dragging?void 0:"tr-clip border","data-slot":e.index,onPointerdown:k[0]||(k[0]=_t(A=>e.stack&&s("grab",e.index,A),["prevent"])),onContextmenu:k[1]||(k[1]=_t(A=>e.stack&&s("open",e.index,A),["prevent"])),onMouseenter:k[2]||(k[2]=A=>s("hover",e.index,A)),onMouseleave:k[3]||(k[3]=A=>s("hover",null))},[e.hotkey?(c(),d("span",Hg,m(e.hotkey),1)):R("",!0),e.stack?(c(),d(ne,{key:1},[r("span",Fg,[h.value?(c(),d("img",{key:0,src:l.value,alt:"",draggable:"false",onError:f},null,40,Bg)):(c(),d("span",Vg,m(M(yl)(o.value)),1))]),e.stack.count>1?(c(),d("span",jg,m(e.stack.count),1)):R("",!0),a.value>=0?(c(),d("span",Ug,m(a.value),1)):R("",!0),u.value>=0?(c(),d("span",{key:2,class:Z(["wear",p.value])},[r("i",{style:Ee({width:`${u.value*100}%`})},null,4)],2)):R("",!0),r("span",Kg,[r("span",Wg,m(o.value),1),r("span",zg,m(i.value),1)])],64)):R("",!0)],42,Pg)}}}),Gg=Fe(Zg,[["__scopeId","data-v-37cf626a"]]),xn=90,Rn=10,Dn=5,qs=7,kl=5,Ys=Dn*xn+(Dn-1)*Rn+kl*2,qg=qs*xn+(qs-1)*Rn+kl*2,wi=2,Yg=He({__name:"InventoryGrid",props:{container:{},catalog:{},config:{},categories:{},hotbar:{},selected:{},over:{},dragging:{},broken:{}},emits:["grab","open","hover","broke"],setup(e,{emit:t}){const n=e,s=t,o=S(null),l=S(0);function i(){var T,L;l.value=(L=(T=o.value)==null?void 0:T.scrollTop)!=null?L:0}Lt(()=>{var T,L;l.value=(L=(T=o.value)==null?void 0:T.scrollTop)!=null?L:0}),ls(()=>{l.value=0}),bt(()=>n.container.id,()=>{o.value&&(o.value.scrollTop=0),l.value=0});const a=J(()=>Math.ceil(n.container.slots/Dn)),u=J(()=>Math.max(0,Math.floor(l.value/(xn+Rn))-wi)),p=J(()=>{const T=qs+wi*2;return Math.min(a.value,u.value+T)}),f=J(()=>new Set(n.categories)),h=J(()=>{var D;const T=[],L=u.value*Dn+1,E=Math.min(n.container.slots,p.value*Dn),H=f.value;for(let N=L;N<=E;N+=1){const q=(D=n.container.bySlot.get(N))!=null?D:null,W=q?n.catalog.get(q.name):void 0;T.push({index:N,stack:q,entry:W,muted:q!==null&&H.size>0&&!H.has(W?W.category:"misc")})}return T}),w=J(()=>u.value*(xn+Rn)),k=J(()=>Math.max(0,(a.value-p.value)*(xn+Rn))),F=J(()=>({width:`${Ys}px`,height:`${qg}px`,padding:`${kl}px`})),A=J(()=>({gridTemplateColumns:`repeat(${Dn}, ${xn}px)`,gridAutoRows:`${xn}px`,gap:`${Rn}px`}));return(T,L)=>(c(),d("div",{ref_key:"viewport",ref:o,class:"viewport",style:Ee(F.value),onScrollPassive:i},[r("div",{style:Ee({height:`${w.value}px`})},null,4),r("div",{class:"grid",style:Ee(A.value)},[(c(!0),d(ne,null,ve(h.value,E=>{var H;return c(),pt(Gg,{key:E.index,index:E.index,stack:E.stack,entry:E.entry,config:e.config,hotkey:(H=e.hotbar[E.index-1])!=null?H:"",selected:e.selected===E.index,over:e.over===E.index,dragging:e.dragging===E.index,muted:E.muted,broken:e.broken,onGrab:L[0]||(L[0]=(D,N)=>s("grab",D,N)),onOpen:L[1]||(L[1]=(D,N)=>s("open",D,N)),onHover:L[2]||(L[2]=(D,N)=>s("hover",D,N)),onBroke:L[3]||(L[3]=D=>s("broke",D))},null,8,["index","stack","entry","config","hotkey","selected","over","dragging","muted","broken"])}),128))],4),r("div",{style:Ee({height:`${k.value}px`})},null,4)],36))}}),xi=Fe(Yg,[["__scopeId","data-v-b7db5a52"]]);function Xg(e){const t=Oe(e),n=ee(t.slot,0);return n<=0?null:{slot:n,name:$(t.name),count:ee(t.count,0),metadata:Oe(t.metadata)}}function So(e){const t=Oe(e);if(t.id===void 0)return null;const n=new Map;for(const s of kt(t.items)){const o=Xg(s);o&&n.set(o.slot,o)}return{id:ee(t.id,0),kind:$(t.kind),title:$(t.title),slots:Math.max(0,ee(t.slots,0)),maxWeight:ee(t.maxWeight,0),weight:ee(t.weight,0),bySlot:n}}function Jg(e){const t=Oe(e);return{label:$(t.label),description:$(t.description),weight:ee(t.weight,0),image:$(t.image),usable:De(t.usable),stackable:De(t.stackable,!0),droppable:De(t.droppable,!0),category:$(t.category,"misc"),weapon:De(t.weapon),ammo:De(t.ammo)}}function Qg(e){var o;const t=Oe(e),n={},s=Oe(t.labels);for(const l of Object.keys(s))l!=="tabs"&&(n[l]=$(s[l],l));return{labels:n,hotbar:kt((o=s.hotbar)!=null?o:t.hotbar).map(l=>$(l)),openKey:$(t.openKey),drops:De(t.drops),defaultWeight:ee(t.defaultWeight,0)}}function e0(e){const t=Oe(e);return Ge(t.tabs).map(n=>({key:$(n.key),label:$(n.label),categories:kt(n.categories).map(s=>$(s)),rest:De(n.rest)}))}function t0(e){return Ge(e).map(t=>({id:ee(t.id,0),distance:ee(t.distance,0),side:$(t.side)})).filter(t=>t.id>0)}const n0={key:0,class:"screen"},o0=["data-container"],s0={class:"head"},l0={class:"head-text"},i0={class:"eyebrow"},a0={class:"op-truncate"},r0={key:0,class:"cap","data-augmented-ui":"tr-clip border"},u0={key:0,class:"tabs"},c0=["onClick"],d0={class:"meter"},f0={class:"cap-mono"},v0={class:"figure"},p0={class:"figure quiet"},h0={class:"foot"},m0=["disabled"],g0=["disabled"],b0=["data-container"],_0={class:"head"},y0={class:"head-text"},k0={class:"eyebrow"},w0={class:"op-truncate"},x0={class:"meter"},$0={class:"cap-mono"},M0={class:"figure"},C0={class:"figure quiet"},S0={class:"foot"},T0=["disabled"],E0=["data-ground"],A0={class:"ground-word"},L0={key:0,class:"ground-hint"},O0={key:1,class:"status"},I0={key:0,class:"told"},R0={class:"told-top"},D0={class:"told-name"},N0={key:0,class:"told-times"},P0={key:0,class:"prose"},H0={class:"fact"},F0={class:"cap-mono"},B0={class:"value op-value op-truncate"},V0={key:1,class:"fact"},j0={class:"cap-mono"},U0={class:"value op-value op-truncate"},K0={key:2,class:"fact"},W0={class:"cap-mono"},z0={class:"value op-value op-truncate"},Z0={key:3,class:"meter stack"},G0={class:"cap-mono"},q0={class:"list"},Y0=["disabled"],X0=["disabled"],J0=["disabled"],Q0=["disabled"],e1={class:"sep op-eyebrow"},t1=["disabled","onClick"],n1={class:"row-label op-truncate"},o1={class:"row-value op-value"},s1={key:0,class:"sep op-eyebrow"},l1={class:"dialog"},i1={class:"head"},a1={class:"stepper"},r1={class:"count"},u1={class:"hint"},c1={class:"foot"},d1=16e3,f1=200,v1=He({__name:"InventoryView",setup(e){const t=S(null),n=S(!1),s=S({labels:{},hotbar:[],openKey:"",drops:!1,defaultWeight:0}),o=S([]),l=at(null),i=at(null),a=at(new Map);let u=null;const p=S([]),f=mt(new Set),h=S(""),w=S(!1),k=S(""),F=mt({container:0,slot:0,x:0,y:0}),A=mt({container:0,slot:0,overContainer:0,overSlot:0,overGround:!1,active:!1}),T=mt({container:0,slot:0,x:0,y:0,open:!1}),L=mt({container:0,slot:0,count:1,max:1,open:!1,mode:"split",target:0});let E,H=!1;const D=[];function N(y,v=""){return s.value.labels[y]||v}function q(){L.open?L.open=!1:T.open?oe():lt()}function W(y){return t.value!==null&&y.handle===t.value}function B(y,v={}){t.value!==null&&$e("opx:inventory:request",{handle:t.value,action:y,payload:v})}let I=0;async function O(y,v={}){if(t.value===null||w.value)return null;const b=I;w.value=!0,k.value="";try{return await Ig("opx:inventory:request",{handle:t.value,action:y,payload:v},{timeoutMs:d1})}catch(G){const ce=G instanceof bl?G.localeKey:"",Le=ce==="error.rpc_timeout"||ce==="timeout";return b===I&&(Le||(ce===""||ce==="error.rpc_failed"))&&(k.value=N(Le?"timeout":"failed")),null}finally{b===I&&(w.value=!1)}}const K=J(()=>o.value.length===0?"":o.value.some(y=>y.key===h.value)?h.value:o.value[0].key),V=J(()=>{const y=o.value.find(G=>G.key===K.value);if(!y)return[];if(!y.rest)return y.categories;const v=new Set;for(const G of o.value)if(!G.rest)for(const ce of G.categories)v.add(ce);const b=new Set;for(const G of a.value.values())v.has(G.category)||b.add(G.category);return b.add("misc"),Array.from(b)});function ge(y){return l.value&&l.value.id===y?l.value:i.value&&i.value.id===y?i.value:null}function de(y,v){var G;const b=ge(y);return b&&(G=b.bySlot.get(v))!=null?G:null}const se=J(()=>{if(A.active||!T.open)return null;const y=de(T.container,T.slot);if(!y)return null;const v=a.value.get(y.name);return{stack:y,entry:v,label:or(y,v,N("unknown","?")),description:v?v.description:"",weight:No(sr(y,v,s.value.defaultWeight),s.value),ammo:ir(y),serial:Ng(y),wear:lr(y)}});function ie(y,v){return y?y.title?y.title:N(y.kind,N(v)):N(v)}const fe=J(()=>l.value?ki(l.value.weight,l.value.maxWeight):0),re=J(()=>i.value?ki(i.value.weight,i.value.maxWeight):0);function Q(y){return y?`${No(y.weight,s.value)} / ${No(y.maxWeight,s.value)}`:""}function te(y){return y>=95?"full":y>=75?"high":""}function xe(y){return y?`${String(y.bySlot.size).padStart(2,"0")}/${String(y.slots).padStart(2,"0")}`:""}const Me=S(null),Ne=S(1);let Re=null;function qe(){const y=Me.value;if(!y)return;const v=y.offsetWidth||1,b=y.offsetHeight||1,G=Math.max(.72,Math.min(1.5,window.innerHeight/1080));Ne.value=Math.min(G,window.innerWidth*.92/v,window.innerHeight*.9/b)}const Ze=S(null),le=mt({left:0,top:0});function Ce(){const y=Ze.value;if(!y)return;const v=y.offsetWidth||f1,b=y.offsetHeight;let G=T.x+14,ce=T.y+14;G+v>window.innerWidth-8&&(G=T.x-14-v),ce+b>window.innerHeight-8&&(ce=T.y-14-b),le.left=Math.max(8,Math.min(G,window.innerWidth-8-v)),le.top=Math.max(8,Math.min(ce,window.innerHeight-8-b))}function C(y,v){const b=document.elementFromPoint(y,v);if(!b)return null;const G=b.closest("[data-slot]");if(!G)return null;const ce=G.closest("[data-container]");if(!ce)return null;const Le=Number(G.getAttribute("data-slot")),me=Number(ce.getAttribute("data-container"));return!Number.isFinite(Le)||!Number.isFinite(me)?null:{container:me,slot:Le}}function pe(y,v){const b=document.elementFromPoint(y,v);return b!==null&&b.closest("[data-ground]")!==null}function be(y){if(!A.active)return;const v=C(y.clientX,y.clientY);A.overContainer=v?v.container:0,A.overSlot=v?v.slot:0,A.overGround=v===null&&pe(y.clientX,y.clientY)}function g(){A.active=!1,A.container=0,A.slot=0,A.overContainer=0,A.overSlot=0,A.overGround=!1}function x(y){if(!A.active)return;const v=C(y.clientX,y.clientY),b=v===null&&pe(y.clientX,y.clientY),G={container:A.container,slot:A.slot},ce=l.value!==null&&G.container===l.value.id;if(g(),j(),b){ce&&O("drop",{slot:G.slot});return}v&&(v.container===G.container&&v.slot===G.slot||O("move",{from:G.container,fromSlot:G.slot,to:v.container,toSlot:v.slot}))}function _(){g(),j()}function P(){H||(H=!0,window.addEventListener("pointermove",be),window.addEventListener("pointerup",x),window.addEventListener("pointercancel",_),window.addEventListener("blur",_))}function j(){H&&(H=!1,window.removeEventListener("pointermove",be),window.removeEventListener("pointerup",x),window.removeEventListener("pointercancel",_),window.removeEventListener("blur",_))}function Y(y,v,b){w.value||b.button!==0||(oe(),A.active=!0,A.container=y,A.slot=v,A.overContainer=y,A.overSlot=v,P())}function ue(y,v,b){F.container=v===null?0:y,F.slot=v!=null?v:0,b&&(F.x=b.clientX,F.y=b.clientY)}function ae(y,v,b){var ce;de(y,v)&&(T.container=y,T.slot=v,T.x=b.clientX,T.y=b.clientY,T.open=!0,y===((ce=l.value)==null?void 0:ce.id)&&B("nearby"),le.left=b.clientX+14,le.top=b.clientY+14)}function oe(){T.open=!1}const X=J(()=>T.open?de(T.container,T.slot):null),we=J(()=>{const y=X.value;return y?a.value.get(y.name):void 0}),he=J(()=>{var y;return T.container!==0&&T.container===((y=l.value)==null?void 0:y.id)});function ke(y){const v=T.slot;oe(),O("use",{slot:v,hand:y})}function Se(y){const b=`${y.distance.toFixed(1).replace(".",N("decimal","."))} ${N("m","m")}`,G={ahead:"sideAhead",behind:"sideBehind",left:"sideLeft",right:"sideRight"},ce=G[y.side]?N(G[y.side]):"";return ce?`${ce} · ${b}`:b}function Te(y,v){const b=X.value;return!b||b.count<2?!1:(L.container=T.container,L.slot=T.slot,L.max=b.count,L.count=1,L.mode=y,L.target=v,L.open=!0,oe(),!0)}function _e(){if(Te("drop",0))return;const y=T.slot;oe(),O("drop",{slot:y})}function Pe(y){if(Te("give",y))return;const v=T.slot;oe(),O("give",{target:y,slot:v})}function Ue(){const y=X.value;!y||y.count<2||(L.container=T.container,L.slot=T.slot,L.max=y.count-1,L.count=Math.max(1,Math.floor(y.count/2)),L.mode="split",L.target=0,L.open=!0,oe())}function Ye(){const{container:y,slot:v,count:b,mode:G,target:ce}=L;L.open=!1,G==="give"?O("give",{target:ce,slot:v,count:b}):G==="drop"?O("drop",{slot:v,count:b}):O("split",{container:y,slot:v,count:b})}const ft=J(()=>L.mode==="give"?N("giveHowMany"):L.mode==="drop"?N("dropHowMany"):N("split")),ut=J(()=>L.mode==="give"?N("give"):L.mode==="drop"?N("drop"):N("split"));function Tt(y){L.count=Math.max(1,Math.min(L.max,L.count+y))}function Ot(y,v){O("sort",{container:y,mode:v})}function tt(){O("closeSecondary")}function lt(){$e("opx:inventory:dismiss",{handle:t.value})}function jt(y){s.value=Qg(y);const v=e0(Oe(y).labels);v.length>0&&(o.value=v)}function U(){I+=1,n.value=!1,l.value=null,i.value=null,p.value=[],k.value="",w.value=!1,g(),j(),oe(),L.open=!1,F.container=0,F.slot=0}ye("opx:inventory:config",y=>{Ie("inventory:config",()=>jt(y),void 0)}),ye("opx:inventory:catalog",y=>{Ie("inventory:catalog",()=>{(De(y.first)||u===null)&&(u=new Map);const v=Oe(y.entries);for(const b of Object.keys(v))u.set(b,Jg(v[b]));De(y.done)&&(a.value=u,u=null)},void 0)}),ye("opx:inventory:open",y=>{Ie("inventory:open",()=>{const v=y.handle;typeof v!="string"||v===""||(E==null||E(),U(),t.value=v,jt(y.config),l.value=So(y.primary),i.value=y.secondary===!1?null:So(y.secondary),h.value=o.value.length>0?o.value[0].key:"",n.value=!0,E=Pt({id:"inventory",onEscape:q}),B("nearby"))},void 0)}),ye("opx:inventory:update",y=>{Ie("inventory:update",()=>{if(!W(y))return;const v=So(y.container);v&&(l.value&&v.id===l.value.id?l.value=v:i.value&&v.id===i.value.id&&(i.value=v))},void 0)}),ye("opx:inventory:secondary",y=>{Ie("inventory:secondary",()=>{W(y)&&(i.value=y.container===!1?null:So(y.container))},void 0)}),ye("opx:inventory:nearby",y=>{Ie("inventory:nearby",()=>{W(y)&&(p.value=t0(y.players))},void 0)}),ye("opx:inventory:close",y=>{Ie("inventory:close",()=>{y.handle!==void 0&&!W(y)||(t.value=null,U(),E==null||E(),E=void 0)},void 0)}),Lt(()=>{typeof ResizeObserver=="function"&&(Re=new ResizeObserver(qe)),window.addEventListener("resize",qe)}),bt(n,y=>{ot(()=>{y&&Me.value?(Re==null||Re.observe(Me.value),qe()):Re==null||Re.disconnect()})}),bt([()=>T.open,()=>T.container,()=>T.slot,()=>T.x,()=>T.y],()=>{ot(Ce)}),rt(()=>{I+=1,j(),Re==null||Re.disconnect(),Re=null,window.removeEventListener("resize",qe),E==null||E()});try{$e("opx:inventory:ready",{})}catch(y){et(y,"inventory:ready")}return(y,v)=>{var b,G,ce,Le;return c(),d("div",{class:Z(["room",{open:n.value,dragging:A.active}])},[n.value?(c(),d("div",n0,[r("div",{ref_key:"frame",ref:Me,class:"frame",style:Ee({transform:`scale(${Ne.value})`})},[r("section",{class:"panel lead",style:Ee({width:`${M(Ys)}px`}),"data-container":l.value?l.value.id:0},[r("header",s0,[r("div",l0,[r("span",i0,m(N("bag")),1),r("h1",a0,m(ie(l.value,"bag")),1)]),s.value.openKey?(c(),d("kbd",r0,m(s.value.openKey),1)):R("",!0)]),o.value.length?(c(),d("nav",u0,[(c(!0),d(ne,null,ve(o.value,me=>(c(),d("button",{key:me.key,type:"button",class:Z(["tab",{on:me.key===K.value}]),"data-augmented-ui":"tr-clip border",onClick:z=>h.value=me.key},m(me.label),11,c0))),128))])):R("",!0),r("div",d0,[r("span",f0,m(N("weight")),1),r("span",{class:Z(["rule",te(fe.value)])},[r("i",{style:Ee({width:`${fe.value}%`})},null,4)],2),r("span",v0,m(Q(l.value)),1),r("span",p0,m(xe(l.value)),1)]),l.value?(c(),pt(xi,{key:1,container:l.value,catalog:a.value,config:s.value,categories:V.value,hotbar:s.value.hotbar,selected:0,over:A.overContainer===l.value.id?A.overSlot:0,dragging:A.container===l.value.id?A.slot:0,broken:f,onGrab:v[0]||(v[0]=(me,z)=>Y(l.value.id,me,z)),onOpen:v[1]||(v[1]=(me,z)=>ae(l.value.id,me,z)),onHover:v[2]||(v[2]=(me,z)=>ue(l.value.id,me,z)),onBroke:v[3]||(v[3]=me=>f.add(me))},null,8,["container","catalog","config","categories","hotbar","over","dragging","broken"])):R("",!0),r("footer",h0,[r("button",{type:"button",class:Z(["row op-label grow",{off:!l.value||w.value}]),"data-augmented-ui":"tr-clip border",disabled:!l.value||w.value,onClick:v[4]||(v[4]=me=>l.value&&Ot(l.value.id,"weight"))},m(N("sortWeight")),11,m0),r("button",{type:"button",class:Z(["row op-label grow",{off:!l.value||w.value}]),"data-augmented-ui":"tr-clip border",disabled:!l.value||w.value,onClick:v[5]||(v[5]=me=>l.value&&Ot(l.value.id,"name"))},m(N("sortName")),11,g0),r("button",{type:"button",class:"row op-label grow","data-augmented-ui":"tr-clip border",onClick:lt},m(N("close")),1)])],12,o0),r("section",{class:"panel trail",style:Ee({width:`${M(Ys)}px`}),"data-container":i.value?i.value.id:0},[i.value?(c(),d(ne,{key:0},[r("header",_0,[r("div",y0,[r("span",k0,m(N(i.value.kind==="drop"?"ground":i.value.kind)),1),r("h1",w0,m(ie(i.value,"stash")),1)])]),r("div",x0,[r("span",$0,m(N("weight")),1),r("span",{class:Z(["rule",te(re.value)])},[r("i",{style:Ee({width:`${re.value}%`})},null,4)],2),r("span",M0,m(Q(i.value)),1),r("span",C0,m(xe(i.value)),1)]),Xe(xi,{container:i.value,catalog:a.value,config:s.value,categories:D,hotbar:D,selected:0,over:A.overContainer===i.value.id?A.overSlot:0,dragging:A.container===i.value.id?A.slot:0,broken:f,onGrab:v[6]||(v[6]=(me,z)=>Y(i.value.id,me,z)),onOpen:v[7]||(v[7]=(me,z)=>ae(i.value.id,me,z)),onHover:v[8]||(v[8]=(me,z)=>ue(i.value.id,me,z)),onBroke:v[9]||(v[9]=me=>f.add(me))},null,8,["container","catalog","config","over","dragging","broken"]),r("footer",S0,[r("button",{type:"button",class:Z(["row op-label grow",{off:w.value}]),"data-augmented-ui":"tr-clip border",disabled:w.value,onClick:v[10]||(v[10]=me=>Ot(i.value.id,"weight"))},m(N("sortWeight")),11,T0),r("button",{type:"button",class:"row op-label grow","data-augmented-ui":"tr-clip border",onClick:tt},m(N("close")),1)])],64)):(c(),d("div",{key:1,class:Z(["ground",{over:A.overGround,armed:s.value.drops}]),"data-augmented-ui":"tr-clip bl-clip border","data-ground":s.value.drops?"drop":void 0},[r("span",A0,m(s.value.drops?N("dropZone"):N("ground","")),1),s.value.drops?(c(),d("span",L0,m(N("groundHint","")),1)):R("",!0)],10,E0))],12,b0)],4)])):R("",!0),n.value&&k.value?(c(),d("p",O0,m(k.value),1)):R("",!0),T.open&&X.value?(c(),d("div",{key:2,class:"menu-layer",onPointerdown:_t(oe,["self"])},[r("div",{ref_key:"card",ref:Ze,class:"menu",style:Ee({left:`${le.left}px`,top:`${le.top}px`})},[se.value?(c(),d("div",I0,[r("div",R0,[r("span",D0,m(se.value.label),1),se.value.stack.count>1?(c(),d("span",N0,m(se.value.stack.count)+"× ",1)):R("",!0)]),se.value.description?(c(),d("p",P0,m(se.value.description),1)):R("",!0),r("div",H0,[r("span",F0,m(N("weight")),1),r("span",B0,m(se.value.weight),1)]),se.value.ammo>=0?(c(),d("div",V0,[r("span",j0,m(N("ammo")),1),r("span",U0,m(se.value.ammo),1)])):R("",!0),se.value.serial?(c(),d("div",K0,[r("span",W0,m(N("serial")),1),r("span",z0,m(se.value.serial),1)])):R("",!0),se.value.wear>=0?(c(),d("div",Z0,[r("span",G0,m(N("condition")),1),r("span",{class:Z(["rule",se.value.wear<.25?"full":se.value.wear<.6?"high":""])},[r("i",{style:Ee({width:`${se.value.wear*100}%`})},null,4)],2)])):R("",!0)])):R("",!0),r("div",q0,[he.value&&((b=we.value)!=null&&b.usable)?(c(),d("button",{key:0,type:"button",class:Z(["row op-label",{off:w.value}]),disabled:w.value,onClick:v[11]||(v[11]=me=>ke())},m(N("use")),11,Y0)):R("",!0),he.value&&((G=we.value)!=null&&G.weapon||(ce=we.value)!=null&&ce.ammo)?(c(),d("button",{key:1,type:"button",class:"row op-label",disabled:w.value,onClick:v[12]||(v[12]=me=>ke("left"))},m(N("leftHand")),9,X0)):R("",!0),X.value.count>1?(c(),d("button",{key:2,type:"button",class:Z(["row op-label",{off:w.value}]),disabled:w.value,onClick:Ue},m(N("split")),11,J0)):R("",!0),he.value&&s.value.drops&&((Le=we.value)==null?void 0:Le.droppable)!==!1?(c(),d("button",{key:3,type:"button",class:Z(["row op-label",{off:w.value}]),disabled:w.value,onClick:_e},m(N("drop")),11,Q0)):R("",!0),he.value?(c(),d(ne,{key:4},[r("div",e1,m(N("giveTo")),1),(c(!0),d(ne,null,ve(p.value,me=>(c(),d("button",{key:me.id,type:"button",class:Z(["row op-label",{off:w.value}]),disabled:w.value,onClick:z=>Pe(me.id)},[r("span",n1,m(Se(me)),1),r("span",o1,"#"+m(me.id),1)],10,t1))),128)),p.value.length?R("",!0):(c(),d("div",s1,m(N("nobody")),1))],64)):R("",!0)])],4)],32)):R("",!0),L.open?(c(),d("div",{key:3,class:"menu-layer",onPointerdown:v[16]||(v[16]=_t(me=>L.open=!1,["self"]))},[r("div",l1,[r("header",i1,[r("h2",null,m(ft.value),1)]),r("div",a1,[r("button",{type:"button",class:"row op-label",onClick:v[13]||(v[13]=me=>Tt(-1))},"−"),r("span",r1,m(L.count),1),r("button",{type:"button",class:"row op-label",onClick:v[14]||(v[14]=me=>Tt(1))},"+")]),r("p",u1,"1 – "+m(L.max),1),r("footer",c1,[r("button",{type:"button",class:"row op-label grow",onClick:v[15]||(v[15]=me=>L.open=!1)},m(N("cancel")),1),r("button",{type:"button",class:"row op-label grow on",onClick:Ye},m(ut.value),1)])])],32)):R("",!0)],2)}}}),p1=Fe(v1,[["__scopeId","data-v-42141f97"]]),cn=mt({hide:!1,cover:!1,video:!0,kind:"unknown",progressKnown:!1,progress:0}),ln=Bn(cn),Is=J(()=>cn.hide);function h1(e){cn.hide=De(e.hide),cn.cover=De(e.cover),cn.video=De(e.video,!0),cn.kind=$(e.kind,"unknown"),cn.progressKnown=De(e.progressKnown);const t=ee(e.progress);cn.progress=Number.isFinite(t)?Math.min(1,Math.max(0,t)):0}const m1={key:0,class:"cover"},g1={class:"dock op-plane op-anchor-left op-ink"},b1={class:"bay op-bay op-arete","data-augmented-ui":"tr-clip bl-clip border"},_1={class:"bay-inner op-interlace"},y1={class:"progress"},k1={class:"bar-line"},w1={class:"bar-phase op-eyebrow op-truncate"},x1={key:0,class:"bar-pct op-value"},$1={class:"bar"},M1={class:"detail op-copy"},C1="loading.webm",$i="loading-poster.jpg",S1=.99,T1=He({__name:"LoadingCover",setup(e){const{t}=nt(),n=J(()=>t(ln.kind==="fastTravel"?"loading.kind.fastTravel":"loading.kind.unknown")),s=J(()=>Math.min(S1,Math.max(0,ln.progress))),o=J(()=>Math.floor(s.value*100));return(l,i)=>(c(),pt(Xu,{name:"cover"},{default:On(()=>[M(ln).cover?(c(),d("div",m1,[r("div",{class:"stage",style:Ee({backgroundImage:`url(${$i})`})},[M(ln).video?(c(),d("video",{key:0,class:"film",src:C1,poster:$i,autoplay:"",muted:"",loop:"",playsinline:"",preload:"auto"})):R("",!0),i[0]||(i[0]=r("div",{class:"scrim"},null,-1))],4),r("div",g1,[r("div",b1,[r("div",_1,[i[1]||(i[1]=r("div",{class:"brand"},[r("div",{class:"mark"},[Zt("OPEN"),r("b",null,"//"),Zt("77")]),r("div",{class:"mode op-eyebrow"},"Infinity")],-1)),r("div",y1,[r("div",k1,[r("span",w1,m(n.value),1),M(ln).progressKnown?(c(),d("span",x1,m(o.value)+"%",1)):R("",!0)]),r("div",{class:Z(["track",{busy:!M(ln).progressKnown}]),"data-augmented-ui":"tr-clip border"},[r("span",$1,[r("span",{class:"fill",style:Ee(M(ln).progressKnown?{transform:`scaleX(${s.value})`}:void 0)},null,4)])],2),r("p",M1,m(M(ln).progressKnown?M(t)("loading.title"):M(t)("loading.pending")),1)])])])])])):R("",!0)]),_:1}))}}),E1=Fe(T1,[["__scopeId","data-v-2c733559"]]),A1={class:"bay-inner op-interlace"},L1={class:"list"},O1={key:0,class:"sep op-eyebrow"},I1=["aria-disabled","onClick"],R1={class:"glyph","aria-hidden":"true"},D1={key:0,viewBox:"0 0 24 24"},N1=["d"],P1={class:"label op-label op-truncate"},H1={key:0,class:"value op-value op-truncate"},F1=["aria-checked"],B1={key:2,class:"mark"},V1={key:0,class:"foot"},j1={key:0,class:"hint op-copy"},U1=240,K1=He({__name:"MenuView",setup(e){const t={ArrowUp:"up",ArrowDown:"down",ArrowLeft:"left",ArrowRight:"right",Enter:"enter",Backspace:"back"},n={"top-left":"anchor-top-left","top-right":"anchor-top-right",left:"anchor-left",right:"anchor-right",center:"anchor-center"},s=S(0),o=S(null),l=S(!1),i=S(""),a=S([]),u=S(1),p=S(0),f=S("anchor-top-left"),h=S("full"),w=S(!0),k=S(340),F=S(56),A=S(0),T=J(()=>f.value.endsWith("right"));function L(se){return se&&wt(At,se)||[]}const E=J(()=>{const se=`width: ${k.value}px; max-height: ${F.value}vh`;return A.value>0?`${se}; height: ${A.value}px`:se}),H=J(()=>f.value==="anchor-center"?"":T.value?"op-anchor-right":"op-anchor-left");function D(se){return typeof se=="string"||typeof se=="number"}function N(se){return o.value!==null&&se.handle===o.value}function q(se){var Q;f.value=(Q=wt(n,$(se.anchor)))!=null?Q:n["top-left"];const ie=ee(se.width);ie>0&&(k.value=Math.round(ie));const fe=ee(se.maxHeight);fe>0&&(F.value=Math.round(fe));const re=ee(se.height);A.value=re>0?Math.round(re):0}function W(se,ie=!1){i.value=$(se.hint),u.value=Math.max(1,ee(se.first,1)),p.value=ee(se.total);const fe=Ge(se.rows);a.value=fe.map((re,Q)=>{const te=re.rule===!0,xe=$(re.label);return{index:u.value+Q,stagger:ie?Q:0,label:xe,icon:te?"":$(re.icon),value:te?"":$(re.value),mark:re.arrow===!0?">":re.spin===!0?"‹›":"",rule:te,blank:te&&xe==="",off:re.off===!0,on:re.on===!0,checked:re.check===!0&&!te?re.ticked===!0:void 0}})}let B;function I(){B!==void 0&&clearTimeout(B),B=void 0}function O(){l.value=!1,I(),B=setTimeout(()=>{B=void 0,!l.value&&(a.value=[],i.value="",p.value=0)},U1)}let K;function V(se){if(se.key==="Escape"||po()!=="menu")return;const ie=t[se.key];ie!==void 0&&(se.preventDefault(),$e("opx:menu:key",{handle:o.value,key:ie,repeat:se.repeat===!0}))}function ge(se){se?window.addEventListener("keydown",V):window.removeEventListener("keydown",V)}ye("opx:menu:open",se=>{Ie("menu:open",()=>{D(se.handle)&&(K==null||K(),K=void 0,ge(!1),I(),s.value+=1,o.value=se.handle,q(se),W(se,!0),l.value=!0,h.value=$(se.focus,"full"),w.value=se.closable!==!1,ge(h.value==="full"),h.value!=="none"&&(K=Pt({id:"menu",onEscape:w.value?()=>$e("opx:menu:dismiss",{handle:o.value}):()=>{}})))},void 0)}),ye("opx:menu:frame",se=>{Ie("menu:frame",()=>{N(se)&&W(se)},void 0)}),ye("opx:menu:close",se=>{Ie("menu:close",()=>{se.handle!==void 0&&!N(se)||(o.value=null,O(),ge(!1),K==null||K(),K=void 0)},void 0)}),rt(()=>{I(),ge(!1),K==null||K()});function de(se){se.rule||se.off||$e("opx:menu:choose",{handle:o.value,index:se.index})}return(se,ie)=>(c(),d("div",{class:Z(["strip op-plane op-ink",[f.value,H.value,{open:l.value,end:T.value}]]),style:Ee(E.value)},[r("div",{class:Z(["bay op-bay op-arete",{"is-end":T.value}]),"data-augmented-ui":"tr-clip bl-clip border"},[r("div",A1,[r("ul",L1,[(c(!0),d(ne,null,ve(a.value,fe=>(c(),d("li",{key:`${s.value}:${fe.index}`,class:Z(["slot op-enter",{gap:fe.blank}]),style:Ee(`--op-slot: ${fe.stagger}`)},[fe.rule&&!fe.blank?(c(),d("div",O1,m(fe.label),1)):fe.blank?R("",!0):(c(),d("div",{key:1,class:Z(["row op-frame",{on:fe.on&&!fe.off,"is-on":fe.on&&!fe.off,"op-lift":fe.on&&!fe.off,"is-off":fe.off}]),role:"button","aria-disabled":fe.off,onClick:re=>de(fe)},[r("span",R1,[L(fe.icon).length?(c(),d("svg",D1,[(c(!0),d(ne,null,ve(L(fe.icon),(re,Q)=>(c(),d("path",{key:Q,d:re},null,8,N1))),128))])):R("",!0)]),r("span",P1,m(fe.label),1),fe.value?(c(),d("span",H1,m(fe.value),1)):R("",!0),fe.checked!==void 0?(c(),d("span",{key:1,class:Z(["check",{ticked:fe.checked}]),role:"checkbox","aria-checked":fe.checked},[...ie[0]||(ie[0]=[r("svg",{viewBox:"0 0 13 13","aria-hidden":"true"},[r("path",{d:"M2.6 6.8 5 9.2 10 3.6"})],-1)])],10,F1)):R("",!0),fe.mark?(c(),d("span",B1,m(fe.mark),1)):R("",!0)],10,I1))],6))),128))]),i.value?(c(),d("div",V1,[i.value?(c(),d("p",j1,m(i.value),1)):R("",!0)])):R("",!0)])],2)],6))}}),W1=Fe(K1,[["__scopeId","data-v-7892f69a"]]),z1={key:0,class:"glyph","aria-hidden":"true"},Z1={viewBox:"0 0 24 24"},G1=["d"],q1={class:"body"},Y1={class:"tag op-eyebrow"},X1={key:0,class:"title"},J1={key:1,class:"message"},Q1={key:2,class:"help op-copy"},eb=He({__name:"NotifyToast",props:{title:{},message:{default:""},icon:{default:""},kind:{default:"info"},progress:{default:-1}},setup(e){const t=e,{t:n,has:s}=nt(),o={info:"NOTICE",success:"CONFIRMED",warning:"CAUTION",error:"UNAVAILABLE"},l=J(()=>{const u=`notify.kind.${t.kind}`;return s(u)?n(u):o[t.kind]}),i=J(()=>t.icon&&wt(At,t.icon)||[]),a=J(()=>`scaleX(${Math.max(0,Math.min(1,t.progress))})`);return(u,p)=>(c(),d("article",{class:Z(["toast op-frame op-arete op-interlace op-ink",[e.kind,{"op-lift":e.kind==="error"}]]),"data-augmented-ui":"tr-clip border"},[i.value.length?(c(),d("span",z1,[(c(),d("svg",Z1,[(c(!0),d(ne,null,ve(i.value,(f,h)=>(c(),d("path",{key:h,d:f},null,8,G1))),128))]))])):R("",!0),r("div",q1,[r("span",Y1,m(l.value),1),e.title?(c(),d("span",X1,m(e.title),1)):R("",!0),e.message?(c(),d("span",J1,m(e.message),1)):R("",!0),e.kind==="error"&&M(s)("notify.errorHelp")?(c(),d("span",Q1,m(M(n)("notify.errorHelp")),1)):R("",!0)]),e.progress>=0?(c(),d("span",{key:1,class:"bar",style:Ee({transform:a.value})},null,4)):R("",!0)],2))}}),tb=Fe(eb,[["__scopeId","data-v-49fbafea"]]),nb="audio/",ob=/^[A-Za-z0-9_-]+\.[A-Za-z0-9]+$/,sb=4e3;function Mi(e){const t=$(e);return ob.test(t)?t:""}function lb(e){if(e===null||typeof e!="object")return null;const t=e,n=Mi(t.open),s=Mi(t.close);return!n&&!s?null:{open:n,close:s,volume:Math.min(1,Math.max(0,ee(t.volume,1)))}}function ib(e,t){return new Promise(n=>{let s=!1,o;const l=(a,u)=>{s||(s=!0,o!==void 0&&clearTimeout(o),n({played:a,reason:u}))};let i;try{i=new Audio(nb+e)}catch(a){et(a,`notify stinger ${e}`),l(!1,"audio_unavailable");return}i.volume=t,i.preload="auto",i.addEventListener("ended",()=>l(!0,"")),i.addEventListener("error",()=>{l(!1,`media_error_${i.error?i.error.code:"?"}`)}),o=setTimeout(()=>{l(i.currentTime>0,i.currentTime>0?"clip_deadline":"clip_never_started")},sb);try{const a=i.play();a&&typeof a.then=="function"&&a.then(()=>{},u=>l(!1,`play_refused:${u instanceof Error?u.name:String(u)}`))}catch(a){et(a,`notify stinger ${e}`),l(!1,"play_threw")}})}const ab=8,rb=32,ub=260,cb=50,db=5e3,fb=He({__name:"NotifyRoot",setup(e){const{t}=nt(),n=["top_left","top_center","top_right","middle_left","bottom_left","bottom_center","bottom_right"],s=["info","success","warning","error"],o=at([]),l=S("top_right"),i=S(340),a=S(!1);let u,p=!1;function f(I,O){const K=$(I);return n.indexOf(K)===-1?O:K}function h(I){const O=$(I,"info");return s.indexOf(O)===-1?"info":O}function w(I){return o.value.filter(O=>O.position===I&&!O.held)}function k(){let I=0;for(const O of o.value)O.out||(I+=1);return I}function F(I,O){const K=o.value.find(de=>de.id===I&&!de.out);if(!K)return;o.value=o.value.map(de=>de===K?{...de,out:!0,progress:-1}:de),O&&$e("opx:notify:gone",{id:I});const V=K.revealed&&K.stinger?K.stinger.close:"",ge=K.stinger?K.stinger.volume:1;window.setTimeout(()=>{o.value=o.value.filter(de=>de.key!==K.key),V&&!p&&A(V,ge,"close")},ub)}async function A(I,O,K){const V=await ib(I,O);!V.played&&V.reason&&et(V.reason,`notify ${K} stinger ${I}`)}function T(I){const O=o.value.find(K=>K.position===I&&!K.out&&!K.held);O&&($e("opx:notify:gone",{id:O.id}),o.value=o.value.filter(K=>K!==O))}let L=0;function E(I,O){const K=Math.max(0,Math.round(ee(I.durationMs,O?O.durationMs:db))),V=O!==void 0&&O.durationMs===K;let ge=V?O.endsAt:0;if(K===0)ge=0;else if(!V||typeof I.remainingMs=="number"){const se=Math.max(0,Math.min(K,ee(I.remainingMs,K)));ge=Date.now()+se}const de=K>0&&I.progress!==!1&&(O?O.bar:!0);return{id:$(I.id),key:O?O.key:++L,kind:I.kind===void 0&&O?O.kind:h(I.kind),title:I.title===void 0&&O?O.title:t($(I.title)),message:I.message===void 0&&O?O.message:t($(I.message)),icon:I.icon===void 0&&O?O.icon:$(I.icon),position:f(I.position,O?O.position:l.value),durationMs:K,endsAt:ge,bar:de,progress:de?1:-1,stinger:I.stinger===void 0&&O?O.stinger:lb(I.stinger),held:O?O.held:!1,revealed:O?O.revealed:!1,out:!1}}async function H(I,O){const K=O.open;if(!K){D(I);return}await A(K,O.volume,"open"),D(I)}function D(I){if(p)return;const O=o.value.find(V=>V.key===I&&V.held&&!V.out);if(!O)return;const K=O.durationMs;o.value=o.value.map(V=>V===O?{...V,held:!1,revealed:!0,endsAt:K>0?Date.now()+K:0,progress:V.bar&&K>0?1:-1}:V),W()}function N(I){const O=$(I.id);if(!O)return;const K=o.value.find(de=>de.id===O&&!de.out),V=E(I,K);if(K){o.value=o.value.map(de=>de===K?V:de),W();return}if(k()>=rb)return;w(V.position).filter(de=>!de.out).length>=ab&&T(V.position);const ge=V.stinger!==null&&V.stinger.open!=="";ge&&(V.held=!0,V.endsAt=0,V.progress=-1),o.value=[...o.value,V],ge&&V.stinger&&H(V.key,V.stinger),W()}function q(){const I=Date.now(),O=[];let K=!1,V=!1;const ge=o.value.map(de=>{if(de.out||de.endsAt===0)return de;const se=Math.max(0,Math.min(1,(de.endsAt-I)/de.durationMs));return se<=0?(O.push(de.id),de):(K=!0,!de.bar||Math.abs(se-de.progress)<.002?de:(V=!0,{...de,progress:se}))});V&&(o.value=ge);for(const de of O)F(de,!0);!K&&O.length===0&&B()}function W(){u===void 0&&(u=setInterval(()=>Ie("notify tick",q,void 0),cb))}function B(){u!==void 0&&(clearInterval(u),u=void 0)}return ye("opx:notify:config",I=>{l.value=f(I.position,l.value);const O=ee(I.width);O>0&&(i.value=Math.round(O))}),ye("opx:notify:show",N),ye("opx:notify:update",N),ye("opx:notify:dismiss",I=>{F($(I.id),!1)}),ye("opx:notify:clear",()=>{for(const I of o.value)F(I.id,!1)}),ye("opx:notify:down",I=>{a.value=I.down===!0}),Lt(()=>{$e("opx:notify:ready",{})}),rt(()=>{p=!0,B()}),(I,O)=>(c(),d("div",{class:Z(["notify",{down:a.value}]),style:Ee({"--toast-width":i.value+"px"})},[(c(),d(ne,null,ve(n,K=>r("div",{key:K,class:Z(["stack",K])},[(c(!0),d(ne,null,ve(w(K),V=>(c(),d("div",{key:V.key,class:Z(["entry",{out:V.out}])},[Xe(tb,{kind:V.kind,title:V.title,message:V.message,icon:V.icon,progress:V.progress},null,8,["kind","title","message","icon","progress"])],2))),128))],2)),64))],6))}}),vb=Fe(fb,[["__scopeId","data-v-c72c4784"]]),pb={key:0,class:"column op-plane op-anchor-left op-ink"},hb={class:"bay op-bay op-arete","data-augmented-ui":"tr-clip bl-clip border"},mb={class:"bay-inner"},gb={key:0,class:"tabs"},bb=["disabled","onClick"],_b={key:0,class:"mark","aria-hidden":"true"},yb={key:1,class:"intro op-copy"},kb={key:2,class:"field op-frame","data-augmented-ui":"tr-clip border"},wb={class:"field-label op-eyebrow"},xb=["value","placeholder"],$b=["max","value","disabled","aria-label","aria-valuetext"],Mb={class:"row-label op-label op-truncate"},Cb={key:0,class:"row-hint op-copy op-truncate"},Sb={key:0,class:"empty op-copy"},Tb={key:4,class:"readout"},Eb={class:"count op-value"},Ab={key:0,class:"spinner","aria-hidden":"true"},Lb={key:5,class:"summary"},Ob={class:"plate"},Ib={class:"plate-label op-eyebrow"},Rb={class:"plate-value op-value op-truncate"},Db=["disabled"],Nb={class:"row-label op-label op-truncate"},Pb={key:0,class:"foot"},Hb=["disabled","onClick"],Fb={class:"row-label op-label op-truncate"},Bb={key:1,class:"tools op-plane op-anchor-right op-ink"},Vb={class:"tool-row op-bay op-arete is-end","data-augmented-ui":"tr-clip bl-clip border"},jb=["disabled","onClick"],Ub={key:0,class:"row-icon",viewBox:"0 0 24 24","aria-hidden":"true"},Kb=["d"],Wb={class:"row-label op-label op-truncate"},zb={key:2,class:"rail op-plane op-anchor-left op-ink"},Zb={class:"rail-bay op-bay op-arete","data-augmented-ui":"tr-clip bl-clip border"},Gb={class:"rail-inner"},qb={key:0,class:"views"},Yb=["disabled","title","onClick"],Xb={key:0,class:"view-icon",viewBox:"0 0 24 24","aria-hidden":"true"},Jb=["d"],Qb={class:"view-label op-eyebrow op-truncate"},e_={key:1,class:"cats"},t_=["disabled","onClick"],n_={class:"row-label op-label op-truncate"},o_={key:2,class:"tabs"},s_=["disabled","onClick"],l_={key:0,class:"mark","aria-hidden":"true"},i_={key:3,class:"lead op-copy"},a_=["disabled"],r_={class:"tile-name op-eyebrow"},u_={class:"tile-art"},c_=["src","onError"],d_={key:1,class:"tile-mono"},f_={class:"tile-name op-eyebrow"},v_={key:0,class:"tile-more op-copy"},p_={class:"slot-value op-value op-truncate"},h_=["max","value","disabled","aria-label","aria-valuetext"],m_={class:"slot-step op-frame","data-augmented-ui":"tr-clip border"},g_=["max","value","disabled","aria-label"],b_={class:"slot-of op-eyebrow"},__={key:0,class:"foot"},y_=["disabled","onClick"],k_={class:"row-label op-label op-truncate"},w_={key:3,class:"confirm"},x_={class:"dialog op-ink"},$_={class:"bay op-bay op-arete","data-augmented-ui":"tr-clip bl-clip border"},M_={class:"bay-inner"},C_={class:"ask op-copy"},S_={class:"foot"},T_={class:"row-label op-label op-truncate"},E_={class:"row-label op-label op-truncate"},A_=40,To=4,Ci=110,L_=160,Si=160,O_=2e3,I_=240,R_=He({__name:"PanelView",setup(e){function t(){return{eyebrow:"",title:"",subtitle:"",intro:"",tabs:[],tab:"",sliders:[],search:!1,summary:null,actions:[],tools:[],groups:[],selected:{},status:null,busy:!1,loading:!1,labels:{},hover:!1,columns:2}}const n=S(null),s=S(!1),o=mt(t()),l=S([]),i=S(0),a=S(""),u=S(null),p=mt({}),f=S(null),h=S(0),w=S(0),k=mt({slot:"",entries:[]}),F=mt({}),A=S(!1),T=S(null);let L=null,E,H,D,N,q=null,W,B;function I(v){return typeof v=="string"||typeof v=="number"}function O(v){return n.value!==null&&v.handle===n.value}function K(v,b){const G=$(o.labels[v]);return b?G.replace(/\{(\w+)\}/g,(ce,Le)=>{const me=b[Le];return me===void 0?ce:String(me)}):G}function V(v){return Ge(v).map(b=>{const G=$(b.icon);return{id:$(b.id),label:$(b.label),icon:G!==""&&Object.prototype.hasOwnProperty.call(At,G)?G:"",primary:b.primary===!0,disabled:b.disabled===!0}})}function ge(v){const b=Oe(v);if(Object.keys(b).length===0)return null;const G=Oe(b.action);return{label:$(b.label),value:$(b.value),action:Object.keys(G).length===0?null:V([G])[0]}}function de(v){const b=G=>v[G]!==void 0;if(b("eyebrow")&&(o.eyebrow=$(v.eyebrow)),b("title")&&(o.title=$(v.title)),b("subtitle")&&(o.subtitle=$(v.subtitle)),b("intro")&&(o.intro=$(v.intro)),b("tabs")&&(o.tabs=Ge(v.tabs).map(G=>({id:$(G.id),label:$(G.label),marked:G.marked===!0,disabled:G.disabled===!0}))),b("tab")&&(o.tab=$(v.tab)),b("sliders")){const G=Ge(v.sliders).map(ce=>({id:$(ce.id),label:$(ce.label),count:Math.max(0,ee(ce.count)),index:Math.max(0,ee(ce.index)),value:$(ce.value),disabled:ce.disabled===!0}));for(const ce of G)q!==ce.id&&delete p[ce.id];o.sliders=G}if(b("search")&&(o.search=v.search===!1?!1:$(v.search)),b("summary")&&(o.summary=ge(v.summary)),b("actions")&&(o.actions=V(v.actions)),b("tools")&&(o.tools=V(v.tools)),b("groups")&&(o.groups=V(v.groups)),b("selected")){const G=Oe(v.selected);for(const ce of Object.keys(G))o.selected[ce]=$(G[ce])}if(b("status")){const G=Oe(v.status);o.status=Object.keys(G).length===0?null:{text:$(G.text),kind:$(G.kind,"info")}}if(b("busy")&&(o.busy=v.busy===!0),b("loading")&&(o.loading=v.loading===!0),b("labels")){const G=Oe(v.labels),ce={};for(const Le of Object.keys(G))ce[Le]=$(G[Le],Le);o.labels=ce}b("tiles")&&se(v.tiles),b("hover")&&(o.hover=v.hover===!0),b("columns")&&(o.columns=ee(v.columns)===1?1:2)}function se(v){fe(v)&&ot(ie)}function ie(){const v=T.value;v&&v.scrollTop+v.clientHeight>=v.scrollHeight-Si&&Tt()}function fe(v){N!==void 0&&clearTimeout(N),N=void 0,A.value=!1;const b=Oe(v),G=$(b.slot);if(G==="")return k.slot="",k.entries=[],!1;const ce=kt(b.labels),Le=kt(b.images),me=kt(b.entries).map((Je,It)=>{const vt=$(Je);return{name:vt,label:$(ce[It])||vt,image:$(Le[It])}}),z=ee(b.from);return G!==k.slot||z===1?(k.slot=G,k.entries=me,me.length>0):z!==k.entries.length+1?!1:(k.entries=k.entries.concat(me),me.length>0)}const re=J(()=>o.tabs.length===0?"":o.tabs.some(v=>v.id===o.tab)?o.tab:o.tabs[0].id),Q=J(()=>$(o.selected[re.value])),te=J(()=>{const v=re.value,b=a.value.trim().toLowerCase();return l.value.filter(G=>v!==""&&G.tab!==""&&G.tab!==v?!1:b===""||G.search.indexOf(b)!==-1)}),xe=J(()=>Math.max(0,Math.min(i.value,te.value.length-1))),Me=J(()=>{const v=w.value>0?w.value:A_+To,b=w.value>0?pe:To;return Math.max(1,Math.floor((h.value+b)/v))*(o.columns===1?1:2)}),Ne=J(()=>{const v=Me.value,b=Math.max(0,te.value.length-v);return Math.max(0,Math.min(xe.value-Math.floor(v/2),b))}),Re=J(()=>te.value.slice(Ne.value,Ne.value+Me.value)),qe=J(()=>te.value.length===0?"":K("count",{from:Ne.value+1,to:Math.min(te.value.length,Ne.value+Me.value),total:te.value.length})),Ze=J(()=>`--columns: ${o.columns}`),le=J(()=>o.search===!1?"":o.search),Ce=J(()=>{var v,b;return(b=(v=o.summary)==null?void 0:v.action)!=null?b:null});function C(){if(Q.value==="")return 0;const v=te.value.findIndex(b=>b.id===Q.value);return v<0?0:v}bt([re,Q],()=>{i.value=C()}),bt(a,()=>{i.value=0});let pe=To;function be(){var G,ce;const v=f.value;h.value=(G=v==null?void 0:v.clientHeight)!=null?G:0;const b=(ce=v==null?void 0:v.querySelector(".row"))!=null?ce:null;if(v&&b){const Le=parseFloat(getComputedStyle(v).rowGap);pe=Number.isFinite(Le)?Le:To,w.value=b.offsetHeight+pe}}let g=null;bt(f,(v,b)=>{typeof ResizeObserver!="undefined"&&(g===null&&(g=new ResizeObserver(()=>be())),b&&g.unobserve(b),v&&g.observe(v))},{flush:"post"}),bt(()=>Re.value.length>0,v=>{v&&be()},{flush:"post"});function x(){E!==void 0&&clearTimeout(E),H!==void 0&&clearTimeout(H),D!==void 0&&clearTimeout(D),N!==void 0&&clearTimeout(N),E=void 0,H=void 0,D=void 0,N=void 0}function _(v){!o.hover||n.value===null||(x(),E=setTimeout(()=>{E=void 0,!(n.value===null||L===v)&&(L=v,$e("opx:panel:hover",{handle:n.value,item:v}))},Ci))}function P(){!o.hover||n.value===null||(x(),H=setTimeout(()=>{H=void 0,!(n.value===null||L===null)&&(L=null,$e("opx:panel:leave",{handle:n.value}))},L_))}function j(){u.value=null,B==null||B(),B=void 0}function Y(v){const b=u.value;b&&(j(),$e("opx:panel:answer",{handle:n.value,id:b.id,value:v}))}function ue(){x(),L=null,q=null;for(const v of Object.keys(p))delete p[v];s.value=!1,l.value=[],i.value=0,a.value="",k.slot="",k.entries=[],A.value=!1;for(const v of Object.keys(F))delete F[v];j(),Object.assign(o,t())}ye("opx:panel:open",v=>{Ie("panel:open",()=>{I(v.handle)&&(W==null||W(),oe(),ue(),n.value=v.handle,de(v),s.value=!0,W=Pt({id:"panel",onEscape:()=>$e("opx:panel:dismiss",{handle:n.value})}),ot(be))},void 0)}),ye("opx:panel:update",v=>{Ie("panel:update",()=>{if(!O(v))return;const b=re.value;de(v),v.clearItems===!0&&(l.value=[]),re.value!==b&&(a.value="")},void 0)}),ye("opx:panel:items",v=>{Ie("panel:items",()=>{if(!O(v))return;const b=[];for(const G of Ge(v.items)){const ce=$(G.id);if(!ce)continue;const Le=$(G.label),me=$(G.detail);b.push({id:ce,tab:$(G.tab),label:Le,detail:me,disabled:G.disabled===!0,search:`${Le} ${me} ${ce}`.toLowerCase()})}l.value=l.value.concat(b),v.done===!0&&(o.loading=!1,i.value=C())},void 0)}),ye("opx:panel:confirm",v=>{Ie("panel:confirm",()=>{if(!O(v))return;const b=$(v.id);if(b===""){j();return}u.value={id:b,title:$(v.title),text:$(v.text),yes:$(v.yes),no:$(v.no)},B==null||B(),B=Pt({id:"panel.confirm",onEscape:()=>Y(!1)})},void 0)});let ae;function oe(){ae!==void 0&&clearTimeout(ae),ae=void 0}ye("opx:panel:close",v=>{Ie("panel:close",()=>{v.handle!==void 0&&!O(v)||(n.value=null,s.value=!1,x(),j(),W==null||W(),W=void 0,oe(),ae=setTimeout(()=>{ae=void 0,s.value||ue()},I_))},void 0)}),Lt(()=>{window.addEventListener("resize",be),be()}),rt(()=>{g==null||g.disconnect(),g=null,oe(),window.removeEventListener("resize",be),x(),B==null||B(),W==null||W()});function X(v){v!==re.value&&(o.tab=v,a.value="",x(),L=null,k.slot="",k.entries=[],A.value=!1,T.value&&(T.value.scrollTop=0),$e("opx:panel:tab",{handle:n.value,tab:v}))}function we(v){v.disabled||o.busy||$e("opx:panel:select",{handle:n.value,item:v.id})}function he(v){const b=te.value.findIndex(G=>G.id===v.id);b>=0&&(i.value=b),we(v)}function ke(v){const b=te.value.length;if(b===0)return;const G=Math.max(0,Math.min(b-1,Math.trunc(Number(v))||0));i.value=G;const ce=te.value[G];ce&&!ce.disabled&&_(ce.id)}function Se(){const v=te.value[xe.value];v&&we(v)}function Te(v){const b=p[v.id];return Math.min(b===void 0?v.index:b,v.count)}const _e=J(()=>{var v;return(v=o.sliders.find(b=>b.id===re.value))!=null?v:null}),Pe=J(()=>k.slot!==re.value?[]:k.entries.map((v,b)=>({index:b+1,...v}))),Ue=J(()=>{const v=_e.value;return v===null||k.slot!==v.id?!1:k.entries.length{N=void 0,A.value=!1},O_),$e("opx:panel:tiles",{handle:n.value,slot:k.slot,from:k.entries.length+1}))}function Ot(v){const b=_e.value;b===null||b.disabled||o.busy||v<0||v>b.count||(p[b.id]=v,D!==void 0&&clearTimeout(D),D=void 0,q=null,n.value!==null&&$e("opx:panel:slide",{handle:n.value,id:b.id,index:v,commit:!0}))}function tt(v,b){if(o.busy||v.disabled)return;const G=Math.max(0,Math.min(v.count,Math.trunc(Number(b))||0));p[v.id]=G,q=v.id,D!==void 0&&clearTimeout(D),D=setTimeout(()=>{D=void 0,n.value!==null&&$e("opx:panel:slide",{handle:n.value,id:v.id,index:G,commit:!1})},Ci)}function lt(v){D!==void 0&&clearTimeout(D),D=void 0,q=null,!(o.busy||v.disabled)&&n.value!==null&&$e("opx:panel:slide",{handle:n.value,id:v.id,index:Te(v),commit:!0})}function jt(v,b){if(o.busy||v.disabled)return;const G=b.value.trim();if(G===""){b.value=String(Te(v));return}const ce=Math.trunc(Number(G));if(!Number.isFinite(ce)){b.value=String(Te(v));return}const Le=Math.max(0,Math.min(v.count,ce));b.value=String(Le),p[v.id]=Le,D!==void 0&&clearTimeout(D),D=void 0,q=null,n.value!==null&&$e("opx:panel:slide",{handle:n.value,id:v.id,index:Le,commit:!0})}function U(v){v.disabled||o.busy||$e("opx:panel:action",{handle:n.value,id:v.id})}function y(v){a.value=v}return(v,b)=>{var G,ce,Le,me;return c(),d("div",{class:Z(["room",{open:s.value}])},[o.sliders.length?R("",!0):(c(),d("section",pb,[r("div",hb,[r("div",mb,[o.tabs.length?(c(),d("nav",gb,[(c(!0),d(ne,null,ve(o.tabs,z=>(c(),d("button",{key:z.id,type:"button",class:Z(["tab op-frame",{"is-on":z.id===re.value,"is-off":z.disabled}]),disabled:z.disabled,"data-augmented-ui":"tr-clip border",onClick:Je=>X(z.id)},[Zt(m(z.label)+" ",1),z.marked?(c(),d("span",_b,"•")):R("",!0)],10,bb))),128))])):R("",!0),o.intro?(c(),d("p",yb,m(o.intro),1)):R("",!0),o.search!==!1?(c(),d("label",kb,[r("span",wb,m(K("search")),1),r("input",{class:"field-entry",type:"text",value:a.value,placeholder:le.value,onInput:b[0]||(b[0]=z=>y(z.target.value))},null,40,xb)])):R("",!0),te.value.length>1?(c(),d("div",{key:3,class:Z(["dial op-frame",{"is-off":o.busy}]),"data-augmented-ui":"tr-clip border"},[r("input",{class:"dial-track",type:"range",min:"0",max:te.value.length-1,step:"1",value:xe.value,disabled:o.busy,"aria-label":(ce=(G=o.summary)==null?void 0:G.label)!=null?ce:"","aria-valuetext":(me=(Le=te.value[xe.value])==null?void 0:Le.label)!=null?me:"",onInput:b[1]||(b[1]=z=>ke(z.target.value)),onChange:Se},null,40,$b)],2)):R("",!0),r("div",{ref_key:"gridEl",ref:f,class:Z(["grid",{busy:o.busy}]),style:Ee(Ze.value)},[(c(!0),d(ne,null,ve(Re.value,(z,Je,It,vt)=>{const Kn=[z.id===Q.value,z.id!==Q.value&&Ne.value+Je===xe.value,z.disabled||o.busy,z.label,z.detail];if(vt&&vt.el&&vt.key===z.id&&Fl(vt,Kn))return vt;const Wn=(c(),d("button",{key:z.id,type:"button",class:Z(["row op-frame",{"is-on":z.id===Q.value,"op-lift":z.id===Q.value,"is-hover":z.id!==Q.value&&Ne.value+Je===xe.value,"is-off":z.disabled||o.busy}]),disabled:z.disabled||o.busy,"data-augmented-ui":"tr-clip border",onClick:cs=>he(z),onMouseenter:cs=>_(z.id),onMouseleave:P},[r("span",Mb,m(z.label),1),z.detail?(c(),d("span",Cb,m(z.detail),1)):R("",!0)],42,["disabled","onClick","onMouseenter"]));return Wn.memo=Kn,Wn},b,2),128)),Re.value.length?R("",!0):(c(),d("p",Sb,m(K(o.loading?"loading":"empty")),1))],6),qe.value||o.busy?(c(),d("div",Tb,[r("span",Eb,m(qe.value),1),o.busy?(c(),d("span",Ab)):R("",!0)])):R("",!0),o.summary?(c(),d("div",Lb,[r("div",Ob,[r("span",Ib,m(o.summary.label),1),r("span",Rb,m(o.summary.value),1)]),Ce.value?(c(),d("button",{key:0,type:"button",class:Z(["row button op-frame",{"is-off":Ce.value.disabled||o.busy}]),disabled:Ce.value.disabled||o.busy,"data-augmented-ui":"tr-clip border",onClick:b[4]||(b[4]=z=>U(Ce.value))},[r("span",Nb,m(Ce.value.label),1)],10,Db)):R("",!0)])):R("",!0),o.status?(c(),d("p",{key:6,class:Z(["status op-copy",o.status.kind])},m(o.status.text),3)):R("",!0)]),o.actions.length?(c(),d("footer",Pb,[(c(!0),d(ne,null,ve(o.actions,z=>(c(),d("button",{key:z.id,type:"button",class:Z(["row button grow op-frame",{"is-on":z.primary,"op-lift":z.primary&&!z.disabled&&!o.busy,"is-off":z.disabled||o.busy}]),disabled:z.disabled||o.busy,"data-augmented-ui":"tr-clip border",onClick:Je=>U(z)},[r("span",Fb,m(z.label),1)],10,Hb))),128))])):R("",!0)])])),o.tools.length&&!o.sliders.length?(c(),d("div",Bb,[r("div",Vb,[(c(!0),d(ne,null,ve(o.tools,z=>(c(),d("button",{key:z.id,type:"button",class:Z(["row button tool op-frame",{"is-off":z.disabled||o.busy}]),disabled:z.disabled||o.busy,"data-augmented-ui":"tr-clip border",onClick:Je=>U(z)},[z.icon?(c(),d("svg",Ub,[(c(!0),d(ne,null,ve(M(At)[z.icon],(Je,It)=>(c(),d("path",{key:It,d:Je,fill:"none",stroke:"currentColor","stroke-width":"1.6","stroke-linecap":"round","stroke-linejoin":"round"},null,8,Kb))),128))])):R("",!0),r("span",Wb,m(z.label),1)],10,jb))),128))])])):R("",!0),o.sliders.length?(c(),d("section",zb,[r("div",Zb,[r("div",Gb,[o.tools.length?(c(),d("div",qb,[(c(!0),d(ne,null,ve(o.tools,z=>(c(),d("button",{key:z.id,type:"button",class:Z(["view-btn op-frame",{"is-off":z.disabled||o.busy}]),disabled:z.disabled||o.busy,"data-augmented-ui":"tr-clip border",title:z.label,onClick:Je=>U(z)},[z.icon?(c(),d("svg",Xb,[(c(!0),d(ne,null,ve(M(At)[z.icon],(Je,It)=>(c(),d("path",{key:It,d:Je,fill:"none",stroke:"currentColor","stroke-width":"1.6","stroke-linecap":"round","stroke-linejoin":"round"},null,8,Jb))),128))])):R("",!0),r("span",Qb,m(z.label),1)],10,Yb))),128))])):R("",!0),o.groups.length?(c(),d("div",e_,[(c(!0),d(ne,null,ve(o.groups,z=>(c(),d("button",{key:z.id,type:"button",class:Z(["row button cat op-frame",{"is-off":z.disabled||o.busy}]),disabled:z.disabled||o.busy,"data-augmented-ui":"tr-clip border",onClick:Je=>U(z)},[r("span",n_,m(z.label),1)],10,t_))),128))])):R("",!0),o.tabs.length?(c(),d("nav",o_,[(c(!0),d(ne,null,ve(o.tabs,z=>(c(),d("button",{key:z.id,type:"button",class:Z(["tab op-frame",{"is-on":z.id===re.value,"is-off":z.disabled}]),disabled:z.disabled,"data-augmented-ui":"tr-clip border",onClick:Je=>X(z.id)},[Zt(m(z.label)+" ",1),z.marked?(c(),d("span",l_,"•")):R("",!0)],10,s_))),128))])):R("",!0),o.intro?(c(),d("p",i_,m(o.intro),1)):R("",!0),o.status?(c(),d("p",{key:4,class:Z(["status op-copy",o.status.kind])},m(o.status.text),3)):R("",!0),_e.value?(c(),d("div",{key:5,ref_key:"tilesEl",ref:T,class:Z(["tiles",{busy:o.busy}]),onScrollPassive:ut},[r("button",{type:"button",class:Z(["tile none op-frame",{"is-on":Te(_e.value)===0,"is-off":_e.value.disabled||o.busy}]),disabled:_e.value.disabled||o.busy,"data-augmented-ui":"tr-clip border",onClick:b[5]||(b[5]=z=>Ot(0))},[b[15]||(b[15]=r("span",{class:"tile-art"},[r("span",{class:"tile-mono"},"−")],-1)),r("span",r_,m(K("nothing")),1)],10,a_),(c(!0),d(ne,null,ve(Pe.value,(z,Je,It,vt)=>{const Kn=[Te(_e.value)===z.index,_e.value.disabled||o.busy,z.label,z.name,z.image,F[z.name]===!0];if(vt&&vt.el&&vt.key===z.index&&Fl(vt,Kn))return vt;const Wn=(c(),d("button",{key:z.index,type:"button",class:Z(["tile op-frame",{"is-on":Te(_e.value)===z.index,"is-off":_e.value.disabled||o.busy}]),disabled:_e.value.disabled||o.busy,"data-augmented-ui":"tr-clip border",title:z.label,onClick:cs=>Ot(z.index)},[r("span",u_,[z.image&&Ye(z.name,z.image)&&!F[z.name]?(c(),d("img",{key:0,src:Ye(z.name,z.image),alt:"",draggable:"false",loading:"lazy",onError:cs=>ft(z.name)},null,40,c_)):(c(),d("span",d_,m(M(yl)(z.label)),1))]),r("span",f_,m(z.label),1)],10,["disabled","title","onClick"]));return Wn.memo=Kn,Wn},b,6),128)),Ue.value||_e.value.count>0&&k.slot!==_e.value.id?(c(),d("p",v_,m(K("loading")),1)):R("",!0)],34)):R("",!0),_e.value&&_e.value.count>0?(c(),d("div",{key:6,class:Z(["slot op-frame",{"is-on":Te(_e.value)>0&&!_e.value.disabled&&!o.busy,"is-off":_e.value.disabled||o.busy}]),"data-augmented-ui":"tr-clip border"},[r("span",p_,m(_e.value.value),1),r("input",{class:"slot-track",type:"range",min:"0",max:_e.value.count,step:"1",value:Te(_e.value),disabled:_e.value.disabled||o.busy,"aria-label":_e.value.label,"aria-valuetext":_e.value.value,onInput:b[8]||(b[8]=z=>tt(_e.value,z.target.value)),onChange:b[9]||(b[9]=z=>lt(_e.value))},null,40,h_),r("label",m_,[r("input",{class:"slot-number op-eyebrow",type:"number",inputmode:"numeric",min:"0",max:_e.value.count,value:Te(_e.value),disabled:_e.value.disabled||o.busy,"aria-label":_e.value.label,onKeydown:b[10]||(b[10]=_t(()=>{},["stop"])),onKeyup:b[11]||(b[11]=Jn(z=>jt(_e.value,z.target),["enter"])),onChange:b[12]||(b[12]=z=>jt(_e.value,z.target))},null,40,g_),r("span",b_,"/ "+m(_e.value.count),1)])],2)):R("",!0)]),o.actions.length?(c(),d("footer",__,[(c(!0),d(ne,null,ve(o.actions,z=>(c(),d("button",{key:z.id,type:"button",class:Z(["row button grow op-frame",{"is-on":z.primary,"op-lift":z.primary&&!z.disabled&&!o.busy,"is-off":z.disabled||o.busy}]),disabled:z.disabled||o.busy,"data-augmented-ui":"tr-clip border",onClick:Je=>U(z)},[r("span",k_,m(z.label),1)],10,y_))),128))])):R("",!0)])])):R("",!0),u.value?(c(),d("div",w_,[b[16]||(b[16]=r("div",{class:"scrim"},null,-1)),r("div",x_,[r("section",$_,[r("div",M_,[r("h2",null,m(u.value.title),1),r("p",C_,m(u.value.text),1)]),r("footer",S_,[r("button",{type:"button",class:"row button grow op-frame","data-augmented-ui":"tr-clip border",onClick:b[13]||(b[13]=z=>Y(!1))},[r("span",T_,m(u.value.no),1)]),r("button",{type:"button",class:"row button grow op-frame is-on op-lift","data-augmented-ui":"tr-clip border",onClick:b[14]||(b[14]=z=>Y(!0))},[r("span",E_,m(u.value.yes),1)])])])])])):R("",!0)],2)}}}),D_=Fe(R_,[["__scopeId","data-v-c220f505"]]),N_={key:0,class:"progress"},P_={class:"plate op-plane op-ink"},H_={class:"label op-eyebrow op-truncate"},F_={class:"track op-frame","data-augmented-ui":"tr-clip border"},B_={key:0,class:"hint op-eyebrow"},V_=He({__name:"ProgressRoot",setup(e){const{t}=nt(),n=S(!1),s=S(""),o=S(!1),l=S(""),i=S(!1),a=S(0),u=at(0);let p;function f(){p!==void 0&&clearTimeout(p),p=void 0}return ye("opx:progress:show",h=>{f(),s.value=$(h.label),l.value=$(h.cancelKey),o.value=De(h.cancelable)&&l.value!=="",u.value=Math.max(0,ee(h.durationMs)),i.value=!1,a.value+=1,n.value=!0,p=setTimeout(()=>{i.value=!0},32)}),ye("opx:progress:hide",()=>{f(),n.value=!1,i.value=!1}),rt(f),(h,w)=>n.value?(c(),d("div",N_,[r("section",P_,[r("p",H_,m(M(t)(s.value)),1),r("span",F_,[(c(),d("span",{key:a.value,class:"bar",style:Ee({transform:i.value?"scaleX(1)":"scaleX(0)",transitionDuration:`${u.value}ms`})},null,4))]),o.value?(c(),d("p",B_,m(M(t)("progress.cancel",{key:l.value})),1)):R("",!0)])])):R("",!0)}}),j_=Fe(V_,[["__scopeId","data-v-559f9edb"]]),U_={class:"rig"},K_={class:"crown"},W_={class:"antenna","aria-hidden":"true"},z_=["title"],Z_={class:"knob-tag op-eyebrow"},G_=["title"],q_={class:"knob-tag op-eyebrow"},Y_={class:"body op-bay","data-augmented-ui":"tr-clip bl-clip border"},X_={class:"screen-top op-eyebrow"},J_={key:0,class:"ch"},Q_={class:"signal","aria-hidden":"true"},ey={class:"freq op-truncate"},ty={class:"name op-copy op-truncate"},ny={class:"screen-foot op-eyebrow"},oy={key:0,class:"tag"},sy={key:1,class:"tag"},ly={key:1,class:"blank-copy op-label"},iy={key:0,class:"strip"},ay=["title"],ry={class:"ticks"},uy=["title","onClick"],cy=["title"],dy={class:"keys"},fy=["disabled"],vy=["disabled"],py=["disabled"],hy={class:"foot"},my=["title"],gy={class:"ptt-tag op-eyebrow"},by=12,_y=He({__name:"RadioHolo",setup(e){const{t}=nt(),n=S(!1),s=S("right"),o=S(!1),l=S(!0),i=S(!1),a=S(!1),u=S([]),p=S(null);Lt(()=>{$e("opx:radio:ready",{})}),ye("opx:radio:holo",ie=>{Ie("radio:holo",()=>{var Q;const fe=n.value;n.value=ie.open===!0,$(ie.anchor)!==""&&(s.value=$(ie.anchor)),o.value=ie.power===!0,l.value=ie.handset!==!1,i.value=ie.needsHandset===!0,a.value=ie.tx===!0,u.value=Ge(ie.channels).map(te=>({key:$(te.key),label:$(te.label,$(te.key)),short:$(te.short,$(te.key)),joined:te.joined===!0,muted:te.muted===!0,active:te.active===!0,auto:te.auto===!0})).filter(te=>te.key!=="");const re=u.value.some(te=>te.key===p.value);if(!fe||!re){const te=(Q=u.value.find(xe=>xe.active))!=null?Q:u.value[0];p.value=te?te.key:null}},void 0)});const f=J(()=>u.value.findIndex(ie=>ie.key===p.value)),h=J(()=>f.value>=0?u.value[f.value]:null),w=J(()=>i.value&&!l.value?t("radio.holo.noHandset"):o.value?u.value.length===0?t("radio.holo.none"):null:t("radio.holo.noPower")),k=J(()=>w.value===null&&h.value!==null),F=J(()=>{const ie=h.value;return ie===null||!ie.joined?t("radio.status.off"):ie.active&&a.value?t("radio.status.active"):ie.muted?t("radio.status.muted"):t("radio.status.listening")}),A=J(()=>{const ie=h.value;return!k.value||ie===null?0:ie.joined?ie.muted?2:ie.active?4:3:1});function T(ie){const fe=u.value.length;if(fe===0)return;const re=f.value<0?0:f.value;p.value=u.value[(re+ie+fe)%fe].key}function L(ie){T(ie.deltaY>0?1:-1)}const E=J(()=>`rotate(${Math.max(f.value,0)*36}deg)`);function H(ie,fe,re){const Q={verb:ie};fe!==void 0&&(Q.channel=fe),re!==void 0&&(Q.on=re),$e("opx:radio:request",Q)}function D(){H("power",void 0,!o.value)}function N(){const ie=h.value;!k.value||ie===null||H(ie.joined?"leave":"join",ie.key)}function q(){const ie=h.value;!k.value||ie===null||!ie.joined||ie.active||H("select",ie.key)}function W(){const ie=h.value;!k.value||ie===null||!ie.joined||H("mute",ie.key,!ie.muted)}const B=S(!1);function I(ie){ie?(window.addEventListener("pointerup",K),window.addEventListener("pointercancel",K),window.addEventListener("blur",K)):(window.removeEventListener("pointerup",K),window.removeEventListener("pointercancel",K),window.removeEventListener("blur",K))}function O(ie){ie.button!==0||B.value||(B.value=!0,I(!0),$e("opx:radio:talk",{on:!0}))}function K(){B.value&&(B.value=!1,I(!1),$e("opx:radio:talk",{on:!1}))}function V(){K(),$e("opx:radio:close",{})}function ge(ie){n.value&&(ie.key==="ArrowUp"||ie.key==="ArrowLeft"?(ie.preventDefault(),T(-1)):(ie.key==="ArrowDown"||ie.key==="ArrowRight")&&(ie.preventDefault(),T(1)))}let de;bt(n,ie=>{ie&&de===void 0?(de=Pt({id:"radio",onEscape:V}),window.addEventListener("keydown",ge)):!ie&&de!==void 0&&(K(),de(),de=void 0,window.removeEventListener("keydown",ge))}),rt(()=>{K(),de==null||de(),de=void 0,window.removeEventListener("keydown",ge)});const se=J(()=>s.value.endsWith("left")?"is-left":s.value.endsWith("right")?"is-right":"is-centre");return(ie,fe)=>{var re,Q,te,xe,Me,Ne,Re,qe,Ze,le,Ce;return n.value?(c(),d("div",{key:0,class:Z(["radio op-ink",["anchor-"+s.value,se.value]])},[r("div",U_,[fe[7]||(fe[7]=r("div",{class:"emitter","aria-hidden":"true"},[r("span",{class:"node"}),r("span",{class:"node"})],-1)),fe[8]||(fe[8]=r("div",{class:"beam","aria-hidden":"true"},null,-1)),r("div",{class:Z(["device",{dead:!o.value,tx:a.value}])},[r("div",K_,[r("div",W_,[r("span",{class:Z(["tip",{lit:a.value}])},null,2)]),r("button",{type:"button",class:Z(["knob pwr",{on:o.value}]),title:M(t)("radio.holo.power"),onClick:D},[fe[4]||(fe[4]=r("span",{class:"knob-face"},null,-1)),r("span",Z_,m(M(t)("radio.holo.power")),1)],10,z_),r("button",{type:"button",class:Z(["knob dial",{off:!k.value}]),title:M(t)("radio.holo.dial"),onClick:fe[0]||(fe[0]=C=>T(1)),onContextmenu:fe[1]||(fe[1]=_t(C=>T(-1),["prevent"])),onWheel:_t(L,["prevent"])},[r("span",{class:"knob-face",style:Ee({transform:E.value})},[...fe[5]||(fe[5]=[r("i",null,null,-1)])],4),r("span",q_,m(M(t)("radio.holo.dial")),1)],42,G_)]),r("div",Y_,[r("div",{class:Z(["screen",{blank:!k.value}])},[r("div",X_,[r("span",null,m(M(t)("radio.title")),1),k.value?(c(),d("span",J_,m(M(t)("radio.holo.channel",{n:f.value+1,total:u.value.length})),1)):R("",!0),r("span",Q_,[(c(),d(ne,null,ve(4,C=>r("i",{key:C,class:Z({on:C<=A.value})},null,2)),64))])]),k.value&&h.value?(c(),d(ne,{key:0},[r("p",ey,m(h.value.short),1),r("p",ty,m(h.value.label),1),r("div",ny,[r("span",{class:Z(["state",{hot:h.value.active&&a.value,quiet:!h.value.joined||h.value.muted}])},m(F.value),3),h.value.active?(c(),d("span",oy,m(M(t)("radio.holo.onKey")),1)):R("",!0),h.value.auto?(c(),d("span",sy,m(M(t)("radio.holo.auto")),1)):R("",!0)]),r("div",{class:Z(["scope",{hot:h.value.active&&a.value,idle:!h.value.joined||h.value.muted}]),"aria-hidden":"true"},[(c(),d(ne,null,ve(by,C=>r("i",{key:C,style:Ee({animationDelay:`${C*-97}ms`})},null,4)),64))],2)],64)):(c(),d("p",ly,m(w.value),1))],2),k.value?(c(),d("div",iy,[r("button",{type:"button",class:"step",title:M(t)("radio.holo.prev"),onClick:fe[2]||(fe[2]=C=>T(-1))},"◀",8,ay),r("div",ry,[(c(!0),d(ne,null,ve(u.value,C=>(c(),d("button",{key:C.key,type:"button",class:Z(["tick",{at:C.key===p.value,joined:C.joined,active:C.active}]),title:C.label,onClick:pe=>p.value=C.key},null,10,uy))),128))]),r("button",{type:"button",class:"step",title:M(t)("radio.holo.next"),onClick:fe[3]||(fe[3]=C=>T(1))},"▶",8,cy)])):R("",!0),r("div",dy,[r("button",{type:"button",class:Z(["key op-eyebrow",{off:!k.value,lit:(re=h.value)==null?void 0:re.joined}]),disabled:!k.value,onClick:N},m((Q=h.value)!=null&&Q.joined?M(t)("radio.holo.leave"):M(t)("radio.holo.join")),11,fy),r("button",{type:"button",class:Z(["key op-eyebrow",{off:!k.value||!((te=h.value)!=null&&te.joined),lit:(xe=h.value)==null?void 0:xe.active}]),disabled:!k.value||!((Me=h.value)!=null&&Me.joined)||((Ne=h.value)==null?void 0:Ne.active),onClick:q},m((Re=h.value)!=null&&Re.active?M(t)("radio.holo.selected"):M(t)("radio.holo.select")),11,vy),r("button",{type:"button",class:Z(["key op-eyebrow",{off:!k.value||!((qe=h.value)!=null&&qe.joined),lit:(Ze=h.value)==null?void 0:Ze.muted}]),disabled:!k.value||!((le=h.value)!=null&&le.joined),onClick:W},m((Ce=h.value)!=null&&Ce.muted?M(t)("radio.holo.unmute"):M(t)("radio.holo.mute")),11,py)]),fe[6]||(fe[6]=r("div",{class:"grille","aria-hidden":"true"},null,-1)),r("div",hy,[r("button",{type:"button",class:"shut op-eyebrow",onClick:V},m(M(t)("radio.holo.close")),1)])]),r("button",{type:"button",class:Z(["ptt",{held:B.value,hot:a.value}]),title:M(t)("radio.holo.ptt"),onPointerdown:O,onPointerup:K,onPointercancel:K,onPointerleave:K},[r("span",gy,m(M(t)("radio.holo.ptt")),1)],42,my)],2)])],2)):R("",!0)}}}),yy=Fe(_y,[["__scopeId","data-v-9453be5e"]]),ky={key:0,class:"cap"},wy=["src","onError"],xy={key:2,class:"mark op-truncate"},$y={key:3,class:"mark faint op-truncate"},My={key:4,class:"count"},Cy=He({__name:"SlotbarRoot",setup(e){const{t}=nt(),n=at([]),s=S(!1),o=S({});let l;function i(){l!==void 0&&clearTimeout(l),l=void 0}ye("opx:inventory:slotbar",p=>{i();const f=kt(p.slots).map(w=>{const k=Oe(w);return{slot:ee(k.slot),key:$(k.key),name:$(k.name),label:$(k.label),image:$(k.image),count:ee(k.count)}}),h=Math.max(0,ee(p.holdMs));if(f.length===0||h<=0){s.value=!1,n.value=[];return}n.value=f,s.value=!0,l=setTimeout(()=>{s.value=!1},h)}),rt(i);function a(p){o.value={...o.value,[p]:!0}}const u=J(()=>n.value.map(p=>({...p,filled:p.name!=="",art:p.name!==""&&!o.value[p.name]?_l(p.name,p.image):"",mark:yl(p.label||p.name)})));return(p,f)=>s.value?(c(),d("div",{key:0,class:"slotbar",style:Ee(M(Gs).bottomCenter>0?{bottom:`max(var(--op-inset-y), ${M(Gs).bottomCenter}px)`}:void 0)},[(c(!0),d(ne,null,ve(u.value,h=>(c(),d("span",{key:h.slot,class:"cell op-frame","data-augmented-ui":"tr-clip border"},[h.key?(c(),d("span",ky,m(h.key),1)):R("",!0),h.art?(c(),d("img",{key:1,class:"art",src:h.art,alt:"",draggable:"false",onError:w=>a(h.name)},null,40,wy)):h.filled?(c(),d("span",xy,m(h.mark),1)):(c(),d("span",$y,m(M(t)("inventory.slotbar.empty")),1)),h.count>1?(c(),d("span",My,m(h.count),1)):R("",!0)]))),128))],4)):R("",!0)}}),Sy=Fe(Cy,[["__scopeId","data-v-b698cab2"]]),Ty={class:"prompts"},Ey={key:0,class:"title op-truncate"},Ay={class:"caps"},Ly={key:0,class:"join"},Oy={class:"cap op-cap","data-augmented-ui":"tr-clip border"},Iy={class:"label op-truncate"},Ry={key:0,class:"value"},Dy=32,Ny=24,Py=6,Hy=He({__name:"PromptsRoot",setup(e){const{t}=nt(),n=["bottom-right","bottom-left","top-right","top-left"],s=at([]),o=S("bottom-right"),l=S(0),i=S(420),a=S(!1);function u(k){const F=k.combo===!0;return kt(k.caps).slice(0,Py).map((A,T)=>({key:`${T}:${$(A)}`,label:$(A),join:F&&T>0}))}ye("opx:prompts:config",k=>{const F=$(k.anchor);n.indexOf(F)!==-1&&(o.value=F);const A=ee(k.offset,-1);A>=0&&(l.value=Math.round(A));const T=ee(k.maxWidth);T>0&&(i.value=Math.round(T))}),ye("opx:prompts:frame",k=>{const F=new Set,A=[];let T=Ny;for(const L of Ge(k.groups)){if(A.length>=Dy||T<=0)break;const E=$(L.key);if(!E||F.has(E))continue;const H=new Set,D=[];for(const N of Ge(L.rows)){if(T<=0)break;const q=$(N.key);if(!q||H.has(q))continue;const W=u(N);W.length!==0&&(H.add(q),D.push({key:q,caps:W,label:$(N.label),value:$(N.value),dim:N.dim===!0}),T-=1)}D.length!==0&&(F.add(E),A.push({key:E,title:$(L.title),rows:D}))}s.value=A,a.value=!1}),ye("opx:prompts:hide",()=>{a.value=!0});const p=S(null),f=J(()=>s.value.length>0&&!a.value);let h=null;function w(){const k=p.value;if(k===null||!f.value||o.value!=="bottom-right"){Es(0);return}Es(l.value+k.offsetHeight)}return bt([f,o,l],w,{flush:"post"}),Lt(()=>{$e("opx:prompts:ready",{}),p.value!==null&&typeof ResizeObserver!="undefined"&&(h=new ResizeObserver(w),h.observe(p.value)),w()}),ls(()=>{h!==null&&h.disconnect(),h=null,Es(0)}),(k,F)=>(c(),d("div",Ty,[r("div",{ref_key:"strip",ref:p,class:Z(["strip",[o.value,{open:f.value}]]),style:Ee({"--strip-offset":l.value+"px","--strip-width":i.value+"px"})},[(c(!0),d(ne,null,ve(s.value,A=>(c(),d("div",{key:A.key,class:"group"},[A.title?(c(),d("div",Ey,m(M(t)(A.title)),1)):R("",!0),(c(!0),d(ne,null,ve(A.rows,T=>(c(),d("div",{key:T.key,class:Z(["row",{dim:T.dim}])},[r("span",Ay,[(c(!0),d(ne,null,ve(T.caps,L=>(c(),d("span",{key:L.key,class:"key"},[L.join?(c(),d("span",Ly,"+")):R("",!0),r("kbd",Oy,m(L.label),1)]))),128))]),r("span",Iy,m(M(t)(T.label)),1),T.value?(c(),d("span",Ry,m(T.value),1)):R("",!0)],2))),128))]))),128))],6)]))}}),Fy=Fe(Hy,[["__scopeId","data-v-8787c1c0"]]),By={class:"stage op-plane"},Vy={class:"bay op-bay op-arete","data-augmented-ui":"tr-clip bl-clip border"},jy={class:"bay-inner op-interlace"},Uy={class:"head"},Ky={class:"head-text"},Wy={class:"eyebrow op-eyebrow"},zy={class:"op-truncate"},Zy={key:0,class:"note op-copy"},Gy={class:"grid"},qy=["aria-pressed","onClick"],Yy={class:"index op-eyebrow","aria-hidden":"true"},Xy={class:"card-text"},Jy={class:"label op-label op-truncate"},Qy={key:0,class:"district op-value op-truncate"},ek={key:1,class:"foot"},tk={class:"hint op-copy"},nk=240,ok=He({__name:"SpawnView",setup(e){const{t,has:n}=nt(),s=J(()=>n("spawn.eyebrow")?t("spawn.eyebrow"):"SPAWN"),o=S(!1),l=S(""),i=S(""),a=S(""),u=S([]),p=S("");let f;function h(D){return String(D+1).padStart(2,"0")}let w;function k(){w!==void 0&&clearTimeout(w),w=void 0}function F(){o.value=!1,k(),w=setTimeout(()=>{w=void 0,o.value||A()},nk)}function A(){o.value=!1,u.value=[],p.value="",l.value="",i.value="",a.value=""}function T(D){const N=u.value.length;if(N===0)return;const q=u.value.findIndex(W=>W.id===p.value);if(q===-1){p.value=D>0?u.value[0].id:u.value[N-1].id;return}p.value=u.value[(q+D+N)%N].id}function L(){!o.value||p.value===""||$e("opx:spawn:choose",{id:p.value})}function E(D){p.value=D,L()}function H(D){if(!(!o.value||po()!=="spawn")&&!D.defaultPrevented){if(D.key==="ArrowDown"||D.key==="ArrowRight"){D.preventDefault(),T(1);return}if(D.key==="ArrowUp"||D.key==="ArrowLeft"){D.preventDefault(),T(-1);return}D.key==="Enter"&&(D.preventDefault(),L())}}return ye("opx:spawn:open",D=>{Ie("spawn:open",()=>{const N=[];for(const q of Ge(D.locations)){const W=$(q.id);W&&N.push({id:W,label:$(q.label,W),district:$(q.district)})}N.length!==0&&(k(),u.value=N,l.value=$(D.title),i.value=$(D.about),a.value=$(D.hint),p.value="",o.value=!0,f==null||f(),f=Pt({id:"spawn",onEscape:()=>{}}))},void 0)}),ye("opx:spawn:close",D=>{Ie("spawn:close",()=>{F(),f==null||f(),f=void 0},void 0)}),Lt(()=>{window.addEventListener("keydown",H)}),rt(()=>{k(),window.removeEventListener("keydown",H),f==null||f()}),(D,N)=>(c(),d("div",{class:Z(["room op-ink",{open:o.value}])},[r("div",{class:Z(["scrim",{shown:o.value}])},null,2),r("div",By,[r("div",Vy,[r("div",jy,[r("div",Uy,[r("div",Ky,[r("span",Wy,m(s.value),1),r("h1",zy,m(l.value),1)])]),i.value?(c(),d("p",Zy,m(i.value),1)):R("",!0),r("ul",Gy,[(c(!0),d(ne,null,ve(u.value,(q,W)=>(c(),d("li",{key:q.id,class:"slot op-enter",style:Ee(`--op-slot: ${W}`)},[r("div",{class:Z(["card op-frame",{"is-on":q.id===p.value,"op-lift":q.id===p.value}]),"data-augmented-ui":"tr-clip border",role:"button","aria-pressed":q.id===p.value,onClick:B=>E(q.id)},[r("span",Yy,m(h(W)),1),r("span",Xy,[r("span",Jy,m(q.label),1),q.district?(c(),d("span",Qy,m(q.district),1)):R("",!0)])],10,qy)],4))),128))]),a.value?(c(),d("div",ek,[r("p",tk,m(a.value),1)])):R("",!0)])])])],2))}}),sk=Fe(ok,[["__scopeId","data-v-6a712047"]]),lk={class:"tags"},ik={class:"name"},ak={key:0,class:"user op-eyebrow"},rk={key:1,class:"cid"},uk={key:2,class:"badge"},ck=.5,dk=He({__name:"TagsRoot",setup(e){let t=!1;const n=at([]),s=at(new Map),o=S(!0),l=S(!0),i=S(!0),a=S(""),u=J(()=>n.value.map(f=>{const h=s.value.get(f.anchor);return h?{row:f,spot:h}:null}).filter(f=>f!==null));function p(f){const h=Math.round(f.spot.x*window.innerWidth),w=Math.round(f.spot.y*window.innerHeight);return{transform:`translate3d(${h}px, ${w}px, 0) translate(-50%, -100%)`,opacity:String(f.row.alpha)}}return ye("opx:admin:tags",f=>{switch($(f.kind)){case"config":o.value=De(f.technical,!0),l.value=De(f.showUser,!0),i.value=De(f.showCitizen,!0),a.value=$(f.staffLabel);break;case"rows":n.value=Ge(f.rows).map(h=>({anchor:$(h.anchor),playerId:Math.round(ee(h.playerId)),name:$(h.name),user:$(h.user),citizenId:$(h.citizenId),staff:h.staff===!0,alpha:Math.max(0,Math.min(1,ee(h.alpha,1)))})).filter(h=>h.anchor!==""&&h.name!=="");break;case"hide":n.value=[];break}}),ye("open77:anchors",f=>{const h=kt(f.anchors);if(!t){t=!0;const k=h.length>0?Oe(h[0]):{};et(`keys=${Object.keys(f).join("|")} n=${h.length} entry=${Object.keys(k).join("|")} screen=${Object.keys(Oe(k.screen)).join("|")}`,"tags anchor batch")}const w=new Map;for(const k of h){const F=Oe(k),A=$(F.id)||$(F.anchor);if(A===""||F.onScreen===!1)continue;const T=Oe(F.screen),L=ee(T.x,ee(F.x,-1)),E=ee(T.y,ee(F.y,-1));if(L<0||E<0)continue;const H=ee(T.depth,ee(F.depth,-1));H>=0&&H(c(),d("div",lk,[(c(!0),d(ne,null,ve(u.value,w=>(c(),d("div",{key:w.row.anchor,class:Z(["tag",{staff:w.row.staff}]),style:Ee(p(w))},[o.value?(c(),d("span",{key:0,class:Z(["id",{staff:w.row.staff}]),"data-augmented-ui":"tr-clip border"},m(w.row.playerId),3)):R("",!0),r("span",{class:Z(["plate",{staff:w.row.staff,bare:!o.value}])},[r("span",ik,m(w.row.name),1),l.value&&w.row.user?(c(),d("span",ak,m(w.row.user),1)):R("",!0),i.value&&w.row.citizenId?(c(),d("span",rk,m(w.row.citizenId),1)):R("",!0),w.row.staff&&a.value?(c(),d("span",uk,m(a.value),1)):R("",!0)],2)],6))),128))]))}}),fk=Fe(dk,[["__scopeId","data-v-1a7c1d5f"]]),vk=["data-depth"],pk={key:0,class:"status"},hk={key:1,class:"status bad"},mk={key:1,class:"rows",role:"menu"},gk=["data-folder","tabindex","aria-disabled","aria-expanded","onMouseenter","onClick","onKeydown"],bk={class:"glyph","aria-hidden":"true"},_k={viewBox:"0 0 24 24"},yk=["d"],kk={class:"label op-label op-truncate"},wk={class:"value op-value op-truncate"},xk=["tabindex","aria-disabled","onMouseenter","onClick","onKeydown"],$k={class:"glyph","aria-hidden":"true"},Mk={key:0,class:"spin"},Ck={key:1,viewBox:"0 0 24 24"},Sk=["d"],Tk={class:"label op-label op-truncate"},Ek=["aria-checked"],Ak={key:1,class:"hint"},Lk="/",Ok=180,Ik=20,Eo=6,an=12,Rs=224,Ti=16,Rk=110,Dk=320,Ei=10,Nk=He({__name:"TargetView",setup(e){const t=Rs+Ti,n=S(null),s=S(!1),o=S(!1),l=S(!1),i=S(!1),a=S(!1),u=S([]),p=S([]),f=S({looking:"",unavailable:""}),h=S(""),w=S({x:.5,y:.5}),k=S({x:.5,y:.5}),F=S({w:window.innerWidth,h:window.innerHeight}),A=S(null),T=S(0),L=S(!1),E=S(0);let H=90,D,N,q=null,W,B=0;const I={x:-1,y:-1};let O=null,K=null,V,ge=!1,de=null,se=-1;function ie(U){return typeof U=="string"||typeof U=="number"}function fe(U){return n.value!==null&&U.handle===n.value}function re(U,y,v){return Math.max(y,Math.min(v,U))}function Q(U,y={}){n.value!==null&&$e(U,{...y,handle:n.value})}function te(U,y){if(U.length!==y.length)return!1;for(let v=0;vy.trim()).filter(y=>y!=="")}function Me(U){const y=U.length,v=[],b=new Map;for(const G of u.value){const ce=xe(G);let Le=!0;for(let me=0;mey){const me=ce[y],z=b.get(me);z===void 0?(b.set(me,1),v.push({kind:"folder",name:me,count:1})):b.set(me,z+1);continue}v.push({kind:"row",row:G})}}return v.map(G=>{var ce;return G.kind==="folder"?{...G,count:(ce=b.get(G.name))!=null?ce:1}:G})}const Ne=J(()=>{var y;const U=[];for(let v=0;v<=p.value.length;v+=1){const b=Me(p.value.slice(0,v));if(v>0&&b.length===0)break;U.push({depth:v,entries:b,openName:(y=p.value[v])!=null?y:""})}return U}),Re=J(()=>{var U,y;return s.value&&(i.value||a.value||((y=(U=Ne.value[0])==null?void 0:U.entries.length)!=null?y:0)>0)}),qe=J(()=>{const U=Ne.value.length;return U*Rs+Math.max(0,U-1)*Ti}),Ze=J(()=>E.value<0),le=J(()=>{const U=k.value.x*F.value.w,y=E.value<0?U-Eo-qe.value:U+Eo;return re(y,an,Math.max(an,F.value.w-qe.value-an))});function Ce(){if(E.value!==0)return;const U=k.value.x*F.value.w,y=F.value.w-an-(U+Eo),v=U-Eo-an,b=Rs+t;y>=b?E.value=1:v>=b?E.value=-1:E.value=y>=v?1:-1}function C(){B=0;const U=A.value;if(!U)return;const y=k.value.y*F.value.h;T.value=re(y-Ik,an,Math.max(an,F.value.h-U.offsetHeight-an))}function pe(){B===0&&(B=requestAnimationFrame(C))}function be(){V!==void 0&&clearTimeout(V),V=void 0,K=null}function g(){D!==void 0&&clearTimeout(D),N!==void 0&&clearTimeout(N),D=void 0,N=void 0,be()}function x(){g(),o.value=!1,i.value=!1,a.value=!1,l.value=!1,u.value=[],p.value=[],h.value="",q=null,E.value=0,O=null}function _(){x(),s.value=!1,n.value=null,L.value=!1,se=-1,ge=!1,de=null,W==null||W(),W=void 0}function P(U){const y=A.value;return y?y.querySelector(`[data-depth="${U}"]`):null}function j(U){const y=P(U);return y?Array.from(y.querySelectorAll('[role="button"]:not([aria-disabled="true"])')):[]}function Y(){var y;const U=document.activeElement;return(y=U==null?void 0:U.closest('[role="button"]'))!=null?y:null}function ue(){var b;const U=document.activeElement,y=(b=U==null?void 0:U.closest("[data-depth]"))!=null?b:null,v=y?Number(y.dataset.depth):Number.NaN;return Number.isFinite(v)?v:p.value.length}function ae(U,y){if(O===null)return!1;const{ax:v,ay:b,nx:G,top:ce,bottom:Le}=O,me=(G-v)*(y-b)-(ce-b)*(U-v),z=-(Le-ce)*(U-G),Je=(v-G)*(y-Le)-(b-Le)*(U-G),It=me<0||z<0||Je<0,vt=me>0||z>0||Je>0;return!(It&&vt)}function oe(U){O=null,!(U<1||I.x<0)&&ot(()=>{const y=P(U);if(!y)return;const v=y.getBoundingClientRect();O={ax:I.x,ay:I.y,nx:Ze.value?v.right:v.left,top:v.top-Ei,bottom:v.bottom+Ei}})}function X(U,y){o.value||(be(),!te(U,p.value)&&(p.value=U,y?(L.value=!1,oe(U.length)):O=null,ot(C)))}function we(U,y){V!==void 0&&clearTimeout(V),K={next:U,el:y};const v=ae(I.x,I.y)?Dk:Rk;V=setTimeout(()=>{V=void 0;const b=K;K=null,!(b===null||ge)&&b.el.matches(":hover")&&X(b.next,!0)},v)}function he(U,y){if(o.value||L.value)return;const v=y.currentTarget;if(v instanceof HTMLElement){if(te(U,p.value)){be();return}K!==null&&K.el===v&&te(K.next,U)||we(U,v)}}function ke(U){o.value||(be(),o.value=!0,h.value=U.token,Q("opx:target:select",{token:U.token}))}function Se(U){if(U.clientX===I.x&&U.clientY===I.y||(I.x=U.clientX,I.y=U.clientY,L.value=!1,O!==null&&!ae(I.x,I.y)&&(O=null,K!==null&&we(K.next,K.el)),!s.value||o.value||Re.value))return;const y={x:re(U.clientX/F.value.w,0,1),y:re(U.clientY/F.value.h,0,1)};w.value=y,D===void 0&&(D=setTimeout(()=>{D=void 0,!(!s.value||o.value||Re.value)&&(q&&q.x===w.value.x&&q.y===w.value.y||(q={...w.value},Q("opx:target:hover",q)))},H))}function Te(U){se=U.timeStamp}function _e(U){U.stopPropagation()}function Pe(U,y){const v=A.value;if(v===null)return!1;const b=v.getBoundingClientRect();return U>=b.left&&U<=b.right&&y>=b.top&&y<=b.bottom}function Ue(U){if(s.value){if(U.timeStamp===se){se=-1;return}Re.value&&Pe(U.clientX,U.clientY)||Q("opx:target:cancel")}}function Ye(U){U.preventDefault();const y=de;if(de=null,!s.value)return;if(Re.value||o.value){if(Re.value&&!o.value&&p.value.length>0){X(p.value.slice(0,-1),!1);return}Q("opx:target:cancel");return}const v=y!=null?y:{x:U.clientX,y:U.clientY};Q("opx:target:pick",{x:re(v.x/F.value.w,0,1),y:re(v.y/F.value.h,0,1)})}const ft=["ArrowDown","ArrowUp","Home","End"];function ut(U){var G;if(!s.value||!Re.value||po()!=="target")return;const y=U.key,v=Ze.value?"ArrowLeft":"ArrowRight",b=Ze.value?"ArrowRight":"ArrowLeft";if(ft.indexOf(y)!==-1){U.preventDefault();const ce=j(ue());if(ce.length===0)return;const Le=ce.indexOf(document.activeElement);let me;y==="Home"?me=0:y==="End"?me=ce.length-1:Le<0?me=y==="ArrowUp"?ce.length-1:0:me=(Le+(y==="ArrowDown"?1:-1)+ce.length)%ce.length,L.value=!0,ce[me].focus();return}if(y===v){const ce=(G=Y())==null?void 0:G.dataset.folder;if(ce===void 0||ce==="")return;U.preventDefault();const Le=ue();L.value=!0,X(p.value.slice(0,Le).concat([ce]),!1),ot(()=>{var me;(me=j(Le+1)[0])==null||me.focus()});return}if(y===b){const ce=ue();if(ce<1)return;U.preventDefault();const Le=p.value[ce-1];L.value=!0,X(p.value.slice(0,ce-1),!1),ot(()=>{var Je;const me=j(ce-1),z=me.find(It=>It.dataset.folder===Le);(Je=z!=null?z:me[0])==null||Je.focus()})}}function Tt(){F.value={w:window.innerWidth,h:window.innerHeight},pe()}function Ot(){ge=!1,de=null,s.value&&Q("opx:target:cancel")}function tt(U){ge=!0,U.button===2&&(de={x:U.clientX,y:U.clientY})}function lt(){ge=!1}function jt(U){return Ge(U).map(y=>({token:$(y.token),label:$(y.label),description:$(y.description),group:$(y.group),icon:$(y.icon,"interact"),danger:De(y.danger),checked:typeof y.checked=="boolean"?y.checked:void 0}))}return ye("opx:target:open",U=>{Ie("target:open",()=>{if(!ie(U.handle))return;W==null||W(),x(),n.value=U.handle,H=re(ee(U.hoverMs,90),30,1e3);const y=Oe(U.labels);f.value={looking:$(y.looking),unavailable:$(y.unavailable)},F.value={w:window.innerWidth,h:window.innerHeight},w.value={x:.5,y:.5},k.value={x:.5,y:.5},se=-1,s.value=!0,W=Pt({id:"target",onEscape:()=>Q("opx:target:cancel")})},void 0)}),ye("opx:target:hover",U=>{!fe(U)||o.value||Re.value||(l.value=U.available===!0)}),ye("opx:target:loading",U=>{Ie("target:loading",()=>{fe(U)&&(g(),o.value=!0,a.value=!1,u.value=[],p.value=[],l.value=!1,O=null,E.value=0,k.value={x:re(ee(U.x,.5),0,1),y:re(ee(U.y,.5),0,1)},Ce(),N=setTimeout(()=>{N=void 0,!(!s.value||!o.value)&&(i.value=!0,ot(C))},Ok))},void 0)}),ye("opx:target:empty",U=>{fe(U)&&x()}),ye("opx:target:menu",U=>{Ie("target:menu",()=>{fe(U)&&(g(),o.value=!1,i.value=!1,a.value=!1,u.value=jt(U.options),p.value=[],l.value=u.value.length>0,O=null,k.value={x:re(ee(U.x,k.value.x),0,1),y:re(ee(U.y,k.value.y),0,1)},Ce(),L.value=!1,ot(C))},void 0)}),ye("opx:target:busy",U=>{fe(U)&&(be(),o.value=!0,h.value=$(U.token))}),ye("opx:target:confirm",U=>{Ie("target:confirm",()=>{if(!fe(U))return;const y=$(U.token),v=$(U.label);o.value=!1,h.value="",!(y===""||v==="")&&(u.value=u.value.map(b=>b.token===y?{...b,label:v}:b))},void 0)}),ye("opx:target:error",U=>{fe(U)&&(o.value=!1,i.value=!1,h.value="",a.value=!0,ot(C))}),ye("opx:target:close",U=>{U.handle!==void 0&&!fe(U)||_()}),window.addEventListener("resize",Tt),window.addEventListener("blur",Ot),window.addEventListener("keydown",ut),window.addEventListener("mousedown",tt,!0),window.addEventListener("mouseup",lt,!0),rt(()=>{window.removeEventListener("resize",Tt),window.removeEventListener("blur",Ot),window.removeEventListener("keydown",ut),window.removeEventListener("mousedown",tt,!0),window.removeEventListener("mouseup",lt,!0),g(),B!==0&&cancelAnimationFrame(B),B=0,W==null||W()}),(U,y)=>s.value?(c(),d("div",{key:0,class:Z(["eye-room",{available:l.value,busy:o.value}]),onMousemove:Se,onClick:Ue,onContextmenu:Ye},[Re.value?(c(),d("div",{key:0,ref_key:"listEl",ref:A,class:Z(["cascade",{flip:Ze.value}]),style:Ee({left:`${le.value}px`,top:`${T.value}px`,width:`${qe.value}px`}),onClickCapture:Te,onClick:_e},[(c(!0),d(ne,null,ve(Ne.value,v=>(c(),d("div",{key:v.depth,class:"column","data-depth":v.depth},[r("div",{class:Z(["plane",{keyboard:L.value}])},[v.depth===0?(c(),d(ne,{key:0},[i.value?(c(),d("p",pk,[y[0]||(y[0]=r("span",{class:"spin","aria-hidden":"true"},null,-1)),r("span",null,m(f.value.looking),1)])):a.value?(c(),d("p",hk,m(f.value.unavailable),1)):R("",!0)],64)):R("",!0),i.value&&v.depth===0?R("",!0):(c(),d("div",mk,[(c(!0),d(ne,null,ve(v.entries,b=>(c(),d("div",{key:b.kind==="folder"?`d:${b.name}`:`r:${b.row.token}`,class:"slot op-enter",style:{"--op-slot":"0"}},[b.kind==="folder"?(c(),d("div",{key:0,class:Z(["row",{off:o.value,open:v.openName===b.name}]),"data-augmented-ui":"tr-clip border","data-folder":b.name,role:"button",tabindex:o.value?-1:0,"aria-disabled":o.value,"aria-expanded":v.openName===b.name,onMouseenter:G=>he(p.value.slice(0,v.depth).concat([b.name]),G),onClick:G=>X(p.value.slice(0,v.depth).concat([b.name]),!0),onKeydown:[Jn(_t(G=>X(p.value.slice(0,v.depth).concat([b.name]),!1),["prevent"]),["enter"]),Jn(_t(G=>X(p.value.slice(0,v.depth).concat([b.name]),!1),["prevent"]),["space"])]},[r("span",bk,[(c(),d("svg",_k,[(c(!0),d(ne,null,ve(M(fi)("folder"),(G,ce)=>(c(),d("path",{key:ce,d:G},null,8,yk))),128))]))]),r("span",kk,m(b.name),1),r("span",wk,m(b.count),1),y[1]||(y[1]=r("span",{class:"mark"},">",-1))],42,gk)):(c(),d("div",{key:1,class:Z(["row",{danger:b.row.danger,pending:b.row.token===h.value,off:o.value&&b.row.token!==h.value}]),"data-augmented-ui":"tr-clip border",role:"button",tabindex:o.value?-1:0,"aria-disabled":o.value,onMouseenter:G=>he(p.value.slice(0,v.depth),G),onClick:G=>ke(b.row),onKeydown:[Jn(_t(G=>ke(b.row),["prevent"]),["enter"]),Jn(_t(G=>ke(b.row),["prevent"]),["space"])]},[r("span",$k,[b.row.token===h.value?(c(),d("span",Mk)):(c(),d("svg",Ck,[(c(!0),d(ne,null,ve(M(fi)(b.row.icon),(G,ce)=>(c(),d("path",{key:ce,d:G},null,8,Sk))),128))]))]),r("span",Tk,m(b.row.label),1),b.row.checked!==void 0?(c(),d("span",{key:0,class:Z(["check",{ticked:b.row.checked}]),role:"checkbox","aria-checked":b.row.checked},[...y[2]||(y[2]=[r("svg",{viewBox:"0 0 13 13","aria-hidden":"true"},[r("path",{d:"M2.6 6.8 5 9.2 10 3.6"})],-1)])],10,Ek)):R("",!0),b.row.description?(c(),d("span",Ak,m(b.row.description),1)):R("",!0)],42,xk))]))),128))]))],2)],8,vk))),128))],38)):R("",!0)],34)):R("",!0)}}),Pk=Fe(Nk,[["__scopeId","data-v-0d67f474"]]);function Hk(e){if(window.Open77)return!1;const t=new Map,n={on(l,i){var u;const a=(u=t.get(l))!=null?u:[];a.push(i),t.set(l,a)},emit(l,i){console.info("[opx:dev-shim] emit",l,i),o(l,i)}};function s(l,i){var a;for(const u of(a=t.get(l))!=null?a:[])u(i)}function o(l,i){typeof i.ref=="string"&&setTimeout(()=>{s("opx:reply",{ref:i.ref,ok:!0,data:{echo:l}})},120)}return window.Open77=n,window.__OPX_DEV_SHIM__=!0,document.documentElement.setAttribute("data-opx-shim",e),setTimeout(()=>Fk(s,e),0),!0}function Fk(e,t){e("opx:locale:set",{strings:{"error.rpc_timeout":"No answer from the server","error.rpc_failed":"The server refused","demo.title":"Ripperdoc","demo.eyebrow":"Session","demo.tab.chrome":"Chrome","demo.tab.stock":"Stock","demo.tab.log":"Log","demo.row.name":"Operator","demo.row.balance":"Balance","demo.row.consent":"Consent on file","demo.row.hint":"Lua re-derives the balance; this is a display of its last answer.","demo.field.callsign":"Callsign","demo.field.district":"District","demo.field.dose":"Dose","demo.toast":"Link established","demo.gauge.health":"Health","demo.gauge.armour":"Armour"}}),t==="overlay"?(e("opx:notify:show",{id:"dev-1",kind:"success",title:"demo.toast",message:"Shimmed payload. No Lua is running.",durationMs:6e4}),e("opx:hud:vitals",{gauges:[{id:"health",label:"demo.gauge.health",value:78,tone:"health"},{id:"armour",label:"demo.gauge.armour",value:34,tone:"warn"}]})):e("opx:panel:open",{title:"demo.title",eyebrow:"demo.eyebrow",tabs:[{id:"chrome",label:"demo.tab.chrome"},{id:"stock",label:"demo.tab.stock",marked:!0},{id:"log",label:"demo.tab.log"}],rows:{}})}const Ai={accent:{property:"--op-red-rgb",kind:"rgb"},idle:{property:"--op-red-idle-rgb",kind:"rgb"},deep:{property:"--op-red-deep-rgb",kind:"rgb"},hi:{property:"--op-red-hi-rgb",kind:"rgb"},text:{property:"--op-red-text-rgb",kind:"rgb"},alarm:{property:"--op-alarm-rgb",kind:"rgb"},plate:{property:"--op-plate-rgb",kind:"rgb"},plateLit:{property:"--op-plate-lit-rgb",kind:"rgb"},plateAlpha:{property:"--op-plate-a",kind:"number",min:.2,max:.98},plateQuietAlpha:{property:"--op-plate-quiet-a",kind:"number",min:0,max:.98},plateLitAlpha:{property:"--op-plate-lit-a",kind:"number",min:.2,max:1},interlaceAlpha:{property:"--op-interlace-a",kind:"number",min:0,max:.15},tiltDeg:{property:"--op-tilt",kind:"deg",min:0,max:15},cutSm:{property:"--op-cut-sm",kind:"px",min:1,max:24},cutMd:{property:"--op-cut-md",kind:"px",min:1,max:48},cutLg:{property:"--op-cut-lg",kind:"px",min:1,max:80}},Bk=new Set(["cyberpunk"]),Li="data-op-style";function Oi(e,t,n){return en?n:e}function Ii(e){return typeof e=="number"&&Number.isFinite(e)?e:null}function Vk(e,t){var o,l;if(e.kind==="rgb"){if(!Array.isArray(t)||t.length!==3)return null;const i=[];for(const a of t){const u=Ii(a);if(u===null)return null;i.push(Math.round(Oi(u,0,255)))}return i.join(", ")}const n=Ii(t);if(n===null)return null;const s=Oi(n,(o=e.min)!=null?o:0,(l=e.max)!=null?l:1);return e.kind==="px"?`${Math.round(s)}px`:e.kind==="deg"?`${s}deg`:String(s)}function jk(e){const t=document.documentElement;if(!t)return;for(const s of Object.values(Ai))t.style.removeProperty(s.property);t.removeAttribute(Li);const n=[];for(const s of Object.keys(e)){if(s==="style"){const i=e[s];typeof i=="string"&&Bk.has(i)?t.setAttribute(Li,i):n.push(s);continue}const o=wt(Ai,s);if(!o){n.push(s);continue}const l=Vk(o,e[s]);if(l===null){n.push(s);continue}t.style.setProperty(o.property,l)}n.length>0&&et(`theme keys refused: ${n.join(" ")}`,"theme")}function Uk(e){const{name:t,root:n,rootProps:s,allowFocus:o}=e,l=Hk(t);Ac(t),Lg(t),Hc(t,o),In("opx:locale:set",Nc),In("opx:theme:set",jk),In("opx:images:set",Rg),$e("opx:images:ready",{}),$e("opx:theme:ready",{}),In("opx:loading:state",h1),$e("opx:loading:ready",{});const i=Cc(n,s);i.config.errorHandler=(u,p,f)=>{et(u,`app ${t} [${f}]`)};const a=document.getElementById("app");if(!a){et("no #app element in the document",`boot ${t}`);return}i.mount(a),l&&document.documentElement.classList.add("opx-dev-shim"),Ic("opx:ready",{surface:t})}const Xs=[];function st(e){if(Xs.some(t=>t.id===e.id))throw new Error(`duplicate module id "${e.id}"`);Xs.push(e)}function Ao(e){return Xs.filter(t=>t.surface===e)}const Kk=["data-module","data-failed"],Wk=He({__name:"ModuleHost",props:{id:{}},setup(e){const t=e,n=S(!1),s=S("");return au((o,l,i)=>(n.value=!0,s.value=i,et(o,`module ${t.id} [${i}]`),Pc(t.id),!1)),(o,l)=>(c(),d("div",{class:"module-host","data-module":e.id,"data-failed":n.value?s.value:void 0},[n.value?R("",!0):cu(o.$slots,"default",{},void 0,!0,0)],8,Kk))}}),Lo=Fe(Wk,[["__scopeId","data-v-14bd1741"]]),zk={class:"surface"},Zk={class:"layer layer-overlay"},Gk={class:"layer layer-notice"},qk={class:"layer layer-cover"},Yk=He({__name:"SurfaceRoot",setup(e){const t=Ao("overlay"),n=Ao("modal"),s=Ao("notice"),o=Ao("cover");return(l,i)=>(c(),d("div",zk,[r("div",Zk,[(c(!0),d(ne,null,ve(M(t),a=>xt((c(),pt(Lo,{id:a.id,key:a.id},{default:On(()=>[(c(),pt(yo(a.component)))]),_:2},1032,["id"])),[[Do,!(a.hideWhileLoading&&M(Is))]])),128))]),r("div",{class:Z(["layer layer-modal",{"is-live":M(Rc)}])},[(c(!0),d(ne,null,ve(M(n),a=>xt((c(),pt(Lo,{id:a.id,key:a.id},{default:On(()=>[(c(),pt(yo(a.component)))]),_:2},1032,["id"])),[[Do,!(a.hideWhileLoading&&M(Is))]])),128))],2),r("div",Gk,[(c(!0),d(ne,null,ve(M(s),a=>xt((c(),pt(Lo,{id:a.id,key:a.id},{default:On(()=>[(c(),pt(yo(a.component)))]),_:2},1032,["id"])),[[Do,!(a.hideWhileLoading&&M(Is))]])),128))]),r("div",qk,[(c(!0),d(ne,null,ve(M(o),a=>(c(),pt(Lo,{id:a.id,key:a.id},{default:On(()=>[(c(),pt(yo(a.component)))]),_:2},1032,["id"]))),128))])]))}}),Xk=Fe(Yk,[["__scopeId","data-v-85df2058"]]);st({id:"hud",surface:"overlay",component:Tg,hideWhileLoading:!0});st({id:"notify",surface:"notice",component:vb,hideWhileLoading:!0});st({id:"prompts",surface:"overlay",component:Fy,hideWhileLoading:!0});st({id:"progress",surface:"overlay",component:j_,hideWhileLoading:!0});st({id:"inventory-slotbar",surface:"overlay",component:Sy,hideWhileLoading:!0});st({id:"tags",surface:"overlay",component:fk,hideWhileLoading:!0});st({id:"calls-holo",surface:"modal",component:$d,hideWhileLoading:!0});st({id:"radio-holo",surface:"modal",component:yy,hideWhileLoading:!0});st({id:"chat-log",surface:"overlay",component:Vd,hideWhileLoading:!0});st({id:"chat-input",surface:"modal",component:Nd});st({id:"inventory",surface:"modal",component:p1});st({id:"menu",surface:"modal",component:W1});st({id:"form",surface:"modal",component:vm});st({id:"panel",surface:"modal",component:D_});st({id:"doorlock",surface:"modal",component:eh});st({id:"target",surface:"modal",component:Pk,hideWhileLoading:!0});st({id:"spawn",surface:"modal",component:sk});st({id:"downed",surface:"modal",component:Uh});st({id:"loading",surface:"cover",component:E1});Uk({name:"ui",root:Xk,rootProps:{},allowFocus:!0}); +**/let js;const Bl=typeof window!="undefined"&&window.trustedTypes;if(Bl)try{js=Bl.createPolicy("vue",{createHTML:e=>e})}catch{}const Ha=js?e=>js.createHTML(e):e=>e,zu="http://www.w3.org/2000/svg",Zu="http://www.w3.org/1998/Math/MathML",Xt=typeof document!="undefined"?document:null,Vl=Xt&&Xt.createElement("template"),Gu={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"?Xt.createElementNS(zu,e):t==="mathml"?Xt.createElementNS(Zu,e):n?Xt.createElement(e,{is:n}):Xt.createElement(e);return e==="select"&&s&&s.multiple!=null&&o.setAttribute("multiple",s.multiple),o},createText:e=>Xt.createTextNode(e),createComment:e=>Xt.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Xt.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,s,o,l){const i=n?n.previousSibling:t.lastChild;if(o&&(o===l||o.nextSibling))for(;t.insertBefore(o.cloneNode(!0),n),!(o===l||!(o=o.nextSibling)););else{Vl.innerHTML=Ha(s==="svg"?`${e}`:s==="mathml"?`${e}`:e);const a=Vl.content;if(s==="svg"||s==="mathml"){const u=a.firstChild;for(;u.firstChild;)a.appendChild(u.firstChild);a.removeChild(u)}t.insertBefore(a,n)}return[i?i.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},sn="transition",Gn="animation",vo=Symbol("_vtc"),Fa={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},qu=St({},da,Fa),Yu=e=>(e.displayName="Transition",e.props=qu,e),Xu=Yu((e,{slots:t})=>Ku(lu,Ju(e),t)),bn=(e,t=[])=>{Ae(e)?e.forEach(n=>n(...t)):e&&e(...t)},jl=e=>e?Ae(e)?e.some(t=>t.length>1):e.length>1:!1;function Ju(e){const t={};for(const V in e)V in Fa||(t[V]=e[V]);if(e.css===!1)return t;const{name:n="v",type:s,duration:o,enterFromClass:l=`${n}-enter-from`,enterActiveClass:i=`${n}-enter-active`,enterToClass:a=`${n}-enter-to`,appearFromClass:u=l,appearActiveClass:p=i,appearToClass:f=a,leaveFromClass:h=`${n}-leave-from`,leaveActiveClass:w=`${n}-leave-active`,leaveToClass:k=`${n}-leave-to`}=e,F=Qu(o),A=F&&F[0],T=F&&F[1],{onBeforeEnter:L,onEnter:E,onEnterCancelled:H,onLeave:D,onLeaveCancelled:N,onBeforeAppear:q=L,onAppear:W=E,onAppearCancelled:B=H}=t,I=(V,be,de,se)=>{V._enterCancelled=se,_n(V,be?f:a),_n(V,be?p:i),de&&de()},O=(V,be)=>{V._isLeaving=!1,_n(V,h),_n(V,k),_n(V,w),be&&be()},K=V=>(be,de)=>{const se=V?W:E,ie=()=>I(be,V,de);bn(se,[be,ie]),Ul(()=>{_n(be,V?u:l),Yt(be,V?f:a),jl(se)||Kl(be,s,A,ie)})};return St(t,{onBeforeEnter(V){bn(L,[V]),Yt(V,l),Yt(V,i)},onBeforeAppear(V){bn(q,[V]),Yt(V,u),Yt(V,p)},onEnter:K(!1),onAppear:K(!0),onLeave(V,be){V._isLeaving=!0;const de=()=>O(V,be);Yt(V,h),V._enterCancelled?(Yt(V,w),Zl(V)):(Zl(V),Yt(V,w)),Ul(()=>{V._isLeaving&&(_n(V,h),Yt(V,k),jl(D)||Kl(V,s,T,de))}),bn(D,[V,de])},onEnterCancelled(V){I(V,!1,void 0,!0),bn(H,[V])},onAppearCancelled(V){I(V,!0,void 0,!0),bn(B,[V])},onLeaveCancelled(V){O(V),bn(N,[V])}})}function Qu(e){if(e==null)return null;if(ze(e))return[_s(e.enter),_s(e.leave)];{const t=_s(e);return[t,t]}}function _s(e){return dr(e)}function Yt(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[vo]||(e[vo]=new Set)).add(t)}function _n(e,t){t.split(/\s+/).forEach(s=>s&&e.classList.remove(s));const n=e[vo];n&&(n.delete(t),n.size||(e[vo]=void 0))}function Ul(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let ec=0;function Kl(e,t,n,s){const o=e._endId=++ec,l=()=>{o===e._endId&&s()};if(n!=null)return setTimeout(l,n);const{type:i,timeout:a,propCount:u}=tc(e,t);if(!i)return s();const p=i+"end";let f=0;const h=()=>{e.removeEventListener(p,w),l()},w=k=>{k.target===e&&++f>=u&&h()};setTimeout(()=>{f(n[F]||"").split(", "),o=s(`${sn}Delay`),l=s(`${sn}Duration`),i=Wl(o,l),a=s(`${Gn}Delay`),u=s(`${Gn}Duration`),p=Wl(a,u);let f=null,h=0,w=0;t===sn?i>0&&(f=sn,h=i,w=l.length):t===Gn?p>0&&(f=Gn,h=p,w=u.length):(h=Math.max(i,p),f=h>0?i>p?sn:Gn:null,w=f?f===sn?l.length:u.length:0);const k=f===sn&&/\b(?:transform|all)(?:,|$)/.test(s(`${sn}Property`).toString());return{type:f,timeout:h,propCount:w,hasTransform:k}}function Wl(e,t){for(;e.lengthzl(n)+zl(e[s])))}function zl(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function Zl(e){return(e?e.ownerDocument:document).body.offsetHeight}function nc(e,t,n){const s=e[vo];s&&(t=(t?[t,...s]:[...s]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const Wo=Symbol("_vod"),Ba=Symbol("_vsh"),Do={name:"show",beforeMount(e,{value:t},{transition:n}){e[Wo]=e.style.display==="none"?"":e.style.display,n&&t?n.beforeEnter(e):qn(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:s}){!t!=!n&&(s?t?(s.beforeEnter(e),qn(e,!0),s.enter(e)):s.leave(e,()=>{qn(e,!1)}):qn(e,t))},beforeUnmount(e,{value:t}){qn(e,t)}};function qn(e,t){e.style.display=t?e[Wo]:"none",e[Ba]=!t}const oc=Symbol(""),sc=/(?:^|;)\s*display\s*:/;function lc(e,t,n){const s=e.style,o=Qe(n);let l=!1;if(n&&!o){if(t)if(Qe(t))for(const i of t.split(";")){const a=i.slice(0,i.indexOf(":")).trim();n[a]==null&&Xn(s,a,"")}else for(const i in t)n[i]==null&&Xn(s,i,"");for(const i in n){i==="display"&&(l=!0);const a=n[i];a!=null?ac(e,i,!Qe(t)&&t?t[i]:void 0,a)||Xn(s,i,a):Xn(s,i,"")}}else if(o){if(t!==n){const i=s[oc];i&&(n+=";"+i),s.cssText=n,l=sc.test(n)}}else t&&e.removeAttribute("style");Wo in e&&(e[Wo]=l?s.display:"",e[Ba]&&(s.display="none"))}const ko=/\s*!important$/;function Xn(e,t,n){if(Ae(n))n.forEach(s=>Xn(e,t,s));else if(n==null&&(n=""),t.startsWith("--"))ko.test(n)?e.setProperty(t,n.replace(ko,""),"important"):e.setProperty(t,n);else{const s=ic(e,t);ko.test(n)?e.setProperty(on(s),n.replace(ko,""),"important"):e[s]=n}}const Gl=["Webkit","Moz","ms"],ys={};function ic(e,t){const n=ys[t];if(n)return n;let s=yt(t);if(s!=="filter"&&s in e)return ys[t]=s;s=Jo(s);for(let o=0;oks||(vc.then(()=>ks=0),ks=Date.now());function hc(e,t){const n=s=>{if(!s._vts)s._vts=Date.now();else if(s._vts<=n.attached)return;const o=n.value;if(Ae(o)){const l=s.stopImmediatePropagation;s.stopImmediatePropagation=()=>{l.call(s),s._stopped=!0};const i=o.slice(),a=[s];for(let u=0;ue.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,mc=(e,t,n,s,o,l)=>{const i=o==="svg";t==="class"?nc(e,s,i):t==="style"?lc(e,n,s):qo(t)?Yo(t)||uc(e,t,n,s,l):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):gc(e,t,s,i))?(Xl(e,t,s),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&Yl(e,t,s,i,l,t!=="value")):e._isVueCE&&(bc(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!Qe(s)))?Xl(e,yt(t),s,l,t):(t==="true-value"?e._trueValue=s:t==="false-value"&&(e._falseValue=s),Yl(e,t,s,i))};function gc(e,t,n,s){if(s)return!!(t==="innerHTML"||t==="textContent"||t in e&&Ql(t)&&je(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 Ql(t)&&Qe(n)?!1:t in e}function bc(e,t){const n=e._def.props;if(!n)return!1;const s=yt(t);return Array.isArray(n)?n.some(o=>yt(o)===s):Object.keys(n).some(o=>yt(o)===s)}const zo=e=>{const t=e.props["onUpdate:modelValue"]||!1;return Ae(t)?n=>Oo(t,n):t};function _c(e){e.target.composing=!0}function ei(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const xn=Symbol("_assign"),wo=Symbol("_initialValue");function ws(e,t,n){return t&&(e=e.trim()),n&&(e=Qo(e)),e}const un={created(e,{modifiers:{lazy:t,trim:n,number:s}},o){e.parentNode&&(e.type==="text"?e[wo]=e.defaultValue.replace(/[\r\n]/g,""):e.type==="textarea"&&(e[wo]=e.defaultValue.replace(/\r\n?/g,` +`))),e[xn]=zo(o);const l=s||o.props&&o.props.type==="number";wn(e,t?"change":"input",i=>{i.target.composing||e[xn](ws(e.value,n,l))}),(n||l)&&wn(e,"change",()=>{e.value=ws(e.value,n,l)}),t||(wn(e,"compositionstart",_c),wn(e,"compositionend",ei),wn(e,"change",ei))},mounted(e,{value:t,modifiers:{trim:n,number:s}}){const o=t==null?"":t,l=e[wo];delete e[wo],l!==void 0&&(e.type==="text"||e.type==="textarea")&&e.value!==l?e[xn](ws(e.value,n,s)):e.value=o},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:s,trim:o,number:l}},i){if(e[xn]=zo(i),e.composing)return;const a=(l||e.type==="number")&&!/^0\d/.test(e.value)?Qo(e.value):e.value,u=t==null?"":t;if(a===u)return;const p=e.getRootNode();(p instanceof Document||p instanceof ShadowRoot)&&p.activeElement===e&&e.type!=="range"&&(s&&t===n||o&&e.value.trim()===u)||(e.value=u)}},ti={deep:!0,created(e,{value:t,modifiers:{number:n}},s){e._modelValue=t,wn(e,"change",()=>{const o=Array.prototype.filter.call(e.options,u=>u.selected).map(u=>n?Qo(Zo(u)):Zo(u)),l=e.multiple,i=l?Tn(e._modelValue)?new Set(o):o:o[0],a=e._pendingValue=[l,l?Ae(i)?o.slice():o:i];try{e[xn](i)}finally{st(()=>{e._pendingValue===a&&(e._pendingValue=void 0)})}}),e[xn]=zo(s)},mounted(e,{value:t}){ni(e,t)},beforeUpdate(e,{value:t},n){e._modelValue=t,e[xn]=zo(n)},updated(e,{value:t}){const n=e._pendingValue;e._pendingValue=void 0,(!n||n[0]!==e.multiple||!yc(t,n[1],n[0]))&&ni(e,t)}};function yc(e,t,n){if(!n||Ae(e))return fn(e,t);if(Tn(e)){if(e.size!==t.length)return!1;for(const s of t)if(!e.has(s))return!1;return!0}return!1}function ni(e,t){const n=e.multiple,s=Ae(t);if(!(n&&!s&&!Tn(t))){for(let o=0,l=e.options.length;oString(p)===String(a)):i.selected=_r(t,a)>-1}else i.selected=t.has(a);else if(fn(Zo(i),t)){e.selectedIndex!==o&&(e.selectedIndex=o);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function Zo(e){return"_value"in e?e._value:e.value}const kc=["ctrl","shift","alt","meta"],wc={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)=>kc.some(n=>e[`${n}Key`]&&!t.includes(n))},_t=(e,t)=>{if(!e)return e;const n=e._withMods||(e._withMods={}),s=t.join(".");return n[s]||(n[s]=((o,...l)=>{for(let i=0;i{const n=e._withKeys||(e._withKeys={}),s=t.join(".");return n[s]||(n[s]=(o=>{if(!("key"in o))return;const l=on(o.key);if(t.some(i=>i===l||$c[i]===l))return e(o)}))},xc=St({patchProp:mc},Gu);let oi;function Mc(){return oi||(oi=Su(xc))}const Cc=((...e)=>{const t=Mc().createApp(...e),{mount:n}=t;return t.mount=s=>{const o=Tc(s);if(!o)return;const l=t._component;!je(l)&&!l.render&&!l.template&&(l.template=o.innerHTML),o.nodeType===1&&(o.textContent="");const i=n(o,!1,Sc(o));return o instanceof Element&&(o.removeAttribute("v-cloak"),o.setAttribute("data-v-app","")),i},t});function Sc(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function Tc(e){return Qe(e)?document.querySelector(e):e}const Ec="opx:diag",si=20;let $s=0,xs=!1,li=!1;function Us(e){try{return e instanceof Error?`${e.name||"Error"}: ${e.message}`:e==null?String(e):typeof e=="object"?Object.prototype.toString.call(e):String(e)}catch{return""}}function et(e,t){var n;if(!(xs||$s>=si)){xs=!0,$s+=1;try{const s=t?`${t}: ${Us(e)}`:Us(e);(n=window.Open77)==null||n.emit(Ec,{surface:Va,text:s.slice(0,400),dropped:$s===si?"budget reached, further reports suppressed":""})}catch{}xs=!1}}function Ie(e,t,n){try{return t()}catch(s){return et(s,e),n}}let Va="unknown";function Ac(e){if(Va=e,li)return;li=!0,window.addEventListener("error",n=>{et(`uncaught ${n.message||"?"} at ${n.filename||"?"}:${n.lineno||0}`)}),window.addEventListener("unhandledrejection",n=>{et(n.reason,"unhandled rejection")});const t=console.error;console.error=function(...n){et(n.map(Us).join(" "));try{t.apply(console,n)}catch{}}}const Ks=new Map,Ms=new Set;let ii=!1;function ja(){const e=window.Open77;return!e&&!ii&&(ii=!0,console.warn("[opx] window.Open77 is absent; nothing will reach Lua")),e}function Lc(e,t){const n=Ks.get(e);if(!(!n||n.size===0))for(const s of Array.from(n))try{s(t!=null?t:{})}catch(o){et(o,`handler ${e}`)}}function Oc(e){if(Ms.has(e))return;const t=ja();if(t){Ms.add(e);try{t.on(e,n=>Lc(e,n))}catch(n){Ms.delete(e),et(n,`on ${e}`)}}}function In(e,t){let n=Ks.get(e);n||(n=new Set,Ks.set(e,n)),n.add(t),Oc(e);let s=!1;return()=>{s||(s=!0,n.delete(t))}}let Ua=!1;const Ka=[];function Ws(e,t){const n=ja();if(n)try{n.emit(e,t)}catch(s){et(s,`emit ${e}`)}}function xe(e,t={}){if(!Ua){Ka.push({channel:e,payload:t});return}Ws(e,t)}function Ic(e,t={}){Ws(e,t),Ua=!0;for(const n of Ka.splice(0))Ws(n.channel,n.payload)}function kt(e){return Array.isArray(e)?e:[]}function x(e,t=""){return typeof e=="string"?e:t}function Q(e,t=0){return typeof e=="number"&&Number.isFinite(e)?e:t}function De(e,t=!1){return typeof e=="boolean"?e:t}function Oe(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)?e:{}}function Ge(e){return kt(e).map(Oe)}function wt(e,t){return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0}const En=mt({focused:!1,strings:{},stringsReady:!1,failed:[]});let Yn=null;const ai=Bn(En),Rc=J(()=>En.focused);function Dc(e){En.focused=e}function Nc(e){const t=Oe(e.strings),n=e.first!==!1,s=e.done!==!1;(n||Yn===null)&&(Yn={});for(const o of Object.keys(t))Yn[o]=x(t[o],o);s&&(En.strings=Yn,Yn=null,En.stringsReady=!0)}function Pc(e){En.failed.includes(e)||En.failed.push(e)}const Un=[];let vl="unknown",Wa=!0,ri=!1;function Hc(e,t){vl=e,Wa=t}function pl(){return Un[Un.length-1]}function za(){const e=pl();Dc(Un.length>0),xe("opx:focus:set",{surface:vl,focus:e!==void 0,owner:e?e.id:""})}function Fc(e){if(e.key!=="Escape")return;const t=pl();if(t){if(e.preventDefault(),!t.onEscape){zs(t);return}try{t.onEscape()}catch(n){et(n,`escape ${t.id}`),zs(t)}}}function Pt(e){if(!Wa)return et(`${e.id} asked for focus on the ${vl} surface`,"focus refused"),()=>{};ri||(ri=!0,window.addEventListener("keydown",Fc,!0)),Un.push(e),za();let t=!1;return()=>{t||(t=!0,zs(e))}}function zs(e){const t=Un.lastIndexOf(e);t!==-1&&(Un.splice(t,1),za())}function po(){const e=pl();return e?e.id:""}function ge(e,t){if(!rs()){et(`useBridge(${e}) called outside setup(); it can never unsubscribe`,"lifecycle");return}const n=In(e,t);lt(n)}function nt(){const e=J(()=>ai.strings);function t(s,o){const l=e.value[s];return typeof l!="string"?ai.stringsReady?s:"":o?l.replace(/\{(\w+)\}/g,(i,a)=>{const u=o[a];return u===void 0?i:String(u)}):l}function n(s){return typeof e.value[s]=="string"}return{t,has:n}}const Bc={class:"stage"},Vc={key:0,class:"passive"},jc={key:0,class:"passive-who op-label"},Uc={key:1,class:"passive-who op-label"},Kc={key:2,class:"passive-who op-label"},Wc={class:"passive-what op-eyebrow"},zc={key:3,class:"prompts"},Zc={class:"prompt"},Gc={class:"cap"},qc={class:"prompt"},Yc={class:"cap"},Xc={key:4,class:"prompts"},Jc={class:"prompt"},Qc={class:"cap"},ed={class:"panel"},td={class:"head"},nd={class:"eyebrow op-eyebrow"},od={class:"title op-label"},sd={key:0,class:"ring-row"},ld={class:"ring-who op-copy"},id={class:"acts"},ad={key:1,class:"live-row"},rd={class:"live-who op-copy"},ud={key:2,class:"live-row"},cd={class:"waiting op-eyebrow"},dd={class:"tabs"},fd=["onClick"],vd={key:3,class:"rows"},pd={class:"who op-copy op-truncate"},hd={key:0,class:"why op-eyebrow"},md=["onClick"],gd=["onClick"],bd={key:0,class:"empty op-copy"},_d={key:4,class:"rows"},yd={class:"who op-copy op-truncate"},kd={class:"why op-eyebrow"},wd={key:0,class:"empty op-copy"},$d=He({__name:"HoloRoot",setup(e){const{t}=nt(),n=C(!1),s=C([]),o=C([]),l=C(null),i=C(null),a=C(null),u=C("contacts"),p=J(()=>l.value!==null),f=J(()=>i.value!==null),h=J(()=>a.value!==null&&x(a.value.kind)!=="contact"),w=J(()=>i.value===null?"?":x(i.value.fromName,x(i.value.name,"?"))),k=J(()=>a.value===null?"?":x(a.value.toName,"?")),F=J(()=>(l.value===null?[]:Ge(l.value.participants)).map(ee=>x(ee.name,"?")).filter(ee=>ee!=="")),A=J(()=>i.value!==null&&x(i.value.kind)==="contact");function T(re){return Ge(re).map(ee=>({id:Q(ee.id),ref:x(ee.ref),name:x(ee.name,"?"),refusal:ee.refusal===void 0||ee.refusal===null?null:x(ee.refusal)})).filter(ee=>ee.id>0||ee.ref!=="")}Lt(()=>{xe("opx:calls:ready",{})}),ge("opx:calls:holo",re=>{Ie("calls:holo",()=>{n.value=re.open===!0,s.value=T(re.rows),o.value=Ge(re.recent).map(Me=>({outcome:x(Me.outcome,"missed"),name:x(Me.name,"?")}));const ee=Oe(re.call);l.value=Object.keys(ee).length>0?ee:null;const te=Oe(re.invite);i.value=Object.keys(te).length>0?te:null,x(re.anchor)!==""&&(de.value=x(re.anchor)),x(re.answerKey)!==""&&(se.value=x(re.answerKey)),x(re.declineKey)!==""&&(ie.value=x(re.declineKey));const $e=Oe(re.outgoing);a.value=Object.keys($e).length>0?$e:null},void 0)});function L(){xe("opx:calls:close",{})}let E;bt(n,re=>{re&&E===void 0?E=Pt({id:"calls",onEscape:L}):!re&&E!==void 0&&(E(),E=void 0)}),lt(()=>{E==null||E(),E=void 0});function H(re){re.refusal===null&&xe("opx:calls:call",{id:re.id})}function D(){xe("opx:calls:accept",{})}function N(){xe("opx:calls:decline",{})}function q(){xe("opx:calls:hangUp",{})}const W=C(null);bt([n,u],()=>{W.value=null});function B(re){if(re.ref!==""){if(W.value!==re.ref){W.value=re.ref;return}W.value=null,xe("opx:calls:forget",{ref:re.ref})}}function I(){xe("opx:calls:withdraw",{})}const O={contacts:"calls.holo.tab.contacts",recent:"calls.holo.tab.recent"},K={missed:"calls.holo.outcome.missed",unanswered:"calls.holo.outcome.unanswered",declined:"calls.holo.outcome.declined",refused:"calls.holo.outcome.refused"};function V(re){return"calls.error."+re}const be=J(()=>n.value||f.value||p.value||h.value),de=C("bottom-center"),se=C("Y"),ie=C("X"),fe=J(()=>s.value);return(re,ee)=>be.value?(c(),d("div",{key:0,class:Z(["holo op-ink",["anchor-"+de.value,{live:!n.value}]])},[r("div",Bc,[ee[3]||(ee[3]=Da('',2)),n.value?R("",!0):(c(),d("div",Vc,[f.value?(c(),d("p",jc,m(w.value),1)):p.value?(c(),d("p",Uc,m(F.value.join(", ")),1)):(c(),d("p",Kc,m(k.value),1)),r("p",Wc,m(f.value?A.value?M(t)("calls.holo.contactOffer"):M(t)("calls.holo.incoming"):p.value?h.value?M(t)("calls.holo.calling",{name:k.value}):M(t)("calls.holo.inCall"):M(t)("calls.holo.dialing")),1),f.value?(c(),d("div",zc,[r("span",Zc,[r("b",Gc,m(se.value),1),Ft(" "+m(A.value?M(t)("calls.holo.yes"):M(t)("calls.holo.answer")),1)]),r("span",qc,[r("b",Yc,m(ie.value),1),Ft(" "+m(A.value?M(t)("calls.holo.no"):M(t)("calls.holo.refuse")),1)])])):(c(),d("div",Xc,[r("span",Jc,[r("b",Qc,m(ie.value),1),Ft(" "+m(a.value!==null?M(t)("calls.holo.withdraw"):M(t)("calls.holo.hangUp")),1)])]))])),n.value?(c(),d("div",{key:1,class:Z(["panel-frame",{"is-ringing":f.value}])},[r("section",ed,[r("header",td,[r("p",nd,m(M(t)("calls.holo.eyebrow")),1),r("h2",od,m(M(t)("calls.holo.title")),1),r("button",{class:"shut op-eyebrow",type:"button",onClick:L},m(M(t)("calls.holo.close")),1)]),f.value?(c(),d("div",sd,[r("p",ld,m(A.value?M(t)("calls.holo.sharing",{name:w.value}):M(t)("calls.holo.ringing",{name:w.value})),1),r("div",id,[r("button",{class:"act yes op-eyebrow",type:"button",onClick:D},m(A.value?M(t)("calls.holo.yes"):M(t)("calls.holo.answer")),1),r("button",{class:"act no op-eyebrow",type:"button",onClick:N},m(A.value?M(t)("calls.holo.no"):M(t)("calls.holo.refuse")),1)])])):R("",!0),p.value?(c(),d("div",ad,[r("p",rd,m(M(t)("calls.holo.live",{names:F.value.join(", ")})),1),r("button",{class:"act no op-eyebrow",type:"button",onClick:q},m(M(t)("calls.holo.hangUp")),1)])):R("",!0),a.value!==null?(c(),d("div",ud,[r("p",cd,m(h.value?M(t)("calls.holo.calling",{name:k.value}):M(t)("calls.holo.offering")),1),r("button",{class:"act no op-eyebrow",type:"button",onClick:I},m(M(t)("calls.holo.withdraw")),1)])):R("",!0),r("nav",dd,[(c(),d(ne,null,ve(["contacts","recent"],te=>r("button",{key:te,class:Z(["tab op-eyebrow",{on:u.value===te}]),type:"button",onClick:$e=>u.value=te},m(M(t)(O[te])),11,fd)),64))]),u.value!=="recent"?(c(),d("ul",vd,[(c(!0),d(ne,null,ve(fe.value,te=>(c(),d("li",{key:te.ref||te.id,class:Z(["row",{off:te.refusal!==null}])},[ee[0]||(ee[0]=r("span",{class:"dot","aria-hidden":"true"},null,-1)),r("span",pd,m(te.name),1),te.refusal!==null?(c(),d("span",hd,m(M(t)(V(te.refusal))),1)):(c(),d("button",{key:1,class:"pill op-eyebrow",type:"button",onClick:$e=>H(te)},m(p.value?M(t)("calls.holo.add"):M(t)("calls.holo.call")),9,md)),te.ref!==""?(c(),d("button",{key:2,class:"pill op-eyebrow",type:"button",onClick:$e=>B(te)},m(W.value===te.ref?M(t)("calls.holo.forgetConfirm"):M(t)("calls.holo.forget")),9,gd)):R("",!0)],2))),128)),fe.value.length===0?(c(),d("li",bd,m(M(t)("calls.holo.noContacts")),1)):R("",!0)])):(c(),d("ul",_d,[(c(!0),d(ne,null,ve(o.value,(te,$e)=>{var Me;return c(),d("li",{key:$e,class:"row off"},[ee[1]||(ee[1]=r("span",{class:"dot","aria-hidden":"true"},null,-1)),r("span",yd,m(te.name),1),r("span",kd,m(M(t)((Me=M(wt)(K,te.outcome))!=null?Me:"calls.holo.outcome.missed")),1)])}),128)),o.value.length===0?(c(),d("li",wd,m(M(t)("calls.holo.noRecent")),1)):R("",!0)]))]),ee[2]||(ee[2]=r("span",{class:"panel-edges","aria-hidden":"true"},null,-1))],2)):R("",!0)])],2)):R("",!0)}}),Fe=(e,t)=>{const n=e.__vccOpts||e;for(const[s,o]of t)n[s]=o;return n},xd=Fe($d,[["__scopeId","data-v-036bd3f8"]]),Za=C(!1),$o=J(()=>Za.value);function Cs(e){Za.value=e}const Ga=C(0),Md=J(()=>Ga.value);function ui(e){Ga.value=e}const qa=C(0);function ci(e){qa.value=e}const Ya=32,Xa=8,Ja=J(()=>Math.max(0,qa.value+Xa-Ya)),Cd={class:"chat-suggestion-name"},Sd={key:0,class:"chat-suggestion-params"},Td={key:1,class:"chat-suggestion-help op-truncate"},Ed=["maxlength","placeholder"],Ad={key:0,class:"chat-count"},Ld={class:"chat-hints"},Od={key:0,class:"cap op-cap","data-augmented-ui":"tr-clip border"},Id={class:"cap op-cap","data-augmented-ui":"tr-clip border"},Rd={class:"cap op-cap","data-augmented-ui":"tr-clip border"},di=50,Dd=He({__name:"ChatInput",setup(e){const t={"bottom-left":"anchor-bottom-left","bottom-center":"anchor-bottom-center","top-left":"anchor-top-left","top-center":"anchor-top-center"},{t:n}=nt(),s=C(!1),o=C(""),l=C(240),i=C(""),a=C("anchor-bottom-left"),u=C(155),p=C(620),f=C([]),h=C([]),w=C(-1);let k="";const F=C(null),A=C(null),T=C(null);let L=null,E=null,H=null,D=!1;function N(){E!==null&&(clearInterval(E),E=null)}function q(){N();let S=0;const pe=()=>{const _e=T.value;if(_e===null||document.activeElement===_e){N();return}_e.focus(),S+=1,S>=20&&N()};st(pe),E=setInterval(pe,50)}const W=J(()=>{if(o.value.charAt(0)!=="/")return null;const S=o.value.slice(1),pe=S.indexOf(" ");return{name:(pe===-1?S:S.slice(0,pe)).toLowerCase(),onArgs:pe!==-1}}),B=J(()=>{const S=W.value;if(S===null)return[];if(S.onArgs){const pe=f.value.find(_e=>_e.name.toLowerCase()===S.name);return pe?[pe]:[]}return f.value.filter(pe=>pe.name.toLowerCase().indexOf(S.name)===0).slice(0,8)}),I=J(()=>{var S;return((S=W.value)==null?void 0:S.onArgs)===!0&&B.value.length===1}),O=J(()=>{const S=W.value;if(S===null||!S.onArgs)return-1;const pe=o.value.slice(1);return pe.slice(pe.indexOf(" ")+1).split(/\s+/).length-1}),K=J(()=>o.value.length>=l.value*.8);function V(){o.value="",w.value=-1,k=""}function be(S){if(S){if(L!==null)return;L=Pt({id:"chat",onEscape:()=>xe("opx:chat:close",{})});return}L!==null&&(L(),L=null)}function de(){const S=F.value;ui(S===null?0:Math.round(S.getBoundingClientRect().height)),ci(A.value===null?0:Math.round(A.value.getBoundingClientRect().height))}function se(){st(()=>{const S=F.value;S!==null&&(de(),typeof ResizeObserver!="undefined"&&(H!==null&&H.disconnect(),H=new ResizeObserver(de),H.observe(S)))})}function ie(){H!==null&&H.disconnect(),H=null,ui(0),ci(0)}function fe(){s.value=!0,Cs(!0),V(),q(),se(),!D&&(D=!0,window.setTimeout(()=>{var pe,_e,g;const S=F.value?getComputedStyle(F.value):null;et(`anchor=${a.value} held=${f.value.length} shown=${B.value.length} offset=${u.value} pos=${(pe=S==null?void 0:S.position)!=null?pe:"?"} left=${(_e=S==null?void 0:S.left)!=null?_e:"?"} top=${(g=S==null?void 0:S.top)!=null?g:"?"}`,"chat-input state")},250))}function re(){s.value=!1,Cs(!1),N(),ie(),V()}function ee(){const S=B.value[0];S&&(o.value=`/${S.name} `,st(()=>te()))}function te(){const S=T.value;if(S===null)return;S.focus();const pe=S.value.length;S.setSelectionRange(pe,pe)}function $e(S){var _e;const pe=h.value.length;if(pe!==0){if(w.value===-1){if(S>0)return;k=o.value,w.value=pe-1}else{const g=w.value+(S<0?-1:1);if(g<0)return;if(g>=pe){w.value=-1,o.value=k,k="",st(()=>te());return}w.value=g}o.value=(_e=h.value[w.value])!=null?_e:"",st(()=>te())}}function Me(S){S!==""&&(h.value[h.value.length-1]!==S&&h.value.push(S),h.value.length>di&&h.value.splice(0,h.value.length-di))}function Ne(){w.value!==-1&&(w.value=-1,k="")}function Re(S){if(S.key==="Enter"){S.preventDefault(),Me(o.value),xe("opx:chat:submit",{text:o.value});return}if(S.key==="Tab"){if(I.value)return;S.preventDefault(),ee();return}(S.key==="ArrowUp"||S.key==="ArrowDown")&&(S.preventDefault(),$e(S.key==="ArrowUp"?-1:1))}function qe(S){const pe=Oe(S),_e=x(pe.name);return _e===""?"":pe.optional===!0?`[${_e}]`:`<${_e}>`}function Ze(S){return kt(S).map(qe).filter(pe=>pe!=="")}function le(S){const pe=Oe(S.suggestion),_e=x(pe.name);if(_e==="")return;const g={name:_e,help:x(pe.help),params:Ze(pe.params)},$=f.value.findIndex(_=>_.name===_e);$===-1?f.value.push(g):f.value[$]=g}function Ce(S){const pe=kt(S.suggestions).map(_e=>{const g=Oe(_e);return{name:x(g.name),help:x(g.help),params:Ze(g.params)}}).filter(_e=>_e.name!=="");if(S.reset===!1)for(const _e of pe){const g=f.value.findIndex($=>$.name===_e.name);g===-1?f.value.push(_e):f.value[g]=_e}else f.value=pe}return ge("opx:chat:view",S=>{var pe;if(x(S.surface)==="interactive")switch(x(S.kind)){case"config":l.value=Q(S.maxLength,240),i.value=x(S.placeholder),a.value=(pe=wt(t,x(S.anchor)))!=null?pe:"anchor-bottom-left",u.value=Q(S.offset,155),p.value=Q(S.width,620);break;case"focus":be(S.hold===!0);break;case"open":fe();break;case"close":re();break;case"suggest":le(S);break;case"unsuggest":{const _e=x(S.name);f.value=f.value.filter(g=>g.name!==_e);break}case"suggestions":Ce(S);break}}),Lt(()=>{xe("opx:chat:ready",{surface:"interactive"})}),lt(()=>{be(!1),N(),ie(),Cs(!1)}),(S,pe)=>s.value?(c(),d("div",{key:0,ref_key:"box",ref:F,class:Z(["chat-input",a.value]),style:Te({"--chat-offset":`${u.value}px`,"--chat-width":`${p.value}px`,"--chat-drop":`${M(Ja)}px`})},[B.value.length>0?(c(),d("ul",{key:0,class:Z(["chat-suggestions",{"is-signature":I.value}]),"data-augmented-ui":"tr-clip border"},[(c(!0),d(ne,null,ve(B.value,(_e,g)=>(c(),d("li",{key:_e.name,class:Z(["chat-suggestion",{"is-selected":!I.value&&g===0}])},[r("span",Cd,"/"+m(_e.name),1),_e.params.length>0?(c(),d("span",Sd,[(c(!0),d(ne,null,ve(_e.params,($,_)=>(c(),d("span",{key:$+_,class:Z(["chat-param",{"is-here":I.value&&_===O.value}])},m($),3))),128))])):R("",!0),_e.help?(c(),d("span",Td,m(_e.help),1)):R("",!0)],2))),128))],2)):R("",!0),r("div",{ref_key:"row",ref:A,class:"chat-field op-arete","data-augmented-ui":"tr-clip border"},[pe[1]||(pe[1]=r("span",{class:"chat-caret","aria-hidden":"true"},">",-1)),$t(r("input",{ref_key:"field",ref:T,"onUpdate:modelValue":pe[0]||(pe[0]=_e=>o.value=_e),type:"text",class:"chat-entry",maxlength:l.value,placeholder:i.value,autocomplete:"off",spellcheck:"false",onInput:Ne,onKeydown:Re},null,40,Ed),[[un,o.value]]),K.value?(c(),d("span",Ad,m(l.value-o.value.length),1)):R("",!0),r("span",Ld,[B.value.length>0?(c(),d("kbd",Od,m(M(n)("chat.key.tab")),1)):R("",!0),r("kbd",Id,m(M(n)("chat.key.enter")),1),r("kbd",Rd,m(M(n)("chat.key.escape")),1)])],512)],6)):R("",!0)}}),Nd=Fe(Dd,[["__scopeId","data-v-a3452877"]]),Pd={key:0,class:"chat-author"},Hd={class:"chat-text"},Fd=48,Bd=He({__name:"ChatLog",setup(e){const t={"bottom-left":"anchor-bottom-left","bottom-center":"anchor-bottom-center","top-left":"anchor-top-left","top-center":"anchor-top-center"},n=C([]),s=C(!0),o=C("anchor-bottom-left"),l=C(155),i=C(620),a=C(60),u=C(12e3),p=C(Date.now());let f=null,h=0;const w=J(()=>o.value==="anchor-top-left"||o.value==="anchor-top-center"),k=J(()=>{if(!$o.value)return 0;const E=w.value?Fd:Ya+Ja.value;return Math.max(0,Md.value+Xa-E)});function F(E){return $o.value||u.value<=0?!0:p.value-E.atn.value.filter(F));function T(){const E=n.value[n.value.length-1],H=u.value>0&&!$o.value&&E!==void 0&&Date.now()-E.at{p.value=Date.now(),T()},500):!H&&f!==null&&(clearInterval(f),f=null)}function L(E){const H=Oe(E.line),D=x(H.text);if(D==="")return;h+=1,n.value.push({id:h,kind:x(H.kind,"say"),author:x(H.author),text:D,at:Date.now()});const N=Math.max(1,a.value);n.value.length>N&&n.value.splice(0,n.value.length-N),p.value=Date.now(),T()}return ge("opx:chat:view",E=>{var H;if(x(E.surface)==="overlay")switch(x(E.kind)){case"config":{o.value=(H=wt(t,x(E.anchor)))!=null?H:"anchor-bottom-left",l.value=Q(E.offset,155),i.value=Q(E.width,620),a.value=Q(E.history,60),u.value=Q(E.fadeMs,12e3),s.value=De(E.visible,!0),T();break}case"line":L(E);break;case"clear":n.value=[],T();break;case"visible":s.value=De(E.visible,!0);break}}),bt($o,()=>{p.value=Date.now(),T()}),Lt(()=>{xe("opx:chat:ready",{surface:"overlay"})}),lt(()=>{f!==null&&clearInterval(f),f=null}),(E,H)=>s.value&&A.value.length>0?(c(),d("div",{key:0,class:Z(["chat-log",o.value]),style:Te({"--chat-offset":`${l.value}px`,"--chat-width":`${i.value}px`,"--chat-lift":`${k.value}px`})},[(c(!0),d(ne,null,ve(A.value,D=>(c(),d("p",{key:D.id,class:Z(["chat-line",`is-${D.kind}`])},[D.author?(c(),d("span",Pd,m(D.author),1)):R("",!0),r("span",Hd,m(D.text),1)],2))),128))],6)):R("",!0)}}),Vd=Fe(Bd,[["__scopeId","data-v-fbe70d16"]]),At={interact:["M8 12V5a2 2 0 0 1 4 0v6","M12 9h3l4 4v4l-3 4h-5l-6-7a2 2 0 0 1 3-2Z"],person:["M16 7a4 4 0 1 1-8 0 4 4 0 0 1 8 0Z","M4 21v-3a8 8 0 0 1 16 0v3"],vehicle:["M4 10l2-6h12l2 6","M3 10h18v8H3Z","M5 18v3m14-3v3M6 14h2m8 0h2"],info:["M22 12a10 10 0 1 1-20 0 10 10 0 0 1 20 0Z","M12 11v6m0-10v.2"],lock:["M6 10V7a6 6 0 0 1 12 0v3","M4 10h16v11H4ZM12 14v3"],tool:["M14 3a6 6 0 0 0-6 8l-6 6 5 5 6-6a6 6 0 0 0 8-7l-4 4-5-5 4-4Z"],location:["M20 10c0 6-8 12-8 12S4 16 4 10a8 8 0 1 1 16 0Z","M15 10a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"],box:["M3 7l9-4 9 4v10l-9 4-9-4Z","M3 7l9 4 9-4M12 11v10"],door:["M5 21V3h11l3 2v16","M3 21h18M13 12h.2"],heal:["M9 3h6v6h6v6h-6v6H9v-6H3V9h6Z"],money:["M2 6h20v12H2Z","M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0ZM6 9v.2M18 15v.2"],talk:["M4 4h16v12H9l-5 4Z","M8 9h8M8 12h5"],folder:["M3 6h6l2 2h10v11H3Z"],back:["M15 5l-7 7 7 7"],search:["M11 18a7 7 0 1 1 0-14 7 7 0 0 1 0 14Z","M16.2 16.2 21 21"],filter:["M3 5h18l-7 8.5V20l-4 2v-8.5Z"],list:["M9 6h12M9 12h12M9 18h12","M4 6h.2M4 12h.2M4 18h.2"],star:["M12 3.5l2.7 5.6 6.1.9-4.4 4.3 1 6.2-5.4-2.9-5.4 2.9 1-6.2L3.2 10l6.1-.9Z"],weapon:["M3 7h12l4 4h3v3h-5l-2 5h-4l1-5H7a4 4 0 0 1-4-4Z"],ammo:["M9 21V8l3-5 3 5v13Z","M9 13h6"],shield:["M12 3l8 3v6c0 5.2-3.7 8.4-8 9.6C7.7 20.4 4 17.2 4 12V6Z"],ban:["M22 12a10 10 0 1 1-20 0 10 10 0 0 1 20 0Z","M5 5l14 14"],warning:["M12 3 2.5 20h19Z","M12 10v4m0 3v.2"],eye:["M2 12s4-7 10-7 10 7 10 7-4 7-10 7S2 12 2 12Z","M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"],hidden:["M4 4l16 16","M9.5 5.4A10 10 0 0 1 12 5c6 0 10 7 10 7a18 18 0 0 1-3.2 4","M6.3 8.3A18 18 0 0 0 2 12s4 7 10 7a10 10 0 0 0 3.6-.7"],tag:["M3 3h8l10 10-8 8L3 11Z","M7.5 7.5h.2"],flag:["M5 21V4","M5 5h13l-2.5 4L18 13H5Z"],map:["M9 4 3 6.5v14L9 18l6 2.5 6-2.5v-14L15 6.5Z","M9 4v14M15 6.5v14"],world:["M22 12a10 10 0 1 1-20 0 10 10 0 0 1 20 0Z","M2.5 9h19M2.5 15h19","M12 2a14 14 0 0 1 0 20 14 14 0 0 1 0-20Z"],clock:["M22 12a10 10 0 1 1-20 0 10 10 0 0 1 20 0Z","M12 6.5V12l3.5 2.5"],weather:["M17.5 19H7a4.5 4.5 0 0 1-.6-9 6 6 0 0 1 11.3 2A3.5 3.5 0 0 1 17.5 19Z"],gear:["M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z","M12 2v3m0 14v3M2 12h3m14 0h3M4.9 4.9 7 7m10 10 2.1 2.1M19.1 4.9 17 7M7 17l-2.1 2.1"],refresh:["M20.5 12a8.5 8.5 0 1 1-2.6-6.1","M21 3.5V10h-6.5"],bolt:["M13 2 4 14h7l-1 8 9-12h-7Z"],server:["M3 4.5h18v6H3ZM3 13.5h18v6H3Z","M6.5 7.5h.2M6.5 16.5h.2"],key:["M14 10a4 4 0 1 1-8 0 4 4 0 0 1 8 0Z","M13.5 8.5H21m-3 0v3.5m-2.5-3.5v2.5"],arrow:["M4 12h14","M13 6l6 6-6 6"],plus:["M12 5v14M5 12h14"],minus:["M5 12h14"],trash:["M4 7h16","M10 4h4","M6 7l1.2 14h9.6L18 7","M10 11v6m4-6v6"],heart:["M12 20.5S3.5 15.7 3.5 10A4.5 4.5 0 0 1 12 7.6 4.5 4.5 0 0 1 20.5 10c0 5.7-8.5 10.5-8.5 10.5Z"],emote:["M13.5 4.2a1.8 1.8 0 1 1-3.6 0 1.8 1.8 0 0 1 3.6 0Z","M11.7 8v6","M7 9.5 11.7 8l4.8 1.5","M9 21l2.7-7 3.3 7"],food:["M5 3v7a3 3 0 0 0 6 0V3","M8 3v18","M18 3c-2 2-2 7 0 9v9"],drink:["M6 4h12l-1.5 16h-9Z","M7 10h10"],smoke:["M3 15h13v4H3Z","M13 15v4","M18.5 6c1.8 1.2 1.8 3.3 0 4.5","M21.5 7.5c1.3 1.3 1.3 3.2 0 4.5"]};function fi(e){var t;return(t=wt(At,e))!=null?t:At.interact}const jd=["general","characters","groups","items","lockpick","sound"],Ss=10;function vi(e){const t=Oe(e);return{save:De(t.save),remove:De(t.remove),lock:De(t.lock),key:De(t.key),teleport:De(t.teleport)}}function Ud(e){if(typeof e=="string"&&e!=="")return e;const t=Oe(e),n=Q(t.areaSize,NaN),s=Q(t.speedMultiplier,NaN);return!Number.isFinite(n)||!Number.isFinite(s)?null:{areaSize:n,speedMultiplier:s}}function Qa(e){const t=[];for(const n of kt(e)){const s=Ud(n);s!==null&&t.push(s)}return t}function Ts(e){const t=Oe(e);return{maxDistance:Q(t.maxDistance,2),maxReach:Q(t.maxReach,8),autolockMax:Q(t.autolockMax,3600),nameMax:Q(t.nameMax,64),passcodeMax:Q(t.passcodeMax,32),steps:Qa(t.steps),stepsMax:Q(t.stepsMax,10),groupsMax:Q(t.groupsMax,16),itemsMax:Q(t.itemsMax,8),charactersMax:Q(t.charactersMax,32)}}function pi(e){return kt(e).filter(t=>typeof t=="string")}function Kd(e){return Ge(e).map(t=>({id:Q(t.id,-1),name:x(t.name),state:Q(t.state,1)===0?0:1,distance:Q(t.distance,-1),double:De(t.double),seeded:De(t.seeded)})).filter(t=>t.id>0)}function hl(e){const t=Oe(e),n=Q(t.x,NaN),s=Q(t.y,NaN),o=Q(t.z,NaN);return!Number.isFinite(n)||!Number.isFinite(s)||!Number.isFinite(o)?null:{x:n,y:s,z:o}}function ml(e){return Ge(e).map(t=>({native:x(t.native),coords:hl(t.coords)})).filter(t=>t.native!=="").slice(0,2)}function so(e){return{id:null,name:"",passcode:"",hasPasscode:!1,clearPasscode:!1,autolock:0,maxDistance:e.maxDistance,state:!0,double:!1,auto:!1,lockpick:!1,hideUi:!1,holdOpen:!1,onDuty:!1,doors:[],coords:null,characters:[""],groups:[{name:"",grade:0}],items:[{name:"",metadata:"",remove:!1}],steps:[],lockSound:"",unlockSound:""}}function Wd(e,t){const n=so(e),s=Oe(t);return n.doors=ml(s.doors),n.double=n.doors.length===2,n.coords=hl(s.coords),n}function zd(e,t){const n=Oe(t),s=so(e);s.id=Q(n.id,-1)>0?Q(n.id):null,s.name=x(n.name),s.passcode=x(n.passcode),s.hasPasscode=De(n.hasPasscode)||s.passcode!=="",s.autolock=Q(n.autolock,0),s.maxDistance=Q(n.maxDistance,e.maxDistance),s.state=Q(n.state,1)===1,s.auto=De(n.auto),s.lockpick=De(n.lockpick),s.hideUi=De(n.hideUi),s.holdOpen=De(n.holdOpen),s.onDuty=De(n.onDuty),s.coords=hl(n.coords);const o=ml(n.doors),l=x(n.native);s.doors=o.length>0?o:l!==""?[{native:l,coords:s.coords}]:[],s.double=s.doors.length===2;const i=kt(n.characters).map(f=>typeof f=="number"?String(f):x(f));s.characters=i.length>0?i:[""];const a=[],u=Oe(n.groups);for(const f of Object.keys(u))a.push({name:f,grade:Q(wt(u,f),0)});a.sort((f,h)=>f.name.localeCompare(h.name)),s.groups=a.length>0?a:[{name:"",grade:0}];const p=Ge(n.items).map(f=>({name:x(f.name),metadata:x(f.metadata),remove:De(f.remove)}));return s.items=p.length>0?p:[{name:"",metadata:"",remove:!1}],s.steps=Qa(n.lockpickDifficulty),s.lockSound=x(n.lockSound),s.unlockSound=x(n.unlockSound),s}function hi(e){return{passcode:e.passcode,clearPasscode:e.clearPasscode,autolock:e.autolock,maxDistance:e.maxDistance,state:e.state,auto:e.auto,lockpick:e.lockpick,hideUi:e.hideUi,holdOpen:e.holdOpen,onDuty:e.onDuty,characters:[...e.characters],groups:e.groups.map(t=>({...t})),items:e.items.map(t=>({...t})),steps:e.steps.map(t=>typeof t=="string"?t:{...t}),lockSound:e.lockSound,unlockSound:e.unlockSound}}function er(e){return e.doors.length===(e.double?2:1)}function Zd(e,t){var s;const n={name:e.name.trim()===""?void 0:e.name.trim(),state:e.state,maxDistance:e.maxDistance>0?e.maxDistance:t.maxDistance,autolock:e.autolock>0?Math.floor(e.autolock):void 0,auto:e.auto,lockpick:e.lockpick,hideUi:e.hideUi,holdOpen:e.holdOpen,onDuty:e.onDuty,doors:e.doors.map(o=>{var l,i;return{native:o.native,coords:(i=(l=o.coords)!=null?l:e.coords)!=null?i:void 0}}),coords:(s=e.coords)!=null?s:void 0,characters:e.characters.map(o=>o.trim()).filter(o=>o!==""),groups:e.groups.filter(o=>o.name.trim()!=="").map(o=>({name:o.name.trim(),grade:Math.max(0,Math.floor(o.grade||0))})),items:e.items.filter(o=>o.name.trim()!=="").map(o=>({name:o.name.trim(),metadata:o.metadata.trim()===""?void 0:o.metadata.trim(),remove:o.remove})),lockpickDifficulty:e.steps.length>0?e.steps:void 0,lockSound:e.lockSound===""?void 0:e.lockSound,unlockSound:e.unlockSound===""?void 0:e.unlockSound};return e.clearPasscode?n.passcode="":e.passcode!==""&&(n.passcode=e.passcode),n}function Gd(e){return typeof e=="string"?`doorlock.difficulty.${e}`:"doorlock.ui.custom"}const qd={save:!0,remove:!0};function Yd(e){return wt(qd,e)===!0}function Zs(e){if(Array.isArray(e))return e.map(Zs);if(e!==null&&typeof e=="object"){const t={};for(const[n,s]of Object.entries(e))s!==void 0&&(t[n]=Zs(s));return t}return e}const Xd={list:"opx:doorlock:list",detail:"opx:doorlock:detail",save:"opx:doorlock:save",delete:"opx:doorlock:delete",state:"opx:doorlock:state",key:"opx:doorlock:key",teleport:"opx:doorlock:teleport",pick:"opx:doorlock:pick",dismiss:"opx:doorlock:dismiss"},Jd={class:"list"},Qd={class:"bar"},ef=["title","disabled"],tf={viewBox:"0 0 24 24","aria-hidden":"true"},nf=["d"],of={class:"search op-frame","data-augmented-ui":"tr-clip border"},sf={viewBox:"0 0 24 24","aria-hidden":"true"},lf=["d"],af=["placeholder"],rf={class:"count op-value"},uf={class:"table"},cf={class:"thead op-eyebrow"},df={key:0,class:"empty op-copy"},ff={key:1,class:"empty op-copy"},vf={key:2,class:"rows"},pf=["onDblclick"],hf={class:"c-id op-value"},mf={class:"c-name op-label op-truncate"},gf={key:0,class:"tag op-eyebrow"},bf={key:1,class:"tag op-eyebrow"},_f={class:"c-dist op-value"},yf={class:"c-act"},kf=["title","onClick"],wf={viewBox:"0 0 24 24"},$f=["d"],xf=["title","onClick"],Mf={viewBox:"0 0 24 24"},Cf=["d"],Sf=["disabled","title","onClick"],Tf={viewBox:"0 0 24 24"},Ef=["d"],Af=["disabled","title","onClick"],Lf={viewBox:"0 0 24 24"},Of=["d"],If=["disabled","title","onClick"],Rf={viewBox:"0 0 24 24"},Df=["d"],Nf={key:0,class:"pager"},Pf=["disabled","title"],Hf={class:"op-value"},Ff=["disabled","title"],Bf=He({__name:"DoorList",props:{rows:{},loaded:{type:Boolean},access:{}},emits:["create","edit","copy","teleport","toggle","delete"],setup(e,{emit:t}){const n=e,s=t,{t:o}=nt(),l=C(""),i=C(1),a=C("id"),u=C(!0);function p(L){a.value===L?u.value=!u.value:(a.value=L,u.value=!0)}const f=J(()=>{const L=l.value.toLowerCase().split(/\s+/).filter(N=>N!==""),E=L.length===0?n.rows.slice():n.rows.filter(N=>{const q=`${N.id} ${N.name}`.toLowerCase();return L.every(W=>q.includes(W))}),H=a.value,D=u.value?1:-1;return E.sort((N,q)=>H==="name"?N.name.localeCompare(q.name)*D:H==="distance"?N.distance<0!=q.distance<0?N.distance<0?1:-1:(N.distance-q.distance)*D:(N[H]-q[H])*D),E}),h=J(()=>Math.max(1,Math.ceil(f.value.length/Ss))),w=J(()=>f.value.slice((i.value-1)*Ss,i.value*Ss));bt(l,()=>{i.value=1}),bt(h,L=>{i.value>L&&(i.value=L)});function k(L){var E;return(E=wt(At,L))!=null?E:[]}function F(L){return L.distance<0?o("doorlock.ui.elsewhere"):o("doorlock.ui.metres",{n:L.distance.toFixed(1).replace(".",o("doorlock.ui.decimal"))})}const A=J(()=>{const L=f.value.length;return o(L===0?"doorlock.ui.countZero":L===1?"doorlock.ui.countOne":"doorlock.ui.count",{n:L})});function T(L){return a.value!==L?"":u.value?"▲":"▼"}return(L,E)=>(c(),d("div",Jd,[r("div",Qd,[r("button",{class:Z(["add op-frame",{"is-off":!e.access.save}]),"data-augmented-ui":"tr-clip border",title:e.access.save?M(o)("doorlock.ui.create"):M(o)("doorlock.ui.denied"),disabled:!e.access.save,onClick:E[0]||(E[0]=H=>s("create"))},[(c(),d("svg",tf,[(c(!0),d(ne,null,ve(k("plus"),(H,D)=>(c(),d("path",{key:D,d:H},null,8,nf))),128))]))],10,ef),r("label",of,[(c(),d("svg",sf,[(c(!0),d(ne,null,ve(k("search"),(H,D)=>(c(),d("path",{key:D,d:H},null,8,lf))),128))])),$t(r("input",{"onUpdate:modelValue":E[1]||(E[1]=H=>l.value=H),class:"op-copy",type:"text",placeholder:M(o)("doorlock.ui.search"),maxlength:"64"},null,8,af),[[un,l.value]])]),r("span",rf,m(A.value),1)]),r("div",uf,[r("div",cf,[r("button",{class:"th c-id",onClick:E[2]||(E[2]=H=>p("id"))},m(M(o)("doorlock.ui.col.id"))+" "+m(T("id")),1),r("button",{class:"th c-name",onClick:E[3]||(E[3]=H=>p("name"))},m(M(o)("doorlock.ui.col.name"))+" "+m(T("name")),1),r("button",{class:"th c-state",onClick:E[4]||(E[4]=H=>p("state"))},m(M(o)("doorlock.ui.col.state"))+" "+m(T("state")),1),r("button",{class:"th c-dist",onClick:E[5]||(E[5]=H=>p("distance"))},m(M(o)("doorlock.ui.col.distance"))+" "+m(T("distance")),1),E[8]||(E[8]=r("span",{class:"th c-act"},null,-1))]),e.loaded?w.value.length===0?(c(),d("p",ff,m(M(o)("doorlock.ui.empty")),1)):(c(),d("ul",vf,[(c(!0),d(ne,null,ve(w.value,(H,D)=>(c(),d("li",{key:H.id,class:"op-enter",style:Te(`--op-slot: ${D}`)},[r("div",{class:"row op-frame","data-augmented-ui":"tr-clip border",onDblclick:N=>s("edit",H.id)},[r("span",hf,"#"+m(H.id),1),r("span",mf,[Ft(m(H.name)+" ",1),H.double?(c(),d("small",gf,m(M(o)("doorlock.ui.doubleTag")),1)):R("",!0),H.seeded?(c(),d("small",bf,m(M(o)("doorlock.ui.seeded")),1)):R("",!0)]),r("span",{class:Z(["c-state op-value",{unlocked:H.state===0}])},m(H.state===1?M(o)("doorlock.ui.locked"):M(o)("doorlock.ui.unlocked")),3),r("span",_f,m(F(H)),1),r("span",yf,[r("button",{class:"icon",title:M(o)("doorlock.ui.action.edit"),onClick:N=>s("edit",H.id)},[(c(),d("svg",wf,[(c(!0),d(ne,null,ve(k("gear"),(N,q)=>(c(),d("path",{key:q,d:N},null,8,$f))),128))]))],8,kf),r("button",{class:"icon",title:M(o)("doorlock.ui.action.copy"),onClick:N=>s("copy",H)},[(c(),d("svg",Mf,[(c(!0),d(ne,null,ve(k("folder"),(N,q)=>(c(),d("path",{key:q,d:N},null,8,Cf))),128))]))],8,xf),r("button",{class:Z(["icon",{off:!e.access.lock}]),disabled:!e.access.lock,title:e.access.lock?M(o)(H.state===1?"doorlock.ui.action.unlock":"doorlock.ui.action.lock"):M(o)("doorlock.ui.denied"),onClick:N=>s("toggle",H)},[(c(),d("svg",Tf,[(c(!0),d(ne,null,ve(k("lock"),(N,q)=>(c(),d("path",{key:q,d:N},null,8,Ef))),128))]))],10,Sf),r("button",{class:Z(["icon",{off:!e.access.teleport}]),disabled:!e.access.teleport,title:e.access.teleport?M(o)("doorlock.ui.action.teleport"):M(o)("doorlock.ui.denied"),onClick:N=>s("teleport",H)},[(c(),d("svg",Lf,[(c(!0),d(ne,null,ve(k("location"),(N,q)=>(c(),d("path",{key:q,d:N},null,8,Of))),128))]))],10,Af),r("button",{class:Z(["icon danger",{off:!e.access.remove}]),disabled:!e.access.remove,title:e.access.remove?M(o)("doorlock.ui.action.delete"):M(o)("doorlock.ui.denied"),onClick:N=>s("delete",H)},[(c(),d("svg",Rf,[(c(!0),d(ne,null,ve(k("trash"),(N,q)=>(c(),d("path",{key:q,d:N},null,8,Df))),128))]))],10,If)])],40,pf)],4))),128))])):(c(),d("p",df,m(M(o)("doorlock.ui.loading")),1))]),h.value>1?(c(),d("nav",Nf,[r("button",{class:Z(["step op-frame",{"is-off":i.value<=1}]),"data-augmented-ui":"tr-clip border",disabled:i.value<=1,title:M(o)("doorlock.ui.prev"),onClick:E[6]||(E[6]=H=>i.value-=1)},"‹",10,Pf),r("span",Hf,m(M(o)("doorlock.ui.page",{page:i.value,pages:h.value})),1),r("button",{class:Z(["step op-frame",{"is-off":i.value>=h.value}]),"data-augmented-ui":"tr-clip border",disabled:i.value>=h.value,title:M(o)("doorlock.ui.next"),onClick:E[7]||(E[7]=H=>i.value+=1)},"›",10,Ff)])):R("",!0)]))}}),Vf=Fe(Bf,[["__scopeId","data-v-3d1fe23c"]]),jf={class:"settings"},Uf={class:"tabs"},Kf={viewBox:"0 0 24 24"},Wf=["d"],zf={class:"op-label op-truncate"},Zf=["disabled","title","onClick"],Gf={viewBox:"0 0 24 24"},qf=["d"],Yf={class:"op-label op-truncate"},Xf={class:"pane"},Jf={key:0,class:"hint op-copy"},Qf={key:1,class:"fields"},ev={class:"grid"},tv={class:"field"},nv={class:"op-eyebrow"},ov=["maxlength","disabled"],sv={class:"field"},lv={class:"op-eyebrow"},iv=["maxlength","disabled","placeholder"],av=["disabled"],rv={class:"op-eyebrow"},uv=["title"],cv={class:"op-eyebrow"},dv=["max","value","disabled"],fv=["title"],vv={class:"op-eyebrow"},pv=["max","value","disabled"],hv={class:"switches"},mv=["disabled","title","onClick"],gv={class:"op-label op-truncate"},bv={class:"doors"},_v={class:"op-eyebrow"},yv={class:"leaves"},kv={key:0,class:"op-copy dim"},wv={key:1,class:"op-copy warn"},$v=["disabled","title"],xv={viewBox:"0 0 24 24"},Mv=["d"],Cv={class:"op-label"},Sv={key:2,class:"rows"},Tv=["onUpdate:modelValue","placeholder","disabled"],Ev=["title","disabled","onClick"],Av={viewBox:"0 0 24 24"},Lv=["d"],Ov=["disabled","title"],Iv={key:3,class:"rows"},Rv=["onUpdate:modelValue","placeholder","disabled"],Dv=["value","placeholder","disabled","onChange"],Nv=["title","disabled","onClick"],Pv={viewBox:"0 0 24 24"},Hv=["d"],Fv=["disabled","title"],Bv={key:4,class:"rows"},Vv=["onUpdate:modelValue","placeholder","disabled"],jv=["onUpdate:modelValue","placeholder","disabled"],Uv=["disabled","onClick"],Kv={class:"op-eyebrow"},Wv=["title","disabled","onClick"],zv={viewBox:"0 0 24 24"},Zv=["d"],Gv=["disabled","title"],qv={key:5,class:"rows"},Yv={key:0,class:"hint op-copy"},Xv=["value","disabled","onChange"],Jv=["value"],Qv={value:"__custom"},ep=["value","title","placeholder","disabled","onChange"],tp=["value","title","placeholder","disabled","onChange"],np=["title","disabled","onClick"],op={viewBox:"0 0 24 24"},sp=["d"],lp=["disabled","title"],ip={key:6,class:"fields"},ap={key:0,class:"hint op-copy"},rp={class:"field"},up={class:"op-eyebrow"},cp=["disabled"],dp={value:""},fp=["value"],vp=["value"],pp={class:"field"},hp={class:"op-eyebrow"},mp=["disabled"],gp={value:""},bp=["value"],_p=["value"],yp={class:"submit"},kp={key:1,class:"notice op-copy"},wp={class:"actions"},$p=["disabled","title"],xp={class:"op-label"},Mp=["title","disabled"],Cp={viewBox:"0 0 24 24"},Sp=["d"],Tp=["disabled","title"],Ep={viewBox:"0 0 24 24"},Ap=["d"],Lp=["disabled","title"],Op={viewBox:"0 0 24 24"},Ip=["d"],Rp=["disabled","title"],Dp={viewBox:"0 0 24 24"},Np=["d"],Pp=He({__name:"DoorSettings",props:Ol({draft:{},defaults:{},access:{},sounds:{},difficulties:{},loading:{type:Boolean},saving:{type:Boolean},hasCopy:{type:Boolean},notice:{}},{tab:{required:!0},tabModifiers:{}}),emits:Ol(["back","submit","pick","apply","copy","key","delete"],["update:tab"]),setup(e,{emit:t}){const n=e,s=pu(e,"tab"),o=t,{t:l}=nt(),i={general:"gear",characters:"person",groups:"shield",items:"box",lockpick:"tool",sound:"bolt"};function a(q){var W;return(W=wt(At,q))!=null?W:[]}const u=J(()=>n.access.save&&!n.loading),p=["state","double","auto","lockpick","hideUi","holdOpen","onDuty"];function f(q){u.value&&(n.draft[q]=!n.draft[q],q==="double"&&!n.draft.double&&n.draft.doors.length>1&&(n.draft.doors=n.draft.doors.slice(0,1)),q==="lockpick"&&!n.draft.lockpick&&s.value==="lockpick"&&(s.value="general"))}function h(q,W,B,I=0){const O=Number(q.target.value);if(!Number.isFinite(O))return W;const K=Math.min(B,Math.max(W,O)),V=10**I;return Math.round(K*V)/V}function w(){n.draft.characters.lengthn.defaults.steps.map(q=>l(Gd(q))).join(", ")),D=J(()=>n.draft.double?2:1),N=J(()=>er(n.draft));return(q,W)=>(c(),d("div",jf,[r("nav",Uf,[r("button",{class:"tab op-frame","data-augmented-ui":"tr-clip border",onClick:W[0]||(W[0]=B=>o("back"))},[(c(),d("svg",Kf,[(c(!0),d(ne,null,ve(a("back"),(B,I)=>(c(),d("path",{key:I,d:B},null,8,Wf))),128))])),r("span",zf,m(M(l)("doorlock.ui.tab.back")),1)]),(c(!0),d(ne,null,ve(M(jd),B=>(c(),d("button",{key:B,class:Z(["tab op-frame",{"is-on":s.value===B,"op-lift":s.value===B,"is-off":B==="lockpick"&&!e.draft.lockpick}]),"data-augmented-ui":"tr-clip border",disabled:B==="lockpick"&&!e.draft.lockpick,title:B==="lockpick"&&!e.draft.lockpick?M(l)("doorlock.ui.lockpickOff"):"",onClick:I=>s.value=B},[(c(),d("svg",Gf,[(c(!0),d(ne,null,ve(a(i[B]),(I,O)=>(c(),d("path",{key:O,d:I},null,8,qf))),128))])),r("span",Yf,m(M(l)(`doorlock.ui.tab.${B}`)),1)],10,Zf))),128))]),r("section",Xf,[e.loading?(c(),d("p",Jf,m(M(l)("doorlock.ui.loading")),1)):s.value==="general"?(c(),d("div",Qf,[r("div",ev,[r("label",tv,[r("span",nv,m(M(l)("doorlock.ui.name")),1),$t(r("input",{"onUpdate:modelValue":W[1]||(W[1]=B=>e.draft.name=B),class:"input op-copy",type:"text",maxlength:e.defaults.nameMax,disabled:!u.value},null,8,ov),[[un,e.draft.name]])]),r("label",sv,[r("span",lv,m(M(l)("doorlock.ui.passcode")),1),$t(r("input",{"onUpdate:modelValue":W[2]||(W[2]=B=>e.draft.passcode=B),class:"input op-copy",type:"text",autocomplete:"off",maxlength:e.defaults.passcodeMax,disabled:!u.value||e.draft.clearPasscode,placeholder:e.draft.hasPasscode?M(l)("doorlock.ui.passcodeKept"):""},null,8,iv),[[un,e.draft.passcode]]),e.draft.hasPasscode?(c(),d("button",{key:0,class:Z(["mini",{on:e.draft.clearPasscode}]),disabled:!u.value,onClick:W[3]||(W[3]=_t(B=>e.draft.clearPasscode=!e.draft.clearPasscode,["prevent"]))},[r("span",{class:Z(["box",{ticked:e.draft.clearPasscode}])},[...W[14]||(W[14]=[r("svg",{viewBox:"0 0 13 13","aria-hidden":"true"},[r("path",{d:"M2.6 6.8 5 9.2 10 3.6"})],-1)])],2),r("span",rv,m(M(l)("doorlock.ui.passcodeClear")),1)],10,av)):R("",!0)]),r("label",{class:"field",title:M(l)("doorlock.ui.autolockHint")},[r("span",cv,m(M(l)("doorlock.ui.autolock")),1),r("input",{class:"input op-value",type:"number",min:"0",max:e.defaults.autolockMax,step:"1",value:e.draft.autolock,disabled:!u.value,onChange:W[4]||(W[4]=B=>e.draft.autolock=h(B,0,e.defaults.autolockMax))},null,40,dv)],8,uv),r("label",{class:"field",title:M(l)("doorlock.ui.maxDistanceHint")},[r("span",vv,m(M(l)("doorlock.ui.maxDistance")),1),r("input",{class:"input op-value",type:"number",min:"0.5",max:e.defaults.maxReach,step:"0.1",value:e.draft.maxDistance,disabled:!u.value,onChange:W[5]||(W[5]=B=>e.draft.maxDistance=h(B,.5,e.defaults.maxReach,1))},null,40,pv)],8,fv)]),r("div",hv,[(c(),d(ne,null,ve(p,B=>r("button",{key:B,class:Z(["switch",{on:e.draft[B]}]),disabled:!u.value,title:M(l)(`doorlock.ui.${B}Hint`),onClick:I=>f(B)},[r("span",{class:Z(["box",{ticked:e.draft[B]}])},[...W[15]||(W[15]=[r("svg",{viewBox:"0 0 13 13","aria-hidden":"true"},[r("path",{d:"M2.6 6.8 5 9.2 10 3.6"})],-1)])],2),r("span",gv,m(M(l)(`doorlock.ui.${B}`)),1)],10,mv)),64))]),r("div",bv,[r("span",_v,m(M(l)("doorlock.ui.doors")),1),r("ul",yv,[(c(!0),d(ne,null,ve(e.draft.doors,(B,I)=>(c(),d("li",{key:B.native,class:"op-value"},m(I+1)+" · "+m(B.native),1))),128)),e.draft.doors.length===0?(c(),d("li",kv,m(M(l)("doorlock.ui.noLeaf")),1)):e.draft.doors.lengtho("pick"))},[(c(),d("svg",xv,[(c(!0),d(ne,null,ve(a("door"),(B,I)=>(c(),d("path",{key:I,d:B},null,8,Mv))),128))])),r("span",Cv,m(M(l)("doorlock.ui.pickWorld")),1)],10,$v)])])):s.value==="characters"?(c(),d("div",Sv,[(c(!0),d(ne,null,ve(e.draft.characters,(B,I)=>(c(),d("div",{key:`c${I}`,class:"line"},[$t(r("input",{"onUpdate:modelValue":O=>e.draft.characters[I]=O,class:"input op-copy",type:"text",maxlength:"32",placeholder:M(l)("doorlock.ui.character"),disabled:!u.value},null,8,Tv),[[un,e.draft.characters[I]]]),r("button",{class:"icon danger",title:M(l)("doorlock.ui.deleteRow"),disabled:!u.value,onClick:O=>e.draft.characters.splice(I,1)},[(c(),d("svg",Av,[(c(!0),d(ne,null,ve(a("trash"),(O,K)=>(c(),d("path",{key:K,d:O},null,8,Lv))),128))]))],8,Ev)]))),128)),r("button",{class:"add op-frame","data-augmented-ui":"tr-clip border",disabled:!u.value,title:M(l)("doorlock.ui.addRow"),onClick:w},"+",8,Ov)])):s.value==="groups"?(c(),d("div",Iv,[(c(!0),d(ne,null,ve(e.draft.groups,(B,I)=>(c(),d("div",{key:`g${I}`,class:"line"},[$t(r("input",{"onUpdate:modelValue":O=>B.name=O,class:"input op-copy",type:"text",maxlength:"48",placeholder:M(l)("doorlock.ui.group"),disabled:!u.value},null,8,Rv),[[un,B.name]]),r("input",{class:"input op-value narrow",type:"number",min:"0",max:"1000",step:"1",value:B.grade,placeholder:M(l)("doorlock.ui.grade"),disabled:!u.value,onChange:O=>B.grade=h(O,0,1e3)},null,40,Dv),r("button",{class:"icon danger",title:M(l)("doorlock.ui.deleteRow"),disabled:!u.value,onClick:O=>e.draft.groups.splice(I,1)},[(c(),d("svg",Pv,[(c(!0),d(ne,null,ve(a("trash"),(O,K)=>(c(),d("path",{key:K,d:O},null,8,Hv))),128))]))],8,Nv)]))),128)),r("button",{class:"add op-frame","data-augmented-ui":"tr-clip border",disabled:!u.value,title:M(l)("doorlock.ui.addRow"),onClick:k},"+",8,Fv)])):s.value==="items"?(c(),d("div",Bv,[(c(!0),d(ne,null,ve(e.draft.items,(B,I)=>(c(),d("div",{key:`i${I}`,class:"line"},[$t(r("input",{"onUpdate:modelValue":O=>B.name=O,class:"input op-copy",type:"text",maxlength:"48",placeholder:M(l)("doorlock.ui.item"),disabled:!u.value},null,8,Vv),[[un,B.name]]),$t(r("input",{"onUpdate:modelValue":O=>B.metadata=O,class:"input op-copy",type:"text",maxlength:"48",placeholder:M(l)("doorlock.ui.metadata"),disabled:!u.value},null,8,jv),[[un,B.metadata]]),r("button",{class:Z(["mini",{on:B.remove}]),disabled:!u.value,onClick:O=>B.remove=!B.remove},[r("span",{class:Z(["box",{ticked:B.remove}])},[...W[16]||(W[16]=[r("svg",{viewBox:"0 0 13 13","aria-hidden":"true"},[r("path",{d:"M2.6 6.8 5 9.2 10 3.6"})],-1)])],2),r("span",Kv,m(M(l)("doorlock.ui.remove")),1)],10,Uv),r("button",{class:"icon danger",title:M(l)("doorlock.ui.deleteRow"),disabled:!u.value,onClick:O=>e.draft.items.splice(I,1)},[(c(),d("svg",zv,[(c(!0),d(ne,null,ve(a("trash"),(O,K)=>(c(),d("path",{key:K,d:O},null,8,Zv))),128))]))],8,Wv)]))),128)),r("button",{class:"add op-frame","data-augmented-ui":"tr-clip border",disabled:!u.value,title:M(l)("doorlock.ui.addRow"),onClick:F},"+",8,Gv)])):s.value==="lockpick"?(c(),d("div",qv,[e.draft.steps.length===0?(c(),d("p",Yv,m(M(l)("doorlock.ui.stepsDefault",{steps:H.value})),1)):R("",!0),(c(!0),d(ne,null,ve(e.draft.steps,(B,I)=>(c(),d("div",{key:`s${I}`,class:"line"},[r("select",{class:"input op-copy",value:T(B),disabled:!u.value,onChange:O=>L(I,O)},[(c(!0),d(ne,null,ve(e.difficulties,O=>(c(),d("option",{key:O,value:O},m(M(l)(`doorlock.difficulty.${O}`)),9,Jv))),128)),r("option",Qv,m(M(l)("doorlock.ui.custom")),1)],40,Xv),typeof B!="string"?(c(),d(ne,{key:0},[r("input",{class:"input op-value narrow",type:"number",min:"1",max:"360",value:B.areaSize,title:M(l)("doorlock.ui.areaHint"),placeholder:M(l)("doorlock.ui.areaSize"),disabled:!u.value,onChange:O=>E(I,"areaSize",O)},null,40,ep),r("input",{class:"input op-value narrow",type:"number",min:"0.1",max:"10",step:"0.05",value:B.speedMultiplier,title:M(l)("doorlock.ui.speedHint"),placeholder:M(l)("doorlock.ui.speed"),disabled:!u.value,onChange:O=>E(I,"speedMultiplier",O)},null,40,tp)],64)):R("",!0),r("button",{class:"icon danger",title:M(l)("doorlock.ui.deleteRow"),disabled:!u.value,onClick:O=>e.draft.steps.splice(I,1)},[(c(),d("svg",op,[(c(!0),d(ne,null,ve(a("trash"),(O,K)=>(c(),d("path",{key:K,d:O},null,8,sp))),128))]))],8,np)]))),128)),r("button",{class:"add op-frame","data-augmented-ui":"tr-clip border",disabled:!u.value,title:M(l)("doorlock.ui.addRow"),onClick:A},"+",8,lp)])):(c(),d("div",ip,[e.sounds.length===0?(c(),d("p",ap,m(M(l)("doorlock.ui.noSounds")),1)):R("",!0),r("label",rp,[r("span",up,m(M(l)("doorlock.ui.lockSound")),1),$t(r("select",{"onUpdate:modelValue":W[7]||(W[7]=B=>e.draft.lockSound=B),class:"input op-copy",disabled:!u.value},[r("option",dp,m(M(l)("doorlock.ui.soundNone")),1),(c(!0),d(ne,null,ve(e.sounds,B=>(c(),d("option",{key:B,value:B},m(B),9,fp))),128)),e.draft.lockSound&&!e.sounds.includes(e.draft.lockSound)?(c(),d("option",{key:0,value:e.draft.lockSound},m(e.draft.lockSound),9,vp)):R("",!0)],8,cp),[[ti,e.draft.lockSound]])]),r("label",pp,[r("span",hp,m(M(l)("doorlock.ui.unlockSound")),1),$t(r("select",{"onUpdate:modelValue":W[8]||(W[8]=B=>e.draft.unlockSound=B),class:"input op-copy",disabled:!u.value},[r("option",gp,m(M(l)("doorlock.ui.soundNone")),1),(c(!0),d(ne,null,ve(e.sounds,B=>(c(),d("option",{key:B,value:B},m(B),9,bp))),128)),e.draft.unlockSound&&!e.sounds.includes(e.draft.unlockSound)?(c(),d("option",{key:0,value:e.draft.unlockSound},m(e.draft.unlockSound),9,_p)):R("",!0)],8,mp),[[ti,e.draft.unlockSound]])])])),r("footer",yp,[e.notice?(c(),d("p",{key:0,class:Z(["notice op-copy",{bad:!e.notice.ok}])},m(e.notice.text),3)):N.value?R("",!0):(c(),d("p",kp,m(M(l)("doorlock.ui.needDoor")),1)),r("div",wp,[r("button",{class:Z(["btn wide op-frame",{"is-on":u.value&&!e.saving,"is-off":!u.value||e.saving}]),"data-augmented-ui":"tr-clip border",disabled:!u.value||e.saving,title:e.access.save?"":M(l)("doorlock.ui.denied"),onClick:W[9]||(W[9]=B=>o("submit"))},[r("span",xp,m(e.saving?M(l)("doorlock.ui.saving"):M(l)("doorlock.ui.submit")),1)],10,$p),r("button",{class:"icon",title:M(l)("doorlock.ui.action.copy"),disabled:e.loading,onClick:W[10]||(W[10]=B=>o("copy"))},[(c(),d("svg",Cp,[(c(!0),d(ne,null,ve(a("folder"),(B,I)=>(c(),d("path",{key:I,d:B},null,8,Sp))),128))]))],8,Mp),r("button",{class:Z(["icon",{off:!e.hasCopy||!u.value}]),disabled:!e.hasCopy||!u.value,title:e.hasCopy?M(l)("doorlock.ui.applyCopy"):M(l)("doorlock.ui.noCopy"),onClick:W[11]||(W[11]=B=>o("apply"))},[(c(),d("svg",Ep,[(c(!0),d(ne,null,ve(a("import"),(B,I)=>(c(),d("path",{key:I,d:B},null,8,Ap))),128))]))],10,Tp),e.draft.id!==null?(c(),d("button",{key:0,class:Z(["icon",{off:!e.access.key}]),disabled:!e.access.key,title:e.access.key?M(l)("doorlock.ui.action.key"):M(l)("doorlock.ui.denied"),onClick:W[12]||(W[12]=B=>o("key"))},[(c(),d("svg",Op,[(c(!0),d(ne,null,ve(a("key"),(B,I)=>(c(),d("path",{key:I,d:B},null,8,Ip))),128))]))],10,Lp)):R("",!0),e.draft.id!==null?(c(),d("button",{key:1,class:Z(["icon danger",{off:!e.access.remove}]),disabled:!e.access.remove,title:e.access.remove?M(l)("doorlock.ui.action.delete"):M(l)("doorlock.ui.denied"),onClick:W[13]||(W[13]=B=>o("delete"))},[(c(),d("svg",Dp,[(c(!0),d(ne,null,ve(a("trash"),(B,I)=>(c(),d("path",{key:I,d:B},null,8,Np))),128))]))],10,Rp)):R("",!0)])])])]))}}),Hp=Fe(Pp,[["__scopeId","data-v-cfa8ad0b"]]),Fp={class:"bay op-bay op-arete","data-augmented-ui":"tr-clip bl-clip border"},Bp={class:"bay-inner op-interlace"},Vp={class:"head"},jp={class:"head-title op-label op-truncate"},Up={key:0,class:"head-mode op-value"},Kp=["title"],Wp={class:"ask op-bay op-arete","data-augmented-ui":"tr-clip bl-clip border"},zp={class:"ask-inner op-interlace"},Zp={class:"op-eyebrow"},Gp={class:"op-copy ask-text"},qp={class:"ask-row"},Yp={class:"op-label"},Xp={class:"op-label"},Jp=240,Qp=He({__name:"DoorlockView",setup(e){const{t}=nt(),n=C(null),s=C(!1),o=C(!0),l=C("list"),i=C(0),a=C("general"),u=C(""),p=C(vi({})),f=C(Ts({})),h=C([]),w=C([]),k=C([]);let F=[];const A=C(!1),T=mt(so(Ts({}))),L=C(null),E=C(!1),H=C(!1),D=C(null),N=C(!1),q=C(null),W=C(null),B=J(()=>l.value==="list"?t("doorlock.ui.title"):T.id===null?t("doorlock.ui.newDoor"):t("doorlock.ui.editDoor",{id:T.id}));function I(_){return typeof _=="string"||typeof _=="number"}function O(_){return n.value!==null&&_.handle===n.value}function K(_,P={}){xe(Xd[_],{...P,handle:n.value})}let V;function be(_){_&&V===void 0?V=Pt({id:"doorlock",onEscape:()=>{if(q.value!==null){q.value=null;return}K("dismiss")}}):!_&&V!==void 0&&(V(),V=void 0)}function de(_){Object.assign(T,_)}function se(_){de(_!=null?_:so(f.value)),L.value=null,W.value=null,a.value="general",l.value="settings"}function ie(_){N.value=!1,de(so(f.value)),T.id=_,L.value=_,W.value=null,a.value="general",l.value="settings",K("detail",{id:_})}function fe(){l.value="list",L.value=null,H.value=!1,K("list")}function re(){s.value=!1,o.value=!0,k.value=[],F=[],A.value=!1,q.value=null,W.value=null,E.value=!1,L.value=null,H.value=!1}ge("opx:doorlock:open",_=>{Ie("doorlock:open",()=>{if(!I(_.handle))return;Ne(),re(),i.value+=1,n.value=_.handle,p.value=vi(_.access),f.value=Ts(_.defaults),h.value=pi(_.sounds),w.value=pi(_.difficulties),u.value=x(_.mode),s.value=!0;const P=x(_.view,"list"),j=Q(_.edit,-1);P==="edit"&&j>0?ie(j):P==="create"?se(Wd(f.value,_.draft)):l.value="list",be(!0)},void 0)}),ge("opx:doorlock:rows",_=>{Ie("doorlock:rows",()=>{O(_)&&(Q(_.offset)===0&&(F=[]),F=F.concat(Kd(_.rows)),_.done===!0&&(k.value=F,F=[],A.value=!0))},void 0)}),ge("opx:doorlock:detail",_=>{Ie("doorlock:detail",()=>{if(!O(_))return;const P=zd(f.value,_.door);if(!(L.value===null||P.id!==L.value)){if(L.value=null,N.value){N.value=!1,D.value=hi(P),W.value={ok:!0,text:t("doorlock.ui.copied")},l.value="list";return}de(P)}},void 0)}),ge("opx:doorlock:patch",_=>{Ie("doorlock:patch",()=>{if(!O(_))return;const P=Q(_.id,-1),j=Q(_.state,1)===0?0:1;for(const Y of k.value)Y.id===P&&(Y.state=j)},void 0)}),ge("opx:doorlock:picked",_=>{Ie("doorlock:picked",()=>{if(!O(_))return;if(_.cancelled===!0){H.value=!1;return}const P=ml(_.doors);if(P.length===0)return;T.doors=P,T.double=P.length===2;const j=Ge([_.coords])[0],Y=Q(j.x,NaN),ue=Q(j.y,NaN),ae=Q(j.z,NaN);T.coords=Number.isFinite(Y)&&Number.isFinite(ue)&&Number.isFinite(ae)?{x:Y,y:ue,z:ae}:null,H.value&&(H.value=!1,Re())},void 0)});const ee={save:"doorlock.staff.saved",remove:"doorlock.staff.removed",key:"doorlock.staff.key_given"};function te(_,P){var j;if(_!=="save"&&P>0){const Y=k.value.find(ue=>ue.id===P);return Y?Y.name||`#${P}`:`#${P}`}return T.name||`#${(j=T.id)!=null?j:""}`}function $e(_,P,j,Y,ue=0){var X;if(P)return t((X=wt(ee,_))!=null?X:"doorlock.answer.done",{door:te(_,ue)});const ae=`doorlock.error.${j}`,oe=t(ae,{detail:Y,door:T.name});return oe===ae?t("doorlock.error.invalid"):oe}ge("opx:doorlock:result",_=>{Ie("doorlock:result",()=>{if(!O(_))return;const P=x(_.verb),j=De(_.ok);P==="save"&&(E.value=!1),P==="detail"&&!j&&(L.value=null,l.value="list"),W.value={ok:j,text:$e(P,j,x(_.code),x(_.detail),Q(_.id))},j&&Yd(P)&&l.value==="settings"&&(l.value="list")},void 0)}),ge("opx:doorlock:visible",_=>{Ie("doorlock:visible",()=>{O(_)&&(o.value=_.visible!==!1,be(s.value&&o.value))},void 0)});let Me;function Ne(){Me!==void 0&&clearTimeout(Me),Me=void 0}ge("opx:doorlock:close",_=>{Ie("doorlock:close",()=>{_.handle!==void 0&&!O(_)||(n.value=null,s.value=!1,q.value=null,be(!1),Ne(),Me=setTimeout(()=>{Me=void 0,s.value||re()},Jp))},void 0)}),lt(()=>{Ne(),be(!1)});function Re(){var _;if(!(!p.value.save||E.value)){if(!er(T)){H.value=!0,qe();return}E.value=!0,W.value=null,K("save",{id:(_=T.id)!=null?_:void 0,door:Zs(Zd(T,f.value))})}}function qe(){var _;K("pick",{double:T.double,id:(_=T.id)!=null?_:void 0})}function Ze(_){N.value=!0,L.value=_.id,K("detail",{id:_.id})}function le(){if(D.value===null)return;const _=D.value;Object.assign(T,{..._,characters:[..._.characters],groups:_.groups.map(P=>({...P})),items:_.items.map(P=>({...P})),steps:_.steps.map(P=>typeof P=="string"?P:{...P})}),W.value={ok:!0,text:t("doorlock.ui.applied")}}function Ce(){D.value=hi(T),W.value={ok:!0,text:t("doorlock.ui.copied")}}function S(_,P){p.value.remove&&(q.value={id:_,name:P})}function pe(){q.value!==null&&(K("delete",{id:q.value.id}),q.value=null)}function _e(_){p.value.lock&&K("state",{id:_.id,state:_.state===1?0:1})}function g(_){p.value.teleport&&K("teleport",{id:_.id})}function $(){!p.value.key||T.id===null||K("key",{id:T.id})}return(_,P)=>(c(),d("div",{class:Z(["panel op-plane op-ink",{open:s.value&&o.value}])},[r("div",Fp,[r("div",Bp,[r("header",Vp,[P[7]||(P[7]=r("span",{class:"op-eyebrow head-kicker"},"OPX // 77",-1)),r("h1",jp,m(B.value),1),u.value?(c(),d("span",Up,m(M(t)("doorlock.ui.mode",{mode:u.value})),1)):R("",!0),r("button",{class:"close op-frame","data-augmented-ui":"tr-clip border",title:M(t)("doorlock.ui.close"),onClick:P[0]||(P[0]=j=>K("dismiss"))}," × ",8,Kp)]),$t((c(),pt(Vf,{key:i.value,rows:k.value,loaded:A.value,access:p.value,onCreate:P[1]||(P[1]=j=>se()),onEdit:ie,onCopy:Ze,onTeleport:g,onToggle:_e,onDelete:P[2]||(P[2]=j=>S(j.id,j.name))},null,8,["rows","loaded","access"])),[[Do,l.value==="list"]]),l.value!=="list"?(c(),pt(Hp,{key:0,tab:a.value,"onUpdate:tab":P[3]||(P[3]=j=>a.value=j),draft:T,defaults:f.value,access:p.value,sounds:h.value,difficulties:w.value,loading:L.value!==null,saving:E.value,"has-copy":D.value!==null,notice:W.value,onBack:fe,onSubmit:Re,onPick:qe,onApply:le,onCopy:Ce,onKey:$,onDelete:P[4]||(P[4]=j=>T.id!==null&&S(T.id,T.name))},null,8,["tab","draft","defaults","access","sounds","difficulties","loading","saving","has-copy","notice"])):R("",!0),l.value==="list"&&W.value?(c(),d("p",{key:1,class:Z(["notice op-copy",{bad:!W.value.ok}])},m(W.value.text),3)):R("",!0)])]),q.value?(c(),d("div",{key:0,class:"veil",onClick:P[6]||(P[6]=_t(j=>q.value=null,["self"]))},[r("div",Wp,[r("div",zp,[r("p",Zp,m(M(t)("doorlock.ui.confirmTitle")),1),r("p",Gp,m(M(t)("doorlock.ui.confirmDelete",{door:q.value.name})),1),r("div",qp,[r("button",{class:"btn op-frame","data-augmented-ui":"tr-clip border",onClick:P[5]||(P[5]=j=>q.value=null)},[r("span",Yp,m(M(t)("doorlock.ui.cancel")),1)]),r("button",{class:"btn danger op-frame is-on","data-augmented-ui":"tr-clip border",onClick:pe},[r("span",Xp,m(M(t)("doorlock.ui.confirm")),1)])])])])])):R("",!0)],2))}}),eh=Fe(Qp,[["__scopeId","data-v-1ab515ce"]]);function th(e,t={}){var h;const n=(h=t.tickMs)!=null?h:250,s=C(Date.now());let o;function l(){o!==void 0&&(clearInterval(o),o=void 0)}function i(){l(),s.value=Date.now(),o=setInterval(()=>{s.value=Date.now(),a.value<=0&&l()},n)}const a=J(()=>Math.max(0,e.value-s.value)),u=J(()=>Math.ceil(a.value/1e3)),p=J(()=>a.value<=0),f=J(()=>{const w=u.value,k=Math.floor(w/60),F=w%60;return`${String(k).padStart(2,"0")}:${String(F).padStart(2,"0")}`});return bt(e,w=>{w>0?i():l()},{immediate:!0}),lt(l),{remainingMs:a,seconds:u,clock:f,done:p,stop:l}}const nh={class:"stage op-plane"},oh={class:"bay op-bay op-arete","data-augmented-ui":"tr-clip bl-clip border"},sh={class:"bay-inner op-interlace"},lh={class:"head"},ih={class:"eyebrow op-eyebrow"},ah={class:"subtitle op-copy"},rh={class:"vitals"},uh={class:"read"},ch={class:"op-eyebrow"},dh={class:"glyph",viewBox:"0 0 24 24","aria-hidden":"true"},fh=["d"],vh={class:"unit op-eyebrow"},ph={class:"read"},hh={class:"op-eyebrow"},mh={class:"glyph",viewBox:"0 0 24 24","aria-hidden":"true"},gh=["d"],bh={class:"figure op-value op-truncate"},_h={class:"read"},yh={class:"op-eyebrow"},kh={class:"glyph",viewBox:"0 0 24 24","aria-hidden":"true"},wh=["d"],$h={class:"figure op-value op-truncate"},xh={class:"choices"},Mh=["aria-pressed"],Ch={class:"mark",viewBox:"0 0 24 24","aria-hidden":"true"},Sh=["d"],Th={class:"choice-text"},Eh={class:"choice-label op-label op-truncate"},Ah={class:"choice-hint op-copy"},Lh=["aria-disabled"],Oh={class:"mark",viewBox:"0 0 24 24","aria-hidden":"true"},Ih=["d"],Rh={class:"choice-text"},Dh={class:"choice-label op-label op-truncate"},Nh={class:"choice-hint op-copy"},Ph=["aria-hidden"],Hh=100,Fh=32,Bh=5e3,Vh="00",jh=He({__name:"DownedView",setup(e){const t={eyebrow:"medic.screen.eyebrow",title:"medic.screen.title",subtitle:"medic.screen.subtitle",vitals:"medic.screen.vitals",bpm:"medic.screen.bpm",down:"medic.screen.down",signal:"medic.screen.signal",signalOff:"medic.screen.signalOff",signalOn:"medic.screen.signalOn",waitLabel:"medic.wait.label",waitHint:"medic.wait.hint",waitActive:"medic.wait.active",waitActiveHint:"medic.wait.activeHint",giveUpLabel:"medic.giveUp.label",giveUpHint:"medic.giveUp.hint",giveUpLocked:"medic.giveUp.locked",giveUpHolding:"medic.giveUp.holding"},n=C(!1),s=C(!1),o=C(!1),l=C(1500),i=C(""),a=C({}),u=C(0),p=C(0),f=C(Date.now()),h=C(!1),w=C(!1),k=th(p);let F,A,T,L,E;function H(ee){var te;return(te=a.value[ee])!=null?te:ee}function D(ee,te){return ee.replace(/\{(\w+)\}/g,($e,Me)=>{var Ne;return(Ne=te[Me])!=null?Ne:$e})}function N(ee){const te=Math.max(0,Math.ceil(ee/1e3));return`${String(Math.floor(te/60)).padStart(2,"0")}:${String(te%60).padStart(2,"0")}`}const q=J(()=>!k.done.value),W=J(()=>n.value&&!s.value&&!q.value),B=J(()=>N(Math.max(0,f.value-u.value))),I=J(()=>h.value?H(t.giveUpHolding):H(t.giveUpLabel)),O=J(()=>q.value?D(H(t.giveUpLocked),{time:k.clock.value}):H(t.giveUpHint));function K(ee){A!==void 0&&clearInterval(A),A=void 0,L!==void 0&&clearTimeout(L),L=void 0,window.removeEventListener("pointerup",V),window.removeEventListener("pointercancel",V),window.removeEventListener("blur",V);const te=h.value;h.value=!1,w.value=!1,te&&ee&&xe("opx:downed:giveUp",{holding:!1})}function V(){K(!0)}function be(){!W.value||h.value||(h.value=!0,w.value=!1,xe("opx:downed:giveUp",{holding:!0}),A=setInterval(()=>xe("opx:downed:giveUp",{holding:!0}),Hh),L=setTimeout(()=>{w.value=!0},Fh),window.addEventListener("pointerup",V),window.addEventListener("pointercancel",V),window.addEventListener("blur",V))}function de(){!n.value||s.value||o.value||xe("opx:downed:wait",{})}function se(ee){if(ee){if(F!==void 0)return;F=Pt({id:"downed",onEscape:()=>{}});return}F!==void 0&&(F(),F=void 0)}function ie(){n.value=!1,s.value=!1,o.value=!1,i.value="",k.stop(),K(!1),T!==void 0&&clearInterval(T),T=void 0,E!==void 0&&clearTimeout(E),E=void 0}function fe(ee){const te=Date.now();Object.keys(a.value).length===0&&xe("opx:downed:diag",{text:"show arrived before config; drawing keys"}),o.value=ee.waiting===!0,s.value=ee.suspended===!0,l.value=Math.max(0,Q(ee.holdMs,1500)),u.value=te-Math.max(0,Q(ee.downForMs));const Me=Math.max(0,Q(ee.giveUpInMs));p.value=Me>0?te+Me:0,f.value=te,T===void 0&&(T=setInterval(()=>{f.value=Date.now()},1e3)),s.value&&K(!1),n.value=!0}ge("opx:downed:view",ee=>{Ie("downed:view",()=>{switch(x(ee.kind)){case"config":{const te=Oe(ee.text),$e={};for(const Me of Object.keys(te)){const Ne=x(te[Me]);Ne!==""&&($e[Me]=Ne)}a.value=$e;break}case"show":fe(ee);break;case"hide":ie(),se(!1);break;case"notice":{i.value=x(ee.text),E!==void 0&&clearTimeout(E),E=setTimeout(()=>{i.value=""},Bh);break}case"focus":se(ee.hold===!0);break}},void 0)});function re(ee){if(!n.value||s.value||ee.defaultPrevented)return;const te=ee.key,$e=/^F\d{1,2}$/.test(te)?te:te.length===1?te.toUpperCase():"";/^(F\d{1,2}|[A-Z0-9])$/.test($e)&&xe("opx:downed:key",{key:$e})}return Lt(()=>{window.addEventListener("keydown",re),xe("opx:downed:ready",{})}),lt(()=>{window.removeEventListener("keydown",re),ie(),se(!1)}),(ee,te)=>(c(),d("div",{class:Z(["room op-ink",{open:n.value,aside:s.value}])},[r("div",nh,[r("div",oh,[r("div",sh,[r("div",lh,[r("span",ih,m(H(t.eyebrow)),1),r("h1",null,m(H(t.title)),1),r("p",ah,m(H(t.subtitle)),1)]),r("dl",rh,[r("div",uh,[r("dt",ch,m(H(t.vitals)),1),r("dd",null,[(c(),d("svg",dh,[(c(!0),d(ne,null,ve(M(At).heart,($e,Me)=>(c(),d("path",{key:Me,d:$e},null,8,fh))),128))])),r("span",{class:"figure op-value op-truncate"},m(Vh)),r("span",vh,m(H(t.bpm)),1)])]),r("div",ph,[r("dt",hh,m(H(t.down)),1),r("dd",null,[(c(),d("svg",mh,[(c(!0),d(ne,null,ve(M(At).clock,($e,Me)=>(c(),d("path",{key:Me,d:$e},null,8,gh))),128))])),r("span",bh,m(B.value),1)])]),r("div",_h,[r("dt",yh,m(H(t.signal)),1),r("dd",{class:Z({live:o.value})},[(c(),d("svg",kh,[(c(!0),d(ne,null,ve(M(At).bolt,($e,Me)=>(c(),d("path",{key:Me,d:$e},null,8,wh))),128))])),r("span",$h,m(o.value?H(t.signalOn):H(t.signalOff)),1)],2)])]),r("div",xh,[r("div",{class:Z(["choice op-frame",{"is-on":o.value}]),"data-augmented-ui":"tr-clip border",role:"button","aria-pressed":o.value,onClick:de},[(c(),d("svg",Ch,[(c(!0),d(ne,null,ve(M(At).heal,($e,Me)=>(c(),d("path",{key:Me,d:$e},null,8,Sh))),128))])),r("span",Th,[r("span",Eh,m(o.value?H(t.waitActive):H(t.waitLabel)),1),r("span",Ah,m(o.value?H(t.waitActiveHint):H(t.waitHint)),1)])],10,Mh),r("div",{class:Z(["choice give-up op-frame",{"is-off":q.value,"is-on":h.value}]),"data-augmented-ui":"tr-clip border",role:"button","aria-disabled":q.value,onPointerdown:_t(be,["prevent"]),onPointerleave:te[0]||(te[0]=$e=>K(!0))},[r("span",{class:"charge",style:Te({transform:w.value?"scaleX(1)":"scaleX(0)",transitionDuration:h.value?`${l.value}ms`:"120ms"})},null,4),(c(),d("svg",Oh,[(c(!0),d(ne,null,ve(M(At).location,($e,Me)=>(c(),d("path",{key:Me,d:$e},null,8,Ih))),128))])),r("span",Rh,[r("span",Dh,m(I.value),1),r("span",Nh,m(O.value),1)])],42,Lh)]),r("p",{class:"notice op-copy","aria-hidden":!i.value},m(i.value),9,Ph)])])])],2))}}),Uh=Fe(jh,[["__scopeId","data-v-e450af29"]]),Kh={class:"bay-inner"},Wh={class:"head"},zh={class:"head-text"},Zh={class:"eyebrow"},Gh={class:"op-truncate"},qh={key:0,class:"note"},Yh=["data-field"],Xh=["onClick"],Jh={class:"label op-label op-truncate"},Qh={class:"cell"},em=["value","placeholder","onInput"],tm={key:1,class:"rule"},nm={key:2,class:"value op-value op-truncate"},om={key:4,class:"marks"},sm=["onClick"],lm=["onClick"],im={key:1,class:"foot"},am={key:0,class:"hint op-copy"},rm={key:2,class:"keys"},um={class:"cap","data-augmented-ui":"tr-clip border"},cm={class:"cap-label"},dm=240,fm=He({__name:"FormView",setup(e){const{t,has:n}=nt(),s=J(()=>n("form.eyebrow")?t("form.eyebrow"):"FORM"),o={ArrowUp:"up",ArrowDown:"down",ArrowLeft:"left",ArrowRight:"right",Enter:"enter"},l={center:"anchor-center","top-left":"anchor-top-left","top-right":"anchor-top-right",left:"anchor-left",right:"anchor-right"},i=C(null),a=C(!1),u=C(""),p=C(""),f=C(""),h=C(""),w=C(!1),k=C([]),F=C([]),A=C("anchor-center"),T=C(420),L=C(!0),E=C(null),H=new Map;let D=0;const N=J(()=>`width: ${T.value}px`),q=J(()=>k.value.find(le=>le.on)),W=J(()=>A.value.endsWith("right"));function B(le){return le.replace(/[\uDC00-\uDFFF]/g,"").length}function I(le){return Math.max(le.shown.length,le.placeholder.length)+1}function O(le){const Ce=le.max-le.min;if(Ce<=0)return"0%";const S=(le.number-le.min)/Ce;return`${Math.max(0,Math.min(1,S))*100}%`}function K(le){return typeof le=="string"||typeof le=="number"}function V(le){return i.value!==null&&le.handle===i.value}function be(le){var S;A.value=(S=wt(l,x(le.anchor)))!=null?S:l.center;const Ce=Q(le.width);Ce>0&&(T.value=Math.round(Ce)),L.value=le.dim!==!1}function de(le){u.value=x(le.title)||"INPUT",p.value=x(le.note),f.value=x(le.hint),h.value=x(le.status),w.value=le.statusBad===!0,F.value=Ge(le.keys).map(S=>({key:x(S.key),label:x(S.label)}));const Ce=new Set;k.value=Ge(le.rows).map(S=>{const pe=x(S.kind,"text"),_e=pe==="choice"||pe==="slider"?pe:"text",g=x(S.id),$=x(S.text);Ce.add(g);const _=Q(S.ack),P=H.get(g);let j=$;P!==void 0&&(_>=P.seq?H.delete(g):j=P.text);const Y=Q(S.min),ue=Q(S.max,_e==="slider"?100:0);return{id:g,kind:_e,label:x(S.label),buffer:$,shown:j,value:x(S.value),number:typeof S.number=="number"?S.number:Y+Q(S.fill)*(ue-Y),min:Y,max:_e==="slider"?ue:100,placeholder:x(S.placeholder),count:_e==="text"&&ue>0?`${B($)}/${Math.round(ue)}`:"",spin:S.spin===!0,on:S.on===!0}});for(const S of H.keys())Ce.has(S)||H.delete(S);st(se)}function se(){!a.value||po()!=="form"||Ie("form:caret",()=>{const le=E.value;if(!le)return;const Ce=q.value;if(Ce&&Ce.kind==="text"){const pe=le.querySelector(`[data-field="${CSS.escape(Ce.id)}"] input`);if(pe&&document.activeElement!==pe){pe.focus();const _e=pe.value.length;pe.setSelectionRange(_e,_e)}return}const S=document.activeElement;S instanceof HTMLElement&&S.blur()},void 0)}let ie;function fe(){ie!==void 0&&clearTimeout(ie),ie=void 0}function re(){var Ce;a.value=!1,H.clear();const le=document.activeElement;le instanceof HTMLElement&&((Ce=E.value)!=null&&Ce.contains(le))&&le.blur(),fe(),ie=setTimeout(()=>{ie=void 0,!a.value&&(k.value=[],F.value=[],p.value="",f.value="",h.value="",w.value=!1)},dm)}let ee;function te(le){var S;if(!a.value||po()!=="form"||le.key==="Escape")return;const Ce=o[le.key];Ce!==void 0&&((Ce==="left"||Ce==="right")&&((S=q.value)==null?void 0:S.spin)!==!0||(le.preventDefault(),xe("opx:form:key",{handle:i.value,key:Ce,repeat:le.repeat===!0})))}function $e(le){le?window.addEventListener("keydown",te):window.removeEventListener("keydown",te)}ge("opx:form:open",le=>{Ie("form:open",()=>{K(le.handle)&&(ee==null||ee(),H.clear(),fe(),i.value=le.handle,be(le),de(le),a.value=!0,$e(!0),ee=Pt({id:"form",onEscape:()=>xe("opx:form:dismiss",{handle:i.value})}))},void 0)}),ge("opx:form:frame",le=>{Ie("form:frame",()=>{V(le)&&de(le)},void 0)}),ge("opx:form:close",le=>{Ie("form:close",()=>{le.handle!==void 0&&!V(le)||(i.value=null,re(),$e(!1),ee==null||ee(),ee=void 0)},void 0)}),lt(()=>{fe(),$e(!1),ee==null||ee()});function Me(le,Ce){D+=1,H.set(le.id,{seq:D,text:Ce}),xe("opx:form:edit",{handle:i.value,id:le.id,seq:D,text:Ce})}const Ne=new WeakMap,Re={beforeUpdate(le){var Ce;document.activeElement===le&&Ne.set(le,{was:le.value,at:(Ce=le.selectionStart)!=null?Ce:le.value.length})},updated(le){const Ce=Ne.get(le);if(Ne.delete(le),Ce===void 0||document.activeElement!==le||Ce.was===le.value)return;const S=Ce.at-(Ce.was.length-le.value.length),pe=Math.max(0,Math.min(le.value.length,S));le.setSelectionRange(pe,pe)}};function qe(le,Ce){xe("opx:form:step",{handle:i.value,id:le.id,direction:Ce})}function Ze(le){le.on||xe("opx:form:focus",{handle:i.value,id:le.id})}return(le,Ce)=>(c(),d("div",{class:Z(["room",{open:a.value}])},[L.value?(c(),d("div",{key:0,class:Z(["scrim",{shown:a.value}])},null,2)):R("",!0),r("div",{class:Z(["strip",[A.value,{end:W.value}]]),style:Te(N.value)},[r("div",{class:Z(["bay op-bay op-arete",{"is-end":W.value}]),"data-augmented-ui":"tr-clip bl-clip border"},[r("div",Kh,[r("div",Wh,[r("div",zh,[r("span",Zh,m(s.value),1),r("h1",Gh,m(u.value),1)])]),p.value?(c(),d("p",qh,m(p.value),1)):R("",!0),r("ul",{ref_key:"listEl",ref:E,class:"list"},[(c(!0),d(ne,null,ve(k.value,S=>(c(),d("li",{key:S.id,class:"slot","data-field":S.id},[r("div",{class:Z(["field",[`kind-${S.kind}`,{on:S.on}]]),"data-augmented-ui":"tr-clip border",onClick:pe=>Ze(S)},[r("span",Jh,m(S.label),1),r("span",Qh,[S.kind==="text"?$t((c(),d("input",{key:0,class:"entry",type:"text",spellcheck:"false",autocomplete:"off",value:S.shown,placeholder:S.placeholder,style:Te({"--chars":I(S)}),onInput:pe=>Me(S,pe.target.value)},null,44,em)),[[Re]]):R("",!0),S.kind==="slider"?(c(),d("span",tm,[r("i",{style:Te({width:O(S)})},null,4)])):R("",!0),S.kind!=="text"?(c(),d("span",nm,m(S.value),1)):R("",!0),S.kind==="text"&&S.count?(c(),d("span",{key:3,class:Z(["count",{quiet:!S.on}])},m(S.count),3)):R("",!0),S.kind==="choice"?(c(),d("span",om,[r("button",{class:"mark",type:"button",onClick:_t(pe=>qe(S,-1),["stop"])},"‹",8,sm),r("button",{class:"mark",type:"button",onClick:_t(pe=>qe(S,1),["stop"])},"›",8,lm)])):R("",!0)])],10,Xh)],8,Yh))),128))],512),f.value||h.value||F.value.length?(c(),d("div",im,[f.value?(c(),d("p",am,m(f.value),1)):R("",!0),h.value?(c(),d("p",{key:1,class:Z(["status",{bad:w.value}])},m(h.value),3)):R("",!0),F.value.length?(c(),d("div",rm,[(c(!0),d(ne,null,ve(F.value,S=>(c(),d("span",{key:S.key,class:"key"},[r("kbd",um,m(S.key),1),r("span",cm,m(S.label),1)]))),128))])):R("",!0)])):R("",!0)])],2)],6)],2))}}),vm=Fe(fm,[["__scopeId","data-v-960ebf0f"]]),pm=["bottom-left","bottom-right","top-left","top-right","top-center","bottom-center"];function xo(e,t){const n=x(e);return pm.indexOf(n)===-1?t:n}function hm(e){return e.indexOf("-right")===-1?"start":"end"}const mm={class:"inner"},gm={class:"label"},bm={key:0,class:"value"},_m=He({__name:"HudInfo",props:{anchor:{default:"top-right"}},setup(e){const{t}=nt(),n=e,s=["neutral","on","warn","bad"],o=rt([]),l=J(()=>hm(n.anchor)==="end");function i(a){const u=x(a,"neutral");return s.indexOf(u)===-1?"neutral":u}return ge("opx:hud:info",a=>{o.value=Ge(a.lines).filter(u=>x(u.id)!=="").map(u=>({id:x(u.id),label:x(u.label),value:x(u.value),tone:i(u.tone)}))}),(a,u)=>o.value.length?(c(),d("section",{key:0,class:Z(["info",l.value?"to-end":"to-start"])},[r("div",mm,[(c(!0),d(ne,null,ve(o.value,p=>(c(),d("div",{key:p.id,class:Z(["line",p.tone])},[r("span",gm,m(M(t)(p.label)),1),p.value?(c(),d("span",bm,m(p.value),1)):R("",!0)],2))),128))])],2)):R("",!0)}}),ym=Fe(_m,[["__scopeId","data-v-a84ff7f8"]]),km={key:0,class:"strip"},wm={key:0,class:"icon"},$m={class:"label"},xm={key:0,class:"chip overflow"},Mm={class:"label"},Cm=12,Sm=999,Tm=50,Em=He({__name:"HudStatus",setup(e){const{t}=nt(),n={neutral:"neutral",accent:"accent",ok:"ok",warn:"warn",bad:"bad",shock:"shock",bleed:"bad",burn:"warn",chem:"ok"},s=rt([]),o=rt(0);let l;ge("opx:hud:status",p=>{var k;const f=Date.now(),h=new Set,w=[];for(const F of Ge(p.chips)){if(w.length>=Cm)break;const A=x(F.id);if(!A||h.has(A))continue;h.add(A);const T=Q(F.remainingMs),L=Q(F.totalMs),E=T>0&&L>0,H=typeof F.progress=="number"?Math.max(0,Math.min(1,F.progress)):-1;w.push({id:A,icon:x(F.icon).slice(0,4),label:x(F.label),tone:(k=wt(n,x(F.tone,"neutral")))!=null?k:"neutral",endsAt:E?f+T:0,totalMs:E?L:0,progress:E?Math.max(0,Math.min(1,T/L)):H})}s.value=w,o.value=Math.max(0,Math.min(Sm,Math.round(Q(p.hidden)))),a()});function i(){const p=Date.now();let f=!1,h=!1;const w=s.value.map(k=>{if(k.endsAt===0)return k;const F=Math.max(0,Math.min(1,(k.endsAt-p)/k.totalMs));return F>0&&(f=!0),Math.abs(F-k.progress)<.002?k:(h=!0,{...k,progress:F})});h&&(s.value=w),f||u()}function a(){l===void 0&&s.value.some(p=>p.endsAt>0)&&(l=setInterval(()=>Ie("hud status tick",i,void 0),Tm))}function u(){l!==void 0&&(clearInterval(l),l=void 0)}return lt(u),(p,f)=>s.value.length?(c(),d("div",km,[(c(!0),d(ne,null,ve(s.value,h=>(c(),d("span",{key:h.id,class:Z(["chip",h.tone]),"data-augmented-ui":"tr-clip border"},[h.icon?(c(),d("span",wm,m(h.icon),1)):R("",!0),r("span",$m,m(M(t)(h.label)),1),h.progress>=0?(c(),d("span",{key:1,class:"time",style:Te({transform:`scaleX(${Math.max(0,Math.min(1,h.progress))})`})},null,4)):R("",!0)],2))),128)),o.value>0?(c(),d("span",xm,[r("span",Mm,"+"+m(o.value),1)])):R("",!0)])):R("",!0)}}),Am=Fe(Em,[["__scopeId","data-v-9b376df2"]]),gl=mt({bottomRight:0,bottomCenter:0}),Gs=Bn(gl);function Es(e){gl.bottomRight=e>0&&Number.isFinite(e)?Math.round(e):0}function As(e){gl.bottomCenter=e>0&&Number.isFinite(e)?Math.round(e):0}const Lm={class:"dial"},Om={class:"rings",viewBox:"0 0 120 120","aria-hidden":"true"},Im={class:"core"},Rm={class:"speed"},Dm={key:0,class:"unit"},Nm={class:"meta"},Pm={class:"label"},Hm={class:"label"},Fm={class:"fuel-track"},Bm={key:2,class:"chip","data-augmented-ui":"tr-clip border"},Vm={class:"chip-label"},jm=85,Um=250,mi="M23.2 96.8A52 52 0 1 1 96.8 96.8",Ls="M29 91A44 44 0 1 1 91 91",gi="M20.7 99.3A55.5 55.5 0 1 1 99.3 99.3",Km="M25.7 94.3A48.5 48.5 0 1 1 94.3 94.3",bi=200,Wm=He({__name:"HudVehicle",setup(e){const{t}=nt(),n=["neutral","warn","bad"],o=rt({active:!1,speed:0,unit:"",gear:"N",rpm:-1,integrity:-1,integrityLabel:"",tone:"neutral",airborne:"",fuel:-1,fuelLabel:"",fuelTone:"neutral"});ge("opx:hud:vehicle",h=>{if(h.active!==!0){o.value={...o.value,active:!1};return}const w=x(h.tone,"neutral"),k=x(h.fuelTone,"neutral");o.value={active:!0,speed:Math.max(0,Math.round(Q(h.speed))),unit:x(h.unit),gear:x(h.gear,"N")||"N",rpm:typeof h.rpm=="number"?Math.max(0,Math.min(100,h.rpm)):-1,integrity:typeof h.integrity=="number"?Math.max(0,Math.min(100,h.integrity)):-1,integrityLabel:t(x(h.integrityLabel)),tone:n.indexOf(w)===-1?"neutral":w,airborne:h.airborne===!0?t(x(h.airborneLabel)):"",fuel:typeof h.fuel=="number"?Math.max(0,Math.min(100,h.fuel)):-1,fuelLabel:t(x(h.fuelLabel)),fuelTone:n.indexOf(k)===-1?"neutral":k}});const l=J(()=>{const h=o.value,w=h.rpm>=0?h.rpm:h.speed/Um*100;return Math.max(0,Math.min(100,w))}),i=C(null);let a=null;function u(){var T;const h=(T=i.value)==null?void 0:T.parentElement;if(!o.value.active||!h){As(0);return}const w=h.getBoundingClientRect(),k=window.innerWidth/2,F=w.leftk-bi,A=w.bottom>window.innerHeight/2;As(F&&A?window.innerHeight-w.top:0)}bt(()=>o.value.active,u,{flush:"post"}),Lt(()=>{window.addEventListener("resize",u),i.value&&typeof ResizeObserver!="undefined"&&(a=new ResizeObserver(u),a.observe(i.value))}),ls(()=>{window.removeEventListener("resize",u),a==null||a.disconnect(),a=null,As(0)});const p=J(()=>o.value.rpm>=jm),f=J(()=>{const h=o.value.gear;return h==="R"?"reverse":h==="N"?"idle":"drive"});return(h,w)=>(c(),d("div",{ref_key:"root",ref:i,class:Z(["vehicle",{live:o.value.active,hot:p.value}])},[r("div",Lm,[(c(),d("svg",Om,[r("path",{class:"shade",d:mi,pathLength:"100"}),r("path",{class:"rail",d:gi,pathLength:"100"}),r("path",{class:"rail",d:Km,pathLength:"100"}),r("path",{class:"redline",d:gi,pathLength:"100"}),r("path",{class:"rpm",d:mi,pathLength:"100",style:Te({strokeDasharray:l.value+" 100"})},null,4),o.value.integrity>=0?(c(),d(ne,{key:0},[r("path",{class:"shade-in",d:Ls,pathLength:"100"}),r("path",{class:"inner-track",d:Ls,pathLength:"100"}),r("path",{class:Z(["integrity",o.value.tone]),d:Ls,pathLength:"100",style:Te({strokeDasharray:o.value.integrity+" 100"})},null,6)],64)):R("",!0)])),r("div",Im,[r("span",Rm,m(o.value.speed),1),o.value.unit?(c(),d("span",Dm,m(o.value.unit),1)):R("",!0)]),r("span",{class:Z(["gear",f.value]),"data-augmented-ui":"tr-clip border"},m(o.value.gear),3)]),r("div",Nm,[o.value.integrity>=0?(c(),d("span",{key:0,class:Z(["integrity-row",o.value.tone])},[r("span",Pm,m(o.value.integrityLabel),1),r("b",null,m(Math.round(o.value.integrity))+"%",1)],2)):R("",!0),o.value.fuel>=0?(c(),d("span",{key:1,class:Z(["fuel-row",o.value.fuelTone])},[r("span",Hm,m(o.value.fuelLabel),1),r("span",Fm,[r("span",{class:"fuel-fill",style:Te({width:o.value.fuel+"%"})},null,4)]),r("b",null,m(Math.round(o.value.fuel))+"%",1)],2)):R("",!0),o.value.airborne?(c(),d("span",Bm,[w[0]||(w[0]=r("span",{class:"chip-icon"},"!",-1)),r("span",Vm,m(o.value.airborne),1)])):R("",!0)])],2))}}),zm=Fe(Wm,[["__scopeId","data-v-2ebf6666"]]),Zm={health:["M8 13.5S2 10 2 6.2A3.2 3.2 0 0 1 8 4.6 3.2 3.2 0 0 1 14 6.2C14 10 8 13.5 8 13.5Z"],armor:["M8 1.8 13.4 4v4.2c0 3.2-2.4 5.3-5.4 6.2-3-0.9-5.4-3-5.4-6.2V4Z"],stamina:["M9.2 1.6 4.2 8.9h3.4l-.8 5.5 5-7.3H8.4Z"],hunger:["M4.4 1.9v4.6a1.6 1.6 0 0 0 3.2 0V1.9","M6 6.5v7.6","M11.6 1.9c-1 0-1.8 1.6-1.8 3.6s.8 2.6 1.8 2.6Z","M11.6 8.1v6"],thirst:["M8 1.8s4.3 4.6 4.3 7.5A4.3 4.3 0 0 1 8 14.2 4.3 4.3 0 0 1 3.7 9.3C3.7 6.4 8 1.8 8 1.8Z"]};function Gm(e){var t;return(t=wt(Zm,e))!=null?t:[]}const qm=["aria-valuenow","aria-label"],Ym={class:"glyph","aria-hidden":"true"},Xm={key:0,viewBox:"0 0 16 16","aria-hidden":"true"},Jm=["d"],Qm={class:"track","data-augmented-ui":"tr-clip border"},eg={class:"bar"},tg={class:"readout"},ng=He({__name:"HudVitals",props:{segments:{default:10},width:{default:210}},setup(e){const{t}=nt(),n=["neutral","health","warn","bad"],s=rt([]);function o(u){const p=x(u,"neutral");return n.indexOf(p)===-1?"neutral":p}function l(u){return Math.max(0,Math.min(100,u))/100}function i(u){return Math.round(Math.max(0,Math.min(100,u)))}function a(u){return u.points===null?i(u.value):u.points}return ge("opx:hud:vitals",u=>{s.value=Ge(u.gauges).filter(p=>x(p.id)!=="").map(p=>({id:x(p.id),icon:Gm(x(p.icon)),label:x(p.label),value:Q(p.pct),points:p.points===void 0||p.points===null?null:Q(p.points),tone:o(p.tone)}))}),(u,p)=>(c(),d("div",{class:"vitals",style:Te({"--vitals-width":e.width+"px","--segs":e.segments})},[(c(!0),d(ne,null,ve(s.value,f=>(c(),d("div",{key:f.id,class:Z(["gauge",f.tone]),role:"meter","aria-valuenow":i(f.value),"aria-valuemin":0,"aria-valuemax":100,"aria-label":M(t)(f.label)},[r("span",Ym,[f.icon.length?(c(),d("svg",Xm,[(c(!0),d(ne,null,ve(f.icon,(h,w)=>(c(),d("path",{key:w,d:h},null,8,Jm))),128))])):R("",!0)]),r("span",Qm,[r("span",eg,[r("span",{class:"fill",style:Te({transform:`scaleX(${l(f.value)})`})},null,4)])]),r("span",tg,m(a(f)),1)],10,qm))),128))],4))}}),og=Fe(ng,[["__scopeId","data-v-3e3bc200"]]),sg={class:"panel"},lg={class:"inner"},ig={class:"head"},ag={key:0,class:"caption op-truncate"},rg=["aria-valuenow"],ug={class:"meter"},cg={key:0,class:"reach"},dg={key:0,class:"mode"},fg={key:1,class:"distance"},vg={key:1,class:"pips"},pg={key:2,class:"keys"},hg={key:0,class:"cap","data-augmented-ui":"tr-clip border"},mg={key:1,class:"cap quiet","data-augmented-ui":"tr-clip border"},gg={key:3,class:"rx","data-augmented-ui":"tr-clip border"},bg=He({__name:"HudVoice",props:{segments:{default:8}},setup(e){const{t}=nt(),n=["idle","detected","talking","muted","offline"],o=rt({active:!1,state:"offline",caption:"",mode:"",distance:"",level:0,count:0,index:0,key:"",activation:"",heard:0});ge("opx:hud:voice",i=>{if(i.active!==!0){o.value={...o.value,active:!1};return}const a=x(i.state,"offline"),u=Math.max(0,Math.min(8,Math.round(Q(i.count))));o.value={active:!0,state:n.indexOf(a)===-1?"offline":a,caption:t(x(i.caption)),mode:t(x(i.mode)),distance:x(i.distance),level:Math.max(0,Math.min(100,Q(i.level))),count:u,index:Math.max(0,Math.min(u,Math.round(Q(i.index)))),key:x(i.key),activation:x(i.activation),heard:Math.max(0,Math.round(Q(i.heard)))}});function l(i){return Math.max(0,Math.min(100,i))/100}return(i,a)=>(c(),d("div",{class:Z(["voice",[o.value.state,{live:o.value.active}]]),style:Te({"--voice-lift":M(Gs).bottomRight+"px"})},[r("section",sg,[r("div",lg,[r("div",ig,[a[0]||(a[0]=Da('',1)),o.value.caption?(c(),d("span",ag,m(o.value.caption),1)):R("",!0)]),r("span",{class:"track",style:Te({"--segs":e.segments}),role:"meter","aria-label":"voice","aria-valuenow":Math.round(o.value.level),"aria-valuemin":0,"aria-valuemax":100},[r("span",ug,[r("span",{class:"fill",style:Te({transform:`translateY(${(1-l(o.value.level))*100}%)`})},null,4)])],12,rg),o.value.mode||o.value.distance?(c(),d("div",cg,[o.value.mode?(c(),d("span",dg,m(o.value.mode),1)):R("",!0),o.value.distance?(c(),d("span",fg,m(o.value.distance),1)):R("",!0)])):R("",!0),o.value.count>0?(c(),d("div",vg,[(c(!0),d(ne,null,ve(o.value.count,u=>(c(),d("i",{key:u,class:Z(["pip",{on:u<=o.value.index}])},null,2))),128))])):R("",!0),o.value.key||o.value.activation?(c(),d("div",pg,[o.value.key?(c(),d("kbd",hg,m(o.value.key),1)):R("",!0),o.value.activation?(c(),d("kbd",mg,m(o.value.activation),1)):R("",!0)])):R("",!0),o.value.heard>0?(c(),d("span",gg,[a[1]||(a[1]=r("span",{class:"rx-icon"},"RX",-1)),r("span",null,m(o.value.heard),1)])):R("",!0)])])],6))}}),_g=Fe(bg,[["__scopeId","data-v-7157fb52"]]),yg={key:0,class:"weapons"},kg={class:"op-label"},wg={class:"rounds"},$g={key:0,class:"op-label"},xg={key:1,class:"reserve"},Mg=He({__name:"HudWeapons",setup(e){const t=rt([]),{t:n}=nt();return ge("opx:hud:weapons",s=>{t.value=kt(Oe(s).hands).slice(0,2).map(o=>{const l=Oe(o);return{hand:x(l.hand),magazine:Q(l.magazine),capacity:Q(l.capacity),reserve:Q(l.reserve),ammoId:x(l.ammoId),reloading:De(l.reloading)}})}),(s,o)=>t.value.length?(c(),d("div",yg,[(c(!0),d(ne,null,ve(t.value,(l,i)=>{var a;return c(),d("div",{key:l.hand,class:"hand"},[r("span",kg,m(M(n)(`inventory.ui.${l.hand==="left"?"leftHandLabel":"rightHand"}`)),1),r("span",wg,[Ft(m(l.magazine),1),r("small",null," / "+m(l.capacity),1)]),l.reloading?(c(),d("span",$g,m(M(n)("inventory.ui.reloading")),1)):i===0||l.ammoId!==((a=t.value[0])==null?void 0:a.ammoId)?(c(),d("span",xg," + "+m(l.reserve),1)):R("",!0)])}),128))])):R("",!0)}}),Cg=Fe(Mg,[["__scopeId","data-v-f96d277e"]]),Sg=He({__name:"HudRoot",setup(e){const t={anchor:"bottom-left",infoAnchor:"top-right",statusAnchor:"bottom-left",statusOffset:120,vehicleAnchor:"bottom-center",width:210,segments:10,voiceSegments:8},n=rt(t),s=C(!0);return ge("opx:hud:config",o=>{const l=xo(o.anchor,t.anchor),i=Math.round(Q(o.segments,t.segments)),a=Math.round(Q(o.voiceSegments,t.voiceSegments)),u=Q(o.width,t.width),p=Q(o.statusOffset,t.statusOffset);n.value={anchor:l,infoAnchor:xo(o.infoAnchor,t.infoAnchor),statusAnchor:xo(o.statusAnchor,l),statusOffset:p>=0?Math.round(p):t.statusOffset,vehicleAnchor:xo(o.vehicleAnchor,t.vehicleAnchor),width:u>0?Math.round(u):t.width,segments:i>=2?i:t.segments,voiceSegments:a>=2?a:t.voiceSegments}}),ge("opx:hud:show",o=>{s.value=o.visible!==!1}),Lt(()=>{xe("opx:hud:ready",{})}),(o,l)=>(c(),d("div",{class:Z(["hud",{open:s.value}])},[r("div",{class:Z(["at",n.value.anchor])},[Xe(og,{segments:n.value.segments,width:n.value.width},null,8,["segments","width"])],2),r("div",{class:Z(["at",n.value.infoAnchor])},[Xe(ym,{anchor:n.value.infoAnchor},null,8,["anchor"])],2),r("div",{class:Z(["at",n.value.statusAnchor]),style:Te({"--block-offset":n.value.statusOffset+"px"})},[Xe(Am)],6),r("div",{class:Z(["at",n.value.vehicleAnchor])},[Xe(zm)],2),Xe(_g,{segments:n.value.voiceSegments},null,8,["segments"]),Xe(Cg)],2))}}),Tg=Fe(Sg,[["__scopeId","data-v-5d56b870"]]),Eg="opx:reply",Ag=5e3;class bl extends Error{constructor(t){super(t),this.name="BridgeError",this.localeKey=t}}const Go=new Map;let _i=0,tr="ui",yi=!1;function Lg(e){tr=e}function Og(){yi||(yi=!0,In(Eg,e=>{const t=x(e.ref),n=Go.get(t);if(n){if(Go.delete(t),clearTimeout(n.timer),e.ok===!1){n.reject(new bl(x(e.error,"error.rpc_failed")));return}n.resolve(Oe(e.data))}}))}function Ig(e,t={},n={}){Og(),_i+=1;const s=`${tr}:${_i}`,o=Q(n.timeoutMs,Ag);return new Promise((l,i)=>{const a=setTimeout(()=>{Go.delete(s),et(`no reply on ${e} after ${o}ms`,"rpc timeout"),i(new bl("error.rpc_timeout"))},o);Go.set(s,{resolve:l,reject:i,timer:a,channel:e}),xe(e,{...t,ref:s})})}const nr=rt(Object.create(null));let Os=-1,Mo=0,Co=new Map;function Rg(e){if(!e||typeof e!="object")return;const t=e,n=t.revision,s=t.index,o=t.total;if(typeof n!="number"||!Number.isSafeInteger(n)||n6250||!Array.isArray(t.entries)||t.entries.length>8)return;const l=[];for(const a of t.entries){if(!a||typeof a!="object")continue;const{name:u,url:p}=a;if(!(typeof u!="string"||u.length>192||typeof p!="string"||p.length>1024||!/^[A-Za-z0-9_.-]+(?:\/[A-Za-z0-9_.-]+)*$/.test(u)||u.split("/").some(f=>f==="."||f==="..")))try{const f=new URL(p);f.protocol==="https:"&&!f.username&&!f.password&&l.push({name:u,url:p})}catch{}}if(n!==Os&&(Os=n,Mo=o,Co=new Map),o!==Mo||(Co.set(s,l),Co.size!==Mo))return;const i=Object.create(null);for(let a=1;a<=Mo;a++)for(const u of Co.get(a)||[])i[u.name]=u.url;nr.value=i}function _l(e,t){const n=t||`${e}.png`;return nr.value[n]||""}function Dg(e,t){return _l(e,t&&t.image?t.image:"")}function yl(e){const t=e.trim().split(/\s+/).filter(Boolean);return t.length===0?"?":t.length===1?t[0].slice(0,2).toUpperCase():(t[0][0]+t[1][0]).toUpperCase()}function or(e,t,n){const s=e.metadata.label;if(typeof s=="string"&&s)return s;const o=t?t.label:"";return o||e.name||n}function sr(e,t,n){return(t?t.weight:n)*e.count}function No(e,t){const n=t.labels.kg||"kg",s=t.labels.g||"g";if(e<1e3)return`${Math.round(e)}${s}`;const o=e/1e3,l=o>=100?Math.round(o):Math.round(o*10)/10;return`${String(l).replace(".",t.labels.decimal||".")}${n}`}function ki(e,t){return t<=0?0:Math.max(0,Math.min(100,e/t*100))}function lr(e){const t=e.metadata.durability;return typeof t!="number"||!Number.isFinite(t)?-1:Math.max(0,Math.min(1,t>1?t/100:t))}function ir(e){const t=e.metadata.ammo;return typeof t!="number"||!Number.isFinite(t)?-1:Math.max(0,Math.round(t))}function Ng(e){const t=e.metadata.serial;return typeof t=="string"?t:""}const Pg=["data-augmented-ui","data-slot"],Hg={key:0,class:"key"},Fg={class:"art"},Bg=["src"],Vg={key:1,class:"initials"},jg={key:0,class:"count"},Ug={key:1,class:"rounds"},Kg={class:"foot"},Wg={class:"name op-truncate"},zg={class:"mass"},Zg=He({__name:"InventorySlot",props:{index:{},stack:{},entry:{},config:{},hotkey:{},selected:{type:Boolean},over:{type:Boolean},dragging:{type:Boolean},muted:{type:Boolean},broken:{}},emits:["grab","open","hover","broke"],setup(e,{emit:t}){const n=e,s=t,o=J(()=>n.stack?or(n.stack,n.entry,n.config.labels.unknown||"?"):""),l=J(()=>n.stack?Dg(n.stack.name,n.entry):""),i=J(()=>n.stack?No(sr(n.stack,n.entry,n.config.defaultWeight),n.config):""),a=J(()=>n.stack?ir(n.stack):-1),u=J(()=>n.stack?lr(n.stack):-1),p=J(()=>u.value<0?"":u.value<.25?"spent":u.value<.6?"worn":"");function f(){n.stack&&s("broke",n.stack.name)}const h=J(()=>n.stack!==null&&l.value!==""&&!n.broken.has(n.stack.name));return(w,k)=>{var F;return c(),d("div",{class:Z(["cell",{filled:e.stack!==null,selected:e.selected,over:e.over,dragging:e.dragging,muted:e.muted,weapon:((F=e.entry)==null?void 0:F.weapon)===!0}]),"data-augmented-ui":e.dragging?void 0:"tr-clip border","data-slot":e.index,onPointerdown:k[0]||(k[0]=_t(A=>e.stack&&s("grab",e.index,A),["prevent"])),onContextmenu:k[1]||(k[1]=_t(A=>e.stack&&s("open",e.index,A),["prevent"])),onMouseenter:k[2]||(k[2]=A=>s("hover",e.index,A)),onMouseleave:k[3]||(k[3]=A=>s("hover",null))},[e.hotkey?(c(),d("span",Hg,m(e.hotkey),1)):R("",!0),e.stack?(c(),d(ne,{key:1},[r("span",Fg,[h.value?(c(),d("img",{key:0,src:l.value,alt:"",draggable:"false",onError:f},null,40,Bg)):(c(),d("span",Vg,m(M(yl)(o.value)),1))]),e.stack.count>1?(c(),d("span",jg,m(e.stack.count),1)):R("",!0),a.value>=0?(c(),d("span",Ug,m(a.value),1)):R("",!0),u.value>=0?(c(),d("span",{key:2,class:Z(["wear",p.value])},[r("i",{style:Te({width:`${u.value*100}%`})},null,4)],2)):R("",!0),r("span",Kg,[r("span",Wg,m(o.value),1),r("span",zg,m(i.value),1)])],64)):R("",!0)],42,Pg)}}}),Gg=Fe(Zg,[["__scopeId","data-v-37cf626a"]]),$n=90,Rn=10,Dn=5,qs=7,kl=5,Ys=Dn*$n+(Dn-1)*Rn+kl*2,qg=qs*$n+(qs-1)*Rn+kl*2,wi=2,Yg=He({__name:"InventoryGrid",props:{container:{},catalog:{},config:{},categories:{},hotbar:{},selected:{},over:{},dragging:{},broken:{}},emits:["grab","open","hover","broke"],setup(e,{emit:t}){const n=e,s=t,o=C(null),l=C(0);function i(){var T,L;l.value=(L=(T=o.value)==null?void 0:T.scrollTop)!=null?L:0}Lt(()=>{var T,L;l.value=(L=(T=o.value)==null?void 0:T.scrollTop)!=null?L:0}),ls(()=>{l.value=0}),bt(()=>n.container.id,()=>{o.value&&(o.value.scrollTop=0),l.value=0});const a=J(()=>Math.ceil(n.container.slots/Dn)),u=J(()=>Math.max(0,Math.floor(l.value/($n+Rn))-wi)),p=J(()=>{const T=qs+wi*2;return Math.min(a.value,u.value+T)}),f=J(()=>new Set(n.categories)),h=J(()=>{var D;const T=[],L=u.value*Dn+1,E=Math.min(n.container.slots,p.value*Dn),H=f.value;for(let N=L;N<=E;N+=1){const q=(D=n.container.bySlot.get(N))!=null?D:null,W=q?n.catalog.get(q.name):void 0;T.push({index:N,stack:q,entry:W,muted:q!==null&&H.size>0&&!H.has(W?W.category:"misc")})}return T}),w=J(()=>u.value*($n+Rn)),k=J(()=>Math.max(0,(a.value-p.value)*($n+Rn))),F=J(()=>({width:`${Ys}px`,height:`${qg}px`,padding:`${kl}px`})),A=J(()=>({gridTemplateColumns:`repeat(${Dn}, ${$n}px)`,gridAutoRows:`${$n}px`,gap:`${Rn}px`}));return(T,L)=>(c(),d("div",{ref_key:"viewport",ref:o,class:"viewport",style:Te(F.value),onScrollPassive:i},[r("div",{style:Te({height:`${w.value}px`})},null,4),r("div",{class:"grid",style:Te(A.value)},[(c(!0),d(ne,null,ve(h.value,E=>{var H;return c(),pt(Gg,{key:E.index,index:E.index,stack:E.stack,entry:E.entry,config:e.config,hotkey:(H=e.hotbar[E.index-1])!=null?H:"",selected:e.selected===E.index,over:e.over===E.index,dragging:e.dragging===E.index,muted:E.muted,broken:e.broken,onGrab:L[0]||(L[0]=(D,N)=>s("grab",D,N)),onOpen:L[1]||(L[1]=(D,N)=>s("open",D,N)),onHover:L[2]||(L[2]=(D,N)=>s("hover",D,N)),onBroke:L[3]||(L[3]=D=>s("broke",D))},null,8,["index","stack","entry","config","hotkey","selected","over","dragging","muted","broken"])}),128))],4),r("div",{style:Te({height:`${k.value}px`})},null,4)],36))}}),$i=Fe(Yg,[["__scopeId","data-v-b7db5a52"]]);function Xg(e){const t=Oe(e),n=Q(t.slot,0);return n<=0?null:{slot:n,name:x(t.name),count:Q(t.count,0),metadata:Oe(t.metadata)}}function So(e){const t=Oe(e);if(t.id===void 0)return null;const n=new Map;for(const s of kt(t.items)){const o=Xg(s);o&&n.set(o.slot,o)}return{id:Q(t.id,0),kind:x(t.kind),title:x(t.title),slots:Math.max(0,Q(t.slots,0)),maxWeight:Q(t.maxWeight,0),weight:Q(t.weight,0),bySlot:n}}function Jg(e){const t=Oe(e);return{label:x(t.label),description:x(t.description),weight:Q(t.weight,0),image:x(t.image),usable:De(t.usable),stackable:De(t.stackable,!0),droppable:De(t.droppable,!0),category:x(t.category,"misc"),weapon:De(t.weapon),ammo:De(t.ammo)}}function Qg(e){var o;const t=Oe(e),n={},s=Oe(t.labels);for(const l of Object.keys(s))l!=="tabs"&&(n[l]=x(s[l],l));return{labels:n,hotbar:kt((o=s.hotbar)!=null?o:t.hotbar).map(l=>x(l)),openKey:x(t.openKey),drops:De(t.drops),defaultWeight:Q(t.defaultWeight,0)}}function e0(e){const t=Oe(e);return Ge(t.tabs).map(n=>({key:x(n.key),label:x(n.label),categories:kt(n.categories).map(s=>x(s)),rest:De(n.rest)}))}function t0(e){return Ge(e).map(t=>({id:Q(t.id,0),distance:Q(t.distance,0),side:x(t.side)})).filter(t=>t.id>0)}const n0={key:0,class:"screen"},o0=["data-container"],s0={class:"head"},l0={class:"head-text"},i0={class:"eyebrow"},a0={class:"op-truncate"},r0={key:0,class:"cap","data-augmented-ui":"tr-clip border"},u0={key:0,class:"tabs"},c0=["onClick"],d0={class:"meter"},f0={class:"cap-mono"},v0={class:"figure"},p0={class:"figure quiet"},h0={class:"foot"},m0=["disabled"],g0=["disabled"],b0=["data-container"],_0={class:"head"},y0={class:"head-text"},k0={class:"eyebrow"},w0={class:"op-truncate"},$0={class:"meter"},x0={class:"cap-mono"},M0={class:"figure"},C0={class:"figure quiet"},S0={class:"foot"},T0=["disabled"],E0=["data-ground"],A0={class:"ground-word"},L0={key:0,class:"ground-hint"},O0={key:1,class:"status"},I0={key:0,class:"told"},R0={class:"told-top"},D0={class:"told-name"},N0={key:0,class:"told-times"},P0={key:0,class:"prose"},H0={class:"fact"},F0={class:"cap-mono"},B0={class:"value op-value op-truncate"},V0={key:1,class:"fact"},j0={class:"cap-mono"},U0={class:"value op-value op-truncate"},K0={key:2,class:"fact"},W0={class:"cap-mono"},z0={class:"value op-value op-truncate"},Z0={key:3,class:"meter stack"},G0={class:"cap-mono"},q0={class:"list"},Y0=["disabled"],X0=["disabled"],J0=["disabled"],Q0=["disabled"],e1={class:"sep op-eyebrow"},t1=["disabled","onClick"],n1={class:"row-label op-truncate"},o1={class:"row-value op-value"},s1={key:0,class:"sep op-eyebrow"},l1={class:"dialog"},i1={class:"head"},a1={class:"stepper"},r1={class:"count"},u1={class:"hint"},c1={class:"foot"},d1=16e3,f1=200,v1=He({__name:"InventoryView",setup(e){const t=C(null),n=C(!1),s=C({labels:{},hotbar:[],openKey:"",drops:!1,defaultWeight:0}),o=C([]),l=rt(null),i=rt(null),a=rt(new Map);let u=null;const p=C([]),f=mt(new Set),h=C(""),w=C(!1),k=C(""),F=mt({container:0,slot:0,x:0,y:0}),A=mt({container:0,slot:0,overContainer:0,overSlot:0,overGround:!1,active:!1}),T=mt({container:0,slot:0,x:0,y:0,open:!1}),L=mt({container:0,slot:0,count:1,max:1,open:!1,mode:"split",target:0});let E,H=!1;const D=[];function N(y,v=""){return s.value.labels[y]||v}function q(){L.open?L.open=!1:T.open?oe():it()}function W(y){return t.value!==null&&y.handle===t.value}function B(y,v={}){t.value!==null&&xe("opx:inventory:request",{handle:t.value,action:y,payload:v})}let I=0;async function O(y,v={}){if(t.value===null||w.value)return null;const b=I;w.value=!0,k.value="";try{return await Ig("opx:inventory:request",{handle:t.value,action:y,payload:v},{timeoutMs:d1})}catch(G){const ce=G instanceof bl?G.localeKey:"",Le=ce==="error.rpc_timeout"||ce==="timeout";return b===I&&(Le||(ce===""||ce==="error.rpc_failed"))&&(k.value=N(Le?"timeout":"failed")),null}finally{b===I&&(w.value=!1)}}const K=J(()=>o.value.length===0?"":o.value.some(y=>y.key===h.value)?h.value:o.value[0].key),V=J(()=>{const y=o.value.find(G=>G.key===K.value);if(!y)return[];if(!y.rest)return y.categories;const v=new Set;for(const G of o.value)if(!G.rest)for(const ce of G.categories)v.add(ce);const b=new Set;for(const G of a.value.values())v.has(G.category)||b.add(G.category);return b.add("misc"),Array.from(b)});function be(y){return l.value&&l.value.id===y?l.value:i.value&&i.value.id===y?i.value:null}function de(y,v){var G;const b=be(y);return b&&(G=b.bySlot.get(v))!=null?G:null}const se=J(()=>{if(A.active||!T.open)return null;const y=de(T.container,T.slot);if(!y)return null;const v=a.value.get(y.name);return{stack:y,entry:v,label:or(y,v,N("unknown","?")),description:v?v.description:"",weight:No(sr(y,v,s.value.defaultWeight),s.value),ammo:ir(y),serial:Ng(y),wear:lr(y)}});function ie(y,v){return y?y.title?y.title:N(y.kind,N(v)):N(v)}const fe=J(()=>l.value?ki(l.value.weight,l.value.maxWeight):0),re=J(()=>i.value?ki(i.value.weight,i.value.maxWeight):0);function ee(y){return y?`${No(y.weight,s.value)} / ${No(y.maxWeight,s.value)}`:""}function te(y){return y>=95?"full":y>=75?"high":""}function $e(y){return y?`${String(y.bySlot.size).padStart(2,"0")}/${String(y.slots).padStart(2,"0")}`:""}const Me=C(null),Ne=C(1);let Re=null;function qe(){const y=Me.value;if(!y)return;const v=y.offsetWidth||1,b=y.offsetHeight||1,G=Math.max(.72,Math.min(1.5,window.innerHeight/1080));Ne.value=Math.min(G,window.innerWidth*.92/v,window.innerHeight*.9/b)}const Ze=C(null),le=mt({left:0,top:0});function Ce(){const y=Ze.value;if(!y)return;const v=y.offsetWidth||f1,b=y.offsetHeight;let G=T.x+14,ce=T.y+14;G+v>window.innerWidth-8&&(G=T.x-14-v),ce+b>window.innerHeight-8&&(ce=T.y-14-b),le.left=Math.max(8,Math.min(G,window.innerWidth-8-v)),le.top=Math.max(8,Math.min(ce,window.innerHeight-8-b))}function S(y,v){const b=document.elementFromPoint(y,v);if(!b)return null;const G=b.closest("[data-slot]");if(!G)return null;const ce=G.closest("[data-container]");if(!ce)return null;const Le=Number(G.getAttribute("data-slot")),me=Number(ce.getAttribute("data-container"));return!Number.isFinite(Le)||!Number.isFinite(me)?null:{container:me,slot:Le}}function pe(y,v){const b=document.elementFromPoint(y,v);return b!==null&&b.closest("[data-ground]")!==null}function _e(y){if(!A.active)return;const v=S(y.clientX,y.clientY);A.overContainer=v?v.container:0,A.overSlot=v?v.slot:0,A.overGround=v===null&&pe(y.clientX,y.clientY)}function g(){A.active=!1,A.container=0,A.slot=0,A.overContainer=0,A.overSlot=0,A.overGround=!1}function $(y){if(!A.active)return;const v=S(y.clientX,y.clientY),b=v===null&&pe(y.clientX,y.clientY),G={container:A.container,slot:A.slot},ce=l.value!==null&&G.container===l.value.id;if(g(),j(),b){ce&&O("drop",{slot:G.slot});return}v&&(v.container===G.container&&v.slot===G.slot||O("move",{from:G.container,fromSlot:G.slot,to:v.container,toSlot:v.slot}))}function _(){g(),j()}function P(){H||(H=!0,window.addEventListener("pointermove",_e),window.addEventListener("pointerup",$),window.addEventListener("pointercancel",_),window.addEventListener("blur",_))}function j(){H&&(H=!1,window.removeEventListener("pointermove",_e),window.removeEventListener("pointerup",$),window.removeEventListener("pointercancel",_),window.removeEventListener("blur",_))}function Y(y,v,b){w.value||b.button!==0||(oe(),A.active=!0,A.container=y,A.slot=v,A.overContainer=y,A.overSlot=v,P())}function ue(y,v,b){F.container=v===null?0:y,F.slot=v!=null?v:0,b&&(F.x=b.clientX,F.y=b.clientY)}function ae(y,v,b){var ce;de(y,v)&&(T.container=y,T.slot=v,T.x=b.clientX,T.y=b.clientY,T.open=!0,y===((ce=l.value)==null?void 0:ce.id)&&B("nearby"),le.left=b.clientX+14,le.top=b.clientY+14)}function oe(){T.open=!1}const X=J(()=>T.open?de(T.container,T.slot):null),we=J(()=>{const y=X.value;return y?a.value.get(y.name):void 0}),he=J(()=>{var y;return T.container!==0&&T.container===((y=l.value)==null?void 0:y.id)});function ke(y){const v=T.slot;oe(),O("use",{slot:v,hand:y})}function Se(y){const b=`${y.distance.toFixed(1).replace(".",N("decimal","."))} ${N("m","m")}`,G={ahead:"sideAhead",behind:"sideBehind",left:"sideLeft",right:"sideRight"},ce=G[y.side]?N(G[y.side]):"";return ce?`${ce} · ${b}`:b}function Ee(y,v){const b=X.value;return!b||b.count<2?!1:(L.container=T.container,L.slot=T.slot,L.max=b.count,L.count=1,L.mode=y,L.target=v,L.open=!0,oe(),!0)}function ye(){if(Ee("drop",0))return;const y=T.slot;oe(),O("drop",{slot:y})}function Pe(y){if(Ee("give",y))return;const v=T.slot;oe(),O("give",{target:y,slot:v})}function Ue(){const y=X.value;!y||y.count<2||(L.container=T.container,L.slot=T.slot,L.max=y.count-1,L.count=Math.max(1,Math.floor(y.count/2)),L.mode="split",L.target=0,L.open=!0,oe())}function Ye(){const{container:y,slot:v,count:b,mode:G,target:ce}=L;L.open=!1,G==="give"?O("give",{target:ce,slot:v,count:b}):G==="drop"?O("drop",{slot:v,count:b}):O("split",{container:y,slot:v,count:b})}const ft=J(()=>L.mode==="give"?N("giveHowMany"):L.mode==="drop"?N("dropHowMany"):N("split")),ut=J(()=>L.mode==="give"?N("give"):L.mode==="drop"?N("drop"):N("split"));function Tt(y){L.count=Math.max(1,Math.min(L.max,L.count+y))}function Ot(y,v){O("sort",{container:y,mode:v})}function tt(){O("closeSecondary")}function it(){xe("opx:inventory:dismiss",{handle:t.value})}function Ut(y){s.value=Qg(y);const v=e0(Oe(y).labels);v.length>0&&(o.value=v)}function U(){I+=1,n.value=!1,l.value=null,i.value=null,p.value=[],k.value="",w.value=!1,g(),j(),oe(),L.open=!1,F.container=0,F.slot=0}ge("opx:inventory:config",y=>{Ie("inventory:config",()=>Ut(y),void 0)}),ge("opx:inventory:catalog",y=>{Ie("inventory:catalog",()=>{(De(y.first)||u===null)&&(u=new Map);const v=Oe(y.entries);for(const b of Object.keys(v))u.set(b,Jg(v[b]));De(y.done)&&(a.value=u,u=null)},void 0)}),ge("opx:inventory:open",y=>{Ie("inventory:open",()=>{const v=y.handle;typeof v!="string"||v===""||(E==null||E(),U(),t.value=v,Ut(y.config),l.value=So(y.primary),i.value=y.secondary===!1?null:So(y.secondary),h.value=o.value.length>0?o.value[0].key:"",n.value=!0,E=Pt({id:"inventory",onEscape:q}),B("nearby"))},void 0)}),ge("opx:inventory:update",y=>{Ie("inventory:update",()=>{if(!W(y))return;const v=So(y.container);v&&(l.value&&v.id===l.value.id?l.value=v:i.value&&v.id===i.value.id&&(i.value=v))},void 0)}),ge("opx:inventory:secondary",y=>{Ie("inventory:secondary",()=>{W(y)&&(i.value=y.container===!1?null:So(y.container))},void 0)}),ge("opx:inventory:nearby",y=>{Ie("inventory:nearby",()=>{W(y)&&(p.value=t0(y.players))},void 0)}),ge("opx:inventory:close",y=>{Ie("inventory:close",()=>{y.handle!==void 0&&!W(y)||(t.value=null,U(),E==null||E(),E=void 0)},void 0)}),Lt(()=>{typeof ResizeObserver=="function"&&(Re=new ResizeObserver(qe)),window.addEventListener("resize",qe)}),bt(n,y=>{st(()=>{y&&Me.value?(Re==null||Re.observe(Me.value),qe()):Re==null||Re.disconnect()})}),bt([()=>T.open,()=>T.container,()=>T.slot,()=>T.x,()=>T.y],()=>{st(Ce)}),lt(()=>{I+=1,j(),Re==null||Re.disconnect(),Re=null,window.removeEventListener("resize",qe),E==null||E()});try{xe("opx:inventory:ready",{})}catch(y){et(y,"inventory:ready")}return(y,v)=>{var b,G,ce,Le;return c(),d("div",{class:Z(["room",{open:n.value,dragging:A.active}])},[n.value?(c(),d("div",n0,[r("div",{ref_key:"frame",ref:Me,class:"frame",style:Te({transform:`scale(${Ne.value})`})},[r("section",{class:"panel lead",style:Te({width:`${M(Ys)}px`}),"data-container":l.value?l.value.id:0},[r("header",s0,[r("div",l0,[r("span",i0,m(N("bag")),1),r("h1",a0,m(ie(l.value,"bag")),1)]),s.value.openKey?(c(),d("kbd",r0,m(s.value.openKey),1)):R("",!0)]),o.value.length?(c(),d("nav",u0,[(c(!0),d(ne,null,ve(o.value,me=>(c(),d("button",{key:me.key,type:"button",class:Z(["tab",{on:me.key===K.value}]),"data-augmented-ui":"tr-clip border",onClick:z=>h.value=me.key},m(me.label),11,c0))),128))])):R("",!0),r("div",d0,[r("span",f0,m(N("weight")),1),r("span",{class:Z(["rule",te(fe.value)])},[r("i",{style:Te({width:`${fe.value}%`})},null,4)],2),r("span",v0,m(ee(l.value)),1),r("span",p0,m($e(l.value)),1)]),l.value?(c(),pt($i,{key:1,container:l.value,catalog:a.value,config:s.value,categories:V.value,hotbar:s.value.hotbar,selected:0,over:A.overContainer===l.value.id?A.overSlot:0,dragging:A.container===l.value.id?A.slot:0,broken:f,onGrab:v[0]||(v[0]=(me,z)=>Y(l.value.id,me,z)),onOpen:v[1]||(v[1]=(me,z)=>ae(l.value.id,me,z)),onHover:v[2]||(v[2]=(me,z)=>ue(l.value.id,me,z)),onBroke:v[3]||(v[3]=me=>f.add(me))},null,8,["container","catalog","config","categories","hotbar","over","dragging","broken"])):R("",!0),r("footer",h0,[r("button",{type:"button",class:Z(["row op-label grow",{off:!l.value||w.value}]),"data-augmented-ui":"tr-clip border",disabled:!l.value||w.value,onClick:v[4]||(v[4]=me=>l.value&&Ot(l.value.id,"weight"))},m(N("sortWeight")),11,m0),r("button",{type:"button",class:Z(["row op-label grow",{off:!l.value||w.value}]),"data-augmented-ui":"tr-clip border",disabled:!l.value||w.value,onClick:v[5]||(v[5]=me=>l.value&&Ot(l.value.id,"name"))},m(N("sortName")),11,g0),r("button",{type:"button",class:"row op-label grow","data-augmented-ui":"tr-clip border",onClick:it},m(N("close")),1)])],12,o0),r("section",{class:"panel trail",style:Te({width:`${M(Ys)}px`}),"data-container":i.value?i.value.id:0},[i.value?(c(),d(ne,{key:0},[r("header",_0,[r("div",y0,[r("span",k0,m(N(i.value.kind==="drop"?"ground":i.value.kind)),1),r("h1",w0,m(ie(i.value,"stash")),1)])]),r("div",$0,[r("span",x0,m(N("weight")),1),r("span",{class:Z(["rule",te(re.value)])},[r("i",{style:Te({width:`${re.value}%`})},null,4)],2),r("span",M0,m(ee(i.value)),1),r("span",C0,m($e(i.value)),1)]),Xe($i,{container:i.value,catalog:a.value,config:s.value,categories:D,hotbar:D,selected:0,over:A.overContainer===i.value.id?A.overSlot:0,dragging:A.container===i.value.id?A.slot:0,broken:f,onGrab:v[6]||(v[6]=(me,z)=>Y(i.value.id,me,z)),onOpen:v[7]||(v[7]=(me,z)=>ae(i.value.id,me,z)),onHover:v[8]||(v[8]=(me,z)=>ue(i.value.id,me,z)),onBroke:v[9]||(v[9]=me=>f.add(me))},null,8,["container","catalog","config","over","dragging","broken"]),r("footer",S0,[r("button",{type:"button",class:Z(["row op-label grow",{off:w.value}]),"data-augmented-ui":"tr-clip border",disabled:w.value,onClick:v[10]||(v[10]=me=>Ot(i.value.id,"weight"))},m(N("sortWeight")),11,T0),r("button",{type:"button",class:"row op-label grow","data-augmented-ui":"tr-clip border",onClick:tt},m(N("close")),1)])],64)):(c(),d("div",{key:1,class:Z(["ground",{over:A.overGround,armed:s.value.drops}]),"data-augmented-ui":"tr-clip bl-clip border","data-ground":s.value.drops?"drop":void 0},[r("span",A0,m(s.value.drops?N("dropZone"):N("ground","")),1),s.value.drops?(c(),d("span",L0,m(N("groundHint","")),1)):R("",!0)],10,E0))],12,b0)],4)])):R("",!0),n.value&&k.value?(c(),d("p",O0,m(k.value),1)):R("",!0),T.open&&X.value?(c(),d("div",{key:2,class:"menu-layer",onPointerdown:_t(oe,["self"])},[r("div",{ref_key:"card",ref:Ze,class:"menu",style:Te({left:`${le.left}px`,top:`${le.top}px`})},[se.value?(c(),d("div",I0,[r("div",R0,[r("span",D0,m(se.value.label),1),se.value.stack.count>1?(c(),d("span",N0,m(se.value.stack.count)+"× ",1)):R("",!0)]),se.value.description?(c(),d("p",P0,m(se.value.description),1)):R("",!0),r("div",H0,[r("span",F0,m(N("weight")),1),r("span",B0,m(se.value.weight),1)]),se.value.ammo>=0?(c(),d("div",V0,[r("span",j0,m(N("ammo")),1),r("span",U0,m(se.value.ammo),1)])):R("",!0),se.value.serial?(c(),d("div",K0,[r("span",W0,m(N("serial")),1),r("span",z0,m(se.value.serial),1)])):R("",!0),se.value.wear>=0?(c(),d("div",Z0,[r("span",G0,m(N("condition")),1),r("span",{class:Z(["rule",se.value.wear<.25?"full":se.value.wear<.6?"high":""])},[r("i",{style:Te({width:`${se.value.wear*100}%`})},null,4)],2)])):R("",!0)])):R("",!0),r("div",q0,[he.value&&((b=we.value)!=null&&b.usable)?(c(),d("button",{key:0,type:"button",class:Z(["row op-label",{off:w.value}]),disabled:w.value,onClick:v[11]||(v[11]=me=>ke())},m(N("use")),11,Y0)):R("",!0),he.value&&((G=we.value)!=null&&G.weapon||(ce=we.value)!=null&&ce.ammo)?(c(),d("button",{key:1,type:"button",class:"row op-label",disabled:w.value,onClick:v[12]||(v[12]=me=>ke("left"))},m(N("leftHand")),9,X0)):R("",!0),X.value.count>1?(c(),d("button",{key:2,type:"button",class:Z(["row op-label",{off:w.value}]),disabled:w.value,onClick:Ue},m(N("split")),11,J0)):R("",!0),he.value&&s.value.drops&&((Le=we.value)==null?void 0:Le.droppable)!==!1?(c(),d("button",{key:3,type:"button",class:Z(["row op-label",{off:w.value}]),disabled:w.value,onClick:ye},m(N("drop")),11,Q0)):R("",!0),he.value?(c(),d(ne,{key:4},[r("div",e1,m(N("giveTo")),1),(c(!0),d(ne,null,ve(p.value,me=>(c(),d("button",{key:me.id,type:"button",class:Z(["row op-label",{off:w.value}]),disabled:w.value,onClick:z=>Pe(me.id)},[r("span",n1,m(Se(me)),1),r("span",o1,"#"+m(me.id),1)],10,t1))),128)),p.value.length?R("",!0):(c(),d("div",s1,m(N("nobody")),1))],64)):R("",!0)])],4)],32)):R("",!0),L.open?(c(),d("div",{key:3,class:"menu-layer",onPointerdown:v[16]||(v[16]=_t(me=>L.open=!1,["self"]))},[r("div",l1,[r("header",i1,[r("h2",null,m(ft.value),1)]),r("div",a1,[r("button",{type:"button",class:"row op-label",onClick:v[13]||(v[13]=me=>Tt(-1))},"−"),r("span",r1,m(L.count),1),r("button",{type:"button",class:"row op-label",onClick:v[14]||(v[14]=me=>Tt(1))},"+")]),r("p",u1,"1 – "+m(L.max),1),r("footer",c1,[r("button",{type:"button",class:"row op-label grow",onClick:v[15]||(v[15]=me=>L.open=!1)},m(N("cancel")),1),r("button",{type:"button",class:"row op-label grow on",onClick:Ye},m(ut.value),1)])])],32)):R("",!0)],2)}}}),p1=Fe(v1,[["__scopeId","data-v-42141f97"]]),cn=mt({hide:!1,cover:!1,video:!0,kind:"unknown",progressKnown:!1,progress:0}),ln=Bn(cn),Is=J(()=>cn.hide);function h1(e){cn.hide=De(e.hide),cn.cover=De(e.cover),cn.video=De(e.video,!0),cn.kind=x(e.kind,"unknown"),cn.progressKnown=De(e.progressKnown);const t=Q(e.progress);cn.progress=Number.isFinite(t)?Math.min(1,Math.max(0,t)):0}const m1={key:0,class:"cover"},g1={class:"dock op-plane op-anchor-left op-ink"},b1={class:"bay op-bay op-arete","data-augmented-ui":"tr-clip bl-clip border"},_1={class:"bay-inner op-interlace"},y1={class:"progress"},k1={class:"bar-line"},w1={class:"bar-phase op-eyebrow op-truncate"},$1={key:0,class:"bar-pct op-value"},x1={class:"bar"},M1={class:"detail op-copy"},C1="loading.webm",xi="loading-poster.jpg",S1=.99,T1=He({__name:"LoadingCover",setup(e){const{t}=nt(),n=J(()=>t(ln.kind==="fastTravel"?"loading.kind.fastTravel":"loading.kind.unknown")),s=J(()=>Math.min(S1,Math.max(0,ln.progress))),o=J(()=>Math.floor(s.value*100));return(l,i)=>(c(),pt(Xu,{name:"cover"},{default:On(()=>[M(ln).cover?(c(),d("div",m1,[r("div",{class:"stage",style:Te({backgroundImage:`url(${xi})`})},[M(ln).video?(c(),d("video",{key:0,class:"film",src:C1,poster:xi,autoplay:"",muted:"",loop:"",playsinline:"",preload:"auto"})):R("",!0),i[0]||(i[0]=r("div",{class:"scrim"},null,-1))],4),r("div",g1,[r("div",b1,[r("div",_1,[i[1]||(i[1]=r("div",{class:"brand"},[r("div",{class:"mark"},[Ft("OPEN"),r("b",null,"//"),Ft("77")]),r("div",{class:"mode op-eyebrow"},"Infinity")],-1)),r("div",y1,[r("div",k1,[r("span",w1,m(n.value),1),M(ln).progressKnown?(c(),d("span",$1,m(o.value)+"%",1)):R("",!0)]),r("div",{class:Z(["track",{busy:!M(ln).progressKnown}]),"data-augmented-ui":"tr-clip border"},[r("span",x1,[r("span",{class:"fill",style:Te(M(ln).progressKnown?{transform:`scaleX(${s.value})`}:void 0)},null,4)])],2),r("p",M1,m(M(ln).progressKnown?M(t)("loading.title"):M(t)("loading.pending")),1)])])])])])):R("",!0)]),_:1}))}}),E1=Fe(T1,[["__scopeId","data-v-2c733559"]]),A1={class:"bay-inner op-interlace"},L1={class:"list"},O1={key:0,class:"sep op-eyebrow"},I1=["aria-disabled","onClick"],R1={class:"glyph","aria-hidden":"true"},D1={key:0,viewBox:"0 0 24 24"},N1=["d"],P1={class:"label op-label op-truncate"},H1={key:0,class:"value op-value op-truncate"},F1=["aria-checked"],B1={key:2,class:"mark"},V1={key:0,class:"foot"},j1={key:0,class:"hint op-copy"},U1=240,K1=He({__name:"MenuView",setup(e){const t={ArrowUp:"up",ArrowDown:"down",ArrowLeft:"left",ArrowRight:"right",Enter:"enter",Backspace:"back"},n={"top-left":"anchor-top-left","top-right":"anchor-top-right",left:"anchor-left",right:"anchor-right",center:"anchor-center"},s=C(0),o=C(null),l=C(!1),i=C(""),a=C([]),u=C(1),p=C(0),f=C("anchor-top-left"),h=C("full"),w=C(!0),k=C(340),F=C(56),A=C(0),T=J(()=>f.value.endsWith("right"));function L(se){return se&&wt(At,se)||[]}const E=J(()=>{const se=`width: ${k.value}px; max-height: ${F.value}vh`;return A.value>0?`${se}; height: ${A.value}px`:se}),H=J(()=>f.value==="anchor-center"?"":T.value?"op-anchor-right":"op-anchor-left");function D(se){return typeof se=="string"||typeof se=="number"}function N(se){return o.value!==null&&se.handle===o.value}function q(se){var ee;f.value=(ee=wt(n,x(se.anchor)))!=null?ee:n["top-left"];const ie=Q(se.width);ie>0&&(k.value=Math.round(ie));const fe=Q(se.maxHeight);fe>0&&(F.value=Math.round(fe));const re=Q(se.height);A.value=re>0?Math.round(re):0}function W(se,ie=!1){i.value=x(se.hint),u.value=Math.max(1,Q(se.first,1)),p.value=Q(se.total);const fe=Ge(se.rows);a.value=fe.map((re,ee)=>{const te=re.rule===!0,$e=x(re.label);return{index:u.value+ee,stagger:ie?ee:0,label:$e,icon:te?"":x(re.icon),value:te?"":x(re.value),mark:re.arrow===!0?">":re.spin===!0?"‹›":"",rule:te,blank:te&&$e==="",off:re.off===!0,on:re.on===!0,checked:re.check===!0&&!te?re.ticked===!0:void 0}})}let B;function I(){B!==void 0&&clearTimeout(B),B=void 0}function O(){l.value=!1,I(),B=setTimeout(()=>{B=void 0,!l.value&&(a.value=[],i.value="",p.value=0)},U1)}let K;function V(se){if(se.key==="Escape"||po()!=="menu")return;const ie=t[se.key];ie!==void 0&&(se.preventDefault(),xe("opx:menu:key",{handle:o.value,key:ie,repeat:se.repeat===!0}))}function be(se){se?window.addEventListener("keydown",V):window.removeEventListener("keydown",V)}ge("opx:menu:open",se=>{Ie("menu:open",()=>{D(se.handle)&&(K==null||K(),K=void 0,be(!1),I(),s.value+=1,o.value=se.handle,q(se),W(se,!0),l.value=!0,h.value=x(se.focus,"full"),w.value=se.closable!==!1,be(h.value==="full"),h.value!=="none"&&(K=Pt({id:"menu",onEscape:w.value?()=>xe("opx:menu:dismiss",{handle:o.value}):()=>{}})))},void 0)}),ge("opx:menu:frame",se=>{Ie("menu:frame",()=>{N(se)&&W(se)},void 0)}),ge("opx:menu:close",se=>{Ie("menu:close",()=>{se.handle!==void 0&&!N(se)||(o.value=null,O(),be(!1),K==null||K(),K=void 0)},void 0)}),lt(()=>{I(),be(!1),K==null||K()});function de(se){se.rule||se.off||xe("opx:menu:choose",{handle:o.value,index:se.index})}return(se,ie)=>(c(),d("div",{class:Z(["strip op-plane op-ink",[f.value,H.value,{open:l.value,end:T.value}]]),style:Te(E.value)},[r("div",{class:Z(["bay op-bay op-arete",{"is-end":T.value}]),"data-augmented-ui":"tr-clip bl-clip border"},[r("div",A1,[r("ul",L1,[(c(!0),d(ne,null,ve(a.value,fe=>(c(),d("li",{key:`${s.value}:${fe.index}`,class:Z(["slot op-enter",{gap:fe.blank}]),style:Te(`--op-slot: ${fe.stagger}`)},[fe.rule&&!fe.blank?(c(),d("div",O1,m(fe.label),1)):fe.blank?R("",!0):(c(),d("div",{key:1,class:Z(["row op-frame",{on:fe.on&&!fe.off,"is-on":fe.on&&!fe.off,"op-lift":fe.on&&!fe.off,"is-off":fe.off}]),role:"button","aria-disabled":fe.off,onClick:re=>de(fe)},[r("span",R1,[L(fe.icon).length?(c(),d("svg",D1,[(c(!0),d(ne,null,ve(L(fe.icon),(re,ee)=>(c(),d("path",{key:ee,d:re},null,8,N1))),128))])):R("",!0)]),r("span",P1,m(fe.label),1),fe.value?(c(),d("span",H1,m(fe.value),1)):R("",!0),fe.checked!==void 0?(c(),d("span",{key:1,class:Z(["check",{ticked:fe.checked}]),role:"checkbox","aria-checked":fe.checked},[...ie[0]||(ie[0]=[r("svg",{viewBox:"0 0 13 13","aria-hidden":"true"},[r("path",{d:"M2.6 6.8 5 9.2 10 3.6"})],-1)])],10,F1)):R("",!0),fe.mark?(c(),d("span",B1,m(fe.mark),1)):R("",!0)],10,I1))],6))),128))]),i.value?(c(),d("div",V1,[i.value?(c(),d("p",j1,m(i.value),1)):R("",!0)])):R("",!0)])],2)],6))}}),W1=Fe(K1,[["__scopeId","data-v-7892f69a"]]),z1={key:0,class:"glyph","aria-hidden":"true"},Z1={viewBox:"0 0 24 24"},G1=["d"],q1={class:"body"},Y1={class:"tag op-eyebrow"},X1={key:0,class:"title"},J1={key:1,class:"message"},Q1={key:2,class:"help op-copy"},eb=He({__name:"NotifyToast",props:{title:{},message:{default:""},icon:{default:""},kind:{default:"info"},progress:{default:-1}},setup(e){const t=e,{t:n,has:s}=nt(),o={info:"NOTICE",success:"CONFIRMED",warning:"CAUTION",error:"UNAVAILABLE"},l=J(()=>{const u=`notify.kind.${t.kind}`;return s(u)?n(u):o[t.kind]}),i=J(()=>t.icon&&wt(At,t.icon)||[]),a=J(()=>`scaleX(${Math.max(0,Math.min(1,t.progress))})`);return(u,p)=>(c(),d("article",{class:Z(["toast op-frame op-arete op-interlace op-ink",[e.kind,{"op-lift":e.kind==="error"}]]),"data-augmented-ui":"tr-clip border"},[i.value.length?(c(),d("span",z1,[(c(),d("svg",Z1,[(c(!0),d(ne,null,ve(i.value,(f,h)=>(c(),d("path",{key:h,d:f},null,8,G1))),128))]))])):R("",!0),r("div",q1,[r("span",Y1,m(l.value),1),e.title?(c(),d("span",X1,m(e.title),1)):R("",!0),e.message?(c(),d("span",J1,m(e.message),1)):R("",!0),e.kind==="error"&&M(s)("notify.errorHelp")?(c(),d("span",Q1,m(M(n)("notify.errorHelp")),1)):R("",!0)]),e.progress>=0?(c(),d("span",{key:1,class:"bar",style:Te({transform:a.value})},null,4)):R("",!0)],2))}}),tb=Fe(eb,[["__scopeId","data-v-49fbafea"]]),nb="audio/",ob=/^[A-Za-z0-9_-]+\.[A-Za-z0-9]+$/,sb=4e3;function Mi(e){const t=x(e);return ob.test(t)?t:""}function lb(e){if(e===null||typeof e!="object")return null;const t=e,n=Mi(t.open),s=Mi(t.close);return!n&&!s?null:{open:n,close:s,volume:Math.min(1,Math.max(0,Q(t.volume,1)))}}function ib(e,t){return new Promise(n=>{let s=!1,o;const l=(a,u)=>{s||(s=!0,o!==void 0&&clearTimeout(o),n({played:a,reason:u}))};let i;try{i=new Audio(nb+e)}catch(a){et(a,`notify stinger ${e}`),l(!1,"audio_unavailable");return}i.volume=t,i.preload="auto",i.addEventListener("ended",()=>l(!0,"")),i.addEventListener("error",()=>{l(!1,`media_error_${i.error?i.error.code:"?"}`)}),o=setTimeout(()=>{l(i.currentTime>0,i.currentTime>0?"clip_deadline":"clip_never_started")},sb);try{const a=i.play();a&&typeof a.then=="function"&&a.then(()=>{},u=>l(!1,`play_refused:${u instanceof Error?u.name:String(u)}`))}catch(a){et(a,`notify stinger ${e}`),l(!1,"play_threw")}})}const ab=8,rb=32,ub=260,cb=50,db=5e3,fb=He({__name:"NotifyRoot",setup(e){const{t}=nt(),n=["top_left","top_center","top_right","middle_left","bottom_left","bottom_center","bottom_right"],s=["info","success","warning","error"],o=rt([]),l=C("top_right"),i=C(340),a=C(!1);let u,p=!1;function f(I,O){const K=x(I);return n.indexOf(K)===-1?O:K}function h(I){const O=x(I,"info");return s.indexOf(O)===-1?"info":O}function w(I){return o.value.filter(O=>O.position===I&&!O.held)}function k(){let I=0;for(const O of o.value)O.out||(I+=1);return I}function F(I,O){const K=o.value.find(de=>de.id===I&&!de.out);if(!K)return;o.value=o.value.map(de=>de===K?{...de,out:!0,progress:-1}:de),O&&xe("opx:notify:gone",{id:I});const V=K.revealed&&K.stinger?K.stinger.close:"",be=K.stinger?K.stinger.volume:1;window.setTimeout(()=>{o.value=o.value.filter(de=>de.key!==K.key),V&&!p&&A(V,be,"close")},ub)}async function A(I,O,K){const V=await ib(I,O);!V.played&&V.reason&&et(V.reason,`notify ${K} stinger ${I}`)}function T(I){const O=o.value.find(K=>K.position===I&&!K.out&&!K.held);O&&(xe("opx:notify:gone",{id:O.id}),o.value=o.value.filter(K=>K!==O))}let L=0;function E(I,O){const K=Math.max(0,Math.round(Q(I.durationMs,O?O.durationMs:db))),V=O!==void 0&&O.durationMs===K;let be=V?O.endsAt:0;if(K===0)be=0;else if(!V||typeof I.remainingMs=="number"){const se=Math.max(0,Math.min(K,Q(I.remainingMs,K)));be=Date.now()+se}const de=K>0&&I.progress!==!1&&(O?O.bar:!0);return{id:x(I.id),key:O?O.key:++L,kind:I.kind===void 0&&O?O.kind:h(I.kind),title:I.title===void 0&&O?O.title:t(x(I.title)),message:I.message===void 0&&O?O.message:t(x(I.message)),icon:I.icon===void 0&&O?O.icon:x(I.icon),position:f(I.position,O?O.position:l.value),durationMs:K,endsAt:be,bar:de,progress:de?1:-1,stinger:I.stinger===void 0&&O?O.stinger:lb(I.stinger),held:O?O.held:!1,revealed:O?O.revealed:!1,out:!1}}async function H(I,O){const K=O.open;if(!K){D(I);return}await A(K,O.volume,"open"),D(I)}function D(I){if(p)return;const O=o.value.find(V=>V.key===I&&V.held&&!V.out);if(!O)return;const K=O.durationMs;o.value=o.value.map(V=>V===O?{...V,held:!1,revealed:!0,endsAt:K>0?Date.now()+K:0,progress:V.bar&&K>0?1:-1}:V),W()}function N(I){const O=x(I.id);if(!O)return;const K=o.value.find(de=>de.id===O&&!de.out),V=E(I,K);if(K){o.value=o.value.map(de=>de===K?V:de),W();return}if(k()>=rb)return;w(V.position).filter(de=>!de.out).length>=ab&&T(V.position);const be=V.stinger!==null&&V.stinger.open!=="";be&&(V.held=!0,V.endsAt=0,V.progress=-1),o.value=[...o.value,V],be&&V.stinger&&H(V.key,V.stinger),W()}function q(){const I=Date.now(),O=[];let K=!1,V=!1;const be=o.value.map(de=>{if(de.out||de.endsAt===0)return de;const se=Math.max(0,Math.min(1,(de.endsAt-I)/de.durationMs));return se<=0?(O.push(de.id),de):(K=!0,!de.bar||Math.abs(se-de.progress)<.002?de:(V=!0,{...de,progress:se}))});V&&(o.value=be);for(const de of O)F(de,!0);!K&&O.length===0&&B()}function W(){u===void 0&&(u=setInterval(()=>Ie("notify tick",q,void 0),cb))}function B(){u!==void 0&&(clearInterval(u),u=void 0)}return ge("opx:notify:config",I=>{l.value=f(I.position,l.value);const O=Q(I.width);O>0&&(i.value=Math.round(O))}),ge("opx:notify:show",N),ge("opx:notify:update",N),ge("opx:notify:dismiss",I=>{F(x(I.id),!1)}),ge("opx:notify:clear",()=>{for(const I of o.value)F(I.id,!1)}),ge("opx:notify:down",I=>{a.value=I.down===!0}),Lt(()=>{xe("opx:notify:ready",{})}),lt(()=>{p=!0,B()}),(I,O)=>(c(),d("div",{class:Z(["notify",{down:a.value}]),style:Te({"--toast-width":i.value+"px"})},[(c(),d(ne,null,ve(n,K=>r("div",{key:K,class:Z(["stack",K])},[(c(!0),d(ne,null,ve(w(K),V=>(c(),d("div",{key:V.key,class:Z(["entry",{out:V.out}])},[Xe(tb,{kind:V.kind,title:V.title,message:V.message,icon:V.icon,progress:V.progress},null,8,["kind","title","message","icon","progress"])],2))),128))],2)),64))],6))}}),vb=Fe(fb,[["__scopeId","data-v-c72c4784"]]),pb={key:0,class:"column op-plane op-anchor-left op-ink"},hb={class:"bay op-bay op-arete","data-augmented-ui":"tr-clip bl-clip border"},mb={class:"bay-inner"},gb={key:0,class:"tabs"},bb=["disabled","onClick"],_b={key:0,class:"mark","aria-hidden":"true"},yb={key:1,class:"intro op-copy"},kb={key:2,class:"field op-frame","data-augmented-ui":"tr-clip border"},wb={class:"field-label op-eyebrow"},$b=["value","placeholder"],xb=["max","value","disabled","aria-label","aria-valuetext"],Mb={class:"row-label op-label op-truncate"},Cb={key:0,class:"row-hint op-copy op-truncate"},Sb={key:0,class:"empty op-copy"},Tb={key:4,class:"readout"},Eb={class:"count op-value"},Ab={key:0,class:"spinner","aria-hidden":"true"},Lb={key:5,class:"summary"},Ob={class:"plate"},Ib={class:"plate-label op-eyebrow"},Rb={class:"plate-value op-value op-truncate"},Db=["disabled"],Nb={class:"row-label op-label op-truncate"},Pb={key:0,class:"foot"},Hb=["disabled","onClick"],Fb={class:"row-label op-label op-truncate"},Bb={key:1,class:"tools op-plane op-anchor-right op-ink"},Vb={class:"tool-row op-bay op-arete is-end","data-augmented-ui":"tr-clip bl-clip border"},jb=["disabled","onClick"],Ub={key:0,class:"row-icon",viewBox:"0 0 24 24","aria-hidden":"true"},Kb=["d"],Wb={class:"row-label op-label op-truncate"},zb={key:2,class:"rail op-plane op-anchor-left op-ink"},Zb={class:"rail-bay op-bay op-arete","data-augmented-ui":"tr-clip bl-clip border"},Gb={class:"rail-inner"},qb={key:0,class:"views"},Yb=["disabled","title","onClick"],Xb={key:0,class:"view-icon",viewBox:"0 0 24 24","aria-hidden":"true"},Jb=["d"],Qb={class:"view-label op-eyebrow op-truncate"},e_={key:1,class:"cats"},t_=["disabled","onClick"],n_={class:"row-label op-label op-truncate"},o_={key:2,class:"tabs"},s_=["disabled","onClick"],l_={key:0,class:"mark","aria-hidden":"true"},i_={key:3,class:"lead op-copy"},a_=["disabled"],r_={class:"tile-name op-eyebrow"},u_={class:"tile-art"},c_=["src","onError"],d_={key:1,class:"tile-mono"},f_={class:"tile-name op-eyebrow"},v_={key:0,class:"tile-more op-copy"},p_={class:"slot-value op-value op-truncate"},h_=["max","value","disabled","aria-label","aria-valuetext"],m_={class:"slot-step op-frame","data-augmented-ui":"tr-clip border"},g_=["max","value","disabled","aria-label"],b_={class:"slot-of op-eyebrow"},__={key:0,class:"foot"},y_=["disabled","onClick"],k_={class:"row-label op-label op-truncate"},w_={key:3,class:"confirm"},$_={class:"dialog op-ink"},x_={class:"bay op-bay op-arete","data-augmented-ui":"tr-clip bl-clip border"},M_={class:"bay-inner"},C_={class:"ask op-copy"},S_={class:"foot"},T_={class:"row-label op-label op-truncate"},E_={class:"row-label op-label op-truncate"},A_=40,To=4,Ci=110,L_=160,Si=160,O_=2e3,I_=240,R_=He({__name:"PanelView",setup(e){function t(){return{eyebrow:"",title:"",subtitle:"",intro:"",tabs:[],tab:"",sliders:[],search:!1,summary:null,actions:[],tools:[],groups:[],selected:{},status:null,busy:!1,loading:!1,labels:{},hover:!1,columns:2}}const n=C(null),s=C(!1),o=mt(t()),l=C([]),i=C(0),a=C(""),u=C(null),p=mt({}),f=C(null),h=C(0),w=C(0),k=mt({slot:"",entries:[]}),F=mt({}),A=C(!1),T=C(null);let L=null,E,H,D,N,q=null,W,B;function I(v){return typeof v=="string"||typeof v=="number"}function O(v){return n.value!==null&&v.handle===n.value}function K(v,b){const G=x(o.labels[v]);return b?G.replace(/\{(\w+)\}/g,(ce,Le)=>{const me=b[Le];return me===void 0?ce:String(me)}):G}function V(v){return Ge(v).map(b=>{const G=x(b.icon);return{id:x(b.id),label:x(b.label),icon:G!==""&&Object.prototype.hasOwnProperty.call(At,G)?G:"",primary:b.primary===!0,disabled:b.disabled===!0}})}function be(v){const b=Oe(v);if(Object.keys(b).length===0)return null;const G=Oe(b.action);return{label:x(b.label),value:x(b.value),action:Object.keys(G).length===0?null:V([G])[0]}}function de(v){const b=G=>v[G]!==void 0;if(b("eyebrow")&&(o.eyebrow=x(v.eyebrow)),b("title")&&(o.title=x(v.title)),b("subtitle")&&(o.subtitle=x(v.subtitle)),b("intro")&&(o.intro=x(v.intro)),b("tabs")&&(o.tabs=Ge(v.tabs).map(G=>({id:x(G.id),label:x(G.label),marked:G.marked===!0,disabled:G.disabled===!0}))),b("tab")&&(o.tab=x(v.tab)),b("sliders")){const G=Ge(v.sliders).map(ce=>({id:x(ce.id),label:x(ce.label),count:Math.max(0,Q(ce.count)),index:Math.max(0,Q(ce.index)),value:x(ce.value),disabled:ce.disabled===!0}));for(const ce of G)q!==ce.id&&delete p[ce.id];o.sliders=G}if(b("search")&&(o.search=v.search===!1?!1:x(v.search)),b("summary")&&(o.summary=be(v.summary)),b("actions")&&(o.actions=V(v.actions)),b("tools")&&(o.tools=V(v.tools)),b("groups")&&(o.groups=V(v.groups)),b("selected")){const G=Oe(v.selected);for(const ce of Object.keys(G))o.selected[ce]=x(G[ce])}if(b("status")){const G=Oe(v.status);o.status=Object.keys(G).length===0?null:{text:x(G.text),kind:x(G.kind,"info")}}if(b("busy")&&(o.busy=v.busy===!0),b("loading")&&(o.loading=v.loading===!0),b("labels")){const G=Oe(v.labels),ce={};for(const Le of Object.keys(G))ce[Le]=x(G[Le],Le);o.labels=ce}b("tiles")&&se(v.tiles),b("hover")&&(o.hover=v.hover===!0),b("columns")&&(o.columns=Q(v.columns)===1?1:2)}function se(v){fe(v)&&st(ie)}function ie(){const v=T.value;v&&v.scrollTop+v.clientHeight>=v.scrollHeight-Si&&Tt()}function fe(v){N!==void 0&&clearTimeout(N),N=void 0,A.value=!1;const b=Oe(v),G=x(b.slot);if(G==="")return k.slot="",k.entries=[],!1;const ce=kt(b.labels),Le=kt(b.images),me=kt(b.entries).map((Je,It)=>{const vt=x(Je);return{name:vt,label:x(ce[It])||vt,image:x(Le[It])}}),z=Q(b.from);return G!==k.slot||z===1?(k.slot=G,k.entries=me,me.length>0):z!==k.entries.length+1?!1:(k.entries=k.entries.concat(me),me.length>0)}const re=J(()=>o.tabs.length===0?"":o.tabs.some(v=>v.id===o.tab)?o.tab:o.tabs[0].id),ee=J(()=>x(o.selected[re.value])),te=J(()=>{const v=re.value,b=a.value.trim().toLowerCase();return l.value.filter(G=>v!==""&&G.tab!==""&&G.tab!==v?!1:b===""||G.search.indexOf(b)!==-1)}),$e=J(()=>Math.max(0,Math.min(i.value,te.value.length-1))),Me=J(()=>{const v=w.value>0?w.value:A_+To,b=w.value>0?pe:To;return Math.max(1,Math.floor((h.value+b)/v))*(o.columns===1?1:2)}),Ne=J(()=>{const v=Me.value,b=Math.max(0,te.value.length-v);return Math.max(0,Math.min($e.value-Math.floor(v/2),b))}),Re=J(()=>te.value.slice(Ne.value,Ne.value+Me.value)),qe=J(()=>te.value.length===0?"":K("count",{from:Ne.value+1,to:Math.min(te.value.length,Ne.value+Me.value),total:te.value.length})),Ze=J(()=>`--columns: ${o.columns}`),le=J(()=>o.search===!1?"":o.search),Ce=J(()=>{var v,b;return(b=(v=o.summary)==null?void 0:v.action)!=null?b:null});function S(){if(ee.value==="")return 0;const v=te.value.findIndex(b=>b.id===ee.value);return v<0?0:v}bt([re,ee],()=>{i.value=S()}),bt(a,()=>{i.value=0});let pe=To;function _e(){var G,ce;const v=f.value;h.value=(G=v==null?void 0:v.clientHeight)!=null?G:0;const b=(ce=v==null?void 0:v.querySelector(".row"))!=null?ce:null;if(v&&b){const Le=parseFloat(getComputedStyle(v).rowGap);pe=Number.isFinite(Le)?Le:To,w.value=b.offsetHeight+pe}}let g=null;bt(f,(v,b)=>{typeof ResizeObserver!="undefined"&&(g===null&&(g=new ResizeObserver(()=>_e())),b&&g.unobserve(b),v&&g.observe(v))},{flush:"post"}),bt(()=>Re.value.length>0,v=>{v&&_e()},{flush:"post"});function $(){E!==void 0&&clearTimeout(E),H!==void 0&&clearTimeout(H),D!==void 0&&clearTimeout(D),N!==void 0&&clearTimeout(N),E=void 0,H=void 0,D=void 0,N=void 0}function _(v){!o.hover||n.value===null||($(),E=setTimeout(()=>{E=void 0,!(n.value===null||L===v)&&(L=v,xe("opx:panel:hover",{handle:n.value,item:v}))},Ci))}function P(){!o.hover||n.value===null||($(),H=setTimeout(()=>{H=void 0,!(n.value===null||L===null)&&(L=null,xe("opx:panel:leave",{handle:n.value}))},L_))}function j(){u.value=null,B==null||B(),B=void 0}function Y(v){const b=u.value;b&&(j(),xe("opx:panel:answer",{handle:n.value,id:b.id,value:v}))}function ue(){$(),L=null,q=null;for(const v of Object.keys(p))delete p[v];s.value=!1,l.value=[],i.value=0,a.value="",k.slot="",k.entries=[],A.value=!1;for(const v of Object.keys(F))delete F[v];j(),Object.assign(o,t())}ge("opx:panel:open",v=>{Ie("panel:open",()=>{I(v.handle)&&(W==null||W(),oe(),ue(),n.value=v.handle,de(v),s.value=!0,W=Pt({id:"panel",onEscape:()=>xe("opx:panel:dismiss",{handle:n.value})}),st(_e))},void 0)}),ge("opx:panel:update",v=>{Ie("panel:update",()=>{if(!O(v))return;const b=re.value;de(v),v.clearItems===!0&&(l.value=[]),re.value!==b&&(a.value="")},void 0)}),ge("opx:panel:items",v=>{Ie("panel:items",()=>{if(!O(v))return;const b=[];for(const G of Ge(v.items)){const ce=x(G.id);if(!ce)continue;const Le=x(G.label),me=x(G.detail);b.push({id:ce,tab:x(G.tab),label:Le,detail:me,disabled:G.disabled===!0,search:`${Le} ${me} ${ce}`.toLowerCase()})}l.value=l.value.concat(b),v.done===!0&&(o.loading=!1,i.value=S())},void 0)}),ge("opx:panel:confirm",v=>{Ie("panel:confirm",()=>{if(!O(v))return;const b=x(v.id);if(b===""){j();return}u.value={id:b,title:x(v.title),text:x(v.text),yes:x(v.yes),no:x(v.no)},B==null||B(),B=Pt({id:"panel.confirm",onEscape:()=>Y(!1)})},void 0)});let ae;function oe(){ae!==void 0&&clearTimeout(ae),ae=void 0}ge("opx:panel:close",v=>{Ie("panel:close",()=>{v.handle!==void 0&&!O(v)||(n.value=null,s.value=!1,$(),j(),W==null||W(),W=void 0,oe(),ae=setTimeout(()=>{ae=void 0,s.value||ue()},I_))},void 0)}),Lt(()=>{window.addEventListener("resize",_e),_e()}),lt(()=>{g==null||g.disconnect(),g=null,oe(),window.removeEventListener("resize",_e),$(),B==null||B(),W==null||W()});function X(v){v!==re.value&&(o.tab=v,a.value="",$(),L=null,k.slot="",k.entries=[],A.value=!1,T.value&&(T.value.scrollTop=0),xe("opx:panel:tab",{handle:n.value,tab:v}))}function we(v){v.disabled||o.busy||xe("opx:panel:select",{handle:n.value,item:v.id})}function he(v){const b=te.value.findIndex(G=>G.id===v.id);b>=0&&(i.value=b),we(v)}function ke(v){const b=te.value.length;if(b===0)return;const G=Math.max(0,Math.min(b-1,Math.trunc(Number(v))||0));i.value=G;const ce=te.value[G];ce&&!ce.disabled&&_(ce.id)}function Se(){const v=te.value[$e.value];v&&we(v)}function Ee(v){const b=p[v.id];return Math.min(b===void 0?v.index:b,v.count)}const ye=J(()=>{var v;return(v=o.sliders.find(b=>b.id===re.value))!=null?v:null}),Pe=J(()=>k.slot!==re.value?[]:k.entries.map((v,b)=>({index:b+1,...v}))),Ue=J(()=>{const v=ye.value;return v===null||k.slot!==v.id?!1:k.entries.length{N=void 0,A.value=!1},O_),xe("opx:panel:tiles",{handle:n.value,slot:k.slot,from:k.entries.length+1}))}function Ot(v){const b=ye.value;b===null||b.disabled||o.busy||v<0||v>b.count||(p[b.id]=v,D!==void 0&&clearTimeout(D),D=void 0,q=null,n.value!==null&&xe("opx:panel:slide",{handle:n.value,id:b.id,index:v,commit:!0}))}function tt(v,b){if(o.busy||v.disabled)return;const G=Math.max(0,Math.min(v.count,Math.trunc(Number(b))||0));p[v.id]=G,q=v.id,D!==void 0&&clearTimeout(D),D=setTimeout(()=>{D=void 0,n.value!==null&&xe("opx:panel:slide",{handle:n.value,id:v.id,index:G,commit:!1})},Ci)}function it(v){D!==void 0&&clearTimeout(D),D=void 0,q=null,!(o.busy||v.disabled)&&n.value!==null&&xe("opx:panel:slide",{handle:n.value,id:v.id,index:Ee(v),commit:!0})}function Ut(v,b){if(o.busy||v.disabled)return;const G=b.value.trim();if(G===""){b.value=String(Ee(v));return}const ce=Math.trunc(Number(G));if(!Number.isFinite(ce)){b.value=String(Ee(v));return}const Le=Math.max(0,Math.min(v.count,ce));b.value=String(Le),p[v.id]=Le,D!==void 0&&clearTimeout(D),D=void 0,q=null,n.value!==null&&xe("opx:panel:slide",{handle:n.value,id:v.id,index:Le,commit:!0})}function U(v){v.disabled||o.busy||xe("opx:panel:action",{handle:n.value,id:v.id})}function y(v){a.value=v}return(v,b)=>{var G,ce,Le,me;return c(),d("div",{class:Z(["room",{open:s.value}])},[o.sliders.length?R("",!0):(c(),d("section",pb,[r("div",hb,[r("div",mb,[o.tabs.length?(c(),d("nav",gb,[(c(!0),d(ne,null,ve(o.tabs,z=>(c(),d("button",{key:z.id,type:"button",class:Z(["tab op-frame",{"is-on":z.id===re.value,"is-off":z.disabled}]),disabled:z.disabled,"data-augmented-ui":"tr-clip border",onClick:Je=>X(z.id)},[Ft(m(z.label)+" ",1),z.marked?(c(),d("span",_b,"•")):R("",!0)],10,bb))),128))])):R("",!0),o.intro?(c(),d("p",yb,m(o.intro),1)):R("",!0),o.search!==!1?(c(),d("label",kb,[r("span",wb,m(K("search")),1),r("input",{class:"field-entry",type:"text",value:a.value,placeholder:le.value,onInput:b[0]||(b[0]=z=>y(z.target.value))},null,40,$b)])):R("",!0),te.value.length>1?(c(),d("div",{key:3,class:Z(["dial op-frame",{"is-off":o.busy}]),"data-augmented-ui":"tr-clip border"},[r("input",{class:"dial-track",type:"range",min:"0",max:te.value.length-1,step:"1",value:$e.value,disabled:o.busy,"aria-label":(ce=(G=o.summary)==null?void 0:G.label)!=null?ce:"","aria-valuetext":(me=(Le=te.value[$e.value])==null?void 0:Le.label)!=null?me:"",onInput:b[1]||(b[1]=z=>ke(z.target.value)),onChange:Se},null,40,xb)],2)):R("",!0),r("div",{ref_key:"gridEl",ref:f,class:Z(["grid",{busy:o.busy}]),style:Te(Ze.value)},[(c(!0),d(ne,null,ve(Re.value,(z,Je,It,vt)=>{const Kn=[z.id===ee.value,z.id!==ee.value&&Ne.value+Je===$e.value,z.disabled||o.busy,z.label,z.detail];if(vt&&vt.el&&vt.key===z.id&&Fl(vt,Kn))return vt;const Wn=(c(),d("button",{key:z.id,type:"button",class:Z(["row op-frame",{"is-on":z.id===ee.value,"op-lift":z.id===ee.value,"is-hover":z.id!==ee.value&&Ne.value+Je===$e.value,"is-off":z.disabled||o.busy}]),disabled:z.disabled||o.busy,"data-augmented-ui":"tr-clip border",onClick:cs=>he(z),onMouseenter:cs=>_(z.id),onMouseleave:P},[r("span",Mb,m(z.label),1),z.detail?(c(),d("span",Cb,m(z.detail),1)):R("",!0)],42,["disabled","onClick","onMouseenter"]));return Wn.memo=Kn,Wn},b,2),128)),Re.value.length?R("",!0):(c(),d("p",Sb,m(K(o.loading?"loading":"empty")),1))],6),qe.value||o.busy?(c(),d("div",Tb,[r("span",Eb,m(qe.value),1),o.busy?(c(),d("span",Ab)):R("",!0)])):R("",!0),o.summary?(c(),d("div",Lb,[r("div",Ob,[r("span",Ib,m(o.summary.label),1),r("span",Rb,m(o.summary.value),1)]),Ce.value?(c(),d("button",{key:0,type:"button",class:Z(["row button op-frame",{"is-off":Ce.value.disabled||o.busy}]),disabled:Ce.value.disabled||o.busy,"data-augmented-ui":"tr-clip border",onClick:b[4]||(b[4]=z=>U(Ce.value))},[r("span",Nb,m(Ce.value.label),1)],10,Db)):R("",!0)])):R("",!0),o.status?(c(),d("p",{key:6,class:Z(["status op-copy",o.status.kind])},m(o.status.text),3)):R("",!0)]),o.actions.length?(c(),d("footer",Pb,[(c(!0),d(ne,null,ve(o.actions,z=>(c(),d("button",{key:z.id,type:"button",class:Z(["row button grow op-frame",{"is-on":z.primary,"op-lift":z.primary&&!z.disabled&&!o.busy,"is-off":z.disabled||o.busy}]),disabled:z.disabled||o.busy,"data-augmented-ui":"tr-clip border",onClick:Je=>U(z)},[r("span",Fb,m(z.label),1)],10,Hb))),128))])):R("",!0)])])),o.tools.length&&!o.sliders.length?(c(),d("div",Bb,[r("div",Vb,[(c(!0),d(ne,null,ve(o.tools,z=>(c(),d("button",{key:z.id,type:"button",class:Z(["row button tool op-frame",{"is-off":z.disabled||o.busy}]),disabled:z.disabled||o.busy,"data-augmented-ui":"tr-clip border",onClick:Je=>U(z)},[z.icon?(c(),d("svg",Ub,[(c(!0),d(ne,null,ve(M(At)[z.icon],(Je,It)=>(c(),d("path",{key:It,d:Je,fill:"none",stroke:"currentColor","stroke-width":"1.6","stroke-linecap":"round","stroke-linejoin":"round"},null,8,Kb))),128))])):R("",!0),r("span",Wb,m(z.label),1)],10,jb))),128))])])):R("",!0),o.sliders.length?(c(),d("section",zb,[r("div",Zb,[r("div",Gb,[o.tools.length?(c(),d("div",qb,[(c(!0),d(ne,null,ve(o.tools,z=>(c(),d("button",{key:z.id,type:"button",class:Z(["view-btn op-frame",{"is-off":z.disabled||o.busy}]),disabled:z.disabled||o.busy,"data-augmented-ui":"tr-clip border",title:z.label,onClick:Je=>U(z)},[z.icon?(c(),d("svg",Xb,[(c(!0),d(ne,null,ve(M(At)[z.icon],(Je,It)=>(c(),d("path",{key:It,d:Je,fill:"none",stroke:"currentColor","stroke-width":"1.6","stroke-linecap":"round","stroke-linejoin":"round"},null,8,Jb))),128))])):R("",!0),r("span",Qb,m(z.label),1)],10,Yb))),128))])):R("",!0),o.groups.length?(c(),d("div",e_,[(c(!0),d(ne,null,ve(o.groups,z=>(c(),d("button",{key:z.id,type:"button",class:Z(["row button cat op-frame",{"is-off":z.disabled||o.busy}]),disabled:z.disabled||o.busy,"data-augmented-ui":"tr-clip border",onClick:Je=>U(z)},[r("span",n_,m(z.label),1)],10,t_))),128))])):R("",!0),o.tabs.length?(c(),d("nav",o_,[(c(!0),d(ne,null,ve(o.tabs,z=>(c(),d("button",{key:z.id,type:"button",class:Z(["tab op-frame",{"is-on":z.id===re.value,"is-off":z.disabled}]),disabled:z.disabled,"data-augmented-ui":"tr-clip border",onClick:Je=>X(z.id)},[Ft(m(z.label)+" ",1),z.marked?(c(),d("span",l_,"•")):R("",!0)],10,s_))),128))])):R("",!0),o.intro?(c(),d("p",i_,m(o.intro),1)):R("",!0),o.status?(c(),d("p",{key:4,class:Z(["status op-copy",o.status.kind])},m(o.status.text),3)):R("",!0),ye.value?(c(),d("div",{key:5,ref_key:"tilesEl",ref:T,class:Z(["tiles",{busy:o.busy}]),onScrollPassive:ut},[r("button",{type:"button",class:Z(["tile none op-frame",{"is-on":Ee(ye.value)===0,"is-off":ye.value.disabled||o.busy}]),disabled:ye.value.disabled||o.busy,"data-augmented-ui":"tr-clip border",onClick:b[5]||(b[5]=z=>Ot(0))},[b[15]||(b[15]=r("span",{class:"tile-art"},[r("span",{class:"tile-mono"},"−")],-1)),r("span",r_,m(K("nothing")),1)],10,a_),(c(!0),d(ne,null,ve(Pe.value,(z,Je,It,vt)=>{const Kn=[Ee(ye.value)===z.index,ye.value.disabled||o.busy,z.label,z.name,z.image,F[z.name]===!0];if(vt&&vt.el&&vt.key===z.index&&Fl(vt,Kn))return vt;const Wn=(c(),d("button",{key:z.index,type:"button",class:Z(["tile op-frame",{"is-on":Ee(ye.value)===z.index,"is-off":ye.value.disabled||o.busy}]),disabled:ye.value.disabled||o.busy,"data-augmented-ui":"tr-clip border",title:z.label,onClick:cs=>Ot(z.index)},[r("span",u_,[z.image&&Ye(z.name,z.image)&&!F[z.name]?(c(),d("img",{key:0,src:Ye(z.name,z.image),alt:"",draggable:"false",loading:"lazy",onError:cs=>ft(z.name)},null,40,c_)):(c(),d("span",d_,m(M(yl)(z.label)),1))]),r("span",f_,m(z.label),1)],10,["disabled","title","onClick"]));return Wn.memo=Kn,Wn},b,6),128)),Ue.value||ye.value.count>0&&k.slot!==ye.value.id?(c(),d("p",v_,m(K("loading")),1)):R("",!0)],34)):R("",!0),ye.value&&ye.value.count>0?(c(),d("div",{key:6,class:Z(["slot op-frame",{"is-on":Ee(ye.value)>0&&!ye.value.disabled&&!o.busy,"is-off":ye.value.disabled||o.busy}]),"data-augmented-ui":"tr-clip border"},[r("span",p_,m(ye.value.value),1),r("input",{class:"slot-track",type:"range",min:"0",max:ye.value.count,step:"1",value:Ee(ye.value),disabled:ye.value.disabled||o.busy,"aria-label":ye.value.label,"aria-valuetext":ye.value.value,onInput:b[8]||(b[8]=z=>tt(ye.value,z.target.value)),onChange:b[9]||(b[9]=z=>it(ye.value))},null,40,h_),r("label",m_,[r("input",{class:"slot-number op-eyebrow",type:"number",inputmode:"numeric",min:"0",max:ye.value.count,value:Ee(ye.value),disabled:ye.value.disabled||o.busy,"aria-label":ye.value.label,onKeydown:b[10]||(b[10]=_t(()=>{},["stop"])),onKeyup:b[11]||(b[11]=Jn(z=>Ut(ye.value,z.target),["enter"])),onChange:b[12]||(b[12]=z=>Ut(ye.value,z.target))},null,40,g_),r("span",b_,"/ "+m(ye.value.count),1)])],2)):R("",!0)]),o.actions.length?(c(),d("footer",__,[(c(!0),d(ne,null,ve(o.actions,z=>(c(),d("button",{key:z.id,type:"button",class:Z(["row button grow op-frame",{"is-on":z.primary,"op-lift":z.primary&&!z.disabled&&!o.busy,"is-off":z.disabled||o.busy}]),disabled:z.disabled||o.busy,"data-augmented-ui":"tr-clip border",onClick:Je=>U(z)},[r("span",k_,m(z.label),1)],10,y_))),128))])):R("",!0)])])):R("",!0),u.value?(c(),d("div",w_,[b[16]||(b[16]=r("div",{class:"scrim"},null,-1)),r("div",$_,[r("section",x_,[r("div",M_,[r("h2",null,m(u.value.title),1),r("p",C_,m(u.value.text),1)]),r("footer",S_,[r("button",{type:"button",class:"row button grow op-frame","data-augmented-ui":"tr-clip border",onClick:b[13]||(b[13]=z=>Y(!1))},[r("span",T_,m(u.value.no),1)]),r("button",{type:"button",class:"row button grow op-frame is-on op-lift","data-augmented-ui":"tr-clip border",onClick:b[14]||(b[14]=z=>Y(!0))},[r("span",E_,m(u.value.yes),1)])])])])])):R("",!0)],2)}}}),D_=Fe(R_,[["__scopeId","data-v-c220f505"]]),N_={key:0,class:"progress"},P_={class:"plate op-plane op-ink"},H_={class:"label op-eyebrow op-truncate"},F_={class:"track op-frame","data-augmented-ui":"tr-clip border"},B_={key:0,class:"hint op-eyebrow"},V_=He({__name:"ProgressRoot",setup(e){const{t}=nt(),n=C(!1),s=C(""),o=C(!1),l=C(""),i=C(!1),a=C(0),u=rt(0);let p;function f(){p!==void 0&&clearTimeout(p),p=void 0}return ge("opx:progress:show",h=>{f(),s.value=x(h.label),l.value=x(h.cancelKey),o.value=De(h.cancelable)&&l.value!=="",u.value=Math.max(0,Q(h.durationMs)),i.value=!1,a.value+=1,n.value=!0,p=setTimeout(()=>{i.value=!0},32)}),ge("opx:progress:hide",()=>{f(),n.value=!1,i.value=!1}),lt(f),(h,w)=>n.value?(c(),d("div",N_,[r("section",P_,[r("p",H_,m(M(t)(s.value)),1),r("span",F_,[(c(),d("span",{key:a.value,class:"bar",style:Te({transform:i.value?"scaleX(1)":"scaleX(0)",transitionDuration:`${u.value}ms`})},null,4))]),o.value?(c(),d("p",B_,m(M(t)("progress.cancel",{key:l.value})),1)):R("",!0)])])):R("",!0)}}),j_=Fe(V_,[["__scopeId","data-v-559f9edb"]]),U_={class:"heading op-eyebrow"},K_={class:"op-truncate"},W_={key:0},z_={class:"reading"},Z_={class:"op-eyebrow"},G_={class:"op-value"},q_=["aria-label","aria-valuenow"],Y_={class:"hint op-eyebrow"},X_=He({__name:"PoolHud",setup(e){const t=C(!1),n=C(""),s=C(""),o=C(""),l=C(""),i=C(0),a=C(!1),u=C(!1),p=J(()=>Math.round(i.value*100));let f=0;ge("opx:pool:frame",w=>{n.value=x(w.title).slice(0,48),s.value=x(w.hint).slice(0,160),o.value=x(w.view).slice(0,48),l.value=x(w.powerLabel).slice(0,48),i.value=Math.max(0,Math.min(1,Q(w.power))),a.value=w.phase==="rolling",u.value=w.charging===!0,f=Date.now(),t.value=!0}),ge("opx:pool:hide",()=>{t.value=!1});const h=setInterval(()=>{t.value&&Date.now()-f>500&&(t.value=!1)},150);return lt(()=>clearInterval(h)),(w,k)=>t.value?(c(),d("section",{key:0,class:Z(["pool op-plane op-ink",{charging:u.value}])},[r("div",U_,[r("span",K_,m(n.value),1),a.value?R("",!0):(c(),d("span",W_,m(o.value),1))]),a.value?R("",!0):(c(),d(ne,{key:0},[r("div",z_,[r("span",Z_,m(l.value),1),r("strong",G_,[Ft(m(p.value),1),k[0]||(k[0]=r("small",null,"%",-1))])]),r("div",{class:"track",role:"meter","aria-label":l.value,"aria-valuenow":p.value,"aria-valuemin":"0","aria-valuemax":"100"},[r("span",{class:"fill",style:Te({transform:`scaleX(${i.value})`})},null,4),(c(),d(ne,null,ve(3,F=>r("i",{key:F,style:Te({left:`${F*25}%`})},null,4)),64))],8,q_)],64)),r("p",Y_,m(s.value),1)],2)):R("",!0)}}),J_=Fe(X_,[["__scopeId","data-v-44171fcb"]]),Q_={class:"rig"},ey={class:"crown"},ty={class:"antenna","aria-hidden":"true"},ny=["title"],oy={class:"knob-tag op-eyebrow"},sy=["title"],ly={class:"knob-tag op-eyebrow"},iy={class:"body op-bay","data-augmented-ui":"tr-clip bl-clip border"},ay={class:"screen-top op-eyebrow"},ry={key:0,class:"ch"},uy={class:"signal","aria-hidden":"true"},cy={class:"freq op-truncate"},dy={class:"name op-copy op-truncate"},fy={class:"screen-foot op-eyebrow"},vy={key:0,class:"tag"},py={key:1,class:"tag"},hy={key:1,class:"blank-copy op-label"},my={key:0,class:"strip"},gy=["title"],by={class:"ticks"},_y=["title","onClick"],yy=["title"],ky={class:"keys"},wy=["disabled"],$y=["disabled"],xy=["disabled"],My={class:"foot"},Cy=["title"],Sy={class:"ptt-tag op-eyebrow"},Ty=12,Ey=He({__name:"RadioHolo",setup(e){const{t}=nt(),n=C(!1),s=C("right"),o=C(!1),l=C(!0),i=C(!1),a=C(!1),u=C([]),p=C(null);Lt(()=>{xe("opx:radio:ready",{})}),ge("opx:radio:holo",ie=>{Ie("radio:holo",()=>{var ee;const fe=n.value;n.value=ie.open===!0,x(ie.anchor)!==""&&(s.value=x(ie.anchor)),o.value=ie.power===!0,l.value=ie.handset!==!1,i.value=ie.needsHandset===!0,a.value=ie.tx===!0,u.value=Ge(ie.channels).map(te=>({key:x(te.key),label:x(te.label,x(te.key)),short:x(te.short,x(te.key)),joined:te.joined===!0,muted:te.muted===!0,active:te.active===!0,auto:te.auto===!0})).filter(te=>te.key!=="");const re=u.value.some(te=>te.key===p.value);if(!fe||!re){const te=(ee=u.value.find($e=>$e.active))!=null?ee:u.value[0];p.value=te?te.key:null}},void 0)});const f=J(()=>u.value.findIndex(ie=>ie.key===p.value)),h=J(()=>f.value>=0?u.value[f.value]:null),w=J(()=>i.value&&!l.value?t("radio.holo.noHandset"):o.value?u.value.length===0?t("radio.holo.none"):null:t("radio.holo.noPower")),k=J(()=>w.value===null&&h.value!==null),F=J(()=>{const ie=h.value;return ie===null||!ie.joined?t("radio.status.off"):ie.active&&a.value?t("radio.status.active"):ie.muted?t("radio.status.muted"):t("radio.status.listening")}),A=J(()=>{const ie=h.value;return!k.value||ie===null?0:ie.joined?ie.muted?2:ie.active?4:3:1});function T(ie){const fe=u.value.length;if(fe===0)return;const re=f.value<0?0:f.value;p.value=u.value[(re+ie+fe)%fe].key}function L(ie){T(ie.deltaY>0?1:-1)}const E=J(()=>`rotate(${Math.max(f.value,0)*36}deg)`);function H(ie,fe,re){const ee={verb:ie};fe!==void 0&&(ee.channel=fe),re!==void 0&&(ee.on=re),xe("opx:radio:request",ee)}function D(){H("power",void 0,!o.value)}function N(){const ie=h.value;!k.value||ie===null||H(ie.joined?"leave":"join",ie.key)}function q(){const ie=h.value;!k.value||ie===null||!ie.joined||ie.active||H("select",ie.key)}function W(){const ie=h.value;!k.value||ie===null||!ie.joined||H("mute",ie.key,!ie.muted)}const B=C(!1);function I(ie){ie?(window.addEventListener("pointerup",K),window.addEventListener("pointercancel",K),window.addEventListener("blur",K)):(window.removeEventListener("pointerup",K),window.removeEventListener("pointercancel",K),window.removeEventListener("blur",K))}function O(ie){ie.button!==0||B.value||(B.value=!0,I(!0),xe("opx:radio:talk",{on:!0}))}function K(){B.value&&(B.value=!1,I(!1),xe("opx:radio:talk",{on:!1}))}function V(){K(),xe("opx:radio:close",{})}function be(ie){n.value&&(ie.key==="ArrowUp"||ie.key==="ArrowLeft"?(ie.preventDefault(),T(-1)):(ie.key==="ArrowDown"||ie.key==="ArrowRight")&&(ie.preventDefault(),T(1)))}let de;bt(n,ie=>{ie&&de===void 0?(de=Pt({id:"radio",onEscape:V}),window.addEventListener("keydown",be)):!ie&&de!==void 0&&(K(),de(),de=void 0,window.removeEventListener("keydown",be))}),lt(()=>{K(),de==null||de(),de=void 0,window.removeEventListener("keydown",be)});const se=J(()=>s.value.endsWith("left")?"is-left":s.value.endsWith("right")?"is-right":"is-centre");return(ie,fe)=>{var re,ee,te,$e,Me,Ne,Re,qe,Ze,le,Ce;return n.value?(c(),d("div",{key:0,class:Z(["radio op-ink",["anchor-"+s.value,se.value]])},[r("div",Q_,[fe[7]||(fe[7]=r("div",{class:"emitter","aria-hidden":"true"},[r("span",{class:"node"}),r("span",{class:"node"})],-1)),fe[8]||(fe[8]=r("div",{class:"beam","aria-hidden":"true"},null,-1)),r("div",{class:Z(["device",{dead:!o.value,tx:a.value}])},[r("div",ey,[r("div",ty,[r("span",{class:Z(["tip",{lit:a.value}])},null,2)]),r("button",{type:"button",class:Z(["knob pwr",{on:o.value}]),title:M(t)("radio.holo.power"),onClick:D},[fe[4]||(fe[4]=r("span",{class:"knob-face"},null,-1)),r("span",oy,m(M(t)("radio.holo.power")),1)],10,ny),r("button",{type:"button",class:Z(["knob dial",{off:!k.value}]),title:M(t)("radio.holo.dial"),onClick:fe[0]||(fe[0]=S=>T(1)),onContextmenu:fe[1]||(fe[1]=_t(S=>T(-1),["prevent"])),onWheel:_t(L,["prevent"])},[r("span",{class:"knob-face",style:Te({transform:E.value})},[...fe[5]||(fe[5]=[r("i",null,null,-1)])],4),r("span",ly,m(M(t)("radio.holo.dial")),1)],42,sy)]),r("div",iy,[r("div",{class:Z(["screen",{blank:!k.value}])},[r("div",ay,[r("span",null,m(M(t)("radio.title")),1),k.value?(c(),d("span",ry,m(M(t)("radio.holo.channel",{n:f.value+1,total:u.value.length})),1)):R("",!0),r("span",uy,[(c(),d(ne,null,ve(4,S=>r("i",{key:S,class:Z({on:S<=A.value})},null,2)),64))])]),k.value&&h.value?(c(),d(ne,{key:0},[r("p",cy,m(h.value.short),1),r("p",dy,m(h.value.label),1),r("div",fy,[r("span",{class:Z(["state",{hot:h.value.active&&a.value,quiet:!h.value.joined||h.value.muted}])},m(F.value),3),h.value.active?(c(),d("span",vy,m(M(t)("radio.holo.onKey")),1)):R("",!0),h.value.auto?(c(),d("span",py,m(M(t)("radio.holo.auto")),1)):R("",!0)]),r("div",{class:Z(["scope",{hot:h.value.active&&a.value,idle:!h.value.joined||h.value.muted}]),"aria-hidden":"true"},[(c(),d(ne,null,ve(Ty,S=>r("i",{key:S,style:Te({animationDelay:`${S*-97}ms`})},null,4)),64))],2)],64)):(c(),d("p",hy,m(w.value),1))],2),k.value?(c(),d("div",my,[r("button",{type:"button",class:"step",title:M(t)("radio.holo.prev"),onClick:fe[2]||(fe[2]=S=>T(-1))},"◀",8,gy),r("div",by,[(c(!0),d(ne,null,ve(u.value,S=>(c(),d("button",{key:S.key,type:"button",class:Z(["tick",{at:S.key===p.value,joined:S.joined,active:S.active}]),title:S.label,onClick:pe=>p.value=S.key},null,10,_y))),128))]),r("button",{type:"button",class:"step",title:M(t)("radio.holo.next"),onClick:fe[3]||(fe[3]=S=>T(1))},"▶",8,yy)])):R("",!0),r("div",ky,[r("button",{type:"button",class:Z(["key op-eyebrow",{off:!k.value,lit:(re=h.value)==null?void 0:re.joined}]),disabled:!k.value,onClick:N},m((ee=h.value)!=null&&ee.joined?M(t)("radio.holo.leave"):M(t)("radio.holo.join")),11,wy),r("button",{type:"button",class:Z(["key op-eyebrow",{off:!k.value||!((te=h.value)!=null&&te.joined),lit:($e=h.value)==null?void 0:$e.active}]),disabled:!k.value||!((Me=h.value)!=null&&Me.joined)||((Ne=h.value)==null?void 0:Ne.active),onClick:q},m((Re=h.value)!=null&&Re.active?M(t)("radio.holo.selected"):M(t)("radio.holo.select")),11,$y),r("button",{type:"button",class:Z(["key op-eyebrow",{off:!k.value||!((qe=h.value)!=null&&qe.joined),lit:(Ze=h.value)==null?void 0:Ze.muted}]),disabled:!k.value||!((le=h.value)!=null&&le.joined),onClick:W},m((Ce=h.value)!=null&&Ce.muted?M(t)("radio.holo.unmute"):M(t)("radio.holo.mute")),11,xy)]),fe[6]||(fe[6]=r("div",{class:"grille","aria-hidden":"true"},null,-1)),r("div",My,[r("button",{type:"button",class:"shut op-eyebrow",onClick:V},m(M(t)("radio.holo.close")),1)])]),r("button",{type:"button",class:Z(["ptt",{held:B.value,hot:a.value}]),title:M(t)("radio.holo.ptt"),onPointerdown:O,onPointerup:K,onPointercancel:K,onPointerleave:K},[r("span",Sy,m(M(t)("radio.holo.ptt")),1)],42,Cy)],2)])],2)):R("",!0)}}}),Ay=Fe(Ey,[["__scopeId","data-v-9453be5e"]]),Ly={key:0,class:"cap"},Oy=["src","onError"],Iy={key:2,class:"mark op-truncate"},Ry={key:3,class:"mark faint op-truncate"},Dy={key:4,class:"count"},Ny=He({__name:"SlotbarRoot",setup(e){const{t}=nt(),n=rt([]),s=C(!1),o=C({});let l;function i(){l!==void 0&&clearTimeout(l),l=void 0}ge("opx:inventory:slotbar",p=>{i();const f=kt(p.slots).map(w=>{const k=Oe(w);return{slot:Q(k.slot),key:x(k.key),name:x(k.name),label:x(k.label),image:x(k.image),count:Q(k.count)}}),h=Math.max(0,Q(p.holdMs));if(f.length===0||h<=0){s.value=!1,n.value=[];return}n.value=f,s.value=!0,l=setTimeout(()=>{s.value=!1},h)}),lt(i);function a(p){o.value={...o.value,[p]:!0}}const u=J(()=>n.value.map(p=>({...p,filled:p.name!=="",art:p.name!==""&&!o.value[p.name]?_l(p.name,p.image):"",mark:yl(p.label||p.name)})));return(p,f)=>s.value?(c(),d("div",{key:0,class:"slotbar",style:Te(M(Gs).bottomCenter>0?{bottom:`max(var(--op-inset-y), ${M(Gs).bottomCenter}px)`}:void 0)},[(c(!0),d(ne,null,ve(u.value,h=>(c(),d("span",{key:h.slot,class:"cell op-frame","data-augmented-ui":"tr-clip border"},[h.key?(c(),d("span",Ly,m(h.key),1)):R("",!0),h.art?(c(),d("img",{key:1,class:"art",src:h.art,alt:"",draggable:"false",onError:w=>a(h.name)},null,40,Oy)):h.filled?(c(),d("span",Iy,m(h.mark),1)):(c(),d("span",Ry,m(M(t)("inventory.slotbar.empty")),1)),h.count>1?(c(),d("span",Dy,m(h.count),1)):R("",!0)]))),128))],4)):R("",!0)}}),Py=Fe(Ny,[["__scopeId","data-v-b698cab2"]]),Hy={class:"prompts"},Fy={key:0,class:"title op-truncate"},By={class:"caps"},Vy={key:0,class:"join"},jy={class:"cap op-cap","data-augmented-ui":"tr-clip border"},Uy={class:"label op-truncate"},Ky={key:0,class:"value"},Wy=32,zy=24,Zy=6,Gy=He({__name:"PromptsRoot",setup(e){const{t}=nt(),n=["bottom-right","bottom-left","top-right","top-left"],s=rt([]),o=C("bottom-right"),l=C(0),i=C(420),a=C(!1);function u(k){const F=k.combo===!0;return kt(k.caps).slice(0,Zy).map((A,T)=>({key:`${T}:${x(A)}`,label:x(A),join:F&&T>0}))}ge("opx:prompts:config",k=>{const F=x(k.anchor);n.indexOf(F)!==-1&&(o.value=F);const A=Q(k.offset,-1);A>=0&&(l.value=Math.round(A));const T=Q(k.maxWidth);T>0&&(i.value=Math.round(T))}),ge("opx:prompts:frame",k=>{const F=new Set,A=[];let T=zy;for(const L of Ge(k.groups)){if(A.length>=Wy||T<=0)break;const E=x(L.key);if(!E||F.has(E))continue;const H=new Set,D=[];for(const N of Ge(L.rows)){if(T<=0)break;const q=x(N.key);if(!q||H.has(q))continue;const W=u(N);W.length!==0&&(H.add(q),D.push({key:q,caps:W,label:x(N.label),value:x(N.value),dim:N.dim===!0}),T-=1)}D.length!==0&&(F.add(E),A.push({key:E,title:x(L.title),rows:D}))}s.value=A,a.value=!1}),ge("opx:prompts:hide",()=>{a.value=!0});const p=C(null),f=J(()=>s.value.length>0&&!a.value);let h=null;function w(){const k=p.value;if(k===null||!f.value||o.value!=="bottom-right"){Es(0);return}Es(l.value+k.offsetHeight)}return bt([f,o,l],w,{flush:"post"}),Lt(()=>{xe("opx:prompts:ready",{}),p.value!==null&&typeof ResizeObserver!="undefined"&&(h=new ResizeObserver(w),h.observe(p.value)),w()}),ls(()=>{h!==null&&h.disconnect(),h=null,Es(0)}),(k,F)=>(c(),d("div",Hy,[r("div",{ref_key:"strip",ref:p,class:Z(["strip",[o.value,{open:f.value}]]),style:Te({"--strip-offset":l.value+"px","--strip-width":i.value+"px"})},[(c(!0),d(ne,null,ve(s.value,A=>(c(),d("div",{key:A.key,class:"group"},[A.title?(c(),d("div",Fy,m(M(t)(A.title)),1)):R("",!0),(c(!0),d(ne,null,ve(A.rows,T=>(c(),d("div",{key:T.key,class:Z(["row",{dim:T.dim}])},[r("span",By,[(c(!0),d(ne,null,ve(T.caps,L=>(c(),d("span",{key:L.key,class:"key"},[L.join?(c(),d("span",Vy,"+")):R("",!0),r("kbd",jy,m(L.label),1)]))),128))]),r("span",Uy,m(M(t)(T.label)),1),T.value?(c(),d("span",Ky,m(T.value),1)):R("",!0)],2))),128))]))),128))],6)]))}}),qy=Fe(Gy,[["__scopeId","data-v-8787c1c0"]]),Yy={class:"stage op-plane"},Xy={class:"bay op-bay op-arete","data-augmented-ui":"tr-clip bl-clip border"},Jy={class:"bay-inner op-interlace"},Qy={class:"head"},ek={class:"head-text"},tk={class:"eyebrow op-eyebrow"},nk={class:"op-truncate"},ok={key:0,class:"note op-copy"},sk={class:"grid"},lk=["aria-pressed","onClick"],ik={class:"index op-eyebrow","aria-hidden":"true"},ak={class:"card-text"},rk={class:"label op-label op-truncate"},uk={key:0,class:"district op-value op-truncate"},ck={key:1,class:"foot"},dk={class:"hint op-copy"},fk=240,vk=He({__name:"SpawnView",setup(e){const{t,has:n}=nt(),s=J(()=>n("spawn.eyebrow")?t("spawn.eyebrow"):"SPAWN"),o=C(!1),l=C(""),i=C(""),a=C(""),u=C([]),p=C("");let f;function h(D){return String(D+1).padStart(2,"0")}let w;function k(){w!==void 0&&clearTimeout(w),w=void 0}function F(){o.value=!1,k(),w=setTimeout(()=>{w=void 0,o.value||A()},fk)}function A(){o.value=!1,u.value=[],p.value="",l.value="",i.value="",a.value=""}function T(D){const N=u.value.length;if(N===0)return;const q=u.value.findIndex(W=>W.id===p.value);if(q===-1){p.value=D>0?u.value[0].id:u.value[N-1].id;return}p.value=u.value[(q+D+N)%N].id}function L(){!o.value||p.value===""||xe("opx:spawn:choose",{id:p.value})}function E(D){p.value=D,L()}function H(D){if(!(!o.value||po()!=="spawn")&&!D.defaultPrevented){if(D.key==="ArrowDown"||D.key==="ArrowRight"){D.preventDefault(),T(1);return}if(D.key==="ArrowUp"||D.key==="ArrowLeft"){D.preventDefault(),T(-1);return}D.key==="Enter"&&(D.preventDefault(),L())}}return ge("opx:spawn:open",D=>{Ie("spawn:open",()=>{const N=[];for(const q of Ge(D.locations)){const W=x(q.id);W&&N.push({id:W,label:x(q.label,W),district:x(q.district)})}N.length!==0&&(k(),u.value=N,l.value=x(D.title),i.value=x(D.about),a.value=x(D.hint),p.value="",o.value=!0,f==null||f(),f=Pt({id:"spawn",onEscape:()=>{}}))},void 0)}),ge("opx:spawn:close",D=>{Ie("spawn:close",()=>{F(),f==null||f(),f=void 0},void 0)}),Lt(()=>{window.addEventListener("keydown",H)}),lt(()=>{k(),window.removeEventListener("keydown",H),f==null||f()}),(D,N)=>(c(),d("div",{class:Z(["room op-ink",{open:o.value}])},[r("div",{class:Z(["scrim",{shown:o.value}])},null,2),r("div",Yy,[r("div",Xy,[r("div",Jy,[r("div",Qy,[r("div",ek,[r("span",tk,m(s.value),1),r("h1",nk,m(l.value),1)])]),i.value?(c(),d("p",ok,m(i.value),1)):R("",!0),r("ul",sk,[(c(!0),d(ne,null,ve(u.value,(q,W)=>(c(),d("li",{key:q.id,class:"slot op-enter",style:Te(`--op-slot: ${W}`)},[r("div",{class:Z(["card op-frame",{"is-on":q.id===p.value,"op-lift":q.id===p.value}]),"data-augmented-ui":"tr-clip border",role:"button","aria-pressed":q.id===p.value,onClick:B=>E(q.id)},[r("span",ik,m(h(W)),1),r("span",ak,[r("span",rk,m(q.label),1),q.district?(c(),d("span",uk,m(q.district),1)):R("",!0)])],10,lk)],4))),128))]),a.value?(c(),d("div",ck,[r("p",dk,m(a.value),1)])):R("",!0)])])])],2))}}),pk=Fe(vk,[["__scopeId","data-v-6a712047"]]),hk={class:"tags"},mk={class:"name"},gk={key:0,class:"user op-eyebrow"},bk={key:1,class:"cid"},_k={key:2,class:"badge"},yk=.5,kk=He({__name:"TagsRoot",setup(e){let t=!1;const n=rt([]),s=rt(new Map),o=C(!0),l=C(!0),i=C(!0),a=C(""),u=J(()=>n.value.map(f=>{const h=s.value.get(f.anchor);return h?{row:f,spot:h}:null}).filter(f=>f!==null));function p(f){const h=Math.round(f.spot.x*window.innerWidth),w=Math.round(f.spot.y*window.innerHeight);return{transform:`translate3d(${h}px, ${w}px, 0) translate(-50%, -100%)`,opacity:String(f.row.alpha)}}return ge("opx:admin:tags",f=>{switch(x(f.kind)){case"config":o.value=De(f.technical,!0),l.value=De(f.showUser,!0),i.value=De(f.showCitizen,!0),a.value=x(f.staffLabel);break;case"rows":n.value=Ge(f.rows).map(h=>({anchor:x(h.anchor),playerId:Math.round(Q(h.playerId)),name:x(h.name),user:x(h.user),citizenId:x(h.citizenId),staff:h.staff===!0,alpha:Math.max(0,Math.min(1,Q(h.alpha,1)))})).filter(h=>h.anchor!==""&&h.name!=="");break;case"hide":n.value=[];break}}),ge("open77:anchors",f=>{const h=kt(f.anchors);if(!t){t=!0;const k=h.length>0?Oe(h[0]):{};et(`keys=${Object.keys(f).join("|")} n=${h.length} entry=${Object.keys(k).join("|")} screen=${Object.keys(Oe(k.screen)).join("|")}`,"tags anchor batch")}const w=new Map;for(const k of h){const F=Oe(k),A=x(F.id)||x(F.anchor);if(A===""||F.onScreen===!1)continue;const T=Oe(F.screen),L=Q(T.x,Q(F.x,-1)),E=Q(T.y,Q(F.y,-1));if(L<0||E<0)continue;const H=Q(T.depth,Q(F.depth,-1));H>=0&&H(c(),d("div",hk,[(c(!0),d(ne,null,ve(u.value,w=>(c(),d("div",{key:w.row.anchor,class:Z(["tag",{staff:w.row.staff}]),style:Te(p(w))},[o.value?(c(),d("span",{key:0,class:Z(["id",{staff:w.row.staff}]),"data-augmented-ui":"tr-clip border"},m(w.row.playerId),3)):R("",!0),r("span",{class:Z(["plate",{staff:w.row.staff,bare:!o.value}])},[r("span",mk,m(w.row.name),1),l.value&&w.row.user?(c(),d("span",gk,m(w.row.user),1)):R("",!0),i.value&&w.row.citizenId?(c(),d("span",bk,m(w.row.citizenId),1)):R("",!0),w.row.staff&&a.value?(c(),d("span",_k,m(a.value),1)):R("",!0)],2)],6))),128))]))}}),wk=Fe(kk,[["__scopeId","data-v-1a7c1d5f"]]),$k=["data-depth"],xk={key:0,class:"status"},Mk={key:1,class:"status bad"},Ck={key:1,class:"rows",role:"menu"},Sk=["data-folder","tabindex","aria-disabled","aria-expanded","onMouseenter","onClick","onKeydown"],Tk={class:"glyph","aria-hidden":"true"},Ek={viewBox:"0 0 24 24"},Ak=["d"],Lk={class:"label op-label op-truncate"},Ok={class:"value op-value op-truncate"},Ik=["tabindex","aria-disabled","onMouseenter","onClick","onKeydown"],Rk={class:"glyph","aria-hidden":"true"},Dk={key:0,class:"spin"},Nk={key:1,viewBox:"0 0 24 24"},Pk=["d"],Hk={class:"label op-label op-truncate"},Fk=["aria-checked"],Bk={key:1,class:"hint"},Vk="/",jk=180,Uk=20,Eo=6,an=12,Rs=224,Ti=16,Kk=110,Wk=320,Ei=10,zk=He({__name:"TargetView",setup(e){const t=Rs+Ti,n=C(null),s=C(!1),o=C(!1),l=C(!1),i=C(!1),a=C(!1),u=C([]),p=C([]),f=C({looking:"",unavailable:""}),h=C(""),w=C({x:.5,y:.5}),k=C({x:.5,y:.5}),F=C({w:window.innerWidth,h:window.innerHeight}),A=C(null),T=C(0),L=C(!1),E=C(0);let H=90,D,N,q=null,W,B=0;const I={x:-1,y:-1};let O=null,K=null,V,be=!1,de=null,se=-1;function ie(U){return typeof U=="string"||typeof U=="number"}function fe(U){return n.value!==null&&U.handle===n.value}function re(U,y,v){return Math.max(y,Math.min(v,U))}function ee(U,y={}){n.value!==null&&xe(U,{...y,handle:n.value})}function te(U,y){if(U.length!==y.length)return!1;for(let v=0;vy.trim()).filter(y=>y!=="")}function Me(U){const y=U.length,v=[],b=new Map;for(const G of u.value){const ce=$e(G);let Le=!0;for(let me=0;mey){const me=ce[y],z=b.get(me);z===void 0?(b.set(me,1),v.push({kind:"folder",name:me,count:1})):b.set(me,z+1);continue}v.push({kind:"row",row:G})}}return v.map(G=>{var ce;return G.kind==="folder"?{...G,count:(ce=b.get(G.name))!=null?ce:1}:G})}const Ne=J(()=>{var y;const U=[];for(let v=0;v<=p.value.length;v+=1){const b=Me(p.value.slice(0,v));if(v>0&&b.length===0)break;U.push({depth:v,entries:b,openName:(y=p.value[v])!=null?y:""})}return U}),Re=J(()=>{var U,y;return s.value&&(i.value||a.value||((y=(U=Ne.value[0])==null?void 0:U.entries.length)!=null?y:0)>0)}),qe=J(()=>{const U=Ne.value.length;return U*Rs+Math.max(0,U-1)*Ti}),Ze=J(()=>E.value<0),le=J(()=>{const U=k.value.x*F.value.w,y=E.value<0?U-Eo-qe.value:U+Eo;return re(y,an,Math.max(an,F.value.w-qe.value-an))});function Ce(){if(E.value!==0)return;const U=k.value.x*F.value.w,y=F.value.w-an-(U+Eo),v=U-Eo-an,b=Rs+t;y>=b?E.value=1:v>=b?E.value=-1:E.value=y>=v?1:-1}function S(){B=0;const U=A.value;if(!U)return;const y=k.value.y*F.value.h;T.value=re(y-Uk,an,Math.max(an,F.value.h-U.offsetHeight-an))}function pe(){B===0&&(B=requestAnimationFrame(S))}function _e(){V!==void 0&&clearTimeout(V),V=void 0,K=null}function g(){D!==void 0&&clearTimeout(D),N!==void 0&&clearTimeout(N),D=void 0,N=void 0,_e()}function $(){g(),o.value=!1,i.value=!1,a.value=!1,l.value=!1,u.value=[],p.value=[],h.value="",q=null,E.value=0,O=null}function _(){$(),s.value=!1,n.value=null,L.value=!1,se=-1,be=!1,de=null,W==null||W(),W=void 0}function P(U){const y=A.value;return y?y.querySelector(`[data-depth="${U}"]`):null}function j(U){const y=P(U);return y?Array.from(y.querySelectorAll('[role="button"]:not([aria-disabled="true"])')):[]}function Y(){var y;const U=document.activeElement;return(y=U==null?void 0:U.closest('[role="button"]'))!=null?y:null}function ue(){var b;const U=document.activeElement,y=(b=U==null?void 0:U.closest("[data-depth]"))!=null?b:null,v=y?Number(y.dataset.depth):Number.NaN;return Number.isFinite(v)?v:p.value.length}function ae(U,y){if(O===null)return!1;const{ax:v,ay:b,nx:G,top:ce,bottom:Le}=O,me=(G-v)*(y-b)-(ce-b)*(U-v),z=-(Le-ce)*(U-G),Je=(v-G)*(y-Le)-(b-Le)*(U-G),It=me<0||z<0||Je<0,vt=me>0||z>0||Je>0;return!(It&&vt)}function oe(U){O=null,!(U<1||I.x<0)&&st(()=>{const y=P(U);if(!y)return;const v=y.getBoundingClientRect();O={ax:I.x,ay:I.y,nx:Ze.value?v.right:v.left,top:v.top-Ei,bottom:v.bottom+Ei}})}function X(U,y){o.value||(_e(),!te(U,p.value)&&(p.value=U,y?(L.value=!1,oe(U.length)):O=null,st(S)))}function we(U,y){V!==void 0&&clearTimeout(V),K={next:U,el:y};const v=ae(I.x,I.y)?Wk:Kk;V=setTimeout(()=>{V=void 0;const b=K;K=null,!(b===null||be)&&b.el.matches(":hover")&&X(b.next,!0)},v)}function he(U,y){if(o.value||L.value)return;const v=y.currentTarget;if(v instanceof HTMLElement){if(te(U,p.value)){_e();return}K!==null&&K.el===v&&te(K.next,U)||we(U,v)}}function ke(U){o.value||(_e(),o.value=!0,h.value=U.token,ee("opx:target:select",{token:U.token}))}function Se(U){if(U.clientX===I.x&&U.clientY===I.y||(I.x=U.clientX,I.y=U.clientY,L.value=!1,O!==null&&!ae(I.x,I.y)&&(O=null,K!==null&&we(K.next,K.el)),!s.value||o.value||Re.value))return;const y={x:re(U.clientX/F.value.w,0,1),y:re(U.clientY/F.value.h,0,1)};w.value=y,D===void 0&&(D=setTimeout(()=>{D=void 0,!(!s.value||o.value||Re.value)&&(q&&q.x===w.value.x&&q.y===w.value.y||(q={...w.value},ee("opx:target:hover",q)))},H))}function Ee(U){se=U.timeStamp}function ye(U){U.stopPropagation()}function Pe(U,y){const v=A.value;if(v===null)return!1;const b=v.getBoundingClientRect();return U>=b.left&&U<=b.right&&y>=b.top&&y<=b.bottom}function Ue(U){if(s.value){if(U.timeStamp===se){se=-1;return}Re.value&&Pe(U.clientX,U.clientY)||ee("opx:target:cancel")}}function Ye(U){U.preventDefault();const y=de;if(de=null,!s.value)return;if(Re.value||o.value){if(Re.value&&!o.value&&p.value.length>0){X(p.value.slice(0,-1),!1);return}ee("opx:target:cancel");return}const v=y!=null?y:{x:U.clientX,y:U.clientY};ee("opx:target:pick",{x:re(v.x/F.value.w,0,1),y:re(v.y/F.value.h,0,1)})}const ft=["ArrowDown","ArrowUp","Home","End"];function ut(U){var G;if(!s.value||!Re.value||po()!=="target")return;const y=U.key,v=Ze.value?"ArrowLeft":"ArrowRight",b=Ze.value?"ArrowRight":"ArrowLeft";if(ft.indexOf(y)!==-1){U.preventDefault();const ce=j(ue());if(ce.length===0)return;const Le=ce.indexOf(document.activeElement);let me;y==="Home"?me=0:y==="End"?me=ce.length-1:Le<0?me=y==="ArrowUp"?ce.length-1:0:me=(Le+(y==="ArrowDown"?1:-1)+ce.length)%ce.length,L.value=!0,ce[me].focus();return}if(y===v){const ce=(G=Y())==null?void 0:G.dataset.folder;if(ce===void 0||ce==="")return;U.preventDefault();const Le=ue();L.value=!0,X(p.value.slice(0,Le).concat([ce]),!1),st(()=>{var me;(me=j(Le+1)[0])==null||me.focus()});return}if(y===b){const ce=ue();if(ce<1)return;U.preventDefault();const Le=p.value[ce-1];L.value=!0,X(p.value.slice(0,ce-1),!1),st(()=>{var Je;const me=j(ce-1),z=me.find(It=>It.dataset.folder===Le);(Je=z!=null?z:me[0])==null||Je.focus()})}}function Tt(){F.value={w:window.innerWidth,h:window.innerHeight},pe()}function Ot(){be=!1,de=null,s.value&&ee("opx:target:cancel")}function tt(U){be=!0,U.button===2&&(de={x:U.clientX,y:U.clientY})}function it(){be=!1}function Ut(U){return Ge(U).map(y=>({token:x(y.token),label:x(y.label),description:x(y.description),group:x(y.group),icon:x(y.icon,"interact"),danger:De(y.danger),checked:typeof y.checked=="boolean"?y.checked:void 0}))}return ge("opx:target:open",U=>{Ie("target:open",()=>{if(!ie(U.handle))return;W==null||W(),$(),n.value=U.handle,H=re(Q(U.hoverMs,90),30,1e3);const y=Oe(U.labels);f.value={looking:x(y.looking),unavailable:x(y.unavailable)},F.value={w:window.innerWidth,h:window.innerHeight},w.value={x:.5,y:.5},k.value={x:.5,y:.5},se=-1,s.value=!0,W=Pt({id:"target",onEscape:()=>ee("opx:target:cancel")})},void 0)}),ge("opx:target:hover",U=>{!fe(U)||o.value||Re.value||(l.value=U.available===!0)}),ge("opx:target:loading",U=>{Ie("target:loading",()=>{fe(U)&&(g(),o.value=!0,a.value=!1,u.value=[],p.value=[],l.value=!1,O=null,E.value=0,k.value={x:re(Q(U.x,.5),0,1),y:re(Q(U.y,.5),0,1)},Ce(),N=setTimeout(()=>{N=void 0,!(!s.value||!o.value)&&(i.value=!0,st(S))},jk))},void 0)}),ge("opx:target:empty",U=>{fe(U)&&$()}),ge("opx:target:menu",U=>{Ie("target:menu",()=>{fe(U)&&(g(),o.value=!1,i.value=!1,a.value=!1,u.value=Ut(U.options),p.value=[],l.value=u.value.length>0,O=null,k.value={x:re(Q(U.x,k.value.x),0,1),y:re(Q(U.y,k.value.y),0,1)},Ce(),L.value=!1,st(S))},void 0)}),ge("opx:target:busy",U=>{fe(U)&&(_e(),o.value=!0,h.value=x(U.token))}),ge("opx:target:confirm",U=>{Ie("target:confirm",()=>{if(!fe(U))return;const y=x(U.token),v=x(U.label);o.value=!1,h.value="",!(y===""||v==="")&&(u.value=u.value.map(b=>b.token===y?{...b,label:v}:b))},void 0)}),ge("opx:target:error",U=>{fe(U)&&(o.value=!1,i.value=!1,h.value="",a.value=!0,st(S))}),ge("opx:target:close",U=>{U.handle!==void 0&&!fe(U)||_()}),window.addEventListener("resize",Tt),window.addEventListener("blur",Ot),window.addEventListener("keydown",ut),window.addEventListener("mousedown",tt,!0),window.addEventListener("mouseup",it,!0),lt(()=>{window.removeEventListener("resize",Tt),window.removeEventListener("blur",Ot),window.removeEventListener("keydown",ut),window.removeEventListener("mousedown",tt,!0),window.removeEventListener("mouseup",it,!0),g(),B!==0&&cancelAnimationFrame(B),B=0,W==null||W()}),(U,y)=>s.value?(c(),d("div",{key:0,class:Z(["eye-room",{available:l.value,busy:o.value}]),onMousemove:Se,onClick:Ue,onContextmenu:Ye},[Re.value?(c(),d("div",{key:0,ref_key:"listEl",ref:A,class:Z(["cascade",{flip:Ze.value}]),style:Te({left:`${le.value}px`,top:`${T.value}px`,width:`${qe.value}px`}),onClickCapture:Ee,onClick:ye},[(c(!0),d(ne,null,ve(Ne.value,v=>(c(),d("div",{key:v.depth,class:"column","data-depth":v.depth},[r("div",{class:Z(["plane",{keyboard:L.value}])},[v.depth===0?(c(),d(ne,{key:0},[i.value?(c(),d("p",xk,[y[0]||(y[0]=r("span",{class:"spin","aria-hidden":"true"},null,-1)),r("span",null,m(f.value.looking),1)])):a.value?(c(),d("p",Mk,m(f.value.unavailable),1)):R("",!0)],64)):R("",!0),i.value&&v.depth===0?R("",!0):(c(),d("div",Ck,[(c(!0),d(ne,null,ve(v.entries,b=>(c(),d("div",{key:b.kind==="folder"?`d:${b.name}`:`r:${b.row.token}`,class:"slot op-enter",style:{"--op-slot":"0"}},[b.kind==="folder"?(c(),d("div",{key:0,class:Z(["row",{off:o.value,open:v.openName===b.name}]),"data-augmented-ui":"tr-clip border","data-folder":b.name,role:"button",tabindex:o.value?-1:0,"aria-disabled":o.value,"aria-expanded":v.openName===b.name,onMouseenter:G=>he(p.value.slice(0,v.depth).concat([b.name]),G),onClick:G=>X(p.value.slice(0,v.depth).concat([b.name]),!0),onKeydown:[Jn(_t(G=>X(p.value.slice(0,v.depth).concat([b.name]),!1),["prevent"]),["enter"]),Jn(_t(G=>X(p.value.slice(0,v.depth).concat([b.name]),!1),["prevent"]),["space"])]},[r("span",Tk,[(c(),d("svg",Ek,[(c(!0),d(ne,null,ve(M(fi)("folder"),(G,ce)=>(c(),d("path",{key:ce,d:G},null,8,Ak))),128))]))]),r("span",Lk,m(b.name),1),r("span",Ok,m(b.count),1),y[1]||(y[1]=r("span",{class:"mark"},">",-1))],42,Sk)):(c(),d("div",{key:1,class:Z(["row",{danger:b.row.danger,pending:b.row.token===h.value,off:o.value&&b.row.token!==h.value}]),"data-augmented-ui":"tr-clip border",role:"button",tabindex:o.value?-1:0,"aria-disabled":o.value,onMouseenter:G=>he(p.value.slice(0,v.depth),G),onClick:G=>ke(b.row),onKeydown:[Jn(_t(G=>ke(b.row),["prevent"]),["enter"]),Jn(_t(G=>ke(b.row),["prevent"]),["space"])]},[r("span",Rk,[b.row.token===h.value?(c(),d("span",Dk)):(c(),d("svg",Nk,[(c(!0),d(ne,null,ve(M(fi)(b.row.icon),(G,ce)=>(c(),d("path",{key:ce,d:G},null,8,Pk))),128))]))]),r("span",Hk,m(b.row.label),1),b.row.checked!==void 0?(c(),d("span",{key:0,class:Z(["check",{ticked:b.row.checked}]),role:"checkbox","aria-checked":b.row.checked},[...y[2]||(y[2]=[r("svg",{viewBox:"0 0 13 13","aria-hidden":"true"},[r("path",{d:"M2.6 6.8 5 9.2 10 3.6"})],-1)])],10,Fk)):R("",!0),b.row.description?(c(),d("span",Bk,m(b.row.description),1)):R("",!0)],42,Ik))]))),128))]))],2)],8,$k))),128))],38)):R("",!0)],34)):R("",!0)}}),Zk=Fe(zk,[["__scopeId","data-v-0d67f474"]]);function Gk(e){if(window.Open77)return!1;const t=new Map,n={on(l,i){var u;const a=(u=t.get(l))!=null?u:[];a.push(i),t.set(l,a)},emit(l,i){console.info("[opx:dev-shim] emit",l,i),o(l,i)}};function s(l,i){var a;for(const u of(a=t.get(l))!=null?a:[])u(i)}function o(l,i){typeof i.ref=="string"&&setTimeout(()=>{s("opx:reply",{ref:i.ref,ok:!0,data:{echo:l}})},120)}return window.Open77=n,window.__OPX_DEV_SHIM__=!0,document.documentElement.setAttribute("data-opx-shim",e),setTimeout(()=>qk(s,e),0),!0}function qk(e,t){e("opx:locale:set",{strings:{"error.rpc_timeout":"No answer from the server","error.rpc_failed":"The server refused","demo.title":"Ripperdoc","demo.eyebrow":"Session","demo.tab.chrome":"Chrome","demo.tab.stock":"Stock","demo.tab.log":"Log","demo.row.name":"Operator","demo.row.balance":"Balance","demo.row.consent":"Consent on file","demo.row.hint":"Lua re-derives the balance; this is a display of its last answer.","demo.field.callsign":"Callsign","demo.field.district":"District","demo.field.dose":"Dose","demo.toast":"Link established","demo.gauge.health":"Health","demo.gauge.armour":"Armour"}}),t==="overlay"?(e("opx:notify:show",{id:"dev-1",kind:"success",title:"demo.toast",message:"Shimmed payload. No Lua is running.",durationMs:6e4}),e("opx:hud:vitals",{gauges:[{id:"health",label:"demo.gauge.health",value:78,tone:"health"},{id:"armour",label:"demo.gauge.armour",value:34,tone:"warn"}]})):e("opx:panel:open",{title:"demo.title",eyebrow:"demo.eyebrow",tabs:[{id:"chrome",label:"demo.tab.chrome"},{id:"stock",label:"demo.tab.stock",marked:!0},{id:"log",label:"demo.tab.log"}],rows:{}})}const Ai={accent:{property:"--op-red-rgb",kind:"rgb"},idle:{property:"--op-red-idle-rgb",kind:"rgb"},deep:{property:"--op-red-deep-rgb",kind:"rgb"},hi:{property:"--op-red-hi-rgb",kind:"rgb"},text:{property:"--op-red-text-rgb",kind:"rgb"},alarm:{property:"--op-alarm-rgb",kind:"rgb"},plate:{property:"--op-plate-rgb",kind:"rgb"},plateLit:{property:"--op-plate-lit-rgb",kind:"rgb"},plateAlpha:{property:"--op-plate-a",kind:"number",min:.2,max:.98},plateQuietAlpha:{property:"--op-plate-quiet-a",kind:"number",min:0,max:.98},plateLitAlpha:{property:"--op-plate-lit-a",kind:"number",min:.2,max:1},interlaceAlpha:{property:"--op-interlace-a",kind:"number",min:0,max:.15},tiltDeg:{property:"--op-tilt",kind:"deg",min:0,max:15},cutSm:{property:"--op-cut-sm",kind:"px",min:1,max:24},cutMd:{property:"--op-cut-md",kind:"px",min:1,max:48},cutLg:{property:"--op-cut-lg",kind:"px",min:1,max:80}},Yk=new Set(["cyberpunk"]),Li="data-op-style";function Oi(e,t,n){return en?n:e}function Ii(e){return typeof e=="number"&&Number.isFinite(e)?e:null}function Xk(e,t){var o,l;if(e.kind==="rgb"){if(!Array.isArray(t)||t.length!==3)return null;const i=[];for(const a of t){const u=Ii(a);if(u===null)return null;i.push(Math.round(Oi(u,0,255)))}return i.join(", ")}const n=Ii(t);if(n===null)return null;const s=Oi(n,(o=e.min)!=null?o:0,(l=e.max)!=null?l:1);return e.kind==="px"?`${Math.round(s)}px`:e.kind==="deg"?`${s}deg`:String(s)}function Jk(e){const t=document.documentElement;if(!t)return;for(const s of Object.values(Ai))t.style.removeProperty(s.property);t.removeAttribute(Li);const n=[];for(const s of Object.keys(e)){if(s==="style"){const i=e[s];typeof i=="string"&&Yk.has(i)?t.setAttribute(Li,i):n.push(s);continue}const o=wt(Ai,s);if(!o){n.push(s);continue}const l=Xk(o,e[s]);if(l===null){n.push(s);continue}t.style.setProperty(o.property,l)}n.length>0&&et(`theme keys refused: ${n.join(" ")}`,"theme")}function Qk(e){const{name:t,root:n,rootProps:s,allowFocus:o}=e,l=Gk(t);Ac(t),Lg(t),Hc(t,o),In("opx:locale:set",Nc),In("opx:theme:set",Jk),In("opx:images:set",Rg),xe("opx:images:ready",{}),xe("opx:theme:ready",{}),In("opx:loading:state",h1),xe("opx:loading:ready",{});const i=Cc(n,s);i.config.errorHandler=(u,p,f)=>{et(u,`app ${t} [${f}]`)};const a=document.getElementById("app");if(!a){et("no #app element in the document",`boot ${t}`);return}i.mount(a),l&&document.documentElement.classList.add("opx-dev-shim"),Ic("opx:ready",{surface:t})}const Xs=[];function ot(e){if(Xs.some(t=>t.id===e.id))throw new Error(`duplicate module id "${e.id}"`);Xs.push(e)}function Ao(e){return Xs.filter(t=>t.surface===e)}const ew=["data-module","data-failed"],tw=He({__name:"ModuleHost",props:{id:{}},setup(e){const t=e,n=C(!1),s=C("");return au((o,l,i)=>(n.value=!0,s.value=i,et(o,`module ${t.id} [${i}]`),Pc(t.id),!1)),(o,l)=>(c(),d("div",{class:"module-host","data-module":e.id,"data-failed":n.value?s.value:void 0},[n.value?R("",!0):cu(o.$slots,"default",{},void 0,!0,0)],8,ew))}}),Lo=Fe(tw,[["__scopeId","data-v-14bd1741"]]),nw={class:"surface"},ow={class:"layer layer-overlay"},sw={class:"layer layer-notice"},lw={class:"layer layer-cover"},iw=He({__name:"SurfaceRoot",setup(e){const t=Ao("overlay"),n=Ao("modal"),s=Ao("notice"),o=Ao("cover");return(l,i)=>(c(),d("div",nw,[r("div",ow,[(c(!0),d(ne,null,ve(M(t),a=>$t((c(),pt(Lo,{id:a.id,key:a.id},{default:On(()=>[(c(),pt(yo(a.component)))]),_:2},1032,["id"])),[[Do,!(a.hideWhileLoading&&M(Is))]])),128))]),r("div",{class:Z(["layer layer-modal",{"is-live":M(Rc)}])},[(c(!0),d(ne,null,ve(M(n),a=>$t((c(),pt(Lo,{id:a.id,key:a.id},{default:On(()=>[(c(),pt(yo(a.component)))]),_:2},1032,["id"])),[[Do,!(a.hideWhileLoading&&M(Is))]])),128))],2),r("div",sw,[(c(!0),d(ne,null,ve(M(s),a=>$t((c(),pt(Lo,{id:a.id,key:a.id},{default:On(()=>[(c(),pt(yo(a.component)))]),_:2},1032,["id"])),[[Do,!(a.hideWhileLoading&&M(Is))]])),128))]),r("div",lw,[(c(!0),d(ne,null,ve(M(o),a=>(c(),pt(Lo,{id:a.id,key:a.id},{default:On(()=>[(c(),pt(yo(a.component)))]),_:2},1032,["id"]))),128))])]))}}),aw=Fe(iw,[["__scopeId","data-v-85df2058"]]);ot({id:"hud",surface:"overlay",component:Tg,hideWhileLoading:!0});ot({id:"notify",surface:"notice",component:vb,hideWhileLoading:!0});ot({id:"prompts",surface:"overlay",component:qy,hideWhileLoading:!0});ot({id:"progress",surface:"overlay",component:j_,hideWhileLoading:!0});ot({id:"pool",surface:"overlay",component:J_,hideWhileLoading:!0});ot({id:"inventory-slotbar",surface:"overlay",component:Py,hideWhileLoading:!0});ot({id:"tags",surface:"overlay",component:wk,hideWhileLoading:!0});ot({id:"calls-holo",surface:"modal",component:xd,hideWhileLoading:!0});ot({id:"radio-holo",surface:"modal",component:Ay,hideWhileLoading:!0});ot({id:"chat-log",surface:"overlay",component:Vd,hideWhileLoading:!0});ot({id:"chat-input",surface:"modal",component:Nd});ot({id:"inventory",surface:"modal",component:p1});ot({id:"menu",surface:"modal",component:W1});ot({id:"form",surface:"modal",component:vm});ot({id:"panel",surface:"modal",component:D_});ot({id:"doorlock",surface:"modal",component:eh});ot({id:"target",surface:"modal",component:Zk,hideWhileLoading:!0});ot({id:"spawn",surface:"modal",component:pk});ot({id:"downed",surface:"modal",component:Uh});ot({id:"loading",surface:"cover",component:E1});Qk({name:"ui",root:aw,rootProps:{},allowFocus:!0});