@camstack/addon-admin-ui 1.2.182 → 1.2.184
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/{AddonCollectionPage-ClRQxGHN.js → AddonCollectionPage-BzpdE7aq.js} +1 -1
- package/dist/assets/{Addons-Bv7_AT7a.js → Addons-C5hgTn9V.js} +1 -1
- package/dist/assets/{AdminTabs-CFFk8Gq2.js → AdminTabs-HIawX4rf.js} +1 -1
- package/dist/assets/{AiProfiles-BkVvZjBt.js → AiProfiles-DrBBOud-.js} +1 -1
- package/dist/assets/{BrokerForm-CnbMKye3.js → BrokerForm-KIJAF_EA.js} +1 -1
- package/dist/assets/{Build-LHUANBaC.js → Build-C_qbwtSv.js} +1 -1
- package/dist/assets/{Capabilities-CQyVFXwc.js → Capabilities-Cgaaf8j7.js} +1 -1
- package/dist/assets/{CapabilityBadges-BVl3DqAY.js → CapabilityBadges-B1WFib1N.js} +1 -1
- package/dist/assets/{Cluster-BVyTdAw9.js → Cluster-CPKSdOcL.js} +1 -1
- package/dist/assets/{Data-IQvWpvwm.js → Data-cvpAQC3l.js} +1 -1
- package/dist/assets/{DetectionIntelligence-DYxoWljf.js → DetectionIntelligence-0ISlrjoz.js} +1 -1
- package/dist/assets/{DeviceAggregateSection-BkJvTv6R.js → DeviceAggregateSection-BBxzMWy1.js} +1 -1
- package/dist/assets/{DeviceDetail-B4CDw_uE.js → DeviceDetail-D5p-K-AT.js} +1 -1
- package/dist/assets/{Devices-Da6lCmM1.js → Devices-m6y6-YXR.js} +1 -1
- package/dist/assets/{EmbedPlayerPage-BrlPmwQN.js → EmbedPlayerPage-BQ2Tconb.js} +1 -1
- package/dist/assets/Events-CG4_nWNo.js +1 -0
- package/dist/assets/{FormBuilder-BHMEtnu5.js → FormBuilder-CkuE2PYz.js} +1 -1
- package/dist/assets/{Identity-BML0YvY7.js → Identity-X3fjnw2L.js} +1 -1
- package/dist/assets/{IntegrationDetail-D98ibjds.js → IntegrationDetail-5o7jGJsz.js} +1 -1
- package/dist/assets/{Integrations-jy5wlUOd.js → Integrations-Bs5QlYoO.js} +1 -1
- package/dist/assets/{Integrations-CBGusDGc.js → Integrations-CeSZ-5Xj.js} +1 -1
- package/dist/assets/{Locations-B5NgeJWC.js → Locations-63m73Mlu.js} +1 -1
- package/dist/assets/{Logs-DCvmzvJM.js → Logs-D3VAW4fc.js} +1 -1
- package/dist/assets/{MotionZonesSettings-DqnH_Gs6.js → MotionZonesSettings-Cq4KxBsU.js} +1 -1
- package/dist/assets/{MyAccess-BDptJLtf.js → MyAccess-Ekv_tHEa.js} +1 -1
- package/dist/assets/{Network-CYtzk3zV.js → Network-DbRVANPJ.js} +1 -1
- package/dist/assets/{NodeAddonsSettingsPanel-BGgUY4XE.js → NodeAddonsSettingsPanel-BqzyTJY3.js} +1 -1
- package/dist/assets/{NodeInferenceDevices-D3A4x8bv.js → NodeInferenceDevices-BgsDY3Uk.js} +1 -1
- package/dist/assets/{Notifications-BEmMmODG.js → Notifications-rEkRCQUO.js} +1 -1
- package/dist/assets/{Pipeline-CG87k4Oa.js → Pipeline-Bcs7EpRO.js} +1 -1
- package/dist/assets/{Plates-BTLd8fUg.js → Plates-C5X7uvTu.js} +1 -1
- package/dist/assets/{PrivacyMaskSettings-CbfH0ERf.js → PrivacyMaskSettings-COvPR-52.js} +1 -1
- package/dist/assets/{ProviderIcon-O8r_QNGL.js → ProviderIcon-DYmxPLD-.js} +1 -1
- package/dist/assets/{Recordings-d0qBQcso.js → Recordings-Ch-E_wTU.js} +1 -1
- package/dist/assets/{ScanNetworkModal-CtmBxzX9.js → ScanNetworkModal-Da1--M54.js} +1 -1
- package/dist/assets/{SceneMonitorEditor-BT0zgTYN.js → SceneMonitorEditor-IGWjGEpk.js} +1 -1
- package/dist/assets/{Scenes-NHLxYc_S.js → Scenes-Atrn4EBj.js} +1 -1
- package/dist/assets/{Settings-CK6wx_0Y.js → Settings-DuEkQT6G.js} +1 -1
- package/dist/assets/{Showroom-BKUzFfAO.js → Showroom-CvJZLsE7.js} +1 -1
- package/dist/assets/{StorageLocationsPanel-69SpAdoc.js → StorageLocationsPanel-d6ps1bLV.js} +1 -1
- package/dist/assets/{Terminal-CZexyI6Z.js → Terminal-Ccb_xSQP.js} +1 -1
- package/dist/assets/{Viewer-APDxxm2p.js → Viewer-BrAwp4pZ.js} +1 -1
- package/dist/assets/_virtual_mf-localSharedImportMap___mfe_internal__admin_ui_host-CbcUXPQ2.js +1 -0
- package/dist/assets/{authed-media-Cg9pZxod.js → authed-media-DXT60Xtk.js} +1 -1
- package/dist/assets/{bell-off-DVh1wvB6.js → bell-off-BmlVEUWZ.js} +1 -1
- package/dist/assets/{bell-ring-C6dXgglD.js → bell-ring-CXt-qsfb.js} +1 -1
- package/dist/assets/{boxes-B2bGIv3Y.js → boxes-CZBXiXKF.js} +1 -1
- package/dist/assets/circle-check-big-BVsxveYy.js +1 -0
- package/dist/assets/circle-dot-Dl-bGQ0a.js +1 -0
- package/dist/assets/circle-slash-C6wR98ct.js +1 -0
- package/dist/assets/{circle-x-DVtn0byc.js → circle-x-CQFLKzo1.js} +1 -1
- package/dist/assets/clock-Ccp1tRfR.js +1 -0
- package/dist/assets/{copy-BCOqkIux.js → copy-BWeRWSbl.js} +1 -1
- package/dist/assets/{debounced-invalidate-DbvO3iHu.js → debounced-invalidate-WaQjV7u8.js} +1 -1
- package/dist/assets/{dist-Cq7gfGRn.js → dist-BGb_n54X.js} +1 -1
- package/dist/assets/dist-DPeQerwB.js +349 -0
- package/dist/assets/{download-Dt_BbY-T.js → download-DQbELi0F.js} +1 -1
- package/dist/assets/{face-bbox-wpEQBKoF.js → face-bbox-BLszhJ6j.js} +1 -1
- package/dist/assets/{flame-DB_pOs8X.js → flame-CsbLsTym.js} +1 -1
- package/dist/assets/{format-size-BB-Sd9ut.js → format-size-CT75nIGM.js} +1 -1
- package/dist/assets/{hard-drive-BWmfHlkd.js → hard-drive-CAh_J2OL.js} +1 -1
- package/dist/assets/hostInit-BkELVlNE.js +1 -0
- package/dist/assets/{index-BCxSnXqL.js → index-DzvS1wMu.js} +3 -3
- package/dist/assets/{key-round-BqkosmYw.js → key-round-Bb9aq5bj.js} +1 -1
- package/dist/assets/{layers-Lhlv5z1U.js → layers-BA9BBnnd.js} +1 -1
- package/dist/assets/{location-owned-usage-D1xSRh8g.js → location-owned-usage-DQce9DU5.js} +1 -1
- package/dist/assets/{mf-entry-bootstrap-0-f8898cd2.js → mf-entry-bootstrap-0-a9539651.js} +2 -2
- package/dist/assets/{pencil-M7v7qavP.js → pencil-CBnbzkSq.js} +1 -1
- package/dist/assets/play-D5mOYn6w.js +1 -0
- package/dist/assets/{player-overlays-DbFWkG_Z.js → player-overlays-D7vHGiwH.js} +1 -1
- package/dist/assets/plus-DWP-Vk1W.js +1 -0
- package/dist/assets/power-BC8VTtZ1.js +1 -0
- package/dist/assets/{radio-CV4hi-g1.js → radio-DnPF2tgr.js} +1 -1
- package/dist/assets/{refresh-cw-Deiyupek.js → refresh-cw-CyEv0Mcj.js} +1 -1
- package/dist/assets/remoteEntry-BEq5zJLw.js +1 -0
- package/dist/assets/rotate-ccw-DSCG21wg.js +1 -0
- package/dist/assets/rotate-cw-DOwLhR87.js +1 -0
- package/dist/assets/{send-Clr6PN4I.js → send-BzdYAlvC.js} +1 -1
- package/dist/assets/{server-BE9Zw1mn.js → server-B8d3z6qp.js} +1 -1
- package/dist/assets/{shield-CZC9yz_v.js → shield-CgfoC6rY.js} +1 -1
- package/dist/assets/{shield-alert-Ca4rdJui.js → shield-alert-DmtRr3Vl.js} +1 -1
- package/dist/assets/square-DjbEc3qk.js +1 -0
- package/dist/assets/{square-check-big-DMuUREuL.js → square-check-big-BIoqc38U.js} +1 -1
- package/dist/assets/src-BPvS0Vsj.js +349 -0
- package/dist/assets/{src-CTrNqyF8.js → src-D4oL5wBE.js} +3 -3
- package/dist/assets/{undo-2-uDFd438J.js → undo-2-B2FZV3ct.js} +1 -1
- package/dist/assets/{use-scenes-feed-CWs5G4Fz.js → use-scenes-feed-BtrV20-T.js} +1 -1
- package/dist/assets/useEventInvalidation-DhDBoyZe.js +1 -0
- package/dist/assets/{useNodeUrlSelection-C-RIZqAN.js → useNodeUrlSelection-ZM-_7wni.js} +1 -1
- package/dist/assets/user-round-RneRHx_9.js +1 -0
- package/dist/assets/{video-DiXIeNMQ.js → video-0zUZ45FD.js} +1 -1
- package/dist/assets/{virtual_mf-REMOTE_ENTRY_ID___mfe_internal__admin_ui_host__remoteEntry-_hash_-8goUeGfT.js → virtual_mf-REMOTE_ENTRY_ID___mfe_internal__admin_ui_host__remoteEntry-_hash_-DCXY-PI5.js} +2 -2
- package/dist/assets/{wifi-DvjdHQli.js → wifi-C3C3dVds.js} +1 -1
- package/dist/assets/{zap-BoQkEUB5.js → zap-Cb6o0rjc.js} +1 -1
- package/dist/index.html +5 -5
- package/dist/server/addon.js +178 -12
- package/package.json +1 -1
- package/dist/assets/Events-XqdJMMnc.js +0 -1
- package/dist/assets/_virtual_mf-localSharedImportMap___mfe_internal__admin_ui_host-VrbJl3Qd.js +0 -1
- package/dist/assets/circle-check-big-D7yIDwoW.js +0 -1
- package/dist/assets/circle-dot-C3ZiQ9_N.js +0 -1
- package/dist/assets/circle-slash-BLDy7CCl.js +0 -1
- package/dist/assets/clock-Cps8N7BK.js +0 -1
- package/dist/assets/dist--2HmeXG6.js +0 -349
- package/dist/assets/hostInit-DoXLTGfC.js +0 -1
- package/dist/assets/play-CpJXJ88m.js +0 -1
- package/dist/assets/plus-Cpe6mmKM.js +0 -1
- package/dist/assets/power-uas7CntH.js +0 -1
- package/dist/assets/remoteEntry-I8A6vOgw.js +0 -1
- package/dist/assets/rotate-ccw-BftMdgSU.js +0 -1
- package/dist/assets/rotate-cw-BObSYKb8.js +0 -1
- package/dist/assets/square-DSQ5ASQ3.js +0 -1
- package/dist/assets/src-CHoZc4cE.js +0 -349
- package/dist/assets/useEventInvalidation-C9rmpIc-.js +0 -1
- package/dist/assets/user-round-CIt8A80d.js +0 -1
package/dist/server/addon.js
CHANGED
|
@@ -7306,6 +7306,23 @@ method(object({ deviceId: number() }), array(StreamSourceEntrySchema)), method(o
|
|
|
7306
7306
|
action: string().min(1),
|
|
7307
7307
|
input: unknown()
|
|
7308
7308
|
}), unknown(), { kind: "mutation" }), method(object({ deviceId: number() }), _void(), { kind: "mutation" }), method(object({ deviceId: number() }), unknown().nullable()), method(object({ deviceId: number() }), RawStateResultSchema.nullable(), { auth: "protected" });
|
|
7309
|
+
new Set([
|
|
7310
|
+
"track",
|
|
7311
|
+
"summary",
|
|
7312
|
+
"face",
|
|
7313
|
+
"identity",
|
|
7314
|
+
"plate",
|
|
7315
|
+
"vehicle",
|
|
7316
|
+
"scene",
|
|
7317
|
+
"motion",
|
|
7318
|
+
"object",
|
|
7319
|
+
"audio"
|
|
7320
|
+
]);
|
|
7321
|
+
new Set([
|
|
7322
|
+
"motion",
|
|
7323
|
+
"object",
|
|
7324
|
+
"audio"
|
|
7325
|
+
]);
|
|
7309
7326
|
var EncodeProfileSchema = object({
|
|
7310
7327
|
video: object({
|
|
7311
7328
|
codec: _enum([
|
|
@@ -12404,8 +12421,17 @@ method(object({
|
|
|
12404
12421
|
}), array(SettingsRecordSchema).readonly()), method(object({
|
|
12405
12422
|
namespace: string().optional(),
|
|
12406
12423
|
collection: string(),
|
|
12407
|
-
record:
|
|
12408
|
-
|
|
12424
|
+
record: object({
|
|
12425
|
+
id: string().optional(),
|
|
12426
|
+
data: record(string(), unknown())
|
|
12427
|
+
})
|
|
12428
|
+
}), object({
|
|
12429
|
+
/**
|
|
12430
|
+
* The id the row ACTUALLY got (D473): the one supplied, the UUID minted
|
|
12431
|
+
* for an absent one, or the ROWID SQLite assigned on an `INTEGER`
|
|
12432
|
+
* primary key — which is the only place an auto key is knowable.
|
|
12433
|
+
*/
|
|
12434
|
+
id: union([string(), number()]) }), { kind: "mutation" }), method(object({
|
|
12409
12435
|
namespace: string().optional(),
|
|
12410
12436
|
collection: string(),
|
|
12411
12437
|
records: array(BulkRecordSchema).readonly()
|
|
@@ -12514,8 +12540,17 @@ method(_void(), EngineInfoSchema, { auth: "admin" }), method(object({
|
|
|
12514
12540
|
}), array(SettingsRecordSchema).readonly(), { auth: "admin" }), method(object({
|
|
12515
12541
|
namespace: string().optional(),
|
|
12516
12542
|
collection: string(),
|
|
12517
|
-
record:
|
|
12518
|
-
|
|
12543
|
+
record: object({
|
|
12544
|
+
id: string().optional(),
|
|
12545
|
+
data: record(string(), unknown())
|
|
12546
|
+
})
|
|
12547
|
+
}), object({
|
|
12548
|
+
/**
|
|
12549
|
+
* The id the row ACTUALLY got (D473): the one supplied, the UUID minted
|
|
12550
|
+
* for an absent one, or the ROWID SQLite assigned on an `INTEGER`
|
|
12551
|
+
* primary key — which is the only place an auto key is knowable.
|
|
12552
|
+
*/
|
|
12553
|
+
id: union([string(), number()]) }), {
|
|
12519
12554
|
kind: "mutation",
|
|
12520
12555
|
auth: "admin"
|
|
12521
12556
|
}), method(object({
|
|
@@ -19157,7 +19192,20 @@ var TrackSchema = object({
|
|
|
19157
19192
|
...TrackRetrainFields
|
|
19158
19193
|
});
|
|
19159
19194
|
var BaseEventFields = {
|
|
19160
|
-
|
|
19195
|
+
/**
|
|
19196
|
+
* A SQLite ROWID, assigned by the database (D474).
|
|
19197
|
+
*
|
|
19198
|
+
* Was a 36-character UUID and cost 263 MB of a 1 117 MB database — paid
|
|
19199
|
+
* TWICE per row, in the row and in the primary-key index, across 2.1 million
|
|
19200
|
+
* motion, audio and object events. An `INTEGER PRIMARY KEY` in SQLite **is**
|
|
19201
|
+
* the rowid: the table itself is that B-tree, so the index stops existing
|
|
19202
|
+
* rather than getting smaller. No shorter string does that.
|
|
19203
|
+
*
|
|
19204
|
+
* Defined once here for all three event kinds, which is why they move
|
|
19205
|
+
* together: a per-table migration would have forked this and
|
|
19206
|
+
* `COMMON_BASE_COLUMNS` and reunited them two stages later.
|
|
19207
|
+
*/
|
|
19208
|
+
id: number().int(),
|
|
19161
19209
|
deviceId: number(),
|
|
19162
19210
|
timestamp: number()
|
|
19163
19211
|
};
|
|
@@ -19176,7 +19224,34 @@ var MotionEventSchema = object({
|
|
|
19176
19224
|
/** Omitted in slim projection. */
|
|
19177
19225
|
frameHeight: number().optional(),
|
|
19178
19226
|
/** Populated by B5 (recording playback URL for this event). */
|
|
19179
|
-
mediaUrl: string().optional()
|
|
19227
|
+
mediaUrl: string().optional(),
|
|
19228
|
+
/**
|
|
19229
|
+
* One row per motion EPISODE, not one per push (D475). `null` while the
|
|
19230
|
+
* episode is still open — a further rising edge extends it in place rather
|
|
19231
|
+
* than inserting a new row. Set once, at close, to `lastOnAt - startedAt`
|
|
19232
|
+
* (the span from the first rising edge to the LAST one, deliberately NOT
|
|
19233
|
+
* `closedAt - startedAt` — the close delay is a quiet CONFIRMATION, not
|
|
19234
|
+
* movement, and folding it in would report `MOTION_CLOSE_AFTER_MS` of
|
|
19235
|
+
* motion for an instantaneous trigger).
|
|
19236
|
+
*
|
|
19237
|
+
* **Absent** (not merely `null`) on a row written before D475 — that means
|
|
19238
|
+
* "closed the old way, before this column existed", never "still open".
|
|
19239
|
+
* Nothing in this codebase may read an absent `durationMs` as an open
|
|
19240
|
+
* episode; only `null` means open.
|
|
19241
|
+
*/
|
|
19242
|
+
durationMs: number().nullable().optional(),
|
|
19243
|
+
/**
|
|
19244
|
+
* Ms offsets from `timestamp` (the episode's own first rising edge, so the
|
|
19245
|
+
* first entry is always `0`) of every genuine off→on transition the
|
|
19246
|
+
* episode saw — "ogni evento on si deve salvare" (D475). NOT one entry per
|
|
19247
|
+
* push: a firmware source that keepalives at ~1 Hz for the whole burst
|
|
19248
|
+
* (Reolink, Hikvision) produces exactly one edge; a source that reports an
|
|
19249
|
+
* explicit `false` mid-episode and then resumes before the quiet window
|
|
19250
|
+
* elapses produces another. Stored compactly — see `motion-edge-codec.ts`
|
|
19251
|
+
* — and decoded back to this shape on read. Absent/empty on a legacy row,
|
|
19252
|
+
* which must never be read as "no episode happened here".
|
|
19253
|
+
*/
|
|
19254
|
+
edges: array(number()).readonly().optional()
|
|
19180
19255
|
});
|
|
19181
19256
|
/**
|
|
19182
19257
|
* Which detection SOURCE produced an object event. `pipeline` = the ML
|
|
@@ -19231,6 +19306,23 @@ var ObjectEventSchema = object({
|
|
|
19231
19306
|
* includes it (it is light). Absent on rows written before this field.
|
|
19232
19307
|
*/
|
|
19233
19308
|
frameId: string().optional(),
|
|
19309
|
+
/**
|
|
19310
|
+
* A PRODUCER-chosen key that makes a synthetic event's emission idempotent
|
|
19311
|
+
* (D474).
|
|
19312
|
+
*
|
|
19313
|
+
* Only the package detector writes it, and it exists because the event id
|
|
19314
|
+
* stopped being choosable: the delivery and pick-up rows used to BE their
|
|
19315
|
+
* dedupe key (`pa-pkg-<entryId>-delivered`), which is how "never emit a
|
|
19316
|
+
* second delivery for this entry" survived a restart. An `INTEGER` rowid is
|
|
19317
|
+
* assigned by SQLite, so that key had to move off the primary key rather
|
|
19318
|
+
* than be dropped — a detector that cannot recognise its own row re-delivers
|
|
19319
|
+
* every parcel on every boot.
|
|
19320
|
+
*
|
|
19321
|
+
* Absent on every other object event, and on every row written before this
|
|
19322
|
+
* field. Never a substitute for `id`: it is unique per (producer, occasion),
|
|
19323
|
+
* not per row, and nothing addresses a row by it.
|
|
19324
|
+
*/
|
|
19325
|
+
idempotencyKey: string().optional(),
|
|
19234
19326
|
/** Omitted in slim projection. */
|
|
19235
19327
|
trackId: string().optional(),
|
|
19236
19328
|
className: string(),
|
|
@@ -20333,6 +20425,14 @@ var NativeCropResultSchema = object({
|
|
|
20333
20425
|
* set `encodeJpeg: true`; `bytes` is then absent.
|
|
20334
20426
|
*/
|
|
20335
20427
|
jpeg: string().optional(),
|
|
20428
|
+
/**
|
|
20429
|
+
* The SAME compressed JPEG as `jpeg`, as bytes (D462). Present instead of
|
|
20430
|
+
* `jpeg` when the request set `acceptJpegBytes`; a request that did not gets
|
|
20431
|
+
* `jpeg` exactly as before. MsgPack and the mesh leg both carry binary —
|
|
20432
|
+
* `bytes` above has crossed this boundary as a `Uint8Array` all along — so
|
|
20433
|
+
* base64 was buying nothing but a multi-megabyte string in the relay's heap.
|
|
20434
|
+
*/
|
|
20435
|
+
jpegBytes: _instanceof(Uint8Array).optional(),
|
|
20336
20436
|
width: number().int().positive(),
|
|
20337
20437
|
height: number().int().positive(),
|
|
20338
20438
|
/**
|
|
@@ -20399,7 +20499,14 @@ var ParkTrackFrameResultSchema = discriminatedUnion("parked", [object({
|
|
|
20399
20499
|
})]);
|
|
20400
20500
|
/** A retrieved parcel — the runner's own JPEG, base64 for the wire. */
|
|
20401
20501
|
var ParkedTrackFrameSchema = object({
|
|
20402
|
-
|
|
20502
|
+
/**
|
|
20503
|
+
* Base64 JPEG — the pre-D462 wire. OPTIONAL since D462: a request that set
|
|
20504
|
+
* `acceptJpegBytes` is answered in `jpegBytes` and this is then absent.
|
|
20505
|
+
* Exactly one of the two is present.
|
|
20506
|
+
*/
|
|
20507
|
+
jpeg: string().optional(),
|
|
20508
|
+
/** The same JPEG as bytes, for a caller that declared it reads them (D462). */
|
|
20509
|
+
jpegBytes: _instanceof(Uint8Array).optional(),
|
|
20403
20510
|
width: number().int().positive(),
|
|
20404
20511
|
height: number().int().positive(),
|
|
20405
20512
|
/** The frame instant the parcel shows (the caller's clock, echoed back). */
|
|
@@ -20986,6 +21093,13 @@ method(RunnerCameraConfigSchema, object({ success: literal(true) }), { kind: "mu
|
|
|
20986
21093
|
bbox: NativeCropBboxSchema,
|
|
20987
21094
|
maxWidth: number().int().positive().optional(),
|
|
20988
21095
|
/**
|
|
21096
|
+
* The caller reads a `Uint8Array` (D462). When set, a JPEG answer comes
|
|
21097
|
+
* back in `jpegBytes` instead of base64 `jpeg`. Absent means the old
|
|
21098
|
+
* wire — never assume consent: a pre-D462 caller parses the field as
|
|
21099
|
+
* base64 and bytes would decode to garbage rather than fail.
|
|
21100
|
+
*/
|
|
21101
|
+
acceptJpegBytes: boolean().optional(),
|
|
21102
|
+
/**
|
|
20989
21103
|
* When `true`, the runner encodes the resolved crop to JPEG ON THE
|
|
20990
21104
|
* OWNING NODE and returns it in `jpeg` (base64) INSTEAD of raw `bytes`.
|
|
20991
21105
|
* Callers set this for CROSS-NODE fetches (`handle.nodeId` is a remote
|
|
@@ -21053,7 +21167,14 @@ method(RunnerCameraConfigSchema, object({ success: literal(true) }), { kind: "mu
|
|
|
21053
21167
|
}), ParkTrackFrameResultSchema, { kind: "mutation" }), method(object({
|
|
21054
21168
|
deviceId: number(),
|
|
21055
21169
|
trackId: string(),
|
|
21056
|
-
kind: ParkedFrameKindSchema
|
|
21170
|
+
kind: ParkedFrameKindSchema,
|
|
21171
|
+
/**
|
|
21172
|
+
* The caller reads a `Uint8Array` (D462). When set, a JPEG answer comes
|
|
21173
|
+
* back in `jpegBytes` instead of base64 `jpeg`. Absent means the old
|
|
21174
|
+
* wire — never assume consent: a pre-D462 caller parses the field as
|
|
21175
|
+
* base64 and bytes would decode to garbage rather than fail.
|
|
21176
|
+
*/
|
|
21177
|
+
acceptJpegBytes: boolean().optional()
|
|
21057
21178
|
}), ParkedTrackFrameSchema.nullable()), method(object({
|
|
21058
21179
|
deviceId: number(),
|
|
21059
21180
|
trackId: string()
|
|
@@ -26268,9 +26389,54 @@ object({
|
|
|
26268
26389
|
/** Ms epoch of the last detected-true observation. Null if never detected. */
|
|
26269
26390
|
lastDetectedAt: number().nullable(),
|
|
26270
26391
|
/**
|
|
26271
|
-
*
|
|
26272
|
-
*
|
|
26273
|
-
*
|
|
26392
|
+
* `MOTION_CLOSE_AFTER_MS` while `detected: true` on a `Camera` device,
|
|
26393
|
+
* `null` while false and on every `Sensor` device (D475) — see that
|
|
26394
|
+
* constant's doc for the one-authority rule.
|
|
26395
|
+
*
|
|
26396
|
+
* ## Reading this field still arms nothing
|
|
26397
|
+
*
|
|
26398
|
+
* It reads like an instruction to the consumer ("revert after N ms if
|
|
26399
|
+
* no fresh push arrives") and it is not one: nothing in this repo reads
|
|
26400
|
+
* the LIVE cap value to drive a timer. `pipeline-analytics`'s motion-episode
|
|
26401
|
+
* close DOES now use the same number — `MOTION_CLOSE_AFTER_MS` — but as an
|
|
26402
|
+
* imported constant, not as a read of `device.state.motion.value`, so this
|
|
26403
|
+
* field stays what it always was: DESCRIPTIVE output, mirroring an answer
|
|
26404
|
+
* computed elsewhere. Building a self-clear timer out of a READ of this
|
|
26405
|
+
* field would add a second falling-edge authority beside whichever one
|
|
26406
|
+
* already owns the device, and two that can disagree are worse than one.
|
|
26407
|
+
* Consumers that need a falling edge SHAPED differently — held open across
|
|
26408
|
+
* a flapping source — debounce on their own side and say so, as
|
|
26409
|
+
* `addon-export-alexa/src/motion-clear-hold.ts` and
|
|
26410
|
+
* `addon-export-hap`'s `RESET_DEBOUNCE_MS` both do.
|
|
26411
|
+
*
|
|
26412
|
+
* ## Who writes it
|
|
26413
|
+
*
|
|
26414
|
+
* - **Cameras** — the runner's phase machine, `active → watching` on
|
|
26415
|
+
* `cooldown_expired`, which then writes this slice with
|
|
26416
|
+
* `detected: false` (`handlePhaseChanged` in
|
|
26417
|
+
* `pipeline-runner/index.ts`). It produces the FALLING edge, which
|
|
26418
|
+
* matters most for the sources that only ever push a rising one:
|
|
26419
|
+
* Reolink emits `MotionOnMotionChanged { detected: true }` and never
|
|
26420
|
+
* a false.
|
|
26421
|
+
* - **Sensors** (Home Assistant binary sensors, Homematic) — the
|
|
26422
|
+
* provider pushes the false itself, from the upstream system's own
|
|
26423
|
+
* state change. No phase machine is involved.
|
|
26424
|
+
*
|
|
26425
|
+
* ### The phase machine is CANONICAL, not sole — and that is a defect
|
|
26426
|
+
*
|
|
26427
|
+
* An earlier revision of this docblock (mine, 2026-09-12) claimed the
|
|
26428
|
+
* phase machine is the sole writer for a camera. It is not.
|
|
26429
|
+
* `hikvision-camera.ts:3464` and `amcrest-camera.ts:445` both call
|
|
26430
|
+
* `setCapSlice(motionCapability, …)` on their own rising edge, and
|
|
26431
|
+
* Hikvision's comment says why: it read THIS docblock, agreed the
|
|
26432
|
+
* runner is canonical, and wrote anyway to avoid per-tick churn. So
|
|
26433
|
+
* two authorities can disagree about one slice, which this repo
|
|
26434
|
+
* forbids, and the doc said otherwise — which is worse than saying
|
|
26435
|
+
* nothing, because it reads as verification.
|
|
26436
|
+
*
|
|
26437
|
+
* This predates D475 and is not fixed there: the fix touches every
|
|
26438
|
+
* camera provider. Recorded in D475's Consequences. Do not restore the
|
|
26439
|
+
* "sole writer" wording without also removing the other writers.
|
|
26274
26440
|
*/
|
|
26275
26441
|
autoClearAfterMs: number().nullable()
|
|
26276
26442
|
});
|
|
@@ -38966,7 +39132,7 @@ var AdminUIAddon = class extends BaseAddon {
|
|
|
38966
39132
|
capability: adminUiCapability,
|
|
38967
39133
|
provider: {
|
|
38968
39134
|
getStaticDir: async () => ({ staticDir: resolveAdminUiDistDir() }),
|
|
38969
|
-
getVersion: async () => ({ version: "1.2.
|
|
39135
|
+
getVersion: async () => ({ version: "1.2.184" })
|
|
38970
39136
|
}
|
|
38971
39137
|
}];
|
|
38972
39138
|
}
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{I as e,K as t,Q as n,S as r,U as i,W as a,a as o,b as s,o as c,q as l,x as u,z as d}from"./_virtual_mf___mfe_internal__admin_ui_host__loadShare___mf_0_tanstack_mf_1_react_mf_2_query__loadShare__.js-DhP-Lgiq.js";import{X as f,Z as p,at as m}from"./player-overlays-DbFWkG_Z.js";import{Ca as h,Ct as g,Da as _,Ea as v,Fa as y,Ft as b,It as x,Jr as S,Jt as C,M as w,Ma as T,Mn as E,Mt as D,Na as O,Nt as k,Oa as A,Pa as j,Pt as M,Sa as N,Ta as P,Tt as F,Zs as I,_a as L,ba as R,ha as z,ia as B,ja as V,ka as H,ln as U,nc as W,un as G,va as ee,xa as te}from"./src-CTrNqyF8.js";import{lt as K,qt as ne}from"./src-CHoZc4cE.js";import{t as re}from"./clock-Cps8N7BK.js";import{t as ie}from"./copy-BCOqkIux.js";import{t as ae}from"./download-Dt_BbY-T.js";import{a as oe,c as se,d as ce,f as le,i as ue,m as de,n as fe,o as pe,p as me,r as he,s as ge,t as _e}from"./debounced-invalidate-DbvO3iHu.js";import{t as ve}from"./refresh-cw-Deiyupek.js";import{t as ye}from"./square-check-big-DMuUREuL.js";import{t as be}from"./square-DSQ5ASQ3.js";import{t as xe}from"./undo-2-uDFd438J.js";import{B as Se,F as Ce,J as q,L as we,c as Te,k as Ee,o as De,p as Oe,q as ke,r as Ae,t as je,w as J,z as Me}from"./index-BCxSnXqL.js";import{t as Ne}from"./AdminPage-CiKtOLQm.js";import{a as Pe,n as Fe,r as Ie,t as Le}from"./authed-media-Cg9pZxod.js";import{t as Re}from"./AdminTabs-CFFk8Gq2.js";var ze=q(`arrow-down-wide-narrow`,[[`path`,{d:`m3 16 4 4 4-4`,key:`1co6wj`}],[`path`,{d:`M7 20V4`,key:`1yoxec`}],[`path`,{d:`M11 4h10`,key:`1w87gc`}],[`path`,{d:`M11 8h7`,key:`djye34`}],[`path`,{d:`M11 12h4`,key:`q8tih4`}]]),Be=q(`bug`,[[`path`,{d:`m8 2 1.88 1.88`,key:`fmnt4t`}],[`path`,{d:`M14.12 3.88 16 2`,key:`qol33r`}],[`path`,{d:`M9 7.13v-1a3.003 3.003 0 1 1 6 0v1`,key:`d7y7pr`}],[`path`,{d:`M12 20c-3.3 0-6-2.7-6-6v-3a4 4 0 0 1 4-4h4a4 4 0 0 1 4 4v3c0 3.3-2.7 6-6 6`,key:`xs1cw7`}],[`path`,{d:`M12 20v-9`,key:`1qisl0`}],[`path`,{d:`M6.53 9C4.6 8.8 3 7.1 3 5`,key:`32zzws`}],[`path`,{d:`M6 13H2`,key:`82j7cp`}],[`path`,{d:`M3 21c0-2.1 1.7-3.9 3.8-4`,key:`4p0ekp`}],[`path`,{d:`M20.97 5c0 2.1-1.6 3.8-3.5 4`,key:`18gb23`}],[`path`,{d:`M22 13h-4`,key:`1jl80f`}],[`path`,{d:`M17.2 17c2.1.1 3.8 1.9 3.8 4`,key:`k3fwyw`}]]),Ve=q(`circle-dashed`,[[`path`,{d:`M10.1 2.182a10 10 0 0 1 3.8 0`,key:`5ilxe3`}],[`path`,{d:`M13.9 21.818a10 10 0 0 1-3.8 0`,key:`11zvb9`}],[`path`,{d:`M17.609 3.721a10 10 0 0 1 2.69 2.7`,key:`1iw5b2`}],[`path`,{d:`M2.182 13.9a10 10 0 0 1 0-3.8`,key:`c0bmvh`}],[`path`,{d:`M20.279 17.609a10 10 0 0 1-2.7 2.69`,key:`1ruxm7`}],[`path`,{d:`M21.818 10.1a10 10 0 0 1 0 3.8`,key:`qkgqxc`}],[`path`,{d:`M3.721 6.391a10 10 0 0 1 2.7-2.69`,key:`1mcia2`}],[`path`,{d:`M6.391 20.279a10 10 0 0 1-2.69-2.7`,key:`1fvljs`}]]),He=q(`circle`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}]]),Ue=q(`copy-plus`,[[`line`,{x1:`15`,x2:`15`,y1:`12`,y2:`18`,key:`1p7wdc`}],[`line`,{x1:`12`,x2:`18`,y1:`15`,y2:`15`,key:`1nscbv`}],[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`,key:`17jyea`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`,key:`zix9uf`}]]),We=q(`graduation-cap`,[[`path`,{d:`M21.42 10.922a1 1 0 0 0-.019-1.838L12.83 5.18a2 2 0 0 0-1.66 0L2.6 9.08a1 1 0 0 0 0 1.832l8.57 3.908a2 2 0 0 0 1.66 0z`,key:`j76jl0`}],[`path`,{d:`M22 10v6`,key:`1lu8f3`}],[`path`,{d:`M6 12.5V16a6 3 0 0 0 12 0v-3.5`,key:`1r8lef`}]]),Ge=q(`square-parking`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M9 17V7h4a3 3 0 0 1 0 6H9`,key:`1dfk2c`}]]),Ke=q(`star`,[[`path`,{d:`M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z`,key:`r04s7s`}]]),qe=q(`tag`,[[`path`,{d:`M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z`,key:`vktsd0`}],[`circle`,{cx:`7.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`kqv944`}]]);n();function Je(e){return e.subLabel??e.label}var Ye=720*60*60*1e3;function Xe(e){let t=[];for(let n of e)t.push(...n);return t}function Ze(e,t){let n=[...e];return n.sort((e,n)=>t===`importance`?n.importance-e.importance:n.timestamp-e.timestamp),n}function Qe(e,t){return e.filter(e=>!(e.importance<t.minImportance||t.cameras.size>0&&!t.cameras.has(e.deviceId)||t.classes.size>0&&!t.classes.has(e.className)))}function $e(e,t){return`${String(e)}:${t}`}function et(e,t){let n=new Map,r=new Set;for(let i of e){let e=$e(i.deviceId,i.trackId);if(!t.has(e)||r.has(e))continue;r.add(e);let a=n.get(i.deviceId);a?a.push(i.trackId):n.set(i.deviceId,[i.trackId])}return n}function tt(e,t){return{since:e.fromMs??t-Ye,until:e.toMs??t}}var nt=[`native`,`raster`,`standin`];function rt(e){return nt.some(t=>t===e)}var it={standin:{label:`stand-in`,title:`Stand-in: this tile is a face or plate detail crop copied in because no frame of the subject was captured. It is not a best shot.`,tone:`warning`},raster:{label:`low-res`,title:`Raster crop: a sub-native cut of the subject, not a native capture. Honest, but lower resolution than a best shot.`,tone:`info`}};function at(e){return e===`standin`?it.standin:e===`raster`?it.raster:null}var ot={"no-key-frame":`No key frame existed at close, so no native tile could be cut.`,"no-best-seen-bbox":`No subject box was ever recorded, so there was nothing to cut around.`,"derive-returned-null":`The close-time crop was attempted and produced nothing.`,"derive-threw":`The close-time crop failed with an error.`,"derive-not-wired":`No close-time crop was wired on this node.`,"no-media-store":`The node was shutting down mid-close.`,"no-thumbnail":`The track closed with no tile of any kind.`,"standin-tile":`The track closed with a detail crop standing in for the subject.`,"raster-tile":`The track closed with a sub-native raster crop of the subject.`,"native-tile":`The track closed with a native tile.`};function st(e){if(e===void 0)return null;let t=e.trim();if(t.length===0)return null;let n=t.split(/\s+/),r=n[0]??t,i=[];for(let e of n.slice(1)){let t=e.indexOf(`=`);t===-1?i.push({key:e,value:null}):i.push({key:e.slice(0,t),value:e.slice(t+1)})}return{sentence:ot[r]??r,detail:i,raw:t}}function ct(e){if(e===void 0||!Number.isFinite(e)||e<=0)return``;let t=e/1e3;if(t<60)return`${t.toFixed(1)}s`;let n=Math.floor(t/60),r=Math.round(t%60);return`${String(n)}m ${String(r).padStart(2,`0`)}s`}function lt({row:e,cameraName:t,nowMs:n,onOpenDetail:i,selected:a=!1,onToggleSelect:o,score:s,provenance:c,footer:l}){let d=Pe(e.bestEventId?`${Le}/${e.bestEventId}`:void 0),f=Math.round(e.importance*100),p=s===void 0?void 0:Math.round(s*100),m=ct(e.windowMs),h=()=>i(e),g=at(c);return r(`div`,{className:`relative flex flex-col rounded-md border bg-surface overflow-hidden ${a?`border-primary ring-1 ring-primary`:`border-border`}`,children:[r(`div`,{className:`aspect-video relative overflow-hidden bg-surface-hover`,children:[d.src?u(`img`,{src:d.src,alt:`Event from ${t}`,onClick:h,className:`h-full w-full cursor-zoom-in object-cover`}):u(`button`,{type:`button`,onClick:h,className:`flex h-full w-full flex-col items-center justify-center gap-1 bg-surface-hover text-foreground-subtle`,title:d.failed?`Key-event media unavailable`:`No key-event media`,children:u(de,{className:`h-6 w-6 opacity-60`})}),o&&u(`button`,{type:`button`,onClick:t=>{t.stopPropagation(),o($e(e.deviceId,e.trackId))},className:`absolute left-0 top-0 z-10 rounded-br-md bg-black/50 p-1.5 text-white hover:bg-black/70`,"aria-label":a?`Deselect`:`Select`,children:a?u(ye,{className:`h-4 w-4 text-primary`}):u(be,{className:`h-4 w-4`})}),p!==void 0&&r(`span`,{className:`absolute left-1 top-1 z-10 rounded bg-primary/85 px-1.5 py-0.5 text-[10px] font-semibold text-white tabular-nums`,title:`CLIP semantic-match score`,children:[String(p),`%`]}),f>0&&u(`span`,{className:`absolute right-1 top-1 z-10 rounded bg-black/60 px-1.5 py-0.5 text-[10px] font-semibold text-white`,children:String(f)}),g!==null&&u(`span`,{className:`absolute bottom-1 right-1 z-10 rounded px-1.5 py-0.5 text-[10px] font-semibold text-white ${g.tone===`warning`?`bg-warning/90`:`bg-black/70`}`,title:g.title,children:g.label}),(e.markForTrain===!0||e.debug===!0||e.favourited===!0)&&r(`span`,{className:`absolute bottom-1 left-1 z-10 flex gap-1`,children:[e.markForTrain===!0&&u(`span`,{className:`rounded bg-primary/85 p-0.5 text-white`,title:`Marked for training`,"aria-label":`Marked for training`,children:u(We,{className:`h-3 w-3`})}),e.debug===!0&&u(`span`,{className:`rounded bg-black/70 p-0.5 text-white`,title:`Flagged for debug`,"aria-label":`Flagged for debug`,children:u(Be,{className:`h-3 w-3`})}),e.favourited===!0&&u(`span`,{className:`rounded bg-primary/85 p-0.5 text-white`,title:`Favourited`,"aria-label":`Favourited`,children:u(Ke,{className:`h-3 w-3`})})]})]}),r(`button`,{type:`button`,onClick:h,className:`min-w-0 px-2 py-1.5 text-left space-y-0.5`,children:[r(`p`,{className:`text-[11px] font-medium text-foreground truncate`,title:e.className,children:[e.className,Je(e)?r(`span`,{className:`text-foreground-subtle`,children:[` · `,Je(e)]}):null]}),u(`p`,{className:`text-[10px] text-foreground-subtle truncate`,title:t,children:t}),r(`div`,{className:`flex items-center justify-between gap-2`,children:[u(`span`,{className:`text-[10px] text-foreground-subtle truncate`,children:le(e.timestamp,n)}),m&&u(`span`,{className:`text-[10px] text-foreground-subtle shrink-0`,children:m})]})]}),l!==void 0&&u(`div`,{className:`px-2 pb-1.5`,children:l})]})}var ut=1400,dt=`Admin-gated URL — opens only inside an authenticated session`;function ft({label:t,value:n,title:i}){let[a,o]=l(!1);return d(()=>{if(!a)return;let e=setTimeout(()=>o(!1),ut);return()=>clearTimeout(e)},[a]),r(`button`,{type:`button`,onClick:e(()=>{(async()=>{try{await navigator.clipboard.writeText(n),o(!0)}catch{window.prompt(`Copy the media URL:`,n)}})()},[n]),title:i,"aria-label":`Copy ${t} URL`,className:`flex min-w-0 items-center gap-1 rounded border px-1.5 py-0.5 text-[10px] font-medium transition-colors ${a?`border-emerald-500/40 bg-emerald-500/10 text-emerald-700 dark:text-emerald-300`:`border-border text-foreground-subtle hover:border-primary hover:text-foreground`}`,children:[u(a?Se:ie,{className:`h-2.5 w-2.5 shrink-0`}),u(`span`,{className:`truncate`,children:a?`Copied`:t})]})}function pt({localUrl:e,publicUrl:t}){return r(`div`,{className:`flex flex-wrap gap-1`,children:[u(ft,{label:`Local`,value:e,title:`Copy LAN URL — ${dt}`}),t&&u(ft,{label:`Public`,value:t,title:`Copy public URL — ${dt}`})]})}var mt={firstFrame:`First frame (track start)`,lastFrame:`Last frame (track end)`,thumbnail:`Best detection`,thumbnailSmall:`Best detection (480)`,snapshot:`Snapshot`,keyFrame:`Key frame (native-res)`,keyFrameSmall:`Key frame (960)`,crop:`Object crop`,fullFrame:`Full frame`,fullFrameBoxed:`Full frame (boxed)`,faceCrop:`Face crop`,plateCrop:`Plate crop`,sceneFrame:`Scene frame (clean, retired)`};function ht(e){return e in mt}function gt(e){return ht(e)?mt[e]:e}function _t(e,t){return`${e}${Fe}/${encodeURIComponent(t)}`}n();var vt=3e4;function yt(t){let[n,r]=l(null),i=e(e=>{r(t=>t??e)},[]);return d(()=>{t||r(null)},[t]),{publicOrigin:n,probes:t?u(bt,{onOrigin:i}):null}}function bt({onOrigin:e}){let{data:t}=E({capName:`network-access`});return u(s,{children:(t??[]).map(t=>u(xt,{addonId:t.addonId,onOrigin:e},t.addonId))})}function xt({addonId:e,onOrigin:t}){let{data:n}=B({addonId:e},{refetchInterval:vt,retry:!1});return d(()=>{let e=n?K.safeParse(n):null,r=e?.success?e.data.endpoint?.url:void 0;if(r)try{t(new URL(r).origin)}catch{}},[n,t]),null}var Y=typeof y==`function`,St=`Track flags arrive with the next server update`;function Ct(){return{mutateAsync:async()=>{throw Error(`setTrackFlags unavailable`)},isPending:!1}}var wt=Y?y:Ct;function Tt(e){if(typeof e!=`object`||!e||!(`trackId`in e)||!(`markForTrain`in e)||!(`debug`in e)||!(`favourited`in e))return null;let{trackId:t,markForTrain:n,debug:r,favourited:i}=e;return typeof t!=`string`||typeof n!=`boolean`||typeof r!=`boolean`||typeof i!=`boolean`?null:{trackId:t,markForTrain:n,debug:r,favourited:i}}n();function Et({label:e,hint:t,checked:n,disabled:i,title:a,icon:o,onToggle:s}){return r(`button`,{type:`button`,role:`switch`,"aria-checked":n,"aria-label":e,disabled:i,title:a,onClick:s,className:`flex w-full items-center gap-2 rounded-md border px-2 py-1.5 text-left transition-colors disabled:opacity-50 ${n?`border-primary bg-primary/10`:`border-border bg-surface hover:bg-surface-hover`}`,children:[u(`span`,{className:n?`text-primary`:`text-foreground-subtle`,children:o}),r(`span`,{className:`min-w-0 flex-1`,children:[u(`span`,{className:`block text-[11px] font-medium text-foreground`,children:e}),u(`span`,{className:`block text-[10px] text-foreground-subtle`,children:t})]}),u(`span`,{"aria-hidden":`true`,className:`h-4 w-7 shrink-0 rounded-full p-0.5 transition-colors ${n?`bg-primary`:`bg-border`}`,children:u(`span`,{className:`block h-3 w-3 rounded-full bg-white transition-transform ${n?`translate-x-3`:``}`})})]})}function Dt({deviceId:e,trackId:t,markForTrain:n,debug:i,favourited:a,onChange:o}){let s=wt(),[c,d]=l(null),f=c?.markForTrain??n===!0,p=c?.debug??i===!0,m=c?.favourited??a===!0,h=!Y||s.isPending,g=Y?void 0:St,_=n=>{h||(async()=>{try{let r=Tt(await s.mutateAsync({deviceId:e,trackId:t,flags:n}));if(!r)return;d(r),o?.(r)}catch(e){let t=e instanceof Error?e.message:``;window.alert(t===``?`Could not update this track. Check the server logs.`:`Could not update this track — ${t}`)}})()};return r(`div`,{className:`grid gap-1.5 sm:grid-cols-2`,children:[u(Et,{label:`Mark for training`,hint:`Keeps this track and its media past retention`,checked:f,disabled:h,...g===void 0?{}:{title:g},icon:u(We,{className:`h-4 w-4`}),onToggle:()=>_({markForTrain:!f})}),u(Et,{label:`Debug`,hint:`Flag this track for diagnostic attention`,checked:p,disabled:h,...g===void 0?{}:{title:g},icon:u(Be,{className:`h-4 w-4`}),onToggle:()=>_({debug:!p})}),u(Et,{label:`Favourited`,hint:`Keeps this track and its media past retention`,checked:m,disabled:h,...g===void 0?{}:{title:g},icon:u(Ke,{className:`h-4 w-4`}),onToggle:()=>_({favourited:!m})})]})}var X=100,Ot=120,kt={polyline:``,points:[],snapshots:[],start:null,end:null,peakBox:null},Z=e=>e<0?0:e>1?1:e,Q=e=>Math.round(e*100)/100;function At(e,t){if(e.length<=t)return[...e];let n=(e.length-1)/(t-1),r=[];for(let i=0;i<t;i++)r.push(e[Math.round(i*n)]);return r[r.length-1]=e[e.length-1],r}function jt(e,t,n){if(e.length===0||t===null)return kt;let{width:r,height:i}=t;if(!Number.isFinite(r)||!Number.isFinite(i)||r<=0||i<=0)return kt;let a=At(e,n?.maxPoints??Ot).map(e=>({x:Q(Z(e.x/r)*X),y:Q(Z(e.y/i)*X)})),o=a[0]??null,s=a[a.length-1]??null,c=a.length>=2?a.map(e=>`${e.x},${e.y}`).join(` `):``,l=(n?.snapshots??[]).map(e=>({x:Q(Z(e.x/r)*X),y:Q(Z(e.y/i)*X),mediaKey:e.mediaKey})),u=null,d=-1;for(let t of e){let e=Z(t.bbox.w/r)*Z(t.bbox.h/i);e>d&&(d=e,u=t)}return{polyline:c,points:a,snapshots:l,start:o,end:s,peakBox:u?{x:Q(Z(u.bbox.x/r)*X),y:Q(Z(u.bbox.y/i)*X),w:Q(Z(u.bbox.w/r)*X),h:Q(Z(u.bbox.h/i)*X)}:null}}var Mt=typeof L==`function`,Nt=`Track deletion arrives with the next server update`;function Pt(){return{mutateAsync:async()=>{throw Error(`deleteTracks unavailable`)},isPending:!1}}var Ft=Mt?L:Pt;n();var It=15e3;function Lt(e){return`${Le}/${encodeURIComponent(e)}`}var Rt=f();function zt({mediaKey:e,label:t}){let{src:n,failed:r}=Pe(Lt(e));return n===null?u(`div`,{className:`flex h-full w-full items-center justify-center bg-surface-hover`,children:r?u(de,{className:`h-4 w-4 text-foreground-subtle opacity-60`}):u(J,{className:`h-4 w-4 animate-spin text-foreground-subtle opacity-70`})}):u(`img`,{src:n,alt:t,className:`h-full w-full object-cover`})}var Bt=new Set([`firstFrame`,`lastFrame`,`thumbnail`,`snapshot`]),Vt=new Set([`keyFrame`,`fullFrame`,`fullFrameBoxed`,`firstFrame`,`lastFrame`,`thumbnail`,`snapshot`]);function Ht(e){let[t,n]=l(null);return d(()=>{if(n(null),!e)return;let t=!1,r=new Image;return r.onload=()=>{t||n({width:r.naturalWidth,height:r.naturalHeight})},r.src=e,()=>{t=!0,r.onload=null}},[e]),t}function Ut({overlay:e,onPickSnapshot:t}){return!e.polyline&&!e.peakBox&&e.snapshots.length===0?null:r(`svg`,{viewBox:`0 0 100 100`,preserveAspectRatio:`none`,className:`pointer-events-none absolute inset-0 h-full w-full`,children:[e.peakBox&&u(`rect`,{x:e.peakBox.x,y:e.peakBox.y,width:e.peakBox.w,height:e.peakBox.h,fill:`none`,stroke:`#f59e0b`,strokeWidth:2,vectorEffect:`non-scaling-stroke`,rx:1}),e.polyline&&u(`polyline`,{points:e.polyline,fill:`none`,stroke:`#38bdf8`,strokeWidth:2,strokeLinejoin:`round`,strokeLinecap:`round`,strokeOpacity:.85,vectorEffect:`non-scaling-stroke`}),e.points.map((e,t)=>u(`circle`,{cx:e.x,cy:e.y,r:1,fill:`#38bdf8`,fillOpacity:.6,vectorEffect:`non-scaling-stroke`},`${String(e.x)}-${String(e.y)}-${String(t)}`)),e.snapshots.map((e,n)=>u(`circle`,{cx:e.x,cy:e.y,r:1.9,fill:`#0ea5e9`,fillOpacity:.95,stroke:`#082f49`,strokeWidth:.7,vectorEffect:`non-scaling-stroke`,className:t?`pointer-events-auto cursor-pointer`:void 0,onClick:t?n=>{n.stopPropagation(),t(e.mediaKey)}:void 0,children:u(`title`,{children:`Snapshot checkpoint — click to view this frame`})},`snap-${e.mediaKey}-${String(n)}`)),e.start&&u(`circle`,{cx:e.start.x,cy:e.start.y,r:2.4,fill:`#22c55e`,stroke:`#052e16`,strokeWidth:.6,vectorEffect:`non-scaling-stroke`}),e.end&&u(`circle`,{cx:e.end.x,cy:e.end.y,r:2.4,fill:`#ef4444`,stroke:`#450a0a`,strokeWidth:.6,vectorEffect:`non-scaling-stroke`})]})}function $({label:e,value:t,mono:n}){return r(`div`,{className:`flex items-baseline justify-between gap-3 border-b border-border/60 py-1.5 last:border-0`,children:[u(`span`,{className:`shrink-0 text-[11px] uppercase tracking-wide text-foreground-subtle`,children:e}),u(`span`,{className:`min-w-0 truncate text-right text-xs font-medium text-foreground ${n?`font-mono text-[11px]`:``}`,title:t,children:t})]})}function Wt({row:t,cameraName:n,deleteAvailable:i,onClose:o,onDeleted:c,onFlagsChanged:f}){let p=m(),_=Ft(),v=t!==null,y=t?.deviceId??0,b=t?.trackId??``,S=t?.bestEventId??``,C=t?.timestamp??0,w=t?.windowMs??0,{data:T}=te({deviceId:y,trackId:b},{enabled:v}),{data:E}=A({trackId:b,deviceId:y},{enabled:v}),{data:D}=h({eventId:S,deviceId:y},{enabled:v&&S!==``}),{data:O}=I({deviceId:y,since:C-It,until:C+w+It},{enabled:v}),[k,j]=l(null),[M,N]=l(!1),{publicOrigin:P,probes:L}=yt(v);d(()=>{j(null)},[y,b]);let R=a(()=>{let e=E??[],t=D??[];return e.find(e=>e.kind===`keyFrame`)||t.find(e=>e.kind===`fullFrameBoxed`)||([...t,...e].find(e=>e.kind===`crop`)??null)},[E,D]),z=k??R,B=Pe(z?Lt(z.key):void 0),V=a(()=>{let e=new Set,t=[];for(let n of[...D??[],...E??[]])n.key===``||e.has(n.key)||(e.add(n.key),t.push(n));return t},[D,E]),H=a(()=>V.find(e=>Bt.has(e.kind))??null,[V]),U=Ht(Pe(H?Lt(H.key):void 0).src),W=a(()=>jt(T?.positions??[],U,{snapshots:(T?.snapshots??[]).map(e=>({x:e.position.x,y:e.position.y,mediaKey:e.mediaKey}))}),[T?.positions,T?.snapshots,U]),G=e(e=>{let t=V.find(t=>t.key===e);t&&j(t)},[V]);if(t===null)return null;let ee=B.src,K=z?.kind,ne=K!==void 0&&Vt.has(K)&&U!==null&&(T?.positions.length??0)>=2,re=O&&O.length>0?O[0]:null,ie=()=>{re&&(N(!0),(async()=>{try{let e=await p.trpcClient.videoclips.getClipPlayback.query({deviceId:t.deviceId,clipId:re.id});window.open(e.playbackUrl,`_blank`,`noopener`)}catch{window.alert(`Could not resolve clip playback. Check the server logs.`)}finally{N(!1)}})())},ae=()=>{!i||_.isPending||window.confirm(`Delete this track and all its media? This cannot be undone.`)&&(async()=>{try{await _.mutateAsync({deviceId:t.deviceId,trackIds:[t.trackId]}),c()}catch{window.alert(`Failed to delete this track. Check the server logs.`)}})()},oe=Math.round(t.importance*100),se=T?.importanceReason?`${String(oe)}% · ${T.importanceReason}`:`${String(oe)}%`,le=T?.zonesVisited&&T.zonesVisited.length>0?T.zonesVisited.join(`, `):`—`,ue=T?.audioLabels&&T.audioLabels.length>0?T.audioLabels.map(e=>`${e.label} ×${String(e.count)} (${String(Math.round(e.peakScore*100))}%)`).join(` · `):`—`,pe=T?T.totalDistance.toFixed(2):`—`,he=st(T?.previewMissReason),ge=me(T?T.firstSeen:C),_e=T?me(T.lastSeen):`—`;return u(g,{open:!0,onOpenChange:e=>!e&&o(),children:r(F,{width:`lg`,placement:`sheet-on-mobile`,"aria-label":`Event detail`,className:`flex h-[92dvh] flex-col gap-0 overflow-hidden p-0 bottom-0 left-0 right-0 top-auto w-full max-w-full translate-x-0 translate-y-0 rounded-b-none md:bottom-auto md:left-1/2 md:right-auto md:top-1/2 md:h-auto md:w-[calc(100vw-2rem)] md:max-w-xl md:-translate-x-1/2 md:-translate-y-1/2 md:rounded-lg md:max-h-[calc(100dvh-2rem)]`,children:[r(`header`,{className:`flex shrink-0 items-start justify-between gap-2 border-b border-border px-4 py-3`,children:[r(`div`,{className:`min-w-0`,children:[r(`div`,{className:`truncate text-sm font-semibold text-foreground`,children:[t.className,Je(t)?r(`span`,{className:`text-foreground-subtle`,children:[` · `,Je(t)]}):null]}),u(`div`,{className:`mt-0.5 truncate text-[11px] text-foreground-subtle`,children:n})]}),u(`button`,{type:`button`,onClick:o,className:`rounded p-1 text-foreground-subtle hover:bg-surface-hover hover:text-foreground`,"aria-label":`Close`,children:u(Ae,{className:`h-4 w-4`})})]}),r(`div`,{className:`min-h-0 flex-1 space-y-3 overflow-y-auto overscroll-contain px-4 py-3`,children:[ee?u(`div`,{className:`overflow-hidden rounded-lg border border-border bg-background`,children:u(fe,{src:ee,alt:`Key frame from ${n}`,fit:`natural`,className:`w-full`,overlay:ne?u(Ut,{overlay:W,onPickSnapshot:G}):void 0})}):u(`div`,{className:`flex aspect-video w-full flex-col items-center justify-center gap-1.5 rounded-lg border border-border bg-surface-hover text-foreground-subtle`,children:B.failed?r(s,{children:[u(de,{className:`h-8 w-8 opacity-60`}),u(`span`,{className:`text-[11px]`,children:`Key-frame media unavailable`})]}):u(J,{className:`h-6 w-6 animate-spin opacity-70`})}),V.length>0&&u(`div`,{className:`-mx-1 flex gap-2 overflow-x-auto px-1 pb-1`,children:V.map(e=>{let t=gt(e.kind),n=_t(Rt,e.key),i=P?_t(P,e.key):null;return r(`figure`,{className:`flex w-32 shrink-0 flex-col gap-1`,children:[u(`button`,{type:`button`,onClick:()=>j(e),className:`relative h-16 w-full overflow-hidden rounded border border-border hover:border-primary`,title:`${t} · ${me(e.timestamp)}`,children:u(zt,{mediaKey:e.key,label:t})}),r(`figcaption`,{className:`min-w-0 px-0.5`,children:[u(`div`,{className:`truncate text-[10px] font-medium leading-tight text-foreground`,title:t,children:t}),u(`div`,{className:`text-[10px] leading-tight text-foreground-subtle`,title:me(e.timestamp),children:ce(e.timestamp)})]}),u(pt,{localUrl:n,publicUrl:i})]},e.key)})}),L,re&&r(x,{variant:`secondary`,onClick:ie,disabled:M,children:[M?u(J,{className:`h-3.5 w-3.5 animate-spin`}):u(Ee,{className:`h-3.5 w-3.5`}),` `,`View clip`]}),u(Dt,{deviceId:t.deviceId,trackId:t.trackId,...(T?.markForTrain??t.markForTrain)===void 0?{}:{markForTrain:T?.markForTrain??t.markForTrain},...(T?.debug??t.debug)===void 0?{}:{debug:T?.debug??t.debug},...(T?.favourited??t.favourited)===void 0?{}:{favourited:T?.favourited??t.favourited},onChange:f}),he!==null&&r(`div`,{className:`rounded-lg border border-warning/40 bg-warning/8 px-3 py-2`,children:[u(`p`,{className:`text-[11px] font-semibold uppercase tracking-wide text-foreground-subtle`,children:`Best shot`}),u(`p`,{className:`mt-0.5 text-xs text-foreground`,children:he.sentence}),u(`code`,{className:`mt-1 block break-all font-mono text-[10px] text-foreground-subtle`,children:he.raw})]}),r(`div`,{className:`rounded-lg border border-border bg-surface px-3 py-1`,children:[u($,{label:`Camera`,value:n}),u($,{label:`Class`,value:t.className}),u($,{label:`Label`,value:t.label??`—`}),u($,{label:`Sub-label`,value:t.subLabel??`—`}),u($,{label:`Importance`,value:se}),u($,{label:`Zones visited`,value:le}),u($,{label:`Audio heard`,value:ue}),u($,{label:`Total distance`,value:pe}),u($,{label:`First seen`,value:ge}),u($,{label:`Last seen`,value:_e}),u($,{label:`Track`,value:t.trackId,mono:!0})]})]}),u(`footer`,{className:`flex shrink-0 items-center justify-end gap-2 border-t border-border px-4 py-3 pb-[max(0.75rem,env(safe-area-inset-bottom))]`,children:u(`span`,{title:i?void 0:Nt,children:r(x,{variant:`secondary`,onClick:ae,disabled:!i||_.isPending,children:[_.isPending?u(J,{className:`h-3.5 w-3.5 animate-spin`}):u(De,{className:`h-3.5 w-3.5`}),` `,`Delete track`]})})})]})})}var Gt=`pipeline-analytics`,Kt=`debug.listTracks`,qt=`debug.analyze`,Jt=p(`/addon/pipeline-analytics/debug-export`);function Yt(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function Xt(e,t){let n=e[t];return typeof n==`string`?n:null}function Zt(e,t){let n=e[t];return typeof n==`number`&&Number.isFinite(n)?n:null}function Qt(e,t){let n=e[t];return typeof n==`boolean`?n:null}function $t(e){return e===`error`||e===`warn`||e===`info`}function en(e){if(!Yt(e))return null;let t=Xt(e,`code`),n=Xt(e,`detail`),r=e.severity;return t===null||n===null||!$t(r)?null:{code:t,severity:r,detail:n}}function tn(e){if(!Yt(e))return null;let t=Xt(e,`trackId`),n=Zt(e,`deviceId`),r=Xt(e,`className`),i=Zt(e,`firstSeen`),a=Zt(e,`lastSeen`),o=Zt(e,`durationMs`),s=Qt(e,`active`);if(t===null||n===null||r===null||i===null||a===null||o===null||s===null)return null;let c=Xt(e,`label`),l=Xt(e,`subLabel`),u=Xt(e,`previewMissReason`),d=Qt(e,`markForTrain`),f=Qt(e,`favourited`);return{trackId:t,deviceId:n,className:r,...c===null?{}:{label:c},...l===null?{}:{subLabel:l},firstSeen:i,lastSeen:a,durationMs:o,active:s,timestamp:i,windowMs:o,importance:Zt(e,`importance`)??0,bestEventId:Xt(e,`bestEventId`)??``,...d===null?{}:{markForTrain:d},...f===null?{}:{favourited:f},debug:!0,...u===null||u.length===0?{}:{previewMissReason:u}}}function nn(e){let t=tn(e);if(t===null||!Yt(e))return null;let n=Zt(e,`mediaCount`),r=Zt(e,`eventCount`),i=Zt(e,`positionCount`);if(n===null||r===null||i===null)return null;let a=e.mediaKinds,o=e.findings;if(!Array.isArray(a)||!Array.isArray(o))return null;let s=a.filter(e=>typeof e==`string`),c=[];for(let e of o){let t=en(e);t!==null&&c.push(t)}let l=e.thumbnailProvenance;return{...t,mediaCount:n,mediaKinds:s,eventCount:r,positionCount:i,findings:c,...rt(l)?{thumbnailProvenance:l}:{}}}function rn(e){if(!Yt(e))return null;let t=Qt(e,`truncated`),n=e.tracks;if(t===null||!Array.isArray(n))return null;let r=[];for(let e of n){let t=tn(e);if(t===null)return null;r.push(t)}return{tracks:r,truncated:t}}function an(e){if(!Yt(e))return null;let t=e.reports,n=e.vanished;if(!Array.isArray(t)||!Array.isArray(n))return null;let r=[];for(let e of t){let t=nn(e);if(t===null)return null;r.push(t)}return{reports:r,vanished:n.filter(e=>typeof e==`string`)}}var on={MEDIA_EVICTED_OR_NEVER:`no media`,MISSING_KEYFRAME:`no keyframe`,MISSING_FIRSTFRAME:`no first frame`,MISSING_LASTFRAME:`no last frame`,MISSING_THUMBNAIL:`no thumbnail`,MISSING_BEST_CROP:`no crop`,SHORT_TRACK:`very short`,ZERO_EVENTS:`no events`,ZERO_POSITIONS:`no trajectory`,NO_PERIODIC_SNAPSHOTS:`no snapshots`,LASTFRAME_STALE:`stale last frame`,MEDIA_STOPPED_EARLY:`media stopped early`,NO_BEST_EVENT:`no best event`,LOW_BEST_SCORE:`low score`,BEST_SHOT_STANDIN:`stand-in best shot`,BEST_SHOT_RASTER:`low-res best shot`};function sn(e){return on[e]??e}var cn={error:0,warn:1,info:2};function ln(e){return e.toSorted((e,t)=>cn[e.severity]-cn[t.severity]||e.code.localeCompare(t.code))}function un(e){return e.length===0?Jt:`${Jt}?deviceIds=${e.join(`,`)}`}function dn(e,t){return`${String(e)}:${t}`}function fn(e,t){let n=[],r=new Set;for(let i of e){let e=dn(i.deviceId,i.trackId);!t.has(e)||r.has(e)||(r.add(e),n.push({deviceId:i.deviceId,trackId:i.trackId}))}return n}n();var pn=`all`,mn=`The server answered in a shape this build does not understand.`,hn={error:`danger`,warn:`warning`,info:`info`};function gn({findings:e}){return e.length===0?u(b,{variant:`success`,children:`no anomaly found`}):u(`div`,{className:`flex flex-wrap gap-1`,children:ln(e).map(e=>u(b,{variant:hn[e.severity],title:e.detail,children:sn(e.code)},e.code))})}function _n({track:e,report:t,analyzing:n}){let i=st(t?.previewMissReason??e.previewMissReason);return r(`div`,{className:`space-y-1 border-t border-border pt-1.5`,children:[t===void 0?u(`span`,{className:`text-[10px] text-foreground-subtle`,children:n?`analysing…`:`not analysed`}):r(s,{children:[u(gn,{findings:t.findings}),r(`p`,{className:`text-[10px] text-foreground-subtle`,title:t.mediaKinds.length>0?t.mediaKinds.join(`, `):`no media of any kind`,children:[String(t.mediaCount),` media · `,String(t.eventCount),` events ·`,` `,String(t.positionCount),` positions`]})]}),i!==null&&u(`p`,{className:`text-[10px] text-foreground-subtle`,title:i.raw,children:i.sentence})]})}function vn(){let e=m(),[t,n]=l(pn),[i,s]=l(!1),[c,d]=l(null),[f,p]=l(new Set),[h,g]=l(null),[_,v]=l(null),[y,b]=l(null),[w,T]=l([]),E=wt(),O=S({isCamera:!0,projection:`slim`}),k=a(()=>[{value:pn,label:`All cameras`},...(O.data??[]).map(e=>({value:String(e.id),label:e.name}))],[O.data]),A=a(()=>{let e=new Map;for(let t of O.data??[])e.set(t.id,t.name);return e},[O.data]),j=e=>A.get(e)??`Camera ${String(e)}`,N=a(()=>t===pn?[]:[Number.parseInt(t,10)],[t]),P=o({queryKey:[`events-debug`,`list`,N],queryFn:async()=>rn(await e.trpcClient.addons.custom.mutate({addonId:Gt,action:Kt,input:N.length===0?{}:{deviceIds:N}}))}),F=a(()=>(P.data?.tracks??[]).map(e=>e.trackId),[P.data]),I=o({queryKey:[`events-debug`,`analyze`,F],enabled:F.length>0,queryFn:async()=>an(await e.trpcClient.addons.custom.mutate({addonId:Gt,action:qt,input:{trackIds:F}}))}),L=a(()=>{let e=new Map;for(let t of I.data?.reports??[])e.set(t.trackId,t);return e},[I.data]),R=P.data?.tracks??[],z=P.data===null||I.data===null,B=()=>{P.refetch(),I.refetch()},V=e=>{p(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},H=()=>{p(new Set(R.map(e=>dn(e.deviceId,e.trackId))))},U=()=>p(new Set),W=async(e,t)=>{let n=e===`analyzed`?{debug:!1}:{favourited:!0},r=0,i=[];for(let e of t)try{await E.mutateAsync({deviceId:e.deviceId,trackId:e.trackId,flags:n}),r+=1}catch{i.push(e.trackId)}return{applied:r,refused:i}},G=e=>{if(!Y||_!==null)return;let t=fn(R,f);t.length!==0&&(v(e),b(null),(async()=>{let n=await W(e,t);v(null);let r=new Set(n.refused);p(new Set(t.filter(e=>r.has(e.trackId)).map(e=>dn(e.deviceId,e.trackId)))),e===`analyzed`&&T(t.filter(e=>!r.has(e.trackId))),n.refused.length>0&&b(`${String(n.refused.length)} of ${String(t.length)} were refused by the server and are still selected. Check the hub log.`),P.refetch()})())},ee=()=>{let e=w;e.length===0||_!==null||(v(`analyzed`),b(null),(async()=>{for(let t of e)try{await E.mutateAsync({deviceId:t.deviceId,trackId:t.trackId,flags:{debug:!0}})}catch{b(`Some tracks could not be re-marked. Refresh and try again.`)}v(null),T([]),P.refetch()})())},te=async()=>{s(!0),d(null);try{await Ie(un(N),`camstack-debug.zip`)}catch(e){d(e instanceof Error?e.message:`Export failed.`)}finally{s(!1)}},K=_!==null;return u(Ne,{children:r(`section`,{className:`space-y-3`,children:[r(`div`,{className:`flex flex-wrap items-center gap-2`,children:[u(`div`,{className:`w-44`,children:u(D,{value:t,options:k,onChange:e=>n(e.target.value)})}),r(x,{variant:`secondary`,onClick:B,disabled:P.isFetching,children:[P.isFetching?u(J,{className:`h-3.5 w-3.5 animate-spin`}):u(ve,{className:`h-3.5 w-3.5`}),`Refresh`]}),r(x,{onClick:()=>void te(),disabled:i||R.length===0,children:[i?u(J,{className:`h-3.5 w-3.5 animate-spin`}):u(ae,{className:`h-3.5 w-3.5`}),`Export all (`,String(R.length),`)`]}),R.length>0&&f.size<R.length&&u(x,{variant:`ghost`,onClick:H,children:`Select all`})]}),r(`p`,{className:`text-xs text-foreground-subtle`,children:[`A `,u(`code`,{children:`debug`}),` mark does not pin retention — this lists the marked tracks that still exist. A track whose media was evicted shows as missing media. Use `,u(`strong`,{children:`Keep`}),` `,`to hold a selection against pruning while you investigate, and `,u(`strong`,{children:`Analyzed`}),` `,`to un-mark the ones you are finished with.`]}),P.isError&&u(C,{message:`Could not load the marked tracks.`}),z&&!P.isError&&u(C,{message:mn}),c!==null&&u(C,{message:c}),y!==null&&u(C,{message:y}),P.data?.truncated===!0&&u(C,{message:`A camera filled the per-camera cap — some marked tracks are not listed. Un-mark a few, or filter to one camera.`}),(I.data?.vanished.length??0)>0&&r(`p`,{className:`text-xs text-foreground-subtle`,children:[String(I.data?.vanished.length),` marked track(s) were evicted between the list and the analysis.`]}),f.size>0&&r(`div`,{className:`flex flex-wrap items-center gap-2 rounded-md border border-primary/40 bg-primary/8 px-3 py-2`,children:[r(`span`,{className:`text-xs font-medium text-foreground`,children:[String(f.size),` selected`]}),r(`div`,{className:`ml-auto flex flex-wrap items-center gap-1.5`,children:[u(`span`,{title:Y?void 0:`Track flags arrive with the next server update`,children:r(x,{variant:`secondary`,onClick:()=>G(`keep`),disabled:!Y||K,children:[_===`keep`?u(J,{className:`h-3.5 w-3.5 animate-spin`}):u(Ke,{className:`h-3.5 w-3.5`}),` `,`Keep`]})}),u(`span`,{title:Y?void 0:`Track flags arrive with the next server update`,children:r(x,{onClick:()=>G(`analyzed`),disabled:!Y||K,children:[_===`analyzed`?u(J,{className:`h-3.5 w-3.5 animate-spin`}):u(Se,{className:`h-3.5 w-3.5`}),` `,`Analyzed`]})}),u(x,{variant:`ghost`,onClick:U,disabled:K,children:u(Ae,{className:`h-3.5 w-3.5`})})]})]}),w.length>0&&r(`div`,{className:`flex flex-wrap items-center gap-2 rounded-md border border-border bg-surface px-3 py-2`,children:[r(`span`,{className:`text-xs text-foreground`,children:[String(w.length),` track(s) marked analyzed and removed from this list.`]}),r(x,{variant:`ghost`,onClick:ee,disabled:K,children:[u(xe,{className:`h-3.5 w-3.5`}),` Undo`]}),u(x,{variant:`ghost`,onClick:()=>T([]),disabled:K,children:u(Ae,{className:`h-3.5 w-3.5`})})]}),P.isLoading?u(M,{children:u(`div`,{className:`px-3 py-6 text-center text-xs text-foreground-subtle`,children:`Loading…`})}):R.length===0?u(M,{children:r(`div`,{className:`flex flex-col items-center gap-2 px-3 py-8 text-center`,children:[u(Be,{className:`h-5 w-5 text-foreground-subtle`}),u(`p`,{className:`text-xs text-foreground-subtle`,children:`No track is marked for debug. Mark one from a track's actions to see it here.`})]})}):u(`div`,{className:`grid grid-cols-[repeat(auto-fill,minmax(11rem,1fr))] gap-2`,children:R.map(e=>{let t=L.get(e.trackId);return u(lt,{row:e,cameraName:j(e.deviceId),nowMs:e.lastSeen,selected:f.has(dn(e.deviceId,e.trackId)),onToggleSelect:V,onOpenDetail:g,...t?.thumbnailProvenance===void 0?{}:{provenance:t.thumbnailProvenance},footer:u(_n,{track:e,report:t,analyzing:I.isFetching})},dn(e.deviceId,e.trackId))})}),h&&u(Wt,{row:h,cameraName:j(h.deviceId),deleteAvailable:Mt,onClose:()=>g(null),onDeleted:()=>{g(null),P.refetch()},onFlagsChanged:e=>{e.debug||(g(null),P.refetch())}})]})})}var yn=200,bn=3e4,xn=[];function Sn(e){let t=m(),n=e.deviceIds.length>0,r=[...e.deviceIds].sort((e,t)=>e-t),{data:i,isLoading:a}=o({queryKey:[`events-feed`,r,e.since,e.until,e.minImportance??null,e.classFilter??null],enabled:n,staleTime:bn,refetchInterval:bn,queryFn:async()=>(await t.trpcClient.pipelineAnalytics.getKeyEventsBatch.query({deviceIds:r,since:e.since,until:e.until,limit:yn,...e.minImportance===void 0?{}:{minImportance:e.minImportance},...e.classFilter===void 0?{}:{classFilter:e.classFilter}})).map(e=>e.events.map(t=>({...t,deviceId:e.deviceId})))});return{rows:Ze(Xe(i??xn),`importance`),isLoading:n&&a}}n();var Cn=[`events-feed`],wn=2e3;function Tn(n){let r=c(),i=n?.paused===!0,a=t(r);a.current=r;let o=t(i);o.current=i;let[s,u]=l(!1),f=e(()=>{a.current.invalidateQueries({queryKey:Cn})},[]),p=t(void 0);p.current||=_e({delayMs:wn,invalidate:()=>{o.current?u(!0):f()}}),d(()=>()=>p.current?.cancel(),[]),d(()=>{i||!s||(u(!1),f())},[i,s,f]);let m=e(()=>{u(!1),f()},[f]);return W(ne.PipelineAnalyticsDetectionEvent,()=>{p.current?.trigger()}),W(ne.PipelineAnalyticsTrackEnded,()=>{p.current?.trigger()}),{pending:s,refreshNow:m}}n();function En({groups:e,selected:t,onChange:n,loading:i=!1}){let{t:o}=je(),[s,c]=l(!1),[d,f]=l(``),[p,m]=l(new Set),h=d.trim().toLowerCase(),g=e=>h.length===0||U(e,o).toLowerCase().includes(h),_=a(()=>e.map(e=>({macro:e.macro,subs:e.subs.filter(t=>g(t)||g(e.macro))})).filter(e=>g(e.macro)||e.subs.length>0),[e,h]),v=e=>m(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n}),y=e=>{let r=new Set(t),i=t.has(e.macro.kind)&&e.subs.every(e=>t.has(e.kind)),a=[e.macro.kind,...e.subs.map(e=>e.kind)];if(i)for(let e of a)r.delete(e);else for(let e of a)r.add(e);n(r)},b=e=>{let r=new Set(t);r.has(e)?r.delete(e):r.add(e),n(r)},x=()=>n(new Set),S=t.size;return r(`div`,{className:`relative`,children:[r(`button`,{type:`button`,onClick:()=>c(e=>!e),className:`flex items-center gap-1 rounded-md px-2.5 py-1 text-xs transition-colors ${S>0?`bg-primary/12 text-primary font-medium`:`text-foreground-subtle hover:bg-surface-hover hover:text-foreground`}`,children:[u(qe,{className:`h-3.5 w-3.5`}),S>0?`Kinds (${String(S)})`:`Kinds`,u(Me,{className:`h-3 w-3`})]}),s&&r(`div`,{className:`absolute z-20 mt-1 max-h-80 w-64 overflow-auto rounded-md border border-border bg-surface p-2 shadow-lg`,children:[r(`div`,{className:`mb-2 flex items-center gap-1 rounded border border-border px-1.5`,children:[u(Oe,{className:`h-3.5 w-3.5 text-foreground-subtle`}),u(`input`,{type:`text`,value:d,onChange:e=>f(e.target.value),placeholder:`Search kinds…`,className:`w-full bg-transparent py-1 text-xs outline-none`}),S>0&&u(`button`,{type:`button`,onClick:x,className:`text-[10px] text-foreground-subtle hover:text-foreground`,children:`Clear`})]}),_.length===0&&u(`div`,{className:`px-1 py-2 text-[11px] text-foreground-subtle`,children:i?`Loading kinds…`:h.length>0?`No kind matches that search.`:`These cameras advertise no event kinds.`}),_.map(e=>{let n=G(e.macro.iconId),i=p.has(e.macro.kind)||h.length>0,a=t.has(e.macro.kind);return r(`div`,{className:`mb-0.5`,children:[r(`div`,{className:`flex items-center gap-1`,children:[e.subs.length>0?u(`button`,{type:`button`,onClick:()=>v(e.macro.kind),className:`text-foreground-subtle hover:text-foreground`,"aria-label":`Expand`,children:u(i?Me:we,{className:`h-3 w-3`})}):u(`span`,{className:`w-3`}),r(`label`,{className:`flex flex-1 cursor-pointer items-center gap-1.5 rounded px-1 py-0.5 text-xs hover:bg-surface-hover`,children:[u(`input`,{type:`checkbox`,checked:a,onChange:()=>y(e),className:`accent-primary`}),u(n,{className:`h-3.5 w-3.5`,style:{color:e.macro.color}}),u(`span`,{className:`font-medium`,children:U(e.macro,o)})]})]}),i&&e.subs.map(e=>{let n=G(e.iconId);return r(`label`,{className:`ml-5 flex cursor-pointer items-center gap-1.5 rounded px-1 py-0.5 text-xs hover:bg-surface-hover`,children:[u(`input`,{type:`checkbox`,checked:t.has(e.kind),onChange:()=>b(e.kind),className:`accent-primary`}),u(n,{className:`h-3.5 w-3.5`,style:{color:e.color}}),u(`span`,{children:U(e,o)})]},e.kind)})]},e.macro.kind)})]})]})}function Dn(e,t){let n=new Map;for(let r of e)if(!(t.size>0&&!t.has(r.deviceId)))for(let e of r.kinds)n.has(e.kind)||n.set(e.kind,e);return n}function On(e,t){return{...t,kind:e,labelKey:`eventKind.${e}`,label:e.charAt(0).toUpperCase()+e.slice(1),iconId:e,parentKind:null,level:`macro`}}var kn=new Set([`detection`,`package`]);function An(e,t){return[...Dn(e,t).values()].filter(e=>e.parentKind===null&&kn.has(e.category)).sort((e,t)=>e.label.localeCompare(t.label))}function jn(e,t){let n=Dn(e,t),r=new Map,i=new Map;for(let e of n.values()){if(e.parentKind===null){i.set(e.kind,e);continue}let t=r.get(e.parentKind);t===void 0?r.set(e.parentKind,[e]):t.push(e)}for(let[e,t]of r){if(i.has(e))continue;let n=t[0];n!==void 0&&i.set(e,On(e,n))}return[...i.values()].map(e=>({macro:e,subs:[...r.get(e.kind)??[]].sort((e,t)=>e.label.localeCompare(t.label))})).sort((e,t)=>e.macro.label.localeCompare(t.macro.label))}n();function Mn(){let[n,r]=l(!1),i=t(null),[a,o]=l(0),s=e(e=>{i.current!==e&&(i.current=e,o(e=>e+1))},[]);return d(()=>{let e=i.current;if(!e||typeof IntersectionObserver>`u`){r(!1);return}let t=new IntersectionObserver(e=>{let t=e[e.length-1];t&&r(!t.isIntersecting)},{rootMargin:`64px 0px 0px 0px`,threshold:0});return t.observe(e),()=>t.disconnect()},[a]),{ref:s,scrolledPast:n}}n();var Nn=[`events-feed`],Pn=60,Fn=[{value:`importance`,label:`Importance`,icon:ze},{value:`time`,label:`Recent`,icon:re}];function In(){let e=c(),[t,n]=l(ge),[i,o]=l(new Set),[f,p]=l(new Set),[m,h]=l(0),[g,_]=l(`time`),[v,y]=l(new Set),[b,C]=l(null),[w,T]=l(()=>Date.now());d(()=>{let e=setInterval(()=>T(Date.now()),6e4);return()=>clearInterval(e)},[]);let{since:E,until:D}=a(()=>tt({fromMs:t.fromMs,toMs:t.toMs},w),[t.fromMs,t.toMs,w]),O=Mn(),{pending:k,refreshNow:A}=Tn({paused:b!==null||v.size>0||O.scrolledPast}),{data:j=[]}=S({isCamera:!0,projection:`slim`}),M=a(()=>j.map(e=>e.id),[j]),{data:P,isLoading:F}=N({deviceIds:M},{enabled:M.length>0,staleTime:5*6e4}),I=a(()=>jn(P??[],i),[P,i]),L=Ft(),R=L.isPending,{rows:z,isLoading:B}=Sn({deviceIds:M,since:E,until:D,minImportance:m>0?m:void 0,classFilter:f.size===1?[...f][0]:void 0}),V=a(()=>{let e=new Map;for(let t of j??[])e.set(t.id,t.name);return e},[j]),H=e=>V.get(e)??`Camera #${String(e)}`,U=a(()=>se(z).map(e=>({id:e,name:H(e)})).sort((e,t)=>e.name.localeCompare(t.name)),[z,V]),W=a(()=>Ze(Qe(z,{cameras:i,classes:f,minImportance:m}),g),[z,i,f,m,g]),G=pe(W,Pn,a(()=>JSON.stringify([[...i].sort((e,t)=>e-t),[...f].sort(),m,g,E,D]),[i,f,m,g,E,D])),ee=()=>{e.invalidateQueries({queryKey:Nn})},te=()=>y(new Set);function K(e){y(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})}function ne(){if(v.size===0||!Mt)return;let e=et(z,v),t=[...e.values()].reduce((e,t)=>e+t.length,0);if(t===0||!window.confirm(`Delete ${String(t)} track${t===1?``:`s`} and all their media? This cannot be undone.`))return;let n=[...e];Promise.allSettled(n.map(([e,t])=>L.mutateAsync({deviceId:e,trackIds:t}))).then(e=>{ee();let t=[],r=new Set;if(e.forEach((e,i)=>{let a=n[i];if(!a)return;let[o,s]=a;if(e.status===`fulfilled`)for(let e of s)r.add($e(o,e));else t.push(o)}),y(e=>{let t=new Set(e);for(let e of r)t.delete(e);return t}),t.length>0){let e=t.map(e=>H(e)).join(`, `);window.alert(`Failed to delete tracks on: ${e}. They remain selected — retry, or check the server logs.`)}})}let re=W.length!==z.length;return r(`div`,{className:`relative space-y-3`,children:[r(`div`,{className:`flex flex-wrap items-center gap-1.5`,children:[u(he,{onChange:n}),u(ue,{cameras:U,selected:i,onChange:o}),u(En,{groups:I,selected:f,onChange:p,loading:F}),r(`label`,{className:`flex items-center gap-1.5 text-[11px] text-foreground-subtle`,children:[u(`span`,{children:`Min score`}),u(`input`,{type:`range`,min:0,max:1,step:.05,value:m,onChange:e=>h(Number(e.target.value)),className:`h-1 w-24 cursor-pointer accent-primary`,"aria-label":`Minimum importance`}),u(`span`,{className:`w-6 tabular-nums text-foreground`,children:Math.round(m*100)})]}),u(`div`,{className:`flex items-center gap-1 rounded-md border border-border p-0.5`,children:Fn.map(e=>{let t=e.icon;return r(`button`,{type:`button`,onClick:()=>_(e.value),className:`flex items-center gap-1 rounded px-2 py-1 text-[11px] transition-colors ${g===e.value?`bg-primary/12 text-primary font-medium`:`text-foreground-subtle hover:bg-surface-hover hover:text-foreground`}`,children:[u(t,{className:`h-3.5 w-3.5`}),` `,e.label]},e.value)})}),!B&&u(`span`,{className:`ml-auto text-[10px] text-foreground-subtle`,children:re?`${String(W.length)} of ${String(z.length)} events`:`${String(W.length)} event${W.length===1?``:`s`}`})]}),v.size>0&&r(`div`,{className:`flex flex-wrap items-center gap-2 rounded-md border border-primary/40 bg-primary/8 px-3 py-2`,children:[r(`span`,{className:`text-xs font-medium text-foreground`,children:[v.size,` selected`]}),r(`div`,{className:`ml-auto flex flex-wrap items-center gap-1.5`,children:[u(`span`,{title:Mt?void 0:`Track deletion arrives with the next server update`,children:r(x,{variant:`secondary`,onClick:ne,disabled:!Mt||R,children:[R?u(J,{className:`h-3.5 w-3.5 animate-spin`}):u(De,{className:`h-3.5 w-3.5`}),` `,`Delete`]})}),u(x,{variant:`ghost`,onClick:te,disabled:R,children:u(Ae,{className:`h-3.5 w-3.5`})})]})]}),B&&r(`div`,{className:`flex items-center gap-2 py-4 text-xs text-foreground-subtle`,children:[u(J,{className:`h-4 w-4 animate-spin`}),` Loading events…`]}),!B&&W.length===0&&u(`p`,{className:`py-4 text-xs text-foreground-subtle`,children:`No key events in this window.`}),k&&u(`div`,{className:`sticky top-2 z-20 flex justify-center`,children:u(`button`,{type:`button`,onClick:A,className:`rounded-full border border-primary/40 bg-surface px-3 py-1 text-[11px] font-medium text-primary shadow-sm hover:bg-primary/10`,children:`New events — refresh`})}),!B&&W.length>0&&r(s,{children:[u(`div`,{ref:O.ref,"aria-hidden":!0,className:`h-0`}),u(`div`,{className:`grid grid-cols-[repeat(auto-fill,minmax(11rem,1fr))] gap-2`,children:G.pageItems.map(e=>u(lt,{row:e,cameraName:H(e.deviceId),nowMs:w,selected:v.has($e(e.deviceId,e.trackId)),onToggleSelect:K,onOpenDetail:C},$e(e.deviceId,e.trackId)))}),u(oe,{currentPage:G.page,totalItems:G.totalItems,pageSize:G.pageSize,onPageChange:G.setPage,itemNoun:`events`})]}),b&&u(Wt,{row:b,cameraName:H(b.deviceId),deleteAvailable:Mt,onClose:()=>C(null),onDeleted:()=>{ee(),C(null)},onFlagsChanged:e=>{C(t=>t&&t.trackId===e.trackId?{...t,markForTrain:e.markForTrain,debug:e.debug,favourited:e.favourited}:t)}})]})}n();var Ln=50,Rn=350,zn=[{value:.2,label:`Loose`},{value:.25,label:`Balanced`},{value:.3,label:`Strict`}];function Bn(e){return{id:e.id,trackId:e.trackId??e.id,deviceId:e.deviceId,timestamp:e.timestamp,className:e.className,label:e.label,subLabel:e.subLabel,importance:e.importance??0,bestEventId:e.mediaKey??e.trackId??e.id,windowMs:void 0}}function Vn({onActiveChange:e}){let[t,n]=l(``),[i,o]=l(.2),[s,c]=l(null),[f,p]=l(null),[m,h]=l(null),g=w(t,Rn).trim(),_=g.length>0;d(()=>{e(_)},[_,e]);let[v,y]=l(()=>Date.now());d(()=>{let e=setInterval(()=>y(Date.now()),6e4);return()=>clearInterval(e)},[]);let{data:b=[]}=S({isCamera:!0,projection:`slim`}),x=a(()=>{let e=new Map;for(let t of b)e.set(t.id,t.name);return e},[b]),C=e=>x.get(e)??`Camera #${String(e)}`,T=a(()=>b.map(e=>e.id),[b]),{data:E}=N({deviceIds:T},{enabled:T.length>0,staleTime:5*6e4}),D=a(()=>An(E??[],new Set(f===null?[]:[f])),[E,f]);d(()=>{s!==null&&(D.some(e=>e.kind===s)||c(null))},[D,s]);let{data:k,isFetching:A,isError:j,error:M}=O({text:g,minScore:i,limit:Ln,classFilter:s??void 0,deviceId:f??void 0},{enabled:_}),P=a(()=>[...k??[]].sort((e,t)=>t.score-e.score).map(e=>({...Bn(e),score:e.score})),[k]);function F(e){c(t=>t===e?null:e)}return r(`div`,{className:`space-y-3`,children:[r(`div`,{className:`rounded-lg border border-border bg-surface p-3 space-y-3`,children:[r(`div`,{className:`flex flex-wrap items-center gap-2`,children:[r(`div`,{className:`relative min-w-[16rem] flex-1`,children:[u(Oe,{className:`pointer-events-none absolute left-2.5 top-1/2 h-4 w-4 -translate-y-1/2 text-foreground-subtle`}),u(`input`,{type:`text`,value:t,onChange:e=>n(e.target.value),placeholder:`Semantic search — describe what you're looking for…`,className:`h-9 w-full rounded-md border border-border bg-background pl-8 pr-8 text-sm text-foreground placeholder:text-foreground-subtle focus:border-primary focus:outline-none focus:ring-1 focus:ring-primary`,"aria-label":`Semantic event search`}),t&&u(`button`,{type:`button`,onClick:()=>n(``),className:`absolute right-2 top-1/2 -translate-y-1/2 rounded p-0.5 text-foreground-subtle hover:bg-surface-hover hover:text-foreground`,"aria-label":`Clear search`,children:u(Ae,{className:`h-3.5 w-3.5`})})]}),A&&_&&u(J,{className:`h-4 w-4 shrink-0 animate-spin text-foreground-subtle`})]}),r(`div`,{className:`flex flex-wrap items-center gap-x-4 gap-y-2`,children:[u(`div`,{className:`flex items-center gap-1`,children:D.map(e=>u(`button`,{type:`button`,onClick:()=>F(e.kind),className:`rounded-md px-2.5 py-1 text-xs transition-colors ${s===e.kind?`bg-primary/12 text-primary font-medium`:`text-foreground-subtle hover:bg-surface-hover hover:text-foreground`}`,children:U(e)},e.kind))}),r(`label`,{className:`flex items-center gap-1.5 text-[11px] text-foreground-subtle`,children:[u(`span`,{children:`Camera`}),r(`select`,{value:f===null?``:String(f),onChange:e=>p(e.target.value===``?null:Number(e.target.value)),className:`h-7 rounded-md border border-border bg-background px-1.5 text-xs text-foreground focus:border-primary focus:outline-none`,"aria-label":`Filter by camera`,children:[u(`option`,{value:``,children:`All`}),b.map(e=>u(`option`,{value:String(e.id),children:e.name},e.id))]})]}),r(`div`,{className:`flex items-center gap-1.5 text-[11px] text-foreground-subtle`,children:[u(`span`,{children:`Match`}),u(`div`,{className:`flex items-center gap-1 rounded-md border border-border p-0.5`,children:zn.map(e=>u(`button`,{type:`button`,onClick:()=>o(e.value),className:`rounded px-2 py-1 text-[11px] transition-colors ${i===e.value?`bg-primary/12 text-primary font-medium`:`text-foreground-subtle hover:bg-surface-hover hover:text-foreground`}`,title:`Minimum CLIP score ${e.value.toFixed(2)}`,children:e.label},e.value))})]}),_&&!A&&!j&&r(`span`,{className:`ml-auto text-[10px] text-foreground-subtle`,children:[P.length,` match`,P.length===1?``:`es`]})]})]}),_&&r(`div`,{className:`space-y-3`,children:[j&&r(`p`,{className:`py-4 text-xs text-danger`,children:[`Search failed: `,M instanceof Error?M.message:`unknown error`,`. Check that the CLIP embedding step is enabled.`]}),!j&&A&&P.length===0&&r(`div`,{className:`flex items-center gap-2 py-4 text-xs text-foreground-subtle`,children:[u(J,{className:`h-4 w-4 animate-spin`}),` Searching…`]}),!j&&!A&&P.length===0&&r(`p`,{className:`py-4 text-xs text-foreground-subtle`,children:[`No semantic matches for “`,g,`”. Try a looser match threshold or a different phrasing.`]}),!j&&P.length>0&&u(`div`,{className:`grid grid-cols-[repeat(auto-fill,minmax(11rem,1fr))] gap-2`,children:P.map(e=>u(lt,{row:e,cameraName:C(e.deviceId),nowMs:v,score:e.score,onOpenDetail:h},e.id))})]}),m&&u(Wt,{row:m,cameraName:C(m.deviceId),deleteAvailable:Mt,onClose:()=>h(null),onDeleted:()=>h(null)})]})}var Hn=15e3,Un={rows:[],unreadableCount:0};function Wn(e){let t=m(),n=e.length>0,r=[...e].sort((e,t)=>e-t),{data:i,isLoading:a}=o({queryKey:[`stationary-objects`,r],enabled:n,staleTime:Hn,refetchInterval:Hn,queryFn:async()=>{let e=await t.trpcClient.zoneAnalytics.getCurrentSnapshotBatch.query({deviceIds:r}),n=[],i=0;for(let t of e){if(t.read===`unreadable`){i++;continue}for(let e of t.snapshot?.stationaryObjects??[])n.push({...e,deviceId:t.deviceId})}return{rows:n,unreadableCount:i}}}),s=i??Un;return{rows:s.rows.toSorted((e,t)=>t.becameStationaryAt-e.becameStationaryAt),isLoading:n&&a,unreadableCount:s.unreadableCount}}n();function Gn(e,t){let n=Math.max(0,Math.round((e-t)/6e4));if(n<1)return`just now`;if(n<60)return`${String(n)}m`;let r=Math.floor(n/60);return`${String(r)}h ${String(n%60)}m`}function Kn({row:e,cameraName:t,nowMs:n}){let i=e.keyFrameMediaKey?.startsWith(`track:`)?e.keyFrameMediaKey.split(`:`)[1]:e.keyFrameMediaKey,a=Pe(i?`${Le}/${i}`:void 0);return r(`div`,{className:`flex flex-col overflow-hidden rounded-md border border-border bg-surface`,children:[r(`div`,{className:`relative aspect-video overflow-hidden bg-surface-hover`,children:[a.src?u(`img`,{src:a.src,alt:`Parked ${e.className} on ${t}`,className:`h-full w-full object-cover`}):u(`div`,{className:`flex h-full w-full items-center justify-center text-foreground-subtle`,children:u(Ge,{className:`h-6 w-6`})}),u(`span`,{className:`absolute left-1 top-1 rounded bg-black/60 px-1.5 py-0.5 text-[10px] font-medium capitalize text-white`,children:e.label??e.className})]}),r(`div`,{className:`flex flex-col gap-0.5 p-1.5`,children:[u(`span`,{className:`truncate text-[11px] text-foreground`,children:t}),r(`span`,{className:`text-[10px] text-foreground-subtle`,children:[`parked `,Gn(n,e.becameStationaryAt)]})]})]})}function qn(){let[e,t]=l(!1),n=Date.now(),{data:i=[]}=S({isCamera:!0,projection:`slim`}),o=a(()=>i.map(e=>e.id),[i]),s=a(()=>{let e=new Map;for(let t of i)e.set(t.id,t.name);return e},[i]),{rows:c,unreadableCount:d}=Wn(o);return c.length===0&&d===0?null:r(`div`,{className:`rounded-md border border-border bg-surface/40`,children:[r(`button`,{type:`button`,onClick:()=>t(e=>!e),className:`flex w-full items-center gap-2 px-3 py-2 text-left`,children:[u(e?Me:we,{className:`h-4 w-4 text-foreground-subtle`}),u(Ge,{className:`h-4 w-4 text-foreground-subtle`}),u(`span`,{className:`text-sm font-semibold text-foreground`,children:`Stationary`}),u(`span`,{className:`rounded-full bg-surface-hover px-2 py-0.5 text-[10px] font-medium text-foreground-subtle`,children:c.length}),u(`span`,{className:`ml-2 text-[11px] text-foreground-subtle`,children:`Parked objects — kept out of the event feed`}),d>0?r(`span`,{className:`ml-2 text-[11px] text-warning`,children:[d,` camera`,d===1?``:`s`,` could not be read`]}):null]}),e&&u(`div`,{className:`grid grid-cols-[repeat(auto-fill,minmax(9rem,1fr))] gap-2 p-3 pt-0`,children:c.map(e=>u(Kn,{row:e,cameraName:s.get(e.deviceId)??`Camera #${String(e.deviceId)}`,nowMs:n},e.id))})]})}n();function Jn(){let[e,t]=l(!1);return u(Ne,{children:r(`section`,{className:`space-y-3`,children:[u(Vn,{onActiveChange:t}),!e&&u(qn,{}),!e&&u(In,{})]})})}var Yn=[`person`,`vehicle`,`animal`,`package`,`face`,`plate`],Xn=new Set(Yn);function Zn(e){let t=e?.trim().toLowerCase();return t===void 0||t===``?null:Xn.has(t)?`"${t}" is a macro class, not a label — person / postman / Marco are three different tiers`:null}function Qn({annotations:e,selectedIndex:t,onSelect:n,onChange:i,onDelete:a}){return e.length===0?r(`p`,{className:`text-[11px] text-foreground-subtle p-3`,children:[`No subject on this frame yet. Drag on the image to draw one, or ask the pipeline for a proposal. Annotate `,u(`strong`,{children:`every`}),` subject — a frame with one box and three unlabelled people teaches the model that two thirds of the people in it are background.`]}):u(`ul`,{className:`divide-y divide-border`,children:e.map((e,o)=>{let s=o===t,c=Zn(e.label),l=Zn(e.subLabel);return r(`li`,{className:`p-2.5 space-y-1.5 ${s?`bg-surface-hover`:``}`,onFocus:()=>{n(o)},children:[r(`div`,{className:`flex items-center gap-2`,children:[u(D,{className:`w-28`,value:e.macroClass,options:Yn.map(e=>({value:e,label:e})),onChange:e=>{let t=Yn.find(t=>t===e.target.value);t!==void 0&&i(o,{macroClass:t})}}),u(D,{className:`w-32`,value:e.kind,options:[{value:`subject`,label:`subject`},{value:`model_error`,label:`model error`}],onChange:e=>{i(o,{kind:e.target.value===`model_error`?`model_error`:`subject`})}}),e.source===`assist`&&r(b,{variant:`info`,children:[e.assistModelId??`assist`,e.assistScore===void 0?``:` ${e.assistScore.toFixed(2)}`]}),u(x,{variant:`ghost`,size:`sm`,"aria-label":`Delete this subject`,onClick:()=>{a(o)},children:u(De,{className:`h-3 w-3`})})]}),r(`div`,{className:`flex items-center gap-2`,children:[u(k,{className:`flex-1`,placeholder:`label (postman, van, cat…)`,value:e.label??``,onChange:e=>{i(o,{label:e.target.value})}}),u(k,{className:`flex-1`,placeholder:`sub-label (a name, a plate…)`,value:e.subLabel??``,onChange:e=>{i(o,{subLabel:e.target.value})}})]}),c!==null&&u(`p`,{className:`text-[11px] text-danger`,children:c}),l!==null&&u(`p`,{className:`text-[11px] text-danger`,children:l})]},`${String(o)}-${String(e.bbox.x)}`)})})}function $n(e){return e.every(e=>Zn(e.label)===null&&Zn(e.subLabel)===null&&Xn.has(e.macroClass))}function er(e){return e<0?0:e>1?1:e}function tr(e,t,n,r){if(!(e>0)||!(t>0)||!(n>0)||!(r>0))return null;let i=Math.min(e/n,t/r),a=n*i,o=r*i;return{left:(e-a)/2,top:(t-o)/2,width:a,height:o}}function nr(e,t,n){return{x:er((e-n.left)/n.width),y:er((t-n.top)/n.height)}}function rr(e,t){return{x:Math.min(e.x,t.x),y:Math.min(e.y,t.y),w:Math.abs(t.x-e.x),h:Math.abs(t.y-e.y)}}function ir(e){return e.w>=.01&&e.h>=.01}function ar(e,t){return{left:t.left+e.x*t.width,top:t.top+e.y*t.height,width:e.w*t.width,height:e.h*t.height}}function or(e,t){let n=-1,r=1/0;return e.forEach((e,i)=>{if(!(t.x>=e.x&&t.x<=e.x+e.w&&t.y>=e.y&&t.y<=e.y+e.h))return;let a=e.w*e.h;a<r&&(n=i,r=a)}),n}n();function sr({imageSrc:n,imageWidth:a,imageHeight:o,boxes:s,selectedIndex:c,onSelect:d,onDraw:f}){let p=t(null),[m,h]=l({w:0,h:0}),[g,_]=l(null);i(()=>{let e=p.current;if(e===null)return;let t=new ResizeObserver(()=>{h({w:e.clientWidth,h:e.clientHeight})});return t.observe(e),h({w:e.clientWidth,h:e.clientHeight}),()=>{t.disconnect()}},[]);let v=tr(m.w,m.h,a,o),y=e(e=>{let t=p.current;if(t===null||v===null)return null;let n=t.getBoundingClientRect();return nr(e.clientX-n.left,e.clientY-n.top,v)},[v]);return r(`div`,{ref:p,className:`relative w-full h-full min-h-[280px] bg-surface-sunken select-none touch-none`,onPointerDown:e=>{let t=y(e);t!==null&&(e.currentTarget.setPointerCapture(e.pointerId),_({start:t,current:rr(t,t)}))},onPointerMove:e=>{if(g===null)return;let t=y(e);t!==null&&_({start:g.start,current:rr(g.start,t)})},onPointerUp:()=>{if(g===null)return;let e=g.current;_(null),ir(e)?f(e):d(or(s.map(e=>e.bbox),g.start))},children:[u(`img`,{src:n,alt:`Frame being annotated`,className:`absolute inset-0 w-full h-full object-contain pointer-events-none`}),v!==null&&s.map((e,t)=>{let n=ar(e.bbox,v),i=e.kind===`model_error`,a=t===c,o=i?`#ef4444`:a?`#22c55e`:`#3b82f6`;return u(`div`,{className:`absolute pointer-events-none`,style:{left:n.left,top:n.top,width:n.width,height:n.height,border:`${a?`2px`:`1px`} ${i?`dashed`:`solid`} ${o}`,opacity:e.source===`assist`&&!a?.65:1},children:r(`span`,{className:`absolute -top-4 left-0 text-[10px] px-1 rounded`,style:{background:o,color:`#08121f`},children:[e.label??e.macroClass,i?` ✕`:``]})},`${String(t)}-${String(e.bbox.x)}-${String(e.bbox.y)}`)}),g!==null&&v!==null&&u(`div`,{className:`absolute border border-dashed border-primary pointer-events-none`,style:ar(g.current,v)})]})}function cr(e){return e>=1e6?`${(e/1e6).toFixed(1)} MB`:`${Math.round(e/1e3)} KB`}function lr({candidates:e,copies:t,activeFrameId:n,refusals:i,isSelecting:a,onSelectCandidate:o,onOpenCopy:s,onRemoveCopy:c}){let l=new Set(t.map(e=>e.sourceMediaKey)),d=e.filter(e=>!l.has(e.mediaKey));return r(`div`,{className:`space-y-3`,children:[r(`section`,{children:[r(`h3`,{className:`text-xs font-semibold text-foreground mb-1.5`,children:[`In the dataset (`,t.length,`)`]}),t.length===0?u(`p`,{className:`text-[11px] text-foreground-subtle`,children:`No frame copied yet. Selecting a frame copies it into retrain storage immediately — the dataset stops depending on the track's own media from that moment.`}):u(`ul`,{className:`flex flex-wrap gap-2`,children:t.map(e=>u(`li`,{children:r(`div`,{className:`rounded-md border px-2 py-1.5 text-[11px] ${e.frameId===n?`border-primary bg-surface-hover`:`border-border`}`,children:[r(`button`,{type:`button`,className:`flex items-center gap-1.5 text-left`,onClick:()=>{s(e.frameId)},children:[u(Se,{className:`h-3 w-3 text-success`}),u(`span`,{className:`font-medium text-foreground`,children:e.sourceKind}),r(`span`,{className:`text-foreground-subtle`,children:[e.width,`×`,e.height,` · `,cr(e.sizeBytes)]})]}),r(`button`,{type:`button`,"aria-label":`Remove this frame from the dataset`,className:`mt-1 flex items-center gap-1 text-foreground-muted hover:text-danger`,onClick:()=>{c(e.frameId)},children:[u(De,{className:`h-3 w-3`}),`remove`]})]})},e.frameId))})]}),r(`section`,{children:[r(`h3`,{className:`text-xs font-semibold text-foreground mb-1.5`,children:[`Available frames (`,d.length,`)`]}),d.length===0?u(`p`,{className:`text-[11px] text-foreground-subtle`,children:e.length===0?`This track has no whole, unannotated frame left — its media aged out before it was marked. Anything already copied above is still usable.`:`Every available frame is already in the dataset.`}):u(`ul`,{className:`flex flex-wrap gap-2`,children:d.map(e=>{let t=i.get(e.mediaKey);return r(`li`,{children:[r(x,{variant:`secondary`,size:`sm`,disabled:a||t!==void 0,onClick:()=>{o(e.mediaKey)},children:[a?u(J,{className:`h-3 w-3 animate-spin`}):u(t===void 0?Ue:de,{className:`h-3 w-3`}),u(`span`,{className:`ml-1`,children:e.kind}),u(`span`,{className:`ml-1 text-foreground-subtle`,children:cr(e.sizeBytes)})]}),t!==void 0&&u(b,{variant:`danger`,className:`ml-1`,children:t})]},e.mediaKey)})})]})]})}function ur(e){return e.frameCount===0?`untouched`:e.annotationCount===0?`started`:`ready`}var dr={untouched:{icon:He,label:`to do`,variant:`default`},started:{icon:Ve,label:`frames only`,variant:`info`},ready:{icon:Ce,label:`annotated`,variant:`success`}};function fr(e){return new Date(e).toLocaleString(void 0,{month:`short`,day:`numeric`,hour:`2-digit`,minute:`2-digit`})}function pr({tracks:e,isLoading:t,selectedTrackId:n,deviceNames:i,onSelect:a}){return t?r(`div`,{className:`flex items-center gap-2 p-4 text-xs text-foreground-subtle`,children:[u(J,{className:`h-3.5 w-3.5 animate-spin`}),`Loading staging tracks…`]}):e.length===0?u(`div`,{className:`p-4 text-xs text-foreground-subtle`,children:`Nothing in staging. Mark a track for training from the viewer or the Events grid and it appears here.`}):u(`ul`,{className:`divide-y divide-border`,children:e.map(e=>{let t=dr[ur(e)],o=t.icon;return u(`li`,{children:r(`button`,{type:`button`,onClick:()=>{a(e)},className:`w-full text-left px-3 py-2 flex items-start gap-2 hover:bg-surface-hover ${e.trackId===n?`bg-surface-hover`:``}`,children:[u(o,{className:`h-3.5 w-3.5 mt-0.5 shrink-0 text-foreground-subtle`}),r(`span`,{className:`min-w-0 flex-1`,children:[r(`span`,{className:`flex items-center gap-2`,children:[u(`span`,{className:`text-xs font-medium text-foreground truncate`,children:e.label??e.className}),u(b,{variant:t.variant,children:t.label})]}),r(`span`,{className:`block text-[11px] text-foreground-subtle truncate`,children:[i.get(e.deviceId)??`Camera ${String(e.deviceId)}`,` ·`,` `,fr(e.lastSeen)]}),r(`span`,{className:`block text-[11px] text-foreground-muted`,children:[e.frameCount,` frame`,e.frameCount===1?``:`s`,` ·`,` `,e.annotationCount,` subject`,e.annotationCount===1?``:`s`]})]})]})},e.trackId)})})}n();var mr=`person`;function hr(){let[t,n]=l(null),[i,o]=l(null),[c,f]=l([]),[p,m]=l(-1),[h,g]=l(new Map),[y,C]=l(null),w=S({projection:`slim`,isCamera:!0}),E=a(()=>{let e=new Map;for(let t of w.data??[])e.set(t.id,t.name);return e},[w.data]),D=_({}),O=v({trackId:t?.trackId??``},{enabled:t!==null}),k=P({trackId:t?.trackId??``},{enabled:t!==null}),A=R({frameId:i??``},{enabled:i!==null}),M=j(),N=ee(),F=H(),I=T(),L=z(),B=V();d(()=>{if(i===null){f([]);return}f((k.data??[]).filter(e=>e.mediaKey===i).map(e=>({bbox:e.bbox,macroClass:e.macroClass,...e.label===void 0?{}:{label:e.label},...e.subLabel===void 0?{}:{subLabel:e.subLabel},kind:e.kind,source:e.source,...e.assistModelId===void 0?{}:{assistModelId:e.assistModelId},...e.assistScore===void 0?{}:{assistScore:e.assistScore}}))),m(-1)},[i,k.data]),d(()=>{let e=O.data?.copies??[];i===null&&e.length>0&&o(e[0].frameId)},[O.data,i]);let U=e(e=>{n(e),o(null),f([]),g(new Map),C(null)},[]),W=e(async e=>{if(t===null)return;let n=await M.mutateAsync({deviceId:t.deviceId,trackId:t.trackId,mediaKeys:[e]});if(n.refused.length>0){let e=new Map(h);for(let t of n.refused)e.set(t.sourceMediaKey,t.reason);g(e)}n.copied.length>0&&o(n.copied[0].frameId),await O.refetch(),await D.refetch()},[t,M,h,O,D]),G=e(async e=>{t!==null&&(await N.mutateAsync({deviceId:t.deviceId,trackId:t.trackId,frameId:e}),i===e&&o(null),await O.refetch(),await k.refetch(),await D.refetch())},[t,N,i,O,k,D]),te=e(async e=>{if(t===null||i===null)return;C(null);let n=await F.mutateAsync({deviceId:t.deviceId,trackId:t.trackId,frameId:i,subject:e===`package`?{kind:`package`}:{kind:`objects`,modelId:`yolo26n`,minScore:.3}});if(n.kind===`refused`){C(n.reason===`no-zone`?`A package proposal runs on the zone crop only — this camera has no zone, and running the detector on the whole frame at 0.35 proposes furniture.`:`The pipeline refused: ${n.reason}${n.detail===void 0?``:` — ${n.detail}`}`);return}f(e=>[...e,...n.proposals.map(e=>({bbox:e.bbox,macroClass:e.macroClass,...e.label===void 0?{}:{label:e.label},kind:e.kind,source:e.source,...e.assistModelId===void 0?{}:{assistModelId:e.assistModelId},...e.assistScore===void 0?{}:{assistScore:e.assistScore}}))]),C(`${n.proposals.length} proposal${n.proposals.length===1?``:`s`} from ${n.modelId}`+(n.belowThreshold>0?` — ${n.belowThreshold} more were below ${n.minScore.toFixed(2)}`:``))},[t,i,F]),K=e(e=>{f(t=>[...t,{bbox:e,macroClass:mr,kind:`subject`,source:`operator`}]),m(c.length)},[c.length]),ne=e((e,t)=>{f(n=>n.map((n,r)=>r===e?{...n,...t}:n))},[]),re=e(e=>{f(t=>t.filter((t,n)=>n!==e)),m(-1)},[]),ie=e(async()=>{t===null||i===null||(await I.mutateAsync({deviceId:t.deviceId,trackId:t.trackId,frameId:i,annotations:c.map(e=>({bbox:e.bbox,macroClass:e.macroClass,...e.label!==void 0&&e.label!==``?{label:e.label}:{},...e.subLabel!==void 0&&e.subLabel!==``?{subLabel:e.subLabel}:{},kind:e.kind,source:e.source,...e.assistModelId===void 0?{}:{assistModelId:e.assistModelId},...e.assistScore===void 0?{}:{assistScore:e.assistScore}}))}),await k.refetch(),await D.refetch(),C(`Annotations saved.`))},[t,i,c,I,k,D]),ae=e(async()=>{if(t===null)return;let e=await L.mutateAsync({deviceId:t.deviceId,trackId:t.trackId});C(e.changed?`Track completed — it is now trained, and its own media is evictable again.`:e.reason===`no-frames-copied`?`Refused: no frame was ever copied into the dataset. Completing would let retention delete material nothing was extracted from.`:`Refused: ${e.reason??`unknown`}`),await D.refetch(),e.changed&&n(null)},[t,L,D]),oe=e(async()=>{if(t===null)return;let e=await B.mutateAsync({deviceId:t.deviceId,trackId:t.trackId});C(e.changed?`Track returned to staging. Its copies and annotations were left alone.`:`Refused: ${e.reason??`unknown`}`),await D.refetch()},[t,B,D]),se=A.data,ce=$n(c)&&i!==null;return r(Ne,{subtitle:`Turn the tracks you marked for training into an annotated dataset. Selecting a frame copies it — the dataset never depends on media that can be swept.`,actions:t===null?null:r(`div`,{className:`flex items-center gap-2`,children:[r(x,{variant:`secondary`,size:`sm`,onClick:()=>void oe(),children:[u(xe,{className:`h-3 w-3`}),u(`span`,{className:`ml-1`,children:`Back to staging`})]}),r(x,{size:`sm`,onClick:()=>void ae(),children:[u(We,{className:`h-3 w-3`}),u(`span`,{className:`ml-1`,children:`Complete track`})]})]}),children:[y!==null&&u(`div`,{className:`rounded-md border border-border bg-surface px-3 py-2 text-xs text-foreground`,children:y}),r(`div`,{className:`grid grid-cols-1 lg:grid-cols-[minmax(0,260px)_minmax(0,1fr)] gap-4`,children:[r(`aside`,{className:`rounded-md border border-border bg-surface overflow-hidden`,children:[r(`div`,{className:`px-3 py-2 border-b border-border flex items-center justify-between`,children:[u(`h2`,{className:`text-xs font-semibold text-foreground`,children:`Staging`}),u(b,{children:D.data?.length??0})]}),u(pr,{tracks:D.data??[],isLoading:D.isLoading,selectedTrackId:t?.trackId??null,deviceNames:E,onSelect:U})]}),u(`section`,{className:`space-y-3 min-w-0`,children:t===null?u(`p`,{className:`text-xs text-foreground-subtle`,children:`Pick a track from the staging list to start annotating it.`}):r(s,{children:[u(`div`,{className:`rounded-md border border-border bg-surface p-3`,children:u(lr,{candidates:O.data?.candidates??[],copies:O.data?.copies??[],activeFrameId:i,refusals:h,isSelecting:M.isPending,onSelectCandidate:e=>void W(e),onOpenCopy:o,onRemoveCopy:e=>void G(e)})}),i!==null&&r(`div`,{className:`grid grid-cols-1 xl:grid-cols-[minmax(0,1fr)_minmax(0,380px)] gap-3`,children:[u(`div`,{className:`rounded-md border border-border overflow-hidden`,children:se===void 0?r(`div`,{className:`flex items-center gap-2 p-6 text-xs text-foreground-subtle`,children:[u(J,{className:`h-3.5 w-3.5 animate-spin`}),`Loading the frame…`]}):u(sr,{imageSrc:`data:image/jpeg;base64,${se.base64}`,imageWidth:se.width,imageHeight:se.height,boxes:c,selectedIndex:p,onSelect:m,onDraw:K})}),r(`div`,{className:`rounded-md border border-border bg-surface flex flex-col min-h-0`,children:[r(`div`,{className:`px-3 py-2 border-b border-border flex items-center gap-2`,children:[u(`h2`,{className:`text-xs font-semibold text-foreground flex-1`,children:`Subjects`}),r(x,{variant:`secondary`,size:`sm`,disabled:F.isPending,onClick:()=>void te(`objects`),children:[u(Te,{className:`h-3 w-3`}),u(`span`,{className:`ml-1`,children:`Propose`})]}),r(x,{variant:`secondary`,size:`sm`,disabled:F.isPending,onClick:()=>void te(`package`),children:[u(Te,{className:`h-3 w-3`}),u(`span`,{className:`ml-1`,children:`Packages`})]})]}),u(`div`,{className:`flex-1 overflow-y-auto`,children:u(Qn,{annotations:c,selectedIndex:p,onSelect:m,onChange:ne,onDelete:re})}),r(`div`,{className:`px-3 py-2 border-t border-border flex items-center justify-between`,children:[r(`span`,{className:`text-[11px] text-foreground-subtle`,children:[c.filter(e=>e.kind===`model_error`).length,` marked as model errors`]}),u(x,{size:`sm`,disabled:!ce||I.isPending,onClick:()=>void ie(),children:`Save frame`})]})]})]})]})})]})]})}function gr(){return u(`div`,{className:`flex flex-col p-4`,children:u(Re,{tabs:[{id:`feed`,label:`Feed`,icon:ke,content:u(Jn,{})},{id:`retrain`,label:`Retrain`,icon:We,content:u(hr,{})},{id:`debug`,label:`Debug`,icon:Be,content:u(vn,{})}]})})}export{gr as EventsPage};
|
package/dist/assets/_virtual_mf-localSharedImportMap___mfe_internal__admin_ui_host-VrbJl3Qd.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./virtual_mf-REMOTE_ENTRY_ID___mfe_internal__admin_ui_host__remoteEntry-_hash_-8goUeGfT.js";import{t as e}from"./vite-preload-helper-kNaey6uv.js";var t={"@camstack/sdk":async()=>await e(()=>import(`./dist-Cq7gfGRn.js`),[],import.meta.url),"@camstack/types":async()=>await e(()=>import(`./dist--2HmeXG6.js`),[],import.meta.url),"@camstack/ui-library":async()=>await e(()=>import(`./src-CTrNqyF8.js`).then(e=>e.n),[],import.meta.url),"@tanstack/react-query":async()=>await e(()=>import(`./_virtual_mf___mfe_internal__admin_ui_host__loadShare___mf_0_tanstack_mf_1_react_mf_2_query__loadShare__.js-DhP-Lgiq.js`).then(e=>e.y),[],import.meta.url),"@trpc/client":async()=>await e(()=>import(`./_virtual_mf___mfe_internal__admin_ui_host__loadShare___mf_0_trpc_mf_1_client__loadShare__.js-8kv6pj9W.js`).then(e=>e.A),[],import.meta.url),"@trpc/react-query":async()=>await e(()=>import(`./_virtual_mf___mfe_internal__admin_ui_host__loadShare___mf_0_trpc_mf_1_react_mf_2_query__loadShare__.js-DX7sYWrs.js`).then(e=>e.i),[],import.meta.url),konva:async()=>await e(()=>import(`./_virtual_mf___mfe_internal__admin_ui_host__loadShare__konva__loadShare__.js-B7XYY0cV.js`).then(e=>e.n),[],import.meta.url),react:async()=>await e(()=>import(`./_virtual_mf___mfe_internal__admin_ui_host__loadShare___mf_0_tanstack_mf_1_react_mf_2_query__loadShare__.js-DhP-Lgiq.js`).then(e=>(e.et(),e.$)),[],import.meta.url),"react-dom":async()=>await e(()=>import(`./_virtual_mf___mfe_internal__admin_ui_host__loadShare__react_mf_2_dom__loadShare__.js-BsvPG3BX.js`).then(e=>(e.a(),e.i)),[],import.meta.url),"react-dom/client":async()=>await e(()=>import(`./_virtual_mf___mfe_internal__admin_ui_host__loadShare__react_mf_2_dom_mf_1_client__loadShare__.js-DtoGixA1.js`).then(e=>e.r),[],import.meta.url),"react-konva":async()=>await e(()=>import(`./_virtual_mf___mfe_internal__admin_ui_host__loadShare__react_mf_2_konva__loadShare__.js-PmiLsYEK.js`).then(e=>e.u),[],import.meta.url),"react/jsx-runtime":async()=>await e(()=>import(`./_virtual_mf___mfe_internal__admin_ui_host__loadShare___mf_0_tanstack_mf_1_react_mf_2_query__loadShare__.js-DhP-Lgiq.js`).then(e=>e.w),[],import.meta.url)},n={"@camstack/sdk":{name:`@camstack/sdk`,version:`1.2.99`,scope:[`default`],loaded:!1,from:`admin_ui_host`,async get(){n[`@camstack/sdk`].loaded=!0;let{"@camstack/sdk":e}=t,r={...await e()};return Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),function(){return r}},shareConfig:{singleton:!0,requiredVersion:`^1.2.99`}},"@camstack/types":{name:`@camstack/types`,version:`1.2.179`,scope:[`default`],loaded:!1,from:`admin_ui_host`,async get(){n[`@camstack/types`].loaded=!0;let{"@camstack/types":e}=t,r={...await e()};return Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),function(){return r}},shareConfig:{singleton:!0,requiredVersion:`^1.2.179`}},"@camstack/ui-library":{name:`@camstack/ui-library`,version:`1.2.147`,scope:[`default`],loaded:!1,from:`admin_ui_host`,async get(){n[`@camstack/ui-library`].loaded=!0;let{"@camstack/ui-library":e}=t,r={...await e()};return Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),function(){return r}},shareConfig:{singleton:!0,requiredVersion:`^1.2.147`}},"@tanstack/react-query":{name:`@tanstack/react-query`,version:`5.101.0`,scope:[`default`],loaded:!1,from:`admin_ui_host`,async get(){n[`@tanstack/react-query`].loaded=!0;let{"@tanstack/react-query":e}=t,r={...await e()};return Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),function(){return r}},shareConfig:{singleton:!0,requiredVersion:`^5.101.0`}},"@trpc/client":{name:`@trpc/client`,version:`11.18.0`,scope:[`default`],loaded:!1,from:`admin_ui_host`,async get(){n[`@trpc/client`].loaded=!0;let{"@trpc/client":e}=t,r={...await e()};return Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),function(){return r}},shareConfig:{singleton:!0,requiredVersion:`^11.18.0`}},"@trpc/react-query":{name:`@trpc/react-query`,version:`11.18.0`,scope:[`default`],loaded:!1,from:`admin_ui_host`,async get(){n[`@trpc/react-query`].loaded=!0;let{"@trpc/react-query":e}=t,r={...await e()};return Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),function(){return r}},shareConfig:{singleton:!0,requiredVersion:`^11.18.0`}},konva:{name:`konva`,version:`10.3.0`,scope:[`default`],loaded:!1,from:`admin_ui_host`,async get(){n.konva.loaded=!0;let{konva:e}=t,r={...await e()};return Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),function(){return r}},shareConfig:{singleton:!0,requiredVersion:`^10.3.0`}},react:{name:`react`,version:`19.2.7`,scope:[`default`],loaded:!1,from:`admin_ui_host`,async get(){n.react.loaded=!0;let{react:e}=t,r={...await e()};return Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),function(){return r}},shareConfig:{singleton:!0,requiredVersion:`^19.2.7`}},"react-dom":{name:`react-dom`,version:`19.2.7`,scope:[`default`],loaded:!1,from:`admin_ui_host`,async get(){n[`react-dom`].loaded=!0;let{"react-dom":e}=t,r={...await e()};return Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),function(){return r}},shareConfig:{singleton:!0,requiredVersion:`^19.2.7`}},"react-dom/client":{name:`react-dom/client`,version:`19.2.7`,scope:[`default`],loaded:!1,from:`admin_ui_host`,async get(){n[`react-dom/client`].loaded=!0;let{"react-dom/client":e}=t,r={...await e()};return Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),function(){return r}},shareConfig:{singleton:!0,requiredVersion:`^19.2.7`}},"react-konva":{name:`react-konva`,version:`19.2.5`,scope:[`default`],loaded:!1,from:`admin_ui_host`,async get(){n[`react-konva`].loaded=!0;let{"react-konva":e}=t,r={...await e()};return Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),function(){return r}},shareConfig:{singleton:!0,requiredVersion:`^19.2.5`}},"react/jsx-runtime":{name:`react/jsx-runtime`,version:`19.2.7`,scope:[`default`],loaded:!1,from:`admin_ui_host`,async get(){n[`react/jsx-runtime`].loaded=!0;let{"react/jsx-runtime":e}=t,r={...await e()};return Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),function(){return r}},shareConfig:{singleton:!0,requiredVersion:`^19.2.7`}}},r=[];export{r as usedRemotes,n as usedShared};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{J as e}from"./index-BCxSnXqL.js";var t=e(`circle-check-big`,[[`path`,{d:`M21.801 10A10 10 0 1 1 17 3.335`,key:`yps3ct`}],[`path`,{d:`m9 11 3 3L22 4`,key:`1pflzl`}]]);export{t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{J as e}from"./index-BCxSnXqL.js";var t=e(`circle-dot`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`circle`,{cx:`12`,cy:`12`,r:`1`,key:`41hilf`}]]);export{t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{J as e}from"./index-BCxSnXqL.js";var t=e(`circle-slash`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`line`,{x1:`9`,x2:`15`,y1:`15`,y2:`9`,key:`1dfufj`}]]);export{t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{J as e}from"./index-BCxSnXqL.js";var t=e(`clock`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`polyline`,{points:`12 6 12 12 16 14`,key:`68esgv`}]]);export{t};
|