import type { InvokeItem } from "../types";
import type { Children, FileNode, JSON_ROOT, ScriptFuncItem } from "../types/ParseContext";
import type { QueryItem, QueryRes } from "../types/queryFuncChains";
export type QueryFuncChainGNode = {
    id: string;
    funcName: string;
    fileSrc: string;
    defLineNoRaw: string;
    isProject: boolean;
    hash: string;
};
export type QueryFuncChainAdjEdge = {
    to: string;
    invoke: InvokeItem;
};
export type QueryFuncChainCompactEdge = {
    to: number;
    invoke: InvokeItem;
    edgeMatch: number;
};
export type QueryFuncChainGraph = {
    gnodes: QueryFuncChainGNode[];
    adjNum: QueryFuncChainCompactEdge[][];
    nodeMatches: Uint8Array;
    n: number;
};
export type QueryCallGraphBuildState = {
    nodes: Map<string, QueryFuncChainGNode>;
    adj: Map<string, QueryFuncChainAdjEdge[]>;
};
export declare function flattenFiles(children: Children | undefined, out: FileNode[]): void;
export declare function scriptFuncsGroupedByName(file: FileNode | undefined): Map<string, ScriptFuncItem[]> | undefined;
export declare function findScriptFuncMatchingCallee(grouped: Map<string, ScriptFuncItem[]> | undefined, item: InvokeItem): ScriptFuncItem | undefined;
export declare function projectNodeId(fileAbs: string, sf: ScriptFuncItem): string;
export declare function externalNodeId(inv: InvokeItem): string;
export declare function ensureProjectNodeInGraph(state: QueryCallGraphBuildState, fileAbs: string, sf: ScriptFuncItem): string;
export declare function ensureExternalNodeInGraph(state: QueryCallGraphBuildState, inv: InvokeItem): string;
export declare function isExternalStyleFileSrc(fileSrc: string): boolean;
export declare function isDefaultFuncForProjectNode(n: QueryFuncChainGNode, bareSet: Set<string>, globalSet: Set<string>): boolean;
export declare function lineNoToHashForm(raw: string): string;
export declare function matchesInvokeTarget(inv: InvokeItem, target: string): boolean;
export declare function buildQueryItem(pathIdx: number[], gnodes: QueryFuncChainGNode[], bareSet: Set<string>, globalSet: Set<string>): QueryItem;
export declare function itemDedupKey(it: QueryItem): string;
export declare function buildCallGraphForQuery(snapshot: JSON_ROOT, target: string): QueryFuncChainGraph;
export declare function enumerateQueryFuncChainsWithTarget(graph: QueryFuncChainGraph, bareSet: Set<string>, globalSet: Set<string>): QueryRes;
