@camstack/addon-benchmark 1.1.25 → 1.1.26

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/_stub.js CHANGED
@@ -1,15 +1,15 @@
1
1
  import "./virtualExposes-erbhyesj.mjs";
2
- import { a as e, i as t, o as n, r } from "./virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_benchmark_page__remoteEntry_js-BqQacshQ.mjs";
2
+ import { a as e, i as t, o as n, r } from "./virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_benchmark_page__remoteEntry_js-W3U2tqIW.mjs";
3
3
  import { _ as i, b as a, c as o, f as s, g as c, h as l, i as u, l as d, m as f, n as p, p as m, r as h, t as g, u as _, v, x as y, y as b } from "./_virtual_mf___mfe_internal__addon_benchmark_page__loadShare__react__loadShare__.js-GeuxDuzQ.mjs";
4
4
  import { i as x, n as S, r as C, t as w } from "./_virtual_mf___mfe_internal__addon_benchmark_page__loadShare__react_mf_1_jsx_mf_2_runtime__loadShare__.js-SOU_VnTj.mjs";
5
- import { a as T, d as E, f as D, h as O, i as k, l as A, r as j, t as M, u as N } from "./_virtual_mf___mfe_internal__addon_benchmark_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-DrTRcWAq.mjs";
6
- import { a as P, c as F, d as I, i as L, l as ee, n as R, o as z, p as B, r as V, s as H, u as U } from "./player-overlays-ASIq423K.mjs";
5
+ import { a as T, d as E, f as D, h as O, i as k, l as A, r as j, t as M, u as N } from "./_virtual_mf___mfe_internal__addon_benchmark_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-Dd1oywbO.mjs";
6
+ import { a as P, c as F, d as I, i as L, l as ee, n as R, o as z, p as B, r as V, s as H, u as U } from "./player-overlays-C5OIOi65.mjs";
7
7
  import { n as W, t as G } from "./_virtual_mf___mfe_internal__addon_benchmark_page__loadShare__react_mf_2_dom__loadShare__.js-DQaf3kYb.mjs";
8
- import { t as te } from "./_virtual_mf___mfe_internal__addon_benchmark_page__loadShare__react_mf_2_dom_mf_1_client__loadShare__.js-DUzuN6aS.mjs";
9
- import { n as ne, t as re } from "./_virtual_mf___mfe_internal__addon_benchmark_page__loadShare___mf_0_tanstack_mf_1_react_mf_2_query__loadShare__.js-lv97RBhq.mjs";
10
- import { t as ie } from "./_virtual_mf___mfe_internal__addon_benchmark_page__loadShare___mf_0_trpc_mf_1_client__loadShare__.js-DtWmo0vJ.mjs";
11
- import { n as ae, t as oe } from "./_virtual_mf___mfe_internal__addon_benchmark_page__loadShare___mf_0_trpc_mf_1_react_mf_2_query__loadShare__.js-Bh7FS7ML.mjs";
12
- import { n as se, r as K, t as ce } from "./trash-2-CUiipiGX.mjs";
8
+ import { t as K } from "./_virtual_mf___mfe_internal__addon_benchmark_page__loadShare__react_mf_2_dom_mf_1_client__loadShare__.js-DUzuN6aS.mjs";
9
+ import { n as te, t as ne } from "./_virtual_mf___mfe_internal__addon_benchmark_page__loadShare___mf_0_tanstack_mf_1_react_mf_2_query__loadShare__.js-lv97RBhq.mjs";
10
+ import { t as re } from "./_virtual_mf___mfe_internal__addon_benchmark_page__loadShare___mf_0_trpc_mf_1_client__loadShare__.js-DtWmo0vJ.mjs";
11
+ import { n as ie, t as ae } from "./_virtual_mf___mfe_internal__addon_benchmark_page__loadShare___mf_0_trpc_mf_1_react_mf_2_query__loadShare__.js-Bh7FS7ML.mjs";
12
+ import { n as oe, r as se, t as ce } from "./trash-2-BhdhYFEf.mjs";
13
13
  import "./_virtual_mf___mfe_internal__addon_benchmark_page__loadShare___mf_0_camstack_mf_1_sdk__loadShare__.js-DSTkBuYy.mjs";
14
14
  //#endregion
15
15
  //#region ../ui-library/src/theme/use-theme-mode.ts
@@ -468,21 +468,21 @@ var de = (e, t) => {
468
468
  m,
469
469
  Y,
470
470
  J
471
- ], te = () => [
471
+ ], K = () => [
472
472
  "none",
473
473
  q,
474
474
  Y,
475
475
  J
476
- ], ne = () => [
476
+ ], te = () => [
477
477
  "none",
478
478
  q,
479
479
  Y,
480
480
  J
481
- ], re = () => [
481
+ ], ne = () => [
482
482
  q,
483
483
  Y,
484
484
  J
485
- ], ie = () => [
485
+ ], re = () => [
486
486
  $e,
487
487
  "full",
488
488
  ...w()
@@ -1378,18 +1378,18 @@ var de = (e, t) => {
1378
1378
  J
1379
1379
  ] }],
1380
1380
  "perspective-origin": [{ "perspective-origin": x() }],
1381
- rotate: [{ rotate: te() }],
1382
- "rotate-x": [{ "rotate-x": te() }],
1383
- "rotate-y": [{ "rotate-y": te() }],
1384
- "rotate-z": [{ "rotate-z": te() }],
1385
- scale: [{ scale: ne() }],
1386
- "scale-x": [{ "scale-x": ne() }],
1387
- "scale-y": [{ "scale-y": ne() }],
1388
- "scale-z": [{ "scale-z": ne() }],
1381
+ rotate: [{ rotate: K() }],
1382
+ "rotate-x": [{ "rotate-x": K() }],
1383
+ "rotate-y": [{ "rotate-y": K() }],
1384
+ "rotate-z": [{ "rotate-z": K() }],
1385
+ scale: [{ scale: te() }],
1386
+ "scale-x": [{ "scale-x": te() }],
1387
+ "scale-y": [{ "scale-y": te() }],
1388
+ "scale-z": [{ "scale-z": te() }],
1389
1389
  "scale-3d": ["scale-3d"],
1390
- skew: [{ skew: re() }],
1391
- "skew-x": [{ "skew-x": re() }],
1392
- "skew-y": [{ "skew-y": re() }],
1390
+ skew: [{ skew: ne() }],
1391
+ "skew-x": [{ "skew-x": ne() }],
1392
+ "skew-y": [{ "skew-y": ne() }],
1393
1393
  transform: [{ transform: [
1394
1394
  Y,
1395
1395
  J,
@@ -1400,10 +1400,10 @@ var de = (e, t) => {
1400
1400
  ] }],
1401
1401
  "transform-origin": [{ origin: x() }],
1402
1402
  "transform-style": [{ transform: ["3d", "flat"] }],
1403
- translate: [{ translate: ie() }],
1404
- "translate-x": [{ "translate-x": ie() }],
1405
- "translate-y": [{ "translate-y": ie() }],
1406
- "translate-z": [{ "translate-z": ie() }],
1403
+ translate: [{ translate: re() }],
1404
+ "translate-x": [{ "translate-x": re() }],
1405
+ "translate-y": [{ "translate-y": re() }],
1406
+ "translate-z": [{ "translate-z": re() }],
1407
1407
  "translate-none": ["translate-none"],
1408
1408
  zoom: [{ zoom: [
1409
1409
  et,
@@ -1823,7 +1823,7 @@ function Ut() {
1823
1823
  }
1824
1824
  function Wt() {
1825
1825
  let e = Ut();
1826
- e.share.react ??= a, e.share["react-dom"] ??= W, e.share["react-dom/client"] ??= te, e.share["react/jsx-runtime"] ??= x, e.share["@tanstack/react-query"] ??= ne, e.share["@trpc/client"] ??= ie, e.share["@trpc/react-query"] ??= ae, e.share["@camstack/ui-library"] ??= zt("__camstackUiLibrary"), e.share["@camstack/sdk"] ??= zt("__camstackSdk"), e.share["@camstack/types"] ??= zt("__camstackTypes");
1826
+ e.share.react ??= a, e.share["react-dom"] ??= W, e.share["react-dom/client"] ??= K, e.share["react/jsx-runtime"] ??= x, e.share["@tanstack/react-query"] ??= te, e.share["@trpc/client"] ??= re, e.share["@trpc/react-query"] ??= ie, e.share["@camstack/ui-library"] ??= zt("__camstackUiLibrary"), e.share["@camstack/sdk"] ??= zt("__camstackSdk"), e.share["@camstack/types"] ??= zt("__camstackTypes");
1827
1827
  }
1828
1828
  var Gt = (e) => ({
1829
1829
  version: "0.0.0",
@@ -1846,11 +1846,11 @@ function qt() {
1846
1846
  shared: {
1847
1847
  react: Vt(() => a),
1848
1848
  "react-dom": Vt(() => W),
1849
- "react-dom/client": Vt(() => te),
1849
+ "react-dom/client": Vt(() => K),
1850
1850
  "react/jsx-runtime": Vt(() => x),
1851
- "@tanstack/react-query": Vt(() => ne),
1852
- "@trpc/client": Vt(() => ie),
1853
- "@trpc/react-query": Vt(() => ae),
1851
+ "@tanstack/react-query": Vt(() => te),
1852
+ "@trpc/client": Vt(() => re),
1853
+ "@trpc/react-query": Vt(() => ie),
1854
1854
  "react-konva": Gt(() => import("./ReactKonva-DXzDAU1q.mjs").then((e) => e.t)),
1855
1855
  konva: Gt(() => import("./lib-CVGFTwe0.mjs").then((e) => e.t)),
1856
1856
  "@camstack/ui-library": Vt(() => zt("__camstackUiLibrary")),
@@ -4907,7 +4907,7 @@ function zi({ label: e, active: t, variant: n, subtext: r, onClick: i }) {
4907
4907
  y(), y();
4908
4908
  //#endregion
4909
4909
  //#region ../ui-library/src/trpc-react.ts
4910
- var Bi = typeof globalThis < "u" ? globalThis.__camstackTrpcReact : void 0, Z = Bi ?? oe();
4910
+ var Bi = typeof globalThis < "u" ? globalThis.__camstackTrpcReact : void 0, Z = Bi ?? ae();
4911
4911
  //#endregion
4912
4912
  //#region ../ui-library/src/hooks/use-live-event.ts
4913
4913
  typeof globalThis < "u" && !Bi && (globalThis.__camstackTrpcReact = Z), y();
@@ -5354,14 +5354,14 @@ function ta({ controls: e, mode: t = "overlay", showPresets: n, showZoom: r = !0
5354
5354
  document.removeEventListener("mousedown", e), document.removeEventListener("keydown", t);
5355
5355
  };
5356
5356
  }, [O]);
5357
- let te = I ? "flex flex-col items-stretch gap-2 w-full h-full p-3" : "pointer-events-auto absolute top-3 right-3 z-10 flex flex-col items-end gap-2", ne = X(I ? "flex items-center gap-3 rounded-lg p-2" : "flex items-center gap-2 rounded-lg border border-white/30 bg-zinc-900/90 backdrop-blur-md p-2 shadow-lg shadow-black/40", T && "ring-1 ring-primary/40"), re = I ? "h-9 w-9" : "h-7 w-7", ie = I ? "h-4 w-4" : "h-3.5 w-3.5", ae = I ? "text-foreground hover:bg-surface-hover" : "text-white hover:bg-white/15", oe = I ? "h-12 w-px bg-border mx-1" : "h-12 w-px bg-white/15 mx-1";
5357
+ let K = I ? "flex flex-col items-stretch gap-2 w-full h-full p-3" : "pointer-events-auto absolute top-3 right-3 z-10 flex flex-col items-end gap-2", te = X(I ? "flex items-center gap-3 rounded-lg p-2" : "flex items-center gap-2 rounded-lg border border-white/30 bg-zinc-900/90 backdrop-blur-md p-2 shadow-lg shadow-black/40", T && "ring-1 ring-primary/40"), ne = I ? "h-9 w-9" : "h-7 w-7", re = I ? "h-4 w-4" : "h-3.5 w-3.5", ie = I ? "text-foreground hover:bg-surface-hover" : "text-white hover:bg-white/15", ae = I ? "h-12 w-px bg-border mx-1" : "h-12 w-px bg-white/15 mx-1";
5358
5358
  return /* @__PURE__ */ C("div", {
5359
- className: X(te, a),
5359
+ className: X(K, a),
5360
5360
  children: [E && /* @__PURE__ */ C("div", {
5361
5361
  className: "rounded bg-danger/90 px-2 py-1 text-[10px] font-medium text-white shadow-lg max-w-[200px] self-center",
5362
5362
  children: ["PTZ: ", E]
5363
5363
  }), /* @__PURE__ */ C("div", {
5364
- className: X(ne, I && "justify-center"),
5364
+ className: X(te, I && "justify-center"),
5365
5365
  children: [
5366
5366
  /* @__PURE__ */ C("div", {
5367
5367
  className: "grid grid-cols-3 gap-0.5",
@@ -5420,7 +5420,7 @@ function ta({ controls: e, mode: t = "overlay", showPresets: n, showZoom: r = !0
5420
5420
  })
5421
5421
  ]
5422
5422
  }),
5423
- (L || i) && /* @__PURE__ */ S("div", { className: oe }),
5423
+ (L || i) && /* @__PURE__ */ S("div", { className: ae }),
5424
5424
  /* @__PURE__ */ C("div", {
5425
5425
  className: "flex flex-col gap-0.5",
5426
5426
  children: [L && /* @__PURE__ */ C(w, { children: [/* @__PURE__ */ S("button", {
@@ -5428,22 +5428,22 @@ function ta({ controls: e, mode: t = "overlay", showPresets: n, showZoom: r = !0
5428
5428
  onClick: () => p("in"),
5429
5429
  disabled: T,
5430
5430
  title: "Zoom in",
5431
- className: X("flex items-center justify-center rounded disabled:opacity-40", re, ae),
5432
- children: /* @__PURE__ */ S($r, { className: ie })
5431
+ className: X("flex items-center justify-center rounded disabled:opacity-40", ne, ie),
5432
+ children: /* @__PURE__ */ S($r, { className: re })
5433
5433
  }), /* @__PURE__ */ S("button", {
5434
5434
  type: "button",
5435
5435
  onClick: () => p("out"),
5436
5436
  disabled: T,
5437
5437
  title: "Zoom out",
5438
- className: X("flex items-center justify-center rounded disabled:opacity-40", re, ae),
5439
- children: /* @__PURE__ */ S(ei, { className: ie })
5438
+ className: X("flex items-center justify-center rounded disabled:opacity-40", ne, ie),
5439
+ children: /* @__PURE__ */ S(ei, { className: re })
5440
5440
  })] }), i && /* @__PURE__ */ S("button", {
5441
5441
  type: "button",
5442
5442
  onClick: () => m(),
5443
5443
  disabled: T,
5444
5444
  title: "Go home",
5445
- className: X("flex items-center justify-center rounded disabled:opacity-40", re, ae),
5446
- children: /* @__PURE__ */ S(Xn, { className: ie })
5445
+ className: X("flex items-center justify-center rounded disabled:opacity-40", ne, ie),
5446
+ children: /* @__PURE__ */ S(Xn, { className: re })
5447
5447
  })]
5448
5448
  }),
5449
5449
  z && /* @__PURE__ */ C("div", {
@@ -5536,9 +5536,9 @@ function ta({ controls: e, mode: t = "overlay", showPresets: n, showZoom: r = !0
5536
5536
  })]
5537
5537
  });
5538
5538
  }
5539
- y(), y(), y(), Z.accessories.setChildHidden.useMutation, Z.accessories.getStatus.useQuery, Z.addonPages.listPages.useQuery, Z.addons.list.useQuery, Z.addons.getLogs.useQuery, Z.addons.listPackages.useQuery, Z.addons.installPackage.useMutation, Z.addons.installFromWorkspace.useMutation, Z.addons.isWorkspaceAvailable.useQuery, Z.addons.listWorkspacePackages.useQuery, Z.addons.uninstallPackage.useMutation, Z.addons.reloadPackages.useMutation, Z.addons.searchAvailable.useQuery, Z.addons.listUpdates.useQuery, Z.addons.updatePackage.useMutation, Z.addons.rollbackPackage.useMutation, Z.addons.forceRefresh.useMutation, Z.addons.restartServer.useMutation, Z.addons.getLastRestart.useQuery, Z.addons.listFrameworkPackages.useQuery, Z.addons.listCapabilityProviders.useQuery, Z.addons.setCapabilityProviderEnabled.useMutation, Z.addons.updateFrameworkPackage.useMutation, Z.addons.getVersions.useQuery, Z.addons.restartAddon.useMutation, Z.addons.retryLoad.useMutation, Z.addons.getAutoUpdateSettings.useQuery, Z.addons.setAutoUpdateSettings.useMutation, Z.addons.getAddonAutoUpdate.useQuery, Z.addons.setAddonAutoUpdate.useMutation, Z.addons.applyAutoUpdateToAll.useMutation, Z.addons.custom.useMutation, Z.addons.startJob.useMutation, Z.addons.getJob.useQuery, Z.addons.listJobs.useQuery, Z.addons.cancelJob.useMutation, Z.addons.onAddonLogs.useSubscription, Z.addonSettings.getGlobalSettings.useQuery, Z.addonSettings.updateGlobalSettings.useMutation, Z.addonSettings.getDeviceSettings.useQuery, Z.addonSettings.updateDeviceSettings.useMutation, Z.addonWidgets.listWidgets.useQuery, Z.airQualitySensor.getStatus.useQuery, Z.alarmPanel.arm.useMutation, Z.alarmPanel.disarm.useMutation, Z.alarmPanel.trigger.useMutation, Z.alarmPanel.getStatus.useQuery, Z.alerts.emit.useMutation, Z.alerts.update.useMutation, Z.alerts.list.useQuery, Z.alerts.getUnreadCount.useQuery, Z.alerts.markRead.useMutation, Z.alerts.markAllRead.useMutation, Z.alerts.dismiss.useMutation, Z.ambientLightSensor.getStatus.useQuery, Z.audioAnalysis.resolveDeviceSettings.useQuery, Z.audioAnalysis.getDeviceSettingsContribution.useQuery, Z.audioAnalysis.getDeviceLiveContribution.useQuery, Z.audioAnalysis.applyDeviceSettingsPatch.useMutation, Z.audioAnalyzer.analyseChunk.useMutation, Z.audioAnalyzer.classify.useQuery, Z.audioAnalyzer.isReady.useQuery, Z.audioAnalyzer.dispose.useMutation, Z.audioAnalyzer.reprobeAudioEngine.useMutation, Z.audioCodec.listSupportedCodecs.useQuery, Z.audioCodec.canHandle.useQuery, Z.audioCodec.createDecodeSession.useMutation, Z.audioCodec.createEncodeSession.useMutation, Z.audioCodec.closeSession.useMutation, Z.audioCodec.pushEncodedFrame.useMutation, Z.audioCodec.pullPcm.useQuery, Z.audioCodec.pushPcm.useMutation, Z.audioCodec.pullEncoded.useQuery, Z.audioCodec.flushEncode.useMutation, Z.audioCodec.listActiveSessions.useQuery, Z.audioMetrics.getCurrentSnapshot.useQuery, Z.audioMetrics.getHistory.useQuery, Z.automationControl.enable.useMutation, Z.automationControl.disable.useMutation, Z.automationControl.trigger.useMutation, Z.automationControl.getStatus.useQuery, Z.backup.listDestinations.useQuery, Z.backup.trigger.useMutation, Z.backup.list.useQuery, Z.backup.listLocations.useQuery, Z.backup.getEntries.useQuery, Z.backup.restore.useMutation, Z.backup.delete.useMutation, Z.backup.listArchives.useQuery, Z.backup.upsertDestinationPolicy.useMutation, Z.backup.previewSchedule.useQuery, Z.battery.wakeForStream.useMutation, Z.battery.getStatus.useQuery, Z.binary.getStatus.useQuery, Z.brightness.setBrightness.useMutation, Z.brightness.getStatus.useQuery, Z.broker.list.useQuery, Z.broker.get.useQuery, Z.broker.listProviders.useQuery, Z.broker.add.useMutation, Z.broker.remove.useMutation, Z.broker.testConnection.useMutation, Z.broker.getSettings.useQuery, Z.broker.setSettings.useMutation, Z.broker.getBrokerConfig.useQuery, Z.broker.getSettingsSchema.useQuery, Z.broker.testSettings.useMutation, Z.broker.publish.useMutation, Z.broker.subscribe.useMutation, Z.broker.unsubscribe.useMutation, Z.broker.getState.useQuery, Z.broker.getStatus.useQuery, Z.button.press.useMutation, Z.cameraCredentials.getCredentials.useQuery, Z.cameraCredentials.getStatus.useQuery, Z.cameraPipelineConfig.getDeviceSettingsContribution.useQuery, Z.cameraPipelineConfig.getDeviceLiveContribution.useQuery, Z.cameraPipelineConfig.applyDeviceSettingsPatch.useMutation, Z.cameraStreams.getCameraStreams.useQuery, Z.cameraStreams.getBrokerStreams.useQuery, Z.cameraStreams.getRtspEntries.useQuery, Z.cameraStreams.getProfileRtspEntries.useQuery, Z.cameraStreams.pickStream.useQuery, Z.carbonMonoxide.getStatus.useQuery, Z.climateControl.setMode.useMutation, Z.climateControl.setFanMode.useMutation, Z.climateControl.setPreset.useMutation, Z.climateControl.setTarget.useMutation, Z.climateControl.setTargetRange.useMutation, Z.climateControl.setTargetHumidity.useMutation, Z.climateControl.setSwingVertical.useMutation, Z.climateControl.setSwingHorizontal.useMutation, Z.climateControl.getStatus.useQuery, Z.color.setColor.useMutation, Z.color.getStatus.useQuery, Z.connectivity.getStatus.useQuery, Z.consumables.reset.useMutation, Z.consumables.getStatus.useQuery, Z.contact.getStatus.useQuery, Z.control.setValue.useMutation, Z.control.getStatus.useQuery, Z.cover.open.useMutation, Z.cover.close.useMutation, Z.cover.stop.useMutation, Z.cover.setPosition.useMutation, Z.cover.setTiltPosition.useMutation, Z.cover.getStatus.useQuery, Z.dayNight.getOptions.useQuery, Z.dayNight.setSettings.useMutation, Z.dayNight.getStatus.useQuery, Z.decoder.supportsCodec.useQuery, Z.decoder.getInfo.useQuery, Z.decoder.createSession.useQuery, Z.decoder.destroySession.useQuery, Z.decoder.pushPacket.useQuery, Z.decoder.openStream.useQuery, Z.decoder.pullFrames.useQuery, Z.decoder.pullHandles.useQuery, Z.decoder.getFrame.useQuery, Z.decoder.getShmStats.useQuery, Z.decoder.updateConfig.useQuery, Z.decoder.getStats.useQuery, Z.decoder.listActiveSessions.useQuery, Z.decoder.reprobeHwaccel.useMutation, Z.detectionPipeline.getDeviceSettingsContribution.useQuery, Z.detectionPipeline.getDeviceLiveContribution.useQuery, Z.detectionPipeline.applyDeviceSettingsPatch.useMutation, Z.deviceAdoption.listCandidateFilters.useQuery, Z.deviceAdoption.listCandidates.useQuery, Z.deviceAdoption.getCandidate.useQuery, Z.deviceAdoption.refresh.useMutation, Z.deviceAdoption.adopt.useMutation, Z.deviceAdoption.release.useMutation, Z.deviceAdoption.resync.useMutation, Z.deviceAdoption.getStatus.useQuery, Z.deviceDiscovery.listDiscovered.useQuery, Z.deviceDiscovery.refreshDiscovery.useMutation, Z.deviceDiscovery.adoptDevice.useMutation, Z.deviceDiscovery.releaseDevice.useMutation, Z.deviceDiscovery.getStatus.useQuery, Z.deviceExport.getStatus.useQuery, Z.deviceExport.listSupportedDeviceKinds.useQuery, Z.deviceExport.listExposedDevices.useQuery, Z.deviceExport.exposeDevice.useMutation, Z.deviceExport.unexposeDevice.useMutation, Z.deviceExport.getDeviceSettingsContribution.useQuery, Z.deviceExport.getDeviceLiveContribution.useQuery, Z.deviceExport.applyDeviceSettingsPatch.useMutation, Z.deviceManager.allocateDeviceId.useMutation, Z.deviceManager.registerDevice.useMutation, Z.deviceManager.removeDevice.useMutation, Z.deviceManager.persistConfig.useMutation, Z.deviceManager.loadConfig.useQuery, Z.deviceManager.loadRuntimeState.useQuery, Z.deviceManager.loadMeta.useQuery, Z.deviceManager.setName.useMutation, Z.deviceManager.setLocation.useMutation, Z.deviceManager.setType.useMutation, Z.deviceManager.setIntegrationId.useMutation, Z.deviceManager.setLinkDeviceId.useMutation, Z.deviceManager.setPrimaryChildEntityId.useMutation, Z.deviceManager.setChildLayout.useMutation, Z.deviceManager.setDeviceLinks.useMutation, Z.deviceManager.setDisplay.useMutation, Z.deviceManager.getRoleDisplayDefaults.useQuery, Z.deviceManager.setRoleDisplayDefaults.useMutation, Z.deviceManager.getWireableFields.useQuery, Z.deviceManager.setRole.useMutation, Z.deviceManager.applyInitialMeta.useMutation, Z.deviceManager.setMetadata.useMutation, Z.deviceManager.listLocations.useQuery, Z.deviceManager.addLocation.useMutation, Z.deviceManager.removeLocation.useMutation, Z.deviceManager.setDisabled.useMutation, Z.deviceManager.listPersistedByAddon.useQuery, Z.deviceManager.listAll.useQuery, Z.deviceManager.getDevice.useQuery, Z.deviceManager.getChildren.useQuery, Z.deviceManager.getStreamSources.useQuery, Z.deviceManager.getConfigSchema.useQuery, Z.deviceManager.getSettingsSchema.useQuery, Z.deviceManager.updateConfig.useMutation, Z.deviceManager.enable.useMutation, Z.deviceManager.disable.useMutation, Z.deviceManager.remove.useMutation, Z.deviceManager.removeByIntegration.useMutation, Z.deviceManager.getStreamProfileMap.useQuery, Z.deviceManager.setStreamProfileMap.useMutation, Z.deviceManager.probeStreams.useMutation, Z.deviceManager.getBindings.useQuery, Z.deviceManager.getAllBindings.useQuery, Z.deviceManager.setWrapperActive.useMutation, Z.deviceManager.listWrappersForCap.useQuery, Z.deviceManager.listBindableCapsForDeviceType.useQuery, Z.deviceManager.getDeviceSettingsAggregate.useQuery, Z.deviceManager.getDeviceLiveInfoAggregate.useQuery, Z.deviceManager.getDeviceAggregate.useQuery, Z.deviceManager.runDeviceAction.useMutation, Z.deviceManager.updateDeviceField.useMutation, Z.deviceManager.updateDeviceFieldsBatch.useMutation, Z.deviceManager.discoverDevices.useMutation, Z.deviceManager.adoptDevice.useMutation, Z.deviceManager.getCreationSchema.useQuery, Z.deviceManager.createDevice.useMutation, Z.deviceManager.testCreationField.useMutation, Z.deviceManager.adoptionListCandidateFilters.useQuery, Z.deviceManager.adoptionListCandidates.useQuery, Z.deviceManager.adoptionRefresh.useMutation, Z.deviceManager.adoptionAdopt.useMutation, Z.deviceManager.adoptionRelease.useMutation, Z.deviceManager.adoptionResync.useMutation, Z.deviceManager.discoveryProviders.useQuery, Z.deviceManager.discoverAllProviders.useMutation, Z.deviceManager.discoverProvider.useMutation, Z.deviceManager.providerCreationType.useQuery, Z.deviceManager.providerDiscoveryParamsSchema.useQuery, Z.deviceManager.testField.useMutation, Z.deviceManager.getDeviceStatusAggregate.useQuery, Z.deviceOps.getStreamSources.useQuery, Z.deviceOps.getConfigEntries.useQuery, Z.deviceOps.setConfig.useMutation, Z.deviceOps.runAction.useMutation, Z.deviceOps.removeDevice.useMutation, Z.deviceOps.getSettingsSchema.useQuery, Z.deviceOps.getRawState.useQuery, Z.deviceProvider.start.useMutation, Z.deviceProvider.stop.useMutation, Z.deviceProvider.getStatus.useQuery, Z.deviceProvider.getDevices.useQuery, Z.deviceProvider.supportsDiscovery.useQuery, Z.deviceProvider.discoverDevices.useMutation, Z.deviceProvider.getDiscoveryParamsSchema.useQuery, Z.deviceProvider.getManualCreationType.useQuery, Z.deviceProvider.adoptDiscoveredDevice.useMutation, Z.deviceProvider.supportsManualCreation.useQuery, Z.deviceProvider.getChildCreationSchema.useQuery, Z.deviceProvider.createDevice.useMutation, Z.deviceProvider.testCreationField.useMutation, Z.deviceState.getSnapshot.useQuery, Z.deviceState.getCapSlice.useQuery, Z.deviceState.getAllSnapshots.useQuery, Z.deviceState.setCapSlice.useMutation, Z.deviceStatus.getStatus.useQuery, Z.doorbell.getStatus.useQuery, Z.enumSensor.getStatus.useQuery, Z.eventEmitter.getStatus.useQuery, Z.events.getEvents.useQuery, Z.events.getEventThumbnail.useQuery, Z.events.getEventClipUrl.useQuery, Z.faceGallery.listIdentities.useQuery, Z.faceGallery.createIdentity.useMutation, Z.faceGallery.renameIdentity.useMutation, Z.faceGallery.deleteIdentity.useMutation, Z.faceGallery.listIdentitySamples.useQuery, Z.faceGallery.removeSample.useMutation, Z.faceGallery.listRecentFaces.useQuery, Z.faceGallery.getFaceByTrack.useQuery, Z.faceGallery.getFaceMedia.useQuery, Z.faceGallery.assignFace.useMutation, Z.faceGallery.unassignFace.useMutation, Z.faceGallery.deleteFace.useMutation, Z.faceGallery.assignFaces.useMutation, Z.faceGallery.unassignFaces.useMutation, Z.faceGallery.suggestFaceClusters.useQuery, Z.fanControl.setPercentage.useMutation, Z.fanControl.setPreset.useMutation, Z.fanControl.setDirection.useMutation, Z.fanControl.setOscillating.useMutation, Z.fanControl.getStatus.useQuery, Z.featureProbe.getStatus.useQuery, Z.flood.getStatus.useQuery, Z.gas.getStatus.useQuery, Z.humidifier.setOn.useMutation, Z.humidifier.setTargetHumidity.useMutation, Z.humidifier.setMode.useMutation, Z.humidifier.getStatus.useQuery, Z.humiditySensor.getStatus.useQuery, Z.image.getStatus.useQuery, Z.imageSettings.getOptions.useQuery, Z.imageSettings.setSettings.useMutation, Z.imageSettings.getStatus.useQuery, Z.integrations.list.useQuery, Z.integrations.get.useQuery, Z.integrations.getByAddonId.useQuery, Z.integrations.create.useMutation, Z.integrations.update.useMutation, Z.integrations.delete.useMutation, Z.integrations.getSettings.useQuery, Z.integrations.setSettings.useMutation, Z.integrations.getAvailableTypes.useQuery, Z.integrations.testConnection.useMutation, Z.intercom.startSession.useMutation, Z.intercom.handleAnswer.useMutation, Z.intercom.stopSession.useMutation, Z.intercom.startTalkSession.useMutation, Z.intercom.pushTalkAudio.useMutation, Z.intercom.endTalkSession.useMutation, Z.intercom.getStatus.useQuery, Z.lawnMowerControl.startMowing.useMutation, Z.lawnMowerControl.pause.useMutation, Z.lawnMowerControl.dock.useMutation, Z.lawnMowerControl.getStatus.useQuery, Z.llm.generate.useMutation, Z.llm.generateVision.useMutation, Z.llm.listProfileKinds.useQuery, Z.llm.listProfiles.useQuery, Z.llm.upsertProfile.useMutation, Z.llm.deleteProfile.useMutation, Z.llm.testProfile.useMutation, Z.llm.listModels.useQuery, Z.llm.getDefaults.useQuery, Z.llm.setDefault.useMutation, Z.llm.getUsage.useQuery, Z.llm.listModelCatalog.useQuery, Z.llm.listRuntimeNodes.useQuery, Z.llm.listNodeModels.useQuery, Z.llm.installModel.useMutation, Z.llm.deleteModel.useMutation, Z.llm.getRuntimeStatus.useQuery, Z.llm.startRuntime.useMutation, Z.llm.stopRuntime.useMutation, Z.localNetwork.list.useQuery, Z.localNetwork.getPreferred.useQuery, Z.localNetwork.getConnectionEndpoints.useQuery, Z.localNetwork.getAllowedAddresses.useQuery, Z.localNetwork.setAllowedAddresses.useMutation, Z.localNetwork.resetAllowlistToBestMatch.useMutation, Z.lockControl.lock.useMutation, Z.lockControl.unlock.useMutation, Z.lockControl.open.useMutation, Z.lockControl.getStatus.useQuery, Z.mediaPlayer.play.useMutation, Z.mediaPlayer.pause.useMutation, Z.mediaPlayer.stop.useMutation, Z.mediaPlayer.next.useMutation, Z.mediaPlayer.previous.useMutation, Z.mediaPlayer.seek.useMutation, Z.mediaPlayer.setVolume.useMutation, Z.mediaPlayer.setMute.useMutation, Z.mediaPlayer.setShuffle.useMutation, Z.mediaPlayer.setRepeat.useMutation, Z.mediaPlayer.selectSource.useMutation, Z.mediaPlayer.playMedia.useMutation, Z.mediaPlayer.getStatus.useQuery, Z.meshNetwork.getStatus.useQuery, Z.meshNetwork.join.useMutation, Z.meshNetwork.startLogin.useMutation, Z.meshNetwork.leave.useMutation, Z.meshNetwork.logout.useMutation, Z.meshNetwork.listPeers.useQuery, Z.meshNetwork.testConnection.useMutation, Z.metricsProvider.collectSnapshot.useQuery, Z.metricsProvider.getCached.useQuery, Z.metricsProvider.getCurrent.useQuery, Z.metricsProvider.getDiskSpace.useQuery, Z.metricsProvider.getGpuInfo.useQuery, Z.metricsProvider.getCpuTemperature.useQuery, Z.metricsProvider.getProcessStats.useQuery, Z.metricsProvider.listAddonInstances.useQuery, Z.metricsProvider.getAddonStats.useQuery, Z.metricsProvider.listNodeProcesses.useQuery, Z.metricsProvider.killProcess.useMutation, Z.metricsProvider.dumpHeapSnapshot.useMutation, Z.motion.isDetected.useQuery, Z.motion.getStatus.useQuery, Z.motionDetection.analyze.useMutation, Z.motionDetection.removeCamera.useMutation, Z.motionDetection.reset.useMutation, Z.motionDetection.getDeviceSettingsContribution.useQuery, Z.motionDetection.getDeviceLiveContribution.useQuery, Z.motionDetection.applyDeviceSettingsPatch.useMutation, Z.motionTrigger.setMotionTrigger.useMutation, Z.motionTrigger.getStatus.useQuery, Z.motionZones.getOptions.useQuery, Z.motionZones.setZone.useMutation, Z.motionZones.getStatus.useQuery, Z.mqttBroker.listBrokers.useQuery, Z.mqttBroker.getBrokerConfig.useQuery, Z.mqttBroker.addBroker.useMutation, Z.mqttBroker.removeBroker.useMutation, Z.mqttBroker.testConnection.useMutation, Z.mqttBroker.startEmbeddedBroker.useMutation, Z.mqttBroker.stopEmbeddedBroker.useMutation, Z.mqttBroker.getStatus.useQuery, Z.nativeObjectDetection.setEnabled.useMutation, Z.nativeObjectDetection.getStatus.useQuery, Z.networkAccess.start.useMutation, Z.networkAccess.stop.useMutation, Z.networkAccess.getEndpoint.useQuery, Z.networkAccess.getStatus.useQuery, Z.networkAccess.listEndpoints.useQuery, Z.networkQuality.getDeviceStats.useQuery, Z.networkQuality.getAllStats.useQuery, Z.networkQuality.reportClientStats.useMutation, Z.nodes.topology.useQuery, Z.nodes.deployAddon.useMutation, Z.nodes.undeployAddon.useMutation, Z.nodes.restartAddon.useMutation, Z.nodes.restartProcess.useMutation, Z.nodes.restartNode.useMutation, Z.nodes.shutdownNode.useMutation, Z.nodes.renameNode.useMutation, Z.nodes.clusterAddonStatus.useQuery, Z.nodes.getCapUsageGraph.useQuery, Z.nodes.getNodeAddons.useQuery, Z.nodes.setProcessLogLevel.useMutation, Z.nodes.executeQuery.useMutation, Z.notificationOutput.listTargetKinds.useQuery, Z.notificationOutput.listTargets.useQuery, Z.notificationOutput.discoverTargets.useQuery, Z.notificationOutput.send.useMutation, Z.notificationOutput.testTarget.useMutation, Z.notificationOutput.upsertTarget.useMutation, Z.notificationOutput.deleteTarget.useMutation, Z.notificationOutput.setTargetEnabled.useMutation, Z.notifier.send.useMutation, Z.notifier.cancel.useMutation, Z.notifier.getStatus.useQuery, Z.numericSensor.getStatus.useQuery, Z.osd.setOverlay.useMutation, Z.osd.getStatus.useQuery, Z.petFeeder.feed.useMutation, Z.petFeeder.cancelFeed.useMutation, Z.petFeeder.resetDesiccant.useMutation, Z.petFeeder.markFoodReplenished.useMutation, Z.petFeeder.callPet.useMutation, Z.petFeeder.playSound.useMutation, Z.petFeeder.setChildLock.useMutation, Z.petFeeder.setIndicatorLight.useMutation, Z.petFeeder.setFeedSound.useMutation, Z.petFeeder.setVolume.useMutation, Z.petFeeder.getStatus.useQuery, Z.pipelineAnalytics.getActiveTracks.useQuery, Z.pipelineAnalytics.getTrack.useQuery, Z.pipelineAnalytics.listTracks.useQuery, Z.pipelineAnalytics.clearTracks.useMutation;
5539
+ y(), y(), y(), Z.accessories.setChildHidden.useMutation, Z.accessories.getStatus.useQuery, Z.addonPages.listPages.useQuery, Z.addons.list.useQuery, Z.addons.getLogs.useQuery, Z.addons.listPackages.useQuery, Z.addons.installPackage.useMutation, Z.addons.installFromWorkspace.useMutation, Z.addons.isWorkspaceAvailable.useQuery, Z.addons.listWorkspacePackages.useQuery, Z.addons.uninstallPackage.useMutation, Z.addons.reloadPackages.useMutation, Z.addons.searchAvailable.useQuery, Z.addons.listUpdates.useQuery, Z.addons.updatePackage.useMutation, Z.addons.rollbackPackage.useMutation, Z.addons.forceRefresh.useMutation, Z.addons.restartServer.useMutation, Z.addons.getLastRestart.useQuery, Z.addons.listFrameworkPackages.useQuery, Z.addons.listCapabilityProviders.useQuery, Z.addons.setCapabilityProviderEnabled.useMutation, Z.addons.updateFrameworkPackage.useMutation, Z.addons.getVersions.useQuery, Z.addons.restartAddon.useMutation, Z.addons.retryLoad.useMutation, Z.addons.getAutoUpdateSettings.useQuery, Z.addons.setAutoUpdateSettings.useMutation, Z.addons.getAddonAutoUpdate.useQuery, Z.addons.setAddonAutoUpdate.useMutation, Z.addons.applyAutoUpdateToAll.useMutation, Z.addons.custom.useMutation, Z.addons.startJob.useMutation, Z.addons.getJob.useQuery, Z.addons.listJobs.useQuery, Z.addons.cancelJob.useMutation, Z.addons.onAddonLogs.useSubscription, Z.addonSettings.getGlobalSettings.useQuery, Z.addonSettings.updateGlobalSettings.useMutation, Z.addonSettings.getDeviceSettings.useQuery, Z.addonSettings.updateDeviceSettings.useMutation, Z.addonWidgets.listWidgets.useQuery, Z.airQualitySensor.getStatus.useQuery, Z.alarmPanel.arm.useMutation, Z.alarmPanel.disarm.useMutation, Z.alarmPanel.trigger.useMutation, Z.alarmPanel.getStatus.useQuery, Z.alerts.emit.useMutation, Z.alerts.update.useMutation, Z.alerts.list.useQuery, Z.alerts.getUnreadCount.useQuery, Z.alerts.markRead.useMutation, Z.alerts.markAllRead.useMutation, Z.alerts.dismiss.useMutation, Z.ambientLightSensor.getStatus.useQuery, Z.audioAnalysis.resolveDeviceSettings.useQuery, Z.audioAnalysis.getDeviceSettingsContribution.useQuery, Z.audioAnalysis.getDeviceLiveContribution.useQuery, Z.audioAnalysis.applyDeviceSettingsPatch.useMutation, Z.audioAnalyzer.analyseChunk.useMutation, Z.audioAnalyzer.classify.useQuery, Z.audioAnalyzer.isReady.useQuery, Z.audioAnalyzer.dispose.useMutation, Z.audioAnalyzer.reprobeAudioEngine.useMutation, Z.audioCodec.listSupportedCodecs.useQuery, Z.audioCodec.canHandle.useQuery, Z.audioCodec.createDecodeSession.useMutation, Z.audioCodec.createEncodeSession.useMutation, Z.audioCodec.closeSession.useMutation, Z.audioCodec.pushEncodedFrame.useMutation, Z.audioCodec.pullPcm.useQuery, Z.audioCodec.pushPcm.useMutation, Z.audioCodec.pullEncoded.useQuery, Z.audioCodec.flushEncode.useMutation, Z.audioCodec.listActiveSessions.useQuery, Z.audioMetrics.getCurrentSnapshot.useQuery, Z.audioMetrics.getHistory.useQuery, Z.automationControl.enable.useMutation, Z.automationControl.disable.useMutation, Z.automationControl.trigger.useMutation, Z.automationControl.getStatus.useQuery, Z.backup.listDestinations.useQuery, Z.backup.trigger.useMutation, Z.backup.list.useQuery, Z.backup.listLocations.useQuery, Z.backup.getEntries.useQuery, Z.backup.restore.useMutation, Z.backup.delete.useMutation, Z.backup.listArchives.useQuery, Z.backup.upsertDestinationPolicy.useMutation, Z.backup.previewSchedule.useQuery, Z.battery.wakeForStream.useMutation, Z.battery.getStatus.useQuery, Z.binary.getStatus.useQuery, Z.brightness.setBrightness.useMutation, Z.brightness.getStatus.useQuery, Z.broker.list.useQuery, Z.broker.get.useQuery, Z.broker.listProviders.useQuery, Z.broker.add.useMutation, Z.broker.remove.useMutation, Z.broker.testConnection.useMutation, Z.broker.getSettings.useQuery, Z.broker.setSettings.useMutation, Z.broker.getBrokerConfig.useQuery, Z.broker.getSettingsSchema.useQuery, Z.broker.testSettings.useMutation, Z.broker.publish.useMutation, Z.broker.subscribe.useMutation, Z.broker.unsubscribe.useMutation, Z.broker.getState.useQuery, Z.broker.getStatus.useQuery, Z.button.press.useMutation, Z.cameraCredentials.getCredentials.useQuery, Z.cameraCredentials.getStatus.useQuery, Z.cameraPipelineConfig.getDeviceSettingsContribution.useQuery, Z.cameraPipelineConfig.getDeviceLiveContribution.useQuery, Z.cameraPipelineConfig.applyDeviceSettingsPatch.useMutation, Z.cameraStreams.getCameraStreams.useQuery, Z.cameraStreams.getBrokerStreams.useQuery, Z.cameraStreams.getRtspEntries.useQuery, Z.cameraStreams.getProfileRtspEntries.useQuery, Z.cameraStreams.pickStream.useQuery, Z.carbonMonoxide.getStatus.useQuery, Z.climateControl.setMode.useMutation, Z.climateControl.setFanMode.useMutation, Z.climateControl.setPreset.useMutation, Z.climateControl.setTarget.useMutation, Z.climateControl.setTargetRange.useMutation, Z.climateControl.setTargetHumidity.useMutation, Z.climateControl.setSwingVertical.useMutation, Z.climateControl.setSwingHorizontal.useMutation, Z.climateControl.getStatus.useQuery, Z.color.setColor.useMutation, Z.color.getStatus.useQuery, Z.connectivity.getStatus.useQuery, Z.consumables.reset.useMutation, Z.consumables.getStatus.useQuery, Z.contact.getStatus.useQuery, Z.control.setValue.useMutation, Z.control.getStatus.useQuery, Z.cover.open.useMutation, Z.cover.close.useMutation, Z.cover.stop.useMutation, Z.cover.setPosition.useMutation, Z.cover.setTiltPosition.useMutation, Z.cover.getStatus.useQuery, Z.dayNight.getOptions.useQuery, Z.dayNight.setSettings.useMutation, Z.dayNight.getStatus.useQuery, Z.decoder.supportsCodec.useQuery, Z.decoder.getInfo.useQuery, Z.decoder.createSession.useQuery, Z.decoder.destroySession.useQuery, Z.decoder.pushPacket.useQuery, Z.decoder.openStream.useQuery, Z.decoder.pullFrames.useQuery, Z.decoder.pullHandles.useQuery, Z.decoder.getFrame.useQuery, Z.decoder.getShmStats.useQuery, Z.decoder.updateConfig.useQuery, Z.decoder.getStats.useQuery, Z.decoder.listActiveSessions.useQuery, Z.decoder.reprobeHwaccel.useMutation, Z.detectionPipeline.getDeviceSettingsContribution.useQuery, Z.detectionPipeline.getDeviceLiveContribution.useQuery, Z.detectionPipeline.applyDeviceSettingsPatch.useMutation, Z.deviceAdoption.listCandidateFilters.useQuery, Z.deviceAdoption.listCandidates.useQuery, Z.deviceAdoption.getCandidate.useQuery, Z.deviceAdoption.refresh.useMutation, Z.deviceAdoption.adopt.useMutation, Z.deviceAdoption.release.useMutation, Z.deviceAdoption.resync.useMutation, Z.deviceAdoption.getStatus.useQuery, Z.deviceDiscovery.listDiscovered.useQuery, Z.deviceDiscovery.refreshDiscovery.useMutation, Z.deviceDiscovery.adoptDevice.useMutation, Z.deviceDiscovery.releaseDevice.useMutation, Z.deviceDiscovery.getStatus.useQuery, Z.deviceExport.getStatus.useQuery, Z.deviceExport.listSupportedDeviceKinds.useQuery, Z.deviceExport.listExposedDevices.useQuery, Z.deviceExport.exposeDevice.useMutation, Z.deviceExport.unexposeDevice.useMutation, Z.deviceExport.getDeviceSettingsContribution.useQuery, Z.deviceExport.getDeviceLiveContribution.useQuery, Z.deviceExport.applyDeviceSettingsPatch.useMutation, Z.deviceManager.allocateDeviceId.useMutation, Z.deviceManager.registerDevice.useMutation, Z.deviceManager.removeDevice.useMutation, Z.deviceManager.persistConfig.useMutation, Z.deviceManager.loadConfig.useQuery, Z.deviceManager.loadRuntimeState.useQuery, Z.deviceManager.loadMeta.useQuery, Z.deviceManager.setName.useMutation, Z.deviceManager.setLocation.useMutation, Z.deviceManager.setType.useMutation, Z.deviceManager.setIntegrationId.useMutation, Z.deviceManager.setLinkDeviceId.useMutation, Z.deviceManager.setPrimaryChildEntityId.useMutation, Z.deviceManager.setChildLayout.useMutation, Z.deviceManager.setDeviceLinks.useMutation, Z.deviceManager.setDisplay.useMutation, Z.deviceManager.getRoleDisplayDefaults.useQuery, Z.deviceManager.setRoleDisplayDefaults.useMutation, Z.deviceManager.getWireableFields.useQuery, Z.deviceManager.setRole.useMutation, Z.deviceManager.applyInitialMeta.useMutation, Z.deviceManager.setMetadata.useMutation, Z.deviceManager.listLocations.useQuery, Z.deviceManager.addLocation.useMutation, Z.deviceManager.removeLocation.useMutation, Z.deviceManager.setDisabled.useMutation, Z.deviceManager.listPersistedByAddon.useQuery, Z.deviceManager.listAll.useQuery, Z.deviceManager.getDevice.useQuery, Z.deviceManager.getChildren.useQuery, Z.deviceManager.getLinkedDevices.useQuery, Z.deviceManager.getStreamSources.useQuery, Z.deviceManager.getConfigSchema.useQuery, Z.deviceManager.getSettingsSchema.useQuery, Z.deviceManager.updateConfig.useMutation, Z.deviceManager.enable.useMutation, Z.deviceManager.disable.useMutation, Z.deviceManager.remove.useMutation, Z.deviceManager.removeByIntegration.useMutation, Z.deviceManager.getStreamProfileMap.useQuery, Z.deviceManager.setStreamProfileMap.useMutation, Z.deviceManager.probeStreams.useMutation, Z.deviceManager.getBindings.useQuery, Z.deviceManager.getAllBindings.useQuery, Z.deviceManager.setWrapperActive.useMutation, Z.deviceManager.listWrappersForCap.useQuery, Z.deviceManager.listBindableCapsForDeviceType.useQuery, Z.deviceManager.getDeviceSettingsAggregate.useQuery, Z.deviceManager.getDeviceLiveInfoAggregate.useQuery, Z.deviceManager.getDeviceAggregate.useQuery, Z.deviceManager.runDeviceAction.useMutation, Z.deviceManager.updateDeviceField.useMutation, Z.deviceManager.updateDeviceFieldsBatch.useMutation, Z.deviceManager.discoverDevices.useMutation, Z.deviceManager.adoptDevice.useMutation, Z.deviceManager.getCreationSchema.useQuery, Z.deviceManager.createDevice.useMutation, Z.deviceManager.testCreationField.useMutation, Z.deviceManager.adoptionListCandidateFilters.useQuery, Z.deviceManager.adoptionListCandidates.useQuery, Z.deviceManager.adoptionRefresh.useMutation, Z.deviceManager.adoptionAdopt.useMutation, Z.deviceManager.adoptionRelease.useMutation, Z.deviceManager.adoptionResync.useMutation, Z.deviceManager.discoveryProviders.useQuery, Z.deviceManager.discoverAllProviders.useMutation, Z.deviceManager.discoverProvider.useMutation, Z.deviceManager.providerCreationType.useQuery, Z.deviceManager.providerDiscoveryParamsSchema.useQuery, Z.deviceManager.testField.useMutation, Z.deviceManager.getDeviceStatusAggregate.useQuery, Z.deviceManager.getDeviceSettingsContribution.useQuery, Z.deviceManager.getDeviceLiveContribution.useQuery, Z.deviceManager.applyDeviceSettingsPatch.useMutation, Z.deviceOps.getStreamSources.useQuery, Z.deviceOps.getConfigEntries.useQuery, Z.deviceOps.setConfig.useMutation, Z.deviceOps.runAction.useMutation, Z.deviceOps.removeDevice.useMutation, Z.deviceOps.getSettingsSchema.useQuery, Z.deviceOps.getRawState.useQuery, Z.deviceProvider.start.useMutation, Z.deviceProvider.stop.useMutation, Z.deviceProvider.getStatus.useQuery, Z.deviceProvider.getDevices.useQuery, Z.deviceProvider.supportsDiscovery.useQuery, Z.deviceProvider.discoverDevices.useMutation, Z.deviceProvider.getDiscoveryParamsSchema.useQuery, Z.deviceProvider.getManualCreationType.useQuery, Z.deviceProvider.adoptDiscoveredDevice.useMutation, Z.deviceProvider.supportsManualCreation.useQuery, Z.deviceProvider.getChildCreationSchema.useQuery, Z.deviceProvider.createDevice.useMutation, Z.deviceProvider.testCreationField.useMutation, Z.deviceState.getSnapshot.useQuery, Z.deviceState.getCapSlice.useQuery, Z.deviceState.getAllSnapshots.useQuery, Z.deviceState.setCapSlice.useMutation, Z.deviceStatus.getStatus.useQuery, Z.doorbell.getStatus.useQuery, Z.doorbell.getDeviceSettingsContribution.useQuery, Z.doorbell.getDeviceLiveContribution.useQuery, Z.doorbell.applyDeviceSettingsPatch.useMutation, Z.enumSensor.getStatus.useQuery, Z.eventEmitter.getStatus.useQuery, Z.events.getEvents.useQuery, Z.events.getEventThumbnail.useQuery, Z.events.getEventClipUrl.useQuery, Z.faceGallery.listIdentities.useQuery, Z.faceGallery.createIdentity.useMutation, Z.faceGallery.renameIdentity.useMutation, Z.faceGallery.deleteIdentity.useMutation, Z.faceGallery.listIdentitySamples.useQuery, Z.faceGallery.removeSample.useMutation, Z.faceGallery.listRecentFaces.useQuery, Z.faceGallery.getFaceByTrack.useQuery, Z.faceGallery.getFaceMedia.useQuery, Z.faceGallery.assignFace.useMutation, Z.faceGallery.unassignFace.useMutation, Z.faceGallery.deleteFace.useMutation, Z.faceGallery.assignFaces.useMutation, Z.faceGallery.unassignFaces.useMutation, Z.faceGallery.suggestFaceClusters.useQuery, Z.fanControl.setPercentage.useMutation, Z.fanControl.setPreset.useMutation, Z.fanControl.setDirection.useMutation, Z.fanControl.setOscillating.useMutation, Z.fanControl.getStatus.useQuery, Z.featureProbe.getStatus.useQuery, Z.flood.getStatus.useQuery, Z.gas.getStatus.useQuery, Z.humidifier.setOn.useMutation, Z.humidifier.setTargetHumidity.useMutation, Z.humidifier.setMode.useMutation, Z.humidifier.getStatus.useQuery, Z.humiditySensor.getStatus.useQuery, Z.image.getStatus.useQuery, Z.imageSettings.getOptions.useQuery, Z.imageSettings.setSettings.useMutation, Z.imageSettings.getStatus.useQuery, Z.integrations.list.useQuery, Z.integrations.get.useQuery, Z.integrations.getByAddonId.useQuery, Z.integrations.create.useMutation, Z.integrations.update.useMutation, Z.integrations.delete.useMutation, Z.integrations.getSettings.useQuery, Z.integrations.setSettings.useMutation, Z.integrations.getAvailableTypes.useQuery, Z.integrations.testConnection.useMutation, Z.intercom.startSession.useMutation, Z.intercom.handleAnswer.useMutation, Z.intercom.stopSession.useMutation, Z.intercom.startTalkSession.useMutation, Z.intercom.pushTalkAudio.useMutation, Z.intercom.endTalkSession.useMutation, Z.intercom.getStatus.useQuery, Z.lawnMowerControl.startMowing.useMutation, Z.lawnMowerControl.pause.useMutation, Z.lawnMowerControl.dock.useMutation, Z.lawnMowerControl.getStatus.useQuery, Z.llm.generate.useMutation, Z.llm.generateVision.useMutation, Z.llm.listProfileKinds.useQuery, Z.llm.listProfiles.useQuery, Z.llm.upsertProfile.useMutation, Z.llm.deleteProfile.useMutation, Z.llm.testProfile.useMutation, Z.llm.listModels.useQuery, Z.llm.getDefaults.useQuery, Z.llm.setDefault.useMutation, Z.llm.getUsage.useQuery, Z.llm.listModelCatalog.useQuery, Z.llm.listRuntimeNodes.useQuery, Z.llm.listNodeModels.useQuery, Z.llm.installModel.useMutation, Z.llm.deleteModel.useMutation, Z.llm.getRuntimeStatus.useQuery, Z.llm.startRuntime.useMutation, Z.llm.stopRuntime.useMutation, Z.localNetwork.list.useQuery, Z.localNetwork.getPreferred.useQuery, Z.localNetwork.getConnectionEndpoints.useQuery, Z.localNetwork.getAllowedAddresses.useQuery, Z.localNetwork.setAllowedAddresses.useMutation, Z.localNetwork.resetAllowlistToBestMatch.useMutation, Z.lockControl.lock.useMutation, Z.lockControl.unlock.useMutation, Z.lockControl.open.useMutation, Z.lockControl.getStatus.useQuery, Z.mediaPlayer.play.useMutation, Z.mediaPlayer.pause.useMutation, Z.mediaPlayer.stop.useMutation, Z.mediaPlayer.next.useMutation, Z.mediaPlayer.previous.useMutation, Z.mediaPlayer.seek.useMutation, Z.mediaPlayer.setVolume.useMutation, Z.mediaPlayer.setMute.useMutation, Z.mediaPlayer.setShuffle.useMutation, Z.mediaPlayer.setRepeat.useMutation, Z.mediaPlayer.selectSource.useMutation, Z.mediaPlayer.playMedia.useMutation, Z.mediaPlayer.getStatus.useQuery, Z.meshNetwork.getStatus.useQuery, Z.meshNetwork.join.useMutation, Z.meshNetwork.startLogin.useMutation, Z.meshNetwork.leave.useMutation, Z.meshNetwork.logout.useMutation, Z.meshNetwork.listPeers.useQuery, Z.meshNetwork.testConnection.useMutation, Z.metricsProvider.collectSnapshot.useQuery, Z.metricsProvider.getCached.useQuery, Z.metricsProvider.getCurrent.useQuery, Z.metricsProvider.getDiskSpace.useQuery, Z.metricsProvider.getGpuInfo.useQuery, Z.metricsProvider.getCpuTemperature.useQuery, Z.metricsProvider.getProcessStats.useQuery, Z.metricsProvider.listAddonInstances.useQuery, Z.metricsProvider.getAddonStats.useQuery, Z.metricsProvider.listNodeProcesses.useQuery, Z.metricsProvider.killProcess.useMutation, Z.metricsProvider.dumpHeapSnapshot.useMutation, Z.motion.isDetected.useQuery, Z.motion.getStatus.useQuery, Z.motionDetection.analyze.useMutation, Z.motionDetection.removeCamera.useMutation, Z.motionDetection.reset.useMutation, Z.motionDetection.getDeviceSettingsContribution.useQuery, Z.motionDetection.getDeviceLiveContribution.useQuery, Z.motionDetection.applyDeviceSettingsPatch.useMutation, Z.motionTrigger.setMotionTrigger.useMutation, Z.motionTrigger.getStatus.useQuery, Z.motionZones.getOptions.useQuery, Z.motionZones.setZone.useMutation, Z.motionZones.getStatus.useQuery, Z.mqttBroker.listBrokers.useQuery, Z.mqttBroker.getBrokerConfig.useQuery, Z.mqttBroker.addBroker.useMutation, Z.mqttBroker.removeBroker.useMutation, Z.mqttBroker.testConnection.useMutation, Z.mqttBroker.startEmbeddedBroker.useMutation, Z.mqttBroker.stopEmbeddedBroker.useMutation, Z.mqttBroker.getStatus.useQuery, Z.nativeObjectDetection.setEnabled.useMutation, Z.nativeObjectDetection.getStatus.useQuery, Z.networkAccess.start.useMutation, Z.networkAccess.stop.useMutation, Z.networkAccess.getEndpoint.useQuery, Z.networkAccess.getStatus.useQuery, Z.networkAccess.listEndpoints.useQuery, Z.networkQuality.getDeviceStats.useQuery, Z.networkQuality.getAllStats.useQuery, Z.networkQuality.reportClientStats.useMutation, Z.nodes.topology.useQuery, Z.nodes.deployAddon.useMutation, Z.nodes.undeployAddon.useMutation, Z.nodes.restartAddon.useMutation, Z.nodes.restartProcess.useMutation, Z.nodes.restartNode.useMutation, Z.nodes.shutdownNode.useMutation, Z.nodes.renameNode.useMutation, Z.nodes.clusterAddonStatus.useQuery, Z.nodes.getCapUsageGraph.useQuery, Z.nodes.getNodeAddons.useQuery, Z.nodes.setProcessLogLevel.useMutation, Z.nodes.executeQuery.useMutation, Z.notificationOutput.listTargetKinds.useQuery, Z.notificationOutput.listTargets.useQuery, Z.notificationOutput.discoverTargets.useQuery, Z.notificationOutput.send.useMutation, Z.notificationOutput.testTarget.useMutation, Z.notificationOutput.upsertTarget.useMutation, Z.notificationOutput.deleteTarget.useMutation, Z.notificationOutput.setTargetEnabled.useMutation, Z.notifier.send.useMutation, Z.notifier.cancel.useMutation, Z.notifier.getStatus.useQuery, Z.numericSensor.getStatus.useQuery, Z.osd.setOverlay.useMutation, Z.osd.getStatus.useQuery, Z.petFeeder.feed.useMutation, Z.petFeeder.cancelFeed.useMutation, Z.petFeeder.resetDesiccant.useMutation, Z.petFeeder.markFoodReplenished.useMutation, Z.petFeeder.callPet.useMutation, Z.petFeeder.playSound.useMutation, Z.petFeeder.setChildLock.useMutation, Z.petFeeder.setIndicatorLight.useMutation, Z.petFeeder.setFeedSound.useMutation, Z.petFeeder.setVolume.useMutation, Z.petFeeder.getStatus.useQuery, Z.pipelineAnalytics.getActiveTracks.useQuery, Z.pipelineAnalytics.getTrack.useQuery, Z.pipelineAnalytics.listTracks.useQuery, Z.pipelineAnalytics.listRecentTracks.useQuery, Z.pipelineAnalytics.clearTracks.useMutation;
5540
5540
  var na = Z.pipelineAnalytics.getMotionEvents.useQuery, ra = Z.pipelineAnalytics.getObjectEvents.useQuery, ia = Z.pipelineAnalytics.getAudioEvents.useQuery;
5541
- Z.pipelineAnalytics.getKeyEvents.useQuery;
5541
+ Z.pipelineAnalytics.listEventKinds.useQuery, Z.pipelineAnalytics.getSensorEvents.useQuery, Z.pipelineAnalytics.getKeyEvents.useQuery;
5542
5542
  var aa = Z.pipelineAnalytics.getEventDensity.useQuery;
5543
5543
  Z.pipelineAnalytics.pruneEventsBefore.useMutation, Z.pipelineAnalytics.pruneTracksBefore.useMutation, Z.pipelineAnalytics.wipeAllAnalytics.useMutation, Z.pipelineAnalytics.deleteTracks.useMutation, Z.pipelineAnalytics.getEventMedia.useQuery, Z.pipelineAnalytics.getTrackMedia.useQuery, Z.pipelineAnalytics.searchObjectEvents.useQuery, Z.pipelineAnalytics.getDeviceSettingsContribution.useQuery, Z.pipelineAnalytics.getDeviceLiveContribution.useQuery, Z.pipelineAnalytics.applyDeviceSettingsPatch.useMutation, Z.pipelineExecutor.getAvailableEngines.useQuery, Z.pipelineExecutor.getSelectedEngine.useQuery, Z.pipelineExecutor.getDefaultSteps.useQuery, Z.pipelineExecutor.reprobeEngine.useMutation, Z.pipelineExecutor.getEngineProvisioning.useQuery, Z.pipelineExecutor.getVideoPipelineSteps.useQuery, Z.pipelineExecutor.setVideoPipelineSteps.useMutation, Z.pipelineExecutor.clearDeviceOverrides.useMutation, Z.pipelineExecutor.getSchema.useQuery, Z.pipelineExecutor.getGlobalSteps.useQuery, Z.pipelineExecutor.getGlobalPipelineConfig.useQuery, Z.pipelineExecutor.getOrchestratorConfigSchema.useQuery, Z.pipelineExecutor.validatePipeline.useQuery, Z.pipelineExecutor.listTemplates.useQuery, Z.pipelineExecutor.saveTemplate.useMutation, Z.pipelineExecutor.updateTemplate.useMutation, Z.pipelineExecutor.deleteTemplate.useMutation, Z.pipelineExecutor.getCapabilities.useQuery, Z.pipelineExecutor.getAddonModels.useQuery, Z.pipelineExecutor.downloadModel.useMutation, Z.pipelineExecutor.deleteModel.useMutation, Z.pipelineExecutor.runPipeline.useMutation, Z.pipelineExecutor.runPipelineBatch.useMutation, Z.pipelineExecutor.cacheFrameInPool.useMutation, Z.pipelineExecutor.inferCached.useMutation, Z.pipelineExecutor.uncacheFrame.useMutation, Z.pipelineExecutor.getEffectiveTuning.useQuery, Z.pipelineExecutor.listLoadedEngines.useQuery, Z.pipelineExecutor.spinEngine.useMutation, Z.pipelineExecutor.killEngine.useMutation, Z.pipelineExecutor.listReferenceImages.useQuery, Z.pipelineExecutor.getReferenceImage.useQuery, Z.pipelineExecutor.getReferenceAudioFiles.useQuery, Z.pipelineExecutor.getReferenceAudio.useQuery, Z.pipelineExecutor.getAudioCapabilities.useQuery, Z.pipelineExecutor.runAudioTest.useMutation, Z.pipelineExecutor.getDetectionConfigSchema.useQuery, Z.pipelineOrchestrator.assignPipeline.useMutation, Z.pipelineOrchestrator.unassignPipeline.useMutation, Z.pipelineOrchestrator.rebalance.useMutation, Z.pipelineOrchestrator.getPipelineAssignments.useQuery, Z.pipelineOrchestrator.getPipelineAssignment.useQuery, Z.pipelineOrchestrator.getAgentLoad.useQuery, Z.pipelineOrchestrator.getGlobalMetrics.useQuery, Z.pipelineOrchestrator.getCameraMetrics.useQuery, Z.pipelineOrchestrator.getCapabilityBindings.useQuery, Z.pipelineOrchestrator.setCapabilityBinding.useMutation, Z.pipelineOrchestrator.getIngestOwner.useQuery, Z.pipelineOrchestrator.assignAudio.useMutation, Z.pipelineOrchestrator.unassignAudio.useMutation, Z.pipelineOrchestrator.getAudioAssignment.useQuery, Z.pipelineOrchestrator.getAudioNodeLoad.useQuery, Z.pipelineOrchestrator.getAudioAssignments.useQuery, Z.pipelineOrchestrator.getAgentSettings.useQuery, Z.pipelineOrchestrator.listAgentSettings.useQuery, Z.pipelineOrchestrator.setAgentAddonDefaults.useMutation, Z.pipelineOrchestrator.removeAgentSettings.useMutation, Z.pipelineOrchestrator.setAgentMaxCameras.useMutation, Z.pipelineOrchestrator.setAgentDetectWeight.useMutation, Z.pipelineOrchestrator.setAgentCapabilities.useMutation, Z.pipelineOrchestrator.setAgentReachableHost.useMutation, Z.pipelineOrchestrator.resetNodePipelineDefaults.useMutation, Z.pipelineOrchestrator.getCameraSettings.useQuery, Z.pipelineOrchestrator.setCameraStepToggle.useMutation, Z.pipelineOrchestrator.getCameraStepOverrides.useQuery, Z.pipelineOrchestrator.setCameraStepOverride.useMutation, Z.pipelineOrchestrator.setCameraPipelineForAgent.useMutation, Z.pipelineOrchestrator.resolvePipeline.useQuery, Z.pipelineOrchestrator.getCameraStatus.useQuery, Z.pipelineOrchestrator.getCameraStatuses.useQuery, Z.pipelineOrchestrator.listTemplates.useQuery, Z.pipelineOrchestrator.saveTemplate.useMutation, Z.pipelineOrchestrator.updateTemplate.useMutation, Z.pipelineOrchestrator.deleteTemplate.useMutation, Z.pipelineOrchestrator.getDeviceSettingsContribution.useQuery, Z.pipelineOrchestrator.getDeviceLiveContribution.useQuery, Z.pipelineOrchestrator.applyDeviceSettingsPatch.useMutation, Z.pipelineRunner.attachCamera.useMutation, Z.pipelineRunner.detachCamera.useMutation, Z.pipelineRunner.reportMotion.useMutation, Z.pipelineRunner.getLocalLoad.useQuery, Z.pipelineRunner.getLocalMetrics.useQuery, Z.pipelineRunner.getCameraMetrics.useQuery, Z.pipelineRunner.getAllCameraMetrics.useQuery, Z.pipelineRunner.getLocalCameras.useQuery, Z.pipelineRunner.getNativeCrop.useQuery, Z.pipelineRunner.runDetailSubtree.useMutation, Z.plateGallery.listPlates.useQuery, Z.plateGallery.getPlateByTrack.useQuery, Z.plateGallery.getPlateMedia.useQuery, Z.plateGallery.searchPlates.useQuery, Z.plateGallery.suggestPlateClusters.useQuery, Z.plateGallery.correctPlateText.useMutation, Z.plateGallery.deletePlate.useMutation, Z.plateGallery.listVehicles.useQuery, Z.plateGallery.createVehicle.useMutation, Z.plateGallery.renameVehicle.useMutation, Z.plateGallery.deleteVehicle.useMutation, Z.plateGallery.listVehicleSamples.useQuery, Z.plateGallery.removeVehicleSample.useMutation, Z.plateGallery.assignPlate.useMutation, Z.plateGallery.unassignPlate.useMutation, Z.plateGallery.assignPlates.useMutation, Z.plateGallery.unassignPlates.useMutation, Z.powerMeter.getStatus.useQuery, Z.presence.getStatus.useQuery, Z.pressureSensor.getStatus.useQuery, Z.privacyMask.getOptions.useQuery, Z.privacyMask.setMask.useMutation, Z.privacyMask.getStatus.useQuery, Z.ptz.move.useMutation, Z.ptz.continuousMove.useMutation, Z.ptz.stop.useMutation, Z.ptz.getPresets.useQuery, Z.ptz.goToPreset.useMutation, Z.ptz.savePreset.useMutation, Z.ptz.deletePreset.useMutation, Z.ptz.getOptions.useQuery, Z.ptz.goHome.useMutation, Z.ptz.getPosition.useQuery, Z.ptz.setAutofocus.useMutation, Z.ptz.getStatus.useQuery;
5544
5544
  var oa = Z.ptzAutotrack.getStatus.useQuery, sa = Z.ptzAutotrack.setEnabled.useMutation;
@@ -5714,7 +5714,7 @@ var ga = {
5714
5714
  label: "Night vision"
5715
5715
  },
5716
5716
  [j.PrivacyMask]: {
5717
- icon: K,
5717
+ icon: se,
5718
5718
  label: "Privacy mask"
5719
5719
  },
5720
5720
  [j.Doorbell]: {
@@ -7513,7 +7513,7 @@ function Cs({ deviceId: e }) {
7513
7513
  //#region ../ui-library/src/hooks/use-device-autotrack.ts
7514
7514
  y();
7515
7515
  function ws(e) {
7516
- let t = re(), n = oa({ deviceId: e ?? 0 }, {
7516
+ let t = ne(), n = oa({ deviceId: e ?? 0 }, {
7517
7517
  enabled: e !== null && Number.isFinite(e),
7518
7518
  refetchInterval: 5e3,
7519
7519
  retry: 1
@@ -8948,17 +8948,17 @@ function kc({ deviceId: e }) {
8948
8948
  _(() => {
8949
8949
  B(Cc);
8950
8950
  }, [r]);
8951
- let [U, W] = c(() => /* @__PURE__ */ new Date()), [G, te] = c(() => rc(/* @__PURE__ */ new Date(), Date.now())), ne = m(() => rc(U, Date.now()), [U]), re = o((e) => {
8952
- W(e), te(rc(e, Date.now())), i(null);
8953
- }, []), ie = o((e) => {
8954
- te(e), i(null);
8955
- }, []), ae = l(null), oe = o((e) => {
8951
+ let [U, W] = c(() => /* @__PURE__ */ new Date()), [G, K] = c(() => rc(/* @__PURE__ */ new Date(), Date.now())), te = m(() => rc(U, Date.now()), [U]), ne = o((e) => {
8952
+ W(e), K(rc(e, Date.now())), i(null);
8953
+ }, []), re = o((e) => {
8954
+ K(e), i(null);
8955
+ }, []), ie = l(null), ae = o((e) => {
8956
8956
  let t = Math.abs(e.deltaX) > Math.abs(e.deltaY) ? e.deltaX : e.shiftKey ? e.deltaY : 0;
8957
8957
  if (t === 0) return;
8958
8958
  e.preventDefault();
8959
8959
  let n = t * wc;
8960
- te((e) => oc(e, ne, n));
8961
- }, [ne]), se = cc(G.toMs - G.fromMs), K = la({
8960
+ K((e) => oc(e, te, n));
8961
+ }, [te]), oe = cc(G.toMs - G.fromMs), se = la({
8962
8962
  deviceId: e,
8963
8963
  fromMs: G.fromMs,
8964
8964
  toMs: G.toMs
@@ -8966,11 +8966,11 @@ function kc({ deviceId: e }) {
8966
8966
  deviceId: e,
8967
8967
  since: G.fromMs,
8968
8968
  until: G.toMs,
8969
- bucketMs: se
8970
- }), le = K.data?.ranges ?? Dc, ue = m(() => Xs(le), [le]), de = m(() => $s(ce.data ?? [], G.fromMs, se), [
8969
+ bucketMs: oe
8970
+ }), le = se.data?.ranges ?? Dc, ue = m(() => Xs(le), [le]), de = m(() => $s(ce.data ?? [], G.fromMs, oe), [
8971
8971
  ce.data,
8972
8972
  G.fromMs,
8973
- se
8973
+ oe
8974
8974
  ]), fe = r === null ? void 0 : de.find((e) => e.index === r), pe = fe !== void 0, me = fe?.startMs ?? 0, he = fe ? Math.min(fe.endMs, G.toMs) : 0, ge = ra({
8975
8975
  deviceId: e,
8976
8976
  since: me,
@@ -9083,11 +9083,11 @@ function kc({ deviceId: e }) {
9083
9083
  xe(`event:${e.id}`, e.timestamp - Tc, e.timestamp + Ec, t, e.timestamp);
9084
9084
  }, [xe, M]), De = o((e) => {
9085
9085
  i((t) => t === e ? null : e);
9086
- }, []), Oe = K.isLoading, ke = ce.isLoading, Ae = (ge.isLoading || _e.isLoading || ve.isLoading) && pe, je = m(() => lc(G.fromMs, G.toMs, 5), [G.fromMs, G.toMs]), Me = w ? O.scrubbing ? O.scrubEpoch : O.playheadEpoch : a, Ne = w && (v === "playing" || v === "paused");
9086
+ }, []), Oe = se.isLoading, ke = ce.isLoading, Ae = (ge.isLoading || _e.isLoading || ve.isLoading) && pe, je = m(() => lc(G.fromMs, G.toMs, 5), [G.fromMs, G.toMs]), Me = w ? O.scrubbing ? O.scrubEpoch : O.playheadEpoch : a, Ne = w && (v === "playing" || v === "paused");
9087
9087
  return /* @__PURE__ */ C("div", {
9088
9088
  className: "space-y-3",
9089
9089
  children: [
9090
- K.isError ? /* @__PURE__ */ S(Ji, {
9090
+ se.isError ? /* @__PURE__ */ S(Ji, {
9091
9091
  variant: "warning",
9092
9092
  message: "Recorder unavailable — the recording service may not be running for this node."
9093
9093
  }) : null,
@@ -9097,10 +9097,10 @@ function kc({ deviceId: e }) {
9097
9097
  }) : null,
9098
9098
  /* @__PURE__ */ S(bc, {
9099
9099
  day: U,
9100
- onDayChange: re,
9100
+ onDayChange: ne,
9101
9101
  view: G,
9102
- dayBounds: ne,
9103
- onViewChange: ie
9102
+ dayBounds: te,
9103
+ onViewChange: re
9104
9104
  }),
9105
9105
  h.channelOpen ? /* @__PURE__ */ C("div", {
9106
9106
  "data-testid": "frame-push-status-row",
@@ -9142,8 +9142,8 @@ function kc({ deviceId: e }) {
9142
9142
  ]
9143
9143
  }) : null,
9144
9144
  /* @__PURE__ */ C("div", {
9145
- ref: ae,
9146
- onWheel: oe,
9145
+ ref: ie,
9146
+ onWheel: ae,
9147
9147
  className: "space-y-1",
9148
9148
  children: [
9149
9149
  /* @__PURE__ */ C("div", {
@@ -9215,7 +9215,7 @@ function jc(e) {
9215
9215
  return n > 0 ? `${n}h ${r}m` : r > 0 ? `${r}m ${i}s` : `${i}s`;
9216
9216
  }
9217
9217
  function Mc({ deviceId: e }) {
9218
- let t = re(), n = pa({ deviceId: e }), r = ua({ deviceId: e }), i = da(), a = fa(), s = (t) => {
9218
+ let t = ne(), n = pa({ deviceId: e }), r = ua({ deviceId: e }), i = da(), a = fa(), s = (t) => {
9219
9219
  i.mutate({
9220
9220
  deviceId: e,
9221
9221
  config: t
@@ -9310,8 +9310,8 @@ function Mc({ deviceId: e }) {
9310
9310
  //#region ../ui-library/src/widgets/host-widgets.ts
9311
9311
  y();
9312
9312
  var Nc = {
9313
- "host/motion-zones-grid": u(() => import("./MotionZonesSettings-DvcXdTmE.mjs").then((e) => ({ default: e.MotionZonesSettings }))),
9314
- "host/privacy-mask-grid": u(() => import("./PrivacyMaskSettings-C43CHdu0.mjs").then((e) => ({ default: e.PrivacyMaskSettings }))),
9313
+ "host/motion-zones-grid": u(() => import("./MotionZonesSettings-CZWn4uID.mjs").then((e) => ({ default: e.MotionZonesSettings }))),
9314
+ "host/privacy-mask-grid": u(() => import("./PrivacyMaskSettings-CCb6_nu9.mjs").then((e) => ({ default: e.PrivacyMaskSettings }))),
9315
9315
  "host/ptz-panel": vs,
9316
9316
  "host/consumables-panel": Cs,
9317
9317
  "host/ptz-autotrack": Ts,
@@ -10629,7 +10629,7 @@ function Dl({ field: e, value: t, onChange: n, disabled: r, translationFn: i })
10629
10629
  className: "absolute right-2 top-1/2 -translate-y-1/2 text-foreground-subtle hover:text-foreground",
10630
10630
  tabIndex: -1,
10631
10631
  onClick: () => o((e) => !e),
10632
- children: S(a ? K : zn, { className: "h-3.5 w-3.5" })
10632
+ children: S(a ? se : zn, { className: "h-3.5 w-3.5" })
10633
10633
  })]
10634
10634
  })
10635
10635
  });
@@ -12256,74 +12256,74 @@ function Cu(e) {
12256
12256
  return t;
12257
12257
  }
12258
12258
  var wu = 1500, Tu = 15e3, Eu = 40;
12259
- function Du({ serverUrl: e, streamKey: t, label: n, autoPlay: r = !0, muted: i = !0, showControls: a = !0, showStats: s = !1, onPlaybackStats: u, onClientNetworkSample: d, className: f = "", onStateChange: p, onError: m, overlay: h, createSession: g, sendAnswer: v, handleOffer: y, getIceServers: b, addIceCandidate: x, getIceCandidates: w, closeSession: T, getSessionState: E, reoffer: D, posterUrl: O, hintsOverride: k, reconnectSignal: A, onControlChannel: j }) {
12260
- let M = l(null), N = l(null), P = l(null), F = l(/* @__PURE__ */ new Set()), I = l(null), L = l(null), ee = l(0), R = l(!0), z = l(j);
12261
- z.current = j;
12262
- let B = l(null), V = l(null), H = l(0), U = l(!1), W = l(async () => {}), [G, te] = c("idle"), [ne, re] = c(""), [ie, ae] = c(i), [oe, se] = c(!1), [K, ce] = c(!1), le = xu(), [ue, de] = c(!0), fe = l(null), pe = l(!1);
12263
- (v || g) && (pe.current = !0);
12264
- let me = pe.current, he = l(!1);
12265
- y && (he.current = !0);
12266
- let ge = he.current, [_e, ve] = c(!1), ye = l(null), [be, xe] = c(null), [Se, Ce] = c(!1), we = o(() => {
12267
- let e = M.current;
12259
+ function Du({ serverUrl: e, streamKey: t, label: n, autoPlay: r = !0, muted: i = !0, showControls: a = !0, showStats: s = !1, onPlaybackStats: u, onClientNetworkSample: d, onConnectTiming: f, className: p = "", onStateChange: m, onError: h, overlay: g, createSession: v, sendAnswer: y, handleOffer: b, getIceServers: x, addIceCandidate: w, getIceCandidates: T, closeSession: E, getSessionState: D, reoffer: O, posterUrl: k, hintsOverride: A, reconnectSignal: j, onControlChannel: M }) {
12260
+ let N = l(null), P = l(null), F = l(null), I = l(/* @__PURE__ */ new Set()), L = l(null), ee = l(null), R = l(0), z = l(!0), B = l(M);
12261
+ B.current = M;
12262
+ let V = l(null), H = l(null), U = l(0), W = l(!1), G = l(async () => {}), [K, te] = c("idle"), [ne, re] = c(""), [ie, ae] = c(i), [oe, se] = c(!1), [ce, le] = c(!1), ue = xu(), [de, fe] = c(!0), pe = l(null), me = l(!1);
12263
+ (y || v) && (me.current = !0);
12264
+ let he = me.current, ge = l(!1);
12265
+ b && (ge.current = !0);
12266
+ let _e = ge.current, [ve, ye] = c(!1), be = l(null), [xe, Se] = c(null), [Ce, we] = c(!1), Te = o(() => {
12267
+ let e = N.current;
12268
12268
  if (!(!e || e.readyState < 2 || !e.videoWidth || !e.videoHeight)) try {
12269
12269
  let t = document.createElement("canvas");
12270
12270
  t.width = e.videoWidth, t.height = e.videoHeight;
12271
12271
  let n = t.getContext("2d");
12272
12272
  if (!n || (n.drawImage(e, 0, 0), Su(n, t.width, t.height))) return;
12273
- ye.current = t.toDataURL("image/jpeg", .6);
12273
+ be.current = t.toDataURL("image/jpeg", .6);
12274
12274
  } catch {}
12275
- }, []), Te = o((e) => {
12276
- te(e), e === "playing" && ve(!0), p?.(e);
12277
- }, [p]), Ee = o(() => {
12278
- if (I.current?.abort(), I.current = null, L.current &&= (clearTimeout(L.current), null), V.current &&= (clearTimeout(V.current), null), B.current = null, U.current = !1, H.current = 0, P.current &&= (P.current.close(), null), T && F.current.size > 0) {
12279
- for (let e of F.current) T(e).catch(() => {});
12280
- F.current.clear();
12275
+ }, []), Ee = o((e) => {
12276
+ te(e), e === "playing" && ye(!0), m?.(e);
12277
+ }, [m]), De = o(() => {
12278
+ if (L.current?.abort(), L.current = null, ee.current &&= (clearTimeout(ee.current), null), H.current &&= (clearTimeout(H.current), null), V.current = null, W.current = !1, U.current = 0, F.current &&= (F.current.close(), null), E && I.current.size > 0) {
12279
+ for (let e of I.current) E(e).catch(() => {});
12280
+ I.current.clear();
12281
12281
  }
12282
- }, [T]), De = o(() => {
12283
- I.current?.abort(), I.current = null, L.current &&= (clearTimeout(L.current), null), V.current &&= (clearTimeout(V.current), null), B.current = null, U.current = !1, H.current = 0;
12284
- }, []), Oe = 1e3, ke = o((e) => {
12285
- if (!E || !D) return;
12286
- V.current &&= (clearTimeout(V.current), null);
12282
+ }, [E]), Oe = o(() => {
12283
+ L.current?.abort(), L.current = null, ee.current &&= (clearTimeout(ee.current), null), H.current &&= (clearTimeout(H.current), null), V.current = null, W.current = !1, U.current = 0;
12284
+ }, []), ke = 1e3, Ae = o((e) => {
12285
+ if (!D || !O) return;
12286
+ H.current &&= (clearTimeout(H.current), null);
12287
12287
  let t = async () => {
12288
- if (R.current && B.current === e) {
12289
- if (!U.current) try {
12290
- let { pendingRenegotiation: t } = await E(e);
12291
- if (R.current && B.current === e && t && t.epoch > H.current && !U.current) {
12292
- H.current = t.epoch, await W.current(e, t.target);
12288
+ if (z.current && V.current === e) {
12289
+ if (!W.current) try {
12290
+ let { pendingRenegotiation: t } = await D(e);
12291
+ if (z.current && V.current === e && t && t.epoch > U.current && !W.current) {
12292
+ U.current = t.epoch, await G.current(e, t.target);
12293
12293
  return;
12294
12294
  }
12295
12295
  } catch {}
12296
- !R.current || B.current !== e || (V.current = setTimeout(() => {
12296
+ !z.current || V.current !== e || (H.current = setTimeout(() => {
12297
12297
  t();
12298
- }, Oe));
12298
+ }, ke));
12299
12299
  }
12300
12300
  };
12301
- V.current = setTimeout(() => {
12301
+ H.current = setTimeout(() => {
12302
12302
  t();
12303
- }, Oe);
12304
- }, [E, D]), Ae = o(async (e = !1) => {
12305
- if (!R.current || !g || !v) return;
12306
- let t = e ? P.current : null, n = e ? new Set(F.current) : null;
12307
- e ? De() : Ee(), Te("connecting");
12303
+ }, ke);
12304
+ }, [D, O]), je = o(async (e = !1) => {
12305
+ if (!z.current || !v || !y) return;
12306
+ let t = e ? F.current : null, n = e ? new Set(I.current) : null;
12307
+ e ? Oe() : De(), Ee("connecting");
12308
12308
  let r = new AbortController();
12309
- I.current = r;
12309
+ L.current = r;
12310
12310
  try {
12311
- let { sessionId: i, sdpOffer: a, iceServers: o } = await g({
12312
- ...Cu(N.current),
12313
- ...k
12311
+ let { sessionId: i, sdpOffer: a, iceServers: o } = await v({
12312
+ ...Cu(P.current),
12313
+ ...A
12314
12314
  });
12315
- if (F.current.add(i), !R.current || r.signal.aborted) {
12316
- T?.(i).catch(() => {}), F.current.delete(i);
12315
+ if (I.current.add(i), !z.current || r.signal.aborted) {
12316
+ E?.(i).catch(() => {}), I.current.delete(i);
12317
12317
  return;
12318
12318
  }
12319
12319
  let s = new RTCPeerConnection({ iceServers: [...o ?? [], { urls: "stun:stun.l.google.com:19302" }] });
12320
- e || (P.current = s);
12320
+ e || (F.current = s);
12321
12321
  let c = new MediaStream(), l = !1, u = () => {
12322
- if (!(l || !R.current)) {
12323
- if (l = !0, P.current = s, M.current && (M.current.srcObject = c, M.current.play().catch(() => {})), t && t !== s) try {
12322
+ if (!(l || !z.current)) {
12323
+ if (l = !0, F.current = s, N.current && (N.current.srcObject = c, N.current.play().catch(() => {})), t && t !== s) try {
12324
12324
  t.close();
12325
12325
  } catch {}
12326
- if (n) for (let e of n) F.current.delete(e), T?.(e).catch(() => {});
12326
+ if (n) for (let e of n) I.current.delete(e), E?.(e).catch(() => {});
12327
12327
  }
12328
12328
  };
12329
12329
  s.ontrack = (t) => {
@@ -12331,16 +12331,16 @@ function Du({ serverUrl: e, streamKey: t, label: n, autoPlay: r = !0, muted: i =
12331
12331
  u();
12332
12332
  return;
12333
12333
  }
12334
- M.current && (M.current.srcObject = c, M.current.play().catch(() => {}));
12334
+ N.current && (N.current.srcObject = c, N.current.play().catch(() => {}));
12335
12335
  }, s.oniceconnectionstatechange = () => {
12336
- if (!R.current) return;
12336
+ if (!z.current) return;
12337
12337
  let t = s.iceConnectionState;
12338
- if (console.debug("[WebRTC] ICE state:", t), t === "connected" || t === "completed") ee.current = 0, e && u(), Te("playing"), M.current?.paused && (console.debug("[WebRTC] video was paused at ICE connected — calling play()"), M.current.play().catch(() => {}));
12338
+ if (console.debug("[WebRTC] ICE state:", t), t === "connected" || t === "completed") R.current = 0, e && u(), Ee("playing"), N.current?.paused && (console.debug("[WebRTC] video was paused at ICE connected — calling play()"), N.current.play().catch(() => {}));
12339
12339
  else if (t === "failed" || t === "disconnected" || t === "closed") {
12340
12340
  if (e && !l) try {
12341
12341
  s.close();
12342
12342
  } catch {}
12343
- Te("disconnected"), Fe();
12343
+ Ee("disconnected"), Ie();
12344
12344
  }
12345
12345
  }, s.onicecandidateerror = (e) => {
12346
12346
  console.debug("[WebRTC] ICE candidate error:", e);
@@ -12349,51 +12349,51 @@ function Du({ serverUrl: e, streamKey: t, label: n, autoPlay: r = !0, muted: i =
12349
12349
  sdp: a
12350
12350
  });
12351
12351
  let d = await s.createAnswer();
12352
- if (await s.setLocalDescription(d), console.debug("[WebRTC] Local description set, waiting for ICE gathering..."), await ku(s), !R.current) return;
12352
+ if (await s.setLocalDescription(d), console.debug("[WebRTC] Local description set, waiting for ICE gathering..."), await ku(s), !z.current) return;
12353
12353
  let f = (s.localDescription?.sdp ?? "").split("\n").filter((e) => e.startsWith("a=candidate:")).length;
12354
12354
  console.debug("[WebRTC] Sending answer to server", {
12355
12355
  localCandidates: f,
12356
12356
  sessionId: i.slice(0, 8)
12357
- }), await v(i, s.localDescription?.sdp ?? ""), console.debug("[WebRTC] Answer sent successfully");
12357
+ }), await y(i, s.localDescription?.sdp ?? ""), console.debug("[WebRTC] Answer sent successfully");
12358
12358
  let p = s, m = () => {
12359
12359
  let e = p.connectionState;
12360
12360
  if (e === "closed" || e === "failed") return;
12361
- let t = M.current;
12361
+ let t = N.current;
12362
12362
  t && t.readyState === 0 && console.log(`[WebRTC] no video data yet (ice=${p.iceConnectionState})`);
12363
12363
  };
12364
12364
  setTimeout(m, 3e3), setTimeout(m, 8e3);
12365
12365
  } catch (e) {
12366
- if (!R.current) return;
12366
+ if (!z.current) return;
12367
12367
  let t = e instanceof Error ? e.message : String(e);
12368
- re(t), Te("error"), m?.(t), Fe();
12368
+ re(t), Ee("error"), h?.(t), Ie();
12369
12369
  }
12370
12370
  }, [
12371
12371
  e,
12372
12372
  t,
12373
- g,
12374
12373
  v,
12375
- Ee,
12374
+ y,
12376
12375
  De,
12377
- T,
12378
- Te,
12379
- m,
12380
- k
12381
- ]), je = o(async () => {
12382
- if (R.current) {
12383
- Ee(), Te("connecting");
12376
+ Oe,
12377
+ E,
12378
+ Ee,
12379
+ h,
12380
+ A
12381
+ ]), Me = o(async () => {
12382
+ if (z.current) {
12383
+ De(), Ee("connecting");
12384
12384
  try {
12385
12385
  let n = new RTCPeerConnection({ iceServers: [{ urls: "stun:stun.l.google.com:19302" }] });
12386
- P.current = n, n.addTransceiver("video", { direction: "recvonly" }), n.addTransceiver("audio", { direction: "recvonly" });
12386
+ F.current = n, n.addTransceiver("video", { direction: "recvonly" }), n.addTransceiver("audio", { direction: "recvonly" });
12387
12387
  let r = new MediaStream();
12388
12388
  n.ontrack = (e) => {
12389
- r.addTrack(e.track), M.current && (M.current.srcObject = r, M.current.play().catch(() => {}));
12389
+ r.addTrack(e.track), N.current && (N.current.srcObject = r, N.current.play().catch(() => {}));
12390
12390
  }, n.oniceconnectionstatechange = () => {
12391
- if (!R.current) return;
12391
+ if (!z.current) return;
12392
12392
  let e = n.iceConnectionState;
12393
- e === "connected" || e === "completed" ? (ee.current = 0, Te("playing"), M.current?.paused && M.current.play().catch(() => {})) : (e === "failed" || e === "disconnected" || e === "closed") && (Te("disconnected"), Fe());
12393
+ e === "connected" || e === "completed" ? (R.current = 0, Ee("playing"), N.current?.paused && N.current.play().catch(() => {})) : (e === "failed" || e === "disconnected" || e === "closed") && (Ee("disconnected"), Ie());
12394
12394
  };
12395
12395
  let i = await n.createOffer();
12396
- if (await n.setLocalDescription(i), await ku(n), !R.current) return;
12396
+ if (await n.setLocalDescription(i), await ku(n), !z.current) return;
12397
12397
  let a = `${e}/api/webrtc?src=${encodeURIComponent(t)}`, o = await fetch(a, {
12398
12398
  method: "POST",
12399
12399
  headers: { "Content-Type": "application/sdp" },
@@ -12406,35 +12406,35 @@ function Du({ serverUrl: e, streamKey: t, label: n, autoPlay: r = !0, muted: i =
12406
12406
  sdp: s
12407
12407
  });
12408
12408
  } catch (e) {
12409
- if (!R.current) return;
12409
+ if (!z.current) return;
12410
12410
  let t = e instanceof Error ? e.message : String(e);
12411
- re(t), Te("error"), m?.(t), Fe();
12411
+ re(t), Ee("error"), h?.(t), Ie();
12412
12412
  }
12413
12413
  }
12414
12414
  }, [
12415
12415
  e,
12416
12416
  t,
12417
+ De,
12417
12418
  Ee,
12418
- Te,
12419
- m
12420
- ]), Me = o(async (e = !1) => {
12421
- if (!R.current || !y) return;
12422
- let n = e ? P.current : null, r = e ? new Set(F.current) : null;
12423
- e ? De() : Ee(), Te("connecting");
12419
+ h
12420
+ ]), Ne = o(async (e = !1) => {
12421
+ if (!z.current || !b) return;
12422
+ let n = e ? F.current : null, r = e ? new Set(I.current) : null;
12423
+ e ? Oe() : De(), Ee("connecting");
12424
12424
  let i = new AbortController();
12425
- I.current = i;
12425
+ L.current = i;
12426
12426
  let a = performance.now(), o = () => Math.round(performance.now() - a), s = {};
12427
12427
  try {
12428
- let a = await b?.();
12429
- if (s.iceServersMs = o(), !R.current || i.signal.aborted) return;
12428
+ let a = await x?.();
12429
+ if (s.iceServersMs = o(), !z.current || i.signal.aborted) return;
12430
12430
  let c = new RTCPeerConnection({ iceServers: [...a ?? [], { urls: "stun:stun.l.google.com:19302" }] });
12431
- e || (P.current = c);
12431
+ e || (F.current = c);
12432
12432
  let l = new MediaStream(), u = !1, d = () => {
12433
- if (!(u || !R.current)) {
12434
- if (u = !0, P.current = c, M.current && (M.current.srcObject = l, M.current.play().catch(() => {})), n && n !== c) try {
12433
+ if (!(u || !z.current)) {
12434
+ if (u = !0, F.current = c, N.current && (N.current.srcObject = l, N.current.play().catch(() => {})), n && n !== c) try {
12435
12435
  n.close();
12436
12436
  } catch {}
12437
- if (r) for (let e of r) F.current.delete(e), T?.(e).catch(() => {});
12437
+ if (r) for (let e of r) I.current.delete(e), E?.(e).catch(() => {});
12438
12438
  }
12439
12439
  };
12440
12440
  c.ontrack = (t) => {
@@ -12442,48 +12442,59 @@ function Du({ serverUrl: e, streamKey: t, label: n, autoPlay: r = !0, muted: i =
12442
12442
  d();
12443
12443
  return;
12444
12444
  }
12445
- M.current && (M.current.srcObject = l, M.current.play().catch(() => {}));
12445
+ N.current && (N.current.srcObject = l, N.current.play().catch(() => {}));
12446
12446
  };
12447
- let f = !1;
12447
+ let p = !1;
12448
12448
  c.oniceconnectionstatechange = () => {
12449
- if (!R.current) return;
12449
+ if (!z.current) return;
12450
12450
  let n = c.iceConnectionState;
12451
- if (console.debug("[WebRTC] ICE state (client-offer):", n), n === "connected" || n === "completed") f || (f = !0, s.iceConnectedMs = o(), console.info("[WebRTC timing] client-offer connected", {
12452
- streamKey: t,
12453
- ...s
12454
- })), ee.current = 0, e && d(), Te("playing"), M.current?.paused && M.current.play().catch(() => {});
12455
- else if (n === "failed" || n === "disconnected" || n === "closed") {
12451
+ if (console.debug("[WebRTC] ICE state (client-offer):", n), n === "connected" || n === "completed") {
12452
+ if (!p) {
12453
+ p = !0, s.iceConnectedMs = o(), console.info("[WebRTC timing] client-offer connected", {
12454
+ streamKey: t,
12455
+ ...s
12456
+ }), f?.({ ...s });
12457
+ let e = N.current;
12458
+ e && "requestVideoFrameCallback" in e && e.requestVideoFrameCallback(() => {
12459
+ s.firstFrameMs = o(), console.info("[WebRTC timing] first decoded frame", {
12460
+ streamKey: t,
12461
+ firstFrameMs: s.firstFrameMs
12462
+ }), f?.({ ...s });
12463
+ });
12464
+ }
12465
+ R.current = 0, e && d(), Ee("playing"), N.current?.paused && N.current.play().catch(() => {});
12466
+ } else if (n === "failed" || n === "disconnected" || n === "closed") {
12456
12467
  if (e && !u) try {
12457
12468
  c.close();
12458
12469
  } catch {}
12459
- Te("disconnected"), Fe();
12470
+ Ee("disconnected"), Ie();
12460
12471
  }
12461
12472
  };
12462
- let p = null, m = [];
12473
+ let m = null, h = [];
12463
12474
  if (c.onicecandidate = (e) => {
12464
12475
  if (!e.candidate) return;
12465
12476
  let t = e.candidate.toJSON();
12466
- p && x ? x(p, t).catch(() => {}) : m.push(t);
12467
- }, c.addTransceiver("video", { direction: "recvonly" }), c.addTransceiver("audio", { direction: "recvonly" }), z.current) {
12477
+ m && w ? w(m, t).catch(() => {}) : h.push(t);
12478
+ }, c.addTransceiver("video", { direction: "recvonly" }), c.addTransceiver("audio", { direction: "recvonly" }), B.current) {
12468
12479
  let e = c.createDataChannel("camstack-control");
12469
- z.current(e);
12480
+ B.current(e);
12470
12481
  }
12471
- let h = await c.createOffer();
12472
- if (s.offerCreatedMs = o(), await c.setLocalDescription(h), s.localSetMs = o(), !R.current || i.signal.aborted) return;
12473
- let g = o(), { sessionId: _, sdpAnswer: v } = await y(c.localDescription?.sdp ?? h.sdp ?? "");
12474
- if (s.signalingRttMs = o() - g, p = _, F.current.add(_), B.current = _, !R.current || i.signal.aborted) {
12475
- T?.(_).catch(() => {}), F.current.delete(_);
12482
+ let g = await c.createOffer();
12483
+ if (s.offerCreatedMs = o(), await c.setLocalDescription(g), s.localSetMs = o(), !z.current || i.signal.aborted) return;
12484
+ let _ = o(), { sessionId: v, sdpAnswer: y } = await b(c.localDescription?.sdp ?? g.sdp ?? "");
12485
+ if (s.signalingRttMs = o() - _, m = v, I.current.add(v), V.current = v, !z.current || i.signal.aborted) {
12486
+ E?.(v).catch(() => {}), I.current.delete(v);
12476
12487
  return;
12477
12488
  }
12478
- if (x) for (let e of m) x(_, e).catch(() => {});
12479
- if (m.length = 0, await c.setRemoteDescription({
12489
+ if (w) for (let e of h) w(v, e).catch(() => {});
12490
+ if (h.length = 0, await c.setRemoteDescription({
12480
12491
  type: "answer",
12481
- sdp: v
12482
- }), s.answerSetMs = o(), console.debug("[WebRTC] Client-offer answer set (trickle)", { sessionId: _.slice(0, 8) }), w) {
12492
+ sdp: y
12493
+ }), s.answerSetMs = o(), console.debug("[WebRTC] Client-offer answer set (trickle)", { sessionId: v.slice(0, 8) }), T) {
12483
12494
  let e = /* @__PURE__ */ new Set(), t = Date.now(), n = async () => {
12484
- if (!(!R.current || i.signal.aborted) && !(c.connectionState === "closed" || c.signalingState === "closed")) {
12495
+ if (!(!z.current || i.signal.aborted) && !(c.connectionState === "closed" || c.signalingState === "closed")) {
12485
12496
  try {
12486
- let { candidates: n, done: r } = await w(_);
12497
+ let { candidates: n, done: r } = await T(v);
12487
12498
  for (let t of n) {
12488
12499
  let n = t.candidate ?? "";
12489
12500
  n && !e.has(n) && (e.add(n), c.addIceCandidate(new RTCIceCandidate(t)).catch(() => {}));
@@ -12498,70 +12509,70 @@ function Du({ serverUrl: e, streamKey: t, label: n, autoPlay: r = !0, muted: i =
12498
12509
  };
12499
12510
  n();
12500
12511
  }
12501
- ke(_);
12512
+ Ae(v);
12502
12513
  } catch (e) {
12503
- if (!R.current) return;
12514
+ if (!z.current) return;
12504
12515
  let t = e instanceof Error ? e.message : String(e);
12505
- re(t), Te("error"), m?.(t), Fe();
12516
+ re(t), Ee("error"), h?.(t), Ie();
12506
12517
  }
12507
12518
  }, [
12508
- y,
12509
12519
  b,
12510
12520
  x,
12511
12521
  w,
12512
12522
  T,
12513
- Ee,
12523
+ E,
12514
12524
  De,
12515
- Te,
12516
- m,
12517
- ke
12525
+ Oe,
12526
+ Ee,
12527
+ h,
12528
+ Ae
12518
12529
  ]);
12519
- W.current = o(async (e, t) => {
12520
- let n = D;
12521
- if (!R.current || !n) return;
12522
- let r = P.current;
12523
- U.current = !0;
12530
+ G.current = o(async (e, t) => {
12531
+ let n = O;
12532
+ if (!z.current || !n) return;
12533
+ let r = F.current;
12534
+ W.current = !0;
12524
12535
  try {
12525
- let i = await b?.();
12526
- if (!R.current) return;
12536
+ let i = await x?.();
12537
+ if (!z.current) return;
12527
12538
  let a = new RTCPeerConnection({ iceServers: [...i ?? [], { urls: "stun:stun.l.google.com:19302" }] }), o = new MediaStream(), s = !1, c = () => {
12528
- s || !R.current || (s = !0, P.current = a, M.current && (M.current.srcObject = o, M.current.play().catch(() => {})), r && r !== a && r.close());
12539
+ s || !z.current || (s = !0, F.current = a, N.current && (N.current.srcObject = o, N.current.play().catch(() => {})), r && r !== a && r.close());
12529
12540
  };
12530
12541
  a.ontrack = (e) => {
12531
12542
  console.debug("[WebRTC] ontrack (reoffer)", e.track.kind, e.track.readyState), o.addTrack(e.track), c();
12532
12543
  }, a.oniceconnectionstatechange = () => {
12533
- if (!R.current) return;
12544
+ if (!z.current) return;
12534
12545
  let e = a.iceConnectionState;
12535
- console.debug("[WebRTC] ICE state (reoffer):", e), e === "connected" || e === "completed" ? (ee.current = 0, c(), Te("playing"), M.current?.paused && M.current.play().catch(() => {})) : (e === "failed" || e === "closed") && (!s && e === "failed" && a.close(), Te("disconnected"), Fe());
12546
+ console.debug("[WebRTC] ICE state (reoffer):", e), e === "connected" || e === "completed" ? (R.current = 0, c(), Ee("playing"), N.current?.paused && N.current.play().catch(() => {})) : (e === "failed" || e === "closed") && (!s && e === "failed" && a.close(), Ee("disconnected"), Ie());
12536
12547
  };
12537
12548
  let l = null, u = [];
12538
12549
  if (a.onicecandidate = (e) => {
12539
12550
  if (!e.candidate) return;
12540
12551
  let t = e.candidate.toJSON();
12541
- l && x ? x(l, t).catch(() => {}) : u.push(t);
12542
- }, a.addTransceiver("video", { direction: "recvonly" }), a.addTransceiver("audio", { direction: "recvonly" }), z.current) {
12552
+ l && w ? w(l, t).catch(() => {}) : u.push(t);
12553
+ }, a.addTransceiver("video", { direction: "recvonly" }), a.addTransceiver("audio", { direction: "recvonly" }), B.current) {
12543
12554
  let e = a.createDataChannel("camstack-control");
12544
- z.current(e);
12555
+ B.current(e);
12545
12556
  }
12546
12557
  let d = await a.createOffer();
12547
- if (await a.setLocalDescription(d), !R.current) {
12558
+ if (await a.setLocalDescription(d), !z.current) {
12548
12559
  a.close();
12549
12560
  return;
12550
12561
  }
12551
12562
  let { sessionId: f, sdpAnswer: p } = await n(e, a.localDescription?.sdp ?? d.sdp ?? "", t);
12552
- if (!R.current) {
12563
+ if (!z.current) {
12553
12564
  a.close();
12554
12565
  return;
12555
12566
  }
12556
- if (l = f, F.current.add(f), B.current = f, x) for (let e of u) x(f, e).catch(() => {});
12567
+ if (l = f, I.current.add(f), V.current = f, w) for (let e of u) w(f, e).catch(() => {});
12557
12568
  if (u.length = 0, await a.setRemoteDescription({
12558
12569
  type: "answer",
12559
12570
  sdp: p
12560
- }), w) {
12571
+ }), T) {
12561
12572
  let e = /* @__PURE__ */ new Set(), t = Date.now(), n = async () => {
12562
- if (R.current && !(a.connectionState === "closed" || a.signalingState === "closed")) {
12573
+ if (z.current && !(a.connectionState === "closed" || a.signalingState === "closed")) {
12563
12574
  try {
12564
- let { candidates: n, done: r } = await w(f);
12575
+ let { candidates: n, done: r } = await T(f);
12565
12576
  for (let t of n) {
12566
12577
  let n = t.candidate ?? "";
12567
12578
  n && !e.has(n) && (e.add(n), a.addIceCandidate(new RTCIceCandidate(t)).catch(() => {}));
@@ -12576,88 +12587,88 @@ function Du({ serverUrl: e, streamKey: t, label: n, autoPlay: r = !0, muted: i =
12576
12587
  };
12577
12588
  n();
12578
12589
  }
12579
- ke(f);
12590
+ Ae(f);
12580
12591
  } catch (t) {
12581
- console.debug("[WebRTC] reoffer failed; keeping last frame, re-arming poll", t instanceof Error ? t.message : String(t)), ke(e);
12592
+ console.debug("[WebRTC] reoffer failed; keeping last frame, re-arming poll", t instanceof Error ? t.message : String(t)), Ae(e);
12582
12593
  } finally {
12583
- U.current = !1;
12594
+ W.current = !1;
12584
12595
  }
12585
12596
  }, [
12586
- D,
12587
- b,
12597
+ O,
12588
12598
  x,
12589
12599
  w,
12590
- Te,
12591
- ke
12600
+ T,
12601
+ Ee,
12602
+ Ae
12592
12603
  ]);
12593
- let Ne = ge ? Me : me ? Ae : je, Pe = l(() => {});
12594
- Pe.current = Ne;
12595
- let Fe = o(() => {
12596
- if (!R.current || ee.current >= Eu) return;
12597
- let e = ee.current;
12598
- ee.current += 1;
12604
+ let Pe = _e ? Ne : he ? je : Me, Fe = l(() => {});
12605
+ Fe.current = Pe;
12606
+ let Ie = o(() => {
12607
+ if (!z.current || R.current >= Eu) return;
12608
+ let e = R.current;
12609
+ R.current += 1;
12599
12610
  let t = Math.min(Tu, wu * 2 ** e), n = Math.round(t * (.8 + Math.random() * .4));
12600
- L.current = setTimeout(() => {
12601
- R.current && Pe.current();
12611
+ ee.current = setTimeout(() => {
12612
+ z.current && Fe.current();
12602
12613
  }, n);
12603
12614
  }, []);
12604
- _(() => (R.current = !0, ee.current = 0, r && Ne(), () => {
12605
- R.current = !1, Ee();
12615
+ _(() => (z.current = !0, R.current = 0, r && Pe(), () => {
12616
+ z.current = !1, De();
12606
12617
  }), [e, t]);
12607
- let Ie = l(!1);
12618
+ let Le = l(!1);
12608
12619
  _(() => {
12609
12620
  if (r) {
12610
- if (ge) {
12611
- if (!y) return;
12612
- } else if (me) {
12613
- if (!g || !v) return;
12621
+ if (_e) {
12622
+ if (!b) return;
12623
+ } else if (he) {
12624
+ if (!v || !y) return;
12614
12625
  } else return;
12615
- Ie.current || P.current || (Ie.current = !0, Ne());
12626
+ Le.current || F.current || (Le.current = !0, Pe());
12616
12627
  }
12617
12628
  }, [
12618
12629
  r,
12619
- ge,
12620
- me,
12621
- y,
12622
- g,
12630
+ _e,
12631
+ he,
12632
+ b,
12623
12633
  v,
12624
- Ne
12634
+ y,
12635
+ Pe
12625
12636
  ]);
12626
- let Le = () => {
12627
- ee.current = 0, Ne();
12628
- }, Re = () => {
12629
- if (ee.current = 0, P.current && ge) {
12630
- Me(!0);
12637
+ let Re = () => {
12638
+ R.current = 0, Pe();
12639
+ }, ze = () => {
12640
+ if (R.current = 0, F.current && _e) {
12641
+ Ne(!0);
12631
12642
  return;
12632
12643
  }
12633
- if (P.current && me) {
12634
- Ae(!0);
12644
+ if (F.current && he) {
12645
+ je(!0);
12635
12646
  return;
12636
12647
  }
12637
- Ne();
12638
- }, ze = l(A);
12648
+ Pe();
12649
+ }, Be = l(j);
12639
12650
  _(() => {
12640
- ze.current !== A && (ze.current = A, R.current && Re());
12641
- }, [A]);
12642
- let Be = () => {
12643
- M.current && (M.current.muted = !M.current.muted, ae(M.current.muted));
12644
- }, Ve = async () => {
12645
- if (N.current) try {
12651
+ Be.current !== j && (Be.current = j, z.current && ze());
12652
+ }, [j]);
12653
+ let Ve = () => {
12654
+ N.current && (N.current.muted = !N.current.muted, ae(N.current.muted));
12655
+ }, He = async () => {
12656
+ if (P.current) try {
12646
12657
  if (document.fullscreenElement) {
12647
12658
  await document.exitFullscreen();
12648
12659
  return;
12649
12660
  }
12650
- if (N.current.requestFullscreen) {
12651
- await N.current.requestFullscreen();
12661
+ if (P.current.requestFullscreen) {
12662
+ await P.current.requestFullscreen();
12652
12663
  return;
12653
12664
  }
12654
- let e = M.current;
12665
+ let e = N.current;
12655
12666
  e?.webkitEnterFullscreen && e.webkitEnterFullscreen();
12656
12667
  } catch (e) {
12657
12668
  console.warn(`Fullscreen toggle failed: ${e instanceof Error ? e.message : e}`);
12658
12669
  }
12659
- }, He = async () => {
12660
- let e = M.current;
12670
+ }, Ue = async () => {
12671
+ let e = N.current;
12661
12672
  if (e) try {
12662
12673
  if (typeof e.webkitSetPresentationMode == "function") {
12663
12674
  e.webkitSetPresentationMode(e.webkitPresentationMode === "picture-in-picture" ? "inline" : "picture-in-picture");
@@ -12667,35 +12678,35 @@ function Du({ serverUrl: e, streamKey: t, label: n, autoPlay: r = !0, muted: i =
12667
12678
  } catch (e) {
12668
12679
  console.warn(`PiP toggle failed: ${e instanceof Error ? e.message : String(e)}`);
12669
12680
  }
12670
- }, Ue = () => {
12671
- if (!M.current) return;
12681
+ }, We = () => {
12682
+ if (!N.current) return;
12672
12683
  let e = document.createElement("canvas");
12673
- e.width = M.current.videoWidth || 1280, e.height = M.current.videoHeight || 720;
12684
+ e.width = N.current.videoWidth || 1280, e.height = N.current.videoHeight || 720;
12674
12685
  let n = e.getContext("2d");
12675
12686
  if (!n) return;
12676
- n.drawImage(M.current, 0, 0);
12687
+ n.drawImage(N.current, 0, 0);
12677
12688
  let r = document.createElement("a");
12678
12689
  r.download = `${t.replace(/[/:]/g, "-")}-${Date.now()}.jpg`, r.href = e.toDataURL("image/jpeg", .92), r.click();
12679
12690
  };
12680
12691
  _(() => {
12681
12692
  let e = () => se(!!document.fullscreenElement);
12682
12693
  document.addEventListener("fullscreenchange", e);
12683
- let t = M.current;
12694
+ let t = N.current;
12684
12695
  return t?.addEventListener("webkitbeginfullscreen", e), t?.addEventListener("webkitendfullscreen", e), () => {
12685
12696
  document.removeEventListener("fullscreenchange", e), t?.removeEventListener("webkitbeginfullscreen", e), t?.removeEventListener("webkitendfullscreen", e);
12686
12697
  };
12687
12698
  }, []), _(() => {
12688
- let e = M.current, t = typeof document < "u" && document.pictureInPictureEnabled === !0, n = e !== null && typeof e.webkitSetPresentationMode == "function";
12689
- ce(t || n);
12699
+ let e = N.current, t = typeof document < "u" && document.pictureInPictureEnabled === !0, n = e !== null && typeof e.webkitSetPresentationMode == "function";
12700
+ le(t || n);
12690
12701
  }, []);
12691
- let [We, Ge] = c(""), Ke = l(null);
12702
+ let [Ge, Ke] = c(""), qe = l(null);
12692
12703
  _(() => {
12693
12704
  if (!s) {
12694
- Ge(""), Ke.current = null;
12705
+ Ke(""), qe.current = null;
12695
12706
  return;
12696
12707
  }
12697
12708
  let e = async () => {
12698
- let e = P.current;
12709
+ let e = F.current;
12699
12710
  if (e) try {
12700
12711
  let t = await e.getStats(), n = 0, r = 0, i = 0, a = 0, o = 0, s = 0;
12701
12712
  t.forEach((e) => {
@@ -12703,12 +12714,12 @@ function Du({ serverUrl: e, streamKey: t, label: n, autoPlay: r = !0, muted: i =
12703
12714
  t.type === "inbound-rtp" && (t.kind ?? t.mediaType) === "video" ? (n = t.bytesReceived ?? 0, r = t.timestamp, i = t.framesPerSecond ?? 0, a = t.frameWidth ?? 0, o = t.frameHeight ?? 0) : t.type === "candidate-pair" && t.nominated && typeof t.currentRoundTripTime == "number" && (s = t.currentRoundTripTime);
12704
12715
  });
12705
12716
  let c = 0;
12706
- Ke.current && r > Ke.current.ts && (c = Math.round((n - Ke.current.bytes) * 8 / (r - Ke.current.ts))), Ke.current = {
12717
+ qe.current && r > qe.current.ts && (c = Math.round((n - qe.current.bytes) * 8 / (r - qe.current.ts))), qe.current = {
12707
12718
  bytes: n,
12708
12719
  ts: r
12709
12720
  };
12710
12721
  let l = [];
12711
- a && o && l.push(`${a}×${o}`), i && l.push(`${Math.round(i)}fps`), c > 0 && l.push(`${c} kbps`), s && l.push(`${Math.round(s * 1e3)}ms`), Ge(l.join(" · "));
12722
+ a && o && l.push(`${a}×${o}`), i && l.push(`${Math.round(i)}fps`), c > 0 && l.push(`${c} kbps`), s && l.push(`${Math.round(s * 1e3)}ms`), Ke(l.join(" · "));
12712
12723
  } catch {}
12713
12724
  };
12714
12725
  e();
@@ -12717,22 +12728,22 @@ function Du({ serverUrl: e, streamKey: t, label: n, autoPlay: r = !0, muted: i =
12717
12728
  }, 1e3);
12718
12729
  return () => clearInterval(t);
12719
12730
  }, [s]);
12720
- let qe = l(null);
12731
+ let Je = l(null);
12721
12732
  _(() => {
12722
12733
  if (!d) {
12723
- qe.current = null;
12734
+ Je.current = null;
12724
12735
  return;
12725
12736
  }
12726
12737
  let e = async () => {
12727
- let e = P.current;
12738
+ let e = F.current;
12728
12739
  if (e) try {
12729
12740
  let t = await e.getStats(), n = 0, r = 0, i = 0, a = 0, o = 0, s = 0;
12730
12741
  t.forEach((e) => {
12731
12742
  let t = e;
12732
12743
  t.type === "inbound-rtp" && (t.kind ?? t.mediaType) === "video" ? (n = t.packetsLost ?? 0, r = t.packetsReceived ?? 0, i = t.bytesReceived ?? 0, a = t.timestamp, o = t.jitter ?? 0) : t.type === "candidate-pair" && t.nominated && typeof t.currentRoundTripTime == "number" && (s = t.currentRoundTripTime);
12733
12744
  });
12734
- let c = qe.current;
12735
- if (qe.current = {
12745
+ let c = Je.current;
12746
+ if (Je.current = {
12736
12747
  lost: n,
12737
12748
  recv: r,
12738
12749
  bytes: i,
@@ -12751,21 +12762,21 @@ function Du({ serverUrl: e, streamKey: t, label: n, autoPlay: r = !0, muted: i =
12751
12762
  }, 2e3);
12752
12763
  return () => clearInterval(t);
12753
12764
  }, [d]);
12754
- let Je = l(null);
12765
+ let Ye = l(null);
12755
12766
  _(() => {
12756
12767
  if (!u) {
12757
- Je.current = null;
12768
+ Ye.current = null;
12758
12769
  return;
12759
12770
  }
12760
12771
  let e = async () => {
12761
- let e = P.current, t = M.current;
12772
+ let e = F.current, t = N.current;
12762
12773
  if (e) try {
12763
12774
  let n = await e.getStats(), r = 0, i = 0, a = 0, o = 0, s = 0, c = 0, l = 0, d = 0;
12764
12775
  n.forEach((e) => {
12765
12776
  let t = e;
12766
12777
  t.type === "inbound-rtp" && (t.kind ?? t.mediaType) === "video" && (r = t.framesReceived ?? 0, i = t.framesDecoded ?? 0, a = t.framesDropped ?? 0, o = t.framesPerSecond ?? 0, s = t.freezeCount ?? 0, c = t.totalFreezesDuration ?? 0, l = t.jitterBufferDelay ?? 0, d = t.jitterBufferEmittedCount ?? 0);
12767
12778
  });
12768
- let f = t?.currentTime ?? 0, p = Date.now(), m = Je.current, h = d > 0 ? Math.round(l / d * 1e3) : 0;
12779
+ let f = t?.currentTime ?? 0, p = Date.now(), m = Ye.current, h = d > 0 ? Math.round(l / d * 1e3) : 0;
12769
12780
  m && u({
12770
12781
  dRecv: r - m.recv,
12771
12782
  dDec: i - m.dec,
@@ -12777,7 +12788,7 @@ function Du({ serverUrl: e, streamKey: t, label: n, autoPlay: r = !0, muted: i =
12777
12788
  dCtMs: Math.round((f - m.ct) * 1e3),
12778
12789
  dtMs: p - m.ts,
12779
12790
  readyState: t?.readyState ?? -1
12780
- }), Je.current = {
12791
+ }), Ye.current = {
12781
12792
  recv: r,
12782
12793
  dec: i,
12783
12794
  drop: a,
@@ -12794,71 +12805,71 @@ function Du({ serverUrl: e, streamKey: t, label: n, autoPlay: r = !0, muted: i =
12794
12805
  return () => clearInterval(t);
12795
12806
  }, [u]), _(() => {
12796
12807
  ae(i);
12797
- let e = M.current;
12808
+ let e = N.current;
12798
12809
  e && (e.muted = i, i || e.play().catch(() => {}));
12799
12810
  }, [i]);
12800
- let Ye = () => {
12801
- le || (de(!0), fe.current && clearTimeout(fe.current), fe.current = setTimeout(() => de(!1), 3e3));
12802
- }, Xe = () => {
12803
- de((e) => !e), fe.current && clearTimeout(fe.current);
12811
+ let Xe = () => {
12812
+ ue || (fe(!0), pe.current && clearTimeout(pe.current), pe.current = setTimeout(() => fe(!1), 3e3));
12813
+ }, Ze = () => {
12814
+ fe((e) => !e), pe.current && clearTimeout(pe.current);
12804
12815
  };
12805
12816
  _(() => {
12806
- if (G === "playing") {
12807
- we();
12808
- let e = setInterval(we, 2e3);
12817
+ if (K === "playing") {
12818
+ Te();
12819
+ let e = setInterval(Te, 2e3);
12809
12820
  return () => clearInterval(e);
12810
12821
  }
12811
- _e && ye.current && xe(ye.current);
12822
+ ve && be.current && Se(be.current);
12812
12823
  }, [
12813
- G,
12814
- _e,
12815
- we
12824
+ K,
12825
+ ve,
12826
+ Te
12816
12827
  ]), _(() => {
12817
- if (G !== "playing") {
12818
- Ce(!1);
12828
+ if (K !== "playing") {
12829
+ we(!1);
12819
12830
  return;
12820
12831
  }
12821
- let e = M.current;
12832
+ let e = N.current;
12822
12833
  if (!e) return;
12823
12834
  let t = !1, n = () => {
12824
- t || Ce(!0);
12835
+ t || we(!0);
12825
12836
  }, r;
12826
12837
  typeof e.requestVideoFrameCallback == "function" && (r = e.requestVideoFrameCallback(() => n())), e.addEventListener("loadeddata", n, { once: !0 });
12827
12838
  let i = setTimeout(n, 12e3);
12828
12839
  return () => {
12829
12840
  t = !0, clearTimeout(i), r !== void 0 && typeof e.cancelVideoFrameCallback == "function" && e.cancelVideoFrameCallback(r), e.removeEventListener("loadeddata", n);
12830
12841
  };
12831
- }, [G]);
12832
- let Ze = _e && be ? be : O ?? null, Qe = !Se && Ze !== null;
12842
+ }, [K]);
12843
+ let Qe = ve && xe ? xe : k ?? null, $e = !Ce && Qe !== null;
12833
12844
  return /* @__PURE__ */ C("div", {
12834
- ref: N,
12835
- className: `relative isolate bg-black overflow-hidden group ${f}`,
12836
- onMouseMove: Ye,
12837
- onMouseEnter: Ye,
12838
- onTouchStart: Xe,
12845
+ ref: P,
12846
+ className: `relative isolate bg-black overflow-hidden group ${p}`,
12847
+ onMouseMove: Xe,
12848
+ onMouseEnter: Xe,
12849
+ onTouchStart: Ze,
12839
12850
  children: [
12840
12851
  /* @__PURE__ */ S("video", {
12841
- ref: M,
12852
+ ref: N,
12842
12853
  autoPlay: r,
12843
12854
  muted: ie,
12844
12855
  playsInline: !0,
12845
12856
  className: "w-full h-full object-contain relative z-0"
12846
12857
  }),
12847
- Qe && Ze && /* @__PURE__ */ S("img", {
12848
- src: Ze,
12858
+ $e && Qe && /* @__PURE__ */ S("img", {
12859
+ src: Qe,
12849
12860
  alt: "",
12850
12861
  className: "absolute inset-0 w-full h-full object-contain z-[5] transform-gpu pointer-events-none"
12851
12862
  }),
12852
- n && G === "playing" && /* @__PURE__ */ S("div", {
12863
+ n && K === "playing" && /* @__PURE__ */ S("div", {
12853
12864
  className: "absolute top-2 left-2 z-10 transform-gpu px-2 py-0.5 rounded bg-black/60 text-[10px] text-white font-medium",
12854
12865
  children: n
12855
12866
  }),
12856
- s && We && /* @__PURE__ */ S("div", {
12867
+ s && Ge && /* @__PURE__ */ S("div", {
12857
12868
  className: "absolute top-2 right-2 z-10 transform-gpu px-2 py-0.5 rounded bg-black/60 text-[10px] text-white font-mono",
12858
- children: We
12869
+ children: Ge
12859
12870
  }),
12860
- h,
12861
- !Ze && G === "connecting" && /* @__PURE__ */ C("div", {
12871
+ g,
12872
+ !Qe && K === "connecting" && /* @__PURE__ */ C("div", {
12862
12873
  className: "absolute inset-0 z-10 transform-gpu flex flex-col items-center justify-center bg-black/70 gap-2",
12863
12874
  children: [/* @__PURE__ */ S("svg", {
12864
12875
  className: "h-6 w-6 text-white/60 animate-spin",
@@ -12880,7 +12891,7 @@ function Du({ serverUrl: e, streamKey: t, label: n, autoPlay: r = !0, muted: i =
12880
12891
  children: "Connecting…"
12881
12892
  })]
12882
12893
  }),
12883
- !Ze && (G === "error" || G === "disconnected") && /* @__PURE__ */ C("div", {
12894
+ !Qe && (K === "error" || K === "disconnected") && /* @__PURE__ */ C("div", {
12884
12895
  className: "absolute inset-0 z-10 transform-gpu flex flex-col items-center justify-center bg-black/70 gap-2",
12885
12896
  children: [
12886
12897
  /* @__PURE__ */ S("svg", {
@@ -12896,16 +12907,16 @@ function Du({ serverUrl: e, streamKey: t, label: n, autoPlay: r = !0, muted: i =
12896
12907
  }),
12897
12908
  /* @__PURE__ */ S("span", {
12898
12909
  className: "text-xs text-red-400 text-center px-4",
12899
- children: G === "error" ? ne || "Connection failed" : "Disconnected"
12910
+ children: K === "error" ? ne || "Connection failed" : "Disconnected"
12900
12911
  }),
12901
12912
  /* @__PURE__ */ S("button", {
12902
- onClick: Le,
12913
+ onClick: Re,
12903
12914
  className: "mt-1 inline-flex items-center gap-1.5 rounded px-3 py-1 text-xs bg-white/10 text-white hover:bg-white/20 transition-colors",
12904
12915
  children: "Reconnect"
12905
12916
  })
12906
12917
  ]
12907
12918
  }),
12908
- Ze && (G === "connecting" || G === "disconnected") && /* @__PURE__ */ S("div", {
12919
+ Qe && (K === "connecting" || K === "disconnected") && /* @__PURE__ */ S("div", {
12909
12920
  className: "absolute top-2 left-2 z-10 transform-gpu flex h-6 w-6 items-center justify-center rounded-full bg-black/55",
12910
12921
  children: /* @__PURE__ */ S("svg", {
12911
12922
  className: "h-3.5 w-3.5 text-white/90 animate-spin",
@@ -12924,8 +12935,8 @@ function Du({ serverUrl: e, streamKey: t, label: n, autoPlay: r = !0, muted: i =
12924
12935
  })
12925
12936
  })
12926
12937
  }),
12927
- Ze && G === "error" && /* @__PURE__ */ S("button", {
12928
- onClick: Le,
12938
+ Qe && K === "error" && /* @__PURE__ */ S("button", {
12939
+ onClick: Re,
12929
12940
  title: ne || "Reconnect",
12930
12941
  className: "absolute top-2 left-2 z-10 transform-gpu flex h-6 w-6 items-center justify-center rounded-full bg-black/55 text-white/90 hover:bg-black/75 transition-colors",
12931
12942
  children: /* @__PURE__ */ C("svg", {
@@ -12939,12 +12950,12 @@ function Du({ serverUrl: e, streamKey: t, label: n, autoPlay: r = !0, muted: i =
12939
12950
  children: [/* @__PURE__ */ S("path", { d: "M23 4v6h-6M1 20v-6h6" }), /* @__PURE__ */ S("path", { d: "M3.51 9a9 9 0 0114.85-3.36L23 10M1 14l4.64 4.36A9 9 0 0020.49 15" })]
12940
12951
  })
12941
12952
  }),
12942
- a && G !== "idle" && G !== "error" && /* @__PURE__ */ C("div", {
12943
- className: `absolute bottom-0 inset-x-0 z-20 transform-gpu flex items-center justify-between px-3 py-1.5 bg-gradient-to-t from-black/80 to-transparent transition-opacity duration-200 ${le || ue ? "opacity-100 pointer-events-auto" : "opacity-0 pointer-events-none"}`,
12953
+ a && K !== "idle" && K !== "error" && /* @__PURE__ */ C("div", {
12954
+ className: `absolute bottom-0 inset-x-0 z-20 transform-gpu flex items-center justify-between px-3 py-1.5 bg-gradient-to-t from-black/80 to-transparent transition-opacity duration-200 ${ue || de ? "opacity-100 pointer-events-auto" : "opacity-0 pointer-events-none"}`,
12944
12955
  children: [/* @__PURE__ */ S("div", {
12945
12956
  className: "flex items-center gap-1",
12946
12957
  children: /* @__PURE__ */ S(Ou, {
12947
- onClick: Be,
12958
+ onClick: Ve,
12948
12959
  title: ie ? "Unmute" : "Mute",
12949
12960
  children: ie ? /* @__PURE__ */ C("svg", {
12950
12961
  className: "h-3.5 w-3.5",
@@ -12982,7 +12993,7 @@ function Du({ serverUrl: e, streamKey: t, label: n, autoPlay: r = !0, muted: i =
12982
12993
  className: "flex items-center gap-1",
12983
12994
  children: [
12984
12995
  /* @__PURE__ */ S(Ou, {
12985
- onClick: Ue,
12996
+ onClick: We,
12986
12997
  title: "Take snapshot",
12987
12998
  children: /* @__PURE__ */ C("svg", {
12988
12999
  className: "h-3.5 w-3.5",
@@ -12998,8 +13009,8 @@ function Du({ serverUrl: e, streamKey: t, label: n, autoPlay: r = !0, muted: i =
12998
13009
  })]
12999
13010
  })
13000
13011
  }),
13001
- K && /* @__PURE__ */ S(Ou, {
13002
- onClick: He,
13012
+ ce && /* @__PURE__ */ S(Ou, {
13013
+ onClick: Ue,
13003
13014
  title: "Picture-in-Picture",
13004
13015
  children: /* @__PURE__ */ C("svg", {
13005
13016
  className: "h-3.5 w-3.5",
@@ -13019,7 +13030,7 @@ function Du({ serverUrl: e, streamKey: t, label: n, autoPlay: r = !0, muted: i =
13019
13030
  })
13020
13031
  }),
13021
13032
  /* @__PURE__ */ S(Ou, {
13022
- onClick: Ve,
13033
+ onClick: He,
13023
13034
  title: oe ? "Exit fullscreen" : "Fullscreen",
13024
13035
  children: oe ? /* @__PURE__ */ S("svg", {
13025
13036
  className: "h-3.5 w-3.5",
@@ -13326,8 +13337,8 @@ function Uu({ className: e }) {
13326
13337
  ]
13327
13338
  });
13328
13339
  }
13329
- function Wu({ serverUrl: e, createSession: t, sendAnswer: n, handleOffer: r, getIceServers: i, addIceCandidate: a, getIceCandidates: s, closeSession: u, getSessionState: d, playbackUrl: f, playbackAuthToken: p, onExitPlayback: h, posterUrl: g, streams: v, activeStreamId: y, onStreamChange: b, deviceName: x, phase: T, pipelineMetrics: E, detections: D, defaultShowDetections: O = !0, defaultShowMotion: k = !1, streamStats: A, autoPlay: j = !1, showPlayStop: M = !1, snapshotSrc: N, snapshotLoading: P = !1, onRefreshSnapshot: F, showStreamStats: I = !1, children: L, extraOverlay: ee, ptzAvailable: z = !1, ptzShown: B = !1, ptzOverlay: V, onPtzToggle: H, intercomAvailable: U = !1, intercomShown: W = !1, onIntercomToggle: G, chromeless: te = !1, className: ne }) {
13330
- let re = R(), ie = Ys(), [ae, oe] = c(j), [se, K] = c(O), [ce, le] = c(k), [ue, de] = c(null), [fe, pe] = c([]), [me, he] = c(-1), [ge, _e] = c(!1), ve = l(null);
13340
+ function Wu({ serverUrl: e, createSession: t, sendAnswer: n, handleOffer: r, getIceServers: i, addIceCandidate: a, getIceCandidates: s, closeSession: u, getSessionState: d, playbackUrl: f, playbackAuthToken: p, onExitPlayback: h, posterUrl: g, streams: v, activeStreamId: y, onStreamChange: b, deviceName: x, phase: T, pipelineMetrics: E, detections: D, defaultShowDetections: O = !0, defaultShowMotion: k = !1, streamStats: A, autoPlay: j = !1, showPlayStop: M = !1, snapshotSrc: N, snapshotLoading: P = !1, onRefreshSnapshot: F, showStreamStats: I = !1, children: L, extraOverlay: ee, ptzAvailable: z = !1, ptzShown: B = !1, ptzOverlay: V, onPtzToggle: H, intercomAvailable: U = !1, intercomShown: W = !1, onIntercomToggle: G, chromeless: K = !1, className: te }) {
13341
+ let ne = R(), re = Ys(), [ie, ae] = c(j), [oe, se] = c(O), [ce, le] = c(k), [ue, de] = c(null), [fe, pe] = c([]), [me, he] = c(-1), [ge, _e] = c(!1), ve = l(null);
13331
13342
  _(() => {
13332
13343
  if (!ge) return;
13333
13344
  function e(e) {
@@ -13344,7 +13355,7 @@ function Wu({ serverUrl: e, createSession: t, sendAnswer: n, handleOffer: r, get
13344
13355
  inputFps: xe.inputFps,
13345
13356
  bitrateKbps: xe.bitrateKbps ?? 0
13346
13357
  }, Ce = (e) => {
13347
- de(e), b?.(e), ae && M && (oe(!1), setTimeout(() => oe(!0), 50));
13358
+ de(e), b?.(e), ie && M && (ae(!1), setTimeout(() => ae(!0), 50));
13348
13359
  }, we = m(() => {
13349
13360
  let e = xe?.target;
13350
13361
  if (!(!e || !t)) return (n) => t(e, n);
@@ -13353,9 +13364,9 @@ function Wu({ serverUrl: e, createSession: t, sendAnswer: n, handleOffer: r, get
13353
13364
  if (!(!e || !r)) return (t, n) => r(e, t, n);
13354
13365
  }, [r, xe]), Ee = m(() => {
13355
13366
  if (r) return (e, t, n) => r(n, t, e);
13356
- }, [r]), De = v, Oe = () => oe(!0), ke = () => oe(!1), Ae = E?.phase ?? T, je = Ae === "active", Me = !!D, Ne = Me && (se || ce), Pe = z && B && !!V, Fe = !!f, Ie = Fe || (M ? ae : !0);
13367
+ }, [r]), De = v, Oe = () => ae(!0), ke = () => ae(!1), Ae = E?.phase ?? T, je = Ae === "active", Me = !!D, Ne = Me && (oe || ce), Pe = z && B && !!V, Fe = !!f, Ie = Fe || (M ? ie : !0);
13357
13368
  return /* @__PURE__ */ C("div", {
13358
- className: `overflow-hidden ${te ? "" : "rounded-xl border border-border bg-surface"} ${ne ?? ""}`,
13369
+ className: `overflow-hidden ${K ? "" : "rounded-xl border border-border bg-surface"} ${te ?? ""}`,
13359
13370
  children: [
13360
13371
  /* @__PURE__ */ C("div", {
13361
13372
  className: "flex flex-wrap items-center justify-between gap-2 px-3 py-2 border-b border-border",
@@ -13432,7 +13443,7 @@ function Wu({ serverUrl: e, createSession: t, sendAnswer: n, handleOffer: r, get
13432
13443
  children: "Intercom"
13433
13444
  })]
13434
13445
  }),
13435
- re.map((e) => {
13446
+ ne.map((e) => {
13436
13447
  let t = e.tone === "primary" ? "bg-primary text-primary-foreground" : "bg-primary/15 text-primary";
13437
13448
  return /* @__PURE__ */ C("button", {
13438
13449
  type: "button",
@@ -13552,8 +13563,8 @@ function Wu({ serverUrl: e, createSession: t, sendAnswer: n, handleOffer: r, get
13552
13563
  }),
13553
13564
  Me && /* @__PURE__ */ C(w, { children: [/* @__PURE__ */ S(Bu, {
13554
13565
  label: "Show detections",
13555
- active: se,
13556
- onClick: () => K((e) => !e)
13566
+ active: oe,
13567
+ onClick: () => se((e) => !e)
13557
13568
  }), /* @__PURE__ */ S(Bu, {
13558
13569
  label: "Show motion",
13559
13570
  active: ce,
@@ -13597,7 +13608,7 @@ function Wu({ serverUrl: e, createSession: t, sendAnswer: n, handleOffer: r, get
13597
13608
  addIceCandidate: a,
13598
13609
  getIceCandidates: s,
13599
13610
  closeSession: u,
13600
- ...ie.bindControlChannel ? { onControlChannel: ie.bindControlChannel } : {},
13611
+ ...re.bindControlChannel ? { onControlChannel: re.bindControlChannel } : {},
13601
13612
  ...g ? { posterUrl: g } : {},
13602
13613
  overlay: Ne || ee || Pe ? /* @__PURE__ */ C(w, { children: [
13603
13614
  Ne && /* @__PURE__ */ S(gu, {
@@ -13605,7 +13616,7 @@ function Wu({ serverUrl: e, createSession: t, sendAnswer: n, handleOffer: r, get
13605
13616
  showPhaseIndicator: !1,
13606
13617
  showMotionZones: ce,
13607
13618
  showMotionRaw: ce,
13608
- showDetections: se
13619
+ showDetections: oe
13609
13620
  }),
13610
13621
  ee,
13611
13622
  Pe && V
@@ -16931,10 +16942,10 @@ function j_({ agentId: e, addonId: t, deviceId: n, containerDeviceId: r, integra
16931
16942
  r,
16932
16943
  M,
16933
16944
  N
16934
- ]), I = C_(k_), L = v ?? I, R = L.entries, [z, B] = c(0), [V, H] = c(!0), U = l(!1), [W, G] = c(!1), [te, ne] = c(!1), [re, ie] = c(/* @__PURE__ */ new Set()), [ae, oe] = c(""), se = l(null), K = `${k ?? ""}:${A ?? ""}:${String(j ?? "")}:${String(r ?? "")}:${M ?? ""}:${N ?? ""}`, le = l(K);
16945
+ ]), I = C_(k_), L = v ?? I, R = L.entries, [z, B] = c(0), [V, H] = c(!0), U = l(!1), [W, G] = c(!1), [K, te] = c(!1), [ne, re] = c(/* @__PURE__ */ new Set()), [ie, ae] = c(""), oe = l(null), se = `${k ?? ""}:${A ?? ""}:${String(j ?? "")}:${String(r ?? "")}:${M ?? ""}:${N ?? ""}`, le = l(se);
16935
16946
  _(() => {
16936
- le.current !== K && (le.current = K, L.reset(), B(0), ie(/* @__PURE__ */ new Set()), G(!1));
16937
- }, [K, L]);
16947
+ le.current !== se && (le.current = se, L.reset(), B(0), re(/* @__PURE__ */ new Set()), G(!1));
16948
+ }, [se, L]);
16938
16949
  let { data: ue, isLoading: de } = Z.logs.query.useQuery({
16939
16950
  ...P ? { tags: P } : {},
16940
16951
  limit: g
@@ -16953,7 +16964,7 @@ function j_({ agentId: e, addonId: t, deviceId: n, containerDeviceId: r, integra
16953
16964
  })), t = /* @__PURE__ */ new Map();
16954
16965
  for (let n of e) t.set(`${n.timestamp}|${n.level}|${n.scope ?? ""}|${n.message}`, n);
16955
16966
  for (let e of R) t.set(`${e.timestamp}|${e.level}|${e.scope ?? ""}|${e.message}`, e);
16956
- let n = [...t.values()].toSorted((e, t) => new Date(e.timestamp).getTime() - new Date(t.timestamp).getTime()), r = (z > 0 ? n.filter((e) => new Date(e.timestamp).getTime() > z) : n).filter((e) => A_(e.level, D)), i = ae.trim().toLowerCase();
16967
+ let n = [...t.values()].toSorted((e, t) => new Date(e.timestamp).getTime() - new Date(t.timestamp).getTime()), r = (z > 0 ? n.filter((e) => new Date(e.timestamp).getTime() > z) : n).filter((e) => A_(e.level, D)), i = ie.trim().toLowerCase();
16957
16968
  return i ? r.filter((e) => {
16958
16969
  if (e.message.toLowerCase().includes(i) || e.scope && e.scope.toLowerCase().includes(i)) return !0;
16959
16970
  if (e.tags) {
@@ -16969,9 +16980,9 @@ function j_({ agentId: e, addonId: t, deviceId: n, containerDeviceId: r, integra
16969
16980
  R,
16970
16981
  D,
16971
16982
  z,
16972
- ae
16983
+ ie
16973
16984
  ]), pe = o((e) => {
16974
- let t = se.current;
16985
+ let t = oe.current;
16975
16986
  t && (U.current = !0, t.scrollTo({
16976
16987
  top: t.scrollHeight,
16977
16988
  ...e ? { behavior: e } : {}
@@ -16994,19 +17005,19 @@ function j_({ agentId: e, addonId: t, deviceId: n, containerDeviceId: r, integra
16994
17005
  U.current = !1;
16995
17006
  return;
16996
17007
  }
16997
- let e = se.current;
17008
+ let e = oe.current;
16998
17009
  if (!e) return;
16999
17010
  let t = w_(e, 40);
17000
17011
  H((e) => e === t ? e : t);
17001
17012
  }, []), ye = m(() => fe.filter((e) => e.tags && Object.keys(e.tags).length > 0 || e.meta && Object.keys(e.meta).length > 0).map((e) => `${e.timestamp}|${e.level}|${e.scope ?? ""}|${e.message}`), [fe]), be = o(() => {
17002
- G((e) => (e && ie(/* @__PURE__ */ new Set()), !e));
17013
+ G((e) => (e && re(/* @__PURE__ */ new Set()), !e));
17003
17014
  }, []), xe = o(() => {
17004
17015
  let e = fe.map((e) => {
17005
17016
  let t = new Date(e.timestamp).toLocaleTimeString(), n = e.tags ? " " + Object.entries(e.tags).filter(([, e]) => e).map(([e, t]) => `${e}=${t}`).join(" ") : "";
17006
17017
  return `${t} [${e.level.toUpperCase()}]${e.scope ? ` [${e.scope}]` : ""}${n} ${e.message}`;
17007
17018
  });
17008
17019
  navigator.clipboard.writeText(e.join("\n")).then(() => {
17009
- ne(!0), setTimeout(() => ne(!1), 1500);
17020
+ te(!0), setTimeout(() => te(!1), 1500);
17010
17021
  });
17011
17022
  }, [fe]), Se = Z.logs.clear.useMutation(), Ce = o(() => {
17012
17023
  B(Date.now()), L.reset(), Se.mutate(P ? { tags: P } : {});
@@ -17015,7 +17026,7 @@ function j_({ agentId: e, addonId: t, deviceId: n, containerDeviceId: r, integra
17015
17026
  Se,
17016
17027
  P
17017
17028
  ]), we = o((e) => {
17018
- ie((t) => {
17029
+ re((t) => {
17019
17030
  let n = new Set(t);
17020
17031
  return n.has(e) ? n.delete(e) : n.add(e), n;
17021
17032
  });
@@ -17076,7 +17087,7 @@ function j_({ agentId: e, addonId: t, deviceId: n, containerDeviceId: r, integra
17076
17087
  }),
17077
17088
  /* @__PURE__ */ S(F_, {
17078
17089
  icon: jn,
17079
- label: te ? "Copied!" : "Copy",
17090
+ label: K ? "Copied!" : "Copy",
17080
17091
  onClick: xe,
17081
17092
  disabled: fe.length === 0
17082
17093
  }),
@@ -17089,13 +17100,13 @@ function j_({ agentId: e, addonId: t, deviceId: n, containerDeviceId: r, integra
17089
17100
  className: "relative",
17090
17101
  children: [/* @__PURE__ */ S("input", {
17091
17102
  type: "text",
17092
- value: ae,
17093
- onChange: (e) => oe(e.target.value),
17103
+ value: ie,
17104
+ onChange: (e) => ae(e.target.value),
17094
17105
  placeholder: "Search…",
17095
17106
  className: "w-32 pl-1.5 pr-5 py-0.5 rounded border border-border bg-background text-foreground text-[10px] focus:outline-none focus:border-primary/50"
17096
- }), ae && /* @__PURE__ */ S("button", {
17107
+ }), ie && /* @__PURE__ */ S("button", {
17097
17108
  type: "button",
17098
- onClick: () => oe(""),
17109
+ onClick: () => ae(""),
17099
17110
  className: "absolute right-1 top-1/2 -translate-y-1/2 text-foreground-subtle hover:text-foreground",
17100
17111
  title: "Clear search",
17101
17112
  children: /* @__PURE__ */ S(Zr, { className: "h-2.5 w-2.5" })
@@ -17155,7 +17166,7 @@ function j_({ agentId: e, addonId: t, deviceId: n, containerDeviceId: r, integra
17155
17166
  title: "Jump to the newest log line and resume following",
17156
17167
  children: [/* @__PURE__ */ S(an, { className: "h-3 w-3" }), "Jump to latest"]
17157
17168
  }), /* @__PURE__ */ C("div", {
17158
- ref: se,
17169
+ ref: oe,
17159
17170
  onScroll: ve,
17160
17171
  className: X("flex-1 min-h-0 overflow-auto font-mono text-[10px]", d),
17161
17172
  children: [
@@ -17170,7 +17181,7 @@ function j_({ agentId: e, addonId: t, deviceId: n, containerDeviceId: r, integra
17170
17181
  fe.length > 0 && /* @__PURE__ */ S("table", {
17171
17182
  className: "w-full",
17172
17183
  children: /* @__PURE__ */ S("tbody", { children: fe.map((e) => {
17173
- let t = E_[e.level] ?? E_.info, n = t.icon, r = Oe(e), i = W || re.has(r), a = e.tags && Object.keys(e.tags).length > 0, o = e.meta && Object.keys(e.meta).length > 0, s = a || o;
17184
+ let t = E_[e.level] ?? E_.info, n = t.icon, r = Oe(e), i = W || ne.has(r), a = e.tags && Object.keys(e.tags).length > 0, o = e.meta && Object.keys(e.meta).length > 0, s = a || o;
17174
17185
  return /* @__PURE__ */ C("tr", {
17175
17186
  className: X("hover:bg-surface-hover/30 border-b border-border/30", s && "cursor-pointer"),
17176
17187
  onClick: s ? () => we(r) : void 0,
@@ -17328,7 +17339,7 @@ var L_ = {
17328
17339
  label: "Updated"
17329
17340
  },
17330
17341
  [T.AddonStopped]: {
17331
- icon: se,
17342
+ icon: oe,
17332
17343
  color: "bg-foreground-subtle/10 text-foreground-subtle border-border",
17333
17344
  label: "Stopped"
17334
17345
  },
@@ -17403,7 +17414,7 @@ var L_ = {
17403
17414
  label: "Agent Online"
17404
17415
  },
17405
17416
  [T.AgentOffline]: {
17406
- icon: se,
17417
+ icon: oe,
17407
17418
  color: "bg-red-500/15 text-red-400 border-red-500/30",
17408
17419
  label: "Agent Offline"
17409
17420
  },
@@ -17546,35 +17557,35 @@ function K_({ agentId: e, addonId: t, deviceId: n, defaultCategories: r, categor
17546
17557
  t,
17547
17558
  n,
17548
17559
  a
17549
- ]), te = m(() => [...b].toSorted(), [b]), ne = m(() => {
17560
+ ]), K = m(() => [...b].toSorted(), [b]), te = m(() => {
17550
17561
  let e = {
17551
17562
  ...G,
17552
17563
  limit: u
17553
17564
  };
17554
- return te.length > 0 && te.length < z_.length && (e.category = te), e;
17565
+ return K.length > 0 && K.length < z_.length && (e.category = K), e;
17555
17566
  }, [
17556
17567
  G,
17557
17568
  u,
17558
- m(() => te.join(","), [te]),
17559
- te
17560
- ]), { data: re, isLoading: ie } = Z.systemEvents.getRecent.useQuery(ne, { staleTime: 3e4 }), ae = l(b);
17569
+ m(() => K.join(","), [K]),
17570
+ K
17571
+ ]), { data: ne, isLoading: re } = Z.systemEvents.getRecent.useQuery(te, { staleTime: 3e4 }), ie = l(b);
17561
17572
  _(() => {
17562
- ae.current = b;
17573
+ ie.current = b;
17563
17574
  }, [b]);
17564
- let oe = G;
17565
- Z.systemEvents.subscribe.useSubscription(oe, { onData: (r) => {
17575
+ let ae = G;
17576
+ Z.systemEvents.subscribe.useSubscription(ae, { onData: (r) => {
17566
17577
  let i = r;
17567
- i?.id && I_(i, e, t, n) && ae.current.has(i.category) && E.append(i);
17578
+ i?.id && I_(i, e, t, n) && ie.current.has(i.category) && E.append(i);
17568
17579
  } });
17569
- let se = l(D.length);
17580
+ let oe = l(D.length);
17570
17581
  _(() => {
17571
17582
  let e = V.current;
17572
17583
  if (!e) {
17573
- se.current = D.length;
17584
+ oe.current = D.length;
17574
17585
  return;
17575
17586
  }
17576
- let t = se.current;
17577
- if (se.current = D.length, !(D.length <= t)) {
17587
+ let t = oe.current;
17588
+ if (oe.current = D.length, !(D.length <= t)) {
17578
17589
  if (O && e.scrollTop <= 8) e.scrollTo({ top: 0 });
17579
17590
  else if (!O && e.scrollTop > 0) {
17580
17591
  let n = e.firstElementChild?.firstElementChild, r = n instanceof HTMLElement ? n.offsetHeight : 28;
@@ -17582,9 +17593,9 @@ function K_({ agentId: e, addonId: t, deviceId: n, defaultCategories: r, categor
17582
17593
  }
17583
17594
  }
17584
17595
  }, [D.length, O]);
17585
- let K = m(() => {
17596
+ let se = m(() => {
17586
17597
  let e = /* @__PURE__ */ new Map();
17587
- for (let t of re ?? []) e.set(t.id, t);
17598
+ for (let t of ne ?? []) e.set(t.id, t);
17588
17599
  for (let t of D) e.set(t.id, t);
17589
17600
  let t = [...e.values()].filter((e) => b.has(e.category)).filter(W_);
17590
17601
  z > 0 && (t = t.filter((e) => new Date(e.timestamp).getTime() > z));
@@ -17602,7 +17613,7 @@ function K_({ agentId: e, addonId: t, deviceId: n, defaultCategories: r, categor
17602
17613
  return !1;
17603
17614
  })), t.toSorted((e, t) => new Date(t.timestamp).getTime() - new Date(e.timestamp).getTime());
17604
17615
  }, [
17605
- re,
17616
+ ne,
17606
17617
  D,
17607
17618
  b,
17608
17619
  M,
@@ -17625,11 +17636,11 @@ function K_({ agentId: e, addonId: t, deviceId: n, defaultCategories: r, categor
17625
17636
  let t = new Date(e.timestamp).toISOString(), n = U_(e.category, e.data) ?? "", r = n ? ` ${n}` : "";
17626
17637
  return `${t} [${e.category}]${r} data=${JSON.stringify(e.data)}`;
17627
17638
  }, []), ve = o(() => {
17628
- let e = K.map(_e);
17639
+ let e = se.map(_e);
17629
17640
  navigator.clipboard.writeText(e.join("\n")).then(() => {
17630
17641
  me(!0), setTimeout(() => me(!1), 1500);
17631
17642
  });
17632
- }, [K, _e]), ye = o((e) => {
17643
+ }, [se, _e]), ye = o((e) => {
17633
17644
  navigator.clipboard.writeText(_e(e)).then(() => {
17634
17645
  ge(e.id), setTimeout(() => ge((t) => t === e.id ? null : t), 1200);
17635
17646
  });
@@ -17722,8 +17733,8 @@ function K_({ agentId: e, addonId: t, deviceId: n, defaultCategories: r, categor
17722
17733
  /* @__PURE__ */ C("button", {
17723
17734
  type: "button",
17724
17735
  onClick: ve,
17725
- disabled: K.length === 0,
17726
- className: X("inline-flex items-center gap-1 text-[9px] px-1.5 py-0.5 rounded border transition-colors", pe ? "border-emerald-500/30 bg-emerald-500/10 text-emerald-400" : "border-border text-foreground-subtle hover:text-foreground", K.length === 0 && "opacity-40 cursor-not-allowed"),
17736
+ disabled: se.length === 0,
17737
+ className: X("inline-flex items-center gap-1 text-[9px] px-1.5 py-0.5 rounded border transition-colors", pe ? "border-emerald-500/30 bg-emerald-500/10 text-emerald-400" : "border-border text-foreground-subtle hover:text-foreground", se.length === 0 && "opacity-40 cursor-not-allowed"),
17727
17738
  title: "Copy all visible events",
17728
17739
  children: [/* @__PURE__ */ S(jn, { className: "h-2.5 w-2.5" }), pe ? "Copied!" : "Copy"]
17729
17740
  }),
@@ -17762,17 +17773,17 @@ function K_({ agentId: e, addonId: t, deviceId: n, defaultCategories: r, categor
17762
17773
  ref: V,
17763
17774
  className: X("flex-1 min-h-0 overflow-auto text-[10px]", s),
17764
17775
  children: [
17765
- ie && /* @__PURE__ */ C("div", {
17776
+ re && /* @__PURE__ */ C("div", {
17766
17777
  className: "flex items-center justify-center gap-2 py-6 text-foreground-subtle",
17767
17778
  children: [/* @__PURE__ */ S(nr, { className: "h-3.5 w-3.5 animate-spin" }), "Loading events..."]
17768
17779
  }),
17769
- !ie && K.length === 0 && /* @__PURE__ */ S("div", {
17780
+ !re && se.length === 0 && /* @__PURE__ */ S("div", {
17770
17781
  className: "py-4 text-center text-foreground-subtle",
17771
17782
  children: "No events found"
17772
17783
  }),
17773
- K.length > 0 && /* @__PURE__ */ S("div", {
17784
+ se.length > 0 && /* @__PURE__ */ S("div", {
17774
17785
  className: "divide-y divide-border/30",
17775
- children: K.map((e) => {
17786
+ children: se.map((e) => {
17776
17787
  let t = R_(e.category, e.data), n = t.icon, r = U_(e.category, e.data), i = A.has(e.id);
17777
17788
  return /* @__PURE__ */ C("div", {
17778
17789
  className: "flex items-start gap-2 px-3 py-1.5 hover:bg-surface-hover/30 cursor-pointer",
@@ -18213,7 +18224,7 @@ function tv(e, t, n = 5e3) {
18213
18224
  }
18214
18225
  //#endregion
18215
18226
  //#region src/tabs/PipelineTab.tsx
18216
- y(), y(), y(), y(), y(), u(() => import("./MaskShapeCanvas-BDvrLf-K.mjs").then((e) => ({ default: e.MaskShapeCanvas }))), u(() => import("./MotionZonesSettings-DvcXdTmE.mjs").then((e) => ({ default: e.MotionZonesSettings }))), u(() => import("./PrivacyMaskSettings-C43CHdu0.mjs").then((e) => ({ default: e.PrivacyMaskSettings }))), y();
18227
+ y(), y(), y(), y(), y(), u(() => import("./MaskShapeCanvas-BDvrLf-K.mjs").then((e) => ({ default: e.MaskShapeCanvas }))), u(() => import("./MotionZonesSettings-CZWn4uID.mjs").then((e) => ({ default: e.MotionZonesSettings }))), u(() => import("./PrivacyMaskSettings-CCb6_nu9.mjs").then((e) => ({ default: e.PrivacyMaskSettings }))), y();
18217
18228
  function nv(e) {
18218
18229
  return typeof e == "object" && !!e && !Array.isArray(e);
18219
18230
  }
@@ -19446,7 +19457,7 @@ function wv({ trpc: e, nodeId: t }) {
19446
19457
  let [n, r] = c(null), [i, a] = c([]), [s, u] = c(null), [d, f] = c([]), [p, m] = c(""), [h, g] = c(null), [v, y] = c(""), [b, x] = c(null), [w, T] = c({
19447
19458
  w: 640,
19448
19459
  h: 480
19449
- }), [E, D] = c([]), [O, k] = c(!1), [A, j] = c(""), [M, N] = c(null), [P, F] = c(!0), [I, L] = c([]), [ee, R] = c({}), [z, B] = c({}), [V, H] = c(200), [U, W] = c(4), [G, te] = c(1), [ne, re] = c(!1), [ie, ae] = c(null), [oe, se] = c(null), [K, ce] = c(null), le = l(null), [ue, de] = c(/* @__PURE__ */ new Set()), fe = o((e, t) => {
19460
+ }), [E, D] = c([]), [O, k] = c(!1), [A, j] = c(""), [M, N] = c(null), [P, F] = c(!0), [I, L] = c([]), [ee, R] = c({}), [z, B] = c({}), [V, H] = c(200), [U, W] = c(4), [G, K] = c(1), [te, ne] = c(!1), [re, ie] = c(null), [ae, oe] = c(null), [se, ce] = c(null), le = l(null), [ue, de] = c(/* @__PURE__ */ new Set()), fe = o((e, t) => {
19450
19461
  de((n) => {
19451
19462
  let r = new Set(n);
19452
19463
  return t ? r.delete(e) : r.add(e), r;
@@ -19467,7 +19478,7 @@ function wv({ trpc: e, nodeId: t }) {
19467
19478
  } else if (r !== n) return;
19468
19479
  if (t.message) {
19469
19480
  let e = String(t.message);
19470
- L((t) => [...t, e]), i && t.benchProgress && (ae(e), ce({
19481
+ L((t) => [...t, e]), i && t.benchProgress && (ie(e), ce({
19471
19482
  iter: Math.ceil(t.runs / Math.max(1, U)),
19472
19483
  total: V,
19473
19484
  runs: t.runs,
@@ -19570,7 +19581,7 @@ function wv({ trpc: e, nodeId: t }) {
19570
19581
  j("No image loaded");
19571
19582
  return;
19572
19583
  }
19573
- j(""), re(!0), se(n), ae("caching frame…"), ce(null);
19584
+ j(""), ne(!0), oe(n), ie("caching frame…"), ce(null);
19574
19585
  let r = E.map((e) => Sv(e)), i = Cv(z, Object.keys(ee).length > 0), a = `synth-${Date.now().toString(36)}-${Math.random().toString(36).slice(2, 8)}`;
19575
19586
  le.current = a;
19576
19587
  let o = null;
@@ -19582,7 +19593,7 @@ function wv({ trpc: e, nodeId: t }) {
19582
19593
  imageBase64: h,
19583
19594
  ttlSeconds: 600
19584
19595
  }
19585
- })).frameId, ae(`running synthetic bench — ${U} workers × ${V} iters`);
19596
+ })).frameId, ie(`running synthetic bench — ${U} workers × ${V} iters`);
19586
19597
  let s = performance.now(), c = await e.addons.custom.mutate({
19587
19598
  addonId: "pipeline-runner",
19588
19599
  action: "runSyntheticBench",
@@ -19617,11 +19628,11 @@ function wv({ trpc: e, nodeId: t }) {
19617
19628
  fps: c.fps,
19618
19629
  detPerSec: c.detectionsPerSec,
19619
19630
  avgDetections: c.avgDetections
19620
- }), ae(`synthetic — ${c.fps.toFixed(1)} fps · ${c.detectionsPerSec.toFixed(1)} det/s · call ${c.callMs.mean.toFixed(1)}ms p95 ${c.callMs.p95.toFixed(1)}ms · batch ${c.batchSizeMean.toFixed(2)}`);
19631
+ }), ie(`synthetic — ${c.fps.toFixed(1)} fps · ${c.detectionsPerSec.toFixed(1)} det/s · call ${c.callMs.mean.toFixed(1)}ms p95 ${c.callMs.p95.toFixed(1)}ms · batch ${c.batchSizeMean.toFixed(2)}`);
19621
19632
  } catch (e) {
19622
- j(e instanceof Error ? e.message : String(e)), ae(null);
19633
+ j(e instanceof Error ? e.message : String(e)), ie(null);
19623
19634
  } finally {
19624
- re(!1), o && e.addons.custom.mutate({
19635
+ ne(!1), o && e.addons.custom.mutate({
19625
19636
  addonId: "pipeline-runner",
19626
19637
  action: "releaseBenchFrame",
19627
19638
  input: { frameId: o }
@@ -19696,7 +19707,7 @@ function wv({ trpc: e, nodeId: t }) {
19696
19707
  className: "mt-1 w-full px-2 py-2 sm:py-1 text-sm bg-background border border-border rounded",
19697
19708
  value: V,
19698
19709
  onChange: (e) => H(Number(e.target.value)),
19699
- disabled: ne
19710
+ disabled: te
19700
19711
  })]
19701
19712
  }),
19702
19713
  /* @__PURE__ */ C("label", {
@@ -19711,7 +19722,7 @@ function wv({ trpc: e, nodeId: t }) {
19711
19722
  className: "mt-1 w-full px-2 py-2 sm:py-1 text-sm bg-background border border-border rounded",
19712
19723
  value: U,
19713
19724
  onChange: (e) => W(Number(e.target.value)),
19714
- disabled: ne
19725
+ disabled: te
19715
19726
  })]
19716
19727
  }),
19717
19728
  /* @__PURE__ */ C("label", {
@@ -19725,8 +19736,8 @@ function wv({ trpc: e, nodeId: t }) {
19725
19736
  max: 100,
19726
19737
  className: "mt-1 w-full px-2 py-2 sm:py-1 text-sm bg-background border border-border rounded",
19727
19738
  value: G,
19728
- onChange: (e) => te(Number(e.target.value)),
19729
- disabled: ne
19739
+ onChange: (e) => K(Number(e.target.value)),
19740
+ disabled: te
19730
19741
  })]
19731
19742
  })
19732
19743
  ]
@@ -19736,45 +19747,45 @@ function wv({ trpc: e, nodeId: t }) {
19736
19747
  children: [/* @__PURE__ */ S("button", {
19737
19748
  type: "button",
19738
19749
  onClick: () => ge("e2e"),
19739
- disabled: ne || !p && !h,
19750
+ disabled: te || !p && !h,
19740
19751
  title: "End-to-end live camera path: each call ships a full frame through runPipeline → sharp encode → IPC → pool. Measures what production cameras actually see.",
19741
19752
  className: "px-3 py-2.5 sm:py-1.5 text-sm rounded-md border border-primary/40 bg-primary/10 hover:bg-primary hover:text-primary-foreground disabled:opacity-50 transition-colors",
19742
- children: ne && oe === "e2e" ? ie ?? "Running…" : "Run E2E (live path)"
19753
+ children: te && ae === "e2e" ? re ?? "Running…" : "Run E2E (live path)"
19743
19754
  }), /* @__PURE__ */ S("button", {
19744
19755
  type: "button",
19745
19756
  onClick: () => ge("inference"),
19746
- disabled: ne || !p && !h,
19757
+ disabled: te || !p && !h,
19747
19758
  title: "Pure inference: frame cached in pool once, each call sends only a 5-byte reference. Isolates the model.predict() + batching cost — no IPC, no JPEG encode/decode.",
19748
19759
  className: "px-3 py-2.5 sm:py-1.5 text-sm rounded-md border border-border bg-surface hover:bg-primary/10 disabled:opacity-50 transition-colors",
19749
- children: ne && oe === "inference" ? ie ?? "Running…" : "Run Inference Only"
19760
+ children: te && ae === "inference" ? re ?? "Running…" : "Run Inference Only"
19750
19761
  })]
19751
19762
  }),
19752
- !ne && ie && /* @__PURE__ */ S("div", {
19763
+ !te && re && /* @__PURE__ */ S("div", {
19753
19764
  className: "text-[10px] text-foreground-subtle font-mono",
19754
- children: ie
19765
+ children: re
19755
19766
  })
19756
19767
  ]
19757
19768
  }),
19758
- K && /* @__PURE__ */ C("div", {
19769
+ se && /* @__PURE__ */ C("div", {
19759
19770
  className: "rounded-md border border-border bg-surface p-2 space-y-1",
19760
19771
  children: [
19761
19772
  /* @__PURE__ */ C("div", {
19762
19773
  className: "flex items-center justify-between",
19763
19774
  children: [/* @__PURE__ */ C("div", {
19764
19775
  className: "text-[10px] font-medium text-foreground-subtle uppercase tracking-wide",
19765
- children: [ne ? "Live stats" : "Final stats", oe && /* @__PURE__ */ S("span", {
19766
- className: `ml-2 px-1.5 py-0.5 rounded text-[9px] font-mono ${oe === "e2e" ? "bg-primary/20 text-primary" : "bg-foreground/10 text-foreground-subtle"}`,
19767
- children: oe === "e2e" ? "E2E" : "INFER ONLY"
19776
+ children: [te ? "Live stats" : "Final stats", ae && /* @__PURE__ */ S("span", {
19777
+ className: `ml-2 px-1.5 py-0.5 rounded text-[9px] font-mono ${ae === "e2e" ? "bg-primary/20 text-primary" : "bg-foreground/10 text-foreground-subtle"}`,
19778
+ children: ae === "e2e" ? "E2E" : "INFER ONLY"
19768
19779
  })]
19769
19780
  }), /* @__PURE__ */ C("div", {
19770
19781
  className: "text-[10px] font-mono text-foreground-subtle",
19771
19782
  children: [
19772
19783
  "iter ",
19773
- K.iter,
19784
+ se.iter,
19774
19785
  "/",
19775
- K.total,
19786
+ se.total,
19776
19787
  " · ",
19777
- K.runs,
19788
+ se.runs,
19778
19789
  " runs"
19779
19790
  ]
19780
19791
  })]
@@ -19787,7 +19798,7 @@ function wv({ trpc: e, nodeId: t }) {
19787
19798
  " ",
19788
19799
  /* @__PURE__ */ S("span", {
19789
19800
  className: "text-primary font-semibold",
19790
- children: K.fps.toFixed(1)
19801
+ children: se.fps.toFixed(1)
19791
19802
  })
19792
19803
  ] }),
19793
19804
  /* @__PURE__ */ C("div", { children: [
@@ -19795,20 +19806,20 @@ function wv({ trpc: e, nodeId: t }) {
19795
19806
  " ",
19796
19807
  /* @__PURE__ */ S("span", {
19797
19808
  className: "text-primary font-semibold",
19798
- children: K.detPerSec.toFixed(1)
19809
+ children: se.detPerSec.toFixed(1)
19799
19810
  })
19800
19811
  ] }),
19801
19812
  /* @__PURE__ */ C("div", { children: [
19802
19813
  "call mean: ",
19803
- K.meanMs.toFixed(1),
19814
+ se.meanMs.toFixed(1),
19804
19815
  " ms"
19805
19816
  ] }),
19806
19817
  /* @__PURE__ */ C("div", { children: [
19807
19818
  "p95: ",
19808
- K.p95Ms.toFixed(1),
19819
+ se.p95Ms.toFixed(1),
19809
19820
  " ms"
19810
19821
  ] }),
19811
- /* @__PURE__ */ C("div", { children: ["avg det/frame: ", K.avgDetections.toFixed(2)] }),
19822
+ /* @__PURE__ */ C("div", { children: ["avg det/frame: ", se.avgDetections.toFixed(2)] }),
19812
19823
  /* @__PURE__ */ C("div", { children: ["parallel: ", U] })
19813
19824
  ]
19814
19825
  }),
@@ -19825,24 +19836,24 @@ function wv({ trpc: e, nodeId: t }) {
19825
19836
  " ",
19826
19837
  /* @__PURE__ */ S("span", {
19827
19838
  className: "text-primary font-semibold",
19828
- children: K.inferMeanMs.toFixed(1)
19839
+ children: se.inferMeanMs.toFixed(1)
19829
19840
  }),
19830
19841
  " ",
19831
19842
  "ms"
19832
19843
  ] }),
19833
19844
  /* @__PURE__ */ C("div", { children: [
19834
19845
  "decode: ",
19835
- K.decodeMeanMs.toFixed(1),
19846
+ se.decodeMeanMs.toFixed(1),
19836
19847
  " ms"
19837
19848
  ] }),
19838
19849
  /* @__PURE__ */ C("div", { children: [
19839
19850
  "↳ preprocess: ",
19840
- K.preprocessMeanMs.toFixed(1),
19851
+ se.preprocessMeanMs.toFixed(1),
19841
19852
  " ms"
19842
19853
  ] }),
19843
19854
  /* @__PURE__ */ C("div", { children: [
19844
19855
  "setup: ",
19845
- K.setupMeanMs.toFixed(1),
19856
+ se.setupMeanMs.toFixed(1),
19846
19857
  " ms"
19847
19858
  ] }),
19848
19859
  /* @__PURE__ */ C("div", { children: [
@@ -19850,17 +19861,17 @@ function wv({ trpc: e, nodeId: t }) {
19850
19861
  " ",
19851
19862
  /* @__PURE__ */ S("span", {
19852
19863
  className: "text-primary font-semibold",
19853
- children: K.predictMeanMs.toFixed(1)
19864
+ children: se.predictMeanMs.toFixed(1)
19854
19865
  }),
19855
19866
  " ",
19856
19867
  "ms"
19857
19868
  ] }),
19858
19869
  /* @__PURE__ */ C("div", { children: [
19859
19870
  "transport: ",
19860
- K.transportMeanMs.toFixed(1),
19871
+ se.transportMeanMs.toFixed(1),
19861
19872
  " ms"
19862
19873
  ] }),
19863
- /* @__PURE__ */ C("div", { children: ["batch: ", K.batchSizeMean.toFixed(2)] })
19874
+ /* @__PURE__ */ C("div", { children: ["batch: ", se.batchSizeMean.toFixed(2)] })
19864
19875
  ]
19865
19876
  })]
19866
19877
  })
@@ -20485,7 +20496,7 @@ function Dv(e, t) {
20485
20496
  }
20486
20497
  }
20487
20498
  function Ov({ trpc: e, nodeId: t }) {
20488
- let [n, r] = c([]), [i, a] = c(""), [o, s] = c(3), [u, d] = c(25), [f, p] = c("jpeg"), [m, h] = c("duration"), [g, v] = c(60), [y, b] = c(1e3), [x, w] = c(15), [T, E] = c(2e3), [D, O] = c(5), [k, A] = c(20), [j] = c("decoder-nodeav"), [M, N] = c(""), [P, F] = c(""), [I] = c(0), [L, ee] = c(null), [R, z] = c(!1), [B, V] = c(""), [H, U] = c(null), [W, G] = c("idle"), [te, ne] = c(null), [re, ie] = c(!0), ae = l(null);
20499
+ let [n, r] = c([]), [i, a] = c(""), [o, s] = c(3), [u, d] = c(25), [f, p] = c("jpeg"), [m, h] = c("duration"), [g, v] = c(60), [y, b] = c(1e3), [x, w] = c(15), [T, E] = c(2e3), [D, O] = c(5), [k, A] = c(20), [j] = c("decoder-nodeav"), [M, N] = c(""), [P, F] = c(""), [I] = c(0), [L, ee] = c(null), [R, z] = c(!1), [B, V] = c(""), [H, U] = c(null), [W, G] = c("idle"), [K, te] = c(null), [ne, re] = c(!0), ie = l(null);
20489
20500
  return _(() => {
20490
20501
  e.addons.custom.mutate({
20491
20502
  addonId: "benchmark",
@@ -20493,9 +20504,9 @@ function Ov({ trpc: e, nodeId: t }) {
20493
20504
  input: void 0
20494
20505
  }).then((e) => {
20495
20506
  let t = e;
20496
- r(t), t.length > 0 && a(t[0].filename), ie(!1);
20507
+ r(t), t.length > 0 && a(t[0].filename), re(!1);
20497
20508
  }).catch((e) => {
20498
- console.warn("[benchmark:decoder] listDecoderFixtures failed:", e), ie(!1);
20509
+ console.warn("[benchmark:decoder] listDecoderFixtures failed:", e), re(!1);
20499
20510
  });
20500
20511
  }, [e]), _(() => {
20501
20512
  e.addonSettings.getGlobalSettings.query({
@@ -20519,7 +20530,7 @@ function Ov({ trpc: e, nodeId: t }) {
20519
20530
  onData: (e) => {
20520
20531
  let t = typeof e.data == "object" && e.data !== null ? e.data : e;
20521
20532
  if (t.kind !== "decoder-perf") return;
20522
- let n = ae.current;
20533
+ let n = ie.current;
20523
20534
  if (!n || t.sessionId !== n) return;
20524
20535
  typeof t.phase == "string" && G(t.phase);
20525
20536
  let r = t.sample;
@@ -20536,7 +20547,7 @@ function Ov({ trpc: e, nodeId: t }) {
20536
20547
  return () => {
20537
20548
  t?.();
20538
20549
  };
20539
- }, [e]), re ? /* @__PURE__ */ S("div", {
20550
+ }, [e]), ne ? /* @__PURE__ */ S("div", {
20540
20551
  className: "text-sm text-foreground-subtle animate-pulse py-8 text-center",
20541
20552
  children: "Loading fixtures..."
20542
20553
  }) : /* @__PURE__ */ C("div", {
@@ -20773,9 +20784,9 @@ function Ov({ trpc: e, nodeId: t }) {
20773
20784
  children: [/* @__PURE__ */ S("button", {
20774
20785
  type: "button",
20775
20786
  onClick: async () => {
20776
- V(""), ne(null), U(null), G("init");
20787
+ V(""), te(null), U(null), G("init");
20777
20788
  let r = `decoder-${Date.now()}-${Math.random().toString(36).slice(2, 10)}`;
20778
- ae.current = r, z(!0);
20789
+ ie.current = r, z(!0);
20779
20790
  let a = L || M || P || "none", s = {
20780
20791
  sessionId: r,
20781
20792
  nodeId: t,
@@ -20808,7 +20819,7 @@ function Ov({ trpc: e, nodeId: t }) {
20808
20819
  action: "runDecoderPerformanceTest",
20809
20820
  input: s
20810
20821
  });
20811
- if (ne(t), t.verdict !== "error" && !t.aborted) {
20822
+ if (te(t), t.verdict !== "error" && !t.aborted) {
20812
20823
  let r = n.find((e) => e.filename === i);
20813
20824
  await e.addons.custom.mutate({
20814
20825
  addonId: "benchmark",
@@ -20835,7 +20846,7 @@ function Ov({ trpc: e, nodeId: t }) {
20835
20846
  } catch (e) {
20836
20847
  V(e instanceof Error ? e.message : String(e));
20837
20848
  } finally {
20838
- ae.current = null, z(!1);
20849
+ ie.current = null, z(!1);
20839
20850
  }
20840
20851
  },
20841
20852
  disabled: R || !i,
@@ -20844,7 +20855,7 @@ function Ov({ trpc: e, nodeId: t }) {
20844
20855
  }), R && /* @__PURE__ */ S("button", {
20845
20856
  type: "button",
20846
20857
  onClick: async () => {
20847
- let t = ae.current;
20858
+ let t = ie.current;
20848
20859
  if (t) try {
20849
20860
  await e.addons.custom.mutate({
20850
20861
  addonId: "benchmark",
@@ -20913,7 +20924,7 @@ function Ov({ trpc: e, nodeId: t }) {
20913
20924
  children: "No samples yet."
20914
20925
  })
20915
20926
  ]
20916
- }), te && /* @__PURE__ */ C("div", {
20927
+ }), K && /* @__PURE__ */ C("div", {
20917
20928
  className: "rounded-md border border-border bg-surface p-3 space-y-2",
20918
20929
  children: [
20919
20930
  /* @__PURE__ */ C("div", {
@@ -20921,43 +20932,43 @@ function Ov({ trpc: e, nodeId: t }) {
20921
20932
  children: [/* @__PURE__ */ S("h3", {
20922
20933
  className: "text-sm font-semibold",
20923
20934
  children: "Verdict"
20924
- }), /* @__PURE__ */ S(kv, { verdict: te.verdict })]
20935
+ }), /* @__PURE__ */ S(kv, { verdict: K.verdict })]
20925
20936
  }),
20926
- te.errorMessage && /* @__PURE__ */ S("div", {
20937
+ K.errorMessage && /* @__PURE__ */ S("div", {
20927
20938
  className: "text-xs text-destructive",
20928
- children: te.errorMessage
20939
+ children: K.errorMessage
20929
20940
  }),
20930
20941
  /* @__PURE__ */ C("div", {
20931
20942
  className: "grid grid-cols-2 gap-x-3 gap-y-1 text-xs font-mono",
20932
20943
  children: [
20933
20944
  /* @__PURE__ */ C("div", { children: [
20934
20945
  "rss slope: ",
20935
- te.slopes.rssMBMin.toFixed(2),
20946
+ K.slopes.rssMBMin.toFixed(2),
20936
20947
  " MB/min"
20937
20948
  ] }),
20938
20949
  /* @__PURE__ */ C("div", { children: [
20939
20950
  "heap slope: ",
20940
- te.slopes.heapMBMin.toFixed(2),
20951
+ K.slopes.heapMBMin.toFixed(2),
20941
20952
  " MB/min"
20942
20953
  ] }),
20943
20954
  /* @__PURE__ */ C("div", { children: [
20944
20955
  "ext slope: ",
20945
- te.slopes.externalMBMin.toFixed(2),
20956
+ K.slopes.externalMBMin.toFixed(2),
20946
20957
  " MB/min"
20947
20958
  ] }),
20948
20959
  /* @__PURE__ */ C("div", { children: [
20949
20960
  "wall: ",
20950
- te.totals.wallSec.toFixed(1),
20961
+ K.totals.wallSec.toFixed(1),
20951
20962
  " s"
20952
20963
  ] }),
20953
- /* @__PURE__ */ C("div", { children: ["frames: ", te.totals.framesEmitted] }),
20954
- /* @__PURE__ */ C("div", { children: ["fps/cam: ", te.totals.fpsPerCamera.toFixed(1)] }),
20964
+ /* @__PURE__ */ C("div", { children: ["frames: ", K.totals.framesEmitted] }),
20965
+ /* @__PURE__ */ C("div", { children: ["fps/cam: ", K.totals.fpsPerCamera.toFixed(1)] }),
20955
20966
  /* @__PURE__ */ C("div", { children: [
20956
20967
  "cpu avg: ",
20957
- te.totals.cpuAvgPct.toFixed(0),
20968
+ K.totals.cpuAvgPct.toFixed(0),
20958
20969
  "%"
20959
20970
  ] }),
20960
- /* @__PURE__ */ C("div", { children: ["dropped: ", te.totals.droppedFrames] })
20971
+ /* @__PURE__ */ C("div", { children: ["dropped: ", K.totals.droppedFrames] })
20961
20972
  ]
20962
20973
  })
20963
20974
  ]