| 2972 | return t && void 0 !== t.width; |
| 2973 | } |
| 2974 | function mt(t) { |
| 2975 | var e, n, i, a, r; |
| 2976 | return ( |
| 2977 | pt(t) |
| 2978 | ? ((r = t.width / 2), |
| 2979 | (e = t.x - r), |
| 2980 | (n = t.x + r), |
| 2981 | (i = Math.min(t.y, t.base)), |
| 2982 | (a = Math.max(t.y, t.base))) |
| 2983 | : ((r = t.height / 2), |
| 2984 | (e = Math.min(t.x, t.base)), |
| 2985 | (n = Math.max(t.x, t.base)), |
| 2986 | (i = t.y - r), |
| 2987 | (a = t.y + r)), |
| 2988 | { left: e, top: i, right: n, bottom: a } |
| 2989 | ); |
| 2990 | } |
| 2991 | function vt(t, e, n) { |
| 2992 | return t === e ? n : t === n ? e : t; |
| 2993 | } |