@vincentt-xr/sdk 2.0.0-alpha.2 → 2.0.0-alpha.21

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