import { deepCopyObject } from '../../../utilities/deepCopyObject.js';
import { traverseFields } from './traverseFields.js';
export const beforeValidate = async ({ id, collection, context, data: incomingData, doc, global, operation, overrideAccess, req })=>{
    const data = deepCopyObject(incomingData);
    await traverseFields({
        id,
        collection,
        context,
        data,
        doc,
        fields: collection?.fields || global?.fields,
        global,
        operation,
        overrideAccess,
        req,
        siblingData: data,
        siblingDoc: doc
    });
    return data;
};

//# sourceMappingURL=index.js.map