function K(d, { from: f, to: u }, l) {
  const s = `${d}.${f}`, n = `${d}.${u}`, e = { ...l }, c = /* @__PURE__ */ new Set();
  return Object.keys(l).forEach((t) => {
    if (c.has(t))
      return;
    let o, r;
    if (t.startsWith(s) ? (o = t, r = t.replace(s, n)) : t.startsWith(n) && (o = t.replace(n, s), r = t), o && r) {
      const a = e[o], i = e[r];
      i === void 0 ? delete e[o] : e[o] = i, a === void 0 ? delete e[r] : e[r] = a, c.add(o), c.add(r);
    }
  }), e;
}
export {
  K as reorderErrors
};
//# sourceMappingURL=reorder-errors.mjs.map
