vs-datatable 1.2.6 → 1.2.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,18 +1,19 @@
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
- import './index.css';const Bt = (e, n) => n ? n.split(".").reduce((t, o) => t && t[o], e) : "";
1
+ import { defineComponent as _, computed as F, createElementBlock as x, openBlock as y, createElementVNode as b, createCommentVNode as D, Fragment as z, renderList as Q, normalizeClass as G, toDisplayString as B, unref as $, mergeProps as Ae, renderSlot as j, ref as q, 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 mt, createBlock as fe, Teleport as Dt, Transition as Pt, vModelSelect as Qe, normalizeStyle as pt, createSlots as Te, createTextVNode as Ge, onBeforeUnmount as He, isRef as Fe, shallowRef as gt, useAttrs as It, onBeforeMount as qt, normalizeProps as ot, guardReactiveProps as st } from "vue";
2
+ import './index.css';const Mt = (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 wt(e, n, t = "id") {
7
- return n.some((o) => re(o, -1, t) === re(e, -1, t));
6
+ function yt(e, n, t = "id") {
7
+ return n.some(
8
+ (o) => re(o, -1, t) === re(e, -1, t)
9
+ );
8
10
  }
9
- function Ht(e, n, t) {
11
+ function Bt(e, n, t) {
10
12
  const o = (l) => l.reduce((a, r) => r.children && r.children.length > 0 ? a + o(r.children) : a + 1, 0);
11
13
  return o(e) + (n ? 1 : 0) + (t ? 1 : 0);
12
14
  }
13
- function Wt(e, n) {
14
- if (!n.length)
15
- return e;
15
+ function Ht(e, n) {
16
+ if (!n.length) return e;
16
17
  const t = (o, s) => s.split(".").reduce((l, a) => l?.[a], o) ?? "";
17
18
  return [...e].sort((o, s) => {
18
19
  for (const { field: l, order: a } of n) {
@@ -24,25 +25,25 @@ function Wt(e, n) {
24
25
  });
25
26
  }
26
27
  function Nt(e, n, t) {
27
- if (!t)
28
- return e;
28
+ if (!t) return e;
29
29
  const o = (n - 1) * t, s = o + t;
30
30
  return e.slice(o, s);
31
31
  }
32
- function Kt(e, n, t) {
32
+ function Wt(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 bt(e, n) {
36
+ function wt(e, n) {
37
37
  return Math.ceil(e / n);
38
38
  }
39
39
  function lt(e, n, t) {
40
- if (!n || n.trim() === "")
41
- return e;
40
+ if (!n || n.trim() === "") return e;
42
41
  const o = n.toLowerCase();
43
- return e.filter((s) => Object.values(s).some((l) => String(l ?? "").toLowerCase().includes(o)));
42
+ return e.filter((s) => Object.values(s).some(
43
+ (l) => String(l ?? "").toLowerCase().includes(o)
44
+ ));
44
45
  }
45
- function zt(e = []) {
46
+ function Kt(e = []) {
46
47
  const n = [], t = (o) => {
47
48
  o.forEach((s) => {
48
49
  Array.isArray(s.children) && s.children.length ? t(s.children) : n.push(s);
@@ -50,13 +51,13 @@ function zt(e = []) {
50
51
  };
51
52
  return t(e), n;
52
53
  }
53
- const jt = ["id"], Ut = ["disabled"], Zt = {
54
+ const zt = ["id"], jt = ["disabled"], Ut = {
54
55
  key: 1,
55
56
  class: "vs-pagination-ellipsis"
56
- }, Xt = ["id", "onClick"], Qt = {
57
+ }, Zt = ["id", "onClick"], Xt = {
57
58
  key: 2,
58
59
  class: "vs-pagination-ellipsis"
59
- }, Yt = ["disabled"], Gt = /* @__PURE__ */ _({
60
+ }, Qt = ["disabled"], Yt = /* @__PURE__ */ _({
60
61
  __name: "VsPagination",
61
62
  props: {
62
63
  modelValue: {},
@@ -73,66 +74,66 @@ const jt = ["id"], Ut = ["disabled"], Zt = {
73
74
  set: (f) => {
74
75
  o("update:modelValue", f), o("pageChanged", f);
75
76
  }
76
- }), 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(() => {
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)), u = F(() => {
77
78
  const f = [];
78
- for (let d = a.value; d <= r.value; d++)
79
- f.push(d);
79
+ for (let h = a.value; h <= r.value; h++)
80
+ f.push(h);
80
81
  return f;
81
- }), u = (f) => {
82
+ }), d = (f) => {
82
83
  f >= 1 && f <= i.value && (l.value = f);
83
84
  }, v = () => {
84
85
  l.value > 1 && l.value--;
85
86
  }, m = () => {
86
87
  l.value < i.value && l.value++;
87
88
  };
88
- return (f, d) => (y(), k("div", {
89
+ return (f, h) => (y(), x("div", {
89
90
  class: "vs-pagination",
90
91
  id: e.tablename + "-pagination"
91
92
  }, [
92
- w("button", {
93
+ b("button", {
93
94
  onClick: v,
94
95
  type: "button",
95
96
  class: "vs-pagination-button vs-pagination-nav",
96
97
  disabled: l.value === 1
97
- }, " ‹‹ ", 8, Ut),
98
- a.value > 1 ? (y(), k("button", {
98
+ }, " ‹‹ ", 8, jt),
99
+ a.value > 1 ? (y(), x("button", {
99
100
  key: 0,
100
101
  type: "button",
101
102
  class: "vs-pagination-button",
102
- onClick: d[0] || (d[0] = (h) => u(1))
103
- }, " 1 ")) : P("", !0),
104
- a.value > 2 ? (y(), k("span", Zt, "...")) : P("", !0),
105
- (y(!0), k(z, null, Q(c.value, (h) => (y(), k("button", {
106
- key: h,
103
+ onClick: h[0] || (h[0] = (c) => d(1))
104
+ }, " 1 ")) : D("", !0),
105
+ a.value > 2 ? (y(), x("span", Ut, "...")) : D("", !0),
106
+ (y(!0), x(z, null, Q(u.value, (c) => (y(), x("button", {
107
+ key: c,
107
108
  type: "button",
108
109
  class: G([
109
110
  "vs-pagination-button",
110
- { "vs-active": l.value === h }
111
+ { "vs-active": l.value === c }
111
112
  ]),
112
- id: e.tablename + "-page-" + h,
113
- onClick: (g) => u(h)
114
- }, H(h), 11, Xt))), 128)),
115
- r.value < i.value - 1 ? (y(), k("span", Qt, "...")) : P("", !0),
116
- r.value < i.value ? (y(), k("button", {
113
+ id: e.tablename + "-page-" + c,
114
+ onClick: (g) => d(c)
115
+ }, B(c), 11, Zt))), 128)),
116
+ r.value < i.value - 1 ? (y(), x("span", Xt, "...")) : D("", !0),
117
+ r.value < i.value ? (y(), x("button", {
117
118
  key: 3,
118
119
  type: "button",
119
120
  class: "vs-pagination-button",
120
- onClick: d[1] || (d[1] = (h) => u(i.value))
121
- }, H(i.value), 1)) : P("", !0),
122
- w("button", {
121
+ onClick: h[1] || (h[1] = (c) => d(i.value))
122
+ }, B(i.value), 1)) : D("", !0),
123
+ b("button", {
123
124
  onClick: m,
124
125
  type: "button",
125
126
  class: "vs-pagination-button vs-pagination-nav",
126
127
  disabled: l.value === i.value
127
- }, " ›› ", 8, Yt)
128
- ], 8, jt));
128
+ }, " ›› ", 8, Qt)
129
+ ], 8, zt));
129
130
  }
130
131
  }), ae = (e, n) => {
131
132
  const t = e.__vccOpts || e;
132
133
  for (const [o, s] of n)
133
134
  t[o] = s;
134
135
  return t;
135
- }, Jt = /* @__PURE__ */ ae(Gt, [["__scopeId", "data-v-b327b254"]]), _t = { class: "vs-rows-per-page" }, en = ["value"], tn = ["value"], nn = /* @__PURE__ */ _({
136
+ }, Gt = /* @__PURE__ */ ae(Yt, [["__scopeId", "data-v-b327b254"]]), Jt = { class: "vs-rows-per-page" }, _t = ["value"], en = ["value"], tn = /* @__PURE__ */ _({
136
137
  __name: "VsRowsPerPage",
137
138
  props: {
138
139
  modelValue: {},
@@ -144,92 +145,92 @@ const jt = ["id"], Ut = ["disabled"], Zt = {
144
145
  const r = Number(a.target.value);
145
146
  o("update:modelValue", r), o("rowsPerPageChanged", r);
146
147
  };
147
- return (a, r) => (y(), k("div", _t, [
148
- r[0] || (r[0] = w("span", { class: "vs-rows-label" }, "Items Per Page", -1)),
149
- w("select", {
148
+ return (a, r) => (y(), x("div", Jt, [
149
+ r[0] || (r[0] = b("span", { class: "vs-rows-label" }, "Items Per Page", -1)),
150
+ b("select", {
150
151
  class: "vs-items-dropdown",
151
152
  value: e.modelValue,
152
153
  onChange: l
153
154
  }, [
154
- (y(!0), k(z, null, Q($(s), (i) => (y(), k("option", {
155
+ (y(!0), x(z, null, Q($(s), (i) => (y(), x("option", {
155
156
  key: i,
156
157
  value: i
157
- }, H(i), 9, tn))), 128))
158
- ], 40, en)
158
+ }, B(i), 9, en))), 128))
159
+ ], 40, _t)
159
160
  ]));
160
161
  }
161
- }), on = /* @__PURE__ */ ae(nn, [["__scopeId", "data-v-0c2bdd9c"]]), De = Math.min, we = Math.max, Ie = Math.round, Le = Math.floor, ie = (e) => ({
162
+ }), nn = /* @__PURE__ */ ae(tn, [["__scopeId", "data-v-0c2bdd9c"]]), Pe = Math.min, be = Math.max, Ie = Math.round, Le = Math.floor, ie = (e) => ({
162
163
  x: e,
163
164
  y: e
164
- }), sn = {
165
+ }), on = {
165
166
  left: "right",
166
167
  right: "left",
167
168
  bottom: "top",
168
169
  top: "bottom"
169
- }, ln = {
170
+ }, sn = {
170
171
  start: "end",
171
172
  end: "start"
172
173
  };
173
174
  function at(e, n, t) {
174
- return we(e, De(n, t));
175
+ return be(e, Pe(n, t));
175
176
  }
176
- function We(e, n) {
177
+ function Ne(e, n) {
177
178
  return typeof e == "function" ? e(n) : e;
178
179
  }
179
- function be(e) {
180
+ function xe(e) {
180
181
  return e.split("-")[0];
181
182
  }
182
- function Ne(e) {
183
+ function We(e) {
183
184
  return e.split("-")[1];
184
185
  }
185
- function xt(e) {
186
+ function bt(e) {
186
187
  return e === "x" ? "y" : "x";
187
188
  }
188
- function kt(e) {
189
+ function xt(e) {
189
190
  return e === "y" ? "height" : "width";
190
191
  }
191
- const an = /* @__PURE__ */ new Set(["top", "bottom"]);
192
+ const ln = /* @__PURE__ */ new Set(["top", "bottom"]);
192
193
  function me(e) {
193
- return an.has(be(e)) ? "y" : "x";
194
+ return ln.has(xe(e)) ? "y" : "x";
194
195
  }
195
- function Ct(e) {
196
- return xt(me(e));
196
+ function kt(e) {
197
+ return bt(me(e));
197
198
  }
198
- function rn(e, n, t) {
199
+ function an(e, n, t) {
199
200
  t === void 0 && (t = !1);
200
- const o = Ne(e), s = Ct(e), l = kt(s);
201
+ const o = We(e), s = kt(e), l = xt(s);
201
202
  let a = s === "x" ? o === (t ? "end" : "start") ? "right" : "left" : o === "start" ? "bottom" : "top";
202
203
  return n.reference[l] > n.floating[l] && (a = qe(a)), [a, qe(a)];
203
204
  }
204
- function cn(e) {
205
+ function rn(e) {
205
206
  const n = qe(e);
206
207
  return [Je(e), n, Je(n)];
207
208
  }
208
209
  function Je(e) {
209
- return e.replace(/start|end/g, (n) => ln[n]);
210
+ return e.replace(/start|end/g, (n) => sn[n]);
210
211
  }
211
- const rt = ["left", "right"], it = ["right", "left"], un = ["top", "bottom"], dn = ["bottom", "top"];
212
- function fn(e, n, t) {
212
+ const rt = ["left", "right"], it = ["right", "left"], cn = ["top", "bottom"], un = ["bottom", "top"];
213
+ function dn(e, n, t) {
213
214
  switch (e) {
214
215
  case "top":
215
216
  case "bottom":
216
217
  return t ? n ? it : rt : n ? rt : it;
217
218
  case "left":
218
219
  case "right":
219
- return n ? un : dn;
220
+ return n ? cn : un;
220
221
  default:
221
222
  return [];
222
223
  }
223
224
  }
224
- function vn(e, n, t, o) {
225
- const s = Ne(e);
226
- let l = fn(be(e), t === "start", o);
225
+ function fn(e, n, t, o) {
226
+ const s = We(e);
227
+ let l = dn(xe(e), t === "start", o);
227
228
  return s && (l = l.map((a) => a + "-" + s), n && (l = l.concat(l.map(Je)))), l;
228
229
  }
229
230
  function qe(e) {
230
- return e.replace(/left|right|bottom|top/g, (n) => sn[n]);
231
+ return e.replace(/left|right|bottom|top/g, (n) => on[n]);
231
232
  }
232
- function hn(e) {
233
+ function vn(e) {
233
234
  return {
234
235
  top: 0,
235
236
  right: 0,
@@ -238,8 +239,8 @@ function hn(e) {
238
239
  ...e
239
240
  };
240
241
  }
241
- function mn(e) {
242
- return typeof e != "number" ? hn(e) : {
242
+ function hn(e) {
243
+ return typeof e != "number" ? vn(e) : {
243
244
  top: e,
244
245
  right: e,
245
246
  bottom: e,
@@ -269,18 +270,18 @@ function ct(e, n, t) {
269
270
  reference: o,
270
271
  floating: s
271
272
  } = e;
272
- 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;
273
+ const l = me(n), a = kt(n), r = xt(a), i = xe(n), u = 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
274
  let f;
274
275
  switch (i) {
275
276
  case "top":
276
277
  f = {
277
- x: u,
278
+ x: d,
278
279
  y: o.y - s.height
279
280
  };
280
281
  break;
281
282
  case "bottom":
282
283
  f = {
283
- x: u,
284
+ x: d,
284
285
  y: o.y + o.height
285
286
  };
286
287
  break;
@@ -302,78 +303,78 @@ function ct(e, n, t) {
302
303
  y: o.y
303
304
  };
304
305
  }
305
- switch (Ne(n)) {
306
+ switch (We(n)) {
306
307
  case "start":
307
- f[a] -= m * (t && c ? -1 : 1);
308
+ f[a] -= m * (t && u ? -1 : 1);
308
309
  break;
309
310
  case "end":
310
- f[a] += m * (t && c ? -1 : 1);
311
+ f[a] += m * (t && u ? -1 : 1);
311
312
  break;
312
313
  }
313
314
  return f;
314
315
  }
315
- const pn = async (e, n, t) => {
316
+ const mn = async (e, n, t) => {
316
317
  const {
317
318
  placement: o = "bottom",
318
319
  strategy: s = "absolute",
319
320
  middleware: l = [],
320
321
  platform: a
321
322
  } = t, r = l.filter(Boolean), i = await (a.isRTL == null ? void 0 : a.isRTL(n));
322
- let c = await a.getElementRects({
323
+ let u = await a.getElementRects({
323
324
  reference: e,
324
325
  floating: n,
325
326
  strategy: s
326
327
  }), {
327
- x: u,
328
+ x: d,
328
329
  y: v
329
- } = ct(c, o, i), m = o, f = {}, d = 0;
330
- for (let h = 0; h < r.length; h++) {
330
+ } = ct(u, o, i), m = o, f = {}, h = 0;
331
+ for (let c = 0; c < r.length; c++) {
331
332
  const {
332
333
  name: g,
333
334
  fn: C
334
- } = r[h], {
335
- x: S,
335
+ } = r[c], {
336
+ x: R,
336
337
  y: E,
337
338
  data: V,
338
- reset: L
339
+ reset: T
339
340
  } = await C({
340
- x: u,
341
+ x: d,
341
342
  y: v,
342
343
  initialPlacement: o,
343
344
  placement: m,
344
345
  strategy: s,
345
346
  middlewareData: f,
346
- rects: c,
347
+ rects: u,
347
348
  platform: a,
348
349
  elements: {
349
350
  reference: e,
350
351
  floating: n
351
352
  }
352
353
  });
353
- u = S ?? u, v = E ?? v, f = {
354
+ d = R ?? d, v = E ?? v, f = {
354
355
  ...f,
355
356
  [g]: {
356
357
  ...f[g],
357
358
  ...V
358
359
  }
359
- }, L && d <= 50 && (d++, typeof L == "object" && (L.placement && (m = L.placement), L.rects && (c = L.rects === !0 ? await a.getElementRects({
360
+ }, T && h <= 50 && (h++, typeof T == "object" && (T.placement && (m = T.placement), T.rects && (u = T.rects === !0 ? await a.getElementRects({
360
361
  reference: e,
361
362
  floating: n,
362
363
  strategy: s
363
- }) : L.rects), {
364
- x: u,
364
+ }) : T.rects), {
365
+ x: d,
365
366
  y: v
366
- } = ct(c, m, i)), h = -1);
367
+ } = ct(u, m, i)), c = -1);
367
368
  }
368
369
  return {
369
- x: u,
370
+ x: d,
370
371
  y: v,
371
372
  placement: m,
372
373
  strategy: s,
373
374
  middlewareData: f
374
375
  };
375
376
  };
376
- async function St(e, n) {
377
+ async function Ct(e, n) {
377
378
  var t;
378
379
  n === void 0 && (n = {});
379
380
  const {
@@ -384,17 +385,17 @@ async function St(e, n) {
384
385
  elements: r,
385
386
  strategy: i
386
387
  } = e, {
387
- boundary: c = "clippingAncestors",
388
- rootBoundary: u = "viewport",
388
+ boundary: u = "clippingAncestors",
389
+ rootBoundary: d = "viewport",
389
390
  elementContext: v = "floating",
390
391
  altBoundary: m = !1,
391
392
  padding: f = 0
392
- } = We(n, e), d = mn(f), g = r[m ? v === "floating" ? "reference" : "floating" : v], C = Me(await l.getClippingRect({
393
+ } = Ne(n, e), h = hn(f), g = r[m ? v === "floating" ? "reference" : "floating" : v], C = Me(await l.getClippingRect({
393
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)),
394
- boundary: c,
395
- rootBoundary: u,
395
+ boundary: u,
396
+ rootBoundary: d,
396
397
  strategy: i
397
- })), S = v === "floating" ? {
398
+ })), R = v === "floating" ? {
398
399
  x: o,
399
400
  y: s,
400
401
  width: a.floating.width,
@@ -405,20 +406,20 @@ async function St(e, n) {
405
406
  } : {
406
407
  x: 1,
407
408
  y: 1
408
- }, L = Me(l.convertOffsetParentRelativeRectToViewportRelativeRect ? await l.convertOffsetParentRelativeRectToViewportRelativeRect({
409
+ }, T = Me(l.convertOffsetParentRelativeRectToViewportRelativeRect ? await l.convertOffsetParentRelativeRectToViewportRelativeRect({
409
410
  elements: r,
410
- rect: S,
411
+ rect: R,
411
412
  offsetParent: E,
412
413
  strategy: i
413
- }) : S);
414
+ }) : R);
414
415
  return {
415
- top: (C.top - L.top + d.top) / V.y,
416
- bottom: (L.bottom - C.bottom + d.bottom) / V.y,
417
- left: (C.left - L.left + d.left) / V.x,
418
- right: (L.right - C.right + d.right) / V.x
416
+ top: (C.top - T.top + h.top) / V.y,
417
+ bottom: (T.bottom - C.bottom + h.bottom) / V.y,
418
+ left: (C.left - T.left + h.left) / V.x,
419
+ right: (T.right - C.right + h.right) / V.x
419
420
  };
420
421
  }
421
- const gn = function(e) {
422
+ const pn = function(e) {
422
423
  return e === void 0 && (e = {}), {
423
424
  name: "flip",
424
425
  options: e,
@@ -430,86 +431,86 @@ const gn = function(e) {
430
431
  rects: a,
431
432
  initialPlacement: r,
432
433
  platform: i,
433
- elements: c
434
+ elements: u
434
435
  } = n, {
435
- mainAxis: u = !0,
436
+ mainAxis: d = !0,
436
437
  crossAxis: v = !0,
437
438
  fallbackPlacements: m,
438
439
  fallbackStrategy: f = "bestFit",
439
- fallbackAxisSideDirection: d = "none",
440
- flipAlignment: h = !0,
440
+ fallbackAxisSideDirection: h = "none",
441
+ flipAlignment: c = !0,
441
442
  ...g
442
- } = We(e, n);
443
+ } = Ne(e, n);
443
444
  if ((t = l.arrow) != null && t.alignmentOffset)
444
445
  return {};
445
- 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";
446
- !m && M && L.push(...vn(r, h, d, V));
447
- const b = [r, ...L], p = await St(n, g), x = [];
448
- let R = ((o = l.flip) == null ? void 0 : o.overflows) || [];
449
- if (u && x.push(p[C]), v) {
450
- const O = rn(s, a, V);
451
- x.push(p[O[0]], p[O[1]]);
446
+ const C = xe(s), R = me(r), E = xe(r) === r, V = await (i.isRTL == null ? void 0 : i.isRTL(u.floating)), T = m || (E || !c ? [qe(r)] : rn(r)), W = h !== "none";
447
+ !m && W && T.push(...fn(r, c, h, V));
448
+ const S = [r, ...T], k = await Ct(n, g), w = [];
449
+ let p = ((o = l.flip) == null ? void 0 : o.overflows) || [];
450
+ if (d && w.push(k[C]), v) {
451
+ const O = an(s, a, V);
452
+ w.push(k[O[0]], k[O[1]]);
452
453
  }
453
- if (R = [...R, {
454
+ if (p = [...p, {
454
455
  placement: s,
455
- overflows: x
456
- }], !x.every((O) => O <= 0)) {
457
- var T, B;
458
- const O = (((T = l.flip) == null ? void 0 : T.index) || 0) + 1, K = b[O];
459
- if (K && (!(v === "alignment" ? S !== me(K) : !1) || // We leave the current main axis only if every placement on that axis
456
+ overflows: w
457
+ }], !w.every((O) => O <= 0)) {
458
+ var A, P;
459
+ const O = (((A = l.flip) == null ? void 0 : A.index) || 0) + 1, H = S[O];
460
+ if (H && (!(v === "alignment" ? R !== me(H) : !1) || // We leave the current main axis only if every placement on that axis
460
461
  // overflows the main axis.
461
- R.every((N) => me(N.placement) === S ? N.overflows[0] > 0 : !0)))
462
+ p.every((K) => me(K.placement) === R ? K.overflows[0] > 0 : !0)))
462
463
  return {
463
464
  data: {
464
465
  index: O,
465
- overflows: R
466
+ overflows: p
466
467
  },
467
468
  reset: {
468
- placement: K
469
+ placement: H
469
470
  }
470
471
  };
471
- 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;
472
- if (!q)
472
+ let M = (P = p.filter((N) => N.overflows[0] <= 0).sort((N, K) => N.overflows[1] - K.overflows[1])[0]) == null ? void 0 : P.placement;
473
+ if (!M)
473
474
  switch (f) {
474
475
  case "bestFit": {
475
- var A;
476
- const W = (A = R.filter((N) => {
477
- if (M) {
478
- const D = me(N.placement);
479
- return D === S || // Create a bias to the `y` side axis due to horizontal
476
+ var L;
477
+ const N = (L = p.filter((K) => {
478
+ if (W) {
479
+ const I = me(K.placement);
480
+ return I === R || // Create a bias to the `y` side axis due to horizontal
480
481
  // reading directions favoring greater width.
481
- D === "y";
482
+ I === "y";
482
483
  }
483
484
  return !0;
484
- }).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];
485
- W && (q = W);
485
+ }).map((K) => [K.placement, K.overflows.filter((I) => I > 0).reduce((I, ve) => I + ve, 0)]).sort((K, I) => K[1] - I[1])[0]) == null ? void 0 : L[0];
486
+ N && (M = N);
486
487
  break;
487
488
  }
488
489
  case "initialPlacement":
489
- q = r;
490
+ M = r;
490
491
  break;
491
492
  }
492
- if (s !== q)
493
+ if (s !== M)
493
494
  return {
494
495
  reset: {
495
- placement: q
496
+ placement: M
496
497
  }
497
498
  };
498
499
  }
499
500
  return {};
500
501
  }
501
502
  };
502
- }, yn = /* @__PURE__ */ new Set(["left", "top"]);
503
- async function wn(e, n) {
503
+ }, gn = /* @__PURE__ */ new Set(["left", "top"]);
504
+ async function yn(e, n) {
504
505
  const {
505
506
  placement: t,
506
507
  platform: o,
507
508
  elements: s
508
- } = 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);
509
+ } = e, l = await (o.isRTL == null ? void 0 : o.isRTL(s.floating)), a = xe(t), r = We(t), i = me(t) === "y", u = gn.has(a) ? -1 : 1, d = l && i ? -1 : 1, v = Ne(n, e);
509
510
  let {
510
511
  mainAxis: m,
511
512
  crossAxis: f,
512
- alignmentAxis: d
513
+ alignmentAxis: h
513
514
  } = typeof v == "number" ? {
514
515
  mainAxis: v,
515
516
  crossAxis: 0,
@@ -519,15 +520,15 @@ async function wn(e, n) {
519
520
  crossAxis: v.crossAxis || 0,
520
521
  alignmentAxis: v.alignmentAxis
521
522
  };
522
- return r && typeof d == "number" && (f = r === "end" ? d * -1 : d), i ? {
523
- x: f * u,
524
- y: m * c
523
+ return r && typeof h == "number" && (f = r === "end" ? h * -1 : h), i ? {
524
+ x: f * d,
525
+ y: m * u
525
526
  } : {
526
- x: m * c,
527
- y: f * u
527
+ x: m * u,
528
+ y: f * d
528
529
  };
529
530
  }
530
- const bn = function(e) {
531
+ const wn = function(e) {
531
532
  return e === void 0 && (e = 0), {
532
533
  name: "offset",
533
534
  options: e,
@@ -538,7 +539,7 @@ const bn = function(e) {
538
539
  y: l,
539
540
  placement: a,
540
541
  middlewareData: r
541
- } = n, i = await wn(n, e);
542
+ } = n, i = await yn(n, e);
542
543
  return a === ((t = r.offset) == null ? void 0 : t.placement) && (o = r.arrow) != null && o.alignmentOffset ? {} : {
543
544
  x: s + i.x,
544
545
  y: l + i.y,
@@ -549,7 +550,7 @@ const bn = function(e) {
549
550
  };
550
551
  }
551
552
  };
552
- }, xn = function(e) {
553
+ }, bn = function(e) {
553
554
  return e === void 0 && (e = {}), {
554
555
  name: "shift",
555
556
  options: e,
@@ -565,38 +566,38 @@ const bn = function(e) {
565
566
  fn: (g) => {
566
567
  let {
567
568
  x: C,
568
- y: S
569
+ y: R
569
570
  } = g;
570
571
  return {
571
572
  x: C,
572
- y: S
573
+ y: R
573
574
  };
574
575
  }
575
576
  },
576
577
  ...i
577
- } = We(e, n), c = {
578
+ } = Ne(e, n), u = {
578
579
  x: t,
579
580
  y: o
580
- }, u = await St(n, i), v = me(be(s)), m = xt(v);
581
- let f = c[m], d = c[v];
581
+ }, d = await Ct(n, i), v = me(xe(s)), m = bt(v);
582
+ let f = u[m], h = u[v];
582
583
  if (l) {
583
- const g = m === "y" ? "top" : "left", C = m === "y" ? "bottom" : "right", S = f + u[g], E = f - u[C];
584
- f = at(S, f, E);
584
+ const g = m === "y" ? "top" : "left", C = m === "y" ? "bottom" : "right", R = f + d[g], E = f - d[C];
585
+ f = at(R, f, E);
585
586
  }
586
587
  if (a) {
587
- const g = v === "y" ? "top" : "left", C = v === "y" ? "bottom" : "right", S = d + u[g], E = d - u[C];
588
- d = at(S, d, E);
588
+ const g = v === "y" ? "top" : "left", C = v === "y" ? "bottom" : "right", R = h + d[g], E = h - d[C];
589
+ h = at(R, h, E);
589
590
  }
590
- const h = r.fn({
591
+ const c = r.fn({
591
592
  ...n,
592
593
  [m]: f,
593
- [v]: d
594
+ [v]: h
594
595
  });
595
596
  return {
596
- ...h,
597
+ ...c,
597
598
  data: {
598
- x: h.x - t,
599
- y: h.y - o,
599
+ x: c.x - t,
600
+ y: c.y - o,
600
601
  enabled: {
601
602
  [m]: l,
602
603
  [v]: a
@@ -610,7 +611,7 @@ function Ke() {
610
611
  return typeof window < "u";
611
612
  }
612
613
  function Ee(e) {
613
- return Rt(e) ? (e.nodeName || "").toLowerCase() : "#document";
614
+ return St(e) ? (e.nodeName || "").toLowerCase() : "#document";
614
615
  }
615
616
  function J(e) {
616
617
  var n;
@@ -618,9 +619,9 @@ function J(e) {
618
619
  }
619
620
  function ue(e) {
620
621
  var n;
621
- return (n = (Rt(e) ? e.ownerDocument : e.document) || window.document) == null ? void 0 : n.documentElement;
622
+ return (n = (St(e) ? e.ownerDocument : e.document) || window.document) == null ? void 0 : n.documentElement;
622
623
  }
623
- function Rt(e) {
624
+ function St(e) {
624
625
  return Ke() ? e instanceof Node || e instanceof J(e).Node : !1;
625
626
  }
626
627
  function se(e) {
@@ -632,7 +633,7 @@ function ce(e) {
632
633
  function ut(e) {
633
634
  return !Ke() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof J(e).ShadowRoot;
634
635
  }
635
- const kn = /* @__PURE__ */ new Set(["inline", "contents"]);
636
+ const xn = /* @__PURE__ */ new Set(["inline", "contents"]);
636
637
  function Ve(e) {
637
638
  const {
638
639
  overflow: n,
@@ -640,15 +641,15 @@ function Ve(e) {
640
641
  overflowY: o,
641
642
  display: s
642
643
  } = le(e);
643
- return /auto|scroll|overlay|hidden|clip/.test(n + o + t) && !kn.has(s);
644
+ return /auto|scroll|overlay|hidden|clip/.test(n + o + t) && !xn.has(s);
644
645
  }
645
- const Cn = /* @__PURE__ */ new Set(["table", "td", "th"]);
646
- function Sn(e) {
647
- return Cn.has(Ee(e));
646
+ const kn = /* @__PURE__ */ new Set(["table", "td", "th"]);
647
+ function Cn(e) {
648
+ return kn.has(Ee(e));
648
649
  }
649
- const Rn = [":popover-open", ":modal"];
650
+ const Sn = [":popover-open", ":modal"];
650
651
  function ze(e) {
651
- return Rn.some((n) => {
652
+ return Sn.some((n) => {
652
653
  try {
653
654
  return e.matches(n);
654
655
  } catch {
@@ -656,12 +657,12 @@ function ze(e) {
656
657
  }
657
658
  });
658
659
  }
659
- const En = ["transform", "translate", "scale", "rotate", "perspective"], $n = ["transform", "translate", "scale", "rotate", "perspective", "filter"], An = ["paint", "layout", "strict", "content"];
660
+ const Rn = ["transform", "translate", "scale", "rotate", "perspective"], En = ["transform", "translate", "scale", "rotate", "perspective", "filter"], $n = ["paint", "layout", "strict", "content"];
660
661
  function et(e) {
661
662
  const n = tt(), t = se(e) ? le(e) : e;
662
- 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));
663
+ return Rn.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) || En.some((o) => (t.willChange || "").includes(o)) || $n.some((o) => (t.contain || "").includes(o));
663
664
  }
664
- function Fn(e) {
665
+ function An(e) {
665
666
  let n = ge(e);
666
667
  for (; ce(n) && !Se(n); ) {
667
668
  if (et(n))
@@ -675,9 +676,9 @@ function Fn(e) {
675
676
  function tt() {
676
677
  return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
677
678
  }
678
- const Tn = /* @__PURE__ */ new Set(["html", "body", "#document"]);
679
+ const Fn = /* @__PURE__ */ new Set(["html", "body", "#document"]);
679
680
  function Se(e) {
680
- return Tn.has(Ee(e));
681
+ return Fn.has(Ee(e));
681
682
  }
682
683
  function le(e) {
683
684
  return J(e).getComputedStyle(e);
@@ -703,14 +704,14 @@ function ge(e) {
703
704
  );
704
705
  return ut(n) ? n.host : n;
705
706
  }
706
- function Et(e) {
707
+ function Rt(e) {
707
708
  const n = ge(e);
708
- return Se(n) ? e.ownerDocument ? e.ownerDocument.body : e.body : ce(n) && Ve(n) ? n : Et(n);
709
+ return Se(n) ? e.ownerDocument ? e.ownerDocument.body : e.body : ce(n) && Ve(n) ? n : Rt(n);
709
710
  }
710
711
  function Oe(e, n, t) {
711
712
  var o;
712
713
  n === void 0 && (n = []), t === void 0 && (t = !0);
713
- const s = Et(e), l = s === ((o = e.ownerDocument) == null ? void 0 : o.body), a = J(s);
714
+ const s = Rt(e), l = s === ((o = e.ownerDocument) == null ? void 0 : o.body), a = J(s);
714
715
  if (l) {
715
716
  const r = _e(a);
716
717
  return n.concat(a, a.visualViewport || [], Ve(s) ? s : [], r && t ? Oe(r) : []);
@@ -720,7 +721,7 @@ function Oe(e, n, t) {
720
721
  function _e(e) {
721
722
  return e.parent && Object.getPrototypeOf(e.parent) ? e.frameElement : null;
722
723
  }
723
- function $t(e) {
724
+ function Et(e) {
724
725
  const n = le(e);
725
726
  let t = parseFloat(n.width) || 0, o = parseFloat(n.height) || 0;
726
727
  const s = ce(e), l = s ? e.offsetWidth : t, a = s ? e.offsetHeight : o, r = Ie(t) !== l || Ie(o) !== a;
@@ -733,7 +734,7 @@ function $t(e) {
733
734
  function nt(e) {
734
735
  return se(e) ? e : e.contextElement;
735
736
  }
736
- function ke(e) {
737
+ function Ce(e) {
737
738
  const n = nt(e);
738
739
  if (!ce(n))
739
740
  return ie(1);
@@ -741,58 +742,58 @@ function ke(e) {
741
742
  width: o,
742
743
  height: s,
743
744
  $: l
744
- } = $t(n);
745
+ } = Et(n);
745
746
  let a = (l ? Ie(t.width) : t.width) / o, r = (l ? Ie(t.height) : t.height) / s;
746
747
  return (!a || !Number.isFinite(a)) && (a = 1), (!r || !Number.isFinite(r)) && (r = 1), {
747
748
  x: a,
748
749
  y: r
749
750
  };
750
751
  }
751
- const On = /* @__PURE__ */ ie(0);
752
- function At(e) {
752
+ const Tn = /* @__PURE__ */ ie(0);
753
+ function $t(e) {
753
754
  const n = J(e);
754
- return !tt() || !n.visualViewport ? On : {
755
+ return !tt() || !n.visualViewport ? Tn : {
755
756
  x: n.visualViewport.offsetLeft,
756
757
  y: n.visualViewport.offsetTop
757
758
  };
758
759
  }
759
- function Vn(e, n, t) {
760
+ function On(e, n, t) {
760
761
  return n === void 0 && (n = !1), !t || n && t !== J(e) ? !1 : n;
761
762
  }
762
- function xe(e, n, t, o) {
763
+ function ke(e, n, t, o) {
763
764
  n === void 0 && (n = !1), t === void 0 && (t = !1);
764
765
  const s = e.getBoundingClientRect(), l = nt(e);
765
766
  let a = ie(1);
766
- n && (o ? se(o) && (a = ke(o)) : a = ke(e));
767
- const r = Vn(l, t, o) ? At(l) : ie(0);
768
- 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;
767
+ n && (o ? se(o) && (a = Ce(o)) : a = Ce(e));
768
+ const r = On(l, t, o) ? $t(l) : ie(0);
769
+ let i = (s.left + r.x) / a.x, u = (s.top + r.y) / a.y, d = s.width / a.x, v = s.height / a.y;
769
770
  if (l) {
770
771
  const m = J(l), f = o && se(o) ? J(o) : o;
771
- let d = m, h = _e(d);
772
- for (; h && o && f !== d; ) {
773
- 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;
774
- i *= g.x, c *= g.y, u *= g.x, v *= g.y, i += E, c += V, d = J(h), h = _e(d);
772
+ let h = m, c = _e(h);
773
+ for (; c && o && f !== h; ) {
774
+ const g = Ce(c), C = c.getBoundingClientRect(), R = le(c), E = C.left + (c.clientLeft + parseFloat(R.paddingLeft)) * g.x, V = C.top + (c.clientTop + parseFloat(R.paddingTop)) * g.y;
775
+ i *= g.x, u *= g.y, d *= g.x, v *= g.y, i += E, u += V, h = J(c), c = _e(h);
775
776
  }
776
777
  }
777
778
  return Me({
778
- width: u,
779
+ width: d,
779
780
  height: v,
780
781
  x: i,
781
- y: c
782
+ y: u
782
783
  });
783
784
  }
784
785
  function Ue(e, n) {
785
786
  const t = je(e).scrollLeft;
786
- return n ? n.left + t : xe(ue(e)).left + t;
787
+ return n ? n.left + t : ke(ue(e)).left + t;
787
788
  }
788
- function Ft(e, n) {
789
+ function At(e, n) {
789
790
  const t = e.getBoundingClientRect(), o = t.left + n.scrollLeft - Ue(e, t), s = t.top + n.scrollTop;
790
791
  return {
791
792
  x: o,
792
793
  y: s
793
794
  };
794
795
  }
795
- function Ln(e) {
796
+ function Vn(e) {
796
797
  let {
797
798
  elements: n,
798
799
  rect: t,
@@ -805,28 +806,28 @@ function Ln(e) {
805
806
  let i = {
806
807
  scrollLeft: 0,
807
808
  scrollTop: 0
808
- }, c = ie(1);
809
- const u = ie(0), v = ce(o);
809
+ }, u = ie(1);
810
+ const d = ie(0), v = ce(o);
810
811
  if ((v || !v && !l) && ((Ee(o) !== "body" || Ve(a)) && (i = je(o)), ce(o))) {
811
- const f = xe(o);
812
- c = ke(o), u.x = f.x + o.clientLeft, u.y = f.y + o.clientTop;
812
+ const f = ke(o);
813
+ u = Ce(o), d.x = f.x + o.clientLeft, d.y = f.y + o.clientTop;
813
814
  }
814
- const m = a && !v && !l ? Ft(a, i) : ie(0);
815
+ const m = a && !v && !l ? At(a, i) : ie(0);
815
816
  return {
816
- width: t.width * c.x,
817
- height: t.height * c.y,
818
- x: t.x * c.x - i.scrollLeft * c.x + u.x + m.x,
819
- y: t.y * c.y - i.scrollTop * c.y + u.y + m.y
817
+ width: t.width * u.x,
818
+ height: t.height * u.y,
819
+ x: t.x * u.x - i.scrollLeft * u.x + d.x + m.x,
820
+ y: t.y * u.y - i.scrollTop * u.y + d.y + m.y
820
821
  };
821
822
  }
822
- function Pn(e) {
823
+ function Ln(e) {
823
824
  return Array.from(e.getClientRects());
824
825
  }
825
826
  function Dn(e) {
826
- const n = ue(e), t = je(e), o = e.ownerDocument.body, s = we(n.scrollWidth, n.clientWidth, o.scrollWidth, o.clientWidth), l = we(n.scrollHeight, n.clientHeight, o.scrollHeight, o.clientHeight);
827
+ const n = ue(e), t = je(e), o = e.ownerDocument.body, s = be(n.scrollWidth, n.clientWidth, o.scrollWidth, o.clientWidth), l = be(n.scrollHeight, n.clientHeight, o.scrollHeight, o.clientHeight);
827
828
  let a = -t.scrollLeft + Ue(e);
828
829
  const r = -t.scrollTop;
829
- return le(o).direction === "rtl" && (a += we(n.clientWidth, o.clientWidth) - s), {
830
+ return le(o).direction === "rtl" && (a += be(n.clientWidth, o.clientWidth) - s), {
830
831
  width: s,
831
832
  height: l,
832
833
  x: a,
@@ -834,19 +835,19 @@ function Dn(e) {
834
835
  };
835
836
  }
836
837
  const dt = 25;
837
- function In(e, n) {
838
+ function Pn(e, n) {
838
839
  const t = J(e), o = ue(e), s = t.visualViewport;
839
840
  let l = o.clientWidth, a = o.clientHeight, r = 0, i = 0;
840
841
  if (s) {
841
842
  l = s.width, a = s.height;
842
- const u = tt();
843
- (!u || u && n === "fixed") && (r = s.offsetLeft, i = s.offsetTop);
843
+ const d = tt();
844
+ (!d || d && n === "fixed") && (r = s.offsetLeft, i = s.offsetTop);
844
845
  }
845
- const c = Ue(o);
846
- if (c <= 0) {
847
- 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);
848
- d <= dt && (l -= d);
849
- } else c <= dt && (l += c);
846
+ const u = Ue(o);
847
+ if (u <= 0) {
848
+ const d = o.ownerDocument, v = d.body, m = getComputedStyle(v), f = d.compatMode === "CSS1Compat" && parseFloat(m.marginLeft) + parseFloat(m.marginRight) || 0, h = Math.abs(o.clientWidth - v.clientWidth - f);
849
+ h <= dt && (l -= h);
850
+ } else u <= dt && (l += u);
850
851
  return {
851
852
  width: l,
852
853
  height: a,
@@ -854,26 +855,26 @@ function In(e, n) {
854
855
  y: i
855
856
  };
856
857
  }
857
- const qn = /* @__PURE__ */ new Set(["absolute", "fixed"]);
858
- function Mn(e, n) {
859
- const t = xe(e, !0, n === "fixed"), o = t.top + e.clientTop, s = t.left + e.clientLeft, l = ce(e) ? ke(e) : ie(1), a = e.clientWidth * l.x, r = e.clientHeight * l.y, i = s * l.x, c = o * l.y;
858
+ const In = /* @__PURE__ */ new Set(["absolute", "fixed"]);
859
+ function qn(e, n) {
860
+ const t = ke(e, !0, n === "fixed"), o = t.top + e.clientTop, s = t.left + e.clientLeft, l = ce(e) ? Ce(e) : ie(1), a = e.clientWidth * l.x, r = e.clientHeight * l.y, i = s * l.x, u = o * l.y;
860
861
  return {
861
862
  width: a,
862
863
  height: r,
863
864
  x: i,
864
- y: c
865
+ y: u
865
866
  };
866
867
  }
867
868
  function ft(e, n, t) {
868
869
  let o;
869
870
  if (n === "viewport")
870
- o = In(e, t);
871
+ o = Pn(e, t);
871
872
  else if (n === "document")
872
873
  o = Dn(ue(e));
873
874
  else if (se(n))
874
- o = Mn(n, t);
875
+ o = qn(n, t);
875
876
  else {
876
- const s = At(e);
877
+ const s = $t(e);
877
878
  o = {
878
879
  x: n.x - s.x,
879
880
  y: n.y - s.y,
@@ -883,11 +884,11 @@ function ft(e, n, t) {
883
884
  }
884
885
  return Me(o);
885
886
  }
886
- function Tt(e, n) {
887
+ function Ft(e, n) {
887
888
  const t = ge(e);
888
- return t === n || !se(t) || Se(t) ? !1 : le(t).position === "fixed" || Tt(t, n);
889
+ return t === n || !se(t) || Se(t) ? !1 : le(t).position === "fixed" || Ft(t, n);
889
890
  }
890
- function Bn(e, n) {
891
+ function Mn(e, n) {
891
892
  const t = n.get(e);
892
893
  if (t)
893
894
  return t;
@@ -896,20 +897,20 @@ function Bn(e, n) {
896
897
  let a = l ? ge(e) : e;
897
898
  for (; se(a) && !Se(a); ) {
898
899
  const r = le(a), i = et(a);
899
- !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);
900
+ !i && r.position === "fixed" && (s = null), (l ? !i && !s : !i && r.position === "static" && !!s && In.has(s.position) || Ve(a) && !i && Ft(e, a)) ? o = o.filter((d) => d !== a) : s = r, a = ge(a);
900
901
  }
901
902
  return n.set(e, o), o;
902
903
  }
903
- function Hn(e) {
904
+ function Bn(e) {
904
905
  let {
905
906
  element: n,
906
907
  boundary: t,
907
908
  rootBoundary: o,
908
909
  strategy: s
909
910
  } = e;
910
- const a = [...t === "clippingAncestors" ? ze(n) ? [] : Bn(n, this._c) : [].concat(t), o], r = a[0], i = a.reduce((c, u) => {
911
- const v = ft(n, u, s);
912
- 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;
911
+ const a = [...t === "clippingAncestors" ? ze(n) ? [] : Mn(n, this._c) : [].concat(t), o], r = a[0], i = a.reduce((u, d) => {
912
+ const v = ft(n, d, s);
913
+ return u.top = be(v.top, u.top), u.right = Pe(v.right, u.right), u.bottom = Pe(v.bottom, u.bottom), u.left = be(v.left, u.left), u;
913
914
  }, ft(n, r, s));
914
915
  return {
915
916
  width: i.right - i.left,
@@ -918,33 +919,33 @@ function Hn(e) {
918
919
  y: i.top
919
920
  };
920
921
  }
921
- function Wn(e) {
922
+ function Hn(e) {
922
923
  const {
923
924
  width: n,
924
925
  height: t
925
- } = $t(e);
926
+ } = Et(e);
926
927
  return {
927
928
  width: n,
928
929
  height: t
929
930
  };
930
931
  }
931
932
  function Nn(e, n, t) {
932
- const o = ce(n), s = ue(n), l = t === "fixed", a = xe(e, !0, l, n);
933
+ const o = ce(n), s = ue(n), l = t === "fixed", a = ke(e, !0, l, n);
933
934
  let r = {
934
935
  scrollLeft: 0,
935
936
  scrollTop: 0
936
937
  };
937
938
  const i = ie(0);
938
- function c() {
939
+ function u() {
939
940
  i.x = Ue(s);
940
941
  }
941
942
  if (o || !o && !l)
942
943
  if ((Ee(n) !== "body" || Ve(s)) && (r = je(n)), o) {
943
- const f = xe(n, !0, l, n);
944
+ const f = ke(n, !0, l, n);
944
945
  i.x = f.x + n.clientLeft, i.y = f.y + n.clientTop;
945
- } else s && c();
946
- l && !o && s && c();
947
- 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;
946
+ } else s && u();
947
+ l && !o && s && u();
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
949
  return {
949
950
  x: v,
950
951
  y: m,
@@ -963,7 +964,7 @@ function vt(e, n) {
963
964
  let t = e.offsetParent;
964
965
  return ue(e) === t && (t = t.ownerDocument.body), t;
965
966
  }
966
- function Ot(e, n) {
967
+ function Tt(e, n) {
967
968
  const t = J(e);
968
969
  if (ze(e))
969
970
  return t;
@@ -977,12 +978,12 @@ function Ot(e, n) {
977
978
  return t;
978
979
  }
979
980
  let o = vt(e, n);
980
- for (; o && Sn(o) && Ye(o); )
981
+ for (; o && Cn(o) && Ye(o); )
981
982
  o = vt(o, n);
982
- return o && Se(o) && Ye(o) && !et(o) ? t : o || Fn(e) || t;
983
+ return o && Se(o) && Ye(o) && !et(o) ? t : o || An(e) || t;
983
984
  }
984
- const Kn = async function(e) {
985
- const n = this.getOffsetParent || Ot, t = this.getDimensions, o = await t(e.floating);
985
+ const Wn = async function(e) {
986
+ const n = this.getOffsetParent || Tt, t = this.getDimensions, o = await t(e.floating);
986
987
  return {
987
988
  reference: Nn(e.reference, await n(e.floating), e.strategy),
988
989
  floating: {
@@ -993,25 +994,25 @@ const Kn = async function(e) {
993
994
  }
994
995
  };
995
996
  };
996
- function zn(e) {
997
+ function Kn(e) {
997
998
  return le(e).direction === "rtl";
998
999
  }
999
- const jn = {
1000
- convertOffsetParentRelativeRectToViewportRelativeRect: Ln,
1000
+ const zn = {
1001
+ convertOffsetParentRelativeRectToViewportRelativeRect: Vn,
1001
1002
  getDocumentElement: ue,
1002
- getClippingRect: Hn,
1003
- getOffsetParent: Ot,
1004
- getElementRects: Kn,
1005
- getClientRects: Pn,
1006
- getDimensions: Wn,
1007
- getScale: ke,
1003
+ getClippingRect: Bn,
1004
+ getOffsetParent: Tt,
1005
+ getElementRects: Wn,
1006
+ getClientRects: Ln,
1007
+ getDimensions: Hn,
1008
+ getScale: Ce,
1008
1009
  isElement: se,
1009
- isRTL: zn
1010
+ isRTL: Kn
1010
1011
  };
1011
- function Vt(e, n) {
1012
+ function Ot(e, n) {
1012
1013
  return e.x === n.x && e.y === n.y && e.width === n.width && e.height === n.height;
1013
1014
  }
1014
- function Un(e, n) {
1015
+ function jn(e, n) {
1015
1016
  let t = null, o;
1016
1017
  const s = ue(e);
1017
1018
  function l() {
@@ -1020,44 +1021,44 @@ function Un(e, n) {
1020
1021
  }
1021
1022
  function a(r, i) {
1022
1023
  r === void 0 && (r = !1), i === void 0 && (i = 1), l();
1023
- const c = e.getBoundingClientRect(), {
1024
- left: u,
1024
+ const u = e.getBoundingClientRect(), {
1025
+ left: d,
1025
1026
  top: v,
1026
1027
  width: m,
1027
1028
  height: f
1028
- } = c;
1029
+ } = u;
1029
1030
  if (r || n(), !m || !f)
1030
1031
  return;
1031
- const d = Le(v), h = Le(s.clientWidth - (u + m)), g = Le(s.clientHeight - (v + f)), C = Le(u), E = {
1032
- rootMargin: -d + "px " + -h + "px " + -g + "px " + -C + "px",
1033
- threshold: we(0, De(1, i)) || 1
1032
+ const h = Le(v), c = Le(s.clientWidth - (d + m)), g = Le(s.clientHeight - (v + f)), C = Le(d), E = {
1033
+ rootMargin: -h + "px " + -c + "px " + -g + "px " + -C + "px",
1034
+ threshold: be(0, Pe(1, i)) || 1
1034
1035
  };
1035
1036
  let V = !0;
1036
- function L(M) {
1037
- const b = M[0].intersectionRatio;
1038
- if (b !== i) {
1037
+ function T(W) {
1038
+ const S = W[0].intersectionRatio;
1039
+ if (S !== i) {
1039
1040
  if (!V)
1040
1041
  return a();
1041
- b ? a(!1, b) : o = setTimeout(() => {
1042
+ S ? a(!1, S) : o = setTimeout(() => {
1042
1043
  a(!1, 1e-7);
1043
1044
  }, 1e3);
1044
1045
  }
1045
- b === 1 && !Vt(c, e.getBoundingClientRect()) && a(), V = !1;
1046
+ S === 1 && !Ot(u, e.getBoundingClientRect()) && a(), V = !1;
1046
1047
  }
1047
1048
  try {
1048
- t = new IntersectionObserver(L, {
1049
+ t = new IntersectionObserver(T, {
1049
1050
  ...E,
1050
1051
  // Handle <iframe>s
1051
1052
  root: s.ownerDocument
1052
1053
  });
1053
1054
  } catch {
1054
- t = new IntersectionObserver(L, E);
1055
+ t = new IntersectionObserver(T, E);
1055
1056
  }
1056
1057
  t.observe(e);
1057
1058
  }
1058
1059
  return a(!0), l;
1059
1060
  }
1060
- function Zn(e, n, t, o) {
1061
+ function Un(e, n, t, o) {
1061
1062
  o === void 0 && (o = {});
1062
1063
  const {
1063
1064
  ancestorScroll: s = !0,
@@ -1065,51 +1066,50 @@ function Zn(e, n, t, o) {
1065
1066
  elementResize: a = typeof ResizeObserver == "function",
1066
1067
  layoutShift: r = typeof IntersectionObserver == "function",
1067
1068
  animationFrame: i = !1
1068
- } = o, c = nt(e), u = s || l ? [...c ? Oe(c) : [], ...Oe(n)] : [];
1069
- u.forEach((C) => {
1069
+ } = o, u = nt(e), d = s || l ? [...u ? Oe(u) : [], ...Oe(n)] : [];
1070
+ d.forEach((C) => {
1070
1071
  s && C.addEventListener("scroll", t, {
1071
1072
  passive: !0
1072
1073
  }), l && C.addEventListener("resize", t);
1073
1074
  });
1074
- const v = c && r ? Un(c, t) : null;
1075
+ const v = u && r ? jn(u, t) : null;
1075
1076
  let m = -1, f = null;
1076
1077
  a && (f = new ResizeObserver((C) => {
1077
- let [S] = C;
1078
- S && S.target === c && f && (f.unobserve(n), cancelAnimationFrame(m), m = requestAnimationFrame(() => {
1078
+ let [R] = C;
1079
+ R && R.target === u && f && (f.unobserve(n), cancelAnimationFrame(m), m = requestAnimationFrame(() => {
1079
1080
  var E;
1080
1081
  (E = f) == null || E.observe(n);
1081
1082
  })), t();
1082
- }), c && !i && f.observe(c), f.observe(n));
1083
- let d, h = i ? xe(e) : null;
1083
+ }), u && !i && f.observe(u), f.observe(n));
1084
+ let h, c = i ? ke(e) : null;
1084
1085
  i && g();
1085
1086
  function g() {
1086
- const C = xe(e);
1087
- h && !Vt(h, C) && t(), h = C, d = requestAnimationFrame(g);
1087
+ const C = ke(e);
1088
+ c && !Ot(c, C) && t(), c = C, h = requestAnimationFrame(g);
1088
1089
  }
1089
1090
  return t(), () => {
1090
1091
  var C;
1091
- u.forEach((S) => {
1092
- s && S.removeEventListener("scroll", t), l && S.removeEventListener("resize", t);
1093
- }), v?.(), (C = f) == null || C.disconnect(), f = null, i && cancelAnimationFrame(d);
1092
+ d.forEach((R) => {
1093
+ s && R.removeEventListener("scroll", t), l && R.removeEventListener("resize", t);
1094
+ }), v?.(), (C = f) == null || C.disconnect(), f = null, i && cancelAnimationFrame(h);
1094
1095
  };
1095
1096
  }
1096
- const Xn = bn, Qn = xn, Yn = gn, Gn = (e, n, t) => {
1097
+ const Zn = wn, Xn = bn, Qn = pn, Yn = (e, n, t) => {
1097
1098
  const o = /* @__PURE__ */ new Map(), s = {
1098
- platform: jn,
1099
+ platform: zn,
1099
1100
  ...t
1100
1101
  }, l = {
1101
1102
  ...s.platform,
1102
1103
  _c: o
1103
1104
  };
1104
- return pn(e, n, {
1105
+ return mn(e, n, {
1105
1106
  ...s,
1106
1107
  platform: l
1107
1108
  });
1108
1109
  }, Be = {
1109
1110
  text: (e, n, t) => {
1110
1111
  const o = String(e[n] ?? "").toLowerCase(), s = (t.value ?? "").toLowerCase().trim();
1111
- if (!s && !["empty", "notEmpty"].includes(t.operator ?? ""))
1112
- return !0;
1112
+ if (!s && !["empty", "notEmpty"].includes(t.operator ?? "")) return !0;
1113
1113
  switch (t.operator) {
1114
1114
  case "contains":
1115
1115
  return o.includes(s);
@@ -1134,8 +1134,7 @@ const Xn = bn, Qn = xn, Yn = gn, Gn = (e, n, t) => {
1134
1134
  "multi-select": (e, n, t) => t.value?.length ? t.value.includes(String(e[n])) : !0,
1135
1135
  "number-range": (e, n, t) => {
1136
1136
  const o = Number(e[n]);
1137
- if (isNaN(o))
1138
- return !1;
1137
+ if (isNaN(o)) return !1;
1139
1138
  switch (t.operator) {
1140
1139
  case "between":
1141
1140
  return !(t.min != null && o < t.min || t.max != null && o > t.max);
@@ -1157,8 +1156,7 @@ const Xn = bn, Qn = xn, Yn = gn, Gn = (e, n, t) => {
1157
1156
  },
1158
1157
  "date-range": (e, n, t) => {
1159
1158
  const o = new Date(String(e[n]));
1160
- if (isNaN(o.getTime()))
1161
- return !1;
1159
+ if (isNaN(o.getTime())) return !1;
1162
1160
  const s = t.value ?? null, l = t.start ? new Date(t.start) : null, a = t.end ? new Date(t.end) : null;
1163
1161
  switch (t.operator ?? "between") {
1164
1162
  case "between":
@@ -1192,7 +1190,7 @@ const Xn = bn, Qn = xn, Yn = gn, Gn = (e, n, t) => {
1192
1190
  return !0;
1193
1191
  }
1194
1192
  };
1195
- function Ce(e, n) {
1193
+ function we(e, n) {
1196
1194
  const t = {
1197
1195
  operator: n?.operator,
1198
1196
  value: n?.value ?? null
@@ -1221,7 +1219,7 @@ function Ce(e, n) {
1221
1219
  throw new Error(`Unsupported filter type: ${e}`);
1222
1220
  }
1223
1221
  }
1224
- function ht(e) {
1222
+ function Gn(e) {
1225
1223
  switch (e.type) {
1226
1224
  case "text":
1227
1225
  return e.operator ? ["empty", "notEmpty"].includes(e.operator || "") ? !0 : !!e.value?.trim() : !1;
@@ -1260,7 +1258,7 @@ const Jn = _({
1260
1258
  }
1261
1259
  });
1262
1260
  function _n(e, n, t, o, s, l) {
1263
- return y(), k("div", Ae({ class: e.flexClasses }, e.attrs), [
1261
+ return y(), x("div", Ae({ class: e.flexClasses }, e.attrs), [
1264
1262
  j(e.$slots, "default")
1265
1263
  ], 16);
1266
1264
  }
@@ -1286,15 +1284,15 @@ const ye = /* @__PURE__ */ ae(Jn, [["render", _n]]), eo = { class: "vs-multisele
1286
1284
  },
1287
1285
  emits: ["update:modelValue"],
1288
1286
  setup(e, { emit: n }) {
1289
- const t = e, o = n, s = I(""), l = I([...t.modelValue ?? []]), a = F(() => {
1287
+ const t = e, o = n, s = q(""), l = q([...t.modelValue ?? []]), a = F(() => {
1290
1288
  const f = new Set(t.columnData.filter(Boolean));
1291
1289
  return Array.from(f);
1292
1290
  }), r = F(() => {
1293
1291
  const f = s.value.toLowerCase();
1294
- return a.value.filter((d) => d.toString().toLowerCase().includes(f));
1295
- }), i = F(() => l.value.length), c = F(() => a.value.length - l.value.length), u = (f) => {
1296
- const d = l.value.indexOf(f);
1297
- d > -1 ? l.value.splice(d, 1) : l.value.push(f), o("update:modelValue", [...l.value]);
1292
+ return a.value.filter((h) => h.toString().toLowerCase().includes(f));
1293
+ }), i = F(() => l.value.length), u = F(() => a.value.length - l.value.length), d = (f) => {
1294
+ const h = l.value.indexOf(f);
1295
+ h > -1 ? l.value.splice(h, 1) : l.value.push(f), o("update:modelValue", [...l.value]);
1298
1296
  }, v = () => {
1299
1297
  l.value = [...a.value], o("update:modelValue", [...l.value]);
1300
1298
  }, m = () => {
@@ -1305,20 +1303,20 @@ const ye = /* @__PURE__ */ ae(Jn, [["render", _n]]), eo = { class: "vs-multisele
1305
1303
  (f) => {
1306
1304
  l.value = [...f || []];
1307
1305
  }
1308
- ), (f, d) => (y(), k("div", eo, [
1309
- w("div", to, [
1310
- w("button", {
1306
+ ), (f, h) => (y(), x("div", eo, [
1307
+ b("div", to, [
1308
+ b("button", {
1311
1309
  onClick: pe(v, ["stop"])
1312
- }, "Select All (" + H(c.value) + ")", 1),
1313
- w("button", {
1310
+ }, "Select All (" + B(u.value) + ")", 1),
1311
+ b("button", {
1314
1312
  onClick: pe(m, ["stop"])
1315
- }, "Deselect All (" + H(i.value) + ")", 1)
1313
+ }, "Deselect All (" + B(i.value) + ")", 1)
1316
1314
  ]),
1317
1315
  ne(ye, { direction: "row" }, {
1318
1316
  default: X(() => [
1319
- te(w("input", {
1317
+ te(b("input", {
1320
1318
  type: "text",
1321
- "onUpdate:modelValue": d[0] || (d[0] = (h) => s.value = h),
1319
+ "onUpdate:modelValue": h[0] || (h[0] = (c) => s.value = c),
1322
1320
  placeholder: "Search...",
1323
1321
  class: "vs-multiselect-search vs-w-full"
1324
1322
  }, null, 512), [
@@ -1327,49 +1325,48 @@ const ye = /* @__PURE__ */ ae(Jn, [["render", _n]]), eo = { class: "vs-multisele
1327
1325
  ]),
1328
1326
  _: 1
1329
1327
  }),
1330
- e.isLoading ? (y(), k("div", no, "Loading options...")) : (y(), k("ul", oo, [
1331
- (y(!0), k(z, null, Q(r.value, (h) => (y(), k("li", {
1332
- key: h,
1333
- onClick: pe((g) => u(h), ["stop"]),
1334
- class: G({ selected: l.value.includes(h) })
1328
+ e.isLoading ? (y(), x("div", no, "Loading options...")) : (y(), x("ul", oo, [
1329
+ (y(!0), x(z, null, Q(r.value, (c) => (y(), x("li", {
1330
+ key: c,
1331
+ onClick: pe((g) => d(c), ["stop"]),
1332
+ class: G({ selected: l.value.includes(c) })
1335
1333
  }, [
1336
- w("span", lo, H(h), 1),
1337
- l.value.includes(h) ? (y(), k("svg", ao, [...d[1] || (d[1] = [
1338
- w("path", {
1334
+ b("span", lo, B(c), 1),
1335
+ l.value.includes(c) ? (y(), x("svg", ao, [...h[1] || (h[1] = [
1336
+ b("path", {
1339
1337
  "stroke-linecap": "round",
1340
1338
  "stroke-linejoin": "round",
1341
1339
  "stroke-width": "2",
1342
1340
  d: "M5 13l4 4L19 7"
1343
1341
  }, null, -1)
1344
- ])])) : P("", !0)
1342
+ ])])) : D("", !0)
1345
1343
  ], 10, so))), 128))
1346
1344
  ]))
1347
1345
  ]));
1348
1346
  }
1349
- }), Pe = /* @__PURE__ */ new Map();
1347
+ }), De = /* @__PURE__ */ new Map();
1350
1348
  function io(e) {
1351
- const n = I(e.columnData || []), t = I(!1), o = () => t.value = !0, s = () => t.value = !1;
1349
+ const n = q(e.columnData || []), t = q(!1), o = () => t.value = !0, s = () => t.value = !1;
1352
1350
  async function l(r = !1) {
1353
- if (!e.asyncOptions)
1354
- return;
1351
+ if (!e.asyncOptions) return;
1355
1352
  const i = e.cacheKey ?? "default";
1356
- if (!r && Pe.has(i)) {
1357
- n.value = Pe.get(i);
1353
+ if (!r && De.has(i)) {
1354
+ n.value = De.get(i);
1358
1355
  return;
1359
1356
  }
1360
1357
  try {
1361
1358
  o();
1362
- const c = await e.asyncOptions(), u = Array.isArray(c) ? c : [];
1363
- n.value = u, Pe.set(i, u);
1364
- } catch (c) {
1365
- console.error("Failed to load async filter options:", c);
1359
+ const u = await e.asyncOptions(), d = Array.isArray(u) ? u : [];
1360
+ n.value = d, De.set(i, d);
1361
+ } catch (u) {
1362
+ console.error("Failed to load async filter options:", u);
1366
1363
  } finally {
1367
1364
  s();
1368
1365
  }
1369
1366
  }
1370
1367
  function a() {
1371
1368
  const r = e.cacheKey ?? "default";
1372
- Pe.delete(r);
1369
+ De.delete(r);
1373
1370
  }
1374
1371
  return {
1375
1372
  columnOrAsyncOptions: n,
@@ -1438,8 +1435,8 @@ const co = {
1438
1435
  "date-range": ["between", "equals", "notEqual", "before", "after", "empty", "notEmpty"],
1439
1436
  custom: []
1440
1437
  };
1441
- function i(b) {
1442
- switch (b) {
1438
+ function i(k) {
1439
+ switch (k) {
1443
1440
  case "notEqual":
1444
1441
  return "Not Equal";
1445
1442
  case "greaterThan":
@@ -1457,176 +1454,178 @@ const co = {
1457
1454
  case "notEmpty":
1458
1455
  return "Not Empty";
1459
1456
  default:
1460
- return b.charAt(0).toUpperCase() + b.slice(1);
1457
+ return k.charAt(0).toUpperCase() + k.slice(1);
1461
1458
  }
1462
1459
  }
1463
- 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);
1460
+ const u = F(() => t.type === "custom" ? [] : t.operators?.length ? t.operators : r[t.type]), d = q(null), v = q(null), m = q(), f = q(!1);
1464
1461
  Y(
1465
1462
  () => t.visible,
1466
- async (b) => {
1467
- f.value = !!b, f.value ? (await oe(), E(), t.asyncOptions && a()) : V();
1463
+ async (k) => {
1464
+ f.value = !!k, f.value ? (await oe(), V(), t.asyncOptions && a()) : T();
1468
1465
  },
1469
1466
  { immediate: !0 }
1470
1467
  );
1471
- const d = I(Ce(t.type, t.modelValue));
1468
+ const h = F(
1469
+ () => Gn(t.modelValue ?? we(t.type))
1470
+ ), c = q(we(t.type, t.modelValue));
1472
1471
  Y(
1473
1472
  () => t.modelValue,
1474
- (b) => {
1475
- d.value = Ce(t.type, b);
1473
+ (k) => {
1474
+ c.value = we(t.type, k);
1476
1475
  },
1477
1476
  { immediate: !0 }
1478
1477
  );
1479
- function h() {
1480
- o("open");
1481
- }
1482
1478
  function g() {
1483
- o("update:modelValue", { ...d.value }), o("apply", { ...d.value });
1479
+ o("open");
1484
1480
  }
1485
1481
  function C() {
1486
- d.value = Ce(t.type), o("update:modelValue", { ...d.value }), o("clear"), S();
1482
+ o("update:modelValue", { ...c.value }), o("apply", { ...c.value });
1487
1483
  }
1488
- function S() {
1489
- o("close");
1484
+ function R() {
1485
+ c.value = we(t.type), o("update:modelValue", { ...c.value }), o("clear"), E();
1490
1486
  }
1491
1487
  function E() {
1492
- !u.value || !v.value || (m.value = Zn(u.value, v.value, () => {
1493
- Gn(u.value, v.value, {
1488
+ o("close");
1489
+ }
1490
+ function V() {
1491
+ !d.value || !v.value || (m.value = Un(d.value, v.value, () => {
1492
+ Yn(d.value, v.value, {
1494
1493
  placement: "bottom-start",
1495
- middleware: [Xn(6), Yn(), Qn({ padding: 8 })]
1496
- }).then(({ x: b, y: p }) => {
1494
+ middleware: [Zn(6), Qn(), Xn({ padding: 8 })]
1495
+ }).then(({ x: k, y: w }) => {
1497
1496
  Object.assign(v.value.style, {
1498
- left: `${b}px`,
1499
- top: `${p}px`,
1497
+ left: `${k}px`,
1498
+ top: `${w}px`,
1500
1499
  position: "absolute",
1501
1500
  zIndex: 2e3
1502
1501
  });
1503
1502
  });
1504
1503
  }));
1505
1504
  }
1506
- function V() {
1505
+ function T() {
1507
1506
  m.value?.(), m.value = void 0;
1508
1507
  }
1509
- function L(b) {
1510
- const p = b.target;
1511
- f.value && u.value && v.value && !u.value.contains(p) && !v.value.contains(p) && S();
1508
+ function W(k) {
1509
+ const w = k.target;
1510
+ f.value && d.value && v.value && !d.value.contains(w) && !v.value.contains(w) && E();
1512
1511
  }
1513
- function M(b) {
1514
- b.key === "Escape" && f.value && S();
1512
+ function S(k) {
1513
+ k.key === "Escape" && f.value && E();
1515
1514
  }
1516
1515
  return Re(() => {
1517
- document.addEventListener("click", L), document.addEventListener("keydown", M);
1518
- }), pt(() => {
1519
- document.removeEventListener("click", L), document.removeEventListener("keydown", M), V();
1520
- }), (b, p) => (y(), k(z, null, [
1521
- w("span", {
1516
+ document.addEventListener("click", W), document.addEventListener("keydown", S);
1517
+ }), mt(() => {
1518
+ document.removeEventListener("click", W), document.removeEventListener("keydown", S), T();
1519
+ }), (k, w) => (y(), x(z, null, [
1520
+ b("span", {
1522
1521
  ref_key: "referenceRef",
1523
- ref: u,
1522
+ ref: d,
1524
1523
  class: G(["vs-column-filter", {
1525
- "is-active": $(ht)(d.value),
1526
- "in-active": !$(ht)(d.value)
1524
+ "is-active": h.value,
1525
+ "in-active": !h.value
1527
1526
  }]),
1528
- onClick: pe(h, ["stop"])
1529
- }, [...p[13] || (p[13] = [
1530
- w("svg", {
1527
+ onClick: pe(g, ["stop"])
1528
+ }, [...w[13] || (w[13] = [
1529
+ b("svg", {
1531
1530
  xmlns: "http://www.w3.org/2000/svg",
1532
1531
  height: "24px",
1533
1532
  viewBox: "0 -960 960 960",
1534
1533
  width: "24px",
1535
1534
  fill: "currentColor"
1536
1535
  }, [
1537
- w("path", { d: "M400-240v-80h160v80H400ZM240-440v-80h480v80H240ZM120-640v-80h720v80H120Z" })
1536
+ b("path", { d: "M400-240v-80h160v80H400ZM240-440v-80h480v80H240ZM120-640v-80h720v80H120Z" })
1538
1537
  ], -1)
1539
1538
  ])], 2),
1540
1539
  (y(), fe(Dt, { to: "body" }, [
1541
- ne(It, { name: "fade" }, {
1540
+ ne(Pt, { name: "fade" }, {
1542
1541
  default: X(() => [
1543
- f.value ? (y(), k("div", {
1542
+ f.value ? (y(), x("div", {
1544
1543
  key: 0,
1545
1544
  ref_key: "floatingRef",
1546
1545
  ref: v,
1547
1546
  class: "vs-filter-dropdown",
1548
1547
  style: { position: "absolute", "z-index": "1000" },
1549
- onClick: p[12] || (p[12] = pe(() => {
1548
+ onClick: w[12] || (w[12] = pe(() => {
1550
1549
  }, ["stop"]))
1551
1550
  }, [
1552
- d.value.type === "text" ? (y(), k("div", co, [
1553
- c.value.length > 1 ? (y(), k("div", uo, [
1554
- te(w("select", {
1555
- "onUpdate:modelValue": p[0] || (p[0] = (x) => d.value.operator = x),
1551
+ c.value.type === "text" ? (y(), x("div", co, [
1552
+ u.value.length > 1 ? (y(), x("div", uo, [
1553
+ te(b("select", {
1554
+ "onUpdate:modelValue": w[0] || (w[0] = (p) => c.value.operator = p),
1556
1555
  class: "vs-operator-select vs-mx-auto vs-w-full"
1557
1556
  }, [
1558
- (y(!0), k(z, null, Q(c.value, (x) => (y(), k("option", {
1559
- key: x,
1560
- value: x
1561
- }, H(i(x)), 9, fo))), 128))
1557
+ (y(!0), x(z, null, Q(u.value, (p) => (y(), x("option", {
1558
+ key: p,
1559
+ value: p
1560
+ }, B(i(p)), 9, fo))), 128))
1562
1561
  ], 512), [
1563
- [Qe, d.value.operator]
1562
+ [Qe, c.value.operator]
1564
1563
  ])
1565
- ])) : P("", !0),
1564
+ ])) : D("", !0),
1566
1565
  ne(ye, {
1567
1566
  direction: "row",
1568
1567
  class: "mb-6"
1569
1568
  }, {
1570
1569
  default: X(() => [
1571
- te(w("input", {
1570
+ te(b("input", {
1572
1571
  type: "text",
1573
- "onUpdate:modelValue": p[1] || (p[1] = (x) => d.value.value = x),
1572
+ "onUpdate:modelValue": w[1] || (w[1] = (p) => c.value.value = p),
1574
1573
  placeholder: "Search...",
1575
1574
  class: "vs-input vs-mx-auto vs-w-full"
1576
1575
  }, null, 512), [
1577
- [he, d.value.value]
1576
+ [he, c.value.value]
1578
1577
  ])
1579
1578
  ]),
1580
1579
  _: 1
1581
1580
  })
1582
- ])) : d.value.type === "multi-select" ? (y(), k("div", vo, [
1581
+ ])) : c.value.type === "multi-select" ? (y(), x("div", vo, [
1583
1582
  ne(ye, {
1584
1583
  direction: "row",
1585
1584
  class: "mb-6 vs-align-center vs-justify-end"
1586
1585
  }, {
1587
1586
  default: X(() => [
1588
- e.asyncOptions ? (y(), k("span", {
1587
+ e.asyncOptions ? (y(), x("span", {
1589
1588
  key: 0,
1590
- onClick: p[2] || (p[2] = (x) => $(a)(!0)),
1589
+ onClick: w[2] || (w[2] = (p) => $(a)(!0)),
1591
1590
  class: "vs-cursor-pointer"
1592
- }, [...p[14] || (p[14] = [
1593
- w("svg", {
1591
+ }, [...w[14] || (w[14] = [
1592
+ b("svg", {
1594
1593
  xmlns: "http://www.w3.org/2000/svg",
1595
1594
  height: "24px",
1596
1595
  viewBox: "0 -960 960 960",
1597
1596
  width: "24px",
1598
1597
  fill: "var(--vs-inactive)"
1599
1598
  }, [
1600
- 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" })
1599
+ b("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" })
1601
1600
  ], -1)
1602
- ])])) : P("", !0)
1601
+ ])])) : D("", !0)
1603
1602
  ]),
1604
1603
  _: 1
1605
1604
  }),
1606
1605
  ne(ro, {
1607
1606
  isLoading: $(l),
1608
1607
  columnData: $(s),
1609
- modelValue: d.value.value,
1610
- "onUpdate:modelValue": p[3] || (p[3] = (x) => d.value.value = x),
1608
+ modelValue: c.value.value,
1609
+ "onUpdate:modelValue": w[3] || (w[3] = (p) => c.value.value = p),
1611
1610
  placeholder: "Select values..."
1612
1611
  }, null, 8, ["isLoading", "columnData", "modelValue"])
1613
- ])) : d.value.type === "number-range" ? (y(), k("div", ho, [
1614
- c.value.length > 1 ? (y(), k("div", mo, [
1615
- te(w("select", {
1616
- "onUpdate:modelValue": p[4] || (p[4] = (x) => d.value.operator = x),
1612
+ ])) : c.value.type === "number-range" ? (y(), x("div", ho, [
1613
+ u.value.length > 1 ? (y(), x("div", mo, [
1614
+ te(b("select", {
1615
+ "onUpdate:modelValue": w[4] || (w[4] = (p) => c.value.operator = p),
1617
1616
  class: "vs-operator-select vs-w-full"
1618
1617
  }, [
1619
- (y(!0), k(z, null, Q(c.value, (x) => (y(), k("option", {
1620
- key: x,
1621
- value: x
1622
- }, H(i(x)), 9, po))), 128))
1618
+ (y(!0), x(z, null, Q(u.value, (p) => (y(), x("option", {
1619
+ key: p,
1620
+ value: p
1621
+ }, B(i(p)), 9, po))), 128))
1623
1622
  ], 512), [
1624
- [Qe, d.value.operator]
1623
+ [Qe, c.value.operator]
1625
1624
  ])
1626
- ])) : (y(), k("div", go, [
1627
- w("span", yo, H(d.value.operator), 1)
1625
+ ])) : (y(), x("div", go, [
1626
+ b("span", yo, B(c.value.operator), 1)
1628
1627
  ])),
1629
- d.value.operator === "between" ? (y(), fe(ye, {
1628
+ c.value.operator === "between" ? (y(), fe(ye, {
1630
1629
  key: 2,
1631
1630
  justify: "between",
1632
1631
  align: "center",
@@ -1634,75 +1633,75 @@ const co = {
1634
1633
  class: "mb-6"
1635
1634
  }, {
1636
1635
  default: X(() => [
1637
- te(w("input", {
1636
+ te(b("input", {
1638
1637
  type: "number",
1639
- "onUpdate:modelValue": p[5] || (p[5] = (x) => d.value.min = x),
1638
+ "onUpdate:modelValue": w[5] || (w[5] = (p) => c.value.min = p),
1640
1639
  placeholder: "Min",
1641
1640
  class: "vs-input vs-w-full"
1642
1641
  }, null, 512), [
1643
1642
  [
1644
1643
  he,
1645
- d.value.min,
1644
+ c.value.min,
1646
1645
  void 0,
1647
1646
  { number: !0 }
1648
1647
  ]
1649
1648
  ]),
1650
- p[15] || (p[15] = w("span", null, "-", -1)),
1651
- te(w("input", {
1649
+ w[15] || (w[15] = b("span", null, "-", -1)),
1650
+ te(b("input", {
1652
1651
  type: "number",
1653
- "onUpdate:modelValue": p[6] || (p[6] = (x) => d.value.max = x),
1652
+ "onUpdate:modelValue": w[6] || (w[6] = (p) => c.value.max = p),
1654
1653
  placeholder: "Max",
1655
1654
  class: "vs-input vs-w-full"
1656
1655
  }, null, 512), [
1657
1656
  [
1658
1657
  he,
1659
- d.value.max,
1658
+ c.value.max,
1660
1659
  void 0,
1661
1660
  { number: !0 }
1662
1661
  ]
1663
1662
  ])
1664
1663
  ]),
1665
1664
  _: 1
1666
- })) : ["equals", "notEqual", "greaterThan", "lessThan"].includes(d.value.operator || "") ? (y(), fe(ye, {
1665
+ })) : ["equals", "notEqual", "greaterThan", "lessThan"].includes(c.value.operator || "") ? (y(), fe(ye, {
1667
1666
  key: 3,
1668
1667
  direction: "row"
1669
1668
  }, {
1670
1669
  default: X(() => [
1671
- te(w("input", {
1670
+ te(b("input", {
1672
1671
  type: "number",
1673
- "onUpdate:modelValue": p[7] || (p[7] = (x) => d.value.value = x),
1672
+ "onUpdate:modelValue": w[7] || (w[7] = (p) => c.value.value = p),
1674
1673
  placeholder: "Enter number",
1675
1674
  class: "vs-input vs-w-full"
1676
1675
  }, null, 512), [
1677
1676
  [
1678
1677
  he,
1679
- d.value.value,
1678
+ c.value.value,
1680
1679
  void 0,
1681
1680
  { number: !0 }
1682
1681
  ]
1683
1682
  ])
1684
1683
  ]),
1685
1684
  _: 1
1686
- })) : ["empty", "notEmpty"].includes(d.value.operator || "") ? (y(), k("div", wo, [...p[16] || (p[16] = [
1687
- w("div", { class: "vs-muted vs-text-center vs-pt-sm" }, "No input required", -1)
1688
- ])])) : P("", !0)
1689
- ])) : d.value.type === "date-range" ? (y(), k("div", bo, [
1690
- c.value.length > 1 ? (y(), k("div", xo, [
1691
- te(w("select", {
1692
- "onUpdate:modelValue": p[8] || (p[8] = (x) => d.value.operator = x),
1685
+ })) : ["empty", "notEmpty"].includes(c.value.operator || "") ? (y(), x("div", wo, [...w[16] || (w[16] = [
1686
+ b("div", { class: "vs-muted vs-text-center vs-pt-sm" }, "No input required", -1)
1687
+ ])])) : D("", !0)
1688
+ ])) : c.value.type === "date-range" ? (y(), x("div", bo, [
1689
+ u.value.length > 1 ? (y(), x("div", xo, [
1690
+ te(b("select", {
1691
+ "onUpdate:modelValue": w[8] || (w[8] = (p) => c.value.operator = p),
1693
1692
  class: "vs-operator-select vs-w-full"
1694
1693
  }, [
1695
- (y(!0), k(z, null, Q(c.value, (x) => (y(), k("option", {
1696
- key: x,
1697
- value: x
1698
- }, H(i(x)), 9, ko))), 128))
1694
+ (y(!0), x(z, null, Q(u.value, (p) => (y(), x("option", {
1695
+ key: p,
1696
+ value: p
1697
+ }, B(i(p)), 9, ko))), 128))
1699
1698
  ], 512), [
1700
- [Qe, d.value.operator]
1699
+ [Qe, c.value.operator]
1701
1700
  ])
1702
- ])) : (y(), k("div", Co, [
1703
- w("span", So, H(d.value.operator), 1)
1701
+ ])) : (y(), x("div", Co, [
1702
+ b("span", So, B(c.value.operator), 1)
1704
1703
  ])),
1705
- d.value.operator === "between" ? (y(), fe(ye, {
1704
+ c.value.operator === "between" ? (y(), fe(ye, {
1706
1705
  key: 2,
1707
1706
  justify: "between",
1708
1707
  align: "center",
@@ -1710,69 +1709,69 @@ const co = {
1710
1709
  class: "mb-6"
1711
1710
  }, {
1712
1711
  default: X(() => [
1713
- te(w("input", {
1712
+ te(b("input", {
1714
1713
  type: "date",
1715
- "onUpdate:modelValue": p[9] || (p[9] = (x) => d.value.start = x),
1714
+ "onUpdate:modelValue": w[9] || (w[9] = (p) => c.value.start = p),
1716
1715
  class: "vs-input vs-w-full"
1717
1716
  }, null, 512), [
1718
- [he, d.value.start]
1717
+ [he, c.value.start]
1719
1718
  ]),
1720
- p[17] || (p[17] = w("span", null, "-", -1)),
1721
- te(w("input", {
1719
+ w[17] || (w[17] = b("span", null, "-", -1)),
1720
+ te(b("input", {
1722
1721
  type: "date",
1723
- "onUpdate:modelValue": p[10] || (p[10] = (x) => d.value.end = x),
1722
+ "onUpdate:modelValue": w[10] || (w[10] = (p) => c.value.end = p),
1724
1723
  class: "vs-input vs-w-full"
1725
1724
  }, null, 512), [
1726
- [he, d.value.end]
1725
+ [he, c.value.end]
1727
1726
  ])
1728
1727
  ]),
1729
1728
  _: 1
1730
- })) : ["equals", "notEqual", "before", "after"].includes(d.value.operator || "") ? (y(), fe(ye, {
1729
+ })) : ["equals", "notEqual", "before", "after"].includes(c.value.operator || "") ? (y(), fe(ye, {
1731
1730
  key: 3,
1732
1731
  direction: "row",
1733
1732
  class: "vs-filter-single-date"
1734
1733
  }, {
1735
1734
  default: X(() => [
1736
- te(w("input", {
1735
+ te(b("input", {
1737
1736
  type: "date",
1738
- "onUpdate:modelValue": p[11] || (p[11] = (x) => d.value.value = x),
1737
+ "onUpdate:modelValue": w[11] || (w[11] = (p) => c.value.value = p),
1739
1738
  class: "vs-input vs-w-full"
1740
1739
  }, null, 512), [
1741
- [he, d.value.value]
1740
+ [he, c.value.value]
1742
1741
  ])
1743
1742
  ]),
1744
1743
  _: 1
1745
- })) : ["empty", "notEmpty"].includes(d.value.operator || "") ? (y(), k("div", Ro, " No date input required ")) : P("", !0)
1746
- ])) : P("", !0),
1747
- d.value.type !== "custom" ? (y(), k("div", Eo, [
1748
- w("button", {
1744
+ })) : ["empty", "notEmpty"].includes(c.value.operator || "") ? (y(), x("div", Ro, " No date input required ")) : D("", !0)
1745
+ ])) : D("", !0),
1746
+ c.value.type !== "custom" ? (y(), x("div", Eo, [
1747
+ b("button", {
1749
1748
  class: "vs-btn vs-btn-primary",
1750
- onClick: g
1749
+ onClick: C
1751
1750
  }, "Apply"),
1752
- w("button", {
1751
+ b("button", {
1753
1752
  class: "vs-btn vs-btn-secondary",
1754
- onClick: C
1753
+ onClick: R
1755
1754
  }, "Clear")
1756
- ])) : P("", !0),
1757
- j(b.$slots, "custom", {
1758
- filter: d.value,
1759
- apply: g,
1760
- clear: C
1755
+ ])) : D("", !0),
1756
+ j(k.$slots, "custom", {
1757
+ filter: c.value,
1758
+ apply: C,
1759
+ clear: R
1761
1760
  }, void 0, !0)
1762
- ], 512)) : P("", !0)
1761
+ ], 512)) : D("", !0)
1763
1762
  ]),
1764
1763
  _: 3
1765
1764
  })
1766
1765
  ]))
1767
1766
  ], 64));
1768
1767
  }
1769
- }), Ao = /* @__PURE__ */ ae($o, [["__scopeId", "data-v-f4972f8b"]]), Fo = ["data-field", "rowspan"], To = { class: "vs-header-content" }, Oo = { class: "vs-header-label" }, Vo = {
1768
+ }), Ao = /* @__PURE__ */ ae($o, [["__scopeId", "data-v-a4176350"]]), Fo = ["data-field", "rowspan"], To = { class: "vs-header-content" }, Oo = { class: "vs-header-label" }, Vo = {
1770
1769
  key: 0,
1771
1770
  class: "vs-sort-icons"
1772
1771
  }, Lo = {
1773
1772
  key: 1,
1774
1773
  class: "vs-sort-priority"
1775
- }, Po = /* @__PURE__ */ _({
1774
+ }, Do = /* @__PURE__ */ _({
1776
1775
  __name: "HeaderCell",
1777
1776
  props: {
1778
1777
  column: {},
@@ -1802,16 +1801,16 @@ const co = {
1802
1801
  function i() {
1803
1802
  t.column.field && o("clearFilter", t.column.field);
1804
1803
  }
1805
- function c() {
1804
+ function u() {
1806
1805
  t.column.field && o("closeFilter", t.column.field);
1807
1806
  }
1808
- function u() {
1807
+ function d() {
1809
1808
  t.column.field && o("openFilter", t.column.field);
1810
1809
  }
1811
- return (v, m) => e.column && e.column.field ? (y(), k("th", {
1810
+ return (v, m) => e.column && e.column.field ? (y(), x("th", {
1812
1811
  key: 0,
1813
1812
  onClick: l,
1814
- style: gt([
1813
+ style: pt([
1815
1814
  {
1816
1815
  width: e.column.width + "%",
1817
1816
  textAlign: "center"
@@ -1826,40 +1825,40 @@ const co = {
1826
1825
  ]])
1827
1826
  }, [
1828
1827
  j(v.$slots, `header-${e.column.field}`, { column: e.column }, () => [
1829
- w("div", To, [
1830
- w("span", Oo, H(e.column.label), 1),
1831
- e.column.sortable ? (y(), k("div", Vo, [
1832
- w("span", {
1828
+ b("div", To, [
1829
+ b("span", Oo, B(e.column.label), 1),
1830
+ e.column.sortable ? (y(), x("div", Vo, [
1831
+ b("span", {
1833
1832
  class: G(["vs-sort-icon vs-sort-asc", {
1834
1833
  "vs-active": e.sortHelpers.isColumnSorted(e.column.field) && e.sortHelpers.getSortOrder(e.column.field) === "asc"
1835
1834
  }])
1836
1835
  }, [...m[2] || (m[2] = [
1837
- w("svg", {
1836
+ b("svg", {
1838
1837
  xmlns: "http://www.w3.org/2000/svg",
1839
1838
  height: "24px",
1840
1839
  viewBox: "0 -960 960 960",
1841
1840
  width: "24px",
1842
1841
  fill: "var(--vs-gray-800)"
1843
1842
  }, [
1844
- w("path", { d: "m280-400 200-200 200 200H280Z" })
1843
+ b("path", { d: "m280-400 200-200 200 200H280Z" })
1845
1844
  ], -1)
1846
1845
  ])], 2),
1847
- w("span", {
1846
+ b("span", {
1848
1847
  class: G(["vs-sort-icon vs-sort-desc", {
1849
1848
  "vs-active": e.sortHelpers.isColumnSorted(e.column.field) && e.sortHelpers.getSortOrder(e.column.field) === "desc"
1850
1849
  }])
1851
1850
  }, [...m[3] || (m[3] = [
1852
- w("svg", {
1851
+ b("svg", {
1853
1852
  xmlns: "http://www.w3.org/2000/svg",
1854
1853
  height: "24px",
1855
1854
  viewBox: "0 -960 960 960",
1856
1855
  width: "24px"
1857
1856
  }, [
1858
- w("path", { d: "M480-360 280-560h400L480-360Z" })
1857
+ b("path", { d: "M480-360 280-560h400L480-360Z" })
1859
1858
  ], -1)
1860
1859
  ])], 2)
1861
- ])) : P("", !0),
1862
- e.sortHelpers.getSortPriority(e.column.field) !== null ? (y(), k("span", Lo, H(e.sortHelpers.getSortPriority(e.column.field)), 1)) : P("", !0),
1860
+ ])) : D("", !0),
1861
+ e.sortHelpers.getSortPriority(e.column.field) !== null ? (y(), x("span", Lo, B(e.sortHelpers.getSortPriority(e.column.field)), 1)) : D("", !0),
1863
1862
  e.column.filter ? (y(), fe(Ao, {
1864
1863
  key: 2,
1865
1864
  type: e.column.filter.type,
@@ -1872,26 +1871,26 @@ const co = {
1872
1871
  "column-data": a(),
1873
1872
  onApply: m[1] || (m[1] = (f) => r(f)),
1874
1873
  onClear: i,
1875
- onClose: c,
1876
- onOpen: u
1874
+ onClose: u,
1875
+ onOpen: d
1877
1876
  }, Te({ _: 2 }, [
1878
1877
  e.column.filter.custom ? {
1879
1878
  name: "custom",
1880
- fn: X(({ filter: f, apply: d, clear: h }) => [
1879
+ fn: X(({ filter: f, apply: h, clear: c }) => [
1881
1880
  j(v.$slots, e.column.filter.custom, {
1882
1881
  filter: f,
1883
- apply: d,
1884
- clear: h
1882
+ apply: h,
1883
+ clear: c
1885
1884
  }, void 0, !0)
1886
1885
  ]),
1887
1886
  key: "0"
1888
1887
  } : void 0
1889
- ]), 1032, ["type", "async-options", "field", "operators", "modelValue", "visible", "column-data"])) : P("", !0)
1888
+ ]), 1032, ["type", "async-options", "field", "operators", "modelValue", "visible", "column-data"])) : D("", !0)
1890
1889
  ])
1891
1890
  ], !0)
1892
- ], 14, Fo)) : P("", !0);
1891
+ ], 14, Fo)) : D("", !0);
1893
1892
  }
1894
- }), mt = /* @__PURE__ */ ae(Po, [["__scopeId", "data-v-69e5e343"]]), Do = { key: 0 }, Io = {
1893
+ }), ht = /* @__PURE__ */ ae(Do, [["__scopeId", "data-v-69e5e343"]]), Po = { key: 0 }, Io = {
1895
1894
  key: 0,
1896
1895
  class: "vs-expand-column",
1897
1896
  rowspan: "2",
@@ -1903,7 +1902,7 @@ const co = {
1903
1902
  rowspan: "2",
1904
1903
  style: { width: "5%" },
1905
1904
  "data-field": "_checkbox"
1906
- }, Mo = { class: "vs-checkbox" }, Bo = ["id", "checked", "indeterminate"], Ho = ["for"], Wo = ["colspan", "data-field"], No = {
1905
+ }, Mo = { class: "vs-checkbox" }, Bo = ["id", "checked", "indeterminate"], Ho = ["for"], No = ["colspan", "data-field"], Wo = {
1907
1906
  key: 0,
1908
1907
  class: "vs-expand-column",
1909
1908
  style: { width: "5%" },
@@ -1937,50 +1936,50 @@ const co = {
1937
1936
  const l = F({
1938
1937
  get: () => t.filters,
1939
1938
  set: (f) => o("update:filters", f)
1940
- }), a = I(null);
1939
+ }), a = q(null);
1941
1940
  function r(f) {
1942
1941
  a.value = f;
1943
1942
  }
1944
1943
  function i(f) {
1945
1944
  a.value === f && (a.value = null);
1946
1945
  }
1947
- const c = I(null), u = F(() => t.columns.some((f) => f.children && f.children.length)), v = F(() => {
1946
+ const u = q(null), d = F(() => t.columns.some((f) => f.children && f.children.length)), v = F(() => {
1948
1947
  const f = [];
1949
- return t.columns.forEach((d) => {
1950
- d.children && d.children.length ? f.push(...d.children) : f.push(d);
1948
+ return t.columns.forEach((h) => {
1949
+ h.children && h.children.length ? f.push(...h.children) : f.push(h);
1951
1950
  }), f;
1952
1951
  });
1953
1952
  function m(f) {
1954
- return u.value ? t.columns.some(
1955
- (d) => d.children && d.children.some((h) => h.field === f.field)
1953
+ return d.value ? t.columns.some(
1954
+ (h) => h.children && h.children.some((c) => c.field === f.field)
1956
1955
  ) : !0;
1957
1956
  }
1958
- return (f, d) => (y(), k("thead", {
1957
+ return (f, h) => (y(), x("thead", {
1959
1958
  ref_key: "headerRef",
1960
- ref: c
1959
+ ref: u
1961
1960
  }, [
1962
- u.value ? (y(), k("tr", Do, [
1963
- e.expandable ? (y(), k("th", Io)) : P("", !0),
1964
- e.isItemSelectedControlled ? (y(), k("th", qo, [
1965
- w("div", Mo, [
1966
- w("input", {
1961
+ d.value ? (y(), x("tr", Po, [
1962
+ e.expandable ? (y(), x("th", Io)) : D("", !0),
1963
+ e.isItemSelectedControlled ? (y(), x("th", qo, [
1964
+ b("div", Mo, [
1965
+ b("input", {
1967
1966
  type: "checkbox",
1968
1967
  id: e.tablename + "-main-checkbox",
1969
1968
  checked: e.isAllChecked,
1970
1969
  indeterminate: e.isSomeChecked,
1971
1970
  onChange: s
1972
1971
  }, null, 40, Bo),
1973
- w("label", {
1972
+ b("label", {
1974
1973
  for: e.tablename + "-main-checkbox"
1975
1974
  }, null, 8, Ho)
1976
1975
  ])
1977
- ])) : P("", !0),
1978
- (y(!0), k(z, null, Q(t.columns, (h) => (y(), k(z, {
1979
- key: h.field || h.label
1976
+ ])) : D("", !0),
1977
+ (y(!0), x(z, null, Q(t.columns, (c) => (y(), x(z, {
1978
+ key: c.field || c.label
1980
1979
  }, [
1981
- !h.children || !h.children.length ? (y(), fe(mt, Ae({
1980
+ !c.children || !c.children.length ? (y(), fe(ht, Ae({
1982
1981
  key: 0,
1983
- column: h,
1982
+ column: c,
1984
1983
  rows: e.rows,
1985
1984
  rowspan: 2,
1986
1985
  "sort-helpers": e.sortHelpers,
@@ -1989,49 +1988,49 @@ const co = {
1989
1988
  "header-class": e.headerClass,
1990
1989
  tablename: e.tablename
1991
1990
  }, { ref_for: !0 }, f.$attrs, {
1992
- onApplyFilter: d[0] || (d[0] = (g, C) => o("applyFilter", g, C)),
1993
- onClearFilter: d[1] || (d[1] = (g) => o("clearFilter", g)),
1991
+ onApplyFilter: h[0] || (h[0] = (g, C) => o("applyFilter", g, C)),
1992
+ onClearFilter: h[1] || (h[1] = (g) => o("clearFilter", g)),
1994
1993
  onOpenFilter: r,
1995
1994
  onCloseFilter: i,
1996
- "onUpdate:filters": d[2] || (d[2] = (g) => o("update:filters", g))
1995
+ "onUpdate:filters": h[2] || (h[2] = (g) => o("update:filters", g))
1997
1996
  }), Te({ _: 2 }, [
1998
1997
  Q(f.$slots, (g, C) => ({
1999
1998
  name: C,
2000
- fn: X((S) => [
2001
- j(f.$slots, C, Ae({ ref_for: !0 }, S), void 0, !0)
1999
+ fn: X((R) => [
2000
+ j(f.$slots, C, Ae({ ref_for: !0 }, R), void 0, !0)
2002
2001
  ])
2003
2002
  }))
2004
- ]), 1040, ["column", "rows", "sort-helpers", "filters", "open-filter", "header-class", "tablename"])) : (y(), k("th", {
2003
+ ]), 1040, ["column", "rows", "sort-helpers", "filters", "open-filter", "header-class", "tablename"])) : (y(), x("th", {
2005
2004
  key: 1,
2006
- colspan: h.children.length,
2007
- "data-field": `group-${h.label}`,
2005
+ colspan: c.children.length,
2006
+ "data-field": `group-${c.label}`,
2008
2007
  class: "vs-group-header",
2009
2008
  style: { textAlign: "center" }
2010
- }, H(h.label), 9, Wo))
2009
+ }, B(c.label), 9, No))
2011
2010
  ], 64))), 128))
2012
- ])) : P("", !0),
2013
- w("tr", null, [
2014
- e.expandable && !u.value ? (y(), k("th", No)) : P("", !0),
2015
- e.isItemSelectedControlled && !u.value ? (y(), k("th", Ko, [
2016
- w("div", zo, [
2017
- w("input", {
2011
+ ])) : D("", !0),
2012
+ b("tr", null, [
2013
+ e.expandable && !d.value ? (y(), x("th", Wo)) : D("", !0),
2014
+ e.isItemSelectedControlled && !d.value ? (y(), x("th", Ko, [
2015
+ b("div", zo, [
2016
+ b("input", {
2018
2017
  type: "checkbox",
2019
2018
  id: e.tablename + "-main-checkbox",
2020
2019
  checked: e.isAllChecked,
2021
2020
  indeterminate: e.isSomeChecked,
2022
2021
  onChange: s
2023
2022
  }, null, 40, jo),
2024
- w("label", {
2023
+ b("label", {
2025
2024
  for: e.tablename + "-main-checkbox"
2026
2025
  }, null, 8, Uo)
2027
2026
  ])
2028
- ])) : P("", !0),
2029
- (y(!0), k(z, null, Q(v.value, (h) => (y(), k(z, {
2030
- key: h.field
2027
+ ])) : D("", !0),
2028
+ (y(!0), x(z, null, Q(v.value, (c) => (y(), x(z, {
2029
+ key: c.field
2031
2030
  }, [
2032
- h.field && m(h) ? (y(), fe(mt, Ae({
2031
+ c.field && m(c) ? (y(), fe(ht, Ae({
2033
2032
  key: 0,
2034
- column: h,
2033
+ column: c,
2035
2034
  rows: e.rows,
2036
2035
  "sort-helpers": e.sortHelpers,
2037
2036
  filters: l.value,
@@ -2039,19 +2038,19 @@ const co = {
2039
2038
  "header-class": e.headerClass,
2040
2039
  tablename: e.tablename
2041
2040
  }, { ref_for: !0 }, f.$attrs, {
2042
- onApplyFilter: d[3] || (d[3] = (g, C) => o("applyFilter", g, C)),
2043
- onClearFilter: d[4] || (d[4] = (g) => o("clearFilter", g)),
2041
+ onApplyFilter: h[3] || (h[3] = (g, C) => o("applyFilter", g, C)),
2042
+ onClearFilter: h[4] || (h[4] = (g) => o("clearFilter", g)),
2044
2043
  onOpenFilter: r,
2045
2044
  onCloseFilter: i,
2046
- "onUpdate:filters": d[5] || (d[5] = (g) => o("update:filters", g))
2045
+ "onUpdate:filters": h[5] || (h[5] = (g) => o("update:filters", g))
2047
2046
  }), Te({ _: 2 }, [
2048
2047
  Q(f.$slots, (g, C) => ({
2049
2048
  name: C,
2050
- fn: X((S) => [
2051
- j(f.$slots, C, Ae({ ref_for: !0 }, S), void 0, !0)
2049
+ fn: X((R) => [
2050
+ j(f.$slots, C, Ae({ ref_for: !0 }, R), void 0, !0)
2052
2051
  ])
2053
2052
  }))
2054
- ]), 1040, ["column", "rows", "sort-helpers", "filters", "open-filter", "header-class", "tablename"])) : P("", !0)
2053
+ ]), 1040, ["column", "rows", "sort-helpers", "filters", "open-filter", "header-class", "tablename"])) : D("", !0)
2055
2054
  ], 64))), 128))
2056
2055
  ])
2057
2056
  ], 512));
@@ -2090,148 +2089,148 @@ const co = {
2090
2089
  },
2091
2090
  emits: ["row-click"],
2092
2091
  setup(e, { emit: n }) {
2093
- const t = e, o = F(() => t.rowKey ?? "id"), s = I(null), l = F(() => t.columns.flatMap(
2092
+ const t = e, o = F(() => t.rowKey ?? "id"), s = q(null), l = F(() => t.columns.flatMap(
2094
2093
  (a) => "children" in a ? a.children : [a]
2095
2094
  ));
2096
- return (a, r) => (y(), k("tbody", {
2095
+ return (a, r) => (y(), x("tbody", {
2097
2096
  ref_key: "bodyRef",
2098
2097
  ref: s
2099
2098
  }, [
2100
- e.loading ? (y(), k("tr", Qo, [
2101
- w("td", {
2099
+ e.loading ? (y(), x("tr", Qo, [
2100
+ b("td", {
2102
2101
  colspan: e.totalColumns,
2103
2102
  class: "vs-loading"
2104
2103
  }, [
2105
- r[2] || (r[2] = w("div", { class: "vs-spinner" }, null, -1)),
2106
- w("span", null, H(e.loadingText), 1)
2104
+ r[2] || (r[2] = b("div", { class: "vs-spinner" }, null, -1)),
2105
+ b("span", null, B(e.loadingText), 1)
2107
2106
  ], 8, Yo)
2108
- ])) : e.paginatedRows.length ? (y(!0), k(z, { key: 2 }, Q(e.paginatedRows, (i, c) => (y(), k(z, {
2109
- key: e.getRowKey(i, c)
2107
+ ])) : e.paginatedRows.length ? (y(!0), x(z, { key: 2 }, Q(e.paginatedRows, (i, u) => (y(), x(z, {
2108
+ key: e.getRowKey(i, u)
2110
2109
  }, [
2111
- w("tr", {
2110
+ b("tr", {
2112
2111
  class: G([
2113
2112
  e.rowClass,
2114
2113
  { "vs-row-clickable": e.hasRowClick },
2115
2114
  { "vs-row-selected": e.isRowSelected(i, e.selectedItems, o.value) }
2116
2115
  ]),
2117
- onClick: (u) => a.$emit("row-click", i, c)
2116
+ onClick: (d) => a.$emit("row-click", i, u)
2118
2117
  }, [
2119
- e.expandable ? (y(), k("td", {
2118
+ e.expandable ? (y(), x("td", {
2120
2119
  key: 0,
2121
2120
  class: "vs-expand-column",
2122
2121
  "data-field": "_expand",
2123
2122
  onClick: r[0] || (r[0] = pe(() => {
2124
2123
  }, ["stop"]))
2125
2124
  }, [
2126
- w("button", {
2125
+ b("button", {
2127
2126
  class: "vs-expand-btn",
2128
2127
  type: "button",
2129
- "aria-expanded": e.isRowExpanded(i, c),
2130
- "aria-controls": `row-details-${e.getRowKey(i, c)}`,
2131
- onClick: pe((u) => e.toggleRowExpansion(i, c), ["stop"])
2128
+ "aria-expanded": e.isRowExpanded(i, u),
2129
+ "aria-controls": `row-details-${e.getRowKey(i, u)}`,
2130
+ onClick: pe((d) => e.toggleRowExpansion(i, u), ["stop"])
2132
2131
  }, [
2133
- e.isRowExpanded(i, c) ? (y(), k("span", os, [...r[4] || (r[4] = [
2134
- w("svg", {
2132
+ e.isRowExpanded(i, u) ? (y(), x("span", os, [...r[4] || (r[4] = [
2133
+ b("svg", {
2135
2134
  xmlns: "http://www.w3.org/2000/svg",
2136
2135
  height: "24px",
2137
2136
  viewBox: "0 -960 960 960",
2138
2137
  width: "24px",
2139
2138
  fill: "var(--vs-gray-800)"
2140
2139
  }, [
2141
- w("path", { d: "M480-345 240-585l56-56 184 183 184-183 56 56-240 240Z" })
2140
+ b("path", { d: "M480-345 240-585l56-56 184 183 184-183 56 56-240 240Z" })
2142
2141
  ], -1)
2143
- ])])) : (y(), k("span", ss, [...r[5] || (r[5] = [
2144
- w("svg", {
2142
+ ])])) : (y(), x("span", ss, [...r[5] || (r[5] = [
2143
+ b("svg", {
2145
2144
  xmlns: "http://www.w3.org/2000/svg",
2146
2145
  height: "24px",
2147
2146
  viewBox: "0 -960 960 960",
2148
2147
  width: "24px",
2149
2148
  fill: "var(--vs-gray-800)"
2150
2149
  }, [
2151
- w("path", { d: "M504-480 320-664l56-56 240 240-240 240-56-56 184-184Z" })
2150
+ b("path", { d: "M504-480 320-664l56-56 240 240-240 240-56-56 184-184Z" })
2152
2151
  ], -1)
2153
2152
  ])]))
2154
2153
  ], 8, ns)
2155
- ])) : P("", !0),
2156
- e.isItemSelectedControlled ? (y(), k("td", {
2154
+ ])) : D("", !0),
2155
+ e.isItemSelectedControlled ? (y(), x("td", {
2157
2156
  key: 1,
2158
2157
  class: "vs-checkbox-column",
2159
2158
  "data-field": "_checkbox",
2160
2159
  onClick: r[1] || (r[1] = pe(() => {
2161
2160
  }, ["stop"]))
2162
2161
  }, [
2163
- w("div", ls, [
2164
- w("input", {
2162
+ b("div", ls, [
2163
+ b("input", {
2165
2164
  type: "checkbox",
2166
- id: e.tablename + "-checkbox-" + e.getRowKey(i, c),
2165
+ id: e.tablename + "-checkbox-" + e.getRowKey(i, u),
2167
2166
  value: i,
2168
- checked: e.selectedItems.some((u, v) => e.getRowKey(u, v) === e.getRowKey(i, c)),
2169
- onChange: (u) => e.toggleRow(i, c)
2167
+ checked: e.selectedItems.some((d, v) => e.getRowKey(d, v) === e.getRowKey(i, u)),
2168
+ onChange: (d) => e.toggleRow(i, u)
2170
2169
  }, null, 40, as),
2171
- w("label", {
2172
- for: e.tablename + "-checkbox-" + e.getRowKey(i, c)
2170
+ b("label", {
2171
+ for: e.tablename + "-checkbox-" + e.getRowKey(i, u)
2173
2172
  }, null, 8, rs)
2174
2173
  ])
2175
- ])) : P("", !0),
2176
- (y(!0), k(z, null, Q(l.value, (u) => (y(), k(z, null, [
2177
- u && u.field ? (y(), k("td", {
2178
- key: u.field,
2174
+ ])) : D("", !0),
2175
+ (y(!0), x(z, null, Q(l.value, (d) => (y(), x(z, null, [
2176
+ d && d.field ? (y(), x("td", {
2177
+ key: d.field,
2179
2178
  class: G(e.cellClass),
2180
- "data-field": u.field
2179
+ "data-field": d.field
2181
2180
  }, [
2182
- j(a.$slots, `cell-${u.field}`, {
2181
+ j(a.$slots, `cell-${d.field}`, {
2183
2182
  item: i,
2184
- value: e.getValue(i, u.field),
2185
- column: u,
2186
- index: c
2183
+ value: e.getValue(i, d.field),
2184
+ column: d,
2185
+ index: u
2187
2186
  }, () => [
2188
- Ge(H(e.getValue(i, u.field)), 1)
2187
+ Ge(B(e.getValue(i, d.field)), 1)
2189
2188
  ], !0)
2190
- ], 10, is)) : P("", !0)
2189
+ ], 10, is)) : D("", !0)
2191
2190
  ], 64))), 256))
2192
2191
  ], 10, ts),
2193
- e.expandable ? (y(), k(z, { key: 0 }, [
2194
- e.isRowExpanded(i, c) ? (y(), k("tr", cs, [
2195
- w("td", {
2192
+ e.expandable ? (y(), x(z, { key: 0 }, [
2193
+ e.isRowExpanded(i, u) ? (y(), x("tr", cs, [
2194
+ b("td", {
2196
2195
  colspan: e.totalColumns,
2197
2196
  class: "vs-expanded-cell"
2198
2197
  }, [
2199
- e.isRowLoading(i, c) ? j(a.$slots, "row-expanded-loader", {
2198
+ e.isRowLoading(i, u) ? j(a.$slots, "row-expanded-loader", {
2200
2199
  key: 0,
2201
2200
  item: i,
2202
- index: c
2201
+ index: u
2203
2202
  }, () => [
2204
- r[6] || (r[6] = w("div", { class: "vs-loader-bar" }, [
2205
- w("div", { class: "vs-loader-bar-inner" })
2203
+ r[6] || (r[6] = b("div", { class: "vs-loader-bar" }, [
2204
+ b("div", { class: "vs-loader-bar-inner" })
2206
2205
  ], -1))
2207
- ], !0) : (y(), k("div", ds, [
2206
+ ], !0) : (y(), x("div", ds, [
2208
2207
  j(a.$slots, "row-expanded", {
2209
2208
  item: i,
2210
- index: c
2209
+ index: u
2211
2210
  }, () => [
2212
2211
  r[7] || (r[7] = Ge(" Expanded details for row ", -1)),
2213
- w("b", null, H(e.getRowKey(i, c)), 1)
2212
+ b("b", null, B(e.getRowKey(i, u)), 1)
2214
2213
  ], !0)
2215
2214
  ]))
2216
2215
  ], 8, us)
2217
- ])) : P("", !0)
2218
- ], 64)) : P("", !0)
2219
- ], 64))), 128)) : (y(), k("tr", Go, [
2220
- w("td", {
2216
+ ])) : D("", !0)
2217
+ ], 64)) : D("", !0)
2218
+ ], 64))), 128)) : (y(), x("tr", Go, [
2219
+ b("td", {
2221
2220
  colspan: e.totalColumns,
2222
2221
  class: "vs-no-data"
2223
2222
  }, [
2224
2223
  j(a.$slots, "no-data", {}, () => [
2225
- r[3] || (r[3] = w("div", { class: "vs-no-data-icon" }, [
2226
- w("svg", {
2224
+ r[3] || (r[3] = b("div", { class: "vs-no-data-icon" }, [
2225
+ b("svg", {
2227
2226
  viewBox: "0 0 24 24",
2228
2227
  fill: "currentColor"
2229
2228
  }, [
2230
- w("path", { d: "M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-5 14H7v-2h7v2zm3-4H7v-2h10v2zm0-4H7V7h10v2z" })
2229
+ b("path", { d: "M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-5 14H7v-2h7v2zm3-4H7v-2h10v2zm0-4H7V7h10v2z" })
2231
2230
  ])
2232
2231
  ], -1)),
2233
- w("div", _o, H(e.noDataText), 1),
2234
- w("div", es, H(e.noDataDescription), 1)
2232
+ b("div", _o, B(e.noDataText), 1),
2233
+ b("div", es, B(e.noDataDescription), 1)
2235
2234
  ], !0)
2236
2235
  ], 8, Jo)
2237
2236
  ]))
@@ -2249,19 +2248,19 @@ const co = {
2249
2248
  const l = s.target;
2250
2249
  t("update:modelValue", l.value), t("inputTyped", l.value);
2251
2250
  };
2252
- return (s, l) => (y(), k("div", hs, [
2253
- l[0] || (l[0] = w("div", { class: "vs-search-icon" }, [
2254
- w("svg", {
2251
+ return (s, l) => (y(), x("div", hs, [
2252
+ l[0] || (l[0] = b("div", { class: "vs-search-icon" }, [
2253
+ b("svg", {
2255
2254
  xmlns: "http://www.w3.org/2000/svg",
2256
2255
  height: "22px",
2257
2256
  viewBox: "0 -960 960 960",
2258
2257
  width: "22px",
2259
2258
  fill: "#e3e3e3"
2260
2259
  }, [
2261
- w("path", { d: "M784-120 532-372q-30 24-69 38t-83 14q-109 0-184.5-75.5T120-580q0-109 75.5-184.5T380-840q109 0 184.5 75.5T640-580q0 44-14 83t-38 69l252 252-56 56ZM380-400q75 0 127.5-52.5T560-580q0-75-52.5-127.5T380-760q-75 0-127.5 52.5T200-580q0 75 52.5 127.5T380-400Z" })
2260
+ b("path", { d: "M784-120 532-372q-30 24-69 38t-83 14q-109 0-184.5-75.5T120-580q0-109 75.5-184.5T380-840q109 0 184.5 75.5T640-580q0 44-14 83t-38 69l252 252-56 56ZM380-400q75 0 127.5-52.5T560-580q0-75-52.5-127.5T380-760q-75 0-127.5 52.5T200-580q0 75 52.5 127.5T380-400Z" })
2262
2261
  ])
2263
2262
  ], -1)),
2264
- w("input", {
2263
+ b("input", {
2265
2264
  type: "text",
2266
2265
  class: "vs-search-input",
2267
2266
  placeholder: e.placeholder,
@@ -2286,19 +2285,19 @@ const co = {
2286
2285
  const t = n, o = (s) => {
2287
2286
  t("update:searchQuery", s), t("search", s);
2288
2287
  };
2289
- return (s, l) => (y(), k("div", ys, [
2290
- w("div", ws, [
2291
- e.showSearch ? (y(), k("div", bs, [
2288
+ return (s, l) => (y(), x("div", ys, [
2289
+ b("div", ws, [
2290
+ e.showSearch ? (y(), x("div", bs, [
2292
2291
  ne(gs, {
2293
2292
  "model-value": e.searchQuery,
2294
2293
  "onUpdate:modelValue": o,
2295
2294
  placeholder: e.searchPlaceholder,
2296
2295
  class: G(e.searchClass)
2297
2296
  }, null, 8, ["model-value", "placeholder", "class"])
2298
- ])) : P("", !0),
2297
+ ])) : D("", !0),
2299
2298
  j(s.$slots, "left", {}, void 0, !0)
2300
2299
  ]),
2301
- w("div", xs, [
2300
+ b("div", xs, [
2302
2301
  j(s.$slots, "right", {}, void 0, !0)
2303
2302
  ])
2304
2303
  ]));
@@ -2330,8 +2329,8 @@ const co = {
2330
2329
  if (typeof a.footerValue == "function")
2331
2330
  try {
2332
2331
  i = a.footerValue(n.rows);
2333
- } catch (c) {
2334
- console.warn(`Error computing footerValue for column "${a.field}"`, c);
2332
+ } catch (u) {
2333
+ console.warn(`Error computing footerValue for column "${a.field}"`, u);
2335
2334
  }
2336
2335
  else a.footerValue !== void 0 && (i = a.footerValue);
2337
2336
  return {
@@ -2352,15 +2351,15 @@ const co = {
2352
2351
  }
2353
2352
  return typeof l == "number" ? s.field === "price" ? `$${l.toFixed(2)}` : s.field === "tax" ? l.toFixed(2) : l.toLocaleString() : String(l);
2354
2353
  }
2355
- return (s, l) => t.value.length ? (y(), k("tfoot", Ss, [
2356
- w("tr", Rs, [
2357
- e.expandable ? (y(), k("td", Es)) : P("", !0),
2358
- e.isItemSelectedControlled ? (y(), k("td", $s)) : P("", !0),
2359
- (y(!0), k(z, null, Q(t.value, (a, r) => (y(), k("td", {
2354
+ return (s, l) => t.value.length ? (y(), x("tfoot", Ss, [
2355
+ b("tr", Rs, [
2356
+ e.expandable ? (y(), x("td", Es)) : D("", !0),
2357
+ e.isItemSelectedControlled ? (y(), x("td", $s)) : D("", !0),
2358
+ (y(!0), x(z, null, Q(t.value, (a, r) => (y(), x("td", {
2360
2359
  key: r,
2361
2360
  "data-field": a.field,
2362
2361
  class: G(["vs-footer-cell", a.footerClass || ""]),
2363
- style: gt(a.footerStyle || {})
2362
+ style: pt(a.footerStyle || {})
2364
2363
  }, [
2365
2364
  a.hasFooter ? j(s.$slots, `footer-${a.field}`, {
2366
2365
  key: 0,
@@ -2368,19 +2367,25 @@ const co = {
2368
2367
  value: a.footerValue,
2369
2368
  rows: e.rows
2370
2369
  }, () => [
2371
- Ge(H(a.formattedValue), 1)
2372
- ], !0) : P("", !0)
2370
+ Ge(B(a.formattedValue), 1)
2371
+ ], !0) : D("", !0)
2373
2372
  ], 14, As))), 128))
2374
2373
  ])
2375
- ])) : P("", !0);
2374
+ ])) : D("", !0);
2376
2375
  }
2377
2376
  }), Ts = /* @__PURE__ */ ae(Fs, [["__scopeId", "data-v-f3b614d3"]]);
2378
2377
  function Os(e, n, t) {
2379
- const o = I(1), s = I(e.sort ? [...e.sort] : []);
2380
- Y(() => e.sort, (v) => {
2381
- v && (s.value = [...v]);
2382
- }, { deep: !0 });
2383
- const l = F(() => e.serverOptions?.sort ?? s.value ?? []);
2378
+ const o = q(1), s = q(e.sort ? [...e.sort] : []);
2379
+ Y(
2380
+ () => e.sort,
2381
+ (v) => {
2382
+ v && (s.value = [...v]);
2383
+ },
2384
+ { deep: !0 }
2385
+ );
2386
+ const l = F(
2387
+ () => e.serverOptions?.sort ?? s.value ?? []
2388
+ );
2384
2389
  return {
2385
2390
  activeSort: l,
2386
2391
  sortHelpers: {
@@ -2392,8 +2397,8 @@ function Os(e, n, t) {
2392
2397
  getSortOrder: (v) => l.value.find((m) => m.field === v)?.order ?? null,
2393
2398
  handleSort: (v, m) => {
2394
2399
  let f = [...s.value];
2395
- const d = f.findIndex((h) => h.field === v);
2396
- 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
+ const h = f.findIndex((c) => c.field === v);
2401
+ m.shiftKey ? h === -1 ? f.push({ field: v, order: "asc" }) : f[h]?.order === "asc" ? f[h].order = "desc" : f.splice(h, 1) : h === -1 ? f = [{ field: v, order: "asc" }] : f[h]?.order === "asc" ? f = [{ field: v, order: "desc" }] : f = [], f = f.map((c, g) => ({ ...c, 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 });
2397
2402
  }
2398
2403
  }
2399
2404
  };
@@ -2401,19 +2406,19 @@ function Os(e, n, t) {
2401
2406
  function Vs(e, n, t, o, s) {
2402
2407
  const l = F({
2403
2408
  get: () => e.serverItemsLength !== void 0 ? e.serverItemsLength : s.value.length,
2404
- set: (u) => {
2405
- console.log("serverItemsLength: ", u), e.serverItemsLength !== void 0 && n("update:serverItemsLength", u);
2409
+ set: (d) => {
2410
+ console.log("serverItemsLength: ", d), e.serverItemsLength !== void 0 && n("update:serverItemsLength", d);
2406
2411
  }
2407
2412
  }), a = F({
2408
2413
  get: () => e.serverOptions?.page ?? t.value,
2409
- set: (u) => {
2410
- e.serverOptions ? n("update:serverOptions", { ...e.serverOptions, page: u }) : t.value = u;
2414
+ set: (d) => {
2415
+ e.serverOptions ? n("update:serverOptions", { ...e.serverOptions, page: d }) : t.value = d;
2411
2416
  }
2412
2417
  }), r = F(() => {
2413
- const u = o.value;
2414
- return Kt(t.value, u, l.value);
2415
- }), i = (u) => {
2416
- e.serverOptions && n("update:serverOptions", { ...e.serverOptions, page: u }), n("pageUpdated", u);
2418
+ const d = o.value;
2419
+ return Wt(t.value, d, l.value);
2420
+ }), i = (d) => {
2421
+ e.serverOptions && n("update:serverOptions", { ...e.serverOptions, page: d }), n("pageUpdated", d);
2417
2422
  };
2418
2423
  return {
2419
2424
  currentPage: a,
@@ -2434,7 +2439,7 @@ function Ls(e, n, t, o) {
2434
2439
  set: (a) => o.value = a
2435
2440
  });
2436
2441
  return Y(o, (a) => {
2437
- const r = e.serverItemsLength ?? e.rows.length, i = bt(r, a);
2442
+ const r = e.serverItemsLength ?? e.rows.length, i = wt(r, a);
2438
2443
  t.value > i ? t.value = i || 1 : t.value < 1 && (t.value = 1);
2439
2444
  }), {
2440
2445
  vsRowsPerPage: s,
@@ -2443,7 +2448,7 @@ function Ls(e, n, t, o) {
2443
2448
  }
2444
2449
  };
2445
2450
  }
2446
- function Ps(e, n) {
2451
+ function Ds(e, n) {
2447
2452
  const t = (a) => {
2448
2453
  n.value = a, e("inputTyped", a);
2449
2454
  };
@@ -2462,114 +2467,118 @@ function Ps(e, n) {
2462
2467
  }
2463
2468
  };
2464
2469
  }
2465
- function Ds(e, n) {
2466
- const t = I([]), o = I(/* @__PURE__ */ new Map()), s = F({
2470
+ function Ps(e, n) {
2471
+ const t = q([]), o = q(/* @__PURE__ */ new Map()), s = F({
2467
2472
  get: () => e.expanded ?? t.value,
2468
- set: (u) => {
2469
- e.expanded !== void 0 ? n("update:expanded", u) : t.value = u;
2473
+ set: (d) => {
2474
+ e.expanded !== void 0 ? n("update:expanded", d) : t.value = d;
2470
2475
  }
2471
2476
  });
2472
- function l(u, v) {
2473
- return typeof e.rowKey == "function" ? e.rowKey(u, v) : typeof e.rowKey == "string" && u[e.rowKey] !== void 0 ? u[e.rowKey] : v;
2477
+ function l(d, v) {
2478
+ return typeof e.rowKey == "function" ? e.rowKey(d, v) : typeof e.rowKey == "string" && d[e.rowKey] !== void 0 ? d[e.rowKey] : v;
2474
2479
  }
2475
- function a(u, v) {
2476
- const m = l(u, v);
2480
+ function a(d, v) {
2481
+ const m = l(d, v);
2477
2482
  return s.value.includes(m);
2478
2483
  }
2479
- function r(u, v) {
2480
- const m = l(u, v), f = s.value.includes(m);
2481
- let d;
2482
- 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;
2484
+ function r(d, v) {
2485
+ const m = l(d, v), f = s.value.includes(m);
2486
+ let h;
2487
+ f ? (h = s.value.filter((c) => c !== m), n("collapseRow", { row: d, index: v, rowId: m })) : (h = e.accordion ? [m] : [...s.value, m], n("expandRow", { row: d, index: v, rowId: m })), s.value = h;
2483
2488
  }
2484
- function i(u, v) {
2485
- const m = l(u, v);
2489
+ function i(d, v) {
2490
+ const m = l(d, v);
2486
2491
  return o.value.get(m) === !0;
2487
2492
  }
2488
- function c(u, v) {
2489
- o.value.set(u, v);
2493
+ function u(d, v) {
2494
+ o.value.set(d, v);
2490
2495
  }
2491
2496
  return {
2492
2497
  expandedRows: s,
2493
2498
  isRowExpanded: a,
2494
2499
  toggleRowExpansion: r,
2495
2500
  getRowId: l,
2496
- setRowLoading: c,
2501
+ setRowLoading: u,
2497
2502
  isRowLoading: i
2498
2503
  };
2499
2504
  }
2500
2505
  function Is(e, n, t) {
2501
- const o = I({}), s = F(() => t?.serverMode ? e.value : e.value.filter((r) => n.every((i) => {
2502
- if (!i.field)
2503
- return !0;
2504
- const c = o.value[i.field];
2505
- if (!c || !c.type)
2506
- return !0;
2507
- const u = r[i.field];
2506
+ const o = q({}), s = F(() => t?.serverMode ? e.value : e.value.filter((r) => n.every((i) => {
2507
+ if (!i.field) return !0;
2508
+ const u = o.value[i.field];
2509
+ if (!u || !u.type) return !0;
2510
+ const d = r[i.field];
2508
2511
  if (i.filter?.filterFn)
2509
- return i.filter.filterFn(u, c.value, r);
2510
- if (c.type === "custom" && i.filter?.filterKey) {
2512
+ return i.filter.filterFn(d, u.value, r);
2513
+ if (u.type === "custom" && i.filter?.filterKey) {
2511
2514
  const m = Be[i.filter.filterKey];
2512
- return typeof m == "function" ? m(r, i.field, c) : !0;
2515
+ return typeof m == "function" ? m(r, i.field, u) : !0;
2513
2516
  }
2514
- const v = Be[c.type];
2515
- return typeof v == "function" ? v(r, i.field, c) : !0;
2517
+ const v = Be[u.type];
2518
+ return typeof v == "function" ? v(r, i.field, u) : !0;
2516
2519
  })));
2517
- Y(o, (r) => {
2518
- if (t?.serverMode && t.onServerFilter) {
2519
- const i = Object.entries(r).reduce((c, [u, v]) => {
2520
- if (!v?.type)
2521
- return c;
2522
- const m = {
2523
- type: v.type,
2524
- operator: v.operator
2525
- };
2526
- switch (v.type) {
2527
- case "text":
2528
- c[u] = {
2529
- ...m,
2530
- value: v.value ?? null
2520
+ Y(
2521
+ o,
2522
+ (r) => {
2523
+ if (t?.serverMode && t.onServerFilter) {
2524
+ const i = Object.entries(r).reduce(
2525
+ (u, [d, v]) => {
2526
+ if (!v?.type) return u;
2527
+ const m = {
2528
+ type: v.type,
2529
+ operator: v.operator
2531
2530
  };
2532
- break;
2533
- case "multi-select":
2534
- c[u] = {
2535
- ...m,
2536
- value: v.value ?? []
2537
- };
2538
- break;
2539
- case "number-range":
2540
- c[u] = {
2541
- ...m,
2542
- value: v.value ?? null,
2543
- min: v.min ?? null,
2544
- max: v.max ?? null
2545
- };
2546
- break;
2547
- case "date-range":
2548
- c[u] = {
2549
- ...m,
2550
- value: v.value ?? null,
2551
- start: v.start ?? null,
2552
- end: v.end ?? null
2553
- };
2554
- break;
2555
- case "custom":
2556
- c[u] = {
2557
- ...m,
2558
- value: v.value,
2559
- filterKey: v.filterKey
2560
- };
2561
- break;
2562
- }
2563
- return c;
2564
- }, {});
2565
- t.onServerFilter(i);
2566
- }
2567
- }, { deep: !0 });
2568
- function l(r, i, c) {
2569
- i ? o.value[r] = Ce(i.type, i) : c && (o.value[r] = Ce(c));
2531
+ switch (v.type) {
2532
+ case "text":
2533
+ u[d] = {
2534
+ ...m,
2535
+ value: v.value ?? null
2536
+ };
2537
+ break;
2538
+ case "multi-select":
2539
+ u[d] = {
2540
+ ...m,
2541
+ value: v.value ?? []
2542
+ };
2543
+ break;
2544
+ case "number-range":
2545
+ u[d] = {
2546
+ ...m,
2547
+ value: v.value ?? null,
2548
+ min: v.min ?? null,
2549
+ max: v.max ?? null
2550
+ };
2551
+ break;
2552
+ case "date-range":
2553
+ u[d] = {
2554
+ ...m,
2555
+ value: v.value ?? null,
2556
+ start: v.start ?? null,
2557
+ end: v.end ?? null
2558
+ };
2559
+ break;
2560
+ case "custom":
2561
+ u[d] = {
2562
+ ...m,
2563
+ value: v.value,
2564
+ filterKey: v.filterKey
2565
+ };
2566
+ break;
2567
+ }
2568
+ return u;
2569
+ },
2570
+ {}
2571
+ );
2572
+ t.onServerFilter(i);
2573
+ }
2574
+ },
2575
+ { deep: !0 }
2576
+ );
2577
+ function l(r, i, u) {
2578
+ i ? o.value[r] = we(i.type, i) : u && (o.value[r] = we(u));
2570
2579
  }
2571
2580
  function a(r, i) {
2572
- i ? o.value[r] = Ce(i) : delete o.value[r];
2581
+ i ? o.value[r] = we(i) : delete o.value[r];
2573
2582
  }
2574
2583
  return {
2575
2584
  filters: o,
@@ -2582,55 +2591,50 @@ function qs(e, n = {}) {
2582
2591
  const { enabled: t = !1, maxHeight: o = "calc(100vh - 250px)" } = n;
2583
2592
  let s = null, l = null;
2584
2593
  const a = () => {
2585
- const c = e.value;
2586
- if (!t || !c)
2587
- return;
2588
- const u = c.querySelector("thead"), v = c.querySelector("tbody");
2589
- !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, {
2594
+ const u = e.value;
2595
+ if (!t || !u) return;
2596
+ const d = u.querySelector("thead"), v = u.querySelector("tbody");
2597
+ !d || !v || (u.parentElement?.classList.contains("vs-table-wrapper") ? s = u.parentElement : (s = document.createElement("div"), s.classList.add("vs-table-wrapper"), u.parentNode?.insertBefore(s, u), s.appendChild(u)), Object.assign(s.style, {
2590
2598
  overflowY: "auto",
2591
2599
  overflowX: "auto",
2592
2600
  position: "relative",
2593
2601
  maxHeight: typeof o == "number" ? `${o}px` : o
2594
- }), Object.assign(u.style, {
2602
+ }), Object.assign(d.style, {
2595
2603
  position: "sticky",
2596
2604
  top: "0",
2597
2605
  zIndex: "5",
2598
2606
  background: "var(--vs-table-header-bg, #fff)"
2599
2607
  }), l || (l = new ResizeObserver(() => {
2600
2608
  r();
2601
- }), l.observe(c)), r());
2609
+ }), l.observe(u)), r());
2602
2610
  }, r = () => {
2603
- const c = e.value;
2604
- if (!c)
2605
- return;
2606
- const u = c.querySelector("thead"), v = c.querySelector("tbody");
2607
- if (!u || !v)
2608
- return;
2609
- const m = Array.from(u.querySelectorAll("tr")), f = v.querySelector("tr");
2610
- if (!f)
2611
- return;
2612
- const d = Array.from(f.querySelectorAll("td"));
2613
- if (!d.length)
2614
- return;
2615
- const h = [];
2616
- m.forEach((g) => {
2617
- Array.from(g.querySelectorAll("th")).forEach((S) => {
2618
- parseInt(S.getAttribute("colspan") || "1", 10) === 1 && h.push(S);
2611
+ const u = e.value;
2612
+ if (!u) return;
2613
+ const d = u.querySelector("thead"), v = u.querySelector("tbody");
2614
+ if (!d || !v) return;
2615
+ const m = Array.from(d.querySelectorAll("tr")), f = v.querySelector("tr");
2616
+ if (!f) return;
2617
+ const h = Array.from(f.querySelectorAll("td"));
2618
+ if (!h.length || h.length === 1 || f.querySelector(".vs-no-data") != null) return;
2619
+ const g = [];
2620
+ m.forEach((C) => {
2621
+ Array.from(C.querySelectorAll("th")).forEach((E) => {
2622
+ parseInt(E.getAttribute("colspan") || "1", 10) === 1 && g.push(E);
2619
2623
  });
2620
- }), h.forEach((g, C) => {
2621
- const S = d[C];
2622
- S && (g.style.width = `${S.offsetWidth}px`);
2623
- }), m.forEach((g) => {
2624
- Array.from(g.querySelectorAll("th")).forEach((S) => {
2625
- const E = parseInt(S.getAttribute("colspan") || "1", 10);
2626
- if (E > 1) {
2627
- let V = 0;
2628
- const L = Array.from(g.children).indexOf(S);
2629
- for (let M = 0; M < E; M++) {
2630
- const b = d[L + M];
2631
- b && (V += b.offsetWidth);
2624
+ }), g.forEach((C, R) => {
2625
+ const E = h[R];
2626
+ E && (C.style.width = `${E.offsetWidth}px`);
2627
+ }), m.forEach((C) => {
2628
+ Array.from(C.querySelectorAll("th")).forEach((E) => {
2629
+ const V = parseInt(E.getAttribute("colspan") || "1", 10);
2630
+ if (V > 1) {
2631
+ let T = 0;
2632
+ const W = Array.from(C.children).indexOf(E);
2633
+ for (let S = 0; S < V; S++) {
2634
+ const k = h[W + S];
2635
+ k && (T += k.offsetWidth);
2632
2636
  }
2633
- V > 0 && (S.style.width = `${V}px`);
2637
+ T > 0 && (E.style.width = `${T}px`);
2634
2638
  }
2635
2639
  });
2636
2640
  });
@@ -2641,65 +2645,73 @@ function qs(e, n = {}) {
2641
2645
  t && (await oe(), a());
2642
2646
  }), He(() => {
2643
2647
  i();
2644
- }), Y(() => t, async (c) => {
2645
- await oe(), c ? a() : i();
2646
- }), {
2648
+ }), Y(
2649
+ () => t,
2650
+ async (u) => {
2651
+ await oe(), u ? a() : i();
2652
+ }
2653
+ ), {
2647
2654
  refresh: a,
2648
2655
  cleanup: i
2649
2656
  };
2650
2657
  }
2651
2658
  function Ms(e, n = {}) {
2652
- const { enabled: t = !1, maxHeight: o = "calc(100vh - 250px)", debounceMs: s = 100 } = n;
2653
- let l = null, a = null, r = null, i = !1, c = !1, u = null;
2654
- const m = ((h, g = 100) => {
2659
+ const {
2660
+ enabled: t = !1,
2661
+ maxHeight: o = "calc(100vh - 250px)",
2662
+ debounceMs: s = 100
2663
+ } = n;
2664
+ let l = null, a = null, r = null, i = !1, u = !1, d = null;
2665
+ const m = ((c, g = 100) => {
2655
2666
  let C = null;
2656
- return (...S) => {
2657
- C && clearTimeout(C), C = window.setTimeout(() => h(...S), g);
2667
+ return (...R) => {
2668
+ C && clearTimeout(C), C = window.setTimeout(() => c(...R), g);
2658
2669
  };
2659
2670
  })(() => {
2660
2671
  i || (i = !0, cancelAnimationFrame(r), r = requestAnimationFrame(() => {
2661
- const h = e.value;
2662
- if (!h)
2663
- return;
2664
- const g = h.querySelector("tfoot"), C = h.querySelector("tbody");
2665
- if (!g || !C)
2672
+ const c = e.value;
2673
+ if (!c) return;
2674
+ const g = c.querySelector("tfoot"), C = c.querySelector("tbody");
2675
+ if (!g || !C) return;
2676
+ const R = g.querySelector("tr"), E = C.querySelector("tr");
2677
+ if (!R || !E) {
2678
+ i = !1;
2666
2679
  return;
2667
- const S = g.querySelector("tr"), E = C.querySelector("tr");
2668
- if (!S || !E) {
2680
+ }
2681
+ const V = Array.from(R.querySelectorAll("td, th")), T = Array.from(E.querySelectorAll("td"));
2682
+ if (!V.length || !T.length) {
2669
2683
  i = !1;
2670
2684
  return;
2671
2685
  }
2672
- const V = Array.from(S.querySelectorAll("td, th")), L = Array.from(E.querySelectorAll("td"));
2673
- if (!V.length || !L.length) {
2686
+ if (T.length === 1 || E.querySelector(".vs-no-data") != null) {
2674
2687
  i = !1;
2675
2688
  return;
2676
2689
  }
2677
- let M = 0;
2678
- V.forEach((b) => {
2679
- const p = parseInt(b.getAttribute("colspan") || "1", 10);
2680
- if (p === 1) {
2681
- const x = L[M];
2682
- if (x) {
2683
- const R = x.offsetWidth;
2684
- b.offsetWidth !== R && (b.style.width = `${R}px`, b.style.minWidth = `${R}px`);
2690
+ let S = 0;
2691
+ V.forEach((k) => {
2692
+ const w = parseInt(k.getAttribute("colspan") || "1", 10);
2693
+ if (w === 1) {
2694
+ const p = T[S];
2695
+ if (p) {
2696
+ const A = p.offsetWidth;
2697
+ k.offsetWidth !== A && (k.style.width = `${A}px`, k.style.minWidth = `${A}px`);
2685
2698
  }
2686
- M += 1;
2699
+ S += 1;
2687
2700
  } else {
2688
- let x = 0;
2689
- for (let R = 0; R < p; R++) {
2690
- const T = L[M + R];
2691
- T && (x += T.offsetWidth);
2701
+ let p = 0;
2702
+ for (let A = 0; A < w; A++) {
2703
+ const P = T[S + A];
2704
+ P && (p += P.offsetWidth);
2692
2705
  }
2693
- x > 0 && b.offsetWidth !== x && (b.style.width = `${x}px`, b.style.minWidth = `${x}px`), M += p;
2706
+ p > 0 && k.offsetWidth !== p && (k.style.width = `${p}px`, k.style.minWidth = `${p}px`), S += w;
2694
2707
  }
2695
2708
  }), i = !1;
2696
2709
  }));
2697
2710
  }, s), f = () => {
2698
- const h = e.value;
2699
- if (!t || !h)
2700
- return;
2701
- const g = h.querySelector("tfoot"), C = h.querySelector("tbody"), S = h.querySelector("thead");
2702
- !g || !C || (h.parentElement?.classList.contains("vs-table-wrapper") ? l = h.parentElement : (l = document.createElement("div"), l.classList.add("vs-table-wrapper"), h.parentNode?.insertBefore(l, h), l.appendChild(h)), Object.assign(l.style, {
2711
+ const c = e.value;
2712
+ if (!t || !c) return;
2713
+ const g = c.querySelector("tfoot"), C = c.querySelector("tbody"), R = c.querySelector("thead");
2714
+ !g || !C || (c.parentElement?.classList.contains("vs-table-wrapper") ? l = c.parentElement : (l = document.createElement("div"), l.classList.add("vs-table-wrapper"), c.parentNode?.insertBefore(l, c), l.appendChild(c)), Object.assign(l.style, {
2703
2715
  overflowY: "auto",
2704
2716
  overflowX: "auto",
2705
2717
  position: "relative",
@@ -2709,103 +2721,130 @@ function Ms(e, n = {}) {
2709
2721
  bottom: "0",
2710
2722
  zIndex: "5",
2711
2723
  background: "var(--vs-table-footer-bg, var(--vs-table-header-bg, #fff))"
2712
- }), !c && S && (u = () => {
2724
+ }), !u && R && (d = () => {
2713
2725
  const E = l.scrollLeft;
2714
- S.scrollLeft = E, g.scrollLeft = E;
2715
- }, l.addEventListener("scroll", u), c = !0), a || (a = new ResizeObserver(() => {
2726
+ R.scrollLeft = E, g.scrollLeft = E;
2727
+ }, l.addEventListener("scroll", d), u = !0), a || (a = new ResizeObserver(() => {
2716
2728
  m();
2717
- }), a.observe(h)), m());
2718
- }, d = () => {
2719
- cancelAnimationFrame(r), a && (a.disconnect(), a = null), l && u && c && (l.removeEventListener("scroll", u), c = !1);
2720
- const h = e.value;
2721
- if (h) {
2722
- const g = h.querySelector("tfoot");
2729
+ }), a.observe(c)), m());
2730
+ }, h = () => {
2731
+ cancelAnimationFrame(r), a && (a.disconnect(), a = null), l && d && u && (l.removeEventListener("scroll", d), u = !1);
2732
+ const c = e.value;
2733
+ if (c) {
2734
+ const g = c.querySelector("tfoot");
2723
2735
  g && (g.style.position = "", g.style.bottom = "", g.style.zIndex = "", g.style.background = "");
2724
2736
  }
2725
2737
  };
2726
2738
  return Re(async () => {
2727
2739
  t && (await oe(), f());
2728
- }), He(d), Y(() => t, async (h) => {
2729
- await oe(), h ? f() : d();
2730
- }), {
2740
+ }), He(h), Y(
2741
+ () => t,
2742
+ async (c) => {
2743
+ await oe(), c ? f() : h();
2744
+ }
2745
+ ), {
2731
2746
  refresh: m,
2732
- cleanup: d
2747
+ cleanup: h
2733
2748
  };
2734
2749
  }
2735
2750
  function Bs(e, n, t = {}, o) {
2736
- 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(F(() => $(s)), zt($(e.columns)), {
2737
- serverMode: !!e.serverOptions,
2738
- onServerFilter(D) {
2739
- n("filterChange", D);
2751
+ const s = o || (Fe(e.rows) ? e.rows : gt(e.rows)), l = q(1), a = q(e.serverOptions?.rowsPerPage ?? e.rowsPerPage), r = q(""), i = q(), u = q(null), d = q(), { isRowExpanded: v, toggleRowExpansion: m, getRowId: f, setRowLoading: h, isRowLoading: c } = Ps(e, n), { filters: g, filteredData: C, setFilter: R, clearFilter: E } = Is(
2752
+ F(() => $(s)),
2753
+ Kt($(e.columns)),
2754
+ {
2755
+ serverMode: !!e.serverOptions,
2756
+ onServerFilter(I) {
2757
+ n("filterChange", I);
2758
+ }
2740
2759
  }
2741
- }), { activeSort: V, sortHelpers: L } = Os(e, n, l), { onInputTyped: M } = Ps(n, r), { totalRecords: b, recordRange: p, handlePageChange: x } = Vs(e, n, l, a, F(() => W.value)), { 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(() => {
2742
- let D = C.value;
2743
- return r.value && (D = lt(D, r.value)), D;
2744
- }), W = F(() => {
2745
- let D = q.value;
2746
- return e.serverOptions || (r.value && (D = lt(D, r.value)), V.value.length && (D = Wt(D, V.value))), D = D.map((ve, Ze) => ({
2760
+ ), { activeSort: V, sortHelpers: T } = Os(e, n, l), { onInputTyped: W } = Ds(n, r), { totalRecords: S, recordRange: k, handlePageChange: w } = Vs(
2761
+ e,
2762
+ n,
2763
+ l,
2764
+ a,
2765
+ F(() => N.value)
2766
+ ), { handleRowsPerPage: p } = Ls(e, n, l, a), { header: A = !0, footer: P = !0, maxHeight: L = "calc(100vh - 100px)" } = t, O = qs(d, { enabled: A, maxHeight: L }), H = Ms(d, { enabled: P, maxHeight: L }), M = F(() => {
2767
+ let I = C.value;
2768
+ return e.serverOptions || r.value && (I = lt(I, r.value)), I;
2769
+ }), N = F(() => {
2770
+ let I = M.value;
2771
+ return e.serverOptions || (r.value && (I = lt(I, r.value)), V.value.length && (I = Ht(I, V.value))), I = I.map((ve, Ze) => ({
2747
2772
  ...ve,
2748
2773
  isExpanded: v(ve, Ze)
2749
- })), D;
2774
+ })), I;
2750
2775
  });
2751
2776
  Y([g, r], () => l.value = 1, { deep: !0 });
2752
- const N = F(() => e.serverOptions ? W.value : Nt(W.value, l.value, a.value));
2753
- return Y(s, (D) => {
2754
- Array.isArray(D) && D.length > 1e3 && console.log(`[useDataTable] Large dataset updated (${D.length} rows)`);
2777
+ const K = F(() => e.serverOptions ? N.value : Nt(N.value, l.value, a.value));
2778
+ return Y(s, (I) => {
2779
+ Array.isArray(I) && I.length > 1e3 && console.log(`[useDataTable] Large dataset updated (${I.length} rows)`);
2755
2780
  }), {
2756
2781
  // Pagination
2757
2782
  page: l,
2758
- totalRecords: b,
2759
- recordRange: p,
2760
- handlePageChange: x,
2783
+ totalRecords: S,
2784
+ recordRange: k,
2785
+ handlePageChange: w,
2761
2786
  rowsPerPage: a,
2762
- handleRowsPerPage: R,
2787
+ handleRowsPerPage: p,
2763
2788
  // Sorting
2764
- processedRows: W,
2765
- paginatedRows: N,
2766
- sortHelpers: L,
2789
+ processedRows: N,
2790
+ paginatedRows: K,
2791
+ sortHelpers: T,
2767
2792
  // Search
2768
2793
  searchQuery: r,
2769
- onInputTyped: M,
2794
+ onInputTyped: W,
2770
2795
  // Expandable
2771
2796
  isRowExpanded: v,
2772
2797
  toggleRowExpansion: m,
2773
2798
  getRowId: f,
2774
- setRowLoading: d,
2775
- isRowLoading: h,
2799
+ setRowLoading: h,
2800
+ isRowLoading: c,
2776
2801
  // Column filters
2777
2802
  filters: g,
2778
2803
  filteredData: C,
2779
- setFilter: S,
2804
+ setFilter: R,
2780
2805
  clearFilter: E,
2781
2806
  // Table Ref
2782
2807
  tableContainer: i,
2783
- tableResponsiveRef: c,
2784
- tableRef: u,
2808
+ tableResponsiveRef: u,
2809
+ tableRef: d,
2785
2810
  // Sticky Header and Footer
2786
2811
  refresh() {
2787
- O.refresh?.(), K.refresh?.();
2812
+ O.refresh?.(), H.refresh?.();
2788
2813
  },
2789
2814
  cleanup() {
2790
- O.cleanup?.(), K.cleanup?.();
2815
+ O.cleanup?.(), H.cleanup?.();
2791
2816
  }
2792
2817
  };
2793
2818
  }
2794
2819
  function Hs(e, n) {
2795
- const t = I(e.itemSelected || []);
2796
- Y(() => e.itemSelected, (h) => {
2797
- h ? t.value = [...h] : t.value = [];
2798
- }, { immediate: !0, deep: !0 });
2820
+ const t = q(e.itemSelected || []);
2821
+ Y(
2822
+ () => e.itemSelected,
2823
+ (c) => {
2824
+ c ? t.value = [...c] : t.value = [];
2825
+ },
2826
+ { immediate: !0, deep: !0 }
2827
+ );
2799
2828
  const o = F({
2800
2829
  get: () => t.value,
2801
- set: (h) => {
2802
- t.value = h, n("update:itemSelected", h);
2830
+ set: (c) => {
2831
+ t.value = c, n("update:itemSelected", c);
2803
2832
  }
2804
- }), s = F(() => e.itemSelected !== null), l = F(() => e.rows.length > 0 && o.value.length === e.rows.length), a = F(() => !e.rows.length || !o.value.length ? !1 : !l.value && e.rows.some((h, g) => o.value.some((C, S) => re(C, S, e.rowKey) === re(h, g, e.rowKey)))), r = (h, g) => {
2805
- const C = re(h, g, e.rowKey);
2806
- o.value.some((E, V) => re(E, V, e.rowKey) === C) ? (o.value = o.value.filter((E, V) => re(E, V, e.rowKey) !== C), n("rowDeselected", h, g)) : (o.value = [...o.value, h], n("rowSelected", h, g));
2807
- }, i = (h) => {
2808
- const g = h.target;
2833
+ }), s = F(() => e.itemSelected !== null), l = F(
2834
+ () => e.rows.length > 0 && o.value.length === e.rows.length
2835
+ ), a = F(() => !e.rows.length || !o.value.length ? !1 : !l.value && e.rows.some(
2836
+ (c, g) => o.value.some(
2837
+ (C, R) => re(C, R, e.rowKey) === re(c, g, e.rowKey)
2838
+ )
2839
+ )), r = (c, g) => {
2840
+ const C = re(c, g, e.rowKey);
2841
+ o.value.some(
2842
+ (E, V) => re(E, V, e.rowKey) === C
2843
+ ) ? (o.value = o.value.filter(
2844
+ (E, V) => re(E, V, e.rowKey) !== C
2845
+ ), n("rowDeselected", c, g)) : (o.value = [...o.value, c], n("rowSelected", c, g));
2846
+ }, i = (c) => {
2847
+ const g = c.target;
2809
2848
  o.value = g.checked ? [...e.rows] : [], n("allRowsSelected", o.value);
2810
2849
  };
2811
2850
  return {
@@ -2815,12 +2854,14 @@ function Hs(e, n) {
2815
2854
  isSomeChecked: a,
2816
2855
  toggleRow: r,
2817
2856
  toggleAll: i,
2818
- selectRow: (h, g) => {
2819
- wt(h, o.value, e.rowKey) || (o.value = [...o.value, h], n("rowSelected", h, g));
2857
+ selectRow: (c, g) => {
2858
+ yt(c, o.value, e.rowKey) || (o.value = [...o.value, c], n("rowSelected", c, g));
2820
2859
  },
2821
- deselectRow: (h, g) => {
2822
- const C = re(h, g, e.rowKey);
2823
- o.value = o.value.filter((S, E) => re(S, E, e.rowKey) !== C), n("rowDeselected", h, g);
2860
+ deselectRow: (c, g) => {
2861
+ const C = re(c, g, e.rowKey);
2862
+ o.value = o.value.filter(
2863
+ (R, E) => re(R, E, e.rowKey) !== C
2864
+ ), n("rowDeselected", c, g);
2824
2865
  },
2825
2866
  selectAll: () => {
2826
2867
  o.value = [...e.rows], n("allRowsSelected", o.value);
@@ -2841,173 +2882,189 @@ function Hs(e, n) {
2841
2882
  }
2842
2883
  };
2843
2884
  }
2844
- function Ws(e, n, t = I(!1)) {
2845
- const o = I(!1), s = I(!1);
2885
+ function Ns(e, n, t = q(!1)) {
2886
+ const o = q(!1), s = q(!1);
2846
2887
  let l = !1;
2847
2888
  const a = () => {
2848
- if (l)
2849
- return;
2850
- const b = e.value?.parentElement, p = e.value;
2851
- if (!b || !p)
2852
- return;
2853
- const x = b.scrollLeft, R = b.scrollWidth - b.clientWidth;
2854
- o.value = x > 0, s.value = x < R - 1;
2855
- const T = Array.from(p.querySelectorAll(".vs-sticky-left")), B = Array.from(p.querySelectorAll(".vs-sticky-right"));
2856
- if (x > 0 ? T.forEach((A) => {
2857
- const O = A.closest("thead") !== null;
2858
- A.style.zIndex = O ? "5" : "4";
2859
- }) : T.forEach((A) => {
2860
- const O = A.closest("thead") !== null;
2861
- A.style.zIndex = O ? "4" : "3";
2862
- }), B.length) {
2863
- const A = B[0], O = A ? p.offsetWidth - A.offsetLeft : p.offsetWidth;
2864
- b.scrollWidth - (x + b.clientWidth) <= O + 5 ? B.forEach((q) => {
2865
- const W = q.closest("thead") !== null;
2866
- q.style.zIndex = W ? "5" : "4";
2867
- }) : B.forEach((q) => {
2868
- const W = q.closest("thead") !== null;
2869
- q.style.zIndex = W ? "4" : "3";
2889
+ if (l) return;
2890
+ const S = e.value?.parentElement, k = e.value;
2891
+ if (!S || !k) return;
2892
+ const w = S.scrollLeft, p = S.scrollWidth - S.clientWidth;
2893
+ o.value = w > 0, s.value = w < p - 1;
2894
+ const A = Array.from(k.querySelectorAll(".vs-sticky-left")), P = Array.from(k.querySelectorAll(".vs-sticky-right"));
2895
+ if (w > 0 ? A.forEach((L) => {
2896
+ const O = L.closest("thead") !== null;
2897
+ L.style.zIndex = O ? "5" : "4";
2898
+ }) : A.forEach((L) => {
2899
+ const O = L.closest("thead") !== null;
2900
+ L.style.zIndex = O ? "4" : "3";
2901
+ }), P.length) {
2902
+ const L = P[0], O = L ? k.offsetWidth - L.offsetLeft : k.offsetWidth;
2903
+ S.scrollWidth - (w + S.clientWidth) <= O + 5 ? P.forEach((M) => {
2904
+ const N = M.closest("thead") !== null;
2905
+ M.style.zIndex = N ? "5" : "4";
2906
+ }) : P.forEach((M) => {
2907
+ const N = M.closest("thead") !== null;
2908
+ M.style.zIndex = N ? "4" : "3";
2870
2909
  });
2871
2910
  }
2872
2911
  }, r = () => {
2873
- const b = e.value;
2874
- return b ? Array.from(b.querySelectorAll("tr")) : [];
2875
- }, i = (b) => b.filter((p) => p.closest("tbody")), c = (b) => {
2876
- const p = b[0];
2877
- return p ? Array.from(p.children) : [];
2878
- }, u = (b) => {
2879
- const p = /* @__PURE__ */ new Map();
2880
- return b.forEach((x, R) => {
2881
- const T = x.getAttribute("data-field");
2882
- T && p.set(T, R);
2883
- }), p;
2884
- }, v = (b) => {
2885
- for (const p of b)
2886
- if (p.children?.length) {
2887
- if (p.children.some((x) => x.sticky === "left" || x.sticky === "right"))
2912
+ const S = e.value;
2913
+ return S ? Array.from(S.querySelectorAll("tr")) : [];
2914
+ }, i = (S) => S.filter((k) => k.closest("tbody")), u = (S) => {
2915
+ const k = S[0];
2916
+ return k ? Array.from(k.children) : [];
2917
+ }, d = (S) => {
2918
+ const k = /* @__PURE__ */ new Map();
2919
+ return S.forEach((w, p) => {
2920
+ const A = w.getAttribute("data-field");
2921
+ A && k.set(A, p);
2922
+ }), k;
2923
+ }, v = (S) => {
2924
+ for (const k of S)
2925
+ if (k.children?.length) {
2926
+ if (k.children.some((w) => w.sticky === "left" || w.sticky === "right"))
2888
2927
  return !0;
2889
- } else if (p.sticky === "left" || p.sticky === "right")
2928
+ } else if (k.sticky === "left" || k.sticky === "right")
2890
2929
  return !0;
2891
2930
  return !1;
2892
- }, m = (b, p, x) => {
2893
- const R = [], T = [];
2894
- return v(x) && b.forEach((A, O) => {
2895
- (A.classList.contains("vs-expand-column") || A.classList.contains("vs-checkbox-column")) && R.push(O);
2896
- }), x.forEach((A) => {
2897
- if (A.children?.length)
2898
- A.children.forEach((O) => {
2899
- const K = p.get(O.field);
2900
- if (K === void 0)
2901
- return;
2902
- const q = A.sticky || O.sticky;
2903
- q === "left" && R.push(K), q === "right" && T.push(K);
2931
+ }, m = (S, k, w) => {
2932
+ const p = [], A = [];
2933
+ return v(w) && S.forEach((L, O) => {
2934
+ (L.classList.contains("vs-expand-column") || L.classList.contains("vs-checkbox-column")) && p.push(O);
2935
+ }), w.forEach((L) => {
2936
+ if (L.children?.length)
2937
+ L.children.forEach((O) => {
2938
+ const H = k.get(O.field);
2939
+ if (H === void 0) return;
2940
+ const M = L.sticky || O.sticky;
2941
+ M === "left" && p.push(H), M === "right" && A.push(H);
2904
2942
  });
2905
2943
  else {
2906
- const O = p.get(A.field);
2907
- if (O === void 0)
2908
- return;
2909
- const K = A.sticky;
2910
- K === "left" && R.push(O), K === "right" && T.push(O);
2944
+ const O = k.get(L.field);
2945
+ if (O === void 0) return;
2946
+ const H = L.sticky;
2947
+ H === "left" && p.push(O), H === "right" && A.push(O);
2911
2948
  }
2912
2949
  }), {
2913
- left: [...new Set(R)].sort((A, O) => A - O),
2914
- right: [...new Set(T)].sort((A, O) => O - A)
2950
+ left: [...new Set(p)].sort((L, O) => L - O),
2951
+ right: [...new Set(A)].sort((L, O) => O - L)
2915
2952
  };
2916
- }, f = (b, p, x) => {
2917
- const R = /* @__PURE__ */ new Map();
2918
- let T = 0;
2919
- return p.forEach((B) => {
2920
- R.set(B, T);
2921
- const A = b[B];
2922
- A && (T += A.offsetWidth);
2923
- }), R;
2924
- }, d = (b) => {
2925
- const p = /* @__PURE__ */ new Map(), x = /* @__PURE__ */ new Map();
2926
- return b.forEach((R) => {
2927
- R.children?.length && (p.set(R.label, R.children[0]?.field), x.set(R.label, R.children[R.children.length - 1]?.field));
2928
- }), { firstChild: p, lastChild: x };
2929
- }, h = (b, p, x, R) => {
2930
- if (b) {
2931
- if (b.startsWith("group-")) {
2932
- const T = b.replace(/^group-/, "");
2933
- if (R === "left") {
2934
- const B = x.firstChild.get(T);
2935
- return B ? p.get(B) : void 0;
2953
+ }, f = (S, k) => {
2954
+ const w = /* @__PURE__ */ new Map();
2955
+ let p = 0;
2956
+ return k.forEach((A) => {
2957
+ w.set(A, p);
2958
+ const P = S[A];
2959
+ P && (p += P.offsetWidth);
2960
+ }), w;
2961
+ }, h = (S) => {
2962
+ const k = /* @__PURE__ */ new Map(), w = /* @__PURE__ */ new Map();
2963
+ return S.forEach((p) => {
2964
+ p.children?.length && (k.set(p.label, p.children[0]?.field), w.set(p.label, p.children[p.children.length - 1]?.field));
2965
+ }), { firstChild: k, lastChild: w };
2966
+ }, c = (S, k, w, p) => {
2967
+ if (S) {
2968
+ if (S.startsWith("group-")) {
2969
+ const A = S.replace(/^group-/, "");
2970
+ if (p === "left") {
2971
+ const P = w.firstChild.get(A);
2972
+ return P ? k.get(P) : void 0;
2936
2973
  } else {
2937
- const B = x.lastChild.get(T);
2938
- return B ? p.get(B) : void 0;
2974
+ const P = w.lastChild.get(A);
2975
+ return P ? k.get(P) : void 0;
2939
2976
  }
2940
2977
  }
2941
- return p.get(b);
2978
+ return k.get(S);
2942
2979
  }
2943
- }, g = (b) => {
2944
- b.forEach((p) => {
2945
- Array.from(p.children).forEach((R) => {
2946
- 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");
2980
+ }, g = (S) => {
2981
+ S.forEach((k) => {
2982
+ Array.from(k.children).forEach((p) => {
2983
+ p.style.position = "", p.style.left = "", p.style.right = "", p.style.zIndex = "", p.style.background = "", p.style.minWidth = "", p.style.width = "", p.classList.remove("vs-sticky-left", "vs-sticky-right");
2947
2984
  });
2948
2985
  });
2949
- }, C = (b, p, x, R, T, B) => {
2986
+ }, C = (S, k, w, p, A, P) => {
2950
2987
  if (!l) {
2951
2988
  l = !0;
2952
2989
  try {
2953
- b.forEach((A) => {
2954
- const O = Array.from(A.children), K = A.closest("thead") !== null;
2955
- O.forEach((q) => {
2956
- const W = q.getAttribute("data-field");
2957
- if (!W)
2958
- return;
2959
- const N = h(W, T, B, R);
2960
- if (N === void 0 || !p.includes(N))
2961
- return;
2962
- const D = x.get(N) || 0, ve = K ? "4" : "3";
2963
- 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)";
2990
+ S.forEach((L) => {
2991
+ const O = Array.from(L.children), H = L.closest("thead") !== null;
2992
+ O.forEach((M) => {
2993
+ const N = M.getAttribute("data-field");
2994
+ if (!N) return;
2995
+ const K = c(
2996
+ N,
2997
+ A,
2998
+ P,
2999
+ p
3000
+ );
3001
+ if (K === void 0 || !k.includes(K)) return;
3002
+ const I = w.get(K) || 0, ve = H ? "4" : "3";
3003
+ M.style.position = "sticky", M.style[p] = `${I}px`, M.style.zIndex = ve, M.classList.add(`vs-sticky-${p}`), M.style.background = "var(--vs-table-bg, #fff)";
2964
3004
  });
2965
3005
  });
2966
3006
  } finally {
2967
3007
  l = !1;
2968
3008
  }
2969
3009
  }
2970
- }, S = async () => {
2971
- if (l)
2972
- return;
2973
- const b = r();
2974
- if (!b.length)
2975
- return;
2976
- const p = i(b);
2977
- if (!p.length)
2978
- return;
2979
- const x = c(p), R = u(x), T = m(x, R, n.value);
2980
- if (g(b), T.left.length > 0 || T.right.length > 0) {
2981
- const B = f(x, T.left), A = f(x, T.right), O = d(n.value);
2982
- C(b, T.left, B, "left", R, O), C(b, T.right, A, "right", R, O);
3010
+ }, R = async () => {
3011
+ if (l) return;
3012
+ const S = r();
3013
+ if (!S.length) return;
3014
+ const k = i(S);
3015
+ if (!k.length) return;
3016
+ const w = u(k);
3017
+ if (w.length === 1 || k[0]?.querySelector(".vs-no-data") != null) return;
3018
+ const A = d(w), P = m(w, A, n.value);
3019
+ if (g(S), P.left.length > 0 || P.right.length > 0) {
3020
+ const L = f(w, P.left), O = f(w, P.right), H = h(n.value);
3021
+ C(
3022
+ S,
3023
+ P.left,
3024
+ L,
3025
+ "left",
3026
+ A,
3027
+ H
3028
+ ), C(
3029
+ S,
3030
+ P.right,
3031
+ O,
3032
+ "right",
3033
+ A,
3034
+ H
3035
+ );
2983
3036
  }
2984
3037
  a();
2985
3038
  }, E = async () => {
2986
3039
  l || (await oe(), setTimeout(() => {
2987
3040
  try {
2988
- S();
2989
- } catch (b) {
2990
- console.warn("[useStickyColumns] refreshSticky failed:", b);
3041
+ R();
3042
+ } catch (S) {
3043
+ console.warn("[useStickyColumns] refreshSticky failed:", S);
2991
3044
  }
2992
3045
  }, 150));
2993
3046
  }, V = () => {
2994
3047
  e.value?.parentElement?.addEventListener("scroll", a), a();
2995
- }, L = () => {
3048
+ }, T = () => {
2996
3049
  e.value?.parentElement?.removeEventListener("scroll", a);
2997
3050
  };
2998
3051
  Re(async () => {
2999
3052
  await oe(), setTimeout(() => {
3000
3053
  E();
3001
3054
  }, 300), V();
3002
- }), He(L);
3003
- let M = null;
3004
- return Y([n, t], () => {
3005
- M && clearTimeout(M), M = setTimeout(() => {
3006
- E();
3007
- }, 100);
3008
- }, { deep: !0 }), { hasLeftShadow: o, hasRightShadow: s, refreshSticky: E };
3055
+ }), He(T);
3056
+ let W = null;
3057
+ return Y(
3058
+ [n, t],
3059
+ () => {
3060
+ W && clearTimeout(W), W = setTimeout(() => {
3061
+ E();
3062
+ }, 100);
3063
+ },
3064
+ { deep: !0 }
3065
+ ), { hasLeftShadow: o, hasRightShadow: s, refreshSticky: E };
3009
3066
  }
3010
- function Ns(e, n) {
3067
+ function Ws(e, n) {
3011
3068
  let t = null, o = null;
3012
3069
  const s = () => {
3013
3070
  const a = e.value;
@@ -3065,7 +3122,7 @@ const Ks = { class: "vs-datatable" }, zs = {
3065
3122
  },
3066
3123
  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"],
3067
3124
  setup(e, { expose: n, emit: t }) {
3068
- const o = e, s = yt(o.rows);
3125
+ const o = e, s = gt(o.rows);
3069
3126
  Y(
3070
3127
  () => o.rows,
3071
3128
  (ee) => {
@@ -3073,27 +3130,27 @@ const Ks = { class: "vs-datatable" }, zs = {
3073
3130
  },
3074
3131
  { deep: !1 }
3075
3132
  );
3076
- const l = t, a = qt(), r = F(() => !!a.onRowClick), i = I(), c = I(), {
3077
- page: u,
3133
+ const l = t, a = It(), r = F(() => !!a.onRowClick), i = q(), u = q(), {
3134
+ page: d,
3078
3135
  rowsPerPage: v,
3079
3136
  totalRecords: m,
3080
3137
  recordRange: f,
3081
- handlePageChange: d,
3082
- handleRowsPerPage: h,
3138
+ handlePageChange: h,
3139
+ handleRowsPerPage: c,
3083
3140
  paginatedRows: g,
3084
3141
  sortHelpers: C,
3085
- searchQuery: S,
3142
+ searchQuery: R,
3086
3143
  onInputTyped: E,
3087
3144
  isRowExpanded: V,
3088
- toggleRowExpansion: L,
3089
- setRowLoading: M,
3090
- isRowLoading: b,
3091
- filters: p,
3092
- setFilter: x,
3093
- clearFilter: R,
3094
- tableRef: T,
3095
- tableContainer: B,
3096
- tableResponsiveRef: A,
3145
+ toggleRowExpansion: T,
3146
+ setRowLoading: W,
3147
+ isRowLoading: S,
3148
+ filters: k,
3149
+ setFilter: w,
3150
+ clearFilter: p,
3151
+ tableRef: A,
3152
+ tableContainer: P,
3153
+ tableResponsiveRef: L,
3097
3154
  refresh: O
3098
3155
  } = Bs(
3099
3156
  o,
@@ -3101,19 +3158,19 @@ const Ks = { class: "vs-datatable" }, zs = {
3101
3158
  { header: o.stickyHeader, footer: o.stickyFooter },
3102
3159
  s
3103
3160
  ), {
3104
- selectedItems: K,
3105
- isItemSelectedControlled: q,
3106
- isAllChecked: W,
3107
- isSomeChecked: N,
3108
- toggleAll: D,
3161
+ selectedItems: H,
3162
+ isItemSelectedControlled: M,
3163
+ isAllChecked: N,
3164
+ isSomeChecked: K,
3165
+ toggleAll: I,
3109
3166
  toggleRow: ve
3110
3167
  } = Hs(o, l), Ze = F(
3111
- () => Ht(o.columns, q.value, o.expandable)
3112
- ), { hasLeftShadow: Lt, hasRightShadow: Pt, refreshSticky: $e } = Ws(
3113
- T,
3168
+ () => Bt(o.columns, M.value, o.expandable)
3169
+ ), { hasLeftShadow: Vt, hasRightShadow: Lt, refreshSticky: $e } = Ns(
3170
+ A,
3114
3171
  F(() => o.columns)
3115
3172
  );
3116
- return Ns(T, $e), Y(
3173
+ return Ws(A, $e), Y(
3117
3174
  () => g.value,
3118
3175
  () => {
3119
3176
  oe(() => {
@@ -3130,8 +3187,8 @@ const Ks = { class: "vs-datatable" }, zs = {
3130
3187
  },
3131
3188
  { deep: !0 }
3132
3189
  ), n({
3133
- toggleRowExpansion: L,
3134
- setRowLoading: M,
3190
+ toggleRowExpansion: T,
3191
+ setRowLoading: W,
3135
3192
  refreshSticky: $e
3136
3193
  }), Re(async () => {
3137
3194
  setTimeout(() => {
@@ -3142,15 +3199,15 @@ const Ks = { class: "vs-datatable" }, zs = {
3142
3199
  } catch (ee) {
3143
3200
  l("dataError", ee);
3144
3201
  }
3145
- }), pt(() => {
3202
+ }), mt(() => {
3146
3203
  l("tableUnmounted");
3147
- }), Mt(() => {
3204
+ }), qt(() => {
3148
3205
  l("tableBeforeMount");
3149
- }), (ee, U) => (y(), k("div", Ks, [
3206
+ }), (ee, U) => (y(), x("div", Ks, [
3150
3207
  ne(Cs, {
3151
3208
  "show-search": e.showSearch,
3152
- "search-query": $(S),
3153
- "onUpdate:searchQuery": U[0] || (U[0] = (Z) => Fe(S) ? S.value = Z : null),
3209
+ "search-query": $(R),
3210
+ "onUpdate:searchQuery": U[0] || (U[0] = (Z) => Fe(R) ? R.value = Z : null),
3154
3211
  onSearch: $(E),
3155
3212
  "search-placeholder": e.searchPlaceholder,
3156
3213
  "search-class": e.searchClass
@@ -3163,25 +3220,25 @@ const Ks = { class: "vs-datatable" }, zs = {
3163
3220
  ]),
3164
3221
  _: 3
3165
3222
  }, 8, ["show-search", "search-query", "onSearch", "search-placeholder", "search-class"]),
3166
- w("div", {
3223
+ b("div", {
3167
3224
  ref_key: "tableContainer",
3168
- ref: B,
3225
+ ref: P,
3169
3226
  class: G(["vs-table-container vs-position-relative vs-overflow-auto", [
3170
3227
  e.containerClass,
3171
3228
  {
3172
- "has-left-shadow": $(Lt),
3173
- "has-right-shadow": $(Pt)
3229
+ "has-left-shadow": $(Vt),
3230
+ "has-right-shadow": $(Lt)
3174
3231
  }
3175
3232
  ]])
3176
3233
  }, [
3177
- w("div", {
3234
+ b("div", {
3178
3235
  ref_key: "tableResponsiveRef",
3179
- ref: A,
3236
+ ref: L,
3180
3237
  class: G(["vs-table-wrapper", { "vs-sticky-header-wrapper": e.stickyHeader }])
3181
3238
  }, [
3182
- w("table", {
3239
+ b("table", {
3183
3240
  ref_key: "tableRef",
3184
- ref: T,
3241
+ ref: A,
3185
3242
  class: G(["vs-table", e.tableClass])
3186
3243
  }, [
3187
3244
  ne(Xo, {
@@ -3189,21 +3246,21 @@ const Ks = { class: "vs-datatable" }, zs = {
3189
3246
  ref: i,
3190
3247
  columns: e.columns,
3191
3248
  expandable: e.expandable,
3192
- "is-item-selected-controlled": $(q),
3193
- "is-all-checked": $(W),
3194
- "is-some-checked": $(N),
3249
+ "is-item-selected-controlled": $(M),
3250
+ "is-all-checked": $(N),
3251
+ "is-some-checked": $(K),
3195
3252
  tablename: e.tablename,
3196
3253
  "sort-helpers": $(C),
3197
- filters: $(p),
3198
- "onUpdate:filters": U[1] || (U[1] = (Z) => Fe(p) ? p.value = Z : null),
3254
+ filters: $(k),
3255
+ "onUpdate:filters": U[1] || (U[1] = (Z) => Fe(k) ? k.value = Z : null),
3199
3256
  rows: e.rows,
3200
3257
  "header-class": e.headerClass,
3201
- onToggleAll: $(D),
3258
+ onToggleAll: $(I),
3202
3259
  onApplyFilter: U[2] || (U[2] = (Z, de) => {
3203
- $(x)(Z, de), u.value = 1;
3260
+ $(w)(Z, de), d.value = 1;
3204
3261
  }),
3205
3262
  onClearFilter: U[3] || (U[3] = (Z) => {
3206
- $(R)(Z), u.value = 1;
3263
+ $(p)(Z), d.value = 1;
3207
3264
  })
3208
3265
  }, Te({ _: 2 }, [
3209
3266
  Q(ee.$slots, (Z, de) => ({
@@ -3215,7 +3272,7 @@ const Ks = { class: "vs-datatable" }, zs = {
3215
3272
  ]), 1032, ["columns", "expandable", "is-item-selected-controlled", "is-all-checked", "is-some-checked", "tablename", "sort-helpers", "filters", "rows", "header-class", "onToggleAll"]),
3216
3273
  ne(vs, {
3217
3274
  ref_key: "bodyRef",
3218
- ref: c,
3275
+ ref: u,
3219
3276
  loading: e.loading,
3220
3277
  "loading-text": e.loadingText,
3221
3278
  "no-data-text": e.noDataText,
@@ -3223,8 +3280,8 @@ const Ks = { class: "vs-datatable" }, zs = {
3223
3280
  "paginated-rows": $(g),
3224
3281
  "total-columns": Ze.value,
3225
3282
  expandable: e.expandable,
3226
- "is-item-selected-controlled": $(q),
3227
- "selected-items": $(K),
3283
+ "is-item-selected-controlled": $(M),
3284
+ "selected-items": $(H),
3228
3285
  tablename: e.tablename,
3229
3286
  columns: e.columns,
3230
3287
  "row-key": e.rowKey,
@@ -3232,12 +3289,12 @@ const Ks = { class: "vs-datatable" }, zs = {
3232
3289
  "cell-class": e.cellClass,
3233
3290
  "has-row-click": r.value,
3234
3291
  "get-row-key": $(re),
3235
- "get-value": $(Bt),
3292
+ "get-value": $(Mt),
3236
3293
  "is-row-expanded": $(V),
3237
- "is-row-loading": $(b),
3238
- "toggle-row-expansion": $(L),
3294
+ "is-row-loading": $(S),
3295
+ "toggle-row-expansion": $(T),
3239
3296
  "toggle-row": $(ve),
3240
- "is-row-selected": $(wt),
3297
+ "is-row-selected": $(yt),
3241
3298
  onRowClick: U[4] || (U[4] = (Z, de) => ee.$emit("rowClick", Z, de))
3242
3299
  }, Te({ _: 2 }, [
3243
3300
  Q(ee.$slots, (Z, de) => ({
@@ -3252,32 +3309,32 @@ const Ks = { class: "vs-datatable" }, zs = {
3252
3309
  columns: e.columns,
3253
3310
  rows: $(g),
3254
3311
  expandable: e.expandable,
3255
- "is-item-selected-controlled": $(q)
3256
- }, null, 8, ["columns", "rows", "expandable", "is-item-selected-controlled"])) : P("", !0)
3312
+ "is-item-selected-controlled": $(M)
3313
+ }, null, 8, ["columns", "rows", "expandable", "is-item-selected-controlled"])) : D("", !0)
3257
3314
  ], 2)
3258
3315
  ], 2)
3259
3316
  ], 2),
3260
- e.showPagination ? (y(), k("div", zs, [
3261
- w("div", js, [
3262
- ne(on, {
3317
+ e.showPagination ? (y(), x("div", zs, [
3318
+ b("div", js, [
3319
+ ne(nn, {
3263
3320
  modelValue: $(v),
3264
3321
  "onUpdate:modelValue": U[5] || (U[5] = (Z) => Fe(v) ? v.value = Z : null),
3265
- onRowsPerPageChanged: $(h)
3322
+ onRowsPerPageChanged: $(c)
3266
3323
  }, null, 8, ["modelValue", "onRowsPerPageChanged"]),
3267
- U[7] || (U[7] = w("div", { class: "vs-divider" }, null, -1)),
3268
- w("div", Us, H($(f).start < 1 ? 0 : $(f).start) + " - " + H($(f).end) + " of " + H($(m)) + " " + H(e.entriesText), 1)
3324
+ U[7] || (U[7] = b("div", { class: "vs-divider" }, null, -1)),
3325
+ b("div", Us, B($(f).start < 1 ? 0 : $(f).start) + " - " + B($(f).end) + " of " + B($(m)) + " " + B(e.entriesText), 1)
3269
3326
  ]),
3270
- ne(Jt, {
3271
- modelValue: $(u),
3272
- "onUpdate:modelValue": U[6] || (U[6] = (Z) => Fe(u) ? u.value = Z : null),
3327
+ ne(Gt, {
3328
+ modelValue: $(d),
3329
+ "onUpdate:modelValue": U[6] || (U[6] = (Z) => Fe(d) ? d.value = Z : null),
3273
3330
  totalRecords: $(m),
3274
3331
  rowsPerPage: $(v),
3275
3332
  maxVisible: e.maxVisiblePages,
3276
3333
  tablename: e.tablename,
3277
3334
  class: G(e.paginationClass),
3278
- onPageChanged: $(d)
3335
+ onPageChanged: $(h)
3279
3336
  }, null, 8, ["modelValue", "totalRecords", "rowsPerPage", "maxVisible", "tablename", "class", "onPageChanged"])
3280
- ])) : P("", !0)
3337
+ ])) : D("", !0)
3281
3338
  ]));
3282
3339
  }
3283
3340
  }), Xs = /* @__PURE__ */ ae(Zs, [["__scopeId", "data-v-397a4bba"]]), Ys = {