import { AssetUrlResolver, BlurConfig, BlurStrength, Generator, InputConfig, MaskConfig, PassthroughConfig, PipelineConfig, PreloadConfig, Quality, RenderConfig } from './config-types'; /** * A builder class for creating PipelineConfig instances in a flexible and intuitive way. */ export declare class ConfigurationBuilder { private env; private config; constructor(env?: 'int' | 'prod'); /** * Sets the base URL for the configuration. * @param baseUrl The base URL to use. */ setBaseUrl(baseUrl: string): ConfigurationBuilder; /** * Sets the WASM URI for the configuration. * @param wasmUri The WASM URI to use. */ setWasmUri(wasmUri: string): ConfigurationBuilder; /** * Sets the asset URL resolver. * @param assetUrlResolver The asset URL resolver to use * @returns The current ConfigurationBuilder instance. */ setAssetUrlResolver(assetUrlResolver: AssetUrlResolver): ConfigurationBuilder; /** * Sets the execution providers for the ONNX runtime. * * @param executionProviders The execution providers to use. */ setExecutionProviders(executionProviders: string[]): ConfigurationBuilder; /** * Sets the input size for the configuration. * @param height The height of the input. * @param width The width of the input. */ setInputSize(height: number, width: number): ConfigurationBuilder; /** * Sets the input configuration. * @param inputConfig The input configuration to use. */ setInputConfig(inputConfig: InputConfig): ConfigurationBuilder; /** * Sets the render configuration. * @param renderConfig The render configuration to use. */ setRenderConfig(renderConfig: RenderConfig): ConfigurationBuilder; /** * Sets the render type. * @param type The render type ('blur', 'passthrough', 'replacement'). */ setRenderType(type: 'blur' | 'passthrough' | 'replacement'): ConfigurationBuilder; /** * Sets the horizontal mirror property for the render configuration. * @param horizontalMirror Boolean indicating if horizontal mirror should be applied. */ setRenderHorizontalMirror(horizontalMirror: boolean): ConfigurationBuilder; /** * Sets the blur strength for the render configuration. * @param blurStrength The blur strength to use. */ setBlurStrength(blurStrength: BlurStrength): ConfigurationBuilder; /** * Sets the blur kernel size. * @param kernelSize The kernel size for the blur effect. */ setBlurKernelSize(kernelSize: number): ConfigurationBuilder; /** * Sets the blur sigma value. * @param sigma The sigma value for the blur effect. */ setBlurSigma(sigma: number): ConfigurationBuilder; /** * Sets the replacement background. * @param background The background canvas or video element to use for replacement. */ setReplacementBackground(background: HTMLCanvasElement | HTMLVideoElement): ConfigurationBuilder; /** * Sets the replacement static property. * @param isStatic Boolean indicating if the replacement is static. */ setReplacementStatic(isStatic: boolean): ConfigurationBuilder; /** * Sets the mask configuration. * @param maskConfig The mask configuration to use. */ setMaskConfig(maskConfig: MaskConfig): ConfigurationBuilder; /** * Sets the mask generator. * @param generator The generator type (most be 'worker'; 'local' is deprecated). */ setMaskGenerator(generator: Generator): ConfigurationBuilder; /** * Sets the mask generation interval in milliseconds. * @param intervalMs The generation interval in milliseconds. */ setMaskGenerationIntervalMs(intervalMs: number): ConfigurationBuilder; /** * Sets the mask model rank. * @param modelRank The model rank to use. */ setMaskModelRank(modelRank: number): ConfigurationBuilder; /** * Sets the mask model URI. * @param modelUri The model URI to use. */ setMaskModelUri(modelUri: string): ConfigurationBuilder; /** * Sets the mask worker URI. * @param workerUri The worker URI to use. */ setMaskWorkerUri(workerUri: string): ConfigurationBuilder; /** * Sets the mask input size. * @param height The height of the mask input. * @param width The width of the mask input. */ setMaskInputSize(height: number, width: number): ConfigurationBuilder; /** * Sets the mask output size. * @param height The height of the mask output. * @param width The width of the mask output. */ setMaskOutputSize(height: number, width: number): ConfigurationBuilder; /** * Sets the mask upscaled size. * @param height The height of the upscaled mask. * @param width The width of the upscaled mask. */ setMaskUpscaleSize(height: number, width: number): ConfigurationBuilder; /** * Sets the quality level and updates mask configurations accordingly. * @param quality The desired quality level. */ setMaskQuality(quality: Quality): ConfigurationBuilder; /** * Builds and returns the PreloadConfig or PipelineConfig object. * * @param requireInputConfig Whether to require the input configuration to be set before building. * Input size is not available at preload so this needs to be optional. The default value is true. * */ build(requireInputConfig?: boolean): PipelineConfig | PreloadConfig; /** * Returns the mask configuration, initializing it if necessary. */ private getMaskConfig; /** * Returns the base URL for the configuration. */ resolveBaseUrl(): string; /** * Returns the base URL for the configuration. * * @returns The base URL for the configuration. */ resolveModelUri(): string; resolveWasmUri(): string; resolveWorkerUri(): string; /** * Resolves a template string with the specified values. * * @param template The template string to resolve. * @param values The values to use for resolution. * @returns The resolved template string. */ private resolveTemplate; /** * Generates a blur configuration based on the specified blur strength. * @param blurStrength The desired blur strength. * @param horizontalMirror Whether to apply horizontal mirroring. */ static getBlurConfig(blurStrength: BlurStrength, horizontalMirror?: boolean): BlurConfig; static getPassthroughConfig(horizontalMirror?: boolean): PassthroughConfig; /** * Returns the library version. * * @returns The library version. */ static getLibVersion(): string; }