| 9672 | ); |
| 9673 | } |
| 9674 | function zd(e) { |
| 9675 | const n = {}; |
| 9676 | function i(e) { |
| 9677 | var i; |
| 9678 | Ca(e) |
| 9679 | ? (n[e.field] = "date") |
| 9680 | : "quantitative" === e.type && |
| 9681 | ((i = e.aggregate), t.isString(i) && p(["min", "max"], i)) |
| 9682 | ? (n[e.field] = "number") |
| 9683 | : q(e.field) > 1 |
| 9684 | ? e.field in n || (n[e.field] = "flatten") |
| 9685 | : la(e) && |
| 9686 | Lo(e.sort) && |
| 9687 | q(e.sort.field) > 1 && |
| 9688 | (e.sort.field in n || (n[e.sort.field] = "flatten")); |
| 9689 | } |
| 9690 | if ( |
| 9691 | ((qm(e) || Um(e)) && |
| 9692 | e.forEachFieldDef((t, n) => { |
| 9693 | if (aa(t)) i(t); |
| 9694 | else { |
| 9695 | const r = rt(n), |
| 9696 | o = e.fieldDef(r); |
| 9697 | i({ ...t, type: o.type }); |
| 9698 | } |
| 9699 | }), |
| 9700 | qm(e)) |
| 9701 | ) { |
| 9702 | const { mark: t, markDef: i, encoding: r } = e; |
| 9703 | if (Zr(t) && !e.encoding.order) { |
| 9704 | const e = r["horizontal" === i.orient ? "y" : "x"]; |
| 9705 | Zo(e) && |
| 9706 | "quantitative" === e.type && |
| 9707 | !(e.field in n) && |
| 9708 | (n[e.field] = "number"); |
| 9709 | } |
| 9710 | } |
| 9711 | return n; |
| 9712 | } |
| 9713 | class Cd extends $c { |
| 9714 | clone() { |
| 9715 | return new Cd(null, l(this._parse)); |