@reinosoft-ui/core 0.1.95 → 0.1.97
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/reinosoft-ui.es.js +864 -868
- package/dist/reinosoft-ui.umd.js +2 -2
- package/package.json +1 -1
package/dist/reinosoft-ui.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as Z, ref as k, computed as
|
|
1
|
+
import { defineComponent as Z, ref as k, computed as _, watch as Q, onMounted as ve, createElementBlock as b, openBlock as p, normalizeStyle as Ie, normalizeClass as fe, renderSlot as G, createCommentVNode as q, withDirectives as _e, createElementVNode as w, vShow as rt, mergeProps as be, mergeModels as ie, useModel as ke, withKeys as ye, withModifiers as se, onUnmounted as Be, Fragment as de, unref as N, toDisplayString as j, renderList as he, nextTick as xe, onBeforeUnmount as Se, createBlock as ae, Teleport as Fe, createVNode as K, Transition as Ae, withCtx as J, vModelText as Ye, useId as ge, provide as He, createTextVNode as Me, resolveDynamicComponent as Ne, inject as me, useAttrs as st, h as W, useSlots as it, resolveComponent as Ut, vModelRadio as Kt, vModelDynamic as jt, reactive as ut, TransitionGroup as Wt, createApp as _t, shallowRef as Yt } from "vue";
|
|
2
2
|
import { routerKey as Xt } from "vue-router";
|
|
3
3
|
const Gt = ["aria-busy"], Jt = ["aria-label"], Qt = ["src", "srcset", "sizes", "alt", "aria-hidden", "loading", "decoding"], e1 = /* @__PURE__ */ Z({
|
|
4
4
|
__name: "Image",
|
|
@@ -16,38 +16,38 @@ const Gt = ["aria-busy"], Jt = ["aria-label"], Qt = ["src", "srcset", "sizes", "
|
|
|
16
16
|
},
|
|
17
17
|
emits: ["loaded", "error"],
|
|
18
18
|
setup(e, { emit: n }) {
|
|
19
|
-
const t = e, a = n, o = k(t.src), i = k(),
|
|
19
|
+
const t = e, a = n, o = k(t.src), i = k(), s = k("loading"), l = _(() => t.ratio ? {
|
|
20
20
|
aspectRatio: typeof t.ratio == "number" ? `${t.ratio}` : t.ratio
|
|
21
|
-
} : void 0),
|
|
22
|
-
|
|
21
|
+
} : void 0), r = () => {
|
|
22
|
+
s.value = "loaded", a("loaded");
|
|
23
23
|
}, c = () => {
|
|
24
24
|
if (t.fallbackSrc && o.value !== t.fallbackSrc) {
|
|
25
|
-
o.value = t.fallbackSrc,
|
|
25
|
+
o.value = t.fallbackSrc, s.value = "loading";
|
|
26
26
|
return;
|
|
27
27
|
}
|
|
28
|
-
|
|
28
|
+
s.value = "error", a("error");
|
|
29
29
|
};
|
|
30
30
|
return Q(
|
|
31
31
|
() => t.src,
|
|
32
32
|
(u) => {
|
|
33
|
-
o.value = u,
|
|
33
|
+
o.value = u, s.value = "loading";
|
|
34
34
|
}
|
|
35
|
-
), ve(() => i.value?.complete && i.value.naturalWidth > 0 && (
|
|
35
|
+
), ve(() => i.value?.complete && i.value.naturalWidth > 0 && (s.value = "loaded")), (u, f) => (p(), b("div", {
|
|
36
36
|
class: fe(["ui-image", {
|
|
37
|
-
"is-loading":
|
|
38
|
-
"is-error":
|
|
39
|
-
"is-loaded":
|
|
37
|
+
"is-loading": s.value === "loading",
|
|
38
|
+
"is-error": s.value === "error",
|
|
39
|
+
"is-loaded": s.value === "loaded",
|
|
40
40
|
transform: e.transform
|
|
41
41
|
}]),
|
|
42
42
|
style: Ie(l.value),
|
|
43
|
-
"aria-busy":
|
|
43
|
+
"aria-busy": s.value === "loading" || void 0
|
|
44
44
|
}, [
|
|
45
|
-
|
|
46
|
-
|
|
45
|
+
s.value === "loading" ? G(u.$slots, "placeholder", { key: 0 }, () => [
|
|
46
|
+
f[0] || (f[0] = w("div", {
|
|
47
47
|
class: "ui-image__placeholder",
|
|
48
48
|
"aria-hidden": "true"
|
|
49
49
|
}, null, -1))
|
|
50
|
-
], !0) :
|
|
50
|
+
], !0) : s.value === "error" ? G(u.$slots, "fallback", { key: 1 }, () => [
|
|
51
51
|
w("div", {
|
|
52
52
|
class: "ui-image__fallback",
|
|
53
53
|
role: "img",
|
|
@@ -65,10 +65,10 @@ const Gt = ["aria-busy"], Jt = ["aria-label"], Qt = ["src", "srcset", "sizes", "
|
|
|
65
65
|
"aria-hidden": e.decorative || void 0,
|
|
66
66
|
loading: e.lazy ? "lazy" : void 0,
|
|
67
67
|
decoding: e.decoding,
|
|
68
|
-
onLoad:
|
|
68
|
+
onLoad: r,
|
|
69
69
|
onError: c
|
|
70
70
|
}, null, 40, Qt), [
|
|
71
|
-
[rt,
|
|
71
|
+
[rt, s.value !== "error"]
|
|
72
72
|
])
|
|
73
73
|
], 14, Gt));
|
|
74
74
|
}
|
|
@@ -111,12 +111,12 @@ const a1 = ["id", "aria-checked", "aria-disabled", "disabled", "onKeydown"], n1
|
|
|
111
111
|
}),
|
|
112
112
|
emits: /* @__PURE__ */ ie(["change"], ["update:modelValue"]),
|
|
113
113
|
setup(e, { emit: n }) {
|
|
114
|
-
const t = ke(e, "modelValue"), a = n, o = e, i =
|
|
114
|
+
const t = ke(e, "modelValue"), a = n, o = e, i = _(() => t.value), s = () => {
|
|
115
115
|
if (o.disabled) return;
|
|
116
116
|
const l = !t.value;
|
|
117
117
|
t.value = l, a("change", l);
|
|
118
118
|
};
|
|
119
|
-
return (l,
|
|
119
|
+
return (l, r) => (p(), b("button", {
|
|
120
120
|
id: e.id,
|
|
121
121
|
role: "switch",
|
|
122
122
|
type: "button",
|
|
@@ -124,12 +124,12 @@ const a1 = ["id", "aria-checked", "aria-disabled", "disabled", "onKeydown"], n1
|
|
|
124
124
|
"aria-checked": i.value,
|
|
125
125
|
"aria-disabled": e.disabled || void 0,
|
|
126
126
|
disabled: e.disabled || void 0,
|
|
127
|
-
onClick:
|
|
127
|
+
onClick: s,
|
|
128
128
|
onKeydown: [
|
|
129
|
-
ye(se(
|
|
130
|
-
ye(se(
|
|
129
|
+
ye(se(s, ["prevent"]), ["space"]),
|
|
130
|
+
ye(se(s, ["prevent"]), ["enter"])
|
|
131
131
|
]
|
|
132
|
-
}, [...
|
|
132
|
+
}, [...r[0] || (r[0] = [
|
|
133
133
|
w("span", { class: "ui-toggle__track" }, [
|
|
134
134
|
w("span", { class: "ui-toggle__thumb" })
|
|
135
135
|
], -1)
|
|
@@ -167,11 +167,11 @@ const At = (e) => {
|
|
|
167
167
|
const a = t.getRangeAt(0), o = Et(a.startContainer, "li");
|
|
168
168
|
if (o) {
|
|
169
169
|
e.preventDefault();
|
|
170
|
-
const i = o.textContent?.trim() === "",
|
|
171
|
-
if (!
|
|
170
|
+
const i = o.textContent?.trim() === "", s = o.parentElement;
|
|
171
|
+
if (!s) return;
|
|
172
172
|
if (i) {
|
|
173
|
-
const
|
|
174
|
-
|
|
173
|
+
const r = ct("p");
|
|
174
|
+
s.after(r), o.remove(), s.children.length === 0 && s.remove(), Oe(r), n?.normalize();
|
|
175
175
|
return;
|
|
176
176
|
}
|
|
177
177
|
const l = document.createElement("li");
|
|
@@ -192,20 +192,20 @@ const At = (e) => {
|
|
|
192
192
|
const a = t.getRangeAt(0);
|
|
193
193
|
let o = At(a.startContainer);
|
|
194
194
|
if (o && o.tagName === "LI") {
|
|
195
|
-
const
|
|
196
|
-
|
|
195
|
+
const R = o.parentElement;
|
|
196
|
+
R && ["UL", "OL"].includes(R.tagName) && (o = R);
|
|
197
197
|
}
|
|
198
198
|
if (!o) return;
|
|
199
|
-
const i = o.tagName.toLowerCase(), l = ["p", "h1", "blockquote"].includes(i) ? i : "p",
|
|
199
|
+
const i = o.tagName.toLowerCase(), l = ["p", "h1", "blockquote"].includes(i) ? i : "p", r = ct(l);
|
|
200
200
|
document.createRange().selectNodeContents(o);
|
|
201
|
-
const u = a.cloneRange(),
|
|
202
|
-
|
|
203
|
-
const m =
|
|
201
|
+
const u = a.cloneRange(), f = document.createRange();
|
|
202
|
+
f.selectNodeContents(o), f.setEnd(u.startContainer, u.startOffset);
|
|
203
|
+
const m = f.cloneContents(), C = document.createRange();
|
|
204
204
|
C.selectNodeContents(o), C.setStart(u.startContainer, u.startOffset);
|
|
205
205
|
const h = C.cloneContents();
|
|
206
|
-
o.innerHTML = "", o.appendChild(m), o.innerHTML === "" && (o.innerHTML = "<br>"),
|
|
206
|
+
o.innerHTML = "", o.appendChild(m), o.innerHTML === "" && (o.innerHTML = "<br>"), r.innerHTML = "", r.appendChild(h), r.innerHTML === "" && (r.innerHTML = "<br>"), o.after(r);
|
|
207
207
|
const L = document.createRange();
|
|
208
|
-
L.setStart(
|
|
208
|
+
L.setStart(r, 0), L.collapse(!0), t.removeAllRanges(), t.addRange(L), n?.normalize();
|
|
209
209
|
}, i1 = () => {
|
|
210
210
|
const e = window.getSelection();
|
|
211
211
|
if (!e || e.rangeCount === 0) return;
|
|
@@ -223,20 +223,20 @@ const At = (e) => {
|
|
|
223
223
|
return;
|
|
224
224
|
}
|
|
225
225
|
if (!a || !(a.textContent === "" || a.innerHTML === "<br>")) return;
|
|
226
|
-
const
|
|
227
|
-
if (e.preventDefault(), !
|
|
226
|
+
const s = a.previousElementSibling, l = a.nextElementSibling;
|
|
227
|
+
if (e.preventDefault(), !s && !l) {
|
|
228
228
|
a.innerHTML = "<br>", Oe(a);
|
|
229
229
|
return;
|
|
230
230
|
}
|
|
231
|
-
if (
|
|
232
|
-
if (
|
|
233
|
-
a.remove(), ht(
|
|
231
|
+
if (s) {
|
|
232
|
+
if (s.dataset.block !== void 0) {
|
|
233
|
+
a.remove(), ht(s);
|
|
234
234
|
return;
|
|
235
235
|
}
|
|
236
|
-
if (["UL", "OL"].includes(
|
|
237
|
-
const
|
|
238
|
-
if (
|
|
239
|
-
a.remove(), ht(
|
|
236
|
+
if (["UL", "OL"].includes(s.tagName)) {
|
|
237
|
+
const r = s.lastElementChild;
|
|
238
|
+
if (r) {
|
|
239
|
+
a.remove(), ht(r);
|
|
240
240
|
return;
|
|
241
241
|
}
|
|
242
242
|
}
|
|
@@ -247,9 +247,9 @@ const At = (e) => {
|
|
|
247
247
|
return;
|
|
248
248
|
}
|
|
249
249
|
if (["UL", "OL"].includes(l.tagName)) {
|
|
250
|
-
const
|
|
251
|
-
if (
|
|
252
|
-
a.remove(), Oe(
|
|
250
|
+
const r = l.firstElementChild;
|
|
251
|
+
if (r) {
|
|
252
|
+
a.remove(), Oe(r);
|
|
253
253
|
return;
|
|
254
254
|
}
|
|
255
255
|
}
|
|
@@ -258,16 +258,16 @@ const At = (e) => {
|
|
|
258
258
|
const n = document.createRange(), t = window.getSelection();
|
|
259
259
|
n.selectNodeContents(e), n.collapse(!1), t?.removeAllRanges(), t?.addRange(n);
|
|
260
260
|
}, u1 = (e, n) => {
|
|
261
|
-
const t = k(null), a = n?.buttons ?? [], o = n?.uploadImage, i = n?.minImageResolution,
|
|
261
|
+
const t = k(null), a = n?.buttons ?? [], o = n?.uploadImage, i = n?.minImageResolution, s = n?.onImageResolutionError;
|
|
262
262
|
let l = k(null);
|
|
263
|
-
const
|
|
264
|
-
const
|
|
265
|
-
if (!
|
|
263
|
+
const r = () => {
|
|
264
|
+
const v = e;
|
|
265
|
+
if (!v) return;
|
|
266
266
|
const d = window.getSelection();
|
|
267
267
|
if (!d || d.rangeCount === 0) return;
|
|
268
268
|
const y = d.getRangeAt(0);
|
|
269
|
-
|
|
270
|
-
}, c = (
|
|
269
|
+
v.contains(y.commonAncestorContainer) && (t.value = y.cloneRange());
|
|
270
|
+
}, c = (v) => {
|
|
271
271
|
const d = window.getSelection();
|
|
272
272
|
if (!d || d.rangeCount === 0 || d.isCollapsed) return !1;
|
|
273
273
|
const y = d.getRangeAt(0), $ = e;
|
|
@@ -278,92 +278,92 @@ const At = (e) => {
|
|
|
278
278
|
if (te === ne) return;
|
|
279
279
|
let le;
|
|
280
280
|
te === 0 && ne === ee.textContent.length ? le = ee : (le = ee.splitText(te), ne - te < le.textContent.length && le.splitText(ne - te));
|
|
281
|
-
const pe = o1(le,
|
|
281
|
+
const pe = o1(le, v, $);
|
|
282
282
|
if (pe)
|
|
283
283
|
l1(pe), ce.push(le);
|
|
284
284
|
else {
|
|
285
|
-
const $e = document.createElement(
|
|
285
|
+
const $e = document.createElement(v);
|
|
286
286
|
le.replaceWith($e), $e.appendChild(le), ce.push(le);
|
|
287
287
|
}
|
|
288
288
|
}), ce.length > 0) {
|
|
289
289
|
const ee = document.createRange();
|
|
290
290
|
ee.setStart(ce[0], 0);
|
|
291
291
|
const te = ce[ce.length - 1];
|
|
292
|
-
ee.setEnd(te, te.textContent.length), d.removeAllRanges(), d.addRange(ee),
|
|
292
|
+
ee.setEnd(te, te.textContent.length), d.removeAllRanges(), d.addRange(ee), r();
|
|
293
293
|
}
|
|
294
|
-
return h(), L(
|
|
295
|
-
}, u = (
|
|
296
|
-
if (!
|
|
297
|
-
const y =
|
|
294
|
+
return h(), L(v);
|
|
295
|
+
}, u = (v, d) => {
|
|
296
|
+
if (!v || !d || !(d instanceof HTMLElement)) return [];
|
|
297
|
+
const y = v.commonAncestorContainer, $ = d.contains(y) ? d : y.nodeType === 3 ? y.parentNode : y, X = document.createTreeWalker(
|
|
298
298
|
$,
|
|
299
299
|
NodeFilter.SHOW_TEXT,
|
|
300
300
|
{
|
|
301
301
|
acceptNode(te) {
|
|
302
|
-
return d.contains(te) &&
|
|
302
|
+
return d.contains(te) && v.intersectsNode(te) ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_REJECT;
|
|
303
303
|
}
|
|
304
304
|
}
|
|
305
305
|
), ce = [];
|
|
306
306
|
let ee;
|
|
307
307
|
for (; ee = X.nextNode(); ) ce.push(ee);
|
|
308
308
|
return ce;
|
|
309
|
-
},
|
|
309
|
+
}, f = (v) => {
|
|
310
310
|
const d = window.getSelection();
|
|
311
311
|
if (!d || d.rangeCount === 0) return !1;
|
|
312
312
|
const y = d.getRangeAt(0), $ = m(y.startContainer);
|
|
313
313
|
if (!$) return !1;
|
|
314
|
-
const X = $.tagName.toLowerCase() ===
|
|
315
|
-
if (
|
|
314
|
+
const X = $.tagName.toLowerCase() === v.toLowerCase();
|
|
315
|
+
if (v === "ul" || v === "ol") {
|
|
316
316
|
if ($.tagName === "LI") {
|
|
317
317
|
const le = $.parentElement;
|
|
318
318
|
if (!le) return !1;
|
|
319
319
|
const pe = document.createElement("p");
|
|
320
320
|
return pe.dataset.block = "true", pe.innerHTML = $.innerHTML, le.replaceWith(pe), C(pe), h(), !1;
|
|
321
321
|
}
|
|
322
|
-
const te = document.createElement(
|
|
322
|
+
const te = document.createElement(v), ne = document.createElement("li");
|
|
323
323
|
for (ne.dataset.block = "true"; $.firstChild; ) ne.appendChild($.firstChild);
|
|
324
324
|
return te.appendChild(ne), $.replaceWith(te), C(ne), h(), !0;
|
|
325
325
|
}
|
|
326
|
-
const ce = X ? "p" :
|
|
326
|
+
const ce = X ? "p" : v.toLowerCase(), ee = document.createElement(ce);
|
|
327
327
|
for (ce === "blockquote" && (ee.className = "rs-blockquote"), ee.dataset.block = "true"; $.firstChild; ) ee.appendChild($.firstChild);
|
|
328
|
-
return $.replaceWith(ee), C(ee), h(),
|
|
329
|
-
}, m = (
|
|
328
|
+
return $.replaceWith(ee), C(ee), h(), R(v);
|
|
329
|
+
}, m = (v) => {
|
|
330
330
|
const d = e;
|
|
331
331
|
if (!d) return null;
|
|
332
|
-
for (;
|
|
333
|
-
if (
|
|
334
|
-
|
|
332
|
+
for (; v && v !== d; ) {
|
|
333
|
+
if (v instanceof HTMLElement && v.dataset.block !== void 0) return v;
|
|
334
|
+
v = v.parentNode;
|
|
335
335
|
}
|
|
336
336
|
return null;
|
|
337
|
-
}, C = (
|
|
337
|
+
}, C = (v) => {
|
|
338
338
|
const d = document.createRange(), y = window.getSelection();
|
|
339
|
-
d.selectNodeContents(
|
|
339
|
+
d.selectNodeContents(v), d.collapse(!0), y?.removeAllRanges(), y?.addRange(d);
|
|
340
340
|
}, h = () => {
|
|
341
|
-
const
|
|
342
|
-
|
|
341
|
+
const v = e;
|
|
342
|
+
v && (v.querySelectorAll("[data-block]").forEach((d) => {
|
|
343
343
|
d.childNodes.forEach((y) => {
|
|
344
344
|
y.nodeType === 3 && !y.textContent?.trim() && y.remove();
|
|
345
345
|
});
|
|
346
|
-
}),
|
|
346
|
+
}), v.querySelectorAll("ul[data-block], ol[data-block]").forEach((d) => {
|
|
347
347
|
d.removeAttribute("data-block");
|
|
348
|
-
}),
|
|
348
|
+
}), v.querySelectorAll("li").forEach((d) => {
|
|
349
349
|
d.dataset.block = "true";
|
|
350
|
-
}),
|
|
350
|
+
}), v.querySelectorAll("[data-block] [data-block]").forEach((d) => {
|
|
351
351
|
const y = d.parentElement;
|
|
352
352
|
if (y) {
|
|
353
353
|
for (; d.firstChild; )
|
|
354
354
|
y.insertBefore(d.firstChild, d);
|
|
355
355
|
d.remove();
|
|
356
356
|
}
|
|
357
|
-
}),
|
|
357
|
+
}), v.querySelectorAll("li").forEach((d) => {
|
|
358
358
|
const y = d.parentElement;
|
|
359
359
|
if (!y || !["UL", "OL"].includes(y.tagName)) {
|
|
360
360
|
const $ = document.createElement("ul");
|
|
361
361
|
d.replaceWith($), $.appendChild(d);
|
|
362
362
|
}
|
|
363
|
-
}),
|
|
363
|
+
}), v.querySelectorAll("[data-block]").forEach((d) => {
|
|
364
364
|
!d.querySelector("img, iframe") && d.hasAttribute("style") && d.removeAttribute("style");
|
|
365
|
-
}),
|
|
366
|
-
}, L = (
|
|
365
|
+
}), v.normalize());
|
|
366
|
+
}, L = (v) => {
|
|
367
367
|
const d = t.value;
|
|
368
368
|
if (!d) return !1;
|
|
369
369
|
let y = d.startContainer;
|
|
@@ -371,11 +371,11 @@ const At = (e) => {
|
|
|
371
371
|
const $ = e;
|
|
372
372
|
if (!$) return !1;
|
|
373
373
|
for (; y && y !== $; ) {
|
|
374
|
-
if (y instanceof HTMLElement && y.tagName.toLowerCase() ===
|
|
374
|
+
if (y instanceof HTMLElement && y.tagName.toLowerCase() === v.toLowerCase()) return !0;
|
|
375
375
|
y = y.parentNode;
|
|
376
376
|
}
|
|
377
377
|
return !1;
|
|
378
|
-
},
|
|
378
|
+
}, R = (v) => {
|
|
379
379
|
const d = t.value;
|
|
380
380
|
if (!d) return !1;
|
|
381
381
|
let y = d.startContainer;
|
|
@@ -383,19 +383,19 @@ const At = (e) => {
|
|
|
383
383
|
const $ = e;
|
|
384
384
|
if (!$) return !1;
|
|
385
385
|
for (; y && y !== $; ) {
|
|
386
|
-
if (y instanceof HTMLElement && y.dataset.block !== void 0 && y.tagName.toLowerCase() ===
|
|
386
|
+
if (y instanceof HTMLElement && y.dataset.block !== void 0 && y.tagName.toLowerCase() === v.toLowerCase()) return !0;
|
|
387
387
|
y = y.parentNode;
|
|
388
388
|
}
|
|
389
389
|
return !1;
|
|
390
|
-
},
|
|
391
|
-
const
|
|
392
|
-
|
|
390
|
+
}, E = () => {
|
|
391
|
+
const v = e;
|
|
392
|
+
v && v.focus();
|
|
393
393
|
}, M = () => {
|
|
394
|
-
const
|
|
395
|
-
if (!
|
|
394
|
+
const v = e;
|
|
395
|
+
if (!v || !t.value || !v || !v.contains(t.value.commonAncestorContainer)) return;
|
|
396
396
|
const d = window.getSelection();
|
|
397
397
|
d && (d.removeAllRanges(), d.addRange(t.value));
|
|
398
|
-
},
|
|
398
|
+
}, B = () => l.value?.focusFirstButton?.(), z = (v) => {
|
|
399
399
|
const d = window.getSelection();
|
|
400
400
|
if (!d || d.rangeCount === 0) return;
|
|
401
401
|
const y = d.getRangeAt(0);
|
|
@@ -409,7 +409,7 @@ const At = (e) => {
|
|
|
409
409
|
X.selectNodeContents($), X.setEnd(y.startContainer, y.startOffset);
|
|
410
410
|
const ce = X.toString().length, ee = y.cloneRange();
|
|
411
411
|
ee.selectNodeContents($), ee.setEnd(y.endContainer, y.endOffset);
|
|
412
|
-
const te = ee.toString().length, ne = y.collapsed, le =
|
|
412
|
+
const te = ee.toString().length, ne = y.collapsed, le = v($);
|
|
413
413
|
$.replaceWith(le);
|
|
414
414
|
const pe = document.createTreeWalker(
|
|
415
415
|
le,
|
|
@@ -422,53 +422,53 @@ const At = (e) => {
|
|
|
422
422
|
!Pe && $e + et >= ce && (Pe = De, We = ce - $e), !Ee && $e + et >= te && (Ee = De, Re = te - $e), $e += et;
|
|
423
423
|
}
|
|
424
424
|
const Te = document.createRange();
|
|
425
|
-
Pe ? Te.setStart(Pe, We) : Te.setStart(le, 0), !ne && Ee ? Te.setEnd(Ee, Re) : Te.collapse(!0), d.removeAllRanges(), d.addRange(Te),
|
|
426
|
-
}, U = (
|
|
425
|
+
Pe ? Te.setStart(Pe, We) : Te.setStart(le, 0), !ne && Ee ? Te.setEnd(Ee, Re) : Te.collapse(!0), d.removeAllRanges(), d.addRange(Te), r(), h();
|
|
426
|
+
}, U = (v) => {
|
|
427
427
|
const d = e.parentElement?.querySelector("#editor-status");
|
|
428
|
-
d && (d.textContent =
|
|
429
|
-
}, oe = (
|
|
428
|
+
d && (d.textContent = v, setTimeout(() => d.textContent = "", 2e3));
|
|
429
|
+
}, oe = (v) => {
|
|
430
430
|
const d = e;
|
|
431
431
|
if (!d) return;
|
|
432
|
-
const y = document.createRange().createContextualFragment(
|
|
432
|
+
const y = document.createRange().createContextualFragment(v);
|
|
433
433
|
d.appendChild(y), h(), d.dispatchEvent(new Event("input", { bubbles: !0 }));
|
|
434
|
-
}, ue = (
|
|
434
|
+
}, ue = (v) => {
|
|
435
435
|
const d = window.getSelection();
|
|
436
436
|
if (!d || d.rangeCount === 0) {
|
|
437
|
-
oe(
|
|
437
|
+
oe(v);
|
|
438
438
|
return;
|
|
439
439
|
}
|
|
440
440
|
const y = d.getRangeAt(0), $ = m(y.startContainer);
|
|
441
441
|
if (!$) {
|
|
442
|
-
oe(
|
|
442
|
+
oe(v);
|
|
443
443
|
return;
|
|
444
444
|
}
|
|
445
|
-
$.insertAdjacentHTML("afterend",
|
|
446
|
-
}, re = (
|
|
445
|
+
$.insertAdjacentHTML("afterend", v), h(), e.dispatchEvent(new Event("input", { bubbles: !0 }));
|
|
446
|
+
}, re = (v) => {
|
|
447
447
|
const d = document.createElement("span");
|
|
448
448
|
d.className = "img-resizable", d.style.display = "inline-block", d.style.position = "relative", d.style.width = "100%";
|
|
449
449
|
const y = document.createElement("img");
|
|
450
|
-
y.src =
|
|
450
|
+
y.src = v, y.loading = "lazy";
|
|
451
451
|
const $ = document.createElement("span");
|
|
452
452
|
$.className = "resize-handle", d.append(y, $), T(d.outerHTML);
|
|
453
|
-
}, P = (
|
|
453
|
+
}, P = (v) => {
|
|
454
454
|
const d = document.createElement("span");
|
|
455
455
|
d.className = "img-resizable", d.style.display = "inline-block", d.style.position = "relative", d.style.width = "100%";
|
|
456
456
|
const y = document.createElement("img");
|
|
457
|
-
y.src =
|
|
457
|
+
y.src = v, y.alt = "", y.loading = "lazy";
|
|
458
458
|
const $ = document.createElement("span");
|
|
459
459
|
$.className = "resize-handle", d.append(y, $), ue(d.outerHTML);
|
|
460
|
-
},
|
|
461
|
-
const d =
|
|
460
|
+
}, S = (v) => {
|
|
461
|
+
const d = v.closest(".img-resizable");
|
|
462
462
|
if (!d) return;
|
|
463
463
|
const y = d.querySelector(".resize-handle");
|
|
464
464
|
if (!y || d.dataset.resizableInitialized === "true") return;
|
|
465
|
-
d.dataset.resizableInitialized = "true", d.style.display = "inline-block", d.style.position = "relative",
|
|
465
|
+
d.dataset.resizableInitialized = "true", d.style.display = "inline-block", d.style.position = "relative", v.style.display = "block", v.style.width = "100%", y.style.display = "none";
|
|
466
466
|
const $ = () => {
|
|
467
467
|
d.classList.add("active"), y.style.display = "block";
|
|
468
468
|
}, X = () => {
|
|
469
469
|
d.classList.remove("active"), y.style.display = "none";
|
|
470
470
|
};
|
|
471
|
-
|
|
471
|
+
v.addEventListener("click", (ne) => {
|
|
472
472
|
ne.stopPropagation(), e.querySelectorAll(".img-resizable.selected").forEach((le) => le.classList.remove("selected")), d.classList.add("selected"), $();
|
|
473
473
|
}), document.addEventListener("click", (ne) => {
|
|
474
474
|
const le = ne.target;
|
|
@@ -489,17 +489,17 @@ const At = (e) => {
|
|
|
489
489
|
document.addEventListener("mousemove", le), document.addEventListener("mouseup", pe), document.addEventListener("touchmove", le, { passive: !1 }), document.addEventListener("touchend", pe);
|
|
490
490
|
};
|
|
491
491
|
y.addEventListener("mousedown", te), y.addEventListener("touchstart", te, { passive: !1 });
|
|
492
|
-
}, x = (
|
|
493
|
-
if (
|
|
492
|
+
}, x = (v) => {
|
|
493
|
+
if (v.key !== "Backspace" && v.key !== "Delete") return;
|
|
494
494
|
const d = e.querySelector(".img-resizable.selected");
|
|
495
495
|
if (!d) return;
|
|
496
|
-
|
|
496
|
+
v.preventDefault();
|
|
497
497
|
const y = d.closest("p[data-block]");
|
|
498
498
|
y && (d.remove(), y.replaceChildren(document.createElement("br")), C(y));
|
|
499
499
|
};
|
|
500
500
|
e.addEventListener("keydown", x, { capture: !0 });
|
|
501
|
-
const V = (
|
|
502
|
-
const d =
|
|
501
|
+
const V = (v) => {
|
|
502
|
+
const d = v.match(
|
|
503
503
|
/(?:youtube\.com\/(?:watch\?v=|shorts\/|embed\/)|youtu\.be\/)([a-zA-Z0-9_-]{11})/
|
|
504
504
|
);
|
|
505
505
|
if (!d) return;
|
|
@@ -523,15 +523,15 @@ const At = (e) => {
|
|
|
523
523
|
aspectRatio: "16/9"
|
|
524
524
|
}
|
|
525
525
|
);
|
|
526
|
-
}, g = (
|
|
527
|
-
if (
|
|
526
|
+
}, g = (v) => {
|
|
527
|
+
if (v.key !== "Backspace" && v.key !== "Delete") return;
|
|
528
528
|
const d = window.getSelection();
|
|
529
529
|
if (!d || d.rangeCount === 0) return;
|
|
530
530
|
const y = d.getRangeAt(0), $ = m(y.startContainer);
|
|
531
531
|
if (!$) return;
|
|
532
532
|
const X = $.querySelector("iframe");
|
|
533
|
-
X && (
|
|
534
|
-
}, T = (
|
|
533
|
+
X && (v.preventDefault(), v.stopPropagation(), X.remove(), $.removeAttribute("style"), $.replaceChildren(document.createElement("br")), C($));
|
|
534
|
+
}, T = (v, d) => {
|
|
535
535
|
const y = e;
|
|
536
536
|
if (!y) return;
|
|
537
537
|
const $ = window.getSelection();
|
|
@@ -543,23 +543,23 @@ const At = (e) => {
|
|
|
543
543
|
const ce = X && !X.textContent?.trim() && X.querySelectorAll("img, iframe").length === 0;
|
|
544
544
|
let ee = null;
|
|
545
545
|
if (ce && X)
|
|
546
|
-
d && Object.assign(X.style, d), X.innerHTML =
|
|
546
|
+
d && Object.assign(X.style, d), X.innerHTML = v, ee = document.createElement("p"), ee.dataset.block = "true", ee.replaceChildren(document.createElement("br")), X.after(ee);
|
|
547
547
|
else {
|
|
548
548
|
const te = document.createElement("p");
|
|
549
|
-
te.dataset.block = "true", d && Object.assign(te.style, d), te.innerHTML =
|
|
549
|
+
te.dataset.block = "true", d && Object.assign(te.style, d), te.innerHTML = v;
|
|
550
550
|
const ne = document.createElement("p");
|
|
551
551
|
ne.dataset.block = "true", ne.replaceChildren(document.createElement("br")), X ? (X.after(te), te.after(ne)) : y.append(te, ne), ee = ne;
|
|
552
552
|
}
|
|
553
|
-
y.querySelectorAll(".img-resizable img").forEach((te) =>
|
|
554
|
-
},
|
|
555
|
-
const d =
|
|
553
|
+
y.querySelectorAll(".img-resizable img").forEach((te) => S(te)), ee && C(ee), h(), y.dispatchEvent(new Event("input", { bubbles: !0 }));
|
|
554
|
+
}, A = (v) => {
|
|
555
|
+
const d = v.match(/(?:youtube\.com\/(?:watch\?v=|shorts\/|embed\/)|youtu\.be\/)([a-zA-Z0-9_-]{11})/);
|
|
556
556
|
return d && typeof d[1] == "string" ? d[1] : null;
|
|
557
|
-
}, F = async (
|
|
558
|
-
const d =
|
|
557
|
+
}, F = async (v) => {
|
|
558
|
+
const d = v.clipboardData?.items;
|
|
559
559
|
if (d && o) {
|
|
560
560
|
for (const ne of d)
|
|
561
561
|
if (ne.type.startsWith("image/")) {
|
|
562
|
-
|
|
562
|
+
v.preventDefault();
|
|
563
563
|
const le = ne.getAsFile();
|
|
564
564
|
if (!le) return;
|
|
565
565
|
try {
|
|
@@ -571,11 +571,11 @@ const At = (e) => {
|
|
|
571
571
|
return;
|
|
572
572
|
}
|
|
573
573
|
}
|
|
574
|
-
const y =
|
|
574
|
+
const y = v.clipboardData?.getData("text/plain")?.trim();
|
|
575
575
|
if (!y) return;
|
|
576
|
-
const $ =
|
|
576
|
+
const $ = A(y), X = H(y);
|
|
577
577
|
if (!$ && !X) return;
|
|
578
|
-
|
|
578
|
+
v.preventDefault();
|
|
579
579
|
const ce = window.getSelection();
|
|
580
580
|
if (!ce || ce.rangeCount === 0) return;
|
|
581
581
|
const ee = ce.getRangeAt(0), te = m(ee.startContainer);
|
|
@@ -585,33 +585,33 @@ const At = (e) => {
|
|
|
585
585
|
}
|
|
586
586
|
if (X) {
|
|
587
587
|
if (!await O(y)) {
|
|
588
|
-
|
|
588
|
+
s?.(i);
|
|
589
589
|
return;
|
|
590
590
|
}
|
|
591
591
|
re(y);
|
|
592
592
|
}
|
|
593
|
-
}, H = (
|
|
593
|
+
}, H = (v) => {
|
|
594
594
|
try {
|
|
595
|
-
const d = new URL(
|
|
595
|
+
const d = new URL(v);
|
|
596
596
|
return /\.(png|jpe?g|gif|webp|svg|avif)$/i.test(d.pathname);
|
|
597
597
|
} catch {
|
|
598
598
|
return !1;
|
|
599
599
|
}
|
|
600
|
-
}, O = (
|
|
600
|
+
}, O = (v) => i ? new Promise((d) => {
|
|
601
601
|
const y = new Image();
|
|
602
602
|
y.onload = () => {
|
|
603
603
|
const $ = y.naturalWidth >= i.width || y.naturalHeight >= i.height;
|
|
604
604
|
d($);
|
|
605
|
-
}, y.onerror = () => d(!1), y.src =
|
|
606
|
-
}) : Promise.resolve(!0), I = (
|
|
605
|
+
}, y.onerror = () => d(!1), y.src = v;
|
|
606
|
+
}) : Promise.resolve(!0), I = (v) => {
|
|
607
607
|
const d = window.getSelection();
|
|
608
608
|
if (!d || d.rangeCount === 0 || d.isCollapsed) return;
|
|
609
609
|
const y = d.getRangeAt(0), $ = document.createElement("a");
|
|
610
|
-
$.href =
|
|
610
|
+
$.href = v, $.target = "_blank", $.rel = "noopener noreferrer", $.append(y.extractContents()), y.insertNode($), y.selectNode($), d.removeAllRanges(), d.addRange(y), r(), h();
|
|
611
611
|
}, D = () => {
|
|
612
|
-
const
|
|
613
|
-
if (!
|
|
614
|
-
let y =
|
|
612
|
+
const v = window.getSelection();
|
|
613
|
+
if (!v || v.rangeCount === 0) return;
|
|
614
|
+
let y = v.getRangeAt(0).commonAncestorContainer;
|
|
615
615
|
for (y.nodeType === 3 && (y = y.parentNode); y && y.nodeName !== "A"; )
|
|
616
616
|
y = y.parentNode;
|
|
617
617
|
if (!y) return;
|
|
@@ -624,16 +624,16 @@ const At = (e) => {
|
|
|
624
624
|
};
|
|
625
625
|
return e.addEventListener("keydown", g, { capture: !0 }), e.addEventListener("paste", F), {
|
|
626
626
|
toggleInline: c,
|
|
627
|
-
toggleBlock:
|
|
627
|
+
toggleBlock: f,
|
|
628
628
|
normalize: h,
|
|
629
629
|
rootElement: e,
|
|
630
|
-
saveSelection:
|
|
630
|
+
saveSelection: r,
|
|
631
631
|
restoreSelection: M,
|
|
632
632
|
isInlineActive: L,
|
|
633
|
-
isBlockActive:
|
|
634
|
-
focus:
|
|
633
|
+
isBlockActive: R,
|
|
634
|
+
focus: E,
|
|
635
635
|
toolbarRef: l,
|
|
636
|
-
focusFirstToolbarButton:
|
|
636
|
+
focusFirstToolbarButton: B,
|
|
637
637
|
replaceCurrentBlock: z,
|
|
638
638
|
buttons: a,
|
|
639
639
|
announce: U,
|
|
@@ -661,50 +661,50 @@ const At = (e) => {
|
|
|
661
661
|
onImageResolutionError: {}
|
|
662
662
|
},
|
|
663
663
|
setup(e, { expose: n }) {
|
|
664
|
-
const t = e, a = k(""), o = k(null), i = (
|
|
665
|
-
if (
|
|
666
|
-
switch (
|
|
664
|
+
const t = e, a = k(""), o = k(null), i = (f) => {
|
|
665
|
+
if (f.ctrlKey || f.metaKey)
|
|
666
|
+
switch (f.altKey && f.key === "F10" && (f.preventDefault(), t.editor?.restoreSelection(), t.editor?.focusFirstToolbarButton()), f.key.toLowerCase()) {
|
|
667
667
|
case "b":
|
|
668
|
-
|
|
668
|
+
f.preventDefault(), t.editor?.restoreSelection(), t.editor?.toggleInline("strong"), t.editor?.focus(), t.editor?.announce(t.editor.isInlineActive("strong") ? "Bold enabled" : "Bold disabled");
|
|
669
669
|
break;
|
|
670
670
|
case "i":
|
|
671
|
-
|
|
671
|
+
f.preventDefault(), t.editor?.restoreSelection(), t.editor?.toggleInline("em"), t.editor?.focus(), t.editor?.announce(t.editor.isInlineActive("em") ? "Italic enabled" : "Italic disabled");
|
|
672
672
|
break;
|
|
673
673
|
case "1":
|
|
674
|
-
|
|
674
|
+
f.altKey && (f.preventDefault(), t.editor?.restoreSelection(), t.editor?.toggleBlock("h1"), t.editor?.focus(), t.editor?.announce(t.editor.isBlockActive("h1") ? "Heading level 1 enabled" : "Heading level 1 disabled"));
|
|
675
675
|
break;
|
|
676
676
|
}
|
|
677
|
-
},
|
|
678
|
-
const
|
|
679
|
-
if (!
|
|
677
|
+
}, s = () => {
|
|
678
|
+
const f = window.getSelection();
|
|
679
|
+
if (!f || f.rangeCount === 0) return;
|
|
680
680
|
const m = o.value;
|
|
681
681
|
if (!m) return;
|
|
682
|
-
const C =
|
|
682
|
+
const C = f.getRangeAt(0);
|
|
683
683
|
m.contains(C.commonAncestorContainer) && t.editor?.saveSelection();
|
|
684
684
|
}, l = () => {
|
|
685
|
-
const
|
|
686
|
-
if (!
|
|
687
|
-
const m =
|
|
685
|
+
const f = window.getSelection();
|
|
686
|
+
if (!f || f.rangeCount === 0) return;
|
|
687
|
+
const m = f.anchorNode;
|
|
688
688
|
if (!m) return;
|
|
689
689
|
const C = (m instanceof Element ? m : m.parentElement)?.closest("[data-block]");
|
|
690
|
-
C &&
|
|
691
|
-
},
|
|
692
|
-
const m =
|
|
693
|
-
(m === "" || h) && !C ?
|
|
694
|
-
}, c = (
|
|
690
|
+
C && r(C);
|
|
691
|
+
}, r = (f) => {
|
|
692
|
+
const m = f.textContent?.replace(/\u00A0/g, "").trim() ?? "", C = f.querySelector("img, iframe"), h = f.innerHTML === "<br>";
|
|
693
|
+
(m === "" || h) && !C ? f.dataset.empty = "true" : f.dataset.empty = "false";
|
|
694
|
+
}, c = (f, m = !1) => {
|
|
695
695
|
const C = window.getSelection();
|
|
696
696
|
if (!C || C.rangeCount === 0) return;
|
|
697
697
|
const h = C.getRangeAt(0);
|
|
698
698
|
if (h.deleteContents(), m) {
|
|
699
|
-
const
|
|
700
|
-
h.insertNode(
|
|
699
|
+
const R = document.createTextNode(f);
|
|
700
|
+
h.insertNode(R), h.setStartAfter(R), h.collapse(!0), C.removeAllRanges(), C.addRange(h);
|
|
701
701
|
return;
|
|
702
702
|
}
|
|
703
|
-
const L = h.createContextualFragment(
|
|
703
|
+
const L = h.createContextualFragment(f);
|
|
704
704
|
h.insertNode(L), C.collapseToEnd();
|
|
705
|
-
}, u = (
|
|
706
|
-
|
|
707
|
-
const m =
|
|
705
|
+
}, u = (f) => {
|
|
706
|
+
f.preventDefault();
|
|
707
|
+
const m = f.clipboardData?.getData("text/plain");
|
|
708
708
|
if (!m) return;
|
|
709
709
|
const C = window.getSelection();
|
|
710
710
|
if (!C || C.rangeCount === 0) return;
|
|
@@ -713,14 +713,14 @@ const At = (e) => {
|
|
|
713
713
|
(h.startContainer instanceof Element ? h.startContainer : h.startContainer.parentElement)?.closest("[data-block]") ? c(m.trim(), !0) : c(`<p data-block>${m.trim()}</p>`, !1), t.editor?.saveSelection(), L.dispatchEvent(new Event("input", { bubbles: !0 }));
|
|
714
714
|
};
|
|
715
715
|
return ve(() => {
|
|
716
|
-
document.addEventListener("selectionchange",
|
|
717
|
-
const
|
|
718
|
-
|
|
719
|
-
|
|
716
|
+
document.addEventListener("selectionchange", s);
|
|
717
|
+
const f = o.value;
|
|
718
|
+
f && f.querySelectorAll("[data-block]").forEach((m) => {
|
|
719
|
+
r(m);
|
|
720
720
|
});
|
|
721
|
-
}), Be(() => document.removeEventListener("selectionchange",
|
|
721
|
+
}), Be(() => document.removeEventListener("selectionchange", s)), n({
|
|
722
722
|
getRoot: () => o
|
|
723
|
-
}), (
|
|
723
|
+
}), (f, m) => (p(), b(de, null, [
|
|
724
724
|
w("div", {
|
|
725
725
|
ref_key: "rootRef",
|
|
726
726
|
ref: o,
|
|
@@ -1046,12 +1046,8 @@ const At = (e) => {
|
|
|
1046
1046
|
paths: [
|
|
1047
1047
|
{
|
|
1048
1048
|
type: "path",
|
|
1049
|
-
d: "
|
|
1050
|
-
fill: "
|
|
1051
|
-
stroke: "currentColor",
|
|
1052
|
-
"stroke-width": 1.5,
|
|
1053
|
-
"stroke-linecap": "round",
|
|
1054
|
-
"stroke-linejoin": "round"
|
|
1049
|
+
d: "M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z",
|
|
1050
|
+
fill: "currentColor"
|
|
1055
1051
|
}
|
|
1056
1052
|
]
|
|
1057
1053
|
}, S1 = {
|
|
@@ -2409,19 +2405,19 @@ const At = (e) => {
|
|
|
2409
2405
|
buttons: {}
|
|
2410
2406
|
},
|
|
2411
2407
|
setup(e, { expose: n }) {
|
|
2412
|
-
const t = e, a = at + Qa, o = k(""), i = k(!1),
|
|
2413
|
-
let
|
|
2414
|
-
const
|
|
2415
|
-
c.value =
|
|
2408
|
+
const t = e, a = at + Qa, o = k(""), i = k(!1), s = k(!1), l = k([]), r = k(null), c = k({}), u = k(null);
|
|
2409
|
+
let f = !1, m = null, C = null, h = null, L = 0;
|
|
2410
|
+
const R = () => {
|
|
2411
|
+
c.value = E();
|
|
2416
2412
|
};
|
|
2417
|
-
Q(
|
|
2413
|
+
Q(s, async (g) => {
|
|
2418
2414
|
if (!g) {
|
|
2419
2415
|
h?.(), h = null, C?.disconnect(), C = null;
|
|
2420
2416
|
return;
|
|
2421
2417
|
}
|
|
2422
|
-
await xe(), await xe(),
|
|
2418
|
+
await xe(), await xe(), R(), r.value && (C = new ResizeObserver(R), C.observe(r.value)), h = M(R);
|
|
2423
2419
|
}, { flush: "post" });
|
|
2424
|
-
const
|
|
2420
|
+
const E = () => {
|
|
2425
2421
|
if (!t.editor?.rootElement) return {};
|
|
2426
2422
|
let T = null;
|
|
2427
2423
|
if (i.value && m)
|
|
@@ -2433,34 +2429,34 @@ const At = (e) => {
|
|
|
2433
2429
|
T = d.getRangeAt(0);
|
|
2434
2430
|
}
|
|
2435
2431
|
if (!T) return {};
|
|
2436
|
-
const
|
|
2437
|
-
if (!
|
|
2438
|
-
const F =
|
|
2432
|
+
const A = T.getClientRects().item(0) ?? T.getBoundingClientRect();
|
|
2433
|
+
if (!A || A.width === 0 && A.height === 0) return {};
|
|
2434
|
+
const F = r.value;
|
|
2439
2435
|
if (!F) return {};
|
|
2440
|
-
const H = F.getBoundingClientRect(), O = H.width, I =
|
|
2436
|
+
const H = F.getBoundingClientRect(), O = H.width, I = A.left + A.width / 2, D = Math.max(
|
|
2441
2437
|
O / 2 + at,
|
|
2442
2438
|
Math.min(I, window.innerWidth - O / 2 - at)
|
|
2443
|
-
),
|
|
2444
|
-
return
|
|
2439
|
+
), v = A.top - H.height - a;
|
|
2440
|
+
return v < 0 ? {} : {
|
|
2445
2441
|
position: "fixed",
|
|
2446
2442
|
left: `${D}px`,
|
|
2447
|
-
top: `${
|
|
2443
|
+
top: `${v}px`
|
|
2448
2444
|
};
|
|
2449
2445
|
}, M = (g) => {
|
|
2450
2446
|
let T = 0;
|
|
2451
|
-
const
|
|
2447
|
+
const A = () => {
|
|
2452
2448
|
cancelAnimationFrame(T), T = requestAnimationFrame(g);
|
|
2453
|
-
}, F =
|
|
2449
|
+
}, F = A, H = A;
|
|
2454
2450
|
return window.addEventListener("scroll", F, { capture: !0, passive: !0 }), window.addEventListener("resize", H, { passive: !0 }), () => {
|
|
2455
2451
|
cancelAnimationFrame(T), window.removeEventListener("scroll", F, { capture: !0 }), window.removeEventListener("resize", H);
|
|
2456
2452
|
};
|
|
2457
|
-
},
|
|
2453
|
+
}, B = (g, T) => {
|
|
2458
2454
|
g && (l.value[T] = g);
|
|
2459
2455
|
};
|
|
2460
|
-
Q(
|
|
2456
|
+
Q(s, () => {
|
|
2461
2457
|
l.value = [];
|
|
2462
2458
|
});
|
|
2463
|
-
const z =
|
|
2459
|
+
const z = _(() => [
|
|
2464
2460
|
{
|
|
2465
2461
|
key: "strong",
|
|
2466
2462
|
label: "bold",
|
|
@@ -2522,34 +2518,34 @@ const At = (e) => {
|
|
|
2522
2518
|
g.removeLink(), g.focus();
|
|
2523
2519
|
return;
|
|
2524
2520
|
}
|
|
2525
|
-
|
|
2521
|
+
f = !0, i.value = !0, s.value = !0, xe(() => {
|
|
2526
2522
|
u.value?.focus(), requestAnimationFrame(() => {
|
|
2527
|
-
|
|
2523
|
+
f = !1;
|
|
2528
2524
|
});
|
|
2529
2525
|
}), g.announce(g.isInlineActive("strong") ? "Link enabled" : "Link disabled");
|
|
2530
2526
|
},
|
|
2531
2527
|
isActive: (g) => g.isInlineActive("a")
|
|
2532
2528
|
}
|
|
2533
|
-
]), U =
|
|
2529
|
+
]), U = _(() => [
|
|
2534
2530
|
...z.value,
|
|
2535
2531
|
...t.editor?.buttons ?? []
|
|
2536
2532
|
]), oe = async () => {
|
|
2537
2533
|
await xe(), l.value[0]?.focus();
|
|
2538
2534
|
}, ue = (g) => {
|
|
2539
|
-
const T = l.value,
|
|
2535
|
+
const T = l.value, A = T.indexOf(document.activeElement);
|
|
2540
2536
|
if (g.key === "ArrowRight") {
|
|
2541
2537
|
g.preventDefault();
|
|
2542
|
-
const F =
|
|
2538
|
+
const F = A < T.length - 1 ? A + 1 : 0;
|
|
2543
2539
|
T[F]?.focus();
|
|
2544
2540
|
}
|
|
2545
2541
|
if (g.key === "ArrowLeft") {
|
|
2546
2542
|
g.preventDefault();
|
|
2547
|
-
const F =
|
|
2543
|
+
const F = A > 0 ? A - 1 : T.length - 1;
|
|
2548
2544
|
T[F]?.focus();
|
|
2549
2545
|
}
|
|
2550
2546
|
if (g.key === "Home" && (g.preventDefault(), T[0]?.focus()), g.key === "End" && (g.preventDefault(), T[T.length - 1]?.focus()), g.key === "Escape") {
|
|
2551
2547
|
if (g.preventDefault(), i.value) {
|
|
2552
|
-
|
|
2548
|
+
S(), t.editor?.focus();
|
|
2553
2549
|
return;
|
|
2554
2550
|
}
|
|
2555
2551
|
t.editor?.restoreSelection(), t.editor?.focus();
|
|
@@ -2563,36 +2559,36 @@ const At = (e) => {
|
|
|
2563
2559
|
T.contains(O) && !g.isCollapsed && (m = H.cloneRange());
|
|
2564
2560
|
}
|
|
2565
2561
|
if (i.value) {
|
|
2566
|
-
|
|
2562
|
+
s.value = !0;
|
|
2567
2563
|
return;
|
|
2568
2564
|
}
|
|
2569
2565
|
if (!g || g.rangeCount === 0) {
|
|
2570
|
-
|
|
2566
|
+
s.value = !1;
|
|
2571
2567
|
return;
|
|
2572
2568
|
}
|
|
2573
|
-
const
|
|
2574
|
-
|
|
2569
|
+
const A = g.getRangeAt(0), F = A.commonAncestorContainer.nodeType === 3 ? A.commonAncestorContainer.parentNode : A.commonAncestorContainer;
|
|
2570
|
+
s.value = T.contains(F) && !g.isCollapsed;
|
|
2575
2571
|
});
|
|
2576
2572
|
}, P = () => {
|
|
2577
2573
|
o.value.trim() && (t.editor?.restoreSelection(), t.editor?.applyLink(o.value), t.editor?.rootElement?.dispatchEvent(
|
|
2578
2574
|
new Event("input", { bubbles: !0 })
|
|
2579
2575
|
), o.value = "", i.value = !1, t.editor?.focus());
|
|
2580
|
-
},
|
|
2576
|
+
}, S = () => {
|
|
2581
2577
|
i.value = !1, o.value = "";
|
|
2582
2578
|
}, x = (g) => {
|
|
2583
2579
|
g.action(t.editor);
|
|
2584
2580
|
}, V = (g) => {
|
|
2585
|
-
if (
|
|
2586
|
-
const T = g.target,
|
|
2581
|
+
if (f) return;
|
|
2582
|
+
const T = g.target, A = r.value, F = t.editor?.rootElement;
|
|
2587
2583
|
if (i.value) {
|
|
2588
|
-
const I =
|
|
2584
|
+
const I = A?.contains(T), D = F?.contains(T);
|
|
2589
2585
|
if (I || D) return;
|
|
2590
|
-
|
|
2586
|
+
S(), s.value = !1;
|
|
2591
2587
|
return;
|
|
2592
2588
|
}
|
|
2593
|
-
if (!
|
|
2594
|
-
const H =
|
|
2595
|
-
H || O || (
|
|
2589
|
+
if (!A || !F) return;
|
|
2590
|
+
const H = A.contains(T), O = F.contains(T);
|
|
2591
|
+
H || O || (s.value = !1);
|
|
2596
2592
|
};
|
|
2597
2593
|
return ve(() => {
|
|
2598
2594
|
document.addEventListener("selectionchange", () => {
|
|
@@ -2605,10 +2601,10 @@ const At = (e) => {
|
|
|
2605
2601
|
}), (g, T) => (p(), ae(Fe, { to: "body" }, [
|
|
2606
2602
|
K(Ae, { name: "tooltip-fade" }, {
|
|
2607
2603
|
default: J(() => [
|
|
2608
|
-
|
|
2604
|
+
s.value ? (p(), b("div", {
|
|
2609
2605
|
key: 0,
|
|
2610
2606
|
ref_key: "toolbarRef",
|
|
2611
|
-
ref:
|
|
2607
|
+
ref: r,
|
|
2612
2608
|
class: "toolbar",
|
|
2613
2609
|
role: "toolbar",
|
|
2614
2610
|
"aria-label": "Formatting options",
|
|
@@ -2622,10 +2618,10 @@ const At = (e) => {
|
|
|
2622
2618
|
_e(w("input", {
|
|
2623
2619
|
ref_key: "linkInputRef",
|
|
2624
2620
|
ref: u,
|
|
2625
|
-
"onUpdate:modelValue": T[0] || (T[0] = (
|
|
2621
|
+
"onUpdate:modelValue": T[0] || (T[0] = (A) => o.value = A),
|
|
2626
2622
|
type: "text",
|
|
2627
2623
|
placeholder: "https://...",
|
|
2628
|
-
onBlur: T[1] || (T[1] = se((
|
|
2624
|
+
onBlur: T[1] || (T[1] = se((A) => i.value = !1, ["prevent"])),
|
|
2629
2625
|
onKeydown: ye(P, ["enter"]),
|
|
2630
2626
|
onMousedown: T[2] || (T[2] = se(() => {
|
|
2631
2627
|
}, ["stop"]))
|
|
@@ -2637,21 +2633,21 @@ const At = (e) => {
|
|
|
2637
2633
|
onMousedown: T[3] || (T[3] = se(() => {
|
|
2638
2634
|
}, ["prevent"]))
|
|
2639
2635
|
}, "Ok ", 32)
|
|
2640
|
-
])) : (p(!0), b(de, { key: 0 }, he(U.value, (
|
|
2641
|
-
key:
|
|
2636
|
+
])) : (p(!0), b(de, { key: 0 }, he(U.value, (A, F) => (p(), b("button", {
|
|
2637
|
+
key: A.key ?? F,
|
|
2642
2638
|
type: "button",
|
|
2643
2639
|
ref_for: !0,
|
|
2644
|
-
ref: (H) =>
|
|
2645
|
-
class: fe({ "is-active":
|
|
2646
|
-
"aria-pressed":
|
|
2647
|
-
onClick: (H) => x(
|
|
2648
|
-
"aria-label":
|
|
2640
|
+
ref: (H) => B(H, F),
|
|
2641
|
+
class: fe({ "is-active": A.isActive?.(t.editor) }),
|
|
2642
|
+
"aria-pressed": A.isActive?.(t.editor),
|
|
2643
|
+
onClick: (H) => x(A),
|
|
2644
|
+
"aria-label": A.ariaLabel
|
|
2649
2645
|
}, [
|
|
2650
|
-
|
|
2646
|
+
A.type === "icon" ? (p(), ae(Ce, {
|
|
2651
2647
|
key: 0,
|
|
2652
|
-
name:
|
|
2653
|
-
size:
|
|
2654
|
-
}, null, 8, ["name", "size"])) : (p(), b("span", Ga, j(
|
|
2648
|
+
name: A.label,
|
|
2649
|
+
size: A.size ?? 14
|
|
2650
|
+
}, null, 8, ["name", "size"])) : (p(), b("span", Ga, j(A.label), 1))
|
|
2655
2651
|
], 10, Xa))), 128))
|
|
2656
2652
|
], 44, Ya)) : q("", !0)
|
|
2657
2653
|
]),
|
|
@@ -2675,38 +2671,38 @@ const At = (e) => {
|
|
|
2675
2671
|
}),
|
|
2676
2672
|
emits: ["update:modelValue"],
|
|
2677
2673
|
setup(e, { expose: n }) {
|
|
2678
|
-
const t = ke(e, "modelValue"), a = e, o = ge(), i = k(),
|
|
2674
|
+
const t = ke(e, "modelValue"), a = e, o = ge(), i = k(), s = k(null), l = k(null);
|
|
2679
2675
|
return Q(
|
|
2680
2676
|
() => t.value,
|
|
2681
|
-
(
|
|
2677
|
+
(r) => {
|
|
2682
2678
|
const c = l.value?.getRoot()?.value;
|
|
2683
|
-
c && c.innerHTML !==
|
|
2679
|
+
c && c.innerHTML !== r && (c.innerHTML = r, s.value?.normalize());
|
|
2684
2680
|
},
|
|
2685
2681
|
{ immediate: !0 }
|
|
2686
2682
|
), Q(
|
|
2687
2683
|
() => l.value,
|
|
2688
2684
|
() => {
|
|
2689
|
-
const
|
|
2690
|
-
!
|
|
2685
|
+
const r = l.value?.getRoot()?.value;
|
|
2686
|
+
!r || !t.value || t.value.trim().length === 0 || r.innerHTML !== t.value && (r.innerHTML = t.value, s.value?.normalize());
|
|
2691
2687
|
},
|
|
2692
2688
|
{ immediate: !0 }
|
|
2693
2689
|
), ve(() => {
|
|
2694
2690
|
const c = l.value?.getRoot()?.value;
|
|
2695
2691
|
if (!c) return;
|
|
2696
|
-
|
|
2692
|
+
s.value = u1(c, {
|
|
2697
2693
|
buttons: a.buttons ?? [],
|
|
2698
2694
|
minImageResolution: a.minImageResolution,
|
|
2699
2695
|
onImageResolutionError: a.onImageResolutionError
|
|
2700
|
-
}),
|
|
2696
|
+
}), s.value && (s.value.toolbarRef = i);
|
|
2701
2697
|
const u = () => t.value = c.innerHTML;
|
|
2702
2698
|
c.addEventListener("input", u), Be(() => c.removeEventListener("input", u));
|
|
2703
|
-
}), He("announce", (
|
|
2704
|
-
editor:
|
|
2705
|
-
}), (
|
|
2699
|
+
}), He("announce", (r) => s.value?.announce(r)), n({
|
|
2700
|
+
editor: s
|
|
2701
|
+
}), (r, c) => (p(), b("section", an, [
|
|
2706
2702
|
K(p1, {
|
|
2707
2703
|
ref_key: "contentRef",
|
|
2708
2704
|
ref: l,
|
|
2709
|
-
editor:
|
|
2705
|
+
editor: s.value,
|
|
2710
2706
|
"editor-id": N(o),
|
|
2711
2707
|
"aria-label": e.ariaLabel,
|
|
2712
2708
|
"write-here-text": e.writeHereText,
|
|
@@ -2716,7 +2712,7 @@ const At = (e) => {
|
|
|
2716
2712
|
K(tn, {
|
|
2717
2713
|
ref_key: "toolbarRef",
|
|
2718
2714
|
ref: i,
|
|
2719
|
-
editor:
|
|
2715
|
+
editor: s.value,
|
|
2720
2716
|
"editor-id": N(o)
|
|
2721
2717
|
}, null, 8, ["editor", "editor-id"])
|
|
2722
2718
|
]));
|
|
@@ -2766,23 +2762,23 @@ const nn = ["tabindex", "aria-label", "aria-describedby", "aria-busy", "aria-dis
|
|
|
2766
2762
|
}),
|
|
2767
2763
|
emits: /* @__PURE__ */ ie(["select", "upload", "remove"], ["update:modelValue"]),
|
|
2768
2764
|
setup(e, { emit: n }) {
|
|
2769
|
-
const t = ke(e, "modelValue"), a = e, o = n, i = k(0),
|
|
2765
|
+
const t = ke(e, "modelValue"), a = e, o = n, i = k(0), s = k(""), l = k(!1), r = ge(), c = k(), u = _(() => t.value), f = _(() => a.maxSize === 1 / 0 ? "Unlimited" : re(a.maxSize)), m = _(() => !a.disabled && (a.multiple || t.value.length === 0)), C = _(() => u.value.some((x) => x.status === "uploading")), h = () => m.value && c.value?.click(), L = () => {
|
|
2770
2766
|
a.disabled || (i.value++, l.value = !0);
|
|
2771
|
-
},
|
|
2767
|
+
}, R = () => {
|
|
2772
2768
|
i.value = Math.max(0, i.value - 1), i.value === 0 && (l.value = !1);
|
|
2773
|
-
},
|
|
2769
|
+
}, E = (x) => {
|
|
2774
2770
|
if (!a.disabled && !(!a.multiple && t.value.length > 0) && (i.value = 0, l.value = !1, !!x.dataTransfer)) {
|
|
2775
2771
|
if (!a.multiple && x.dataTransfer?.files.length) {
|
|
2776
2772
|
const V = x.dataTransfer.files[0];
|
|
2777
|
-
|
|
2773
|
+
B([V]);
|
|
2778
2774
|
return;
|
|
2779
2775
|
}
|
|
2780
|
-
|
|
2776
|
+
B(Array.from(x.dataTransfer.files));
|
|
2781
2777
|
}
|
|
2782
2778
|
}, M = (x) => {
|
|
2783
2779
|
const V = x.target;
|
|
2784
|
-
V.files && (
|
|
2785
|
-
},
|
|
2780
|
+
V.files && (B(Array.from(V.files)), V.value = "");
|
|
2781
|
+
}, B = (x) => {
|
|
2786
2782
|
const V = [];
|
|
2787
2783
|
for (const T of x) {
|
|
2788
2784
|
if (u.value.length + V.length >= a.maxFiles) break;
|
|
@@ -2806,14 +2802,14 @@ const nn = ["tabindex", "aria-label", "aria-describedby", "aria-busy", "aria-dis
|
|
|
2806
2802
|
V.signal.addEventListener("abort", g);
|
|
2807
2803
|
const T = {
|
|
2808
2804
|
signal: V.signal,
|
|
2809
|
-
onProgress: (
|
|
2810
|
-
x.progress =
|
|
2805
|
+
onProgress: (A) => {
|
|
2806
|
+
x.progress = A, ue();
|
|
2811
2807
|
},
|
|
2812
2808
|
done: () => {
|
|
2813
2809
|
x.status = "success", x.progress = 100, x.controller = void 0, P(`Finished uploading ${x.file.name}`), ue();
|
|
2814
2810
|
},
|
|
2815
|
-
fail: (
|
|
2816
|
-
x.status = "error", x.error =
|
|
2811
|
+
fail: (A) => {
|
|
2812
|
+
x.status = "error", x.error = A, x.controller = void 0, P(`Failed to upload ${x.file.name}: ${A}`), ue();
|
|
2817
2813
|
}
|
|
2818
2814
|
};
|
|
2819
2815
|
o("upload", x, T);
|
|
@@ -2828,10 +2824,10 @@ const nn = ["tabindex", "aria-label", "aria-describedby", "aria-busy", "aria-dis
|
|
|
2828
2824
|
x /= 1024, g++;
|
|
2829
2825
|
return `${x.toFixed(2)} ${V[g]}`;
|
|
2830
2826
|
}, P = (x) => {
|
|
2831
|
-
|
|
2832
|
-
|
|
2827
|
+
s.value = "", requestAnimationFrame(() => {
|
|
2828
|
+
s.value = x;
|
|
2833
2829
|
});
|
|
2834
|
-
},
|
|
2830
|
+
}, S = (x) => {
|
|
2835
2831
|
x.controller && x.controller.abort(), o("remove", x), t.value = u.value.filter((V) => V.id !== x.id);
|
|
2836
2832
|
};
|
|
2837
2833
|
return (x, V) => (p(), b("div", {
|
|
@@ -2839,7 +2835,7 @@ const nn = ["tabindex", "aria-label", "aria-describedby", "aria-busy", "aria-dis
|
|
|
2839
2835
|
class: "ui-upload",
|
|
2840
2836
|
tabindex: e.disabled ? -1 : 0,
|
|
2841
2837
|
"aria-label": e.ariaLabel || "File upload area",
|
|
2842
|
-
"aria-describedby": l.value ? N(
|
|
2838
|
+
"aria-describedby": l.value ? N(r) : void 0,
|
|
2843
2839
|
"aria-busy": C.value ? "true" : void 0,
|
|
2844
2840
|
"aria-disabled": e.disabled ? "true" : void 0,
|
|
2845
2841
|
"data-disabled": e.disabled || void 0,
|
|
@@ -2850,8 +2846,8 @@ const nn = ["tabindex", "aria-label", "aria-describedby", "aria-busy", "aria-dis
|
|
|
2850
2846
|
V[2] || (V[2] = ye(se((g) => !e.disabled && h(), ["prevent"]), ["space"]))
|
|
2851
2847
|
],
|
|
2852
2848
|
onDragover: V[3] || (V[3] = se((g) => !e.disabled && L(), ["prevent"])),
|
|
2853
|
-
onDragleave:
|
|
2854
|
-
onDrop: V[4] || (V[4] = se((g) => !e.disabled &&
|
|
2849
|
+
onDragleave: R,
|
|
2850
|
+
onDrop: V[4] || (V[4] = se((g) => !e.disabled && E(g), ["prevent"]))
|
|
2855
2851
|
}, [
|
|
2856
2852
|
w("input", {
|
|
2857
2853
|
type: "file",
|
|
@@ -2882,7 +2878,7 @@ const nn = ["tabindex", "aria-label", "aria-describedby", "aria-busy", "aria-dis
|
|
|
2882
2878
|
])]),
|
|
2883
2879
|
_: 1
|
|
2884
2880
|
}),
|
|
2885
|
-
w("span", null, "Maximum size: " + j(
|
|
2881
|
+
w("span", null, "Maximum size: " + j(f.value), 1)
|
|
2886
2882
|
], !0) : q("", !0),
|
|
2887
2883
|
u.value?.length ? (p(), b("ul", ln, [
|
|
2888
2884
|
(p(!0), b(de, null, he(u.value, (g) => (p(), b("li", {
|
|
@@ -2891,7 +2887,7 @@ const nn = ["tabindex", "aria-label", "aria-describedby", "aria-busy", "aria-dis
|
|
|
2891
2887
|
}, [
|
|
2892
2888
|
G(x.$slots, "file", {
|
|
2893
2889
|
file: g,
|
|
2894
|
-
remove: () =>
|
|
2890
|
+
remove: () => S(g),
|
|
2895
2891
|
cancel: () => U(g),
|
|
2896
2892
|
retry: () => oe(g)
|
|
2897
2893
|
}, () => [
|
|
@@ -2938,7 +2934,7 @@ const nn = ["tabindex", "aria-label", "aria-describedby", "aria-busy", "aria-dis
|
|
|
2938
2934
|
key: 2,
|
|
2939
2935
|
type: "button",
|
|
2940
2936
|
class: "btn-outline btn-xs",
|
|
2941
|
-
onClick: se((T) =>
|
|
2937
|
+
onClick: se((T) => S(g), ["stop"]),
|
|
2942
2938
|
"aria-label": "Remove file"
|
|
2943
2939
|
}, {
|
|
2944
2940
|
default: J(() => [...V[10] || (V[10] = [
|
|
@@ -2950,9 +2946,9 @@ const nn = ["tabindex", "aria-label", "aria-describedby", "aria-busy", "aria-dis
|
|
|
2950
2946
|
], !0)
|
|
2951
2947
|
]))), 128))
|
|
2952
2948
|
])) : q("", !0),
|
|
2953
|
-
w("div", hn, j(
|
|
2949
|
+
w("div", hn, j(s.value), 1),
|
|
2954
2950
|
w("p", {
|
|
2955
|
-
id: N(
|
|
2951
|
+
id: N(r),
|
|
2956
2952
|
class: "sr-only"
|
|
2957
2953
|
}, " Drop files to upload ", 8, gn)
|
|
2958
2954
|
], 40, nn));
|
|
@@ -2975,34 +2971,34 @@ const bn = (e) => {
|
|
|
2975
2971
|
disabled: { type: Boolean, default: !1 }
|
|
2976
2972
|
},
|
|
2977
2973
|
setup(e) {
|
|
2978
|
-
const n = e, t = Mn + Ln, a = k(!1), o = `tooltip-${ge()}`, i = k(null),
|
|
2979
|
-
let
|
|
2980
|
-
const
|
|
2981
|
-
n.disabled || (
|
|
2982
|
-
a.value = !0,
|
|
2974
|
+
const n = e, t = Mn + Ln, a = k(!1), o = `tooltip-${ge()}`, i = k(null), s = k(null), l = k({});
|
|
2975
|
+
let r = null, c = null, u = null;
|
|
2976
|
+
const f = () => {
|
|
2977
|
+
n.disabled || (r && (clearTimeout(r), r = null), n.delay ? r = window.setTimeout(() => {
|
|
2978
|
+
a.value = !0, r = null;
|
|
2983
2979
|
}, n.delay) : a.value = !0);
|
|
2984
2980
|
}, m = () => {
|
|
2985
|
-
|
|
2981
|
+
r && (clearTimeout(r), r = null), a.value = !1;
|
|
2986
2982
|
}, C = () => {
|
|
2987
|
-
if (!i.value || !
|
|
2988
|
-
const L = i.value.getBoundingClientRect(),
|
|
2983
|
+
if (!i.value || !s.value) return {};
|
|
2984
|
+
const L = i.value.getBoundingClientRect(), R = s.value.getBoundingClientRect(), E = {
|
|
2989
2985
|
position: "fixed"
|
|
2990
2986
|
};
|
|
2991
2987
|
switch (n.placement) {
|
|
2992
2988
|
case "top":
|
|
2993
|
-
|
|
2989
|
+
E.left = `${L.left + L.width / 2 - R.width / 2}px`, E.top = `${L.top - R.height - t}px`;
|
|
2994
2990
|
break;
|
|
2995
2991
|
case "bottom":
|
|
2996
|
-
|
|
2992
|
+
E.left = `${L.left + L.width / 2 - R.width / 2}px`, E.top = `${L.bottom + t}px`;
|
|
2997
2993
|
break;
|
|
2998
2994
|
case "left":
|
|
2999
|
-
|
|
2995
|
+
E.left = `${L.left - R.width - t}px`, E.top = `${L.top + L.height / 2 - R.height / 2}px`;
|
|
3000
2996
|
break;
|
|
3001
2997
|
case "right":
|
|
3002
|
-
|
|
2998
|
+
E.left = `${L.right + t}px`, E.top = `${L.top + L.height / 2 - R.height / 2}px`;
|
|
3003
2999
|
break;
|
|
3004
3000
|
}
|
|
3005
|
-
return
|
|
3001
|
+
return E;
|
|
3006
3002
|
}, h = () => {
|
|
3007
3003
|
l.value = C();
|
|
3008
3004
|
};
|
|
@@ -3011,10 +3007,10 @@ const bn = (e) => {
|
|
|
3011
3007
|
c?.(), c = null, u?.disconnect(), u = null;
|
|
3012
3008
|
return;
|
|
3013
3009
|
}
|
|
3014
|
-
await xe(), h(), c = bn(h), u = new ResizeObserver(h),
|
|
3010
|
+
await xe(), h(), c = bn(h), u = new ResizeObserver(h), s.value && u.observe(s.value), i.value && u.observe(i.value);
|
|
3015
3011
|
}), Se(() => {
|
|
3016
3012
|
c?.(), u?.disconnect();
|
|
3017
|
-
}), (L,
|
|
3013
|
+
}), (L, R) => (p(), b(de, null, [
|
|
3018
3014
|
w("span", {
|
|
3019
3015
|
ref_key: "triggerRef",
|
|
3020
3016
|
ref: i,
|
|
@@ -3022,9 +3018,9 @@ const bn = (e) => {
|
|
|
3022
3018
|
"aria-describedby": a.value ? o : void 0,
|
|
3023
3019
|
"aria-disabled": e.disabled || void 0,
|
|
3024
3020
|
"aria-expanded": a.value || void 0,
|
|
3025
|
-
onMouseenter:
|
|
3021
|
+
onMouseenter: f,
|
|
3026
3022
|
onMouseleave: m,
|
|
3027
|
-
onFocus:
|
|
3023
|
+
onFocus: f,
|
|
3028
3024
|
onBlur: m,
|
|
3029
3025
|
onKeydown: ye(m, ["esc"])
|
|
3030
3026
|
}, [
|
|
@@ -3036,7 +3032,7 @@ const bn = (e) => {
|
|
|
3036
3032
|
a.value ? (p(), b("div", {
|
|
3037
3033
|
key: 0,
|
|
3038
3034
|
ref_key: "tooltipRef",
|
|
3039
|
-
ref:
|
|
3035
|
+
ref: s,
|
|
3040
3036
|
id: o,
|
|
3041
3037
|
class: "tooltip-content",
|
|
3042
3038
|
role: "tooltip",
|
|
@@ -3045,7 +3041,7 @@ const bn = (e) => {
|
|
|
3045
3041
|
"data-placement": n.placement,
|
|
3046
3042
|
style: Ie(l.value)
|
|
3047
3043
|
}, [
|
|
3048
|
-
|
|
3044
|
+
R[0] || (R[0] = w("div", { class: "tooltip-arrow" }, null, -1)),
|
|
3049
3045
|
G(L.$slots, "content", {}, () => [
|
|
3050
3046
|
Me(j(e.content), 1)
|
|
3051
3047
|
], !0)
|
|
@@ -3076,26 +3072,26 @@ const $n = {
|
|
|
3076
3072
|
},
|
|
3077
3073
|
emits: ["click", "remove"],
|
|
3078
3074
|
setup(e, { emit: n }) {
|
|
3079
|
-
const t = e, a = n, o =
|
|
3075
|
+
const t = e, a = n, o = _(() => t.clickable || t.as === "button" || t.as === "a"), i = _(() => [
|
|
3080
3076
|
`ui-tag--${t.variant}`,
|
|
3081
3077
|
`ui-tag--${t.size}`,
|
|
3082
3078
|
{
|
|
3083
3079
|
"is-clickable": t.clickable,
|
|
3084
3080
|
"is-removable": t.removable
|
|
3085
3081
|
}
|
|
3086
|
-
]),
|
|
3082
|
+
]), s = _(() => t.clickable && t.as !== "button" && t.as !== "a"), l = (c) => {
|
|
3087
3083
|
t.disabled || !o.value || a("click", c);
|
|
3088
|
-
},
|
|
3084
|
+
}, r = () => a("remove");
|
|
3089
3085
|
return (c, u) => (p(), ae(Ne(e.as), {
|
|
3090
3086
|
ref: "rootRef",
|
|
3091
3087
|
class: fe(["ui-tag", i.value]),
|
|
3092
3088
|
"aria-disabled": e.disabled || void 0,
|
|
3093
|
-
tabindex: e.disabled ? -1 :
|
|
3094
|
-
role:
|
|
3089
|
+
tabindex: e.disabled ? -1 : s.value ? 0 : void 0,
|
|
3090
|
+
role: s.value ? "button" : void 0,
|
|
3095
3091
|
onClick: l,
|
|
3096
3092
|
onKeydown: [
|
|
3097
|
-
u[0] || (u[0] = ye(se((
|
|
3098
|
-
u[1] || (u[1] = ye(se((
|
|
3093
|
+
u[0] || (u[0] = ye(se((f) => !e.disabled && o.value && l(f), ["prevent"]), ["enter"])),
|
|
3094
|
+
u[1] || (u[1] = ye(se((f) => !e.disabled && o.value && l(f), ["prevent"]), ["space"]))
|
|
3099
3095
|
]
|
|
3100
3096
|
}, {
|
|
3101
3097
|
default: J(() => [
|
|
@@ -3110,7 +3106,7 @@ const $n = {
|
|
|
3110
3106
|
class: "ui-tag__remove",
|
|
3111
3107
|
type: "button",
|
|
3112
3108
|
"aria-label": `Remove ${e.textContent}`,
|
|
3113
|
-
onClick: se(
|
|
3109
|
+
onClick: se(r, ["stop"])
|
|
3114
3110
|
}, [
|
|
3115
3111
|
K(Ce, {
|
|
3116
3112
|
name: "close",
|
|
@@ -3138,7 +3134,7 @@ const $n = {
|
|
|
3138
3134
|
}
|
|
3139
3135
|
a("click", i);
|
|
3140
3136
|
};
|
|
3141
|
-
return (i,
|
|
3137
|
+
return (i, s) => (p(), b("a", {
|
|
3142
3138
|
class: "link",
|
|
3143
3139
|
href: e.disabled ? void 0 : e.href,
|
|
3144
3140
|
"aria-disabled": e.disabled ? "true" : void 0,
|
|
@@ -3155,42 +3151,42 @@ const $n = {
|
|
|
3155
3151
|
__name: "Dropdown",
|
|
3156
3152
|
setup(e) {
|
|
3157
3153
|
let n = 0;
|
|
3158
|
-
const t = k(!1), a = k(null), o = k({}), i = `dropdown-${ge()}`,
|
|
3154
|
+
const t = k(!1), a = k(null), o = k({}), i = `dropdown-${ge()}`, s = `${i}-menu`, l = `${i}-trigger`, r = () => t.value = !0, c = () => {
|
|
3159
3155
|
t.value = !1, o.value = {}, n = 0, a.value?.focus({ preventScroll: !0 });
|
|
3160
|
-
}, u = () => t.value = !t.value,
|
|
3161
|
-
const
|
|
3162
|
-
return o.value[
|
|
3156
|
+
}, u = () => t.value = !t.value, f = (M) => {
|
|
3157
|
+
const B = `dropdown-item-${n++}`;
|
|
3158
|
+
return o.value[B] = M, B;
|
|
3163
3159
|
}, m = (M) => {
|
|
3164
|
-
const
|
|
3165
|
-
|
|
3160
|
+
const B = o.value[M];
|
|
3161
|
+
B && B.focus({ preventScroll: !0 });
|
|
3166
3162
|
}, C = () => {
|
|
3167
3163
|
const M = Object.keys(o.value)[0];
|
|
3168
3164
|
M && m(M);
|
|
3169
3165
|
}, h = () => {
|
|
3170
|
-
const M = Object.keys(o.value),
|
|
3171
|
-
|
|
3166
|
+
const M = Object.keys(o.value), B = M[M.length - 1];
|
|
3167
|
+
B && m(B);
|
|
3172
3168
|
}, L = (M) => {
|
|
3173
|
-
const
|
|
3174
|
-
z >= 0 && z <
|
|
3175
|
-
},
|
|
3176
|
-
const
|
|
3169
|
+
const B = Object.keys(o.value), z = E(M), U = B[z + 1];
|
|
3170
|
+
z >= 0 && z < B.length - 1 && U && m(U);
|
|
3171
|
+
}, R = (M) => {
|
|
3172
|
+
const B = Object.keys(o.value), z = E(M), U = B[z - 1];
|
|
3177
3173
|
z > 0 && U && m(U);
|
|
3178
|
-
},
|
|
3174
|
+
}, E = (M) => Object.keys(o.value).indexOf(M);
|
|
3179
3175
|
return He("DropdownContext", {
|
|
3180
|
-
open:
|
|
3176
|
+
open: r,
|
|
3181
3177
|
close: c,
|
|
3182
3178
|
toggle: u,
|
|
3183
3179
|
isOpen: t,
|
|
3184
|
-
registerItem:
|
|
3180
|
+
registerItem: f,
|
|
3185
3181
|
focusItem: m,
|
|
3186
3182
|
focusNextItem: L,
|
|
3187
|
-
focusPrevItem:
|
|
3183
|
+
focusPrevItem: R,
|
|
3188
3184
|
focusFirstItem: C,
|
|
3189
3185
|
focusLastItem: h,
|
|
3190
3186
|
triggerRef: a,
|
|
3191
|
-
menuId:
|
|
3187
|
+
menuId: s,
|
|
3192
3188
|
triggerId: l
|
|
3193
|
-
}), (M,
|
|
3189
|
+
}), (M, B) => (p(), b("div", En, [
|
|
3194
3190
|
G(M.$slots, "default", {}, void 0, !0)
|
|
3195
3191
|
]));
|
|
3196
3192
|
}
|
|
@@ -3206,7 +3202,7 @@ const $n = {
|
|
|
3206
3202
|
const a = k(), o = (i) => {
|
|
3207
3203
|
i.key === "ArrowDown" && (i.preventDefault(), t.open(), xe(() => t.focusFirstItem())), i.key === "ArrowUp" && (i.preventDefault(), t.open(), xe(() => t.focusLastItem()));
|
|
3208
3204
|
};
|
|
3209
|
-
return ve(() => t.triggerRef.value = a.value?.el), (i,
|
|
3205
|
+
return ve(() => t.triggerRef.value = a.value?.el), (i, s) => (p(), ae(Le, {
|
|
3210
3206
|
ref_key: "btn",
|
|
3211
3207
|
ref: a,
|
|
3212
3208
|
id: N(t).triggerId,
|
|
@@ -3234,38 +3230,38 @@ const $n = {
|
|
|
3234
3230
|
if (!n) throw new Error("DropdownMenu must be used within a Dropdown");
|
|
3235
3231
|
const t = k(), a = k({});
|
|
3236
3232
|
let o = !1, i;
|
|
3237
|
-
const
|
|
3238
|
-
const m =
|
|
3233
|
+
const s = (f) => {
|
|
3234
|
+
const m = f.target;
|
|
3239
3235
|
t.value?.contains(m) || n.triggerRef.value?.contains(m) || n.close();
|
|
3240
|
-
}, l = (
|
|
3241
|
-
const
|
|
3242
|
-
if (!
|
|
3243
|
-
const C =
|
|
3244
|
-
let L,
|
|
3245
|
-
window.innerHeight - C.bottom >= h.height ? L = C.bottom : L = C.top - h.height, window.innerWidth - C.left <= h.width ?
|
|
3236
|
+
}, l = (f) => f.key === "Escape" && n.close(), r = () => {
|
|
3237
|
+
const f = n.triggerRef.value, m = t.value;
|
|
3238
|
+
if (!f || !m) return;
|
|
3239
|
+
const C = f.getBoundingClientRect(), h = m.getBoundingClientRect();
|
|
3240
|
+
let L, R;
|
|
3241
|
+
window.innerHeight - C.bottom >= h.height ? L = C.bottom : L = C.top - h.height, window.innerWidth - C.left <= h.width ? R = C.right - h.width : R = C.left, a.value = {
|
|
3246
3242
|
"--dropdown-menu-position": "fixed",
|
|
3247
3243
|
"--dropdown-menu-top": `${L}px`,
|
|
3248
|
-
"--dropdown-menu-left": `${
|
|
3244
|
+
"--dropdown-menu-left": `${R}px`
|
|
3249
3245
|
};
|
|
3250
|
-
}, c = () => new Promise((
|
|
3246
|
+
}, c = () => new Promise((f) => requestAnimationFrame(() => f()));
|
|
3251
3247
|
Q(
|
|
3252
3248
|
() => n.isOpen.value,
|
|
3253
|
-
async (
|
|
3254
|
-
|
|
3249
|
+
async (f) => {
|
|
3250
|
+
f ? (await c(), await c(), r(), n.focusFirstItem(), document.addEventListener("pointerdown", s, !0)) : document.removeEventListener("pointerdown", s, !0);
|
|
3255
3251
|
}
|
|
3256
3252
|
);
|
|
3257
3253
|
const u = () => {
|
|
3258
3254
|
n.isOpen.value && (o || (o = !0, requestAnimationFrame(() => {
|
|
3259
|
-
|
|
3255
|
+
r(), o = !1;
|
|
3260
3256
|
})));
|
|
3261
3257
|
};
|
|
3262
3258
|
return ve(() => {
|
|
3263
3259
|
i = new ResizeObserver(() => {
|
|
3264
|
-
|
|
3260
|
+
r();
|
|
3265
3261
|
}), t.value && i.observe(t.value), window.addEventListener("scroll", u, !0), window.addEventListener("resize", u);
|
|
3266
3262
|
}), Be(() => {
|
|
3267
3263
|
i?.disconnect(), window.removeEventListener("scroll", u, !0), window.removeEventListener("resize", u);
|
|
3268
|
-
}), (
|
|
3264
|
+
}), (f, m) => (p(), ae(Fe, { to: "body" }, [
|
|
3269
3265
|
N(n).isOpen.value ? (p(), b("div", {
|
|
3270
3266
|
key: 0,
|
|
3271
3267
|
role: "menu",
|
|
@@ -3278,7 +3274,7 @@ const $n = {
|
|
|
3278
3274
|
class: "ui-dropdown-menu",
|
|
3279
3275
|
onKeydown: l
|
|
3280
3276
|
}, [
|
|
3281
|
-
G(
|
|
3277
|
+
G(f.$slots, "default", {}, void 0, !0)
|
|
3282
3278
|
], 44, Zn)) : q("", !0)
|
|
3283
3279
|
]));
|
|
3284
3280
|
}
|
|
@@ -3332,9 +3328,9 @@ const je = (e) => [...e].map((n) => n === "9" ? { type: "digit" } : n === "A" ?
|
|
|
3332
3328
|
continue;
|
|
3333
3329
|
}
|
|
3334
3330
|
for (; o < e.length; ) {
|
|
3335
|
-
const
|
|
3336
|
-
if (
|
|
3337
|
-
a +=
|
|
3331
|
+
const s = e[o++];
|
|
3332
|
+
if (s && Rt(s, i)) {
|
|
3333
|
+
a += s;
|
|
3338
3334
|
break;
|
|
3339
3335
|
}
|
|
3340
3336
|
}
|
|
@@ -3343,10 +3339,10 @@ const je = (e) => [...e].map((n) => n === "9" ? { type: "digit" } : n === "A" ?
|
|
|
3343
3339
|
return a;
|
|
3344
3340
|
}, Fn = (e, n) => {
|
|
3345
3341
|
const a = je(n).filter((l) => l.type !== "literal");
|
|
3346
|
-
let o = "", i = 0,
|
|
3347
|
-
for (; i < e.length &&
|
|
3348
|
-
const l = e[i],
|
|
3349
|
-
|
|
3342
|
+
let o = "", i = 0, s = 0;
|
|
3343
|
+
for (; i < e.length && s < a.length; ) {
|
|
3344
|
+
const l = e[i], r = a[s];
|
|
3345
|
+
r && Rt(l, r) && (o += l, s++), i++;
|
|
3350
3346
|
}
|
|
3351
3347
|
return o;
|
|
3352
3348
|
}, Pn = (e, n) => e.slice(0, n).replace(/\D/g, "").length, Un = (e, n) => {
|
|
@@ -3361,10 +3357,10 @@ const je = (e) => [...e].map((n) => n === "9" ? { type: "digit" } : n === "A" ?
|
|
|
3361
3357
|
for (; n > 0 && n < a.length && a[n - 1]?.type === "literal"; )
|
|
3362
3358
|
n += t;
|
|
3363
3359
|
return n;
|
|
3364
|
-
}, dt = (e, n, t, a) =>
|
|
3360
|
+
}, dt = (e, n, t, a) => _(() => {
|
|
3365
3361
|
const o = [];
|
|
3366
3362
|
return e.invalid && e.errorMessage && o.push(t), n.hint && o.push(a), o.length > 0 ? o.join(" ") : void 0;
|
|
3367
|
-
}), Xe = (e) =>
|
|
3363
|
+
}), Xe = (e) => _(() => Object.keys(e).includes("required") && e.required !== "false" ? "true" : void 0), jn = (e) => _(() => e.disabled === !0 ? "true" : void 0), Wn = ["id"], vt = /* @__PURE__ */ Z({
|
|
3368
3364
|
__name: "Hint",
|
|
3369
3365
|
props: {
|
|
3370
3366
|
hintId: {}
|
|
@@ -3425,75 +3421,75 @@ const je = (e) => [...e].map((n) => n === "9" ? { type: "digit" } : n === "A" ?
|
|
|
3425
3421
|
}),
|
|
3426
3422
|
emits: /* @__PURE__ */ ie(["focus", "blur"], ["update:modelValue"]),
|
|
3427
3423
|
setup(e, { emit: n }) {
|
|
3428
|
-
const t = ke(e, "modelValue"), a = e, o = n, i = st(),
|
|
3429
|
-
const { type:
|
|
3424
|
+
const t = ke(e, "modelValue"), a = e, o = n, i = st(), s = k(null), l = ge(), r = `${l}-error`, c = `${l}-hint`, u = Xe(i).value, f = k(!1), m = k(""), C = k(!1), h = _(() => t.value !== null && t.value !== void 0 && t.value !== ""), L = _(() => u ? `${c} ${l}-required-hint` : c), R = _(() => a.invalid === !0 && a.errorMessage ? r : void 0), E = _(() => a.type === "password" ? C.value ? "text" : "password" : a.type), M = _(() => {
|
|
3425
|
+
const { type: A, ...F } = i;
|
|
3430
3426
|
return F;
|
|
3431
|
-
}),
|
|
3427
|
+
}), B = _(() => a.currency ? t.value === null || t.value === void 0 || t.value === "" ? "" : ue(m.value) : a.mask ? wt(String(t.value ?? ""), a.mask) : String(t.value ?? "")), z = _(() => a.mask ? je(a.mask).filter((A) => A.type !== "literal").length : 0), U = _(() => a.currency ? new Intl.NumberFormat(a.locale ?? "en-US", {
|
|
3432
3428
|
style: "currency",
|
|
3433
3429
|
currency: a.currency
|
|
3434
|
-
}) : null), oe =
|
|
3430
|
+
}) : null), oe = _(() => ({
|
|
3435
3431
|
input: !0,
|
|
3436
3432
|
"input-currency": !!a.currency
|
|
3437
|
-
})), ue = (
|
|
3438
|
-
if (!U.value) return
|
|
3439
|
-
const F = Number(
|
|
3433
|
+
})), ue = (A) => {
|
|
3434
|
+
if (!U.value) return A;
|
|
3435
|
+
const F = Number(A || "0") / 100;
|
|
3440
3436
|
return U.value.format(F);
|
|
3441
|
-
}, re = () => C.value = !C.value, P = (
|
|
3437
|
+
}, re = () => C.value = !C.value, P = (A) => {
|
|
3442
3438
|
if (!a.mask && !a.currency) return;
|
|
3443
3439
|
if (a.currency) {
|
|
3444
|
-
const O =
|
|
3445
|
-
|
|
3440
|
+
const O = A.target, I = T(O.value);
|
|
3441
|
+
s.value = {
|
|
3446
3442
|
rawCaret: I.length,
|
|
3447
|
-
inputType:
|
|
3443
|
+
inputType: A.inputType
|
|
3448
3444
|
};
|
|
3449
3445
|
return;
|
|
3450
3446
|
}
|
|
3451
|
-
const F =
|
|
3452
|
-
|
|
3447
|
+
const F = A.target, H = F.selectionStart ?? 0;
|
|
3448
|
+
s.value = {
|
|
3453
3449
|
rawCaret: Pn(F.value, H),
|
|
3454
|
-
inputType:
|
|
3450
|
+
inputType: A.inputType
|
|
3455
3451
|
};
|
|
3456
|
-
},
|
|
3457
|
-
const F =
|
|
3452
|
+
}, S = (A) => {
|
|
3453
|
+
const F = A.target;
|
|
3458
3454
|
if (a.currency) {
|
|
3459
3455
|
let I = T(F.value);
|
|
3460
|
-
|
|
3456
|
+
s.value?.inputType === "deleteContentBackward" && (I = m.value.slice(0, -1)), m.value = I;
|
|
3461
3457
|
const D = ue(m.value);
|
|
3462
|
-
F.value = D, t.value = Number(m.value || "0") / 100,
|
|
3458
|
+
F.value = D, t.value = Number(m.value || "0") / 100, s.value = null;
|
|
3463
3459
|
return;
|
|
3464
3460
|
}
|
|
3465
3461
|
let H = a.mask ? Fn(F.value, a.mask) : F.value;
|
|
3466
3462
|
a.mask && (H = H.slice(0, z.value));
|
|
3467
3463
|
const O = a.mask ? wt(H, a.mask) : H;
|
|
3468
|
-
if (F.value = O, t.value = a.type === "number" ? Number(H) : H, a.mask &&
|
|
3469
|
-
let { rawCaret: I, inputType: D } =
|
|
3464
|
+
if (F.value = O, t.value = a.type === "number" ? Number(H) : H, a.mask && s.value) {
|
|
3465
|
+
let { rawCaret: I, inputType: D } = s.value;
|
|
3470
3466
|
D.startsWith("insert") && I++, D === "deleteContentBackward" && (I = Math.max(0, I - 1));
|
|
3471
|
-
let
|
|
3472
|
-
|
|
3467
|
+
let v = Un(O, I);
|
|
3468
|
+
v = Kn(a.mask, v, 1), F.setSelectionRange(v, v);
|
|
3473
3469
|
}
|
|
3474
|
-
|
|
3475
|
-
}, x = (
|
|
3476
|
-
if (!a.mask || a.currency ||
|
|
3477
|
-
const F =
|
|
3470
|
+
s.value = null;
|
|
3471
|
+
}, x = (A) => {
|
|
3472
|
+
if (!a.mask || a.currency || A.key !== "Backspace") return;
|
|
3473
|
+
const F = A.target;
|
|
3478
3474
|
let H = F.selectionStart ?? 0;
|
|
3479
3475
|
const O = je(a.mask);
|
|
3480
3476
|
for (; H > 0 && O[H - 1]?.type === "literal"; ) H--;
|
|
3481
3477
|
requestAnimationFrame(() => F.setSelectionRange(H, H));
|
|
3482
|
-
}, V = (
|
|
3483
|
-
|
|
3484
|
-
}, g = (
|
|
3485
|
-
|
|
3486
|
-
}, T = (
|
|
3478
|
+
}, V = (A) => {
|
|
3479
|
+
f.value = !0, o("focus", A);
|
|
3480
|
+
}, g = (A) => {
|
|
3481
|
+
f.value = !1, o("blur", A);
|
|
3482
|
+
}, T = (A) => A.replace(/\D/g, "");
|
|
3487
3483
|
return Q(
|
|
3488
3484
|
() => t.value,
|
|
3489
|
-
(
|
|
3485
|
+
(A) => {
|
|
3490
3486
|
if (!a.currency) return;
|
|
3491
|
-
const F = Math.round(Number(
|
|
3487
|
+
const F = Math.round(Number(A || 0) * 100);
|
|
3492
3488
|
m.value = String(F);
|
|
3493
3489
|
},
|
|
3494
3490
|
{ immediate: !0 }
|
|
3495
|
-
), (
|
|
3496
|
-
class: fe(["input-box", { required: N(u), error: e.invalid, filled: h.value, focused:
|
|
3491
|
+
), (A, F) => (p(), b("div", {
|
|
3492
|
+
class: fe(["input-box", { required: N(u), error: e.invalid, filled: h.value, focused: f.value }])
|
|
3497
3493
|
}, [
|
|
3498
3494
|
w("label", {
|
|
3499
3495
|
for: e.id,
|
|
@@ -3501,23 +3497,23 @@ const je = (e) => [...e].map((n) => n === "9" ? { type: "digit" } : n === "A" ?
|
|
|
3501
3497
|
}, j(e.label), 9, Gn),
|
|
3502
3498
|
w("input", be({
|
|
3503
3499
|
id: e.id,
|
|
3504
|
-
type:
|
|
3500
|
+
type: E.value
|
|
3505
3501
|
}, M.value, {
|
|
3506
3502
|
class: oe.value,
|
|
3507
3503
|
onBeforeinput: P,
|
|
3508
|
-
onInput:
|
|
3504
|
+
onInput: S,
|
|
3509
3505
|
onFocus: V,
|
|
3510
3506
|
onBlur: g,
|
|
3511
3507
|
onKeydown: x,
|
|
3512
|
-
value:
|
|
3508
|
+
value: B.value,
|
|
3513
3509
|
required: N(u),
|
|
3514
3510
|
"aria-invalid": e.invalid ? "true" : void 0,
|
|
3515
|
-
"aria-errormessage":
|
|
3516
|
-
"aria-describedby": N(dt)(
|
|
3511
|
+
"aria-errormessage": R.value,
|
|
3512
|
+
"aria-describedby": N(dt)(A.$props, A.$slots, r, L.value).value
|
|
3517
3513
|
}), null, 16, Jn),
|
|
3518
3514
|
K(vt, { hintId: c }, {
|
|
3519
3515
|
default: J(() => [
|
|
3520
|
-
G(
|
|
3516
|
+
G(A.$slots, "hint", {}, void 0, !0)
|
|
3521
3517
|
]),
|
|
3522
3518
|
_: 3
|
|
3523
3519
|
}),
|
|
@@ -3526,11 +3522,11 @@ const je = (e) => [...e].map((n) => n === "9" ? { type: "digit" } : n === "A" ?
|
|
|
3526
3522
|
isRequired: N(u)
|
|
3527
3523
|
}, null, 8, ["baseId", "isRequired"]),
|
|
3528
3524
|
K(pt, {
|
|
3529
|
-
errorId:
|
|
3525
|
+
errorId: r,
|
|
3530
3526
|
invalid: e.invalid,
|
|
3531
3527
|
errorMessage: e.errorMessage
|
|
3532
3528
|
}, null, 8, ["invalid", "errorMessage"]),
|
|
3533
|
-
e.type === "password" ? (p(), ae(Le, be({ key: 0 }, Object.keys(
|
|
3529
|
+
e.type === "password" ? (p(), ae(Le, be({ key: 0 }, Object.keys(A.$attrs).includes("disabled") ? { disabled: !0 } : void 0, {
|
|
3534
3530
|
type: "button",
|
|
3535
3531
|
class: "btn-icon",
|
|
3536
3532
|
onClick: re,
|
|
@@ -3562,11 +3558,11 @@ const je = (e) => [...e].map((n) => n === "9" ? { type: "digit" } : n === "A" ?
|
|
|
3562
3558
|
shape: { default: "circle" }
|
|
3563
3559
|
},
|
|
3564
3560
|
setup(e) {
|
|
3565
|
-
const n = e, t = k("loading"), a =
|
|
3561
|
+
const n = e, t = k("loading"), a = _(() => n.src && t.value !== "error"), o = _(() => n.name ? n.name.split(" ").map((r) => r[0]).slice(0, 2).join("").toUpperCase() : ""), i = _(() => n.alt ? n.alt : n.name ? n.name : "Avatar"), s = () => t.value = "loaded", l = () => t.value = "error";
|
|
3566
3562
|
return Q(
|
|
3567
3563
|
() => n.src,
|
|
3568
3564
|
() => n.src && (t.value = "loading")
|
|
3569
|
-
), ve(() => !n.src && (t.value = "error")), (
|
|
3565
|
+
), ve(() => !n.src && (t.value = "error")), (r, c) => (p(), b("div", {
|
|
3570
3566
|
class: "ui-avatar",
|
|
3571
3567
|
"data-size": e.size,
|
|
3572
3568
|
"data-shape": e.shape,
|
|
@@ -3578,10 +3574,10 @@ const je = (e) => [...e].map((n) => n === "9" ? { type: "digit" } : n === "A" ?
|
|
|
3578
3574
|
src: e.src,
|
|
3579
3575
|
alt: e.alt ?? "",
|
|
3580
3576
|
class: "ui-avatar__img",
|
|
3581
|
-
onLoad:
|
|
3577
|
+
onLoad: s,
|
|
3582
3578
|
onError: l
|
|
3583
3579
|
}, null, 8, ["src", "alt"])) : t.value === "loading" ? (p(), b("div", to)) : (p(), b("div", ao, [
|
|
3584
|
-
G(
|
|
3580
|
+
G(r.$slots, "default", {}, () => [
|
|
3585
3581
|
Me(j(o.value), 1)
|
|
3586
3582
|
], !0)
|
|
3587
3583
|
]))
|
|
@@ -3603,9 +3599,9 @@ const je = (e) => [...e].map((n) => n === "9" ? { type: "digit" } : n === "A" ?
|
|
|
3603
3599
|
setup(e, { emit: n }) {
|
|
3604
3600
|
const t = ke(e, "modelValue"), a = e, o = n, i = k(!1);
|
|
3605
3601
|
Q(i, (H) => {
|
|
3606
|
-
H ? document.addEventListener("mousedown",
|
|
3602
|
+
H ? document.addEventListener("mousedown", A) : document.removeEventListener("mousedown", A);
|
|
3607
3603
|
});
|
|
3608
|
-
const
|
|
3604
|
+
const s = st(), l = k(!1), r = k(null), c = _(() => a.id ?? ge()), u = `${c.value}-label`, f = `${c.value}-listbox`, m = `${c.value}-error`, C = `${c.value}-hint`, h = `${c.value}-value`, L = k(null), R = k(null), E = _(() => t.value !== null && t.value !== void 0 && t.value !== ""), M = _(() => L.value !== null ? `${f}-option-${L.value}` : void 0), B = Xe(s).value, z = _(() => B ? `${C} ${c.value}-required-hint` : C), U = _(() => i.value && M.value ? M.value : void 0), oe = _(() => R.value !== null ? a.options[R.value]?.value : "");
|
|
3609
3605
|
Q(
|
|
3610
3606
|
() => t.value,
|
|
3611
3607
|
() => F()
|
|
@@ -3617,13 +3613,13 @@ const je = (e) => [...e].map((n) => n === "9" ? { type: "digit" } : n === "A" ?
|
|
|
3617
3613
|
const ue = (H) => {
|
|
3618
3614
|
l.value = !0, o("focus", H);
|
|
3619
3615
|
}, re = (H) => {
|
|
3620
|
-
const O = H.relatedTarget, I =
|
|
3616
|
+
const O = H.relatedTarget, I = r.value;
|
|
3621
3617
|
!I || I?.contains(O) || (l.value = !1, i.value = !1, o("blur", H));
|
|
3622
3618
|
}, P = (H) => {
|
|
3623
3619
|
i.value = !i.value, i.value && t.value.toString().length > 0 && (L.value = L.value ?? a.options.findIndex((O) => !O.disabled)), !(!a.options || a.options.length === 0) && o("click", H);
|
|
3624
|
-
},
|
|
3625
|
-
const I =
|
|
3626
|
-
!I || H.disabled || (
|
|
3620
|
+
}, S = (H, O) => {
|
|
3621
|
+
const I = r.value;
|
|
3622
|
+
!I || H.disabled || (R.value = O, L.value = O, H && H.key && H.key.toString().length > 0 ? I.classList.add("filled") : I.classList.remove("filled"), t.value = H.key, o("change", H.key));
|
|
3627
3623
|
}, x = (H) => {
|
|
3628
3624
|
if (!i.value && ["ArrowDown", "ArrowUp"].includes(H.key)) {
|
|
3629
3625
|
i.value = !0, L.value = L.value ?? a.options.findIndex((O) => !O.disabled), H.preventDefault();
|
|
@@ -3642,7 +3638,7 @@ const je = (e) => [...e].map((n) => n === "9" ? { type: "digit" } : n === "A" ?
|
|
|
3642
3638
|
if (L.value === null) return;
|
|
3643
3639
|
const O = a.options[L.value];
|
|
3644
3640
|
if (!O || O.disabled) return;
|
|
3645
|
-
|
|
3641
|
+
S(O, L.value), i.value = !1, H.preventDefault();
|
|
3646
3642
|
}
|
|
3647
3643
|
H.key === "Escape" && (i.value = !1);
|
|
3648
3644
|
}
|
|
@@ -3653,18 +3649,18 @@ const je = (e) => [...e].map((n) => n === "9" ? { type: "digit" } : n === "A" ?
|
|
|
3653
3649
|
O += H;
|
|
3654
3650
|
while (O >= 0 && O < a.options.length && a.options[O]?.disabled);
|
|
3655
3651
|
O >= 0 && O < a.options.length && (L.value = O);
|
|
3656
|
-
}, g = () => a.options.findIndex((H) => !H.disabled), T = () => [...a.options].reverse().findIndex((H) => !H.disabled) >= 0 ? a.options.length - 1 - [...a.options].reverse().findIndex((H) => !H.disabled) : -1,
|
|
3657
|
-
const O =
|
|
3652
|
+
}, g = () => a.options.findIndex((H) => !H.disabled), T = () => [...a.options].reverse().findIndex((H) => !H.disabled) >= 0 ? a.options.length - 1 - [...a.options].reverse().findIndex((H) => !H.disabled) : -1, A = (H) => {
|
|
3653
|
+
const O = r.value;
|
|
3658
3654
|
!O || O.contains(H.target) || (i.value = !1);
|
|
3659
3655
|
};
|
|
3660
3656
|
Se(() => {
|
|
3661
|
-
document.removeEventListener("mousedown",
|
|
3657
|
+
document.removeEventListener("mousedown", A);
|
|
3662
3658
|
});
|
|
3663
3659
|
const F = () => {
|
|
3664
3660
|
const H = a.options.findIndex((O) => !O.disabled && O.key === t.value);
|
|
3665
3661
|
if (H > -1) {
|
|
3666
|
-
|
|
3667
|
-
const O =
|
|
3662
|
+
R.value = H, L.value = H;
|
|
3663
|
+
const O = r.value;
|
|
3668
3664
|
O && O.classList.add("filled");
|
|
3669
3665
|
}
|
|
3670
3666
|
};
|
|
@@ -3675,8 +3671,8 @@ const je = (e) => [...e].map((n) => n === "9" ? { type: "digit" } : n === "A" ?
|
|
|
3675
3671
|
}
|
|
3676
3672
|
}), (H, O) => (p(), b("div", {
|
|
3677
3673
|
ref_key: "selectRef",
|
|
3678
|
-
ref:
|
|
3679
|
-
class: fe(["select-box", { required: Object.keys(H.$attrs).includes("required"), error: e.invalid, filled:
|
|
3674
|
+
ref: r,
|
|
3675
|
+
class: fe(["select-box", { required: Object.keys(H.$attrs).includes("required"), error: e.invalid, filled: E.value, focused: l.value }])
|
|
3680
3676
|
}, [
|
|
3681
3677
|
w("button", be({
|
|
3682
3678
|
id: c.value,
|
|
@@ -3686,13 +3682,13 @@ const je = (e) => [...e].map((n) => n === "9" ? { type: "digit" } : n === "A" ?
|
|
|
3686
3682
|
}, H.$attrs, {
|
|
3687
3683
|
"aria-haspopup": "listbox",
|
|
3688
3684
|
"aria-expanded": i.value,
|
|
3689
|
-
"aria-controls":
|
|
3685
|
+
"aria-controls": f,
|
|
3690
3686
|
"aria-invalid": e.invalid ? "true" : void 0,
|
|
3691
3687
|
"aria-labelledby": `${u} ${h}`,
|
|
3692
|
-
"aria-required": N(
|
|
3688
|
+
"aria-required": N(B),
|
|
3693
3689
|
"aria-describedby": N(dt)(H.$props, H.$slots, m, z.value).value,
|
|
3694
3690
|
"aria-activedescendant": U.value,
|
|
3695
|
-
"aria-disabled": N(
|
|
3691
|
+
"aria-disabled": N(s).disabled ? "true" : void 0,
|
|
3696
3692
|
onBlur: re,
|
|
3697
3693
|
onFocus: ue,
|
|
3698
3694
|
onClick: P,
|
|
@@ -3718,18 +3714,18 @@ const je = (e) => [...e].map((n) => n === "9" ? { type: "digit" } : n === "A" ?
|
|
|
3718
3714
|
K(Ae, { name: "select" }, {
|
|
3719
3715
|
default: J(() => [
|
|
3720
3716
|
_e(w("ul", {
|
|
3721
|
-
id:
|
|
3717
|
+
id: f,
|
|
3722
3718
|
role: "listbox",
|
|
3723
3719
|
class: "options"
|
|
3724
3720
|
}, [
|
|
3725
3721
|
(p(!0), b(de, null, he(e.options, (I, D) => (p(), b("li", {
|
|
3726
|
-
id: `${
|
|
3722
|
+
id: `${f}-option-${D}`,
|
|
3727
3723
|
key: D,
|
|
3728
3724
|
role: "option",
|
|
3729
3725
|
class: fe(["option", { "focus-visible": L.value === D }]),
|
|
3730
3726
|
"aria-disabled": I.disabled,
|
|
3731
|
-
"aria-selected":
|
|
3732
|
-
onClick: (
|
|
3727
|
+
"aria-selected": R.value === D,
|
|
3728
|
+
onClick: (v) => !I.disabled && S(I, D)
|
|
3733
3729
|
}, [
|
|
3734
3730
|
w("div", {
|
|
3735
3731
|
class: "option-value",
|
|
@@ -3750,7 +3746,7 @@ const je = (e) => [...e].map((n) => n === "9" ? { type: "digit" } : n === "A" ?
|
|
|
3750
3746
|
}),
|
|
3751
3747
|
K(ft, {
|
|
3752
3748
|
baseId: c.value,
|
|
3753
|
-
isRequired: N(
|
|
3749
|
+
isRequired: N(B)
|
|
3754
3750
|
}, null, 8, ["baseId", "isRequired"]),
|
|
3755
3751
|
K(pt, {
|
|
3756
3752
|
errorId: m,
|
|
@@ -3783,10 +3779,10 @@ const je = (e) => [...e].map((n) => n === "9" ? { type: "digit" } : n === "A" ?
|
|
|
3783
3779
|
}),
|
|
3784
3780
|
emits: /* @__PURE__ */ ie(["change"], ["update:modelValue"]),
|
|
3785
3781
|
setup(e, { emit: n }) {
|
|
3786
|
-
const t = ke(e, "modelValue"), a = e, o = n, i = k([]),
|
|
3787
|
-
M && (i.value[
|
|
3782
|
+
const t = ke(e, "modelValue"), a = e, o = n, i = k([]), s = k("next"), l = k(null), r = `gallery-caption-${ge()}`, c = k(null), u = _(() => t.value), f = _(() => a.images[u.value]), m = (M, B) => {
|
|
3783
|
+
M && (i.value[B] = M);
|
|
3788
3784
|
}, C = (M) => {
|
|
3789
|
-
M !== u.value && (
|
|
3785
|
+
M !== u.value && (s.value = M > u.value ? "next" : "prev", t.value = M, o("change", M));
|
|
3790
3786
|
}, h = () => {
|
|
3791
3787
|
if (u.value === a.images.length - 1) {
|
|
3792
3788
|
a.loop && C(0);
|
|
@@ -3799,28 +3795,28 @@ const je = (e) => [...e].map((n) => n === "9" ? { type: "digit" } : n === "A" ?
|
|
|
3799
3795
|
return;
|
|
3800
3796
|
}
|
|
3801
3797
|
C(u.value - 1);
|
|
3802
|
-
},
|
|
3798
|
+
}, R = () => {
|
|
3803
3799
|
c.value && (l.value = c.value.offsetHeight);
|
|
3804
|
-
},
|
|
3800
|
+
}, E = () => {
|
|
3805
3801
|
l.value = null;
|
|
3806
3802
|
};
|
|
3807
3803
|
return Q(u, async (M) => {
|
|
3808
3804
|
await xe();
|
|
3809
|
-
const
|
|
3810
|
-
|
|
3805
|
+
const B = i.value[M];
|
|
3806
|
+
B && B.scrollIntoView({
|
|
3811
3807
|
behavior: window.matchMedia("(prefers-reduced-motion: reduce)").matches ? "auto" : "smooth",
|
|
3812
3808
|
inline: "center",
|
|
3813
3809
|
block: "nearest"
|
|
3814
3810
|
});
|
|
3815
3811
|
}), Q(() => a.images, () => {
|
|
3816
3812
|
i.value = [];
|
|
3817
|
-
}), (M,
|
|
3813
|
+
}), (M, B) => (p(), b("div", {
|
|
3818
3814
|
role: "region",
|
|
3819
3815
|
class: "rs-gallery",
|
|
3820
3816
|
"aria-roledescription": "carousel",
|
|
3821
3817
|
"aria-label": e.ariaLabel || "Image gallery",
|
|
3822
3818
|
"aria-live": "polite",
|
|
3823
|
-
"aria-describedby":
|
|
3819
|
+
"aria-describedby": r
|
|
3824
3820
|
}, [
|
|
3825
3821
|
w("div", {
|
|
3826
3822
|
ref_key: "previewRef",
|
|
@@ -3834,31 +3830,31 @@ const je = (e) => [...e].map((n) => n === "9" ? { type: "digit" } : n === "A" ?
|
|
|
3834
3830
|
]
|
|
3835
3831
|
}, [
|
|
3836
3832
|
K(Ae, {
|
|
3837
|
-
name: `rs-gallery-slide-${
|
|
3833
|
+
name: `rs-gallery-slide-${s.value}`,
|
|
3838
3834
|
mode: "out-in",
|
|
3839
|
-
onBeforeLeave:
|
|
3840
|
-
onAfterEnter:
|
|
3835
|
+
onBeforeLeave: R,
|
|
3836
|
+
onAfterEnter: E
|
|
3841
3837
|
}, {
|
|
3842
3838
|
default: J(() => [
|
|
3843
|
-
|
|
3844
|
-
key:
|
|
3845
|
-
src:
|
|
3846
|
-
alt:
|
|
3839
|
+
f.value ? (p(), ae(ze, {
|
|
3840
|
+
key: f.value.src,
|
|
3841
|
+
src: f.value.src,
|
|
3842
|
+
alt: f.value.alt || "",
|
|
3847
3843
|
transform: e.transform
|
|
3848
3844
|
}, null, 8, ["src", "alt", "transform"])) : q("", !0)
|
|
3849
3845
|
]),
|
|
3850
3846
|
_: 1
|
|
3851
3847
|
}, 8, ["name"]),
|
|
3852
3848
|
G(M.$slots, "overlay", {
|
|
3853
|
-
image:
|
|
3849
|
+
image: f.value,
|
|
3854
3850
|
index: u.value
|
|
3855
3851
|
}, void 0, !0)
|
|
3856
3852
|
], 44, co),
|
|
3857
|
-
|
|
3853
|
+
f.value?.title ? (p(), b("p", {
|
|
3858
3854
|
key: 0,
|
|
3859
|
-
id:
|
|
3855
|
+
id: r,
|
|
3860
3856
|
class: "rs-gallery-caption"
|
|
3861
|
-
}, j(
|
|
3857
|
+
}, j(f.value.title), 1)) : q("", !0),
|
|
3862
3858
|
e.showThumbnails ? (p(), b("ul", vo, [
|
|
3863
3859
|
(p(!0), b(de, null, he(e.images, (z, U) => (p(), b("li", {
|
|
3864
3860
|
key: z.src,
|
|
@@ -3934,97 +3930,97 @@ const lt = Z({
|
|
|
3934
3930
|
},
|
|
3935
3931
|
emits: ["update:open", "opened", "closed"],
|
|
3936
3932
|
setup(e, { emit: n, slots: t }) {
|
|
3937
|
-
const a = k(!1), o = k(e.open), i = ge(),
|
|
3938
|
-
Q(() => e.open, (
|
|
3939
|
-
n("update:open",
|
|
3933
|
+
const a = k(!1), o = k(e.open), i = ge(), s = `modal-title-${i}`, l = `modal-desc-${i}`;
|
|
3934
|
+
Q(() => e.open, (f) => o.value = f), Q(o, (f) => {
|
|
3935
|
+
n("update:open", f), n(f ? "opened" : "closed");
|
|
3940
3936
|
});
|
|
3941
|
-
const
|
|
3937
|
+
const r = () => o.value = !1, c = _(() => e.motion), u = _(() => e.size);
|
|
3942
3938
|
return He(Ge, {
|
|
3943
3939
|
isOpen: o,
|
|
3944
3940
|
motion: c,
|
|
3945
3941
|
size: u,
|
|
3946
|
-
close:
|
|
3942
|
+
close: r,
|
|
3947
3943
|
closeOnOverlay: e.closeOnOverlay,
|
|
3948
|
-
labelId:
|
|
3944
|
+
labelId: s,
|
|
3949
3945
|
descriptionId: l,
|
|
3950
3946
|
hasTitle: a
|
|
3951
3947
|
}), () => t.default?.();
|
|
3952
3948
|
}
|
|
3953
3949
|
}), Dt = Z({
|
|
3954
3950
|
name: "ModalContent",
|
|
3955
|
-
setup(e, { slots: n }) {
|
|
3956
|
-
const
|
|
3957
|
-
if (!
|
|
3958
|
-
const
|
|
3959
|
-
let
|
|
3960
|
-
const
|
|
3961
|
-
|
|
3951
|
+
setup(e, { slots: n, attrs: t }) {
|
|
3952
|
+
const a = me(Ge);
|
|
3953
|
+
if (!a) throw new Error("ModalContent components must be used inside <Modal>");
|
|
3954
|
+
const o = k(null);
|
|
3955
|
+
let i = 0;
|
|
3956
|
+
const s = (m) => {
|
|
3957
|
+
m.key === "Escape" && i === nt && a.close();
|
|
3962
3958
|
};
|
|
3963
|
-
let
|
|
3964
|
-
const
|
|
3965
|
-
const
|
|
3966
|
-
|
|
3959
|
+
let l = !1, r = null;
|
|
3960
|
+
const c = (m) => {
|
|
3961
|
+
const C = Array.from(
|
|
3962
|
+
m.querySelectorAll(
|
|
3967
3963
|
'button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'
|
|
3968
3964
|
)
|
|
3969
|
-
).filter((
|
|
3970
|
-
if (
|
|
3971
|
-
|
|
3965
|
+
).filter((E) => !E.hasAttribute("disabled"));
|
|
3966
|
+
if (C.length === 0) {
|
|
3967
|
+
m.setAttribute("tabindex", "-1"), m.focus();
|
|
3972
3968
|
return;
|
|
3973
3969
|
}
|
|
3974
|
-
const
|
|
3975
|
-
|
|
3970
|
+
const h = C[0], L = C[C.length - 1], R = (E) => {
|
|
3971
|
+
E.key === "Tab" && (E.shiftKey && document.activeElement === h ? (E.preventDefault(), L?.focus()) : !E.shiftKey && document.activeElement === L && (E.preventDefault(), h?.focus()));
|
|
3976
3972
|
};
|
|
3977
|
-
|
|
3978
|
-
|
|
3973
|
+
m.addEventListener("keydown", R), h?.focus(), r = () => {
|
|
3974
|
+
m.removeEventListener("keydown", R), r = null;
|
|
3979
3975
|
};
|
|
3980
|
-
}, c = () => {
|
|
3981
|
-
++Ue === 1 && (document.body.style.overflow = "hidden");
|
|
3982
3976
|
}, u = () => {
|
|
3977
|
+
++Ue === 1 && (document.body.style.overflow = "hidden");
|
|
3978
|
+
}, f = () => {
|
|
3983
3979
|
--Ue === 0 && (document.body.style.overflow = "");
|
|
3984
3980
|
};
|
|
3985
3981
|
return Be(() => {
|
|
3986
|
-
|
|
3982
|
+
r?.(), document.removeEventListener("keydown", s), Ue > 0 && Ue--, Ue === 0 && (document.body.style.overflow = "");
|
|
3987
3983
|
}), () => W(
|
|
3988
3984
|
Fe,
|
|
3989
3985
|
{ to: "body" },
|
|
3990
3986
|
W(
|
|
3991
3987
|
Ae,
|
|
3992
3988
|
{
|
|
3993
|
-
name: `modal-${
|
|
3989
|
+
name: `modal-${a.motion.value}`,
|
|
3994
3990
|
appear: !0,
|
|
3995
3991
|
onEnter: () => {
|
|
3996
|
-
|
|
3992
|
+
i = ++nt, Ke = document.activeElement, u();
|
|
3997
3993
|
},
|
|
3998
3994
|
onAfterEnter: () => {
|
|
3999
|
-
|
|
3995
|
+
o.value && (c(o.value), document.addEventListener("keydown", s));
|
|
4000
3996
|
},
|
|
4001
3997
|
onAfterLeave: () => {
|
|
4002
|
-
nt--, document.removeEventListener("keydown",
|
|
3998
|
+
nt--, document.removeEventListener("keydown", s), r?.(), f(), Ke && document.contains(Ke) && Ke.focus(), Ke = null;
|
|
4003
3999
|
}
|
|
4004
4000
|
},
|
|
4005
4001
|
{
|
|
4006
|
-
default: () =>
|
|
4002
|
+
default: () => a.isOpen.value ? W(
|
|
4007
4003
|
"div",
|
|
4008
4004
|
{
|
|
4009
4005
|
class: "modal-overlay",
|
|
4010
|
-
onMousedown: (
|
|
4011
|
-
|
|
4006
|
+
onMousedown: (m) => {
|
|
4007
|
+
l = m.target === m.currentTarget;
|
|
4012
4008
|
},
|
|
4013
|
-
onMouseup: (
|
|
4014
|
-
const
|
|
4015
|
-
|
|
4009
|
+
onMouseup: (m) => {
|
|
4010
|
+
const C = m.target === m.currentTarget;
|
|
4011
|
+
a.closeOnOverlay && l && C && a.close(), l = !1;
|
|
4016
4012
|
}
|
|
4017
4013
|
},
|
|
4018
4014
|
W(
|
|
4019
4015
|
"div",
|
|
4020
4016
|
{
|
|
4021
|
-
ref:
|
|
4017
|
+
ref: o,
|
|
4022
4018
|
role: "dialog",
|
|
4023
4019
|
"aria-modal": "true",
|
|
4024
|
-
"aria-labelledby":
|
|
4025
|
-
"aria-describedby":
|
|
4026
|
-
class: ["modal-content", `modal--${
|
|
4027
|
-
onClick: (
|
|
4020
|
+
"aria-labelledby": a.labelId,
|
|
4021
|
+
"aria-describedby": a.descriptionId,
|
|
4022
|
+
class: ["modal-content", `modal--${a.size.value}`, t.class],
|
|
4023
|
+
onClick: (m) => m.stopPropagation()
|
|
4028
4024
|
},
|
|
4029
4025
|
n.default?.()
|
|
4030
4026
|
)
|
|
@@ -4095,7 +4091,7 @@ const yo = /* @__PURE__ */ Z({
|
|
|
4095
4091
|
const n = k(0), t = k(!1), a = (i) => {
|
|
4096
4092
|
n.value = i, t.value = !0;
|
|
4097
4093
|
}, o = () => t.value = !1;
|
|
4098
|
-
return (i,
|
|
4094
|
+
return (i, s) => (p(), b(de, null, [
|
|
4099
4095
|
K(Tt, {
|
|
4100
4096
|
images: e.images,
|
|
4101
4097
|
onChange: a,
|
|
@@ -4104,7 +4100,7 @@ const yo = /* @__PURE__ */ Z({
|
|
|
4104
4100
|
}, null, 8, ["images", "aria-label", "transform"]),
|
|
4105
4101
|
K(N(lt), {
|
|
4106
4102
|
open: t.value,
|
|
4107
|
-
"onUpdate:open":
|
|
4103
|
+
"onUpdate:open": s[2] || (s[2] = (l) => t.value = l),
|
|
4108
4104
|
motion: "fade",
|
|
4109
4105
|
size: "xl"
|
|
4110
4106
|
}, {
|
|
@@ -4114,7 +4110,7 @@ const yo = /* @__PURE__ */ Z({
|
|
|
4114
4110
|
K(N(zt), null, {
|
|
4115
4111
|
default: J(() => [
|
|
4116
4112
|
K(N(Zt), null, {
|
|
4117
|
-
default: J(() => [...
|
|
4113
|
+
default: J(() => [...s[3] || (s[3] = [
|
|
4118
4114
|
Me("Image Gallery", -1)
|
|
4119
4115
|
])]),
|
|
4120
4116
|
_: 1
|
|
@@ -4127,9 +4123,9 @@ const yo = /* @__PURE__ */ Z({
|
|
|
4127
4123
|
default: J(() => [
|
|
4128
4124
|
K(St, {
|
|
4129
4125
|
modelValue: n.value,
|
|
4130
|
-
"onUpdate:modelValue":
|
|
4126
|
+
"onUpdate:modelValue": s[0] || (s[0] = (l) => n.value = l),
|
|
4131
4127
|
images: e.images,
|
|
4132
|
-
onChange:
|
|
4128
|
+
onChange: s[1] || (s[1] = (l) => i.$emit("change", l)),
|
|
4133
4129
|
onClose: o,
|
|
4134
4130
|
"aria-label": e.ariaLabel,
|
|
4135
4131
|
"transform-thumbnails": e.transform
|
|
@@ -4197,17 +4193,17 @@ const yo = /* @__PURE__ */ Z({
|
|
|
4197
4193
|
}),
|
|
4198
4194
|
emits: /* @__PURE__ */ ie(["change"], ["update:modelValue"]),
|
|
4199
4195
|
setup(e, { emit: n }) {
|
|
4200
|
-
const t = ke(e, "modelValue"), a = n, o =
|
|
4196
|
+
const t = ke(e, "modelValue"), a = n, o = _({
|
|
4201
4197
|
get: () => t.value ?? 0,
|
|
4202
|
-
set: (
|
|
4203
|
-
t.value =
|
|
4198
|
+
set: (s) => {
|
|
4199
|
+
t.value = s, a("change", s);
|
|
4204
4200
|
}
|
|
4205
|
-
}), i = (
|
|
4206
|
-
return (
|
|
4201
|
+
}), i = (s) => o.value = s;
|
|
4202
|
+
return (s, l) => (p(), b("section", Mo, [
|
|
4207
4203
|
e.layout === "carousel" ? (p(), ae(St, {
|
|
4208
4204
|
key: 0,
|
|
4209
4205
|
modelValue: o.value,
|
|
4210
|
-
"onUpdate:modelValue": l[0] || (l[0] = (
|
|
4206
|
+
"onUpdate:modelValue": l[0] || (l[0] = (r) => o.value = r),
|
|
4211
4207
|
images: e.images,
|
|
4212
4208
|
loop: e.loop,
|
|
4213
4209
|
"aria-label": e.ariaLabel,
|
|
@@ -4217,7 +4213,7 @@ const yo = /* @__PURE__ */ Z({
|
|
|
4217
4213
|
}, null, 8, ["modelValue", "images", "loop", "aria-label", "transform", "transform-thumbnails", "show-thumbnails"])) : e.layout === "grid" ? (p(), ae(Tt, {
|
|
4218
4214
|
key: 1,
|
|
4219
4215
|
modelValue: o.value,
|
|
4220
|
-
"onUpdate:modelValue": l[1] || (l[1] = (
|
|
4216
|
+
"onUpdate:modelValue": l[1] || (l[1] = (r) => o.value = r),
|
|
4221
4217
|
images: e.images,
|
|
4222
4218
|
onSelect: i,
|
|
4223
4219
|
columns: e.columns,
|
|
@@ -4227,14 +4223,14 @@ const yo = /* @__PURE__ */ Z({
|
|
|
4227
4223
|
}, null, 8, ["modelValue", "images", "columns", "gap", "transform", "aria-label"])) : e.layout === "grid-lightbox" ? (p(), ae(yo, {
|
|
4228
4224
|
key: 2,
|
|
4229
4225
|
modelValue: o.value,
|
|
4230
|
-
"onUpdate:modelValue": l[2] || (l[2] = (
|
|
4226
|
+
"onUpdate:modelValue": l[2] || (l[2] = (r) => o.value = r),
|
|
4231
4227
|
images: e.images,
|
|
4232
4228
|
transform: e.transform,
|
|
4233
4229
|
"aria-label": e.ariaLabel
|
|
4234
4230
|
}, null, 8, ["modelValue", "images", "transform", "aria-label"])) : e.layout === "masonry" ? (p(), ae(wo, {
|
|
4235
4231
|
key: 3,
|
|
4236
4232
|
modelValue: o.value,
|
|
4237
|
-
"onUpdate:modelValue": l[3] || (l[3] = (
|
|
4233
|
+
"onUpdate:modelValue": l[3] || (l[3] = (r) => o.value = r),
|
|
4238
4234
|
images: e.images,
|
|
4239
4235
|
transform: e.transform,
|
|
4240
4236
|
"aria-label": e.ariaLabel
|
|
@@ -4260,21 +4256,21 @@ const xo = ["aria-busy"], $o = {
|
|
|
4260
4256
|
!n.message || a.value !== null || o.value.length > 0 && (a.value = window.setInterval(() => {
|
|
4261
4257
|
t.value = t.value % 3 + 1, o.value = `${n.message}${".".repeat(t.value)}`;
|
|
4262
4258
|
}, 750));
|
|
4263
|
-
},
|
|
4259
|
+
}, s = () => {
|
|
4264
4260
|
a.value !== null && (clearInterval(a.value), a.value = null);
|
|
4265
4261
|
};
|
|
4266
4262
|
return Q(
|
|
4267
4263
|
() => n.message,
|
|
4268
|
-
(l,
|
|
4269
|
-
l !==
|
|
4264
|
+
(l, r) => {
|
|
4265
|
+
l !== r && (o.value = l || "", s());
|
|
4270
4266
|
}
|
|
4271
|
-
), ve(i), Be(
|
|
4267
|
+
), ve(i), Be(s), (l, r) => (p(), b("div", {
|
|
4272
4268
|
class: "spinner-container",
|
|
4273
4269
|
role: "status",
|
|
4274
4270
|
"aria-live": "polite",
|
|
4275
4271
|
"aria-busy": !!e.message
|
|
4276
4272
|
}, [
|
|
4277
|
-
|
|
4273
|
+
r[0] || (r[0] = w("div", {
|
|
4278
4274
|
class: "spinner",
|
|
4279
4275
|
"aria-hidden": "true"
|
|
4280
4276
|
}, null, -1)),
|
|
@@ -4306,7 +4302,7 @@ const xo = ["aria-busy"], $o = {
|
|
|
4306
4302
|
}),
|
|
4307
4303
|
emits: /* @__PURE__ */ ie(["change"], ["update:modelValue"]),
|
|
4308
4304
|
setup(e, { emit: n }) {
|
|
4309
|
-
const t = n, a = ke(e, "modelValue"), o = e, i = ge(),
|
|
4305
|
+
const t = n, a = ke(e, "modelValue"), o = e, i = ge(), s = _(() => o.id ?? `checkbox-${i}`), l = k(null), r = jn(o).value, c = _(() => o.required ? !0 : void 0), u = _(() => o.triState && a.value === void 0 ? "mixed" : void 0);
|
|
4310
4306
|
Q(
|
|
4311
4307
|
() => a.value,
|
|
4312
4308
|
(m) => {
|
|
@@ -4314,7 +4310,7 @@ const xo = ["aria-busy"], $o = {
|
|
|
4314
4310
|
},
|
|
4315
4311
|
{ immediate: !0 }
|
|
4316
4312
|
);
|
|
4317
|
-
const
|
|
4313
|
+
const f = (m) => {
|
|
4318
4314
|
if (!o.disabled) {
|
|
4319
4315
|
if (!o.triState) {
|
|
4320
4316
|
const C = m.target.checked;
|
|
@@ -4328,17 +4324,17 @@ const xo = ["aria-busy"], $o = {
|
|
|
4328
4324
|
class: fe(["checkbox-root", { required: c.value, error: e.invalid }])
|
|
4329
4325
|
}, [
|
|
4330
4326
|
w("input", {
|
|
4331
|
-
id:
|
|
4327
|
+
id: s.value,
|
|
4332
4328
|
type: "checkbox",
|
|
4333
4329
|
class: "checkbox",
|
|
4334
4330
|
required: c.value,
|
|
4335
4331
|
checked: a.value === !0,
|
|
4336
4332
|
disabled: e.disabled,
|
|
4337
4333
|
"aria-invalid": e.invalid ? "true" : void 0,
|
|
4338
|
-
"aria-disabled": N(
|
|
4334
|
+
"aria-disabled": N(r),
|
|
4339
4335
|
"aria-checked": u.value,
|
|
4340
|
-
onClick: C[0] || (C[0] = (h) => e.triState ?
|
|
4341
|
-
onChange: C[1] || (C[1] = (h) => e.triState ? void 0 :
|
|
4336
|
+
onClick: C[0] || (C[0] = (h) => e.triState ? f(h) : void 0),
|
|
4337
|
+
onChange: C[1] || (C[1] = (h) => e.triState ? void 0 : f(h)),
|
|
4342
4338
|
ref_key: "inputRef",
|
|
4343
4339
|
ref: l
|
|
4344
4340
|
}, null, 40, Vo),
|
|
@@ -4376,41 +4372,41 @@ const xo = ["aria-busy"], $o = {
|
|
|
4376
4372
|
}),
|
|
4377
4373
|
emits: /* @__PURE__ */ ie(["focus", "blur"], ["update:modelValue"]),
|
|
4378
4374
|
setup(e, { emit: n }) {
|
|
4379
|
-
const t = ke(e, "modelValue"), a = st(), o = it(), i = n,
|
|
4380
|
-
const z =
|
|
4381
|
-
t.value =
|
|
4382
|
-
},
|
|
4383
|
-
|
|
4384
|
-
},
|
|
4385
|
-
|
|
4386
|
-
}, M =
|
|
4387
|
-
return (
|
|
4388
|
-
class: fe(["textarea-box", { required: N(
|
|
4375
|
+
const t = ke(e, "modelValue"), a = st(), o = it(), i = n, s = e, l = ge(), r = k(!1), c = `${l}-error`, u = `${l}-hint`, f = Xe(a).value, m = _(() => t.value !== null && t.value !== void 0 && t.value !== ""), C = _(() => f ? `${u} ${l}-required-hint` : u), h = dt(s, o, c, C.value).value, L = (B) => {
|
|
4376
|
+
const z = B.target;
|
|
4377
|
+
t.value = s.type === "number" ? Number(z.value) : z.value;
|
|
4378
|
+
}, R = (B) => {
|
|
4379
|
+
r.value = !0, i("focus", B);
|
|
4380
|
+
}, E = (B) => {
|
|
4381
|
+
r.value = !1, i("blur", B);
|
|
4382
|
+
}, M = _(() => s.invalid === !0 && s.errorMessage ? c : void 0);
|
|
4383
|
+
return (B, z) => (p(), b("div", {
|
|
4384
|
+
class: fe(["textarea-box", { required: N(f), error: e.invalid, filled: m.value, focused: r.value }])
|
|
4389
4385
|
}, [
|
|
4390
4386
|
w("label", {
|
|
4391
4387
|
for: e.id,
|
|
4392
4388
|
class: "label"
|
|
4393
4389
|
}, j(e.label), 9, So),
|
|
4394
|
-
w("textarea", be({ id: e.id },
|
|
4390
|
+
w("textarea", be({ id: e.id }, B.$attrs, {
|
|
4395
4391
|
class: "custom-textarea",
|
|
4396
|
-
onFocus: z[0] || (z[0] = (U) =>
|
|
4397
|
-
onBlur: z[1] || (z[1] = (U) =>
|
|
4392
|
+
onFocus: z[0] || (z[0] = (U) => R(U)),
|
|
4393
|
+
onBlur: z[1] || (z[1] = (U) => E(U)),
|
|
4398
4394
|
onInput: L,
|
|
4399
4395
|
value: t.value,
|
|
4400
|
-
required: N(
|
|
4396
|
+
required: N(f),
|
|
4401
4397
|
"aria-invalid": e.invalid ? "true" : void 0,
|
|
4402
4398
|
"aria-errormessage": M.value,
|
|
4403
4399
|
"aria-describedby": N(h)
|
|
4404
4400
|
}), " ", 16, To),
|
|
4405
4401
|
K(vt, { hintId: u }, {
|
|
4406
4402
|
default: J(() => [
|
|
4407
|
-
G(
|
|
4403
|
+
G(B.$slots, "hint", {}, void 0, !0)
|
|
4408
4404
|
]),
|
|
4409
4405
|
_: 3
|
|
4410
4406
|
}),
|
|
4411
4407
|
K(ft, {
|
|
4412
4408
|
baseId: N(l),
|
|
4413
|
-
isRequired: N(
|
|
4409
|
+
isRequired: N(f)
|
|
4414
4410
|
}, null, 8, ["baseId", "isRequired"]),
|
|
4415
4411
|
K(pt, {
|
|
4416
4412
|
errorId: c,
|
|
@@ -4428,9 +4424,9 @@ const xo = ["aria-busy"], $o = {
|
|
|
4428
4424
|
setup(e) {
|
|
4429
4425
|
const n = (t, a) => {
|
|
4430
4426
|
if (!a) return [{ text: t, match: !1 }];
|
|
4431
|
-
const o = a.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), i = new RegExp(o, "ig"),
|
|
4427
|
+
const o = a.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), i = new RegExp(o, "ig"), s = [];
|
|
4432
4428
|
let l = 0;
|
|
4433
|
-
return t.replace(i, (
|
|
4429
|
+
return t.replace(i, (r, c) => (c > l && s.push({ text: t.slice(l, c), match: !1 }), s.push({ text: r, match: !0 }), l = c + r.length, r)), l < t.length && s.push({ text: t.slice(l), match: !1 }), s;
|
|
4434
4430
|
};
|
|
4435
4431
|
return (t, a) => (p(!0), b(de, null, he(n(e.text, e.query), (o, i) => (p(), b(de, { key: i }, [
|
|
4436
4432
|
o.match ? (p(), b("mark", Zo, j(o.text), 1)) : (p(), b("span", zo, j(o.text), 1))
|
|
@@ -4474,7 +4470,7 @@ const xo = ["aria-busy"], $o = {
|
|
|
4474
4470
|
},
|
|
4475
4471
|
emits: ["valid"],
|
|
4476
4472
|
setup(e, { emit: n }) {
|
|
4477
|
-
const t = e, a = n, o = k([]), i = k(null),
|
|
4473
|
+
const t = e, a = n, o = k([]), i = k(null), s = k(null), l = (C, h) => C && (o.value[h] = C);
|
|
4478
4474
|
Q(
|
|
4479
4475
|
() => t.password,
|
|
4480
4476
|
() => {
|
|
@@ -4486,19 +4482,19 @@ const xo = ["aria-busy"], $o = {
|
|
|
4486
4482
|
a("valid", c());
|
|
4487
4483
|
}
|
|
4488
4484
|
);
|
|
4489
|
-
const
|
|
4485
|
+
const r = {
|
|
4490
4486
|
"--strength-fill-color": t.strengthFillColor
|
|
4491
4487
|
}, c = () => {
|
|
4492
|
-
const C = u(), h = Object.values(
|
|
4488
|
+
const C = u(), h = Object.values(f()).every(Boolean);
|
|
4493
4489
|
return C && h;
|
|
4494
4490
|
}, u = () => {
|
|
4495
|
-
const C =
|
|
4496
|
-
return i.value && (i.value.style.width = `${
|
|
4497
|
-
},
|
|
4491
|
+
const C = f(), h = Object.values(C).filter(Boolean).length, L = t.password.length >= 12 ? 1 : 0, R = Math.min(100, (h + L) * 20), E = Math.min(t.labels.length - 1, Math.floor(R / 25));
|
|
4492
|
+
return i.value && (i.value.style.width = `${R}%`), s.value && (s.value.textContent = t.labels[E] ?? "Very weak"), h === t.rules.length;
|
|
4493
|
+
}, f = () => {
|
|
4498
4494
|
const C = m();
|
|
4499
4495
|
return o.value.forEach((h) => {
|
|
4500
|
-
const L = h.dataset.rule,
|
|
4501
|
-
h.classList.toggle("passed",
|
|
4496
|
+
const L = h.dataset.rule, R = !!C[L];
|
|
4497
|
+
h.classList.toggle("passed", R);
|
|
4502
4498
|
}), C;
|
|
4503
4499
|
}, m = () => {
|
|
4504
4500
|
const C = {};
|
|
@@ -4511,12 +4507,12 @@ const xo = ["aria-busy"], $o = {
|
|
|
4511
4507
|
};
|
|
4512
4508
|
return (C, h) => (p(), b("section", Fo, [
|
|
4513
4509
|
w("ul", Po, [
|
|
4514
|
-
(p(!0), b(de, null, he(t.rules, (L,
|
|
4510
|
+
(p(!0), b(de, null, he(t.rules, (L, R) => (p(), b("li", {
|
|
4515
4511
|
key: L.key,
|
|
4516
4512
|
class: "password-rule",
|
|
4517
4513
|
"data-rule": L.key,
|
|
4518
4514
|
ref_for: !0,
|
|
4519
|
-
ref: (
|
|
4515
|
+
ref: (E) => l(E, R)
|
|
4520
4516
|
}, [
|
|
4521
4517
|
h[0] || (h[0] = w("span", { class: "rule-icon" }, "•", -1)),
|
|
4522
4518
|
Me(" " + j(L.label), 1)
|
|
@@ -4527,12 +4523,12 @@ const xo = ["aria-busy"], $o = {
|
|
|
4527
4523
|
h[1] || (h[1] = w("span", null, "Força da senha", -1)),
|
|
4528
4524
|
w("span", {
|
|
4529
4525
|
ref_key: "strengthLabelRef",
|
|
4530
|
-
ref:
|
|
4526
|
+
ref: s
|
|
4531
4527
|
}, "Muito fraca", 512)
|
|
4532
4528
|
]),
|
|
4533
4529
|
w("div", {
|
|
4534
4530
|
class: "strength-bar",
|
|
4535
|
-
style:
|
|
4531
|
+
style: r
|
|
4536
4532
|
}, [
|
|
4537
4533
|
w("div", {
|
|
4538
4534
|
class: "strength-fill",
|
|
@@ -4561,19 +4557,19 @@ const Yo = {
|
|
|
4561
4557
|
separator: { default: "/" }
|
|
4562
4558
|
},
|
|
4563
4559
|
setup(e) {
|
|
4564
|
-
const n = e, t = me(Xt), a = (l) => l === n.items.length - 1, o = (l,
|
|
4560
|
+
const n = e, t = me(Xt), a = (l) => l === n.items.length - 1, o = (l, r) => i(l, r), i = (l, r) => a(r) || l.disabled ? "span" : l.to && t ? Ut("RouterLink") : l.href ? "a" : "span", s = (l, r) => a(r) || l.disabled ? { "data-disabled": l.disabled || void 0 } : l.to ? { to: l.to } : l.href ? {
|
|
4565
4561
|
href: l.href,
|
|
4566
4562
|
target: l.external ? "_blank" : void 0,
|
|
4567
4563
|
rel: l.external ? "noopener noreferrer" : void 0,
|
|
4568
4564
|
"aria-label": l.external ? `${l.label} (opens in a new tab)` : void 0
|
|
4569
4565
|
} : {};
|
|
4570
|
-
return (l,
|
|
4566
|
+
return (l, r) => (p(), b("nav", Yo, [
|
|
4571
4567
|
w("ol", Xo, [
|
|
4572
4568
|
(p(!0), b(de, null, he(e.items, (c, u) => (p(), b("li", {
|
|
4573
4569
|
key: c.to ?? c.href ?? `${c.label}-${u}`,
|
|
4574
4570
|
class: "ui-breadcrumb__item"
|
|
4575
4571
|
}, [
|
|
4576
|
-
(p(), ae(Ne(o(c, u)), be({ class: "ui-breadcrumb__link" }, { ref_for: !0 },
|
|
4572
|
+
(p(), ae(Ne(o(c, u)), be({ class: "ui-breadcrumb__link" }, { ref_for: !0 }, s(c, u), {
|
|
4577
4573
|
"aria-posinset": u + 1,
|
|
4578
4574
|
"aria-setsize": e.items.length,
|
|
4579
4575
|
"aria-current": a(u) ? "page" : void 0,
|
|
@@ -4615,24 +4611,24 @@ const Yo = {
|
|
|
4615
4611
|
}),
|
|
4616
4612
|
emits: ["update:modelValue"],
|
|
4617
4613
|
setup(e) {
|
|
4618
|
-
const n = e, t = ke(e, "modelValue"), a =
|
|
4619
|
-
return (
|
|
4614
|
+
const n = e, t = ke(e, "modelValue"), a = _(() => n.invalid ? "true" : void 0), o = _(() => n.required && !n.disabled ? "true" : void 0), i = _(() => n.disabled ? !0 : void 0);
|
|
4615
|
+
return (s, l) => (p(), b("fieldset", {
|
|
4620
4616
|
class: fe(["radio-group", { "in-column": e.inColumn, btn: e.mode === "button" }]),
|
|
4621
4617
|
"aria-invalid": a.value,
|
|
4622
4618
|
"aria-required": o.value,
|
|
4623
4619
|
disabled: i.value
|
|
4624
4620
|
}, [
|
|
4625
4621
|
w("legend", e2, j(e.name), 1),
|
|
4626
|
-
(p(!0), b(de, null, he(e.options, (
|
|
4627
|
-
key:
|
|
4628
|
-
class: fe(["radio", { checked: t.value ===
|
|
4622
|
+
(p(!0), b(de, null, he(e.options, (r) => (p(), b("label", {
|
|
4623
|
+
key: r.key,
|
|
4624
|
+
class: fe(["radio", { checked: t.value === r.key, disabled: e.disabled || r.disabled }])
|
|
4629
4625
|
}, [
|
|
4630
4626
|
_e(w("input", {
|
|
4631
4627
|
type: "radio",
|
|
4632
4628
|
class: "radio-input",
|
|
4633
4629
|
name: e.name,
|
|
4634
|
-
value:
|
|
4635
|
-
disabled: e.disabled ||
|
|
4630
|
+
value: r.key,
|
|
4631
|
+
disabled: e.disabled || r.disabled,
|
|
4636
4632
|
required: e.required,
|
|
4637
4633
|
"onUpdate:modelValue": l[0] || (l[0] = (c) => t.value = c)
|
|
4638
4634
|
}, null, 8, t2), [
|
|
@@ -4640,12 +4636,12 @@ const Yo = {
|
|
|
4640
4636
|
]),
|
|
4641
4637
|
e.mode === "standard" ? (p(), b("span", a2)) : q("", !0),
|
|
4642
4638
|
w("span", n2, [
|
|
4643
|
-
|
|
4639
|
+
r.icon ? (p(), ae(Ce, {
|
|
4644
4640
|
key: 0,
|
|
4645
|
-
name:
|
|
4641
|
+
name: r.icon,
|
|
4646
4642
|
size: 22
|
|
4647
4643
|
}, null, 8, ["name"])) : q("", !0),
|
|
4648
|
-
Me(" " + j(
|
|
4644
|
+
Me(" " + j(r.label), 1)
|
|
4649
4645
|
])
|
|
4650
4646
|
], 2))), 128))
|
|
4651
4647
|
], 10, Qo));
|
|
@@ -4692,19 +4688,19 @@ const Yo = {
|
|
|
4692
4688
|
}),
|
|
4693
4689
|
emits: /* @__PURE__ */ ie(["change", "select", "focus", "blur"], ["update:modelValue"]),
|
|
4694
4690
|
setup(e, { emit: n }) {
|
|
4695
|
-
const t = e, a = n, o = ke(e, "modelValue"), i = k(null),
|
|
4691
|
+
const t = e, a = n, o = ke(e, "modelValue"), i = k(null), s = k(""), l = k(!1), r = k([]), c = k(null), u = k(null), f = _(() => t.id ? `${t.id}-search-history` : "search-history"), C = `${ge()}-list`, h = k(!1), L = _(() => o.value !== null && o.value !== void 0 && o.value !== ""), R = _(() => c.value !== null ? `${C}-option-${c.value}` : void 0), E = _(() => l.value && R.value ? R.value : void 0), M = _(() => r.value.length > 0), B = _(() => {
|
|
4696
4692
|
if (!t.filterable) return t.options;
|
|
4697
|
-
const I =
|
|
4693
|
+
const I = s.value.toLowerCase();
|
|
4698
4694
|
return t.options.filter((D) => t.getValue(D).toLowerCase().includes(I));
|
|
4699
4695
|
}), z = Xe(t).value;
|
|
4700
4696
|
Q(
|
|
4701
|
-
() =>
|
|
4697
|
+
() => f.value,
|
|
4702
4698
|
(I) => {
|
|
4703
4699
|
if (I)
|
|
4704
4700
|
try {
|
|
4705
|
-
|
|
4701
|
+
r.value = JSON.parse(localStorage.getItem(I) || "[]");
|
|
4706
4702
|
} catch {
|
|
4707
|
-
|
|
4703
|
+
r.value = [];
|
|
4708
4704
|
}
|
|
4709
4705
|
},
|
|
4710
4706
|
{ immediate: !0 }
|
|
@@ -4713,11 +4709,11 @@ const Yo = {
|
|
|
4713
4709
|
c.value = null;
|
|
4714
4710
|
return;
|
|
4715
4711
|
}
|
|
4716
|
-
|
|
4712
|
+
B.value.length !== 0 && (await xe(), A());
|
|
4717
4713
|
}), Q(
|
|
4718
4714
|
() => t.loading,
|
|
4719
4715
|
async (I) => {
|
|
4720
|
-
I || l.value &&
|
|
4716
|
+
I || l.value && B.value.length !== 0 && (await xe(), A());
|
|
4721
4717
|
}
|
|
4722
4718
|
), Q(
|
|
4723
4719
|
() => t.options,
|
|
@@ -4726,19 +4722,19 @@ const Yo = {
|
|
|
4726
4722
|
}
|
|
4727
4723
|
);
|
|
4728
4724
|
const U = (I) => {
|
|
4729
|
-
|
|
4725
|
+
s.value.length >= t.minChars && !t.filterable && !t.loading && (l.value = !0), h.value = !0, a("focus", I);
|
|
4730
4726
|
}, oe = (I) => {
|
|
4731
4727
|
const D = I.relatedTarget;
|
|
4732
|
-
i.value?.contains(D) || (l.value = !1, o.value ? x() :
|
|
4728
|
+
i.value?.contains(D) || (l.value = !1, o.value ? x() : s.value = "", h.value = !1, a("blur", I));
|
|
4733
4729
|
}, ue = (I, D) => {
|
|
4734
|
-
const
|
|
4735
|
-
if (!
|
|
4736
|
-
l.value = !1, g(
|
|
4730
|
+
const v = i.value;
|
|
4731
|
+
if (!v || t.isDisabled(I)) return;
|
|
4732
|
+
l.value = !1, g(s.value), u.value = D, c.value = D;
|
|
4737
4733
|
const d = t.getKey(I);
|
|
4738
|
-
d && d.toString().length > 0 ?
|
|
4734
|
+
d && d.toString().length > 0 ? v.classList.add("filled") : v.classList.remove("filled"), s.value = t.getValue(I), o.value = d, a("select", d);
|
|
4739
4735
|
}, re = (I) => {
|
|
4740
4736
|
if (!l.value && ["ArrowDown", "ArrowUp"].includes(I.key)) {
|
|
4741
|
-
l.value = !0, c.value = c.value ??
|
|
4737
|
+
l.value = !0, c.value = c.value ?? B.value.findIndex((D) => !t.isDisabled(D)), I.preventDefault();
|
|
4742
4738
|
return;
|
|
4743
4739
|
}
|
|
4744
4740
|
if (l.value) {
|
|
@@ -4752,7 +4748,7 @@ const Yo = {
|
|
|
4752
4748
|
}
|
|
4753
4749
|
if (I.key === "Enter") {
|
|
4754
4750
|
if (c.value === null) return;
|
|
4755
|
-
const D =
|
|
4751
|
+
const D = B.value[c.value];
|
|
4756
4752
|
if (!D || t.isDisabled(D)) return;
|
|
4757
4753
|
ue(D, c.value), l.value = !1, I.preventDefault();
|
|
4758
4754
|
}
|
|
@@ -4763,14 +4759,14 @@ const Yo = {
|
|
|
4763
4759
|
let D = c.value;
|
|
4764
4760
|
do
|
|
4765
4761
|
D += I;
|
|
4766
|
-
while (D >= 0 && D <
|
|
4767
|
-
D >= 0 && D <
|
|
4768
|
-
},
|
|
4769
|
-
|
|
4762
|
+
while (D >= 0 && D < B.value.length && t.isDisabled(B.value[D]));
|
|
4763
|
+
D >= 0 && D < B.value.length && (c.value = D);
|
|
4764
|
+
}, S = () => {
|
|
4765
|
+
s.value.length === 0 && (o.value = ""), s.value.length >= t.minChars ? (a("change", s.value), l.value = !0) : l.value = !1;
|
|
4770
4766
|
}, x = () => {
|
|
4771
4767
|
if (o.value.toString().length === 0) return;
|
|
4772
4768
|
const I = t.options.findIndex((D) => t.getKey(D) === o.value);
|
|
4773
|
-
I > -1 ? (c.value = I, u.value = I,
|
|
4769
|
+
I > -1 ? (c.value = I, u.value = I, s.value = t.getValue(t.options[I])) : s.value = o.value.toString();
|
|
4774
4770
|
};
|
|
4775
4771
|
Q(
|
|
4776
4772
|
[() => t.options.length, () => o.value],
|
|
@@ -4780,19 +4776,19 @@ const Yo = {
|
|
|
4780
4776
|
{ flush: "post", immediate: !0 }
|
|
4781
4777
|
);
|
|
4782
4778
|
const V = () => {
|
|
4783
|
-
|
|
4779
|
+
s.value = "", o.value = "";
|
|
4784
4780
|
}, g = (I) => {
|
|
4785
|
-
!I || I.trim().length === 0 || (
|
|
4781
|
+
!I || I.trim().length === 0 || (r.value = [
|
|
4786
4782
|
I,
|
|
4787
|
-
...
|
|
4788
|
-
].slice(0, t.suggestionsLimit), localStorage.setItem(
|
|
4783
|
+
...r.value.filter((D) => D !== I)
|
|
4784
|
+
].slice(0, t.suggestionsLimit), localStorage.setItem(f.value, JSON.stringify(r.value)));
|
|
4789
4785
|
}, T = (I) => {
|
|
4790
|
-
|
|
4791
|
-
},
|
|
4786
|
+
s.value = I, S();
|
|
4787
|
+
}, A = () => {
|
|
4792
4788
|
const I = F();
|
|
4793
4789
|
I >= 0 && (c.value = I);
|
|
4794
|
-
}, F = () =>
|
|
4795
|
-
for (let I =
|
|
4790
|
+
}, F = () => B.value.findIndex((I) => !t.isDisabled(I)), H = () => {
|
|
4791
|
+
for (let I = B.value.length - 1; I >= 0; I--) if (!t.isDisabled(B.value[I])) return I;
|
|
4796
4792
|
return -1;
|
|
4797
4793
|
}, O = async () => {
|
|
4798
4794
|
await xe(), requestAnimationFrame(() => {
|
|
@@ -4816,18 +4812,18 @@ const Yo = {
|
|
|
4816
4812
|
"aria-autocomplete": "list",
|
|
4817
4813
|
"aria-expanded": l.value,
|
|
4818
4814
|
"aria-controls": C,
|
|
4819
|
-
"aria-activedescendant":
|
|
4815
|
+
"aria-activedescendant": E.value,
|
|
4820
4816
|
"aria-required": N(z),
|
|
4821
4817
|
"aria-invalid": e.invalid ? "true" : void 0,
|
|
4822
4818
|
disabled: e.disabled ? !0 : void 0,
|
|
4823
4819
|
"aria-disabled": e.disabled ? !0 : void 0,
|
|
4824
|
-
"onUpdate:modelValue": D[0] || (D[0] = (
|
|
4820
|
+
"onUpdate:modelValue": D[0] || (D[0] = (v) => s.value = v),
|
|
4825
4821
|
onFocus: U,
|
|
4826
4822
|
onBlur: oe,
|
|
4827
|
-
onInput:
|
|
4823
|
+
onInput: S,
|
|
4828
4824
|
onKeydown: re
|
|
4829
4825
|
}), null, 16, r2), [
|
|
4830
|
-
[jt,
|
|
4826
|
+
[jt, s.value]
|
|
4831
4827
|
]),
|
|
4832
4828
|
K(Ae, { name: "select" }, {
|
|
4833
4829
|
default: J(() => [
|
|
@@ -4836,38 +4832,38 @@ const Yo = {
|
|
|
4836
4832
|
role: "listbox",
|
|
4837
4833
|
class: "options"
|
|
4838
4834
|
}, [
|
|
4839
|
-
|
|
4835
|
+
B.value.length > 0 ? (p(!0), b(de, { key: 0 }, he(B.value, (v, d) => (p(), b("li", {
|
|
4840
4836
|
id: `${C}-option-${d}`,
|
|
4841
|
-
key: e.getKey(
|
|
4837
|
+
key: e.getKey(v),
|
|
4842
4838
|
role: "option",
|
|
4843
4839
|
class: fe(["option", { "focus-visible": c.value === d }]),
|
|
4844
|
-
"aria-disabled": t.isDisabled(
|
|
4840
|
+
"aria-disabled": t.isDisabled(v) || void 0,
|
|
4845
4841
|
"aria-selected": d === u.value,
|
|
4846
4842
|
onMousedown: D[1] || (D[1] = se(() => {
|
|
4847
4843
|
}, ["prevent"])),
|
|
4848
|
-
onClick: (y) => !t.isDisabled(
|
|
4844
|
+
onClick: (y) => !t.isDisabled(v) && ue(v, d)
|
|
4849
4845
|
}, [
|
|
4850
|
-
t.isDisabled(
|
|
4846
|
+
t.isDisabled(v) ? q("", !0) : (p(), ae(Ce, {
|
|
4851
4847
|
key: 0,
|
|
4852
4848
|
name: "search",
|
|
4853
4849
|
size: 22
|
|
4854
4850
|
})),
|
|
4855
4851
|
G(I.$slots, "option", {
|
|
4856
|
-
option:
|
|
4857
|
-
value: e.getValue(
|
|
4858
|
-
query:
|
|
4852
|
+
option: v,
|
|
4853
|
+
value: e.getValue(v),
|
|
4854
|
+
query: s.value,
|
|
4859
4855
|
selected: d === u.value,
|
|
4860
4856
|
active: d === c.value
|
|
4861
4857
|
}, () => [
|
|
4862
4858
|
w("div", i2, [
|
|
4863
4859
|
K(Oo, {
|
|
4864
|
-
text: e.getValue(
|
|
4865
|
-
query:
|
|
4860
|
+
text: e.getValue(v),
|
|
4861
|
+
query: s.value
|
|
4866
4862
|
}, null, 8, ["text", "query"])
|
|
4867
4863
|
])
|
|
4868
4864
|
], !0),
|
|
4869
|
-
w("div", u2, j(e.getValue(
|
|
4870
|
-
], 42, s2))), 128)) :
|
|
4865
|
+
w("div", u2, j(e.getValue(v)), 1)
|
|
4866
|
+
], 42, s2))), 128)) : B.value.length === 0 && !e.loading ? (p(), b("li", c2, [...D[3] || (D[3] = [
|
|
4871
4867
|
w("div", { class: "option-value" }, "No results found", -1)
|
|
4872
4868
|
])])) : (p(), ae(qt, {
|
|
4873
4869
|
key: 2,
|
|
@@ -4878,15 +4874,15 @@ const Yo = {
|
|
|
4878
4874
|
M.value ? (p(), b("li", d2, [...D[4] || (D[4] = [
|
|
4879
4875
|
w("div", { class: "option-value" }, " Recents ", -1)
|
|
4880
4876
|
])])) : q("", !0),
|
|
4881
|
-
(p(!0), b(de, null, he(
|
|
4882
|
-
key:
|
|
4877
|
+
(p(!0), b(de, null, he(r.value, (v) => (p(), b("li", {
|
|
4878
|
+
key: v,
|
|
4883
4879
|
role: "presentation",
|
|
4884
4880
|
"aria-hidden": "true",
|
|
4885
4881
|
class: "option recent-item",
|
|
4886
|
-
onClick: (d) => T(
|
|
4882
|
+
onClick: (d) => T(v)
|
|
4887
4883
|
}, [
|
|
4888
4884
|
K(Ce, { name: "clock" }),
|
|
4889
|
-
w("div", f2, j(
|
|
4885
|
+
w("div", f2, j(v), 1)
|
|
4890
4886
|
], 8, v2))), 128))
|
|
4891
4887
|
], 512), [
|
|
4892
4888
|
[rt, l.value]
|
|
@@ -4897,7 +4893,7 @@ const Yo = {
|
|
|
4897
4893
|
I.$slots.icon ? (p(), b("span", p2, [
|
|
4898
4894
|
G(I.$slots, "icon", {}, void 0, !0)
|
|
4899
4895
|
])) : q("", !0),
|
|
4900
|
-
|
|
4896
|
+
s.value.length > 0 && !e.disabled ? (p(), ae(Le, {
|
|
4901
4897
|
key: 1,
|
|
4902
4898
|
type: "button",
|
|
4903
4899
|
class: "btn btn-icon",
|
|
@@ -4961,30 +4957,30 @@ const Ze = (e, n = "info") => {
|
|
|
4961
4957
|
},
|
|
4962
4958
|
setup(e) {
|
|
4963
4959
|
const n = e, t = k(null), a = k("open"), o = k(100);
|
|
4964
|
-
let i = Date.now(),
|
|
4960
|
+
let i = Date.now(), s;
|
|
4965
4961
|
const l = () => {
|
|
4966
4962
|
const u = Date.now() - i;
|
|
4967
4963
|
if (o.value = Math.max(0, 100 - u / n.duration * 100), o.value <= 0) {
|
|
4968
4964
|
c();
|
|
4969
4965
|
return;
|
|
4970
4966
|
}
|
|
4971
|
-
|
|
4972
|
-
},
|
|
4973
|
-
if (cancelAnimationFrame(
|
|
4967
|
+
s = requestAnimationFrame(l);
|
|
4968
|
+
}, r = () => {
|
|
4969
|
+
if (cancelAnimationFrame(s), n.duration === 1 / 0) {
|
|
4974
4970
|
o.value = 100;
|
|
4975
4971
|
return;
|
|
4976
4972
|
}
|
|
4977
|
-
i = Date.now(),
|
|
4973
|
+
i = Date.now(), s = requestAnimationFrame(l);
|
|
4978
4974
|
};
|
|
4979
4975
|
Q(
|
|
4980
4976
|
() => n.duration,
|
|
4981
|
-
() =>
|
|
4977
|
+
() => r(),
|
|
4982
4978
|
{ immediate: !0 }
|
|
4983
4979
|
);
|
|
4984
4980
|
const c = () => {
|
|
4985
|
-
cancelAnimationFrame(
|
|
4981
|
+
cancelAnimationFrame(s), a.value = "closing", setTimeout(() => we.toasts = we.toasts.filter((u) => u.id !== n.id), w2);
|
|
4986
4982
|
};
|
|
4987
|
-
return ve(() => n.variant === "error" && n.focus && t.value?.focus()), Se(() => cancelAnimationFrame(
|
|
4983
|
+
return ve(() => n.variant === "error" && n.focus && t.value?.focus()), Se(() => cancelAnimationFrame(s)), (u, f) => (p(), b("div", {
|
|
4988
4984
|
ref_key: "rootRef",
|
|
4989
4985
|
ref: t,
|
|
4990
4986
|
tabindex: "-1",
|
|
@@ -5124,12 +5120,12 @@ const S2 = {
|
|
|
5124
5120
|
}, q2 = { class: "actions" }, F2 = /* @__PURE__ */ Z({
|
|
5125
5121
|
__name: "ConfirmModal",
|
|
5126
5122
|
setup(e) {
|
|
5127
|
-
const n =
|
|
5123
|
+
const n = _(() => Ve.current), t = () => {
|
|
5128
5124
|
n && E2();
|
|
5129
5125
|
}, a = () => {
|
|
5130
5126
|
n.value && R2();
|
|
5131
5127
|
}, o = (i) => i.key === "Escape" && n && a();
|
|
5132
|
-
return ve(() => window.addEventListener("keydown", o)), Se(() => window.removeEventListener("keydown", o)), (i,
|
|
5128
|
+
return ve(() => window.addEventListener("keydown", o)), Se(() => window.removeEventListener("keydown", o)), (i, s) => (p(), ae(Fe, { to: "body" }, [
|
|
5133
5129
|
K(Ae, { name: "fade" }, {
|
|
5134
5130
|
default: J(() => [
|
|
5135
5131
|
n.value ? (p(), b("div", {
|
|
@@ -5144,7 +5140,7 @@ const S2 = {
|
|
|
5144
5140
|
class: "icon",
|
|
5145
5141
|
"data-type": n.value.type
|
|
5146
5142
|
}, [
|
|
5147
|
-
|
|
5143
|
+
s[0] || (s[0] = w("span", { class: "icon__circle" }, null, -1)),
|
|
5148
5144
|
n.value.type === "success" ? (p(), b("span", D2)) : q("", !0),
|
|
5149
5145
|
n.value.type === "error" ? (p(), b("span", Z2)) : q("", !0),
|
|
5150
5146
|
n.value.type === "warning" ? (p(), b("span", z2)) : q("", !0)
|
|
@@ -5192,21 +5188,21 @@ const fr = {
|
|
|
5192
5188
|
setup(e, { emit: n }) {
|
|
5193
5189
|
const t = e, a = n, o = k(), i = k();
|
|
5194
5190
|
He("card:labelId", o), He("card:descriptionId", i);
|
|
5195
|
-
const
|
|
5196
|
-
return (
|
|
5191
|
+
const s = _(() => t.clickable && t.as !== "button" && t.as !== "a"), l = () => t.clickable && a("click");
|
|
5192
|
+
return (r, c) => (p(), ae(Ne(e.as), {
|
|
5197
5193
|
class: fe(["rs-card", { clickable: e.clickable }]),
|
|
5198
|
-
tabindex:
|
|
5199
|
-
role:
|
|
5194
|
+
tabindex: s.value ? 0 : void 0,
|
|
5195
|
+
role: s.value ? "button" : void 0,
|
|
5200
5196
|
onClick: l,
|
|
5201
5197
|
onKeydown: [
|
|
5202
|
-
c[0] || (c[0] = ye(se((u) =>
|
|
5203
|
-
c[1] || (c[1] = ye(se((u) =>
|
|
5198
|
+
c[0] || (c[0] = ye(se((u) => s.value && l(), ["prevent"]), ["enter"])),
|
|
5199
|
+
c[1] || (c[1] = ye(se((u) => s.value && l(), ["prevent"]), ["space"]))
|
|
5204
5200
|
],
|
|
5205
5201
|
"aria-labelledby": o.value,
|
|
5206
5202
|
"aria-describedby": i.value
|
|
5207
5203
|
}, {
|
|
5208
5204
|
default: J(() => [
|
|
5209
|
-
G(
|
|
5205
|
+
G(r.$slots, "default", {}, void 0, !0)
|
|
5210
5206
|
]),
|
|
5211
5207
|
_: 3
|
|
5212
5208
|
}, 40, ["class", "tabindex", "role", "aria-labelledby", "aria-describedby"]));
|
|
@@ -5279,11 +5275,11 @@ const fr = {
|
|
|
5279
5275
|
setup(e) {
|
|
5280
5276
|
const n = e, t = me("StepsContext");
|
|
5281
5277
|
if (!t) throw new Error("Step component must be used inside Steps.");
|
|
5282
|
-
const a = it(), o = k(null), i = k(null),
|
|
5283
|
-
let l = null,
|
|
5278
|
+
const a = it(), o = k(null), i = k(null), s = _(() => t.orientation ?? "horizontal");
|
|
5279
|
+
let l = null, r = null;
|
|
5284
5280
|
const c = me("StepIndex");
|
|
5285
5281
|
if (c == null) throw new Error("StepIndex component must be used inside Steps.");
|
|
5286
|
-
const u =
|
|
5282
|
+
const u = _(() => n.status ? n.status : c < t.current.value ? "completed" : c === t.current.value ? "active" : "pending"), f = _(() => t?.icons?.[u.value]), m = _(() => a.icon ? "slot" : n.icon ? n.icon : f.value), C = _(() => {
|
|
5287
5283
|
switch (u.value) {
|
|
5288
5284
|
case "completed":
|
|
5289
5285
|
return "Stage completed";
|
|
@@ -5294,7 +5290,7 @@ const fr = {
|
|
|
5294
5290
|
default:
|
|
5295
5291
|
return "Stage pending";
|
|
5296
5292
|
}
|
|
5297
|
-
}), h =
|
|
5293
|
+
}), h = _(() => {
|
|
5298
5294
|
switch (u.value) {
|
|
5299
5295
|
case "completed":
|
|
5300
5296
|
return "success";
|
|
@@ -5305,7 +5301,7 @@ const fr = {
|
|
|
5305
5301
|
default:
|
|
5306
5302
|
return "default";
|
|
5307
5303
|
}
|
|
5308
|
-
}), L =
|
|
5304
|
+
}), L = _(() => n.size ?? t.size ?? "sm"), R = _(() => {
|
|
5309
5305
|
switch (u.value) {
|
|
5310
5306
|
case "completed":
|
|
5311
5307
|
return t.tagTitles.completed;
|
|
@@ -5322,7 +5318,7 @@ const fr = {
|
|
|
5322
5318
|
(z) => t.registerStepStatus(c, z),
|
|
5323
5319
|
{ immediate: !0 }
|
|
5324
5320
|
);
|
|
5325
|
-
const
|
|
5321
|
+
const E = () => {
|
|
5326
5322
|
l == null && (l = requestAnimationFrame(() => {
|
|
5327
5323
|
l = null, M();
|
|
5328
5324
|
}));
|
|
@@ -5330,7 +5326,7 @@ const fr = {
|
|
|
5330
5326
|
if (!o.value || !i.value) return;
|
|
5331
5327
|
const z = i.value.getBoundingClientRect(), U = t.stepsRef.value.getBoundingClientRect(), oe = t.orientation === "vertical" ? z.top + z.height / 2 - U.top : z.left + z.width / 2 - U.left;
|
|
5332
5328
|
t.registerIndicatorCenter(c, oe);
|
|
5333
|
-
},
|
|
5329
|
+
}, B = (z) => {
|
|
5334
5330
|
const U = t.orientation === "horizontal", oe = t.orientation === "vertical";
|
|
5335
5331
|
switch (z.key) {
|
|
5336
5332
|
case "ArrowRight":
|
|
@@ -5359,18 +5355,18 @@ const fr = {
|
|
|
5359
5355
|
return ve(() => {
|
|
5360
5356
|
!o.value || !i.value || (requestAnimationFrame(() => {
|
|
5361
5357
|
requestAnimationFrame(M);
|
|
5362
|
-
}),
|
|
5363
|
-
|
|
5364
|
-
}),
|
|
5358
|
+
}), r = new ResizeObserver(() => {
|
|
5359
|
+
E();
|
|
5360
|
+
}), r.observe(o.value), r.observe(i.value), t.stepsRef.value && r.observe(t.stepsRef.value), t.registerStep(o.value));
|
|
5365
5361
|
}), Be(() => {
|
|
5366
|
-
|
|
5362
|
+
r?.disconnect(), t.unregisterStep(o.value), l != null && cancelAnimationFrame(l);
|
|
5367
5363
|
}), (z, U) => (p(), b("li", {
|
|
5368
5364
|
ref_key: "stepRef",
|
|
5369
5365
|
ref: o,
|
|
5370
5366
|
class: fe(["step", `step__${L.value}`]),
|
|
5371
5367
|
role: "listitem",
|
|
5372
5368
|
"data-status": u.value,
|
|
5373
|
-
"data-orientation":
|
|
5369
|
+
"data-orientation": s.value,
|
|
5374
5370
|
"data-active": u.value === "active",
|
|
5375
5371
|
"data-completed": u.value === "completed",
|
|
5376
5372
|
"aria-labelledby": `step-title-${N(c)}`,
|
|
@@ -5379,7 +5375,7 @@ const fr = {
|
|
|
5379
5375
|
"aria-posinset": N(c) + 1,
|
|
5380
5376
|
"aria-setsize": N(t).stepsCount.value,
|
|
5381
5377
|
"aria-describedby": `step-status-${N(c)}`,
|
|
5382
|
-
onKeydown:
|
|
5378
|
+
onKeydown: B
|
|
5383
5379
|
}, [
|
|
5384
5380
|
w("span", {
|
|
5385
5381
|
ref_key: "indicatorRef",
|
|
@@ -5421,7 +5417,7 @@ const fr = {
|
|
|
5421
5417
|
size: "sm"
|
|
5422
5418
|
}, {
|
|
5423
5419
|
default: J(() => [
|
|
5424
|
-
Me(j(
|
|
5420
|
+
Me(j(R.value), 1)
|
|
5425
5421
|
]),
|
|
5426
5422
|
_: 1
|
|
5427
5423
|
}, 8, ["variant"]),
|
|
@@ -5464,13 +5460,13 @@ const fr = {
|
|
|
5464
5460
|
}),
|
|
5465
5461
|
emits: ["update:modelValue"],
|
|
5466
5462
|
setup(e) {
|
|
5467
|
-
const n = e, t = k(0), a = it(), o = ke(e, "modelValue"), i = k([]),
|
|
5468
|
-
let
|
|
5469
|
-
const m =
|
|
5463
|
+
const n = e, t = k(0), a = it(), o = ke(e, "modelValue"), i = k([]), s = k(null), l = _(() => o.value ?? 0), r = `steps-description-${ge()}`, c = Yt({}), u = ut({});
|
|
5464
|
+
let f = null;
|
|
5465
|
+
const m = _(() => (a.default?.() ?? [])[l.value]?.props?.title ?? ""), C = _(() => Object.entries(u).filter(([, P]) => P !== "completed").length === 0), h = _(
|
|
5470
5466
|
() => Object.values(u).includes("error")
|
|
5471
|
-
), L =
|
|
5472
|
-
const P = l.value,
|
|
5473
|
-
if (
|
|
5467
|
+
), L = _(() => {
|
|
5468
|
+
const P = l.value, S = c;
|
|
5469
|
+
if (S.value[0] == null || S.value[P] == null)
|
|
5474
5470
|
return n.orientation === "vertical" ? {
|
|
5475
5471
|
height: "100%",
|
|
5476
5472
|
top: "0px"
|
|
@@ -5478,7 +5474,7 @@ const fr = {
|
|
|
5478
5474
|
width: "100%",
|
|
5479
5475
|
left: "0px"
|
|
5480
5476
|
};
|
|
5481
|
-
const x =
|
|
5477
|
+
const x = S.value[0], V = S.value[P];
|
|
5482
5478
|
return n.orientation === "vertical" ? {
|
|
5483
5479
|
top: `${x}px`,
|
|
5484
5480
|
height: `${V - x}px`
|
|
@@ -5486,23 +5482,23 @@ const fr = {
|
|
|
5486
5482
|
left: `${x}px`,
|
|
5487
5483
|
width: `${V - x}px`
|
|
5488
5484
|
};
|
|
5489
|
-
}),
|
|
5485
|
+
}), R = _(() => {
|
|
5490
5486
|
const P = Object.values(c.value).sort((V, g) => V - g);
|
|
5491
5487
|
if (P.length < 2) return {};
|
|
5492
|
-
const
|
|
5488
|
+
const S = P[0], x = P[P.length - 1];
|
|
5493
5489
|
return n.orientation === "vertical" ? {
|
|
5494
|
-
top: `${
|
|
5495
|
-
height: `${x -
|
|
5490
|
+
top: `${S}px`,
|
|
5491
|
+
height: `${x - S}px`
|
|
5496
5492
|
} : {
|
|
5497
|
-
left: `${
|
|
5493
|
+
left: `${S}px`,
|
|
5498
5494
|
right: `calc(100% - ${x}px)`
|
|
5499
5495
|
};
|
|
5500
|
-
}),
|
|
5496
|
+
}), E = (P, S) => c.value = { ...c.value, [P]: S };
|
|
5501
5497
|
function M(P) {
|
|
5502
5498
|
i.value.push(P), t.value = i.value.length;
|
|
5503
5499
|
}
|
|
5504
|
-
function
|
|
5505
|
-
i.value = i.value.filter((
|
|
5500
|
+
function B(P) {
|
|
5501
|
+
i.value = i.value.filter((S) => S !== P), t.value = i.value.length;
|
|
5506
5502
|
}
|
|
5507
5503
|
function z(P) {
|
|
5508
5504
|
P < 0 || P >= i.value.length || (o.value = P, i.value[P]?.focus());
|
|
@@ -5520,46 +5516,46 @@ const fr = {
|
|
|
5520
5516
|
z(t.value - 1);
|
|
5521
5517
|
}
|
|
5522
5518
|
return ve(() => {
|
|
5523
|
-
|
|
5524
|
-
}),
|
|
5525
|
-
}), Be(() =>
|
|
5526
|
-
current:
|
|
5519
|
+
s.value && (f = new ResizeObserver(() => {
|
|
5520
|
+
}), f.observe(s.value));
|
|
5521
|
+
}), Be(() => f?.disconnect()), He("StepsContext", {
|
|
5522
|
+
current: _(() => o.value),
|
|
5527
5523
|
update: (P) => o.value = P,
|
|
5528
5524
|
stepsCount: t,
|
|
5529
5525
|
icons: n.icons,
|
|
5530
5526
|
size: n.size,
|
|
5531
5527
|
orientation: n.orientation,
|
|
5532
5528
|
stepStatusMap: u,
|
|
5533
|
-
stepsRef:
|
|
5534
|
-
registerStepStatus: (P,
|
|
5535
|
-
u[P] =
|
|
5529
|
+
stepsRef: s,
|
|
5530
|
+
registerStepStatus: (P, S) => {
|
|
5531
|
+
u[P] = S;
|
|
5536
5532
|
},
|
|
5537
|
-
registerIndicatorCenter:
|
|
5533
|
+
registerIndicatorCenter: E,
|
|
5538
5534
|
registerStep: M,
|
|
5539
|
-
unregisterStep:
|
|
5535
|
+
unregisterStep: B,
|
|
5540
5536
|
focusNext: U,
|
|
5541
5537
|
focusPrev: oe,
|
|
5542
5538
|
focusFirst: ue,
|
|
5543
5539
|
focusLast: re,
|
|
5544
5540
|
tagTitles: n.tagTitles
|
|
5545
|
-
}), (P,
|
|
5541
|
+
}), (P, S) => (p(), b(de, null, [
|
|
5546
5542
|
w("ol", {
|
|
5547
5543
|
ref_key: "stepsRef",
|
|
5548
|
-
ref:
|
|
5544
|
+
ref: s,
|
|
5549
5545
|
class: "steps",
|
|
5550
5546
|
role: "list",
|
|
5551
5547
|
"data-size": e.size,
|
|
5552
5548
|
"data-orientation": n.orientation,
|
|
5553
|
-
"aria-describedby":
|
|
5549
|
+
"aria-describedby": r
|
|
5554
5550
|
}, [
|
|
5555
5551
|
w("p", {
|
|
5556
|
-
id:
|
|
5552
|
+
id: r,
|
|
5557
5553
|
class: "sr-only"
|
|
5558
5554
|
}, " This is a multi-step process. Use arrow keys to navigate between steps. "),
|
|
5559
5555
|
w("div", {
|
|
5560
5556
|
class: "track",
|
|
5561
5557
|
"aria-hidden": "true",
|
|
5562
|
-
style: Ie(
|
|
5558
|
+
style: Ie(R.value)
|
|
5563
5559
|
}, [
|
|
5564
5560
|
w("div", {
|
|
5565
5561
|
class: "track-progress",
|
|
@@ -5608,10 +5604,10 @@ const fr = {
|
|
|
5608
5604
|
setup(e) {
|
|
5609
5605
|
const n = e, t = me("TimelineContext");
|
|
5610
5606
|
if (!t) throw new Error("TimelineItem must be used within a Timeline component");
|
|
5611
|
-
const a = ge(), o = ge(), i =
|
|
5607
|
+
const a = ge(), o = ge(), i = _(() => t.align === "alternate" ? (n.index ?? 0) % 2 === 0 ? "ui-timeline-item--left" : "ui-timeline-item--right" : `ui-timeline-item--${t.align}`), s = (c) => {
|
|
5612
5608
|
const u = new Date(c).getDay();
|
|
5613
5609
|
return u < 10 ? `0${u}` : u;
|
|
5614
|
-
}, l = (c) => new Date(c).toLocaleString("default", { month: "short" }),
|
|
5610
|
+
}, l = (c) => new Date(c).toLocaleString("default", { month: "short" }), r = (c) => new Date(c).getFullYear();
|
|
5615
5611
|
return (c, u) => (p(), b("li", {
|
|
5616
5612
|
tabindex: "0",
|
|
5617
5613
|
class: fe([i.value, "ui-timeline-item"]),
|
|
@@ -5630,8 +5626,8 @@ const fr = {
|
|
|
5630
5626
|
datetime: e.date
|
|
5631
5627
|
}, [
|
|
5632
5628
|
w("span", fl, j(l(e.date)), 1),
|
|
5633
|
-
w("span", pl, j(
|
|
5634
|
-
w("span", ml, j(
|
|
5629
|
+
w("span", pl, j(s(e.date)), 1),
|
|
5630
|
+
w("span", ml, j(r(e.date)), 1)
|
|
5635
5631
|
], 8, vl)) : q("", !0),
|
|
5636
5632
|
w("div", {
|
|
5637
5633
|
class: "ui-timeline-body",
|
|
@@ -5693,67 +5689,67 @@ const fr = {
|
|
|
5693
5689
|
}),
|
|
5694
5690
|
emits: ["update:modelValue"],
|
|
5695
5691
|
setup(e) {
|
|
5696
|
-
const n = ke(e, "modelValue"), t = e, a = k(0), o = k(0), i = k(0),
|
|
5697
|
-
let
|
|
5692
|
+
const n = ke(e, "modelValue"), t = e, a = k(0), o = k(0), i = k(0), s = k(0), l = k(0), r = k(0), c = k(!1), u = k(!1), f = k(0), m = k([]), C = k(1), h = k(n.value), L = k(null), R = k(null);
|
|
5693
|
+
let E = null, M = null;
|
|
5698
5694
|
Q(
|
|
5699
5695
|
() => n.value,
|
|
5700
|
-
(
|
|
5696
|
+
(v) => h.value = v
|
|
5701
5697
|
);
|
|
5702
|
-
const
|
|
5703
|
-
const
|
|
5698
|
+
const B = _(() => m.value[h.value] ?? void 0), z = _(() => Math.floor(h.value / C.value)), U = _(() => Math.ceil(T.value / C.value)), oe = _(() => Math.max(0, T.value - C.value)), ue = _(() => {
|
|
5699
|
+
const v = h.value * (100 / C.value), d = u.value && R.value ? i.value / R.value.clientWidth * 100 : 0;
|
|
5704
5700
|
return {
|
|
5705
|
-
transform: `translateX(calc(-${
|
|
5701
|
+
transform: `translateX(calc(-${v}% + ${d}%))`,
|
|
5706
5702
|
transition: u.value ? "none" : "transform 300ms ease"
|
|
5707
5703
|
};
|
|
5708
|
-
}), re = (
|
|
5709
|
-
let d =
|
|
5704
|
+
}), re = (v) => {
|
|
5705
|
+
let d = v;
|
|
5710
5706
|
if (t.loop) {
|
|
5711
|
-
const y = Math.round(
|
|
5707
|
+
const y = Math.round(v / C.value), $ = U.value;
|
|
5712
5708
|
d = (y % $ + $) % $ * C.value;
|
|
5713
5709
|
} else
|
|
5714
5710
|
d = Math.min(
|
|
5715
|
-
Math.max(
|
|
5711
|
+
Math.max(v, 0),
|
|
5716
5712
|
oe.value
|
|
5717
5713
|
);
|
|
5718
5714
|
h.value = d, n.value = d;
|
|
5719
|
-
}, P = () => re(h.value + C.value),
|
|
5720
|
-
|
|
5721
|
-
}, V = (
|
|
5722
|
-
!t.autoplay ||
|
|
5715
|
+
}, P = () => re(h.value + C.value), S = () => re(h.value - C.value), x = (v) => {
|
|
5716
|
+
v.key === "ArrowRight" ? P() : v.key === "ArrowLeft" && S();
|
|
5717
|
+
}, V = (v) => (m.value.includes(v) || m.value.push(v), m.value.indexOf(v)), g = (v) => m.value = m.value.filter((d) => d !== v), T = _(() => m.value.length), A = () => {
|
|
5718
|
+
!t.autoplay || E !== null || (E = window.setInterval(() => {
|
|
5723
5719
|
c.value || P();
|
|
5724
5720
|
}, t.autoplayDelay));
|
|
5725
5721
|
}, F = () => {
|
|
5726
|
-
|
|
5727
|
-
}, H = (
|
|
5722
|
+
E !== null && (clearInterval(E), E = null);
|
|
5723
|
+
}, H = (v) => {
|
|
5728
5724
|
if (typeof t.itemsPerView == "number")
|
|
5729
5725
|
return t.itemsPerView;
|
|
5730
5726
|
const d = Object.entries(t.itemsPerView).map(([$, X]) => [Number($), X]).sort(($, X) => $[0] - X[0]);
|
|
5731
5727
|
let y = d[0]?.[1] ?? 1;
|
|
5732
|
-
for (const [$, X] of d)
|
|
5728
|
+
for (const [$, X] of d) v >= $ && (y = X);
|
|
5733
5729
|
return y;
|
|
5734
|
-
}, O = (
|
|
5735
|
-
|
|
5736
|
-
}, I = (
|
|
5730
|
+
}, O = (v) => {
|
|
5731
|
+
v.button === 0 && (u.value = !0, o.value = v.clientX, a.value = v.clientX, r.value = v.clientX, i.value = 0, s.value = performance.now(), l.value = 0, f.value = h.value, R.value?.setPointerCapture(v.pointerId), F(), R.value.style.userSelect = "");
|
|
5732
|
+
}, I = (v) => {
|
|
5737
5733
|
if (!u.value) return;
|
|
5738
|
-
const d = performance.now(), y =
|
|
5739
|
-
$ > 0 && (l.value = y / $), a.value =
|
|
5740
|
-
}, D = (
|
|
5734
|
+
const d = performance.now(), y = v.clientX - a.value, $ = d - s.value;
|
|
5735
|
+
$ > 0 && (l.value = y / $), a.value = v.clientX, s.value = d, r.value = v.clientX, i.value = r.value - o.value;
|
|
5736
|
+
}, D = (v) => {
|
|
5741
5737
|
if (!u.value) return;
|
|
5742
|
-
u.value = !1,
|
|
5743
|
-
const d =
|
|
5744
|
-
Math.abs(l.value) > $l ? l.value < 0 ? P() :
|
|
5738
|
+
u.value = !1, R.value?.releasePointerCapture(v.pointerId), R.value.style.userSelect = "";
|
|
5739
|
+
const d = R.value.clientWidth / C.value, y = i.value / d;
|
|
5740
|
+
Math.abs(l.value) > $l ? l.value < 0 ? P() : S() : Math.abs(y) > Il ? y < 0 ? P() : S() : re(f.value), i.value = 0, l.value = 0, A();
|
|
5745
5741
|
};
|
|
5746
5742
|
return ve(() => {
|
|
5747
|
-
|
|
5748
|
-
const d =
|
|
5743
|
+
A(), L.value && (M = new ResizeObserver((v) => {
|
|
5744
|
+
const d = v[0]?.contentRect.width;
|
|
5749
5745
|
d !== void 0 && (C.value = H(d));
|
|
5750
5746
|
}), M.observe(L.value));
|
|
5751
5747
|
}), Be(() => {
|
|
5752
5748
|
F(), M?.disconnect();
|
|
5753
5749
|
}), Q(
|
|
5754
5750
|
() => t.autoplay,
|
|
5755
|
-
(
|
|
5756
|
-
|
|
5751
|
+
(v) => {
|
|
5752
|
+
v ? A() : F();
|
|
5757
5753
|
},
|
|
5758
5754
|
{ immediate: !0 }
|
|
5759
5755
|
), Q(C, () => h.value = Math.min(h.value, oe.value)), He("CarouselContext", {
|
|
@@ -5763,7 +5759,7 @@ const fr = {
|
|
|
5763
5759
|
slideCount: T,
|
|
5764
5760
|
deltaX: i,
|
|
5765
5761
|
itemsPerView: t.itemsPerView instanceof Object ? C : k(t.itemsPerView)
|
|
5766
|
-
}), (
|
|
5762
|
+
}), (v, d) => (p(), b("div", {
|
|
5767
5763
|
ref_key: "rootRef",
|
|
5768
5764
|
ref: L,
|
|
5769
5765
|
role: "region",
|
|
@@ -5771,7 +5767,7 @@ const fr = {
|
|
|
5771
5767
|
"aria-roledescription": "carousel",
|
|
5772
5768
|
"aria-label": e.ariaLabel,
|
|
5773
5769
|
tabindex: "0",
|
|
5774
|
-
"aria-activedescendant":
|
|
5770
|
+
"aria-activedescendant": B.value,
|
|
5775
5771
|
style: Ie({ "--items-per-view": C.value }),
|
|
5776
5772
|
onKeydown: x,
|
|
5777
5773
|
onMouseenter: d[0] || (d[0] = (y) => c.value = !0),
|
|
@@ -5786,7 +5782,7 @@ const fr = {
|
|
|
5786
5782
|
w("div", wl, [
|
|
5787
5783
|
w("div", {
|
|
5788
5784
|
ref_key: "trackRef",
|
|
5789
|
-
ref:
|
|
5785
|
+
ref: R,
|
|
5790
5786
|
class: "carousel-track",
|
|
5791
5787
|
style: Ie(ue.value),
|
|
5792
5788
|
onPointerdown: O,
|
|
@@ -5794,7 +5790,7 @@ const fr = {
|
|
|
5794
5790
|
onPointerup: D,
|
|
5795
5791
|
onPointercancel: D
|
|
5796
5792
|
}, [
|
|
5797
|
-
G(
|
|
5793
|
+
G(v.$slots, "default", {}, void 0, !0)
|
|
5798
5794
|
], 36)
|
|
5799
5795
|
]),
|
|
5800
5796
|
w("span", Ml, " Slide " + j(Math.floor(h.value / C.value) + 1) + " of " + j(U.value), 1),
|
|
@@ -5802,7 +5798,7 @@ const fr = {
|
|
|
5802
5798
|
type: "button",
|
|
5803
5799
|
class: "carousel-control prev",
|
|
5804
5800
|
"aria-label": "Previous slide",
|
|
5805
|
-
onClick:
|
|
5801
|
+
onClick: S
|
|
5806
5802
|
}, [
|
|
5807
5803
|
K(Ce, { name: "directionDown" })
|
|
5808
5804
|
]),
|
|
@@ -5837,17 +5833,17 @@ const fr = {
|
|
|
5837
5833
|
setup(e) {
|
|
5838
5834
|
const n = me("CarouselContext");
|
|
5839
5835
|
if (!n) throw new Error("CarouselItem must be used inside a Carousel");
|
|
5840
|
-
const t = "carousel-item-" + ge(), a = k(0), o =
|
|
5841
|
-
return ve(() => a.value = n.register(t)), Be(() => n.unregister(t)), (
|
|
5836
|
+
const t = "carousel-item-" + ge(), a = k(0), o = _(() => Math.abs(n.deltaX.value) > 5), i = _(() => Math.floor(a.value / n.itemsPerView.value) === Math.floor(n.activeIndex.value / n.itemsPerView.value));
|
|
5837
|
+
return ve(() => a.value = n.register(t)), Be(() => n.unregister(t)), (s, l) => (p(), b("div", {
|
|
5842
5838
|
role: "group",
|
|
5843
5839
|
class: "carousel-item",
|
|
5844
5840
|
id: t,
|
|
5845
5841
|
"aria-roledescription": "slide",
|
|
5846
5842
|
"aria-hidden": !i.value,
|
|
5847
5843
|
"aria-label": `Slide ${a.value + 1}`,
|
|
5848
|
-
onClickCapture: l[0] || (l[0] = (
|
|
5844
|
+
onClickCapture: l[0] || (l[0] = (r) => o.value && r.preventDefault())
|
|
5849
5845
|
}, [
|
|
5850
|
-
G(
|
|
5846
|
+
G(s.$slots, "default", {}, void 0, !0)
|
|
5851
5847
|
], 40, Vl));
|
|
5852
5848
|
}
|
|
5853
5849
|
}), Mr = /* @__PURE__ */ Y(Bl, [["__scopeId", "data-v-a569d055"]]), Je = /* @__PURE__ */ Symbol("TabsContext"), Lr = Z({
|
|
@@ -5866,7 +5862,7 @@ const fr = {
|
|
|
5866
5862
|
},
|
|
5867
5863
|
emits: ["update:modelValue"],
|
|
5868
5864
|
setup(e, { emit: n, slots: t }) {
|
|
5869
|
-
const a = k(e.modelValue ?? e.defaultValue), o = k(!1), i = k([]),
|
|
5865
|
+
const a = k(e.modelValue ?? e.defaultValue), o = k(!1), i = k([]), s = k("forward"), l = k();
|
|
5870
5866
|
Q(a, (h) => {
|
|
5871
5867
|
!h || !o.value || requestAnimationFrame(() => {
|
|
5872
5868
|
document.getElementById(`tab-${h}`)?.focus(), o.value = !1;
|
|
@@ -5879,21 +5875,21 @@ const fr = {
|
|
|
5879
5875
|
), Q(i, (h) => {
|
|
5880
5876
|
!a.value && h.length && (a.value = h[0]);
|
|
5881
5877
|
});
|
|
5882
|
-
const
|
|
5878
|
+
const r = (h, L) => i.value[L] = h, c = (h) => {
|
|
5883
5879
|
const L = i.value.filter(Boolean);
|
|
5884
5880
|
if (!L.length) return;
|
|
5885
|
-
const
|
|
5886
|
-
if (!
|
|
5881
|
+
const R = a.value;
|
|
5882
|
+
if (!R) {
|
|
5887
5883
|
a.value = h, n("update:modelValue", h);
|
|
5888
5884
|
return;
|
|
5889
5885
|
}
|
|
5890
|
-
const
|
|
5891
|
-
if (
|
|
5886
|
+
const E = L.indexOf(R), M = L.indexOf(h);
|
|
5887
|
+
if (E === -1 || M === -1) {
|
|
5892
5888
|
a.value = h, n("update:modelValue", h);
|
|
5893
5889
|
return;
|
|
5894
5890
|
}
|
|
5895
|
-
|
|
5896
|
-
}, u =
|
|
5891
|
+
E !== -1 && M !== -1 && (s.value = M > E ? "forward" : "backward"), R !== h && (a.value = h, n("update:modelValue", h));
|
|
5892
|
+
}, u = _(() => s.value === "forward" ? "tab-slide-forward" : "tab-slide-backward"), f = (h) => {
|
|
5897
5893
|
h instanceof HTMLElement && l.value && (l.value.style.height = `${h.offsetHeight}px`);
|
|
5898
5894
|
}, m = (h) => {
|
|
5899
5895
|
if (h instanceof HTMLElement && l.value) {
|
|
@@ -5908,19 +5904,19 @@ const fr = {
|
|
|
5908
5904
|
return He(Je, {
|
|
5909
5905
|
activeValue: a,
|
|
5910
5906
|
setValue: c,
|
|
5911
|
-
registerTrigger:
|
|
5912
|
-
direction:
|
|
5907
|
+
registerTrigger: r,
|
|
5908
|
+
direction: s,
|
|
5913
5909
|
activationMode: k(e.activationMode),
|
|
5914
5910
|
orientation: k(e.orientation),
|
|
5915
5911
|
triggers: i,
|
|
5916
5912
|
contentWrapperRef: l,
|
|
5917
5913
|
focusOnChange: o
|
|
5918
5914
|
}), () => {
|
|
5919
|
-
const h = t.default?.() || [], L = [],
|
|
5915
|
+
const h = t.default?.() || [], L = [], R = [];
|
|
5920
5916
|
h.forEach((M) => {
|
|
5921
|
-
M.type?.name === "TabsContent" ?
|
|
5917
|
+
M.type?.name === "TabsContent" ? R.push(M) : L.push(M);
|
|
5922
5918
|
});
|
|
5923
|
-
const
|
|
5919
|
+
const E = R.find((M) => M.props?.value === a.value);
|
|
5924
5920
|
return [
|
|
5925
5921
|
...L,
|
|
5926
5922
|
W(
|
|
@@ -5934,14 +5930,14 @@ const fr = {
|
|
|
5934
5930
|
{
|
|
5935
5931
|
name: u.value,
|
|
5936
5932
|
mode: "out-in",
|
|
5937
|
-
onBeforeLeave:
|
|
5933
|
+
onBeforeLeave: f,
|
|
5938
5934
|
onEnter: m,
|
|
5939
5935
|
onAfterEnter: C
|
|
5940
5936
|
},
|
|
5941
|
-
() =>
|
|
5942
|
-
...
|
|
5943
|
-
key:
|
|
5944
|
-
},
|
|
5937
|
+
() => E ? [W(E.type, {
|
|
5938
|
+
...E.props,
|
|
5939
|
+
key: E.props.value
|
|
5940
|
+
}, E.children)] : []
|
|
5945
5941
|
)
|
|
5946
5942
|
)
|
|
5947
5943
|
];
|
|
@@ -5981,34 +5977,34 @@ const fr = {
|
|
|
5981
5977
|
setup(e, { slots: n }) {
|
|
5982
5978
|
const t = me(Je);
|
|
5983
5979
|
if (!t) throw new Error("TabsTrigger components must be used inside <Tabs>");
|
|
5984
|
-
const a =
|
|
5985
|
-
if (t.focusOnChange.value = !0, !["ArrowRight", "ArrowLeft", "ArrowDown", "ArrowUp", "Home", "End"].includes(
|
|
5986
|
-
|
|
5987
|
-
const
|
|
5988
|
-
let u =
|
|
5989
|
-
const
|
|
5990
|
-
switch (
|
|
5980
|
+
const a = _(() => t.activeValue.value === e.value), o = () => !e.disabled && t.setValue(e.value), i = (s) => {
|
|
5981
|
+
if (t.focusOnChange.value = !0, !["ArrowRight", "ArrowLeft", "ArrowDown", "ArrowUp", "Home", "End"].includes(s.key)) return;
|
|
5982
|
+
s.preventDefault();
|
|
5983
|
+
const r = t.triggers.value.filter(Boolean);
|
|
5984
|
+
let u = r.indexOf(e.value);
|
|
5985
|
+
const f = t.orientation.value === "horizontal";
|
|
5986
|
+
switch (s.key) {
|
|
5991
5987
|
case "ArrowRight":
|
|
5992
|
-
|
|
5988
|
+
f && u++;
|
|
5993
5989
|
break;
|
|
5994
5990
|
case "ArrowLeft":
|
|
5995
|
-
|
|
5991
|
+
f && u--;
|
|
5996
5992
|
break;
|
|
5997
5993
|
case "ArrowDown":
|
|
5998
|
-
|
|
5994
|
+
f || u++;
|
|
5999
5995
|
break;
|
|
6000
5996
|
case "ArrowUp":
|
|
6001
|
-
|
|
5997
|
+
f || u--;
|
|
6002
5998
|
break;
|
|
6003
5999
|
case "Home":
|
|
6004
6000
|
u = 0;
|
|
6005
6001
|
break;
|
|
6006
6002
|
case "End":
|
|
6007
|
-
u =
|
|
6003
|
+
u = r.length - 1;
|
|
6008
6004
|
break;
|
|
6009
6005
|
}
|
|
6010
|
-
u = (u +
|
|
6011
|
-
const m =
|
|
6006
|
+
u = (u + r.length) % r.length;
|
|
6007
|
+
const m = r[u];
|
|
6012
6008
|
t.activationMode.value === "auto" && t.setValue(m), requestAnimationFrame(() => {
|
|
6013
6009
|
document.getElementById(`tab-${m}`)?.focus();
|
|
6014
6010
|
});
|
|
@@ -6061,43 +6057,43 @@ const fr = {
|
|
|
6061
6057
|
const a = k(), o = (i) => {
|
|
6062
6058
|
i.key === "ArrowDown" && (i.preventDefault(), n.focusNextItem(t)), i.key === "ArrowUp" && (i.preventDefault(), n.focusPrevItem(t)), (i.key === "Enter" || i.key === " ") && (i.preventDefault(), a.value?.click(), n.close());
|
|
6063
6059
|
};
|
|
6064
|
-
return ve(() => t = n.registerItem(a.value)), (i,
|
|
6060
|
+
return ve(() => t = n.registerItem(a.value)), (i, s) => (p(), b("div", {
|
|
6065
6061
|
ref_key: "itemRef",
|
|
6066
6062
|
ref: a,
|
|
6067
6063
|
role: "menuitem",
|
|
6068
6064
|
class: "ui-dropdown-item",
|
|
6069
6065
|
tabindex: "-1",
|
|
6070
6066
|
onKeydown: o,
|
|
6071
|
-
onClick:
|
|
6067
|
+
onClick: s[0] || (s[0] = //@ts-ignore
|
|
6072
6068
|
(...l) => N(n).close && N(n).close(...l)),
|
|
6073
|
-
onPointerenter:
|
|
6069
|
+
onPointerenter: s[1] || (s[1] = (l) => a.value?.focus())
|
|
6074
6070
|
}, [
|
|
6075
6071
|
G(i.$slots, "default", {}, void 0, !0)
|
|
6076
6072
|
], 544));
|
|
6077
6073
|
}
|
|
6078
6074
|
}), Hr = /* @__PURE__ */ Y(_l, [["__scopeId", "data-v-69de3d9c"]]), Al = (e) => {
|
|
6079
|
-
const n = /* @__PURE__ */ new Date(), t = e.locale || "default", a = k(e.modelValue ?? null), o = k(e.modelValue ? new Date(e.modelValue) : n), i = e.firstDayOfWeek ?? 0,
|
|
6075
|
+
const n = /* @__PURE__ */ new Date(), t = e.locale || "default", a = k(e.modelValue ?? null), o = k(e.modelValue ? new Date(e.modelValue) : n), i = e.firstDayOfWeek ?? 0, s = _(() => {
|
|
6080
6076
|
const m = new Intl.DateTimeFormat(t, { month: "long", year: "numeric" }).format(o.value);
|
|
6081
6077
|
return m.charAt(0).toUpperCase() + m.slice(1);
|
|
6082
|
-
}), l =
|
|
6078
|
+
}), l = _(() => {
|
|
6083
6079
|
const m = new Date(2021, 5, 6);
|
|
6084
6080
|
return Array.from({ length: 7 }).map((C, h) => {
|
|
6085
6081
|
const L = new Date(m);
|
|
6086
6082
|
return L.setDate(m.getDate() + (h + i) % 7), new Intl.DateTimeFormat(t, { weekday: "short" }).format(L).replace(".", "");
|
|
6087
6083
|
});
|
|
6088
|
-
}),
|
|
6089
|
-
const m = o.value.getFullYear(), C = o.value.getMonth(), h = new Date(m, C, 1), L = new Date(m, C + 1, 0),
|
|
6090
|
-
for (let
|
|
6091
|
-
for (let
|
|
6084
|
+
}), r = _(() => {
|
|
6085
|
+
const m = o.value.getFullYear(), C = o.value.getMonth(), h = new Date(m, C, 1), L = new Date(m, C + 1, 0), R = (h.getDay() - i + 7) % 7, E = L.getDate(), M = [];
|
|
6086
|
+
for (let B = 0; B < R; B++) M.push(null);
|
|
6087
|
+
for (let B = 1; B <= E; B++) M.push(new Date(m, C, B));
|
|
6092
6088
|
return M;
|
|
6093
6089
|
});
|
|
6094
6090
|
return {
|
|
6095
6091
|
today: n,
|
|
6096
6092
|
selected: a,
|
|
6097
6093
|
currentMonth: o,
|
|
6098
|
-
monthLabel:
|
|
6094
|
+
monthLabel: s,
|
|
6099
6095
|
weekDays: l,
|
|
6100
|
-
days:
|
|
6096
|
+
days: r,
|
|
6101
6097
|
nextMonth: () => o.value = new Date(o.value.getFullYear(), o.value.getMonth() + 1, 1),
|
|
6102
6098
|
prevMonth: () => o.value = new Date(o.value.getFullYear(), o.value.getMonth() - 1, 1),
|
|
6103
6099
|
select: (m) => a.value = m
|
|
@@ -6115,25 +6111,25 @@ const fr = {
|
|
|
6115
6111
|
}, Bt = (e, n) => {
|
|
6116
6112
|
const t = n.replace("DD", "(?<day>\\d{2})").replace("MM", "(?<month>\\d{2})").replace("YYYY", "(?<year>\\d{4})").replace("HH", "(?<hour>\\d{2})").replace("mm", "(?<minute>\\d{2})").replace("ss", "(?<second>\\d{2})"), a = new RegExp(`^${t}$`), o = e.match(a);
|
|
6117
6113
|
if (!o?.groups) return null;
|
|
6118
|
-
const i = Number(o.groups.day ?? 1),
|
|
6119
|
-
return El(i,
|
|
6114
|
+
const i = Number(o.groups.day ?? 1), s = Number(o.groups.month ?? 1), l = Number(o.groups.year ?? 1970), r = Number(o.groups.hour ?? 0), c = Number(o.groups.minute ?? 0), u = Number(o.groups.second ?? 0);
|
|
6115
|
+
return El(i, s, l) ? new Date(l, s - 1, i, r, c, u, 0) : null;
|
|
6120
6116
|
};
|
|
6121
6117
|
function El(e, n, t, a = 1900, o = 2100) {
|
|
6122
6118
|
if (!Number.isInteger(e) || !Number.isInteger(n) || !Number.isInteger(t) || n < 1 || n > 12 || t < a || t > o) return !1;
|
|
6123
6119
|
const i = new Date(t, n, 0).getDate();
|
|
6124
6120
|
if (e < 1 || e > i) return !1;
|
|
6125
|
-
const
|
|
6126
|
-
return
|
|
6121
|
+
const s = new Date(t, n - 1, e);
|
|
6122
|
+
return s.getFullYear() === t && s.getMonth() === n - 1 && s.getDate() === e;
|
|
6127
6123
|
}
|
|
6128
6124
|
const Rl = (e, n) => {
|
|
6129
6125
|
const t = e.replace(/\D/g, ""), a = n.match(Pt);
|
|
6130
6126
|
if (!a) return e;
|
|
6131
6127
|
let o = "", i = 0;
|
|
6132
|
-
for (const
|
|
6133
|
-
const l =
|
|
6134
|
-
if (!
|
|
6135
|
-
if (o +=
|
|
6136
|
-
const c = n.indexOf(
|
|
6128
|
+
for (const s of a) {
|
|
6129
|
+
const l = s.length, r = t.slice(i, i + l);
|
|
6130
|
+
if (!r) break;
|
|
6131
|
+
if (o += r, i += r.length, i < t.length) {
|
|
6132
|
+
const c = n.indexOf(s) + s.length, u = n[c];
|
|
6137
6133
|
u && !u.match(/[DMYHms]/) && (o += u);
|
|
6138
6134
|
}
|
|
6139
6135
|
}
|
|
@@ -6165,14 +6161,14 @@ const Rl = (e, n) => {
|
|
|
6165
6161
|
}),
|
|
6166
6162
|
emits: /* @__PURE__ */ ie(["update:open"], ["update:modelValue"]),
|
|
6167
6163
|
setup(e, { emit: n }) {
|
|
6168
|
-
const t = ke(e, "modelValue"), a = n, o = e, i = k(!1),
|
|
6164
|
+
const t = ke(e, "modelValue"), a = n, o = e, i = k(!1), s = /* @__PURE__ */ new Date(), l = k(""), r = k(null), c = k(null), {
|
|
6169
6165
|
monthLabel: u,
|
|
6170
|
-
weekDays:
|
|
6166
|
+
weekDays: f,
|
|
6171
6167
|
currentMonth: m,
|
|
6172
6168
|
days: C,
|
|
6173
6169
|
nextMonth: h,
|
|
6174
6170
|
prevMonth: L,
|
|
6175
|
-
select:
|
|
6171
|
+
select: R
|
|
6176
6172
|
} = Al({
|
|
6177
6173
|
modelValue: t.value,
|
|
6178
6174
|
locale: o.locale,
|
|
@@ -6180,64 +6176,64 @@ const Rl = (e, n) => {
|
|
|
6180
6176
|
});
|
|
6181
6177
|
Q(
|
|
6182
6178
|
() => t.value,
|
|
6183
|
-
(
|
|
6184
|
-
if (!
|
|
6179
|
+
(S) => {
|
|
6180
|
+
if (!S) {
|
|
6185
6181
|
l.value = "", c.value = null;
|
|
6186
6182
|
return;
|
|
6187
6183
|
}
|
|
6188
|
-
|
|
6184
|
+
R(S), m.value = new Date(S), c.value = S, l.value = ot(S, o.format);
|
|
6189
6185
|
},
|
|
6190
6186
|
{ immediate: !0 }
|
|
6191
6187
|
), Q(
|
|
6192
6188
|
i,
|
|
6193
|
-
async (
|
|
6194
|
-
if (
|
|
6189
|
+
async (S) => {
|
|
6190
|
+
if (S) {
|
|
6195
6191
|
await xe();
|
|
6196
|
-
let x =
|
|
6192
|
+
let x = r.value?.querySelector('button[data-selected="true"]');
|
|
6197
6193
|
if (!x) {
|
|
6198
6194
|
const V = /* @__PURE__ */ new Date();
|
|
6199
|
-
x = Array.from(
|
|
6195
|
+
x = Array.from(r.value?.querySelectorAll("button") || []).find((g) => Number(g.textContent) === V.getDate() && !g.disabled);
|
|
6200
6196
|
}
|
|
6201
6197
|
x && x.focus(), document.addEventListener("keydown", z);
|
|
6202
6198
|
} else document.removeEventListener("keydown", z);
|
|
6203
6199
|
}
|
|
6204
6200
|
);
|
|
6205
|
-
const
|
|
6206
|
-
c.value =
|
|
6207
|
-
}, M = (
|
|
6208
|
-
if (!
|
|
6201
|
+
const E = (S) => {
|
|
6202
|
+
c.value = S, t.value = S, l.value = ot(S, o.format), R(S), i.value = !1;
|
|
6203
|
+
}, M = (S) => {
|
|
6204
|
+
if (!S) return "";
|
|
6209
6205
|
const x = [];
|
|
6210
|
-
return c.value &&
|
|
6211
|
-
},
|
|
6212
|
-
|
|
6213
|
-
}, oe = (
|
|
6214
|
-
const x =
|
|
6215
|
-
let
|
|
6206
|
+
return c.value && B(S, c.value) && x.push("dp-selected"), B(S, s) && x.push("dp-today"), x.join(" ");
|
|
6207
|
+
}, B = (S, x) => S.getFullYear() === x.getFullYear() && S.getMonth() === x.getMonth() && S.getDate() === x.getDate(), z = (S) => S.key === "Escape" && (i.value = !1), U = (S) => {
|
|
6208
|
+
S.key === "Backspace" || S.key === "Delete" || S.key === "ArrowLeft" || S.key === "ArrowRight" || S.key === "Tab" || /[0-9]/.test(S.key) || S.preventDefault();
|
|
6209
|
+
}, oe = (S) => {
|
|
6210
|
+
const x = S.target, V = x.selectionStart ?? 0, T = x.value.slice(0, V).replace(/\D/g, "").length;
|
|
6211
|
+
let A = x.value.replace(/\D/g, "");
|
|
6216
6212
|
const F = Sl(o.format);
|
|
6217
|
-
|
|
6218
|
-
const H = Rl(
|
|
6213
|
+
A = A.slice(0, F);
|
|
6214
|
+
const H = Rl(A, o.format);
|
|
6219
6215
|
l.value = H, x.value = H;
|
|
6220
6216
|
let O = 0, I = 0;
|
|
6221
|
-
for (let
|
|
6222
|
-
if (/\d/.test(H[
|
|
6223
|
-
O =
|
|
6217
|
+
for (let v = 0; v < H.length; v++)
|
|
6218
|
+
if (/\d/.test(H[v] ?? "") && I++, I >= T) {
|
|
6219
|
+
O = v + 1;
|
|
6224
6220
|
break;
|
|
6225
6221
|
}
|
|
6226
6222
|
requestAnimationFrame(() => x.setSelectionRange(O, O));
|
|
6227
6223
|
const D = Bt(H, o.format);
|
|
6228
6224
|
D && (c.value = D, t.value = D);
|
|
6229
6225
|
}, ue = () => {
|
|
6230
|
-
|
|
6231
|
-
}, re = (
|
|
6232
|
-
|
|
6226
|
+
r.value && !i.value && !r.value.hasAttribute("readOnly") && (i.value = !0, a("update:open", !0));
|
|
6227
|
+
}, re = (S) => {
|
|
6228
|
+
r.value && (r.value.contains(S.target) || (i.value = !1, a("update:open", !1)));
|
|
6233
6229
|
}, P = () => {
|
|
6234
|
-
const
|
|
6235
|
-
!
|
|
6230
|
+
const S = Bt(l.value, o.format);
|
|
6231
|
+
!S && !c.value ? (l.value = "", t.value = null, c.value = null) : S && (c.value = S, t.value = S, l.value = ot(S, o.format));
|
|
6236
6232
|
};
|
|
6237
|
-
return ve(() => document.addEventListener("mousedown", re)), Se(() => document.removeEventListener("mousedown", re)), (
|
|
6233
|
+
return ve(() => document.addEventListener("mousedown", re)), Se(() => document.removeEventListener("mousedown", re)), (S, x) => (p(), b("div", {
|
|
6238
6234
|
ref_key: "root",
|
|
6239
|
-
ref:
|
|
6240
|
-
class: fe(["dp", { required: Object.keys(
|
|
6235
|
+
ref: r,
|
|
6236
|
+
class: fe(["dp", { required: Object.keys(S.$attrs).includes("required"), error: e.invalid }])
|
|
6241
6237
|
}, [
|
|
6242
6238
|
w("label", {
|
|
6243
6239
|
for: e.id,
|
|
@@ -6251,7 +6247,7 @@ const Rl = (e, n) => {
|
|
|
6251
6247
|
onInput: oe,
|
|
6252
6248
|
onKeydown: U,
|
|
6253
6249
|
onMousedown: ue,
|
|
6254
|
-
required: Object.keys(
|
|
6250
|
+
required: Object.keys(S.$attrs).includes("required") || void 0,
|
|
6255
6251
|
"aria-invalid": !c.value && l.value !== "",
|
|
6256
6252
|
disabled: e.disabled ? !0 : void 0,
|
|
6257
6253
|
"data-disabled": e.disabled ? !0 : void 0,
|
|
@@ -6294,7 +6290,7 @@ const Rl = (e, n) => {
|
|
|
6294
6290
|
}, "›")
|
|
6295
6291
|
]),
|
|
6296
6292
|
w("div", Ol, [
|
|
6297
|
-
(p(!0), b(de, null, he(N(
|
|
6293
|
+
(p(!0), b(de, null, he(N(f), (V) => (p(), b("span", {
|
|
6298
6294
|
class: "week-day__name",
|
|
6299
6295
|
key: V
|
|
6300
6296
|
}, j(V), 1))), 128))
|
|
@@ -6308,7 +6304,7 @@ const Rl = (e, n) => {
|
|
|
6308
6304
|
disabled: !V,
|
|
6309
6305
|
"aria-pressed": M(V) === "dp-selected",
|
|
6310
6306
|
"data-selected": V && M(V) === "dp-selected",
|
|
6311
|
-
onMousedown: se((T) => V &&
|
|
6307
|
+
onMousedown: se((T) => V && E(V), ["prevent"]),
|
|
6312
6308
|
"aria-label": V ? V.toLocaleDateString(o.locale, { weekday: "long", year: "numeric", month: "long", day: "numeric" }) : ""
|
|
6313
6309
|
}, j(V?.getDate()), 43, Fl))), 128))
|
|
6314
6310
|
]),
|
|
@@ -6321,7 +6317,7 @@ const Rl = (e, n) => {
|
|
|
6321
6317
|
]),
|
|
6322
6318
|
_: 1
|
|
6323
6319
|
}),
|
|
6324
|
-
G(
|
|
6320
|
+
G(S.$slots, "time", {}, void 0, !0)
|
|
6325
6321
|
])) : q("", !0)
|
|
6326
6322
|
], 2));
|
|
6327
6323
|
}
|
|
@@ -6350,51 +6346,51 @@ const Rl = (e, n) => {
|
|
|
6350
6346
|
}),
|
|
6351
6347
|
emits: ["update:modelValue"],
|
|
6352
6348
|
setup(e) {
|
|
6353
|
-
const n = ke(e, "modelValue"), t = e, a = ge(), o = k(!1), i = k(null),
|
|
6354
|
-
Q(n, (
|
|
6355
|
-
if (
|
|
6356
|
-
const M = new Date(
|
|
6357
|
-
c.value = M, u.value = M.getHours(),
|
|
6349
|
+
const n = ke(e, "modelValue"), t = e, a = ge(), o = k(!1), i = k(null), s = _(() => t.format.includes("HH")), l = _(() => t.format.includes("mm")), r = _(() => t.format.includes("ss")), c = k(n.value ?? null), u = k(n.value?.getHours() ?? (s.value ? 0 : void 0)), f = k(n.value?.getMinutes() ?? (l.value ? 0 : void 0)), m = k(n.value?.getSeconds() ?? (r.value ? 0 : void 0));
|
|
6350
|
+
Q(n, (E) => {
|
|
6351
|
+
if (E) {
|
|
6352
|
+
const M = new Date(E);
|
|
6353
|
+
c.value = M, u.value = M.getHours(), f.value = M.getMinutes(), m.value = M.getSeconds();
|
|
6358
6354
|
} else
|
|
6359
|
-
c.value = null, u.value = 0,
|
|
6360
|
-
}, { immediate: !0 }), Q(c, (
|
|
6361
|
-
if (!
|
|
6362
|
-
const M =
|
|
6363
|
-
M !== u.value && (u.value = M),
|
|
6364
|
-
}, { immediate: !0 }), Q([c, u,
|
|
6355
|
+
c.value = null, u.value = 0, f.value = 0, m.value = 0;
|
|
6356
|
+
}, { immediate: !0 }), Q(c, (E) => {
|
|
6357
|
+
if (!E) return;
|
|
6358
|
+
const M = E.getHours(), B = E.getMinutes(), z = E.getSeconds();
|
|
6359
|
+
M !== u.value && (u.value = M), B !== f.value && (f.value = B), z !== m.value && (m.value = z);
|
|
6360
|
+
}, { immediate: !0 }), Q([c, u, f, m], () => {
|
|
6365
6361
|
if (!c.value) {
|
|
6366
6362
|
n.value = null;
|
|
6367
6363
|
return;
|
|
6368
6364
|
}
|
|
6369
|
-
const
|
|
6370
|
-
z.setHours(
|
|
6365
|
+
const E = Math.min(Math.max(u.value ?? 0, 0), 23), M = Math.min(Math.max(f.value ?? 0, 0), 59), B = Math.min(Math.max(m.value ?? 0, 0), 59), z = new Date(c.value);
|
|
6366
|
+
z.setHours(E, M, B, 0), (!n.value || n.value.getTime() !== z.getTime()) && (n.value = z);
|
|
6371
6367
|
});
|
|
6372
|
-
const C = (
|
|
6373
|
-
i.value && (i.value.contains(
|
|
6374
|
-
}, h = (
|
|
6375
|
-
const M = Number(
|
|
6368
|
+
const C = (E) => {
|
|
6369
|
+
i.value && (i.value.contains(E.target) || (o.value = !1));
|
|
6370
|
+
}, h = (E) => {
|
|
6371
|
+
const M = Number(E.target.value);
|
|
6376
6372
|
isNaN(M) || M < 0 ? u.value = 0 : M > 23 ? u.value = 23 : u.value = M;
|
|
6377
|
-
}, L = (
|
|
6378
|
-
const M = Number(
|
|
6379
|
-
isNaN(M) || M < 0 ?
|
|
6380
|
-
},
|
|
6381
|
-
const M = Number(
|
|
6373
|
+
}, L = (E) => {
|
|
6374
|
+
const M = Number(E.target.value);
|
|
6375
|
+
isNaN(M) || M < 0 ? f.value = 0 : M > 59 ? f.value = 59 : f.value = M;
|
|
6376
|
+
}, R = (E) => {
|
|
6377
|
+
const M = Number(E.target.value);
|
|
6382
6378
|
isNaN(M) || M < 0 ? m.value = 0 : M > 59 ? m.value = 59 : m.value = M;
|
|
6383
6379
|
};
|
|
6384
6380
|
return ve(() => {
|
|
6385
6381
|
document.addEventListener("mousedown", C);
|
|
6386
6382
|
}), Se(() => {
|
|
6387
6383
|
document.removeEventListener("mousedown", C);
|
|
6388
|
-
}), (
|
|
6384
|
+
}), (E, M) => (p(), b("div", {
|
|
6389
6385
|
class: "dtp",
|
|
6390
6386
|
ref_key: "root",
|
|
6391
6387
|
ref: i
|
|
6392
6388
|
}, [
|
|
6393
|
-
K(Ul, be(
|
|
6389
|
+
K(Ul, be(E.$attrs, {
|
|
6394
6390
|
modelValue: c.value,
|
|
6395
|
-
"onUpdate:modelValue": M[3] || (M[3] = (
|
|
6391
|
+
"onUpdate:modelValue": M[3] || (M[3] = (B) => c.value = B),
|
|
6396
6392
|
open: o.value,
|
|
6397
|
-
"onUpdate:open": M[4] || (M[4] = (
|
|
6393
|
+
"onUpdate:open": M[4] || (M[4] = (B) => o.value = B),
|
|
6398
6394
|
id: t.id,
|
|
6399
6395
|
invalid: e.invalid,
|
|
6400
6396
|
locale: e.locale,
|
|
@@ -6406,11 +6402,11 @@ const Rl = (e, n) => {
|
|
|
6406
6402
|
}), {
|
|
6407
6403
|
time: J(() => [
|
|
6408
6404
|
o.value ? (p(), b("div", Kl, [
|
|
6409
|
-
|
|
6405
|
+
s.value ? _e((p(), b("input", {
|
|
6410
6406
|
key: 0,
|
|
6411
6407
|
id: `hour_${N(a)}`,
|
|
6412
6408
|
type: "number",
|
|
6413
|
-
"onUpdate:modelValue": M[0] || (M[0] = (
|
|
6409
|
+
"onUpdate:modelValue": M[0] || (M[0] = (B) => u.value = B),
|
|
6414
6410
|
min: "0",
|
|
6415
6411
|
max: "23",
|
|
6416
6412
|
"aria-label": "Hour",
|
|
@@ -6426,40 +6422,40 @@ const Rl = (e, n) => {
|
|
|
6426
6422
|
{ number: !0 }
|
|
6427
6423
|
]
|
|
6428
6424
|
]) : q("", !0),
|
|
6429
|
-
|
|
6425
|
+
s.value && l.value ? (p(), b("span", Wl, ":")) : q("", !0),
|
|
6430
6426
|
l.value ? _e((p(), b("input", {
|
|
6431
6427
|
key: 2,
|
|
6432
6428
|
id: `minute_${N(a)}`,
|
|
6433
6429
|
type: "number",
|
|
6434
|
-
"onUpdate:modelValue": M[1] || (M[1] = (
|
|
6430
|
+
"onUpdate:modelValue": M[1] || (M[1] = (B) => f.value = B),
|
|
6435
6431
|
min: "0",
|
|
6436
6432
|
max: "59",
|
|
6437
6433
|
"aria-label": "Minute",
|
|
6438
6434
|
"aria-valuemin": "0",
|
|
6439
6435
|
"aria-valuemax": "59",
|
|
6440
|
-
"aria-valuenow":
|
|
6436
|
+
"aria-valuenow": f.value,
|
|
6441
6437
|
onInput: L
|
|
6442
6438
|
}, null, 40, Yl)), [
|
|
6443
6439
|
[
|
|
6444
6440
|
Ye,
|
|
6445
|
-
|
|
6441
|
+
f.value,
|
|
6446
6442
|
void 0,
|
|
6447
6443
|
{ number: !0 }
|
|
6448
6444
|
]
|
|
6449
6445
|
]) : q("", !0),
|
|
6450
|
-
(
|
|
6451
|
-
|
|
6446
|
+
(s.value || l.value) && r.value ? (p(), b("span", Xl, ":")) : q("", !0),
|
|
6447
|
+
r.value ? _e((p(), b("input", {
|
|
6452
6448
|
key: 4,
|
|
6453
6449
|
id: `second_${N(a)}`,
|
|
6454
6450
|
type: "number",
|
|
6455
|
-
"onUpdate:modelValue": M[2] || (M[2] = (
|
|
6451
|
+
"onUpdate:modelValue": M[2] || (M[2] = (B) => m.value = B),
|
|
6456
6452
|
min: "0",
|
|
6457
6453
|
max: "59",
|
|
6458
6454
|
"aria-label": "Second",
|
|
6459
6455
|
"aria-valuemin": "0",
|
|
6460
6456
|
"aria-valuemax": "59",
|
|
6461
6457
|
"aria-valuenow": m.value,
|
|
6462
|
-
onInput:
|
|
6458
|
+
onInput: R
|
|
6463
6459
|
}, null, 40, Gl)), [
|
|
6464
6460
|
[
|
|
6465
6461
|
Ye,
|
|
@@ -6501,11 +6497,11 @@ const Rl = (e, n) => {
|
|
|
6501
6497
|
},
|
|
6502
6498
|
emits: ["update:sort", "rowClick"],
|
|
6503
6499
|
setup(e, { emit: n, slots: t }) {
|
|
6504
|
-
const a = (
|
|
6505
|
-
if (!
|
|
6506
|
-
const c = e.sort?.key ===
|
|
6507
|
-
n("update:sort", { key:
|
|
6508
|
-
}, o = () => window.matchMedia("(max-width: 640px)").matches, i = (
|
|
6500
|
+
const a = (r) => {
|
|
6501
|
+
if (!r.sortable) return;
|
|
6502
|
+
const c = e.sort?.key === r.key && e.sort.direction === "asc" ? "desc" : "asc";
|
|
6503
|
+
n("update:sort", { key: r.key, direction: c });
|
|
6504
|
+
}, o = () => window.matchMedia("(max-width: 640px)").matches, i = (r, c) => c.split(".").reduce((u, f) => u?.[f], r), s = () => W(
|
|
6509
6505
|
"div",
|
|
6510
6506
|
{
|
|
6511
6507
|
class: "rs-table-mobile",
|
|
@@ -6513,16 +6509,16 @@ const Rl = (e, n) => {
|
|
|
6513
6509
|
"aria-busy": e.loading || void 0
|
|
6514
6510
|
},
|
|
6515
6511
|
e.loading ? t.loading?.() ?? "Loading..." : e.data.length === 0 ? t.empty?.() ?? "No data available." : e.data.map(
|
|
6516
|
-
(
|
|
6512
|
+
(r, c) => W(
|
|
6517
6513
|
"div",
|
|
6518
6514
|
{
|
|
6519
|
-
key:
|
|
6515
|
+
key: r.id ?? c,
|
|
6520
6516
|
class: "rs-table-card",
|
|
6521
6517
|
role: e.rowClickable ? "button" : "listitem",
|
|
6522
6518
|
tabindex: e.rowClickable ? 0 : void 0,
|
|
6523
|
-
onClick: e.rowClickable ? () => n("rowClick",
|
|
6519
|
+
onClick: e.rowClickable ? () => n("rowClick", r) : void 0,
|
|
6524
6520
|
onKeydown: e.rowClickable ? (u) => {
|
|
6525
|
-
(u.key === "Enter" || u.key === " ") && (u.preventDefault(), n("rowClick",
|
|
6521
|
+
(u.key === "Enter" || u.key === " ") && (u.preventDefault(), n("rowClick", r));
|
|
6526
6522
|
} : void 0
|
|
6527
6523
|
},
|
|
6528
6524
|
e.columns.map(
|
|
@@ -6539,10 +6535,10 @@ const Rl = (e, n) => {
|
|
|
6539
6535
|
"span",
|
|
6540
6536
|
{ class: "rs-table-card-value" },
|
|
6541
6537
|
t.cell?.({
|
|
6542
|
-
row:
|
|
6538
|
+
row: r,
|
|
6543
6539
|
column: u,
|
|
6544
|
-
value: i(
|
|
6545
|
-
}) ?? i(
|
|
6540
|
+
value: i(r, u.key)
|
|
6541
|
+
}) ?? i(r, u.key)
|
|
6546
6542
|
)
|
|
6547
6543
|
]
|
|
6548
6544
|
)
|
|
@@ -6569,19 +6565,19 @@ const Rl = (e, n) => {
|
|
|
6569
6565
|
"tr",
|
|
6570
6566
|
null,
|
|
6571
6567
|
e.columns.map(
|
|
6572
|
-
(
|
|
6568
|
+
(r) => W(
|
|
6573
6569
|
"th",
|
|
6574
6570
|
{
|
|
6575
|
-
key:
|
|
6571
|
+
key: r.key,
|
|
6576
6572
|
style: {
|
|
6577
|
-
width:
|
|
6578
|
-
textAlign:
|
|
6573
|
+
width: r.width || "auto",
|
|
6574
|
+
textAlign: r.align || "left"
|
|
6579
6575
|
},
|
|
6580
|
-
"aria-sort":
|
|
6581
|
-
tabindex:
|
|
6582
|
-
onClick:
|
|
6583
|
-
onKeydown:
|
|
6584
|
-
(c.key === "Enter" || c.key === " ") && (c.preventDefault(), a(
|
|
6576
|
+
"aria-sort": r.sortable ? e.sort?.key === r.key ? e.sort.direction === "asc" ? "ascending" : "descending" : "none" : void 0,
|
|
6577
|
+
tabindex: r.sortable ? 0 : void 0,
|
|
6578
|
+
onClick: r.sortable ? () => a(r) : void 0,
|
|
6579
|
+
onKeydown: r.sortable ? (c) => {
|
|
6580
|
+
(c.key === "Enter" || c.key === " ") && (c.preventDefault(), a(r));
|
|
6585
6581
|
} : void 0,
|
|
6586
6582
|
scope: "col"
|
|
6587
6583
|
},
|
|
@@ -6591,12 +6587,12 @@ const Rl = (e, n) => {
|
|
|
6591
6587
|
[
|
|
6592
6588
|
W(
|
|
6593
6589
|
"span",
|
|
6594
|
-
|
|
6590
|
+
r.header
|
|
6595
6591
|
),
|
|
6596
|
-
|
|
6592
|
+
r.sortable ? W(
|
|
6597
6593
|
Ce,
|
|
6598
6594
|
{
|
|
6599
|
-
name: e.sort?.key ===
|
|
6595
|
+
name: e.sort?.key === r.key ? e.sort.direction === "asc" ? "sortAsc" : "sortDesc" : "sort",
|
|
6600
6596
|
size: 16
|
|
6601
6597
|
}
|
|
6602
6598
|
) : null
|
|
@@ -6634,15 +6630,15 @@ const Rl = (e, n) => {
|
|
|
6634
6630
|
]
|
|
6635
6631
|
)
|
|
6636
6632
|
] : e.data.map(
|
|
6637
|
-
(
|
|
6633
|
+
(r, c) => W(
|
|
6638
6634
|
"tr",
|
|
6639
6635
|
{
|
|
6640
|
-
key:
|
|
6636
|
+
key: r.id ?? c,
|
|
6641
6637
|
tabindex: e.rowClickable ? 0 : void 0,
|
|
6642
6638
|
role: e.rowClickable ? "button" : void 0,
|
|
6643
|
-
onClick: e.rowClickable ? () => n("rowClick",
|
|
6639
|
+
onClick: e.rowClickable ? () => n("rowClick", r) : void 0,
|
|
6644
6640
|
onKeydown: e.rowClickable ? (u) => {
|
|
6645
|
-
(u.key === "Enter" || u.key === " ") && (u.preventDefault(), n("rowClick",
|
|
6641
|
+
(u.key === "Enter" || u.key === " ") && (u.preventDefault(), n("rowClick", r));
|
|
6646
6642
|
} : void 0,
|
|
6647
6643
|
"data-clickable": e.rowClickable || void 0
|
|
6648
6644
|
},
|
|
@@ -6656,10 +6652,10 @@ const Rl = (e, n) => {
|
|
|
6656
6652
|
}
|
|
6657
6653
|
},
|
|
6658
6654
|
t.cell?.({
|
|
6659
|
-
row:
|
|
6655
|
+
row: r,
|
|
6660
6656
|
column: u,
|
|
6661
|
-
value: i(
|
|
6662
|
-
}) ?? i(
|
|
6657
|
+
value: i(r, u.key)
|
|
6658
|
+
}) ?? i(r, u.key)
|
|
6663
6659
|
)
|
|
6664
6660
|
)
|
|
6665
6661
|
)
|
|
@@ -6670,11 +6666,11 @@ const Rl = (e, n) => {
|
|
|
6670
6666
|
)
|
|
6671
6667
|
);
|
|
6672
6668
|
return () => {
|
|
6673
|
-
const
|
|
6669
|
+
const r = e.responsive === "card" || e.responsive === "auto" && o();
|
|
6674
6670
|
return W(
|
|
6675
6671
|
"div",
|
|
6676
6672
|
{ class: "rs-table-container" },
|
|
6677
|
-
|
|
6673
|
+
r ? s() : l()
|
|
6678
6674
|
);
|
|
6679
6675
|
};
|
|
6680
6676
|
}
|
|
@@ -6688,32 +6684,32 @@ const Rl = (e, n) => {
|
|
|
6688
6684
|
}
|
|
6689
6685
|
},
|
|
6690
6686
|
setup(e, { slots: n }) {
|
|
6691
|
-
const t = k([]), a = k(new Set(e.defaultOpen)), o = (
|
|
6692
|
-
if (a.value.has(
|
|
6693
|
-
a.value.delete(
|
|
6687
|
+
const t = k([]), a = k(new Set(e.defaultOpen)), o = (f) => {
|
|
6688
|
+
if (a.value.has(f)) {
|
|
6689
|
+
a.value.delete(f);
|
|
6694
6690
|
return;
|
|
6695
6691
|
}
|
|
6696
|
-
e.multiple || a.value.clear(), a.value.add(
|
|
6697
|
-
}, i = (
|
|
6698
|
-
|
|
6699
|
-
},
|
|
6700
|
-
const m = t.value.indexOf(
|
|
6692
|
+
e.multiple || a.value.clear(), a.value.add(f);
|
|
6693
|
+
}, i = (f) => {
|
|
6694
|
+
f.disabled || t.value.includes(f) || (t.value.push(f), t.value.sort((m, C) => m.offsetTop - C.offsetTop));
|
|
6695
|
+
}, s = (f) => t.value = t.value.filter((m) => m !== f), l = (f) => {
|
|
6696
|
+
const m = t.value.indexOf(f);
|
|
6701
6697
|
t.value[(m + 1) % t.value.length]?.focus();
|
|
6702
|
-
},
|
|
6703
|
-
const m = t.value.indexOf(
|
|
6698
|
+
}, r = (f) => {
|
|
6699
|
+
const m = t.value.indexOf(f);
|
|
6704
6700
|
t.value[(m - 1 + t.value.length) % t.value.length]?.focus();
|
|
6705
6701
|
}, c = () => t.value[0]?.focus(), u = () => {
|
|
6706
|
-
const
|
|
6707
|
-
|
|
6702
|
+
const f = t.value;
|
|
6703
|
+
f.length && f[f.length - 1]?.focus();
|
|
6708
6704
|
};
|
|
6709
6705
|
return He(Qe, {
|
|
6710
6706
|
multiple: e.multiple,
|
|
6711
6707
|
openItems: a,
|
|
6712
6708
|
toggle: o,
|
|
6713
6709
|
registerHeader: i,
|
|
6714
|
-
unregisterHeader:
|
|
6710
|
+
unregisterHeader: s,
|
|
6715
6711
|
focusNext: l,
|
|
6716
|
-
focusPrev:
|
|
6712
|
+
focusPrev: r,
|
|
6717
6713
|
focusFirst: c,
|
|
6718
6714
|
focusLast: u
|
|
6719
6715
|
}), () => n.default?.();
|
|
@@ -6727,7 +6723,7 @@ const Rl = (e, n) => {
|
|
|
6727
6723
|
setup(e, { slots: n }) {
|
|
6728
6724
|
const t = me(Qe);
|
|
6729
6725
|
if (!t) throw new Error("AccordionItem must be used inside Accordion");
|
|
6730
|
-
const a =
|
|
6726
|
+
const a = _(() => t.openItems.value.has(e.id));
|
|
6731
6727
|
return () => W(
|
|
6732
6728
|
"div",
|
|
6733
6729
|
{
|
|
@@ -6746,9 +6742,9 @@ const Rl = (e, n) => {
|
|
|
6746
6742
|
setup(e, { slots: n }) {
|
|
6747
6743
|
const t = me(Qe), a = k(null);
|
|
6748
6744
|
if (!t) throw new Error("AccordionHeader must be used inside Accordion");
|
|
6749
|
-
const o =
|
|
6745
|
+
const o = _(() => t.openItems.value.has(e.id)), i = () => {
|
|
6750
6746
|
e.disabled || t.toggle?.(e.id);
|
|
6751
|
-
},
|
|
6747
|
+
}, s = (l) => {
|
|
6752
6748
|
if (a.value)
|
|
6753
6749
|
switch (l.key) {
|
|
6754
6750
|
case "ArrowDown":
|
|
@@ -6781,7 +6777,7 @@ const Rl = (e, n) => {
|
|
|
6781
6777
|
disabled: e.disabled,
|
|
6782
6778
|
"data-state": o.value ? "open" : "closed",
|
|
6783
6779
|
onClick: i,
|
|
6784
|
-
onKeydown:
|
|
6780
|
+
onKeydown: s
|
|
6785
6781
|
},
|
|
6786
6782
|
[
|
|
6787
6783
|
W(
|
|
@@ -6805,7 +6801,7 @@ const Rl = (e, n) => {
|
|
|
6805
6801
|
setup(e, { slots: n }) {
|
|
6806
6802
|
const t = me(Qe);
|
|
6807
6803
|
if (!t) throw new Error("AccordionPanel must be used inside Accordion");
|
|
6808
|
-
const a =
|
|
6804
|
+
const a = _(() => t.openItems.value.has(e.id));
|
|
6809
6805
|
return () => W(
|
|
6810
6806
|
"div",
|
|
6811
6807
|
{
|