| 8978 | return (S(y) || s.set("encode", y, !!n?.encoding), s); |
| 8979 | } |
| 8980 | function ud(e, t) { |
| 8981 | if (!e) return t.clone(); |
| 8982 | const n = e.getWithExplicit("orient"), |
| 8983 | i = t.getWithExplicit("orient"); |
| 8984 | if (n.explicit && i.explicit && n.value !== i.value) return; |
| 8985 | let r = !1; |
| 8986 | for (const n of Qf) { |
| 8987 | const i = uc( |
| 8988 | e.getWithExplicit(n), |
| 8989 | t.getWithExplicit(n), |
| 8990 | n, |
| 8991 | "legend", |
| 8992 | (e, t) => { |
| 8993 | switch (n) { |
| 8994 | case "symbolType": |
| 8995 | return fd(e, t); |
| 8996 | case "title": |
| 8997 | return In(e, t); |
| 8998 | case "type": |
| 8999 | return ((r = !0), sc("symbol")); |
| 9000 | } |
| 9001 | return cc(e, t, n, "legend"); |
| 9002 | }, |
| 9003 | ); |
| 9004 | e.setWithExplicit(n, i); |
| 9005 | } |
| 9006 | return ( |
| 9007 | r && |
| 9008 | (e.implicit?.encode?.gradient && P(e.implicit, ["encode", "gradient"]), |
| 9009 | e.explicit?.encode?.gradient && P(e.explicit, ["encode", "gradient"])), |
| 9010 | e |
| 9011 | ); |
| 9012 | } |
| 9013 | function fd(e, t) { |
| 9014 | return "circle" === t.value ? t : e; |
| 9015 | } |