| 13041 | return t; |
| 13042 | } |
| 13043 | function Bm(t, e, n) { |
| 13044 | return Xp(n) |
| 13045 | ? (function (t, e, n) { |
| 13046 | const r = n.width(), |
| 13047 | i = n.height(); |
| 13048 | let o; |
| 13049 | if ("radial" === e.gradient) |
| 13050 | o = t.createRadialGradient( |
| 13051 | n.x1 + $m(e.x1, 0.5) * r, |
| 13052 | n.y1 + $m(e.y1, 0.5) * i, |
| 13053 | Math.max(r, i) * $m(e.r1, 0), |
| 13054 | n.x1 + $m(e.x2, 0.5) * r, |
| 13055 | n.y1 + $m(e.y2, 0.5) * i, |
| 13056 | Math.max(r, i) * $m(e.r2, 0.5), |
| 13057 | ); |
| 13058 | else { |
| 13059 | const a = $m(e.x1, 0), |
| 13060 | s = $m(e.y1, 0), |
| 13061 | u = $m(e.x2, 1), |
| 13062 | l = $m(e.y2, 0); |
| 13063 | if (a !== u && s !== l && r !== i) { |
| 13064 | const n = Sc(Math.ceil(r), Math.ceil(i)), |
| 13065 | o = n.getContext("2d"); |
| 13066 | return ( |
| 13067 | o.scale(r, i), |
| 13068 | (o.fillStyle = Tm(o.createLinearGradient(a, s, u, l), e.stops)), |
| 13069 | o.fillRect(0, 0, r, i), |
| 13070 | t.createPattern(n, "no-repeat") |
| 13071 | ); |
| 13072 | } |
| 13073 | o = t.createLinearGradient( |
| 13074 | n.x1 + a * r, |
| 13075 | n.y1 + s * i, |
| 13076 | n.x1 + u * r, |
| 13077 | n.y1 + l * i, |
| 13078 | ); |
| 13079 | } |
| 13080 | return Tm(o, e.stops); |
| 13081 | })(t, n, e.bounds) |
| 13082 | : n; |
| 13083 | } |
| 13084 | function zm(t, e, n) { |
| 13085 | return ( |
| 13086 | (n *= null == e.fillOpacity ? 1 : e.fillOpacity) > 0 && |