| 8390 | ]; |
| 8391 | } |
| 8392 | function If(e, t) { |
| 8393 | const n = "width" === t ? "x" : "y", |
| 8394 | i = e.component.layoutSize.get(t); |
| 8395 | if (!i || "merged" === i) return []; |
| 8396 | const r = e.getSizeSignalRef(t).signal; |
| 8397 | if ("step" === i) { |
| 8398 | const t = e.getScaleComponent(n); |
| 8399 | if (t) { |
| 8400 | const i = t.get("type"), |
| 8401 | o = t.get("range"); |
| 8402 | if (kr(i) && kn(o)) { |
| 8403 | const i = e.scaleName(n); |
| 8404 | if (Um(e.parent)) { |
| 8405 | if ("independent" === e.parent.component.resolve.scale[n]) |
| 8406 | return [Bf(i, o)]; |
| 8407 | } |
| 8408 | return [ |
| 8409 | Bf(i, o), |
| 8410 | { name: r, update: Vf(i, t, `domain('${i}').length`) }, |
| 8411 | ]; |
| 8412 | } |
| 8413 | } |
| 8414 | throw new Error("layout size is step although width/height is not step."); |
| 8415 | } |
| 8416 | if ("container" == i) { |
| 8417 | const t = r.endsWith("width"), |
| 8418 | n = t ? "containerSize()[0]" : "containerSize()[1]", |
| 8419 | i = `isFinite(${n}) ? ${n} : ${Us(e.config.view, t ? "width" : "height")}`; |
| 8420 | return [ |
| 8421 | { name: r, init: i, on: [{ update: i, events: "window:resize" }] }, |
| 8422 | ]; |
| 8423 | } |
| 8424 | return [{ name: r, value: i }]; |
| 8425 | } |
| 8426 | function Bf(e, t) { |
| 8427 | const n = `${e}_step`; |
| 8428 | return wn(t.step) |