@signal24/vue-foundation 4.29.0 → 4.29.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,15 +1,16 @@
1
- import { defineComponent as _, ref as S, computed as T, watch as I, onMounted as N, createElementBlock as k, withDirectives as re, openBlock as b, createElementVNode as $, toDisplayString as R, createCommentVNode as H, Fragment as ie, renderList as le, vModelSelect as At, getCurrentInstance as be, withModifiers as ke, normalizeStyle as $t, normalizeClass as V, renderSlot as U, reactive as Bt, h as ae, Teleport as Nt, markRaw as _t, onBeforeUnmount as ue, resolveDirective as Rt, createBlock as Qe, createSlots as Ut, withCtx as he, createTextVNode as X, vModelText as jt, onActivated as et, onDeactivated as tt } from "vue";
2
- import { compact as nt, cloneDeep as Pt, uniq as Wt, groupBy as qt, isEqual as we, debounce as zt, startCase as Kt, upperFirst as Yt, remove as Xt, last as Gt } from "lodash";
3
- import { escapeHtml as Zt } from "@vue/shared";
4
- import { escapeHtml as ys } from "@vue/shared";
5
- import { format as P, addDays as Jt, parse as Qt } from "date-fns";
1
+ import { defineComponent as N, ref as S, computed as T, watch as I, onMounted as _, createElementBlock as k, withDirectives as ie, openBlock as b, createElementVNode as $, toDisplayString as R, createCommentVNode as V, Fragment as le, renderList as re, vModelSelect as Vt, getCurrentInstance as be, withModifiers as ke, normalizeStyle as Ht, normalizeClass as H, renderSlot as W, reactive as At, h as ae, Teleport as $t, markRaw as Bt, onBeforeUnmount as ue, resolveDirective as _t, createBlock as Je, createSlots as Nt, withCtx as he, createTextVNode as X, vModelText as Rt, onActivated as Qe, onDeactivated as et } from "vue";
2
+ import { compact as tt, cloneDeep as Wt, uniq as jt, groupBy as Ut, isEqual as we, debounce as Pt, startCase as qt, upperFirst as zt, remove as Kt, last as Yt } from "lodash";
3
+ import { configureOpenApiClient as Xt, OpenApiError as Zt } from "@signal24/openapi-client-codegen";
4
+ import { escapeHtml as Gt } from "@vue/shared";
5
+ import { escapeHtml as ps } from "@vue/shared";
6
+ import { format as U, addDays as Jt, parse as Qt } from "date-fns";
6
7
  const en = {
7
8
  key: 0,
8
9
  disabled: ""
9
10
  }, tn = {
10
11
  key: 0,
11
12
  value: null
12
- }, nn = ["value"], jo = /* @__PURE__ */ _({
13
+ }, nn = ["value"], _o = /* @__PURE__ */ N({
13
14
  __name: "vf-ajax-select",
14
15
  props: {
15
16
  modelValue: {},
@@ -21,28 +22,28 @@ const en = {
21
22
  },
22
23
  emits: ["update:modelValue"],
23
24
  setup(e, { emit: t }) {
24
- const n = e, o = t, r = S(null), s = T(() => r.value ? r.value.map((d) => {
25
- const h = d;
26
- return n.preprocesor ? n.preprocesor(h) : n.displayKey ? h[n.displayKey] : "";
27
- }) : null), a = S(n.modelValue ?? null);
28
- I(() => n.loadFn, l), I(
25
+ const n = e, o = t, l = S(null), s = T(() => l.value ? l.value.map((d) => {
26
+ const E = d;
27
+ return n.preprocesor ? n.preprocesor(E) : n.displayKey ? E[n.displayKey] : "";
28
+ }) : null), u = S(n.modelValue ?? null);
29
+ I(() => n.loadFn, r), I(
29
30
  () => n.modelValue,
30
- () => a.value = n.modelValue
31
- ), I(a, () => o("update:modelValue", a.value));
32
- async function l() {
33
- r.value = await n.loadFn();
31
+ () => u.value = n.modelValue
32
+ ), I(u, () => o("update:modelValue", u.value));
33
+ async function r() {
34
+ l.value = await n.loadFn();
34
35
  }
35
- return N(l), (u, d) => s.value ? re((b(), k("select", {
36
+ return _(r), (c, d) => s.value ? ie((b(), k("select", {
36
37
  key: 1,
37
- "onUpdate:modelValue": d[0] || (d[0] = (h) => a.value = h)
38
+ "onUpdate:modelValue": d[0] || (d[0] = (E) => u.value = E)
38
39
  }, [
39
- n.nullText ? (b(), k("option", tn, R(n.nullText), 1)) : H("", !0),
40
- (b(!0), k(ie, null, le(s.value, (h, m) => (b(), k("option", {
41
- key: m,
42
- value: r.value?.[m]
43
- }, R(h), 9, nn))), 128))
40
+ n.nullText ? (b(), k("option", tn, R(n.nullText), 1)) : V("", !0),
41
+ (b(!0), k(le, null, re(s.value, (E, h) => (b(), k("option", {
42
+ key: h,
43
+ value: l.value?.[h]
44
+ }, R(E), 9, nn))), 128))
44
45
  ], 512)), [
45
- [At, a.value]
46
+ [Vt, u.value]
46
47
  ]) : (b(), k("select", en, [
47
48
  $("option", null, R(n.loadingText || "Loading..."), 1)
48
49
  ]));
@@ -54,104 +55,104 @@ const en = {
54
55
  defaultTimeFormat: "H:mm",
55
56
  defaultCurrencyDivisor: 1
56
57
  };
57
- function Po(e) {
58
+ function No(e) {
58
59
  Object.assign(F, e);
59
60
  }
60
- const on = /* @__PURE__ */ _({
61
+ const on = /* @__PURE__ */ N({
61
62
  __name: "overlay-anchor",
62
63
  props: {
63
64
  overlayId: {},
64
65
  anchor: {}
65
66
  },
66
67
  setup(e) {
67
- const t = e, n = t.anchor instanceof HTMLElement ? t.anchor : t.anchor.el, o = S({ visibility: "hidden", top: "0", left: "0" }), r = S([]), s = be();
68
- N(a);
69
- function a() {
68
+ const t = e, n = t.anchor instanceof HTMLElement ? t.anchor : t.anchor.el, o = S({ visibility: "hidden", top: "0", left: "0" }), l = S([]), s = be();
69
+ _(u);
70
+ function u() {
70
71
  if (!s) return;
71
- const d = s.vnode.el, { styles: h, classes: m } = l(d, n);
72
- o.value = h, r.value = m;
72
+ const d = s.vnode.el, { styles: E, classes: h } = r(d, n);
73
+ o.value = E, l.value = h;
73
74
  }
74
- function l(d, h) {
75
- const m = t.anchor instanceof HTMLElement ? {} : t.anchor, w = h.getBoundingClientRect(), c = d.getBoundingClientRect();
76
- m.matchWidth && (c.width = w.width), m.matchHeight && (c.height = w.height);
77
- const f = m.class ? Array.isArray(m.class) ? m.class : [m.class] : [];
78
- let y, C;
79
- if (m.y === "center")
80
- y = w.top + w.height / 2 - c.height / 2, f.push("anchored-center-y");
75
+ function r(d, E) {
76
+ const h = t.anchor instanceof HTMLElement ? {} : t.anchor, g = E.getBoundingClientRect(), a = d.getBoundingClientRect();
77
+ h.matchWidth && (a.width = g.width), h.matchHeight && (a.height = g.height);
78
+ const f = h.class ? Array.isArray(h.class) ? h.class : [h.class] : [];
79
+ let m, C;
80
+ if (h.y === "center")
81
+ m = g.top + g.height / 2 - a.height / 2, f.push("anchored-center-y");
81
82
  else {
82
- const B = (w.bottom + c.height < window.innerHeight || m.y === "below") && m.y !== "above";
83
- y = B ? w.bottom : w.top - c.height, f.push(B ? "anchored-top" : "anchored-bottom");
83
+ const B = (g.bottom + a.height < window.innerHeight || h.y === "below") && h.y !== "above";
84
+ m = B ? g.bottom : g.top - a.height, f.push(B ? "anchored-top" : "anchored-bottom");
84
85
  }
85
- if (m.x === "center")
86
- C = w.left + w.width / 2 - c.width / 2, f.push("anchored-center-x");
86
+ if (h.x === "center")
87
+ C = g.left + g.width / 2 - a.width / 2, f.push("anchored-center-x");
87
88
  else {
88
- const B = (w.left + c.width < window.innerWidth || m.x === "left") && m.x !== "right";
89
- C = B ? w.left : w.right - c.width, f.push(B ? "anchored-left" : "anchored-right");
89
+ const B = (g.left + a.width < window.innerWidth || h.x === "left") && h.x !== "right";
90
+ C = B ? g.left : g.right - a.width, f.push(B ? "anchored-left" : "anchored-right");
90
91
  }
91
92
  return {
92
93
  styles: {
93
- top: `${y}px`,
94
+ top: `${m}px`,
94
95
  left: `${C}px`,
95
- ...m.matchWidth ? { width: `${c.width}px` } : {},
96
- ...m.matchHeight ? { height: `${c.height}px` } : {}
96
+ ...h.matchWidth ? { width: `${a.width}px` } : {},
97
+ ...h.matchHeight ? { height: `${a.height}px` } : {}
97
98
  },
98
99
  classes: f
99
100
  };
100
101
  }
101
- function u() {
102
- window.removeEventListener("click", u), ln(t.overlayId);
102
+ function c() {
103
+ window.removeEventListener("click", c), rn(t.overlayId);
103
104
  }
104
- return N(() => {
105
+ return _(() => {
105
106
  setTimeout(() => {
106
- window.addEventListener("click", u);
107
+ window.addEventListener("click", c);
107
108
  }, 10);
108
- }), (d, h) => (b(), k("div", {
109
- class: V(["vf-overlay-anchor", r.value]),
110
- style: $t(o.value),
111
- onClick: ke(u, ["stop"])
109
+ }), (d, E) => (b(), k("div", {
110
+ class: H(["vf-overlay-anchor", l.value]),
111
+ style: Ht(o.value),
112
+ onClick: ke(c, ["stop"])
112
113
  }, [
113
- U(d.$slots, "default")
114
+ W(d.$slots, "default")
114
115
  ], 6));
115
116
  }
116
117
  });
117
118
  let sn = 0;
118
- const A = Bt([]);
119
+ const A = At([]);
119
120
  I(A, () => {
120
121
  F.onOverlaysChanged?.(A.length);
121
122
  });
122
- const Wo = _({
123
+ const Ro = N({
123
124
  setup() {
124
125
  return () => ae("div", [
125
- le(A, (e) => ae(Nt, { key: e.id, to: "#vf-overlay-target" }, [e.wrapperVnode ?? e.vnode]))
126
+ re(A, (e) => ae($t, { key: e.id, to: "#vf-overlay-target" }, [e.wrapperVnode ?? e.vnode]))
126
127
  ]);
127
128
  }
128
129
  });
129
130
  function ce(e, t, n) {
130
131
  const o = document.getElementById("vf-overlay-target") ?? document.createElement("div");
131
132
  o.id = "vf-overlay-target", o.removeAttribute("inert"), document.body.appendChild(o);
132
- const r = String(++sn), s = _t(e), a = ae(s, t), l = n?.anchor ? ae(on, { overlayId: r, anchor: n.anchor }, () => [a]) : void 0, u = {
133
- id: r,
133
+ const l = String(++sn), s = Bt(e), u = ae(s, t), r = n?.anchor ? ae(on, { overlayId: l, anchor: n.anchor }, () => [u]) : void 0, c = {
134
+ id: l,
134
135
  component: s,
135
136
  props: t,
136
137
  options: n ?? {},
137
- vnode: a,
138
- wrapperVnode: l
138
+ vnode: u,
139
+ wrapperVnode: r
139
140
  };
140
- return A.push(u), u;
141
+ return A.push(c), c;
141
142
  }
142
- function qo(e) {
143
- e.$ && ot(e.$);
143
+ function Wo(e) {
144
+ e.$ && nt(e.$);
144
145
  }
145
- function ot(e) {
146
+ function nt(e) {
146
147
  let t = e;
147
- for (; t && !rn(t.vnode); )
148
+ for (; t && !ln(t.vnode); )
148
149
  t = t.parent;
149
150
  }
150
- function rn(e) {
151
+ function ln(e) {
151
152
  const t = A.findIndex((n) => n.vnode.component === e.component);
152
153
  return t >= 0 ? (A[t].props.callback(), !0) : !1;
153
154
  }
154
- function ln(e) {
155
+ function rn(e) {
155
156
  const t = A.findIndex((n) => n.id === e);
156
157
  return t >= 0 ? (A[t].props.callback(), !0) : !1;
157
158
  }
@@ -161,16 +162,16 @@ function Q(e) {
161
162
  }
162
163
  async function Te(e, t, n) {
163
164
  return new Promise((o) => {
164
- let r = null;
165
- const a = { ...t, callback: async (l) => {
165
+ let l = null;
166
+ const u = { ...t, callback: async (r) => {
166
167
  if (n?.onCallback) {
167
- const u = n.onCallback(l);
168
- if (typeof u == "object" && "then" in u && typeof u.then == "function" && await u === !1)
168
+ const c = n.onCallback(r);
169
+ if (typeof c == "object" && "then" in c && typeof c.then == "function" && await c === !1)
169
170
  return;
170
171
  }
171
- Q(r), o(l);
172
+ Q(l), o(r);
172
173
  } };
173
- r = ce(e, a, n);
174
+ l = ce(e, u, n);
174
175
  });
175
176
  }
176
177
  async function an(e, t) {
@@ -187,14 +188,14 @@ function te(e, t) {
187
188
  async function un(e, t) {
188
189
  await Te(ne, te(e, t));
189
190
  }
190
- async function zo(e, t) {
191
+ async function jo(e, t) {
191
192
  const n = te(e, t);
192
193
  return await Te(ne, {
193
194
  ...n,
194
195
  shouldConfirm: !0
195
196
  }) === !0;
196
197
  }
197
- async function Ko(e, t) {
198
+ async function Uo(e, t) {
198
199
  const n = te(e, t);
199
200
  return await Te(ne, {
200
201
  ...n,
@@ -202,7 +203,7 @@ async function Ko(e, t) {
202
203
  classes: ["destructive", ...n.classes]
203
204
  }) === !0;
204
205
  }
205
- function Yo(e, t) {
206
+ function Po(e, t) {
206
207
  const n = te(e, t), o = ce(ne, {
207
208
  ...n,
208
209
  isBare: !0,
@@ -212,7 +213,7 @@ function Yo(e, t) {
212
213
  });
213
214
  return () => Q(o);
214
215
  }
215
- function Xo(e, t) {
216
+ function qo(e, t) {
216
217
  const n = te(e, t), o = ce(ne, {
217
218
  ...n,
218
219
  isBare: !0,
@@ -221,8 +222,8 @@ function Xo(e, t) {
221
222
  }
222
223
  });
223
224
  return {
224
- update: (r) => {
225
- an(o, { message: r });
225
+ update: (l) => {
226
+ an(o, { message: l });
226
227
  },
227
228
  dismiss: () => Q(o)
228
229
  };
@@ -245,7 +246,7 @@ function Se(e) {
245
246
  function dn(e) {
246
247
  return e instanceof Error || typeof e == "object" && e !== null && "message" in e && "name" in e;
247
248
  }
248
- async function Go(e, t) {
249
+ async function zo(e, t) {
249
250
  const n = Se(e);
250
251
  return n instanceof de || F.errorHandler(n), un({
251
252
  title: t?.title,
@@ -253,28 +254,28 @@ async function Go(e, t) {
253
254
  classes: t?.classes
254
255
  });
255
256
  }
256
- async function Zo(e) {
257
+ async function Ko(e) {
257
258
  const t = Se(e);
258
259
  t instanceof de || F.errorHandler(t);
259
260
  }
260
- const G = Symbol("MaskState");
261
- function Jo(e, t) {
261
+ const Z = Symbol("MaskState");
262
+ function Yo(e, t) {
262
263
  const n = e.$?.vnode.el, o = n.closest(".vf-modal");
263
264
  return fn(o ?? n, t);
264
265
  }
265
- function Qo(e) {
266
+ function Xo(e) {
266
267
  const t = e.$?.vnode.el, n = t.closest(".vf-modal");
267
- return st(n ?? t);
268
+ return ot(n ?? t);
268
269
  }
269
270
  function fn(e, t) {
270
- if (!e[G]) {
271
+ if (!e[Z]) {
271
272
  const n = document.createElement("div");
272
- n.classList.add("vf-mask"), e.appendChild(n), e[G] = { maskEl: n };
273
+ n.classList.add("vf-mask"), e.appendChild(n), e[Z] = { maskEl: n };
273
274
  }
274
- return e[G].maskEl.innerText = t ?? "", () => st(e);
275
+ return e[Z].maskEl.innerText = t ?? "", () => ot(e);
275
276
  }
276
- function st(e) {
277
- e[G] && e.removeChild(e[G].maskEl);
277
+ function ot(e) {
278
+ e[Z] && e.removeChild(e[Z].maskEl);
278
279
  }
279
280
  const Ee = Symbol("FormMaskState");
280
281
  function pn(e, t, n) {
@@ -282,17 +283,17 @@ function pn(e, t, n) {
282
283
  if (!o) return () => {
283
284
  };
284
285
  o.classList.add("vf-masked");
285
- const r = t instanceof Element ? t : o.querySelectorAll(t ?? 'button:not([disabled]):not([type="button"])')[0];
286
+ const l = t instanceof Element ? t : o.querySelectorAll(t ?? 'button:not([disabled]):not([type="button"])')[0];
286
287
  let s;
287
- r && (s = r.tagName === "INPUT" ? r.value : r.innerHTML, r.setAttribute("disabled", "disabled"), r.innerText = n ?? "Please wait...");
288
- const l = [...o.querySelectorAll("input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled])")];
289
- return l.forEach((u) => u.setAttribute("disabled", "disabled")), o[Ee] = {
290
- disabledElements: l,
291
- waitButton: r,
288
+ l && (s = l.tagName === "INPUT" ? l.value : l.innerHTML, l.setAttribute("disabled", "disabled"), l.innerText = n ?? "Please wait...");
289
+ const r = [...o.querySelectorAll("input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled])")];
290
+ return r.forEach((c) => c.setAttribute("disabled", "disabled")), o[Ee] = {
291
+ disabledElements: r,
292
+ waitButton: l,
292
293
  buttonHtml: s
293
- }, () => rt(o);
294
+ }, () => st(o);
294
295
  }
295
- function rt(e) {
296
+ function st(e) {
296
297
  const t = e instanceof Element ? e : it(e);
297
298
  if (!t) return;
298
299
  const n = t[Ee];
@@ -308,7 +309,7 @@ const vn = ["id"], mn = {
308
309
  }, hn = { class: "vf-modal-content" }, yn = {
309
310
  key: 1,
310
311
  class: "vf-modal-footer"
311
- }, gn = /* @__PURE__ */ _({
312
+ }, gn = /* @__PURE__ */ N({
312
313
  __name: "vf-modal",
313
314
  props: {
314
315
  id: {},
@@ -320,68 +321,68 @@ const vn = ["id"], mn = {
320
321
  emits: ["formSubmit"],
321
322
  setup(e, { expose: t }) {
322
323
  const n = be(), o = e;
323
- t({ mask: m, unmask: w, hide: c, unhide: f });
324
- const r = S(), s = S(), a = S(!1), l = T(() => nt([...Array.isArray(o.class) ? o.class : [o.class], a.value && "hidden"]));
325
- N(() => {
326
- document.body.classList.add("vf-modal-open"), o.closeOnMaskClick && (window.addEventListener("keydown", d), r.value?.addEventListener("click", u));
324
+ t({ mask: h, unmask: g, hide: a, unhide: f });
325
+ const l = S(), s = S(), u = S(!1), r = T(() => tt([...Array.isArray(o.class) ? o.class : [o.class], u.value && "hidden"]));
326
+ _(() => {
327
+ document.body.classList.add("vf-modal-open"), o.closeOnMaskClick && (window.addEventListener("keydown", d), l.value?.addEventListener("click", c));
327
328
  }), ue(() => {
328
329
  window.removeEventListener("keydown", d), document.body.querySelectorAll(".vf-modal").length > 0 || document.body.classList.remove("vf-modal-open");
329
330
  });
330
- function u(y) {
331
- y.target == r.value && h();
331
+ function c(m) {
332
+ m.target == l.value && E();
332
333
  }
333
- function d(y) {
334
- if (y.key === "Esc" || y.key === "Escape") {
334
+ function d(m) {
335
+ if (m.key === "Esc" || m.key === "Escape") {
335
336
  const C = document.querySelectorAll(".vf-modal-wrap");
336
- C[C.length - 1] === r.value && h();
337
+ C[C.length - 1] === l.value && E();
337
338
  }
338
339
  }
339
- function h() {
340
- ot(n);
340
+ function E() {
341
+ nt(n);
341
342
  }
342
- function m() {
343
- return pn(s.value), () => w();
343
+ function h() {
344
+ return pn(s.value), () => g();
344
345
  }
345
- function w() {
346
- rt(s.value);
346
+ function g() {
347
+ st(s.value);
347
348
  }
348
- function c() {
349
- return a.value = !0, () => f();
349
+ function a() {
350
+ return u.value = !0, () => f();
350
351
  }
351
352
  function f() {
352
- a.value = !1;
353
+ u.value = !1;
353
354
  }
354
- return (y, C) => (b(), k("div", {
355
- id: y.id,
355
+ return (m, C) => (b(), k("div", {
356
+ id: m.id,
356
357
  ref_key: "overlay",
357
- ref: r,
358
- class: V(["vf-overlay vf-modal-wrap", l.value])
358
+ ref: l,
359
+ class: H(["vf-overlay vf-modal-wrap", r.value])
359
360
  }, [
360
361
  $("form", {
361
362
  ref_key: "form",
362
363
  ref: s,
363
364
  action: ".",
364
- class: V(["vf-modal", { scrolls: y.scrolls }]),
365
- onSubmit: C[0] || (C[0] = ke((x) => y.$emit("formSubmit"), ["prevent"]))
365
+ class: H(["vf-modal", { scrolls: m.scrolls }]),
366
+ onSubmit: C[0] || (C[0] = ke((x) => m.$emit("formSubmit"), ["prevent"]))
366
367
  }, [
367
- y.$slots.header ? (b(), k("div", mn, [
368
- U(y.$slots, "header"),
368
+ m.$slots.header ? (b(), k("div", mn, [
369
+ W(m.$slots, "header"),
369
370
  o.closeX ? (b(), k("i", {
370
371
  key: 0,
371
372
  class: "close",
372
- onClick: h
373
- })) : H("", !0)
374
- ])) : H("", !0),
373
+ onClick: E
374
+ })) : V("", !0)
375
+ ])) : V("", !0),
375
376
  $("div", hn, [
376
- U(y.$slots, "default")
377
+ W(m.$slots, "default")
377
378
  ]),
378
- y.$slots.footer ? (b(), k("div", yn, [
379
- U(y.$slots, "footer")
380
- ])) : H("", !0)
379
+ m.$slots.footer ? (b(), k("div", yn, [
380
+ W(m.$slots, "footer")
381
+ ])) : V("", !0)
381
382
  ], 34)
382
383
  ], 10, vn));
383
384
  }
384
- }), wn = ["innerHtml"], En = ["innerText"], ne = /* @__PURE__ */ _({
385
+ }), wn = ["innerHtml"], En = ["innerText"], ne = /* @__PURE__ */ N({
385
386
  __name: "vf-alert-modal",
386
387
  props: {
387
388
  isBare: { type: Boolean },
@@ -395,16 +396,16 @@ const vn = ["id"], mn = {
395
396
  },
396
397
  setup(e) {
397
398
  const t = e, n = T(() => t.message instanceof Error ? cn(t.message) : t.message);
398
- return (o, r) => {
399
- const s = Rt("autofocus");
400
- return b(), Qe(gn, {
401
- class: V(["vf-alert", ...o.classes ?? []])
402
- }, Ut({
399
+ return (o, l) => {
400
+ const s = _t("autofocus");
401
+ return b(), Je(gn, {
402
+ class: H(["vf-alert", ...o.classes ?? []])
403
+ }, Nt({
403
404
  default: he(() => [
404
405
  o.iconClass ? (b(), k("i", {
405
406
  key: 0,
406
- class: V(["vf-alert-icon", o.iconClass])
407
- }, null, 2)) : H("", !0),
407
+ class: H(["vf-alert-icon", o.iconClass])
408
+ }, null, 2)) : V("", !0),
408
409
  o.isHtml ? (b(), k("div", {
409
410
  key: 1,
410
411
  innerHtml: o.message,
@@ -426,24 +427,24 @@ const vn = ["id"], mn = {
426
427
  o.isBare ? void 0 : {
427
428
  name: "footer",
428
429
  fn: he(() => [
429
- o.shouldConfirm ? (b(), k(ie, { key: 0 }, [
430
- re((b(), k("button", {
430
+ o.shouldConfirm ? (b(), k(le, { key: 0 }, [
431
+ ie((b(), k("button", {
431
432
  class: "primary",
432
- onClick: r[0] || (r[0] = () => o.callback(!0))
433
- }, r[3] || (r[3] = [
433
+ onClick: l[0] || (l[0] = () => o.callback(!0))
434
+ }, l[3] || (l[3] = [
434
435
  X("Confirm")
435
436
  ]))), [
436
437
  [s]
437
438
  ]),
438
439
  $("button", {
439
440
  class: "default",
440
- onClick: r[1] || (r[1] = () => o.callback(!1))
441
+ onClick: l[1] || (l[1] = () => o.callback(!1))
441
442
  }, "Cancel")
442
- ], 64)) : re((b(), k("button", {
443
+ ], 64)) : ie((b(), k("button", {
443
444
  key: 1,
444
445
  class: "default",
445
- onClick: r[2] || (r[2] = () => o.callback(!0))
446
- }, r[4] || (r[4] = [
446
+ onClick: l[2] || (l[2] = () => o.callback(!0))
447
+ }, l[4] || (l[4] = [
447
448
  X("OK")
448
449
  ]))), [
449
450
  [s]
@@ -455,138 +456,66 @@ const vn = ["id"], mn = {
455
456
  };
456
457
  }
457
458
  });
458
- function es(e, t, n) {
459
+ function Zo(e, t, n) {
459
460
  const o = typeof t == "function" ? e.findIndex(t) : e.indexOf(t);
460
461
  return o === -1 ? !1 : (e.splice(o, 1, n), !0);
461
462
  }
462
- function ts(e, t) {
463
+ function Go(e, t) {
463
464
  const n = document.createElement("div");
464
- n.classList.add("vf-overlay"), n.addEventListener("click", m), document.body.appendChild(n);
465
+ n.classList.add("vf-overlay"), n.addEventListener("click", h), document.body.appendChild(n);
465
466
  const o = document.createElement("div");
466
467
  o.classList.add("vf-context-menu"), o.style.position = "absolute", n.appendChild(o);
467
- const r = e.currentTarget;
468
- r.style.userSelect = "none", r.classList.add("context-menu-active"), t.targetClass && r.classList.add(t.targetClass), t.class && o.classList.add(t.class), t.items.forEach((c) => {
469
- if (c == "-") {
470
- const y = document.createElement("div");
471
- y.classList.add("separator"), o.appendChild(y);
468
+ const l = e.currentTarget;
469
+ l.style.userSelect = "none", l.classList.add("context-menu-active"), t.targetClass && l.classList.add(t.targetClass), t.class && o.classList.add(t.class), t.items.forEach((a) => {
470
+ if (a == "-") {
471
+ const m = document.createElement("div");
472
+ m.classList.add("separator"), o.appendChild(m);
472
473
  return;
473
474
  }
474
475
  const f = document.createElement("div");
475
- f.classList.add("item"), f.style.userSelect = "none", f.innerText = c.title, o.appendChild(f), c.class && f.classList.add(c.class), c.shouldConfirm ? f.addEventListener("click", (y) => w(y, f, c.handler)) : f.addEventListener("click", () => c.handler());
476
+ f.classList.add("item"), f.style.userSelect = "none", f.innerText = a.title, o.appendChild(f), a.class && f.classList.add(a.class), a.shouldConfirm ? f.addEventListener("click", (m) => g(m, f, a.handler)) : f.addEventListener("click", () => a.handler());
476
477
  });
477
- const s = window.innerWidth - e.clientX, a = window.innerHeight - e.clientY, l = o.offsetHeight, u = o.offsetWidth, d = s < u ? e.clientX - u - 1 : e.clientX + 1, h = a < l ? e.clientY - l - 1 : e.clientY + 1;
478
- o.style.left = d + "px", o.style.top = h + "px", setTimeout(() => {
478
+ const s = window.innerWidth - e.clientX, u = window.innerHeight - e.clientY, r = o.offsetHeight, c = o.offsetWidth, d = s < c ? e.clientX - c - 1 : e.clientX + 1, E = u < r ? e.clientY - r - 1 : e.clientY + 1;
479
+ o.style.left = d + "px", o.style.top = E + "px", setTimeout(() => {
479
480
  o.style.width = o.offsetWidth + "px";
480
481
  }, 50);
481
- function m() {
482
- t.targetClass && r.classList.remove(t.targetClass), r.classList.remove("context-menu-active"), r.style.userSelect = "", n.remove();
482
+ function h() {
483
+ t.targetClass && l.classList.remove(t.targetClass), l.classList.remove("context-menu-active"), l.style.userSelect = "", n.remove();
483
484
  }
484
- function w(c, f, y) {
485
+ function g(a, f, m) {
485
486
  if (f.classList.contains("pending-confirm"))
486
- return y();
487
+ return m();
487
488
  const C = f.innerHTML;
488
489
  f.classList.add("pending-confirm"), f.innerText = "Confirm";
489
490
  const x = () => {
490
491
  f.classList.remove("pending-confirm"), f.innerHTML = C, f.removeEventListener("mouseleave", x);
491
492
  };
492
- f.addEventListener("mouseleave", x), c.stopPropagation();
493
+ f.addEventListener("mouseleave", x), a.stopPropagation();
493
494
  }
494
495
  }
495
- const bn = (e) => new Promise((t) => setTimeout(t, e)), ns = (e) => bn(e * 1e3);
496
+ const bn = (e) => new Promise((t) => setTimeout(t, e)), Jo = (e) => bn(e * 1e3);
496
497
  function kn(e) {
497
498
  return e.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
498
499
  }
499
- function os(e, t) {
500
- return e != null ? Pt(e) : t;
500
+ function Qo(e, t) {
501
+ return e != null ? Wt(e) : t;
501
502
  }
502
- function ss(e, t) {
503
+ function es(e, t) {
503
504
  const n = { ...e };
504
505
  for (const o of t)
505
506
  n[o] === "" && (n[o] = null);
506
507
  return n;
507
508
  }
508
- function je(e) {
509
+ function We(e) {
509
510
  return e != null;
510
511
  }
511
- class Ce {
512
- validator = null;
513
- lastModifiedDate = null;
514
- size = 0;
515
- path = "";
516
- name = "";
517
- type = "";
518
- }
519
- class Tn extends Ce {
520
- blob;
521
- constructor(t) {
522
- super(), this.blob = t;
523
- }
524
- }
525
- class Sn extends Ce {
526
- uri;
527
- constructor(t) {
528
- super(), this.uri = t.uri, this.name = t.name ?? void 0, this.type = t.type ?? t.mimeType ?? void 0, this.size = t.size ?? 0;
529
- }
530
- }
531
- function Cn(e) {
532
- if (typeof e.body != "object" || !Object.values(e.body).some((r) => r instanceof Ce))
533
- return e;
534
- const n = new FormData(), o = {};
535
- for (const [r, s] of Object.entries(e.body))
536
- s instanceof Sn ? n.append(r, s) : s instanceof Tn ? n.append(r, s.blob) : o[r] = s;
537
- return n.append("_payload", JSON.stringify(o)), {
538
- ...e,
539
- headers: {
540
- ...e.headers,
541
- "content-type": null
542
- // deletes default JSON content-type header
543
- },
544
- body: n,
545
- bodySerializer: void 0
546
- };
547
- }
548
- class lt extends Error {
549
- request;
550
- response;
551
- body;
552
- constructor(t, n, o, r) {
553
- super(t), this.request = n, this.response = o, this.body = r;
554
- }
555
- }
556
- function xn(e, t) {
557
- e.setConfig({
558
- throwOnError: !0
559
- }), e.interceptors.error.use((s, a, l, u) => {
560
- const d = Mn(s, a), h = new lt(d, l, a, s);
561
- if (t.onError) {
562
- const m = t.onError(h, u);
563
- if (m instanceof Error)
564
- throw m;
565
- if (m === null)
566
- return new Promise(() => {
567
- });
568
- }
569
- throw h;
570
- }), t.headers && e.interceptors.request.use(async (s) => {
571
- const a = typeof t.headers == "function" ? await t.headers(s) : t.headers;
572
- if (a)
573
- for (const [l, u] of Object.entries(a))
574
- u === null ? s.headers.delete(l) : u !== void 0 && s.headers.set(l, u);
575
- return s;
576
- });
577
- const n = t.wrapper ?? ((s, a) => a(s)), o = e.request, r = (s) => (s = Cn(s), n(s, o));
578
- e.request = r, e.connect = (s) => r({ ...s, method: "CONNECT" }), e.delete = (s) => r({ ...s, method: "DELETE" }), e.get = (s) => r({ ...s, method: "GET" }), e.head = (s) => r({ ...s, method: "HEAD" }), e.options = (s) => r({ ...s, method: "OPTIONS" }), e.patch = (s) => r({ ...s, method: "PATCH" }), e.post = (s) => r({ ...s, method: "POST" }), e.put = (s) => r({ ...s, method: "PUT" }), e.trace = (s) => r({ ...s, method: "TRACE" });
579
- }
580
- function Mn(e, t) {
581
- return e && typeof e == "object" ? "error" in e && typeof e.error == "string" ? `${e.error} (${t.status})` : JSON.stringify(e) : String(e);
582
- }
583
- function rs(e, t) {
584
- xn(e, {
512
+ function ts(e, t) {
513
+ Xt(e, {
585
514
  ...t,
586
515
  onError(n, o) {
587
- n instanceof lt && n.response.status === 422 && typeof n.body == "object" && n.body && "error" in n.body && typeof n.body.error == "string" && (n = new de(n.body.error));
588
- const r = t.onError?.(n, o);
589
- return r !== void 0 ? r : n;
516
+ n instanceof Zt && n.response.status === 422 && typeof n.body == "object" && n.body && "error" in n.body && typeof n.body.error == "string" && (n = new de(n.body.error));
517
+ const l = t.onError?.(n, o);
518
+ return l !== void 0 ? l : n;
590
519
  }
591
520
  });
592
521
  }
@@ -597,7 +526,7 @@ function rs(e, t) {
597
526
  * Copyright (c) 2021 Jason Wilson
598
527
  * Released under MIT license
599
528
  */
600
- var Ln = {
529
+ var Tn = {
601
530
  symbol: "$",
602
531
  separator: ",",
603
532
  decimal: ".",
@@ -605,41 +534,41 @@ var Ln = {
605
534
  precision: 2,
606
535
  pattern: "!#",
607
536
  negativePattern: "-!#",
608
- format: Dn,
537
+ format: Mn,
609
538
  fromCents: !1
610
- }, at = function(t) {
539
+ }, lt = function(t) {
611
540
  return Math.round(t);
612
- }, xe = function(t) {
541
+ }, Ce = function(t) {
613
542
  return Math.pow(10, t);
614
- }, Fn = function(t, n) {
615
- return at(t / n) * n;
616
- }, On = /(\d)(?=(\d{3})+\b)/g, In = /(\d)(?=(\d\d)+\d\b)/g;
543
+ }, Sn = function(t, n) {
544
+ return lt(t / n) * n;
545
+ }, Cn = /(\d)(?=(\d{3})+\b)/g, xn = /(\d)(?=(\d\d)+\d\b)/g;
617
546
  function D(e, t) {
618
547
  var n = this;
619
548
  if (!(n instanceof D))
620
549
  return new D(e, t);
621
- var o = Object.assign({}, Ln, t), r = xe(o.precision), s = se(e, o);
622
- n.intValue = s, n.value = s / r, o.increment = o.increment || 1 / r, o.useVedic ? o.groups = In : o.groups = On, this.s = o, this.p = r;
550
+ var o = Object.assign({}, Tn, t), l = Ce(o.precision), s = se(e, o);
551
+ n.intValue = s, n.value = s / l, o.increment = o.increment || 1 / l, o.useVedic ? o.groups = xn : o.groups = Cn, this.s = o, this.p = l;
623
552
  }
624
553
  function se(e, t) {
625
- var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !0, o = 0, r = t.decimal, s = t.errorOnInvalid, a = t.precision, l = t.fromCents, u = xe(a), d = typeof e == "number", h = e instanceof D;
626
- if (h && l)
554
+ var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !0, o = 0, l = t.decimal, s = t.errorOnInvalid, u = t.precision, r = t.fromCents, c = Ce(u), d = typeof e == "number", E = e instanceof D;
555
+ if (E && r)
627
556
  return e.intValue;
628
- if (d || h)
629
- o = h ? e.value : e;
557
+ if (d || E)
558
+ o = E ? e.value : e;
630
559
  else if (typeof e == "string") {
631
- var m = new RegExp("[^-\\d" + r + "]", "g"), w = new RegExp("\\" + r, "g");
632
- o = e.replace(/\((.*)\)/, "-$1").replace(m, "").replace(w, "."), o = o || 0;
560
+ var h = new RegExp("[^-\\d" + l + "]", "g"), g = new RegExp("\\" + l, "g");
561
+ o = e.replace(/\((.*)\)/, "-$1").replace(h, "").replace(g, "."), o = o || 0;
633
562
  } else {
634
563
  if (s)
635
564
  throw Error("Invalid Input");
636
565
  o = 0;
637
566
  }
638
- return l || (o *= u, o = o.toFixed(4)), n ? at(o) : o;
567
+ return r || (o *= c, o = o.toFixed(4)), n ? lt(o) : o;
639
568
  }
640
- function Dn(e, t) {
641
- var n = t.pattern, o = t.negativePattern, r = t.symbol, s = t.separator, a = t.decimal, l = t.groups, u = ("" + e).replace(/^-/, "").split("."), d = u[0], h = u[1];
642
- return (e.value >= 0 ? n : o).replace("!", r).replace("#", d.replace(l, "$1" + s) + (h ? a + h : ""));
569
+ function Mn(e, t) {
570
+ var n = t.pattern, o = t.negativePattern, l = t.symbol, s = t.separator, u = t.decimal, r = t.groups, c = ("" + e).replace(/^-/, "").split("."), d = c[0], E = c[1];
571
+ return (e.value >= 0 ? n : o).replace("!", l).replace("#", d.replace(r, "$1" + s) + (E ? u + E : ""));
643
572
  }
644
573
  D.prototype = {
645
574
  /**
@@ -648,8 +577,8 @@ D.prototype = {
648
577
  * @returns {currency}
649
578
  */
650
579
  add: function(t) {
651
- var n = this.intValue, o = this.s, r = this.p;
652
- return D((n += se(t, o)) / (o.fromCents ? 1 : r), o);
580
+ var n = this.intValue, o = this.s, l = this.p;
581
+ return D((n += se(t, o)) / (o.fromCents ? 1 : l), o);
653
582
  },
654
583
  /**
655
584
  * Subtracts value.
@@ -657,8 +586,8 @@ D.prototype = {
657
586
  * @returns {currency}
658
587
  */
659
588
  subtract: function(t) {
660
- var n = this.intValue, o = this.s, r = this.p;
661
- return D((n -= se(t, o)) / (o.fromCents ? 1 : r), o);
589
+ var n = this.intValue, o = this.s, l = this.p;
590
+ return D((n -= se(t, o)) / (o.fromCents ? 1 : l), o);
662
591
  },
663
592
  /**
664
593
  * Multiplies values.
@@ -667,7 +596,7 @@ D.prototype = {
667
596
  */
668
597
  multiply: function(t) {
669
598
  var n = this.intValue, o = this.s;
670
- return D((n *= t) / (o.fromCents ? 1 : xe(o.precision)), o);
599
+ return D((n *= t) / (o.fromCents ? 1 : Ce(o.precision)), o);
671
600
  },
672
601
  /**
673
602
  * Divides value.
@@ -685,9 +614,9 @@ D.prototype = {
685
614
  * @returns {array}
686
615
  */
687
616
  distribute: function(t) {
688
- for (var n = this.intValue, o = this.p, r = this.s, s = [], a = Math[n >= 0 ? "floor" : "ceil"](n / t), l = Math.abs(n - a * t), u = r.fromCents ? 1 : o; t !== 0; t--) {
689
- var d = D(a / u, r);
690
- l-- > 0 && (d = d[n >= 0 ? "add" : "subtract"](1 / u)), s.push(d);
617
+ for (var n = this.intValue, o = this.p, l = this.s, s = [], u = Math[n >= 0 ? "floor" : "ceil"](n / t), r = Math.abs(n - u * t), c = l.fromCents ? 1 : o; t !== 0; t--) {
618
+ var d = D(u / c, l);
619
+ r-- > 0 && (d = d[n >= 0 ? "add" : "subtract"](1 / c)), s.push(d);
691
620
  }
692
621
  return s;
693
622
  },
@@ -721,7 +650,7 @@ D.prototype = {
721
650
  */
722
651
  toString: function() {
723
652
  var t = this.intValue, n = this.p, o = this.s;
724
- return Fn(t / n, o.increment).toFixed(o.precision);
653
+ return Sn(t / n, o.increment).toFixed(o.precision);
725
654
  },
726
655
  /**
727
656
  * Value for JSON serialization.
@@ -734,55 +663,55 @@ D.prototype = {
734
663
  const M = [];
735
664
  for (let e = 0; e < 256; ++e)
736
665
  M.push((e + 256).toString(16).slice(1));
737
- function Hn(e, t = 0) {
666
+ function Ln(e, t = 0) {
738
667
  return (M[e[t + 0]] + M[e[t + 1]] + M[e[t + 2]] + M[e[t + 3]] + "-" + M[e[t + 4]] + M[e[t + 5]] + "-" + M[e[t + 6]] + M[e[t + 7]] + "-" + M[e[t + 8]] + M[e[t + 9]] + "-" + M[e[t + 10]] + M[e[t + 11]] + M[e[t + 12]] + M[e[t + 13]] + M[e[t + 14]] + M[e[t + 15]]).toLowerCase();
739
668
  }
740
669
  let ye;
741
- const Vn = new Uint8Array(16);
742
- function An() {
670
+ const Fn = new Uint8Array(16);
671
+ function On() {
743
672
  if (!ye) {
744
673
  if (typeof crypto > "u" || !crypto.getRandomValues)
745
674
  throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
746
675
  ye = crypto.getRandomValues.bind(crypto);
747
676
  }
748
- return ye(Vn);
677
+ return ye(Fn);
749
678
  }
750
- const $n = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), Pe = { randomUUID: $n };
751
- function Bn(e, t, n) {
752
- if (Pe.randomUUID && !e)
753
- return Pe.randomUUID();
679
+ const In = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), je = { randomUUID: In };
680
+ function Dn(e, t, n) {
681
+ if (je.randomUUID && !e)
682
+ return je.randomUUID();
754
683
  e = e || {};
755
- const o = e.random ?? e.rng?.() ?? An();
684
+ const o = e.random ?? e.rng?.() ?? On();
756
685
  if (o.length < 16)
757
686
  throw new Error("Random bytes length must be >= 16");
758
- return o[6] = o[6] & 15 | 64, o[8] = o[8] & 63 | 128, Hn(o);
687
+ return o[6] = o[6] & 15 | 64, o[8] = o[8] & 63 | 128, Ln(o);
759
688
  }
760
- function is(e) {
689
+ function ns(e) {
761
690
  return e.replace(/\n/g, "<br>");
762
691
  }
763
- function Nn(e) {
692
+ function Vn(e) {
764
693
  return e.replace(/_/g, " ");
765
694
  }
766
- function _n(e) {
695
+ function Hn(e) {
767
696
  const t = e.replace(/\D/g, "").replace(/^1/, "");
768
697
  return t.length !== 10 ? e : "(" + t.substring(0, 3) + ") " + t.substring(3, 6) + "-" + t.substring(6);
769
698
  }
770
- function Rn(e, t) {
699
+ function An(e, t) {
771
700
  return D(e).divide(t ?? F.defaultCurrencyDivisor).format();
772
701
  }
773
- function ls() {
774
- return Bn();
702
+ function os() {
703
+ return Dn();
775
704
  }
776
- const Un = ["disabled", "placeholder", "required", "name"], jn = {
705
+ const $n = ["disabled", "placeholder", "required", "name"], Bn = {
777
706
  key: 0,
778
707
  class: "no-results"
779
- }, Pn = {
708
+ }, _n = {
780
709
  key: 0,
781
710
  class: "group-title"
782
- }, Wn = ["onMousemove", "onMousedown"], qn = ["innerHTML"], zn = ["innerHTML"], Kn = {
711
+ }, Nn = ["onMousemove", "onMousedown"], Rn = ["innerHTML"], Wn = ["innerHTML"], jn = {
783
712
  key: 1,
784
713
  class: "no-results"
785
- }, Yn = "`1234567890-=[]\\;',./~!@#$%^&*()_+{}|:\"<>?qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM", Xn = /* @__PURE__ */ _({
714
+ }, Un = "`1234567890-=[]\\;',./~!@#$%^&*()_+{}|:\"<>?qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM", Pn = /* @__PURE__ */ N({
786
715
  __name: "vf-smart-select",
787
716
  props: {
788
717
  modelValue: {},
@@ -819,36 +748,36 @@ const Un = ["disabled", "placeholder", "required", "name"], jn = {
819
748
  },
820
749
  emits: ["optionsLoaded", "update:modelValue"],
821
750
  setup(e, { expose: t, emit: n }) {
822
- const o = Symbol("null"), r = Symbol("create"), s = e, a = n;
751
+ const o = Symbol("null"), l = Symbol("create"), s = e, u = n;
823
752
  t({
824
- addRemoteOption: Vt
753
+ addRemoteOption: Dt
825
754
  });
826
- const l = S(), u = S(), d = S(), h = S(!1), m = S(), w = S(!1), c = S(""), f = S(null), y = S(null), C = S(!1), x = S(null), B = S(!1), yt = T(() => s.showCreateTextOnNewItem ?? !0), W = T(() => !!(s.options || m.value)), gt = T(() => s.options ?? m.value ?? []), wt = T(() => s.prependOptions ?? []), Et = T(() => s.appendOptions ?? []), Fe = T(() => !!s.disabled || !W.value && (h.value || !s.loadOptions)), z = T(() => s.loadingText || "..."), bt = T(() => !W.value && (!s.loadOptions || s.preload || s.modelValue && (s.valueField || s.valueExtractor)) ? z.value : s.nullTitle ? s.nullTitle : s.placeholder || ""), kt = T(() => s.noResultsText || "No options match your search."), q = T(() => s.valueExtractor ? s.valueExtractor : s.valueField ? (i) => i[s.valueField] : null), fe = T(() => s.keyExtractor ? s.keyExtractor : s.keyField ? (i) => String(i[s.keyField]) : q.value ? (i) => String(q.value(i)) : null), Tt = T(() => s.groupFormatter ? s.groupFormatter : s.groupField ? (i) => String(i[s.groupField]) : null), Oe = T(() => s.formatter ? s.formatter : s.labelField ? (i) => String(i[s.labelField]) : (i) => String(i)), Ie = T(() => s.selectionFormatter ? s.selectionFormatter : Oe.value), De = T(() => [...wt.value, ...gt.value, ...Et.value]), He = T(() => !!(s.groupField || s.groupFormatter)), pe = T(() => De.value.map((i, E) => {
827
- const v = Tt.value?.(i), p = Oe.value(i), g = s.subtitleFormatter?.(i), O = p ? p.trim().toLowerCase() : "", Re = g ? g.trim().toLowerCase() : "", oe = [];
828
- return s.searchFields ? s.searchFields.forEach((Ue) => {
829
- i[Ue] && oe.push(String(i[Ue]).toLowerCase());
830
- }) : (oe.push(O), Re && oe.push(Re)), {
831
- key: fe.value?.(i) ?? String(E),
755
+ const r = S(), c = S(), d = S(), E = S(!1), h = S(), g = S(!1), a = S(""), f = S(null), m = S(null), C = S(!1), x = S(null), B = S(!1), mt = T(() => s.showCreateTextOnNewItem ?? !0), P = T(() => !!(s.options || h.value)), ht = T(() => s.options ?? h.value ?? []), yt = T(() => s.prependOptions ?? []), gt = T(() => s.appendOptions ?? []), Le = T(() => !!s.disabled || !P.value && !s.loadOptions), z = T(() => s.loadingText || "..."), wt = T(() => !P.value && (!s.loadOptions || s.preload || s.modelValue && (s.valueField || s.valueExtractor)) ? z.value : s.nullTitle ? s.nullTitle : s.placeholder || ""), Et = T(() => s.noResultsText || "No options match your search."), q = T(() => s.valueExtractor ? s.valueExtractor : s.valueField ? (i) => i[s.valueField] : null), fe = T(() => s.keyExtractor ? s.keyExtractor : s.keyField ? (i) => String(i[s.keyField]) : q.value ? (i) => String(q.value(i)) : null), bt = T(() => s.groupFormatter ? s.groupFormatter : s.groupField ? (i) => String(i[s.groupField]) : null), Fe = T(() => s.formatter ? s.formatter : s.labelField ? (i) => String(i[s.labelField]) : (i) => String(i)), Oe = T(() => s.selectionFormatter ? s.selectionFormatter : Fe.value), Ie = T(() => [...yt.value, ...ht.value, ...gt.value]), De = T(() => !!(s.groupField || s.groupFormatter)), pe = T(() => Ie.value.map((i, w) => {
756
+ const v = bt.value?.(i), p = Fe.value(i), y = s.subtitleFormatter?.(i), O = p ? p.trim().toLowerCase() : "", Ne = y ? y.trim().toLowerCase() : "", oe = [];
757
+ return s.searchFields ? s.searchFields.forEach((Re) => {
758
+ i[Re] && oe.push(String(i[Re]).toLowerCase());
759
+ }) : (oe.push(O), Ne && oe.push(Ne)), {
760
+ key: fe.value?.(i) ?? String(w),
832
761
  group: v,
833
762
  title: p,
834
- subtitle: g,
763
+ subtitle: y,
835
764
  searchContent: oe.join(""),
836
765
  ref: i
837
766
  };
838
767
  })), L = T(() => {
839
768
  let i = [...pe.value];
840
- if (w.value) {
841
- const E = c.value.trim().toLowerCase();
842
- if (E.length) {
843
- i = i.filter((g) => g.searchContent.includes(E));
844
- const v = Zt(c.value).replace(/[-/\\^$*+?.()|[\]{}]/g, "\\$&"), p = new RegExp(`(${v})`, "ig");
845
- i = i.map((g) => ({
846
- ...g,
847
- title: g.title.replace(p, "<mark>$1</mark>"),
848
- subtitle: g.subtitle?.replace(p, "<mark>$1</mark>")
849
- })), B.value && (i.find((O) => O.searchContent === E) !== void 0 || i.push({
850
- key: r,
851
- title: yt.value ? "Create <strong>" + c.value.trim() + "</strong>..." : c.value.trim()
769
+ if (g.value) {
770
+ const w = a.value.trim().toLowerCase();
771
+ if (w.length) {
772
+ i = i.filter((y) => y.searchContent.includes(w));
773
+ const v = Gt(a.value).replace(/[-/\\^$*+?.()|[\]{}]/g, "\\$&"), p = new RegExp(`(${v})`, "ig");
774
+ i = i.map((y) => ({
775
+ ...y,
776
+ title: y.title.replace(p, "<mark>$1</mark>"),
777
+ subtitle: y.subtitle?.replace(p, "<mark>$1</mark>")
778
+ })), B.value && (i.find((O) => O.searchContent === w) !== void 0 || i.push({
779
+ key: l,
780
+ title: mt.value ? "Create <strong>" + a.value.trim() + "</strong>..." : a.value.trim()
852
781
  }));
853
782
  }
854
783
  } else s.nullTitle && i.unshift({
@@ -856,54 +785,54 @@ const Un = ["disabled", "placeholder", "required", "name"], jn = {
856
785
  title: s.nullTitle
857
786
  });
858
787
  return i;
859
- }), St = T(() => {
860
- if (!He.value)
788
+ }), kt = T(() => {
789
+ if (!De.value)
861
790
  return [
862
791
  {
863
792
  groupTitle: "",
864
793
  options: L.value
865
794
  }
866
795
  ];
867
- const i = Wt(L.value.map((v) => v.group ?? "")), E = qt(L.value, (v) => v.group ?? "");
796
+ const i = jt(L.value.map((v) => v.group ?? "")), w = Ut(L.value, (v) => v.group ?? "");
868
797
  return i.map((v) => ({
869
798
  groupTitle: v,
870
- options: E[v]
799
+ options: w[v]
871
800
  }));
872
801
  });
873
802
  I(() => s.modelValue, me), I(pe, () => {
874
- C.value && setTimeout(Be, 0);
875
- }), I(c, () => {
876
- w.value && !s.remoteSearch && !c.value.trim().length && (w.value = !1);
803
+ C.value && setTimeout($e, 0);
804
+ }), I(a, () => {
805
+ g.value && !s.remoteSearch && !a.value.trim().length && (g.value = !1);
877
806
  }), I(C, () => {
878
- C.value ? setTimeout(It, 0) : (w.value = !1, c.value = y.value ?? "", d.value && (d.value.style.visibility = "hidden"));
807
+ C.value ? setTimeout(Ft, 0) : (g.value = !1, a.value = m.value ?? "", d.value && (d.value.style.visibility = "hidden"));
879
808
  }), I(L, () => {
880
- s.modelValue !== null && f.value === null && me(), (x.value !== null || w.value) && !L.value.find((i) => i.key == x.value) && (x.value = L.value[0]?.key ?? o);
881
- }), N(async () => {
882
- B.value = s.onCreateItem !== void 0, s.loadOptions && s.preload && (c.value = z.value, await Ve(), c.value = ""), !s.options && !s.loadOptions && (s.valueField || s.valueExtractor) ? c.value = z.value : me(), I(f, () => {
883
- const i = je(f.value) && q.value !== null ? q.value(f.value) : f.value;
884
- we(s.modelValue, i) || a("update:modelValue", i);
885
- }), s.remoteSearch && I(c, zt(Ct, 250));
809
+ s.modelValue !== null && f.value === null && me(), (x.value !== null || g.value) && !L.value.find((i) => i.key == x.value) && (x.value = L.value[0]?.key ?? o);
810
+ }), _(async () => {
811
+ B.value = s.onCreateItem !== void 0, s.loadOptions && s.preload && (a.value = z.value, await Ve(), a.value = ""), !s.options && !s.loadOptions && (s.valueField || s.valueExtractor) ? a.value = z.value : me(), I(f, () => {
812
+ const i = We(f.value) && q.value !== null ? q.value(f.value) : f.value;
813
+ we(s.modelValue, i) || u("update:modelValue", i);
814
+ }), s.remoteSearch && I(a, Pt(Tt, 250));
886
815
  }), ue(() => {
887
816
  d.value?.remove();
888
817
  });
889
818
  async function Ve() {
890
- await Ae(), m.value && a("optionsLoaded", m.value);
819
+ await He(), h.value && u("optionsLoaded", h.value);
891
820
  }
892
- async function Ae() {
893
- const i = s.remoteSearch && w.value && c.value.length ? c.value : null;
894
- h.value = !0, m.value = await s.loadOptions?.(i) ?? [], h.value = !1, $e();
821
+ async function He() {
822
+ const i = s.remoteSearch && g.value && a.value.length ? a.value : null;
823
+ E.value = !0, h.value = await s.loadOptions?.(i) ?? [], E.value = !1, Ae();
895
824
  }
896
- function Ct() {
897
- w.value && (Ae(), w.value = c.value.trim().length > 0);
825
+ function Tt() {
826
+ g.value && (He(), g.value = a.value.trim().length > 0);
898
827
  }
899
- function xt(i) {
828
+ function St(i) {
900
829
  if (i.key == "Escape") {
901
830
  i.stopPropagation(), i.target.blur(), _e();
902
831
  return;
903
832
  }
904
833
  if (!(i.key == "ArrowLeft" || i.key == "ArrowRight") && i.key != "Tab") {
905
- if (!W.value) {
906
- w.value || i.preventDefault();
834
+ if (!P.value) {
835
+ g.value || i.preventDefault();
907
836
  return;
908
837
  }
909
838
  if (i.key == "ArrowUp" || i.key == "ArrowDown")
@@ -914,160 +843,160 @@ const Un = ["disabled", "placeholder", "required", "name"], jn = {
914
843
  return i.preventDefault(), ve(i.key == "Home" ? -Number.MAX_SAFE_INTEGER : Number.MAX_SAFE_INTEGER);
915
844
  if (i.key == "Enter") {
916
845
  i.preventDefault();
917
- const E = L.value.find((v) => v.key == x.value);
918
- if (E) return Ne(E);
846
+ const w = L.value.find((v) => v.key == x.value);
847
+ if (w) return Be(w);
919
848
  }
920
849
  if (i.key === "Delete" || i.key === "Backspace") {
921
- c.value.length > 1 && (w.value = !0);
850
+ a.value.length > 1 && (g.value = !0);
922
851
  return;
923
852
  }
924
- !i.metaKey && Yn.includes(i.key) && (w.value = !0);
853
+ !i.metaKey && Un.includes(i.key) && (g.value = !0);
925
854
  }
926
855
  }
927
- function Mt() {
928
- $e(), C.value = !0, setTimeout(() => u.value?.select(), 0);
856
+ function Ct() {
857
+ Ae(), C.value = !0, setTimeout(() => c.value?.select(), 0);
929
858
  }
930
- function $e(i) {
931
- f.value ? x.value = Lt(f.value) : s.nullTitle && (x.value = o);
859
+ function Ae(i) {
860
+ f.value ? x.value = xt(f.value) : s.nullTitle && (x.value = o);
932
861
  }
933
- function Lt(i) {
934
- return fe.value ? fe.value(f.value) : Ft(i)?.key ?? "";
862
+ function xt(i) {
863
+ return fe.value ? fe.value(f.value) : Mt(i)?.key ?? "";
935
864
  }
936
- function Ft(i) {
937
- const E = L.value.find((g) => g.ref === i);
938
- if (E)
939
- return E;
940
- const v = s.keyExtractor ? (g, O) => s.keyExtractor(g) === s.keyExtractor(O) : we, p = L.value.find((g) => v(g.ref, i));
865
+ function Mt(i) {
866
+ const w = L.value.find((y) => y.ref === i);
867
+ if (w)
868
+ return w;
869
+ const v = s.keyExtractor ? (y, O) => s.keyExtractor(y) === s.keyExtractor(O) : we, p = L.value.find((y) => v(y.ref, i));
941
870
  return p || null;
942
871
  }
943
- function Ot() {
944
- s.debug || (!c.value.length && s.nullTitle && (f.value = null, y.value = null), C.value = !1);
872
+ function Lt() {
873
+ s.debug || (!a.value.length && s.nullTitle && (f.value = null, m.value = null), C.value = !1);
945
874
  }
946
- function It() {
947
- W.value || Ve(), s.optionsListId && d.value?.setAttribute("id", s.optionsListId), Dt();
875
+ function Ft() {
876
+ P.value || Ve(), s.optionsListId && d.value?.setAttribute("id", s.optionsListId), Ot();
948
877
  }
949
- function Dt() {
950
- const i = l.value.getBoundingClientRect(), E = i.y + i.height + 2, v = i.x, p = d.value, g = window.getComputedStyle(l.value);
951
- for (let O in g)
952
- /^(font|text)/.test(O) && (p.style[O] = g[O]);
953
- if (p.style.top = E + "px", p.style.left = v + "px", p.style.minWidth = i.width + "px", !g.maxHeight || g.maxHeight == "none") {
954
- const O = window.innerHeight - E - 12;
878
+ function Ot() {
879
+ const i = r.value.getBoundingClientRect(), w = i.y + i.height + 2, v = i.x, p = d.value, y = window.getComputedStyle(r.value);
880
+ for (let O in y)
881
+ /^(font|text)/.test(O) && (p.style[O] = y[O]);
882
+ if (p.style.top = w + "px", p.style.left = v + "px", p.style.minWidth = i.width + "px", !y.maxHeight || y.maxHeight == "none") {
883
+ const O = window.innerHeight - w - 12;
955
884
  p.style.maxHeight = O + "px";
956
885
  }
957
- p.style.visibility = "visible", document.body.appendChild(p), setTimeout(Be, 0);
886
+ p.style.visibility = "visible", document.body.appendChild(p), setTimeout($e, 0);
958
887
  }
959
- function Be() {
960
- if (!W.value || !x.value) return;
961
- const i = L.value.findIndex((p) => p.key == x.value), E = d.value, v = E?.querySelectorAll(".option")[i];
962
- v && (E.scrollTop = v.offsetTop);
888
+ function $e() {
889
+ if (!P.value || !x.value) return;
890
+ const i = L.value.findIndex((p) => p.key == x.value), w = d.value, v = w?.querySelectorAll(".option")[i];
891
+ v && (w.scrollTop = v.offsetTop);
963
892
  }
964
- function Ht(i) {
893
+ function It(i) {
965
894
  x.value = i ? i.key : null;
966
895
  }
967
896
  function ve(i) {
968
- const E = L.value.findIndex((O) => O.key == x.value);
969
- let v = E + i;
970
- if (v < 0 ? v = 0 : v >= L.value.length && (v = L.value.length - 1), E == v) return;
897
+ const w = L.value.findIndex((O) => O.key == x.value);
898
+ let v = w + i;
899
+ if (v < 0 ? v = 0 : v >= L.value.length && (v = L.value.length - 1), w == v) return;
971
900
  x.value = L.value[v].key;
972
- const p = d.value, g = p?.querySelectorAll(".option")[v];
973
- g && (g.offsetTop < p.scrollTop ? p.scrollTop = g.offsetTop : g.offsetTop + g.offsetHeight > p.scrollTop + p.clientHeight && (p.scrollTop = g.offsetTop + g.offsetHeight - p.clientHeight));
901
+ const p = d.value, y = p?.querySelectorAll(".option")[v];
902
+ y && (y.offsetTop < p.scrollTop ? p.scrollTop = y.offsetTop : y.offsetTop + y.offsetHeight > p.scrollTop + p.clientHeight && (p.scrollTop = y.offsetTop + y.offsetHeight - p.clientHeight));
974
903
  }
975
- function Ne(i) {
976
- if (w.value = !1, i.key === o)
977
- c.value = "", f.value = null, y.value = null;
978
- else if (i.key === r) {
979
- const E = c.value.trim();
980
- c.value = "", f.value = null, y.value = null, s.onCreateItem?.(E);
904
+ function Be(i) {
905
+ if (g.value = !1, i.key === o)
906
+ a.value = "", f.value = null, m.value = null;
907
+ else if (i.key === l) {
908
+ const w = a.value.trim();
909
+ a.value = "", f.value = null, m.value = null, s.onCreateItem?.(w);
981
910
  } else {
982
911
  const v = pe.value.find((p) => p.key == i.key).ref;
983
- f.value = v, y.value = Ie.value(v), c.value = y.value ?? "";
912
+ f.value = v, m.value = Oe.value(v), a.value = m.value ?? "";
984
913
  }
985
- u.value?.blur(), _e();
914
+ c.value?.blur(), _e();
986
915
  }
987
916
  function me() {
988
- s.modelValue !== null ? (f.value = q.value ? De.value.find((i) => s.modelValue === q.value(i)) : s.modelValue, y.value = je(f.value) ? Ie.value(f.value) : null, c.value = y.value ?? "") : (f.value = null, y.value = null, c.value = "");
917
+ s.modelValue !== null ? (f.value = q.value ? Ie.value.find((i) => s.modelValue === q.value(i)) : s.modelValue, m.value = We(f.value) ? Oe.value(f.value) : null, a.value = m.value ?? "") : (f.value = null, m.value = null, a.value = "");
989
918
  }
990
- function Vt(i) {
991
- m.value.unshift(i);
919
+ function Dt(i) {
920
+ h.value.unshift(i);
992
921
  }
993
922
  function _e() {
994
923
  if (!s.autoNext) return;
995
- let i = l.value?.parentElement;
924
+ let i = r.value?.parentElement;
996
925
  for (; i && i.tagName !== "FORM" && i.tagName !== "BODY"; )
997
926
  i = i.parentElement;
998
927
  if (!i) return;
999
- const E = i.querySelectorAll('input, button, textarea, select, [tabindex]:not([tabindex="-1"])');
1000
- if (!E) return;
1001
- const v = Array.from(E).findIndex((g) => g === u.value), p = E[v + 1];
928
+ const w = i.querySelectorAll('input, button, textarea, select, [tabindex]:not([tabindex="-1"])');
929
+ if (!w) return;
930
+ const v = Array.from(w).findIndex((y) => y === c.value), p = w[v + 1];
1002
931
  p && setTimeout(() => p.focus(), 0);
1003
932
  }
1004
- return (i, E) => (b(), k("div", {
933
+ return (i, w) => (b(), k("div", {
1005
934
  ref_key: "el",
1006
- ref: l,
1007
- class: V(["vf-smart-select", { disabled: Fe.value, open: C.value }])
935
+ ref: r,
936
+ class: H(["vf-smart-select", { disabled: Le.value, open: C.value }])
1008
937
  }, [
1009
- re($("input", {
938
+ ie($("input", {
1010
939
  ref_key: "searchField",
1011
- ref: u,
1012
- "onUpdate:modelValue": E[0] || (E[0] = (v) => c.value = v),
940
+ ref: c,
941
+ "onUpdate:modelValue": w[0] || (w[0] = (v) => a.value = v),
1013
942
  type: "text",
1014
- disabled: Fe.value,
1015
- class: V({ nullable: !!i.nullTitle }),
1016
- placeholder: bt.value,
943
+ disabled: Le.value,
944
+ class: H({ nullable: !!i.nullTitle }),
945
+ placeholder: wt.value,
1017
946
  required: i.required,
1018
947
  name: i.name,
1019
948
  "data-1p-ignore": "",
1020
- onKeydown: xt,
1021
- onFocus: Mt,
1022
- onBlur: Ot
1023
- }, null, 42, Un), [
1024
- [jt, c.value]
949
+ onKeydown: St,
950
+ onFocus: Ct,
951
+ onBlur: Lt
952
+ }, null, 42, $n), [
953
+ [Rt, a.value]
1025
954
  ]),
1026
955
  C.value ? (b(), k("div", {
1027
956
  key: 0,
1028
957
  ref_key: "optionsContainer",
1029
958
  ref: d,
1030
- class: V(["vf-smart-select-options", { grouped: He.value }])
959
+ class: H(["vf-smart-select-options", { grouped: De.value }])
1031
960
  }, [
1032
- W.value ? (b(!0), k(ie, { key: 1 }, le(St.value, (v) => (b(), k("div", {
961
+ P.value ? (b(!0), k(le, { key: 1 }, re(kt.value, (v) => (b(), k("div", {
1033
962
  key: v.groupTitle,
1034
963
  class: "group"
1035
964
  }, [
1036
- v.groupTitle ? (b(), k("div", Pn, [
1037
- U(i.$slots, "group", {
965
+ v.groupTitle ? (b(), k("div", _n, [
966
+ W(i.$slots, "group", {
1038
967
  group: v.groupTitle
1039
968
  }, () => [
1040
969
  X(R(v.groupTitle), 1)
1041
970
  ])
1042
- ])) : H("", !0),
1043
- (b(!0), k(ie, null, le(v.options, (p) => (b(), k("div", {
971
+ ])) : V("", !0),
972
+ (b(!0), k(le, null, re(v.options, (p) => (b(), k("div", {
1044
973
  key: p.key,
1045
- class: V(["option", [x.value === p.key && "highlighted", p.ref && i.classForOption?.(p.ref)]]),
1046
- onMousemove: (g) => Ht(p),
1047
- onMousedown: (g) => Ne(p)
974
+ class: H(["option", [x.value === p.key && "highlighted", p.ref && i.classForOption?.(p.ref)]]),
975
+ onMousemove: (y) => It(p),
976
+ onMousedown: (y) => Be(p)
1048
977
  }, [
1049
- U(i.$slots, "option", { option: p }, () => [
978
+ W(i.$slots, "option", { option: p }, () => [
1050
979
  $("div", {
1051
980
  class: "title",
1052
981
  innerHTML: p.title
1053
- }, null, 8, qn),
982
+ }, null, 8, Rn),
1054
983
  p.subtitle ? (b(), k("div", {
1055
984
  key: 0,
1056
985
  class: "subtitle",
1057
986
  innerHTML: p.subtitle
1058
- }, null, 8, zn)) : H("", !0)
987
+ }, null, 8, Wn)) : V("", !0)
1059
988
  ])
1060
- ], 42, Wn))), 128)),
1061
- !L.value.length && c.value ? (b(), k("div", Kn, [
1062
- U(i.$slots, "no-results", {}, () => [
1063
- X(R(kt.value), 1)
989
+ ], 42, Nn))), 128)),
990
+ !L.value.length && a.value ? (b(), k("div", jn, [
991
+ W(i.$slots, "no-results", {}, () => [
992
+ X(R(Et.value), 1)
1064
993
  ])
1065
- ])) : H("", !0)
1066
- ]))), 128)) : (b(), k("div", jn, "Loading..."))
1067
- ], 2)) : H("", !0)
994
+ ])) : V("", !0)
995
+ ]))), 128)) : (b(), k("div", Bn, "Loading..."))
996
+ ], 2)) : V("", !0)
1068
997
  ], 2));
1069
998
  }
1070
- }), as = /* @__PURE__ */ _({
999
+ }), ss = /* @__PURE__ */ N({
1071
1000
  __name: "vf-ez-smart-select",
1072
1001
  props: {
1073
1002
  modelValue: {},
@@ -1079,41 +1008,42 @@ const Un = ["disabled", "placeholder", "required", "name"], jn = {
1079
1008
  },
1080
1009
  emits: ["update:modelValue"],
1081
1010
  setup(e, { emit: t }) {
1082
- const n = e, o = T(() => Array.isArray(n.options) ? n.options.map((l) => ({ value: l, label: String(l) })) : Object.entries(n.options).map(([l, u]) => ({
1083
- value: l,
1084
- label: u
1085
- }))), r = T(() => n.formatter ? (l) => n.formatter(l.label, l.value) : (l) => l.label), s = t, a = S(o.value.find((l) => l.value === n.modelValue) ?? null);
1011
+ const n = e, o = T(() => Array.isArray(n.options) ? n.options.map((r) => ({ value: r, label: String(r) })) : Object.entries(n.options).map(([r, c]) => ({
1012
+ value: r,
1013
+ label: c
1014
+ }))), l = T(() => n.formatter ? (r) => n.formatter(r.label, r.value) : (r) => r.label), s = t, u = S(o.value.find((r) => r.value === n.modelValue) ?? null);
1086
1015
  return I(
1087
1016
  () => n.modelValue,
1088
- (l) => {
1089
- a.value = o.value.find((u) => u.value === l) ?? null;
1017
+ (r) => {
1018
+ u.value = o.value.find((c) => c.value === r) ?? null;
1090
1019
  }
1091
- ), I(a, (l) => {
1092
- const u = l ? o.value.find((d) => we(d, l))?.value : null;
1093
- s("update:modelValue", u ?? null);
1094
- }), (l, u) => (b(), Qe(Xn, {
1095
- modelValue: a.value,
1096
- "onUpdate:modelValue": u[0] || (u[0] = (d) => a.value = d),
1020
+ ), I(u, (r) => {
1021
+ const c = r ? o.value.find((d) => we(d, r))?.value : null;
1022
+ s("update:modelValue", c ?? null);
1023
+ }), (r, c) => (b(), Je(Pn, {
1024
+ modelValue: u.value,
1025
+ "onUpdate:modelValue": c[0] || (c[0] = (d) => u.value = d),
1097
1026
  options: o.value,
1098
- formatter: r.value,
1099
- "null-title": l.nullTitle,
1100
- placeholder: l.placeholder,
1101
- name: l.name
1027
+ formatter: l.value,
1028
+ "null-title": r.nullTitle,
1029
+ placeholder: r.placeholder,
1030
+ name: r.name
1102
1031
  }, null, 8, ["modelValue", "options", "formatter", "null-title", "placeholder", "name"]));
1103
1032
  }
1104
1033
  });
1105
- function us() {
1034
+ function is() {
1106
1035
  return S();
1107
1036
  }
1108
- const Gn = { class: "content" }, Zn = { class: "message" }, Jn = {
1037
+ const qn = { class: "content" }, zn = { class: "message" }, Kn = {
1109
1038
  key: 0,
1110
1039
  class: "close"
1111
- }, Qn = {
1040
+ }, Yn = {
1112
1041
  key: 0,
1113
1042
  class: "progress-bar"
1114
- }, eo = /* @__PURE__ */ _({
1043
+ }, Xn = /* @__PURE__ */ N({
1115
1044
  __name: "vf-toast",
1116
1045
  props: {
1046
+ position: {},
1117
1047
  message: {},
1118
1048
  className: {},
1119
1049
  durationSecs: {},
@@ -1127,135 +1057,135 @@ const Gn = { class: "content" }, Zn = { class: "message" }, Jn = {
1127
1057
  t.onClick ? t.onClick() : t.disableClose || t.callback();
1128
1058
  }
1129
1059
  const o = S();
1130
- return t.durationSecs !== null && N(() => {
1131
- const r = t.durationSecs ?? 5;
1060
+ return t.durationSecs !== null && _(() => {
1061
+ const l = t.durationSecs ?? 5;
1132
1062
  o.value?.animate([{ width: "0%" }, { width: "100%" }], {
1133
- duration: r * 1e3,
1063
+ duration: l * 1e3,
1134
1064
  easing: "linear"
1135
- }), setTimeout(() => t.callback(), r * 1e3);
1136
- }), (r, s) => (b(), k("div", {
1137
- class: V(["vf-toast", r.className]),
1065
+ }), setTimeout(() => t.callback(), l * 1e3);
1066
+ }), (l, s) => (b(), k("div", {
1067
+ class: H(["vf-toast", [l.className, { top: l.position === "top", bottom: l.position !== "top" }]]),
1138
1068
  onClick: ke(n, ["stop"])
1139
1069
  }, [
1140
- $("div", Gn, [
1141
- $("div", Zn, R(r.message), 1),
1142
- r.disableClose ? H("", !0) : (b(), k("div", Jn, "x"))
1070
+ $("div", qn, [
1071
+ $("div", zn, R(l.message), 1),
1072
+ l.disableClose ? V("", !0) : (b(), k("div", Kn, "x"))
1143
1073
  ]),
1144
- r.durationSecs !== null ? (b(), k("div", Qn, [
1074
+ l.durationSecs !== null ? (b(), k("div", Yn, [
1145
1075
  $("div", {
1146
1076
  ref_key: "progressInnerEl",
1147
1077
  ref: o,
1148
1078
  class: "inner"
1149
1079
  }, null, 512)
1150
- ])) : H("", !0)
1080
+ ])) : V("", !0)
1151
1081
  ], 2));
1152
1082
  }
1153
1083
  });
1154
- function cs(e) {
1155
- const t = ce(eo, {
1084
+ function ls(e) {
1085
+ const t = ce(Xn, {
1156
1086
  ...e,
1157
1087
  callback: () => Q(t)
1158
1088
  });
1159
1089
  return () => Q(t);
1160
1090
  }
1161
- function to(e) {
1162
- const t = Math.floor(Math.log(e) / Math.log(1024)), o = (e / Math.pow(1024, t)).toFixed(2), r = ["B", "KB", "MB", "GB", "TB"][t];
1163
- return `${o} ${r}`;
1091
+ function Zn(e) {
1092
+ const t = Math.floor(Math.log(e) / Math.log(1024)), o = (e / Math.pow(1024, t)).toFixed(2), l = ["B", "KB", "MB", "GB", "TB"][t];
1093
+ return `${o} ${l}`;
1164
1094
  }
1165
- function no(e) {
1095
+ function Gn(e) {
1166
1096
  return e != null && String(e).length ? e : "-";
1167
1097
  }
1168
- function oo(e) {
1098
+ function Jn(e) {
1169
1099
  return e || "-";
1170
1100
  }
1171
- function so(e) {
1101
+ function Qn(e) {
1172
1102
  return e === null || typeof e == "string" && !/^\d+$/.test(e) ? e : kn(Number(e));
1173
1103
  }
1174
- function ro(e) {
1175
- return e && _n(e);
1104
+ function eo(e) {
1105
+ return e && Hn(e);
1176
1106
  }
1177
- function io(e) {
1178
- return e ? Yt(e) : null;
1107
+ function to(e) {
1108
+ return e ? zt(e) : null;
1179
1109
  }
1180
- function ut(e) {
1181
- return e ? Kt(e) : null;
1110
+ function rt(e) {
1111
+ return e ? qt(e) : null;
1182
1112
  }
1183
- function lo(e) {
1113
+ function no(e) {
1184
1114
  return e ? e.toUpperCase() : null;
1185
1115
  }
1186
- function ao(e) {
1187
- return e ? ut(e.toLowerCase()) : null;
1116
+ function oo(e) {
1117
+ return e ? rt(e.toLowerCase()) : null;
1188
1118
  }
1189
- function uo(e) {
1190
- return e ? Nn(e) : null;
1119
+ function so(e) {
1120
+ return e ? Vn(e) : null;
1191
1121
  }
1192
- function co(e, t) {
1193
- return Rn(e, t);
1122
+ function io(e, t) {
1123
+ return An(e, t);
1194
1124
  }
1195
- function fo(e, t) {
1125
+ function lo(e, t) {
1196
1126
  return D(e).divide(t).value;
1197
1127
  }
1198
- function po(e, t) {
1199
- return e && P(new Date(e), t ?? F.defaultDateFormat);
1200
- }
1201
- function vo(e, t) {
1202
- return e && P(new Date(e), t ?? F.defaultTimeFormat);
1203
- }
1204
- function mo(e, t) {
1205
- return e && P(new Date(e), t ?? `${F.defaultDateFormat} ${F.defaultTimeFormat}`);
1206
- }
1207
- function ho(e) {
1208
- return e && P(Jt(Qt(e, "yyyy-MM-dd", /* @__PURE__ */ new Date()), 1), F.defaultDateFormat);
1209
- }
1210
- const We = {
1211
- bytes: to,
1212
- dash: no,
1213
- dashZeros: oo,
1214
- number: so,
1215
- phone: ro,
1216
- upperFirst: io,
1217
- startCase: ut,
1218
- upperCase: lo,
1219
- upperWords: ao,
1220
- desnake: uo,
1221
- usCurrency: co,
1222
- divide: fo,
1223
- date: po,
1224
- time: vo,
1225
- dateTime: mo,
1226
- oneDayForward: ho
1227
- }, ds = (e) => ({
1228
- ...We,
1229
- ...e(We)
1230
- }), Me = Symbol("HookState");
1231
- function fs(e, t) {
1128
+ function ro(e, t) {
1129
+ return e && U(new Date(e), t ?? F.defaultDateFormat);
1130
+ }
1131
+ function ao(e, t) {
1132
+ return e && U(new Date(e), t ?? F.defaultTimeFormat);
1133
+ }
1134
+ function uo(e, t) {
1135
+ return e && U(new Date(e), t ?? `${F.defaultDateFormat} ${F.defaultTimeFormat}`);
1136
+ }
1137
+ function co(e) {
1138
+ return e && U(Jt(Qt(e, "yyyy-MM-dd", /* @__PURE__ */ new Date()), 1), F.defaultDateFormat);
1139
+ }
1140
+ const Ue = {
1141
+ bytes: Zn,
1142
+ dash: Gn,
1143
+ dashZeros: Jn,
1144
+ number: Qn,
1145
+ phone: eo,
1146
+ upperFirst: to,
1147
+ startCase: rt,
1148
+ upperCase: no,
1149
+ upperWords: oo,
1150
+ desnake: so,
1151
+ usCurrency: io,
1152
+ divide: lo,
1153
+ date: ro,
1154
+ time: ao,
1155
+ dateTime: uo,
1156
+ oneDayForward: co
1157
+ }, rs = (e) => ({
1158
+ ...Ue,
1159
+ ...e(Ue)
1160
+ }), xe = Symbol("HookState");
1161
+ function as(e, t) {
1232
1162
  const n = t ?? be();
1233
- N(() => yo(n, e), n), et(() => go(n), n), tt(() => qe(n), n), ue(() => qe(n), n);
1163
+ _(() => fo(n, e), n), Qe(() => po(n), n), et(() => Pe(n), n), ue(() => Pe(n), n);
1234
1164
  }
1235
- function yo(e, t) {
1165
+ function fo(e, t) {
1236
1166
  const n = {};
1237
- if (t.elScrolledToBottom && (n.el = new Z(e.vnode.el, t.elScrolledToBottom)), t.ancestorScrolledToBottom) {
1238
- const o = ct(e.vnode.el);
1239
- o ? n.ancestor = new Z(o, t.ancestorScrolledToBottom) : console.warn("[VueFoundation] No scollable ancestor found for component:", e);
1167
+ if (t.elScrolledToBottom && (n.el = new G(e.vnode.el, t.elScrolledToBottom)), t.ancestorScrolledToBottom) {
1168
+ const o = at(e.vnode.el);
1169
+ o ? n.ancestor = new G(o, t.ancestorScrolledToBottom) : console.warn("[VueFoundation] No scollable ancestor found for component:", e);
1240
1170
  }
1241
- t.windowScrolledToBottom && (n.window = new Z(window, t.windowScrolledToBottom)), e[Me] = n;
1171
+ t.windowScrolledToBottom && (n.window = new G(window, t.windowScrolledToBottom)), e[xe] = n;
1242
1172
  }
1243
- function go(e) {
1244
- const t = e[Me];
1173
+ function po(e) {
1174
+ const t = e[xe];
1245
1175
  t?.el?.install(), t?.ancestor?.install(), t?.window?.install();
1246
1176
  }
1247
- function qe(e) {
1248
- const t = e[Me];
1177
+ function Pe(e) {
1178
+ const t = e[xe];
1249
1179
  t?.el?.uninstall(), t?.ancestor?.uninstall(), t?.window?.uninstall();
1250
1180
  }
1251
1181
  const ge = ["auto", "scroll"];
1252
- function ct(e) {
1182
+ function at(e) {
1253
1183
  const t = e.parentElement;
1254
1184
  if (!t) return null;
1255
1185
  const n = window.getComputedStyle(t);
1256
- return ge.includes(n.overflow) || ge.includes(n.overflowX) || ge.includes(n.overflowY) ? t : ct(t);
1186
+ return ge.includes(n.overflow) || ge.includes(n.overflowX) || ge.includes(n.overflowY) ? t : at(t);
1257
1187
  }
1258
- class Z {
1188
+ class G {
1259
1189
  constructor(t, n) {
1260
1190
  this.el = t, this.handler = n, this.install();
1261
1191
  }
@@ -1271,25 +1201,25 @@ class Z {
1271
1201
  Math.ceil(this.el.scrollTop + this.el.clientHeight + 5) >= this.el.scrollHeight ? this.isTripped || (this.handler(t), this.isTripped = !0) : this.isTripped && (this.isTripped = !1);
1272
1202
  }
1273
1203
  }
1274
- function ps(e) {
1275
- N(() => window.addEventListener("resize", e)), et(() => window.addEventListener("resize", e)), tt(() => window.removeEventListener("resize", e)), ue(() => window.removeEventListener("resize", e));
1204
+ function us(e) {
1205
+ _(() => window.addEventListener("resize", e)), Qe(() => window.addEventListener("resize", e)), et(() => window.removeEventListener("resize", e)), ue(() => window.removeEventListener("resize", e));
1276
1206
  }
1277
- const wo = {
1278
- mounted: Ke,
1279
- updated: Ke
1280
- }, ze = Symbol("HasAutoFocused");
1281
- function Ke(e, t) {
1282
- if (t.value === void 0 && e[ze] || t.value !== void 0 && !t.value || t.oldValue !== void 0 && t.value == t.oldValue) return;
1283
- e[ze] = !0;
1207
+ const vo = {
1208
+ mounted: ze,
1209
+ updated: ze
1210
+ }, qe = Symbol("HasAutoFocused");
1211
+ function ze(e, t) {
1212
+ if (t.value === void 0 && e[qe] || t.value !== void 0 && !t.value || t.oldValue !== void 0 && t.value == t.oldValue) return;
1213
+ e[qe] = !0;
1284
1214
  const n = ["BUTTON", "INPUT", "TEXTAREA", "SELECT"].indexOf(e.tagName) > -1 ? e : e.querySelectorAll("input")[0];
1285
1215
  setTimeout(() => n.focus(), 10);
1286
1216
  }
1287
- const Eo = {
1288
- mounted: bo
1217
+ const mo = {
1218
+ mounted: ho
1289
1219
  }, K = Symbol("ConfirmState");
1290
- function bo(e, t) {
1220
+ function ho(e, t) {
1291
1221
  e.addEventListener("click", (n) => {
1292
- const o = Date.now(), r = t.value?.text !== void 0 ? t.value.text : "Confirm";
1222
+ const o = Date.now(), l = t.value?.text !== void 0 ? t.value.text : "Confirm";
1293
1223
  if (e[K]) {
1294
1224
  if (o - e[K].initTime < 300)
1295
1225
  return;
@@ -1301,158 +1231,158 @@ function bo(e, t) {
1301
1231
  initTime: o,
1302
1232
  preconfirmHtml: e.innerHTML,
1303
1233
  resetHandler: () => {
1304
- r && (e.innerHTML = s.preconfirmHtml), t.value?.class && e.classList.remove(t.value.class), e.blur(), e.removeEventListener("mouseout", s.resetHandler), delete e[K];
1234
+ l && (e.innerHTML = s.preconfirmHtml), t.value?.class && e.classList.remove(t.value.class), e.blur(), e.removeEventListener("mouseout", s.resetHandler), delete e[K];
1305
1235
  }
1306
1236
  };
1307
- e[K] = s, r && (e.innerHTML = r), t.value?.class && e.classList.add(t.value.class), e.addEventListener("mouseout", s.resetHandler);
1237
+ e[K] = s, l && (e.innerHTML = l), t.value?.class && e.classList.add(t.value.class), e.addEventListener("mouseout", s.resetHandler);
1308
1238
  });
1309
1239
  }
1310
- const ko = {
1311
- beforeMount: To
1240
+ const yo = {
1241
+ beforeMount: go
1312
1242
  };
1313
- function To(e) {
1243
+ function go(e) {
1314
1244
  e.addEventListener("blur", () => {
1315
1245
  let t = e.value;
1316
- /^\d{1,2}\/\d{1,2}$/.test(t) && (t += "/" + P(/* @__PURE__ */ new Date(), "yy"));
1246
+ /^\d{1,2}\/\d{1,2}$/.test(t) && (t += "/" + U(/* @__PURE__ */ new Date(), "yy"));
1317
1247
  const n = Date.parse(t);
1318
- isNaN(n) ? e.value = "" : e.value = P(n, "MM/dd/yyyy"), e.dispatchEvent(new Event("input"));
1248
+ isNaN(n) ? e.value = "" : e.value = U(n, "MM/dd/yyyy"), e.dispatchEvent(new Event("input"));
1319
1249
  });
1320
1250
  }
1321
- const So = {
1322
- beforeMount: Ye,
1323
- updated: Ye
1251
+ const wo = {
1252
+ beforeMount: Ke,
1253
+ updated: Ke
1324
1254
  };
1325
- function Ye(e, t) {
1326
- t.value == t.oldValue && e.innerHTML.length || (e.innerText = Co(e, t));
1255
+ function Ke(e, t) {
1256
+ t.value == t.oldValue && e.innerHTML.length || (e.innerText = Eo(e, t));
1327
1257
  }
1328
- function Co(e, t) {
1258
+ function Eo(e, t) {
1329
1259
  if (!t.value)
1330
1260
  return e.attributes.getNamedItem("placeholder")?.value ?? "";
1331
1261
  let n = "";
1332
- const o = t.value.replace(/ /g, "T").replace(/\.\d+Z$/, "Z"), r = e.attributes.getNamedItem("local") !== null ? o.replace(/Z$/, "") : o.replace(/(Z|\+00:00)?$/, "Z"), s = new Date(r);
1262
+ const o = t.value.replace(/ /g, "T").replace(/\.\d+Z$/, "Z"), l = e.attributes.getNamedItem("local") !== null ? o.replace(/Z$/, "") : o.replace(/(Z|\+00:00)?$/, "Z"), s = new Date(l);
1333
1263
  e.attributes.getNamedItem("display-utc") !== null && s.setMinutes(s.getMinutes() - s.getTimezoneOffset());
1334
- let a = e.attributes.getNamedItem("format")?.value;
1335
- const l = e.attributes.getNamedItem("date-only") !== null;
1336
- if (!a && e.attributes.getNamedItem("relative-date") !== null) {
1264
+ let u = e.attributes.getNamedItem("format")?.value;
1265
+ const r = e.attributes.getNamedItem("date-only") !== null;
1266
+ if (!u && e.attributes.getNamedItem("relative-date") !== null) {
1337
1267
  const d = /* @__PURE__ */ new Date();
1338
- d.getFullYear() === s.getFullYear() && d.getMonth() === s.getMonth() && d.getDate() === s.getDate() && (n = "at", a = "HH:mm");
1268
+ d.getFullYear() === s.getFullYear() && d.getMonth() === s.getMonth() && d.getDate() === s.getDate() && (n = "at", u = "HH:mm");
1339
1269
  }
1340
- if (!a && e.attributes.getNamedItem("simplified-date") !== null) {
1270
+ if (!u && e.attributes.getNamedItem("simplified-date") !== null) {
1341
1271
  let d = null;
1342
- const h = /* @__PURE__ */ new Date();
1343
- h.getFullYear() === s.getFullYear() ? (h.getMonth() !== s.getMonth() || h.getDate() !== s.getDate()) && (d = "M/d") : d = "M/d/yy";
1344
- const m = l ? null : F.defaultTimeFormat;
1345
- a = nt([d, m]).join(" ");
1272
+ const E = /* @__PURE__ */ new Date();
1273
+ E.getFullYear() === s.getFullYear() ? (E.getMonth() !== s.getMonth() || E.getDate() !== s.getDate()) && (d = "M/d") : d = "M/d/yy";
1274
+ const h = r ? null : F.defaultTimeFormat;
1275
+ u = tt([d, h]).join(" ");
1346
1276
  }
1347
- a || (l ? a = F.defaultDateFormat : a = `${F.defaultDateFormat} ${F.defaultTimeFormat}`);
1348
- let u = P(s, a);
1349
- return n && (u = n + " " + u), u;
1277
+ u || (r ? u = F.defaultDateFormat : u = `${F.defaultDateFormat} ${F.defaultTimeFormat}`);
1278
+ let c = U(s, u);
1279
+ return n && (c = n + " " + c), c;
1350
1280
  }
1351
- const xo = {
1352
- beforeMount: Xe,
1353
- updated: Xe,
1354
- unmounted: Mo
1281
+ const bo = {
1282
+ beforeMount: Ye,
1283
+ updated: Ye,
1284
+ unmounted: ko
1355
1285
  };
1356
- function Xe(e, t) {
1286
+ function Ye(e, t) {
1357
1287
  e.tagName === "LABEL" && (t.value ? e.classList.remove("disabled") : e.classList.add("disabled"), e = e.querySelector("input")), t.value ? e.setAttribute("disabled", "disabled") : e.removeAttribute("disabled");
1358
1288
  }
1359
- function Mo(e) {
1289
+ function ko(e) {
1360
1290
  e.tagName === "LABEL" && (e.classList.remove("disabled"), e = e.querySelector("input")), e.removeAttribute("disabled");
1361
1291
  }
1362
- const Lo = {
1363
- beforeMount: Ge,
1364
- updated: Ge,
1365
- unmounted: ft
1366
- }, ee = Symbol("HasAutoFocused"), Le = [];
1367
- function Fo() {
1368
- Le.forEach(dt);
1292
+ const To = {
1293
+ beforeMount: Xe,
1294
+ updated: Xe,
1295
+ unmounted: ct
1296
+ }, ee = Symbol("HasAutoFocused"), Me = [];
1297
+ function So() {
1298
+ Me.forEach(ut);
1369
1299
  }
1370
- setInterval(Fo, 1e3);
1371
- function Ge(e, t) {
1300
+ setInterval(So, 1e3);
1301
+ function Xe(e, t) {
1372
1302
  if (t.value == t.oldValue) return;
1373
- if (!t.value) return ft(e);
1374
- const n = new Date(t.value), o = e.attributes.getNamedItem("base-time")?.value, r = n.getTime() - (o ? new Date(o).getTime() - t.value * 1e3 : 0), s = e.getAttribute("no-seconds") === null;
1375
- e[ee] || Le.push(e), e[ee] = {
1376
- startTs: r,
1303
+ if (!t.value) return ct(e);
1304
+ const n = new Date(t.value), o = e.attributes.getNamedItem("base-time")?.value, l = n.getTime() - (o ? new Date(o).getTime() - t.value * 1e3 : 0), s = e.getAttribute("no-seconds") === null;
1305
+ e[ee] || Me.push(e), e[ee] = {
1306
+ startTs: l,
1377
1307
  includeSeconds: s
1378
- }, dt(e);
1308
+ }, ut(e);
1379
1309
  }
1380
- function dt(e) {
1310
+ function ut(e) {
1381
1311
  const t = e[ee], n = Math.round((Date.now() - t.startTs) / 1e3);
1382
- e.innerText = Oo(n, t.includeSeconds);
1312
+ e.innerText = Co(n, t.includeSeconds);
1383
1313
  }
1384
- function ft(e) {
1385
- e[ee] && (Xt(Le, e), delete e[ee]), e.innerText = "-";
1314
+ function ct(e) {
1315
+ e[ee] && (Kt(Me, e), delete e[ee]), e.innerText = "-";
1386
1316
  }
1387
- function Oo(e, t) {
1317
+ function Co(e, t) {
1388
1318
  const n = [], o = Math.floor(e / 86400);
1389
1319
  o && n.push(o + "d"), e -= o * 86400;
1390
- const r = Math.floor(e / 3600);
1391
- (o || r) && n.push(r + "h"), e -= r * 3600;
1320
+ const l = Math.floor(e / 3600);
1321
+ (o || l) && n.push(l + "h"), e -= l * 3600;
1392
1322
  const s = Math.floor(e / 60);
1393
- return (o || r || s) && n.push(s + "m"), t ? n.length || n.push("0m") : (e -= s * 60, n.push(e + "s")), n.join(" ");
1323
+ return (o || l || s) && n.push(s + "m"), t ? n.length || n.push("0m") : (e -= s * 60, n.push(e + "s")), n.join(" ");
1394
1324
  }
1395
- const Io = {
1396
- mounted: pt,
1397
- updated: Do,
1398
- unmounted: vt
1325
+ const xo = {
1326
+ mounted: dt,
1327
+ updated: Mo,
1328
+ unmounted: ft
1399
1329
  }, j = /* @__PURE__ */ new Map();
1400
- function pt(e, t) {
1401
- j.size === 0 && window.addEventListener("keydown", mt), j.set(t.value.toLowerCase(), [...j.get(t.value.toLowerCase()) ?? [], e]);
1330
+ function dt(e, t) {
1331
+ j.size === 0 && window.addEventListener("keydown", pt), j.set(t.value.toLowerCase(), [...j.get(t.value.toLowerCase()) ?? [], e]);
1402
1332
  }
1403
- function vt(e, t) {
1333
+ function ft(e, t) {
1404
1334
  const n = j.get(t.value.toLowerCase());
1405
1335
  if (n) {
1406
1336
  const o = n.indexOf(e);
1407
1337
  o !== -1 && n.splice(o, 1), n.length === 0 && j.delete(t.value.toLowerCase());
1408
1338
  }
1409
- j.size === 0 && window.removeEventListener("keydown", mt);
1339
+ j.size === 0 && window.removeEventListener("keydown", pt);
1410
1340
  }
1411
- function Do(e, t) {
1412
- vt(e, t), pt(e, t);
1341
+ function Mo(e, t) {
1342
+ ft(e, t), dt(e, t);
1413
1343
  }
1414
- function mt(e) {
1344
+ function pt(e) {
1415
1345
  if (typeof e.key != "string") return;
1416
1346
  const t = e.key.toLowerCase(), n = j.get(t);
1417
- n && (Gt(n)?.click(), e.preventDefault());
1347
+ n && (Yt(n)?.click(), e.preventDefault());
1418
1348
  }
1419
- const Y = Symbol("InfiniteScrollHandler"), Ho = {
1349
+ const Y = Symbol("InfiniteScrollHandler"), Lo = {
1420
1350
  mounted(e, t) {
1421
- e[Y] = new Z(e, t.value);
1351
+ e[Y] = new G(e, t.value);
1422
1352
  },
1423
1353
  updated(e, t) {
1424
- e[Y]?.uninstall(), e[Y] = new Z(e, t.value);
1354
+ e[Y]?.uninstall(), e[Y] = new G(e, t.value);
1425
1355
  },
1426
1356
  unmounted(e) {
1427
1357
  e[Y]?.uninstall(), delete e[Y];
1428
1358
  }
1429
- }, Vo = {
1359
+ }, Fo = {
1430
1360
  beforeMount: Ze,
1431
1361
  updated: Ze
1432
1362
  };
1433
1363
  function Ze(e, t) {
1434
1364
  e.tagName == "LABEL" && (e = e.querySelector("input")), t.value ? e.setAttribute("readonly", "readonly") : e.removeAttribute("readonly");
1435
1365
  }
1436
- const Ao = {
1437
- mounted: Je,
1438
- updated: Je,
1439
- unmounted: ht
1366
+ const Oo = {
1367
+ mounted: Ge,
1368
+ updated: Ge,
1369
+ unmounted: vt
1440
1370
  }, J = Symbol("TooltipState");
1441
- function Je(e, t) {
1371
+ function Ge(e, t) {
1442
1372
  let n = e.attributes.getNamedItem("tip")?.value ?? t.value;
1443
1373
  if (t.value || (n = null), n) {
1444
1374
  const o = {
1445
1375
  content: n,
1446
1376
  html: e.getAttribute("html") !== null
1447
1377
  };
1448
- e[J] ? e[J].configure(o) : e[J] = new $o(e, o);
1378
+ e[J] ? e[J].configure(o) : e[J] = new Io(e, o);
1449
1379
  } else
1450
- ht(e);
1380
+ vt(e);
1451
1381
  }
1452
- function ht(e) {
1382
+ function vt(e) {
1453
1383
  e[J]?.destroy(), delete e[J];
1454
1384
  }
1455
- class $o {
1385
+ class Io {
1456
1386
  constructor(t, n) {
1457
1387
  this.el = t, this.config = n, t.addEventListener("mouseenter", this.handleTargetMouseEnterWithContext), t.addEventListener("mouseleave", this.handleTargetMouseLeaveWithContext), t.addEventListener("click", this.handleTargetMouseLeaveWithContext);
1458
1388
  }
@@ -1488,9 +1418,9 @@ class $o {
1488
1418
  this.shouldShow || this.tipEl && (this.tipEl.remove(), this.tipEl = void 0, this.titleEl = void 0, this.contentEl = void 0, this.checkInterval && (clearInterval(this.checkInterval), this.checkInterval = void 0), window.removeEventListener("mousemove", this.handleMouseMoveWithContext), this.mouseMoveBound = !1);
1489
1419
  }
1490
1420
  handleMouseMove(t) {
1491
- const n = this.tipEl.offsetWidth, o = this.tipEl.offsetHeight, r = window.innerWidth, s = window.innerHeight;
1492
- let a = t.pageX + 10, l = t.pageY + 20;
1493
- a + n > r && (a = Math.max(10, t.pageX - 5 - n)), l + o > s && (l = Math.max(10, t.pageY - 5 - o)), this.tipEl.style.left = a + "px", this.tipEl.style.top = l + "px", this.lastMoveEvt = t;
1421
+ const n = this.tipEl.offsetWidth, o = this.tipEl.offsetHeight, l = window.innerWidth, s = window.innerHeight;
1422
+ let u = t.pageX + 10, r = t.pageY + 20;
1423
+ u + n > l && (u = Math.max(10, t.pageX - 5 - n)), r + o > s && (r = Math.max(10, t.pageY - 5 - o)), this.tipEl.style.left = u + "px", this.tipEl.style.top = r + "px", this.lastMoveEvt = t;
1494
1424
  }
1495
1425
  checkMoveEvent() {
1496
1426
  this.lastMoveEvt && this.tipEl !== this.lastMoveEvt.target && (this.tipEl?.contains(this.lastMoveEvt.target) || this.handleTargetMouseLeave());
@@ -1499,64 +1429,64 @@ class $o {
1499
1429
  this.shouldShow = !1, this.removeTooltip(), this.el.removeEventListener("mouseenter", this.handleTargetMouseEnterWithContext), this.el.removeEventListener("mouseleave", this.handleTargetMouseLeaveWithContext), this.el.removeEventListener("click", this.handleTargetMouseLeaveWithContext);
1500
1430
  }
1501
1431
  }
1502
- function Bo(e) {
1503
- e.directive("autofocus", wo), e.directive("confirm-button", Eo), e.directive("date-input", ko), e.directive("datetime", So), e.directive("disabled", xo), e.directive("duration", Lo), e.directive("hotkey", Io), e.directive("infinite-scroll", Ho), e.directive("readonly", Vo), e.directive("tooltip", Ao);
1432
+ function Do(e) {
1433
+ e.directive("autofocus", vo), e.directive("confirm-button", mo), e.directive("date-input", yo), e.directive("datetime", wo), e.directive("disabled", bo), e.directive("duration", To), e.directive("hotkey", xo), e.directive("infinite-scroll", Lo), e.directive("readonly", Fo), e.directive("tooltip", Oo);
1504
1434
  }
1505
- function vs(e) {
1506
- Bo(e);
1435
+ function cs(e) {
1436
+ Do(e);
1507
1437
  }
1508
1438
  export {
1509
- Wo as OverlayContainer,
1439
+ Ro as OverlayContainer,
1510
1440
  de as UserError,
1511
- jo as VfAjaxSelect,
1441
+ _o as VfAjaxSelect,
1512
1442
  ne as VfAlertModal,
1513
- as as VfEzSmartSelect,
1443
+ ss as VfEzSmartSelect,
1514
1444
  gn as VfModal,
1515
- Xn as VfSmartSelect,
1516
- os as cloneProp,
1517
- Po as configureVf,
1518
- rs as configureVfOpenApiClient,
1519
- ds as createFilters,
1445
+ Pn as VfSmartSelect,
1446
+ Qo as cloneProp,
1447
+ No as configureVf,
1448
+ ts as configureVfOpenApiClient,
1449
+ rs as createFilters,
1520
1450
  ce as createOverlayInjection,
1521
- Nn as desnakeCase,
1522
- ln as dismissOverlayInjectionById,
1523
- qo as dismissOverlayInjectionByInstance,
1524
- ot as dismissOverlayInjectionByInternalInstance,
1525
- rn as dismissOverlayInjectionByVnode,
1526
- ys as escapeHtml,
1451
+ Vn as desnakeCase,
1452
+ rn as dismissOverlayInjectionById,
1453
+ Wo as dismissOverlayInjectionByInstance,
1454
+ nt as dismissOverlayInjectionByInternalInstance,
1455
+ ln as dismissOverlayInjectionByVnode,
1456
+ ps as escapeHtml,
1527
1457
  cn as formatError,
1528
1458
  kn as formatNumber,
1529
- _n as formatPhone,
1530
- Rn as formatUSCurrency,
1531
- Zo as handleError,
1532
- Go as handleErrorAndAlert,
1533
- vs as installVf,
1459
+ Hn as formatPhone,
1460
+ An as formatUSCurrency,
1461
+ Ko as handleError,
1462
+ zo as handleErrorAndAlert,
1463
+ cs as installVf,
1534
1464
  dn as isError,
1535
- je as isNotNullOrUndefined,
1536
- Jo as maskComponent,
1465
+ We as isNotNullOrUndefined,
1466
+ Yo as maskComponent,
1537
1467
  fn as maskEl,
1538
1468
  pn as maskForm,
1539
- is as nl2br,
1540
- ss as nullifyEmptyInputs,
1469
+ ns as nl2br,
1470
+ es as nullifyEmptyInputs,
1541
1471
  Te as presentOverlay,
1542
1472
  Q as removeOverlayInjection,
1543
- es as replaceElement,
1473
+ Zo as replaceElement,
1544
1474
  un as showAlert,
1545
- zo as showConfirm,
1546
- Ko as showConfirmDestroy,
1547
- ts as showContextMenu,
1548
- Xo as showMutableWait,
1549
- cs as showToast,
1550
- Yo as showWait,
1475
+ jo as showConfirm,
1476
+ Uo as showConfirmDestroy,
1477
+ Go as showContextMenu,
1478
+ qo as showMutableWait,
1479
+ ls as showToast,
1480
+ Po as showWait,
1551
1481
  bn as sleep,
1552
- ns as sleepSecs,
1482
+ Jo as sleepSecs,
1553
1483
  Se as toError,
1554
- Qo as unmaskComponent,
1555
- st as unmaskEl,
1556
- rt as unmaskForm,
1484
+ Xo as unmaskComponent,
1485
+ ot as unmaskEl,
1486
+ st as unmaskForm,
1557
1487
  an as updateOverlayProps,
1558
- fs as useInfiniteScroll,
1559
- ps as useResizeWatcher,
1560
- ls as uuid,
1561
- us as vfModalRef
1488
+ as as useInfiniteScroll,
1489
+ us as useResizeWatcher,
1490
+ os as uuid,
1491
+ is as vfModalRef
1562
1492
  };