const l = (r, e) => {
  const n = o(r)?.flat(1 / 0);
  return Object.keys(e || {}).forEach((c) => {
    const s = n.indexOf(c);
    s > -1 && n.splice(s, 1, ...e?.[c] || []);
  }), n;
}, o = (r, e = []) => (r?.forEach((n) => {
  Array.isArray(n.children) && n.children.length ? o(n.children, e) : n?.key && e.push(n.key);
}), e);
export {
  l as convertExportField
};
