const u = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new WeakMap();
function a(t) {
  return t ?? { keyframes: [], options: { duration: 0 } };
}
function s(t, n) {
  return n.toLowerCase() === "rtl" ? {
    keyframes: t.rtlKeyframes || t.keyframes,
    options: t.options
  } : t;
}
function f(t, n) {
  u.set(t, a(n));
}
function c(t, n, e) {
  r.set(t, {
    ...r.get(t),
    [n]: a(e)
  });
}
function g(t, n, e) {
  const o = r.get(t);
  if (o?.[n])
    return s(o[n], e.dir);
  const i = u.get(n);
  return i ? s(i, e.dir) : {
    keyframes: [],
    options: { duration: 0 }
  };
}
export {
  c as a,
  g,
  f as s
};
