import IUnblockedPlugin from '@ulixee/unblocked-specification/plugin/IUnblockedPlugin'; import IEmulationProfile from '@ulixee/unblocked-specification/plugin/IEmulationProfile'; import { IBoundLog } from '@ulixee/commons/interfaces/ILog'; import IDeviceProfile from '@ulixee/unblocked-specification/plugin/IDeviceProfile'; import IBrowserEngine from '@ulixee/unblocked-specification/agent/browser/IBrowserEngine'; import IUserAgentOption from '@ulixee/unblocked-specification/plugin/IUserAgentOption'; import IHttpResourceLoadDetails from '@ulixee/unblocked-specification/agent/net/IHttpResourceLoadDetails'; import IDnsSettings from '@ulixee/unblocked-specification/agent/net/IDnsSettings'; import ITcpSettings from '@ulixee/unblocked-specification/agent/net/ITcpSettings'; import ITlsSettings from '@ulixee/unblocked-specification/agent/net/ITlsSettings'; import { IPage } from '@ulixee/unblocked-specification/agent/browser/IPage'; import { IWorker } from '@ulixee/unblocked-specification/agent/browser/IWorker'; import IHttp2ConnectSettings from '@ulixee/unblocked-specification/agent/net/IHttp2ConnectSettings'; import IHttpSocketAgent from '@ulixee/unblocked-specification/agent/net/IHttpSocketAgent'; import IBrowserUserConfig from '@ulixee/unblocked-specification/agent/browser/IBrowserUserConfig'; import IBrowser from '@ulixee/unblocked-specification/agent/browser/IBrowser'; import { IFrame } from '@ulixee/unblocked-specification/agent/browser/IFrame'; import IBrowserData from './interfaces/IBrowserData'; import DomOverridesBuilder from './lib/DomOverridesBuilder'; import IUserAgentData from './interfaces/IUserAgentData'; import IBrowserEmulatorConfig from './interfaces/IBrowserEmulatorConfig'; export declare const defaultBrowserEngine: import("@ulixee/unblocked-specification/agent/browser/IBrowserEngineOption").default & { version: import("@ulixee/unblocked-specification/plugin/IUserAgentOption").IVersion; }; export interface IEmulatorOptions { userAgentSelector?: string; } export declare const defaultConfig: { "JSON.stringify": boolean; console: boolean; "Document.prototype.cookie": import("./interfaces/IBrowserEmulatorConfig").InjectedScriptConfig; error: import("./interfaces/IBrowserEmulatorConfig").InjectedScriptConfig; "MediaDevices.prototype.enumerateDevices": import("./interfaces/IBrowserEmulatorConfig").InjectedScriptConfig; "navigator.deviceMemory": import("./interfaces/IBrowserEmulatorConfig").InjectedScriptConfig; "navigator.hardwareConcurrency": import("./interfaces/IBrowserEmulatorConfig").InjectedScriptConfig; navigator: import("./interfaces/IBrowserEmulatorConfig").InjectedScriptConfig; performance: import("./interfaces/IBrowserEmulatorConfig").InjectedScriptConfig; "polyfill.add": import("./interfaces/IBrowserEmulatorConfig").InjectedScriptConfig; "polyfill.modify": import("./interfaces/IBrowserEmulatorConfig").InjectedScriptConfig; "polyfill.remove": import("./interfaces/IBrowserEmulatorConfig").InjectedScriptConfig; "polyfill.reorder": import("./interfaces/IBrowserEmulatorConfig").InjectedScriptConfig; "RTCRtpSender.getCapabilities": import("./interfaces/IBrowserEmulatorConfig").InjectedScriptConfig; "SharedWorker.prototype": import("./interfaces/IBrowserEmulatorConfig").InjectedScriptConfig; "speechSynthesis.getVoices": import("./interfaces/IBrowserEmulatorConfig").InjectedScriptConfig; UnhandledErrorsAndRejections: import("./interfaces/IBrowserEmulatorConfig").InjectedScriptConfig; "WebGLRenderingContext.prototype.getParameter": import("./interfaces/IBrowserEmulatorConfig").InjectedScriptConfig; webrtc: import("./interfaces/IBrowserEmulatorConfig").InjectedScriptConfig; "window.screen": import("./interfaces/IBrowserEmulatorConfig").InjectedScriptConfig; }; export default class DefaultBrowserEmulator implements IUnblockedPlugin { #private; static id: string; static enableTcpEmulation: boolean; readonly logger: IBoundLog; readonly emulationProfile: IEmulationProfile; readonly config: IBrowserEmulatorConfig; get userAgentString(): string; get browserEngine(): IBrowserEngine; get deviceProfile(): IDeviceProfile; protected get domOverridesBuilder(): DomOverridesBuilder; protected readonly data: IBrowserData; private readonly userAgentData; constructor(emulationProfile: IEmulationProfile, config?: IBrowserEmulatorConfig); configure(emulationProfile: IEmulationProfile): void; onDnsConfiguration(settings: IDnsSettings): void; onTcpConfiguration(settings: ITcpSettings): void; onTlsConfiguration(settings: ITlsSettings): void; beforeHttpRequest(resource: IHttpResourceLoadDetails): void; onHttpAgentInitialized(agent: IHttpSocketAgent): Promise; onHttp2SessionConnect(request: IHttpResourceLoadDetails, settings: IHttp2ConnectSettings): void; onNewBrowser(browser: IBrowser, options: IBrowserUserConfig): void; addDomOverride(runOn: 'page' | 'worker', script: string, args: Record & { callbackName?: string; }, callback?: (data: string, frame: IFrame) => any): boolean; onClose(): void; onNewPage(page: IPage): Promise; onNewFrameProcess(frame: IFrame): Promise; onNewWorker(worker: IWorker): Promise; protected getUserAgentData(): IUserAgentData; static shouldActivate(emulationProfile: IEmulationProfile): boolean; static selectBrowserMeta(userAgentSelector?: string): { browserEngine: IBrowserEngine; userAgentOption: IUserAgentOption; }; static getBrowserEngine(userAgentOption: IUserAgentOption): IBrowserEngine; static default(): IBrowserEngine; }