@camstack/addon-training 0.1.41 → 0.1.42

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 (33) hide show
  1. package/dist/{MotionZonesSettings-DBtAXpEm.mjs → MotionZonesSettings-DZgoN8V_.mjs} +55 -55
  2. package/dist/{PrivacyMaskSettings-C3tyM8s9.mjs → PrivacyMaskSettings-7L2OX3dp.mjs} +82 -86
  3. package/dist/{SceneMonitorEditor-D6Q3z17B.mjs → SceneMonitorEditor-CwULmLkP.mjs} +318 -339
  4. package/dist/_stub.js +5170 -9054
  5. package/dist/{_virtual_mf-localSharedImportMap___mfe_internal__addon_training_page-CHYHBYUh.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_training_page-DzsEYUgl.mjs} +3 -3
  6. package/dist/_virtual_mf___mfe_internal__addon_training_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-LhaXEy4l.mjs +26 -0
  7. package/dist/addon-training.css +1 -1
  8. package/dist/chevron-right-D3StkdcR.mjs +10 -0
  9. package/dist/createLucideIcon-CPP1Jzoz.mjs +44 -0
  10. package/dist/{dist-CbTzxq0W.mjs → dist-BtEl1kYQ.mjs} +47970 -29426
  11. package/dist/{dist-CJXTMYT2.js → dist-wRpOWEq6.js} +47970 -29426
  12. package/dist/{grid-2x2-tkDBCRad.mjs → grid-2x2-Yngdckwo.mjs} +1 -1
  13. package/dist/{hostInit-GIXFhqMx.mjs → hostInit-1OJB0wPE.mjs} +2 -2
  14. package/dist/icons-C4_Ji5S0.mjs +27953 -0
  15. package/dist/index.js +1 -1
  16. package/dist/mic-off-DPNSd6G7.mjs +32 -0
  17. package/dist/orchestrator/training.addon.js +1 -1
  18. package/dist/orchestrator/training.addon.mjs +1 -1
  19. package/dist/{player-overlays-DMLlEwmn.mjs → player-overlays-CqD89xkd.mjs} +21 -28
  20. package/dist/providers/modal/training-modal.addon.js +1 -1
  21. package/dist/providers/modal/training-modal.addon.mjs +1 -1
  22. package/dist/remoteEntry.js +1 -1
  23. package/dist/responsive-Dwyuxd3q.mjs +84 -0
  24. package/dist/rotate-ccw-Dak-lXgZ.mjs +52 -0
  25. package/dist/{scene-monitor-copy-B-6xPmDm.mjs → scene-monitor-copy-DX2u-htD.mjs} +40 -91
  26. package/dist/settings-2-Cgiv3kQb.mjs +25 -0
  27. package/dist/{square-D49AvsjC.mjs → square-B_679zIX.mjs} +4 -29
  28. package/dist/{trash-2-BwTJ2h2p.mjs → trash-2-DC8LDYlI.mjs} +1 -1
  29. package/dist/{virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_training_page__remoteEntry_js-B3ZFopEz.mjs → virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_training_page__remoteEntry_js-D0zbWJUR.mjs} +1 -1
  30. package/dist/zoom-out-BJoVDYa3.mjs +2729 -0
  31. package/package.json +1 -1
  32. package/dist/_virtual_mf___mfe_internal__addon_training_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-NCFNuw0Q.mjs +0 -26
  33. package/dist/responsive-C0tM8Z6S.mjs +0 -126
@@ -1,39 +1,18 @@
1
1
  import { S as e, _ as t, c as n, g as r, m as i, u as a } from "./_virtual_mf___mfe_internal__addon_training_page__loadShare__react__loadShare__.js-DeDbF7NI.mjs";
2
- import { _ as o, b as s, f as c, h as l, m as u, v as d } from "./responsive-C0tM8Z6S.mjs";
3
- import { a as f, c as p, d as m, i as h, l as g, n as _, o as v, r as y, s as b, t as x, u as S } from "./scene-monitor-copy-B-6xPmDm.mjs";
4
- import { t as C } from "./trash-2-BwTJ2h2p.mjs";
5
- import { n as w, r as T, t as E } from "./_virtual_mf___mfe_internal__addon_training_page__loadShare__react_mf_1_jsx_mf_2_runtime__loadShare__.js-DnrbBvrw.mjs";
6
- import { MaskShapeCanvas as D } from "./MaskShapeCanvas-Kfg9dl6B.mjs";
7
- var O = s("settings-2", [
8
- ["path", {
9
- d: "M14 17H5",
10
- key: "gfn3mx"
11
- }],
12
- ["path", {
13
- d: "M19 7h-9",
14
- key: "6i9tg"
15
- }],
16
- ["circle", {
17
- cx: "17",
18
- cy: "17",
19
- r: "3",
20
- key: "18b49y"
21
- }],
22
- ["circle", {
23
- cx: "7",
24
- cy: "7",
25
- r: "3",
26
- key: "dfmy0x"
27
- }]
28
- ]);
29
- //#endregion
2
+ import { n as o, r as s, t as c } from "./rotate-ccw-Dak-lXgZ.mjs";
3
+ import { t as l } from "./settings-2-Cgiv3kQb.mjs";
4
+ import { t as u } from "./trash-2-DC8LDYlI.mjs";
5
+ import { _ as d, f, h as p, m, v as h } from "./responsive-Dwyuxd3q.mjs";
6
+ import { n as g, r as _, t as v } from "./_virtual_mf___mfe_internal__addon_training_page__loadShare__react_mf_1_jsx_mf_2_runtime__loadShare__.js-DnrbBvrw.mjs";
7
+ import { a as ee, c as y, i as b, n as te, o as x, r as S, s as ne, t as re } from "./scene-monitor-copy-DX2u-htD.mjs";
8
+ import { MaskShapeCanvas as C } from "./MaskShapeCanvas-Kfg9dl6B.mjs";
30
9
  //#region ../ui-library/src/composites/cap-settings/SceneReferenceGallery.tsx
31
10
  e();
32
- var k = p("/addon/pipeline-analytics/event-media");
33
- function A(e) {
34
- return `${k}/m/${e}`;
11
+ var w = y("/addon/pipeline-analytics/event-media");
12
+ function T(e) {
13
+ return `${w}/m/${e}`;
35
14
  }
36
- function j(e) {
15
+ function E(e) {
37
16
  let t = /* @__PURE__ */ new Map();
38
17
  for (let n of e.states) n.references.forEach((e, r) => {
39
18
  let i = t.get(e.condition) ?? [];
@@ -48,45 +27,45 @@ function j(e) {
48
27
  tiles: [...t].sort((e, t) => t.reference.capturedAt - e.reference.capturedAt)
49
28
  })).sort((e, t) => e.condition.localeCompare(t.condition));
50
29
  }
51
- function M(e) {
30
+ function D(e) {
52
31
  return e.states.reduce((e, t) => e + t.references.length, 0);
53
32
  }
54
- var N = "rounded border border-danger/50 bg-danger/10 px-1 py-0.5 text-[10px] font-medium text-danger hover:bg-danger/20 disabled:opacity-40 transition-colors";
55
- function ee({ monitor: e, disabled: n, onDelete: r }) {
56
- let i = j(e), a = M(e), [o, s] = t(null);
57
- return i.length === 0 ? /* @__PURE__ */ w("p", {
58
- className: `${c} leading-relaxed`,
33
+ var O = "rounded border border-danger/50 bg-danger/10 px-1 py-0.5 text-[10px] font-medium text-danger hover:bg-danger/20 disabled:opacity-40 transition-colors";
34
+ function k({ monitor: e, disabled: n, onDelete: r }) {
35
+ let i = E(e), a = D(e), [o, s] = t(null);
36
+ return i.length === 0 ? /* @__PURE__ */ g("p", {
37
+ className: `${f} leading-relaxed`,
59
38
  children: "No photographs captured yet. Press “Capture daylight” to take the one this scene will judge everything against."
60
- }) : /* @__PURE__ */ w("div", {
39
+ }) : /* @__PURE__ */ g("div", {
61
40
  className: "flex flex-col gap-2",
62
- children: i.map((e) => /* @__PURE__ */ T("div", {
41
+ children: i.map((e) => /* @__PURE__ */ _("div", {
63
42
  className: "flex flex-col gap-1",
64
- children: [/* @__PURE__ */ T("p", {
43
+ children: [/* @__PURE__ */ _("p", {
65
44
  className: "text-[10px] font-semibold uppercase tracking-wide text-foreground-subtle",
66
45
  children: [
67
- v(e.condition),
46
+ x(e.condition),
68
47
  " · ",
69
48
  e.tiles.length
70
49
  ]
71
- }), /* @__PURE__ */ w("ul", {
50
+ }), /* @__PURE__ */ g("ul", {
72
51
  className: "flex flex-wrap gap-1.5",
73
52
  children: e.tiles.map((t) => {
74
- let i = `${t.stateId}:${String(t.index)}`, l = a === 1, u = o === i;
75
- return /* @__PURE__ */ T("li", {
53
+ let i = `${t.stateId}:${String(t.index)}`, c = a === 1, l = o === i;
54
+ return /* @__PURE__ */ _("li", {
76
55
  className: "flex w-24 flex-col gap-1 rounded-md border border-border p-1",
77
56
  children: [
78
- /* @__PURE__ */ w(P, { reference: t.reference }),
79
- /* @__PURE__ */ w("span", {
80
- className: `${c} tabular-nums`,
81
- children: F(t.reference.capturedAt)
57
+ /* @__PURE__ */ g(A, { reference: t.reference }),
58
+ /* @__PURE__ */ g("span", {
59
+ className: `${f} tabular-nums`,
60
+ children: j(t.reference.capturedAt)
82
61
  }),
83
- /* @__PURE__ */ T("button", {
62
+ /* @__PURE__ */ _("button", {
84
63
  type: "button",
85
- className: N,
64
+ className: O,
86
65
  disabled: n,
87
- "aria-label": `Delete the ${v(e.condition).toLowerCase()} photograph from ${F(t.reference.capturedAt)}`,
66
+ "aria-label": `Delete the ${x(e.condition).toLowerCase()} photograph from ${j(t.reference.capturedAt)}`,
88
67
  onClick: () => {
89
- if (l && !u) {
68
+ if (c && !l) {
90
69
  s(i);
91
70
  return;
92
71
  }
@@ -95,9 +74,9 @@ function ee({ monitor: e, disabled: n, onDelete: r }) {
95
74
  index: t.index
96
75
  });
97
76
  },
98
- children: [/* @__PURE__ */ w(C, { className: "mr-1 inline h-3 w-3" }), u ? "Confirm" : "Delete"]
77
+ children: [/* @__PURE__ */ g(u, { className: "mr-1 inline h-3 w-3" }), l ? "Confirm" : "Delete"]
99
78
  }),
100
- u && /* @__PURE__ */ w("p", {
79
+ l && /* @__PURE__ */ g("p", {
101
80
  className: "text-[10px] leading-snug text-warning",
102
81
  children: "This is the only photograph this scene has. Delete it and the scene no longer knows what normal looks like — it stops judging until you capture again."
103
82
  })
@@ -108,24 +87,24 @@ function ee({ monitor: e, disabled: n, onDelete: r }) {
108
87
  }, e.condition))
109
88
  });
110
89
  }
111
- function P({ reference: e }) {
90
+ function A({ reference: e }) {
112
91
  let [n, r] = t(!1), i = e.thumbnailMediaId;
113
- return i === void 0 || n ? /* @__PURE__ */ T("div", {
92
+ return i === void 0 || n ? /* @__PURE__ */ _("div", {
114
93
  className: "flex h-16 w-full flex-col items-center justify-center gap-0.5 rounded bg-surface text-foreground-subtle",
115
94
  title: "The picture for this reference is no longer stored. The reference itself is intact and still being scored against.",
116
- children: [/* @__PURE__ */ w(S, { className: "h-4 w-4" }), /* @__PURE__ */ w("span", {
95
+ children: [/* @__PURE__ */ g(o, { className: "h-4 w-4" }), /* @__PURE__ */ g("span", {
117
96
  className: "text-[9px]",
118
97
  children: "no picture"
119
98
  })]
120
- }) : /* @__PURE__ */ w("img", {
121
- src: A(i),
99
+ }) : /* @__PURE__ */ g("img", {
100
+ src: T(i),
122
101
  alt: "",
123
102
  loading: "lazy",
124
103
  className: "h-16 w-full rounded object-cover",
125
104
  onError: () => r(!0)
126
105
  });
127
106
  }
128
- function F(e) {
107
+ function j(e) {
129
108
  let t = new Date(e);
130
109
  return `${t.toLocaleDateString()} ${t.toLocaleTimeString([], {
131
110
  hour: "2-digit",
@@ -135,15 +114,15 @@ function F(e) {
135
114
  //#endregion
136
115
  //#region ../ui-library/src/composites/cap-settings/SceneSettingsForm.tsx
137
116
  e();
138
- var I = "rounded-md border border-border bg-surface px-2 py-1 text-[11px] text-foreground focus:border-primary focus:outline-none disabled:opacity-50", L = "text-[10px] font-medium text-foreground-subtle", R = "flex flex-col gap-2 rounded-md border border-border bg-surface/40 p-2", z = "text-[10px] font-semibold uppercase tracking-wide text-foreground-subtle", B = 5, V = 3600, H = {
117
+ var M = "rounded-md border border-border bg-surface px-2 py-1 text-[11px] text-foreground focus:border-primary focus:outline-none disabled:opacity-50", N = "text-[10px] font-medium text-foreground-subtle", P = "flex flex-col gap-2 rounded-md border border-border bg-surface/40 p-2", F = "text-[10px] font-semibold uppercase tracking-wide text-foreground-subtle", I = 5, L = 3600, R = {
139
118
  periodic: "Only on the clock. Predictable, and it notices a change even on a camera nothing ever moves in front of.",
140
119
  "on-motion": "Only after the camera has been still again for the quiet window below. Cheapest, but a change nobody walks past is never seen.",
141
120
  both: "Both — the clock is the safety net that lets the motion path miss. This is the right answer for almost every scene."
142
- }, U = {
121
+ }, z = {
143
122
  skip: "Sit that light out. No verdict, no alarm, no flag touched — it picks itself back up when a light it knows returns. This is why the night capture is optional.",
144
123
  "judge-anyway": "Compare against the references you do have. Only correct when the two lights genuinely look alike (a floodlit driveway, an indoor lamp) — against a real infrared frame it will report a change that did not happen."
145
124
  };
146
- function W(e) {
125
+ function B(e) {
147
126
  return {
148
127
  label: e.label,
149
128
  checkIntervalSec: e.checkIntervalSec ?? 60,
@@ -154,389 +133,389 @@ function W(e) {
154
133
  confirmPrompt: e.confirm?.prompt ?? ""
155
134
  };
156
135
  }
157
- function G({ monitor: e, disabled: n, onPatch: r }) {
158
- let [i, o] = t(() => W(e)), [s, l] = t(!1);
136
+ function V({ monitor: e, disabled: n, onPatch: r }) {
137
+ let [i, o] = t(() => B(e)), [s, c] = t(!1);
159
138
  a(() => {
160
- s || o(W(e));
139
+ s || o(B(e));
161
140
  }, [e, s]);
162
- let u = (e) => {
163
- l(!1), r(e);
164
- }, d = (t) => e.check.mode === "similarity" ? {
141
+ let l = (e) => {
142
+ c(!1), r(e);
143
+ }, u = (t) => e.check.mode === "similarity" ? {
165
144
  mode: "similarity",
166
145
  threshold: t.threshold ?? e.check.threshold,
167
146
  hysteresisCount: t.hysteresisCount ?? e.check.hysteresisCount
168
147
  } : {
169
148
  ...e.check,
170
149
  hysteresisCount: t.hysteresisCount ?? e.check.hysteresisCount
171
- }, f = e.confirm?.enabled === !0, p = e.check.mode === "similarity" ? e.check.threshold : null;
172
- return /* @__PURE__ */ T("div", {
150
+ }, d = e.confirm?.enabled === !0, p = e.check.mode === "similarity" ? e.check.threshold : null;
151
+ return /* @__PURE__ */ _("div", {
173
152
  className: "flex flex-col gap-2",
174
153
  children: [
175
- /* @__PURE__ */ T("div", {
176
- className: R,
154
+ /* @__PURE__ */ _("div", {
155
+ className: P,
177
156
  children: [
178
- /* @__PURE__ */ w("p", {
179
- className: z,
157
+ /* @__PURE__ */ g("p", {
158
+ className: F,
180
159
  children: "What it watches"
181
160
  }),
182
- /* @__PURE__ */ T("label", {
161
+ /* @__PURE__ */ _("label", {
183
162
  className: "flex flex-col gap-1",
184
- children: [/* @__PURE__ */ w("span", {
185
- className: L,
163
+ children: [/* @__PURE__ */ g("span", {
164
+ className: N,
186
165
  children: "Name"
187
- }), /* @__PURE__ */ w("input", {
166
+ }), /* @__PURE__ */ g("input", {
188
167
  type: "text",
189
168
  value: i.label,
190
169
  disabled: n,
191
- className: I,
192
- onFocus: () => l(!0),
170
+ className: M,
171
+ onFocus: () => c(!0),
193
172
  onChange: (e) => o((t) => ({
194
173
  ...t,
195
174
  label: e.target.value
196
175
  })),
197
176
  onBlur: () => {
198
177
  let t = i.label.trim();
199
- t.length > 0 && t !== e.label ? u({ label: t }) : l(!1);
178
+ t.length > 0 && t !== e.label ? l({ label: t }) : c(!1);
200
179
  }
201
180
  })]
202
181
  }),
203
- /* @__PURE__ */ T("label", {
182
+ /* @__PURE__ */ _("label", {
204
183
  className: "flex items-center gap-2",
205
- children: [/* @__PURE__ */ w("input", {
184
+ children: [/* @__PURE__ */ g("input", {
206
185
  type: "checkbox",
207
186
  checked: e.enabled,
208
187
  disabled: n,
209
- onChange: (e) => u({ enabled: e.target.checked })
210
- }), /* @__PURE__ */ w("span", {
211
- className: L,
188
+ onChange: (e) => l({ enabled: e.target.checked })
189
+ }), /* @__PURE__ */ g("span", {
190
+ className: N,
212
191
  children: "Watching"
213
192
  })]
214
193
  }),
215
- /* @__PURE__ */ w("p", {
216
- className: c,
194
+ /* @__PURE__ */ g("p", {
195
+ className: f,
217
196
  children: "Turned off, the scene keeps its region, its references and its flag — it simply stops checking. Nothing is lost by pausing one for a while."
218
197
  }),
219
- /* @__PURE__ */ T("label", {
198
+ /* @__PURE__ */ _("label", {
220
199
  className: "flex flex-col gap-1",
221
- children: [/* @__PURE__ */ w("span", {
222
- className: L,
200
+ children: [/* @__PURE__ */ g("span", {
201
+ className: N,
223
202
  children: "When to look"
224
- }), /* @__PURE__ */ T("select", {
203
+ }), /* @__PURE__ */ _("select", {
225
204
  value: e.triggerMode,
226
205
  disabled: n,
227
- className: I,
206
+ className: M,
228
207
  onChange: (e) => {
229
208
  let t = e.target.value;
230
- (t === "periodic" || t === "on-motion" || t === "both") && u({ triggerMode: t });
209
+ (t === "periodic" || t === "on-motion" || t === "both") && l({ triggerMode: t });
231
210
  },
232
211
  children: [
233
- /* @__PURE__ */ w("option", {
212
+ /* @__PURE__ */ g("option", {
234
213
  value: "both",
235
214
  children: "On the clock and after motion settles"
236
215
  }),
237
- /* @__PURE__ */ w("option", {
216
+ /* @__PURE__ */ g("option", {
238
217
  value: "periodic",
239
218
  children: "On the clock only"
240
219
  }),
241
- /* @__PURE__ */ w("option", {
220
+ /* @__PURE__ */ g("option", {
242
221
  value: "on-motion",
243
222
  children: "After motion settles only"
244
223
  })
245
224
  ]
246
225
  })]
247
226
  }),
248
- /* @__PURE__ */ w("p", {
249
- className: c,
250
- children: H[e.triggerMode]
227
+ /* @__PURE__ */ g("p", {
228
+ className: f,
229
+ children: R[e.triggerMode]
251
230
  }),
252
- /* @__PURE__ */ T("label", {
231
+ /* @__PURE__ */ _("label", {
253
232
  className: "flex flex-col gap-1",
254
- children: [/* @__PURE__ */ w("span", {
255
- className: L,
233
+ children: [/* @__PURE__ */ g("span", {
234
+ className: N,
256
235
  children: "Check every (seconds)"
257
- }), /* @__PURE__ */ w("input", {
236
+ }), /* @__PURE__ */ g("input", {
258
237
  type: "number",
259
- min: B,
260
- max: V,
238
+ min: I,
239
+ max: L,
261
240
  value: i.checkIntervalSec,
262
241
  disabled: n,
263
- className: I,
264
- onFocus: () => l(!0),
242
+ className: M,
243
+ onFocus: () => c(!0),
265
244
  onChange: (e) => o((t) => ({
266
245
  ...t,
267
246
  checkIntervalSec: Number(e.target.value) || 0
268
247
  })),
269
248
  onBlur: () => {
270
- let t = K(i.checkIntervalSec, B, V);
271
- t === e.checkIntervalSec ? l(!1) : u({ checkIntervalSec: t });
249
+ let t = H(i.checkIntervalSec, I, L);
250
+ t === e.checkIntervalSec ? c(!1) : l({ checkIntervalSec: t });
272
251
  }
273
252
  })]
274
253
  }),
275
- /* @__PURE__ */ w("p", {
276
- className: c,
254
+ /* @__PURE__ */ g("p", {
255
+ className: f,
277
256
  children: "60 s suits “is the bin still out”. Every check costs one photograph and one encode, so going below about 30 s buys latency you almost never need and multiplies the cost by the number of scenes you own."
278
257
  })
279
258
  ]
280
259
  }),
281
- /* @__PURE__ */ T("div", {
282
- className: R,
260
+ /* @__PURE__ */ _("div", {
261
+ className: P,
283
262
  children: [
284
- /* @__PURE__ */ w("p", {
285
- className: z,
263
+ /* @__PURE__ */ g("p", {
264
+ className: F,
286
265
  children: "How sure it has to be"
287
266
  }),
288
- e.check.mode === "similarity" && /* @__PURE__ */ T(E, { children: [/* @__PURE__ */ T("label", {
267
+ e.check.mode === "similarity" && /* @__PURE__ */ _(v, { children: [/* @__PURE__ */ _("label", {
289
268
  className: "flex flex-col gap-1",
290
- children: [/* @__PURE__ */ T("span", {
291
- className: L,
292
- children: ["Match threshold — ", /* @__PURE__ */ w("span", {
269
+ children: [/* @__PURE__ */ _("span", {
270
+ className: N,
271
+ children: ["Match threshold — ", /* @__PURE__ */ g("span", {
293
272
  className: "tabular-nums",
294
273
  children: i.threshold.toFixed(2)
295
274
  })]
296
- }), /* @__PURE__ */ w("input", {
275
+ }), /* @__PURE__ */ g("input", {
297
276
  type: "range",
298
277
  min: .3,
299
278
  max: .99,
300
279
  step: .01,
301
280
  value: i.threshold,
302
281
  disabled: n,
303
- onFocus: () => l(!0),
282
+ onFocus: () => c(!0),
304
283
  onChange: (e) => o((t) => ({
305
284
  ...t,
306
285
  threshold: Number(e.target.value)
307
286
  })),
308
287
  onMouseUp: () => {
309
- i.threshold === p ? l(!1) : u({ check: d({ threshold: i.threshold }) });
288
+ i.threshold === p ? c(!1) : l({ check: u({ threshold: i.threshold }) });
310
289
  },
311
290
  onBlur: () => {
312
- i.threshold === p ? l(!1) : u({ check: d({ threshold: i.threshold }) });
291
+ i.threshold === p ? c(!1) : l({ check: u({ threshold: i.threshold }) });
313
292
  }
314
293
  })]
315
- }), /* @__PURE__ */ w("p", {
294
+ }), /* @__PURE__ */ g("p", {
316
295
  className: "text-[10px] text-foreground-subtle",
317
296
  children: "How closely the region still has to resemble the photograph to count as unchanged. Higher means fussier: at 0.95 a passing cloud can read as a change; at 0.60 the bin can be taken and the scene will shrug. 0.80 is a sensible start — if it cries wolf, lower it; if it misses the thing you care about, raise it."
318
297
  })] }),
319
- /* @__PURE__ */ T("label", {
298
+ /* @__PURE__ */ _("label", {
320
299
  className: "flex flex-col gap-1",
321
- children: [/* @__PURE__ */ w("span", {
322
- className: L,
300
+ children: [/* @__PURE__ */ g("span", {
301
+ className: N,
323
302
  children: "Agreeing checks before it changes its mind"
324
- }), /* @__PURE__ */ w("input", {
303
+ }), /* @__PURE__ */ g("input", {
325
304
  type: "number",
326
305
  min: 1,
327
306
  max: 10,
328
307
  value: i.hysteresisCount,
329
308
  disabled: n,
330
- className: I,
331
- onFocus: () => l(!0),
309
+ className: M,
310
+ onFocus: () => c(!0),
332
311
  onChange: (e) => o((t) => ({
333
312
  ...t,
334
313
  hysteresisCount: Number(e.target.value) || 1
335
314
  })),
336
315
  onBlur: () => {
337
- let t = K(i.hysteresisCount, 1, 10);
338
- t === e.check.hysteresisCount ? l(!1) : u({ check: d({ hysteresisCount: t }) });
316
+ let t = H(i.hysteresisCount, 1, 10);
317
+ t === e.check.hysteresisCount ? c(!1) : l({ check: u({ hysteresisCount: t }) });
339
318
  }
340
319
  })]
341
320
  }),
342
- /* @__PURE__ */ w("p", {
343
- className: c,
321
+ /* @__PURE__ */ g("p", {
322
+ className: f,
344
323
  children: "One bad photograph must never be able to flip a scene. 3 agreeing checks at 60 s is about four minutes of latency and is what makes the answer trustworthy — leaving a state costs exactly the same as entering one."
345
324
  }),
346
- /* @__PURE__ */ T("label", {
325
+ /* @__PURE__ */ _("label", {
347
326
  className: "flex flex-col gap-1",
348
- children: [/* @__PURE__ */ w("span", {
349
- className: L,
327
+ children: [/* @__PURE__ */ g("span", {
328
+ className: N,
350
329
  children: "Quiet for (seconds) before a check counts"
351
- }), /* @__PURE__ */ w("input", {
330
+ }), /* @__PURE__ */ g("input", {
352
331
  type: "number",
353
332
  min: 0,
354
333
  max: 3600,
355
334
  value: i.quietSeconds,
356
335
  disabled: n,
357
- className: I,
358
- onFocus: () => l(!0),
336
+ className: M,
337
+ onFocus: () => c(!0),
359
338
  onChange: (e) => o((t) => ({
360
339
  ...t,
361
340
  quietSeconds: Number(e.target.value) || 0
362
341
  })),
363
342
  onBlur: () => {
364
- let t = K(i.quietSeconds, 0, 3600);
365
- t === e.quietSeconds ? l(!1) : u({ quietSeconds: t });
343
+ let t = H(i.quietSeconds, 0, 3600);
344
+ t === e.quietSeconds ? c(!1) : l({ quietSeconds: t });
366
345
  }
367
346
  })]
368
347
  }),
369
- /* @__PURE__ */ w("p", {
370
- className: c,
348
+ /* @__PURE__ */ g("p", {
349
+ className: f,
371
350
  children: "A check taken while something is moving is a photograph of the van parked in front of the bin, so it is discarded rather than merely delayed. 0 disables the gate."
372
351
  }),
373
- /* @__PURE__ */ T("label", {
352
+ /* @__PURE__ */ _("label", {
374
353
  className: "flex flex-col gap-1",
375
- children: [/* @__PURE__ */ w("span", {
376
- className: L,
354
+ children: [/* @__PURE__ */ g("span", {
355
+ className: N,
377
356
  children: "Minimum gap between counted checks (seconds)"
378
- }), /* @__PURE__ */ w("input", {
357
+ }), /* @__PURE__ */ g("input", {
379
358
  type: "number",
380
359
  min: 0,
381
360
  max: 3600,
382
361
  value: i.minObservationSpacingSec,
383
362
  disabled: n,
384
- className: I,
385
- onFocus: () => l(!0),
363
+ className: M,
364
+ onFocus: () => c(!0),
386
365
  onChange: (e) => o((t) => ({
387
366
  ...t,
388
367
  minObservationSpacingSec: Number(e.target.value) || 0
389
368
  })),
390
369
  onBlur: () => {
391
- let t = K(i.minObservationSpacingSec, 0, 3600);
392
- t === e.minObservationSpacingSec ? l(!1) : u({ minObservationSpacingSec: t });
370
+ let t = H(i.minObservationSpacingSec, 0, 3600);
371
+ t === e.minObservationSpacingSec ? c(!1) : l({ minObservationSpacingSec: t });
393
372
  }
394
373
  })]
395
374
  }),
396
- /* @__PURE__ */ w("p", {
397
- className: c,
375
+ /* @__PURE__ */ g("p", {
376
+ className: f,
398
377
  children: "Spreads the agreeing checks over real time instead of letting three adjacent polls inside one long occlusion be mistaken for three independent opinions."
399
378
  })
400
379
  ]
401
380
  }),
402
- /* @__PURE__ */ T("div", {
403
- className: R,
381
+ /* @__PURE__ */ _("div", {
382
+ className: P,
404
383
  children: [
405
- /* @__PURE__ */ w("p", {
406
- className: z,
384
+ /* @__PURE__ */ g("p", {
385
+ className: F,
407
386
  children: "Lighting"
408
387
  }),
409
- /* @__PURE__ */ T("label", {
388
+ /* @__PURE__ */ _("label", {
410
389
  className: "flex flex-col gap-1",
411
- children: [/* @__PURE__ */ w("span", {
412
- className: L,
390
+ children: [/* @__PURE__ */ g("span", {
391
+ className: N,
413
392
  children: "When a light has no reference of its own"
414
- }), /* @__PURE__ */ T("select", {
393
+ }), /* @__PURE__ */ _("select", {
415
394
  value: e.onUncoveredCondition,
416
395
  disabled: n,
417
- className: I,
396
+ className: M,
418
397
  onChange: (e) => {
419
398
  let t = e.target.value;
420
- (t === "skip" || t === "judge-anyway") && u({ onUncoveredCondition: t });
399
+ (t === "skip" || t === "judge-anyway") && l({ onUncoveredCondition: t });
421
400
  },
422
- children: [/* @__PURE__ */ w("option", {
401
+ children: [/* @__PURE__ */ g("option", {
423
402
  value: "skip",
424
403
  children: "Skip the check (recommended)"
425
- }), /* @__PURE__ */ w("option", {
404
+ }), /* @__PURE__ */ g("option", {
426
405
  value: "judge-anyway",
427
406
  children: "Judge against the other light anyway"
428
407
  })]
429
408
  })]
430
409
  }),
431
- /* @__PURE__ */ w("p", {
432
- className: c,
433
- children: U[e.onUncoveredCondition]
410
+ /* @__PURE__ */ g("p", {
411
+ className: f,
412
+ children: z[e.onUncoveredCondition]
434
413
  })
435
414
  ]
436
415
  }),
437
- /* @__PURE__ */ T("div", {
438
- className: R,
416
+ /* @__PURE__ */ _("div", {
417
+ className: P,
439
418
  children: [
440
- /* @__PURE__ */ w("p", {
441
- className: z,
419
+ /* @__PURE__ */ g("p", {
420
+ className: F,
442
421
  children: "What you get told"
443
422
  }),
444
- /* @__PURE__ */ T("label", {
423
+ /* @__PURE__ */ _("label", {
445
424
  className: "flex flex-col gap-1",
446
- children: [/* @__PURE__ */ w("span", {
447
- className: L,
425
+ children: [/* @__PURE__ */ g("span", {
426
+ className: N,
448
427
  children: "Notifications follow"
449
- }), /* @__PURE__ */ T("select", {
428
+ }), /* @__PURE__ */ _("select", {
450
429
  value: e.emit,
451
430
  disabled: n,
452
- className: I,
431
+ className: M,
453
432
  onChange: (e) => {
454
433
  let t = e.target.value;
455
- (t === "latched" || t === "live") && u({ emit: t });
434
+ (t === "latched" || t === "live") && l({ emit: t });
456
435
  },
457
- children: [/* @__PURE__ */ w("option", {
436
+ children: [/* @__PURE__ */ g("option", {
458
437
  value: "latched",
459
438
  children: "The flag — told once, still visible at breakfast"
460
- }), /* @__PURE__ */ w("option", {
439
+ }), /* @__PURE__ */ g("option", {
461
440
  value: "live",
462
441
  children: "The live state — follows the region as it changes"
463
442
  })]
464
443
  })]
465
444
  }),
466
- /* @__PURE__ */ w("p", {
467
- className: c,
445
+ /* @__PURE__ */ g("p", {
446
+ className: f,
468
447
  children: "“Is the bin gone” is a flag: you want to be told once and still see it later. “Is the gate open” is a live state."
469
448
  }),
470
- /* @__PURE__ */ T("label", {
449
+ /* @__PURE__ */ _("label", {
471
450
  className: "flex items-center gap-2",
472
- children: [/* @__PURE__ */ w("input", {
451
+ children: [/* @__PURE__ */ g("input", {
473
452
  type: "checkbox",
474
453
  checked: e.autoRestore,
475
454
  disabled: n,
476
- onChange: (e) => u({ autoRestore: e.target.checked })
477
- }), /* @__PURE__ */ w("span", {
478
- className: L,
455
+ onChange: (e) => l({ autoRestore: e.target.checked })
456
+ }), /* @__PURE__ */ g("span", {
457
+ className: N,
479
458
  children: "Clear the flag by itself when things look normal again"
480
459
  })]
481
460
  }),
482
- /* @__PURE__ */ w("p", {
483
- className: c,
461
+ /* @__PURE__ */ g("p", {
462
+ className: f,
484
463
  children: "Off by default, so an alarm never silently clears itself. The “back to normal” moment is recorded either way, so an automation can still react to it."
485
464
  })
486
465
  ]
487
466
  }),
488
- /* @__PURE__ */ T("div", {
489
- className: R,
467
+ /* @__PURE__ */ _("div", {
468
+ className: P,
490
469
  children: [
491
- /* @__PURE__ */ w("p", {
492
- className: z,
470
+ /* @__PURE__ */ g("p", {
471
+ className: F,
493
472
  children: "AI double-check"
494
473
  }),
495
- /* @__PURE__ */ T("label", {
474
+ /* @__PURE__ */ _("label", {
496
475
  className: "flex items-center gap-2",
497
- children: [/* @__PURE__ */ w("input", {
476
+ children: [/* @__PURE__ */ g("input", {
498
477
  type: "checkbox",
499
- checked: f,
478
+ checked: d,
500
479
  disabled: n || i.confirmPrompt.trim().length === 0,
501
- onChange: (e) => u(e.target.checked ? { confirm: {
502
- ...q(i.confirmPrompt.trim()),
480
+ onChange: (e) => l(e.target.checked ? { confirm: {
481
+ ...U(i.confirmPrompt.trim()),
503
482
  enabled: !0
504
483
  } } : { confirm: null })
505
- }), /* @__PURE__ */ w("span", {
506
- className: L,
484
+ }), /* @__PURE__ */ g("span", {
485
+ className: N,
507
486
  children: "Ask a vision model before changing the answer"
508
487
  })]
509
488
  }),
510
- /* @__PURE__ */ T("label", {
489
+ /* @__PURE__ */ _("label", {
511
490
  className: "flex flex-col gap-1",
512
- children: [/* @__PURE__ */ w("span", {
513
- className: L,
491
+ children: [/* @__PURE__ */ g("span", {
492
+ className: N,
514
493
  children: "The question to ask"
515
- }), /* @__PURE__ */ w("input", {
494
+ }), /* @__PURE__ */ g("input", {
516
495
  type: "text",
517
496
  value: i.confirmPrompt,
518
497
  placeholder: "e.g. Is the wheelie bin still there?",
519
498
  disabled: n,
520
- className: I,
521
- onFocus: () => l(!0),
499
+ className: M,
500
+ onFocus: () => c(!0),
522
501
  onChange: (e) => o((t) => ({
523
502
  ...t,
524
503
  confirmPrompt: e.target.value
525
504
  })),
526
505
  onBlur: () => {
527
506
  let t = i.confirmPrompt.trim();
528
- t.length > 0 && t !== e.confirm?.prompt ? u({ confirm: {
529
- ...q(t),
530
- enabled: f
531
- } }) : l(!1);
507
+ t.length > 0 && t !== e.confirm?.prompt ? l({ confirm: {
508
+ ...U(t),
509
+ enabled: d
510
+ } }) : c(!1);
532
511
  }
533
512
  })]
534
513
  }),
535
- /* @__PURE__ */ T("p", {
536
- className: c,
514
+ /* @__PURE__ */ _("p", {
515
+ className: f,
537
516
  children: [
538
517
  "The model is asked ",
539
- /* @__PURE__ */ w("strong", { children: "only" }),
518
+ /* @__PURE__ */ g("strong", { children: "only" }),
540
519
  " when the region has already changed enough to flip the answer — roughly twice a week for a bin, not once a minute. It reasons about the object rather than the pixels, so rain, shadows and a repositioned bin stop counting as the thing being taken. If it cannot be reached, the change is held rather than announced."
541
520
  ]
542
521
  })
@@ -545,10 +524,10 @@ function G({ monitor: e, disabled: n, onPatch: r }) {
545
524
  ]
546
525
  });
547
526
  }
548
- function K(e, t, n) {
527
+ function H(e, t, n) {
549
528
  return Math.min(n, Math.max(t, e));
550
529
  }
551
- function q(e) {
530
+ function U(e) {
552
531
  return {
553
532
  enabled: !1,
554
533
  prompt: e,
@@ -560,37 +539,37 @@ function q(e) {
560
539
  //#endregion
561
540
  //#region ../ui-library/src/composites/cap-settings/SceneMonitorEditor.tsx
562
541
  e();
563
- var J = "rounded-md border border-border bg-surface px-2 py-1 text-[11px] font-medium text-foreground-subtle hover:bg-surface-hover disabled:opacity-40 transition-colors", Y = "rounded-md border border-primary/50 bg-primary/15 px-2.5 py-1 text-[11px] font-medium text-primary hover:bg-primary/25 disabled:opacity-40 transition-colors", te = "rounded-md border border-danger/50 bg-danger/10 px-2 py-1 text-[11px] font-medium text-danger hover:bg-danger/20 disabled:opacity-40 transition-colors", ne = {
542
+ var W = "rounded-md border border-border bg-surface px-2 py-1 text-[11px] font-medium text-foreground-subtle hover:bg-surface-hover disabled:opacity-40 transition-colors", G = "rounded-md border border-primary/50 bg-primary/15 px-2.5 py-1 text-[11px] font-medium text-primary hover:bg-primary/25 disabled:opacity-40 transition-colors", K = "rounded-md border border-danger/50 bg-danger/10 px-2 py-1 text-[11px] font-medium text-danger hover:bg-danger/20 disabled:opacity-40 transition-colors", q = {
564
543
  alarm: "border-danger/50 bg-danger/15 text-danger",
565
544
  ok: "border-success/50 bg-success/15 text-success",
566
545
  unknown: "border-border bg-surface text-foreground-subtle"
567
- }, re = .8, ie = 3;
568
- function X({ deviceId: e }) {
569
- let s = l(d().trpcClient, e), p = o(s?.state.sceneMonitor), S = b(e, { width: 640 }), [k, A] = t(null), [j, M] = t(!1), [N, P] = t(null), [F, I] = t(null), [L, R] = t(null), [z, B] = t(null), [V, H] = t(!1), [U, W] = t(null), [K, q] = t(""), X = r(!0);
546
+ }, J = .8, ie = 3;
547
+ function Y({ deviceId: e }) {
548
+ let o = p(h().trpcClient, e), y = d(o?.state.sceneMonitor), w = ne(e, { width: 640 }), [T, E] = t(null), [D, O] = t(!1), [A, j] = t(null), [M, N] = t(null), [P, F] = t(null), [I, L] = t(null), [R, z] = t(!1), [B, H] = t(null), [U, Y] = t(""), X = r(!0);
570
549
  a(() => (X.current = !0, () => {
571
550
  X.current = !1;
572
551
  }), []);
573
552
  let Z = n(async () => {
574
- if (s) try {
575
- let e = await s.sceneMonitor?.listScenes({});
553
+ if (o) try {
554
+ let e = await o.sceneMonitor?.listScenes({});
576
555
  if (!X.current) return;
577
- e && A(e);
556
+ e && E(e);
578
557
  } catch (e) {
579
558
  if (!X.current) return;
580
- u(e) ? M(!0) : I(e instanceof Error ? e.message : String(e));
559
+ m(e) ? O(!0) : N(e instanceof Error ? e.message : String(e));
581
560
  }
582
- }, [s]);
561
+ }, [o]);
583
562
  a(() => {
584
- A(null), M(!1), I(null), Z();
563
+ E(null), O(!1), N(null), Z();
585
564
  }, [Z]);
586
- let Q = p?.monitors ?? k?.monitors ?? [], ae = Date.now(), $ = n(async (e, t) => {
587
- P(e), I(null);
565
+ let Q = y?.monitors ?? T?.monitors ?? [], ae = Date.now(), $ = n(async (e, t) => {
566
+ j(e), N(null);
588
567
  try {
589
568
  await t(), await Z();
590
569
  } catch (e) {
591
- X.current && I(e instanceof Error ? e.message : String(e));
570
+ X.current && N(e instanceof Error ? e.message : String(e));
592
571
  } finally {
593
- X.current && P(null);
572
+ X.current && j(null);
594
573
  }
595
574
  }, [Z]), oe = i(() => {
596
575
  let e = Q.map((e) => ({
@@ -599,223 +578,223 @@ function X({ deviceId: e }) {
599
578
  label: e.label,
600
579
  enabled: e.enabled
601
580
  }));
602
- return U === null ? e : [...e, {
581
+ return B === null ? e : [...e, {
603
582
  id: "__draft__",
604
- shape: U,
583
+ shape: B,
605
584
  label: "New scene"
606
585
  }];
607
- }, [Q, U]), se = n((e, t) => {
586
+ }, [Q, B]), se = n((e, t) => {
608
587
  if (t.kind === "rect") {
609
588
  if (e === "__draft__") {
610
- W(t);
589
+ H(t);
611
590
  return;
612
591
  }
613
- $(`roi-${String(e)}`, async () => s?.sceneMonitor?.updateScene({
592
+ $(`roi-${String(e)}`, async () => o?.sceneMonitor?.updateScene({
614
593
  monitorId: String(e),
615
594
  patch: { roi: t }
616
595
  }));
617
596
  }
618
- }, [s, $]), ce = n((e) => {
619
- e.kind === "rect" && W(e);
597
+ }, [o, $]), ce = n((e) => {
598
+ e.kind === "rect" && H(e);
620
599
  }, []), le = n(async () => {
621
- U === null || K.trim().length === 0 || (await $("create", async () => {
622
- await s?.sceneMonitor?.createScene({
623
- label: K.trim(),
624
- roi: U,
600
+ B === null || U.trim().length === 0 || (await $("create", async () => {
601
+ await o?.sceneMonitor?.createScene({
602
+ label: U.trim(),
603
+ roi: B,
625
604
  check: {
626
605
  mode: "similarity",
627
- threshold: re,
606
+ threshold: J,
628
607
  hysteresisCount: ie
629
608
  }
630
609
  });
631
- }), W(null), q(""), H(!1));
610
+ }), H(null), Y(""), z(!1));
632
611
  }, [
633
- s,
612
+ o,
613
+ B,
634
614
  U,
635
- K,
636
615
  $
637
616
  ]);
638
- return s ? /* @__PURE__ */ w("div", {
617
+ return o ? /* @__PURE__ */ g("div", {
639
618
  className: "flex flex-col gap-3",
640
- children: j ? /* @__PURE__ */ w("p", {
641
- className: `${c} leading-relaxed`,
619
+ children: D ? /* @__PURE__ */ g("p", {
620
+ className: `${f} leading-relaxed`,
642
621
  children: "Scene monitoring is not available for this camera."
643
- }) : /* @__PURE__ */ T(E, { children: [
644
- /* @__PURE__ */ w("p", {
645
- className: `${c} leading-relaxed`,
622
+ }) : /* @__PURE__ */ _(v, { children: [
623
+ /* @__PURE__ */ g("p", {
624
+ className: `${f} leading-relaxed`,
646
625
  children: "A scene watches one region of this camera and tells you when it stops looking like the picture you captured. Draw a box around the thing you care about — a wheelie bin, a gate, a parking space — then capture what “normal” looks like. Daylight is enough to start: the night reference is optional, and without it the scene simply sits the infrared hours out instead of reporting a problem."
647
626
  }),
648
- /* @__PURE__ */ w("div", {
627
+ /* @__PURE__ */ g("div", {
649
628
  className: "relative overflow-hidden rounded-md border border-border",
650
- children: /* @__PURE__ */ w(D, {
629
+ children: /* @__PURE__ */ g(C, {
651
630
  items: oe,
652
631
  supportedShapes: ["rect"],
653
- selectedId: L ?? (U === null ? null : "__draft__"),
654
- onSelect: (e) => R(e === null ? null : String(e)),
632
+ selectedId: P ?? (B === null ? null : "__draft__"),
633
+ onSelect: (e) => F(e === null ? null : String(e)),
655
634
  onShapeChange: se,
656
635
  onDrawComplete: ce,
657
- drawingKind: V && U === null ? "rect" : null,
658
- backdrop: S.src === null ? null : /* @__PURE__ */ w("img", {
659
- src: S.src,
636
+ drawingKind: R && B === null ? "rect" : null,
637
+ backdrop: w.src === null ? null : /* @__PURE__ */ g("img", {
638
+ src: w.src,
660
639
  alt: "",
661
640
  className: "h-full w-full object-contain",
662
641
  draggable: !1
663
642
  })
664
643
  })
665
644
  }),
666
- /* @__PURE__ */ T("div", {
645
+ /* @__PURE__ */ _("div", {
667
646
  className: "flex flex-wrap items-center gap-2",
668
- children: [/* @__PURE__ */ w("button", {
647
+ children: [/* @__PURE__ */ g("button", {
669
648
  type: "button",
670
- className: V ? Y : J,
671
- "aria-pressed": V,
649
+ className: R ? G : W,
650
+ "aria-pressed": R,
672
651
  onClick: () => {
673
- H((e) => !e), W(null);
652
+ z((e) => !e), H(null);
674
653
  },
675
- disabled: N !== null,
676
- children: V ? "Cancel" : "+ New scene"
677
- }), /* @__PURE__ */ w("button", {
654
+ disabled: A !== null,
655
+ children: R ? "Cancel" : "+ New scene"
656
+ }), /* @__PURE__ */ g("button", {
678
657
  type: "button",
679
- className: J,
680
- onClick: S.refresh,
681
- disabled: N !== null,
658
+ className: W,
659
+ onClick: w.refresh,
660
+ disabled: A !== null,
682
661
  children: "Refresh frame"
683
662
  })]
684
663
  }),
685
- V && /* @__PURE__ */ T("div", {
664
+ R && /* @__PURE__ */ _("div", {
686
665
  className: "flex flex-col gap-2 rounded-md border border-border bg-surface p-2",
687
666
  children: [
688
- /* @__PURE__ */ w("p", {
667
+ /* @__PURE__ */ g("p", {
689
668
  className: "text-[10px] text-foreground-subtle",
690
- children: U === null ? "Click on the frame to drop a box, then drag its corner to fit it around the thing you want watched." : "Name it, then create. You capture what “normal” looks like next."
669
+ children: B === null ? "Click on the frame to drop a box, then drag its corner to fit it around the thing you want watched." : "Name it, then create. You capture what “normal” looks like next."
691
670
  }),
692
- U !== null && h(U) && /* @__PURE__ */ w("p", {
671
+ B !== null && b(B) && /* @__PURE__ */ g("p", {
693
672
  className: "text-[11px] leading-relaxed text-warning",
694
673
  children: "That box covers most of the frame. A scene that big is dominated by the weather, the sky and passing cars — it will quietly stop noticing the thing you actually care about. Draw it tighter."
695
674
  }),
696
- /* @__PURE__ */ T("div", {
675
+ /* @__PURE__ */ _("div", {
697
676
  className: "flex items-center gap-2",
698
- children: [/* @__PURE__ */ w("input", {
677
+ children: [/* @__PURE__ */ g("input", {
699
678
  type: "text",
700
- value: K,
701
- onChange: (e) => q(e.target.value),
679
+ value: U,
680
+ onChange: (e) => Y(e.target.value),
702
681
  placeholder: "e.g. Immondizia prelevata",
703
682
  className: "flex-1 rounded-md border border-border bg-surface px-2 py-1 text-[12px] text-foreground"
704
- }), /* @__PURE__ */ w("button", {
683
+ }), /* @__PURE__ */ g("button", {
705
684
  type: "button",
706
- className: Y,
685
+ className: G,
707
686
  onClick: () => void le(),
708
- disabled: U === null || K.trim().length === 0 || N !== null,
687
+ disabled: B === null || U.trim().length === 0 || A !== null,
709
688
  children: "Create"
710
689
  })]
711
690
  })
712
691
  ]
713
692
  }),
714
- F !== null && /* @__PURE__ */ w("p", {
693
+ M !== null && /* @__PURE__ */ g("p", {
715
694
  className: "text-[11px] leading-relaxed text-danger",
716
- children: F
695
+ children: M
717
696
  }),
718
- Q.length === 0 ? /* @__PURE__ */ w("p", {
719
- className: `${c} leading-relaxed`,
697
+ Q.length === 0 ? /* @__PURE__ */ g("p", {
698
+ className: `${f} leading-relaxed`,
720
699
  children: "No scenes on this camera yet."
721
- }) : /* @__PURE__ */ w("ul", {
700
+ }) : /* @__PURE__ */ g("ul", {
722
701
  className: "flex flex-col gap-2",
723
702
  children: Q.map((e) => {
724
- let t = _(e);
725
- return /* @__PURE__ */ T("li", {
726
- className: `flex flex-col gap-1.5 rounded-md border p-2 ${L === e.id ? "border-primary/50" : "border-border"}`,
703
+ let t = te(e);
704
+ return /* @__PURE__ */ _("li", {
705
+ className: `flex flex-col gap-1.5 rounded-md border p-2 ${P === e.id ? "border-primary/50" : "border-border"}`,
727
706
  children: [
728
- /* @__PURE__ */ T("div", {
707
+ /* @__PURE__ */ _("div", {
729
708
  className: "flex items-center gap-2",
730
- children: [/* @__PURE__ */ w("button", {
709
+ children: [/* @__PURE__ */ g("button", {
731
710
  type: "button",
732
711
  className: "flex-1 text-left text-[12px] font-medium text-foreground",
733
- onClick: () => R(e.id),
712
+ onClick: () => F(e.id),
734
713
  children: e.label
735
- }), /* @__PURE__ */ w("span", {
736
- className: `rounded border px-1.5 py-0.5 text-[10px] font-medium ${ne[t.tone]}`,
714
+ }), /* @__PURE__ */ g("span", {
715
+ className: `rounded border px-1.5 py-0.5 text-[10px] font-medium ${q[t.tone]}`,
737
716
  children: t.text
738
717
  })]
739
718
  }),
740
- /* @__PURE__ */ w("p", {
741
- className: `${c} leading-relaxed`,
742
- children: f(e, ae)
719
+ /* @__PURE__ */ g("p", {
720
+ className: `${f} leading-relaxed`,
721
+ children: ee(e, ae)
743
722
  }),
744
- /* @__PURE__ */ w("p", {
745
- className: `${c} tabular-nums`,
746
- children: y(e)
723
+ /* @__PURE__ */ g("p", {
724
+ className: `${f} tabular-nums`,
725
+ children: S(e)
747
726
  }),
748
- /* @__PURE__ */ w(ee, {
727
+ /* @__PURE__ */ g(k, {
749
728
  monitor: e,
750
- disabled: N !== null,
751
- onDelete: ({ stateId: t, index: n }) => void $(`refdel-${e.id}-${t}-${String(n)}`, async () => s.sceneMonitor?.deleteReference({
729
+ disabled: A !== null,
730
+ onDelete: ({ stateId: t, index: n }) => void $(`refdel-${e.id}-${t}-${String(n)}`, async () => o.sceneMonitor?.deleteReference({
752
731
  monitorId: e.id,
753
732
  stateId: t,
754
733
  index: n
755
734
  }))
756
735
  }),
757
- /* @__PURE__ */ T("div", {
736
+ /* @__PURE__ */ _("div", {
758
737
  className: "flex flex-wrap items-center gap-1.5",
759
738
  children: [
760
- x.map((t) => {
739
+ re.map((t) => {
761
740
  let n = t === "ir";
762
- return /* @__PURE__ */ T("button", {
741
+ return /* @__PURE__ */ _("button", {
763
742
  type: "button",
764
- className: J,
765
- disabled: N !== null,
766
- title: n ? "Optional. Without a night reference the checks in infrared are simply skipped — the scene keeps working in daylight and nothing is reported as broken." : `Take a fresh photo now and store it as the ${v(t).toLowerCase()} reference`,
767
- onClick: () => void $(`cap-${e.id}-${t}`, async () => s.sceneMonitor?.captureReference({
743
+ className: W,
744
+ disabled: A !== null,
745
+ title: n ? "Optional. Without a night reference the checks in infrared are simply skipped — the scene keeps working in daylight and nothing is reported as broken." : `Take a fresh photo now and store it as the ${x(t).toLowerCase()} reference`,
746
+ onClick: () => void $(`cap-${e.id}-${t}`, async () => o.sceneMonitor?.captureReference({
768
747
  monitorId: e.id,
769
748
  condition: t
770
749
  })),
771
750
  children: [
772
- /* @__PURE__ */ w(m, { className: "mr-1 inline h-3 w-3" }),
751
+ /* @__PURE__ */ g(s, { className: "mr-1 inline h-3 w-3" }),
773
752
  "Capture ",
774
- v(t).toLowerCase(),
775
- n && /* @__PURE__ */ w("span", {
753
+ x(t).toLowerCase(),
754
+ n && /* @__PURE__ */ g("span", {
776
755
  className: "ml-1 text-foreground-subtle/70",
777
756
  children: "(optional)"
778
757
  })
779
758
  ]
780
759
  }, t);
781
760
  }),
782
- /* @__PURE__ */ T("button", {
761
+ /* @__PURE__ */ _("button", {
783
762
  type: "button",
784
- className: Y,
785
- disabled: N !== null || e.states.length === 0,
763
+ className: G,
764
+ disabled: A !== null || e.states.length === 0,
786
765
  title: "Clear the flag and re-photograph what normal looks like right now",
787
- onClick: () => void $(`reset-${e.id}`, async () => s.sceneMonitor?.resetScene({ monitorId: e.id })),
788
- children: [/* @__PURE__ */ w(g, { className: "mr-1 inline h-3 w-3" }), "Reset"]
766
+ onClick: () => void $(`reset-${e.id}`, async () => o.sceneMonitor?.resetScene({ monitorId: e.id })),
767
+ children: [/* @__PURE__ */ g(c, { className: "mr-1 inline h-3 w-3" }), "Reset"]
789
768
  }),
790
- /* @__PURE__ */ w("button", {
769
+ /* @__PURE__ */ g("button", {
791
770
  type: "button",
792
- className: J,
793
- disabled: N !== null,
794
- onClick: () => void $(`check-${e.id}`, async () => s.sceneMonitor?.recheckNow({ monitorId: e.id })),
771
+ className: W,
772
+ disabled: A !== null,
773
+ onClick: () => void $(`check-${e.id}`, async () => o.sceneMonitor?.recheckNow({ monitorId: e.id })),
795
774
  children: "Check now"
796
775
  }),
797
- /* @__PURE__ */ T("button", {
776
+ /* @__PURE__ */ _("button", {
798
777
  type: "button",
799
- className: z === e.id ? Y : J,
800
- "aria-pressed": z === e.id,
778
+ className: I === e.id ? G : W,
779
+ "aria-pressed": I === e.id,
801
780
  "aria-label": `Settings for ${e.label}`,
802
- disabled: N !== null,
803
- onClick: () => B((t) => t === e.id ? null : e.id),
804
- children: [/* @__PURE__ */ w(O, { className: "mr-1 inline h-3 w-3" }), "Settings"]
781
+ disabled: A !== null,
782
+ onClick: () => L((t) => t === e.id ? null : e.id),
783
+ children: [/* @__PURE__ */ g(l, { className: "mr-1 inline h-3 w-3" }), "Settings"]
805
784
  }),
806
- /* @__PURE__ */ w("button", {
785
+ /* @__PURE__ */ g("button", {
807
786
  type: "button",
808
- className: te,
809
- disabled: N !== null,
810
- onClick: () => void $(`del-${e.id}`, async () => s.sceneMonitor?.deleteScene({ monitorId: e.id })),
811
- children: /* @__PURE__ */ w(C, { className: "h-3 w-3" })
787
+ className: K,
788
+ disabled: A !== null,
789
+ onClick: () => void $(`del-${e.id}`, async () => o.sceneMonitor?.deleteScene({ monitorId: e.id })),
790
+ children: /* @__PURE__ */ g(u, { className: "h-3 w-3" })
812
791
  })
813
792
  ]
814
793
  }),
815
- z === e.id && /* @__PURE__ */ w(G, {
794
+ I === e.id && /* @__PURE__ */ g(V, {
816
795
  monitor: e,
817
- disabled: N !== null,
818
- onPatch: (t) => void $(`tune-${e.id}`, async () => s.sceneMonitor?.updateScene({
796
+ disabled: A !== null,
797
+ onPatch: (t) => void $(`tune-${e.id}`, async () => o.sceneMonitor?.updateScene({
819
798
  monitorId: e.id,
820
799
  patch: t
821
800
  }))
@@ -828,4 +807,4 @@ function X({ deviceId: e }) {
828
807
  }) : null;
829
808
  }
830
809
  //#endregion
831
- export { X as SceneMonitorEditor };
810
+ export { Y as SceneMonitorEditor };