@camstack/addon-post-analysis 1.2.367 → 1.2.369

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (15) hide show
  1. package/dist/{clip-model-registry-vU1x2Lyf.mjs → clip-model-registry-C_-tWzrX.mjs} +20900 -2300
  2. package/dist/{clip-model-registry-4RExEITD.js → clip-model-registry-E4CGZ8NR.js} +20904 -2298
  3. package/dist/embedding-encoder/index.js +1 -1
  4. package/dist/embedding-encoder/index.mjs +1 -1
  5. package/dist/pipeline-analytics/_stub.js +97 -97
  6. package/dist/pipeline-analytics/{_virtual_mf-localSharedImportMap___mfe_internal__addon_pipeline_analytics_widgets-DQnRVBZI.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_pipeline_analytics_widgets-Bac17NNv.mjs} +2 -2
  7. package/dist/pipeline-analytics/_virtual_mf___mfe_internal__addon_pipeline_analytics_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-DOGD-EFh.mjs +26 -0
  8. package/dist/pipeline-analytics/_virtual_mf___mfe_internal__addon_pipeline_analytics_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-Bb1tsxlC.mjs +26 -0
  9. package/dist/pipeline-analytics/{hostInit-D-t5Eh-v.mjs → hostInit-CMFNXHOl.mjs} +2 -2
  10. package/dist/pipeline-analytics/index.js +12 -3
  11. package/dist/pipeline-analytics/index.mjs +12 -3
  12. package/dist/pipeline-analytics/remoteEntry.js +1 -1
  13. package/package.json +1 -1
  14. package/dist/pipeline-analytics/_virtual_mf___mfe_internal__addon_pipeline_analytics_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-vq8Jf6ja.mjs +0 -26
  15. package/dist/pipeline-analytics/_virtual_mf___mfe_internal__addon_pipeline_analytics_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-rBUOVUOg.mjs +0 -26
@@ -2,7 +2,7 @@ Object.defineProperties(exports, {
2
2
  __esModule: { value: true },
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
- const require_clip_model_registry = require("../clip-model-registry-4RExEITD.js");
5
+ const require_clip_model_registry = require("../clip-model-registry-E4CGZ8NR.js");
6
6
  let node_fs = require("node:fs");
7
7
  node_fs = require_clip_model_registry.__toESM(node_fs);
8
8
  let node_path = require("node:path");
@@ -1,4 +1,4 @@
1
- import { $n as embeddingEncoderCapability, Ci as BaseAddon, Gr as resolvePoolMemoryPolicy, Pr as parseProcStatus, Qt as PoolMemoryWatchdog, a as CLIP_EMBEDDING_STEP_ID, c as resolveClusterModelPin, er as embeddingModelFailedError, i as CLIP_TEXT_MODELS, ji as normalizeNodeId, n as DEFAULT_CLIP_MODEL, nr as embeddingRequirementsFailedError, r as CLIP_IMAGE_MODELS, rr as embeddingRequirementsUnavailableError, t as BUILTIN_CLIP_MODELS } from "../clip-model-registry-vU1x2Lyf.mjs";
1
+ import { Fr as parseProcStatus, Kr as resolvePoolMemoryPolicy, Mi as normalizeNodeId, Qt as PoolMemoryWatchdog, a as CLIP_EMBEDDING_STEP_ID, c as resolveClusterModelPin, er as embeddingEncoderCapability, i as CLIP_TEXT_MODELS, ir as embeddingRequirementsUnavailableError, n as DEFAULT_CLIP_MODEL, r as CLIP_IMAGE_MODELS, rr as embeddingRequirementsFailedError, t as BUILTIN_CLIP_MODELS, tr as embeddingModelFailedError, wi as BaseAddon } from "../clip-model-registry-C_-tWzrX.mjs";
2
2
  import { createRequire } from "node:module";
3
3
  import * as fs from "node:fs";
4
4
  import * as path$1 from "node:path";
@@ -1,8 +1,8 @@
1
1
  import { a as e, i as t, n, o as r, r as i, t as a } from "./_virtual_mf___mfe_internal__addon_pipeline_analytics_widgets__loadShare__react__loadShare__.js-C0AuF9av.mjs";
2
2
  import { t as o } from "./_virtual_mf___mfe_internal__addon_pipeline_analytics_widgets__loadShare___mf_0_tanstack_mf_1_react_mf_2_query__loadShare__.js-B3Wx5J80.mjs";
3
- import { a as s, i as c, n as l, o as u, r as d, s as f, t as p } from "./_virtual_mf___mfe_internal__addon_pipeline_analytics_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-rBUOVUOg.mjs";
3
+ import { a as s, i as c, n as l, o as u, r as d, s as f, t as p } from "./_virtual_mf___mfe_internal__addon_pipeline_analytics_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-Bb1tsxlC.mjs";
4
4
  import { n as m, r as h, t as g } from "./_virtual_mf___mfe_internal__addon_pipeline_analytics_widgets__loadShare__react_mf_1_jsx_mf_2_runtime__loadShare__.js-Bm-iyjmq.mjs";
5
- import { t as _ } from "./_virtual_mf___mfe_internal__addon_pipeline_analytics_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-vq8Jf6ja.mjs";
5
+ import { t as _ } from "./_virtual_mf___mfe_internal__addon_pipeline_analytics_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-DOGD-EFh.mjs";
6
6
  //#region ../../node_modules/lucide-react/dist/esm/shared/src/utils/mergeClasses.js
7
7
  var v = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e) === t).join(" ").trim(), y = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), b = (e) => e.replace(/^([A-Z])|[\s-_]+(\w)/g, (e, t, n) => n ? n.toUpperCase() : t.toLowerCase()), x = (e) => {
8
8
  let t = b(e);
@@ -243,7 +243,7 @@ function I() {
243
243
  bindHover: t
244
244
  };
245
245
  }
246
- function L({ state: e, containerWidth: t }) {
246
+ function ie({ state: e, containerWidth: t }) {
247
247
  if (!e) return null;
248
248
  let n = Math.max(114, t - 110 - 4), r = Math.max(114, Math.min(n, e.anchorX)), i = e.anchorX - r;
249
249
  return /* @__PURE__ */ h("div", {
@@ -290,7 +290,7 @@ function L({ state: e, containerWidth: t }) {
290
290
  }
291
291
  //#endregion
292
292
  //#region src/pipeline-analytics/widgets/AudioHistoryChart.tsx
293
- var ie = {
293
+ var L = {
294
294
  "5m": {
295
295
  label: "5 min",
296
296
  windowSec: 300,
@@ -312,15 +312,15 @@ var ie = {
312
312
  }, ae = [
313
313
  {
314
314
  id: "5m",
315
- label: ie["5m"].label
315
+ label: L["5m"].label
316
316
  },
317
317
  {
318
318
  id: "1h",
319
- label: ie["1h"].label
319
+ label: L["1h"].label
320
320
  },
321
321
  {
322
322
  id: "24h",
323
- label: ie["24h"].label
323
+ label: L["24h"].label
324
324
  }
325
325
  ], R = 140, z = {
326
326
  top: 16,
@@ -339,11 +339,11 @@ function se(e) {
339
339
  return e ? oe[e.toLowerCase()] ?? "#6366f1" : "#71717a";
340
340
  }
341
341
  function ce({ deviceId: n }) {
342
- let i = s(l().trpcClient, n), [a, c] = r("5m"), u = ie[a], [d, f] = P(), p = I(), _ = e(null), v = (e) => {
342
+ let i = p(c().trpcClient, n), [a, s] = r("5m"), l = L[a], [u, d] = P(), f = I(), _ = e(null), v = (e) => {
343
343
  let t = _.current;
344
344
  if (!t) return e;
345
345
  let n = t.getBoundingClientRect();
346
- return n.width === 0 ? e : e / f * n.width;
346
+ return n.width === 0 ? e : e / d * n.width;
347
347
  }, y = o({
348
348
  queryKey: [
349
349
  "audio-metrics",
@@ -352,21 +352,21 @@ function ce({ deviceId: n }) {
352
352
  a
353
353
  ],
354
354
  queryFn: async () => i ? await i.audioMetrics?.getHistory({
355
- windowSec: u.windowSec,
356
- sampleEveryMs: u.sampleEveryMs
355
+ windowSec: l.windowSec,
356
+ sampleEveryMs: l.sampleEveryMs
357
357
  }) ?? null : null,
358
358
  enabled: !!i,
359
- refetchInterval: u.pollIntervalMs,
360
- staleTime: Math.max(1e3, u.pollIntervalMs / 2)
361
- }), b = y.data, x = b?.points ?? [], S = t(() => pe(x), [x]), C = t(() => de(x, f, S), [
359
+ refetchInterval: l.pollIntervalMs,
360
+ staleTime: Math.max(1e3, l.pollIntervalMs / 2)
361
+ }), b = y.data, x = b?.points ?? [], S = t(() => pe(x), [x]), C = t(() => de(x, d, S), [
362
362
  x,
363
- f,
363
+ d,
364
364
  S
365
- ]), w = t(() => fe(x, f, S), [
365
+ ]), w = t(() => fe(x, d, S), [
366
366
  x,
367
- f,
367
+ d,
368
368
  S
369
- ]), T = t(() => me(S), [S]), D = t(() => he(x, f), [x, f]);
369
+ ]), T = t(() => me(S), [S]), D = t(() => he(x, d), [x, d]);
370
370
  return /* @__PURE__ */ h("div", {
371
371
  className: "rounded-lg border border-border bg-surface overflow-hidden",
372
372
  children: [/* @__PURE__ */ h("div", {
@@ -380,28 +380,28 @@ function ce({ deviceId: n }) {
380
380
  }), /* @__PURE__ */ m(N, {
381
381
  presets: ae,
382
382
  value: a,
383
- onChange: c
383
+ onChange: s
384
384
  })]
385
385
  }), /* @__PURE__ */ h("div", {
386
- ref: d,
386
+ ref: u,
387
387
  className: "p-3 min-w-0 relative",
388
388
  children: [x.length === 0 ? /* @__PURE__ */ m("div", {
389
389
  className: "flex items-center justify-center h-32 text-[11px] text-foreground-subtle italic",
390
390
  children: y.isLoading ? "Loading…" : "No audio history yet — analytics pipeline must be active."
391
- }) : f === 0 ? /* @__PURE__ */ m("div", { className: "h-32" }) : /* @__PURE__ */ h(g, { children: [/* @__PURE__ */ h("svg", {
391
+ }) : d === 0 ? /* @__PURE__ */ m("div", { className: "h-32" }) : /* @__PURE__ */ h(g, { children: [/* @__PURE__ */ h("svg", {
392
392
  ref: _,
393
393
  role: "img",
394
394
  "aria-label": "Audio dBFS history",
395
395
  width: "100%",
396
396
  height: R,
397
- viewBox: `0 0 ${f} ${R}`,
397
+ viewBox: `0 0 ${d} ${R}`,
398
398
  preserveAspectRatio: "none",
399
399
  className: "block",
400
- onMouseLeave: () => p.bindHover(null),
400
+ onMouseLeave: () => f.bindHover(null),
401
401
  children: [
402
402
  T.map(({ y: e, label: t }, n) => /* @__PURE__ */ h("g", { children: [/* @__PURE__ */ m("line", {
403
403
  x1: z.left,
404
- x2: f - z.right,
404
+ x2: d - z.right,
405
405
  y1: e,
406
406
  y2: e,
407
407
  stroke: "currentColor",
@@ -437,7 +437,7 @@ function ce({ deviceId: n }) {
437
437
  strokeWidth: 1.5
438
438
  }),
439
439
  x.map((e, t) => e.topClass === null ? null : /* @__PURE__ */ m("circle", {
440
- cx: B(t, x.length, f),
440
+ cx: B(t, x.length, d),
441
441
  cy: le(e.dbfs, S),
442
442
  r: 3,
443
443
  fill: se(e.topClass),
@@ -446,7 +446,7 @@ function ce({ deviceId: n }) {
446
446
  strokeWidth: .5
447
447
  }, `dot-${t}`)),
448
448
  x.map((e, t) => {
449
- let n = B(t, x.length, f), r = le(e.dbfs, S), i = R - z.top - z.bottom, a = x.length > 1 ? (f - z.left - z.right) / (x.length - 1) : 24;
449
+ let n = B(t, x.length, d), r = le(e.dbfs, S), i = R - z.top - z.bottom, a = x.length > 1 ? (d - z.left - z.right) / (x.length - 1) : 24;
450
450
  return /* @__PURE__ */ m("rect", {
451
451
  x: n - a / 2,
452
452
  y: z.top,
@@ -454,7 +454,7 @@ function ce({ deviceId: n }) {
454
454
  height: i,
455
455
  fill: "transparent",
456
456
  onMouseEnter: () => {
457
- p.bindHover({
457
+ f.bindHover({
458
458
  anchorX: v(n),
459
459
  anchorY: r,
460
460
  title: `${ge(e.ts)} · ${e.dbfs?.toFixed(1) ?? "—"} dB`,
@@ -478,15 +478,15 @@ function ce({ deviceId: n }) {
478
478
  }, `hit-${t}`);
479
479
  })
480
480
  ]
481
- }), /* @__PURE__ */ m(L, {
482
- state: p.state,
483
- containerWidth: f
481
+ }), /* @__PURE__ */ m(ie, {
482
+ state: f.state,
483
+ containerWidth: d
484
484
  })] }), x.length > 0 && /* @__PURE__ */ h("div", {
485
485
  className: "flex items-center justify-between text-[10px] text-foreground-subtle mt-1",
486
486
  children: [/* @__PURE__ */ h("span", { children: [
487
487
  x.length,
488
488
  " samples · ~",
489
- Math.round((b?.effectiveSampleEveryMs ?? u.sampleEveryMs) / 1e3),
489
+ Math.round((b?.effectiveSampleEveryMs ?? l.sampleEveryMs) / 1e3),
490
490
  "s spacing"
491
491
  ] }), /* @__PURE__ */ h("span", { children: [
492
492
  "peak ",
@@ -577,7 +577,7 @@ function _e(e) {
577
577
  return !Number.isFinite(e) || e <= 0 ? 60 : Math.round(e > 600 ? e / 1e3 : e);
578
578
  }
579
579
  function ve({ dev: e, deviceId: t, title: n = "Audio Metrics", variant: r = "full" }) {
580
- let i = u(l().trpcClient, e === void 0 && t !== void 0 ? t : null, (e) => e.audioMetrics), a = f(e ? e.state.audioMetrics : void 0), o = e === void 0 ? i : a;
580
+ let i = l(c().trpcClient, e === void 0 && t !== void 0 ? t : null, (e) => e.audioMetrics), a = d(e ? e.state.audioMetrics : void 0), o = e === void 0 ? i : a;
581
581
  return o ? /* @__PURE__ */ m(ye, {
582
582
  title: n,
583
583
  variant: r,
@@ -793,34 +793,34 @@ var we = 5 * 6e4, V = {
793
793
  left: 32
794
794
  }, W = "__all__";
795
795
  function Ee({ deviceId: n }) {
796
- let a = s(l().trpcClient, n), [c, u] = r("24h"), [d, p] = r(W), v = V[c], [y, b] = P(), x = I(), S = e(null), C = (e) => {
796
+ let a = p(c().trpcClient, n), [s, l] = r("24h"), [u, f] = r(W), v = V[s], [y, b] = P(), x = I(), S = e(null), C = (e) => {
797
797
  let t = S.current;
798
798
  if (!t) return e;
799
799
  let n = t.getBoundingClientRect();
800
800
  return n.width === 0 ? e : e / b * n.width;
801
- }, w = f(a?.state.zoneAnalytics), T = t(() => {
801
+ }, w = d(a?.state.zoneAnalytics), T = t(() => {
802
802
  let e = /* @__PURE__ */ new Set();
803
803
  if (w?.frame.byClass) for (let t of Object.keys(w.frame.byClass)) e.add(t);
804
804
  if (w?.zones) for (let t of w.zones) for (let n of Object.keys(t.byClass)) e.add(n);
805
805
  return [...e].toSorted();
806
806
  }, [w]);
807
807
  i(() => {
808
- d !== W && !T.includes(d) && p(W);
809
- }, [d, T]);
808
+ u !== W && !T.includes(u) && f(W);
809
+ }, [u, T]);
810
810
  let E = o({
811
811
  queryKey: [
812
812
  "pipeline-analytics",
813
813
  n,
814
814
  "occupancyLts",
815
- c,
816
- d
815
+ s,
816
+ u
817
817
  ],
818
818
  queryFn: async () => {
819
819
  if (!a) return [];
820
820
  let e = Date.now(), t = Math.floor((e - v.windowMs) / we) * we;
821
821
  return (await a.pipelineAnalytics?.readLongTermSeries({
822
822
  series: "occupancy",
823
- scope: d === W ? _() : _(void 0, d),
823
+ scope: u === W ? _() : _(void 0, u),
824
824
  from: t,
825
825
  to: e
826
826
  }) ?? []).map((e) => ({
@@ -857,8 +857,8 @@ function Ee({ deviceId: n }) {
857
857
  }), /* @__PURE__ */ h("div", {
858
858
  className: "flex items-center gap-2",
859
859
  children: [T.length > 0 && /* @__PURE__ */ h("select", {
860
- value: d,
861
- onChange: (e) => p(e.target.value),
860
+ value: u,
861
+ onChange: (e) => f(e.target.value),
862
862
  className: "text-[10px] px-1.5 py-0.5 rounded border border-border bg-background text-foreground focus:outline-none focus:ring-1 focus:ring-primary/40",
863
863
  title: "Filter by detected class",
864
864
  children: [/* @__PURE__ */ m("option", {
@@ -870,8 +870,8 @@ function Ee({ deviceId: n }) {
870
870
  }, e))]
871
871
  }), /* @__PURE__ */ m(N, {
872
872
  presets: Te,
873
- value: c,
874
- onChange: u
873
+ value: s,
874
+ onChange: l
875
875
  })]
876
876
  })]
877
877
  }), /* @__PURE__ */ h("div", {
@@ -941,7 +941,7 @@ function Ee({ deviceId: n }) {
941
941
  title: `${Ae(e.ts)} · ${e.count} object${e.count === 1 ? "" : "s"}`,
942
942
  rows: [{
943
943
  label: "Class",
944
- value: d === W ? "all" : d
944
+ value: u === W ? "all" : u
945
945
  }, {
946
946
  label: "Bucket",
947
947
  value: "5 min"
@@ -951,7 +951,7 @@ function Ee({ deviceId: n }) {
951
951
  })] }, `${e.ts}-${t}`);
952
952
  })
953
953
  ]
954
- }), /* @__PURE__ */ m(L, {
954
+ }), /* @__PURE__ */ m(ie, {
955
955
  state: x.state,
956
956
  containerWidth: b
957
957
  })] }), D.length > 0 && /* @__PURE__ */ h("div", {
@@ -1039,11 +1039,11 @@ var G = {
1039
1039
  left: 32
1040
1040
  };
1041
1041
  function Ne({ deviceId: n }) {
1042
- let i = s(l().trpcClient, n), [a, c] = r("1h"), u = G[a], [d, f] = P(), p = I(), _ = e(null), v = (e) => {
1042
+ let i = p(c().trpcClient, n), [a, s] = r("1h"), l = G[a], [u, d] = P(), f = I(), _ = e(null), v = (e) => {
1043
1043
  let t = _.current;
1044
1044
  if (!t) return e;
1045
1045
  let n = t.getBoundingClientRect();
1046
- return n.width === 0 ? e : e / f * n.width;
1046
+ return n.width === 0 ? e : e / d * n.width;
1047
1047
  }, y = o({
1048
1048
  queryKey: [
1049
1049
  "pipeline-analytics",
@@ -1053,28 +1053,28 @@ function Ne({ deviceId: n }) {
1053
1053
  ],
1054
1054
  queryFn: async () => {
1055
1055
  if (!i) return [];
1056
- let e = Date.now() - u.windowMs;
1056
+ let e = Date.now() - l.windowMs;
1057
1057
  return await i.pipelineAnalytics?.getMotionEvents({
1058
1058
  since: e,
1059
1059
  limit: Me
1060
1060
  }) ?? [];
1061
1061
  },
1062
1062
  enabled: !!i,
1063
- refetchInterval: u.pollIntervalMs,
1064
- staleTime: Math.max(1e3, u.pollIntervalMs / 2)
1065
- }), b = y.data ?? [], x = y.dataUpdatedAt > 0 ? y.dataUpdatedAt : Date.now(), S = x - u.windowMs, C = t(() => Pe(b, S, x, u.bucketMs), [
1063
+ refetchInterval: l.pollIntervalMs,
1064
+ staleTime: Math.max(1e3, l.pollIntervalMs / 2)
1065
+ }), b = y.data ?? [], x = y.dataUpdatedAt > 0 ? y.dataUpdatedAt : Date.now(), S = x - l.windowMs, C = t(() => Pe(b, S, x, l.bucketMs), [
1066
1066
  b,
1067
1067
  S,
1068
1068
  x,
1069
- u.bucketMs
1069
+ l.bucketMs
1070
1070
  ]), w = t(() => {
1071
1071
  if (C.length === 0) return 1;
1072
1072
  let e = C.reduce((e, t) => Math.max(e, t.count), 0);
1073
1073
  return Math.max(1, Math.ceil(e * 1.15));
1074
- }, [C]), T = t(() => te(S, x, f, q.left, q.right, 5), [
1074
+ }, [C]), T = t(() => te(S, x, d, q.left, q.right, 5), [
1075
1075
  S,
1076
1076
  x,
1077
- f
1077
+ d
1078
1078
  ]), D = t(() => Ie(w), [w]), O = b.length;
1079
1079
  return /* @__PURE__ */ h("div", {
1080
1080
  className: "rounded-lg border border-border bg-surface overflow-hidden",
@@ -1089,28 +1089,28 @@ function Ne({ deviceId: n }) {
1089
1089
  }), /* @__PURE__ */ m(N, {
1090
1090
  presets: je,
1091
1091
  value: a,
1092
- onChange: c
1092
+ onChange: s
1093
1093
  })]
1094
1094
  }), /* @__PURE__ */ h("div", {
1095
- ref: d,
1095
+ ref: u,
1096
1096
  className: "p-3 min-w-0 relative",
1097
1097
  children: [O === 0 ? /* @__PURE__ */ m("div", {
1098
1098
  className: "flex items-center justify-center h-32 text-[11px] text-foreground-subtle italic",
1099
1099
  children: y.isLoading ? "Loading…" : "No motion events in the selected window."
1100
- }) : f === 0 ? /* @__PURE__ */ m("div", { className: "h-32" }) : /* @__PURE__ */ h(g, { children: [/* @__PURE__ */ h("svg", {
1100
+ }) : d === 0 ? /* @__PURE__ */ m("div", { className: "h-32" }) : /* @__PURE__ */ h(g, { children: [/* @__PURE__ */ h("svg", {
1101
1101
  ref: _,
1102
1102
  role: "img",
1103
1103
  "aria-label": "Motion event histogram",
1104
1104
  width: "100%",
1105
1105
  height: K,
1106
- viewBox: `0 0 ${f} ${K}`,
1106
+ viewBox: `0 0 ${d} ${K}`,
1107
1107
  preserveAspectRatio: "none",
1108
1108
  className: "block",
1109
- onMouseLeave: () => p.bindHover(null),
1109
+ onMouseLeave: () => f.bindHover(null),
1110
1110
  children: [
1111
1111
  D.map(({ y: e, label: t }, n) => /* @__PURE__ */ h("g", { children: [/* @__PURE__ */ m("line", {
1112
1112
  x1: q.left,
1113
- x2: f - q.right,
1113
+ x2: d - q.right,
1114
1114
  y1: e,
1115
1115
  y2: e,
1116
1116
  stroke: "currentColor",
@@ -1131,7 +1131,7 @@ function Ne({ deviceId: n }) {
1131
1131
  children: t
1132
1132
  }, `x-${n}`)),
1133
1133
  C.map((e, t) => {
1134
- let { x: n, w: r } = Fe(e.bucketStart, u.bucketMs, S, x, f), i = K - q.top - q.bottom, a = e.count / w * i, o = q.top + (i - a), s = e.bucketStart + u.bucketMs;
1134
+ let { x: n, w: r } = Fe(e.bucketStart, l.bucketMs, S, x, d), i = K - q.top - q.bottom, a = e.count / w * i, o = q.top + (i - a), s = e.bucketStart + l.bucketMs;
1135
1135
  return /* @__PURE__ */ h("g", { children: [e.count > 0 && /* @__PURE__ */ m("rect", {
1136
1136
  x: n,
1137
1137
  y: o,
@@ -1147,13 +1147,13 @@ function Ne({ deviceId: n }) {
1147
1147
  height: i,
1148
1148
  fill: "transparent",
1149
1149
  onMouseEnter: () => {
1150
- p.bindHover({
1150
+ f.bindHover({
1151
1151
  anchorX: v(n + r / 2),
1152
1152
  anchorY: o,
1153
1153
  title: `${Le(e.bucketStart, s)} · ${e.count} event${e.count === 1 ? "" : "s"}`,
1154
1154
  rows: [{
1155
1155
  label: "Bucket",
1156
- value: Re(u.bucketMs)
1156
+ value: Re(l.bucketMs)
1157
1157
  }, {
1158
1158
  label: "Count",
1159
1159
  value: `${e.count}`
@@ -1163,9 +1163,9 @@ function Ne({ deviceId: n }) {
1163
1163
  })] }, `${e.bucketStart}-${t}`);
1164
1164
  })
1165
1165
  ]
1166
- }), /* @__PURE__ */ m(L, {
1167
- state: p.state,
1168
- containerWidth: f
1166
+ }), /* @__PURE__ */ m(ie, {
1167
+ state: f.state,
1168
+ containerWidth: d
1169
1169
  })] }), O > 0 && /* @__PURE__ */ h("div", {
1170
1170
  className: "flex items-center justify-between text-[10px] text-foreground-subtle mt-1",
1171
1171
  children: [/* @__PURE__ */ h("span", { children: [
@@ -1173,7 +1173,7 @@ function Ne({ deviceId: n }) {
1173
1173
  " event",
1174
1174
  O === 1 ? "" : "s",
1175
1175
  " · ",
1176
- Re(u.bucketMs),
1176
+ Re(l.bucketMs),
1177
1177
  " ",
1178
1178
  "buckets"
1179
1179
  ] }), /* @__PURE__ */ h("span", { children: [
@@ -1268,41 +1268,41 @@ var J = {
1268
1268
  left: 32
1269
1269
  };
1270
1270
  function He({ deviceId: n }) {
1271
- let a = s(l().trpcClient, n), [c, u] = r("1h"), [d, f] = r(X), p = J[c], [_, v] = P(), y = I(), b = e(null), x = o({
1271
+ let a = p(c().trpcClient, n), [s, l] = r("1h"), [u, d] = r(X), f = J[s], [_, v] = P(), y = I(), b = e(null), x = o({
1272
1272
  queryKey: [
1273
1273
  "pipeline-analytics",
1274
1274
  n,
1275
1275
  "objectEvents",
1276
- c
1276
+ s
1277
1277
  ],
1278
1278
  queryFn: async () => {
1279
1279
  if (!a) return [];
1280
- let e = Date.now() - p.windowMs;
1280
+ let e = Date.now() - f.windowMs;
1281
1281
  return await a.pipelineAnalytics?.getObjectEvents({
1282
1282
  since: e,
1283
1283
  limit: Be
1284
1284
  }) ?? [];
1285
1285
  },
1286
1286
  enabled: !!a,
1287
- refetchInterval: p.pollIntervalMs,
1288
- staleTime: Math.max(1e3, p.pollIntervalMs / 2)
1289
- }), S = x.data ?? [], C = t(() => d === X ? S : S.filter((e) => e.className === d), [S, d]), w = x.dataUpdatedAt > 0 ? x.dataUpdatedAt : Date.now(), T = w - p.windowMs, E = t(() => {
1287
+ refetchInterval: f.pollIntervalMs,
1288
+ staleTime: Math.max(1e3, f.pollIntervalMs / 2)
1289
+ }), S = x.data ?? [], C = t(() => u === X ? S : S.filter((e) => e.className === u), [S, u]), w = x.dataUpdatedAt > 0 ? x.dataUpdatedAt : Date.now(), T = w - f.windowMs, E = t(() => {
1290
1290
  let e = /* @__PURE__ */ new Set();
1291
1291
  for (let t of S) e.add(t.className);
1292
- return d !== X && e.add(d), [...e].toSorted();
1293
- }, [S, d]);
1292
+ return u !== X && e.add(u), [...e].toSorted();
1293
+ }, [S, u]);
1294
1294
  i(() => {
1295
- d !== X && S.length > 0 && !E.includes(d) && f(X);
1295
+ u !== X && S.length > 0 && !E.includes(u) && d(X);
1296
1296
  }, [
1297
- d,
1297
+ u,
1298
1298
  S,
1299
1299
  E
1300
1300
  ]);
1301
- let D = t(() => Ue(C, Ve), [C]), k = t(() => We(C, T, w, p.bucketMs, D), [
1301
+ let D = t(() => Ue(C, Ve), [C]), k = t(() => We(C, T, w, f.bucketMs, D), [
1302
1302
  C,
1303
1303
  T,
1304
1304
  w,
1305
- p.bucketMs,
1305
+ f.bucketMs,
1306
1306
  D
1307
1307
  ]), A = t(() => {
1308
1308
  if (k.length === 0) return 1;
@@ -1334,8 +1334,8 @@ function He({ deviceId: n }) {
1334
1334
  }), /* @__PURE__ */ h("div", {
1335
1335
  className: "flex items-center gap-2",
1336
1336
  children: [E.length > 0 && /* @__PURE__ */ h("select", {
1337
- value: d,
1338
- onChange: (e) => f(e.target.value),
1337
+ value: u,
1338
+ onChange: (e) => d(e.target.value),
1339
1339
  className: "text-[10px] px-1.5 py-0.5 rounded border border-border bg-background text-foreground focus:outline-none focus:ring-1 focus:ring-primary/40",
1340
1340
  title: "Filter by detected class",
1341
1341
  children: [/* @__PURE__ */ m("option", {
@@ -1347,8 +1347,8 @@ function He({ deviceId: n }) {
1347
1347
  }, e))]
1348
1348
  }), /* @__PURE__ */ m(N, {
1349
1349
  presets: ze,
1350
- value: c,
1351
- onChange: u
1350
+ value: s,
1351
+ onChange: l
1352
1352
  })]
1353
1353
  })]
1354
1354
  }), /* @__PURE__ */ h("div", {
@@ -1393,7 +1393,7 @@ function He({ deviceId: n }) {
1393
1393
  }, `x-${n}`)),
1394
1394
  k.map((e, t) => {
1395
1395
  if (e.total === 0) return null;
1396
- let { x: n, w: r } = Ge(e.bucketStart, p.bucketMs, T, w, v), i = Z - Q.top - Q.bottom, a = e.total / A * i, o = Q.top + (i - a), s = 0, c = F.map((t, a) => {
1396
+ let { x: n, w: r } = Ge(e.bucketStart, f.bucketMs, T, w, v), i = Z - Q.top - Q.bottom, a = e.total / A * i, o = Q.top + (i - a), s = 0, c = F.map((t, a) => {
1397
1397
  let o = e.byClass[t] ?? 0;
1398
1398
  if (o === 0) return null;
1399
1399
  let c = o / A * i, l = Q.top + (i - s - c);
@@ -1407,7 +1407,7 @@ function He({ deviceId: n }) {
1407
1407
  fill: u,
1408
1408
  opacity: .9
1409
1409
  }, `${e.bucketStart}-${t}`);
1410
- }).filter((e) => e !== null), l = e.bucketStart + p.bucketMs;
1410
+ }).filter((e) => e !== null), l = e.bucketStart + f.bucketMs;
1411
1411
  return /* @__PURE__ */ h("g", { children: [c, /* @__PURE__ */ m("rect", {
1412
1412
  x: n,
1413
1413
  y: Q.top,
@@ -1418,7 +1418,7 @@ function He({ deviceId: n }) {
1418
1418
  y.bindHover({
1419
1419
  anchorX: ee(n + r / 2),
1420
1420
  anchorY: o,
1421
- title: `${qe(e.bucketStart, l, p.bucketMs)} · ${e.total} detection${e.total === 1 ? "" : "s"}`,
1421
+ title: `${qe(e.bucketStart, l, f.bucketMs)} · ${e.total} detection${e.total === 1 ? "" : "s"}`,
1422
1422
  rows: F.map((t, n) => {
1423
1423
  let r = e.byClass[t] ?? 0;
1424
1424
  return r === 0 ? null : {
@@ -1433,7 +1433,7 @@ function He({ deviceId: n }) {
1433
1433
  })
1434
1434
  ]
1435
1435
  }),
1436
- /* @__PURE__ */ m(L, {
1436
+ /* @__PURE__ */ m(ie, {
1437
1437
  state: y.state,
1438
1438
  containerWidth: v
1439
1439
  }),
@@ -1446,7 +1446,7 @@ function He({ deviceId: n }) {
1446
1446
  C.length === 1 ? "" : "s",
1447
1447
  " ·",
1448
1448
  " ",
1449
- Je(p.bucketMs),
1449
+ Je(f.bucketMs),
1450
1450
  " buckets"
1451
1451
  ] }), /* @__PURE__ */ h("span", { children: [
1452
1452
  "peak ",
@@ -1526,7 +1526,7 @@ function Ye({ stackOrder: e }) {
1526
1526
  //#endregion
1527
1527
  //#region src/pipeline-analytics/widgets/OccupancyPanel.tsx
1528
1528
  function Xe({ dev: e, deviceId: t, title: n = "Live Occupancy", variant: r = "full" }) {
1529
- let i = s(l().trpcClient, e === void 0 && t !== void 0 ? t : null), a = e ?? i, o = f(a?.state.zoneAnalytics);
1529
+ let i = p(c().trpcClient, e === void 0 && t !== void 0 ? t : null), a = e ?? i, o = d(a?.state.zoneAnalytics);
1530
1530
  return o ? /* @__PURE__ */ m(Ze, {
1531
1531
  title: n,
1532
1532
  variant: r,
@@ -1669,37 +1669,37 @@ function rt({ byClass: e }) {
1669
1669
  //#region src/pipeline-analytics/widgets/LiveStatsTab.tsx
1670
1670
  function it({ deviceId: e }) {
1671
1671
  return /* @__PURE__ */ h("div", {
1672
- className: d,
1672
+ className: u,
1673
1673
  children: [
1674
1674
  /* @__PURE__ */ h("div", {
1675
- className: `grid ${p}`,
1675
+ className: `grid ${s}`,
1676
1676
  style: { gridTemplateColumns: "repeat(auto-fit, minmax(min(100%, 340px), 1fr))" },
1677
- children: [/* @__PURE__ */ m(c, {
1677
+ children: [/* @__PURE__ */ m(f, {
1678
1678
  widgetId: "pipeline-analytics/live-occupancy-panel",
1679
1679
  host: "device-tab",
1680
1680
  deviceId: e
1681
- }), /* @__PURE__ */ m(c, {
1681
+ }), /* @__PURE__ */ m(f, {
1682
1682
  widgetId: "pipeline-analytics/audio-metrics-panel",
1683
1683
  host: "device-tab",
1684
1684
  deviceId: e
1685
1685
  })]
1686
1686
  }),
1687
- /* @__PURE__ */ m(c, {
1687
+ /* @__PURE__ */ m(f, {
1688
1688
  widgetId: "pipeline-analytics/audio-history-chart",
1689
1689
  host: "device-tab",
1690
1690
  deviceId: e
1691
1691
  }),
1692
- /* @__PURE__ */ m(c, {
1692
+ /* @__PURE__ */ m(f, {
1693
1693
  widgetId: "pipeline-analytics/occupancy-history-chart",
1694
1694
  host: "device-tab",
1695
1695
  deviceId: e
1696
1696
  }),
1697
- /* @__PURE__ */ m(c, {
1697
+ /* @__PURE__ */ m(f, {
1698
1698
  widgetId: "pipeline-analytics/motion-history-chart",
1699
1699
  host: "device-tab",
1700
1700
  deviceId: e
1701
1701
  }),
1702
- /* @__PURE__ */ m(c, {
1702
+ /* @__PURE__ */ m(f, {
1703
1703
  widgetId: "pipeline-analytics/detection-history-chart",
1704
1704
  host: "device-tab",
1705
1705
  deviceId: e
@@ -18,7 +18,7 @@ var e = {
18
18
  },
19
19
  "@camstack/types": {
20
20
  name: "@camstack/types",
21
- version: "1.2.362",
21
+ version: "1.2.364",
22
22
  scope: ["default"],
23
23
  loaded: !1,
24
24
  from: "addon_pipeline_analytics_widgets",
@@ -33,7 +33,7 @@ var e = {
33
33
  },
34
34
  "@camstack/ui-library": {
35
35
  name: "@camstack/ui-library",
36
- version: "1.2.285",
36
+ version: "1.2.287",
37
37
  scope: ["default"],
38
38
  loaded: !1,
39
39
  from: "addon_pipeline_analytics_widgets",