maz-ui 3.48.1-beta.0 → 3.48.1-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/modules/chunks/{MazBtn-A18R0ZiR.mjs → MazBtn-CD7_c67g.mjs} +2 -2
- package/modules/chunks/{MazBtn-12ldn-IH.cjs → MazBtn-CckrjZWm.cjs} +1 -1
- package/modules/chunks/{MazIcon-D-FWXW5H.mjs → MazIcon-CtrfYJU7.mjs} +1 -1
- package/modules/chunks/{MazIcon-biM0ap4E.cjs → MazIcon-Ded7kM16.cjs} +1 -1
- package/modules/chunks/{MazSpinner-BJJ4mYvt.cjs → MazSpinner-CKYQq31g.cjs} +1 -1
- package/modules/chunks/{MazSpinner-wVcTxosW.mjs → MazSpinner-Nh0AFsXz.mjs} +1 -1
- package/modules/chunks/index-BJHef9Zt.cjs +124 -0
- package/modules/chunks/{index-DGys9TOt.mjs → index-BgCC4Iqk.mjs} +688 -683
- package/modules/index.cjs +1 -1
- package/modules/index.mjs +1 -1
- package/nuxt/index.d.mts +5 -0
- package/nuxt/index.d.ts +5 -0
- package/nuxt/index.json +1 -1
- package/nuxt/index.mjs +25 -22
- package/package.json +1 -1
- package/tailwindcss/tailwind.config.ts +3 -3
- package/types/tailwindcss/tailwind.config.d.ts +3 -3
- package/modules/chunks/index-BJbzM3Z0.cjs +0 -124
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import '../assets/index.css';var
|
|
2
|
-
var
|
|
3
|
-
var c = (s, e, t) =>
|
|
4
|
-
import { inject as
|
|
5
|
-
function
|
|
6
|
-
const t =
|
|
1
|
+
import '../assets/index.css';var $t = Object.defineProperty;
|
|
2
|
+
var Vt = (s, e, t) => e in s ? $t(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t;
|
|
3
|
+
var c = (s, e, t) => Vt(s, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
+
import { inject as rt, ref as b, onMounted as ce, onUnmounted as at, computed as h, toValue as ge, nextTick as le, getCurrentInstance as Ht, watch as G, provide as Bt, useId as Nt, onBeforeUnmount as lt, createVNode as ee, render as Ie, defineComponent as be, defineAsyncComponent as H, reactive as Ft, openBlock as A, createElementBlock as U, withModifiers as Z, withKeys as jt, unref as O, createCommentVNode as B, createElementVNode as V, normalizeClass as ue, withDirectives as ut, vShow as ct, createBlock as N, Teleport as qt, Transition as dt, withCtx as q, mergeProps as te, renderSlot as R, useAttrs as Ut, useSlots as Wt, createTextVNode as J, toDisplayString as X, Fragment as Ze, renderList as Rt, resolveDynamicComponent as _t, normalizeStyle as Kt } from "vue";
|
|
5
|
+
function Pe(s, e) {
|
|
6
|
+
const t = rt(s, e);
|
|
7
7
|
if (!t)
|
|
8
8
|
throw new TypeError(`[maz-ui](injectStrict) Could not resolve ${s.toString()}`);
|
|
9
9
|
return t;
|
|
10
10
|
}
|
|
11
|
-
function
|
|
12
|
-
return
|
|
11
|
+
function Wn() {
|
|
12
|
+
return Pe("aos");
|
|
13
13
|
}
|
|
14
|
-
function
|
|
14
|
+
function Yt(s) {
|
|
15
15
|
const e = {};
|
|
16
16
|
for (const [t, n] of Object.entries(s))
|
|
17
17
|
e[t] = Number.parseInt(n, 10);
|
|
@@ -20,7 +20,7 @@ function _t(s) {
|
|
|
20
20
|
function F() {
|
|
21
21
|
return typeof document < "u";
|
|
22
22
|
}
|
|
23
|
-
function
|
|
23
|
+
function Zt(s = {}) {
|
|
24
24
|
const {
|
|
25
25
|
internalWindow: e = F() ? window : void 0,
|
|
26
26
|
initialWidth: t = Number.POSITIVE_INFINITY,
|
|
@@ -30,13 +30,13 @@ function Kt(s = {}) {
|
|
|
30
30
|
function a() {
|
|
31
31
|
e && (o ? (i.value = e.innerWidth, r.value = e.innerHeight) : (i.value = e.document.documentElement.clientWidth, r.value = e.document.documentElement.clientHeight));
|
|
32
32
|
}
|
|
33
|
-
return a(),
|
|
33
|
+
return a(), ce(() => {
|
|
34
34
|
e && window.addEventListener("resize", a, { passive: !0 });
|
|
35
|
-
}),
|
|
35
|
+
}), at(() => {
|
|
36
36
|
e && window.removeEventListener("resize", a);
|
|
37
37
|
}), { width: i, height: r };
|
|
38
38
|
}
|
|
39
|
-
function
|
|
39
|
+
function Rn({
|
|
40
40
|
initialWidth: s = 0,
|
|
41
41
|
initialHeight: e,
|
|
42
42
|
includeScrollbar: t,
|
|
@@ -46,14 +46,14 @@ function Un({
|
|
|
46
46
|
mediumBreakPoint: r = "md",
|
|
47
47
|
largeBreakPoint: a = "lg"
|
|
48
48
|
}) {
|
|
49
|
-
const { width: l } =
|
|
49
|
+
const { width: l } = Zt({
|
|
50
50
|
initialWidth: s,
|
|
51
51
|
// (SSR) mobile first
|
|
52
52
|
initialHeight: e,
|
|
53
53
|
includeScrollbar: t,
|
|
54
54
|
internalWindow: n,
|
|
55
55
|
listenOrientation: o
|
|
56
|
-
}), u =
|
|
56
|
+
}), u = Yt(i), y = h(() => l.value >= u[a]), T = h(
|
|
57
57
|
() => l.value >= u[r] && l.value < u[a]
|
|
58
58
|
), w = h(() => l.value >= 0 && l.value < u[r]);
|
|
59
59
|
return {
|
|
@@ -61,14 +61,14 @@ function Un({
|
|
|
61
61
|
numericBreakpoints: u,
|
|
62
62
|
isSmallScreen: w,
|
|
63
63
|
isLargeScreen: y,
|
|
64
|
-
isMediumScreen:
|
|
64
|
+
isMediumScreen: T,
|
|
65
65
|
breakpoints: i
|
|
66
66
|
};
|
|
67
67
|
}
|
|
68
|
-
function
|
|
69
|
-
return
|
|
68
|
+
function _n() {
|
|
69
|
+
return Pe("dialog");
|
|
70
70
|
}
|
|
71
|
-
function
|
|
71
|
+
function mt(s, e, t) {
|
|
72
72
|
const n = {
|
|
73
73
|
maxAttempts: 20,
|
|
74
74
|
interval: 100,
|
|
@@ -81,34 +81,34 @@ function ct(s, e, t) {
|
|
|
81
81
|
}
|
|
82
82
|
i();
|
|
83
83
|
}
|
|
84
|
-
function
|
|
85
|
-
const e =
|
|
84
|
+
function ft(s) {
|
|
85
|
+
const e = ge(s);
|
|
86
86
|
return Array.isArray(e) ? Object.freeze([...e]) : typeof e == "object" && e !== null ? Object.freeze({ ...e }) : e;
|
|
87
87
|
}
|
|
88
|
-
function
|
|
88
|
+
function Xe(s) {
|
|
89
89
|
return s == null || typeof s == "string" || typeof s == "number" || typeof s == "boolean" || typeof s == "symbol" || typeof s == "bigint";
|
|
90
90
|
}
|
|
91
|
-
function
|
|
91
|
+
function Xt(s, e) {
|
|
92
92
|
if (s.length !== e.length)
|
|
93
93
|
return !1;
|
|
94
94
|
for (const [t, n] of s.entries())
|
|
95
|
-
if (!
|
|
95
|
+
if (!we(n, e[t]))
|
|
96
96
|
return !1;
|
|
97
97
|
return !0;
|
|
98
98
|
}
|
|
99
|
-
function
|
|
99
|
+
function Gt(s, e) {
|
|
100
100
|
const t = Object.keys(s), n = Object.keys(e);
|
|
101
101
|
if (t.length !== n.length)
|
|
102
102
|
return !1;
|
|
103
103
|
for (const o of t)
|
|
104
|
-
if (!n.includes(o) || !
|
|
104
|
+
if (!n.includes(o) || !we(s[o], e[o]))
|
|
105
105
|
return !1;
|
|
106
106
|
return !0;
|
|
107
107
|
}
|
|
108
|
-
function
|
|
109
|
-
return
|
|
108
|
+
function we(s, e) {
|
|
109
|
+
return Xe(s) || Xe(e) ? s === e : s instanceof Date && e instanceof Date ? s.getTime() === e.getTime() : typeof s != typeof e || Array.isArray(s) !== Array.isArray(e) ? !1 : Array.isArray(s) && Array.isArray(e) ? Xt(s, e) : typeof s == "object" && typeof e == "object" ? Gt(s, e) : !1;
|
|
110
110
|
}
|
|
111
|
-
function
|
|
111
|
+
function Qt(s, e, t) {
|
|
112
112
|
const n = {};
|
|
113
113
|
return function(...o) {
|
|
114
114
|
n[s] || (n[s] = { timer: null, promise: null });
|
|
@@ -126,7 +126,7 @@ function Xt(s, e, t) {
|
|
|
126
126
|
}), i.promise;
|
|
127
127
|
};
|
|
128
128
|
}
|
|
129
|
-
function
|
|
129
|
+
function Jt(s, e, t) {
|
|
130
130
|
const n = {};
|
|
131
131
|
return async (...o) => {
|
|
132
132
|
const i = Date.now();
|
|
@@ -142,20 +142,20 @@ function Gt(s, e, t) {
|
|
|
142
142
|
})), n[s].promise);
|
|
143
143
|
};
|
|
144
144
|
}
|
|
145
|
-
const
|
|
145
|
+
const se = {
|
|
146
146
|
mode: "lazy",
|
|
147
147
|
scrollToErrorSelector: ".has-field-error",
|
|
148
148
|
debounceTime: 300,
|
|
149
149
|
throttleTime: 1e3
|
|
150
150
|
};
|
|
151
|
-
function
|
|
151
|
+
function ht(s, e) {
|
|
152
152
|
return Object.keys(e).includes(s);
|
|
153
153
|
}
|
|
154
|
-
function
|
|
154
|
+
function Ge(s = se.scrollToErrorSelector) {
|
|
155
155
|
const e = document.querySelector(s);
|
|
156
156
|
e && e.scrollIntoView({ behavior: "smooth", block: "center" });
|
|
157
157
|
}
|
|
158
|
-
function
|
|
158
|
+
function es(s, e) {
|
|
159
159
|
const t = {};
|
|
160
160
|
for (const [n, o] of Object.entries(s)) {
|
|
161
161
|
const i = o;
|
|
@@ -163,10 +163,10 @@ function Qt(s, e) {
|
|
|
163
163
|
}
|
|
164
164
|
return t;
|
|
165
165
|
}
|
|
166
|
-
function
|
|
166
|
+
function Re(s) {
|
|
167
167
|
return s == null || s === "";
|
|
168
168
|
}
|
|
169
|
-
function
|
|
169
|
+
function ts({
|
|
170
170
|
name: s,
|
|
171
171
|
hasValidation: e,
|
|
172
172
|
debouncedFields: t,
|
|
@@ -177,24 +177,24 @@ function Jt({
|
|
|
177
177
|
const o = String(s);
|
|
178
178
|
if (t != null && t[o] && (n != null && n[o]))
|
|
179
179
|
throw new Error(`The field "${o}" cannot be both debounced and throttled`);
|
|
180
|
-
return t != null && t[o] ?
|
|
180
|
+
return t != null && t[o] ? Qt(
|
|
181
181
|
o,
|
|
182
|
-
|
|
183
|
-
typeof t[o] == "number" ? t[o] :
|
|
184
|
-
) : n != null && n[o] ?
|
|
182
|
+
ye,
|
|
183
|
+
typeof t[o] == "number" ? t[o] : se.debounceTime
|
|
184
|
+
) : n != null && n[o] ? Jt(
|
|
185
185
|
o,
|
|
186
|
-
|
|
187
|
-
typeof n[o] == "number" ? n[o] :
|
|
188
|
-
) :
|
|
186
|
+
ye,
|
|
187
|
+
typeof n[o] == "number" ? n[o] : se.throttleTime
|
|
188
|
+
) : ye;
|
|
189
189
|
}
|
|
190
|
-
function
|
|
190
|
+
function vt({
|
|
191
191
|
name: s,
|
|
192
192
|
schema: e,
|
|
193
193
|
initialValue: t,
|
|
194
194
|
fieldState: n,
|
|
195
195
|
options: o
|
|
196
196
|
}) {
|
|
197
|
-
const i = e ?
|
|
197
|
+
const i = e ? ht(s, e) : !1, r = ts({
|
|
198
198
|
name: s,
|
|
199
199
|
hasValidation: i,
|
|
200
200
|
debouncedFields: o == null ? void 0 : o.debouncedFields,
|
|
@@ -208,12 +208,12 @@ function ft({
|
|
|
208
208
|
valid: !i,
|
|
209
209
|
validating: !1,
|
|
210
210
|
validated: !1,
|
|
211
|
-
initialValue:
|
|
211
|
+
initialValue: ft(t),
|
|
212
212
|
validateFunction: r,
|
|
213
|
-
mode: i ? (o == null ? void 0 : o.mode) ?? (n == null ? void 0 : n.mode) ??
|
|
213
|
+
mode: i ? (o == null ? void 0 : o.mode) ?? (n == null ? void 0 : n.mode) ?? se.mode : void 0
|
|
214
214
|
};
|
|
215
215
|
}
|
|
216
|
-
function
|
|
216
|
+
function ss({
|
|
217
217
|
schema: s,
|
|
218
218
|
payload: e,
|
|
219
219
|
options: t
|
|
@@ -221,7 +221,7 @@ function es({
|
|
|
221
221
|
const n = {};
|
|
222
222
|
for (const o in s) {
|
|
223
223
|
const i = o;
|
|
224
|
-
n[i] =
|
|
224
|
+
n[i] = vt({
|
|
225
225
|
name: i,
|
|
226
226
|
schema: s,
|
|
227
227
|
options: t,
|
|
@@ -231,7 +231,7 @@ function es({
|
|
|
231
231
|
}
|
|
232
232
|
return n;
|
|
233
233
|
}
|
|
234
|
-
function
|
|
234
|
+
function ns({
|
|
235
235
|
fieldsStates: s,
|
|
236
236
|
payload: e,
|
|
237
237
|
schema: t,
|
|
@@ -240,7 +240,7 @@ function ts({
|
|
|
240
240
|
}) {
|
|
241
241
|
for (const i in t) {
|
|
242
242
|
const r = i;
|
|
243
|
-
s[r] =
|
|
243
|
+
s[r] = pt({
|
|
244
244
|
name: r,
|
|
245
245
|
fieldState: s[r],
|
|
246
246
|
payload: e,
|
|
@@ -250,7 +250,7 @@ function ts({
|
|
|
250
250
|
});
|
|
251
251
|
}
|
|
252
252
|
}
|
|
253
|
-
function
|
|
253
|
+
function pt({
|
|
254
254
|
name: s,
|
|
255
255
|
fieldState: e,
|
|
256
256
|
payload: t,
|
|
@@ -258,13 +258,13 @@ function ht({
|
|
|
258
258
|
options: o,
|
|
259
259
|
updateMode: i = !0
|
|
260
260
|
}) {
|
|
261
|
-
const { initialValue: r, mode: a, ...l } =
|
|
261
|
+
const { initialValue: r, mode: a, ...l } = vt({
|
|
262
262
|
name: s,
|
|
263
263
|
schema: n,
|
|
264
264
|
initialValue: o.defaultValue ?? t[s],
|
|
265
265
|
fieldState: e,
|
|
266
266
|
options: o
|
|
267
|
-
}), u = i ? a ?? e.mode ??
|
|
267
|
+
}), u = i ? a ?? e.mode ?? se.mode : e.mode;
|
|
268
268
|
return {
|
|
269
269
|
...e,
|
|
270
270
|
initialValue: r,
|
|
@@ -272,27 +272,27 @@ function ht({
|
|
|
272
272
|
...e != null && e.mode && u !== e.mode ? l : {}
|
|
273
273
|
};
|
|
274
274
|
}
|
|
275
|
-
function
|
|
275
|
+
function os(s) {
|
|
276
276
|
const e = {};
|
|
277
277
|
for (const [t, { errors: n }] of Object.entries(s))
|
|
278
278
|
e[t] = n;
|
|
279
279
|
return e;
|
|
280
280
|
}
|
|
281
|
-
function
|
|
281
|
+
function is(s) {
|
|
282
282
|
return s instanceof HTMLInputElement || s instanceof HTMLSelectElement || s instanceof HTMLTextAreaElement ? [s] : s.querySelectorAll(
|
|
283
283
|
"input, select, textarea"
|
|
284
284
|
);
|
|
285
285
|
}
|
|
286
|
-
function
|
|
286
|
+
function rs({
|
|
287
287
|
interactiveElements: s,
|
|
288
288
|
onBlur: e,
|
|
289
289
|
mode: t
|
|
290
290
|
}) {
|
|
291
291
|
s.forEach((n) => {
|
|
292
|
-
|
|
292
|
+
Ee(["eager", "blur", "progressive"], t) && n.addEventListener("blur", e);
|
|
293
293
|
});
|
|
294
294
|
}
|
|
295
|
-
function
|
|
295
|
+
function as({
|
|
296
296
|
interactiveElements: s,
|
|
297
297
|
onBlur: e
|
|
298
298
|
}) {
|
|
@@ -300,14 +300,14 @@ function is({
|
|
|
300
300
|
t.removeEventListener("blur", e);
|
|
301
301
|
});
|
|
302
302
|
}
|
|
303
|
-
async function
|
|
304
|
-
const n = await
|
|
303
|
+
async function ls(s, e, t) {
|
|
304
|
+
const n = await hs(e), i = await (await bt("safeParseAsync"))(n.entries[s], t ?? "");
|
|
305
305
|
return {
|
|
306
306
|
result: i,
|
|
307
307
|
isValid: i.success
|
|
308
308
|
};
|
|
309
309
|
}
|
|
310
|
-
async function
|
|
310
|
+
async function ye({
|
|
311
311
|
name: s,
|
|
312
312
|
fieldState: e,
|
|
313
313
|
schema: t,
|
|
@@ -315,14 +315,14 @@ async function ge({
|
|
|
315
315
|
setError: o = !0,
|
|
316
316
|
setErrorIfInvalidAndNotEmpty: i = !1
|
|
317
317
|
}) {
|
|
318
|
-
if (await
|
|
318
|
+
if (await le(), e.validating = !0, !t[s]) {
|
|
319
319
|
e.valid = !0, e.validating = !1, e.validated = !0, e.errors = [], e.error = !1;
|
|
320
320
|
return;
|
|
321
321
|
}
|
|
322
|
-
const { result: r, isValid: a } = await
|
|
323
|
-
e.valid = a, (o || i && !a && !
|
|
322
|
+
const { result: r, isValid: a } = await ls(s, t, n[s]);
|
|
323
|
+
e.valid = a, (o || i && !a && !Re(n[s])) && (e.error = !a), e.errors = r.issues ?? [], e.validating = !1, e.validated = !0;
|
|
324
324
|
}
|
|
325
|
-
function
|
|
325
|
+
function gt({
|
|
326
326
|
name: s,
|
|
327
327
|
fieldState: e,
|
|
328
328
|
payload: t,
|
|
@@ -338,7 +338,7 @@ function vt({
|
|
|
338
338
|
};
|
|
339
339
|
return (i = e.validateFunction) == null ? void 0 : i.call(e, o);
|
|
340
340
|
}
|
|
341
|
-
function
|
|
341
|
+
function us({
|
|
342
342
|
fieldsStates: s,
|
|
343
343
|
payload: e,
|
|
344
344
|
showErrors: t = !0,
|
|
@@ -346,7 +346,7 @@ function as({
|
|
|
346
346
|
}) {
|
|
347
347
|
return Promise.all(
|
|
348
348
|
Object.keys(s).map(
|
|
349
|
-
(o) =>
|
|
349
|
+
(o) => ye({
|
|
350
350
|
name: o,
|
|
351
351
|
setError: t,
|
|
352
352
|
fieldState: s[o],
|
|
@@ -357,15 +357,15 @@ function as({
|
|
|
357
357
|
)
|
|
358
358
|
);
|
|
359
359
|
}
|
|
360
|
-
function
|
|
360
|
+
function yt({
|
|
361
361
|
eventName: s,
|
|
362
362
|
fieldState: e,
|
|
363
363
|
isSubmitted: t
|
|
364
364
|
}) {
|
|
365
365
|
const { dirty: n, blurred: o, mode: i, valid: r } = e;
|
|
366
|
-
return s === "blur" && (
|
|
366
|
+
return s === "blur" && (Ee(["lazy", "aggressive"], i) || r) || s === "input" && i === "blur" || !i ? !1 : t || i === "eager" && o || i === "blur" && o || i === "aggressive" && n || i === "lazy" && n || i === "progressive";
|
|
367
367
|
}
|
|
368
|
-
function
|
|
368
|
+
function cs({
|
|
369
369
|
name: s,
|
|
370
370
|
force: e = !1,
|
|
371
371
|
payload: t,
|
|
@@ -373,16 +373,16 @@ function ls({
|
|
|
373
373
|
schema: o,
|
|
374
374
|
isSubmitted: i
|
|
375
375
|
}) {
|
|
376
|
-
const r = t[s], a = !
|
|
377
|
-
if (n.dirty = a, n.blurred = n.blurred || (n.mode === "eager" ? a : !0), !!(e ||
|
|
378
|
-
return
|
|
376
|
+
const r = t[s], a = !Re(r) && !we(r, n.initialValue);
|
|
377
|
+
if (n.dirty = a, n.blurred = n.blurred || (n.mode === "eager" ? a : !0), !!(e || yt({ eventName: "blur", fieldState: n, isSubmitted: i })))
|
|
378
|
+
return gt({
|
|
379
379
|
name: s,
|
|
380
380
|
fieldState: n,
|
|
381
381
|
schema: o,
|
|
382
382
|
payload: t
|
|
383
383
|
});
|
|
384
384
|
}
|
|
385
|
-
function
|
|
385
|
+
function ds({
|
|
386
386
|
name: s,
|
|
387
387
|
payload: e,
|
|
388
388
|
fieldState: t,
|
|
@@ -392,52 +392,52 @@ function us({
|
|
|
392
392
|
}) {
|
|
393
393
|
const r = e[s];
|
|
394
394
|
t.validated = !1;
|
|
395
|
-
const a = !
|
|
396
|
-
if (t.dirty = a, !!(i ||
|
|
397
|
-
return
|
|
395
|
+
const a = !Re(r) && !we(r, t.initialValue);
|
|
396
|
+
if (t.dirty = a, !!(i || yt({ eventName: "input", fieldState: t, isSubmitted: o })))
|
|
397
|
+
return gt({
|
|
398
398
|
name: s,
|
|
399
399
|
fieldState: t,
|
|
400
400
|
schema: n,
|
|
401
401
|
payload: e
|
|
402
402
|
});
|
|
403
403
|
}
|
|
404
|
-
function
|
|
405
|
-
const e =
|
|
404
|
+
function _e(s) {
|
|
405
|
+
const e = Ht();
|
|
406
406
|
if (!e)
|
|
407
407
|
throw new Error(`${s} must be called within setup()`);
|
|
408
408
|
return e;
|
|
409
409
|
}
|
|
410
|
-
function
|
|
410
|
+
function ms(s, e) {
|
|
411
411
|
var o;
|
|
412
|
-
const n = ((o =
|
|
412
|
+
const n = ((o = _e(e).formContexts) == null ? void 0 : o.get(s)) ?? rt(s);
|
|
413
413
|
if (!n)
|
|
414
414
|
throw new Error("useFormField must be used within a form (useFormValidator)");
|
|
415
415
|
return n;
|
|
416
416
|
}
|
|
417
|
-
function
|
|
417
|
+
function fs({
|
|
418
418
|
ref: s,
|
|
419
419
|
fieldState: e,
|
|
420
420
|
onBlur: t
|
|
421
421
|
}) {
|
|
422
|
-
if (!(s ||
|
|
422
|
+
if (!(s || Ee(["aggressive", "lazy"], e.mode)))
|
|
423
423
|
return {
|
|
424
424
|
onBlur: t
|
|
425
425
|
};
|
|
426
426
|
}
|
|
427
|
-
const
|
|
428
|
-
async function
|
|
429
|
-
if (
|
|
430
|
-
return
|
|
427
|
+
const Ne = {};
|
|
428
|
+
async function bt(s) {
|
|
429
|
+
if (Ne[s])
|
|
430
|
+
return Ne[s];
|
|
431
431
|
const e = await import("./index-BgyjI1q8.mjs");
|
|
432
|
-
return
|
|
432
|
+
return Ne[s] = e[s], e[s];
|
|
433
433
|
}
|
|
434
|
-
async function
|
|
435
|
-
return (await
|
|
434
|
+
async function hs(s) {
|
|
435
|
+
return (await bt("objectAsync"))(s);
|
|
436
436
|
}
|
|
437
|
-
function
|
|
437
|
+
function Ee(s, e) {
|
|
438
438
|
return e ? s.includes(e) : !1;
|
|
439
439
|
}
|
|
440
|
-
function
|
|
440
|
+
function Kn(s, e) {
|
|
441
441
|
const t = {
|
|
442
442
|
formIdentifier: "main-form-validator",
|
|
443
443
|
...e
|
|
@@ -448,20 +448,20 @@ function Rn(s, e) {
|
|
|
448
448
|
internalSchema: r,
|
|
449
449
|
errorMessages: a,
|
|
450
450
|
isSubmitted: l
|
|
451
|
-
} =
|
|
451
|
+
} = ms(t.formIdentifier, "useFormField"), u = ht(s, r.value) ? (e == null ? void 0 : e.mode) ?? i.mode : void 0;
|
|
452
452
|
t.mode = u;
|
|
453
453
|
const y = h(() => n.value[s]);
|
|
454
|
-
if (n.value[s] =
|
|
454
|
+
if (n.value[s] = pt({
|
|
455
455
|
name: s,
|
|
456
456
|
fieldState: y.value,
|
|
457
457
|
payload: o.value,
|
|
458
458
|
schema: r.value,
|
|
459
459
|
options: { ...i, ...t }
|
|
460
|
-
}), t.defaultValue !== void 0 && !
|
|
460
|
+
}), t.defaultValue !== void 0 && !we(o.value[s], t.defaultValue)) {
|
|
461
461
|
const f = t.defaultValue;
|
|
462
|
-
o.value[s] = f, n.value[s].initialValue =
|
|
462
|
+
o.value[s] = f, n.value[s].initialValue = ft(f);
|
|
463
463
|
}
|
|
464
|
-
u &&
|
|
464
|
+
u && ye({
|
|
465
465
|
name: s,
|
|
466
466
|
fieldState: y.value,
|
|
467
467
|
payload: o.value,
|
|
@@ -469,8 +469,8 @@ function Rn(s, e) {
|
|
|
469
469
|
setError: u === "aggressive",
|
|
470
470
|
setErrorIfInvalidAndNotEmpty: u === "lazy"
|
|
471
471
|
});
|
|
472
|
-
function
|
|
473
|
-
|
|
472
|
+
function T() {
|
|
473
|
+
cs({
|
|
474
474
|
name: s,
|
|
475
475
|
fieldState: y.value,
|
|
476
476
|
payload: o.value,
|
|
@@ -479,33 +479,33 @@ function Rn(s, e) {
|
|
|
479
479
|
});
|
|
480
480
|
}
|
|
481
481
|
const w = h(
|
|
482
|
-
() =>
|
|
482
|
+
() => fs({
|
|
483
483
|
ref: t.ref,
|
|
484
|
-
onBlur:
|
|
484
|
+
onBlur: T,
|
|
485
485
|
fieldState: y.value
|
|
486
486
|
})
|
|
487
487
|
);
|
|
488
|
-
if (t.ref &&
|
|
488
|
+
if (t.ref && Ee(["eager", "blur", "progressive"], u)) {
|
|
489
489
|
let f = [];
|
|
490
|
-
const k = (
|
|
491
|
-
f =
|
|
490
|
+
const k = (z) => {
|
|
491
|
+
f = is(z), rs({
|
|
492
492
|
interactiveElements: f,
|
|
493
|
-
onBlur:
|
|
493
|
+
onBlur: T,
|
|
494
494
|
mode: u
|
|
495
495
|
});
|
|
496
496
|
};
|
|
497
|
-
|
|
498
|
-
const
|
|
499
|
-
|
|
497
|
+
ce(() => {
|
|
498
|
+
const z = _e(`useFormField of ${s}`);
|
|
499
|
+
mt(() => z.refs[t.ref], (m) => {
|
|
500
500
|
const d = m instanceof HTMLElement ? m : m == null ? void 0 : m.$el;
|
|
501
501
|
d && k(d);
|
|
502
502
|
}, {
|
|
503
503
|
errorMessage: `[maz-ui](useFormField) No element found for ref ${t.ref} for field ${s}`
|
|
504
504
|
});
|
|
505
|
-
}),
|
|
506
|
-
|
|
505
|
+
}), at(() => {
|
|
506
|
+
as({
|
|
507
507
|
interactiveElements: f,
|
|
508
|
-
onBlur:
|
|
508
|
+
onBlur: T
|
|
509
509
|
});
|
|
510
510
|
});
|
|
511
511
|
}
|
|
@@ -524,40 +524,40 @@ function Rn(s, e) {
|
|
|
524
524
|
set: (f) => o.value[s] = f
|
|
525
525
|
}),
|
|
526
526
|
validationEvents: w,
|
|
527
|
-
onBlur:
|
|
527
|
+
onBlur: T
|
|
528
528
|
};
|
|
529
529
|
}
|
|
530
|
-
function
|
|
531
|
-
const o =
|
|
532
|
-
mode:
|
|
533
|
-
scrollToError:
|
|
530
|
+
function Yn({ schema: s, defaultValues: e, model: t, options: n }) {
|
|
531
|
+
const o = _e("useFormValidator"), i = {
|
|
532
|
+
mode: se.mode,
|
|
533
|
+
scrollToError: se.scrollToErrorSelector,
|
|
534
534
|
debouncedFields: null,
|
|
535
535
|
throttledFields: null,
|
|
536
536
|
identifier: "main-form-validator",
|
|
537
537
|
...n
|
|
538
538
|
}, r = b(e), a = b({ ...r.value, ...t == null ? void 0 : t.value }), l = b(s), u = b(
|
|
539
|
-
|
|
539
|
+
ss({
|
|
540
540
|
schema: l.value,
|
|
541
541
|
payload: a.value,
|
|
542
542
|
options: i
|
|
543
543
|
})
|
|
544
|
-
), y = b(!1),
|
|
545
|
-
t &&
|
|
544
|
+
), y = b(!1), T = b(!1), w = h(() => Object.values(u.value).every(({ valid: L }) => L)), f = h(() => Object.values(u.value).some(({ dirty: L }) => L)), k = h(() => os(u.value)), z = h(() => es(k.value, u.value));
|
|
545
|
+
t && G(
|
|
546
546
|
a,
|
|
547
547
|
(L) => {
|
|
548
548
|
t.value = { ...r.value, ...L };
|
|
549
549
|
},
|
|
550
550
|
{ deep: !0 }
|
|
551
|
-
),
|
|
551
|
+
), G(
|
|
552
552
|
r,
|
|
553
553
|
(L) => {
|
|
554
554
|
a.value = { ...L, ...a.value };
|
|
555
555
|
},
|
|
556
556
|
{ deep: !0 }
|
|
557
|
-
),
|
|
557
|
+
), G(
|
|
558
558
|
l,
|
|
559
559
|
(L) => {
|
|
560
|
-
|
|
560
|
+
ns({
|
|
561
561
|
schema: L,
|
|
562
562
|
fieldsStates: u.value,
|
|
563
563
|
payload: a.value,
|
|
@@ -567,7 +567,7 @@ function _n({ schema: s, defaultValues: e, model: t, options: n }) {
|
|
|
567
567
|
{ deep: !0 }
|
|
568
568
|
), m();
|
|
569
569
|
function m(L = i.mode === "aggressive") {
|
|
570
|
-
return
|
|
570
|
+
return us({
|
|
571
571
|
fieldsStates: u.value,
|
|
572
572
|
payload: a.value,
|
|
573
573
|
schema: l.value,
|
|
@@ -576,18 +576,18 @@ function _n({ schema: s, defaultValues: e, model: t, options: n }) {
|
|
|
576
576
|
}
|
|
577
577
|
const d = [];
|
|
578
578
|
async function C(L) {
|
|
579
|
-
await
|
|
580
|
-
const P =
|
|
579
|
+
await le();
|
|
580
|
+
const P = G(
|
|
581
581
|
() => a.value[L],
|
|
582
582
|
() => {
|
|
583
583
|
const j = u.value[L];
|
|
584
|
-
|
|
584
|
+
ds({
|
|
585
585
|
name: L,
|
|
586
586
|
fieldState: j,
|
|
587
587
|
payload: a.value,
|
|
588
588
|
schema: l.value,
|
|
589
|
-
isSubmitted:
|
|
590
|
-
forceValidation:
|
|
589
|
+
isSubmitted: T.value,
|
|
590
|
+
forceValidation: Ee(["aggressive", "lazy", "progressive"], j.mode)
|
|
591
591
|
});
|
|
592
592
|
},
|
|
593
593
|
{ deep: typeof l.value[L] == "object" }
|
|
@@ -603,12 +603,12 @@ function _n({ schema: s, defaultValues: e, model: t, options: n }) {
|
|
|
603
603
|
function S(L, P) {
|
|
604
604
|
return async (j) => {
|
|
605
605
|
if (j == null || j.preventDefault(), !y.value) {
|
|
606
|
-
|
|
606
|
+
T.value = !0, y.value = !0;
|
|
607
607
|
try {
|
|
608
608
|
await m(!0);
|
|
609
|
-
const
|
|
610
|
-
let
|
|
611
|
-
return w.value ?
|
|
609
|
+
const ne = typeof P == "string" ? P : i.scrollToError;
|
|
610
|
+
let Q;
|
|
611
|
+
return w.value ? Q = await L(a.value) : typeof ne != "boolean" && Ge(ne), y.value = !1, Q;
|
|
612
612
|
} finally {
|
|
613
613
|
y.value = !1;
|
|
614
614
|
}
|
|
@@ -620,25 +620,25 @@ function _n({ schema: s, defaultValues: e, model: t, options: n }) {
|
|
|
620
620
|
payload: a,
|
|
621
621
|
options: i,
|
|
622
622
|
internalSchema: l,
|
|
623
|
-
errorMessages:
|
|
624
|
-
isSubmitted:
|
|
623
|
+
errorMessages: z,
|
|
624
|
+
isSubmitted: T
|
|
625
625
|
};
|
|
626
|
-
return o.formContexts ?? (o.formContexts = /* @__PURE__ */ new Map()), o.formContexts.set(i.identifier, D),
|
|
626
|
+
return o.formContexts ?? (o.formContexts = /* @__PURE__ */ new Map()), o.formContexts.set(i.identifier, D), Bt(i.identifier, D), p(), {
|
|
627
627
|
identifier: i.identifier,
|
|
628
628
|
isDirty: f,
|
|
629
629
|
isSubmitting: y,
|
|
630
|
-
isSubmitted:
|
|
630
|
+
isSubmitted: T,
|
|
631
631
|
isValid: w,
|
|
632
632
|
errors: k,
|
|
633
633
|
model: a,
|
|
634
634
|
fieldsStates: u,
|
|
635
635
|
validateForm: m,
|
|
636
|
-
scrollToError:
|
|
636
|
+
scrollToError: Ge,
|
|
637
637
|
handleSubmit: S,
|
|
638
|
-
errorMessages:
|
|
638
|
+
errorMessages: z
|
|
639
639
|
};
|
|
640
640
|
}
|
|
641
|
-
class
|
|
641
|
+
class vs {
|
|
642
642
|
constructor(e, t) {
|
|
643
643
|
c(this, "defaultOptions", {
|
|
644
644
|
element: void 0,
|
|
@@ -745,19 +745,19 @@ class fs {
|
|
|
745
745
|
e ? this.handleTimeout() : this.reset(), this.callback({ isIdle: this.isIdle, instance: this });
|
|
746
746
|
}
|
|
747
747
|
}
|
|
748
|
-
function
|
|
748
|
+
function Zn({
|
|
749
749
|
callback: s,
|
|
750
750
|
options: e
|
|
751
751
|
}) {
|
|
752
|
-
return new
|
|
752
|
+
return new vs(s, e);
|
|
753
753
|
}
|
|
754
|
-
function
|
|
754
|
+
function Xn({
|
|
755
755
|
componentName: s,
|
|
756
756
|
providedId: e
|
|
757
757
|
}) {
|
|
758
|
-
return h(() => e ?? `${s}-${
|
|
758
|
+
return h(() => e ?? `${s}-${Nt().replace(/:/g, "")}`);
|
|
759
759
|
}
|
|
760
|
-
const
|
|
760
|
+
const ps = [
|
|
761
761
|
"af-ZA",
|
|
762
762
|
"sq-AL",
|
|
763
763
|
"ar-DZ",
|
|
@@ -894,7 +894,7 @@ const hs = [
|
|
|
894
894
|
"Cy-uz-UZ",
|
|
895
895
|
"Lt-uz-UZ",
|
|
896
896
|
"vi-VN"
|
|
897
|
-
],
|
|
897
|
+
], gs = [
|
|
898
898
|
"aa",
|
|
899
899
|
"ab",
|
|
900
900
|
"ae",
|
|
@@ -1079,37 +1079,42 @@ const hs = [
|
|
|
1079
1079
|
"za",
|
|
1080
1080
|
"zh",
|
|
1081
1081
|
"zu"
|
|
1082
|
-
],
|
|
1083
|
-
|
|
1082
|
+
], ys = [...gs, ...ps];
|
|
1083
|
+
let W;
|
|
1084
|
+
function Qe(s, e) {
|
|
1085
|
+
return !s || (s == null ? void 0 : s.toLocaleLowerCase()) === e.toLocaleLowerCase();
|
|
1086
|
+
}
|
|
1087
|
+
function Gn(s) {
|
|
1084
1088
|
function e(n, o) {
|
|
1085
1089
|
return h(() => {
|
|
1086
|
-
const i =
|
|
1090
|
+
const i = ge(o), r = ge(n);
|
|
1087
1091
|
try {
|
|
1088
|
-
|
|
1092
|
+
if (!i || !r)
|
|
1093
|
+
return r;
|
|
1094
|
+
(!W || i !== W.resolvedOptions().locale) && (W = new Intl.DisplayNames([i], { type: "language" }));
|
|
1095
|
+
const a = W.of(r);
|
|
1096
|
+
return !a || Qe(a, r) ? void 0 : a;
|
|
1089
1097
|
} catch {
|
|
1090
|
-
return r;
|
|
1098
|
+
return console.error("Error getting language display name", { resolvedLocale: i, resolvedIsoCode: r }), r;
|
|
1091
1099
|
}
|
|
1092
1100
|
});
|
|
1093
1101
|
}
|
|
1094
1102
|
function t(n) {
|
|
1095
1103
|
return h(() => {
|
|
1096
|
-
const o =
|
|
1097
|
-
|
|
1098
|
-
return [];
|
|
1099
|
-
const i = new Intl.DisplayNames([o], {
|
|
1104
|
+
const o = ge(n);
|
|
1105
|
+
return o ? ((!W || o !== W.resolvedOptions().locale) && (W = new Intl.DisplayNames([o], {
|
|
1100
1106
|
type: "language"
|
|
1101
|
-
})
|
|
1102
|
-
return ps.map((r) => {
|
|
1107
|
+
})), ys.map((i) => {
|
|
1103
1108
|
try {
|
|
1104
|
-
const
|
|
1105
|
-
return !
|
|
1106
|
-
language:
|
|
1107
|
-
code:
|
|
1109
|
+
const r = W == null ? void 0 : W.of(i);
|
|
1110
|
+
return !r || Qe(r, i) ? void 0 : {
|
|
1111
|
+
language: r,
|
|
1112
|
+
code: i
|
|
1108
1113
|
};
|
|
1109
1114
|
} catch {
|
|
1110
1115
|
return;
|
|
1111
1116
|
}
|
|
1112
|
-
}).filter(Boolean);
|
|
1117
|
+
}).filter(Boolean)) : [];
|
|
1113
1118
|
});
|
|
1114
1119
|
}
|
|
1115
1120
|
return {
|
|
@@ -1117,15 +1122,15 @@ function Zn(s) {
|
|
|
1117
1122
|
getAllLanguageDisplayNames: (n) => t(n || s)
|
|
1118
1123
|
};
|
|
1119
1124
|
}
|
|
1120
|
-
function
|
|
1125
|
+
function wt(s) {
|
|
1121
1126
|
const e = s.join(", ").match(/\b\w+\b/g);
|
|
1122
1127
|
return e ? e.length : 0;
|
|
1123
1128
|
}
|
|
1124
|
-
function
|
|
1125
|
-
const t =
|
|
1129
|
+
function bs(s, e = 150) {
|
|
1130
|
+
const t = wt([s]);
|
|
1126
1131
|
return Math.ceil(t / e);
|
|
1127
1132
|
}
|
|
1128
|
-
function
|
|
1133
|
+
function Qn(s) {
|
|
1129
1134
|
const e = h(
|
|
1130
1135
|
() => {
|
|
1131
1136
|
var r;
|
|
@@ -1144,7 +1149,7 @@ function Xn(s) {
|
|
|
1144
1149
|
return u.textContent;
|
|
1145
1150
|
}
|
|
1146
1151
|
return typeof s.content == "string" ? s.content : (l = s.content) == null ? void 0 : l.value;
|
|
1147
|
-
}), o = h(() =>
|
|
1152
|
+
}), o = h(() => bs(n.value, e.value)), i = h(() => wt([n.value]));
|
|
1148
1153
|
return {
|
|
1149
1154
|
content: n,
|
|
1150
1155
|
wordCount: i,
|
|
@@ -1152,7 +1157,7 @@ function Xn(s) {
|
|
|
1152
1157
|
duration: o
|
|
1153
1158
|
};
|
|
1154
1159
|
}
|
|
1155
|
-
const
|
|
1160
|
+
const ws = {
|
|
1156
1161
|
removeAccents: !0,
|
|
1157
1162
|
caseSensitive: !1,
|
|
1158
1163
|
replaceSpaces: !0,
|
|
@@ -1162,8 +1167,8 @@ const ys = {
|
|
|
1162
1167
|
removeNumbers: !1,
|
|
1163
1168
|
customNormalizationForms: ["NFC", "NFKD"]
|
|
1164
1169
|
};
|
|
1165
|
-
function
|
|
1166
|
-
const t = { ...
|
|
1170
|
+
function Je(s, e) {
|
|
1171
|
+
const t = { ...ws, ...e }, n = {
|
|
1167
1172
|
À: "A",
|
|
1168
1173
|
Á: "A",
|
|
1169
1174
|
Â: "A",
|
|
@@ -1218,7 +1223,7 @@ function Ge(s, e) {
|
|
|
1218
1223
|
o = o.normalize(i);
|
|
1219
1224
|
return o;
|
|
1220
1225
|
}
|
|
1221
|
-
function
|
|
1226
|
+
function Es(s, e) {
|
|
1222
1227
|
const t = s.length, n = e.length, o = [];
|
|
1223
1228
|
for (let i = 0; i <= t; i++)
|
|
1224
1229
|
o[i] = [i];
|
|
@@ -1235,34 +1240,34 @@ function bs(s, e) {
|
|
|
1235
1240
|
}
|
|
1236
1241
|
return o[t][n];
|
|
1237
1242
|
}
|
|
1238
|
-
function
|
|
1239
|
-
const t =
|
|
1243
|
+
function Et(s, e) {
|
|
1244
|
+
const t = Es(s, e), n = Math.max(s.length, e.length);
|
|
1240
1245
|
return 1 - t / n;
|
|
1241
1246
|
}
|
|
1242
|
-
function
|
|
1243
|
-
return
|
|
1247
|
+
function Ts(s, e, t = 0.75) {
|
|
1248
|
+
return Et(s, e) >= t;
|
|
1244
1249
|
}
|
|
1245
|
-
function
|
|
1250
|
+
function Jn(s, e, t = 0.75) {
|
|
1246
1251
|
const n = h(
|
|
1247
|
-
() =>
|
|
1252
|
+
() => Je(typeof s == "string" ? s : s.value)
|
|
1248
1253
|
), o = h(
|
|
1249
|
-
() =>
|
|
1250
|
-
), i = h(() => typeof t == "number" ? t : t.value), r = h(() =>
|
|
1254
|
+
() => Je(typeof e == "string" ? e : e.value)
|
|
1255
|
+
), i = h(() => typeof t == "number" ? t : t.value), r = h(() => Et(n.value, o.value));
|
|
1251
1256
|
return {
|
|
1252
1257
|
isMatching: h(
|
|
1253
|
-
() =>
|
|
1258
|
+
() => Ts(n.value, o.value, i.value)
|
|
1254
1259
|
),
|
|
1255
1260
|
score: r
|
|
1256
1261
|
};
|
|
1257
1262
|
}
|
|
1258
|
-
const
|
|
1263
|
+
const zs = {
|
|
1259
1264
|
preventDefaultOnTouchMove: !1,
|
|
1260
1265
|
preventDefaultOnMouseWheel: !1,
|
|
1261
1266
|
threshold: 50,
|
|
1262
1267
|
immediate: !1,
|
|
1263
1268
|
triggerOnEnd: !1
|
|
1264
1269
|
};
|
|
1265
|
-
class
|
|
1270
|
+
class Ls {
|
|
1266
1271
|
constructor(e) {
|
|
1267
1272
|
c(this, "element");
|
|
1268
1273
|
c(this, "xStart");
|
|
@@ -1278,7 +1283,7 @@ class zs {
|
|
|
1278
1283
|
c(this, "start");
|
|
1279
1284
|
c(this, "stop");
|
|
1280
1285
|
c(this, "options");
|
|
1281
|
-
this.inputOption = e, this.options = { ...
|
|
1286
|
+
this.inputOption = e, this.options = { ...zs, ...e }, this.onToucheStartCallback = this.toucheStartHandler.bind(this), this.onToucheMoveCallback = this.handleTouchMove.bind(this), this.onToucheEndCallback = this.handleTouchEnd.bind(this), this.onMouseWheelCallback = this.handleMouseWheel.bind(this), this.start = this.startListening.bind(this), this.stop = this.stopListening.bind(this), this.options.element && this.setElement(this.options.element), this.options.immediate && this.start();
|
|
1282
1287
|
}
|
|
1283
1288
|
startListening() {
|
|
1284
1289
|
this.setElement(this.options.element), this.element.addEventListener("touchstart", this.onToucheStartCallback, { passive: !0 }), this.element.addEventListener("touchmove", this.onToucheMoveCallback, { passive: !0 }), this.options.triggerOnEnd && this.element.addEventListener("touchend", this.onToucheEndCallback, { passive: !0 }), this.options.preventDefaultOnMouseWheel && this.element.addEventListener("mousewheel", this.onMouseWheelCallback, { passive: !1 });
|
|
@@ -1334,8 +1339,8 @@ class zs {
|
|
|
1334
1339
|
this.xStart = void 0, this.yStart = void 0, this.xEnd = void 0, this.yEnd = void 0, this.xDiff = void 0, this.yDiff = void 0, this.emitValuesChanged();
|
|
1335
1340
|
}
|
|
1336
1341
|
}
|
|
1337
|
-
function
|
|
1338
|
-
const e = b(), t = b(), n = b(), o = b(), i = b(), r = b(), a = h(() =>
|
|
1342
|
+
function eo(s) {
|
|
1343
|
+
const e = b(), t = b(), n = b(), o = b(), i = b(), r = b(), a = h(() => ge(s.element)), l = new Ls({
|
|
1339
1344
|
...s,
|
|
1340
1345
|
element: a.value,
|
|
1341
1346
|
onValuesChanged(u) {
|
|
@@ -1355,7 +1360,7 @@ function Qn(s) {
|
|
|
1355
1360
|
stop: l.stop
|
|
1356
1361
|
};
|
|
1357
1362
|
}
|
|
1358
|
-
const
|
|
1363
|
+
const ks = {
|
|
1359
1364
|
darkClass: "dark",
|
|
1360
1365
|
lightClass: "light",
|
|
1361
1366
|
storageThemeKey: "theme",
|
|
@@ -1363,8 +1368,8 @@ const Ts = {
|
|
|
1363
1368
|
storageThemeValueLight: "light",
|
|
1364
1369
|
storageThemeValueSystem: "system",
|
|
1365
1370
|
watchChanges: !0
|
|
1366
|
-
},
|
|
1367
|
-
function
|
|
1371
|
+
}, Te = b("system"), Y = b("system");
|
|
1372
|
+
function et() {
|
|
1368
1373
|
return window.matchMedia("(prefers-color-scheme: dark)").matches;
|
|
1369
1374
|
}
|
|
1370
1375
|
function ze({
|
|
@@ -1375,9 +1380,9 @@ function ze({
|
|
|
1375
1380
|
setLocalStorageValue: o = !0,
|
|
1376
1381
|
setSelectedTheme: i = !0
|
|
1377
1382
|
}) {
|
|
1378
|
-
F() && (document.documentElement.classList.remove(e), document.documentElement.classList.add(s),
|
|
1383
|
+
F() && (document.documentElement.classList.remove(e), document.documentElement.classList.add(s), Te.value = n, i && (Y.value = n), o && (localStorage[t] = n));
|
|
1379
1384
|
}
|
|
1380
|
-
function
|
|
1385
|
+
function Le({
|
|
1381
1386
|
darkClass: s,
|
|
1382
1387
|
lightClass: e,
|
|
1383
1388
|
storageThemeKey: t,
|
|
@@ -1385,16 +1390,16 @@ function Te({
|
|
|
1385
1390
|
setLocalStorageValue: o = !0,
|
|
1386
1391
|
setSelectedTheme: i = !0
|
|
1387
1392
|
}) {
|
|
1388
|
-
F() && (document.documentElement.classList.remove(s), document.documentElement.classList.add(e),
|
|
1393
|
+
F() && (document.documentElement.classList.remove(s), document.documentElement.classList.add(e), Te.value = n, i && (Y.value = n), o && (localStorage[t] = n));
|
|
1389
1394
|
}
|
|
1390
|
-
function
|
|
1395
|
+
function Tt({
|
|
1391
1396
|
setLocalStorageValue: s = !0,
|
|
1392
1397
|
...e
|
|
1393
1398
|
}) {
|
|
1394
1399
|
if (F())
|
|
1395
|
-
return document.documentElement.classList.remove(e.darkClass), document.documentElement.classList.remove(e.lightClass),
|
|
1400
|
+
return document.documentElement.classList.remove(e.darkClass), document.documentElement.classList.remove(e.lightClass), Te.value = e.storageThemeValueSystem, Y.value = e.storageThemeValueSystem, s && (localStorage[e.storageThemeKey] = e.storageThemeValueSystem), qe(e);
|
|
1396
1401
|
}
|
|
1397
|
-
function
|
|
1402
|
+
function zt(s) {
|
|
1398
1403
|
if (!s.defaultTheme)
|
|
1399
1404
|
return console.error("[maz-ui](useThemeHandler) No default theme set");
|
|
1400
1405
|
if (!["light", "dark"].includes(s.defaultTheme))
|
|
@@ -1407,75 +1412,75 @@ function Et(s) {
|
|
|
1407
1412
|
setSelectedTheme: !0
|
|
1408
1413
|
});
|
|
1409
1414
|
case "light":
|
|
1410
|
-
return
|
|
1415
|
+
return Le({
|
|
1411
1416
|
...s,
|
|
1412
1417
|
setLocalStorageValue: !1,
|
|
1413
1418
|
setSelectedTheme: !0
|
|
1414
1419
|
});
|
|
1415
1420
|
}
|
|
1416
1421
|
}
|
|
1417
|
-
function
|
|
1418
|
-
return F() ? !localStorage[s.storageThemeKey] && s.defaultTheme ?
|
|
1422
|
+
function qe(s) {
|
|
1423
|
+
return F() ? !localStorage[s.storageThemeKey] && s.defaultTheme ? zt(s) : localStorage[s.storageThemeKey] === s.storageThemeValueDark || !localStorage[s.storageThemeKey] && et() || localStorage[s.storageThemeKey] === s.storageThemeValueSystem && et() ? ze({
|
|
1419
1424
|
...s,
|
|
1420
1425
|
setLocalStorageValue: !1,
|
|
1421
1426
|
setSelectedTheme: !1
|
|
1422
|
-
}) :
|
|
1427
|
+
}) : Le({
|
|
1423
1428
|
...s,
|
|
1424
1429
|
setLocalStorageValue: !1,
|
|
1425
1430
|
setSelectedTheme: !1
|
|
1426
1431
|
}) : void 0;
|
|
1427
1432
|
}
|
|
1428
|
-
function
|
|
1433
|
+
function Fe({
|
|
1429
1434
|
theme: s,
|
|
1430
1435
|
...e
|
|
1431
1436
|
}) {
|
|
1432
|
-
return s === "system" ?
|
|
1437
|
+
return s === "system" ? Tt(e) : s === "dark" ? ze(e) : Le(e);
|
|
1433
1438
|
}
|
|
1434
|
-
function
|
|
1435
|
-
return
|
|
1439
|
+
function Cs(s) {
|
|
1440
|
+
return Te.value === s.storageThemeValueDark ? Le(s) : ze(s);
|
|
1436
1441
|
}
|
|
1437
|
-
function
|
|
1442
|
+
function to(s) {
|
|
1438
1443
|
const e = {
|
|
1439
|
-
...
|
|
1444
|
+
...ks,
|
|
1440
1445
|
...s
|
|
1441
1446
|
};
|
|
1442
1447
|
function t() {
|
|
1443
|
-
|
|
1448
|
+
qe(e);
|
|
1444
1449
|
}
|
|
1445
|
-
return
|
|
1446
|
-
localStorage[e.storageThemeKey] && (
|
|
1447
|
-
}),
|
|
1450
|
+
return ce(() => {
|
|
1451
|
+
localStorage[e.storageThemeKey] && (Y.value = localStorage[e.storageThemeKey]), e.watchChanges && window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change", t);
|
|
1452
|
+
}), lt(() => {
|
|
1448
1453
|
e.watchChanges && window.matchMedia("(prefers-color-scheme: dark)").removeEventListener("change", t);
|
|
1449
|
-
}),
|
|
1454
|
+
}), G(Y, (n) => {
|
|
1450
1455
|
switch (localStorage[e.storageThemeKey] = n, n) {
|
|
1451
1456
|
case e.storageThemeValueDark: {
|
|
1452
1457
|
ze(e);
|
|
1453
1458
|
break;
|
|
1454
1459
|
}
|
|
1455
1460
|
case e.storageThemeValueLight: {
|
|
1456
|
-
|
|
1461
|
+
Le(e);
|
|
1457
1462
|
break;
|
|
1458
1463
|
}
|
|
1459
1464
|
case e.storageThemeValueSystem: {
|
|
1460
|
-
|
|
1465
|
+
Tt(e);
|
|
1461
1466
|
break;
|
|
1462
1467
|
}
|
|
1463
1468
|
}
|
|
1464
1469
|
}), {
|
|
1465
|
-
autoSetTheme: () =>
|
|
1466
|
-
toggleTheme: () =>
|
|
1467
|
-
setSystemTheme: () =>
|
|
1468
|
-
setDarkTheme: () =>
|
|
1469
|
-
setLightTheme: () =>
|
|
1470
|
-
setDefaultTheme: () =>
|
|
1471
|
-
hasDarkTheme: h(() =>
|
|
1472
|
-
hasLightTheme: h(() =>
|
|
1473
|
-
hasSystemTheme: h(() =>
|
|
1474
|
-
theme:
|
|
1475
|
-
selectedTheme:
|
|
1470
|
+
autoSetTheme: () => qe(e),
|
|
1471
|
+
toggleTheme: () => Cs(e),
|
|
1472
|
+
setSystemTheme: () => Fe({ ...e, theme: "system" }),
|
|
1473
|
+
setDarkTheme: () => Fe({ ...e, theme: "dark" }),
|
|
1474
|
+
setLightTheme: () => Fe({ ...e, theme: "light" }),
|
|
1475
|
+
setDefaultTheme: () => zt(e),
|
|
1476
|
+
hasDarkTheme: h(() => Y.value === e.storageThemeValueDark),
|
|
1477
|
+
hasLightTheme: h(() => Y.value === e.storageThemeValueLight),
|
|
1478
|
+
hasSystemTheme: h(() => Y.value === e.storageThemeValueSystem),
|
|
1479
|
+
theme: Te,
|
|
1480
|
+
selectedTheme: Y
|
|
1476
1481
|
};
|
|
1477
1482
|
}
|
|
1478
|
-
function
|
|
1483
|
+
function Is({ timeout: s = 1e3, callback: e, remainingTimeUpdate: t = 200, callbackOffsetTime: n = 0 }) {
|
|
1479
1484
|
const o = b(s), i = b(s);
|
|
1480
1485
|
let r;
|
|
1481
1486
|
function a(w) {
|
|
@@ -1483,7 +1488,7 @@ function ks({ timeout: s = 1e3, callback: e, remainingTimeUpdate: t = 200, callb
|
|
|
1483
1488
|
}
|
|
1484
1489
|
function l() {
|
|
1485
1490
|
r || (r = setInterval(() => {
|
|
1486
|
-
i.value -= t, i.value <= 0 && (
|
|
1491
|
+
i.value -= t, i.value <= 0 && (T(), setTimeout(() => e == null ? void 0 : e(), n));
|
|
1487
1492
|
}, t));
|
|
1488
1493
|
}
|
|
1489
1494
|
function u() {
|
|
@@ -1492,7 +1497,7 @@ function ks({ timeout: s = 1e3, callback: e, remainingTimeUpdate: t = 200, callb
|
|
|
1492
1497
|
function y() {
|
|
1493
1498
|
!r && i.value > 0 && l();
|
|
1494
1499
|
}
|
|
1495
|
-
function
|
|
1500
|
+
function T() {
|
|
1496
1501
|
setTimeout(() => i.value = o.value, n * 2), u();
|
|
1497
1502
|
}
|
|
1498
1503
|
return {
|
|
@@ -1500,13 +1505,13 @@ function ks({ timeout: s = 1e3, callback: e, remainingTimeUpdate: t = 200, callb
|
|
|
1500
1505
|
start: a,
|
|
1501
1506
|
pause: u,
|
|
1502
1507
|
resume: y,
|
|
1503
|
-
stop:
|
|
1508
|
+
stop: T
|
|
1504
1509
|
};
|
|
1505
1510
|
}
|
|
1506
|
-
function
|
|
1507
|
-
return
|
|
1511
|
+
function so() {
|
|
1512
|
+
return Pe("toast");
|
|
1508
1513
|
}
|
|
1509
|
-
class
|
|
1514
|
+
class As {
|
|
1510
1515
|
constructor(e, t) {
|
|
1511
1516
|
c(this, "eventHandlerFunction");
|
|
1512
1517
|
c(this, "event", "visibilitychange");
|
|
@@ -1552,62 +1557,62 @@ class Cs {
|
|
|
1552
1557
|
this.removeEventListener(), this.timeoutHandler && clearTimeout(this.timeoutHandler);
|
|
1553
1558
|
}
|
|
1554
1559
|
}
|
|
1555
|
-
function
|
|
1560
|
+
function no({
|
|
1556
1561
|
callback: s,
|
|
1557
1562
|
options: e
|
|
1558
1563
|
}) {
|
|
1559
|
-
return new
|
|
1564
|
+
return new As(s, e);
|
|
1560
1565
|
}
|
|
1561
|
-
function
|
|
1562
|
-
return
|
|
1566
|
+
function oo() {
|
|
1567
|
+
return Pe("wait");
|
|
1563
1568
|
}
|
|
1564
|
-
const
|
|
1565
|
-
function
|
|
1569
|
+
const De = "__maz-click-outside__";
|
|
1570
|
+
function Lt() {
|
|
1566
1571
|
return document.ontouchstart === null ? "touchstart" : "click";
|
|
1567
1572
|
}
|
|
1568
|
-
async function
|
|
1573
|
+
async function kt(s, e) {
|
|
1569
1574
|
try {
|
|
1570
|
-
|
|
1575
|
+
Ct(s);
|
|
1571
1576
|
const t = e.instance, n = e.value, o = typeof n == "function";
|
|
1572
1577
|
if (!o)
|
|
1573
1578
|
throw new Error("[maz-ui](vClickOutside) the callback should be a function");
|
|
1574
|
-
await
|
|
1579
|
+
await le(), s[De] = (r) => {
|
|
1575
1580
|
if ((!s || r.target && !s.contains(r.target)) && n && o)
|
|
1576
1581
|
return n.call(t, r);
|
|
1577
1582
|
};
|
|
1578
|
-
const i =
|
|
1579
|
-
document.addEventListener(i, s[
|
|
1583
|
+
const i = Lt();
|
|
1584
|
+
document.addEventListener(i, s[De], { passive: !0 });
|
|
1580
1585
|
} catch (t) {
|
|
1581
1586
|
console.error("[maz-ui](vClickOutside)", t);
|
|
1582
1587
|
}
|
|
1583
1588
|
}
|
|
1584
|
-
function
|
|
1589
|
+
function Ct(s) {
|
|
1585
1590
|
try {
|
|
1586
|
-
const e =
|
|
1587
|
-
document.removeEventListener(e, s[
|
|
1591
|
+
const e = Lt();
|
|
1592
|
+
document.removeEventListener(e, s[De], !1), delete s[De];
|
|
1588
1593
|
} catch (e) {
|
|
1589
1594
|
console.error("[maz-ui](vClickOutside)", e);
|
|
1590
1595
|
}
|
|
1591
1596
|
}
|
|
1592
|
-
function
|
|
1597
|
+
function Ss(s, e) {
|
|
1593
1598
|
try {
|
|
1594
1599
|
if (e.value === e.oldValue)
|
|
1595
1600
|
return;
|
|
1596
|
-
|
|
1601
|
+
kt(s, e);
|
|
1597
1602
|
} catch (t) {
|
|
1598
1603
|
console.error("[maz-ui](vClickOutside)", t);
|
|
1599
1604
|
}
|
|
1600
1605
|
}
|
|
1601
|
-
const
|
|
1602
|
-
mounted:
|
|
1603
|
-
updated:
|
|
1604
|
-
unmounted:
|
|
1605
|
-
},
|
|
1606
|
+
const xs = {
|
|
1607
|
+
mounted: kt,
|
|
1608
|
+
updated: Ss,
|
|
1609
|
+
unmounted: Ct
|
|
1610
|
+
}, Os = {
|
|
1606
1611
|
install: (s) => {
|
|
1607
|
-
s.directive("click-outside",
|
|
1612
|
+
s.directive("click-outside", xs);
|
|
1608
1613
|
}
|
|
1609
1614
|
};
|
|
1610
|
-
function
|
|
1615
|
+
function It(s, e, t) {
|
|
1611
1616
|
var r, a;
|
|
1612
1617
|
s.stopPropagation();
|
|
1613
1618
|
const n = typeof t.value == "function" ? t.value : t.value.handler, o = typeof t.value == "object" ? t.value.exclude : void 0;
|
|
@@ -1621,36 +1626,36 @@ function kt(s, e, t) {
|
|
|
1621
1626
|
}
|
|
1622
1627
|
!e.contains(s.target) && !i && (n == null || n(s));
|
|
1623
1628
|
}
|
|
1624
|
-
function
|
|
1629
|
+
function At() {
|
|
1625
1630
|
return document.ontouchstart === null ? "touchstart" : "click";
|
|
1626
1631
|
}
|
|
1627
|
-
function
|
|
1628
|
-
const t =
|
|
1629
|
-
document.removeEventListener(t, (n) =>
|
|
1632
|
+
function Ds(s, e) {
|
|
1633
|
+
const t = At();
|
|
1634
|
+
document.removeEventListener(t, (n) => It(n, s, e));
|
|
1630
1635
|
}
|
|
1631
|
-
function
|
|
1636
|
+
function Ps(s, e) {
|
|
1632
1637
|
if (typeof e.value != "function" && typeof e.value == "object" && typeof e.value.handler != "function") {
|
|
1633
1638
|
console.error("[maz-ui](vClosable) v-closable directive requires a handler function");
|
|
1634
1639
|
return;
|
|
1635
1640
|
}
|
|
1636
|
-
const t =
|
|
1637
|
-
document.addEventListener(t, (n) =>
|
|
1641
|
+
const t = At();
|
|
1642
|
+
document.addEventListener(t, (n) => It(n, s, e));
|
|
1638
1643
|
}
|
|
1639
|
-
const
|
|
1640
|
-
mounted:
|
|
1641
|
-
unmounted:
|
|
1642
|
-
},
|
|
1644
|
+
const Ms = {
|
|
1645
|
+
mounted: Ps,
|
|
1646
|
+
unmounted: Ds
|
|
1647
|
+
}, $s = {
|
|
1643
1648
|
install: (s) => {
|
|
1644
|
-
s.directive("closable",
|
|
1649
|
+
s.directive("closable", Ms);
|
|
1645
1650
|
}
|
|
1646
|
-
},
|
|
1651
|
+
}, Ue = {
|
|
1647
1652
|
position: "top"
|
|
1648
1653
|
};
|
|
1649
|
-
class
|
|
1654
|
+
class St {
|
|
1650
1655
|
constructor(e = {}) {
|
|
1651
1656
|
c(this, "options");
|
|
1652
1657
|
this.options = {
|
|
1653
|
-
...
|
|
1658
|
+
...Ue,
|
|
1654
1659
|
...e
|
|
1655
1660
|
};
|
|
1656
1661
|
}
|
|
@@ -1683,24 +1688,24 @@ class It {
|
|
|
1683
1688
|
e.removeAttribute("data-tooltip"), e.classList.remove("m-tooltip"), e.classList.remove("m-tooltip--top"), e.classList.remove("m-tooltip--bottom"), e.classList.remove("m-tooltip--left"), e.classList.remove("m-tooltip--right"), e.classList.remove("m-tooltip--open"), e.classList.remove(`m-tooltip--${this.getColor(t)}`);
|
|
1684
1689
|
}
|
|
1685
1690
|
}
|
|
1686
|
-
let
|
|
1687
|
-
const
|
|
1691
|
+
let Ae;
|
|
1692
|
+
const io = {
|
|
1688
1693
|
beforeMount(s, e) {
|
|
1689
1694
|
const t = typeof e.value == "object" ? e.value : {};
|
|
1690
|
-
return
|
|
1695
|
+
return Ae = new St(t), Ae.create(s, e);
|
|
1691
1696
|
},
|
|
1692
1697
|
updated(s, e) {
|
|
1693
|
-
return
|
|
1698
|
+
return Ae.update(s, e);
|
|
1694
1699
|
},
|
|
1695
1700
|
unmounted(s, e) {
|
|
1696
|
-
return
|
|
1701
|
+
return Ae.remove(s, e);
|
|
1697
1702
|
}
|
|
1698
|
-
},
|
|
1699
|
-
install: (s, e =
|
|
1703
|
+
}, Vs = {
|
|
1704
|
+
install: (s, e = Ue) => {
|
|
1700
1705
|
const t = {
|
|
1701
|
-
...
|
|
1706
|
+
...Ue,
|
|
1702
1707
|
...e
|
|
1703
|
-
}, n = new
|
|
1708
|
+
}, n = new St(t);
|
|
1704
1709
|
s.directive("tooltip", {
|
|
1705
1710
|
beforeMount: n.create.bind(n),
|
|
1706
1711
|
updated: n.update.bind(n),
|
|
@@ -1708,28 +1713,28 @@ const no = {
|
|
|
1708
1713
|
});
|
|
1709
1714
|
}
|
|
1710
1715
|
};
|
|
1711
|
-
function
|
|
1716
|
+
function Ke(s, e) {
|
|
1712
1717
|
let t = e == null ? void 0 : e.element;
|
|
1713
1718
|
function n() {
|
|
1714
|
-
t &&
|
|
1719
|
+
t && Ie(null, t);
|
|
1715
1720
|
}
|
|
1716
|
-
const o = { ...e == null ? void 0 : e.props, ...e != null && e.addDestroyInProps ? { destroy: n } : {} }, i =
|
|
1721
|
+
const o = { ...e == null ? void 0 : e.props, ...e != null && e.addDestroyInProps ? { destroy: n } : {} }, i = ee(
|
|
1717
1722
|
s,
|
|
1718
1723
|
o,
|
|
1719
1724
|
e == null ? void 0 : e.children
|
|
1720
1725
|
);
|
|
1721
|
-
return e != null && e.app ? (i.appContext = e.app._context, t ?
|
|
1726
|
+
return e != null && e.app ? (i.appContext = e.app._context, t ? Ie(i, t) : typeof document < "u" && (t = document.createElement("div"), Ie(i, t))) : (t = t ?? document.body, Ie(i, t)), { vNode: i, destroy: n, el: t };
|
|
1722
1727
|
}
|
|
1723
|
-
function
|
|
1728
|
+
function Hs(s) {
|
|
1724
1729
|
return !!s;
|
|
1725
1730
|
}
|
|
1726
|
-
function
|
|
1731
|
+
function ro(s) {
|
|
1727
1732
|
return [...s].map((e) => {
|
|
1728
1733
|
const t = e.codePointAt(0);
|
|
1729
1734
|
return t ? t % 32 + 127461 : void 0;
|
|
1730
|
-
}).filter(
|
|
1735
|
+
}).filter(Hs).map((e) => String.fromCodePoint(e)).join("");
|
|
1731
1736
|
}
|
|
1732
|
-
function
|
|
1737
|
+
function ao(s, e) {
|
|
1733
1738
|
let t;
|
|
1734
1739
|
return function(...n) {
|
|
1735
1740
|
clearTimeout(t), t = setTimeout(() => {
|
|
@@ -1737,7 +1742,7 @@ function io(s, e) {
|
|
|
1737
1742
|
}, e);
|
|
1738
1743
|
};
|
|
1739
1744
|
}
|
|
1740
|
-
class
|
|
1745
|
+
class lo {
|
|
1741
1746
|
constructor({ src: e, identifier: t, once: n = !0, async: o = !0, defer: i = !0 }) {
|
|
1742
1747
|
c(this, "src");
|
|
1743
1748
|
c(this, "script");
|
|
@@ -1778,10 +1783,10 @@ class ro {
|
|
|
1778
1783
|
});
|
|
1779
1784
|
}
|
|
1780
1785
|
}
|
|
1781
|
-
function
|
|
1786
|
+
function Bs(s) {
|
|
1782
1787
|
return new Promise((e) => setTimeout(e, s));
|
|
1783
1788
|
}
|
|
1784
|
-
function
|
|
1789
|
+
function uo(s, e) {
|
|
1785
1790
|
let t = !1, n, o;
|
|
1786
1791
|
return function(...i) {
|
|
1787
1792
|
t ? (clearTimeout(n), n = setTimeout(() => {
|
|
@@ -1789,7 +1794,7 @@ function ao(s, e) {
|
|
|
1789
1794
|
}, Math.max(e - (Date.now() - o), 0))) : (s.apply(this, i), o = Date.now(), t = !0);
|
|
1790
1795
|
};
|
|
1791
1796
|
}
|
|
1792
|
-
const
|
|
1797
|
+
const Ns = ["onKeypress"], Fs = { class: "m-fullscreen-img-scroller" }, js = ["src", "alt"], qs = /* @__PURE__ */ be({
|
|
1793
1798
|
__name: "MazFullscreenImg",
|
|
1794
1799
|
props: {
|
|
1795
1800
|
src: {},
|
|
@@ -1807,19 +1812,19 @@ const Hs = ["onKeypress"], Bs = { class: "m-fullscreen-img-scroller" }, Ns = ["s
|
|
|
1807
1812
|
},
|
|
1808
1813
|
emits: ["close", "previous", "next", "before-close"],
|
|
1809
1814
|
setup(s, { emit: e }) {
|
|
1810
|
-
const t = s, n = e, o = H(() => import("./MazSpinner-
|
|
1815
|
+
const t = s, n = e, o = H(() => import("./MazSpinner-Nh0AFsXz.mjs")), i = H(() => import("./x-mark-CnZwVvA7.mjs")), r = H(() => import("./chevron-left-BqVOLRdC.mjs")), a = b(!1), l = b(!1), u = b(!1), y = b(!1), T = b(!1), w = Ft({
|
|
1811
1816
|
running: !1,
|
|
1812
1817
|
ended: !1
|
|
1813
|
-
}), f = b(t.clickedElement), k = h(() => t.clickedElement.getBoundingClientRect()),
|
|
1814
|
-
"--is-zoomed":
|
|
1818
|
+
}), f = b(t.clickedElement), k = h(() => t.clickedElement.getBoundingClientRect()), z = b(), m = b(t.src), d = b(t.alt), C = b(), p = b(), S = b(!0), D = h(() => ({
|
|
1819
|
+
"--is-zoomed": T.value,
|
|
1815
1820
|
"--invisible": S.value,
|
|
1816
|
-
"--absolute": !
|
|
1821
|
+
"--absolute": !T.value
|
|
1817
1822
|
}));
|
|
1818
1823
|
function L() {
|
|
1819
1824
|
var g, E;
|
|
1820
|
-
p.value && (
|
|
1825
|
+
p.value && (z.value = ((g = p.value) == null ? void 0 : g.naturalWidth) > ((E = p.value) == null ? void 0 : E.naturalHeight)), a.value = !0, l.value = !1, u.value = !0;
|
|
1821
1826
|
}
|
|
1822
|
-
|
|
1827
|
+
G(
|
|
1823
1828
|
u,
|
|
1824
1829
|
(g) => {
|
|
1825
1830
|
g && x();
|
|
@@ -1830,34 +1835,34 @@ const Hs = ["onKeypress"], Bs = { class: "m-fullscreen-img-scroller" }, Ns = ["s
|
|
|
1830
1835
|
n("before-close"), M();
|
|
1831
1836
|
}
|
|
1832
1837
|
function j(g) {
|
|
1833
|
-
g.key === "Escape" && (g.preventDefault(), P()), (g.key === "ArrowLeft" || g.key === "ArrowRight") && (g.preventDefault(),
|
|
1838
|
+
g.key === "Escape" && (g.preventDefault(), P()), (g.key === "ArrowLeft" || g.key === "ArrowRight") && (g.preventDefault(), fe(g.key === "ArrowRight" ? "next" : "previous"));
|
|
1834
1839
|
}
|
|
1835
|
-
function
|
|
1840
|
+
function ne() {
|
|
1836
1841
|
document.documentElement.classList.add("--m-fullscreen-open");
|
|
1837
1842
|
}
|
|
1838
|
-
function
|
|
1843
|
+
function Q() {
|
|
1839
1844
|
document.documentElement.classList.remove("--m-fullscreen-open");
|
|
1840
1845
|
}
|
|
1841
|
-
function
|
|
1846
|
+
function de() {
|
|
1842
1847
|
return [...document.querySelectorAll(".m-fullscreen-img-instance")];
|
|
1843
1848
|
}
|
|
1844
|
-
function
|
|
1849
|
+
function $e(g, E) {
|
|
1845
1850
|
return E < 0 ? g.length - 1 : E >= g.length ? 0 : E;
|
|
1846
1851
|
}
|
|
1847
|
-
function
|
|
1852
|
+
function me(g, E) {
|
|
1848
1853
|
g.classList.remove(t.openInstanceClass), E.classList.add(t.openInstanceClass);
|
|
1849
1854
|
const I = E.getAttribute("data-src"), $ = E.getAttribute("data-alt");
|
|
1850
1855
|
d.value = $, m.value = I ?? m.value;
|
|
1851
1856
|
}
|
|
1852
|
-
function
|
|
1857
|
+
function fe(g) {
|
|
1853
1858
|
S.value = !0;
|
|
1854
1859
|
const E = document.querySelector(
|
|
1855
1860
|
`.m-fullscreen-img-instance.${t.openInstanceClass}`
|
|
1856
1861
|
);
|
|
1857
1862
|
if (E) {
|
|
1858
|
-
const I =
|
|
1859
|
-
f.value =
|
|
1860
|
-
S.value = !1,
|
|
1863
|
+
const I = de(), $ = I.indexOf(E), _ = g === "next" ? $ + 1 : $ - 1, K = I[$e(I, _)];
|
|
1864
|
+
f.value = K, K && me(E, K), n(g), a.value = !1, l.value = !0, mt(() => a.value === !0, () => {
|
|
1865
|
+
S.value = !1, T.value ? he() : v();
|
|
1861
1866
|
}, {
|
|
1862
1867
|
expectedValue: !0,
|
|
1863
1868
|
interval: 100,
|
|
@@ -1865,18 +1870,18 @@ const Hs = ["onKeypress"], Bs = { class: "m-fullscreen-img-scroller" }, Ns = ["s
|
|
|
1865
1870
|
});
|
|
1866
1871
|
}
|
|
1867
1872
|
}
|
|
1868
|
-
function
|
|
1873
|
+
function he() {
|
|
1869
1874
|
const g = p.value;
|
|
1870
1875
|
if (!g) {
|
|
1871
1876
|
console.error("[maz-ui](vFullscreenImg) ImgElement is not defined");
|
|
1872
1877
|
return;
|
|
1873
1878
|
}
|
|
1874
|
-
g.style.removeProperty("max-width"), g.style.removeProperty("max-height"), g == null || g.style.removeProperty("top"), g == null || g.style.removeProperty("left"),
|
|
1879
|
+
g.style.removeProperty("max-width"), g.style.removeProperty("max-height"), g == null || g.style.removeProperty("top"), g == null || g.style.removeProperty("left"), z.value ? (g.style.height = "100vh", g.style.removeProperty("width")) : (g.style.width = "100vw", g.style.removeProperty("height"));
|
|
1875
1880
|
}
|
|
1876
|
-
function
|
|
1877
|
-
|
|
1881
|
+
function Ve() {
|
|
1882
|
+
T.value ? (T.value = !T.value, v()) : (T.value = !T.value, he());
|
|
1878
1883
|
}
|
|
1879
|
-
function
|
|
1884
|
+
function oe(g) {
|
|
1880
1885
|
var I;
|
|
1881
1886
|
w.running = !0, S.value = !1;
|
|
1882
1887
|
const E = (I = p.value) == null ? void 0 : I.animate(g, {
|
|
@@ -1889,42 +1894,42 @@ const Hs = ["onKeypress"], Bs = { class: "m-fullscreen-img-scroller" }, Ns = ["s
|
|
|
1889
1894
|
}
|
|
1890
1895
|
return E;
|
|
1891
1896
|
}
|
|
1892
|
-
function
|
|
1893
|
-
const E = f.value.clientWidth || 1, I = f.value.clientHeight || 1, $ = window.innerWidth,
|
|
1897
|
+
function ke(g = t.offset ?? 0) {
|
|
1898
|
+
const E = f.value.clientWidth || 1, I = f.value.clientHeight || 1, $ = window.innerWidth, _ = window.innerHeight, K = Math.min(
|
|
1894
1899
|
($ - 2 * g) / E,
|
|
1895
|
-
(
|
|
1896
|
-
),
|
|
1900
|
+
(_ - 2 * g) / I
|
|
1901
|
+
), He = ($ - E * K) / 2, Be = (_ - I * K) / 2;
|
|
1897
1902
|
return {
|
|
1898
|
-
centerX:
|
|
1899
|
-
centerY:
|
|
1903
|
+
centerX: He,
|
|
1904
|
+
centerY: Be,
|
|
1900
1905
|
width: E,
|
|
1901
1906
|
height: I,
|
|
1902
|
-
scale:
|
|
1907
|
+
scale: K
|
|
1903
1908
|
};
|
|
1904
1909
|
}
|
|
1905
|
-
function
|
|
1906
|
-
const { width: E, height: I, scale: $, centerX:
|
|
1910
|
+
function Ce({ trigger: g }) {
|
|
1911
|
+
const { width: E, height: I, scale: $, centerX: _, centerY: K } = ke(), { top: He, left: Be, width: Pt, height: Mt } = k.value, Ye = [
|
|
1907
1912
|
{
|
|
1908
|
-
top: `${
|
|
1909
|
-
left: `${
|
|
1910
|
-
width: `${
|
|
1911
|
-
height: `${
|
|
1913
|
+
top: `${He}px`,
|
|
1914
|
+
left: `${Be}px`,
|
|
1915
|
+
width: `${Pt}px`,
|
|
1916
|
+
height: `${Mt}px`,
|
|
1912
1917
|
opacity: 0
|
|
1913
1918
|
},
|
|
1914
1919
|
{
|
|
1915
|
-
top: `${
|
|
1916
|
-
left: `${
|
|
1920
|
+
top: `${K}px`,
|
|
1921
|
+
left: `${_}px`,
|
|
1917
1922
|
width: `${E * $}px`,
|
|
1918
1923
|
height: `${I * $}px`,
|
|
1919
1924
|
opacity: 1
|
|
1920
1925
|
}
|
|
1921
1926
|
];
|
|
1922
1927
|
return {
|
|
1923
|
-
frames: g === "open" ?
|
|
1928
|
+
frames: g === "open" ? Ye : Ye.reverse()
|
|
1924
1929
|
};
|
|
1925
1930
|
}
|
|
1926
1931
|
function v() {
|
|
1927
|
-
const { height: g, width: E, scale: I } =
|
|
1932
|
+
const { height: g, width: E, scale: I } = ke(), $ = z.value ? {
|
|
1928
1933
|
width: `${E * I}px`,
|
|
1929
1934
|
maxHeight: `${g * I}px`
|
|
1930
1935
|
} : {
|
|
@@ -1935,12 +1940,12 @@ const Hs = ["onKeypress"], Bs = { class: "m-fullscreen-img-scroller" }, Ns = ["s
|
|
|
1935
1940
|
console.error("[maz-ui](vFullscreenImg) ImgElement is not defined");
|
|
1936
1941
|
return;
|
|
1937
1942
|
}
|
|
1938
|
-
|
|
1943
|
+
z.value ? (p.value.style.removeProperty("height"), p.value.style.removeProperty("maxHeight")) : (p.value.style.removeProperty("width"), p.value.style.removeProperty("maxWidth")), Object.assign(p.value.style, $);
|
|
1939
1944
|
}
|
|
1940
1945
|
function x() {
|
|
1941
|
-
const { frames: g } =
|
|
1946
|
+
const { frames: g } = Ce({
|
|
1942
1947
|
trigger: "open"
|
|
1943
|
-
}), E =
|
|
1948
|
+
}), E = oe(g);
|
|
1944
1949
|
if (!E) {
|
|
1945
1950
|
console.error("[maz-ui](vFullscreenImg) open animation is not defined"), v();
|
|
1946
1951
|
return;
|
|
@@ -1950,12 +1955,12 @@ const Hs = ["onKeypress"], Bs = { class: "m-fullscreen-img-scroller" }, Ns = ["s
|
|
|
1950
1955
|
};
|
|
1951
1956
|
}
|
|
1952
1957
|
function M() {
|
|
1953
|
-
const { frames: g } =
|
|
1958
|
+
const { frames: g } = Ce({
|
|
1954
1959
|
trigger: "close"
|
|
1955
|
-
}), E =
|
|
1960
|
+
}), E = oe(g);
|
|
1956
1961
|
function I() {
|
|
1957
|
-
var $,
|
|
1958
|
-
n("close"), ($ = C.value) == null || $.remove(), (
|
|
1962
|
+
var $, _;
|
|
1963
|
+
n("close"), ($ = C.value) == null || $.remove(), (_ = t.destroy) == null || _.call(t), w.running = !1, w.ended = !0;
|
|
1959
1964
|
}
|
|
1960
1965
|
if (!E) {
|
|
1961
1966
|
console.error("[maz-ui](vFullscreenImg) close animation is not defined"), I();
|
|
@@ -1963,75 +1968,75 @@ const Hs = ["onKeypress"], Bs = { class: "m-fullscreen-img-scroller" }, Ns = ["s
|
|
|
1963
1968
|
}
|
|
1964
1969
|
E.onfinish = I;
|
|
1965
1970
|
}
|
|
1966
|
-
function
|
|
1967
|
-
|
|
1971
|
+
function ve() {
|
|
1972
|
+
T.value || v();
|
|
1968
1973
|
}
|
|
1969
|
-
return
|
|
1970
|
-
l.value = !0, document.addEventListener("keydown", j), window.addEventListener("resize",
|
|
1971
|
-
}),
|
|
1972
|
-
document.removeEventListener("keydown", j), window.removeEventListener("resize",
|
|
1974
|
+
return ce(() => {
|
|
1975
|
+
l.value = !0, document.addEventListener("keydown", j), window.addEventListener("resize", ve), ne(), y.value = de().length > 1;
|
|
1976
|
+
}), lt(() => {
|
|
1977
|
+
document.removeEventListener("keydown", j), window.removeEventListener("resize", ve), Q();
|
|
1973
1978
|
}), (g, E) => (A(), U("div", {
|
|
1974
1979
|
ref_key: "FullscreenImgElement",
|
|
1975
1980
|
ref: C,
|
|
1976
1981
|
role: "button",
|
|
1977
1982
|
class: "m-fullscreen-img m-reset-css",
|
|
1978
1983
|
tabindex: "0",
|
|
1979
|
-
onClick:
|
|
1980
|
-
onKeypress:
|
|
1984
|
+
onClick: Z(P, ["stop"]),
|
|
1985
|
+
onKeypress: jt(Z(P, ["prevent"]), ["esc"])
|
|
1981
1986
|
}, [
|
|
1982
1987
|
u.value && y.value ? (A(), U("button", {
|
|
1983
1988
|
key: 0,
|
|
1984
1989
|
type: "button",
|
|
1985
1990
|
class: "m-fullscreen-btn --next",
|
|
1986
|
-
onClick: E[0] || (E[0] =
|
|
1991
|
+
onClick: E[0] || (E[0] = Z((I) => fe("next"), ["stop"]))
|
|
1987
1992
|
}, [
|
|
1988
|
-
|
|
1993
|
+
ee(O(r), { class: "maz-rotate-180" })
|
|
1989
1994
|
])) : B("v-if", !0),
|
|
1990
1995
|
u.value && y.value ? (A(), U("button", {
|
|
1991
1996
|
key: 1,
|
|
1992
1997
|
type: "button",
|
|
1993
1998
|
class: "m-fullscreen-btn --previous",
|
|
1994
|
-
onClick: E[1] || (E[1] =
|
|
1999
|
+
onClick: E[1] || (E[1] = Z((I) => fe("previous"), ["stop"]))
|
|
1995
2000
|
}, [
|
|
1996
|
-
|
|
2001
|
+
ee(O(r))
|
|
1997
2002
|
])) : B("v-if", !0),
|
|
1998
2003
|
V("button", {
|
|
1999
2004
|
type: "button",
|
|
2000
2005
|
class: "m-fullscreen-btn --close",
|
|
2001
2006
|
onClick: P
|
|
2002
2007
|
}, [
|
|
2003
|
-
|
|
2008
|
+
ee(O(i))
|
|
2004
2009
|
]),
|
|
2005
|
-
V("div",
|
|
2010
|
+
V("div", Fs, [
|
|
2006
2011
|
V("img", {
|
|
2007
2012
|
ref_key: "ImgElement",
|
|
2008
2013
|
ref: p,
|
|
2009
2014
|
src: m.value,
|
|
2010
2015
|
alt: d.value ?? void 0,
|
|
2011
2016
|
tabindex: "0",
|
|
2012
|
-
class:
|
|
2017
|
+
class: ue([D.value]),
|
|
2013
2018
|
onLoad: L,
|
|
2014
|
-
onClick: E[2] || (E[2] =
|
|
2015
|
-
}, null, 42,
|
|
2016
|
-
|
|
2019
|
+
onClick: E[2] || (E[2] = Z((I) => g.zoom && Ve(), ["stop"]))
|
|
2020
|
+
}, null, 42, js),
|
|
2021
|
+
ut(ee(
|
|
2017
2022
|
O(o),
|
|
2018
2023
|
{ class: "m-fullscreen-img-loader" },
|
|
2019
2024
|
null,
|
|
2020
2025
|
512
|
|
2021
2026
|
/* NEED_PATCH */
|
|
2022
2027
|
), [
|
|
2023
|
-
[
|
|
2028
|
+
[ct, l.value]
|
|
2024
2029
|
])
|
|
2025
2030
|
])
|
|
2026
|
-
], 40,
|
|
2031
|
+
], 40, Ns));
|
|
2027
2032
|
}
|
|
2028
|
-
}),
|
|
2033
|
+
}), Me = (s, e) => {
|
|
2029
2034
|
const t = s.__vccOpts || s;
|
|
2030
2035
|
for (const [n, o] of e)
|
|
2031
2036
|
t[n] = o;
|
|
2032
2037
|
return t;
|
|
2033
|
-
},
|
|
2034
|
-
class
|
|
2038
|
+
}, Us = /* @__PURE__ */ Me(qs, [["__scopeId", "data-v-24a18baf"]]), tt = "m-fullscreen-is-open";
|
|
2039
|
+
class Ws {
|
|
2035
2040
|
constructor() {
|
|
2036
2041
|
c(this, "options");
|
|
2037
2042
|
c(this, "defaultOptions", {
|
|
@@ -2088,10 +2093,10 @@ class qs {
|
|
|
2088
2093
|
e.removeEventListener("mouseenter", this.mouseEnterListener), e.removeEventListener("mouseleave", this.mouseLeaveListener), e.removeEventListener("click", this.renderPreviewListener), e.classList.remove("m-fullscreen-img-instance"), e.style.cursor = "";
|
|
2089
2094
|
}
|
|
2090
2095
|
renderPreview(e) {
|
|
2091
|
-
return e.classList.add(
|
|
2096
|
+
return e.classList.add(tt), Ke(Us, {
|
|
2092
2097
|
props: {
|
|
2093
2098
|
...this.options,
|
|
2094
|
-
openInstanceClass:
|
|
2099
|
+
openInstanceClass: tt,
|
|
2095
2100
|
clickedElement: e,
|
|
2096
2101
|
clickedElementBounds: e.getBoundingClientRect()
|
|
2097
2102
|
},
|
|
@@ -2105,22 +2110,22 @@ class qs {
|
|
|
2105
2110
|
e.style.zIndex = "1", this.options.scaleOnHover && (e.style.transform = "scale(1.04)"), this.options.blurOnHover && (e.style.filter = "blur(3px)");
|
|
2106
2111
|
}
|
|
2107
2112
|
}
|
|
2108
|
-
let
|
|
2109
|
-
const
|
|
2113
|
+
let Se;
|
|
2114
|
+
const Rs = {
|
|
2110
2115
|
mounted(s, e) {
|
|
2111
|
-
return
|
|
2116
|
+
return Se = new Ws(), Se.create(s, e);
|
|
2112
2117
|
},
|
|
2113
2118
|
updated(s, e) {
|
|
2114
|
-
return
|
|
2119
|
+
return Se.update(s, e);
|
|
2115
2120
|
},
|
|
2116
2121
|
unmounted(s) {
|
|
2117
|
-
return
|
|
2122
|
+
return Se.remove(s);
|
|
2118
2123
|
}
|
|
2119
|
-
},
|
|
2124
|
+
}, _s = {
|
|
2120
2125
|
install(s) {
|
|
2121
|
-
s.directive("fullscreen-img",
|
|
2126
|
+
s.directive("fullscreen-img", Rs);
|
|
2122
2127
|
}
|
|
2123
|
-
},
|
|
2128
|
+
}, Ks = "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7", We = {
|
|
2124
2129
|
baseClass: "m-lazy-img",
|
|
2125
2130
|
loadedClass: "m-lazy-loaded",
|
|
2126
2131
|
loadingClass: "m-lazy-loading",
|
|
@@ -2134,10 +2139,10 @@ const Us = {
|
|
|
2134
2139
|
threshold: 0.1
|
|
2135
2140
|
}
|
|
2136
2141
|
};
|
|
2137
|
-
class
|
|
2142
|
+
class xt {
|
|
2138
2143
|
constructor(e = {}) {
|
|
2139
2144
|
c(this, "observers", []);
|
|
2140
|
-
c(this, "defaultOptions",
|
|
2145
|
+
c(this, "defaultOptions", We);
|
|
2141
2146
|
c(this, "options");
|
|
2142
2147
|
c(this, "onImgLoadedCallback");
|
|
2143
2148
|
c(this, "onImgErrorCallback");
|
|
@@ -2275,7 +2280,7 @@ class At {
|
|
|
2275
2280
|
async add(e, t) {
|
|
2276
2281
|
if (this.hasBgImgMode(t) && this.isPictureElement(e))
|
|
2277
2282
|
throw new Error(`[MazLazyImg] You can't use the "bg-image" mode with "<picture />" element`);
|
|
2278
|
-
setTimeout(() => this.setBaseClass(e), 0), e.getAttribute("src") || this.setImgSrc(e,
|
|
2283
|
+
setTimeout(() => this.setBaseClass(e), 0), e.getAttribute("src") || this.setImgSrc(e, Ks), await this.bindUpdateHandler(e, t, "bind");
|
|
2279
2284
|
}
|
|
2280
2285
|
async update(e, t) {
|
|
2281
2286
|
t.value !== t.oldValue && (this.hasImgLoaded = !1, this.removeAllStateClasses(e), await this.bindUpdateHandler(e, t, "update"));
|
|
@@ -2287,35 +2292,35 @@ class At {
|
|
|
2287
2292
|
this.observers = [];
|
|
2288
2293
|
}
|
|
2289
2294
|
}
|
|
2290
|
-
let
|
|
2291
|
-
const
|
|
2295
|
+
let xe;
|
|
2296
|
+
const co = {
|
|
2292
2297
|
created(s, e) {
|
|
2293
2298
|
const t = typeof e.value == "object" ? e.value : {};
|
|
2294
|
-
|
|
2299
|
+
xe = new xt(t), xe.add(s, e);
|
|
2295
2300
|
},
|
|
2296
2301
|
updated(s, e) {
|
|
2297
|
-
|
|
2302
|
+
xe.update(s, e);
|
|
2298
2303
|
},
|
|
2299
2304
|
unmounted(s, e) {
|
|
2300
|
-
|
|
2305
|
+
xe.remove(s, e);
|
|
2301
2306
|
}
|
|
2302
|
-
},
|
|
2307
|
+
}, Ys = {
|
|
2303
2308
|
install(s, e = {}) {
|
|
2304
2309
|
const t = {
|
|
2305
|
-
...
|
|
2310
|
+
...We,
|
|
2306
2311
|
...e,
|
|
2307
2312
|
observerOptions: {
|
|
2308
|
-
...
|
|
2313
|
+
...We.observerOptions,
|
|
2309
2314
|
...e.observerOptions
|
|
2310
2315
|
}
|
|
2311
|
-
}, n = new
|
|
2316
|
+
}, n = new xt(t);
|
|
2312
2317
|
s.directive("lazy-img", {
|
|
2313
2318
|
created: n.add.bind(n),
|
|
2314
2319
|
updated: n.update.bind(n),
|
|
2315
2320
|
unmounted: n.remove.bind(n)
|
|
2316
2321
|
});
|
|
2317
2322
|
}
|
|
2318
|
-
},
|
|
2323
|
+
}, Zs = `
|
|
2319
2324
|
.maz-zoom-img {
|
|
2320
2325
|
position: fixed;
|
|
2321
2326
|
top: 0;
|
|
@@ -2438,13 +2443,13 @@ const lo = {
|
|
|
2438
2443
|
|
|
2439
2444
|
.maz-zoom-img .maz-zoom-btn:hover {
|
|
2440
2445
|
background-color: hsl(0, 0%, 0%);
|
|
2441
|
-
}`,
|
|
2446
|
+
}`, st = {
|
|
2442
2447
|
close: '<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M0 0h24v24H0z" fill="none"/><path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"/></svg>',
|
|
2443
2448
|
next: '<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M0 0h24v24H0z" fill="none"/><path d="M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"/></svg>',
|
|
2444
2449
|
previous: '<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M0 0h24v24H0z" fill="none"/><path d="M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"/></svg>',
|
|
2445
2450
|
spinner: '<svg width="40px" height="40px" version="1.1" xmlns="http://www.w3.org/2000/svg" fill="currentColor" x="0px" y="0px" viewBox="0 0 50 50" xml:space="preserve" class="maz-zoom-img__loader__svg" data-v-6d1cb50c=""><path d="M43.935,25.145c0-10.318-8.364-18.683-18.683-18.683c-10.318,0-18.683,8.365-18.683,18.683h4.068c0-8.071,6.543-14.615,14.615-14.615c8.072,0,14.615,6.543,14.615,14.615H43.935z"></path></svg>'
|
|
2446
2451
|
};
|
|
2447
|
-
class
|
|
2452
|
+
class Xs {
|
|
2448
2453
|
constructor(e) {
|
|
2449
2454
|
c(this, "options");
|
|
2450
2455
|
c(this, "loader");
|
|
@@ -2491,7 +2496,7 @@ class Ys {
|
|
|
2491
2496
|
e.classList.add(
|
|
2492
2497
|
"maz-is-open"
|
|
2493
2498
|
/* OPEN */
|
|
2494
|
-
), this.addStyle(
|
|
2499
|
+
), this.addStyle(Zs);
|
|
2495
2500
|
const n = document.createElement("div");
|
|
2496
2501
|
n.classList.add("maz-zoom-img"), n.setAttribute("id", "MazImgPreviewFullsize"), n.addEventListener("click", (o) => {
|
|
2497
2502
|
n.isEqualNode(o.target) && this.closePreview();
|
|
@@ -2512,7 +2517,7 @@ class Ys {
|
|
|
2512
2517
|
}
|
|
2513
2518
|
getLoader() {
|
|
2514
2519
|
const e = document.createElement("div");
|
|
2515
|
-
return e.classList.add("maz-zoom-img__loader"), e.innerHTML =
|
|
2520
|
+
return e.classList.add("maz-zoom-img__loader"), e.innerHTML = st.spinner, e;
|
|
2516
2521
|
}
|
|
2517
2522
|
mouseLeave(e) {
|
|
2518
2523
|
this.options.scale && (e.style.transform = ""), this.options.blur && (e.style.filter = ""), e.style.zIndex = "";
|
|
@@ -2525,7 +2530,7 @@ class Ys {
|
|
|
2525
2530
|
}
|
|
2526
2531
|
getButton(e = "close") {
|
|
2527
2532
|
const t = document.createElement("button");
|
|
2528
|
-
t.innerHTML =
|
|
2533
|
+
t.innerHTML = st[e];
|
|
2529
2534
|
const n = () => e === "close" ? this.closePreview() : this.allInstances ? this.nextPreviousImage(e === "next") : null;
|
|
2530
2535
|
return t.addEventListener("click", () => {
|
|
2531
2536
|
n();
|
|
@@ -2581,47 +2586,47 @@ class Ys {
|
|
|
2581
2586
|
this.img.removeEventListener("load", this.onImgLoadedCallback);
|
|
2582
2587
|
}
|
|
2583
2588
|
}
|
|
2584
|
-
let
|
|
2585
|
-
const
|
|
2589
|
+
let Oe;
|
|
2590
|
+
const Gs = {
|
|
2586
2591
|
created(s, e) {
|
|
2587
|
-
|
|
2592
|
+
Oe = new Xs(e), Oe.create(s);
|
|
2588
2593
|
},
|
|
2589
2594
|
updated(s, e) {
|
|
2590
|
-
|
|
2595
|
+
Oe.update(e);
|
|
2591
2596
|
},
|
|
2592
2597
|
unmounted(s) {
|
|
2593
|
-
|
|
2598
|
+
Oe.remove(s);
|
|
2594
2599
|
}
|
|
2595
|
-
},
|
|
2600
|
+
}, Qs = {
|
|
2596
2601
|
install(s) {
|
|
2597
|
-
s.directive("zoom-img",
|
|
2602
|
+
s.directive("zoom-img", Gs);
|
|
2598
2603
|
}
|
|
2599
|
-
},
|
|
2600
|
-
|
|
2601
|
-
|
|
2604
|
+
}, Js = [
|
|
2605
|
+
$s,
|
|
2606
|
+
Qs,
|
|
2607
|
+
Ys,
|
|
2608
|
+
Os,
|
|
2602
2609
|
_s,
|
|
2603
|
-
|
|
2604
|
-
|
|
2605
|
-
Ms
|
|
2606
|
-
], uo = {
|
|
2610
|
+
Vs
|
|
2611
|
+
], mo = {
|
|
2607
2612
|
install(s) {
|
|
2608
|
-
for (const e of
|
|
2613
|
+
for (const e of Js)
|
|
2609
2614
|
e.install(s, {});
|
|
2610
2615
|
}
|
|
2611
2616
|
};
|
|
2612
|
-
function
|
|
2617
|
+
function en(s) {
|
|
2613
2618
|
return s ? (s = s.toString(), s.charAt(0).toUpperCase() + s.slice(1)) : "";
|
|
2614
2619
|
}
|
|
2615
|
-
const
|
|
2620
|
+
const tn = {
|
|
2616
2621
|
style: "currency",
|
|
2617
2622
|
minimumFractionDigits: 2,
|
|
2618
2623
|
round: !1
|
|
2619
2624
|
};
|
|
2620
|
-
function
|
|
2625
|
+
function sn(s, e, t) {
|
|
2621
2626
|
let n = Number(s);
|
|
2622
2627
|
return t.round && (n = Math.floor(n), t.minimumFractionDigits = 0), new Intl.NumberFormat(e, t).format(n);
|
|
2623
2628
|
}
|
|
2624
|
-
function
|
|
2629
|
+
function nn(s, e, t) {
|
|
2625
2630
|
if (s === void 0)
|
|
2626
2631
|
throw new TypeError("[maz-ui](FilterCurrency) The `number` attribute is required.");
|
|
2627
2632
|
if (e === void 0)
|
|
@@ -2631,29 +2636,29 @@ function tn(s, e, t) {
|
|
|
2631
2636
|
if (t.currency === void 0)
|
|
2632
2637
|
throw new TypeError("[maz-ui](FilterCurrency) The `options.currency` attribute is required.");
|
|
2633
2638
|
}
|
|
2634
|
-
function
|
|
2639
|
+
function on(s, e, t) {
|
|
2635
2640
|
const n = {
|
|
2636
|
-
...
|
|
2641
|
+
...tn,
|
|
2637
2642
|
...t
|
|
2638
2643
|
};
|
|
2639
|
-
|
|
2644
|
+
nn(s, e, n);
|
|
2640
2645
|
try {
|
|
2641
|
-
return
|
|
2646
|
+
return sn(s, e, n);
|
|
2642
2647
|
} catch (o) {
|
|
2643
2648
|
throw new Error(`[maz-ui](FilterCurrency) ${o}`);
|
|
2644
2649
|
}
|
|
2645
2650
|
}
|
|
2646
|
-
const
|
|
2651
|
+
const rn = {
|
|
2647
2652
|
month: "short",
|
|
2648
2653
|
day: "numeric",
|
|
2649
2654
|
year: "numeric"
|
|
2650
2655
|
};
|
|
2651
|
-
function
|
|
2656
|
+
function an(s, e, t) {
|
|
2652
2657
|
if (e === void 0)
|
|
2653
2658
|
throw new TypeError("[maz-ui](FilterDate) The `locale` attribute is required.");
|
|
2654
2659
|
if (typeof e != "string")
|
|
2655
2660
|
throw new TypeError("[maz-ui](FilterDate) The `locale` attribute must be a string.");
|
|
2656
|
-
const n = t ??
|
|
2661
|
+
const n = t ?? rn;
|
|
2657
2662
|
try {
|
|
2658
2663
|
const o = s instanceof Date ? s : new Date(s);
|
|
2659
2664
|
return new Intl.DateTimeFormat(e, n).format(o);
|
|
@@ -2661,12 +2666,12 @@ function on(s, e, t) {
|
|
|
2661
2666
|
throw new Error(`[maz-ui](FilterDate) ${o}`);
|
|
2662
2667
|
}
|
|
2663
2668
|
}
|
|
2664
|
-
const
|
|
2669
|
+
const ln = {
|
|
2665
2670
|
minimumFractionDigits: 2
|
|
2666
2671
|
};
|
|
2667
|
-
function
|
|
2672
|
+
function un(s, e, t) {
|
|
2668
2673
|
const n = {
|
|
2669
|
-
...
|
|
2674
|
+
...ln,
|
|
2670
2675
|
...t
|
|
2671
2676
|
};
|
|
2672
2677
|
if (s === void 0)
|
|
@@ -2681,16 +2686,16 @@ function an(s, e, t) {
|
|
|
2681
2686
|
throw new Error(`[maz-ui](FilterNumber) ${o}`);
|
|
2682
2687
|
}
|
|
2683
2688
|
}
|
|
2684
|
-
const
|
|
2685
|
-
capitalize:
|
|
2686
|
-
currency:
|
|
2687
|
-
date:
|
|
2688
|
-
number:
|
|
2689
|
-
},
|
|
2689
|
+
const cn = {
|
|
2690
|
+
capitalize: en,
|
|
2691
|
+
currency: on,
|
|
2692
|
+
date: an,
|
|
2693
|
+
number: un
|
|
2694
|
+
}, fo = {
|
|
2690
2695
|
install(s) {
|
|
2691
|
-
s.provide("filters",
|
|
2696
|
+
s.provide("filters", cn);
|
|
2692
2697
|
}
|
|
2693
|
-
},
|
|
2698
|
+
}, je = {
|
|
2694
2699
|
delay: 100,
|
|
2695
2700
|
observer: {
|
|
2696
2701
|
root: void 0,
|
|
@@ -2703,17 +2708,17 @@ const ln = {
|
|
|
2703
2708
|
delay: 0
|
|
2704
2709
|
}
|
|
2705
2710
|
};
|
|
2706
|
-
class
|
|
2711
|
+
class dn {
|
|
2707
2712
|
constructor(e) {
|
|
2708
2713
|
c(this, "options");
|
|
2709
2714
|
this.options = {
|
|
2710
|
-
delay: (e == null ? void 0 : e.delay) ??
|
|
2715
|
+
delay: (e == null ? void 0 : e.delay) ?? je.delay,
|
|
2711
2716
|
observer: {
|
|
2712
|
-
...
|
|
2717
|
+
...je.observer,
|
|
2713
2718
|
...e == null ? void 0 : e.observer
|
|
2714
2719
|
},
|
|
2715
2720
|
animation: {
|
|
2716
|
-
...
|
|
2721
|
+
...je.animation,
|
|
2717
2722
|
...e == null ? void 0 : e.animation
|
|
2718
2723
|
}
|
|
2719
2724
|
};
|
|
@@ -2732,10 +2737,10 @@ class un {
|
|
|
2732
2737
|
for (const a of r) {
|
|
2733
2738
|
const l = a.getAttribute("data-maz-aos-once"), u = typeof l == "string" ? l === "true" : this.options.animation.once;
|
|
2734
2739
|
if (typeof this.options.observer.threshold == "number" && n.intersectionRatio > this.options.observer.threshold) {
|
|
2735
|
-
const y = a.getAttribute("data-maz-aos-duration"),
|
|
2740
|
+
const y = a.getAttribute("data-maz-aos-duration"), T = a.getAttribute("data-maz-aos-delay");
|
|
2736
2741
|
if (y || (a.style.transitionDuration = `${this.options.animation.duration}ms`, setTimeout(() => {
|
|
2737
2742
|
a.style.transitionDuration = "0";
|
|
2738
|
-
}, 1e3)),
|
|
2743
|
+
}, 1e3)), T || (a.style.transitionDelay = `${this.options.animation.delay}ms`, setTimeout(() => {
|
|
2739
2744
|
a.style.transitionDelay = "0";
|
|
2740
2745
|
}, 1e3)), a.classList.add("maz-aos-animate"), u) {
|
|
2741
2746
|
const w = a.getAttribute("data-maz-aos-anchor");
|
|
@@ -2751,7 +2756,7 @@ class un {
|
|
|
2751
2756
|
}
|
|
2752
2757
|
}
|
|
2753
2758
|
async handleObserver() {
|
|
2754
|
-
await
|
|
2759
|
+
await Bs(this.options.delay);
|
|
2755
2760
|
const e = new IntersectionObserver(this.handleIntersect.bind(this), this.options.observer);
|
|
2756
2761
|
for (const t of document.querySelectorAll("[data-maz-aos]")) {
|
|
2757
2762
|
const n = t.getAttribute("data-maz-aos-anchor");
|
|
@@ -2768,22 +2773,22 @@ class un {
|
|
|
2768
2773
|
console.warn("[MazAos](runAnimations) should be executed on client side");
|
|
2769
2774
|
}
|
|
2770
2775
|
}
|
|
2771
|
-
let
|
|
2772
|
-
const
|
|
2776
|
+
let pe;
|
|
2777
|
+
const ho = {
|
|
2773
2778
|
install: (s, e) => {
|
|
2774
|
-
|
|
2775
|
-
|
|
2776
|
-
}) :
|
|
2779
|
+
pe = new dn(e), s.provide("aos", pe), F() && (e != null && e.router ? e.router.afterEach(() => {
|
|
2780
|
+
pe.runAnimations();
|
|
2781
|
+
}) : pe.runAnimations());
|
|
2777
2782
|
}
|
|
2778
2783
|
};
|
|
2779
|
-
function
|
|
2780
|
-
return
|
|
2784
|
+
function vo() {
|
|
2785
|
+
return pe;
|
|
2781
2786
|
}
|
|
2782
|
-
const
|
|
2787
|
+
const mn = {
|
|
2783
2788
|
role: "dialog",
|
|
2784
2789
|
class: "m-backdrop-container",
|
|
2785
2790
|
"aria-modal": "true"
|
|
2786
|
-
},
|
|
2791
|
+
}, fn = { class: "m-backdrop-wrapper" }, nt = "--backdrop-present", hn = /* @__PURE__ */ be({
|
|
2787
2792
|
inheritAttrs: !1,
|
|
2788
2793
|
__name: "MazBackdrop",
|
|
2789
2794
|
props: {
|
|
@@ -2806,10 +2811,10 @@ const cn = {
|
|
|
2806
2811
|
setup(s, { expose: e, emit: t }) {
|
|
2807
2812
|
const n = t;
|
|
2808
2813
|
function o() {
|
|
2809
|
-
document.documentElement.classList.add(
|
|
2814
|
+
document.documentElement.classList.add(nt);
|
|
2810
2815
|
}
|
|
2811
2816
|
function i() {
|
|
2812
|
-
document.querySelector(".m-backdrop.--present") || document.documentElement.classList.remove(
|
|
2817
|
+
document.querySelector(".m-backdrop.--present") || document.documentElement.classList.remove(nt);
|
|
2813
2818
|
}
|
|
2814
2819
|
const r = b(s.modelValue);
|
|
2815
2820
|
function a() {
|
|
@@ -2825,7 +2830,7 @@ const cn = {
|
|
|
2825
2830
|
function y() {
|
|
2826
2831
|
n("update:model-value", !1), n("close"), k();
|
|
2827
2832
|
}
|
|
2828
|
-
function
|
|
2833
|
+
function T() {
|
|
2829
2834
|
s.persistent || a();
|
|
2830
2835
|
}
|
|
2831
2836
|
function w(d) {
|
|
@@ -2837,10 +2842,10 @@ const cn = {
|
|
|
2837
2842
|
function k() {
|
|
2838
2843
|
document.removeEventListener("keyup", w), i();
|
|
2839
2844
|
}
|
|
2840
|
-
|
|
2845
|
+
ce(() => {
|
|
2841
2846
|
s.modelValue ? f() : k();
|
|
2842
2847
|
});
|
|
2843
|
-
let
|
|
2848
|
+
let z = null;
|
|
2844
2849
|
function m(d) {
|
|
2845
2850
|
const C = document.querySelector(d), S = C && Array.from(C.querySelectorAll('a[href], button, textarea, input[type="text"], input[type="radio"], input[type="checkbox"], select')), D = S == null ? void 0 : S.filter((L) => {
|
|
2846
2851
|
const P = window.getComputedStyle(L);
|
|
@@ -2848,26 +2853,26 @@ const cn = {
|
|
|
2848
2853
|
});
|
|
2849
2854
|
return D && D.length > 0 ? D[0] : null;
|
|
2850
2855
|
}
|
|
2851
|
-
return
|
|
2856
|
+
return G(
|
|
2852
2857
|
() => s.modelValue,
|
|
2853
2858
|
async (d) => {
|
|
2854
2859
|
if (r.value = d, d) {
|
|
2855
|
-
f(),
|
|
2860
|
+
f(), z = document.activeElement, await le();
|
|
2856
2861
|
const C = m(".m-backdrop-content");
|
|
2857
2862
|
C == null || C.focus();
|
|
2858
2863
|
} else
|
|
2859
|
-
k(), await
|
|
2864
|
+
k(), await le(), z == null || z.focus();
|
|
2860
2865
|
}
|
|
2861
2866
|
), e({
|
|
2862
2867
|
onBackdropAnimationEnter: u,
|
|
2863
2868
|
onBackdropAnimationLeave: y,
|
|
2864
|
-
onBackdropClicked:
|
|
2869
|
+
onBackdropClicked: T,
|
|
2865
2870
|
close: a,
|
|
2866
2871
|
present: r,
|
|
2867
2872
|
toggleModal: l,
|
|
2868
2873
|
onKeyPress: w
|
|
2869
|
-
}), (d, C) => (A(), N(
|
|
2870
|
-
|
|
2874
|
+
}), (d, C) => (A(), N(qt, { to: d.teleportSelector }, [
|
|
2875
|
+
ee(dt, {
|
|
2871
2876
|
appear: "",
|
|
2872
2877
|
name: d.transitionName,
|
|
2873
2878
|
onAfterEnter: u,
|
|
@@ -2876,27 +2881,27 @@ const cn = {
|
|
|
2876
2881
|
default: q(() => [
|
|
2877
2882
|
r.value ? (A(), U(
|
|
2878
2883
|
"div",
|
|
2879
|
-
|
|
2884
|
+
te({
|
|
2880
2885
|
key: 0,
|
|
2881
2886
|
class: "m-backdrop --present m-reset-css"
|
|
2882
2887
|
}, d.$attrs, {
|
|
2883
2888
|
class: [d.backdropClass, d.variant && `--variant-${d.variant}`, { "--persistent": d.persistent }]
|
|
2884
2889
|
}),
|
|
2885
2890
|
[
|
|
2886
|
-
V("div",
|
|
2887
|
-
V("div",
|
|
2891
|
+
V("div", mn, [
|
|
2892
|
+
V("div", fn, [
|
|
2888
2893
|
V(
|
|
2889
2894
|
"div",
|
|
2890
2895
|
{
|
|
2891
|
-
class:
|
|
2896
|
+
class: ue(["m-backdrop-content", [d.backdropContentClass, `--justify-${d.justify}`, `--align-${d.align}`, { "--padding": d.contentPadding }]]),
|
|
2892
2897
|
role: "button",
|
|
2893
2898
|
tabindex: "-1",
|
|
2894
|
-
onClick:
|
|
2899
|
+
onClick: Z(T, ["self"])
|
|
2895
2900
|
},
|
|
2896
2901
|
[
|
|
2897
|
-
|
|
2902
|
+
R(d.$slots, "default", {
|
|
2898
2903
|
close: a,
|
|
2899
|
-
onBackdropClicked:
|
|
2904
|
+
onBackdropClicked: T
|
|
2900
2905
|
}, void 0, !0)
|
|
2901
2906
|
],
|
|
2902
2907
|
2
|
|
@@ -2914,14 +2919,14 @@ const cn = {
|
|
|
2914
2919
|
}, 8, ["name"])
|
|
2915
2920
|
], 8, ["to"]));
|
|
2916
2921
|
}
|
|
2917
|
-
}),
|
|
2922
|
+
}), vn = /* @__PURE__ */ Me(hn, [["__scopeId", "data-v-90448c91"]]), pn = {
|
|
2918
2923
|
key: 0,
|
|
2919
2924
|
id: "dialogTitle",
|
|
2920
2925
|
class: "m-dialog-title"
|
|
2921
|
-
},
|
|
2926
|
+
}, gn = {
|
|
2922
2927
|
key: 0,
|
|
2923
2928
|
class: "m-dialog-footer"
|
|
2924
|
-
},
|
|
2929
|
+
}, yn = /* @__PURE__ */ be({
|
|
2925
2930
|
name: "MazDialog",
|
|
2926
2931
|
inheritAttrs: !1,
|
|
2927
2932
|
__name: "MazDialog",
|
|
@@ -2946,7 +2951,7 @@ const cn = {
|
|
|
2946
2951
|
},
|
|
2947
2952
|
emits: ["open", "close", "update:model-value"],
|
|
2948
2953
|
setup(s, { expose: e }) {
|
|
2949
|
-
const t = s, n = H(() => import("./MazBtn-
|
|
2954
|
+
const t = s, n = H(() => import("./MazBtn-CD7_c67g.mjs")), o = H(() => import("./x-mark-CnZwVvA7.mjs")), i = Ut(), r = b();
|
|
2950
2955
|
e({
|
|
2951
2956
|
close: () => {
|
|
2952
2957
|
var f, k;
|
|
@@ -2972,13 +2977,13 @@ const cn = {
|
|
|
2972
2977
|
})), u = h(() => ({
|
|
2973
2978
|
class: i.class,
|
|
2974
2979
|
style: i.style
|
|
2975
|
-
})), y = b(),
|
|
2976
|
-
return t.scrollable &&
|
|
2977
|
-
await
|
|
2980
|
+
})), y = b(), T = Wt(), w = h(() => !!T.footer);
|
|
2981
|
+
return t.scrollable && G(() => t.modelValue, async (f) => {
|
|
2982
|
+
await le(), f && y.value && setTimeout(() => {
|
|
2978
2983
|
var k;
|
|
2979
2984
|
(k = y.value) == null || k.scrollTo({ top: 0, behavior: "instant" });
|
|
2980
2985
|
}, 0);
|
|
2981
|
-
}), (f, k) => (A(), N(
|
|
2986
|
+
}), (f, k) => (A(), N(vn, te({ ...l.value, ...a.value }, {
|
|
2982
2987
|
ref_key: "backdrop",
|
|
2983
2988
|
ref: r,
|
|
2984
2989
|
"model-value": f.modelValue,
|
|
@@ -2988,34 +2993,34 @@ const cn = {
|
|
|
2988
2993
|
"content-padding": "",
|
|
2989
2994
|
justify: "center",
|
|
2990
2995
|
variant: "dialog",
|
|
2991
|
-
onClose: k[0] || (k[0] = (
|
|
2992
|
-
onOpen: k[1] || (k[1] = (
|
|
2993
|
-
"onUpdate:modelValue": k[2] || (k[2] = (
|
|
2996
|
+
onClose: k[0] || (k[0] = (z) => f.$emit("close", z)),
|
|
2997
|
+
onOpen: k[1] || (k[1] = (z) => f.$emit("open", z)),
|
|
2998
|
+
"onUpdate:modelValue": k[2] || (k[2] = (z) => f.$emit("update:model-value", z))
|
|
2994
2999
|
}), {
|
|
2995
|
-
default: q(({ close:
|
|
3000
|
+
default: q(({ close: z, onBackdropClicked: m }) => [
|
|
2996
3001
|
V(
|
|
2997
3002
|
"div",
|
|
2998
|
-
|
|
3003
|
+
te({
|
|
2999
3004
|
class: ["m-dialog", { "--scrollable": f.scrollable }],
|
|
3000
3005
|
role: "dialog",
|
|
3001
3006
|
"aria-modal": "true",
|
|
3002
3007
|
style: [{ "--max-width": f.maxWidth, "--min-width": f.minWidth }]
|
|
3003
3008
|
}, u.value),
|
|
3004
3009
|
[
|
|
3005
|
-
|
|
3006
|
-
close:
|
|
3010
|
+
R(f.$slots, "header", {
|
|
3011
|
+
close: z,
|
|
3007
3012
|
onBackdropClicked: m
|
|
3008
3013
|
}, () => [
|
|
3009
3014
|
V(
|
|
3010
3015
|
"div",
|
|
3011
3016
|
{
|
|
3012
|
-
class:
|
|
3017
|
+
class: ue(["m-dialog-header", { "--has-title": f.$slots.title || f.title }])
|
|
3013
3018
|
},
|
|
3014
3019
|
[
|
|
3015
|
-
f.$slots.title || f.title ? (A(), U("h2",
|
|
3016
|
-
|
|
3017
|
-
|
|
3018
|
-
|
|
3020
|
+
f.$slots.title || f.title ? (A(), U("h2", pn, [
|
|
3021
|
+
R(f.$slots, "title", {}, () => [
|
|
3022
|
+
J(
|
|
3023
|
+
X(f.title),
|
|
3019
3024
|
1
|
|
3020
3025
|
/* TEXT */
|
|
3021
3026
|
)
|
|
@@ -3026,7 +3031,7 @@ const cn = {
|
|
|
3026
3031
|
color: "transparent",
|
|
3027
3032
|
size: "sm",
|
|
3028
3033
|
icon: O(o),
|
|
3029
|
-
onClick:
|
|
3034
|
+
onClick: z
|
|
3030
3035
|
}, null, 8, ["icon", "onClick"])) : B("v-if", !0)
|
|
3031
3036
|
],
|
|
3032
3037
|
2
|
|
@@ -3039,20 +3044,20 @@ const cn = {
|
|
|
3039
3044
|
id: "dialogDesc",
|
|
3040
3045
|
ref_key: "dialogContent",
|
|
3041
3046
|
ref: y,
|
|
3042
|
-
class:
|
|
3047
|
+
class: ue(["m-dialog-content", { "--bottom-padding": !w.value }])
|
|
3043
3048
|
},
|
|
3044
3049
|
[
|
|
3045
|
-
|
|
3046
|
-
close:
|
|
3050
|
+
R(f.$slots, "default", {
|
|
3051
|
+
close: z,
|
|
3047
3052
|
onBackdropClicked: m
|
|
3048
3053
|
}, void 0, !0)
|
|
3049
3054
|
],
|
|
3050
3055
|
2
|
|
3051
3056
|
/* CLASS */
|
|
3052
3057
|
),
|
|
3053
|
-
w.value ? (A(), U("div",
|
|
3054
|
-
|
|
3055
|
-
close:
|
|
3058
|
+
w.value ? (A(), U("div", gn, [
|
|
3059
|
+
R(f.$slots, "footer", {
|
|
3060
|
+
close: z,
|
|
3056
3061
|
onBackdropClicked: m
|
|
3057
3062
|
}, void 0, !0)
|
|
3058
3063
|
])) : B("v-if", !0)
|
|
@@ -3065,7 +3070,7 @@ const cn = {
|
|
|
3065
3070
|
/* FORWARDED */
|
|
3066
3071
|
}, 16, ["model-value"]));
|
|
3067
3072
|
}
|
|
3068
|
-
}),
|
|
3073
|
+
}), bn = /* @__PURE__ */ Me(yn, [["__scopeId", "data-v-b8a6c7fb"]]), ie = {
|
|
3069
3074
|
cancelText: "Cancel",
|
|
3070
3075
|
confirmText: "Confirm",
|
|
3071
3076
|
cancelButton: {
|
|
@@ -3076,11 +3081,11 @@ const cn = {
|
|
|
3076
3081
|
text: "Confirm",
|
|
3077
3082
|
color: "success"
|
|
3078
3083
|
}
|
|
3079
|
-
},
|
|
3080
|
-
function
|
|
3084
|
+
}, wn = b(ie), re = b([]);
|
|
3085
|
+
function En(s, e) {
|
|
3081
3086
|
return new Promise((t, n) => {
|
|
3082
|
-
|
|
3083
|
-
...
|
|
3087
|
+
re.value = [
|
|
3088
|
+
...re.value,
|
|
3084
3089
|
{
|
|
3085
3090
|
id: s,
|
|
3086
3091
|
isActive: !0,
|
|
@@ -3094,26 +3099,26 @@ function bn(s, e) {
|
|
|
3094
3099
|
];
|
|
3095
3100
|
});
|
|
3096
3101
|
}
|
|
3097
|
-
function
|
|
3098
|
-
return
|
|
3102
|
+
function Ot(s) {
|
|
3103
|
+
return re.value = re.value.filter(({ id: e }) => e !== s), re.value;
|
|
3099
3104
|
}
|
|
3100
|
-
function
|
|
3105
|
+
function ot(s, e, t) {
|
|
3101
3106
|
var n;
|
|
3102
3107
|
e && ((n = e[s]) == null || n.call(e, t), e.isActive = !1, setTimeout(() => {
|
|
3103
|
-
|
|
3108
|
+
Ot(e.id);
|
|
3104
3109
|
}, 500));
|
|
3105
3110
|
}
|
|
3106
|
-
function
|
|
3111
|
+
function Dt() {
|
|
3107
3112
|
return {
|
|
3108
|
-
data:
|
|
3109
|
-
dialogState:
|
|
3110
|
-
showDialogAndWaitChoice:
|
|
3111
|
-
removeDialogFromState:
|
|
3112
|
-
rejectDialog: async (s, e = new Error("cancel"), t) => (await (t == null ? void 0 : t()),
|
|
3113
|
-
resolveDialog: async (s, e = "accept", t) => (await (t == null ? void 0 : t()),
|
|
3113
|
+
data: wn,
|
|
3114
|
+
dialogState: re,
|
|
3115
|
+
showDialogAndWaitChoice: En,
|
|
3116
|
+
removeDialogFromState: Ot,
|
|
3117
|
+
rejectDialog: async (s, e = new Error("cancel"), t) => (await (t == null ? void 0 : t()), ot("reject", s, e)),
|
|
3118
|
+
resolveDialog: async (s, e = "accept", t) => (await (t == null ? void 0 : t()), ot("resolve", s, e))
|
|
3114
3119
|
};
|
|
3115
3120
|
}
|
|
3116
|
-
const
|
|
3121
|
+
const Tn = { class: "maz-flex maz-items-center maz-gap-2" }, zn = /* @__PURE__ */ be({
|
|
3117
3122
|
__name: "MazDialogPromise",
|
|
3118
3123
|
props: {
|
|
3119
3124
|
data: { default: void 0 },
|
|
@@ -3144,19 +3149,19 @@ const wn = { class: "maz-flex maz-items-center maz-gap-2" }, En = /* @__PURE__ *
|
|
|
3144
3149
|
},
|
|
3145
3150
|
emits: ["open", "close"],
|
|
3146
3151
|
setup(s, { expose: e }) {
|
|
3147
|
-
const t = s, n = H(() => import("./MazBtn-
|
|
3152
|
+
const t = s, n = H(() => import("./MazBtn-CD7_c67g.mjs")), { dialogState: o, rejectDialog: i, resolveDialog: r, data: a } = Dt(), l = h(() => {
|
|
3148
3153
|
var m;
|
|
3149
3154
|
return t.buttons ?? ((m = t.data) == null ? void 0 : m.buttons) ?? a.value.buttons;
|
|
3150
3155
|
}), u = h(() => ({
|
|
3151
|
-
...
|
|
3156
|
+
...ie,
|
|
3152
3157
|
...a.value,
|
|
3153
3158
|
...t.data
|
|
3154
3159
|
})), y = h(() => {
|
|
3155
3160
|
var C, p, S, D;
|
|
3156
|
-
if (!(((C = a.value) == null ? void 0 : C.cancelButton) ?? ((p = t.data) == null ? void 0 : p.cancelButton) ??
|
|
3161
|
+
if (!(((C = a.value) == null ? void 0 : C.cancelButton) ?? ((p = t.data) == null ? void 0 : p.cancelButton) ?? ie.cancelButton))
|
|
3157
3162
|
return;
|
|
3158
3163
|
const d = {
|
|
3159
|
-
...
|
|
3164
|
+
...ie.cancelButton,
|
|
3160
3165
|
...(S = a.value) == null ? void 0 : S.cancelButton,
|
|
3161
3166
|
...(D = t.data) == null ? void 0 : D.cancelButton
|
|
3162
3167
|
};
|
|
@@ -3164,12 +3169,12 @@ const wn = { class: "maz-flex maz-items-center maz-gap-2" }, En = /* @__PURE__ *
|
|
|
3164
3169
|
...d,
|
|
3165
3170
|
text: t.cancelText || u.value.cancelText || d.text
|
|
3166
3171
|
};
|
|
3167
|
-
}),
|
|
3172
|
+
}), T = h(() => {
|
|
3168
3173
|
var C, p, S, D;
|
|
3169
|
-
if (!(((C = a.value) == null ? void 0 : C.confirmButton) ?? ((p = t.data) == null ? void 0 : p.confirmButton) ??
|
|
3174
|
+
if (!(((C = a.value) == null ? void 0 : C.confirmButton) ?? ((p = t.data) == null ? void 0 : p.confirmButton) ?? ie.confirmButton))
|
|
3170
3175
|
return;
|
|
3171
3176
|
const d = {
|
|
3172
|
-
...
|
|
3177
|
+
...ie.confirmButton,
|
|
3173
3178
|
...(S = a.value) == null ? void 0 : S.confirmButton,
|
|
3174
3179
|
...(D = t.data) == null ? void 0 : D.confirmButton
|
|
3175
3180
|
};
|
|
@@ -3189,12 +3194,12 @@ const wn = { class: "maz-flex maz-items-center maz-gap-2" }, En = /* @__PURE__ *
|
|
|
3189
3194
|
function k(m) {
|
|
3190
3195
|
return "type" in m && (m.type === "resolve" || m.type === "reject");
|
|
3191
3196
|
}
|
|
3192
|
-
function
|
|
3197
|
+
function z(m, d) {
|
|
3193
3198
|
return k(d) ? d.type === "resolve" ? r(m, d.response) : i(m, d.response) : r(m, void 0, d.action);
|
|
3194
3199
|
}
|
|
3195
3200
|
return (m, d) => {
|
|
3196
3201
|
var C;
|
|
3197
|
-
return A(), N(
|
|
3202
|
+
return A(), N(bn, te({
|
|
3198
3203
|
ref_key: "dialog",
|
|
3199
3204
|
ref: f
|
|
3200
3205
|
}, { ...m.$attrs, ...t }, {
|
|
@@ -3204,11 +3209,11 @@ const wn = { class: "maz-flex maz-items-center maz-gap-2" }, En = /* @__PURE__ *
|
|
|
3204
3209
|
"onUpdate:modelValue": d[4] || (d[4] = (p) => O(i)(w.value))
|
|
3205
3210
|
}), {
|
|
3206
3211
|
title: q(() => [
|
|
3207
|
-
|
|
3212
|
+
R(m.$slots, "title", {}, () => {
|
|
3208
3213
|
var p;
|
|
3209
3214
|
return [
|
|
3210
|
-
|
|
3211
|
-
|
|
3215
|
+
J(
|
|
3216
|
+
X(m.title || ((p = u.value) == null ? void 0 : p.title)),
|
|
3212
3217
|
1
|
|
3213
3218
|
/* TEXT */
|
|
3214
3219
|
)
|
|
@@ -3216,14 +3221,14 @@ const wn = { class: "maz-flex maz-items-center maz-gap-2" }, En = /* @__PURE__ *
|
|
|
3216
3221
|
})
|
|
3217
3222
|
]),
|
|
3218
3223
|
default: q(() => [
|
|
3219
|
-
|
|
3224
|
+
R(m.$slots, "default", {
|
|
3220
3225
|
resolve: (p) => O(r)(w.value, p),
|
|
3221
3226
|
reject: (p) => O(i)(w.value, p)
|
|
3222
3227
|
}, () => {
|
|
3223
3228
|
var p;
|
|
3224
3229
|
return [
|
|
3225
|
-
|
|
3226
|
-
|
|
3230
|
+
J(
|
|
3231
|
+
X(m.message || ((p = u.value) == null ? void 0 : p.message)),
|
|
3227
3232
|
1
|
|
3228
3233
|
/* TEXT */
|
|
3229
3234
|
)
|
|
@@ -3231,26 +3236,26 @@ const wn = { class: "maz-flex maz-items-center maz-gap-2" }, En = /* @__PURE__ *
|
|
|
3231
3236
|
})
|
|
3232
3237
|
]),
|
|
3233
3238
|
footer: q(() => [
|
|
3234
|
-
|
|
3239
|
+
R(m.$slots, "footer-button", {
|
|
3235
3240
|
resolve: (p) => O(r)(w.value, p),
|
|
3236
3241
|
reject: (p) => O(i)(w.value, p)
|
|
3237
3242
|
}, () => [
|
|
3238
|
-
V("div",
|
|
3243
|
+
V("div", Tn, [
|
|
3239
3244
|
l.value ? (A(!0), U(
|
|
3240
|
-
|
|
3245
|
+
Ze,
|
|
3241
3246
|
{ key: 0 },
|
|
3242
|
-
|
|
3247
|
+
Rt(l.value, (p, S) => (A(), N(O(n), te({
|
|
3243
3248
|
key: S,
|
|
3244
3249
|
ref_for: !0
|
|
3245
3250
|
}, {
|
|
3246
3251
|
...p,
|
|
3247
3252
|
type: "button"
|
|
3248
3253
|
}, {
|
|
3249
|
-
onClick: (D) =>
|
|
3254
|
+
onClick: (D) => z(w.value, p)
|
|
3250
3255
|
}), {
|
|
3251
3256
|
default: q(() => [
|
|
3252
|
-
|
|
3253
|
-
|
|
3257
|
+
J(
|
|
3258
|
+
X(p.text),
|
|
3254
3259
|
1
|
|
3255
3260
|
/* TEXT */
|
|
3256
3261
|
)
|
|
@@ -3261,19 +3266,19 @@ const wn = { class: "maz-flex maz-items-center maz-gap-2" }, En = /* @__PURE__ *
|
|
|
3261
3266
|
128
|
|
3262
3267
|
/* KEYED_FRAGMENT */
|
|
3263
3268
|
)) : (A(), U(
|
|
3264
|
-
|
|
3269
|
+
Ze,
|
|
3265
3270
|
{ key: 1 },
|
|
3266
3271
|
[
|
|
3267
3272
|
y.value ? (A(), N(
|
|
3268
3273
|
O(n),
|
|
3269
|
-
|
|
3274
|
+
te({ key: 0 }, y.value, {
|
|
3270
3275
|
onClick: d[0] || (d[0] = (p) => O(i)(w.value))
|
|
3271
3276
|
}),
|
|
3272
3277
|
{
|
|
3273
3278
|
default: q(() => [
|
|
3274
|
-
|
|
3275
|
-
|
|
3276
|
-
|
|
3279
|
+
R(m.$slots, "cancel-text", {}, () => [
|
|
3280
|
+
J(
|
|
3281
|
+
X(y.value.text),
|
|
3277
3282
|
1
|
|
3278
3283
|
/* TEXT */
|
|
3279
3284
|
)
|
|
@@ -3285,16 +3290,16 @@ const wn = { class: "maz-flex maz-items-center maz-gap-2" }, En = /* @__PURE__ *
|
|
|
3285
3290
|
16
|
|
3286
3291
|
/* FULL_PROPS */
|
|
3287
3292
|
)) : B("v-if", !0),
|
|
3288
|
-
|
|
3293
|
+
T.value ? (A(), N(
|
|
3289
3294
|
O(n),
|
|
3290
|
-
|
|
3295
|
+
te({ key: 1 }, T.value, {
|
|
3291
3296
|
onClick: d[1] || (d[1] = (p) => O(r)(w.value))
|
|
3292
3297
|
}),
|
|
3293
3298
|
{
|
|
3294
3299
|
default: q(() => [
|
|
3295
|
-
|
|
3296
|
-
|
|
3297
|
-
|
|
3300
|
+
R(m.$slots, "confirm-text", {}, () => [
|
|
3301
|
+
J(
|
|
3302
|
+
X(T.value.text),
|
|
3298
3303
|
1
|
|
3299
3304
|
/* TEXT */
|
|
3300
3305
|
)
|
|
@@ -3318,22 +3323,22 @@ const wn = { class: "maz-flex maz-items-center maz-gap-2" }, En = /* @__PURE__ *
|
|
|
3318
3323
|
}, 16, ["model-value"]);
|
|
3319
3324
|
};
|
|
3320
3325
|
}
|
|
3321
|
-
}),
|
|
3326
|
+
}), it = {
|
|
3322
3327
|
identifier: "main-dialog"
|
|
3323
3328
|
};
|
|
3324
|
-
class
|
|
3325
|
-
constructor(e, t =
|
|
3329
|
+
class Ln {
|
|
3330
|
+
constructor(e, t = it) {
|
|
3326
3331
|
this.app = e, this.globalOptions = t;
|
|
3327
3332
|
}
|
|
3328
3333
|
open(e) {
|
|
3329
3334
|
const t = {
|
|
3330
|
-
...
|
|
3335
|
+
...it,
|
|
3331
3336
|
...this.globalOptions,
|
|
3332
3337
|
...e
|
|
3333
|
-
}, { destroy: n, vNode: o } =
|
|
3338
|
+
}, { destroy: n, vNode: o } = Ke(zn, {
|
|
3334
3339
|
props: t,
|
|
3335
3340
|
app: this.app
|
|
3336
|
-
}), { showDialogAndWaitChoice: i } =
|
|
3341
|
+
}), { showDialogAndWaitChoice: i } = Dt();
|
|
3337
3342
|
function r() {
|
|
3338
3343
|
var l, u, y;
|
|
3339
3344
|
(u = (l = o.component) == null ? void 0 : l.exposed) == null || u.close(), (y = t.promiseCallback) == null || y.call(t), setTimeout(() => {
|
|
@@ -3349,14 +3354,14 @@ class zn {
|
|
|
3349
3354
|
};
|
|
3350
3355
|
}
|
|
3351
3356
|
}
|
|
3352
|
-
const
|
|
3357
|
+
const po = {
|
|
3353
3358
|
install(s, e) {
|
|
3354
|
-
s.provide("dialog", new
|
|
3359
|
+
s.provide("dialog", new Ln(s, e));
|
|
3355
3360
|
}
|
|
3356
|
-
},
|
|
3361
|
+
}, kn = { class: "m-toast__message-wrapper" }, Cn = { class: "m-toast__message" }, In = { class: "maz-flex maz-items-center maz-gap-2" }, An = { key: 0 }, Sn = {
|
|
3357
3362
|
key: 4,
|
|
3358
3363
|
class: "progress-bar maz-absolute maz-inset-x-0 maz-bottom-0 maz-h-1"
|
|
3359
|
-
},
|
|
3364
|
+
}, xn = /* @__PURE__ */ be({
|
|
3360
3365
|
__name: "MazToast",
|
|
3361
3366
|
props: {
|
|
3362
3367
|
message: { default: void 0 },
|
|
@@ -3373,7 +3378,7 @@ const ho = {
|
|
|
3373
3378
|
},
|
|
3374
3379
|
emits: ["close", "click", "open"],
|
|
3375
3380
|
setup(s, { expose: e, emit: t }) {
|
|
3376
|
-
const n = s, o = t, i = H(() => import("./MazBtn-
|
|
3381
|
+
const n = s, o = t, i = H(() => import("./MazBtn-CD7_c67g.mjs")), r = H(() => import("./x-mark-CnZwVvA7.mjs")), a = H(
|
|
3377
3382
|
() => import("./arrow-top-right-on-square-jPmYJ34F.mjs")
|
|
3378
3383
|
), l = H(
|
|
3379
3384
|
() => import("./exclamation-triangle-Z6d0ygp8.mjs")
|
|
@@ -3381,7 +3386,7 @@ const ho = {
|
|
|
3381
3386
|
() => import("./exclamation-circle-CUk0ZajS.mjs")
|
|
3382
3387
|
), y = H(
|
|
3383
3388
|
() => import("./information-circle-C7e5b_nL.mjs")
|
|
3384
|
-
),
|
|
3389
|
+
), T = H(() => import("./check-circle-Bf7AGSQ-.mjs")), w = H(() => import("./link-Br1lfjTR.mjs")), f = b(), k = h(() => {
|
|
3385
3390
|
if (n.icon)
|
|
3386
3391
|
switch (n.type) {
|
|
3387
3392
|
case "danger":
|
|
@@ -3389,14 +3394,14 @@ const ho = {
|
|
|
3389
3394
|
case "info":
|
|
3390
3395
|
return y;
|
|
3391
3396
|
case "success":
|
|
3392
|
-
return
|
|
3397
|
+
return T;
|
|
3393
3398
|
case "warning":
|
|
3394
3399
|
return u;
|
|
3395
3400
|
default:
|
|
3396
3401
|
return;
|
|
3397
3402
|
}
|
|
3398
|
-
}),
|
|
3399
|
-
callback:
|
|
3403
|
+
}), z = h(() => n.position.includes("top") ? "top" : "bottom"), m = h(() => n.position.includes("left") ? "left" : n.position.includes("right") ? "right" : "center"), d = h(() => m.value !== "center" ? m.value === "right" ? "m-slide-right" : "m-slide-left" : z.value === "top" ? "m-slide-top" : "m-slide-bottom"), C = b(!1), p = b(!1), S = b(), D = `m-toast-container m-reset-css --${z.value} --${m.value}`, L = `.${D.replaceAll(" ", ".")}`, P = Is({
|
|
3404
|
+
callback: oe,
|
|
3400
3405
|
timeout: typeof n.timeout == "number" ? n.timeout : 0,
|
|
3401
3406
|
callbackOffsetTime: 200
|
|
3402
3407
|
});
|
|
@@ -3407,20 +3412,20 @@ const ho = {
|
|
|
3407
3412
|
M.className = D, x.append(M);
|
|
3408
3413
|
}
|
|
3409
3414
|
}
|
|
3410
|
-
function
|
|
3415
|
+
function ne() {
|
|
3411
3416
|
const v = document.querySelector(L);
|
|
3412
3417
|
return !n.queue && n.maxToasts === !1 ? !1 : typeof n.maxToasts == "number" && v ? n.maxToasts <= v.childElementCount : v && v.childElementCount > 0;
|
|
3413
3418
|
}
|
|
3414
|
-
function
|
|
3415
|
-
if (
|
|
3416
|
-
S.value = setTimeout(
|
|
3419
|
+
function Q() {
|
|
3420
|
+
if (ne()) {
|
|
3421
|
+
S.value = setTimeout(Q, 250);
|
|
3417
3422
|
return;
|
|
3418
3423
|
}
|
|
3419
3424
|
const v = document.querySelector(L);
|
|
3420
3425
|
f.value && v && v.prepend(f.value), p.value = !0, typeof n.timeout == "number" && n.timeout > 0 && P.start();
|
|
3421
3426
|
}
|
|
3422
|
-
const
|
|
3423
|
-
function
|
|
3427
|
+
const de = b("100%");
|
|
3428
|
+
function $e() {
|
|
3424
3429
|
switch (n.type) {
|
|
3425
3430
|
case "danger":
|
|
3426
3431
|
return "maz-bg-danger-700";
|
|
@@ -3434,79 +3439,79 @@ const ho = {
|
|
|
3434
3439
|
return "maz-bg-primary";
|
|
3435
3440
|
}
|
|
3436
3441
|
}
|
|
3437
|
-
|
|
3442
|
+
G(
|
|
3438
3443
|
P.remainingTime,
|
|
3439
3444
|
(v) => {
|
|
3440
3445
|
if (typeof n.timeout == "number") {
|
|
3441
3446
|
const x = 100 * v / n.timeout;
|
|
3442
|
-
|
|
3447
|
+
de.value = `${x}%`;
|
|
3443
3448
|
}
|
|
3444
3449
|
}
|
|
3445
3450
|
);
|
|
3446
|
-
function
|
|
3447
|
-
o("click", v), n.persistent ||
|
|
3451
|
+
function me(v) {
|
|
3452
|
+
o("click", v), n.persistent || oe();
|
|
3448
3453
|
}
|
|
3449
|
-
async function
|
|
3454
|
+
async function fe(v, x) {
|
|
3450
3455
|
var M;
|
|
3451
|
-
C.value = !0, await v(), C.value = !1, (M = n.action) != null && M.closeToast &&
|
|
3456
|
+
C.value = !0, await v(), C.value = !1, (M = n.action) != null && M.closeToast && me(x);
|
|
3452
3457
|
}
|
|
3453
|
-
function
|
|
3458
|
+
function he(v) {
|
|
3454
3459
|
n.noPauseOnHover || (v ? P.pause() : P.resume());
|
|
3455
3460
|
}
|
|
3456
|
-
function
|
|
3461
|
+
function Ve() {
|
|
3457
3462
|
P.stop(), S.value && clearTimeout(S.value);
|
|
3458
3463
|
}
|
|
3459
|
-
function
|
|
3460
|
-
|
|
3464
|
+
function oe() {
|
|
3465
|
+
Ve(), p.value = !1;
|
|
3461
3466
|
}
|
|
3462
|
-
e({ closeToast:
|
|
3463
|
-
function
|
|
3467
|
+
e({ closeToast: oe });
|
|
3468
|
+
function ke() {
|
|
3464
3469
|
o("open");
|
|
3465
3470
|
}
|
|
3466
|
-
function
|
|
3471
|
+
function Ce() {
|
|
3467
3472
|
var x;
|
|
3468
3473
|
o("close"), (x = f.value) == null || x.remove();
|
|
3469
3474
|
const v = document.querySelector(L);
|
|
3470
3475
|
v && !(v != null && v.hasChildNodes()) && v.remove();
|
|
3471
3476
|
}
|
|
3472
|
-
return
|
|
3473
|
-
j(),
|
|
3474
|
-
}), (v, x) => (A(), N(
|
|
3477
|
+
return ce(() => {
|
|
3478
|
+
j(), Q();
|
|
3479
|
+
}), (v, x) => (A(), N(dt, {
|
|
3475
3480
|
name: d.value,
|
|
3476
|
-
onAfterLeave:
|
|
3477
|
-
onAfterEnter:
|
|
3481
|
+
onAfterLeave: Ce,
|
|
3482
|
+
onAfterEnter: ke,
|
|
3478
3483
|
persisted: ""
|
|
3479
3484
|
}, {
|
|
3480
3485
|
default: q(() => [
|
|
3481
|
-
|
|
3486
|
+
ut(V(
|
|
3482
3487
|
"button",
|
|
3483
3488
|
{
|
|
3484
3489
|
ref_key: "Toaster",
|
|
3485
3490
|
ref: f,
|
|
3486
|
-
class:
|
|
3491
|
+
class: ue(["m-toast m-reset-css", [
|
|
3487
3492
|
`--${v.type}`,
|
|
3488
|
-
`--${
|
|
3493
|
+
`--${z.value}`,
|
|
3489
3494
|
`--${m.value}`,
|
|
3490
3495
|
{ "maz-pb-1": typeof v.timeout == "number" && v.timeout > 0, "--persistent": v.persistent }
|
|
3491
3496
|
]]),
|
|
3492
3497
|
role: "alert",
|
|
3493
|
-
onMouseover: x[2] || (x[2] = (M) =>
|
|
3494
|
-
onMouseleave: x[3] || (x[3] = (M) =>
|
|
3495
|
-
onClick: x[4] || (x[4] =
|
|
3496
|
-
var
|
|
3497
|
-
return v.link && !((
|
|
3498
|
+
onMouseover: x[2] || (x[2] = (M) => he(!0)),
|
|
3499
|
+
onMouseleave: x[3] || (x[3] = (M) => he(!1)),
|
|
3500
|
+
onClick: x[4] || (x[4] = Z((M) => {
|
|
3501
|
+
var ve;
|
|
3502
|
+
return v.link && !((ve = v.link) != null && ve.closeToast) ? void 0 : me(M);
|
|
3498
3503
|
}, ["stop"]))
|
|
3499
3504
|
},
|
|
3500
3505
|
[
|
|
3501
|
-
k.value ? (A(), N(
|
|
3506
|
+
k.value ? (A(), N(_t(k.value), {
|
|
3502
3507
|
key: 0,
|
|
3503
3508
|
class: "maz-text-2xl"
|
|
3504
3509
|
})) : B("v-if", !0),
|
|
3505
|
-
V("div",
|
|
3510
|
+
V("div", kn, [
|
|
3506
3511
|
V(
|
|
3507
3512
|
"p",
|
|
3508
|
-
|
|
3509
|
-
|
|
3513
|
+
Cn,
|
|
3514
|
+
X(v.message),
|
|
3510
3515
|
1
|
|
3511
3516
|
/* TEXT */
|
|
3512
3517
|
)
|
|
@@ -3518,11 +3523,11 @@ const ho = {
|
|
|
3518
3523
|
pastel: "",
|
|
3519
3524
|
loading: C.value,
|
|
3520
3525
|
size: "sm",
|
|
3521
|
-
onClick: x[0] || (x[0] =
|
|
3526
|
+
onClick: x[0] || (x[0] = Z((M) => v.action ? fe(v.action.func, M) : void 0, ["stop"]))
|
|
3522
3527
|
}, {
|
|
3523
3528
|
default: q(() => [
|
|
3524
|
-
|
|
3525
|
-
|
|
3529
|
+
J(
|
|
3530
|
+
X(v.action.text),
|
|
3526
3531
|
1
|
|
3527
3532
|
/* TEXT */
|
|
3528
3533
|
)
|
|
@@ -3542,11 +3547,11 @@ const ho = {
|
|
|
3542
3547
|
default: q(() => {
|
|
3543
3548
|
var M;
|
|
3544
3549
|
return [
|
|
3545
|
-
V("div",
|
|
3550
|
+
V("div", In, [
|
|
3546
3551
|
v.link.text ? (A(), U(
|
|
3547
3552
|
"span",
|
|
3548
|
-
|
|
3549
|
-
|
|
3553
|
+
An,
|
|
3554
|
+
X(v.link.text),
|
|
3550
3555
|
1
|
|
3551
3556
|
/* TEXT */
|
|
3552
3557
|
)) : B("v-if", !0),
|
|
@@ -3566,18 +3571,18 @@ const ho = {
|
|
|
3566
3571
|
v.persistent ? B("v-if", !0) : (A(), U("button", {
|
|
3567
3572
|
key: 3,
|
|
3568
3573
|
class: "--close",
|
|
3569
|
-
onClick: x[1] || (x[1] =
|
|
3574
|
+
onClick: x[1] || (x[1] = Z((M) => me(M), ["stop"]))
|
|
3570
3575
|
}, [
|
|
3571
|
-
|
|
3576
|
+
ee(O(r), { class: "--icon maz-text-xl" })
|
|
3572
3577
|
])),
|
|
3573
|
-
typeof v.timeout == "number" && v.timeout > 0 ? (A(), U("div",
|
|
3578
|
+
typeof v.timeout == "number" && v.timeout > 0 ? (A(), U("div", Sn, [
|
|
3574
3579
|
V(
|
|
3575
3580
|
"div",
|
|
3576
3581
|
{
|
|
3577
|
-
style:
|
|
3578
|
-
width:
|
|
3582
|
+
style: Kt({
|
|
3583
|
+
width: de.value
|
|
3579
3584
|
}),
|
|
3580
|
-
class:
|
|
3585
|
+
class: ue(["maz-h-full !maz-transition-all !maz-duration-200 !maz-ease-linear", $e()])
|
|
3581
3586
|
},
|
|
3582
3587
|
null,
|
|
3583
3588
|
6
|
|
@@ -3588,30 +3593,30 @@ const ho = {
|
|
|
3588
3593
|
34
|
|
3589
3594
|
/* CLASS, NEED_HYDRATION */
|
|
3590
3595
|
), [
|
|
3591
|
-
[
|
|
3596
|
+
[ct, p.value]
|
|
3592
3597
|
])
|
|
3593
3598
|
]),
|
|
3594
3599
|
_: 1
|
|
3595
3600
|
/* STABLE */
|
|
3596
3601
|
}, 8, ["name"]));
|
|
3597
3602
|
}
|
|
3598
|
-
}),
|
|
3603
|
+
}), On = /* @__PURE__ */ Me(xn, [["__scopeId", "data-v-b70bc12e"]]), Dn = {
|
|
3599
3604
|
position: "bottom-right",
|
|
3600
3605
|
timeout: 1e4,
|
|
3601
3606
|
persistent: !1,
|
|
3602
3607
|
icon: !0
|
|
3603
3608
|
};
|
|
3604
|
-
class
|
|
3609
|
+
class Pn {
|
|
3605
3610
|
constructor(e, t) {
|
|
3606
3611
|
this.app = e, this.globalOptions = t;
|
|
3607
3612
|
}
|
|
3608
3613
|
show(e, t) {
|
|
3609
3614
|
const n = {
|
|
3610
|
-
...
|
|
3615
|
+
...Dn,
|
|
3611
3616
|
...this.globalOptions,
|
|
3612
3617
|
...t,
|
|
3613
3618
|
message: e
|
|
3614
|
-
}, { destroy: o, vNode: i } =
|
|
3619
|
+
}, { destroy: o, vNode: i } = Ke(On, {
|
|
3615
3620
|
props: n,
|
|
3616
3621
|
app: this.app
|
|
3617
3622
|
});
|
|
@@ -3645,113 +3650,113 @@ class On {
|
|
|
3645
3650
|
return this.show(e, this.getLocalOptions("warning", t));
|
|
3646
3651
|
}
|
|
3647
3652
|
}
|
|
3648
|
-
function
|
|
3649
|
-
return new
|
|
3653
|
+
function Mn(s, e) {
|
|
3654
|
+
return new Pn(s, e);
|
|
3650
3655
|
}
|
|
3651
|
-
const
|
|
3656
|
+
const go = {
|
|
3652
3657
|
install(s, e) {
|
|
3653
|
-
s.provide("toast",
|
|
3658
|
+
s.provide("toast", Mn(s, e));
|
|
3654
3659
|
}
|
|
3655
|
-
},
|
|
3656
|
-
function
|
|
3660
|
+
}, ae = "";
|
|
3661
|
+
function $n(s) {
|
|
3657
3662
|
return s.filter((e, t, n) => t === n.indexOf(e));
|
|
3658
3663
|
}
|
|
3659
|
-
function Mn(s) {
|
|
3660
|
-
return (e = re) => typeof e == "function" ? s.findIndex((...t) => e(...t)) > -1 : s.includes(e);
|
|
3661
|
-
}
|
|
3662
|
-
const $n = (s) => s.length > 0;
|
|
3663
3664
|
function Vn(s) {
|
|
3664
|
-
return (e =
|
|
3665
|
+
return (e = ae) => typeof e == "function" ? s.findIndex((...t) => e(...t)) > -1 : s.includes(e);
|
|
3666
|
+
}
|
|
3667
|
+
const Hn = (s) => s.length > 0;
|
|
3668
|
+
function Bn(s) {
|
|
3669
|
+
return (e = ae) => $n([...s, e]);
|
|
3665
3670
|
}
|
|
3666
|
-
function
|
|
3667
|
-
return (e =
|
|
3671
|
+
function Nn(s) {
|
|
3672
|
+
return (e = ae) => s.filter((t) => t !== e);
|
|
3668
3673
|
}
|
|
3669
|
-
class
|
|
3674
|
+
class Fn {
|
|
3670
3675
|
constructor() {
|
|
3671
3676
|
c(this, "_loaders", b([]));
|
|
3672
3677
|
}
|
|
3673
3678
|
get loaders() {
|
|
3674
3679
|
return h(() => this._loaders.value);
|
|
3675
3680
|
}
|
|
3676
|
-
stop(e =
|
|
3677
|
-
this._loaders.value =
|
|
3681
|
+
stop(e = ae) {
|
|
3682
|
+
this._loaders.value = Nn(this._loaders.value)(e);
|
|
3678
3683
|
}
|
|
3679
|
-
start(e =
|
|
3680
|
-
return this._loaders.value =
|
|
3684
|
+
start(e = ae) {
|
|
3685
|
+
return this._loaders.value = Bn(this._loaders.value)(e), () => this.stop(e);
|
|
3681
3686
|
}
|
|
3682
3687
|
get anyLoading() {
|
|
3683
|
-
return h(() =>
|
|
3688
|
+
return h(() => Hn(this._loaders.value));
|
|
3684
3689
|
}
|
|
3685
|
-
isLoading(e =
|
|
3686
|
-
return h(() =>
|
|
3690
|
+
isLoading(e = ae) {
|
|
3691
|
+
return h(() => Vn(this._loaders.value)(e)).value;
|
|
3687
3692
|
}
|
|
3688
3693
|
}
|
|
3689
|
-
const
|
|
3694
|
+
const jn = new Fn(), yo = {
|
|
3690
3695
|
install: (s) => {
|
|
3691
|
-
s.provide("wait",
|
|
3696
|
+
s.provide("wait", jn);
|
|
3692
3697
|
}
|
|
3693
3698
|
};
|
|
3694
3699
|
export {
|
|
3695
|
-
|
|
3696
|
-
|
|
3697
|
-
|
|
3698
|
-
|
|
3699
|
-
|
|
3700
|
-
|
|
3701
|
-
|
|
3702
|
-
|
|
3703
|
-
|
|
3704
|
-
|
|
3705
|
-
|
|
3706
|
-
|
|
3707
|
-
|
|
3708
|
-
|
|
3709
|
-
|
|
3710
|
-
|
|
3711
|
-
|
|
3700
|
+
vo as $,
|
|
3701
|
+
Vs as A,
|
|
3702
|
+
_s as B,
|
|
3703
|
+
Rs as C,
|
|
3704
|
+
Ys as D,
|
|
3705
|
+
co as E,
|
|
3706
|
+
Qs as F,
|
|
3707
|
+
Gs as G,
|
|
3708
|
+
fo as H,
|
|
3709
|
+
en as I,
|
|
3710
|
+
on as J,
|
|
3711
|
+
an as K,
|
|
3712
|
+
un as L,
|
|
3713
|
+
mt as M,
|
|
3714
|
+
ro as N,
|
|
3715
|
+
ao as O,
|
|
3716
|
+
vs as P,
|
|
3712
3717
|
F as Q,
|
|
3713
|
-
|
|
3714
|
-
|
|
3715
|
-
|
|
3716
|
-
|
|
3717
|
-
|
|
3718
|
-
|
|
3719
|
-
|
|
3720
|
-
|
|
3721
|
-
|
|
3722
|
-
|
|
3723
|
-
|
|
3724
|
-
|
|
3725
|
-
|
|
3726
|
-
|
|
3727
|
-
|
|
3728
|
-
|
|
3729
|
-
|
|
3730
|
-
|
|
3731
|
-
|
|
3732
|
-
|
|
3733
|
-
|
|
3734
|
-
|
|
3735
|
-
|
|
3736
|
-
|
|
3737
|
-
|
|
3738
|
-
|
|
3739
|
-
|
|
3740
|
-
|
|
3741
|
-
|
|
3742
|
-
|
|
3743
|
-
|
|
3744
|
-
|
|
3745
|
-
|
|
3746
|
-
|
|
3747
|
-
|
|
3748
|
-
|
|
3749
|
-
|
|
3750
|
-
|
|
3751
|
-
|
|
3752
|
-
|
|
3753
|
-
|
|
3754
|
-
|
|
3755
|
-
|
|
3756
|
-
|
|
3718
|
+
Ke as R,
|
|
3719
|
+
Je as S,
|
|
3720
|
+
lo as T,
|
|
3721
|
+
Bs as U,
|
|
3722
|
+
Ls as V,
|
|
3723
|
+
uo as W,
|
|
3724
|
+
Hs as X,
|
|
3725
|
+
As as Y,
|
|
3726
|
+
dn as Z,
|
|
3727
|
+
Me as _,
|
|
3728
|
+
Rn as a,
|
|
3729
|
+
ho as a0,
|
|
3730
|
+
Ln as a1,
|
|
3731
|
+
po as a2,
|
|
3732
|
+
go as a3,
|
|
3733
|
+
Pn as a4,
|
|
3734
|
+
jn as a5,
|
|
3735
|
+
yo as a6,
|
|
3736
|
+
Fn as a7,
|
|
3737
|
+
_n as b,
|
|
3738
|
+
Kn as c,
|
|
3739
|
+
Yn as d,
|
|
3740
|
+
Zn as e,
|
|
3741
|
+
Xn as f,
|
|
3742
|
+
gs as g,
|
|
3743
|
+
Gn as h,
|
|
3744
|
+
Pe as i,
|
|
3745
|
+
Qn as j,
|
|
3746
|
+
Jn as k,
|
|
3747
|
+
ys as l,
|
|
3748
|
+
eo as m,
|
|
3749
|
+
to as n,
|
|
3750
|
+
Is as o,
|
|
3751
|
+
so as p,
|
|
3752
|
+
no as q,
|
|
3753
|
+
oo as r,
|
|
3754
|
+
Zt as s,
|
|
3755
|
+
mo as t,
|
|
3756
|
+
Wn as u,
|
|
3757
|
+
xs as v,
|
|
3758
|
+
Os as w,
|
|
3759
|
+
Ms as x,
|
|
3760
|
+
$s as y,
|
|
3761
|
+
io as z
|
|
3757
3762
|
};
|