import { t as WebsocketsOptions } from "../index-Dwx6-0Rh.js";
import { HandleFunction, IncomingMessage, Server } from "connect";
import EventEmitter from "events";
import { Readable } from "stream";
import { IncomingMessage as IncomingMessage$1, ServerResponse } from "http";

//#region \0rolldown/runtime.js
//#endregion
//#region ../../node_modules/metro-cache/src/types.d.ts
/**
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 *
 * @noformat
 * @oncall react_native
 * @generated SignedSource<<80dd2674720fe89c7a90a649a922cb1d>>
 *
 * This file was translated from Flow by scripts/generateTypeScriptDefinitions.js
 * Original file: packages/metro-cache/src/types.js
 * To regenerate, run:
 *   js1 build metro-ts-defs (internal) OR
 *   yarn run build-ts-defs (OSS) 
 */
interface CacheStore<T> {
  name?: string;
  get(key: Buffer): (null | undefined | T) | Promise<null | undefined | T>;
  set(key: Buffer, value: T): void | Promise<void>;
  clear(): void | Promise<void>;
}
//#endregion
//#region ../../node_modules/metro-cache/src/Cache.d.ts
/**
 * Main cache class. Receives an array of cache instances, and sequentially
 * traverses them to return a previously stored value. It also ensures setting
 * the value in all instances.
 *
 * All get/set operations are logged via Metro's logger.
 */
declare class Cache<T> {
  constructor(stores: ReadonlyArray<CacheStore<T>>);
  get(key: Buffer): Promise<null | undefined | T>;
  set(key: Buffer, value: T): Promise<void>;
  get isDisabled(): boolean;
}
//#endregion
//#region ../../node_modules/metro-cache/src/stableHash.d.ts
/**
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 *
 * @noformat
 * @oncall react_native
 * @generated SignedSource<<36e0de65be0930a61b8ff46232052ea7>>
 *
 * This file was translated from Flow by scripts/generateTypeScriptDefinitions.js
 * Original file: packages/metro-cache/src/stableHash.js
 * To regenerate, run:
 *   js1 build metro-ts-defs (internal) OR
 *   yarn run build-ts-defs (OSS) 
 */
declare function stableHash(value: unknown): Buffer;
//#endregion
//#region ../../node_modules/metro-cache/src/stores/FileStore.d.ts
/**
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 *
 * @noformat
 * @oncall react_native
 * @generated SignedSource<<7de501c6653d300c594fcf37ce3b56f4>>
 *
 * This file was translated from Flow by scripts/generateTypeScriptDefinitions.js
 * Original file: packages/metro-cache/src/stores/FileStore.js
 * To regenerate, run:
 *   js1 build metro-ts-defs (internal) OR
 *   yarn run build-ts-defs (OSS) 
 */
type Options$3 = Readonly<{
  root: string;
}>;
declare class FileStore<T> {
  constructor(options: Options$3);
  get(key: Buffer): Promise<null | undefined | T>;
  set(key: Buffer, value: T): Promise<void>;
  clear(): void;
}
//#endregion
//#region ../../node_modules/metro-cache/src/stores/AutoCleanFileStore.d.ts
type CleanOptions = Readonly<Omit<Options$3, keyof {
  intervalMs?: number;
  cleanupThresholdMs?: number;
}> & {
  intervalMs?: number;
  cleanupThresholdMs?: number;
}>;
/**
 * A FileStore that, at a given interval, stats the content of the cache root
 * and deletes any file last modified a set threshold in the past.
 *
 * @deprecated This is not efficiently implemented and may cause significant
 * redundant I/O when caches are large. Prefer your own cleanup scripts, or a
 * custom Metro cache that uses watches, hooks get/set, and/or implements LRU.
 */
declare class AutoCleanFileStore<T> extends FileStore<T> {
  constructor(opts: CleanOptions);
}
//#endregion
//#region ../../node_modules/metro-cache/src/stores/HttpError.d.ts
/**
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 *
 * @noformat
 * @generated SignedSource<<7a0b4b83fb44651820333ade6a980ef7>>
 *
 * This file was translated from Flow by scripts/generateTypeScriptDefinitions.js
 * Original file: packages/metro-cache/src/stores/HttpError.js
 * To regenerate, run:
 *   js1 build metro-ts-defs (internal) OR
 *   yarn run build-ts-defs (OSS) 
 */
declare class HttpError extends Error {
  code: number;
  constructor(message: string, code: number);
}
//#endregion
//#region ../../node_modules/metro-cache/src/stores/NetworkError.d.ts
/**
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 *
 * @noformat
 * @generated SignedSource<<9a68fe7766e376b8525c589673853e54>>
 *
 * This file was translated from Flow by scripts/generateTypeScriptDefinitions.js
 * Original file: packages/metro-cache/src/stores/NetworkError.js
 * To regenerate, run:
 *   js1 build metro-ts-defs (internal) OR
 *   yarn run build-ts-defs (OSS) 
 */
declare class NetworkError extends Error {
  code: string;
  constructor(message: string, code: string);
}
//#endregion
//#region ../../node_modules/metro-cache/src/stores/HttpStore.d.ts
type Options$2 = EndpointOptions | {
  getOptions: EndpointOptions;
  setOptions: EndpointOptions;
};
type EndpointOptions = {
  endpoint: string;
  family?: 4 | 6;
  timeout?: number;
  key?: string | ReadonlyArray<string> | Buffer | ReadonlyArray<Buffer>;
  cert?: string | ReadonlyArray<string> | Buffer | ReadonlyArray<Buffer>;
  ca?: string | ReadonlyArray<string> | Buffer | ReadonlyArray<Buffer>;
  params?: URLSearchParams;
  headers?: {
    [$$Key$$: string]: string;
  };
  additionalSuccessStatuses?: ReadonlyArray<number>;
  /**
   * Whether to include additional debug information in error messages.
   */
  debug?: boolean;
  /**
   * Retry configuration
   */
  maxAttempts?: number;
  retryNetworkErrors?: boolean;
  retryStatuses?: ReadonlySet<number>;
  socketPath?: string;
  proxy?: string;
};
declare class HttpStore<T> {
  static HttpError: typeof HttpError;
  static NetworkError: typeof NetworkError;
  constructor(options: Options$2);
  get(key: Buffer): Promise<null | undefined | T>;
  set(key: Buffer, value: T): Promise<void>;
  clear(): void;
}
//#endregion
//#region ../../node_modules/metro-cache/src/stores/HttpGetStore.d.ts
declare class HttpGetStore<T> extends HttpStore<T> {
  constructor(options: Options$2);
  get(key: Buffer): Promise<null | undefined | T>;
  set(_key: Buffer, _value: T): Promise<void>;
}
//#endregion
//#region ../../node_modules/metro-cache/src/index.d.ts
interface MetroCache {
  readonly AutoCleanFileStore: typeof AutoCleanFileStore;
  readonly Cache: typeof Cache;
  readonly FileStore: typeof FileStore;
  readonly HttpGetStore: typeof HttpGetStore;
  readonly HttpStore: typeof HttpStore;
  readonly stableHash: typeof stableHash;
}
//#endregion
//#region ../../node_modules/metro-file-map/src/flow-types.d.ts
type BuildParameters = Readonly<{
  computeSha1: boolean;
  enableSymlinks: boolean;
  extensions: ReadonlyArray<string>;
  forceNodeFilesystemAPI: boolean;
  ignorePattern: RegExp;
  plugins: ReadonlyArray<InputFileMapPlugin>;
  retainAllFiles: boolean;
  rootDir: string;
  roots: ReadonlyArray<string>;
  cacheBreaker: string;
}>;
type BuildResult = {
  fileSystem: FileSystem;
};
type CacheData = Readonly<{
  clocks: WatchmanClocks;
  fileSystemData: unknown;
  plugins: ReadonlyMap<string, void | V8Serializable>;
}>;
interface CacheManager {
  /**
   * Called during startup to load initial state, if available. Provided to
   * a crawler, which will return the delta between the initial state and the
   * current file system state.
   */
  read(): Promise<null | undefined | CacheData>;
  /**
   * Called when metro-file-map `build()` has applied changes returned by the
   * crawler - i.e. internal state reflects the current file system state.
   *
   * getSnapshot may be retained and called at any time before end(), such as
   * in response to eventSource 'change' events.
   */
  write(getSnapshot: () => CacheData, opts: CacheManagerWriteOptions): Promise<void>;
  /**
   * The last call that will be made to this CacheManager. Any handles should
   * be closed by the time this settles.
   */
  end(): Promise<void>;
}
interface CacheManagerEventSource {
  onChange(listener: () => void): () => void;
}
type CacheManagerFactory = (options: CacheManagerFactoryOptions) => CacheManager;
type CacheManagerFactoryOptions = Readonly<{
  buildParameters: BuildParameters;
}>;
type CacheManagerWriteOptions = Readonly<{
  changedSinceCacheRead: boolean;
  eventSource: CacheManagerEventSource;
  onWriteError: (error: Error) => void;
}>;
type CanonicalPath = string;
type ChangedFileMetadata = Readonly<{
  isSymlink: boolean;
  modifiedTime?: null | undefined | number;
}>;
type ChangeEvent = Readonly<{
  logger: null | undefined | RootPerfLogger;
  changes: ReadonlyFileSystemChanges<Readonly<ChangedFileMetadata>>;
  rootDir: string;
}>;
type Console = typeof global.console;
type WatcherStatus = {
  type: 'watchman_slow_command';
  timeElapsed: number;
  command: 'watch-project' | 'query';
} | {
  type: 'watchman_slow_command_complete';
  timeElapsed: number;
  command: 'watch-project' | 'query';
} | {
  type: 'watchman_warning';
  warning: unknown;
  command: 'watch-project' | 'query';
};
type FileMapPluginInitOptions<SerializableState, PerFileData = void> = Readonly<{
  files: Readonly<{
    fileIterator(opts: Readonly<{
      includeNodeModules: boolean;
      includeSymlinks: boolean;
    }>): Iterable<{
      baseName: string;
      canonicalPath: string;
      readonly pluginData: null | undefined | PerFileData;
    }>;
    lookup(mixedPath: string): {
      exists: false;
    } | {
      exists: true;
      type: 'f';
      readonly pluginData: PerFileData;
    } | {
      exists: true;
      type: 'd';
    };
  }>;
  pluginState: null | undefined | SerializableState;
}>;
type FileMapPluginWorker = Readonly<{
  worker: Readonly<{
    modulePath: string;
    setupArgs: JsonData;
  }>;
  filter: ($$PARAM_0$$: {
    normalPath: string;
    isNodeModules: boolean;
  }) => boolean;
}>;
type V8Serializable = string | number | boolean | null | ReadonlyArray<V8Serializable> | ReadonlySet<V8Serializable> | ReadonlyMap<string, V8Serializable> | Readonly<{
  [key: string]: V8Serializable;
}>;
interface FileMapPlugin<SerializableState extends void | V8Serializable = void | V8Serializable, PerFileData extends void | V8Serializable = void | V8Serializable> {
  readonly name: string;
  initialize(initOptions: FileMapPluginInitOptions<SerializableState, PerFileData>): Promise<void>;
  assertValid(): void;
  onChanged(changes: ReadonlyFileSystemChanges<null | undefined | PerFileData>): void;
  getSerializableSnapshot(): void | V8Serializable;
  getCacheKey(): string;
  getWorker(): null | undefined | FileMapPluginWorker;
}
type InputFileMapPlugin = FileMapPlugin<
/**
 * > 235 | export type InputFileMapPlugin = FileMapPlugin<empty, empty>;
 *       |                                                ^^^^^ Unsupported feature: Translating "empty type" is currently not supported.
 **/
any,
/**
 * > 235 | export type InputFileMapPlugin = FileMapPlugin<empty, empty>;
 *       |                                                       ^^^^^ Unsupported feature: Translating "empty type" is currently not supported.
 **/
any>;
type HType = {
  MTIME: 0;
  SIZE: 1;
  VISITED: 2;
  SHA1: 3;
  SYMLINK: 4;
  PLUGINDATA: number;
  PATH: 0;
  TYPE: 1;
  MODULE: 0;
  PACKAGE: 1;
  GENERIC_PLATFORM: 'g';
  NATIVE_PLATFORM: 'native';
};
type HTypeValue = HType[keyof HType];
type FileData = Map<CanonicalPath, FileMetadata>;
type FileMetadata = [null | undefined | number, number, 0 | 1, null | undefined | string, 0 | 1 | string, ...unknown[]];
type FileStats = Readonly<{
  fileType: 'f' | 'l';
  modifiedTime: null | undefined | number;
  size: null | undefined | number;
}>;
interface FileSystem {
  exists(file: Path): boolean;
  getAllFiles(): Array<Path>;
  /**
   * Given a map of files, determine which of them are new or modified
   * (changedFiles), and which of them are missing from the input
   * (removedFiles), vs the current state of this instance of FileSystem.
   */
  getDifference(files: FileData, options?: Readonly<{
    /**
     * Only consider files under this subpath (which should be a directory)
     * when computing removedFiles. If not provided, all files in the file
     * system are considered.
     */
    subpath?: string;
  }>): {
    changedFiles: FileData;
    removedFiles: Set<string>;
  };
  getSerializableSnapshot(): CacheData['fileSystemData'];
  getSha1(file: Path): null | undefined | string;
  getOrComputeSha1(file: Path): Promise<null | undefined | {
    sha1: string;
    content?: Buffer;
  }>;
  /**
   * Given a start path (which need not exist), a subpath and type, and
   * optionally a 'breakOnSegment', performs the following:
   *
   * X = mixedStartPath
   * do
   *   if basename(X) === opts.breakOnSegment
   *     return null
   *   if X + subpath exists and has type opts.subpathType
   *     return {
   *       absolutePath: realpath(X + subpath)
   *       containerRelativePath: relative(mixedStartPath, X)
   *     }
   *   X = dirname(X)
   * while X !== dirname(X)
   *
   * If opts.invalidatedBy is given, collects all absolute, real paths that if
   * added or removed may invalidate this result.
   *
   * Useful for finding the closest package scope (subpath: package.json,
   * type f, breakOnSegment: node_modules) or closest potential package root
   * (subpath: node_modules/pkg, type: d) in Node.js resolution.
   */
  hierarchicalLookup(mixedStartPath: string, subpath: string, opts: {
    breakOnSegment: null | undefined | string;
    invalidatedBy: null | undefined | Set<string>;
    subpathType: 'f' | 'd';
  }): null | undefined | {
    absolutePath: string;
    containerRelativePath: string;
  };
  /**
   * Analogous to posix lstat. If the file at `file` is a symlink, return
   * information about the symlink without following it.
   */
  linkStats(file: Path): null | undefined | FileStats;
  /**
   * Return information about the given path, whether a directory or file.
   * Always follow symlinks, and return a real path if it exists.
   */
  lookup(mixedPath: Path): LookupResult;
  matchFiles(opts: {
    filter?: RegExp | null;
    filterCompareAbsolute?: boolean;
    filterComparePosix?: boolean;
    follow?: boolean;
    recursive?: boolean;
    rootDir?: Path | null;
  }): Iterable<Path>;
}
type JsonData = string | number | boolean | null | Array<JsonData> | {
  [key: string]: JsonData;
};
type LookupResult = {
  exists: false;
  links: ReadonlySet<string>;
  missing: string;
} | {
  exists: true;
  links: ReadonlySet<string>;
  realPath: string;
  type: 'd';
} | {
  exists: true;
  links: ReadonlySet<string>;
  realPath: string;
  type: 'f';
  metadata: FileMetadata;
};
type HasteConflict = {
  id: string;
  platform: string | null;
  absolutePaths: Array<string>;
  type: 'duplicate' | 'shadowing';
};
interface HasteMap {
  getModule(name: string, platform?: null | undefined | string, supportsNativePlatform?: null | undefined | boolean, type?: null | undefined | HTypeValue): null | undefined | Path;
  getModuleNameByPath(file: Path): null | undefined | string;
  getPackage(name: string, platform: null | undefined | string, _supportsNativePlatform: null | undefined | boolean): null | undefined | Path;
  computeConflicts(): Array<HasteConflict>;
}
interface ReadonlyFileSystemChanges<T = FileMetadata> {
  readonly addedDirectories: Iterable<CanonicalPath>;
  readonly removedDirectories: Iterable<CanonicalPath>;
  readonly addedFiles: Iterable<Readonly<[CanonicalPath, T]>>;
  readonly modifiedFiles: Iterable<Readonly<[CanonicalPath, T]>>;
  readonly removedFiles: Iterable<Readonly<[CanonicalPath, T]>>;
}
type Path = string;
type WatchmanClockSpec = string | Readonly<{
  scm: Readonly<{
    'mergebase-with': string;
  }>;
}>;
type WatchmanClocks = Map<Path, WatchmanClockSpec>;
//#endregion
//#region ../../node_modules/metro-file-map/src/Watcher.d.ts
type HealthCheckResult = {
  type: 'error';
  timeout: number;
  error: Error;
  watcher: null | undefined | string;
} | {
  type: 'success';
  timeout: number;
  timeElapsed: number;
  watcher: null | undefined | string;
} | {
  type: 'timeout';
  timeout: number;
  watcher: null | undefined | string;
  pauseReason: null | undefined | string;
};
//#endregion
//#region ../../node_modules/metro-file-map/src/index.d.ts
type InputOptions = Readonly<{
  computeSha1?: null | undefined | boolean;
  enableSymlinks?: null | undefined | boolean;
  extensions: ReadonlyArray<string>;
  forceNodeFilesystemAPI?: null | undefined | boolean;
  ignorePattern?: null | undefined | RegExp;
  plugins?: ReadonlyArray<InputFileMapPlugin>;
  retainAllFiles: boolean;
  rootDir: string;
  roots: ReadonlyArray<string>;
  cacheManagerFactory?: null | undefined | CacheManagerFactory;
  console?: Console;
  healthCheck: HealthCheckOptions;
  maxFilesPerWorker?: null | undefined | number;
  maxWorkers: number;
  perfLoggerFactory?: null | undefined | PerfLoggerFactory;
  resetCache?: null | undefined | boolean;
  useWatchman?: null | undefined | boolean;
  watch?: null | undefined | boolean;
  watchmanDeferStates?: ReadonlyArray<string>;
}>;
type HealthCheckOptions = Readonly<{
  enabled: boolean;
  interval: number;
  timeout: number;
  filePrefix: string;
}>;
/**
 * FileMap includes a JavaScript implementation of Facebook's haste module system.
 *
 * This implementation is inspired by https://github.com/facebook/node-haste
 * and was built with for high-performance in large code repositories with
 * hundreds of thousands of files. This implementation is scalable and provides
 * predictable performance.
 *
 * Because the file map creation and synchronization is critical to startup
 * performance and most tasks are blocked by I/O this class makes heavy use of
 * synchronous operations. It uses worker processes for parallelizing file
 * access and metadata extraction.
 *
 * The data structures created by `metro-file-map` can be used directly from the
 * cache without further processing. The metadata objects in the `files` and
 * `map` objects contain cross-references: a metadata object from one can look
 * up the corresponding metadata object in the other map. Note that in most
 * projects, the number of files will be greater than the number of haste
 * modules one module can refer to many files based on platform extensions.
 *
 * type CacheData = {
 *   clocks: WatchmanClocks,
 *   files: {[filepath: string]: FileMetadata},
 *   map: {[id: string]: HasteMapItem},
 *   mocks: {[id: string]: string},
 * }
 *
 * // Watchman clocks are used for query synchronization and file system deltas.
 * type WatchmanClocks = {[filepath: string]: string};
 *
 * type FileMetadata = {
 *   id: ?string, // used to look up module metadata objects in `map`.
 *   mtime: number, // check for outdated files.
 *   size: number, // size of the file in bytes.
 *   visited: boolean, // whether the file has been parsed or not.
 *   dependencies: Array<string>, // all relative dependencies of this file.
 *   sha1: ?string, // SHA-1 of the file, if requested via options.
 *   symlink: ?(1 | 0 | string), // Truthy if symlink, string is target
 * };
 *
 * // Modules can be targeted to a specific platform based on the file name.
 * // Example: platform.ios.js and Platform.android.js will both map to the same
 * // `Platform` module. The platform should be specified during resolution.
 * type HasteMapItem = {[platform: string]: ModuleMetadata};
 *
 * //
 * type ModuleMetadata = {
 *   path: string, // the path to look up the file object in `files`.
 *   type: string, // the module type (either `package` or `module`).
 * };
 *
 * Note that the data structures described above are conceptual only. The actual
 * implementation uses arrays and constant keys for metadata storage. Instead of
 * `{id: 'flatMap', mtime: 3421, size: 42, visited: true, dependencies: []}` the real
 * representation is similar to `['flatMap', 3421, 42, 1, []]` to save storage space
 * and reduce parse and write time of a big JSON blob.
 *
 * The FileMap is created as follows:
 *  1. read data from the cache or create an empty structure.
 *
 *  2. crawl the file system.
 *     * empty cache: crawl the entire file system.
 *     * cache available:
 *       * if watchman is available: get file system delta changes.
 *       * if watchman is unavailable: crawl the entire file system.
 *     * build metadata objects for every file. This builds the `files` part of
 *       the `FileMap`.
 *
 *  3. visit and extract metadata from changed files, including sha1,
 *     depedendencies, and any plugins.
 *     * this is done in parallel over worker processes to improve performance.
 *     * the worst case is to visit all files.
 *     * the best case is no file system access and retrieving all data from
 *       the cache.
 *     * the average case is a small number of changed files.
 *
 *  4. serialize the new `FileMap` in a cache file.
 *
 */
declare class FileMap extends EventEmitter {
  static create(options: InputOptions): FileMap;
  constructor(options: InputOptions);
  build(): Promise<BuildResult>;
  /**
   * 1. read data from the cache or create an empty structure.
   */
  read(): Promise<null | undefined | CacheData>;
  end(): Promise<void>;
  static H: HType;
}
//#endregion
//#region ../../node_modules/metro-babel-transformer/src/index.d.ts
type CustomTransformOptions = {
  [$$Key$$: string]: unknown;
};
type TransformProfile = 'default' | 'hermes-stable' | 'hermes-canary';
//#endregion
//#region ../../node_modules/metro-source-map/src/source-map.d.ts
type GeneratedCodeMapping = [number, number];
type SourceMapping = [number, number, number, number];
type SourceMappingWithName = [number, number, number, number, string];
type MetroSourceMapSegmentTuple = SourceMappingWithName | SourceMapping | GeneratedCodeMapping;
type HermesFunctionOffsets = {
  [$$Key$$: number]: ReadonlyArray<number>;
};
type FBSourcesArray = ReadonlyArray<null | undefined | FBSourceMetadata>;
type FBSourceMetadata = [null | undefined | FBSourceFunctionMap];
type FBSourceFunctionMap = {
  readonly names: ReadonlyArray<string>;
  readonly mappings: string;
};
type FBSegmentMap = {
  [id: string]: MixedSourceMap;
};
type BasicSourceMap = {
  readonly file?: string;
  readonly mappings: string;
  readonly names: Array<string>;
  readonly sourceRoot?: string;
  readonly sources: Array<string>;
  readonly sourcesContent?: Array<null | undefined | string>;
  readonly version: number;
  readonly x_facebook_offsets?: Array<number>;
  readonly x_metro_module_paths?: Array<string>;
  readonly x_facebook_sources?: FBSourcesArray;
  readonly x_facebook_segments?: FBSegmentMap;
  readonly x_hermes_function_offsets?: HermesFunctionOffsets;
  readonly x_google_ignoreList?: Array<number>;
};
type IndexMapSection = {
  map: IndexMap | BasicSourceMap;
  offset: {
    line: number;
    column: number;
  };
};
type IndexMap = {
  readonly file?: string;
  readonly mappings?: void;
  readonly sourcesContent?: void;
  readonly sections: Array<IndexMapSection>;
  readonly version: number;
  readonly x_facebook_offsets?: Array<number>;
  readonly x_metro_module_paths?: Array<string>;
  readonly x_facebook_sources?: void;
  readonly x_facebook_segments?: FBSegmentMap;
  readonly x_hermes_function_offsets?: HermesFunctionOffsets;
  readonly x_google_ignoreList?: void;
};
type MixedSourceMap = IndexMap | BasicSourceMap;
//#endregion
//#region ../../node_modules/metro/src/lib/CountingSet.d.ts
/**
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 *
 * @noformat
 * @oncall react_native
 * @generated SignedSource<<0fccda5d7f0eb38539316fa1fedae97b>>
 *
 * This file was translated from Flow by scripts/generateTypeScriptDefinitions.js
 * Original file: packages/metro/src/lib/CountingSet.js
 * To regenerate, run:
 *   js1 build metro-ts-defs (internal) OR
 *   yarn run build-ts-defs (OSS) 
 */
interface ReadOnlyCountingSet<T> extends Iterable<T> {
  has(item: T): boolean;
  readonly size: number;
  count(item: T): number;
  forEach<ThisT>(callbackFn: (this: ThisT, value: T, key: T, set: ReadOnlyCountingSet<T>) => unknown, thisArg: ThisT): void;
}
/**
 * A Set that only deletes a given item when the number of delete(item) calls
 * matches the number of add(item) calls. Iteration and `size` are in terms of
 * *unique* items.
 */
declare class CountingSet<T> implements ReadOnlyCountingSet<T> {
  constructor(items?: Iterable<T>);
  has(item: T): boolean;
  add(item: T): void;
  delete(item: T): void;
  keys(): Iterator<T>;
  values(): Iterator<T>;
  entries(): Iterator<[T, T]>;
  [Symbol.iterator](): Iterator<T>;
  get size(): number;
  count(item: T): number;
  clear(): void;
  forEach<ThisT>(callbackFn: (this: ThisT, value: T, key: T, set: CountingSet<T>) => unknown, thisArg: ThisT): void;
  toJSON(): unknown;
}
//#endregion
//#region ../../node_modules/metro/src/DeltaBundler/Graph.d.ts
type Result<T> = {
  added: Map<string, Module<T>>;
  modified: Map<string, Module<T>>;
  deleted: Set<string>;
};
type Delta<T> = Readonly<{
  added: Set<string>;
  touched: Set<string>;
  deleted: Set<string>;
  updatedModuleData: ReadonlyMap<string, ModuleData<T>>;
  baseModuleData: Map<string, ModuleData<T>>;
  errors: ReadonlyMap<string, Error>;
}>;
type InternalOptions<T> = Readonly<{
  lazy: boolean;
  onDependencyAdd: () => unknown;
  onDependencyAdded: () => unknown;
  resolve: Options$1<T>['resolve'];
  transform: Options$1<T>['transform'];
  shallow: boolean;
}>;
declare class Graph<T = MixedOutput> {
  readonly entryPoints: ReadonlySet<string>;
  readonly transformOptions: TransformInputOptions;
  readonly dependencies: Dependencies<T>;
  constructor(options: GraphInputOptions);
  /**
   * Dependency Traversal logic for the Delta Bundler. This method calculates
   * the modules that should be included in the bundle by traversing the
   * dependency graph.
   * Instead of traversing the whole graph each time, it just calculates the
   * difference between runs by only traversing the added/removed dependencies.
   * To do so, it uses the passed graph dependencies and it mutates it.
   * The paths parameter contains the absolute paths of the root files that the
   * method should traverse. Normally, these paths should be the modified files
   * since the last traversal.
   */
  traverseDependencies(paths: ReadonlyArray<string>, options: Options$1<T>): Promise<Result<T>>;
  initialTraverseDependencies(options: Options$1<T>): Promise<Result<T>>;
  _buildDelta(pathsToVisit: ReadonlySet<string>, options: InternalOptions<T>, moduleFilter?: (path: string) => boolean): Promise<Delta<T>>;
  _recursivelyCommitModule(path: string, delta: Delta<T>, options: InternalOptions<T>, commitOptions?: Readonly<{
    onlyRemove: boolean;
  }>): Module<T>;
  _addDependency(parentModule: Module<T>, key: string, dependency: Dependency, requireContext: null | undefined | RequireContext, delta: Delta<T>, options: InternalOptions<T>): void;
  _removeDependency(parentModule: Module<T>, key: string, dependency: Dependency, delta: Delta<T>, options: InternalOptions<T>): void;
  /**
   * Collect a list of context modules which include a given file.
   */
  markModifiedContextModules(filePath: string, modifiedPaths: Set<string> | CountingSet<string>): void;
  /**
   * Gets the list of modules affected by the deletion of a given file. The
   * caller is expected to mark these modules as modified in the next call to
   * traverseDependencies. Note that the list may contain duplicates.
   */
  getModifiedModulesForDeletedPath(filePath: string): Iterable<string>;
  /**
   * Re-traverse the dependency graph in DFS order to reorder the modules and
   * guarantee the same order between runs. This method mutates the passed graph.
   */
  reorderGraph(options: {
    shallow: boolean;
  }): void;
  _reorderDependencies(module: Module<T>, orderedDependencies: Map<string, Module<T>>, options: {
    shallow: boolean;
  }): void;
  /** Garbage collection functions */
  _incrementImportBundleReference(dependency: ResolvedDependency, parentModule: Module<T>): void;
  _decrementImportBundleReference(dependency: ResolvedDependency, parentModule: Module<T>): void;
  _markModuleInUse(module: Module<T>): void;
  _children(module: Module<T>, options: InternalOptions<T>): Iterator<Module<T>>;
  _moduleSnapshot(module: Module<T>): ModuleData<T>;
  _releaseModule(module: Module<T>, delta: Delta<T>, options: InternalOptions<T>): void;
  _freeModule(module: Module<T>, delta: Delta<T>): void;
  _markAsPossibleCycleRoot(module: Module<T>): void;
  _collectCycles(delta: Delta<T>, options: InternalOptions<T>): void;
  _markGray(module: Module<T>, options: InternalOptions<T>): void;
  _scan(module: Module<T>, options: InternalOptions<T>): void;
  _scanBlack(module: Module<T>, options: InternalOptions<T>): void;
  _collectWhite(module: Module<T>, delta: Delta<T>): void;
  /** End of garbage collection functions */
}
//#endregion
//#region ../../node_modules/metro/src/DeltaBundler/DeltaCalculator.d.ts
/**
 * This class is in charge of calculating the delta of changed modules that
 * happen between calls. To do so, it subscribes to file changes, so it can
 * traverse the files that have been changed between calls and avoid having to
 * traverse the whole dependency tree for trivial small changes.
 */
declare class DeltaCalculator<T> extends EventEmitter {
  _changeEventSource: EventEmitter;
  _options: Options$1<T>;
  _currentBuildPromise: null | undefined | Promise<DeltaResult<T>>;
  _deletedFiles: Set<string>;
  _modifiedFiles: Set<string>;
  _addedFiles: Set<string>;
  _requiresReset: boolean;
  _graph: Graph<T>;
  constructor(entryPoints: ReadonlySet<string>, changeEventSource: EventEmitter, options: Options$1<T>);
  /**
   * Stops listening for file changes and clears all the caches.
   */
  end(): void;
  /**
   * Main method to calculate the delta of modules. It returns a DeltaResult,
   * which contain the modified/added modules and the removed modules.
   */
  getDelta($$PARAM_0$$: {
    reset: boolean;
    shallow: boolean;
  }): Promise<DeltaResult<T>>;
  /**
   * Returns the graph with all the dependencies. Each module contains the
   * needed information to do the traversing (dependencies, inverseDependencies)
   * plus some metadata.
   */
  getGraph(): Graph<T>;
  _handleMultipleFileChanges: (changeEvent: ChangeEvent) => void;
  _getChangedDependencies(modifiedFiles: Set<string>, deletedFiles: Set<string>, addedFiles: Set<string>): Promise<DeltaResult<T>>;
}
//#endregion
//#region ../../node_modules/metro/src/DeltaBundler.d.ts
/**
 * `DeltaBundler` uses the `DeltaTransformer` to build bundle deltas. This
 * module handles all the transformer instances so it can support multiple
 * concurrent clients requesting their own deltas. This is done through the
 * `clientId` param (which maps a client to a specific delta transformer).
 */
declare class DeltaBundler<T = MixedOutput> {
  _changeEventSource: EventEmitter;
  _deltaCalculators: Map<Graph<T>, DeltaCalculator<T>>;
  constructor(changeEventSource: EventEmitter);
  end(): void;
  getDependencies(entryPoints: ReadonlyArray<string>, options: Options$1<T>): Promise<ReadOnlyGraph<T>['dependencies']>;
  buildGraph(entryPoints: ReadonlyArray<string>, options: Options$1<T>): Promise<Graph<T>>;
  getDelta(graph: Graph<T>, $$PARAM_1$$: {
    reset: boolean;
    shallow: boolean;
  }): Promise<DeltaResult<T>>;
  listen(graph: Graph<T>, callback: () => Promise<void>): () => void;
  endGraph(graph: Graph<T>): void;
}
//#endregion
//#region ../../node_modules/metro-transform-worker/src/index.d.ts
type MinifierConfig = Readonly<{
  [$$Key$$: string]: unknown;
}>;
type Type = 'script' | 'module' | 'asset';
type JsTransformerConfig = Readonly<{
  assetPlugins: ReadonlyArray<string>;
  assetRegistryPath: string;
  asyncRequireModulePath: string;
  babelTransformerPath: string;
  dynamicDepsInPackages: DynamicRequiresBehavior;
  enableBabelRCLookup: boolean;
  enableBabelRuntime: boolean | string;
  globalPrefix: string;
  hermesParser: boolean;
  minifierConfig: MinifierConfig;
  minifierPath: string;
  optimizationSizeLimit: number;
  publicPath: string;
  allowOptionalDependencies: AllowOptionalDependencies;
  unstable_dependencyMapReservedName: null | undefined | string;
  unstable_disableModuleWrapping: boolean;
  unstable_disableNormalizePseudoGlobals: boolean;
  unstable_compactOutput: boolean; /** Enable `require.context` statements which can be used to import multiple files in a directory. */
  unstable_allowRequireContext: boolean; /** With inlineRequires, enable a module-scope memo var and inline as (v || v=require('foo')) */
  unstable_memoizeInlineRequires?: boolean; /** With inlineRequires, do not memoize these module specifiers */
  unstable_nonMemoizedInlineRequires?: ReadonlyArray<string>; /** Whether to rename scoped `require` functions to `_$$_REQUIRE`, usually an extraneous operation when serializing to iife (default). */
  unstable_renameRequire?: boolean;
}>;
type JsTransformOptions = Readonly<{
  customTransformOptions?: CustomTransformOptions;
  dev: boolean;
  experimentalImportSupport?: boolean;
  inlinePlatform: boolean;
  inlineRequires: boolean;
  minify: boolean;
  nonInlinedRequires?: ReadonlyArray<string>;
  platform: null | undefined | string;
  type: Type;
  unstable_memoizeInlineRequires?: boolean;
  unstable_nonMemoizedInlineRequires?: ReadonlyArray<string>;
  unstable_staticHermesOptimizedRequire?: boolean;
  unstable_transformProfile: TransformProfile;
}>;
//#endregion
//#region ../../node_modules/metro/src/shared/types.d.ts
type MetroSourceMapOrMappings = MixedSourceMap | Array<MetroSourceMapSegmentTuple>;
declare enum SourcePathsMode {
  Absolute = 'absolute',
  ServerUrl = 'url-server'
}
declare namespace SourcePathsMode {
  export function cast(value: string | null | undefined): SourcePathsMode;
  export function isValid(value: string | null | undefined): value is SourcePathsMode;
  export function members(): IterableIterator<SourcePathsMode>;
  export function getName(value: SourcePathsMode): string;
}
type ReadonlySourceLocation = Readonly<{
  start: Readonly<{
    line: number;
    column: number;
  }>;
  end: Readonly<{
    line: number;
    column: number;
  }>;
}>;
type BundleOptions = {
  readonly customResolverOptions: CustomResolverOptions;
  customTransformOptions: CustomTransformOptions;
  dev: boolean;
  entryFile: string;
  readonly excludeSource: boolean;
  readonly inlineSourceMap: boolean;
  readonly lazy: boolean;
  minify: boolean;
  readonly modulesOnly: boolean;
  onProgress: null | undefined | ((doneCont: number, totalCount: number) => unknown);
  readonly platform: null | undefined | string;
  readonly runModule: boolean;
  readonly shallow: boolean;
  sourceMapUrl: null | undefined | string;
  sourceUrl: null | undefined | string;
  createModuleIdFactory?: () => (path: string) => number;
  readonly unstable_transformProfile: TransformProfile;
  readonly sourcePaths: SourcePathsMode;
};
type BuildOptions = Readonly<{
  withAssets?: boolean;
}>;
type ResolverInputOptions = Readonly<{
  customResolverOptions?: CustomResolverOptions;
  dev: boolean;
}>;
type SerializerOptions$1 = {
  readonly sourceMapUrl: null | undefined | string;
  readonly sourceUrl: null | undefined | string;
  readonly runModule: boolean;
  readonly excludeSource: boolean;
  readonly inlineSourceMap: boolean;
  readonly modulesOnly: boolean;
  readonly sourcePaths: SourcePathsMode;
};
type GraphOptions = {
  readonly lazy: boolean;
  readonly shallow: boolean;
};
type SplitBundleOptions = Readonly<{
  entryFile: string;
  resolverOptions: ResolverInputOptions;
  transformOptions: TransformInputOptions;
  serializerOptions: SerializerOptions$1;
  graphOptions: GraphOptions;
  onProgress: Options$1['onProgress'];
}>;
type ModuleTransportLike = {
  readonly code: string;
  readonly id: number;
  readonly map: null | undefined | MetroSourceMapOrMappings;
  readonly name?: string;
  readonly sourcePath: string;
};
//#endregion
//#region ../../node_modules/metro/src/ModuleGraph/worker/collectDependencies.d.ts
type ContextMode = 'sync' | 'eager' | 'lazy' | 'lazy-once';
type ContextFilter = Readonly<{
  pattern: string;
  flags: string;
}>;
type RequireContextParams = Readonly<{
  recursive: boolean;
  filter: Readonly<ContextFilter>; /** Mode for resolving dynamic dependencies. Defaults to `sync` */
  mode: ContextMode;
}>;
type DynamicRequiresBehavior = 'throwAtRuntime' | 'reject';
//#endregion
//#region ../../node_modules/metro/src/lib/contextModule.d.ts
type RequireContext = Readonly<{
  recursive: boolean;
  filter: RegExp; /** Mode for resolving dynamic dependencies. Defaults to `sync` */
  mode: ContextMode; /** Absolute path of the directory to search in */
  from: string;
}>;
//#endregion
//#region ../../node_modules/metro/src/DeltaBundler/types.d.ts
type MixedOutput = {
  readonly data: unknown;
  readonly type: string;
};
type AsyncDependencyType = 'async' | 'maybeSync' | 'prefetch' | 'weak';
type TransformResultDependency = Readonly<{
  /**
   * The literal name provided to a require or import call. For example 'foo' in
   * case of `require('foo')`.
   */
  name: string;
  /**
   * Extra data returned by the dependency extractor.
   */
  data: Readonly<{
    /**
     * A locally unique key for this dependency within the current module.
     */
    key: string;
    /**
     * If not null, this dependency is due to a dynamic `import()` or `__prefetchImport()` call.
     */
    asyncType: AsyncDependencyType | null;
    /**
     * True if the dependency is declared with a static "import x from 'y'" or
     * an import() call.
     */
    isESMImport: boolean;
    /**
     * The dependency is enclosed in a try/catch block.
     */
    isOptional?: boolean;
    locs: ReadonlyArray<ReadonlySourceLocation>; /** Context for requiring a collection of modules. */
    contextParams?: RequireContextParams;
  }>;
}>;
type ResolvedDependency = Readonly<{
  absolutePath: string;
  data: TransformResultDependency;
}>;
type Dependency = ResolvedDependency | Readonly<{
  data: TransformResultDependency;
}>;
type Module<T = MixedOutput> = Readonly<{
  dependencies: Map<string, Dependency>;
  inverseDependencies: CountingSet<string>;
  output: ReadonlyArray<T>;
  path: string;
  getSource: () => Buffer;
  unstable_transformResultKey?: null | undefined | string;
}>;
type ModuleData<T = MixedOutput> = Readonly<{
  dependencies: ReadonlyMap<string, Dependency>;
  resolvedContexts: ReadonlyMap<string, RequireContext>;
  output: ReadonlyArray<T>;
  getSource: () => Buffer;
  unstable_transformResultKey?: null | undefined | string;
}>;
type Dependencies<T = MixedOutput> = Map<string, Module<T>>;
type ReadOnlyDependencies<T = MixedOutput> = ReadonlyMap<string, Module<T>>;
type TransformInputOptions = Omit<JsTransformOptions, 'inlinePlatform' | 'inlineRequires'>;
type GraphInputOptions = Readonly<{
  entryPoints: ReadonlySet<string>;
  transformOptions: TransformInputOptions;
}>;
interface ReadOnlyGraph<T = MixedOutput> {
  readonly entryPoints: ReadonlySet<string>;
  readonly transformOptions: Readonly<TransformInputOptions>;
  readonly dependencies: ReadOnlyDependencies<T>;
}
type TransformResult<T = MixedOutput> = Readonly<{
  dependencies: ReadonlyArray<TransformResultDependency>;
  output: ReadonlyArray<T>;
  unstable_transformResultKey?: null | undefined | string;
}>;
type TransformResultWithSource<T = MixedOutput> = Readonly<Omit<TransformResult<T>, keyof {
  getSource: () => Buffer;
}> & {
  getSource: () => Buffer;
}>;
type TransformFn<T = MixedOutput> = ($$PARAM_0$$: string, $$PARAM_1$$: null | undefined | RequireContext) => Promise<TransformResultWithSource<T>>;
type ResolveFn = (from: string, dependency: TransformResultDependency) => BundlerResolution;
type AllowOptionalDependenciesWithOptions = {
  readonly exclude: Array<string>;
};
type AllowOptionalDependencies = boolean | AllowOptionalDependenciesWithOptions;
type BundlerResolution = Readonly<{
  type: 'sourceFile';
  filePath: string;
}>;
type Options$1<T = MixedOutput> = Readonly<{
  resolve: ResolveFn;
  transform: TransformFn<T>;
  transformOptions: TransformInputOptions;
  onProgress: null | undefined | ((numProcessed: number, total: number) => unknown);
  lazy: boolean;
  unstable_allowRequireContext: boolean;
  unstable_enablePackageExports: boolean;
  unstable_incrementalResolution: boolean;
  shallow: boolean;
}>;
type DeltaResult<T = MixedOutput> = {
  readonly added: Map<string, Module<T>>;
  readonly modified: Map<string, Module<T>>;
  readonly deleted: Set<string>;
  readonly reset: boolean;
};
type SerializerOptions = Readonly<{
  asyncRequireModulePath: string;
  createModuleId: ($$PARAM_0$$: string) => number;
  dev: boolean;
  getRunModuleStatement: (moduleId: number | string, globalPrefix: string) => string;
  globalPrefix: string;
  includeAsyncPaths: boolean;
  inlineSourceMap: null | undefined | boolean;
  modulesOnly: boolean;
  processModuleFilter: (module: Module) => boolean;
  projectRoot: string;
  runBeforeMainModule: ReadonlyArray<string>;
  runModule: boolean;
  serverRoot: string;
  shouldAddToIgnoreList: ($$PARAM_0$$: Module) => boolean;
  sourceMapUrl: null | undefined | string;
  sourceUrl: null | undefined | string;
  getSourceUrl: null | undefined | (($$PARAM_0$$: Module) => string);
}>;
//#endregion
//#region ../../node_modules/metro-resolver/src/types.d.ts
type Resolution = FileResolution | {
  readonly type: 'empty';
};
type SourceFileResolution = Readonly<{
  type: 'sourceFile';
  filePath: string;
}>;
type AssetFileResolution = ReadonlyArray<string>;
type AssetResolution = Readonly<{
  type: 'assetFiles';
  filePaths: AssetFileResolution;
}>;
type FileResolution = AssetResolution | SourceFileResolution;
/**
 * This is a way to describe what files we tried to look for when resolving
 * a module name as file. This is mainly used for error reporting, so that
 * we can explain why we cannot resolve a module.
 */
type FileCandidates = {
  readonly type: 'asset';
  readonly name: string;
} | {
  readonly type: 'sourceFile';
  filePathPrefix: string;
  readonly candidateExts: ReadonlyArray<string>;
};
type ExportsLikeMap = Readonly<{
  [subpathOrCondition: string]: string | ExportsLikeMap | null;
}>;
/** "exports" mapping where values may be legacy Node.js <13.7 array format. */
type ExportMapWithFallbacks = Readonly<{
  [subpath: string]: ExportsLikeMap[keyof ExportsLikeMap] | ExportValueWithFallback;
}>;
/** "exports" subpath value when in legacy Node.js <13.7 array format. */
type ExportValueWithFallback = ReadonlyArray<ExportsLikeMap | string> | ReadonlyArray<ReadonlyArray<unknown>>;
type ExportsField = string | ReadonlyArray<string> | ExportValueWithFallback | ExportsLikeMap | ExportMapWithFallbacks;
type PackageJson = Readonly<{
  name?: string;
  main?: string;
  exports?: ExportsField;
  imports?: ExportsLikeMap;
}>;
type PackageInfo = Readonly<{
  packageJson: PackageJson;
  rootPath: string;
}>;
type PackageForModule = Readonly<Omit<PackageInfo, keyof {
  packageRelativePath: string;
}> & {
  packageRelativePath: string;
}>;
/**
 * Check existence of a single file.
 */
type DoesFileExist = (filePath: string) => boolean;
/**
 * Performs a lookup against an absolute or project-relative path to determine
 * whether it exists as a file or directory. Follows any symlinks, and returns
 * a real absolute path on existence.
 */
type FileSystemLookup = (absoluteOrProjectRelativePath: string) => {
  exists: false;
} | {
  exists: true;
  type: 'f' | 'd';
  realPath: string;
};
/**
 * Given a directory path and the base asset name, return a list of all the
 * asset file names that match the given base name in that directory. Return
 * null if there's no such named asset. `platform` is used to identify
 * platform-specific assets, ex. `foo.ios.js` instead of a generic `foo.js`.
 */
type ResolveAsset = (dirPath: string, assetName: string, extension: string) => null | undefined | ReadonlyArray<string>;
type ResolutionContext = Readonly<{
  allowHaste: boolean;
  assetExts: ReadonlySet<string>;
  customResolverOptions: CustomResolverOptions;
  disableHierarchicalLookup: boolean;
  /**
   * Determine whether a regular file exists at the given path.
   *
   * @deprecated, prefer `fileSystemLookup`
   */
  doesFileExist: DoesFileExist;
  extraNodeModules: null | undefined | {
    [$$Key$$: string]: string;
  }; /** Is resolving for a development bundle. */
  dev: boolean;
  /**
   * Get the parsed contents of the specified `package.json` file.
   */
  getPackage: (packageJsonPath: string) => null | undefined | PackageJson;
  /**
   * Get the closest package scope, parsed `package.json` and relative subpath
   * for a given absolute candidate path (which need not exist), or null if
   * there is no package.json closer than the nearest node_modules directory.
   *
   * @deprecated See https://github.com/facebook/metro/commit/29c77bff31e2475a086bc3f04073f485da8f9ff0
   */
  getPackageForModule: (absoluteModulePath: string) => null | undefined | PackageForModule;
  /**
   * The dependency descriptor, within the origin module, corresponding to the
   * current resolution request. This is provided for diagnostic purposes ONLY
   * and may not be used for resolution purposes.
   */
  dependency?: TransformResultDependency;
  /**
   * Whether the dependency to be resolved was declared with an ESM import,
   * ("import x from 'y'" or "await import('z')"), or a CommonJS "require".
   * Corresponds to the criteria Node.js uses to assert an "import"
   * resolution condition, vs "require".
   *
   * Always equal to dependency.data.isESMImport where dependency is provided,
   * but may be used for resolution.
   */
  isESMImport?: boolean;
  /**
   * Synchonously returns information about a given absolute path, including
   * whether it exists, whether it is a file or directory, and its absolute
   * real path.
   */
  fileSystemLookup: FileSystemLookup;
  /**
   * The ordered list of fields to read in `package.json` to resolve a main
   * entry point based on the "browser" field spec.
   */
  mainFields: ReadonlyArray<string>;
  /**
   * Full path of the module that is requiring or importing the module to be
   * resolved. This may not be the only place this dependency was found,
   * as resolutions can be cached.
   */
  originModulePath: string;
  nodeModulesPaths: ReadonlyArray<string>;
  preferNativePlatform: boolean;
  resolveAsset: ResolveAsset;
  redirectModulePath: (modulePath: string) => string | false;
  /**
   * Given a name, this should return the full path to the file that provides
   * a Haste module of that name. Ex. for `Foo` it may return `/smth/Foo.js`.
   */
  resolveHasteModule: (name: string) => null | undefined | string;
  /**
   * Given a name, this should return the full path to the package manifest that
   * provides a Haste package of that name. Ex. for `Foo` it may return
   * `/smth/Foo/package.json`.
   */
  resolveHastePackage: (name: string) => null | undefined | string;
  resolveRequest?: null | undefined | CustomResolver;
  sourceExts: ReadonlyArray<string>;
  unstable_conditionNames: ReadonlyArray<string>;
  unstable_conditionsByPlatform: Readonly<{
    [platform: string]: ReadonlyArray<string>;
  }>;
  unstable_enablePackageExports: boolean;
  unstable_incrementalResolution: boolean;
  unstable_logWarning: (message: string) => void;
}>;
type CustomResolutionContext = Readonly<Omit<ResolutionContext, keyof {
  resolveRequest: CustomResolver;
}> & {
  resolveRequest: CustomResolver;
}>;
type CustomResolver = (context: CustomResolutionContext, moduleName: string, platform: string | null) => Resolution;
type CustomResolverOptions = {
  readonly [$$Key$$: string]: unknown;
};
declare namespace Logger_d_exports {
  export { ActionLogEntryData, ActionStartLogEntry, LogEntry, createActionEndEntry, createActionStartEntry, createEntry, log, on };
}
type ActionLogEntryData = {
  action_name: string;
  log_entry_label?: string;
};
type ActionStartLogEntry = {
  action_name?: string;
  action_phase?: string;
  log_entry_label: string;
  log_session?: string;
  start_timestamp?: [number, number];
};
type LogEntry = {
  action_name?: string;
  action_phase?: string;
  action_result?: string;
  duration_ms?: number;
  entry_point?: string;
  file_name?: string;
  log_entry_label: string;
  log_session?: string;
  start_timestamp?: [number, number];
  outdated_modules?: number;
  bundle_size?: number;
  bundle_options?: BundleOptions;
  bundle_hash?: string;
  build_id?: string;
  error_message?: string;
  error_stack?: string;
};
declare function on(event: string, handler: (logEntry: LogEntry) => void): void;
declare function createEntry(data: LogEntry | string): LogEntry;
declare function createActionStartEntry(data: ActionLogEntryData | string): LogEntry;
declare function createActionEndEntry(logEntry: ActionStartLogEntry, error?: null | undefined | Error): LogEntry;
declare function log(logEntry: LogEntry): LogEntry;
//#endregion
//#region ../../node_modules/metro/src/lib/reporting.d.ts
type BundleDetails = {
  bundleType: string;
  customResolverOptions: CustomResolverOptions;
  customTransformOptions: CustomTransformOptions;
  dev: boolean;
  entryFile: string;
  minify: boolean;
  platform: null | undefined | string;
};
/**
 * A tagged union of all the actions that may happen and we may want to
 * report to the tool user.
 */
type ReportableEvent = {
  port: number;
  hasReducedPerformance: boolean;
  type: 'initialize_started';
} | {
  type: 'initialize_failed';
  port: number;
  error: Error;
} | {
  type: 'initialize_done';
  port: number;
} | {
  buildID: string;
  type: 'bundle_build_done';
} | {
  buildID: string;
  type: 'bundle_build_failed';
} | {
  type: 'bundle_save_log';
  message: string;
} | {
  buildID: string;
  bundleDetails: BundleDetails;
  isPrefetch?: boolean;
  type: 'bundle_build_started';
} | {
  error: Error;
  type: 'bundling_error';
} | {
  type: 'dep_graph_loading';
  hasReducedPerformance: boolean;
} | {
  type: 'dep_graph_loaded';
} | {
  buildID: string;
  type: 'bundle_transform_progressed';
  transformedFileCount: number;
  totalFileCount: number;
} | {
  type: 'cache_read_error';
  error: Error;
} | {
  type: 'cache_write_error';
  error: Error;
} | {
  type: 'transform_cache_reset';
} | {
  type: 'worker_stdout_chunk';
  chunk: string;
} | {
  type: 'worker_stderr_chunk';
  chunk: string;
} | {
  type: 'hmr_client_error';
  error: Error;
} | {
  type: 'client_log';
  level: 'trace' | 'info' | 'warn' | 'log' | 'group' | 'groupCollapsed' | 'groupEnd' | 'debug';
  data: Array<unknown>;
} | {
  type: 'resolver_warning';
  message: string;
} | {
  type: 'server_listening';
  port: number;
  address: string;
  family: string;
} | {
  type: 'transformer_load_started';
} | {
  type: 'transformer_load_done';
} | {
  type: 'transformer_load_failed';
  error: Error;
} | {
  type: 'watcher_health_check_result';
  result: HealthCheckResult;
} | {
  type: 'watcher_status';
  status: WatcherStatus;
};
/**
 * Code across the application takes a reporter as an option and calls the
 * update whenever one of the ReportableEvent happens. Code does not directly
 * write to the standard output, because a build would be:
 *
 *   1. ad-hoc, embedded into another tool, in which case we do not want to
 *   pollute that tool's own output. The tool is free to present the
 *   warnings/progress we generate any way they want, by specifing a custom
 *   reporter.
 *   2. run as a background process from another tool, in which case we want
 *   to expose updates in a way that is easily machine-readable, for example
 *   a JSON-stream. We don't want to pollute it with textual messages.
 *
 * We centralize terminal reporting into a single place because we want the
 * output to be robust and consistent. The most common reporter is
 * TerminalReporter, that should be the only place in the application should
 * access the `terminal` module (nor the `console`).
 */
type Reporter = {
  update(event: ReportableEvent): void;
};
//#endregion
//#region ../../node_modules/metro/src/Assets.d.ts
type AssetDataWithoutFiles = {
  readonly __packager_asset: boolean;
  readonly fileSystemLocation: string;
  readonly hash: string;
  readonly height: null | undefined | number;
  readonly httpServerLocation: string;
  readonly name: string;
  readonly scales: Array<number>;
  readonly type: string;
  readonly width: null | undefined | number;
};
type AssetData = AssetDataWithoutFiles & {
  readonly files: Array<string>;
};
//#endregion
//#region ../../node_modules/metro/src/DeltaBundler/Serializers/getExplodedSourceMap.d.ts
type ExplodedSourceMap = ReadonlyArray<{
  readonly map: Array<MetroSourceMapSegmentTuple>;
  readonly firstLine1Based: number;
  readonly functionMap: null | undefined | FBSourceFunctionMap;
  readonly path: string;
}>;
//#endregion
//#region ../../node_modules/metro/src/DeltaBundler/Serializers/getRamBundleInfo.d.ts
type RamBundleInfo = {
  getDependencies: ($$PARAM_0$$: string) => Set<string>;
  startupModules: ReadonlyArray<ModuleTransportLike>;
  lazyModules: ReadonlyArray<ModuleTransportLike>;
  groups: Map<number, Set<number>>;
};
//#endregion
//#region ../../node_modules/metro/src/lib/getGraphId.d.ts
declare type GraphId = string;
//#endregion
//#region ../../node_modules/metro/src/DeltaBundler/Worker.d.ts
type TransformerConfig = {
  transformerPath: string;
  transformerConfig: JsTransformerConfig;
};
type Data$1 = Readonly<{
  result: TransformResult;
  sha1: string;
  transformFileStartLogEntry: LogEntry;
  transformFileEndLogEntry: LogEntry;
}>;
declare const transform: (filename: string, transformOptions: JsTransformOptions, projectRoot: string, transformerConfig: TransformerConfig, fileBuffer?: Buffer) => Promise<Data$1>;
declare type transform = typeof transform;
type Worker = {
  readonly transform: typeof transform;
};
//#endregion
//#region ../../node_modules/metro/src/DeltaBundler/WorkerFarm.d.ts
type WorkerInterface = Readonly<Omit<Worker, keyof {
  end(): void | Promise<void>;
  getStdout(): Readable;
  getStderr(): Readable;
}> & {
  end(): void | Promise<void>;
  getStdout(): Readable;
  getStderr(): Readable;
}>;
type TransformerResult = Readonly<{
  result: TransformResult;
  sha1: string;
}>;
declare class WorkerFarm {
  _config: ConfigT;
  _transformerConfig: TransformerConfig;
  _worker: WorkerInterface | Worker;
  constructor(config: ConfigT, transformerConfig: TransformerConfig);
  kill(): Promise<void>;
  transform(filename: string, options: JsTransformOptions, fileBuffer?: Buffer): Promise<TransformerResult>;
  _makeFarm(absoluteWorkerPath: string, exposedMethods: ReadonlyArray<string>, numWorkers: number): WorkerInterface;
  _computeWorkerKey(method: string, filename: string): null | undefined | string;
  _formatGenericError(err: Readonly<{
    message: string;
    stack?: string;
  }>, filename: string): TransformError;
  _formatBabelError(err: Readonly<{
    message: string;
    stack?: string;
    type?: string;
    codeFrame?: unknown;
    loc: {
      line?: number;
      column?: number;
    };
  }>, filename: string): TransformError;
}
declare class TransformError extends SyntaxError {
  type: string;
  constructor(message: string);
}
//#endregion
//#region ../../node_modules/metro/src/DeltaBundler/Transformer.d.ts
type GetOrComputeSha1Fn = ($$PARAM_0$$: string) => Promise<Readonly<{
  content?: Buffer;
  sha1: string;
}>>;
declare class Transformer {
  _config: ConfigT;
  _cache: Cache<TransformResult>;
  _baseHash: string;
  _getSha1: GetOrComputeSha1Fn;
  _workerFarm: WorkerFarm;
  constructor(config: ConfigT, opts: Readonly<{
    getOrComputeSha1: GetOrComputeSha1Fn;
  }>);
  transformFile(filePath: string, transformerOptions: JsTransformOptions, fileBuffer?: Buffer): Promise<TransformResultWithSource>;
  end(): Promise<void>;
}
//#endregion
//#region ../../node_modules/metro/src/node-haste/DependencyGraph/ModuleResolution.d.ts
type DirExistsFn = (filePath: string) => boolean;
type Options = Readonly<{
  assetExts: ReadonlySet<string>;
  dirExists: DirExistsFn;
  disableHierarchicalLookup: boolean;
  doesFileExist: DoesFileExist;
  emptyModulePath: string;
  extraNodeModules: null | undefined | object;
  fileSystemLookup: FileSystemLookup;
  getHasteModulePath: (name: string, platform: null | undefined | string) => null | undefined | string;
  getHastePackagePath: (name: string, platform: null | undefined | string) => null | undefined | string;
  mainFields: ReadonlyArray<string>;
  getPackage: (packageJsonPath: string) => null | undefined | PackageJson;
  getPackageForModule: (absolutePath: string) => null | undefined | PackageForModule;
  nodeModulesPaths: ReadonlyArray<string>;
  preferNativePlatform: boolean;
  projectRoot: string;
  reporter: Reporter;
  resolveAsset: ResolveAsset;
  resolveRequest: null | undefined | CustomResolver;
  sourceExts: ReadonlyArray<string>;
  unstable_conditionNames: ReadonlyArray<string>;
  unstable_conditionsByPlatform: Readonly<{
    [platform: string]: ReadonlyArray<string>;
  }>;
  unstable_enablePackageExports: boolean;
  unstable_incrementalResolution: boolean;
}>;
declare class ModuleResolver {
  _options: Options;
  _projectRootFakeModulePath: string;
  _cachedEmptyModule: null | undefined | BundlerResolution;
  constructor(options: Options);
  _getEmptyModule(): BundlerResolution;
  resolveDependency(originModulePath: string, dependency: TransformResultDependency, allowHaste: boolean, platform: string | null, resolverOptions: ResolverInputOptions): BundlerResolution;
  /**
   * TODO: Return Resolution instead of coercing to BundlerResolution here
   */
  _getFileResolvedModule(resolution: Resolution): BundlerResolution;
  _logWarning: (message: string) => void;
  _removeRoot(candidates: FileCandidates): FileCandidates;
}
//#endregion
//#region ../../node_modules/metro/src/node-haste/DependencyGraph.d.ts
declare class DependencyGraph extends EventEmitter {
  _config: ConfigT;
  _haste: FileMap;
  _fileSystem: FileSystem;
  _hasteMap: HasteMap;
  _moduleResolver: ModuleResolver;
  _resolutionCache: Map<string | symbol, Map<string | symbol, Map<string | symbol, Map<string | symbol, BundlerResolution>>>>;
  _initializedPromise: Promise<void>;
  constructor(config: ConfigT, options?: {
    readonly hasReducedPerformance?: boolean;
    readonly watch?: boolean;
  });
  _onWatcherHealthCheck(result: HealthCheckResult): void;
  _onWatcherStatus(status: WatcherStatus): void;
  ready(): Promise<void>;
  _onHasteChange($$PARAM_0$$: ChangeEvent): void;
  _createModuleResolver(): void;
  _getClosestPackage(absoluteModulePath: string): null | undefined | {
    packageJsonPath: string;
    packageRelativePath: string;
  };
  getAllFiles(): Array<string>;
  /**
   * Used when watcher.unstable_lazySha1 is true
   */
  getOrComputeSha1(mixedPath: string): Promise<{
    content?: Buffer;
    sha1: string;
  }>;
  getWatcher(): EventEmitter;
  end(): void;
  /** Given a search context, return a list of file paths matching the query. */
  matchFilesWithContext(from: string, context: Readonly<{
    recursive: boolean;
    filter: RegExp;
  }>): Iterable<string>;
  resolveDependency(originModulePath: string, dependency: TransformResultDependency, platform: string | null, resolverOptions: ResolverInputOptions, $$PARAM_4$$?: {
    assumeFlatNodeModules: boolean;
  }): BundlerResolution;
  doesFileExist: (filePath: string) => boolean;
  getHasteName(filePath: string): string;
  getDependencies(filePath: string): Array<string>;
}
//#endregion
//#region ../../node_modules/metro/src/Bundler.d.ts
type BundlerOptions = Readonly<{
  hasReducedPerformance?: boolean;
  watch?: boolean;
}>;
declare class Bundler {
  _depGraph: DependencyGraph;
  _initializedPromise: Promise<void>;
  _transformer: Transformer;
  constructor(config: ConfigT, options?: BundlerOptions);
  getWatcher(): EventEmitter;
  end(): Promise<void>;
  getDependencyGraph(): Promise<DependencyGraph>;
  transformFile(filePath: string, transformOptions: JsTransformOptions, fileBuffer?: Buffer): Promise<TransformResultWithSource>;
  ready(): Promise<void>;
}
//#endregion
//#region ../../node_modules/metro/src/IncrementalBundler.d.ts
declare type RevisionId = string;
type OutputGraph = Graph;
type OtherOptions = Readonly<{
  onProgress: Options$1['onProgress'];
  shallow: boolean;
  lazy: boolean;
}>;
type GraphRevision = {
  readonly id: RevisionId;
  readonly date: Date;
  readonly graphId: GraphId;
  readonly graph: OutputGraph;
  readonly prepend: ReadonlyArray<Module>;
};
type IncrementalBundlerOptions = Readonly<{
  hasReducedPerformance?: boolean;
  watch?: boolean;
}>;
declare class IncrementalBundler {
  _config: ConfigT;
  _bundler: Bundler;
  _deltaBundler: DeltaBundler;
  _revisionsById: Map<RevisionId, Promise<GraphRevision>>;
  _revisionsByGraphId: Map<GraphId, Promise<GraphRevision>>;
  static revisionIdFromString: (str: string) => RevisionId;
  constructor(config: ConfigT, options?: IncrementalBundlerOptions);
  end(): Promise<void>;
  getBundler(): Bundler;
  getDeltaBundler(): DeltaBundler;
  getRevision(revisionId: RevisionId): null | undefined | Promise<GraphRevision>;
  getRevisionByGraphId(graphId: GraphId): null | undefined | Promise<GraphRevision>;
  buildGraphForEntries(entryFiles: ReadonlyArray<string>, transformOptions: TransformInputOptions, resolverOptions: ResolverInputOptions, otherOptions?: OtherOptions): Promise<OutputGraph>;
  getDependencies(entryFiles: ReadonlyArray<string>, transformOptions: TransformInputOptions, resolverOptions: ResolverInputOptions, otherOptions?: OtherOptions): Promise<ReadOnlyDependencies>;
  buildGraph(entryFile: string, transformOptions: TransformInputOptions, resolverOptions: ResolverInputOptions, otherOptions?: OtherOptions): Promise<{
    readonly graph: OutputGraph;
    readonly prepend: ReadonlyArray<Module>;
  }>;
  initializeGraph(entryFile: string, transformOptions: TransformInputOptions, resolverOptions: ResolverInputOptions, otherOptions?: OtherOptions): Promise<{
    delta: DeltaResult;
    revision: GraphRevision;
  }>;
  updateGraph(revision: GraphRevision, reset: boolean): Promise<{
    delta: DeltaResult;
    revision: GraphRevision;
  }>;
  endGraph(graphId: GraphId): Promise<void>;
  _getAbsoluteEntryFiles(entryFiles: ReadonlyArray<string>): Promise<ReadonlyArray<string>>;
  ready(): Promise<void>;
}
//#endregion
//#region ../../node_modules/metro/src/Server/MultipartResponse.d.ts
type Data = string | Buffer | Uint8Array;
type Headers = {
  [$$Key$$: string]: string | number;
};
declare class MultipartResponse {
  static wrapIfSupported(req: IncomingMessage$1, res: ServerResponse): MultipartResponse | ServerResponse;
  static serializeHeaders(headers: Headers): string;
  res: ServerResponse;
  headers: Headers;
  constructor(res: ServerResponse);
  writeChunk(headers: Headers | null, data?: Data, isLast?: boolean): void;
  writeHead(status: number, headers?: Headers): void;
  setHeader(name: string, value: string | number): void;
  end(data?: Data): void;
  once(name: string, fn: () => unknown): this;
}
//#endregion
//#region ../../node_modules/metro/src/Server.d.ts
type ProcessStartContext = Omit<SplitBundleOptions, keyof {
  readonly buildNumber: number;
  readonly bundleOptions: BundleOptions;
  readonly graphId: GraphId;
  readonly graphOptions: GraphOptions;
  readonly mres: MultipartResponse | ServerResponse;
  readonly req: IncomingMessage;
  readonly revisionId?: null | undefined | RevisionId;
  readonly bundlePerfLogger: RootPerfLogger;
  readonly requestStartTimestamp: number;
}> & {
  readonly buildNumber: number;
  readonly bundleOptions: BundleOptions;
  readonly graphId: GraphId;
  readonly graphOptions: GraphOptions;
  readonly mres: MultipartResponse | ServerResponse;
  readonly req: IncomingMessage;
  readonly revisionId?: null | undefined | RevisionId;
  readonly bundlePerfLogger: RootPerfLogger;
  readonly requestStartTimestamp: number;
};
type ProcessDeleteContext = {
  readonly graphId: GraphId;
  readonly req: IncomingMessage;
  readonly res: ServerResponse;
};
type ProcessEndContext<T> = Omit<ProcessStartContext, keyof {
  readonly result: T;
}> & {
  readonly result: T;
};
type ServerOptions = Readonly<{
  hasReducedPerformance?: boolean;
  onBundleBuilt?: (bundlePath: string) => void;
  watch?: boolean;
}>;
type FetchTiming = {
  graphId: GraphId;
  startTime: number;
  endTime: number | null;
  isPrefetch: boolean;
};
declare class Server$1 {
  _bundler: IncrementalBundler;
  _config: ConfigT;
  _createModuleId: (path: string) => number;
  _isEnded: boolean;
  _logger: typeof Logger_d_exports;
  _nextBundleBuildNumber: number;
  _platforms: Set<string>;
  _reporter: Reporter;
  _serverOptions: ServerOptions | void;
  _allowedSuffixesForSourceRequests: ReadonlyArray<string>;
  _sourceRequestRoutingMap: ReadonlyArray<[pathnamePrefix: string, normalizedRootDir: string]>;
  _fetchTimings: Array<FetchTiming>;
  _activeFetchCount: number;
  constructor(config: ConfigT, options?: ServerOptions);
  end(): void;
  getBundler(): IncrementalBundler;
  getCreateModuleId(): (path: string) => number;
  _serializeGraph($$PARAM_0$$: Readonly<{
    splitOptions: SplitBundleOptions;
    prepend: ReadonlyArray<Module>;
    graph: ReadOnlyGraph;
  }>): Promise<{
    code: string;
    map: string;
  }>;
  build(bundleOptions: BundleOptions, $$PARAM_1$$?: BuildOptions): Promise<{
    code: string;
    map: string;
    assets?: ReadonlyArray<AssetData>;
  }>;
  getRamBundleInfo(options: BundleOptions): Promise<RamBundleInfo>;
  getAssets(options: BundleOptions): Promise<ReadonlyArray<AssetData>>;
  _getAssetsFromDependencies(dependencies: ReadOnlyDependencies, platform: null | undefined | string): Promise<ReadonlyArray<AssetData>>;
  getOrderedDependencyPaths(options: {
    readonly dev: boolean;
    readonly entryFile: string;
    readonly minify: boolean;
    readonly platform: null | undefined | string;
  }): Promise<Array<string>>;
  _rangeRequestMiddleware(req: IncomingMessage, res: ServerResponse, data: string | Buffer, assetPath: string): Buffer | string;
  _processSingleAssetRequest(req: IncomingMessage, res: ServerResponse): Promise<void>;
  processRequest: ($$PARAM_0$$: IncomingMessage, $$PARAM_1$$: ServerResponse, $$PARAM_2$$: (e: null | undefined | Error) => void) => void;
  _parseOptions(url: string): BundleOptions;
  _rewriteAndNormalizeUrl(requestUrl: string): string;
  _processRequest(req: IncomingMessage, res: ServerResponse, next: ($$PARAM_0$$: null | undefined | Error) => void): Promise<void>;
  _processSourceRequest(relativeFilePathname: string, rootDir: string, res: ServerResponse): Promise<void>;
  _createRequestProcessor<T>($$PARAM_0$$: {
    readonly bundleType: 'assets' | 'bundle' | 'map';
    readonly createStartEntry: (context: ProcessStartContext) => ActionLogEntryData;
    readonly createEndEntry: (context: ProcessEndContext<T>) => Partial<ActionStartLogEntry>;
    readonly build: (context: ProcessStartContext) => Promise<T>;
    readonly delete?: (context: ProcessDeleteContext) => Promise<void>;
    readonly finish: (context: ProcessEndContext<T>) => void;
  }): (req: IncomingMessage, res: ServerResponse, bundleOptions: BundleOptions, buildContext: Readonly<{
    buildNumber: number;
    bundlePerfLogger: RootPerfLogger;
  }>) => Promise<void>;
  _processBundleRequest: (req: IncomingMessage, res: ServerResponse, bundleOptions: BundleOptions, buildContext: Readonly<{
    buildNumber: number;
    bundlePerfLogger: RootPerfLogger;
  }>) => Promise<void>;
  _getSortedModules(graph: ReadOnlyGraph): ReadonlyArray<Module>;
  _processSourceMapRequest: (req: IncomingMessage, res: ServerResponse, bundleOptions: BundleOptions, buildContext: Readonly<{
    buildNumber: number;
    bundlePerfLogger: RootPerfLogger;
  }>) => Promise<void>;
  _processAssetsRequest: (req: IncomingMessage, res: ServerResponse, bundleOptions: BundleOptions, buildContext: Readonly<{
    buildNumber: number;
    bundlePerfLogger: RootPerfLogger;
  }>) => Promise<void>;
  _symbolicate(req: IncomingMessage, res: ServerResponse): Promise<void>;
  _explodedSourceMapForBundleOptions(bundleOptions: BundleOptions): Promise<ExplodedSourceMap>;
  _resolveWatchFolderPrefix(filePath: string): {
    rootDir: string;
    filePath: string;
  } | null;
  _resolveRelativePath(filePath: string, $$PARAM_1$$: Readonly<{
    relativeTo: 'project' | 'server';
    resolverOptions: ResolverInputOptions;
    transformOptions: TransformInputOptions;
  }>): Promise<string>;
  getNewBuildNumber(): number;
  getPlatforms(): ReadonlyArray<string>;
  getWatchFolders(): ReadonlyArray<string>;
  static DEFAULT_GRAPH_OPTIONS: Readonly<{
    customResolverOptions: CustomResolverOptions;
    customTransformOptions: CustomTransformOptions;
    dev: boolean;
    minify: boolean;
    unstable_transformProfile: 'default';
  }>;
  static DEFAULT_BUNDLE_OPTIONS: Omit<typeof Server$1.DEFAULT_GRAPH_OPTIONS, keyof {
    excludeSource: false;
    inlineSourceMap: false;
    lazy: false;
    modulesOnly: false;
    onProgress: null;
    runModule: true;
    shallow: false;
    sourceMapUrl: null;
    sourceUrl: null;
    sourcePaths: SourcePathsMode;
  }> & {
    excludeSource: false;
    inlineSourceMap: false;
    lazy: false;
    modulesOnly: false;
    onProgress: null;
    runModule: true;
    shallow: false;
    sourceMapUrl: null;
    sourceUrl: null;
    sourcePaths: SourcePathsMode;
  };
  _getServerRootDir(): string;
  _getEntryPointAbsolutePath(entryFile: string): string;
  ready(): Promise<void>;
  _shouldAddModuleToIgnoreList(module: Module): boolean;
  _getModuleSourceUrl(module: Module, mode: SourcePathsMode): string;
}
//#endregion
//#region ../../node_modules/metro/src/Server/symbolicate.d.ts
type StackFrameInput = {
  readonly file: null | undefined | string;
  readonly lineNumber: null | undefined | number;
  readonly column: null | undefined | number;
  readonly methodName: null | undefined | string;
};
type IntermediateStackFrame = Omit<StackFrameInput, keyof {
  collapse?: boolean;
}> & {
  collapse?: boolean;
};
//#endregion
//#region ../../node_modules/metro-config/src/types.d.ts
type ExtraTransformOptions = Readonly<{
  preloadedModules?: Readonly<{
    [path: string]: true;
  }> | false;
  ramGroups?: ReadonlyArray<string>;
  transform?: Readonly<{
    experimentalImportSupport?: boolean;
    inlineRequires?: Readonly<{
      blockList: Readonly<{
        [absoluteModulePath: string]: true;
      }>;
    }> | boolean;
    nonInlinedRequires?: ReadonlyArray<string>;
    unstable_memoizeInlineRequires?: boolean;
    unstable_nonMemoizedInlineRequires?: ReadonlyArray<string>;
  }>;
}>;
type GetTransformOptionsOpts = {
  dev: boolean;
  /**
   * @deprecated Always true
   */
  hot: true;
  platform: null | undefined | string;
};
type GetTransformOptions = (entryPoints: ReadonlyArray<string>, options: GetTransformOptionsOpts, getDependenciesOf: (absoluteFilePath: string) => Promise<Array<string>>) => Promise<Partial<ExtraTransformOptions>>;
type Middleware = HandleFunction;
type PerfAnnotations = Partial<{
  string: Readonly<{
    [key: string]: string;
  }>;
  int: Readonly<{
    [key: string]: number;
  }>;
  double: Readonly<{
    [key: string]: number;
  }>;
  bool: Readonly<{
    [key: string]: boolean;
  }>;
  string_array: Readonly<{
    [key: string]: ReadonlyArray<string>;
  }>;
  int_array: Readonly<{
    [key: string]: ReadonlyArray<number>;
  }>;
  double_array: Readonly<{
    [key: string]: ReadonlyArray<number>;
  }>;
  bool_array: Readonly<{
    [key: string]: ReadonlyArray<boolean>;
  }>;
}>;
type PerfLoggerPointOptions = Readonly<{
  timestamp?: number;
}>;
interface PerfLogger {
  point(name: string, opts?: PerfLoggerPointOptions): void;
  annotate(annotations: PerfAnnotations): void;
  subSpan(label: string): PerfLogger;
}
interface RootPerfLogger extends PerfLogger {
  start(opts?: PerfLoggerPointOptions): void;
  end(status: 'SUCCESS' | 'FAIL' | 'CANCEL', opts?: PerfLoggerPointOptions): void;
}
type PerfLoggerFactoryOptions = Readonly<{
  key?: number;
}>;
type PerfLoggerFactory = (type: 'START_UP' | 'BUNDLING_REQUEST' | 'HMR', opts?: PerfLoggerFactoryOptions) => RootPerfLogger;
type ResolverConfigT = {
  assetExts: ReadonlyArray<string>;
  assetResolutions: ReadonlyArray<string>;
  blacklistRE?: RegExp | Array<RegExp>;
  blockList: RegExp | Array<RegExp>;
  disableHierarchicalLookup: boolean;
  dependencyExtractor: null | undefined | string;
  emptyModulePath: string;
  enableGlobalPackages: boolean;
  extraNodeModules: {
    [name: string]: string;
  };
  hasteImplModulePath: null | undefined | string;
  nodeModulesPaths: ReadonlyArray<string>;
  platforms: ReadonlyArray<string>;
  resolveRequest: null | undefined | CustomResolver;
  resolverMainFields: ReadonlyArray<string>;
  sourceExts: ReadonlyArray<string>;
  unstable_conditionNames: ReadonlyArray<string>;
  unstable_conditionsByPlatform: Readonly<{
    [platform: string]: ReadonlyArray<string>;
  }>;
  unstable_enablePackageExports: boolean;
  unstable_incrementalResolution: boolean;
  useWatchman: boolean;
  requireCycleIgnorePatterns: ReadonlyArray<RegExp>;
  unstable_forceFullRefreshPatterns: ReadonlyArray<RegExp>;
};
type SerializerConfigT = {
  createModuleIdFactory: () => (path: string) => number;
  customSerializer: null | undefined | ((entryPoint: string, preModules: ReadonlyArray<Module>, graph: ReadOnlyGraph, options: SerializerOptions) => Promise<string | {
    code: string;
    map: string;
  }>);
  experimentalSerializerHook: (graph: ReadOnlyGraph, delta: DeltaResult) => unknown;
  getModulesRunBeforeMainModule: (entryFilePath: string) => Array<string>;
  getPolyfills: ($$PARAM_0$$: {
    platform: null | undefined | string;
  }) => ReadonlyArray<string>;
  getRunModuleStatement: (moduleId: number | string, globalPrefix: string) => string;
  polyfillModuleNames: ReadonlyArray<string>;
  processModuleFilter: (modules: Module) => boolean;
  isThirdPartyModule: (module: Readonly<{
    path: string;
  }>) => boolean;
};
type TransformerConfigT = Omit<JsTransformerConfig, keyof {
  getTransformOptions: GetTransformOptions;
  transformVariants: {
    readonly [name: string]: Partial<ExtraTransformOptions>;
  };
  publicPath: string;
  unstable_workerThreads: boolean;
}> & {
  getTransformOptions: GetTransformOptions;
  transformVariants: {
    readonly [name: string]: Partial<ExtraTransformOptions>;
  };
  publicPath: string;
  unstable_workerThreads: boolean;
};
type MetalConfigT = {
  cacheVersion: string;
  fileMapCacheDirectory?: string;
  hasteMapCacheDirectory?: string;
  unstable_fileMapCacheManagerFactory?: CacheManagerFactory;
  unstable_fileMapPlugins?: ReadonlyArray<InputFileMapPlugin>;
  maxWorkers: number;
  unstable_perfLoggerFactory?: null | undefined | PerfLoggerFactory;
  projectRoot: string;
  stickyWorkers: boolean;
  transformerPath: string;
  reporter: Reporter;
  resetCache: boolean;
  watchFolders: ReadonlyArray<string>;
};
type CacheStoresConfigT = ReadonlyArray<CacheStore<TransformResult>>;
type ServerConfigT = {
  /** @deprecated */enhanceMiddleware: ($$PARAM_0$$: Middleware, $$PARAM_1$$: Server$1) => Middleware | Server;
  forwardClientLogs: boolean;
  port: number;
  rewriteRequestUrl: ($$PARAM_0$$: string) => string;
  unstable_serverRoot: null | undefined | string;
  useGlobalHotkey: boolean;
  verifyConnections: boolean;
  tls: false | {
    ca?: string | Buffer;
    cert?: string | Buffer;
    key?: string | Buffer;
    requestCert?: boolean;
  };
};
type SymbolicatorConfigT = {
  customizeFrame: ($$PARAM_0$$: {
    readonly file: null | undefined | string;
    readonly lineNumber: null | undefined | number;
    readonly column: null | undefined | number;
    readonly methodName: null | undefined | string;
  }) => (null | undefined | {
    readonly collapse?: boolean;
  }) | Promise<null | undefined | {
    readonly collapse?: boolean;
  }>;
  customizeStack: ($$PARAM_0$$: Array<IntermediateStackFrame>, $$PARAM_1$$: unknown) => Array<IntermediateStackFrame> | Promise<Array<IntermediateStackFrame>>;
};
type WatcherConfigT = {
  additionalExts: ReadonlyArray<string>;
  healthCheck: Readonly<{
    enabled: boolean;
    interval: number;
    timeout: number;
    filePrefix: string;
  }>;
  unstable_autoSaveCache: Readonly<{
    enabled: boolean;
    debounceMs?: number;
  }>;
  unstable_lazySha1: boolean;
  watchman: Readonly<{
    deferStates: ReadonlyArray<string>;
  }>;
};
type InputConfigT = Partial<Readonly<MetalConfigT & {
  cacheStores: CacheStoresConfigT | (($$PARAM_0$$: MetroCache) => CacheStoresConfigT);
  resolver: Readonly<Partial<ResolverConfigT>>;
  server: Readonly<Partial<ServerConfigT>>;
  serializer: Readonly<Partial<SerializerConfigT>>;
  symbolicator: Readonly<Partial<SymbolicatorConfigT>>;
  transformer: Readonly<Partial<TransformerConfigT>>;
  watcher: Partial<Readonly<Omit<WatcherConfigT, 'healthCheck' | 'unstable_autoSaveCache' | 'watchman'> & {
    healthCheck: Partial<Readonly<WatcherConfigT['healthCheck']>>;
    unstable_autoSaveCache: Partial<Readonly<WatcherConfigT['unstable_autoSaveCache']>>;
    watchman: Partial<Readonly<WatcherConfigT['watchman']>>;
  }>>;
}>>;
type MetroConfig = InputConfigT;
type ConfigT = Readonly<MetalConfigT & {
  cacheStores: CacheStoresConfigT;
  resolver: Readonly<ResolverConfigT>;
  server: Readonly<ServerConfigT>;
  serializer: Readonly<SerializerConfigT>;
  symbolicator: Readonly<SymbolicatorConfigT>;
  transformer: Readonly<TransformerConfigT>;
  watcher: Readonly<WatcherConfigT>;
}>;
//#endregion
//#region src/metro/withStorybook.d.ts
/**
 * Options for configuring Storybook with React Native.
 */
interface WithStorybookOptions {
  /**
   * The path to the Storybook config folder. Defaults to './.rnstorybook'.
   */
  configPath?: string;
  /**
   * WebSocket configuration for syncing storybook instances or sending events to storybook.
   */
  websockets?: WebsocketsOptions | 'auto';
  /**
   * Whether to use JavaScript files for Storybook configuration instead of TypeScript. Defaults to false.
   */
  useJs?: boolean;
  /**
   * if false, we will attempt to remove storybook from the js bundle.
   */
  enabled?: boolean;
  /**
   * Whether to include doc tools in the storybook.requires file. Defaults to true.
   */
  docTools?: boolean;
  /**
   * Whether to use lite mode for the storybook. Defaults to false.
   * This will mock out the default storybook ui so you don't need to install all its dependencies like reanimated etc.
   */
  liteMode?: boolean;
  /**
   * Whether to enable MCP (Model Context Protocol) server support. Defaults to false.
   * When enabled, adds an /mcp endpoint to the channel server,
   * allowing AI agents (Claude Code, Cursor, etc.) to query component documentation.
   * If websockets are disabled, MCP documentation tools still work but story selection is unavailable.
   */
  experimental_mcp?: boolean;
}
/**
 * Configures Metro bundler to work with Storybook in React Native.
 * This function wraps a Metro configuration to enable Storybook usage.
 * This is intended to replace the withStorybook function in the future.
 *
 * @param config - The Metro bundler configuration to be modified. This should be a valid Metro config object
 *                 that includes resolver, transformer, and other Metro-specific options.
 * @param options - Options to customize the Storybook configuration.
 * @param options.configPath - The path to the Storybook config folder. Defaults to './.rnstorybook'.
 *                            This is where your main.js/ts and preview.js/ts files are located.
 * @param options.websockets - WebSocket configuration for syncing storybook instances or sending events.
 *                            When provided, creates a WebSocket server for real-time communication.
 * @param options.websockets.port - The port WebSocket server will listen on. Defaults to 7007.
 * @param options.websockets.host - The host WebSocket server will bind to. Defaults to 'localhost'.
 * @param options.websockets.secured - Whether to use WSS/HTTPS for the channel server.
 * @param options.websockets.key - TLS private key used when `secured` is true.
 * @param options.websockets.cert - TLS certificate used when `secured` is true.
 * @param options.useJs - Whether to use JavaScript files for Storybook configuration instead of TypeScript.
 *                       When true, generates storybook.requires.js instead of storybook.requires.ts.
 *                       Defaults to false.
 * @param options.enabled - If false, attempts to remove storybook modules from the JavaScript
 *                         bundle to reduce bundle size. Defaults to true.
 * @param options.docTools - Whether to include doc tools in the storybook.requires file.
 *                          Doc tools provide additional documentation features. Defaults to true.
 * @param options.liteMode - Whether to use lite mode for the storybook. In lite mode, the default
 *                          storybook UI is mocked out so you don't need to install all its dependencies
 *                          like reanimated etc. This is useful for reducing bundle size and dependencies.
 *                          Defaults to false.
 * @returns The modified Metro configuration with Storybook support enabled.
 *
 * @example
 * ```javascript
 * const { getDefaultConfig } = require('expo/metro-config');
 * const {withStorybook} = require('@storybook/react-native/metro/withStorybook');
 * const path = require('path');
 *
 * const projectRoot = __dirname;
 * const config = getDefaultConfig(projectRoot);
 *
 * module.exports = withStorybook(config, {
 *   configPath: path.resolve(projectRoot, './.rnstorybook'),
 *   websockets: { port: 7007, host: 'localhost' },
 *   useJs: false,
 *   docTools: true,
 *   liteMode: false,
 * });
 * ```
 *
 * @example
 * ```javascript
 * // Minimal configuration
 * const { getDefaultConfig } = require('expo/metro-config');
 * const {withStorybook} = require('@storybook/react-native/metro/withStorybook');
 *
 * const config = getDefaultConfig(__dirname);
 * module.exports = withStorybook(config);
 * ```
 *
 * @example
 * ```javascript
 * // Disable Storybook in production
 * const { getDefaultConfig } = require('expo/metro-config');
 * const {withStorybook} = require('@storybook/react-native/metro/withStorybook');
 *
 * const config = getDefaultConfig(__dirname);
 * module.exports = withStorybook(config, {
 *   enabled: process.env.EXPO_PUBLIC_STORYBOOK_ENABLED === "true",
 * });
 * ```
 */
declare function withStorybook(config: MetroConfig, options?: WithStorybookOptions): MetroConfig;
//#endregion
export { withStorybook };