maz-ui 3.47.1 → 3.47.2-beta.0
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/components/MazCard.mjs +1 -1
- package/components/MazChart.d.ts +1 -1
- package/components/MazChecklist.mjs +1 -1
- package/components/MazGallery.mjs +1 -1
- package/components/MazInput.mjs +1 -1
- package/components/MazInputNumber.mjs +1 -1
- package/components/MazInputPrice.mjs +1 -1
- package/components/MazInputTags.mjs +1 -1
- package/components/MazPhoneNumberInput.mjs +1 -1
- package/components/MazPicker.mjs +1 -1
- package/components/MazSelect.mjs +1 -1
- package/components/MazTable.d.ts +29 -52
- package/components/MazTable.mjs +1 -1
- package/components/MazTabsBar.mjs +1 -1
- package/components/assets/MazDropdown.css +1 -1
- package/components/assets/MazGallery.css +1 -1
- package/components/assets/MazInput.css +1 -1
- package/components/assets/MazInputNumber.css +1 -1
- package/components/assets/MazInputPrice.css +1 -1
- package/components/assets/MazInputTags.css +1 -1
- package/components/assets/MazPhoneNumberInput.css +1 -1
- package/components/assets/MazPicker.css +1 -1
- package/components/assets/MazSelect.css +1 -1
- package/components/assets/MazTable.css +1 -1
- package/components/assets/MazTabsBar.css +1 -1
- package/components/chunks/{MazBadge-CNSfzYq-.mjs → MazBadge-CvIiiTdM.mjs} +1 -1
- package/components/chunks/{MazBtn-D6Jxw9Nr.mjs → MazBtn-BO3G90L3.mjs} +2 -2
- package/components/chunks/{MazBtn-BRnLMzhy.mjs → MazBtn-C87UEsVs.mjs} +2 -2
- package/components/chunks/{MazBtn-DlD5m7T4.mjs → MazBtn-C_l3xuAh.mjs} +2 -2
- package/components/chunks/{MazBtn-CnqRnXh_.mjs → MazBtn-DJOUeES7.mjs} +2 -2
- package/components/chunks/{MazBtn-TkePGm5o.mjs → MazBtn-DVkwISlp.mjs} +2 -2
- package/components/chunks/MazBtn-DadFupkY.mjs +118 -0
- package/components/chunks/{MazBtn-Dt8lr0GH.mjs → MazBtn-GGcGrIH4.mjs} +2 -2
- package/components/chunks/{MazCard-CfkvpcGL.mjs → MazCard-FSXmHyhj.mjs} +1 -1
- package/components/chunks/{MazCheckbox-BKCo6EzO.mjs → MazCheckbox-2G4VkxDz.mjs} +1 -1
- package/components/chunks/{MazCheckbox-Byqz8JJB.mjs → MazCheckbox-BmnqBHaY.mjs} +1 -1
- package/components/chunks/{MazCheckbox-CI8ml-P8.mjs → MazCheckbox-Cq9gpTEw.mjs} +1 -1
- package/components/chunks/{MazChecklist-BLxsNHMP.mjs → MazChecklist-CY1Cv70T.mjs} +1 -1
- package/components/chunks/{MazGallery-BMFwld84.mjs → MazGallery-BknvUeo1.mjs} +272 -229
- package/components/chunks/{MazGallery-BKL7gfrz.mjs → MazGallery-CZOokGAt.mjs} +248 -205
- package/components/chunks/{MazIcon-D8V8ixhf.mjs → MazIcon-z-jTiuyI.mjs} +1 -1
- package/components/chunks/{MazInput-CBiCdd0F.mjs → MazInput-BQoQSRyL.mjs} +2 -2
- package/components/chunks/{MazInput-Dx2cCzFS.mjs → MazInput-CJQB68c-.mjs} +22 -22
- package/components/chunks/{MazInput-O6Q41Fm0.mjs → MazInput-oOA7gdLO.mjs} +23 -23
- package/components/chunks/{MazInputNumber-DYPVUz4k.mjs → MazInputNumber-B4mQJcVB.mjs} +2 -2
- package/components/chunks/{MazInputPrice-DZD7ZZpm.mjs → MazInputPrice-BrxE5WVf.mjs} +2 -2
- package/components/chunks/{MazInputTags-CxXBsTdM.mjs → MazInputTags-BVCej_gW.mjs} +233 -232
- package/components/chunks/{MazLoadingBar-Di2OIrPD.mjs → MazLoadingBar-Dwf55oHy.mjs} +1 -1
- package/components/chunks/{MazPhoneNumberInput-C4TX1tGw.mjs → MazPhoneNumberInput-Cd25AzXc.mjs} +10 -10
- package/components/chunks/{MazPicker-BcQ_-AJH.mjs → MazPicker-C78yxilJ.mjs} +3 -3
- package/components/chunks/{MazPickerMonthSwitcher-hCAkEd5r.mjs → MazPickerMonthSwitcher-CyHYx8TT.mjs} +1 -1
- package/components/chunks/{MazPickerShortcuts-vpLyw1de.mjs → MazPickerShortcuts-Bsi8cnox.mjs} +1 -1
- package/components/chunks/{MazPickerYearSwitcher-DvC79vrt.mjs → MazPickerYearSwitcher-DLUSMAtz.mjs} +1 -1
- package/components/chunks/{MazSelect-BXzgSKmL.mjs → MazSelect-CQDoUpgp.mjs} +15 -14
- package/components/chunks/{MazSelect-Baj2BQH7.mjs → MazSelect-uCJPMXF-.mjs} +3 -3
- package/components/chunks/{MazSpinner-DwSGm0-X.mjs → MazSpinner-2D0ZmAQz.mjs} +1 -1
- package/components/chunks/MazSpinner-B9OwpEP_.mjs +34 -0
- package/components/chunks/{MazSpinner-C1SiKhfK.mjs → MazSpinner-BT_717pD.mjs} +1 -1
- package/components/chunks/{MazSpinner-Cg26sBU2.mjs → MazSpinner-C1Ip-Dwh.mjs} +1 -1
- package/components/chunks/MazSpinner-C23CZ_Za.mjs +34 -0
- package/components/chunks/{MazSpinner-B5lezvu4.mjs → MazSpinner-CViChjTw.mjs} +1 -1
- package/components/chunks/MazSpinner-CZMBhCOJ.mjs +34 -0
- package/components/chunks/{MazSpinner-DlMKBtyt.mjs → MazSpinner-D4C84xZe.mjs} +1 -1
- package/components/chunks/{MazSpinner-B8akphXs.mjs → MazSpinner-EFo8dM46.mjs} +1 -1
- package/components/chunks/MazSpinner-u8WQTgUR.mjs +34 -0
- package/components/chunks/{MazSpinner-M4r0cykl.mjs → MazSpinner-w-S5uCxg.mjs} +1 -1
- package/components/chunks/{MazTable-CulBGLaj.mjs → MazTable-Cuz5QI08.mjs} +4 -4
- package/components/chunks/{MazTableCell-BXDbkEJq.mjs → MazTableCell-D_OTOJiy.mjs} +1 -1
- package/components/chunks/{MazTableRow-Ds3CDEit.mjs → MazTableRow-BTcVAyOy.mjs} +1 -1
- package/components/chunks/{MazTableTitle-uirsgvk_.mjs → MazTableTitle-BDA9G6Zw.mjs} +1 -1
- package/components/chunks/{MazTabsBar-MZYefBb8.mjs → MazTabsBar-JkRzMDM6.mjs} +9 -10
- package/components/chunks/{MazTransitionExpand-4Ll_5LDO.mjs → MazTransitionExpand-C-FHhOGB.mjs} +1 -1
- package/css/main.css +1 -1
- package/modules/assets/index.css +1 -1
- package/modules/chunks/{MazBtn-CTqI4qhg.mjs → MazBtn-BSnVxud6.mjs} +2 -2
- package/modules/chunks/{MazBtn-D_CpNgpD.cjs → MazBtn-Bf9Cq5M7.cjs} +1 -1
- package/modules/chunks/{MazIcon-BB0DMfOc.mjs → MazIcon-DllGg8tw.mjs} +1 -1
- package/modules/chunks/{MazIcon-BtomZnkQ.cjs → MazIcon-dhyR9Q8a.cjs} +1 -1
- package/modules/chunks/{MazSpinner-BASKjaLe.cjs → MazSpinner-CiIyZ8gs.cjs} +1 -1
- package/modules/chunks/{MazSpinner-CDJhmIRl.mjs → MazSpinner-bdGjxsu6.mjs} +1 -1
- package/modules/chunks/index-BPqjUr5e.cjs +149 -0
- package/modules/chunks/{index-C2yAjM0P.mjs → index-x2F1l5sr.mjs} +944 -915
- package/modules/index.cjs +1 -1
- package/modules/index.mjs +1 -1
- package/nuxt/index.json +1 -1
- package/package.json +1 -1
- package/types/components/MazChart.vue.d.ts +1 -1
- package/types/components/MazTable.vue.d.ts +29 -52
- package/types/modules/directives/v-fullscreen-img/MazFullscreenImg.vue.d.ts +5 -5
- package/types/modules/helpers/check-availability.d.ts +1 -0
- package/components/chunks/MazBtn-igor8wRn.mjs +0 -118
- package/components/chunks/MazSpinner-CvT-9sC7.mjs +0 -34
- package/components/chunks/MazSpinner-DH6C15pU.mjs +0 -34
- package/components/chunks/MazSpinner-cqcpf_FX.mjs +0 -34
- package/components/chunks/MazSpinner-yPkPj7Q8.mjs +0 -34
- package/modules/chunks/index-BIX1NMzX.cjs +0 -149
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
import '../assets/index.css';var
|
|
2
|
-
var
|
|
3
|
-
var d = (s, e, t) =>
|
|
4
|
-
import { inject as
|
|
5
|
-
function
|
|
6
|
-
const t =
|
|
1
|
+
import '../assets/index.css';var Pt = Object.defineProperty;
|
|
2
|
+
var Mt = (s, e, t) => e in s ? Pt(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t;
|
|
3
|
+
var d = (s, e, t) => Mt(s, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
+
import { inject as ot, ref as y, onMounted as ue, onUnmounted as it, computed as f, toValue as ae, nextTick as Ue, getCurrentInstance as $t, watch as X, provide as Ht, useId as Vt, onBeforeUnmount as rt, createVNode as J, render as Ce, defineComponent as ge, defineAsyncComponent as V, reactive as Ft, openBlock as C, createElementBlock as _, withModifiers as Y, withKeys as Bt, unref as S, createCommentVNode as I, createElementVNode as F, normalizeClass as le, withDirectives as at, vShow as lt, createBlock as B, Teleport as Nt, Transition as ut, withCtx as U, mergeProps as ee, renderSlot as q, useAttrs as jt, createTextVNode as Q, toDisplayString as Z, Fragment as Ye, renderList as Ut, resolveDynamicComponent as _t, normalizeStyle as qt } from "vue";
|
|
5
|
+
function Oe(s, e) {
|
|
6
|
+
const t = ot(s, e);
|
|
7
7
|
if (!t)
|
|
8
8
|
throw new TypeError(`[maz-ui](injectStrict) Could not resolve ${s}`);
|
|
9
9
|
return t;
|
|
10
10
|
}
|
|
11
|
-
function
|
|
12
|
-
return
|
|
11
|
+
function Nn() {
|
|
12
|
+
return Oe("aos");
|
|
13
13
|
}
|
|
14
|
-
function
|
|
14
|
+
function Wt(s) {
|
|
15
15
|
const e = {};
|
|
16
16
|
for (const [t, n] of Object.entries(s))
|
|
17
17
|
e[t] = Number.parseInt(n, 10);
|
|
18
18
|
return e;
|
|
19
19
|
}
|
|
20
|
-
function
|
|
20
|
+
function N() {
|
|
21
21
|
return typeof document < "u";
|
|
22
22
|
}
|
|
23
|
-
function
|
|
23
|
+
function Rt(s = {}) {
|
|
24
24
|
const {
|
|
25
|
-
internalWindow: e =
|
|
25
|
+
internalWindow: e = N() ? window : void 0,
|
|
26
26
|
initialWidth: t = Number.POSITIVE_INFINITY,
|
|
27
27
|
initialHeight: n = Number.POSITIVE_INFINITY,
|
|
28
28
|
includeScrollbar: o = !0
|
|
@@ -30,13 +30,13 @@ function Ut(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(), ue(() => {
|
|
34
34
|
e && window.addEventListener("resize", a, { passive: !0 });
|
|
35
|
-
}),
|
|
35
|
+
}), it(() => {
|
|
36
36
|
e && window.removeEventListener("resize", a);
|
|
37
37
|
}), { width: i, height: r };
|
|
38
38
|
}
|
|
39
|
-
function
|
|
39
|
+
function jn({
|
|
40
40
|
initialWidth: s = 0,
|
|
41
41
|
initialHeight: e,
|
|
42
42
|
includeScrollbar: t,
|
|
@@ -46,14 +46,14 @@ function Bn({
|
|
|
46
46
|
mediumBreakPoint: r = "md",
|
|
47
47
|
largeBreakPoint: a = "lg"
|
|
48
48
|
}) {
|
|
49
|
-
const { width: u } =
|
|
49
|
+
const { width: u } = Rt({
|
|
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
|
-
}), l =
|
|
56
|
+
}), l = Wt(i), h = f(() => u.value >= l[a]), g = f(
|
|
57
57
|
() => u.value >= l[r] && u.value < l[a]
|
|
58
58
|
), E = f(() => u.value >= 0 && u.value < l[r]);
|
|
59
59
|
return {
|
|
@@ -61,14 +61,14 @@ function Bn({
|
|
|
61
61
|
numericBreakpoints: l,
|
|
62
62
|
isSmallScreen: E,
|
|
63
63
|
isLargeScreen: h,
|
|
64
|
-
isMediumScreen:
|
|
64
|
+
isMediumScreen: g,
|
|
65
65
|
breakpoints: i
|
|
66
66
|
};
|
|
67
67
|
}
|
|
68
|
-
function
|
|
69
|
-
return
|
|
68
|
+
function Un() {
|
|
69
|
+
return Oe("dialog");
|
|
70
70
|
}
|
|
71
|
-
function
|
|
71
|
+
function ct(s, e, t) {
|
|
72
72
|
const n = {
|
|
73
73
|
maxAttempts: 20,
|
|
74
74
|
interval: 100,
|
|
@@ -77,38 +77,38 @@ function _t(s, e, t) {
|
|
|
77
77
|
let o = 0;
|
|
78
78
|
function i() {
|
|
79
79
|
const r = s();
|
|
80
|
-
r != null ? e(r) : o < n.maxAttempts ? (o++, setTimeout(i, n.interval)) : console.warn(n.errorMessage || `[maz-ui](checkAvailability) Nothing found after ${n.maxAttempts} attempts for ref ${r}`);
|
|
80
|
+
r != null ? n.expectedValue !== void 0 && r !== n.expectedValue ? o < n.maxAttempts ? (o++, setTimeout(i, n.interval)) : console.warn(n.errorMessage || `[maz-ui](checkAvailability) Nothing found after ${n.maxAttempts} attempts for ref ${r}`) : e(r) : o < n.maxAttempts ? (o++, setTimeout(i, n.interval)) : console.warn(n.errorMessage || `[maz-ui](checkAvailability) Nothing found or expected value after ${n.maxAttempts} attempts for ref ${r}`);
|
|
81
81
|
}
|
|
82
82
|
i();
|
|
83
83
|
}
|
|
84
|
-
function
|
|
85
|
-
const e =
|
|
84
|
+
function dt(s) {
|
|
85
|
+
const e = ae(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 Ze(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 Kt(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 (!ye(n, e[t]))
|
|
96
96
|
return !1;
|
|
97
97
|
return !0;
|
|
98
98
|
}
|
|
99
|
-
function
|
|
99
|
+
function Yt(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) || !ye(s[o], e[o]))
|
|
105
105
|
return !1;
|
|
106
106
|
return !0;
|
|
107
107
|
}
|
|
108
|
-
function
|
|
109
|
-
return
|
|
108
|
+
function ye(s, e) {
|
|
109
|
+
return Ze(s) || Ze(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) ? Kt(s, e) : typeof s == "object" && typeof e == "object" ? Yt(s, e) : !1;
|
|
110
110
|
}
|
|
111
|
-
function
|
|
111
|
+
function Zt(s, e, t) {
|
|
112
112
|
const n = {};
|
|
113
113
|
return async function(...o) {
|
|
114
114
|
n[s] || (n[s] = { timer: null, promise: null });
|
|
@@ -126,7 +126,7 @@ function Rt(s, e, t) {
|
|
|
126
126
|
}), i.promise;
|
|
127
127
|
};
|
|
128
128
|
}
|
|
129
|
-
function
|
|
129
|
+
function Xt(s, e, t) {
|
|
130
130
|
const n = {};
|
|
131
131
|
return async (...o) => {
|
|
132
132
|
const i = Date.now();
|
|
@@ -148,14 +148,14 @@ const te = {
|
|
|
148
148
|
debounceTime: 300,
|
|
149
149
|
throttleTime: 1e3
|
|
150
150
|
};
|
|
151
|
-
function
|
|
151
|
+
function mt(s, e) {
|
|
152
152
|
return Object.keys(e).includes(s);
|
|
153
153
|
}
|
|
154
|
-
function
|
|
154
|
+
function Xe(s = te.scrollToErrorSelector) {
|
|
155
155
|
const e = document.querySelector(s);
|
|
156
156
|
e && e.scrollIntoView({ behavior: "smooth", block: "center" });
|
|
157
157
|
}
|
|
158
|
-
function
|
|
158
|
+
function Gt(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 Yt(s, e) {
|
|
|
163
163
|
}
|
|
164
164
|
return t;
|
|
165
165
|
}
|
|
166
|
-
function
|
|
166
|
+
function _e(s) {
|
|
167
167
|
return s == null || s === "";
|
|
168
168
|
}
|
|
169
|
-
function
|
|
169
|
+
function Qt({
|
|
170
170
|
name: s,
|
|
171
171
|
hasValidation: e,
|
|
172
172
|
debouncedFields: t,
|
|
@@ -175,25 +175,25 @@ function Zt({
|
|
|
175
175
|
if (e) {
|
|
176
176
|
if (t != null && t[s] && (n != null && n[s]))
|
|
177
177
|
throw new Error(`The field "${s}" cannot be both debounced and throttled`);
|
|
178
|
-
return t != null && t[s] ?
|
|
178
|
+
return t != null && t[s] ? Zt(
|
|
179
179
|
s,
|
|
180
|
-
|
|
180
|
+
pe,
|
|
181
181
|
typeof t[s] == "number" ? t[s] : te.debounceTime
|
|
182
|
-
) : n != null && n[s] ?
|
|
182
|
+
) : n != null && n[s] ? Xt(
|
|
183
183
|
s,
|
|
184
|
-
|
|
184
|
+
pe,
|
|
185
185
|
typeof n[s] == "number" ? n[s] : te.throttleTime
|
|
186
|
-
) :
|
|
186
|
+
) : pe;
|
|
187
187
|
}
|
|
188
188
|
}
|
|
189
|
-
function
|
|
189
|
+
function ft({
|
|
190
190
|
name: s,
|
|
191
191
|
schema: e,
|
|
192
192
|
initialValue: t,
|
|
193
193
|
fieldState: n,
|
|
194
194
|
options: o
|
|
195
195
|
}) {
|
|
196
|
-
const i = e ?
|
|
196
|
+
const i = e ? mt(s, e) : !1, r = Qt({
|
|
197
197
|
name: s,
|
|
198
198
|
hasValidation: i,
|
|
199
199
|
debouncedFields: o == null ? void 0 : o.debouncedFields,
|
|
@@ -207,12 +207,12 @@ function ct({
|
|
|
207
207
|
valid: !i,
|
|
208
208
|
validating: !1,
|
|
209
209
|
validated: !1,
|
|
210
|
-
initialValue:
|
|
210
|
+
initialValue: dt(t),
|
|
211
211
|
validateFunction: r,
|
|
212
212
|
mode: i ? (o == null ? void 0 : o.mode) ?? (n == null ? void 0 : n.mode) ?? te.mode : void 0
|
|
213
213
|
};
|
|
214
214
|
}
|
|
215
|
-
function
|
|
215
|
+
function Jt({
|
|
216
216
|
schema: s,
|
|
217
217
|
payload: e,
|
|
218
218
|
options: t
|
|
@@ -220,7 +220,7 @@ function Xt({
|
|
|
220
220
|
const n = {};
|
|
221
221
|
for (const o in s) {
|
|
222
222
|
const i = o;
|
|
223
|
-
n[i] =
|
|
223
|
+
n[i] = ft({
|
|
224
224
|
name: i,
|
|
225
225
|
schema: s,
|
|
226
226
|
options: t,
|
|
@@ -230,7 +230,7 @@ function Xt({
|
|
|
230
230
|
}
|
|
231
231
|
return n;
|
|
232
232
|
}
|
|
233
|
-
function
|
|
233
|
+
function es({
|
|
234
234
|
fieldsStates: s,
|
|
235
235
|
payload: e,
|
|
236
236
|
schema: t,
|
|
@@ -239,7 +239,7 @@ function Gt({
|
|
|
239
239
|
}) {
|
|
240
240
|
for (const i in t) {
|
|
241
241
|
const r = i;
|
|
242
|
-
s[r] =
|
|
242
|
+
s[r] = ht({
|
|
243
243
|
name: r,
|
|
244
244
|
fieldState: s[r],
|
|
245
245
|
payload: e,
|
|
@@ -249,7 +249,7 @@ function Gt({
|
|
|
249
249
|
});
|
|
250
250
|
}
|
|
251
251
|
}
|
|
252
|
-
function
|
|
252
|
+
function ht({
|
|
253
253
|
name: s,
|
|
254
254
|
fieldState: e,
|
|
255
255
|
payload: t,
|
|
@@ -257,7 +257,7 @@ function dt({
|
|
|
257
257
|
options: o,
|
|
258
258
|
updateMode: i = !0
|
|
259
259
|
}) {
|
|
260
|
-
const { initialValue: r, mode: a, ...u } =
|
|
260
|
+
const { initialValue: r, mode: a, ...u } = ft({
|
|
261
261
|
name: s,
|
|
262
262
|
schema: n,
|
|
263
263
|
initialValue: o.defaultValue ?? t[s],
|
|
@@ -271,27 +271,27 @@ function dt({
|
|
|
271
271
|
...e != null && e.mode && l !== e.mode ? u : {}
|
|
272
272
|
};
|
|
273
273
|
}
|
|
274
|
-
function
|
|
274
|
+
function ts(s) {
|
|
275
275
|
const e = {};
|
|
276
276
|
for (const [t, { errors: n }] of Object.entries(s))
|
|
277
277
|
e[t] = n;
|
|
278
278
|
return e;
|
|
279
279
|
}
|
|
280
|
-
function
|
|
280
|
+
function ss(s) {
|
|
281
281
|
return s instanceof HTMLInputElement || s instanceof HTMLSelectElement || s instanceof HTMLTextAreaElement ? [s] : s.querySelectorAll(
|
|
282
282
|
"input, select, textarea"
|
|
283
283
|
);
|
|
284
284
|
}
|
|
285
|
-
function
|
|
285
|
+
function ns({
|
|
286
286
|
interactiveElements: s,
|
|
287
287
|
onBlurHandler: e,
|
|
288
288
|
mode: t
|
|
289
289
|
}) {
|
|
290
290
|
s.forEach((n) => {
|
|
291
|
-
|
|
291
|
+
be(["eager", "blur", "progressive"], t) && n.addEventListener("blur", e);
|
|
292
292
|
});
|
|
293
293
|
}
|
|
294
|
-
function
|
|
294
|
+
function os({
|
|
295
295
|
interactiveElements: s,
|
|
296
296
|
onBlurHandler: e
|
|
297
297
|
}) {
|
|
@@ -299,14 +299,14 @@ function ts({
|
|
|
299
299
|
t.removeEventListener("blur", e);
|
|
300
300
|
});
|
|
301
301
|
}
|
|
302
|
-
async function
|
|
303
|
-
const n = await
|
|
302
|
+
async function is(s, e, t) {
|
|
303
|
+
const n = await ds(e), i = await (await gt("safeParseAsync"))(n.entries[s], t ?? "");
|
|
304
304
|
return {
|
|
305
305
|
result: i,
|
|
306
306
|
isValid: i.success
|
|
307
307
|
};
|
|
308
308
|
}
|
|
309
|
-
async function
|
|
309
|
+
async function pe({
|
|
310
310
|
name: s,
|
|
311
311
|
fieldState: e,
|
|
312
312
|
schema: t,
|
|
@@ -314,14 +314,14 @@ async function he({
|
|
|
314
314
|
setError: o = !0,
|
|
315
315
|
setErrorIfInvalidAndNotEmpty: i = !1
|
|
316
316
|
}) {
|
|
317
|
-
if (await
|
|
317
|
+
if (await Ue(), e.validating = !0, !t[s]) {
|
|
318
318
|
e.valid = !0, e.validating = !1, e.validated = !0, e.errors = [], e.error = !1;
|
|
319
319
|
return;
|
|
320
320
|
}
|
|
321
|
-
const { result: r, isValid: a } = await
|
|
322
|
-
e.valid = a, (o || i && !a && !
|
|
321
|
+
const { result: r, isValid: a } = await is(s, t, n[s]);
|
|
322
|
+
e.valid = a, (o || i && !a && !_e(n[s])) && (e.error = !a), e.errors = r.issues ?? [], e.validating = !1, e.validated = !0;
|
|
323
323
|
}
|
|
324
|
-
function
|
|
324
|
+
function vt({
|
|
325
325
|
name: s,
|
|
326
326
|
fieldState: e,
|
|
327
327
|
payload: t,
|
|
@@ -337,7 +337,7 @@ function mt({
|
|
|
337
337
|
};
|
|
338
338
|
return (i = e.validateFunction) == null ? void 0 : i.call(e, o);
|
|
339
339
|
}
|
|
340
|
-
function
|
|
340
|
+
function rs({
|
|
341
341
|
fieldsStates: s,
|
|
342
342
|
payload: e,
|
|
343
343
|
showErrors: t = !0,
|
|
@@ -345,7 +345,7 @@ function ns({
|
|
|
345
345
|
}) {
|
|
346
346
|
return Promise.all(
|
|
347
347
|
Object.keys(s).map(
|
|
348
|
-
(o) =>
|
|
348
|
+
(o) => pe({
|
|
349
349
|
name: o,
|
|
350
350
|
setError: t,
|
|
351
351
|
fieldState: s[o],
|
|
@@ -356,15 +356,15 @@ function ns({
|
|
|
356
356
|
)
|
|
357
357
|
);
|
|
358
358
|
}
|
|
359
|
-
function
|
|
359
|
+
function pt({
|
|
360
360
|
eventName: s,
|
|
361
361
|
fieldState: e,
|
|
362
362
|
isSubmitted: t
|
|
363
363
|
}) {
|
|
364
364
|
const { dirty: n, blurred: o, mode: i, valid: r } = e;
|
|
365
|
-
return s === "blur" && (
|
|
365
|
+
return s === "blur" && (be(["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";
|
|
366
366
|
}
|
|
367
|
-
function
|
|
367
|
+
function as({
|
|
368
368
|
name: s,
|
|
369
369
|
force: e = !1,
|
|
370
370
|
payload: t,
|
|
@@ -372,16 +372,16 @@ function os({
|
|
|
372
372
|
schema: o,
|
|
373
373
|
isSubmitted: i
|
|
374
374
|
}) {
|
|
375
|
-
const r = t[s], a = !
|
|
376
|
-
if (n.dirty = a, n.blurred = n.blurred || (n.mode === "eager" ? a : !0), !!(e ||
|
|
377
|
-
return
|
|
375
|
+
const r = t[s], a = !_e(r) && !ye(r, n.initialValue);
|
|
376
|
+
if (n.dirty = a, n.blurred = n.blurred || (n.mode === "eager" ? a : !0), !!(e || pt({ eventName: "blur", fieldState: n, isSubmitted: i })))
|
|
377
|
+
return vt({
|
|
378
378
|
name: s,
|
|
379
379
|
fieldState: n,
|
|
380
380
|
schema: o,
|
|
381
381
|
payload: t
|
|
382
382
|
});
|
|
383
383
|
}
|
|
384
|
-
function
|
|
384
|
+
function ls({
|
|
385
385
|
name: s,
|
|
386
386
|
payload: e,
|
|
387
387
|
fieldState: t,
|
|
@@ -391,52 +391,52 @@ function is({
|
|
|
391
391
|
}) {
|
|
392
392
|
const r = e[s];
|
|
393
393
|
t.validated = !1;
|
|
394
|
-
const a = !
|
|
395
|
-
if (t.dirty = a, !!(i ||
|
|
396
|
-
return
|
|
394
|
+
const a = !_e(r) && !ye(r, t.initialValue);
|
|
395
|
+
if (t.dirty = a, !!(i || pt({ eventName: "input", fieldState: t, isSubmitted: o })))
|
|
396
|
+
return vt({
|
|
397
397
|
name: s,
|
|
398
398
|
fieldState: t,
|
|
399
399
|
schema: n,
|
|
400
400
|
payload: e
|
|
401
401
|
});
|
|
402
402
|
}
|
|
403
|
-
function
|
|
404
|
-
const e =
|
|
403
|
+
function qe(s) {
|
|
404
|
+
const e = $t();
|
|
405
405
|
if (!e)
|
|
406
406
|
throw new Error(`${s} must be called within setup()`);
|
|
407
407
|
return e;
|
|
408
408
|
}
|
|
409
|
-
function
|
|
409
|
+
function us(s, e) {
|
|
410
410
|
var o;
|
|
411
|
-
const n = ((o =
|
|
411
|
+
const n = ((o = qe(e).formContexts) == null ? void 0 : o.get(s)) ?? ot(s);
|
|
412
412
|
if (!n)
|
|
413
413
|
throw new Error("useFormField must be used within a form (useFormValidator)");
|
|
414
414
|
return n;
|
|
415
415
|
}
|
|
416
|
-
function
|
|
416
|
+
function cs({
|
|
417
417
|
ref: s,
|
|
418
418
|
fieldState: e,
|
|
419
419
|
onBlurHandler: t
|
|
420
420
|
}) {
|
|
421
|
-
if (!(s ||
|
|
421
|
+
if (!(s || be(["aggressive", "lazy"], e.mode)))
|
|
422
422
|
return {
|
|
423
423
|
onBlur: t
|
|
424
424
|
};
|
|
425
425
|
}
|
|
426
|
-
const
|
|
427
|
-
async function
|
|
428
|
-
if (
|
|
429
|
-
return
|
|
426
|
+
const He = {};
|
|
427
|
+
async function gt(s) {
|
|
428
|
+
if (He[s])
|
|
429
|
+
return He[s];
|
|
430
430
|
const e = await import("./index-BgyjI1q8.mjs");
|
|
431
|
-
return
|
|
431
|
+
return He[s] = e[s], e[s];
|
|
432
432
|
}
|
|
433
|
-
async function
|
|
434
|
-
return (await
|
|
433
|
+
async function ds(s) {
|
|
434
|
+
return (await gt("objectAsync"))(s);
|
|
435
435
|
}
|
|
436
|
-
function
|
|
436
|
+
function be(s, e) {
|
|
437
437
|
return e ? s.includes(e) : !1;
|
|
438
438
|
}
|
|
439
|
-
function
|
|
439
|
+
function _n(s, e) {
|
|
440
440
|
const t = {
|
|
441
441
|
formIdentifier: "main-form-validator",
|
|
442
442
|
...e
|
|
@@ -447,20 +447,20 @@ function Nn(s, e) {
|
|
|
447
447
|
internalSchema: r,
|
|
448
448
|
errorMessages: a,
|
|
449
449
|
isSubmitted: u
|
|
450
|
-
} =
|
|
450
|
+
} = us(t.formIdentifier, "useFormField"), l = mt(s, r.value) ? (e == null ? void 0 : e.mode) ?? i.mode : void 0;
|
|
451
451
|
t.mode = l;
|
|
452
452
|
const h = f(() => n.value[s]);
|
|
453
|
-
if (n.value[s] =
|
|
453
|
+
if (n.value[s] = ht({
|
|
454
454
|
name: s,
|
|
455
455
|
fieldState: h.value,
|
|
456
456
|
payload: o.value,
|
|
457
457
|
schema: r.value,
|
|
458
458
|
options: { ...i, ...t }
|
|
459
|
-
}), t.defaultValue !== void 0 && !
|
|
459
|
+
}), t.defaultValue !== void 0 && !ye(o.value[s], t.defaultValue)) {
|
|
460
460
|
const T = t.defaultValue;
|
|
461
|
-
o.value[s] = T, n.value[s].initialValue =
|
|
461
|
+
o.value[s] = T, n.value[s].initialValue = dt(T);
|
|
462
462
|
}
|
|
463
|
-
l &&
|
|
463
|
+
l && pe({
|
|
464
464
|
name: s,
|
|
465
465
|
fieldState: h.value,
|
|
466
466
|
payload: o.value,
|
|
@@ -468,8 +468,8 @@ function Nn(s, e) {
|
|
|
468
468
|
setError: l === "aggressive",
|
|
469
469
|
setErrorIfInvalidAndNotEmpty: l === "lazy"
|
|
470
470
|
});
|
|
471
|
-
function
|
|
472
|
-
|
|
471
|
+
function g() {
|
|
472
|
+
as({
|
|
473
473
|
name: s,
|
|
474
474
|
fieldState: h.value,
|
|
475
475
|
payload: o.value,
|
|
@@ -478,33 +478,33 @@ function Nn(s, e) {
|
|
|
478
478
|
});
|
|
479
479
|
}
|
|
480
480
|
const E = f(
|
|
481
|
-
() =>
|
|
481
|
+
() => cs({
|
|
482
482
|
ref: t.ref,
|
|
483
|
-
onBlurHandler:
|
|
483
|
+
onBlurHandler: g,
|
|
484
484
|
fieldState: h.value
|
|
485
485
|
})
|
|
486
486
|
);
|
|
487
|
-
if (t.ref &&
|
|
487
|
+
if (t.ref && be(["eager", "blur", "progressive"], l)) {
|
|
488
488
|
let T = [];
|
|
489
|
-
const
|
|
490
|
-
T =
|
|
489
|
+
const $ = (k) => {
|
|
490
|
+
T = ss(k), ns({
|
|
491
491
|
interactiveElements: T,
|
|
492
|
-
onBlurHandler:
|
|
492
|
+
onBlurHandler: g,
|
|
493
493
|
mode: l
|
|
494
494
|
});
|
|
495
495
|
};
|
|
496
|
-
|
|
497
|
-
const
|
|
498
|
-
|
|
499
|
-
const
|
|
500
|
-
|
|
496
|
+
ue(() => {
|
|
497
|
+
const k = qe(`useFormField of ${s}`);
|
|
498
|
+
ct(() => k.refs[t.ref], (c) => {
|
|
499
|
+
const b = c instanceof HTMLElement ? c : c == null ? void 0 : c.$el;
|
|
500
|
+
b && $(b);
|
|
501
501
|
}, {
|
|
502
502
|
errorMessage: `[maz-ui](useFormField) No element found for ref ${t.ref} for field ${s}`
|
|
503
503
|
});
|
|
504
|
-
}),
|
|
505
|
-
|
|
504
|
+
}), it(() => {
|
|
505
|
+
os({
|
|
506
506
|
interactiveElements: T,
|
|
507
|
-
onBlurHandler:
|
|
507
|
+
onBlurHandler: g
|
|
508
508
|
});
|
|
509
509
|
});
|
|
510
510
|
}
|
|
@@ -525,8 +525,8 @@ function Nn(s, e) {
|
|
|
525
525
|
validationEvents: E
|
|
526
526
|
};
|
|
527
527
|
}
|
|
528
|
-
function
|
|
529
|
-
const o =
|
|
528
|
+
function qn({ schema: s, defaultValues: e, model: t, options: n }) {
|
|
529
|
+
const o = qe("useFormValidator"), i = {
|
|
530
530
|
mode: te.mode,
|
|
531
531
|
scrollToError: te.scrollToErrorSelector,
|
|
532
532
|
debouncedFields: null,
|
|
@@ -534,29 +534,29 @@ function jn({ schema: s, defaultValues: e, model: t, options: n }) {
|
|
|
534
534
|
identifier: "main-form-validator",
|
|
535
535
|
...n
|
|
536
536
|
}, r = y(e), a = y({ ...r.value, ...t == null ? void 0 : t.value }), u = y(s), l = y(
|
|
537
|
-
|
|
537
|
+
Jt({
|
|
538
538
|
schema: u.value,
|
|
539
539
|
payload: a.value,
|
|
540
540
|
options: i
|
|
541
541
|
})
|
|
542
|
-
), h = y(!1),
|
|
543
|
-
t &&
|
|
542
|
+
), h = y(!1), g = y(!1), E = f(() => Object.values(l.value).every(({ valid: L }) => L)), T = f(() => Object.values(l.value).some(({ dirty: L }) => L)), $ = f(() => ts(l.value)), k = f(() => Gt($.value, l.value));
|
|
543
|
+
t && X(
|
|
544
544
|
a,
|
|
545
|
-
(
|
|
546
|
-
t.value = { ...r.value, ...
|
|
545
|
+
(L) => {
|
|
546
|
+
t.value = { ...r.value, ...L };
|
|
547
547
|
},
|
|
548
548
|
{ deep: !0 }
|
|
549
|
-
),
|
|
549
|
+
), X(
|
|
550
550
|
r,
|
|
551
|
-
(
|
|
552
|
-
a.value = { ...
|
|
551
|
+
(L) => {
|
|
552
|
+
a.value = { ...L, ...a.value };
|
|
553
553
|
},
|
|
554
554
|
{ deep: !0 }
|
|
555
|
-
),
|
|
555
|
+
), X(
|
|
556
556
|
u,
|
|
557
|
-
(
|
|
558
|
-
|
|
559
|
-
schema:
|
|
557
|
+
(L) => {
|
|
558
|
+
es({
|
|
559
|
+
schema: L,
|
|
560
560
|
fieldsStates: l.value,
|
|
561
561
|
payload: a.value,
|
|
562
562
|
options: i
|
|
@@ -564,74 +564,74 @@ function jn({ schema: s, defaultValues: e, model: t, options: n }) {
|
|
|
564
564
|
},
|
|
565
565
|
{ deep: !0 }
|
|
566
566
|
), c();
|
|
567
|
-
function c(
|
|
568
|
-
return
|
|
567
|
+
function c(L = i.mode === "aggressive") {
|
|
568
|
+
return rs({
|
|
569
569
|
fieldsStates: l.value,
|
|
570
570
|
payload: a.value,
|
|
571
571
|
schema: u.value,
|
|
572
|
-
showErrors:
|
|
572
|
+
showErrors: L
|
|
573
573
|
});
|
|
574
574
|
}
|
|
575
|
-
const
|
|
576
|
-
async function
|
|
577
|
-
await
|
|
578
|
-
const
|
|
579
|
-
() => a.value[
|
|
575
|
+
const b = [];
|
|
576
|
+
async function D(L) {
|
|
577
|
+
await Ue();
|
|
578
|
+
const P = X(
|
|
579
|
+
() => a.value[L],
|
|
580
580
|
() => {
|
|
581
|
-
const
|
|
582
|
-
|
|
583
|
-
name:
|
|
584
|
-
fieldState:
|
|
581
|
+
const j = l.value[L];
|
|
582
|
+
ls({
|
|
583
|
+
name: L,
|
|
584
|
+
fieldState: j,
|
|
585
585
|
payload: a.value,
|
|
586
586
|
schema: u.value,
|
|
587
|
-
isSubmitted:
|
|
588
|
-
forceValidation:
|
|
587
|
+
isSubmitted: g.value,
|
|
588
|
+
forceValidation: be(["aggressive", "lazy", "progressive"], j.mode)
|
|
589
589
|
});
|
|
590
590
|
},
|
|
591
|
-
{ deep: typeof u.value[
|
|
591
|
+
{ deep: typeof u.value[L] == "object" }
|
|
592
592
|
);
|
|
593
|
-
|
|
593
|
+
b.push(P);
|
|
594
594
|
}
|
|
595
|
-
function
|
|
596
|
-
for (const
|
|
597
|
-
|
|
598
|
-
for (const
|
|
599
|
-
|
|
595
|
+
function v() {
|
|
596
|
+
for (const L of b)
|
|
597
|
+
L();
|
|
598
|
+
for (const L of Object.keys(u.value))
|
|
599
|
+
D(L);
|
|
600
600
|
}
|
|
601
|
-
function
|
|
602
|
-
return async (
|
|
603
|
-
if (
|
|
601
|
+
function x(L, P) {
|
|
602
|
+
return async (j) => {
|
|
603
|
+
if (j == null || j.preventDefault(), h.value)
|
|
604
604
|
return;
|
|
605
|
-
|
|
606
|
-
const
|
|
605
|
+
g.value = !0, h.value = !0, await c(!0);
|
|
606
|
+
const se = typeof P == "string" ? P : i.scrollToError;
|
|
607
607
|
let G;
|
|
608
|
-
return E.value ? G = await
|
|
608
|
+
return E.value ? G = await L(a.value) : typeof se != "boolean" && Xe(se), h.value = !1, G;
|
|
609
609
|
};
|
|
610
610
|
}
|
|
611
|
-
const
|
|
611
|
+
const H = {
|
|
612
612
|
fieldsStates: l,
|
|
613
613
|
payload: a,
|
|
614
614
|
options: i,
|
|
615
615
|
internalSchema: u,
|
|
616
|
-
errorMessages:
|
|
617
|
-
isSubmitted:
|
|
616
|
+
errorMessages: k,
|
|
617
|
+
isSubmitted: g
|
|
618
618
|
};
|
|
619
|
-
return o.formContexts ?? (o.formContexts = /* @__PURE__ */ new Map()), o.formContexts.set(i.identifier,
|
|
619
|
+
return o.formContexts ?? (o.formContexts = /* @__PURE__ */ new Map()), o.formContexts.set(i.identifier, H), Ht(i.identifier, H), v(), {
|
|
620
620
|
identifier: i.identifier,
|
|
621
621
|
isDirty: T,
|
|
622
622
|
isSubmitting: h,
|
|
623
|
-
isSubmitted:
|
|
623
|
+
isSubmitted: g,
|
|
624
624
|
isValid: E,
|
|
625
|
-
errors:
|
|
625
|
+
errors: $,
|
|
626
626
|
model: a,
|
|
627
627
|
fieldsStates: l,
|
|
628
628
|
validateForm: c,
|
|
629
|
-
scrollToError:
|
|
630
|
-
handleSubmit:
|
|
631
|
-
errorMessages:
|
|
629
|
+
scrollToError: Xe,
|
|
630
|
+
handleSubmit: x,
|
|
631
|
+
errorMessages: k
|
|
632
632
|
};
|
|
633
633
|
}
|
|
634
|
-
class
|
|
634
|
+
class ms {
|
|
635
635
|
constructor(e, t) {
|
|
636
636
|
d(this, "defaultOptions", {
|
|
637
637
|
element: void 0,
|
|
@@ -679,13 +679,13 @@ class us {
|
|
|
679
679
|
this.callback = e, this.options = {
|
|
680
680
|
...this.defaultOptions,
|
|
681
681
|
...t
|
|
682
|
-
},
|
|
682
|
+
}, N() && this.start();
|
|
683
683
|
}
|
|
684
684
|
get element() {
|
|
685
685
|
return this.options.element ?? document.body;
|
|
686
686
|
}
|
|
687
687
|
start() {
|
|
688
|
-
if (!
|
|
688
|
+
if (!N()) {
|
|
689
689
|
console.warn("[IdleTimeout](start) you should run this method on client side");
|
|
690
690
|
return;
|
|
691
691
|
}
|
|
@@ -704,7 +704,7 @@ class us {
|
|
|
704
704
|
this.isDestroy = !1, this.isIdle = !1, this.remainingTime = 0, this.resetTimeout(), this.callback({ isIdle: this.isIdle, instance: this });
|
|
705
705
|
}
|
|
706
706
|
destroy() {
|
|
707
|
-
if (!
|
|
707
|
+
if (!N()) {
|
|
708
708
|
console.warn("[IdleTimeout](destroy) you should run this method on client side");
|
|
709
709
|
return;
|
|
710
710
|
}
|
|
@@ -738,20 +738,20 @@ class us {
|
|
|
738
738
|
e ? this.handleTimeout() : this.reset(), this.callback({ isIdle: this.isIdle, instance: this });
|
|
739
739
|
}
|
|
740
740
|
}
|
|
741
|
-
function
|
|
741
|
+
function Wn({
|
|
742
742
|
callback: s,
|
|
743
743
|
options: e
|
|
744
744
|
}) {
|
|
745
|
-
return new
|
|
745
|
+
return new ms(s, e);
|
|
746
746
|
}
|
|
747
|
-
function
|
|
747
|
+
function Rn({
|
|
748
748
|
componentName: s,
|
|
749
749
|
providedId: e
|
|
750
750
|
}) {
|
|
751
|
-
const t =
|
|
751
|
+
const t = Vt();
|
|
752
752
|
return f(() => e ?? `${s}-${t}`);
|
|
753
753
|
}
|
|
754
|
-
const
|
|
754
|
+
const fs = [
|
|
755
755
|
"af-ZA",
|
|
756
756
|
"sq-AL",
|
|
757
757
|
"ar-DZ",
|
|
@@ -889,9 +889,9 @@ const cs = [
|
|
|
889
889
|
"Lt-uz-UZ",
|
|
890
890
|
"vi-VN"
|
|
891
891
|
];
|
|
892
|
-
function
|
|
892
|
+
function hs(s, e) {
|
|
893
893
|
return f(() => {
|
|
894
|
-
const t =
|
|
894
|
+
const t = ae(e), n = ae(s);
|
|
895
895
|
try {
|
|
896
896
|
return !t || !n ? n : new Intl.DisplayNames([t], { type: "language" }).of(n) || n;
|
|
897
897
|
} catch {
|
|
@@ -899,9 +899,9 @@ function ds(s, e) {
|
|
|
899
899
|
}
|
|
900
900
|
});
|
|
901
901
|
}
|
|
902
|
-
function
|
|
902
|
+
function vs(s) {
|
|
903
903
|
return f(() => {
|
|
904
|
-
const e =
|
|
904
|
+
const e = ae(s);
|
|
905
905
|
if (!e)
|
|
906
906
|
return [];
|
|
907
907
|
const t = 65, n = 90, o = new Intl.DisplayNames([e], { type: "language" }), i = [];
|
|
@@ -916,15 +916,15 @@ function ms(s) {
|
|
|
916
916
|
return i;
|
|
917
917
|
});
|
|
918
918
|
}
|
|
919
|
-
function
|
|
919
|
+
function ps(s) {
|
|
920
920
|
return f(() => {
|
|
921
|
-
const e =
|
|
921
|
+
const e = ae(s);
|
|
922
922
|
if (!e)
|
|
923
923
|
return [];
|
|
924
924
|
const t = new Intl.DisplayNames([e], {
|
|
925
925
|
type: "language"
|
|
926
926
|
});
|
|
927
|
-
return
|
|
927
|
+
return fs.map((n) => {
|
|
928
928
|
try {
|
|
929
929
|
const o = t.of(n);
|
|
930
930
|
return !o || n.toLocaleLowerCase() === o.toLocaleLowerCase() ? void 0 : {
|
|
@@ -937,22 +937,22 @@ function fs(s) {
|
|
|
937
937
|
}).filter(Boolean);
|
|
938
938
|
});
|
|
939
939
|
}
|
|
940
|
-
function
|
|
940
|
+
function Kn(s) {
|
|
941
941
|
return {
|
|
942
|
-
getLanguageDisplayName: ({ isoCode: e, locale: t }) =>
|
|
943
|
-
getAllPossibleLanguages: (e) =>
|
|
944
|
-
getLanguageDisplayNamesForIsoCodes: (e) =>
|
|
942
|
+
getLanguageDisplayName: ({ isoCode: e, locale: t }) => hs(e, t || s),
|
|
943
|
+
getAllPossibleLanguages: (e) => vs(e || s),
|
|
944
|
+
getLanguageDisplayNamesForIsoCodes: (e) => ps(e || s)
|
|
945
945
|
};
|
|
946
946
|
}
|
|
947
|
-
function
|
|
947
|
+
function yt(s) {
|
|
948
948
|
const e = s.join(", ").match(/\b\w+\b/g);
|
|
949
949
|
return e ? e.length : 0;
|
|
950
950
|
}
|
|
951
|
-
function
|
|
952
|
-
const t =
|
|
951
|
+
function gs(s, e = 150) {
|
|
952
|
+
const t = yt([s]);
|
|
953
953
|
return Math.ceil(t / e);
|
|
954
954
|
}
|
|
955
|
-
function
|
|
955
|
+
function Yn(s) {
|
|
956
956
|
const e = f(
|
|
957
957
|
() => {
|
|
958
958
|
var r;
|
|
@@ -971,7 +971,7 @@ function Wn(s) {
|
|
|
971
971
|
return l.textContent;
|
|
972
972
|
}
|
|
973
973
|
return typeof s.content == "string" ? s.content : (u = s.content) == null ? void 0 : u.value;
|
|
974
|
-
}), o = f(() =>
|
|
974
|
+
}), o = f(() => gs(n.value, e.value)), i = f(() => yt([n.value]));
|
|
975
975
|
return {
|
|
976
976
|
content: n,
|
|
977
977
|
wordCount: i,
|
|
@@ -979,7 +979,7 @@ function Wn(s) {
|
|
|
979
979
|
duration: o
|
|
980
980
|
};
|
|
981
981
|
}
|
|
982
|
-
const
|
|
982
|
+
const ys = {
|
|
983
983
|
removeAccents: !0,
|
|
984
984
|
caseSensitive: !1,
|
|
985
985
|
replaceSpaces: !0,
|
|
@@ -989,8 +989,8 @@ const vs = {
|
|
|
989
989
|
removeNumbers: !1,
|
|
990
990
|
customNormalizationForms: ["NFC", "NFKD"]
|
|
991
991
|
};
|
|
992
|
-
function
|
|
993
|
-
const t = { ...
|
|
992
|
+
function Ge(s, e) {
|
|
993
|
+
const t = { ...ys, ...e }, n = {
|
|
994
994
|
À: "A",
|
|
995
995
|
Á: "A",
|
|
996
996
|
Â: "A",
|
|
@@ -1045,7 +1045,7 @@ function Ze(s, e) {
|
|
|
1045
1045
|
o = o.normalize(i);
|
|
1046
1046
|
return o;
|
|
1047
1047
|
}
|
|
1048
|
-
function
|
|
1048
|
+
function bs(s, e) {
|
|
1049
1049
|
const t = s.length, n = e.length, o = [];
|
|
1050
1050
|
for (let i = 0; i <= t; i++)
|
|
1051
1051
|
o[i] = [i];
|
|
@@ -1062,34 +1062,34 @@ function ps(s, e) {
|
|
|
1062
1062
|
}
|
|
1063
1063
|
return o[t][n];
|
|
1064
1064
|
}
|
|
1065
|
-
function
|
|
1066
|
-
const t =
|
|
1065
|
+
function bt(s, e) {
|
|
1066
|
+
const t = bs(s, e), n = Math.max(s.length, e.length);
|
|
1067
1067
|
return 1 - t / n;
|
|
1068
1068
|
}
|
|
1069
|
-
function
|
|
1070
|
-
return
|
|
1069
|
+
function ws(s, e, t = 0.75) {
|
|
1070
|
+
return bt(s, e) >= t;
|
|
1071
1071
|
}
|
|
1072
|
-
function
|
|
1072
|
+
function Zn(s, e, t = 0.75) {
|
|
1073
1073
|
const n = f(
|
|
1074
|
-
() =>
|
|
1074
|
+
() => Ge(typeof s == "string" ? s : s.value)
|
|
1075
1075
|
), o = f(
|
|
1076
|
-
() =>
|
|
1077
|
-
), i = f(() => typeof t == "number" ? t : t.value), r = f(() =>
|
|
1076
|
+
() => Ge(typeof e == "string" ? e : e.value)
|
|
1077
|
+
), i = f(() => typeof t == "number" ? t : t.value), r = f(() => bt(n.value, o.value));
|
|
1078
1078
|
return {
|
|
1079
1079
|
isMatching: f(
|
|
1080
|
-
() =>
|
|
1080
|
+
() => ws(n.value, o.value, i.value)
|
|
1081
1081
|
),
|
|
1082
1082
|
score: r
|
|
1083
1083
|
};
|
|
1084
1084
|
}
|
|
1085
|
-
const
|
|
1085
|
+
const Es = {
|
|
1086
1086
|
preventDefaultOnTouchMove: !1,
|
|
1087
1087
|
preventDefaultOnMouseWheel: !1,
|
|
1088
1088
|
threshold: 50,
|
|
1089
1089
|
immediate: !1,
|
|
1090
1090
|
triggerOnEnd: !1
|
|
1091
1091
|
};
|
|
1092
|
-
class
|
|
1092
|
+
class Ts {
|
|
1093
1093
|
constructor(e) {
|
|
1094
1094
|
d(this, "element");
|
|
1095
1095
|
d(this, "xStart");
|
|
@@ -1105,7 +1105,7 @@ class bs {
|
|
|
1105
1105
|
d(this, "start");
|
|
1106
1106
|
d(this, "stop");
|
|
1107
1107
|
d(this, "options");
|
|
1108
|
-
this.inputOption = e, this.options = { ...
|
|
1108
|
+
this.inputOption = e, this.options = { ...Es, ...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();
|
|
1109
1109
|
}
|
|
1110
1110
|
startListening() {
|
|
1111
1111
|
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 });
|
|
@@ -1161,8 +1161,8 @@ class bs {
|
|
|
1161
1161
|
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();
|
|
1162
1162
|
}
|
|
1163
1163
|
}
|
|
1164
|
-
function
|
|
1165
|
-
const e = y(), t = y(), n = y(), o = y(), i = y(), r = y(), a = f(() =>
|
|
1164
|
+
function Xn(s) {
|
|
1165
|
+
const e = y(), t = y(), n = y(), o = y(), i = y(), r = y(), a = f(() => ae(s.element)), u = new Ts({
|
|
1166
1166
|
...s,
|
|
1167
1167
|
element: a.value,
|
|
1168
1168
|
onValuesChanged(l) {
|
|
@@ -1182,7 +1182,7 @@ function Kn(s) {
|
|
|
1182
1182
|
stop: u.stop
|
|
1183
1183
|
};
|
|
1184
1184
|
}
|
|
1185
|
-
const
|
|
1185
|
+
const Ls = {
|
|
1186
1186
|
darkClass: "dark",
|
|
1187
1187
|
lightClass: "light",
|
|
1188
1188
|
storageThemeKey: "theme",
|
|
@@ -1190,11 +1190,11 @@ const ws = {
|
|
|
1190
1190
|
storageThemeValueLight: "light",
|
|
1191
1191
|
storageThemeValueSystem: "system",
|
|
1192
1192
|
watchChanges: !0
|
|
1193
|
-
},
|
|
1194
|
-
function
|
|
1193
|
+
}, we = y("system"), K = y("system");
|
|
1194
|
+
function Qe() {
|
|
1195
1195
|
return window.matchMedia("(prefers-color-scheme: dark)").matches;
|
|
1196
1196
|
}
|
|
1197
|
-
function
|
|
1197
|
+
function Ee({
|
|
1198
1198
|
darkClass: s,
|
|
1199
1199
|
lightClass: e,
|
|
1200
1200
|
storageThemeKey: t,
|
|
@@ -1202,9 +1202,9 @@ function be({
|
|
|
1202
1202
|
setLocalStorageValue: o = !0,
|
|
1203
1203
|
setSelectedTheme: i = !0
|
|
1204
1204
|
}) {
|
|
1205
|
-
|
|
1205
|
+
N() && (document.documentElement.classList.remove(e), document.documentElement.classList.add(s), we.value = n, i && (K.value = n), o && (localStorage[t] = n));
|
|
1206
1206
|
}
|
|
1207
|
-
function
|
|
1207
|
+
function Te({
|
|
1208
1208
|
darkClass: s,
|
|
1209
1209
|
lightClass: e,
|
|
1210
1210
|
storageThemeKey: t,
|
|
@@ -1212,97 +1212,97 @@ function we({
|
|
|
1212
1212
|
setLocalStorageValue: o = !0,
|
|
1213
1213
|
setSelectedTheme: i = !0
|
|
1214
1214
|
}) {
|
|
1215
|
-
|
|
1215
|
+
N() && (document.documentElement.classList.remove(s), document.documentElement.classList.add(e), we.value = n, i && (K.value = n), o && (localStorage[t] = n));
|
|
1216
1216
|
}
|
|
1217
|
-
function
|
|
1217
|
+
function wt({
|
|
1218
1218
|
setLocalStorageValue: s = !0,
|
|
1219
1219
|
...e
|
|
1220
1220
|
}) {
|
|
1221
|
-
if (
|
|
1222
|
-
return document.documentElement.classList.remove(e.darkClass), document.documentElement.classList.remove(e.lightClass),
|
|
1221
|
+
if (N())
|
|
1222
|
+
return document.documentElement.classList.remove(e.darkClass), document.documentElement.classList.remove(e.lightClass), we.value = e.storageThemeValueSystem, K.value = e.storageThemeValueSystem, s && (localStorage[e.storageThemeKey] = e.storageThemeValueSystem), Be(e);
|
|
1223
1223
|
}
|
|
1224
|
-
function
|
|
1224
|
+
function Et(s) {
|
|
1225
1225
|
if (!s.defaultTheme)
|
|
1226
1226
|
return console.error("[maz-ui](useThemeHandler) No default theme set");
|
|
1227
1227
|
if (!["light", "dark"].includes(s.defaultTheme))
|
|
1228
1228
|
return console.error('[maz-ui](useThemeHandler) Default theme must be "light" or "dark"');
|
|
1229
1229
|
switch (s.defaultTheme) {
|
|
1230
1230
|
case "dark":
|
|
1231
|
-
return
|
|
1231
|
+
return Ee({
|
|
1232
1232
|
...s,
|
|
1233
1233
|
setLocalStorageValue: !1,
|
|
1234
1234
|
setSelectedTheme: !0
|
|
1235
1235
|
});
|
|
1236
1236
|
case "light":
|
|
1237
|
-
return
|
|
1237
|
+
return Te({
|
|
1238
1238
|
...s,
|
|
1239
1239
|
setLocalStorageValue: !1,
|
|
1240
1240
|
setSelectedTheme: !0
|
|
1241
1241
|
});
|
|
1242
1242
|
}
|
|
1243
1243
|
}
|
|
1244
|
-
function
|
|
1245
|
-
return
|
|
1244
|
+
function Be(s) {
|
|
1245
|
+
return N() ? !localStorage[s.storageThemeKey] && s.defaultTheme ? Et(s) : localStorage[s.storageThemeKey] === s.storageThemeValueDark || !localStorage[s.storageThemeKey] && Qe() || localStorage[s.storageThemeKey] === s.storageThemeValueSystem && Qe() ? Ee({
|
|
1246
1246
|
...s,
|
|
1247
1247
|
setLocalStorageValue: !1,
|
|
1248
1248
|
setSelectedTheme: !1
|
|
1249
|
-
}) :
|
|
1249
|
+
}) : Te({
|
|
1250
1250
|
...s,
|
|
1251
1251
|
setLocalStorageValue: !1,
|
|
1252
1252
|
setSelectedTheme: !1
|
|
1253
1253
|
}) : void 0;
|
|
1254
1254
|
}
|
|
1255
|
-
function
|
|
1255
|
+
function Ve({
|
|
1256
1256
|
theme: s,
|
|
1257
1257
|
...e
|
|
1258
1258
|
}) {
|
|
1259
|
-
return s === "system" ?
|
|
1259
|
+
return s === "system" ? wt(e) : s === "dark" ? Ee(e) : Te(e);
|
|
1260
1260
|
}
|
|
1261
|
-
function
|
|
1262
|
-
return
|
|
1261
|
+
function zs(s) {
|
|
1262
|
+
return we.value === s.storageThemeValueDark ? Te(s) : Ee(s);
|
|
1263
1263
|
}
|
|
1264
|
-
function
|
|
1264
|
+
function Gn(s) {
|
|
1265
1265
|
const e = {
|
|
1266
|
-
...
|
|
1266
|
+
...Ls,
|
|
1267
1267
|
...s
|
|
1268
1268
|
};
|
|
1269
1269
|
function t() {
|
|
1270
|
-
|
|
1270
|
+
Be(e);
|
|
1271
1271
|
}
|
|
1272
|
-
return
|
|
1273
|
-
localStorage[e.storageThemeKey] && (
|
|
1274
|
-
}),
|
|
1272
|
+
return ue(() => {
|
|
1273
|
+
localStorage[e.storageThemeKey] && (K.value = localStorage[e.storageThemeKey]), e.watchChanges && window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change", t);
|
|
1274
|
+
}), rt(() => {
|
|
1275
1275
|
e.watchChanges && window.matchMedia("(prefers-color-scheme: dark)").removeEventListener("change", t);
|
|
1276
|
-
}),
|
|
1276
|
+
}), X(K, (n) => {
|
|
1277
1277
|
switch (localStorage[e.storageThemeKey] = n, n) {
|
|
1278
1278
|
case e.storageThemeValueDark: {
|
|
1279
|
-
|
|
1279
|
+
Ee(e);
|
|
1280
1280
|
break;
|
|
1281
1281
|
}
|
|
1282
1282
|
case e.storageThemeValueLight: {
|
|
1283
|
-
|
|
1283
|
+
Te(e);
|
|
1284
1284
|
break;
|
|
1285
1285
|
}
|
|
1286
1286
|
case e.storageThemeValueSystem: {
|
|
1287
|
-
|
|
1287
|
+
wt(e);
|
|
1288
1288
|
break;
|
|
1289
1289
|
}
|
|
1290
1290
|
}
|
|
1291
1291
|
}), {
|
|
1292
|
-
autoSetTheme: () =>
|
|
1293
|
-
toggleTheme: () =>
|
|
1294
|
-
setSystemTheme: () =>
|
|
1295
|
-
setDarkTheme: () =>
|
|
1296
|
-
setLightTheme: () =>
|
|
1297
|
-
setDefaultTheme: () =>
|
|
1298
|
-
hasDarkTheme: f(() =>
|
|
1299
|
-
hasLightTheme: f(() =>
|
|
1300
|
-
hasSystemTheme: f(() =>
|
|
1301
|
-
theme:
|
|
1302
|
-
selectedTheme:
|
|
1292
|
+
autoSetTheme: () => Be(e),
|
|
1293
|
+
toggleTheme: () => zs(e),
|
|
1294
|
+
setSystemTheme: () => Ve({ ...e, theme: "system" }),
|
|
1295
|
+
setDarkTheme: () => Ve({ ...e, theme: "dark" }),
|
|
1296
|
+
setLightTheme: () => Ve({ ...e, theme: "light" }),
|
|
1297
|
+
setDefaultTheme: () => Et(e),
|
|
1298
|
+
hasDarkTheme: f(() => K.value === e.storageThemeValueDark),
|
|
1299
|
+
hasLightTheme: f(() => K.value === e.storageThemeValueLight),
|
|
1300
|
+
hasSystemTheme: f(() => K.value === e.storageThemeValueSystem),
|
|
1301
|
+
theme: we,
|
|
1302
|
+
selectedTheme: K
|
|
1303
1303
|
};
|
|
1304
1304
|
}
|
|
1305
|
-
function
|
|
1305
|
+
function Cs({ timeout: s = 1e3, callback: e, remainingTimeUpdate: t = 200, callbackOffsetTime: n = 0 }) {
|
|
1306
1306
|
const o = y(s), i = y(s);
|
|
1307
1307
|
let r;
|
|
1308
1308
|
function a(E) {
|
|
@@ -1310,7 +1310,7 @@ function zs({ timeout: s = 1e3, callback: e, remainingTimeUpdate: t = 200, callb
|
|
|
1310
1310
|
}
|
|
1311
1311
|
function u() {
|
|
1312
1312
|
r || (r = setInterval(() => {
|
|
1313
|
-
i.value -= t, i.value <= 0 && (
|
|
1313
|
+
i.value -= t, i.value <= 0 && (g(), setTimeout(() => e == null ? void 0 : e(), n));
|
|
1314
1314
|
}, t));
|
|
1315
1315
|
}
|
|
1316
1316
|
function l() {
|
|
@@ -1319,7 +1319,7 @@ function zs({ timeout: s = 1e3, callback: e, remainingTimeUpdate: t = 200, callb
|
|
|
1319
1319
|
function h() {
|
|
1320
1320
|
!r && i.value > 0 && u();
|
|
1321
1321
|
}
|
|
1322
|
-
function
|
|
1322
|
+
function g() {
|
|
1323
1323
|
setTimeout(() => i.value = o.value, n * 2), l();
|
|
1324
1324
|
}
|
|
1325
1325
|
return {
|
|
@@ -1327,13 +1327,13 @@ function zs({ timeout: s = 1e3, callback: e, remainingTimeUpdate: t = 200, callb
|
|
|
1327
1327
|
start: a,
|
|
1328
1328
|
pause: l,
|
|
1329
1329
|
resume: h,
|
|
1330
|
-
stop:
|
|
1330
|
+
stop: g
|
|
1331
1331
|
};
|
|
1332
1332
|
}
|
|
1333
|
-
function
|
|
1334
|
-
return
|
|
1333
|
+
function Qn() {
|
|
1334
|
+
return Oe("toast");
|
|
1335
1335
|
}
|
|
1336
|
-
class
|
|
1336
|
+
class Is {
|
|
1337
1337
|
constructor(e, t) {
|
|
1338
1338
|
d(this, "eventHandlerFunction");
|
|
1339
1339
|
d(this, "event", "visibilitychange");
|
|
@@ -1348,10 +1348,10 @@ class Ts {
|
|
|
1348
1348
|
this.callback = e, this.options = {
|
|
1349
1349
|
...this.defaultOptions,
|
|
1350
1350
|
...t
|
|
1351
|
-
}, this.eventHandlerFunction = this.eventHandler.bind(this),
|
|
1351
|
+
}, this.eventHandlerFunction = this.eventHandler.bind(this), N() && this.start();
|
|
1352
1352
|
}
|
|
1353
1353
|
start() {
|
|
1354
|
-
if (!
|
|
1354
|
+
if (!N()) {
|
|
1355
1355
|
console.warn("[UserVisibility](start) you should run this method on client side");
|
|
1356
1356
|
return;
|
|
1357
1357
|
}
|
|
@@ -1379,62 +1379,62 @@ class Ts {
|
|
|
1379
1379
|
this.removeEventListener(), this.timeoutHandler && clearTimeout(this.timeoutHandler);
|
|
1380
1380
|
}
|
|
1381
1381
|
}
|
|
1382
|
-
function
|
|
1382
|
+
function Jn({
|
|
1383
1383
|
callback: s,
|
|
1384
1384
|
options: e
|
|
1385
1385
|
}) {
|
|
1386
|
-
return new
|
|
1386
|
+
return new Is(s, e);
|
|
1387
1387
|
}
|
|
1388
|
-
function
|
|
1389
|
-
return
|
|
1388
|
+
function eo() {
|
|
1389
|
+
return Oe("wait");
|
|
1390
1390
|
}
|
|
1391
|
-
const
|
|
1392
|
-
function
|
|
1391
|
+
const xe = "__maz-click-outside__";
|
|
1392
|
+
function Tt() {
|
|
1393
1393
|
return document.ontouchstart === null ? "touchstart" : "click";
|
|
1394
1394
|
}
|
|
1395
|
-
async function
|
|
1395
|
+
async function Lt(s, e) {
|
|
1396
1396
|
try {
|
|
1397
|
-
|
|
1397
|
+
zt(s);
|
|
1398
1398
|
const t = e.instance, n = e.value, o = typeof n == "function";
|
|
1399
1399
|
if (!o)
|
|
1400
1400
|
throw new Error("[maz-ui](vClickOutside) the callback should be a function");
|
|
1401
|
-
await
|
|
1401
|
+
await Ue(), s[xe] = (r) => {
|
|
1402
1402
|
if ((!s || r.target && !s.contains(r.target)) && n && o)
|
|
1403
1403
|
return n.call(t, r);
|
|
1404
1404
|
};
|
|
1405
|
-
const i =
|
|
1406
|
-
document.addEventListener(i, s[
|
|
1405
|
+
const i = Tt();
|
|
1406
|
+
document.addEventListener(i, s[xe], { passive: !0 });
|
|
1407
1407
|
} catch (t) {
|
|
1408
1408
|
console.error("[maz-ui](vClickOutside)", t);
|
|
1409
1409
|
}
|
|
1410
1410
|
}
|
|
1411
|
-
function
|
|
1411
|
+
function zt(s) {
|
|
1412
1412
|
try {
|
|
1413
|
-
const e =
|
|
1414
|
-
document.removeEventListener(e, s[
|
|
1413
|
+
const e = Tt();
|
|
1414
|
+
document.removeEventListener(e, s[xe], !1), delete s[xe];
|
|
1415
1415
|
} catch (e) {
|
|
1416
1416
|
console.error("[maz-ui](vClickOutside)", e);
|
|
1417
1417
|
}
|
|
1418
1418
|
}
|
|
1419
|
-
function
|
|
1419
|
+
function ks(s, e) {
|
|
1420
1420
|
try {
|
|
1421
1421
|
if (e.value === e.oldValue)
|
|
1422
1422
|
return;
|
|
1423
|
-
|
|
1423
|
+
Lt(s, e);
|
|
1424
1424
|
} catch (t) {
|
|
1425
1425
|
console.error("[maz-ui](vClickOutside)", t);
|
|
1426
1426
|
}
|
|
1427
1427
|
}
|
|
1428
|
-
const
|
|
1429
|
-
mounted:
|
|
1430
|
-
updated:
|
|
1431
|
-
unmounted:
|
|
1432
|
-
},
|
|
1428
|
+
const As = {
|
|
1429
|
+
mounted: Lt,
|
|
1430
|
+
updated: ks,
|
|
1431
|
+
unmounted: zt
|
|
1432
|
+
}, Ss = {
|
|
1433
1433
|
install: (s) => {
|
|
1434
|
-
s.directive("click-outside",
|
|
1434
|
+
s.directive("click-outside", As);
|
|
1435
1435
|
}
|
|
1436
1436
|
};
|
|
1437
|
-
function
|
|
1437
|
+
function Ct(s, e, t) {
|
|
1438
1438
|
var r;
|
|
1439
1439
|
s.stopPropagation();
|
|
1440
1440
|
const n = typeof t.value == "function" ? t.value : t.value.handler, o = typeof t.value == "object" ? t.value.exclude : void 0;
|
|
@@ -1448,36 +1448,36 @@ function zt(s, e, t) {
|
|
|
1448
1448
|
}
|
|
1449
1449
|
!e.contains(s.target) && !i && (n == null || n());
|
|
1450
1450
|
}
|
|
1451
|
-
function
|
|
1451
|
+
function It() {
|
|
1452
1452
|
return document.ontouchstart === null ? "touchstart" : "click";
|
|
1453
1453
|
}
|
|
1454
|
-
function
|
|
1455
|
-
const t =
|
|
1456
|
-
document.removeEventListener(t, (n) =>
|
|
1454
|
+
function xs(s, e) {
|
|
1455
|
+
const t = It();
|
|
1456
|
+
document.removeEventListener(t, (n) => Ct(n, s, e));
|
|
1457
1457
|
}
|
|
1458
|
-
function
|
|
1458
|
+
function Os(s, e) {
|
|
1459
1459
|
if (typeof e.value != "function" && typeof e.value == "object" && typeof e.value.handler != "function") {
|
|
1460
1460
|
console.error("[maz-ui](vClosable) v-closable directive requires a handler function");
|
|
1461
1461
|
return;
|
|
1462
1462
|
}
|
|
1463
|
-
const t =
|
|
1464
|
-
document.addEventListener(t, (n) =>
|
|
1463
|
+
const t = It();
|
|
1464
|
+
document.addEventListener(t, (n) => Ct(n, s, e));
|
|
1465
1465
|
}
|
|
1466
|
-
const
|
|
1467
|
-
mounted:
|
|
1468
|
-
unmounted:
|
|
1469
|
-
},
|
|
1466
|
+
const Ds = {
|
|
1467
|
+
mounted: Os,
|
|
1468
|
+
unmounted: xs
|
|
1469
|
+
}, Ps = {
|
|
1470
1470
|
install: (s) => {
|
|
1471
|
-
s.directive("closable",
|
|
1471
|
+
s.directive("closable", Ds);
|
|
1472
1472
|
}
|
|
1473
|
-
},
|
|
1473
|
+
}, Ne = {
|
|
1474
1474
|
position: "top"
|
|
1475
1475
|
};
|
|
1476
|
-
class
|
|
1476
|
+
class kt {
|
|
1477
1477
|
constructor(e = {}) {
|
|
1478
1478
|
d(this, "options");
|
|
1479
1479
|
this.options = {
|
|
1480
|
-
...
|
|
1480
|
+
...Ne,
|
|
1481
1481
|
...e
|
|
1482
1482
|
};
|
|
1483
1483
|
}
|
|
@@ -1505,24 +1505,24 @@ class Lt {
|
|
|
1505
1505
|
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)}`);
|
|
1506
1506
|
}
|
|
1507
1507
|
}
|
|
1508
|
-
let
|
|
1509
|
-
const
|
|
1508
|
+
let Ie;
|
|
1509
|
+
const to = {
|
|
1510
1510
|
beforeMount(s, e) {
|
|
1511
1511
|
const t = typeof e.value == "object" ? e.value : {};
|
|
1512
|
-
return
|
|
1512
|
+
return Ie = new kt(t), Ie.create(s, e);
|
|
1513
1513
|
},
|
|
1514
1514
|
updated(s, e) {
|
|
1515
|
-
return
|
|
1515
|
+
return Ie.update(s, e);
|
|
1516
1516
|
},
|
|
1517
1517
|
unmounted(s, e) {
|
|
1518
|
-
return
|
|
1518
|
+
return Ie.remove(s, e);
|
|
1519
1519
|
}
|
|
1520
|
-
},
|
|
1521
|
-
install: (s, e =
|
|
1520
|
+
}, Ms = {
|
|
1521
|
+
install: (s, e = Ne) => {
|
|
1522
1522
|
const t = {
|
|
1523
|
-
...
|
|
1523
|
+
...Ne,
|
|
1524
1524
|
...e
|
|
1525
|
-
}, n = new
|
|
1525
|
+
}, n = new kt(t);
|
|
1526
1526
|
s.directive("tooltip", {
|
|
1527
1527
|
beforeMount: n.create.bind(n),
|
|
1528
1528
|
updated: n.update.bind(n),
|
|
@@ -1530,19 +1530,88 @@ const Qn = {
|
|
|
1530
1530
|
});
|
|
1531
1531
|
}
|
|
1532
1532
|
};
|
|
1533
|
-
function
|
|
1533
|
+
function We(s, e) {
|
|
1534
1534
|
let t = e == null ? void 0 : e.element;
|
|
1535
1535
|
function n() {
|
|
1536
|
-
t &&
|
|
1536
|
+
t && Ce(null, t);
|
|
1537
1537
|
}
|
|
1538
1538
|
const o = { ...e == null ? void 0 : e.props, ...e != null && e.addDestroyInProps ? { destroy: n } : {} }, i = J(
|
|
1539
1539
|
s,
|
|
1540
1540
|
o,
|
|
1541
1541
|
e == null ? void 0 : e.children
|
|
1542
1542
|
);
|
|
1543
|
-
return e != null && e.app ? (i.appContext = e.app._context, t ?
|
|
1543
|
+
return e != null && e.app ? (i.appContext = e.app._context, t ? Ce(i, t) : typeof document < "u" && (t = document.createElement("div"), Ce(i, t))) : (t = t ?? document.body, Ce(i, t)), { vNode: i, destroy: n, el: t };
|
|
1544
|
+
}
|
|
1545
|
+
function $s(s) {
|
|
1546
|
+
return !!s;
|
|
1547
|
+
}
|
|
1548
|
+
function so(s) {
|
|
1549
|
+
return [...s].map((e) => {
|
|
1550
|
+
const t = e.codePointAt(0);
|
|
1551
|
+
return t ? t % 32 + 127461 : void 0;
|
|
1552
|
+
}).filter($s).map((e) => String.fromCodePoint(e)).join("");
|
|
1553
|
+
}
|
|
1554
|
+
function no(s, e) {
|
|
1555
|
+
let t;
|
|
1556
|
+
return function(...n) {
|
|
1557
|
+
clearTimeout(t), t = setTimeout(() => {
|
|
1558
|
+
s.apply(this, n);
|
|
1559
|
+
}, e);
|
|
1560
|
+
};
|
|
1544
1561
|
}
|
|
1545
|
-
|
|
1562
|
+
class oo {
|
|
1563
|
+
constructor({ src: e, identifier: t, once: n = !0, async: o = !0, defer: i = !0 }) {
|
|
1564
|
+
d(this, "src");
|
|
1565
|
+
d(this, "script");
|
|
1566
|
+
d(this, "once");
|
|
1567
|
+
d(this, "async");
|
|
1568
|
+
d(this, "defer");
|
|
1569
|
+
d(this, "identifier");
|
|
1570
|
+
if (typeof window > "u")
|
|
1571
|
+
throw new TypeError("[ScriptLoader]: Is supported only on browser side");
|
|
1572
|
+
if (!e)
|
|
1573
|
+
throw new Error('[ScriptLoader]: You should provide the attribut "src"');
|
|
1574
|
+
if (!t)
|
|
1575
|
+
throw new Error('[ScriptLoader]: You should provide the attribut "identifier"');
|
|
1576
|
+
this.src = e, this.identifier = t, this.once = n, this.async = o, this.defer = i;
|
|
1577
|
+
}
|
|
1578
|
+
removeTag(e) {
|
|
1579
|
+
var t;
|
|
1580
|
+
typeof e == "string" ? (t = document.head.querySelector(`[data-identifier="${e}"]`)) == null || t.remove() : e.remove();
|
|
1581
|
+
}
|
|
1582
|
+
load() {
|
|
1583
|
+
const e = window, t = document.head.querySelectorAll(`[data-identifier="${this.identifier}"]`);
|
|
1584
|
+
if (this.once && e[this.identifier] && t.length > 0)
|
|
1585
|
+
return this.script = e[this.identifier], Promise.resolve(this.script);
|
|
1586
|
+
if (!this.once && t.length > 0)
|
|
1587
|
+
for (const n of t)
|
|
1588
|
+
this.removeTag(n);
|
|
1589
|
+
return this.injectScript();
|
|
1590
|
+
}
|
|
1591
|
+
injectScript() {
|
|
1592
|
+
const e = window;
|
|
1593
|
+
return new Promise((t, n) => {
|
|
1594
|
+
try {
|
|
1595
|
+
const o = document.createElement("script");
|
|
1596
|
+
o.src = this.src, o.async = this.async, o.defer = this.defer, o.dataset.identifier = this.identifier, o.addEventListener("error", (i) => n(new Error(`[ScriptLoader](injectScript) ${i.message}`))), o.addEventListener("load", (i) => (this.script = i, e[this.identifier] = i, t(i))), document.head.append(o);
|
|
1597
|
+
} catch (o) {
|
|
1598
|
+
throw new Error(`[ScriptLoader](init) ${o}`);
|
|
1599
|
+
}
|
|
1600
|
+
});
|
|
1601
|
+
}
|
|
1602
|
+
}
|
|
1603
|
+
function Hs(s) {
|
|
1604
|
+
return new Promise((e) => setTimeout(e, s));
|
|
1605
|
+
}
|
|
1606
|
+
function io(s, e) {
|
|
1607
|
+
let t = !1, n, o;
|
|
1608
|
+
return function(...i) {
|
|
1609
|
+
t ? (clearTimeout(n), n = setTimeout(() => {
|
|
1610
|
+
Date.now() - o >= e && (s.apply(this, i), o = Date.now());
|
|
1611
|
+
}, Math.max(e - (Date.now() - o), 0))) : (s.apply(this, i), o = Date.now(), t = !0);
|
|
1612
|
+
};
|
|
1613
|
+
}
|
|
1614
|
+
const Vs = ["onKeypress"], Fs = { class: "m-fullscreen-img-scroller" }, Bs = ["src", "alt"], Ns = /* @__PURE__ */ ge({
|
|
1546
1615
|
__name: "MazFullscreenImg",
|
|
1547
1616
|
props: {
|
|
1548
1617
|
src: {},
|
|
@@ -1560,202 +1629,232 @@ const Ds = ["onKeypress"], Ms = { class: "m-fullscreen-img-scroller" }, Ps = ["s
|
|
|
1560
1629
|
},
|
|
1561
1630
|
emits: ["close", "previous", "next", "before-close"],
|
|
1562
1631
|
setup(s, { emit: e }) {
|
|
1563
|
-
const t = s, n = e, o =
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1632
|
+
const t = s, n = e, o = V(() => import("./MazSpinner-bdGjxsu6.mjs")), i = V(() => import("./x-mark-CnZwVvA7.mjs")), r = V(() => import("./chevron-left-BqVOLRdC.mjs")), a = y(!1), u = y(!1), l = y(!1), h = y(!1), g = y(!1), E = Ft({
|
|
1633
|
+
running: !1,
|
|
1634
|
+
ended: !1
|
|
1635
|
+
}), T = y(t.clickedElement), $ = f(() => t.clickedElement.getBoundingClientRect()), k = y(), c = y(t.src), b = y(t.alt), D = y(), v = y(), x = y(!0), H = f(() => ({
|
|
1636
|
+
"--is-zoomed": g.value,
|
|
1637
|
+
"--invisible": x.value,
|
|
1638
|
+
"--absolute": !g.value
|
|
1639
|
+
}));
|
|
1640
|
+
function L() {
|
|
1641
|
+
var p, w;
|
|
1642
|
+
v.value && (k.value = ((p = v.value) == null ? void 0 : p.naturalWidth) > ((w = v.value) == null ? void 0 : w.naturalHeight)), a.value = !0, u.value = !1, l.value = !0;
|
|
1568
1643
|
}
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
(
|
|
1572
|
-
|
|
1573
|
-
}
|
|
1644
|
+
X(
|
|
1645
|
+
l,
|
|
1646
|
+
async (p) => {
|
|
1647
|
+
p && A();
|
|
1648
|
+
},
|
|
1649
|
+
{ immediate: !0 }
|
|
1574
1650
|
);
|
|
1575
|
-
function
|
|
1576
|
-
n("before-close"),
|
|
1651
|
+
function P() {
|
|
1652
|
+
n("before-close"), O();
|
|
1577
1653
|
}
|
|
1578
|
-
function
|
|
1579
|
-
|
|
1654
|
+
function j(p) {
|
|
1655
|
+
p.key === "Escape" && (p.preventDefault(), P()), (p.key === "ArrowLeft" || p.key === "ArrowRight") && (p.preventDefault(), me(p.key === "ArrowRight" ? "next" : "previous"));
|
|
1580
1656
|
}
|
|
1581
|
-
function
|
|
1657
|
+
function se() {
|
|
1582
1658
|
document.documentElement.classList.add("--m-fullscreen-open");
|
|
1583
1659
|
}
|
|
1584
|
-
function
|
|
1660
|
+
function G() {
|
|
1585
1661
|
document.documentElement.classList.remove("--m-fullscreen-open");
|
|
1586
1662
|
}
|
|
1587
|
-
function
|
|
1663
|
+
function ce() {
|
|
1588
1664
|
return [...document.querySelectorAll(".m-fullscreen-img-instance")];
|
|
1589
1665
|
}
|
|
1590
|
-
function
|
|
1591
|
-
return w < 0 ?
|
|
1666
|
+
function De(p, w) {
|
|
1667
|
+
return w < 0 ? p.length - 1 : w >= p.length ? 0 : w;
|
|
1592
1668
|
}
|
|
1593
|
-
async function
|
|
1594
|
-
|
|
1595
|
-
const
|
|
1596
|
-
|
|
1669
|
+
async function de(p, w) {
|
|
1670
|
+
p.classList.remove(t.openInstanceClass), w.classList.add(t.openInstanceClass);
|
|
1671
|
+
const z = w.getAttribute("data-src"), M = w.getAttribute("data-alt");
|
|
1672
|
+
b.value = M, c.value = z ?? c.value;
|
|
1597
1673
|
}
|
|
1598
|
-
function
|
|
1674
|
+
function me(p) {
|
|
1675
|
+
x.value = !0;
|
|
1599
1676
|
const w = document.querySelector(
|
|
1600
1677
|
`.m-fullscreen-img-instance.${t.openInstanceClass}`
|
|
1601
1678
|
);
|
|
1602
1679
|
if (w) {
|
|
1603
|
-
const
|
|
1604
|
-
|
|
1680
|
+
const z = ce(), M = z.indexOf(w), W = p === "next" ? M + 1 : M - 1, R = z[De(z, W)];
|
|
1681
|
+
T.value = R, R && de(w, R), n(p), a.value = !1, u.value = !0, ct(() => a.value === !0, () => {
|
|
1682
|
+
x.value = !1, g.value ? fe() : m();
|
|
1683
|
+
}, {
|
|
1684
|
+
expectedValue: !0,
|
|
1685
|
+
interval: 100,
|
|
1686
|
+
maxAttempts: 50
|
|
1687
|
+
});
|
|
1605
1688
|
}
|
|
1606
1689
|
}
|
|
1607
|
-
function
|
|
1608
|
-
|
|
1690
|
+
function fe() {
|
|
1691
|
+
const p = v.value;
|
|
1692
|
+
if (!p) {
|
|
1693
|
+
console.error("[maz-ui](vFullscreenImg) ImgElement is not defined");
|
|
1694
|
+
return;
|
|
1695
|
+
}
|
|
1696
|
+
p.style.removeProperty("max-width"), p.style.removeProperty("max-height"), p == null || p.style.removeProperty("top"), p == null || p.style.removeProperty("left"), k.value ? (p.style.height = "100vh", p.style.removeProperty("width")) : (p.style.width = "100vw", p.style.removeProperty("height"));
|
|
1609
1697
|
}
|
|
1610
|
-
async function
|
|
1611
|
-
|
|
1612
|
-
p.value ? (p.value = !p.value, oe()) : (p.value = !p.value, se(m));
|
|
1698
|
+
async function Pe() {
|
|
1699
|
+
g.value ? (g.value = !g.value, m()) : (g.value = !g.value, fe());
|
|
1613
1700
|
}
|
|
1614
|
-
function
|
|
1615
|
-
var
|
|
1616
|
-
|
|
1701
|
+
function ne(p) {
|
|
1702
|
+
var z;
|
|
1703
|
+
E.running = !0, x.value = !1;
|
|
1704
|
+
const w = (z = v.value) == null ? void 0 : z.animate(p, {
|
|
1617
1705
|
duration: t.animation.duration,
|
|
1618
|
-
// Durée de l'animation en millisecondes
|
|
1619
1706
|
easing: t.animation.easing
|
|
1620
|
-
// Fonction d'interpolation pour l'animation inverse
|
|
1621
1707
|
});
|
|
1708
|
+
if (!w) {
|
|
1709
|
+
console.error("[maz-ui](vFullscreenImg) animation is not defined"), E.running = !1, E.ended = !0;
|
|
1710
|
+
return;
|
|
1711
|
+
}
|
|
1712
|
+
return w;
|
|
1622
1713
|
}
|
|
1623
|
-
function
|
|
1624
|
-
const w =
|
|
1625
|
-
(M - 2 *
|
|
1626
|
-
(W - 2 *
|
|
1627
|
-
),
|
|
1714
|
+
function Le(p = t.offset ?? 0) {
|
|
1715
|
+
const w = T.value.clientWidth || 1, z = T.value.clientHeight || 1, M = window.innerWidth, W = window.innerHeight, R = Math.min(
|
|
1716
|
+
(M - 2 * p) / w,
|
|
1717
|
+
(W - 2 * p) / z
|
|
1718
|
+
), Me = (M - w * R) / 2, $e = (W - z * R) / 2;
|
|
1628
1719
|
return {
|
|
1629
|
-
centerX:
|
|
1630
|
-
centerY:
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
scale:
|
|
1720
|
+
centerX: Me,
|
|
1721
|
+
centerY: $e,
|
|
1722
|
+
width: w,
|
|
1723
|
+
height: z,
|
|
1724
|
+
scale: R
|
|
1634
1725
|
};
|
|
1635
1726
|
}
|
|
1636
|
-
function
|
|
1637
|
-
const {
|
|
1727
|
+
function ze({ trigger: p }) {
|
|
1728
|
+
const { width: w, height: z, scale: M, centerX: W, centerY: R } = Le(), { top: Me, left: $e, width: Ot, height: Dt } = $.value, Ke = [
|
|
1638
1729
|
{
|
|
1639
|
-
top: `${
|
|
1640
|
-
left: `${
|
|
1641
|
-
width: `${
|
|
1642
|
-
height: `${
|
|
1730
|
+
top: `${Me}px`,
|
|
1731
|
+
left: `${$e}px`,
|
|
1732
|
+
width: `${Ot}px`,
|
|
1733
|
+
height: `${Dt}px`,
|
|
1643
1734
|
opacity: 0
|
|
1644
1735
|
},
|
|
1645
1736
|
{
|
|
1646
|
-
top: `${
|
|
1737
|
+
top: `${R}px`,
|
|
1647
1738
|
left: `${W}px`,
|
|
1648
1739
|
width: `${w * M}px`,
|
|
1649
|
-
height: `${
|
|
1740
|
+
height: `${z * M}px`,
|
|
1650
1741
|
opacity: 1
|
|
1651
1742
|
}
|
|
1652
1743
|
];
|
|
1653
1744
|
return {
|
|
1654
|
-
frames:
|
|
1745
|
+
frames: p === "open" ? Ke : Ke.reverse()
|
|
1655
1746
|
};
|
|
1656
1747
|
}
|
|
1657
|
-
function
|
|
1658
|
-
const {
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
height: `${
|
|
1748
|
+
function m() {
|
|
1749
|
+
const { height: p, width: w, scale: z } = Le(), M = k.value ? {
|
|
1750
|
+
width: `${w * z}px`,
|
|
1751
|
+
maxHeight: `${p * z}px`
|
|
1752
|
+
} : {
|
|
1753
|
+
height: `${p * z}px`,
|
|
1754
|
+
maxWidth: `${w * z}px`
|
|
1663
1755
|
};
|
|
1664
|
-
if (!
|
|
1665
|
-
|
|
1666
|
-
|
|
1756
|
+
if (!v.value) {
|
|
1757
|
+
console.error("[maz-ui](vFullscreenImg) ImgElement is not defined");
|
|
1758
|
+
return;
|
|
1759
|
+
}
|
|
1760
|
+
k.value ? (v.value.style.removeProperty("height"), v.value.style.removeProperty("maxHeight")) : (v.value.style.removeProperty("width"), v.value.style.removeProperty("maxWidth")), Object.assign(v.value.style, M);
|
|
1667
1761
|
}
|
|
1668
|
-
function
|
|
1669
|
-
const { frames:
|
|
1762
|
+
function A() {
|
|
1763
|
+
const { frames: p } = ze({
|
|
1670
1764
|
trigger: "open"
|
|
1671
|
-
}), w =
|
|
1672
|
-
if (!w)
|
|
1673
|
-
|
|
1765
|
+
}), w = ne(p);
|
|
1766
|
+
if (!w) {
|
|
1767
|
+
console.error("[maz-ui](vFullscreenImg) open animation is not defined"), m();
|
|
1768
|
+
return;
|
|
1769
|
+
}
|
|
1674
1770
|
w.onfinish = () => {
|
|
1675
|
-
|
|
1771
|
+
m(), E.running = !1, E.ended = !0;
|
|
1676
1772
|
};
|
|
1677
1773
|
}
|
|
1678
|
-
function
|
|
1679
|
-
const { frames:
|
|
1774
|
+
function O() {
|
|
1775
|
+
const { frames: p } = ze({
|
|
1680
1776
|
trigger: "close"
|
|
1681
|
-
}), w =
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1777
|
+
}), w = ne(p);
|
|
1778
|
+
function z() {
|
|
1779
|
+
var M, W;
|
|
1780
|
+
n("close"), (M = D.value) == null || M.remove(), (W = t.destroy) == null || W.call(t), E.running = !1, E.ended = !0;
|
|
1781
|
+
}
|
|
1782
|
+
if (!w) {
|
|
1783
|
+
console.error("[maz-ui](vFullscreenImg) close animation is not defined"), z();
|
|
1784
|
+
return;
|
|
1785
|
+
}
|
|
1786
|
+
w.onfinish = z;
|
|
1688
1787
|
}
|
|
1689
|
-
function
|
|
1690
|
-
|
|
1788
|
+
function he() {
|
|
1789
|
+
g.value || m();
|
|
1691
1790
|
}
|
|
1692
|
-
return
|
|
1693
|
-
u.value = !0, document.addEventListener("keydown",
|
|
1694
|
-
}),
|
|
1695
|
-
document.removeEventListener("keydown",
|
|
1696
|
-
}), (
|
|
1791
|
+
return ue(() => {
|
|
1792
|
+
u.value = !0, document.addEventListener("keydown", j), window.addEventListener("resize", he), se(), h.value = ce().length > 1;
|
|
1793
|
+
}), rt(() => {
|
|
1794
|
+
document.removeEventListener("keydown", j), window.removeEventListener("resize", he), G();
|
|
1795
|
+
}), (p, w) => (C(), _("div", {
|
|
1697
1796
|
ref_key: "FullscreenImgElement",
|
|
1698
|
-
ref:
|
|
1797
|
+
ref: D,
|
|
1699
1798
|
role: "button",
|
|
1700
1799
|
class: "m-fullscreen-img",
|
|
1701
1800
|
tabindex: "0",
|
|
1702
|
-
onClick:
|
|
1703
|
-
onKeypress:
|
|
1801
|
+
onClick: Y(P, ["stop"]),
|
|
1802
|
+
onKeypress: Bt(Y(P, ["prevent"]), ["esc"])
|
|
1704
1803
|
}, [
|
|
1705
|
-
|
|
1706
|
-
A(o),
|
|
1707
|
-
{ class: "m-fullscreen-img-loader maz-h-16" },
|
|
1708
|
-
null,
|
|
1709
|
-
512
|
|
1710
|
-
/* NEED_PATCH */
|
|
1711
|
-
), [
|
|
1712
|
-
[rt, u.value]
|
|
1713
|
-
]),
|
|
1714
|
-
l.value && h.value ? (L(), U("button", {
|
|
1804
|
+
l.value && h.value ? (C(), _("button", {
|
|
1715
1805
|
key: 0,
|
|
1716
1806
|
type: "button",
|
|
1717
1807
|
class: "m-fullscreen-btn --next",
|
|
1718
|
-
onClick: w[0] || (w[0] =
|
|
1808
|
+
onClick: w[0] || (w[0] = Y((z) => me("next"), ["stop"]))
|
|
1719
1809
|
}, [
|
|
1720
|
-
J(
|
|
1721
|
-
])) :
|
|
1722
|
-
l.value && h.value ? (
|
|
1810
|
+
J(S(r), { class: "maz-rotate-180" })
|
|
1811
|
+
])) : I("v-if", !0),
|
|
1812
|
+
l.value && h.value ? (C(), _("button", {
|
|
1723
1813
|
key: 1,
|
|
1724
1814
|
type: "button",
|
|
1725
1815
|
class: "m-fullscreen-btn --previous",
|
|
1726
|
-
onClick: w[1] || (w[1] =
|
|
1816
|
+
onClick: w[1] || (w[1] = Y((z) => me("previous"), ["stop"]))
|
|
1727
1817
|
}, [
|
|
1728
|
-
J(
|
|
1729
|
-
])) :
|
|
1730
|
-
|
|
1818
|
+
J(S(r))
|
|
1819
|
+
])) : I("v-if", !0),
|
|
1820
|
+
F("button", {
|
|
1731
1821
|
type: "button",
|
|
1732
1822
|
class: "m-fullscreen-btn --close",
|
|
1733
|
-
onClick:
|
|
1823
|
+
onClick: P
|
|
1734
1824
|
}, [
|
|
1735
|
-
J(
|
|
1825
|
+
J(S(i))
|
|
1736
1826
|
]),
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1827
|
+
F("div", Fs, [
|
|
1828
|
+
I(" eslint-disable-next-line vuejs-accessibility/no-static-element-interactions, vuejs-accessibility/click-events-have-key-events "),
|
|
1829
|
+
F("img", {
|
|
1740
1830
|
ref_key: "ImgElement",
|
|
1741
|
-
ref:
|
|
1742
|
-
src:
|
|
1743
|
-
alt:
|
|
1831
|
+
ref: v,
|
|
1832
|
+
src: c.value,
|
|
1833
|
+
alt: b.value ?? void 0,
|
|
1744
1834
|
tabindex: "0",
|
|
1745
|
-
class:
|
|
1746
|
-
onLoad:
|
|
1747
|
-
onClick: w[2] || (w[2] =
|
|
1748
|
-
}, null, 42,
|
|
1835
|
+
class: le([H.value]),
|
|
1836
|
+
onLoad: L,
|
|
1837
|
+
onClick: w[2] || (w[2] = Y((z) => p.zoom && Pe(), ["stop"]))
|
|
1838
|
+
}, null, 42, Bs),
|
|
1839
|
+
at(J(
|
|
1840
|
+
S(o),
|
|
1841
|
+
{ class: "m-fullscreen-img-loader" },
|
|
1842
|
+
null,
|
|
1843
|
+
512
|
|
1844
|
+
/* NEED_PATCH */
|
|
1845
|
+
), [
|
|
1846
|
+
[lt, u.value]
|
|
1847
|
+
])
|
|
1749
1848
|
])
|
|
1750
|
-
], 40,
|
|
1849
|
+
], 40, Vs));
|
|
1751
1850
|
}
|
|
1752
|
-
}),
|
|
1851
|
+
}), Re = (s, e) => {
|
|
1753
1852
|
const t = s.__vccOpts || s;
|
|
1754
1853
|
for (const [n, o] of e)
|
|
1755
1854
|
t[n] = o;
|
|
1756
1855
|
return t;
|
|
1757
|
-
},
|
|
1758
|
-
class
|
|
1856
|
+
}, js = /* @__PURE__ */ Re(Ns, [["__scopeId", "data-v-b6e5fc28"]]), Je = "m-fullscreen-is-open";
|
|
1857
|
+
class Us {
|
|
1759
1858
|
constructor() {
|
|
1760
1859
|
d(this, "options");
|
|
1761
1860
|
d(this, "defaultOptions", {
|
|
@@ -1812,10 +1911,10 @@ class Vs {
|
|
|
1812
1911
|
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 = "";
|
|
1813
1912
|
}
|
|
1814
1913
|
renderPreview(e) {
|
|
1815
|
-
return e.classList.add(
|
|
1914
|
+
return e.classList.add(Je), We(js, {
|
|
1816
1915
|
props: {
|
|
1817
1916
|
...this.options,
|
|
1818
|
-
openInstanceClass:
|
|
1917
|
+
openInstanceClass: Je,
|
|
1819
1918
|
clickedElement: e,
|
|
1820
1919
|
clickedElementBounds: e.getBoundingClientRect()
|
|
1821
1920
|
},
|
|
@@ -1829,22 +1928,22 @@ class Vs {
|
|
|
1829
1928
|
e.style.zIndex = "1", this.options.scaleOnHover && (e.style.transform = "scale(1.04)"), this.options.blurOnHover && (e.style.filter = "blur(3px)");
|
|
1830
1929
|
}
|
|
1831
1930
|
}
|
|
1832
|
-
let
|
|
1833
|
-
const
|
|
1931
|
+
let ke;
|
|
1932
|
+
const _s = {
|
|
1834
1933
|
mounted(s, e) {
|
|
1835
|
-
return
|
|
1934
|
+
return ke = new Us(), ke.create(s, e);
|
|
1836
1935
|
},
|
|
1837
1936
|
updated(s, e) {
|
|
1838
|
-
return
|
|
1937
|
+
return ke.update(s, e);
|
|
1839
1938
|
},
|
|
1840
1939
|
unmounted(s) {
|
|
1841
|
-
return
|
|
1940
|
+
return ke.remove(s);
|
|
1842
1941
|
}
|
|
1843
|
-
},
|
|
1942
|
+
}, qs = {
|
|
1844
1943
|
install(s) {
|
|
1845
|
-
s.directive("fullscreen-img",
|
|
1944
|
+
s.directive("fullscreen-img", _s);
|
|
1846
1945
|
}
|
|
1847
|
-
},
|
|
1946
|
+
}, Ws = "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7", je = {
|
|
1848
1947
|
baseClass: "m-lazy-img",
|
|
1849
1948
|
loadedClass: "m-lazy-loaded",
|
|
1850
1949
|
loadingClass: "m-lazy-loading",
|
|
@@ -1858,10 +1957,10 @@ const Bs = {
|
|
|
1858
1957
|
threshold: 0.1
|
|
1859
1958
|
}
|
|
1860
1959
|
};
|
|
1861
|
-
class
|
|
1960
|
+
class At {
|
|
1862
1961
|
constructor(e = {}) {
|
|
1863
1962
|
d(this, "observers", []);
|
|
1864
|
-
d(this, "defaultOptions",
|
|
1963
|
+
d(this, "defaultOptions", je);
|
|
1865
1964
|
d(this, "options");
|
|
1866
1965
|
d(this, "onImgLoadedCallback");
|
|
1867
1966
|
d(this, "onImgErrorCallback");
|
|
@@ -1999,7 +2098,7 @@ class Ct {
|
|
|
1999
2098
|
async add(e, t) {
|
|
2000
2099
|
if (this.hasBgImgMode(t) && this.isPictureElement(e))
|
|
2001
2100
|
throw new Error(`[MazLazyImg] You can't use the "bg-image" mode with "<picture />" element`);
|
|
2002
|
-
setTimeout(() => this.setBaseClass(e), 0), e.getAttribute("src") || this.setImgSrc(e,
|
|
2101
|
+
setTimeout(() => this.setBaseClass(e), 0), e.getAttribute("src") || this.setImgSrc(e, Ws), await this.bindUpdateHandler(e, t, "bind");
|
|
2003
2102
|
}
|
|
2004
2103
|
async update(e, t) {
|
|
2005
2104
|
t.value !== t.oldValue && (this.hasImgLoaded = !1, this.removeAllStateClasses(e), await this.bindUpdateHandler(e, t, "update"));
|
|
@@ -2011,35 +2110,35 @@ class Ct {
|
|
|
2011
2110
|
this.observers = [];
|
|
2012
2111
|
}
|
|
2013
2112
|
}
|
|
2014
|
-
let
|
|
2015
|
-
const
|
|
2113
|
+
let Ae;
|
|
2114
|
+
const ro = {
|
|
2016
2115
|
created(s, e) {
|
|
2017
2116
|
const t = typeof e.value == "object" ? e.value : {};
|
|
2018
|
-
|
|
2117
|
+
Ae = new At(t), Ae.add(s, e);
|
|
2019
2118
|
},
|
|
2020
2119
|
updated(s, e) {
|
|
2021
|
-
|
|
2120
|
+
Ae.update(s, e);
|
|
2022
2121
|
},
|
|
2023
2122
|
unmounted(s, e) {
|
|
2024
|
-
|
|
2123
|
+
Ae.remove(s, e);
|
|
2025
2124
|
}
|
|
2026
|
-
},
|
|
2125
|
+
}, Rs = {
|
|
2027
2126
|
install(s, e = {}) {
|
|
2028
2127
|
const t = {
|
|
2029
|
-
...
|
|
2128
|
+
...je,
|
|
2030
2129
|
...e,
|
|
2031
2130
|
observerOptions: {
|
|
2032
|
-
...
|
|
2131
|
+
...je.observerOptions,
|
|
2033
2132
|
...e.observerOptions
|
|
2034
2133
|
}
|
|
2035
|
-
}, n = new
|
|
2134
|
+
}, n = new At(t);
|
|
2036
2135
|
s.directive("lazy-img", {
|
|
2037
2136
|
created: n.add.bind(n),
|
|
2038
2137
|
updated: n.update.bind(n),
|
|
2039
2138
|
unmounted: n.remove.bind(n)
|
|
2040
2139
|
});
|
|
2041
2140
|
}
|
|
2042
|
-
},
|
|
2141
|
+
}, Ks = `
|
|
2043
2142
|
.maz-zoom-img {
|
|
2044
2143
|
position: fixed;
|
|
2045
2144
|
top: 0;
|
|
@@ -2162,13 +2261,13 @@ const Jn = {
|
|
|
2162
2261
|
|
|
2163
2262
|
.maz-zoom-img .maz-zoom-btn:hover {
|
|
2164
2263
|
background-color: hsl(0, 0%, 0%);
|
|
2165
|
-
}`,
|
|
2264
|
+
}`, et = {
|
|
2166
2265
|
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>',
|
|
2167
2266
|
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>',
|
|
2168
2267
|
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>',
|
|
2169
2268
|
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>'
|
|
2170
2269
|
};
|
|
2171
|
-
class
|
|
2270
|
+
class Ys {
|
|
2172
2271
|
constructor(e) {
|
|
2173
2272
|
d(this, "options");
|
|
2174
2273
|
d(this, "loader");
|
|
@@ -2215,7 +2314,7 @@ class _s {
|
|
|
2215
2314
|
e.classList.add(
|
|
2216
2315
|
"maz-is-open"
|
|
2217
2316
|
/* OPEN */
|
|
2218
|
-
), this.addStyle(
|
|
2317
|
+
), this.addStyle(Ks);
|
|
2219
2318
|
const n = document.createElement("div");
|
|
2220
2319
|
n.classList.add("maz-zoom-img"), n.setAttribute("id", "MazImgPreviewFullsize"), n.addEventListener("click", (o) => {
|
|
2221
2320
|
n.isEqualNode(o.target) && this.closePreview();
|
|
@@ -2236,7 +2335,7 @@ class _s {
|
|
|
2236
2335
|
}
|
|
2237
2336
|
getLoader() {
|
|
2238
2337
|
const e = document.createElement("div");
|
|
2239
|
-
return e.classList.add("maz-zoom-img__loader"), e.innerHTML =
|
|
2338
|
+
return e.classList.add("maz-zoom-img__loader"), e.innerHTML = et.spinner, e;
|
|
2240
2339
|
}
|
|
2241
2340
|
mouseLeave(e) {
|
|
2242
2341
|
this.options.scale && (e.style.transform = ""), this.options.blur && (e.style.filter = ""), e.style.zIndex = "";
|
|
@@ -2249,7 +2348,7 @@ class _s {
|
|
|
2249
2348
|
}
|
|
2250
2349
|
getButton(e = "close") {
|
|
2251
2350
|
const t = document.createElement("button");
|
|
2252
|
-
t.innerHTML =
|
|
2351
|
+
t.innerHTML = et[e];
|
|
2253
2352
|
const n = e === "close" ? this.closePreview() : this.allInstances ? this.nextPreviousImage(e === "next") : null;
|
|
2254
2353
|
return t.addEventListener("click", () => n), t.classList.add("maz-zoom-btn"), t.classList.add(`maz-zoom-btn--${e}`), t;
|
|
2255
2354
|
}
|
|
@@ -2302,47 +2401,47 @@ class _s {
|
|
|
2302
2401
|
this.img.removeEventListener("load", this.onImgLoadedCallback);
|
|
2303
2402
|
}
|
|
2304
2403
|
}
|
|
2305
|
-
let
|
|
2306
|
-
const
|
|
2404
|
+
let Se;
|
|
2405
|
+
const Zs = {
|
|
2307
2406
|
created(s, e) {
|
|
2308
|
-
|
|
2407
|
+
Se = new Ys(e), Se.create(s);
|
|
2309
2408
|
},
|
|
2310
2409
|
updated(s, e) {
|
|
2311
|
-
|
|
2410
|
+
Se.update(e);
|
|
2312
2411
|
},
|
|
2313
2412
|
unmounted(s) {
|
|
2314
|
-
|
|
2413
|
+
Se.remove(s);
|
|
2315
2414
|
}
|
|
2316
|
-
},
|
|
2415
|
+
}, Xs = {
|
|
2317
2416
|
install(s) {
|
|
2318
|
-
s.directive("zoom-img",
|
|
2319
|
-
}
|
|
2320
|
-
},
|
|
2321
|
-
|
|
2322
|
-
|
|
2323
|
-
|
|
2324
|
-
|
|
2325
|
-
|
|
2326
|
-
|
|
2327
|
-
],
|
|
2417
|
+
s.directive("zoom-img", Zs);
|
|
2418
|
+
}
|
|
2419
|
+
}, Gs = [
|
|
2420
|
+
Ps,
|
|
2421
|
+
Xs,
|
|
2422
|
+
Rs,
|
|
2423
|
+
Ss,
|
|
2424
|
+
qs,
|
|
2425
|
+
Ms
|
|
2426
|
+
], ao = {
|
|
2328
2427
|
install(s) {
|
|
2329
|
-
for (const e of
|
|
2428
|
+
for (const e of Gs)
|
|
2330
2429
|
e.install(s, {});
|
|
2331
2430
|
}
|
|
2332
2431
|
};
|
|
2333
|
-
function
|
|
2432
|
+
function Qs(s) {
|
|
2334
2433
|
return s ? (s = s.toString(), s.charAt(0).toUpperCase() + s.slice(1)) : "";
|
|
2335
2434
|
}
|
|
2336
|
-
const
|
|
2435
|
+
const Js = {
|
|
2337
2436
|
style: "currency",
|
|
2338
2437
|
minimumFractionDigits: 2,
|
|
2339
2438
|
round: !1
|
|
2340
2439
|
};
|
|
2341
|
-
function
|
|
2440
|
+
function en(s, e, t) {
|
|
2342
2441
|
let n = Number(s);
|
|
2343
2442
|
return t.round && (n = Math.floor(n), t.minimumFractionDigits = 0), new Intl.NumberFormat(e, t).format(n);
|
|
2344
2443
|
}
|
|
2345
|
-
function
|
|
2444
|
+
function tn(s, e, t) {
|
|
2346
2445
|
if (s === void 0)
|
|
2347
2446
|
throw new TypeError("[maz-ui](FilterCurrency) The `number` attribute is required.");
|
|
2348
2447
|
if (e === void 0)
|
|
@@ -2352,29 +2451,29 @@ function Xs(s, e, t) {
|
|
|
2352
2451
|
if (t.currency === void 0)
|
|
2353
2452
|
throw new TypeError("[maz-ui](FilterCurrency) The `options.currency` attribute is required.");
|
|
2354
2453
|
}
|
|
2355
|
-
function
|
|
2454
|
+
function sn(s, e, t) {
|
|
2356
2455
|
const n = {
|
|
2357
|
-
...
|
|
2456
|
+
...Js,
|
|
2358
2457
|
...t
|
|
2359
2458
|
};
|
|
2360
|
-
|
|
2459
|
+
tn(s, e, n);
|
|
2361
2460
|
try {
|
|
2362
|
-
return
|
|
2461
|
+
return en(s, e, n);
|
|
2363
2462
|
} catch (o) {
|
|
2364
2463
|
throw new Error(`[maz-ui](FilterCurrency) ${o}`);
|
|
2365
2464
|
}
|
|
2366
2465
|
}
|
|
2367
|
-
const
|
|
2466
|
+
const nn = {
|
|
2368
2467
|
month: "short",
|
|
2369
2468
|
day: "numeric",
|
|
2370
2469
|
year: "numeric"
|
|
2371
2470
|
};
|
|
2372
|
-
function
|
|
2471
|
+
function on(s, e, t) {
|
|
2373
2472
|
if (e === void 0)
|
|
2374
2473
|
throw new TypeError("[maz-ui](FilterDate) The `locale` attribute is required.");
|
|
2375
2474
|
if (typeof e != "string")
|
|
2376
2475
|
throw new TypeError("[maz-ui](FilterDate) The `locale` attribute must be a string.");
|
|
2377
|
-
const n = t ??
|
|
2476
|
+
const n = t ?? nn;
|
|
2378
2477
|
try {
|
|
2379
2478
|
const o = s instanceof Date ? s : new Date(s);
|
|
2380
2479
|
return new Intl.DateTimeFormat(e, n).format(o);
|
|
@@ -2382,12 +2481,12 @@ function Js(s, e, t) {
|
|
|
2382
2481
|
throw new Error(`[maz-ui](FilterDate) ${o}`);
|
|
2383
2482
|
}
|
|
2384
2483
|
}
|
|
2385
|
-
const
|
|
2484
|
+
const rn = {
|
|
2386
2485
|
minimumFractionDigits: 2
|
|
2387
2486
|
};
|
|
2388
|
-
function
|
|
2487
|
+
function an(s, e, t) {
|
|
2389
2488
|
const n = {
|
|
2390
|
-
...
|
|
2489
|
+
...rn,
|
|
2391
2490
|
...t
|
|
2392
2491
|
};
|
|
2393
2492
|
if (s === void 0)
|
|
@@ -2402,86 +2501,16 @@ function tn(s, e, t) {
|
|
|
2402
2501
|
throw new Error(`[maz-ui](FilterNumber) ${o}`);
|
|
2403
2502
|
}
|
|
2404
2503
|
}
|
|
2405
|
-
const
|
|
2406
|
-
capitalize:
|
|
2407
|
-
currency:
|
|
2408
|
-
date:
|
|
2409
|
-
number:
|
|
2410
|
-
},
|
|
2504
|
+
const ln = {
|
|
2505
|
+
capitalize: Qs,
|
|
2506
|
+
currency: sn,
|
|
2507
|
+
date: on,
|
|
2508
|
+
number: an
|
|
2509
|
+
}, lo = {
|
|
2411
2510
|
install(s) {
|
|
2412
|
-
s.provide("filters",
|
|
2511
|
+
s.provide("filters", ln);
|
|
2413
2512
|
}
|
|
2414
|
-
}
|
|
2415
|
-
function nn(s) {
|
|
2416
|
-
return !!s;
|
|
2417
|
-
}
|
|
2418
|
-
function so(s) {
|
|
2419
|
-
return [...s].map((e) => {
|
|
2420
|
-
const t = e.codePointAt(0);
|
|
2421
|
-
return t ? t % 32 + 127461 : void 0;
|
|
2422
|
-
}).filter(nn).map((e) => String.fromCodePoint(e)).join("");
|
|
2423
|
-
}
|
|
2424
|
-
function no(s, e) {
|
|
2425
|
-
let t;
|
|
2426
|
-
return function(...n) {
|
|
2427
|
-
clearTimeout(t), t = setTimeout(() => {
|
|
2428
|
-
s.apply(this, n);
|
|
2429
|
-
}, e);
|
|
2430
|
-
};
|
|
2431
|
-
}
|
|
2432
|
-
class oo {
|
|
2433
|
-
constructor({ src: e, identifier: t, once: n = !0, async: o = !0, defer: i = !0 }) {
|
|
2434
|
-
d(this, "src");
|
|
2435
|
-
d(this, "script");
|
|
2436
|
-
d(this, "once");
|
|
2437
|
-
d(this, "async");
|
|
2438
|
-
d(this, "defer");
|
|
2439
|
-
d(this, "identifier");
|
|
2440
|
-
if (typeof window > "u")
|
|
2441
|
-
throw new TypeError("[ScriptLoader]: Is supported only on browser side");
|
|
2442
|
-
if (!e)
|
|
2443
|
-
throw new Error('[ScriptLoader]: You should provide the attribut "src"');
|
|
2444
|
-
if (!t)
|
|
2445
|
-
throw new Error('[ScriptLoader]: You should provide the attribut "identifier"');
|
|
2446
|
-
this.src = e, this.identifier = t, this.once = n, this.async = o, this.defer = i;
|
|
2447
|
-
}
|
|
2448
|
-
removeTag(e) {
|
|
2449
|
-
var t;
|
|
2450
|
-
typeof e == "string" ? (t = document.head.querySelector(`[data-identifier="${e}"]`)) == null || t.remove() : e.remove();
|
|
2451
|
-
}
|
|
2452
|
-
load() {
|
|
2453
|
-
const e = window, t = document.head.querySelectorAll(`[data-identifier="${this.identifier}"]`);
|
|
2454
|
-
if (this.once && e[this.identifier] && t.length > 0)
|
|
2455
|
-
return this.script = e[this.identifier], Promise.resolve(this.script);
|
|
2456
|
-
if (!this.once && t.length > 0)
|
|
2457
|
-
for (const n of t)
|
|
2458
|
-
this.removeTag(n);
|
|
2459
|
-
return this.injectScript();
|
|
2460
|
-
}
|
|
2461
|
-
injectScript() {
|
|
2462
|
-
const e = window;
|
|
2463
|
-
return new Promise((t, n) => {
|
|
2464
|
-
try {
|
|
2465
|
-
const o = document.createElement("script");
|
|
2466
|
-
o.src = this.src, o.async = this.async, o.defer = this.defer, o.dataset.identifier = this.identifier, o.addEventListener("error", (i) => n(new Error(`[ScriptLoader](injectScript) ${i.message}`))), o.addEventListener("load", (i) => (this.script = i, e[this.identifier] = i, t(i))), document.head.append(o);
|
|
2467
|
-
} catch (o) {
|
|
2468
|
-
throw new Error(`[ScriptLoader](init) ${o}`);
|
|
2469
|
-
}
|
|
2470
|
-
});
|
|
2471
|
-
}
|
|
2472
|
-
}
|
|
2473
|
-
function on(s) {
|
|
2474
|
-
return new Promise((e) => setTimeout(e, s));
|
|
2475
|
-
}
|
|
2476
|
-
function io(s, e) {
|
|
2477
|
-
let t = !1, n, o;
|
|
2478
|
-
return function(...i) {
|
|
2479
|
-
t ? (clearTimeout(n), n = setTimeout(() => {
|
|
2480
|
-
Date.now() - o >= e && (s.apply(this, i), o = Date.now());
|
|
2481
|
-
}, Math.max(e - (Date.now() - o), 0))) : (s.apply(this, i), o = Date.now(), t = !0);
|
|
2482
|
-
};
|
|
2483
|
-
}
|
|
2484
|
-
const He = {
|
|
2513
|
+
}, Fe = {
|
|
2485
2514
|
delay: 100,
|
|
2486
2515
|
observer: {
|
|
2487
2516
|
root: void 0,
|
|
@@ -2494,17 +2523,17 @@ const He = {
|
|
|
2494
2523
|
delay: 0
|
|
2495
2524
|
}
|
|
2496
2525
|
};
|
|
2497
|
-
class
|
|
2526
|
+
class un {
|
|
2498
2527
|
constructor(e) {
|
|
2499
2528
|
d(this, "options");
|
|
2500
2529
|
this.options = {
|
|
2501
|
-
delay: (e == null ? void 0 : e.delay) ??
|
|
2530
|
+
delay: (e == null ? void 0 : e.delay) ?? Fe.delay,
|
|
2502
2531
|
observer: {
|
|
2503
|
-
...
|
|
2532
|
+
...Fe.observer,
|
|
2504
2533
|
...e == null ? void 0 : e.observer
|
|
2505
2534
|
},
|
|
2506
2535
|
animation: {
|
|
2507
|
-
...
|
|
2536
|
+
...Fe.animation,
|
|
2508
2537
|
...e == null ? void 0 : e.animation
|
|
2509
2538
|
}
|
|
2510
2539
|
};
|
|
@@ -2522,10 +2551,10 @@ class rn {
|
|
|
2522
2551
|
for (const a of r) {
|
|
2523
2552
|
const u = a.getAttribute("data-maz-aos-once"), l = typeof u == "string" ? u === "true" : this.options.animation.once;
|
|
2524
2553
|
if (typeof this.options.observer.threshold == "number" && n.intersectionRatio > this.options.observer.threshold) {
|
|
2525
|
-
const h = a.getAttribute("data-maz-aos-duration"),
|
|
2554
|
+
const h = a.getAttribute("data-maz-aos-duration"), g = a.getAttribute("data-maz-aos-delay");
|
|
2526
2555
|
if (h || (a.style.transitionDuration = `${this.options.animation.duration}ms`, setTimeout(() => {
|
|
2527
2556
|
a.style.transitionDuration = "0";
|
|
2528
|
-
}, 1e3)),
|
|
2557
|
+
}, 1e3)), g || (a.style.transitionDelay = `${this.options.animation.delay}ms`, setTimeout(() => {
|
|
2529
2558
|
a.style.transitionDelay = "0";
|
|
2530
2559
|
}, 1e3)), a.classList.add("maz-aos-animate"), l) {
|
|
2531
2560
|
const E = a.getAttribute("data-maz-aos-anchor");
|
|
@@ -2541,7 +2570,7 @@ class rn {
|
|
|
2541
2570
|
}
|
|
2542
2571
|
}
|
|
2543
2572
|
async handleObserver() {
|
|
2544
|
-
await
|
|
2573
|
+
await Hs(this.options.delay);
|
|
2545
2574
|
const e = new IntersectionObserver(this.handleIntersect.bind(this), this.options.observer);
|
|
2546
2575
|
for (const t of document.querySelectorAll("[data-maz-aos]")) {
|
|
2547
2576
|
const n = t.getAttribute("data-maz-aos-anchor");
|
|
@@ -2553,23 +2582,23 @@ class rn {
|
|
|
2553
2582
|
}
|
|
2554
2583
|
}
|
|
2555
2584
|
runAnimations() {
|
|
2556
|
-
if (
|
|
2585
|
+
if (N())
|
|
2557
2586
|
return this.handleObserver();
|
|
2558
2587
|
console.warn("[MazAos](runAnimations) should be executed on client side");
|
|
2559
2588
|
}
|
|
2560
2589
|
}
|
|
2561
|
-
let
|
|
2562
|
-
const
|
|
2590
|
+
let ve;
|
|
2591
|
+
const uo = {
|
|
2563
2592
|
install: (s, e) => {
|
|
2564
|
-
|
|
2565
|
-
|
|
2566
|
-
}) :
|
|
2593
|
+
ve = new un(e), s.provide("aos", ve), N() && (e != null && e.router ? e.router.afterEach(async () => {
|
|
2594
|
+
ve.runAnimations();
|
|
2595
|
+
}) : ve.runAnimations());
|
|
2567
2596
|
}
|
|
2568
2597
|
};
|
|
2569
|
-
function
|
|
2570
|
-
return
|
|
2598
|
+
function co() {
|
|
2599
|
+
return ve;
|
|
2571
2600
|
}
|
|
2572
|
-
const
|
|
2601
|
+
const tt = "--backdrop-present", cn = /* @__PURE__ */ ge({
|
|
2573
2602
|
inheritAttrs: !1,
|
|
2574
2603
|
__name: "MazBackdrop",
|
|
2575
2604
|
props: {
|
|
@@ -2586,24 +2615,24 @@ const Je = "--backdrop-present", an = /* @__PURE__ */ ve({
|
|
|
2586
2615
|
setup(s, { expose: e, emit: t }) {
|
|
2587
2616
|
const n = s, o = t;
|
|
2588
2617
|
function i() {
|
|
2589
|
-
document.documentElement.classList.add(
|
|
2618
|
+
document.documentElement.classList.add(tt);
|
|
2590
2619
|
}
|
|
2591
2620
|
async function r() {
|
|
2592
|
-
document.querySelector(".m-backdrop.--present") || document.documentElement.classList.remove(
|
|
2621
|
+
document.querySelector(".m-backdrop.--present") || document.documentElement.classList.remove(tt);
|
|
2593
2622
|
}
|
|
2594
2623
|
const a = y(n.modelValue);
|
|
2595
2624
|
function u() {
|
|
2596
2625
|
l(!1);
|
|
2597
2626
|
}
|
|
2598
2627
|
async function l(c) {
|
|
2599
|
-
var
|
|
2600
|
-
c || (o("before-close"), await ((
|
|
2628
|
+
var b;
|
|
2629
|
+
c || (o("before-close"), await ((b = n.beforeClose) == null ? void 0 : b.call(n))), a.value = c;
|
|
2601
2630
|
}
|
|
2602
2631
|
function h() {
|
|
2603
2632
|
o("open");
|
|
2604
2633
|
}
|
|
2605
|
-
function
|
|
2606
|
-
o("update:model-value", !1), o("close"),
|
|
2634
|
+
function g() {
|
|
2635
|
+
o("update:model-value", !1), o("close"), k();
|
|
2607
2636
|
}
|
|
2608
2637
|
function E() {
|
|
2609
2638
|
n.persistent || u();
|
|
@@ -2611,56 +2640,56 @@ const Je = "--backdrop-present", an = /* @__PURE__ */ ve({
|
|
|
2611
2640
|
function T(c) {
|
|
2612
2641
|
!n.noCloseOnEscKey && c.key === "Escape" && !n.persistent && u();
|
|
2613
2642
|
}
|
|
2614
|
-
function
|
|
2643
|
+
function $() {
|
|
2615
2644
|
i(), document.addEventListener("keyup", T, !1);
|
|
2616
2645
|
}
|
|
2617
|
-
function
|
|
2646
|
+
function k() {
|
|
2618
2647
|
document.removeEventListener("keyup", T), r();
|
|
2619
2648
|
}
|
|
2620
|
-
return
|
|
2621
|
-
n.modelValue ?
|
|
2622
|
-
}),
|
|
2649
|
+
return ue(() => {
|
|
2650
|
+
n.modelValue ? $() : k();
|
|
2651
|
+
}), X(
|
|
2623
2652
|
() => n.modelValue,
|
|
2624
2653
|
(c) => {
|
|
2625
|
-
a.value = c, c ?
|
|
2654
|
+
a.value = c, c ? $() : k();
|
|
2626
2655
|
}
|
|
2627
2656
|
), e({
|
|
2628
2657
|
onBackdropAnimationEnter: h,
|
|
2629
|
-
onBackdropAnimationLeave:
|
|
2658
|
+
onBackdropAnimationLeave: g,
|
|
2630
2659
|
onBackdropClicked: E,
|
|
2631
2660
|
close: u,
|
|
2632
2661
|
present: a,
|
|
2633
2662
|
toggleModal: l,
|
|
2634
2663
|
onKeyPress: T
|
|
2635
|
-
}), (c,
|
|
2636
|
-
J(
|
|
2664
|
+
}), (c, b) => (C(), B(Nt, { to: c.teleportSelector }, [
|
|
2665
|
+
J(ut, {
|
|
2637
2666
|
appear: "",
|
|
2638
2667
|
name: c.transitionName,
|
|
2639
2668
|
onAfterEnter: h,
|
|
2640
|
-
onAfterLeave:
|
|
2669
|
+
onAfterLeave: g
|
|
2641
2670
|
}, {
|
|
2642
|
-
default:
|
|
2643
|
-
a.value ? (
|
|
2671
|
+
default: U(() => [
|
|
2672
|
+
a.value ? (C(), _(
|
|
2644
2673
|
"div",
|
|
2645
2674
|
{
|
|
2646
2675
|
key: 0,
|
|
2647
|
-
class:
|
|
2676
|
+
class: le(["m-backdrop --present", [c.backdropClass]]),
|
|
2648
2677
|
tabindex: "-1",
|
|
2649
2678
|
role: "dialog"
|
|
2650
2679
|
},
|
|
2651
2680
|
[
|
|
2652
|
-
|
|
2681
|
+
F(
|
|
2653
2682
|
"button",
|
|
2654
2683
|
{
|
|
2655
|
-
class:
|
|
2684
|
+
class: le(["m-backdrop-overlay", { "--disabled": c.persistent }]),
|
|
2656
2685
|
tabindex: "-1",
|
|
2657
|
-
onClick:
|
|
2686
|
+
onClick: Y(E, ["self"])
|
|
2658
2687
|
},
|
|
2659
2688
|
null,
|
|
2660
2689
|
2
|
|
2661
2690
|
/* CLASS */
|
|
2662
2691
|
),
|
|
2663
|
-
|
|
2692
|
+
F(
|
|
2664
2693
|
"div",
|
|
2665
2694
|
ee({
|
|
2666
2695
|
class: ["m-backdrop-content", c.backdropContentClass]
|
|
@@ -2677,24 +2706,24 @@ const Je = "--backdrop-present", an = /* @__PURE__ */ ve({
|
|
|
2677
2706
|
],
|
|
2678
2707
|
2
|
|
2679
2708
|
/* CLASS */
|
|
2680
|
-
)) :
|
|
2709
|
+
)) : I("v-if", !0)
|
|
2681
2710
|
]),
|
|
2682
2711
|
_: 3
|
|
2683
2712
|
/* FORWARDED */
|
|
2684
2713
|
}, 8, ["name"])
|
|
2685
2714
|
], 8, ["to"]));
|
|
2686
2715
|
}
|
|
2687
|
-
}),
|
|
2716
|
+
}), dn = {
|
|
2688
2717
|
key: 0,
|
|
2689
2718
|
id: "dialogTitle",
|
|
2690
2719
|
class: "maz-my-0 maz-text-xl maz-font-semibold"
|
|
2691
|
-
},
|
|
2720
|
+
}, mn = {
|
|
2692
2721
|
id: "dialogDesc",
|
|
2693
2722
|
class: "m-dialog-content"
|
|
2694
|
-
},
|
|
2723
|
+
}, fn = {
|
|
2695
2724
|
key: 0,
|
|
2696
2725
|
class: "m-dialog-footer"
|
|
2697
|
-
},
|
|
2726
|
+
}, hn = /* @__PURE__ */ ge({
|
|
2698
2727
|
__name: "MazDialog",
|
|
2699
2728
|
props: {
|
|
2700
2729
|
modelValue: { type: Boolean },
|
|
@@ -2714,7 +2743,7 @@ const Je = "--backdrop-present", an = /* @__PURE__ */ ve({
|
|
|
2714
2743
|
},
|
|
2715
2744
|
emits: ["open", "close", "update:model-value"],
|
|
2716
2745
|
setup(s, { expose: e }) {
|
|
2717
|
-
const t = s, n =
|
|
2746
|
+
const t = s, n = V(() => import("./MazBtn-BSnVxud6.mjs")), o = V(() => import("./x-mark-CnZwVvA7.mjs")), i = jt(), r = y();
|
|
2718
2747
|
e({
|
|
2719
2748
|
close: () => {
|
|
2720
2749
|
var l, h;
|
|
@@ -2729,7 +2758,7 @@ const Je = "--backdrop-present", an = /* @__PURE__ */ ve({
|
|
|
2729
2758
|
class: i.class,
|
|
2730
2759
|
style: i.style
|
|
2731
2760
|
}));
|
|
2732
|
-
return (l, h) => (
|
|
2761
|
+
return (l, h) => (C(), B(cn, ee({ ...a.value, ...t }, {
|
|
2733
2762
|
ref_key: "backdrop",
|
|
2734
2763
|
ref: r,
|
|
2735
2764
|
persistent: l.persistent,
|
|
@@ -2737,12 +2766,12 @@ const Je = "--backdrop-present", an = /* @__PURE__ */ ve({
|
|
|
2737
2766
|
"transition-name": "modal-anim",
|
|
2738
2767
|
"aria-labelledby": "dialogTitle",
|
|
2739
2768
|
"aria-describedby": "dialogDesc",
|
|
2740
|
-
onClose: h[0] || (h[0] = (
|
|
2741
|
-
onOpen: h[1] || (h[1] = (
|
|
2742
|
-
"onUpdate:modelValue": h[2] || (h[2] = (
|
|
2769
|
+
onClose: h[0] || (h[0] = (g) => l.$emit("close", g)),
|
|
2770
|
+
onOpen: h[1] || (h[1] = (g) => l.$emit("open", g)),
|
|
2771
|
+
"onUpdate:modelValue": h[2] || (h[2] = (g) => l.$emit("update:model-value", g))
|
|
2743
2772
|
}), {
|
|
2744
|
-
default:
|
|
2745
|
-
|
|
2773
|
+
default: U(({ close: g }) => [
|
|
2774
|
+
F(
|
|
2746
2775
|
"div",
|
|
2747
2776
|
ee({
|
|
2748
2777
|
class: ["m-dialog", { "--scrollable": l.scrollable }],
|
|
@@ -2751,56 +2780,56 @@ const Je = "--backdrop-present", an = /* @__PURE__ */ ve({
|
|
|
2751
2780
|
style: [{ width: l.width, maxWidth: l.maxWidth, maxHeight: l.maxHeight }]
|
|
2752
2781
|
}, u.value),
|
|
2753
2782
|
[
|
|
2754
|
-
|
|
2783
|
+
I(`
|
|
2755
2784
|
@slot Header slot
|
|
2756
2785
|
@binding {Function} close close function
|
|
2757
2786
|
`),
|
|
2758
|
-
q(l.$slots, "header", { close:
|
|
2759
|
-
|
|
2787
|
+
q(l.$slots, "header", { close: g }, () => [
|
|
2788
|
+
F(
|
|
2760
2789
|
"div",
|
|
2761
2790
|
{
|
|
2762
|
-
class:
|
|
2791
|
+
class: le(["m-dialog-header", { "--has-title": l.$slots.title || l.title }])
|
|
2763
2792
|
},
|
|
2764
2793
|
[
|
|
2765
|
-
l.$slots.title || l.title ? (
|
|
2766
|
-
|
|
2794
|
+
l.$slots.title || l.title ? (C(), _("h2", dn, [
|
|
2795
|
+
I(`
|
|
2767
2796
|
@slot Title slot in the header
|
|
2768
2797
|
`),
|
|
2769
2798
|
q(l.$slots, "title", {}, () => [
|
|
2770
2799
|
Q(
|
|
2771
|
-
|
|
2800
|
+
Z(l.title),
|
|
2772
2801
|
1
|
|
2773
2802
|
/* TEXT */
|
|
2774
2803
|
)
|
|
2775
2804
|
], !0)
|
|
2776
|
-
])) :
|
|
2777
|
-
!l.noClose && !l.persistent ? (
|
|
2805
|
+
])) : I("v-if", !0),
|
|
2806
|
+
!l.noClose && !l.persistent ? (C(), B(S(n), {
|
|
2778
2807
|
key: 1,
|
|
2779
2808
|
class: "m-dialog-closebtn",
|
|
2780
2809
|
color: "transparent",
|
|
2781
2810
|
size: "sm",
|
|
2782
|
-
icon:
|
|
2783
|
-
onClick:
|
|
2784
|
-
}, null, 8, ["icon", "onClick"])) :
|
|
2811
|
+
icon: S(o),
|
|
2812
|
+
onClick: g
|
|
2813
|
+
}, null, 8, ["icon", "onClick"])) : I("v-if", !0)
|
|
2785
2814
|
],
|
|
2786
2815
|
2
|
|
2787
2816
|
/* CLASS */
|
|
2788
2817
|
)
|
|
2789
2818
|
], !0),
|
|
2790
|
-
|
|
2791
|
-
|
|
2819
|
+
F("div", mn, [
|
|
2820
|
+
I(`
|
|
2792
2821
|
@slot Default content
|
|
2793
2822
|
@binding {Function} close close function
|
|
2794
2823
|
`),
|
|
2795
|
-
q(l.$slots, "default", { close:
|
|
2824
|
+
q(l.$slots, "default", { close: g }, void 0, !0)
|
|
2796
2825
|
]),
|
|
2797
|
-
l.$slots.footer ? (
|
|
2798
|
-
|
|
2826
|
+
l.$slots.footer ? (C(), _("div", fn, [
|
|
2827
|
+
I(`
|
|
2799
2828
|
@slot Footer slot
|
|
2800
2829
|
@binding {Function} close close function
|
|
2801
2830
|
`),
|
|
2802
|
-
q(l.$slots, "footer", { close:
|
|
2803
|
-
])) :
|
|
2831
|
+
q(l.$slots, "footer", { close: g }, void 0, !0)
|
|
2832
|
+
])) : I("v-if", !0)
|
|
2804
2833
|
],
|
|
2805
2834
|
16
|
|
2806
2835
|
/* FULL_PROPS */
|
|
@@ -2810,7 +2839,7 @@ const Je = "--backdrop-present", an = /* @__PURE__ */ ve({
|
|
|
2810
2839
|
/* FORWARDED */
|
|
2811
2840
|
}, 16, ["persistent", "model-value"]));
|
|
2812
2841
|
}
|
|
2813
|
-
}),
|
|
2842
|
+
}), vn = /* @__PURE__ */ Re(hn, [["__scopeId", "data-v-50775b17"]]), oe = {
|
|
2814
2843
|
cancelText: "Cancel",
|
|
2815
2844
|
confirmText: "Confirm",
|
|
2816
2845
|
cancelButton: {
|
|
@@ -2821,11 +2850,11 @@ const Je = "--backdrop-present", an = /* @__PURE__ */ ve({
|
|
|
2821
2850
|
text: "Confirm",
|
|
2822
2851
|
color: "success"
|
|
2823
2852
|
}
|
|
2824
|
-
},
|
|
2825
|
-
function
|
|
2853
|
+
}, pn = y(oe), ie = y([]);
|
|
2854
|
+
function gn(s, e) {
|
|
2826
2855
|
return new Promise((t, n) => {
|
|
2827
|
-
|
|
2828
|
-
...
|
|
2856
|
+
ie.value = [
|
|
2857
|
+
...ie.value,
|
|
2829
2858
|
{
|
|
2830
2859
|
id: s,
|
|
2831
2860
|
isActive: !0,
|
|
@@ -2839,26 +2868,26 @@ function hn(s, e) {
|
|
|
2839
2868
|
];
|
|
2840
2869
|
});
|
|
2841
2870
|
}
|
|
2842
|
-
function
|
|
2843
|
-
return
|
|
2871
|
+
function St(s) {
|
|
2872
|
+
return ie.value = ie.value.filter(({ id: e }) => e !== s), ie.value;
|
|
2844
2873
|
}
|
|
2845
|
-
function
|
|
2874
|
+
function st(s, e, t) {
|
|
2846
2875
|
var n;
|
|
2847
2876
|
e && ((n = e[s]) == null || n.call(e, t), e.isActive = !1, setTimeout(() => {
|
|
2848
|
-
|
|
2877
|
+
St(e.id);
|
|
2849
2878
|
}, 500));
|
|
2850
2879
|
}
|
|
2851
|
-
function
|
|
2880
|
+
function xt() {
|
|
2852
2881
|
return {
|
|
2853
|
-
data:
|
|
2854
|
-
dialogState:
|
|
2855
|
-
showDialogAndWaitChoice:
|
|
2856
|
-
removeDialogFromState:
|
|
2857
|
-
rejectDialog: async (s, e = new Error("cancel"), t) => (await (t == null ? void 0 : t()),
|
|
2858
|
-
resolveDialog: async (s, e = "accept", t) => (await (t == null ? void 0 : t()),
|
|
2882
|
+
data: pn,
|
|
2883
|
+
dialogState: ie,
|
|
2884
|
+
showDialogAndWaitChoice: gn,
|
|
2885
|
+
removeDialogFromState: St,
|
|
2886
|
+
rejectDialog: async (s, e = new Error("cancel"), t) => (await (t == null ? void 0 : t()), st("reject", s, e)),
|
|
2887
|
+
resolveDialog: async (s, e = "accept", t) => (await (t == null ? void 0 : t()), st("resolve", s, e))
|
|
2859
2888
|
};
|
|
2860
2889
|
}
|
|
2861
|
-
const
|
|
2890
|
+
const yn = { class: "maz-flex maz-items-center maz-gap-2" }, bn = /* @__PURE__ */ ge({
|
|
2862
2891
|
__name: "MazDialogPromise",
|
|
2863
2892
|
props: {
|
|
2864
2893
|
data: { default: void 0 },
|
|
@@ -2886,126 +2915,126 @@ const vn = { class: "maz-flex maz-items-center maz-gap-2" }, pn = /* @__PURE__ *
|
|
|
2886
2915
|
},
|
|
2887
2916
|
emits: ["open", "close"],
|
|
2888
2917
|
setup(s, { expose: e }) {
|
|
2889
|
-
const t = s, n =
|
|
2918
|
+
const t = s, n = V(() => import("./MazBtn-BSnVxud6.mjs")), { dialogState: o, rejectDialog: i, resolveDialog: r, data: a } = xt(), u = f(() => {
|
|
2890
2919
|
var c;
|
|
2891
2920
|
return t.buttons ?? ((c = t.data) == null ? void 0 : c.buttons) ?? a.value.buttons;
|
|
2892
2921
|
}), l = f(() => ({
|
|
2893
|
-
...
|
|
2922
|
+
...oe,
|
|
2894
2923
|
...a.value,
|
|
2895
2924
|
...t.data
|
|
2896
2925
|
})), h = f(() => {
|
|
2897
|
-
var
|
|
2898
|
-
if (!(((
|
|
2926
|
+
var D, v, x, H;
|
|
2927
|
+
if (!(((D = a.value) == null ? void 0 : D.cancelButton) ?? ((v = t.data) == null ? void 0 : v.cancelButton) ?? oe.cancelButton))
|
|
2899
2928
|
return;
|
|
2900
|
-
const
|
|
2901
|
-
...
|
|
2902
|
-
...(
|
|
2903
|
-
...(
|
|
2929
|
+
const b = {
|
|
2930
|
+
...oe.cancelButton,
|
|
2931
|
+
...(x = a.value) == null ? void 0 : x.cancelButton,
|
|
2932
|
+
...(H = t.data) == null ? void 0 : H.cancelButton
|
|
2904
2933
|
};
|
|
2905
2934
|
return {
|
|
2906
|
-
...
|
|
2907
|
-
text: l.value.cancelText ||
|
|
2935
|
+
...b,
|
|
2936
|
+
text: l.value.cancelText || b.text
|
|
2908
2937
|
};
|
|
2909
|
-
}),
|
|
2910
|
-
var
|
|
2911
|
-
if (!(((
|
|
2938
|
+
}), g = f(() => {
|
|
2939
|
+
var D, v, x, H;
|
|
2940
|
+
if (!(((D = a.value) == null ? void 0 : D.confirmButton) ?? ((v = t.data) == null ? void 0 : v.confirmButton) ?? oe.confirmButton))
|
|
2912
2941
|
return;
|
|
2913
|
-
const
|
|
2914
|
-
...
|
|
2915
|
-
...(
|
|
2916
|
-
...(
|
|
2942
|
+
const b = {
|
|
2943
|
+
...oe.confirmButton,
|
|
2944
|
+
...(x = a.value) == null ? void 0 : x.confirmButton,
|
|
2945
|
+
...(H = t.data) == null ? void 0 : H.confirmButton
|
|
2917
2946
|
};
|
|
2918
2947
|
return {
|
|
2919
|
-
...
|
|
2920
|
-
text: l.value.confirmText ||
|
|
2948
|
+
...b,
|
|
2949
|
+
text: l.value.confirmText || b.text
|
|
2921
2950
|
};
|
|
2922
2951
|
}), E = f(
|
|
2923
2952
|
() => o.value.find(({ id: c }) => c === t.identifier)
|
|
2924
2953
|
), T = y();
|
|
2925
2954
|
e({
|
|
2926
2955
|
close: () => {
|
|
2927
|
-
var c,
|
|
2928
|
-
return (
|
|
2956
|
+
var c, b;
|
|
2957
|
+
return (b = (c = T.value) == null ? void 0 : c.close) == null ? void 0 : b.call(c);
|
|
2929
2958
|
}
|
|
2930
2959
|
});
|
|
2931
|
-
function
|
|
2960
|
+
function $(c) {
|
|
2932
2961
|
return "type" in c && (c.type === "resolve" || c.type === "reject");
|
|
2933
2962
|
}
|
|
2934
|
-
function
|
|
2935
|
-
return
|
|
2963
|
+
function k(c, b) {
|
|
2964
|
+
return $(b) ? b.type === "resolve" ? r(c, b.response) : i(c, b.response) : r(c, void 0, b.action);
|
|
2936
2965
|
}
|
|
2937
|
-
return (c,
|
|
2938
|
-
var
|
|
2939
|
-
return
|
|
2966
|
+
return (c, b) => {
|
|
2967
|
+
var D;
|
|
2968
|
+
return C(), B(vn, ee({
|
|
2940
2969
|
ref_key: "dialog",
|
|
2941
2970
|
ref: T
|
|
2942
2971
|
}, { ...c.$attrs, ...t }, {
|
|
2943
|
-
"model-value": ((
|
|
2944
|
-
onClose:
|
|
2945
|
-
onOpen:
|
|
2946
|
-
"onUpdate:modelValue":
|
|
2972
|
+
"model-value": ((D = E.value) == null ? void 0 : D.isActive) ?? c.modelValue ?? !1,
|
|
2973
|
+
onClose: b[2] || (b[2] = (v) => c.$emit("close", v)),
|
|
2974
|
+
onOpen: b[3] || (b[3] = (v) => c.$emit("open", v)),
|
|
2975
|
+
"onUpdate:modelValue": b[4] || (b[4] = (v) => S(i)(E.value))
|
|
2947
2976
|
}), {
|
|
2948
|
-
title:
|
|
2949
|
-
|
|
2977
|
+
title: U(() => [
|
|
2978
|
+
I(`
|
|
2950
2979
|
@slot title slot - Place your title
|
|
2951
2980
|
`),
|
|
2952
2981
|
q(c.$slots, "title", {}, () => {
|
|
2953
|
-
var
|
|
2982
|
+
var v;
|
|
2954
2983
|
return [
|
|
2955
2984
|
Q(
|
|
2956
|
-
|
|
2985
|
+
Z(c.title || ((v = l.value) == null ? void 0 : v.title)),
|
|
2957
2986
|
1
|
|
2958
2987
|
/* TEXT */
|
|
2959
2988
|
)
|
|
2960
2989
|
];
|
|
2961
2990
|
})
|
|
2962
2991
|
]),
|
|
2963
|
-
default:
|
|
2964
|
-
|
|
2992
|
+
default: U(() => [
|
|
2993
|
+
I(`
|
|
2965
2994
|
@slot Default slot - Place your content
|
|
2966
2995
|
@binding {Function} resolve resolve function
|
|
2967
2996
|
@binding {Function} reject reject function
|
|
2968
2997
|
`),
|
|
2969
2998
|
q(c.$slots, "default", {
|
|
2970
|
-
resolve: (
|
|
2971
|
-
reject: (
|
|
2999
|
+
resolve: (v) => S(r)(E.value, v),
|
|
3000
|
+
reject: (v) => S(i)(E.value, v)
|
|
2972
3001
|
}, () => {
|
|
2973
|
-
var
|
|
3002
|
+
var v;
|
|
2974
3003
|
return [
|
|
2975
3004
|
Q(
|
|
2976
|
-
|
|
3005
|
+
Z(c.message || ((v = l.value) == null ? void 0 : v.message)),
|
|
2977
3006
|
1
|
|
2978
3007
|
/* TEXT */
|
|
2979
3008
|
)
|
|
2980
3009
|
];
|
|
2981
3010
|
})
|
|
2982
3011
|
]),
|
|
2983
|
-
footer:
|
|
2984
|
-
|
|
3012
|
+
footer: U(() => [
|
|
3013
|
+
I(`
|
|
2985
3014
|
@slot Footer slot
|
|
2986
3015
|
@binding {Function} resolve resolve function
|
|
2987
3016
|
@binding {Function} reject reject function
|
|
2988
3017
|
`),
|
|
2989
3018
|
q(c.$slots, "footer-button", {
|
|
2990
|
-
resolve: (
|
|
2991
|
-
reject: (
|
|
3019
|
+
resolve: (v) => S(r)(E.value, v),
|
|
3020
|
+
reject: (v) => S(i)(E.value, v)
|
|
2992
3021
|
}, () => [
|
|
2993
|
-
|
|
2994
|
-
u.value ? (
|
|
2995
|
-
|
|
3022
|
+
F("div", yn, [
|
|
3023
|
+
u.value ? (C(!0), _(
|
|
3024
|
+
Ye,
|
|
2996
3025
|
{ key: 0 },
|
|
2997
|
-
|
|
2998
|
-
key:
|
|
3026
|
+
Ut(u.value, (v, x) => (C(), B(S(n), ee({
|
|
3027
|
+
key: x,
|
|
2999
3028
|
ref_for: !0
|
|
3000
3029
|
}, {
|
|
3001
|
-
...
|
|
3030
|
+
...v,
|
|
3002
3031
|
type: "button"
|
|
3003
3032
|
}, {
|
|
3004
|
-
onClick: (
|
|
3033
|
+
onClick: (H) => k(E.value, v)
|
|
3005
3034
|
}), {
|
|
3006
|
-
default:
|
|
3035
|
+
default: U(() => [
|
|
3007
3036
|
Q(
|
|
3008
|
-
|
|
3037
|
+
Z(v.text),
|
|
3009
3038
|
1
|
|
3010
3039
|
/* TEXT */
|
|
3011
3040
|
)
|
|
@@ -3015,23 +3044,23 @@ const vn = { class: "maz-flex maz-items-center maz-gap-2" }, pn = /* @__PURE__ *
|
|
|
3015
3044
|
}, 1040, ["onClick"]))),
|
|
3016
3045
|
128
|
|
3017
3046
|
/* KEYED_FRAGMENT */
|
|
3018
|
-
)) : (
|
|
3019
|
-
|
|
3047
|
+
)) : (C(), _(
|
|
3048
|
+
Ye,
|
|
3020
3049
|
{ key: 1 },
|
|
3021
3050
|
[
|
|
3022
|
-
h.value ? (
|
|
3023
|
-
|
|
3051
|
+
h.value ? (C(), B(
|
|
3052
|
+
S(n),
|
|
3024
3053
|
ee({ key: 0 }, h.value, {
|
|
3025
|
-
onClick:
|
|
3054
|
+
onClick: b[0] || (b[0] = (v) => S(i)(E.value))
|
|
3026
3055
|
}),
|
|
3027
3056
|
{
|
|
3028
|
-
default:
|
|
3029
|
-
|
|
3057
|
+
default: U(() => [
|
|
3058
|
+
I(`
|
|
3030
3059
|
@slot cancel-text slot - Place your cancel text
|
|
3031
3060
|
`),
|
|
3032
3061
|
q(c.$slots, "cancel-text", {}, () => [
|
|
3033
3062
|
Q(
|
|
3034
|
-
|
|
3063
|
+
Z(h.value.text),
|
|
3035
3064
|
1
|
|
3036
3065
|
/* TEXT */
|
|
3037
3066
|
)
|
|
@@ -3042,20 +3071,20 @@ const vn = { class: "maz-flex maz-items-center maz-gap-2" }, pn = /* @__PURE__ *
|
|
|
3042
3071
|
},
|
|
3043
3072
|
16
|
|
3044
3073
|
/* FULL_PROPS */
|
|
3045
|
-
)) :
|
|
3046
|
-
|
|
3047
|
-
|
|
3048
|
-
ee({ key: 1 },
|
|
3049
|
-
onClick:
|
|
3074
|
+
)) : I("v-if", !0),
|
|
3075
|
+
g.value ? (C(), B(
|
|
3076
|
+
S(n),
|
|
3077
|
+
ee({ key: 1 }, g.value, {
|
|
3078
|
+
onClick: b[1] || (b[1] = (v) => S(r)(E.value))
|
|
3050
3079
|
}),
|
|
3051
3080
|
{
|
|
3052
|
-
default:
|
|
3053
|
-
|
|
3081
|
+
default: U(() => [
|
|
3082
|
+
I(`
|
|
3054
3083
|
@slot confirm-text slot - Place your confirm text
|
|
3055
3084
|
`),
|
|
3056
3085
|
q(c.$slots, "confirm-text", {}, () => [
|
|
3057
3086
|
Q(
|
|
3058
|
-
|
|
3087
|
+
Z(g.value.text),
|
|
3059
3088
|
1
|
|
3060
3089
|
/* TEXT */
|
|
3061
3090
|
)
|
|
@@ -3066,7 +3095,7 @@ const vn = { class: "maz-flex maz-items-center maz-gap-2" }, pn = /* @__PURE__ *
|
|
|
3066
3095
|
},
|
|
3067
3096
|
16
|
|
3068
3097
|
/* FULL_PROPS */
|
|
3069
|
-
)) :
|
|
3098
|
+
)) : I("v-if", !0)
|
|
3070
3099
|
],
|
|
3071
3100
|
64
|
|
3072
3101
|
/* STABLE_FRAGMENT */
|
|
@@ -3079,22 +3108,22 @@ const vn = { class: "maz-flex maz-items-center maz-gap-2" }, pn = /* @__PURE__ *
|
|
|
3079
3108
|
}, 16, ["model-value"]);
|
|
3080
3109
|
};
|
|
3081
3110
|
}
|
|
3082
|
-
}),
|
|
3111
|
+
}), nt = {
|
|
3083
3112
|
identifier: "main-dialog"
|
|
3084
3113
|
};
|
|
3085
|
-
class
|
|
3086
|
-
constructor(e, t =
|
|
3114
|
+
class wn {
|
|
3115
|
+
constructor(e, t = nt) {
|
|
3087
3116
|
this.app = e, this.globalOptions = t;
|
|
3088
3117
|
}
|
|
3089
3118
|
open(e) {
|
|
3090
3119
|
const t = {
|
|
3091
|
-
...
|
|
3120
|
+
...nt,
|
|
3092
3121
|
...this.globalOptions,
|
|
3093
3122
|
...e
|
|
3094
|
-
}, { destroy: n, vNode: o } =
|
|
3123
|
+
}, { destroy: n, vNode: o } = We(bn, {
|
|
3095
3124
|
props: t,
|
|
3096
3125
|
app: this.app
|
|
3097
|
-
}), { showDialogAndWaitChoice: i } =
|
|
3126
|
+
}), { showDialogAndWaitChoice: i } = xt();
|
|
3098
3127
|
function r() {
|
|
3099
3128
|
var u, l, h;
|
|
3100
3129
|
(l = (u = o.component) == null ? void 0 : u.exposed) == null || l.close(), (h = t.promiseCallback) == null || h.call(t), setTimeout(() => {
|
|
@@ -3110,14 +3139,14 @@ class gn {
|
|
|
3110
3139
|
};
|
|
3111
3140
|
}
|
|
3112
3141
|
}
|
|
3113
|
-
const
|
|
3142
|
+
const mo = {
|
|
3114
3143
|
install(s, e) {
|
|
3115
|
-
s.provide("dialog", new
|
|
3144
|
+
s.provide("dialog", new wn(s, e));
|
|
3116
3145
|
}
|
|
3117
|
-
},
|
|
3146
|
+
}, En = { class: "m-toast__message-wrapper" }, Tn = { class: "m-toast__message" }, Ln = { class: "maz-flex maz-items-center maz-gap-2" }, zn = { key: 0 }, Cn = {
|
|
3118
3147
|
key: 4,
|
|
3119
3148
|
class: "progress-bar maz-absolute maz-inset-x-0 maz-bottom-0 maz-h-1"
|
|
3120
|
-
},
|
|
3149
|
+
}, In = /* @__PURE__ */ ge({
|
|
3121
3150
|
__name: "MazToast",
|
|
3122
3151
|
props: {
|
|
3123
3152
|
message: { default: void 0 },
|
|
@@ -3134,15 +3163,15 @@ const lo = {
|
|
|
3134
3163
|
},
|
|
3135
3164
|
emits: ["close", "click", "open"],
|
|
3136
3165
|
setup(s, { expose: e, emit: t }) {
|
|
3137
|
-
const n = s, o = t, i =
|
|
3166
|
+
const n = s, o = t, i = V(() => import("./MazBtn-BSnVxud6.mjs")), r = V(() => import("./x-mark-CnZwVvA7.mjs")), a = V(
|
|
3138
3167
|
() => import("./arrow-top-right-on-square-jPmYJ34F.mjs")
|
|
3139
|
-
), u =
|
|
3168
|
+
), u = V(
|
|
3140
3169
|
() => import("./exclamation-triangle-Z6d0ygp8.mjs")
|
|
3141
|
-
), l =
|
|
3170
|
+
), l = V(
|
|
3142
3171
|
() => import("./exclamation-circle-CUk0ZajS.mjs")
|
|
3143
|
-
), h =
|
|
3172
|
+
), h = V(
|
|
3144
3173
|
() => import("./information-circle-C7e5b_nL.mjs")
|
|
3145
|
-
),
|
|
3174
|
+
), g = V(() => import("./check-circle-Bf7AGSQ-.mjs")), E = V(() => import("./link-Br1lfjTR.mjs")), T = y(), $ = f(() => {
|
|
3146
3175
|
if (n.icon)
|
|
3147
3176
|
switch (n.type) {
|
|
3148
3177
|
case "danger":
|
|
@@ -3150,38 +3179,38 @@ const lo = {
|
|
|
3150
3179
|
case "info":
|
|
3151
3180
|
return h;
|
|
3152
3181
|
case "success":
|
|
3153
|
-
return
|
|
3182
|
+
return g;
|
|
3154
3183
|
case "warning":
|
|
3155
3184
|
return l;
|
|
3156
3185
|
default:
|
|
3157
3186
|
return;
|
|
3158
3187
|
}
|
|
3159
|
-
}),
|
|
3188
|
+
}), k = f(() => n.position.includes("top") ? "top" : "bottom"), c = f(() => n.position.includes("left") ? "left" : n.position.includes("right") ? "right" : "center"), b = f(() => c.value !== "center" ? c.value === "right" ? "m-slide-right" : "m-slide-left" : k.value === "top" ? "m-slide-top" : "m-slide-bottom"), D = y(!1), v = y(!1), x = y(), H = `m-toast-container --${k.value} --${c.value}`, L = `.${H.replaceAll(" ", ".")}`, P = Cs({
|
|
3160
3189
|
callback: ne,
|
|
3161
3190
|
timeout: typeof n.timeout == "number" ? n.timeout : 0,
|
|
3162
3191
|
callbackOffsetTime: 200
|
|
3163
3192
|
});
|
|
3164
|
-
function
|
|
3165
|
-
const
|
|
3166
|
-
if (!
|
|
3167
|
-
const
|
|
3168
|
-
|
|
3193
|
+
function j() {
|
|
3194
|
+
const m = document.querySelector(L);
|
|
3195
|
+
if (!m && !m) {
|
|
3196
|
+
const A = document.body, O = document.createElement("div");
|
|
3197
|
+
O.className = H, A.append(O);
|
|
3169
3198
|
}
|
|
3170
3199
|
}
|
|
3171
|
-
function
|
|
3172
|
-
const
|
|
3173
|
-
return !n.queue && n.maxToasts === !1 ? !1 : typeof n.maxToasts == "number" &&
|
|
3200
|
+
function se() {
|
|
3201
|
+
const m = document.querySelector(L);
|
|
3202
|
+
return !n.queue && n.maxToasts === !1 ? !1 : typeof n.maxToasts == "number" && m ? n.maxToasts <= m.childElementCount : m && m.childElementCount > 0;
|
|
3174
3203
|
}
|
|
3175
3204
|
function G() {
|
|
3176
|
-
if (
|
|
3177
|
-
|
|
3205
|
+
if (se()) {
|
|
3206
|
+
x.value = setTimeout(G, 250);
|
|
3178
3207
|
return;
|
|
3179
3208
|
}
|
|
3180
|
-
const
|
|
3181
|
-
T.value &&
|
|
3209
|
+
const m = document.querySelector(L);
|
|
3210
|
+
T.value && m && m.prepend(T.value), v.value = !0, typeof n.timeout == "number" && n.timeout > 0 && P.start();
|
|
3182
3211
|
}
|
|
3183
|
-
const
|
|
3184
|
-
function
|
|
3212
|
+
const ce = y("100%");
|
|
3213
|
+
function De() {
|
|
3185
3214
|
switch (n.type) {
|
|
3186
3215
|
case "danger":
|
|
3187
3216
|
return "maz-bg-danger-700";
|
|
@@ -3192,129 +3221,129 @@ const lo = {
|
|
|
3192
3221
|
case "warning":
|
|
3193
3222
|
return "maz-bg-warning-700";
|
|
3194
3223
|
default:
|
|
3195
|
-
return "maz-bg-
|
|
3224
|
+
return "maz-bg-primary";
|
|
3196
3225
|
}
|
|
3197
3226
|
}
|
|
3198
|
-
|
|
3199
|
-
|
|
3200
|
-
(
|
|
3227
|
+
X(
|
|
3228
|
+
P.remainingTime,
|
|
3229
|
+
(m) => {
|
|
3201
3230
|
if (typeof n.timeout == "number") {
|
|
3202
|
-
const
|
|
3203
|
-
|
|
3231
|
+
const A = 100 * m / n.timeout;
|
|
3232
|
+
ce.value = `${A}%`;
|
|
3204
3233
|
}
|
|
3205
3234
|
}
|
|
3206
3235
|
);
|
|
3207
|
-
function
|
|
3208
|
-
o("click",
|
|
3236
|
+
function de(m) {
|
|
3237
|
+
o("click", m), n.persistent || ne();
|
|
3209
3238
|
}
|
|
3210
|
-
async function
|
|
3211
|
-
var
|
|
3212
|
-
|
|
3239
|
+
async function me(m, A) {
|
|
3240
|
+
var O;
|
|
3241
|
+
D.value = !0, await m(), D.value = !1, (O = n.action) != null && O.closeToast && de(A);
|
|
3213
3242
|
}
|
|
3214
|
-
function
|
|
3215
|
-
n.noPauseOnHover || (
|
|
3243
|
+
function fe(m) {
|
|
3244
|
+
n.noPauseOnHover || (m ? P.pause() : P.resume());
|
|
3216
3245
|
}
|
|
3217
|
-
function
|
|
3218
|
-
|
|
3246
|
+
function Pe() {
|
|
3247
|
+
P.stop(), x.value && clearTimeout(x.value);
|
|
3219
3248
|
}
|
|
3220
3249
|
function ne() {
|
|
3221
|
-
|
|
3250
|
+
Pe(), v.value = !1;
|
|
3222
3251
|
}
|
|
3223
3252
|
e({ closeToast: ne });
|
|
3224
|
-
function
|
|
3253
|
+
function Le() {
|
|
3225
3254
|
o("open");
|
|
3226
3255
|
}
|
|
3227
|
-
function
|
|
3228
|
-
var
|
|
3229
|
-
o("close"), (
|
|
3230
|
-
const
|
|
3231
|
-
|
|
3256
|
+
function ze() {
|
|
3257
|
+
var A;
|
|
3258
|
+
o("close"), (A = T.value) == null || A.remove();
|
|
3259
|
+
const m = document.querySelector(L);
|
|
3260
|
+
m && !(m != null && m.hasChildNodes()) && m.remove();
|
|
3232
3261
|
}
|
|
3233
|
-
return
|
|
3234
|
-
|
|
3235
|
-
}), (
|
|
3236
|
-
name:
|
|
3237
|
-
onAfterLeave:
|
|
3238
|
-
onAfterEnter:
|
|
3262
|
+
return ue(() => {
|
|
3263
|
+
j(), G();
|
|
3264
|
+
}), (m, A) => (C(), B(ut, {
|
|
3265
|
+
name: b.value,
|
|
3266
|
+
onAfterLeave: ze,
|
|
3267
|
+
onAfterEnter: Le,
|
|
3239
3268
|
persisted: ""
|
|
3240
3269
|
}, {
|
|
3241
|
-
default:
|
|
3242
|
-
|
|
3270
|
+
default: U(() => [
|
|
3271
|
+
at(F(
|
|
3243
3272
|
"button",
|
|
3244
3273
|
{
|
|
3245
3274
|
ref_key: "Toaster",
|
|
3246
3275
|
ref: T,
|
|
3247
|
-
class:
|
|
3248
|
-
`--${
|
|
3249
|
-
`--${
|
|
3276
|
+
class: le(["m-toast", [
|
|
3277
|
+
`--${m.type}`,
|
|
3278
|
+
`--${k.value}`,
|
|
3250
3279
|
`--${c.value}`,
|
|
3251
|
-
{ "maz-pb-1": typeof
|
|
3280
|
+
{ "maz-pb-1": typeof m.timeout == "number" && m.timeout > 0, "--persistent": m.persistent }
|
|
3252
3281
|
]]),
|
|
3253
3282
|
role: "alert",
|
|
3254
|
-
onMouseover:
|
|
3255
|
-
onMouseleave:
|
|
3256
|
-
onClick:
|
|
3257
|
-
var
|
|
3258
|
-
return
|
|
3283
|
+
onMouseover: A[2] || (A[2] = (O) => fe(!0)),
|
|
3284
|
+
onMouseleave: A[3] || (A[3] = (O) => fe(!1)),
|
|
3285
|
+
onClick: A[4] || (A[4] = Y((O) => {
|
|
3286
|
+
var he;
|
|
3287
|
+
return m.link && !((he = m.link) != null && he.closeToast) ? void 0 : de(O);
|
|
3259
3288
|
}, ["stop"]))
|
|
3260
3289
|
},
|
|
3261
3290
|
[
|
|
3262
|
-
|
|
3291
|
+
$.value ? (C(), B(_t($.value), {
|
|
3263
3292
|
key: 0,
|
|
3264
3293
|
class: "maz-text-2xl"
|
|
3265
|
-
})) :
|
|
3266
|
-
|
|
3267
|
-
|
|
3294
|
+
})) : I("v-if", !0),
|
|
3295
|
+
F("div", En, [
|
|
3296
|
+
F(
|
|
3268
3297
|
"p",
|
|
3269
|
-
|
|
3270
|
-
|
|
3298
|
+
Tn,
|
|
3299
|
+
Z(m.message),
|
|
3271
3300
|
1
|
|
3272
3301
|
/* TEXT */
|
|
3273
3302
|
)
|
|
3274
3303
|
]),
|
|
3275
|
-
|
|
3304
|
+
m.action ? (C(), B(S(i), {
|
|
3276
3305
|
key: 1,
|
|
3277
3306
|
"data-test": "action-btn",
|
|
3278
|
-
color:
|
|
3307
|
+
color: m.type,
|
|
3279
3308
|
pastel: "",
|
|
3280
|
-
loading:
|
|
3309
|
+
loading: D.value,
|
|
3281
3310
|
size: "sm",
|
|
3282
|
-
onClick:
|
|
3311
|
+
onClick: A[0] || (A[0] = Y((O) => m.action ? me(m.action.func, O) : void 0, ["stop"]))
|
|
3283
3312
|
}, {
|
|
3284
|
-
default:
|
|
3313
|
+
default: U(() => [
|
|
3285
3314
|
Q(
|
|
3286
|
-
|
|
3315
|
+
Z(m.action.text),
|
|
3287
3316
|
1
|
|
3288
3317
|
/* TEXT */
|
|
3289
3318
|
)
|
|
3290
3319
|
]),
|
|
3291
3320
|
_: 1
|
|
3292
3321
|
/* STABLE */
|
|
3293
|
-
}, 8, ["color", "loading"])) :
|
|
3294
|
-
|
|
3322
|
+
}, 8, ["color", "loading"])) : I("v-if", !0),
|
|
3323
|
+
m.link ? (C(), B(S(i), {
|
|
3295
3324
|
key: 2,
|
|
3296
3325
|
"data-test": "link-btn",
|
|
3297
|
-
color:
|
|
3326
|
+
color: m.type,
|
|
3298
3327
|
pastel: "",
|
|
3299
3328
|
size: "xs",
|
|
3300
|
-
href:
|
|
3301
|
-
target:
|
|
3329
|
+
href: m.link.href,
|
|
3330
|
+
target: m.link.target ?? "_self"
|
|
3302
3331
|
}, {
|
|
3303
|
-
default:
|
|
3304
|
-
var
|
|
3332
|
+
default: U(() => {
|
|
3333
|
+
var O;
|
|
3305
3334
|
return [
|
|
3306
|
-
|
|
3307
|
-
|
|
3335
|
+
F("div", Ln, [
|
|
3336
|
+
m.link.text ? (C(), _(
|
|
3308
3337
|
"span",
|
|
3309
|
-
|
|
3310
|
-
|
|
3338
|
+
zn,
|
|
3339
|
+
Z(m.link.text),
|
|
3311
3340
|
1
|
|
3312
3341
|
/* TEXT */
|
|
3313
|
-
)) :
|
|
3314
|
-
((
|
|
3342
|
+
)) : I("v-if", !0),
|
|
3343
|
+
((O = m.link) == null ? void 0 : O.target) === "_blank" ? (C(), B(S(a), {
|
|
3315
3344
|
key: 1,
|
|
3316
3345
|
class: "maz-text-xl"
|
|
3317
|
-
})) : (
|
|
3346
|
+
})) : (C(), B(S(E), {
|
|
3318
3347
|
key: 2,
|
|
3319
3348
|
class: "maz-text-xl"
|
|
3320
3349
|
}))
|
|
@@ -3323,56 +3352,56 @@ const lo = {
|
|
|
3323
3352
|
}),
|
|
3324
3353
|
_: 1
|
|
3325
3354
|
/* STABLE */
|
|
3326
|
-
}, 8, ["color", "href", "target"])) :
|
|
3327
|
-
|
|
3355
|
+
}, 8, ["color", "href", "target"])) : I("v-if", !0),
|
|
3356
|
+
m.persistent ? I("v-if", !0) : (C(), _("button", {
|
|
3328
3357
|
key: 3,
|
|
3329
3358
|
class: "--close",
|
|
3330
|
-
onClick:
|
|
3359
|
+
onClick: A[1] || (A[1] = Y((O) => de(O), ["stop"]))
|
|
3331
3360
|
}, [
|
|
3332
|
-
J(
|
|
3361
|
+
J(S(r), { class: "--icon maz-text-xl" })
|
|
3333
3362
|
])),
|
|
3334
|
-
typeof
|
|
3335
|
-
|
|
3363
|
+
typeof m.timeout == "number" && m.timeout > 0 ? (C(), _("div", Cn, [
|
|
3364
|
+
F(
|
|
3336
3365
|
"div",
|
|
3337
3366
|
{
|
|
3338
|
-
style:
|
|
3339
|
-
width:
|
|
3367
|
+
style: qt({
|
|
3368
|
+
width: ce.value
|
|
3340
3369
|
}),
|
|
3341
|
-
class:
|
|
3370
|
+
class: le(["maz-h-full !maz-transition-all !maz-duration-200 !maz-ease-linear", De()])
|
|
3342
3371
|
},
|
|
3343
3372
|
null,
|
|
3344
3373
|
6
|
|
3345
3374
|
/* CLASS, STYLE */
|
|
3346
3375
|
)
|
|
3347
|
-
])) :
|
|
3376
|
+
])) : I("v-if", !0)
|
|
3348
3377
|
],
|
|
3349
3378
|
34
|
|
3350
3379
|
/* CLASS, NEED_HYDRATION */
|
|
3351
3380
|
), [
|
|
3352
|
-
[
|
|
3381
|
+
[lt, v.value]
|
|
3353
3382
|
])
|
|
3354
3383
|
]),
|
|
3355
3384
|
_: 1
|
|
3356
3385
|
/* STABLE */
|
|
3357
3386
|
}, 8, ["name"]));
|
|
3358
3387
|
}
|
|
3359
|
-
}),
|
|
3388
|
+
}), kn = /* @__PURE__ */ Re(In, [["__scopeId", "data-v-c8684398"]]), An = {
|
|
3360
3389
|
position: "bottom-right",
|
|
3361
3390
|
timeout: 1e4,
|
|
3362
3391
|
persistent: !1,
|
|
3363
3392
|
icon: !0
|
|
3364
3393
|
};
|
|
3365
|
-
class
|
|
3394
|
+
class Sn {
|
|
3366
3395
|
constructor(e, t) {
|
|
3367
3396
|
this.app = e, this.globalOptions = t;
|
|
3368
3397
|
}
|
|
3369
3398
|
show(e, t) {
|
|
3370
3399
|
const n = {
|
|
3371
|
-
...
|
|
3400
|
+
...An,
|
|
3372
3401
|
...this.globalOptions,
|
|
3373
3402
|
...t,
|
|
3374
3403
|
message: e
|
|
3375
|
-
}, { destroy: o, vNode: i } =
|
|
3404
|
+
}, { destroy: o, vNode: i } = We(kn, {
|
|
3376
3405
|
props: n,
|
|
3377
3406
|
app: this.app
|
|
3378
3407
|
});
|
|
@@ -3406,112 +3435,112 @@ class In {
|
|
|
3406
3435
|
return this.show(e, this.getLocalOptions("warning", t));
|
|
3407
3436
|
}
|
|
3408
3437
|
}
|
|
3409
|
-
function
|
|
3410
|
-
return new
|
|
3438
|
+
function xn(s, e) {
|
|
3439
|
+
return new Sn(s, e);
|
|
3411
3440
|
}
|
|
3412
|
-
const
|
|
3441
|
+
const fo = {
|
|
3413
3442
|
install(s, e) {
|
|
3414
|
-
s.provide("toast",
|
|
3443
|
+
s.provide("toast", xn(s, e));
|
|
3415
3444
|
}
|
|
3416
|
-
},
|
|
3417
|
-
function
|
|
3445
|
+
}, re = "";
|
|
3446
|
+
function On(s) {
|
|
3418
3447
|
return s.filter((e, t, n) => t === n.indexOf(e));
|
|
3419
3448
|
}
|
|
3420
|
-
function
|
|
3421
|
-
return (e =
|
|
3449
|
+
function Dn(s) {
|
|
3450
|
+
return (e = re) => typeof e == "function" ? s.findIndex((...t) => e(...t)) > -1 : s.includes(e);
|
|
3422
3451
|
}
|
|
3423
|
-
const
|
|
3424
|
-
function
|
|
3425
|
-
return (e =
|
|
3452
|
+
const Pn = (s) => s.length > 0;
|
|
3453
|
+
function Mn(s) {
|
|
3454
|
+
return (e = re) => On([...s, e]);
|
|
3426
3455
|
}
|
|
3427
|
-
function
|
|
3428
|
-
return (e =
|
|
3456
|
+
function $n(s) {
|
|
3457
|
+
return (e = re) => s.filter((t) => t !== e);
|
|
3429
3458
|
}
|
|
3430
|
-
class
|
|
3459
|
+
class Hn {
|
|
3431
3460
|
constructor() {
|
|
3432
3461
|
d(this, "_loaders", y([]));
|
|
3433
3462
|
}
|
|
3434
3463
|
get loaders() {
|
|
3435
3464
|
return f(() => this._loaders.value);
|
|
3436
3465
|
}
|
|
3437
|
-
stop(e =
|
|
3438
|
-
this._loaders.value =
|
|
3466
|
+
stop(e = re) {
|
|
3467
|
+
this._loaders.value = $n(this._loaders.value)(e);
|
|
3439
3468
|
}
|
|
3440
|
-
start(e =
|
|
3441
|
-
return this._loaders.value =
|
|
3469
|
+
start(e = re) {
|
|
3470
|
+
return this._loaders.value = Mn(this._loaders.value)(e), () => this.stop(e);
|
|
3442
3471
|
}
|
|
3443
3472
|
get anyLoading() {
|
|
3444
|
-
return f(() =>
|
|
3473
|
+
return f(() => Pn(this._loaders.value));
|
|
3445
3474
|
}
|
|
3446
|
-
isLoading(e =
|
|
3447
|
-
return f(() =>
|
|
3475
|
+
isLoading(e = re) {
|
|
3476
|
+
return f(() => Dn(this._loaders.value)(e)).value;
|
|
3448
3477
|
}
|
|
3449
3478
|
}
|
|
3450
|
-
const
|
|
3479
|
+
const Vn = new Hn(), ho = {
|
|
3451
3480
|
install: (s) => {
|
|
3452
|
-
s.provide("wait",
|
|
3481
|
+
s.provide("wait", Vn);
|
|
3453
3482
|
}
|
|
3454
3483
|
};
|
|
3455
3484
|
export {
|
|
3456
|
-
|
|
3457
|
-
|
|
3458
|
-
|
|
3459
|
-
|
|
3460
|
-
|
|
3461
|
-
|
|
3462
|
-
|
|
3463
|
-
|
|
3464
|
-
|
|
3465
|
-
|
|
3466
|
-
|
|
3467
|
-
|
|
3468
|
-
|
|
3485
|
+
uo as $,
|
|
3486
|
+
qs as A,
|
|
3487
|
+
_s as B,
|
|
3488
|
+
Rs as C,
|
|
3489
|
+
ro as D,
|
|
3490
|
+
Xs as E,
|
|
3491
|
+
Zs as F,
|
|
3492
|
+
lo as G,
|
|
3493
|
+
Qs as H,
|
|
3494
|
+
sn as I,
|
|
3495
|
+
on as J,
|
|
3496
|
+
an as K,
|
|
3497
|
+
ct as L,
|
|
3469
3498
|
so as M,
|
|
3470
3499
|
no as N,
|
|
3471
|
-
|
|
3472
|
-
|
|
3473
|
-
|
|
3474
|
-
|
|
3500
|
+
ms as O,
|
|
3501
|
+
N as P,
|
|
3502
|
+
We as Q,
|
|
3503
|
+
Ge as R,
|
|
3475
3504
|
oo as S,
|
|
3476
|
-
|
|
3477
|
-
|
|
3505
|
+
Hs as T,
|
|
3506
|
+
Ts as U,
|
|
3478
3507
|
io as V,
|
|
3479
|
-
|
|
3480
|
-
|
|
3481
|
-
|
|
3482
|
-
|
|
3483
|
-
|
|
3484
|
-
|
|
3485
|
-
|
|
3486
|
-
|
|
3487
|
-
|
|
3488
|
-
|
|
3489
|
-
|
|
3490
|
-
|
|
3491
|
-
|
|
3492
|
-
|
|
3493
|
-
|
|
3494
|
-
|
|
3495
|
-
|
|
3496
|
-
|
|
3497
|
-
|
|
3498
|
-
|
|
3499
|
-
|
|
3500
|
-
|
|
3501
|
-
|
|
3502
|
-
|
|
3503
|
-
|
|
3504
|
-
|
|
3505
|
-
|
|
3506
|
-
|
|
3507
|
-
|
|
3508
|
-
|
|
3509
|
-
|
|
3510
|
-
|
|
3511
|
-
|
|
3512
|
-
|
|
3513
|
-
|
|
3514
|
-
|
|
3515
|
-
|
|
3516
|
-
|
|
3508
|
+
$s as W,
|
|
3509
|
+
Is as X,
|
|
3510
|
+
un as Y,
|
|
3511
|
+
co as Z,
|
|
3512
|
+
Re as _,
|
|
3513
|
+
jn as a,
|
|
3514
|
+
wn as a0,
|
|
3515
|
+
mo as a1,
|
|
3516
|
+
fo as a2,
|
|
3517
|
+
Sn as a3,
|
|
3518
|
+
Vn as a4,
|
|
3519
|
+
ho as a5,
|
|
3520
|
+
Hn as a6,
|
|
3521
|
+
Un as b,
|
|
3522
|
+
_n as c,
|
|
3523
|
+
qn as d,
|
|
3524
|
+
Wn as e,
|
|
3525
|
+
Rn as f,
|
|
3526
|
+
fs as g,
|
|
3527
|
+
Kn as h,
|
|
3528
|
+
Oe as i,
|
|
3529
|
+
Yn as j,
|
|
3530
|
+
Zn as k,
|
|
3531
|
+
Xn as l,
|
|
3532
|
+
Gn as m,
|
|
3533
|
+
Cs as n,
|
|
3534
|
+
Qn as o,
|
|
3535
|
+
Jn as p,
|
|
3536
|
+
eo as q,
|
|
3537
|
+
Rt as r,
|
|
3538
|
+
ao as s,
|
|
3539
|
+
As as t,
|
|
3540
|
+
Nn as u,
|
|
3541
|
+
Ss as v,
|
|
3542
|
+
Ds as w,
|
|
3543
|
+
Ps as x,
|
|
3544
|
+
to as y,
|
|
3545
|
+
Ms as z
|
|
3517
3546
|
};
|