@camstack/addon-osd-manager 0.1.208 → 0.1.210
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/{MaskShapeCanvas-mrxtKs_l.mjs → MaskShapeCanvas-CU-mFCnh.mjs} +85 -85
- package/dist/{MotionZonesSettings-BEKlAp3j.mjs → MotionZonesSettings-BOMqyA8D.mjs} +121 -121
- package/dist/{PrivacyMaskSettings-CfwBKEUj.mjs → PrivacyMaskSettings-DR_g9jND.mjs} +48 -23
- package/dist/{SceneMonitorEditor-oMhhrxG4.mjs → SceneMonitorEditor-mzuqDsi9.mjs} +340 -340
- package/dist/_stub.js +5804 -10338
- package/dist/{_virtual_mf-localSharedImportMap___mfe_internal__addon_osd_manager_page-B_5-0uQg.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_osd_manager_page-A0lu4l7T.mjs} +2 -2
- package/dist/{_virtual_mf___mfe_internal__addon_osd_manager_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-DVaKG6N9.mjs → _virtual_mf___mfe_internal__addon_osd_manager_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-BSnlYHh_.mjs} +8 -8
- package/dist/_virtual_mf___mfe_internal__addon_osd_manager_page__loadShare___mf_0_tanstack_mf_1_react_mf_2_query__loadShare__.js-B7mAiXr4.mjs +26 -0
- package/dist/{_virtual_mf___mfe_internal__addon_osd_manager_page__loadShare__react__loadShare__.js-D7xZfSHZ.mjs → _virtual_mf___mfe_internal__addon_osd_manager_page__loadShare__react__loadShare__.js-BbmIfQSr.mjs} +1 -1
- package/dist/addon-osd-manager.css +1 -1
- package/dist/{hostInit-clYu3aai.mjs → hostInit-rmepj1kF.mjs} +1 -1
- package/dist/{player-overlays-ClSUtI17.mjs → player-overlays-CcNrk_MT.mjs} +14 -14
- package/dist/remoteEntry.js +1 -1
- package/dist/{responsive-O5wfBz1Z.mjs → responsive-1AzUOsiE.mjs} +41 -45
- package/dist/{scene-monitor-copy-DUa3J0e0.mjs → scene-monitor-copy-DZU3yR_i.mjs} +12 -12
- package/dist/{square-D5EA42_L.mjs → square-i0Ohr5KP.mjs} +4 -29
- package/dist/{trash-2-C6XCyR8J.mjs → trash-2-yT5cDj5i.mjs} +1 -1
- package/dist/{virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_osd_manager_page__remoteEntry_js-Bua1Hsu9.mjs → virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_osd_manager_page__remoteEntry_js-B-8oug3V.mjs} +1 -1
- package/package.json +1 -1
- package/dist/_virtual_mf___mfe_internal__addon_osd_manager_page__loadShare___mf_0_tanstack_mf_1_react_mf_2_query__loadShare__.js-CHxDN0gE.mjs +0 -26
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { c as o,
|
|
3
|
-
import { n as d, t as f } from "./player-overlays-
|
|
1
|
+
import { b as e, c as t, g as n, h as r, m as i, u as a } from "./_virtual_mf___mfe_internal__addon_osd_manager_page__loadShare__react__loadShare__.js-BbmIfQSr.mjs";
|
|
2
|
+
import { c as o, d as s, l as c, p as l, s as u } from "./responsive-1AzUOsiE.mjs";
|
|
3
|
+
import { n as d, t as f } from "./player-overlays-CcNrk_MT.mjs";
|
|
4
4
|
import { n as p, r as m, t as ee } from "./_virtual_mf___mfe_internal__addon_osd_manager_page__loadShare__react_mf_1_jsx_mf_2_runtime__loadShare__.js-DalfdIDw.mjs";
|
|
5
|
-
import { MaskShapeCanvas as h } from "./MaskShapeCanvas-
|
|
5
|
+
import { MaskShapeCanvas as h } from "./MaskShapeCanvas-CU-mFCnh.mjs";
|
|
6
6
|
var g = l("grid-2x2", [
|
|
7
7
|
["path", {
|
|
8
8
|
d: "M12 3v18",
|
|
@@ -23,180 +23,180 @@ var g = l("grid-2x2", [
|
|
|
23
23
|
]);
|
|
24
24
|
//#endregion
|
|
25
25
|
//#region ../ui-library/src/composites/cap-settings/MotionZonesSettings.tsx
|
|
26
|
-
|
|
27
|
-
var
|
|
26
|
+
e();
|
|
27
|
+
var te = 110, _ = "motion-zones", v = 0, ne = [
|
|
28
28
|
1,
|
|
29
29
|
2,
|
|
30
30
|
3
|
|
31
|
-
],
|
|
32
|
-
function
|
|
31
|
+
], y = 1, b = "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", x = "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";
|
|
32
|
+
function S(e, t, n) {
|
|
33
33
|
let r = t * n, i = Array.from({ length: r });
|
|
34
34
|
for (let t = 0; t < r; t += 1) i[t] = e[t] === !0;
|
|
35
35
|
return i;
|
|
36
36
|
}
|
|
37
|
-
function
|
|
37
|
+
function re(e, t) {
|
|
38
38
|
if (e.length !== t.length) return !1;
|
|
39
39
|
for (let n = 0; n < e.length; n += 1) if (e[n] !== t[n]) return !1;
|
|
40
40
|
return !0;
|
|
41
41
|
}
|
|
42
|
-
function
|
|
42
|
+
function C(e, t) {
|
|
43
43
|
return Math.ceil(e / t);
|
|
44
44
|
}
|
|
45
|
-
function
|
|
45
|
+
function w(e, t, n) {
|
|
46
46
|
return Math.min(n - 1, Math.floor((e + .5) / t * n));
|
|
47
47
|
}
|
|
48
|
-
function
|
|
49
|
-
let i =
|
|
48
|
+
function T(e, t, n, r) {
|
|
49
|
+
let i = C(t, r), a = C(n, r), o = Array.from({ length: i * a }, () => !1);
|
|
50
50
|
for (let r = 0; r < n; r += 1) {
|
|
51
|
-
let s =
|
|
52
|
-
for (let n = 0; n < t; n += 1) e[r * t + n] === !0 && (o[s * i +
|
|
51
|
+
let s = w(r, n, a);
|
|
52
|
+
for (let n = 0; n < t; n += 1) e[r * t + n] === !0 && (o[s * i + w(n, t, i)] = !0);
|
|
53
53
|
}
|
|
54
54
|
return o;
|
|
55
55
|
}
|
|
56
|
-
function
|
|
57
|
-
let i =
|
|
56
|
+
function E(e, t, n, r) {
|
|
57
|
+
let i = C(t, r), a = C(n, r), o = Array.from({ length: t * n }, () => !1);
|
|
58
58
|
for (let r = 0; r < n; r += 1) {
|
|
59
|
-
let s =
|
|
60
|
-
for (let n = 0; n < t; n += 1) o[r * t + n] = e[s * i +
|
|
59
|
+
let s = w(r, n, a);
|
|
60
|
+
for (let n = 0; n < t; n += 1) o[r * t + n] = e[s * i + w(n, t, i)] === !0;
|
|
61
61
|
}
|
|
62
62
|
return o;
|
|
63
63
|
}
|
|
64
|
-
function
|
|
65
|
-
let l = c(s().trpcClient,
|
|
66
|
-
|
|
64
|
+
function D({ deviceId: e }) {
|
|
65
|
+
let l = c(s().trpcClient, e), [w, D] = n(null), [O, k] = n(!1), [A, j] = n(null), [M, N] = n(null), [P, F] = n(y), [I, L] = n(!1), [R, z] = n(!1), B = r(!1);
|
|
66
|
+
a(() => {
|
|
67
67
|
if (!l) return;
|
|
68
68
|
let e = !1;
|
|
69
|
-
return
|
|
69
|
+
return B.current = !1, D(null), k(!1), j(null), N(null), F(y), z(!1), (async () => {
|
|
70
70
|
try {
|
|
71
71
|
let t = await l.motionZones?.getOptions({});
|
|
72
72
|
if (e) return;
|
|
73
73
|
if (!t) throw Error("device proxy not ready");
|
|
74
|
-
if (
|
|
74
|
+
if (D(t), B.current) return;
|
|
75
75
|
let n = await l.motionZones?.getStatus({});
|
|
76
76
|
if (e) return;
|
|
77
77
|
if (!n) throw Error("device proxy not ready");
|
|
78
|
-
|
|
79
|
-
let r = n.regions.find((e) => e.shape.kind === "grid"), i =
|
|
80
|
-
|
|
78
|
+
B.current = !0;
|
|
79
|
+
let r = n.regions.find((e) => e.shape.kind === "grid"), i = S(r ? r.shape.cells : [], t.grid.width, t.grid.height);
|
|
80
|
+
N(i), j(T(i, t.grid.width, t.grid.height, y));
|
|
81
81
|
} catch (t) {
|
|
82
82
|
if (e) return;
|
|
83
|
-
o(t) ?
|
|
83
|
+
o(t) ? k(!0) : console.error("Motion Zones load failed", t);
|
|
84
84
|
}
|
|
85
85
|
})(), () => {
|
|
86
86
|
e = !0;
|
|
87
87
|
};
|
|
88
88
|
}, [l]);
|
|
89
|
-
let
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
]),
|
|
96
|
-
|
|
97
|
-
}, [
|
|
98
|
-
|
|
99
|
-
}, []),
|
|
100
|
-
|
|
89
|
+
let V = w ? w.grid.width : 0, H = w ? w.grid.height : 0, U = C(V, P), W = C(H, P), G = i(() => A && w ? E(A, V, H, P) : null, [
|
|
90
|
+
A,
|
|
91
|
+
w,
|
|
92
|
+
V,
|
|
93
|
+
H,
|
|
94
|
+
P
|
|
95
|
+
]), K = i(() => G !== null && M !== null && !re(G, M), [G, M]), q = i(() => G ? G.reduce((e, t) => t ? e + 1 : e, 0) : 0, [G]), J = V * H, Y = U * W, X = t((e) => {
|
|
96
|
+
Y > 0 && j(Array.from({ length: Y }, () => e));
|
|
97
|
+
}, [Y]), ie = t(() => {
|
|
98
|
+
j((e) => e && e.map((e) => !e));
|
|
99
|
+
}, []), Z = t(() => {
|
|
100
|
+
M && w && j(T(M, V, H, P));
|
|
101
101
|
}, [
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
102
|
+
M,
|
|
103
|
+
w,
|
|
104
|
+
V,
|
|
105
|
+
H,
|
|
106
|
+
P
|
|
107
107
|
]), ae = t((e) => {
|
|
108
|
-
e ===
|
|
109
|
-
if (!t) return
|
|
110
|
-
let n =
|
|
111
|
-
return
|
|
108
|
+
e === P || !w || j((t) => {
|
|
109
|
+
if (!t) return F(e), t;
|
|
110
|
+
let n = T(E(t, V, H, P), V, H, e);
|
|
111
|
+
return F(e), n;
|
|
112
112
|
});
|
|
113
113
|
}, [
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
]), Q =
|
|
119
|
-
id:
|
|
114
|
+
P,
|
|
115
|
+
w,
|
|
116
|
+
V,
|
|
117
|
+
H
|
|
118
|
+
]), Q = i(() => w && A ? [{
|
|
119
|
+
id: v,
|
|
120
120
|
shape: {
|
|
121
121
|
kind: "grid",
|
|
122
|
-
gridWidth:
|
|
123
|
-
gridHeight:
|
|
124
|
-
cells: [...
|
|
122
|
+
gridWidth: U,
|
|
123
|
+
gridHeight: W,
|
|
124
|
+
cells: [...A]
|
|
125
125
|
}
|
|
126
126
|
}] : [], [
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
127
|
+
w,
|
|
128
|
+
A,
|
|
129
|
+
U,
|
|
130
|
+
W
|
|
131
131
|
]), $ = t((e, t) => {
|
|
132
|
-
t.kind === "grid" &&
|
|
132
|
+
t.kind === "grid" && j(t.cells);
|
|
133
133
|
}, []), oe = t(async () => {
|
|
134
|
-
if (!(!l || !
|
|
135
|
-
|
|
134
|
+
if (!(!l || !A || !w)) {
|
|
135
|
+
L(!0);
|
|
136
136
|
try {
|
|
137
|
-
let e =
|
|
137
|
+
let e = E(A, w.grid.width, w.grid.height, P), t = {
|
|
138
138
|
kind: "grid",
|
|
139
|
-
gridWidth:
|
|
140
|
-
gridHeight:
|
|
139
|
+
gridWidth: w.grid.width,
|
|
140
|
+
gridHeight: w.grid.height,
|
|
141
141
|
cells: e
|
|
142
142
|
};
|
|
143
143
|
await l.motionZones?.setZone({ patch: { regions: [{
|
|
144
|
-
id:
|
|
144
|
+
id: v,
|
|
145
145
|
enabled: !0,
|
|
146
146
|
shape: t
|
|
147
147
|
}] } });
|
|
148
148
|
let n = await l.motionZones?.getStatus({});
|
|
149
149
|
if (n) {
|
|
150
|
-
let e = n.regions.find((e) => e.shape.kind === "grid"), t =
|
|
151
|
-
|
|
150
|
+
let e = n.regions.find((e) => e.shape.kind === "grid"), t = S(e ? e.shape.cells : [], w.grid.width, w.grid.height);
|
|
151
|
+
N(t), j(T(t, w.grid.width, w.grid.height, P));
|
|
152
152
|
}
|
|
153
153
|
} catch (e) {
|
|
154
154
|
console.error("Motion Zones save failed", e);
|
|
155
155
|
} finally {
|
|
156
|
-
|
|
156
|
+
L(!1);
|
|
157
157
|
}
|
|
158
158
|
}
|
|
159
159
|
}, [
|
|
160
160
|
l,
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
161
|
+
A,
|
|
162
|
+
w,
|
|
163
|
+
P
|
|
164
164
|
]);
|
|
165
|
-
return f(
|
|
166
|
-
id:
|
|
167
|
-
order:
|
|
165
|
+
return f(i(() => R && !O && w && A ? {
|
|
166
|
+
id: _,
|
|
167
|
+
order: te,
|
|
168
168
|
node: /* @__PURE__ */ p(h, {
|
|
169
169
|
transparent: !0,
|
|
170
170
|
items: Q,
|
|
171
171
|
supportedShapes: ["grid"],
|
|
172
172
|
grid: {
|
|
173
|
-
width:
|
|
174
|
-
height:
|
|
173
|
+
width: U,
|
|
174
|
+
height: W
|
|
175
175
|
},
|
|
176
|
-
selectedId:
|
|
176
|
+
selectedId: v,
|
|
177
177
|
onSelect: () => {},
|
|
178
178
|
onShapeChange: $,
|
|
179
179
|
onDrawComplete: () => {},
|
|
180
180
|
drawingKind: null
|
|
181
181
|
})
|
|
182
182
|
} : null, [
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
183
|
+
R,
|
|
184
|
+
O,
|
|
185
|
+
w,
|
|
186
|
+
A,
|
|
187
187
|
Q,
|
|
188
188
|
$,
|
|
189
|
-
|
|
190
|
-
|
|
189
|
+
U,
|
|
190
|
+
W
|
|
191
191
|
])), l ? /* @__PURE__ */ p(d, {
|
|
192
192
|
title: "Motion Zones",
|
|
193
193
|
icon: /* @__PURE__ */ p(g, { className: "h-3.5 w-3.5 text-foreground-subtle" }),
|
|
194
194
|
children: /* @__PURE__ */ p("div", {
|
|
195
195
|
className: "flex flex-col gap-3",
|
|
196
|
-
children:
|
|
196
|
+
children: O ? /* @__PURE__ */ p("p", {
|
|
197
197
|
className: `${u} leading-relaxed`,
|
|
198
198
|
children: "This camera doesn't expose an on-board motion zones grid."
|
|
199
|
-
}) : !
|
|
199
|
+
}) : !O && w !== null && A !== null ? /* @__PURE__ */ m(ee, { children: [/* @__PURE__ */ m("p", {
|
|
200
200
|
className: `${u} leading-relaxed`,
|
|
201
201
|
children: [
|
|
202
202
|
"Toggle ",
|
|
@@ -216,9 +216,9 @@ function A({ deviceId: a }) {
|
|
|
216
216
|
children: "Cell size"
|
|
217
217
|
}),
|
|
218
218
|
" for quicker, broad-stroke painting — it's resampled to the camera's native ",
|
|
219
|
-
|
|
219
|
+
w.grid.width,
|
|
220
220
|
"×",
|
|
221
|
-
|
|
221
|
+
w.grid.height,
|
|
222
222
|
" grid on save (×1 is the finest)."
|
|
223
223
|
]
|
|
224
224
|
}), /* @__PURE__ */ m("div", {
|
|
@@ -226,31 +226,31 @@ function A({ deviceId: a }) {
|
|
|
226
226
|
children: [
|
|
227
227
|
/* @__PURE__ */ p("button", {
|
|
228
228
|
type: "button",
|
|
229
|
-
onClick: () =>
|
|
230
|
-
disabled:
|
|
231
|
-
"aria-pressed":
|
|
232
|
-
className:
|
|
233
|
-
children:
|
|
229
|
+
onClick: () => z((e) => !e),
|
|
230
|
+
disabled: I,
|
|
231
|
+
"aria-pressed": R,
|
|
232
|
+
className: R ? x : b,
|
|
233
|
+
children: R ? "Done editing" : "Edit grid"
|
|
234
234
|
}),
|
|
235
235
|
/* @__PURE__ */ p("button", {
|
|
236
236
|
type: "button",
|
|
237
|
-
onClick: () =>
|
|
238
|
-
disabled:
|
|
239
|
-
className:
|
|
237
|
+
onClick: () => X(!0),
|
|
238
|
+
disabled: I,
|
|
239
|
+
className: b,
|
|
240
240
|
children: "All on"
|
|
241
241
|
}),
|
|
242
242
|
/* @__PURE__ */ p("button", {
|
|
243
243
|
type: "button",
|
|
244
|
-
onClick: () =>
|
|
245
|
-
disabled:
|
|
246
|
-
className:
|
|
244
|
+
onClick: () => X(!1),
|
|
245
|
+
disabled: I,
|
|
246
|
+
className: b,
|
|
247
247
|
children: "All off"
|
|
248
248
|
}),
|
|
249
249
|
/* @__PURE__ */ p("button", {
|
|
250
250
|
type: "button",
|
|
251
|
-
onClick:
|
|
252
|
-
disabled:
|
|
253
|
-
className:
|
|
251
|
+
onClick: ie,
|
|
252
|
+
disabled: I,
|
|
253
|
+
className: b,
|
|
254
254
|
children: "Invert"
|
|
255
255
|
}),
|
|
256
256
|
/* @__PURE__ */ m("div", {
|
|
@@ -260,43 +260,43 @@ function A({ deviceId: a }) {
|
|
|
260
260
|
children: [/* @__PURE__ */ p("span", {
|
|
261
261
|
className: `${u} mr-0.5`,
|
|
262
262
|
children: "Cell size"
|
|
263
|
-
}),
|
|
263
|
+
}), ne.map((e) => /* @__PURE__ */ m("button", {
|
|
264
264
|
type: "button",
|
|
265
265
|
onClick: () => ae(e),
|
|
266
|
-
disabled:
|
|
267
|
-
"aria-pressed":
|
|
268
|
-
title: e === 1 ? `Camera grid ${
|
|
269
|
-
className:
|
|
266
|
+
disabled: I,
|
|
267
|
+
"aria-pressed": P === e,
|
|
268
|
+
title: e === 1 ? `Camera grid ${V}×${H} (finest)` : `${C(V, e)}×${C(H, e)} painting grid · cells ×${e} bigger`,
|
|
269
|
+
className: P === e ? x : b,
|
|
270
270
|
children: ["×", e]
|
|
271
271
|
}, e))]
|
|
272
272
|
}),
|
|
273
273
|
/* @__PURE__ */ m("span", {
|
|
274
274
|
className: `${u} ml-1 tabular-nums`,
|
|
275
275
|
children: [
|
|
276
|
-
|
|
276
|
+
q,
|
|
277
277
|
" / ",
|
|
278
|
-
|
|
278
|
+
J,
|
|
279
279
|
" cells · ",
|
|
280
|
-
|
|
280
|
+
w.grid.width,
|
|
281
281
|
"×",
|
|
282
|
-
|
|
283
|
-
|
|
282
|
+
w.grid.height,
|
|
283
|
+
P === 1 ? "" : ` · paint ${U}×${W}`
|
|
284
284
|
]
|
|
285
285
|
}),
|
|
286
286
|
/* @__PURE__ */ p("span", { className: "flex-1" }),
|
|
287
287
|
/* @__PURE__ */ p("button", {
|
|
288
288
|
type: "button",
|
|
289
|
-
onClick:
|
|
290
|
-
disabled:
|
|
289
|
+
onClick: Z,
|
|
290
|
+
disabled: I || !K,
|
|
291
291
|
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",
|
|
292
292
|
children: "Revert"
|
|
293
293
|
}),
|
|
294
294
|
/* @__PURE__ */ p("button", {
|
|
295
295
|
type: "button",
|
|
296
296
|
onClick: () => void oe(),
|
|
297
|
-
disabled:
|
|
298
|
-
className:
|
|
299
|
-
children:
|
|
297
|
+
disabled: I || !K,
|
|
298
|
+
className: x,
|
|
299
|
+
children: I ? "Saving…" : "Save"
|
|
300
300
|
})
|
|
301
301
|
]
|
|
302
302
|
})] }) : /* @__PURE__ */ p("p", {
|
|
@@ -307,4 +307,4 @@ function A({ deviceId: a }) {
|
|
|
307
307
|
}) : null;
|
|
308
308
|
}
|
|
309
309
|
//#endregion
|
|
310
|
-
export {
|
|
310
|
+
export { D as MotionZonesSettings };
|
|
@@ -1,17 +1,42 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { c as ee,
|
|
3
|
-
import { n as re, t as ie } from "./player-overlays-
|
|
4
|
-
import {
|
|
5
|
-
import { t as
|
|
6
|
-
import { n as l, r as u, t as
|
|
7
|
-
import { MaskShapeCanvas as
|
|
8
|
-
var
|
|
1
|
+
import { b as e, c as t, g as n, h as r, m as i, u as a } from "./_virtual_mf___mfe_internal__addon_osd_manager_page__loadShare__react__loadShare__.js-BbmIfQSr.mjs";
|
|
2
|
+
import { c as ee, d as te, l as ne, p as o, s } from "./responsive-1AzUOsiE.mjs";
|
|
3
|
+
import { n as re, t as ie } from "./player-overlays-CcNrk_MT.mjs";
|
|
4
|
+
import { n as ae, r as oe, t as se } from "./square-i0Ohr5KP.mjs";
|
|
5
|
+
import { t as c } from "./trash-2-yT5cDj5i.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-CU-mFCnh.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
|
+
["path", {
|
|
13
|
+
d: "M12 19v3",
|
|
14
|
+
key: "npa21l"
|
|
15
|
+
}],
|
|
16
|
+
["path", {
|
|
17
|
+
d: "M15 9.34V5a3 3 0 0 0-5.68-1.33",
|
|
18
|
+
key: "1gzdoj"
|
|
19
|
+
}],
|
|
20
|
+
["path", {
|
|
21
|
+
d: "M16.95 16.95A7 7 0 0 1 5 12v-2",
|
|
22
|
+
key: "cqa7eg"
|
|
23
|
+
}],
|
|
24
|
+
["path", {
|
|
25
|
+
d: "M18.89 13.23A7 7 0 0 0 19 12v-2",
|
|
26
|
+
key: "16hl24"
|
|
27
|
+
}],
|
|
28
|
+
["path", {
|
|
29
|
+
d: "m2 2 20 20",
|
|
30
|
+
key: "1ooewy"
|
|
31
|
+
}],
|
|
32
|
+
["path", {
|
|
33
|
+
d: "M9 9v3a3 3 0 0 0 5.12 2.12",
|
|
34
|
+
key: "r2i35w"
|
|
35
|
+
}]
|
|
36
|
+
]);
|
|
12
37
|
//#endregion
|
|
13
38
|
//#region ../ui-library/src/composites/cap-settings/privacy-mask-audio.ts
|
|
14
|
-
|
|
39
|
+
e();
|
|
15
40
|
var d = "Microphone", f = "The camera encodes no audio at all — live view, recordings, exports and the audio analyzer are all silent.";
|
|
16
41
|
function p(e) {
|
|
17
42
|
let t = e.supportsAudioMute === !0, n = t ? e.audioEnabled : null, r = e.pendingOn ?? null;
|
|
@@ -42,9 +67,9 @@ function he(e, t) {
|
|
|
42
67
|
for (let n = 0; n < e.length; n += 1) if (JSON.stringify(e[n]) !== JSON.stringify(t[n])) return !1;
|
|
43
68
|
return !0;
|
|
44
69
|
}
|
|
45
|
-
function v({ deviceId:
|
|
46
|
-
let o = ne(te().trpcClient,
|
|
47
|
-
|
|
70
|
+
function v({ deviceId: e }) {
|
|
71
|
+
let o = ne(te().trpcClient, e), [d, f] = n(null), [v, y] = n(!1), [b, x] = n(!1), [S, C] = n(null), [w, T] = n(null), [E, D] = n(!1), [O, k] = n(!1), [A, j] = n(null), [M, N] = n(null), [ge, P] = n(null), [F, I] = n(null), [L, R] = n(null), z = r(!1);
|
|
72
|
+
a(() => {
|
|
48
73
|
if (!o) return;
|
|
49
74
|
let e = !1;
|
|
50
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 () => {
|
|
@@ -74,8 +99,8 @@ function v({ deviceId: a }) {
|
|
|
74
99
|
e = !0;
|
|
75
100
|
};
|
|
76
101
|
}, [o]);
|
|
77
|
-
let B =
|
|
78
|
-
|
|
102
|
+
let B = i(() => 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 = r(0);
|
|
103
|
+
a(() => {
|
|
79
104
|
U.current = H;
|
|
80
105
|
}, [H]);
|
|
81
106
|
let W = H > 0 && V >= H, _e = t(() => {
|
|
@@ -85,7 +110,7 @@ function v({ deviceId: a }) {
|
|
|
85
110
|
});
|
|
86
111
|
}, []), G = t((e) => {
|
|
87
112
|
j(typeof e == "number" ? e : null);
|
|
88
|
-
}, []), K =
|
|
113
|
+
}, []), K = i(() => S ? S.regions.map((e) => ({
|
|
89
114
|
id: e.id,
|
|
90
115
|
shape: e.shape,
|
|
91
116
|
enabled: e.enabled,
|
|
@@ -172,10 +197,10 @@ function v({ deviceId: a }) {
|
|
|
172
197
|
}, [o, Z]), Se = t(() => {
|
|
173
198
|
k((e) => (e && (N(null), j(null)), !e));
|
|
174
199
|
}, []), Q = d?.supportedShapes ?? [];
|
|
175
|
-
ie(
|
|
200
|
+
ie(i(() => O && !v && d && S ? {
|
|
176
201
|
id: pe,
|
|
177
202
|
order: fe,
|
|
178
|
-
node: /* @__PURE__ */ l(
|
|
203
|
+
node: /* @__PURE__ */ l(le, {
|
|
179
204
|
transparent: !0,
|
|
180
205
|
items: K,
|
|
181
206
|
supportedShapes: Q,
|
|
@@ -202,7 +227,7 @@ function v({ deviceId: a }) {
|
|
|
202
227
|
let Ce = d?.supportedShapes.includes("rect") ?? !1, we = d?.supportedShapes.includes("polygon") ?? !1, $ = d !== null && (d.maxRegions <= 0 || d.supportedShapes.length === 0);
|
|
203
228
|
return o ? /* @__PURE__ */ l(re, {
|
|
204
229
|
title: "Privacy Mask",
|
|
205
|
-
icon: /* @__PURE__ */ l(
|
|
230
|
+
icon: /* @__PURE__ */ l(oe, { className: "h-3.5 w-3.5 text-foreground-subtle" }),
|
|
206
231
|
children: /* @__PURE__ */ u("div", {
|
|
207
232
|
className: "flex flex-col gap-3",
|
|
208
233
|
children: [v || $ ? /* @__PURE__ */ l("p", {
|
|
@@ -211,7 +236,7 @@ function v({ deviceId: a }) {
|
|
|
211
236
|
}) : b ? /* @__PURE__ */ l("p", {
|
|
212
237
|
className: `${s} leading-relaxed`,
|
|
213
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."
|
|
214
|
-
}) : !v && !$ && !b && d !== null && S !== null ? /* @__PURE__ */ u(
|
|
239
|
+
}) : !v && !$ && !b && d !== null && S !== null ? /* @__PURE__ */ u(ce, { children: [
|
|
215
240
|
/* @__PURE__ */ u("p", {
|
|
216
241
|
className: `${s} leading-relaxed`,
|
|
217
242
|
children: [
|
|
@@ -294,7 +319,7 @@ function v({ deviceId: a }) {
|
|
|
294
319
|
V > 0 ? /* @__PURE__ */ l("div", {
|
|
295
320
|
className: "flex flex-col gap-1",
|
|
296
321
|
children: S.regions.map((e) => {
|
|
297
|
-
let t = A === e.id, n = e.shape.kind === "polygon" ?
|
|
322
|
+
let t = A === e.id, n = e.shape.kind === "polygon" ? ue : se;
|
|
298
323
|
return /* @__PURE__ */ u("div", {
|
|
299
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"}`,
|
|
300
325
|
children: [/* @__PURE__ */ u("button", {
|
|
@@ -317,7 +342,7 @@ function v({ deviceId: a }) {
|
|
|
317
342
|
"aria-label": `Delete zone ${String(e.id)}`,
|
|
318
343
|
title: "Delete zone",
|
|
319
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",
|
|
320
|
-
children: /* @__PURE__ */ l(
|
|
345
|
+
children: /* @__PURE__ */ l(c, { className: "h-3.5 w-3.5" })
|
|
321
346
|
})]
|
|
322
347
|
}, e.id);
|
|
323
348
|
})
|
|
@@ -338,7 +363,7 @@ function v({ deviceId: a }) {
|
|
|
338
363
|
className: Z.on === !1 || Z.on === null ? h : g,
|
|
339
364
|
children: /* @__PURE__ */ u("span", {
|
|
340
365
|
className: "inline-flex items-center gap-1.5",
|
|
341
|
-
children: [Z.on === !1 ? /* @__PURE__ */ l(
|
|
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"]
|
|
342
367
|
})
|
|
343
368
|
}), /* @__PURE__ */ l("p", {
|
|
344
369
|
className: "text-[10px] text-foreground-subtle flex-1 leading-relaxed",
|