@ianicdev/datatables2 0.13.3 → 0.14.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.
Files changed (40) hide show
  1. package/dist/{Comparison-Bfmyo3Xa.cjs → Comparison-B1k718kG.cjs} +1 -1
  2. package/dist/{Comparison-DQKuQ5sY.js → Comparison-DTzJRNSy.js} +6 -6
  3. package/dist/{Datepicker-CgaWBwqc.js → Datepicker-C_KKuvSU.js} +24 -24
  4. package/dist/{Datepicker-CHXMZ0_U.cjs → Datepicker-S2Vl_t28.cjs} +1 -1
  5. package/dist/{Options-Dzm1_SN_.js → Options-Bj3Jo-IP.js} +6 -6
  6. package/dist/{Options-BsWwBtFA.cjs → Options-EhfS46B8.cjs} +1 -1
  7. package/dist/{RefreshTable-CiCnJqRp.cjs → RefreshTable-Bs1a9PJD.cjs} +1 -1
  8. package/dist/{RefreshTable-0OZhCgVc.js → RefreshTable-Dq7B7xo2.js} +1 -1
  9. package/dist/{Search-B-kaxLsc.cjs → Search-BWy8k_Eg.cjs} +1 -1
  10. package/dist/{Search-DBCGZBxm.js → Search-CRW-DZiL.js} +8 -8
  11. package/dist/{Table-Cngs-CvH.cjs → Table-Du0Te7Zd.cjs} +1 -1
  12. package/dist/{Table-VfsWPt6d.js → Table-spuLCMf3.js} +3 -3
  13. package/dist/{TableServer-DPQ_XeXs.cjs → TableServer-BRxInTYw.cjs} +1 -1
  14. package/dist/{TableServer-CPxJnObB.js → TableServer-lxgN28QV.js} +3 -3
  15. package/dist/TableVirtual-CNTcgkyE.js +310 -0
  16. package/dist/TableVirtual-DHsPiFBj.cjs +1 -0
  17. package/dist/{cellRender-CuPsd_dj.js → cellRender-Bhtc4Itp.js} +22 -19
  18. package/dist/{cellRender-DNNEbGS8.cjs → cellRender-DnNtKWhj.cjs} +1 -1
  19. package/dist/{dataTables-DaHH5BJi.js → dataTables-CWzjBBzz.js} +326 -326
  20. package/dist/dataTables-DyiBukfs.cjs +4 -0
  21. package/dist/datatables.cjs +1 -1
  22. package/dist/datatables.js +1 -1
  23. package/dist/datatables2.css +1 -1
  24. package/dist/index-BIU6vg82.js +4656 -0
  25. package/dist/{index-DoH33mkF.js → index-Bkdn_tzR.js} +2 -2
  26. package/dist/{index-CheHIvYC.cjs → index-BzQgkBK3.cjs} +1 -1
  27. package/dist/index-CBlqNooE.cjs +1 -0
  28. package/dist/{index-Dyh2yegg.cjs → index-CaNvcRDB.cjs} +1 -1
  29. package/dist/{index-CYN9sV_c.cjs → index-DIZGGvJw.cjs} +1 -1
  30. package/dist/{index-D65STyD7.js → index-ka-ZCwwl.js} +1 -1
  31. package/dist/{index-2dniBO7B.js → index-tBoBj0Rj.js} +12 -12
  32. package/dist/{useColumns-DBnIlIB2.cjs → useColumns-QAZVw0r6.cjs} +1 -1
  33. package/dist/{useColumns-CwA9Nn3T.js → useColumns-tIJVX7bL.js} +2 -2
  34. package/lib/locale/de.js +5 -0
  35. package/lib/locale/el.js +5 -0
  36. package/lib/locale/en.js +5 -0
  37. package/package.json +2 -2
  38. package/dist/dataTables-DCTgRVVK.cjs +0 -4
  39. package/dist/index-DT_nX8re.cjs +0 -1
  40. package/dist/index-upuyXG4P.js +0 -4627
@@ -1,4627 +0,0 @@
1
- import { ref as j, inject as Pe, computed as I, toRef as E, shallowRef as ee, watch as se, createVNode as g, normalizeStyle as xe, normalizeClass as re, createElementVNode as b, mergeProps as L, withDirectives as Ue, vShow as _t, Fragment as ce, toDisplayString as Vt, useModel as Pt, openBlock as oe, createBlock as ye, withCtx as Ce, createElementBlock as Ke, renderList as Wt, unref as M, mergeModels as qt, useId as Xe, provide as We, onScopeDispose as rt, nextTick as ke, onBeforeMount as wn, onBeforeUnmount as kl, onMounted as at, cloneVNode as _n, watchEffect as zt, toValue as Ut, createTextVNode as Sl, defineAsyncComponent as Ee, resolveDynamicComponent as $e, onUnmounted as Pn, isRef as xt, createCommentVNode as Me, defineComponent as At, useTemplateRef as Cl } from "vue";
2
- import { defineStore as Vl } from "pinia";
3
- import { u as Ft, m as Kt, P as xl, c as Ne, a as An, e as Fn, r as Dn, g as ie, b as Il, d as wl, f as It, I as ct, h as de, V as rl, i as Se, j as _l, p as X, k as he, l as Pl, n as Oe, o as Tn, q as be, s as ot, t as Jt, v as qe, w as Xt, x as He, R as lt, y as it, z as Yt, A as Dt, B as Qt, C as gt, D as Bn, E as Ve, F as cl, G as Al, H as Fl, J as Dl, K as Tl, L as Fe, M as nt, N as Rn, O as Bl, Q as yt, S as En, T as Zt, U as ht, W as el, X as Le, Y as Tt, Z as bt, _ as tl, $ as Rl, a0 as El, a1 as ll, a2 as pt, a3 as Ol, a4 as Te, a5 as kt, a6 as dt, a7 as Ye, a8 as $l, a9 as nl, aa as Bt, ab as Ml, ac as Nl, ad as Ll, ae as jt, af as On, ag as Hl, ah as $n, ai as Mn, aj as Nn, ak as zl, al as et, am as Ul, an as Ln, ao as dl, ap as St, aq as Kl, ar as Hn, as as zn, at as jl, au as Gl, av as al, aw as vt, ax as Un, ay as ze, az as Wl, aA as ql, aB as wt, aC as Jl, aD as Kn, aE as jn, aF as Gn, aG as Wn, aH as qn, aI as Jn, aJ as vl, aK as Xn, aL as Yn, aM as tt, aN as Qn, aO as Zn, aP as ea, aQ as ta } from "./dataTables-DaHH5BJi.js";
4
- import { useEventBus as Xl, createSharedComposable as la, useResizeObserver as na } from "@vueuse/core";
5
- import { useI18n as aa } from "vue-i18n";
6
- const Rt = Vl("datatables", () => {
7
- const e = j([]), a = ({ table_id: i }) => {
8
- const o = e.value.findIndex((d) => d.id === i), r = {
9
- search: {
10
- query: ""
11
- },
12
- advancedFilters: {
13
- query: {}
14
- },
15
- hardFilters: {
16
- query: {}
17
- },
18
- options: {
19
- hash: null,
20
- columns: {},
21
- state: {}
22
- }
23
- };
24
- o !== -1 && e.value.splice(o, 1), e.value.push({ id: i, ...r });
25
- }, t = async (i) => {
26
- const r = new TextEncoder().encode(i), d = await crypto.subtle.digest("SHA-256", r);
27
- return Array.from(new Uint8Array(d)).map((v) => v.toString(16).padStart(2, "0")).join("");
28
- }, n = ({ table_id: i, headers: o }) => {
29
- t(JSON.stringify(o ?? [])).then((r) => {
30
- l({ table_id: i, name: "options", value: { hash: r } });
31
- });
32
- }, l = ({ table_id: i, name: o, value: r }) => {
33
- e.value = e.value.map((d) => {
34
- if (d.id === i && d.hasOwnProperty(o)) {
35
- const c = d[o];
36
- if (c && typeof r == "object")
37
- for (const m in r)
38
- m in c && (c[m] = r[m]);
39
- }
40
- return d;
41
- });
42
- };
43
- return {
44
- // Store Data
45
- tables: e,
46
- // Store Methods
47
- addTable: a,
48
- setData: l,
49
- restoreData: ({ table_id: i, data: o }) => {
50
- e.value = e.value.map((r) => (r.id === i && (r = o), r));
51
- },
52
- getCurrentTable: (i) => e.value.find((o) => o.id === i),
53
- // Hash
54
- hashString: t,
55
- setTableHash: n
56
- };
57
- });
58
- function Et() {
59
- const { setData: e, getCurrentTable: a } = Rt(), t = Pe("table_props"), n = I(() => a(t.id)), l = I(() => n.value.search?.query), u = I(() => {
60
- if (!t?.headers.length) return null;
61
- const r = n.value.options?.columns.selected ?? [];
62
- return (n.value.options?.columns.sorted ?? []).filter((m) => r.includes(m)).map(
63
- (m) => t.headers.find((v) => v.key === m)
64
- );
65
- }), s = I(() => n.value.hardFilters?.query), i = I(() => n.value.advancedFilters?.query);
66
- return {
67
- tableState: n,
68
- searchState: l,
69
- advancedFiltersState: i,
70
- hardFiltersState: s,
71
- headersState: u,
72
- saveTableOptions: (r) => {
73
- e({
74
- table_id: t.id,
75
- name: "options",
76
- value: {
77
- state: r
78
- }
79
- });
80
- }
81
- };
82
- }
83
- const oa = /* @__PURE__ */ Symbol.for("vuetify:goto");
84
- function ia() {
85
- return {
86
- container: void 0,
87
- duration: 300,
88
- layout: !1,
89
- offset: 0,
90
- easing: "easeInOutCubic",
91
- patterns: Fn
92
- };
93
- }
94
- function ua(e) {
95
- return ol(e) ?? (document.scrollingElement || document.body);
96
- }
97
- function ol(e) {
98
- return typeof e == "string" ? document.querySelector(e) : Dn(e);
99
- }
100
- function Nt(e, a, t) {
101
- if (typeof e == "number") return a && t ? -e : e;
102
- let n = ol(e), l = 0;
103
- for (; n; )
104
- l += a ? n.offsetLeft : n.offsetTop, n = n.offsetParent;
105
- return l;
106
- }
107
- async function fl(e, a, t, n) {
108
- const l = t ? "scrollLeft" : "scrollTop", u = Kt(n?.options ?? ia(), a), s = n?.rtl.value, i = (typeof e == "number" ? e : ol(e)) ?? 0, o = u.container === "parent" && i instanceof HTMLElement ? i.parentElement : ua(u.container), r = xl() ? u.patterns.instant : typeof u.easing == "function" ? u.easing : u.patterns[u.easing];
109
- if (!r) throw new TypeError(`Easing function "${u.easing}" not found.`);
110
- let d;
111
- if (typeof i == "number")
112
- d = Nt(i, t, s);
113
- else if (d = Nt(i, t, s) - Nt(o, t, s), u.layout) {
114
- const y = window.getComputedStyle(i).getPropertyValue("--v-layout-top");
115
- y && (d -= parseInt(y, 10));
116
- }
117
- d += u.offset, d = ra(o, d, !!s, !!t);
118
- const c = o[l] ?? 0;
119
- if (d === c) return Promise.resolve(d);
120
- const m = performance.now();
121
- return new Promise((v) => requestAnimationFrame(function y(h) {
122
- const w = (h - m) / u.duration, P = Math.floor(c + (d - c) * r(Ne(w, 0, 1)));
123
- if (o[l] = P, w >= 1 && Math.abs(P - o[l]) < 10)
124
- return v(d);
125
- if (w > 2)
126
- return An("Scroll target is not reachable"), v(o[l]);
127
- requestAnimationFrame(y);
128
- }));
129
- }
130
- function sa() {
131
- let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
132
- const a = Pe(oa), {
133
- isRtl: t
134
- } = Ft();
135
- if (!a) throw new Error("[Vuetify] Could not find injected goto instance");
136
- const n = {
137
- ...a,
138
- // can be set via VLocaleProvider
139
- rtl: E(() => a.rtl.value || t.value)
140
- };
141
- async function l(u, s) {
142
- return fl(u, Kt(e, s), !1, n);
143
- }
144
- return l.horizontal = async (u, s) => fl(u, Kt(e, s), !0, n), l;
145
- }
146
- function ra(e, a, t, n) {
147
- const {
148
- scrollWidth: l,
149
- scrollHeight: u
150
- } = e, [s, i] = e === document.scrollingElement ? [window.innerWidth, window.innerHeight] : [e.offsetWidth, e.offsetHeight];
151
- let o, r;
152
- return n ? t ? (o = -(l - s), r = 0) : (o = 0, r = l - s) : (o = 0, r = u + -i), Ne(a, o, r);
153
- }
154
- function ca(e) {
155
- let {
156
- selectedElement: a,
157
- containerElement: t,
158
- isRtl: n,
159
- isHorizontal: l
160
- } = e;
161
- const u = ft(l, t), s = Yl(l, n, t), i = ft(l, a), o = Ql(l, a), r = i * 0.4;
162
- return s > o ? o - r : s + u < o + i ? o - u + i + r : s;
163
- }
164
- function da(e) {
165
- let {
166
- selectedElement: a,
167
- containerElement: t,
168
- isHorizontal: n
169
- } = e;
170
- const l = ft(n, t), u = Ql(n, a), s = ft(n, a);
171
- return u - l / 2 + s / 2;
172
- }
173
- function ml(e, a) {
174
- return a?.[e ? "scrollWidth" : "scrollHeight"] || 0;
175
- }
176
- function va(e, a) {
177
- return a?.[e ? "clientWidth" : "clientHeight"] || 0;
178
- }
179
- function Yl(e, a, t) {
180
- if (!t)
181
- return 0;
182
- const {
183
- scrollLeft: n,
184
- offsetWidth: l,
185
- scrollWidth: u
186
- } = t;
187
- return e ? a ? u - l + n : n : t.scrollTop;
188
- }
189
- function ft(e, a) {
190
- return a?.[e ? "offsetWidth" : "offsetHeight"] || 0;
191
- }
192
- function Ql(e, a) {
193
- return a?.[e ? "offsetLeft" : "offsetTop"] || 0;
194
- }
195
- const Zl = /* @__PURE__ */ Symbol.for("vuetify:v-slide-group"), en = X({
196
- centerActive: Boolean,
197
- scrollToActive: {
198
- type: Boolean,
199
- default: !0
200
- },
201
- contentClass: null,
202
- direction: {
203
- type: String,
204
- default: "horizontal"
205
- },
206
- symbol: {
207
- type: null,
208
- default: Zl
209
- },
210
- nextIcon: {
211
- type: he,
212
- default: "$next"
213
- },
214
- prevIcon: {
215
- type: he,
216
- default: "$prev"
217
- },
218
- showArrows: {
219
- type: [Boolean, String],
220
- validator: (e) => typeof e == "boolean" || ["always", "desktop", "mobile", "never"].includes(e)
221
- },
222
- ...be(),
223
- ...Tn({
224
- mobile: null
225
- }),
226
- ...Oe(),
227
- ...Pl({
228
- selectedClass: "v-slide-group-item--active"
229
- })
230
- }, "VSlideGroup"), gl = ie()({
231
- name: "VSlideGroup",
232
- props: en(),
233
- emits: {
234
- "update:modelValue": (e) => !0
235
- },
236
- setup(e, a) {
237
- let {
238
- slots: t
239
- } = a;
240
- const {
241
- isRtl: n
242
- } = Ft(), {
243
- displayClasses: l,
244
- mobile: u
245
- } = Il(e), s = wl(e, e.symbol), i = ee(!1), o = ee(0), r = ee(0), d = ee(0), c = I(() => e.direction === "horizontal"), {
246
- resizeRef: m,
247
- contentRect: v
248
- } = It(), {
249
- resizeRef: y,
250
- contentRect: h
251
- } = It(), p = sa(), w = I(() => ({
252
- container: m.el,
253
- duration: 200,
254
- easing: "easeOutQuart"
255
- })), P = I(() => s.selected.value.length ? s.items.value.findIndex((k) => k.id === s.selected.value[0]) : -1), C = I(() => s.selected.value.length ? s.items.value.findIndex((k) => k.id === s.selected.value[s.selected.value.length - 1]) : -1);
256
- if (ct) {
257
- let k = -1;
258
- se(() => [s.selected.value, v.value, h.value, c.value], () => {
259
- cancelAnimationFrame(k), k = requestAnimationFrame(() => {
260
- if (v.value && h.value) {
261
- const f = c.value ? "width" : "height";
262
- r.value = v.value[f], d.value = h.value[f], i.value = r.value + 1 < d.value;
263
- }
264
- if (e.scrollToActive && P.value >= 0 && y.el) {
265
- const f = y.el.children[C.value];
266
- B(f, e.centerActive);
267
- }
268
- });
269
- });
270
- }
271
- const F = ee(!1);
272
- function B(k, f) {
273
- let A = 0;
274
- f ? A = da({
275
- containerElement: m.el,
276
- isHorizontal: c.value,
277
- selectedElement: k
278
- }) : A = ca({
279
- containerElement: m.el,
280
- isHorizontal: c.value,
281
- isRtl: n.value,
282
- selectedElement: k
283
- }), U(A);
284
- }
285
- function U(k) {
286
- if (!ct || !m.el) return;
287
- const f = ft(c.value, m.el), A = Yl(c.value, n.value, m.el);
288
- if (!(ml(c.value, m.el) <= f || // Prevent scrolling by only a couple of pixels, which doesn't look smooth
289
- Math.abs(k - A) < 16)) {
290
- if (c.value && n.value && m.el) {
291
- const {
292
- scrollWidth: ve,
293
- offsetWidth: ge
294
- } = m.el;
295
- k = ve - ge - k;
296
- }
297
- c.value ? p.horizontal(k, w.value) : p(k, w.value);
298
- }
299
- }
300
- function _(k) {
301
- const {
302
- scrollTop: f,
303
- scrollLeft: A
304
- } = k.target;
305
- o.value = c.value ? A : f;
306
- }
307
- function V(k) {
308
- if (F.value = !0, !(!i.value || !y.el)) {
309
- for (const f of k.composedPath())
310
- for (const A of y.el.children)
311
- if (A === f) {
312
- B(A);
313
- return;
314
- }
315
- }
316
- }
317
- function $(k) {
318
- F.value = !1;
319
- }
320
- let D = !1;
321
- function G(k) {
322
- !D && !F.value && !(k.relatedTarget && y.el?.contains(k.relatedTarget)) && K(), D = !1;
323
- }
324
- function ne() {
325
- D = !0;
326
- }
327
- function H(k) {
328
- if (!y.el) return;
329
- function f(A) {
330
- k.preventDefault(), K(A);
331
- }
332
- c.value ? k.key === "ArrowRight" ? f(n.value ? "prev" : "next") : k.key === "ArrowLeft" && f(n.value ? "next" : "prev") : k.key === "ArrowDown" ? f("next") : k.key === "ArrowUp" && f("prev"), k.key === "Home" ? f("first") : k.key === "End" && f("last");
333
- }
334
- function W(k, f) {
335
- if (!k) return;
336
- let A = k;
337
- do
338
- A = A?.[f === "next" ? "nextElementSibling" : "previousElementSibling"];
339
- while (A?.hasAttribute("disabled"));
340
- return A;
341
- }
342
- function K(k) {
343
- if (!y.el) return;
344
- let f;
345
- if (!k)
346
- f = _l(y.el)[0];
347
- else if (k === "next") {
348
- if (f = W(y.el.querySelector(":focus"), k), !f) return K("first");
349
- } else if (k === "prev") {
350
- if (f = W(y.el.querySelector(":focus"), k), !f) return K("last");
351
- } else k === "first" ? (f = y.el.firstElementChild, f?.hasAttribute("disabled") && (f = W(f, "next"))) : k === "last" && (f = y.el.lastElementChild, f?.hasAttribute("disabled") && (f = W(f, "prev")));
352
- f && f.focus({
353
- preventScroll: !0
354
- });
355
- }
356
- function ue(k) {
357
- const f = c.value && n.value ? -1 : 1, A = (k === "prev" ? -f : f) * r.value;
358
- let J = o.value + A;
359
- if (c.value && n.value && m.el) {
360
- const {
361
- scrollWidth: ve,
362
- offsetWidth: ge
363
- } = m.el;
364
- J += ve - ge;
365
- }
366
- U(J);
367
- }
368
- const q = I(() => ({
369
- next: s.next,
370
- prev: s.prev,
371
- select: s.select,
372
- isSelected: s.isSelected
373
- })), z = I(() => i.value || Math.abs(o.value) > 0), fe = I(() => {
374
- switch (e.showArrows) {
375
- case "never":
376
- return !1;
377
- // Always show arrows on desktop & mobile
378
- case "always":
379
- return !0;
380
- // Always show arrows on desktop
381
- case "desktop":
382
- return !u.value;
383
- // Show arrows on mobile when overflowing.
384
- // This matches the default 2.2 behavior
385
- case !0:
386
- return z.value;
387
- // Always show on mobile
388
- case "mobile":
389
- return u.value || z.value;
390
- // https://material.io/components/tabs#scrollable-tabs
391
- // Always show arrows when
392
- // overflowed on desktop
393
- default:
394
- return !u.value && z.value;
395
- }
396
- }), R = I(() => Math.abs(o.value) > 1), O = I(() => {
397
- if (!m.value || !z.value) return !1;
398
- const k = ml(c.value, m.el), f = va(c.value, m.el);
399
- return k - f - Math.abs(o.value) > 1;
400
- });
401
- return de(() => g(e.tag, {
402
- class: re(["v-slide-group", {
403
- "v-slide-group--vertical": !c.value,
404
- "v-slide-group--has-affixes": fe.value,
405
- "v-slide-group--is-overflowing": i.value
406
- }, l.value, e.class]),
407
- style: xe(e.style),
408
- tabindex: F.value || s.selected.value.length ? -1 : 0,
409
- onFocus: G
410
- }, {
411
- default: () => [fe.value && b("div", {
412
- key: "prev",
413
- class: re(["v-slide-group__prev", {
414
- "v-slide-group__prev--disabled": !R.value
415
- }]),
416
- onMousedown: ne,
417
- onClick: () => R.value && ue("prev")
418
- }, [t.prev?.(q.value) ?? g(rl, null, {
419
- default: () => [g(Se, {
420
- icon: n.value ? e.nextIcon : e.prevIcon
421
- }, null)]
422
- })]), b("div", {
423
- key: "container",
424
- ref: m,
425
- class: re(["v-slide-group__container", e.contentClass]),
426
- onScroll: _
427
- }, [b("div", {
428
- ref: y,
429
- class: "v-slide-group__content",
430
- onFocusin: V,
431
- onFocusout: $,
432
- onKeydown: H
433
- }, [t.default?.(q.value)])]), fe.value && b("div", {
434
- key: "next",
435
- class: re(["v-slide-group__next", {
436
- "v-slide-group__next--disabled": !O.value
437
- }]),
438
- onMousedown: ne,
439
- onClick: () => O.value && ue("next")
440
- }, [t.next?.(q.value) ?? g(rl, null, {
441
- default: () => [g(Se, {
442
- icon: n.value ? e.prevIcon : e.nextIcon
443
- }, null)]
444
- })])]
445
- })), {
446
- selected: s.selected,
447
- scrollTo: ue,
448
- scrollOffset: o,
449
- focus: K,
450
- hasPrev: R,
451
- hasNext: O
452
- };
453
- }
454
- }), tn = /* @__PURE__ */ Symbol.for("vuetify:v-chip-group"), fa = X({
455
- baseColor: String,
456
- column: Boolean,
457
- filter: Boolean,
458
- valueComparator: {
459
- type: Function,
460
- default: qe
461
- },
462
- ...en({
463
- scrollToActive: !1
464
- }),
465
- ...be(),
466
- ...Pl({
467
- selectedClass: "v-chip--selected"
468
- }),
469
- ...Oe(),
470
- ...He(),
471
- ...Xt({
472
- variant: "tonal"
473
- })
474
- }, "VChipGroup"), ma = ie()({
475
- name: "VChipGroup",
476
- props: fa(),
477
- emits: {
478
- "update:modelValue": (e) => !0
479
- },
480
- setup(e, a) {
481
- let {
482
- slots: t
483
- } = a;
484
- const {
485
- themeClasses: n
486
- } = ot(e), {
487
- isSelected: l,
488
- select: u,
489
- next: s,
490
- prev: i,
491
- selected: o
492
- } = wl(e, tn);
493
- return Jt({
494
- VChip: {
495
- baseColor: E(() => e.baseColor),
496
- color: E(() => e.color),
497
- disabled: E(() => e.disabled),
498
- filter: E(() => e.filter),
499
- variant: E(() => e.variant)
500
- }
501
- }), de(() => {
502
- const r = gl.filterProps(e);
503
- return g(gl, L(r, {
504
- class: ["v-chip-group", {
505
- "v-chip-group--column": e.column
506
- }, n.value, e.class],
507
- style: e.style
508
- }), {
509
- default: () => [t.default?.({
510
- isSelected: l,
511
- select: u,
512
- next: s,
513
- prev: i,
514
- selected: o.value
515
- })]
516
- });
517
- }), {};
518
- }
519
- }), ga = X({
520
- activeClass: String,
521
- appendAvatar: String,
522
- appendIcon: he,
523
- baseColor: String,
524
- closable: Boolean,
525
- closeIcon: {
526
- type: he,
527
- default: "$delete"
528
- },
529
- closeLabel: {
530
- type: String,
531
- default: "$vuetify.close"
532
- },
533
- draggable: Boolean,
534
- filter: Boolean,
535
- filterIcon: {
536
- type: he,
537
- default: "$complete"
538
- },
539
- label: Boolean,
540
- link: {
541
- type: Boolean,
542
- default: void 0
543
- },
544
- pill: Boolean,
545
- prependAvatar: String,
546
- prependIcon: he,
547
- ripple: {
548
- type: [Boolean, Object],
549
- default: !0
550
- },
551
- text: {
552
- type: [String, Number, Boolean],
553
- default: void 0
554
- },
555
- modelValue: {
556
- type: Boolean,
557
- default: !0
558
- },
559
- onClick: Le(),
560
- onClickOnce: Le(),
561
- ...el(),
562
- ...be(),
563
- ...ht(),
564
- ...Zt(),
565
- ...En(),
566
- ...yt(),
567
- ...Bl(),
568
- ...Rn(),
569
- ...Oe({
570
- tag: "span"
571
- }),
572
- ...He(),
573
- ...Xt({
574
- variant: "tonal"
575
- })
576
- }, "VChip"), mt = ie()({
577
- name: "VChip",
578
- directives: {
579
- vRipple: lt
580
- },
581
- props: ga(),
582
- emits: {
583
- "click:close": (e) => !0,
584
- "update:modelValue": (e) => !0,
585
- "group:selected": (e) => !0,
586
- click: (e) => !0
587
- },
588
- setup(e, a) {
589
- let {
590
- attrs: t,
591
- emit: n,
592
- slots: l
593
- } = a;
594
- const {
595
- t: u
596
- } = it(), {
597
- borderClasses: s
598
- } = Yt(e), {
599
- densityClasses: i
600
- } = Dt(e), {
601
- elevationClasses: o
602
- } = Qt(e), {
603
- roundedClasses: r
604
- } = gt(e), {
605
- sizeClasses: d
606
- } = Bn(e), {
607
- themeClasses: c
608
- } = ot(e), m = Ve(e, "modelValue"), v = cl(e, tn, !1), y = cl(e, Zl, !1), h = Al(e, t), p = E(() => e.link !== !1 && h.isLink.value), w = I(() => !e.disabled && e.link !== !1 && (!!v || e.link || h.isClickable.value)), P = E(() => ({
609
- "aria-label": u(e.closeLabel),
610
- disabled: e.disabled,
611
- onClick(V) {
612
- V.preventDefault(), V.stopPropagation(), m.value = !1, n("click:close", V);
613
- }
614
- }));
615
- se(m, (V) => {
616
- V ? (v?.register(), y?.register()) : (v?.unregister(), y?.unregister());
617
- });
618
- const {
619
- colorClasses: C,
620
- colorStyles: F,
621
- variantClasses: B
622
- } = Fl(() => ({
623
- color: !v || v.isSelected.value ? e.color ?? e.baseColor : e.baseColor,
624
- variant: e.variant
625
- }));
626
- function U(V) {
627
- n("click", V), w.value && (h.navigate.value?.(V), v?.toggle());
628
- }
629
- function _(V) {
630
- (V.key === "Enter" || V.key === " ") && (V.preventDefault(), U(V));
631
- }
632
- return () => {
633
- const V = h.isLink.value ? "a" : e.tag, $ = !!(e.appendIcon || e.appendAvatar), D = !!($ || l.append), G = !!(l.close || e.closable), ne = !!(l.filter || e.filter) && v, H = !!(e.prependIcon || e.prependAvatar), W = !!(H || l.prepend);
634
- return m.value && Ue(g(V, L(h.linkProps, {
635
- class: ["v-chip", {
636
- "v-chip--disabled": e.disabled,
637
- "v-chip--label": e.label,
638
- "v-chip--link": w.value,
639
- "v-chip--filter": ne,
640
- "v-chip--pill": e.pill,
641
- [`${e.activeClass}`]: e.activeClass && h.isActive?.value
642
- }, c.value, s.value, C.value, i.value, o.value, r.value, d.value, B.value, v?.selectedClass.value, e.class],
643
- style: [F.value, e.style],
644
- disabled: e.disabled || void 0,
645
- draggable: e.draggable,
646
- tabindex: w.value ? 0 : void 0,
647
- onClick: U,
648
- onKeydown: w.value && !p.value && _
649
- }), {
650
- default: () => [Dl(w.value, "v-chip"), ne && g(Tl, {
651
- key: "filter"
652
- }, {
653
- default: () => [Ue(b("div", {
654
- class: "v-chip__filter"
655
- }, [l.filter ? g(Fe, {
656
- key: "filter-defaults",
657
- disabled: !e.filterIcon,
658
- defaults: {
659
- VIcon: {
660
- icon: e.filterIcon
661
- }
662
- }
663
- }, l.filter) : g(Se, {
664
- key: "filter-icon",
665
- icon: e.filterIcon
666
- }, null)]), [[_t, v.isSelected.value]])]
667
- }), W && b("div", {
668
- key: "prepend",
669
- class: "v-chip__prepend"
670
- }, [l.prepend ? g(Fe, {
671
- key: "prepend-defaults",
672
- disabled: !H,
673
- defaults: {
674
- VAvatar: {
675
- image: e.prependAvatar,
676
- start: !0
677
- },
678
- VIcon: {
679
- icon: e.prependIcon,
680
- start: !0
681
- }
682
- }
683
- }, l.prepend) : b(ce, null, [e.prependIcon && g(Se, {
684
- key: "prepend-icon",
685
- icon: e.prependIcon,
686
- start: !0
687
- }, null), e.prependAvatar && g(nt, {
688
- key: "prepend-avatar",
689
- image: e.prependAvatar,
690
- start: !0
691
- }, null)])]), b("div", {
692
- class: "v-chip__content",
693
- "data-no-activator": ""
694
- }, [l.default?.({
695
- isSelected: v?.isSelected.value,
696
- selectedClass: v?.selectedClass.value,
697
- select: v?.select,
698
- toggle: v?.toggle,
699
- value: v?.value.value,
700
- disabled: e.disabled
701
- }) ?? Vt(e.text)]), D && b("div", {
702
- key: "append",
703
- class: "v-chip__append"
704
- }, [l.append ? g(Fe, {
705
- key: "append-defaults",
706
- disabled: !$,
707
- defaults: {
708
- VAvatar: {
709
- end: !0,
710
- image: e.appendAvatar
711
- },
712
- VIcon: {
713
- end: !0,
714
- icon: e.appendIcon
715
- }
716
- }
717
- }, l.append) : b(ce, null, [e.appendIcon && g(Se, {
718
- key: "append-icon",
719
- end: !0,
720
- icon: e.appendIcon
721
- }, null), e.appendAvatar && g(nt, {
722
- key: "append-avatar",
723
- end: !0,
724
- image: e.appendAvatar
725
- }, null)])]), G && b("button", L({
726
- key: "close",
727
- class: "v-chip__close",
728
- type: "button",
729
- "data-testid": "close-chip"
730
- }, P.value), [l.close ? g(Fe, {
731
- key: "close-defaults",
732
- defaults: {
733
- VIcon: {
734
- icon: e.closeIcon,
735
- size: "x-small"
736
- }
737
- }
738
- }, l.close) : g(Se, {
739
- key: "close-icon",
740
- icon: e.closeIcon,
741
- size: "x-small"
742
- }, null)])]
743
- }), [[lt, w.value && e.ripple, null]]);
744
- };
745
- }
746
- }), ya = X({
747
- color: String,
748
- ...el(),
749
- ...be(),
750
- ...pt(),
751
- ...Zt(),
752
- ...ll(),
753
- ...El(),
754
- ...yt(),
755
- ...Oe(),
756
- ...He()
757
- }, "VSheet"), il = ie()({
758
- name: "VSheet",
759
- props: ya(),
760
- setup(e, a) {
761
- let {
762
- slots: t
763
- } = a;
764
- const {
765
- themeClasses: n
766
- } = ot(e), {
767
- backgroundColorClasses: l,
768
- backgroundColorStyles: u
769
- } = Tt(() => e.color), {
770
- borderClasses: s
771
- } = Yt(e), {
772
- dimensionStyles: i
773
- } = bt(e), {
774
- elevationClasses: o
775
- } = Qt(e), {
776
- locationStyles: r
777
- } = tl(e), {
778
- positionClasses: d
779
- } = Rl(e), {
780
- roundedClasses: c
781
- } = gt(e);
782
- return de(() => g(e.tag, {
783
- class: re(["v-sheet", n.value, l.value, s.value, o.value, d.value, c.value, e.class]),
784
- style: xe([u.value, i.value, r.value, e.style])
785
- }, t)), {};
786
- }
787
- }), ha = {
788
- __name: "Selected",
789
- props: {
790
- modelValue: {},
791
- modelModifiers: {}
792
- },
793
- emits: /* @__PURE__ */ qt("save", ["update:modelValue"]),
794
- setup(e, { emit: a }) {
795
- const { advancedFiltersState: t } = Et(), n = Pe("table_props"), l = Pt(e, "modelValue"), u = (o, r) => {
796
- const d = n.headers.find((y) => (y.advancedFilter?.key ?? y.key) === r), c = o.comparison === "=" ? ":" : " " + o.comparison, m = Array.isArray(o.value) ? o.value : [o.value], v = m.filter((y, h) => !(d.advancedFilter?.component === "datepicker" && h !== 0 && h !== m.length - 1)).map((y) => {
797
- const h = d.advancedFilter?.options?.items ?? [];
798
- let p = y, w;
799
- return h.length && (w = h.find((P) => P.value === y), w && (p = w.title)), typeof d.advancedFilter?.valueFormatter == "function" && (p = d.advancedFilter.valueFormatter({
800
- item: w,
801
- value: y
802
- })), p;
803
- });
804
- return `${d.title}${c} ${v.join(", ")}`;
805
- }, s = (o) => {
806
- l.value[o] = { comparison: "=", value: null }, i("save");
807
- }, i = a;
808
- return (o, r) => (oe(), ye(il, null, {
809
- default: Ce(() => [
810
- g(ma, null, {
811
- default: Ce(() => [
812
- (oe(!0), Ke(ce, null, Wt(M(t), (d, c) => (oe(), ye(mt, {
813
- key: c,
814
- class: "my-0",
815
- text: u(d, c),
816
- closable: "",
817
- value: d,
818
- density: "comfortable",
819
- "onClick:close": (m) => s(c)
820
- }, null, 8, ["text", "value", "onClick:close"]))), 128))
821
- ]),
822
- _: 1
823
- })
824
- ]),
825
- _: 1
826
- }));
827
- }
828
- }, ba = X({
829
- text: String,
830
- onClick: Le(),
831
- ...be(),
832
- ...He()
833
- }, "VLabel"), ln = ie()({
834
- name: "VLabel",
835
- props: ba(),
836
- setup(e, a) {
837
- let {
838
- slots: t
839
- } = a;
840
- return de(() => b("label", {
841
- class: re(["v-label", {
842
- "v-label--clickable": !!e.onClick
843
- }, e.class]),
844
- style: xe(e.style),
845
- onClick: e.onClick
846
- }, [e.text, t.default?.()])), {};
847
- }
848
- }), nn = /* @__PURE__ */ Symbol.for("vuetify:selection-control-group"), an = X({
849
- color: String,
850
- disabled: {
851
- type: Boolean,
852
- default: null
853
- },
854
- defaultsTarget: String,
855
- error: Boolean,
856
- id: String,
857
- inline: Boolean,
858
- falseIcon: he,
859
- trueIcon: he,
860
- ripple: {
861
- type: [Boolean, Object],
862
- default: !0
863
- },
864
- multiple: {
865
- type: Boolean,
866
- default: null
867
- },
868
- name: String,
869
- readonly: {
870
- type: Boolean,
871
- default: null
872
- },
873
- modelValue: null,
874
- type: String,
875
- valueComparator: {
876
- type: Function,
877
- default: qe
878
- },
879
- ...be(),
880
- ...ht(),
881
- ...He()
882
- }, "SelectionControlGroup"), pa = X({
883
- ...an({
884
- defaultsTarget: "VSelectionControl"
885
- })
886
- }, "VSelectionControlGroup");
887
- ie()({
888
- name: "VSelectionControlGroup",
889
- props: pa(),
890
- emits: {
891
- "update:modelValue": (e) => !0
892
- },
893
- setup(e, a) {
894
- let {
895
- slots: t
896
- } = a;
897
- const n = Ve(e, "modelValue"), l = Xe(), u = E(() => e.id || `v-selection-control-group-${l}`), s = E(() => e.name || u.value), i = /* @__PURE__ */ new Set();
898
- return We(nn, {
899
- modelValue: n,
900
- forceUpdate: () => {
901
- i.forEach((o) => o());
902
- },
903
- onForceUpdate: (o) => {
904
- i.add(o), rt(() => {
905
- i.delete(o);
906
- });
907
- }
908
- }), Jt({
909
- [e.defaultsTarget]: {
910
- color: E(() => e.color),
911
- disabled: E(() => e.disabled),
912
- density: E(() => e.density),
913
- error: E(() => e.error),
914
- inline: E(() => e.inline),
915
- modelValue: n,
916
- multiple: E(() => !!e.multiple || e.multiple == null && Array.isArray(n.value)),
917
- name: s,
918
- falseIcon: E(() => e.falseIcon),
919
- trueIcon: E(() => e.trueIcon),
920
- readonly: E(() => e.readonly),
921
- ripple: E(() => e.ripple),
922
- type: E(() => e.type),
923
- valueComparator: E(() => e.valueComparator)
924
- }
925
- }), de(() => b("div", {
926
- class: re(["v-selection-control-group", {
927
- "v-selection-control-group--inline": e.inline
928
- }, e.class]),
929
- style: xe(e.style),
930
- role: e.type === "radio" ? "radiogroup" : void 0
931
- }, [t.default?.()])), {};
932
- }
933
- });
934
- const on = X({
935
- label: String,
936
- baseColor: String,
937
- trueValue: null,
938
- falseValue: null,
939
- value: null,
940
- ...be(),
941
- ...an()
942
- }, "VSelectionControl");
943
- function ka(e) {
944
- const a = Pe(nn, void 0), {
945
- densityClasses: t
946
- } = Dt(e), n = Ve(e, "modelValue"), l = I(() => e.trueValue !== void 0 ? e.trueValue : e.value !== void 0 ? e.value : !0), u = I(() => e.falseValue !== void 0 ? e.falseValue : !1), s = I(() => !!e.multiple || e.multiple == null && Array.isArray(n.value)), i = I({
947
- get() {
948
- const v = a ? a.modelValue.value : n.value;
949
- return s.value ? Te(v).some((y) => e.valueComparator(y, l.value)) : e.valueComparator(v, l.value);
950
- },
951
- set(v) {
952
- if (e.readonly) return;
953
- const y = v ? l.value : u.value;
954
- let h = y;
955
- s.value && (h = v ? [...Te(n.value), y] : Te(n.value).filter((p) => !e.valueComparator(p, l.value))), a ? a.modelValue.value = h : n.value = h;
956
- }
957
- }), {
958
- textColorClasses: o,
959
- textColorStyles: r
960
- } = kt(() => {
961
- if (!(e.error || e.disabled))
962
- return i.value ? e.color : e.baseColor;
963
- }), {
964
- backgroundColorClasses: d,
965
- backgroundColorStyles: c
966
- } = Tt(() => i.value && !e.error && !e.disabled ? e.color : e.baseColor), m = I(() => i.value ? e.trueIcon : e.falseIcon);
967
- return {
968
- group: a,
969
- densityClasses: t,
970
- trueValue: l,
971
- falseValue: u,
972
- model: i,
973
- textColorClasses: o,
974
- textColorStyles: r,
975
- backgroundColorClasses: d,
976
- backgroundColorStyles: c,
977
- icon: m
978
- };
979
- }
980
- const yl = ie()({
981
- name: "VSelectionControl",
982
- directives: {
983
- vRipple: lt
984
- },
985
- inheritAttrs: !1,
986
- props: on(),
987
- emits: {
988
- "update:modelValue": (e) => !0
989
- },
990
- setup(e, a) {
991
- let {
992
- attrs: t,
993
- slots: n
994
- } = a;
995
- const {
996
- group: l,
997
- densityClasses: u,
998
- icon: s,
999
- model: i,
1000
- textColorClasses: o,
1001
- textColorStyles: r,
1002
- backgroundColorClasses: d,
1003
- backgroundColorStyles: c,
1004
- trueValue: m
1005
- } = ka(e), v = Xe(), y = ee(!1), h = ee(!1), p = j(), w = E(() => e.id || `input-${v}`), P = E(() => !e.disabled && !e.readonly);
1006
- l?.onForceUpdate(() => {
1007
- p.value && (p.value.checked = i.value);
1008
- });
1009
- function C(_) {
1010
- P.value && (y.value = !0, dt(_.target, ":focus-visible") !== !1 && (h.value = !0));
1011
- }
1012
- function F() {
1013
- y.value = !1, h.value = !1;
1014
- }
1015
- function B(_) {
1016
- _.stopPropagation();
1017
- }
1018
- function U(_) {
1019
- if (!P.value) {
1020
- p.value && (p.value.checked = i.value);
1021
- return;
1022
- }
1023
- e.readonly && l && ke(() => l.forceUpdate()), i.value = _.target.checked;
1024
- }
1025
- return de(() => {
1026
- const _ = n.label ? n.label({
1027
- label: e.label,
1028
- props: {
1029
- for: w.value
1030
- }
1031
- }) : e.label, [V, $] = Ol(t), D = b("input", L({
1032
- ref: p,
1033
- checked: i.value,
1034
- disabled: !!e.disabled,
1035
- id: w.value,
1036
- onBlur: F,
1037
- onFocus: C,
1038
- onInput: U,
1039
- "aria-disabled": !!e.disabled,
1040
- "aria-label": e.label,
1041
- type: e.type,
1042
- value: m.value,
1043
- name: e.name,
1044
- "aria-checked": e.type === "checkbox" ? i.value : void 0
1045
- }, $), null);
1046
- return b("div", L({
1047
- class: ["v-selection-control", {
1048
- "v-selection-control--dirty": i.value,
1049
- "v-selection-control--disabled": e.disabled,
1050
- "v-selection-control--error": e.error,
1051
- "v-selection-control--focused": y.value,
1052
- "v-selection-control--focus-visible": h.value,
1053
- "v-selection-control--inline": e.inline
1054
- }, u.value, e.class]
1055
- }, V, {
1056
- style: e.style
1057
- }), [b("div", {
1058
- class: re(["v-selection-control__wrapper", o.value]),
1059
- style: xe(r.value)
1060
- }, [n.default?.({
1061
- backgroundColorClasses: d,
1062
- backgroundColorStyles: c
1063
- }), Ue(b("div", {
1064
- class: re(["v-selection-control__input"])
1065
- }, [n.input?.({
1066
- model: i,
1067
- textColorClasses: o,
1068
- textColorStyles: r,
1069
- backgroundColorClasses: d,
1070
- backgroundColorStyles: c,
1071
- inputNode: D,
1072
- icon: s.value,
1073
- props: {
1074
- onFocus: C,
1075
- onBlur: F,
1076
- id: w.value
1077
- }
1078
- }) ?? b(ce, null, [s.value && g(Se, {
1079
- key: "icon",
1080
- icon: s.value
1081
- }, null), D])]), [[lt, !e.disabled && !e.readonly && e.ripple, null, {
1082
- center: !0,
1083
- circle: !0
1084
- }]])]), _ && g(ln, {
1085
- for: w.value,
1086
- onClick: B
1087
- }, {
1088
- default: () => [_]
1089
- })]);
1090
- }), {
1091
- isFocused: y,
1092
- input: p
1093
- };
1094
- }
1095
- }), Sa = X({
1096
- indeterminate: Boolean,
1097
- indeterminateIcon: {
1098
- type: he,
1099
- default: "$checkboxIndeterminate"
1100
- },
1101
- ...on({
1102
- falseIcon: "$checkboxOff",
1103
- trueIcon: "$checkboxOn"
1104
- })
1105
- }, "VCheckboxBtn"), un = ie()({
1106
- name: "VCheckboxBtn",
1107
- props: Sa(),
1108
- emits: {
1109
- "update:modelValue": (e) => !0,
1110
- "update:indeterminate": (e) => !0
1111
- },
1112
- setup(e, a) {
1113
- let {
1114
- slots: t
1115
- } = a;
1116
- const n = Ve(e, "indeterminate"), l = Ve(e, "modelValue");
1117
- function u(o) {
1118
- n.value && (n.value = !1);
1119
- }
1120
- const s = E(() => n.value ? e.indeterminateIcon : e.falseIcon), i = E(() => n.value ? e.indeterminateIcon : e.trueIcon);
1121
- return de(() => {
1122
- const o = Ye(yl.filterProps(e), ["modelValue"]);
1123
- return g(yl, L(o, {
1124
- modelValue: l.value,
1125
- "onUpdate:modelValue": [(r) => l.value = r, u],
1126
- class: ["v-checkbox-btn", e.class],
1127
- style: e.style,
1128
- type: "checkbox",
1129
- falseIcon: s.value,
1130
- trueIcon: i.value,
1131
- "aria-checked": n.value ? "mixed" : void 0
1132
- }), t);
1133
- }), {};
1134
- }
1135
- });
1136
- function Ot(e) {
1137
- const {
1138
- t: a
1139
- } = it();
1140
- function t(n) {
1141
- let {
1142
- name: l,
1143
- color: u,
1144
- ...s
1145
- } = n;
1146
- const i = {
1147
- prepend: "prependAction",
1148
- prependInner: "prependAction",
1149
- append: "appendAction",
1150
- appendInner: "appendAction",
1151
- clear: "clear"
1152
- }[l], o = e[`onClick:${l}`];
1153
- function r(c) {
1154
- c.key !== "Enter" && c.key !== " " || (c.preventDefault(), c.stopPropagation(), $l(o, new PointerEvent("click", c)));
1155
- }
1156
- const d = o && i ? a(`$vuetify.input.${i}`, e.label ?? "") : void 0;
1157
- return g(Se, L({
1158
- icon: e[`${l}Icon`],
1159
- "aria-label": d,
1160
- onClick: o,
1161
- onKeydown: r,
1162
- color: u
1163
- }, s), null);
1164
- }
1165
- return {
1166
- InputIcon: t
1167
- };
1168
- }
1169
- const Ca = X({
1170
- active: Boolean,
1171
- color: String,
1172
- messages: {
1173
- type: [Array, String],
1174
- default: () => []
1175
- },
1176
- ...be(),
1177
- ...Bt({
1178
- transition: {
1179
- component: Ml,
1180
- leaveAbsolute: !0,
1181
- group: !0
1182
- }
1183
- })
1184
- }, "VMessages"), Va = ie()({
1185
- name: "VMessages",
1186
- props: Ca(),
1187
- setup(e, a) {
1188
- let {
1189
- slots: t
1190
- } = a;
1191
- const n = I(() => Te(e.messages)), {
1192
- textColorClasses: l,
1193
- textColorStyles: u
1194
- } = kt(() => e.color);
1195
- return de(() => g(nl, {
1196
- transition: e.transition,
1197
- tag: "div",
1198
- class: re(["v-messages", l.value, e.class]),
1199
- style: xe([u.value, e.style])
1200
- }, {
1201
- default: () => [e.active && n.value.map((s, i) => b("div", {
1202
- class: "v-messages__message",
1203
- key: `${i}-${n.value}`
1204
- }, [t.message ? t.message({
1205
- message: s
1206
- }) : s]))]
1207
- })), {};
1208
- }
1209
- }), sn = X({
1210
- focused: Boolean,
1211
- "onUpdate:focused": Le()
1212
- }, "focus");
1213
- function rn(e) {
1214
- let a = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : Nl();
1215
- const t = Ve(e, "focused"), n = E(() => ({
1216
- [`${a}--focused`]: t.value
1217
- }));
1218
- function l() {
1219
- t.value = !0;
1220
- }
1221
- function u() {
1222
- t.value = !1;
1223
- }
1224
- return {
1225
- focusClasses: n,
1226
- isFocused: t,
1227
- focus: l,
1228
- blur: u
1229
- };
1230
- }
1231
- const xa = /* @__PURE__ */ Symbol.for("vuetify:form");
1232
- function $t(e) {
1233
- const a = Pe(xa, null);
1234
- return {
1235
- ...a,
1236
- isReadonly: I(() => !!(e?.readonly ?? a?.isReadonly.value)),
1237
- isDisabled: I(() => !!(e?.disabled ?? a?.isDisabled.value))
1238
- };
1239
- }
1240
- const Ia = /* @__PURE__ */ Symbol.for("vuetify:rules");
1241
- function wa(e) {
1242
- const a = Pe(Ia, null);
1243
- if (!e) {
1244
- if (!a)
1245
- throw new Error("Could not find Vuetify rules injection");
1246
- return a.aliases;
1247
- }
1248
- return a?.resolve(e) ?? E(e);
1249
- }
1250
- const _a = X({
1251
- disabled: {
1252
- type: Boolean,
1253
- default: null
1254
- },
1255
- error: Boolean,
1256
- errorMessages: {
1257
- type: [Array, String],
1258
- default: () => []
1259
- },
1260
- maxErrors: {
1261
- type: [Number, String],
1262
- default: 1
1263
- },
1264
- name: String,
1265
- label: String,
1266
- readonly: {
1267
- type: Boolean,
1268
- default: null
1269
- },
1270
- rules: {
1271
- type: Array,
1272
- default: () => []
1273
- },
1274
- modelValue: null,
1275
- validateOn: String,
1276
- validationValue: null,
1277
- ...sn()
1278
- }, "validation");
1279
- function Pa(e) {
1280
- let a = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : Nl(), t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : Xe();
1281
- const n = Ve(e, "modelValue"), l = I(() => e.validationValue === void 0 ? n.value : e.validationValue), u = $t(e), s = wa(() => e.rules), i = j([]), o = ee(!0), r = I(() => !!(Te(n.value === "" ? null : n.value).length || Te(l.value === "" ? null : l.value).length)), d = I(() => e.errorMessages?.length ? Te(e.errorMessages).concat(i.value).slice(0, Math.max(0, Number(e.maxErrors))) : i.value), c = I(() => {
1282
- let F = (e.validateOn ?? u.validateOn?.value) || "input";
1283
- F === "lazy" && (F = "input lazy"), F === "eager" && (F = "input eager");
1284
- const B = new Set(F?.split(" ") ?? []);
1285
- return {
1286
- input: B.has("input"),
1287
- blur: B.has("blur") || B.has("input") || B.has("invalid-input"),
1288
- invalidInput: B.has("invalid-input"),
1289
- lazy: B.has("lazy"),
1290
- eager: B.has("eager")
1291
- };
1292
- }), m = I(() => e.error || e.errorMessages?.length ? !1 : e.rules.length ? o.value ? i.value.length || c.value.lazy ? null : !0 : !i.value.length : !0), v = ee(!1), y = I(() => ({
1293
- [`${a}--error`]: m.value === !1,
1294
- [`${a}--dirty`]: r.value,
1295
- [`${a}--disabled`]: u.isDisabled.value,
1296
- [`${a}--readonly`]: u.isReadonly.value
1297
- })), h = Ll("validation"), p = I(() => e.name ?? M(t));
1298
- wn(() => {
1299
- u.register?.({
1300
- id: p.value,
1301
- vm: h,
1302
- validate: C,
1303
- reset: w,
1304
- resetValidation: P
1305
- });
1306
- }), kl(() => {
1307
- u.unregister?.(p.value);
1308
- }), at(async () => {
1309
- c.value.lazy || await C(!c.value.eager), u.update?.(p.value, m.value, d.value);
1310
- }), jt(() => c.value.input || c.value.invalidInput && m.value === !1, () => {
1311
- se(l, () => {
1312
- if (l.value != null)
1313
- C();
1314
- else if (e.focused) {
1315
- const F = se(() => e.focused, (B) => {
1316
- B || C(), F();
1317
- });
1318
- }
1319
- });
1320
- }), jt(() => c.value.blur, () => {
1321
- se(() => e.focused, (F) => {
1322
- F || C();
1323
- });
1324
- }), se([m, d], () => {
1325
- u.update?.(p.value, m.value, d.value);
1326
- });
1327
- async function w() {
1328
- n.value = null, await ke(), await P();
1329
- }
1330
- async function P() {
1331
- o.value = !0, c.value.lazy ? i.value = [] : await C(!c.value.eager);
1332
- }
1333
- async function C() {
1334
- let F = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1;
1335
- const B = [];
1336
- v.value = !0;
1337
- for (const U of s.value) {
1338
- if (B.length >= Number(e.maxErrors ?? 1))
1339
- break;
1340
- const V = await (typeof U == "function" ? U : () => U)(l.value);
1341
- if (V !== !0) {
1342
- if (V !== !1 && typeof V != "string") {
1343
- console.warn(`${V} is not a valid value. Rule functions must return boolean true or a string.`);
1344
- continue;
1345
- }
1346
- B.push(V || "");
1347
- }
1348
- }
1349
- return i.value = B, v.value = !1, o.value = F, i.value;
1350
- }
1351
- return {
1352
- errorMessages: d,
1353
- isDirty: r,
1354
- isDisabled: u.isDisabled,
1355
- isReadonly: u.isReadonly,
1356
- isPristine: o,
1357
- isValid: m,
1358
- isValidating: v,
1359
- reset: w,
1360
- resetValidation: P,
1361
- validate: C,
1362
- validationClasses: y
1363
- };
1364
- }
1365
- const cn = X({
1366
- id: String,
1367
- appendIcon: he,
1368
- baseColor: String,
1369
- centerAffix: {
1370
- type: Boolean,
1371
- default: !0
1372
- },
1373
- color: String,
1374
- glow: Boolean,
1375
- iconColor: [Boolean, String],
1376
- prependIcon: he,
1377
- hideDetails: [Boolean, String],
1378
- hideSpinButtons: Boolean,
1379
- hint: String,
1380
- persistentHint: Boolean,
1381
- messages: {
1382
- type: [Array, String],
1383
- default: () => []
1384
- },
1385
- direction: {
1386
- type: String,
1387
- default: "horizontal",
1388
- validator: (e) => ["horizontal", "vertical"].includes(e)
1389
- },
1390
- "onClick:prepend": Le(),
1391
- "onClick:append": Le(),
1392
- ...be(),
1393
- ...ht(),
1394
- ...On(pt(), ["maxWidth", "minWidth", "width"]),
1395
- ...He(),
1396
- ..._a()
1397
- }, "VInput"), hl = ie()({
1398
- name: "VInput",
1399
- props: {
1400
- ...cn()
1401
- },
1402
- emits: {
1403
- "update:modelValue": (e) => !0
1404
- },
1405
- setup(e, a) {
1406
- let {
1407
- attrs: t,
1408
- slots: n,
1409
- emit: l
1410
- } = a;
1411
- const {
1412
- densityClasses: u
1413
- } = Dt(e), {
1414
- dimensionStyles: s
1415
- } = bt(e), {
1416
- themeClasses: i
1417
- } = ot(e), {
1418
- rtlClasses: o
1419
- } = Ft(), {
1420
- InputIcon: r
1421
- } = Ot(e), d = Xe(), c = I(() => e.id || `input-${d}`), {
1422
- errorMessages: m,
1423
- isDirty: v,
1424
- isDisabled: y,
1425
- isReadonly: h,
1426
- isPristine: p,
1427
- isValid: w,
1428
- isValidating: P,
1429
- reset: C,
1430
- resetValidation: F,
1431
- validate: B,
1432
- validationClasses: U
1433
- } = Pa(e, "v-input", c), _ = I(() => e.errorMessages?.length || !p.value && m.value.length ? m.value : e.hint && (e.persistentHint || e.focused) ? e.hint : e.messages), V = E(() => _.value.length > 0), $ = E(() => !e.hideDetails || e.hideDetails === "auto" && (V.value || !!n.details)), D = I(() => $.value ? `${c.value}-messages` : void 0), G = I(() => ({
1434
- id: c,
1435
- messagesId: D,
1436
- isDirty: v,
1437
- isDisabled: y,
1438
- isReadonly: h,
1439
- isPristine: p,
1440
- isValid: w,
1441
- isValidating: P,
1442
- hasDetails: $,
1443
- reset: C,
1444
- resetValidation: F,
1445
- validate: B
1446
- })), ne = E(() => e.error || e.disabled ? void 0 : e.focused ? e.color : e.baseColor), H = E(() => {
1447
- if (e.iconColor)
1448
- return e.iconColor === !0 ? ne.value : e.iconColor;
1449
- });
1450
- return de(() => {
1451
- const W = !!(n.prepend || e.prependIcon), K = !!(n.append || e.appendIcon);
1452
- return b("div", {
1453
- class: re(["v-input", `v-input--${e.direction}`, {
1454
- "v-input--center-affix": e.centerAffix,
1455
- "v-input--focused": e.focused,
1456
- "v-input--glow": e.glow,
1457
- "v-input--hide-spin-buttons": e.hideSpinButtons
1458
- }, u.value, i.value, o.value, U.value, e.class]),
1459
- style: xe([s.value, e.style])
1460
- }, [W && b("div", {
1461
- key: "prepend",
1462
- class: "v-input__prepend"
1463
- }, [n.prepend ? n.prepend(G.value) : e.prependIcon && g(r, {
1464
- key: "prepend-icon",
1465
- name: "prepend",
1466
- color: H.value
1467
- }, null)]), n.default && b("div", {
1468
- class: "v-input__control"
1469
- }, [n.default?.(G.value)]), K && b("div", {
1470
- key: "append",
1471
- class: "v-input__append"
1472
- }, [n.append ? n.append(G.value) : e.appendIcon && g(r, {
1473
- key: "append-icon",
1474
- name: "append",
1475
- color: H.value
1476
- }, null)]), $.value && b("div", {
1477
- id: D.value,
1478
- class: "v-input__details",
1479
- role: "alert",
1480
- "aria-live": "polite"
1481
- }, [g(Va, {
1482
- active: V.value,
1483
- messages: _.value
1484
- }, {
1485
- message: n.message
1486
- }), n.details?.(G.value)])]);
1487
- }), {
1488
- reset: C,
1489
- resetValidation: F,
1490
- validate: B,
1491
- isValid: w,
1492
- errorMessages: m
1493
- };
1494
- }
1495
- }), Aa = X({
1496
- active: Boolean,
1497
- disabled: Boolean,
1498
- max: [Number, String],
1499
- value: {
1500
- type: [Number, String],
1501
- default: 0
1502
- },
1503
- ...be(),
1504
- ...Bt({
1505
- transition: {
1506
- component: Ml
1507
- }
1508
- })
1509
- }, "VCounter"), Fa = ie()({
1510
- name: "VCounter",
1511
- functional: !0,
1512
- props: Aa(),
1513
- setup(e, a) {
1514
- let {
1515
- slots: t
1516
- } = a;
1517
- const n = E(() => e.max ? `${e.value} / ${e.max}` : String(e.value));
1518
- return de(() => g(nl, {
1519
- transition: e.transition
1520
- }, {
1521
- default: () => [Ue(b("div", {
1522
- class: re(["v-counter", {
1523
- "text-error": e.max && !e.disabled && parseFloat(e.value) > parseFloat(e.max)
1524
- }, e.class]),
1525
- style: xe(e.style)
1526
- }, [t.default ? t.default({
1527
- counter: n.value,
1528
- max: e.max,
1529
- value: e.value
1530
- }) : n.value]), [[_t, e.active]])]
1531
- })), {};
1532
- }
1533
- }), Da = X({
1534
- floating: Boolean,
1535
- ...be()
1536
- }, "VFieldLabel"), Ct = ie()({
1537
- name: "VFieldLabel",
1538
- props: Da(),
1539
- setup(e, a) {
1540
- let {
1541
- slots: t
1542
- } = a;
1543
- return de(() => g(ln, {
1544
- class: re(["v-field-label", {
1545
- "v-field-label--floating": e.floating
1546
- }, e.class]),
1547
- style: xe(e.style)
1548
- }, t)), {};
1549
- }
1550
- }), Ta = ["underlined", "outlined", "filled", "solo", "solo-inverted", "solo-filled", "plain"], dn = X({
1551
- appendInnerIcon: he,
1552
- bgColor: String,
1553
- clearable: Boolean,
1554
- clearIcon: {
1555
- type: he,
1556
- default: "$clear"
1557
- },
1558
- active: Boolean,
1559
- centerAffix: {
1560
- type: Boolean,
1561
- default: void 0
1562
- },
1563
- color: String,
1564
- baseColor: String,
1565
- dirty: Boolean,
1566
- disabled: {
1567
- type: Boolean,
1568
- default: null
1569
- },
1570
- glow: Boolean,
1571
- error: Boolean,
1572
- flat: Boolean,
1573
- iconColor: [Boolean, String],
1574
- label: String,
1575
- persistentClear: Boolean,
1576
- prependInnerIcon: he,
1577
- reverse: Boolean,
1578
- singleLine: Boolean,
1579
- variant: {
1580
- type: String,
1581
- default: "filled",
1582
- validator: (e) => Ta.includes(e)
1583
- },
1584
- "onClick:clear": Le(),
1585
- "onClick:appendInner": Le(),
1586
- "onClick:prependInner": Le(),
1587
- ...be(),
1588
- ...Ul(),
1589
- ...yt(),
1590
- ...He()
1591
- }, "VField"), bl = ie()({
1592
- name: "VField",
1593
- inheritAttrs: !1,
1594
- props: {
1595
- id: String,
1596
- details: Boolean,
1597
- labelId: String,
1598
- ...sn(),
1599
- ...dn()
1600
- },
1601
- emits: {
1602
- "update:focused": (e) => !0,
1603
- "update:modelValue": (e) => !0
1604
- },
1605
- setup(e, a) {
1606
- let {
1607
- attrs: t,
1608
- emit: n,
1609
- slots: l
1610
- } = a;
1611
- const {
1612
- themeClasses: u
1613
- } = ot(e), {
1614
- loaderClasses: s
1615
- } = Hl(e), {
1616
- focusClasses: i,
1617
- isFocused: o,
1618
- focus: r,
1619
- blur: d
1620
- } = rn(e), {
1621
- InputIcon: c
1622
- } = Ot(e), {
1623
- roundedClasses: m
1624
- } = gt(e), {
1625
- rtlClasses: v
1626
- } = Ft(), y = E(() => e.dirty || e.active), h = E(() => !!(e.label || l.label)), p = E(() => !e.singleLine && h.value), w = Xe(), P = I(() => e.id || `input-${w}`), C = E(() => e.details ? `${P.value}-messages` : void 0), F = j(), B = j(), U = j(), _ = I(() => ["plain", "underlined"].includes(e.variant)), V = I(() => e.error || e.disabled ? void 0 : y.value && o.value ? e.color : e.baseColor), $ = I(() => {
1627
- if (!(!e.iconColor || e.glow && !o.value))
1628
- return e.iconColor === !0 ? V.value : e.iconColor;
1629
- }), {
1630
- backgroundColorClasses: D,
1631
- backgroundColorStyles: G
1632
- } = Tt(() => e.bgColor), {
1633
- textColorClasses: ne,
1634
- textColorStyles: H
1635
- } = kt(V);
1636
- se(y, (z) => {
1637
- if (p.value && !xl()) {
1638
- const fe = F.value.$el, R = B.value.$el;
1639
- requestAnimationFrame(() => {
1640
- const O = $n(fe), k = new Mn(R), f = k.x - O.x, A = k.y - O.y - (O.height / 2 - k.height / 2), J = k.width / 0.75, ve = Math.abs(J - O.width) > 1 ? {
1641
- maxWidth: et(J)
1642
- } : void 0, ge = getComputedStyle(fe), pe = getComputedStyle(R), Ie = parseFloat(ge.transitionDuration) * 1e3 || 150, De = parseFloat(pe.getPropertyValue("--v-field-label-scale")), je = pe.getPropertyValue("color");
1643
- fe.style.visibility = "visible", R.style.visibility = "hidden", Nn(fe, {
1644
- transform: `translate(${f}px, ${A}px) scale(${De})`,
1645
- color: je,
1646
- ...ve
1647
- }, {
1648
- duration: Ie,
1649
- easing: Ln,
1650
- direction: z ? "normal" : "reverse"
1651
- }).finished.then(() => {
1652
- fe.style.removeProperty("visibility"), R.style.removeProperty("visibility");
1653
- });
1654
- });
1655
- }
1656
- }, {
1657
- flush: "post"
1658
- });
1659
- const W = I(() => ({
1660
- isActive: y,
1661
- isFocused: o,
1662
- controlRef: U,
1663
- iconColor: $,
1664
- blur: d,
1665
- focus: r
1666
- })), K = E(() => {
1667
- const z = !y.value;
1668
- return {
1669
- "aria-hidden": z,
1670
- for: z ? void 0 : P.value
1671
- };
1672
- }), ue = E(() => {
1673
- const z = p.value && y.value;
1674
- return {
1675
- "aria-hidden": z,
1676
- for: z ? void 0 : P.value
1677
- };
1678
- });
1679
- function q(z) {
1680
- z.target !== document.activeElement && z.preventDefault();
1681
- }
1682
- return de(() => {
1683
- const z = e.variant === "outlined", fe = !!(l["prepend-inner"] || e.prependInnerIcon), R = !!(e.clearable || l.clear) && !e.disabled, O = !!(l["append-inner"] || e.appendInnerIcon || R), k = () => l.label ? l.label({
1684
- ...W.value,
1685
- label: e.label,
1686
- props: {
1687
- for: P.value
1688
- }
1689
- }) : e.label;
1690
- return b("div", L({
1691
- class: ["v-field", {
1692
- "v-field--active": y.value,
1693
- "v-field--appended": O,
1694
- "v-field--center-affix": e.centerAffix ?? !_.value,
1695
- "v-field--disabled": e.disabled,
1696
- "v-field--dirty": e.dirty,
1697
- "v-field--error": e.error,
1698
- "v-field--glow": e.glow,
1699
- "v-field--flat": e.flat,
1700
- "v-field--has-background": !!e.bgColor,
1701
- "v-field--persistent-clear": e.persistentClear,
1702
- "v-field--prepended": fe,
1703
- "v-field--reverse": e.reverse,
1704
- "v-field--single-line": e.singleLine,
1705
- "v-field--no-label": !k(),
1706
- [`v-field--variant-${e.variant}`]: !0
1707
- }, u.value, D.value, i.value, s.value, m.value, v.value, e.class],
1708
- style: [G.value, e.style],
1709
- onClick: q
1710
- }, t), [b("div", {
1711
- class: "v-field__overlay"
1712
- }, null), g(zl, {
1713
- name: "v-field",
1714
- active: !!e.loading,
1715
- color: e.error ? "error" : typeof e.loading == "string" ? e.loading : e.color
1716
- }, {
1717
- default: l.loader
1718
- }), fe && b("div", {
1719
- key: "prepend",
1720
- class: "v-field__prepend-inner"
1721
- }, [l["prepend-inner"] ? l["prepend-inner"](W.value) : e.prependInnerIcon && g(c, {
1722
- key: "prepend-icon",
1723
- name: "prependInner",
1724
- color: $.value
1725
- }, null)]), b("div", {
1726
- class: "v-field__field",
1727
- "data-no-activator": ""
1728
- }, [["filled", "solo", "solo-inverted", "solo-filled"].includes(e.variant) && p.value && g(Ct, L({
1729
- key: "floating-label",
1730
- ref: B,
1731
- class: [ne.value],
1732
- floating: !0
1733
- }, K.value, {
1734
- style: H.value
1735
- }), {
1736
- default: () => [k()]
1737
- }), h.value && g(Ct, L({
1738
- key: "label",
1739
- ref: F,
1740
- id: e.labelId
1741
- }, ue.value), {
1742
- default: () => [k()]
1743
- }), l.default?.({
1744
- ...W.value,
1745
- props: {
1746
- id: P.value,
1747
- class: "v-field__input",
1748
- "aria-describedby": C.value
1749
- },
1750
- focus: r,
1751
- blur: d
1752
- }) ?? b("div", {
1753
- id: P.value,
1754
- class: "v-field__input",
1755
- "aria-describedby": C.value
1756
- }, null)]), R && g(Tl, {
1757
- key: "clear"
1758
- }, {
1759
- default: () => [Ue(b("div", {
1760
- class: "v-field__clearable",
1761
- onMousedown: (f) => {
1762
- f.preventDefault(), f.stopPropagation();
1763
- }
1764
- }, [g(Fe, {
1765
- defaults: {
1766
- VIcon: {
1767
- icon: e.clearIcon
1768
- }
1769
- }
1770
- }, {
1771
- default: () => [l.clear ? l.clear({
1772
- ...W.value,
1773
- props: {
1774
- onFocus: r,
1775
- onBlur: d,
1776
- onClick: e["onClick:clear"],
1777
- tabindex: -1
1778
- }
1779
- }) : g(c, {
1780
- name: "clear",
1781
- onFocus: r,
1782
- onBlur: d,
1783
- tabindex: -1
1784
- }, null)]
1785
- })]), [[_t, e.dirty]])]
1786
- }), O && b("div", {
1787
- key: "append",
1788
- class: "v-field__append-inner"
1789
- }, [l["append-inner"] ? l["append-inner"](W.value) : e.appendInnerIcon && g(c, {
1790
- key: "append-icon",
1791
- name: "appendInner",
1792
- color: $.value
1793
- }, null)]), b("div", {
1794
- class: re(["v-field__outline", ne.value]),
1795
- style: xe(H.value)
1796
- }, [z && b(ce, null, [b("div", {
1797
- class: "v-field__outline__start"
1798
- }, null), p.value && b("div", {
1799
- class: "v-field__outline__notch"
1800
- }, [g(Ct, L({
1801
- ref: B,
1802
- floating: !0
1803
- }, K.value), {
1804
- default: () => [k()]
1805
- })]), b("div", {
1806
- class: "v-field__outline__end"
1807
- }, null)]), _.value && p.value && g(Ct, L({
1808
- ref: B,
1809
- floating: !0
1810
- }, K.value), {
1811
- default: () => [k()]
1812
- })])]);
1813
- }), {
1814
- controlRef: U,
1815
- fieldIconColor: $
1816
- };
1817
- }
1818
- }), Ba = X({
1819
- autocomplete: String
1820
- }, "autocomplete");
1821
- function vn(e) {
1822
- const a = Xe(), t = ee(0), n = E(() => e.autocomplete === "suppress"), l = E(() => {
1823
- if (e.name)
1824
- return n.value ? `${e.name}-${a}-${t.value}` : e.name;
1825
- }), u = E(() => n.value ? "off" : e.autocomplete);
1826
- return {
1827
- isSuppressing: n,
1828
- fieldAutocomplete: u,
1829
- fieldName: l,
1830
- update: () => t.value = (/* @__PURE__ */ new Date()).getTime()
1831
- };
1832
- }
1833
- function Ra(e) {
1834
- function a(t, n) {
1835
- if (!e.autofocus || !t) return;
1836
- const l = n[0].target;
1837
- (l.matches("input,textarea") ? l : l.querySelector("input,textarea"))?.focus();
1838
- }
1839
- return {
1840
- onIntersect: a
1841
- };
1842
- }
1843
- const Ea = ["color", "file", "time", "date", "datetime-local", "week", "month"], Mt = X({
1844
- autofocus: Boolean,
1845
- counter: [Boolean, Number, String],
1846
- counterValue: [Number, Function],
1847
- prefix: String,
1848
- placeholder: String,
1849
- persistentPlaceholder: Boolean,
1850
- persistentCounter: Boolean,
1851
- suffix: String,
1852
- role: String,
1853
- type: {
1854
- type: String,
1855
- default: "text"
1856
- },
1857
- modelModifiers: Object,
1858
- ...Ba(),
1859
- ...Ye(cn(), ["direction"]),
1860
- ...dn()
1861
- }, "VTextField"), Je = ie()({
1862
- name: "VTextField",
1863
- directives: {
1864
- vIntersect: dl
1865
- },
1866
- inheritAttrs: !1,
1867
- props: Mt(),
1868
- emits: {
1869
- "click:control": (e) => !0,
1870
- "mousedown:control": (e) => !0,
1871
- "update:focused": (e) => !0,
1872
- "update:modelValue": (e) => !0
1873
- },
1874
- setup(e, a) {
1875
- let {
1876
- attrs: t,
1877
- emit: n,
1878
- slots: l
1879
- } = a;
1880
- const u = Ve(e, "modelValue", void 0, (_) => Object.is(_, -0) ? "-0" : _), {
1881
- isFocused: s,
1882
- focus: i,
1883
- blur: o
1884
- } = rn(e), {
1885
- onIntersect: r
1886
- } = Ra(e), d = I(() => typeof e.counterValue == "function" ? e.counterValue(u.value) : typeof e.counterValue == "number" ? e.counterValue : (u.value ?? "").toString().length), c = I(() => {
1887
- if (t.maxlength) return t.maxlength;
1888
- if (!(!e.counter || typeof e.counter != "number" && typeof e.counter != "string"))
1889
- return e.counter;
1890
- }), m = I(() => ["plain", "underlined"].includes(e.variant)), v = j(), y = j(), h = j(), p = vn(e), w = I(() => Ea.includes(e.type) || e.persistentPlaceholder || s.value || e.active);
1891
- function P() {
1892
- p.isSuppressing.value && p.update(), s.value || i(), ke(() => {
1893
- h.value !== document.activeElement && h.value?.focus();
1894
- });
1895
- }
1896
- function C(_) {
1897
- n("mousedown:control", _), _.target !== h.value && (P(), _.preventDefault());
1898
- }
1899
- function F(_) {
1900
- n("click:control", _);
1901
- }
1902
- function B(_, V) {
1903
- _.stopPropagation(), P(), ke(() => {
1904
- V(), $l(e["onClick:clear"], _);
1905
- });
1906
- }
1907
- function U(_) {
1908
- const V = _.target;
1909
- if (!(e.modelModifiers?.trim && ["text", "search", "password", "tel", "url"].includes(e.type))) {
1910
- u.value = V.value;
1911
- return;
1912
- }
1913
- const $ = V.value, D = V.selectionStart, G = V.selectionEnd;
1914
- u.value = $, ke(() => {
1915
- let ne = 0;
1916
- $.trimStart().length === V.value.length && (ne = $.length - V.value.length), D != null && (V.selectionStart = D - ne), G != null && (V.selectionEnd = G - ne);
1917
- });
1918
- }
1919
- return de(() => {
1920
- const _ = !!(l.counter || e.counter !== !1 && e.counter != null), V = !!(_ || l.details), [$, D] = Ol(t), {
1921
- modelValue: G,
1922
- ...ne
1923
- } = hl.filterProps(e), H = bl.filterProps(e);
1924
- return g(hl, L({
1925
- ref: v,
1926
- modelValue: u.value,
1927
- "onUpdate:modelValue": (W) => u.value = W,
1928
- class: ["v-text-field", {
1929
- "v-text-field--prefixed": e.prefix,
1930
- "v-text-field--suffixed": e.suffix,
1931
- "v-input--plain-underlined": m.value
1932
- }, e.class],
1933
- style: e.style
1934
- }, $, ne, {
1935
- centerAffix: !m.value,
1936
- focused: s.value
1937
- }), {
1938
- ...l,
1939
- default: (W) => {
1940
- let {
1941
- id: K,
1942
- isDisabled: ue,
1943
- isDirty: q,
1944
- isReadonly: z,
1945
- isValid: fe,
1946
- hasDetails: R,
1947
- reset: O
1948
- } = W;
1949
- return g(bl, L({
1950
- ref: y,
1951
- onMousedown: C,
1952
- onClick: F,
1953
- "onClick:clear": (k) => B(k, O),
1954
- role: e.role
1955
- }, Ye(H, ["onClick:clear"]), {
1956
- id: K.value,
1957
- labelId: `${K.value}-label`,
1958
- active: w.value || q.value,
1959
- dirty: q.value || e.dirty,
1960
- disabled: ue.value,
1961
- focused: s.value,
1962
- details: R.value,
1963
- error: fe.value === !1
1964
- }), {
1965
- ...l,
1966
- default: (k) => {
1967
- let {
1968
- props: {
1969
- class: f,
1970
- ...A
1971
- },
1972
- controlRef: J
1973
- } = k;
1974
- const ve = b("input", L({
1975
- ref: (ge) => h.value = J.value = ge,
1976
- value: u.value,
1977
- onInput: U,
1978
- autofocus: e.autofocus,
1979
- readonly: z.value,
1980
- disabled: ue.value,
1981
- name: p.fieldName.value,
1982
- autocomplete: p.fieldAutocomplete.value,
1983
- placeholder: e.placeholder,
1984
- size: 1,
1985
- role: e.role,
1986
- type: e.type,
1987
- onFocus: i,
1988
- onBlur: o,
1989
- "aria-labelledby": `${K.value}-label`
1990
- }, A, D), null);
1991
- return b(ce, null, [e.prefix && b("span", {
1992
- class: "v-text-field__prefix"
1993
- }, [b("span", {
1994
- class: "v-text-field__prefix__text"
1995
- }, [e.prefix])]), Ue(l.default ? b("div", {
1996
- class: re(f),
1997
- "data-no-activator": ""
1998
- }, [l.default({
1999
- id: K
2000
- }), ve]) : _n(ve, {
2001
- class: f
2002
- }), [[dl, r, null, {
2003
- once: !0
2004
- }]]), e.suffix && b("span", {
2005
- class: "v-text-field__suffix"
2006
- }, [b("span", {
2007
- class: "v-text-field__suffix__text"
2008
- }, [e.suffix])])]);
2009
- }
2010
- });
2011
- },
2012
- details: V ? (W) => b(ce, null, [l.details?.(W), _ && b(ce, null, [b("span", null, null), g(Fa, {
2013
- active: e.persistentCounter || s.value,
2014
- value: d.value,
2015
- max: c.value,
2016
- disabled: e.disabled
2017
- }, l.counter)])]) : void 0
2018
- });
2019
- }), St({}, v, y, h);
2020
- }
2021
- }), Oa = X({
2022
- renderless: Boolean,
2023
- ...be()
2024
- }, "VVirtualScrollItem"), $a = ie()({
2025
- name: "VVirtualScrollItem",
2026
- inheritAttrs: !1,
2027
- props: Oa(),
2028
- emits: {
2029
- "update:height": (e) => !0
2030
- },
2031
- setup(e, a) {
2032
- let {
2033
- attrs: t,
2034
- emit: n,
2035
- slots: l
2036
- } = a;
2037
- const {
2038
- resizeRef: u,
2039
- contentRect: s
2040
- } = It(void 0, "border");
2041
- se(() => s.value?.height, (i) => {
2042
- i != null && n("update:height", i);
2043
- }), de(() => e.renderless ? b(ce, null, [l.default?.({
2044
- itemRef: u
2045
- })]) : b("div", L({
2046
- ref: u,
2047
- class: ["v-virtual-scroll__item", e.class],
2048
- style: e.style
2049
- }, t), [l.default?.()]));
2050
- }
2051
- }), Ma = -1, Na = 1, Lt = 100, La = X({
2052
- itemHeight: {
2053
- type: [Number, String],
2054
- default: null
2055
- },
2056
- itemKey: {
2057
- type: [String, Array, Function],
2058
- default: null
2059
- },
2060
- height: [Number, String]
2061
- }, "virtual");
2062
- function Ha(e, a) {
2063
- const t = Il(), n = ee(0);
2064
- zt(() => {
2065
- n.value = parseFloat(e.itemHeight || 0);
2066
- });
2067
- const l = ee(0), u = ee(Math.ceil(
2068
- // Assume 16px items filling the entire screen height if
2069
- // not provided. This is probably incorrect but it minimises
2070
- // the chance of ending up with empty space at the bottom.
2071
- // The default value is set here to avoid poisoning getSize()
2072
- (parseInt(e.height) || t.height.value) / (n.value || 16)
2073
- ) || 1), s = ee(0), i = ee(0), o = j(), r = j();
2074
- let d = 0;
2075
- const {
2076
- resizeRef: c,
2077
- contentRect: m
2078
- } = It();
2079
- zt(() => {
2080
- c.value = o.value;
2081
- });
2082
- const v = I(() => o.value === document.documentElement ? t.height.value : m.value?.height || parseInt(e.height) || 0), y = I(() => !!(o.value && r.value && v.value && n.value));
2083
- let h = Array.from({
2084
- length: a.value.length
2085
- }), p = Array.from({
2086
- length: a.value.length
2087
- });
2088
- const w = ee(0);
2089
- let P = -1;
2090
- function C(R) {
2091
- return h[R] || n.value;
2092
- }
2093
- const F = Hn(() => {
2094
- const R = performance.now();
2095
- p[0] = 0;
2096
- const O = a.value.length;
2097
- for (let k = 1; k <= O; k++)
2098
- p[k] = (p[k - 1] || 0) + C(k - 1);
2099
- w.value = Math.max(w.value, performance.now() - R);
2100
- }, w), B = se(y, (R) => {
2101
- R && (B(), d = r.value.offsetTop, F.immediate(), ue(), ~P && ke(() => {
2102
- ct && window.requestAnimationFrame(() => {
2103
- z(P), P = -1;
2104
- });
2105
- }));
2106
- });
2107
- rt(() => {
2108
- F.clear();
2109
- });
2110
- function U(R, O) {
2111
- const k = h[R], f = n.value;
2112
- n.value = f ? Math.min(n.value, O) : O, (k !== O || f !== n.value) && (h[R] = O, F());
2113
- }
2114
- function _(R) {
2115
- R = Ne(R, 0, a.value.length);
2116
- const O = Math.floor(R), k = R % 1, f = O + 1, A = p[O] || 0, J = p[f] || A;
2117
- return A + (J - A) * k;
2118
- }
2119
- function V(R) {
2120
- return za(p, R);
2121
- }
2122
- let $ = 0, D = 0, G = 0;
2123
- se(v, (R, O) => {
2124
- ue(), R < O && requestAnimationFrame(() => {
2125
- D = 0, ue();
2126
- });
2127
- });
2128
- let ne = -1;
2129
- function H() {
2130
- if (!o.value || !r.value) return;
2131
- const R = o.value.scrollTop, O = performance.now();
2132
- O - G > 500 ? (D = Math.sign(R - $), d = r.value.offsetTop) : D = R - $, $ = R, G = O, window.clearTimeout(ne), ne = window.setTimeout(W, 500), ue();
2133
- }
2134
- function W() {
2135
- !o.value || !r.value || (D = 0, G = 0, window.clearTimeout(ne), ue());
2136
- }
2137
- let K = -1;
2138
- function ue() {
2139
- cancelAnimationFrame(K), K = requestAnimationFrame(q);
2140
- }
2141
- function q() {
2142
- if (!o.value || !v.value || !n.value) return;
2143
- const R = $ - d, O = Math.sign(D), k = Math.max(0, R - Lt), f = Ne(V(k), 0, a.value.length), A = R + v.value + Lt, J = Ne(V(A) + 1, f + 1, a.value.length);
2144
- if (
2145
- // Only update the side we're scrolling towards,
2146
- // the other side will be updated incidentally
2147
- (O !== Ma || f < l.value) && (O !== Na || J > u.value)
2148
- ) {
2149
- const ve = _(l.value) - _(f), ge = _(J) - _(u.value);
2150
- Math.max(ve, ge) > Lt ? (l.value = f, u.value = J) : (f <= 0 && (l.value = f), J >= a.value.length && (u.value = J));
2151
- }
2152
- s.value = _(l.value), i.value = _(a.value.length) - _(u.value);
2153
- }
2154
- function z(R) {
2155
- const O = _(R);
2156
- !o.value || R && !O ? P = R : o.value.scrollTop = O;
2157
- }
2158
- const fe = I(() => a.value.slice(l.value, u.value).map((R, O) => {
2159
- const k = O + l.value;
2160
- return {
2161
- raw: R,
2162
- index: k,
2163
- key: Kl(R, e.itemKey, k)
2164
- };
2165
- }));
2166
- return se(a, () => {
2167
- h = Array.from({
2168
- length: a.value.length
2169
- }), p = Array.from({
2170
- length: a.value.length
2171
- }), F.immediate(), ue();
2172
- }, {
2173
- deep: 1
2174
- }), {
2175
- calculateVisibleItems: ue,
2176
- containerRef: o,
2177
- markerRef: r,
2178
- computedItems: fe,
2179
- paddingTop: s,
2180
- paddingBottom: i,
2181
- scrollToIndex: z,
2182
- handleScroll: H,
2183
- handleScrollend: W,
2184
- handleItemResize: U
2185
- };
2186
- }
2187
- function za(e, a) {
2188
- let t = e.length - 1, n = 0, l = 0, u = null, s = -1;
2189
- if (e[t] < a)
2190
- return t;
2191
- for (; n <= t; )
2192
- if (l = n + t >> 1, u = e[l], u > a)
2193
- t = l - 1;
2194
- else if (u < a)
2195
- s = l, n = l + 1;
2196
- else return u === a ? l : n;
2197
- return s;
2198
- }
2199
- const Ua = X({
2200
- items: {
2201
- type: Array,
2202
- default: () => []
2203
- },
2204
- renderless: Boolean,
2205
- ...La(),
2206
- ...be(),
2207
- ...pt()
2208
- }, "VVirtualScroll"), fn = ie()({
2209
- name: "VVirtualScroll",
2210
- props: Ua(),
2211
- setup(e, a) {
2212
- let {
2213
- slots: t
2214
- } = a;
2215
- const n = Ll("VVirtualScroll"), {
2216
- dimensionStyles: l
2217
- } = bt(e), {
2218
- calculateVisibleItems: u,
2219
- containerRef: s,
2220
- markerRef: i,
2221
- handleScroll: o,
2222
- handleScrollend: r,
2223
- handleItemResize: d,
2224
- scrollToIndex: c,
2225
- paddingTop: m,
2226
- paddingBottom: v,
2227
- computedItems: y
2228
- } = Ha(e, E(() => e.items));
2229
- return jt(() => e.renderless, () => {
2230
- function h() {
2231
- const w = (arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1) ? "addEventListener" : "removeEventListener";
2232
- s.value === document.documentElement ? (document[w]("scroll", o, {
2233
- passive: !0
2234
- }), document[w]("scrollend", r)) : (s.value?.[w]("scroll", o, {
2235
- passive: !0
2236
- }), s.value?.[w]("scrollend", r));
2237
- }
2238
- at(() => {
2239
- s.value = zn(n.vnode.el, !0), h(!0);
2240
- }), rt(h);
2241
- }), de(() => {
2242
- const h = y.value.map((p) => g($a, {
2243
- key: p.key,
2244
- renderless: e.renderless,
2245
- "onUpdate:height": (w) => d(p.index, w)
2246
- }, {
2247
- default: (w) => t.default?.({
2248
- item: p.raw,
2249
- index: p.index,
2250
- ...w
2251
- })
2252
- }));
2253
- return e.renderless ? b(ce, null, [b("div", {
2254
- ref: i,
2255
- class: "v-virtual-scroll__spacer",
2256
- style: {
2257
- paddingTop: et(m.value)
2258
- }
2259
- }, null), h, b("div", {
2260
- class: "v-virtual-scroll__spacer",
2261
- style: {
2262
- paddingBottom: et(v.value)
2263
- }
2264
- }, null)]) : b("div", {
2265
- ref: s,
2266
- class: re(["v-virtual-scroll", e.class]),
2267
- onScrollPassive: o,
2268
- onScrollend: r,
2269
- style: xe([l.value, e.style])
2270
- }, [b("div", {
2271
- ref: i,
2272
- class: "v-virtual-scroll__container",
2273
- style: {
2274
- paddingTop: et(m.value),
2275
- paddingBottom: et(v.value)
2276
- }
2277
- }, [h])]);
2278
- }), {
2279
- calculateVisibleItems: u,
2280
- scrollToIndex: c
2281
- };
2282
- }
2283
- });
2284
- function mn(e, a) {
2285
- const t = ee(!1);
2286
- let n;
2287
- function l(i) {
2288
- cancelAnimationFrame(n), t.value = !0, n = requestAnimationFrame(() => {
2289
- n = requestAnimationFrame(() => {
2290
- t.value = !1;
2291
- });
2292
- });
2293
- }
2294
- async function u() {
2295
- await new Promise((i) => requestAnimationFrame(i)), await new Promise((i) => requestAnimationFrame(i)), await new Promise((i) => requestAnimationFrame(i)), await new Promise((i) => {
2296
- if (t.value) {
2297
- const o = se(t, () => {
2298
- o(), i();
2299
- });
2300
- } else i();
2301
- });
2302
- }
2303
- async function s(i) {
2304
- if (i.key === "Tab" && a.value?.focus(), !["PageDown", "PageUp", "Home", "End"].includes(i.key)) return;
2305
- const o = e.value?.$el;
2306
- if (!o) return;
2307
- (i.key === "Home" || i.key === "End") && o.scrollTo({
2308
- top: i.key === "Home" ? 0 : o.scrollHeight,
2309
- behavior: "smooth"
2310
- }), await u();
2311
- const r = o.querySelectorAll(":scope > :not(.v-virtual-scroll__spacer)");
2312
- if (i.key === "PageDown" || i.key === "Home") {
2313
- const d = o.getBoundingClientRect().top;
2314
- for (const c of r)
2315
- if (c.getBoundingClientRect().top >= d) {
2316
- c.focus();
2317
- break;
2318
- }
2319
- } else {
2320
- const d = o.getBoundingClientRect().bottom;
2321
- for (const c of [...r].reverse())
2322
- if (c.getBoundingClientRect().bottom <= d) {
2323
- c.focus();
2324
- break;
2325
- }
2326
- }
2327
- }
2328
- return {
2329
- onScrollPassive: l,
2330
- onKeydown: s
2331
- };
2332
- }
2333
- function gn(e) {
2334
- let {
2335
- groups: a,
2336
- onLeave: t
2337
- } = e;
2338
- function n(i) {
2339
- return i.type === "list" ? i.contentRef.value?.$el : i.contentRef.value;
2340
- }
2341
- function l(i) {
2342
- const o = n(i);
2343
- return o ? _l(o) : [];
2344
- }
2345
- function u(i) {
2346
- const o = i.target, r = i.shiftKey ? "backward" : "forward", d = a.map(l), c = a.map((v) => v.type === "list" ? v.contentRef.value?.$el : v.contentRef.value).findIndex((v) => v?.contains(o)), m = s(d, c, r, o);
2347
- if (m === null) {
2348
- const v = a[c], y = d[c];
2349
- (v.type === "list" || (r === "forward" ? y.at(-1) === i.target : y.at(0) === i.target)) && t();
2350
- } else {
2351
- i.preventDefault(), i.stopImmediatePropagation();
2352
- const v = a[m];
2353
- if (v.type === "list" && Ut(v.displayItemsCount) > 0)
2354
- v.contentRef.value?.focus(0);
2355
- else {
2356
- const y = r === "forward";
2357
- d[m].at(y ? 0 : -1).focus();
2358
- }
2359
- }
2360
- }
2361
- function s(i, o, r, d) {
2362
- const c = a[o], m = i[o];
2363
- if (c.type !== "list" && !(r === "forward" ? m.at(-1) === d : m.at(0) === d))
2364
- return null;
2365
- const v = r === "forward" ? 1 : -1;
2366
- for (let y = o + v; y >= 0 && y < a.length; y += v) {
2367
- const h = a[y];
2368
- if (i[y].length > 0 || h.type === "list" && Ut(h.displayItemsCount) > 0)
2369
- return y;
2370
- }
2371
- return null;
2372
- }
2373
- return {
2374
- onTabKeydown: u
2375
- };
2376
- }
2377
- const Ka = (e, a, t) => {
2378
- if (e == null || a == null) return -1;
2379
- if (!a.length) return 0;
2380
- e = e.toString().toLocaleLowerCase(), a = a.toString().toLocaleLowerCase();
2381
- const n = [];
2382
- let l = e.indexOf(a);
2383
- for (; ~l; )
2384
- n.push([l, l + a.length]), l = e.indexOf(a, l + a.length);
2385
- return n.length ? n : -1;
2386
- };
2387
- function Ht(e, a) {
2388
- if (!(e == null || typeof e == "boolean" || e === -1))
2389
- return typeof e == "number" ? [[e, e + a.length]] : Array.isArray(e[0]) ? e : [e];
2390
- }
2391
- const yn = X({
2392
- customFilter: Function,
2393
- customKeyFilter: Object,
2394
- filterKeys: [Array, String],
2395
- filterMode: {
2396
- type: String,
2397
- default: "intersection"
2398
- },
2399
- noFilter: Boolean
2400
- }, "filter");
2401
- function ja(e, a, t) {
2402
- const n = [], l = t?.default ?? Ka, u = t?.filterKeys ? Te(t.filterKeys) : !1, s = Object.keys(t?.customKeyFilter ?? {}).length;
2403
- if (!e?.length) return n;
2404
- let i = [];
2405
- e: for (let o = 0; o < e.length; o++) {
2406
- const [r, d = r] = Te(e[o]), c = {}, m = {};
2407
- let v = -1;
2408
- if ((a || s > 0) && !t?.noFilter) {
2409
- let y = !1;
2410
- if (typeof r == "object") {
2411
- if (r.type === "divider" || r.type === "subheader") {
2412
- (i.at(-1)?.type !== "divider" || r.type !== "subheader") && (i = []), i.push({
2413
- index: o,
2414
- matches: {},
2415
- type: r.type
2416
- });
2417
- continue;
2418
- }
2419
- const w = u || Object.keys(d);
2420
- y = w.length === s;
2421
- for (const P of w) {
2422
- const C = Kl(d, P), F = t?.customKeyFilter?.[P];
2423
- if (v = F ? F(C, a, r) : l(C, a, r), v !== -1 && v !== !1)
2424
- F ? c[P] = Ht(v, a) : m[P] = Ht(v, a);
2425
- else if (t?.filterMode === "every")
2426
- continue e;
2427
- }
2428
- } else
2429
- v = l(r, a, r), v !== -1 && v !== !1 && (m.title = Ht(v, a));
2430
- const h = Object.keys(m).length, p = Object.keys(c).length;
2431
- if (!h && !p || t?.filterMode === "union" && p !== s && !h || t?.filterMode === "intersection" && (p !== s || !h && s > 0 && !y)) continue;
2432
- }
2433
- i.length && (n.push(...i), i = []), n.push({
2434
- index: o,
2435
- matches: {
2436
- ...m,
2437
- ...c
2438
- }
2439
- });
2440
- }
2441
- return n;
2442
- }
2443
- function hn(e, a, t, n) {
2444
- const l = ee([]), u = ee(/* @__PURE__ */ new Map()), s = I(() => n?.transform ? M(a).map((o) => [o, n.transform(o)]) : M(a));
2445
- zt(() => {
2446
- const o = typeof t == "function" ? t() : M(t), r = typeof o != "string" && typeof o != "number" ? "" : String(o), d = ja(s.value, r, {
2447
- customKeyFilter: {
2448
- ...e.customKeyFilter,
2449
- ...M(n?.customKeyFilter)
2450
- },
2451
- default: e.customFilter,
2452
- filterKeys: e.filterKeys,
2453
- filterMode: e.filterMode,
2454
- noFilter: e.noFilter
2455
- }), c = M(a), m = [], v = /* @__PURE__ */ new Map();
2456
- d.forEach((y) => {
2457
- let {
2458
- index: h,
2459
- matches: p
2460
- } = y;
2461
- const w = c[h];
2462
- m.push(w), v.set(w.value, p);
2463
- }), l.value = m, u.value = v;
2464
- });
2465
- function i(o) {
2466
- return u.value.get(o.value);
2467
- }
2468
- return {
2469
- filteredItems: l,
2470
- filteredMatches: u,
2471
- getMatches: i
2472
- };
2473
- }
2474
- function bn(e, a, t) {
2475
- return t == null || !t.length ? a : t.map((n, l) => {
2476
- const u = l === 0 ? 0 : t[l - 1][1], s = [b("span", {
2477
- class: re(`${e}__unmask`)
2478
- }, [a.slice(u, n[0])]), b("span", {
2479
- class: re(`${e}__mask`)
2480
- }, [a.slice(n[0], n[1])])];
2481
- return l === t.length - 1 && s.push(b("span", {
2482
- class: re(`${e}__unmask`)
2483
- }, [a.slice(n[1])])), b(ce, null, [s]);
2484
- });
2485
- }
2486
- const Ga = X({
2487
- closeText: {
2488
- type: String,
2489
- default: "$vuetify.close"
2490
- },
2491
- openText: {
2492
- type: String,
2493
- default: "$vuetify.open"
2494
- }
2495
- }, "autocomplete");
2496
- function pn(e, a) {
2497
- const t = Xe(), n = I(() => `menu-${t}`), l = E(() => Ut(a)), u = E(() => n.value);
2498
- return {
2499
- menuId: n,
2500
- ariaExpanded: l,
2501
- ariaControls: u
2502
- };
2503
- }
2504
- const kn = X({
2505
- chips: Boolean,
2506
- closableChips: Boolean,
2507
- eager: Boolean,
2508
- hideNoData: Boolean,
2509
- hideSelected: Boolean,
2510
- listProps: {
2511
- type: Object
2512
- },
2513
- menu: Boolean,
2514
- menuIcon: {
2515
- type: he,
2516
- default: "$dropdown"
2517
- },
2518
- menuProps: {
2519
- type: Object
2520
- },
2521
- multiple: Boolean,
2522
- noDataText: {
2523
- type: String,
2524
- default: "$vuetify.noDataText"
2525
- },
2526
- openOnClear: Boolean,
2527
- itemColor: String,
2528
- noAutoScroll: Boolean,
2529
- ...Ga(),
2530
- ...Kn({
2531
- itemChildren: !1
2532
- })
2533
- }, "Select"), Wa = X({
2534
- search: String,
2535
- ...yn({
2536
- filterKeys: ["title"]
2537
- }),
2538
- ...kn(),
2539
- ...Ye(Mt({
2540
- modelValue: null,
2541
- role: "combobox"
2542
- }), ["validationValue", "dirty"]),
2543
- ...Bt({
2544
- transition: {
2545
- component: Jl
2546
- }
2547
- })
2548
- }, "VSelect"), Bo = ie()({
2549
- name: "VSelect",
2550
- props: Wa(),
2551
- emits: {
2552
- "update:focused": (e) => !0,
2553
- "update:modelValue": (e) => !0,
2554
- "update:menu": (e) => !0,
2555
- "update:search": (e) => !0
2556
- },
2557
- setup(e, a) {
2558
- let {
2559
- slots: t
2560
- } = a;
2561
- const {
2562
- t: n
2563
- } = it(), l = j(), u = j(), s = j(), i = j(), o = j(), {
2564
- items: r,
2565
- transformIn: d,
2566
- transformOut: c
2567
- } = jl(e), m = Ve(e, "search", ""), {
2568
- filteredItems: v,
2569
- getMatches: y
2570
- } = hn(e, r, () => m.value), h = Ve(e, "modelValue", [], (x) => d(x === null ? [null] : Te(x)), (x) => {
2571
- const Q = c(x);
2572
- return e.multiple ? Q : Q[0] ?? null;
2573
- }), p = I(() => typeof e.counterValue == "function" ? e.counterValue(h.value) : typeof e.counterValue == "number" ? e.counterValue : h.value.length), w = $t(e), P = vn(e), C = I(() => h.value.map((x) => x.value)), F = ee(!1), B = E(() => e.closableChips && !w.isReadonly.value && !w.isDisabled.value), {
2574
- InputIcon: U
2575
- } = Ot(e);
2576
- let _ = "", V = 0, $;
2577
- const D = I(() => {
2578
- const x = m.value ? v.value : r.value;
2579
- return e.hideSelected ? x.filter((Q) => !h.value.some((te) => (e.valueComparator || qe)(te, Q))) : x;
2580
- }), G = I(() => e.hideNoData && !D.value.length || w.isReadonly.value || w.isDisabled.value), ne = Ve(e, "menu"), H = I({
2581
- get: () => ne.value,
2582
- set: (x) => {
2583
- ne.value && !x && u.value?.ΨopenChildren.size || x && G.value || (ne.value = x);
2584
- }
2585
- }), {
2586
- menuId: W,
2587
- ariaExpanded: K,
2588
- ariaControls: ue
2589
- } = pn(e, H), q = I(() => ({
2590
- ...e.menuProps,
2591
- activatorProps: {
2592
- ...e.menuProps?.activatorProps || {},
2593
- "aria-haspopup": "listbox"
2594
- // Set aria-haspopup to 'listbox'
2595
- }
2596
- })), z = j(), fe = mn(z, l), {
2597
- onTabKeydown: R
2598
- } = gn({
2599
- groups: [{
2600
- type: "element",
2601
- contentRef: s
2602
- }, {
2603
- type: "list",
2604
- contentRef: z,
2605
- displayItemsCount: () => D.value.length
2606
- }, {
2607
- type: "element",
2608
- contentRef: i
2609
- }],
2610
- onLeave: () => {
2611
- H.value = !1, l.value?.focus();
2612
- }
2613
- });
2614
- function O(x) {
2615
- e.openOnClear && (H.value = !0);
2616
- }
2617
- function k() {
2618
- G.value || (H.value = !H.value);
2619
- }
2620
- function f(x) {
2621
- x.key === "Tab" && R(x), z.value?.$el.contains(x.target) && wt(x) && A(x);
2622
- }
2623
- function A(x) {
2624
- if (!x.key || w.isReadonly.value) return;
2625
- if (["Enter", " ", "ArrowDown", "ArrowUp", "Home", "End"].includes(x.key) && x.preventDefault(), ["Enter", "ArrowDown", " "].includes(x.key) && (H.value = !0), ["Escape", "Tab"].includes(x.key) && (H.value = !1), e.clearable && x.key === "Backspace") {
2626
- x.preventDefault(), h.value = [], O();
2627
- return;
2628
- }
2629
- x.key === "Home" ? z.value?.focus("first") : x.key === "End" && z.value?.focus("last");
2630
- const Q = 1e3;
2631
- if (!wt(x)) return;
2632
- const te = performance.now();
2633
- te - $ > Q && (_ = "", V = 0), _ += x.key.toLowerCase(), $ = te;
2634
- const Be = D.value;
2635
- function _e() {
2636
- let T = we();
2637
- return T || _.at(-1) === _.at(-2) && (_ = _.slice(0, -1), V++, T = we(), T) || (V = 0, T = we(), T) ? T : (_ = x.key.toLowerCase(), we());
2638
- }
2639
- function we() {
2640
- for (let T = V; T < Be.length; T++) {
2641
- const le = Be[T];
2642
- if (le.title.toLowerCase().startsWith(_))
2643
- return [le, T];
2644
- }
2645
- }
2646
- const S = _e();
2647
- if (!S) return;
2648
- const [Y, N] = S;
2649
- V = N, z.value?.focus(N), e.multiple || (h.value = [Y]);
2650
- }
2651
- function J(x) {
2652
- let Q = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0;
2653
- if (!x.props.disabled)
2654
- if (e.multiple) {
2655
- const te = h.value.findIndex((_e) => (e.valueComparator || qe)(_e.value, x.value)), Be = Q ?? !~te;
2656
- if (~te) {
2657
- const _e = Be ? [...h.value, x] : [...h.value];
2658
- _e.splice(te, 1), h.value = _e;
2659
- } else Be && (h.value = [...h.value, x]);
2660
- } else {
2661
- const te = Q !== !1;
2662
- h.value = te ? [x] : [], ke(() => {
2663
- H.value = !1;
2664
- });
2665
- }
2666
- }
2667
- function ve(x) {
2668
- const Q = x.target;
2669
- l.value?.$el.contains(Q) || (H.value = !1);
2670
- }
2671
- function ge() {
2672
- return D.value.findIndex((x) => h.value.some((Q) => (e.valueComparator || qe)(Q.value, x.value)));
2673
- }
2674
- function pe() {
2675
- if (!h.value.length) return -1;
2676
- const x = e.valueComparator || qe;
2677
- let Q = 0;
2678
- for (const te of D.value) {
2679
- if (h.value.some((_e) => x(_e.value, te.value))) return te.props.disabled ? -1 : Q;
2680
- te.props.disabled || Q++;
2681
- }
2682
- return -1;
2683
- }
2684
- function Ie() {
2685
- if (e.eager && o.value?.calculateVisibleItems(), z.value && F.value) {
2686
- const x = pe();
2687
- z.value.focus(x >= 0 ? x : "first");
2688
- }
2689
- }
2690
- function De() {
2691
- m.value = "", F.value && l.value?.focus();
2692
- }
2693
- function je(x) {
2694
- F.value = !0;
2695
- }
2696
- function Qe(x) {
2697
- l.value?.$el.contains(x.relatedTarget) || (F.value = !1);
2698
- }
2699
- function ut(x) {
2700
- if (x == null) h.value = [];
2701
- else if (dt(l.value, ":autofill") || dt(l.value, ":-webkit-autofill")) {
2702
- const Q = r.value.find((te) => te.title === x);
2703
- Q && J(Q);
2704
- } else l.value && (l.value.value = "");
2705
- }
2706
- return se(H, () => {
2707
- if (!e.hideSelected && H.value && h.value.length) {
2708
- const x = ge();
2709
- ct && !e.noAutoScroll && window.requestAnimationFrame(() => {
2710
- x >= 0 && o.value?.scrollToIndex(x);
2711
- });
2712
- }
2713
- }), se(r, (x, Q) => {
2714
- H.value || F.value && e.hideNoData && !Q.length && x.length && (H.value = !0);
2715
- }), de(() => {
2716
- const x = !!(e.chips || t.chip), Q = !!(!e.hideNoData || D.value.length || t["prepend-item"] || t["append-item"] || t["no-data"]), te = h.value.length > 0, Be = Je.filterProps(e), _e = te || !F.value && e.label && !e.persistentPlaceholder ? void 0 : e.placeholder, we = {
2717
- search: m,
2718
- filteredItems: v.value
2719
- };
2720
- return g(Je, L({
2721
- ref: l
2722
- }, Be, {
2723
- modelValue: h.value.map((S) => S.props.title).join(", "),
2724
- name: void 0,
2725
- "onUpdate:modelValue": ut,
2726
- focused: F.value,
2727
- "onUpdate:focused": (S) => F.value = S,
2728
- validationValue: h.externalValue,
2729
- counterValue: p.value,
2730
- dirty: te,
2731
- class: ["v-select", {
2732
- "v-select--active-menu": H.value,
2733
- "v-select--chips": !!e.chips,
2734
- [`v-select--${e.multiple ? "multiple" : "single"}`]: !0,
2735
- "v-select--selected": h.value.length,
2736
- "v-select--selection-slot": !!t.selection
2737
- }, e.class],
2738
- style: e.style,
2739
- inputmode: "none",
2740
- placeholder: _e,
2741
- "onClick:clear": O,
2742
- "onMousedown:control": k,
2743
- onBlur: ve,
2744
- onKeydown: A,
2745
- "aria-expanded": K.value,
2746
- "aria-controls": ue.value
2747
- }), {
2748
- ...t,
2749
- default: (S) => {
2750
- let {
2751
- id: Y
2752
- } = S;
2753
- return b(ce, null, [b("select", {
2754
- hidden: !0,
2755
- multiple: e.multiple,
2756
- name: P.fieldName.value
2757
- }, [r.value.map((N) => b("option", {
2758
- key: N.value,
2759
- value: N.value,
2760
- selected: C.value.includes(N.value)
2761
- }, null))]), g(Gl, L({
2762
- id: W.value,
2763
- ref: u,
2764
- modelValue: H.value,
2765
- "onUpdate:modelValue": (N) => H.value = N,
2766
- activator: "parent",
2767
- contentClass: "v-select__content",
2768
- disabled: G.value,
2769
- eager: e.eager,
2770
- maxHeight: 310,
2771
- openOnClick: !1,
2772
- closeOnContentClick: !1,
2773
- transition: e.transition,
2774
- onAfterEnter: Ie,
2775
- onAfterLeave: De
2776
- }, q.value), {
2777
- default: () => [g(il, {
2778
- onFocusin: je,
2779
- onFocusout: Qe,
2780
- onKeydown: f
2781
- }, {
2782
- default: () => [t["menu-header"] && b("header", {
2783
- ref: s
2784
- }, [t["menu-header"](we)]), Q && g(al, L({
2785
- key: "select-list",
2786
- ref: z,
2787
- selected: C.value,
2788
- selectStrategy: e.multiple ? "independent" : "single-independent",
2789
- tabindex: "-1",
2790
- selectable: !!D.value.length,
2791
- "aria-live": "polite",
2792
- "aria-labelledby": `${Y.value}-label`,
2793
- "aria-multiselectable": e.multiple,
2794
- color: e.itemColor ?? e.color
2795
- }, fe, e.listProps), {
2796
- default: () => [t["prepend-item"]?.(), !D.value.length && !e.hideNoData && (t["no-data"]?.() ?? g(vt, {
2797
- key: "no-data",
2798
- title: n(e.noDataText)
2799
- }, null)), g(fn, {
2800
- ref: o,
2801
- renderless: !0,
2802
- items: D.value,
2803
- itemKey: "value"
2804
- }, {
2805
- default: (N) => {
2806
- let {
2807
- item: T,
2808
- index: le,
2809
- itemRef: Re
2810
- } = N;
2811
- const ae = Un(T.props), Z = L(T.props, {
2812
- ref: Re,
2813
- key: T.value,
2814
- onClick: () => J(T, null),
2815
- "aria-posinset": le + 1,
2816
- "aria-setsize": D.value.length
2817
- });
2818
- return T.type === "divider" ? t.divider?.({
2819
- props: T.raw,
2820
- index: le
2821
- }) ?? g(ze, L(T.props, {
2822
- key: `divider-${le}`
2823
- }), null) : T.type === "subheader" ? t.subheader?.({
2824
- props: T.raw,
2825
- index: le
2826
- }) ?? g(Wl, L(T.props, {
2827
- key: `subheader-${le}`
2828
- }), null) : t.item?.({
2829
- item: T,
2830
- index: le,
2831
- props: Z
2832
- }) ?? g(vt, L(Z, {
2833
- role: "option"
2834
- }), {
2835
- prepend: (me) => {
2836
- let {
2837
- isSelected: Ze
2838
- } = me;
2839
- return b(ce, null, [e.multiple && !e.hideSelected ? g(un, {
2840
- key: T.value,
2841
- modelValue: Ze,
2842
- ripple: !1,
2843
- tabindex: "-1",
2844
- "aria-hidden": !0,
2845
- onClick: (Ge) => Ge.preventDefault()
2846
- }, null) : void 0, ae.prependAvatar && g(nt, {
2847
- image: ae.prependAvatar
2848
- }, null), ae.prependIcon && g(Se, {
2849
- icon: ae.prependIcon
2850
- }, null)]);
2851
- },
2852
- title: () => m.value ? bn("v-select", T.title, y(T)?.title) : T.title
2853
- });
2854
- }
2855
- }), t["append-item"]?.()]
2856
- }), t["menu-footer"] && b("footer", {
2857
- ref: i
2858
- }, [t["menu-footer"](we)])]
2859
- })]
2860
- }), h.value.map((N, T) => {
2861
- function le(me) {
2862
- me.stopPropagation(), me.preventDefault(), J(N, !1);
2863
- }
2864
- const Re = L(mt.filterProps(N.props), {
2865
- "onClick:close": le,
2866
- onKeydown(me) {
2867
- me.key !== "Enter" && me.key !== " " || (me.preventDefault(), me.stopPropagation(), le(me));
2868
- },
2869
- onMousedown(me) {
2870
- me.preventDefault(), me.stopPropagation();
2871
- },
2872
- modelValue: !0,
2873
- "onUpdate:modelValue": void 0
2874
- }), ae = x ? !!t.chip : !!t.selection, Z = ae ? ql(x ? t.chip({
2875
- item: N,
2876
- index: T,
2877
- props: Re
2878
- }) : t.selection({
2879
- item: N,
2880
- index: T
2881
- })) : void 0;
2882
- if (!(ae && !Z))
2883
- return b("div", {
2884
- key: N.value,
2885
- class: "v-select__selection"
2886
- }, [x ? t.chip ? g(Fe, {
2887
- key: "chip-defaults",
2888
- defaults: {
2889
- VChip: {
2890
- closable: B.value,
2891
- size: "small",
2892
- text: N.title
2893
- }
2894
- }
2895
- }, {
2896
- default: () => [Z]
2897
- }) : g(mt, L({
2898
- key: "chip",
2899
- closable: B.value,
2900
- size: "small",
2901
- text: N.title,
2902
- disabled: N.props.disabled
2903
- }, Re), null) : Z ?? b("span", {
2904
- class: "v-select__selection-text"
2905
- }, [N.title, e.multiple && T < h.value.length - 1 && b("span", {
2906
- class: "v-select__selection-comma"
2907
- }, [Sl(",")])])]);
2908
- })]);
2909
- },
2910
- "append-inner": function() {
2911
- for (var S = arguments.length, Y = new Array(S), N = 0; N < S; N++)
2912
- Y[N] = arguments[N];
2913
- return b(ce, null, [t["append-inner"]?.(...Y), e.menuIcon ? g(Se, {
2914
- class: "v-select__menu-icon",
2915
- color: l.value?.fieldIconColor,
2916
- icon: e.menuIcon,
2917
- "aria-hidden": !0
2918
- }, null) : void 0, e.appendInnerIcon && g(U, {
2919
- key: "append-icon",
2920
- name: "appendInner",
2921
- color: Y[0].iconColor.value
2922
- }, null)]);
2923
- }
2924
- });
2925
- }), St({
2926
- isFocused: F,
2927
- menu: H,
2928
- search: m,
2929
- filteredItems: v,
2930
- select: J
2931
- }, l);
2932
- }
2933
- }), qa = X({
2934
- autoSelectFirst: {
2935
- type: [Boolean, String]
2936
- },
2937
- clearOnSelect: Boolean,
2938
- search: String,
2939
- ...yn({
2940
- filterKeys: ["title"]
2941
- }),
2942
- ...kn(),
2943
- ...Ye(Mt({
2944
- modelValue: null,
2945
- role: "combobox"
2946
- }), ["validationValue", "dirty"])
2947
- }, "VAutocomplete"), Ja = ie()({
2948
- name: "VAutocomplete",
2949
- props: qa(),
2950
- emits: {
2951
- "update:focused": (e) => !0,
2952
- "update:search": (e) => !0,
2953
- "update:modelValue": (e) => !0,
2954
- "update:menu": (e) => !0
2955
- },
2956
- setup(e, a) {
2957
- let {
2958
- slots: t
2959
- } = a;
2960
- const {
2961
- t: n
2962
- } = it(), l = j(), u = ee(!1), s = ee(!0), i = ee(!1), o = j(), r = j(), d = ee(-1), c = ee(null), {
2963
- items: m,
2964
- transformIn: v,
2965
- transformOut: y
2966
- } = jl(e), {
2967
- textColorClasses: h,
2968
- textColorStyles: p
2969
- } = kt(() => l.value?.color), {
2970
- InputIcon: w
2971
- } = Ot(e), P = Ve(e, "search", ""), C = Ve(e, "modelValue", [], (S) => v(S === null ? [null] : Te(S)), (S) => {
2972
- const Y = y(S);
2973
- return e.multiple ? Y : Y[0] ?? null;
2974
- }), F = I(() => typeof e.counterValue == "function" ? e.counterValue(C.value) : typeof e.counterValue == "number" ? e.counterValue : C.value.length), B = $t(e), {
2975
- filteredItems: U,
2976
- getMatches: _
2977
- } = hn(e, m, () => c.value ?? (s.value ? "" : P.value)), V = I(() => e.hideSelected && c.value === null ? U.value.filter((S) => !C.value.some((Y) => Y.value === S.value)) : U.value), $ = E(() => e.closableChips && !B.isReadonly.value && !B.isDisabled.value), D = I(() => !!(e.chips || t.chip)), G = I(() => D.value || !!t.selection), ne = I(() => C.value.map((S) => S.props.value)), H = I(() => V.value.find((S) => S.type === "item" && !S.props.disabled)), W = I(() => (e.autoSelectFirst === !0 || e.autoSelectFirst === "exact" && P.value === H.value?.title) && V.value.length > 0 && !s.value && !i.value), K = I(() => e.hideNoData && !V.value.length || B.isReadonly.value || B.isDisabled.value), ue = Ve(e, "menu"), q = I({
2978
- get: () => ue.value,
2979
- set: (S) => {
2980
- ue.value && !S && o.value?.ΨopenChildren.size || S && K.value || (ue.value = S);
2981
- }
2982
- }), {
2983
- menuId: z,
2984
- ariaExpanded: fe,
2985
- ariaControls: R
2986
- } = pn(e, q), O = j(), k = j(), f = j(), A = mn(O, l), {
2987
- onTabKeydown: J
2988
- } = gn({
2989
- groups: [{
2990
- type: "element",
2991
- contentRef: k
2992
- }, {
2993
- type: "list",
2994
- contentRef: O,
2995
- displayItemsCount: () => V.value.length
2996
- }, {
2997
- type: "element",
2998
- contentRef: f
2999
- }],
3000
- onLeave: () => {
3001
- q.value = !1, l.value?.focus();
3002
- }
3003
- });
3004
- function ve(S) {
3005
- e.openOnClear && (q.value = !0), P.value = "";
3006
- }
3007
- function ge() {
3008
- K.value || (q.value = !0);
3009
- }
3010
- function pe(S) {
3011
- K.value || (u.value && (S.preventDefault(), S.stopPropagation()), q.value = !q.value);
3012
- }
3013
- function Ie(S) {
3014
- S.key === "Tab" && J(S), O.value?.$el.contains(S.target) && (wt(S) || S.key === "Backspace") && l.value?.focus();
3015
- }
3016
- function De(S) {
3017
- if (B.isReadonly.value) return;
3018
- const Y = l.value?.selectionStart, N = C.value.length;
3019
- if (["Enter", "ArrowDown", "ArrowUp"].includes(S.key) && S.preventDefault(), ["Enter", "ArrowDown"].includes(S.key) && (q.value = !0), ["Escape"].includes(S.key) && (q.value = !1), W.value && ["Enter", "Tab"].includes(S.key) && H.value && !C.value.some((T) => {
3020
- let {
3021
- value: le
3022
- } = T;
3023
- return le === H.value.value;
3024
- }) && we(H.value), S.key === "ArrowDown" && W.value && O.value?.focus("next"), ["Backspace", "Delete"].includes(S.key)) {
3025
- if (!e.multiple && G.value && C.value.length > 0 && !P.value) return we(C.value[0], !1);
3026
- if (~d.value) {
3027
- S.preventDefault();
3028
- const T = d.value;
3029
- we(C.value[d.value], !1), d.value = T >= N - 1 ? N - 2 : T;
3030
- } else S.key === "Backspace" && !P.value && (d.value = N - 1);
3031
- return;
3032
- }
3033
- if (e.multiple)
3034
- if (S.key === "ArrowLeft") {
3035
- if (d.value < 0 && Y && Y > 0) return;
3036
- const T = d.value > -1 ? d.value - 1 : N - 1;
3037
- if (C.value[T])
3038
- d.value = T;
3039
- else {
3040
- const le = P.value?.length ?? null;
3041
- d.value = -1, l.value?.setSelectionRange(le, le);
3042
- }
3043
- } else if (S.key === "ArrowRight") {
3044
- if (d.value < 0) return;
3045
- const T = d.value + 1;
3046
- C.value[T] ? d.value = T : (d.value = -1, l.value?.setSelectionRange(0, 0));
3047
- } else ~d.value && wt(S) && (d.value = -1);
3048
- }
3049
- function je(S) {
3050
- if (dt(l.value, ":autofill") || dt(l.value, ":-webkit-autofill")) {
3051
- const Y = m.value.find((N) => N.title === S.target.value);
3052
- Y && we(Y);
3053
- }
3054
- }
3055
- function Qe() {
3056
- e.eager && r.value?.calculateVisibleItems();
3057
- }
3058
- function ut() {
3059
- u.value && (s.value = !0, l.value?.focus()), c.value = null;
3060
- }
3061
- function x(S) {
3062
- u.value = !0, setTimeout(() => {
3063
- i.value = !0;
3064
- });
3065
- }
3066
- function Q(S) {
3067
- i.value = !1, l.value?.$el.contains(S.relatedTarget) || (u.value = !1);
3068
- }
3069
- function te(S) {
3070
- (S == null || S === "" && !e.multiple && !G.value) && (C.value = []);
3071
- }
3072
- function Be(S) {
3073
- o.value?.contentEl?.contains(S.relatedTarget) && (u.value = !0);
3074
- }
3075
- const _e = ee(!1);
3076
- function we(S) {
3077
- let Y = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0;
3078
- if (!(!S || S.props.disabled))
3079
- if (e.multiple) {
3080
- const N = C.value.findIndex((le) => (e.valueComparator || qe)(le.value, S.value)), T = Y ?? !~N;
3081
- if (~N) {
3082
- const le = T ? [...C.value, S] : [...C.value];
3083
- le.splice(N, 1), C.value = le;
3084
- } else T && (C.value = [...C.value, S]);
3085
- e.clearOnSelect && (P.value = "");
3086
- } else {
3087
- const N = Y !== !1;
3088
- C.value = N ? [S] : [], c.value = s.value ? "" : P.value ?? "", P.value = N && !G.value ? S.title : "", ke(() => {
3089
- q.value = !1, s.value = !0;
3090
- });
3091
- }
3092
- }
3093
- return se(u, (S, Y) => {
3094
- S !== Y && (S ? (_e.value = !0, P.value = e.multiple || G.value ? "" : String(C.value.at(-1)?.props.title ?? ""), s.value = !0, ke(() => _e.value = !1)) : (!e.multiple && P.value == null && (C.value = []), q.value = !1, !s.value && P.value && (c.value = P.value), P.value = "", d.value = -1));
3095
- }), se(P, (S) => {
3096
- !u.value || _e.value || (S && (q.value = !0), s.value = !S);
3097
- }), se(q, (S) => {
3098
- if (!e.hideSelected && S && C.value.length && s.value) {
3099
- const Y = V.value.findIndex((N) => C.value.some((T) => N.value === T.value));
3100
- ct && window.requestAnimationFrame(() => {
3101
- Y >= 0 && r.value?.scrollToIndex(Y);
3102
- });
3103
- }
3104
- S && (c.value = null);
3105
- }), se(m, (S, Y) => {
3106
- q.value || u.value && !Y.length && S.length && (q.value = !0);
3107
- }), de(() => {
3108
- const S = !!(!e.hideNoData || V.value.length || t["prepend-item"] || t["append-item"] || t["no-data"]), Y = C.value.length > 0, N = Je.filterProps(e), T = {
3109
- search: P,
3110
- filteredItems: U.value
3111
- };
3112
- return g(Je, L({
3113
- ref: l
3114
- }, N, {
3115
- modelValue: P.value,
3116
- "onUpdate:modelValue": [(le) => P.value = le, te],
3117
- focused: u.value,
3118
- "onUpdate:focused": (le) => u.value = le,
3119
- validationValue: C.externalValue,
3120
- counterValue: F.value,
3121
- dirty: Y,
3122
- onChange: je,
3123
- class: ["v-autocomplete", `v-autocomplete--${e.multiple ? "multiple" : "single"}`, {
3124
- "v-autocomplete--active-menu": q.value,
3125
- "v-autocomplete--chips": !!e.chips,
3126
- "v-autocomplete--selection-slot": !!G.value,
3127
- "v-autocomplete--selecting-index": d.value > -1
3128
- }, e.class],
3129
- style: e.style,
3130
- readonly: B.isReadonly.value,
3131
- placeholder: Y ? void 0 : e.placeholder,
3132
- "onClick:clear": ve,
3133
- "onMousedown:control": ge,
3134
- onKeydown: De,
3135
- onBlur: Be,
3136
- "aria-expanded": fe.value,
3137
- "aria-controls": R.value
3138
- }), {
3139
- ...t,
3140
- default: (le) => {
3141
- let {
3142
- id: Re
3143
- } = le;
3144
- return b(ce, null, [g(Gl, L({
3145
- id: z.value,
3146
- ref: o,
3147
- modelValue: q.value,
3148
- "onUpdate:modelValue": (ae) => q.value = ae,
3149
- activator: "parent",
3150
- contentClass: "v-autocomplete__content",
3151
- disabled: K.value,
3152
- eager: e.eager,
3153
- maxHeight: 310,
3154
- openOnClick: !1,
3155
- closeOnContentClick: !1,
3156
- onAfterEnter: Qe,
3157
- onAfterLeave: ut
3158
- }, e.menuProps), {
3159
- default: () => [g(il, {
3160
- onFocusin: x,
3161
- onKeydown: Ie
3162
- }, {
3163
- default: () => [t["menu-header"] && b("header", {
3164
- ref: k
3165
- }, [t["menu-header"](T)]), S && g(al, L({
3166
- key: "autocomplete-list",
3167
- ref: O,
3168
- filterable: !0,
3169
- selected: ne.value,
3170
- selectStrategy: e.multiple ? "independent" : "single-independent",
3171
- onMousedown: (ae) => ae.preventDefault(),
3172
- onFocusout: Q,
3173
- tabindex: "-1",
3174
- selectable: !!V.value.length,
3175
- "aria-live": "polite",
3176
- "aria-labelledby": `${Re.value}-label`,
3177
- "aria-multiselectable": e.multiple,
3178
- color: e.itemColor ?? e.color
3179
- }, A, e.listProps), {
3180
- default: () => [t["prepend-item"]?.(), !V.value.length && !e.hideNoData && (t["no-data"]?.() ?? g(vt, {
3181
- key: "no-data",
3182
- title: n(e.noDataText)
3183
- }, null)), g(fn, {
3184
- ref: r,
3185
- renderless: !0,
3186
- items: V.value,
3187
- itemKey: "value"
3188
- }, {
3189
- default: (ae) => {
3190
- let {
3191
- item: Z,
3192
- index: me,
3193
- itemRef: Ze
3194
- } = ae;
3195
- const Ge = L(Z.props, {
3196
- ref: Ze,
3197
- key: Z.value,
3198
- active: W.value && Z === H.value ? !0 : void 0,
3199
- onClick: () => we(Z, null),
3200
- "aria-posinset": me + 1,
3201
- "aria-setsize": V.value.length
3202
- });
3203
- return Z.type === "divider" ? t.divider?.({
3204
- props: Z.raw,
3205
- index: me
3206
- }) ?? g(ze, L(Z.props, {
3207
- key: `divider-${me}`
3208
- }), null) : Z.type === "subheader" ? t.subheader?.({
3209
- props: Z.raw,
3210
- index: me
3211
- }) ?? g(Wl, L(Z.props, {
3212
- key: `subheader-${me}`
3213
- }), null) : t.item?.({
3214
- item: Z,
3215
- index: me,
3216
- props: Ge
3217
- }) ?? g(vt, L(Ge, {
3218
- role: "option"
3219
- }), {
3220
- prepend: (st) => {
3221
- let {
3222
- isSelected: Ae
3223
- } = st;
3224
- return b(ce, null, [e.multiple && !e.hideSelected ? g(un, {
3225
- key: Z.value,
3226
- modelValue: Ae,
3227
- ripple: !1,
3228
- tabindex: "-1",
3229
- "aria-hidden": !0,
3230
- onClick: (In) => In.preventDefault()
3231
- }, null) : void 0, Z.props.prependAvatar && g(nt, {
3232
- image: Z.props.prependAvatar
3233
- }, null), Z.props.prependIcon && g(Se, {
3234
- icon: Z.props.prependIcon
3235
- }, null)]);
3236
- },
3237
- title: () => s.value ? Z.title : bn("v-autocomplete", Z.title, _(Z)?.title)
3238
- });
3239
- }
3240
- }), t["append-item"]?.()]
3241
- }), t["menu-footer"] && b("footer", {
3242
- ref: f
3243
- }, [t["menu-footer"](T)])]
3244
- })]
3245
- }), C.value.map((ae, Z) => {
3246
- function me(Ae) {
3247
- Ae.stopPropagation(), Ae.preventDefault(), we(ae, !1);
3248
- }
3249
- const Ze = L(mt.filterProps(ae.props), {
3250
- "onClick:close": me,
3251
- onKeydown(Ae) {
3252
- Ae.key !== "Enter" && Ae.key !== " " || (Ae.preventDefault(), Ae.stopPropagation(), me(Ae));
3253
- },
3254
- onMousedown(Ae) {
3255
- Ae.preventDefault(), Ae.stopPropagation();
3256
- },
3257
- modelValue: !0,
3258
- "onUpdate:modelValue": void 0
3259
- }), Ge = D.value ? !!t.chip : !!t.selection, st = Ge ? ql(D.value ? t.chip({
3260
- item: ae,
3261
- index: Z,
3262
- props: Ze
3263
- }) : t.selection({
3264
- item: ae,
3265
- index: Z
3266
- })) : void 0;
3267
- if (!(Ge && !st))
3268
- return b("div", {
3269
- key: ae.value,
3270
- class: re(["v-autocomplete__selection", Z === d.value && ["v-autocomplete__selection--selected", h.value]]),
3271
- style: xe(Z === d.value ? p.value : {})
3272
- }, [D.value ? t.chip ? g(Fe, {
3273
- key: "chip-defaults",
3274
- defaults: {
3275
- VChip: {
3276
- closable: $.value,
3277
- size: "small",
3278
- text: ae.title
3279
- }
3280
- }
3281
- }, {
3282
- default: () => [st]
3283
- }) : g(mt, L({
3284
- key: "chip",
3285
- closable: $.value,
3286
- size: "small",
3287
- text: ae.title,
3288
- disabled: ae.props.disabled
3289
- }, Ze), null) : st ?? b("span", {
3290
- class: "v-autocomplete__selection-text"
3291
- }, [ae.title, e.multiple && Z < C.value.length - 1 && b("span", {
3292
- class: "v-autocomplete__selection-comma"
3293
- }, [Sl(",")])])]);
3294
- })]);
3295
- },
3296
- "append-inner": function() {
3297
- for (var le = arguments.length, Re = new Array(le), ae = 0; ae < le; ae++)
3298
- Re[ae] = arguments[ae];
3299
- return b(ce, null, [t["append-inner"]?.(...Re), e.menuIcon ? g(Se, {
3300
- class: "v-autocomplete__menu-icon",
3301
- color: l.value?.fieldIconColor,
3302
- icon: e.menuIcon,
3303
- onMousedown: pe,
3304
- onClick: jn,
3305
- "aria-hidden": !0,
3306
- tabindex: "-1"
3307
- }, null) : void 0, e.appendInnerIcon && g(w, {
3308
- key: "append-icon",
3309
- name: "appendInner",
3310
- color: Re[0].iconColor.value
3311
- }, null)]);
3312
- }
3313
- });
3314
- }), St({
3315
- isFocused: u,
3316
- isPristine: s,
3317
- menu: q,
3318
- search: P,
3319
- filteredItems: U,
3320
- select: we
3321
- }, l);
3322
- }
3323
- }), Xa = X({
3324
- bordered: Boolean,
3325
- color: String,
3326
- content: [Number, String],
3327
- dot: Boolean,
3328
- floating: Boolean,
3329
- icon: he,
3330
- inline: Boolean,
3331
- label: {
3332
- type: String,
3333
- default: "$vuetify.badge"
3334
- },
3335
- max: [Number, String],
3336
- modelValue: {
3337
- type: Boolean,
3338
- default: !0
3339
- },
3340
- offsetX: [Number, String],
3341
- offsetY: [Number, String],
3342
- textColor: String,
3343
- ...be(),
3344
- ...ll({
3345
- location: "top end"
3346
- }),
3347
- ...yt(),
3348
- ...Oe(),
3349
- ...He(),
3350
- ...Bt({
3351
- transition: "scale-rotate-transition"
3352
- }),
3353
- ...pt()
3354
- }, "VBadge"), Ya = ie()({
3355
- name: "VBadge",
3356
- inheritAttrs: !1,
3357
- props: Xa(),
3358
- setup(e, a) {
3359
- const {
3360
- backgroundColorClasses: t,
3361
- backgroundColorStyles: n
3362
- } = Tt(() => e.color), {
3363
- roundedClasses: l
3364
- } = gt(e), {
3365
- t: u
3366
- } = it(), {
3367
- textColorClasses: s,
3368
- textColorStyles: i
3369
- } = kt(() => e.textColor), {
3370
- themeClasses: o
3371
- } = Gn(), {
3372
- locationStyles: r
3373
- } = tl(e, !0, (c) => (e.floating ? e.dot ? 2 : 4 : e.dot ? 8 : 12) + (["top", "bottom"].includes(c) ? Number(e.offsetY ?? 0) : ["left", "right"].includes(c) ? Number(e.offsetX ?? 0) : 0)), {
3374
- dimensionStyles: d
3375
- } = bt(e);
3376
- return de(() => {
3377
- const c = Number(e.content), m = !e.max || isNaN(c) ? e.content : c <= Number(e.max) ? c : `${e.max}+`, [v, y] = Wn(a.attrs, ["aria-atomic", "aria-label", "aria-live", "role", "title"]);
3378
- return g(e.tag, L({
3379
- class: ["v-badge", {
3380
- "v-badge--bordered": e.bordered,
3381
- "v-badge--dot": e.dot,
3382
- "v-badge--floating": e.floating,
3383
- "v-badge--inline": e.inline
3384
- }, e.class]
3385
- }, y, {
3386
- style: e.style
3387
- }), {
3388
- default: () => [b("div", {
3389
- class: "v-badge__wrapper"
3390
- }, [a.slots.default?.(), g(nl, {
3391
- transition: e.transition
3392
- }, {
3393
- default: () => [Ue(b("span", L({
3394
- class: ["v-badge__badge", o.value, t.value, l.value, s.value],
3395
- style: [n.value, i.value, d.value, e.inline ? {} : r.value],
3396
- "aria-atomic": "true",
3397
- "aria-label": u(e.label, c),
3398
- "aria-live": "polite",
3399
- role: "status"
3400
- }, v), [e.dot ? void 0 : a.slots.badge ? a.slots.badge?.() : e.icon ? g(Se, {
3401
- icon: e.icon
3402
- }, null) : m]), [[_t, e.modelValue]])]
3403
- })])]
3404
- });
3405
- }), {};
3406
- }
3407
- }), Qa = X({
3408
- fullscreen: Boolean,
3409
- scrollable: Boolean,
3410
- ...Ye(Jn({
3411
- captureFocus: !0,
3412
- origin: "center center",
3413
- scrollStrategy: "block",
3414
- transition: {
3415
- component: Jl
3416
- },
3417
- zIndex: 2400,
3418
- retainFocus: !0
3419
- }), ["disableInitialFocus"])
3420
- }, "VDialog"), Sn = ie()({
3421
- name: "VDialog",
3422
- props: Qa(),
3423
- emits: {
3424
- "update:modelValue": (e) => !0,
3425
- afterEnter: () => !0,
3426
- afterLeave: () => !0
3427
- },
3428
- setup(e, a) {
3429
- let {
3430
- emit: t,
3431
- slots: n
3432
- } = a;
3433
- const l = Ve(e, "modelValue"), {
3434
- scopeId: u
3435
- } = qn(), s = j();
3436
- function i() {
3437
- t("afterEnter"), (e.scrim || e.retainFocus) && s.value?.contentEl && !s.value.contentEl.contains(document.activeElement) && s.value.contentEl.focus({
3438
- preventScroll: !0
3439
- });
3440
- }
3441
- function o() {
3442
- t("afterLeave");
3443
- }
3444
- return se(l, async (r) => {
3445
- r || (await ke(), s.value.activatorEl?.focus({
3446
- preventScroll: !0
3447
- }));
3448
- }), de(() => {
3449
- const r = vl.filterProps(e), d = L({
3450
- "aria-haspopup": "dialog"
3451
- }, e.activatorProps), c = L({
3452
- tabindex: -1
3453
- }, e.contentProps);
3454
- return g(vl, L({
3455
- ref: s,
3456
- class: ["v-dialog", {
3457
- "v-dialog--fullscreen": e.fullscreen,
3458
- "v-dialog--scrollable": e.scrollable
3459
- }, e.class],
3460
- style: e.style
3461
- }, r, {
3462
- modelValue: l.value,
3463
- "onUpdate:modelValue": (m) => l.value = m,
3464
- "aria-modal": "true",
3465
- activatorProps: d,
3466
- contentProps: c,
3467
- height: e.fullscreen ? void 0 : e.height,
3468
- width: e.fullscreen ? void 0 : e.width,
3469
- maxHeight: e.fullscreen ? void 0 : e.maxHeight,
3470
- maxWidth: e.fullscreen ? void 0 : e.maxWidth,
3471
- role: "dialog",
3472
- onAfterEnter: i,
3473
- onAfterLeave: o
3474
- }, u), {
3475
- activator: n.activator,
3476
- default: function() {
3477
- for (var m = arguments.length, v = new Array(m), y = 0; y < m; y++)
3478
- v[y] = arguments[y];
3479
- return g(Fe, {
3480
- root: "VDialog"
3481
- }, {
3482
- default: () => [n.default?.(...v)]
3483
- });
3484
- }
3485
- });
3486
- }), St({}, s);
3487
- }
3488
- }), Za = X({
3489
- ...be(),
3490
- ...Oe()
3491
- }, "VCardActions"), Cn = ie()({
3492
- name: "VCardActions",
3493
- props: Za(),
3494
- setup(e, a) {
3495
- let {
3496
- slots: t
3497
- } = a;
3498
- return Jt({
3499
- VBtn: {
3500
- slim: !0,
3501
- variant: "text"
3502
- }
3503
- }), de(() => g(e.tag, {
3504
- class: re(["v-card-actions", e.class]),
3505
- style: xe(e.style)
3506
- }, t)), {};
3507
- }
3508
- }), eo = X({
3509
- opacity: [Number, String],
3510
- ...be(),
3511
- ...Oe()
3512
- }, "VCardSubtitle"), to = ie()({
3513
- name: "VCardSubtitle",
3514
- props: eo(),
3515
- setup(e, a) {
3516
- let {
3517
- slots: t
3518
- } = a;
3519
- return de(() => g(e.tag, {
3520
- class: re(["v-card-subtitle", e.class]),
3521
- style: xe([{
3522
- "--v-card-subtitle-opacity": e.opacity
3523
- }, e.style])
3524
- }, t)), {};
3525
- }
3526
- }), ul = Xn("v-card-title"), lo = X({
3527
- appendAvatar: String,
3528
- appendIcon: he,
3529
- prependAvatar: String,
3530
- prependIcon: he,
3531
- subtitle: {
3532
- type: [String, Number, Boolean],
3533
- default: void 0
3534
- },
3535
- title: {
3536
- type: [String, Number, Boolean],
3537
- default: void 0
3538
- },
3539
- ...be(),
3540
- ...ht(),
3541
- ...Oe()
3542
- }, "VCardItem"), no = ie()({
3543
- name: "VCardItem",
3544
- props: lo(),
3545
- setup(e, a) {
3546
- let {
3547
- slots: t
3548
- } = a;
3549
- return de(() => {
3550
- const n = !!(e.prependAvatar || e.prependIcon), l = !!(n || t.prepend), u = !!(e.appendAvatar || e.appendIcon), s = !!(u || t.append), i = !!(e.title != null || t.title), o = !!(e.subtitle != null || t.subtitle);
3551
- return g(e.tag, {
3552
- class: re(["v-card-item", e.class]),
3553
- style: xe(e.style)
3554
- }, {
3555
- default: () => [l && b("div", {
3556
- key: "prepend",
3557
- class: "v-card-item__prepend"
3558
- }, [t.prepend ? g(Fe, {
3559
- key: "prepend-defaults",
3560
- disabled: !n,
3561
- defaults: {
3562
- VAvatar: {
3563
- density: e.density,
3564
- image: e.prependAvatar
3565
- },
3566
- VIcon: {
3567
- density: e.density,
3568
- icon: e.prependIcon
3569
- }
3570
- }
3571
- }, t.prepend) : b(ce, null, [e.prependAvatar && g(nt, {
3572
- key: "prepend-avatar",
3573
- density: e.density,
3574
- image: e.prependAvatar
3575
- }, null), e.prependIcon && g(Se, {
3576
- key: "prepend-icon",
3577
- density: e.density,
3578
- icon: e.prependIcon
3579
- }, null)])]), b("div", {
3580
- class: "v-card-item__content"
3581
- }, [i && g(ul, {
3582
- key: "title"
3583
- }, {
3584
- default: () => [t.title?.() ?? Vt(e.title)]
3585
- }), o && g(to, {
3586
- key: "subtitle"
3587
- }, {
3588
- default: () => [t.subtitle?.() ?? Vt(e.subtitle)]
3589
- }), t.default?.()]), s && b("div", {
3590
- key: "append",
3591
- class: "v-card-item__append"
3592
- }, [t.append ? g(Fe, {
3593
- key: "append-defaults",
3594
- disabled: !u,
3595
- defaults: {
3596
- VAvatar: {
3597
- density: e.density,
3598
- image: e.appendAvatar
3599
- },
3600
- VIcon: {
3601
- density: e.density,
3602
- icon: e.appendIcon
3603
- }
3604
- }
3605
- }, t.append) : b(ce, null, [e.appendIcon && g(Se, {
3606
- key: "append-icon",
3607
- density: e.density,
3608
- icon: e.appendIcon
3609
- }, null), e.appendAvatar && g(nt, {
3610
- key: "append-avatar",
3611
- density: e.density,
3612
- image: e.appendAvatar
3613
- }, null)])])]
3614
- });
3615
- }), {};
3616
- }
3617
- }), ao = X({
3618
- opacity: [Number, String],
3619
- ...be(),
3620
- ...Oe()
3621
- }, "VCardText"), sl = ie()({
3622
- name: "VCardText",
3623
- props: ao(),
3624
- setup(e, a) {
3625
- let {
3626
- slots: t
3627
- } = a;
3628
- return de(() => g(e.tag, {
3629
- class: re(["v-card-text", e.class]),
3630
- style: xe([{
3631
- "--v-card-text-opacity": e.opacity
3632
- }, e.style])
3633
- }, t)), {};
3634
- }
3635
- }), oo = X({
3636
- appendAvatar: String,
3637
- appendIcon: he,
3638
- disabled: Boolean,
3639
- flat: Boolean,
3640
- hover: Boolean,
3641
- image: String,
3642
- link: {
3643
- type: Boolean,
3644
- default: void 0
3645
- },
3646
- prependAvatar: String,
3647
- prependIcon: he,
3648
- ripple: {
3649
- type: [Boolean, Object],
3650
- default: !0
3651
- },
3652
- subtitle: {
3653
- type: [String, Number, Boolean],
3654
- default: void 0
3655
- },
3656
- text: {
3657
- type: [String, Number, Boolean],
3658
- default: void 0
3659
- },
3660
- title: {
3661
- type: [String, Number, Boolean],
3662
- default: void 0
3663
- },
3664
- ...el(),
3665
- ...be(),
3666
- ...ht(),
3667
- ...pt(),
3668
- ...Zt(),
3669
- ...Ul(),
3670
- ...ll(),
3671
- ...El(),
3672
- ...yt(),
3673
- ...Bl(),
3674
- ...Oe(),
3675
- ...He(),
3676
- ...Xt({
3677
- variant: "elevated"
3678
- })
3679
- }, "VCard"), Vn = ie()({
3680
- name: "VCard",
3681
- directives: {
3682
- vRipple: lt
3683
- },
3684
- props: oo(),
3685
- setup(e, a) {
3686
- let {
3687
- attrs: t,
3688
- slots: n
3689
- } = a;
3690
- const {
3691
- themeClasses: l
3692
- } = ot(e), {
3693
- borderClasses: u
3694
- } = Yt(e), {
3695
- colorClasses: s,
3696
- colorStyles: i,
3697
- variantClasses: o
3698
- } = Fl(e), {
3699
- densityClasses: r
3700
- } = Dt(e), {
3701
- dimensionStyles: d
3702
- } = bt(e), {
3703
- elevationClasses: c
3704
- } = Qt(e), {
3705
- loaderClasses: m
3706
- } = Hl(e), {
3707
- locationStyles: v
3708
- } = tl(e), {
3709
- positionClasses: y
3710
- } = Rl(e), {
3711
- roundedClasses: h
3712
- } = gt(e), p = Al(e, t), w = ee(void 0);
3713
- return se(() => e.loading, (P, C) => {
3714
- w.value = !P && typeof C == "string" ? C : typeof P == "boolean" ? void 0 : P;
3715
- }, {
3716
- immediate: !0
3717
- }), de(() => {
3718
- const P = e.link !== !1 && p.isLink.value, C = !e.disabled && e.link !== !1 && (e.link || p.isClickable.value), F = P ? "a" : e.tag, B = !!(n.title || e.title != null), U = !!(n.subtitle || e.subtitle != null), _ = B || U, V = !!(n.append || e.appendAvatar || e.appendIcon), $ = !!(n.prepend || e.prependAvatar || e.prependIcon), D = !!(n.image || e.image), G = _ || $ || V, ne = !!(n.text || e.text != null);
3719
- return Ue(g(F, L(p.linkProps, {
3720
- class: ["v-card", {
3721
- "v-card--disabled": e.disabled,
3722
- "v-card--flat": e.flat,
3723
- "v-card--hover": e.hover && !(e.disabled || e.flat),
3724
- "v-card--link": C
3725
- }, l.value, u.value, s.value, r.value, c.value, m.value, y.value, h.value, o.value, e.class],
3726
- style: [i.value, d.value, v.value, {
3727
- "--v-card-height": et(e.height)
3728
- }, e.style],
3729
- onClick: C && p.navigate.value,
3730
- tabindex: e.disabled ? -1 : void 0
3731
- }), {
3732
- default: () => [D && b("div", {
3733
- key: "image",
3734
- class: "v-card__image"
3735
- }, [n.image ? g(Fe, {
3736
- key: "image-defaults",
3737
- disabled: !e.image,
3738
- defaults: {
3739
- VImg: {
3740
- cover: !0,
3741
- src: e.image
3742
- }
3743
- }
3744
- }, n.image) : g(Yn, {
3745
- key: "image-img",
3746
- cover: !0,
3747
- src: e.image
3748
- }, null)]), g(zl, {
3749
- name: "v-card",
3750
- active: !!e.loading,
3751
- color: w.value
3752
- }, {
3753
- default: n.loader
3754
- }), G && g(no, {
3755
- key: "item",
3756
- prependAvatar: e.prependAvatar,
3757
- prependIcon: e.prependIcon,
3758
- title: e.title,
3759
- subtitle: e.subtitle,
3760
- appendAvatar: e.appendAvatar,
3761
- appendIcon: e.appendIcon
3762
- }, {
3763
- default: n.item,
3764
- prepend: n.prepend,
3765
- title: n.title,
3766
- subtitle: n.subtitle,
3767
- append: n.append
3768
- }), ne && g(sl, {
3769
- key: "text"
3770
- }, {
3771
- default: () => [n.text?.() ?? e.text]
3772
- }), n.default?.(), n.actions && g(Cn, null, {
3773
- default: n.actions
3774
- }), Dl(C, "v-card")]
3775
- }), [[lt, C && e.ripple]]);
3776
- }), {};
3777
- }
3778
- }), io = 50, uo = 500;
3779
- function so(e) {
3780
- let {
3781
- toggleUpDown: a
3782
- } = e, t = -1, n = -1;
3783
- rt(u);
3784
- function l(i) {
3785
- u(), s(i), window.addEventListener("pointerup", u), document.addEventListener("blur", u), t = window.setTimeout(() => {
3786
- n = window.setInterval(() => s(i), io);
3787
- }, uo);
3788
- }
3789
- function u() {
3790
- window.clearTimeout(t), window.clearInterval(n), window.removeEventListener("pointerup", u), document.removeEventListener("blur", u);
3791
- }
3792
- rt(u);
3793
- function s(i) {
3794
- a(i === "up");
3795
- }
3796
- return {
3797
- holdStart: l,
3798
- holdStop: u
3799
- };
3800
- }
3801
- const ro = X({
3802
- controlVariant: {
3803
- type: String,
3804
- default: "default"
3805
- },
3806
- inset: Boolean,
3807
- hideInput: Boolean,
3808
- modelValue: {
3809
- type: Number,
3810
- default: null
3811
- },
3812
- min: {
3813
- type: Number,
3814
- default: Number.MIN_SAFE_INTEGER
3815
- },
3816
- max: {
3817
- type: Number,
3818
- default: Number.MAX_SAFE_INTEGER
3819
- },
3820
- step: {
3821
- type: Number,
3822
- default: 1
3823
- },
3824
- precision: {
3825
- type: Number,
3826
- default: 0
3827
- },
3828
- minFractionDigits: {
3829
- type: Number,
3830
- default: null
3831
- },
3832
- decimalSeparator: {
3833
- type: String,
3834
- validator: (e) => !e || e.length === 1
3835
- },
3836
- ...Ye(Mt(), ["modelValue", "validationValue"])
3837
- }, "VNumberInput"), co = ie()({
3838
- name: "VNumberInput",
3839
- props: {
3840
- ...ro()
3841
- },
3842
- emits: {
3843
- "update:focused": (e) => !0,
3844
- "update:modelValue": (e) => !0
3845
- },
3846
- setup(e, a) {
3847
- let {
3848
- slots: t
3849
- } = a;
3850
- const n = j(), {
3851
- holdStart: l,
3852
- holdStop: u
3853
- } = so({
3854
- toggleUpDown: G
3855
- }), s = $t(e), i = I(() => s.isDisabled.value || s.isReadonly.value), o = ee(e.focused), {
3856
- decimalSeparator: r
3857
- } = it(), d = I(() => e.decimalSeparator?.[0] || r.value);
3858
- function c(f) {
3859
- let A = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : e.precision, J = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !0;
3860
- const ve = A == null ? String(f) : f.toFixed(A);
3861
- if (o.value && J)
3862
- return Number(ve).toString().replace(".", d.value);
3863
- if (e.minFractionDigits === null || A !== null && A < e.minFractionDigits)
3864
- return ve.replace(".", d.value);
3865
- let [ge, pe] = ve.split(".");
3866
- return pe = (pe ?? "").padEnd(e.minFractionDigits, "0").replace(new RegExp(`(?<=\\d{${e.minFractionDigits}})0+$`, "g"), ""), [ge, pe].filter(Boolean).join(d.value);
3867
- }
3868
- const m = Ve(e, "modelValue", null, (f) => f ?? null, (f) => f == null ? f ?? null : Ne(Number(f), e.min, e.max)), v = ee(null), y = ee(null);
3869
- se(m, (f) => {
3870
- o.value && !i.value && Number(v.value?.replace(d.value, ".")) === f || (f == null ? (v.value = null, y.value = null) : isNaN(f) || (v.value = c(f), y.value = Number(v.value.replace(d.value, "."))));
3871
- }, {
3872
- immediate: !0
3873
- });
3874
- const h = I({
3875
- get: () => v.value,
3876
- set(f) {
3877
- if (f === null || f === "") {
3878
- m.value = null, v.value = null, y.value = null;
3879
- return;
3880
- }
3881
- const A = Number(f.replace(d.value, "."));
3882
- isNaN(A) || (v.value = f, y.value = A, A <= e.max && A >= e.min && (m.value = A));
3883
- }
3884
- }), p = I(() => {
3885
- if (y.value === null) return !1;
3886
- const f = Number(v.value?.replace(d.value, "."));
3887
- return f !== Ne(f, e.min, e.max);
3888
- }), w = I(() => i.value ? !1 : (m.value ?? 0) + e.step <= e.max), P = I(() => i.value ? !1 : (m.value ?? 0) - e.step >= e.min), C = I(() => e.hideInput ? "stacked" : e.controlVariant), F = E(() => C.value === "split" ? "$plus" : "$collapse"), B = E(() => C.value === "split" ? "$minus" : "$expand"), U = E(() => C.value === "split" ? "default" : "small"), _ = E(() => C.value === "stacked" ? "auto" : "100%"), V = {
3889
- props: {
3890
- onClick: W,
3891
- onPointerup: K,
3892
- onPointerdown: ue,
3893
- onPointercancel: K
3894
- }
3895
- }, $ = {
3896
- props: {
3897
- onClick: W,
3898
- onPointerup: K,
3899
- onPointerdown: q,
3900
- onPointercancel: K
3901
- }
3902
- };
3903
- se(() => e.precision, () => fe()), se(() => e.minFractionDigits, () => fe()), at(() => {
3904
- z();
3905
- });
3906
- function D(f) {
3907
- if (f == null) return 0;
3908
- const A = f.toString(), J = A.indexOf(".");
3909
- return ~J ? A.length - J : 0;
3910
- }
3911
- function G() {
3912
- let f = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !0;
3913
- if (i.value) return;
3914
- if (m.value == null) {
3915
- h.value = c(Ne(0, e.min, e.max));
3916
- return;
3917
- }
3918
- let A = Math.max(D(m.value), D(e.step));
3919
- e.precision != null && (A = Math.max(A, e.precision)), f ? w.value && (h.value = c(m.value + e.step, A)) : P.value && (h.value = c(m.value - e.step, A));
3920
- }
3921
- function ne(f) {
3922
- if (i.value || !f.data) return;
3923
- const A = f.target, {
3924
- value: J,
3925
- selectionStart: ve,
3926
- selectionEnd: ge
3927
- } = A ?? {}, pe = J ? J.slice(0, ve) + f.data + J.slice(ge) : f.data, Ie = Qn(pe, e.precision, d.value);
3928
- if (new RegExp(`^-?\\d*${Zn(d.value)}?\\d*$`).test(pe) || (f.preventDefault(), A.value = Ie, ke(() => h.value = Ie)), e.precision != null) {
3929
- if (pe.split(d.value)[1]?.length > e.precision) {
3930
- f.preventDefault(), A.value = Ie, ke(() => h.value = Ie);
3931
- const De = (ve ?? 0) + f.data.length;
3932
- A.setSelectionRange(De, De);
3933
- }
3934
- e.precision === 0 && pe.endsWith(d.value) && (f.preventDefault(), A.value = Ie, ke(() => h.value = Ie));
3935
- }
3936
- }
3937
- async function H(f) {
3938
- ["Enter", "ArrowLeft", "ArrowRight", "Backspace", "Delete", "Tab"].includes(f.key) || f.ctrlKey || ["ArrowDown", "ArrowUp"].includes(f.key) && (f.preventDefault(), f.stopPropagation(), z(), await ke(), f.key === "ArrowDown" ? G(!1) : G());
3939
- }
3940
- function W(f) {
3941
- f.stopPropagation();
3942
- }
3943
- function K(f) {
3944
- f.currentTarget?.releasePointerCapture(f.pointerId), f.preventDefault(), u();
3945
- }
3946
- function ue(f) {
3947
- f.currentTarget?.setPointerCapture(f.pointerId), f.preventDefault(), f.stopPropagation(), l("up");
3948
- }
3949
- function q(f) {
3950
- f.currentTarget?.setPointerCapture(f.pointerId), f.preventDefault(), f.stopPropagation(), l("down");
3951
- }
3952
- function z() {
3953
- if (i.value || !n.value) return;
3954
- const f = n.value.value, A = Number(f.replace(d.value, "."));
3955
- f && !isNaN(A) ? h.value = c(Ne(A, e.min, e.max)) : h.value = null;
3956
- }
3957
- function fe() {
3958
- i.value || (h.value = m.value !== null && !isNaN(m.value) ? c(m.value, e.precision, !1) : null);
3959
- }
3960
- function R() {
3961
- if (!i.value) {
3962
- if (m.value === null || isNaN(m.value)) {
3963
- h.value = null;
3964
- return;
3965
- }
3966
- h.value = m.value.toString().replace(".", d.value);
3967
- }
3968
- }
3969
- function O() {
3970
- R();
3971
- }
3972
- function k() {
3973
- z();
3974
- }
3975
- return de(() => {
3976
- const {
3977
- modelValue: f,
3978
- type: A,
3979
- ...J
3980
- } = Je.filterProps(e);
3981
- function ve() {
3982
- return t.increment ? g(Fe, {
3983
- key: "increment-defaults",
3984
- defaults: {
3985
- VBtn: {
3986
- disabled: !w.value,
3987
- height: _.value,
3988
- size: U.value,
3989
- icon: F.value,
3990
- variant: "text"
3991
- }
3992
- }
3993
- }, {
3994
- default: () => [t.increment(V)]
3995
- }) : g(tt, {
3996
- "aria-hidden": "true",
3997
- "data-testid": "increment",
3998
- disabled: !w.value,
3999
- height: _.value,
4000
- icon: F.value,
4001
- key: "increment-btn",
4002
- onClick: W,
4003
- onPointerdown: ue,
4004
- onPointerup: K,
4005
- onPointercancel: K,
4006
- size: U.value,
4007
- variant: "text",
4008
- tabindex: "-1"
4009
- }, null);
4010
- }
4011
- function ge() {
4012
- return t.decrement ? g(Fe, {
4013
- key: "decrement-defaults",
4014
- defaults: {
4015
- VBtn: {
4016
- disabled: !P.value,
4017
- height: _.value,
4018
- size: U.value,
4019
- icon: B.value,
4020
- variant: "text"
4021
- }
4022
- }
4023
- }, {
4024
- default: () => [t.decrement($)]
4025
- }) : g(tt, {
4026
- "aria-hidden": "true",
4027
- "data-testid": "decrement",
4028
- disabled: !P.value,
4029
- height: _.value,
4030
- icon: B.value,
4031
- key: "decrement-btn",
4032
- onClick: W,
4033
- onPointerdown: q,
4034
- onPointerup: K,
4035
- onPointercancel: K,
4036
- size: U.value,
4037
- variant: "text",
4038
- tabindex: "-1"
4039
- }, null);
4040
- }
4041
- function pe() {
4042
- return b("div", {
4043
- class: "v-number-input__control"
4044
- }, [ge(), g(ze, {
4045
- vertical: C.value !== "stacked"
4046
- }, null), ve()]);
4047
- }
4048
- function Ie() {
4049
- return !e.hideInput && !e.inset ? g(ze, {
4050
- vertical: !0
4051
- }, null) : void 0;
4052
- }
4053
- const De = C.value === "split" ? b("div", {
4054
- class: "v-number-input__control"
4055
- }, [g(ze, {
4056
- vertical: !0
4057
- }, null), ve()]) : e.reverse || C.value === "hidden" ? void 0 : b(ce, null, [Ie(), pe()]), je = t["append-inner"] || De, Qe = C.value === "split" ? b("div", {
4058
- class: "v-number-input__control"
4059
- }, [ge(), g(ze, {
4060
- vertical: !0
4061
- }, null)]) : e.reverse && C.value !== "hidden" ? b(ce, null, [pe(), Ie()]) : void 0, ut = t["prepend-inner"] || Qe;
4062
- return g(Je, L({
4063
- ref: n
4064
- }, J, {
4065
- modelValue: h.value,
4066
- "onUpdate:modelValue": (x) => h.value = x,
4067
- focused: o.value,
4068
- "onUpdate:focused": (x) => o.value = x,
4069
- validationValue: m.value,
4070
- error: e.error || p.value || void 0,
4071
- onBeforeinput: ne,
4072
- onFocus: O,
4073
- onBlur: k,
4074
- onKeydown: H,
4075
- class: ["v-number-input", {
4076
- "v-number-input--default": C.value === "default",
4077
- "v-number-input--hide-input": e.hideInput,
4078
- "v-number-input--inset": e.inset,
4079
- "v-number-input--reverse": e.reverse,
4080
- "v-number-input--split": C.value === "split",
4081
- "v-number-input--stacked": C.value === "stacked"
4082
- }, e.class],
4083
- style: e.style,
4084
- inputmode: "decimal"
4085
- }), {
4086
- ...t,
4087
- "append-inner": je ? function() {
4088
- for (var x = arguments.length, Q = new Array(x), te = 0; te < x; te++)
4089
- Q[te] = arguments[te];
4090
- return b(ce, null, [t["append-inner"]?.(...Q), De]);
4091
- } : void 0,
4092
- "prepend-inner": ut ? function() {
4093
- for (var x = arguments.length, Q = new Array(x), te = 0; te < x; te++)
4094
- Q[te] = arguments[te];
4095
- return b(ce, null, [Qe, t["prepend-inner"]?.(...Q)]);
4096
- } : void 0
4097
- });
4098
- }), St({}, n);
4099
- }
4100
- }), vo = { class: "text-medium-emphasis ps-2" }, fo = ["id"], mo = {
4101
- __name: "index",
4102
- props: {
4103
- modelValue: {},
4104
- modelModifiers: {}
4105
- },
4106
- emits: /* @__PURE__ */ qt(["closeDialog", "save"], ["update:modelValue"]),
4107
- setup(e, { emit: a }) {
4108
- const t = Pe("table_props"), n = Pe("datatablesPluginOptions"), l = Pt(e, "modelValue"), u = a, s = {
4109
- textfield: Je,
4110
- select: Ja,
4111
- number: co,
4112
- datepicker: Ee(
4113
- () => import("./Datepicker-CgaWBwqc.js")
4114
- ),
4115
- comparison: Ee(
4116
- () => import("./Comparison-DQKuQ5sY.js")
4117
- )
4118
- }, i = I(() => t.headers.filter((r) => r.advancedFilter !== !1 && !r.hidden)), o = (r) => r ? typeof r == "string" ? s[r] : r : s.textfield;
4119
- return se(
4120
- i,
4121
- (r) => {
4122
- r.forEach((d) => {
4123
- const c = d.advancedFilter?.key ?? d.key;
4124
- Object.hasOwn(l.value, c) || (l.value[c] = {
4125
- comparison: "=",
4126
- value: null
4127
- });
4128
- });
4129
- },
4130
- { immediate: !0 }
4131
- ), at(async () => {
4132
- await t.options.advancedFilters?.onMounted();
4133
- }), (r, d) => (oe(), ye(Vn, { rounded: "lg" }, {
4134
- default: Ce(() => [
4135
- g(ul, { class: "d-flex justify-space-between align-center" }, {
4136
- default: Ce(() => [
4137
- b("div", vo, Vt(r.$t("$datatables.advancedFilters")), 1),
4138
- g(tt, {
4139
- icon: M(n).header.icons.close,
4140
- variant: "text",
4141
- onClick: d[0] || (d[0] = (c) => u("closeDialog"))
4142
- }, null, 8, ["icon"])
4143
- ]),
4144
- _: 1
4145
- }),
4146
- g(ze),
4147
- g(sl, { class: "overflow-auto pt-8" }, {
4148
- default: Ce(() => [
4149
- (oe(!0), Ke(ce, null, Wt(M(i), (c, m) => (oe(), Ke("div", {
4150
- id: `advanced-filter-${c.key}`,
4151
- key: `filter-${m}`,
4152
- class: re(`advanced-filter advanced-filter--${c.key}`)
4153
- }, [
4154
- (oe(), ye($e(o(c.advancedFilter?.component)), L({
4155
- modelValue: l.value[c.advancedFilter?.key ?? c.key].value,
4156
- "onUpdate:modelValue": (v) => l.value[c.advancedFilter?.key ?? c.key].value = v,
4157
- comparison: l.value[c.advancedFilter?.key ?? c.key].comparison,
4158
- "onUpdate:comparison": (v) => l.value[c.advancedFilter?.key ?? c.key].comparison = v
4159
- }, { ref_for: !0 }, c.advancedFilter?.options, {
4160
- label: c.title,
4161
- variant: "underlined",
4162
- clearable: ""
4163
- }), null, 16, ["modelValue", "onUpdate:modelValue", "comparison", "onUpdate:comparison", "label"]))
4164
- ], 10, fo))), 128))
4165
- ]),
4166
- _: 1
4167
- }),
4168
- g(ze, { class: "mt-2" }),
4169
- g(Cn, { class: "my-2 d-flex justify-end" }, {
4170
- default: Ce(() => [
4171
- g(tt, {
4172
- class: "text-none",
4173
- text: r.$t("$datatables.cancel"),
4174
- onClick: d[1] || (d[1] = (c) => u("closeDialog"))
4175
- }, null, 8, ["text"]),
4176
- g(tt, {
4177
- class: "text-none",
4178
- color: "primary",
4179
- text: r.$t("$datatables.submit"),
4180
- variant: "flat",
4181
- onClick: d[2] || (d[2] = (c) => u("save"))
4182
- }, null, 8, ["text"])
4183
- ]),
4184
- _: 1
4185
- })
4186
- ]),
4187
- _: 1
4188
- }));
4189
- }
4190
- };
4191
- function pl(e) {
4192
- return e === null || typeof e != "object" ? e : JSON.parse(JSON.stringify(e));
4193
- }
4194
- function Gt(e, a) {
4195
- if (e === a) return !0;
4196
- if (e == null || a == null || typeof e != typeof a) return !1;
4197
- if (e instanceof Date && a instanceof Date)
4198
- return e.getTime() === a.getTime();
4199
- if (e instanceof RegExp && a instanceof RegExp)
4200
- return e.toString() === a.toString();
4201
- if (Array.isArray(e) && Array.isArray(a)) {
4202
- if (e.length !== a.length) return !1;
4203
- for (let t = 0; t < e.length; t++)
4204
- if (!Gt(e[t], a[t])) return !1;
4205
- return !0;
4206
- }
4207
- if (typeof e == "object" && typeof a == "object") {
4208
- const t = Object.keys(e), n = Object.keys(a);
4209
- if (t.length !== n.length) return !1;
4210
- for (const l of t) {
4211
- if (!n.includes(l)) return !1;
4212
- const u = e[l], s = a[l];
4213
- if (!Gt(u, s)) return !1;
4214
- }
4215
- return !0;
4216
- }
4217
- return !1;
4218
- }
4219
- const go = {
4220
- __name: "Dialog",
4221
- props: {
4222
- modelValue: { required: !0 },
4223
- modelModifiers: {}
4224
- },
4225
- emits: ["update:modelValue"],
4226
- setup(e) {
4227
- const a = Pe("table_props"), t = Pe("busEmits"), n = Rt(), { advancedFiltersState: l } = Et(), u = Xl("advancedFilters"), { setData: s } = n, i = Pt(e, "modelValue"), o = j({}), r = () => {
4228
- const m = Object.entries(o.value).filter(([, v]) => {
4229
- const y = v.value;
4230
- return Array.isArray(y) || typeof y == "string" ? y.length > 0 : y != null && y !== "";
4231
- }).reduce((v, [y, h]) => (v[y] = h, v), {});
4232
- Gt(m, l.value) || (s({
4233
- table_id: a.id,
4234
- name: "advancedFilters",
4235
- value: { query: pl(m) }
4236
- }), t("advancedFilters:update", m)), i.value = !1;
4237
- }, d = (m, v) => {
4238
- m === "save" && (o.value[v.key] = { comparison: v.comparison, value: v.value }, r());
4239
- }, c = u.on(d);
4240
- return at(() => {
4241
- o.value = pl(l.value);
4242
- }), Pn(c), (m, v) => {
4243
- const y = mo, h = ha;
4244
- return oe(), Ke("div", null, [
4245
- g(Sn, {
4246
- modelValue: i.value,
4247
- "onUpdate:modelValue": v[1] || (v[1] = (p) => i.value = p),
4248
- "max-width": "550",
4249
- "retain-focus": !1
4250
- }, {
4251
- default: Ce(({ isActive: p }) => [
4252
- g(y, {
4253
- modelValue: M(o),
4254
- "onUpdate:modelValue": v[0] || (v[0] = (w) => xt(o) ? o.value = w : null),
4255
- onSave: r,
4256
- onCloseDialog: (w) => p.value = !1
4257
- }, null, 8, ["modelValue", "onCloseDialog"])
4258
- ]),
4259
- _: 1
4260
- }, 8, ["modelValue"]),
4261
- Object.keys(M(l)).length ? (oe(), ye(h, {
4262
- key: 0,
4263
- modelValue: M(o),
4264
- "onUpdate:modelValue": v[2] || (v[2] = (p) => xt(o) ? o.value = p : null),
4265
- onSave: r
4266
- }, null, 8, ["modelValue"])) : Me("", !0)
4267
- ]);
4268
- };
4269
- }
4270
- };
4271
- function yo() {
4272
- const e = Pe("datatablesPluginOptions"), { t: a } = aa(), { advancedFiltersState: t } = Et(), n = j(!1), l = I(() => Object.keys(t.value).length);
4273
- return { advancedFiltersItems: I(() => [
4274
- {
4275
- title: `${a("$datatables.advancedFilters")}`,
4276
- onClick: () => n.value = !0,
4277
- prependIcon: e.header.icons.advancedFilters
4278
- }
4279
- ]), advancedFiltersDialog: n, activeAdvancedFilters: l };
4280
- }
4281
- const ho = {
4282
- class: "d-flex align-center",
4283
- style: { gap: "0.5rem" }
4284
- }, bo = /* @__PURE__ */ At({
4285
- __name: "index",
4286
- setup(e) {
4287
- const { advancedFiltersItems: a, advancedFiltersDialog: t, activeAdvancedFilters: n } = yo();
4288
- return (l, u) => {
4289
- const s = go;
4290
- return oe(), Ke("div", ho, [
4291
- (oe(!0), Ke(ce, null, Wt(M(a), (i, o) => (oe(), ye(tt, L({
4292
- key: o,
4293
- icon: "",
4294
- variant: "text",
4295
- color: M(n) ? "primary" : "dark",
4296
- density: "comfortable"
4297
- }, { ref_for: !0 }, i), {
4298
- default: Ce(() => [
4299
- M(n) ? (oe(), ye(Ya, {
4300
- key: 0,
4301
- color: "primary",
4302
- content: M(n)
4303
- }, {
4304
- default: Ce(() => [
4305
- g(Se, {
4306
- icon: i.prependIcon
4307
- }, null, 8, ["icon"])
4308
- ]),
4309
- _: 2
4310
- }, 1032, ["content"])) : (oe(), ye(Se, {
4311
- key: 1,
4312
- icon: i.prependIcon
4313
- }, null, 8, ["icon"]))
4314
- ]),
4315
- _: 2
4316
- }, 1040, ["color"]))), 128)),
4317
- g(s, {
4318
- modelValue: M(t),
4319
- "onUpdate:modelValue": u[0] || (u[0] = (i) => xt(t) ? t.value = i : null)
4320
- }, null, 8, ["modelValue"])
4321
- ]);
4322
- };
4323
- }
4324
- }), po = {
4325
- class: "d-flex align-center",
4326
- style: { gap: "0.75rem" }
4327
- }, ko = { class: "ms-auto" }, So = /* @__PURE__ */ At({
4328
- __name: "index",
4329
- props: {
4330
- responsiveHeader: { type: Boolean }
4331
- },
4332
- setup(e) {
4333
- const a = Ee(() => import("./Search-DBCGZBxm.js")), t = Ee(() => import("./RefreshTable-0OZhCgVc.js")), n = Ee(() => import("./Options-Dzm1_SN_.js")), l = Ee(() => import("./index-2dniBO7B.js")), u = Ee(() => import("./index-DoH33mkF.js")), s = Ee(() => import("./index-D65STyD7.js")), i = Pe("table_props"), o = j(null), r = i.options?.header?.components ?? {};
4334
- return (d, c) => {
4335
- const m = bo;
4336
- return oe(), Ke("div", po, [
4337
- e.responsiveHeader ? Me("", !0) : (oe(), ye(m, { key: 0 })),
4338
- M(i).hardFilters.length ? (oe(), ye($e(M(r).hardFilters ?? M(l)), {
4339
- key: 1,
4340
- id: "header-hardFilters"
4341
- })) : Me("", !0),
4342
- (oe(), ye($e(M(r).toolbar), { id: "header-toolbar" })),
4343
- b("div", ko, [
4344
- (oe(), ye($e(M(r).search ?? M(a)), { id: "header-search" })),
4345
- e.responsiveHeader ? Me("", !0) : (oe(), ye($e(M(r).columns ?? M(u)), {
4346
- key: 0,
4347
- "component-refs": { columns: M(o) }
4348
- }, null, 8, ["component-refs"])),
4349
- e.responsiveHeader ? Me("", !0) : (oe(), ye($e(M(r).download ?? M(s)), { key: 1 })),
4350
- e.responsiveHeader ? Me("", !0) : (oe(), ye($e(M(r).refreshTable ?? M(t)), { key: 2 })),
4351
- (oe(), ye($e(M(r).options ?? M(n)), { "responsive-header": e.responsiveHeader }, null, 8, ["responsive-header"]))
4352
- ])
4353
- ]);
4354
- };
4355
- }
4356
- });
4357
- function Co(e) {
4358
- const a = Rt(), { getCurrentTable: t, setTableHash: n, hashString: l } = a, u = j(!1), s = 5, i = I(() => t(e.id));
4359
- se(
4360
- i,
4361
- async (v) => {
4362
- v.options.hash && await o(v);
4363
- },
4364
- {
4365
- deep: !0
4366
- }
4367
- );
4368
- const o = async (v) => {
4369
- if (u.value) return;
4370
- u.value = !0, await ke();
4371
- const y = r(), h = y.findIndex((p) => p.id === e.id);
4372
- h > -1 ? y[h] = v : y.push(v), localStorage.setItem("datatables-state", JSON.stringify(y)), u.value = !1;
4373
- }, r = () => {
4374
- const v = localStorage.getItem("datatables-state");
4375
- return JSON.parse(v ?? "[]");
4376
- }, d = () => r().find((h) => h.id === e.id);
4377
- return {
4378
- saving: u,
4379
- dataStateGet: d,
4380
- tableDataState: i,
4381
- checkTableState: async () => {
4382
- const v = localStorage.getItem("datatables-state-v");
4383
- parseInt(v) !== parseInt(s) && (localStorage.removeItem("datatables-state"), localStorage.setItem("datatables-state-v", s));
4384
- const h = d()?.options.hash;
4385
- if (h) {
4386
- const p = await l(JSON.stringify(e.headers ?? []));
4387
- h !== p && localStorage.removeItem("datatables-state");
4388
- }
4389
- n({ table_id: e.id, headers: e.headers });
4390
- },
4391
- deleteDataStorage: () => {
4392
- localStorage.removeItem("datatables-state"), localStorage.removeItem("datatables-state-v");
4393
- }
4394
- };
4395
- }
4396
- const xn = la(() => {
4397
- const e = ee({}), a = ee({});
4398
- return {
4399
- storeOptions: {
4400
- state: e,
4401
- columns: a
4402
- },
4403
- setUserOptions: ({
4404
- state: l = null,
4405
- columns: u = null
4406
- }) => {
4407
- l && (e.value = l), u && (a.value = u);
4408
- }
4409
- };
4410
- }), Vo = {
4411
- key: 0,
4412
- class: "datatables-v2"
4413
- }, xo = { class: "pe-4" }, Io = /* @__PURE__ */ At({
4414
- __name: "Blueprint",
4415
- props: {
4416
- modelValue: {},
4417
- modelModifiers: {}
4418
- },
4419
- emits: /* @__PURE__ */ qt(["refreshTable", "refetchData", "advancedFilters:update", "hardFilters:update"], ["update:modelValue"]),
4420
- setup(e, { expose: a, emit: t }) {
4421
- const n = Ee(() => import("./Table-VfsWPt6d.js")), l = Ee(() => import("./TableServer-CPxJnObB.js")), { storeOptions: u } = xn(), { saveTableOptions: s } = Et(), i = Pt(e, "modelValue"), o = Pe("table_props"), r = Pe("datatablesPluginOptions"), d = Cl("tableRef"), c = j(!1), m = j(!1), v = j(!1), y = t, h = Rt(), { dataStateGet: p, tableDataState: w, checkTableState: P } = Co(o), { addTable: C, restoreData: F } = h, B = j(!1);
4422
- na(d, (_) => {
4423
- if (!v.value) return;
4424
- const V = _[0], { width: $ } = V.contentRect;
4425
- B.value = $ < 950;
4426
- });
4427
- const U = I(() => {
4428
- const _ = o.options?.header;
4429
- return _ === void 0 || typeof _ == "object" && _ !== null;
4430
- });
4431
- return at(async () => {
4432
- C({ table_id: o.id }), await P();
4433
- const _ = p();
4434
- _ && F({ table_id: o.id, data: _ });
4435
- const $ = w.value.options.columns;
4436
- $.sorted?.length || ($.selected?.length || ($.selected = o.headers.filter((D) => !D.hidden).map((D) => D.key)), $.sorted = o.headers.map((D) => D.key)), s(ea(u.state.value, w.value.options.state)), m.value = !0, await ke(), v.value = !0;
4437
- }), kl(() => {
4438
- v.value = !1;
4439
- }), We("busEmits", y), We("tableRef", d), We("tableState", w), We("downloadModal", c), a({ tableRef: d }), (_, V) => {
4440
- const $ = So;
4441
- return M(m) ? (oe(), Ke("div", Vo, [
4442
- g(Vn, null, {
4443
- default: Ce(() => [
4444
- M(U) ? (oe(), ye(ul, { key: 0 }, {
4445
- default: Ce(() => [
4446
- (oe(), ye($, {
4447
- key: M(B) ? "responsive" : "full",
4448
- "responsive-header": M(B)
4449
- }, null, 8, ["responsive-header"]))
4450
- ]),
4451
- _: 1
4452
- })) : Me("", !0),
4453
- g(sl, { class: "pa-0" }, {
4454
- default: Ce(() => [
4455
- M(v) ? (oe(), ye($e(M(o).api ? M(l) : M(n)), {
4456
- ref_key: "tableRef",
4457
- ref: d,
4458
- key: M(o).api ? "server" : "client",
4459
- modelValue: i.value,
4460
- "onUpdate:modelValue": V[0] || (V[0] = (D) => i.value = D)
4461
- }, null, 8, ["modelValue"])) : Me("", !0)
4462
- ]),
4463
- _: 1
4464
- })
4465
- ]),
4466
- _: 1
4467
- }),
4468
- g(Sn, {
4469
- modelValue: M(c),
4470
- "onUpdate:modelValue": V[1] || (V[1] = (D) => xt(c) ? c.value = D : null),
4471
- "max-width": "350",
4472
- persistent: ""
4473
- }, {
4474
- default: Ce(() => [
4475
- g(al, {
4476
- class: "py-2",
4477
- color: "primary",
4478
- elevation: "12",
4479
- rounded: "lg"
4480
- }, {
4481
- default: Ce(() => [
4482
- g(vt, {
4483
- "prepend-icon": M(r).header.icons.download,
4484
- title: _.$t("$datatables.preparing_download_file")
4485
- }, {
4486
- prepend: Ce(() => [
4487
- b("div", xo, [
4488
- g(Se, {
4489
- color: "primary",
4490
- size: "x-large"
4491
- })
4492
- ])
4493
- ]),
4494
- append: Ce(() => [
4495
- g(ta, {
4496
- color: "primary",
4497
- indeterminate: "disable-shrink",
4498
- size: "16",
4499
- width: "2"
4500
- })
4501
- ]),
4502
- _: 1
4503
- }, 8, ["prepend-icon", "title"])
4504
- ]),
4505
- _: 1
4506
- })
4507
- ]),
4508
- _: 1
4509
- }, 8, ["modelValue"])
4510
- ])) : Me("", !0);
4511
- };
4512
- }
4513
- }), wo = Vl("datatablesHooks", () => {
4514
- const e = j({});
4515
- return {
4516
- hooks: e,
4517
- registerHook: (n, l) => {
4518
- Object.assign(e.value, { [n]: l });
4519
- },
4520
- triggerHook: (n, l) => {
4521
- e.value.hasOwnProperty(n) && e.value[n](l);
4522
- }
4523
- };
4524
- }), _o = /* @__PURE__ */ At({
4525
- __name: "index",
4526
- props: {
4527
- id: {
4528
- type: String,
4529
- required: !0
4530
- },
4531
- api: {
4532
- type: Object,
4533
- default: () => {
4534
- }
4535
- },
4536
- data: {
4537
- type: Array,
4538
- default: () => []
4539
- },
4540
- options: {
4541
- type: Object,
4542
- default: () => ({})
4543
- },
4544
- params: {
4545
- type: Object,
4546
- default: () => ({})
4547
- },
4548
- hardFilters: {
4549
- type: Array,
4550
- default: () => []
4551
- },
4552
- headers: {
4553
- type: Array,
4554
- default: () => []
4555
- },
4556
- loading: {
4557
- type: Boolean,
4558
- default: !1
4559
- },
4560
- locale: {
4561
- type: String,
4562
- default: "en"
4563
- },
4564
- title: {
4565
- type: String,
4566
- default: ""
4567
- }
4568
- },
4569
- emits: ["refreshTable", "refetchData"],
4570
- setup(e, { expose: a, emit: t }) {
4571
- const n = e, { triggerHook: l } = wo(), { storeOptions: u, setUserOptions: s } = xn(), i = Xl("advancedFilters"), o = Cl("table"), r = j(0), d = async (y = {}) => {
4572
- s(y), r.value < 99 && (v("refreshTable"), await ke(), r.value++);
4573
- }, c = async (y = {}) => {
4574
- await ke(), !(!o.value || !o.value?.tableRef) && (s(y), "reloadItems" in o.value.tableRef && (o.value.tableRef.reloadItems(u.state.value), v("refetchData")));
4575
- }, m = (y, h, p = "=") => {
4576
- i.emit("save", { key: y, value: h, comparison: p });
4577
- }, v = t;
4578
- return We("table_props", n), We("triggerHook", l), a({ refreshTable: d, refetchData: c, triggerHook: l, updateAdvancedFilter: m }), (y, h) => {
4579
- const p = Io;
4580
- return oe(), ye(p, {
4581
- id: e.id,
4582
- ref_key: "table",
4583
- ref: o,
4584
- key: `${e.id}-${M(r)}`,
4585
- onRefreshTable: d,
4586
- onRefetchData: c
4587
- }, null, 8, ["id"]);
4588
- };
4589
- }
4590
- }), Ro = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4591
- __proto__: null,
4592
- default: _o
4593
- }, Symbol.toStringTag, { value: "Module" }));
4594
- export {
4595
- Mt as A,
4596
- sn as B,
4597
- co as C,
4598
- Ro as D,
4599
- Bo as V,
4600
- go as _,
4601
- Gt as a,
4602
- mt as b,
4603
- un as c,
4604
- pl as d,
4605
- hn as e,
4606
- Rt as f,
4607
- Vn as g,
4608
- sl as h,
4609
- Je as i,
4610
- Sn as j,
4611
- ul as k,
4612
- Cn as l,
4613
- yn as m,
4614
- yo as n,
4615
- wo as o,
4616
- il as p,
4617
- ma as q,
4618
- rn as r,
4619
- Sa as s,
4620
- cn as t,
4621
- Et as u,
4622
- hl as v,
4623
- Co as w,
4624
- ya as x,
4625
- Ya as y,
4626
- Ot as z
4627
- };