@camstack/addon-osd-manager 0.1.78 → 0.1.80
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/{PrivacyMaskSettings-C1kY8VDL.mjs → PrivacyMaskSettings-yTPSGJ_S.mjs} +94 -87
- package/dist/_stub.js +3 -3
- package/dist/{_virtual_mf-localSharedImportMap___mfe_internal__addon_osd_manager_page-Bi39a2P-.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_osd_manager_page-CwQlxGtO.mjs} +4 -4
- package/dist/{hostInit-BzYW4SpW.mjs → hostInit-ByZ5J0tJ.mjs} +3 -3
- package/dist/index.js +38 -9
- package/dist/index.mjs +38 -9
- package/dist/remoteEntry.js +1 -1
- package/dist/{virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_osd_manager_page__remoteEntry_js-ChNl9npD.mjs → virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_osd_manager_page__remoteEntry_js-DlwwzQuH.mjs} +1 -1
- package/package.json +1 -1
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { c as e, h as t, m as n, p as r, u as i, y as a } from "./_virtual_mf___mfe_internal__addon_osd_manager_page__loadShare__react__loadShare__.js-Bs1t18EM.mjs";
|
|
2
2
|
import { a as ee, n as te, r as ne, s as o, t as s } from "./responsive-veJ_u_lF.mjs";
|
|
3
|
-
import { n as re, t as
|
|
4
|
-
import { n as
|
|
5
|
-
import { t as
|
|
6
|
-
import { n as
|
|
7
|
-
import { MaskShapeCanvas as
|
|
8
|
-
var
|
|
3
|
+
import { n as re, t as ie } from "./player-overlays-DPEo1CnK.mjs";
|
|
4
|
+
import { n as ae, r as oe, t as se } from "./square-BKRxPrj2.mjs";
|
|
5
|
+
import { t as c } from "./trash-2-B_FOJHPE.mjs";
|
|
6
|
+
import { n as l, r as u, t as ce } from "./_virtual_mf___mfe_internal__addon_osd_manager_page__loadShare__react_mf_1_jsx_mf_2_runtime__loadShare__.js-DalfdIDw.mjs";
|
|
7
|
+
import { MaskShapeCanvas as le } from "./MaskShapeCanvas-BEVxAjNq.mjs";
|
|
8
|
+
var ue = o("hexagon", [["path", {
|
|
9
9
|
d: "M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z",
|
|
10
10
|
key: "yt0hxn"
|
|
11
|
-
}]]),
|
|
11
|
+
}]]), de = o("mic-off", [
|
|
12
12
|
["path", {
|
|
13
13
|
d: "M12 19v3",
|
|
14
14
|
key: "npa21l"
|
|
@@ -37,15 +37,15 @@ var le = o("hexagon", [["path", {
|
|
|
37
37
|
//#endregion
|
|
38
38
|
//#region ../ui-library/src/composites/cap-settings/privacy-mask-audio.ts
|
|
39
39
|
a();
|
|
40
|
-
var
|
|
41
|
-
function
|
|
40
|
+
var d = "Microphone", f = "The camera encodes no audio at all — live view, recordings, exports and the audio analyzer are all silent.";
|
|
41
|
+
function p(e) {
|
|
42
42
|
let t = e.supportsAudioMute === !0, n = t ? e.audioEnabled : null, r = e.pendingOn ?? null;
|
|
43
43
|
return {
|
|
44
|
-
label:
|
|
44
|
+
label: d,
|
|
45
45
|
supported: t,
|
|
46
46
|
on: n === null ? null : r ?? n,
|
|
47
47
|
available: t && n !== null,
|
|
48
|
-
costWhenOff:
|
|
48
|
+
costWhenOff: f
|
|
49
49
|
};
|
|
50
50
|
}
|
|
51
51
|
function m(e) {
|
|
@@ -53,34 +53,38 @@ function m(e) {
|
|
|
53
53
|
}
|
|
54
54
|
//#endregion
|
|
55
55
|
//#region ../ui-library/src/composites/cap-settings/PrivacyMaskSettings.tsx
|
|
56
|
-
var fe = 120,
|
|
57
|
-
function
|
|
56
|
+
var fe = 120, pe = "privacy-mask", h = "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";
|
|
57
|
+
function _(e) {
|
|
58
58
|
return e.kind === "rect" || e.kind === "polygon" ? e : null;
|
|
59
59
|
}
|
|
60
|
-
function
|
|
60
|
+
function me(e) {
|
|
61
61
|
let t = new Set(e.map((e) => e.id)), n = 0;
|
|
62
62
|
for (; t.has(n);) n += 1;
|
|
63
63
|
return n;
|
|
64
64
|
}
|
|
65
|
-
function
|
|
65
|
+
function he(e, t) {
|
|
66
66
|
if (e.length !== t.length) return !1;
|
|
67
67
|
for (let n = 0; n < e.length; n += 1) if (JSON.stringify(e[n]) !== JSON.stringify(t[n])) return !1;
|
|
68
68
|
return !0;
|
|
69
69
|
}
|
|
70
|
-
function
|
|
71
|
-
let o = ne(ee().trpcClient, a), [
|
|
70
|
+
function v({ deviceId: a }) {
|
|
71
|
+
let o = ne(ee().trpcClient, a), [d, f] = t(null), [v, y] = t(!1), [b, x] = t(!1), [S, C] = t(null), [w, T] = t(null), [E, D] = t(!1), [O, k] = t(!1), [A, j] = t(null), [M, N] = t(null), [ge, P] = t(null), [F, I] = t(null), [L, R] = t(null), z = n(!1);
|
|
72
72
|
i(() => {
|
|
73
73
|
if (!o) return;
|
|
74
74
|
let e = !1;
|
|
75
|
-
return z.current = !1,
|
|
75
|
+
return z.current = !1, f(null), y(!1), x(!1), C(null), T(null), k(!1), j(null), N(null), P(null), I(null), R(null), (async () => {
|
|
76
76
|
try {
|
|
77
77
|
let t = await o.privacyMask?.getOptions({});
|
|
78
78
|
if (e) return;
|
|
79
79
|
if (!t) throw Error("device proxy not ready");
|
|
80
|
-
if (
|
|
80
|
+
if (f(t), z.current) return;
|
|
81
81
|
let n = await o.privacyMask?.getStatus({});
|
|
82
82
|
if (e) return;
|
|
83
83
|
if (!n) throw Error("device proxy not ready");
|
|
84
|
+
if (n.regions === null) {
|
|
85
|
+
x(!0), P(n.audioEnabled);
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
84
88
|
z.current = !0;
|
|
85
89
|
let r = {
|
|
86
90
|
enabled: n.enabled,
|
|
@@ -89,17 +93,17 @@ function b({ deviceId: a }) {
|
|
|
89
93
|
T(r), C(r), P(n.audioEnabled);
|
|
90
94
|
} catch (t) {
|
|
91
95
|
if (e) return;
|
|
92
|
-
te(t) ?
|
|
96
|
+
te(t) ? y(!0) : console.error("Privacy Mask load failed", t);
|
|
93
97
|
}
|
|
94
98
|
})(), () => {
|
|
95
99
|
e = !0;
|
|
96
100
|
};
|
|
97
101
|
}, [o]);
|
|
98
|
-
let B = r(() => S !== null && w !== null && (S.enabled !== w.enabled || !
|
|
102
|
+
let B = r(() => S !== null && w !== null && (S.enabled !== w.enabled || !he(S.regions, w.regions)), [S, w]), V = S ? S.regions.length : 0, H = d ? d.maxRegions : 0, U = n(0);
|
|
99
103
|
i(() => {
|
|
100
104
|
U.current = H;
|
|
101
105
|
}, [H]);
|
|
102
|
-
let W = H > 0 && V >= H,
|
|
106
|
+
let W = H > 0 && V >= H, _e = e(() => {
|
|
103
107
|
C((e) => e && {
|
|
104
108
|
...e,
|
|
105
109
|
enabled: !e.enabled
|
|
@@ -112,7 +116,7 @@ function b({ deviceId: a }) {
|
|
|
112
116
|
enabled: e.enabled,
|
|
113
117
|
label: `Zone ${String(e.id)}`
|
|
114
118
|
})) : [], [S]), q = e((e, t) => {
|
|
115
|
-
let n =
|
|
119
|
+
let n = _(t);
|
|
116
120
|
n && C((t) => t && {
|
|
117
121
|
...t,
|
|
118
122
|
regions: t.regions.map((t) => t.id === e ? {
|
|
@@ -121,12 +125,12 @@ function b({ deviceId: a }) {
|
|
|
121
125
|
} : t)
|
|
122
126
|
});
|
|
123
127
|
}, []), J = e((e) => {
|
|
124
|
-
let t =
|
|
128
|
+
let t = _(e);
|
|
125
129
|
t && (N(null), C((e) => {
|
|
126
130
|
if (!e) return e;
|
|
127
131
|
let n = U.current;
|
|
128
132
|
if (n > 0 && e.regions.length >= n) return e;
|
|
129
|
-
let r =
|
|
133
|
+
let r = me(e.regions), i = {
|
|
130
134
|
id: r,
|
|
131
135
|
enabled: !0,
|
|
132
136
|
shape: t
|
|
@@ -138,19 +142,19 @@ function b({ deviceId: a }) {
|
|
|
138
142
|
}));
|
|
139
143
|
}, []), Y = e((e) => {
|
|
140
144
|
k(!0), j(null), N(e);
|
|
141
|
-
}, []),
|
|
145
|
+
}, []), ve = e((e) => {
|
|
142
146
|
k(!0), N(null), j(e);
|
|
143
147
|
}, []), X = e((e) => {
|
|
144
148
|
j((t) => t === e ? null : t), C((t) => t && {
|
|
145
149
|
...t,
|
|
146
150
|
regions: t.regions.filter((t) => t.id !== e)
|
|
147
151
|
});
|
|
148
|
-
}, []),
|
|
152
|
+
}, []), ye = e(() => {
|
|
149
153
|
N(null), j(null), w && C({
|
|
150
154
|
enabled: w.enabled,
|
|
151
155
|
regions: w.regions
|
|
152
156
|
});
|
|
153
|
-
}, [w]),
|
|
157
|
+
}, [w]), be = e(async () => {
|
|
154
158
|
if (!(!o || !S)) {
|
|
155
159
|
D(!0);
|
|
156
160
|
try {
|
|
@@ -159,7 +163,7 @@ function b({ deviceId: a }) {
|
|
|
159
163
|
regions: [...S.regions]
|
|
160
164
|
} });
|
|
161
165
|
let e = await o.privacyMask?.getStatus({});
|
|
162
|
-
if (e) {
|
|
166
|
+
if (e && e.regions !== null) {
|
|
163
167
|
let t = {
|
|
164
168
|
enabled: e.enabled,
|
|
165
169
|
regions: e.regions
|
|
@@ -172,11 +176,11 @@ function b({ deviceId: a }) {
|
|
|
172
176
|
D(!1);
|
|
173
177
|
}
|
|
174
178
|
}
|
|
175
|
-
}, [o, S]), Z =
|
|
176
|
-
supportsAudioMute:
|
|
177
|
-
audioEnabled:
|
|
179
|
+
}, [o, S]), Z = p({
|
|
180
|
+
supportsAudioMute: d === null ? null : d.supportsAudioMute,
|
|
181
|
+
audioEnabled: ge,
|
|
178
182
|
pendingOn: F
|
|
179
|
-
}),
|
|
183
|
+
}), xe = e(async () => {
|
|
180
184
|
let e = m(Z);
|
|
181
185
|
if (!(!o || e === null)) {
|
|
182
186
|
I(e.enabled), R(null);
|
|
@@ -190,17 +194,17 @@ function b({ deviceId: a }) {
|
|
|
190
194
|
I(null);
|
|
191
195
|
}
|
|
192
196
|
}
|
|
193
|
-
}, [o, Z]),
|
|
197
|
+
}, [o, Z]), Se = e(() => {
|
|
194
198
|
k((e) => (e && (N(null), j(null)), !e));
|
|
195
|
-
}, []), Q =
|
|
196
|
-
|
|
197
|
-
id:
|
|
199
|
+
}, []), Q = d?.supportedShapes ?? [];
|
|
200
|
+
ie(r(() => O && !v && d && S ? {
|
|
201
|
+
id: pe,
|
|
198
202
|
order: fe,
|
|
199
|
-
node: /* @__PURE__ */
|
|
203
|
+
node: /* @__PURE__ */ l(le, {
|
|
200
204
|
transparent: !0,
|
|
201
205
|
items: K,
|
|
202
206
|
supportedShapes: Q,
|
|
203
|
-
polygonVertices:
|
|
207
|
+
polygonVertices: d.polygonVertices,
|
|
204
208
|
selectedId: A,
|
|
205
209
|
onSelect: G,
|
|
206
210
|
onShapeChange: q,
|
|
@@ -209,8 +213,8 @@ function b({ deviceId: a }) {
|
|
|
209
213
|
})
|
|
210
214
|
} : null, [
|
|
211
215
|
O,
|
|
212
|
-
|
|
213
|
-
|
|
216
|
+
v,
|
|
217
|
+
d,
|
|
214
218
|
S,
|
|
215
219
|
K,
|
|
216
220
|
Q,
|
|
@@ -220,70 +224,73 @@ function b({ deviceId: a }) {
|
|
|
220
224
|
J,
|
|
221
225
|
M
|
|
222
226
|
]));
|
|
223
|
-
let
|
|
224
|
-
return o ? /* @__PURE__ */
|
|
227
|
+
let Ce = d?.supportedShapes.includes("rect") ?? !1, we = d?.supportedShapes.includes("polygon") ?? !1, $ = d !== null && (d.maxRegions <= 0 || d.supportedShapes.length === 0);
|
|
228
|
+
return o ? /* @__PURE__ */ l(re, {
|
|
225
229
|
title: "Privacy Mask",
|
|
226
|
-
icon: /* @__PURE__ */
|
|
227
|
-
children: /* @__PURE__ */
|
|
230
|
+
icon: /* @__PURE__ */ l(oe, { className: "h-3.5 w-3.5 text-foreground-subtle" }),
|
|
231
|
+
children: /* @__PURE__ */ u("div", {
|
|
228
232
|
className: "flex flex-col gap-3",
|
|
229
|
-
children: [
|
|
233
|
+
children: [v || $ ? /* @__PURE__ */ l("p", {
|
|
230
234
|
className: `${s} leading-relaxed`,
|
|
231
235
|
children: "This camera doesn't support an on-board privacy mask."
|
|
232
|
-
}) :
|
|
233
|
-
|
|
236
|
+
}) : b ? /* @__PURE__ */ l("p", {
|
|
237
|
+
className: `${s} leading-relaxed`,
|
|
238
|
+
children: "This camera hasn't answered, so what it currently masks is unknown — the editor stays closed rather than showing an empty frame you could save over. A battery camera answers once it wakes; otherwise check that it is reachable."
|
|
239
|
+
}) : !v && !$ && !b && d !== null && S !== null ? /* @__PURE__ */ u(ce, { children: [
|
|
240
|
+
/* @__PURE__ */ u("p", {
|
|
234
241
|
className: `${s} leading-relaxed`,
|
|
235
242
|
children: [
|
|
236
243
|
"Toggle ",
|
|
237
|
-
/* @__PURE__ */
|
|
244
|
+
/* @__PURE__ */ l("strong", {
|
|
238
245
|
className: "text-foreground",
|
|
239
246
|
children: "Edit mask"
|
|
240
247
|
}),
|
|
241
248
|
" to draw blanked-out zones on the live frame, then ",
|
|
242
|
-
/* @__PURE__ */
|
|
249
|
+
/* @__PURE__ */ l("strong", {
|
|
243
250
|
className: "text-foreground",
|
|
244
251
|
children: "Save"
|
|
245
252
|
}),
|
|
246
253
|
" to push them to the camera. Drag a rectangle to move, its corner to resize; drag polygon vertices, click an edge midpoint to add one, or right-click a vertex to remove it."
|
|
247
254
|
]
|
|
248
255
|
}),
|
|
249
|
-
/* @__PURE__ */
|
|
256
|
+
/* @__PURE__ */ u("div", {
|
|
250
257
|
className: "flex items-center gap-2 flex-wrap",
|
|
251
258
|
children: [
|
|
252
|
-
/* @__PURE__ */
|
|
259
|
+
/* @__PURE__ */ l("button", {
|
|
253
260
|
type: "button",
|
|
254
|
-
onClick:
|
|
261
|
+
onClick: Se,
|
|
255
262
|
disabled: E,
|
|
256
263
|
"aria-pressed": O,
|
|
257
|
-
className: O ?
|
|
264
|
+
className: O ? g : h,
|
|
258
265
|
children: O ? "Done editing" : "Edit mask"
|
|
259
266
|
}),
|
|
260
|
-
/* @__PURE__ */
|
|
267
|
+
/* @__PURE__ */ l("button", {
|
|
261
268
|
type: "button",
|
|
262
|
-
onClick:
|
|
269
|
+
onClick: _e,
|
|
263
270
|
disabled: E,
|
|
264
271
|
"aria-pressed": S.enabled,
|
|
265
|
-
className: S.enabled ?
|
|
272
|
+
className: S.enabled ? g : h,
|
|
266
273
|
children: S.enabled ? "Mask on" : "Mask off"
|
|
267
274
|
}),
|
|
268
|
-
|
|
275
|
+
Ce && /* @__PURE__ */ l("button", {
|
|
269
276
|
type: "button",
|
|
270
277
|
onClick: () => Y("rect"),
|
|
271
278
|
disabled: E || W,
|
|
272
279
|
"aria-pressed": M === "rect",
|
|
273
|
-
className: M === "rect" ?
|
|
280
|
+
className: M === "rect" ? g : h,
|
|
274
281
|
title: W ? "Maximum zones reached" : "Add a rectangle zone",
|
|
275
282
|
children: "+ Rect"
|
|
276
283
|
}),
|
|
277
|
-
|
|
284
|
+
we && /* @__PURE__ */ l("button", {
|
|
278
285
|
type: "button",
|
|
279
286
|
onClick: () => Y("polygon"),
|
|
280
287
|
disabled: E || W,
|
|
281
288
|
"aria-pressed": M === "polygon",
|
|
282
|
-
className: M === "polygon" ?
|
|
289
|
+
className: M === "polygon" ? g : h,
|
|
283
290
|
title: W ? "Maximum zones reached" : "Add a polygon zone",
|
|
284
291
|
children: "+ Polygon"
|
|
285
292
|
}),
|
|
286
|
-
/* @__PURE__ */
|
|
293
|
+
/* @__PURE__ */ u("span", {
|
|
287
294
|
className: `${s} ml-1 tabular-nums`,
|
|
288
295
|
children: [
|
|
289
296
|
V,
|
|
@@ -292,73 +299,73 @@ function b({ deviceId: a }) {
|
|
|
292
299
|
" zones"
|
|
293
300
|
]
|
|
294
301
|
}),
|
|
295
|
-
/* @__PURE__ */
|
|
296
|
-
/* @__PURE__ */
|
|
302
|
+
/* @__PURE__ */ l("span", { className: "flex-1" }),
|
|
303
|
+
/* @__PURE__ */ l("button", {
|
|
297
304
|
type: "button",
|
|
298
|
-
onClick:
|
|
305
|
+
onClick: ye,
|
|
299
306
|
disabled: E || !B,
|
|
300
307
|
className: "rounded-md border border-border bg-surface px-2 py-1 text-[11px] text-foreground-subtle hover:bg-surface-hover disabled:opacity-40 transition-colors",
|
|
301
308
|
children: "Revert"
|
|
302
309
|
}),
|
|
303
|
-
/* @__PURE__ */
|
|
310
|
+
/* @__PURE__ */ l("button", {
|
|
304
311
|
type: "button",
|
|
305
|
-
onClick: () => void
|
|
312
|
+
onClick: () => void be(),
|
|
306
313
|
disabled: E || !B,
|
|
307
|
-
className:
|
|
314
|
+
className: g,
|
|
308
315
|
children: E ? "Saving…" : "Save"
|
|
309
316
|
})
|
|
310
317
|
]
|
|
311
318
|
}),
|
|
312
|
-
V > 0 ? /* @__PURE__ */
|
|
319
|
+
V > 0 ? /* @__PURE__ */ l("div", {
|
|
313
320
|
className: "flex flex-col gap-1",
|
|
314
321
|
children: S.regions.map((e) => {
|
|
315
|
-
let t = A === e.id, n = e.shape.kind === "polygon" ?
|
|
316
|
-
return /* @__PURE__ */
|
|
322
|
+
let t = A === e.id, n = e.shape.kind === "polygon" ? ue : se;
|
|
323
|
+
return /* @__PURE__ */ u("div", {
|
|
317
324
|
className: `flex items-center gap-2 rounded-md border px-2 py-1 transition-colors ${t ? "border-primary/50 bg-primary/10" : "border-border bg-surface"}`,
|
|
318
|
-
children: [/* @__PURE__ */
|
|
325
|
+
children: [/* @__PURE__ */ u("button", {
|
|
319
326
|
type: "button",
|
|
320
|
-
onClick: () =>
|
|
327
|
+
onClick: () => ve(e.id),
|
|
321
328
|
disabled: E,
|
|
322
329
|
className: "flex flex-1 items-center gap-2 text-left text-[11px] font-medium text-foreground-subtle hover:text-foreground disabled:opacity-40 transition-colors",
|
|
323
330
|
children: [
|
|
324
|
-
/* @__PURE__ */
|
|
325
|
-
/* @__PURE__ */
|
|
326
|
-
/* @__PURE__ */
|
|
331
|
+
/* @__PURE__ */ l(n, { className: "h-3.5 w-3.5 shrink-0" }),
|
|
332
|
+
/* @__PURE__ */ u("span", { children: ["Zone ", e.id] }),
|
|
333
|
+
/* @__PURE__ */ l("span", {
|
|
327
334
|
className: "text-foreground-faint capitalize",
|
|
328
335
|
children: e.shape.kind
|
|
329
336
|
})
|
|
330
337
|
]
|
|
331
|
-
}), /* @__PURE__ */
|
|
338
|
+
}), /* @__PURE__ */ l("button", {
|
|
332
339
|
type: "button",
|
|
333
340
|
onClick: () => X(e.id),
|
|
334
341
|
disabled: E,
|
|
335
342
|
"aria-label": `Delete zone ${String(e.id)}`,
|
|
336
343
|
title: "Delete zone",
|
|
337
344
|
className: "inline-flex h-6 w-6 items-center justify-center rounded border border-border bg-surface text-foreground-subtle hover:border-red-400/40 hover:bg-red-500/10 hover:text-red-400 disabled:opacity-40 transition-colors",
|
|
338
|
-
children: /* @__PURE__ */
|
|
345
|
+
children: /* @__PURE__ */ l(c, { className: "h-3.5 w-3.5" })
|
|
339
346
|
})]
|
|
340
347
|
}, e.id);
|
|
341
348
|
})
|
|
342
349
|
}) : null
|
|
343
|
-
] }) : /* @__PURE__ */
|
|
350
|
+
] }) : /* @__PURE__ */ l("p", {
|
|
344
351
|
className: `${s} leading-relaxed`,
|
|
345
352
|
children: "Loading the camera's privacy mask…"
|
|
346
|
-
}), Z.supported && /* @__PURE__ */
|
|
353
|
+
}), Z.supported && /* @__PURE__ */ u("div", {
|
|
347
354
|
className: "flex items-start gap-3 rounded-md border border-border bg-surface px-2 py-2",
|
|
348
|
-
children: [/* @__PURE__ */
|
|
355
|
+
children: [/* @__PURE__ */ l("button", {
|
|
349
356
|
type: "button",
|
|
350
357
|
role: "switch",
|
|
351
358
|
"aria-label": Z.label,
|
|
352
359
|
"aria-checked": Z.on === !0,
|
|
353
360
|
disabled: !Z.available || F !== null,
|
|
354
|
-
onClick: () => void
|
|
361
|
+
onClick: () => void xe(),
|
|
355
362
|
title: Z.on === null ? "Microphone — state unknown; the camera did not answer." : Z.on ? `The camera is capturing sound. Turning it off: ${Z.costWhenOff}` : `The camera is silent. ${Z.costWhenOff}`,
|
|
356
|
-
className: Z.on === !1 || Z.on === null ?
|
|
357
|
-
children: /* @__PURE__ */
|
|
363
|
+
className: Z.on === !1 || Z.on === null ? h : g,
|
|
364
|
+
children: /* @__PURE__ */ u("span", {
|
|
358
365
|
className: "inline-flex items-center gap-1.5",
|
|
359
|
-
children: [Z.on === !1 ? /* @__PURE__ */
|
|
366
|
+
children: [Z.on === !1 ? /* @__PURE__ */ l(de, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ l(ae, { className: "h-3.5 w-3.5" }), Z.on === null ? "Microphone unknown" : Z.on ? "Microphone on" : "Microphone off"]
|
|
360
367
|
})
|
|
361
|
-
}), /* @__PURE__ */
|
|
368
|
+
}), /* @__PURE__ */ l("p", {
|
|
362
369
|
className: "text-[10px] text-foreground-subtle flex-1 leading-relaxed",
|
|
363
370
|
children: L === null ? Z.on === null ? "The camera did not report its microphone, so this state is unknown." : Z.costWhenOff : `Write failed: ${L}`
|
|
364
371
|
})]
|
|
@@ -367,4 +374,4 @@ function b({ deviceId: a }) {
|
|
|
367
374
|
}) : null;
|
|
368
375
|
}
|
|
369
376
|
//#endregion
|
|
370
|
-
export {
|
|
377
|
+
export { v as PrivacyMaskSettings };
|
package/dist/_stub.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "./virtualExposes-BgZ5Cn7S.mjs";
|
|
2
|
-
import "./virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_osd_manager_page__remoteEntry_js-
|
|
2
|
+
import "./virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_osd_manager_page__remoteEntry_js-DlwwzQuH.mjs";
|
|
3
3
|
import { _ as e, c as t, d as n, h as r, i, l as a, m as o, n as s, p as c, r as l, t as u, u as d, y as f } from "./_virtual_mf___mfe_internal__addon_osd_manager_page__loadShare__react__loadShare__.js-Bs1t18EM.mjs";
|
|
4
4
|
import { i as p, o as m, r as h, s as g } from "./responsive-veJ_u_lF.mjs";
|
|
5
5
|
import { d as _, l as v, u as y } from "./use-device-snapshot-CCUZGgXd.mjs";
|
|
@@ -3471,7 +3471,7 @@ function Ur({ message: e, title: t, onRetry: n, action: r, variant: i = "danger"
|
|
|
3471
3471
|
}
|
|
3472
3472
|
//#endregion
|
|
3473
3473
|
//#region ../../node_modules/qrcode.react/lib/esm/index.js
|
|
3474
|
-
f(), f(), f(), f(), f(), i(() => import("./MotionZonesSettings-CcUQv9US.mjs").then((e) => ({ default: e.MotionZonesSettings }))), i(() => import("./PrivacyMaskSettings-
|
|
3474
|
+
f(), f(), f(), f(), f(), i(() => import("./MotionZonesSettings-CcUQv9US.mjs").then((e) => ({ default: e.MotionZonesSettings }))), i(() => import("./PrivacyMaskSettings-yTPSGJ_S.mjs").then((e) => ({ default: e.PrivacyMaskSettings }))), f(), f();
|
|
3475
3475
|
var Wr = Object.defineProperty, Gr = Object.getOwnPropertySymbols, Kr = Object.prototype.hasOwnProperty, qr = Object.prototype.propertyIsEnumerable, Jr = (e, t, n) => t in e ? Wr(e, t, {
|
|
3476
3476
|
enumerable: !0,
|
|
3477
3477
|
configurable: !0,
|
|
@@ -15698,7 +15698,7 @@ var P_ = class {
|
|
|
15698
15698
|
} catch {}
|
|
15699
15699
|
}
|
|
15700
15700
|
};
|
|
15701
|
-
f(), new P_(), f(), f(), f(), f(), i(() => import("./MaskShapeCanvas-BEVxAjNq.mjs").then((e) => ({ default: e.MaskShapeCanvas }))), i(() => import("./MotionZonesSettings-CcUQv9US.mjs").then((e) => ({ default: e.MotionZonesSettings }))), i(() => import("./SceneMonitorEditor-DSLR3HyX.mjs").then((e) => ({ default: e.SceneMonitorEditor }))), i(() => import("./PrivacyMaskSettings-
|
|
15701
|
+
f(), new P_(), f(), f(), f(), f(), i(() => import("./MaskShapeCanvas-BEVxAjNq.mjs").then((e) => ({ default: e.MaskShapeCanvas }))), i(() => import("./MotionZonesSettings-CcUQv9US.mjs").then((e) => ({ default: e.MotionZonesSettings }))), i(() => import("./SceneMonitorEditor-DSLR3HyX.mjs").then((e) => ({ default: e.SceneMonitorEditor }))), i(() => import("./PrivacyMaskSettings-yTPSGJ_S.mjs").then((e) => ({ default: e.PrivacyMaskSettings })));
|
|
15702
15702
|
//#endregion
|
|
15703
15703
|
//#region ../../node_modules/lucide-react/dist/esm/shared/src/utils.js
|
|
15704
15704
|
var F_ = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), I_ = (e) => e.replace(/^([A-Z])|[\s-_]+(\w)/g, (e, t, n) => n ? n.toUpperCase() : t.toLowerCase()), L_ = (e) => {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import "./virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_osd_manager_page__remoteEntry_js-
|
|
1
|
+
import "./virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_osd_manager_page__remoteEntry_js-DlwwzQuH.mjs";
|
|
2
2
|
//#region \0virtual:mf-localSharedImportMap:__mfe_internal__addon_osd_manager_page
|
|
3
3
|
var e = {
|
|
4
4
|
"@camstack/sdk": {
|
|
5
5
|
name: "@camstack/sdk",
|
|
6
|
-
version: "1.2.
|
|
6
|
+
version: "1.2.86",
|
|
7
7
|
scope: ["default"],
|
|
8
8
|
loaded: !1,
|
|
9
9
|
from: "addon_osd_manager_page",
|
|
@@ -18,7 +18,7 @@ var e = {
|
|
|
18
18
|
},
|
|
19
19
|
"@camstack/types": {
|
|
20
20
|
name: "@camstack/types",
|
|
21
|
-
version: "1.2.
|
|
21
|
+
version: "1.2.166",
|
|
22
22
|
scope: ["default"],
|
|
23
23
|
loaded: !1,
|
|
24
24
|
from: "addon_osd_manager_page",
|
|
@@ -33,7 +33,7 @@ var e = {
|
|
|
33
33
|
},
|
|
34
34
|
"@camstack/ui-library": {
|
|
35
35
|
name: "@camstack/ui-library",
|
|
36
|
-
version: "1.2.
|
|
36
|
+
version: "1.2.134",
|
|
37
37
|
scope: ["default"],
|
|
38
38
|
loaded: !1,
|
|
39
39
|
from: "addon_osd_manager_page",
|
|
@@ -36,7 +36,7 @@ async function r() {
|
|
|
36
36
|
}
|
|
37
37
|
},
|
|
38
38
|
"@camstack/types": {
|
|
39
|
-
version: "1.2.
|
|
39
|
+
version: "1.2.166",
|
|
40
40
|
scope: "default",
|
|
41
41
|
shareConfig: {
|
|
42
42
|
singleton: !0,
|
|
@@ -45,7 +45,7 @@ async function r() {
|
|
|
45
45
|
}
|
|
46
46
|
},
|
|
47
47
|
"@camstack/sdk": {
|
|
48
|
-
version: "1.2.
|
|
48
|
+
version: "1.2.86",
|
|
49
49
|
scope: "default",
|
|
50
50
|
shareConfig: {
|
|
51
51
|
singleton: !0,
|
|
@@ -81,7 +81,7 @@ async function r() {
|
|
|
81
81
|
}
|
|
82
82
|
},
|
|
83
83
|
"@camstack/ui-library": {
|
|
84
|
-
version: "1.2.
|
|
84
|
+
version: "1.2.134",
|
|
85
85
|
scope: "default",
|
|
86
86
|
shareConfig: {
|
|
87
87
|
singleton: !0,
|
package/dist/index.js
CHANGED
|
@@ -12847,6 +12847,9 @@ var QueryFilterSchema = object({
|
|
|
12847
12847
|
whereBetween: record(string(), tuple([unknown(), unknown()])).optional(),
|
|
12848
12848
|
/** NULL-safe exclusion: matches rows whose field is NULL OR != the value. */
|
|
12849
12849
|
whereNot: record(string(), unknown()).optional(),
|
|
12850
|
+
/** NULL-safe exclusion of a SET — `whereNot` for more than one value. An
|
|
12851
|
+
* empty list excludes nothing. See `QueryFilter.whereNotIn`. */
|
|
12852
|
+
whereNotIn: record(string(), array(unknown())).optional(),
|
|
12850
12853
|
orderBy: object({
|
|
12851
12854
|
field: string(),
|
|
12852
12855
|
direction: _enum(["asc", "desc"])
|
|
@@ -12867,7 +12870,8 @@ var MutationFilterSchema = object({
|
|
|
12867
12870
|
where: record(string(), unknown()).optional(),
|
|
12868
12871
|
whereIn: record(string(), array(unknown())).optional(),
|
|
12869
12872
|
whereBetween: record(string(), tuple([unknown(), unknown()])).optional(),
|
|
12870
|
-
whereNot: record(string(), unknown()).optional()
|
|
12873
|
+
whereNot: record(string(), unknown()).optional(),
|
|
12874
|
+
whereNotIn: record(string(), array(unknown())).optional()
|
|
12871
12875
|
});
|
|
12872
12876
|
/**
|
|
12873
12877
|
* One scalar an {@link settingsStoreCapability.methods.aggregate} call asks for.
|
|
@@ -21530,10 +21534,12 @@ var TrackSourceSchema = _enum([
|
|
|
21530
21534
|
* Terminal for the plain `markForTrain` toggle: returning it to `staging` is
|
|
21531
21535
|
* a deliberate action of the retrain page, not a side effect of a checkbox.
|
|
21532
21536
|
*
|
|
21533
|
-
* There is no `null`. The state is stored `TEXT NOT NULL DEFAULT 'none'`
|
|
21534
|
-
*
|
|
21535
|
-
*
|
|
21536
|
-
*
|
|
21537
|
+
* There is no `null`. The state is stored `TEXT NOT NULL DEFAULT 'none'` so that
|
|
21538
|
+
* every row is selectable by a positive predicate. (The filter language has
|
|
21539
|
+
* since grown the NULL-safe `whereNot` / `whereNotIn` and an `IS NULL` reading
|
|
21540
|
+
* of `where: { f: null }`, which is how {@link TrackSourceSchema} can be
|
|
21541
|
+
* filtered on a NULLABLE column — see `excludeSources`. It did not when this
|
|
21542
|
+
* column was designed, and a NOT NULL column is still the better shape.)
|
|
21537
21543
|
*/
|
|
21538
21544
|
var RetrainStatusSchema = _enum([
|
|
21539
21545
|
"none",
|
|
@@ -22269,7 +22275,9 @@ var RecentTracksQueryInput = object({
|
|
|
22269
22275
|
* whose class list is unreadable are kept, and the client's rule stays the
|
|
22270
22276
|
* exact one.
|
|
22271
22277
|
*/
|
|
22272
|
-
classes: array(string()).optional()
|
|
22278
|
+
classes: array(string()).optional(),
|
|
22279
|
+
/** See {@link ExcludeSourcesDoc}. */
|
|
22280
|
+
excludeSources: array(TrackSourceSchema).optional()
|
|
22273
22281
|
});
|
|
22274
22282
|
/**
|
|
22275
22283
|
* A Summary (D359): the per-camera session envelope that references tracks.
|
|
@@ -22711,7 +22719,9 @@ var pipelineAnalyticsCapability = {
|
|
|
22711
22719
|
* selected is an operator who has not narrowed anything, and an empty
|
|
22712
22720
|
* timeline would read as a camera that saw nothing.
|
|
22713
22721
|
*/
|
|
22714
|
-
classes: array(string()).optional()
|
|
22722
|
+
classes: array(string()).optional(),
|
|
22723
|
+
/** See {@link ExcludeSourcesDoc}. */
|
|
22724
|
+
excludeSources: array(TrackSourceSchema).optional()
|
|
22715
22725
|
}), array(TrackSchema).readonly()),
|
|
22716
22726
|
/**
|
|
22717
22727
|
* Batched cluster-wide track listing — ONE call for the events page /
|
|
@@ -34218,8 +34228,27 @@ var PrivacyMaskRegionSchema = object({
|
|
|
34218
34228
|
/** Current on-camera privacy state — mask master enable + zones + microphone. */
|
|
34219
34229
|
var PrivacyMaskStatusSchema = object({
|
|
34220
34230
|
enabled: boolean(),
|
|
34221
|
-
/**
|
|
34222
|
-
|
|
34231
|
+
/**
|
|
34232
|
+
* Active zones (normalized 0..1). Length ≤ maxRegions.
|
|
34233
|
+
*
|
|
34234
|
+
* `null` means "no answer" — the provider has never reached this camera
|
|
34235
|
+
* (a cold `runtimeState` slice, a battery camera asleep) or the read
|
|
34236
|
+
* failed. A consumer must render it as UNKNOWN and never as "this camera
|
|
34237
|
+
* has no zones": those two look identical to an operator right up to the
|
|
34238
|
+
* moment one of them is acted on, and acting on them differs completely.
|
|
34239
|
+
* The switch group turned an unanswered read into *"nothing is set up for
|
|
34240
|
+
* it to act on"* — an instruction to go and draw a zone that already
|
|
34241
|
+
* exists — and this editor seeded an EMPTY canvas from it, one Save away
|
|
34242
|
+
* from deleting the mask it could not read.
|
|
34243
|
+
*
|
|
34244
|
+
* Empty-and-answered is `[]` and stays a real answer: this camera genuinely
|
|
34245
|
+
* has no zones. The distinction is the same one {@link
|
|
34246
|
+
* PrivacyMaskStatusSchema.shape.audioEnabled} already draws for the
|
|
34247
|
+
* microphone, on the very same payload — both planes come from ONE refresh,
|
|
34248
|
+
* so it was never coherent for one of them to be able to say "unknown"
|
|
34249
|
+
* while the other could not.
|
|
34250
|
+
*/
|
|
34251
|
+
regions: array(PrivacyMaskRegionSchema).nullable(),
|
|
34223
34252
|
/**
|
|
34224
34253
|
* Is the camera capturing sound right now? Read from the camera, never from
|
|
34225
34254
|
* a server-side mirror.
|
package/dist/index.mjs
CHANGED
|
@@ -12843,6 +12843,9 @@ var QueryFilterSchema = object({
|
|
|
12843
12843
|
whereBetween: record(string(), tuple([unknown(), unknown()])).optional(),
|
|
12844
12844
|
/** NULL-safe exclusion: matches rows whose field is NULL OR != the value. */
|
|
12845
12845
|
whereNot: record(string(), unknown()).optional(),
|
|
12846
|
+
/** NULL-safe exclusion of a SET — `whereNot` for more than one value. An
|
|
12847
|
+
* empty list excludes nothing. See `QueryFilter.whereNotIn`. */
|
|
12848
|
+
whereNotIn: record(string(), array(unknown())).optional(),
|
|
12846
12849
|
orderBy: object({
|
|
12847
12850
|
field: string(),
|
|
12848
12851
|
direction: _enum(["asc", "desc"])
|
|
@@ -12863,7 +12866,8 @@ var MutationFilterSchema = object({
|
|
|
12863
12866
|
where: record(string(), unknown()).optional(),
|
|
12864
12867
|
whereIn: record(string(), array(unknown())).optional(),
|
|
12865
12868
|
whereBetween: record(string(), tuple([unknown(), unknown()])).optional(),
|
|
12866
|
-
whereNot: record(string(), unknown()).optional()
|
|
12869
|
+
whereNot: record(string(), unknown()).optional(),
|
|
12870
|
+
whereNotIn: record(string(), array(unknown())).optional()
|
|
12867
12871
|
});
|
|
12868
12872
|
/**
|
|
12869
12873
|
* One scalar an {@link settingsStoreCapability.methods.aggregate} call asks for.
|
|
@@ -21526,10 +21530,12 @@ var TrackSourceSchema = _enum([
|
|
|
21526
21530
|
* Terminal for the plain `markForTrain` toggle: returning it to `staging` is
|
|
21527
21531
|
* a deliberate action of the retrain page, not a side effect of a checkbox.
|
|
21528
21532
|
*
|
|
21529
|
-
* There is no `null`. The state is stored `TEXT NOT NULL DEFAULT 'none'`
|
|
21530
|
-
*
|
|
21531
|
-
*
|
|
21532
|
-
*
|
|
21533
|
+
* There is no `null`. The state is stored `TEXT NOT NULL DEFAULT 'none'` so that
|
|
21534
|
+
* every row is selectable by a positive predicate. (The filter language has
|
|
21535
|
+
* since grown the NULL-safe `whereNot` / `whereNotIn` and an `IS NULL` reading
|
|
21536
|
+
* of `where: { f: null }`, which is how {@link TrackSourceSchema} can be
|
|
21537
|
+
* filtered on a NULLABLE column — see `excludeSources`. It did not when this
|
|
21538
|
+
* column was designed, and a NOT NULL column is still the better shape.)
|
|
21533
21539
|
*/
|
|
21534
21540
|
var RetrainStatusSchema = _enum([
|
|
21535
21541
|
"none",
|
|
@@ -22265,7 +22271,9 @@ var RecentTracksQueryInput = object({
|
|
|
22265
22271
|
* whose class list is unreadable are kept, and the client's rule stays the
|
|
22266
22272
|
* exact one.
|
|
22267
22273
|
*/
|
|
22268
|
-
classes: array(string()).optional()
|
|
22274
|
+
classes: array(string()).optional(),
|
|
22275
|
+
/** See {@link ExcludeSourcesDoc}. */
|
|
22276
|
+
excludeSources: array(TrackSourceSchema).optional()
|
|
22269
22277
|
});
|
|
22270
22278
|
/**
|
|
22271
22279
|
* A Summary (D359): the per-camera session envelope that references tracks.
|
|
@@ -22707,7 +22715,9 @@ var pipelineAnalyticsCapability = {
|
|
|
22707
22715
|
* selected is an operator who has not narrowed anything, and an empty
|
|
22708
22716
|
* timeline would read as a camera that saw nothing.
|
|
22709
22717
|
*/
|
|
22710
|
-
classes: array(string()).optional()
|
|
22718
|
+
classes: array(string()).optional(),
|
|
22719
|
+
/** See {@link ExcludeSourcesDoc}. */
|
|
22720
|
+
excludeSources: array(TrackSourceSchema).optional()
|
|
22711
22721
|
}), array(TrackSchema).readonly()),
|
|
22712
22722
|
/**
|
|
22713
22723
|
* Batched cluster-wide track listing — ONE call for the events page /
|
|
@@ -34214,8 +34224,27 @@ var PrivacyMaskRegionSchema = object({
|
|
|
34214
34224
|
/** Current on-camera privacy state — mask master enable + zones + microphone. */
|
|
34215
34225
|
var PrivacyMaskStatusSchema = object({
|
|
34216
34226
|
enabled: boolean(),
|
|
34217
|
-
/**
|
|
34218
|
-
|
|
34227
|
+
/**
|
|
34228
|
+
* Active zones (normalized 0..1). Length ≤ maxRegions.
|
|
34229
|
+
*
|
|
34230
|
+
* `null` means "no answer" — the provider has never reached this camera
|
|
34231
|
+
* (a cold `runtimeState` slice, a battery camera asleep) or the read
|
|
34232
|
+
* failed. A consumer must render it as UNKNOWN and never as "this camera
|
|
34233
|
+
* has no zones": those two look identical to an operator right up to the
|
|
34234
|
+
* moment one of them is acted on, and acting on them differs completely.
|
|
34235
|
+
* The switch group turned an unanswered read into *"nothing is set up for
|
|
34236
|
+
* it to act on"* — an instruction to go and draw a zone that already
|
|
34237
|
+
* exists — and this editor seeded an EMPTY canvas from it, one Save away
|
|
34238
|
+
* from deleting the mask it could not read.
|
|
34239
|
+
*
|
|
34240
|
+
* Empty-and-answered is `[]` and stays a real answer: this camera genuinely
|
|
34241
|
+
* has no zones. The distinction is the same one {@link
|
|
34242
|
+
* PrivacyMaskStatusSchema.shape.audioEnabled} already draws for the
|
|
34243
|
+
* microphone, on the very same payload — both planes come from ONE refresh,
|
|
34244
|
+
* so it was never coherent for one of them to be able to say "unknown"
|
|
34245
|
+
* while the other could not.
|
|
34246
|
+
*/
|
|
34247
|
+
regions: array(PrivacyMaskRegionSchema).nullable(),
|
|
34219
34248
|
/**
|
|
34220
34249
|
* Is the camera capturing sound right now? Read from the camera, never from
|
|
34221
34250
|
* a server-side mirror.
|
package/dist/remoteEntry.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as e, t } from "./virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_osd_manager_page__remoteEntry_js-
|
|
1
|
+
import { n as e, t } from "./virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_osd_manager_page__remoteEntry_js-DlwwzQuH.mjs";
|
|
2
2
|
export { t as get, e as init };
|
|
@@ -2753,7 +2753,7 @@ async function rr(e) {
|
|
|
2753
2753
|
}
|
|
2754
2754
|
}
|
|
2755
2755
|
async function ir() {
|
|
2756
|
-
return tr ||= rr(() => import("./_virtual_mf-localSharedImportMap___mfe_internal__addon_osd_manager_page-
|
|
2756
|
+
return tr ||= rr(() => import("./_virtual_mf-localSharedImportMap___mfe_internal__addon_osd_manager_page-CwQlxGtO.mjs")).catch((e) => {
|
|
2757
2757
|
throw tr = void 0, e;
|
|
2758
2758
|
}), tr;
|
|
2759
2759
|
}
|