vs-datatable 1.0.0 → 1.1.1

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,16 +1,16 @@
1
- import { defineComponent as fe, computed as E, createElementBlock as y, openBlock as g, createElementVNode as h, createCommentVNode as D, Fragment as H, renderList as te, normalizeClass as W, toDisplayString as F, unref as x, mergeProps as xt, renderSlot as ee, ref as _, watch as ne, createVNode as ie, withModifiers as ae, withCtx as se, withDirectives as U, vModelText as oe, nextTick as Ct, onMounted as lt, onUnmounted as at, createBlock as ve, Teleport as kt, Transition as Rt, vModelSelect as qe, useAttrs as St, onBeforeMount as Ot, isRef as Ie, normalizeStyle as Vt, createSlots as Tt, createTextVNode as Ze } from "vue";
2
- import './index.css';function Xe(e, t) {
1
+ import { defineComponent as _, computed as T, createElementBlock as w, openBlock as h, createElementVNode as g, createCommentVNode as P, Fragment as K, renderList as j, normalizeClass as W, toDisplayString as D, unref as R, mergeProps as xt, renderSlot as N, ref as L, watch as G, createVNode as X, withModifiers as le, withCtx as H, withDirectives as U, vModelText as oe, nextTick as Ct, onMounted as st, onUnmounted as lt, createBlock as de, Teleport as kt, Transition as Rt, vModelSelect as Me, normalizeStyle as St, createSlots as Ie, createTextVNode as je, isRef as ye, shallowRef as at, useAttrs as Tt, onBeforeMount as $t, normalizeProps as ze, guardReactiveProps as Ze } from "vue";
2
+ import './index.css';function Vt(e, t) {
3
3
  return t.split(".").reduce((n, o) => n?.[o], e) ?? "";
4
4
  }
5
- function M(e, t, n = "id") {
5
+ function Q(e, t, n = "id") {
6
6
  return typeof n == "function" ? n(e, t) : e[n] || t;
7
7
  }
8
8
  function rt(e, t, n = "id") {
9
9
  return t.some(
10
- (o) => M(o, -1, n) === M(e, -1, n)
10
+ (o) => Q(o, -1, n) === Q(e, -1, n)
11
11
  );
12
12
  }
13
- function Et(e, t, n) {
13
+ function Ot(e, t, n) {
14
14
  return e.length + (t ? 1 : 0) + (n ? 1 : 0);
15
15
  }
16
16
  function At(e, t) {
@@ -18,39 +18,39 @@ function At(e, t) {
18
18
  const n = (o, s) => s.split(".").reduce((l, a) => l?.[a], o) ?? "";
19
19
  return [...e].sort((o, s) => {
20
20
  for (const { field: l, order: a } of t) {
21
- const r = n(o, l), i = n(s, l);
22
- if (r !== i)
23
- return a === "asc" ? r > i ? 1 : -1 : r < i ? 1 : -1;
21
+ const r = n(o, l), u = n(s, l);
22
+ if (r !== u)
23
+ return a === "asc" ? r > u ? 1 : -1 : r < u ? 1 : -1;
24
24
  }
25
25
  return 0;
26
26
  });
27
27
  }
28
- function Pt(e, t, n) {
28
+ function Et(e, t, n) {
29
29
  if (!n) return e;
30
30
  const o = (t - 1) * n, s = o + n;
31
31
  return e.slice(o, s);
32
32
  }
33
- function Lt(e, t, n) {
33
+ function Pt(e, t, n) {
34
34
  const o = (e - 1) * t + 1, s = Math.min(e * t, n);
35
35
  return { start: o, end: s };
36
36
  }
37
37
  function it(e, t) {
38
38
  return Math.ceil(e / t);
39
39
  }
40
- function Ye(e, t, n) {
40
+ function Qe(e, t, n) {
41
41
  if (!t || t.trim() === "") return e;
42
42
  const o = t.toLowerCase();
43
43
  return e.filter((s) => Object.values(s).some(
44
44
  (l) => String(l ?? "").toLowerCase().includes(o)
45
45
  ));
46
46
  }
47
- const $t = ["id"], Dt = ["disabled"], Ft = {
47
+ const Dt = ["id"], Lt = ["disabled"], Ft = {
48
48
  key: 1,
49
49
  class: "vs-pagination-ellipsis"
50
- }, _t = ["id", "onClick"], Mt = {
50
+ }, Bt = ["id", "onClick"], Mt = {
51
51
  key: 2,
52
52
  class: "vs-pagination-ellipsis"
53
- }, Nt = ["disabled"], Bt = /* @__PURE__ */ fe({
53
+ }, Nt = ["disabled"], It = /* @__PURE__ */ _({
54
54
  __name: "VsPagination",
55
55
  props: {
56
56
  modelValue: {},
@@ -62,104 +62,71 @@ const $t = ["id"], Dt = ["disabled"], Ft = {
62
62
  },
63
63
  emits: ["update:modelValue", "pageChanged"],
64
64
  setup(e, { emit: t }) {
65
- const n = e, o = t, s = n.maxVisible ?? 3, l = E({
65
+ const n = e, o = t, s = n.maxVisible ?? 3, l = T({
66
66
  get: () => n.modelValue,
67
67
  set: (v) => {
68
68
  o("update:modelValue", v), o("pageChanged", v);
69
69
  }
70
- }), a = E(() => 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 = E(() => Math.min(a.value + s - 1, i.value)), i = E(() => it(n.totalRecords, n.rowsPerPage)), f = E(() => {
70
+ }), a = T(() => l.value <= Math.floor(s / 2) ? 1 : l.value >= u.value - Math.floor(s / 2) ? Math.max(u.value - s + 1, 1) : l.value - Math.floor(s / 2)), r = T(() => Math.min(a.value + s - 1, u.value)), u = T(() => it(n.totalRecords, n.rowsPerPage)), c = T(() => {
71
71
  const v = [];
72
- for (let u = a.value; u <= r.value; u++)
73
- v.push(u);
72
+ for (let d = a.value; d <= r.value; d++)
73
+ v.push(d);
74
74
  return v;
75
- }), d = (v) => {
76
- v >= 1 && v <= i.value && (l.value = v);
77
- }, c = () => {
75
+ }), f = (v) => {
76
+ v >= 1 && v <= u.value && (l.value = v);
77
+ }, i = () => {
78
78
  l.value > 1 && l.value--;
79
- }, p = () => {
80
- l.value < i.value && l.value++;
79
+ }, m = () => {
80
+ l.value < u.value && l.value++;
81
81
  };
82
- return (v, u) => (g(), y("div", {
82
+ return (v, d) => (h(), w("div", {
83
83
  class: "vs-pagination",
84
84
  id: e.tablename + "-pagination"
85
85
  }, [
86
- h("button", {
87
- onClick: c,
86
+ g("button", {
87
+ onClick: i,
88
88
  type: "button",
89
89
  class: "vs-pagination-button vs-pagination-nav",
90
90
  disabled: l.value === 1
91
- }, " ‹‹ ", 8, Dt),
92
- a.value > 1 ? (g(), y("button", {
91
+ }, " ‹‹ ", 8, Lt),
92
+ a.value > 1 ? (h(), w("button", {
93
93
  key: 0,
94
94
  type: "button",
95
95
  class: "vs-pagination-button",
96
- onClick: u[0] || (u[0] = (m) => d(1))
97
- }, " 1 ")) : D("", !0),
98
- a.value > 2 ? (g(), y("span", Ft, "...")) : D("", !0),
99
- (g(!0), y(H, null, te(f.value, (m) => (g(), y("button", {
100
- key: m,
96
+ onClick: d[0] || (d[0] = (p) => f(1))
97
+ }, " 1 ")) : P("", !0),
98
+ a.value > 2 ? (h(), w("span", Ft, "...")) : P("", !0),
99
+ (h(!0), w(K, null, j(c.value, (p) => (h(), w("button", {
100
+ key: p,
101
101
  type: "button",
102
102
  class: W([
103
103
  "vs-pagination-button",
104
- { "vs-active": l.value === m }
104
+ { "vs-active": l.value === p }
105
105
  ]),
106
- id: e.tablename + "-page-" + m,
107
- onClick: (C) => d(m)
108
- }, F(m), 11, _t))), 128)),
109
- r.value < i.value - 1 ? (g(), y("span", Mt, "...")) : D("", !0),
110
- r.value < i.value ? (g(), y("button", {
106
+ id: e.tablename + "-page-" + p,
107
+ onClick: (b) => f(p)
108
+ }, D(p), 11, Bt))), 128)),
109
+ r.value < u.value - 1 ? (h(), w("span", Mt, "...")) : P("", !0),
110
+ r.value < u.value ? (h(), w("button", {
111
111
  key: 3,
112
112
  type: "button",
113
113
  class: "vs-pagination-button",
114
- onClick: u[1] || (u[1] = (m) => d(i.value))
115
- }, F(i.value), 1)) : D("", !0),
116
- h("button", {
117
- onClick: p,
114
+ onClick: d[1] || (d[1] = (p) => f(u.value))
115
+ }, D(u.value), 1)) : P("", !0),
116
+ g("button", {
117
+ onClick: m,
118
118
  type: "button",
119
119
  class: "vs-pagination-button vs-pagination-nav",
120
- disabled: l.value === i.value
120
+ disabled: l.value === u.value
121
121
  }, " ›› ", 8, Nt)
122
- ], 8, $t));
122
+ ], 8, Dt));
123
123
  }
124
- }), ye = (e, t) => {
124
+ }), ne = (e, t) => {
125
125
  const n = e.__vccOpts || e;
126
126
  for (const [o, s] of t)
127
127
  n[o] = s;
128
128
  return n;
129
- }, qt = /* @__PURE__ */ ye(Bt, [["__scopeId", "data-v-b327b254"]]), It = { class: "vs-search" }, Wt = ["placeholder", "value"], Ht = /* @__PURE__ */ fe({
130
- __name: "VsSearch",
131
- props: {
132
- modelValue: {},
133
- placeholder: {}
134
- },
135
- emits: ["update:modelValue", "inputTyped"],
136
- setup(e, { emit: t }) {
137
- const n = t, o = (s) => {
138
- const l = s.target;
139
- n("update:modelValue", l.value), n("inputTyped", l.value);
140
- };
141
- return (s, l) => (g(), y("div", It, [
142
- l[0] || (l[0] = h("div", { class: "vs-search-icon" }, [
143
- h("svg", {
144
- xmlns: "http://www.w3.org/2000/svg",
145
- height: "22px",
146
- viewBox: "0 -960 960 960",
147
- width: "22px",
148
- fill: "#e3e3e3"
149
- }, [
150
- h("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" })
151
- ])
152
- ], -1)),
153
- h("input", {
154
- type: "text",
155
- class: "vs-search-input",
156
- placeholder: e.placeholder,
157
- value: e.modelValue,
158
- onInput: o
159
- }, null, 40, Wt)
160
- ]));
161
- }
162
- }), Kt = /* @__PURE__ */ ye(Ht, [["__scopeId", "data-v-60b73b45"]]), Ut = { class: "vs-rows-per-page" }, jt = ["value"], zt = ["value"], Zt = /* @__PURE__ */ fe({
129
+ }, qt = /* @__PURE__ */ ne(It, [["__scopeId", "data-v-b327b254"]]), Ht = { class: "vs-rows-per-page" }, Kt = ["value"], Wt = ["value"], Ut = /* @__PURE__ */ _({
163
130
  __name: "VsRowsPerPage",
164
131
  props: {
165
132
  modelValue: {},
@@ -171,42 +138,42 @@ const $t = ["id"], Dt = ["disabled"], Ft = {
171
138
  const r = Number(a.target.value);
172
139
  o("update:modelValue", r), o("rowsPerPageChanged", r);
173
140
  };
174
- return (a, r) => (g(), y("div", Ut, [
175
- r[0] || (r[0] = h("span", { class: "vs-rows-label" }, "Items Per Page", -1)),
176
- h("select", {
141
+ return (a, r) => (h(), w("div", Ht, [
142
+ r[0] || (r[0] = g("span", { class: "vs-rows-label" }, "Items Per Page", -1)),
143
+ g("select", {
177
144
  class: "vs-items-dropdown",
178
145
  value: e.modelValue,
179
146
  onChange: l
180
147
  }, [
181
- (g(!0), y(H, null, te(x(s), (i) => (g(), y("option", {
182
- key: i,
183
- value: i
184
- }, F(i), 9, zt))), 128))
185
- ], 40, jt)
148
+ (h(!0), w(K, null, j(R(s), (u) => (h(), w("option", {
149
+ key: u,
150
+ value: u
151
+ }, D(u), 9, Wt))), 128))
152
+ ], 40, Kt)
186
153
  ]));
187
154
  }
188
- }), Xt = /* @__PURE__ */ ye(Zt, [["__scopeId", "data-v-0c2bdd9c"]]), Te = Math.min, ue = Math.max, Ee = Math.round, Oe = Math.floor, Y = (e) => ({
155
+ }), jt = /* @__PURE__ */ ne(Ut, [["__scopeId", "data-v-0c2bdd9c"]]), Te = Math.min, re = Math.max, $e = Math.round, Re = Math.floor, Y = (e) => ({
189
156
  x: e,
190
157
  y: e
191
- }), Yt = {
158
+ }), zt = {
192
159
  left: "right",
193
160
  right: "left",
194
161
  bottom: "top",
195
162
  top: "bottom"
196
- }, Qt = {
163
+ }, Zt = {
197
164
  start: "end",
198
165
  end: "start"
199
166
  };
200
- function Qe(e, t, n) {
201
- return ue(e, Te(t, n));
167
+ function Xe(e, t, n) {
168
+ return re(e, Te(t, n));
202
169
  }
203
- function $e(e, t) {
170
+ function Ee(e, t) {
204
171
  return typeof e == "function" ? e(t) : e;
205
172
  }
206
- function ce(e) {
173
+ function ie(e) {
207
174
  return e.split("-")[0];
208
175
  }
209
- function De(e) {
176
+ function Pe(e) {
210
177
  return e.split("-")[1];
211
178
  }
212
179
  function ut(e) {
@@ -215,48 +182,48 @@ function ut(e) {
215
182
  function ct(e) {
216
183
  return e === "y" ? "height" : "width";
217
184
  }
218
- const Gt = /* @__PURE__ */ new Set(["top", "bottom"]);
219
- function le(e) {
220
- return Gt.has(ce(e)) ? "y" : "x";
185
+ const Qt = /* @__PURE__ */ new Set(["top", "bottom"]);
186
+ function se(e) {
187
+ return Qt.has(ie(e)) ? "y" : "x";
221
188
  }
222
189
  function dt(e) {
223
- return ut(le(e));
190
+ return ut(se(e));
224
191
  }
225
- function Jt(e, t, n) {
192
+ function Xt(e, t, n) {
226
193
  n === void 0 && (n = !1);
227
- const o = De(e), s = dt(e), l = ct(s);
194
+ const o = Pe(e), s = dt(e), l = ct(s);
228
195
  let a = s === "x" ? o === (n ? "end" : "start") ? "right" : "left" : o === "start" ? "bottom" : "top";
229
- return t.reference[l] > t.floating[l] && (a = Ae(a)), [a, Ae(a)];
196
+ return t.reference[l] > t.floating[l] && (a = Ve(a)), [a, Ve(a)];
230
197
  }
231
- function en(e) {
232
- const t = Ae(e);
233
- return [He(e), t, He(t)];
198
+ function Yt(e) {
199
+ const t = Ve(e);
200
+ return [qe(e), t, qe(t)];
234
201
  }
235
- function He(e) {
236
- return e.replace(/start|end/g, (t) => Qt[t]);
202
+ function qe(e) {
203
+ return e.replace(/start|end/g, (t) => Zt[t]);
237
204
  }
238
- const Ge = ["left", "right"], Je = ["right", "left"], tn = ["top", "bottom"], nn = ["bottom", "top"];
239
- function on(e, t, n) {
205
+ const Ye = ["left", "right"], Ge = ["right", "left"], Gt = ["top", "bottom"], Jt = ["bottom", "top"];
206
+ function _t(e, t, n) {
240
207
  switch (e) {
241
208
  case "top":
242
209
  case "bottom":
243
- return n ? t ? Je : Ge : t ? Ge : Je;
210
+ return n ? t ? Ge : Ye : t ? Ye : Ge;
244
211
  case "left":
245
212
  case "right":
246
- return t ? tn : nn;
213
+ return t ? Gt : Jt;
247
214
  default:
248
215
  return [];
249
216
  }
250
217
  }
251
- function sn(e, t, n, o) {
252
- const s = De(e);
253
- let l = on(ce(e), n === "start", o);
254
- return s && (l = l.map((a) => a + "-" + s), t && (l = l.concat(l.map(He)))), l;
218
+ function en(e, t, n, o) {
219
+ const s = Pe(e);
220
+ let l = _t(ie(e), n === "start", o);
221
+ return s && (l = l.map((a) => a + "-" + s), t && (l = l.concat(l.map(qe)))), l;
255
222
  }
256
- function Ae(e) {
257
- return e.replace(/left|right|bottom|top/g, (t) => Yt[t]);
223
+ function Ve(e) {
224
+ return e.replace(/left|right|bottom|top/g, (t) => zt[t]);
258
225
  }
259
- function ln(e) {
226
+ function tn(e) {
260
227
  return {
261
228
  top: 0,
262
229
  right: 0,
@@ -265,15 +232,15 @@ function ln(e) {
265
232
  ...e
266
233
  };
267
234
  }
268
- function an(e) {
269
- return typeof e != "number" ? ln(e) : {
235
+ function nn(e) {
236
+ return typeof e != "number" ? tn(e) : {
270
237
  top: e,
271
238
  right: e,
272
239
  bottom: e,
273
240
  left: e
274
241
  };
275
242
  }
276
- function Pe(e) {
243
+ function Oe(e) {
277
244
  const {
278
245
  x: t,
279
246
  y: n,
@@ -291,36 +258,36 @@ function Pe(e) {
291
258
  y: n
292
259
  };
293
260
  }
294
- function et(e, t, n) {
261
+ function Je(e, t, n) {
295
262
  let {
296
263
  reference: o,
297
264
  floating: s
298
265
  } = e;
299
- const l = le(t), a = dt(t), r = ct(a), i = ce(t), f = l === "y", d = o.x + o.width / 2 - s.width / 2, c = o.y + o.height / 2 - s.height / 2, p = o[r] / 2 - s[r] / 2;
266
+ const l = se(t), a = dt(t), r = ct(a), u = ie(t), c = l === "y", f = o.x + o.width / 2 - s.width / 2, i = o.y + o.height / 2 - s.height / 2, m = o[r] / 2 - s[r] / 2;
300
267
  let v;
301
- switch (i) {
268
+ switch (u) {
302
269
  case "top":
303
270
  v = {
304
- x: d,
271
+ x: f,
305
272
  y: o.y - s.height
306
273
  };
307
274
  break;
308
275
  case "bottom":
309
276
  v = {
310
- x: d,
277
+ x: f,
311
278
  y: o.y + o.height
312
279
  };
313
280
  break;
314
281
  case "right":
315
282
  v = {
316
283
  x: o.x + o.width,
317
- y: c
284
+ y: i
318
285
  };
319
286
  break;
320
287
  case "left":
321
288
  v = {
322
289
  x: o.x - s.width,
323
- y: c
290
+ y: i
324
291
  };
325
292
  break;
326
293
  default:
@@ -329,73 +296,73 @@ function et(e, t, n) {
329
296
  y: o.y
330
297
  };
331
298
  }
332
- switch (De(t)) {
299
+ switch (Pe(t)) {
333
300
  case "start":
334
- v[a] -= p * (n && f ? -1 : 1);
301
+ v[a] -= m * (n && c ? -1 : 1);
335
302
  break;
336
303
  case "end":
337
- v[a] += p * (n && f ? -1 : 1);
304
+ v[a] += m * (n && c ? -1 : 1);
338
305
  break;
339
306
  }
340
307
  return v;
341
308
  }
342
- const rn = async (e, t, n) => {
309
+ const on = async (e, t, n) => {
343
310
  const {
344
311
  placement: o = "bottom",
345
312
  strategy: s = "absolute",
346
313
  middleware: l = [],
347
314
  platform: a
348
- } = n, r = l.filter(Boolean), i = await (a.isRTL == null ? void 0 : a.isRTL(t));
349
- let f = await a.getElementRects({
315
+ } = n, r = l.filter(Boolean), u = await (a.isRTL == null ? void 0 : a.isRTL(t));
316
+ let c = await a.getElementRects({
350
317
  reference: e,
351
318
  floating: t,
352
319
  strategy: s
353
320
  }), {
354
- x: d,
355
- y: c
356
- } = et(f, o, i), p = o, v = {}, u = 0;
357
- for (let m = 0; m < r.length; m++) {
321
+ x: f,
322
+ y: i
323
+ } = Je(c, o, u), m = o, v = {}, d = 0;
324
+ for (let p = 0; p < r.length; p++) {
358
325
  const {
359
- name: C,
360
- fn: k
361
- } = r[m], {
362
- x: S,
363
- y: V,
364
- data: L,
326
+ name: b,
327
+ fn: C
328
+ } = r[p], {
329
+ x: k,
330
+ y: S,
331
+ data: O,
365
332
  reset: A
366
- } = await k({
367
- x: d,
368
- y: c,
333
+ } = await C({
334
+ x: f,
335
+ y: i,
369
336
  initialPlacement: o,
370
- placement: p,
337
+ placement: m,
371
338
  strategy: s,
372
339
  middlewareData: v,
373
- rects: f,
340
+ rects: c,
374
341
  platform: a,
375
342
  elements: {
376
343
  reference: e,
377
344
  floating: t
378
345
  }
379
346
  });
380
- d = S ?? d, c = V ?? c, v = {
347
+ f = k ?? f, i = S ?? i, v = {
381
348
  ...v,
382
- [C]: {
383
- ...v[C],
384
- ...L
349
+ [b]: {
350
+ ...v[b],
351
+ ...O
385
352
  }
386
- }, A && u <= 50 && (u++, typeof A == "object" && (A.placement && (p = A.placement), A.rects && (f = A.rects === !0 ? await a.getElementRects({
353
+ }, A && d <= 50 && (d++, typeof A == "object" && (A.placement && (m = A.placement), A.rects && (c = A.rects === !0 ? await a.getElementRects({
387
354
  reference: e,
388
355
  floating: t,
389
356
  strategy: s
390
357
  }) : A.rects), {
391
- x: d,
392
- y: c
393
- } = et(f, p, i)), m = -1);
358
+ x: f,
359
+ y: i
360
+ } = Je(c, m, u)), p = -1);
394
361
  }
395
362
  return {
396
- x: d,
397
- y: c,
398
- placement: p,
363
+ x: f,
364
+ y: i,
365
+ placement: m,
399
366
  strategy: s,
400
367
  middlewareData: v
401
368
  };
@@ -409,43 +376,43 @@ async function ft(e, t) {
409
376
  platform: l,
410
377
  rects: a,
411
378
  elements: r,
412
- strategy: i
379
+ strategy: u
413
380
  } = e, {
414
- boundary: f = "clippingAncestors",
415
- rootBoundary: d = "viewport",
416
- elementContext: c = "floating",
417
- altBoundary: p = !1,
381
+ boundary: c = "clippingAncestors",
382
+ rootBoundary: f = "viewport",
383
+ elementContext: i = "floating",
384
+ altBoundary: m = !1,
418
385
  padding: v = 0
419
- } = $e(t, e), u = an(v), C = r[p ? c === "floating" ? "reference" : "floating" : c], k = Pe(await l.getClippingRect({
420
- element: (n = await (l.isElement == null ? void 0 : l.isElement(C))) == null || n ? C : C.contextElement || await (l.getDocumentElement == null ? void 0 : l.getDocumentElement(r.floating)),
421
- boundary: f,
422
- rootBoundary: d,
423
- strategy: i
424
- })), S = c === "floating" ? {
386
+ } = Ee(t, e), d = nn(v), b = r[m ? i === "floating" ? "reference" : "floating" : i], C = Oe(await l.getClippingRect({
387
+ element: (n = await (l.isElement == null ? void 0 : l.isElement(b))) == null || n ? b : b.contextElement || await (l.getDocumentElement == null ? void 0 : l.getDocumentElement(r.floating)),
388
+ boundary: c,
389
+ rootBoundary: f,
390
+ strategy: u
391
+ })), k = i === "floating" ? {
425
392
  x: o,
426
393
  y: s,
427
394
  width: a.floating.width,
428
395
  height: a.floating.height
429
- } : a.reference, V = await (l.getOffsetParent == null ? void 0 : l.getOffsetParent(r.floating)), L = await (l.isElement == null ? void 0 : l.isElement(V)) ? await (l.getScale == null ? void 0 : l.getScale(V)) || {
396
+ } : a.reference, S = await (l.getOffsetParent == null ? void 0 : l.getOffsetParent(r.floating)), O = await (l.isElement == null ? void 0 : l.isElement(S)) ? await (l.getScale == null ? void 0 : l.getScale(S)) || {
430
397
  x: 1,
431
398
  y: 1
432
399
  } : {
433
400
  x: 1,
434
401
  y: 1
435
- }, A = Pe(l.convertOffsetParentRelativeRectToViewportRelativeRect ? await l.convertOffsetParentRelativeRectToViewportRelativeRect({
402
+ }, A = Oe(l.convertOffsetParentRelativeRectToViewportRelativeRect ? await l.convertOffsetParentRelativeRectToViewportRelativeRect({
436
403
  elements: r,
437
- rect: S,
438
- offsetParent: V,
439
- strategy: i
440
- }) : S);
404
+ rect: k,
405
+ offsetParent: S,
406
+ strategy: u
407
+ }) : k);
441
408
  return {
442
- top: (k.top - A.top + u.top) / L.y,
443
- bottom: (A.bottom - k.bottom + u.bottom) / L.y,
444
- left: (k.left - A.left + u.left) / L.x,
445
- right: (A.right - k.right + u.right) / L.x
409
+ top: (C.top - A.top + d.top) / O.y,
410
+ bottom: (A.bottom - C.bottom + d.bottom) / O.y,
411
+ left: (C.left - A.left + d.left) / O.x,
412
+ right: (A.right - C.right + d.right) / O.x
446
413
  };
447
414
  }
448
- const un = function(e) {
415
+ const sn = function(e) {
449
416
  return e === void 0 && (e = {}), {
450
417
  name: "flip",
451
418
  options: e,
@@ -456,105 +423,105 @@ const un = function(e) {
456
423
  middlewareData: l,
457
424
  rects: a,
458
425
  initialPlacement: r,
459
- platform: i,
460
- elements: f
426
+ platform: u,
427
+ elements: c
461
428
  } = t, {
462
- mainAxis: d = !0,
463
- crossAxis: c = !0,
464
- fallbackPlacements: p,
429
+ mainAxis: f = !0,
430
+ crossAxis: i = !0,
431
+ fallbackPlacements: m,
465
432
  fallbackStrategy: v = "bestFit",
466
- fallbackAxisSideDirection: u = "none",
467
- flipAlignment: m = !0,
468
- ...C
469
- } = $e(e, t);
433
+ fallbackAxisSideDirection: d = "none",
434
+ flipAlignment: p = !0,
435
+ ...b
436
+ } = Ee(e, t);
470
437
  if ((n = l.arrow) != null && n.alignmentOffset)
471
438
  return {};
472
- const k = ce(s), S = le(r), V = ce(r) === r, L = await (i.isRTL == null ? void 0 : i.isRTL(f.floating)), A = p || (V || !m ? [Ae(r)] : en(r)), N = u !== "none";
473
- !p && N && A.push(...sn(r, m, u, L));
474
- const P = [r, ...A], w = await ft(t, C), R = [];
475
- let Z = ((o = l.flip) == null ? void 0 : o.overflows) || [];
476
- if (d && R.push(w[k]), c) {
477
- const K = Jt(s, a, L);
478
- R.push(w[K[0]], w[K[1]]);
439
+ const C = ie(s), k = se(r), S = ie(r) === r, O = await (u.isRTL == null ? void 0 : u.isRTL(c.floating)), A = m || (S || !p ? [Ve(r)] : Yt(r)), M = d !== "none";
440
+ !m && M && A.push(...en(r, p, d, O));
441
+ const $ = [r, ...A], x = await ft(t, b), y = [];
442
+ let I = ((o = l.flip) == null ? void 0 : o.overflows) || [];
443
+ if (f && y.push(x[C]), i) {
444
+ const te = Xt(s, a, O);
445
+ y.push(x[te[0]], x[te[1]]);
479
446
  }
480
- if (Z = [...Z, {
447
+ if (I = [...I, {
481
448
  placement: s,
482
- overflows: R
483
- }], !R.every((K) => K <= 0)) {
484
- var Re, be;
485
- const K = (((Re = l.flip) == null ? void 0 : Re.index) || 0) + 1, xe = P[K];
486
- if (xe && (!(c === "alignment" ? S !== le(xe) : !1) || // We leave the current main axis only if every placement on that axis
449
+ overflows: y
450
+ }], !y.every((te) => te <= 0)) {
451
+ var ce, Ce;
452
+ const te = (((ce = l.flip) == null ? void 0 : ce.index) || 0) + 1, he = $[te];
453
+ if (he && (!(i === "alignment" ? k !== se(he) : !1) || // We leave the current main axis only if every placement on that axis
487
454
  // overflows the main axis.
488
- Z.every((B) => le(B.placement) === S ? B.overflows[0] > 0 : !0)))
455
+ I.every((V) => se(V.placement) === k ? V.overflows[0] > 0 : !0)))
489
456
  return {
490
457
  data: {
491
- index: K,
492
- overflows: Z
458
+ index: te,
459
+ overflows: I
493
460
  },
494
461
  reset: {
495
- placement: xe
462
+ placement: he
496
463
  }
497
464
  };
498
- let X = (be = Z.filter((J) => J.overflows[0] <= 0).sort((J, B) => J.overflows[1] - B.overflows[1])[0]) == null ? void 0 : be.placement;
499
- if (!X)
465
+ let B = (Ce = I.filter((E) => E.overflows[0] <= 0).sort((E, V) => E.overflows[1] - V.overflows[1])[0]) == null ? void 0 : Ce.placement;
466
+ if (!B)
500
467
  switch (v) {
501
468
  case "bestFit": {
502
- var Se;
503
- const J = (Se = Z.filter((B) => {
504
- if (N) {
505
- const $ = le(B.placement);
506
- return $ === S || // Create a bias to the `y` side axis due to horizontal
469
+ var ke;
470
+ const E = (ke = I.filter((V) => {
471
+ if (M) {
472
+ const F = se(V.placement);
473
+ return F === k || // Create a bias to the `y` side axis due to horizontal
507
474
  // reading directions favoring greater width.
508
- $ === "y";
475
+ F === "y";
509
476
  }
510
477
  return !0;
511
- }).map((B) => [B.placement, B.overflows.filter(($) => $ > 0).reduce(($, O) => $ + O, 0)]).sort((B, $) => B[1] - $[1])[0]) == null ? void 0 : Se[0];
512
- J && (X = J);
478
+ }).map((V) => [V.placement, V.overflows.filter((F) => F > 0).reduce((F, we) => F + we, 0)]).sort((V, F) => V[1] - F[1])[0]) == null ? void 0 : ke[0];
479
+ E && (B = E);
513
480
  break;
514
481
  }
515
482
  case "initialPlacement":
516
- X = r;
483
+ B = r;
517
484
  break;
518
485
  }
519
- if (s !== X)
486
+ if (s !== B)
520
487
  return {
521
488
  reset: {
522
- placement: X
489
+ placement: B
523
490
  }
524
491
  };
525
492
  }
526
493
  return {};
527
494
  }
528
495
  };
529
- }, cn = /* @__PURE__ */ new Set(["left", "top"]);
530
- async function dn(e, t) {
496
+ }, ln = /* @__PURE__ */ new Set(["left", "top"]);
497
+ async function an(e, t) {
531
498
  const {
532
499
  placement: n,
533
500
  platform: o,
534
501
  elements: s
535
- } = e, l = await (o.isRTL == null ? void 0 : o.isRTL(s.floating)), a = ce(n), r = De(n), i = le(n) === "y", f = cn.has(a) ? -1 : 1, d = l && i ? -1 : 1, c = $e(t, e);
502
+ } = e, l = await (o.isRTL == null ? void 0 : o.isRTL(s.floating)), a = ie(n), r = Pe(n), u = se(n) === "y", c = ln.has(a) ? -1 : 1, f = l && u ? -1 : 1, i = Ee(t, e);
536
503
  let {
537
- mainAxis: p,
504
+ mainAxis: m,
538
505
  crossAxis: v,
539
- alignmentAxis: u
540
- } = typeof c == "number" ? {
541
- mainAxis: c,
506
+ alignmentAxis: d
507
+ } = typeof i == "number" ? {
508
+ mainAxis: i,
542
509
  crossAxis: 0,
543
510
  alignmentAxis: null
544
511
  } : {
545
- mainAxis: c.mainAxis || 0,
546
- crossAxis: c.crossAxis || 0,
547
- alignmentAxis: c.alignmentAxis
512
+ mainAxis: i.mainAxis || 0,
513
+ crossAxis: i.crossAxis || 0,
514
+ alignmentAxis: i.alignmentAxis
548
515
  };
549
- return r && typeof u == "number" && (v = r === "end" ? u * -1 : u), i ? {
550
- x: v * d,
551
- y: p * f
516
+ return r && typeof d == "number" && (v = r === "end" ? d * -1 : d), u ? {
517
+ x: v * f,
518
+ y: m * c
552
519
  } : {
553
- x: p * f,
554
- y: v * d
520
+ x: m * c,
521
+ y: v * f
555
522
  };
556
523
  }
557
- const fn = function(e) {
524
+ const rn = function(e) {
558
525
  return e === void 0 && (e = 0), {
559
526
  name: "offset",
560
527
  options: e,
@@ -565,18 +532,18 @@ const fn = function(e) {
565
532
  y: l,
566
533
  placement: a,
567
534
  middlewareData: r
568
- } = t, i = await dn(t, e);
535
+ } = t, u = await an(t, e);
569
536
  return a === ((n = r.offset) == null ? void 0 : n.placement) && (o = r.arrow) != null && o.alignmentOffset ? {} : {
570
- x: s + i.x,
571
- y: l + i.y,
537
+ x: s + u.x,
538
+ y: l + u.y,
572
539
  data: {
573
- ...i,
540
+ ...u,
574
541
  placement: a
575
542
  }
576
543
  };
577
544
  }
578
545
  };
579
- }, vn = function(e) {
546
+ }, un = function(e) {
580
547
  return e === void 0 && (e = {}), {
581
548
  name: "shift",
582
549
  options: e,
@@ -589,93 +556,93 @@ const fn = function(e) {
589
556
  mainAxis: l = !0,
590
557
  crossAxis: a = !1,
591
558
  limiter: r = {
592
- fn: (C) => {
559
+ fn: (b) => {
593
560
  let {
594
- x: k,
595
- y: S
596
- } = C;
561
+ x: C,
562
+ y: k
563
+ } = b;
597
564
  return {
598
- x: k,
599
- y: S
565
+ x: C,
566
+ y: k
600
567
  };
601
568
  }
602
569
  },
603
- ...i
604
- } = $e(e, t), f = {
570
+ ...u
571
+ } = Ee(e, t), c = {
605
572
  x: n,
606
573
  y: o
607
- }, d = await ft(t, i), c = le(ce(s)), p = ut(c);
608
- let v = f[p], u = f[c];
574
+ }, f = await ft(t, u), i = se(ie(s)), m = ut(i);
575
+ let v = c[m], d = c[i];
609
576
  if (l) {
610
- const C = p === "y" ? "top" : "left", k = p === "y" ? "bottom" : "right", S = v + d[C], V = v - d[k];
611
- v = Qe(S, v, V);
577
+ const b = m === "y" ? "top" : "left", C = m === "y" ? "bottom" : "right", k = v + f[b], S = v - f[C];
578
+ v = Xe(k, v, S);
612
579
  }
613
580
  if (a) {
614
- const C = c === "y" ? "top" : "left", k = c === "y" ? "bottom" : "right", S = u + d[C], V = u - d[k];
615
- u = Qe(S, u, V);
581
+ const b = i === "y" ? "top" : "left", C = i === "y" ? "bottom" : "right", k = d + f[b], S = d - f[C];
582
+ d = Xe(k, d, S);
616
583
  }
617
- const m = r.fn({
584
+ const p = r.fn({
618
585
  ...t,
619
- [p]: v,
620
- [c]: u
586
+ [m]: v,
587
+ [i]: d
621
588
  });
622
589
  return {
623
- ...m,
590
+ ...p,
624
591
  data: {
625
- x: m.x - n,
626
- y: m.y - o,
592
+ x: p.x - n,
593
+ y: p.y - o,
627
594
  enabled: {
628
- [p]: l,
629
- [c]: a
595
+ [m]: l,
596
+ [i]: a
630
597
  }
631
598
  }
632
599
  };
633
600
  }
634
601
  };
635
602
  };
636
- function Fe() {
603
+ function De() {
637
604
  return typeof window < "u";
638
605
  }
639
- function we(e) {
606
+ function ge(e) {
640
607
  return vt(e) ? (e.nodeName || "").toLowerCase() : "#document";
641
608
  }
642
609
  function q(e) {
643
610
  var t;
644
611
  return (e == null || (t = e.ownerDocument) == null ? void 0 : t.defaultView) || window;
645
612
  }
646
- function G(e) {
613
+ function ee(e) {
647
614
  var t;
648
615
  return (t = (vt(e) ? e.ownerDocument : e.document) || window.document) == null ? void 0 : t.documentElement;
649
616
  }
650
617
  function vt(e) {
651
- return Fe() ? e instanceof Node || e instanceof q(e).Node : !1;
618
+ return De() ? e instanceof Node || e instanceof q(e).Node : !1;
652
619
  }
653
- function j(e) {
654
- return Fe() ? e instanceof Element || e instanceof q(e).Element : !1;
620
+ function z(e) {
621
+ return De() ? e instanceof Element || e instanceof q(e).Element : !1;
655
622
  }
656
- function Q(e) {
657
- return Fe() ? e instanceof HTMLElement || e instanceof q(e).HTMLElement : !1;
623
+ function J(e) {
624
+ return De() ? e instanceof HTMLElement || e instanceof q(e).HTMLElement : !1;
658
625
  }
659
- function tt(e) {
660
- return !Fe() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof q(e).ShadowRoot;
626
+ function _e(e) {
627
+ return !De() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof q(e).ShadowRoot;
661
628
  }
662
- const pn = /* @__PURE__ */ new Set(["inline", "contents"]);
663
- function ke(e) {
629
+ const cn = /* @__PURE__ */ new Set(["inline", "contents"]);
630
+ function xe(e) {
664
631
  const {
665
632
  overflow: t,
666
633
  overflowX: n,
667
634
  overflowY: o,
668
635
  display: s
669
- } = z(e);
670
- return /auto|scroll|overlay|hidden|clip/.test(t + o + n) && !pn.has(s);
636
+ } = Z(e);
637
+ return /auto|scroll|overlay|hidden|clip/.test(t + o + n) && !cn.has(s);
671
638
  }
672
- const mn = /* @__PURE__ */ new Set(["table", "td", "th"]);
673
- function hn(e) {
674
- return mn.has(we(e));
639
+ const dn = /* @__PURE__ */ new Set(["table", "td", "th"]);
640
+ function fn(e) {
641
+ return dn.has(ge(e));
675
642
  }
676
- const gn = [":popover-open", ":modal"];
677
- function _e(e) {
678
- return gn.some((t) => {
643
+ const vn = [":popover-open", ":modal"];
644
+ function Le(e) {
645
+ return vn.some((t) => {
679
646
  try {
680
647
  return e.matches(t);
681
648
  } catch {
@@ -683,34 +650,34 @@ function _e(e) {
683
650
  }
684
651
  });
685
652
  }
686
- const yn = ["transform", "translate", "scale", "rotate", "perspective"], wn = ["transform", "translate", "scale", "rotate", "perspective", "filter"], bn = ["paint", "layout", "strict", "content"];
687
- function Ue(e) {
688
- const t = je(), n = j(e) ? z(e) : e;
689
- return yn.some((o) => n[o] ? n[o] !== "none" : !1) || (n.containerType ? n.containerType !== "normal" : !1) || !t && (n.backdropFilter ? n.backdropFilter !== "none" : !1) || !t && (n.filter ? n.filter !== "none" : !1) || wn.some((o) => (n.willChange || "").includes(o)) || bn.some((o) => (n.contain || "").includes(o));
653
+ const mn = ["transform", "translate", "scale", "rotate", "perspective"], pn = ["transform", "translate", "scale", "rotate", "perspective", "filter"], gn = ["paint", "layout", "strict", "content"];
654
+ function Ke(e) {
655
+ const t = We(), n = z(e) ? Z(e) : e;
656
+ return mn.some((o) => n[o] ? n[o] !== "none" : !1) || (n.containerType ? n.containerType !== "normal" : !1) || !t && (n.backdropFilter ? n.backdropFilter !== "none" : !1) || !t && (n.filter ? n.filter !== "none" : !1) || pn.some((o) => (n.willChange || "").includes(o)) || gn.some((o) => (n.contain || "").includes(o));
690
657
  }
691
- function xn(e) {
692
- let t = re(e);
693
- for (; Q(t) && !ge(t); ) {
694
- if (Ue(t))
658
+ function hn(e) {
659
+ let t = ae(e);
660
+ for (; J(t) && !pe(t); ) {
661
+ if (Ke(t))
695
662
  return t;
696
- if (_e(t))
663
+ if (Le(t))
697
664
  return null;
698
- t = re(t);
665
+ t = ae(t);
699
666
  }
700
667
  return null;
701
668
  }
702
- function je() {
669
+ function We() {
703
670
  return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
704
671
  }
705
- const Cn = /* @__PURE__ */ new Set(["html", "body", "#document"]);
706
- function ge(e) {
707
- return Cn.has(we(e));
672
+ const wn = /* @__PURE__ */ new Set(["html", "body", "#document"]);
673
+ function pe(e) {
674
+ return wn.has(ge(e));
708
675
  }
709
- function z(e) {
676
+ function Z(e) {
710
677
  return q(e).getComputedStyle(e);
711
678
  }
712
- function Me(e) {
713
- return j(e) ? {
679
+ function Fe(e) {
680
+ return z(e) ? {
714
681
  scrollLeft: e.scrollLeft,
715
682
  scrollTop: e.scrollTop
716
683
  } : {
@@ -718,189 +685,189 @@ function Me(e) {
718
685
  scrollTop: e.scrollY
719
686
  };
720
687
  }
721
- function re(e) {
722
- if (we(e) === "html")
688
+ function ae(e) {
689
+ if (ge(e) === "html")
723
690
  return e;
724
691
  const t = (
725
692
  // Step into the shadow DOM of the parent of a slotted node.
726
693
  e.assignedSlot || // DOM Element detected.
727
694
  e.parentNode || // ShadowRoot detected.
728
- tt(e) && e.host || // Fallback.
729
- G(e)
695
+ _e(e) && e.host || // Fallback.
696
+ ee(e)
730
697
  );
731
- return tt(t) ? t.host : t;
698
+ return _e(t) ? t.host : t;
732
699
  }
733
- function pt(e) {
734
- const t = re(e);
735
- return ge(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : Q(t) && ke(t) ? t : pt(t);
700
+ function mt(e) {
701
+ const t = ae(e);
702
+ return pe(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : J(t) && xe(t) ? t : mt(t);
736
703
  }
737
- function Ce(e, t, n) {
704
+ function be(e, t, n) {
738
705
  var o;
739
706
  t === void 0 && (t = []), n === void 0 && (n = !0);
740
- const s = pt(e), l = s === ((o = e.ownerDocument) == null ? void 0 : o.body), a = q(s);
707
+ const s = mt(e), l = s === ((o = e.ownerDocument) == null ? void 0 : o.body), a = q(s);
741
708
  if (l) {
742
- const r = Ke(a);
743
- return t.concat(a, a.visualViewport || [], ke(s) ? s : [], r && n ? Ce(r) : []);
709
+ const r = He(a);
710
+ return t.concat(a, a.visualViewport || [], xe(s) ? s : [], r && n ? be(r) : []);
744
711
  }
745
- return t.concat(s, Ce(s, [], n));
712
+ return t.concat(s, be(s, [], n));
746
713
  }
747
- function Ke(e) {
714
+ function He(e) {
748
715
  return e.parent && Object.getPrototypeOf(e.parent) ? e.frameElement : null;
749
716
  }
750
- function mt(e) {
751
- const t = z(e);
717
+ function pt(e) {
718
+ const t = Z(e);
752
719
  let n = parseFloat(t.width) || 0, o = parseFloat(t.height) || 0;
753
- const s = Q(e), l = s ? e.offsetWidth : n, a = s ? e.offsetHeight : o, r = Ee(n) !== l || Ee(o) !== a;
720
+ const s = J(e), l = s ? e.offsetWidth : n, a = s ? e.offsetHeight : o, r = $e(n) !== l || $e(o) !== a;
754
721
  return r && (n = l, o = a), {
755
722
  width: n,
756
723
  height: o,
757
724
  $: r
758
725
  };
759
726
  }
760
- function ze(e) {
761
- return j(e) ? e : e.contextElement;
727
+ function Ue(e) {
728
+ return z(e) ? e : e.contextElement;
762
729
  }
763
- function me(e) {
764
- const t = ze(e);
765
- if (!Q(t))
730
+ function ve(e) {
731
+ const t = Ue(e);
732
+ if (!J(t))
766
733
  return Y(1);
767
734
  const n = t.getBoundingClientRect(), {
768
735
  width: o,
769
736
  height: s,
770
737
  $: l
771
- } = mt(t);
772
- let a = (l ? Ee(n.width) : n.width) / o, r = (l ? Ee(n.height) : n.height) / s;
738
+ } = pt(t);
739
+ let a = (l ? $e(n.width) : n.width) / o, r = (l ? $e(n.height) : n.height) / s;
773
740
  return (!a || !Number.isFinite(a)) && (a = 1), (!r || !Number.isFinite(r)) && (r = 1), {
774
741
  x: a,
775
742
  y: r
776
743
  };
777
744
  }
778
- const kn = /* @__PURE__ */ Y(0);
779
- function ht(e) {
745
+ const yn = /* @__PURE__ */ Y(0);
746
+ function gt(e) {
780
747
  const t = q(e);
781
- return !je() || !t.visualViewport ? kn : {
748
+ return !We() || !t.visualViewport ? yn : {
782
749
  x: t.visualViewport.offsetLeft,
783
750
  y: t.visualViewport.offsetTop
784
751
  };
785
752
  }
786
- function Rn(e, t, n) {
753
+ function bn(e, t, n) {
787
754
  return t === void 0 && (t = !1), !n || t && n !== q(e) ? !1 : t;
788
755
  }
789
- function de(e, t, n, o) {
756
+ function ue(e, t, n, o) {
790
757
  t === void 0 && (t = !1), n === void 0 && (n = !1);
791
- const s = e.getBoundingClientRect(), l = ze(e);
758
+ const s = e.getBoundingClientRect(), l = Ue(e);
792
759
  let a = Y(1);
793
- t && (o ? j(o) && (a = me(o)) : a = me(e));
794
- const r = Rn(l, n, o) ? ht(l) : Y(0);
795
- let i = (s.left + r.x) / a.x, f = (s.top + r.y) / a.y, d = s.width / a.x, c = s.height / a.y;
760
+ t && (o ? z(o) && (a = ve(o)) : a = ve(e));
761
+ const r = bn(l, n, o) ? gt(l) : Y(0);
762
+ let u = (s.left + r.x) / a.x, c = (s.top + r.y) / a.y, f = s.width / a.x, i = s.height / a.y;
796
763
  if (l) {
797
- const p = q(l), v = o && j(o) ? q(o) : o;
798
- let u = p, m = Ke(u);
799
- for (; m && o && v !== u; ) {
800
- const C = me(m), k = m.getBoundingClientRect(), S = z(m), V = k.left + (m.clientLeft + parseFloat(S.paddingLeft)) * C.x, L = k.top + (m.clientTop + parseFloat(S.paddingTop)) * C.y;
801
- i *= C.x, f *= C.y, d *= C.x, c *= C.y, i += V, f += L, u = q(m), m = Ke(u);
764
+ const m = q(l), v = o && z(o) ? q(o) : o;
765
+ let d = m, p = He(d);
766
+ for (; p && o && v !== d; ) {
767
+ const b = ve(p), C = p.getBoundingClientRect(), k = Z(p), S = C.left + (p.clientLeft + parseFloat(k.paddingLeft)) * b.x, O = C.top + (p.clientTop + parseFloat(k.paddingTop)) * b.y;
768
+ u *= b.x, c *= b.y, f *= b.x, i *= b.y, u += S, c += O, d = q(p), p = He(d);
802
769
  }
803
770
  }
804
- return Pe({
805
- width: d,
806
- height: c,
807
- x: i,
808
- y: f
771
+ return Oe({
772
+ width: f,
773
+ height: i,
774
+ x: u,
775
+ y: c
809
776
  });
810
777
  }
811
- function Ne(e, t) {
812
- const n = Me(e).scrollLeft;
813
- return t ? t.left + n : de(G(e)).left + n;
778
+ function Be(e, t) {
779
+ const n = Fe(e).scrollLeft;
780
+ return t ? t.left + n : ue(ee(e)).left + n;
814
781
  }
815
- function gt(e, t) {
816
- const n = e.getBoundingClientRect(), o = n.left + t.scrollLeft - Ne(e, n), s = n.top + t.scrollTop;
782
+ function ht(e, t) {
783
+ const n = e.getBoundingClientRect(), o = n.left + t.scrollLeft - Be(e, n), s = n.top + t.scrollTop;
817
784
  return {
818
785
  x: o,
819
786
  y: s
820
787
  };
821
788
  }
822
- function Sn(e) {
789
+ function xn(e) {
823
790
  let {
824
791
  elements: t,
825
792
  rect: n,
826
793
  offsetParent: o,
827
794
  strategy: s
828
795
  } = e;
829
- const l = s === "fixed", a = G(o), r = t ? _e(t.floating) : !1;
796
+ const l = s === "fixed", a = ee(o), r = t ? Le(t.floating) : !1;
830
797
  if (o === a || r && l)
831
798
  return n;
832
- let i = {
799
+ let u = {
833
800
  scrollLeft: 0,
834
801
  scrollTop: 0
835
- }, f = Y(1);
836
- const d = Y(0), c = Q(o);
837
- if ((c || !c && !l) && ((we(o) !== "body" || ke(a)) && (i = Me(o)), Q(o))) {
838
- const v = de(o);
839
- f = me(o), d.x = v.x + o.clientLeft, d.y = v.y + o.clientTop;
802
+ }, c = Y(1);
803
+ const f = Y(0), i = J(o);
804
+ if ((i || !i && !l) && ((ge(o) !== "body" || xe(a)) && (u = Fe(o)), J(o))) {
805
+ const v = ue(o);
806
+ c = ve(o), f.x = v.x + o.clientLeft, f.y = v.y + o.clientTop;
840
807
  }
841
- const p = a && !c && !l ? gt(a, i) : Y(0);
808
+ const m = a && !i && !l ? ht(a, u) : Y(0);
842
809
  return {
843
- width: n.width * f.x,
844
- height: n.height * f.y,
845
- x: n.x * f.x - i.scrollLeft * f.x + d.x + p.x,
846
- y: n.y * f.y - i.scrollTop * f.y + d.y + p.y
810
+ width: n.width * c.x,
811
+ height: n.height * c.y,
812
+ x: n.x * c.x - u.scrollLeft * c.x + f.x + m.x,
813
+ y: n.y * c.y - u.scrollTop * c.y + f.y + m.y
847
814
  };
848
815
  }
849
- function On(e) {
816
+ function Cn(e) {
850
817
  return Array.from(e.getClientRects());
851
818
  }
852
- function Vn(e) {
853
- const t = G(e), n = Me(e), o = e.ownerDocument.body, s = ue(t.scrollWidth, t.clientWidth, o.scrollWidth, o.clientWidth), l = ue(t.scrollHeight, t.clientHeight, o.scrollHeight, o.clientHeight);
854
- let a = -n.scrollLeft + Ne(e);
819
+ function kn(e) {
820
+ const t = ee(e), n = Fe(e), o = e.ownerDocument.body, s = re(t.scrollWidth, t.clientWidth, o.scrollWidth, o.clientWidth), l = re(t.scrollHeight, t.clientHeight, o.scrollHeight, o.clientHeight);
821
+ let a = -n.scrollLeft + Be(e);
855
822
  const r = -n.scrollTop;
856
- return z(o).direction === "rtl" && (a += ue(t.clientWidth, o.clientWidth) - s), {
823
+ return Z(o).direction === "rtl" && (a += re(t.clientWidth, o.clientWidth) - s), {
857
824
  width: s,
858
825
  height: l,
859
826
  x: a,
860
827
  y: r
861
828
  };
862
829
  }
863
- const nt = 25;
864
- function Tn(e, t) {
865
- const n = q(e), o = G(e), s = n.visualViewport;
866
- let l = o.clientWidth, a = o.clientHeight, r = 0, i = 0;
830
+ const et = 25;
831
+ function Rn(e, t) {
832
+ const n = q(e), o = ee(e), s = n.visualViewport;
833
+ let l = o.clientWidth, a = o.clientHeight, r = 0, u = 0;
867
834
  if (s) {
868
835
  l = s.width, a = s.height;
869
- const d = je();
870
- (!d || d && t === "fixed") && (r = s.offsetLeft, i = s.offsetTop);
836
+ const f = We();
837
+ (!f || f && t === "fixed") && (r = s.offsetLeft, u = s.offsetTop);
871
838
  }
872
- const f = Ne(o);
873
- if (f <= 0) {
874
- const d = o.ownerDocument, c = d.body, p = getComputedStyle(c), v = d.compatMode === "CSS1Compat" && parseFloat(p.marginLeft) + parseFloat(p.marginRight) || 0, u = Math.abs(o.clientWidth - c.clientWidth - v);
875
- u <= nt && (l -= u);
876
- } else f <= nt && (l += f);
839
+ const c = Be(o);
840
+ if (c <= 0) {
841
+ const f = o.ownerDocument, i = f.body, m = getComputedStyle(i), v = f.compatMode === "CSS1Compat" && parseFloat(m.marginLeft) + parseFloat(m.marginRight) || 0, d = Math.abs(o.clientWidth - i.clientWidth - v);
842
+ d <= et && (l -= d);
843
+ } else c <= et && (l += c);
877
844
  return {
878
845
  width: l,
879
846
  height: a,
880
847
  x: r,
881
- y: i
848
+ y: u
882
849
  };
883
850
  }
884
- const En = /* @__PURE__ */ new Set(["absolute", "fixed"]);
885
- function An(e, t) {
886
- const n = de(e, !0, t === "fixed"), o = n.top + e.clientTop, s = n.left + e.clientLeft, l = Q(e) ? me(e) : Y(1), a = e.clientWidth * l.x, r = e.clientHeight * l.y, i = s * l.x, f = o * l.y;
851
+ const Sn = /* @__PURE__ */ new Set(["absolute", "fixed"]);
852
+ function Tn(e, t) {
853
+ const n = ue(e, !0, t === "fixed"), o = n.top + e.clientTop, s = n.left + e.clientLeft, l = J(e) ? ve(e) : Y(1), a = e.clientWidth * l.x, r = e.clientHeight * l.y, u = s * l.x, c = o * l.y;
887
854
  return {
888
855
  width: a,
889
856
  height: r,
890
- x: i,
891
- y: f
857
+ x: u,
858
+ y: c
892
859
  };
893
860
  }
894
- function ot(e, t, n) {
861
+ function tt(e, t, n) {
895
862
  let o;
896
863
  if (t === "viewport")
897
- o = Tn(e, n);
864
+ o = Rn(e, n);
898
865
  else if (t === "document")
899
- o = Vn(G(e));
900
- else if (j(t))
901
- o = An(t, n);
866
+ o = kn(ee(e));
867
+ else if (z(t))
868
+ o = Tn(t, n);
902
869
  else {
903
- const s = ht(e);
870
+ const s = gt(e);
904
871
  o = {
905
872
  x: t.x - s.x,
906
873
  y: t.y - s.y,
@@ -908,110 +875,110 @@ function ot(e, t, n) {
908
875
  height: t.height
909
876
  };
910
877
  }
911
- return Pe(o);
878
+ return Oe(o);
912
879
  }
913
- function yt(e, t) {
914
- const n = re(e);
915
- return n === t || !j(n) || ge(n) ? !1 : z(n).position === "fixed" || yt(n, t);
880
+ function wt(e, t) {
881
+ const n = ae(e);
882
+ return n === t || !z(n) || pe(n) ? !1 : Z(n).position === "fixed" || wt(n, t);
916
883
  }
917
- function Pn(e, t) {
884
+ function $n(e, t) {
918
885
  const n = t.get(e);
919
886
  if (n)
920
887
  return n;
921
- let o = Ce(e, [], !1).filter((r) => j(r) && we(r) !== "body"), s = null;
922
- const l = z(e).position === "fixed";
923
- let a = l ? re(e) : e;
924
- for (; j(a) && !ge(a); ) {
925
- const r = z(a), i = Ue(a);
926
- !i && r.position === "fixed" && (s = null), (l ? !i && !s : !i && r.position === "static" && !!s && En.has(s.position) || ke(a) && !i && yt(e, a)) ? o = o.filter((d) => d !== a) : s = r, a = re(a);
888
+ let o = be(e, [], !1).filter((r) => z(r) && ge(r) !== "body"), s = null;
889
+ const l = Z(e).position === "fixed";
890
+ let a = l ? ae(e) : e;
891
+ for (; z(a) && !pe(a); ) {
892
+ const r = Z(a), u = Ke(a);
893
+ !u && r.position === "fixed" && (s = null), (l ? !u && !s : !u && r.position === "static" && !!s && Sn.has(s.position) || xe(a) && !u && wt(e, a)) ? o = o.filter((f) => f !== a) : s = r, a = ae(a);
927
894
  }
928
895
  return t.set(e, o), o;
929
896
  }
930
- function Ln(e) {
897
+ function Vn(e) {
931
898
  let {
932
899
  element: t,
933
900
  boundary: n,
934
901
  rootBoundary: o,
935
902
  strategy: s
936
903
  } = e;
937
- const a = [...n === "clippingAncestors" ? _e(t) ? [] : Pn(t, this._c) : [].concat(n), o], r = a[0], i = a.reduce((f, d) => {
938
- const c = ot(t, d, s);
939
- return f.top = ue(c.top, f.top), f.right = Te(c.right, f.right), f.bottom = Te(c.bottom, f.bottom), f.left = ue(c.left, f.left), f;
940
- }, ot(t, r, s));
904
+ const a = [...n === "clippingAncestors" ? Le(t) ? [] : $n(t, this._c) : [].concat(n), o], r = a[0], u = a.reduce((c, f) => {
905
+ const i = tt(t, f, s);
906
+ return c.top = re(i.top, c.top), c.right = Te(i.right, c.right), c.bottom = Te(i.bottom, c.bottom), c.left = re(i.left, c.left), c;
907
+ }, tt(t, r, s));
941
908
  return {
942
- width: i.right - i.left,
943
- height: i.bottom - i.top,
944
- x: i.left,
945
- y: i.top
909
+ width: u.right - u.left,
910
+ height: u.bottom - u.top,
911
+ x: u.left,
912
+ y: u.top
946
913
  };
947
914
  }
948
- function $n(e) {
915
+ function On(e) {
949
916
  const {
950
917
  width: t,
951
918
  height: n
952
- } = mt(e);
919
+ } = pt(e);
953
920
  return {
954
921
  width: t,
955
922
  height: n
956
923
  };
957
924
  }
958
- function Dn(e, t, n) {
959
- const o = Q(t), s = G(t), l = n === "fixed", a = de(e, !0, l, t);
925
+ function An(e, t, n) {
926
+ const o = J(t), s = ee(t), l = n === "fixed", a = ue(e, !0, l, t);
960
927
  let r = {
961
928
  scrollLeft: 0,
962
929
  scrollTop: 0
963
930
  };
964
- const i = Y(0);
965
- function f() {
966
- i.x = Ne(s);
931
+ const u = Y(0);
932
+ function c() {
933
+ u.x = Be(s);
967
934
  }
968
935
  if (o || !o && !l)
969
- if ((we(t) !== "body" || ke(s)) && (r = Me(t)), o) {
970
- const v = de(t, !0, l, t);
971
- i.x = v.x + t.clientLeft, i.y = v.y + t.clientTop;
972
- } else s && f();
973
- l && !o && s && f();
974
- const d = s && !o && !l ? gt(s, r) : Y(0), c = a.left + r.scrollLeft - i.x - d.x, p = a.top + r.scrollTop - i.y - d.y;
936
+ if ((ge(t) !== "body" || xe(s)) && (r = Fe(t)), o) {
937
+ const v = ue(t, !0, l, t);
938
+ u.x = v.x + t.clientLeft, u.y = v.y + t.clientTop;
939
+ } else s && c();
940
+ l && !o && s && c();
941
+ const f = s && !o && !l ? ht(s, r) : Y(0), i = a.left + r.scrollLeft - u.x - f.x, m = a.top + r.scrollTop - u.y - f.y;
975
942
  return {
976
- x: c,
977
- y: p,
943
+ x: i,
944
+ y: m,
978
945
  width: a.width,
979
946
  height: a.height
980
947
  };
981
948
  }
982
- function We(e) {
983
- return z(e).position === "static";
949
+ function Ne(e) {
950
+ return Z(e).position === "static";
984
951
  }
985
- function st(e, t) {
986
- if (!Q(e) || z(e).position === "fixed")
952
+ function nt(e, t) {
953
+ if (!J(e) || Z(e).position === "fixed")
987
954
  return null;
988
955
  if (t)
989
956
  return t(e);
990
957
  let n = e.offsetParent;
991
- return G(e) === n && (n = n.ownerDocument.body), n;
958
+ return ee(e) === n && (n = n.ownerDocument.body), n;
992
959
  }
993
- function wt(e, t) {
960
+ function yt(e, t) {
994
961
  const n = q(e);
995
- if (_e(e))
962
+ if (Le(e))
996
963
  return n;
997
- if (!Q(e)) {
998
- let s = re(e);
999
- for (; s && !ge(s); ) {
1000
- if (j(s) && !We(s))
964
+ if (!J(e)) {
965
+ let s = ae(e);
966
+ for (; s && !pe(s); ) {
967
+ if (z(s) && !Ne(s))
1001
968
  return s;
1002
- s = re(s);
969
+ s = ae(s);
1003
970
  }
1004
971
  return n;
1005
972
  }
1006
- let o = st(e, t);
1007
- for (; o && hn(o) && We(o); )
1008
- o = st(o, t);
1009
- return o && ge(o) && We(o) && !Ue(o) ? n : o || xn(e) || n;
973
+ let o = nt(e, t);
974
+ for (; o && fn(o) && Ne(o); )
975
+ o = nt(o, t);
976
+ return o && pe(o) && Ne(o) && !Ke(o) ? n : o || hn(e) || n;
1010
977
  }
1011
- const Fn = async function(e) {
1012
- const t = this.getOffsetParent || wt, n = this.getDimensions, o = await n(e.floating);
978
+ const En = async function(e) {
979
+ const t = this.getOffsetParent || yt, n = this.getDimensions, o = await n(e.floating);
1013
980
  return {
1014
- reference: Dn(e.reference, await t(e.floating), e.strategy),
981
+ reference: An(e.reference, await t(e.floating), e.strategy),
1015
982
  floating: {
1016
983
  x: 0,
1017
984
  y: 0,
@@ -1020,119 +987,119 @@ const Fn = async function(e) {
1020
987
  }
1021
988
  };
1022
989
  };
1023
- function _n(e) {
1024
- return z(e).direction === "rtl";
1025
- }
1026
- const Mn = {
1027
- convertOffsetParentRelativeRectToViewportRelativeRect: Sn,
1028
- getDocumentElement: G,
1029
- getClippingRect: Ln,
1030
- getOffsetParent: wt,
1031
- getElementRects: Fn,
1032
- getClientRects: On,
1033
- getDimensions: $n,
1034
- getScale: me,
1035
- isElement: j,
1036
- isRTL: _n
990
+ function Pn(e) {
991
+ return Z(e).direction === "rtl";
992
+ }
993
+ const Dn = {
994
+ convertOffsetParentRelativeRectToViewportRelativeRect: xn,
995
+ getDocumentElement: ee,
996
+ getClippingRect: Vn,
997
+ getOffsetParent: yt,
998
+ getElementRects: En,
999
+ getClientRects: Cn,
1000
+ getDimensions: On,
1001
+ getScale: ve,
1002
+ isElement: z,
1003
+ isRTL: Pn
1037
1004
  };
1038
1005
  function bt(e, t) {
1039
1006
  return e.x === t.x && e.y === t.y && e.width === t.width && e.height === t.height;
1040
1007
  }
1041
- function Nn(e, t) {
1008
+ function Ln(e, t) {
1042
1009
  let n = null, o;
1043
- const s = G(e);
1010
+ const s = ee(e);
1044
1011
  function l() {
1045
1012
  var r;
1046
1013
  clearTimeout(o), (r = n) == null || r.disconnect(), n = null;
1047
1014
  }
1048
- function a(r, i) {
1049
- r === void 0 && (r = !1), i === void 0 && (i = 1), l();
1050
- const f = e.getBoundingClientRect(), {
1051
- left: d,
1052
- top: c,
1053
- width: p,
1015
+ function a(r, u) {
1016
+ r === void 0 && (r = !1), u === void 0 && (u = 1), l();
1017
+ const c = e.getBoundingClientRect(), {
1018
+ left: f,
1019
+ top: i,
1020
+ width: m,
1054
1021
  height: v
1055
- } = f;
1056
- if (r || t(), !p || !v)
1022
+ } = c;
1023
+ if (r || t(), !m || !v)
1057
1024
  return;
1058
- const u = Oe(c), m = Oe(s.clientWidth - (d + p)), C = Oe(s.clientHeight - (c + v)), k = Oe(d), V = {
1059
- rootMargin: -u + "px " + -m + "px " + -C + "px " + -k + "px",
1060
- threshold: ue(0, Te(1, i)) || 1
1025
+ const d = Re(i), p = Re(s.clientWidth - (f + m)), b = Re(s.clientHeight - (i + v)), C = Re(f), S = {
1026
+ rootMargin: -d + "px " + -p + "px " + -b + "px " + -C + "px",
1027
+ threshold: re(0, Te(1, u)) || 1
1061
1028
  };
1062
- let L = !0;
1063
- function A(N) {
1064
- const P = N[0].intersectionRatio;
1065
- if (P !== i) {
1066
- if (!L)
1029
+ let O = !0;
1030
+ function A(M) {
1031
+ const $ = M[0].intersectionRatio;
1032
+ if ($ !== u) {
1033
+ if (!O)
1067
1034
  return a();
1068
- P ? a(!1, P) : o = setTimeout(() => {
1035
+ $ ? a(!1, $) : o = setTimeout(() => {
1069
1036
  a(!1, 1e-7);
1070
1037
  }, 1e3);
1071
1038
  }
1072
- P === 1 && !bt(f, e.getBoundingClientRect()) && a(), L = !1;
1039
+ $ === 1 && !bt(c, e.getBoundingClientRect()) && a(), O = !1;
1073
1040
  }
1074
1041
  try {
1075
1042
  n = new IntersectionObserver(A, {
1076
- ...V,
1043
+ ...S,
1077
1044
  // Handle <iframe>s
1078
1045
  root: s.ownerDocument
1079
1046
  });
1080
1047
  } catch {
1081
- n = new IntersectionObserver(A, V);
1048
+ n = new IntersectionObserver(A, S);
1082
1049
  }
1083
1050
  n.observe(e);
1084
1051
  }
1085
1052
  return a(!0), l;
1086
1053
  }
1087
- function Bn(e, t, n, o) {
1054
+ function Fn(e, t, n, o) {
1088
1055
  o === void 0 && (o = {});
1089
1056
  const {
1090
1057
  ancestorScroll: s = !0,
1091
1058
  ancestorResize: l = !0,
1092
1059
  elementResize: a = typeof ResizeObserver == "function",
1093
1060
  layoutShift: r = typeof IntersectionObserver == "function",
1094
- animationFrame: i = !1
1095
- } = o, f = ze(e), d = s || l ? [...f ? Ce(f) : [], ...Ce(t)] : [];
1096
- d.forEach((k) => {
1097
- s && k.addEventListener("scroll", n, {
1061
+ animationFrame: u = !1
1062
+ } = o, c = Ue(e), f = s || l ? [...c ? be(c) : [], ...be(t)] : [];
1063
+ f.forEach((C) => {
1064
+ s && C.addEventListener("scroll", n, {
1098
1065
  passive: !0
1099
- }), l && k.addEventListener("resize", n);
1066
+ }), l && C.addEventListener("resize", n);
1100
1067
  });
1101
- const c = f && r ? Nn(f, n) : null;
1102
- let p = -1, v = null;
1103
- a && (v = new ResizeObserver((k) => {
1104
- let [S] = k;
1105
- S && S.target === f && v && (v.unobserve(t), cancelAnimationFrame(p), p = requestAnimationFrame(() => {
1106
- var V;
1107
- (V = v) == null || V.observe(t);
1068
+ const i = c && r ? Ln(c, n) : null;
1069
+ let m = -1, v = null;
1070
+ a && (v = new ResizeObserver((C) => {
1071
+ let [k] = C;
1072
+ k && k.target === c && v && (v.unobserve(t), cancelAnimationFrame(m), m = requestAnimationFrame(() => {
1073
+ var S;
1074
+ (S = v) == null || S.observe(t);
1108
1075
  })), n();
1109
- }), f && !i && v.observe(f), v.observe(t));
1110
- let u, m = i ? de(e) : null;
1111
- i && C();
1112
- function C() {
1113
- const k = de(e);
1114
- m && !bt(m, k) && n(), m = k, u = requestAnimationFrame(C);
1076
+ }), c && !u && v.observe(c), v.observe(t));
1077
+ let d, p = u ? ue(e) : null;
1078
+ u && b();
1079
+ function b() {
1080
+ const C = ue(e);
1081
+ p && !bt(p, C) && n(), p = C, d = requestAnimationFrame(b);
1115
1082
  }
1116
1083
  return n(), () => {
1117
- var k;
1118
- d.forEach((S) => {
1119
- s && S.removeEventListener("scroll", n), l && S.removeEventListener("resize", n);
1120
- }), c?.(), (k = v) == null || k.disconnect(), v = null, i && cancelAnimationFrame(u);
1084
+ var C;
1085
+ f.forEach((k) => {
1086
+ s && k.removeEventListener("scroll", n), l && k.removeEventListener("resize", n);
1087
+ }), i?.(), (C = v) == null || C.disconnect(), v = null, u && cancelAnimationFrame(d);
1121
1088
  };
1122
1089
  }
1123
- const qn = fn, In = vn, Wn = un, Hn = (e, t, n) => {
1090
+ const Bn = rn, Mn = un, Nn = sn, In = (e, t, n) => {
1124
1091
  const o = /* @__PURE__ */ new Map(), s = {
1125
- platform: Mn,
1092
+ platform: Dn,
1126
1093
  ...n
1127
1094
  }, l = {
1128
1095
  ...s.platform,
1129
1096
  _c: o
1130
1097
  };
1131
- return rn(e, t, {
1098
+ return on(e, t, {
1132
1099
  ...s,
1133
1100
  platform: l
1134
1101
  });
1135
- }, Le = {
1102
+ }, Ae = {
1136
1103
  text: (e, t, n) => {
1137
1104
  const o = String(e[t] ?? "").toLowerCase(), s = (n.value ?? "").toLowerCase().trim();
1138
1105
  if (!s && !["empty", "notEmpty"].includes(n.operator ?? "")) return !0;
@@ -1208,15 +1175,15 @@ const qn = fn, In = vn, Wn = un, Hn = (e, t, n) => {
1208
1175
  const o = e[t];
1209
1176
  if (typeof n.filterFn == "function")
1210
1177
  return n.filterFn(o, n.value, e);
1211
- if (n.filterKey && Object.prototype.hasOwnProperty.call(Le, n.filterKey)) {
1212
- const s = Le[n.filterKey];
1178
+ if (n.filterKey && Object.prototype.hasOwnProperty.call(Ae, n.filterKey)) {
1179
+ const s = Ae[n.filterKey];
1213
1180
  if (typeof s == "function")
1214
1181
  return s(e, t, n);
1215
1182
  }
1216
1183
  return !0;
1217
1184
  }
1218
1185
  };
1219
- function he(e, t) {
1186
+ function me(e, t) {
1220
1187
  const n = {
1221
1188
  operator: t?.operator,
1222
1189
  value: t?.value ?? null
@@ -1245,7 +1212,7 @@ function he(e, t) {
1245
1212
  throw new Error(`Unsupported filter type: ${e}`);
1246
1213
  }
1247
1214
  }
1248
- function Kn(e) {
1215
+ function ot(e) {
1249
1216
  switch (e.type) {
1250
1217
  case "text":
1251
1218
  return e.operator ? ["empty", "notEmpty"].includes(e.operator || "") ? !0 : !!e.value?.trim() : !1;
@@ -1261,7 +1228,7 @@ function Kn(e) {
1261
1228
  return !1;
1262
1229
  }
1263
1230
  }
1264
- const Un = fe({
1231
+ const qn = _({
1265
1232
  name: "VsDFlex",
1266
1233
  inheritAttrs: !1,
1267
1234
  props: {
@@ -1274,7 +1241,7 @@ const Un = fe({
1274
1241
  },
1275
1242
  setup(e, { attrs: t }) {
1276
1243
  const n = (s, l) => `${s}-${l}`;
1277
- return { flexClasses: E(() => {
1244
+ return { flexClasses: T(() => {
1278
1245
  const s = ["vs-d-flex"];
1279
1246
  return e.direction && s.push(n("vs-row", e.direction)), e.justify && s.push(n("vs-justify", e.justify)), e.align && s.push(n("vs-align", e.align)), e.wrap !== void 0 && s.push(e.wrap ? "vs-wrap" : "vs-nowrap"), e.gap && s.push(n("vs-gap", e.gap)), Object.entries(e.responsive || {}).forEach(([l, a]) => {
1280
1247
  const r = l + ":";
@@ -1283,25 +1250,25 @@ const Un = fe({
1283
1250
  }), attrs: t };
1284
1251
  }
1285
1252
  });
1286
- function jn(e, t, n, o, s, l) {
1287
- return g(), y("div", xt({ class: e.flexClasses }, e.attrs), [
1288
- ee(e.$slots, "default")
1253
+ function Hn(e, t, n, o, s, l) {
1254
+ return h(), w("div", xt({ class: e.flexClasses }, e.attrs), [
1255
+ N(e.$slots, "default")
1289
1256
  ], 16);
1290
1257
  }
1291
- const pe = /* @__PURE__ */ ye(Un, [["render", jn]]), zn = { class: "vs-multiselect" }, Zn = { class: "vs-multiselect-actions" }, Xn = {
1258
+ const fe = /* @__PURE__ */ ne(qn, [["render", Hn]]), Kn = { class: "vs-multiselect" }, Wn = { class: "vs-multiselect-actions" }, Un = {
1292
1259
  key: 0,
1293
1260
  class: "vs-py-4 vs-text-center vs-text-primary"
1294
- }, Yn = {
1261
+ }, jn = {
1295
1262
  key: 1,
1296
1263
  class: "vs-multiselect-options"
1297
- }, Qn = ["onClick"], Gn = { class: "option-label" }, Jn = {
1264
+ }, zn = ["onClick"], Zn = { class: "option-label" }, Qn = {
1298
1265
  key: 0,
1299
1266
  xmlns: "http://www.w3.org/2000/svg",
1300
1267
  class: "check-icon",
1301
1268
  fill: "none",
1302
1269
  viewBox: "0 0 24 24",
1303
1270
  stroke: "currentColor"
1304
- }, eo = /* @__PURE__ */ fe({
1271
+ }, Xn = /* @__PURE__ */ _({
1305
1272
  __name: "VsMultiSelect",
1306
1273
  props: {
1307
1274
  columnData: {},
@@ -1310,39 +1277,39 @@ const pe = /* @__PURE__ */ ye(Un, [["render", jn]]), zn = { class: "vs-multisele
1310
1277
  },
1311
1278
  emits: ["update:modelValue"],
1312
1279
  setup(e, { emit: t }) {
1313
- const n = e, o = t, s = _(""), l = _([...n.modelValue ?? []]), a = E(() => {
1280
+ const n = e, o = t, s = L(""), l = L([...n.modelValue ?? []]), a = T(() => {
1314
1281
  const v = new Set(n.columnData.filter(Boolean));
1315
1282
  return Array.from(v);
1316
- }), r = E(() => {
1283
+ }), r = T(() => {
1317
1284
  const v = s.value.toLowerCase();
1318
- return a.value.filter((u) => u.toString().toLowerCase().includes(v));
1319
- }), i = E(() => l.value.length), f = E(() => a.value.length - l.value.length), d = (v) => {
1320
- const u = l.value.indexOf(v);
1321
- u > -1 ? l.value.splice(u, 1) : l.value.push(v), o("update:modelValue", [...l.value]);
1322
- }, c = () => {
1285
+ return a.value.filter((d) => d.toString().toLowerCase().includes(v));
1286
+ }), u = T(() => l.value.length), c = T(() => a.value.length - l.value.length), f = (v) => {
1287
+ const d = l.value.indexOf(v);
1288
+ d > -1 ? l.value.splice(d, 1) : l.value.push(v), o("update:modelValue", [...l.value]);
1289
+ }, i = () => {
1323
1290
  l.value = [...a.value], o("update:modelValue", [...l.value]);
1324
- }, p = () => {
1291
+ }, m = () => {
1325
1292
  l.value = [], o("update:modelValue", []);
1326
1293
  };
1327
- return ne(
1294
+ return G(
1328
1295
  () => n.modelValue,
1329
1296
  (v) => {
1330
1297
  l.value = [...v || []];
1331
1298
  }
1332
- ), (v, u) => (g(), y("div", zn, [
1333
- h("div", Zn, [
1334
- h("button", {
1335
- onClick: ae(c, ["stop"])
1336
- }, "Select All (" + F(f.value) + ")", 1),
1337
- h("button", {
1338
- onClick: ae(p, ["stop"])
1339
- }, "Deselect All (" + F(i.value) + ")", 1)
1299
+ ), (v, d) => (h(), w("div", Kn, [
1300
+ g("div", Wn, [
1301
+ g("button", {
1302
+ onClick: le(i, ["stop"])
1303
+ }, "Select All (" + D(c.value) + ")", 1),
1304
+ g("button", {
1305
+ onClick: le(m, ["stop"])
1306
+ }, "Deselect All (" + D(u.value) + ")", 1)
1340
1307
  ]),
1341
- ie(pe, { direction: "row" }, {
1342
- default: se(() => [
1343
- U(h("input", {
1308
+ X(fe, { direction: "row" }, {
1309
+ default: H(() => [
1310
+ U(g("input", {
1344
1311
  type: "text",
1345
- "onUpdate:modelValue": u[0] || (u[0] = (m) => s.value = m),
1312
+ "onUpdate:modelValue": d[0] || (d[0] = (p) => s.value = p),
1346
1313
  placeholder: "Search...",
1347
1314
  class: "vs-multiselect-search vs-w-full"
1348
1315
  }, null, 512), [
@@ -1351,48 +1318,48 @@ const pe = /* @__PURE__ */ ye(Un, [["render", jn]]), zn = { class: "vs-multisele
1351
1318
  ]),
1352
1319
  _: 1
1353
1320
  }),
1354
- e.isLoading ? (g(), y("div", Xn, "Loading options...")) : (g(), y("ul", Yn, [
1355
- (g(!0), y(H, null, te(r.value, (m) => (g(), y("li", {
1356
- key: m,
1357
- onClick: ae((C) => d(m), ["stop"]),
1358
- class: W({ selected: l.value.includes(m) })
1321
+ e.isLoading ? (h(), w("div", Un, "Loading options...")) : (h(), w("ul", jn, [
1322
+ (h(!0), w(K, null, j(r.value, (p) => (h(), w("li", {
1323
+ key: p,
1324
+ onClick: le((b) => f(p), ["stop"]),
1325
+ class: W({ selected: l.value.includes(p) })
1359
1326
  }, [
1360
- h("span", Gn, F(m), 1),
1361
- l.value.includes(m) ? (g(), y("svg", Jn, [...u[1] || (u[1] = [
1362
- h("path", {
1327
+ g("span", Zn, D(p), 1),
1328
+ l.value.includes(p) ? (h(), w("svg", Qn, [...d[1] || (d[1] = [
1329
+ g("path", {
1363
1330
  "stroke-linecap": "round",
1364
1331
  "stroke-linejoin": "round",
1365
1332
  "stroke-width": "2",
1366
1333
  d: "M5 13l4 4L19 7"
1367
1334
  }, null, -1)
1368
- ])])) : D("", !0)
1369
- ], 10, Qn))), 128))
1335
+ ])])) : P("", !0)
1336
+ ], 10, zn))), 128))
1370
1337
  ]))
1371
1338
  ]));
1372
1339
  }
1373
- }), Ve = /* @__PURE__ */ new Map();
1374
- function to(e) {
1375
- const t = _(e.columnData || []), n = _(!1), o = () => n.value = !0, s = () => n.value = !1;
1340
+ }), Se = /* @__PURE__ */ new Map();
1341
+ function Yn(e) {
1342
+ const t = L(e.columnData || []), n = L(!1), o = () => n.value = !0, s = () => n.value = !1;
1376
1343
  async function l(r = !1) {
1377
1344
  if (!e.asyncOptions) return;
1378
- const i = e.cacheKey ?? "default";
1379
- if (!r && Ve.has(i)) {
1380
- t.value = Ve.get(i);
1345
+ const u = e.cacheKey ?? "default";
1346
+ if (!r && Se.has(u)) {
1347
+ t.value = Se.get(u);
1381
1348
  return;
1382
1349
  }
1383
1350
  try {
1384
1351
  o();
1385
- const f = await e.asyncOptions(), d = Array.isArray(f) ? f : [];
1386
- t.value = d, Ve.set(i, d);
1387
- } catch (f) {
1388
- console.error("Failed to load async filter options:", f);
1352
+ const c = await e.asyncOptions(), f = Array.isArray(c) ? c : [];
1353
+ t.value = f, Se.set(u, f);
1354
+ } catch (c) {
1355
+ console.error("Failed to load async filter options:", c);
1389
1356
  } finally {
1390
1357
  s();
1391
1358
  }
1392
1359
  }
1393
1360
  function a() {
1394
1361
  const r = e.cacheKey ?? "default";
1395
- Ve.delete(r);
1362
+ Se.delete(r);
1396
1363
  }
1397
1364
  return {
1398
1365
  columnOrAsyncOptions: t,
@@ -1401,34 +1368,34 @@ function to(e) {
1401
1368
  loadAsyncOptions: l
1402
1369
  };
1403
1370
  }
1404
- const no = {
1371
+ const Gn = {
1405
1372
  key: 0,
1406
1373
  class: "vs-filter-text"
1407
- }, oo = {
1374
+ }, Jn = {
1408
1375
  key: 0,
1409
1376
  class: "vs-pb-sm"
1410
- }, so = ["value"], lo = {
1377
+ }, _n = ["value"], eo = {
1411
1378
  key: 1,
1412
1379
  class: "vs-filter-multi"
1413
- }, ao = {
1380
+ }, to = {
1414
1381
  key: 2,
1415
1382
  class: "vs-filter-range"
1416
- }, ro = {
1383
+ }, no = {
1417
1384
  key: 0,
1418
1385
  class: "vs-pb-sm"
1419
- }, io = ["value"], uo = { key: 1 }, co = { class: "vs-operator-fixed" }, fo = { key: 4 }, vo = {
1386
+ }, oo = ["value"], so = { key: 1 }, lo = { class: "vs-operator-fixed" }, ao = { key: 4 }, ro = {
1420
1387
  key: 3,
1421
1388
  class: "vs-filter-date"
1422
- }, po = {
1389
+ }, io = {
1423
1390
  key: 0,
1424
1391
  class: "vs-pb-sm"
1425
- }, mo = ["value"], ho = { key: 1 }, go = { class: "vs-operator-fixed" }, yo = {
1392
+ }, uo = ["value"], co = { key: 1 }, fo = { class: "vs-operator-fixed" }, vo = {
1426
1393
  key: 4,
1427
1394
  class: "vs-muted vs-text-center vs-pt-sm"
1428
- }, wo = {
1395
+ }, mo = {
1429
1396
  key: 4,
1430
1397
  class: "vs-filter-actions"
1431
- }, bo = /* @__PURE__ */ fe({
1398
+ }, po = /* @__PURE__ */ _({
1432
1399
  __name: "VsDataTableFilterDropdown",
1433
1400
  props: {
1434
1401
  modelValue: {},
@@ -1436,13 +1403,12 @@ const no = {
1436
1403
  field: {},
1437
1404
  visible: { type: Boolean },
1438
1405
  operators: {},
1439
- anchorEl: {},
1440
1406
  columnData: { default: () => [] },
1441
1407
  asyncOptions: {}
1442
1408
  },
1443
1409
  emits: ["update:modelValue", "apply", "clear", "open", "close"],
1444
1410
  setup(e, { emit: t }) {
1445
- const n = e, o = t, { columnOrAsyncOptions: s, isLoading: l, loadAsyncOptions: a } = to({
1411
+ const n = e, o = t, { columnOrAsyncOptions: s, isLoading: l, loadAsyncOptions: a } = Yn({
1446
1412
  asyncOptions: n.asyncOptions,
1447
1413
  columnData: n.columnData,
1448
1414
  cacheKey: n.field
@@ -1462,8 +1428,8 @@ const no = {
1462
1428
  "date-range": ["between", "equals", "notEqual", "before", "after", "empty", "notEmpty"],
1463
1429
  custom: []
1464
1430
  };
1465
- function i(P) {
1466
- switch (P) {
1431
+ function u($) {
1432
+ switch ($) {
1467
1433
  case "notEqual":
1468
1434
  return "Not Equal";
1469
1435
  case "greaterThan":
@@ -1481,363 +1447,741 @@ const no = {
1481
1447
  case "notEmpty":
1482
1448
  return "Not Empty";
1483
1449
  default:
1484
- return P.charAt(0).toUpperCase() + P.slice(1);
1450
+ return $.charAt(0).toUpperCase() + $.slice(1);
1485
1451
  }
1486
1452
  }
1487
- const f = E(() => n.type === "custom" ? [] : n.operators?.length ? n.operators : r[n.type]), d = _(null), c = _(null), p = _(), v = _(!1);
1488
- ne(
1453
+ const c = T(() => n.type === "custom" ? [] : n.operators?.length ? n.operators : r[n.type]), f = L(null), i = L(null), m = L(), v = L(!1);
1454
+ G(
1489
1455
  () => n.visible,
1490
- async (P) => {
1491
- v.value = !!P, v.value ? (await Ct(), V(), n.asyncOptions && a()) : L();
1456
+ async ($) => {
1457
+ v.value = !!$, v.value ? (await Ct(), S(), n.asyncOptions && a()) : O();
1492
1458
  },
1493
1459
  { immediate: !0 }
1494
1460
  );
1495
- const u = _(he(n.type, n.modelValue));
1496
- ne(
1461
+ const d = L(me(n.type, n.modelValue));
1462
+ G(
1497
1463
  () => n.modelValue,
1498
- (P) => {
1499
- u.value = he(n.type, P);
1464
+ ($) => {
1465
+ d.value = me(n.type, $);
1500
1466
  },
1501
1467
  { immediate: !0 }
1502
1468
  );
1503
- function m() {
1469
+ function p() {
1504
1470
  o("open");
1505
1471
  }
1472
+ function b() {
1473
+ o("update:modelValue", { ...d.value }), o("apply", { ...d.value });
1474
+ }
1506
1475
  function C() {
1507
- o("update:modelValue", { ...u.value }), o("apply", { ...u.value });
1476
+ d.value = me(n.type), o("update:modelValue", { ...d.value }), o("clear"), k();
1508
1477
  }
1509
1478
  function k() {
1510
- u.value = he(n.type), o("update:modelValue", { ...u.value }), o("clear"), S();
1511
- }
1512
- function S() {
1513
1479
  o("close");
1514
1480
  }
1515
- function V() {
1516
- !d.value || !c.value || (p.value = Bn(d.value, c.value, () => {
1517
- Hn(d.value, c.value, {
1481
+ function S() {
1482
+ !f.value || !i.value || (m.value = Fn(f.value, i.value, () => {
1483
+ In(f.value, i.value, {
1518
1484
  placement: "bottom-start",
1519
- middleware: [qn(6), Wn(), In({ padding: 8 })]
1520
- }).then(({ x: P, y: w }) => {
1521
- Object.assign(c.value.style, {
1522
- left: `${P}px`,
1523
- top: `${w}px`,
1485
+ middleware: [Bn(6), Nn(), Mn({ padding: 8 })]
1486
+ }).then(({ x: $, y: x }) => {
1487
+ Object.assign(i.value.style, {
1488
+ left: `${$}px`,
1489
+ top: `${x}px`,
1524
1490
  position: "absolute",
1525
1491
  zIndex: 2e3
1526
1492
  });
1527
1493
  });
1528
1494
  }));
1529
1495
  }
1530
- function L() {
1531
- p.value?.(), p.value = void 0;
1496
+ function O() {
1497
+ m.value?.(), m.value = void 0;
1532
1498
  }
1533
- function A(P) {
1534
- const w = P.target;
1535
- v.value && d.value && c.value && !d.value.contains(w) && !c.value.contains(w) && S();
1499
+ function A($) {
1500
+ const x = $.target;
1501
+ v.value && f.value && i.value && !f.value.contains(x) && !i.value.contains(x) && k();
1536
1502
  }
1537
- function N(P) {
1538
- P.key === "Escape" && v.value && S();
1503
+ function M($) {
1504
+ $.key === "Escape" && v.value && k();
1539
1505
  }
1540
- return lt(() => {
1541
- document.addEventListener("click", A), document.addEventListener("keydown", N);
1542
- }), at(() => {
1543
- document.removeEventListener("click", A), document.removeEventListener("keydown", N), L();
1544
- }), (P, w) => (g(), y(H, null, [
1545
- h("span", {
1506
+ return st(() => {
1507
+ document.addEventListener("click", A), document.addEventListener("keydown", M);
1508
+ }), lt(() => {
1509
+ document.removeEventListener("click", A), document.removeEventListener("keydown", M), O();
1510
+ }), ($, x) => (h(), w(K, null, [
1511
+ g("span", {
1546
1512
  ref_key: "referenceRef",
1547
- ref: d,
1548
- class: W(["vs-column-filter", { "is-active": x(Kn)(u.value) }]),
1549
- onClick: ae(m, ["stop"])
1550
- }, [...w[13] || (w[13] = [
1551
- h("svg", {
1513
+ ref: f,
1514
+ class: W(["vs-column-filter", {
1515
+ "is-active": R(ot)(d.value),
1516
+ "in-active": !R(ot)(d.value)
1517
+ }]),
1518
+ onClick: le(p, ["stop"])
1519
+ }, [...x[13] || (x[13] = [
1520
+ g("svg", {
1552
1521
  xmlns: "http://www.w3.org/2000/svg",
1553
1522
  height: "24px",
1554
1523
  viewBox: "0 -960 960 960",
1555
1524
  width: "24px",
1556
- fill: "#e3e3e3"
1525
+ fill: "currentColor"
1557
1526
  }, [
1558
- h("path", { d: "M440-160q-17 0-28.5-11.5T400-200v-240L168-736q-15-20-4.5-42t36.5-22h560q26 0 36.5 22t-4.5 42L560-440v240q0 17-11.5 28.5T520-160h-80Zm40-308 198-252H282l198 252Zm0 0Z" })
1527
+ g("path", { d: "M440-160q-17 0-28.5-11.5T400-200v-240L168-736q-15-20-4.5-42t36.5-22h560q26 0 36.5 22t-4.5 42L560-440v240q0 17-11.5 28.5T520-160h-80Zm40-308 198-252H282l198 252Zm0 0Z" })
1559
1528
  ], -1)
1560
1529
  ])], 2),
1561
- (g(), ve(kt, { to: "body" }, [
1562
- ie(Rt, { name: "fade" }, {
1563
- default: se(() => [
1564
- v.value ? (g(), y("div", {
1530
+ (h(), de(kt, { to: "body" }, [
1531
+ X(Rt, { name: "fade" }, {
1532
+ default: H(() => [
1533
+ v.value ? (h(), w("div", {
1565
1534
  key: 0,
1566
1535
  ref_key: "floatingRef",
1567
- ref: c,
1536
+ ref: i,
1568
1537
  class: "vs-filter-dropdown",
1569
1538
  style: { position: "absolute", "z-index": "1000" },
1570
- onClick: w[12] || (w[12] = ae(() => {
1539
+ onClick: x[12] || (x[12] = le(() => {
1571
1540
  }, ["stop"]))
1572
1541
  }, [
1573
- u.value.type === "text" ? (g(), y("div", no, [
1574
- f.value.length > 1 ? (g(), y("div", oo, [
1575
- U(h("select", {
1576
- "onUpdate:modelValue": w[0] || (w[0] = (R) => u.value.operator = R),
1542
+ d.value.type === "text" ? (h(), w("div", Gn, [
1543
+ c.value.length > 1 ? (h(), w("div", Jn, [
1544
+ U(g("select", {
1545
+ "onUpdate:modelValue": x[0] || (x[0] = (y) => d.value.operator = y),
1577
1546
  class: "vs-operator-select vs-mx-auto vs-w-full"
1578
1547
  }, [
1579
- (g(!0), y(H, null, te(f.value, (R) => (g(), y("option", {
1580
- key: R,
1581
- value: R
1582
- }, F(i(R)), 9, so))), 128))
1548
+ (h(!0), w(K, null, j(c.value, (y) => (h(), w("option", {
1549
+ key: y,
1550
+ value: y
1551
+ }, D(u(y)), 9, _n))), 128))
1583
1552
  ], 512), [
1584
- [qe, u.value.operator]
1553
+ [Me, d.value.operator]
1585
1554
  ])
1586
- ])) : D("", !0),
1587
- ie(pe, {
1555
+ ])) : P("", !0),
1556
+ X(fe, {
1588
1557
  direction: "row",
1589
1558
  class: "mb-6"
1590
1559
  }, {
1591
- default: se(() => [
1592
- U(h("input", {
1560
+ default: H(() => [
1561
+ U(g("input", {
1593
1562
  type: "text",
1594
- "onUpdate:modelValue": w[1] || (w[1] = (R) => u.value.value = R),
1563
+ "onUpdate:modelValue": x[1] || (x[1] = (y) => d.value.value = y),
1595
1564
  placeholder: "Search...",
1596
1565
  class: "vs-input vs-mx-auto vs-w-full"
1597
1566
  }, null, 512), [
1598
- [oe, u.value.value]
1567
+ [oe, d.value.value]
1599
1568
  ])
1600
1569
  ]),
1601
1570
  _: 1
1602
1571
  })
1603
- ])) : u.value.type === "multi-select" ? (g(), y("div", lo, [
1604
- e.asyncOptions ? (g(), y("button", {
1572
+ ])) : d.value.type === "multi-select" ? (h(), w("div", eo, [
1573
+ e.asyncOptions ? (h(), w("button", {
1605
1574
  key: 0,
1606
- onClick: w[2] || (w[2] = (R) => x(a)(!0))
1607
- }, "🔄 Reload")) : D("", !0),
1608
- ie(eo, {
1609
- isLoading: x(l),
1610
- columnData: x(s),
1611
- modelValue: u.value.value,
1612
- "onUpdate:modelValue": w[3] || (w[3] = (R) => u.value.value = R),
1575
+ onClick: x[2] || (x[2] = (y) => R(a)(!0))
1576
+ }, "🔄 Reload")) : P("", !0),
1577
+ X(Xn, {
1578
+ isLoading: R(l),
1579
+ columnData: R(s),
1580
+ modelValue: d.value.value,
1581
+ "onUpdate:modelValue": x[3] || (x[3] = (y) => d.value.value = y),
1613
1582
  placeholder: "Select values..."
1614
1583
  }, null, 8, ["isLoading", "columnData", "modelValue"])
1615
- ])) : u.value.type === "number-range" ? (g(), y("div", ao, [
1616
- f.value.length > 1 ? (g(), y("div", ro, [
1617
- U(h("select", {
1618
- "onUpdate:modelValue": w[4] || (w[4] = (R) => u.value.operator = R),
1584
+ ])) : d.value.type === "number-range" ? (h(), w("div", to, [
1585
+ c.value.length > 1 ? (h(), w("div", no, [
1586
+ U(g("select", {
1587
+ "onUpdate:modelValue": x[4] || (x[4] = (y) => d.value.operator = y),
1619
1588
  class: "vs-operator-select vs-w-full"
1620
1589
  }, [
1621
- (g(!0), y(H, null, te(f.value, (R) => (g(), y("option", {
1622
- key: R,
1623
- value: R
1624
- }, F(i(R)), 9, io))), 128))
1590
+ (h(!0), w(K, null, j(c.value, (y) => (h(), w("option", {
1591
+ key: y,
1592
+ value: y
1593
+ }, D(u(y)), 9, oo))), 128))
1625
1594
  ], 512), [
1626
- [qe, u.value.operator]
1595
+ [Me, d.value.operator]
1627
1596
  ])
1628
- ])) : (g(), y("div", uo, [
1629
- h("span", co, F(u.value.operator), 1)
1597
+ ])) : (h(), w("div", so, [
1598
+ g("span", lo, D(d.value.operator), 1)
1630
1599
  ])),
1631
- u.value.operator === "between" ? (g(), ve(pe, {
1600
+ d.value.operator === "between" ? (h(), de(fe, {
1632
1601
  key: 2,
1633
1602
  justify: "between",
1634
1603
  align: "center",
1635
1604
  gap: "4",
1636
1605
  class: "mb-6"
1637
1606
  }, {
1638
- default: se(() => [
1639
- U(h("input", {
1607
+ default: H(() => [
1608
+ U(g("input", {
1640
1609
  type: "number",
1641
- "onUpdate:modelValue": w[5] || (w[5] = (R) => u.value.min = R),
1610
+ "onUpdate:modelValue": x[5] || (x[5] = (y) => d.value.min = y),
1642
1611
  placeholder: "Min",
1643
1612
  class: "vs-input vs-w-full"
1644
1613
  }, null, 512), [
1645
1614
  [
1646
1615
  oe,
1647
- u.value.min,
1616
+ d.value.min,
1648
1617
  void 0,
1649
1618
  { number: !0 }
1650
1619
  ]
1651
1620
  ]),
1652
- w[14] || (w[14] = h("span", null, "-", -1)),
1653
- U(h("input", {
1621
+ x[14] || (x[14] = g("span", null, "-", -1)),
1622
+ U(g("input", {
1654
1623
  type: "number",
1655
- "onUpdate:modelValue": w[6] || (w[6] = (R) => u.value.max = R),
1624
+ "onUpdate:modelValue": x[6] || (x[6] = (y) => d.value.max = y),
1656
1625
  placeholder: "Max",
1657
1626
  class: "vs-input vs-w-full"
1658
1627
  }, null, 512), [
1659
1628
  [
1660
1629
  oe,
1661
- u.value.max,
1630
+ d.value.max,
1662
1631
  void 0,
1663
1632
  { number: !0 }
1664
1633
  ]
1665
1634
  ])
1666
1635
  ]),
1667
1636
  _: 1
1668
- })) : ["equals", "notEqual", "greaterThan", "lessThan"].includes(u.value.operator || "") ? (g(), ve(pe, {
1637
+ })) : ["equals", "notEqual", "greaterThan", "lessThan"].includes(d.value.operator || "") ? (h(), de(fe, {
1669
1638
  key: 3,
1670
1639
  direction: "row"
1671
1640
  }, {
1672
- default: se(() => [
1673
- U(h("input", {
1641
+ default: H(() => [
1642
+ U(g("input", {
1674
1643
  type: "number",
1675
- "onUpdate:modelValue": w[7] || (w[7] = (R) => u.value.value = R),
1644
+ "onUpdate:modelValue": x[7] || (x[7] = (y) => d.value.value = y),
1676
1645
  placeholder: "Enter number",
1677
1646
  class: "vs-input vs-w-full"
1678
1647
  }, null, 512), [
1679
1648
  [
1680
1649
  oe,
1681
- u.value.value,
1650
+ d.value.value,
1682
1651
  void 0,
1683
1652
  { number: !0 }
1684
1653
  ]
1685
1654
  ])
1686
1655
  ]),
1687
1656
  _: 1
1688
- })) : ["empty", "notEmpty"].includes(u.value.operator || "") ? (g(), y("div", fo, [...w[15] || (w[15] = [
1689
- h("div", { class: "vs-muted vs-text-center vs-pt-sm" }, "No input required", -1)
1690
- ])])) : D("", !0)
1691
- ])) : u.value.type === "date-range" ? (g(), y("div", vo, [
1692
- f.value.length > 1 ? (g(), y("div", po, [
1693
- U(h("select", {
1694
- "onUpdate:modelValue": w[8] || (w[8] = (R) => u.value.operator = R),
1657
+ })) : ["empty", "notEmpty"].includes(d.value.operator || "") ? (h(), w("div", ao, [...x[15] || (x[15] = [
1658
+ g("div", { class: "vs-muted vs-text-center vs-pt-sm" }, "No input required", -1)
1659
+ ])])) : P("", !0)
1660
+ ])) : d.value.type === "date-range" ? (h(), w("div", ro, [
1661
+ c.value.length > 1 ? (h(), w("div", io, [
1662
+ U(g("select", {
1663
+ "onUpdate:modelValue": x[8] || (x[8] = (y) => d.value.operator = y),
1695
1664
  class: "vs-operator-select vs-w-full"
1696
1665
  }, [
1697
- (g(!0), y(H, null, te(f.value, (R) => (g(), y("option", {
1698
- key: R,
1699
- value: R
1700
- }, F(i(R)), 9, mo))), 128))
1666
+ (h(!0), w(K, null, j(c.value, (y) => (h(), w("option", {
1667
+ key: y,
1668
+ value: y
1669
+ }, D(u(y)), 9, uo))), 128))
1701
1670
  ], 512), [
1702
- [qe, u.value.operator]
1671
+ [Me, d.value.operator]
1703
1672
  ])
1704
- ])) : (g(), y("div", ho, [
1705
- h("span", go, F(u.value.operator), 1)
1673
+ ])) : (h(), w("div", co, [
1674
+ g("span", fo, D(d.value.operator), 1)
1706
1675
  ])),
1707
- u.value.operator === "between" ? (g(), ve(pe, {
1676
+ d.value.operator === "between" ? (h(), de(fe, {
1708
1677
  key: 2,
1709
1678
  justify: "between",
1710
1679
  align: "center",
1711
1680
  gap: "4",
1712
1681
  class: "mb-6"
1713
1682
  }, {
1714
- default: se(() => [
1715
- U(h("input", {
1683
+ default: H(() => [
1684
+ U(g("input", {
1716
1685
  type: "date",
1717
- "onUpdate:modelValue": w[9] || (w[9] = (R) => u.value.start = R),
1686
+ "onUpdate:modelValue": x[9] || (x[9] = (y) => d.value.start = y),
1718
1687
  class: "vs-input vs-w-full"
1719
1688
  }, null, 512), [
1720
- [oe, u.value.start]
1689
+ [oe, d.value.start]
1721
1690
  ]),
1722
- w[16] || (w[16] = h("span", null, "-", -1)),
1723
- U(h("input", {
1691
+ x[16] || (x[16] = g("span", null, "-", -1)),
1692
+ U(g("input", {
1724
1693
  type: "date",
1725
- "onUpdate:modelValue": w[10] || (w[10] = (R) => u.value.end = R),
1694
+ "onUpdate:modelValue": x[10] || (x[10] = (y) => d.value.end = y),
1726
1695
  class: "vs-input vs-w-full"
1727
1696
  }, null, 512), [
1728
- [oe, u.value.end]
1697
+ [oe, d.value.end]
1729
1698
  ])
1730
1699
  ]),
1731
1700
  _: 1
1732
- })) : ["equals", "notEqual", "before", "after"].includes(u.value.operator || "") ? (g(), ve(pe, {
1701
+ })) : ["equals", "notEqual", "before", "after"].includes(d.value.operator || "") ? (h(), de(fe, {
1733
1702
  key: 3,
1734
1703
  direction: "row",
1735
1704
  class: "vs-filter-single-date"
1736
1705
  }, {
1737
- default: se(() => [
1738
- U(h("input", {
1706
+ default: H(() => [
1707
+ U(g("input", {
1739
1708
  type: "date",
1740
- "onUpdate:modelValue": w[11] || (w[11] = (R) => u.value.value = R),
1709
+ "onUpdate:modelValue": x[11] || (x[11] = (y) => d.value.value = y),
1741
1710
  class: "vs-input vs-w-full"
1742
1711
  }, null, 512), [
1743
- [oe, u.value.value]
1712
+ [oe, d.value.value]
1744
1713
  ])
1745
1714
  ]),
1746
1715
  _: 1
1747
- })) : ["empty", "notEmpty"].includes(u.value.operator || "") ? (g(), y("div", yo, " No date input required ")) : D("", !0)
1748
- ])) : D("", !0),
1749
- u.value.type !== "custom" ? (g(), y("div", wo, [
1750
- h("button", {
1716
+ })) : ["empty", "notEmpty"].includes(d.value.operator || "") ? (h(), w("div", vo, " No date input required ")) : P("", !0)
1717
+ ])) : P("", !0),
1718
+ d.value.type !== "custom" ? (h(), w("div", mo, [
1719
+ g("button", {
1751
1720
  class: "vs-btn vs-btn-primary",
1752
- onClick: C
1721
+ onClick: b
1753
1722
  }, "Apply"),
1754
- h("button", {
1723
+ g("button", {
1755
1724
  class: "vs-btn vs-btn-secondary",
1756
- onClick: k
1725
+ onClick: C
1757
1726
  }, "Clear")
1758
- ])) : D("", !0),
1759
- ee(P.$slots, "custom", {
1760
- filter: u.value,
1761
- apply: C,
1762
- clear: k
1727
+ ])) : P("", !0),
1728
+ N($.$slots, "custom", {
1729
+ filter: d.value,
1730
+ apply: b,
1731
+ clear: C
1763
1732
  }, void 0, !0)
1764
- ], 512)) : D("", !0)
1733
+ ], 512)) : P("", !0)
1765
1734
  ]),
1766
1735
  _: 3
1767
1736
  })
1768
1737
  ]))
1769
1738
  ], 64));
1770
1739
  }
1771
- }), xo = /* @__PURE__ */ ye(bo, [["__scopeId", "data-v-856f7378"]]);
1772
- function Co(e, t, n) {
1773
- const o = _(1), s = _(e.sort ?? []);
1774
- ne(
1740
+ }), go = /* @__PURE__ */ ne(po, [["__scopeId", "data-v-1e9d83a6"]]), ho = {
1741
+ key: 0,
1742
+ class: "vs-expand-column",
1743
+ style: { width: "5%" }
1744
+ }, wo = {
1745
+ key: 1,
1746
+ class: "vs-checkbox-column",
1747
+ style: { width: "5%" }
1748
+ }, yo = { class: "vs-checkbox" }, bo = ["id", "checked", "indeterminate"], xo = ["for"], Co = ["onClick"], ko = { class: "vs-header-content" }, Ro = { class: "vs-header-label" }, So = {
1749
+ key: 0,
1750
+ class: "vs-sort-icons"
1751
+ }, To = {
1752
+ key: 1,
1753
+ class: "vs-sort-priority"
1754
+ }, $o = /* @__PURE__ */ _({
1755
+ __name: "VsDataTableHeader",
1756
+ props: {
1757
+ columns: {},
1758
+ expandable: { type: Boolean },
1759
+ isItemSelectedControlled: { type: Boolean },
1760
+ isAllChecked: { type: Boolean },
1761
+ isSomeChecked: { type: Boolean },
1762
+ tablename: {},
1763
+ sortHelpers: {},
1764
+ filters: {},
1765
+ anchorEl: {},
1766
+ rows: {},
1767
+ headerClass: {}
1768
+ },
1769
+ emits: ["toggleAll", "applyFilter", "clearFilter", "update:filters"],
1770
+ setup(e, { emit: t }) {
1771
+ const n = e, o = t;
1772
+ function s(c) {
1773
+ o("toggleAll", c);
1774
+ }
1775
+ const l = T({
1776
+ get: () => n.filters,
1777
+ set: (c) => o("update:filters", c)
1778
+ }), a = L(null);
1779
+ function r(c) {
1780
+ a.value = c;
1781
+ }
1782
+ function u(c) {
1783
+ a.value === c && (a.value = null);
1784
+ }
1785
+ return (c, f) => (h(), w("thead", null, [
1786
+ g("tr", null, [
1787
+ e.expandable ? (h(), w("th", ho)) : P("", !0),
1788
+ e.isItemSelectedControlled ? (h(), w("th", wo, [
1789
+ g("div", yo, [
1790
+ g("input", {
1791
+ type: "checkbox",
1792
+ id: e.tablename + "-main-checkbox",
1793
+ checked: e.isAllChecked,
1794
+ indeterminate: e.isSomeChecked,
1795
+ onChange: s
1796
+ }, null, 40, bo),
1797
+ g("label", {
1798
+ for: e.tablename + "-main-checkbox"
1799
+ }, null, 8, xo)
1800
+ ])
1801
+ ])) : P("", !0),
1802
+ (h(!0), w(K, null, j(e.columns, (i) => (h(), w("th", {
1803
+ key: i.field,
1804
+ onClick: (m) => i.sortable ? e.sortHelpers.handleSort(i.field, m) : null,
1805
+ style: St({ width: i.width + "%" }),
1806
+ class: W([i.sortable ? "vs-sortable" : "", e.headerClass])
1807
+ }, [
1808
+ N(c.$slots, `header-${i.field}`, { column: i }, () => [
1809
+ g("div", ko, [
1810
+ g("span", Ro, D(i.label), 1),
1811
+ i.sortable ? (h(), w("div", So, [
1812
+ g("span", {
1813
+ class: W(["vs-sort-icon vs-sort-asc", {
1814
+ "vs-active": e.sortHelpers.isColumnSorted(i.field) && e.sortHelpers.getSortOrder(i.field) === "asc"
1815
+ }])
1816
+ }, [...f[0] || (f[0] = [
1817
+ g("svg", {
1818
+ xmlns: "http://www.w3.org/2000/svg",
1819
+ height: "24px",
1820
+ viewBox: "0 -960 960 960",
1821
+ width: "24px",
1822
+ fill: "var(--vs-gray-800)"
1823
+ }, [
1824
+ g("path", { d: "m280-400 200-200 200 200H280Z" })
1825
+ ], -1)
1826
+ ])], 2),
1827
+ g("span", {
1828
+ class: W(["vs-sort-icon vs-sort-desc", {
1829
+ "vs-active": e.sortHelpers.isColumnSorted(i.field) && e.sortHelpers.getSortOrder(i.field) === "desc"
1830
+ }])
1831
+ }, [...f[1] || (f[1] = [
1832
+ g("svg", {
1833
+ xmlns: "http://www.w3.org/2000/svg",
1834
+ height: "24px",
1835
+ viewBox: "0 -960 960 960",
1836
+ width: "24px"
1837
+ }, [
1838
+ g("path", { d: "M480-360 280-560h400L480-360Z" })
1839
+ ], -1)
1840
+ ])], 2)
1841
+ ])) : P("", !0),
1842
+ e.sortHelpers.getSortPriority(i.field) !== null ? (h(), w("span", To, D(e.sortHelpers.getSortPriority(i.field)), 1)) : P("", !0),
1843
+ i.filter ? (h(), de(go, {
1844
+ key: 2,
1845
+ type: i.filter.type,
1846
+ "async-options": i.filter.asyncOptions,
1847
+ field: i.field,
1848
+ operators: i.filter.operators,
1849
+ modelValue: l.value[i.field],
1850
+ "onUpdate:modelValue": (m) => l.value[i.field] = m,
1851
+ visible: a.value === i.field,
1852
+ "column-data": e.rows.map((m) => m[i.field]),
1853
+ onApply: (m) => {
1854
+ o("applyFilter", i.field, m);
1855
+ },
1856
+ onClear: () => {
1857
+ o("clearFilter", i.field);
1858
+ },
1859
+ onClose: (m) => u(i.field),
1860
+ onOpen: (m) => r(i.field)
1861
+ }, Ie({ _: 2 }, [
1862
+ i.filter.custom ? {
1863
+ name: "custom",
1864
+ fn: H(({ filter: m, apply: v, clear: d }) => [
1865
+ N(c.$slots, i.filter.custom, {
1866
+ filter: m,
1867
+ apply: v,
1868
+ clear: d
1869
+ }, void 0, !0)
1870
+ ]),
1871
+ key: "0"
1872
+ } : void 0
1873
+ ]), 1032, ["type", "async-options", "field", "operators", "modelValue", "onUpdate:modelValue", "visible", "column-data", "onApply", "onClear", "onClose", "onOpen"])) : P("", !0)
1874
+ ])
1875
+ ], !0)
1876
+ ], 14, Co))), 128))
1877
+ ])
1878
+ ]));
1879
+ }
1880
+ }), Vo = /* @__PURE__ */ ne($o, [["__scopeId", "data-v-1776a5d5"]]), Oo = { key: 0 }, Ao = ["colspan"], Eo = { key: 1 }, Po = ["colspan"], Do = { class: "vs-no-data-message" }, Lo = { class: "vs-no-data-description" }, Fo = ["onClick"], Bo = ["aria-expanded", "aria-controls", "onClick"], Mo = { key: 0 }, No = { key: 1 }, Io = { class: "vs-checkbox" }, qo = ["id", "value", "checked", "onChange"], Ho = ["for"], Ko = {
1881
+ key: 0,
1882
+ class: "vs-row-expanded"
1883
+ }, Wo = ["colspan"], Uo = {
1884
+ key: 1,
1885
+ class: "vs-expanded-content"
1886
+ }, jo = /* @__PURE__ */ _({
1887
+ __name: "VsDataTableBody",
1888
+ props: {
1889
+ loading: { type: Boolean },
1890
+ loadingText: {},
1891
+ noDataText: {},
1892
+ noDataDescription: {},
1893
+ paginatedRows: {},
1894
+ totalColumns: {},
1895
+ expandable: { type: Boolean },
1896
+ isItemSelectedControlled: { type: Boolean },
1897
+ selectedItems: {},
1898
+ tablename: {},
1899
+ columns: {},
1900
+ rowKey: { type: [String, Function] },
1901
+ rowClass: {},
1902
+ cellClass: {},
1903
+ hasRowClick: { type: Boolean },
1904
+ getRowKey: { type: Function },
1905
+ getValue: { type: Function },
1906
+ isRowExpanded: { type: Function },
1907
+ isRowLoading: { type: Function },
1908
+ toggleRowExpansion: { type: Function },
1909
+ toggleRow: { type: Function },
1910
+ isRowSelected: { type: Function }
1911
+ },
1912
+ emits: ["row-click"],
1913
+ setup(e, { emit: t }) {
1914
+ const n = e, o = T(() => n.rowKey ?? "id");
1915
+ return (s, l) => (h(), w("tbody", null, [
1916
+ e.loading ? (h(), w("tr", Oo, [
1917
+ g("td", {
1918
+ colspan: e.totalColumns,
1919
+ class: "vs-loading"
1920
+ }, [
1921
+ l[2] || (l[2] = g("div", { class: "vs-spinner" }, null, -1)),
1922
+ g("span", null, D(e.loadingText), 1)
1923
+ ], 8, Ao)
1924
+ ])) : e.paginatedRows.length ? (h(!0), w(K, { key: 2 }, j(e.paginatedRows, (a, r) => (h(), w(K, {
1925
+ key: e.getRowKey(a, r)
1926
+ }, [
1927
+ g("tr", {
1928
+ class: W([
1929
+ e.rowClass,
1930
+ { "vs-row-clickable": e.hasRowClick },
1931
+ { "vs-row-selected": e.isRowSelected(a, e.selectedItems, o.value) }
1932
+ ]),
1933
+ onClick: (u) => s.$emit("row-click", a, r)
1934
+ }, [
1935
+ e.expandable ? (h(), w("td", {
1936
+ key: 0,
1937
+ class: "vs-expand-column",
1938
+ onClick: l[0] || (l[0] = le(() => {
1939
+ }, ["stop"]))
1940
+ }, [
1941
+ g("button", {
1942
+ class: "vs-expand-btn",
1943
+ type: "button",
1944
+ "aria-expanded": e.isRowExpanded(a, r),
1945
+ "aria-controls": `row-details-${e.getRowKey(a, r)}`,
1946
+ onClick: le((u) => e.toggleRowExpansion(a, r), ["stop"])
1947
+ }, [
1948
+ e.isRowExpanded(a, r) ? (h(), w("span", Mo, [...l[4] || (l[4] = [
1949
+ g("svg", {
1950
+ xmlns: "http://www.w3.org/2000/svg",
1951
+ height: "24px",
1952
+ viewBox: "0 -960 960 960",
1953
+ width: "24px",
1954
+ fill: "var(--vs-gray-800)"
1955
+ }, [
1956
+ g("path", { d: "M480-345 240-585l56-56 184 183 184-183 56 56-240 240Z" })
1957
+ ], -1)
1958
+ ])])) : (h(), w("span", No, [...l[5] || (l[5] = [
1959
+ g("svg", {
1960
+ xmlns: "http://www.w3.org/2000/svg",
1961
+ height: "24px",
1962
+ viewBox: "0 -960 960 960",
1963
+ width: "24px",
1964
+ fill: "var(--vs-gray-800)"
1965
+ }, [
1966
+ g("path", { d: "M504-480 320-664l56-56 240 240-240 240-56-56 184-184Z" })
1967
+ ], -1)
1968
+ ])]))
1969
+ ], 8, Bo)
1970
+ ])) : P("", !0),
1971
+ e.isItemSelectedControlled ? (h(), w("td", {
1972
+ key: 1,
1973
+ onClick: l[1] || (l[1] = le(() => {
1974
+ }, ["stop"])),
1975
+ class: "vs-checkbox-column"
1976
+ }, [
1977
+ g("div", Io, [
1978
+ g("input", {
1979
+ type: "checkbox",
1980
+ id: e.tablename + "-checkbox-" + e.getRowKey(a, r),
1981
+ value: a,
1982
+ checked: e.selectedItems.some((u, c) => e.getRowKey(u, c) === e.getRowKey(a, r)),
1983
+ onChange: (u) => e.toggleRow(a, r)
1984
+ }, null, 40, qo),
1985
+ g("label", {
1986
+ for: e.tablename + "-checkbox-" + e.getRowKey(a, r)
1987
+ }, null, 8, Ho)
1988
+ ])
1989
+ ])) : P("", !0),
1990
+ (h(!0), w(K, null, j(e.columns, (u) => (h(), w("td", {
1991
+ key: u.field,
1992
+ class: W(e.cellClass)
1993
+ }, [
1994
+ N(s.$slots, `cell-${u.field}`, {
1995
+ item: a,
1996
+ value: e.getValue(a, u.field),
1997
+ column: u,
1998
+ index: r
1999
+ }, () => [
2000
+ je(D(e.getValue(a, u.field)), 1)
2001
+ ], !0)
2002
+ ], 2))), 128))
2003
+ ], 10, Fo),
2004
+ e.expandable ? (h(), w(K, { key: 0 }, [
2005
+ e.isRowExpanded(a, r) ? (h(), w("tr", Ko, [
2006
+ g("td", {
2007
+ colspan: e.totalColumns,
2008
+ class: "vs-expanded-cell"
2009
+ }, [
2010
+ e.isRowLoading(a, r) ? N(s.$slots, "row-expanded-loader", {
2011
+ key: 0,
2012
+ item: a,
2013
+ index: r
2014
+ }, () => [
2015
+ l[6] || (l[6] = g("div", { class: "vs-loader-bar" }, [
2016
+ g("div", { class: "vs-loader-bar-inner" })
2017
+ ], -1))
2018
+ ], !0) : (h(), w("div", Uo, [
2019
+ N(s.$slots, "row-expanded", {
2020
+ item: a,
2021
+ index: r
2022
+ }, () => [
2023
+ l[7] || (l[7] = je(" Expanded details for row ", -1)),
2024
+ g("b", null, D(e.getRowKey(a, r)), 1)
2025
+ ], !0)
2026
+ ]))
2027
+ ], 8, Wo)
2028
+ ])) : P("", !0)
2029
+ ], 64)) : P("", !0)
2030
+ ], 64))), 128)) : (h(), w("tr", Eo, [
2031
+ g("td", {
2032
+ colspan: e.totalColumns,
2033
+ class: "vs-no-data"
2034
+ }, [
2035
+ N(s.$slots, "no-data", {}, () => [
2036
+ l[3] || (l[3] = g("div", { class: "vs-no-data-icon" }, [
2037
+ g("svg", {
2038
+ viewBox: "0 0 24 24",
2039
+ fill: "currentColor"
2040
+ }, [
2041
+ g("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" })
2042
+ ])
2043
+ ], -1)),
2044
+ g("div", Do, D(e.noDataText), 1),
2045
+ g("div", Lo, D(e.noDataDescription), 1)
2046
+ ], !0)
2047
+ ], 8, Po)
2048
+ ]))
2049
+ ]));
2050
+ }
2051
+ }), zo = /* @__PURE__ */ ne(jo, [["__scopeId", "data-v-149f0fb5"]]), Zo = { class: "vs-search" }, Qo = ["placeholder", "value"], Xo = /* @__PURE__ */ _({
2052
+ __name: "VsSearch",
2053
+ props: {
2054
+ modelValue: {},
2055
+ placeholder: {}
2056
+ },
2057
+ emits: ["update:modelValue", "inputTyped"],
2058
+ setup(e, { emit: t }) {
2059
+ const n = t, o = (s) => {
2060
+ const l = s.target;
2061
+ n("update:modelValue", l.value), n("inputTyped", l.value);
2062
+ };
2063
+ return (s, l) => (h(), w("div", Zo, [
2064
+ l[0] || (l[0] = g("div", { class: "vs-search-icon" }, [
2065
+ g("svg", {
2066
+ xmlns: "http://www.w3.org/2000/svg",
2067
+ height: "22px",
2068
+ viewBox: "0 -960 960 960",
2069
+ width: "22px",
2070
+ fill: "#e3e3e3"
2071
+ }, [
2072
+ g("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" })
2073
+ ])
2074
+ ], -1)),
2075
+ g("input", {
2076
+ type: "text",
2077
+ class: "vs-search-input",
2078
+ placeholder: e.placeholder,
2079
+ value: e.modelValue,
2080
+ onInput: o
2081
+ }, null, 40, Qo)
2082
+ ]));
2083
+ }
2084
+ }), Yo = /* @__PURE__ */ ne(Xo, [["__scopeId", "data-v-60b73b45"]]), Go = { class: "vs-datatable-toolbar vs-layout-row" }, Jo = { class: "vs-layout-start" }, _o = {
2085
+ key: 0,
2086
+ class: "vs-search-container"
2087
+ }, es = { class: "vs-layout-end" }, ts = /* @__PURE__ */ _({
2088
+ __name: "VsDataTableToolbar",
2089
+ props: {
2090
+ showSearch: { type: Boolean },
2091
+ searchQuery: {},
2092
+ searchPlaceholder: {},
2093
+ searchClass: {}
2094
+ },
2095
+ emits: ["update:searchQuery", "search"],
2096
+ setup(e, { emit: t }) {
2097
+ const n = t, o = (s) => {
2098
+ n("update:searchQuery", s), n("search", s);
2099
+ };
2100
+ return (s, l) => (h(), w("div", Go, [
2101
+ g("div", Jo, [
2102
+ e.showSearch ? (h(), w("div", _o, [
2103
+ X(Yo, {
2104
+ "model-value": e.searchQuery,
2105
+ "onUpdate:modelValue": o,
2106
+ placeholder: e.searchPlaceholder,
2107
+ class: W(e.searchClass)
2108
+ }, null, 8, ["model-value", "placeholder", "class"])
2109
+ ])) : P("", !0),
2110
+ N(s.$slots, "left", {}, void 0, !0)
2111
+ ]),
2112
+ g("div", es, [
2113
+ N(s.$slots, "right", {}, void 0, !0)
2114
+ ])
2115
+ ]));
2116
+ }
2117
+ }), ns = /* @__PURE__ */ ne(ts, [["__scopeId", "data-v-8524b8f7"]]);
2118
+ function os(e, t, n) {
2119
+ const o = L(1), s = L(e.sort ? [...e.sort] : []);
2120
+ G(
1775
2121
  () => e.sort,
1776
- (c) => {
1777
- c && (s.value = [...c]);
2122
+ (i) => {
2123
+ i && (s.value = [...i]);
1778
2124
  },
1779
2125
  { deep: !0 }
1780
2126
  );
1781
- const l = E(
2127
+ const l = T(
1782
2128
  () => e.serverOptions?.sort ?? s.value ?? []
1783
2129
  );
1784
2130
  return {
1785
- // processedRows,
1786
2131
  activeSort: l,
1787
2132
  sortHelpers: {
1788
- isColumnSorted: (c) => l.value.some((p) => p.field === c),
1789
- getSortPriority: (c) => {
1790
- const p = l.value.find((v) => v.field === c);
1791
- return p ? p.priority ?? null : null;
2133
+ isColumnSorted: (i) => l.value.some((m) => m.field === i),
2134
+ getSortPriority: (i) => {
2135
+ const m = l.value.find((v) => v.field === i);
2136
+ return m ? m.priority ?? null : null;
1792
2137
  },
1793
- getSortOrder: (c) => l.value.find((p) => p.field === c)?.order ?? null,
1794
- handleSort: (c, p) => {
1795
- let v = [];
1796
- e.serverOptions ? v = [...e.serverOptions.sort ?? []] : e.sort && (v = [...e.sort]);
1797
- const u = v.findIndex((m) => m.field === c);
1798
- p.shiftKey ? u === -1 ? v.push({ field: c, order: "asc" }) : v[u]?.order === "asc" ? v[u].order = "desc" : v.splice(u, 1) : u === -1 ? v = [{ field: c, order: "asc" }] : v[u]?.order === "asc" ? v = [{ field: c, order: "desc" }] : v = [], v = v.map((m, C) => ({ ...m, priority: C + 1 })), e.serverOptions ? t("update:serverOptions", { ...e.serverOptions, sort: v }) : t("update:sort", v), n.value = o.value, t("sortChanged", { sort: v });
2138
+ getSortOrder: (i) => l.value.find((m) => m.field === i)?.order ?? null,
2139
+ handleSort: (i, m) => {
2140
+ let v = [...s.value];
2141
+ const d = v.findIndex((p) => p.field === i);
2142
+ m.shiftKey ? d === -1 ? v.push({ field: i, order: "asc" }) : v[d]?.order === "asc" ? v[d].order = "desc" : v.splice(d, 1) : d === -1 ? v = [{ field: i, order: "asc" }] : v[d]?.order === "asc" ? v = [{ field: i, order: "desc" }] : v = [], v = v.map((p, b) => ({ ...p, priority: b + 1 })), s.value = [...v], e.serverOptions ? t("update:serverOptions", { ...e.serverOptions, sort: v }) : t("update:sort", v), n.value = o.value, t("sortChanged", { sort: v });
1799
2143
  }
1800
2144
  }
1801
2145
  };
1802
2146
  }
1803
- function ko(e, t, n, o, s) {
1804
- const l = E({
2147
+ function ss(e, t, n, o, s) {
2148
+ const l = T({
1805
2149
  get: () => e.serverItemsLength !== void 0 ? e.serverItemsLength : s.value.length,
1806
- set: (d) => {
1807
- e.serverItemsLength !== void 0 && t("update:serverItemsLength", d);
2150
+ set: (f) => {
2151
+ e.serverItemsLength !== void 0 && t("update:serverItemsLength", f);
1808
2152
  }
1809
- }), a = E({
2153
+ }), a = T({
1810
2154
  get: () => e.serverOptions?.page ?? n.value,
1811
- set: (d) => {
1812
- e.serverOptions ? t("update:serverOptions", { ...e.serverOptions, page: d }) : n.value = d;
2155
+ set: (f) => {
2156
+ e.serverOptions ? t("update:serverOptions", { ...e.serverOptions, page: f }) : n.value = f;
1813
2157
  }
1814
- }), r = E(() => {
1815
- const d = o.value;
1816
- return Lt(n.value, d, l.value);
1817
- }), i = (d) => {
1818
- e.serverOptions && t("update:serverOptions", { ...e.serverOptions, page: d }), t("pageUpdated", d);
2158
+ }), r = T(() => {
2159
+ const f = o.value;
2160
+ return Pt(n.value, f, l.value);
2161
+ }), u = (f) => {
2162
+ e.serverOptions && t("update:serverOptions", { ...e.serverOptions, page: f }), t("pageUpdated", f);
1819
2163
  };
1820
2164
  return {
1821
2165
  currentPage: a,
1822
2166
  totalRecords: l,
1823
2167
  recordRange: r,
1824
- handlePageChange: i,
2168
+ handlePageChange: u,
1825
2169
  paginationHelpers: {
1826
2170
  page: n,
1827
2171
  totalRecords: l,
1828
2172
  recordRange: r,
1829
- handlePageChange: i
2173
+ handlePageChange: u
1830
2174
  }
1831
2175
  };
1832
2176
  }
1833
- function Ro(e, t, n, o) {
1834
- const s = E({
2177
+ function ls(e, t, n, o) {
2178
+ const s = T({
1835
2179
  get: () => o.value,
1836
2180
  set: (a) => o.value = a
1837
2181
  });
1838
- return ne(o, (a) => {
1839
- const r = e.serverItemsLength ?? e.rows.length, i = it(r, a);
1840
- n.value > i ? n.value = i || 1 : n.value < 1 && (n.value = 1);
2182
+ return G(o, (a) => {
2183
+ const r = e.serverItemsLength ?? e.rows.length, u = it(r, a);
2184
+ n.value > u ? n.value = u || 1 : n.value < 1 && (n.value = 1);
1841
2185
  }), {
1842
2186
  vsRowsPerPage: s,
1843
2187
  handleRowsPerPage: (a) => {
@@ -1845,7 +2189,7 @@ function Ro(e, t, n, o) {
1845
2189
  }
1846
2190
  };
1847
2191
  }
1848
- function So(e, t) {
2192
+ function as(e, t) {
1849
2193
  const n = (a) => {
1850
2194
  t.value = a, e("inputTyped", a);
1851
2195
  };
@@ -1864,117 +2208,117 @@ function So(e, t) {
1864
2208
  }
1865
2209
  };
1866
2210
  }
1867
- function Oo(e, t) {
1868
- const n = _([]), o = _(/* @__PURE__ */ new Map()), s = E({
2211
+ function rs(e, t) {
2212
+ const n = L([]), o = L(/* @__PURE__ */ new Map()), s = T({
1869
2213
  get: () => e.expanded ?? n.value,
1870
- set: (d) => {
1871
- e.expanded !== void 0 ? t("update:expanded", d) : n.value = d;
2214
+ set: (f) => {
2215
+ e.expanded !== void 0 ? t("update:expanded", f) : n.value = f;
1872
2216
  }
1873
2217
  });
1874
- function l(d, c) {
1875
- return typeof e.rowKey == "function" ? e.rowKey(d, c) : typeof e.rowKey == "string" && d[e.rowKey] !== void 0 ? d[e.rowKey] : c;
2218
+ function l(f, i) {
2219
+ return typeof e.rowKey == "function" ? e.rowKey(f, i) : typeof e.rowKey == "string" && f[e.rowKey] !== void 0 ? f[e.rowKey] : i;
1876
2220
  }
1877
- function a(d, c) {
1878
- const p = l(d, c);
1879
- return s.value.includes(p);
2221
+ function a(f, i) {
2222
+ const m = l(f, i);
2223
+ return s.value.includes(m);
1880
2224
  }
1881
- function r(d, c) {
1882
- const p = l(d, c), v = s.value.includes(p);
1883
- let u;
1884
- v ? (u = s.value.filter((m) => m !== p), t("collapseRow", { row: d, index: c, rowId: p })) : (u = e.accordion ? [p] : [...s.value, p], t("expandRow", { row: d, index: c, rowId: p })), s.value = u;
2225
+ function r(f, i) {
2226
+ const m = l(f, i), v = s.value.includes(m);
2227
+ let d;
2228
+ v ? (d = s.value.filter((p) => p !== m), t("collapseRow", { row: f, index: i, rowId: m })) : (d = e.accordion ? [m] : [...s.value, m], t("expandRow", { row: f, index: i, rowId: m })), s.value = d;
1885
2229
  }
1886
- function i(d, c) {
1887
- const p = l(d, c);
1888
- return o.value.get(p) === !0;
2230
+ function u(f, i) {
2231
+ const m = l(f, i);
2232
+ return o.value.get(m) === !0;
1889
2233
  }
1890
- function f(d, c) {
1891
- o.value.set(d, c);
2234
+ function c(f, i) {
2235
+ o.value.set(f, i);
1892
2236
  }
1893
2237
  return {
1894
2238
  expandedRows: s,
1895
2239
  isRowExpanded: a,
1896
2240
  toggleRowExpansion: r,
1897
2241
  getRowId: l,
1898
- setRowLoading: f,
1899
- isRowLoading: i
2242
+ setRowLoading: c,
2243
+ isRowLoading: u
1900
2244
  };
1901
2245
  }
1902
- function Vo(e, t, n) {
1903
- const o = _({}), s = E(() => n?.serverMode ? e.value : e.value.filter((r) => t.every((i) => {
1904
- const f = o.value[i.field];
1905
- if (!f || !f.type) return !0;
1906
- const d = r[i.field];
1907
- if (i.filter?.filterFn)
1908
- return i.filter.filterFn(d, f.value, r);
1909
- if (f.type === "custom" && i.filter?.filterKey) {
1910
- const p = Le[i.filter.filterKey];
1911
- return typeof p == "function" ? p(r, i.field, f) : !0;
2246
+ function is(e, t, n) {
2247
+ const o = L({}), s = T(() => n?.serverMode ? e.value : e.value.filter((r) => t.every((u) => {
2248
+ const c = o.value[u.field];
2249
+ if (!c || !c.type) return !0;
2250
+ const f = r[u.field];
2251
+ if (u.filter?.filterFn)
2252
+ return u.filter.filterFn(f, c.value, r);
2253
+ if (c.type === "custom" && u.filter?.filterKey) {
2254
+ const m = Ae[u.filter.filterKey];
2255
+ return typeof m == "function" ? m(r, u.field, c) : !0;
1912
2256
  }
1913
- const c = Le[f.type];
1914
- return typeof c == "function" ? c(r, i.field, f) : !0;
2257
+ const i = Ae[c.type];
2258
+ return typeof i == "function" ? i(r, u.field, c) : !0;
1915
2259
  })));
1916
- ne(
2260
+ G(
1917
2261
  o,
1918
2262
  (r) => {
1919
2263
  if (n?.serverMode && n.onServerFilter) {
1920
- const i = Object.entries(r).reduce(
1921
- (f, [d, c]) => {
1922
- if (!c?.type) return f;
1923
- const p = {
1924
- type: c.type,
1925
- operator: c.operator
2264
+ const u = Object.entries(r).reduce(
2265
+ (c, [f, i]) => {
2266
+ if (!i?.type) return c;
2267
+ const m = {
2268
+ type: i.type,
2269
+ operator: i.operator
1926
2270
  };
1927
- switch (c.type) {
2271
+ switch (i.type) {
1928
2272
  case "text":
1929
- f[d] = {
1930
- ...p,
1931
- value: c.value ?? null
2273
+ c[f] = {
2274
+ ...m,
2275
+ value: i.value ?? null
1932
2276
  };
1933
2277
  break;
1934
2278
  case "multi-select":
1935
- f[d] = {
1936
- ...p,
1937
- value: c.value ?? []
2279
+ c[f] = {
2280
+ ...m,
2281
+ value: i.value ?? []
1938
2282
  };
1939
2283
  break;
1940
2284
  case "number-range":
1941
- f[d] = {
1942
- ...p,
1943
- value: c.value ?? null,
1944
- min: c.min ?? null,
1945
- max: c.max ?? null
2285
+ c[f] = {
2286
+ ...m,
2287
+ value: i.value ?? null,
2288
+ min: i.min ?? null,
2289
+ max: i.max ?? null
1946
2290
  };
1947
2291
  break;
1948
2292
  case "date-range":
1949
- f[d] = {
1950
- ...p,
1951
- value: c.value ?? null,
1952
- start: c.start ?? null,
1953
- end: c.end ?? null
2293
+ c[f] = {
2294
+ ...m,
2295
+ value: i.value ?? null,
2296
+ start: i.start ?? null,
2297
+ end: i.end ?? null
1954
2298
  };
1955
2299
  break;
1956
2300
  case "custom":
1957
- f[d] = {
1958
- ...p,
1959
- value: c.value,
1960
- filterKey: c.filterKey
2301
+ c[f] = {
2302
+ ...m,
2303
+ value: i.value,
2304
+ filterKey: i.filterKey
1961
2305
  };
1962
2306
  break;
1963
2307
  }
1964
- return f;
2308
+ return c;
1965
2309
  },
1966
2310
  {}
1967
2311
  );
1968
- n.onServerFilter(i);
2312
+ n.onServerFilter(u);
1969
2313
  }
1970
2314
  },
1971
2315
  { deep: !0 }
1972
2316
  );
1973
- function l(r, i, f) {
1974
- i ? o.value[r] = he(i.type, i) : f && (o.value[r] = he(f));
2317
+ function l(r, u, c) {
2318
+ u ? o.value[r] = me(u.type, u) : c && (o.value[r] = me(c));
1975
2319
  }
1976
- function a(r, i) {
1977
- i ? o.value[r] = he(i) : delete o.value[r];
2320
+ function a(r, u) {
2321
+ u ? o.value[r] = me(u) : delete o.value[r];
1978
2322
  }
1979
2323
  return {
1980
2324
  filters: o,
@@ -1983,99 +2327,97 @@ function Vo(e, t, n) {
1983
2327
  clearFilter: a
1984
2328
  };
1985
2329
  }
1986
- function To(e, t) {
1987
- const n = _(1), o = _(e.serverOptions?.rowsPerPage ?? e.rowsPerPage), s = _(""), { isRowExpanded: l, toggleRowExpansion: a, getRowId: r, setRowLoading: i, isRowLoading: f } = Oo(e, t), { filters: d, filteredData: c, setFilter: p, clearFilter: v } = Vo(
1988
- _(e.rows),
2330
+ function us(e, t) {
2331
+ const n = ye(e.rows) ? e.rows : at(e.rows), o = L(1), s = L(e.serverOptions?.rowsPerPage ?? e.rowsPerPage), l = L(""), { isRowExpanded: a, toggleRowExpansion: r, getRowId: u, setRowLoading: c, isRowLoading: f } = rs(e, t), { filters: i, filteredData: m, setFilter: v, clearFilter: d } = is(
2332
+ T(() => R(n)),
1989
2333
  e.columns,
1990
2334
  {
1991
2335
  serverMode: !!e.serverOptions,
1992
- onServerFilter(w) {
1993
- t("filterChange", w);
2336
+ onServerFilter(y) {
2337
+ t("filterChange", y);
1994
2338
  }
1995
2339
  }
1996
- ), { activeSort: u, sortHelpers: m } = Co(e, t, n), { onInputTyped: C } = So(t, s), { totalRecords: k, recordRange: S, handlePageChange: V } = ko(
2340
+ ), { activeSort: p, sortHelpers: b } = os(e, t, o), { onInputTyped: C } = as(t, l), { totalRecords: k, recordRange: S, handlePageChange: O } = ss(
1997
2341
  e,
1998
2342
  t,
1999
- n,
2000
2343
  o,
2001
- E(() => N.value)
2002
- ), { handleRowsPerPage: L } = Ro(e, t, n, o), A = E(() => {
2003
- let w = c.value;
2004
- return s.value && (w = Ye(w, s.value)), w;
2005
- }), N = E(() => {
2006
- let w = A.value;
2007
- return e.serverOptions || (s.value && (w = Ye(w, s.value)), u.value.length && (w = At(w, u.value))), w = w.map((R, Z) => ({
2008
- ...R,
2009
- isExpanded: l(R, Z)
2344
+ s,
2345
+ T(() => $.value)
2346
+ ), { handleRowsPerPage: A } = ls(e, t, o, s), M = T(() => {
2347
+ let y = m.value;
2348
+ return l.value && (y = Qe(y, l.value)), y;
2349
+ }), $ = T(() => {
2350
+ let y = M.value;
2351
+ return e.serverOptions || (l.value && (y = Qe(y, l.value)), p.value.length && (y = At(y, p.value))), y = y.map((I, ce) => ({
2352
+ ...I,
2353
+ isExpanded: a(I, ce)
2010
2354
  // pass index here
2011
- })), w;
2012
- });
2013
- ne(d, () => {
2014
- n.value = 1;
2015
- }, { deep: !0 }), ne(s, () => {
2016
- n.value = 1;
2355
+ })), y;
2017
2356
  });
2018
- const P = E(
2019
- () => Pt(N.value, n.value, o.value)
2357
+ G([i, l], () => o.value = 1, { deep: !0 });
2358
+ const x = T(
2359
+ () => Et($.value, o.value, s.value)
2020
2360
  );
2021
- return {
2361
+ return G(n, (y) => {
2362
+ Array.isArray(y) && y.length > 1e3 && console.log(`[useDataTable] Large dataset updated (${y.length} rows)`);
2363
+ }), {
2022
2364
  // Pagination
2023
- page: n,
2365
+ page: o,
2024
2366
  totalRecords: k,
2025
2367
  recordRange: S,
2026
- handlePageChange: V,
2027
- rowsPerPage: o,
2028
- handleRowsPerPage: L,
2368
+ handlePageChange: O,
2369
+ rowsPerPage: s,
2370
+ handleRowsPerPage: A,
2029
2371
  // Sorting
2030
- processedRows: N,
2031
- paginatedRows: P,
2032
- sortHelpers: m,
2372
+ processedRows: $,
2373
+ paginatedRows: x,
2374
+ sortHelpers: b,
2033
2375
  // Search
2034
- searchQuery: s,
2376
+ searchQuery: l,
2035
2377
  onInputTyped: C,
2036
2378
  // Expandable
2037
- isRowExpanded: l,
2038
- toggleRowExpansion: a,
2039
- getRowId: r,
2040
- setRowLoading: i,
2379
+ isRowExpanded: a,
2380
+ toggleRowExpansion: r,
2381
+ getRowId: u,
2382
+ setRowLoading: c,
2041
2383
  isRowLoading: f,
2042
2384
  // Column filters
2043
- filters: d,
2044
- filteredData: c,
2045
- setFilter: p,
2046
- clearFilter: v
2385
+ filters: i,
2386
+ filteredData: m,
2387
+ setFilter: v,
2388
+ clearFilter: d
2047
2389
  };
2048
2390
  }
2049
- function Eo(e, t) {
2050
- const n = _(e.itemSelected || []);
2051
- ne(
2391
+ function cs(e, t) {
2392
+ const n = L(e.itemSelected || []);
2393
+ G(
2052
2394
  () => e.itemSelected,
2053
- (m) => {
2054
- m ? n.value = [...m] : n.value = [];
2395
+ (p) => {
2396
+ p ? n.value = [...p] : n.value = [];
2055
2397
  },
2056
2398
  { immediate: !0, deep: !0 }
2057
2399
  );
2058
- const o = E({
2400
+ const o = T({
2059
2401
  get: () => n.value,
2060
- set: (m) => {
2061
- n.value = m, t("update:itemSelected", m);
2402
+ set: (p) => {
2403
+ n.value = p, t("update:itemSelected", p);
2062
2404
  }
2063
- }), s = E(() => e.itemSelected !== null), l = E(
2405
+ }), s = T(() => e.itemSelected !== null), l = T(
2064
2406
  () => e.rows.length > 0 && o.value.length === e.rows.length
2065
- ), a = E(() => !e.rows.length || !o.value.length ? !1 : !l.value && e.rows.some(
2066
- (m, C) => o.value.some(
2067
- (k, S) => M(k, S, e.rowKey) === M(m, C, e.rowKey)
2407
+ ), a = T(() => !e.rows.length || !o.value.length ? !1 : !l.value && e.rows.some(
2408
+ (p, b) => o.value.some(
2409
+ (C, k) => Q(C, k, e.rowKey) === Q(p, b, e.rowKey)
2068
2410
  )
2069
- )), r = (m, C) => {
2070
- const k = M(m, C, e.rowKey);
2411
+ )), r = (p, b) => {
2412
+ const C = Q(p, b, e.rowKey);
2071
2413
  o.value.some(
2072
- (V, L) => M(V, L, e.rowKey) === k
2414
+ (S, O) => Q(S, O, e.rowKey) === C
2073
2415
  ) ? (o.value = o.value.filter(
2074
- (V, L) => M(V, L, e.rowKey) !== k
2075
- ), t("rowDeselected", m, C)) : (o.value = [...o.value, m], t("rowSelected", m, C));
2076
- }, i = (m) => {
2077
- const C = m.target;
2078
- o.value = C.checked ? [...e.rows] : [], t("allRowsSelected", o.value);
2416
+ (S, O) => Q(S, O, e.rowKey) !== C
2417
+ ), t("rowDeselected", p, b)) : (o.value = [...o.value, p], t("rowSelected", p, b));
2418
+ }, u = (p) => {
2419
+ const b = p.target;
2420
+ o.value = b.checked ? [...e.rows] : [], t("allRowsSelected", o.value);
2079
2421
  };
2080
2422
  return {
2081
2423
  selectedItems: o,
@@ -2083,15 +2425,15 @@ function Eo(e, t) {
2083
2425
  isAllChecked: l,
2084
2426
  isSomeChecked: a,
2085
2427
  toggleRow: r,
2086
- toggleAll: i,
2087
- selectRow: (m, C) => {
2088
- rt(m, o.value, e.rowKey) || (o.value = [...o.value, m], t("rowSelected", m, C));
2428
+ toggleAll: u,
2429
+ selectRow: (p, b) => {
2430
+ rt(p, o.value, e.rowKey) || (o.value = [...o.value, p], t("rowSelected", p, b));
2089
2431
  },
2090
- deselectRow: (m, C) => {
2091
- const k = M(m, C, e.rowKey);
2432
+ deselectRow: (p, b) => {
2433
+ const C = Q(p, b, e.rowKey);
2092
2434
  o.value = o.value.filter(
2093
- (S, V) => M(S, V, e.rowKey) !== k
2094
- ), t("rowDeselected", m, C);
2435
+ (k, S) => Q(k, S, e.rowKey) !== C
2436
+ ), t("rowDeselected", p, b);
2095
2437
  },
2096
2438
  selectAll: () => {
2097
2439
  o.value = [...e.rows], t("allRowsSelected", o.value);
@@ -2108,40 +2450,17 @@ function Eo(e, t) {
2108
2450
  isAllChecked: l,
2109
2451
  isSomeChecked: a,
2110
2452
  toggleRow: r,
2111
- toggleAll: i
2453
+ toggleAll: u
2112
2454
  }
2113
2455
  };
2114
2456
  }
2115
- const Ao = { class: "vs-datatable" }, Po = { class: "vs-layout-row" }, Lo = { class: "vs-layout-start" }, $o = {
2116
- key: 0,
2117
- class: "vs-search-container"
2118
- }, Do = {
2457
+ const ds = { class: "vs-datatable" }, fs = {
2119
2458
  ref: "tableResponsiveRef",
2120
2459
  class: "vs-table-wrapper"
2121
- }, Fo = {
2122
- key: 0,
2123
- class: "vs-expand-column",
2124
- style: { width: "5%" }
2125
- }, _o = {
2126
- key: 1,
2127
- class: "vs-checkbox-column",
2128
- style: { width: "5%" }
2129
- }, Mo = { class: "vs-checkbox" }, No = ["id", "checked", "indeterminate"], Bo = ["for"], qo = ["onClick"], Io = { class: "vs-header-content" }, Wo = { class: "vs-header-label" }, Ho = {
2130
- key: 0,
2131
- class: "vs-sort-icons"
2132
- }, Ko = {
2133
- key: 1,
2134
- class: "vs-sort-priority"
2135
- }, Uo = { key: 0 }, jo = ["colspan"], zo = { key: 1 }, Zo = ["colspan"], Xo = { class: "vs-no-data-message" }, Yo = { class: "vs-no-data-description" }, Qo = ["onClick"], Go = ["aria-expanded", "aria-controls", "onClick"], Jo = { key: 0 }, es = { key: 1 }, ts = { class: "vs-checkbox" }, ns = ["id", "value", "checked", "onChange"], os = ["for"], ss = {
2136
- key: 0,
2137
- class: "vs-row-expanded"
2138
- }, ls = ["colspan"], as = {
2139
- key: 1,
2140
- class: "vs-expanded-content"
2141
- }, rs = {
2460
+ }, vs = {
2142
2461
  key: 0,
2143
2462
  class: "vs-table-footer"
2144
- }, is = { class: "vs-footer-left" }, us = { class: "vs-table-info" }, cs = /* @__PURE__ */ fe({
2463
+ }, ms = { class: "vs-footer-left" }, ps = { class: "vs-table-info" }, gs = /* @__PURE__ */ _({
2145
2464
  __name: "VsDataTable",
2146
2465
  props: {
2147
2466
  rows: { default: () => [] },
@@ -2177,340 +2496,171 @@ const Ao = { class: "vs-datatable" }, Po = { class: "vs-layout-row" }, Lo = { cl
2177
2496
  },
2178
2497
  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"],
2179
2498
  setup(e, { expose: t, emit: n }) {
2180
- const o = e, s = n, l = St(), a = E(() => !!l.onRowClick), {
2181
- page: r,
2182
- rowsPerPage: i,
2499
+ const o = e, s = at(o.rows);
2500
+ G(
2501
+ () => o.rows,
2502
+ (B) => {
2503
+ s.value = B;
2504
+ },
2505
+ { deep: !1 }
2506
+ );
2507
+ const l = n, a = Tt(), r = T(() => !!a.onRowClick), {
2508
+ page: u,
2509
+ rowsPerPage: c,
2183
2510
  totalRecords: f,
2184
- recordRange: d,
2185
- handlePageChange: c,
2186
- handleRowsPerPage: p,
2187
- paginatedRows: v,
2188
- sortHelpers: u,
2189
- searchQuery: m,
2511
+ recordRange: i,
2512
+ handlePageChange: m,
2513
+ handleRowsPerPage: v,
2514
+ paginatedRows: d,
2515
+ sortHelpers: p,
2516
+ searchQuery: b,
2190
2517
  onInputTyped: C,
2191
2518
  isRowExpanded: k,
2192
2519
  toggleRowExpansion: S,
2193
- setRowLoading: V,
2194
- isRowLoading: L,
2195
- filters: A,
2196
- setFilter: N,
2197
- clearFilter: P
2198
- } = To(o, s), {
2199
- selectedItems: w,
2200
- isItemSelectedControlled: R,
2201
- isAllChecked: Z,
2202
- isSomeChecked: Re,
2203
- toggleAll: be,
2204
- toggleRow: Se
2205
- } = Eo(o, s), K = E(
2206
- () => Et(o.columns, R.value, o.expandable)
2207
- ), xe = _(null), X = _(null);
2208
- function J($) {
2209
- X.value = $;
2210
- }
2211
- function B($) {
2212
- X.value === $ && (X.value = null);
2213
- }
2520
+ setRowLoading: O,
2521
+ isRowLoading: A,
2522
+ filters: M,
2523
+ setFilter: $,
2524
+ clearFilter: x
2525
+ } = us({ ...o, rows: s.value }, l), {
2526
+ selectedItems: y,
2527
+ isItemSelectedControlled: I,
2528
+ isAllChecked: ce,
2529
+ isSomeChecked: Ce,
2530
+ toggleAll: ke,
2531
+ toggleRow: te
2532
+ } = cs(o, l), he = T(
2533
+ () => Ot(o.columns, I.value, o.expandable)
2534
+ );
2214
2535
  return t({
2215
2536
  toggleRowExpansion: S,
2216
- setRowLoading: V
2217
- }), lt(() => {
2218
- s("tableMounted");
2537
+ setRowLoading: O
2538
+ }), st(() => {
2539
+ l("tableMounted");
2219
2540
  try {
2220
- s("dataLoaded", o.rows);
2221
- } catch ($) {
2222
- s("dataError", $);
2541
+ l("dataLoaded", o.rows);
2542
+ } catch (B) {
2543
+ l("dataError", B);
2223
2544
  }
2224
- }), at(() => {
2225
- s("tableUnmounted");
2226
- }), Ot(() => {
2227
- s("tableBeforeMount");
2228
- }), ($, O) => (g(), y("div", Ao, [
2229
- h("div", Po, [
2230
- h("div", Lo, [
2231
- e.showSearch ? (g(), y("div", $o, [
2232
- ie(Kt, {
2233
- modelValue: x(m),
2234
- "onUpdate:modelValue": O[0] || (O[0] = (b) => Ie(m) ? m.value = b : null),
2235
- onInputTyped: x(C),
2236
- placeholder: e.searchPlaceholder,
2237
- class: W(e.searchClass)
2238
- }, null, 8, ["modelValue", "onInputTyped", "placeholder", "class"]),
2239
- ee($.$slots, "filterArea", {}, void 0, !0)
2240
- ])) : D("", !0)
2545
+ }), lt(() => {
2546
+ l("tableUnmounted");
2547
+ }), $t(() => {
2548
+ l("tableBeforeMount");
2549
+ }), (B, E) => (h(), w("div", ds, [
2550
+ X(ns, {
2551
+ "show-search": e.showSearch,
2552
+ "search-query": R(b),
2553
+ "onUpdate:searchQuery": E[0] || (E[0] = (V) => ye(b) ? b.value = V : null),
2554
+ onSearch: R(C),
2555
+ "search-placeholder": e.searchPlaceholder,
2556
+ "search-class": e.searchClass
2557
+ }, {
2558
+ left: H(() => [
2559
+ N(B.$slots, "filterAreaLeft", {}, void 0, !0)
2241
2560
  ]),
2242
- O[6] || (O[6] = h("div", { class: "vs-layout-end" }, null, -1))
2243
- ]),
2244
- h("div", {
2561
+ right: H(() => [
2562
+ N(B.$slots, "filterAreaRight", {}, void 0, !0)
2563
+ ]),
2564
+ _: 3
2565
+ }, 8, ["show-search", "search-query", "onSearch", "search-placeholder", "search-class"]),
2566
+ g("div", {
2245
2567
  class: W(["vs-table-container", e.containerClass])
2246
2568
  }, [
2247
- h("div", Do, [
2248
- h("table", {
2569
+ g("div", fs, [
2570
+ g("table", {
2249
2571
  class: W(["vs-table", e.tableClass])
2250
2572
  }, [
2251
- h("thead", null, [
2252
- h("tr", null, [
2253
- e.expandable ? (g(), y("th", Fo)) : D("", !0),
2254
- x(R) ? (g(), y("th", _o, [
2255
- h("div", Mo, [
2256
- h("input", {
2257
- type: "checkbox",
2258
- id: e.tablename + "-main-checkbox",
2259
- checked: x(Z),
2260
- indeterminate: x(Re),
2261
- onChange: O[1] || (O[1] = //@ts-ignore
2262
- (...b) => x(be) && x(be)(...b))
2263
- }, null, 40, No),
2264
- h("label", {
2265
- for: e.tablename + "-main-checkbox"
2266
- }, null, 8, Bo)
2267
- ])
2268
- ])) : D("", !0),
2269
- (g(!0), y(H, null, te(e.columns, (b) => (g(), y("th", {
2270
- key: b.field,
2271
- onClick: (T) => b.sortable ? x(u).handleSort(b.field, T) : null,
2272
- style: Vt({ width: b.width + "%" }),
2273
- class: W([b.sortable ? "vs-sortable" : "", e.headerClass])
2274
- }, [
2275
- ee($.$slots, `header-${b.field}`, { column: b }, () => [
2276
- h("div", Io, [
2277
- h("span", Wo, F(b.label), 1),
2278
- b.sortable ? (g(), y("div", Ho, [
2279
- h("span", {
2280
- class: W(["vs-sort-icon vs-sort-asc", {
2281
- "vs-active": x(u).isColumnSorted(b.field) && x(u).getSortOrder(b.field) === "asc"
2282
- }])
2283
- }, [...O[7] || (O[7] = [
2284
- h("svg", {
2285
- xmlns: "http://www.w3.org/2000/svg",
2286
- height: "24px",
2287
- viewBox: "0 -960 960 960",
2288
- width: "24px",
2289
- fill: "var(--vs-gray-800)"
2290
- }, [
2291
- h("path", { d: "m280-400 200-200 200 200H280Z" })
2292
- ], -1)
2293
- ])], 2),
2294
- h("span", {
2295
- class: W(["vs-sort-icon vs-sort-desc", {
2296
- "vs-active": x(u).isColumnSorted(b.field) && x(u).getSortOrder(b.field) === "desc"
2297
- }])
2298
- }, [...O[8] || (O[8] = [
2299
- h("svg", {
2300
- xmlns: "http://www.w3.org/2000/svg",
2301
- height: "24px",
2302
- viewBox: "0 -960 960 960",
2303
- width: "24px"
2304
- }, [
2305
- h("path", { d: "M480-360 280-560h400L480-360Z" })
2306
- ], -1)
2307
- ])], 2)
2308
- ])) : D("", !0),
2309
- x(u).getSortPriority(b.field) !== null ? (g(), y("span", Ko, F(x(u).getSortPriority(b.field)), 1)) : D("", !0),
2310
- b.filter ? (g(), ve(xo, {
2311
- key: 2,
2312
- type: b.filter.type,
2313
- "async-options": b.filter.asyncOptions,
2314
- field: b.field,
2315
- operators: b.filter.operators,
2316
- modelValue: x(A)[b.field],
2317
- "onUpdate:modelValue": (T) => x(A)[b.field] = T,
2318
- visible: X.value === b.field,
2319
- "anchor-el": xe.value,
2320
- "column-data": e.rows.map((T) => T[b.field]),
2321
- onApply: (T) => {
2322
- x(N)(b.field, T), r.value = 1;
2323
- },
2324
- onClear: () => {
2325
- x(P)(b.field), r.value = 1;
2326
- },
2327
- onClose: (T) => B(b.field),
2328
- onOpen: (T) => J(b.field)
2329
- }, Tt({ _: 2 }, [
2330
- b.filter.custom ? {
2331
- name: "custom",
2332
- fn: se(({ filter: T, apply: I, clear: Be }) => [
2333
- ee($.$slots, b.filter.custom, {
2334
- filter: T,
2335
- apply: I,
2336
- clear: Be
2337
- }, void 0, !0)
2338
- ]),
2339
- key: "0"
2340
- } : void 0
2341
- ]), 1032, ["type", "async-options", "field", "operators", "modelValue", "onUpdate:modelValue", "visible", "anchor-el", "column-data", "onApply", "onClear", "onClose", "onOpen"])) : D("", !0)
2342
- ])
2343
- ], !0)
2344
- ], 14, qo))), 128))
2345
- ])
2346
- ]),
2347
- h("tbody", null, [
2348
- e.loading ? (g(), y("tr", Uo, [
2349
- h("td", {
2350
- colspan: K.value,
2351
- class: "vs-loading"
2352
- }, [
2353
- O[9] || (O[9] = h("div", { class: "vs-spinner" }, null, -1)),
2354
- h("span", null, F(e.loadingText), 1)
2355
- ], 8, jo)
2356
- ])) : x(v).length ? (g(!0), y(H, { key: 2 }, te(x(v), (b, T) => (g(), y(H, {
2357
- key: x(M)(b, T)
2358
- }, [
2359
- h("tr", {
2360
- class: W([
2361
- e.rowClass,
2362
- { "vs-row-clickable": a.value },
2363
- { "vs-row-selected": x(rt)(b, x(w), e.rowKey) }
2364
- ]),
2365
- onClick: (I) => $.$emit("rowClick", b, T)
2366
- }, [
2367
- e.expandable ? (g(), y("td", {
2368
- key: 0,
2369
- class: "vs-expand-column",
2370
- onClick: O[2] || (O[2] = ae(() => {
2371
- }, ["stop"]))
2372
- }, [
2373
- h("button", {
2374
- class: "vs-expand-btn",
2375
- type: "button",
2376
- "aria-expanded": x(k)(b, T),
2377
- "aria-controls": `row-details-${x(M)(b, T)}`,
2378
- onClick: ae((I) => x(S)(b, T), ["stop"])
2379
- }, [
2380
- x(k)(b, T) ? (g(), y("span", Jo, [...O[11] || (O[11] = [
2381
- h("svg", {
2382
- xmlns: "http://www.w3.org/2000/svg",
2383
- height: "24px",
2384
- viewBox: "0 -960 960 960",
2385
- width: "24px",
2386
- fill: "var(--vs-gray-800)"
2387
- }, [
2388
- h("path", { d: "M480-345 240-585l56-56 184 183 184-183 56 56-240 240Z" })
2389
- ], -1)
2390
- ])])) : (g(), y("span", es, [...O[12] || (O[12] = [
2391
- h("svg", {
2392
- xmlns: "http://www.w3.org/2000/svg",
2393
- height: "24px",
2394
- viewBox: "0 -960 960 960",
2395
- width: "24px",
2396
- fill: "var(--vs-gray-800)"
2397
- }, [
2398
- h("path", { d: "M504-480 320-664l56-56 240 240-240 240-56-56 184-184Z" })
2399
- ], -1)
2400
- ])]))
2401
- ], 8, Go)
2402
- ])) : D("", !0),
2403
- x(R) ? (g(), y("td", {
2404
- key: 1,
2405
- onClick: O[3] || (O[3] = ae(() => {
2406
- }, ["stop"])),
2407
- class: "vs-checkbox-column"
2408
- }, [
2409
- h("div", ts, [
2410
- h("input", {
2411
- type: "checkbox",
2412
- id: e.tablename + "-checkbox-" + x(M)(b, T),
2413
- value: b,
2414
- checked: x(w).some((I, Be) => x(M)(I, Be) === x(M)(b, T)),
2415
- onChange: (I) => x(Se)(b, T)
2416
- }, null, 40, ns),
2417
- h("label", {
2418
- for: e.tablename + "-checkbox-" + x(M)(b, T)
2419
- }, null, 8, os)
2420
- ])
2421
- ])) : D("", !0),
2422
- (g(!0), y(H, null, te(e.columns, (I) => (g(), y("td", {
2423
- key: I.field,
2424
- class: W(e.cellClass)
2425
- }, [
2426
- ee($.$slots, `cell-${I.field}`, {
2427
- item: b,
2428
- value: x(Xe)(b, I.field),
2429
- column: I,
2430
- index: T
2431
- }, () => [
2432
- Ze(F(x(Xe)(b, I.field)), 1)
2433
- ], !0)
2434
- ], 2))), 128))
2435
- ], 10, Qo),
2436
- e.expandable ? (g(), y(H, { key: 0 }, [
2437
- x(k)(b, T) ? (g(), y("tr", ss, [
2438
- h("td", {
2439
- colspan: K.value,
2440
- class: "vs-expanded-cell"
2441
- }, [
2442
- x(L)(b, T) ? ee($.$slots, "row-expanded-loader", {
2443
- key: 0,
2444
- item: b,
2445
- index: T
2446
- }, () => [
2447
- O[13] || (O[13] = h("div", { class: "vs-loader-bar" }, [
2448
- h("div", { class: "vs-loader-bar-inner" })
2449
- ], -1))
2450
- ], !0) : (g(), y("div", as, [
2451
- ee($.$slots, "row-expanded", {
2452
- item: b,
2453
- index: T
2454
- }, () => [
2455
- O[14] || (O[14] = Ze(" Expanded details for row ", -1)),
2456
- h("b", null, F(x(M)(b, T)), 1)
2457
- ], !0)
2458
- ]))
2459
- ], 8, ls)
2460
- ])) : D("", !0)
2461
- ], 64)) : D("", !0)
2462
- ], 64))), 128)) : (g(), y("tr", zo, [
2463
- h("td", {
2464
- colspan: K.value,
2465
- class: "vs-no-data"
2466
- }, [
2467
- ee($.$slots, "no-data", {}, () => [
2468
- O[10] || (O[10] = h("div", { class: "vs-no-data-icon" }, [
2469
- h("svg", {
2470
- viewBox: "0 0 24 24",
2471
- fill: "currentColor"
2472
- }, [
2473
- h("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" })
2474
- ])
2475
- ], -1)),
2476
- h("div", Xo, F(e.noDataText), 1),
2477
- h("div", Yo, F(e.noDataDescription), 1)
2478
- ], !0)
2479
- ], 8, Zo)
2480
- ]))
2481
- ])
2573
+ X(Vo, {
2574
+ columns: e.columns,
2575
+ expandable: e.expandable,
2576
+ "is-item-selected-controlled": R(I),
2577
+ "is-all-checked": R(ce),
2578
+ "is-some-checked": R(Ce),
2579
+ tablename: e.tablename,
2580
+ "sort-helpers": R(p),
2581
+ filters: R(M),
2582
+ "onUpdate:filters": E[1] || (E[1] = (V) => ye(M) ? M.value = V : null),
2583
+ rows: e.rows,
2584
+ "header-class": e.headerClass,
2585
+ onToggleAll: R(ke),
2586
+ onApplyFilter: E[2] || (E[2] = (V, F) => {
2587
+ R($)(V, F), u.value = 1;
2588
+ }),
2589
+ onClearFilter: E[3] || (E[3] = (V) => {
2590
+ R(x)(V), u.value = 1;
2591
+ })
2592
+ }, Ie({ _: 2 }, [
2593
+ j(B.$slots, (V, F) => ({
2594
+ name: F,
2595
+ fn: H((we) => [
2596
+ N(B.$slots, F, ze(Ze(we)), void 0, !0)
2597
+ ])
2598
+ }))
2599
+ ]), 1032, ["columns", "expandable", "is-item-selected-controlled", "is-all-checked", "is-some-checked", "tablename", "sort-helpers", "filters", "rows", "header-class", "onToggleAll"]),
2600
+ X(zo, {
2601
+ loading: e.loading,
2602
+ "loading-text": e.loadingText,
2603
+ "no-data-text": e.noDataText,
2604
+ "no-data-description": e.noDataDescription,
2605
+ "paginated-rows": R(d),
2606
+ "total-columns": he.value,
2607
+ expandable: e.expandable,
2608
+ "is-item-selected-controlled": R(I),
2609
+ "selected-items": R(y),
2610
+ tablename: e.tablename,
2611
+ columns: e.columns,
2612
+ "row-key": e.rowKey,
2613
+ "row-class": e.rowClass,
2614
+ "cell-class": e.cellClass,
2615
+ "has-row-click": r.value,
2616
+ "get-row-key": R(Q),
2617
+ "get-value": R(Vt),
2618
+ "is-row-expanded": R(k),
2619
+ "is-row-loading": R(A),
2620
+ "toggle-row-expansion": R(S),
2621
+ "toggle-row": R(te),
2622
+ "is-row-selected": R(rt),
2623
+ onRowClick: E[4] || (E[4] = (V, F) => B.$emit("rowClick", V, F))
2624
+ }, Ie({ _: 2 }, [
2625
+ j(B.$slots, (V, F) => ({
2626
+ name: F,
2627
+ fn: H((we) => [
2628
+ N(B.$slots, F, ze(Ze(we)), void 0, !0)
2629
+ ])
2630
+ }))
2631
+ ]), 1032, ["loading", "loading-text", "no-data-text", "no-data-description", "paginated-rows", "total-columns", "expandable", "is-item-selected-controlled", "selected-items", "tablename", "columns", "row-key", "row-class", "cell-class", "has-row-click", "get-row-key", "get-value", "is-row-expanded", "is-row-loading", "toggle-row-expansion", "toggle-row", "is-row-selected"])
2482
2632
  ], 2)
2483
2633
  ], 512)
2484
2634
  ], 2),
2485
- e.showFooter ? (g(), y("div", rs, [
2486
- h("div", is, [
2487
- ie(Xt, {
2488
- modelValue: x(i),
2489
- "onUpdate:modelValue": O[4] || (O[4] = (b) => Ie(i) ? i.value = b : null),
2490
- onRowsPerPageChanged: x(p)
2635
+ e.showFooter ? (h(), w("div", vs, [
2636
+ g("div", ms, [
2637
+ X(jt, {
2638
+ modelValue: R(c),
2639
+ "onUpdate:modelValue": E[5] || (E[5] = (V) => ye(c) ? c.value = V : null),
2640
+ onRowsPerPageChanged: R(v)
2491
2641
  }, null, 8, ["modelValue", "onRowsPerPageChanged"]),
2492
- O[15] || (O[15] = h("div", { class: "vs-divider" }, null, -1)),
2493
- h("div", us, F(x(d).start < 1 ? 0 : x(d).start) + " - " + F(x(d).end) + " of " + F(x(f)) + " " + F(e.entriesText), 1)
2642
+ E[7] || (E[7] = g("div", { class: "vs-divider" }, null, -1)),
2643
+ g("div", ps, D(R(i).start < 1 ? 0 : R(i).start) + " - " + D(R(i).end) + " of " + D(R(f)) + " " + D(e.entriesText), 1)
2494
2644
  ]),
2495
- ie(qt, {
2496
- modelValue: x(r),
2497
- "onUpdate:modelValue": O[5] || (O[5] = (b) => Ie(r) ? r.value = b : null),
2498
- totalRecords: x(f),
2499
- rowsPerPage: x(i),
2645
+ X(qt, {
2646
+ modelValue: R(u),
2647
+ "onUpdate:modelValue": E[6] || (E[6] = (V) => ye(u) ? u.value = V : null),
2648
+ totalRecords: R(f),
2649
+ rowsPerPage: R(c),
2500
2650
  maxVisible: e.maxVisiblePages,
2501
2651
  tablename: e.tablename,
2502
2652
  class: W(e.paginationClass),
2503
- onPageChanged: x(c)
2653
+ onPageChanged: R(m)
2504
2654
  }, null, 8, ["modelValue", "totalRecords", "rowsPerPage", "maxVisible", "tablename", "class", "onPageChanged"])
2505
- ])) : D("", !0)
2655
+ ])) : P("", !0)
2506
2656
  ]));
2507
2657
  }
2508
- }), ds = /* @__PURE__ */ ye(cs, [["__scopeId", "data-v-12278d31"]]), vs = {
2658
+ }), hs = /* @__PURE__ */ ne(gs, [["__scopeId", "data-v-4da895c0"]]), ys = {
2509
2659
  install(e) {
2510
- e.component("VsDataTable", ds);
2660
+ e.component("VsDataTable", hs);
2511
2661
  }
2512
2662
  };
2513
2663
  export {
2514
- ds as VsDataTable,
2515
- vs as default
2664
+ hs as VsDataTable,
2665
+ ys as default
2516
2666
  };