@vincentt-xr/sdk 2.0.0-alpha.17 → 2.0.0-alpha.19

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 (74) hide show
  1. package/GROUNDING.md +225 -0
  2. package/components.json +221 -0
  3. package/dist/{CanonicalHeadFrame-vn-jM9fG.js → CanonicalHeadFrame-CQe2YX9a.js} +3 -3
  4. package/dist/{DebuggerUI-DDpU-nBF.js → DebuggerUI-CKYrYmod.js} +1 -1
  5. package/dist/{FaceRetouch-D2xH5OpW.js → FaceRetouch-l7y4oZBu.js} +4 -4
  6. package/dist/Scenes-BX0bR1j4.js +44 -0
  7. package/dist/Scenes-Dtt8UGE8.cjs +1 -0
  8. package/dist/audio/AudioPlayer.d.ts +2 -1
  9. package/dist/{bodyMaskMaterial-C3aXItLo.js → bodyMaskMaterial-BOdSJUEM.js} +1 -1
  10. package/dist/{cache-C85JjyZA.js → cache-Mu-VO_6E.js} +2 -2
  11. package/dist/components/Button/index.d.ts +23 -0
  12. package/dist/components/Button/safeLink.d.ts +6 -0
  13. package/dist/components/HtmlRegion/index.d.ts +8 -0
  14. package/dist/components/Light/index.d.ts +26 -0
  15. package/dist/components/Model/index.d.ts +16 -0
  16. package/dist/components/Object3D/index.d.ts +13 -0
  17. package/dist/components/PaintedFace/index.d.ts +24 -0
  18. package/dist/components/ScreenImage/types.d.ts +2 -2
  19. package/dist/components/ScreenText/types.d.ts +2 -1
  20. package/dist/components/ThemeProvider/index.d.ts +24 -0
  21. package/dist/components/index.d.ts +6 -0
  22. package/dist/{contexts-B5GODwuV.js → contexts-Cl-4dUOI.js} +2 -2
  23. package/dist/debug-ui/media-source.js +1 -1
  24. package/dist/debug-ui.cjs +1 -1
  25. package/dist/debug-ui.js +11 -11
  26. package/dist/{drawNormalizedCrop-BLfB484W.js → drawNormalizedCrop-D606u5-F.js} +5 -5
  27. package/dist/editor-defs/definitions.d.ts +2 -0
  28. package/dist/editor-defs/index.d.ts +3 -0
  29. package/dist/editor-defs/types.d.ts +54 -0
  30. package/dist/editor-sample/sample.d.ts +15 -0
  31. package/dist/editor-scenes.cjs +1 -1
  32. package/dist/editor-scenes.js +39 -25
  33. package/dist/entries/core.d.ts +13 -1
  34. package/dist/entries/face-effects.d.ts +2 -0
  35. package/dist/face-effects.cjs +68 -68
  36. package/dist/face-effects.js +1353 -1333
  37. package/dist/{getFaceInfo-D_tCSQC7.js → getFaceInfo-Mt44zlej.js} +1 -1
  38. package/dist/{index-B9DdHE4u.js → index-B0EYdofX.js} +1 -1
  39. package/dist/{index-CTqQJj5p.js → index-BDxJWWyy.js} +85 -85
  40. package/dist/{index-DlP4xxaT.js → index-Bn72laBn.js} +4 -4
  41. package/dist/{index-Otoo-rph.js → index-CM3jkleV.js} +240 -223
  42. package/dist/{index-D10O6vqR.js → index-CbBCl2ZU.js} +2 -2
  43. package/dist/{index-CNt8esFO.js → index-CicO_Tnw.js} +1 -1
  44. package/dist/{index-Z5eKEUdE.js → index-D5NbXaCn.js} +4 -4
  45. package/dist/{index-D_pgrgJg.cjs → index-fDwL47CM.cjs} +3 -3
  46. package/dist/instructions.js +7 -7
  47. package/dist/{internal-TD4QhIry.js → internal-BoFDq5hC.js} +3 -3
  48. package/dist/internal.js +2 -2
  49. package/dist/{landmarks-vLy5QKt6.js → landmarks-C3LvDhMt.js} +1 -1
  50. package/dist/low-level.js +17 -17
  51. package/dist/main.cjs +1 -1
  52. package/dist/main.js +1046 -814
  53. package/dist/particles.js +5 -5
  54. package/dist/product.js +2 -2
  55. package/dist/{providers-DmJlgrDD.js → providers-Bxt_MfPK.js} +3 -3
  56. package/dist/{renderGroups-BcQYy_J2.js → renderGroups-uYPzUa66.js} +1 -1
  57. package/dist/{renderPasses-DIPTIU_x.js → renderPasses-C0wu5Cwg.js} +4 -4
  58. package/dist/scene-object.js +2 -2
  59. package/dist/scenes/Scenes.d.ts +17 -0
  60. package/dist/scenes/edit.d.ts +9 -1
  61. package/dist/{segmentation-CZs5aVvY.js → segmentation-DccvYBBO.js} +9 -9
  62. package/dist/{selectors-K5JKCWxw.js → selectors-J06V0eDb.js} +1 -1
  63. package/dist/{session-DHBNTyJJ.js → session-CYiWfcvz.js} +1 -1
  64. package/dist/tracking.js +25 -25
  65. package/dist/{trigger-BwZ81ENx.js → trigger-CQviD4xp.js} +155 -155
  66. package/dist/{useBodies-BMKHXAOL.js → useBodies-DOuwRuew.js} +2 -2
  67. package/dist/{useFaceInfo-BNVdnprN.js → useFaceInfo-XUGYTdfN.js} +4 -4
  68. package/dist/{useFaceResultReader-B15wn6RB.js → useFaceResultReader-D8wXbF1L.js} +1 -1
  69. package/dist/{useIrisTracking-CYm-KDIZ.js → useIrisTracking-B0uLWgNE.js} +10 -10
  70. package/dist/{useXRCapabilities-ClWlG5_Y.js → useXRCapabilities-DPUOvpdf.js} +1 -1
  71. package/package.json +6 -2
  72. package/settings.json +1 -1
  73. package/dist/Scenes-B30XZfTq.js +0 -29
  74. package/dist/Scenes-BLL7YvLw.cjs +0 -1
package/dist/main.js CHANGED
@@ -1,140 +1,142 @@
1
- var Ue = Object.defineProperty;
2
- var Ne = (e, t, s) => t in e ? Ue(e, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[t] = s;
3
- var P = (e, t, s) => Ne(e, typeof t != "symbol" ? t + "" : t, s);
4
- import { j as v, u as Ie, Q as Le, R as Oe, T as Ge, U as qe, V as Be, W as We } from "./index-CTqQJj5p.js";
5
- import { az as Bs, Z as Ws, aA as zs, M as Ks, P as Xs, L as Hs, w as $s, Y as js, aB as Vs, av as Zs, aw as Ys, _ as Qs, c as Js, z as er, y as tr, d as sr, k as rr, af as ar, ag as nr, ah as ir, ai as or, n as cr, aj as lr, i as ur, $ as dr, O as mr, ak as pr, a0 as fr, a1 as hr, al as gr, am as Sr, at as yr, p as Tr, A as Mr, ax as Er, r as Rr, K as br, ay as Ar, a6 as Fr, an as Cr, a7 as vr, a8 as kr, a9 as _r, a5 as xr, aa as wr, ab as Pr, a2 as Dr, ac as Ur, ao as Nr, au as Ir, ad as Lr, ap as Or, t as Gr, a3 as qr, a4 as Br, aq as Wr, ar as zr, ae as Kr, as as Xr } from "./index-CTqQJj5p.js";
6
- import { S as ze } from "./contexts-B5GODwuV.js";
7
- import { X as $r } from "./contexts-B5GODwuV.js";
8
- import { S as Vr, T as Zr } from "./TextLabel-fEF1o3wE.js";
9
- import { jsxs as L, jsx as g, Fragment as re } from "react/jsx-runtime";
10
- import { useRef as F, useMemo as Z, useEffect as _, useState as x, Suspense as Ke, useCallback as R, forwardRef as Xe, useImperativeHandle as He, useContext as $e, createContext as je, useId as Ve, useSyncExternalStore as Ze } from "react";
11
- import * as Ye from "three";
12
- import { MathUtils as Qe, Vector2 as Je, Vector3 as et, DoubleSide as te, RepeatWrapping as Se, LinearFilter as ye } from "three";
13
- import { D as Qr, H as Jr, G as ea, E as ta, J as sa, K as ra, P as aa, S as na, C as ia, I as oa, L as ca, M as la, F as ua, B as da } from "./index-Z5eKEUdE.js";
14
- import { useThree as tt, useFrame as st } from "@react-three/fiber";
15
- import { R as rt } from "./uv-DJU_XfmN.js";
16
- import { c as Fe, b as at } from "./selectors-K5JKCWxw.js";
17
- import { u as nt, a as it, s as ot, F as ct } from "./drawNormalizedCrop-BLfB484W.js";
18
- import { d as pa, b as fa, r as ha } from "./drawNormalizedCrop-BLfB484W.js";
19
- import { S as lt, c as ut } from "./index-Otoo-rph.js";
20
- import { L as Sa, d as ya, R as Ta, a as Ma, e as Ea, b as Ra, f as ba } from "./index-Otoo-rph.js";
21
- import { S as Fa, a as Ca } from "./Scenes-B30XZfTq.js";
22
- import { useTexture as dt } from "@react-three/drei";
23
- import { a as mt } from "./context-DTxSQvp4.js";
24
- import { k as ka, D as _a, j as xa, E as wa, M as Pa, h as Da, S as Ua, T as Na, l as Ia, g as La, n as Oa, r as Ga } from "./renderPasses-DIPTIU_x.js";
25
- import { D as Ba, a as Wa, M as za, n as Ka } from "./index-DlP4xxaT.js";
26
- import { M as Ha } from "./index-D10O6vqR.js";
27
- import { u as ja } from "./useXRCapabilities-ClWlG5_Y.js";
28
- import { g as Ce } from "./cache-C85JjyZA.js";
29
- import { D as Za, X as Ya, c as Qa, u as Ja } from "./cache-C85JjyZA.js";
30
- import { S as pt } from "./segmentation-CZs5aVvY.js";
31
- import { d as tn, a as sn, b as rn, e as an, f as nn, g as on, h as cn } from "./segmentation-CZs5aVvY.js";
32
- const V = (e, t, s, r) => Qe.damp(e, t, Math.max(0, s), Math.max(0, r)), ls = (e, t, s, r, a = new Je()) => a.set(
33
- V(e.x, t.x, s, r),
34
- V(e.y, t.y, s, r)
35
- ), us = (e, t, s, r, a = new et()) => a.set(
36
- V(e.x, t.x, s, r),
37
- V(e.y, t.y, s, r),
38
- V(e.z, t.z, s, r)
39
- ), ft = "rgba(20,40,110,0.88)", ht = 24, gt = 512;
40
- function ds({
41
- color: e = ft,
1
+ var Be = Object.defineProperty;
2
+ var $e = (e, t, r) => t in e ? Be(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
3
+ var D = (e, t, r) => $e(e, typeof t != "symbol" ? t + "" : t, r);
4
+ import { j as k, J as Xe, u as He, as as Ke, at as je, au as Ve, av as Ze, aw as Ye, ax as Je } from "./index-BDxJWWyy.js";
5
+ import { b8 as Ms, az as Es, b9 as bs, M as Rs, P as As, L as Fs, w as Cs, ay as xs, ba as ks, b5 as _s, b6 as vs, aA as ws, c as Ds, z as Ps, y as Us, d as Ns, k as Ls, aR as Is, aS as Os, aT as Gs, aU as zs, n as qs, aV as Ws, i as Bs, aB as $s, O as Xs, aW as Hs, aC as Ks, aD as js, aX as Vs, aY as Zs, b3 as Ys, p as Js, A as Qs, b7 as ea, r as ta, K as ra, a3 as sa, aI as aa, aZ as na, aJ as oa, aK as ia, aL as ca, aH as la, aM as ua, aN as da, aE as ma, aO as fa, a_ as pa, b4 as ha, aP as ga, a$ as ya, t as Sa, aF as Ta, aG as Ma, b0 as Ea, b1 as ba, aQ as Ra, b2 as Aa } from "./index-BDxJWWyy.js";
6
+ import { S as Qe } from "./contexts-Cl-4dUOI.js";
7
+ import { X as Ca } from "./contexts-Cl-4dUOI.js";
8
+ import { S as ka, T as _a } from "./TextLabel-fEF1o3wE.js";
9
+ import { jsxs as O, jsx as g, Fragment as ne } from "react/jsx-runtime";
10
+ import { useRef as A, useMemo as z, useEffect as x, useState as _, Suspense as et, useCallback as F, forwardRef as tt, useImperativeHandle as rt, useContext as st, createContext as at, useId as nt, useSyncExternalStore as ot } from "react";
11
+ import * as de from "three";
12
+ import { MathUtils as it, Vector2 as ct, Vector3 as lt, DoubleSide as se, RepeatWrapping as Ee, LinearFilter as be } from "three";
13
+ import { D as wa, H as Da, G as Pa, E as Ua, J as Na, K as La, P as Ia, S as Oa, C as Ga, I as za, L as qa, M as Wa, F as Ba, B as $a } from "./index-D5NbXaCn.js";
14
+ import { useThree as ut, useFrame as Pe } from "@react-three/fiber";
15
+ import { R as dt } from "./uv-DJU_XfmN.js";
16
+ import { c as Ue, b as mt } from "./selectors-J06V0eDb.js";
17
+ import { u as ft, a as pt, s as ht, F as gt } from "./drawNormalizedCrop-D606u5-F.js";
18
+ import { d as Ha, b as Ka, r as ja } from "./drawNormalizedCrop-D606u5-F.js";
19
+ import { S as yt, c as St, D as L, L as Tt } from "./index-CM3jkleV.js";
20
+ import { d as Za, R as Ya, a as Ja, e as Qa, b as en, f as tn } from "./index-CM3jkleV.js";
21
+ import { a as sn, b as an, u as nn } from "./Scenes-BX0bR1j4.js";
22
+ import { useTexture as Mt } from "@react-three/drei";
23
+ import { a as Et } from "./context-DTxSQvp4.js";
24
+ import { j as K, T as bt } from "./renderPasses-C0wu5Cwg.js";
25
+ import { k as cn, D as ln, E as un, M as dn, h as mn, S as fn, l as pn, g as hn, n as gn, r as yn } from "./renderPasses-C0wu5Cwg.js";
26
+ import { D as Re, M as Rt } from "./index-Bn72laBn.js";
27
+ import { c as Tn, n as Mn } from "./index-Bn72laBn.js";
28
+ import { M as bn } from "./index-CbBCl2ZU.js";
29
+ import { u as An } from "./useXRCapabilities-DPUOvpdf.js";
30
+ import { g as Ne } from "./cache-Mu-VO_6E.js";
31
+ import { D as Cn, X as xn, c as kn, u as _n } from "./cache-Mu-VO_6E.js";
32
+ import { a as At } from "./segmentation-DccvYBBO.js";
33
+ import { d as wn, b as Dn, e as Pn, f as Un, g as Nn, h as Ln, i as In } from "./segmentation-DccvYBBO.js";
34
+ const J = (e, t, r, s) => it.damp(e, t, Math.max(0, r), Math.max(0, s)), Lr = (e, t, r, s, a = new ct()) => a.set(
35
+ J(e.x, t.x, r, s),
36
+ J(e.y, t.y, r, s)
37
+ ), Ir = (e, t, r, s, a = new lt()) => a.set(
38
+ J(e.x, t.x, r, s),
39
+ J(e.y, t.y, r, s),
40
+ J(e.z, t.z, r, s)
41
+ ), Ft = "rgba(20,40,110,0.88)", Ct = 24, xt = 512;
42
+ function Or({
43
+ color: e = Ft,
42
44
  borderColor: t,
43
- borderWidth: s = 0,
44
- borderRadius: r = ht,
45
- resolution: a = gt,
45
+ borderWidth: r = 0,
46
+ borderRadius: s = Ct,
47
+ resolution: a = xt,
46
48
  aspect: n = 1,
47
- opacity: i = 1,
49
+ opacity: o = 1,
48
50
  name: c,
49
- overlay: o = !0,
51
+ overlay: i = !0,
50
52
  position: l,
51
- rotation: h,
53
+ rotation: p,
52
54
  scale: d,
53
- visible: m
55
+ visible: f
54
56
  }) {
55
- const u = F(null), p = F(null), T = Z(() => St({
57
+ const u = A(null), m = A(null), S = z(() => kt({
56
58
  width: Math.round(a * Math.max(n, 0.05)),
57
59
  height: Math.round(a),
58
60
  color: e,
59
61
  borderColor: t,
60
- borderWidth: s,
61
- borderRadius: r
62
- }), [e, t, s, r, a, n]);
63
- _(() => () => {
64
- T.dispose();
65
- }, [T]);
66
- const E = F(null), f = F(i);
67
- return f.current !== i && (f.current = i, E.current = null, p.current && (p.current.opacity = i)), _(() => {
68
- const S = u.current;
69
- if (S)
70
- return S.userData.setOpacity = (b) => {
71
- E.current = b, p.current && (p.current.opacity = b);
62
+ borderWidth: r,
63
+ borderRadius: s
64
+ }), [e, t, r, s, a, n]);
65
+ x(() => () => {
66
+ S.dispose();
67
+ }, [S]);
68
+ const T = A(null), h = A(o);
69
+ return h.current !== o && (h.current = o, T.current = null, m.current && (m.current.opacity = o)), x(() => {
70
+ const y = u.current;
71
+ if (y)
72
+ return y.userData.setOpacity = (E) => {
73
+ T.current = E, m.current && (m.current.opacity = E);
72
74
  }, () => {
73
- delete S.userData.setOpacity;
75
+ delete y.userData.setOpacity;
74
76
  };
75
- }, []), /* @__PURE__ */ L(
77
+ }, []), /* @__PURE__ */ O(
76
78
  "mesh",
77
79
  {
78
80
  ref: u,
79
81
  name: c,
80
82
  position: l,
81
- rotation: h,
83
+ rotation: p,
82
84
  scale: d,
83
- visible: m,
85
+ visible: f,
84
86
  children: [
85
87
  /* @__PURE__ */ g("planeGeometry", { args: [1, 1] }),
86
88
  /* @__PURE__ */ g(
87
89
  "meshBasicMaterial",
88
90
  {
89
- ref: p,
90
- map: T,
91
+ ref: m,
92
+ map: S,
91
93
  transparent: !0,
92
- opacity: i,
93
- depthTest: !o,
94
- depthWrite: !o
94
+ opacity: o,
95
+ depthTest: !i,
96
+ depthWrite: !i
95
97
  }
96
98
  )
97
99
  ]
98
100
  }
99
101
  );
100
102
  }
101
- function St(e) {
102
- const { width: t, height: s, color: r, borderColor: a, borderWidth: n, borderRadius: i } = e, c = typeof OffscreenCanvas < "u" ? new OffscreenCanvas(t, s) : (() => {
103
+ function kt(e) {
104
+ const { width: t, height: r, color: s, borderColor: a, borderWidth: n, borderRadius: o } = e, c = typeof OffscreenCanvas < "u" ? new OffscreenCanvas(t, r) : (() => {
103
105
  const d = document.createElement("canvas");
104
- return d.width = t, d.height = s, d;
105
- })(), o = c.getContext("2d");
106
- o.clearRect(0, 0, t, s);
107
- const l = Math.min(i, Math.min(t, s) / 2);
108
- o.beginPath(), o.moveTo(l, 0), o.lineTo(t - l, 0), o.quadraticCurveTo(t, 0, t, l), o.lineTo(t, s - l), o.quadraticCurveTo(t, s, t - l, s), o.lineTo(l, s), o.quadraticCurveTo(0, s, 0, s - l), o.lineTo(0, l), o.quadraticCurveTo(0, 0, l, 0), o.closePath(), o.fillStyle = r, o.fill(), a && n > 0 && (o.lineWidth = n, o.strokeStyle = a, o.stroke());
109
- const h = new Ye.CanvasTexture(c);
110
- return h.needsUpdate = !0, h;
106
+ return d.width = t, d.height = r, d;
107
+ })(), i = c.getContext("2d");
108
+ i.clearRect(0, 0, t, r);
109
+ const l = Math.min(o, Math.min(t, r) / 2);
110
+ i.beginPath(), i.moveTo(l, 0), i.lineTo(t - l, 0), i.quadraticCurveTo(t, 0, t, l), i.lineTo(t, r - l), i.quadraticCurveTo(t, r, t - l, r), i.lineTo(l, r), i.quadraticCurveTo(0, r, 0, r - l), i.lineTo(0, l), i.quadraticCurveTo(0, 0, l, 0), i.closePath(), i.fillStyle = s, i.fill(), a && n > 0 && (i.lineWidth = n, i.strokeStyle = a, i.stroke());
111
+ const p = new de.CanvasTexture(c);
112
+ return p.needsUpdate = !0, p;
111
113
  }
112
- const ms = ({
114
+ const Gr = ({
113
115
  segmentationMask: e,
114
116
  segmentation: t,
115
- invert: s = !1,
116
- customBackground: r,
117
- renderOrder: a = rt.BACKGROUND
117
+ invert: r = !1,
118
+ customBackground: s,
119
+ renderOrder: a = dt.BACKGROUND
118
120
  }) => {
119
- const { camera: n, size: i } = tt(), c = Fe(), o = at(v.BACKGROUND_SEGMENTATION), l = t ? o == null ? void 0 : o.backgroundSegmentationMask : void 0, h = F(!1);
120
- _(() => {
121
+ const { camera: n, size: o } = ut(), c = Ue(), i = mt(k.BACKGROUND_SEGMENTATION), l = t ? i == null ? void 0 : i.backgroundSegmentationMask : void 0, p = A(!1);
122
+ x(() => {
121
123
  if (!t) {
122
- h.current = !1;
124
+ p.current = !1;
123
125
  return;
124
126
  }
125
- o === null && !h.current && (console.warn(
127
+ i === null && !p.current && (console.warn(
126
128
  `[VideoBackground] segmentation="${t}" set but no matching <Segmentation> component is mounted; rendering unmasked.`
127
- ), h.current = !0);
128
- }, [t, o]);
129
- const d = t ? l : e, m = Z(() => {
129
+ ), p.current = !0);
130
+ }, [t, i]);
131
+ const d = t ? l : e, f = z(() => {
130
132
  if (!n.isPerspectiveCamera)
131
133
  return [10, 10];
132
- const u = n, E = (u.position.z || 5) - -1, f = u.fov * Math.PI / 180, S = 2 * Math.tan(f / 2) * E;
133
- return [S * (i.width / i.height), S];
134
- }, [n, i]);
135
- return c ? /* @__PURE__ */ g("group", { position: [0, 0, -1], children: s ? /* @__PURE__ */ L(re, { children: [
136
- /* @__PURE__ */ L("mesh", { position: [0, 0, -0.01], renderOrder: a - 1, children: [
137
- /* @__PURE__ */ g("planeGeometry", { args: m }),
134
+ const u = n, T = (u.position.z || 5) - -1, h = u.fov * Math.PI / 180, y = 2 * Math.tan(h / 2) * T;
135
+ return [y * (o.width / o.height), y];
136
+ }, [n, o]);
137
+ return c ? /* @__PURE__ */ g("group", { position: [0, 0, -1], children: r ? /* @__PURE__ */ O(ne, { children: [
138
+ /* @__PURE__ */ O("mesh", { position: [0, 0, -0.01], renderOrder: a - 1, children: [
139
+ /* @__PURE__ */ g("planeGeometry", { args: f }),
138
140
  /* @__PURE__ */ g(
139
141
  "meshBasicMaterial",
140
142
  {
@@ -142,45 +144,45 @@ const ms = ({
142
144
  depthTest: !1,
143
145
  depthWrite: !1,
144
146
  toneMapped: !1,
145
- side: te
147
+ side: se
146
148
  }
147
149
  )
148
150
  ] }),
149
- r && d && /* @__PURE__ */ L("mesh", { position: [0, 0, 0], renderOrder: a, children: [
150
- /* @__PURE__ */ g("planeGeometry", { args: m }),
151
+ s && d && /* @__PURE__ */ O("mesh", { position: [0, 0, 0], renderOrder: a, children: [
152
+ /* @__PURE__ */ g("planeGeometry", { args: f }),
151
153
  /* @__PURE__ */ g(
152
154
  "meshBasicMaterial",
153
155
  {
154
- map: typeof r == "string" ? void 0 : r,
155
- color: typeof r == "string" ? r : void 0,
156
+ map: typeof s == "string" ? void 0 : s,
157
+ color: typeof s == "string" ? s : void 0,
156
158
  alphaMap: d,
157
159
  transparent: !1,
158
160
  alphaTest: 0.5,
159
161
  depthTest: !1,
160
162
  depthWrite: !1,
161
163
  toneMapped: !1,
162
- side: te
164
+ side: se
163
165
  },
164
166
  "inverted-mask"
165
167
  )
166
168
  ] })
167
- ] }) : /* @__PURE__ */ L(re, { children: [
168
- r && d && /* @__PURE__ */ L("mesh", { position: [0, 0, -0.01], renderOrder: a - 1, children: [
169
- /* @__PURE__ */ g("planeGeometry", { args: m }),
169
+ ] }) : /* @__PURE__ */ O(ne, { children: [
170
+ s && d && /* @__PURE__ */ O("mesh", { position: [0, 0, -0.01], renderOrder: a - 1, children: [
171
+ /* @__PURE__ */ g("planeGeometry", { args: f }),
170
172
  /* @__PURE__ */ g(
171
173
  "meshBasicMaterial",
172
174
  {
173
- map: typeof r == "string" ? void 0 : r,
174
- color: typeof r == "string" ? r : void 0,
175
+ map: typeof s == "string" ? void 0 : s,
176
+ color: typeof s == "string" ? s : void 0,
175
177
  depthTest: !1,
176
178
  depthWrite: !1,
177
179
  toneMapped: !1,
178
- side: te
180
+ side: se
179
181
  }
180
182
  )
181
183
  ] }),
182
- /* @__PURE__ */ L("mesh", { position: [0, 0, 0], renderOrder: a, children: [
183
- /* @__PURE__ */ g("planeGeometry", { args: m }),
184
+ /* @__PURE__ */ O("mesh", { position: [0, 0, 0], renderOrder: a, children: [
185
+ /* @__PURE__ */ g("planeGeometry", { args: f }),
184
186
  /* @__PURE__ */ g(
185
187
  "meshBasicMaterial",
186
188
  {
@@ -191,63 +193,63 @@ const ms = ({
191
193
  depthTest: !1,
192
194
  depthWrite: !1,
193
195
  toneMapped: !1,
194
- side: te
196
+ side: se
195
197
  },
196
198
  d ? "with-mask" : "no-mask"
197
199
  )
198
200
  ] })
199
201
  ] }) }) : null;
200
- }, ve = ({
202
+ }, Le = ({
201
203
  mask: e,
202
204
  status: t,
203
- error: s,
204
- invert: r = !1,
205
+ error: r,
206
+ invert: s = !1,
205
207
  fallback: a = "camera",
206
208
  onStatusChange: n,
207
- fit: i = "cover",
208
- anchors: c = ct,
209
- renderOrder: o = 100,
209
+ fit: o = "cover",
210
+ anchors: c = gt,
211
+ renderOrder: i = 100,
210
212
  visible: l = !0,
211
- maskFeather: h = 4,
213
+ maskFeather: p = 4,
212
214
  maskErode: d = 0.7,
213
- ...m
215
+ ...f
214
216
  }) => {
215
- const u = Fe();
216
- if (_(() => {
217
- n == null || n(t, s);
218
- }, [t, s, n]), !u) return null;
219
- const p = t === "ready" && e;
220
- return !p && !ot(t, a) ? null : /* @__PURE__ */ g(
221
- lt,
217
+ const u = Ue();
218
+ if (x(() => {
219
+ n == null || n(t, r);
220
+ }, [t, r, n]), !u) return null;
221
+ const m = t === "ready" && e;
222
+ return !m && !ht(t, a) ? null : /* @__PURE__ */ g(
223
+ yt,
222
224
  {
223
- ...m,
225
+ ...f,
224
226
  source: { kind: "texture", texture: u },
225
- fit: i,
227
+ fit: o,
226
228
  anchors: c,
227
- renderOrder: o,
229
+ renderOrder: i,
228
230
  visible: l,
229
- maskTexture: p ? e : null,
231
+ maskTexture: m ? e : null,
230
232
  maskChannel: "green",
231
- maskInvert: r,
232
- maskFeather: h,
233
+ maskInvert: s,
234
+ maskFeather: p,
233
235
  maskErode: d
234
236
  }
235
237
  );
236
- }, yt = ({ active: e = !0, ...t }) => {
237
- const { texture: s, status: r, error: a } = it(e);
238
- return /* @__PURE__ */ g(ve, { ...t, mask: s, status: r, error: a });
239
- }, Tt = ({ bodyId: e, subject: t, numBodies: s, active: r = !0, ...a }) => {
240
- const { texture: n, status: i, error: c } = nt({ bodyId: e, subject: t, numBodies: s, active: r });
241
- return /* @__PURE__ */ g(ve, { ...a, mask: n, status: i, error: c });
242
- }, ps = ({ bodyId: e, subject: t, numBodies: s, ...r }) => e !== void 0 || t ? /* @__PURE__ */ g(Tt, { ...r, bodyId: e, subject: t, numBodies: s }) : /* @__PURE__ */ g(yt, { ...r }), ie = 9, oe = 16, fs = ({ children: e }) => {
243
- const [t, s] = x({ width: 0, height: 0 });
244
- return _(() => {
245
- const r = () => {
246
- const a = document.documentElement.clientWidth, n = document.documentElement.clientHeight, i = a / n, c = ie / oe;
247
- let o, l;
248
- i > c ? (l = n, o = l * ie / oe) : (o = a, l = o * oe / ie), s({ width: o, height: l });
238
+ }, _t = ({ active: e = !0, ...t }) => {
239
+ const { texture: r, status: s, error: a } = pt(e);
240
+ return /* @__PURE__ */ g(Le, { ...t, mask: r, status: s, error: a });
241
+ }, vt = ({ bodyId: e, subject: t, numBodies: r, active: s = !0, ...a }) => {
242
+ const { texture: n, status: o, error: c } = ft({ bodyId: e, subject: t, numBodies: r, active: s });
243
+ return /* @__PURE__ */ g(Le, { ...a, mask: n, status: o, error: c });
244
+ }, zr = ({ bodyId: e, subject: t, numBodies: r, ...s }) => e !== void 0 || t ? /* @__PURE__ */ g(vt, { ...s, bodyId: e, subject: t, numBodies: r }) : /* @__PURE__ */ g(_t, { ...s }), ce = 9, le = 16, qr = ({ children: e }) => {
245
+ const [t, r] = _({ width: 0, height: 0 });
246
+ return x(() => {
247
+ const s = () => {
248
+ const a = document.documentElement.clientWidth, n = document.documentElement.clientHeight, o = a / n, c = ce / le;
249
+ let i, l;
250
+ o > c ? (l = n, i = l * ce / le) : (i = a, l = i * le / ce), r({ width: i, height: l });
249
251
  };
250
- return r(), window.addEventListener("resize", r), () => window.removeEventListener("resize", r);
252
+ return s(), window.addEventListener("resize", s), () => window.removeEventListener("resize", s);
251
253
  }, []), /* @__PURE__ */ g(
252
254
  "div",
253
255
  {
@@ -262,34 +264,257 @@ const ms = ({
262
264
  children: /* @__PURE__ */ g("div", { style: { width: t.width, height: t.height, position: "relative" }, children: e })
263
265
  }
264
266
  );
265
- }, hs = ({ size: e = 0.25, ...t }) => /* @__PURE__ */ g("axesHelper", { args: [e], ...t }), Mt = { left: -1, right: 1, top: 1, bottom: -1 }, Et = (e, t, s) => {
266
- const r = e % t, a = Math.floor(e / t);
267
- return { x: r / t, y: (s - 1 - a) / s };
268
- }, Rt = ({
267
+ }, Wr = ({ size: e = 0.25, ...t }) => /* @__PURE__ */ g("axesHelper", { args: [e], ...t }), wt = { left: -1, right: 1, top: 1, bottom: -1 }, Dt = (e, t, r) => {
268
+ const s = e % t, a = Math.floor(e / t);
269
+ return { x: s / t, y: (r - 1 - a) / r };
270
+ }, Pt = ({
269
271
  sheet: e,
270
272
  contentAspect: t,
271
- renderOrder: s,
272
- name: r
273
+ renderOrder: r,
274
+ name: s
273
275
  }) => {
274
- const a = dt(e.url), n = F(0), i = F(-1), c = mt(), [o, l] = t != null ? ut(c, t) : [1, 1];
275
- return st((h, d) => {
276
- a.wrapS = Se, a.wrapT = Se, a.magFilter = ye, a.minFilter = ye, a.generateMipmaps = !1, a.repeat.set(1 / e.cols, 1 / e.rows), n.current += d;
277
- const m = Math.floor(n.current * e.fps) % e.frames;
278
- if (m === i.current) return;
279
- i.current = m;
280
- const { x: u, y: p } = Et(m, e.cols, e.rows);
281
- a.offset.set(u, p);
282
- }), /* @__PURE__ */ L("mesh", { name: r, renderOrder: s, scale: [o, l, 1], children: [
276
+ const a = Mt(e.url), n = A(0), o = A(-1), c = Et(), [i, l] = t != null ? St(c, t) : [1, 1];
277
+ return Pe((p, d) => {
278
+ a.wrapS = Ee, a.wrapT = Ee, a.magFilter = be, a.minFilter = be, a.generateMipmaps = !1, a.repeat.set(1 / e.cols, 1 / e.rows), n.current += d;
279
+ const f = Math.floor(n.current * e.fps) % e.frames;
280
+ if (f === o.current) return;
281
+ o.current = f;
282
+ const { x: u, y: m } = Dt(f, e.cols, e.rows);
283
+ a.offset.set(u, m);
284
+ }), /* @__PURE__ */ O("mesh", { name: s, renderOrder: r, scale: [i, l, 1], children: [
283
285
  /* @__PURE__ */ g("planeGeometry", { args: [1, 1] }),
284
286
  /* @__PURE__ */ g("meshBasicMaterial", { map: a, transparent: !0, toneMapped: !1, depthWrite: !1 })
285
287
  ] });
286
- }, gs = ({
288
+ }, Br = ({
287
289
  sheet: e,
288
- anchors: t = Mt,
289
- contentAspect: s,
290
- renderOrder: r = 10,
290
+ anchors: t = wt,
291
+ contentAspect: r,
292
+ renderOrder: s = 10,
291
293
  name: a = "spriteAnimation"
292
- }) => /* @__PURE__ */ g(Ke, { fallback: null, children: /* @__PURE__ */ g(ze, { anchors: t, children: /* @__PURE__ */ g(Rt, { sheet: e, contentAspect: s, renderOrder: r, name: a }) }) }), q = (e) => {
294
+ }) => /* @__PURE__ */ g(et, { fallback: null, children: /* @__PURE__ */ g(Qe, { anchors: t, children: /* @__PURE__ */ g(Pt, { sheet: e, contentAspect: r, renderOrder: s, name: a }) }) }), Ut = 64, Nt = 3, Lt = /^[A-Za-z][A-Za-z0-9]{0,39}$/, It = /^#(?:[0-9a-fA-F]{3,4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/, Ot = /^(?:rgb|rgba|hsl|hsla)\([0-9a-z.,%\s/+-]{1,60}\)$/i, Gt = /^-?[0-9]{1,4}(?:\.[0-9]{1,4})?(?:px|em|rem|%)?$/, zt = /^[A-Za-z0-9 ,'"_-]{1,120}$/;
295
+ function qt(e) {
296
+ return It.test(e) || Ot.test(e) || Gt.test(e) || zt.test(e);
297
+ }
298
+ const Ae = (e) => e.map((t) => t.replace(/[A-Z]/g, (r) => `-${r.toLowerCase()}`)).join("-");
299
+ function Wt(e) {
300
+ const t = {};
301
+ let r = 0;
302
+ const s = (a, n) => {
303
+ for (const o of Object.keys(a)) {
304
+ if (r >= Ut) return;
305
+ if (!Lt.test(o)) continue;
306
+ const c = a[o], i = [...n, o];
307
+ typeof c == "number" ? Number.isFinite(c) && (t[`--vincentt-${Ae(i)}`] = String(c), r++) : typeof c == "string" ? qt(c) && (t[`--vincentt-${Ae(i)}`] = c, r++) : c && typeof c == "object" && !Array.isArray(c) && i.length < Nt && s(c, i);
308
+ }
309
+ };
310
+ return e && typeof e == "object" && s(e, []), t;
311
+ }
312
+ function $r({ theme: e, className: t, children: r }) {
313
+ const s = { display: "contents", ...Wt(e) };
314
+ return /* @__PURE__ */ g("div", { className: t, style: s, children: r });
315
+ }
316
+ const ue = (e, t) => ({
317
+ x: (t == null ? void 0 : t.x) ?? e.x,
318
+ y: (t == null ? void 0 : t.y) ?? e.y,
319
+ z: (t == null ? void 0 : t.z) ?? e.z
320
+ });
321
+ function Xr({
322
+ src: e,
323
+ position: t,
324
+ rotation: r,
325
+ scale: s,
326
+ visible: a = !0,
327
+ material: n,
328
+ // `name` and `locked` are editor metadata; neither changes rendering.
329
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
330
+ name: o,
331
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
332
+ locked: c
333
+ }) {
334
+ const [i, l, p] = [t == null ? void 0 : t.x, t == null ? void 0 : t.y, t == null ? void 0 : t.z], [d, f, u] = [r == null ? void 0 : r.x, r == null ? void 0 : r.y, r == null ? void 0 : r.z], [m, S, T] = [s == null ? void 0 : s.x, s == null ? void 0 : s.y, s == null ? void 0 : s.z], h = z(
335
+ () => ({
336
+ ...K,
337
+ position: ue(K.position, { x: i, y: l, z: p }),
338
+ rotation: ue(K.rotation, { x: d, y: f, z: u }),
339
+ scale: ue(K.scale, { x: m, y: S, z: T }),
340
+ visible: a
341
+ }),
342
+ [i, l, p, d, f, u, m, S, T, a]
343
+ ), y = z(
344
+ () => ({
345
+ ...Re,
346
+ assetUrl: e,
347
+ material: { ...Re.material, ...n }
348
+ }),
349
+ [e, n]
350
+ );
351
+ return /* @__PURE__ */ g(bt, { value: h, children: /* @__PURE__ */ g(Rt, { value: y }) });
352
+ }
353
+ const Bt = (e) => Array.isArray(e) ? e : [e], $t = (e) => {
354
+ const [t, r] = _(null);
355
+ return x(() => {
356
+ if (!e) return;
357
+ let s = !0, a = null;
358
+ return new de.TextureLoader().load(
359
+ e,
360
+ (n) => {
361
+ if (a = n, !s) {
362
+ n.dispose();
363
+ return;
364
+ }
365
+ n.colorSpace = de.SRGBColorSpace, n.flipY = !1, r({ url: e, texture: n });
366
+ },
367
+ void 0,
368
+ () => console.warn(`${Xe.loggerPrefix} Object3D could not load ${e}`)
369
+ ), () => {
370
+ s = !1, a == null || a.dispose();
371
+ };
372
+ }, [e]), e && (t == null ? void 0 : t.url) === e ? t.texture : null;
373
+ };
374
+ function Hr({
375
+ colour: e,
376
+ texture: t,
377
+ size: r = 1,
378
+ visible: s = !0,
379
+ children: a,
380
+ // `name` and `locked` are editor metadata; neither changes rendering.
381
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
382
+ name: n,
383
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
384
+ locked: o
385
+ }) {
386
+ const c = A(null), i = A(/* @__PURE__ */ new Map()), l = $t(t), p = e !== void 0 || l !== null, d = () => {
387
+ for (const [f, { original: u, own: m }] of i.current)
388
+ f.material = u, m.forEach((S) => S.dispose());
389
+ i.current.clear();
390
+ };
391
+ return Pe(() => {
392
+ !p || !c.current || c.current.traverse((f) => {
393
+ const u = f;
394
+ if (!u.isMesh || i.current.has(u)) return;
395
+ const m = u.material, S = Bt(m).map((T) => {
396
+ var y;
397
+ const h = T.clone();
398
+ return e !== void 0 && ((y = h.color) == null || y.set(e)), l && (h.map = l, h.needsUpdate = !0), h;
399
+ });
400
+ u.material = Array.isArray(m) ? S : S[0], i.current.set(u, { original: m, own: S });
401
+ });
402
+ }), x(() => (d(), d), [e, l]), /* @__PURE__ */ g("group", { ref: c, visible: s, scale: r, children: a });
403
+ }
404
+ function Kr({
405
+ className: e,
406
+ children: t,
407
+ // `name` and `locked` are editor metadata; neither changes rendering.
408
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
409
+ name: r,
410
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
411
+ locked: s
412
+ }) {
413
+ return /* @__PURE__ */ g("div", { className: e, children: t });
414
+ }
415
+ const Xt = 2048;
416
+ function Ht(e) {
417
+ return e <= 32 || e >= 127 && e <= 160 || e === 173 || e === 92 || e === 1564 || e === 6158 || e >= 8192 && e <= 8207 || e >= 8232 && e <= 8238 || e >= 8288 && e <= 8303 || e === 12288 || e === 65279 || e >= 917504 && e <= 917631;
418
+ }
419
+ function Kt(e) {
420
+ if (typeof e != "string" || e.length === 0 || e.length > Xt) return;
421
+ for (const s of e)
422
+ if (Ht(s.codePointAt(0) ?? 0)) return;
423
+ const t = e.toLowerCase();
424
+ return t.startsWith("https://") || t.startsWith("http://") || t.startsWith("mailto:") || t.startsWith("#") || t.startsWith("/") && !t.startsWith("//") ? e : void 0;
425
+ }
426
+ const Fe = {
427
+ display: "inline-block",
428
+ padding: "0.6em 1.2em",
429
+ border: "none",
430
+ borderRadius: "var(--vincentt-radius, 0.5em)",
431
+ background: "var(--vincentt-button, #111827)",
432
+ color: "var(--vincentt-button-text, #ffffff)",
433
+ font: "inherit",
434
+ textDecoration: "none",
435
+ cursor: "pointer"
436
+ };
437
+ function jr({
438
+ label: e,
439
+ link: t,
440
+ onTap: r,
441
+ color: s,
442
+ visible: a = !0,
443
+ className: n,
444
+ children: o,
445
+ // `name` and `locked` are editor metadata; neither changes rendering.
446
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
447
+ name: c,
448
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
449
+ locked: i
450
+ }) {
451
+ if (!a) return null;
452
+ const l = s ? { ...Fe, background: s } : Fe, p = Kt(t), d = o ?? e;
453
+ if (p) {
454
+ const f = /^https?:/i.test(p);
455
+ return /* @__PURE__ */ g(
456
+ "a",
457
+ {
458
+ href: p,
459
+ className: n,
460
+ style: l,
461
+ onClick: r,
462
+ ...f ? { target: "_blank", rel: "noopener noreferrer" } : {},
463
+ children: d
464
+ }
465
+ );
466
+ }
467
+ return /* @__PURE__ */ g("button", { type: "button", className: n, style: l, onClick: r, children: d });
468
+ }
469
+ const Ce = (e, t) => ({
470
+ x: (t == null ? void 0 : t.x) ?? e.x,
471
+ y: (t == null ? void 0 : t.y) ?? e.y,
472
+ z: (t == null ? void 0 : t.z) ?? e.z
473
+ });
474
+ function Vr({
475
+ type: e = L.type,
476
+ color: t = L.color,
477
+ intensity: r = L.intensity,
478
+ enabled: s = L.enabled,
479
+ castShadow: a = !1,
480
+ distance: n = L.distance,
481
+ decay: o = L.decay,
482
+ angle: c = L.angle,
483
+ penumbra: i = L.penumbra,
484
+ position: l,
485
+ rotation: p,
486
+ showHelper: d = L.showHelper,
487
+ // `name` and `locked` are editor metadata; neither changes rendering.
488
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
489
+ name: f,
490
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
491
+ locked: u
492
+ }) {
493
+ const [m, S, T] = [l == null ? void 0 : l.x, l == null ? void 0 : l.y, l == null ? void 0 : l.z], [h, y, E] = [p == null ? void 0 : p.x, p == null ? void 0 : p.y, p == null ? void 0 : p.z], q = z(
494
+ () => ({
495
+ ...K,
496
+ position: Ce(K.position, { x: m, y: S, z: T }),
497
+ rotation: Ce(K.rotation, { x: h, y, z: E })
498
+ }),
499
+ [m, S, T, h, y, E]
500
+ ), b = z(
501
+ () => ({
502
+ enabled: s,
503
+ type: e,
504
+ color: t,
505
+ intensity: r,
506
+ castShadow: a,
507
+ distance: n,
508
+ angle: c,
509
+ penumbra: i,
510
+ decay: o,
511
+ showHelper: d
512
+ }),
513
+ [s, e, t, r, a, n, c, i, o, d]
514
+ );
515
+ return /* @__PURE__ */ g(Tt, { settings: b, transform: q });
516
+ }
517
+ const B = (e) => {
293
518
  switch (e) {
294
519
  case "start":
295
520
  return "starting";
@@ -307,207 +532,207 @@ const ms = ({
307
532
  case "clear":
308
533
  return "idle";
309
534
  }
310
- }, bt = [
535
+ }, jt = [
311
536
  "video/mp4",
312
537
  "video/webm;codecs=vp9",
313
538
  "video/webm;codecs=vp8",
314
539
  "video/webm"
315
540
  ];
316
- function Ss(e = {}) {
541
+ function Zr(e = {}) {
317
542
  const {
318
543
  audio: t = !1,
319
- mimeType: s,
320
- bitsPerSecond: r,
544
+ mimeType: r,
545
+ bitsPerSecond: s,
321
546
  onData: a,
322
547
  onStop: n,
323
- onRecordingStart: i,
548
+ onRecordingStart: o,
324
549
  onRecordingPause: c,
325
- onRecordingResume: o,
550
+ onRecordingResume: i,
326
551
  onRecordingStop: l,
327
- onRecordingComplete: h,
552
+ onRecordingComplete: p,
328
553
  onError: d,
329
- passThroughStream: m
330
- } = e, u = F(null), p = F(null), T = F([]), [E, f] = x("idle"), [S, b] = x(null), [K, A] = x(null), w = R(() => {
554
+ passThroughStream: f
555
+ } = e, u = A(null), m = A(null), S = A([]), [T, h] = _("idle"), [y, E] = _(null), [q, b] = _(null), w = F(() => {
331
556
  var C;
332
- const y = [s, ...bt].filter(Boolean);
333
- for (const M of y)
334
- if ((C = MediaRecorder.isTypeSupported) != null && C.call(MediaRecorder, M)) return M;
335
- }, [s]), G = R(
336
- async (y) => {
557
+ const M = [r, ...jt].filter(Boolean);
558
+ for (const R of M)
559
+ if ((C = MediaRecorder.isTypeSupported) != null && C.call(MediaRecorder, R)) return R;
560
+ }, [r]), W = F(
561
+ async (M) => {
337
562
  const C = new MediaStream();
338
- if (y.getTracks().forEach((M) => C.addTrack(M)), t) {
339
- let M;
563
+ if (M.getTracks().forEach((R) => C.addTrack(R)), t) {
564
+ let R;
340
565
  if (t instanceof MediaStream)
341
- M = t;
566
+ R = t;
342
567
  else {
343
- const k = typeof t == "object" ? { audio: t } : { audio: !0, video: !1 };
344
- M = await navigator.mediaDevices.getUserMedia(k);
568
+ const v = typeof t == "object" ? { audio: t } : { audio: !0, video: !1 };
569
+ R = await navigator.mediaDevices.getUserMedia(v);
345
570
  }
346
- M.getAudioTracks().forEach((k) => C.addTrack(k));
571
+ R.getAudioTracks().forEach((v) => C.addTrack(v));
347
572
  }
348
573
  if (!C.getTracks().length)
349
574
  throw new Error("No tracks available in combined stream.");
350
- return p.current = C, C;
575
+ return m.current = C, C;
351
576
  },
352
577
  [t]
353
- ), Y = R(
354
- async (y, C) => {
355
- f(q("start")), A(null), b(null);
578
+ ), Q = F(
579
+ async (M, C) => {
580
+ h(B("start")), b(null), E(null);
356
581
  try {
357
- let M;
358
- if (m)
359
- M = m, p.current = M;
582
+ let R;
583
+ if (f)
584
+ R = f, m.current = R;
360
585
  else {
361
- if (!y) throw new Error("start(stream) requires a MediaStream.");
362
- M = await G(y);
586
+ if (!M) throw new Error("start(stream) requires a MediaStream.");
587
+ R = await W(M);
363
588
  }
364
- const k = w(), X = {};
365
- k && (X.mimeType = k), r && (X.bitsPerSecond = r);
366
- const z = new MediaRecorder(M, X);
367
- z.ondataavailable = (N) => {
368
- var $;
369
- (($ = N.data) == null ? void 0 : $.size) > 0 && (T.current.push(N.data), a == null || a(N.data));
370
- }, z.onstop = () => {
371
- const N = new Blob(T.current, {
372
- type: k ?? "video/webm"
589
+ const v = w(), j = {};
590
+ v && (j.mimeType = v), s && (j.bitsPerSecond = s);
591
+ const H = new MediaRecorder(R, j);
592
+ H.ondataavailable = (N) => {
593
+ var Z;
594
+ ((Z = N.data) == null ? void 0 : Z.size) > 0 && (S.current.push(N.data), a == null || a(N.data));
595
+ }, H.onstop = () => {
596
+ const N = new Blob(S.current, {
597
+ type: v ?? "video/webm"
373
598
  });
374
- b(N), n == null || n(N), h == null || h(N), T.current = [], f(q("complete"));
375
- }, u.current = z, z.start(C), f(q("started")), i == null || i();
376
- } catch (M) {
377
- const k = M instanceof Error ? M : new Error(String(M));
378
- console.error("start(stream) failed", k), A(k), f(q("fail")), d == null || d(k);
599
+ E(N), n == null || n(N), p == null || p(N), S.current = [], h(B("complete"));
600
+ }, u.current = H, H.start(C), h(B("started")), o == null || o();
601
+ } catch (R) {
602
+ const v = R instanceof Error ? R : new Error(String(R));
603
+ console.error("start(stream) failed", v), b(v), h(B("fail")), d == null || d(v);
379
604
  }
380
605
  },
381
606
  [
382
- G,
607
+ W,
383
608
  w,
384
- r,
609
+ s,
385
610
  a,
386
611
  n,
387
- h,
388
- i,
612
+ p,
613
+ o,
389
614
  d,
390
- m
615
+ f
391
616
  ]
392
- ), Q = R(() => {
393
- const y = u.current;
394
- !y || y.state === "inactive" || (f(q("stop")), y.stop(), l == null || l());
395
- }, [l]), J = R(() => {
396
- const y = u.current;
397
- (y == null ? void 0 : y.state) === "recording" && (y.pause(), f(q("pause")), c == null || c());
398
- }, [c]), ee = R(() => {
399
- const y = u.current;
400
- (y == null ? void 0 : y.state) === "paused" && (y.resume(), f(q("resume")), o == null || o());
401
- }, [o]), H = R(() => {
402
- var y;
617
+ ), ee = F(() => {
618
+ const M = u.current;
619
+ !M || M.state === "inactive" || (h(B("stop")), M.stop(), l == null || l());
620
+ }, [l]), te = F(() => {
621
+ const M = u.current;
622
+ (M == null ? void 0 : M.state) === "recording" && (M.pause(), h(B("pause")), c == null || c());
623
+ }, [c]), re = F(() => {
624
+ const M = u.current;
625
+ (M == null ? void 0 : M.state) === "paused" && (M.resume(), h(B("resume")), i == null || i());
626
+ }, [i]), V = F(() => {
627
+ var M;
403
628
  try {
404
- u.current && (u.current.onstop = null, u.current.state !== "inactive" && u.current.stop()), u.current = null, (y = p.current) == null || y.getTracks().forEach((C) => C.stop()), p.current = null, b(null), f(q("clear")), T.current = [], A(null);
629
+ u.current && (u.current.onstop = null, u.current.state !== "inactive" && u.current.stop()), u.current = null, (M = m.current) == null || M.getTracks().forEach((C) => C.stop()), m.current = null, E(null), h(B("clear")), S.current = [], b(null);
405
630
  } catch (C) {
406
631
  console.error("clear failed", C);
407
632
  }
408
633
  }, []);
409
- return _(() => () => H(), []), {
410
- status: E,
411
- start: Y,
412
- stop: Q,
413
- pause: J,
414
- resume: ee,
415
- clear: H,
416
- isRecording: E === "recording" || E === "paused",
417
- isPaused: E === "paused",
418
- recordedBlob: S,
419
- error: K,
420
- getActiveStream: () => p.current
634
+ return x(() => () => V(), []), {
635
+ status: T,
636
+ start: Q,
637
+ stop: ee,
638
+ pause: te,
639
+ resume: re,
640
+ clear: V,
641
+ isRecording: T === "recording" || T === "paused",
642
+ isPaused: T === "paused",
643
+ recordedBlob: y,
644
+ error: q,
645
+ getActiveStream: () => m.current
421
646
  };
422
647
  }
423
- const At = async (e, t = {}) => {
424
- var s, r, a;
425
- (s = t.onCaptureStart) == null || s.call(t), await Promise.resolve();
648
+ const Vt = async (e, t = {}) => {
649
+ var r, s, a;
650
+ (r = t.onCaptureStart) == null || r.call(t), await Promise.resolve();
426
651
  try {
427
652
  const n = e();
428
- return (r = t.onCaptureComplete) == null || r.call(t, n), n;
653
+ return (s = t.onCaptureComplete) == null || s.call(t, n), n;
429
654
  } catch (n) {
430
- const i = n instanceof Error ? n : new Error(String(n));
431
- throw (a = t.onError) == null || a.call(t, i), i;
655
+ const o = n instanceof Error ? n : new Error(String(n));
656
+ throw (a = t.onError) == null || a.call(t, o), o;
432
657
  }
433
- }, ys = (e = {}) => {
434
- const { session: t } = Ie(), {
435
- captureFrame: s = t.captureFrame,
436
- onCaptureStart: r,
658
+ }, Yr = (e = {}) => {
659
+ const { session: t } = He(), {
660
+ captureFrame: r = t.captureFrame,
661
+ onCaptureStart: s,
437
662
  onCaptureComplete: a,
438
663
  onError: n
439
- } = e, [i, c] = x("idle"), [o, l] = x(null), [h, d] = x(null), m = R(async () => {
664
+ } = e, [o, c] = _("idle"), [i, l] = _(null), [p, d] = _(null), f = F(async () => {
440
665
  c("capturing"), l(null), d(null);
441
666
  try {
442
- const p = await At(s, {
443
- onCaptureStart: r,
667
+ const m = await Vt(r, {
668
+ onCaptureStart: s,
444
669
  onCaptureComplete: a,
445
670
  onError: n
446
671
  });
447
- return l(p), c("completed"), p;
448
- } catch (p) {
449
- const T = p instanceof Error ? p : new Error(String(p));
450
- return d(T), c("error"), null;
672
+ return l(m), c("completed"), m;
673
+ } catch (m) {
674
+ const S = m instanceof Error ? m : new Error(String(m));
675
+ return d(S), c("error"), null;
451
676
  }
452
- }, [s, r, a, n]), u = R(() => {
677
+ }, [r, s, a, n]), u = F(() => {
453
678
  c("idle"), l(null), d(null);
454
679
  }, []);
455
- return { status: i, capturePhoto: m, clear: u, dataUrl: o, error: h };
456
- }, Ts = (e, t) => {
457
- const s = e.split(","), r = s[0].match(/:(.*?);/), a = r ? r[1] : "application/octet-stream", n = atob(s[s.length - 1]);
458
- let i = n.length;
459
- const c = new Uint8Array(i);
460
- for (; i--; )
461
- c[i] = n.charCodeAt(i);
680
+ return { status: o, capturePhoto: f, clear: u, dataUrl: i, error: p };
681
+ }, Jr = (e, t) => {
682
+ const r = e.split(","), s = r[0].match(/:(.*?);/), a = s ? s[1] : "application/octet-stream", n = atob(r[r.length - 1]);
683
+ let o = n.length;
684
+ const c = new Uint8Array(o);
685
+ for (; o--; )
686
+ c[o] = n.charCodeAt(o);
462
687
  return new File([c], t, { type: a });
463
- }, Ft = 4, Ct = 50, vt = 5e3, se = (e) => Math.min(1, Math.max(0, e)), Te = (e) => new Promise((t) => {
688
+ }, Zt = 4, Yt = 50, Jt = 5e3, ae = (e) => Math.min(1, Math.max(0, e)), xe = (e) => new Promise((t) => {
464
689
  if (e.readyState >= 4) {
465
690
  t();
466
691
  return;
467
692
  }
468
- let s = !1;
469
- const r = () => {
470
- s || (s = !0, t());
693
+ let r = !1;
694
+ const s = () => {
695
+ r || (r = !0, t());
471
696
  };
472
- e.addEventListener("canplaythrough", r, { once: !0 }), e.addEventListener("error", r, { once: !0 }), setTimeout(r, vt);
473
- }), Me = (e, t) => {
474
- const s = document.createElement("audio");
475
- return s.src = e, s.loop = t, s.preload = "auto", s.setAttribute("playsinline", ""), s.setAttribute("webkit-playsinline", ""), s.load(), s;
476
- }, kt = (e) => {
697
+ e.addEventListener("canplaythrough", s, { once: !0 }), e.addEventListener("error", s, { once: !0 }), setTimeout(s, Jt);
698
+ }), ke = (e, t) => {
699
+ const r = document.createElement("audio");
700
+ return r.src = e, r.loop = t, r.preload = "auto", r.setAttribute("playsinline", ""), r.setAttribute("webkit-playsinline", ""), r.load(), r;
701
+ }, Qt = (e) => {
477
702
  e.muted = !0, e.play().then(() => {
478
703
  e.pause(), e.currentTime = 0, e.muted = !1;
479
704
  }).catch(() => {
480
705
  e.muted = !1;
481
706
  });
482
707
  };
483
- class _t {
708
+ class er {
484
709
  constructor(t = {}) {
485
- P(this, "sfxPoolSize");
486
- P(this, "coalesceMs");
487
- P(this, "muted", !0);
488
- P(this, "listeners", /* @__PURE__ */ new Set());
489
- P(this, "music", null);
490
- P(this, "musicUrl", null);
491
- P(this, "musicReady", null);
492
- P(this, "musicWanted", null);
493
- P(this, "pools", /* @__PURE__ */ new Map());
710
+ D(this, "sfxPoolSize");
711
+ D(this, "coalesceMs");
712
+ D(this, "muted", !0);
713
+ D(this, "listeners", /* @__PURE__ */ new Set());
714
+ D(this, "music", null);
715
+ D(this, "musicUrl", null);
716
+ D(this, "musicReady", null);
717
+ D(this, "musicWanted", null);
718
+ D(this, "pools", /* @__PURE__ */ new Map());
494
719
  /** Last play time per SFX URL, for the coalesce window. */
495
- P(this, "lastPlayed", /* @__PURE__ */ new Map());
720
+ D(this, "lastPlayed", /* @__PURE__ */ new Map());
496
721
  /** Readiness promises so a loading gate can await decode/buffer. */
497
- P(this, "ready", /* @__PURE__ */ new Map());
498
- this.sfxPoolSize = t.sfxPoolSize ?? Ft, this.coalesceMs = t.coalesceMs ?? Ct;
722
+ D(this, "ready", /* @__PURE__ */ new Map());
723
+ this.sfxPoolSize = t.sfxPoolSize ?? Zt, this.coalesceMs = t.coalesceMs ?? Yt;
499
724
  }
500
725
  /**
501
726
  * Create + buffer the looping music element. Await in the loading gate so the
502
727
  * unmute tap is instant. Idempotent per URL (re-requesting the same track is
503
728
  * a no-op that returns the in-flight promise).
504
729
  */
505
- prefetchMusic(t, s = 0.4) {
506
- const r = se(s);
507
- if (this.musicWanted = { url: t, volume: r }, this.musicUrl === t && this.musicReady)
508
- return this.music && (this.music.volume = r), this.musicReady;
509
- this.music && (this.music.pause(), this.music.currentTime = 0, this.music.removeAttribute("src"), this.music.load()), this.music = Me(t, !0), this.musicUrl = t, this.music.volume = r;
510
- const a = Te(this.music);
730
+ prefetchMusic(t, r = 0.4) {
731
+ const s = ae(r);
732
+ if (this.musicWanted = { url: t, volume: s }, this.musicUrl === t && this.musicReady)
733
+ return this.music && (this.music.volume = s), this.musicReady;
734
+ this.music && (this.music.pause(), this.music.currentTime = 0, this.music.removeAttribute("src"), this.music.load()), this.music = ke(t, !0), this.musicUrl = t, this.music.volume = s;
735
+ const a = xe(this.music);
511
736
  return this.musicReady = a, a;
512
737
  }
513
738
  /**
@@ -515,19 +740,19 @@ class _t {
515
740
  * cut each other off). Returns a promise that resolves when the first element
516
741
  * buffers. Idempotent per URL.
517
742
  */
518
- registerSound(t, s = 1) {
519
- const r = this.ready.get(t);
520
- if (r) return r;
521
- const a = se(s), n = [];
743
+ registerSound(t, r = 1) {
744
+ const s = this.ready.get(t);
745
+ if (s) return s;
746
+ const a = ae(r), n = [];
522
747
  for (let c = 0; c < this.sfxPoolSize; c += 1) {
523
- const o = Me(t, !1);
524
- o.volume = a, o.addEventListener("ended", () => {
525
- o.currentTime = 0;
526
- }), n.push(o);
748
+ const i = ke(t, !1);
749
+ i.volume = a, i.addEventListener("ended", () => {
750
+ i.currentTime = 0;
751
+ }), n.push(i);
527
752
  }
528
753
  this.pools.set(t, { els: n, next: 0, volume: a });
529
- const i = Te(n[0]);
530
- return this.ready.set(t, i), i;
754
+ const o = xe(n[0]);
755
+ return this.ready.set(t, o), o;
531
756
  }
532
757
  /** Subscribe to mute-state changes (for a toggle UI). Fires immediately with
533
758
  * the current state. Returns an unsubscribe. */
@@ -544,7 +769,7 @@ class _t {
544
769
  * then start the music. All elements are already buffered, so this is instant.
545
770
  */
546
771
  setMuted(t) {
547
- t !== this.muted && (this.muted = t, this.muted || this.pools.forEach((s) => s.els.forEach(kt)), this.applyMusic(), this.listeners.forEach((s) => s(this.muted)));
772
+ t !== this.muted && (this.muted = t, this.muted || this.pools.forEach((r) => r.els.forEach(Qt)), this.applyMusic(), this.listeners.forEach((r) => r(this.muted)));
548
773
  }
549
774
  toggleMuted() {
550
775
  this.setMuted(!this.muted);
@@ -555,30 +780,30 @@ class _t {
555
780
  * same sound into one play, and does NO synchronous `currentTime` seek on a
556
781
  * ready element (the pool rewinds on `ended`, off the hot path).
557
782
  */
558
- playOneShot(t, s) {
783
+ playOneShot(t, r) {
559
784
  if (this.muted) return;
560
- const r = this.pools.get(t);
561
- if (!r) return;
785
+ const s = this.pools.get(t);
786
+ if (!s) return;
562
787
  const a = performance.now();
563
788
  if (a - (this.lastPlayed.get(t) ?? -1 / 0) < this.coalesceMs) return;
564
789
  this.lastPlayed.set(t, a);
565
- const n = r.els.length;
566
- let i;
790
+ const n = s.els.length;
791
+ let o;
567
792
  for (let c = 0; c < n; c += 1) {
568
- const o = r.els[(r.next + c) % n];
569
- if (o.paused) {
570
- i = o, r.next = (r.next + c + 1) % n;
793
+ const i = s.els[(s.next + c) % n];
794
+ if (i.paused) {
795
+ o = i, s.next = (s.next + c + 1) % n;
571
796
  break;
572
797
  }
573
798
  }
574
- i || (i = r.els[r.next], r.next = (r.next + 1) % n), i.muted = !1, i.volume = se(s ?? r.volume), i.currentTime !== 0 && (i.currentTime = 0), i.play().catch(() => {
799
+ o || (o = s.els[s.next], s.next = (s.next + 1) % n), o.muted = !1, o.volume = ae(r ?? s.volume), o.currentTime !== 0 && (o.currentTime = 0), o.play().catch(() => {
575
800
  });
576
801
  }
577
802
  /** Request the looping background track (buffer it with prefetchMusic, which
578
803
  * a loading gate awaits). Remembered while muted; starts on unmute. */
579
- startMusic(t, s = 0.4) {
580
- const r = se(s);
581
- this.musicUrl !== t && this.prefetchMusic(t, r), this.musicWanted = { url: t, volume: r }, this.applyMusic();
804
+ startMusic(t, r = 0.4) {
805
+ const s = ae(r);
806
+ this.musicUrl !== t && this.prefetchMusic(t, s), this.musicWanted = { url: t, volume: s }, this.applyMusic();
582
807
  }
583
808
  stopMusic() {
584
809
  this.musicWanted = null, this.music && (this.music.pause(), this.music.currentTime = 0);
@@ -588,70 +813,70 @@ class _t {
588
813
  }), this.muted && !this.music.paused && this.music.pause());
589
814
  }
590
815
  }
591
- const xt = (e, t, s) => e === "infinite" || e === "loop" && t < Math.max(1, Math.floor(s)) ? "replay" : "ended", wt = (e, t, s) => e && t !== s, Pt = (e) => Math.min(100, Math.max(0, e)) / 100, Ms = Xe(function({
816
+ const tr = (e, t, r) => e === "infinite" || e === "loop" && t < Math.max(1, Math.floor(r)) ? "replay" : "ended", rr = (e, t, r) => e && t !== r, sr = (e) => Math.min(100, Math.max(0, e)) / 100, Qr = tt(function({
592
817
  src: t,
593
- playMode: s = "once",
594
- loopCount: r = 1,
818
+ playMode: r = "once",
819
+ loopCount: s = 1,
595
820
  autoplay: a = !1,
596
821
  muted: n = !1,
597
- volume: i = 100,
822
+ volume: o = 100,
598
823
  preload: c = "auto",
599
- onReady: o,
824
+ onReady: i,
600
825
  onPlay: l,
601
- onPause: h,
826
+ onPause: p,
602
827
  onEnded: d,
603
- onError: m
828
+ onError: f
604
829
  }, u) {
605
- const p = F(null), T = F(0), E = F(null), f = R(async () => {
606
- const A = p.current;
607
- if (A)
830
+ const m = A(null), S = A(0), T = A(null), h = F(async () => {
831
+ const b = m.current;
832
+ if (b)
608
833
  try {
609
- await A.play();
834
+ await b.play();
610
835
  } catch (w) {
611
- const G = w instanceof Error ? w : new Error(String(w));
612
- throw m == null || m(G), G;
836
+ const W = w instanceof Error ? w : new Error(String(w));
837
+ throw f == null || f(W), W;
613
838
  }
614
- }, [m]), S = R(() => {
615
- var A;
616
- return (A = p.current) == null ? void 0 : A.pause();
617
- }, []), b = R(() => {
618
- const A = p.current;
619
- A && (A.pause(), A.currentTime = 0, T.current = 0);
839
+ }, [f]), y = F(() => {
840
+ var b;
841
+ return (b = m.current) == null ? void 0 : b.pause();
842
+ }, []), E = F(() => {
843
+ const b = m.current;
844
+ b && (b.pause(), b.currentTime = 0, S.current = 0);
620
845
  }, []);
621
- He(
846
+ rt(
622
847
  u,
623
848
  () => ({
624
- play: f,
625
- pause: S,
626
- stop: b,
849
+ play: h,
850
+ pause: y,
851
+ stop: E,
627
852
  get current() {
628
- return p.current;
853
+ return m.current;
629
854
  }
630
855
  }),
631
- [S, f, b]
632
- ), _(() => {
633
- T.current = 0, E.current = null;
634
- }, [t]), _(() => {
635
- p.current && (p.current.volume = Pt(i));
636
- }, [i]), _(() => {
637
- wt(a, E.current, t) && (E.current = t, f().catch(() => {
856
+ [y, h, E]
857
+ ), x(() => {
858
+ S.current = 0, T.current = null;
859
+ }, [t]), x(() => {
860
+ m.current && (m.current.volume = sr(o));
861
+ }, [o]), x(() => {
862
+ rr(a, T.current, t) && (T.current = t, h().catch(() => {
638
863
  }));
639
864
  }, [a, t]);
640
- const K = R(() => {
641
- T.current += 1;
642
- const A = Math.max(1, Math.floor(r));
643
- if (xt(s, T.current, A) === "replay") {
644
- const w = p.current;
645
- w && (w.currentTime = 0, f().catch(() => {
865
+ const q = F(() => {
866
+ S.current += 1;
867
+ const b = Math.max(1, Math.floor(s));
868
+ if (tr(r, S.current, b) === "replay") {
869
+ const w = m.current;
870
+ w && (w.currentTime = 0, h().catch(() => {
646
871
  }));
647
872
  return;
648
873
  }
649
- T.current = 0, d == null || d();
650
- }, [r, d, f, s]);
874
+ S.current = 0, d == null || d();
875
+ }, [s, d, h, r]);
651
876
  return /* @__PURE__ */ g(
652
877
  "audio",
653
878
  {
654
- ref: p,
879
+ ref: m,
655
880
  src: t,
656
881
  preload: c,
657
882
  autoPlay: !1,
@@ -659,58 +884,58 @@ const xt = (e, t, s) => e === "infinite" || e === "loop" && t < Math.max(1, Math
659
884
  loop: !1,
660
885
  playsInline: !0,
661
886
  style: { display: "none" },
662
- onCanPlayThrough: o,
887
+ onCanPlayThrough: i,
663
888
  onPlay: l,
664
- onPause: h,
665
- onEnded: K,
666
- onError: () => m == null ? void 0 : m(new Error(`Unable to load audio: ${t}`))
889
+ onPause: p,
890
+ onEnded: q,
891
+ onError: () => f == null ? void 0 : f(new Error(`Unable to load audio: ${t}`))
667
892
  }
668
893
  );
669
- }), U = new _t(), Es = (e, t) => U.prefetchMusic(e, t), Rs = (e, t) => U.registerSound(e, t), bs = (e, t) => U.startMusic(e, t), As = () => U.stopMusic(), Fs = (e, t) => U.playOneShot(e, t), Cs = (e) => U.setMuted(e), vs = () => U.toggleMuted(), ks = () => U.isMuted(), _s = (e) => U.onMuteChange(e), xs = () => {
670
- const [e, t] = x(U.isMuted());
671
- return _(() => U.onMuteChange(t), []), e;
672
- }, Dt = (e = {}) => {
673
- const { auto: t = !1 } = e, s = F(e.env ?? Le()), r = F(e.constraints);
674
- r.current = e.constraints;
675
- const [a, n] = x("unknown"), [i, c] = x(null), o = F(0), l = R(async () => {
676
- const d = ++o.current, m = await Oe(s.current);
677
- if (d !== o.current) return a;
678
- const u = m.state === "unknown" ? "unknown" : m.state;
679
- return n((p) => p === "requesting" ? p : u), u !== "blocked" && c(null), u;
680
- }, []), h = R(
894
+ }), U = new er(), es = (e, t) => U.prefetchMusic(e, t), ts = (e, t) => U.registerSound(e, t), rs = (e, t) => U.startMusic(e, t), ss = () => U.stopMusic(), as = (e, t) => U.playOneShot(e, t), ns = (e) => U.setMuted(e), os = () => U.toggleMuted(), is = () => U.isMuted(), cs = (e) => U.onMuteChange(e), ls = () => {
895
+ const [e, t] = _(U.isMuted());
896
+ return x(() => U.onMuteChange(t), []), e;
897
+ }, ar = (e = {}) => {
898
+ const { auto: t = !1 } = e, r = A(e.env ?? Ke()), s = A(e.constraints);
899
+ s.current = e.constraints;
900
+ const [a, n] = _("unknown"), [o, c] = _(null), i = A(0), l = F(async () => {
901
+ const d = ++i.current, f = await je(r.current);
902
+ if (d !== i.current) return a;
903
+ const u = f.state === "unknown" ? "unknown" : f.state;
904
+ return n((m) => m === "requesting" ? m : u), u !== "blocked" && c(null), u;
905
+ }, []), p = F(
681
906
  async (d) => {
682
- const m = ++o.current;
907
+ const f = ++i.current;
683
908
  n("requesting"), c(null);
684
- const u = await Ge(
685
- { constraints: (d == null ? void 0 : d.constraints) ?? r.current, keepStream: !1 },
686
- s.current
909
+ const u = await Ve(
910
+ { constraints: (d == null ? void 0 : d.constraints) ?? s.current, keepStream: !1 },
911
+ r.current
687
912
  );
688
- return m !== o.current || (n(u.state), c(u.reason)), u.state;
913
+ return f !== i.current || (n(u.state), c(u.reason)), u.state;
689
914
  },
690
915
  []
691
916
  );
692
- return _(() => {
917
+ return x(() => {
693
918
  let d = () => {
694
- }, m = !0;
695
- return t ? h() : l(), qe((u) => {
696
- m && (n((p) => p === "requesting" ? p : u.state === "unknown" ? "unknown" : u.state), u.state !== "blocked" && c(null));
697
- }, s.current).then((u) => {
698
- m ? d = u : u();
919
+ }, f = !0;
920
+ return t ? p() : l(), Ze((u) => {
921
+ f && (n((m) => m === "requesting" ? m : u.state === "unknown" ? "unknown" : u.state), u.state !== "blocked" && c(null));
922
+ }, r.current).then((u) => {
923
+ f ? d = u : u();
699
924
  }), () => {
700
- m = !1, o.current += 1, d();
925
+ f = !1, i.current += 1, d();
701
926
  };
702
- }, [t, l, h]), Z(
927
+ }, [t, l, p]), z(
703
928
  () => ({
704
929
  state: a,
705
- reason: i,
706
- canPrompt: Be(a),
930
+ reason: o,
931
+ canPrompt: Ye(a),
707
932
  usable: a === "granted",
708
- request: h,
933
+ request: p,
709
934
  refresh: l
710
935
  }),
711
- [a, i, h, l]
936
+ [a, o, p, l]
712
937
  );
713
- }, Ut = {
938
+ }, nr = {
714
939
  display: "flex",
715
940
  flexDirection: "column",
716
941
  alignItems: "center",
@@ -723,7 +948,7 @@ const xt = (e, t, s) => e === "infinite" || e === "loop" && t < Math.max(1, Math
723
948
  background: "#111827",
724
949
  color: "#f9fafb",
725
950
  fontFamily: "system-ui, sans-serif"
726
- }, Nt = {
951
+ }, or = {
727
952
  font: "inherit",
728
953
  padding: "10px 18px",
729
954
  borderRadius: 8,
@@ -731,86 +956,86 @@ const xt = (e, t, s) => e === "infinite" || e === "loop" && t < Math.max(1, Math
731
956
  background: "#2563eb",
732
957
  color: "#fff",
733
958
  cursor: "pointer"
734
- }, ws = ({
959
+ }, us = ({
735
960
  children: e,
736
961
  fallback: t,
737
- auto: s = !1,
738
- constraints: r,
962
+ auto: r = !1,
963
+ constraints: s,
739
964
  requestLabel: a = "Allow camera"
740
965
  }) => {
741
- const n = Dt({ auto: s, constraints: r });
742
- if (n.usable) return /* @__PURE__ */ g(re, { children: e });
743
- if (t) return /* @__PURE__ */ g(re, { children: t(n) });
744
- const { state: i, reason: c, canPrompt: o, request: l } = n;
745
- return /* @__PURE__ */ L("div", { style: Ut, role: "region", "aria-label": "Camera access", children: [
746
- /* @__PURE__ */ g("p", { "aria-live": "polite", style: { margin: 0 }, children: (c == null ? void 0 : c.message) ?? We[i] }),
966
+ const n = ar({ auto: r, constraints: s });
967
+ if (n.usable) return /* @__PURE__ */ g(ne, { children: e });
968
+ if (t) return /* @__PURE__ */ g(ne, { children: t(n) });
969
+ const { state: o, reason: c, canPrompt: i, request: l } = n;
970
+ return /* @__PURE__ */ O("div", { style: nr, role: "region", "aria-label": "Camera access", children: [
971
+ /* @__PURE__ */ g("p", { "aria-live": "polite", style: { margin: 0 }, children: (c == null ? void 0 : c.message) ?? Je[o] }),
747
972
  /* @__PURE__ */ g(
748
973
  "button",
749
974
  {
750
975
  type: "button",
751
976
  onClick: () => void l(),
752
- disabled: !o || i === "requesting",
753
- "aria-disabled": !o || i === "requesting",
754
- style: { ...Nt, opacity: o && i !== "requesting" ? 1 : 0.5 },
755
- children: i === "requesting" ? "Waiting…" : i === "denied" ? "Try again" : a
977
+ disabled: !i || o === "requesting",
978
+ "aria-disabled": !i || o === "requesting",
979
+ style: { ...or, opacity: i && o !== "requesting" ? 1 : 0.5 },
980
+ children: o === "requesting" ? "Waiting…" : o === "denied" ? "Try again" : a
756
981
  }
757
982
  )
758
983
  ] });
759
- }, It = () => {
984
+ }, ir = () => {
760
985
  var e;
761
986
  return {
762
987
  enumerateDevices: typeof navigator < "u" && ((e = navigator.mediaDevices) != null && e.enumerateDevices) ? () => navigator.mediaDevices.enumerateDevices() : void 0
763
988
  };
764
- }, Lt = /\b(back|rear|environment|world)\b/i, Ot = /\b(front|user|facetime|selfie)\b/i, Gt = (e) => Lt.test(e) ? "environment" : Ot.test(e) ? "user" : null, Ps = async (e = It()) => {
989
+ }, cr = /\b(back|rear|environment|world)\b/i, lr = /\b(front|user|facetime|selfie)\b/i, ur = (e) => cr.test(e) ? "environment" : lr.test(e) ? "user" : null, ds = async (e = ir()) => {
765
990
  if (!e.enumerateDevices) return [];
766
991
  try {
767
- return (await e.enumerateDevices()).filter((s) => s.kind === "videoinput").map((s) => ({
768
- deviceId: s.deviceId,
769
- label: s.label,
770
- facing: Gt(s.label)
992
+ return (await e.enumerateDevices()).filter((r) => r.kind === "videoinput").map((r) => ({
993
+ deviceId: r.deviceId,
994
+ label: r.label,
995
+ facing: ur(r.label)
771
996
  }));
772
997
  } catch {
773
998
  return [];
774
999
  }
775
- }, Ds = (e, t) => e.find((s) => s.facing === t) ?? null, ke = je(null), Us = ({
1000
+ }, ms = (e, t) => e.find((r) => r.facing === t) ?? null, Ie = at(null), fs = ({
776
1001
  cache: e,
777
1002
  disposeUnreferencedOnUnmount: t = !0,
778
- children: s
1003
+ children: r
779
1004
  }) => {
780
- const r = e ?? Ce();
781
- return _(() => () => {
782
- t && r.disposeUnreferenced();
783
- }, [r, t]), /* @__PURE__ */ g(ke.Provider, { value: r, children: s });
784
- }, _e = () => $e(ke) ?? Ce(), Ns = (e, t = {}) => {
785
- const { enabled: s = !0 } = t, r = _e(), a = Ve(), n = (e == null ? void 0 : e.key) ?? null, [i, c] = x({
1005
+ const s = e ?? Ne();
1006
+ return x(() => () => {
1007
+ t && s.disposeUnreferenced();
1008
+ }, [s, t]), /* @__PURE__ */ g(Ie.Provider, { value: s, children: r });
1009
+ }, Oe = () => st(Ie) ?? Ne(), ps = (e, t = {}) => {
1010
+ const { enabled: r = !0 } = t, s = Oe(), a = nt(), n = (e == null ? void 0 : e.key) ?? null, [o, c] = _({
786
1011
  value: null,
787
1012
  status: "idle",
788
1013
  error: null
789
1014
  });
790
- return _(() => {
791
- if (!e || !s) {
1015
+ return x(() => {
1016
+ if (!e || !r) {
792
1017
  c({ value: null, status: "idle", error: null });
793
1018
  return;
794
1019
  }
795
- let o = !0;
796
- const l = r.get(e.key);
797
- return c({ value: l ?? null, status: l ? "ready" : "loading", error: null }), r.acquire(e, a).then((h) => {
798
- o && c({ value: h, status: "ready", error: null });
799
- }).catch((h) => {
800
- o && c({ value: null, status: "error", error: h });
1020
+ let i = !0;
1021
+ const l = s.get(e.key);
1022
+ return c({ value: l ?? null, status: l ? "ready" : "loading", error: null }), s.acquire(e, a).then((p) => {
1023
+ i && c({ value: p, status: "ready", error: null });
1024
+ }).catch((p) => {
1025
+ i && c({ value: null, status: "error", error: p });
801
1026
  }), () => {
802
- o = !1, r.release(e.key, a);
1027
+ i = !1, s.release(e.key, a);
803
1028
  };
804
- }, [r, n, s, a]), i;
805
- }, Is = (e) => {
806
- const t = _e(), s = e ?? t;
807
- return Ze(
808
- (r) => s.subscribe(r),
809
- () => s.getStats(),
810
- () => s.getStats()
1029
+ }, [s, n, r, a]), o;
1030
+ }, hs = (e) => {
1031
+ const t = Oe(), r = e ?? t;
1032
+ return ot(
1033
+ (s) => r.subscribe(s),
1034
+ () => r.getStats(),
1035
+ () => r.getStats()
811
1036
  );
812
- }, ae = 1, xe = Object.freeze({
813
- version: ae,
1037
+ }, oe = 1, Ge = Object.freeze({
1038
+ version: oe,
814
1039
  trackers: {
815
1040
  face: { enabled: !0, numFaces: 1, targetFps: null, holdMs: 250, predictMs: 0, smoothing: 0 },
816
1041
  hand: { enabled: !1, targetFps: null },
@@ -837,13 +1062,13 @@ const xt = (e, t, s) => e === "infinite" || e === "loop" && t < Math.max(1, Math
837
1062
  fallbacks: { onUnsupported: "degrade", delegate: "auto" },
838
1063
  assets: { holisticModelUrl: null, semanticSegmentationModelUrl: null },
839
1064
  updatedAt: 0
840
- }), D = (e, t, s, r, a, n) => {
1065
+ }), P = (e, t, r, s, a, n) => {
841
1066
  if (e === void 0) return t;
842
1067
  if (typeof e != "number" || !Number.isFinite(e))
843
1068
  return n(`${a}: not a number, kept ${t}`), t;
844
- const i = Math.min(r, Math.max(s, e));
845
- return i !== e && n(`${a}: ${e} clamped to ${i}`), i;
846
- }, j = (e, t, s, r) => e === void 0 ? t : e === null ? null : typeof e != "number" || !Number.isFinite(e) || e <= 0 ? (r(`${s}: invalid fps, kept ${t}`), t) : (e > 120 && r(`${s}: ${e} clamped to 120`), Math.min(120, e)), qt = [
1069
+ const o = Math.min(s, Math.max(r, e));
1070
+ return o !== e && n(`${a}: ${e} clamped to ${o}`), o;
1071
+ }, Y = (e, t, r, s) => e === void 0 ? t : e === null ? null : typeof e != "number" || !Number.isFinite(e) || e <= 0 ? (s(`${r}: invalid fps, kept ${t}`), t) : (e > 120 && s(`${r}: ${e} clamped to 120`), Math.min(120, e)), dr = [
847
1072
  "tiers",
848
1073
  "budget",
849
1074
  "initialTier",
@@ -851,133 +1076,133 @@ const xt = (e, t, s) => e === "infinite" || e === "loop" && t < Math.max(1, Math
851
1076
  "maxTier",
852
1077
  "adaptive",
853
1078
  "historySize"
854
- ], Ee = (e) => {
1079
+ ], _e = (e) => {
855
1080
  const t = {};
856
- for (const s of qt) e[s] !== void 0 && (t[s] = e[s]);
1081
+ for (const r of dr) e[r] !== void 0 && (t[r] = e[r]);
857
1082
  return t;
858
- }, I = (e, t, s, r) => e === void 0 ? t : typeof e != "boolean" ? (r(`${s}: not a boolean, kept ${t}`), t) : e, B = (e, t, s, r, a) => e === void 0 ? s : t.includes(e) ? e : (a(`${r}: "${String(e)}" is not one of ${t.join(" | ")}, kept ${s}`), s), Re = (e, t, s, r) => e === void 0 ? t : e === null ? null : typeof e != "string" || !/^https?:\/\//.test(e) ? (r(`${s}: not an http(s) URL, kept ${t === null ? "the SDK default" : t}`), t) : e, W = (e = {}, t = xe, s = []) => {
859
- var c, o, l, h, d, m, u, p, T, E, f, S, b, K, A, w, G, Y, Q, J, ee, H, y, C, M, k, X, z, N, $, le, ue, de, me, pe, fe, he, ge;
860
- const r = (De) => s.push(De), a = e.trackers ?? {}, n = t.trackers, i = e.quality === void 0 ? t.quality === !1 ? !1 : Ee(t.quality) : e.quality === !1 ? !1 : typeof e.quality == "object" && e.quality !== null ? Ee(e.quality) : (r("quality: must be an object or false, kept base"), t.quality);
1083
+ }, I = (e, t, r, s) => e === void 0 ? t : typeof e != "boolean" ? (s(`${r}: not a boolean, kept ${t}`), t) : e, $ = (e, t, r, s, a) => e === void 0 ? r : t.includes(e) ? e : (a(`${s}: "${String(e)}" is not one of ${t.join(" | ")}, kept ${r}`), r), ve = (e, t, r, s) => e === void 0 ? t : e === null ? null : typeof e != "string" || !/^https?:\/\//.test(e) ? (s(`${r}: not an http(s) URL, kept ${t === null ? "the SDK default" : t}`), t) : e, X = (e = {}, t = Ge, r = []) => {
1084
+ var c, i, l, p, d, f, u, m, S, T, h, y, E, q, b, w, W, Q, ee, te, re, V, M, C, R, v, j, H, N, Z, fe, pe, he, ge, ye, Se, Te, Me;
1085
+ const s = (We) => r.push(We), a = e.trackers ?? {}, n = t.trackers, o = e.quality === void 0 ? t.quality === !1 ? !1 : _e(t.quality) : e.quality === !1 ? !1 : typeof e.quality == "object" && e.quality !== null ? _e(e.quality) : (s("quality: must be an object or false, kept base"), t.quality);
861
1086
  return {
862
- version: ae,
1087
+ version: oe,
863
1088
  trackers: {
864
1089
  face: {
865
- enabled: I((c = a.face) == null ? void 0 : c.enabled, n.face.enabled, "trackers.face.enabled", r),
1090
+ enabled: I((c = a.face) == null ? void 0 : c.enabled, n.face.enabled, "trackers.face.enabled", s),
866
1091
  numFaces: Math.round(
867
- D((o = a.face) == null ? void 0 : o.numFaces, n.face.numFaces, 1, 10, "trackers.face.numFaces", r)
1092
+ P((i = a.face) == null ? void 0 : i.numFaces, n.face.numFaces, 1, 10, "trackers.face.numFaces", s)
868
1093
  ),
869
- targetFps: j((l = a.face) == null ? void 0 : l.targetFps, n.face.targetFps, "trackers.face.targetFps", r),
870
- holdMs: D((h = a.face) == null ? void 0 : h.holdMs, n.face.holdMs, 0, 5e3, "trackers.face.holdMs", r),
871
- predictMs: D(
1094
+ targetFps: Y((l = a.face) == null ? void 0 : l.targetFps, n.face.targetFps, "trackers.face.targetFps", s),
1095
+ holdMs: P((p = a.face) == null ? void 0 : p.holdMs, n.face.holdMs, 0, 5e3, "trackers.face.holdMs", s),
1096
+ predictMs: P(
872
1097
  (d = a.face) == null ? void 0 : d.predictMs,
873
1098
  n.face.predictMs,
874
1099
  0,
875
1100
  1e3,
876
1101
  "trackers.face.predictMs",
877
- r
1102
+ s
878
1103
  ),
879
- smoothing: D(
880
- (m = a.face) == null ? void 0 : m.smoothing,
1104
+ smoothing: P(
1105
+ (f = a.face) == null ? void 0 : f.smoothing,
881
1106
  n.face.smoothing,
882
1107
  0,
883
1108
  100,
884
1109
  "trackers.face.smoothing",
885
- r
1110
+ s
886
1111
  )
887
1112
  },
888
1113
  hand: {
889
- enabled: I((u = a.hand) == null ? void 0 : u.enabled, n.hand.enabled, "trackers.hand.enabled", r),
890
- targetFps: j((p = a.hand) == null ? void 0 : p.targetFps, n.hand.targetFps, "trackers.hand.targetFps", r)
1114
+ enabled: I((u = a.hand) == null ? void 0 : u.enabled, n.hand.enabled, "trackers.hand.enabled", s),
1115
+ targetFps: Y((m = a.hand) == null ? void 0 : m.targetFps, n.hand.targetFps, "trackers.hand.targetFps", s)
891
1116
  },
892
1117
  gesture: {
893
- enabled: I((T = a.gesture) == null ? void 0 : T.enabled, n.gesture.enabled, "trackers.gesture.enabled", r),
894
- targetFps: j(
895
- (E = a.gesture) == null ? void 0 : E.targetFps,
1118
+ enabled: I((S = a.gesture) == null ? void 0 : S.enabled, n.gesture.enabled, "trackers.gesture.enabled", s),
1119
+ targetFps: Y(
1120
+ (T = a.gesture) == null ? void 0 : T.targetFps,
896
1121
  n.gesture.targetFps,
897
1122
  "trackers.gesture.targetFps",
898
- r
1123
+ s
899
1124
  )
900
1125
  },
901
1126
  body: {
902
- enabled: I((f = a.body) == null ? void 0 : f.enabled, n.body.enabled, "trackers.body.enabled", r),
903
- targetFps: j((S = a.body) == null ? void 0 : S.targetFps, n.body.targetFps, "trackers.body.targetFps", r)
1127
+ enabled: I((h = a.body) == null ? void 0 : h.enabled, n.body.enabled, "trackers.body.enabled", s),
1128
+ targetFps: Y((y = a.body) == null ? void 0 : y.targetFps, n.body.targetFps, "trackers.body.targetFps", s)
904
1129
  },
905
1130
  holistic: {
906
- enabled: I((b = a.holistic) == null ? void 0 : b.enabled, n.holistic.enabled, "trackers.holistic.enabled", r),
907
- targetFps: j(
908
- (K = a.holistic) == null ? void 0 : K.targetFps,
1131
+ enabled: I((E = a.holistic) == null ? void 0 : E.enabled, n.holistic.enabled, "trackers.holistic.enabled", s),
1132
+ targetFps: Y(
1133
+ (q = a.holistic) == null ? void 0 : q.targetFps,
909
1134
  n.holistic.targetFps,
910
1135
  "trackers.holistic.targetFps",
911
- r
1136
+ s
912
1137
  ),
913
- hands: B(
914
- (A = a.holistic) == null ? void 0 : A.hands,
1138
+ hands: $(
1139
+ (b = a.holistic) == null ? void 0 : b.hands,
915
1140
  ["both", "left", "right", "none"],
916
1141
  n.holistic.hands,
917
1142
  "trackers.holistic.hands",
918
- r
1143
+ s
919
1144
  ),
920
- holdMs: D(
1145
+ holdMs: P(
921
1146
  (w = a.holistic) == null ? void 0 : w.holdMs,
922
1147
  n.holistic.holdMs,
923
1148
  0,
924
1149
  5e3,
925
1150
  "trackers.holistic.holdMs",
926
- r
1151
+ s
927
1152
  ),
928
- predictMs: D(
929
- (G = a.holistic) == null ? void 0 : G.predictMs,
1153
+ predictMs: P(
1154
+ (W = a.holistic) == null ? void 0 : W.predictMs,
930
1155
  n.holistic.predictMs,
931
1156
  0,
932
1157
  1e3,
933
1158
  "trackers.holistic.predictMs",
934
- r
1159
+ s
935
1160
  ),
936
1161
  analysisMaxDimension: Math.round(
937
- D(
938
- (Y = a.holistic) == null ? void 0 : Y.analysisMaxDimension,
1162
+ P(
1163
+ (Q = a.holistic) == null ? void 0 : Q.analysisMaxDimension,
939
1164
  n.holistic.analysisMaxDimension,
940
1165
  128,
941
1166
  2048,
942
1167
  "trackers.holistic.analysisMaxDimension",
943
- r
1168
+ s
944
1169
  )
945
1170
  ),
946
1171
  outputFaceBlendshapes: I(
947
- (Q = a.holistic) == null ? void 0 : Q.outputFaceBlendshapes,
1172
+ (ee = a.holistic) == null ? void 0 : ee.outputFaceBlendshapes,
948
1173
  n.holistic.outputFaceBlendshapes,
949
1174
  "trackers.holistic.outputFaceBlendshapes",
950
- r
1175
+ s
951
1176
  ),
952
- confidence: D(
953
- (J = a.holistic) == null ? void 0 : J.confidence,
1177
+ confidence: P(
1178
+ (te = a.holistic) == null ? void 0 : te.confidence,
954
1179
  n.holistic.confidence,
955
1180
  0,
956
1181
  1,
957
1182
  "trackers.holistic.confidence",
958
- r
1183
+ s
959
1184
  ),
960
- delegate: B(
961
- (ee = a.holistic) == null ? void 0 : ee.delegate,
1185
+ delegate: $(
1186
+ (re = a.holistic) == null ? void 0 : re.delegate,
962
1187
  ["auto", "GPU", "CPU"],
963
1188
  n.holistic.delegate,
964
1189
  "trackers.holistic.delegate",
965
- r
1190
+ s
966
1191
  )
967
1192
  },
968
1193
  segmentation: {
969
1194
  enabled: I(
970
- (H = a.segmentation) == null ? void 0 : H.enabled,
1195
+ (V = a.segmentation) == null ? void 0 : V.enabled,
971
1196
  n.segmentation.enabled,
972
1197
  "trackers.segmentation.enabled",
973
- r
1198
+ s
974
1199
  ),
975
- quality: B(
976
- (y = a.segmentation) == null ? void 0 : y.quality,
1200
+ quality: $(
1201
+ (M = a.segmentation) == null ? void 0 : M.quality,
977
1202
  ["low", "medium", "high"],
978
1203
  n.segmentation.quality,
979
1204
  "trackers.segmentation.quality",
980
- r
1205
+ s
981
1206
  )
982
1207
  },
983
1208
  semanticSegmentation: {
@@ -985,113 +1210,113 @@ const xt = (e, t, s) => e === "infinite" || e === "loop" && t < Math.max(1, Math
985
1210
  (C = a.semanticSegmentation) == null ? void 0 : C.enabled,
986
1211
  n.semanticSegmentation.enabled,
987
1212
  "trackers.semanticSegmentation.enabled",
988
- r
1213
+ s
989
1214
  ),
990
- preset: B(
991
- (M = a.semanticSegmentation) == null ? void 0 : M.preset,
992
- pt,
1215
+ preset: $(
1216
+ (R = a.semanticSegmentation) == null ? void 0 : R.preset,
1217
+ At,
993
1218
  n.semanticSegmentation.preset,
994
1219
  "trackers.semanticSegmentation.preset",
995
- r
1220
+ s
996
1221
  ),
997
- quality: B(
998
- (k = a.semanticSegmentation) == null ? void 0 : k.quality,
1222
+ quality: $(
1223
+ (v = a.semanticSegmentation) == null ? void 0 : v.quality,
999
1224
  ["low", "medium", "high"],
1000
1225
  n.semanticSegmentation.quality,
1001
1226
  "trackers.semanticSegmentation.quality",
1002
- r
1227
+ s
1003
1228
  )
1004
1229
  }
1005
1230
  },
1006
1231
  perf: {
1007
- targetFps: D((X = e.perf) == null ? void 0 : X.targetFps, t.perf.targetFps, 0, 120, "perf.targetFps", r),
1008
- camRes: Math.round(D((z = e.perf) == null ? void 0 : z.camRes, t.perf.camRes, 160, 3840, "perf.camRes", r)),
1009
- cameraZoom: D((N = e.perf) == null ? void 0 : N.cameraZoom, t.perf.cameraZoom, 1, 3, "perf.cameraZoom", r),
1010
- analysisScale: D(
1011
- ($ = e.perf) == null ? void 0 : $.analysisScale,
1232
+ targetFps: P((j = e.perf) == null ? void 0 : j.targetFps, t.perf.targetFps, 0, 120, "perf.targetFps", s),
1233
+ camRes: Math.round(P((H = e.perf) == null ? void 0 : H.camRes, t.perf.camRes, 160, 3840, "perf.camRes", s)),
1234
+ cameraZoom: P((N = e.perf) == null ? void 0 : N.cameraZoom, t.perf.cameraZoom, 1, 3, "perf.cameraZoom", s),
1235
+ analysisScale: P(
1236
+ (Z = e.perf) == null ? void 0 : Z.analysisScale,
1012
1237
  t.perf.analysisScale,
1013
1238
  0.25,
1014
1239
  1,
1015
1240
  "perf.analysisScale",
1016
- r
1241
+ s
1017
1242
  )
1018
1243
  },
1019
1244
  lifecycle: {
1020
1245
  pauseWhenHidden: I(
1021
- (le = e.lifecycle) == null ? void 0 : le.pauseWhenHidden,
1246
+ (fe = e.lifecycle) == null ? void 0 : fe.pauseWhenHidden,
1022
1247
  t.lifecycle.pauseWhenHidden,
1023
1248
  "lifecycle.pauseWhenHidden",
1024
- r
1249
+ s
1025
1250
  )
1026
1251
  },
1027
- quality: i,
1252
+ quality: o,
1028
1253
  camera: {
1029
- facingMode: B(
1030
- (ue = e.camera) == null ? void 0 : ue.facingMode,
1254
+ facingMode: $(
1255
+ (pe = e.camera) == null ? void 0 : pe.facingMode,
1031
1256
  ["user", "environment"],
1032
1257
  t.camera.facingMode,
1033
1258
  "camera.facingMode",
1034
- r
1259
+ s
1035
1260
  ),
1036
- deviceId: ((de = e.camera) == null ? void 0 : de.deviceId) === void 0 ? t.camera.deviceId : typeof e.camera.deviceId == "string" || e.camera.deviceId === null ? e.camera.deviceId : (r("camera.deviceId: not a string, kept base"), t.camera.deviceId),
1037
- mirrored: ((me = e.camera) == null ? void 0 : me.mirrored) === void 0 ? t.camera.mirrored : e.camera.mirrored === "auto" || typeof e.camera.mirrored == "boolean" ? e.camera.mirrored : (r('camera.mirrored: must be boolean or "auto", kept base'), t.camera.mirrored)
1261
+ deviceId: ((he = e.camera) == null ? void 0 : he.deviceId) === void 0 ? t.camera.deviceId : typeof e.camera.deviceId == "string" || e.camera.deviceId === null ? e.camera.deviceId : (s("camera.deviceId: not a string, kept base"), t.camera.deviceId),
1262
+ mirrored: ((ge = e.camera) == null ? void 0 : ge.mirrored) === void 0 ? t.camera.mirrored : e.camera.mirrored === "auto" || typeof e.camera.mirrored == "boolean" ? e.camera.mirrored : (s('camera.mirrored: must be boolean or "auto", kept base'), t.camera.mirrored)
1038
1263
  },
1039
1264
  fallbacks: {
1040
- onUnsupported: B(
1041
- (pe = e.fallbacks) == null ? void 0 : pe.onUnsupported,
1265
+ onUnsupported: $(
1266
+ (ye = e.fallbacks) == null ? void 0 : ye.onUnsupported,
1042
1267
  ["block", "degrade"],
1043
1268
  t.fallbacks.onUnsupported,
1044
1269
  "fallbacks.onUnsupported",
1045
- r
1270
+ s
1046
1271
  ),
1047
- delegate: B(
1048
- (fe = e.fallbacks) == null ? void 0 : fe.delegate,
1272
+ delegate: $(
1273
+ (Se = e.fallbacks) == null ? void 0 : Se.delegate,
1049
1274
  ["auto", "GPU", "CPU"],
1050
1275
  t.fallbacks.delegate,
1051
1276
  "fallbacks.delegate",
1052
- r
1277
+ s
1053
1278
  )
1054
1279
  },
1055
1280
  assets: {
1056
- holisticModelUrl: Re(
1057
- (he = e.assets) == null ? void 0 : he.holisticModelUrl,
1281
+ holisticModelUrl: ve(
1282
+ (Te = e.assets) == null ? void 0 : Te.holisticModelUrl,
1058
1283
  t.assets.holisticModelUrl,
1059
1284
  "assets.holisticModelUrl",
1060
- r
1285
+ s
1061
1286
  ),
1062
- semanticSegmentationModelUrl: Re(
1063
- (ge = e.assets) == null ? void 0 : ge.semanticSegmentationModelUrl,
1287
+ semanticSegmentationModelUrl: ve(
1288
+ (Me = e.assets) == null ? void 0 : Me.semanticSegmentationModelUrl,
1064
1289
  t.assets.semanticSegmentationModelUrl,
1065
1290
  "assets.semanticSegmentationModelUrl",
1066
- r
1291
+ s
1067
1292
  )
1068
1293
  },
1069
1294
  updatedAt: typeof e.updatedAt == "number" && Number.isFinite(e.updatedAt) ? e.updatedAt : t.updatedAt
1070
1295
  };
1071
- }, be = (e, t, s = Date.now()) => W({ ...t, updatedAt: s }, e), we = (e) => JSON.stringify(W({}, e)), Pe = (e) => {
1296
+ }, we = (e, t, r = Date.now()) => X({ ...t, updatedAt: r }, e), ze = (e) => JSON.stringify(X({}, e)), qe = (e) => {
1072
1297
  const t = [];
1073
- let s = e;
1298
+ let r = e;
1074
1299
  if (typeof e == "string")
1075
1300
  try {
1076
- s = JSON.parse(e);
1301
+ r = JSON.parse(e);
1077
1302
  } catch {
1078
1303
  return {
1079
- config: W(),
1304
+ config: X(),
1080
1305
  migrated: !0,
1081
1306
  warnings: ["not valid JSON; defaults used"]
1082
1307
  };
1083
1308
  }
1084
- if (!s || typeof s != "object")
1309
+ if (!r || typeof r != "object")
1085
1310
  return {
1086
- config: W(),
1311
+ config: X(),
1087
1312
  migrated: !0,
1088
1313
  warnings: ["not an object; defaults used"]
1089
1314
  };
1090
- const r = s, a = r.version !== ae;
1315
+ const s = r, a = s.version !== oe;
1091
1316
  return a && t.push(
1092
- `migrated from version ${String(r.version ?? "none")} to ${ae}`
1093
- ), { config: W(r, xe, t), migrated: a, warnings: t };
1094
- }, Ls = [
1317
+ `migrated from version ${String(s.version ?? "none")} to ${oe}`
1318
+ ), { config: X(s, Ge, t), migrated: a, warnings: t };
1319
+ }, gs = [
1095
1320
  "face",
1096
1321
  "hand",
1097
1322
  "gesture",
@@ -1099,7 +1324,7 @@ const xt = (e, t, s) => e === "infinite" || e === "loop" && t < Math.max(1, Math
1099
1324
  "holistic",
1100
1325
  "segmentation",
1101
1326
  "semanticSegmentation"
1102
- ], Bt = (e) => ({
1327
+ ], mr = (e) => ({
1103
1328
  perf: {
1104
1329
  targetFps: e.perf.targetFps > 0 ? e.perf.targetFps : void 0,
1105
1330
  camRes: e.perf.camRes,
@@ -1108,343 +1333,350 @@ const xt = (e, t, s) => e === "infinite" || e === "loop" && t < Math.max(1, Math
1108
1333
  },
1109
1334
  lifecycle: { pauseWhenHidden: e.lifecycle.pauseWhenHidden },
1110
1335
  quality: e.quality
1111
- }), Wt = (e) => ({
1336
+ }), fr = (e) => ({
1112
1337
  facingMode: e.camera.facingMode,
1113
1338
  ...e.camera.deviceId ? { deviceId: e.camera.deviceId } : {},
1114
1339
  ...e.camera.mirrored === "auto" ? {} : { mirrored: e.camera.mirrored }
1115
- }), O = (e) => e === null ? {} : { targetFps: e }, zt = (e, t) => {
1116
- const s = e.trackers;
1340
+ }), G = (e) => e === null ? {} : { targetFps: e }, pr = (e, t) => {
1341
+ const r = e.trackers;
1117
1342
  return {
1118
1343
  face: {
1119
- numFaces: s.face.numFaces,
1120
- ...O(s.face.targetFps),
1121
- holdMs: s.face.holdMs,
1122
- predictMs: s.face.predictMs,
1123
- active: s.face.enabled
1344
+ numFaces: r.face.numFaces,
1345
+ ...G(r.face.targetFps),
1346
+ holdMs: r.face.holdMs,
1347
+ predictMs: r.face.predictMs,
1348
+ active: r.face.enabled
1124
1349
  },
1125
- hand: { ...O(s.hand.targetFps), active: s.hand.enabled },
1126
- gesture: { ...O(s.gesture.targetFps), active: s.gesture.enabled },
1127
- body: { active: s.body.enabled },
1350
+ hand: { ...G(r.hand.targetFps), active: r.hand.enabled },
1351
+ gesture: { ...G(r.gesture.targetFps), active: r.gesture.enabled },
1352
+ body: { active: r.body.enabled },
1128
1353
  holistic: {
1129
- ...O(s.holistic.targetFps),
1130
- hands: s.holistic.hands,
1131
- holdMs: s.holistic.holdMs,
1132
- predictMs: s.holistic.predictMs,
1133
- analysisMaxDimension: s.holistic.analysisMaxDimension,
1134
- outputFaceBlendshapes: s.holistic.outputFaceBlendshapes,
1135
- delegate: s.holistic.delegate === "auto" ? e.fallbacks.delegate : s.holistic.delegate,
1354
+ ...G(r.holistic.targetFps),
1355
+ hands: r.holistic.hands,
1356
+ holdMs: r.holistic.holdMs,
1357
+ predictMs: r.holistic.predictMs,
1358
+ analysisMaxDimension: r.holistic.analysisMaxDimension,
1359
+ outputFaceBlendshapes: r.holistic.outputFaceBlendshapes,
1360
+ delegate: r.holistic.delegate === "auto" ? e.fallbacks.delegate : r.holistic.delegate,
1136
1361
  ...e.assets.holisticModelUrl ? { modelUrl: e.assets.holisticModelUrl } : {},
1137
- active: s.holistic.enabled
1362
+ active: r.holistic.enabled
1138
1363
  },
1139
- segmentation: { quality: s.segmentation.quality, active: s.segmentation.enabled },
1364
+ segmentation: { quality: r.segmentation.quality, active: r.segmentation.enabled },
1140
1365
  semanticSegmentation: {
1141
- preset: s.semanticSegmentation.preset,
1142
- quality: s.semanticSegmentation.quality,
1366
+ preset: r.semanticSegmentation.preset,
1367
+ quality: r.semanticSegmentation.quality,
1143
1368
  ...e.assets.semanticSegmentationModelUrl ? { modelUrl: e.assets.semanticSegmentationModelUrl } : {},
1144
- active: s.semanticSegmentation.enabled
1369
+ active: r.semanticSegmentation.enabled
1145
1370
  }
1146
1371
  }[t];
1147
- }, Kt = (e, t) => {
1148
- const s = e.trackers;
1372
+ }, hr = (e, t) => {
1373
+ const r = e.trackers;
1149
1374
  switch (t) {
1150
- case v.FACE_TRACKER:
1151
- return { numFaces: s.face.numFaces, ...O(s.face.targetFps) };
1152
- case v.HAND_TRACKER:
1153
- return { ...O(s.hand.targetFps) };
1154
- case v.GESTURE_TRACKER:
1155
- return { ...O(s.gesture.targetFps) };
1156
- case v.BODY_TRACKER:
1157
- return { ...O(s.body.targetFps) };
1158
- case v.HOLISTIC_TRACKER: {
1159
- const r = s.holistic;
1375
+ case k.FACE_TRACKER:
1376
+ return { numFaces: r.face.numFaces, ...G(r.face.targetFps) };
1377
+ case k.HAND_TRACKER:
1378
+ return { ...G(r.hand.targetFps) };
1379
+ case k.GESTURE_TRACKER:
1380
+ return { ...G(r.gesture.targetFps) };
1381
+ case k.BODY_TRACKER:
1382
+ return { ...G(r.body.targetFps) };
1383
+ case k.HOLISTIC_TRACKER: {
1384
+ const s = r.holistic;
1160
1385
  return {
1161
- ...O(r.targetFps),
1162
- hands: r.hands,
1163
- holdMs: r.holdMs,
1164
- predictMs: r.predictMs,
1165
- analysisMaxDimension: r.analysisMaxDimension,
1166
- outputFaceBlendshapes: r.outputFaceBlendshapes,
1167
- minFaceDetectionConfidence: r.confidence,
1168
- minFacePresenceConfidence: r.confidence,
1169
- minPoseDetectionConfidence: r.confidence,
1170
- minPosePresenceConfidence: r.confidence,
1171
- minHandLandmarksConfidence: r.confidence,
1172
- delegate: r.delegate === "auto" ? e.fallbacks.delegate : r.delegate,
1386
+ ...G(s.targetFps),
1387
+ hands: s.hands,
1388
+ holdMs: s.holdMs,
1389
+ predictMs: s.predictMs,
1390
+ analysisMaxDimension: s.analysisMaxDimension,
1391
+ outputFaceBlendshapes: s.outputFaceBlendshapes,
1392
+ minFaceDetectionConfidence: s.confidence,
1393
+ minFacePresenceConfidence: s.confidence,
1394
+ minPoseDetectionConfidence: s.confidence,
1395
+ minPosePresenceConfidence: s.confidence,
1396
+ minHandLandmarksConfidence: s.confidence,
1397
+ delegate: s.delegate === "auto" ? e.fallbacks.delegate : s.delegate,
1173
1398
  ...e.assets.holisticModelUrl ? { modelUrl: e.assets.holisticModelUrl } : {}
1174
1399
  };
1175
1400
  }
1176
- case v.BACKGROUND_SEGMENTATION:
1177
- return { quality: s.segmentation.quality };
1178
- case v.SEMANTIC_SEGMENTATION:
1401
+ case k.BACKGROUND_SEGMENTATION:
1402
+ return { quality: r.segmentation.quality };
1403
+ case k.SEMANTIC_SEGMENTATION:
1179
1404
  return {
1180
- preset: s.semanticSegmentation.preset,
1181
- quality: s.semanticSegmentation.quality,
1405
+ preset: r.semanticSegmentation.preset,
1406
+ quality: r.semanticSegmentation.quality,
1182
1407
  ...e.assets.semanticSegmentationModelUrl ? { modelUrl: e.assets.semanticSegmentationModelUrl } : {}
1183
1408
  };
1184
1409
  default:
1185
1410
  return {};
1186
1411
  }
1187
- }, Xt = (e) => {
1188
- const t = e.trackers, s = [];
1189
- return t.face.enabled && s.push(v.FACE_TRACKER), t.hand.enabled && s.push(v.HAND_TRACKER), t.gesture.enabled && s.push(v.GESTURE_TRACKER), t.body.enabled && s.push(v.BODY_TRACKER), t.holistic.enabled && s.push(v.HOLISTIC_TRACKER), t.segmentation.enabled && s.push(v.BACKGROUND_SEGMENTATION), t.semanticSegmentation.enabled && s.push(v.SEMANTIC_SEGMENTATION), s;
1190
- }, ne = "vincentt.xr.tracking-config", ce = () => {
1412
+ }, gr = (e) => {
1413
+ const t = e.trackers, r = [];
1414
+ return t.face.enabled && r.push(k.FACE_TRACKER), t.hand.enabled && r.push(k.HAND_TRACKER), t.gesture.enabled && r.push(k.GESTURE_TRACKER), t.body.enabled && r.push(k.BODY_TRACKER), t.holistic.enabled && r.push(k.HOLISTIC_TRACKER), t.segmentation.enabled && r.push(k.BACKGROUND_SEGMENTATION), t.semanticSegmentation.enabled && r.push(k.SEMANTIC_SEGMENTATION), r;
1415
+ }, ie = "vincentt.xr.tracking-config", me = () => {
1191
1416
  try {
1192
1417
  return typeof localStorage < "u" ? localStorage : null;
1193
1418
  } catch {
1194
1419
  return null;
1195
1420
  }
1196
- }, Ht = (e = ne, t = ce()) => {
1421
+ }, yr = (e = ie, t = me()) => {
1197
1422
  if (!t) return null;
1198
1423
  try {
1199
- const s = t.getItem(e);
1200
- return s ? Pe(s) : null;
1424
+ const r = t.getItem(e);
1425
+ return r ? qe(r) : null;
1201
1426
  } catch {
1202
1427
  return null;
1203
1428
  }
1204
- }, Ae = (e, t = ne, s = ce()) => {
1205
- if (!s) return !1;
1429
+ }, De = (e, t = ie, r = me()) => {
1430
+ if (!r) return !1;
1206
1431
  try {
1207
- return s.setItem(t, we(e)), !0;
1432
+ return r.setItem(t, ze(e)), !0;
1208
1433
  } catch {
1209
1434
  return !1;
1210
1435
  }
1211
- }, $t = (e = ne, t = ce()) => {
1436
+ }, Sr = (e = ie, t = me()) => {
1212
1437
  if (t)
1213
1438
  try {
1214
1439
  t.removeItem(e);
1215
1440
  } catch {
1216
1441
  }
1217
- }, Os = (e = {}) => {
1218
- const { storageKey: t = ne, persist: s = !0 } = e, r = e.storage, a = F(e.initial), n = Z(() => W(a.current ?? {}), []), [i, c] = x(n), [o, l] = x([]), [h, d] = x(!s), m = F(i);
1219
- m.current = i, _(() => {
1220
- if (!s) {
1442
+ }, ys = (e = {}) => {
1443
+ const { storageKey: t = ie, persist: r = !0 } = e, s = e.storage, a = A(e.initial), n = z(() => X(a.current ?? {}), []), [o, c] = _(n), [i, l] = _([]), [p, d] = _(!r), f = A(o);
1444
+ f.current = o, x(() => {
1445
+ if (!r) {
1221
1446
  d(!0);
1222
1447
  return;
1223
1448
  }
1224
- const f = Ht(t, r);
1225
- if (f) {
1226
- const S = W(f.config, n);
1227
- m.current = S, c(S), l(f.warnings), f.migrated && Ae(S, t, r);
1449
+ const h = yr(t, s);
1450
+ if (h) {
1451
+ const y = X(h.config, n);
1452
+ f.current = y, c(y), l(h.warnings), h.migrated && De(y, t, s);
1228
1453
  }
1229
1454
  d(!0);
1230
- }, [s, t, r, n]);
1231
- const u = R(
1232
- (f, S) => (m.current = f, c(f), l(S), s && Ae(f, t, r), f),
1233
- [s, t, r]
1234
- ), p = R(
1235
- (f) => {
1236
- const S = [], b = W({ ...f, updatedAt: Date.now() }, m.current, S);
1237
- return u(b, S);
1455
+ }, [r, t, s, n]);
1456
+ const u = F(
1457
+ (h, y) => (f.current = h, c(h), l(y), r && De(h, t, s), h),
1458
+ [r, t, s]
1459
+ ), m = F(
1460
+ (h) => {
1461
+ const y = [], E = X({ ...h, updatedAt: Date.now() }, f.current, y);
1462
+ return u(E, y);
1238
1463
  },
1239
1464
  [u]
1240
- ), T = R(() => {
1241
- const f = be(n, {}, 0);
1242
- return m.current = f, c(f), l([]), s && $t(t, r), f;
1243
- }, [n, s, t, r]), E = R(
1244
- (f) => {
1245
- const S = Pe(f);
1246
- return S.warnings.some((b) => b.startsWith("not valid JSON") || b.startsWith("not an object")) ? (l([`import: ${S.warnings[0]}; config unchanged`]), m.current) : u(be(S.config, {}, Date.now()), S.warnings);
1465
+ ), S = F(() => {
1466
+ const h = we(n, {}, 0);
1467
+ return f.current = h, c(h), l([]), r && Sr(t, s), h;
1468
+ }, [n, r, t, s]), T = F(
1469
+ (h) => {
1470
+ const y = qe(h);
1471
+ return y.warnings.some((E) => E.startsWith("not valid JSON") || E.startsWith("not an object")) ? (l([`import: ${y.warnings[0]}; config unchanged`]), f.current) : u(we(y.config, {}, Date.now()), y.warnings);
1247
1472
  },
1248
1473
  [u]
1249
1474
  );
1250
- return Z(
1475
+ return z(
1251
1476
  () => ({
1252
- config: i,
1253
- hydrated: h,
1254
- warnings: o,
1255
- update: p,
1256
- reset: T,
1257
- importJson: E,
1258
- json: we(i),
1259
- providerProps: Bt(i),
1260
- cameraRequest: Wt(i),
1261
- trackerProps: (f) => zt(i, f),
1262
- modelOptions: (f) => Kt(i, f),
1263
- enabledModels: Xt(i)
1477
+ config: o,
1478
+ hydrated: p,
1479
+ warnings: i,
1480
+ update: m,
1481
+ reset: S,
1482
+ importJson: T,
1483
+ json: ze(o),
1484
+ providerProps: mr(o),
1485
+ cameraRequest: fr(o),
1486
+ trackerProps: (h) => pr(o, h),
1487
+ modelOptions: (h) => hr(o, h),
1488
+ enabledModels: gr(o)
1264
1489
  }),
1265
- [i, h, o, p, T, E]
1490
+ [o, p, i, m, S, T]
1266
1491
  );
1267
1492
  };
1268
1493
  export {
1269
- fs as AspectRatioContainer,
1270
- _t as AudioEngine,
1271
- Ms as AudioPlayer,
1272
- hs as Axes,
1273
- We as CAMERA_PERMISSION_MESSAGES,
1274
- ws as CameraPermissionGate,
1275
- Za as DEFAULT_ASSET_BUDGET_BYTES,
1276
- ka as DEFAULT_MATERIAL_FILL,
1277
- Ba as DEFAULT_MESH_RENDERER,
1278
- Wa as DEFAULT_MESH_RENDERER_RENDER_STATE,
1279
- Bs as DEFAULT_PERFORMANCE_BUDGET,
1280
- Ws as DEFAULT_PIXEL_SNAP_INCREMENT,
1281
- zs as DEFAULT_QUALITY_TIERS,
1282
- Ks as DEFAULT_REFERENCE_PIXELS_PER_UNIT,
1283
- Qr as DEFAULT_SCREEN_GLASS,
1284
- _a as DEFAULT_SCREEN_GRADIENT,
1285
- Jr as DEFAULT_SCREEN_IMAGE_SCENE_SETTINGS,
1286
- ea as DEFAULT_SCREEN_IMAGE_SETTINGS,
1287
- ta as DEFAULT_SCREEN_SHAPE_SETTINGS,
1288
- sa as DEFAULT_SCREEN_TEXT_SCENE_SETTINGS,
1289
- ra as DEFAULT_SCREEN_TEXT_SHADOW_LAYER,
1290
- Xs as DEFAULT_SCREEN_TRANSFORM_2D,
1291
- Hs as DEFAULT_SCREEN_TRANSFORM_ROOT,
1292
- xe as DEFAULT_TRACKING_CONFIG,
1293
- xa as DEFAULT_TRANSFORM_3D,
1294
- wa as EXTERNAL_BACKGROUND_RENDER_LAYER,
1295
- ct as FULL_SCREEN_ANCHORS,
1296
- Sa as LightObject,
1297
- ya as LookAt,
1298
- Pa as MAX_RENDER_GROUP_PASSES,
1299
- Da as MaterialFill,
1300
- Ha as MeshMaterial,
1301
- za as MeshRenderer,
1302
- ds as Panel,
1303
- ps as PersonCutout,
1304
- aa as PinToMesh,
1305
- Ta as RenderGroupLayer,
1306
- Ma as SCREEN_IMAGE_MASK_CHANNELS,
1307
- Fa as Scene,
1308
- Ea as SceneObjectRenderer,
1309
- Ca as Scenes,
1310
- na as ScreenGlassMaterial,
1311
- Ua as ScreenGradientMaterial,
1312
- lt as ScreenImage,
1313
- ia as ScreenShape,
1314
- Vr as ScreenSpaceUI,
1315
- Ra as ScreenText,
1316
- ze as ScreenTransform,
1317
- ba as SequentialRenderPasses,
1318
- gs as SpriteAnimation,
1319
- Ls as TRACKER_KINDS,
1320
- ne as TRACKING_CONFIG_STORAGE_KEY,
1321
- ae as TRACKING_CONFIG_VERSION,
1322
- Zr as TextLabel,
1323
- Na as Transform3D,
1324
- ms as VideoBackground,
1325
- Ya as XRAssetCache,
1326
- Us as XRAssetCacheProvider,
1327
- $s as XRMediaSource,
1328
- v as XRModel,
1329
- js as XRProvider,
1330
- Vs as XRQualityController,
1331
- $r as XRScene,
1332
- Zs as XR_FALLBACK_MESSAGES,
1333
- Ys as XR_MODEL_ASSET_URLS,
1494
+ qr as AspectRatioContainer,
1495
+ er as AudioEngine,
1496
+ Qr as AudioPlayer,
1497
+ Wr as Axes,
1498
+ jr as Button,
1499
+ Je as CAMERA_PERMISSION_MESSAGES,
1500
+ us as CameraPermissionGate,
1501
+ Cn as DEFAULT_ASSET_BUDGET_BYTES,
1502
+ cn as DEFAULT_MATERIAL_FILL,
1503
+ Re as DEFAULT_MESH_RENDERER,
1504
+ Tn as DEFAULT_MESH_RENDERER_RENDER_STATE,
1505
+ Ms as DEFAULT_PERFORMANCE_BUDGET,
1506
+ Es as DEFAULT_PIXEL_SNAP_INCREMENT,
1507
+ bs as DEFAULT_QUALITY_TIERS,
1508
+ Rs as DEFAULT_REFERENCE_PIXELS_PER_UNIT,
1509
+ wa as DEFAULT_SCREEN_GLASS,
1510
+ ln as DEFAULT_SCREEN_GRADIENT,
1511
+ Da as DEFAULT_SCREEN_IMAGE_SCENE_SETTINGS,
1512
+ Pa as DEFAULT_SCREEN_IMAGE_SETTINGS,
1513
+ Ua as DEFAULT_SCREEN_SHAPE_SETTINGS,
1514
+ Na as DEFAULT_SCREEN_TEXT_SCENE_SETTINGS,
1515
+ La as DEFAULT_SCREEN_TEXT_SHADOW_LAYER,
1516
+ As as DEFAULT_SCREEN_TRANSFORM_2D,
1517
+ Fs as DEFAULT_SCREEN_TRANSFORM_ROOT,
1518
+ Ge as DEFAULT_TRACKING_CONFIG,
1519
+ K as DEFAULT_TRANSFORM_3D,
1520
+ un as EXTERNAL_BACKGROUND_RENDER_LAYER,
1521
+ gt as FULL_SCREEN_ANCHORS,
1522
+ Kr as HtmlRegion,
1523
+ Vr as Light,
1524
+ Tt as LightObject,
1525
+ Za as LookAt,
1526
+ dn as MAX_RENDER_GROUP_PASSES,
1527
+ mn as MaterialFill,
1528
+ bn as MeshMaterial,
1529
+ Rt as MeshRenderer,
1530
+ Xr as Model,
1531
+ Hr as Object3D,
1532
+ Or as Panel,
1533
+ zr as PersonCutout,
1534
+ Ia as PinToMesh,
1535
+ Ya as RenderGroupLayer,
1536
+ Ja as SCREEN_IMAGE_MASK_CHANNELS,
1537
+ sn as Scene,
1538
+ Qa as SceneObjectRenderer,
1539
+ an as Scenes,
1540
+ Oa as ScreenGlassMaterial,
1541
+ fn as ScreenGradientMaterial,
1542
+ yt as ScreenImage,
1543
+ Ga as ScreenShape,
1544
+ ka as ScreenSpaceUI,
1545
+ en as ScreenText,
1546
+ Qe as ScreenTransform,
1547
+ tn as SequentialRenderPasses,
1548
+ Br as SpriteAnimation,
1549
+ gs as TRACKER_KINDS,
1550
+ ie as TRACKING_CONFIG_STORAGE_KEY,
1551
+ oe as TRACKING_CONFIG_VERSION,
1552
+ _a as TextLabel,
1553
+ $r as ThemeProvider,
1554
+ bt as Transform3D,
1555
+ Gr as VideoBackground,
1556
+ xn as XRAssetCache,
1557
+ fs as XRAssetCacheProvider,
1558
+ Cs as XRMediaSource,
1559
+ k as XRModel,
1560
+ xs as XRProvider,
1561
+ ks as XRQualityController,
1562
+ Ca as XRScene,
1563
+ _s as XR_FALLBACK_MESSAGES,
1564
+ vs as XR_MODEL_ASSET_URLS,
1334
1565
  U as audio,
1335
- Be as canPromptForCamera,
1336
- $t as clearTrackingConfig,
1337
- Qs as clientToScreenPixels,
1338
- ut as computeContainScale,
1339
- Js as computeFeedCrop,
1340
- er as computeFitLayout,
1341
- Qa as createAssetCache,
1342
- tr as createFallbackReason,
1343
- Ia as createTwoStopGradient,
1344
- Ts as dataURLtoFile,
1345
- tn as defineGltfAsset,
1346
- sn as defineTextureAsset,
1347
- rn as defineVideoAsset,
1348
- sr as detectXRCapabilities,
1349
- an as disposeObject3D,
1350
- pa as drawNormalizedCrop,
1351
- Xt as enabledModels,
1352
- nn as estimateGeometryBytes,
1353
- on as estimateObjectBytes,
1354
- cn as estimateTextureBytes,
1355
- rr as feedSidedName,
1356
- ar as feedToScreenPixels,
1357
- nr as feedToSource,
1358
- ir as feedToTracker,
1359
- or as feedToViewport,
1360
- cr as feedToWorld,
1361
- Ds as findCameraByFacing,
1362
- Ce as getDefaultAssetCache,
1363
- La as getRenderGroupLayer,
1364
- lr as isFeedPointInSource,
1365
- ur as isMirroredSourceKind,
1366
- ks as isMuted,
1367
- Ps as listCameras,
1368
- Ht as loadTrackingConfig,
1369
- oa as mapScreenImageSettingsToProps,
1370
- ca as mapScreenTextInnerShadowToProps,
1371
- la as mapScreenTextSettingsToProps,
1372
- dr as mediaToScreenPixels,
1373
- ua as mergeScreenShapeSettings,
1374
- mr as mergeScreenTransform2D,
1375
- be as mergeTrackingConfig,
1376
- pr as mirrorFeedX,
1377
- Ka as normalizeMeshRendererRenderState,
1378
- da as normalizeScreenGlass,
1379
- Oa as normalizeScreenGradient,
1380
- fr as normalizedToScreenPixels,
1381
- hr as normalizedToTransform2DPixels,
1382
- _s as onMuteChange,
1383
- gr as orientSourcePoint,
1384
- Sr as orientedSize,
1385
- yr as otherSide,
1386
- Pe as parseTrackingConfig,
1387
- Tr as personLeftSign,
1388
- Mr as personSide,
1389
- Fs as playOneShot,
1390
- Es as prefetchMusic,
1391
- Oe as queryCameraPermission,
1392
- Rs as registerSound,
1393
- Ga as renderSequentialPasses,
1394
- Ge as requestCameraAccess,
1395
- Er as resolveModelAssetUrl,
1396
- fa as resolveNormalizedCrop,
1397
- ha as resolvePersonCutoutStatus,
1398
- Rr as resolveQualityConfig,
1399
- br as resolveScreenTransform2D,
1400
- Ar as resolveTrackerSupport,
1401
- W as resolveTrackingConfig,
1402
- Ae as saveTrackingConfig,
1403
- Fr as screenPixelsToClient,
1404
- Cr as screenPixelsToFeed,
1405
- vr as screenPixelsToMedia,
1406
- kr as screenPixelsToNormalized,
1407
- _r as screenPixelsToScreenSpace,
1408
- xr as screenPixelsToUnits,
1409
- wr as screenPointToRay,
1410
- Pr as screenSpaceToScreenPixels,
1411
- Dr as screenTransform2DScale,
1412
- Ur as screenUnitsToPixels,
1413
- we as serializeTrackingConfig,
1414
- Cs as setMuted,
1415
- ot as shouldDrawFallback,
1416
- V as smoothNumber,
1417
- ls as smoothVector2,
1418
- us as smoothVector3,
1419
- Nr as sourceToFeed,
1420
- bs as startMusic,
1421
- As as stopMusic,
1422
- qe as subscribeCameraPermission,
1423
- Ir as swapSidedName,
1424
- Wt as toCameraRequest,
1425
- Kt as toModelOptions,
1426
- Bt as toProviderProps,
1427
- zt as toTrackerProps,
1428
- vs as toggleMuted,
1429
- Lr as trackerPointToScreenPixels,
1430
- Or as trackerToFeed,
1431
- Gr as trackerToWorld,
1432
- qr as transform2DPixelsToNormalized,
1433
- Dt as useCameraPermission,
1434
- ys as useFrameCapture,
1435
- Ss as useMediaRecorder,
1436
- xs as useMuted,
1437
- it as usePersonMaskTexture,
1438
- mt as useScreenRectAspect,
1439
- Ns as useXRAsset,
1440
- _e as useXRAssetCache,
1441
- Is as useXRAssetStats,
1442
- ja as useXRCapabilities,
1443
- Ja as useXRQuality,
1444
- Os as useXRTrackingConfig,
1445
- Br as viewportSizeToTransform2DPixels,
1446
- Wr as viewportToFeed,
1447
- zr as worldToFeed,
1448
- Kr as worldToScreenPixels,
1449
- Xr as worldToTracker
1566
+ Ye as canPromptForCamera,
1567
+ Sr as clearTrackingConfig,
1568
+ ws as clientToScreenPixels,
1569
+ St as computeContainScale,
1570
+ Ds as computeFeedCrop,
1571
+ Ps as computeFitLayout,
1572
+ kn as createAssetCache,
1573
+ Us as createFallbackReason,
1574
+ pn as createTwoStopGradient,
1575
+ Jr as dataURLtoFile,
1576
+ wn as defineGltfAsset,
1577
+ Dn as defineTextureAsset,
1578
+ Pn as defineVideoAsset,
1579
+ Ns as detectXRCapabilities,
1580
+ Un as disposeObject3D,
1581
+ Ha as drawNormalizedCrop,
1582
+ gr as enabledModels,
1583
+ Nn as estimateGeometryBytes,
1584
+ Ln as estimateObjectBytes,
1585
+ In as estimateTextureBytes,
1586
+ Ls as feedSidedName,
1587
+ Is as feedToScreenPixels,
1588
+ Os as feedToSource,
1589
+ Gs as feedToTracker,
1590
+ zs as feedToViewport,
1591
+ qs as feedToWorld,
1592
+ ms as findCameraByFacing,
1593
+ Ne as getDefaultAssetCache,
1594
+ hn as getRenderGroupLayer,
1595
+ Ws as isFeedPointInSource,
1596
+ Bs as isMirroredSourceKind,
1597
+ is as isMuted,
1598
+ ds as listCameras,
1599
+ yr as loadTrackingConfig,
1600
+ za as mapScreenImageSettingsToProps,
1601
+ qa as mapScreenTextInnerShadowToProps,
1602
+ Wa as mapScreenTextSettingsToProps,
1603
+ $s as mediaToScreenPixels,
1604
+ Ba as mergeScreenShapeSettings,
1605
+ Xs as mergeScreenTransform2D,
1606
+ we as mergeTrackingConfig,
1607
+ Hs as mirrorFeedX,
1608
+ Mn as normalizeMeshRendererRenderState,
1609
+ $a as normalizeScreenGlass,
1610
+ gn as normalizeScreenGradient,
1611
+ Ks as normalizedToScreenPixels,
1612
+ js as normalizedToTransform2DPixels,
1613
+ cs as onMuteChange,
1614
+ Vs as orientSourcePoint,
1615
+ Zs as orientedSize,
1616
+ Ys as otherSide,
1617
+ qe as parseTrackingConfig,
1618
+ Js as personLeftSign,
1619
+ Qs as personSide,
1620
+ as as playOneShot,
1621
+ es as prefetchMusic,
1622
+ je as queryCameraPermission,
1623
+ ts as registerSound,
1624
+ yn as renderSequentialPasses,
1625
+ Ve as requestCameraAccess,
1626
+ ea as resolveModelAssetUrl,
1627
+ Ka as resolveNormalizedCrop,
1628
+ ja as resolvePersonCutoutStatus,
1629
+ ta as resolveQualityConfig,
1630
+ ra as resolveScreenTransform2D,
1631
+ sa as resolveTrackerSupport,
1632
+ X as resolveTrackingConfig,
1633
+ De as saveTrackingConfig,
1634
+ aa as screenPixelsToClient,
1635
+ na as screenPixelsToFeed,
1636
+ oa as screenPixelsToMedia,
1637
+ ia as screenPixelsToNormalized,
1638
+ ca as screenPixelsToScreenSpace,
1639
+ la as screenPixelsToUnits,
1640
+ ua as screenPointToRay,
1641
+ da as screenSpaceToScreenPixels,
1642
+ ma as screenTransform2DScale,
1643
+ fa as screenUnitsToPixels,
1644
+ ze as serializeTrackingConfig,
1645
+ ns as setMuted,
1646
+ ht as shouldDrawFallback,
1647
+ J as smoothNumber,
1648
+ Lr as smoothVector2,
1649
+ Ir as smoothVector3,
1650
+ pa as sourceToFeed,
1651
+ rs as startMusic,
1652
+ ss as stopMusic,
1653
+ Ze as subscribeCameraPermission,
1654
+ ha as swapSidedName,
1655
+ fr as toCameraRequest,
1656
+ hr as toModelOptions,
1657
+ mr as toProviderProps,
1658
+ pr as toTrackerProps,
1659
+ os as toggleMuted,
1660
+ ga as trackerPointToScreenPixels,
1661
+ ya as trackerToFeed,
1662
+ Sa as trackerToWorld,
1663
+ Ta as transform2DPixelsToNormalized,
1664
+ ar as useCameraPermission,
1665
+ Yr as useFrameCapture,
1666
+ Zr as useMediaRecorder,
1667
+ ls as useMuted,
1668
+ pt as usePersonMaskTexture,
1669
+ nn as useSceneSample,
1670
+ Et as useScreenRectAspect,
1671
+ ps as useXRAsset,
1672
+ Oe as useXRAssetCache,
1673
+ hs as useXRAssetStats,
1674
+ An as useXRCapabilities,
1675
+ _n as useXRQuality,
1676
+ ys as useXRTrackingConfig,
1677
+ Ma as viewportSizeToTransform2DPixels,
1678
+ Ea as viewportToFeed,
1679
+ ba as worldToFeed,
1680
+ Ra as worldToScreenPixels,
1681
+ Aa as worldToTracker
1450
1682
  };