@signal24/vue-foundation 4.30.2 → 4.30.4
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.
- package/dist/src/components/alert-helpers.d.ts +1 -0
- package/dist/src/components/modal-helpers.d.ts +6 -0
- package/dist/src/components/vf-modal.vue.d.ts +1 -0
- package/dist/src/config.d.ts +1 -0
- package/dist/src/directives/sticky-min-width.d.ts +1 -1
- package/dist/src/directives/tooltip.d.ts +2 -0
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/vue-foundation.es.js +662 -643
- package/package.json +1 -1
- package/src/components/alert-helpers.ts +1 -0
- package/src/components/vf-alert-modal.vue +3 -3
- package/src/components/vf-modal.vue +6 -1
- package/src/config.ts +1 -0
- package/src/directives/sticky-min-width.ts +36 -15
- package/src/directives/tooltip.ts +14 -1
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { defineComponent as q, ref as N, computed as O, watch as H, onMounted as z, createElementBlock as I, withDirectives as fe, openBlock as
|
|
2
|
-
import { compact as
|
|
3
|
-
import { configureOpenApiClient as
|
|
4
|
-
import { escapeHtml as
|
|
5
|
-
import { format as X, addDays as
|
|
6
|
-
const
|
|
1
|
+
import { defineComponent as q, ref as N, computed as O, watch as H, onMounted as z, createElementBlock as I, withDirectives as fe, openBlock as S, createElementVNode as U, toDisplayString as J, createCommentVNode as W, Fragment as he, renderList as pe, vModelSelect as _t, getCurrentInstance as Ne, withModifiers as Le, normalizeStyle as Wt, normalizeClass as P, renderSlot as K, reactive as Pt, h as ve, Teleport as jt, markRaw as Ut, onBeforeUnmount as me, resolveDirective as zt, createBlock as lt, createSlots as qt, withCtx as Te, createTextVNode as te, onUpdated as Jt, vModelText as Kt, onActivated as ut, onDeactivated as ct } from "vue";
|
|
2
|
+
import { compact as dt, cloneDeep as Yt, uniq as Xt, groupBy as Zt, isEqual as Me, debounce as Gt, startCase as Qt, upperFirst as en, remove as tn, last as nn } from "lodash";
|
|
3
|
+
import { configureOpenApiClient as on, OpenApiError as rn } from "@signal24/openapi-client-codegen";
|
|
4
|
+
import { escapeHtml as Si } from "@vue/shared";
|
|
5
|
+
import { format as X, addDays as an, parse as sn } from "date-fns";
|
|
6
|
+
const ln = {
|
|
7
7
|
key: 0,
|
|
8
8
|
disabled: ""
|
|
9
|
-
},
|
|
9
|
+
}, un = {
|
|
10
10
|
key: 0,
|
|
11
11
|
value: null
|
|
12
|
-
},
|
|
12
|
+
}, cn = ["value"], Xo = /* @__PURE__ */ q({
|
|
13
13
|
__name: "vf-ajax-select",
|
|
14
14
|
props: {
|
|
15
15
|
modelValue: {},
|
|
@@ -32,32 +32,32 @@ const rn = {
|
|
|
32
32
|
async function g() {
|
|
33
33
|
p.value = await o.loadFn();
|
|
34
34
|
}
|
|
35
|
-
return z(g), (E, v) => l.value ? fe((
|
|
35
|
+
return z(g), (E, v) => l.value ? fe((S(), I("select", {
|
|
36
36
|
key: 1,
|
|
37
37
|
"onUpdate:modelValue": v[0] || (v[0] = (c) => y.value = c)
|
|
38
38
|
}, [
|
|
39
|
-
o.nullText ? (
|
|
40
|
-
(
|
|
39
|
+
o.nullText ? (S(), I("option", un, J(o.nullText), 1)) : W("", !0),
|
|
40
|
+
(S(!0), I(he, null, pe(l.value, (c, n) => (S(), I("option", {
|
|
41
41
|
key: n,
|
|
42
42
|
value: p.value?.[n]
|
|
43
|
-
}, J(c), 9,
|
|
43
|
+
}, J(c), 9, cn))), 128))
|
|
44
44
|
], 512)), [
|
|
45
|
-
[
|
|
46
|
-
]) : (
|
|
45
|
+
[_t, y.value]
|
|
46
|
+
]) : (S(), I("select", ln, [
|
|
47
47
|
U("option", null, J(o.loadingText || "Loading..."), 1)
|
|
48
48
|
]));
|
|
49
49
|
}
|
|
50
|
-
}),
|
|
50
|
+
}), D = {
|
|
51
51
|
unhandledErrorSupportText: "please contact support",
|
|
52
52
|
errorHandler: (e) => console.error("Unhandled error:", e),
|
|
53
53
|
defaultDateFormat: "M/d/yy",
|
|
54
54
|
defaultTimeFormat: "H:mm",
|
|
55
55
|
defaultCurrencyDivisor: 1
|
|
56
56
|
};
|
|
57
|
-
function
|
|
58
|
-
Object.assign(
|
|
57
|
+
function Zo(e) {
|
|
58
|
+
Object.assign(D, e);
|
|
59
59
|
}
|
|
60
|
-
const
|
|
60
|
+
const dn = /* @__PURE__ */ q({
|
|
61
61
|
__name: "overlay-anchor",
|
|
62
62
|
props: {
|
|
63
63
|
overlayId: {},
|
|
@@ -72,64 +72,64 @@ const ln = /* @__PURE__ */ q({
|
|
|
72
72
|
a.value = c, p.value = n;
|
|
73
73
|
}
|
|
74
74
|
function g(v, c) {
|
|
75
|
-
const n = t.anchor instanceof HTMLElement ? {} : t.anchor,
|
|
76
|
-
n.matchWidth && (
|
|
75
|
+
const n = t.anchor instanceof HTMLElement ? {} : t.anchor, r = c.getBoundingClientRect(), i = v.getBoundingClientRect();
|
|
76
|
+
n.matchWidth && (i.width = r.width), n.matchHeight && (i.height = r.height);
|
|
77
77
|
const s = n.class ? Array.isArray(n.class) ? n.class : [n.class] : [];
|
|
78
78
|
let u, h;
|
|
79
79
|
if (n.y === "center")
|
|
80
|
-
u =
|
|
80
|
+
u = r.top + r.height / 2 - i.height / 2, s.push("anchored-center-y");
|
|
81
81
|
else {
|
|
82
|
-
const m = (
|
|
83
|
-
u = m ?
|
|
82
|
+
const m = (r.bottom + i.height < window.innerHeight || n.y === "below") && n.y !== "above";
|
|
83
|
+
u = m ? r.bottom : r.top - i.height, s.push(m ? "anchored-top" : "anchored-bottom");
|
|
84
84
|
}
|
|
85
85
|
if (n.x === "center")
|
|
86
|
-
h =
|
|
86
|
+
h = r.left + r.width / 2 - i.width / 2, s.push("anchored-center-x");
|
|
87
87
|
else {
|
|
88
|
-
const m = (
|
|
89
|
-
h = m ?
|
|
88
|
+
const m = (r.left + i.width < window.innerWidth || n.x === "left") && n.x !== "right";
|
|
89
|
+
h = m ? r.left : r.right - i.width, s.push(m ? "anchored-left" : "anchored-right");
|
|
90
90
|
}
|
|
91
91
|
return {
|
|
92
92
|
styles: {
|
|
93
93
|
top: `${u}px`,
|
|
94
94
|
left: `${h}px`,
|
|
95
|
-
...n.matchWidth ? { width: `${
|
|
96
|
-
...n.matchHeight ? { height: `${
|
|
95
|
+
...n.matchWidth ? { width: `${i.width}px` } : {},
|
|
96
|
+
...n.matchHeight ? { height: `${i.height}px` } : {}
|
|
97
97
|
},
|
|
98
98
|
classes: s
|
|
99
99
|
};
|
|
100
100
|
}
|
|
101
101
|
function E() {
|
|
102
|
-
window.removeEventListener("click", E),
|
|
102
|
+
window.removeEventListener("click", E), pn(t.overlayId);
|
|
103
103
|
}
|
|
104
104
|
return z(() => {
|
|
105
105
|
setTimeout(() => {
|
|
106
106
|
window.addEventListener("click", E);
|
|
107
107
|
}, 10);
|
|
108
|
-
}), (v, c) => (
|
|
108
|
+
}), (v, c) => (S(), I("div", {
|
|
109
109
|
class: P(["vf-overlay-anchor", p.value]),
|
|
110
|
-
style:
|
|
110
|
+
style: Wt(a.value),
|
|
111
111
|
onClick: Le(E, ["stop"])
|
|
112
112
|
}, [
|
|
113
113
|
K(v.$slots, "default")
|
|
114
114
|
], 6));
|
|
115
115
|
}
|
|
116
116
|
});
|
|
117
|
-
let
|
|
118
|
-
const j =
|
|
117
|
+
let fn = 0;
|
|
118
|
+
const j = Pt([]);
|
|
119
119
|
H(j, () => {
|
|
120
|
-
|
|
120
|
+
D.onOverlaysChanged?.(j.length);
|
|
121
121
|
});
|
|
122
|
-
const
|
|
122
|
+
const Go = q({
|
|
123
123
|
setup() {
|
|
124
124
|
return () => ve("div", [
|
|
125
|
-
pe(j, (e) => ve(
|
|
125
|
+
pe(j, (e) => ve(jt, { key: e.id, to: "#vf-overlay-target" }, [e.wrapperVnode ?? e.vnode]))
|
|
126
126
|
]);
|
|
127
127
|
}
|
|
128
128
|
});
|
|
129
129
|
function ge(e, t, o) {
|
|
130
130
|
const a = document.getElementById("vf-overlay-target") ?? document.createElement("div");
|
|
131
131
|
a.id = "vf-overlay-target", a.removeAttribute("inert"), document.body.appendChild(a);
|
|
132
|
-
const p = String(++
|
|
132
|
+
const p = String(++fn), l = Ut(e), y = ve(l, t), g = o?.anchor ? ve(dn, { overlayId: p, anchor: o.anchor }, () => [y]) : void 0, E = {
|
|
133
133
|
id: p,
|
|
134
134
|
component: l,
|
|
135
135
|
props: t,
|
|
@@ -139,23 +139,23 @@ function ge(e, t, o) {
|
|
|
139
139
|
};
|
|
140
140
|
return j.push(E), E;
|
|
141
141
|
}
|
|
142
|
-
function
|
|
143
|
-
e.$ &&
|
|
142
|
+
function Qo(e) {
|
|
143
|
+
e.$ && ft(e.$);
|
|
144
144
|
}
|
|
145
|
-
function
|
|
145
|
+
function ft(e) {
|
|
146
146
|
let t = e;
|
|
147
|
-
for (; t && !
|
|
147
|
+
for (; t && !hn(t.vnode); )
|
|
148
148
|
t = t.parent;
|
|
149
149
|
}
|
|
150
|
-
function
|
|
150
|
+
function hn(e) {
|
|
151
151
|
const t = j.findIndex((o) => o.vnode.component === e.component);
|
|
152
152
|
return t >= 0 ? (j[t].props.callback(), !0) : !1;
|
|
153
153
|
}
|
|
154
|
-
function
|
|
154
|
+
function pn(e) {
|
|
155
155
|
const t = j.findIndex((o) => o.id === e);
|
|
156
156
|
return t >= 0 ? (j[t].props.callback(), !0) : !1;
|
|
157
157
|
}
|
|
158
|
-
function
|
|
158
|
+
function re(e) {
|
|
159
159
|
const t = j.indexOf(e);
|
|
160
160
|
t >= 0 && j.splice(t, 1);
|
|
161
161
|
}
|
|
@@ -168,12 +168,12 @@ async function Re(e, t, o) {
|
|
|
168
168
|
if (typeof E == "object" && "then" in E && typeof E.then == "function" && await E === !1)
|
|
169
169
|
return;
|
|
170
170
|
}
|
|
171
|
-
|
|
171
|
+
re(p), a(g);
|
|
172
172
|
} };
|
|
173
173
|
p = ge(e, y, o);
|
|
174
174
|
});
|
|
175
175
|
}
|
|
176
|
-
async function
|
|
176
|
+
async function vn(e, t) {
|
|
177
177
|
const o = e.vnode.component.props;
|
|
178
178
|
for (const a in t)
|
|
179
179
|
o[a] = t[a];
|
|
@@ -184,17 +184,17 @@ function se(e, t) {
|
|
|
184
184
|
classes: e.classes ?? []
|
|
185
185
|
} : { title: t ? e : void 0, message: t ?? e, classes: [] };
|
|
186
186
|
}
|
|
187
|
-
async function
|
|
187
|
+
async function ht(e, t) {
|
|
188
188
|
await Re(le, se(e, t));
|
|
189
189
|
}
|
|
190
|
-
async function
|
|
190
|
+
async function ei(e, t) {
|
|
191
191
|
const o = se(e, t);
|
|
192
192
|
return await Re(le, {
|
|
193
193
|
...o,
|
|
194
194
|
shouldConfirm: !0
|
|
195
195
|
}) === !0;
|
|
196
196
|
}
|
|
197
|
-
async function
|
|
197
|
+
async function ti(e, t) {
|
|
198
198
|
const o = se(e, t);
|
|
199
199
|
return await Re(le, {
|
|
200
200
|
...o,
|
|
@@ -202,7 +202,7 @@ async function Qo(e, t) {
|
|
|
202
202
|
classes: ["destructive", ...o.classes]
|
|
203
203
|
}) === !0;
|
|
204
204
|
}
|
|
205
|
-
function
|
|
205
|
+
function ni(e, t) {
|
|
206
206
|
const o = se(e, t), a = ge(le, {
|
|
207
207
|
...o,
|
|
208
208
|
isBare: !0,
|
|
@@ -210,9 +210,9 @@ function er(e, t) {
|
|
|
210
210
|
callback: () => {
|
|
211
211
|
}
|
|
212
212
|
});
|
|
213
|
-
return () =>
|
|
213
|
+
return () => re(a);
|
|
214
214
|
}
|
|
215
|
-
function
|
|
215
|
+
function oi(e, t) {
|
|
216
216
|
const o = se(e, t), a = ge(le, {
|
|
217
217
|
...o,
|
|
218
218
|
isBare: !0,
|
|
@@ -222,9 +222,9 @@ function tr(e, t) {
|
|
|
222
222
|
});
|
|
223
223
|
return {
|
|
224
224
|
update: (p) => {
|
|
225
|
-
|
|
225
|
+
vn(a, { message: p });
|
|
226
226
|
},
|
|
227
|
-
dismiss: () =>
|
|
227
|
+
dismiss: () => re(a)
|
|
228
228
|
};
|
|
229
229
|
}
|
|
230
230
|
class ye extends Error {
|
|
@@ -232,54 +232,54 @@ class ye extends Error {
|
|
|
232
232
|
super(t), this.name = "UserError";
|
|
233
233
|
}
|
|
234
234
|
}
|
|
235
|
-
function
|
|
235
|
+
function mn(e) {
|
|
236
236
|
return e instanceof ye ? e.message : `An application error has occurred:
|
|
237
237
|
|
|
238
238
|
${Ee(e).message}
|
|
239
239
|
|
|
240
|
-
Please refresh the page and try again. If this error persists, ${
|
|
240
|
+
Please refresh the page and try again. If this error persists, ${D.unhandledErrorSupportText}.`;
|
|
241
241
|
}
|
|
242
242
|
function Ee(e, t) {
|
|
243
|
-
const o =
|
|
243
|
+
const o = gn(e) ? e : new Error(String(e));
|
|
244
244
|
return t && (o.cause = Ee(t)), o;
|
|
245
245
|
}
|
|
246
|
-
function
|
|
246
|
+
function gn(e) {
|
|
247
247
|
return e instanceof Error || typeof e == "object" && e !== null && "message" in e && "name" in e;
|
|
248
248
|
}
|
|
249
|
-
async function
|
|
249
|
+
async function ii(e, t) {
|
|
250
250
|
const o = Ee(e, t?.cause);
|
|
251
|
-
return o instanceof ye ||
|
|
251
|
+
return o instanceof ye || D.errorHandler(o), ht({
|
|
252
252
|
title: t?.title,
|
|
253
253
|
message: o,
|
|
254
254
|
classes: t?.classes
|
|
255
255
|
});
|
|
256
256
|
}
|
|
257
|
-
async function
|
|
257
|
+
async function ri(e, t) {
|
|
258
258
|
const o = Ee(e, t);
|
|
259
|
-
o instanceof ye ||
|
|
259
|
+
o instanceof ye || D.errorHandler(o);
|
|
260
260
|
}
|
|
261
261
|
const ne = Symbol("MaskState");
|
|
262
|
-
function
|
|
262
|
+
function ai(e, t) {
|
|
263
263
|
const o = e.$?.vnode.el, a = o.closest(".vf-modal");
|
|
264
|
-
return
|
|
264
|
+
return yn(a ?? o, t);
|
|
265
265
|
}
|
|
266
|
-
function
|
|
266
|
+
function si(e) {
|
|
267
267
|
const t = e.$?.vnode.el, o = t.closest(".vf-modal");
|
|
268
|
-
return
|
|
268
|
+
return pt(o ?? t);
|
|
269
269
|
}
|
|
270
|
-
function
|
|
270
|
+
function yn(e, t) {
|
|
271
271
|
if (!e[ne]) {
|
|
272
272
|
const o = document.createElement("div");
|
|
273
273
|
o.classList.add("vf-mask"), e.appendChild(o), e[ne] = { maskEl: o };
|
|
274
274
|
}
|
|
275
|
-
return e[ne].maskEl.innerText = t ?? "", () =>
|
|
275
|
+
return e[ne].maskEl.innerText = t ?? "", () => pt(e);
|
|
276
276
|
}
|
|
277
|
-
function
|
|
277
|
+
function pt(e) {
|
|
278
278
|
e[ne] && e.removeChild(e[ne].maskEl);
|
|
279
279
|
}
|
|
280
|
-
const
|
|
281
|
-
function
|
|
282
|
-
const a = e instanceof Element ? e :
|
|
280
|
+
const Ce = Symbol("FormMaskState");
|
|
281
|
+
function En(e, t, o) {
|
|
282
|
+
const a = e instanceof Element ? e : mt(e);
|
|
283
283
|
if (!a) return () => {
|
|
284
284
|
};
|
|
285
285
|
a.classList.add("vf-masked");
|
|
@@ -287,42 +287,43 @@ function gn(e, t, o) {
|
|
|
287
287
|
let l;
|
|
288
288
|
p && (l = p.tagName === "INPUT" ? p.value : p.innerHTML, p.setAttribute("disabled", "disabled"), p.innerText = o ?? "Please wait...");
|
|
289
289
|
const g = [...a.querySelectorAll("input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled])")];
|
|
290
|
-
return g.forEach((E) => E.setAttribute("disabled", "disabled")), a[
|
|
290
|
+
return g.forEach((E) => E.setAttribute("disabled", "disabled")), a[Ce] = {
|
|
291
291
|
disabledElements: g,
|
|
292
292
|
waitButton: p,
|
|
293
293
|
buttonHtml: l
|
|
294
|
-
}, () =>
|
|
294
|
+
}, () => vt(a);
|
|
295
295
|
}
|
|
296
|
-
function
|
|
297
|
-
const t = e instanceof Element ? e :
|
|
296
|
+
function vt(e) {
|
|
297
|
+
const t = e instanceof Element ? e : mt(e);
|
|
298
298
|
if (!t) return;
|
|
299
|
-
const o = t[
|
|
300
|
-
o && (t.classList.remove("vf-masked"), o.disabledElements.forEach((a) => a.removeAttribute("disabled")), o.waitButton && (o.waitButton.innerHTML = o.buttonHtml, o.waitButton.removeAttribute("disabled")), delete t[
|
|
299
|
+
const o = t[Ce];
|
|
300
|
+
o && (t.classList.remove("vf-masked"), o.disabledElements.forEach((a) => a.removeAttribute("disabled")), o.waitButton && (o.waitButton.innerHTML = o.buttonHtml, o.waitButton.removeAttribute("disabled")), delete t[Ce]);
|
|
301
301
|
}
|
|
302
|
-
function
|
|
302
|
+
function mt(e) {
|
|
303
303
|
const t = e?.$?.vnode.el;
|
|
304
304
|
return t ? t.tagName === "FORM" ? t : t.querySelector("form") : null;
|
|
305
305
|
}
|
|
306
|
-
const
|
|
306
|
+
const kn = ["id"], wn = {
|
|
307
307
|
key: 0,
|
|
308
308
|
class: "vf-modal-header"
|
|
309
|
-
},
|
|
309
|
+
}, xn = { class: "vf-modal-content" }, bn = {
|
|
310
310
|
key: 1,
|
|
311
311
|
class: "vf-modal-footer"
|
|
312
|
-
},
|
|
312
|
+
}, Tn = /* @__PURE__ */ q({
|
|
313
313
|
__name: "vf-modal",
|
|
314
314
|
props: {
|
|
315
315
|
id: {},
|
|
316
316
|
closeOnMaskClick: { type: Boolean },
|
|
317
317
|
scrolls: { type: Boolean },
|
|
318
318
|
closeX: { type: Boolean },
|
|
319
|
-
class: {}
|
|
319
|
+
class: {},
|
|
320
|
+
onClose: { type: Function }
|
|
320
321
|
},
|
|
321
322
|
emits: ["formSubmit"],
|
|
322
323
|
setup(e, { expose: t }) {
|
|
323
324
|
const o = Ne(), a = e;
|
|
324
|
-
t({ mask: n, unmask:
|
|
325
|
-
const p = N(), l = N(), y = N(!1), g = O(() =>
|
|
325
|
+
t({ mask: n, unmask: r, hide: i, unhide: s });
|
|
326
|
+
const p = N(), l = N(), y = N(!1), g = O(() => dt([...Array.isArray(a.class) ? a.class : [a.class], y.value && "hidden"]));
|
|
326
327
|
z(() => {
|
|
327
328
|
document.body.classList.add("vf-modal-open"), a.closeOnMaskClick && (window.addEventListener("keydown", v), p.value?.addEventListener("click", E));
|
|
328
329
|
}), me(() => {
|
|
@@ -338,21 +339,21 @@ const yn = ["id"], En = {
|
|
|
338
339
|
}
|
|
339
340
|
}
|
|
340
341
|
function c() {
|
|
341
|
-
|
|
342
|
+
a.onClose ? a.onClose() : ft(o);
|
|
342
343
|
}
|
|
343
344
|
function n() {
|
|
344
|
-
return
|
|
345
|
-
}
|
|
346
|
-
function i() {
|
|
347
|
-
ft(l.value);
|
|
345
|
+
return En(l.value), () => r();
|
|
348
346
|
}
|
|
349
347
|
function r() {
|
|
348
|
+
vt(l.value);
|
|
349
|
+
}
|
|
350
|
+
function i() {
|
|
350
351
|
return y.value = !0, () => s();
|
|
351
352
|
}
|
|
352
353
|
function s() {
|
|
353
354
|
y.value = !1;
|
|
354
355
|
}
|
|
355
|
-
return (u, h) => (
|
|
356
|
+
return (u, h) => (S(), I("div", {
|
|
356
357
|
id: e.id,
|
|
357
358
|
ref_key: "overlay",
|
|
358
359
|
ref: p,
|
|
@@ -365,24 +366,24 @@ const yn = ["id"], En = {
|
|
|
365
366
|
class: P(["vf-modal", { scrolls: e.scrolls }]),
|
|
366
367
|
onSubmit: h[0] || (h[0] = Le((f) => u.$emit("formSubmit"), ["prevent"]))
|
|
367
368
|
}, [
|
|
368
|
-
u.$slots.header ? (
|
|
369
|
+
u.$slots.header ? (S(), I("div", wn, [
|
|
369
370
|
K(u.$slots, "header"),
|
|
370
|
-
a.closeX ? (
|
|
371
|
+
a.closeX ? (S(), I("i", {
|
|
371
372
|
key: 0,
|
|
372
373
|
class: "close",
|
|
373
374
|
onClick: c
|
|
374
375
|
})) : W("", !0)
|
|
375
376
|
])) : W("", !0),
|
|
376
|
-
U("div",
|
|
377
|
+
U("div", xn, [
|
|
377
378
|
K(u.$slots, "default")
|
|
378
379
|
]),
|
|
379
|
-
u.$slots.footer ? (
|
|
380
|
+
u.$slots.footer ? (S(), I("div", bn, [
|
|
380
381
|
K(u.$slots, "footer")
|
|
381
382
|
])) : W("", !0)
|
|
382
383
|
], 34)
|
|
383
|
-
], 10,
|
|
384
|
+
], 10, kn));
|
|
384
385
|
}
|
|
385
|
-
}),
|
|
386
|
+
}), Sn = ["innerHTML"], In = ["innerText"], le = /* @__PURE__ */ q({
|
|
386
387
|
__name: "vf-alert-modal",
|
|
387
388
|
props: {
|
|
388
389
|
isBare: { type: Boolean },
|
|
@@ -395,41 +396,41 @@ const yn = ["id"], En = {
|
|
|
395
396
|
callback: { type: Function }
|
|
396
397
|
},
|
|
397
398
|
setup(e) {
|
|
398
|
-
const t = e, o = O(() => t.message instanceof Error ?
|
|
399
|
+
const t = e, o = O(() => t.message instanceof Error ? mn(t.message) : t.message);
|
|
399
400
|
return (a, p) => {
|
|
400
|
-
const l =
|
|
401
|
-
return
|
|
401
|
+
const l = zt("autofocus");
|
|
402
|
+
return S(), lt(Tn, {
|
|
402
403
|
class: P(["vf-alert", ...e.classes ?? []]),
|
|
403
404
|
scrolls: ""
|
|
404
|
-
},
|
|
405
|
-
default:
|
|
406
|
-
e.iconClass ? (
|
|
405
|
+
}, qt({
|
|
406
|
+
default: Te(() => [
|
|
407
|
+
e.iconClass ? (S(), I("i", {
|
|
407
408
|
key: 0,
|
|
408
409
|
class: P(["vf-alert-icon", e.iconClass])
|
|
409
410
|
}, null, 2)) : W("", !0),
|
|
410
|
-
e.isHtml ? (
|
|
411
|
+
e.isHtml ? (S(), I("div", {
|
|
411
412
|
key: 1,
|
|
412
|
-
|
|
413
|
+
innerHTML: o.value,
|
|
413
414
|
class: "user-message"
|
|
414
|
-
}, null, 8,
|
|
415
|
+
}, null, 8, Sn)) : (S(), I("div", {
|
|
415
416
|
key: 2,
|
|
416
417
|
innerText: o.value
|
|
417
|
-
}, null, 8,
|
|
418
|
+
}, null, 8, In))
|
|
418
419
|
]),
|
|
419
420
|
_: 2
|
|
420
421
|
}, [
|
|
421
422
|
e.title ? {
|
|
422
423
|
name: "header",
|
|
423
|
-
fn:
|
|
424
|
+
fn: Te(() => [
|
|
424
425
|
te(J(e.title), 1)
|
|
425
426
|
]),
|
|
426
427
|
key: "0"
|
|
427
428
|
} : void 0,
|
|
428
429
|
e.isBare ? void 0 : {
|
|
429
430
|
name: "footer",
|
|
430
|
-
fn:
|
|
431
|
-
e.shouldConfirm ? (
|
|
432
|
-
fe((
|
|
431
|
+
fn: Te(() => [
|
|
432
|
+
e.shouldConfirm ? (S(), I(he, { key: 0 }, [
|
|
433
|
+
fe((S(), I("button", {
|
|
433
434
|
class: "primary",
|
|
434
435
|
onClick: p[0] || (p[0] = () => e.callback(!0))
|
|
435
436
|
}, [...p[3] || (p[3] = [
|
|
@@ -441,7 +442,7 @@ const yn = ["id"], En = {
|
|
|
441
442
|
class: "default",
|
|
442
443
|
onClick: p[1] || (p[1] = () => e.callback(!1))
|
|
443
444
|
}, "Cancel")
|
|
444
|
-
], 64)) : fe((
|
|
445
|
+
], 64)) : fe((S(), I("button", {
|
|
445
446
|
key: 1,
|
|
446
447
|
class: "default",
|
|
447
448
|
onClick: p[2] || (p[2] = () => e.callback(!0))
|
|
@@ -457,16 +458,16 @@ const yn = ["id"], En = {
|
|
|
457
458
|
};
|
|
458
459
|
}
|
|
459
460
|
});
|
|
460
|
-
function
|
|
461
|
+
function Mn(e) {
|
|
461
462
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
462
463
|
}
|
|
463
464
|
var ce = { exports: {} };
|
|
464
|
-
var
|
|
465
|
-
function
|
|
465
|
+
var Cn = ce.exports, Ke;
|
|
466
|
+
function On() {
|
|
466
467
|
return Ke || (Ke = 1, (function(e, t) {
|
|
467
468
|
(function(o, a) {
|
|
468
469
|
e.exports = a();
|
|
469
|
-
})(
|
|
470
|
+
})(Cn, (function() {
|
|
470
471
|
var o = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(v) {
|
|
471
472
|
return typeof v;
|
|
472
473
|
} : function(v) {
|
|
@@ -476,67 +477,67 @@ function Mn() {
|
|
|
476
477
|
throw new TypeError("Cannot call a class as a function");
|
|
477
478
|
}, p = /* @__PURE__ */ (function() {
|
|
478
479
|
function v(c, n) {
|
|
479
|
-
for (var
|
|
480
|
-
var
|
|
481
|
-
|
|
480
|
+
for (var r = 0; r < n.length; r++) {
|
|
481
|
+
var i = n[r];
|
|
482
|
+
i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(c, i.key, i);
|
|
482
483
|
}
|
|
483
484
|
}
|
|
484
|
-
return function(c, n,
|
|
485
|
-
return n && v(c.prototype, n),
|
|
485
|
+
return function(c, n, r) {
|
|
486
|
+
return n && v(c.prototype, n), r && v(c, r), c;
|
|
486
487
|
};
|
|
487
488
|
})(), l = Object.assign || function(v) {
|
|
488
489
|
for (var c = 1; c < arguments.length; c++) {
|
|
489
490
|
var n = arguments[c];
|
|
490
|
-
for (var
|
|
491
|
-
Object.prototype.hasOwnProperty.call(n,
|
|
491
|
+
for (var r in n)
|
|
492
|
+
Object.prototype.hasOwnProperty.call(n, r) && (v[r] = n[r]);
|
|
492
493
|
}
|
|
493
494
|
return v;
|
|
494
495
|
}, y = (function() {
|
|
495
496
|
function v(c) {
|
|
496
|
-
var n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0,
|
|
497
|
-
a(this, v), this.ctx = c, this.iframes = n, this.exclude =
|
|
497
|
+
var n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0, r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : [], i = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : 5e3;
|
|
498
|
+
a(this, v), this.ctx = c, this.iframes = n, this.exclude = r, this.iframesTimeout = i;
|
|
498
499
|
}
|
|
499
500
|
return p(v, [{
|
|
500
501
|
key: "getContexts",
|
|
501
502
|
value: function() {
|
|
502
|
-
var n = void 0,
|
|
503
|
-
return typeof this.ctx > "u" || !this.ctx ? n = [] : NodeList.prototype.isPrototypeOf(this.ctx) ? n = Array.prototype.slice.call(this.ctx) : Array.isArray(this.ctx) ? n = this.ctx : typeof this.ctx == "string" ? n = Array.prototype.slice.call(document.querySelectorAll(this.ctx)) : n = [this.ctx], n.forEach(function(
|
|
504
|
-
var s =
|
|
505
|
-
return u.contains(
|
|
503
|
+
var n = void 0, r = [];
|
|
504
|
+
return typeof this.ctx > "u" || !this.ctx ? n = [] : NodeList.prototype.isPrototypeOf(this.ctx) ? n = Array.prototype.slice.call(this.ctx) : Array.isArray(this.ctx) ? n = this.ctx : typeof this.ctx == "string" ? n = Array.prototype.slice.call(document.querySelectorAll(this.ctx)) : n = [this.ctx], n.forEach(function(i) {
|
|
505
|
+
var s = r.filter(function(u) {
|
|
506
|
+
return u.contains(i);
|
|
506
507
|
}).length > 0;
|
|
507
|
-
|
|
508
|
-
}),
|
|
508
|
+
r.indexOf(i) === -1 && !s && r.push(i);
|
|
509
|
+
}), r;
|
|
509
510
|
}
|
|
510
511
|
}, {
|
|
511
512
|
key: "getIframeContents",
|
|
512
|
-
value: function(n,
|
|
513
|
-
var
|
|
513
|
+
value: function(n, r) {
|
|
514
|
+
var i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : function() {
|
|
514
515
|
}, s = void 0;
|
|
515
516
|
try {
|
|
516
517
|
var u = n.contentWindow;
|
|
517
518
|
if (s = u.document, !u || !s)
|
|
518
519
|
throw new Error("iframe inaccessible");
|
|
519
520
|
} catch {
|
|
520
|
-
|
|
521
|
+
i();
|
|
521
522
|
}
|
|
522
|
-
s &&
|
|
523
|
+
s && r(s);
|
|
523
524
|
}
|
|
524
525
|
}, {
|
|
525
526
|
key: "isIframeBlank",
|
|
526
527
|
value: function(n) {
|
|
527
|
-
var
|
|
528
|
-
return s ===
|
|
528
|
+
var r = "about:blank", i = n.getAttribute("src").trim(), s = n.contentWindow.location.href;
|
|
529
|
+
return s === r && i !== r && i;
|
|
529
530
|
}
|
|
530
531
|
}, {
|
|
531
532
|
key: "observeIframeLoad",
|
|
532
|
-
value: function(n,
|
|
533
|
+
value: function(n, r, i) {
|
|
533
534
|
var s = this, u = !1, h = null, f = function m() {
|
|
534
535
|
if (!u) {
|
|
535
536
|
u = !0, clearTimeout(h);
|
|
536
537
|
try {
|
|
537
|
-
s.isIframeBlank(n) || (n.removeEventListener("load", m), s.getIframeContents(n,
|
|
538
|
+
s.isIframeBlank(n) || (n.removeEventListener("load", m), s.getIframeContents(n, r, i));
|
|
538
539
|
} catch {
|
|
539
|
-
|
|
540
|
+
i();
|
|
540
541
|
}
|
|
541
542
|
}
|
|
542
543
|
};
|
|
@@ -544,46 +545,46 @@ function Mn() {
|
|
|
544
545
|
}
|
|
545
546
|
}, {
|
|
546
547
|
key: "onIframeReady",
|
|
547
|
-
value: function(n,
|
|
548
|
+
value: function(n, r, i) {
|
|
548
549
|
try {
|
|
549
|
-
n.contentWindow.document.readyState === "complete" ? this.isIframeBlank(n) ? this.observeIframeLoad(n,
|
|
550
|
+
n.contentWindow.document.readyState === "complete" ? this.isIframeBlank(n) ? this.observeIframeLoad(n, r, i) : this.getIframeContents(n, r, i) : this.observeIframeLoad(n, r, i);
|
|
550
551
|
} catch {
|
|
551
|
-
|
|
552
|
+
i();
|
|
552
553
|
}
|
|
553
554
|
}
|
|
554
555
|
}, {
|
|
555
556
|
key: "waitForIframes",
|
|
556
|
-
value: function(n,
|
|
557
|
-
var
|
|
557
|
+
value: function(n, r) {
|
|
558
|
+
var i = this, s = 0;
|
|
558
559
|
this.forEachIframe(n, function() {
|
|
559
560
|
return !0;
|
|
560
561
|
}, function(u) {
|
|
561
|
-
s++,
|
|
562
|
-
--s ||
|
|
562
|
+
s++, i.waitForIframes(u.querySelector("html"), function() {
|
|
563
|
+
--s || r();
|
|
563
564
|
});
|
|
564
565
|
}, function(u) {
|
|
565
|
-
u ||
|
|
566
|
+
u || r();
|
|
566
567
|
});
|
|
567
568
|
}
|
|
568
569
|
}, {
|
|
569
570
|
key: "forEachIframe",
|
|
570
|
-
value: function(n,
|
|
571
|
+
value: function(n, r, i) {
|
|
571
572
|
var s = this, u = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : function() {
|
|
572
573
|
}, h = n.querySelectorAll("iframe"), f = h.length, m = 0;
|
|
573
574
|
h = Array.prototype.slice.call(h);
|
|
574
|
-
var
|
|
575
|
+
var x = function() {
|
|
575
576
|
--f <= 0 && u(m);
|
|
576
577
|
};
|
|
577
|
-
f ||
|
|
578
|
-
v.matches(
|
|
579
|
-
|
|
580
|
-
},
|
|
578
|
+
f || x(), h.forEach(function(T) {
|
|
579
|
+
v.matches(T, s.exclude) ? x() : s.onIframeReady(T, function(C) {
|
|
580
|
+
r(T) && (m++, i(C)), x();
|
|
581
|
+
}, x);
|
|
581
582
|
});
|
|
582
583
|
}
|
|
583
584
|
}, {
|
|
584
585
|
key: "createIterator",
|
|
585
|
-
value: function(n,
|
|
586
|
-
return document.createNodeIterator(n,
|
|
586
|
+
value: function(n, r, i) {
|
|
587
|
+
return document.createNodeIterator(n, r, i, !1);
|
|
587
588
|
}
|
|
588
589
|
}, {
|
|
589
590
|
key: "createInstanceOnIframe",
|
|
@@ -592,11 +593,11 @@ function Mn() {
|
|
|
592
593
|
}
|
|
593
594
|
}, {
|
|
594
595
|
key: "compareNodeIframe",
|
|
595
|
-
value: function(n,
|
|
596
|
-
var s = n.compareDocumentPosition(
|
|
596
|
+
value: function(n, r, i) {
|
|
597
|
+
var s = n.compareDocumentPosition(i), u = Node.DOCUMENT_POSITION_PRECEDING;
|
|
597
598
|
if (s & u)
|
|
598
|
-
if (
|
|
599
|
-
var h =
|
|
599
|
+
if (r !== null) {
|
|
600
|
+
var h = r.compareDocumentPosition(i), f = Node.DOCUMENT_POSITION_FOLLOWING;
|
|
600
601
|
if (h & f)
|
|
601
602
|
return !0;
|
|
602
603
|
} else
|
|
@@ -606,75 +607,75 @@ function Mn() {
|
|
|
606
607
|
}, {
|
|
607
608
|
key: "getIteratorNode",
|
|
608
609
|
value: function(n) {
|
|
609
|
-
var
|
|
610
|
-
return
|
|
611
|
-
prevNode:
|
|
612
|
-
node:
|
|
610
|
+
var r = n.previousNode(), i = void 0;
|
|
611
|
+
return r === null ? i = n.nextNode() : i = n.nextNode() && n.nextNode(), {
|
|
612
|
+
prevNode: r,
|
|
613
|
+
node: i
|
|
613
614
|
};
|
|
614
615
|
}
|
|
615
616
|
}, {
|
|
616
617
|
key: "checkIframeFilter",
|
|
617
|
-
value: function(n,
|
|
618
|
+
value: function(n, r, i, s) {
|
|
618
619
|
var u = !1, h = !1;
|
|
619
620
|
return s.forEach(function(f, m) {
|
|
620
|
-
f.val ===
|
|
621
|
-
}), this.compareNodeIframe(n,
|
|
622
|
-
val:
|
|
621
|
+
f.val === i && (u = m, h = f.handled);
|
|
622
|
+
}), this.compareNodeIframe(n, r, i) ? (u === !1 && !h ? s.push({
|
|
623
|
+
val: i,
|
|
623
624
|
handled: !0
|
|
624
625
|
}) : u !== !1 && !h && (s[u].handled = !0), !0) : (u === !1 && s.push({
|
|
625
|
-
val:
|
|
626
|
+
val: i,
|
|
626
627
|
handled: !1
|
|
627
628
|
}), !1);
|
|
628
629
|
}
|
|
629
630
|
}, {
|
|
630
631
|
key: "handleOpenIframes",
|
|
631
|
-
value: function(n,
|
|
632
|
+
value: function(n, r, i, s) {
|
|
632
633
|
var u = this;
|
|
633
634
|
n.forEach(function(h) {
|
|
634
635
|
h.handled || u.getIframeContents(h.val, function(f) {
|
|
635
|
-
u.createInstanceOnIframe(f).forEachNode(
|
|
636
|
+
u.createInstanceOnIframe(f).forEachNode(r, i, s);
|
|
636
637
|
});
|
|
637
638
|
});
|
|
638
639
|
}
|
|
639
640
|
}, {
|
|
640
641
|
key: "iterateThroughNodes",
|
|
641
|
-
value: function(n,
|
|
642
|
-
for (var h = this, f = this.createIterator(
|
|
642
|
+
value: function(n, r, i, s, u) {
|
|
643
|
+
for (var h = this, f = this.createIterator(r, n, s), m = [], x = [], T = void 0, C = void 0, L = function() {
|
|
643
644
|
var F = h.getIteratorNode(f);
|
|
644
|
-
return C = F.prevNode,
|
|
645
|
+
return C = F.prevNode, T = F.node, T;
|
|
645
646
|
}; L(); )
|
|
646
|
-
this.iframes && this.forEachIframe(
|
|
647
|
-
return h.checkIframeFilter(
|
|
647
|
+
this.iframes && this.forEachIframe(r, function(R) {
|
|
648
|
+
return h.checkIframeFilter(T, C, R, m);
|
|
648
649
|
}, function(R) {
|
|
649
650
|
h.createInstanceOnIframe(R).forEachNode(n, function(F) {
|
|
650
|
-
return
|
|
651
|
+
return x.push(F);
|
|
651
652
|
}, s);
|
|
652
|
-
}),
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
}), this.iframes && this.handleOpenIframes(m, n,
|
|
653
|
+
}), x.push(T);
|
|
654
|
+
x.forEach(function(R) {
|
|
655
|
+
i(R);
|
|
656
|
+
}), this.iframes && this.handleOpenIframes(m, n, i, s), u();
|
|
656
657
|
}
|
|
657
658
|
}, {
|
|
658
659
|
key: "forEachNode",
|
|
659
|
-
value: function(n,
|
|
660
|
+
value: function(n, r, i) {
|
|
660
661
|
var s = this, u = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : function() {
|
|
661
662
|
}, h = this.getContexts(), f = h.length;
|
|
662
663
|
f || u(), h.forEach(function(m) {
|
|
663
|
-
var
|
|
664
|
-
s.iterateThroughNodes(n, m,
|
|
664
|
+
var x = function() {
|
|
665
|
+
s.iterateThroughNodes(n, m, r, i, function() {
|
|
665
666
|
--f <= 0 && u();
|
|
666
667
|
});
|
|
667
668
|
};
|
|
668
|
-
s.iframes ? s.waitForIframes(m,
|
|
669
|
+
s.iframes ? s.waitForIframes(m, x) : x();
|
|
669
670
|
});
|
|
670
671
|
}
|
|
671
672
|
}], [{
|
|
672
673
|
key: "matches",
|
|
673
|
-
value: function(n,
|
|
674
|
-
var
|
|
674
|
+
value: function(n, r) {
|
|
675
|
+
var i = typeof r == "string" ? [r] : r, s = n.matches || n.matchesSelector || n.msMatchesSelector || n.mozMatchesSelector || n.oMatchesSelector || n.webkitMatchesSelector;
|
|
675
676
|
if (s) {
|
|
676
677
|
var u = !1;
|
|
677
|
-
return
|
|
678
|
+
return i.every(function(h) {
|
|
678
679
|
return s.call(n, h) ? (u = !0, !1) : !0;
|
|
679
680
|
}), u;
|
|
680
681
|
} else
|
|
@@ -690,8 +691,8 @@ function Mn() {
|
|
|
690
691
|
return p(v, [{
|
|
691
692
|
key: "log",
|
|
692
693
|
value: function(n) {
|
|
693
|
-
var
|
|
694
|
-
this.opt.debug && (typeof
|
|
694
|
+
var r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "debug", i = this.opt.log;
|
|
695
|
+
this.opt.debug && (typeof i > "u" ? "undefined" : o(i)) === "object" && typeof i[r] == "function" && i[r]("mark.js: " + n);
|
|
695
696
|
}
|
|
696
697
|
}, {
|
|
697
698
|
key: "escapeStr",
|
|
@@ -706,11 +707,11 @@ function Mn() {
|
|
|
706
707
|
}, {
|
|
707
708
|
key: "createSynonymsRegExp",
|
|
708
709
|
value: function(n) {
|
|
709
|
-
var
|
|
710
|
-
for (var u in
|
|
711
|
-
if (
|
|
712
|
-
var h =
|
|
713
|
-
f !== "" && m !== "" && (n = n.replace(new RegExp("(" + this.escapeStr(f) + "|" + this.escapeStr(m) + ")", "gm" +
|
|
710
|
+
var r = this.opt.synonyms, i = this.opt.caseSensitive ? "" : "i", s = this.opt.ignoreJoiners || this.opt.ignorePunctuation.length ? "\0" : "";
|
|
711
|
+
for (var u in r)
|
|
712
|
+
if (r.hasOwnProperty(u)) {
|
|
713
|
+
var h = r[u], f = this.opt.wildcards !== "disabled" ? this.setupWildcardsRegExp(u) : this.escapeStr(u), m = this.opt.wildcards !== "disabled" ? this.setupWildcardsRegExp(h) : this.escapeStr(h);
|
|
714
|
+
f !== "" && m !== "" && (n = n.replace(new RegExp("(" + this.escapeStr(f) + "|" + this.escapeStr(m) + ")", "gm" + i), s + ("(" + this.processSynomyms(f) + "|") + (this.processSynomyms(m) + ")") + s));
|
|
714
715
|
}
|
|
715
716
|
return n;
|
|
716
717
|
}
|
|
@@ -722,42 +723,42 @@ function Mn() {
|
|
|
722
723
|
}, {
|
|
723
724
|
key: "setupWildcardsRegExp",
|
|
724
725
|
value: function(n) {
|
|
725
|
-
return n = n.replace(/(?:\\)*\?/g, function(
|
|
726
|
-
return
|
|
727
|
-
}), n.replace(/(?:\\)*\*/g, function(
|
|
728
|
-
return
|
|
726
|
+
return n = n.replace(/(?:\\)*\?/g, function(r) {
|
|
727
|
+
return r.charAt(0) === "\\" ? "?" : "";
|
|
728
|
+
}), n.replace(/(?:\\)*\*/g, function(r) {
|
|
729
|
+
return r.charAt(0) === "\\" ? "*" : "";
|
|
729
730
|
});
|
|
730
731
|
}
|
|
731
732
|
}, {
|
|
732
733
|
key: "createWildcardsRegExp",
|
|
733
734
|
value: function(n) {
|
|
734
|
-
var
|
|
735
|
-
return n.replace(/\u0001/g,
|
|
735
|
+
var r = this.opt.wildcards === "withSpaces";
|
|
736
|
+
return n.replace(/\u0001/g, r ? "[\\S\\s]?" : "\\S?").replace(/\u0002/g, r ? "[\\S\\s]*?" : "\\S*");
|
|
736
737
|
}
|
|
737
738
|
}, {
|
|
738
739
|
key: "setupIgnoreJoinersRegExp",
|
|
739
740
|
value: function(n) {
|
|
740
|
-
return n.replace(/[^(|)\\]/g, function(
|
|
741
|
-
var u = s.charAt(
|
|
742
|
-
return /[(|)\\]/.test(u) || u === "" ?
|
|
741
|
+
return n.replace(/[^(|)\\]/g, function(r, i, s) {
|
|
742
|
+
var u = s.charAt(i + 1);
|
|
743
|
+
return /[(|)\\]/.test(u) || u === "" ? r : r + "\0";
|
|
743
744
|
});
|
|
744
745
|
}
|
|
745
746
|
}, {
|
|
746
747
|
key: "createJoinersRegExp",
|
|
747
748
|
value: function(n) {
|
|
748
|
-
var
|
|
749
|
-
return Array.isArray(
|
|
749
|
+
var r = [], i = this.opt.ignorePunctuation;
|
|
750
|
+
return Array.isArray(i) && i.length && r.push(this.escapeStr(i.join(""))), this.opt.ignoreJoiners && r.push("\\u00ad\\u200b\\u200c\\u200d"), r.length ? n.split(/\u0000+/).join("[" + r.join("") + "]*") : n;
|
|
750
751
|
}
|
|
751
752
|
}, {
|
|
752
753
|
key: "createDiacriticsRegExp",
|
|
753
754
|
value: function(n) {
|
|
754
|
-
var
|
|
755
|
+
var r = this.opt.caseSensitive ? "" : "i", i = this.opt.caseSensitive ? ["aàáảãạăằắẳẵặâầấẩẫậäåāą", "AÀÁẢÃẠĂẰẮẲẴẶÂẦẤẨẪẬÄÅĀĄ", "cçćč", "CÇĆČ", "dđď", "DĐĎ", "eèéẻẽẹêềếểễệëěēę", "EÈÉẺẼẸÊỀẾỂỄỆËĚĒĘ", "iìíỉĩịîïī", "IÌÍỈĨỊÎÏĪ", "lł", "LŁ", "nñňń", "NÑŇŃ", "oòóỏõọôồốổỗộơởỡớờợöøō", "OÒÓỎÕỌÔỒỐỔỖỘƠỞỠỚỜỢÖØŌ", "rř", "RŘ", "sšśșş", "SŠŚȘŞ", "tťțţ", "TŤȚŢ", "uùúủũụưừứửữựûüůū", "UÙÚỦŨỤƯỪỨỬỮỰÛÜŮŪ", "yýỳỷỹỵÿ", "YÝỲỶỸỴŸ", "zžżź", "ZŽŻŹ"] : ["aàáảãạăằắẳẵặâầấẩẫậäåāąAÀÁẢÃẠĂẰẮẲẴẶÂẦẤẨẪẬÄÅĀĄ", "cçćčCÇĆČ", "dđďDĐĎ", "eèéẻẽẹêềếểễệëěēęEÈÉẺẼẸÊỀẾỂỄỆËĚĒĘ", "iìíỉĩịîïīIÌÍỈĨỊÎÏĪ", "lłLŁ", "nñňńNÑŇŃ", "oòóỏõọôồốổỗộơởỡớờợöøōOÒÓỎÕỌÔỒỐỔỖỘƠỞỠỚỜỢÖØŌ", "rřRŘ", "sšśșşSŠŚȘŞ", "tťțţTŤȚŢ", "uùúủũụưừứửữựûüůūUÙÚỦŨỤƯỪỨỬỮỰÛÜŮŪ", "yýỳỷỹỵÿYÝỲỶỸỴŸ", "zžżźZŽŻŹ"], s = [];
|
|
755
756
|
return n.split("").forEach(function(u) {
|
|
756
|
-
|
|
757
|
+
i.every(function(h) {
|
|
757
758
|
if (h.indexOf(u) !== -1) {
|
|
758
759
|
if (s.indexOf(h) > -1)
|
|
759
760
|
return !1;
|
|
760
|
-
n = n.replace(new RegExp("[" + h + "]", "gm" +
|
|
761
|
+
n = n.replace(new RegExp("[" + h + "]", "gm" + r), "[" + h + "]"), s.push(h);
|
|
761
762
|
}
|
|
762
763
|
return !0;
|
|
763
764
|
});
|
|
@@ -771,15 +772,15 @@ function Mn() {
|
|
|
771
772
|
}, {
|
|
772
773
|
key: "createAccuracyRegExp",
|
|
773
774
|
value: function(n) {
|
|
774
|
-
var
|
|
775
|
+
var r = this, i = "!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~¡¿", s = this.opt.accuracy, u = typeof s == "string" ? s : s.value, h = typeof s == "string" ? [] : s.limiters, f = "";
|
|
775
776
|
switch (h.forEach(function(m) {
|
|
776
|
-
f += "|" +
|
|
777
|
+
f += "|" + r.escapeStr(m);
|
|
777
778
|
}), u) {
|
|
778
779
|
case "partially":
|
|
779
780
|
default:
|
|
780
781
|
return "()(" + n + ")";
|
|
781
782
|
case "complementary":
|
|
782
|
-
return f = "\\s" + (f || this.escapeStr(
|
|
783
|
+
return f = "\\s" + (f || this.escapeStr(i)), "()([^" + f + "]*" + n + "[^" + f + "]*)";
|
|
783
784
|
case "exactly":
|
|
784
785
|
return "(^|\\s" + f + ")(" + n + ")(?=$|\\s" + f + ")";
|
|
785
786
|
}
|
|
@@ -787,16 +788,16 @@ function Mn() {
|
|
|
787
788
|
}, {
|
|
788
789
|
key: "getSeparatedKeywords",
|
|
789
790
|
value: function(n) {
|
|
790
|
-
var
|
|
791
|
+
var r = this, i = [];
|
|
791
792
|
return n.forEach(function(s) {
|
|
792
|
-
|
|
793
|
-
u.trim() &&
|
|
794
|
-
}) : s.trim() &&
|
|
793
|
+
r.opt.separateWordSearch ? s.split(" ").forEach(function(u) {
|
|
794
|
+
u.trim() && i.indexOf(u) === -1 && i.push(u);
|
|
795
|
+
}) : s.trim() && i.indexOf(s) === -1 && i.push(s);
|
|
795
796
|
}), {
|
|
796
|
-
keywords:
|
|
797
|
+
keywords: i.sort(function(s, u) {
|
|
797
798
|
return u.length - s.length;
|
|
798
799
|
}),
|
|
799
|
-
length:
|
|
800
|
+
length: i.length
|
|
800
801
|
};
|
|
801
802
|
}
|
|
802
803
|
}, {
|
|
@@ -807,32 +808,32 @@ function Mn() {
|
|
|
807
808
|
}, {
|
|
808
809
|
key: "checkRanges",
|
|
809
810
|
value: function(n) {
|
|
810
|
-
var
|
|
811
|
+
var r = this;
|
|
811
812
|
if (!Array.isArray(n) || Object.prototype.toString.call(n[0]) !== "[object Object]")
|
|
812
813
|
return this.log("markRanges() will only accept an array of objects"), this.opt.noMatch(n), [];
|
|
813
|
-
var
|
|
814
|
+
var i = [], s = 0;
|
|
814
815
|
return n.sort(function(u, h) {
|
|
815
816
|
return u.start - h.start;
|
|
816
817
|
}).forEach(function(u) {
|
|
817
|
-
var h =
|
|
818
|
-
|
|
819
|
-
}),
|
|
818
|
+
var h = r.callNoMatchOnInvalidRanges(u, s), f = h.start, m = h.end, x = h.valid;
|
|
819
|
+
x && (u.start = f, u.length = m - f, i.push(u), s = m);
|
|
820
|
+
}), i;
|
|
820
821
|
}
|
|
821
822
|
}, {
|
|
822
823
|
key: "callNoMatchOnInvalidRanges",
|
|
823
|
-
value: function(n,
|
|
824
|
-
var
|
|
825
|
-
return n && typeof n.start < "u" ? (
|
|
826
|
-
start:
|
|
824
|
+
value: function(n, r) {
|
|
825
|
+
var i = void 0, s = void 0, u = !1;
|
|
826
|
+
return n && typeof n.start < "u" ? (i = parseInt(n.start, 10), s = i + parseInt(n.length, 10), this.isNumeric(n.start) && this.isNumeric(n.length) && s - r > 0 && s - i > 0 ? u = !0 : (this.log("Ignoring invalid or overlapping range: " + ("" + JSON.stringify(n))), this.opt.noMatch(n))) : (this.log("Ignoring invalid range: " + JSON.stringify(n)), this.opt.noMatch(n)), {
|
|
827
|
+
start: i,
|
|
827
828
|
end: s,
|
|
828
829
|
valid: u
|
|
829
830
|
};
|
|
830
831
|
}
|
|
831
832
|
}, {
|
|
832
833
|
key: "checkWhitespaceRanges",
|
|
833
|
-
value: function(n,
|
|
834
|
-
var s = void 0, u = !0, h =
|
|
835
|
-
return m = m > h ? h : m, s = m + parseInt(n.length, 10), s > h && (s = h, this.log("End range automatically set to the max value of " + h)), m < 0 || s - m < 0 || m > h || s > h ? (u = !1, this.log("Invalid range: " + JSON.stringify(n)), this.opt.noMatch(n)) :
|
|
834
|
+
value: function(n, r, i) {
|
|
835
|
+
var s = void 0, u = !0, h = i.length, f = r - h, m = parseInt(n.start, 10) - f;
|
|
836
|
+
return m = m > h ? h : m, s = m + parseInt(n.length, 10), s > h && (s = h, this.log("End range automatically set to the max value of " + h)), m < 0 || s - m < 0 || m > h || s > h ? (u = !1, this.log("Invalid range: " + JSON.stringify(n)), this.opt.noMatch(n)) : i.substring(m, s).replace(/\s+/g, "") === "" && (u = !1, this.log("Skipping whitespace only range: " + JSON.stringify(n)), this.opt.noMatch(n)), {
|
|
836
837
|
start: m,
|
|
837
838
|
end: s,
|
|
838
839
|
valid: u
|
|
@@ -841,18 +842,18 @@ function Mn() {
|
|
|
841
842
|
}, {
|
|
842
843
|
key: "getTextNodes",
|
|
843
844
|
value: function(n) {
|
|
844
|
-
var
|
|
845
|
+
var r = this, i = "", s = [];
|
|
845
846
|
this.iterator.forEachNode(NodeFilter.SHOW_TEXT, function(u) {
|
|
846
847
|
s.push({
|
|
847
|
-
start:
|
|
848
|
-
end: (
|
|
848
|
+
start: i.length,
|
|
849
|
+
end: (i += u.textContent).length,
|
|
849
850
|
node: u
|
|
850
851
|
});
|
|
851
852
|
}, function(u) {
|
|
852
|
-
return
|
|
853
|
+
return r.matchesExclude(u.parentNode) ? NodeFilter.FILTER_REJECT : NodeFilter.FILTER_ACCEPT;
|
|
853
854
|
}, function() {
|
|
854
855
|
n({
|
|
855
|
-
value:
|
|
856
|
+
value: i,
|
|
856
857
|
nodes: s
|
|
857
858
|
});
|
|
858
859
|
});
|
|
@@ -864,24 +865,24 @@ function Mn() {
|
|
|
864
865
|
}
|
|
865
866
|
}, {
|
|
866
867
|
key: "wrapRangeInTextNode",
|
|
867
|
-
value: function(n,
|
|
868
|
-
var s = this.opt.element ? this.opt.element : "mark", u = n.splitText(
|
|
868
|
+
value: function(n, r, i) {
|
|
869
|
+
var s = this.opt.element ? this.opt.element : "mark", u = n.splitText(r), h = u.splitText(i - r), f = document.createElement(s);
|
|
869
870
|
return f.setAttribute("data-markjs", "true"), this.opt.className && f.setAttribute("class", this.opt.className), f.textContent = u.textContent, u.parentNode.replaceChild(f, u), h;
|
|
870
871
|
}
|
|
871
872
|
}, {
|
|
872
873
|
key: "wrapRangeInMappedTextNode",
|
|
873
|
-
value: function(n,
|
|
874
|
+
value: function(n, r, i, s, u) {
|
|
874
875
|
var h = this;
|
|
875
876
|
n.nodes.every(function(f, m) {
|
|
876
|
-
var
|
|
877
|
-
if (typeof
|
|
877
|
+
var x = n.nodes[m + 1];
|
|
878
|
+
if (typeof x > "u" || x.start > r) {
|
|
878
879
|
if (!s(f.node))
|
|
879
880
|
return !1;
|
|
880
|
-
var
|
|
881
|
-
if (f.node = h.wrapRangeInTextNode(f.node,
|
|
881
|
+
var T = r - f.start, C = (i > f.end ? f.end : i) - f.start, L = n.value.substr(0, f.start), R = n.value.substr(C + f.start);
|
|
882
|
+
if (f.node = h.wrapRangeInTextNode(f.node, T, C), n.value = L + R, n.nodes.forEach(function(F, V) {
|
|
882
883
|
V >= m && (n.nodes[V].start > 0 && V !== m && (n.nodes[V].start -= C), n.nodes[V].end -= C);
|
|
883
|
-
}),
|
|
884
|
-
|
|
884
|
+
}), i -= C, u(f.node.previousSibling, f.start), i > f.end)
|
|
885
|
+
r = f.end;
|
|
885
886
|
else
|
|
886
887
|
return !1;
|
|
887
888
|
}
|
|
@@ -890,35 +891,35 @@ function Mn() {
|
|
|
890
891
|
}
|
|
891
892
|
}, {
|
|
892
893
|
key: "wrapMatches",
|
|
893
|
-
value: function(n,
|
|
894
|
-
var h = this, f =
|
|
894
|
+
value: function(n, r, i, s, u) {
|
|
895
|
+
var h = this, f = r === 0 ? 0 : r + 1;
|
|
895
896
|
this.getTextNodes(function(m) {
|
|
896
|
-
m.nodes.forEach(function(
|
|
897
|
-
|
|
898
|
-
for (var
|
|
899
|
-
if (
|
|
900
|
-
var C =
|
|
897
|
+
m.nodes.forEach(function(x) {
|
|
898
|
+
x = x.node;
|
|
899
|
+
for (var T = void 0; (T = n.exec(x.textContent)) !== null && T[f] !== ""; )
|
|
900
|
+
if (i(T[f], x)) {
|
|
901
|
+
var C = T.index;
|
|
901
902
|
if (f !== 0)
|
|
902
903
|
for (var L = 1; L < f; L++)
|
|
903
|
-
C +=
|
|
904
|
-
|
|
904
|
+
C += T[L].length;
|
|
905
|
+
x = h.wrapRangeInTextNode(x, C, C + T[f].length), s(x.previousSibling), n.lastIndex = 0;
|
|
905
906
|
}
|
|
906
907
|
}), u();
|
|
907
908
|
});
|
|
908
909
|
}
|
|
909
910
|
}, {
|
|
910
911
|
key: "wrapMatchesAcrossElements",
|
|
911
|
-
value: function(n,
|
|
912
|
-
var h = this, f =
|
|
912
|
+
value: function(n, r, i, s, u) {
|
|
913
|
+
var h = this, f = r === 0 ? 0 : r + 1;
|
|
913
914
|
this.getTextNodes(function(m) {
|
|
914
|
-
for (var
|
|
915
|
-
var
|
|
915
|
+
for (var x = void 0; (x = n.exec(m.value)) !== null && x[f] !== ""; ) {
|
|
916
|
+
var T = x.index;
|
|
916
917
|
if (f !== 0)
|
|
917
918
|
for (var C = 1; C < f; C++)
|
|
918
|
-
|
|
919
|
-
var L =
|
|
920
|
-
h.wrapRangeInMappedTextNode(m,
|
|
921
|
-
return
|
|
919
|
+
T += x[C].length;
|
|
920
|
+
var L = T + x[f].length;
|
|
921
|
+
h.wrapRangeInMappedTextNode(m, T, L, function(R) {
|
|
922
|
+
return i(x[f], R);
|
|
922
923
|
}, function(R, F) {
|
|
923
924
|
n.lastIndex = F, s(R);
|
|
924
925
|
});
|
|
@@ -928,16 +929,16 @@ function Mn() {
|
|
|
928
929
|
}
|
|
929
930
|
}, {
|
|
930
931
|
key: "wrapRangeFromIndex",
|
|
931
|
-
value: function(n,
|
|
932
|
+
value: function(n, r, i, s) {
|
|
932
933
|
var u = this;
|
|
933
934
|
this.getTextNodes(function(h) {
|
|
934
935
|
var f = h.value.length;
|
|
935
|
-
n.forEach(function(m,
|
|
936
|
-
var
|
|
936
|
+
n.forEach(function(m, x) {
|
|
937
|
+
var T = u.checkWhitespaceRanges(m, f, h.value), C = T.start, L = T.end, R = T.valid;
|
|
937
938
|
R && u.wrapRangeInMappedTextNode(h, C, L, function(F) {
|
|
938
|
-
return
|
|
939
|
+
return r(F, m, h.value.substring(C, L), x);
|
|
939
940
|
}, function(F) {
|
|
940
|
-
|
|
941
|
+
i(F, m);
|
|
941
942
|
});
|
|
942
943
|
}), s();
|
|
943
944
|
});
|
|
@@ -945,9 +946,9 @@ function Mn() {
|
|
|
945
946
|
}, {
|
|
946
947
|
key: "unwrapMatches",
|
|
947
948
|
value: function(n) {
|
|
948
|
-
for (var
|
|
949
|
-
|
|
950
|
-
|
|
949
|
+
for (var r = n.parentNode, i = document.createDocumentFragment(); n.firstChild; )
|
|
950
|
+
i.appendChild(n.removeChild(n.firstChild));
|
|
951
|
+
r.replaceChild(i, n), this.ie ? this.normalizeTextNode(r) : r.normalize();
|
|
951
952
|
}
|
|
952
953
|
}, {
|
|
953
954
|
key: "normalizeTextNode",
|
|
@@ -963,59 +964,59 @@ function Mn() {
|
|
|
963
964
|
}
|
|
964
965
|
}, {
|
|
965
966
|
key: "markRegExp",
|
|
966
|
-
value: function(n,
|
|
967
|
-
var
|
|
968
|
-
this.opt =
|
|
967
|
+
value: function(n, r) {
|
|
968
|
+
var i = this;
|
|
969
|
+
this.opt = r, this.log('Searching with expression "' + n + '"');
|
|
969
970
|
var s = 0, u = "wrapMatches", h = function(m) {
|
|
970
|
-
s++,
|
|
971
|
+
s++, i.opt.each(m);
|
|
971
972
|
};
|
|
972
973
|
this.opt.acrossElements && (u = "wrapMatchesAcrossElements"), this[u](n, this.opt.ignoreGroups, function(f, m) {
|
|
973
|
-
return
|
|
974
|
+
return i.opt.filter(m, f, s);
|
|
974
975
|
}, h, function() {
|
|
975
|
-
s === 0 &&
|
|
976
|
+
s === 0 && i.opt.noMatch(n), i.opt.done(s);
|
|
976
977
|
});
|
|
977
978
|
}
|
|
978
979
|
}, {
|
|
979
980
|
key: "mark",
|
|
980
|
-
value: function(n,
|
|
981
|
-
var
|
|
982
|
-
this.opt =
|
|
983
|
-
var s = 0, u = "wrapMatches", h = this.getSeparatedKeywords(typeof n == "string" ? [n] : n), f = h.keywords, m = h.length,
|
|
984
|
-
var R = new RegExp(
|
|
985
|
-
|
|
986
|
-
return
|
|
981
|
+
value: function(n, r) {
|
|
982
|
+
var i = this;
|
|
983
|
+
this.opt = r;
|
|
984
|
+
var s = 0, u = "wrapMatches", h = this.getSeparatedKeywords(typeof n == "string" ? [n] : n), f = h.keywords, m = h.length, x = this.opt.caseSensitive ? "" : "i", T = function C(L) {
|
|
985
|
+
var R = new RegExp(i.createRegExp(L), "gm" + x), F = 0;
|
|
986
|
+
i.log('Searching with expression "' + R + '"'), i[u](R, 1, function(V, ke) {
|
|
987
|
+
return i.opt.filter(ke, L, s, F);
|
|
987
988
|
}, function(V) {
|
|
988
|
-
F++, s++,
|
|
989
|
+
F++, s++, i.opt.each(V);
|
|
989
990
|
}, function() {
|
|
990
|
-
F === 0 &&
|
|
991
|
+
F === 0 && i.opt.noMatch(L), f[m - 1] === L ? i.opt.done(s) : C(f[f.indexOf(L) + 1]);
|
|
991
992
|
});
|
|
992
993
|
};
|
|
993
|
-
this.opt.acrossElements && (u = "wrapMatchesAcrossElements"), m === 0 ? this.opt.done(s) :
|
|
994
|
+
this.opt.acrossElements && (u = "wrapMatchesAcrossElements"), m === 0 ? this.opt.done(s) : T(f[0]);
|
|
994
995
|
}
|
|
995
996
|
}, {
|
|
996
997
|
key: "markRanges",
|
|
997
|
-
value: function(n,
|
|
998
|
-
var
|
|
999
|
-
this.opt =
|
|
998
|
+
value: function(n, r) {
|
|
999
|
+
var i = this;
|
|
1000
|
+
this.opt = r;
|
|
1000
1001
|
var s = 0, u = this.checkRanges(n);
|
|
1001
|
-
u && u.length ? (this.log("Starting to mark with the following ranges: " + JSON.stringify(u)), this.wrapRangeFromIndex(u, function(h, f, m,
|
|
1002
|
-
return
|
|
1002
|
+
u && u.length ? (this.log("Starting to mark with the following ranges: " + JSON.stringify(u)), this.wrapRangeFromIndex(u, function(h, f, m, x) {
|
|
1003
|
+
return i.opt.filter(h, f, m, x);
|
|
1003
1004
|
}, function(h, f) {
|
|
1004
|
-
s++,
|
|
1005
|
+
s++, i.opt.each(h, f);
|
|
1005
1006
|
}, function() {
|
|
1006
|
-
|
|
1007
|
+
i.opt.done(s);
|
|
1007
1008
|
})) : this.opt.done(s);
|
|
1008
1009
|
}
|
|
1009
1010
|
}, {
|
|
1010
1011
|
key: "unmark",
|
|
1011
1012
|
value: function(n) {
|
|
1012
|
-
var
|
|
1013
|
+
var r = this;
|
|
1013
1014
|
this.opt = n;
|
|
1014
|
-
var
|
|
1015
|
-
|
|
1016
|
-
|
|
1015
|
+
var i = this.opt.element ? this.opt.element : "*";
|
|
1016
|
+
i += "[data-markjs]", this.opt.className && (i += "." + this.opt.className), this.log('Removal selector "' + i + '"'), this.iterator.forEachNode(NodeFilter.SHOW_ELEMENT, function(s) {
|
|
1017
|
+
r.unwrapMatches(s);
|
|
1017
1018
|
}, function(s) {
|
|
1018
|
-
var u = y.matches(s,
|
|
1019
|
+
var u = y.matches(s, i), h = r.matchesExclude(s);
|
|
1019
1020
|
return !u || h ? NodeFilter.FILTER_REJECT : NodeFilter.FILTER_ACCEPT;
|
|
1020
1021
|
}, this.opt.done);
|
|
1021
1022
|
}
|
|
@@ -1063,40 +1064,40 @@ function Mn() {
|
|
|
1063
1064
|
})();
|
|
1064
1065
|
function E(v) {
|
|
1065
1066
|
var c = this, n = new g(v);
|
|
1066
|
-
return this.mark = function(
|
|
1067
|
-
return n.mark(
|
|
1068
|
-
}, this.markRegExp = function(
|
|
1069
|
-
return n.markRegExp(
|
|
1070
|
-
}, this.markRanges = function(
|
|
1071
|
-
return n.markRanges(
|
|
1072
|
-
}, this.unmark = function(
|
|
1073
|
-
return n.unmark(
|
|
1067
|
+
return this.mark = function(r, i) {
|
|
1068
|
+
return n.mark(r, i), c;
|
|
1069
|
+
}, this.markRegExp = function(r, i) {
|
|
1070
|
+
return n.markRegExp(r, i), c;
|
|
1071
|
+
}, this.markRanges = function(r, i) {
|
|
1072
|
+
return n.markRanges(r, i), c;
|
|
1073
|
+
}, this.unmark = function(r) {
|
|
1074
|
+
return n.unmark(r), c;
|
|
1074
1075
|
}, this;
|
|
1075
1076
|
}
|
|
1076
1077
|
return E;
|
|
1077
1078
|
}));
|
|
1078
1079
|
})(ce)), ce.exports;
|
|
1079
1080
|
}
|
|
1080
|
-
var
|
|
1081
|
-
const
|
|
1082
|
-
function
|
|
1081
|
+
var Nn = On();
|
|
1082
|
+
const Ln = /* @__PURE__ */ Mn(Nn);
|
|
1083
|
+
function li(e, t, o) {
|
|
1083
1084
|
const a = typeof t == "function" ? e.findIndex(t) : e.indexOf(t);
|
|
1084
1085
|
return a === -1 ? !1 : (e.splice(a, 1, o), !0);
|
|
1085
1086
|
}
|
|
1086
|
-
function
|
|
1087
|
+
function ui(e, t) {
|
|
1087
1088
|
const o = document.createElement("div");
|
|
1088
1089
|
o.classList.add("vf-overlay"), o.addEventListener("click", n), document.body.appendChild(o);
|
|
1089
1090
|
const a = document.createElement("div");
|
|
1090
1091
|
a.classList.add("vf-context-menu"), a.style.position = "absolute", o.appendChild(a);
|
|
1091
1092
|
const p = e.currentTarget;
|
|
1092
|
-
p.style.userSelect = "none", p.classList.add("context-menu-active"), t.targetClass && p.classList.add(t.targetClass), t.class && a.classList.add(t.class), t.items.forEach((
|
|
1093
|
-
if (
|
|
1093
|
+
p.style.userSelect = "none", p.classList.add("context-menu-active"), t.targetClass && p.classList.add(t.targetClass), t.class && a.classList.add(t.class), t.items.forEach((i) => {
|
|
1094
|
+
if (i == "-") {
|
|
1094
1095
|
const u = document.createElement("div");
|
|
1095
1096
|
u.classList.add("separator"), a.appendChild(u);
|
|
1096
1097
|
return;
|
|
1097
1098
|
}
|
|
1098
1099
|
const s = document.createElement("div");
|
|
1099
|
-
s.classList.add("item"), s.style.userSelect = "none", s.innerText =
|
|
1100
|
+
s.classList.add("item"), s.style.userSelect = "none", s.innerText = i.title, a.appendChild(s), i.class && s.classList.add(i.class), i.shouldConfirm ? s.addEventListener("click", (u) => r(u, s, i.handler)) : s.addEventListener("click", () => i.handler());
|
|
1100
1101
|
});
|
|
1101
1102
|
const l = window.innerWidth - e.clientX, y = window.innerHeight - e.clientY, g = a.offsetHeight, E = a.offsetWidth, v = l < E ? e.clientX - E - 1 : e.clientX + 1, c = y < g ? e.clientY - g - 1 : e.clientY + 1;
|
|
1102
1103
|
a.style.left = v + "px", a.style.top = c + "px", setTimeout(() => {
|
|
@@ -1105,7 +1106,7 @@ function sr(e, t) {
|
|
|
1105
1106
|
function n() {
|
|
1106
1107
|
t.targetClass && p.classList.remove(t.targetClass), p.classList.remove("context-menu-active"), p.style.userSelect = "", o.remove();
|
|
1107
1108
|
}
|
|
1108
|
-
function i
|
|
1109
|
+
function r(i, s, u) {
|
|
1109
1110
|
if (s.classList.contains("pending-confirm"))
|
|
1110
1111
|
return u();
|
|
1111
1112
|
const h = s.innerHTML;
|
|
@@ -1113,17 +1114,17 @@ function sr(e, t) {
|
|
|
1113
1114
|
const f = () => {
|
|
1114
1115
|
s.classList.remove("pending-confirm"), s.innerHTML = h, s.removeEventListener("mouseleave", f);
|
|
1115
1116
|
};
|
|
1116
|
-
s.addEventListener("mouseleave", f),
|
|
1117
|
+
s.addEventListener("mouseleave", f), i.stopPropagation();
|
|
1117
1118
|
}
|
|
1118
1119
|
}
|
|
1119
|
-
const
|
|
1120
|
-
function
|
|
1120
|
+
const Rn = (e) => new Promise((t) => setTimeout(t, e)), ci = (e) => Rn(e * 1e3);
|
|
1121
|
+
function Fn(e) {
|
|
1121
1122
|
return e.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
|
1122
1123
|
}
|
|
1123
|
-
function
|
|
1124
|
-
return e != null ?
|
|
1124
|
+
function di(e, t) {
|
|
1125
|
+
return e != null ? Yt(e) : t;
|
|
1125
1126
|
}
|
|
1126
|
-
function
|
|
1127
|
+
function fi(e, t) {
|
|
1127
1128
|
const o = { ...e };
|
|
1128
1129
|
for (const a of t)
|
|
1129
1130
|
o[a] === "" && (o[a] = null);
|
|
@@ -1132,17 +1133,17 @@ function cr(e, t) {
|
|
|
1132
1133
|
function Ye(e) {
|
|
1133
1134
|
return e != null;
|
|
1134
1135
|
}
|
|
1135
|
-
function
|
|
1136
|
-
|
|
1136
|
+
function hi(e, t) {
|
|
1137
|
+
on(e, {
|
|
1137
1138
|
...t,
|
|
1138
1139
|
onError(o, a) {
|
|
1139
|
-
o instanceof
|
|
1140
|
+
o instanceof rn && o.response.status === 422 && typeof o.body == "object" && o.body && "error" in o.body && typeof o.body.error == "string" && (o = new ye(o.body.error));
|
|
1140
1141
|
const p = t.onError?.(o, a);
|
|
1141
1142
|
return p !== void 0 ? p : o;
|
|
1142
1143
|
}
|
|
1143
1144
|
});
|
|
1144
1145
|
}
|
|
1145
|
-
var
|
|
1146
|
+
var An = {
|
|
1146
1147
|
symbol: "$",
|
|
1147
1148
|
separator: ",",
|
|
1148
1149
|
decimal: ".",
|
|
@@ -1150,21 +1151,21 @@ var Rn = {
|
|
|
1150
1151
|
precision: 2,
|
|
1151
1152
|
pattern: "!#",
|
|
1152
1153
|
negativePattern: "-!#",
|
|
1153
|
-
format:
|
|
1154
|
+
format: Vn,
|
|
1154
1155
|
fromCents: !1
|
|
1155
|
-
},
|
|
1156
|
+
}, gt = function(t) {
|
|
1156
1157
|
return Math.round(t);
|
|
1157
1158
|
}, Fe = function(t) {
|
|
1158
1159
|
return Math.pow(10, t);
|
|
1159
|
-
},
|
|
1160
|
-
return
|
|
1161
|
-
},
|
|
1160
|
+
}, Dn = function(t, o) {
|
|
1161
|
+
return gt(t / o) * o;
|
|
1162
|
+
}, $n = /(\d)(?=(\d{3})+\b)/g, Hn = /(\d)(?=(\d\d)+\d\b)/g;
|
|
1162
1163
|
function _(e, t) {
|
|
1163
1164
|
var o = this;
|
|
1164
1165
|
if (!(o instanceof _))
|
|
1165
1166
|
return new _(e, t);
|
|
1166
|
-
var a = Object.assign({},
|
|
1167
|
-
o.intValue = l, o.value = l / p, a.increment = a.increment || 1 / p, a.useVedic ? a.groups =
|
|
1167
|
+
var a = Object.assign({}, An, t), p = Fe(a.precision), l = de(e, a);
|
|
1168
|
+
o.intValue = l, o.value = l / p, a.increment = a.increment || 1 / p, a.useVedic ? a.groups = Hn : a.groups = $n, this.s = a, this.p = p;
|
|
1168
1169
|
}
|
|
1169
1170
|
function de(e, t) {
|
|
1170
1171
|
var o = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !0, a = 0, p = t.decimal, l = t.errorOnInvalid, y = t.precision, g = t.fromCents, E = Fe(y), v = typeof e == "number", c = e instanceof _;
|
|
@@ -1173,16 +1174,16 @@ function de(e, t) {
|
|
|
1173
1174
|
if (v || c)
|
|
1174
1175
|
a = c ? e.value : e;
|
|
1175
1176
|
else if (typeof e == "string") {
|
|
1176
|
-
var n = new RegExp("[^-\\d" + p + "]", "g"),
|
|
1177
|
-
a = e.replace(/\((.*)\)/, "-$1").replace(n, "").replace(
|
|
1177
|
+
var n = new RegExp("[^-\\d" + p + "]", "g"), r = new RegExp("\\" + p, "g");
|
|
1178
|
+
a = e.replace(/\((.*)\)/, "-$1").replace(n, "").replace(r, "."), a = a || 0;
|
|
1178
1179
|
} else {
|
|
1179
1180
|
if (l)
|
|
1180
1181
|
throw Error("Invalid Input");
|
|
1181
1182
|
a = 0;
|
|
1182
1183
|
}
|
|
1183
|
-
return g || (a *= E, a = a.toFixed(4)), o ?
|
|
1184
|
+
return g || (a *= E, a = a.toFixed(4)), o ? gt(a) : a;
|
|
1184
1185
|
}
|
|
1185
|
-
function
|
|
1186
|
+
function Vn(e, t) {
|
|
1186
1187
|
var o = t.pattern, a = t.negativePattern, p = t.symbol, l = t.separator, y = t.decimal, g = t.groups, E = ("" + e).replace(/^-/, "").split("."), v = E[0], c = E[1];
|
|
1187
1188
|
return (e.value >= 0 ? o : a).replace("!", p).replace("#", v.replace(g, "$1" + l) + (c ? y + c : ""));
|
|
1188
1189
|
}
|
|
@@ -1266,7 +1267,7 @@ _.prototype = {
|
|
|
1266
1267
|
*/
|
|
1267
1268
|
toString: function() {
|
|
1268
1269
|
var t = this.intValue, o = this.p, a = this.s;
|
|
1269
|
-
return
|
|
1270
|
+
return Dn(t / o, a.increment).toFixed(a.precision);
|
|
1270
1271
|
},
|
|
1271
1272
|
/**
|
|
1272
1273
|
* Value for JSON serialization.
|
|
@@ -1279,56 +1280,56 @@ _.prototype = {
|
|
|
1279
1280
|
const A = [];
|
|
1280
1281
|
for (let e = 0; e < 256; ++e)
|
|
1281
1282
|
A.push((e + 256).toString(16).slice(1));
|
|
1282
|
-
function
|
|
1283
|
+
function Bn(e, t = 0) {
|
|
1283
1284
|
return (A[e[t + 0]] + A[e[t + 1]] + A[e[t + 2]] + A[e[t + 3]] + "-" + A[e[t + 4]] + A[e[t + 5]] + "-" + A[e[t + 6]] + A[e[t + 7]] + "-" + A[e[t + 8]] + A[e[t + 9]] + "-" + A[e[t + 10]] + A[e[t + 11]] + A[e[t + 12]] + A[e[t + 13]] + A[e[t + 14]] + A[e[t + 15]]).toLowerCase();
|
|
1284
1285
|
}
|
|
1285
|
-
let
|
|
1286
|
-
const
|
|
1287
|
-
function
|
|
1288
|
-
if (!
|
|
1286
|
+
let Se;
|
|
1287
|
+
const _n = new Uint8Array(16);
|
|
1288
|
+
function Wn() {
|
|
1289
|
+
if (!Se) {
|
|
1289
1290
|
if (typeof crypto > "u" || !crypto.getRandomValues)
|
|
1290
1291
|
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
|
1291
|
-
|
|
1292
|
+
Se = crypto.getRandomValues.bind(crypto);
|
|
1292
1293
|
}
|
|
1293
|
-
return
|
|
1294
|
+
return Se(_n);
|
|
1294
1295
|
}
|
|
1295
|
-
const
|
|
1296
|
-
function
|
|
1296
|
+
const Pn = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), Xe = { randomUUID: Pn };
|
|
1297
|
+
function jn(e, t, o) {
|
|
1297
1298
|
e = e || {};
|
|
1298
|
-
const a = e.random ?? e.rng?.() ??
|
|
1299
|
+
const a = e.random ?? e.rng?.() ?? Wn();
|
|
1299
1300
|
if (a.length < 16)
|
|
1300
1301
|
throw new Error("Random bytes length must be >= 16");
|
|
1301
|
-
return a[6] = a[6] & 15 | 64, a[8] = a[8] & 63 | 128,
|
|
1302
|
+
return a[6] = a[6] & 15 | 64, a[8] = a[8] & 63 | 128, Bn(a);
|
|
1302
1303
|
}
|
|
1303
|
-
function
|
|
1304
|
-
return Xe.randomUUID && !e ? Xe.randomUUID() :
|
|
1304
|
+
function Un(e, t, o) {
|
|
1305
|
+
return Xe.randomUUID && !e ? Xe.randomUUID() : jn(e);
|
|
1305
1306
|
}
|
|
1306
|
-
function
|
|
1307
|
+
function pi(e) {
|
|
1307
1308
|
return e.replace(/\n/g, "<br>");
|
|
1308
1309
|
}
|
|
1309
|
-
function
|
|
1310
|
+
function zn(e) {
|
|
1310
1311
|
return e.replace(/_/g, " ");
|
|
1311
1312
|
}
|
|
1312
|
-
function
|
|
1313
|
+
function qn(e) {
|
|
1313
1314
|
const t = e.replace(/\D/g, "").replace(/^1/, "");
|
|
1314
1315
|
return t.length !== 10 ? e : "(" + t.substring(0, 3) + ") " + t.substring(3, 6) + "-" + t.substring(6);
|
|
1315
1316
|
}
|
|
1316
|
-
function
|
|
1317
|
-
return _(e).divide(t ??
|
|
1317
|
+
function Jn(e, t) {
|
|
1318
|
+
return _(e).divide(t ?? D.defaultCurrencyDivisor).format();
|
|
1318
1319
|
}
|
|
1319
|
-
function
|
|
1320
|
-
return
|
|
1320
|
+
function vi() {
|
|
1321
|
+
return Un();
|
|
1321
1322
|
}
|
|
1322
|
-
const
|
|
1323
|
+
const Kn = ["disabled", "placeholder", "required", "name"], Yn = {
|
|
1323
1324
|
key: 0,
|
|
1324
1325
|
class: "no-results"
|
|
1325
|
-
},
|
|
1326
|
+
}, Xn = {
|
|
1326
1327
|
key: 0,
|
|
1327
1328
|
class: "group-title"
|
|
1328
|
-
},
|
|
1329
|
+
}, Zn = ["onMousemove", "onMousedown"], Gn = ["innerHTML"], Qn = ["innerHTML"], eo = {
|
|
1329
1330
|
key: 1,
|
|
1330
1331
|
class: "no-results"
|
|
1331
|
-
},
|
|
1332
|
+
}, to = "`1234567890-=[]\\;',./~!@#$%^&*()_+{}|:\"<>?qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM", no = /* @__PURE__ */ q({
|
|
1332
1333
|
__name: "vf-smart-select",
|
|
1333
1334
|
props: {
|
|
1334
1335
|
modelValue: {},
|
|
@@ -1367,62 +1368,62 @@ const qn = ["disabled", "placeholder", "required", "name"], Jn = {
|
|
|
1367
1368
|
setup(e, { expose: t, emit: o }) {
|
|
1368
1369
|
const a = Symbol("null"), p = Symbol("create"), l = e, y = o;
|
|
1369
1370
|
t({
|
|
1370
|
-
addRemoteOption:
|
|
1371
|
+
addRemoteOption: Bt
|
|
1371
1372
|
});
|
|
1372
|
-
const g = N(), E = N(), v = N(), c = N(!1), n = N(),
|
|
1373
|
-
const k =
|
|
1373
|
+
const g = N(), E = N(), v = N(), c = N(!1), n = N(), r = N(!1), i = N(""), s = N(null), u = N(null), h = N(!1), f = N(null), m = N(!1), x = O(() => l.showCreateTextOnNewItem ?? !0), T = O(() => !!(l.options || n.value)), C = O(() => l.options ?? n.value ?? []), L = O(() => l.prependOptions ?? []), R = O(() => l.appendOptions ?? []), F = O(() => !!l.disabled || !T.value && !l.loadOptions), V = O(() => l.loadingText || "..."), ke = O(() => !T.value && (!l.loadOptions || l.preload || l.modelValue && (l.valueField || l.valueExtractor)) ? V.value : l.nullTitle ? l.nullTitle : l.placeholder || ""), It = O(() => l.noResultsText || "No options match your search."), Z = O(() => l.valueExtractor ? l.valueExtractor : l.valueField ? (d) => d[l.valueField] : null), we = O(() => l.keyExtractor ? l.keyExtractor : l.keyField ? (d) => String(d[l.keyField]) : Z.value ? (d) => String(Z.value(d)) : null), Mt = O(() => l.groupFormatter ? l.groupFormatter : l.groupField ? (d) => String(d[l.groupField]) : null), $e = O(() => l.formatter ? l.formatter : l.labelField ? (d) => String(d[l.labelField]) : (d) => String(d)), He = O(() => l.selectionFormatter ? l.selectionFormatter : $e.value), Ve = O(() => [...L.value, ...C.value, ...R.value]), Be = O(() => !!(l.groupField || l.groupFormatter)), xe = O(() => Ve.value.map((d, b) => {
|
|
1374
|
+
const k = Mt.value?.(d), w = $e.value(d), M = l.subtitleFormatter?.(d), B = w ? w.trim().toLowerCase() : "", qe = M ? M.trim().toLowerCase() : "", ue = [];
|
|
1374
1375
|
return l.searchFields ? l.searchFields.forEach((Je) => {
|
|
1375
1376
|
d[Je] && ue.push(
|
|
1376
1377
|
String(d[Je]).toLowerCase().replace(/^[a-z0-9 ]+$/i, "")
|
|
1377
1378
|
);
|
|
1378
1379
|
}) : (ue.push(B), qe && ue.push(qe)), {
|
|
1379
|
-
key:
|
|
1380
|
+
key: we.value?.(d) ?? String(b),
|
|
1380
1381
|
group: k,
|
|
1381
|
-
title:
|
|
1382
|
+
title: w,
|
|
1382
1383
|
subtitle: M,
|
|
1383
1384
|
searchContent: ue.join(""),
|
|
1384
1385
|
ref: d
|
|
1385
1386
|
};
|
|
1386
|
-
})),
|
|
1387
|
-
let d = [...
|
|
1388
|
-
if (
|
|
1389
|
-
const b =
|
|
1390
|
-
b.length && (d = d.filter((k) => k.searchContent.includes(b)), m.value && (d.find((
|
|
1387
|
+
})), $ = O(() => {
|
|
1388
|
+
let d = [...xe.value];
|
|
1389
|
+
if (r.value) {
|
|
1390
|
+
const b = i.value.trim().toLowerCase().replace(/[^a-z0-9 ]+$/i, "");
|
|
1391
|
+
b.length && (d = d.filter((k) => k.searchContent.includes(b)), m.value && (d.find((w) => w.searchContent === b) !== void 0 || d.push({
|
|
1391
1392
|
key: p,
|
|
1392
|
-
title:
|
|
1393
|
+
title: x.value ? "Create <strong>" + i.value.trim() + "</strong>..." : i.value.trim()
|
|
1393
1394
|
})));
|
|
1394
1395
|
} else l.nullTitle && d.unshift({
|
|
1395
1396
|
key: a,
|
|
1396
1397
|
title: l.nullTitle
|
|
1397
1398
|
});
|
|
1398
1399
|
return d;
|
|
1399
|
-
}),
|
|
1400
|
+
}), Ct = O(() => {
|
|
1400
1401
|
if (!Be.value)
|
|
1401
1402
|
return [
|
|
1402
1403
|
{
|
|
1403
1404
|
groupTitle: "",
|
|
1404
|
-
options:
|
|
1405
|
+
options: $.value
|
|
1405
1406
|
}
|
|
1406
1407
|
];
|
|
1407
|
-
const d =
|
|
1408
|
+
const d = Xt($.value.map((k) => k.group ?? "")), b = Zt($.value, (k) => k.group ?? "");
|
|
1408
1409
|
return d.map((k) => ({
|
|
1409
1410
|
groupTitle: k,
|
|
1410
1411
|
options: b[k]
|
|
1411
1412
|
}));
|
|
1412
1413
|
});
|
|
1413
|
-
H(() => l.modelValue, G), H(
|
|
1414
|
+
H(() => l.modelValue, G), H(xe, () => {
|
|
1414
1415
|
h.value && setTimeout(je, 0);
|
|
1415
|
-
}), H(
|
|
1416
|
-
|
|
1416
|
+
}), H(i, () => {
|
|
1417
|
+
r.value && !l.remoteSearch && !i.value.trim().length && (r.value = !1);
|
|
1417
1418
|
}), H(h, () => {
|
|
1418
|
-
h.value ? setTimeout(
|
|
1419
|
-
}), H(
|
|
1420
|
-
l.modelValue !== null && s.value === null && G(), (f.value !== null ||
|
|
1419
|
+
h.value ? setTimeout($t, 0) : (r.value = !1, i.value = u.value ?? "", v.value && (v.value.style.visibility = "hidden"));
|
|
1420
|
+
}), H($, () => {
|
|
1421
|
+
l.modelValue !== null && s.value === null && G(), (f.value !== null || r.value) && !$.value.find((d) => d.key == f.value) && (f.value = $.value[0]?.key ?? a);
|
|
1421
1422
|
}), z(async () => {
|
|
1422
1423
|
m.value = l.onCreateItem !== void 0, l.loadOptions && l.preload ? await _e() : !l.options && !l.loadOptions && (l.valueField || l.valueExtractor) || G(), H(s, () => {
|
|
1423
1424
|
const d = Ye(s.value) && Z.value !== null ? Z.value(s.value) : s.value;
|
|
1424
|
-
|
|
1425
|
-
}), l.remoteSearch && H(
|
|
1425
|
+
Me(l.modelValue, d) || y("update:modelValue", d);
|
|
1426
|
+
}), l.remoteSearch && H(i, Gt(Ot, 250));
|
|
1426
1427
|
}), me(() => {
|
|
1427
1428
|
v.value?.remove();
|
|
1428
1429
|
});
|
|
@@ -1430,20 +1431,20 @@ const qn = ["disabled", "placeholder", "required", "name"], Jn = {
|
|
|
1430
1431
|
await We(!0), G(), n.value && y("optionsLoaded", n.value);
|
|
1431
1432
|
}
|
|
1432
1433
|
async function We(d = !1) {
|
|
1433
|
-
const b = l.remoteSearch &&
|
|
1434
|
+
const b = l.remoteSearch && r.value && i.value.length ? i.value : null;
|
|
1434
1435
|
c.value = !0, n.value = await l.loadOptions?.(b) ?? [], c.value = !1, d && G(), Pe();
|
|
1435
1436
|
}
|
|
1436
|
-
function
|
|
1437
|
-
|
|
1437
|
+
function Ot() {
|
|
1438
|
+
r.value && (We(), r.value = i.value.trim().length > 0);
|
|
1438
1439
|
}
|
|
1439
|
-
function
|
|
1440
|
+
function Nt(d) {
|
|
1440
1441
|
if (d.key == "Escape") {
|
|
1441
1442
|
d.stopPropagation(), d.target.blur(), ze();
|
|
1442
1443
|
return;
|
|
1443
1444
|
}
|
|
1444
1445
|
if (!(d.key == "ArrowLeft" || d.key == "ArrowRight") && d.key != "Tab") {
|
|
1445
|
-
if (!
|
|
1446
|
-
|
|
1446
|
+
if (!T.value) {
|
|
1447
|
+
r.value || d.preventDefault();
|
|
1447
1448
|
return;
|
|
1448
1449
|
}
|
|
1449
1450
|
if (d.key == "ArrowUp" || d.key == "ArrowDown")
|
|
@@ -1454,83 +1455,83 @@ const qn = ["disabled", "placeholder", "required", "name"], Jn = {
|
|
|
1454
1455
|
return d.preventDefault(), be(d.key == "Home" ? -Number.MAX_SAFE_INTEGER : Number.MAX_SAFE_INTEGER);
|
|
1455
1456
|
if (d.key == "Enter") {
|
|
1456
1457
|
d.preventDefault();
|
|
1457
|
-
const b =
|
|
1458
|
+
const b = $.value.find((k) => k.key == f.value);
|
|
1458
1459
|
if (b) return Ue(b);
|
|
1459
1460
|
}
|
|
1460
1461
|
if (d.key === "Delete" || d.key === "Backspace") {
|
|
1461
|
-
|
|
1462
|
+
i.value.length > 1 && (r.value = !0);
|
|
1462
1463
|
return;
|
|
1463
1464
|
}
|
|
1464
|
-
!d.metaKey &&
|
|
1465
|
+
!d.metaKey && to.includes(d.key) && (r.value = !0);
|
|
1465
1466
|
}
|
|
1466
1467
|
}
|
|
1467
|
-
function
|
|
1468
|
-
|
|
1468
|
+
function Lt() {
|
|
1469
|
+
r.value = !0;
|
|
1469
1470
|
}
|
|
1470
|
-
function
|
|
1471
|
+
function Rt() {
|
|
1471
1472
|
Pe(), h.value = !0, setTimeout(() => E.value?.select(), 0);
|
|
1472
1473
|
}
|
|
1473
1474
|
function Pe(d) {
|
|
1474
|
-
s.value ? f.value =
|
|
1475
|
+
s.value ? f.value = Ft(s.value) : l.nullTitle && (f.value = a);
|
|
1475
1476
|
}
|
|
1476
|
-
function
|
|
1477
|
-
return
|
|
1477
|
+
function Ft(d) {
|
|
1478
|
+
return we.value ? we.value(s.value) : At(d)?.key ?? "";
|
|
1478
1479
|
}
|
|
1479
|
-
function
|
|
1480
|
-
const b =
|
|
1480
|
+
function At(d) {
|
|
1481
|
+
const b = $.value.find((M) => M.ref === d);
|
|
1481
1482
|
if (b)
|
|
1482
1483
|
return b;
|
|
1483
|
-
const k = l.keyExtractor ? (M, B) => l.keyExtractor(M) === l.keyExtractor(B) :
|
|
1484
|
-
return
|
|
1484
|
+
const k = l.keyExtractor ? (M, B) => l.keyExtractor(M) === l.keyExtractor(B) : Me, w = $.value.find((M) => k(M.ref, d));
|
|
1485
|
+
return w || null;
|
|
1485
1486
|
}
|
|
1486
|
-
function
|
|
1487
|
-
l.debug || (!
|
|
1487
|
+
function Dt() {
|
|
1488
|
+
l.debug || (!i.value.length && l.nullTitle && (s.value = null, u.value = null), h.value = !1);
|
|
1488
1489
|
}
|
|
1489
|
-
function
|
|
1490
|
-
|
|
1490
|
+
function $t() {
|
|
1491
|
+
T.value || _e(), l.optionsListId && v.value?.setAttribute("id", l.optionsListId), Ht();
|
|
1491
1492
|
}
|
|
1492
|
-
function
|
|
1493
|
-
const d = g.value.getBoundingClientRect(), b = d.y + d.height + 2, k = d.x,
|
|
1493
|
+
function Ht() {
|
|
1494
|
+
const d = g.value.getBoundingClientRect(), b = d.y + d.height + 2, k = d.x, w = v.value, M = window.getComputedStyle(g.value);
|
|
1494
1495
|
for (let B in M)
|
|
1495
|
-
/^(font|text)/.test(B) && (
|
|
1496
|
-
if (
|
|
1496
|
+
/^(font|text)/.test(B) && (w.style[B] = M[B]);
|
|
1497
|
+
if (w.style.top = b + "px", w.style.left = k + "px", w.style.minWidth = d.width + "px", !M.maxHeight || M.maxHeight == "none") {
|
|
1497
1498
|
const B = window.innerHeight - b - 12;
|
|
1498
|
-
|
|
1499
|
+
w.style.maxHeight = B + "px";
|
|
1499
1500
|
}
|
|
1500
|
-
|
|
1501
|
+
w.style.visibility = "visible", document.body.appendChild(w), setTimeout(je, 0);
|
|
1501
1502
|
}
|
|
1502
1503
|
function je() {
|
|
1503
|
-
if (!
|
|
1504
|
-
const d =
|
|
1504
|
+
if (!T.value || !f.value) return;
|
|
1505
|
+
const d = $.value.findIndex((w) => w.key == f.value), b = v.value, k = b?.querySelectorAll(".option")[d];
|
|
1505
1506
|
k && (b.scrollTop = k.offsetTop);
|
|
1506
1507
|
}
|
|
1507
|
-
function
|
|
1508
|
+
function Vt(d) {
|
|
1508
1509
|
f.value = d ? d.key : null;
|
|
1509
1510
|
}
|
|
1510
1511
|
function be(d) {
|
|
1511
|
-
const b =
|
|
1512
|
+
const b = $.value.findIndex((B) => B.key == f.value);
|
|
1512
1513
|
let k = b + d;
|
|
1513
|
-
if (k < 0 ? k = 0 : k >=
|
|
1514
|
-
f.value =
|
|
1515
|
-
const
|
|
1516
|
-
M && (M.offsetTop <
|
|
1514
|
+
if (k < 0 ? k = 0 : k >= $.value.length && (k = $.value.length - 1), b == k) return;
|
|
1515
|
+
f.value = $.value[k].key;
|
|
1516
|
+
const w = v.value, M = w?.querySelectorAll(".option")[k];
|
|
1517
|
+
M && (M.offsetTop < w.scrollTop ? w.scrollTop = M.offsetTop : M.offsetTop + M.offsetHeight > w.scrollTop + w.clientHeight && (w.scrollTop = M.offsetTop + M.offsetHeight - w.clientHeight));
|
|
1517
1518
|
}
|
|
1518
1519
|
function Ue(d) {
|
|
1519
|
-
if (
|
|
1520
|
-
|
|
1520
|
+
if (r.value = !1, d.key === a)
|
|
1521
|
+
i.value = "", s.value = null, u.value = null;
|
|
1521
1522
|
else if (d.key === p) {
|
|
1522
|
-
const b =
|
|
1523
|
-
|
|
1523
|
+
const b = i.value.trim();
|
|
1524
|
+
i.value = "", s.value = null, u.value = null, l.onCreateItem?.(b);
|
|
1524
1525
|
} else {
|
|
1525
|
-
const k =
|
|
1526
|
-
s.value = k, u.value = He.value(k),
|
|
1526
|
+
const k = xe.value.find((w) => w.key == d.key).ref;
|
|
1527
|
+
s.value = k, u.value = He.value(k), i.value = u.value ?? "";
|
|
1527
1528
|
}
|
|
1528
1529
|
E.value?.blur(), ze();
|
|
1529
1530
|
}
|
|
1530
1531
|
function G() {
|
|
1531
|
-
l.modelValue !== null ? (s.value = Z.value ? Ve.value.find((d) => l.modelValue === Z.value(d)) : l.modelValue, u.value = Ye(s.value) ? He.value(s.value) : null,
|
|
1532
|
+
l.modelValue !== null ? (s.value = Z.value ? Ve.value.find((d) => l.modelValue === Z.value(d)) : l.modelValue, u.value = Ye(s.value) ? He.value(s.value) : null, i.value = u.value ?? "") : (s.value = null, u.value = null, i.value = "");
|
|
1532
1533
|
}
|
|
1533
|
-
function
|
|
1534
|
+
function Bt(d) {
|
|
1534
1535
|
n.value.unshift(d);
|
|
1535
1536
|
}
|
|
1536
1537
|
function ze() {
|
|
@@ -1541,21 +1542,21 @@ const qn = ["disabled", "placeholder", "required", "name"], Jn = {
|
|
|
1541
1542
|
if (!d) return;
|
|
1542
1543
|
const b = d.querySelectorAll('input, button, textarea, select, [tabindex]:not([tabindex="-1"])');
|
|
1543
1544
|
if (!b) return;
|
|
1544
|
-
const k = Array.from(b).findIndex((M) => M === E.value),
|
|
1545
|
-
|
|
1545
|
+
const k = Array.from(b).findIndex((M) => M === E.value), w = b[k + 1];
|
|
1546
|
+
w && setTimeout(() => w.focus(), 0);
|
|
1546
1547
|
}
|
|
1547
|
-
return
|
|
1548
|
-
if (!h.value || !
|
|
1549
|
-
const d =
|
|
1548
|
+
return Jt(() => {
|
|
1549
|
+
if (!h.value || !r.value || !i.value) return;
|
|
1550
|
+
const d = i.value.trim().replace(/[^a-z0-9 -]/gi, "").split(" ");
|
|
1550
1551
|
v.value?.querySelectorAll(".option").forEach((b) => {
|
|
1551
|
-
const k = new
|
|
1552
|
+
const k = new Ln(b);
|
|
1552
1553
|
k.unmark(), k.mark(d, {
|
|
1553
1554
|
done: () => {
|
|
1554
1555
|
b.innerHTML = b.innerHTML.replace(/ <mark /g, " <mark ").replace(/<\/mark> /g, "</mark> ");
|
|
1555
1556
|
}
|
|
1556
1557
|
});
|
|
1557
1558
|
});
|
|
1558
|
-
}), (d, b) => (
|
|
1559
|
+
}), (d, b) => (S(), I("div", {
|
|
1559
1560
|
ref_key: "el",
|
|
1560
1561
|
ref: g,
|
|
1561
1562
|
class: P(["vf-smart-select", { disabled: F.value, open: h.value }])
|
|
@@ -1563,7 +1564,7 @@ const qn = ["disabled", "placeholder", "required", "name"], Jn = {
|
|
|
1563
1564
|
fe(U("input", {
|
|
1564
1565
|
ref_key: "searchField",
|
|
1565
1566
|
ref: E,
|
|
1566
|
-
"onUpdate:modelValue": b[0] || (b[0] = (k) =>
|
|
1567
|
+
"onUpdate:modelValue": b[0] || (b[0] = (k) => i.value = k),
|
|
1567
1568
|
type: "text",
|
|
1568
1569
|
disabled: F.value,
|
|
1569
1570
|
class: P({ nullable: !!e.nullTitle }),
|
|
@@ -1571,58 +1572,58 @@ const qn = ["disabled", "placeholder", "required", "name"], Jn = {
|
|
|
1571
1572
|
required: e.required,
|
|
1572
1573
|
name: e.name,
|
|
1573
1574
|
"data-1p-ignore": "",
|
|
1574
|
-
onKeydown:
|
|
1575
|
-
onPaste:
|
|
1576
|
-
onFocus:
|
|
1577
|
-
onBlur:
|
|
1578
|
-
}, null, 42,
|
|
1579
|
-
[
|
|
1575
|
+
onKeydown: Nt,
|
|
1576
|
+
onPaste: Lt,
|
|
1577
|
+
onFocus: Rt,
|
|
1578
|
+
onBlur: Dt
|
|
1579
|
+
}, null, 42, Kn), [
|
|
1580
|
+
[Kt, i.value]
|
|
1580
1581
|
]),
|
|
1581
|
-
h.value ? (
|
|
1582
|
+
h.value ? (S(), I("div", {
|
|
1582
1583
|
key: 0,
|
|
1583
1584
|
ref_key: "optionsContainer",
|
|
1584
1585
|
ref: v,
|
|
1585
1586
|
class: P(["vf-smart-select-options", { grouped: Be.value }])
|
|
1586
1587
|
}, [
|
|
1587
|
-
|
|
1588
|
+
T.value ? (S(!0), I(he, { key: 1 }, pe(Ct.value, (k) => (S(), I("div", {
|
|
1588
1589
|
key: k.groupTitle,
|
|
1589
1590
|
class: "group"
|
|
1590
1591
|
}, [
|
|
1591
|
-
k.groupTitle ? (
|
|
1592
|
+
k.groupTitle ? (S(), I("div", Xn, [
|
|
1592
1593
|
K(d.$slots, "group", {
|
|
1593
1594
|
group: k.groupTitle
|
|
1594
1595
|
}, () => [
|
|
1595
1596
|
te(J(k.groupTitle), 1)
|
|
1596
1597
|
])
|
|
1597
1598
|
])) : W("", !0),
|
|
1598
|
-
(
|
|
1599
|
-
key:
|
|
1600
|
-
class: P(["option", [f.value ===
|
|
1601
|
-
onMousemove: (M) =>
|
|
1602
|
-
onMousedown: (M) => Ue(
|
|
1599
|
+
(S(!0), I(he, null, pe(k.options, (w) => (S(), I("div", {
|
|
1600
|
+
key: w.key,
|
|
1601
|
+
class: P(["option", [f.value === w.key && "highlighted", w.ref && e.classForOption?.(w.ref)]]),
|
|
1602
|
+
onMousemove: (M) => Vt(w),
|
|
1603
|
+
onMousedown: (M) => Ue(w)
|
|
1603
1604
|
}, [
|
|
1604
|
-
K(d.$slots, "option", { option:
|
|
1605
|
+
K(d.$slots, "option", { option: w }, () => [
|
|
1605
1606
|
U("div", {
|
|
1606
1607
|
class: "title",
|
|
1607
|
-
innerHTML:
|
|
1608
|
-
}, null, 8,
|
|
1609
|
-
|
|
1608
|
+
innerHTML: w.title
|
|
1609
|
+
}, null, 8, Gn),
|
|
1610
|
+
w.subtitle ? (S(), I("div", {
|
|
1610
1611
|
key: 0,
|
|
1611
1612
|
class: "subtitle",
|
|
1612
|
-
innerHTML:
|
|
1613
|
-
}, null, 8,
|
|
1613
|
+
innerHTML: w.subtitle
|
|
1614
|
+
}, null, 8, Qn)) : W("", !0)
|
|
1614
1615
|
])
|
|
1615
|
-
], 42,
|
|
1616
|
-
|
|
1616
|
+
], 42, Zn))), 128)),
|
|
1617
|
+
!$.value.length && i.value ? (S(), I("div", eo, [
|
|
1617
1618
|
K(d.$slots, "no-results", {}, () => [
|
|
1618
|
-
te(J(
|
|
1619
|
+
te(J(It.value), 1)
|
|
1619
1620
|
])
|
|
1620
1621
|
])) : W("", !0)
|
|
1621
|
-
]))), 128)) : (
|
|
1622
|
+
]))), 128)) : (S(), I("div", Yn, "Loading..."))
|
|
1622
1623
|
], 2)) : W("", !0)
|
|
1623
1624
|
], 2));
|
|
1624
1625
|
}
|
|
1625
|
-
}),
|
|
1626
|
+
}), mi = /* @__PURE__ */ q({
|
|
1626
1627
|
__name: "vf-ez-smart-select",
|
|
1627
1628
|
props: {
|
|
1628
1629
|
modelValue: {},
|
|
@@ -1644,9 +1645,9 @@ const qn = ["disabled", "placeholder", "required", "name"], Jn = {
|
|
|
1644
1645
|
y.value = a.value.find((E) => E.value === g) ?? null;
|
|
1645
1646
|
}
|
|
1646
1647
|
), H(y, (g) => {
|
|
1647
|
-
const E = g ? a.value.find((v) =>
|
|
1648
|
+
const E = g ? a.value.find((v) => Me(v, g))?.value : null;
|
|
1648
1649
|
l("update:modelValue", E ?? null);
|
|
1649
|
-
}), (g, E) => (
|
|
1650
|
+
}), (g, E) => (S(), lt(no, {
|
|
1650
1651
|
modelValue: y.value,
|
|
1651
1652
|
"onUpdate:modelValue": E[0] || (E[0] = (v) => y.value = v),
|
|
1652
1653
|
options: a.value,
|
|
@@ -1657,16 +1658,16 @@ const qn = ["disabled", "placeholder", "required", "name"], Jn = {
|
|
|
1657
1658
|
}, null, 8, ["modelValue", "options", "formatter", "null-title", "placeholder", "name"]));
|
|
1658
1659
|
}
|
|
1659
1660
|
});
|
|
1660
|
-
function
|
|
1661
|
+
function gi() {
|
|
1661
1662
|
return N();
|
|
1662
1663
|
}
|
|
1663
|
-
const
|
|
1664
|
+
const oo = { class: "content" }, io = { class: "message" }, ro = {
|
|
1664
1665
|
key: 0,
|
|
1665
1666
|
class: "close"
|
|
1666
|
-
},
|
|
1667
|
+
}, ao = {
|
|
1667
1668
|
key: 0,
|
|
1668
1669
|
class: "progress-bar"
|
|
1669
|
-
},
|
|
1670
|
+
}, so = /* @__PURE__ */ q({
|
|
1670
1671
|
__name: "vf-toast",
|
|
1671
1672
|
props: {
|
|
1672
1673
|
position: {},
|
|
@@ -1689,15 +1690,15 @@ const to = { class: "content" }, no = { class: "message" }, oo = {
|
|
|
1689
1690
|
duration: p * 1e3,
|
|
1690
1691
|
easing: "linear"
|
|
1691
1692
|
}), setTimeout(() => t.callback(), p * 1e3);
|
|
1692
|
-
}), (p, l) => (
|
|
1693
|
+
}), (p, l) => (S(), I("div", {
|
|
1693
1694
|
class: P(["vf-toast", [e.className, { top: e.position === "top", bottom: e.position !== "top" }]]),
|
|
1694
1695
|
onClick: Le(o, ["stop"])
|
|
1695
1696
|
}, [
|
|
1696
|
-
U("div",
|
|
1697
|
-
U("div",
|
|
1698
|
-
e.disableClose ? W("", !0) : (
|
|
1697
|
+
U("div", oo, [
|
|
1698
|
+
U("div", io, J(e.message), 1),
|
|
1699
|
+
e.disableClose ? W("", !0) : (S(), I("div", ro, "x"))
|
|
1699
1700
|
]),
|
|
1700
|
-
e.durationSecs !== null ? (
|
|
1701
|
+
e.durationSecs !== null ? (S(), I("div", ao, [
|
|
1701
1702
|
U("div", {
|
|
1702
1703
|
ref_key: "progressInnerEl",
|
|
1703
1704
|
ref: a,
|
|
@@ -1707,96 +1708,96 @@ const to = { class: "content" }, no = { class: "message" }, oo = {
|
|
|
1707
1708
|
], 2));
|
|
1708
1709
|
}
|
|
1709
1710
|
});
|
|
1710
|
-
function
|
|
1711
|
-
const t = ge(
|
|
1711
|
+
function yi(e) {
|
|
1712
|
+
const t = ge(so, {
|
|
1712
1713
|
...e,
|
|
1713
|
-
callback: () =>
|
|
1714
|
+
callback: () => re(t)
|
|
1714
1715
|
});
|
|
1715
|
-
return () =>
|
|
1716
|
+
return () => re(t);
|
|
1716
1717
|
}
|
|
1717
|
-
function
|
|
1718
|
+
function lo(e) {
|
|
1718
1719
|
const t = Math.floor(Math.log(e) / Math.log(1024)), a = (e / Math.pow(1024, t)).toFixed(2), p = ["B", "KB", "MB", "GB", "TB"][t];
|
|
1719
1720
|
return `${a} ${p}`;
|
|
1720
1721
|
}
|
|
1721
|
-
function so(e) {
|
|
1722
|
-
return e != null && String(e).length ? e : "-";
|
|
1723
|
-
}
|
|
1724
|
-
function lo(e) {
|
|
1725
|
-
return e || "-";
|
|
1726
|
-
}
|
|
1727
1722
|
function uo(e) {
|
|
1728
|
-
return e
|
|
1723
|
+
return e != null && String(e).length ? e : "-";
|
|
1729
1724
|
}
|
|
1730
1725
|
function co(e) {
|
|
1731
|
-
return e
|
|
1726
|
+
return e || "-";
|
|
1732
1727
|
}
|
|
1733
1728
|
function fo(e) {
|
|
1734
|
-
return e
|
|
1735
|
-
}
|
|
1736
|
-
function vt(e) {
|
|
1737
|
-
return e ? Xt(e) : null;
|
|
1729
|
+
return e === null || typeof e == "string" && !/^\d+$/.test(e) ? e : Fn(Number(e));
|
|
1738
1730
|
}
|
|
1739
1731
|
function ho(e) {
|
|
1740
|
-
return e
|
|
1732
|
+
return e && qn(e);
|
|
1741
1733
|
}
|
|
1742
1734
|
function po(e) {
|
|
1743
|
-
return e ?
|
|
1735
|
+
return e ? en(e) : null;
|
|
1736
|
+
}
|
|
1737
|
+
function yt(e) {
|
|
1738
|
+
return e ? Qt(e) : null;
|
|
1744
1739
|
}
|
|
1745
1740
|
function vo(e) {
|
|
1746
|
-
return e ?
|
|
1741
|
+
return e ? e.toUpperCase() : null;
|
|
1747
1742
|
}
|
|
1748
|
-
function mo(e
|
|
1749
|
-
return
|
|
1743
|
+
function mo(e) {
|
|
1744
|
+
return e ? yt(e.toLowerCase()) : null;
|
|
1750
1745
|
}
|
|
1751
|
-
function go(e
|
|
1752
|
-
return
|
|
1746
|
+
function go(e) {
|
|
1747
|
+
return e ? zn(e) : null;
|
|
1753
1748
|
}
|
|
1754
1749
|
function yo(e, t) {
|
|
1755
|
-
return
|
|
1750
|
+
return Jn(e, t);
|
|
1756
1751
|
}
|
|
1757
1752
|
function Eo(e, t) {
|
|
1758
|
-
return
|
|
1753
|
+
return _(e).divide(t).value;
|
|
1759
1754
|
}
|
|
1760
1755
|
function ko(e, t) {
|
|
1761
|
-
return e && X(new Date(e), t ??
|
|
1756
|
+
return e && X(new Date(e), t ?? D.defaultDateFormat);
|
|
1757
|
+
}
|
|
1758
|
+
function wo(e, t) {
|
|
1759
|
+
return e && X(new Date(e), t ?? D.defaultTimeFormat);
|
|
1760
|
+
}
|
|
1761
|
+
function xo(e, t) {
|
|
1762
|
+
return e && X(new Date(e), t ?? `${D.defaultDateFormat} ${D.defaultTimeFormat}`);
|
|
1762
1763
|
}
|
|
1763
|
-
function
|
|
1764
|
-
return e && X(
|
|
1764
|
+
function bo(e) {
|
|
1765
|
+
return e && X(an(sn(e, "yyyy-MM-dd", /* @__PURE__ */ new Date()), 1), D.defaultDateFormat);
|
|
1765
1766
|
}
|
|
1766
1767
|
const Ze = {
|
|
1767
|
-
bytes:
|
|
1768
|
-
dash:
|
|
1769
|
-
dashZeros:
|
|
1770
|
-
number:
|
|
1771
|
-
phone:
|
|
1772
|
-
upperFirst:
|
|
1773
|
-
startCase:
|
|
1774
|
-
upperCase:
|
|
1775
|
-
upperWords:
|
|
1776
|
-
desnake:
|
|
1777
|
-
usCurrency:
|
|
1778
|
-
divide:
|
|
1779
|
-
date:
|
|
1780
|
-
time:
|
|
1781
|
-
dateTime:
|
|
1782
|
-
oneDayForward:
|
|
1783
|
-
},
|
|
1768
|
+
bytes: lo,
|
|
1769
|
+
dash: uo,
|
|
1770
|
+
dashZeros: co,
|
|
1771
|
+
number: fo,
|
|
1772
|
+
phone: ho,
|
|
1773
|
+
upperFirst: po,
|
|
1774
|
+
startCase: yt,
|
|
1775
|
+
upperCase: vo,
|
|
1776
|
+
upperWords: mo,
|
|
1777
|
+
desnake: go,
|
|
1778
|
+
usCurrency: yo,
|
|
1779
|
+
divide: Eo,
|
|
1780
|
+
date: ko,
|
|
1781
|
+
time: wo,
|
|
1782
|
+
dateTime: xo,
|
|
1783
|
+
oneDayForward: bo
|
|
1784
|
+
}, Ei = (e) => ({
|
|
1784
1785
|
...Ze,
|
|
1785
1786
|
...e(Ze)
|
|
1786
1787
|
}), Ae = Symbol("HookState");
|
|
1787
|
-
function
|
|
1788
|
+
function ki(e, t) {
|
|
1788
1789
|
const o = t ?? Ne();
|
|
1789
|
-
z(() =>
|
|
1790
|
+
z(() => To(o, e), o), ut(() => So(o), o), ct(() => Ge(o), o), me(() => Ge(o), o);
|
|
1790
1791
|
}
|
|
1791
|
-
function
|
|
1792
|
+
function To(e, t) {
|
|
1792
1793
|
const o = {};
|
|
1793
1794
|
if (t.elScrolledToBottom && (o.el = new oe(e.vnode.el, t.elScrolledToBottom)), t.ancestorScrolledToBottom) {
|
|
1794
|
-
const a =
|
|
1795
|
+
const a = Et(e.vnode.el);
|
|
1795
1796
|
a ? o.ancestor = new oe(a, t.ancestorScrolledToBottom) : console.warn("[VueFoundation] No scollable ancestor found for component:", e);
|
|
1796
1797
|
}
|
|
1797
1798
|
t.windowScrolledToBottom && (o.window = new oe(window, t.windowScrolledToBottom)), e[Ae] = o;
|
|
1798
1799
|
}
|
|
1799
|
-
function
|
|
1800
|
+
function So(e) {
|
|
1800
1801
|
const t = e[Ae];
|
|
1801
1802
|
t?.el?.install(), t?.ancestor?.install(), t?.window?.install();
|
|
1802
1803
|
}
|
|
@@ -1805,11 +1806,11 @@ function Ge(e) {
|
|
|
1805
1806
|
t?.el?.uninstall(), t?.ancestor?.uninstall(), t?.window?.uninstall();
|
|
1806
1807
|
}
|
|
1807
1808
|
const Ie = ["auto", "scroll"];
|
|
1808
|
-
function
|
|
1809
|
+
function Et(e) {
|
|
1809
1810
|
const t = e.parentElement;
|
|
1810
1811
|
if (!t) return null;
|
|
1811
1812
|
const o = window.getComputedStyle(t);
|
|
1812
|
-
return Ie.includes(o.overflow) || Ie.includes(o.overflowX) || Ie.includes(o.overflowY) ? t :
|
|
1813
|
+
return Ie.includes(o.overflow) || Ie.includes(o.overflowX) || Ie.includes(o.overflowY) ? t : Et(t);
|
|
1813
1814
|
}
|
|
1814
1815
|
class oe {
|
|
1815
1816
|
constructor(t, o) {
|
|
@@ -1827,10 +1828,10 @@ class oe {
|
|
|
1827
1828
|
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);
|
|
1828
1829
|
}
|
|
1829
1830
|
}
|
|
1830
|
-
function
|
|
1831
|
-
z(() => window.addEventListener("resize", e)),
|
|
1831
|
+
function wi(e) {
|
|
1832
|
+
z(() => window.addEventListener("resize", e)), ut(() => window.addEventListener("resize", e)), ct(() => window.removeEventListener("resize", e)), me(() => window.removeEventListener("resize", e));
|
|
1832
1833
|
}
|
|
1833
|
-
const
|
|
1834
|
+
const Io = {
|
|
1834
1835
|
mounted: et,
|
|
1835
1836
|
updated: et
|
|
1836
1837
|
}, Qe = Symbol("HasAutoFocused");
|
|
@@ -1840,10 +1841,10 @@ function et(e, t) {
|
|
|
1840
1841
|
const o = ["BUTTON", "INPUT", "TEXTAREA", "SELECT"].indexOf(e.tagName) > -1 ? e : e.querySelectorAll("input")[0];
|
|
1841
1842
|
setTimeout(() => o.focus(), 10);
|
|
1842
1843
|
}
|
|
1843
|
-
const
|
|
1844
|
-
mounted:
|
|
1844
|
+
const Mo = {
|
|
1845
|
+
mounted: Co
|
|
1845
1846
|
}, Q = Symbol("ConfirmState");
|
|
1846
|
-
function
|
|
1847
|
+
function Co(e, t) {
|
|
1847
1848
|
e.addEventListener("click", (o) => {
|
|
1848
1849
|
const a = Date.now(), p = t.value?.text !== void 0 ? t.value.text : "Confirm";
|
|
1849
1850
|
if (e[Q]) {
|
|
@@ -1863,10 +1864,10 @@ function Io(e, t) {
|
|
|
1863
1864
|
e[Q] = l, p && (e.innerHTML = p), t.value?.class && e.classList.add(t.value.class), e.addEventListener("mouseout", l.resetHandler);
|
|
1864
1865
|
});
|
|
1865
1866
|
}
|
|
1866
|
-
const
|
|
1867
|
-
beforeMount:
|
|
1867
|
+
const Oo = {
|
|
1868
|
+
beforeMount: No
|
|
1868
1869
|
};
|
|
1869
|
-
function
|
|
1870
|
+
function No(e) {
|
|
1870
1871
|
e.addEventListener("blur", () => {
|
|
1871
1872
|
let t = e.value;
|
|
1872
1873
|
/^\d{1,2}\/\d{1,2}$/.test(t) && (t += "/" + X(/* @__PURE__ */ new Date(), "yy"));
|
|
@@ -1874,14 +1875,14 @@ function Co(e) {
|
|
|
1874
1875
|
isNaN(o) ? e.value = "" : e.value = X(o, "MM/dd/yyyy"), e.dispatchEvent(new Event("input"));
|
|
1875
1876
|
});
|
|
1876
1877
|
}
|
|
1877
|
-
const
|
|
1878
|
+
const Lo = {
|
|
1878
1879
|
beforeMount: tt,
|
|
1879
1880
|
updated: tt
|
|
1880
1881
|
};
|
|
1881
1882
|
function tt(e, t) {
|
|
1882
|
-
t.value == t.oldValue && e.innerHTML.length || (e.innerText =
|
|
1883
|
+
t.value == t.oldValue && e.innerHTML.length || (e.innerText = Ro(e, t));
|
|
1883
1884
|
}
|
|
1884
|
-
function
|
|
1885
|
+
function Ro(e, t) {
|
|
1885
1886
|
if (!t.value)
|
|
1886
1887
|
return e.attributes.getNamedItem("placeholder")?.value ?? "";
|
|
1887
1888
|
let o = "";
|
|
@@ -1897,50 +1898,50 @@ function No(e, t) {
|
|
|
1897
1898
|
let v = null;
|
|
1898
1899
|
const c = /* @__PURE__ */ new Date();
|
|
1899
1900
|
c.getFullYear() === l.getFullYear() ? (c.getMonth() !== l.getMonth() || c.getDate() !== l.getDate()) && (v = "M/d") : v = "M/d/yy";
|
|
1900
|
-
const n = g ? null :
|
|
1901
|
-
y =
|
|
1901
|
+
const n = g ? null : D.defaultTimeFormat;
|
|
1902
|
+
y = dt([v, n]).join(" ");
|
|
1902
1903
|
}
|
|
1903
|
-
y || (g ? y =
|
|
1904
|
+
y || (g ? y = D.defaultDateFormat : y = `${D.defaultDateFormat} ${D.defaultTimeFormat}`);
|
|
1904
1905
|
let E = X(l, y);
|
|
1905
1906
|
return o && (E = o + " " + E), E;
|
|
1906
1907
|
}
|
|
1907
|
-
const
|
|
1908
|
+
const Fo = {
|
|
1908
1909
|
beforeMount: nt,
|
|
1909
1910
|
updated: nt,
|
|
1910
|
-
unmounted:
|
|
1911
|
+
unmounted: Ao
|
|
1911
1912
|
};
|
|
1912
1913
|
function nt(e, t) {
|
|
1913
1914
|
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");
|
|
1914
1915
|
}
|
|
1915
|
-
function
|
|
1916
|
+
function Ao(e) {
|
|
1916
1917
|
e.tagName === "LABEL" && (e.classList.remove("disabled"), e = e.querySelector("input")), e.removeAttribute("disabled");
|
|
1917
1918
|
}
|
|
1918
|
-
const
|
|
1919
|
+
const Do = {
|
|
1919
1920
|
beforeMount: ot,
|
|
1920
1921
|
updated: ot,
|
|
1921
|
-
unmounted:
|
|
1922
|
+
unmounted: wt
|
|
1922
1923
|
}, ae = Symbol("HasAutoFocused"), De = [];
|
|
1923
|
-
function
|
|
1924
|
-
De.forEach(
|
|
1924
|
+
function $o() {
|
|
1925
|
+
De.forEach(kt);
|
|
1925
1926
|
}
|
|
1926
|
-
setInterval(
|
|
1927
|
+
setInterval($o, 1e3);
|
|
1927
1928
|
function ot(e, t) {
|
|
1928
1929
|
if (t.value == t.oldValue) return;
|
|
1929
|
-
if (!t.value) return
|
|
1930
|
+
if (!t.value) return wt(e);
|
|
1930
1931
|
const o = new Date(t.value), a = e.attributes.getNamedItem("base-time")?.value, p = o.getTime() - (a ? new Date(a).getTime() - t.value * 1e3 : 0), l = e.getAttribute("no-seconds") === null;
|
|
1931
1932
|
e[ae] || De.push(e), e[ae] = {
|
|
1932
1933
|
startTs: p,
|
|
1933
1934
|
includeSeconds: l
|
|
1934
|
-
},
|
|
1935
|
+
}, kt(e);
|
|
1935
1936
|
}
|
|
1936
|
-
function
|
|
1937
|
+
function kt(e) {
|
|
1937
1938
|
const t = e[ae], o = Math.round((Date.now() - t.startTs) / 1e3);
|
|
1938
|
-
e.innerText =
|
|
1939
|
+
e.innerText = Ho(o, t.includeSeconds);
|
|
1939
1940
|
}
|
|
1940
|
-
function
|
|
1941
|
-
e[ae] && (
|
|
1941
|
+
function wt(e) {
|
|
1942
|
+
e[ae] && (tn(De, e), delete e[ae]), e.innerText = "-";
|
|
1942
1943
|
}
|
|
1943
|
-
function
|
|
1944
|
+
function Ho(e, t) {
|
|
1944
1945
|
const o = [], a = Math.floor(e / 86400);
|
|
1945
1946
|
a && o.push(a + "d"), e -= a * 86400;
|
|
1946
1947
|
const p = Math.floor(e / 3600);
|
|
@@ -1948,31 +1949,31 @@ function Do(e, t) {
|
|
|
1948
1949
|
const l = Math.floor(e / 60);
|
|
1949
1950
|
return (a || p || l) && o.push(l + "m"), t ? o.length || o.push("0m") : (e -= l * 60, o.push(e + "s")), o.join(" ");
|
|
1950
1951
|
}
|
|
1951
|
-
const
|
|
1952
|
-
mounted:
|
|
1953
|
-
updated:
|
|
1954
|
-
unmounted:
|
|
1952
|
+
const Vo = {
|
|
1953
|
+
mounted: xt,
|
|
1954
|
+
updated: Bo,
|
|
1955
|
+
unmounted: bt
|
|
1955
1956
|
}, Y = /* @__PURE__ */ new Map();
|
|
1956
|
-
function
|
|
1957
|
-
Y.size === 0 && window.addEventListener("keydown",
|
|
1957
|
+
function xt(e, t) {
|
|
1958
|
+
Y.size === 0 && window.addEventListener("keydown", Tt), Y.set(t.value.toLowerCase(), [...Y.get(t.value.toLowerCase()) ?? [], e]);
|
|
1958
1959
|
}
|
|
1959
|
-
function
|
|
1960
|
+
function bt(e, t) {
|
|
1960
1961
|
const o = Y.get(t.value.toLowerCase());
|
|
1961
1962
|
if (o) {
|
|
1962
1963
|
const a = o.indexOf(e);
|
|
1963
1964
|
a !== -1 && o.splice(a, 1), o.length === 0 && Y.delete(t.value.toLowerCase());
|
|
1964
1965
|
}
|
|
1965
|
-
Y.size === 0 && window.removeEventListener("keydown",
|
|
1966
|
+
Y.size === 0 && window.removeEventListener("keydown", Tt);
|
|
1966
1967
|
}
|
|
1967
|
-
function
|
|
1968
|
-
|
|
1968
|
+
function Bo(e, t) {
|
|
1969
|
+
bt(e, t), xt(e, t);
|
|
1969
1970
|
}
|
|
1970
|
-
function
|
|
1971
|
+
function Tt(e) {
|
|
1971
1972
|
if (typeof e.key != "string") return;
|
|
1972
1973
|
const t = e.key.toLowerCase(), o = Y.get(t);
|
|
1973
|
-
o && (
|
|
1974
|
+
o && (nn(o)?.click(), e.preventDefault());
|
|
1974
1975
|
}
|
|
1975
|
-
const ee = Symbol("InfiniteScrollHandler"),
|
|
1976
|
+
const ee = Symbol("InfiniteScrollHandler"), _o = {
|
|
1976
1977
|
mounted(e, t) {
|
|
1977
1978
|
e[ee] = new oe(e, t.value);
|
|
1978
1979
|
},
|
|
@@ -1982,47 +1983,58 @@ const ee = Symbol("InfiniteScrollHandler"), Vo = {
|
|
|
1982
1983
|
unmounted(e) {
|
|
1983
1984
|
e[ee]?.uninstall(), delete e[ee];
|
|
1984
1985
|
}
|
|
1985
|
-
},
|
|
1986
|
-
beforeMount:
|
|
1987
|
-
updated:
|
|
1986
|
+
}, Wo = {
|
|
1987
|
+
beforeMount: it,
|
|
1988
|
+
updated: it
|
|
1988
1989
|
};
|
|
1989
|
-
function
|
|
1990
|
+
function it(e, t) {
|
|
1990
1991
|
e.tagName == "LABEL" && (e = e.querySelector("input")), t.value ? e.setAttribute("readonly", "readonly") : e.removeAttribute("readonly");
|
|
1991
1992
|
}
|
|
1992
|
-
const
|
|
1993
|
-
beforeMount(e) {
|
|
1994
|
-
|
|
1995
|
-
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
Me.set(e, t), t.observe(e);
|
|
1993
|
+
const Oe = /* @__PURE__ */ new WeakMap(), Po = {
|
|
1994
|
+
beforeMount(e, t) {
|
|
1995
|
+
t.value === !1 || D.disableStickyMinWidthDirective || rt(e);
|
|
1996
|
+
},
|
|
1997
|
+
updated(e, t) {
|
|
1998
|
+
t.value !== t.oldValue && (t.value === !1 || D.disableStickyMinWidthDirective ? at(e) : rt(e));
|
|
1999
1999
|
},
|
|
2000
2000
|
beforeUnmount(e) {
|
|
2001
|
-
|
|
2002
|
-
t && (t.unobserve(e), Me.delete(e));
|
|
2001
|
+
at(e);
|
|
2003
2002
|
}
|
|
2004
|
-
}
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
|
|
2003
|
+
};
|
|
2004
|
+
function rt(e) {
|
|
2005
|
+
const t = new ResizeObserver(() => {
|
|
2006
|
+
const o = window.getComputedStyle(e).minWidth.match(/^(\d+)px$/)?.[1], a = o ? parseInt(o, 10) : 0;
|
|
2007
|
+
e.clientWidth <= a || (e.style.minWidth = `${e.clientWidth}px`);
|
|
2008
|
+
});
|
|
2009
|
+
Oe.set(e, t), t.observe(e);
|
|
2010
|
+
}
|
|
2011
|
+
function at(e) {
|
|
2012
|
+
const t = Oe.get(e);
|
|
2013
|
+
t && (t.unobserve(e), Oe.delete(e));
|
|
2014
|
+
}
|
|
2015
|
+
const jo = {
|
|
2016
|
+
mounted: st,
|
|
2017
|
+
updated: st,
|
|
2018
|
+
unmounted: St
|
|
2019
|
+
}, ie = Symbol("TooltipState");
|
|
2020
|
+
function st(e, t) {
|
|
2010
2021
|
let o = e.attributes.getNamedItem("tip")?.value ?? t.value;
|
|
2011
2022
|
if (t.value || (o = null), o) {
|
|
2012
2023
|
const a = {
|
|
2013
2024
|
content: o,
|
|
2014
|
-
html: e.getAttribute("html") !== null
|
|
2025
|
+
html: e.getAttribute("html") !== null,
|
|
2026
|
+
alertOnTap: e.getAttribute("alert-on-tap") !== null
|
|
2015
2027
|
};
|
|
2016
|
-
e[
|
|
2028
|
+
e[ie] ? e[ie].configure(a) : e[ie] = new Uo(e, a);
|
|
2017
2029
|
} else
|
|
2018
|
-
|
|
2030
|
+
St(e);
|
|
2019
2031
|
}
|
|
2020
|
-
function
|
|
2021
|
-
e[
|
|
2032
|
+
function St(e) {
|
|
2033
|
+
e[ie]?.destroy(), delete e[ie];
|
|
2022
2034
|
}
|
|
2023
|
-
class
|
|
2035
|
+
class Uo {
|
|
2024
2036
|
constructor(t, o) {
|
|
2025
|
-
this.el = t, this.config = o, t.addEventListener("mouseenter", this.handleTargetMouseEnterWithContext), t.addEventListener("mouseleave", this.handleTargetMouseLeaveWithContext), t.addEventListener("click", this.handleTargetMouseLeaveWithContext);
|
|
2037
|
+
this.el = t, this.config = o, t.addEventListener("mouseenter", this.handleTargetMouseEnterWithContext), t.addEventListener("mouseleave", this.handleTargetMouseLeaveWithContext), t.addEventListener("click", this.handleTargetMouseLeaveWithContext), o.alertOnTap && t.addEventListener("touchstart", () => this.showTapAlert());
|
|
2026
2038
|
}
|
|
2027
2039
|
lastMoveEvt;
|
|
2028
2040
|
checkInterval;
|
|
@@ -2046,6 +2058,13 @@ class Po {
|
|
|
2046
2058
|
show(t) {
|
|
2047
2059
|
this.shouldShow && (this.renderTooltip(), t && this.handleMouseMove(t));
|
|
2048
2060
|
}
|
|
2061
|
+
showTapAlert() {
|
|
2062
|
+
ht({
|
|
2063
|
+
title: this.config.title,
|
|
2064
|
+
message: this.config.content,
|
|
2065
|
+
isHtml: this.config.html ?? !1
|
|
2066
|
+
});
|
|
2067
|
+
}
|
|
2049
2068
|
renderTooltip() {
|
|
2050
2069
|
this.tipEl || (this.tipEl = document.createElement("div"), this.tipEl.style.position = "absolute", this.tipEl.style.zIndex = "1000000", document.body.appendChild(this.tipEl)), this.tipEl.className = this.getClasses().join(" "), this.config.title ? (this.titleEl || (this.titleEl = document.createElement("div"), this.titleEl.className = "title", this.tipEl.appendChild(this.titleEl)), this.titleEl.innerText = this.config.title) : this.titleEl && this.titleEl.remove(), this.contentEl || (this.contentEl = document.createElement("div"), this.contentEl.className = "content", this.tipEl.appendChild(this.contentEl)), this.contentEl[this.config.html ? "innerHTML" : "innerText"] = this.config.content, this.checkInterval && (this.checkInterval = setInterval(() => this.checkMoveEvent(), 250)), this.mouseMoveBound || (this.mouseMoveBound = !0, window.addEventListener("mousemove", this.handleMouseMoveWithContext));
|
|
2051
2070
|
}
|
|
@@ -2067,64 +2086,64 @@ class Po {
|
|
|
2067
2086
|
this.shouldShow = !1, this.removeTooltip(), this.el.removeEventListener("mouseenter", this.handleTargetMouseEnterWithContext), this.el.removeEventListener("mouseleave", this.handleTargetMouseLeaveWithContext), this.el.removeEventListener("click", this.handleTargetMouseLeaveWithContext);
|
|
2068
2087
|
}
|
|
2069
2088
|
}
|
|
2070
|
-
function
|
|
2071
|
-
e.directive("autofocus",
|
|
2089
|
+
function zo(e) {
|
|
2090
|
+
e.directive("autofocus", Io), e.directive("confirm-button", Mo), e.directive("date-input", Oo), e.directive("datetime", Lo), e.directive("disabled", Fo), e.directive("duration", Do), e.directive("hotkey", Vo), e.directive("infinite-scroll", _o), e.directive("readonly", Wo), e.directive("tooltip", jo), e.directive("sticky-min-width", Po);
|
|
2072
2091
|
}
|
|
2073
|
-
function
|
|
2074
|
-
|
|
2092
|
+
function xi(e) {
|
|
2093
|
+
zo(e);
|
|
2075
2094
|
}
|
|
2076
2095
|
export {
|
|
2077
|
-
|
|
2096
|
+
Go as OverlayContainer,
|
|
2078
2097
|
ye as UserError,
|
|
2079
|
-
|
|
2098
|
+
Xo as VfAjaxSelect,
|
|
2080
2099
|
le as VfAlertModal,
|
|
2081
|
-
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
|
|
2100
|
+
mi as VfEzSmartSelect,
|
|
2101
|
+
Tn as VfModal,
|
|
2102
|
+
no as VfSmartSelect,
|
|
2103
|
+
di as cloneProp,
|
|
2104
|
+
Zo as configureVf,
|
|
2105
|
+
hi as configureVfOpenApiClient,
|
|
2106
|
+
Ei as createFilters,
|
|
2088
2107
|
ge as createOverlayInjection,
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
|
|
2092
|
-
|
|
2093
|
-
|
|
2094
|
-
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
|
|
2108
|
+
zn as desnakeCase,
|
|
2109
|
+
pn as dismissOverlayInjectionById,
|
|
2110
|
+
Qo as dismissOverlayInjectionByInstance,
|
|
2111
|
+
ft as dismissOverlayInjectionByInternalInstance,
|
|
2112
|
+
hn as dismissOverlayInjectionByVnode,
|
|
2113
|
+
Si as escapeHtml,
|
|
2114
|
+
mn as formatError,
|
|
2115
|
+
Fn as formatNumber,
|
|
2116
|
+
qn as formatPhone,
|
|
2117
|
+
Jn as formatUSCurrency,
|
|
2118
|
+
ri as handleError,
|
|
2119
|
+
ii as handleErrorAndAlert,
|
|
2120
|
+
xi as installVf,
|
|
2121
|
+
gn as isError,
|
|
2103
2122
|
Ye as isNotNullOrUndefined,
|
|
2104
|
-
|
|
2105
|
-
|
|
2106
|
-
|
|
2107
|
-
|
|
2108
|
-
|
|
2123
|
+
ai as maskComponent,
|
|
2124
|
+
yn as maskEl,
|
|
2125
|
+
En as maskForm,
|
|
2126
|
+
pi as nl2br,
|
|
2127
|
+
fi as nullifyEmptyInputs,
|
|
2109
2128
|
Re as presentOverlay,
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
|
|
2114
|
-
|
|
2115
|
-
|
|
2116
|
-
|
|
2117
|
-
|
|
2118
|
-
|
|
2119
|
-
|
|
2120
|
-
|
|
2129
|
+
re as removeOverlayInjection,
|
|
2130
|
+
li as replaceElement,
|
|
2131
|
+
ht as showAlert,
|
|
2132
|
+
ei as showConfirm,
|
|
2133
|
+
ti as showConfirmDestroy,
|
|
2134
|
+
ui as showContextMenu,
|
|
2135
|
+
oi as showMutableWait,
|
|
2136
|
+
yi as showToast,
|
|
2137
|
+
ni as showWait,
|
|
2138
|
+
Rn as sleep,
|
|
2139
|
+
ci as sleepSecs,
|
|
2121
2140
|
Ee as toError,
|
|
2122
|
-
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
|
|
2127
|
-
|
|
2128
|
-
|
|
2129
|
-
|
|
2141
|
+
si as unmaskComponent,
|
|
2142
|
+
pt as unmaskEl,
|
|
2143
|
+
vt as unmaskForm,
|
|
2144
|
+
vn as updateOverlayProps,
|
|
2145
|
+
ki as useInfiniteScroll,
|
|
2146
|
+
wi as useResizeWatcher,
|
|
2147
|
+
vi as uuid,
|
|
2148
|
+
gi as vfModalRef
|
|
2130
2149
|
};
|