import { t as Manager } from "./Manager-CQQ99QOI.js"; import { t as IVisibilityObserverCapability } from "./IVisibilityObserverCapability-D4tvIB5v.js"; import { c as SelfieActor, n as FaceCaptureManagerState, s as CreateSelfieActorOptions, t as FaceCaptureManager } from "./faceCaptureManagerFactory-BxWPpxyd.js"; //#region src/modules/selfie/selfieUploadService.d.ts type ProcessFaceImageType = 'selfie' | 'videoSelfie'; type ProcessFaceResponse = { faceMatch: boolean; confidence: number; existingUser: boolean; }; declare function processFace(imageType?: ProcessFaceImageType, signal?: AbortSignal): Promise; //#endregion //#region src/modules/selfie/selfieManager.d.ts type SelfieState = FaceCaptureManagerState; /** * Wraps a selfie actor in a face-capture manager. * * `visibilityObserver` is an optional override escape-hatch — first-party * callers omit it and the downstream factory defaults to * `BrowserVisibilityObserverProvider`. Pass a custom or no-op observer to * disable `background`/`foreground` tracking or to run in a non-DOM * environment (e.g. SSR / tests). */ declare function createSelfieManagerFromActor(actor: SelfieActor, visibilityObserver?: IVisibilityObserverCapability): Manager & { load(): void; nextStep(): Promise; requestPermission(): void; goToLearnMore(): void; back(): void; close(): void; reset(): void; retryCapture(): void; capture(): void; }; /** * Creates a selfie manager instance for handling selfie capture flow. * * The selfie manager provides: * - State management with statuses: `idle`, `loading`, `tutorial`, `permissions`, `capture`, `finished`, `closed`, `error` * - Permission handling with nested states: `idle`, `requesting`, `denied`, `learnMore` * - Capture handling with nested states: `initializing`, `startingRecorder`, `recordingActive`, `detecting`, `capturing`, `uploading`, `uploadError`, `success` * - Camera stream access when in `capture` state * - Detection status feedback during face detection * - Attempt tracking with `attemptsRemaining` * * @param options - Configuration for the selfie actor * @param options.config - The selfie module configuration from the flow * @returns A manager instance with state subscription, API methods, and lifecycle controls * * @example * ```ts * const selfieManager = createSelfieManager({ config: selfieConfig }); * * selfieManager.subscribe((state) => { * if (state.status === 'capture') { * console.log('Camera ready:', state.stream); * console.log('Detection status:', state.detectionStatus); * } * }); * * selfieManager.load(); * ``` */ declare function createSelfieManager(options: CreateSelfieActorOptions): Manager & { load(): void; nextStep(): Promise; requestPermission(): void; goToLearnMore(): void; back(): void; close(): void; reset(): void; retryCapture(): void; capture(): void; }; type SelfieManager = FaceCaptureManager; //#endregion export { ProcessFaceResponse as a, createSelfieManagerFromActor as i, SelfieState as n, processFace as o, createSelfieManager as r, SelfieManager as t };