maz-ui 3.44.4-beta.0 → 3.44.4-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/MazAccordion.d.ts +12 -10
- package/components/MazAnimatedCounter.d.ts +15 -13
- package/components/MazAvatar.d.ts +9 -7
- package/components/MazBackdrop.d.ts +12 -21
- package/components/MazBadge.d.ts +6 -4
- package/components/MazBottomSheet.d.ts +8 -6
- package/components/MazBtn.d.ts +12 -10
- package/components/MazCard.d.ts +16 -14
- package/components/MazCard.mjs +1 -1
- package/components/MazCardSpotlight.d.ts +7 -5
- package/components/MazCarousel.d.ts +9 -7
- package/components/MazChart.d.ts +6 -6
- package/components/MazCheckbox.d.ts +7 -5
- package/components/MazCircularProgressBar.d.ts +27 -24
- package/components/MazDialog.d.ts +16 -24
- package/components/MazDialogPromise/use-maz-dialog-promise.d.ts +29 -29
- package/components/MazDrawer.d.ts +12 -10
- package/components/MazDropdown.d.ts +27 -25
- package/components/MazDropzone.d.ts +15 -15
- package/components/MazExpandAnimation.d.ts +6 -4
- package/components/MazFullscreenLoader.d.ts +6 -4
- package/components/MazIcon.d.ts +3 -3
- package/components/MazInput.d.ts +15 -133
- package/components/MazInputCode.d.ts +2 -2
- package/components/MazInputNumber.d.ts +2 -2
- package/components/MazInputPrice.d.ts +7 -5
- package/components/MazInputTags.d.ts +1 -1
- package/components/MazLazyImg.d.ts +9 -7
- package/components/MazLink.d.ts +10 -8
- package/components/MazPagination.d.ts +20 -18
- package/components/MazPhoneNumberInput/CountrySelector.vue.d.ts +53 -70
- package/components/MazPhoneNumberInput.d.ts +17 -25
- package/components/MazPhoneNumberInput.mjs +1 -1
- package/components/MazPicker/MazPickerCalendarMonth/MazPickerCalendarGrid.vue.d.ts +3 -3
- package/components/MazPicker/MazPickerCalendarMonth/MazPickerCalendarMonth.vue.d.ts +3 -3
- package/components/MazPicker.d.ts +1 -1
- package/components/MazPicker.mjs +1 -1
- package/components/MazPullToRefresh.d.ts +9 -7
- package/components/MazRadio.d.ts +27 -24
- package/components/MazRadioButtons.d.ts +10 -8
- package/components/MazReadingProgressBar.d.ts +1 -1
- package/components/MazSelect.d.ts +16 -125
- package/components/MazSelect.mjs +1 -1
- package/components/MazStepper.d.ts +10 -8
- package/components/MazSwitch.d.ts +9 -7
- package/components/MazTable.d.ts +67 -65
- package/components/MazTable.mjs +1 -1
- package/components/MazTableCell.d.ts +4 -2
- package/components/MazTableRow.d.ts +4 -2
- package/components/MazTableTitle.d.ts +4 -2
- package/components/MazTabs.d.ts +6 -4
- package/components/MazTabsBar.d.ts +18 -16
- package/components/MazTabsContent.d.ts +4 -2
- package/components/MazTabsContentItem.d.ts +6 -4
- package/components/MazTextarea.d.ts +1 -1
- package/components/MazTransitionExpand.d.ts +6 -4
- package/components/MazTransitionExpand.mjs +2 -2
- package/components/assets/MazPhoneNumberInput.css +1 -1
- package/components/assets/MazPickerMonthSwitcher.css +1 -1
- package/components/assets/MazPickerYearSwitcher.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/assets/MazTransitionExpand.css +1 -1
- package/components/chunks/{MazBtn-B5XwteK7.mjs → MazBtn-BURByjBO.mjs} +2 -2
- package/components/chunks/{MazBtn-CQSo596y.mjs → MazBtn-D1TNsXIe.mjs} +2 -2
- package/components/chunks/{MazBtn-gj2W8kzn.mjs → MazBtn-YtY4PeyZ.mjs} +2 -2
- package/components/chunks/{MazCard-BBwohtCJ.mjs → MazCard-BiDXoNWK.mjs} +1 -1
- package/components/chunks/{MazCheckbox-isKq9dAX.mjs → MazCheckbox-BMzMZ-_l.mjs} +1 -1
- package/components/chunks/{MazCheckbox-CqHZNrGa.mjs → MazCheckbox-B_Rx3ZCe.mjs} +1 -1
- package/components/chunks/{MazGallery-Din0Z37d.mjs → MazGallery-SSMQ_JIA.mjs} +2 -2
- package/components/chunks/{MazIcon-D2DkwtXq.mjs → MazIcon-CwITLbPL.mjs} +1 -1
- package/components/chunks/{MazIcon-DHzZGzIp.mjs → MazIcon-x_aGvHlZ.mjs} +1 -1
- package/components/chunks/{MazPhoneNumberInput-CYcy4OZW.mjs → MazPhoneNumberInput-fo2MtuWB.mjs} +6 -6
- package/components/chunks/{MazPicker-DCTIkgDd.mjs → MazPicker-Df-LRtwz.mjs} +2 -2
- package/components/chunks/{MazPickerMonthSwitcher-CINBaU3n.mjs → MazPickerMonthSwitcher-CrrfUDPA.mjs} +2 -2
- package/components/chunks/{MazPickerShortcuts-vvPV1aW8.mjs → MazPickerShortcuts-Dpm1ra_Y.mjs} +1 -1
- package/components/chunks/{MazPickerYearSwitcher-CkqFNhde.mjs → MazPickerYearSwitcher-BIeGuXI7.mjs} +2 -2
- package/components/chunks/{MazSelect-DvNLFDvj.mjs → MazSelect-xBiD7HuJ.mjs} +6 -6
- package/components/chunks/{MazSpinner-C7s8yroP.mjs → MazSpinner-C5MXwcx7.mjs} +1 -1
- package/components/chunks/{MazSpinner-BVd7-OTu.mjs → MazSpinner-CrDTibNk.mjs} +1 -1
- package/components/chunks/{MazSpinner-CpYgtvc9.mjs → MazSpinner-CvucKhXp.mjs} +1 -1
- package/components/chunks/MazSpinner-DDmCKWOx.mjs +37 -0
- package/components/chunks/{MazSpinner-CAG800x4.mjs → MazSpinner-QIX5R4Hk.mjs} +1 -1
- package/components/chunks/{MazTable-BN-Yp2RW.mjs → MazTable-1D7GRSpa.mjs} +6 -6
- package/components/chunks/{MazTransitionExpand-CYyEf_hd.mjs → MazTransitionExpand-BLFZPAt_.mjs} +11 -11
- package/modules/assets/index.css +1 -1
- package/modules/chunks/{MazBtn-BVqZ8Wej.cjs → MazBtn-BLvj2Vcl.cjs} +1 -1
- package/modules/chunks/{MazBtn-Cuj6yEZn.mjs → MazBtn-DhVNaOBj.mjs} +2 -2
- package/modules/chunks/{MazIcon-CyWCmQpN.cjs → MazIcon-BhCADEJL.cjs} +1 -1
- package/modules/chunks/{MazIcon-COFexHFo.mjs → MazIcon-ZPJHGsC7.mjs} +1 -1
- package/modules/chunks/{MazSpinner-BtXwGTnk.mjs → MazSpinner-Dx_yL6x9.mjs} +1 -1
- package/modules/chunks/{MazSpinner-Dz0kdTmr.cjs → MazSpinner-OdoRwyjg.cjs} +1 -1
- package/modules/chunks/{index-DW2zAKgR.cjs → index-BT3W7L22.cjs} +2 -2
- package/modules/chunks/{index-BBOf37yd.mjs → index-CgWq2KzW.mjs} +363 -360
- package/modules/index.cjs +1 -1
- package/modules/index.mjs +1 -1
- package/nuxt/index.json +2 -2
- package/nuxt/types.d.mts +4 -23
- package/nuxt/types.d.ts +4 -23
- package/package.json +25 -25
- package/types/components/MazAccordion.vue.d.ts +12 -10
- package/types/components/MazAnimatedCounter.vue.d.ts +15 -13
- package/types/components/MazAvatar.vue.d.ts +9 -7
- package/types/components/MazBackdrop.vue.d.ts +12 -21
- package/types/components/MazBadge.vue.d.ts +6 -4
- package/types/components/MazBottomSheet.vue.d.ts +8 -6
- package/types/components/MazBtn.vue.d.ts +12 -10
- package/types/components/MazCard.vue.d.ts +16 -14
- package/types/components/MazCardSpotlight.vue.d.ts +7 -5
- package/types/components/MazCarousel.vue.d.ts +9 -7
- package/types/components/MazChart.vue.d.ts +6 -6
- package/types/components/MazCheckbox.vue.d.ts +7 -5
- package/types/components/MazCircularProgressBar.vue.d.ts +27 -24
- package/types/components/MazDialog.vue.d.ts +16 -24
- package/types/components/MazDialogPromise/use-maz-dialog-promise.d.ts +29 -29
- package/types/components/MazDrawer.vue.d.ts +12 -10
- package/types/components/MazDropdown.vue.d.ts +27 -25
- package/types/components/MazDropzone.vue.d.ts +15 -15
- package/types/components/MazExpandAnimation.vue.d.ts +6 -4
- package/types/components/MazFullscreenLoader.vue.d.ts +6 -4
- package/types/components/MazIcon.vue.d.ts +3 -3
- package/types/components/MazInput.vue.d.ts +15 -133
- package/types/components/MazInputCode.vue.d.ts +2 -2
- package/types/components/MazInputNumber.vue.d.ts +2 -2
- package/types/components/MazInputPrice.vue.d.ts +7 -5
- package/types/components/MazInputTags.vue.d.ts +1 -1
- package/types/components/MazLazyImg.vue.d.ts +9 -7
- package/types/components/MazLink.vue.d.ts +10 -8
- package/types/components/MazPagination.vue.d.ts +20 -18
- package/types/components/MazPhoneNumberInput/CountrySelector.vue.d.ts +53 -70
- package/types/components/MazPhoneNumberInput.vue.d.ts +17 -25
- package/types/components/MazPicker/MazPickerCalendarMonth/MazPickerCalendarGrid.vue.d.ts +3 -3
- package/types/components/MazPicker/MazPickerCalendarMonth/MazPickerCalendarMonth.vue.d.ts +3 -3
- package/types/components/MazPicker.vue.d.ts +1 -1
- package/types/components/MazPullToRefresh.vue.d.ts +9 -7
- package/types/components/MazRadio.vue.d.ts +27 -24
- package/types/components/MazRadioButtons.vue.d.ts +10 -8
- package/types/components/MazReadingProgressBar.vue.d.ts +1 -1
- package/types/components/MazSelect.vue.d.ts +16 -125
- package/types/components/MazStepper.vue.d.ts +10 -8
- package/types/components/MazSwitch.vue.d.ts +9 -7
- package/types/components/MazTable.vue.d.ts +67 -65
- package/types/components/MazTableCell.vue.d.ts +4 -2
- package/types/components/MazTableRow.vue.d.ts +4 -2
- package/types/components/MazTableTitle.vue.d.ts +4 -2
- package/types/components/MazTabs.vue.d.ts +6 -4
- package/types/components/MazTabsBar.vue.d.ts +18 -16
- package/types/components/MazTabsContent.vue.d.ts +4 -2
- package/types/components/MazTabsContentItem.vue.d.ts +6 -4
- package/types/components/MazTextarea.vue.d.ts +1 -1
- package/types/components/MazTransitionExpand.vue.d.ts +6 -4
- package/types/modules/composables/use-form-validator/index.d.ts +5 -7
- package/types/modules/composables/use-form-validator/types.d.ts +16 -11
- package/types/modules/composables/use-form-validator/utils.d.ts +13 -13
- package/types/modules/directives/v-fullscreen-img/MazFullscreenImg.vue.d.ts +2 -2
- package/types/modules/plugins/toaster/MazToast.vue.d.ts +1 -1
- package/types/tailwindcss/tailwind.config.d.ts +2 -2
- package/components/chunks/MazSpinner-D1paofz3.mjs +0 -37
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import '../assets/index.css';var
|
|
2
|
-
var
|
|
3
|
-
var l = (s, e, t) =>
|
|
4
|
-
import { inject as
|
|
1
|
+
import '../assets/index.css';var ht = Object.defineProperty;
|
|
2
|
+
var ft = (s, e, t) => e in s ? ht(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t;
|
|
3
|
+
var l = (s, e, t) => ft(s, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
+
import { inject as _e, createVNode as te, render as ce, nextTick as vt, defineComponent as Ne, defineAsyncComponent as N, ref as g, computed as h, watch as ie, onMounted as pe, onBeforeUnmount as Be, openBlock as F, createElementBlock as se, withModifiers as X, withKeys as pt, withDirectives as qe, unref as W, vShow as je, createCommentVNode as j, createElementVNode as Z, normalizeClass as Ie, createBlock as ee, Transition as gt, withCtx as we, resolveDynamicComponent as yt, toDisplayString as Ee, createTextVNode as bt, normalizeStyle as wt, getCurrentInstance as Et, onUnmounted as Ue, toValue as We, reactive as zt, provide as Tt } from "vue";
|
|
5
5
|
function Ae(s, e) {
|
|
6
|
-
const t =
|
|
6
|
+
const t = _e(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
|
|
11
|
+
function Ys(s, e) {
|
|
12
12
|
let t;
|
|
13
13
|
return function(...n) {
|
|
14
14
|
clearTimeout(t), t = setTimeout(() => {
|
|
@@ -16,10 +16,10 @@ function Rs(s, e) {
|
|
|
16
16
|
}, e);
|
|
17
17
|
};
|
|
18
18
|
}
|
|
19
|
-
function
|
|
19
|
+
function Lt(s) {
|
|
20
20
|
return !!s;
|
|
21
21
|
}
|
|
22
|
-
function
|
|
22
|
+
function Ye(s, e) {
|
|
23
23
|
let t = e == null ? void 0 : e.element;
|
|
24
24
|
function n() {
|
|
25
25
|
t && ce(null, t);
|
|
@@ -31,10 +31,10 @@ function We(s, e) {
|
|
|
31
31
|
);
|
|
32
32
|
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 };
|
|
33
33
|
}
|
|
34
|
-
function
|
|
34
|
+
function M() {
|
|
35
35
|
return typeof document < "u";
|
|
36
36
|
}
|
|
37
|
-
class
|
|
37
|
+
class It {
|
|
38
38
|
constructor(e, t) {
|
|
39
39
|
l(this, "defaultOptions", {
|
|
40
40
|
element: void 0,
|
|
@@ -82,13 +82,13 @@ class Lt {
|
|
|
82
82
|
this.callback = e, this.options = {
|
|
83
83
|
...this.defaultOptions,
|
|
84
84
|
...t
|
|
85
|
-
},
|
|
85
|
+
}, M() && this.start();
|
|
86
86
|
}
|
|
87
87
|
get element() {
|
|
88
88
|
return this.options.element ?? document.body;
|
|
89
89
|
}
|
|
90
90
|
start() {
|
|
91
|
-
if (!
|
|
91
|
+
if (!M()) {
|
|
92
92
|
console.warn("[IdleTimeout](start) you should run this method on client side");
|
|
93
93
|
return;
|
|
94
94
|
}
|
|
@@ -107,7 +107,7 @@ class Lt {
|
|
|
107
107
|
this.isDestroy = !1, this.isIdle = !1, this.remainingTime = 0, this.resetTimeout(), this.callback({ isIdle: this.isIdle });
|
|
108
108
|
}
|
|
109
109
|
destroy() {
|
|
110
|
-
if (!
|
|
110
|
+
if (!M()) {
|
|
111
111
|
console.warn("[IdleTimeout](destroy) you should run this method on client side");
|
|
112
112
|
return;
|
|
113
113
|
}
|
|
@@ -141,7 +141,7 @@ class Lt {
|
|
|
141
141
|
e ? this.handleTimeout() : this.reset(), this.callback({ isIdle: this.isIdle });
|
|
142
142
|
}
|
|
143
143
|
}
|
|
144
|
-
class
|
|
144
|
+
class St {
|
|
145
145
|
constructor(e, t) {
|
|
146
146
|
l(this, "eventHandlerFunction");
|
|
147
147
|
l(this, "event", "visibilitychange");
|
|
@@ -156,10 +156,10 @@ class It {
|
|
|
156
156
|
this.callback = e, this.options = {
|
|
157
157
|
...this.defaultOptions,
|
|
158
158
|
...t
|
|
159
|
-
}, this.eventHandlerFunction = this.eventHandler.bind(this),
|
|
159
|
+
}, this.eventHandlerFunction = this.eventHandler.bind(this), M() && this.start();
|
|
160
160
|
}
|
|
161
161
|
start() {
|
|
162
|
-
if (!
|
|
162
|
+
if (!M()) {
|
|
163
163
|
console.warn("[UserVisibility](start) you should run this method on client side");
|
|
164
164
|
return;
|
|
165
165
|
}
|
|
@@ -187,10 +187,10 @@ class It {
|
|
|
187
187
|
this.removeEventListener(), this.timeoutHandler && clearTimeout(this.timeoutHandler);
|
|
188
188
|
}
|
|
189
189
|
}
|
|
190
|
-
function
|
|
190
|
+
function Ke(s) {
|
|
191
191
|
return new Promise((e) => setTimeout(e, s));
|
|
192
192
|
}
|
|
193
|
-
class
|
|
193
|
+
class Ks {
|
|
194
194
|
constructor({ src: e, identifier: t, once: n = !0, async: i = !0, defer: o = !0 }) {
|
|
195
195
|
l(this, "src");
|
|
196
196
|
l(this, "script");
|
|
@@ -231,13 +231,13 @@ class Ys {
|
|
|
231
231
|
});
|
|
232
232
|
}
|
|
233
233
|
}
|
|
234
|
-
function
|
|
234
|
+
function Rs(s) {
|
|
235
235
|
return [...s].map((e) => {
|
|
236
236
|
const t = e.codePointAt(0);
|
|
237
237
|
return t ? t % 32 + 127461 : void 0;
|
|
238
|
-
}).filter(
|
|
238
|
+
}).filter(Lt).map((e) => String.fromCodePoint(e)).join("");
|
|
239
239
|
}
|
|
240
|
-
class
|
|
240
|
+
class kt {
|
|
241
241
|
constructor(e) {
|
|
242
242
|
l(this, "defaultOptions", {
|
|
243
243
|
preventDefaultOnTouchMove: !1,
|
|
@@ -315,7 +315,7 @@ function Xs(s, e) {
|
|
|
315
315
|
n - t >= e && (await s(), t = n);
|
|
316
316
|
};
|
|
317
317
|
}
|
|
318
|
-
const
|
|
318
|
+
const Ct = {
|
|
319
319
|
removeAccents: !0,
|
|
320
320
|
caseSensitive: !1,
|
|
321
321
|
replaceSpaces: !0,
|
|
@@ -326,7 +326,7 @@ const kt = {
|
|
|
326
326
|
customNormalizationForms: ["NFC", "NFKD"]
|
|
327
327
|
};
|
|
328
328
|
function Oe(s, e) {
|
|
329
|
-
const t = { ...
|
|
329
|
+
const t = { ...Ct, ...e }, n = {
|
|
330
330
|
À: "A",
|
|
331
331
|
Á: "A",
|
|
332
332
|
Â: "A",
|
|
@@ -382,52 +382,52 @@ function Oe(s, e) {
|
|
|
382
382
|
return i;
|
|
383
383
|
}
|
|
384
384
|
const ve = "__maz-click-outside__";
|
|
385
|
-
function
|
|
385
|
+
function Re() {
|
|
386
386
|
return document.ontouchstart === null ? "touchstart" : "click";
|
|
387
387
|
}
|
|
388
|
-
async function
|
|
388
|
+
async function Xe(s, e) {
|
|
389
389
|
try {
|
|
390
|
-
|
|
390
|
+
Ze(s);
|
|
391
391
|
const t = e.instance, n = e.value, i = typeof n == "function";
|
|
392
392
|
if (!i)
|
|
393
393
|
throw new Error("[maz-ui](vClickOutside) the callback should be a function");
|
|
394
|
-
await
|
|
394
|
+
await vt(), s[ve] = (r) => {
|
|
395
395
|
if ((!s || r.target && !s.contains(r.target)) && n && i)
|
|
396
396
|
return n.call(t, r);
|
|
397
397
|
};
|
|
398
|
-
const o =
|
|
398
|
+
const o = Re();
|
|
399
399
|
document.addEventListener(o, s[ve], { passive: !0 });
|
|
400
400
|
} catch (t) {
|
|
401
401
|
console.error("[maz-ui](vClickOutside)", t);
|
|
402
402
|
}
|
|
403
403
|
}
|
|
404
|
-
function
|
|
404
|
+
function Ze(s) {
|
|
405
405
|
try {
|
|
406
|
-
const e =
|
|
406
|
+
const e = Re();
|
|
407
407
|
document.removeEventListener(e, s[ve], !1), delete s[ve];
|
|
408
408
|
} catch (e) {
|
|
409
409
|
console.error("[maz-ui](vClickOutside)", e);
|
|
410
410
|
}
|
|
411
411
|
}
|
|
412
|
-
function
|
|
412
|
+
function At(s, e) {
|
|
413
413
|
try {
|
|
414
414
|
if (e.value === e.oldValue)
|
|
415
415
|
return;
|
|
416
|
-
|
|
416
|
+
Xe(s, e);
|
|
417
417
|
} catch (t) {
|
|
418
418
|
console.error("[maz-ui](vClickOutside)", t);
|
|
419
419
|
}
|
|
420
420
|
}
|
|
421
|
-
const
|
|
422
|
-
mounted:
|
|
423
|
-
updated:
|
|
424
|
-
unmounted:
|
|
425
|
-
},
|
|
421
|
+
const xt = {
|
|
422
|
+
mounted: Xe,
|
|
423
|
+
updated: At,
|
|
424
|
+
unmounted: Ze
|
|
425
|
+
}, Ot = {
|
|
426
426
|
install: (s) => {
|
|
427
|
-
s.directive("click-outside",
|
|
427
|
+
s.directive("click-outside", xt);
|
|
428
428
|
}
|
|
429
429
|
};
|
|
430
|
-
function
|
|
430
|
+
function Qe(s, e, t) {
|
|
431
431
|
var r;
|
|
432
432
|
s.stopPropagation();
|
|
433
433
|
const n = typeof t.value == "function" ? t.value : t.value.handler, i = typeof t.value == "object" ? t.value.exclude : void 0;
|
|
@@ -441,32 +441,32 @@ function Ze(s, e, t) {
|
|
|
441
441
|
}
|
|
442
442
|
!e.contains(s.target) && !o && (n == null || n());
|
|
443
443
|
}
|
|
444
|
-
function
|
|
444
|
+
function Ge() {
|
|
445
445
|
return document.ontouchstart === null ? "touchstart" : "click";
|
|
446
446
|
}
|
|
447
|
-
function Ot(s, e) {
|
|
448
|
-
const t = Qe();
|
|
449
|
-
document.removeEventListener(t, (n) => Ze(n, s, e));
|
|
450
|
-
}
|
|
451
447
|
function Dt(s, e) {
|
|
448
|
+
const t = Ge();
|
|
449
|
+
document.removeEventListener(t, (n) => Qe(n, s, e));
|
|
450
|
+
}
|
|
451
|
+
function Ft(s, e) {
|
|
452
452
|
if (typeof e.value != "function" && typeof e.value == "object" && typeof e.value.handler != "function") {
|
|
453
453
|
console.error("[maz-ui](vClosable) v-closable directive requires a handler function");
|
|
454
454
|
return;
|
|
455
455
|
}
|
|
456
|
-
const t =
|
|
457
|
-
document.addEventListener(t, (n) =>
|
|
456
|
+
const t = Ge();
|
|
457
|
+
document.addEventListener(t, (n) => Qe(n, s, e));
|
|
458
458
|
}
|
|
459
|
-
const
|
|
460
|
-
mounted:
|
|
461
|
-
unmounted:
|
|
459
|
+
const Mt = {
|
|
460
|
+
mounted: Ft,
|
|
461
|
+
unmounted: Dt
|
|
462
462
|
}, Ht = {
|
|
463
463
|
install: (s) => {
|
|
464
|
-
s.directive("closable",
|
|
464
|
+
s.directive("closable", Mt);
|
|
465
465
|
}
|
|
466
466
|
}, Se = {
|
|
467
467
|
position: "top"
|
|
468
468
|
};
|
|
469
|
-
class
|
|
469
|
+
class Je {
|
|
470
470
|
constructor(e = {}) {
|
|
471
471
|
l(this, "options");
|
|
472
472
|
this.options = {
|
|
@@ -502,7 +502,7 @@ let de;
|
|
|
502
502
|
const Zs = {
|
|
503
503
|
beforeMount(s, e) {
|
|
504
504
|
const t = typeof e.value == "object" ? e.value : {};
|
|
505
|
-
return de = new
|
|
505
|
+
return de = new Je(t), de.create(s, e);
|
|
506
506
|
},
|
|
507
507
|
updated(s, e) {
|
|
508
508
|
return de.update(s, e);
|
|
@@ -510,19 +510,19 @@ const Zs = {
|
|
|
510
510
|
unmounted(s, e) {
|
|
511
511
|
return de.remove(s, e);
|
|
512
512
|
}
|
|
513
|
-
},
|
|
513
|
+
}, Pt = {
|
|
514
514
|
install: (s, e = Se) => {
|
|
515
515
|
const t = {
|
|
516
516
|
...Se,
|
|
517
517
|
...e
|
|
518
|
-
}, n = new
|
|
518
|
+
}, n = new Je(t);
|
|
519
519
|
s.directive("tooltip", {
|
|
520
520
|
beforeMount: n.create.bind(n),
|
|
521
521
|
updated: n.update.bind(n),
|
|
522
522
|
unmounted: n.remove.bind(n)
|
|
523
523
|
});
|
|
524
524
|
}
|
|
525
|
-
},
|
|
525
|
+
}, $t = `
|
|
526
526
|
.maz-zoom-img {
|
|
527
527
|
position: fixed;
|
|
528
528
|
top: 0;
|
|
@@ -651,7 +651,7 @@ const Zs = {
|
|
|
651
651
|
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>',
|
|
652
652
|
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>'
|
|
653
653
|
};
|
|
654
|
-
class
|
|
654
|
+
class Vt {
|
|
655
655
|
constructor(e) {
|
|
656
656
|
l(this, "options");
|
|
657
657
|
l(this, "loader");
|
|
@@ -698,7 +698,7 @@ class $t {
|
|
|
698
698
|
e.classList.add(
|
|
699
699
|
"maz-is-open"
|
|
700
700
|
/* OPEN */
|
|
701
|
-
), this.addStyle(
|
|
701
|
+
), this.addStyle($t);
|
|
702
702
|
const n = document.createElement("div");
|
|
703
703
|
n.classList.add("maz-zoom-img"), n.setAttribute("id", "MazImgPreviewFullsize"), n.addEventListener("click", (i) => {
|
|
704
704
|
n.isEqualNode(i.target) && this.closePreview();
|
|
@@ -786,9 +786,9 @@ class $t {
|
|
|
786
786
|
}
|
|
787
787
|
}
|
|
788
788
|
let me;
|
|
789
|
-
const
|
|
789
|
+
const _t = {
|
|
790
790
|
created(s, e) {
|
|
791
|
-
me = new
|
|
791
|
+
me = new Vt(e), me.create(s);
|
|
792
792
|
},
|
|
793
793
|
updated(s, e) {
|
|
794
794
|
me.update(e);
|
|
@@ -796,11 +796,11 @@ const Vt = {
|
|
|
796
796
|
unmounted(s) {
|
|
797
797
|
me.remove(s);
|
|
798
798
|
}
|
|
799
|
-
},
|
|
799
|
+
}, Nt = {
|
|
800
800
|
install(s) {
|
|
801
|
-
s.directive("zoom-img",
|
|
801
|
+
s.directive("zoom-img", _t);
|
|
802
802
|
}
|
|
803
|
-
},
|
|
803
|
+
}, Bt = "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7", ke = {
|
|
804
804
|
baseClass: "m-lazy-img",
|
|
805
805
|
loadedClass: "m-lazy-loaded",
|
|
806
806
|
loadingClass: "m-lazy-loading",
|
|
@@ -814,7 +814,7 @@ const Vt = {
|
|
|
814
814
|
threshold: 0.1
|
|
815
815
|
}
|
|
816
816
|
};
|
|
817
|
-
class
|
|
817
|
+
class et {
|
|
818
818
|
constructor(e = {}) {
|
|
819
819
|
l(this, "observers", []);
|
|
820
820
|
l(this, "defaultOptions", ke);
|
|
@@ -955,7 +955,7 @@ class Je {
|
|
|
955
955
|
async add(e, t) {
|
|
956
956
|
if (this.hasBgImgMode(t) && this.isPictureElement(e))
|
|
957
957
|
throw new Error(`[MazLazyImg] You can't use the "bg-image" mode with "<picture />" element`);
|
|
958
|
-
setTimeout(() => this.setBaseClass(e), 0), e.getAttribute("src") || this.setImgSrc(e,
|
|
958
|
+
setTimeout(() => this.setBaseClass(e), 0), e.getAttribute("src") || this.setImgSrc(e, Bt), await this.bindUpdateHandler(e, t, "bind");
|
|
959
959
|
}
|
|
960
960
|
async update(e, t) {
|
|
961
961
|
t.value !== t.oldValue && (this.hasImgLoaded = !1, this.removeAllStateClasses(e), await this.bindUpdateHandler(e, t, "update"));
|
|
@@ -971,7 +971,7 @@ let he;
|
|
|
971
971
|
const Qs = {
|
|
972
972
|
created(s, e) {
|
|
973
973
|
const t = typeof e.value == "object" ? e.value : {};
|
|
974
|
-
he = new
|
|
974
|
+
he = new et(t), he.add(s, e);
|
|
975
975
|
},
|
|
976
976
|
updated(s, e) {
|
|
977
977
|
he.update(s, e);
|
|
@@ -979,7 +979,7 @@ const Qs = {
|
|
|
979
979
|
unmounted(s, e) {
|
|
980
980
|
he.remove(s, e);
|
|
981
981
|
}
|
|
982
|
-
},
|
|
982
|
+
}, qt = {
|
|
983
983
|
install(s, e = {}) {
|
|
984
984
|
const t = {
|
|
985
985
|
...ke,
|
|
@@ -988,14 +988,14 @@ const Qs = {
|
|
|
988
988
|
...ke.observerOptions,
|
|
989
989
|
...e.observerOptions
|
|
990
990
|
}
|
|
991
|
-
}, n = new
|
|
991
|
+
}, n = new et(t);
|
|
992
992
|
s.directive("lazy-img", {
|
|
993
993
|
created: n.add.bind(n),
|
|
994
994
|
updated: n.update.bind(n),
|
|
995
995
|
unmounted: n.remove.bind(n)
|
|
996
996
|
});
|
|
997
997
|
}
|
|
998
|
-
},
|
|
998
|
+
}, jt = ["onKeypress"], Ut = { class: "m-fullscreen-img-scroller" }, Wt = ["src", "alt"], Yt = /* @__PURE__ */ Ne({
|
|
999
999
|
__name: "MazFullscreenImg",
|
|
1000
1000
|
props: {
|
|
1001
1001
|
src: {},
|
|
@@ -1013,10 +1013,10 @@ const Qs = {
|
|
|
1013
1013
|
},
|
|
1014
1014
|
emits: ["close", "previous", "next", "before-close"],
|
|
1015
1015
|
setup(s, { emit: e }) {
|
|
1016
|
-
const t = s, n = e, i =
|
|
1016
|
+
const t = s, n = e, i = N(() => import("./MazSpinner-Dx_yL6x9.mjs")), o = N(() => import("./x-mark-BP8zWe_C.mjs")), r = N(() => import("./chevron-left-CcZaP3Rc.mjs")), a = g(!1), m = g(!1), y = g(!1), C = g(!1), b = g(!1), f = g(t.clickedElement), T = h(() => t.clickedElement.getBoundingClientRect()), O = h(
|
|
1017
1017
|
() => T.value.height < T.value.width
|
|
1018
|
-
),
|
|
1019
|
-
function
|
|
1018
|
+
), H = g(t.src), D = g(t.alt), P = g(), w = g(), S = h(() => b.value ? "--is-zoomed maz-cursor-zoom-out" : "maz-cursor-zoom-in");
|
|
1019
|
+
function $() {
|
|
1020
1020
|
a.value = !0, m.value = !1, y.value = !0;
|
|
1021
1021
|
}
|
|
1022
1022
|
ie(
|
|
@@ -1025,11 +1025,11 @@ const Qs = {
|
|
|
1025
1025
|
u && ge();
|
|
1026
1026
|
}
|
|
1027
1027
|
);
|
|
1028
|
-
function
|
|
1028
|
+
function k() {
|
|
1029
1029
|
n("before-close"), d();
|
|
1030
1030
|
}
|
|
1031
|
-
function
|
|
1032
|
-
u.key === "Escape" && (u.preventDefault(),
|
|
1031
|
+
function V(u) {
|
|
1032
|
+
u.key === "Escape" && (u.preventDefault(), k()), (u.key === "ArrowLeft" || u.key === "ArrowRight") && (u.preventDefault(), Y(u.key === "ArrowRight" ? "next" : "previous"));
|
|
1033
1033
|
}
|
|
1034
1034
|
function c() {
|
|
1035
1035
|
document.documentElement.classList.add("--m-fullscreen-open");
|
|
@@ -1043,18 +1043,18 @@ const Qs = {
|
|
|
1043
1043
|
function E(u, v) {
|
|
1044
1044
|
return v < 0 ? u.length - 1 : v >= u.length ? 0 : v;
|
|
1045
1045
|
}
|
|
1046
|
-
async function
|
|
1046
|
+
async function A(u, v) {
|
|
1047
1047
|
u.classList.remove(t.openInstanceClass), v.classList.add(t.openInstanceClass);
|
|
1048
|
-
const I = v.getAttribute("data-src"),
|
|
1049
|
-
D.value =
|
|
1048
|
+
const I = v.getAttribute("data-src"), x = v.getAttribute("data-alt");
|
|
1049
|
+
D.value = x, I && (H.value = I), a.value = !1, a.value || (m.value = !0);
|
|
1050
1050
|
}
|
|
1051
|
-
function
|
|
1051
|
+
function Y(u) {
|
|
1052
1052
|
const v = document.querySelector(
|
|
1053
1053
|
`.m-fullscreen-img-instance.${t.openInstanceClass}`
|
|
1054
1054
|
);
|
|
1055
1055
|
if (v) {
|
|
1056
|
-
const I = p(),
|
|
1057
|
-
f.value =
|
|
1056
|
+
const I = p(), x = I.indexOf(v), q = u === "next" ? x + 1 : x - 1, _ = I[E(I, q)];
|
|
1057
|
+
f.value = _, _ && A(v, _), n(u), b.value ? B(w.value) : J();
|
|
1058
1058
|
}
|
|
1059
1059
|
}
|
|
1060
1060
|
function B(u) {
|
|
@@ -1064,7 +1064,7 @@ const Qs = {
|
|
|
1064
1064
|
const u = w.value;
|
|
1065
1065
|
b.value ? (b.value = !b.value, J()) : (b.value = !b.value, B(u));
|
|
1066
1066
|
}
|
|
1067
|
-
function
|
|
1067
|
+
function K(u) {
|
|
1068
1068
|
var v;
|
|
1069
1069
|
return (v = w.value) == null ? void 0 : v.animate(u, {
|
|
1070
1070
|
duration: t.animation.duration,
|
|
@@ -1073,33 +1073,33 @@ const Qs = {
|
|
|
1073
1073
|
// Fonction d'interpolation pour l'animation inverse
|
|
1074
1074
|
});
|
|
1075
1075
|
}
|
|
1076
|
-
function
|
|
1077
|
-
const v = (f.value instanceof HTMLImageElement ? f.value.naturalWidth : f.value.clientWidth) || 1, I = (f.value instanceof HTMLImageElement ? f.value.naturalHeight : f.value.clientHeight) || 1,
|
|
1078
|
-
(
|
|
1076
|
+
function R(u = t.offset ?? 0) {
|
|
1077
|
+
const v = (f.value instanceof HTMLImageElement ? f.value.naturalWidth : f.value.clientWidth) || 1, I = (f.value instanceof HTMLImageElement ? f.value.naturalHeight : f.value.clientHeight) || 1, x = window.innerWidth, q = window.innerHeight, _ = Math.min(
|
|
1078
|
+
(x - 2 * u) / v,
|
|
1079
1079
|
(q - 2 * u) / I
|
|
1080
|
-
), ye = (
|
|
1080
|
+
), ye = (x - v * _) / 2, be = (q - I * _) / 2;
|
|
1081
1081
|
return {
|
|
1082
1082
|
centerX: ye,
|
|
1083
1083
|
centerY: be,
|
|
1084
1084
|
originalWidth: v,
|
|
1085
1085
|
originalHeight: I,
|
|
1086
|
-
scale:
|
|
1086
|
+
scale: _
|
|
1087
1087
|
};
|
|
1088
1088
|
}
|
|
1089
1089
|
function G({ trigger: u }) {
|
|
1090
|
-
const { originalWidth: v, originalHeight: I, scale:
|
|
1090
|
+
const { originalWidth: v, originalHeight: I, scale: x, centerX: q, centerY: _ } = R(), { top: ye, left: be, width: dt, height: mt } = T.value, xe = [
|
|
1091
1091
|
{
|
|
1092
1092
|
top: `${ye}px`,
|
|
1093
1093
|
left: `${be}px`,
|
|
1094
|
-
width: `${
|
|
1095
|
-
height: `${
|
|
1094
|
+
width: `${dt}px`,
|
|
1095
|
+
height: `${mt}px`,
|
|
1096
1096
|
opacity: 0
|
|
1097
1097
|
},
|
|
1098
1098
|
{
|
|
1099
|
-
top: `${
|
|
1099
|
+
top: `${_}px`,
|
|
1100
1100
|
left: `${q}px`,
|
|
1101
|
-
width: `${v *
|
|
1102
|
-
height: `${I *
|
|
1101
|
+
width: `${v * x}px`,
|
|
1102
|
+
height: `${I * x}px`,
|
|
1103
1103
|
opacity: 1
|
|
1104
1104
|
}
|
|
1105
1105
|
];
|
|
@@ -1108,20 +1108,20 @@ const Qs = {
|
|
|
1108
1108
|
};
|
|
1109
1109
|
}
|
|
1110
1110
|
function J() {
|
|
1111
|
-
const { centerX: u, centerY: v, originalHeight: I, originalWidth:
|
|
1111
|
+
const { centerX: u, centerY: v, originalHeight: I, originalWidth: x, scale: q } = R(), _ = {
|
|
1112
1112
|
top: `${v}px`,
|
|
1113
1113
|
left: `${u}px`,
|
|
1114
|
-
width: `${
|
|
1114
|
+
width: `${x * q}px`,
|
|
1115
1115
|
height: `${I * q}px`
|
|
1116
1116
|
};
|
|
1117
1117
|
if (!w.value)
|
|
1118
1118
|
throw console.error("[maz-ui](vFullscreenImg) ImgElement is not defined");
|
|
1119
|
-
Object.assign(w.value.style,
|
|
1119
|
+
Object.assign(w.value.style, _);
|
|
1120
1120
|
}
|
|
1121
1121
|
function ge() {
|
|
1122
1122
|
const { frames: u } = G({
|
|
1123
1123
|
trigger: "open"
|
|
1124
|
-
}), v =
|
|
1124
|
+
}), v = K(u);
|
|
1125
1125
|
if (!v)
|
|
1126
1126
|
throw console.error("[maz-ui](vFullscreenImg) open animation is not defined");
|
|
1127
1127
|
v.onfinish = () => {
|
|
@@ -1131,84 +1131,84 @@ const Qs = {
|
|
|
1131
1131
|
function d() {
|
|
1132
1132
|
const { frames: u } = G({
|
|
1133
1133
|
trigger: "close"
|
|
1134
|
-
}), v =
|
|
1134
|
+
}), v = K(u);
|
|
1135
1135
|
if (!v)
|
|
1136
1136
|
throw console.error("[maz-ui](vFullscreenImg) close animation is not defined");
|
|
1137
1137
|
v.onfinish = () => {
|
|
1138
|
-
var I,
|
|
1139
|
-
n("close"), (I = P.value) == null || I.remove(), (
|
|
1138
|
+
var I, x;
|
|
1139
|
+
n("close"), (I = P.value) == null || I.remove(), (x = t.destroy) == null || x.call(t);
|
|
1140
1140
|
};
|
|
1141
1141
|
}
|
|
1142
1142
|
function z() {
|
|
1143
1143
|
b.value || J();
|
|
1144
1144
|
}
|
|
1145
1145
|
return pe(() => {
|
|
1146
|
-
m.value = !0, document.addEventListener("keydown",
|
|
1147
|
-
}),
|
|
1148
|
-
document.removeEventListener("keydown",
|
|
1146
|
+
m.value = !0, document.addEventListener("keydown", V), window.addEventListener("resize", z), c(), C.value = p().length > 1;
|
|
1147
|
+
}), Be(() => {
|
|
1148
|
+
document.removeEventListener("keydown", V), window.removeEventListener("resize", z), L();
|
|
1149
1149
|
}), (u, v) => (F(), se("div", {
|
|
1150
1150
|
ref_key: "FullscreenImgElement",
|
|
1151
1151
|
ref: P,
|
|
1152
1152
|
role: "button",
|
|
1153
1153
|
class: "m-fullscreen-img",
|
|
1154
1154
|
tabindex: "0",
|
|
1155
|
-
onClick: X(
|
|
1156
|
-
onKeypress:
|
|
1155
|
+
onClick: X(k, ["stop"]),
|
|
1156
|
+
onKeypress: pt(X(k, ["prevent"]), ["esc"])
|
|
1157
1157
|
}, [
|
|
1158
|
-
|
|
1158
|
+
qe(te(
|
|
1159
1159
|
W(i),
|
|
1160
1160
|
{ class: "m-fullscreen-img-loader maz-h-16" },
|
|
1161
1161
|
null,
|
|
1162
1162
|
512
|
|
1163
1163
|
/* NEED_PATCH */
|
|
1164
1164
|
), [
|
|
1165
|
-
[
|
|
1165
|
+
[je, m.value]
|
|
1166
1166
|
]),
|
|
1167
|
-
y.value &&
|
|
1167
|
+
y.value && C.value ? (F(), se("button", {
|
|
1168
1168
|
key: 0,
|
|
1169
1169
|
type: "button",
|
|
1170
1170
|
class: "m-fullscreen-btn --next",
|
|
1171
|
-
onClick: v[0] || (v[0] = X((I) =>
|
|
1171
|
+
onClick: v[0] || (v[0] = X((I) => Y("next"), ["stop"]))
|
|
1172
1172
|
}, [
|
|
1173
1173
|
te(W(r), { class: "maz-rotate-180 maz-text-3xl" })
|
|
1174
1174
|
])) : j("v-if", !0),
|
|
1175
|
-
y.value &&
|
|
1175
|
+
y.value && C.value ? (F(), se("button", {
|
|
1176
1176
|
key: 1,
|
|
1177
1177
|
type: "button",
|
|
1178
1178
|
class: "m-fullscreen-btn --previous",
|
|
1179
|
-
onClick: v[1] || (v[1] = X((I) =>
|
|
1179
|
+
onClick: v[1] || (v[1] = X((I) => Y("previous"), ["stop"]))
|
|
1180
1180
|
}, [
|
|
1181
1181
|
te(W(r), { class: "maz-text-3xl" })
|
|
1182
1182
|
])) : j("v-if", !0),
|
|
1183
1183
|
Z("button", {
|
|
1184
1184
|
type: "button",
|
|
1185
1185
|
class: "m-fullscreen-btn --close",
|
|
1186
|
-
onClick:
|
|
1186
|
+
onClick: k
|
|
1187
1187
|
}, [
|
|
1188
1188
|
te(W(o), { class: "maz-text-3xl" })
|
|
1189
1189
|
]),
|
|
1190
|
-
Z("div",
|
|
1190
|
+
Z("div", Ut, [
|
|
1191
1191
|
j(" eslint-disable-next-line vuejs-accessibility/no-static-element-interactions, vuejs-accessibility/click-events-have-key-events "),
|
|
1192
1192
|
Z("img", {
|
|
1193
1193
|
ref_key: "ImgElement",
|
|
1194
1194
|
ref: w,
|
|
1195
|
-
src:
|
|
1195
|
+
src: H.value,
|
|
1196
1196
|
alt: D.value ?? void 0,
|
|
1197
1197
|
tabindex: "0",
|
|
1198
|
-
class: Ie([
|
|
1199
|
-
onLoad:
|
|
1198
|
+
class: Ie([S.value]),
|
|
1199
|
+
onLoad: $,
|
|
1200
1200
|
onClick: v[2] || (v[2] = X((I) => u.zoom ? Q() : void 0, ["stop"]))
|
|
1201
|
-
}, null, 42,
|
|
1201
|
+
}, null, 42, Wt)
|
|
1202
1202
|
])
|
|
1203
|
-
], 40,
|
|
1203
|
+
], 40, jt));
|
|
1204
1204
|
}
|
|
1205
|
-
}),
|
|
1205
|
+
}), tt = (s, e) => {
|
|
1206
1206
|
const t = s.__vccOpts || s;
|
|
1207
1207
|
for (const [n, i] of e)
|
|
1208
1208
|
t[n] = i;
|
|
1209
1209
|
return t;
|
|
1210
|
-
},
|
|
1211
|
-
class
|
|
1210
|
+
}, Kt = /* @__PURE__ */ tt(Yt, [["__scopeId", "data-v-884a2c57"]]), Fe = "m-fullscreen-is-open";
|
|
1211
|
+
class Rt {
|
|
1212
1212
|
constructor() {
|
|
1213
1213
|
l(this, "options");
|
|
1214
1214
|
l(this, "defaultOptions", {
|
|
@@ -1265,7 +1265,7 @@ class Yt {
|
|
|
1265
1265
|
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 = "";
|
|
1266
1266
|
}
|
|
1267
1267
|
renderPreview(e) {
|
|
1268
|
-
return e.classList.add(Fe),
|
|
1268
|
+
return e.classList.add(Fe), Ye(Kt, {
|
|
1269
1269
|
props: {
|
|
1270
1270
|
...this.options,
|
|
1271
1271
|
openInstanceClass: Fe,
|
|
@@ -1283,9 +1283,9 @@ class Yt {
|
|
|
1283
1283
|
}
|
|
1284
1284
|
}
|
|
1285
1285
|
let fe;
|
|
1286
|
-
const
|
|
1286
|
+
const Xt = {
|
|
1287
1287
|
mounted(s, e) {
|
|
1288
|
-
return fe = new
|
|
1288
|
+
return fe = new Rt(), fe.create(s, e);
|
|
1289
1289
|
},
|
|
1290
1290
|
updated(s, e) {
|
|
1291
1291
|
return fe.update(s, e);
|
|
@@ -1293,36 +1293,36 @@ const Kt = {
|
|
|
1293
1293
|
unmounted(s) {
|
|
1294
1294
|
return fe.remove(s);
|
|
1295
1295
|
}
|
|
1296
|
-
},
|
|
1296
|
+
}, Zt = {
|
|
1297
1297
|
install(s) {
|
|
1298
|
-
s.directive("fullscreen-img",
|
|
1298
|
+
s.directive("fullscreen-img", Xt);
|
|
1299
1299
|
}
|
|
1300
|
-
},
|
|
1300
|
+
}, Qt = [
|
|
1301
1301
|
Ht,
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1302
|
+
Nt,
|
|
1303
|
+
qt,
|
|
1304
|
+
Ot,
|
|
1305
|
+
Zt,
|
|
1306
|
+
Pt
|
|
1307
1307
|
], Gs = {
|
|
1308
1308
|
install(s) {
|
|
1309
|
-
for (const e of
|
|
1309
|
+
for (const e of Qt)
|
|
1310
1310
|
e.install(s, {});
|
|
1311
1311
|
}
|
|
1312
1312
|
};
|
|
1313
|
-
function
|
|
1313
|
+
function Gt(s) {
|
|
1314
1314
|
return s ? (s = s.toString(), s.charAt(0).toUpperCase() + s.slice(1)) : "";
|
|
1315
1315
|
}
|
|
1316
|
-
const
|
|
1316
|
+
const Jt = {
|
|
1317
1317
|
style: "currency",
|
|
1318
1318
|
minimumFractionDigits: 2,
|
|
1319
1319
|
round: !1
|
|
1320
1320
|
};
|
|
1321
|
-
function
|
|
1321
|
+
function es(s, e, t) {
|
|
1322
1322
|
let n = Number(s);
|
|
1323
1323
|
return t.round && (n = Math.floor(n), t.minimumFractionDigits = 0), new Intl.NumberFormat(e, t).format(n);
|
|
1324
1324
|
}
|
|
1325
|
-
function
|
|
1325
|
+
function ts(s, e, t) {
|
|
1326
1326
|
if (s === void 0)
|
|
1327
1327
|
throw new TypeError("[maz-ui](FilterCurrency) The `number` attribute is required.");
|
|
1328
1328
|
if (e === void 0)
|
|
@@ -1332,29 +1332,29 @@ function es(s, e, t) {
|
|
|
1332
1332
|
if (t.currency === void 0)
|
|
1333
1333
|
throw new TypeError("[maz-ui](FilterCurrency) The `options.currency` attribute is required.");
|
|
1334
1334
|
}
|
|
1335
|
-
function
|
|
1335
|
+
function ss(s, e, t) {
|
|
1336
1336
|
const n = {
|
|
1337
|
-
...
|
|
1337
|
+
...Jt,
|
|
1338
1338
|
...t
|
|
1339
1339
|
};
|
|
1340
|
-
|
|
1340
|
+
ts(s, e, n);
|
|
1341
1341
|
try {
|
|
1342
|
-
return
|
|
1342
|
+
return es(s, e, n);
|
|
1343
1343
|
} catch (i) {
|
|
1344
1344
|
throw new Error(`[maz-ui](FilterCurrency) ${i}`);
|
|
1345
1345
|
}
|
|
1346
1346
|
}
|
|
1347
|
-
const
|
|
1347
|
+
const ns = {
|
|
1348
1348
|
month: "short",
|
|
1349
1349
|
day: "numeric",
|
|
1350
1350
|
year: "numeric"
|
|
1351
1351
|
};
|
|
1352
|
-
function
|
|
1352
|
+
function is(s, e, t) {
|
|
1353
1353
|
if (e === void 0)
|
|
1354
1354
|
throw new TypeError("[maz-ui](FilterDate) The `locale` attribute is required.");
|
|
1355
1355
|
if (typeof e != "string")
|
|
1356
1356
|
throw new TypeError("[maz-ui](FilterDate) The `locale` attribute must be a string.");
|
|
1357
|
-
const n = t ??
|
|
1357
|
+
const n = t ?? ns;
|
|
1358
1358
|
try {
|
|
1359
1359
|
const i = s instanceof Date ? s : new Date(s);
|
|
1360
1360
|
return new Intl.DateTimeFormat(e, n).format(i);
|
|
@@ -1362,12 +1362,12 @@ function ns(s, e, t) {
|
|
|
1362
1362
|
throw new Error(`[maz-ui](FilterDate) ${i}`);
|
|
1363
1363
|
}
|
|
1364
1364
|
}
|
|
1365
|
-
const
|
|
1365
|
+
const os = {
|
|
1366
1366
|
minimumFractionDigits: 2
|
|
1367
1367
|
};
|
|
1368
|
-
function
|
|
1368
|
+
function rs(s, e, t) {
|
|
1369
1369
|
const n = {
|
|
1370
|
-
...
|
|
1370
|
+
...os,
|
|
1371
1371
|
...t
|
|
1372
1372
|
};
|
|
1373
1373
|
if (s === void 0)
|
|
@@ -1382,17 +1382,17 @@ function os(s, e, t) {
|
|
|
1382
1382
|
throw new Error(`[maz-ui](FilterNumber) ${i}`);
|
|
1383
1383
|
}
|
|
1384
1384
|
}
|
|
1385
|
-
const
|
|
1386
|
-
capitalize:
|
|
1387
|
-
currency:
|
|
1388
|
-
date:
|
|
1389
|
-
number:
|
|
1385
|
+
const as = {
|
|
1386
|
+
capitalize: Gt,
|
|
1387
|
+
currency: ss,
|
|
1388
|
+
date: is,
|
|
1389
|
+
number: rs
|
|
1390
1390
|
}, Js = {
|
|
1391
1391
|
install(s) {
|
|
1392
|
-
s.provide("filters",
|
|
1392
|
+
s.provide("filters", as);
|
|
1393
1393
|
}
|
|
1394
1394
|
};
|
|
1395
|
-
function
|
|
1395
|
+
function ls({ timeout: s = 1e3, callback: e, remainingTimeUpdate: t = 200, callbackOffsetTime: n = 0 }) {
|
|
1396
1396
|
const i = g(s), o = g(s);
|
|
1397
1397
|
let r;
|
|
1398
1398
|
function a(f) {
|
|
@@ -1406,7 +1406,7 @@ function as({ timeout: s = 1e3, callback: e, remainingTimeUpdate: t = 200, callb
|
|
|
1406
1406
|
function y() {
|
|
1407
1407
|
r && (clearInterval(r), r = void 0);
|
|
1408
1408
|
}
|
|
1409
|
-
function
|
|
1409
|
+
function C() {
|
|
1410
1410
|
!r && o.value > 0 && m();
|
|
1411
1411
|
}
|
|
1412
1412
|
function b() {
|
|
@@ -1416,14 +1416,14 @@ function as({ timeout: s = 1e3, callback: e, remainingTimeUpdate: t = 200, callb
|
|
|
1416
1416
|
remainingTime: o,
|
|
1417
1417
|
start: a,
|
|
1418
1418
|
pause: y,
|
|
1419
|
-
resume:
|
|
1419
|
+
resume: C,
|
|
1420
1420
|
stop: b
|
|
1421
1421
|
};
|
|
1422
1422
|
}
|
|
1423
|
-
const
|
|
1423
|
+
const us = { class: "m-toast__message-wrapper" }, cs = { class: "m-toast__message" }, ds = { class: "maz-flex maz-items-center maz-gap-2" }, ms = { key: 0 }, hs = {
|
|
1424
1424
|
key: 4,
|
|
1425
1425
|
class: "progress-bar maz-absolute maz-inset-x-0 maz-bottom-0 maz-h-1"
|
|
1426
|
-
},
|
|
1426
|
+
}, fs = /* @__PURE__ */ Ne({
|
|
1427
1427
|
__name: "MazToast",
|
|
1428
1428
|
props: {
|
|
1429
1429
|
message: { default: void 0 },
|
|
@@ -1440,21 +1440,21 @@ const ls = { class: "m-toast__message-wrapper" }, us = { class: "m-toast__messag
|
|
|
1440
1440
|
},
|
|
1441
1441
|
emits: ["close", "click", "open"],
|
|
1442
1442
|
setup(s, { expose: e, emit: t }) {
|
|
1443
|
-
const n = s, i = t, o =
|
|
1443
|
+
const n = s, i = t, o = N(() => import("./MazBtn-DhVNaOBj.mjs")), r = N(() => import("./x-mark-BP8zWe_C.mjs")), a = N(
|
|
1444
1444
|
() => import("./arrow-top-right-on-square-CkcBq4qD.mjs")
|
|
1445
|
-
), m =
|
|
1445
|
+
), m = N(
|
|
1446
1446
|
() => import("./exclamation-triangle-BfZLmRbP.mjs")
|
|
1447
|
-
), y =
|
|
1447
|
+
), y = N(
|
|
1448
1448
|
() => import("./exclamation-circle-DzBJ8vGa.mjs")
|
|
1449
|
-
),
|
|
1449
|
+
), C = N(
|
|
1450
1450
|
() => import("./information-circle-C0pE_7kr.mjs")
|
|
1451
|
-
), b =
|
|
1451
|
+
), b = N(() => import("./check-circle-CtCMBYyp.mjs")), f = N(() => import("./link-D7FkvsK4.mjs")), T = g(), O = h(() => {
|
|
1452
1452
|
if (n.icon)
|
|
1453
1453
|
switch (n.type) {
|
|
1454
1454
|
case "danger":
|
|
1455
1455
|
return m;
|
|
1456
1456
|
case "info":
|
|
1457
|
-
return
|
|
1457
|
+
return C;
|
|
1458
1458
|
case "success":
|
|
1459
1459
|
return b;
|
|
1460
1460
|
case "warning":
|
|
@@ -1462,32 +1462,32 @@ const ls = { class: "m-toast__message-wrapper" }, us = { class: "m-toast__messag
|
|
|
1462
1462
|
default:
|
|
1463
1463
|
return;
|
|
1464
1464
|
}
|
|
1465
|
-
}),
|
|
1465
|
+
}), H = h(() => n.position.includes("top") ? "top" : "bottom"), D = h(() => n.position.includes("left") ? "left" : n.position.includes("right") ? "right" : "center"), P = h(() => D.value !== "center" ? D.value === "right" ? "m-slide-right" : "m-slide-left" : H.value === "top" ? "m-slide-top" : "m-slide-bottom"), w = g(!1), S = g(!1), $ = g(), k = `m-toast-container --${H.value} --${D.value}`, V = `.${k.replaceAll(" ", ".")}`, c = ls({
|
|
1466
1466
|
callback: G,
|
|
1467
1467
|
timeout: typeof n.timeout == "number" ? n.timeout : 0,
|
|
1468
1468
|
callbackOffsetTime: 200
|
|
1469
1469
|
});
|
|
1470
1470
|
function L() {
|
|
1471
|
-
const d = document.querySelector(
|
|
1471
|
+
const d = document.querySelector(V);
|
|
1472
1472
|
if (!d && !d) {
|
|
1473
1473
|
const z = document.body, u = document.createElement("div");
|
|
1474
|
-
u.className =
|
|
1474
|
+
u.className = k, z.append(u);
|
|
1475
1475
|
}
|
|
1476
1476
|
}
|
|
1477
1477
|
function p() {
|
|
1478
|
-
const d = document.querySelector(
|
|
1478
|
+
const d = document.querySelector(V);
|
|
1479
1479
|
return !n.queue && n.maxToasts === !1 ? !1 : typeof n.maxToasts == "number" && d ? n.maxToasts <= d.childElementCount : d && d.childElementCount > 0;
|
|
1480
1480
|
}
|
|
1481
1481
|
function E() {
|
|
1482
1482
|
if (p()) {
|
|
1483
|
-
|
|
1483
|
+
$.value = setTimeout(E, 250);
|
|
1484
1484
|
return;
|
|
1485
1485
|
}
|
|
1486
|
-
const d = document.querySelector(
|
|
1487
|
-
T.value && d && d.prepend(T.value),
|
|
1486
|
+
const d = document.querySelector(V);
|
|
1487
|
+
T.value && d && d.prepend(T.value), S.value = !0, typeof n.timeout == "number" && n.timeout > 0 && c.start();
|
|
1488
1488
|
}
|
|
1489
|
-
const
|
|
1490
|
-
function
|
|
1489
|
+
const A = g("100%");
|
|
1490
|
+
function Y() {
|
|
1491
1491
|
switch (n.type) {
|
|
1492
1492
|
case "danger":
|
|
1493
1493
|
return "maz-bg-danger-700";
|
|
@@ -1506,7 +1506,7 @@ const ls = { class: "m-toast__message-wrapper" }, us = { class: "m-toast__messag
|
|
|
1506
1506
|
(d) => {
|
|
1507
1507
|
if (typeof n.timeout == "number") {
|
|
1508
1508
|
const z = 100 * d / n.timeout;
|
|
1509
|
-
|
|
1509
|
+
A.value = `${z}%`;
|
|
1510
1510
|
}
|
|
1511
1511
|
}
|
|
1512
1512
|
);
|
|
@@ -1517,14 +1517,14 @@ const ls = { class: "m-toast__message-wrapper" }, us = { class: "m-toast__messag
|
|
|
1517
1517
|
var u;
|
|
1518
1518
|
w.value = !0, await d(), w.value = !1, (u = n.action) != null && u.closeToast && B(z);
|
|
1519
1519
|
}
|
|
1520
|
-
function
|
|
1520
|
+
function K(d) {
|
|
1521
1521
|
n.noPauseOnHover || (d ? c.pause() : c.resume());
|
|
1522
1522
|
}
|
|
1523
|
-
function
|
|
1524
|
-
stop(),
|
|
1523
|
+
function R() {
|
|
1524
|
+
stop(), $.value && clearTimeout($.value);
|
|
1525
1525
|
}
|
|
1526
1526
|
function G() {
|
|
1527
|
-
|
|
1527
|
+
R(), S.value = !1;
|
|
1528
1528
|
}
|
|
1529
1529
|
e({ closeToast: G });
|
|
1530
1530
|
function J() {
|
|
@@ -1533,46 +1533,46 @@ const ls = { class: "m-toast__message-wrapper" }, us = { class: "m-toast__messag
|
|
|
1533
1533
|
function ge() {
|
|
1534
1534
|
var z;
|
|
1535
1535
|
i("close"), (z = T.value) == null || z.remove();
|
|
1536
|
-
const d = document.querySelector(
|
|
1536
|
+
const d = document.querySelector(V);
|
|
1537
1537
|
d && !(d != null && d.hasChildNodes()) && d.remove();
|
|
1538
1538
|
}
|
|
1539
1539
|
return pe(() => {
|
|
1540
1540
|
L(), E();
|
|
1541
|
-
}), (d, z) => (F(), ee(
|
|
1541
|
+
}), (d, z) => (F(), ee(gt, {
|
|
1542
1542
|
name: P.value,
|
|
1543
1543
|
onAfterLeave: ge,
|
|
1544
1544
|
onAfterEnter: J,
|
|
1545
1545
|
persisted: ""
|
|
1546
1546
|
}, {
|
|
1547
1547
|
default: we(() => [
|
|
1548
|
-
|
|
1548
|
+
qe(Z(
|
|
1549
1549
|
"button",
|
|
1550
1550
|
{
|
|
1551
1551
|
ref_key: "Toaster",
|
|
1552
1552
|
ref: T,
|
|
1553
1553
|
class: Ie(["m-toast", [
|
|
1554
1554
|
`--${d.type}`,
|
|
1555
|
-
`--${
|
|
1555
|
+
`--${H.value}`,
|
|
1556
1556
|
`--${D.value}`,
|
|
1557
1557
|
{ "maz-pb-1": typeof d.timeout == "number" && d.timeout > 0, "--persistent": d.persistent }
|
|
1558
1558
|
]]),
|
|
1559
1559
|
role: "alert",
|
|
1560
|
-
onMouseover: z[2] || (z[2] = (u) =>
|
|
1561
|
-
onMouseleave: z[3] || (z[3] = (u) =>
|
|
1560
|
+
onMouseover: z[2] || (z[2] = (u) => K(!0)),
|
|
1561
|
+
onMouseleave: z[3] || (z[3] = (u) => K(!1)),
|
|
1562
1562
|
onClick: z[4] || (z[4] = X((u) => {
|
|
1563
1563
|
var v;
|
|
1564
1564
|
return d.link && !((v = d.link) != null && v.closeToast) ? void 0 : B(u);
|
|
1565
1565
|
}, ["stop"]))
|
|
1566
1566
|
},
|
|
1567
1567
|
[
|
|
1568
|
-
O.value ? (F(), ee(
|
|
1568
|
+
O.value ? (F(), ee(yt(O.value), {
|
|
1569
1569
|
key: 0,
|
|
1570
1570
|
class: "maz-text-2xl"
|
|
1571
1571
|
})) : j("v-if", !0),
|
|
1572
|
-
Z("div",
|
|
1572
|
+
Z("div", us, [
|
|
1573
1573
|
Z(
|
|
1574
1574
|
"p",
|
|
1575
|
-
|
|
1575
|
+
cs,
|
|
1576
1576
|
Ee(d.message),
|
|
1577
1577
|
1
|
|
1578
1578
|
/* TEXT */
|
|
@@ -1588,7 +1588,7 @@ const ls = { class: "m-toast__message-wrapper" }, us = { class: "m-toast__messag
|
|
|
1588
1588
|
onClick: z[0] || (z[0] = X((u) => d.action ? Q(d.action.func, u) : void 0, ["stop"]))
|
|
1589
1589
|
}, {
|
|
1590
1590
|
default: we(() => [
|
|
1591
|
-
|
|
1591
|
+
bt(
|
|
1592
1592
|
Ee(d.action.text),
|
|
1593
1593
|
1
|
|
1594
1594
|
/* TEXT */
|
|
@@ -1609,10 +1609,10 @@ const ls = { class: "m-toast__message-wrapper" }, us = { class: "m-toast__messag
|
|
|
1609
1609
|
default: we(() => {
|
|
1610
1610
|
var u;
|
|
1611
1611
|
return [
|
|
1612
|
-
Z("div",
|
|
1612
|
+
Z("div", ds, [
|
|
1613
1613
|
d.link.text ? (F(), se(
|
|
1614
1614
|
"span",
|
|
1615
|
-
|
|
1615
|
+
ms,
|
|
1616
1616
|
Ee(d.link.text),
|
|
1617
1617
|
1
|
|
1618
1618
|
/* TEXT */
|
|
@@ -1637,14 +1637,14 @@ const ls = { class: "m-toast__message-wrapper" }, us = { class: "m-toast__messag
|
|
|
1637
1637
|
}, [
|
|
1638
1638
|
te(W(r), { class: "--icon maz-text-xl" })
|
|
1639
1639
|
])),
|
|
1640
|
-
typeof d.timeout == "number" && d.timeout > 0 ? (F(), se("div",
|
|
1640
|
+
typeof d.timeout == "number" && d.timeout > 0 ? (F(), se("div", hs, [
|
|
1641
1641
|
Z(
|
|
1642
1642
|
"div",
|
|
1643
1643
|
{
|
|
1644
|
-
style:
|
|
1645
|
-
width:
|
|
1644
|
+
style: wt({
|
|
1645
|
+
width: A.value
|
|
1646
1646
|
}),
|
|
1647
|
-
class: Ie(["maz-h-full !maz-transition-all !maz-duration-200 !maz-ease-linear",
|
|
1647
|
+
class: Ie(["maz-h-full !maz-transition-all !maz-duration-200 !maz-ease-linear", Y()])
|
|
1648
1648
|
},
|
|
1649
1649
|
null,
|
|
1650
1650
|
6
|
|
@@ -1655,30 +1655,30 @@ const ls = { class: "m-toast__message-wrapper" }, us = { class: "m-toast__messag
|
|
|
1655
1655
|
34
|
|
1656
1656
|
/* CLASS, NEED_HYDRATION */
|
|
1657
1657
|
), [
|
|
1658
|
-
[
|
|
1658
|
+
[je, S.value]
|
|
1659
1659
|
])
|
|
1660
1660
|
]),
|
|
1661
1661
|
_: 1
|
|
1662
1662
|
/* STABLE */
|
|
1663
1663
|
}, 8, ["name"]));
|
|
1664
1664
|
}
|
|
1665
|
-
}),
|
|
1665
|
+
}), vs = /* @__PURE__ */ tt(fs, [["__scopeId", "data-v-3f062fa5"]]), ps = {
|
|
1666
1666
|
position: "bottom-right",
|
|
1667
1667
|
timeout: 1e4,
|
|
1668
1668
|
persistent: !1,
|
|
1669
1669
|
icon: !0
|
|
1670
1670
|
};
|
|
1671
|
-
class
|
|
1671
|
+
class gs {
|
|
1672
1672
|
constructor(e, t) {
|
|
1673
1673
|
this.app = e, this.globalOptions = t;
|
|
1674
1674
|
}
|
|
1675
1675
|
show(e, t) {
|
|
1676
1676
|
const n = {
|
|
1677
|
-
...
|
|
1677
|
+
...ps,
|
|
1678
1678
|
...this.globalOptions,
|
|
1679
1679
|
...t,
|
|
1680
1680
|
message: e
|
|
1681
|
-
}, { destroy: i, vNode: o } =
|
|
1681
|
+
}, { destroy: i, vNode: o } = Ye(vs, {
|
|
1682
1682
|
props: n,
|
|
1683
1683
|
app: this.app
|
|
1684
1684
|
});
|
|
@@ -1712,28 +1712,28 @@ class ps {
|
|
|
1712
1712
|
return this.show(e, this.getLocalOptions("warning", t));
|
|
1713
1713
|
}
|
|
1714
1714
|
}
|
|
1715
|
-
function
|
|
1716
|
-
return new
|
|
1715
|
+
function ys(s, e) {
|
|
1716
|
+
return new gs(s, e);
|
|
1717
1717
|
}
|
|
1718
1718
|
const en = {
|
|
1719
1719
|
install(s, e) {
|
|
1720
|
-
s.provide("toast",
|
|
1720
|
+
s.provide("toast", ys(s, e));
|
|
1721
1721
|
}
|
|
1722
1722
|
}, ne = "";
|
|
1723
|
-
function
|
|
1723
|
+
function bs(s) {
|
|
1724
1724
|
return s.filter((e, t, n) => t === n.indexOf(e));
|
|
1725
1725
|
}
|
|
1726
|
-
function
|
|
1726
|
+
function ws(s) {
|
|
1727
1727
|
return (e = ne) => typeof e == "function" ? s.findIndex((...t) => e(...t)) > -1 : s.includes(e);
|
|
1728
1728
|
}
|
|
1729
|
-
const
|
|
1730
|
-
function Es(s) {
|
|
1731
|
-
return (e = ne) => ys([...s, e]);
|
|
1732
|
-
}
|
|
1729
|
+
const Es = (s) => s.length > 0;
|
|
1733
1730
|
function zs(s) {
|
|
1731
|
+
return (e = ne) => bs([...s, e]);
|
|
1732
|
+
}
|
|
1733
|
+
function Ts(s) {
|
|
1734
1734
|
return (e = ne) => s.filter((t) => t !== e);
|
|
1735
1735
|
}
|
|
1736
|
-
class
|
|
1736
|
+
class Ls {
|
|
1737
1737
|
constructor() {
|
|
1738
1738
|
l(this, "_loaders", g([]));
|
|
1739
1739
|
}
|
|
@@ -1741,21 +1741,21 @@ class Ts {
|
|
|
1741
1741
|
return h(() => this._loaders.value);
|
|
1742
1742
|
}
|
|
1743
1743
|
stop(e = ne) {
|
|
1744
|
-
this._loaders.value =
|
|
1744
|
+
this._loaders.value = Ts(this._loaders.value)(e);
|
|
1745
1745
|
}
|
|
1746
1746
|
start(e = ne) {
|
|
1747
|
-
return this._loaders.value =
|
|
1747
|
+
return this._loaders.value = zs(this._loaders.value)(e), () => this.stop(e);
|
|
1748
1748
|
}
|
|
1749
1749
|
get anyLoading() {
|
|
1750
|
-
return h(() =>
|
|
1750
|
+
return h(() => Es(this._loaders.value));
|
|
1751
1751
|
}
|
|
1752
1752
|
isLoading(e = ne) {
|
|
1753
|
-
return h(() =>
|
|
1753
|
+
return h(() => ws(this._loaders.value)(e)).value;
|
|
1754
1754
|
}
|
|
1755
1755
|
}
|
|
1756
|
-
const
|
|
1756
|
+
const Is = new Ls(), tn = {
|
|
1757
1757
|
install: (s) => {
|
|
1758
|
-
s.provide("wait",
|
|
1758
|
+
s.provide("wait", Is);
|
|
1759
1759
|
}
|
|
1760
1760
|
}, ze = {
|
|
1761
1761
|
delay: 100,
|
|
@@ -1770,7 +1770,7 @@ const Ls = new Ts(), tn = {
|
|
|
1770
1770
|
delay: 0
|
|
1771
1771
|
}
|
|
1772
1772
|
};
|
|
1773
|
-
class
|
|
1773
|
+
class Ss {
|
|
1774
1774
|
constructor(e) {
|
|
1775
1775
|
l(this, "options");
|
|
1776
1776
|
this.options = {
|
|
@@ -1798,8 +1798,8 @@ class Is {
|
|
|
1798
1798
|
for (const a of r) {
|
|
1799
1799
|
const m = a.getAttribute("data-maz-aos-once"), y = typeof m == "string" ? m === "true" : this.options.animation.once;
|
|
1800
1800
|
if (typeof this.options.observer.threshold == "number" && n.intersectionRatio > this.options.observer.threshold) {
|
|
1801
|
-
const
|
|
1802
|
-
if (
|
|
1801
|
+
const C = a.getAttribute("data-maz-aos-duration"), b = a.getAttribute("data-maz-aos-delay");
|
|
1802
|
+
if (C || (a.style.transitionDuration = `${this.options.animation.duration}ms`, setTimeout(() => {
|
|
1803
1803
|
a.style.transitionDuration = "0";
|
|
1804
1804
|
}, 1e3)), b || (a.style.transitionDelay = `${this.options.animation.delay}ms`, setTimeout(() => {
|
|
1805
1805
|
a.style.transitionDelay = "0";
|
|
@@ -1817,7 +1817,7 @@ class Is {
|
|
|
1817
1817
|
}
|
|
1818
1818
|
}
|
|
1819
1819
|
async handleObserver() {
|
|
1820
|
-
await
|
|
1820
|
+
await Ke(this.options.delay);
|
|
1821
1821
|
const e = new IntersectionObserver(this.handleIntersect.bind(this), {
|
|
1822
1822
|
...this.options.observer
|
|
1823
1823
|
});
|
|
@@ -1831,7 +1831,7 @@ class Is {
|
|
|
1831
1831
|
}
|
|
1832
1832
|
}
|
|
1833
1833
|
runAnimations() {
|
|
1834
|
-
if (
|
|
1834
|
+
if (M())
|
|
1835
1835
|
return this.handleObserver();
|
|
1836
1836
|
console.warn("[MazAos](runAnimations) should be executed on client side");
|
|
1837
1837
|
}
|
|
@@ -1839,7 +1839,7 @@ class Is {
|
|
|
1839
1839
|
let oe;
|
|
1840
1840
|
const sn = {
|
|
1841
1841
|
install: (s, e) => {
|
|
1842
|
-
oe = new
|
|
1842
|
+
oe = new Ss(e), s.provide("aos", oe), M() && (e != null && e.router ? e.router.afterEach(async () => {
|
|
1843
1843
|
oe.runAnimations();
|
|
1844
1844
|
}) : oe.runAnimations());
|
|
1845
1845
|
}
|
|
@@ -1847,7 +1847,7 @@ const sn = {
|
|
|
1847
1847
|
function nn() {
|
|
1848
1848
|
return oe;
|
|
1849
1849
|
}
|
|
1850
|
-
const
|
|
1850
|
+
const ks = {
|
|
1851
1851
|
darkClass: "dark",
|
|
1852
1852
|
lightClass: "light",
|
|
1853
1853
|
storageThemeKey: "theme",
|
|
@@ -1856,7 +1856,7 @@ const Ss = {
|
|
|
1856
1856
|
storageThemeValueSystem: "system",
|
|
1857
1857
|
watchChanges: !0
|
|
1858
1858
|
}, ae = g("system"), U = g("system");
|
|
1859
|
-
function
|
|
1859
|
+
function Me() {
|
|
1860
1860
|
return window.matchMedia("(prefers-color-scheme: dark)").matches;
|
|
1861
1861
|
}
|
|
1862
1862
|
function le({
|
|
@@ -1867,7 +1867,7 @@ function le({
|
|
|
1867
1867
|
setLocalStorageValue: i = !0,
|
|
1868
1868
|
setSelectedTheme: o = !0
|
|
1869
1869
|
}) {
|
|
1870
|
-
|
|
1870
|
+
M() && (document.documentElement.classList.remove(e), document.documentElement.classList.add(s), ae.value = n, o && (U.value = n), i && (localStorage[t] = n));
|
|
1871
1871
|
}
|
|
1872
1872
|
function ue({
|
|
1873
1873
|
darkClass: s,
|
|
@@ -1877,16 +1877,16 @@ function ue({
|
|
|
1877
1877
|
setLocalStorageValue: i = !0,
|
|
1878
1878
|
setSelectedTheme: o = !0
|
|
1879
1879
|
}) {
|
|
1880
|
-
|
|
1880
|
+
M() && (document.documentElement.classList.remove(s), document.documentElement.classList.add(e), ae.value = n, o && (U.value = n), i && (localStorage[t] = n));
|
|
1881
1881
|
}
|
|
1882
|
-
function
|
|
1882
|
+
function st({
|
|
1883
1883
|
setLocalStorageValue: s = !0,
|
|
1884
1884
|
...e
|
|
1885
1885
|
}) {
|
|
1886
|
-
if (
|
|
1886
|
+
if (M())
|
|
1887
1887
|
return document.documentElement.classList.remove(e.darkClass), document.documentElement.classList.remove(e.lightClass), ae.value = e.storageThemeValueSystem, U.value = e.storageThemeValueSystem, s && (localStorage[e.storageThemeKey] = e.storageThemeValueSystem), Ce(e);
|
|
1888
1888
|
}
|
|
1889
|
-
function
|
|
1889
|
+
function nt(s) {
|
|
1890
1890
|
if (!s.defaultTheme)
|
|
1891
1891
|
return console.error("[maz-ui](useThemeHandler) No default theme set");
|
|
1892
1892
|
if (!["light", "dark"].includes(s.defaultTheme))
|
|
@@ -1907,7 +1907,7 @@ function st(s) {
|
|
|
1907
1907
|
}
|
|
1908
1908
|
}
|
|
1909
1909
|
function Ce(s) {
|
|
1910
|
-
return
|
|
1910
|
+
return M() ? !localStorage[s.storageThemeKey] && s.defaultTheme ? nt(s) : localStorage[s.storageThemeKey] === s.storageThemeValueDark || !localStorage[s.storageThemeKey] && Me() || localStorage[s.storageThemeKey] === s.storageThemeValueSystem && Me() ? le({
|
|
1911
1911
|
...s,
|
|
1912
1912
|
setLocalStorageValue: !1,
|
|
1913
1913
|
setSelectedTheme: !1
|
|
@@ -1921,14 +1921,14 @@ function Te({
|
|
|
1921
1921
|
theme: s,
|
|
1922
1922
|
...e
|
|
1923
1923
|
}) {
|
|
1924
|
-
return s === "system" ?
|
|
1924
|
+
return s === "system" ? st(e) : s === "dark" ? le(e) : ue(e);
|
|
1925
1925
|
}
|
|
1926
|
-
function
|
|
1926
|
+
function Cs(s) {
|
|
1927
1927
|
return ae.value === s.storageThemeValueDark ? ue(s) : le(s);
|
|
1928
1928
|
}
|
|
1929
1929
|
function on(s) {
|
|
1930
1930
|
const e = {
|
|
1931
|
-
...
|
|
1931
|
+
...ks,
|
|
1932
1932
|
...s
|
|
1933
1933
|
};
|
|
1934
1934
|
function t() {
|
|
@@ -1936,7 +1936,7 @@ function on(s) {
|
|
|
1936
1936
|
}
|
|
1937
1937
|
return pe(() => {
|
|
1938
1938
|
localStorage[e.storageThemeKey] && (U.value = localStorage[e.storageThemeKey]), e.watchChanges && window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change", t);
|
|
1939
|
-
}),
|
|
1939
|
+
}), Be(() => {
|
|
1940
1940
|
e.watchChanges && window.matchMedia("(prefers-color-scheme: dark)").removeEventListener("change", t);
|
|
1941
1941
|
}), ie(U, (n) => {
|
|
1942
1942
|
switch (localStorage[e.storageThemeKey] = n, n) {
|
|
@@ -1949,17 +1949,17 @@ function on(s) {
|
|
|
1949
1949
|
break;
|
|
1950
1950
|
}
|
|
1951
1951
|
case e.storageThemeValueSystem: {
|
|
1952
|
-
|
|
1952
|
+
st(e);
|
|
1953
1953
|
break;
|
|
1954
1954
|
}
|
|
1955
1955
|
}
|
|
1956
1956
|
}), {
|
|
1957
1957
|
autoSetTheme: () => Ce(e),
|
|
1958
|
-
toggleTheme: () =>
|
|
1958
|
+
toggleTheme: () => Cs(e),
|
|
1959
1959
|
setSystemTheme: () => Te({ ...e, theme: "system" }),
|
|
1960
1960
|
setDarkTheme: () => Te({ ...e, theme: "dark" }),
|
|
1961
1961
|
setLightTheme: () => Te({ ...e, theme: "light" }),
|
|
1962
|
-
setDefaultTheme: () =>
|
|
1962
|
+
setDefaultTheme: () => nt(e),
|
|
1963
1963
|
hasDarkTheme: h(() => U.value === e.storageThemeValueDark),
|
|
1964
1964
|
hasLightTheme: h(() => U.value === e.storageThemeValueLight),
|
|
1965
1965
|
hasSystemTheme: h(() => U.value === e.storageThemeValueSystem),
|
|
@@ -1971,7 +1971,7 @@ function rn({
|
|
|
1971
1971
|
componentName: s,
|
|
1972
1972
|
providedId: e
|
|
1973
1973
|
}) {
|
|
1974
|
-
const t =
|
|
1974
|
+
const t = Et();
|
|
1975
1975
|
return h(() => e ?? `${s}-${t == null ? void 0 : t.uid}`);
|
|
1976
1976
|
}
|
|
1977
1977
|
function an() {
|
|
@@ -1987,23 +1987,23 @@ function cn({
|
|
|
1987
1987
|
callback: s,
|
|
1988
1988
|
options: e
|
|
1989
1989
|
}) {
|
|
1990
|
-
return new
|
|
1990
|
+
return new It(s, e);
|
|
1991
1991
|
}
|
|
1992
1992
|
function dn({
|
|
1993
1993
|
callback: s,
|
|
1994
1994
|
options: e
|
|
1995
1995
|
}) {
|
|
1996
|
-
return new
|
|
1996
|
+
return new St(s, e);
|
|
1997
1997
|
}
|
|
1998
|
-
function
|
|
1998
|
+
function As(s) {
|
|
1999
1999
|
const e = {};
|
|
2000
2000
|
for (const [t, n] of Object.entries(s))
|
|
2001
2001
|
e[t] = Number.parseInt(n, 10);
|
|
2002
2002
|
return e;
|
|
2003
2003
|
}
|
|
2004
|
-
function
|
|
2004
|
+
function xs(s = {}) {
|
|
2005
2005
|
const {
|
|
2006
|
-
internalWindow: e =
|
|
2006
|
+
internalWindow: e = M() ? window : void 0,
|
|
2007
2007
|
initialWidth: t = Number.POSITIVE_INFINITY,
|
|
2008
2008
|
initialHeight: n = Number.POSITIVE_INFINITY,
|
|
2009
2009
|
includeScrollbar: i = !0
|
|
@@ -2013,7 +2013,7 @@ function As(s = {}) {
|
|
|
2013
2013
|
}
|
|
2014
2014
|
return a(), pe(() => {
|
|
2015
2015
|
e && window.addEventListener("resize", a, { passive: !0 });
|
|
2016
|
-
}),
|
|
2016
|
+
}), Ue(() => {
|
|
2017
2017
|
e && window.removeEventListener("resize", a);
|
|
2018
2018
|
}), { width: o, height: r };
|
|
2019
2019
|
}
|
|
@@ -2027,27 +2027,27 @@ function mn({
|
|
|
2027
2027
|
mediumBreakPoint: r = "md",
|
|
2028
2028
|
largeBreakPoint: a = "lg"
|
|
2029
2029
|
}) {
|
|
2030
|
-
const { width: m } =
|
|
2030
|
+
const { width: m } = xs({
|
|
2031
2031
|
initialWidth: s,
|
|
2032
2032
|
// (SSR) mobile first
|
|
2033
2033
|
initialHeight: e,
|
|
2034
2034
|
includeScrollbar: t,
|
|
2035
2035
|
internalWindow: n,
|
|
2036
2036
|
listenOrientation: i
|
|
2037
|
-
}), y =
|
|
2037
|
+
}), y = As(o), C = h(() => m.value >= y[a]), b = h(
|
|
2038
2038
|
() => m.value >= y[r] && m.value < y[a]
|
|
2039
2039
|
), f = h(() => m.value >= 0 && m.value < y[r]);
|
|
2040
2040
|
return {
|
|
2041
2041
|
width: m,
|
|
2042
2042
|
numericBreakpoints: y,
|
|
2043
2043
|
isSmallScreen: f,
|
|
2044
|
-
isLargeScreen:
|
|
2044
|
+
isLargeScreen: C,
|
|
2045
2045
|
isMediumScreen: b,
|
|
2046
2046
|
breakpoints: o
|
|
2047
2047
|
};
|
|
2048
2048
|
}
|
|
2049
2049
|
function hn(s) {
|
|
2050
|
-
const e = g(), t = g(), n = g(), i = g(), o = g(), r = g(), a = new
|
|
2050
|
+
const e = g(), t = g(), n = g(), i = g(), o = g(), r = g(), a = new kt({
|
|
2051
2051
|
...s,
|
|
2052
2052
|
element: s.element,
|
|
2053
2053
|
onValuesChanged(m) {
|
|
@@ -2065,12 +2065,12 @@ function hn(s) {
|
|
|
2065
2065
|
stop: a.stop
|
|
2066
2066
|
};
|
|
2067
2067
|
}
|
|
2068
|
-
function
|
|
2068
|
+
function it(s) {
|
|
2069
2069
|
const e = s.join(", ").match(/\b\w+\b/g);
|
|
2070
2070
|
return e ? e.length : 0;
|
|
2071
2071
|
}
|
|
2072
|
-
function
|
|
2073
|
-
const t =
|
|
2072
|
+
function Os(s, e = 150) {
|
|
2073
|
+
const t = it([s]);
|
|
2074
2074
|
return Math.ceil(t / e);
|
|
2075
2075
|
}
|
|
2076
2076
|
function fn(s) {
|
|
@@ -2092,7 +2092,7 @@ function fn(s) {
|
|
|
2092
2092
|
return y.textContent;
|
|
2093
2093
|
}
|
|
2094
2094
|
return typeof s.content == "string" ? s.content : (m = s.content) == null ? void 0 : m.value;
|
|
2095
|
-
}), i = h(() =>
|
|
2095
|
+
}), i = h(() => Os(n.value, e.value)), o = h(() => it([n.value]));
|
|
2096
2096
|
return {
|
|
2097
2097
|
content: n,
|
|
2098
2098
|
wordCount: o,
|
|
@@ -2100,7 +2100,7 @@ function fn(s) {
|
|
|
2100
2100
|
duration: i
|
|
2101
2101
|
};
|
|
2102
2102
|
}
|
|
2103
|
-
function
|
|
2103
|
+
function Ds(s, e) {
|
|
2104
2104
|
const t = s.length, n = e.length, i = [];
|
|
2105
2105
|
for (let o = 0; o <= t; o++)
|
|
2106
2106
|
i[o] = [o];
|
|
@@ -2117,27 +2117,27 @@ function Os(s, e) {
|
|
|
2117
2117
|
}
|
|
2118
2118
|
return i[t][n];
|
|
2119
2119
|
}
|
|
2120
|
-
function
|
|
2121
|
-
const t =
|
|
2120
|
+
function ot(s, e) {
|
|
2121
|
+
const t = Ds(s, e), n = Math.max(s.length, e.length);
|
|
2122
2122
|
return 1 - t / n;
|
|
2123
2123
|
}
|
|
2124
|
-
function
|
|
2125
|
-
return
|
|
2124
|
+
function Fs(s, e, t = 0.75) {
|
|
2125
|
+
return ot(s, e) >= t;
|
|
2126
2126
|
}
|
|
2127
2127
|
function vn(s, e, t = 0.75) {
|
|
2128
2128
|
const n = h(
|
|
2129
2129
|
() => Oe(typeof s == "string" ? s : s.value)
|
|
2130
2130
|
), i = h(
|
|
2131
2131
|
() => Oe(typeof e == "string" ? e : e.value)
|
|
2132
|
-
), o = h(() => typeof t == "number" ? t : t.value), r = h(() =>
|
|
2132
|
+
), o = h(() => typeof t == "number" ? t : t.value), r = h(() => ot(n.value, i.value));
|
|
2133
2133
|
return {
|
|
2134
2134
|
isMatching: h(
|
|
2135
|
-
() =>
|
|
2135
|
+
() => Fs(n.value, i.value, o.value)
|
|
2136
2136
|
),
|
|
2137
2137
|
score: r
|
|
2138
2138
|
};
|
|
2139
2139
|
}
|
|
2140
|
-
function
|
|
2140
|
+
function Ms(s, e) {
|
|
2141
2141
|
const t = {};
|
|
2142
2142
|
return async function(n, ...i) {
|
|
2143
2143
|
t[n] || (t[n] = { timer: null, promise: null });
|
|
@@ -2155,11 +2155,11 @@ function Fs(s, e) {
|
|
|
2155
2155
|
}), o.promise;
|
|
2156
2156
|
};
|
|
2157
2157
|
}
|
|
2158
|
-
function
|
|
2159
|
-
const e =
|
|
2158
|
+
function rt(s) {
|
|
2159
|
+
const e = We(s);
|
|
2160
2160
|
return Array.isArray(e) ? Object.freeze([...e]) : typeof e == "object" && e !== null ? Object.freeze({ ...e }) : e;
|
|
2161
2161
|
}
|
|
2162
|
-
function
|
|
2162
|
+
function He(s) {
|
|
2163
2163
|
return s == null || typeof s == "string" || typeof s == "number" || typeof s == "boolean" || typeof s == "symbol" || typeof s == "bigint";
|
|
2164
2164
|
}
|
|
2165
2165
|
function Hs(s, e) {
|
|
@@ -2170,7 +2170,7 @@ function Hs(s, e) {
|
|
|
2170
2170
|
return !1;
|
|
2171
2171
|
return !0;
|
|
2172
2172
|
}
|
|
2173
|
-
function
|
|
2173
|
+
function Ps(s, e) {
|
|
2174
2174
|
const t = Object.keys(s), n = Object.keys(e);
|
|
2175
2175
|
if (t.length !== n.length)
|
|
2176
2176
|
return !1;
|
|
@@ -2180,9 +2180,9 @@ function Ms(s, e) {
|
|
|
2180
2180
|
return !0;
|
|
2181
2181
|
}
|
|
2182
2182
|
function re(s, e) {
|
|
2183
|
-
return
|
|
2183
|
+
return He(s) || He(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) ? Hs(s, e) : typeof s == "object" && typeof e == "object" ? Ps(s, e) : !1;
|
|
2184
2184
|
}
|
|
2185
|
-
function
|
|
2185
|
+
function $s(s, e) {
|
|
2186
2186
|
const t = {};
|
|
2187
2187
|
return async (n, ...i) => {
|
|
2188
2188
|
const o = Date.now();
|
|
@@ -2199,13 +2199,13 @@ function Ps(s, e) {
|
|
|
2199
2199
|
};
|
|
2200
2200
|
}
|
|
2201
2201
|
let Le;
|
|
2202
|
-
async function
|
|
2202
|
+
async function Vs() {
|
|
2203
2203
|
if (Le)
|
|
2204
2204
|
return Le;
|
|
2205
2205
|
const { safeParseAsync: s } = await import("./index-BohyOvAy.mjs");
|
|
2206
2206
|
return Le = s, s;
|
|
2207
2207
|
}
|
|
2208
|
-
function
|
|
2208
|
+
function at(s, e) {
|
|
2209
2209
|
return Object.keys(e.entries).includes(s);
|
|
2210
2210
|
}
|
|
2211
2211
|
function Pe(s = ".has-input-error") {
|
|
@@ -2215,13 +2215,13 @@ function Pe(s = ".has-input-error") {
|
|
|
2215
2215
|
function $e(s) {
|
|
2216
2216
|
return s == null || s === "";
|
|
2217
2217
|
}
|
|
2218
|
-
function
|
|
2218
|
+
function lt({
|
|
2219
2219
|
name: s,
|
|
2220
2220
|
schema: e,
|
|
2221
2221
|
initialValue: t,
|
|
2222
2222
|
mode: n
|
|
2223
2223
|
}) {
|
|
2224
|
-
const i = e ?
|
|
2224
|
+
const i = e ? at(s, e) : !1;
|
|
2225
2225
|
return {
|
|
2226
2226
|
blurred: !1,
|
|
2227
2227
|
dirty: !1,
|
|
@@ -2234,11 +2234,11 @@ function at({
|
|
|
2234
2234
|
initialValue: t
|
|
2235
2235
|
};
|
|
2236
2236
|
}
|
|
2237
|
-
function
|
|
2237
|
+
function _s(s, e, t) {
|
|
2238
2238
|
const n = {};
|
|
2239
2239
|
for (const [i] of Object.entries(s.entries)) {
|
|
2240
2240
|
const o = i;
|
|
2241
|
-
n[o] =
|
|
2241
|
+
n[o] = lt({
|
|
2242
2242
|
name: o,
|
|
2243
2243
|
schema: s,
|
|
2244
2244
|
mode: t,
|
|
@@ -2247,7 +2247,7 @@ function Vs(s, e, t) {
|
|
|
2247
2247
|
}
|
|
2248
2248
|
return n;
|
|
2249
2249
|
}
|
|
2250
|
-
function
|
|
2250
|
+
function Ns({
|
|
2251
2251
|
name: s,
|
|
2252
2252
|
fieldsStates: e,
|
|
2253
2253
|
payload: t,
|
|
@@ -2255,10 +2255,10 @@ function _s({
|
|
|
2255
2255
|
options: i
|
|
2256
2256
|
}) {
|
|
2257
2257
|
var r;
|
|
2258
|
-
const o =
|
|
2258
|
+
const o = lt({
|
|
2259
2259
|
name: s,
|
|
2260
2260
|
schema: n.value,
|
|
2261
|
-
initialValue:
|
|
2261
|
+
initialValue: rt(i.defaultValue ?? t.value[s]),
|
|
2262
2262
|
mode: i.mode
|
|
2263
2263
|
});
|
|
2264
2264
|
return {
|
|
@@ -2267,14 +2267,14 @@ function _s({
|
|
|
2267
2267
|
errors: (r = e[s]) != null && r.errors ? [...e[s].errors, ...o.errors] : o.errors
|
|
2268
2268
|
};
|
|
2269
2269
|
}
|
|
2270
|
-
function
|
|
2270
|
+
function Bs(s) {
|
|
2271
2271
|
const e = {};
|
|
2272
2272
|
for (const [t, { errors: n }] of Object.entries(s))
|
|
2273
2273
|
e[t] = n;
|
|
2274
2274
|
return e;
|
|
2275
2275
|
}
|
|
2276
|
-
function
|
|
2277
|
-
return s.querySelectorAll("input, select, textarea");
|
|
2276
|
+
function Ve(s) {
|
|
2277
|
+
return s instanceof HTMLInputElement || s instanceof HTMLSelectElement || s instanceof HTMLTextAreaElement ? [s] : [...s.querySelectorAll("input, select, textarea")];
|
|
2278
2278
|
}
|
|
2279
2279
|
function qs({
|
|
2280
2280
|
interactiveElements: s,
|
|
@@ -2283,7 +2283,7 @@ function qs({
|
|
|
2283
2283
|
mode: n
|
|
2284
2284
|
}) {
|
|
2285
2285
|
s.forEach((i) => {
|
|
2286
|
-
["onBlur", "eager"].includes(n) && i.addEventListener("blur", e), ["onInput", "eager"].includes(n) && (i.
|
|
2286
|
+
["onBlur", "eager"].includes(n) && i.addEventListener("blur", e), ["onInput", "eager"].includes(n) && (i.getAttribute("type") === "radio" || i.getAttribute("type") === "checkbox" ? i.addEventListener("change", t) : i.addEventListener("input", t));
|
|
2287
2287
|
});
|
|
2288
2288
|
}
|
|
2289
2289
|
function js({
|
|
@@ -2295,8 +2295,8 @@ function js({
|
|
|
2295
2295
|
n.removeEventListener("blur", e), n.removeEventListener("input", t), n.removeEventListener("change", t);
|
|
2296
2296
|
});
|
|
2297
2297
|
}
|
|
2298
|
-
const
|
|
2299
|
-
let
|
|
2298
|
+
const ut = Symbol("FormContext");
|
|
2299
|
+
let ct = null;
|
|
2300
2300
|
function pn({
|
|
2301
2301
|
schema: s,
|
|
2302
2302
|
model: e,
|
|
@@ -2312,47 +2312,47 @@ function pn({
|
|
|
2312
2312
|
}, o = g({
|
|
2313
2313
|
...e == null ? void 0 : e.value,
|
|
2314
2314
|
...t == null ? void 0 : t.value
|
|
2315
|
-
}), r =
|
|
2316
|
-
|
|
2317
|
-
), a = g(!1), m = g(!1), y = h(() => Object.values(r).every(({ valid: c }) => c)),
|
|
2315
|
+
}), r = zt(
|
|
2316
|
+
_s(s.value, (t == null ? void 0 : t.value) ?? o.value, i.mode)
|
|
2317
|
+
), a = g(!1), m = g(!1), y = h(() => Object.values(r).every(({ valid: c }) => c)), C = h(() => Object.values(r).some(({ dirty: c }) => c)), b = h(() => Bs(r));
|
|
2318
2318
|
async function f(c) {
|
|
2319
|
-
const p = await (await
|
|
2319
|
+
const p = await (await Vs())(s.value.entries[c], o.value[c] ?? "");
|
|
2320
2320
|
return {
|
|
2321
2321
|
result: p,
|
|
2322
2322
|
isValid: p.success
|
|
2323
2323
|
};
|
|
2324
2324
|
}
|
|
2325
2325
|
async function T(c, L = !0) {
|
|
2326
|
-
await
|
|
2326
|
+
await Ke(0);
|
|
2327
2327
|
const p = r[c];
|
|
2328
2328
|
if (p.validating = !0, !s.value.entries[c]) {
|
|
2329
2329
|
p.valid = !0, p.validating = !1, p.validated = !0, p.errors = [], p.error = !1;
|
|
2330
2330
|
return;
|
|
2331
2331
|
}
|
|
2332
|
-
const { result: E, isValid:
|
|
2333
|
-
p.valid =
|
|
2332
|
+
const { result: E, isValid: A } = await f(c);
|
|
2333
|
+
p.valid = A, L && (p.error = !A), p.errors = E.issues ?? [], p.validating = !1, p.validated = !0;
|
|
2334
2334
|
}
|
|
2335
2335
|
async function O(c) {
|
|
2336
|
-
var L, p, E,
|
|
2336
|
+
var L, p, E, A, Y, B, Q, K;
|
|
2337
2337
|
if (typeof ((L = i.throttledFields) == null ? void 0 : L[c]) == "number" || (p = i.throttledFields) != null && p[c]) {
|
|
2338
|
-
const
|
|
2339
|
-
|
|
2340
|
-
} else if (typeof ((
|
|
2341
|
-
const
|
|
2342
|
-
|
|
2338
|
+
const R = typeof ((E = i.throttledFields) == null ? void 0 : E[c]) == "number" ? (A = i.throttledFields) == null ? void 0 : A[c] : 1e3;
|
|
2339
|
+
$s(T, R)(c, c);
|
|
2340
|
+
} else if (typeof ((Y = i.debouncedFields) == null ? void 0 : Y[c]) == "number" || (B = i.debouncedFields) != null && B[c]) {
|
|
2341
|
+
const R = typeof ((Q = i.debouncedFields) == null ? void 0 : Q[c]) == "number" ? (K = i.debouncedFields) == null ? void 0 : K[c] : 300;
|
|
2342
|
+
Ms(T, R)(c, c);
|
|
2343
2343
|
} else
|
|
2344
2344
|
T(c);
|
|
2345
2345
|
}
|
|
2346
|
-
function
|
|
2346
|
+
function H(c) {
|
|
2347
2347
|
ie(
|
|
2348
|
-
() =>
|
|
2349
|
-
() =>
|
|
2348
|
+
() => We(o.value)[c],
|
|
2349
|
+
() => $(c, !0),
|
|
2350
2350
|
{ deep: s.value.entries[c].type === "object" }
|
|
2351
2351
|
);
|
|
2352
2352
|
}
|
|
2353
2353
|
function D() {
|
|
2354
2354
|
for (const c in s.value.entries)
|
|
2355
|
-
|
|
2355
|
+
H(c);
|
|
2356
2356
|
}
|
|
2357
2357
|
async function P(c = !0) {
|
|
2358
2358
|
return await Promise.all(
|
|
@@ -2363,54 +2363,54 @@ function pn({
|
|
|
2363
2363
|
const { dirty: L, blurred: p, mode: E } = r[c];
|
|
2364
2364
|
return m.value || E === "eager" && p || E === "onInput" && L || E === "onBlur" && p || E === "aggressive" || E === "lazy";
|
|
2365
2365
|
}
|
|
2366
|
-
function
|
|
2367
|
-
const p = o.value[c], E = r[c],
|
|
2368
|
-
E.dirty =
|
|
2366
|
+
function S(c, L = !1) {
|
|
2367
|
+
const p = o.value[c], E = r[c], A = !$e(p) && !re(p, E.initialValue);
|
|
2368
|
+
E.dirty = A, E.blurred = E.blurred || A, !(!L && !w(c)) && O(c);
|
|
2369
2369
|
}
|
|
2370
|
-
function
|
|
2370
|
+
function $(c, L = !1) {
|
|
2371
2371
|
const p = o.value[c], E = r[c];
|
|
2372
2372
|
E.validated = !1;
|
|
2373
|
-
const
|
|
2374
|
-
E.dirty =
|
|
2373
|
+
const A = !$e(p) && !re(p, E.initialValue);
|
|
2374
|
+
E.dirty = A, !(!L && !w(c)) && O(c);
|
|
2375
2375
|
}
|
|
2376
|
-
function
|
|
2376
|
+
function k(c, L) {
|
|
2377
2377
|
return async (p) => {
|
|
2378
2378
|
m.value = !0, a.value = !0, p.preventDefault(), await P() ? await c(o.value) : (L || i.scrollToErrorSelector) && Pe(typeof L == "string" ? L : i.scrollToErrorSelector), a.value = !1;
|
|
2379
2379
|
};
|
|
2380
2380
|
}
|
|
2381
|
-
const
|
|
2382
|
-
handleFieldInput:
|
|
2383
|
-
handleFieldBlur:
|
|
2381
|
+
const V = {
|
|
2382
|
+
handleFieldInput: $,
|
|
2383
|
+
handleFieldBlur: S,
|
|
2384
2384
|
fieldsStates: r,
|
|
2385
2385
|
payload: o,
|
|
2386
|
-
addFieldValidationWatch:
|
|
2386
|
+
addFieldValidationWatch: H,
|
|
2387
2387
|
validateField: O,
|
|
2388
2388
|
options: i,
|
|
2389
2389
|
schema: s,
|
|
2390
2390
|
setFieldValidationState: T
|
|
2391
2391
|
};
|
|
2392
|
-
return
|
|
2392
|
+
return ct = V, Tt(ut, V), ["aggressive", "lazy"].includes(i.mode) && D(), P(i.mode === "aggressive"), ie(
|
|
2393
2393
|
o,
|
|
2394
2394
|
(c) => {
|
|
2395
2395
|
e && (e.value = c);
|
|
2396
2396
|
},
|
|
2397
2397
|
{ immediate: !0 }
|
|
2398
2398
|
), {
|
|
2399
|
-
isDirty:
|
|
2399
|
+
isDirty: C,
|
|
2400
2400
|
isSubmitting: a,
|
|
2401
2401
|
isSubmitted: m,
|
|
2402
2402
|
isValid: y,
|
|
2403
2403
|
errors: b,
|
|
2404
2404
|
model: o,
|
|
2405
|
-
context:
|
|
2405
|
+
context: V,
|
|
2406
2406
|
fieldsStates: r,
|
|
2407
2407
|
validateForm: P,
|
|
2408
2408
|
scrollToError: Pe,
|
|
2409
|
-
handleSubmit:
|
|
2409
|
+
handleSubmit: k
|
|
2410
2410
|
};
|
|
2411
2411
|
}
|
|
2412
2412
|
function gn(s, e) {
|
|
2413
|
-
const t =
|
|
2413
|
+
const t = ct ?? _e(ut);
|
|
2414
2414
|
if (!t)
|
|
2415
2415
|
throw new Error("useFormField must be used within a form (useFormValidator)");
|
|
2416
2416
|
const {
|
|
@@ -2421,45 +2421,48 @@ function gn(s, e) {
|
|
|
2421
2421
|
options: a,
|
|
2422
2422
|
addFieldValidationWatch: m,
|
|
2423
2423
|
schema: y,
|
|
2424
|
-
setFieldValidationState:
|
|
2424
|
+
setFieldValidationState: C
|
|
2425
2425
|
} = t, b = {
|
|
2426
2426
|
...e,
|
|
2427
|
-
mode:
|
|
2427
|
+
mode: at(s, y.value) ? (e == null ? void 0 : e.mode) ?? a.mode : "none"
|
|
2428
2428
|
};
|
|
2429
|
-
o[s] =
|
|
2429
|
+
o[s] = Ns({ name: s, fieldsStates: o, payload: r, schema: y, options: b });
|
|
2430
2430
|
const f = h(() => o[s]);
|
|
2431
2431
|
if (b.defaultValue !== void 0 && !re(r.value[s], b.defaultValue)) {
|
|
2432
2432
|
const w = b.defaultValue;
|
|
2433
|
-
r.value[s] = w, o[s].initialValue =
|
|
2433
|
+
r.value[s] = w, o[s].initialValue = rt(w);
|
|
2434
2434
|
}
|
|
2435
|
-
["aggressive", "lazy"].includes(f.value.mode) && !["aggressive", "lazy"].includes(a.mode) && m(s), f.value.mode !== "none" &&
|
|
2435
|
+
["aggressive", "lazy"].includes(f.value.mode) && !["aggressive", "lazy"].includes(a.mode) && m(s), f.value.mode !== "none" && C(s, f.value.mode === "aggressive" || a.mode === "aggressive");
|
|
2436
2436
|
const T = {
|
|
2437
2437
|
onBlur: () => i(s)
|
|
2438
2438
|
}, O = {
|
|
2439
2439
|
"onUpdate:modelValue": () => n(s)
|
|
2440
|
-
},
|
|
2440
|
+
}, H = h(() => {
|
|
2441
2441
|
if (!(b.componentRef || ["aggressive", "lazy", "none"].includes(f.value.mode)))
|
|
2442
2442
|
return f.value.mode === "onInput" || f.value.blurred && f.value.mode === "eager" ? O : T;
|
|
2443
2443
|
});
|
|
2444
2444
|
if (b.componentRef && !["aggressive", "lazy"].includes(a.mode) && !["aggressive", "lazy"].includes(o[s].mode)) {
|
|
2445
|
-
let w = [],
|
|
2446
|
-
|
|
2445
|
+
let w = [], S = null;
|
|
2446
|
+
const $ = () => {
|
|
2447
|
+
qs({
|
|
2448
|
+
interactiveElements: w,
|
|
2449
|
+
onBlur: T.onBlur,
|
|
2450
|
+
onInput: O["onUpdate:modelValue"],
|
|
2451
|
+
mode: f.value.mode
|
|
2452
|
+
});
|
|
2453
|
+
};
|
|
2454
|
+
S = ie(
|
|
2447
2455
|
b.componentRef,
|
|
2448
|
-
(
|
|
2449
|
-
|
|
2450
|
-
interactiveElements: w,
|
|
2451
|
-
onBlur: T.onBlur,
|
|
2452
|
-
onInput: O["onUpdate:modelValue"],
|
|
2453
|
-
mode: f.value.mode
|
|
2454
|
-
}));
|
|
2456
|
+
(k) => {
|
|
2457
|
+
k && k instanceof HTMLElement ? (S == null || S(), w = Ve(k), $()) : k != null && k.$el && (S == null || S(), w = Ve(k.$el), $());
|
|
2455
2458
|
},
|
|
2456
2459
|
{ immediate: !0 }
|
|
2457
|
-
),
|
|
2460
|
+
), Ue(() => {
|
|
2458
2461
|
js({
|
|
2459
2462
|
interactiveElements: w,
|
|
2460
2463
|
onBlur: T.onBlur,
|
|
2461
2464
|
onInput: O["onUpdate:modelValue"]
|
|
2462
|
-
}),
|
|
2465
|
+
}), S == null || S();
|
|
2463
2466
|
});
|
|
2464
2467
|
}
|
|
2465
2468
|
const D = h(() => f.value.error), P = h(() => f.value.errors);
|
|
@@ -2480,20 +2483,20 @@ function gn(s, e) {
|
|
|
2480
2483
|
get: () => r.value[s],
|
|
2481
2484
|
set: (w) => r.value[s] = w
|
|
2482
2485
|
}),
|
|
2483
|
-
validationEvents:
|
|
2486
|
+
validationEvents: H
|
|
2484
2487
|
};
|
|
2485
2488
|
}
|
|
2486
2489
|
export {
|
|
2487
2490
|
pn as $,
|
|
2488
|
-
|
|
2489
|
-
|
|
2491
|
+
is as A,
|
|
2492
|
+
rs as B,
|
|
2490
2493
|
en as C,
|
|
2491
2494
|
tn as D,
|
|
2492
|
-
|
|
2493
|
-
|
|
2495
|
+
Is as E,
|
|
2496
|
+
Ss as F,
|
|
2494
2497
|
sn as G,
|
|
2495
2498
|
nn as H,
|
|
2496
|
-
|
|
2499
|
+
It as I,
|
|
2497
2500
|
on as J,
|
|
2498
2501
|
rn as K,
|
|
2499
2502
|
an as L,
|
|
@@ -2501,42 +2504,42 @@ export {
|
|
|
2501
2504
|
un as N,
|
|
2502
2505
|
cn as O,
|
|
2503
2506
|
dn as P,
|
|
2504
|
-
|
|
2507
|
+
ls as Q,
|
|
2505
2508
|
mn as R,
|
|
2506
|
-
|
|
2507
|
-
|
|
2508
|
-
|
|
2509
|
-
|
|
2510
|
-
|
|
2509
|
+
Ks as S,
|
|
2510
|
+
gs as T,
|
|
2511
|
+
St as U,
|
|
2512
|
+
xs as V,
|
|
2513
|
+
Ls as W,
|
|
2511
2514
|
hn as X,
|
|
2512
2515
|
fn as Y,
|
|
2513
2516
|
vn as Z,
|
|
2514
|
-
|
|
2515
|
-
|
|
2517
|
+
tt as _,
|
|
2518
|
+
M as a,
|
|
2516
2519
|
gn as a0,
|
|
2517
|
-
|
|
2518
|
-
|
|
2519
|
-
|
|
2520
|
+
kt as b,
|
|
2521
|
+
Rs as c,
|
|
2522
|
+
Ys as d,
|
|
2520
2523
|
Xs as e,
|
|
2521
|
-
|
|
2522
|
-
|
|
2523
|
-
|
|
2524
|
+
xt as f,
|
|
2525
|
+
Ot as g,
|
|
2526
|
+
qt as h,
|
|
2524
2527
|
Ae as i,
|
|
2525
2528
|
Qs as j,
|
|
2526
|
-
|
|
2527
|
-
|
|
2528
|
-
|
|
2529
|
+
Nt as k,
|
|
2530
|
+
Zt as l,
|
|
2531
|
+
Ye as m,
|
|
2529
2532
|
Oe as n,
|
|
2530
|
-
|
|
2533
|
+
Xt as o,
|
|
2531
2534
|
Gs as p,
|
|
2532
|
-
|
|
2535
|
+
Mt as q,
|
|
2533
2536
|
Ht as r,
|
|
2534
|
-
|
|
2535
|
-
|
|
2536
|
-
|
|
2537
|
-
|
|
2537
|
+
Ke as s,
|
|
2538
|
+
Lt as t,
|
|
2539
|
+
Pt as u,
|
|
2540
|
+
_t as v,
|
|
2538
2541
|
Zs as w,
|
|
2539
2542
|
Js as x,
|
|
2540
|
-
|
|
2541
|
-
|
|
2543
|
+
Gt as y,
|
|
2544
|
+
ss as z
|
|
2542
2545
|
};
|