@fsystem/fswt-ui-tools 0.3.7 → 0.3.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -11757,8 +11757,16 @@ function nt(t, e, r) {
11757
11757
  return -1;
11758
11758
  }
11759
11759
  function zr(t, e, r) {
11760
- var i = (Number(t) - 1) * Number(e);
11761
- return Number(i) + Number(e) >= r.length ? r.slice(Number(i), r.length) : r.slice(Number(i), Number(i) + Number(e));
11760
+ if (!Array.isArray(r) || r.length === 0)
11761
+ return [];
11762
+ const i = Math.max(1, parseInt(t) || 1), s = Math.max(1, parseInt(e) || 10);
11763
+ if (i < 1 || s < 1 || r.length === 0)
11764
+ return [];
11765
+ const u = (i - 1) * s;
11766
+ if (u >= r.length)
11767
+ return [];
11768
+ const h = Math.min(u + s, r.length);
11769
+ return r.slice(u, h);
11762
11770
  }
11763
11771
  function jr(t, e) {
11764
11772
  const r = /* @__PURE__ */ new Map();