@camstack/addon-benchmark 1.2.134 → 1.2.136
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/{MotionZonesSettings-d8G5XRsb.mjs → MotionZonesSettings-FJcyPXQm.mjs} +55 -55
- package/dist/{PrivacyMaskSettings-BH3EYBwB.mjs → PrivacyMaskSettings-CQS3x7Sb.mjs} +6 -6
- package/dist/{SceneMonitorEditor-Ctl3JRhw.mjs → SceneMonitorEditor-BfRNmfzk.mjs} +67 -67
- package/dist/_stub.js +6173 -5307
- package/dist/{_virtual_mf-localSharedImportMap___mfe_internal__addon_benchmark_page-B7lb4LpK.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_benchmark_page-CNwgdp9r.mjs} +3 -3
- package/dist/_virtual_mf___mfe_internal__addon_benchmark_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-CVijcfdt.mjs +26 -0
- package/dist/addon-benchmark.css +1 -1
- package/dist/{responsive-SfZES1TW.mjs → cap-error-COz9tCrH.mjs} +8 -8
- package/dist/{grid-2x2-CNNcuc4s.mjs → grid-2x2-CSTAAe4Z.mjs} +1 -1
- package/dist/{hostInit-KLir2y5C.mjs → hostInit-BUTS2uRI.mjs} +2 -2
- package/dist/{player-overlays-BEftkTKN.mjs → player-overlays-DWmuijTw.mjs} +4 -4
- package/dist/remoteEntry.js +1 -1
- package/dist/{scene-monitor-copy-BztCg02X.mjs → scene-monitor-copy-Cb2__Tru.mjs} +1 -1
- package/dist/{square-57m8G-UA.mjs → square-KgLQa1_n.mjs} +1 -1
- package/dist/{trash-2-ChL7ccAZ.mjs → trash-2-B27MLhxu.mjs} +1 -1
- package/dist/{virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_benchmark_page__remoteEntry_js-CLCTtFQk.mjs → virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_benchmark_page__remoteEntry_js-C4OOrn9J.mjs} +1 -1
- package/package.json +1 -1
- package/dist/_virtual_mf___mfe_internal__addon_benchmark_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-CK3TmJRu.mjs +0 -26
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import { c as e, g as t, h as n, p as r, u as i, x as a } from "./_virtual_mf___mfe_internal__addon_benchmark_page__loadShare__react__loadShare__.js-GeuxDuzQ.mjs";
|
|
2
|
-
import {
|
|
3
|
-
import { i as
|
|
4
|
-
import { t as
|
|
5
|
-
import { n as
|
|
6
|
-
import { MaskShapeCanvas as
|
|
2
|
+
import { o, s, t as ee, u as te } from "./cap-error-COz9tCrH.mjs";
|
|
3
|
+
import { i as c, t as l } from "./player-overlays-DWmuijTw.mjs";
|
|
4
|
+
import { t as ne } from "./grid-2x2-CSTAAe4Z.mjs";
|
|
5
|
+
import { n as u, r as d, t as f } from "./_virtual_mf___mfe_internal__addon_benchmark_page__loadShare__react_mf_1_jsx_mf_2_runtime__loadShare__.js-SOU_VnTj.mjs";
|
|
6
|
+
import { MaskShapeCanvas as p } from "./MaskShapeCanvas-BDvrLf-K.mjs";
|
|
7
7
|
//#region ../ui-library/src/composites/cap-settings/MotionZonesSettings.tsx
|
|
8
8
|
a();
|
|
9
|
-
var
|
|
9
|
+
var m = 110, h = "motion-zones", g = 0, _ = [
|
|
10
10
|
1,
|
|
11
11
|
2,
|
|
12
12
|
3
|
|
13
|
-
],
|
|
14
|
-
function
|
|
13
|
+
], v = 1, y = "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", b = "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";
|
|
14
|
+
function x(e, t, n) {
|
|
15
15
|
let r = t * n, i = Array.from({ length: r });
|
|
16
16
|
for (let t = 0; t < r; t += 1) i[t] = e[t] === !0;
|
|
17
17
|
return i;
|
|
18
18
|
}
|
|
19
|
-
function
|
|
19
|
+
function S(e, t) {
|
|
20
20
|
if (e.length !== t.length) return !1;
|
|
21
21
|
for (let n = 0; n < e.length; n += 1) if (e[n] !== t[n]) return !1;
|
|
22
22
|
return !0;
|
|
@@ -44,11 +44,11 @@ function E(e, t, n, r) {
|
|
|
44
44
|
return o;
|
|
45
45
|
}
|
|
46
46
|
function D({ deviceId: a }) {
|
|
47
|
-
let w =
|
|
47
|
+
let w = s(te().trpcClient, a), [D, O] = t(null), [k, A] = t(!1), [j, M] = t(null), [N, P] = t(null), [F, I] = t(v), [L, R] = t(!1), [z, B] = t(!1), V = n(!1);
|
|
48
48
|
i(() => {
|
|
49
49
|
if (!w) return;
|
|
50
50
|
let e = !1;
|
|
51
|
-
return V.current = !1, O(null), A(!1), M(null), P(null), I(
|
|
51
|
+
return V.current = !1, O(null), A(!1), M(null), P(null), I(v), B(!1), (async () => {
|
|
52
52
|
try {
|
|
53
53
|
let t = await w.motionZones?.getOptions({});
|
|
54
54
|
if (e) return;
|
|
@@ -58,11 +58,11 @@ function D({ deviceId: a }) {
|
|
|
58
58
|
if (e) return;
|
|
59
59
|
if (!n) throw Error("device proxy not ready");
|
|
60
60
|
V.current = !0;
|
|
61
|
-
let r = n.regions.find((e) => e.shape.kind === "grid"), i =
|
|
62
|
-
P(i), M(T(i, t.grid.width, t.grid.height,
|
|
61
|
+
let r = n.regions.find((e) => e.shape.kind === "grid"), i = x(r ? r.shape.cells : [], t.grid.width, t.grid.height);
|
|
62
|
+
P(i), M(T(i, t.grid.width, t.grid.height, v));
|
|
63
63
|
} catch (t) {
|
|
64
64
|
if (e) return;
|
|
65
|
-
|
|
65
|
+
ee(t) ? A(!0) : console.error("Motion Zones load failed", t);
|
|
66
66
|
}
|
|
67
67
|
})(), () => {
|
|
68
68
|
e = !0;
|
|
@@ -74,7 +74,7 @@ function D({ deviceId: a }) {
|
|
|
74
74
|
H,
|
|
75
75
|
U,
|
|
76
76
|
F
|
|
77
|
-
]), q = r(() => K !== null && N !== null && !
|
|
77
|
+
]), q = r(() => K !== null && N !== null && !S(K, N), [K, N]), J = r(() => K ? K.reduce((e, t) => t ? e + 1 : e, 0) : 0, [K]), Y = H * U, X = W * G, Z = e((e) => {
|
|
78
78
|
X > 0 && M(Array.from({ length: X }, () => e));
|
|
79
79
|
}, [X]), re = e(() => {
|
|
80
80
|
M((e) => e && e.map((e) => !e));
|
|
@@ -98,7 +98,7 @@ function D({ deviceId: a }) {
|
|
|
98
98
|
H,
|
|
99
99
|
U
|
|
100
100
|
]), Q = r(() => D && j ? [{
|
|
101
|
-
id:
|
|
101
|
+
id: g,
|
|
102
102
|
shape: {
|
|
103
103
|
kind: "grid",
|
|
104
104
|
gridWidth: W,
|
|
@@ -123,13 +123,13 @@ function D({ deviceId: a }) {
|
|
|
123
123
|
cells: e
|
|
124
124
|
};
|
|
125
125
|
await w.motionZones?.setZone({ patch: { regions: [{
|
|
126
|
-
id:
|
|
126
|
+
id: g,
|
|
127
127
|
enabled: !0,
|
|
128
128
|
shape: t
|
|
129
129
|
}] } });
|
|
130
130
|
let n = await w.motionZones?.getStatus({});
|
|
131
131
|
if (n) {
|
|
132
|
-
let e = n.regions.find((e) => e.shape.kind === "grid"), t =
|
|
132
|
+
let e = n.regions.find((e) => e.shape.kind === "grid"), t = x(e ? e.shape.cells : [], D.grid.width, D.grid.height);
|
|
133
133
|
P(t), M(T(t, D.grid.width, D.grid.height, F));
|
|
134
134
|
}
|
|
135
135
|
} catch (e) {
|
|
@@ -144,10 +144,10 @@ function D({ deviceId: a }) {
|
|
|
144
144
|
D,
|
|
145
145
|
F
|
|
146
146
|
]);
|
|
147
|
-
return
|
|
148
|
-
id:
|
|
149
|
-
order:
|
|
150
|
-
node: /* @__PURE__ */
|
|
147
|
+
return l(r(() => z && !k && D && j ? {
|
|
148
|
+
id: h,
|
|
149
|
+
order: m,
|
|
150
|
+
node: /* @__PURE__ */ u(p, {
|
|
151
151
|
transparent: !0,
|
|
152
152
|
items: Q,
|
|
153
153
|
supportedShapes: ["grid"],
|
|
@@ -155,7 +155,7 @@ function D({ deviceId: a }) {
|
|
|
155
155
|
width: W,
|
|
156
156
|
height: G
|
|
157
157
|
},
|
|
158
|
-
selectedId:
|
|
158
|
+
selectedId: g,
|
|
159
159
|
onSelect: () => {},
|
|
160
160
|
onShapeChange: $,
|
|
161
161
|
onDrawComplete: () => {},
|
|
@@ -170,30 +170,30 @@ function D({ deviceId: a }) {
|
|
|
170
170
|
$,
|
|
171
171
|
W,
|
|
172
172
|
G
|
|
173
|
-
])), w ? /* @__PURE__ */
|
|
173
|
+
])), w ? /* @__PURE__ */ u(c, {
|
|
174
174
|
title: "Motion Zones",
|
|
175
|
-
icon: /* @__PURE__ */
|
|
176
|
-
children: /* @__PURE__ */
|
|
175
|
+
icon: /* @__PURE__ */ u(ne, { className: "h-3.5 w-3.5 text-foreground-subtle" }),
|
|
176
|
+
children: /* @__PURE__ */ u("div", {
|
|
177
177
|
className: "flex flex-col gap-3",
|
|
178
|
-
children: k ? /* @__PURE__ */
|
|
179
|
-
className: `${
|
|
178
|
+
children: k ? /* @__PURE__ */ u("p", {
|
|
179
|
+
className: `${o} leading-relaxed`,
|
|
180
180
|
children: "This camera doesn't expose an on-board motion zones grid."
|
|
181
|
-
}) : !k && D !== null && j !== null ? /* @__PURE__ */
|
|
182
|
-
className: `${
|
|
181
|
+
}) : !k && D !== null && j !== null ? /* @__PURE__ */ d(f, { children: [/* @__PURE__ */ d("p", {
|
|
182
|
+
className: `${o} leading-relaxed`,
|
|
183
183
|
children: [
|
|
184
184
|
"Toggle ",
|
|
185
|
-
/* @__PURE__ */
|
|
185
|
+
/* @__PURE__ */ u("strong", {
|
|
186
186
|
className: "text-foreground",
|
|
187
187
|
children: "Edit grid"
|
|
188
188
|
}),
|
|
189
189
|
" to paint the region directly on the live frame, then ",
|
|
190
|
-
/* @__PURE__ */
|
|
190
|
+
/* @__PURE__ */ u("strong", {
|
|
191
191
|
className: "text-foreground",
|
|
192
192
|
children: "Save"
|
|
193
193
|
}),
|
|
194
194
|
" to push the mask to the camera. Pick a bigger",
|
|
195
195
|
" ",
|
|
196
|
-
/* @__PURE__ */
|
|
196
|
+
/* @__PURE__ */ u("strong", {
|
|
197
197
|
className: "text-foreground",
|
|
198
198
|
children: "Cell size"
|
|
199
199
|
}),
|
|
@@ -203,57 +203,57 @@ function D({ deviceId: a }) {
|
|
|
203
203
|
D.grid.height,
|
|
204
204
|
" grid on save (×1 is the finest)."
|
|
205
205
|
]
|
|
206
|
-
}), /* @__PURE__ */
|
|
206
|
+
}), /* @__PURE__ */ d("div", {
|
|
207
207
|
className: "flex items-center gap-2 flex-wrap",
|
|
208
208
|
children: [
|
|
209
|
-
/* @__PURE__ */
|
|
209
|
+
/* @__PURE__ */ u("button", {
|
|
210
210
|
type: "button",
|
|
211
211
|
onClick: () => B((e) => !e),
|
|
212
212
|
disabled: L,
|
|
213
213
|
"aria-pressed": z,
|
|
214
|
-
className: z ?
|
|
214
|
+
className: z ? b : y,
|
|
215
215
|
children: z ? "Done editing" : "Edit grid"
|
|
216
216
|
}),
|
|
217
|
-
/* @__PURE__ */
|
|
217
|
+
/* @__PURE__ */ u("button", {
|
|
218
218
|
type: "button",
|
|
219
219
|
onClick: () => Z(!0),
|
|
220
220
|
disabled: L,
|
|
221
|
-
className:
|
|
221
|
+
className: y,
|
|
222
222
|
children: "All on"
|
|
223
223
|
}),
|
|
224
|
-
/* @__PURE__ */
|
|
224
|
+
/* @__PURE__ */ u("button", {
|
|
225
225
|
type: "button",
|
|
226
226
|
onClick: () => Z(!1),
|
|
227
227
|
disabled: L,
|
|
228
|
-
className:
|
|
228
|
+
className: y,
|
|
229
229
|
children: "All off"
|
|
230
230
|
}),
|
|
231
|
-
/* @__PURE__ */
|
|
231
|
+
/* @__PURE__ */ u("button", {
|
|
232
232
|
type: "button",
|
|
233
233
|
onClick: re,
|
|
234
234
|
disabled: L,
|
|
235
|
-
className:
|
|
235
|
+
className: y,
|
|
236
236
|
children: "Invert"
|
|
237
237
|
}),
|
|
238
|
-
/* @__PURE__ */
|
|
238
|
+
/* @__PURE__ */ d("div", {
|
|
239
239
|
className: "flex items-center gap-1 ml-1",
|
|
240
240
|
role: "group",
|
|
241
241
|
"aria-label": "Cell size",
|
|
242
|
-
children: [/* @__PURE__ */
|
|
243
|
-
className: `${
|
|
242
|
+
children: [/* @__PURE__ */ u("span", {
|
|
243
|
+
className: `${o} mr-0.5`,
|
|
244
244
|
children: "Cell size"
|
|
245
|
-
}),
|
|
245
|
+
}), _.map((e) => /* @__PURE__ */ d("button", {
|
|
246
246
|
type: "button",
|
|
247
247
|
onClick: () => ae(e),
|
|
248
248
|
disabled: L,
|
|
249
249
|
"aria-pressed": F === e,
|
|
250
250
|
title: e === 1 ? `Camera grid ${H}×${U} (finest)` : `${C(H, e)}×${C(U, e)} painting grid · cells ×${e} bigger`,
|
|
251
|
-
className: F === e ?
|
|
251
|
+
className: F === e ? b : y,
|
|
252
252
|
children: ["×", e]
|
|
253
253
|
}, e))]
|
|
254
254
|
}),
|
|
255
|
-
/* @__PURE__ */
|
|
256
|
-
className: `${
|
|
255
|
+
/* @__PURE__ */ d("span", {
|
|
256
|
+
className: `${o} ml-1 tabular-nums`,
|
|
257
257
|
children: [
|
|
258
258
|
J,
|
|
259
259
|
" / ",
|
|
@@ -265,24 +265,24 @@ function D({ deviceId: a }) {
|
|
|
265
265
|
F === 1 ? "" : ` · paint ${W}×${G}`
|
|
266
266
|
]
|
|
267
267
|
}),
|
|
268
|
-
/* @__PURE__ */
|
|
269
|
-
/* @__PURE__ */
|
|
268
|
+
/* @__PURE__ */ u("span", { className: "flex-1" }),
|
|
269
|
+
/* @__PURE__ */ u("button", {
|
|
270
270
|
type: "button",
|
|
271
271
|
onClick: ie,
|
|
272
272
|
disabled: L || !q,
|
|
273
273
|
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",
|
|
274
274
|
children: "Revert"
|
|
275
275
|
}),
|
|
276
|
-
/* @__PURE__ */
|
|
276
|
+
/* @__PURE__ */ u("button", {
|
|
277
277
|
type: "button",
|
|
278
278
|
onClick: () => void oe(),
|
|
279
279
|
disabled: L || !q,
|
|
280
|
-
className:
|
|
280
|
+
className: b,
|
|
281
281
|
children: L ? "Saving…" : "Save"
|
|
282
282
|
})
|
|
283
283
|
]
|
|
284
|
-
})] }) : /* @__PURE__ */
|
|
285
|
-
className: `${
|
|
284
|
+
})] }) : /* @__PURE__ */ u("p", {
|
|
285
|
+
className: `${o} leading-relaxed`,
|
|
286
286
|
children: "Loading the camera's grid…"
|
|
287
287
|
})
|
|
288
288
|
})
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { c as e, g as t, h as n, p as r, u as i, x as a } from "./_virtual_mf___mfe_internal__addon_benchmark_page__loadShare__react__loadShare__.js-GeuxDuzQ.mjs";
|
|
2
|
-
import {
|
|
3
|
-
import { i as re, t as ie } from "./player-overlays-
|
|
4
|
-
import { n as ae, r as oe, t as se } from "./square-
|
|
5
|
-
import { t as c } from "./trash-2-
|
|
2
|
+
import { f as o, o as s, s as ee, t as te, u as ne } from "./cap-error-COz9tCrH.mjs";
|
|
3
|
+
import { i as re, t as ie } from "./player-overlays-DWmuijTw.mjs";
|
|
4
|
+
import { n as ae, r as oe, t as se } from "./square-KgLQa1_n.mjs";
|
|
5
|
+
import { t as c } from "./trash-2-B27MLhxu.mjs";
|
|
6
6
|
import { n as l, r as u, t as ce } from "./_virtual_mf___mfe_internal__addon_benchmark_page__loadShare__react_mf_1_jsx_mf_2_runtime__loadShare__.js-SOU_VnTj.mjs";
|
|
7
7
|
import { MaskShapeCanvas as le } from "./MaskShapeCanvas-BDvrLf-K.mjs";
|
|
8
8
|
var ue = o("hexagon", [["path", {
|
|
@@ -68,7 +68,7 @@ function he(e, t) {
|
|
|
68
68
|
return !0;
|
|
69
69
|
}
|
|
70
70
|
function v({ deviceId: a }) {
|
|
71
|
-
let o = ne(
|
|
71
|
+
let o = ee(ne().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;
|
|
@@ -93,7 +93,7 @@ function v({ deviceId: a }) {
|
|
|
93
93
|
T(r), C(r), P(n.audioEnabled);
|
|
94
94
|
} catch (t) {
|
|
95
95
|
if (e) return;
|
|
96
|
-
|
|
96
|
+
te(t) ? y(!0) : console.error("Privacy Mask load failed", t);
|
|
97
97
|
}
|
|
98
98
|
})(), () => {
|
|
99
99
|
e = !0;
|