@ianicdev/datatables2 0.10.0 → 0.10.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/dist/{Columns-uuugU4i9.cjs → Columns-YRc6N3N3.cjs} +1 -1
  2. package/dist/{Columns-BVivQbA1.js → Columns-pBvbnYlf.js} +1 -1
  3. package/dist/{Comparison-BNSlLRqf.cjs → Comparison--anN00Qz.cjs} +1 -1
  4. package/dist/{Comparison-D6zByMKH.js → Comparison-DRfZKR1Q.js} +1 -1
  5. package/dist/Datepicker-Bo4pQ0Ky.cjs +2 -0
  6. package/dist/Datepicker-DVl_NGDU.js +1411 -0
  7. package/dist/{Download-BSWYh8Kp.js → Download-BsS86MB6.js} +1 -1
  8. package/dist/{Download-CnCzctX1.cjs → Download-Cn0vLJdo.cjs} +1 -1
  9. package/dist/{Options-CB6BQtI-.cjs → Options-C07MvEiF.cjs} +1 -1
  10. package/dist/{Options-1LMo1jYF.js → Options-DCQAU-J6.js} +1 -1
  11. package/dist/{RefreshTable-DIwWSpaJ.cjs → RefreshTable-A1eCYmwb.cjs} +1 -1
  12. package/dist/{RefreshTable-DEXlcdI0.js → RefreshTable-CJghSR2x.js} +2 -2
  13. package/dist/{Search-BNaYhckX.cjs → Search-Ctr2CVNw.cjs} +1 -1
  14. package/dist/{Search-BsWYytSk.js → Search-btos05iH.js} +2 -2
  15. package/dist/Table-BPOv1XC0.cjs +1 -0
  16. package/dist/{Table-BMwdrPuC.js → Table-BtvvPIo_.js} +23 -21
  17. package/dist/{TableServer-DaBF1vxr.js → TableServer-BPveUKR2.js} +1136 -1137
  18. package/dist/TableServer-LBPwG9Z1.cjs +20 -0
  19. package/dist/cellRender-DM-C_7Lj.cjs +1 -0
  20. package/dist/cellRender-D_-HT--u.js +2351 -0
  21. package/dist/{dataTables-CxEnAUfF.js → dataTables-4_0nZg-y.js} +2409 -2263
  22. package/dist/dataTables-CnvsuROu.cjs +4 -0
  23. package/dist/datatables.cjs +1 -1
  24. package/dist/datatables.js +1 -1
  25. package/dist/datatables2.css +1 -1
  26. package/dist/{index-VkGoAdXo.cjs → index-B0N3w8xu.cjs} +1 -1
  27. package/dist/{index-Bc0AtRk2.js → index-ByfcZypn.js} +1 -1
  28. package/dist/index-CHiQ3XrO.cjs +1 -0
  29. package/dist/index-D-1LWR3S.js +4090 -0
  30. package/package.json +8 -8
  31. package/dist/Datepicker-B8PS_dQ1.cjs +0 -1
  32. package/dist/Datepicker-DXbpHltW.js +0 -1269
  33. package/dist/Table-CGDzgkKx.cjs +0 -1
  34. package/dist/TableServer-ZDSaEYRy.cjs +0 -20
  35. package/dist/cellRender-BuLj_AFK.js +0 -2298
  36. package/dist/cellRender-CYGQmmZC.cjs +0 -1
  37. package/dist/dataTables-P7hOrFAn.cjs +0 -4
  38. package/dist/index-BjcvkMIS.js +0 -4106
  39. package/dist/index-DfTO4Zx6.cjs +0 -1
@@ -0,0 +1,2351 @@
1
+ import { shallowRef as de, computed as F, unref as ee, watchEffect as Ke, toRef as T, provide as Y, toRaw as re, inject as Q, ref as H, toValue as _t, watch as ve, onBeforeUpdate as Ot, createVNode as I, normalizeStyle as Ie, normalizeClass as K, createElementVNode as S, mergeProps as O, nextTick as _e, capitalize as Bt, Fragment as U, createTextVNode as Oe, withModifiers as se, toDisplayString as Lt, toRefs as At, defineComponent as Et, h as Nt } from "vue";
2
+ import { aP as Rt, U as $t, p as _, N as z, aA as te, K as J, aQ as ce, _ as Ge, J as We, ad as pe, aR as Mt, T as Z, aS as oe, aT as jt, g as $, a0 as Ht, h as Fe, ah as ge, a as Pe, aj as Kt, aU as ie, u as G, a7 as W, x as Gt, y as De, m as ze, as as Wt, A as zt, E as Ue, f as le, b as Je, G as Ut, I as B, aV as Be, S as Ve, aW as Jt, ax as A, aX as Qt, o as Xt, P as Qe, L as Yt, D as Zt, an as Te, d as Le, H as xe, a1 as ke, k as qt, a8 as ea, l as ta, n as aa, F as la } from "./dataTables-4_0nZg-y.js";
3
+ import { V as Xe, a as na, b as fe, u as ra, d as sa } from "./index-D-1LWR3S.js";
4
+ import ue from "moment";
5
+ function Ae(e, t, a) {
6
+ return Object.keys(e).filter((l) => Rt(l) && l.endsWith(t)).reduce((l, n) => (l[n.slice(0, -t.length)] = (r) => $t(e[n], r, a(r)), l), {});
7
+ }
8
+ const oa = (e, t, a) => {
9
+ if (e == null || t == null) return -1;
10
+ if (!t.length) return 0;
11
+ e = e.toString().toLocaleLowerCase(), t = t.toString().toLocaleLowerCase();
12
+ const l = [];
13
+ let n = e.indexOf(t);
14
+ for (; ~n; )
15
+ l.push([n, n + t.length]), n = e.indexOf(t, n + t.length);
16
+ return l.length ? l : -1;
17
+ };
18
+ function Se(e, t) {
19
+ if (!(e == null || typeof e == "boolean" || e === -1))
20
+ return typeof e == "number" ? [[e, e + t.length]] : Array.isArray(e[0]) ? e : [e];
21
+ }
22
+ const ia = _({
23
+ customFilter: Function,
24
+ customKeyFilter: Object,
25
+ filterKeys: [Array, String],
26
+ filterMode: {
27
+ type: String,
28
+ default: "intersection"
29
+ },
30
+ noFilter: Boolean
31
+ }, "filter");
32
+ function ua(e, t, a) {
33
+ const l = [], n = a?.default ?? oa, r = a?.filterKeys ? z(a.filterKeys) : !1, i = Object.keys(a?.customKeyFilter ?? {}).length;
34
+ if (!e?.length) return l;
35
+ let f = null;
36
+ e: for (let u = 0; u < e.length; u++) {
37
+ const [d, m = d] = z(e[u]), h = {}, s = {};
38
+ let o = -1;
39
+ if ((t || i > 0) && !a?.noFilter) {
40
+ let b = !1;
41
+ if (typeof d == "object") {
42
+ if (d.type === "divider" || d.type === "subheader") {
43
+ f?.type === "divider" && d.type === "subheader" && l.push(f), f = {
44
+ index: u,
45
+ matches: {},
46
+ type: d.type
47
+ };
48
+ continue;
49
+ }
50
+ const w = r || Object.keys(m);
51
+ b = w.length === i;
52
+ for (const y of w) {
53
+ const P = te(m, y), V = a?.customKeyFilter?.[y];
54
+ if (o = V ? V(P, t, d) : n(P, t, d), o !== -1 && o !== !1)
55
+ V ? h[y] = Se(o, t) : s[y] = Se(o, t);
56
+ else if (a?.filterMode === "every")
57
+ continue e;
58
+ }
59
+ } else
60
+ o = n(d, t, d), o !== -1 && o !== !1 && (s.title = Se(o, t));
61
+ const c = Object.keys(s).length, v = Object.keys(h).length;
62
+ if (!c && !v || a?.filterMode === "union" && v !== i && !c || a?.filterMode === "intersection" && (v !== i || !c && i > 0 && !b)) continue;
63
+ }
64
+ f && (l.push(f), f = null), l.push({
65
+ index: u,
66
+ matches: {
67
+ ...s,
68
+ ...h
69
+ }
70
+ });
71
+ }
72
+ return l;
73
+ }
74
+ function da(e, t, a, l) {
75
+ const n = de([]), r = de(/* @__PURE__ */ new Map()), i = F(() => l?.transform ? ee(t).map((u) => [u, l.transform(u)]) : ee(t));
76
+ Ke(() => {
77
+ const u = typeof a == "function" ? a() : ee(a), d = typeof u != "string" && typeof u != "number" ? "" : String(u), m = ua(i.value, d, {
78
+ customKeyFilter: {
79
+ ...e.customKeyFilter,
80
+ ...ee(l?.customKeyFilter)
81
+ },
82
+ default: e.customFilter,
83
+ filterKeys: e.filterKeys,
84
+ filterMode: e.filterMode,
85
+ noFilter: e.noFilter
86
+ }), h = ee(t), s = [], o = /* @__PURE__ */ new Map();
87
+ m.forEach((b) => {
88
+ let {
89
+ index: c,
90
+ matches: v
91
+ } = b;
92
+ const w = h[c];
93
+ s.push(w), o.set(w.value, v);
94
+ }), n.value = s, r.value = o;
95
+ });
96
+ function f(u) {
97
+ return r.value.get(u.value);
98
+ }
99
+ return {
100
+ filteredItems: n,
101
+ filteredMatches: r,
102
+ getMatches: f
103
+ };
104
+ }
105
+ const ca = _({
106
+ expandOnClick: Boolean,
107
+ showExpand: Boolean,
108
+ expanded: {
109
+ type: Array,
110
+ default: () => []
111
+ }
112
+ }, "DataTable-expand"), Ye = Symbol.for("vuetify:datatable:expanded");
113
+ function fa(e) {
114
+ const t = T(() => e.expandOnClick), a = J(e, "expanded", e.expanded, (f) => new Set(f), (f) => [...f.values()]);
115
+ function l(f, u) {
116
+ const d = new Set(a.value), m = re(f.value);
117
+ if (u)
118
+ d.add(m);
119
+ else {
120
+ const h = [...a.value].find((s) => re(s) === m);
121
+ d.delete(h);
122
+ }
123
+ a.value = d;
124
+ }
125
+ function n(f) {
126
+ const u = re(f.value);
127
+ return [...a.value].some((d) => re(d) === u);
128
+ }
129
+ function r(f) {
130
+ l(f, !n(f));
131
+ }
132
+ const i = {
133
+ expand: l,
134
+ expanded: a,
135
+ expandOnClick: t,
136
+ isExpanded: n,
137
+ toggleExpand: r
138
+ };
139
+ return Y(Ye, i), i;
140
+ }
141
+ function Ze() {
142
+ const e = Q(Ye);
143
+ if (!e) throw new Error("foo");
144
+ return e;
145
+ }
146
+ const va = _({
147
+ groupBy: {
148
+ type: Array,
149
+ default: () => []
150
+ }
151
+ }, "DataTable-group"), qe = Symbol.for("vuetify:data-table-group");
152
+ function ga(e) {
153
+ return {
154
+ groupBy: J(e, "groupBy")
155
+ };
156
+ }
157
+ function ma(e) {
158
+ const {
159
+ disableSort: t,
160
+ groupBy: a,
161
+ sortBy: l
162
+ } = e, n = H(/* @__PURE__ */ new Set()), r = F(() => a.value.map((m) => ({
163
+ ...m,
164
+ order: m.order ?? !1
165
+ })).concat(t?.value ? [] : l.value));
166
+ function i(m) {
167
+ return n.value.has(m.id);
168
+ }
169
+ function f(m) {
170
+ const h = new Set(n.value);
171
+ i(m) ? h.delete(m.id) : h.add(m.id), n.value = h;
172
+ }
173
+ function u(m) {
174
+ function h(s) {
175
+ const o = [];
176
+ for (const b of s.items)
177
+ "type" in b && b.type === "group" ? o.push(...h(b)) : o.push(b);
178
+ return [...new Set(o)];
179
+ }
180
+ return h({
181
+ items: m
182
+ });
183
+ }
184
+ const d = {
185
+ sortByWithGroups: r,
186
+ toggleGroup: f,
187
+ opened: n,
188
+ groupBy: a,
189
+ extractRows: u,
190
+ isGroupOpen: i
191
+ };
192
+ return Y(qe, d), d;
193
+ }
194
+ function et() {
195
+ const e = Q(qe);
196
+ if (!e) throw new Error("Missing group!");
197
+ return e;
198
+ }
199
+ function ba(e, t) {
200
+ if (!e.length) return [];
201
+ const a = /* @__PURE__ */ new Map();
202
+ for (const l of e) {
203
+ const n = ce(l.raw, t);
204
+ a.has(n) || a.set(n, []), a.get(n).push(l);
205
+ }
206
+ return a;
207
+ }
208
+ function tt(e, t) {
209
+ let a = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 0, l = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : "root";
210
+ if (!t.length) return [];
211
+ const n = ba(e, t[0]), r = [], i = t.slice(1);
212
+ return n.forEach((f, u) => {
213
+ const d = t[0], m = `${l}_${d}_${u}`;
214
+ r.push({
215
+ depth: a,
216
+ id: m,
217
+ key: d,
218
+ value: u,
219
+ items: i.length ? tt(f, i, a + 1, m) : f,
220
+ type: "group"
221
+ });
222
+ }), r;
223
+ }
224
+ function at(e, t, a) {
225
+ const l = [];
226
+ for (const n of e)
227
+ "type" in n && n.type === "group" ? (n.value != null && l.push(n), (t.has(n.id) || n.value == null) && (l.push(...at(n.items, t, a)), a && l.push({
228
+ ...n,
229
+ type: "group-summary"
230
+ }))) : l.push(n);
231
+ return l;
232
+ }
233
+ function ha(e, t, a, l) {
234
+ return {
235
+ flatItems: F(() => {
236
+ if (!t.value.length) return e.value;
237
+ const r = tt(e.value, t.value.map((i) => i.key));
238
+ return at(r, a.value, _t(l));
239
+ })
240
+ };
241
+ }
242
+ function ya(e) {
243
+ let {
244
+ page: t,
245
+ itemsPerPage: a,
246
+ sortBy: l,
247
+ groupBy: n,
248
+ search: r
249
+ } = e;
250
+ const i = Ge("VDataTable"), f = () => ({
251
+ page: t.value,
252
+ itemsPerPage: a.value,
253
+ sortBy: l.value,
254
+ groupBy: n.value,
255
+ search: r.value
256
+ });
257
+ let u = null;
258
+ ve(f, (d) => {
259
+ We(u, d) || (u && u.search !== d.search && (t.value = 1), i.emit("update:options", d), u = d);
260
+ }, {
261
+ deep: !0,
262
+ immediate: !0
263
+ });
264
+ }
265
+ const pa = _({
266
+ page: {
267
+ type: [Number, String],
268
+ default: 1
269
+ },
270
+ itemsPerPage: {
271
+ type: [Number, String],
272
+ default: 10
273
+ }
274
+ }, "DataTable-paginate"), lt = Symbol.for("vuetify:data-table-pagination");
275
+ function xa(e) {
276
+ const t = J(e, "page", void 0, (l) => Number(l ?? 1)), a = J(e, "itemsPerPage", void 0, (l) => Number(l ?? 10));
277
+ return {
278
+ page: t,
279
+ itemsPerPage: a
280
+ };
281
+ }
282
+ function Sa(e) {
283
+ const {
284
+ page: t,
285
+ itemsPerPage: a,
286
+ itemsLength: l
287
+ } = e, n = F(() => a.value === -1 ? 0 : a.value * (t.value - 1)), r = F(() => a.value === -1 ? l.value : Math.min(l.value, n.value + a.value)), i = F(() => a.value === -1 || l.value === 0 ? 1 : Math.ceil(l.value / a.value));
288
+ ve([t, i], () => {
289
+ t.value > i.value && (t.value = i.value);
290
+ });
291
+ function f(s) {
292
+ a.value = s, t.value = 1;
293
+ }
294
+ function u() {
295
+ t.value = pe(t.value + 1, 1, i.value);
296
+ }
297
+ function d() {
298
+ t.value = pe(t.value - 1, 1, i.value);
299
+ }
300
+ function m(s) {
301
+ t.value = pe(s, 1, i.value);
302
+ }
303
+ const h = {
304
+ page: t,
305
+ itemsPerPage: a,
306
+ startIndex: n,
307
+ stopIndex: r,
308
+ pageCount: i,
309
+ itemsLength: l,
310
+ nextPage: u,
311
+ prevPage: d,
312
+ setPage: m,
313
+ setItemsPerPage: f
314
+ };
315
+ return Y(lt, h), h;
316
+ }
317
+ function Pa() {
318
+ const e = Q(lt);
319
+ if (!e) throw new Error("Missing pagination!");
320
+ return e;
321
+ }
322
+ function ka(e) {
323
+ const t = Ge("usePaginatedItems"), {
324
+ items: a,
325
+ startIndex: l,
326
+ stopIndex: n,
327
+ itemsPerPage: r
328
+ } = e, i = F(() => r.value <= 0 ? a.value : a.value.slice(l.value, n.value));
329
+ return ve(i, (f) => {
330
+ t.emit("update:currentItems", f);
331
+ }, {
332
+ immediate: !0
333
+ }), {
334
+ paginatedItems: i
335
+ };
336
+ }
337
+ const wa = {
338
+ showSelectAll: !1,
339
+ allSelected: () => [],
340
+ select: (e) => {
341
+ let {
342
+ items: t,
343
+ value: a
344
+ } = e;
345
+ return new Set(a ? [t[0]?.value] : []);
346
+ },
347
+ selectAll: (e) => {
348
+ let {
349
+ selected: t
350
+ } = e;
351
+ return t;
352
+ }
353
+ }, nt = {
354
+ showSelectAll: !0,
355
+ allSelected: (e) => {
356
+ let {
357
+ currentPage: t
358
+ } = e;
359
+ return t;
360
+ },
361
+ select: (e) => {
362
+ let {
363
+ items: t,
364
+ value: a,
365
+ selected: l
366
+ } = e;
367
+ for (const n of t)
368
+ a ? l.add(n.value) : l.delete(n.value);
369
+ return l;
370
+ },
371
+ selectAll: (e) => {
372
+ let {
373
+ value: t,
374
+ currentPage: a,
375
+ selected: l
376
+ } = e;
377
+ return nt.select({
378
+ items: a,
379
+ value: t,
380
+ selected: l
381
+ });
382
+ }
383
+ }, Ia = {
384
+ showSelectAll: !0,
385
+ allSelected: (e) => {
386
+ let {
387
+ allItems: t
388
+ } = e;
389
+ return t;
390
+ },
391
+ select: (e) => {
392
+ let {
393
+ items: t,
394
+ value: a,
395
+ selected: l
396
+ } = e;
397
+ for (const n of t)
398
+ a ? l.add(n.value) : l.delete(n.value);
399
+ return l;
400
+ },
401
+ selectAll: (e) => {
402
+ let {
403
+ value: t,
404
+ allItems: a
405
+ } = e;
406
+ return new Set(t ? a.map((l) => l.value) : []);
407
+ }
408
+ }, Fa = _({
409
+ showSelect: Boolean,
410
+ selectStrategy: {
411
+ type: [String, Object],
412
+ default: "page"
413
+ },
414
+ modelValue: {
415
+ type: Array,
416
+ default: () => []
417
+ },
418
+ valueComparator: Function
419
+ }, "DataTable-select"), rt = Symbol.for("vuetify:data-table-selection");
420
+ function Da(e, t) {
421
+ let {
422
+ allItems: a,
423
+ currentPage: l
424
+ } = t;
425
+ const n = J(e, "modelValue", e.modelValue, (y) => {
426
+ const P = e.valueComparator;
427
+ return P ? new Set(z(y).map((V) => a.value.find((k) => P(V, k.value))?.value ?? V)) : new Set(z(y).map((V) => Mt(V) ? a.value.find((k) => V === k.value)?.value ?? V : a.value.find((k) => We(V, k.value))?.value ?? V));
428
+ }, (y) => [...y.values()]), r = F(() => a.value.filter((y) => y.selectable)), i = F(() => l.value.filter((y) => y.selectable)), f = F(() => {
429
+ if (typeof e.selectStrategy == "object") return e.selectStrategy;
430
+ switch (e.selectStrategy) {
431
+ case "single":
432
+ return wa;
433
+ case "all":
434
+ return Ia;
435
+ case "page":
436
+ default:
437
+ return nt;
438
+ }
439
+ }), u = de(null);
440
+ function d(y) {
441
+ return z(y).every((P) => n.value.has(P.value));
442
+ }
443
+ function m(y) {
444
+ return z(y).some((P) => n.value.has(P.value));
445
+ }
446
+ function h(y, P) {
447
+ const V = f.value.select({
448
+ items: y,
449
+ value: P,
450
+ selected: new Set(n.value)
451
+ });
452
+ n.value = V;
453
+ }
454
+ function s(y, P, V) {
455
+ const k = [];
456
+ if (P = P ?? l.value.findIndex((L) => L.value === y.value), e.selectStrategy !== "single" && V?.shiftKey && u.value !== null) {
457
+ const [L, N] = [u.value, P].sort((p, x) => p - x);
458
+ k.push(...l.value.slice(L, N + 1).filter((p) => p.selectable));
459
+ } else
460
+ k.push(y), u.value = P;
461
+ h(k, !d([y]));
462
+ }
463
+ function o(y) {
464
+ const P = f.value.selectAll({
465
+ value: y,
466
+ allItems: r.value,
467
+ currentPage: i.value,
468
+ selected: new Set(n.value)
469
+ });
470
+ n.value = P;
471
+ }
472
+ const b = F(() => n.value.size > 0), c = F(() => {
473
+ const y = f.value.allSelected({
474
+ allItems: r.value,
475
+ currentPage: i.value
476
+ });
477
+ return !!y.length && d(y);
478
+ }), v = T(() => f.value.showSelectAll), w = {
479
+ toggleSelect: s,
480
+ select: h,
481
+ selectAll: o,
482
+ isSelected: d,
483
+ isSomeSelected: m,
484
+ someSelected: b,
485
+ allSelected: c,
486
+ showSelectAll: v,
487
+ lastSelectedIndex: u,
488
+ selectStrategy: f
489
+ };
490
+ return Y(rt, w), w;
491
+ }
492
+ function me() {
493
+ const e = Q(rt);
494
+ if (!e) throw new Error("Missing selection!");
495
+ return e;
496
+ }
497
+ const Va = _({
498
+ initialSortOrder: {
499
+ type: String,
500
+ default: "asc",
501
+ validator: (e) => !e || ["asc", "desc"].includes(e)
502
+ },
503
+ sortBy: {
504
+ type: Array,
505
+ default: () => []
506
+ },
507
+ customKeySort: Object,
508
+ multiSort: {
509
+ type: [Boolean, Object],
510
+ default: !1
511
+ },
512
+ mustSort: Boolean
513
+ }, "DataTable-sort"), st = Symbol.for("vuetify:data-table-sort");
514
+ function Ta(e) {
515
+ const t = T(() => e.initialSortOrder), a = J(e, "sortBy"), l = T(() => e.mustSort), n = T(() => e.multiSort);
516
+ return {
517
+ initialSortOrder: t,
518
+ sortBy: a,
519
+ multiSort: n,
520
+ mustSort: l
521
+ };
522
+ }
523
+ function Ca(e, t) {
524
+ if (!jt(e))
525
+ return {
526
+ active: !!e
527
+ };
528
+ const {
529
+ key: a,
530
+ mode: l,
531
+ modifier: n
532
+ } = e, r = n === "alt" && t?.altKey || n === "shift" && t?.shiftKey;
533
+ return {
534
+ active: !a || t?.ctrlKey || t?.metaKey || !1,
535
+ mode: r ? l === "append" ? "prepend" : "append" : l
536
+ };
537
+ }
538
+ function _a(e) {
539
+ const {
540
+ initialSortOrder: t,
541
+ sortBy: a,
542
+ mustSort: l,
543
+ multiSort: n,
544
+ page: r
545
+ } = e, i = (d, m) => {
546
+ if (d.key == null) return;
547
+ let h = a.value.map((c) => ({
548
+ ...c
549
+ })) ?? [];
550
+ const s = h.find((c) => c.key === d.key), o = t.value, b = t.value === "desc" ? "asc" : "desc";
551
+ if (s)
552
+ s.order === b ? l.value && h.length === 1 ? s.order = t.value : h = h.filter((c) => c.key !== d.key) : s.order = b;
553
+ else {
554
+ const {
555
+ active: c,
556
+ mode: v
557
+ } = Ca(n.value, m);
558
+ c ? v === "prepend" ? h.unshift({
559
+ key: d.key,
560
+ order: o
561
+ }) : h.push({
562
+ key: d.key,
563
+ order: o
564
+ }) : h = [{
565
+ key: d.key,
566
+ order: o
567
+ }];
568
+ }
569
+ a.value = h, r && (r.value = 1);
570
+ };
571
+ function f(d) {
572
+ return !!a.value.find((m) => m.key === d.key);
573
+ }
574
+ const u = {
575
+ sortBy: a,
576
+ toggleSort: i,
577
+ isSorted: f
578
+ };
579
+ return Y(st, u), u;
580
+ }
581
+ function ot() {
582
+ const e = Q(st);
583
+ if (!e) throw new Error("Missing sort!");
584
+ return e;
585
+ }
586
+ function Oa(e, t, a, l) {
587
+ const n = Z();
588
+ return {
589
+ sortedItems: F(() => a.value.length ? Ba(t.value, a.value, n.current.value, {
590
+ transform: l?.transform,
591
+ sortFunctions: {
592
+ ...e.customKeySort,
593
+ ...l?.sortFunctions?.value
594
+ },
595
+ sortRawFunctions: l?.sortRawFunctions?.value
596
+ }) : t.value)
597
+ };
598
+ }
599
+ function Ba(e, t, a, l) {
600
+ const n = new Intl.Collator(a, {
601
+ sensitivity: "accent",
602
+ usage: "sort"
603
+ });
604
+ return e.map((i) => [i, l?.transform ? l.transform(i) : i]).sort((i, f) => {
605
+ for (let u = 0; u < t.length; u++) {
606
+ let d = !1;
607
+ const m = t[u].key, h = t[u].order ?? "asc";
608
+ if (h === !1) continue;
609
+ let s = ce(i[1], m), o = ce(f[1], m), b = i[0].raw, c = f[0].raw;
610
+ if (h === "desc" && ([s, o] = [o, s], [b, c] = [c, b]), l?.sortRawFunctions?.[m]) {
611
+ const v = l.sortRawFunctions[m](b, c);
612
+ if (v == null) continue;
613
+ if (d = !0, v) return v;
614
+ }
615
+ if (l?.sortFunctions?.[m]) {
616
+ const v = l.sortFunctions[m](s, o);
617
+ if (v == null) continue;
618
+ if (d = !0, v) return v;
619
+ }
620
+ if (!d && (s instanceof Date && o instanceof Date && (s = s.getTime(), o = o.getTime()), [s, o] = [s, o].map((v) => v != null ? v.toString().toLocaleLowerCase() : v), s !== o))
621
+ return oe(s) && oe(o) ? 0 : oe(s) ? -1 : oe(o) ? 1 : !isNaN(s) && !isNaN(o) ? Number(s) - Number(o) : n.compare(s, o);
622
+ }
623
+ return 0;
624
+ }).map((i) => {
625
+ let [f] = i;
626
+ return f;
627
+ });
628
+ }
629
+ function La() {
630
+ const e = H([]);
631
+ Ot(() => e.value = []);
632
+ function t(a, l) {
633
+ e.value[l] = a;
634
+ }
635
+ return {
636
+ refs: e,
637
+ updateRef: t
638
+ };
639
+ }
640
+ const Aa = _({
641
+ activeColor: String,
642
+ start: {
643
+ type: [Number, String],
644
+ default: 1
645
+ },
646
+ modelValue: {
647
+ type: Number,
648
+ default: (e) => e.start
649
+ },
650
+ disabled: Boolean,
651
+ length: {
652
+ type: [Number, String],
653
+ default: 1,
654
+ validator: (e) => e % 1 === 0
655
+ },
656
+ totalVisible: [Number, String],
657
+ firstIcon: {
658
+ type: B,
659
+ default: "$first"
660
+ },
661
+ prevIcon: {
662
+ type: B,
663
+ default: "$prev"
664
+ },
665
+ nextIcon: {
666
+ type: B,
667
+ default: "$next"
668
+ },
669
+ lastIcon: {
670
+ type: B,
671
+ default: "$last"
672
+ },
673
+ ariaLabel: {
674
+ type: String,
675
+ default: "$vuetify.pagination.ariaLabel.root"
676
+ },
677
+ pageAriaLabel: {
678
+ type: String,
679
+ default: "$vuetify.pagination.ariaLabel.page"
680
+ },
681
+ currentPageAriaLabel: {
682
+ type: String,
683
+ default: "$vuetify.pagination.ariaLabel.currentPage"
684
+ },
685
+ firstAriaLabel: {
686
+ type: String,
687
+ default: "$vuetify.pagination.ariaLabel.first"
688
+ },
689
+ previousAriaLabel: {
690
+ type: String,
691
+ default: "$vuetify.pagination.ariaLabel.previous"
692
+ },
693
+ nextAriaLabel: {
694
+ type: String,
695
+ default: "$vuetify.pagination.ariaLabel.next"
696
+ },
697
+ lastAriaLabel: {
698
+ type: String,
699
+ default: "$vuetify.pagination.ariaLabel.last"
700
+ },
701
+ ellipsis: {
702
+ type: String,
703
+ default: "..."
704
+ },
705
+ showFirstLastPage: Boolean,
706
+ ...Ut(),
707
+ ...Je(),
708
+ ...le(),
709
+ ...Ue(),
710
+ ...zt(),
711
+ ...Wt(),
712
+ ...ze({
713
+ tag: "nav"
714
+ }),
715
+ ...De(),
716
+ ...Gt({
717
+ variant: "text"
718
+ })
719
+ }, "VPagination"), Ee = $()({
720
+ name: "VPagination",
721
+ props: Aa(),
722
+ emits: {
723
+ "update:modelValue": (e) => !0,
724
+ first: (e) => !0,
725
+ prev: (e) => !0,
726
+ next: (e) => !0,
727
+ last: (e) => !0
728
+ },
729
+ setup(e, t) {
730
+ let {
731
+ slots: a,
732
+ emit: l
733
+ } = t;
734
+ const n = J(e, "modelValue"), {
735
+ t: r,
736
+ n: i
737
+ } = Z(), {
738
+ isRtl: f
739
+ } = Ht(), {
740
+ themeClasses: u
741
+ } = Fe(e), {
742
+ width: d
743
+ } = ge(), m = de(-1);
744
+ Pe(void 0, {
745
+ scoped: !0
746
+ });
747
+ const {
748
+ resizeRef: h
749
+ } = Kt((p) => {
750
+ if (!p.length) return;
751
+ const {
752
+ target: x,
753
+ contentRect: g
754
+ } = p[0], D = x.querySelector(".v-pagination__list > *");
755
+ if (!D) return;
756
+ const C = g.width, R = D.offsetWidth + parseFloat(getComputedStyle(D).marginRight) * 2;
757
+ m.value = c(C, R);
758
+ }), s = F(() => parseInt(e.length, 10)), o = F(() => parseInt(e.start, 10)), b = F(() => e.totalVisible != null ? parseInt(e.totalVisible, 10) : m.value >= 0 ? m.value : c(d.value, 58));
759
+ function c(p, x) {
760
+ const g = e.showFirstLastPage ? 5 : 3;
761
+ return Math.max(0, Math.floor(
762
+ // Round to two decimal places to avoid floating point errors
763
+ Number(((p - x * g) / x).toFixed(2))
764
+ ));
765
+ }
766
+ const v = F(() => {
767
+ if (s.value <= 0 || isNaN(s.value) || s.value > Number.MAX_SAFE_INTEGER) return [];
768
+ if (b.value <= 0) return [];
769
+ if (b.value === 1) return [n.value];
770
+ if (s.value <= b.value)
771
+ return ie(s.value, o.value);
772
+ const p = b.value % 2 === 0, x = p ? b.value / 2 : Math.floor(b.value / 2), g = p ? x : x + 1, D = s.value - x;
773
+ if (g - n.value >= 0)
774
+ return [...ie(Math.max(1, b.value - 1), o.value), e.ellipsis, s.value];
775
+ if (n.value - D >= (p ? 1 : 0)) {
776
+ const C = b.value - 1, R = s.value - C + o.value;
777
+ return [o.value, e.ellipsis, ...ie(C, R)];
778
+ } else {
779
+ const C = Math.max(1, b.value - 2), R = C === 1 ? n.value : n.value - Math.ceil(C / 2) + o.value;
780
+ return [o.value, e.ellipsis, ...ie(C, R), e.ellipsis, s.value];
781
+ }
782
+ });
783
+ function w(p, x, g) {
784
+ p.preventDefault(), n.value = x, g && l(g, x);
785
+ }
786
+ const {
787
+ refs: y,
788
+ updateRef: P
789
+ } = La();
790
+ Pe({
791
+ VPaginationBtn: {
792
+ color: T(() => e.color),
793
+ border: T(() => e.border),
794
+ density: T(() => e.density),
795
+ size: T(() => e.size),
796
+ variant: T(() => e.variant),
797
+ rounded: T(() => e.rounded),
798
+ elevation: T(() => e.elevation)
799
+ }
800
+ });
801
+ const V = F(() => v.value.map((p, x) => {
802
+ const g = (D) => P(D, x);
803
+ if (typeof p == "string")
804
+ return {
805
+ isActive: !1,
806
+ key: `ellipsis-${x}`,
807
+ page: p,
808
+ props: {
809
+ ref: g,
810
+ ellipsis: !0,
811
+ icon: !0,
812
+ disabled: !0
813
+ }
814
+ };
815
+ {
816
+ const D = p === n.value;
817
+ return {
818
+ isActive: D,
819
+ key: p,
820
+ page: i(p),
821
+ props: {
822
+ ref: g,
823
+ ellipsis: !1,
824
+ icon: !0,
825
+ disabled: !!e.disabled || Number(e.length) < 2,
826
+ color: D ? e.activeColor : e.color,
827
+ "aria-current": D,
828
+ "aria-label": r(D ? e.currentPageAriaLabel : e.pageAriaLabel, p),
829
+ onClick: (C) => w(C, p)
830
+ }
831
+ };
832
+ }
833
+ })), k = F(() => {
834
+ const p = !!e.disabled || n.value <= o.value, x = !!e.disabled || n.value >= o.value + s.value - 1;
835
+ return {
836
+ first: e.showFirstLastPage ? {
837
+ icon: f.value ? e.lastIcon : e.firstIcon,
838
+ onClick: (g) => w(g, o.value, "first"),
839
+ disabled: p,
840
+ "aria-label": r(e.firstAriaLabel),
841
+ "aria-disabled": p
842
+ } : void 0,
843
+ prev: {
844
+ icon: f.value ? e.nextIcon : e.prevIcon,
845
+ onClick: (g) => w(g, n.value - 1, "prev"),
846
+ disabled: p,
847
+ "aria-label": r(e.previousAriaLabel),
848
+ "aria-disabled": p
849
+ },
850
+ next: {
851
+ icon: f.value ? e.prevIcon : e.nextIcon,
852
+ onClick: (g) => w(g, n.value + 1, "next"),
853
+ disabled: x,
854
+ "aria-label": r(e.nextAriaLabel),
855
+ "aria-disabled": x
856
+ },
857
+ last: e.showFirstLastPage ? {
858
+ icon: f.value ? e.firstIcon : e.lastIcon,
859
+ onClick: (g) => w(g, o.value + s.value - 1, "last"),
860
+ disabled: x,
861
+ "aria-label": r(e.lastAriaLabel),
862
+ "aria-disabled": x
863
+ } : void 0
864
+ };
865
+ });
866
+ function L() {
867
+ const p = n.value - o.value;
868
+ y.value[p]?.$el.focus();
869
+ }
870
+ function N(p) {
871
+ p.key === Be.left && !e.disabled && n.value > Number(e.start) ? (n.value = n.value - 1, _e(L)) : p.key === Be.right && !e.disabled && n.value < o.value + s.value - 1 && (n.value = n.value + 1, _e(L));
872
+ }
873
+ return G(() => I(e.tag, {
874
+ ref: h,
875
+ class: K(["v-pagination", u.value, e.class]),
876
+ style: Ie(e.style),
877
+ role: "navigation",
878
+ "aria-label": r(e.ariaLabel),
879
+ onKeydown: N,
880
+ "data-test": "v-pagination-root"
881
+ }, {
882
+ default: () => [S("ul", {
883
+ class: "v-pagination__list"
884
+ }, [e.showFirstLastPage && S("li", {
885
+ key: "first",
886
+ class: "v-pagination__first",
887
+ "data-test": "v-pagination-first"
888
+ }, [a.first ? a.first(k.value.first) : I(W, O({
889
+ _as: "VPaginationBtn"
890
+ }, k.value.first), null)]), S("li", {
891
+ key: "prev",
892
+ class: "v-pagination__prev",
893
+ "data-test": "v-pagination-prev"
894
+ }, [a.prev ? a.prev(k.value.prev) : I(W, O({
895
+ _as: "VPaginationBtn"
896
+ }, k.value.prev), null)]), V.value.map((p, x) => S("li", {
897
+ key: p.key,
898
+ class: K(["v-pagination__item", {
899
+ "v-pagination__item--is-active": p.isActive
900
+ }]),
901
+ "data-test": "v-pagination-item"
902
+ }, [a.item ? a.item(p) : I(W, O({
903
+ _as: "VPaginationBtn"
904
+ }, p.props), {
905
+ default: () => [p.page]
906
+ })])), S("li", {
907
+ key: "next",
908
+ class: "v-pagination__next",
909
+ "data-test": "v-pagination-next"
910
+ }, [a.next ? a.next(k.value.next) : I(W, O({
911
+ _as: "VPaginationBtn"
912
+ }, k.value.next), null)]), e.showFirstLastPage && S("li", {
913
+ key: "last",
914
+ class: "v-pagination__last",
915
+ "data-test": "v-pagination-last"
916
+ }, [a.last ? a.last(k.value.last) : I(W, O({
917
+ _as: "VPaginationBtn"
918
+ }, k.value.last), null)])])]
919
+ })), {};
920
+ }
921
+ }), it = _({
922
+ color: String,
923
+ prevIcon: {
924
+ type: B,
925
+ default: "$prev"
926
+ },
927
+ nextIcon: {
928
+ type: B,
929
+ default: "$next"
930
+ },
931
+ firstIcon: {
932
+ type: B,
933
+ default: "$first"
934
+ },
935
+ lastIcon: {
936
+ type: B,
937
+ default: "$last"
938
+ },
939
+ itemsPerPageText: {
940
+ type: String,
941
+ default: "$vuetify.dataFooter.itemsPerPageText"
942
+ },
943
+ pageText: {
944
+ type: String,
945
+ default: "$vuetify.dataFooter.pageText"
946
+ },
947
+ firstPageLabel: {
948
+ type: String,
949
+ default: "$vuetify.dataFooter.firstPage"
950
+ },
951
+ prevPageLabel: {
952
+ type: String,
953
+ default: "$vuetify.dataFooter.prevPage"
954
+ },
955
+ nextPageLabel: {
956
+ type: String,
957
+ default: "$vuetify.dataFooter.nextPage"
958
+ },
959
+ lastPageLabel: {
960
+ type: String,
961
+ default: "$vuetify.dataFooter.lastPage"
962
+ },
963
+ itemsPerPageOptions: {
964
+ type: Array,
965
+ default: () => [{
966
+ value: 10,
967
+ title: "10"
968
+ }, {
969
+ value: 25,
970
+ title: "25"
971
+ }, {
972
+ value: 50,
973
+ title: "50"
974
+ }, {
975
+ value: 100,
976
+ title: "100"
977
+ }, {
978
+ value: -1,
979
+ title: "$vuetify.dataFooter.itemsPerPageAll"
980
+ }]
981
+ },
982
+ showCurrentPage: Boolean
983
+ }, "VDataTableFooter"), Ne = $()({
984
+ name: "VDataTableFooter",
985
+ props: it(),
986
+ setup(e, t) {
987
+ let {
988
+ slots: a
989
+ } = t;
990
+ const {
991
+ t: l
992
+ } = Z(), {
993
+ page: n,
994
+ pageCount: r,
995
+ startIndex: i,
996
+ stopIndex: f,
997
+ itemsLength: u,
998
+ itemsPerPage: d,
999
+ setItemsPerPage: m
1000
+ } = Pa(), h = F(() => e.itemsPerPageOptions.map((s) => typeof s == "number" ? {
1001
+ value: s,
1002
+ title: s === -1 ? l("$vuetify.dataFooter.itemsPerPageAll") : String(s)
1003
+ } : {
1004
+ ...s,
1005
+ title: isNaN(Number(s.title)) ? l(s.title) : s.title
1006
+ }));
1007
+ return G(() => {
1008
+ const s = Ee.filterProps(e);
1009
+ return S("div", {
1010
+ class: "v-data-table-footer"
1011
+ }, [a.prepend?.(), S("div", {
1012
+ class: "v-data-table-footer__items-per-page"
1013
+ }, [S("span", {
1014
+ "aria-label": l(e.itemsPerPageText)
1015
+ }, [l(e.itemsPerPageText)]), I(Xe, {
1016
+ items: h.value,
1017
+ itemColor: e.color,
1018
+ modelValue: d.value,
1019
+ "onUpdate:modelValue": (o) => m(Number(o)),
1020
+ density: "compact",
1021
+ variant: "outlined",
1022
+ hideDetails: !0
1023
+ }, null)]), S("div", {
1024
+ class: "v-data-table-footer__info"
1025
+ }, [S("div", null, [l(e.pageText, u.value ? i.value + 1 : 0, f.value, u.value)])]), S("div", {
1026
+ class: "v-data-table-footer__pagination"
1027
+ }, [I(Ee, O({
1028
+ modelValue: n.value,
1029
+ "onUpdate:modelValue": (o) => n.value = o,
1030
+ density: "comfortable",
1031
+ firstAriaLabel: e.firstPageLabel,
1032
+ lastAriaLabel: e.lastPageLabel,
1033
+ length: r.value,
1034
+ nextAriaLabel: e.nextPageLabel,
1035
+ previousAriaLabel: e.prevPageLabel,
1036
+ rounded: !0,
1037
+ showFirstLastPage: !0,
1038
+ totalVisible: e.showCurrentPage ? 1 : 0,
1039
+ variant: "plain"
1040
+ }, Ve(s, ["color"])), null)])]);
1041
+ }), {};
1042
+ }
1043
+ }), ae = Jt({
1044
+ align: {
1045
+ type: String,
1046
+ default: "start"
1047
+ },
1048
+ fixed: {
1049
+ type: [Boolean, String],
1050
+ default: !1
1051
+ },
1052
+ fixedOffset: [Number, String],
1053
+ fixedEndOffset: [Number, String],
1054
+ height: [Number, String],
1055
+ lastFixed: Boolean,
1056
+ firstFixedEnd: Boolean,
1057
+ noPadding: Boolean,
1058
+ indent: [Number, String],
1059
+ empty: Boolean,
1060
+ tag: String,
1061
+ width: [Number, String],
1062
+ maxWidth: [Number, String],
1063
+ nowrap: Boolean
1064
+ }, (e, t) => {
1065
+ let {
1066
+ slots: a
1067
+ } = t;
1068
+ const l = e.tag ?? "td", n = typeof e.fixed == "string" ? e.fixed : e.fixed ? "start" : "none";
1069
+ return I(l, {
1070
+ class: K(["v-data-table__td", {
1071
+ "v-data-table-column--fixed": n === "start",
1072
+ "v-data-table-column--fixed-end": n === "end",
1073
+ "v-data-table-column--last-fixed": e.lastFixed,
1074
+ "v-data-table-column--first-fixed-end": e.firstFixedEnd,
1075
+ "v-data-table-column--no-padding": e.noPadding,
1076
+ "v-data-table-column--nowrap": e.nowrap,
1077
+ "v-data-table-column--empty": e.empty
1078
+ }, `v-data-table-column--align-${e.align}`]),
1079
+ style: {
1080
+ height: A(e.height),
1081
+ width: A(e.width),
1082
+ maxWidth: A(e.maxWidth),
1083
+ left: n === "start" ? A(e.fixedOffset || null) : void 0,
1084
+ right: n === "end" ? A(e.fixedEndOffset || null) : void 0,
1085
+ paddingInlineStart: e.indent ? A(e.indent) : void 0
1086
+ }
1087
+ }, {
1088
+ default: () => [a.default?.()]
1089
+ });
1090
+ }), Ea = _({
1091
+ headers: Array
1092
+ }, "DataTable-header"), ut = Symbol.for("vuetify:data-table-headers"), dt = {
1093
+ title: "",
1094
+ sortable: !1
1095
+ }, Na = {
1096
+ ...dt,
1097
+ width: 48
1098
+ };
1099
+ function Ra() {
1100
+ const t = (arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : []).map((a) => ({
1101
+ element: a,
1102
+ priority: 0
1103
+ }));
1104
+ return {
1105
+ enqueue: (a, l) => {
1106
+ let n = !1;
1107
+ for (let r = 0; r < t.length; r++)
1108
+ if (t[r].priority > l) {
1109
+ t.splice(r, 0, {
1110
+ element: a,
1111
+ priority: l
1112
+ }), n = !0;
1113
+ break;
1114
+ }
1115
+ n || t.push({
1116
+ element: a,
1117
+ priority: l
1118
+ });
1119
+ },
1120
+ size: () => t.length,
1121
+ count: () => {
1122
+ let a = 0;
1123
+ if (!t.length) return 0;
1124
+ const l = Math.floor(t[0].priority);
1125
+ for (let n = 0; n < t.length; n++)
1126
+ Math.floor(t[n].priority) === l && (a += 1);
1127
+ return a;
1128
+ },
1129
+ dequeue: () => t.shift()
1130
+ };
1131
+ }
1132
+ function we(e) {
1133
+ let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [];
1134
+ if (!e.children)
1135
+ t.push(e);
1136
+ else
1137
+ for (const a of e.children)
1138
+ we(a, t);
1139
+ return t;
1140
+ }
1141
+ function ct(e) {
1142
+ let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : /* @__PURE__ */ new Set();
1143
+ for (const a of e)
1144
+ a.key && t.add(a.key), a.children && ct(a.children, t);
1145
+ return t;
1146
+ }
1147
+ function $a(e) {
1148
+ if (e.key) {
1149
+ if (e.key === "data-table-group") return dt;
1150
+ if (["data-table-expand", "data-table-select"].includes(e.key)) return Na;
1151
+ }
1152
+ }
1153
+ function Ce(e) {
1154
+ let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0;
1155
+ return e.children ? Math.max(t, ...e.children.map((a) => Ce(a, t + 1))) : t;
1156
+ }
1157
+ function Ma(e) {
1158
+ let t = !1;
1159
+ function a(r, i) {
1160
+ let f = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : "none";
1161
+ if (r)
1162
+ if (f !== "none" && (r.fixed = f), r.fixed === !0 && (r.fixed = "start"), r.fixed === i)
1163
+ if (r.children)
1164
+ if (i === "start")
1165
+ for (let u = r.children.length - 1; u >= 0; u--)
1166
+ a(r.children[u], i, i);
1167
+ else
1168
+ for (let u = 0; u < r.children.length; u++)
1169
+ a(r.children[u], i, i);
1170
+ else
1171
+ !t && i === "start" ? r.lastFixed = !0 : !t && i === "end" ? r.firstFixedEnd = !0 : isNaN(Number(r.width)) ? Qt(`Multiple fixed columns should have a static width (key: ${r.key})`) : r.minWidth = Math.max(Number(r.width) || 0, Number(r.minWidth) || 0), t = !0;
1172
+ else if (r.children)
1173
+ if (i === "start")
1174
+ for (let u = r.children.length - 1; u >= 0; u--)
1175
+ a(r.children[u], i);
1176
+ else
1177
+ for (let u = 0; u < r.children.length; u++)
1178
+ a(r.children[u], i);
1179
+ else
1180
+ t = !1;
1181
+ }
1182
+ for (let r = e.length - 1; r >= 0; r--)
1183
+ a(e[r], "start");
1184
+ for (let r = 0; r < e.length; r++)
1185
+ a(e[r], "end");
1186
+ let l = 0;
1187
+ for (let r = 0; r < e.length; r++)
1188
+ l = ft(e[r], l);
1189
+ let n = 0;
1190
+ for (let r = e.length - 1; r >= 0; r--)
1191
+ n = vt(e[r], n);
1192
+ }
1193
+ function ft(e) {
1194
+ let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0;
1195
+ if (!e) return t;
1196
+ if (e.children) {
1197
+ e.fixedOffset = t;
1198
+ for (const a of e.children)
1199
+ t = ft(a, t);
1200
+ } else e.fixed && e.fixed !== "end" && (e.fixedOffset = t, t += parseFloat(e.width || "0") || 0);
1201
+ return t;
1202
+ }
1203
+ function vt(e) {
1204
+ let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0;
1205
+ if (!e) return t;
1206
+ if (e.children) {
1207
+ e.fixedEndOffset = t;
1208
+ for (const a of e.children)
1209
+ t = vt(a, t);
1210
+ } else e.fixed === "end" && (e.fixedEndOffset = t, t += parseFloat(e.width || "0") || 0);
1211
+ return t;
1212
+ }
1213
+ function ja(e, t) {
1214
+ const a = [];
1215
+ let l = 0;
1216
+ const n = Ra(e);
1217
+ for (; n.size() > 0; ) {
1218
+ let i = n.count();
1219
+ const f = [];
1220
+ let u = 1;
1221
+ for (; i > 0; ) {
1222
+ const {
1223
+ element: d,
1224
+ priority: m
1225
+ } = n.dequeue(), h = t - l - Ce(d);
1226
+ if (f.push({
1227
+ ...d,
1228
+ rowspan: h ?? 1,
1229
+ colspan: d.children ? we(d).length : 1
1230
+ }), d.children)
1231
+ for (const s of d.children) {
1232
+ const o = m % 1 + u / Math.pow(10, l + 2);
1233
+ n.enqueue(s, l + h + o);
1234
+ }
1235
+ u += 1, i -= 1;
1236
+ }
1237
+ l += 1, a.push(f);
1238
+ }
1239
+ return {
1240
+ columns: e.map((i) => we(i)).flat(),
1241
+ headers: a
1242
+ };
1243
+ }
1244
+ function gt(e) {
1245
+ const t = [];
1246
+ for (const a of e) {
1247
+ const l = {
1248
+ ...$a(a),
1249
+ ...a
1250
+ }, n = l.key ?? (typeof l.value == "string" ? l.value : null), r = l.value ?? n ?? null, i = {
1251
+ ...l,
1252
+ key: n,
1253
+ value: r,
1254
+ sortable: l.sortable ?? (l.key != null || !!l.sort),
1255
+ children: l.children ? gt(l.children) : void 0
1256
+ };
1257
+ t.push(i);
1258
+ }
1259
+ return t;
1260
+ }
1261
+ function Ha(e, t) {
1262
+ const a = H([]), l = H([]), n = H({}), r = H({}), i = H({});
1263
+ Ke(() => {
1264
+ const d = (e.headers || Object.keys(e.items[0] ?? {}).map((c) => ({
1265
+ key: c,
1266
+ title: Bt(c)
1267
+ }))).slice(), m = ct(d);
1268
+ t?.groupBy?.value.length && !m.has("data-table-group") && d.unshift({
1269
+ key: "data-table-group",
1270
+ title: "Group"
1271
+ }), t?.showSelect?.value && !m.has("data-table-select") && d.unshift({
1272
+ key: "data-table-select"
1273
+ }), t?.showExpand?.value && !m.has("data-table-expand") && d.push({
1274
+ key: "data-table-expand"
1275
+ });
1276
+ const h = gt(d);
1277
+ Ma(h);
1278
+ const s = Math.max(...h.map((c) => Ce(c))) + 1, o = ja(h, s);
1279
+ a.value = o.headers, l.value = o.columns;
1280
+ const b = o.headers.flat(1);
1281
+ for (const c of b)
1282
+ c.key && (c.sortable && (c.sort && (n.value[c.key] = c.sort), c.sortRaw && (r.value[c.key] = c.sortRaw)), c.filter && (i.value[c.key] = c.filter));
1283
+ });
1284
+ const f = {
1285
+ headers: a,
1286
+ columns: l,
1287
+ sortFunctions: n,
1288
+ sortRawFunctions: r,
1289
+ filterFunctions: i
1290
+ };
1291
+ return Y(ut, f), f;
1292
+ }
1293
+ function be() {
1294
+ const e = Q(ut);
1295
+ if (!e) throw new Error("Missing headers!");
1296
+ return e;
1297
+ }
1298
+ const mt = _({
1299
+ color: String,
1300
+ disableSort: Boolean,
1301
+ fixedHeader: Boolean,
1302
+ multiSort: Boolean,
1303
+ sortAscIcon: {
1304
+ type: B,
1305
+ default: "$sortAsc"
1306
+ },
1307
+ sortDescIcon: {
1308
+ type: B,
1309
+ default: "$sortDesc"
1310
+ },
1311
+ headerProps: {
1312
+ type: Object
1313
+ },
1314
+ /** @deprecated */
1315
+ sticky: Boolean,
1316
+ ...le(),
1317
+ ...Te(),
1318
+ ...Zt()
1319
+ }, "VDataTableHeaders"), Re = $()({
1320
+ name: "VDataTableHeaders",
1321
+ props: mt(),
1322
+ setup(e, t) {
1323
+ let {
1324
+ slots: a
1325
+ } = t;
1326
+ const {
1327
+ t: l
1328
+ } = Z(), {
1329
+ toggleSort: n,
1330
+ sortBy: r,
1331
+ isSorted: i
1332
+ } = ot(), {
1333
+ someSelected: f,
1334
+ allSelected: u,
1335
+ selectAll: d,
1336
+ showSelectAll: m
1337
+ } = me(), {
1338
+ columns: h,
1339
+ headers: s
1340
+ } = be(), {
1341
+ loaderClasses: o
1342
+ } = Xt(e);
1343
+ function b(x, g) {
1344
+ if (!(e.sticky || e.fixedHeader) && !x.fixed) return;
1345
+ const D = typeof x.fixed == "string" ? x.fixed : x.fixed ? "start" : "none";
1346
+ return {
1347
+ position: "sticky",
1348
+ left: D === "start" ? A(x.fixedOffset) : void 0,
1349
+ right: D === "end" ? A(x.fixedEndOffset) : void 0,
1350
+ top: e.sticky || e.fixedHeader ? `calc(var(--v-table-header-height) * ${g})` : void 0
1351
+ };
1352
+ }
1353
+ function c(x, g) {
1354
+ x.key === "Enter" && !e.disableSort && n(g, x);
1355
+ }
1356
+ function v(x) {
1357
+ const g = r.value.find((D) => D.key === x.key);
1358
+ return g ? g.order === "asc" ? e.sortAscIcon : e.sortDescIcon : e.sortAscIcon;
1359
+ }
1360
+ const {
1361
+ backgroundColorClasses: w,
1362
+ backgroundColorStyles: y
1363
+ } = Qe(() => e.color), {
1364
+ displayClasses: P,
1365
+ mobile: V
1366
+ } = ge(e), k = F(() => ({
1367
+ headers: s.value,
1368
+ columns: h.value,
1369
+ toggleSort: n,
1370
+ isSorted: i,
1371
+ sortBy: r.value,
1372
+ someSelected: f.value,
1373
+ allSelected: u.value,
1374
+ selectAll: d,
1375
+ getSortIcon: v
1376
+ })), L = F(() => ["v-data-table__th", {
1377
+ "v-data-table__th--sticky": e.sticky || e.fixedHeader
1378
+ }, P.value, o.value]), N = (x) => {
1379
+ let {
1380
+ column: g,
1381
+ x: D,
1382
+ y: C
1383
+ } = x;
1384
+ const R = g.key === "data-table-select" || g.key === "data-table-expand", ne = g.key === "data-table-group" && g.width === 0 && !g.title, ye = O(e.headerProps ?? {}, g.headerProps ?? {});
1385
+ return I(ae, O({
1386
+ tag: "th",
1387
+ align: g.align,
1388
+ class: [{
1389
+ "v-data-table__th--sortable": g.sortable && !e.disableSort,
1390
+ "v-data-table__th--sorted": i(g),
1391
+ "v-data-table__th--fixed": g.fixed
1392
+ }, ...L.value],
1393
+ style: {
1394
+ width: A(g.width),
1395
+ minWidth: A(g.minWidth),
1396
+ maxWidth: A(g.maxWidth),
1397
+ ...b(g, C)
1398
+ },
1399
+ colspan: g.colspan,
1400
+ rowspan: g.rowspan,
1401
+ fixed: g.fixed,
1402
+ nowrap: g.nowrap,
1403
+ lastFixed: g.lastFixed,
1404
+ firstFixedEnd: g.firstFixedEnd,
1405
+ noPadding: R,
1406
+ empty: ne,
1407
+ tabindex: g.sortable ? 0 : void 0,
1408
+ onClick: g.sortable ? (M) => n(g, M) : void 0,
1409
+ onKeydown: g.sortable ? (M) => c(M, g) : void 0
1410
+ }, ye), {
1411
+ default: () => {
1412
+ const M = `header.${g.key}`, X = {
1413
+ column: g,
1414
+ selectAll: d,
1415
+ isSorted: i,
1416
+ toggleSort: n,
1417
+ sortBy: r.value,
1418
+ someSelected: f.value,
1419
+ allSelected: u.value,
1420
+ getSortIcon: v
1421
+ };
1422
+ return a[M] ? a[M](X) : ne ? "" : g.key === "data-table-select" ? a["header.data-table-select"]?.(X) ?? (m.value && I(fe, {
1423
+ color: e.color,
1424
+ density: e.density,
1425
+ modelValue: u.value,
1426
+ indeterminate: f.value && !u.value,
1427
+ "onUpdate:modelValue": d
1428
+ }, null)) : S("div", {
1429
+ class: "v-data-table-header__content"
1430
+ }, [S("span", null, [g.title]), g.sortable && !e.disableSort && I(Le, {
1431
+ key: "icon",
1432
+ class: "v-data-table-header__sort-icon",
1433
+ icon: v(g)
1434
+ }, null), e.multiSort && i(g) && S("div", {
1435
+ key: "badge",
1436
+ class: K(["v-data-table-header__sort-badge", ...w.value]),
1437
+ style: Ie(y.value)
1438
+ }, [r.value.findIndex((q) => q.key === g.key) + 1])]);
1439
+ }
1440
+ });
1441
+ }, p = () => {
1442
+ const x = F(() => h.value.filter((g) => g?.sortable && !e.disableSort));
1443
+ return I(ae, O({
1444
+ tag: "th",
1445
+ class: [...L.value],
1446
+ colspan: s.value.length + 1
1447
+ }, e.headerProps), {
1448
+ default: () => [S("div", {
1449
+ class: "v-data-table-header__content"
1450
+ }, [I(Xe, {
1451
+ chips: !0,
1452
+ color: e.color,
1453
+ class: "v-data-table__td-sort-select",
1454
+ clearable: !0,
1455
+ density: "default",
1456
+ items: x.value,
1457
+ label: l("$vuetify.dataTable.sortBy"),
1458
+ multiple: e.multiSort,
1459
+ variant: "underlined",
1460
+ "onClick:clear": () => r.value = [],
1461
+ "onClick:append": () => d(!u.value)
1462
+ }, {
1463
+ append: () => I(fe, {
1464
+ color: e.color,
1465
+ density: "compact",
1466
+ modelValue: u.value,
1467
+ indeterminate: f.value && !u.value,
1468
+ "onUpdate:modelValue": d
1469
+ }, null),
1470
+ chip: (g) => I(na, {
1471
+ onClick: g.item.raw?.sortable ? () => n(g.item.raw) : void 0,
1472
+ onMousedown: (D) => {
1473
+ D.preventDefault(), D.stopPropagation();
1474
+ }
1475
+ }, {
1476
+ default: () => [g.item.title, I(Le, {
1477
+ class: K(["v-data-table__td-sort-icon", i(g.item.raw) && "v-data-table__td-sort-icon-active"]),
1478
+ icon: v(g.item.raw),
1479
+ size: "small"
1480
+ }, null)]
1481
+ })
1482
+ })])]
1483
+ });
1484
+ };
1485
+ G(() => V.value ? S("tr", null, [I(p, null, null)]) : S(U, null, [a.headers ? a.headers(k.value) : s.value.map((x, g) => S("tr", null, [x.map((D, C) => I(N, {
1486
+ column: D,
1487
+ x: C,
1488
+ y: g
1489
+ }, null))])), e.loading && S("tr", {
1490
+ class: "v-data-table-progress"
1491
+ }, [S("th", {
1492
+ colspan: h.value.length
1493
+ }, [I(Yt, {
1494
+ name: "v-data-table-progress",
1495
+ absolute: !0,
1496
+ active: !0,
1497
+ color: typeof e.loading == "boolean" || e.loading === "true" ? e.color : e.loading,
1498
+ indeterminate: !0
1499
+ }, {
1500
+ default: a.loader
1501
+ })])])]));
1502
+ }
1503
+ }), bt = _({
1504
+ item: {
1505
+ type: Object,
1506
+ required: !0
1507
+ },
1508
+ groupCollapseIcon: {
1509
+ type: B,
1510
+ default: "$tableGroupCollapse"
1511
+ },
1512
+ groupExpandIcon: {
1513
+ type: B,
1514
+ default: "$tableGroupExpand"
1515
+ },
1516
+ ...le()
1517
+ }, "VDataTableGroupHeaderRow"), Ka = $()({
1518
+ name: "VDataTableGroupHeaderRow",
1519
+ props: bt(),
1520
+ setup(e, t) {
1521
+ let {
1522
+ slots: a
1523
+ } = t;
1524
+ const {
1525
+ isGroupOpen: l,
1526
+ toggleGroup: n,
1527
+ extractRows: r
1528
+ } = et(), {
1529
+ isSelected: i,
1530
+ isSomeSelected: f,
1531
+ select: u
1532
+ } = me(), {
1533
+ columns: d
1534
+ } = be(), m = F(() => r([e.item])), h = T(() => d.value.length - (d.value.some((s) => s.key === "data-table-select") ? 1 : 0));
1535
+ return () => S("tr", {
1536
+ class: "v-data-table-group-header-row",
1537
+ style: {
1538
+ "--v-data-table-group-header-row-depth": e.item.depth
1539
+ }
1540
+ }, [d.value.map((s) => {
1541
+ if (s.key === "data-table-group") {
1542
+ const o = l(e.item) ? e.groupCollapseIcon : e.groupExpandIcon, b = () => n(e.item);
1543
+ return a["data-table-group"]?.({
1544
+ item: e.item,
1545
+ count: m.value.length,
1546
+ props: {
1547
+ icon: o,
1548
+ onClick: b
1549
+ }
1550
+ }) ?? I(ae, {
1551
+ class: "v-data-table-group-header-row__column",
1552
+ colspan: h.value
1553
+ }, {
1554
+ default: () => [I(W, {
1555
+ size: "small",
1556
+ variant: "text",
1557
+ icon: o,
1558
+ onClick: b
1559
+ }, null), S("span", null, [e.item.value]), S("span", null, [Oe("("), m.value.length, Oe(")")])]
1560
+ });
1561
+ } else if (s.key === "data-table-select") {
1562
+ const o = i(m.value), b = f(m.value) && !o, c = (v) => u(m.value, v);
1563
+ return a["data-table-select"]?.({
1564
+ props: {
1565
+ modelValue: o,
1566
+ indeterminate: b,
1567
+ "onUpdate:modelValue": c
1568
+ }
1569
+ }) ?? I(ae, {
1570
+ class: "v-data-table__td--select-row",
1571
+ noPadding: !0
1572
+ }, {
1573
+ default: () => [I(fe, {
1574
+ density: e.density,
1575
+ modelValue: o,
1576
+ indeterminate: b,
1577
+ "onUpdate:modelValue": c
1578
+ }, null)]
1579
+ });
1580
+ }
1581
+ return "";
1582
+ })]);
1583
+ }
1584
+ }), ht = _({
1585
+ color: String,
1586
+ index: Number,
1587
+ item: Object,
1588
+ cellProps: [Object, Function],
1589
+ collapseIcon: {
1590
+ type: B,
1591
+ default: "$collapse"
1592
+ },
1593
+ expandIcon: {
1594
+ type: B,
1595
+ default: "$expand"
1596
+ },
1597
+ onClick: xe(),
1598
+ onContextmenu: xe(),
1599
+ onDblclick: xe(),
1600
+ ...le(),
1601
+ ...Te()
1602
+ }, "VDataTableRow"), Ga = $()({
1603
+ name: "VDataTableRow",
1604
+ props: ht(),
1605
+ setup(e, t) {
1606
+ let {
1607
+ slots: a
1608
+ } = t;
1609
+ const {
1610
+ displayClasses: l,
1611
+ mobile: n
1612
+ } = ge(e, "v-data-table__tr"), {
1613
+ isSelected: r,
1614
+ toggleSelect: i,
1615
+ someSelected: f,
1616
+ allSelected: u,
1617
+ selectAll: d
1618
+ } = me(), {
1619
+ isExpanded: m,
1620
+ toggleExpand: h
1621
+ } = Ze(), {
1622
+ toggleSort: s,
1623
+ sortBy: o,
1624
+ isSorted: b
1625
+ } = ot(), {
1626
+ columns: c
1627
+ } = be();
1628
+ G(() => S("tr", {
1629
+ class: K(["v-data-table__tr", {
1630
+ "v-data-table__tr--clickable": !!(e.onClick || e.onContextmenu || e.onDblclick)
1631
+ }, l.value]),
1632
+ onClick: e.onClick,
1633
+ onContextmenu: e.onContextmenu,
1634
+ onDblclick: e.onDblclick
1635
+ }, [e.item && c.value.map((v, w) => {
1636
+ const y = e.item, P = `item.${v.key}`, V = `header.${v.key}`, k = {
1637
+ index: e.index,
1638
+ item: y.raw,
1639
+ internalItem: y,
1640
+ value: ce(y.columns, v.key),
1641
+ column: v,
1642
+ isSelected: r,
1643
+ toggleSelect: i,
1644
+ isExpanded: m,
1645
+ toggleExpand: h
1646
+ }, L = {
1647
+ column: v,
1648
+ selectAll: d,
1649
+ isSorted: b,
1650
+ toggleSort: s,
1651
+ sortBy: o.value,
1652
+ someSelected: f.value,
1653
+ allSelected: u.value,
1654
+ getSortIcon: () => ""
1655
+ }, N = typeof e.cellProps == "function" ? e.cellProps({
1656
+ index: k.index,
1657
+ item: k.item,
1658
+ internalItem: k.internalItem,
1659
+ value: k.value,
1660
+ column: v
1661
+ }) : e.cellProps, p = typeof v.cellProps == "function" ? v.cellProps({
1662
+ index: k.index,
1663
+ item: k.item,
1664
+ internalItem: k.internalItem,
1665
+ value: k.value
1666
+ }) : v.cellProps, x = v.key === "data-table-select" || v.key === "data-table-expand", g = v.key === "data-table-group" && v.width === 0 && !v.title;
1667
+ return I(ae, O({
1668
+ align: v.align,
1669
+ indent: v.intent,
1670
+ class: {
1671
+ "v-data-table__td--expanded-row": v.key === "data-table-expand",
1672
+ "v-data-table__td--select-row": v.key === "data-table-select"
1673
+ },
1674
+ fixed: v.fixed,
1675
+ fixedOffset: v.fixedOffset,
1676
+ fixedEndOffset: v.fixedEndOffset,
1677
+ lastFixed: v.lastFixed,
1678
+ firstFixedEnd: v.firstFixedEnd,
1679
+ maxWidth: n.value ? void 0 : v.maxWidth,
1680
+ noPadding: x,
1681
+ empty: g,
1682
+ nowrap: v.nowrap,
1683
+ width: n.value ? void 0 : v.width
1684
+ }, N, p), {
1685
+ default: () => {
1686
+ if (v.key === "data-table-select")
1687
+ return a["item.data-table-select"]?.({
1688
+ ...k,
1689
+ props: {
1690
+ color: e.color,
1691
+ disabled: !y.selectable,
1692
+ modelValue: r([y]),
1693
+ onClick: se(() => i(y), ["stop"])
1694
+ }
1695
+ }) ?? I(fe, {
1696
+ color: e.color,
1697
+ disabled: !y.selectable,
1698
+ density: e.density,
1699
+ modelValue: r([y]),
1700
+ onClick: se((C) => i(y, e.index, C), ["stop"])
1701
+ }, null);
1702
+ if (v.key === "data-table-expand")
1703
+ return a["item.data-table-expand"]?.({
1704
+ ...k,
1705
+ props: {
1706
+ icon: m(y) ? e.collapseIcon : e.expandIcon,
1707
+ size: "small",
1708
+ variant: "text",
1709
+ onClick: se(() => h(y), ["stop"])
1710
+ }
1711
+ }) ?? I(W, {
1712
+ icon: m(y) ? e.collapseIcon : e.expandIcon,
1713
+ size: "small",
1714
+ variant: "text",
1715
+ onClick: se(() => h(y), ["stop"])
1716
+ }, null);
1717
+ if (a[P] && !n.value) return a[P](k);
1718
+ const D = Lt(k.value);
1719
+ return n.value ? S(U, null, [S("div", {
1720
+ class: "v-data-table__td-title"
1721
+ }, [a[V]?.(L) ?? v.title]), S("div", {
1722
+ class: "v-data-table__td-value"
1723
+ }, [a[P]?.(k) ?? D])]) : D;
1724
+ }
1725
+ });
1726
+ })]));
1727
+ }
1728
+ }), yt = _({
1729
+ color: String,
1730
+ loading: [Boolean, String],
1731
+ loadingText: {
1732
+ type: String,
1733
+ default: "$vuetify.dataIterator.loadingText"
1734
+ },
1735
+ hideNoData: Boolean,
1736
+ items: {
1737
+ type: Array,
1738
+ default: () => []
1739
+ },
1740
+ noDataText: {
1741
+ type: String,
1742
+ default: "$vuetify.noDataText"
1743
+ },
1744
+ rowProps: [Object, Function],
1745
+ cellProps: [Object, Function],
1746
+ ...ke(ht(), ["collapseIcon", "expandIcon", "density"]),
1747
+ ...ke(bt(), ["groupCollapseIcon", "groupExpandIcon", "density"]),
1748
+ ...Te()
1749
+ }, "VDataTableRows"), $e = $()({
1750
+ name: "VDataTableRows",
1751
+ inheritAttrs: !1,
1752
+ props: yt(),
1753
+ setup(e, t) {
1754
+ let {
1755
+ attrs: a,
1756
+ slots: l
1757
+ } = t;
1758
+ const {
1759
+ columns: n
1760
+ } = be(), {
1761
+ expandOnClick: r,
1762
+ toggleExpand: i,
1763
+ isExpanded: f
1764
+ } = Ze(), {
1765
+ isSelected: u,
1766
+ toggleSelect: d
1767
+ } = me(), {
1768
+ toggleGroup: m,
1769
+ isGroupOpen: h
1770
+ } = et(), {
1771
+ t: s
1772
+ } = Z(), {
1773
+ mobile: o
1774
+ } = ge(e);
1775
+ return G(() => {
1776
+ const b = ke(e, ["groupCollapseIcon", "groupExpandIcon", "density"]);
1777
+ return e.loading && (!e.items.length || l.loading) ? S("tr", {
1778
+ class: "v-data-table-rows-loading",
1779
+ key: "loading"
1780
+ }, [S("td", {
1781
+ colspan: n.value.length
1782
+ }, [l.loading?.() ?? s(e.loadingText)])]) : !e.loading && !e.items.length && !e.hideNoData ? S("tr", {
1783
+ class: "v-data-table-rows-no-data",
1784
+ key: "no-data"
1785
+ }, [S("td", {
1786
+ colspan: n.value.length
1787
+ }, [l["no-data"]?.() ?? s(e.noDataText)])]) : S(U, null, [e.items.map((c, v) => {
1788
+ if (c.type === "group") {
1789
+ const P = {
1790
+ index: v,
1791
+ item: c,
1792
+ columns: n.value,
1793
+ isExpanded: f,
1794
+ toggleExpand: i,
1795
+ isSelected: u,
1796
+ toggleSelect: d,
1797
+ toggleGroup: m,
1798
+ isGroupOpen: h
1799
+ };
1800
+ return l["group-header"] ? l["group-header"](P) : I(Ka, O({
1801
+ key: `group-header_${c.id}`,
1802
+ item: c
1803
+ }, Ae(a, ":groupHeader", () => P), b), l);
1804
+ }
1805
+ if (c.type === "group-summary") {
1806
+ const P = {
1807
+ index: v,
1808
+ item: c,
1809
+ columns: n.value,
1810
+ toggleGroup: m
1811
+ };
1812
+ return l["group-summary"]?.(P) ?? "";
1813
+ }
1814
+ const w = {
1815
+ index: v,
1816
+ item: c.raw,
1817
+ internalItem: c,
1818
+ columns: n.value,
1819
+ isExpanded: f,
1820
+ toggleExpand: i,
1821
+ isSelected: u,
1822
+ toggleSelect: d
1823
+ }, y = {
1824
+ ...w,
1825
+ props: O({
1826
+ key: `item_${c.key ?? c.index}`,
1827
+ onClick: r.value ? () => {
1828
+ i(c);
1829
+ } : void 0,
1830
+ index: v,
1831
+ item: c,
1832
+ color: e.color,
1833
+ cellProps: e.cellProps,
1834
+ collapseIcon: e.collapseIcon,
1835
+ expandIcon: e.expandIcon,
1836
+ density: e.density,
1837
+ mobile: o.value
1838
+ }, Ae(a, ":row", () => w), typeof e.rowProps == "function" ? e.rowProps({
1839
+ item: w.item,
1840
+ index: w.index,
1841
+ internalItem: w.internalItem
1842
+ }) : e.rowProps)
1843
+ };
1844
+ return S(U, {
1845
+ key: y.props.key
1846
+ }, [l.item ? l.item(y) : I(Ga, y.props, l), f(c) && l["expanded-row"]?.(w)]);
1847
+ })]);
1848
+ }), {};
1849
+ }
1850
+ }), pt = _({
1851
+ fixedHeader: Boolean,
1852
+ fixedFooter: Boolean,
1853
+ height: [Number, String],
1854
+ hover: Boolean,
1855
+ striped: {
1856
+ type: String,
1857
+ default: null,
1858
+ validator: (e) => ["even", "odd"].includes(e)
1859
+ },
1860
+ ...Je(),
1861
+ ...le(),
1862
+ ...ze(),
1863
+ ...De()
1864
+ }, "VTable"), Me = $()({
1865
+ name: "VTable",
1866
+ props: pt(),
1867
+ setup(e, t) {
1868
+ let {
1869
+ slots: a,
1870
+ emit: l
1871
+ } = t;
1872
+ const {
1873
+ themeClasses: n
1874
+ } = Fe(e), {
1875
+ densityClasses: r
1876
+ } = qt(e);
1877
+ return G(() => I(e.tag, {
1878
+ class: K(["v-table", {
1879
+ "v-table--fixed-height": !!e.height,
1880
+ "v-table--fixed-header": e.fixedHeader,
1881
+ "v-table--fixed-footer": e.fixedFooter,
1882
+ "v-table--has-top": !!a.top,
1883
+ "v-table--has-bottom": !!a.bottom,
1884
+ "v-table--hover": e.hover,
1885
+ "v-table--striped-even": e.striped === "even",
1886
+ "v-table--striped-odd": e.striped === "odd"
1887
+ }, n.value, r.value, e.class]),
1888
+ style: Ie(e.style)
1889
+ }, {
1890
+ default: () => [a.top?.(), a.default ? S("div", {
1891
+ class: "v-table__wrapper",
1892
+ style: {
1893
+ height: A(e.height)
1894
+ }
1895
+ }, [S("table", null, [a.default()])]) : a.wrapper?.(), a.bottom?.()]
1896
+ })), {};
1897
+ }
1898
+ }), Wa = _({
1899
+ items: {
1900
+ type: Array,
1901
+ default: () => []
1902
+ },
1903
+ itemValue: {
1904
+ type: [String, Array, Function],
1905
+ default: "id"
1906
+ },
1907
+ itemSelectable: {
1908
+ type: [String, Array, Function],
1909
+ default: null
1910
+ },
1911
+ rowProps: [Object, Function],
1912
+ cellProps: [Object, Function],
1913
+ returnObject: Boolean
1914
+ }, "DataTable-items");
1915
+ function za(e, t, a, l) {
1916
+ const n = e.returnObject ? t : te(t, e.itemValue), r = te(t, e.itemSelectable, !0), i = l.reduce((f, u) => (u.key != null && (f[u.key] = te(t, u.value)), f), {});
1917
+ return {
1918
+ type: "item",
1919
+ key: e.returnObject ? te(t, e.itemValue) : n,
1920
+ index: a,
1921
+ value: n,
1922
+ selectable: r,
1923
+ columns: i,
1924
+ raw: t
1925
+ };
1926
+ }
1927
+ function Ua(e, t, a) {
1928
+ return t.map((l, n) => za(e, l, n, a));
1929
+ }
1930
+ function Ja(e, t) {
1931
+ return {
1932
+ items: F(() => Ua(e, e.items, t.value))
1933
+ };
1934
+ }
1935
+ const Qa = _({
1936
+ ...yt(),
1937
+ hideDefaultBody: Boolean,
1938
+ hideDefaultFooter: Boolean,
1939
+ hideDefaultHeader: Boolean,
1940
+ width: [String, Number],
1941
+ search: String,
1942
+ ...ca(),
1943
+ ...va(),
1944
+ ...Ea(),
1945
+ ...Wa(),
1946
+ ...Fa(),
1947
+ ...Va(),
1948
+ ...Ve(mt(), ["multiSort"]),
1949
+ ...pt()
1950
+ }, "DataTable"), Xa = _({
1951
+ ...pa(),
1952
+ ...Qa(),
1953
+ ...ia(),
1954
+ ...it()
1955
+ }, "VDataTable"), rl = $()({
1956
+ name: "VDataTable",
1957
+ props: Xa(),
1958
+ emits: {
1959
+ "update:modelValue": (e) => !0,
1960
+ "update:page": (e) => !0,
1961
+ "update:itemsPerPage": (e) => !0,
1962
+ "update:sortBy": (e) => !0,
1963
+ "update:options": (e) => !0,
1964
+ "update:groupBy": (e) => !0,
1965
+ "update:expanded": (e) => !0,
1966
+ "update:currentItems": (e) => !0
1967
+ },
1968
+ setup(e, t) {
1969
+ let {
1970
+ attrs: a,
1971
+ slots: l
1972
+ } = t;
1973
+ const {
1974
+ groupBy: n
1975
+ } = ga(e), {
1976
+ initialSortOrder: r,
1977
+ sortBy: i,
1978
+ multiSort: f,
1979
+ mustSort: u
1980
+ } = Ta(e), {
1981
+ page: d,
1982
+ itemsPerPage: m
1983
+ } = xa(e), {
1984
+ disableSort: h
1985
+ } = At(e), {
1986
+ columns: s,
1987
+ headers: o,
1988
+ sortFunctions: b,
1989
+ sortRawFunctions: c,
1990
+ filterFunctions: v
1991
+ } = Ha(e, {
1992
+ groupBy: n,
1993
+ showSelect: T(() => e.showSelect),
1994
+ showExpand: T(() => e.showExpand)
1995
+ }), {
1996
+ items: w
1997
+ } = Ja(e, s), y = T(() => e.search), {
1998
+ filteredItems: P
1999
+ } = da(e, w, y, {
2000
+ transform: (j) => j.columns,
2001
+ customKeyFilter: v
2002
+ }), {
2003
+ toggleSort: V
2004
+ } = _a({
2005
+ initialSortOrder: r,
2006
+ sortBy: i,
2007
+ multiSort: f,
2008
+ mustSort: u,
2009
+ page: d
2010
+ }), {
2011
+ sortByWithGroups: k,
2012
+ opened: L,
2013
+ extractRows: N,
2014
+ isGroupOpen: p,
2015
+ toggleGroup: x
2016
+ } = ma({
2017
+ groupBy: n,
2018
+ sortBy: i,
2019
+ disableSort: h
2020
+ }), {
2021
+ sortedItems: g
2022
+ } = Oa(e, P, k, {
2023
+ transform: (j) => ({
2024
+ ...j.raw,
2025
+ ...j.columns
2026
+ }),
2027
+ sortFunctions: b,
2028
+ sortRawFunctions: c
2029
+ }), {
2030
+ flatItems: D
2031
+ } = ha(g, n, L, () => !!l["group-summary"]), C = F(() => D.value.length), {
2032
+ startIndex: R,
2033
+ stopIndex: ne,
2034
+ pageCount: ye,
2035
+ setItemsPerPage: M
2036
+ } = Sa({
2037
+ page: d,
2038
+ itemsPerPage: m,
2039
+ itemsLength: C
2040
+ }), {
2041
+ paginatedItems: X
2042
+ } = ka({
2043
+ items: D,
2044
+ startIndex: R,
2045
+ stopIndex: ne,
2046
+ itemsPerPage: m
2047
+ }), q = F(() => N(X.value)), {
2048
+ isSelected: xt,
2049
+ select: St,
2050
+ selectAll: Pt,
2051
+ toggleSelect: kt,
2052
+ someSelected: wt,
2053
+ allSelected: It
2054
+ } = Da(e, {
2055
+ allItems: w,
2056
+ currentPage: q
2057
+ }), {
2058
+ isExpanded: Ft,
2059
+ toggleExpand: Dt
2060
+ } = fa(e);
2061
+ ya({
2062
+ page: d,
2063
+ itemsPerPage: m,
2064
+ sortBy: i,
2065
+ groupBy: n,
2066
+ search: y
2067
+ }), Pe({
2068
+ VDataTableRows: {
2069
+ hideNoData: T(() => e.hideNoData),
2070
+ noDataText: T(() => e.noDataText),
2071
+ loading: T(() => e.loading),
2072
+ loadingText: T(() => e.loadingText)
2073
+ }
2074
+ });
2075
+ const E = F(() => ({
2076
+ page: d.value,
2077
+ itemsPerPage: m.value,
2078
+ sortBy: i.value,
2079
+ pageCount: ye.value,
2080
+ toggleSort: V,
2081
+ setItemsPerPage: M,
2082
+ someSelected: wt.value,
2083
+ allSelected: It.value,
2084
+ isSelected: xt,
2085
+ select: St,
2086
+ selectAll: Pt,
2087
+ toggleSelect: kt,
2088
+ isExpanded: Ft,
2089
+ toggleExpand: Dt,
2090
+ isGroupOpen: p,
2091
+ toggleGroup: x,
2092
+ items: q.value.map((j) => j.raw),
2093
+ internalItems: q.value,
2094
+ groupedItems: X.value,
2095
+ columns: s.value,
2096
+ headers: o.value
2097
+ }));
2098
+ return G(() => {
2099
+ const j = Ne.filterProps(e), Vt = Re.filterProps(Ve(e, ["multiSort"])), Tt = $e.filterProps(e), Ct = Me.filterProps(e);
2100
+ return I(Me, O({
2101
+ class: ["v-data-table", {
2102
+ "v-data-table--show-select": e.showSelect,
2103
+ "v-data-table--loading": e.loading
2104
+ }, e.class],
2105
+ style: e.style
2106
+ }, Ct, {
2107
+ fixedHeader: e.fixedHeader || e.sticky
2108
+ }), {
2109
+ top: () => l.top?.(E.value),
2110
+ default: () => l.default ? l.default(E.value) : S(U, null, [l.colgroup?.(E.value), !e.hideDefaultHeader && S("thead", {
2111
+ key: "thead"
2112
+ }, [I(Re, O(Vt, {
2113
+ multiSort: !!e.multiSort
2114
+ }), l)]), l.thead?.(E.value), !e.hideDefaultBody && S("tbody", null, [l["body.prepend"]?.(E.value), l.body ? l.body(E.value) : I($e, O(a, Tt, {
2115
+ items: X.value
2116
+ }), l), l["body.append"]?.(E.value)]), l.tbody?.(E.value), l.tfoot?.(E.value)]),
2117
+ bottom: () => l.bottom ? l.bottom(E.value) : !e.hideDefaultFooter && S(U, null, [I(ea, null, null), I(Ne, j, {
2118
+ prepend: l["footer.prepend"]
2119
+ })])
2120
+ });
2121
+ }), {};
2122
+ }
2123
+ }), Ya = {
2124
+ actions: "button@2",
2125
+ article: "heading, paragraph",
2126
+ avatar: "avatar",
2127
+ button: "button",
2128
+ card: "image, heading",
2129
+ "card-avatar": "image, list-item-avatar",
2130
+ chip: "chip",
2131
+ "date-picker": "list-item, heading, divider, date-picker-options, date-picker-days, actions",
2132
+ "date-picker-options": "text, avatar@2",
2133
+ "date-picker-days": "avatar@28",
2134
+ divider: "divider",
2135
+ heading: "heading",
2136
+ image: "image",
2137
+ "list-item": "text",
2138
+ "list-item-avatar": "avatar, text",
2139
+ "list-item-two-line": "sentences",
2140
+ "list-item-avatar-two-line": "avatar, sentences",
2141
+ "list-item-three-line": "paragraph",
2142
+ "list-item-avatar-three-line": "avatar, paragraph",
2143
+ ossein: "ossein",
2144
+ paragraph: "text@3",
2145
+ sentences: "text@2",
2146
+ subtitle: "text",
2147
+ table: "table-heading, table-thead, table-tbody, table-tfoot",
2148
+ "table-heading": "chip, text",
2149
+ "table-thead": "heading@6",
2150
+ "table-tbody": "table-row-divider@6",
2151
+ "table-row-divider": "table-row, divider",
2152
+ "table-row": "text@6",
2153
+ "table-tfoot": "text@2, avatar@2",
2154
+ text: "text"
2155
+ };
2156
+ function Za(e) {
2157
+ let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [];
2158
+ return S("div", {
2159
+ class: K(["v-skeleton-loader__bone", `v-skeleton-loader__${e}`])
2160
+ }, [t]);
2161
+ }
2162
+ function je(e) {
2163
+ const [t, a] = e.split("@");
2164
+ return Array.from({
2165
+ length: a
2166
+ }).map(() => he(t));
2167
+ }
2168
+ function he(e) {
2169
+ let t = [];
2170
+ if (!e) return t;
2171
+ const a = Ya[e];
2172
+ if (e !== a) {
2173
+ if (e.includes(",")) return He(e);
2174
+ if (e.includes("@")) return je(e);
2175
+ a.includes(",") ? t = He(a) : a.includes("@") ? t = je(a) : a && t.push(he(a));
2176
+ }
2177
+ return [Za(e, t)];
2178
+ }
2179
+ function He(e) {
2180
+ return e.replace(/\s/g, "").split(",").map(he);
2181
+ }
2182
+ const qa = _({
2183
+ boilerplate: Boolean,
2184
+ color: String,
2185
+ loading: Boolean,
2186
+ loadingText: {
2187
+ type: String,
2188
+ default: "$vuetify.loading"
2189
+ },
2190
+ type: {
2191
+ type: [String, Array],
2192
+ default: "ossein"
2193
+ },
2194
+ ...la(),
2195
+ ...Ue(),
2196
+ ...De()
2197
+ }, "VSkeletonLoader"), sl = $()({
2198
+ name: "VSkeletonLoader",
2199
+ inheritAttrs: !1,
2200
+ props: qa(),
2201
+ setup(e, t) {
2202
+ let {
2203
+ attrs: a,
2204
+ slots: l
2205
+ } = t;
2206
+ const {
2207
+ backgroundColorClasses: n,
2208
+ backgroundColorStyles: r
2209
+ } = Qe(() => e.color), {
2210
+ dimensionStyles: i
2211
+ } = ta(e), {
2212
+ elevationClasses: f
2213
+ } = aa(e), {
2214
+ themeClasses: u
2215
+ } = Fe(e), {
2216
+ t: d
2217
+ } = Z(), m = F(() => he(z(e.type).join(",")));
2218
+ return G(() => {
2219
+ const h = !l.default || e.loading, s = e.boilerplate || !h ? {} : {
2220
+ ariaLive: "polite",
2221
+ ariaLabel: d(e.loadingText),
2222
+ role: "alert"
2223
+ };
2224
+ return h ? S("div", O({
2225
+ class: ["v-skeleton-loader", {
2226
+ "v-skeleton-loader--boilerplate": e.boilerplate
2227
+ }, u.value, n.value, f.value],
2228
+ style: [r.value, i.value]
2229
+ }, s, a), [m.value]) : S(U, null, [l.default?.()]);
2230
+ }), {};
2231
+ }
2232
+ });
2233
+ function el(e, t, a) {
2234
+ switch (a) {
2235
+ case ">":
2236
+ return e > t;
2237
+ case "<":
2238
+ return e < t;
2239
+ case ">=":
2240
+ return e >= t;
2241
+ case "<=":
2242
+ return e <= t;
2243
+ case "=":
2244
+ return e === t;
2245
+ default:
2246
+ throw new Error(`Invalid operator: ${a}`);
2247
+ }
2248
+ }
2249
+ function ol() {
2250
+ const { advancedFiltersState: e, hardFiltersState: t } = ra(), a = Q("table_props"), l = H(), n = F(() => {
2251
+ let s = l.value;
2252
+ if (!s) return s;
2253
+ const o = u(e.value, t.value);
2254
+ return !o || Object.keys(o).length === 0 || Object.keys(o).forEach((b) => {
2255
+ const { value: c, comparison: v = "=" } = o[b];
2256
+ if (!c) return;
2257
+ const w = h(a.headers, b);
2258
+ w && (s = s.filter((y) => {
2259
+ const P = m(y, b, w);
2260
+ return w.advancedFilter?.customFilterFn && typeof w.advancedFilter.customFilterFn == "function" ? w.advancedFilter.customFilterFn({ value: P, filterValue: c, filterComparison: v, header: w, item: y }) : f(P, c, v, w);
2261
+ }));
2262
+ }), s;
2263
+ });
2264
+ function r(s, o) {
2265
+ const b = Array.isArray(o) ? o : [o], c = ue(b[0]).startOf("day").isSameOrBefore(ue(s).format()), v = ue(b[b.length - 1]).endOf("day").isSameOrAfter(ue(s).format());
2266
+ return c && v;
2267
+ }
2268
+ function i(s, o) {
2269
+ return Array.isArray(o) ? o.map((b) => b.toString().toLowerCase()).includes(s.toString().toLowerCase()) : s?.toString().toLowerCase().includes(o.toString().toLowerCase());
2270
+ }
2271
+ function f(s, o, b, c) {
2272
+ switch (c.advancedFilter?.component) {
2273
+ case "datepicker":
2274
+ return r(s, o);
2275
+ case "comparison":
2276
+ return el(Number(s), Number(o), b);
2277
+ default:
2278
+ return i(s, o);
2279
+ }
2280
+ }
2281
+ function u(s, o) {
2282
+ const b = Object.values(o).filter((c) => c.args).map((c) => c.args).reduce((c, v) => ({ ...c, ...v }), {});
2283
+ return { ...s, ...b };
2284
+ }
2285
+ function d(s, o) {
2286
+ return o.split(".").reduce((b, c) => b && b[c], s);
2287
+ }
2288
+ function m(s, o, b) {
2289
+ const c = sa(s);
2290
+ return Object.hasOwn(b, "filterReturnValue") && typeof b.filterReturnValue == "function" && (c[o] = b.filterReturnValue({
2291
+ value: s[o],
2292
+ item: s
2293
+ })), d(c, o);
2294
+ }
2295
+ function h(s, o) {
2296
+ return s.find((b) => (b.advancedFilter?.key ?? b.key) === o);
2297
+ }
2298
+ return ve(
2299
+ () => a.data,
2300
+ (s, o) => {
2301
+ const b = s ?? [], c = o ?? [];
2302
+ JSON.stringify(b) !== JSON.stringify(c) && (l.value = s);
2303
+ },
2304
+ { deep: !0, immediate: !0 }
2305
+ ), { tableData: l, filteredData: n };
2306
+ }
2307
+ const il = Et({
2308
+ props: {
2309
+ render: {
2310
+ type: [Function, Object, String, Number, Date],
2311
+ required: !0
2312
+ },
2313
+ props: {
2314
+ type: Object,
2315
+ default: () => ({})
2316
+ },
2317
+ params: {
2318
+ type: Object,
2319
+ default: () => ({})
2320
+ }
2321
+ },
2322
+ setup: (e) => () => {
2323
+ const t = { ...e.props, ...e.params };
2324
+ return typeof e.render == "function" ? e.render(t) : typeof e.render == "object" && e.render !== null ? Nt(e.render, t) : e.render;
2325
+ }
2326
+ });
2327
+ export {
2328
+ il as C,
2329
+ rl as V,
2330
+ sl as a,
2331
+ Ta as b,
2332
+ ga as c,
2333
+ xa as d,
2334
+ Ha as e,
2335
+ Ja as f,
2336
+ ma as g,
2337
+ Sa as h,
2338
+ ha as i,
2339
+ Da as j,
2340
+ fa as k,
2341
+ ya as l,
2342
+ Ne as m,
2343
+ Re as n,
2344
+ $e as o,
2345
+ _a as p,
2346
+ Me as q,
2347
+ it as r,
2348
+ Qa as s,
2349
+ pa as t,
2350
+ ol as u
2351
+ };