virtua 0.52.0 → 0.52.2

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.
package/lib/vue/index.cjs CHANGED
@@ -13,17 +13,17 @@ var t, o = [], {min: r, max: n, abs: s, floor: l} = Math, i = (e, t, o) => r(o,
13
13
  }), e ];
14
14
  }, p = e => e.ownerDocument, m = e => e.defaultView, g = () => (null == t && (t = /iP(hone|od|ad)/.test(navigator.userAgent) || "MacIntel" === navigator.platform && navigator.maxTouchPoints > 0),
15
15
  t), _ = e => n(e.t(), e.o()), $ = ({l: e, i: t, u: o, p: l, m: i, h: c, t: a, S: u, v: f, I: d}, p = 0) => {
16
- let m = !!d, _ = !!p, $ = 1, h = 0, w = 0, S = 0, y = 0, b = 0, z = 0, x = 0, v = 0, I = null, k = [ 0, _ ? n(p - 1, 0) : -1 ], O = 0, R = !1;
17
- const T = /* @__PURE__ */ new Set, A = () => S - w, M = () => A() + b + y, N = e => o(e) - b, C = e => {
16
+ let m = !!d, _ = !!p, $ = 1, h = 0, S = 0, w = 0, y = 0, b = 0, z = 0, x = 0, v = 0, I = null, k = [ 0, _ ? n(p - 1, 0) : -1 ], O = 0, T = !1;
17
+ const R = /* @__PURE__ */ new Set, A = () => w - S, M = () => A() + b + y, N = e => o(e) - b, C = e => {
18
18
  e && (g() && 0 !== x || I && 1 === v ? b += e : y += e);
19
19
  };
20
20
  return {
21
21
  k: () => {
22
- T.clear();
22
+ R.clear();
23
23
  },
24
24
  O: () => $,
25
25
  l: (t = 200) => {
26
- if (!R || _) return k;
26
+ if (!T || _) return k;
27
27
  let o, s;
28
28
  if (z) [o, s] = k; else {
29
29
  let l = n(0, M()), i = l + h;
@@ -32,33 +32,33 @@ t), _ = e => n(e.t(), e.o()), $ = ({l: e, i: t, u: o, p: l, m: i, h: c, t: a, S:
32
32
  }
33
33
  return [ n(o, 0), r(s, u() - 1) ];
34
34
  },
35
- R: e => t(e - w),
36
- T: c,
35
+ T: e => t(e - S),
36
+ R: c,
37
37
  u: N,
38
38
  p: l,
39
39
  A: u,
40
- M: () => S,
40
+ M: () => w,
41
41
  N: () => 0 !== x,
42
42
  o: () => h,
43
- C: () => w,
43
+ C: () => S,
44
44
  t: a,
45
45
  j: () => (z = y, y = 0, [ z, 2 === v ]),
46
46
  q: (e, t) => {
47
47
  const o = [ e, t ];
48
- return T.add(o), () => {
49
- T.delete(o);
48
+ return R.add(o), () => {
49
+ R.delete(o);
50
50
  };
51
51
  },
52
- B: (o, r) => {
52
+ P: (o, r) => {
53
53
  let n, u, p = 0;
54
54
  switch (o) {
55
55
  case 1:
56
56
  {
57
- if (r === S && 0 === v) break;
57
+ if (r === w && 0 === v) break;
58
58
  const e = z;
59
59
  z = 0;
60
- const t = r - S, o = s(t);
61
- e && o < s(e) + 1 || 0 !== v || (x = t < 0 ? 2 : 1), _ && (_ = !1), S = r, p = 4;
60
+ const t = r - w, o = s(t);
61
+ e && o < s(e) + 1 || 0 !== v || (x = t < 0 ? 2 : 1), _ && (_ = !1), w = r, p = 4;
62
62
  const n = A();
63
63
  n >= -h && n <= a() && (p += 1, u = o > h);
64
64
  break;
@@ -89,7 +89,7 @@ t), _ = e => n(e.t(), e.o()), $ = ({l: e, i: t, u: o, p: l, m: i, h: c, t: a, S:
89
89
  }
90
90
 
91
91
  case 4:
92
- h !== r && (h || (R = u = !0), h = r, p = 3);
92
+ h !== r && (h || (T = u = !0), h = r, p = 3);
93
93
  break;
94
94
 
95
95
  case 5:
@@ -97,7 +97,7 @@ t), _ = e => n(e.t(), e.o()), $ = ({l: e, i: t, u: o, p: l, m: i, h: c, t: a, S:
97
97
  break;
98
98
 
99
99
  case 6:
100
- w = r;
100
+ S = r;
101
101
  break;
102
102
 
103
103
  case 7:
@@ -111,7 +111,7 @@ t), _ = e => n(e.t(), e.o()), $ = ({l: e, i: t, u: o, p: l, m: i, h: c, t: a, S:
111
111
  case 8:
112
112
  I = e(r, r + h), p = 1;
113
113
  }
114
- p && ($ = 1 + (2147483647 & $), n && b && (y += b, b = 0), T.forEach(([e, t]) => {
114
+ p && ($ = 1 + (2147483647 & $), n && b && (y += b, b = 0), R.forEach(([e, t]) => {
115
115
  p & e && t(u);
116
116
  }));
117
117
  }
@@ -123,13 +123,13 @@ t), _ = e => n(e.t(), e.o()), $ = ({l: e, i: t, u: o, p: l, m: i, h: c, t: a, S:
123
123
  e(t) <= o ? (s = t, r = t + 1) : n = t - 1;
124
124
  }
125
125
  return i(s, 0, t - 1);
126
- }, w = (e, t, o) => {
126
+ }, S = (e, t, o) => {
127
127
  const r = o ? "unshift" : "push";
128
128
  for (let o = 0; o < t; o++) e[r](-1);
129
129
  return e;
130
- }, S = (e, t, o) => {
130
+ }, w = (e, t, o) => {
131
131
  let s = o && o[1] || t || 40, l = -1, i = 0;
132
- const a = o && o[0], u = a ? w(a.slice(0, r(e, a.length)), n(0, e - a.length)) : w([], e), f = w([], e + 1), d = e => {
132
+ const a = o && o[0], u = a ? S(a.slice(0, r(e, a.length)), n(0, e - a.length)) : S([], e), f = S([], e + 1), d = e => {
133
133
  const t = u[e];
134
134
  return -1 === t ? s : t;
135
135
  }, p = t => {
@@ -158,7 +158,7 @@ t), _ = e => n(e.t(), e.o()), $ = ({l: e, i: t, u: o, p: l, m: i, h: c, t: a, S:
158
158
  S: () => e,
159
159
  v: (t, o) => {
160
160
  const n = t - e;
161
- return l = o ? -1 : r(t - 1, l), e = t, n > 0 ? (w(f, n), w(u, n, o), s * n) : (f.splice(n),
161
+ return l = o ? -1 : r(t - 1, l), e = t, n > 0 ? (S(f, n), S(u, n, o), s * n) : (f.splice(n),
162
162
  (o ? u.splice(0, -n) : u.splice(n)).reduce((e, t) => e - (-1 === t ? s : t), 0));
163
163
  },
164
164
  I: t ? void 0 : e => {
@@ -170,68 +170,81 @@ t), _ = e => n(e.t(), e.o()), $ = ({l: e, i: t, u: o, p: l, m: i, h: c, t: a, S:
170
170
  const r = o.length, i = r / 2 | 0, a = r % 2 == 0 ? (o[i - 1] + o[i]) / 2 : o[i], f = s;
171
171
  return ((s = a) - f) * n(e - t, 0);
172
172
  },
173
- L: () => [ u.slice(), s ]
173
+ B: () => [ u.slice(), s ]
174
174
  };
175
175
  }, y = e => "number" == typeof e ? e : e.length, b = (e, t) => "number" == typeof e ? t : e[t], z = (e, t, o = 0) => {
176
+ let s = 0, c = 0;
177
+ const a = (e = 0, t = 0) => {
178
+ s = e, c = t;
179
+ }, u = e => r(s, e), f = e => n(e - c, u(e)), d = (e, t, r, s, l) => {
180
+ const i = t(u(r)), c = t(r) - t(f(r)), a = s + (i ? i - o : 0);
181
+ return e(a, n(a, l - (c ? c - o : 0)));
182
+ };
176
183
  if ("number" == typeof t) {
177
184
  let r = y(e), n = t;
178
- const s = e => n + o ? i(l(e / (n + o)), 0, r - 1) : 0;
185
+ const s = e => n + o ? i(l(e / (n + o)), 0, r - 1) : 0, c = e => e * (n + o), p = (e, t) => [ s(e), s(t) ];
179
186
  return {
180
- l: (e, t) => [ s(e), s(t) ],
187
+ l: (e, t) => d(p, c, r, e, t),
181
188
  i: s,
182
- u: e => e * (n + o),
189
+ u: c,
183
190
  p: () => n,
184
191
  m: () => !1,
185
192
  h: () => !1,
186
193
  t: () => r ? r * (n + o) - o : 0,
187
194
  S: () => r,
188
195
  v: e => (r = e, 0),
189
- P: () => !1,
190
- H: (e, t, o) => {
196
+ L: () => !1,
197
+ H: a,
198
+ W: () => u(r),
199
+ V: () => f(r),
200
+ D: (e, t, o) => {
191
201
  if ("number" != typeof t || t === n) return;
192
202
  const r = s(o) * (t - n);
193
203
  return n = t, r;
194
204
  }
195
205
  };
196
206
  }
197
- const r = "auto" === t;
198
- let n, s = t;
199
- const c = y(e), a = [], u = S(c, void 0, [ [], 40 + o ]), f = e => r || !!a[e], d = {
200
- l: u.l,
201
- i: u.i,
202
- u: u.u,
203
- p: e => u.p(e) - o,
204
- m: (e, t) => f(e) && u.m(e, t + o),
205
- h: (e, t) => u.h(e, t + o),
206
- t: () => u.S() ? u.t() - o : 0,
207
- S: u.S,
208
- v: u.v,
209
- I: r ? u.I : void 0,
210
- P: f,
211
- H: (e, t, l, i) => {
212
- if (r) return;
213
- const c = "number" == typeof t || "auto" === t ? s : t, f = u.S();
214
- if (!i && e === n && c === s && f === a.length) return;
215
- n = e, s = c, a.length = f;
216
- const d = u.i(l), p = u.u(d);
217
- let m;
218
- for (let t = 0; t < f; t++) {
219
- const r = e[t], n = null !== r && "object" == typeof r ? r[c] : null, s = "number" != typeof n;
220
- if (!s || !a[t]) {
221
- a[t] = s;
222
- const e = s ? -1 : n + o;
223
- u.h(t, e) || (u.m(t, e), m = !0);
207
+ const p = "auto" === t;
208
+ let m, g = t;
209
+ const _ = y(e), $ = [], h = w(_, void 0, [ [], 40 + o ]), S = e => p || !!$[e], b = {
210
+ l: (e, t) => d(h.l, h.u, h.S(), e, t),
211
+ i: h.i,
212
+ u: h.u,
213
+ p: e => h.p(e) - o,
214
+ m: (e, t) => S(e) && h.m(e, t + o),
215
+ h: (e, t) => h.h(e, t + o),
216
+ t: () => h.S() ? h.t() - o : 0,
217
+ S: h.S,
218
+ v: h.v,
219
+ I: p ? h.I : void 0,
220
+ L: S,
221
+ H: a,
222
+ W: () => u(h.S()),
223
+ V: () => f(h.S()),
224
+ D: (e, t, r, n) => {
225
+ if (p) return;
226
+ const s = "number" == typeof t || "auto" === t ? g : t, l = h.S();
227
+ if (!n && e === m && s === g && l === $.length) return;
228
+ m = e, g = s, $.length = l;
229
+ const i = h.i(r), c = h.u(i);
230
+ let a;
231
+ for (let t = 0; t < l; t++) {
232
+ const r = e[t], n = null !== r && "object" == typeof r ? r[s] : null, l = "number" != typeof n;
233
+ if (!l || !$[t]) {
234
+ $[t] = l;
235
+ const e = l ? -1 : n + o;
236
+ h.h(t, e) || (h.m(t, e), a = !0);
224
237
  }
225
238
  }
226
- return m ? u.u(d) - p : void 0;
239
+ return a ? h.u(i) - c : void 0;
227
240
  }
228
241
  };
229
- return d.H(e, t, 0), d;
230
- }, x = (e, t, o, r, n) => {
231
- const s = y(o);
232
- s !== e.A() && e.B(5, [ s ]);
233
- const l = t.H(o, r, e.M() - e.u(0), n);
234
- null != l && e.B(9, l);
242
+ return b.D(e, t, 0), b;
243
+ }, x = (e, t, o, r, n, s, l) => {
244
+ const i = y(o);
245
+ t.H(n, s), i !== e.A() && e.P(5, [ i ]);
246
+ const c = t.D(o, r, e.M() - e.u(0), l);
247
+ null != c && e.P(9, c);
235
248
  }, v = /*#__PURE__*/ new WeakMap, I = (e, t, o, s, l, i, c) => {
236
249
  if (t < s || n(t, l) < r(o, i + 1) || c < o) return !0;
237
250
  for (const r of e) if (r >= t && r < o) return !0;
@@ -248,43 +261,40 @@ t), _ = e => n(e.t(), e.o()), $ = ({l: e, i: t, u: o, p: l, m: i, h: c, t: a, S:
248
261
  e[o] <= t ? r = o + 1 : n = o;
249
262
  }
250
263
  return r - 1;
251
- }, R = (e, t, o, r) => {
264
+ }, T = (e, t, o, r) => {
252
265
  const n = O(t, o, r);
253
266
  n >= 0 && e.push(t[n]);
254
- }, T = (e, t, o, r, n, s) => {
267
+ }, R = (e, t, o, r, n) => {
268
+ const s = t.length;
269
+ for (;o < s && t[o] < r; o++) {
270
+ const r = t[o];
271
+ r > n && (e.push(r), n = r);
272
+ }
273
+ return o;
274
+ }, A = (e, t, o, r, n, s) => {
255
275
  const l = [];
256
276
  for (let e = 0; e < o; e++) l.push(e);
257
- const i = e.length;
258
- let c = 0, a = o - 1;
259
- for (;c < i && e[c] < r; c++) {
260
- const t = e[c];
261
- t > a && (l.push(t), a = t);
262
- }
277
+ const i = R(l, e, 0, r, o - 1);
263
278
  for (let e = r; e <= n; e++) l.push(e);
264
- for (a = n; c < i && e[c] < s; c++) {
265
- const t = e[c];
266
- t > a && (l.push(t), a = t);
267
- }
279
+ R(l, e, i, s, n);
268
280
  for (let e = s; e < t; e++) l.push(e);
269
281
  return l;
270
- }, A = (e, t) => r(e.rowIndex + (e.rowSpan || 1), t), M = (e, t) => r(e.colIndex + (e.colSpan || 1), t), N = (e, t, o, n, s, l) => {
282
+ }, M = (e, t) => r(e.rowIndex + (e.rowSpan || 1), t), N = (e, t) => r(e.colIndex + (e.colSpan || 1), t), C = (e, t, o, n, s, l) => {
271
283
  const i = t.length, c = n.length;
272
284
  let a = "[l0]", u = 0, f = 0, d = 0;
273
- for (;f < i || d < c; ) {
274
- const p = f < i ? t[f] : l, m = d < c ? n[d] : l;
275
- if (m <= u) d++; else {
276
- let t, n;
277
- if (p === u) {
278
- t = u + 1;
279
- const r = o[f];
280
- n = null == r ? e.p(u) + "px" : r ? s : "minmax(" + e.p(u) + "px,auto)", f++;
281
- } else t = r(p, m), n = "minmax(" + (e.u(t - 1) + e.p(t - 1) - e.u(u)) + "px,auto)";
282
- a += " " + n + " [l" + t + "]", u = t;
283
- }
285
+ for (;u < l; ) {
286
+ for (;d < c && n[d] <= u; ) d++;
287
+ const p = f < i ? t[f] : l;
288
+ let m, g;
289
+ if (p === u) {
290
+ m = u + 1;
291
+ const t = o[f];
292
+ g = null == t ? e.p(u) + "px" : t ? s : "minmax(" + e.p(u) + "px,auto)", f++;
293
+ } else m = r(p, d < c ? n[d] : l), g = "minmax(" + (e.u(m - 1) + e.p(m - 1) - e.u(u)) + "px,auto)";
294
+ a += " " + g + " [l" + m + "]", u = m;
284
295
  }
285
- return u < l && (a += " minmax(" + (e.t() - e.u(u)) + "px,auto) [l" + l + "]"),
286
- a;
287
- }, C = (e, t, o, r, n) => {
296
+ return a;
297
+ }, E = (e, t, o, r, n) => {
288
298
  const s = {
289
299
  display: "grid",
290
300
  gridTemplateRows: "subgrid",
@@ -293,64 +303,64 @@ t), _ = e => n(e.t(), e.o()), $ = ({l: e, i: t, u: o, p: l, m: i, h: c, t: a, S:
293
303
  gridRow: "l" + e + "/l" + t
294
304
  };
295
305
  return null != o && (s.position = "sticky", s[r] = o + "px", s.zIndex = n), s;
296
- }, E = e => {
306
+ }, j = e => {
297
307
  let t;
298
308
  return {
299
- W(o) {
309
+ F(o) {
300
310
  (t || (t = new (m(p(o)).ResizeObserver)(e))).observe(o);
301
311
  },
302
- V(e) {
312
+ X(e) {
303
313
  t.unobserve(e);
304
314
  },
305
- D() {
315
+ Y() {
306
316
  t && t.disconnect();
307
317
  }
308
318
  };
309
- }, j = (e, t, o, r, n, s, l) => {
319
+ }, q = (e, t, o, r, n, s, l) => {
310
320
  let i, c, d = 0, p = !1, m = !1, _ = !1, $ = !1;
311
- const h = Date.now, w = r ? "scrollLeft" : "scrollTop", S = r ? "left" : "top", y = e => n ? -e : e, b = () => y(o[w]), z = (e, t) => {
321
+ const h = Date.now, S = r ? "scrollLeft" : "scrollTop", w = r ? "left" : "top", y = e => n ? -e : e, b = () => y(o[S]), z = (e, t) => {
312
322
  o.scrollTo({
313
- [S]: y(e),
323
+ [w]: y(e),
314
324
  behavior: t ? "smooth" : "instant"
315
325
  });
316
326
  }, x = () => {
317
327
  if (p || m) return p = !1, void v();
318
- _ = !1, e.B(2);
328
+ _ = !1, e.P(2);
319
329
  }, v = () => {
320
330
  u(c), c = a(x, 150);
321
331
  }, I = () => {
322
- d = h(), _ && ($ = !0), l && e.B(6, l()), e.B(1, b()), v();
332
+ d = h(), _ && ($ = !0), l && e.P(6, l()), e.P(1, b()), v();
323
333
  }, k = t => {
324
334
  if (p || !e.N() || t.ctrlKey) return;
325
335
  const o = h() - d;
326
336
  150 > o && 50 < o && (r ? t.deltaX : t.deltaY) && (p = !0);
327
337
  }, O = () => {
328
338
  m = !0, _ = $ = !1;
329
- }, R = () => {
339
+ }, T = () => {
330
340
  m = !1, g() && (_ = !0);
331
341
  };
332
342
  return t.addEventListener("scroll", I), t.addEventListener("wheel", k, {
333
343
  passive: !0
334
344
  }), t.addEventListener("touchstart", O, {
335
345
  passive: !0
336
- }), t.addEventListener("touchend", R, {
346
+ }), t.addEventListener("touchend", T, {
337
347
  passive: !0
338
348
  }), {
339
- D: () => {
349
+ Y: () => {
340
350
  t.removeEventListener("scroll", I), t.removeEventListener("wheel", k), t.removeEventListener("touchstart", O),
341
- t.removeEventListener("touchend", R), u(c);
351
+ t.removeEventListener("touchend", T), u(c);
342
352
  },
343
- F: () => {
353
+ J: () => {
344
354
  const [t, r] = e.j();
345
355
  if (!t) return;
346
356
  $ && s && s(), $ = !1;
347
357
  const n = e.M() + t;
348
358
  n <= 0 || n >= e.C() + e.t() - e.o() ? z(n) : o.scrollBy({
349
- [S]: y(t),
359
+ [w]: y(t),
350
360
  behavior: "instant"
351
- }), r && (i && i(), e.o() > e.t() && e.B(1, b()));
361
+ }), r && (i && i(), e.o() > e.t() && e.P(1, b()));
352
362
  },
353
- X: (t, o) => {
363
+ U: (t, o) => {
354
364
  let r, n, s;
355
365
  i && i();
356
366
  const l = i = () => {
@@ -358,10 +368,10 @@ t), _ = e => n(e.t(), e.o()), $ = ({l: e, i: t, u: o, p: l, m: i, h: c, t: a, S:
358
368
  }, c = () => {
359
369
  if (!r) {
360
370
  if (e.o() && (u(n), n = a(l, 150)), o) {
361
- for (let [t, o] = e.l(0); t <= o; t++) if (e.T(t)) return;
371
+ for (let [t, o] = e.l(0); t <= o; t++) if (e.R(t)) return;
362
372
  l();
363
373
  }
364
- e.B(7), z(t(), o);
374
+ e.P(7), z(t(), o);
365
375
  }
366
376
  }, d = () => {
367
377
  if (r) return;
@@ -372,11 +382,11 @@ t), _ = e => n(e.t(), e.o()), $ = ({l: e, i: t, u: o, p: l, m: i, h: c, t: a, S:
372
382
  }));
373
383
  }), c();
374
384
  };
375
- o ? (e.B(8, t()), f(d)) : d();
385
+ o ? (e.P(8, t()), f(d)) : d();
376
386
  }
377
387
  };
378
- }, q = (e, t) => {
379
- e.Y(() => t);
388
+ }, P = (e, t) => {
389
+ e.G(() => t);
380
390
  }, B = (e, t, o, {align: r, smooth: n, offset: s = 0} = {}) => {
381
391
  if (o = i(o, 0, t.A() - 1), "nearest" === r) {
382
392
  const e = t.u(o), n = t.M();
@@ -385,40 +395,40 @@ t), _ = e => n(e.t(), e.o()), $ = ({l: e, i: t, u: o, p: l, m: i, h: c, t: a, S:
385
395
  r = "end";
386
396
  }
387
397
  }
388
- e.Y(() => s + e.J() + t.u(o) + ("end" === r ? t.p(o) - t.o() : "center" === r ? (t.p(o) - t.o()) / 2 : 0), n);
389
- }, L = (e, t, o, s, l, c, a, u) => {
390
- const f = t.A(), d = r(o, f), p = n(f - l, d);
391
- c = i(c, 0, f - 1);
392
- const m = k(s, d, p), g = O(m, c, p), _ = g < 0 ? -1 : m[g], $ = () => [ t.u(d) - t.u(0) + (_ < 0 || _ === c ? 0 : t.u(_ + 1) - t.u(_)), t.u(f) - t.u(p) ];
393
- if ("nearest" === a) {
394
- if (c < d || c >= p) return;
395
- const [e, o] = $(), s = t.M(), l = t.p(c);
396
- let i = t.u(c);
397
- if (_ === c) {
398
- const o = (g + 1 < m.length ? m[g + 1] : p) - 1;
399
- i = n(i, r(s + e, t.u(o) + t.p(o) - l));
398
+ e.G(() => s + e.K() + t.u(o) + ("end" === r ? t.p(o) - t.o() : "center" === r ? (t.p(o) - t.o()) / 2 : 0), n);
399
+ }, L = (e, t, o, s, l, c, a) => {
400
+ const u = t.A(), f = o.W(), d = o.V();
401
+ l = i(l, 0, u - 1);
402
+ const p = k(s, f, d), m = O(p, l, d), g = m < 0 ? -1 : p[m], _ = () => o.u(f) + (g < 0 || g === l ? 0 : t.u(g + 1) - t.u(g)), $ = () => o.u(u) - o.u(d);
403
+ if ("nearest" === c) {
404
+ if (l < f || l >= d) return;
405
+ const e = _(), o = t.M() + e, s = t.o() - e - $(), i = t.p(l);
406
+ let a = t.u(l);
407
+ if (g === l) {
408
+ const e = (m + 1 < p.length ? p[m + 1] : d) - 1;
409
+ a = n(a, r(o, t.u(e) + t.p(e) - i));
400
410
  }
401
- if (i < s + e) a = "start"; else {
402
- if (!(i + l > s + t.o() - o)) return;
403
- a = "end";
411
+ if (a < o) c = "start"; else {
412
+ if (!(a + i > o + s)) return;
413
+ c = "end";
404
414
  }
405
415
  }
406
- e.Y(u, () => {
407
- const [e, o] = $(), r = t.p(c) - t.o();
408
- return t.u(c) + ("end" === a ? r + o : "center" === a ? (r + o - e) / 2 : -e);
416
+ e.G(a, () => {
417
+ const e = _(), o = t.p(l) - (t.o() - e - $());
418
+ return t.u(l) - e + ("end" === c ? o : "center" === c ? o / 2 : 0);
409
419
  });
410
- }, P = /* @__PURE__ */ /* @__PURE__ */ (0, e.defineComponent)(t => {
411
- const o = (0, e.ref)(), r = (0, e.computed)(() => t.U.value && t.G.u(t.K)), n = (0,
412
- e.computed)(() => t.U.value && t.G.T(t.K)), s = (0, e.computed)(() => t.Z({
413
- item: t.ee,
414
- index: t.K
420
+ }, H = /* @__PURE__ */ /* @__PURE__ */ (0, e.defineComponent)(t => {
421
+ const o = (0, e.ref)(), r = (0, e.computed)(() => t.Z.value && t.ee.u(t.te)), n = (0,
422
+ e.computed)(() => t.Z.value && t.ee.R(t.te)), s = (0, e.computed)(() => t.oe({
423
+ item: t.re,
424
+ index: t.te
415
425
  }));
416
- return (0, e.watch)(() => o.value && t.K, (e, r, n) => {
417
- n(t.te(o.value, t.K));
426
+ return (0, e.watch)(() => o.value && t.te, (e, r, n) => {
427
+ n(t.ne(o.value, t.te));
418
428
  }, {
419
429
  flush: "post"
420
430
  }), () => {
421
- const {oe: l, re: i, ne: c, K: a, ee: u} = t, f = n.value, {style: d, ...p} = t.se?.({
431
+ const {se: l, le: i, ie: c, te: a, re: u} = t, f = n.value, {style: d, ...p} = t.ce?.({
422
432
  item: u,
423
433
  index: a
424
434
  }) || {}, m = {
@@ -439,24 +449,24 @@ t), _ = e => n(e.t(), e.o()), $ = ({l: e, i: t, u: o, p: l, m: i, h: c, t: a, S:
439
449
  };
440
450
  }, {
441
451
  props: {
442
- U: null,
443
- G: null,
444
452
  Z: null,
445
453
  ee: null,
446
- te: null,
447
- K: null,
448
454
  oe: null,
449
455
  re: null,
450
456
  ne: null,
451
- se: null
457
+ te: null,
458
+ se: null,
459
+ le: null,
460
+ ie: null,
461
+ ce: null
452
462
  }
453
- }), H = (e, t) => {
463
+ }), W = (e, t) => {
454
464
  if (1 === e.length) {
455
465
  const t = e[0].key;
456
466
  if (null != t) return t;
457
467
  }
458
468
  return "_" + t;
459
- }, W = (e, t) => e[0] === t[0] && e[1] === t[1], V = /* @__PURE__ */ /* @__PURE__ */ (0,
469
+ }, V = (e, t) => e[0] === t[0] && e[1] === t[1], D = /* @__PURE__ */ /* @__PURE__ */ (0,
460
470
  e.defineComponent)({
461
471
  props: {
462
472
  data: {
@@ -488,19 +498,19 @@ e.defineComponent)({
488
498
  emits: [ "scroll", "scrollEnd" ],
489
499
  setup(t, {emit: o, expose: r, slots: n}) {
490
500
  let s = !!t.ssrCount;
491
- const l = t.horizontal, i = (0, e.ref)(), u = S(t.data.length, t.itemSize, t.cache), f = $(u, t.ssrCount), p = ((e, t) => {
501
+ const l = t.horizontal, i = (0, e.ref)(), u = w(t.data.length, t.itemSize, t.cache), f = $(u, t.ssrCount), p = ((e, t) => {
492
502
  let o, r, n = d();
493
- const s = /* @__PURE__ */ new WeakMap, l = E(r => {
503
+ const s = /* @__PURE__ */ new WeakMap, l = j(r => {
494
504
  const n = [];
495
- for (const {target: l, contentRect: {width: i, height: c}} of r) if (l === o) (i || c) && e.B(4, t ? i : c); else if (l.offsetParent) {
505
+ for (const {target: l, contentRect: {width: i, height: c}} of r) if (l === o) (i || c) && e.P(4, t ? i : c); else if (l.offsetParent) {
496
506
  const e = s.get(l);
497
507
  null != e && n.push([ e, t ? i : c ]);
498
508
  }
499
- n.length && e.B(3, n);
509
+ n.length && e.P(3, n);
500
510
  });
501
511
  return {
502
- le(s, i = s.parentElement) {
503
- l.W(o = i), r = j(e, i, i, t, t && "rtl" === getComputedStyle(i).direction, () => {
512
+ ae(s, i = s.parentElement) {
513
+ l.F(o = i), r = q(e, i, i, t, t && "rtl" === getComputedStyle(i).direction, () => {
504
514
  const e = t ? "overflowX" : "overflowY", o = i.style, r = o[e];
505
515
  o[e] = "hidden", a(() => {
506
516
  o[e] = r;
@@ -508,18 +518,18 @@ e.defineComponent)({
508
518
  }), n[1](!0);
509
519
  },
510
520
  k() {
511
- l.D(), r && r.D(), n[1](!1), n = d();
521
+ l.Y(), r && r.Y(), n[1](!1), n = d();
512
522
  },
513
- ie: (e, t) => (s.set(e, t), l.W(e), () => {
514
- s.delete(e), l.V(e);
523
+ ue: (e, t) => (s.set(e, t), l.F(e), () => {
524
+ s.delete(e), l.X(e);
515
525
  }),
516
- async Y(e, t) {
517
- await n[0] && r.X(e, t);
526
+ async G(e, t) {
527
+ await n[0] && r.U(e, t);
518
528
  },
519
- ce() {
520
- r && r.F();
529
+ fe() {
530
+ r && r.J();
521
531
  },
522
- J: e.C
532
+ K: e.C
523
533
  };
524
534
  })(f, l), m = (0, e.ref)(f.O());
525
535
  f.q(1, () => {
@@ -532,12 +542,12 @@ e.defineComponent)({
532
542
  const g = (0, e.computed)(e => {
533
543
  m.value;
534
544
  const o = f.l(t.bufferSize);
535
- return e && W(e, o) ? e : o;
536
- }), h = (0, e.computed)(() => m.value && f.N()), w = (0, e.computed)(() => m.value && f.t());
545
+ return e && V(e, o) ? e : o;
546
+ }), h = (0, e.computed)(() => m.value && f.N()), S = (0, e.computed)(() => m.value && f.t());
537
547
  return (0, e.onMounted)(() => {
538
548
  s = !1;
539
549
  const o = i.value, r = requestAnimationFrame(() => {
540
- p.le(o, t.scrollRef);
550
+ p.ae(o, t.scrollRef);
541
551
  });
542
552
  (0, e.onUnmounted)(() => {
543
553
  cancelAnimationFrame(r);
@@ -545,18 +555,18 @@ e.defineComponent)({
545
555
  }), (0, e.onUnmounted)(() => {
546
556
  f.k(), p.k();
547
557
  }), (0, e.watch)(() => t.data.length, e => {
548
- f.B(5, [ e, t.shift ]);
558
+ f.P(5, [ e, t.shift ]);
549
559
  }), (0, e.watch)(() => t.startMargin, e => {
550
- f.B(6, e);
560
+ f.P(6, e);
551
561
  }, {
552
562
  immediate: !0
553
563
  }), (0, e.watch)([ m ], () => {
554
- p.ce();
564
+ p.fe();
555
565
  }, {
556
566
  flush: "post"
557
567
  }), r({
558
568
  get cache() {
559
- return u.L();
569
+ return u.B();
560
570
  },
561
571
  get scrollOffset() {
562
572
  return f.M();
@@ -567,33 +577,33 @@ e.defineComponent)({
567
577
  get viewportSize() {
568
578
  return f.o();
569
579
  },
570
- findItemIndex: f.R,
580
+ findItemIndex: f.T,
571
581
  getItemOffset: f.u,
572
582
  getItemSize: f.p,
573
583
  scrollToIndex: (e, t) => B(p, f, e, t),
574
- scrollTo: e => q(p, e),
584
+ scrollTo: e => P(p, e),
575
585
  scrollBy: e => ((e, t, o) => {
576
- q(e, o + t.M());
586
+ P(e, o + t.M());
577
587
  })(p, f, e)
578
588
  }), () => {
579
- const o = t.as, r = t.item, a = w.value, u = [], d = o => {
589
+ const o = t.as, r = t.item, a = S.value, u = [], d = o => {
580
590
  const i = n.default({
581
591
  item: t.data[o],
582
592
  index: o
583
593
  });
584
- return (0, e.createVNode)(P, {
585
- key: H(i, o),
586
- U: m,
587
- G: f,
588
- te: p.ie,
589
- K: o,
590
- Z: n.default,
591
- ee: t.data[o],
592
- oe: l,
593
- re: s,
594
- ne: r,
595
- se: t.itemProps
596
- }, null, 8, [ "U", "G", "te", "K", "Z", "ee", "oe", "re", "ne", "se" ]);
594
+ return (0, e.createVNode)(H, {
595
+ key: W(i, o),
596
+ Z: m,
597
+ ee: f,
598
+ ne: p.ue,
599
+ te: o,
600
+ oe: n.default,
601
+ re: t.data[o],
602
+ se: l,
603
+ le: s,
604
+ ie: r,
605
+ ce: t.itemProps
606
+ }, null, 8, [ "Z", "ee", "ne", "te", "oe", "re", "se", "le", "ie", "ce" ]);
597
607
  };
598
608
  if (t.keepMounted) {
599
609
  const e = t.data.length, o = new Set(t.keepMounted);
@@ -621,7 +631,7 @@ e.defineComponent)({
621
631
  var _;
622
632
  };
623
633
  }
624
- }), D = /* @__PURE__ */ /* @__PURE__ */ (0, e.defineComponent)({
634
+ }), F = /* @__PURE__ */ /* @__PURE__ */ (0, e.defineComponent)({
625
635
  props: {
626
636
  data: {
627
637
  type: Array,
@@ -671,7 +681,7 @@ e.defineComponent)({
671
681
  width: "100%",
672
682
  height: "100%"
673
683
  }
674
- }, [ (0, e.createVNode)(V, {
684
+ }, [ (0, e.createVNode)(D, {
675
685
  ref: c,
676
686
  data: t.data,
677
687
  bufferSize: t.bufferSize,
@@ -692,7 +702,7 @@ e.defineComponent)({
692
702
  var o;
693
703
  };
694
704
  }
695
- }), F = /* @__PURE__ */ /* @__PURE__ */ (0, e.defineComponent)({
705
+ }), X = /* @__PURE__ */ /* @__PURE__ */ (0, e.defineComponent)({
696
706
  props: {
697
707
  data: {
698
708
  type: Array,
@@ -716,41 +726,41 @@ e.defineComponent)({
716
726
  emits: [ "scroll", "scrollEnd" ],
717
727
  setup(t, {emit: o, slots: r, expose: n}) {
718
728
  let s = !!t.ssrCount;
719
- const l = t.horizontal, i = (0, e.ref)(), c = S(t.data.length, t.itemSize, t.cache), a = $(c, t.ssrCount), u = ((e, t) => {
729
+ const l = t.horizontal, i = (0, e.ref)(), c = w(t.data.length, t.itemSize, t.cache), a = $(c, t.ssrCount), u = ((e, t) => {
720
730
  let o, r, n, s, l, i = d();
721
- const c = /* @__PURE__ */ new WeakMap, a = E(r => {
731
+ const c = /* @__PURE__ */ new WeakMap, a = j(r => {
722
732
  const n = [];
723
733
  for (const {target: e, contentRect: {width: s, height: i}} of r) if (e === o) l && l(); else if (e.offsetParent) {
724
734
  const o = c.get(e);
725
735
  null != o && n.push([ o, t ? s : i ]);
726
736
  }
727
- n.length && e.B(3, n);
737
+ n.length && e.P(3, n);
728
738
  });
729
739
  return {
730
- le(c) {
740
+ ae(c) {
731
741
  const u = p(c), f = m(u), d = o = u.scrollingElement, g = t && "rtl" === getComputedStyle(d).direction, _ = (e, t, o, r, n = 0) => {
732
742
  const s = r ? "offsetLeft" : "offsetTop", l = n + (g ? t.clientWidth - e[s] - e.offsetWidth : e[s]), i = e.offsetParent;
733
743
  return e !== o && i ? _(i, t, o, r, l) : l;
734
744
  }, $ = s = () => _(c, d, u.body, t), h = l = () => {
735
- e.B(4, d[t ? "clientWidth" : "clientHeight"]);
745
+ e.P(4, d[t ? "clientWidth" : "clientHeight"]);
736
746
  };
737
- f.addEventListener("resize", h), a.W(d), n = () => {
747
+ f.addEventListener("resize", h), a.F(d), n = () => {
738
748
  f.removeEventListener("resize", h);
739
- }, r = j(e, f, d, t, g, null, $), i[1](!0);
749
+ }, r = q(e, f, d, t, g, null, $), i[1](!0);
740
750
  },
741
751
  k() {
742
- n && n(), a.D(), r && r.D(), i[1](!1), i = d();
752
+ n && n(), a.Y(), r && r.Y(), i[1](!1), i = d();
743
753
  },
744
- ie: (e, t) => (c.set(e, t), a.W(e), () => {
745
- c.delete(e), a.V(e);
754
+ ue: (e, t) => (c.set(e, t), a.F(e), () => {
755
+ c.delete(e), a.X(e);
746
756
  }),
747
- async Y(e, t) {
748
- await i[0] && r.X(e, t);
757
+ async G(e, t) {
758
+ await i[0] && r.U(e, t);
749
759
  },
750
- ce() {
751
- r && r.F();
760
+ fe() {
761
+ r && r.J();
752
762
  },
753
- J: () => s()
763
+ K: () => s()
754
764
  };
755
765
  })(a, l), f = (0, e.ref)(a.O());
756
766
  a.q(1, () => {
@@ -763,23 +773,23 @@ e.defineComponent)({
763
773
  const g = (0, e.computed)(e => {
764
774
  f.value;
765
775
  const o = a.l(t.bufferSize);
766
- return e && W(e, o) ? e : o;
776
+ return e && V(e, o) ? e : o;
767
777
  }), _ = (0, e.computed)(() => f.value && a.N()), h = (0, e.computed)(() => f.value && a.t());
768
778
  return (0, e.onMounted)(() => {
769
779
  s = !1;
770
780
  const e = i.value;
771
- e && u.le(e);
781
+ e && u.ae(e);
772
782
  }), (0, e.onUnmounted)(() => {
773
783
  a.k(), u.k();
774
784
  }), (0, e.watch)(() => t.data.length, e => {
775
- a.B(5, [ e, t.shift ]);
785
+ a.P(5, [ e, t.shift ]);
776
786
  }), (0, e.watch)([ f ], () => {
777
- u.ce();
787
+ u.fe();
778
788
  }, {
779
789
  flush: "post"
780
790
  }), n({
781
791
  get cache() {
782
- return c.L();
792
+ return c.B();
783
793
  },
784
794
  get scrollOffset() {
785
795
  return a.M();
@@ -787,7 +797,7 @@ e.defineComponent)({
787
797
  get viewportSize() {
788
798
  return a.o();
789
799
  },
790
- findItemIndex: a.R,
800
+ findItemIndex: a.T,
791
801
  getItemOffset: a.u,
792
802
  getItemSize: a.p,
793
803
  scrollToIndex: (e, t) => B(u, a, e, t)
@@ -798,18 +808,18 @@ e.defineComponent)({
798
808
  item: t.data[o],
799
809
  index: o
800
810
  });
801
- d.push((0, e.createVNode)(P, {
802
- key: H(i, o),
803
- U: f,
804
- G: a,
805
- te: u.ie,
806
- K: o,
807
- Z: r.default,
808
- ee: t.data[o],
809
- oe: l,
810
- re: s,
811
- ne: n
812
- }, null, 8, [ "U", "G", "te", "K", "Z", "ee", "oe", "re", "ne" ]));
811
+ d.push((0, e.createVNode)(H, {
812
+ key: W(i, o),
813
+ Z: f,
814
+ ee: a,
815
+ ne: u.ue,
816
+ te: o,
817
+ oe: r.default,
818
+ re: t.data[o],
819
+ se: l,
820
+ le: s,
821
+ ie: n
822
+ }, null, 8, [ "Z", "ee", "ne", "te", "oe", "re", "se", "le", "ie" ]));
813
823
  }
814
824
  return (0, e.createVNode)(o, {
815
825
  ref: i,
@@ -830,14 +840,14 @@ e.defineComponent)({
830
840
  var p;
831
841
  };
832
842
  }
833
- }), X = /* @__PURE__ */ /* @__PURE__ */ (0, e.defineComponent)(t => {
843
+ }), Y = /* @__PURE__ */ /* @__PURE__ */ (0, e.defineComponent)(t => {
834
844
  const o = (0, e.ref)();
835
- return (0, e.watch)([ o, () => t.ue.ae, () => t.ue.fe ], ([e, o, r], n, s) => {
836
- !e || null == o && null == r || s(t.te(e, o, r));
845
+ return (0, e.watch)([ o, () => t.pe.de, () => t.pe.me ], ([e, o, r], n, s) => {
846
+ !e || null == o && null == r || s(t.ne(e, o, r));
837
847
  }, {
838
848
  flush: "post"
839
849
  }), () => {
840
- const {de: r, pe: n, me: s, ge: l, _e: i, $e: c} = t.ue;
850
+ const {ge: r, _e: n, $e: s, he: l, Se: i, we: c} = t.pe;
841
851
  return (0, e.createVNode)("div", {
842
852
  ref: o,
843
853
  role: l,
@@ -846,69 +856,69 @@ e.defineComponent)({
846
856
  "aria-colspan": s,
847
857
  "aria-sort": i,
848
858
  style: c
849
- }, [ t.Z({
850
- row: t.he,
851
- col: t.we,
859
+ }, [ t.oe({
860
+ row: t.ye,
861
+ col: t.be,
852
862
  cell: {
853
- rowIndex: t.Se,
863
+ rowIndex: t.ze,
854
864
  colIndex: r
855
865
  }
856
866
  }) ], 12, [ "role", "aria-colindex", "aria-rowspan", "aria-colspan", "aria-sort" ]);
857
867
  };
858
868
  }, {
859
869
  props: {
860
- ue: null,
861
- Z: null,
862
- he: null,
863
- we: null,
864
- Se: null,
865
- te: null
870
+ pe: null,
871
+ oe: null,
872
+ ye: null,
873
+ be: null,
874
+ ze: null,
875
+ ne: null
866
876
  }
867
- }), Y = /* @__PURE__ */ /* @__PURE__ */ (0, e.defineComponent)(t => () => {
868
- const {ye: o, be: r, $e: n} = t.ue;
877
+ }), J = /* @__PURE__ */ /* @__PURE__ */ (0, e.defineComponent)(t => () => {
878
+ const {xe: o, ve: r, we: n} = t.pe;
869
879
  return (0, e.createVNode)("div", {
870
880
  role: "row",
871
881
  "aria-rowindex": o + 1,
872
882
  style: n
873
- }, [ r.map(r => (0, e.createVNode)(X, {
874
- key: r.de,
875
- ue: r,
876
- Z: t.Z,
877
- he: t.he,
878
- we: b(t.ze, r.de),
879
- Se: o,
880
- te: t.te
881
- }, null, 8, [ "ue", "Z", "he", "we", "Se", "te" ])) ], 12, [ "aria-rowindex" ]);
883
+ }, [ r.map(r => (0, e.createVNode)(Y, {
884
+ key: r.ge,
885
+ pe: r,
886
+ oe: t.oe,
887
+ ye: t.ye,
888
+ be: b(t.Ie, r.ge),
889
+ ze: o,
890
+ ne: t.ne
891
+ }, null, 8, [ "pe", "oe", "ye", "be", "ze", "ne" ])) ], 12, [ "aria-rowindex" ]);
882
892
  }, {
883
893
  props: {
884
- ue: null,
885
- Z: null,
886
- he: null,
887
- ze: null,
888
- te: null
894
+ pe: null,
895
+ oe: null,
896
+ ye: null,
897
+ Ie: null,
898
+ ne: null
889
899
  }
890
- }), J = /* @__PURE__ */ /* @__PURE__ */ (0, e.defineComponent)(t => () => {
891
- const {xe: o, $e: r} = t.ue;
900
+ }), U = /* @__PURE__ */ /* @__PURE__ */ (0, e.defineComponent)(t => () => {
901
+ const {ke: o, we: r} = t.pe;
892
902
  return (0, e.createVNode)("div", {
893
903
  role: "rowgroup",
894
904
  style: r
895
- }, [ o.map(o => (0, e.createVNode)(Y, {
896
- key: o.ye,
897
- ue: o,
898
- Z: t.Z,
899
- he: b(t.ve, o.ye),
900
- ze: t.ze,
901
- te: t.te
902
- }, null, 8, [ "ue", "Z", "he", "ze", "te" ])) ], 4);
905
+ }, [ o.map(o => (0, e.createVNode)(J, {
906
+ key: o.xe,
907
+ pe: o,
908
+ oe: t.oe,
909
+ ye: b(t.Oe, o.xe),
910
+ Ie: t.Ie,
911
+ ne: t.ne
912
+ }, null, 8, [ "pe", "oe", "ye", "Ie", "ne" ])) ], 4);
903
913
  }, {
904
914
  props: {
905
- ue: null,
906
- Z: null,
907
- ve: null,
908
- ze: null,
909
- te: null
915
+ pe: null,
916
+ oe: null,
917
+ Oe: null,
918
+ Ie: null,
919
+ ne: null
910
920
  }
911
- }), U = /* @__PURE__ */ /* @__PURE__ */ (0, e.defineComponent)({
921
+ }), G = /* @__PURE__ */ /* @__PURE__ */ (0, e.defineComponent)({
912
922
  props: {
913
923
  rows: {
914
924
  type: [ Number, Array ],
@@ -942,25 +952,25 @@ e.defineComponent)({
942
952
  },
943
953
  emits: [ "verticalScroll", "horizontalScroll", "scrollEnd" ],
944
954
  setup(t, {emit: s, expose: l, slots: u}) {
945
- const f = (0, e.ref)(), p = z(t.rows, t.rowHeight, t.gap), m = z(t.cols, t.colWidth, t.gap), g = $(p), h = $(m), w = ((e, t) => {
955
+ const f = (0, e.ref)(), p = z(t.rows, t.rowHeight, t.gap), m = z(t.cols, t.colWidth, t.gap), g = $(p), h = $(m), S = ((e, t) => {
946
956
  let o, r, n, s = d();
947
- const l = /* @__PURE__ */ new WeakMap, i = /* @__PURE__ */ new WeakMap, c = E(r => {
957
+ const l = /* @__PURE__ */ new WeakMap, i = /* @__PURE__ */ new WeakMap, c = j(r => {
948
958
  const n = [], s = [];
949
- for (const {target: c, contentRect: {width: a, height: u}} of r) if (c === o) (a || u) && (e.B(4, u),
950
- t.B(4, a)); else if (c.offsetParent) {
959
+ for (const {target: c, contentRect: {width: a, height: u}} of r) if (c === o) (a || u) && (e.P(4, u),
960
+ t.P(4, a)); else if (c.offsetParent) {
951
961
  const e = l.get(c), t = i.get(c);
952
962
  null != e && n.push([ e, u ]), null != t && s.push([ t, a ]);
953
963
  }
954
- n.length && e.B(3, n), s.length && t.B(3, s);
964
+ n.length && e.P(3, n), s.length && t.P(3, s);
955
965
  });
956
966
  return {
957
- async Y(e, t) {
958
- await s[0] && (e ? n : r).X(t);
967
+ async G(e, t) {
968
+ await s[0] && (e ? n : r).U(t);
959
969
  },
960
- le(l) {
970
+ ae(l) {
961
971
  const i = o = l.parentElement;
962
- c.W(i);
963
- const u = (e, t) => j(e, i, i, t, t && "rtl" === getComputedStyle(i).direction, () => {
972
+ c.F(i);
973
+ const u = (e, t) => q(e, i, i, t, t && "rtl" === getComputedStyle(i).direction, () => {
964
974
  const e = t ? "overflowX" : "overflowY", o = i.style, r = o[e];
965
975
  o[e] = "hidden", a(() => {
966
976
  o[e] = r;
@@ -969,144 +979,152 @@ e.defineComponent)({
969
979
  r = u(e, !1), n = u(t, !0), s[1](!0);
970
980
  },
971
981
  k() {
972
- c.D(), r && r.D(), n && n.D(), s[1](!1), s = d();
982
+ c.Y(), r && r.Y(), n && n.Y(), s[1](!1), s = d();
973
983
  },
974
- ie: (e, t, o) => (null != t && l.set(e, t), null != o && i.set(e, o), c.W(e), () => {
975
- l.delete(e), i.delete(e), c.V(e);
984
+ ue: (e, t, o) => (null != t && l.set(e, t), null != o && i.set(e, o), c.F(e), () => {
985
+ l.delete(e), i.delete(e), c.X(e);
976
986
  }),
977
- ce() {
978
- r && r.F(), n && n.F();
987
+ fe() {
988
+ r && r.J(), n && n.J();
979
989
  }
980
990
  };
981
- })(g, h), S = (0, e.ref)(g.O() + h.O()), y = () => {
982
- S.value = g.O() + h.O();
991
+ })(g, h), w = (0, e.ref)(g.O() + h.O()), y = () => {
992
+ w.value = g.O() + h.O();
983
993
  };
984
994
  g.q(1, y), h.q(1, y);
985
- let q = !1;
995
+ let R = !1;
986
996
  g.q(4, () => {
987
- q = !0, s("verticalScroll", g.M());
997
+ R = !0, s("verticalScroll", g.M());
988
998
  }), h.q(4, () => {
989
- q = !0, s("horizontalScroll", h.M());
999
+ R = !0, s("horizontalScroll", h.M());
990
1000
  });
991
- const B = () => {
992
- !q || g.N() || h.N() || (q = !1, s("scrollEnd"));
1001
+ const P = () => {
1002
+ !R || g.N() || h.N() || (R = !1, s("scrollEnd"));
993
1003
  };
994
- g.q(8, B), h.q(8, B), (0, e.watchEffect)(() => {
995
- x(g, p, t.rows, t.rowHeight, !0);
1004
+ g.q(8, P), h.q(8, P), (0, e.watchEffect)(() => {
1005
+ x(g, p, t.rows, t.rowHeight, t.headerRows, t.footerRows, !0);
996
1006
  }), (0, e.watchEffect)(() => {
997
- x(h, m, t.cols, t.colWidth, !0);
1007
+ x(h, m, t.cols, t.colWidth, t.headerCols, t.footerCols, !0);
998
1008
  });
999
- const P = (0, e.computed)(() => S.value && g.A()), H = (0, e.computed)(() => S.value && h.A()), W = (0,
1000
- e.computed)(() => (S.value, ((e, t, s, l, a = 0, u = o, f = 0, d = 0, p = 0, m = o, g = o, _) => {
1001
- const $ = e.S(), h = t.S(), w = r(a, $), S = n($ - f, w), y = r(d, h), b = n(h - p, y), z = i(s[0], w, S), x = r(s[1], S - 1), E = i(l[0], y, b), j = r(l[1], b - 1), q = k(u, w, S), B = n(y - 1, 0), L = [], P = [], H = [];
1002
- for (const e of g) e.rowIndex < $ && e.colIndex < h && H.push(e);
1003
- const W = q.length;
1004
- W && (R(L, q, z, S), P.push(B));
1005
- let V = m, D = 0;
1009
+ const B = (0, e.computed)(() => w.value && g.A()), H = (0, e.computed)(() => w.value && h.A()), W = (0,
1010
+ e.computed)(() => (w.value, ((e, t, s, l, a = o, u = o, f = o, d) => {
1011
+ const p = e.S(), m = t.S(), g = e.W(), _ = e.V(), $ = t.W(), h = t.V(), S = i(s[0], g, _), w = r(s[1], _ - 1), y = i(l[0], $, h), b = r(l[1], h - 1), z = k(a, g, _), x = n($ - 1, 0), R = [], j = [], q = [];
1012
+ for (const e of f) e.rowIndex < p && e.colIndex < m && q.push(e);
1013
+ const P = z.length;
1014
+ P && (T(R, z, S, _), j.push(x));
1015
+ let B = u, L = 0;
1006
1016
  do {
1007
- for (;D < H.length; D++) {
1008
- const {rowIndex: e, colIndex: t} = H[D];
1009
- L.push(e), R(L, q, e, S), P.push(t);
1017
+ for (;L < q.length; L++) {
1018
+ const {rowIndex: e, colIndex: t} = q[L];
1019
+ R.push(e), T(R, z, e, _), j.push(t);
1010
1020
  }
1011
1021
  const e = [];
1012
- for (const t of V) {
1013
- const o = t.rowIndex, r = t.colIndex, n = A(t, $), s = M(t, h);
1014
- if (o < $ && r < h && (n - o > 1 || s - r > 1)) if (I(L, o, n, w, z, x, S)) if (I(P, r, s, y, E, j, b)) H.push(t); else {
1015
- const r = O(q, n - 1, S);
1016
- (o < w || r >= 0 && q[r] >= o) && e.push(t);
1017
- } else r < y && e.push(t);
1022
+ for (const t of B) {
1023
+ const o = t.rowIndex, r = t.colIndex, n = M(t, p), s = N(t, m);
1024
+ if (o < p && r < m && (n - o > 1 || s - r > 1)) {
1025
+ const l = I(R, o, n, g, S, w, _);
1026
+ if (l && I(j, r, s, $, y, b, h)) q.push(t); else if (l) {
1027
+ const r = O(z, n - 1, _);
1028
+ (o < g || r >= 0 && z[r] >= o) && e.push(t);
1029
+ } else r < $ && e.push(t);
1030
+ }
1018
1031
  }
1019
- V = e;
1020
- } while (D < H.length);
1021
- c(L), c(P);
1022
- const F = T(L, $, w, z, x, S), X = T(P, h, y, E, j, b), Y = F.length, J = X.length, U = /* @__PURE__ */ new Map, G = [], K = [];
1023
- for (const e of H) {
1024
- const t = A(e, $), o = M(e, h);
1025
- G.push(t), K.push(o);
1026
- const r = X.indexOf(e.colIndex);
1027
- for (let n = F.indexOf(e.rowIndex); n < Y && F[n] < t; n++) {
1028
- const t = F[n] * h;
1029
- for (let n = r; n < J && X[n] < o; n++) U.set(t + X[n], e);
1032
+ B = e;
1033
+ } while (L < q.length);
1034
+ c(R), c(j);
1035
+ const H = A(R, p, g, S, w, _), W = A(j, m, $, y, b, h), V = H.length, D = W.length, F = /* @__PURE__ */ new Map, X = [], Y = [];
1036
+ for (const e of q) {
1037
+ const t = M(e, p), o = N(e, m);
1038
+ X.push(t), Y.push(o);
1039
+ const r = W.indexOf(e.colIndex);
1040
+ for (let n = H.indexOf(e.rowIndex); n < V && H[n] < t; n++) {
1041
+ const t = H[n] * m;
1042
+ for (let n = r; n < D && W[n] < o; n++) F.set(t + W[n], e);
1030
1043
  }
1031
1044
  }
1032
- const Q = [];
1033
- for (const e of X) Q.push(!t.P(e) && null);
1034
- const Z = [], ee = e.u(w), te = [];
1035
- let oe = te;
1036
- const re = v.get(e), ne = /* @__PURE__ */ new Map;
1037
- for (const o of F) {
1038
- const r = o < w, s = o >= S, l = s || o >= z && o <= x, i = O(q, o, S), c = r ? 0 : s ? S : i < 0 ? -1 : q[i];
1045
+ const J = [];
1046
+ for (const e of W) J.push(!t.L(e) && null);
1047
+ const U = [], G = e.u(g), K = [];
1048
+ let Q = K;
1049
+ const Z = v.get(e), ee = /* @__PURE__ */ new Map;
1050
+ for (const o of H) {
1051
+ const r = o < g, s = o >= _, l = s || o >= S && o <= w, i = O(z, o, _), c = r ? 0 : s ? _ : i < 0 ? -1 : z[i];
1039
1052
  if (o === c) {
1040
- const e = r ? w : s ? $ : i + 1 < W ? q[i + 1] : S;
1041
- G.push(e);
1053
+ const e = r ? g : s ? p : i + 1 < P ? z[i + 1] : _;
1054
+ X.push(e);
1042
1055
  const t = [];
1043
- te.push({
1044
- Ie: r ? -1 : s ? -2 : -3 - c,
1045
- xe: t,
1046
- $e: C(c, e, r || s ? 0 : null, s ? "bottom" : "top", 4)
1047
- }), oe = t;
1048
- } else c < 0 && (oe = te);
1049
- const a = i >= 0 && o === c, u = a ? ee : null, f = o * h, d = re && re.get(o), p = d && d.be, m = [];
1050
- let g = 0, v = !e.P(o) && null, I = o + 1, k = !1;
1051
- for (let e = 0; e < J; e++) {
1052
- const s = X[e], i = s < y, c = s >= b, u = c || s >= E && s <= j, d = U.get(f + s);
1053
- if (d ? d.rowIndex !== o || d.colIndex !== s : !(l && u || r || a || i)) continue;
1054
- const w = d ? A(d, $) : o + 1, S = d ? M(d, h) : s + 1, z = w - o > 1, x = S - s > 1, O = z || x, R = O ? w - o : void 0, T = O ? S - s : void 0;
1055
- let N, C;
1056
- I = n(I, w);
1057
- const q = i ? t.u(s) : null, L = c ? t.t() - t.u(S - 1) - t.p(S - 1) : null;
1058
- !1 !== v || z || (N = o, v = !0), !1 !== Q[e] || x || (C = s, Q[e] = !0);
1059
- const P = r ? "columnheader" : s === B && (i || a) ? "rowheader" : "cell", H = "cell" !== P && _ && _.rowIndex === o && _.colIndex === s ? _.order : void 0;
1060
- let W;
1061
- if (p) {
1062
- for (;g < p.length && p[g].de < s; ) g++;
1063
- g < p.length && (W = p[g]);
1064
- }
1065
- if (!W || W.de !== s || W.pe !== R || W.me !== T || W.ke !== q || W.Oe !== L || W.ae !== N || W.fe !== C || W.ge !== P || W._e !== H) {
1066
- const e = {
1067
- contain: "layout style",
1068
- display: "grid",
1069
- gridArea: O ? "1/l" + s + "/l" + w + "/l" + S : "1/l" + s
1070
- };
1071
- z && (e.height = "0px", e.minHeight = "100%", e.zIndex = 1), x && (e.width = "0px",
1072
- e.minWidth = "100%"), (i || c) && (i ? e.insetInlineStart = q + "px" : e.insetInlineEnd = L + "px",
1073
- e.position = "sticky", e.zIndex = 2), W = {
1074
- de: s,
1075
- pe: R,
1076
- me: T,
1077
- ae: N,
1078
- fe: C,
1079
- ge: P,
1080
- _e: H,
1081
- $e: e,
1082
- ke: q,
1083
- Oe: L
1084
- }, k = !0;
1056
+ K.push({
1057
+ Te: r ? -1 : s ? -2 : -3 - c,
1058
+ ke: t,
1059
+ we: E(c, e, r || s ? 0 : null, s ? "bottom" : "top", 4)
1060
+ }), Q = t;
1061
+ } else c < 0 && (Q = K);
1062
+ const a = i >= 0 && o === c, u = a ? G : null, f = o * m, v = Z && Z.get(o), I = v && v.ve, k = [];
1063
+ let T = 0, R = !e.L(o) && null, A = o + 1, C = !1;
1064
+ for (let e = 0; e < D; e++) {
1065
+ const s = W[e], i = s < $, c = s >= h, u = c || s >= y && s <= b, g = F.get(f + s);
1066
+ if (g ? g.rowIndex === o && g.colIndex === s : l && u || r || a || i) {
1067
+ const l = g ? M(g, p) : o + 1, u = g ? N(g, m) : s + 1, f = l - o, _ = u - s, $ = f > 1, h = _ > 1, S = $ || h;
1068
+ let w, y;
1069
+ A = n(A, l);
1070
+ const b = i ? t.u(s) : null, z = c ? t.t() - t.u(u - 1) - t.p(u - 1) : null;
1071
+ !1 !== R || $ || (w = o, R = !0), !1 !== J[e] || h || (y = s, J[e] = !0);
1072
+ const v = r ? "columnheader" : s === x && (i || a) ? "rowheader" : "cell", O = S ? f : void 0, E = S ? _ : void 0, j = "cell" !== v && d && d.rowIndex === o && d.colIndex === s ? d.order : void 0;
1073
+ let q;
1074
+ if (I) {
1075
+ const e = I.length;
1076
+ for (;T < e && I[T].ge < s; ) T++;
1077
+ T < e && I[T].ge === s && (q = I[T]);
1078
+ }
1079
+ if (!q || q._e !== O || q.$e !== E || q.Re !== b || q.Ae !== z || q.de !== w || q.me !== y || q.he !== v || q.Se !== j) {
1080
+ let e = "1/l" + s;
1081
+ S && (e += "/l" + l + "/l" + u);
1082
+ const t = {
1083
+ contain: "layout style",
1084
+ display: "grid",
1085
+ gridArea: e
1086
+ };
1087
+ $ && (t.height = "0px", t.minHeight = "100%", t.zIndex = 1), h && (t.width = "0px",
1088
+ t.minWidth = "100%"), (i || c) && (t[i ? "insetInlineStart" : "insetInlineEnd"] = (i ? b : z) + "px",
1089
+ t.position = "sticky", t.zIndex = 2), q = {
1090
+ ge: s,
1091
+ _e: O,
1092
+ $e: E,
1093
+ de: w,
1094
+ me: y,
1095
+ he: v,
1096
+ Se: j,
1097
+ we: t,
1098
+ Re: b,
1099
+ Ae: z
1100
+ }, C = !0;
1101
+ }
1102
+ k.push(q);
1085
1103
  }
1086
- m.push(W);
1087
1104
  }
1088
- if (Z.push(v), !m.length) continue;
1089
- const R = d && !k && d.be.length === m.length && d.Re === u ? d : {
1090
- ye: o,
1091
- be: m,
1092
- $e: C(o, I, u, "top", 3),
1093
- Re: u
1094
- };
1095
- ne.set(o, R), oe.push(R);
1105
+ if (U.push(R), k.length) {
1106
+ const e = v && !C && v.ve.length === k.length && v.Me === u ? v : {
1107
+ xe: o,
1108
+ ve: k,
1109
+ we: E(o, A, u, "top", 3),
1110
+ Me: u
1111
+ };
1112
+ ee.set(o, e), Q.push(e);
1113
+ }
1096
1114
  }
1097
- return v.set(e, ne), {
1098
- Te: N(e, F, Z, c(G), "max-content", $),
1099
- Ae: N(t, X, Q, c(K), "minmax(max-content,auto)", h),
1100
- Me: te
1115
+ return v.set(e, ee), {
1116
+ Ne: C(e, H, U, c(X), "max-content", p),
1117
+ Ce: C(t, W, J, c(Y), "minmax(max-content,auto)", m),
1118
+ Ee: K
1101
1119
  };
1102
- })(p, m, g.l(t.bufferSize), h.l(t.bufferSize), t.headerRows, t.sectionRows, t.footerRows, t.headerCols, t.footerCols, t.spans, t.keepMounted, t.ariaSort))), V = (0,
1103
- e.computed)(() => S.value && (g.N() || h.N()));
1120
+ })(p, m, g.l(t.bufferSize), h.l(t.bufferSize), t.sectionRows, t.spans, t.keepMounted, t.ariaSort))), V = (0,
1121
+ e.computed)(() => w.value && (g.N() || h.N()));
1104
1122
  return (0, e.onMounted)(() => {
1105
- w.le(f.value);
1123
+ S.ae(f.value);
1106
1124
  }), (0, e.onUnmounted)(() => {
1107
- g.k(), h.k(), w.k();
1108
- }), (0, e.watch)([ S ], () => {
1109
- w.ce();
1125
+ g.k(), h.k(), S.k();
1126
+ }), (0, e.watch)([ w ], () => {
1127
+ S.fe();
1110
1128
  }, {
1111
1129
  flush: "post"
1112
1130
  }), l({
@@ -1128,30 +1146,30 @@ e.defineComponent)({
1128
1146
  get viewportWidth() {
1129
1147
  return h.o();
1130
1148
  },
1131
- findRowIndex: g.R,
1132
- findColIndex: h.R,
1149
+ findRowIndex: g.T,
1150
+ findColIndex: h.T,
1133
1151
  getRowOffset: g.u,
1134
1152
  getColOffset: h.u,
1135
1153
  getRowSize: g.p,
1136
1154
  getColSize: h.p,
1137
- scrollToIndex: e => ((e, t, r, n = 0, s = o, l = 0, i = 0, c = 0, {rowIndex: a, colIndex: u, rowAlign: f, colAlign: d}) => {
1138
- null != a && L(e, t, n, s, l, a, f, !1), null != u && L(e, r, i, o, c, u, d, !0);
1139
- })(w, g, h, t.headerRows, t.sectionRows, t.footerRows, t.headerCols, t.footerCols, e),
1155
+ scrollToIndex: e => ((e, t, r, n, s, l = o, {rowIndex: i, colIndex: c, rowAlign: a, colAlign: u}) => {
1156
+ null != i && L(e, t, n, l, i, a, !1), null != c && L(e, r, s, o, c, u, !0);
1157
+ })(S, g, h, p, m, t.sectionRows, e),
1140
1158
  scrollTo: ({vertical: e, horizontal: t}) => ((e, t, o) => {
1141
- null != t && e.Y(!1, () => t), null != o && e.Y(!0, () => o);
1142
- })(w, e, t),
1159
+ null != t && e.G(!1, () => t), null != o && e.G(!0, () => o);
1160
+ })(S, e, t),
1143
1161
  scrollBy: ({vertical: e, horizontal: t}) => ((e, t, o, r, n) => {
1144
1162
  if (null != r) {
1145
1163
  const o = r + t.M();
1146
- e.Y(!1, () => o);
1164
+ e.G(!1, () => o);
1147
1165
  }
1148
1166
  if (null != n) {
1149
1167
  const t = n + o.M();
1150
- e.Y(!0, () => t);
1168
+ e.G(!0, () => t);
1151
1169
  }
1152
- })(w, g, h, e, t)
1170
+ })(S, g, h, e, t)
1153
1171
  }), () => {
1154
- const {Te: o, Ae: r, Me: n} = W.value, s = g.u(0), l = h.u(0), i = {
1172
+ const {Ne: o, Ce: r, Ee: n} = W.value, s = g.u(0), l = h.u(0), i = {
1155
1173
  contain: "size style",
1156
1174
  overflowAnchor: "none",
1157
1175
  flex: "none",
@@ -1166,7 +1184,7 @@ e.defineComponent)({
1166
1184
  };
1167
1185
  return (0, e.createVNode)("div", {
1168
1186
  role: "table",
1169
- "aria-rowcount": P.value,
1187
+ "aria-rowcount": B.value,
1170
1188
  "aria-colcount": H.value,
1171
1189
  style: {
1172
1190
  overflow: "auto",
@@ -1177,24 +1195,24 @@ e.defineComponent)({
1177
1195
  }, [ (0, e.createVNode)("div", {
1178
1196
  ref: f,
1179
1197
  style: i
1180
- }, [ n.map(o => "xe" in o ? (0, e.createVNode)(J, {
1181
- key: o.Ie,
1182
- ue: o,
1183
- Z: u.default,
1184
- ve: t.rows,
1185
- ze: t.cols,
1186
- te: w.ie
1187
- }, null, 8, [ "ue", "Z", "ve", "ze", "te" ]) : (0, e.createVNode)(Y, {
1188
- key: o.ye,
1189
- ue: o,
1190
- Z: u.default,
1191
- he: b(t.rows, o.ye),
1192
- ze: t.cols,
1193
- te: w.ie
1194
- }, null, 8, [ "ue", "Z", "he", "ze", "te" ])) ], 4) ], 8, [ "aria-rowcount", "aria-colcount" ]);
1198
+ }, [ n.map(o => "ke" in o ? (0, e.createVNode)(U, {
1199
+ key: o.Te,
1200
+ pe: o,
1201
+ oe: u.default,
1202
+ Oe: t.rows,
1203
+ Ie: t.cols,
1204
+ ne: S.ue
1205
+ }, null, 8, [ "pe", "oe", "Oe", "Ie", "ne" ]) : (0, e.createVNode)(J, {
1206
+ key: o.xe,
1207
+ pe: o,
1208
+ oe: u.default,
1209
+ ye: b(t.rows, o.xe),
1210
+ Ie: t.cols,
1211
+ ne: S.ue
1212
+ }, null, 8, [ "pe", "oe", "ye", "Ie", "ne" ])) ], 4) ], 8, [ "aria-rowcount", "aria-colcount" ]);
1195
1213
  };
1196
1214
  }
1197
1215
  });
1198
1216
 
1199
- exports.VGrid = U, exports.VList = D, exports.Virtualizer = V, exports.WindowVirtualizer = F;
1217
+ exports.VGrid = G, exports.VList = F, exports.Virtualizer = D, exports.WindowVirtualizer = X;
1200
1218
  //# sourceMappingURL=index.cjs.map