@camstack/addon-pipeline 0.1.18 → 0.1.20

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 (67) hide show
  1. package/dist/audio-analyzer/index.js +12 -4
  2. package/dist/audio-analyzer/index.js.map +1 -1
  3. package/dist/audio-analyzer/index.mjs +12 -4
  4. package/dist/audio-analyzer/index.mjs.map +1 -1
  5. package/dist/audio-codec-nodeav/index.js +1 -1
  6. package/dist/audio-codec-nodeav/index.mjs +1 -1
  7. package/dist/decoder-nodeav/index.js +2 -2
  8. package/dist/decoder-nodeav/index.mjs +2 -2
  9. package/dist/detection-pipeline/index.js +47 -44
  10. package/dist/detection-pipeline/index.js.map +1 -1
  11. package/dist/detection-pipeline/index.mjs +47 -44
  12. package/dist/detection-pipeline/index.mjs.map +1 -1
  13. package/dist/{index-asZs8U_s.mjs → index-5aYef068.mjs} +4020 -820
  14. package/dist/index-5aYef068.mjs.map +1 -0
  15. package/dist/{index-DLHaHm6u.js → index-B36NMAdu.js} +3996 -796
  16. package/dist/index-B36NMAdu.js.map +1 -0
  17. package/dist/{index-D_cl0Qqb.js → index-CMcx_k6Y.js} +48 -48
  18. package/dist/{index-D_cl0Qqb.js.map → index-CMcx_k6Y.js.map} +1 -1
  19. package/dist/{index-UbcdLS7a.mjs → index-CYb7cFrv.mjs} +46 -46
  20. package/dist/{index-UbcdLS7a.mjs.map → index-CYb7cFrv.mjs.map} +1 -1
  21. package/dist/motion-wasm/index.js +1 -1
  22. package/dist/motion-wasm/index.mjs +1 -1
  23. package/dist/pipeline-runner/index.js +205 -90
  24. package/dist/pipeline-runner/index.js.map +1 -1
  25. package/dist/pipeline-runner/index.mjs +206 -91
  26. package/dist/pipeline-runner/index.mjs.map +1 -1
  27. package/dist/recorder/index.js +2209 -0
  28. package/dist/recorder/index.js.map +1 -0
  29. package/dist/recorder/index.mjs +2209 -0
  30. package/dist/recorder/index.mjs.map +1 -0
  31. package/dist/stream-broker/@mf-types/compiled-types/stream-broker/widgets/FfmpegParamsField.d.ts +41 -0
  32. package/dist/stream-broker/@mf-types/compiled-types/stream-broker/widgets/GeometryBuilder.d.ts +54 -0
  33. package/dist/stream-broker/@mf-types/compiled-types/stream-broker/widgets/format-ua.d.ts +13 -0
  34. package/dist/stream-broker/@mf-types/compiled-types/stream-broker/widgets/index.d.ts +2 -0
  35. package/dist/stream-broker/@mf-types.zip +0 -0
  36. package/dist/stream-broker/{__mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_sdk__loadShare__.mjs-h5aXOPSA.mjs → __mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_sdk__loadShare__.mjs-lantnv8e.mjs} +1 -1
  37. package/dist/stream-broker/__mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.mjs-DJ3UNg7O.mjs +30 -0
  38. package/dist/stream-broker/__mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.mjs-CYXy_bhS.mjs +21 -0
  39. package/dist/stream-broker/{__mfe_internal__addon_stream_broker_widgets__loadShare__react__loadShare__.mjs-DAssX3h0.mjs → __mfe_internal__addon_stream_broker_widgets__loadShare__react__loadShare__.mjs-CaDEYBIU.mjs} +9 -7
  40. package/dist/stream-broker/{__mfe_internal__addon_stream_broker_widgets__loadShare__react__loadShare__.mjs_commonjs-proxy-DFoJJhpt.mjs → __mfe_internal__addon_stream_broker_widgets__loadShare__react__loadShare__.mjs_commonjs-proxy-D6EROtlA.mjs} +1 -1
  41. package/dist/stream-broker/{__mfe_internal__addon_stream_broker_widgets__loadShare__react_mf_1_jsx_mf_2_runtime__loadShare__.mjs-gBEZsQrp.mjs → __mfe_internal__addon_stream_broker_widgets__loadShare__react_mf_1_jsx_mf_2_runtime__loadShare__.mjs-x6pP3Ghk.mjs} +2 -2
  42. package/dist/stream-broker/{__mfe_internal__addon_stream_broker_widgets__loadShare__react_mf_2_dom__loadShare__.mjs_commonjs-proxy-x7XMEeuJ.mjs → __mfe_internal__addon_stream_broker_widgets__loadShare__react_mf_2_dom__loadShare__.mjs_commonjs-proxy-CcnN6sbA.mjs} +1 -1
  43. package/dist/stream-broker/_stub.js +963 -333
  44. package/dist/stream-broker/{_virtual_mf-localSharedImportMap___mfe_internal__addon_stream_broker_widgets-3TxRVJ5L.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_stream_broker_widgets-CL9DR49k.mjs} +6 -6
  45. package/dist/stream-broker/{client-CZXrddDR.mjs → client-BvTmMOQu.mjs} +2 -2
  46. package/dist/stream-broker/{hostInit-De6APW25.mjs → hostInit-ChmiMPS0.mjs} +12 -12
  47. package/dist/stream-broker/{index-cYW01SNH.mjs → index-BxsFuFmE.mjs} +24 -24
  48. package/dist/stream-broker/{index-KtR7Pp0O.mjs → index-C-248uOU.mjs} +2 -2
  49. package/dist/stream-broker/{index-C0BzaWmB.mjs → index-C05B6jqp.mjs} +1 -1
  50. package/dist/stream-broker/index-DOJoSShD.mjs +67784 -0
  51. package/dist/stream-broker/index-DtOI1aTU.mjs +18504 -0
  52. package/dist/stream-broker/{index-BvV3RVTZ.mjs → index-oMq6ilgR.mjs} +254 -268
  53. package/dist/stream-broker/{index-CZNxa0ad.mjs → index-vIWZQBIL.mjs} +1 -1
  54. package/dist/stream-broker/index.js +4666 -756
  55. package/dist/stream-broker/index.js.map +1 -1
  56. package/dist/stream-broker/index.mjs +4668 -756
  57. package/dist/stream-broker/index.mjs.map +1 -1
  58. package/dist/stream-broker/{jsx-runtime-B_evVsXl.mjs → jsx-runtime-BRT_HL0A.mjs} +1 -1
  59. package/dist/stream-broker/remoteEntry.js +1 -1
  60. package/dist/stream-broker/{schemas-ChN4Ih0h.mjs → schemas-B7L0qZtq.mjs} +530 -515
  61. package/package.json +51 -3
  62. package/dist/index-DLHaHm6u.js.map +0 -1
  63. package/dist/index-asZs8U_s.mjs.map +0 -1
  64. package/dist/stream-broker/__mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.mjs-d8PmLbO2.mjs +0 -19
  65. package/dist/stream-broker/__mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.mjs-B4l8Nb2y.mjs +0 -20
  66. package/dist/stream-broker/index-CUXiTSWS.mjs +0 -13883
  67. package/dist/stream-broker/index-Kb4xa8FX.mjs +0 -36403
@@ -1,5 +1,5 @@
1
- import { i as _e, b as x, A as be, n as ve } from "./__mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_trpc_mf_1_client__loadShare__.mjs-DeouEaSs.mjs";
2
- import { _ as V, a as Ee } from "./__mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.mjs-d8PmLbO2.mjs";
1
+ import { i as _e, b as N, A as be, n as ve } from "./__mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_trpc_mf_1_client__loadShare__.mjs-DeouEaSs.mjs";
2
+ import { a as V, b as Ee } from "./__mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.mjs-DJ3UNg7O.mjs";
3
3
  class Pe {
4
4
  constructor() {
5
5
  this.keyToValue = /* @__PURE__ */ new Map(), this.valueToKey = /* @__PURE__ */ new Map();
@@ -17,7 +17,7 @@ class Pe {
17
17
  this.keyToValue.clear(), this.valueToKey.clear();
18
18
  }
19
19
  }
20
- class $ {
20
+ class F {
21
21
  constructor(t) {
22
22
  this.generateIdentifier = t, this.kv = new Pe();
23
23
  }
@@ -34,7 +34,7 @@ class $ {
34
34
  return this.kv.getByKey(t);
35
35
  }
36
36
  }
37
- class Ce extends $ {
37
+ class Ce extends F {
38
38
  constructor() {
39
39
  super((t) => t.name), this.classToAllowedProps = /* @__PURE__ */ new Map();
40
40
  }
@@ -64,10 +64,10 @@ function Se(e, t) {
64
64
  return i;
65
65
  }
66
66
  }
67
- function v(e, t) {
67
+ function g(e, t) {
68
68
  Object.entries(e).forEach(([r, s]) => t(s, r));
69
69
  }
70
- function S(e, t) {
70
+ function C(e, t) {
71
71
  return e.indexOf(t) !== -1;
72
72
  }
73
73
  function B(e, t) {
@@ -91,17 +91,17 @@ class Te {
91
91
  return this.transfomers[t];
92
92
  }
93
93
  }
94
- const Re = (e) => Object.prototype.toString.call(e).slice(8, -1), W = (e) => typeof e > "u", Ie = (e) => e === null, P = (e) => typeof e != "object" || e === null || e === Object.prototype ? !1 : Object.getPrototypeOf(e) === null ? !0 : Object.getPrototypeOf(e) === Object.prototype, I = (e) => P(e) && Object.keys(e).length === 0, g = (e) => Array.isArray(e), Ae = (e) => typeof e == "string", Me = (e) => typeof e == "number" && !isNaN(e), Oe = (e) => typeof e == "boolean", De = (e) => e instanceof RegExp, C = (e) => e instanceof Map, k = (e) => e instanceof Set, K = (e) => Re(e) === "Symbol", Le = (e) => e instanceof Date && !isNaN(e.valueOf()), Y = (e) => e instanceof Error, U = (e) => typeof e == "number" && isNaN(e), Ne = (e) => Oe(e) || Ie(e) || W(e) || Me(e) || Ae(e) || K(e), xe = (e) => typeof e == "bigint", Ve = (e) => e === 1 / 0 || e === -1 / 0, Be = (e) => ArrayBuffer.isView(e) && !(e instanceof DataView), Ue = (e) => e instanceof URL, A = (e) => e.replace(/\\/g, "\\\\").replace(/\./g, "\\."), R = (e) => e.map(String).map(A).join("."), E = (e, t) => {
94
+ const Re = (e) => Object.prototype.toString.call(e).slice(8, -1), W = (e) => typeof e > "u", Ie = (e) => e === null, v = (e) => typeof e != "object" || e === null || e === Object.prototype ? !1 : Object.getPrototypeOf(e) === null ? !0 : Object.getPrototypeOf(e) === Object.prototype, T = (e) => v(e) && Object.keys(e).length === 0, m = (e) => Array.isArray(e), Ae = (e) => typeof e == "string", Me = (e) => typeof e == "number" && !isNaN(e), Oe = (e) => typeof e == "boolean", De = (e) => e instanceof RegExp, E = (e) => e instanceof Map, P = (e) => e instanceof Set, K = (e) => Re(e) === "Symbol", Le = (e) => e instanceof Date && !isNaN(e.valueOf()), $ = (e) => e instanceof Error, x = (e) => typeof e == "number" && isNaN(e), Ne = (e) => Oe(e) || Ie(e) || W(e) || Me(e) || Ae(e) || K(e), Ve = (e) => typeof e == "bigint", Be = (e) => e === 1 / 0 || e === -1 / 0, xe = (e) => ArrayBuffer.isView(e) && !(e instanceof DataView), Ue = (e) => e instanceof URL, R = (e) => e.replace(/\\/g, "\\\\").replace(/\./g, "\\."), S = (e) => e.map(String).map(R).join("."), b = (e, t) => {
95
95
  const r = [];
96
96
  let s = "";
97
97
  for (let i = 0; i < e.length; i++) {
98
98
  let o = e.charAt(i);
99
99
  if (!t && o === "\\") {
100
- const f = e.charAt(i + 1);
101
- if (f === "\\") {
100
+ const u = e.charAt(i + 1);
101
+ if (u === "\\") {
102
102
  s += "\\", i++;
103
103
  continue;
104
- } else if (f !== ".")
104
+ } else if (u !== ".")
105
105
  throw Error("invalid path");
106
106
  }
107
107
  if (o === "\\" && e.charAt(i + 1) === ".") {
@@ -117,7 +117,7 @@ const Re = (e) => Object.prototype.toString.call(e).slice(8, -1), W = (e) => typ
117
117
  const n = s;
118
118
  return r.push(n), r;
119
119
  };
120
- function y(e, t, r, s) {
120
+ function h(e, t, r, s) {
121
121
  return {
122
122
  isApplicable: e,
123
123
  annotation: t,
@@ -125,12 +125,12 @@ function y(e, t, r, s) {
125
125
  untransform: s
126
126
  };
127
127
  }
128
- const G = [
129
- y(W, "undefined", () => null, () => {
128
+ const Y = [
129
+ h(W, "undefined", () => null, () => {
130
130
  }),
131
- y(xe, "bigint", (e) => e.toString(), (e) => typeof BigInt < "u" ? BigInt(e) : (console.error("Please add a BigInt polyfill."), e)),
132
- y(Le, "Date", (e) => e.toISOString(), (e) => new Date(e)),
133
- y(Y, "Error", (e, t) => {
131
+ h(Ve, "bigint", (e) => e.toString(), (e) => typeof BigInt < "u" ? BigInt(e) : (console.error("Please add a BigInt polyfill."), e)),
132
+ h(Le, "Date", (e) => e.toISOString(), (e) => new Date(e)),
133
+ h($, "Error", (e, t) => {
134
134
  const r = {
135
135
  name: e.name,
136
136
  message: e.message
@@ -144,24 +144,24 @@ const G = [
144
144
  r[s] = e[s];
145
145
  }), r;
146
146
  }),
147
- y(De, "regexp", (e) => "" + e, (e) => {
147
+ h(De, "regexp", (e) => "" + e, (e) => {
148
148
  const t = e.slice(1, e.lastIndexOf("/")), r = e.slice(e.lastIndexOf("/") + 1);
149
149
  return new RegExp(t, r);
150
150
  }),
151
- y(
152
- k,
151
+ h(
152
+ P,
153
153
  "set",
154
154
  // (sets only exist in es6+)
155
155
  // eslint-disable-next-line es5/no-es6-methods
156
156
  (e) => [...e.values()],
157
157
  (e) => new Set(e)
158
158
  ),
159
- y(C, "map", (e) => [...e.entries()], (e) => new Map(e)),
160
- y((e) => U(e) || Ve(e), "number", (e) => U(e) ? "NaN" : e > 0 ? "Infinity" : "-Infinity", Number),
161
- y((e) => e === 0 && 1 / e === -1 / 0, "number", () => "-0", Number),
162
- y(Ue, "URL", (e) => e.toString(), (e) => new URL(e))
159
+ h(E, "map", (e) => [...e.entries()], (e) => new Map(e)),
160
+ h((e) => x(e) || Be(e), "number", (e) => x(e) ? "NaN" : e > 0 ? "Infinity" : "-Infinity", Number),
161
+ h((e) => e === 0 && 1 / e === -1 / 0, "number", () => "-0", Number),
162
+ h(Ue, "URL", (e) => e.toString(), (e) => new URL(e))
163
163
  ];
164
- function T(e, t, r, s) {
164
+ function k(e, t, r, s) {
165
165
  return {
166
166
  isApplicable: e,
167
167
  annotation: t,
@@ -169,7 +169,7 @@ function T(e, t, r, s) {
169
169
  untransform: s
170
170
  };
171
171
  }
172
- const H = T((e, t) => K(e) ? !!t.symbolRegistry.getIdentifier(e) : !1, (e, t) => ["symbol", t.symbolRegistry.getIdentifier(e)], (e) => e.description, (e, t, r) => {
172
+ const G = k((e, t) => K(e) ? !!t.symbolRegistry.getIdentifier(e) : !1, (e, t) => ["symbol", t.symbolRegistry.getIdentifier(e)], (e) => e.description, (e, t, r) => {
173
173
  const s = r.symbolRegistry.getValue(t[1]);
174
174
  if (!s)
175
175
  throw new Error("Trying to deserialize unknown symbol");
@@ -184,16 +184,16 @@ const H = T((e, t) => K(e) ? !!t.symbolRegistry.getIdentifier(e) : !1, (e, t) =>
184
184
  Float32Array,
185
185
  Float64Array,
186
186
  Uint8ClampedArray
187
- ].reduce((e, t) => (e[t.name] = t, e), {}), X = T(Be, (e) => ["typed-array", e.constructor.name], (e) => [...e], (e, t) => {
187
+ ].reduce((e, t) => (e[t.name] = t, e), {}), H = k(xe, (e) => ["typed-array", e.constructor.name], (e) => [...e], (e, t) => {
188
188
  const r = ze[t[1]];
189
189
  if (!r)
190
190
  throw new Error("Trying to deserialize unknown typed array");
191
191
  return new r(e);
192
192
  });
193
- function Z(e, t) {
193
+ function X(e, t) {
194
194
  return e?.constructor ? !!t.classRegistry.getIdentifier(e.constructor) : !1;
195
195
  }
196
- const j = T(Z, (e, t) => ["class", t.classRegistry.getIdentifier(e.constructor)], (e, t) => {
196
+ const Z = k(X, (e, t) => ["class", t.classRegistry.getIdentifier(e.constructor)], (e, t) => {
197
197
  const r = t.classRegistry.getAllowedProps(e.constructor);
198
198
  if (!r)
199
199
  return { ...e };
@@ -206,49 +206,49 @@ const j = T(Z, (e, t) => ["class", t.classRegistry.getIdentifier(e.constructor)]
206
206
  if (!s)
207
207
  throw new Error(`Trying to deserialize unknown class '${t[1]}' - check https://github.com/blitz-js/superjson/issues/116#issuecomment-773996564`);
208
208
  return Object.assign(Object.create(s.prototype), e);
209
- }), Q = T((e, t) => !!t.customTransformerRegistry.findApplicable(e), (e, t) => ["custom", t.customTransformerRegistry.findApplicable(e).name], (e, t) => t.customTransformerRegistry.findApplicable(e).serialize(e), (e, t, r) => {
209
+ }), j = k((e, t) => !!t.customTransformerRegistry.findApplicable(e), (e, t) => ["custom", t.customTransformerRegistry.findApplicable(e).name], (e, t) => t.customTransformerRegistry.findApplicable(e).serialize(e), (e, t, r) => {
210
210
  const s = r.customTransformerRegistry.findByName(t[1]);
211
211
  if (!s)
212
212
  throw new Error("Trying to deserialize unknown custom value");
213
213
  return s.deserialize(e);
214
- }), qe = [j, H, Q, X], z = (e, t) => {
214
+ }), qe = [Z, G, j, H], U = (e, t) => {
215
215
  const r = B(qe, (n) => n.isApplicable(e, t));
216
216
  if (r)
217
217
  return {
218
218
  value: r.transform(e, t),
219
219
  type: r.annotation(e, t)
220
220
  };
221
- const s = B(G, (n) => n.isApplicable(e, t));
221
+ const s = B(Y, (n) => n.isApplicable(e, t));
222
222
  if (s)
223
223
  return {
224
224
  value: s.transform(e, t),
225
225
  type: s.annotation
226
226
  };
227
- }, J = {};
228
- G.forEach((e) => {
229
- J[e.annotation] = e;
227
+ }, Q = {};
228
+ Y.forEach((e) => {
229
+ Q[e.annotation] = e;
230
230
  });
231
231
  const Fe = (e, t, r) => {
232
- if (g(t))
232
+ if (m(t))
233
233
  switch (t[0]) {
234
234
  case "symbol":
235
- return H.untransform(e, t, r);
235
+ return G.untransform(e, t, r);
236
236
  case "class":
237
- return j.untransform(e, t, r);
237
+ return Z.untransform(e, t, r);
238
238
  case "custom":
239
- return Q.untransform(e, t, r);
239
+ return j.untransform(e, t, r);
240
240
  case "typed-array":
241
- return X.untransform(e, t, r);
241
+ return H.untransform(e, t, r);
242
242
  default:
243
243
  throw new Error("Unknown transformation: " + t);
244
244
  }
245
245
  else {
246
- const s = J[t];
246
+ const s = Q[t];
247
247
  if (!s)
248
248
  throw new Error("Unknown transformation: " + t);
249
249
  return s.untransform(e, r);
250
250
  }
251
- }, b = (e, t) => {
251
+ }, y = (e, t) => {
252
252
  if (t > e.size)
253
253
  throw new Error("index out of bounds");
254
254
  const r = e.keys();
@@ -256,22 +256,22 @@ const Fe = (e, t, r) => {
256
256
  r.next(), t--;
257
257
  return r.next().value;
258
258
  };
259
- function ee(e) {
260
- if (S(e, "__proto__"))
259
+ function J(e) {
260
+ if (C(e, "__proto__"))
261
261
  throw new Error("__proto__ is not allowed as a property");
262
- if (S(e, "prototype"))
262
+ if (C(e, "prototype"))
263
263
  throw new Error("prototype is not allowed as a property");
264
- if (S(e, "constructor"))
264
+ if (C(e, "constructor"))
265
265
  throw new Error("constructor is not allowed as a property");
266
266
  }
267
- const $e = (e, t) => {
268
- ee(t);
267
+ const We = (e, t) => {
268
+ J(t);
269
269
  for (let r = 0; r < t.length; r++) {
270
270
  const s = t[r];
271
- if (k(e))
272
- e = b(e, +s);
273
- else if (C(e)) {
274
- const n = +s, i = +t[++r] == 0 ? "key" : "value", o = b(e, n);
271
+ if (P(e))
272
+ e = y(e, +s);
273
+ else if (E(e)) {
274
+ const n = +s, i = +t[++r] == 0 ? "key" : "value", o = y(e, n);
275
275
  switch (i) {
276
276
  case "key":
277
277
  e = o;
@@ -284,45 +284,45 @@ const $e = (e, t) => {
284
284
  e = e[s];
285
285
  }
286
286
  return e;
287
- }, M = (e, t, r) => {
288
- if (ee(t), t.length === 0)
287
+ }, I = (e, t, r) => {
288
+ if (J(t), t.length === 0)
289
289
  return r(e);
290
290
  let s = e;
291
291
  for (let i = 0; i < t.length - 1; i++) {
292
292
  const o = t[i];
293
- if (g(s)) {
294
- const a = +o;
295
- s = s[a];
296
- } else if (P(s))
293
+ if (m(s)) {
294
+ const c = +o;
295
+ s = s[c];
296
+ } else if (v(s))
297
297
  s = s[o];
298
- else if (k(s)) {
299
- const a = +o;
300
- s = b(s, a);
301
- } else if (C(s)) {
298
+ else if (P(s)) {
299
+ const c = +o;
300
+ s = y(s, c);
301
+ } else if (E(s)) {
302
302
  if (i === t.length - 2)
303
303
  break;
304
- const c = +o, f = +t[++i] == 0 ? "key" : "value", h = b(s, c);
305
- switch (f) {
304
+ const l = +o, u = +t[++i] == 0 ? "key" : "value", f = y(s, l);
305
+ switch (u) {
306
306
  case "key":
307
- s = h;
307
+ s = f;
308
308
  break;
309
309
  case "value":
310
- s = s.get(h);
310
+ s = s.get(f);
311
311
  break;
312
312
  }
313
313
  }
314
314
  }
315
315
  const n = t[t.length - 1];
316
- if (g(s) ? s[+n] = r(s[+n]) : P(s) && (s[n] = r(s[n])), k(s)) {
317
- const i = b(s, +n), o = r(i);
316
+ if (m(s) ? s[+n] = r(s[+n]) : v(s) && (s[n] = r(s[n])), P(s)) {
317
+ const i = y(s, +n), o = r(i);
318
318
  i !== o && (s.delete(i), s.add(o));
319
319
  }
320
- if (C(s)) {
321
- const i = +t[t.length - 2], o = b(s, i);
320
+ if (E(s)) {
321
+ const i = +t[t.length - 2], o = y(s, i);
322
322
  switch (+n == 0 ? "key" : "value") {
323
323
  case "key": {
324
- const c = r(o);
325
- s.set(c, s.get(o)), c !== o && s.delete(o);
324
+ const l = r(o);
325
+ s.set(l, s.get(o)), l !== o && s.delete(o);
326
326
  break;
327
327
  }
328
328
  case "value": {
@@ -332,49 +332,49 @@ const $e = (e, t) => {
332
332
  }
333
333
  }
334
334
  return e;
335
- }, te = (e) => e < 1;
336
- function O(e, t, r, s = []) {
335
+ }, ee = (e) => e < 1;
336
+ function A(e, t, r, s = []) {
337
337
  if (!e)
338
338
  return;
339
- const n = te(r);
340
- if (!g(e)) {
341
- v(e, (a, c) => O(a, t, r, [
339
+ const n = ee(r);
340
+ if (!m(e)) {
341
+ g(e, (c, l) => A(c, t, r, [
342
342
  ...s,
343
- ...E(c, n)
343
+ ...b(l, n)
344
344
  ]));
345
345
  return;
346
346
  }
347
347
  const [i, o] = e;
348
- o && v(o, (a, c) => {
349
- O(a, t, r, [
348
+ o && g(o, (c, l) => {
349
+ A(c, t, r, [
350
350
  ...s,
351
- ...E(c, n)
351
+ ...b(l, n)
352
352
  ]);
353
353
  }), t(i, s);
354
354
  }
355
- function We(e, t, r, s) {
356
- return O(t, (n, i) => {
357
- e = M(e, i, (o) => Fe(o, n, s));
355
+ function Ke(e, t, r, s) {
356
+ return A(t, (n, i) => {
357
+ e = I(e, i, (o) => Fe(o, n, s));
358
358
  }, r), e;
359
359
  }
360
- function Ke(e, t, r) {
361
- const s = te(r);
360
+ function $e(e, t, r) {
361
+ const s = ee(r);
362
362
  function n(i, o) {
363
- const a = $e(e, E(o, s));
364
- i.map((c) => E(c, s)).forEach((c) => {
365
- e = M(e, c, () => a);
363
+ const c = We(e, b(o, s));
364
+ i.map((l) => b(l, s)).forEach((l) => {
365
+ e = I(e, l, () => c);
366
366
  });
367
367
  }
368
- if (g(t)) {
368
+ if (m(t)) {
369
369
  const [i, o] = t;
370
- i.forEach((a) => {
371
- e = M(e, E(a, s), () => e);
372
- }), o && v(o, n);
370
+ i.forEach((c) => {
371
+ e = I(e, b(c, s), () => e);
372
+ }), o && g(o, n);
373
373
  } else
374
- v(t, n);
374
+ g(t, n);
375
375
  return e;
376
376
  }
377
- const Ye = (e, t) => P(e) || g(e) || C(e) || k(e) || Y(e) || Z(e, t);
377
+ const Ye = (e, t) => v(e) || m(e) || E(e) || P(e) || $(e) || X(e, t);
378
378
  function Ge(e, t, r) {
379
379
  const s = r.get(e);
380
380
  s ? s.push(t) : r.set(e, [t]);
@@ -385,60 +385,60 @@ function He(e, t) {
385
385
  return e.forEach((n) => {
386
386
  if (n.length <= 1)
387
387
  return;
388
- t || (n = n.map((a) => a.map(String)).sort((a, c) => a.length - c.length));
388
+ t || (n = n.map((c) => c.map(String)).sort((c, l) => c.length - l.length));
389
389
  const [i, ...o] = n;
390
- i.length === 0 ? s = o.map(R) : r[R(i)] = o.map(R);
391
- }), s ? I(r) ? [s] : [s, r] : I(r) ? void 0 : r;
390
+ i.length === 0 ? s = o.map(S) : r[S(i)] = o.map(S);
391
+ }), s ? T(r) ? [s] : [s, r] : T(r) ? void 0 : r;
392
392
  }
393
- const re = (e, t, r, s, n = [], i = [], o = /* @__PURE__ */ new Map()) => {
394
- const a = Ne(e);
395
- if (!a) {
393
+ const te = (e, t, r, s, n = [], i = [], o = /* @__PURE__ */ new Map()) => {
394
+ const c = Ne(e);
395
+ if (!c) {
396
396
  Ge(e, n, t);
397
- const u = o.get(e);
398
- if (u)
397
+ const p = o.get(e);
398
+ if (p)
399
399
  return s ? {
400
400
  transformedValue: null
401
- } : u;
401
+ } : p;
402
402
  }
403
403
  if (!Ye(e, r)) {
404
- const u = z(e, r), m = u ? {
405
- transformedValue: u.value,
406
- annotations: [u.type]
404
+ const p = U(e, r), d = p ? {
405
+ transformedValue: p.value,
406
+ annotations: [p.type]
407
407
  } : {
408
408
  transformedValue: e
409
409
  };
410
- return a || o.set(e, m), m;
410
+ return c || o.set(e, d), d;
411
411
  }
412
- if (S(i, e))
412
+ if (C(i, e))
413
413
  return {
414
414
  transformedValue: null
415
415
  };
416
- const c = z(e, r), f = c?.value ?? e, h = g(f) ? [] : {}, p = {};
417
- v(f, (u, m) => {
418
- if (m === "__proto__" || m === "constructor" || m === "prototype")
419
- throw new Error(`Detected property ${m}. This is a prototype pollution risk, please remove it from your object.`);
420
- const _ = re(u, t, r, s, [...n, m], [...i, e], o);
421
- h[m] = _.transformedValue, g(_.annotations) ? p[A(m)] = _.annotations : P(_.annotations) && v(_.annotations, (w, we) => {
422
- p[A(m) + "." + we] = w;
416
+ const l = U(e, r), u = l?.value ?? e, f = m(u) ? [] : {}, w = {};
417
+ g(u, (p, d) => {
418
+ if (d === "__proto__" || d === "constructor" || d === "prototype")
419
+ throw new Error(`Detected property ${d}. This is a prototype pollution risk, please remove it from your object.`);
420
+ const _ = te(p, t, r, s, [...n, d], [...i, e], o);
421
+ f[d] = _.transformedValue, m(_.annotations) ? w[R(d)] = _.annotations : v(_.annotations) && g(_.annotations, (ge, we) => {
422
+ w[R(d) + "." + we] = ge;
423
423
  });
424
424
  });
425
- const d = I(p) ? {
426
- transformedValue: h,
427
- annotations: c ? [c.type] : void 0
425
+ const L = T(w) ? {
426
+ transformedValue: f,
427
+ annotations: l ? [l.type] : void 0
428
428
  } : {
429
- transformedValue: h,
430
- annotations: c ? [c.type, p] : p
429
+ transformedValue: f,
430
+ annotations: l ? [l.type, w] : w
431
431
  };
432
- return a || o.set(e, d), d;
432
+ return c || o.set(e, L), L;
433
433
  };
434
- function se(e) {
434
+ function re(e) {
435
435
  return Object.prototype.toString.call(e).slice(8, -1);
436
436
  }
437
- function q(e) {
438
- return se(e) === "Array";
437
+ function z(e) {
438
+ return re(e) === "Array";
439
439
  }
440
440
  function Xe(e) {
441
- if (se(e) !== "Object")
441
+ if (re(e) !== "Object")
442
442
  return !1;
443
443
  const t = Object.getPrototypeOf(e);
444
444
  return !!t && t.constructor === Object && t === Object.prototype;
@@ -452,28 +452,28 @@ function Ze(e, t, r, s, n) {
452
452
  configurable: !0
453
453
  });
454
454
  }
455
- function D(e, t = {}) {
456
- if (q(e))
457
- return e.map((n) => D(n, t));
455
+ function M(e, t = {}) {
456
+ if (z(e))
457
+ return e.map((n) => M(n, t));
458
458
  if (!Xe(e))
459
459
  return e;
460
460
  const r = Object.getOwnPropertyNames(e), s = Object.getOwnPropertySymbols(e);
461
461
  return [...r, ...s].reduce((n, i) => {
462
- if (i === "__proto__" || q(t.props) && !t.props.includes(i))
462
+ if (i === "__proto__" || z(t.props) && !t.props.includes(i))
463
463
  return n;
464
- const o = e[i], a = D(o, t);
465
- return Ze(n, i, a, e, t.nonenumerable), n;
464
+ const o = e[i], c = M(o, t);
465
+ return Ze(n, i, c, e, t.nonenumerable), n;
466
466
  }, {});
467
467
  }
468
- class l {
468
+ class a {
469
469
  /**
470
470
  * @param dedupeReferentialEqualities If true, SuperJSON will make sure only one instance of referentially equal objects are serialized and the rest are replaced with `null`.
471
471
  */
472
472
  constructor({ dedupe: t = !1 } = {}) {
473
- this.classRegistry = new Ce(), this.symbolRegistry = new $((r) => r.description ?? ""), this.customTransformerRegistry = new Te(), this.allowedErrorProps = [], this.dedupe = t;
473
+ this.classRegistry = new Ce(), this.symbolRegistry = new F((r) => r.description ?? ""), this.customTransformerRegistry = new Te(), this.allowedErrorProps = [], this.dedupe = t;
474
474
  }
475
475
  serialize(t) {
476
- const r = /* @__PURE__ */ new Map(), s = re(t, r, this, this.dedupe), n = {
476
+ const r = /* @__PURE__ */ new Map(), s = te(t, r, this, this.dedupe), n = {
477
477
  json: s.transformedValue
478
478
  };
479
479
  s.annotations && (n.meta = {
@@ -488,8 +488,8 @@ class l {
488
488
  }
489
489
  deserialize(t, r) {
490
490
  const { json: s, meta: n } = t;
491
- let i = r?.inPlace ? s : D(s);
492
- return n?.values && (i = We(i, n.values, n.v ?? 0, this)), n?.referentialEqualities && (i = Ke(i, n.referentialEqualities, n.v ?? 0)), i;
491
+ let i = r?.inPlace ? s : M(s);
492
+ return n?.values && (i = Ke(i, n.values, n.v ?? 0, this)), n?.referentialEqualities && (i = $e(i, n.referentialEqualities, n.v ?? 0)), i;
493
493
  }
494
494
  stringify(t) {
495
495
  return JSON.stringify(this.serialize(t));
@@ -513,24 +513,24 @@ class l {
513
513
  this.allowedErrorProps.push(...t);
514
514
  }
515
515
  }
516
- l.defaultInstance = new l();
517
- l.serialize = l.defaultInstance.serialize.bind(l.defaultInstance);
518
- l.deserialize = l.defaultInstance.deserialize.bind(l.defaultInstance);
519
- l.stringify = l.defaultInstance.stringify.bind(l.defaultInstance);
520
- l.parse = l.defaultInstance.parse.bind(l.defaultInstance);
521
- l.registerClass = l.defaultInstance.registerClass.bind(l.defaultInstance);
522
- l.registerSymbol = l.defaultInstance.registerSymbol.bind(l.defaultInstance);
523
- l.registerCustom = l.defaultInstance.registerCustom.bind(l.defaultInstance);
524
- l.allowErrorProps = l.defaultInstance.allowErrorProps.bind(l.defaultInstance);
525
- l.serialize;
526
- l.deserialize;
527
- l.stringify;
528
- l.parse;
529
- l.registerClass;
530
- l.registerCustom;
531
- l.registerSymbol;
532
- l.allowErrorProps;
533
- const je = 1e4, Qe = 3e3, Je = 2e3, et = 3e4;
516
+ a.defaultInstance = new a();
517
+ a.serialize = a.defaultInstance.serialize.bind(a.defaultInstance);
518
+ a.deserialize = a.defaultInstance.deserialize.bind(a.defaultInstance);
519
+ a.stringify = a.defaultInstance.stringify.bind(a.defaultInstance);
520
+ a.parse = a.defaultInstance.parse.bind(a.defaultInstance);
521
+ a.registerClass = a.defaultInstance.registerClass.bind(a.defaultInstance);
522
+ a.registerSymbol = a.defaultInstance.registerSymbol.bind(a.defaultInstance);
523
+ a.registerCustom = a.defaultInstance.registerCustom.bind(a.defaultInstance);
524
+ a.allowErrorProps = a.defaultInstance.allowErrorProps.bind(a.defaultInstance);
525
+ a.serialize;
526
+ a.deserialize;
527
+ a.stringify;
528
+ a.parse;
529
+ a.registerClass;
530
+ a.registerCustom;
531
+ a.registerSymbol;
532
+ a.allowErrorProps;
533
+ const je = 1e4, Qe = 6e3, Je = 2e3, et = 3e4;
534
534
  class tt {
535
535
  /** Active server base URL. Mutable via `switchServerUrl()` so the
536
536
  * endpoint-race helper can pivot the transport onto a LAN candidate
@@ -638,8 +638,8 @@ class tt {
638
638
  () => {
639
639
  clearTimeout(o), n();
640
640
  },
641
- (a) => {
642
- clearTimeout(o), i(a instanceof Error ? a : new Error(String(a)));
641
+ (c) => {
642
+ clearTimeout(o), i(c instanceof Error ? c : new Error(String(c)));
643
643
  }
644
644
  );
645
645
  }) : await s, this.connected = !0;
@@ -734,19 +734,19 @@ class tt {
734
734
  } catch {
735
735
  return null;
736
736
  }
737
- })(), n = s?.port ? Number(s.port) : s?.protocol === "https:" ? 443 : 80, i = s?.protocol === "https:" ? "https" : "http", a = this._trpcClient.localNetwork?.getConnectionEndpoints;
738
- if (!a)
737
+ })(), n = s?.port ? Number(s.port) : s?.protocol === "https:" ? 443 : 80, i = s?.protocol === "https:" ? "https" : "http", c = this._trpcClient.localNetwork?.getConnectionEndpoints;
738
+ if (!c)
739
739
  return { winner: this._serverUrl, switched: !1 };
740
- let c;
740
+ let l;
741
741
  try {
742
- c = (await a.query({ port: n, ipv4Only: t?.ipv4Only, scheme: i })).endpoints;
742
+ l = (await c.query({ port: n, ipv4Only: t?.ipv4Only, scheme: i })).endpoints;
743
743
  } catch {
744
744
  return { winner: this._serverUrl, switched: !1 };
745
745
  }
746
- if (c.length === 0)
746
+ if (l.length === 0)
747
747
  return { winner: this._serverUrl, switched: !1 };
748
- const f = await rt(c.map((h) => h.baseUrl), r);
749
- return !f || f === this._serverUrl ? { winner: f ?? this._serverUrl, switched: !1 } : (this.switchServerUrl(f), { winner: f, switched: !0 });
748
+ const u = await rt(l.map((f) => f.baseUrl), r);
749
+ return !u || u === this._serverUrl ? { winner: u ?? this._serverUrl, switched: !1 } : (this.switchServerUrl(u), { winner: u, switched: !0 });
750
750
  }
751
751
  /** Tear down WS connection + mirror. The instance is unusable afterwards. */
752
752
  close() {
@@ -826,6 +826,30 @@ class tt {
826
826
  listDevices(t) {
827
827
  return this.mirror ? (t ? this.mirror.query(t) : this.mirror.getAllDevices()).map((s) => this.attachBinding(s)) : [];
828
828
  }
829
+ /**
830
+ * Sync `DeviceInfo` snapshot (name, canonical type, online, …) for one device
831
+ * from the warm-boot mirror — `null` if the mirror isn't booted or the device
832
+ * is unknown. Unlike a `DeviceProxy` (cap accessors only), this carries the
833
+ * display identity the UI needs to render a device on first paint.
834
+ */
835
+ getDeviceInfo(t) {
836
+ return this.mirror?.getDeviceInfo(t) ?? null;
837
+ }
838
+ /**
839
+ * The `DeviceInfo` snapshots for the current device set (the warm-boot cache),
840
+ * honouring the same `filters` as {@link listDevices}. Lets a UI render a named
841
+ * device list immediately without waiting for per-device lifecycle events.
842
+ */
843
+ listDeviceInfos(t) {
844
+ const r = this.mirror;
845
+ if (!r) return [];
846
+ const s = t ? r.query(t) : r.getAllDevices(), n = [];
847
+ for (const i of s) {
848
+ const o = r.getDeviceInfo(i.deviceId);
849
+ o && n.push(o);
850
+ }
851
+ return n;
852
+ }
829
853
  /**
830
854
  * Sync lookup by numeric id. `null` if the mirror has not been booted
831
855
  * or the device is unknown.
@@ -934,12 +958,8 @@ class tt {
934
958
  get pipelineRunner() {
935
959
  return this._systemProxy.pipelineRunner;
936
960
  }
937
- get platformProbe() {
938
- return this._systemProxy.platformProbe;
939
- }
940
- get recordingEngine() {
941
- return this._systemProxy.recordingEngine;
942
- }
961
+ // `platform-probe` is infra (addon-to-addon via `api.platformProbe`), not a
962
+ // client-facing system cap — it isn't on SystemProxy, so no getter here.
943
963
  get settingsStore() {
944
964
  return this._systemProxy.settingsStore;
945
965
  }
@@ -1025,16 +1045,16 @@ class tt {
1025
1045
  onClose: () => {
1026
1046
  this.emitConnectionEvent("disconnected");
1027
1047
  }
1028
- }), x({
1029
- links: [be({ client: this._wsClient, transformer: l })]
1048
+ }), N({
1049
+ links: [be({ client: this._wsClient, transformer: a })]
1030
1050
  });
1031
1051
  }
1032
- return this._wsClient = null, x({
1033
- links: [ve({ url: `${this._serverUrl}/trpc`, headers: t, transformer: l })]
1052
+ return this._wsClient = null, N({
1053
+ links: [ve({ url: `${this._serverUrl}/trpc`, headers: t, transformer: a })]
1034
1054
  });
1035
1055
  }
1036
1056
  }
1037
- function ft(e) {
1057
+ function dt(e) {
1038
1058
  return new tt(e);
1039
1059
  }
1040
1060
  async function rt(e, t) {
@@ -1042,29 +1062,29 @@ async function rt(e, t) {
1042
1062
  if (typeof fetch != "function") return e[0] ?? null;
1043
1063
  const s = typeof window < "u" && typeof window.location < "u" && window.location.protocol === "https:" ? e.filter((o) => o.toLowerCase().startsWith("https://")) : e;
1044
1064
  if (s.length === 0) return null;
1045
- const n = s.map(() => new AbortController()), i = s.map(async (o, a) => {
1046
- const c = n[a], f = setTimeout(() => c.abort(), t);
1065
+ const n = s.map(() => new AbortController()), i = s.map(async (o, c) => {
1066
+ const l = n[c], u = setTimeout(() => l.abort(), t);
1047
1067
  try {
1048
- const h = await fetch(`${o.replace(/\/+$/, "")}/trpc/health`, {
1068
+ const f = await fetch(`${o.replace(/\/+$/, "")}/trpc/health`, {
1049
1069
  method: "GET",
1050
- signal: c.signal,
1070
+ signal: l.signal,
1051
1071
  // Cross-origin probes from a browser sandbox are fine — the
1052
1072
  // /trpc/health response is open-CORS by the Fastify default.
1053
1073
  // No credentials needed (this is a transport-quality probe,
1054
1074
  // not an auth round-trip).
1055
1075
  credentials: "omit"
1056
1076
  });
1057
- if (!h.ok) throw new Error(`${h.status}`);
1077
+ if (!f.ok) throw new Error(`${f.status}`);
1058
1078
  return o;
1059
1079
  } finally {
1060
- clearTimeout(f);
1080
+ clearTimeout(u);
1061
1081
  }
1062
1082
  });
1063
1083
  try {
1064
1084
  const o = await Promise.any(i);
1065
- for (const a of n)
1085
+ for (const c of n)
1066
1086
  try {
1067
- a.abort();
1087
+ c.abort();
1068
1088
  } catch {
1069
1089
  }
1070
1090
  return o;
@@ -1072,8 +1092,8 @@ async function rt(e, t) {
1072
1092
  return null;
1073
1093
  }
1074
1094
  }
1075
- var ne = /* @__PURE__ */ ((e) => (e.Motion = "motion", e.Person = "person", e.Vehicle = "vehicle", e.Animal = "animal", e.Audio = "audio", e.Face = "face", e.Plate = "plate", e.Package = "package", e.Doorbell = "doorbell", e.Sensor = "sensor", e))(ne || {});
1076
- const ie = [
1095
+ var se = /* @__PURE__ */ ((e) => (e.Motion = "motion", e.Person = "person", e.Vehicle = "vehicle", e.Animal = "animal", e.Audio = "audio", e.Face = "face", e.Plate = "plate", e.Package = "package", e.Doorbell = "doorbell", e.Sensor = "sensor", e))(se || {});
1096
+ const ne = [
1077
1097
  "animal",
1078
1098
  "dog_cat",
1079
1099
  "dog",
@@ -1100,7 +1120,7 @@ const ie = [
1100
1120
  "snake",
1101
1121
  "turtle",
1102
1122
  "lizard"
1103
- ], oe = [
1123
+ ], ie = [
1104
1124
  "person",
1105
1125
  "people",
1106
1126
  "pedestrian",
@@ -1113,7 +1133,7 @@ const ie = [
1113
1133
  "hand",
1114
1134
  "head",
1115
1135
  "body"
1116
- ], ae = [
1136
+ ], oe = [
1117
1137
  "vehicle",
1118
1138
  "car",
1119
1139
  "truck",
@@ -1131,7 +1151,7 @@ const ie = [
1131
1151
  "boat",
1132
1152
  "ship",
1133
1153
  "helicopter"
1134
- ], le = [
1154
+ ], ae = [
1135
1155
  "face",
1136
1156
  "eyes",
1137
1157
  "nose",
@@ -1181,10 +1201,10 @@ const ie = [
1181
1201
  "damaged_plate",
1182
1202
  "obscured_plate",
1183
1203
  "dirty_plate"
1184
- ], ue = ["motion", "movement", "other"], de = ["package", "packet"], fe = [
1204
+ ], le = ["motion", "movement", "other"], ue = ["package", "packet"], fe = [
1185
1205
  "audio"
1186
1206
  /* Audio */
1187
- ], me = [
1207
+ ], de = [
1188
1208
  "speech",
1189
1209
  "scream",
1190
1210
  "babbling",
@@ -1254,33 +1274,33 @@ const ie = [
1254
1274
  "door_open",
1255
1275
  "flooded",
1256
1276
  "entry_open"
1257
- ], ye = {
1258
- ...ie.reduce((e, t) => ({
1277
+ ], me = {
1278
+ ...ne.reduce((e, t) => ({
1259
1279
  ...e,
1260
1280
  [t]: "animal"
1261
1281
  /* Animal */
1262
1282
  }), {}),
1263
- ...oe.reduce((e, t) => ({
1283
+ ...ie.reduce((e, t) => ({
1264
1284
  ...e,
1265
1285
  [t]: "person"
1266
1286
  /* Person */
1267
1287
  }), {}),
1268
- ...ae.reduce((e, t) => ({
1288
+ ...oe.reduce((e, t) => ({
1269
1289
  ...e,
1270
1290
  [t]: "vehicle"
1271
1291
  /* Vehicle */
1272
1292
  }), {}),
1273
- ...ue.reduce((e, t) => ({
1293
+ ...le.reduce((e, t) => ({
1274
1294
  ...e,
1275
1295
  [t]: "motion"
1276
1296
  /* Motion */
1277
1297
  }), {}),
1278
- ...de.reduce((e, t) => ({
1298
+ ...ue.reduce((e, t) => ({
1279
1299
  ...e,
1280
1300
  [t]: "package"
1281
1301
  /* Package */
1282
1302
  }), {}),
1283
- ...le.reduce((e, t) => ({
1303
+ ...ae.reduce((e, t) => ({
1284
1304
  ...e,
1285
1305
  [t]: "face"
1286
1306
  /* Face */
@@ -1295,7 +1315,7 @@ const ie = [
1295
1315
  [t]: "audio"
1296
1316
  /* Audio */
1297
1317
  }), {}),
1298
- ...me.reduce((e, t) => ({
1318
+ ...de.reduce((e, t) => ({
1299
1319
  ...e,
1300
1320
  [t]: "audio"
1301
1321
  /* Audio */
@@ -1310,45 +1330,45 @@ const ie = [
1310
1330
  [t]: "sensor"
1311
1331
  /* Sensor */
1312
1332
  }), {})
1313
- }, st = (e) => le.includes(e), nt = (e) => ce.includes(e), mt = (e) => ie.includes(e), ht = (e) => oe.includes(e), pt = (e) => ae.includes(e), yt = (e) => ue.includes(e), gt = (e) => he.includes(e), wt = (e) => de.includes(e), _t = (e) => fe.includes(e) || me.includes(e), bt = (e) => pe.includes(e), vt = (e) => st(e) || nt(e), Et = (e) => ye[e], Pt = (e) => {
1333
+ }, st = (e) => ae.includes(e), nt = (e) => ce.includes(e), ht = (e) => ne.includes(e), pt = (e) => ie.includes(e), mt = (e) => oe.includes(e), yt = (e) => le.includes(e), gt = (e) => he.includes(e), wt = (e) => ue.includes(e), _t = (e) => fe.includes(e) || de.includes(e), bt = (e) => pe.includes(e), vt = (e) => st(e) || nt(e), Et = (e) => me[e], Pt = (e) => {
1314
1334
  const { className: t } = e, r = {
1315
1335
  face: "person",
1316
1336
  plate: "vehicle"
1317
1337
  /* Vehicle */
1318
- }, s = ye[t];
1338
+ }, s = me[t];
1319
1339
  return s && s !== t ? s : r[t];
1320
- }, it = Object.values(ne), L = it.filter(
1340
+ }, it = Object.values(se), O = it.filter(
1321
1341
  (e) => e !== "motion"
1322
1342
  /* Motion */
1323
- ), ge = [
1343
+ ), ye = [
1324
1344
  "person",
1325
1345
  "doorbell",
1326
1346
  "package"
1327
1347
  /* Package */
1328
1348
  ], ot = [
1329
- ...ge,
1349
+ ...ye,
1330
1350
  "vehicle",
1331
1351
  "animal",
1332
1352
  "audio",
1333
1353
  "face",
1334
1354
  "plate"
1335
1355
  /* Plate */
1336
- ], at = [...L];
1356
+ ], at = [...O];
1337
1357
  function Ct(e, t) {
1338
1358
  switch (e) {
1339
1359
  case "critical":
1340
- return ge;
1360
+ return ye;
1341
1361
  case "important":
1342
1362
  return ot;
1343
1363
  case "all":
1344
1364
  return at;
1345
1365
  case "custom":
1346
- return t?.length ? t : L;
1366
+ return t?.length ? t : O;
1347
1367
  default:
1348
- return L;
1368
+ return O;
1349
1369
  }
1350
1370
  }
1351
- const F = {
1371
+ const q = {
1352
1372
  // Scrypted PascalCase
1353
1373
  Light: "light",
1354
1374
  Switch: "switch",
@@ -1424,12 +1444,12 @@ const F = {
1424
1444
  Outlet: "switch"
1425
1445
  };
1426
1446
  function Tt(e) {
1427
- const t = F[e];
1447
+ const t = q[e];
1428
1448
  if (t) return t;
1429
1449
  const r = e.toLowerCase();
1430
- return F[r] ?? null;
1450
+ return q[r] ?? null;
1431
1451
  }
1432
- const lt = [
1452
+ const ct = [
1433
1453
  "Entry",
1434
1454
  "Light",
1435
1455
  "Switch",
@@ -1441,7 +1461,7 @@ const lt = [
1441
1461
  "Sensor",
1442
1462
  "Select",
1443
1463
  "Program"
1444
- ], Rt = new Set(lt), ct = [
1464
+ ], Rt = new Set(ct), lt = [
1445
1465
  "light",
1446
1466
  "switch",
1447
1467
  "input_boolean",
@@ -1455,7 +1475,7 @@ const lt = [
1455
1475
  "siren",
1456
1476
  "media_player",
1457
1477
  "script"
1458
- ], It = new Set(ct), N = [
1478
+ ], It = new Set(lt), D = [
1459
1479
  {
1460
1480
  id: "liveStream",
1461
1481
  label: "Live Stream",
@@ -1561,78 +1581,45 @@ const lt = [
1561
1581
  }
1562
1582
  ];
1563
1583
  function At(e, t, r) {
1564
- const s = N.find((n) => n.id === e);
1584
+ const s = D.find((n) => n.id === e);
1565
1585
  return !(!s || !s.sources[t] || s.platforms && s.platforms[r] === !1);
1566
1586
  }
1567
1587
  function Mt(e) {
1568
- return N.filter((t) => t.sources[e]);
1588
+ return D.filter((t) => t.sources[e]);
1569
1589
  }
1570
1590
  function Ot() {
1571
- return N.filter((e) => e.requiresBackend);
1572
- }
1573
- function Dt(e, t, r) {
1574
- if (e.length === 0) return null;
1575
- const s = t.viewportWidth * t.viewportHeight * (t.pixelRatio ?? 1), n = t.bandwidthMbps ?? 100, i = t.packetLoss ?? 0, o = t.rttMs ?? 50;
1576
- let a = "high";
1577
- t.maxResolution === "low" || t.isCellular || n < 1 || i > 0.05 ? a = "low" : t.maxResolution === "medium" || n < 5 || s < 5e5 || o > 200 ? a = "medium" : (t.maxResolution === "high" || s > 2e6) && (a = "high");
1578
- const c = {
1579
- main: "high",
1580
- sub: "medium",
1581
- ext: "low"
1582
- }, f = r ?? "native", h = e.map((d) => {
1583
- let u = 0;
1584
- const m = c[d.profile] ?? "medium";
1585
- if (m === a ? u += 100 : (a === "high" && m === "medium" || a === "medium" && m === "high" || a === "medium" && m === "low" || a === "low" && m === "medium") && (u += 50), d.transport === f ? u += 30 : d.transport === "native" ? u += 20 : d.transport === "rtsp" ? u += 15 : d.transport === "rtmp" && (u += 10), d.metadata?.width && d.metadata?.height) {
1586
- const w = d.metadata.width * d.metadata.height / Math.max(s, 1);
1587
- w >= 0.8 && w <= 2 ? u += 25 : w >= 0.5 && w <= 3 && (u += 15), w > 4 && n < 10 && (u -= 20);
1588
- }
1589
- return d.metadata?.codec && (n < 5 && d.metadata.codec.includes("265") && (u += 10), n >= 10 && d.metadata.codec.includes("264") && (u += 5)), { ...d, score: u, targetTier: a };
1590
- });
1591
- h.sort((d, u) => u.score - d.score);
1592
- const p = h[0];
1593
- return {
1594
- streamName: p.streamName,
1595
- profile: p.profile,
1596
- transport: p.transport,
1597
- label: p.label,
1598
- metadata: p.metadata,
1599
- reason: `${p.targetTier} quality → ${p.profile}/${p.transport} (score: ${p.score})`
1600
- };
1601
- }
1602
- function Lt(e, t) {
1603
- return t ? 10 : e.isCellular || (e.packetLoss ?? 0) > 0.02 ? 15 : 30;
1591
+ return D.filter((e) => e.requiresBackend);
1604
1592
  }
1605
1593
  export {
1606
- L as DEFAULT_ENABLED_CLASSES,
1607
- ne as DetectionClass,
1608
- ct as ELIGIBLE_HA_DOMAINS,
1594
+ O as DEFAULT_ENABLED_CLASSES,
1595
+ se as DetectionClass,
1596
+ lt as ELIGIBLE_HA_DOMAINS,
1609
1597
  It as ELIGIBLE_HA_DOMAINS_SET,
1610
- lt as ELIGIBLE_SCRYPTED_DEVICE_TYPES,
1598
+ ct as ELIGIBLE_SCRYPTED_DEVICE_TYPES,
1611
1599
  Rt as ELIGIBLE_SCRYPTED_DEVICE_TYPES_SET,
1612
- N as FEATURE_MATRIX,
1600
+ D as FEATURE_MATRIX,
1613
1601
  kt as HA_DOMAIN_TYPE_MAP,
1614
- F as RAW_TO_CANONICAL,
1602
+ q as RAW_TO_CANONICAL,
1615
1603
  St as SCRYPTED_TYPE_TO_CANONICAL,
1616
1604
  tt as System,
1617
1605
  at as TIMELINE_PRESET_ALL,
1618
- ge as TIMELINE_PRESET_CRITICAL,
1606
+ ye as TIMELINE_PRESET_CRITICAL,
1619
1607
  ot as TIMELINE_PRESET_IMPORTANT,
1620
- ie as animalClasses,
1608
+ ne as animalClasses,
1621
1609
  fe as audioClasses,
1622
- me as audioLabelClasses,
1623
- ft as createSystem,
1610
+ de as audioLabelClasses,
1611
+ dt as createSystem,
1624
1612
  it as defaultDetectionClasses,
1625
- ye as detectionClassesDefaultMap,
1613
+ me as detectionClassesDefaultMap,
1626
1614
  he as doorbellClasses,
1627
- le as faceClasses,
1615
+ ae as faceClasses,
1628
1616
  Ot as getBackendRequiredFeatures,
1629
1617
  Tt as getCanonicalDeviceType,
1630
1618
  Ct as getClassesForTimelinePreset,
1631
- Lt as getNextEvalInterval,
1632
1619
  Et as getParentClass,
1633
1620
  Pt as getParentDetectionClass,
1634
1621
  Mt as getSourceFeatures,
1635
- mt as isAnimalClassname,
1622
+ ht as isAnimalClassname,
1636
1623
  _t as isAudioClassname,
1637
1624
  gt as isDoorbellClassname,
1638
1625
  st as isFaceClassname,
@@ -1640,16 +1627,15 @@ export {
1640
1627
  vt as isLabelDetection,
1641
1628
  yt as isMotionClassname,
1642
1629
  wt as isPackageClassname,
1643
- ht as isPersonClassname,
1630
+ pt as isPersonClassname,
1644
1631
  nt as isPlateClassname,
1645
1632
  bt as isSensorLabelClassname,
1646
- pt as isVehicleClassname,
1633
+ mt as isVehicleClassname,
1647
1634
  ce as licensePlateClasses,
1648
- ue as motionClasses,
1649
- de as packageClasses,
1650
- oe as personClasses,
1635
+ le as motionClasses,
1636
+ ue as packageClasses,
1637
+ ie as personClasses,
1651
1638
  rt as raceFastestEndpoint,
1652
- Dt as selectOptimalStream,
1653
1639
  pe as sensorLabelClasses,
1654
- ae as vehicleClasses
1640
+ oe as vehicleClasses
1655
1641
  };