export declare const optimisticActor: import("svelte/store").Readable<import("xstate").ActorRef<import("xstate").MachineSnapshot<{
    client: import("@sanity/client").SanityClient;
    sharedListener?: ReturnType<typeof import("@sanity/mutate/_unstable_machine").createSharedListener>;
    documents: Record<string, import("xstate").ActorRefFrom<ReturnType<typeof import("@sanity/visual-editing/optimistic").createDocumentMutator>>>;
}, {
    type: "sync";
    id: string;
    document: import("@sanity/mutate/_unstable_machine").SanityDocumentBase;
} | {
    type: "mutation";
    id: string;
    effects: {
        apply: import("@sanity/mutate/_unstable_machine").RawPatch;
    };
    previousRev: string;
    resultRev: string;
} | {
    type: "rebased.local";
    id: string;
    document: import("@sanity/mutate/_unstable_machine").SanityDocumentBase;
} | {
    type: "rebased.remote";
    id: string;
    document: import("@sanity/mutate/_unstable_machine").SanityDocumentBase;
} | {
    type: "pristine";
    id: string;
} | {
    type: "observe";
    documentId: string;
} | {
    type: "unobserve";
    documentId: string;
} | {
    type: "add document actor";
    documentId: string;
} | {
    type: "stop document actor";
    documentId: string;
}, {
    [x: string]: import("xstate").ActorRefFromLogic<import("xstate").StateMachine<{
        client: import("@sanity/client").SanityClient;
        sharedListener?: ReturnType<typeof import("@sanity/mutate/_unstable_machine").createSharedListener>;
        id: string;
        cache?: Map<string, import("@sanity/client").SanityDocument<DocumentType> | null>;
        remote: import("@sanity/client").SanityDocument<DocumentType> | null | undefined;
        local: import("@sanity/client").SanityDocument<DocumentType> | null | undefined;
        mutationEvents: import("@sanity/client").MutationEvent[];
        stagedChanges: import("@sanity/mutate/_unstable_machine").MutationGroup[];
        stashedChanges: import("@sanity/mutate/_unstable_machine").MutationGroup[];
        error: unknown;
        fetchRemoteSnapshotAttempts: number;
        submitTransactionsAttempts: number;
    }, import("@sanity/client").WelcomeEvent | import("@sanity/client").ReconnectEvent | import("@sanity/client").MutationEvent | {
        type: "error";
    } | {
        type: "retry";
    } | {
        type: "connect";
    } | {
        type: "reconnect";
    } | {
        type: "welcome";
    } | {
        type: "mutate";
        mutations: import("@sanity/mutate/_unstable_machine").Mutation[];
    } | {
        type: "submit";
    } | {
        type: "xstate.done.actor.getDocument";
        output: import("@sanity/client").SanityDocument<DocumentType>;
    } | {
        type: "xstate.done.actor.submitTransactions";
        output: undefined;
    }, {
        [x: string]: import("xstate").ActorRefFromLogic<import("xstate").PromiseActorLogic<void | import("@sanity/client").SanityDocument<Record<string, any>> | undefined, {
            client: import("@sanity/client").SanityClient;
            id: string;
        }, import("xstate").EventObject>> | import("xstate").ActorRefFromLogic<import("xstate").PromiseActorLogic<void, {
            client: import("@sanity/client").SanityClient;
            transactions: import("@sanity/mutate/_unstable_machine").Transaction[];
        }, import("xstate").EventObject>> | import("xstate").ActorRefFromLogic<import("xstate").ObservableActorLogic<import("@sanity/client").WelcomeEvent | import("@sanity/client").ReconnectEvent | import("@sanity/client").MutationEvent, {
            listener: ReturnType<typeof import("@sanity/mutate/_unstable_machine").createSharedListener>;
            id: string;
        }, import("xstate").EventObject>> | undefined;
        getDocument?: import("xstate").ActorRefFromLogic<import("xstate").PromiseActorLogic<void | import("@sanity/client").SanityDocument<Record<string, any>> | undefined, {
            client: import("@sanity/client").SanityClient;
            id: string;
        }, import("xstate").EventObject>> | undefined;
        submitTransactions?: import("xstate").ActorRefFromLogic<import("xstate").PromiseActorLogic<void, {
            client: import("@sanity/client").SanityClient;
            transactions: import("@sanity/mutate/_unstable_machine").Transaction[];
        }, import("xstate").EventObject>> | undefined;
    }, import("xstate").Values<{
        'fetch remote snapshot': {
            src: "fetch remote snapshot";
            logic: import("xstate").PromiseActorLogic<void | import("@sanity/client").SanityDocument<Record<string, any>> | undefined, {
                client: import("@sanity/client").SanityClient;
                id: string;
            }, import("xstate").EventObject>;
            id: "getDocument";
        };
        'submit mutations as transactions': {
            src: "submit mutations as transactions";
            logic: import("xstate").PromiseActorLogic<void, {
                client: import("@sanity/client").SanityClient;
                transactions: import("@sanity/mutate/_unstable_machine").Transaction[];
            }, import("xstate").EventObject>;
            id: "submitTransactions";
        };
        'server-sent events': {
            src: "server-sent events";
            logic: import("xstate").ObservableActorLogic<import("@sanity/client").ReconnectEvent | import("@sanity/client").WelcomeEvent | import("@sanity/client").MutationEvent, {
                listener: ReturnType<typeof import("@sanity/mutate/_unstable_machine").createSharedListener>;
                id: string;
            }, import("xstate").EventObject>;
            id: string | undefined;
        };
    }>, import("xstate").Values<{
        'assign error to context': {
            type: "assign error to context";
            params: import("xstate").NonReducibleUnknown;
        };
        'clear error from context': {
            type: "clear error from context";
            params: import("xstate").NonReducibleUnknown;
        };
        'connect to server-sent events': {
            type: "connect to server-sent events";
            params: import("xstate").NonReducibleUnknown;
        };
        'listen to server-sent events': {
            type: "listen to server-sent events";
            params: import("xstate").NonReducibleUnknown;
        };
        'stop listening to server-sent events': {
            type: "stop listening to server-sent events";
            params: import("xstate").NonReducibleUnknown;
        };
        'buffer remote mutation events': {
            type: "buffer remote mutation events";
            params: import("xstate").NonReducibleUnknown;
        };
        'restore stashed changes': {
            type: "restore stashed changes";
            params: import("xstate").NonReducibleUnknown;
        };
        'rebase fetched remote snapshot': {
            type: "rebase fetched remote snapshot";
            params: import("xstate").NonReducibleUnknown;
        };
        'apply mendoza patch': {
            type: "apply mendoza patch";
            params: import("xstate").NonReducibleUnknown;
        };
        'increment fetch attempts': {
            type: "increment fetch attempts";
            params: import("xstate").NonReducibleUnknown;
        };
        'reset fetch attempts': {
            type: "reset fetch attempts";
            params: import("xstate").NonReducibleUnknown;
        };
        'increment submit attempts': {
            type: "increment submit attempts";
            params: import("xstate").NonReducibleUnknown;
        };
        'reset submit attempts': {
            type: "reset submit attempts";
            params: import("xstate").NonReducibleUnknown;
        };
        'stage mutation': {
            type: "stage mutation";
            params: import("xstate").NonReducibleUnknown;
        };
        'stash mutation': {
            type: "stash mutation";
            params: import("xstate").NonReducibleUnknown;
        };
        'rebase local snapshot': {
            type: "rebase local snapshot";
            params: import("xstate").NonReducibleUnknown;
        };
        'send pristine event to parent': {
            type: "send pristine event to parent";
            params: import("xstate").NonReducibleUnknown;
        };
        'send sync event to parent': {
            type: "send sync event to parent";
            params: import("xstate").NonReducibleUnknown;
        };
        'send mutation event to parent': {
            type: "send mutation event to parent";
            params: import("xstate").NonReducibleUnknown;
        };
    }>, never, "fetchRemoteSnapshotTimeout" | "submitTransactionsTimeout", "disconnected" | "connecting" | "reconnecting" | "connectFailure" | {
        connected: "loading" | "loadFailure" | {
            loaded: "pristine" | "dirty" | "submitting" | "submitFailure";
        };
    }, "error" | "busy" | "ready", import("@sanity/mutate/_unstable_machine").DocumentMutatorMachineInput, import("xstate").NonReducibleUnknown, import("xstate").EventObject, import("xstate").MetaObject, {
        readonly id: "document-mutator";
        readonly context: ({ input, }: {
            spawn: {
                <TSrc extends "fetch remote snapshot" | "submit mutations as transactions" | "server-sent events">(logic: TSrc, ...[options]: ({
                    src: "fetch remote snapshot";
                    logic: import("xstate").PromiseActorLogic<void | import("@sanity/client").SanityDocument<Record<string, any>> | undefined, {
                        client: import("@sanity/client").SanityClient;
                        id: string;
                    }, import("xstate").EventObject>;
                    id: "getDocument";
                } extends infer T ? T extends {
                    src: "fetch remote snapshot";
                    logic: import("xstate").PromiseActorLogic<void | import("@sanity/client").SanityDocument<Record<string, any>> | undefined, {
                        client: import("@sanity/client").SanityClient;
                        id: string;
                    }, import("xstate").EventObject>;
                    id: "getDocument";
                } ? T extends {
                    src: TSrc;
                } ? import("xstate").ConditionalRequired<[options?: ({
                    id?: T["id"] | undefined;
                    systemId?: string;
                    input?: import("xstate").InputFrom<T["logic"]> | undefined;
                    syncSnapshot?: boolean;
                } & { [K in import("xstate").RequiredActorOptions<T>]: unknown; }) | undefined], import("xstate").IsNotNever<import("xstate").RequiredActorOptions<T>>> : never : never : never) | ({
                    src: "submit mutations as transactions";
                    logic: import("xstate").PromiseActorLogic<void, {
                        client: import("@sanity/client").SanityClient;
                        transactions: import("@sanity/mutate/_unstable_machine").Transaction[];
                    }, import("xstate").EventObject>;
                    id: "submitTransactions";
                } extends infer T_1 ? T_1 extends {
                    src: "submit mutations as transactions";
                    logic: import("xstate").PromiseActorLogic<void, {
                        client: import("@sanity/client").SanityClient;
                        transactions: import("@sanity/mutate/_unstable_machine").Transaction[];
                    }, import("xstate").EventObject>;
                    id: "submitTransactions";
                } ? T_1 extends {
                    src: TSrc;
                } ? import("xstate").ConditionalRequired<[options?: ({
                    id?: T_1["id"] | undefined;
                    systemId?: string;
                    input?: import("xstate").InputFrom<T_1["logic"]> | undefined;
                    syncSnapshot?: boolean;
                } & { [K_1 in import("xstate").RequiredActorOptions<T_1>]: unknown; }) | undefined], import("xstate").IsNotNever<import("xstate").RequiredActorOptions<T_1>>> : never : never : never) | ({
                    src: "server-sent events";
                    logic: import("xstate").ObservableActorLogic<import("@sanity/client").ReconnectEvent | import("@sanity/client").WelcomeEvent | import("@sanity/client").MutationEvent, {
                        listener: ReturnType<typeof import("@sanity/mutate/_unstable_machine").createSharedListener>;
                        id: string;
                    }, import("xstate").EventObject>;
                    id: string | undefined;
                } extends infer T_2 ? T_2 extends {
                    src: "server-sent events";
                    logic: import("xstate").ObservableActorLogic<import("@sanity/client").ReconnectEvent | import("@sanity/client").WelcomeEvent | import("@sanity/client").MutationEvent, {
                        listener: ReturnType<typeof import("@sanity/mutate/_unstable_machine").createSharedListener>;
                        id: string;
                    }, import("xstate").EventObject>;
                    id: string | undefined;
                } ? T_2 extends {
                    src: TSrc;
                } ? import("xstate").ConditionalRequired<[options?: ({
                    id?: T_2["id"] | undefined;
                    systemId?: string;
                    input?: import("xstate").InputFrom<T_2["logic"]> | undefined;
                    syncSnapshot?: boolean;
                } & { [K_2 in import("xstate").RequiredActorOptions<T_2>]: unknown; }) | undefined], import("xstate").IsNotNever<import("xstate").RequiredActorOptions<T_2>>> : never : never : never)): import("xstate").ActorRefFromLogic<import("xstate").GetConcreteByKey<import("xstate").Values<{
                    "fetch remote snapshot": {
                        src: "fetch remote snapshot";
                        logic: import("xstate").PromiseActorLogic<void | import("@sanity/client").SanityDocument<Record<string, any>> | undefined, {
                            client: import("@sanity/client").SanityClient;
                            id: string;
                        }, import("xstate").EventObject>;
                        id: "getDocument";
                    };
                    "submit mutations as transactions": {
                        src: "submit mutations as transactions";
                        logic: import("xstate").PromiseActorLogic<void, {
                            client: import("@sanity/client").SanityClient;
                            transactions: import("@sanity/mutate/_unstable_machine").Transaction[];
                        }, import("xstate").EventObject>;
                        id: "submitTransactions";
                    };
                    "server-sent events": {
                        src: "server-sent events";
                        logic: import("xstate").ObservableActorLogic<import("@sanity/client").ReconnectEvent | import("@sanity/client").WelcomeEvent | import("@sanity/client").MutationEvent, {
                            listener: ReturnType<typeof import("@sanity/mutate/_unstable_machine").createSharedListener>;
                            id: string;
                        }, import("xstate").EventObject>;
                        id: string | undefined;
                    };
                }>, "src", TSrc>["logic"]>;
                <TLogic extends import("xstate").AnyActorLogic>(src: TLogic, options?: {
                    id?: never;
                    systemId?: string;
                    input?: import("xstate").InputFrom<TLogic> | undefined;
                    syncSnapshot?: boolean;
                } | undefined): import("xstate").ActorRefFromLogic<TLogic>;
            };
            input: import("@sanity/mutate/_unstable_machine").DocumentMutatorMachineInput;
            self: import("xstate").ActorRef<import("xstate").MachineSnapshot<{
                client: import("@sanity/client").SanityClient;
                sharedListener?: ReturnType<typeof import("@sanity/mutate/_unstable_machine").createSharedListener>;
                id: string;
                cache?: Map<string, import("@sanity/client").SanityDocument<DocumentType> | null>;
                remote: import("@sanity/client").SanityDocument<DocumentType> | null | undefined;
                local: import("@sanity/client").SanityDocument<DocumentType> | null | undefined;
                mutationEvents: import("@sanity/client").MutationEvent[];
                stagedChanges: import("@sanity/mutate/_unstable_machine").MutationGroup[];
                stashedChanges: import("@sanity/mutate/_unstable_machine").MutationGroup[];
                error: unknown;
                fetchRemoteSnapshotAttempts: number;
                submitTransactionsAttempts: number;
            }, import("@sanity/client").ReconnectEvent | import("@sanity/client").WelcomeEvent | import("@sanity/client").MutationEvent | {
                type: "error";
            } | {
                type: "retry";
            } | {
                type: "connect";
            } | {
                type: "reconnect";
            } | {
                type: "welcome";
            } | {
                type: "mutate";
                mutations: import("@sanity/mutate/_unstable_machine").Mutation[];
            } | {
                type: "submit";
            } | {
                type: "xstate.done.actor.getDocument";
                output: import("@sanity/client").SanityDocument<DocumentType>;
            } | {
                type: "xstate.done.actor.submitTransactions";
                output: undefined;
            }, Record<string, import("xstate").AnyActorRef | undefined>, import("xstate").StateValue, string, unknown, any, any>, import("@sanity/client").ReconnectEvent | import("@sanity/client").WelcomeEvent | import("@sanity/client").MutationEvent | {
                type: "error";
            } | {
                type: "retry";
            } | {
                type: "connect";
            } | {
                type: "reconnect";
            } | {
                type: "welcome";
            } | {
                type: "mutate";
                mutations: import("@sanity/mutate/_unstable_machine").Mutation[];
            } | {
                type: "submit";
            } | {
                type: "xstate.done.actor.getDocument";
                output: import("@sanity/client").SanityDocument<DocumentType>;
            } | {
                type: "xstate.done.actor.submitTransactions";
                output: undefined;
            }, import("xstate").AnyEventObject>;
        }) => {
            client: import("@sanity/client").SanityClient;
            sharedListener: import("rxjs").Observable<import("@sanity/client").ReconnectEvent | import("@sanity/client").WelcomeEvent | import("@sanity/client").MutationEvent> | undefined;
            id: string;
            remote: undefined;
            local: undefined;
            mutationEvents: never[];
            stagedChanges: never[];
            stashedChanges: never[];
            error: undefined;
            fetchRemoteSnapshotAttempts: number;
            submitTransactionsAttempts: number;
            cache: Map<string, import("@sanity/client").SanityDocument<DocumentType> | null> | undefined;
        };
        readonly entry: readonly ["connect to server-sent events"];
        readonly on: {
            readonly mutate: {
                readonly actions: readonly ["rebase local snapshot", "stage mutation"];
            };
        };
        readonly initial: "disconnected";
        readonly states: {
            readonly disconnected: {
                readonly on: {
                    readonly connect: {
                        readonly target: "connecting";
                        readonly actions: readonly ["listen to server-sent events"];
                    };
                };
            };
            readonly connecting: {
                readonly on: {
                    readonly welcome: "connected";
                    readonly reconnect: "reconnecting";
                    readonly error: "connectFailure";
                };
                readonly tags: readonly ["busy"];
            };
            readonly connectFailure: {
                readonly on: {
                    readonly connect: {
                        readonly target: "connecting";
                        readonly actions: readonly ["listen to server-sent events"];
                    };
                };
                readonly entry: readonly ["stop listening to server-sent events", "assign error to context"];
                readonly exit: readonly ["clear error from context"];
                readonly tags: readonly ["error"];
            };
            readonly reconnecting: {
                readonly on: {
                    readonly welcome: {
                        readonly target: "connected";
                    };
                    readonly error: {
                        readonly target: "connectFailure";
                    };
                };
                readonly tags: readonly ["busy", "error"];
            };
            readonly connected: {
                readonly on: {
                    readonly mutation: {
                        readonly actions: readonly ["buffer remote mutation events"];
                    };
                    readonly reconnect: "reconnecting";
                };
                readonly entry: readonly ["clear error from context"];
                readonly initial: "loading";
                readonly states: {
                    readonly loading: {
                        readonly invoke: {
                            readonly src: "fetch remote snapshot";
                            readonly id: "getDocument";
                            readonly input: ({ context, }: {
                                context: {
                                    client: import("@sanity/client").SanityClient;
                                    sharedListener?: ReturnType<typeof import("@sanity/mutate/_unstable_machine").createSharedListener>;
                                    id: string;
                                    cache?: Map<string, import("@sanity/client").SanityDocument<DocumentType> | null>;
                                    remote: import("@sanity/client").SanityDocument<DocumentType> | null | undefined;
                                    local: import("@sanity/client").SanityDocument<DocumentType> | null | undefined;
                                    mutationEvents: import("@sanity/client").MutationEvent[];
                                    stagedChanges: import("@sanity/mutate/_unstable_machine").MutationGroup[];
                                    stashedChanges: import("@sanity/mutate/_unstable_machine").MutationGroup[];
                                    error: unknown;
                                    fetchRemoteSnapshotAttempts: number;
                                    submitTransactionsAttempts: number;
                                };
                                event: import("@sanity/client").ReconnectEvent | import("@sanity/client").WelcomeEvent | import("@sanity/client").MutationEvent | {
                                    type: "error";
                                } | {
                                    type: "retry";
                                } | {
                                    type: "connect";
                                } | {
                                    type: "reconnect";
                                } | {
                                    type: "welcome";
                                } | {
                                    type: "mutate";
                                    mutations: import("@sanity/mutate/_unstable_machine").Mutation[];
                                } | {
                                    type: "submit";
                                } | {
                                    type: "xstate.done.actor.getDocument";
                                    output: import("@sanity/client").SanityDocument<DocumentType>;
                                } | {
                                    type: "xstate.done.actor.submitTransactions";
                                    output: undefined;
                                };
                                self: import("xstate").ActorRef<import("xstate").MachineSnapshot<{
                                    client: import("@sanity/client").SanityClient;
                                    sharedListener?: ReturnType<typeof import("@sanity/mutate/_unstable_machine").createSharedListener>;
                                    id: string;
                                    cache?: Map<string, import("@sanity/client").SanityDocument<DocumentType> | null>;
                                    remote: import("@sanity/client").SanityDocument<DocumentType> | null | undefined;
                                    local: import("@sanity/client").SanityDocument<DocumentType> | null | undefined;
                                    mutationEvents: import("@sanity/client").MutationEvent[];
                                    stagedChanges: import("@sanity/mutate/_unstable_machine").MutationGroup[];
                                    stashedChanges: import("@sanity/mutate/_unstable_machine").MutationGroup[];
                                    error: unknown;
                                    fetchRemoteSnapshotAttempts: number;
                                    submitTransactionsAttempts: number;
                                }, import("@sanity/client").ReconnectEvent | import("@sanity/client").WelcomeEvent | import("@sanity/client").MutationEvent | {
                                    type: "error";
                                } | {
                                    type: "retry";
                                } | {
                                    type: "connect";
                                } | {
                                    type: "reconnect";
                                } | {
                                    type: "welcome";
                                } | {
                                    type: "mutate";
                                    mutations: import("@sanity/mutate/_unstable_machine").Mutation[];
                                } | {
                                    type: "submit";
                                } | {
                                    type: "xstate.done.actor.getDocument";
                                    output: import("@sanity/client").SanityDocument<DocumentType>;
                                } | {
                                    type: "xstate.done.actor.submitTransactions";
                                    output: undefined;
                                }, Record<string, import("xstate").AnyActorRef>, import("xstate").StateValue, string, unknown, any, any>, import("@sanity/client").ReconnectEvent | import("@sanity/client").WelcomeEvent | import("@sanity/client").MutationEvent | {
                                    type: "error";
                                } | {
                                    type: "retry";
                                } | {
                                    type: "connect";
                                } | {
                                    type: "reconnect";
                                } | {
                                    type: "welcome";
                                } | {
                                    type: "mutate";
                                    mutations: import("@sanity/mutate/_unstable_machine").Mutation[];
                                } | {
                                    type: "submit";
                                } | {
                                    type: "xstate.done.actor.getDocument";
                                    output: import("@sanity/client").SanityDocument<DocumentType>;
                                } | {
                                    type: "xstate.done.actor.submitTransactions";
                                    output: undefined;
                                }, import("xstate").AnyEventObject>;
                            }) => {
                                client: import("@sanity/client").SanityClient;
                                id: string;
                            };
                            readonly onError: {
                                readonly target: "loadFailure";
                            };
                            readonly onDone: {
                                readonly target: "loaded";
                                readonly actions: readonly ["rebase fetched remote snapshot", "reset fetch attempts"];
                            };
                        };
                        readonly tags: readonly ["busy"];
                    };
                    readonly loaded: {
                        readonly entry: readonly ["send sync event to parent"];
                        readonly on: {
                            readonly mutation: {
                                readonly actions: readonly ["apply mendoza patch", "send mutation event to parent"];
                            };
                        };
                        readonly initial: "pristine";
                        readonly states: {
                            readonly pristine: {
                                readonly on: {
                                    readonly mutate: {
                                        readonly actions: readonly ["rebase local snapshot", "stage mutation"];
                                        readonly target: "dirty";
                                    };
                                };
                                readonly tags: readonly ["ready"];
                            };
                            readonly dirty: {
                                readonly on: {
                                    readonly submit: "submitting";
                                };
                                readonly tags: readonly ["ready"];
                            };
                            readonly submitting: {
                                readonly on: {
                                    readonly mutate: {
                                        readonly actions: readonly ["rebase local snapshot", "stash mutation"];
                                    };
                                };
                                readonly invoke: {
                                    readonly src: "submit mutations as transactions";
                                    readonly id: "submitTransactions";
                                    readonly input: ({ context, }: {
                                        context: {
                                            client: import("@sanity/client").SanityClient;
                                            sharedListener?: ReturnType<typeof import("@sanity/mutate/_unstable_machine").createSharedListener>;
                                            id: string;
                                            cache?: Map<string, import("@sanity/client").SanityDocument<DocumentType> | null>;
                                            remote: import("@sanity/client").SanityDocument<DocumentType> | null | undefined;
                                            local: import("@sanity/client").SanityDocument<DocumentType> | null | undefined;
                                            mutationEvents: import("@sanity/client").MutationEvent[];
                                            stagedChanges: import("@sanity/mutate/_unstable_machine").MutationGroup[];
                                            stashedChanges: import("@sanity/mutate/_unstable_machine").MutationGroup[];
                                            error: unknown;
                                            fetchRemoteSnapshotAttempts: number;
                                            submitTransactionsAttempts: number;
                                        };
                                        event: import("@sanity/client").ReconnectEvent | import("@sanity/client").WelcomeEvent | import("@sanity/client").MutationEvent | {
                                            type: "error";
                                        } | {
                                            type: "retry";
                                        } | {
                                            type: "connect";
                                        } | {
                                            type: "reconnect";
                                        } | {
                                            type: "welcome";
                                        } | {
                                            type: "mutate";
                                            mutations: import("@sanity/mutate/_unstable_machine").Mutation[];
                                        } | {
                                            type: "submit";
                                        } | {
                                            type: "xstate.done.actor.getDocument";
                                            output: import("@sanity/client").SanityDocument<DocumentType>;
                                        } | {
                                            type: "xstate.done.actor.submitTransactions";
                                            output: undefined;
                                        };
                                        self: import("xstate").ActorRef<import("xstate").MachineSnapshot<{
                                            client: import("@sanity/client").SanityClient;
                                            sharedListener?: ReturnType<typeof import("@sanity/mutate/_unstable_machine").createSharedListener>;
                                            id: string;
                                            cache?: Map<string, import("@sanity/client").SanityDocument<DocumentType> | null>;
                                            remote: import("@sanity/client").SanityDocument<DocumentType> | null | undefined;
                                            local: import("@sanity/client").SanityDocument<DocumentType> | null | undefined;
                                            mutationEvents: import("@sanity/client").MutationEvent[];
                                            stagedChanges: import("@sanity/mutate/_unstable_machine").MutationGroup[];
                                            stashedChanges: import("@sanity/mutate/_unstable_machine").MutationGroup[];
                                            error: unknown;
                                            fetchRemoteSnapshotAttempts: number;
                                            submitTransactionsAttempts: number;
                                        }, import("@sanity/client").ReconnectEvent | import("@sanity/client").WelcomeEvent | import("@sanity/client").MutationEvent | {
                                            type: "error";
                                        } | {
                                            type: "retry";
                                        } | {
                                            type: "connect";
                                        } | {
                                            type: "reconnect";
                                        } | {
                                            type: "welcome";
                                        } | {
                                            type: "mutate";
                                            mutations: import("@sanity/mutate/_unstable_machine").Mutation[];
                                        } | {
                                            type: "submit";
                                        } | {
                                            type: "xstate.done.actor.getDocument";
                                            output: import("@sanity/client").SanityDocument<DocumentType>;
                                        } | {
                                            type: "xstate.done.actor.submitTransactions";
                                            output: undefined;
                                        }, Record<string, import("xstate").AnyActorRef>, import("xstate").StateValue, string, unknown, any, any>, import("@sanity/client").ReconnectEvent | import("@sanity/client").WelcomeEvent | import("@sanity/client").MutationEvent | {
                                            type: "error";
                                        } | {
                                            type: "retry";
                                        } | {
                                            type: "connect";
                                        } | {
                                            type: "reconnect";
                                        } | {
                                            type: "welcome";
                                        } | {
                                            type: "mutate";
                                            mutations: import("@sanity/mutate/_unstable_machine").Mutation[];
                                        } | {
                                            type: "submit";
                                        } | {
                                            type: "xstate.done.actor.getDocument";
                                            output: import("@sanity/client").SanityDocument<DocumentType>;
                                        } | {
                                            type: "xstate.done.actor.submitTransactions";
                                            output: undefined;
                                        }, import("xstate").AnyEventObject>;
                                    }) => {
                                        client: import("@sanity/client").SanityClient;
                                        transactions: import("@sanity/mutate/_unstable_machine").Transaction[];
                                    };
                                    readonly onError: {
                                        readonly target: "submitFailure";
                                    };
                                    readonly onDone: {
                                        readonly target: "pristine";
                                        readonly actions: readonly ["restore stashed changes", "reset submit attempts", "send pristine event to parent"];
                                    };
                                };
                                readonly tags: readonly ["busy", "ready"];
                            };
                            readonly submitFailure: {
                                readonly exit: readonly ["clear error from context"];
                                readonly after: {
                                    readonly submitTransactionsTimeout: {
                                        readonly actions: readonly ["increment submit attempts"];
                                        readonly target: "submitting";
                                    };
                                };
                                readonly on: {
                                    readonly retry: "submitting";
                                };
                                readonly tags: readonly ["error", "ready"];
                            };
                        };
                    };
                    readonly loadFailure: {
                        readonly exit: readonly ["clear error from context"];
                        readonly after: {
                            readonly fetchRemoteSnapshotTimeout: {
                                readonly actions: readonly ["increment fetch attempts"];
                                readonly target: "loading";
                            };
                        };
                        readonly on: {
                            readonly retry: "loading";
                        };
                        readonly tags: readonly ["error"];
                    };
                };
            };
        };
    }>> | undefined;
}, "pristine", string, import("xstate").NonReducibleUnknown, import("xstate").MetaObject, {
    readonly id: "dataset-mutator";
    readonly context: ({ input, }: {
        spawn: {
            <TSrc extends "documentMutatorMachine">(logic: TSrc, ...[options]: {
                src: "documentMutatorMachine";
                logic: import("xstate").StateMachine<{
                    client: import("@sanity/client").SanityClient;
                    sharedListener?: ReturnType<typeof import("@sanity/mutate/_unstable_machine").createSharedListener>;
                    id: string;
                    cache?: Map<string, import("@sanity/client").SanityDocument<DocumentType> | null>;
                    remote: import("@sanity/client").SanityDocument<DocumentType> | null | undefined;
                    local: import("@sanity/client").SanityDocument<DocumentType> | null | undefined;
                    mutationEvents: import("@sanity/client").MutationEvent[];
                    stagedChanges: import("@sanity/mutate/_unstable_machine").MutationGroup[];
                    stashedChanges: import("@sanity/mutate/_unstable_machine").MutationGroup[];
                    error: unknown;
                    fetchRemoteSnapshotAttempts: number;
                    submitTransactionsAttempts: number;
                }, import("@sanity/client").WelcomeEvent | import("@sanity/client").ReconnectEvent | import("@sanity/client").MutationEvent | {
                    type: "error";
                } | {
                    type: "retry";
                } | {
                    type: "connect";
                } | {
                    type: "reconnect";
                } | {
                    type: "welcome";
                } | {
                    type: "mutate";
                    mutations: import("@sanity/mutate/_unstable_machine").Mutation[];
                } | {
                    type: "submit";
                } | {
                    type: "xstate.done.actor.getDocument";
                    output: import("@sanity/client").SanityDocument<DocumentType>;
                } | {
                    type: "xstate.done.actor.submitTransactions";
                    output: undefined;
                }, {
                    [x: string]: import("xstate").ActorRefFromLogic<import("xstate").PromiseActorLogic<void | import("@sanity/client").SanityDocument<Record<string, any>> | undefined, {
                        client: import("@sanity/client").SanityClient;
                        id: string;
                    }, import("xstate").EventObject>> | import("xstate").ActorRefFromLogic<import("xstate").PromiseActorLogic<void, {
                        client: import("@sanity/client").SanityClient;
                        transactions: import("@sanity/mutate/_unstable_machine").Transaction[];
                    }, import("xstate").EventObject>> | import("xstate").ActorRefFromLogic<import("xstate").ObservableActorLogic<import("@sanity/client").WelcomeEvent | import("@sanity/client").ReconnectEvent | import("@sanity/client").MutationEvent, {
                        listener: ReturnType<typeof import("@sanity/mutate/_unstable_machine").createSharedListener>;
                        id: string;
                    }, import("xstate").EventObject>> | undefined;
                    getDocument?: import("xstate").ActorRefFromLogic<import("xstate").PromiseActorLogic<void | import("@sanity/client").SanityDocument<Record<string, any>> | undefined, {
                        client: import("@sanity/client").SanityClient;
                        id: string;
                    }, import("xstate").EventObject>> | undefined;
                    submitTransactions?: import("xstate").ActorRefFromLogic<import("xstate").PromiseActorLogic<void, {
                        client: import("@sanity/client").SanityClient;
                        transactions: import("@sanity/mutate/_unstable_machine").Transaction[];
                    }, import("xstate").EventObject>> | undefined;
                }, import("xstate").Values<{
                    "fetch remote snapshot": {
                        src: "fetch remote snapshot";
                        logic: import("xstate").PromiseActorLogic<void | import("@sanity/client").SanityDocument<Record<string, any>> | undefined, {
                            client: import("@sanity/client").SanityClient;
                            id: string;
                        }, import("xstate").EventObject>;
                        id: "getDocument";
                    };
                    "submit mutations as transactions": {
                        src: "submit mutations as transactions";
                        logic: import("xstate").PromiseActorLogic<void, {
                            client: import("@sanity/client").SanityClient;
                            transactions: import("@sanity/mutate/_unstable_machine").Transaction[];
                        }, import("xstate").EventObject>;
                        id: "submitTransactions";
                    };
                    "server-sent events": {
                        src: "server-sent events";
                        logic: import("xstate").ObservableActorLogic<import("@sanity/client").ReconnectEvent | import("@sanity/client").WelcomeEvent | import("@sanity/client").MutationEvent, {
                            listener: ReturnType<typeof import("@sanity/mutate/_unstable_machine").createSharedListener>;
                            id: string;
                        }, import("xstate").EventObject>;
                        id: string | undefined;
                    };
                }>, import("xstate").Values<{
                    "assign error to context": {
                        type: "assign error to context";
                        params: import("xstate").NonReducibleUnknown;
                    };
                    "clear error from context": {
                        type: "clear error from context";
                        params: import("xstate").NonReducibleUnknown;
                    };
                    "connect to server-sent events": {
                        type: "connect to server-sent events";
                        params: import("xstate").NonReducibleUnknown;
                    };
                    "listen to server-sent events": {
                        type: "listen to server-sent events";
                        params: import("xstate").NonReducibleUnknown;
                    };
                    "stop listening to server-sent events": {
                        type: "stop listening to server-sent events";
                        params: import("xstate").NonReducibleUnknown;
                    };
                    "buffer remote mutation events": {
                        type: "buffer remote mutation events";
                        params: import("xstate").NonReducibleUnknown;
                    };
                    "restore stashed changes": {
                        type: "restore stashed changes";
                        params: import("xstate").NonReducibleUnknown;
                    };
                    "rebase fetched remote snapshot": {
                        type: "rebase fetched remote snapshot";
                        params: import("xstate").NonReducibleUnknown;
                    };
                    "apply mendoza patch": {
                        type: "apply mendoza patch";
                        params: import("xstate").NonReducibleUnknown;
                    };
                    "increment fetch attempts": {
                        type: "increment fetch attempts";
                        params: import("xstate").NonReducibleUnknown;
                    };
                    "reset fetch attempts": {
                        type: "reset fetch attempts";
                        params: import("xstate").NonReducibleUnknown;
                    };
                    "increment submit attempts": {
                        type: "increment submit attempts";
                        params: import("xstate").NonReducibleUnknown;
                    };
                    "reset submit attempts": {
                        type: "reset submit attempts";
                        params: import("xstate").NonReducibleUnknown;
                    };
                    "stage mutation": {
                        type: "stage mutation";
                        params: import("xstate").NonReducibleUnknown;
                    };
                    "stash mutation": {
                        type: "stash mutation";
                        params: import("xstate").NonReducibleUnknown;
                    };
                    "rebase local snapshot": {
                        type: "rebase local snapshot";
                        params: import("xstate").NonReducibleUnknown;
                    };
                    "send pristine event to parent": {
                        type: "send pristine event to parent";
                        params: import("xstate").NonReducibleUnknown;
                    };
                    "send sync event to parent": {
                        type: "send sync event to parent";
                        params: import("xstate").NonReducibleUnknown;
                    };
                    "send mutation event to parent": {
                        type: "send mutation event to parent";
                        params: import("xstate").NonReducibleUnknown;
                    };
                }>, never, "fetchRemoteSnapshotTimeout" | "submitTransactionsTimeout", "disconnected" | "connecting" | "reconnecting" | "connectFailure" | {
                    connected: "loading" | "loadFailure" | {
                        loaded: "pristine" | "dirty" | "submitting" | "submitFailure";
                    };
                }, "error" | "busy" | "ready", import("@sanity/mutate/_unstable_machine").DocumentMutatorMachineInput, import("xstate").NonReducibleUnknown, import("xstate").EventObject, import("xstate").MetaObject, {
                    readonly id: "document-mutator";
                    readonly context: ({ input, }: {
                        spawn: {
                            <TSrc_1 extends "fetch remote snapshot" | "submit mutations as transactions" | "server-sent events">(logic: TSrc_1, ...[options]: ({
                                src: "fetch remote snapshot";
                                logic: import("xstate").PromiseActorLogic<void | import("@sanity/client").SanityDocument<Record<string, any>> | undefined, {
                                    client: import("@sanity/client").SanityClient;
                                    id: string;
                                }, import("xstate").EventObject>;
                                id: "getDocument";
                            } extends infer T ? T extends {
                                src: "fetch remote snapshot";
                                logic: import("xstate").PromiseActorLogic<void | import("@sanity/client").SanityDocument<Record<string, any>> | undefined, {
                                    client: import("@sanity/client").SanityClient;
                                    id: string;
                                }, import("xstate").EventObject>;
                                id: "getDocument";
                            } ? T extends {
                                src: TSrc_1;
                            } ? import("xstate").ConditionalRequired<[options?: ({
                                id?: T["id"] | undefined;
                                systemId?: string;
                                input?: import("xstate").InputFrom<T["logic"]> | undefined;
                                syncSnapshot?: boolean;
                            } & { [K in import("xstate").RequiredActorOptions<T>]: unknown; }) | undefined], import("xstate").IsNotNever<import("xstate").RequiredActorOptions<T>>> : never : never : never) | ({
                                src: "submit mutations as transactions";
                                logic: import("xstate").PromiseActorLogic<void, {
                                    client: import("@sanity/client").SanityClient;
                                    transactions: import("@sanity/mutate/_unstable_machine").Transaction[];
                                }, import("xstate").EventObject>;
                                id: "submitTransactions";
                            } extends infer T_1 ? T_1 extends {
                                src: "submit mutations as transactions";
                                logic: import("xstate").PromiseActorLogic<void, {
                                    client: import("@sanity/client").SanityClient;
                                    transactions: import("@sanity/mutate/_unstable_machine").Transaction[];
                                }, import("xstate").EventObject>;
                                id: "submitTransactions";
                            } ? T_1 extends {
                                src: TSrc_1;
                            } ? import("xstate").ConditionalRequired<[options?: ({
                                id?: T_1["id"] | undefined;
                                systemId?: string;
                                input?: import("xstate").InputFrom<T_1["logic"]> | undefined;
                                syncSnapshot?: boolean;
                            } & { [K_1 in import("xstate").RequiredActorOptions<T_1>]: unknown; }) | undefined], import("xstate").IsNotNever<import("xstate").RequiredActorOptions<T_1>>> : never : never : never) | ({
                                src: "server-sent events";
                                logic: import("xstate").ObservableActorLogic<import("@sanity/client").ReconnectEvent | import("@sanity/client").WelcomeEvent | import("@sanity/client").MutationEvent, {
                                    listener: ReturnType<typeof import("@sanity/mutate/_unstable_machine").createSharedListener>;
                                    id: string;
                                }, import("xstate").EventObject>;
                                id: string | undefined;
                            } extends infer T_2 ? T_2 extends {
                                src: "server-sent events";
                                logic: import("xstate").ObservableActorLogic<import("@sanity/client").ReconnectEvent | import("@sanity/client").WelcomeEvent | import("@sanity/client").MutationEvent, {
                                    listener: ReturnType<typeof import("@sanity/mutate/_unstable_machine").createSharedListener>;
                                    id: string;
                                }, import("xstate").EventObject>;
                                id: string | undefined;
                            } ? T_2 extends {
                                src: TSrc_1;
                            } ? import("xstate").ConditionalRequired<[options?: ({
                                id?: T_2["id"] | undefined;
                                systemId?: string;
                                input?: import("xstate").InputFrom<T_2["logic"]> | undefined;
                                syncSnapshot?: boolean;
                            } & { [K_2 in import("xstate").RequiredActorOptions<T_2>]: unknown; }) | undefined], import("xstate").IsNotNever<import("xstate").RequiredActorOptions<T_2>>> : never : never : never)): import("xstate").ActorRefFromLogic<import("xstate").GetConcreteByKey<import("xstate").Values<{
                                "fetch remote snapshot": {
                                    src: "fetch remote snapshot";
                                    logic: import("xstate").PromiseActorLogic<void | import("@sanity/client").SanityDocument<Record<string, any>> | undefined, {
                                        client: import("@sanity/client").SanityClient;
                                        id: string;
                                    }, import("xstate").EventObject>;
                                    id: "getDocument";
                                };
                                "submit mutations as transactions": {
                                    src: "submit mutations as transactions";
                                    logic: import("xstate").PromiseActorLogic<void, {
                                        client: import("@sanity/client").SanityClient;
                                        transactions: import("@sanity/mutate/_unstable_machine").Transaction[];
                                    }, import("xstate").EventObject>;
                                    id: "submitTransactions";
                                };
                                "server-sent events": {
                                    src: "server-sent events";
                                    logic: import("xstate").ObservableActorLogic<import("@sanity/client").ReconnectEvent | import("@sanity/client").WelcomeEvent | import("@sanity/client").MutationEvent, {
                                        listener: ReturnType<typeof import("@sanity/mutate/_unstable_machine").createSharedListener>;
                                        id: string;
                                    }, import("xstate").EventObject>;
                                    id: string | undefined;
                                };
                            }>, "src", TSrc_1>["logic"]>;
                            <TLogic extends import("xstate").AnyActorLogic>(src: TLogic, options?: {
                                id?: never;
                                systemId?: string;
                                input?: import("xstate").InputFrom<TLogic> | undefined;
                                syncSnapshot?: boolean;
                            } | undefined): import("xstate").ActorRefFromLogic<TLogic>;
                        };
                        input: import("@sanity/mutate/_unstable_machine").DocumentMutatorMachineInput;
                        self: import("xstate").ActorRef<import("xstate").MachineSnapshot<{
                            client: import("@sanity/client").SanityClient;
                            sharedListener?: ReturnType<typeof import("@sanity/mutate/_unstable_machine").createSharedListener>;
                            id: string;
                            cache?: Map<string, import("@sanity/client").SanityDocument<DocumentType> | null>;
                            remote: import("@sanity/client").SanityDocument<DocumentType> | null | undefined;
                            local: import("@sanity/client").SanityDocument<DocumentType> | null | undefined;
                            mutationEvents: import("@sanity/client").MutationEvent[];
                            stagedChanges: import("@sanity/mutate/_unstable_machine").MutationGroup[];
                            stashedChanges: import("@sanity/mutate/_unstable_machine").MutationGroup[];
                            error: unknown;
                            fetchRemoteSnapshotAttempts: number;
                            submitTransactionsAttempts: number;
                        }, import("@sanity/client").ReconnectEvent | import("@sanity/client").WelcomeEvent | import("@sanity/client").MutationEvent | {
                            type: "error";
                        } | {
                            type: "retry";
                        } | {
                            type: "connect";
                        } | {
                            type: "reconnect";
                        } | {
                            type: "welcome";
                        } | {
                            type: "mutate";
                            mutations: import("@sanity/mutate/_unstable_machine").Mutation[];
                        } | {
                            type: "submit";
                        } | {
                            type: "xstate.done.actor.getDocument";
                            output: import("@sanity/client").SanityDocument<DocumentType>;
                        } | {
                            type: "xstate.done.actor.submitTransactions";
                            output: undefined;
                        }, Record<string, import("xstate").AnyActorRef | undefined>, import("xstate").StateValue, string, unknown, any, any>, import("@sanity/client").ReconnectEvent | import("@sanity/client").WelcomeEvent | import("@sanity/client").MutationEvent | {
                            type: "error";
                        } | {
                            type: "retry";
                        } | {
                            type: "connect";
                        } | {
                            type: "reconnect";
                        } | {
                            type: "welcome";
                        } | {
                            type: "mutate";
                            mutations: import("@sanity/mutate/_unstable_machine").Mutation[];
                        } | {
                            type: "submit";
                        } | {
                            type: "xstate.done.actor.getDocument";
                            output: import("@sanity/client").SanityDocument<DocumentType>;
                        } | {
                            type: "xstate.done.actor.submitTransactions";
                            output: undefined;
                        }, import("xstate").AnyEventObject>;
                    }) => {
                        client: import("@sanity/client").SanityClient;
                        sharedListener: import("rxjs").Observable<import("@sanity/client").ReconnectEvent | import("@sanity/client").WelcomeEvent | import("@sanity/client").MutationEvent> | undefined;
                        id: string;
                        remote: undefined;
                        local: undefined;
                        mutationEvents: never[];
                        stagedChanges: never[];
                        stashedChanges: never[];
                        error: undefined;
                        fetchRemoteSnapshotAttempts: number;
                        submitTransactionsAttempts: number;
                        cache: Map<string, import("@sanity/client").SanityDocument<DocumentType> | null> | undefined;
                    };
                    readonly entry: readonly ["connect to server-sent events"];
                    readonly on: {
                        readonly mutate: {
                            readonly actions: readonly ["rebase local snapshot", "stage mutation"];
                        };
                    };
                    readonly initial: "disconnected";
                    readonly states: {
                        readonly disconnected: {
                            readonly on: {
                                readonly connect: {
                                    readonly target: "connecting";
                                    readonly actions: readonly ["listen to server-sent events"];
                                };
                            };
                        };
                        readonly connecting: {
                            readonly on: {
                                readonly welcome: "connected";
                                readonly reconnect: "reconnecting";
                                readonly error: "connectFailure";
                            };
                            readonly tags: readonly ["busy"];
                        };
                        readonly connectFailure: {
                            readonly on: {
                                readonly connect: {
                                    readonly target: "connecting";
                                    readonly actions: readonly ["listen to server-sent events"];
                                };
                            };
                            readonly entry: readonly ["stop listening to server-sent events", "assign error to context"];
                            readonly exit: readonly ["clear error from context"];
                            readonly tags: readonly ["error"];
                        };
                        readonly reconnecting: {
                            readonly on: {
                                readonly welcome: {
                                    readonly target: "connected";
                                };
                                readonly error: {
                                    readonly target: "connectFailure";
                                };
                            };
                            readonly tags: readonly ["busy", "error"];
                        };
                        readonly connected: {
                            readonly on: {
                                readonly mutation: {
                                    readonly actions: readonly ["buffer remote mutation events"];
                                };
                                readonly reconnect: "reconnecting";
                            };
                            readonly entry: readonly ["clear error from context"];
                            readonly initial: "loading";
                            readonly states: {
                                readonly loading: {
                                    readonly invoke: {
                                        readonly src: "fetch remote snapshot";
                                        readonly id: "getDocument";
                                        readonly input: ({ context, }: {
                                            context: {
                                                client: import("@sanity/client").SanityClient;
                                                sharedListener?: ReturnType<typeof import("@sanity/mutate/_unstable_machine").createSharedListener>;
                                                id: string;
                                                cache?: Map<string, import("@sanity/client").SanityDocument<DocumentType> | null>;
                                                remote: import("@sanity/client").SanityDocument<DocumentType> | null | undefined;
                                                local: import("@sanity/client").SanityDocument<DocumentType> | null | undefined;
                                                mutationEvents: import("@sanity/client").MutationEvent[];
                                                stagedChanges: import("@sanity/mutate/_unstable_machine").MutationGroup[];
                                                stashedChanges: import("@sanity/mutate/_unstable_machine").MutationGroup[];
                                                error: unknown;
                                                fetchRemoteSnapshotAttempts: number;
                                                submitTransactionsAttempts: number;
                                            };
                                            event: import("@sanity/client").ReconnectEvent | import("@sanity/client").WelcomeEvent | import("@sanity/client").MutationEvent | {
                                                type: "error";
                                            } | {
                                                type: "retry";
                                            } | {
                                                type: "connect";
                                            } | {
                                                type: "reconnect";
                                            } | {
                                                type: "welcome";
                                            } | {
                                                type: "mutate";
                                                mutations: import("@sanity/mutate/_unstable_machine").Mutation[];
                                            } | {
                                                type: "submit";
                                            } | {
                                                type: "xstate.done.actor.getDocument";
                                                output: import("@sanity/client").SanityDocument<DocumentType>;
                                            } | {
                                                type: "xstate.done.actor.submitTransactions";
                                                output: undefined;
                                            };
                                            self: import("xstate").ActorRef<import("xstate").MachineSnapshot<{
                                                client: import("@sanity/client").SanityClient;
                                                sharedListener?: ReturnType<typeof import("@sanity/mutate/_unstable_machine").createSharedListener>;
                                                id: string;
                                                cache?: Map<string, import("@sanity/client").SanityDocument<DocumentType> | null>;
                                                remote: import("@sanity/client").SanityDocument<DocumentType> | null | undefined;
                                                local: import("@sanity/client").SanityDocument<DocumentType> | null | undefined;
                                                mutationEvents: import("@sanity/client").MutationEvent[];
                                                stagedChanges: import("@sanity/mutate/_unstable_machine").MutationGroup[];
                                                stashedChanges: import("@sanity/mutate/_unstable_machine").MutationGroup[];
                                                error: unknown;
                                                fetchRemoteSnapshotAttempts: number;
                                                submitTransactionsAttempts: number;
                                            }, import("@sanity/client").ReconnectEvent | import("@sanity/client").WelcomeEvent | import("@sanity/client").MutationEvent | {
                                                type: "error";
                                            } | {
                                                type: "retry";
                                            } | {
                                                type: "connect";
                                            } | {
                                                type: "reconnect";
                                            } | {
                                                type: "welcome";
                                            } | {
                                                type: "mutate";
                                                mutations: import("@sanity/mutate/_unstable_machine").Mutation[];
                                            } | {
                                                type: "submit";
                                            } | {
                                                type: "xstate.done.actor.getDocument";
                                                output: import("@sanity/client").SanityDocument<DocumentType>;
                                            } | {
                                                type: "xstate.done.actor.submitTransactions";
                                                output: undefined;
                                            }, Record<string, import("xstate").AnyActorRef>, import("xstate").StateValue, string, unknown, any, any>, import("@sanity/client").ReconnectEvent | import("@sanity/client").WelcomeEvent | import("@sanity/client").MutationEvent | {
                                                type: "error";
                                            } | {
                                                type: "retry";
                                            } | {
                                                type: "connect";
                                            } | {
                                                type: "reconnect";
                                            } | {
                                                type: "welcome";
                                            } | {
                                                type: "mutate";
                                                mutations: import("@sanity/mutate/_unstable_machine").Mutation[];
                                            } | {
                                                type: "submit";
                                            } | {
                                                type: "xstate.done.actor.getDocument";
                                                output: import("@sanity/client").SanityDocument<DocumentType>;
                                            } | {
                                                type: "xstate.done.actor.submitTransactions";
                                                output: undefined;
                                            }, import("xstate").AnyEventObject>;
                                        }) => {
                                            client: import("@sanity/client").SanityClient;
                                            id: string;
                                        };
                                        readonly onError: {
                                            readonly target: "loadFailure";
                                        };
                                        readonly onDone: {
                                            readonly target: "loaded";
                                            readonly actions: readonly ["rebase fetched remote snapshot", "reset fetch attempts"];
                                        };
                                    };
                                    readonly tags: readonly ["busy"];
                                };
                                readonly loaded: {
                                    readonly entry: readonly ["send sync event to parent"];
                                    readonly on: {
                                        readonly mutation: {
                                            readonly actions: readonly ["apply mendoza patch", "send mutation event to parent"];
                                        };
                                    };
                                    readonly initial: "pristine";
                                    readonly states: {
                                        readonly pristine: {
                                            readonly on: {
                                                readonly mutate: {
                                                    readonly actions: readonly ["rebase local snapshot", "stage mutation"];
                                                    readonly target: "dirty";
                                                };
                                            };
                                            readonly tags: readonly ["ready"];
                                        };
                                        readonly dirty: {
                                            readonly on: {
                                                readonly submit: "submitting";
                                            };
                                            readonly tags: readonly ["ready"];
                                        };
                                        readonly submitting: {
                                            readonly on: {
                                                readonly mutate: {
                                                    readonly actions: readonly ["rebase local snapshot", "stash mutation"];
                                                };
                                            };
                                            readonly invoke: {
                                                readonly src: "submit mutations as transactions";
                                                readonly id: "submitTransactions";
                                                readonly input: ({ context, }: {
                                                    context: {
                                                        client: import("@sanity/client").SanityClient;
                                                        sharedListener?: ReturnType<typeof import("@sanity/mutate/_unstable_machine").createSharedListener>;
                                                        id: string;
                                                        cache?: Map<string, import("@sanity/client").SanityDocument<DocumentType> | null>;
                                                        remote: import("@sanity/client").SanityDocument<DocumentType> | null | undefined;
                                                        local: import("@sanity/client").SanityDocument<DocumentType> | null | undefined;
                                                        mutationEvents: import("@sanity/client").MutationEvent[];
                                                        stagedChanges: import("@sanity/mutate/_unstable_machine").MutationGroup[];
                                                        stashedChanges: import("@sanity/mutate/_unstable_machine").MutationGroup[];
                                                        error: unknown;
                                                        fetchRemoteSnapshotAttempts: number;
                                                        submitTransactionsAttempts: number;
                                                    };
                                                    event: import("@sanity/client").ReconnectEvent | import("@sanity/client").WelcomeEvent | import("@sanity/client").MutationEvent | {
                                                        type: "error";
                                                    } | {
                                                        type: "retry";
                                                    } | {
                                                        type: "connect";
                                                    } | {
                                                        type: "reconnect";
                                                    } | {
                                                        type: "welcome";
                                                    } | {
                                                        type: "mutate";
                                                        mutations: import("@sanity/mutate/_unstable_machine").Mutation[];
                                                    } | {
                                                        type: "submit";
                                                    } | {
                                                        type: "xstate.done.actor.getDocument";
                                                        output: import("@sanity/client").SanityDocument<DocumentType>;
                                                    } | {
                                                        type: "xstate.done.actor.submitTransactions";
                                                        output: undefined;
                                                    };
                                                    self: import("xstate").ActorRef<import("xstate").MachineSnapshot<{
                                                        client: import("@sanity/client").SanityClient;
                                                        sharedListener?: ReturnType<typeof import("@sanity/mutate/_unstable_machine").createSharedListener>;
                                                        id: string;
                                                        cache?: Map<string, import("@sanity/client").SanityDocument<DocumentType> | null>;
                                                        remote: import("@sanity/client").SanityDocument<DocumentType> | null | undefined;
                                                        local: import("@sanity/client").SanityDocument<DocumentType> | null | undefined;
                                                        mutationEvents: import("@sanity/client").MutationEvent[];
                                                        stagedChanges: import("@sanity/mutate/_unstable_machine").MutationGroup[];
                                                        stashedChanges: import("@sanity/mutate/_unstable_machine").MutationGroup[];
                                                        error: unknown;
                                                        fetchRemoteSnapshotAttempts: number;
                                                        submitTransactionsAttempts: number;
                                                    }, import("@sanity/client").ReconnectEvent | import("@sanity/client").WelcomeEvent | import("@sanity/client").MutationEvent | {
                                                        type: "error";
                                                    } | {
                                                        type: "retry";
                                                    } | {
                                                        type: "connect";
                                                    } | {
                                                        type: "reconnect";
                                                    } | {
                                                        type: "welcome";
                                                    } | {
                                                        type: "mutate";
                                                        mutations: import("@sanity/mutate/_unstable_machine").Mutation[];
                                                    } | {
                                                        type: "submit";
                                                    } | {
                                                        type: "xstate.done.actor.getDocument";
                                                        output: import("@sanity/client").SanityDocument<DocumentType>;
                                                    } | {
                                                        type: "xstate.done.actor.submitTransactions";
                                                        output: undefined;
                                                    }, Record<string, import("xstate").AnyActorRef>, import("xstate").StateValue, string, unknown, any, any>, import("@sanity/client").ReconnectEvent | import("@sanity/client").WelcomeEvent | import("@sanity/client").MutationEvent | {
                                                        type: "error";
                                                    } | {
                                                        type: "retry";
                                                    } | {
                                                        type: "connect";
                                                    } | {
                                                        type: "reconnect";
                                                    } | {
                                                        type: "welcome";
                                                    } | {
                                                        type: "mutate";
                                                        mutations: import("@sanity/mutate/_unstable_machine").Mutation[];
                                                    } | {
                                                        type: "submit";
                                                    } | {
                                                        type: "xstate.done.actor.getDocument";
                                                        output: import("@sanity/client").SanityDocument<DocumentType>;
                                                    } | {
                                                        type: "xstate.done.actor.submitTransactions";
                                                        output: undefined;
                                                    }, import("xstate").AnyEventObject>;
                                                }) => {
                                                    client: import("@sanity/client").SanityClient;
                                                    transactions: import("@sanity/mutate/_unstable_machine").Transaction[];
                                                };
                                                readonly onError: {
                                                    readonly target: "submitFailure";
                                                };
                                                readonly onDone: {
                                                    readonly target: "pristine";
                                                    readonly actions: readonly ["restore stashed changes", "reset submit attempts", "send pristine event to parent"];
                                                };
                                            };
                                            readonly tags: readonly ["busy", "ready"];
                                        };
                                        readonly submitFailure: {
                                            readonly exit: readonly ["clear error from context"];
                                            readonly after: {
                                                readonly submitTransactionsTimeout: {
                                                    readonly actions: readonly ["increment submit attempts"];
                                                    readonly target: "submitting";
                                                };
                                            };
                                            readonly on: {
                                                readonly retry: "submitting";
                                            };
                                            readonly tags: readonly ["error", "ready"];
                                        };
                                    };
                                };
                                readonly loadFailure: {
                                    readonly exit: readonly ["clear error from context"];
                                    readonly after: {
                                        readonly fetchRemoteSnapshotTimeout: {
                                            readonly actions: readonly ["increment fetch attempts"];
                                            readonly target: "loading";
                                        };
                                    };
                                    readonly on: {
                                        readonly retry: "loading";
                                    };
                                    readonly tags: readonly ["error"];
                                };
                            };
                        };
                    };
                }>;
                id: string | undefined;
            } extends infer T ? T extends {
                src: "documentMutatorMachine";
                logic: import("xstate").StateMachine<{
                    client: import("@sanity/client").SanityClient;
                    sharedListener?: ReturnType<typeof import("@sanity/mutate/_unstable_machine").createSharedListener>;
                    id: string;
                    cache?: Map<string, import("@sanity/client").SanityDocument<DocumentType> | null>;
                    remote: import("@sanity/client").SanityDocument<DocumentType> | null | undefined;
                    local: import("@sanity/client").SanityDocument<DocumentType> | null | undefined;
                    mutationEvents: import("@sanity/client").MutationEvent[];
                    stagedChanges: import("@sanity/mutate/_unstable_machine").MutationGroup[];
                    stashedChanges: import("@sanity/mutate/_unstable_machine").MutationGroup[];
                    error: unknown;
                    fetchRemoteSnapshotAttempts: number;
                    submitTransactionsAttempts: number;
                }, import("@sanity/client").WelcomeEvent | import("@sanity/client").ReconnectEvent | import("@sanity/client").MutationEvent | {
                    type: "error";
                } | {
                    type: "retry";
                } | {
                    type: "connect";
                } | {
                    type: "reconnect";
                } | {
                    type: "welcome";
                } | {
                    type: "mutate";
                    mutations: import("@sanity/mutate/_unstable_machine").Mutation[];
                } | {
                    type: "submit";
                } | {
                    type: "xstate.done.actor.getDocument";
                    output: import("@sanity/client").SanityDocument<DocumentType>;
                } | {
                    type: "xstate.done.actor.submitTransactions";
                    output: undefined;
                }, {
                    [x: string]: import("xstate").ActorRefFromLogic<import("xstate").PromiseActorLogic<void | import("@sanity/client").SanityDocument<Record<string, any>> | undefined, {
                        client: import("@sanity/client").SanityClient;
                        id: string;
                    }, import("xstate").EventObject>> | import("xstate").ActorRefFromLogic<import("xstate").PromiseActorLogic<void, {
                        client: import("@sanity/client").SanityClient;
                        transactions: import("@sanity/mutate/_unstable_machine").Transaction[];
                    }, import("xstate").EventObject>> | import("xstate").ActorRefFromLogic<import("xstate").ObservableActorLogic<import("@sanity/client").WelcomeEvent | import("@sanity/client").ReconnectEvent | import("@sanity/client").MutationEvent, {
                        listener: ReturnType<typeof import("@sanity/mutate/_unstable_machine").createSharedListener>;
                        id: string;
                    }, import("xstate").EventObject>> | undefined;
                    getDocument?: import("xstate").ActorRefFromLogic<import("xstate").PromiseActorLogic<void | import("@sanity/client").SanityDocument<Record<string, any>> | undefined, {
                        client: import("@sanity/client").SanityClient;
                        id: string;
                    }, import("xstate").EventObject>> | undefined;
                    submitTransactions?: import("xstate").ActorRefFromLogic<import("xstate").PromiseActorLogic<void, {
                        client: import("@sanity/client").SanityClient;
                        transactions: import("@sanity/mutate/_unstable_machine").Transaction[];
                    }, import("xstate").EventObject>> | undefined;
                }, import("xstate").Values<{
                    "fetch remote snapshot": {
                        src: "fetch remote snapshot";
                        logic: import("xstate").PromiseActorLogic<void | import("@sanity/client").SanityDocument<Record<string, any>> | undefined, {
                            client: import("@sanity/client").SanityClient;
                            id: string;
                        }, import("xstate").EventObject>;
                        id: "getDocument";
                    };
                    "submit mutations as transactions": {
                        src: "submit mutations as transactions";
                        logic: import("xstate").PromiseActorLogic<void, {
                            client: import("@sanity/client").SanityClient;
                            transactions: import("@sanity/mutate/_unstable_machine").Transaction[];
                        }, import("xstate").EventObject>;
                        id: "submitTransactions";
                    };
                    "server-sent events": {
                        src: "server-sent events";
                        logic: import("xstate").ObservableActorLogic<import("@sanity/client").ReconnectEvent | import("@sanity/client").WelcomeEvent | import("@sanity/client").MutationEvent, {
                            listener: ReturnType<typeof import("@sanity/mutate/_unstable_machine").createSharedListener>;
                            id: string;
                        }, import("xstate").EventObject>;
                        id: string | undefined;
                    };
                }>, import("xstate").Values<{
                    "assign error to context": {
                        type: "assign error to context";
                        params: import("xstate").NonReducibleUnknown;
                    };
                    "clear error from context": {
                        type: "clear error from context";
                        params: import("xstate").NonReducibleUnknown;
                    };
                    "connect to server-sent events": {
                        type: "connect to server-sent events";
                        params: import("xstate").NonReducibleUnknown;
                    };
                    "listen to server-sent events": {
                        type: "listen to server-sent events";
                        params: import("xstate").NonReducibleUnknown;
                    };
                    "stop listening to server-sent events": {
                        type: "stop listening to server-sent events";
                        params: import("xstate").NonReducibleUnknown;
                    };
                    "buffer remote mutation events": {
                        type: "buffer remote mutation events";
                        params: import("xstate").NonReducibleUnknown;
                    };
                    "restore stashed changes": {
                        type: "restore stashed changes";
                        params: import("xstate").NonReducibleUnknown;
                    };
                    "rebase fetched remote snapshot": {
                        type: "rebase fetched remote snapshot";
                        params: import("xstate").NonReducibleUnknown;
                    };
                    "apply mendoza patch": {
                        type: "apply mendoza patch";
                        params: import("xstate").NonReducibleUnknown;
                    };
                    "increment fetch attempts": {
                        type: "increment fetch attempts";
                        params: import("xstate").NonReducibleUnknown;
                    };
                    "reset fetch attempts": {
                        type: "reset fetch attempts";
                        params: import("xstate").NonReducibleUnknown;
                    };
                    "increment submit attempts": {
                        type: "increment submit attempts";
                        params: import("xstate").NonReducibleUnknown;
                    };
                    "reset submit attempts": {
                        type: "reset submit attempts";
                        params: import("xstate").NonReducibleUnknown;
                    };
                    "stage mutation": {
                        type: "stage mutation";
                        params: import("xstate").NonReducibleUnknown;
                    };
                    "stash mutation": {
                        type: "stash mutation";
                        params: import("xstate").NonReducibleUnknown;
                    };
                    "rebase local snapshot": {
                        type: "rebase local snapshot";
                        params: import("xstate").NonReducibleUnknown;
                    };
                    "send pristine event to parent": {
                        type: "send pristine event to parent";
                        params: import("xstate").NonReducibleUnknown;
                    };
                    "send sync event to parent": {
                        type: "send sync event to parent";
                        params: import("xstate").NonReducibleUnknown;
                    };
                    "send mutation event to parent": {
                        type: "send mutation event to parent";
                        params: import("xstate").NonReducibleUnknown;
                    };
                }>, never, "fetchRemoteSnapshotTimeout" | "submitTransactionsTimeout", "disconnected" | "connecting" | "reconnecting" | "connectFailure" | {
                    connected: "loading" | "loadFailure" | {
                        loaded: "pristine" | "dirty" | "submitting" | "submitFailure";
                    };
                }, "error" | "busy" | "ready", import("@sanity/mutate/_unstable_machine").DocumentMutatorMachineInput, import("xstate").NonReducibleUnknown, import("xstate").EventObject, import("xstate").MetaObject, {
                    readonly id: "document-mutator";
                    readonly context: ({ input, }: {
                        spawn: {
                            <TSrc_1 extends "fetch remote snapshot" | "submit mutations as transactions" | "server-sent events">(logic: TSrc_1, ...[options]: ({
                                src: "fetch remote snapshot";
                                logic: import("xstate").PromiseActorLogic<void | import("@sanity/client").SanityDocument<Record<string, any>> | undefined, {
                                    client: import("@sanity/client").SanityClient;
                                    id: string;
                                }, import("xstate").EventObject>;
                                id: "getDocument";
                            } extends infer T_1 ? T_1 extends {
                                src: "fetch remote snapshot";
                                logic: import("xstate").PromiseActorLogic<void | import("@sanity/client").SanityDocument<Record<string, any>> | undefined, {
                                    client: import("@sanity/client").SanityClient;
                                    id: string;
                                }, import("xstate").EventObject>;
                                id: "getDocument";
                            } ? T_1 extends {
                                src: TSrc_1;
                            } ? import("xstate").ConditionalRequired<[options?: ({
                                id?: T_1["id"] | undefined;
                                systemId?: string;
                                input?: import("xstate").InputFrom<T_1["logic"]> | undefined;
                                syncSnapshot?: boolean;
                            } & { [K_1 in import("xstate").RequiredActorOptions<T_1>]: unknown; }) | undefined], import("xstate").IsNotNever<import("xstate").RequiredActorOptions<T_1>>> : never : never : never) | ({
                                src: "submit mutations as transactions";
                                logic: import("xstate").PromiseActorLogic<void, {
                                    client: import("@sanity/client").SanityClient;
                                    transactions: import("@sanity/mutate/_unstable_machine").Transaction[];
                                }, import("xstate").EventObject>;
                                id: "submitTransactions";
                            } extends infer T_1 ? T_1 extends {
                                src: "submit mutations as transactions";
                                logic: import("xstate").PromiseActorLogic<void, {
                                    client: import("@sanity/client").SanityClient;
                                    transactions: import("@sanity/mutate/_unstable_machine").Transaction[];
                                }, import("xstate").EventObject>;
                                id: "submitTransactions";
                            } ? T_1 extends {
                                src: TSrc_1;
                            } ? import("xstate").ConditionalRequired<[options?: ({
                                id?: T_1["id"] | undefined;
                                systemId?: string;
                                input?: import("xstate").InputFrom<T_1["logic"]> | undefined;
                                syncSnapshot?: boolean;
                            } & { [K_1 in import("xstate").RequiredActorOptions<T_1>]: unknown; }) | undefined], import("xstate").IsNotNever<import("xstate").RequiredActorOptions<T_1>>> : never : never : never) | ({
                                src: "server-sent events";
                                logic: import("xstate").ObservableActorLogic<import("@sanity/client").ReconnectEvent | import("@sanity/client").WelcomeEvent | import("@sanity/client").MutationEvent, {
                                    listener: ReturnType<typeof import("@sanity/mutate/_unstable_machine").createSharedListener>;
                                    id: string;
                                }, import("xstate").EventObject>;
                                id: string | undefined;
                            } extends infer T_2 ? T_2 extends {
                                src: "server-sent events";
                                logic: import("xstate").ObservableActorLogic<import("@sanity/client").ReconnectEvent | import("@sanity/client").WelcomeEvent | import("@sanity/client").MutationEvent, {
                                    listener: ReturnType<typeof import("@sanity/mutate/_unstable_machine").createSharedListener>;
                                    id: string;
                                }, import("xstate").EventObject>;
                                id: string | undefined;
                            } ? T_2 extends {
                                src: TSrc_1;
                            } ? import("xstate").ConditionalRequired<[options?: ({
                                id?: T_2["id"] | undefined;
                                systemId?: string;
                                input?: import("xstate").InputFrom<T_2["logic"]> | undefined;
                                syncSnapshot?: boolean;
                            } & { [K_2 in import("xstate").RequiredActorOptions<T_2>]: unknown; }) | undefined], import("xstate").IsNotNever<import("xstate").RequiredActorOptions<T_2>>> : never : never : never)): import("xstate").ActorRefFromLogic<import("xstate").GetConcreteByKey<import("xstate").Values<{
                                "fetch remote snapshot": {
                                    src: "fetch remote snapshot";
                                    logic: import("xstate").PromiseActorLogic<void | import("@sanity/client").SanityDocument<Record<string, any>> | undefined, {
                                        client: import("@sanity/client").SanityClient;
                                        id: string;
                                    }, import("xstate").EventObject>;
                                    id: "getDocument";
                                };
                                "submit mutations as transactions": {
                                    src: "submit mutations as transactions";
                                    logic: import("xstate").PromiseActorLogic<void, {
                                        client: import("@sanity/client").SanityClient;
                                        transactions: import("@sanity/mutate/_unstable_machine").Transaction[];
                                    }, import("xstate").EventObject>;
                                    id: "submitTransactions";
                                };
                                "server-sent events": {
                                    src: "server-sent events";
                                    logic: import("xstate").ObservableActorLogic<import("@sanity/client").ReconnectEvent | import("@sanity/client").WelcomeEvent | import("@sanity/client").MutationEvent, {
                                        listener: ReturnType<typeof import("@sanity/mutate/_unstable_machine").createSharedListener>;
                                        id: string;
                                    }, import("xstate").EventObject>;
                                    id: string | undefined;
                                };
                            }>, "src", TSrc_1>["logic"]>;
                            <TLogic extends import("xstate").AnyActorLogic>(src: TLogic, options?: {
                                id?: never;
                                systemId?: string;
                                input?: import("xstate").InputFrom<TLogic> | undefined;
                                syncSnapshot?: boolean;
                            } | undefined): import("xstate").ActorRefFromLogic<TLogic>;
                        };
                        input: import("@sanity/mutate/_unstable_machine").DocumentMutatorMachineInput;
                        self: import("xstate").ActorRef<import("xstate").MachineSnapshot<{
                            client: import("@sanity/client").SanityClient;
                            sharedListener?: ReturnType<typeof import("@sanity/mutate/_unstable_machine").createSharedListener>;
                            id: string;
                            cache?: Map<string, import("@sanity/client").SanityDocument<DocumentType> | null>;
                            remote: import("@sanity/client").SanityDocument<DocumentType> | null | undefined;
                            local: import("@sanity/client").SanityDocument<DocumentType> | null | undefined;
                            mutationEvents: import("@sanity/client").MutationEvent[];
                            stagedChanges: import("@sanity/mutate/_unstable_machine").MutationGroup[];
                            stashedChanges: import("@sanity/mutate/_unstable_machine").MutationGroup[];
                            error: unknown;
                            fetchRemoteSnapshotAttempts: number;
                            submitTransactionsAttempts: number;
                        }, import("@sanity/client").ReconnectEvent | import("@sanity/client").WelcomeEvent | import("@sanity/client").MutationEvent | {
                            type: "error";
                        } | {
                            type: "retry";
                        } | {
                            type: "connect";
                        } | {
                            type: "reconnect";
                        } | {
                            type: "welcome";
                        } | {
                            type: "mutate";
                            mutations: import("@sanity/mutate/_unstable_machine").Mutation[];
                        } | {
                            type: "submit";
                        } | {
                            type: "xstate.done.actor.getDocument";
                            output: import("@sanity/client").SanityDocument<DocumentType>;
                        } | {
                            type: "xstate.done.actor.submitTransactions";
                            output: undefined;
                        }, Record<string, import("xstate").AnyActorRef | undefined>, import("xstate").StateValue, string, unknown, any, any>, import("@sanity/client").ReconnectEvent | import("@sanity/client").WelcomeEvent | import("@sanity/client").MutationEvent | {
                            type: "error";
                        } | {
                            type: "retry";
                        } | {
                            type: "connect";
                        } | {
                            type: "reconnect";
                        } | {
                            type: "welcome";
                        } | {
                            type: "mutate";
                            mutations: import("@sanity/mutate/_unstable_machine").Mutation[];
                        } | {
                            type: "submit";
                        } | {
                            type: "xstate.done.actor.getDocument";
                            output: import("@sanity/client").SanityDocument<DocumentType>;
                        } | {
                            type: "xstate.done.actor.submitTransactions";
                            output: undefined;
                        }, import("xstate").AnyEventObject>;
                    }) => {
                        client: import("@sanity/client").SanityClient;
                        sharedListener: import("rxjs").Observable<import("@sanity/client").ReconnectEvent | import("@sanity/client").WelcomeEvent | import("@sanity/client").MutationEvent> | undefined;
                        id: string;
                        remote: undefined;
                        local: undefined;
                        mutationEvents: never[];
                        stagedChanges: never[];
                        stashedChanges: never[];
                        error: undefined;
                        fetchRemoteSnapshotAttempts: number;
                        submitTransactionsAttempts: number;
                        cache: Map<string, import("@sanity/client").SanityDocument<DocumentType> | null> | undefined;
                    };
                    readonly entry: readonly ["connect to server-sent events"];
                    readonly on: {
                        readonly mutate: {
                            readonly actions: readonly ["rebase local snapshot", "stage mutation"];
                        };
                    };
                    readonly initial: "disconnected";
                    readonly states: {
                        readonly disconnected: {
                            readonly on: {
                                readonly connect: {
                                    readonly target: "connecting";
                                    readonly actions: readonly ["listen to server-sent events"];
                                };
                            };
                        };
                        readonly connecting: {
                            readonly on: {
                                readonly welcome: "connected";
                                readonly reconnect: "reconnecting";
                                readonly error: "connectFailure";
                            };
                            readonly tags: readonly ["busy"];
                        };
                        readonly connectFailure: {
                            readonly on: {
                                readonly connect: {
                                    readonly target: "connecting";
                                    readonly actions: readonly ["listen to server-sent events"];
                                };
                            };
                            readonly entry: readonly ["stop listening to server-sent events", "assign error to context"];
                            readonly exit: readonly ["clear error from context"];
                            readonly tags: readonly ["error"];
                        };
                        readonly reconnecting: {
                            readonly on: {
                                readonly welcome: {
                                    readonly target: "connected";
                                };
                                readonly error: {
                                    readonly target: "connectFailure";
                                };
                            };
                            readonly tags: readonly ["busy", "error"];
                        };
                        readonly connected: {
                            readonly on: {
                                readonly mutation: {
                                    readonly actions: readonly ["buffer remote mutation events"];
                                };
                                readonly reconnect: "reconnecting";
                            };
                            readonly entry: readonly ["clear error from context"];
                            readonly initial: "loading";
                            readonly states: {
                                readonly loading: {
                                    readonly invoke: {
                                        readonly src: "fetch remote snapshot";
                                        readonly id: "getDocument";
                                        readonly input: ({ context, }: {
                                            context: {
                                                client: import("@sanity/client").SanityClient;
                                                sharedListener?: ReturnType<typeof import("@sanity/mutate/_unstable_machine").createSharedListener>;
                                                id: string;
                                                cache?: Map<string, import("@sanity/client").SanityDocument<DocumentType> | null>;
                                                remote: import("@sanity/client").SanityDocument<DocumentType> | null | undefined;
                                                local: import("@sanity/client").SanityDocument<DocumentType> | null | undefined;
                                                mutationEvents: import("@sanity/client").MutationEvent[];
                                                stagedChanges: import("@sanity/mutate/_unstable_machine").MutationGroup[];
                                                stashedChanges: import("@sanity/mutate/_unstable_machine").MutationGroup[];
                                                error: unknown;
                                                fetchRemoteSnapshotAttempts: number;
                                                submitTransactionsAttempts: number;
                                            };
                                            event: import("@sanity/client").ReconnectEvent | import("@sanity/client").WelcomeEvent | import("@sanity/client").MutationEvent | {
                                                type: "error";
                                            } | {
                                                type: "retry";
                                            } | {
                                                type: "connect";
                                            } | {
                                                type: "reconnect";
                                            } | {
                                                type: "welcome";
                                            } | {
                                                type: "mutate";
                                                mutations: import("@sanity/mutate/_unstable_machine").Mutation[];
                                            } | {
                                                type: "submit";
                                            } | {
                                                type: "xstate.done.actor.getDocument";
                                                output: import("@sanity/client").SanityDocument<DocumentType>;
                                            } | {
                                                type: "xstate.done.actor.submitTransactions";
                                                output: undefined;
                                            };
                                            self: import("xstate").ActorRef<import("xstate").MachineSnapshot<{
                                                client: import("@sanity/client").SanityClient;
                                                sharedListener?: ReturnType<typeof import("@sanity/mutate/_unstable_machine").createSharedListener>;
                                                id: string;
                                                cache?: Map<string, import("@sanity/client").SanityDocument<DocumentType> | null>;
                                                remote: import("@sanity/client").SanityDocument<DocumentType> | null | undefined;
                                                local: import("@sanity/client").SanityDocument<DocumentType> | null | undefined;
                                                mutationEvents: import("@sanity/client").MutationEvent[];
                                                stagedChanges: import("@sanity/mutate/_unstable_machine").MutationGroup[];
                                                stashedChanges: import("@sanity/mutate/_unstable_machine").MutationGroup[];
                                                error: unknown;
                                                fetchRemoteSnapshotAttempts: number;
                                                submitTransactionsAttempts: number;
                                            }, import("@sanity/client").ReconnectEvent | import("@sanity/client").WelcomeEvent | import("@sanity/client").MutationEvent | {
                                                type: "error";
                                            } | {
                                                type: "retry";
                                            } | {
                                                type: "connect";
                                            } | {
                                                type: "reconnect";
                                            } | {
                                                type: "welcome";
                                            } | {
                                                type: "mutate";
                                                mutations: import("@sanity/mutate/_unstable_machine").Mutation[];
                                            } | {
                                                type: "submit";
                                            } | {
                                                type: "xstate.done.actor.getDocument";
                                                output: import("@sanity/client").SanityDocument<DocumentType>;
                                            } | {
                                                type: "xstate.done.actor.submitTransactions";
                                                output: undefined;
                                            }, Record<string, import("xstate").AnyActorRef>, import("xstate").StateValue, string, unknown, any, any>, import("@sanity/client").ReconnectEvent | import("@sanity/client").WelcomeEvent | import("@sanity/client").MutationEvent | {
                                                type: "error";
                                            } | {
                                                type: "retry";
                                            } | {
                                                type: "connect";
                                            } | {
                                                type: "reconnect";
                                            } | {
                                                type: "welcome";
                                            } | {
                                                type: "mutate";
                                                mutations: import("@sanity/mutate/_unstable_machine").Mutation[];
                                            } | {
                                                type: "submit";
                                            } | {
                                                type: "xstate.done.actor.getDocument";
                                                output: import("@sanity/client").SanityDocument<DocumentType>;
                                            } | {
                                                type: "xstate.done.actor.submitTransactions";
                                                output: undefined;
                                            }, import("xstate").AnyEventObject>;
                                        }) => {
                                            client: import("@sanity/client").SanityClient;
                                            id: string;
                                        };
                                        readonly onError: {
                                            readonly target: "loadFailure";
                                        };
                                        readonly onDone: {
                                            readonly target: "loaded";
                                            readonly actions: readonly ["rebase fetched remote snapshot", "reset fetch attempts"];
                                        };
                                    };
                                    readonly tags: readonly ["busy"];
                                };
                                readonly loaded: {
                                    readonly entry: readonly ["send sync event to parent"];
                                    readonly on: {
                                        readonly mutation: {
                                            readonly actions: readonly ["apply mendoza patch", "send mutation event to parent"];
                                        };
                                    };
                                    readonly initial: "pristine";
                                    readonly states: {
                                        readonly pristine: {
                                            readonly on: {
                                                readonly mutate: {
                                                    readonly actions: readonly ["rebase local snapshot", "stage mutation"];
                                                    readonly target: "dirty";
                                                };
                                            };
                                            readonly tags: readonly ["ready"];
                                        };
                                        readonly dirty: {
                                            readonly on: {
                                                readonly submit: "submitting";
                                            };
                                            readonly tags: readonly ["ready"];
                                        };
                                        readonly submitting: {
                                            readonly on: {
                                                readonly mutate: {
                                                    readonly actions: readonly ["rebase local snapshot", "stash mutation"];
                                                };
                                            };
                                            readonly invoke: {
                                                readonly src: "submit mutations as transactions";
                                                readonly id: "submitTransactions";
                                                readonly input: ({ context, }: {
                                                    context: {
                                                        client: import("@sanity/client").SanityClient;
                                                        sharedListener?: ReturnType<typeof import("@sanity/mutate/_unstable_machine").createSharedListener>;
                                                        id: string;
                                                        cache?: Map<string, import("@sanity/client").SanityDocument<DocumentType> | null>;
                                                        remote: import("@sanity/client").SanityDocument<DocumentType> | null | undefined;
                                                        local: import("@sanity/client").SanityDocument<DocumentType> | null | undefined;
                                                        mutationEvents: import("@sanity/client").MutationEvent[];
                                                        stagedChanges: import("@sanity/mutate/_unstable_machine").MutationGroup[];
                                                        stashedChanges: import("@sanity/mutate/_unstable_machine").MutationGroup[];
                                                        error: unknown;
                                                        fetchRemoteSnapshotAttempts: number;
                                                        submitTransactionsAttempts: number;
                                                    };
                                                    event: import("@sanity/client").ReconnectEvent | import("@sanity/client").WelcomeEvent | import("@sanity/client").MutationEvent | {
                                                        type: "error";
                                                    } | {
                                                        type: "retry";
                                                    } | {
                                                        type: "connect";
                                                    } | {
                                                        type: "reconnect";
                                                    } | {
                                                        type: "welcome";
                                                    } | {
                                                        type: "mutate";
                                                        mutations: import("@sanity/mutate/_unstable_machine").Mutation[];
                                                    } | {
                                                        type: "submit";
                                                    } | {
                                                        type: "xstate.done.actor.getDocument";
                                                        output: import("@sanity/client").SanityDocument<DocumentType>;
                                                    } | {
                                                        type: "xstate.done.actor.submitTransactions";
                                                        output: undefined;
                                                    };
                                                    self: import("xstate").ActorRef<import("xstate").MachineSnapshot<{
                                                        client: import("@sanity/client").SanityClient;
                                                        sharedListener?: ReturnType<typeof import("@sanity/mutate/_unstable_machine").createSharedListener>;
                                                        id: string;
                                                        cache?: Map<string, import("@sanity/client").SanityDocument<DocumentType> | null>;
                                                        remote: import("@sanity/client").SanityDocument<DocumentType> | null | undefined;
                                                        local: import("@sanity/client").SanityDocument<DocumentType> | null | undefined;
                                                        mutationEvents: import("@sanity/client").MutationEvent[];
                                                        stagedChanges: import("@sanity/mutate/_unstable_machine").MutationGroup[];
                                                        stashedChanges: import("@sanity/mutate/_unstable_machine").MutationGroup[];
                                                        error: unknown;
                                                        fetchRemoteSnapshotAttempts: number;
                                                        submitTransactionsAttempts: number;
                                                    }, import("@sanity/client").ReconnectEvent | import("@sanity/client").WelcomeEvent | import("@sanity/client").MutationEvent | {
                                                        type: "error";
                                                    } | {
                                                        type: "retry";
                                                    } | {
                                                        type: "connect";
                                                    } | {
                                                        type: "reconnect";
                                                    } | {
                                                        type: "welcome";
                                                    } | {
                                                        type: "mutate";
                                                        mutations: import("@sanity/mutate/_unstable_machine").Mutation[];
                                                    } | {
                                                        type: "submit";
                                                    } | {
                                                        type: "xstate.done.actor.getDocument";
                                                        output: import("@sanity/client").SanityDocument<DocumentType>;
                                                    } | {
                                                        type: "xstate.done.actor.submitTransactions";
                                                        output: undefined;
                                                    }, Record<string, import("xstate").AnyActorRef>, import("xstate").StateValue, string, unknown, any, any>, import("@sanity/client").ReconnectEvent | import("@sanity/client").WelcomeEvent | import("@sanity/client").MutationEvent | {
                                                        type: "error";
                                                    } | {
                                                        type: "retry";
                                                    } | {
                                                        type: "connect";
                                                    } | {
                                                        type: "reconnect";
                                                    } | {
                                                        type: "welcome";
                                                    } | {
                                                        type: "mutate";
                                                        mutations: import("@sanity/mutate/_unstable_machine").Mutation[];
                                                    } | {
                                                        type: "submit";
                                                    } | {
                                                        type: "xstate.done.actor.getDocument";
                                                        output: import("@sanity/client").SanityDocument<DocumentType>;
                                                    } | {
                                                        type: "xstate.done.actor.submitTransactions";
                                                        output: undefined;
                                                    }, import("xstate").AnyEventObject>;
                                                }) => {
                                                    client: import("@sanity/client").SanityClient;
                                                    transactions: import("@sanity/mutate/_unstable_machine").Transaction[];
                                                };
                                                readonly onError: {
                                                    readonly target: "submitFailure";
                                                };
                                                readonly onDone: {
                                                    readonly target: "pristine";
                                                    readonly actions: readonly ["restore stashed changes", "reset submit attempts", "send pristine event to parent"];
                                                };
                                            };
                                            readonly tags: readonly ["busy", "ready"];
                                        };
                                        readonly submitFailure: {
                                            readonly exit: readonly ["clear error from context"];
                                            readonly after: {
                                                readonly submitTransactionsTimeout: {
                                                    readonly actions: readonly ["increment submit attempts"];
                                                    readonly target: "submitting";
                                                };
                                            };
                                            readonly on: {
                                                readonly retry: "submitting";
                                            };
                                            readonly tags: readonly ["error", "ready"];
                                        };
                                    };
                                };
                                readonly loadFailure: {
                                    readonly exit: readonly ["clear error from context"];
                                    readonly after: {
                                        readonly fetchRemoteSnapshotTimeout: {
                                            readonly actions: readonly ["increment fetch attempts"];
                                            readonly target: "loading";
                                        };
                                    };
                                    readonly on: {
                                        readonly retry: "loading";
                                    };
                                    readonly tags: readonly ["error"];
                                };
                            };
                        };
                    };
                }>;
                id: string | undefined;
            } ? T extends {
                src: TSrc;
            } ? import("xstate").ConditionalRequired<[options?: ({
                id?: T["id"] | undefined;
                systemId?: string;
                input?: import("xstate").InputFrom<T["logic"]> | undefined;
                syncSnapshot?: boolean;
            } & { [K in import("xstate").RequiredActorOptions<T>]: unknown; }) | undefined], import("xstate").IsNotNever<import("xstate").RequiredActorOptions<T>>> : never : never : never): import("xstate").ActorRefFromLogic<import("xstate").GetConcreteByKey<{
                src: "documentMutatorMachine";
                logic: import("xstate").StateMachine<{
                    client: import("@sanity/client").SanityClient;
                    sharedListener?: ReturnType<typeof import("@sanity/mutate/_unstable_machine").createSharedListener>;
                    id: string;
                    cache?: Map<string, import("@sanity/client").SanityDocument<DocumentType> | null>;
                    remote: import("@sanity/client").SanityDocument<DocumentType> | null | undefined;
                    local: import("@sanity/client").SanityDocument<DocumentType> | null | undefined;
                    mutationEvents: import("@sanity/client").MutationEvent[];
                    stagedChanges: import("@sanity/mutate/_unstable_machine").MutationGroup[];
                    stashedChanges: import("@sanity/mutate/_unstable_machine").MutationGroup[];
                    error: unknown;
                    fetchRemoteSnapshotAttempts: number;
                    submitTransactionsAttempts: number;
                }, import("@sanity/client").WelcomeEvent | import("@sanity/client").ReconnectEvent | import("@sanity/client").MutationEvent | {
                    type: "error";
                } | {
                    type: "retry";
                } | {
                    type: "connect";
                } | {
                    type: "reconnect";
                } | {
                    type: "welcome";
                } | {
                    type: "mutate";
                    mutations: import("@sanity/mutate/_unstable_machine").Mutation[];
                } | {
                    type: "submit";
                } | {
                    type: "xstate.done.actor.getDocument";
                    output: import("@sanity/client").SanityDocument<DocumentType>;
                } | {
                    type: "xstate.done.actor.submitTransactions";
                    output: undefined;
                }, {
                    [x: string]: import("xstate").ActorRefFromLogic<import("xstate").PromiseActorLogic<void | import("@sanity/client").SanityDocument<Record<string, any>> | undefined, {
                        client: import("@sanity/client").SanityClient;
                        id: string;
                    }, import("xstate").EventObject>> | import("xstate").ActorRefFromLogic<import("xstate").PromiseActorLogic<void, {
                        client: import("@sanity/client").SanityClient;
                        transactions: import("@sanity/mutate/_unstable_machine").Transaction[];
                    }, import("xstate").EventObject>> | import("xstate").ActorRefFromLogic<import("xstate").ObservableActorLogic<import("@sanity/client").WelcomeEvent | import("@sanity/client").ReconnectEvent | import("@sanity/client").MutationEvent, {
                        listener: ReturnType<typeof import("@sanity/mutate/_unstable_machine").createSharedListener>;
                        id: string;
                    }, import("xstate").EventObject>> | undefined;
                    getDocument?: import("xstate").ActorRefFromLogic<import("xstate").PromiseActorLogic<void | import("@sanity/client").SanityDocument<Record<string, any>> | undefined, {
                        client: import("@sanity/client").SanityClient;
                        id: string;
                    }, import("xstate").EventObject>> | undefined;
                    submitTransactions?: import("xstate").ActorRefFromLogic<import("xstate").PromiseActorLogic<void, {
                        client: import("@sanity/client").SanityClient;
                        transactions: import("@sanity/mutate/_unstable_machine").Transaction[];
                    }, import("xstate").EventObject>> | undefined;
                }, import("xstate").Values<{
                    "fetch remote snapshot": {
                        src: "fetch remote snapshot";
                        logic: import("xstate").PromiseActorLogic<void | import("@sanity/client").SanityDocument<Record<string, any>> | undefined, {
                            client: import("@sanity/client").SanityClient;
                            id: string;
                        }, import("xstate").EventObject>;
                        id: "getDocument";
                    };
                    "submit mutations as transactions": {
                        src: "submit mutations as transactions";
                        logic: import("xstate").PromiseActorLogic<void, {
                            client: import("@sanity/client").SanityClient;
                            transactions: import("@sanity/mutate/_unstable_machine").Transaction[];
                        }, import("xstate").EventObject>;
                        id: "submitTransactions";
                    };
                    "server-sent events": {
                        src: "server-sent events";
                        logic: import("xstate").ObservableActorLogic<import("@sanity/client").ReconnectEvent | import("@sanity/client").WelcomeEvent | import("@sanity/client").MutationEvent, {
                            listener: ReturnType<typeof import("@sanity/mutate/_unstable_machine").createSharedListener>;
                            id: string;
                        }, import("xstate").EventObject>;
                        id: string | undefined;
                    };
                }>, import("xstate").Values<{
                    "assign error to context": {
                        type: "assign error to context";
                        params: import("xstate").NonReducibleUnknown;
                    };
                    "clear error from context": {
                        type: "clear error from context";
                        params: import("xstate").NonReducibleUnknown;
                    };
                    "connect to server-sent events": {
                        type: "connect to server-sent events";
                        params: import("xstate").NonReducibleUnknown;
                    };
                    "listen to server-sent events": {
                        type: "listen to server-sent events";
                        params: import("xstate").NonReducibleUnknown;
                    };
                    "stop listening to server-sent events": {
                        type: "stop listening to server-sent events";
                        params: import("xstate").NonReducibleUnknown;
                    };
                    "buffer remote mutation events": {
                        type: "buffer remote mutation events";
                        params: import("xstate").NonReducibleUnknown;
                    };
                    "restore stashed changes": {
                        type: "restore stashed changes";
                        params: import("xstate").NonReducibleUnknown;
                    };
                    "rebase fetched remote snapshot": {
                        type: "rebase fetched remote snapshot";
                        params: import("xstate").NonReducibleUnknown;
                    };
                    "apply mendoza patch": {
                        type: "apply mendoza patch";
                        params: import("xstate").NonReducibleUnknown;
                    };
                    "increment fetch attempts": {
                        type: "increment fetch attempts";
                        params: import("xstate").NonReducibleUnknown;
                    };
                    "reset fetch attempts": {
                        type: "reset fetch attempts";
                        params: import("xstate").NonReducibleUnknown;
                    };
                    "increment submit attempts": {
                        type: "increment submit attempts";
                        params: import("xstate").NonReducibleUnknown;
                    };
                    "reset submit attempts": {
                        type: "reset submit attempts";
                        params: import("xstate").NonReducibleUnknown;
                    };
                    "stage mutation": {
                        type: "stage mutation";
                        params: import("xstate").NonReducibleUnknown;
                    };
                    "stash mutation": {
                        type: "stash mutation";
                        params: import("xstate").NonReducibleUnknown;
                    };
                    "rebase local snapshot": {
                        type: "rebase local snapshot";
                        params: import("xstate").NonReducibleUnknown;
                    };
                    "send pristine event to parent": {
                        type: "send pristine event to parent";
                        params: import("xstate").NonReducibleUnknown;
                    };
                    "send sync event to parent": {
                        type: "send sync event to parent";
                        params: import("xstate").NonReducibleUnknown;
                    };
                    "send mutation event to parent": {
                        type: "send mutation event to parent";
                        params: import("xstate").NonReducibleUnknown;
                    };
                }>, never, "fetchRemoteSnapshotTimeout" | "submitTransactionsTimeout", "disconnected" | "connecting" | "reconnecting" | "connectFailure" | {
                    connected: "loading" | "loadFailure" | {
                        loaded: "pristine" | "dirty" | "submitting" | "submitFailure";
                    };
                }, "error" | "busy" | "ready", import("@sanity/mutate/_unstable_machine").DocumentMutatorMachineInput, import("xstate").NonReducibleUnknown, import("xstate").EventObject, import("xstate").MetaObject, {
                    readonly id: "document-mutator";
                    readonly context: ({ input, }: {
                        spawn: {
                            <TSrc_1 extends "fetch remote snapshot" | "submit mutations as transactions" | "server-sent events">(logic: TSrc_1, ...[options]: ({
                                src: "fetch remote snapshot";
                                logic: import("xstate").PromiseActorLogic<void | import("@sanity/client").SanityDocument<Record<string, any>> | undefined, {
                                    client: import("@sanity/client").SanityClient;
                                    id: string;
                                }, import("xstate").EventObject>;
                                id: "getDocument";
                            } extends infer T_1 ? T_1 extends {
                                src: "fetch remote snapshot";
                                logic: import("xstate").PromiseActorLogic<void | import("@sanity/client").SanityDocument<Record<string, any>> | undefined, {
                                    client: import("@sanity/client").SanityClient;
                                    id: string;
                                }, import("xstate").EventObject>;
                                id: "getDocument";
                            } ? T_1 extends {
                                src: TSrc_1;
                            } ? import("xstate").ConditionalRequired<[options?: ({
                                id?: T_1["id"] | undefined;
                                systemId?: string;
                                input?: import("xstate").InputFrom<T_1["logic"]> | undefined;
                                syncSnapshot?: boolean;
                            } & { [K_1 in import("xstate").RequiredActorOptions<T_1>]: unknown; }) | undefined], import("xstate").IsNotNever<import("xstate").RequiredActorOptions<T_1>>> : never : never : never) | ({
                                src: "submit mutations as transactions";
                                logic: import("xstate").PromiseActorLogic<void, {
                                    client: import("@sanity/client").SanityClient;
                                    transactions: import("@sanity/mutate/_unstable_machine").Transaction[];
                                }, import("xstate").EventObject>;
                                id: "submitTransactions";
                            } extends infer T_1 ? T_1 extends {
                                src: "submit mutations as transactions";
                                logic: import("xstate").PromiseActorLogic<void, {
                                    client: import("@sanity/client").SanityClient;
                                    transactions: import("@sanity/mutate/_unstable_machine").Transaction[];
                                }, import("xstate").EventObject>;
                                id: "submitTransactions";
                            } ? T_1 extends {
                                src: TSrc_1;
                            } ? import("xstate").ConditionalRequired<[options?: ({
                                id?: T_1["id"] | undefined;
                                systemId?: string;
                                input?: import("xstate").InputFrom<T_1["logic"]> | undefined;
                                syncSnapshot?: boolean;
                            } & { [K_1 in import("xstate").RequiredActorOptions<T_1>]: unknown; }) | undefined], import("xstate").IsNotNever<import("xstate").RequiredActorOptions<T_1>>> : never : never : never) | ({
                                src: "server-sent events";
                                logic: import("xstate").ObservableActorLogic<import("@sanity/client").ReconnectEvent | import("@sanity/client").WelcomeEvent | import("@sanity/client").MutationEvent, {
                                    listener: ReturnType<typeof import("@sanity/mutate/_unstable_machine").createSharedListener>;
                                    id: string;
                                }, import("xstate").EventObject>;
                                id: string | undefined;
                            } extends infer T_2 ? T_2 extends {
                                src: "server-sent events";
                                logic: import("xstate").ObservableActorLogic<import("@sanity/client").ReconnectEvent | import("@sanity/client").WelcomeEvent | import("@sanity/client").MutationEvent, {
                                    listener: ReturnType<typeof import("@sanity/mutate/_unstable_machine").createSharedListener>;
                                    id: string;
                                }, import("xstate").EventObject>;
                                id: string | undefined;
                            } ? T_2 extends {
                                src: TSrc_1;
                            } ? import("xstate").ConditionalRequired<[options?: ({
                                id?: T_2["id"] | undefined;
                                systemId?: string;
                                input?: import("xstate").InputFrom<T_2["logic"]> | undefined;
                                syncSnapshot?: boolean;
                            } & { [K_2 in import("xstate").RequiredActorOptions<T_2>]: unknown; }) | undefined], import("xstate").IsNotNever<import("xstate").RequiredActorOptions<T_2>>> : never : never : never)): import("xstate").ActorRefFromLogic<import("xstate").GetConcreteByKey<import("xstate").Values<{
                                "fetch remote snapshot": {
                                    src: "fetch remote snapshot";
                                    logic: import("xstate").PromiseActorLogic<void | import("@sanity/client").SanityDocument<Record<string, any>> | undefined, {
                                        client: import("@sanity/client").SanityClient;
                                        id: string;
                                    }, import("xstate").EventObject>;
                                    id: "getDocument";
                                };
                                "submit mutations as transactions": {
                                    src: "submit mutations as transactions";
                                    logic: import("xstate").PromiseActorLogic<void, {
                                        client: import("@sanity/client").SanityClient;
                                        transactions: import("@sanity/mutate/_unstable_machine").Transaction[];
                                    }, import("xstate").EventObject>;
                                    id: "submitTransactions";
                                };
                                "server-sent events": {
                                    src: "server-sent events";
                                    logic: import("xstate").ObservableActorLogic<import("@sanity/client").ReconnectEvent | import("@sanity/client").WelcomeEvent | import("@sanity/client").MutationEvent, {
                                        listener: ReturnType<typeof import("@sanity/mutate/_unstable_machine").createSharedListener>;
                                        id: string;
                                    }, import("xstate").EventObject>;
                                    id: string | undefined;
                                };
                            }>, "src", TSrc_1>["logic"]>;
                            <TLogic extends import("xstate").AnyActorLogic>(src: TLogic, options?: {
                                id?: never;
                                systemId?: string;
                                input?: import("xstate").InputFrom<TLogic> | undefined;
                                syncSnapshot?: boolean;
                            } | undefined): import("xstate").ActorRefFromLogic<TLogic>;
                        };
                        input: import("@sanity/mutate/_unstable_machine").DocumentMutatorMachineInput;
                        self: import("xstate").ActorRef<import("xstate").MachineSnapshot<{
                            client: import("@sanity/client").SanityClient;
                            sharedListener?: ReturnType<typeof import("@sanity/mutate/_unstable_machine").createSharedListener>;
                            id: string;
                            cache?: Map<string, import("@sanity/client").SanityDocument<DocumentType> | null>;
                            remote: import("@sanity/client").SanityDocument<DocumentType> | null | undefined;
                            local: import("@sanity/client").SanityDocument<DocumentType> | null | undefined;
                            mutationEvents: import("@sanity/client").MutationEvent[];
                            stagedChanges: import("@sanity/mutate/_unstable_machine").MutationGroup[];
                            stashedChanges: import("@sanity/mutate/_unstable_machine").MutationGroup[];
                            error: unknown;
                            fetchRemoteSnapshotAttempts: number;
                            submitTransactionsAttempts: number;
                        }, import("@sanity/client").ReconnectEvent | import("@sanity/client").WelcomeEvent | import("@sanity/client").MutationEvent | {
                            type: "error";
                        } | {
                            type: "retry";
                        } | {
                            type: "connect";
                        } | {
                            type: "reconnect";
                        } | {
                            type: "welcome";
                        } | {
                            type: "mutate";
                            mutations: import("@sanity/mutate/_unstable_machine").Mutation[];
                        } | {
                            type: "submit";
                        } | {
                            type: "xstate.done.actor.getDocument";
                            output: import("@sanity/client").SanityDocument<DocumentType>;
                        } | {
                            type: "xstate.done.actor.submitTransactions";
                            output: undefined;
                        }, Record<string, import("xstate").AnyActorRef | undefined>, import("xstate").StateValue, string, unknown, any, any>, import("@sanity/client").ReconnectEvent | import("@sanity/client").WelcomeEvent | import("@sanity/client").MutationEvent | {
                            type: "error";
                        } | {
                            type: "retry";
                        } | {
                            type: "connect";
                        } | {
                            type: "reconnect";
                        } | {
                            type: "welcome";
                        } | {
                            type: "mutate";
                            mutations: import("@sanity/mutate/_unstable_machine").Mutation[];
                        } | {
                            type: "submit";
                        } | {
                            type: "xstate.done.actor.getDocument";
                            output: import("@sanity/client").SanityDocument<DocumentType>;
                        } | {
                            type: "xstate.done.actor.submitTransactions";
                            output: undefined;
                        }, import("xstate").AnyEventObject>;
                    }) => {
                        client: import("@sanity/client").SanityClient;
                        sharedListener: import("rxjs").Observable<import("@sanity/client").ReconnectEvent | import("@sanity/client").WelcomeEvent | import("@sanity/client").MutationEvent> | undefined;
                        id: string;
                        remote: undefined;
                        local: undefined;
                        mutationEvents: never[];
                        stagedChanges: never[];
                        stashedChanges: never[];
                        error: undefined;
                        fetchRemoteSnapshotAttempts: number;
                        submitTransactionsAttempts: number;
                        cache: Map<string, import("@sanity/client").SanityDocument<DocumentType> | null> | undefined;
                    };
                    readonly entry: readonly ["connect to server-sent events"];
                    readonly on: {
                        readonly mutate: {
                            readonly actions: readonly ["rebase local snapshot", "stage mutation"];
                        };
                    };
                    readonly initial: "disconnected";
                    readonly states: {
                        readonly disconnected: {
                            readonly on: {
                                readonly connect: {
                                    readonly target: "connecting";
                                    readonly actions: readonly ["listen to server-sent events"];
                                };
                            };
                        };
                        readonly connecting: {
                            readonly on: {
                                readonly welcome: "connected";
                                readonly reconnect: "reconnecting";
                                readonly error: "connectFailure";
                            };
                            readonly tags: readonly ["busy"];
                        };
                        readonly connectFailure: {
                            readonly on: {
                                readonly connect: {
                                    readonly target: "connecting";
                                    readonly actions: readonly ["listen to server-sent events"];
                                };
                            };
                            readonly entry: readonly ["stop listening to server-sent events", "assign error to context"];
                            readonly exit: readonly ["clear error from context"];
                            readonly tags: readonly ["error"];
                        };
                        readonly reconnecting: {
                            readonly on: {
                                readonly welcome: {
                                    readonly target: "connected";
                                };
                                readonly error: {
                                    readonly target: "connectFailure";
                                };
                            };
                            readonly tags: readonly ["busy", "error"];
                        };
                        readonly connected: {
                            readonly on: {
                                readonly mutation: {
                                    readonly actions: readonly ["buffer remote mutation events"];
                                };
                                readonly reconnect: "reconnecting";
                            };
                            readonly entry: readonly ["clear error from context"];
                            readonly initial: "loading";
                            readonly states: {
                                readonly loading: {
                                    readonly invoke: {
                                        readonly src: "fetch remote snapshot";
                                        readonly id: "getDocument";
                                        readonly input: ({ context, }: {
                                            context: {
                                                client: import("@sanity/client").SanityClient;
                                                sharedListener?: ReturnType<typeof import("@sanity/mutate/_unstable_machine").createSharedListener>;
                                                id: string;
                                                cache?: Map<string, import("@sanity/client").SanityDocument<DocumentType> | null>;
                                                remote: import("@sanity/client").SanityDocument<DocumentType> | null | undefined;
                                                local: import("@sanity/client").SanityDocument<DocumentType> | null | undefined;
                                                mutationEvents: import("@sanity/client").MutationEvent[];
                                                stagedChanges: import("@sanity/mutate/_unstable_machine").MutationGroup[];
                                                stashedChanges: import("@sanity/mutate/_unstable_machine").MutationGroup[];
                                                error: unknown;
                                                fetchRemoteSnapshotAttempts: number;
                                                submitTransactionsAttempts: number;
                                            };
                                            event: import("@sanity/client").ReconnectEvent | import("@sanity/client").WelcomeEvent | import("@sanity/client").MutationEvent | {
                                                type: "error";
                                            } | {
                                                type: "retry";
                                            } | {
                                                type: "connect";
                                            } | {
                                                type: "reconnect";
                                            } | {
                                                type: "welcome";
                                            } | {
                                                type: "mutate";
                                                mutations: import("@sanity/mutate/_unstable_machine").Mutation[];
                                            } | {
                                                type: "submit";
                                            } | {
                                                type: "xstate.done.actor.getDocument";
                                                output: import("@sanity/client").SanityDocument<DocumentType>;
                                            } | {
                                                type: "xstate.done.actor.submitTransactions";
                                                output: undefined;
                                            };
                                            self: import("xstate").ActorRef<import("xstate").MachineSnapshot<{
                                                client: import("@sanity/client").SanityClient;
                                                sharedListener?: ReturnType<typeof import("@sanity/mutate/_unstable_machine").createSharedListener>;
                                                id: string;
                                                cache?: Map<string, import("@sanity/client").SanityDocument<DocumentType> | null>;
                                                remote: import("@sanity/client").SanityDocument<DocumentType> | null | undefined;
                                                local: import("@sanity/client").SanityDocument<DocumentType> | null | undefined;
                                                mutationEvents: import("@sanity/client").MutationEvent[];
                                                stagedChanges: import("@sanity/mutate/_unstable_machine").MutationGroup[];
                                                stashedChanges: import("@sanity/mutate/_unstable_machine").MutationGroup[];
                                                error: unknown;
                                                fetchRemoteSnapshotAttempts: number;
                                                submitTransactionsAttempts: number;
                                            }, import("@sanity/client").ReconnectEvent | import("@sanity/client").WelcomeEvent | import("@sanity/client").MutationEvent | {
                                                type: "error";
                                            } | {
                                                type: "retry";
                                            } | {
                                                type: "connect";
                                            } | {
                                                type: "reconnect";
                                            } | {
                                                type: "welcome";
                                            } | {
                                                type: "mutate";
                                                mutations: import("@sanity/mutate/_unstable_machine").Mutation[];
                                            } | {
                                                type: "submit";
                                            } | {
                                                type: "xstate.done.actor.getDocument";
                                                output: import("@sanity/client").SanityDocument<DocumentType>;
                                            } | {
                                                type: "xstate.done.actor.submitTransactions";
                                                output: undefined;
                                            }, Record<string, import("xstate").AnyActorRef>, import("xstate").StateValue, string, unknown, any, any>, import("@sanity/client").ReconnectEvent | import("@sanity/client").WelcomeEvent | import("@sanity/client").MutationEvent | {
                                                type: "error";
                                            } | {
                                                type: "retry";
                                            } | {
                                                type: "connect";
                                            } | {
                                                type: "reconnect";
                                            } | {
                                                type: "welcome";
                                            } | {
                                                type: "mutate";
                                                mutations: import("@sanity/mutate/_unstable_machine").Mutation[];
                                            } | {
                                                type: "submit";
                                            } | {
                                                type: "xstate.done.actor.getDocument";
                                                output: import("@sanity/client").SanityDocument<DocumentType>;
                                            } | {
                                                type: "xstate.done.actor.submitTransactions";
                                                output: undefined;
                                            }, import("xstate").AnyEventObject>;
                                        }) => {
                                            client: import("@sanity/client").SanityClient;
                                            id: string;
                                        };
                                        readonly onError: {
                                            readonly target: "loadFailure";
                                        };
                                        readonly onDone: {
                                            readonly target: "loaded";
                                            readonly actions: readonly ["rebase fetched remote snapshot", "reset fetch attempts"];
                                        };
                                    };
                                    readonly tags: readonly ["busy"];
                                };
                                readonly loaded: {
                                    readonly entry: readonly ["send sync event to parent"];
                                    readonly on: {
                                        readonly mutation: {
                                            readonly actions: readonly ["apply mendoza patch", "send mutation event to parent"];
                                        };
                                    };
                                    readonly initial: "pristine";
                                    readonly states: {
                                        readonly pristine: {
                                            readonly on: {
                                                readonly mutate: {
                                                    readonly actions: readonly ["rebase local snapshot", "stage mutation"];
                                                    readonly target: "dirty";
                                                };
                                            };
                                            readonly tags: readonly ["ready"];
                                        };
                                        readonly dirty: {
                                            readonly on: {
                                                readonly submit: "submitting";
                                            };
                                            readonly tags: readonly ["ready"];
                                        };
                                        readonly submitting: {
                                            readonly on: {
                                                readonly mutate: {
                                                    readonly actions: readonly ["rebase local snapshot", "stash mutation"];
                                                };
                                            };
                                            readonly invoke: {
                                                readonly src: "submit mutations as transactions";
                                                readonly id: "submitTransactions";
                                                readonly input: ({ context, }: {
                                                    context: {
                                                        client: import("@sanity/client").SanityClient;
                                                        sharedListener?: ReturnType<typeof import("@sanity/mutate/_unstable_machine").createSharedListener>;
                                                        id: string;
                                                        cache?: Map<string, import("@sanity/client").SanityDocument<DocumentType> | null>;
                                                        remote: import("@sanity/client").SanityDocument<DocumentType> | null | undefined;
                                                        local: import("@sanity/client").SanityDocument<DocumentType> | null | undefined;
                                                        mutationEvents: import("@sanity/client").MutationEvent[];
                                                        stagedChanges: import("@sanity/mutate/_unstable_machine").MutationGroup[];
                                                        stashedChanges: import("@sanity/mutate/_unstable_machine").MutationGroup[];
                                                        error: unknown;
                                                        fetchRemoteSnapshotAttempts: number;
                                                        submitTransactionsAttempts: number;
                                                    };
                                                    event: import("@sanity/client").ReconnectEvent | import("@sanity/client").WelcomeEvent | import("@sanity/client").MutationEvent | {
                                                        type: "error";
                                                    } | {
                                                        type: "retry";
                                                    } | {
                                                        type: "connect";
                                                    } | {
                                                        type: "reconnect";
                                                    } | {
                                                        type: "welcome";
                                                    } | {
                                                        type: "mutate";
                                                        mutations: import("@sanity/mutate/_unstable_machine").Mutation[];
                                                    } | {
                                                        type: "submit";
                                                    } | {
                                                        type: "xstate.done.actor.getDocument";
                                                        output: import("@sanity/client").SanityDocument<DocumentType>;
                                                    } | {
                                                        type: "xstate.done.actor.submitTransactions";
                                                        output: undefined;
                                                    };
                                                    self: import("xstate").ActorRef<import("xstate").MachineSnapshot<{
                                                        client: import("@sanity/client").SanityClient;
                                                        sharedListener?: ReturnType<typeof import("@sanity/mutate/_unstable_machine").createSharedListener>;
                                                        id: string;
                                                        cache?: Map<string, import("@sanity/client").SanityDocument<DocumentType> | null>;
                                                        remote: import("@sanity/client").SanityDocument<DocumentType> | null | undefined;
                                                        local: import("@sanity/client").SanityDocument<DocumentType> | null | undefined;
                                                        mutationEvents: import("@sanity/client").MutationEvent[];
                                                        stagedChanges: import("@sanity/mutate/_unstable_machine").MutationGroup[];
                                                        stashedChanges: import("@sanity/mutate/_unstable_machine").MutationGroup[];
                                                        error: unknown;
                                                        fetchRemoteSnapshotAttempts: number;
                                                        submitTransactionsAttempts: number;
                                                    }, import("@sanity/client").ReconnectEvent | import("@sanity/client").WelcomeEvent | import("@sanity/client").MutationEvent | {
                                                        type: "error";
                                                    } | {
                                                        type: "retry";
                                                    } | {
                                                        type: "connect";
                                                    } | {
                                                        type: "reconnect";
                                                    } | {
                                                        type: "welcome";
                                                    } | {
                                                        type: "mutate";
                                                        mutations: import("@sanity/mutate/_unstable_machine").Mutation[];
                                                    } | {
                                                        type: "submit";
                                                    } | {
                                                        type: "xstate.done.actor.getDocument";
                                                        output: import("@sanity/client").SanityDocument<DocumentType>;
                                                    } | {
                                                        type: "xstate.done.actor.submitTransactions";
                                                        output: undefined;
                                                    }, Record<string, import("xstate").AnyActorRef>, import("xstate").StateValue, string, unknown, any, any>, import("@sanity/client").ReconnectEvent | import("@sanity/client").WelcomeEvent | import("@sanity/client").MutationEvent | {
                                                        type: "error";
                                                    } | {
                                                        type: "retry";
                                                    } | {
                                                        type: "connect";
                                                    } | {
                                                        type: "reconnect";
                                                    } | {
                                                        type: "welcome";
                                                    } | {
                                                        type: "mutate";
                                                        mutations: import("@sanity/mutate/_unstable_machine").Mutation[];
                                                    } | {
                                                        type: "submit";
                                                    } | {
                                                        type: "xstate.done.actor.getDocument";
                                                        output: import("@sanity/client").SanityDocument<DocumentType>;
                                                    } | {
                                                        type: "xstate.done.actor.submitTransactions";
                                                        output: undefined;
                                                    }, import("xstate").AnyEventObject>;
                                                }) => {
                                                    client: import("@sanity/client").SanityClient;
                                                    transactions: import("@sanity/mutate/_unstable_machine").Transaction[];
                                                };
                                                readonly onError: {
                                                    readonly target: "submitFailure";
                                                };
                                                readonly onDone: {
                                                    readonly target: "pristine";
                                                    readonly actions: readonly ["restore stashed changes", "reset submit attempts", "send pristine event to parent"];
                                                };
                                            };
                                            readonly tags: readonly ["busy", "ready"];
                                        };
                                        readonly submitFailure: {
                                            readonly exit: readonly ["clear error from context"];
                                            readonly after: {
                                                readonly submitTransactionsTimeout: {
                                                    readonly actions: readonly ["increment submit attempts"];
                                                    readonly target: "submitting";
                                                };
                                            };
                                            readonly on: {
                                                readonly retry: "submitting";
                                            };
                                            readonly tags: readonly ["error", "ready"];
                                        };
                                    };
                                };
                                readonly loadFailure: {
                                    readonly exit: readonly ["clear error from context"];
                                    readonly after: {
                                        readonly fetchRemoteSnapshotTimeout: {
                                            readonly actions: readonly ["increment fetch attempts"];
                                            readonly target: "loading";
                                        };
                                    };
                                    readonly on: {
                                        readonly retry: "loading";
                                    };
                                    readonly tags: readonly ["error"];
                                };
                            };
                        };
                    };
                }>;
                id: string | undefined;
            }, "src", TSrc>["logic"]>;
            <TLogic extends import("xstate").AnyActorLogic>(src: TLogic, options?: {
                id?: never;
                systemId?: string;
                input?: import("xstate").InputFrom<TLogic> | undefined;
                syncSnapshot?: boolean;
            } | undefined): import("xstate").ActorRefFromLogic<TLogic>;
        };
        input: import("@sanity/visual-editing/optimistic").DatasetMutatorMachineInput;
        self: import("xstate").ActorRef<import("xstate").MachineSnapshot<{
            client: import("@sanity/client").SanityClient;
            sharedListener?: ReturnType<typeof import("@sanity/mutate/_unstable_machine").createSharedListener>;
            documents: Record<string, import("xstate").ActorRefFrom<ReturnType<typeof import("@sanity/visual-editing/optimistic").createDocumentMutator>>>;
        }, {
            type: "sync";
            id: string;
            document: import("@sanity/mutate/_unstable_machine").SanityDocumentBase;
        } | {
            type: "mutation";
            id: string;
            effects: {
                apply: import("@sanity/mutate/_unstable_machine").RawPatch;
            };
            previousRev: string;
            resultRev: string;
        } | {
            type: "rebased.local";
            id: string;
            document: import("@sanity/mutate/_unstable_machine").SanityDocumentBase;
        } | {
            type: "rebased.remote";
            id: string;
            document: import("@sanity/mutate/_unstable_machine").SanityDocumentBase;
        } | {
            type: "pristine";
            id: string;
        } | {
            type: "observe";
            documentId: string;
        } | {
            type: "unobserve";
            documentId: string;
        } | {
            type: "add document actor";
            documentId: string;
        } | {
            type: "stop document actor";
            documentId: string;
        }, Record<string, import("xstate").AnyActorRef | undefined>, import("xstate").StateValue, string, unknown, any, any>, {
            type: "sync";
            id: string;
            document: import("@sanity/mutate/_unstable_machine").SanityDocumentBase;
        } | {
            type: "mutation";
            id: string;
            effects: {
                apply: import("@sanity/mutate/_unstable_machine").RawPatch;
            };
            previousRev: string;
            resultRev: string;
        } | {
            type: "rebased.local";
            id: string;
            document: import("@sanity/mutate/_unstable_machine").SanityDocumentBase;
        } | {
            type: "rebased.remote";
            id: string;
            document: import("@sanity/mutate/_unstable_machine").SanityDocumentBase;
        } | {
            type: "pristine";
            id: string;
        } | {
            type: "observe";
            documentId: string;
        } | {
            type: "unobserve";
            documentId: string;
        } | {
            type: "add document actor";
            documentId: string;
        } | {
            type: "stop document actor";
            documentId: string;
        }, import("xstate").AnyEventObject>;
    }) => {
        documents: {};
        client: import("@sanity/client").SanityClient;
        sharedListener: import("rxjs").Observable<import("@sanity/client").WelcomeEvent | import("@sanity/client").ReconnectEvent | import("@sanity/client").MutationEvent> | undefined;
    };
    readonly on: {
        readonly "sync": {
            readonly actions: readonly ["emit sync event"];
        };
        readonly "mutation": {
            readonly actions: readonly ["emit mutation event"];
        };
        readonly "rebased.*": {
            readonly actions: readonly ["emit rebased event"];
        };
        readonly "pristine": {
            readonly actions: readonly ["emit pristine event"];
        };
        readonly "observe": {
            readonly actions: readonly ["add document actor"];
        };
        readonly "unobserve": {
            readonly actions: readonly ["stop remote snapshot", "remove remote snapshot from context"];
        };
    };
    readonly initial: "pristine";
    readonly states: {
        readonly pristine: {};
    };
}>, {
    type: "sync";
    id: string;
    document: import("@sanity/mutate/_unstable_machine").SanityDocumentBase;
} | {
    type: "mutation";
    id: string;
    effects: {
        apply: import("@sanity/mutate/_unstable_machine").RawPatch;
    };
    previousRev: string;
    resultRev: string;
} | {
    type: "rebased.local";
    id: string;
    document: import("@sanity/mutate/_unstable_machine").SanityDocumentBase;
} | {
    type: "rebased.remote";
    id: string;
    document: import("@sanity/mutate/_unstable_machine").SanityDocumentBase;
} | {
    type: "pristine";
    id: string;
} | {
    type: "observe";
    documentId: string;
} | {
    type: "unobserve";
    documentId: string;
} | {
    type: "add document actor";
    documentId: string;
} | {
    type: "stop document actor";
    documentId: string;
}, {
    type: "sync";
    id: string;
    document: import("@sanity/mutate/_unstable_machine").SanityDocumentBase;
} | {
    type: "mutation";
    id: string;
    effects: {
        apply: import("@sanity/mutate/_unstable_machine").RawPatch;
    };
    previousRev: string;
    resultRev: string;
} | {
    type: "rebased.local";
    id: string;
    document: import("@sanity/mutate/_unstable_machine").SanityDocumentBase;
} | {
    type: "rebased.remote";
    id: string;
    document: import("@sanity/mutate/_unstable_machine").SanityDocumentBase;
} | {
    type: "pristine";
    id: string;
}> | import("xstate").ActorRef<import("xstate").Snapshot<undefined>, import("xstate").AnyEventObject, import("xstate").AnyEventObject>>;
