vs-datatable 1.2.2 → 1.2.3

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.
@@ -1,9 +1,9 @@
1
- import { defineComponent as _, computed as F, createElementBlock as k, openBlock as y, createElementVNode as w, createCommentVNode as D, Fragment as K, renderList as Q, normalizeClass as G, toDisplayString as H, unref as $, mergeProps as Ae, renderSlot as z, ref as q, watch as Y, createVNode as ne, withModifiers as me, withCtx as X, withDirectives as te, vModelText as ve, nextTick as oe, onMounted as Re, onUnmounted as mt, createBlock as fe, Teleport as Dt, Transition as It, vModelSelect as Xe, normalizeStyle as pt, createSlots as Te, createTextVNode as Ye, onBeforeUnmount as He, isRef as Fe, shallowRef as gt, useAttrs as qt, onBeforeMount as Mt, normalizeProps as nt, guardReactiveProps as ot } from "vue";
1
+ import { defineComponent as _, computed as F, createElementBlock as k, openBlock as y, createElementVNode as w, createCommentVNode as P, Fragment as z, renderList as Q, normalizeClass as G, toDisplayString as H, unref as $, mergeProps as Ae, renderSlot as j, ref as I, watch as Y, createVNode as ne, withModifiers as pe, withCtx as X, withDirectives as te, vModelText as he, nextTick as oe, onMounted as Re, onUnmounted as pt, createBlock as fe, Teleport as Dt, Transition as It, vModelSelect as Qe, normalizeStyle as gt, createSlots as Te, createTextVNode as Ge, onBeforeUnmount as He, isRef as Fe, shallowRef as yt, useAttrs as qt, onBeforeMount as Mt, normalizeProps as ot, guardReactiveProps as st } from "vue";
2
2
  import './index.css';const Bt = (e, n) => n ? n.split(".").reduce((t, o) => t && t[o], e) : "";
3
3
  function re(e, n, t = "id") {
4
4
  return typeof t == "function" ? t(e, n) : e[t] || n;
5
5
  }
6
- function yt(e, n, t = "id") {
6
+ function wt(e, n, t = "id") {
7
7
  return n.some(
8
8
  (o) => re(o, -1, t) === re(e, -1, t)
9
9
  );
@@ -33,10 +33,10 @@ function Kt(e, n, t) {
33
33
  const o = (e - 1) * n + 1, s = Math.min(e * n, t);
34
34
  return { start: o, end: s };
35
35
  }
36
- function wt(e, n) {
36
+ function bt(e, n) {
37
37
  return Math.ceil(e / n);
38
38
  }
39
- function st(e, n, t) {
39
+ function lt(e, n, t) {
40
40
  if (!n || n.trim() === "") return e;
41
41
  const o = n.toLowerCase();
42
42
  return e.filter((s) => Object.values(s).some(
@@ -74,19 +74,19 @@ const jt = ["id"], Ut = ["disabled"], Zt = {
74
74
  set: (f) => {
75
75
  o("update:modelValue", f), o("pageChanged", f);
76
76
  }
77
- }), a = F(() => l.value <= Math.floor(s / 2) ? 1 : l.value >= i.value - Math.floor(s / 2) ? Math.max(i.value - s + 1, 1) : l.value - Math.floor(s / 2)), r = F(() => Math.min(a.value + s - 1, i.value)), i = F(() => wt(t.totalRecords, t.rowsPerPage)), c = F(() => {
77
+ }), a = F(() => l.value <= Math.floor(s / 2) ? 1 : l.value >= i.value - Math.floor(s / 2) ? Math.max(i.value - s + 1, 1) : l.value - Math.floor(s / 2)), r = F(() => Math.min(a.value + s - 1, i.value)), i = F(() => bt(t.totalRecords, t.rowsPerPage)), c = F(() => {
78
78
  const f = [];
79
- for (let u = a.value; u <= r.value; u++)
80
- f.push(u);
79
+ for (let d = a.value; d <= r.value; d++)
80
+ f.push(d);
81
81
  return f;
82
- }), d = (f) => {
82
+ }), u = (f) => {
83
83
  f >= 1 && f <= i.value && (l.value = f);
84
84
  }, v = () => {
85
85
  l.value > 1 && l.value--;
86
86
  }, m = () => {
87
87
  l.value < i.value && l.value++;
88
88
  };
89
- return (f, u) => (y(), k("div", {
89
+ return (f, d) => (y(), k("div", {
90
90
  class: "vs-pagination",
91
91
  id: e.tablename + "-pagination"
92
92
  }, [
@@ -100,10 +100,10 @@ const jt = ["id"], Ut = ["disabled"], Zt = {
100
100
  key: 0,
101
101
  type: "button",
102
102
  class: "vs-pagination-button",
103
- onClick: u[0] || (u[0] = (h) => d(1))
104
- }, " 1 ")) : D("", !0),
105
- a.value > 2 ? (y(), k("span", Zt, "...")) : D("", !0),
106
- (y(!0), k(K, null, Q(c.value, (h) => (y(), k("button", {
103
+ onClick: d[0] || (d[0] = (h) => u(1))
104
+ }, " 1 ")) : P("", !0),
105
+ a.value > 2 ? (y(), k("span", Zt, "...")) : P("", !0),
106
+ (y(!0), k(z, null, Q(c.value, (h) => (y(), k("button", {
107
107
  key: h,
108
108
  type: "button",
109
109
  class: G([
@@ -111,15 +111,15 @@ const jt = ["id"], Ut = ["disabled"], Zt = {
111
111
  { "vs-active": l.value === h }
112
112
  ]),
113
113
  id: e.tablename + "-page-" + h,
114
- onClick: (g) => d(h)
114
+ onClick: (g) => u(h)
115
115
  }, H(h), 11, Xt))), 128)),
116
- r.value < i.value - 1 ? (y(), k("span", Qt, "...")) : D("", !0),
116
+ r.value < i.value - 1 ? (y(), k("span", Qt, "...")) : P("", !0),
117
117
  r.value < i.value ? (y(), k("button", {
118
118
  key: 3,
119
119
  type: "button",
120
120
  class: "vs-pagination-button",
121
- onClick: u[1] || (u[1] = (h) => d(i.value))
122
- }, H(i.value), 1)) : D("", !0),
121
+ onClick: d[1] || (d[1] = (h) => u(i.value))
122
+ }, H(i.value), 1)) : P("", !0),
123
123
  w("button", {
124
124
  onClick: m,
125
125
  type: "button",
@@ -152,7 +152,7 @@ const jt = ["id"], Ut = ["disabled"], Zt = {
152
152
  value: e.modelValue,
153
153
  onChange: l
154
154
  }, [
155
- (y(!0), k(K, null, Q($(s), (i) => (y(), k("option", {
155
+ (y(!0), k(z, null, Q($(s), (i) => (y(), k("option", {
156
156
  key: i,
157
157
  value: i
158
158
  }, H(i), 9, tn))), 128))
@@ -171,7 +171,7 @@ const jt = ["id"], Ut = ["disabled"], Zt = {
171
171
  start: "end",
172
172
  end: "start"
173
173
  };
174
- function lt(e, n, t) {
174
+ function at(e, n, t) {
175
175
  return we(e, De(n, t));
176
176
  }
177
177
  function We(e, n) {
@@ -183,38 +183,38 @@ function be(e) {
183
183
  function Ne(e) {
184
184
  return e.split("-")[1];
185
185
  }
186
- function bt(e) {
186
+ function xt(e) {
187
187
  return e === "x" ? "y" : "x";
188
188
  }
189
- function xt(e) {
189
+ function kt(e) {
190
190
  return e === "y" ? "height" : "width";
191
191
  }
192
192
  const an = /* @__PURE__ */ new Set(["top", "bottom"]);
193
- function he(e) {
193
+ function me(e) {
194
194
  return an.has(be(e)) ? "y" : "x";
195
195
  }
196
- function kt(e) {
197
- return bt(he(e));
196
+ function Ct(e) {
197
+ return xt(me(e));
198
198
  }
199
199
  function rn(e, n, t) {
200
200
  t === void 0 && (t = !1);
201
- const o = Ne(e), s = kt(e), l = xt(s);
201
+ const o = Ne(e), s = Ct(e), l = kt(s);
202
202
  let a = s === "x" ? o === (t ? "end" : "start") ? "right" : "left" : o === "start" ? "bottom" : "top";
203
203
  return n.reference[l] > n.floating[l] && (a = qe(a)), [a, qe(a)];
204
204
  }
205
205
  function cn(e) {
206
206
  const n = qe(e);
207
- return [Ge(e), n, Ge(n)];
207
+ return [Je(e), n, Je(n)];
208
208
  }
209
- function Ge(e) {
209
+ function Je(e) {
210
210
  return e.replace(/start|end/g, (n) => ln[n]);
211
211
  }
212
- const at = ["left", "right"], rt = ["right", "left"], un = ["top", "bottom"], dn = ["bottom", "top"];
212
+ const rt = ["left", "right"], it = ["right", "left"], un = ["top", "bottom"], dn = ["bottom", "top"];
213
213
  function fn(e, n, t) {
214
214
  switch (e) {
215
215
  case "top":
216
216
  case "bottom":
217
- return t ? n ? rt : at : n ? at : rt;
217
+ return t ? n ? it : rt : n ? rt : it;
218
218
  case "left":
219
219
  case "right":
220
220
  return n ? un : dn;
@@ -225,7 +225,7 @@ function fn(e, n, t) {
225
225
  function vn(e, n, t, o) {
226
226
  const s = Ne(e);
227
227
  let l = fn(be(e), t === "start", o);
228
- return s && (l = l.map((a) => a + "-" + s), n && (l = l.concat(l.map(Ge)))), l;
228
+ return s && (l = l.map((a) => a + "-" + s), n && (l = l.concat(l.map(Je)))), l;
229
229
  }
230
230
  function qe(e) {
231
231
  return e.replace(/left|right|bottom|top/g, (n) => sn[n]);
@@ -265,23 +265,23 @@ function Me(e) {
265
265
  y: t
266
266
  };
267
267
  }
268
- function it(e, n, t) {
268
+ function ct(e, n, t) {
269
269
  let {
270
270
  reference: o,
271
271
  floating: s
272
272
  } = e;
273
- const l = he(n), a = kt(n), r = xt(a), i = be(n), c = l === "y", d = o.x + o.width / 2 - s.width / 2, v = o.y + o.height / 2 - s.height / 2, m = o[r] / 2 - s[r] / 2;
273
+ const l = me(n), a = Ct(n), r = kt(a), i = be(n), c = l === "y", u = o.x + o.width / 2 - s.width / 2, v = o.y + o.height / 2 - s.height / 2, m = o[r] / 2 - s[r] / 2;
274
274
  let f;
275
275
  switch (i) {
276
276
  case "top":
277
277
  f = {
278
- x: d,
278
+ x: u,
279
279
  y: o.y - s.height
280
280
  };
281
281
  break;
282
282
  case "bottom":
283
283
  f = {
284
- x: d,
284
+ x: u,
285
285
  y: o.y + o.height
286
286
  };
287
287
  break;
@@ -325,9 +325,9 @@ const pn = async (e, n, t) => {
325
325
  floating: n,
326
326
  strategy: s
327
327
  }), {
328
- x: d,
328
+ x: u,
329
329
  y: v
330
- } = it(c, o, i), m = o, f = {}, u = 0;
330
+ } = ct(c, o, i), m = o, f = {}, d = 0;
331
331
  for (let h = 0; h < r.length; h++) {
332
332
  const {
333
333
  name: g,
@@ -335,10 +335,10 @@ const pn = async (e, n, t) => {
335
335
  } = r[h], {
336
336
  x: S,
337
337
  y: E,
338
- data: L,
339
- reset: P
338
+ data: V,
339
+ reset: L
340
340
  } = await C({
341
- x: d,
341
+ x: u,
342
342
  y: v,
343
343
  initialPlacement: o,
344
344
  placement: m,
@@ -351,30 +351,30 @@ const pn = async (e, n, t) => {
351
351
  floating: n
352
352
  }
353
353
  });
354
- d = S ?? d, v = E ?? v, f = {
354
+ u = S ?? u, v = E ?? v, f = {
355
355
  ...f,
356
356
  [g]: {
357
357
  ...f[g],
358
- ...L
358
+ ...V
359
359
  }
360
- }, P && u <= 50 && (u++, typeof P == "object" && (P.placement && (m = P.placement), P.rects && (c = P.rects === !0 ? await a.getElementRects({
360
+ }, L && d <= 50 && (d++, typeof L == "object" && (L.placement && (m = L.placement), L.rects && (c = L.rects === !0 ? await a.getElementRects({
361
361
  reference: e,
362
362
  floating: n,
363
363
  strategy: s
364
- }) : P.rects), {
365
- x: d,
364
+ }) : L.rects), {
365
+ x: u,
366
366
  y: v
367
- } = it(c, m, i)), h = -1);
367
+ } = ct(c, m, i)), h = -1);
368
368
  }
369
369
  return {
370
- x: d,
370
+ x: u,
371
371
  y: v,
372
372
  placement: m,
373
373
  strategy: s,
374
374
  middlewareData: f
375
375
  };
376
376
  };
377
- async function Ct(e, n) {
377
+ async function St(e, n) {
378
378
  var t;
379
379
  n === void 0 && (n = {});
380
380
  const {
@@ -386,37 +386,37 @@ async function Ct(e, n) {
386
386
  strategy: i
387
387
  } = e, {
388
388
  boundary: c = "clippingAncestors",
389
- rootBoundary: d = "viewport",
389
+ rootBoundary: u = "viewport",
390
390
  elementContext: v = "floating",
391
391
  altBoundary: m = !1,
392
392
  padding: f = 0
393
- } = We(n, e), u = mn(f), g = r[m ? v === "floating" ? "reference" : "floating" : v], C = Me(await l.getClippingRect({
393
+ } = We(n, e), d = mn(f), g = r[m ? v === "floating" ? "reference" : "floating" : v], C = Me(await l.getClippingRect({
394
394
  element: (t = await (l.isElement == null ? void 0 : l.isElement(g))) == null || t ? g : g.contextElement || await (l.getDocumentElement == null ? void 0 : l.getDocumentElement(r.floating)),
395
395
  boundary: c,
396
- rootBoundary: d,
396
+ rootBoundary: u,
397
397
  strategy: i
398
398
  })), S = v === "floating" ? {
399
399
  x: o,
400
400
  y: s,
401
401
  width: a.floating.width,
402
402
  height: a.floating.height
403
- } : a.reference, E = await (l.getOffsetParent == null ? void 0 : l.getOffsetParent(r.floating)), L = await (l.isElement == null ? void 0 : l.isElement(E)) ? await (l.getScale == null ? void 0 : l.getScale(E)) || {
403
+ } : a.reference, E = await (l.getOffsetParent == null ? void 0 : l.getOffsetParent(r.floating)), V = await (l.isElement == null ? void 0 : l.isElement(E)) ? await (l.getScale == null ? void 0 : l.getScale(E)) || {
404
404
  x: 1,
405
405
  y: 1
406
406
  } : {
407
407
  x: 1,
408
408
  y: 1
409
- }, P = Me(l.convertOffsetParentRelativeRectToViewportRelativeRect ? await l.convertOffsetParentRelativeRectToViewportRelativeRect({
409
+ }, L = Me(l.convertOffsetParentRelativeRectToViewportRelativeRect ? await l.convertOffsetParentRelativeRectToViewportRelativeRect({
410
410
  elements: r,
411
411
  rect: S,
412
412
  offsetParent: E,
413
413
  strategy: i
414
414
  }) : S);
415
415
  return {
416
- top: (C.top - P.top + u.top) / L.y,
417
- bottom: (P.bottom - C.bottom + u.bottom) / L.y,
418
- left: (C.left - P.left + u.left) / L.x,
419
- right: (P.right - C.right + u.right) / L.x
416
+ top: (C.top - L.top + d.top) / V.y,
417
+ bottom: (L.bottom - C.bottom + d.bottom) / V.y,
418
+ left: (C.left - L.left + d.left) / V.x,
419
+ right: (L.right - C.right + d.right) / V.x
420
420
  };
421
421
  }
422
422
  const gn = function(e) {
@@ -433,67 +433,67 @@ const gn = function(e) {
433
433
  platform: i,
434
434
  elements: c
435
435
  } = n, {
436
- mainAxis: d = !0,
436
+ mainAxis: u = !0,
437
437
  crossAxis: v = !0,
438
438
  fallbackPlacements: m,
439
439
  fallbackStrategy: f = "bestFit",
440
- fallbackAxisSideDirection: u = "none",
440
+ fallbackAxisSideDirection: d = "none",
441
441
  flipAlignment: h = !0,
442
442
  ...g
443
443
  } = We(e, n);
444
444
  if ((t = l.arrow) != null && t.alignmentOffset)
445
445
  return {};
446
- const C = be(s), S = he(r), E = be(r) === r, L = await (i.isRTL == null ? void 0 : i.isRTL(c.floating)), P = m || (E || !h ? [qe(r)] : cn(r)), B = u !== "none";
447
- !m && B && P.push(...vn(r, h, u, L));
448
- const b = [r, ...P], p = await Ct(n, g), x = [];
446
+ const C = be(s), S = me(r), E = be(r) === r, V = await (i.isRTL == null ? void 0 : i.isRTL(c.floating)), L = m || (E || !h ? [qe(r)] : cn(r)), M = d !== "none";
447
+ !m && M && L.push(...vn(r, h, d, V));
448
+ const b = [r, ...L], p = await St(n, g), x = [];
449
449
  let R = ((o = l.flip) == null ? void 0 : o.overflows) || [];
450
- if (d && x.push(p[C]), v) {
451
- const O = rn(s, a, L);
450
+ if (u && x.push(p[C]), v) {
451
+ const O = rn(s, a, V);
452
452
  x.push(p[O[0]], p[O[1]]);
453
453
  }
454
454
  if (R = [...R, {
455
455
  placement: s,
456
456
  overflows: x
457
457
  }], !x.every((O) => O <= 0)) {
458
- var T, M;
459
- const O = (((T = l.flip) == null ? void 0 : T.index) || 0) + 1, N = b[O];
460
- if (N && (!(v === "alignment" ? S !== he(N) : !1) || // We leave the current main axis only if every placement on that axis
458
+ var T, B;
459
+ const O = (((T = l.flip) == null ? void 0 : T.index) || 0) + 1, K = b[O];
460
+ if (K && (!(v === "alignment" ? S !== me(K) : !1) || // We leave the current main axis only if every placement on that axis
461
461
  // overflows the main axis.
462
- R.every((V) => he(V.placement) === S ? V.overflows[0] > 0 : !0)))
462
+ R.every((N) => me(N.placement) === S ? N.overflows[0] > 0 : !0)))
463
463
  return {
464
464
  data: {
465
465
  index: O,
466
466
  overflows: R
467
467
  },
468
468
  reset: {
469
- placement: N
469
+ placement: K
470
470
  }
471
471
  };
472
- let I = (M = R.filter((W) => W.overflows[0] <= 0).sort((W, V) => W.overflows[1] - V.overflows[1])[0]) == null ? void 0 : M.placement;
473
- if (!I)
472
+ let q = (B = R.filter((W) => W.overflows[0] <= 0).sort((W, N) => W.overflows[1] - N.overflows[1])[0]) == null ? void 0 : B.placement;
473
+ if (!q)
474
474
  switch (f) {
475
475
  case "bestFit": {
476
476
  var A;
477
- const W = (A = R.filter((V) => {
478
- if (B) {
479
- const U = he(V.placement);
480
- return U === S || // Create a bias to the `y` side axis due to horizontal
477
+ const W = (A = R.filter((N) => {
478
+ if (M) {
479
+ const D = me(N.placement);
480
+ return D === S || // Create a bias to the `y` side axis due to horizontal
481
481
  // reading directions favoring greater width.
482
- U === "y";
482
+ D === "y";
483
483
  }
484
484
  return !0;
485
- }).map((V) => [V.placement, V.overflows.filter((U) => U > 0).reduce((U, ge) => U + ge, 0)]).sort((V, U) => V[1] - U[1])[0]) == null ? void 0 : A[0];
486
- W && (I = W);
485
+ }).map((N) => [N.placement, N.overflows.filter((D) => D > 0).reduce((D, ve) => D + ve, 0)]).sort((N, D) => N[1] - D[1])[0]) == null ? void 0 : A[0];
486
+ W && (q = W);
487
487
  break;
488
488
  }
489
489
  case "initialPlacement":
490
- I = r;
490
+ q = r;
491
491
  break;
492
492
  }
493
- if (s !== I)
493
+ if (s !== q)
494
494
  return {
495
495
  reset: {
496
- placement: I
496
+ placement: q
497
497
  }
498
498
  };
499
499
  }
@@ -506,11 +506,11 @@ async function wn(e, n) {
506
506
  placement: t,
507
507
  platform: o,
508
508
  elements: s
509
- } = e, l = await (o.isRTL == null ? void 0 : o.isRTL(s.floating)), a = be(t), r = Ne(t), i = he(t) === "y", c = yn.has(a) ? -1 : 1, d = l && i ? -1 : 1, v = We(n, e);
509
+ } = e, l = await (o.isRTL == null ? void 0 : o.isRTL(s.floating)), a = be(t), r = Ne(t), i = me(t) === "y", c = yn.has(a) ? -1 : 1, u = l && i ? -1 : 1, v = We(n, e);
510
510
  let {
511
511
  mainAxis: m,
512
512
  crossAxis: f,
513
- alignmentAxis: u
513
+ alignmentAxis: d
514
514
  } = typeof v == "number" ? {
515
515
  mainAxis: v,
516
516
  crossAxis: 0,
@@ -520,12 +520,12 @@ async function wn(e, n) {
520
520
  crossAxis: v.crossAxis || 0,
521
521
  alignmentAxis: v.alignmentAxis
522
522
  };
523
- return r && typeof u == "number" && (f = r === "end" ? u * -1 : u), i ? {
524
- x: f * d,
523
+ return r && typeof d == "number" && (f = r === "end" ? d * -1 : d), i ? {
524
+ x: f * u,
525
525
  y: m * c
526
526
  } : {
527
527
  x: m * c,
528
- y: f * d
528
+ y: f * u
529
529
  };
530
530
  }
531
531
  const bn = function(e) {
@@ -578,20 +578,20 @@ const bn = function(e) {
578
578
  } = We(e, n), c = {
579
579
  x: t,
580
580
  y: o
581
- }, d = await Ct(n, i), v = he(be(s)), m = bt(v);
582
- let f = c[m], u = c[v];
581
+ }, u = await St(n, i), v = me(be(s)), m = xt(v);
582
+ let f = c[m], d = c[v];
583
583
  if (l) {
584
- const g = m === "y" ? "top" : "left", C = m === "y" ? "bottom" : "right", S = f + d[g], E = f - d[C];
585
- f = lt(S, f, E);
584
+ const g = m === "y" ? "top" : "left", C = m === "y" ? "bottom" : "right", S = f + u[g], E = f - u[C];
585
+ f = at(S, f, E);
586
586
  }
587
587
  if (a) {
588
- const g = v === "y" ? "top" : "left", C = v === "y" ? "bottom" : "right", S = u + d[g], E = u - d[C];
589
- u = lt(S, u, E);
588
+ const g = v === "y" ? "top" : "left", C = v === "y" ? "bottom" : "right", S = d + u[g], E = d - u[C];
589
+ d = at(S, d, E);
590
590
  }
591
591
  const h = r.fn({
592
592
  ...n,
593
593
  [m]: f,
594
- [v]: u
594
+ [v]: d
595
595
  });
596
596
  return {
597
597
  ...h,
@@ -611,7 +611,7 @@ function Ke() {
611
611
  return typeof window < "u";
612
612
  }
613
613
  function Ee(e) {
614
- return St(e) ? (e.nodeName || "").toLowerCase() : "#document";
614
+ return Rt(e) ? (e.nodeName || "").toLowerCase() : "#document";
615
615
  }
616
616
  function J(e) {
617
617
  var n;
@@ -619,9 +619,9 @@ function J(e) {
619
619
  }
620
620
  function ue(e) {
621
621
  var n;
622
- return (n = (St(e) ? e.ownerDocument : e.document) || window.document) == null ? void 0 : n.documentElement;
622
+ return (n = (Rt(e) ? e.ownerDocument : e.document) || window.document) == null ? void 0 : n.documentElement;
623
623
  }
624
- function St(e) {
624
+ function Rt(e) {
625
625
  return Ke() ? e instanceof Node || e instanceof J(e).Node : !1;
626
626
  }
627
627
  function se(e) {
@@ -630,7 +630,7 @@ function se(e) {
630
630
  function ce(e) {
631
631
  return Ke() ? e instanceof HTMLElement || e instanceof J(e).HTMLElement : !1;
632
632
  }
633
- function ct(e) {
633
+ function ut(e) {
634
634
  return !Ke() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof J(e).ShadowRoot;
635
635
  }
636
636
  const kn = /* @__PURE__ */ new Set(["inline", "contents"]);
@@ -658,22 +658,22 @@ function ze(e) {
658
658
  });
659
659
  }
660
660
  const En = ["transform", "translate", "scale", "rotate", "perspective"], $n = ["transform", "translate", "scale", "rotate", "perspective", "filter"], An = ["paint", "layout", "strict", "content"];
661
- function _e(e) {
662
- const n = et(), t = se(e) ? le(e) : e;
661
+ function et(e) {
662
+ const n = tt(), t = se(e) ? le(e) : e;
663
663
  return En.some((o) => t[o] ? t[o] !== "none" : !1) || (t.containerType ? t.containerType !== "normal" : !1) || !n && (t.backdropFilter ? t.backdropFilter !== "none" : !1) || !n && (t.filter ? t.filter !== "none" : !1) || $n.some((o) => (t.willChange || "").includes(o)) || An.some((o) => (t.contain || "").includes(o));
664
664
  }
665
665
  function Fn(e) {
666
- let n = pe(e);
666
+ let n = ge(e);
667
667
  for (; ce(n) && !Se(n); ) {
668
- if (_e(n))
668
+ if (et(n))
669
669
  return n;
670
670
  if (ze(n))
671
671
  return null;
672
- n = pe(n);
672
+ n = ge(n);
673
673
  }
674
674
  return null;
675
675
  }
676
- function et() {
676
+ function tt() {
677
677
  return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
678
678
  }
679
679
  const Tn = /* @__PURE__ */ new Set(["html", "body", "#document"]);
@@ -692,36 +692,36 @@ function je(e) {
692
692
  scrollTop: e.scrollY
693
693
  };
694
694
  }
695
- function pe(e) {
695
+ function ge(e) {
696
696
  if (Ee(e) === "html")
697
697
  return e;
698
698
  const n = (
699
699
  // Step into the shadow DOM of the parent of a slotted node.
700
700
  e.assignedSlot || // DOM Element detected.
701
701
  e.parentNode || // ShadowRoot detected.
702
- ct(e) && e.host || // Fallback.
702
+ ut(e) && e.host || // Fallback.
703
703
  ue(e)
704
704
  );
705
- return ct(n) ? n.host : n;
705
+ return ut(n) ? n.host : n;
706
706
  }
707
- function Rt(e) {
708
- const n = pe(e);
709
- return Se(n) ? e.ownerDocument ? e.ownerDocument.body : e.body : ce(n) && Ve(n) ? n : Rt(n);
707
+ function Et(e) {
708
+ const n = ge(e);
709
+ return Se(n) ? e.ownerDocument ? e.ownerDocument.body : e.body : ce(n) && Ve(n) ? n : Et(n);
710
710
  }
711
711
  function Oe(e, n, t) {
712
712
  var o;
713
713
  n === void 0 && (n = []), t === void 0 && (t = !0);
714
- const s = Rt(e), l = s === ((o = e.ownerDocument) == null ? void 0 : o.body), a = J(s);
714
+ const s = Et(e), l = s === ((o = e.ownerDocument) == null ? void 0 : o.body), a = J(s);
715
715
  if (l) {
716
- const r = Je(a);
716
+ const r = _e(a);
717
717
  return n.concat(a, a.visualViewport || [], Ve(s) ? s : [], r && t ? Oe(r) : []);
718
718
  }
719
719
  return n.concat(s, Oe(s, [], t));
720
720
  }
721
- function Je(e) {
721
+ function _e(e) {
722
722
  return e.parent && Object.getPrototypeOf(e.parent) ? e.frameElement : null;
723
723
  }
724
- function Et(e) {
724
+ function $t(e) {
725
725
  const n = le(e);
726
726
  let t = parseFloat(n.width) || 0, o = parseFloat(n.height) || 0;
727
727
  const s = ce(e), l = s ? e.offsetWidth : t, a = s ? e.offsetHeight : o, r = Ie(t) !== l || Ie(o) !== a;
@@ -731,18 +731,18 @@ function Et(e) {
731
731
  $: r
732
732
  };
733
733
  }
734
- function tt(e) {
734
+ function nt(e) {
735
735
  return se(e) ? e : e.contextElement;
736
736
  }
737
737
  function ke(e) {
738
- const n = tt(e);
738
+ const n = nt(e);
739
739
  if (!ce(n))
740
740
  return ie(1);
741
741
  const t = n.getBoundingClientRect(), {
742
742
  width: o,
743
743
  height: s,
744
744
  $: l
745
- } = Et(n);
745
+ } = $t(n);
746
746
  let a = (l ? Ie(t.width) : t.width) / o, r = (l ? Ie(t.height) : t.height) / s;
747
747
  return (!a || !Number.isFinite(a)) && (a = 1), (!r || !Number.isFinite(r)) && (r = 1), {
748
748
  x: a,
@@ -750,9 +750,9 @@ function ke(e) {
750
750
  };
751
751
  }
752
752
  const On = /* @__PURE__ */ ie(0);
753
- function $t(e) {
753
+ function At(e) {
754
754
  const n = J(e);
755
- return !et() || !n.visualViewport ? On : {
755
+ return !tt() || !n.visualViewport ? On : {
756
756
  x: n.visualViewport.offsetLeft,
757
757
  y: n.visualViewport.offsetTop
758
758
  };
@@ -762,21 +762,21 @@ function Vn(e, n, t) {
762
762
  }
763
763
  function xe(e, n, t, o) {
764
764
  n === void 0 && (n = !1), t === void 0 && (t = !1);
765
- const s = e.getBoundingClientRect(), l = tt(e);
765
+ const s = e.getBoundingClientRect(), l = nt(e);
766
766
  let a = ie(1);
767
767
  n && (o ? se(o) && (a = ke(o)) : a = ke(e));
768
- const r = Vn(l, t, o) ? $t(l) : ie(0);
769
- let i = (s.left + r.x) / a.x, c = (s.top + r.y) / a.y, d = s.width / a.x, v = s.height / a.y;
768
+ const r = Vn(l, t, o) ? At(l) : ie(0);
769
+ let i = (s.left + r.x) / a.x, c = (s.top + r.y) / a.y, u = s.width / a.x, v = s.height / a.y;
770
770
  if (l) {
771
771
  const m = J(l), f = o && se(o) ? J(o) : o;
772
- let u = m, h = Je(u);
773
- for (; h && o && f !== u; ) {
774
- const g = ke(h), C = h.getBoundingClientRect(), S = le(h), E = C.left + (h.clientLeft + parseFloat(S.paddingLeft)) * g.x, L = C.top + (h.clientTop + parseFloat(S.paddingTop)) * g.y;
775
- i *= g.x, c *= g.y, d *= g.x, v *= g.y, i += E, c += L, u = J(h), h = Je(u);
772
+ let d = m, h = _e(d);
773
+ for (; h && o && f !== d; ) {
774
+ const g = ke(h), C = h.getBoundingClientRect(), S = le(h), E = C.left + (h.clientLeft + parseFloat(S.paddingLeft)) * g.x, V = C.top + (h.clientTop + parseFloat(S.paddingTop)) * g.y;
775
+ i *= g.x, c *= g.y, u *= g.x, v *= g.y, i += E, c += V, d = J(h), h = _e(d);
776
776
  }
777
777
  }
778
778
  return Me({
779
- width: d,
779
+ width: u,
780
780
  height: v,
781
781
  x: i,
782
782
  y: c
@@ -786,7 +786,7 @@ function Ue(e, n) {
786
786
  const t = je(e).scrollLeft;
787
787
  return n ? n.left + t : xe(ue(e)).left + t;
788
788
  }
789
- function At(e, n) {
789
+ function Ft(e, n) {
790
790
  const t = e.getBoundingClientRect(), o = t.left + n.scrollLeft - Ue(e, t), s = t.top + n.scrollTop;
791
791
  return {
792
792
  x: o,
@@ -807,17 +807,17 @@ function Ln(e) {
807
807
  scrollLeft: 0,
808
808
  scrollTop: 0
809
809
  }, c = ie(1);
810
- const d = ie(0), v = ce(o);
810
+ const u = ie(0), v = ce(o);
811
811
  if ((v || !v && !l) && ((Ee(o) !== "body" || Ve(a)) && (i = je(o)), ce(o))) {
812
812
  const f = xe(o);
813
- c = ke(o), d.x = f.x + o.clientLeft, d.y = f.y + o.clientTop;
813
+ c = ke(o), u.x = f.x + o.clientLeft, u.y = f.y + o.clientTop;
814
814
  }
815
- const m = a && !v && !l ? At(a, i) : ie(0);
815
+ const m = a && !v && !l ? Ft(a, i) : ie(0);
816
816
  return {
817
817
  width: t.width * c.x,
818
818
  height: t.height * c.y,
819
- x: t.x * c.x - i.scrollLeft * c.x + d.x + m.x,
820
- y: t.y * c.y - i.scrollTop * c.y + d.y + m.y
819
+ x: t.x * c.x - i.scrollLeft * c.x + u.x + m.x,
820
+ y: t.y * c.y - i.scrollTop * c.y + u.y + m.y
821
821
  };
822
822
  }
823
823
  function Pn(e) {
@@ -834,20 +834,20 @@ function Dn(e) {
834
834
  y: r
835
835
  };
836
836
  }
837
- const ut = 25;
837
+ const dt = 25;
838
838
  function In(e, n) {
839
839
  const t = J(e), o = ue(e), s = t.visualViewport;
840
840
  let l = o.clientWidth, a = o.clientHeight, r = 0, i = 0;
841
841
  if (s) {
842
842
  l = s.width, a = s.height;
843
- const d = et();
844
- (!d || d && n === "fixed") && (r = s.offsetLeft, i = s.offsetTop);
843
+ const u = tt();
844
+ (!u || u && n === "fixed") && (r = s.offsetLeft, i = s.offsetTop);
845
845
  }
846
846
  const c = Ue(o);
847
847
  if (c <= 0) {
848
- const d = o.ownerDocument, v = d.body, m = getComputedStyle(v), f = d.compatMode === "CSS1Compat" && parseFloat(m.marginLeft) + parseFloat(m.marginRight) || 0, u = Math.abs(o.clientWidth - v.clientWidth - f);
849
- u <= ut && (l -= u);
850
- } else c <= ut && (l += c);
848
+ const u = o.ownerDocument, v = u.body, m = getComputedStyle(v), f = u.compatMode === "CSS1Compat" && parseFloat(m.marginLeft) + parseFloat(m.marginRight) || 0, d = Math.abs(o.clientWidth - v.clientWidth - f);
849
+ d <= dt && (l -= d);
850
+ } else c <= dt && (l += c);
851
851
  return {
852
852
  width: l,
853
853
  height: a,
@@ -865,7 +865,7 @@ function Mn(e, n) {
865
865
  y: c
866
866
  };
867
867
  }
868
- function dt(e, n, t) {
868
+ function ft(e, n, t) {
869
869
  let o;
870
870
  if (n === "viewport")
871
871
  o = In(e, t);
@@ -874,7 +874,7 @@ function dt(e, n, t) {
874
874
  else if (se(n))
875
875
  o = Mn(n, t);
876
876
  else {
877
- const s = $t(e);
877
+ const s = At(e);
878
878
  o = {
879
879
  x: n.x - s.x,
880
880
  y: n.y - s.y,
@@ -884,9 +884,9 @@ function dt(e, n, t) {
884
884
  }
885
885
  return Me(o);
886
886
  }
887
- function Ft(e, n) {
888
- const t = pe(e);
889
- return t === n || !se(t) || Se(t) ? !1 : le(t).position === "fixed" || Ft(t, n);
887
+ function Tt(e, n) {
888
+ const t = ge(e);
889
+ return t === n || !se(t) || Se(t) ? !1 : le(t).position === "fixed" || Tt(t, n);
890
890
  }
891
891
  function Bn(e, n) {
892
892
  const t = n.get(e);
@@ -894,10 +894,10 @@ function Bn(e, n) {
894
894
  return t;
895
895
  let o = Oe(e, [], !1).filter((r) => se(r) && Ee(r) !== "body"), s = null;
896
896
  const l = le(e).position === "fixed";
897
- let a = l ? pe(e) : e;
897
+ let a = l ? ge(e) : e;
898
898
  for (; se(a) && !Se(a); ) {
899
- const r = le(a), i = _e(a);
900
- !i && r.position === "fixed" && (s = null), (l ? !i && !s : !i && r.position === "static" && !!s && qn.has(s.position) || Ve(a) && !i && Ft(e, a)) ? o = o.filter((d) => d !== a) : s = r, a = pe(a);
899
+ const r = le(a), i = et(a);
900
+ !i && r.position === "fixed" && (s = null), (l ? !i && !s : !i && r.position === "static" && !!s && qn.has(s.position) || Ve(a) && !i && Tt(e, a)) ? o = o.filter((u) => u !== a) : s = r, a = ge(a);
901
901
  }
902
902
  return n.set(e, o), o;
903
903
  }
@@ -908,10 +908,10 @@ function Hn(e) {
908
908
  rootBoundary: o,
909
909
  strategy: s
910
910
  } = e;
911
- const a = [...t === "clippingAncestors" ? ze(n) ? [] : Bn(n, this._c) : [].concat(t), o], r = a[0], i = a.reduce((c, d) => {
912
- const v = dt(n, d, s);
911
+ const a = [...t === "clippingAncestors" ? ze(n) ? [] : Bn(n, this._c) : [].concat(t), o], r = a[0], i = a.reduce((c, u) => {
912
+ const v = ft(n, u, s);
913
913
  return c.top = we(v.top, c.top), c.right = De(v.right, c.right), c.bottom = De(v.bottom, c.bottom), c.left = we(v.left, c.left), c;
914
- }, dt(n, r, s));
914
+ }, ft(n, r, s));
915
915
  return {
916
916
  width: i.right - i.left,
917
917
  height: i.bottom - i.top,
@@ -923,7 +923,7 @@ function Wn(e) {
923
923
  const {
924
924
  width: n,
925
925
  height: t
926
- } = Et(e);
926
+ } = $t(e);
927
927
  return {
928
928
  width: n,
929
929
  height: t
@@ -945,7 +945,7 @@ function Nn(e, n, t) {
945
945
  i.x = f.x + n.clientLeft, i.y = f.y + n.clientTop;
946
946
  } else s && c();
947
947
  l && !o && s && c();
948
- const d = s && !o && !l ? At(s, r) : ie(0), v = a.left + r.scrollLeft - i.x - d.x, m = a.top + r.scrollTop - i.y - d.y;
948
+ const u = s && !o && !l ? Ft(s, r) : ie(0), v = a.left + r.scrollLeft - i.x - u.x, m = a.top + r.scrollTop - i.y - u.y;
949
949
  return {
950
950
  x: v,
951
951
  y: m,
@@ -953,10 +953,10 @@ function Nn(e, n, t) {
953
953
  height: a.height
954
954
  };
955
955
  }
956
- function Qe(e) {
956
+ function Ye(e) {
957
957
  return le(e).position === "static";
958
958
  }
959
- function ft(e, n) {
959
+ function vt(e, n) {
960
960
  if (!ce(e) || le(e).position === "fixed")
961
961
  return null;
962
962
  if (n)
@@ -964,26 +964,26 @@ function ft(e, n) {
964
964
  let t = e.offsetParent;
965
965
  return ue(e) === t && (t = t.ownerDocument.body), t;
966
966
  }
967
- function Tt(e, n) {
967
+ function Ot(e, n) {
968
968
  const t = J(e);
969
969
  if (ze(e))
970
970
  return t;
971
971
  if (!ce(e)) {
972
- let s = pe(e);
972
+ let s = ge(e);
973
973
  for (; s && !Se(s); ) {
974
- if (se(s) && !Qe(s))
974
+ if (se(s) && !Ye(s))
975
975
  return s;
976
- s = pe(s);
976
+ s = ge(s);
977
977
  }
978
978
  return t;
979
979
  }
980
- let o = ft(e, n);
981
- for (; o && Sn(o) && Qe(o); )
982
- o = ft(o, n);
983
- return o && Se(o) && Qe(o) && !_e(o) ? t : o || Fn(e) || t;
980
+ let o = vt(e, n);
981
+ for (; o && Sn(o) && Ye(o); )
982
+ o = vt(o, n);
983
+ return o && Se(o) && Ye(o) && !et(o) ? t : o || Fn(e) || t;
984
984
  }
985
985
  const Kn = async function(e) {
986
- const n = this.getOffsetParent || Tt, t = this.getDimensions, o = await t(e.floating);
986
+ const n = this.getOffsetParent || Ot, t = this.getDimensions, o = await t(e.floating);
987
987
  return {
988
988
  reference: Nn(e.reference, await n(e.floating), e.strategy),
989
989
  floating: {
@@ -1001,7 +1001,7 @@ const jn = {
1001
1001
  convertOffsetParentRelativeRectToViewportRelativeRect: Ln,
1002
1002
  getDocumentElement: ue,
1003
1003
  getClippingRect: Hn,
1004
- getOffsetParent: Tt,
1004
+ getOffsetParent: Ot,
1005
1005
  getElementRects: Kn,
1006
1006
  getClientRects: Pn,
1007
1007
  getDimensions: Wn,
@@ -1009,7 +1009,7 @@ const jn = {
1009
1009
  isElement: se,
1010
1010
  isRTL: zn
1011
1011
  };
1012
- function Ot(e, n) {
1012
+ function Vt(e, n) {
1013
1013
  return e.x === n.x && e.y === n.y && e.width === n.width && e.height === n.height;
1014
1014
  }
1015
1015
  function Un(e, n) {
@@ -1022,37 +1022,37 @@ function Un(e, n) {
1022
1022
  function a(r, i) {
1023
1023
  r === void 0 && (r = !1), i === void 0 && (i = 1), l();
1024
1024
  const c = e.getBoundingClientRect(), {
1025
- left: d,
1025
+ left: u,
1026
1026
  top: v,
1027
1027
  width: m,
1028
1028
  height: f
1029
1029
  } = c;
1030
1030
  if (r || n(), !m || !f)
1031
1031
  return;
1032
- const u = Le(v), h = Le(s.clientWidth - (d + m)), g = Le(s.clientHeight - (v + f)), C = Le(d), E = {
1033
- rootMargin: -u + "px " + -h + "px " + -g + "px " + -C + "px",
1032
+ const d = Le(v), h = Le(s.clientWidth - (u + m)), g = Le(s.clientHeight - (v + f)), C = Le(u), E = {
1033
+ rootMargin: -d + "px " + -h + "px " + -g + "px " + -C + "px",
1034
1034
  threshold: we(0, De(1, i)) || 1
1035
1035
  };
1036
- let L = !0;
1037
- function P(B) {
1038
- const b = B[0].intersectionRatio;
1036
+ let V = !0;
1037
+ function L(M) {
1038
+ const b = M[0].intersectionRatio;
1039
1039
  if (b !== i) {
1040
- if (!L)
1040
+ if (!V)
1041
1041
  return a();
1042
1042
  b ? a(!1, b) : o = setTimeout(() => {
1043
1043
  a(!1, 1e-7);
1044
1044
  }, 1e3);
1045
1045
  }
1046
- b === 1 && !Ot(c, e.getBoundingClientRect()) && a(), L = !1;
1046
+ b === 1 && !Vt(c, e.getBoundingClientRect()) && a(), V = !1;
1047
1047
  }
1048
1048
  try {
1049
- t = new IntersectionObserver(P, {
1049
+ t = new IntersectionObserver(L, {
1050
1050
  ...E,
1051
1051
  // Handle <iframe>s
1052
1052
  root: s.ownerDocument
1053
1053
  });
1054
1054
  } catch {
1055
- t = new IntersectionObserver(P, E);
1055
+ t = new IntersectionObserver(L, E);
1056
1056
  }
1057
1057
  t.observe(e);
1058
1058
  }
@@ -1066,8 +1066,8 @@ function Zn(e, n, t, o) {
1066
1066
  elementResize: a = typeof ResizeObserver == "function",
1067
1067
  layoutShift: r = typeof IntersectionObserver == "function",
1068
1068
  animationFrame: i = !1
1069
- } = o, c = tt(e), d = s || l ? [...c ? Oe(c) : [], ...Oe(n)] : [];
1070
- d.forEach((C) => {
1069
+ } = o, c = nt(e), u = s || l ? [...c ? Oe(c) : [], ...Oe(n)] : [];
1070
+ u.forEach((C) => {
1071
1071
  s && C.addEventListener("scroll", t, {
1072
1072
  passive: !0
1073
1073
  }), l && C.addEventListener("resize", t);
@@ -1081,17 +1081,17 @@ function Zn(e, n, t, o) {
1081
1081
  (E = f) == null || E.observe(n);
1082
1082
  })), t();
1083
1083
  }), c && !i && f.observe(c), f.observe(n));
1084
- let u, h = i ? xe(e) : null;
1084
+ let d, h = i ? xe(e) : null;
1085
1085
  i && g();
1086
1086
  function g() {
1087
1087
  const C = xe(e);
1088
- h && !Ot(h, C) && t(), h = C, u = requestAnimationFrame(g);
1088
+ h && !Vt(h, C) && t(), h = C, d = requestAnimationFrame(g);
1089
1089
  }
1090
1090
  return t(), () => {
1091
1091
  var C;
1092
- d.forEach((S) => {
1092
+ u.forEach((S) => {
1093
1093
  s && S.removeEventListener("scroll", t), l && S.removeEventListener("resize", t);
1094
- }), v?.(), (C = f) == null || C.disconnect(), f = null, i && cancelAnimationFrame(u);
1094
+ }), v?.(), (C = f) == null || C.disconnect(), f = null, i && cancelAnimationFrame(d);
1095
1095
  };
1096
1096
  }
1097
1097
  const Xn = bn, Qn = xn, Yn = gn, Gn = (e, n, t) => {
@@ -1219,7 +1219,7 @@ function Ce(e, n) {
1219
1219
  throw new Error(`Unsupported filter type: ${e}`);
1220
1220
  }
1221
1221
  }
1222
- function vt(e) {
1222
+ function ht(e) {
1223
1223
  switch (e.type) {
1224
1224
  case "text":
1225
1225
  return e.operator ? ["empty", "notEmpty"].includes(e.operator || "") ? !0 : !!e.value?.trim() : !1;
@@ -1259,7 +1259,7 @@ const Jn = _({
1259
1259
  });
1260
1260
  function _n(e, n, t, o, s, l) {
1261
1261
  return y(), k("div", Ae({ class: e.flexClasses }, e.attrs), [
1262
- z(e.$slots, "default")
1262
+ j(e.$slots, "default")
1263
1263
  ], 16);
1264
1264
  }
1265
1265
  const ye = /* @__PURE__ */ ae(Jn, [["render", _n]]), eo = { class: "vs-multiselect" }, to = { class: "vs-multiselect-actions" }, no = {
@@ -1284,15 +1284,15 @@ const ye = /* @__PURE__ */ ae(Jn, [["render", _n]]), eo = { class: "vs-multisele
1284
1284
  },
1285
1285
  emits: ["update:modelValue"],
1286
1286
  setup(e, { emit: n }) {
1287
- const t = e, o = n, s = q(""), l = q([...t.modelValue ?? []]), a = F(() => {
1287
+ const t = e, o = n, s = I(""), l = I([...t.modelValue ?? []]), a = F(() => {
1288
1288
  const f = new Set(t.columnData.filter(Boolean));
1289
1289
  return Array.from(f);
1290
1290
  }), r = F(() => {
1291
1291
  const f = s.value.toLowerCase();
1292
- return a.value.filter((u) => u.toString().toLowerCase().includes(f));
1293
- }), i = F(() => l.value.length), c = F(() => a.value.length - l.value.length), d = (f) => {
1294
- const u = l.value.indexOf(f);
1295
- u > -1 ? l.value.splice(u, 1) : l.value.push(f), o("update:modelValue", [...l.value]);
1292
+ return a.value.filter((d) => d.toString().toLowerCase().includes(f));
1293
+ }), i = F(() => l.value.length), c = F(() => a.value.length - l.value.length), u = (f) => {
1294
+ const d = l.value.indexOf(f);
1295
+ d > -1 ? l.value.splice(d, 1) : l.value.push(f), o("update:modelValue", [...l.value]);
1296
1296
  }, v = () => {
1297
1297
  l.value = [...a.value], o("update:modelValue", [...l.value]);
1298
1298
  }, m = () => {
@@ -1303,50 +1303,50 @@ const ye = /* @__PURE__ */ ae(Jn, [["render", _n]]), eo = { class: "vs-multisele
1303
1303
  (f) => {
1304
1304
  l.value = [...f || []];
1305
1305
  }
1306
- ), (f, u) => (y(), k("div", eo, [
1306
+ ), (f, d) => (y(), k("div", eo, [
1307
1307
  w("div", to, [
1308
1308
  w("button", {
1309
- onClick: me(v, ["stop"])
1309
+ onClick: pe(v, ["stop"])
1310
1310
  }, "Select All (" + H(c.value) + ")", 1),
1311
1311
  w("button", {
1312
- onClick: me(m, ["stop"])
1312
+ onClick: pe(m, ["stop"])
1313
1313
  }, "Deselect All (" + H(i.value) + ")", 1)
1314
1314
  ]),
1315
1315
  ne(ye, { direction: "row" }, {
1316
1316
  default: X(() => [
1317
1317
  te(w("input", {
1318
1318
  type: "text",
1319
- "onUpdate:modelValue": u[0] || (u[0] = (h) => s.value = h),
1319
+ "onUpdate:modelValue": d[0] || (d[0] = (h) => s.value = h),
1320
1320
  placeholder: "Search...",
1321
1321
  class: "vs-multiselect-search vs-w-full"
1322
1322
  }, null, 512), [
1323
- [ve, s.value]
1323
+ [he, s.value]
1324
1324
  ])
1325
1325
  ]),
1326
1326
  _: 1
1327
1327
  }),
1328
1328
  e.isLoading ? (y(), k("div", no, "Loading options...")) : (y(), k("ul", oo, [
1329
- (y(!0), k(K, null, Q(r.value, (h) => (y(), k("li", {
1329
+ (y(!0), k(z, null, Q(r.value, (h) => (y(), k("li", {
1330
1330
  key: h,
1331
- onClick: me((g) => d(h), ["stop"]),
1331
+ onClick: pe((g) => u(h), ["stop"]),
1332
1332
  class: G({ selected: l.value.includes(h) })
1333
1333
  }, [
1334
1334
  w("span", lo, H(h), 1),
1335
- l.value.includes(h) ? (y(), k("svg", ao, [...u[1] || (u[1] = [
1335
+ l.value.includes(h) ? (y(), k("svg", ao, [...d[1] || (d[1] = [
1336
1336
  w("path", {
1337
1337
  "stroke-linecap": "round",
1338
1338
  "stroke-linejoin": "round",
1339
1339
  "stroke-width": "2",
1340
1340
  d: "M5 13l4 4L19 7"
1341
1341
  }, null, -1)
1342
- ])])) : D("", !0)
1342
+ ])])) : P("", !0)
1343
1343
  ], 10, so))), 128))
1344
1344
  ]))
1345
1345
  ]));
1346
1346
  }
1347
1347
  }), Pe = /* @__PURE__ */ new Map();
1348
1348
  function io(e) {
1349
- const n = q(e.columnData || []), t = q(!1), o = () => t.value = !0, s = () => t.value = !1;
1349
+ const n = I(e.columnData || []), t = I(!1), o = () => t.value = !0, s = () => t.value = !1;
1350
1350
  async function l(r = !1) {
1351
1351
  if (!e.asyncOptions) return;
1352
1352
  const i = e.cacheKey ?? "default";
@@ -1356,8 +1356,8 @@ function io(e) {
1356
1356
  }
1357
1357
  try {
1358
1358
  o();
1359
- const c = await e.asyncOptions(), d = Array.isArray(c) ? c : [];
1360
- n.value = d, Pe.set(i, d);
1359
+ const c = await e.asyncOptions(), u = Array.isArray(c) ? c : [];
1360
+ n.value = u, Pe.set(i, u);
1361
1361
  } catch (c) {
1362
1362
  console.error("Failed to load async filter options:", c);
1363
1363
  } finally {
@@ -1457,19 +1457,19 @@ const co = {
1457
1457
  return b.charAt(0).toUpperCase() + b.slice(1);
1458
1458
  }
1459
1459
  }
1460
- const c = F(() => t.type === "custom" ? [] : t.operators?.length ? t.operators : r[t.type]), d = q(null), v = q(null), m = q(), f = q(!1);
1460
+ const c = F(() => t.type === "custom" ? [] : t.operators?.length ? t.operators : r[t.type]), u = I(null), v = I(null), m = I(), f = I(!1);
1461
1461
  Y(
1462
1462
  () => t.visible,
1463
1463
  async (b) => {
1464
- f.value = !!b, f.value ? (await oe(), E(), t.asyncOptions && a()) : L();
1464
+ f.value = !!b, f.value ? (await oe(), E(), t.asyncOptions && a()) : V();
1465
1465
  },
1466
1466
  { immediate: !0 }
1467
1467
  );
1468
- const u = q(Ce(t.type, t.modelValue));
1468
+ const d = I(Ce(t.type, t.modelValue));
1469
1469
  Y(
1470
1470
  () => t.modelValue,
1471
1471
  (b) => {
1472
- u.value = Ce(t.type, b);
1472
+ d.value = Ce(t.type, b);
1473
1473
  },
1474
1474
  { immediate: !0 }
1475
1475
  );
@@ -1477,17 +1477,17 @@ const co = {
1477
1477
  o("open");
1478
1478
  }
1479
1479
  function g() {
1480
- o("update:modelValue", { ...u.value }), o("apply", { ...u.value });
1480
+ o("update:modelValue", { ...d.value }), o("apply", { ...d.value });
1481
1481
  }
1482
1482
  function C() {
1483
- u.value = Ce(t.type), o("update:modelValue", { ...u.value }), o("clear"), S();
1483
+ d.value = Ce(t.type), o("update:modelValue", { ...d.value }), o("clear"), S();
1484
1484
  }
1485
1485
  function S() {
1486
1486
  o("close");
1487
1487
  }
1488
1488
  function E() {
1489
- !d.value || !v.value || (m.value = Zn(d.value, v.value, () => {
1490
- Gn(d.value, v.value, {
1489
+ !u.value || !v.value || (m.value = Zn(u.value, v.value, () => {
1490
+ Gn(u.value, v.value, {
1491
1491
  placement: "bottom-start",
1492
1492
  middleware: [Xn(6), Yn(), Qn({ padding: 8 })]
1493
1493
  }).then(({ x: b, y: p }) => {
@@ -1500,29 +1500,29 @@ const co = {
1500
1500
  });
1501
1501
  }));
1502
1502
  }
1503
- function L() {
1503
+ function V() {
1504
1504
  m.value?.(), m.value = void 0;
1505
1505
  }
1506
- function P(b) {
1506
+ function L(b) {
1507
1507
  const p = b.target;
1508
- f.value && d.value && v.value && !d.value.contains(p) && !v.value.contains(p) && S();
1508
+ f.value && u.value && v.value && !u.value.contains(p) && !v.value.contains(p) && S();
1509
1509
  }
1510
- function B(b) {
1510
+ function M(b) {
1511
1511
  b.key === "Escape" && f.value && S();
1512
1512
  }
1513
1513
  return Re(() => {
1514
- document.addEventListener("click", P), document.addEventListener("keydown", B);
1515
- }), mt(() => {
1516
- document.removeEventListener("click", P), document.removeEventListener("keydown", B), L();
1517
- }), (b, p) => (y(), k(K, null, [
1514
+ document.addEventListener("click", L), document.addEventListener("keydown", M);
1515
+ }), pt(() => {
1516
+ document.removeEventListener("click", L), document.removeEventListener("keydown", M), V();
1517
+ }), (b, p) => (y(), k(z, null, [
1518
1518
  w("span", {
1519
1519
  ref_key: "referenceRef",
1520
- ref: d,
1520
+ ref: u,
1521
1521
  class: G(["vs-column-filter", {
1522
- "is-active": $(vt)(u.value),
1523
- "in-active": !$(vt)(u.value)
1522
+ "is-active": $(ht)(d.value),
1523
+ "in-active": !$(ht)(d.value)
1524
1524
  }]),
1525
- onClick: me(h, ["stop"])
1525
+ onClick: pe(h, ["stop"])
1526
1526
  }, [...p[13] || (p[13] = [
1527
1527
  w("svg", {
1528
1528
  xmlns: "http://www.w3.org/2000/svg",
@@ -1543,23 +1543,23 @@ const co = {
1543
1543
  ref: v,
1544
1544
  class: "vs-filter-dropdown",
1545
1545
  style: { position: "absolute", "z-index": "1000" },
1546
- onClick: p[12] || (p[12] = me(() => {
1546
+ onClick: p[12] || (p[12] = pe(() => {
1547
1547
  }, ["stop"]))
1548
1548
  }, [
1549
- u.value.type === "text" ? (y(), k("div", co, [
1549
+ d.value.type === "text" ? (y(), k("div", co, [
1550
1550
  c.value.length > 1 ? (y(), k("div", uo, [
1551
1551
  te(w("select", {
1552
- "onUpdate:modelValue": p[0] || (p[0] = (x) => u.value.operator = x),
1552
+ "onUpdate:modelValue": p[0] || (p[0] = (x) => d.value.operator = x),
1553
1553
  class: "vs-operator-select vs-mx-auto vs-w-full"
1554
1554
  }, [
1555
- (y(!0), k(K, null, Q(c.value, (x) => (y(), k("option", {
1555
+ (y(!0), k(z, null, Q(c.value, (x) => (y(), k("option", {
1556
1556
  key: x,
1557
1557
  value: x
1558
1558
  }, H(i(x)), 9, fo))), 128))
1559
1559
  ], 512), [
1560
- [Xe, u.value.operator]
1560
+ [Qe, d.value.operator]
1561
1561
  ])
1562
- ])) : D("", !0),
1562
+ ])) : P("", !0),
1563
1563
  ne(ye, {
1564
1564
  direction: "row",
1565
1565
  class: "mb-6"
@@ -1567,16 +1567,16 @@ const co = {
1567
1567
  default: X(() => [
1568
1568
  te(w("input", {
1569
1569
  type: "text",
1570
- "onUpdate:modelValue": p[1] || (p[1] = (x) => u.value.value = x),
1570
+ "onUpdate:modelValue": p[1] || (p[1] = (x) => d.value.value = x),
1571
1571
  placeholder: "Search...",
1572
1572
  class: "vs-input vs-mx-auto vs-w-full"
1573
1573
  }, null, 512), [
1574
- [ve, u.value.value]
1574
+ [he, d.value.value]
1575
1575
  ])
1576
1576
  ]),
1577
1577
  _: 1
1578
1578
  })
1579
- ])) : u.value.type === "multi-select" ? (y(), k("div", vo, [
1579
+ ])) : d.value.type === "multi-select" ? (y(), k("div", vo, [
1580
1580
  ne(ye, {
1581
1581
  direction: "row",
1582
1582
  class: "mb-6 vs-align-center vs-justify-end"
@@ -1596,34 +1596,34 @@ const co = {
1596
1596
  }, [
1597
1597
  w("path", { d: "M480-160q-134 0-227-93t-93-227q0-134 93-227t227-93q69 0 132 28.5T720-690v-110h80v280H520v-80h168q-32-56-87.5-88T480-720q-100 0-170 70t-70 170q0 100 70 170t170 70q77 0 139-44t87-116h84q-28 106-114 173t-196 67Z" })
1598
1598
  ], -1)
1599
- ])])) : D("", !0)
1599
+ ])])) : P("", !0)
1600
1600
  ]),
1601
1601
  _: 1
1602
1602
  }),
1603
1603
  ne(ro, {
1604
1604
  isLoading: $(l),
1605
1605
  columnData: $(s),
1606
- modelValue: u.value.value,
1607
- "onUpdate:modelValue": p[3] || (p[3] = (x) => u.value.value = x),
1606
+ modelValue: d.value.value,
1607
+ "onUpdate:modelValue": p[3] || (p[3] = (x) => d.value.value = x),
1608
1608
  placeholder: "Select values..."
1609
1609
  }, null, 8, ["isLoading", "columnData", "modelValue"])
1610
- ])) : u.value.type === "number-range" ? (y(), k("div", ho, [
1610
+ ])) : d.value.type === "number-range" ? (y(), k("div", ho, [
1611
1611
  c.value.length > 1 ? (y(), k("div", mo, [
1612
1612
  te(w("select", {
1613
- "onUpdate:modelValue": p[4] || (p[4] = (x) => u.value.operator = x),
1613
+ "onUpdate:modelValue": p[4] || (p[4] = (x) => d.value.operator = x),
1614
1614
  class: "vs-operator-select vs-w-full"
1615
1615
  }, [
1616
- (y(!0), k(K, null, Q(c.value, (x) => (y(), k("option", {
1616
+ (y(!0), k(z, null, Q(c.value, (x) => (y(), k("option", {
1617
1617
  key: x,
1618
1618
  value: x
1619
1619
  }, H(i(x)), 9, po))), 128))
1620
1620
  ], 512), [
1621
- [Xe, u.value.operator]
1621
+ [Qe, d.value.operator]
1622
1622
  ])
1623
1623
  ])) : (y(), k("div", go, [
1624
- w("span", yo, H(u.value.operator), 1)
1624
+ w("span", yo, H(d.value.operator), 1)
1625
1625
  ])),
1626
- u.value.operator === "between" ? (y(), fe(ye, {
1626
+ d.value.operator === "between" ? (y(), fe(ye, {
1627
1627
  key: 2,
1628
1628
  justify: "between",
1629
1629
  align: "center",
@@ -1633,13 +1633,13 @@ const co = {
1633
1633
  default: X(() => [
1634
1634
  te(w("input", {
1635
1635
  type: "number",
1636
- "onUpdate:modelValue": p[5] || (p[5] = (x) => u.value.min = x),
1636
+ "onUpdate:modelValue": p[5] || (p[5] = (x) => d.value.min = x),
1637
1637
  placeholder: "Min",
1638
1638
  class: "vs-input vs-w-full"
1639
1639
  }, null, 512), [
1640
1640
  [
1641
- ve,
1642
- u.value.min,
1641
+ he,
1642
+ d.value.min,
1643
1643
  void 0,
1644
1644
  { number: !0 }
1645
1645
  ]
@@ -1647,59 +1647,59 @@ const co = {
1647
1647
  p[15] || (p[15] = w("span", null, "-", -1)),
1648
1648
  te(w("input", {
1649
1649
  type: "number",
1650
- "onUpdate:modelValue": p[6] || (p[6] = (x) => u.value.max = x),
1650
+ "onUpdate:modelValue": p[6] || (p[6] = (x) => d.value.max = x),
1651
1651
  placeholder: "Max",
1652
1652
  class: "vs-input vs-w-full"
1653
1653
  }, null, 512), [
1654
1654
  [
1655
- ve,
1656
- u.value.max,
1655
+ he,
1656
+ d.value.max,
1657
1657
  void 0,
1658
1658
  { number: !0 }
1659
1659
  ]
1660
1660
  ])
1661
1661
  ]),
1662
1662
  _: 1
1663
- })) : ["equals", "notEqual", "greaterThan", "lessThan"].includes(u.value.operator || "") ? (y(), fe(ye, {
1663
+ })) : ["equals", "notEqual", "greaterThan", "lessThan"].includes(d.value.operator || "") ? (y(), fe(ye, {
1664
1664
  key: 3,
1665
1665
  direction: "row"
1666
1666
  }, {
1667
1667
  default: X(() => [
1668
1668
  te(w("input", {
1669
1669
  type: "number",
1670
- "onUpdate:modelValue": p[7] || (p[7] = (x) => u.value.value = x),
1670
+ "onUpdate:modelValue": p[7] || (p[7] = (x) => d.value.value = x),
1671
1671
  placeholder: "Enter number",
1672
1672
  class: "vs-input vs-w-full"
1673
1673
  }, null, 512), [
1674
1674
  [
1675
- ve,
1676
- u.value.value,
1675
+ he,
1676
+ d.value.value,
1677
1677
  void 0,
1678
1678
  { number: !0 }
1679
1679
  ]
1680
1680
  ])
1681
1681
  ]),
1682
1682
  _: 1
1683
- })) : ["empty", "notEmpty"].includes(u.value.operator || "") ? (y(), k("div", wo, [...p[16] || (p[16] = [
1683
+ })) : ["empty", "notEmpty"].includes(d.value.operator || "") ? (y(), k("div", wo, [...p[16] || (p[16] = [
1684
1684
  w("div", { class: "vs-muted vs-text-center vs-pt-sm" }, "No input required", -1)
1685
- ])])) : D("", !0)
1686
- ])) : u.value.type === "date-range" ? (y(), k("div", bo, [
1685
+ ])])) : P("", !0)
1686
+ ])) : d.value.type === "date-range" ? (y(), k("div", bo, [
1687
1687
  c.value.length > 1 ? (y(), k("div", xo, [
1688
1688
  te(w("select", {
1689
- "onUpdate:modelValue": p[8] || (p[8] = (x) => u.value.operator = x),
1689
+ "onUpdate:modelValue": p[8] || (p[8] = (x) => d.value.operator = x),
1690
1690
  class: "vs-operator-select vs-w-full"
1691
1691
  }, [
1692
- (y(!0), k(K, null, Q(c.value, (x) => (y(), k("option", {
1692
+ (y(!0), k(z, null, Q(c.value, (x) => (y(), k("option", {
1693
1693
  key: x,
1694
1694
  value: x
1695
1695
  }, H(i(x)), 9, ko))), 128))
1696
1696
  ], 512), [
1697
- [Xe, u.value.operator]
1697
+ [Qe, d.value.operator]
1698
1698
  ])
1699
1699
  ])) : (y(), k("div", Co, [
1700
- w("span", So, H(u.value.operator), 1)
1700
+ w("span", So, H(d.value.operator), 1)
1701
1701
  ])),
1702
- u.value.operator === "between" ? (y(), fe(ye, {
1702
+ d.value.operator === "between" ? (y(), fe(ye, {
1703
1703
  key: 2,
1704
1704
  justify: "between",
1705
1705
  align: "center",
@@ -1709,22 +1709,22 @@ const co = {
1709
1709
  default: X(() => [
1710
1710
  te(w("input", {
1711
1711
  type: "date",
1712
- "onUpdate:modelValue": p[9] || (p[9] = (x) => u.value.start = x),
1712
+ "onUpdate:modelValue": p[9] || (p[9] = (x) => d.value.start = x),
1713
1713
  class: "vs-input vs-w-full"
1714
1714
  }, null, 512), [
1715
- [ve, u.value.start]
1715
+ [he, d.value.start]
1716
1716
  ]),
1717
1717
  p[17] || (p[17] = w("span", null, "-", -1)),
1718
1718
  te(w("input", {
1719
1719
  type: "date",
1720
- "onUpdate:modelValue": p[10] || (p[10] = (x) => u.value.end = x),
1720
+ "onUpdate:modelValue": p[10] || (p[10] = (x) => d.value.end = x),
1721
1721
  class: "vs-input vs-w-full"
1722
1722
  }, null, 512), [
1723
- [ve, u.value.end]
1723
+ [he, d.value.end]
1724
1724
  ])
1725
1725
  ]),
1726
1726
  _: 1
1727
- })) : ["equals", "notEqual", "before", "after"].includes(u.value.operator || "") ? (y(), fe(ye, {
1727
+ })) : ["equals", "notEqual", "before", "after"].includes(d.value.operator || "") ? (y(), fe(ye, {
1728
1728
  key: 3,
1729
1729
  direction: "row",
1730
1730
  class: "vs-filter-single-date"
@@ -1732,16 +1732,16 @@ const co = {
1732
1732
  default: X(() => [
1733
1733
  te(w("input", {
1734
1734
  type: "date",
1735
- "onUpdate:modelValue": p[11] || (p[11] = (x) => u.value.value = x),
1735
+ "onUpdate:modelValue": p[11] || (p[11] = (x) => d.value.value = x),
1736
1736
  class: "vs-input vs-w-full"
1737
1737
  }, null, 512), [
1738
- [ve, u.value.value]
1738
+ [he, d.value.value]
1739
1739
  ])
1740
1740
  ]),
1741
1741
  _: 1
1742
- })) : ["empty", "notEmpty"].includes(u.value.operator || "") ? (y(), k("div", Ro, " No date input required ")) : D("", !0)
1743
- ])) : D("", !0),
1744
- u.value.type !== "custom" ? (y(), k("div", Eo, [
1742
+ })) : ["empty", "notEmpty"].includes(d.value.operator || "") ? (y(), k("div", Ro, " No date input required ")) : P("", !0)
1743
+ ])) : P("", !0),
1744
+ d.value.type !== "custom" ? (y(), k("div", Eo, [
1745
1745
  w("button", {
1746
1746
  class: "vs-btn vs-btn-primary",
1747
1747
  onClick: g
@@ -1750,13 +1750,13 @@ const co = {
1750
1750
  class: "vs-btn vs-btn-secondary",
1751
1751
  onClick: C
1752
1752
  }, "Clear")
1753
- ])) : D("", !0),
1754
- z(b.$slots, "custom", {
1755
- filter: u.value,
1753
+ ])) : P("", !0),
1754
+ j(b.$slots, "custom", {
1755
+ filter: d.value,
1756
1756
  apply: g,
1757
1757
  clear: C
1758
1758
  }, void 0, !0)
1759
- ], 512)) : D("", !0)
1759
+ ], 512)) : P("", !0)
1760
1760
  ]),
1761
1761
  _: 3
1762
1762
  })
@@ -1802,13 +1802,13 @@ const co = {
1802
1802
  function c() {
1803
1803
  t.column.field && o("closeFilter", t.column.field);
1804
1804
  }
1805
- function d() {
1805
+ function u() {
1806
1806
  t.column.field && o("openFilter", t.column.field);
1807
1807
  }
1808
1808
  return (v, m) => e.column && e.column.field ? (y(), k("th", {
1809
1809
  key: 0,
1810
1810
  onClick: l,
1811
- style: pt([
1811
+ style: gt([
1812
1812
  {
1813
1813
  width: e.column.width + "%",
1814
1814
  textAlign: "center"
@@ -1822,7 +1822,7 @@ const co = {
1822
1822
  e.column.sortable ? "vs-sortable" : ""
1823
1823
  ]])
1824
1824
  }, [
1825
- z(v.$slots, `header-${e.column.field}`, { column: e.column }, () => [
1825
+ j(v.$slots, `header-${e.column.field}`, { column: e.column }, () => [
1826
1826
  w("div", To, [
1827
1827
  w("span", Oo, H(e.column.label), 1),
1828
1828
  e.column.sortable ? (y(), k("div", Vo, [
@@ -1855,8 +1855,8 @@ const co = {
1855
1855
  w("path", { d: "M480-360 280-560h400L480-360Z" })
1856
1856
  ], -1)
1857
1857
  ])], 2)
1858
- ])) : D("", !0),
1859
- e.sortHelpers.getSortPriority(e.column.field) !== null ? (y(), k("span", Lo, H(e.sortHelpers.getSortPriority(e.column.field)), 1)) : D("", !0),
1858
+ ])) : P("", !0),
1859
+ e.sortHelpers.getSortPriority(e.column.field) !== null ? (y(), k("span", Lo, H(e.sortHelpers.getSortPriority(e.column.field)), 1)) : P("", !0),
1860
1860
  e.column.filter ? (y(), fe(Ao, {
1861
1861
  key: 2,
1862
1862
  type: e.column.filter.type,
@@ -1870,25 +1870,25 @@ const co = {
1870
1870
  onApply: m[1] || (m[1] = (f) => r(f)),
1871
1871
  onClear: i,
1872
1872
  onClose: c,
1873
- onOpen: d
1873
+ onOpen: u
1874
1874
  }, Te({ _: 2 }, [
1875
1875
  e.column.filter.custom ? {
1876
1876
  name: "custom",
1877
- fn: X(({ filter: f, apply: u, clear: h }) => [
1878
- z(v.$slots, e.column.filter.custom, {
1877
+ fn: X(({ filter: f, apply: d, clear: h }) => [
1878
+ j(v.$slots, e.column.filter.custom, {
1879
1879
  filter: f,
1880
- apply: u,
1880
+ apply: d,
1881
1881
  clear: h
1882
1882
  }, void 0, !0)
1883
1883
  ]),
1884
1884
  key: "0"
1885
1885
  } : void 0
1886
- ]), 1032, ["type", "async-options", "field", "operators", "modelValue", "visible", "column-data"])) : D("", !0)
1886
+ ]), 1032, ["type", "async-options", "field", "operators", "modelValue", "visible", "column-data"])) : P("", !0)
1887
1887
  ])
1888
1888
  ], !0)
1889
- ], 14, Fo)) : D("", !0);
1889
+ ], 14, Fo)) : P("", !0);
1890
1890
  }
1891
- }), ht = /* @__PURE__ */ ae(Po, [["__scopeId", "data-v-69e5e343"]]), Do = { key: 0 }, Io = {
1891
+ }), mt = /* @__PURE__ */ ae(Po, [["__scopeId", "data-v-69e5e343"]]), Do = { key: 0 }, Io = {
1892
1892
  key: 0,
1893
1893
  class: "vs-expand-column",
1894
1894
  rowspan: "2",
@@ -1934,30 +1934,30 @@ const co = {
1934
1934
  const l = F({
1935
1935
  get: () => t.filters,
1936
1936
  set: (f) => o("update:filters", f)
1937
- }), a = q(null);
1937
+ }), a = I(null);
1938
1938
  function r(f) {
1939
1939
  a.value = f;
1940
1940
  }
1941
1941
  function i(f) {
1942
1942
  a.value === f && (a.value = null);
1943
1943
  }
1944
- const c = q(null), d = F(() => t.columns.some((f) => f.children && f.children.length)), v = F(() => {
1944
+ const c = I(null), u = F(() => t.columns.some((f) => f.children && f.children.length)), v = F(() => {
1945
1945
  const f = [];
1946
- return t.columns.forEach((u) => {
1947
- u.children && u.children.length ? f.push(...u.children) : f.push(u);
1946
+ return t.columns.forEach((d) => {
1947
+ d.children && d.children.length ? f.push(...d.children) : f.push(d);
1948
1948
  }), f;
1949
1949
  });
1950
1950
  function m(f) {
1951
- return d.value ? t.columns.some(
1952
- (u) => u.children && u.children.some((h) => h.field === f.field)
1951
+ return u.value ? t.columns.some(
1952
+ (d) => d.children && d.children.some((h) => h.field === f.field)
1953
1953
  ) : !0;
1954
1954
  }
1955
- return (f, u) => (y(), k("thead", {
1955
+ return (f, d) => (y(), k("thead", {
1956
1956
  ref_key: "headerRef",
1957
1957
  ref: c
1958
1958
  }, [
1959
- d.value ? (y(), k("tr", Do, [
1960
- e.expandable ? (y(), k("th", Io)) : D("", !0),
1959
+ u.value ? (y(), k("tr", Do, [
1960
+ e.expandable ? (y(), k("th", Io)) : P("", !0),
1961
1961
  e.isItemSelectedControlled ? (y(), k("th", qo, [
1962
1962
  w("div", Mo, [
1963
1963
  w("input", {
@@ -1971,11 +1971,11 @@ const co = {
1971
1971
  for: e.tablename + "-main-checkbox"
1972
1972
  }, null, 8, Ho)
1973
1973
  ])
1974
- ])) : D("", !0),
1975
- (y(!0), k(K, null, Q(t.columns, (h) => (y(), k(K, {
1974
+ ])) : P("", !0),
1975
+ (y(!0), k(z, null, Q(t.columns, (h) => (y(), k(z, {
1976
1976
  key: h.field || h.label
1977
1977
  }, [
1978
- !h.children || !h.children.length ? (y(), fe(ht, Ae({
1978
+ !h.children || !h.children.length ? (y(), fe(mt, Ae({
1979
1979
  key: 0,
1980
1980
  column: h,
1981
1981
  rows: e.rows,
@@ -1986,16 +1986,16 @@ const co = {
1986
1986
  "header-class": e.headerClass,
1987
1987
  tablename: e.tablename
1988
1988
  }, { ref_for: !0 }, f.$attrs, {
1989
- onApplyFilter: u[0] || (u[0] = (g, C) => o("applyFilter", g, C)),
1990
- onClearFilter: u[1] || (u[1] = (g) => o("clearFilter", g)),
1989
+ onApplyFilter: d[0] || (d[0] = (g, C) => o("applyFilter", g, C)),
1990
+ onClearFilter: d[1] || (d[1] = (g) => o("clearFilter", g)),
1991
1991
  onOpenFilter: r,
1992
1992
  onCloseFilter: i,
1993
- "onUpdate:filters": u[2] || (u[2] = (g) => o("update:filters", g))
1993
+ "onUpdate:filters": d[2] || (d[2] = (g) => o("update:filters", g))
1994
1994
  }), Te({ _: 2 }, [
1995
1995
  Q(f.$slots, (g, C) => ({
1996
1996
  name: C,
1997
1997
  fn: X((S) => [
1998
- z(f.$slots, C, Ae({ ref_for: !0 }, S), void 0, !0)
1998
+ j(f.$slots, C, Ae({ ref_for: !0 }, S), void 0, !0)
1999
1999
  ])
2000
2000
  }))
2001
2001
  ]), 1040, ["column", "rows", "sort-helpers", "filters", "open-filter", "header-class", "tablename"])) : (y(), k("th", {
@@ -2006,10 +2006,10 @@ const co = {
2006
2006
  style: { textAlign: "center" }
2007
2007
  }, H(h.label), 9, Wo))
2008
2008
  ], 64))), 128))
2009
- ])) : D("", !0),
2009
+ ])) : P("", !0),
2010
2010
  w("tr", null, [
2011
- e.expandable && !d.value ? (y(), k("th", No)) : D("", !0),
2012
- e.isItemSelectedControlled && !d.value ? (y(), k("th", Ko, [
2011
+ e.expandable && !u.value ? (y(), k("th", No)) : P("", !0),
2012
+ e.isItemSelectedControlled && !u.value ? (y(), k("th", Ko, [
2013
2013
  w("div", zo, [
2014
2014
  w("input", {
2015
2015
  type: "checkbox",
@@ -2022,11 +2022,11 @@ const co = {
2022
2022
  for: e.tablename + "-main-checkbox"
2023
2023
  }, null, 8, Uo)
2024
2024
  ])
2025
- ])) : D("", !0),
2026
- (y(!0), k(K, null, Q(v.value, (h) => (y(), k(K, {
2025
+ ])) : P("", !0),
2026
+ (y(!0), k(z, null, Q(v.value, (h) => (y(), k(z, {
2027
2027
  key: h.field
2028
2028
  }, [
2029
- h.field && m(h) ? (y(), fe(ht, Ae({
2029
+ h.field && m(h) ? (y(), fe(mt, Ae({
2030
2030
  key: 0,
2031
2031
  column: h,
2032
2032
  rows: e.rows,
@@ -2036,19 +2036,19 @@ const co = {
2036
2036
  "header-class": e.headerClass,
2037
2037
  tablename: e.tablename
2038
2038
  }, { ref_for: !0 }, f.$attrs, {
2039
- onApplyFilter: u[3] || (u[3] = (g, C) => o("applyFilter", g, C)),
2040
- onClearFilter: u[4] || (u[4] = (g) => o("clearFilter", g)),
2039
+ onApplyFilter: d[3] || (d[3] = (g, C) => o("applyFilter", g, C)),
2040
+ onClearFilter: d[4] || (d[4] = (g) => o("clearFilter", g)),
2041
2041
  onOpenFilter: r,
2042
2042
  onCloseFilter: i,
2043
- "onUpdate:filters": u[5] || (u[5] = (g) => o("update:filters", g))
2043
+ "onUpdate:filters": d[5] || (d[5] = (g) => o("update:filters", g))
2044
2044
  }), Te({ _: 2 }, [
2045
2045
  Q(f.$slots, (g, C) => ({
2046
2046
  name: C,
2047
2047
  fn: X((S) => [
2048
- z(f.$slots, C, Ae({ ref_for: !0 }, S), void 0, !0)
2048
+ j(f.$slots, C, Ae({ ref_for: !0 }, S), void 0, !0)
2049
2049
  ])
2050
2050
  }))
2051
- ]), 1040, ["column", "rows", "sort-helpers", "filters", "open-filter", "header-class", "tablename"])) : D("", !0)
2051
+ ]), 1040, ["column", "rows", "sort-helpers", "filters", "open-filter", "header-class", "tablename"])) : P("", !0)
2052
2052
  ], 64))), 128))
2053
2053
  ])
2054
2054
  ], 512));
@@ -2087,7 +2087,7 @@ const co = {
2087
2087
  },
2088
2088
  emits: ["row-click"],
2089
2089
  setup(e, { emit: n }) {
2090
- const t = e, o = F(() => t.rowKey ?? "id"), s = q(null), l = F(() => t.columns.flatMap(
2090
+ const t = e, o = F(() => t.rowKey ?? "id"), s = I(null), l = F(() => t.columns.flatMap(
2091
2091
  (a) => "children" in a ? a.children : [a]
2092
2092
  ));
2093
2093
  return (a, r) => (y(), k("tbody", {
@@ -2102,7 +2102,7 @@ const co = {
2102
2102
  r[2] || (r[2] = w("div", { class: "vs-spinner" }, null, -1)),
2103
2103
  w("span", null, H(e.loadingText), 1)
2104
2104
  ], 8, Yo)
2105
- ])) : e.paginatedRows.length ? (y(!0), k(K, { key: 2 }, Q(e.paginatedRows, (i, c) => (y(), k(K, {
2105
+ ])) : e.paginatedRows.length ? (y(!0), k(z, { key: 2 }, Q(e.paginatedRows, (i, c) => (y(), k(z, {
2106
2106
  key: e.getRowKey(i, c)
2107
2107
  }, [
2108
2108
  w("tr", {
@@ -2111,13 +2111,13 @@ const co = {
2111
2111
  { "vs-row-clickable": e.hasRowClick },
2112
2112
  { "vs-row-selected": e.isRowSelected(i, e.selectedItems, o.value) }
2113
2113
  ]),
2114
- onClick: (d) => a.$emit("row-click", i, c)
2114
+ onClick: (u) => a.$emit("row-click", i, c)
2115
2115
  }, [
2116
2116
  e.expandable ? (y(), k("td", {
2117
2117
  key: 0,
2118
2118
  class: "vs-expand-column",
2119
2119
  "data-field": "_expand",
2120
- onClick: r[0] || (r[0] = me(() => {
2120
+ onClick: r[0] || (r[0] = pe(() => {
2121
2121
  }, ["stop"]))
2122
2122
  }, [
2123
2123
  w("button", {
@@ -2125,7 +2125,7 @@ const co = {
2125
2125
  type: "button",
2126
2126
  "aria-expanded": e.isRowExpanded(i, c),
2127
2127
  "aria-controls": `row-details-${e.getRowKey(i, c)}`,
2128
- onClick: me((d) => e.toggleRowExpansion(i, c), ["stop"])
2128
+ onClick: pe((u) => e.toggleRowExpansion(i, c), ["stop"])
2129
2129
  }, [
2130
2130
  e.isRowExpanded(i, c) ? (y(), k("span", os, [...r[4] || (r[4] = [
2131
2131
  w("svg", {
@@ -2149,12 +2149,12 @@ const co = {
2149
2149
  ], -1)
2150
2150
  ])]))
2151
2151
  ], 8, ns)
2152
- ])) : D("", !0),
2152
+ ])) : P("", !0),
2153
2153
  e.isItemSelectedControlled ? (y(), k("td", {
2154
2154
  key: 1,
2155
2155
  class: "vs-checkbox-column",
2156
2156
  "data-field": "_checkbox",
2157
- onClick: r[1] || (r[1] = me(() => {
2157
+ onClick: r[1] || (r[1] = pe(() => {
2158
2158
  }, ["stop"]))
2159
2159
  }, [
2160
2160
  w("div", ls, [
@@ -2162,38 +2162,38 @@ const co = {
2162
2162
  type: "checkbox",
2163
2163
  id: e.tablename + "-checkbox-" + e.getRowKey(i, c),
2164
2164
  value: i,
2165
- checked: e.selectedItems.some((d, v) => e.getRowKey(d, v) === e.getRowKey(i, c)),
2166
- onChange: (d) => e.toggleRow(i, c)
2165
+ checked: e.selectedItems.some((u, v) => e.getRowKey(u, v) === e.getRowKey(i, c)),
2166
+ onChange: (u) => e.toggleRow(i, c)
2167
2167
  }, null, 40, as),
2168
2168
  w("label", {
2169
2169
  for: e.tablename + "-checkbox-" + e.getRowKey(i, c)
2170
2170
  }, null, 8, rs)
2171
2171
  ])
2172
- ])) : D("", !0),
2173
- (y(!0), k(K, null, Q(l.value, (d) => (y(), k(K, null, [
2174
- d && d.field ? (y(), k("td", {
2175
- key: d.field,
2172
+ ])) : P("", !0),
2173
+ (y(!0), k(z, null, Q(l.value, (u) => (y(), k(z, null, [
2174
+ u && u.field ? (y(), k("td", {
2175
+ key: u.field,
2176
2176
  class: G(e.cellClass),
2177
- "data-field": d.field
2177
+ "data-field": u.field
2178
2178
  }, [
2179
- z(a.$slots, `cell-${d.field}`, {
2179
+ j(a.$slots, `cell-${u.field}`, {
2180
2180
  item: i,
2181
- value: e.getValue(i, d.field),
2182
- column: d,
2181
+ value: e.getValue(i, u.field),
2182
+ column: u,
2183
2183
  index: c
2184
2184
  }, () => [
2185
- Ye(H(e.getValue(i, d.field)), 1)
2185
+ Ge(H(e.getValue(i, u.field)), 1)
2186
2186
  ], !0)
2187
- ], 10, is)) : D("", !0)
2187
+ ], 10, is)) : P("", !0)
2188
2188
  ], 64))), 256))
2189
2189
  ], 10, ts),
2190
- e.expandable ? (y(), k(K, { key: 0 }, [
2190
+ e.expandable ? (y(), k(z, { key: 0 }, [
2191
2191
  e.isRowExpanded(i, c) ? (y(), k("tr", cs, [
2192
2192
  w("td", {
2193
2193
  colspan: e.totalColumns,
2194
2194
  class: "vs-expanded-cell"
2195
2195
  }, [
2196
- e.isRowLoading(i, c) ? z(a.$slots, "row-expanded-loader", {
2196
+ e.isRowLoading(i, c) ? j(a.$slots, "row-expanded-loader", {
2197
2197
  key: 0,
2198
2198
  item: i,
2199
2199
  index: c
@@ -2202,23 +2202,23 @@ const co = {
2202
2202
  w("div", { class: "vs-loader-bar-inner" })
2203
2203
  ], -1))
2204
2204
  ], !0) : (y(), k("div", ds, [
2205
- z(a.$slots, "row-expanded", {
2205
+ j(a.$slots, "row-expanded", {
2206
2206
  item: i,
2207
2207
  index: c
2208
2208
  }, () => [
2209
- r[7] || (r[7] = Ye(" Expanded details for row ", -1)),
2209
+ r[7] || (r[7] = Ge(" Expanded details for row ", -1)),
2210
2210
  w("b", null, H(e.getRowKey(i, c)), 1)
2211
2211
  ], !0)
2212
2212
  ]))
2213
2213
  ], 8, us)
2214
- ])) : D("", !0)
2215
- ], 64)) : D("", !0)
2214
+ ])) : P("", !0)
2215
+ ], 64)) : P("", !0)
2216
2216
  ], 64))), 128)) : (y(), k("tr", Go, [
2217
2217
  w("td", {
2218
2218
  colspan: e.totalColumns,
2219
2219
  class: "vs-no-data"
2220
2220
  }, [
2221
- z(a.$slots, "no-data", {}, () => [
2221
+ j(a.$slots, "no-data", {}, () => [
2222
2222
  r[3] || (r[3] = w("div", { class: "vs-no-data-icon" }, [
2223
2223
  w("svg", {
2224
2224
  viewBox: "0 0 24 24",
@@ -2292,11 +2292,11 @@ const co = {
2292
2292
  placeholder: e.searchPlaceholder,
2293
2293
  class: G(e.searchClass)
2294
2294
  }, null, 8, ["model-value", "placeholder", "class"])
2295
- ])) : D("", !0),
2296
- z(s.$slots, "left", {}, void 0, !0)
2295
+ ])) : P("", !0),
2296
+ j(s.$slots, "left", {}, void 0, !0)
2297
2297
  ]),
2298
2298
  w("div", xs, [
2299
- z(s.$slots, "right", {}, void 0, !0)
2299
+ j(s.$slots, "right", {}, void 0, !0)
2300
2300
  ])
2301
2301
  ]));
2302
2302
  }
@@ -2351,29 +2351,29 @@ const co = {
2351
2351
  }
2352
2352
  return (s, l) => t.value.length ? (y(), k("tfoot", Ss, [
2353
2353
  w("tr", Rs, [
2354
- e.expandable ? (y(), k("td", Es)) : D("", !0),
2355
- e.isItemSelectedControlled ? (y(), k("td", $s)) : D("", !0),
2356
- (y(!0), k(K, null, Q(t.value, (a, r) => (y(), k("td", {
2354
+ e.expandable ? (y(), k("td", Es)) : P("", !0),
2355
+ e.isItemSelectedControlled ? (y(), k("td", $s)) : P("", !0),
2356
+ (y(!0), k(z, null, Q(t.value, (a, r) => (y(), k("td", {
2357
2357
  key: r,
2358
2358
  "data-field": a.field,
2359
2359
  class: G(["vs-footer-cell", a.footerClass || ""]),
2360
- style: pt(a.footerStyle || {})
2360
+ style: gt(a.footerStyle || {})
2361
2361
  }, [
2362
- a.hasFooter ? z(s.$slots, `footer-${a.field}`, {
2362
+ a.hasFooter ? j(s.$slots, `footer-${a.field}`, {
2363
2363
  key: 0,
2364
2364
  column: a,
2365
2365
  value: a.footerValue,
2366
2366
  rows: e.rows
2367
2367
  }, () => [
2368
- Ye(H(a.formattedValue), 1)
2369
- ], !0) : D("", !0)
2368
+ Ge(H(a.formattedValue), 1)
2369
+ ], !0) : P("", !0)
2370
2370
  ], 14, As))), 128))
2371
2371
  ])
2372
- ])) : D("", !0);
2372
+ ])) : P("", !0);
2373
2373
  }
2374
2374
  }), Ts = /* @__PURE__ */ ae(Fs, [["__scopeId", "data-v-f3b614d3"]]);
2375
2375
  function Os(e, n, t) {
2376
- const o = q(1), s = q(e.sort ? [...e.sort] : []);
2376
+ const o = I(1), s = I(e.sort ? [...e.sort] : []);
2377
2377
  Y(
2378
2378
  () => e.sort,
2379
2379
  (v) => {
@@ -2395,8 +2395,8 @@ function Os(e, n, t) {
2395
2395
  getSortOrder: (v) => l.value.find((m) => m.field === v)?.order ?? null,
2396
2396
  handleSort: (v, m) => {
2397
2397
  let f = [...s.value];
2398
- const u = f.findIndex((h) => h.field === v);
2399
- m.shiftKey ? u === -1 ? f.push({ field: v, order: "asc" }) : f[u]?.order === "asc" ? f[u].order = "desc" : f.splice(u, 1) : u === -1 ? f = [{ field: v, order: "asc" }] : f[u]?.order === "asc" ? f = [{ field: v, order: "desc" }] : f = [], f = f.map((h, g) => ({ ...h, priority: g + 1 })), s.value = [...f], e.serverOptions ? n("update:serverOptions", { ...e.serverOptions, sort: f }) : n("update:sort", f), t.value = o.value, n("sortChanged", { sort: f });
2398
+ const d = f.findIndex((h) => h.field === v);
2399
+ m.shiftKey ? d === -1 ? f.push({ field: v, order: "asc" }) : f[d]?.order === "asc" ? f[d].order = "desc" : f.splice(d, 1) : d === -1 ? f = [{ field: v, order: "asc" }] : f[d]?.order === "asc" ? f = [{ field: v, order: "desc" }] : f = [], f = f.map((h, g) => ({ ...h, priority: g + 1 })), s.value = [...f], e.serverOptions ? n("update:serverOptions", { ...e.serverOptions, sort: f }) : n("update:sort", f), t.value = o.value, n("sortChanged", { sort: f });
2400
2400
  }
2401
2401
  }
2402
2402
  };
@@ -2404,19 +2404,19 @@ function Os(e, n, t) {
2404
2404
  function Vs(e, n, t, o, s) {
2405
2405
  const l = F({
2406
2406
  get: () => e.serverItemsLength !== void 0 ? e.serverItemsLength : s.value.length,
2407
- set: (d) => {
2408
- e.serverItemsLength !== void 0 && n("update:serverItemsLength", d);
2407
+ set: (u) => {
2408
+ console.log("serverItemsLength: ", u), e.serverItemsLength !== void 0 && n("update:serverItemsLength", u);
2409
2409
  }
2410
2410
  }), a = F({
2411
2411
  get: () => e.serverOptions?.page ?? t.value,
2412
- set: (d) => {
2413
- e.serverOptions ? n("update:serverOptions", { ...e.serverOptions, page: d }) : t.value = d;
2412
+ set: (u) => {
2413
+ e.serverOptions ? n("update:serverOptions", { ...e.serverOptions, page: u }) : t.value = u;
2414
2414
  }
2415
2415
  }), r = F(() => {
2416
- const d = o.value;
2417
- return Kt(t.value, d, l.value);
2418
- }), i = (d) => {
2419
- e.serverOptions && n("update:serverOptions", { ...e.serverOptions, page: d }), n("pageUpdated", d);
2416
+ const u = o.value;
2417
+ return Kt(t.value, u, l.value);
2418
+ }), i = (u) => {
2419
+ e.serverOptions && n("update:serverOptions", { ...e.serverOptions, page: u }), n("pageUpdated", u);
2420
2420
  };
2421
2421
  return {
2422
2422
  currentPage: a,
@@ -2437,7 +2437,7 @@ function Ls(e, n, t, o) {
2437
2437
  set: (a) => o.value = a
2438
2438
  });
2439
2439
  return Y(o, (a) => {
2440
- const r = e.serverItemsLength ?? e.rows.length, i = wt(r, a);
2440
+ const r = e.serverItemsLength ?? e.rows.length, i = bt(r, a);
2441
2441
  t.value > i ? t.value = i || 1 : t.value < 1 && (t.value = 1);
2442
2442
  }), {
2443
2443
  vsRowsPerPage: s,
@@ -2466,30 +2466,30 @@ function Ps(e, n) {
2466
2466
  };
2467
2467
  }
2468
2468
  function Ds(e, n) {
2469
- const t = q([]), o = q(/* @__PURE__ */ new Map()), s = F({
2469
+ const t = I([]), o = I(/* @__PURE__ */ new Map()), s = F({
2470
2470
  get: () => e.expanded ?? t.value,
2471
- set: (d) => {
2472
- e.expanded !== void 0 ? n("update:expanded", d) : t.value = d;
2471
+ set: (u) => {
2472
+ e.expanded !== void 0 ? n("update:expanded", u) : t.value = u;
2473
2473
  }
2474
2474
  });
2475
- function l(d, v) {
2476
- return typeof e.rowKey == "function" ? e.rowKey(d, v) : typeof e.rowKey == "string" && d[e.rowKey] !== void 0 ? d[e.rowKey] : v;
2475
+ function l(u, v) {
2476
+ return typeof e.rowKey == "function" ? e.rowKey(u, v) : typeof e.rowKey == "string" && u[e.rowKey] !== void 0 ? u[e.rowKey] : v;
2477
2477
  }
2478
- function a(d, v) {
2479
- const m = l(d, v);
2478
+ function a(u, v) {
2479
+ const m = l(u, v);
2480
2480
  return s.value.includes(m);
2481
2481
  }
2482
- function r(d, v) {
2483
- const m = l(d, v), f = s.value.includes(m);
2484
- let u;
2485
- f ? (u = s.value.filter((h) => h !== m), n("collapseRow", { row: d, index: v, rowId: m })) : (u = e.accordion ? [m] : [...s.value, m], n("expandRow", { row: d, index: v, rowId: m })), s.value = u;
2482
+ function r(u, v) {
2483
+ const m = l(u, v), f = s.value.includes(m);
2484
+ let d;
2485
+ f ? (d = s.value.filter((h) => h !== m), n("collapseRow", { row: u, index: v, rowId: m })) : (d = e.accordion ? [m] : [...s.value, m], n("expandRow", { row: u, index: v, rowId: m })), s.value = d;
2486
2486
  }
2487
- function i(d, v) {
2488
- const m = l(d, v);
2487
+ function i(u, v) {
2488
+ const m = l(u, v);
2489
2489
  return o.value.get(m) === !0;
2490
2490
  }
2491
- function c(d, v) {
2492
- o.value.set(d, v);
2491
+ function c(u, v) {
2492
+ o.value.set(u, v);
2493
2493
  }
2494
2494
  return {
2495
2495
  expandedRows: s,
@@ -2501,26 +2501,26 @@ function Ds(e, n) {
2501
2501
  };
2502
2502
  }
2503
2503
  function Is(e, n, t) {
2504
- const o = q({}), s = F(() => (console.log("InitFilter Filtered:", e.value), t?.serverMode ? e.value : e.value.filter((r) => n.every((i) => {
2504
+ const o = I({}), s = F(() => t?.serverMode ? e.value : e.value.filter((r) => n.every((i) => {
2505
2505
  if (!i.field) return !0;
2506
2506
  const c = o.value[i.field];
2507
2507
  if (!c || !c.type) return !0;
2508
- const d = r[i.field];
2508
+ const u = r[i.field];
2509
2509
  if (i.filter?.filterFn)
2510
- return i.filter.filterFn(d, c.value, r);
2510
+ return i.filter.filterFn(u, c.value, r);
2511
2511
  if (c.type === "custom" && i.filter?.filterKey) {
2512
2512
  const m = Be[i.filter.filterKey];
2513
2513
  return typeof m == "function" ? m(r, i.field, c) : !0;
2514
2514
  }
2515
2515
  const v = Be[c.type];
2516
2516
  return typeof v == "function" ? v(r, i.field, c) : !0;
2517
- }))));
2517
+ })));
2518
2518
  Y(
2519
2519
  o,
2520
2520
  (r) => {
2521
2521
  if (t?.serverMode && t.onServerFilter) {
2522
2522
  const i = Object.entries(r).reduce(
2523
- (c, [d, v]) => {
2523
+ (c, [u, v]) => {
2524
2524
  if (!v?.type) return c;
2525
2525
  const m = {
2526
2526
  type: v.type,
@@ -2528,19 +2528,19 @@ function Is(e, n, t) {
2528
2528
  };
2529
2529
  switch (v.type) {
2530
2530
  case "text":
2531
- c[d] = {
2531
+ c[u] = {
2532
2532
  ...m,
2533
2533
  value: v.value ?? null
2534
2534
  };
2535
2535
  break;
2536
2536
  case "multi-select":
2537
- c[d] = {
2537
+ c[u] = {
2538
2538
  ...m,
2539
2539
  value: v.value ?? []
2540
2540
  };
2541
2541
  break;
2542
2542
  case "number-range":
2543
- c[d] = {
2543
+ c[u] = {
2544
2544
  ...m,
2545
2545
  value: v.value ?? null,
2546
2546
  min: v.min ?? null,
@@ -2548,7 +2548,7 @@ function Is(e, n, t) {
2548
2548
  };
2549
2549
  break;
2550
2550
  case "date-range":
2551
- c[d] = {
2551
+ c[u] = {
2552
2552
  ...m,
2553
2553
  value: v.value ?? null,
2554
2554
  start: v.start ?? null,
@@ -2556,7 +2556,7 @@ function Is(e, n, t) {
2556
2556
  };
2557
2557
  break;
2558
2558
  case "custom":
2559
- c[d] = {
2559
+ c[u] = {
2560
2560
  ...m,
2561
2561
  value: v.value,
2562
2562
  filterKey: v.filterKey
@@ -2591,13 +2591,13 @@ function qs(e, n = {}) {
2591
2591
  const a = () => {
2592
2592
  const c = e.value;
2593
2593
  if (!t || !c) return;
2594
- const d = c.querySelector("thead"), v = c.querySelector("tbody");
2595
- !d || !v || (c.parentElement?.classList.contains("vs-table-wrapper") ? s = c.parentElement : (s = document.createElement("div"), s.classList.add("vs-table-wrapper"), c.parentNode?.insertBefore(s, c), s.appendChild(c)), Object.assign(s.style, {
2594
+ const u = c.querySelector("thead"), v = c.querySelector("tbody");
2595
+ !u || !v || (c.parentElement?.classList.contains("vs-table-wrapper") ? s = c.parentElement : (s = document.createElement("div"), s.classList.add("vs-table-wrapper"), c.parentNode?.insertBefore(s, c), s.appendChild(c)), Object.assign(s.style, {
2596
2596
  overflowY: "auto",
2597
2597
  overflowX: "auto",
2598
2598
  position: "relative",
2599
2599
  maxHeight: typeof o == "number" ? `${o}px` : o
2600
- }), Object.assign(d.style, {
2600
+ }), Object.assign(u.style, {
2601
2601
  position: "sticky",
2602
2602
  top: "0",
2603
2603
  zIndex: "5",
@@ -2608,31 +2608,31 @@ function qs(e, n = {}) {
2608
2608
  }, r = () => {
2609
2609
  const c = e.value;
2610
2610
  if (!c) return;
2611
- const d = c.querySelector("thead"), v = c.querySelector("tbody");
2612
- if (!d || !v) return;
2613
- const m = Array.from(d.querySelectorAll("tr")), f = v.querySelector("tr");
2611
+ const u = c.querySelector("thead"), v = c.querySelector("tbody");
2612
+ if (!u || !v) return;
2613
+ const m = Array.from(u.querySelectorAll("tr")), f = v.querySelector("tr");
2614
2614
  if (!f) return;
2615
- const u = Array.from(f.querySelectorAll("td"));
2616
- if (!u.length) return;
2615
+ const d = Array.from(f.querySelectorAll("td"));
2616
+ if (!d.length) return;
2617
2617
  const h = [];
2618
2618
  m.forEach((g) => {
2619
2619
  Array.from(g.querySelectorAll("th")).forEach((S) => {
2620
2620
  parseInt(S.getAttribute("colspan") || "1", 10) === 1 && h.push(S);
2621
2621
  });
2622
2622
  }), h.forEach((g, C) => {
2623
- const S = u[C];
2623
+ const S = d[C];
2624
2624
  S && (g.style.width = `${S.offsetWidth}px`);
2625
2625
  }), m.forEach((g) => {
2626
2626
  Array.from(g.querySelectorAll("th")).forEach((S) => {
2627
2627
  const E = parseInt(S.getAttribute("colspan") || "1", 10);
2628
2628
  if (E > 1) {
2629
- let L = 0;
2630
- const P = Array.from(g.children).indexOf(S);
2631
- for (let B = 0; B < E; B++) {
2632
- const b = u[P + B];
2633
- b && (L += b.offsetWidth);
2629
+ let V = 0;
2630
+ const L = Array.from(g.children).indexOf(S);
2631
+ for (let M = 0; M < E; M++) {
2632
+ const b = d[L + M];
2633
+ b && (V += b.offsetWidth);
2634
2634
  }
2635
- L > 0 && (S.style.width = `${L}px`);
2635
+ V > 0 && (S.style.width = `${V}px`);
2636
2636
  }
2637
2637
  });
2638
2638
  });
@@ -2659,7 +2659,7 @@ function Ms(e, n = {}) {
2659
2659
  maxHeight: o = "calc(100vh - 250px)",
2660
2660
  debounceMs: s = 100
2661
2661
  } = n;
2662
- let l = null, a = null, r = null, i = !1, c = !1, d = null;
2662
+ let l = null, a = null, r = null, i = !1, c = !1, u = null;
2663
2663
  const m = ((h, g = 100) => {
2664
2664
  let C = null;
2665
2665
  return (...S) => {
@@ -2676,28 +2676,28 @@ function Ms(e, n = {}) {
2676
2676
  i = !1;
2677
2677
  return;
2678
2678
  }
2679
- const L = Array.from(S.querySelectorAll("td, th")), P = Array.from(E.querySelectorAll("td"));
2680
- if (!L.length || !P.length) {
2679
+ const V = Array.from(S.querySelectorAll("td, th")), L = Array.from(E.querySelectorAll("td"));
2680
+ if (!V.length || !L.length) {
2681
2681
  i = !1;
2682
2682
  return;
2683
2683
  }
2684
- let B = 0;
2685
- L.forEach((b) => {
2684
+ let M = 0;
2685
+ V.forEach((b) => {
2686
2686
  const p = parseInt(b.getAttribute("colspan") || "1", 10);
2687
2687
  if (p === 1) {
2688
- const x = P[B];
2688
+ const x = L[M];
2689
2689
  if (x) {
2690
2690
  const R = x.offsetWidth;
2691
2691
  b.offsetWidth !== R && (b.style.width = `${R}px`, b.style.minWidth = `${R}px`);
2692
2692
  }
2693
- B += 1;
2693
+ M += 1;
2694
2694
  } else {
2695
2695
  let x = 0;
2696
2696
  for (let R = 0; R < p; R++) {
2697
- const T = P[B + R];
2697
+ const T = L[M + R];
2698
2698
  T && (x += T.offsetWidth);
2699
2699
  }
2700
- x > 0 && b.offsetWidth !== x && (b.style.width = `${x}px`, b.style.minWidth = `${x}px`), B += p;
2700
+ x > 0 && b.offsetWidth !== x && (b.style.width = `${x}px`, b.style.minWidth = `${x}px`), M += p;
2701
2701
  }
2702
2702
  }), i = !1;
2703
2703
  }));
@@ -2715,14 +2715,14 @@ function Ms(e, n = {}) {
2715
2715
  bottom: "0",
2716
2716
  zIndex: "5",
2717
2717
  background: "var(--vs-table-footer-bg, var(--vs-table-header-bg, #fff))"
2718
- }), !c && S && (d = () => {
2718
+ }), !c && S && (u = () => {
2719
2719
  const E = l.scrollLeft;
2720
2720
  S.scrollLeft = E, g.scrollLeft = E;
2721
- }, l.addEventListener("scroll", d), c = !0), a || (a = new ResizeObserver(() => {
2721
+ }, l.addEventListener("scroll", u), c = !0), a || (a = new ResizeObserver(() => {
2722
2722
  m();
2723
2723
  }), a.observe(h)), m());
2724
- }, u = () => {
2725
- cancelAnimationFrame(r), a && (a.disconnect(), a = null), l && d && c && (l.removeEventListener("scroll", d), c = !1);
2724
+ }, d = () => {
2725
+ cancelAnimationFrame(r), a && (a.disconnect(), a = null), l && u && c && (l.removeEventListener("scroll", u), c = !1);
2726
2726
  const h = e.value;
2727
2727
  if (h) {
2728
2728
  const g = h.querySelector("tfoot");
@@ -2731,90 +2731,90 @@ function Ms(e, n = {}) {
2731
2731
  };
2732
2732
  return Re(async () => {
2733
2733
  t && (await oe(), f());
2734
- }), He(u), Y(
2734
+ }), He(d), Y(
2735
2735
  () => t,
2736
2736
  async (h) => {
2737
- await oe(), h ? f() : u();
2737
+ await oe(), h ? f() : d();
2738
2738
  }
2739
2739
  ), {
2740
2740
  refresh: m,
2741
- cleanup: u
2741
+ cleanup: d
2742
2742
  };
2743
2743
  }
2744
- function Bs(e, n, t = {}) {
2745
- const o = Fe(e.rows) ? e.rows : gt(e.rows), s = q(1), l = q(e.serverOptions?.rowsPerPage ?? e.rowsPerPage), a = q(""), r = q(), i = q(null), c = q(), { isRowExpanded: d, toggleRowExpansion: v, getRowId: m, setRowLoading: f, isRowLoading: u } = Ds(e, n), { filters: h, filteredData: g, setFilter: C, clearFilter: S } = Is(
2746
- F(() => $(o)),
2744
+ function Bs(e, n, t = {}, o) {
2745
+ const s = o || (Fe(e.rows) ? e.rows : yt(e.rows)), l = I(1), a = I(e.serverOptions?.rowsPerPage ?? e.rowsPerPage), r = I(""), i = I(), c = I(null), u = I(), { isRowExpanded: v, toggleRowExpansion: m, getRowId: f, setRowLoading: d, isRowLoading: h } = Ds(e, n), { filters: g, filteredData: C, setFilter: S, clearFilter: E } = Is(
2746
+ F(() => $(s)),
2747
2747
  zt($(e.columns)),
2748
2748
  {
2749
2749
  serverMode: !!e.serverOptions,
2750
- onServerFilter(V) {
2751
- n("filterChange", V);
2750
+ onServerFilter(D) {
2751
+ n("filterChange", D);
2752
2752
  }
2753
2753
  }
2754
- ), { activeSort: E, sortHelpers: L } = Os(e, n, s), { onInputTyped: P } = Ps(n, a), { totalRecords: B, recordRange: b, handlePageChange: p } = Vs(
2754
+ ), { activeSort: V, sortHelpers: L } = Os(e, n, l), { onInputTyped: M } = Ps(n, r), { totalRecords: b, recordRange: p, handlePageChange: x } = Vs(
2755
2755
  e,
2756
2756
  n,
2757
- s,
2758
2757
  l,
2759
- F(() => I.value)
2760
- ), { handleRowsPerPage: x } = Ls(e, n, s, l), { header: R = !0, footer: T = !0, maxHeight: M = "calc(100vh - 100px)" } = t, A = qs(c, { enabled: R, maxHeight: M }), O = Ms(c, { enabled: T, maxHeight: M }), N = F(() => {
2761
- let V = g.value;
2762
- return a.value && (V = st(V, a.value)), V;
2763
- }), I = F(() => {
2764
- let V = N.value;
2765
- return e.serverOptions || (a.value && (V = st(V, a.value)), E.value.length && (V = Wt(V, E.value))), V = V.map((U, ge) => ({
2766
- ...U,
2767
- isExpanded: d(U, ge)
2758
+ a,
2759
+ F(() => W.value)
2760
+ ), { handleRowsPerPage: R } = Ls(e, n, l, a), { header: T = !0, footer: B = !0, maxHeight: A = "calc(100vh - 100px)" } = t, O = qs(u, { enabled: T, maxHeight: A }), K = Ms(u, { enabled: B, maxHeight: A }), q = F(() => {
2761
+ let D = C.value;
2762
+ return r.value && (D = lt(D, r.value)), D;
2763
+ }), W = F(() => {
2764
+ let D = q.value;
2765
+ return e.serverOptions || (r.value && (D = lt(D, r.value)), V.value.length && (D = Wt(D, V.value))), D = D.map((ve, Ze) => ({
2766
+ ...ve,
2767
+ isExpanded: v(ve, Ze)
2768
2768
  // pass index here
2769
- })), V;
2769
+ })), D;
2770
2770
  });
2771
- Y([h, a], () => s.value = 1, { deep: !0 });
2772
- const W = F(
2773
- () => Nt(I.value, s.value, l.value)
2771
+ Y([g, r], () => l.value = 1, { deep: !0 });
2772
+ const N = F(
2773
+ () => Nt(W.value, l.value, a.value)
2774
2774
  );
2775
- return Y(o, (V) => {
2776
- Array.isArray(V) && V.length > 1e3 && console.log(`[useDataTable] Large dataset updated (${V.length} rows)`);
2775
+ return Y(s, (D) => {
2776
+ Array.isArray(D) && D.length > 1e3 && console.log(`[useDataTable] Large dataset updated (${D.length} rows)`);
2777
2777
  }), {
2778
2778
  // Pagination
2779
- page: s,
2780
- totalRecords: B,
2781
- recordRange: b,
2782
- handlePageChange: p,
2783
- rowsPerPage: l,
2784
- handleRowsPerPage: x,
2779
+ page: l,
2780
+ totalRecords: b,
2781
+ recordRange: p,
2782
+ handlePageChange: x,
2783
+ rowsPerPage: a,
2784
+ handleRowsPerPage: R,
2785
2785
  // Sorting
2786
- processedRows: I,
2787
- paginatedRows: W,
2786
+ processedRows: W,
2787
+ paginatedRows: N,
2788
2788
  sortHelpers: L,
2789
2789
  // Search
2790
- searchQuery: a,
2791
- onInputTyped: P,
2790
+ searchQuery: r,
2791
+ onInputTyped: M,
2792
2792
  // Expandable
2793
- isRowExpanded: d,
2794
- toggleRowExpansion: v,
2795
- getRowId: m,
2796
- setRowLoading: f,
2797
- isRowLoading: u,
2793
+ isRowExpanded: v,
2794
+ toggleRowExpansion: m,
2795
+ getRowId: f,
2796
+ setRowLoading: d,
2797
+ isRowLoading: h,
2798
2798
  // Column filters
2799
- filters: h,
2800
- filteredData: g,
2801
- setFilter: C,
2802
- clearFilter: S,
2799
+ filters: g,
2800
+ filteredData: C,
2801
+ setFilter: S,
2802
+ clearFilter: E,
2803
2803
  // Table Ref
2804
- tableContainer: r,
2805
- tableResponsiveRef: i,
2806
- tableRef: c,
2804
+ tableContainer: i,
2805
+ tableResponsiveRef: c,
2806
+ tableRef: u,
2807
2807
  // Sticky Header and Footer
2808
2808
  refresh() {
2809
- A.refresh?.(), O.refresh?.();
2809
+ O.refresh?.(), K.refresh?.();
2810
2810
  },
2811
2811
  cleanup() {
2812
- A.cleanup?.(), O.cleanup?.();
2812
+ O.cleanup?.(), K.cleanup?.();
2813
2813
  }
2814
2814
  };
2815
2815
  }
2816
2816
  function Hs(e, n) {
2817
- const t = q(e.itemSelected || []);
2817
+ const t = I(e.itemSelected || []);
2818
2818
  Y(
2819
2819
  () => e.itemSelected,
2820
2820
  (h) => {
@@ -2836,9 +2836,9 @@ function Hs(e, n) {
2836
2836
  )), r = (h, g) => {
2837
2837
  const C = re(h, g, e.rowKey);
2838
2838
  o.value.some(
2839
- (E, L) => re(E, L, e.rowKey) === C
2839
+ (E, V) => re(E, V, e.rowKey) === C
2840
2840
  ) ? (o.value = o.value.filter(
2841
- (E, L) => re(E, L, e.rowKey) !== C
2841
+ (E, V) => re(E, V, e.rowKey) !== C
2842
2842
  ), n("rowDeselected", h, g)) : (o.value = [...o.value, h], n("rowSelected", h, g));
2843
2843
  }, i = (h) => {
2844
2844
  const g = h.target;
@@ -2852,7 +2852,7 @@ function Hs(e, n) {
2852
2852
  toggleRow: r,
2853
2853
  toggleAll: i,
2854
2854
  selectRow: (h, g) => {
2855
- yt(h, o.value, e.rowKey) || (o.value = [...o.value, h], n("rowSelected", h, g));
2855
+ wt(h, o.value, e.rowKey) || (o.value = [...o.value, h], n("rowSelected", h, g));
2856
2856
  },
2857
2857
  deselectRow: (h, g) => {
2858
2858
  const C = re(h, g, e.rowKey);
@@ -2879,8 +2879,8 @@ function Hs(e, n) {
2879
2879
  }
2880
2880
  };
2881
2881
  }
2882
- function Ws(e, n, t = q(!1)) {
2883
- const o = q(!1), s = q(!1);
2882
+ function Ws(e, n, t = I(!1)) {
2883
+ const o = I(!1), s = I(!1);
2884
2884
  let l = !1;
2885
2885
  const a = () => {
2886
2886
  if (l) return;
@@ -2890,7 +2890,7 @@ function Ws(e, n, t = q(!1)) {
2890
2890
  o.value = x > 0, s.value = x < R - 1;
2891
2891
  const T = Array.from(
2892
2892
  p.querySelectorAll(".vs-sticky-left")
2893
- ), M = Array.from(
2893
+ ), B = Array.from(
2894
2894
  p.querySelectorAll(".vs-sticky-right")
2895
2895
  );
2896
2896
  if (x > 0 ? T.forEach((A) => {
@@ -2899,14 +2899,14 @@ function Ws(e, n, t = q(!1)) {
2899
2899
  }) : T.forEach((A) => {
2900
2900
  const O = A.closest("thead") !== null;
2901
2901
  A.style.zIndex = O ? "4" : "3";
2902
- }), M.length) {
2903
- const A = M[0], O = A ? p.offsetWidth - A.offsetLeft : p.offsetWidth;
2904
- b.scrollWidth - (x + b.clientWidth) <= O + 5 ? M.forEach((I) => {
2905
- const W = I.closest("thead") !== null;
2906
- I.style.zIndex = W ? "5" : "4";
2907
- }) : M.forEach((I) => {
2908
- const W = I.closest("thead") !== null;
2909
- I.style.zIndex = W ? "4" : "3";
2902
+ }), B.length) {
2903
+ const A = B[0], O = A ? p.offsetWidth - A.offsetLeft : p.offsetWidth;
2904
+ b.scrollWidth - (x + b.clientWidth) <= O + 5 ? B.forEach((q) => {
2905
+ const W = q.closest("thead") !== null;
2906
+ q.style.zIndex = W ? "5" : "4";
2907
+ }) : B.forEach((q) => {
2908
+ const W = q.closest("thead") !== null;
2909
+ q.style.zIndex = W ? "4" : "3";
2910
2910
  });
2911
2911
  }
2912
2912
  }, r = () => {
@@ -2915,7 +2915,7 @@ function Ws(e, n, t = q(!1)) {
2915
2915
  }, i = (b) => b.filter((p) => p.closest("tbody")), c = (b) => {
2916
2916
  const p = b[0];
2917
2917
  return p ? Array.from(p.children) : [];
2918
- }, d = (b) => {
2918
+ }, u = (b) => {
2919
2919
  const p = /* @__PURE__ */ new Map();
2920
2920
  return b.forEach((x, R) => {
2921
2921
  const T = x.getAttribute("data-field");
@@ -2936,16 +2936,16 @@ function Ws(e, n, t = q(!1)) {
2936
2936
  }), x.forEach((A) => {
2937
2937
  if (A.children?.length)
2938
2938
  A.children.forEach((O) => {
2939
- const N = p.get(O.field);
2940
- if (N === void 0) return;
2941
- const I = A.sticky || O.sticky;
2942
- I === "left" && R.push(N), I === "right" && T.push(N);
2939
+ const K = p.get(O.field);
2940
+ if (K === void 0) return;
2941
+ const q = A.sticky || O.sticky;
2942
+ q === "left" && R.push(K), q === "right" && T.push(K);
2943
2943
  });
2944
2944
  else {
2945
2945
  const O = p.get(A.field);
2946
2946
  if (O === void 0) return;
2947
- const N = A.sticky;
2948
- N === "left" && R.push(O), N === "right" && T.push(O);
2947
+ const K = A.sticky;
2948
+ K === "left" && R.push(O), K === "right" && T.push(O);
2949
2949
  }
2950
2950
  }), {
2951
2951
  left: [...new Set(R)].sort((A, O) => A - O),
@@ -2954,12 +2954,12 @@ function Ws(e, n, t = q(!1)) {
2954
2954
  }, f = (b, p, x) => {
2955
2955
  const R = /* @__PURE__ */ new Map();
2956
2956
  let T = 0;
2957
- return p.forEach((M) => {
2958
- R.set(M, T);
2959
- const A = b[M];
2957
+ return p.forEach((B) => {
2958
+ R.set(B, T);
2959
+ const A = b[B];
2960
2960
  A && (T += A.offsetWidth);
2961
2961
  }), R;
2962
- }, u = (b) => {
2962
+ }, d = (b) => {
2963
2963
  const p = /* @__PURE__ */ new Map(), x = /* @__PURE__ */ new Map();
2964
2964
  return b.forEach((R) => {
2965
2965
  R.children?.length && (p.set(R.label, R.children[0]?.field), x.set(R.label, R.children[R.children.length - 1]?.field));
@@ -2969,11 +2969,11 @@ function Ws(e, n, t = q(!1)) {
2969
2969
  if (b.startsWith("group-")) {
2970
2970
  const T = b.replace(/^group-/, "");
2971
2971
  if (R === "left") {
2972
- const M = x.firstChild.get(T);
2973
- return M ? p.get(M) : void 0;
2972
+ const B = x.firstChild.get(T);
2973
+ return B ? p.get(B) : void 0;
2974
2974
  } else {
2975
- const M = x.lastChild.get(T);
2976
- return M ? p.get(M) : void 0;
2975
+ const B = x.lastChild.get(T);
2976
+ return B ? p.get(B) : void 0;
2977
2977
  }
2978
2978
  }
2979
2979
  return p.get(b);
@@ -2984,19 +2984,19 @@ function Ws(e, n, t = q(!1)) {
2984
2984
  R.style.position = "", R.style.left = "", R.style.right = "", R.style.zIndex = "", R.style.background = "", R.style.minWidth = "", R.style.width = "", R.classList.remove("vs-sticky-left", "vs-sticky-right");
2985
2985
  });
2986
2986
  });
2987
- }, C = (b, p, x, R, T, M) => {
2987
+ }, C = (b, p, x, R, T, B) => {
2988
2988
  if (!l) {
2989
2989
  l = !0;
2990
2990
  try {
2991
2991
  b.forEach((A) => {
2992
- const O = Array.from(A.children), N = A.closest("thead") !== null;
2993
- O.forEach((I) => {
2994
- const W = I.getAttribute("data-field");
2992
+ const O = Array.from(A.children), K = A.closest("thead") !== null;
2993
+ O.forEach((q) => {
2994
+ const W = q.getAttribute("data-field");
2995
2995
  if (!W) return;
2996
- const V = h(W, T, M, R);
2997
- if (V === void 0 || !p.includes(V)) return;
2998
- const U = x.get(V) || 0, ge = N ? "4" : "3";
2999
- I.style.position = "sticky", I.style[R] = `${U}px`, I.style.zIndex = ge, I.classList.add(`vs-sticky-${R}`), I.style.background = "var(--vs-table-bg, #fff)";
2996
+ const N = h(W, T, B, R);
2997
+ if (N === void 0 || !p.includes(N)) return;
2998
+ const D = x.get(N) || 0, ve = K ? "4" : "3";
2999
+ q.style.position = "sticky", q.style[R] = `${D}px`, q.style.zIndex = ve, q.classList.add(`vs-sticky-${R}`), q.style.background = "var(--vs-table-bg, #fff)";
3000
3000
  });
3001
3001
  });
3002
3002
  } finally {
@@ -3009,10 +3009,10 @@ function Ws(e, n, t = q(!1)) {
3009
3009
  if (!b.length) return;
3010
3010
  const p = i(b);
3011
3011
  if (!p.length) return;
3012
- const x = c(p), R = d(x), T = m(x, R, n.value);
3012
+ const x = c(p), R = u(x), T = m(x, R, n.value);
3013
3013
  if (g(b), T.left.length > 0 || T.right.length > 0) {
3014
- const M = f(x, T.left), A = f(x, T.right), O = u(n.value);
3015
- C(b, T.left, M, "left", R, O), C(b, T.right, A, "right", R, O);
3014
+ const B = f(x, T.left), A = f(x, T.right), O = d(n.value);
3015
+ C(b, T.left, B, "left", R, O), C(b, T.right, A, "right", R, O);
3016
3016
  }
3017
3017
  a();
3018
3018
  }, E = async () => {
@@ -3023,19 +3023,19 @@ function Ws(e, n, t = q(!1)) {
3023
3023
  console.warn("[useStickyColumns] refreshSticky failed:", b);
3024
3024
  }
3025
3025
  }, 150));
3026
- }, L = () => {
3026
+ }, V = () => {
3027
3027
  e.value?.parentElement?.addEventListener("scroll", a), a();
3028
- }, P = () => {
3028
+ }, L = () => {
3029
3029
  e.value?.parentElement?.removeEventListener("scroll", a);
3030
3030
  };
3031
3031
  Re(async () => {
3032
3032
  await oe(), setTimeout(() => {
3033
3033
  E();
3034
- }, 300), L();
3035
- }), He(P);
3036
- let B = null;
3034
+ }, 300), V();
3035
+ }), He(L);
3036
+ let M = null;
3037
3037
  return Y([n, t], () => {
3038
- B && clearTimeout(B), B = setTimeout(() => {
3038
+ M && clearTimeout(M), M = setTimeout(() => {
3039
3039
  E();
3040
3040
  }, 100);
3041
3041
  }, { deep: !0 }), { hasLeftShadow: o, hasRightShadow: s, refreshSticky: E };
@@ -3098,7 +3098,7 @@ const Ks = { class: "vs-datatable" }, zs = {
3098
3098
  },
3099
3099
  emits: ["update:serverItemsLength", "update:serverOptions", "pageUpdated", "inputTyped", "update:sort", "sortChanged", "update:itemSelected", "rowSelected", "rowDeselected", "allRowsSelected", "rowClick", "tableBeforeMount", "tableMounted", "tableUnmounted", "dataLoaded", "dataError", "update:expanded", "expandRow", "collapseRow", "filterChange"],
3100
3100
  setup(e, { expose: n, emit: t }) {
3101
- const o = e, s = gt(o.rows);
3101
+ const o = e, s = yt(o.rows);
3102
3102
  Y(
3103
3103
  () => o.rows,
3104
3104
  (ee) => {
@@ -3106,41 +3106,42 @@ const Ks = { class: "vs-datatable" }, zs = {
3106
3106
  },
3107
3107
  { deep: !1 }
3108
3108
  );
3109
- const l = t, a = qt(), r = F(() => !!a.onRowClick), i = q(), c = q(), {
3110
- page: d,
3109
+ const l = t, a = qt(), r = F(() => !!a.onRowClick), i = I(), c = I(), {
3110
+ page: u,
3111
3111
  rowsPerPage: v,
3112
3112
  totalRecords: m,
3113
3113
  recordRange: f,
3114
- handlePageChange: u,
3114
+ handlePageChange: d,
3115
3115
  handleRowsPerPage: h,
3116
3116
  paginatedRows: g,
3117
3117
  sortHelpers: C,
3118
3118
  searchQuery: S,
3119
3119
  onInputTyped: E,
3120
- isRowExpanded: L,
3121
- toggleRowExpansion: P,
3122
- setRowLoading: B,
3120
+ isRowExpanded: V,
3121
+ toggleRowExpansion: L,
3122
+ setRowLoading: M,
3123
3123
  isRowLoading: b,
3124
3124
  filters: p,
3125
3125
  setFilter: x,
3126
3126
  clearFilter: R,
3127
3127
  tableRef: T,
3128
- tableContainer: M,
3128
+ tableContainer: B,
3129
3129
  tableResponsiveRef: A,
3130
3130
  refresh: O
3131
3131
  } = Bs(
3132
- { ...o, rows: s.value },
3132
+ o,
3133
3133
  l,
3134
- { header: o.stickyHeader, footer: o.stickyFooter }
3134
+ { header: o.stickyHeader, footer: o.stickyFooter },
3135
+ s
3135
3136
  ), {
3136
- selectedItems: N,
3137
- isItemSelectedControlled: I,
3137
+ selectedItems: K,
3138
+ isItemSelectedControlled: q,
3138
3139
  isAllChecked: W,
3139
- isSomeChecked: V,
3140
- toggleAll: U,
3141
- toggleRow: ge
3142
- } = Hs(o, l), Vt = F(
3143
- () => Ht(o.columns, I.value, o.expandable)
3140
+ isSomeChecked: N,
3141
+ toggleAll: D,
3142
+ toggleRow: ve
3143
+ } = Hs(o, l), Ze = F(
3144
+ () => Ht(o.columns, q.value, o.expandable)
3144
3145
  ), { hasLeftShadow: Lt, hasRightShadow: Pt, refreshSticky: $e } = Ws(
3145
3146
  T,
3146
3147
  F(() => o.columns)
@@ -3162,8 +3163,8 @@ const Ks = { class: "vs-datatable" }, zs = {
3162
3163
  },
3163
3164
  { deep: !0 }
3164
3165
  ), n({
3165
- toggleRowExpansion: P,
3166
- setRowLoading: B,
3166
+ toggleRowExpansion: L,
3167
+ setRowLoading: M,
3167
3168
  refreshSticky: $e
3168
3169
  }), Re(async () => {
3169
3170
  setTimeout(() => {
@@ -3174,30 +3175,30 @@ const Ks = { class: "vs-datatable" }, zs = {
3174
3175
  } catch (ee) {
3175
3176
  l("dataError", ee);
3176
3177
  }
3177
- }), mt(() => {
3178
+ }), pt(() => {
3178
3179
  l("tableUnmounted");
3179
3180
  }), Mt(() => {
3180
3181
  l("tableBeforeMount");
3181
- }), (ee, j) => (y(), k("div", Ks, [
3182
+ }), (ee, U) => (y(), k("div", Ks, [
3182
3183
  ne(Cs, {
3183
3184
  "show-search": e.showSearch,
3184
3185
  "search-query": $(S),
3185
- "onUpdate:searchQuery": j[0] || (j[0] = (Z) => Fe(S) ? S.value = Z : null),
3186
+ "onUpdate:searchQuery": U[0] || (U[0] = (Z) => Fe(S) ? S.value = Z : null),
3186
3187
  onSearch: $(E),
3187
3188
  "search-placeholder": e.searchPlaceholder,
3188
3189
  "search-class": e.searchClass
3189
3190
  }, {
3190
3191
  left: X(() => [
3191
- z(ee.$slots, "filterAreaLeft", {}, void 0, !0)
3192
+ j(ee.$slots, "filterAreaLeft", {}, void 0, !0)
3192
3193
  ]),
3193
3194
  right: X(() => [
3194
- z(ee.$slots, "filterAreaRight", {}, void 0, !0)
3195
+ j(ee.$slots, "filterAreaRight", {}, void 0, !0)
3195
3196
  ]),
3196
3197
  _: 3
3197
3198
  }, 8, ["show-search", "search-query", "onSearch", "search-placeholder", "search-class"]),
3198
3199
  w("div", {
3199
3200
  ref_key: "tableContainer",
3200
- ref: M,
3201
+ ref: B,
3201
3202
  class: G(["vs-table-container vs-position-relative vs-overflow-auto", [
3202
3203
  e.containerClass,
3203
3204
  {
@@ -3221,27 +3222,27 @@ const Ks = { class: "vs-datatable" }, zs = {
3221
3222
  ref: i,
3222
3223
  columns: e.columns,
3223
3224
  expandable: e.expandable,
3224
- "is-item-selected-controlled": $(I),
3225
+ "is-item-selected-controlled": $(q),
3225
3226
  "is-all-checked": $(W),
3226
- "is-some-checked": $(V),
3227
+ "is-some-checked": $(N),
3227
3228
  tablename: e.tablename,
3228
3229
  "sort-helpers": $(C),
3229
3230
  filters: $(p),
3230
- "onUpdate:filters": j[1] || (j[1] = (Z) => Fe(p) ? p.value = Z : null),
3231
+ "onUpdate:filters": U[1] || (U[1] = (Z) => Fe(p) ? p.value = Z : null),
3231
3232
  rows: e.rows,
3232
3233
  "header-class": e.headerClass,
3233
- onToggleAll: $(U),
3234
- onApplyFilter: j[2] || (j[2] = (Z, de) => {
3235
- $(x)(Z, de), d.value = 1;
3234
+ onToggleAll: $(D),
3235
+ onApplyFilter: U[2] || (U[2] = (Z, de) => {
3236
+ $(x)(Z, de), u.value = 1;
3236
3237
  }),
3237
- onClearFilter: j[3] || (j[3] = (Z) => {
3238
- $(R)(Z), d.value = 1;
3238
+ onClearFilter: U[3] || (U[3] = (Z) => {
3239
+ $(R)(Z), u.value = 1;
3239
3240
  })
3240
3241
  }, Te({ _: 2 }, [
3241
3242
  Q(ee.$slots, (Z, de) => ({
3242
3243
  name: de,
3243
- fn: X((Ze) => [
3244
- z(ee.$slots, de, nt(ot(Ze)), void 0, !0)
3244
+ fn: X((Xe) => [
3245
+ j(ee.$slots, de, ot(st(Xe)), void 0, !0)
3245
3246
  ])
3246
3247
  }))
3247
3248
  ]), 1032, ["columns", "expandable", "is-item-selected-controlled", "is-all-checked", "is-some-checked", "tablename", "sort-helpers", "filters", "rows", "header-class", "onToggleAll"]),
@@ -3253,10 +3254,10 @@ const Ks = { class: "vs-datatable" }, zs = {
3253
3254
  "no-data-text": e.noDataText,
3254
3255
  "no-data-description": e.noDataDescription,
3255
3256
  "paginated-rows": $(g),
3256
- "total-columns": Vt.value,
3257
+ "total-columns": Ze.value,
3257
3258
  expandable: e.expandable,
3258
- "is-item-selected-controlled": $(I),
3259
- "selected-items": $(N),
3259
+ "is-item-selected-controlled": $(q),
3260
+ "selected-items": $(K),
3260
3261
  tablename: e.tablename,
3261
3262
  columns: e.columns,
3262
3263
  "row-key": e.rowKey,
@@ -3265,17 +3266,17 @@ const Ks = { class: "vs-datatable" }, zs = {
3265
3266
  "has-row-click": r.value,
3266
3267
  "get-row-key": $(re),
3267
3268
  "get-value": $(Bt),
3268
- "is-row-expanded": $(L),
3269
+ "is-row-expanded": $(V),
3269
3270
  "is-row-loading": $(b),
3270
- "toggle-row-expansion": $(P),
3271
- "toggle-row": $(ge),
3272
- "is-row-selected": $(yt),
3273
- onRowClick: j[4] || (j[4] = (Z, de) => ee.$emit("rowClick", Z, de))
3271
+ "toggle-row-expansion": $(L),
3272
+ "toggle-row": $(ve),
3273
+ "is-row-selected": $(wt),
3274
+ onRowClick: U[4] || (U[4] = (Z, de) => ee.$emit("rowClick", Z, de))
3274
3275
  }, Te({ _: 2 }, [
3275
3276
  Q(ee.$slots, (Z, de) => ({
3276
3277
  name: de,
3277
- fn: X((Ze) => [
3278
- z(ee.$slots, de, nt(ot(Ze)), void 0, !0)
3278
+ fn: X((Xe) => [
3279
+ j(ee.$slots, de, ot(st(Xe)), void 0, !0)
3279
3280
  ])
3280
3281
  }))
3281
3282
  ]), 1032, ["loading", "loading-text", "no-data-text", "no-data-description", "paginated-rows", "total-columns", "expandable", "is-item-selected-controlled", "selected-items", "tablename", "columns", "row-key", "row-class", "cell-class", "has-row-click", "get-row-key", "get-value", "is-row-expanded", "is-row-loading", "toggle-row-expansion", "toggle-row", "is-row-selected"]),
@@ -3284,8 +3285,8 @@ const Ks = { class: "vs-datatable" }, zs = {
3284
3285
  columns: e.columns,
3285
3286
  rows: $(g),
3286
3287
  expandable: e.expandable,
3287
- "is-item-selected-controlled": $(I)
3288
- }, null, 8, ["columns", "rows", "expandable", "is-item-selected-controlled"])) : D("", !0)
3288
+ "is-item-selected-controlled": $(q)
3289
+ }, null, 8, ["columns", "rows", "expandable", "is-item-selected-controlled"])) : P("", !0)
3289
3290
  ], 2)
3290
3291
  ], 2)
3291
3292
  ], 2),
@@ -3293,26 +3294,26 @@ const Ks = { class: "vs-datatable" }, zs = {
3293
3294
  w("div", js, [
3294
3295
  ne(on, {
3295
3296
  modelValue: $(v),
3296
- "onUpdate:modelValue": j[5] || (j[5] = (Z) => Fe(v) ? v.value = Z : null),
3297
+ "onUpdate:modelValue": U[5] || (U[5] = (Z) => Fe(v) ? v.value = Z : null),
3297
3298
  onRowsPerPageChanged: $(h)
3298
3299
  }, null, 8, ["modelValue", "onRowsPerPageChanged"]),
3299
- j[7] || (j[7] = w("div", { class: "vs-divider" }, null, -1)),
3300
+ U[7] || (U[7] = w("div", { class: "vs-divider" }, null, -1)),
3300
3301
  w("div", Us, H($(f).start < 1 ? 0 : $(f).start) + " - " + H($(f).end) + " of " + H($(m)) + " " + H(e.entriesText), 1)
3301
3302
  ]),
3302
3303
  ne(Jt, {
3303
- modelValue: $(d),
3304
- "onUpdate:modelValue": j[6] || (j[6] = (Z) => Fe(d) ? d.value = Z : null),
3304
+ modelValue: $(u),
3305
+ "onUpdate:modelValue": U[6] || (U[6] = (Z) => Fe(u) ? u.value = Z : null),
3305
3306
  totalRecords: $(m),
3306
3307
  rowsPerPage: $(v),
3307
3308
  maxVisible: e.maxVisiblePages,
3308
3309
  tablename: e.tablename,
3309
3310
  class: G(e.paginationClass),
3310
- onPageChanged: $(u)
3311
+ onPageChanged: $(d)
3311
3312
  }, null, 8, ["modelValue", "totalRecords", "rowsPerPage", "maxVisible", "tablename", "class", "onPageChanged"])
3312
- ])) : D("", !0)
3313
+ ])) : P("", !0)
3313
3314
  ]));
3314
3315
  }
3315
- }), Xs = /* @__PURE__ */ ae(Zs, [["__scopeId", "data-v-6e690e26"]]), Ys = {
3316
+ }), Xs = /* @__PURE__ */ ae(Zs, [["__scopeId", "data-v-397a4bba"]]), Ys = {
3316
3317
  install(e) {
3317
3318
  e.component("VsDataTable", Xs);
3318
3319
  }