@strands.gg/accui 2.17.11 → 2.17.12
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/accui.css +1 -1
- package/dist/index.cjs.js +5 -5
- package/dist/index.es.js +676 -680
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { _ as Ue, S as lt, U as Qa, a as Xa, b as Ja, c as es, d as kt, M as ts, e as _t, f as Kt, g as ba, u as ja, C as _a, h as Fe, i as ht, j as Oa, k as mt, l as Et } from "./StrandsUIPlugin-RTFzvRED.es.js";
|
|
2
2
|
import { m as Hu } from "./StrandsUIPlugin-RTFzvRED.es.js";
|
|
3
|
-
import { defineComponent as Ve, computed as H, provide as Yt, onMounted as Ye, onUnmounted as Mt, createElementBlock as o, openBlock as a, normalizeClass as Me, createElementVNode as e, createBlock as ye, renderSlot as Pe, Teleport as Wt, createCommentVNode as I, toDisplayString as R, ref as M, watch as Le, createTextVNode as J, reactive as Ge, withModifiers as qe, createStaticVNode as Qt, createVNode as d, withDirectives as Qe, withCtx as _, unref as
|
|
3
|
+
import { defineComponent as Ve, computed as H, provide as Yt, onMounted as Ye, onUnmounted as Mt, createElementBlock as o, openBlock as a, normalizeClass as Me, createElementVNode as e, createBlock as ye, renderSlot as Pe, Teleport as Wt, createCommentVNode as I, toDisplayString as R, ref as M, watch as Le, createTextVNode as J, reactive as Ge, withModifiers as qe, createStaticVNode as Qt, createVNode as d, withDirectives as Qe, withCtx as _, unref as i, vModelText as Xe, nextTick as yt, Fragment as De, Transition as rt, createSlots as Ft, normalizeStyle as je, renderList as Ze, mergeProps as xa, useSlots as ha, inject as fa, resolveDynamicComponent as ot, onBeforeUnmount as Ra, withKeys as st, h as oe, isMemoSame as as, getCurrentInstance as ss } from "vue";
|
|
4
4
|
import { u as vt, p as La } from "./useStrandsConfig-CMKVW1p3.es.js";
|
|
5
5
|
import { s as Du } from "./useStrandsConfig-CMKVW1p3.es.js";
|
|
6
6
|
import { u as ft } from "./useStrandsAuth-C2WOjQ2Z.es.js";
|
|
@@ -194,7 +194,7 @@ const Ha = kt("users", [
|
|
|
194
194
|
},
|
|
195
195
|
emits: ["upload", "error"],
|
|
196
196
|
setup(s, { emit: r }) {
|
|
197
|
-
const t = s, l = r, z = M(), V = M(), C = M(), w = M(""), c = M(), h = M(t.size), x = M(t.previewSize), S = M(t.size / 2.5), u = Ge({ x: 0, y: 0 }), m = M(1),
|
|
197
|
+
const t = s, l = r, z = M(), V = M(), C = M(), w = M(""), c = M(), h = M(t.size), x = M(t.previewSize), S = M(t.size / 2.5), u = Ge({ x: 0, y: 0 }), m = M(1), U = M(0.1), D = M(3), g = M(!1), N = M(!1), y = M(!1), L = Ge({ x: 0, y: 0, imageX: 0, imageY: 0 });
|
|
198
198
|
Ye(() => {
|
|
199
199
|
if (V.value) {
|
|
200
200
|
const W = V.value.getContext("2d");
|
|
@@ -233,7 +233,7 @@ const Ha = kt("users", [
|
|
|
233
233
|
S.value * 2 / Z.width,
|
|
234
234
|
S.value * 2 / Z.height
|
|
235
235
|
), te = ie;
|
|
236
|
-
|
|
236
|
+
U.value = ie, D.value = Math.max(1, ie);
|
|
237
237
|
const Y = Z.width * te, le = Z.height * te;
|
|
238
238
|
u.x = (h.value - Y) / 2, u.y = (h.value - le) / 2, m.value = te, ce(), yt(() => {
|
|
239
239
|
N.value = !1;
|
|
@@ -279,7 +279,7 @@ const Ha = kt("users", [
|
|
|
279
279
|
g.value = !1, document.removeEventListener("mousemove", Ce), document.removeEventListener("mouseup", xe);
|
|
280
280
|
}, Ae = (W) => {
|
|
281
281
|
W.preventDefault();
|
|
282
|
-
const Z = W.deltaY > 0 ? -0.05 : 0.05, ie = Math.max(
|
|
282
|
+
const Z = W.deltaY > 0 ? -0.05 : 0.05, ie = Math.max(U.value, Math.min(D.value, m.value + Z));
|
|
283
283
|
if (ie !== m.value && c.value) {
|
|
284
284
|
y.value = !0;
|
|
285
285
|
const te = c.value, Y = h.value / 2, le = te.width * m.value, _e = te.height * m.value, Te = te.width * ie, Ee = te.height * ie, $e = u.x + le / 2 - Y, re = u.y + _e / 2 - Y, ve = ie / m.value, Ie = $e * ve, K = re * ve;
|
|
@@ -295,7 +295,7 @@ const Ha = kt("users", [
|
|
|
295
295
|
S.value * 2 / W.width,
|
|
296
296
|
S.value * 2 / W.height
|
|
297
297
|
), ie = Z;
|
|
298
|
-
|
|
298
|
+
U.value = Z, D.value = Math.max(1, Z);
|
|
299
299
|
const te = W.width * ie, Y = W.height * ie;
|
|
300
300
|
u.x = (h.value - te) / 2, u.y = (h.value - Y) / 2, m.value = ie, ce(), yt(() => {
|
|
301
301
|
N.value = !1;
|
|
@@ -407,7 +407,7 @@ const Ha = kt("users", [
|
|
|
407
407
|
e("div", Us, [
|
|
408
408
|
d(lt, {
|
|
409
409
|
onClick: Z[2] || (Z[2] = (ie) => {
|
|
410
|
-
m.value = Math.max(
|
|
410
|
+
m.value = Math.max(U.value, m.value - 0.1), ce(), b();
|
|
411
411
|
}),
|
|
412
412
|
icon: !0,
|
|
413
413
|
squircle: !0,
|
|
@@ -416,15 +416,15 @@ const Ha = kt("users", [
|
|
|
416
416
|
"aria-label": "Zoom out"
|
|
417
417
|
}, {
|
|
418
418
|
icon: _(() => [
|
|
419
|
-
d(
|
|
419
|
+
d(i(ts))
|
|
420
420
|
]),
|
|
421
421
|
_: 1
|
|
422
422
|
}),
|
|
423
423
|
Qe(e("input", {
|
|
424
424
|
type: "range",
|
|
425
425
|
"onUpdate:modelValue": Z[3] || (Z[3] = (ie) => m.value = ie),
|
|
426
|
-
min:
|
|
427
|
-
max:
|
|
426
|
+
min: U.value,
|
|
427
|
+
max: D.value,
|
|
428
428
|
step: 0.01,
|
|
429
429
|
class: "zoom-slider",
|
|
430
430
|
onInput: Z[4] || (Z[4] = (ie) => {
|
|
@@ -440,7 +440,7 @@ const Ha = kt("users", [
|
|
|
440
440
|
]),
|
|
441
441
|
d(lt, {
|
|
442
442
|
onClick: Z[5] || (Z[5] = (ie) => {
|
|
443
|
-
m.value = Math.min(
|
|
443
|
+
m.value = Math.min(D.value, m.value + 0.1), ce(), b();
|
|
444
444
|
}),
|
|
445
445
|
icon: !0,
|
|
446
446
|
squircle: !0,
|
|
@@ -449,7 +449,7 @@ const Ha = kt("users", [
|
|
|
449
449
|
"aria-label": "Zoom in"
|
|
450
450
|
}, {
|
|
451
451
|
icon: _(() => [
|
|
452
|
-
d(
|
|
452
|
+
d(i(ps))
|
|
453
453
|
]),
|
|
454
454
|
_: 1
|
|
455
455
|
})
|
|
@@ -703,7 +703,7 @@ const Rs = (s, r) => $a.playLevelUp(s, r), Fs = { class: "level-progress-contain
|
|
|
703
703
|
setup(s, { emit: r }) {
|
|
704
704
|
const t = s, l = r, z = M(!1), V = M(t.value), C = M("forward");
|
|
705
705
|
let w = null, c = t.value, h = t.level;
|
|
706
|
-
const x = qt, S = t.size ?? qt, u = qt / 2, m = H(() => t.thickness ?? 24),
|
|
706
|
+
const x = qt, S = t.size ?? qt, u = qt / 2, m = H(() => t.thickness ?? 24), U = H(() => t.labelThickness ?? 46), D = H(() => t.gapAngle ?? 16), g = H(() => (qt - m.value) / 2 - Da), N = H(() => (qt - U.value) / 1.9 - Da), y = H(() => N.value + 10), L = H(() => g.value - m.value / 2 - ao), F = H(() => t.levelLabel?.length ?? 0), $ = H(() => F.value * lo + oo), k = H(() => -$.value / 2), O = H(() => $.value / 2), q = H(
|
|
707
707
|
() => be(u, u, N.value, k.value, O.value)
|
|
708
708
|
), b = H(
|
|
709
709
|
() => (
|
|
@@ -711,21 +711,21 @@ const Rs = (s, r) => $a.playLevelUp(s, r), Fs = { class: "level-progress-contain
|
|
|
711
711
|
be(u, u, y.value, -90, 90)
|
|
712
712
|
)
|
|
713
713
|
), T = H(() => {
|
|
714
|
-
const ie = Math.max(0, Math.min(1, V.value / t.max)), te = O.value +
|
|
714
|
+
const ie = Math.max(0, Math.min(1, V.value / t.max)), te = O.value + D.value, Y = 360 - $.value - 3 * D.value;
|
|
715
715
|
if (ie >= 1) {
|
|
716
|
-
const Te = k.value -
|
|
716
|
+
const Te = k.value - D.value + 360;
|
|
717
717
|
return be(u, u, g.value, te, Te);
|
|
718
718
|
}
|
|
719
719
|
const le = Y * ie, _e = te + le;
|
|
720
720
|
return be(u, u, g.value, te, _e);
|
|
721
721
|
}), ae = H(() => {
|
|
722
|
-
const ie = O.value +
|
|
722
|
+
const ie = O.value + D.value, te = 360 - $.value - 3 * D.value, Y = Math.max(0, Math.min(1, V.value / t.max)), le = te * Y, _e = ie + le, Te = Y === 0 ? ie : _e + D.value, Ee = k.value - D.value + 360;
|
|
723
723
|
return be(u, u, g.value, Te, Ee);
|
|
724
724
|
}), ce = H(() => "url(#staticGradient)"), Ce = H(() => "url(#progressGradient)"), xe = H(() => {
|
|
725
|
-
const ie = O.value +
|
|
725
|
+
const ie = O.value + D.value;
|
|
726
726
|
return Se(u, u, g.value, ie);
|
|
727
727
|
}), Ae = H(() => {
|
|
728
|
-
const ie = O.value +
|
|
728
|
+
const ie = O.value + D.value, te = 360 - $.value - 3 * D.value, Y = Math.max(0, Math.min(1, V.value / t.max)), le = te * Y, _e = ie + le;
|
|
729
729
|
return Se(u, u, g.value, _e);
|
|
730
730
|
});
|
|
731
731
|
function Se(ie, te, Y, le) {
|
|
@@ -776,9 +776,9 @@ const Rs = (s, r) => $a.playLevelUp(s, r), Fs = { class: "level-progress-contain
|
|
|
776
776
|
ie !== h && ie > h && Z(), h = ie;
|
|
777
777
|
}), (ie, te) => (a(), o("div", Fs, [
|
|
778
778
|
(a(), o("svg", {
|
|
779
|
-
width:
|
|
780
|
-
height:
|
|
781
|
-
viewBox: `0 0 ${
|
|
779
|
+
width: i(S),
|
|
780
|
+
height: i(S),
|
|
781
|
+
viewBox: `0 0 ${i(x)} ${i(x)}`,
|
|
782
782
|
style: { position: "relative" }
|
|
783
783
|
}, [
|
|
784
784
|
z.value ? (a(), o("g", Zs, [
|
|
@@ -810,7 +810,7 @@ const Rs = (s, r) => $a.playLevelUp(s, r), Fs = { class: "level-progress-contain
|
|
|
810
810
|
e("path", {
|
|
811
811
|
d: q.value,
|
|
812
812
|
stroke: ce.value,
|
|
813
|
-
"stroke-width":
|
|
813
|
+
"stroke-width": U.value,
|
|
814
814
|
fill: "none",
|
|
815
815
|
"stroke-linecap": "round"
|
|
816
816
|
}, null, 8, Ws),
|
|
@@ -1073,30 +1073,30 @@ const co = {
|
|
|
1073
1073
|
w.value && document.contains(w.value) && w.value.focus(), w.value = null;
|
|
1074
1074
|
});
|
|
1075
1075
|
};
|
|
1076
|
-
Le(h, async (
|
|
1077
|
-
|
|
1076
|
+
Le(h, async (D) => {
|
|
1077
|
+
D ? (c.isOpen.value || await c.openModal(m), await yt(), C.value && C.value.focus()) : c.isOpen.value && c.closeModal();
|
|
1078
1078
|
});
|
|
1079
|
-
const
|
|
1080
|
-
if (!h.value ||
|
|
1079
|
+
const U = (D) => {
|
|
1080
|
+
if (!h.value || D.key !== "Tab" || !C.value) return;
|
|
1081
1081
|
const g = C.value.querySelectorAll(
|
|
1082
1082
|
'button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'
|
|
1083
1083
|
), N = Array.from(g);
|
|
1084
1084
|
if (N.length === 0) return;
|
|
1085
1085
|
const y = N[0], L = N[N.length - 1];
|
|
1086
|
-
|
|
1086
|
+
D.shiftKey ? document.activeElement === y && (D.preventDefault(), L.focus()) : document.activeElement === L && (D.preventDefault(), y.focus());
|
|
1087
1087
|
};
|
|
1088
1088
|
return Ye(() => {
|
|
1089
|
-
document.addEventListener("keydown",
|
|
1089
|
+
document.addEventListener("keydown", U);
|
|
1090
1090
|
}), Mt(() => {
|
|
1091
|
-
document.removeEventListener("keydown",
|
|
1092
|
-
}), (
|
|
1093
|
-
|
|
1091
|
+
document.removeEventListener("keydown", U);
|
|
1092
|
+
}), (D, g) => (a(), o(De, null, [
|
|
1093
|
+
D.$slots.trigger ? (a(), o("span", {
|
|
1094
1094
|
key: 0,
|
|
1095
1095
|
ref_key: "triggerElement",
|
|
1096
1096
|
ref: V,
|
|
1097
1097
|
onClick: u
|
|
1098
1098
|
}, [
|
|
1099
|
-
Pe(
|
|
1099
|
+
Pe(D.$slots, "trigger", {
|
|
1100
1100
|
open: u,
|
|
1101
1101
|
close: m,
|
|
1102
1102
|
isOpen: h.value
|
|
@@ -1125,13 +1125,13 @@ const co = {
|
|
|
1125
1125
|
header: _(() => [
|
|
1126
1126
|
e("div", uo, [
|
|
1127
1127
|
e("div", vo, [
|
|
1128
|
-
Pe(
|
|
1128
|
+
Pe(D.$slots, "header", {
|
|
1129
1129
|
handleClose: m,
|
|
1130
1130
|
isOpen: h.value,
|
|
1131
1131
|
openModal: S
|
|
1132
1132
|
}, () => [
|
|
1133
|
-
|
|
1134
|
-
|
|
1133
|
+
D.$props.title ? (a(), o("h2", po, R(D.$props.title), 1)) : I("", !0),
|
|
1134
|
+
D.$props.subtitle ? (a(), o("p", fo, R(D.$props.subtitle), 1)) : I("", !0)
|
|
1135
1135
|
], !0)
|
|
1136
1136
|
]),
|
|
1137
1137
|
s.showCloseButton ? (a(), o("button", {
|
|
@@ -1156,15 +1156,15 @@ const co = {
|
|
|
1156
1156
|
]),
|
|
1157
1157
|
default: _(() => [
|
|
1158
1158
|
e("div", mo, [
|
|
1159
|
-
Pe(
|
|
1159
|
+
Pe(D.$slots, "default", {}, void 0, !0)
|
|
1160
1160
|
])
|
|
1161
1161
|
]),
|
|
1162
1162
|
_: 2
|
|
1163
1163
|
}, [
|
|
1164
|
-
|
|
1164
|
+
D.$slots.footer ? {
|
|
1165
1165
|
name: "footer",
|
|
1166
1166
|
fn: _(() => [
|
|
1167
|
-
Pe(
|
|
1167
|
+
Pe(D.$slots, "footer", {
|
|
1168
1168
|
handleClose: m,
|
|
1169
1169
|
isOpen: h.value,
|
|
1170
1170
|
openModal: S
|
|
@@ -1837,82 +1837,82 @@ const co = {
|
|
|
1837
1837
|
}
|
|
1838
1838
|
return "#EA00A8";
|
|
1839
1839
|
}
|
|
1840
|
-
const l = s, z = r, V = M(), C = M(), w = M(), c = M(0), h = M(1), x = M(1), S = M(1), u = M(l.modelValue || t()), m = M({ r: 234, g: 0, b: 168 }),
|
|
1840
|
+
const l = s, z = r, V = M(), C = M(), w = M(), c = M(0), h = M(1), x = M(1), S = M(1), u = M(l.modelValue || t()), m = M({ r: 234, g: 0, b: 168 }), U = M(100), D = M(l.defaultColorFormat || "hex"), g = M({ h: 0, s: 0, l: 0 }), N = M({ l: 0, c: 0, h: 0 }), y = M(!1), L = M(!1), F = M(!1), $ = M(!1), k = M(!1), O = H(() => y.value), q = M(null), b = M(l.compareColor);
|
|
1841
1841
|
let T = null, ae = null;
|
|
1842
1842
|
const ce = M(!1);
|
|
1843
1843
|
let Ce = "";
|
|
1844
|
-
Le(() => [l.showContrast, l.compareColor], ([v,
|
|
1845
|
-
v &&
|
|
1844
|
+
Le(() => [l.showContrast, l.compareColor], ([v, n], f) => {
|
|
1845
|
+
v && n && !$.value && ($.value = !0), typeof n == "string" && (b.value = n), f && n !== f[1] && (Ct.value = [], nt.value = [], it.value = "", zt.value = "", Vt.value = "", It.value = "");
|
|
1846
1846
|
}, { immediate: !0 }), Le($, (v) => {
|
|
1847
1847
|
v && l.showContrast && l.compareColor && Xt();
|
|
1848
1848
|
});
|
|
1849
1849
|
const xe = H(() => l.swatches ? l.swatches : go), Ae = H(() => {
|
|
1850
1850
|
const v = xe.value;
|
|
1851
1851
|
if (Array.isArray(v)) {
|
|
1852
|
-
const
|
|
1852
|
+
const n = {};
|
|
1853
1853
|
return v.forEach((f) => {
|
|
1854
|
-
|
|
1855
|
-
}),
|
|
1854
|
+
n[f] = { label: f };
|
|
1855
|
+
}), n;
|
|
1856
1856
|
}
|
|
1857
1857
|
return v;
|
|
1858
1858
|
}), Se = H(() => {
|
|
1859
1859
|
if (!l.additionalSwatches) return {};
|
|
1860
1860
|
const v = l.additionalSwatches;
|
|
1861
1861
|
if (Array.isArray(v)) {
|
|
1862
|
-
const
|
|
1862
|
+
const n = {};
|
|
1863
1863
|
return v.forEach((f) => {
|
|
1864
|
-
|
|
1865
|
-
}),
|
|
1864
|
+
n[f] = { label: f };
|
|
1865
|
+
}), n;
|
|
1866
1866
|
}
|
|
1867
1867
|
return v;
|
|
1868
1868
|
}), be = H(() => Object.keys(Ae.value)), ne = H(() => Object.keys(Se.value)), W = H(() => {
|
|
1869
|
-
const v = Ae.value,
|
|
1869
|
+
const v = Ae.value, n = Se.value, f = tt.value.toLowerCase();
|
|
1870
1870
|
for (const [ee, A] of Object.entries(v))
|
|
1871
1871
|
if (ee.toLowerCase() === f && A.shades || A.shades?.some((G) => G.toLowerCase() === f))
|
|
1872
1872
|
return ee;
|
|
1873
|
-
for (const [ee, A] of Object.entries(
|
|
1873
|
+
for (const [ee, A] of Object.entries(n))
|
|
1874
1874
|
if (ee.toLowerCase() === f && A.shades || A.shades?.some((G) => G.toLowerCase() === f))
|
|
1875
1875
|
return ee;
|
|
1876
1876
|
return null;
|
|
1877
1877
|
}), Z = M([]), ie = M(""), te = H(() => {
|
|
1878
1878
|
if (!W.value)
|
|
1879
1879
|
return Z.value;
|
|
1880
|
-
const v = Ae.value[W.value],
|
|
1880
|
+
const v = Ae.value[W.value], n = Se.value[W.value], f = v?.shades || n?.shades || [];
|
|
1881
1881
|
return f.length > 0 && (Z.value = f), f;
|
|
1882
1882
|
}), Y = H(() => W.value !== null), le = H(() => {
|
|
1883
1883
|
if (!W.value)
|
|
1884
1884
|
return ie.value;
|
|
1885
|
-
const v = Ae.value,
|
|
1885
|
+
const v = Ae.value, n = Se.value;
|
|
1886
1886
|
let f = "";
|
|
1887
1887
|
const ee = v[W.value];
|
|
1888
1888
|
if (ee?.label)
|
|
1889
1889
|
f = ee.label;
|
|
1890
1890
|
else {
|
|
1891
|
-
const A =
|
|
1891
|
+
const A = n[W.value];
|
|
1892
1892
|
A?.label ? f = A.label : f = W.value;
|
|
1893
1893
|
}
|
|
1894
1894
|
return f && (ie.value = f), f;
|
|
1895
1895
|
}), _e = (v) => v.toLowerCase() === tt.value.toLowerCase(), Te = (v) => {
|
|
1896
|
-
const
|
|
1896
|
+
const n = v.replace("#", ""), f = parseInt(n.substring(0, 2), 16), ee = parseInt(n.substring(2, 4), 16), A = parseInt(n.substring(4, 6), 16), G = Math.pow(f / 255, 2.4), j = Math.pow(ee / 255, 2.4), E = Math.pow(A / 255, 2.4);
|
|
1897
1897
|
return 0.2126729 * G + 0.7151522 * j + 0.072175 * E < 0.3 ? "#ffffff" : "#000000";
|
|
1898
1898
|
}, Ee = (v) => {
|
|
1899
|
-
const
|
|
1899
|
+
const n = {
|
|
1900
1900
|
"--_color": v
|
|
1901
1901
|
};
|
|
1902
1902
|
if (_e(v)) {
|
|
1903
1903
|
const f = Te(v);
|
|
1904
1904
|
return {
|
|
1905
|
-
...
|
|
1905
|
+
...n,
|
|
1906
1906
|
outlineColor: f,
|
|
1907
1907
|
outlineOffset: "-4px"
|
|
1908
1908
|
};
|
|
1909
1909
|
}
|
|
1910
|
-
return
|
|
1910
|
+
return n;
|
|
1911
1911
|
}, $e = (v) => {
|
|
1912
|
-
const
|
|
1912
|
+
const n = Ae.value, f = Se.value, ee = n[v] || f[v];
|
|
1913
1913
|
if (ee && ee.label)
|
|
1914
1914
|
return `${ee.label} (${v})`;
|
|
1915
|
-
for (const [A, G] of Object.entries(
|
|
1915
|
+
for (const [A, G] of Object.entries(n))
|
|
1916
1916
|
if (G.shades && G.shades.includes(v)) {
|
|
1917
1917
|
const j = G.shades.indexOf(v), p = ["50", "100", "200", "300", "400", "500", "600", "700", "800", "900", "950"][j] || `${j + 1}`;
|
|
1918
1918
|
return G.label ? `${G.label} ${p} (${v})` : `${A} ${p} (${v})`;
|
|
@@ -1923,9 +1923,9 @@ const co = {
|
|
|
1923
1923
|
return G.label ? `${G.label} ${p} (${v})` : `${A} ${p} (${v})`;
|
|
1924
1924
|
}
|
|
1925
1925
|
return v;
|
|
1926
|
-
}, re = (v,
|
|
1927
|
-
v = Math.round(v * 1e3) / 1e3,
|
|
1928
|
-
const ee = Math.floor(v / 60), A = v / 60 - ee, G = f * (1 -
|
|
1926
|
+
}, re = (v, n, f) => {
|
|
1927
|
+
v = Math.round(v * 1e3) / 1e3, n = Math.round(n * 1e3) / 1e3, f = Math.round(f * 1e3) / 1e3;
|
|
1928
|
+
const ee = Math.floor(v / 60), A = v / 60 - ee, G = f * (1 - n), j = f * (1 - n * A), E = f * (1 - n * (1 - A));
|
|
1929
1929
|
let p, B, se;
|
|
1930
1930
|
switch (ee % 6) {
|
|
1931
1931
|
case 0:
|
|
@@ -1954,21 +1954,21 @@ const co = {
|
|
|
1954
1954
|
g: Math.round(B * 255),
|
|
1955
1955
|
b: Math.round(se * 255)
|
|
1956
1956
|
};
|
|
1957
|
-
}, ve = (v,
|
|
1958
|
-
v /= 255,
|
|
1959
|
-
const ee = Math.max(v,
|
|
1957
|
+
}, ve = (v, n, f) => {
|
|
1958
|
+
v /= 255, n /= 255, f /= 255;
|
|
1959
|
+
const ee = Math.max(v, n, f), A = Math.min(v, n, f), G = ee - A;
|
|
1960
1960
|
let j = 0;
|
|
1961
1961
|
const E = ee === 0 ? 0 : G / ee, p = ee;
|
|
1962
1962
|
if (G !== 0)
|
|
1963
1963
|
switch (ee) {
|
|
1964
1964
|
case v:
|
|
1965
|
-
j = ((
|
|
1965
|
+
j = ((n - f) / G + (n < f ? 6 : 0)) * 60;
|
|
1966
1966
|
break;
|
|
1967
|
-
case
|
|
1967
|
+
case n:
|
|
1968
1968
|
j = ((f - v) / G + 2) * 60;
|
|
1969
1969
|
break;
|
|
1970
1970
|
case f:
|
|
1971
|
-
j = ((v -
|
|
1971
|
+
j = ((v - n) / G + 4) * 60;
|
|
1972
1972
|
break;
|
|
1973
1973
|
}
|
|
1974
1974
|
return {
|
|
@@ -1978,26 +1978,26 @@ const co = {
|
|
|
1978
1978
|
v: Math.round(p * 1e3) / 1e3
|
|
1979
1979
|
};
|
|
1980
1980
|
}, Ie = (v) => {
|
|
1981
|
-
const
|
|
1982
|
-
return
|
|
1983
|
-
r: parseInt(
|
|
1984
|
-
g: parseInt(
|
|
1985
|
-
b: parseInt(
|
|
1981
|
+
const n = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(v);
|
|
1982
|
+
return n ? {
|
|
1983
|
+
r: parseInt(n[1], 16),
|
|
1984
|
+
g: parseInt(n[2], 16),
|
|
1985
|
+
b: parseInt(n[3], 16)
|
|
1986
1986
|
} : null;
|
|
1987
|
-
}, K = (v,
|
|
1988
|
-
v /= 255,
|
|
1989
|
-
const ee = Math.max(v,
|
|
1987
|
+
}, K = (v, n, f) => `#${((1 << 24) + (v << 16) + (n << 8) + f).toString(16).slice(1)}`, he = (v, n, f) => {
|
|
1988
|
+
v /= 255, n /= 255, f /= 255;
|
|
1989
|
+
const ee = Math.max(v, n, f), A = Math.min(v, n, f), G = ee - A, j = ee + A;
|
|
1990
1990
|
let E = 0, p = 0, B = j / 2;
|
|
1991
1991
|
if (G !== 0)
|
|
1992
1992
|
switch (p = B > 0.5 ? G / (2 - j) : G / j, ee) {
|
|
1993
1993
|
case v:
|
|
1994
|
-
E = ((
|
|
1994
|
+
E = ((n - f) / G + (n < f ? 6 : 0)) / 6;
|
|
1995
1995
|
break;
|
|
1996
|
-
case
|
|
1996
|
+
case n:
|
|
1997
1997
|
E = ((f - v) / G + 2) / 6;
|
|
1998
1998
|
break;
|
|
1999
1999
|
case f:
|
|
2000
|
-
E = ((v -
|
|
2000
|
+
E = ((v - n) / G + 4) / 6;
|
|
2001
2001
|
break;
|
|
2002
2002
|
}
|
|
2003
2003
|
return {
|
|
@@ -2005,28 +2005,28 @@ const co = {
|
|
|
2005
2005
|
s: Math.round(p * 100),
|
|
2006
2006
|
l: Math.round(B * 100)
|
|
2007
2007
|
};
|
|
2008
|
-
}, Q = (v,
|
|
2009
|
-
v /= 360,
|
|
2008
|
+
}, Q = (v, n, f) => {
|
|
2009
|
+
v /= 360, n /= 100, f /= 100;
|
|
2010
2010
|
const ee = (j, E, p) => (p < 0 && (p += 1), p > 1 && (p -= 1), p < 1 / 6 ? j + (E - j) * 6 * p : p < 1 / 2 ? E : p < 2 / 3 ? j + (E - j) * (2 / 3 - p) * 6 : j);
|
|
2011
|
-
if (
|
|
2011
|
+
if (n === 0)
|
|
2012
2012
|
return { r: Math.round(f * 255), g: Math.round(f * 255), b: Math.round(f * 255) };
|
|
2013
|
-
const A = f < 0.5 ? f * (1 +
|
|
2013
|
+
const A = f < 0.5 ? f * (1 + n) : f + n - f * n, G = 2 * f - A;
|
|
2014
2014
|
return {
|
|
2015
2015
|
r: Math.round(ee(G, A, v + 1 / 3) * 255),
|
|
2016
2016
|
g: Math.round(ee(G, A, v) * 255),
|
|
2017
2017
|
b: Math.round(ee(G, A, v - 1 / 3) * 255)
|
|
2018
2018
|
};
|
|
2019
|
-
}, fe = (v,
|
|
2020
|
-
const ee = (St) => (St /= 255, St <= 0.04045 ? St / 12.92 : Math.pow((St + 0.055) / 1.055, 2.4)), A = ee(v), G = ee(
|
|
2019
|
+
}, fe = (v, n, f) => {
|
|
2020
|
+
const ee = (St) => (St /= 255, St <= 0.04045 ? St / 12.92 : Math.pow((St + 0.055) / 1.055, 2.4)), A = ee(v), G = ee(n), j = ee(f), E = 0.4122214708 * A + 0.5363325363 * G + 0.0514459929 * j, p = 0.2119034982 * A + 0.6806995451 * G + 0.1073969566 * j, B = 0.0883024619 * A + 0.2817188376 * G + 0.6299787005 * j, se = Math.sign(E) * Math.pow(Math.abs(E), 1 / 3), de = Math.sign(p) * Math.pow(Math.abs(p), 1 / 3), ke = Math.sign(B) * Math.pow(Math.abs(B), 1 / 3), ge = 0.2104542553 * se + 0.793617785 * de - 0.0040720468 * ke, me = 1.9779984951 * se - 2.428592205 * de + 0.4505937099 * ke, ze = 0.0259040371 * se + 0.7827717662 * de - 0.808675766 * ke, Re = ge, Ke = Math.sqrt(me * me + ze * ze);
|
|
2021
2021
|
let at = Math.atan2(ze, me) * 180 / Math.PI;
|
|
2022
2022
|
return at < 0 && (at += 360), {
|
|
2023
2023
|
l: Math.round(Re * 100),
|
|
2024
2024
|
c: Math.round(Ke * 100),
|
|
2025
2025
|
h: Math.round(at)
|
|
2026
2026
|
};
|
|
2027
|
-
}, pe = (v,
|
|
2028
|
-
v /= 100,
|
|
2029
|
-
const ee =
|
|
2027
|
+
}, pe = (v, n, f) => {
|
|
2028
|
+
v /= 100, n /= 100, f = f * Math.PI / 180;
|
|
2029
|
+
const ee = n * Math.cos(f), A = n * Math.sin(f), G = v + 0.3963377774 * ee + 0.2158037573 * A, j = v - 0.1055613458 * ee - 0.0638541728 * A, E = v - 0.0894841775 * ee - 1.291485548 * A, p = G * G * G, B = j * j * j, se = E * E * E, de = 4.0767416621 * p - 3.3077115913 * B + 0.2309699292 * se, ke = -1.2684380046 * p + 2.6097574011 * B - 0.3413193965 * se, ge = -0.0041960863 * p - 0.7034186147 * B + 1.707614701 * se, me = (ze) => ze <= 31308e-7 ? ze * 12.92 : 1.055 * Math.pow(ze, 1 / 2.4) - 0.055;
|
|
2030
2030
|
return {
|
|
2031
2031
|
r: Math.max(0, Math.min(255, Math.round(me(de) * 255))),
|
|
2032
2032
|
g: Math.max(0, Math.min(255, Math.round(me(ke) * 255))),
|
|
@@ -2034,24 +2034,24 @@ const co = {
|
|
|
2034
2034
|
};
|
|
2035
2035
|
}, He = (v) => {
|
|
2036
2036
|
if (!v) return v;
|
|
2037
|
-
const
|
|
2038
|
-
if (!
|
|
2037
|
+
const n = Ie(v);
|
|
2038
|
+
if (!n) return v;
|
|
2039
2039
|
const f = {
|
|
2040
|
-
r: Math.round(
|
|
2041
|
-
g: Math.round(
|
|
2042
|
-
b: Math.round(
|
|
2040
|
+
r: Math.round(n.r),
|
|
2041
|
+
g: Math.round(n.g),
|
|
2042
|
+
b: Math.round(n.b)
|
|
2043
2043
|
};
|
|
2044
2044
|
return K(f.r, f.g, f.b);
|
|
2045
|
-
}, Ne = (v,
|
|
2046
|
-
const [ee, A, G] = [v,
|
|
2045
|
+
}, Ne = (v, n, f) => {
|
|
2046
|
+
const [ee, A, G] = [v, n, f].map((j) => (j = j / 255, j <= 0.03928 ? j / 12.92 : Math.pow((j + 0.055) / 1.055, 2.4)));
|
|
2047
2047
|
return 0.2126 * ee + 0.7152 * A + 0.0722 * G;
|
|
2048
|
-
}, Oe = (v,
|
|
2049
|
-
const f = Ie(v), ee = Ie(
|
|
2048
|
+
}, Oe = (v, n) => {
|
|
2049
|
+
const f = Ie(v), ee = Ie(n);
|
|
2050
2050
|
if (!f || !ee) return 1;
|
|
2051
2051
|
const A = Ne(f.r, f.g, f.b), G = Ne(ee.r, ee.g, ee.b), j = Math.max(A, G), E = Math.min(A, G);
|
|
2052
2052
|
return (j + 0.05) / (E + 0.05);
|
|
2053
|
-
}, gt = (v,
|
|
2054
|
-
if (
|
|
2053
|
+
}, gt = (v, n = "normal") => {
|
|
2054
|
+
if (n === "large") {
|
|
2055
2055
|
if (v >= 4.5) return "AAA";
|
|
2056
2056
|
if (v >= 3) return "AA";
|
|
2057
2057
|
} else {
|
|
@@ -2060,18 +2060,18 @@ const co = {
|
|
|
2060
2060
|
}
|
|
2061
2061
|
return "FAIL";
|
|
2062
2062
|
}, Be = H(() => re(c.value, h.value, x.value)), Ht = H(() => `rgb(${Be.value.r}, ${Be.value.g}, ${Be.value.b})`), tt = H(() => {
|
|
2063
|
-
const { r: v, g:
|
|
2064
|
-
return l.showAlpha && S.value < 0.99 ? `rgba(${v}, ${
|
|
2063
|
+
const { r: v, g: n, b: f } = Be.value;
|
|
2064
|
+
return l.showAlpha && S.value < 0.99 ? `rgba(${v}, ${n}, ${f}, ${S.value})` : K(v, n, f);
|
|
2065
2065
|
}), Xt = () => {
|
|
2066
2066
|
if (!l.showContrast || !l.compareColor) {
|
|
2067
2067
|
q.value = null;
|
|
2068
2068
|
return;
|
|
2069
2069
|
}
|
|
2070
|
-
const v = K(Be.value.r, Be.value.g, Be.value.b),
|
|
2070
|
+
const v = K(Be.value.r, Be.value.g, Be.value.b), n = Oe(v, l.compareColor);
|
|
2071
2071
|
q.value = {
|
|
2072
|
-
ratio:
|
|
2073
|
-
normalText: gt(
|
|
2074
|
-
largeText: gt(
|
|
2072
|
+
ratio: n,
|
|
2073
|
+
normalText: gt(n, "normal"),
|
|
2074
|
+
largeText: gt(n, "large"),
|
|
2075
2075
|
currentColor: v,
|
|
2076
2076
|
compareColor: l.compareColor
|
|
2077
2077
|
};
|
|
@@ -2081,13 +2081,13 @@ const co = {
|
|
|
2081
2081
|
if (!$.value || !b.value) return "";
|
|
2082
2082
|
if (it.value)
|
|
2083
2083
|
return it.value;
|
|
2084
|
-
const v = ut,
|
|
2085
|
-
const se = Math.max(0, Math.min(v, p)), de = Math.max(0, Math.min(
|
|
2084
|
+
const v = ut, n = dt, f = 4.5, ee = (p, B) => {
|
|
2085
|
+
const se = Math.max(0, Math.min(v, p)), de = Math.max(0, Math.min(n, B)), ke = Math.max(0, Math.min(1, se / v)), ge = Math.max(0, Math.min(1, 1 - de / n)), me = re(c.value, ke, ge), ze = K(me.r, me.g, me.b);
|
|
2086
2086
|
return Oe(ze, b.value);
|
|
2087
2087
|
}, A = [], G = [];
|
|
2088
2088
|
for (let p = -20; p <= v + 20; p += 2) {
|
|
2089
2089
|
let B = !1, se = -1;
|
|
2090
|
-
for (let de = 0; de <
|
|
2090
|
+
for (let de = 0; de < n - 1; de++) {
|
|
2091
2091
|
const ke = ee(p, de), ge = ee(p, de + 1);
|
|
2092
2092
|
if (ke >= f && ge < f) {
|
|
2093
2093
|
let me = de, ze = de + 1;
|
|
@@ -2108,7 +2108,7 @@ const co = {
|
|
|
2108
2108
|
if (G.length === 0) return "";
|
|
2109
2109
|
if (A.push(...G), A.length > 0) {
|
|
2110
2110
|
const p = A[0], B = A[A.length - 1];
|
|
2111
|
-
p.x < 0 && (p.x = 0), B.x < v && B.y > 5 && B.y <
|
|
2111
|
+
p.x < 0 && (p.x = 0), B.x < v && B.y > 5 && B.y < n - 5 ? A.push({ x: v, y: B.y }) : B.x > v && (B.x = v);
|
|
2112
2112
|
}
|
|
2113
2113
|
if (A.length < 2) return "";
|
|
2114
2114
|
if (A.length === 2)
|
|
@@ -2135,13 +2135,13 @@ const co = {
|
|
|
2135
2135
|
if (!$.value || !b.value) return "";
|
|
2136
2136
|
if (zt.value)
|
|
2137
2137
|
return zt.value;
|
|
2138
|
-
const v = ut,
|
|
2139
|
-
const B = Math.max(0, Math.min(v, E)), se = Math.max(0, Math.min(
|
|
2138
|
+
const v = ut, n = dt, f = 4.5, ee = (E, p) => {
|
|
2139
|
+
const B = Math.max(0, Math.min(v, E)), se = Math.max(0, Math.min(n, p)), de = Math.max(0, Math.min(1, B / v)), ke = Math.max(0, Math.min(1, 1 - se / n)), ge = re(c.value, de, ke), me = K(ge.r, ge.g, ge.b);
|
|
2140
2140
|
return Oe(me, b.value);
|
|
2141
2141
|
}, A = [], G = [];
|
|
2142
2142
|
for (let E = -20; E <= v + 20; E += 2) {
|
|
2143
2143
|
let p = !1, B = -1;
|
|
2144
|
-
for (let se =
|
|
2144
|
+
for (let se = n - 1; se >= 1; se--) {
|
|
2145
2145
|
const de = ee(E, se), ke = ee(E, se - 1);
|
|
2146
2146
|
if (de >= f && ke < f) {
|
|
2147
2147
|
let ge = se - 1, me = se;
|
|
@@ -2171,7 +2171,7 @@ const co = {
|
|
|
2171
2171
|
A.push(...G);
|
|
2172
2172
|
if (A.length > 0) {
|
|
2173
2173
|
const E = A[0], p = A[A.length - 1];
|
|
2174
|
-
E.x < 0 && (E.x = 0), p.x < v && p.y > 5 && p.y <
|
|
2174
|
+
E.x < 0 && (E.x = 0), p.x < v && p.y > 5 && p.y < n - 5 ? A.push({ x: v, y: p.y }) : p.x > v && (p.x = v);
|
|
2175
2175
|
}
|
|
2176
2176
|
if (A.length < 2) return "";
|
|
2177
2177
|
if (A.length === 2)
|
|
@@ -2204,13 +2204,13 @@ const co = {
|
|
|
2204
2204
|
if (!$.value || !b.value) return "";
|
|
2205
2205
|
if (Vt.value)
|
|
2206
2206
|
return Vt.value;
|
|
2207
|
-
const v = ut,
|
|
2208
|
-
const se = Math.max(0, Math.min(v, p)), de = Math.max(0, Math.min(
|
|
2207
|
+
const v = ut, n = dt, f = 3, ee = (p, B) => {
|
|
2208
|
+
const se = Math.max(0, Math.min(v, p)), de = Math.max(0, Math.min(n, B)), ke = Math.max(0, Math.min(1, se / v)), ge = Math.max(0, Math.min(1, 1 - de / n)), me = re(c.value, ke, ge), ze = K(me.r, me.g, me.b);
|
|
2209
2209
|
return Oe(ze, b.value);
|
|
2210
2210
|
}, A = [], G = [];
|
|
2211
2211
|
for (let p = -20; p <= v + 20; p += 2) {
|
|
2212
2212
|
let B = !1, se = -1;
|
|
2213
|
-
for (let de = 0; de <
|
|
2213
|
+
for (let de = 0; de < n - 1; de++) {
|
|
2214
2214
|
const ke = ee(p, de), ge = ee(p, de + 1);
|
|
2215
2215
|
if (ke >= f && ge < f) {
|
|
2216
2216
|
let me = de, ze = de + 1;
|
|
@@ -2231,7 +2231,7 @@ const co = {
|
|
|
2231
2231
|
if (G.length === 0) return "";
|
|
2232
2232
|
if (A.push(...G), A.length > 0) {
|
|
2233
2233
|
const p = A[0], B = A[A.length - 1];
|
|
2234
|
-
p.x < 0 && (p.x = 0), B.x < v && B.y > 5 && B.y <
|
|
2234
|
+
p.x < 0 && (p.x = 0), B.x < v && B.y > 5 && B.y < n - 5 ? A.push({ x: v, y: B.y }) : B.x > v && (B.x = v);
|
|
2235
2235
|
}
|
|
2236
2236
|
if (A.length < 2) return "";
|
|
2237
2237
|
if (A.length === 2)
|
|
@@ -2258,13 +2258,13 @@ const co = {
|
|
|
2258
2258
|
if (!$.value || !b.value) return "";
|
|
2259
2259
|
if (It.value)
|
|
2260
2260
|
return It.value;
|
|
2261
|
-
const v = ut,
|
|
2262
|
-
const B = Math.max(0, Math.min(v, E)), se = Math.max(0, Math.min(
|
|
2261
|
+
const v = ut, n = dt, f = 3, ee = (E, p) => {
|
|
2262
|
+
const B = Math.max(0, Math.min(v, E)), se = Math.max(0, Math.min(n, p)), de = Math.max(0, Math.min(1, B / v)), ke = Math.max(0, Math.min(1, 1 - se / n)), ge = re(c.value, de, ke), me = K(ge.r, ge.g, ge.b);
|
|
2263
2263
|
return Oe(me, b.value);
|
|
2264
2264
|
}, A = [], G = [];
|
|
2265
2265
|
for (let E = -20; E <= v + 20; E += 2) {
|
|
2266
2266
|
let p = !1, B = -1;
|
|
2267
|
-
for (let se =
|
|
2267
|
+
for (let se = n - 1; se >= 1; se--) {
|
|
2268
2268
|
const de = ee(E, se), ke = ee(E, se - 1);
|
|
2269
2269
|
if (de >= f && ke < f) {
|
|
2270
2270
|
let ge = se - 1, me = se;
|
|
@@ -2294,7 +2294,7 @@ const co = {
|
|
|
2294
2294
|
A.push(...G);
|
|
2295
2295
|
if (A.length > 0) {
|
|
2296
2296
|
const E = A[0], p = A[A.length - 1];
|
|
2297
|
-
E.x < 0 && (E.x = 0), p.x < v && p.y > 5 && p.y <
|
|
2297
|
+
E.x < 0 && (E.x = 0), p.x < v && p.y > 5 && p.y < n - 5 ? A.push({ x: v, y: p.y }) : p.x > v && (p.x = v);
|
|
2298
2298
|
}
|
|
2299
2299
|
if (A.length < 2) return "";
|
|
2300
2300
|
if (A.length === 2)
|
|
@@ -2326,19 +2326,19 @@ const co = {
|
|
|
2326
2326
|
});
|
|
2327
2327
|
H(() => {
|
|
2328
2328
|
if (!$.value || !Je.value) return [];
|
|
2329
|
-
const v = ut,
|
|
2330
|
-
const j = Math.max(0, Math.min(v, A)), E = Math.max(0, Math.min(
|
|
2329
|
+
const v = ut, n = dt, f = (A, G) => {
|
|
2330
|
+
const j = Math.max(0, Math.min(v, A)), E = Math.max(0, Math.min(n, G)), p = Math.max(0, Math.min(1, j / v)), B = Math.max(0, Math.min(1, 1 - E / n)), se = re(c.value, p, B), de = K(se.r, se.g, se.b);
|
|
2331
2331
|
return Oe(de, b.value);
|
|
2332
2332
|
}, ee = [];
|
|
2333
2333
|
for (let A = 0; A <= v; A += 3)
|
|
2334
|
-
for (let G = 0; G <
|
|
2334
|
+
for (let G = 0; G < n; G++) {
|
|
2335
2335
|
const j = f(A, G), E = f(A, G + 1);
|
|
2336
2336
|
if (j < 3.1 && E >= 3.1 || j >= 3.1 && E < 3.1) {
|
|
2337
2337
|
ee.push({ x: A, y: G });
|
|
2338
2338
|
break;
|
|
2339
2339
|
}
|
|
2340
2340
|
}
|
|
2341
|
-
for (let A =
|
|
2341
|
+
for (let A = n - 3; A >= 0; A -= 3)
|
|
2342
2342
|
for (let G = 0; G < v; G++) {
|
|
2343
2343
|
const j = f(G, A), E = f(G + 1, A);
|
|
2344
2344
|
if (j < 3.1 && E >= 3.1 || j >= 3.1 && E < 3.1) {
|
|
@@ -2355,11 +2355,11 @@ const co = {
|
|
|
2355
2355
|
if (!$.value || !b.value) return [];
|
|
2356
2356
|
if (O.value && Ct.value.length > 0 || !aa.value && Ct.value.length > 0)
|
|
2357
2357
|
return Ct.value;
|
|
2358
|
-
const v = [],
|
|
2359
|
-
const B = Math.max(0, Math.min(
|
|
2358
|
+
const v = [], n = ut, f = dt, ee = 6, A = (E, p) => {
|
|
2359
|
+
const B = Math.max(0, Math.min(n, E)), se = Math.max(0, Math.min(f, p)), de = Math.max(0, Math.min(1, B / n)), ke = Math.max(0, Math.min(1, 1 - se / f)), ge = re(c.value, de, ke), me = K(ge.r, ge.g, ge.b);
|
|
2360
2360
|
return Oe(me, b.value);
|
|
2361
2361
|
}, G = [];
|
|
2362
|
-
for (let E = 0; E <=
|
|
2362
|
+
for (let E = 0; E <= n; E += 6)
|
|
2363
2363
|
for (let p = 0; p < f - 1; p += 1) {
|
|
2364
2364
|
const B = A(E, p), se = A(E, p + 1);
|
|
2365
2365
|
if (B >= 4.5 && se < 4.5 || B < 4.5 && se >= 4.5) {
|
|
@@ -2387,7 +2387,7 @@ const co = {
|
|
|
2387
2387
|
}
|
|
2388
2388
|
return B;
|
|
2389
2389
|
};
|
|
2390
|
-
for (let E = ee / 2; E <
|
|
2390
|
+
for (let E = ee / 2; E < n; E += ee)
|
|
2391
2391
|
for (let p = ee / 2; p < f; p += ee)
|
|
2392
2392
|
if (A(E, p) < 4.5) {
|
|
2393
2393
|
const se = j(E, p), de = 4;
|
|
@@ -2407,11 +2407,11 @@ const co = {
|
|
|
2407
2407
|
if (!$.value || !b.value) return [];
|
|
2408
2408
|
if (O.value && nt.value.length > 0 || !aa.value && nt.value.length > 0)
|
|
2409
2409
|
return nt.value;
|
|
2410
|
-
const v = [],
|
|
2411
|
-
const se = Math.max(0, Math.min(
|
|
2410
|
+
const v = [], n = ut, f = dt, ee = 3, A = 6, G = (p, B) => {
|
|
2411
|
+
const se = Math.max(0, Math.min(n, p)), de = Math.max(0, Math.min(f, B)), ke = Math.max(0, Math.min(1, se / n)), ge = Math.max(0, Math.min(1, 1 - de / f)), me = re(c.value, ke, ge), ze = K(me.r, me.g, me.b);
|
|
2412
2412
|
return Oe(ze, b.value);
|
|
2413
2413
|
}, j = [];
|
|
2414
|
-
for (let p = 0; p <=
|
|
2414
|
+
for (let p = 0; p <= n; p += 6)
|
|
2415
2415
|
for (let B = 0; B < f - 1; B += 1) {
|
|
2416
2416
|
const se = G(p, B), de = G(p, B + 1);
|
|
2417
2417
|
if (se >= ee && de < ee || se < ee && de >= ee) {
|
|
@@ -2434,7 +2434,7 @@ const co = {
|
|
|
2434
2434
|
}
|
|
2435
2435
|
return se;
|
|
2436
2436
|
};
|
|
2437
|
-
for (let p = A / 2; p <
|
|
2437
|
+
for (let p = A / 2; p < n; p += A)
|
|
2438
2438
|
for (let B = A / 2; B < f; B += A)
|
|
2439
2439
|
if (G(p, B) < ee) {
|
|
2440
2440
|
const de = E(p, B), ke = 4;
|
|
@@ -2454,17 +2454,17 @@ const co = {
|
|
|
2454
2454
|
});
|
|
2455
2455
|
const sa = H(() => {
|
|
2456
2456
|
if (!$.value || !b.value) return "";
|
|
2457
|
-
const v = ut,
|
|
2458
|
-
const p = Math.max(0, Math.min(v, j)), B = Math.max(0, Math.min(
|
|
2457
|
+
const v = ut, n = dt, f = (j, E) => {
|
|
2458
|
+
const p = Math.max(0, Math.min(v, j)), B = Math.max(0, Math.min(n, E)), se = Math.max(0, Math.min(1, p / v)), de = Math.max(0, Math.min(1, 1 - B / n)), ke = re(c.value, se, de), ge = K(ke.r, ke.g, ke.b);
|
|
2459
2459
|
return Oe(ge, b.value);
|
|
2460
2460
|
}, ee = [], A = [];
|
|
2461
2461
|
for (let j = -20; j <= v + 20; j += 2) {
|
|
2462
|
-
for (let E = 0; E <
|
|
2462
|
+
for (let E = 0; E < n; E++)
|
|
2463
2463
|
if (f(j, E) < 4.5) {
|
|
2464
2464
|
ee.push({ x: j, y: E });
|
|
2465
2465
|
break;
|
|
2466
2466
|
}
|
|
2467
|
-
for (let E =
|
|
2467
|
+
for (let E = n - 1; E >= 0; E--)
|
|
2468
2468
|
if (f(j, E) < 4.5) {
|
|
2469
2469
|
A.push({ x: j, y: E });
|
|
2470
2470
|
break;
|
|
@@ -2484,17 +2484,17 @@ const co = {
|
|
|
2484
2484
|
return G += " Z", G;
|
|
2485
2485
|
}), oa = H(() => {
|
|
2486
2486
|
if (!$.value || !b.value) return "";
|
|
2487
|
-
const v = ut,
|
|
2488
|
-
const B = Math.max(0, Math.min(v, E)), se = Math.max(0, Math.min(
|
|
2487
|
+
const v = ut, n = dt, f = 3, ee = (E, p) => {
|
|
2488
|
+
const B = Math.max(0, Math.min(v, E)), se = Math.max(0, Math.min(n, p)), de = Math.max(0, Math.min(1, B / v)), ke = Math.max(0, Math.min(1, 1 - se / n)), ge = re(c.value, de, ke), me = K(ge.r, ge.g, ge.b);
|
|
2489
2489
|
return Oe(me, b.value);
|
|
2490
2490
|
}, A = [], G = [];
|
|
2491
2491
|
for (let E = -20; E <= v + 20; E += 2) {
|
|
2492
|
-
for (let p = 0; p <
|
|
2492
|
+
for (let p = 0; p < n; p++)
|
|
2493
2493
|
if (ee(E, p) < f) {
|
|
2494
2494
|
A.push({ x: E, y: p });
|
|
2495
2495
|
break;
|
|
2496
2496
|
}
|
|
2497
|
-
for (let p =
|
|
2497
|
+
for (let p = n - 1; p >= 0; p--)
|
|
2498
2498
|
if (ee(E, p) < f) {
|
|
2499
2499
|
G.push({ x: E, y: p });
|
|
2500
2500
|
break;
|
|
@@ -2520,8 +2520,8 @@ const co = {
|
|
|
2520
2520
|
y.value = !1, document.removeEventListener("mousemove", xt), document.removeEventListener("mouseup", $t), document.removeEventListener("touchmove", xt), document.removeEventListener("touchend", $t);
|
|
2521
2521
|
}, na = (v) => {
|
|
2522
2522
|
if (!V.value) return;
|
|
2523
|
-
const
|
|
2524
|
-
h.value = A /
|
|
2523
|
+
const n = V.value.getBoundingClientRect(), f = "touches" in v ? v.touches[0].clientX : v.clientX, ee = "touches" in v ? v.touches[0].clientY : v.clientY, A = Math.max(0, Math.min(n.width, f - n.left)), G = Math.max(0, Math.min(n.height, ee - n.top));
|
|
2524
|
+
h.value = A / n.width, x.value = 1 - G / n.height;
|
|
2525
2525
|
}, ia = (v) => {
|
|
2526
2526
|
l.disabled || (L.value = !0, ra(v), document.addEventListener("mousemove", Dt), document.addEventListener("mouseup", Nt), document.addEventListener("touchmove", Dt), document.addEventListener("touchend", Nt));
|
|
2527
2527
|
}, Dt = (v) => {
|
|
@@ -2530,8 +2530,8 @@ const co = {
|
|
|
2530
2530
|
L.value = !1, document.removeEventListener("mousemove", Dt), document.removeEventListener("mouseup", Nt), document.removeEventListener("touchmove", Dt), document.removeEventListener("touchend", Nt);
|
|
2531
2531
|
}, ra = (v) => {
|
|
2532
2532
|
if (!C.value) return;
|
|
2533
|
-
const
|
|
2534
|
-
c.value = ee /
|
|
2533
|
+
const n = C.value.getBoundingClientRect(), f = "touches" in v ? v.touches[0].clientY : v.clientY, ee = Math.max(0, Math.min(n.height, f - n.top));
|
|
2534
|
+
c.value = ee / n.height * 360;
|
|
2535
2535
|
}, ca = (v) => {
|
|
2536
2536
|
l.disabled || !l.showAlpha || (F.value = !0, we(v), document.addEventListener("mousemove", X), document.addEventListener("mouseup", P), document.addEventListener("touchmove", X), document.addEventListener("touchend", P));
|
|
2537
2537
|
}, X = (v) => {
|
|
@@ -2540,61 +2540,61 @@ const co = {
|
|
|
2540
2540
|
F.value = !1, document.removeEventListener("mousemove", X), document.removeEventListener("mouseup", P), document.removeEventListener("touchmove", X), document.removeEventListener("touchend", P);
|
|
2541
2541
|
}, we = (v) => {
|
|
2542
2542
|
if (!w.value) return;
|
|
2543
|
-
const
|
|
2544
|
-
S.value = ee /
|
|
2543
|
+
const n = w.value.getBoundingClientRect(), f = "touches" in v ? v.touches[0].clientX : v.clientX, ee = Math.max(0, Math.min(n.width, f - n.left));
|
|
2544
|
+
S.value = ee / n.width, U.value = Math.round(S.value * 100);
|
|
2545
2545
|
}, wt = () => {
|
|
2546
2546
|
const v = u.value;
|
|
2547
2547
|
if (v.length === 7 && v.startsWith("#")) {
|
|
2548
|
-
const
|
|
2549
|
-
if (
|
|
2550
|
-
const f = ve(
|
|
2548
|
+
const n = Ie(v);
|
|
2549
|
+
if (n) {
|
|
2550
|
+
const f = ve(n.r, n.g, n.b);
|
|
2551
2551
|
c.value = f.h, h.value = f.s, x.value = f.v, Ot();
|
|
2552
2552
|
}
|
|
2553
2553
|
}
|
|
2554
2554
|
}, Bt = () => {
|
|
2555
|
-
const { r: v, g:
|
|
2556
|
-
u.value = K(v,
|
|
2555
|
+
const { r: v, g: n, b: f } = Be.value;
|
|
2556
|
+
u.value = K(v, n, f);
|
|
2557
2557
|
}, et = () => {
|
|
2558
|
-
const { r: v, g:
|
|
2559
|
-
if (v >= 0 && v <= 255 &&
|
|
2560
|
-
const ee = ve(v,
|
|
2558
|
+
const { r: v, g: n, b: f } = m.value;
|
|
2559
|
+
if (v >= 0 && v <= 255 && n >= 0 && n <= 255 && f >= 0 && f <= 255) {
|
|
2560
|
+
const ee = ve(v, n, f);
|
|
2561
2561
|
c.value = ee.h, h.value = ee.s, x.value = ee.v, jt(), Ca(), ya();
|
|
2562
2562
|
}
|
|
2563
2563
|
}, ct = () => {
|
|
2564
|
-
const { h: v, s:
|
|
2565
|
-
if (v >= 0 && v <= 360 &&
|
|
2566
|
-
const ee = Q(v,
|
|
2564
|
+
const { h: v, s: n, l: f } = g.value;
|
|
2565
|
+
if (v >= 0 && v <= 360 && n >= 0 && n <= 100 && f >= 0 && f <= 100) {
|
|
2566
|
+
const ee = Q(v, n, f), A = ve(ee.r, ee.g, ee.b);
|
|
2567
2567
|
c.value = A.h, h.value = A.s, x.value = A.v, jt(), Ot(), ya();
|
|
2568
2568
|
}
|
|
2569
2569
|
}, bt = () => {
|
|
2570
|
-
const { l: v, c:
|
|
2571
|
-
if (v >= 0 && v <= 100 &&
|
|
2572
|
-
const ee = pe(v,
|
|
2570
|
+
const { l: v, c: n, h: f } = N.value;
|
|
2571
|
+
if (v >= 0 && v <= 100 && n >= 0 && n <= 100 && f >= 0 && f <= 360) {
|
|
2572
|
+
const ee = pe(v, n, f), A = ve(ee.r, ee.g, ee.b);
|
|
2573
2573
|
c.value = A.h, h.value = A.s, x.value = A.v, jt(), Ot(), Ca();
|
|
2574
2574
|
}
|
|
2575
2575
|
}, Pt = () => {
|
|
2576
|
-
const v = Math.max(0, Math.min(100,
|
|
2577
|
-
S.value = v / 100,
|
|
2576
|
+
const v = Math.max(0, Math.min(100, U.value));
|
|
2577
|
+
S.value = v / 100, U.value = v;
|
|
2578
2578
|
}, ua = () => {
|
|
2579
|
-
const v = ["hex", "rgb", "hsl", "oklch"], f = (v.indexOf(
|
|
2580
|
-
|
|
2579
|
+
const v = ["hex", "rgb", "hsl", "oklch"], f = (v.indexOf(D.value) + 1) % v.length;
|
|
2580
|
+
D.value = v[f];
|
|
2581
2581
|
}, jt = () => {
|
|
2582
|
-
const { r: v, g:
|
|
2583
|
-
u.value = K(v,
|
|
2582
|
+
const { r: v, g: n, b: f } = Be.value;
|
|
2583
|
+
u.value = K(v, n, f);
|
|
2584
2584
|
}, Ot = () => {
|
|
2585
|
-
const { r: v, g:
|
|
2586
|
-
m.value = { r: v, g:
|
|
2585
|
+
const { r: v, g: n, b: f } = Be.value;
|
|
2586
|
+
m.value = { r: v, g: n, b: f };
|
|
2587
2587
|
}, Ca = () => {
|
|
2588
|
-
const { r: v, g:
|
|
2588
|
+
const { r: v, g: n, b: f } = Be.value, ee = he(v, n, f);
|
|
2589
2589
|
g.value = ee;
|
|
2590
2590
|
}, ya = () => {
|
|
2591
|
-
const { r: v, g:
|
|
2591
|
+
const { r: v, g: n, b: f } = Be.value, ee = fe(v, n, f);
|
|
2592
2592
|
N.value = ee;
|
|
2593
2593
|
}, ka = (v) => {
|
|
2594
2594
|
if (l.disabled) return;
|
|
2595
|
-
const
|
|
2596
|
-
if (
|
|
2597
|
-
const f = ve(
|
|
2595
|
+
const n = Ie(v);
|
|
2596
|
+
if (n) {
|
|
2597
|
+
const f = ve(n.r, n.g, n.b);
|
|
2598
2598
|
c.value = f.h, h.value = f.s, x.value = f.v, jt(), Ot();
|
|
2599
2599
|
}
|
|
2600
2600
|
}, Wa = () => {
|
|
@@ -2605,24 +2605,24 @@ const co = {
|
|
|
2605
2605
|
if (l.modelValue.startsWith("#"))
|
|
2606
2606
|
v = Ie(l.modelValue), u.value = l.modelValue;
|
|
2607
2607
|
else {
|
|
2608
|
-
const
|
|
2609
|
-
|
|
2610
|
-
r: parseInt(
|
|
2611
|
-
g: parseInt(
|
|
2612
|
-
b: parseInt(
|
|
2608
|
+
const n = l.modelValue.match(/rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*[\d.]+)?\)/);
|
|
2609
|
+
n && (v = {
|
|
2610
|
+
r: parseInt(n[1]),
|
|
2611
|
+
g: parseInt(n[2]),
|
|
2612
|
+
b: parseInt(n[3])
|
|
2613
2613
|
}, u.value = K(v.r, v.g, v.b));
|
|
2614
2614
|
}
|
|
2615
2615
|
if (v) {
|
|
2616
|
-
const
|
|
2617
|
-
c.value =
|
|
2616
|
+
const n = ve(v.r, v.g, v.b);
|
|
2617
|
+
c.value = n.h, h.value = n.s, x.value = n.v, jt(), Ot();
|
|
2618
2618
|
}
|
|
2619
2619
|
};
|
|
2620
2620
|
return Le([c, h, x, S], () => {
|
|
2621
2621
|
jt(), Ot(), Ca(), ya();
|
|
2622
2622
|
const v = He(tt.value);
|
|
2623
2623
|
v !== Ce && (k.value ? (ae && clearTimeout(ae), ae = setTimeout(() => {
|
|
2624
|
-
const
|
|
2625
|
-
|
|
2624
|
+
const n = He(tt.value);
|
|
2625
|
+
n !== Ce && (ce.value = !0, Ce = n, z("update:modelValue", n), z("change", n), setTimeout(() => {
|
|
2626
2626
|
ce.value = !1;
|
|
2627
2627
|
}, 5));
|
|
2628
2628
|
}, 16)) : (ce.value = !0, Ce = v, z("update:modelValue", v), z("change", v), setTimeout(() => {
|
|
@@ -2632,14 +2632,14 @@ const co = {
|
|
|
2632
2632
|
$.value && l.compareColor && (Ct.value = [], nt.value = [], it.value = "", zt.value = "", Vt.value = "", It.value = "");
|
|
2633
2633
|
}), Le(() => l.modelValue, (v) => {
|
|
2634
2634
|
if (v && !ce.value) {
|
|
2635
|
-
const
|
|
2636
|
-
|
|
2635
|
+
const n = He(v), f = He(tt.value);
|
|
2636
|
+
n !== f && Va();
|
|
2637
2637
|
}
|
|
2638
2638
|
}), Ye(() => {
|
|
2639
2639
|
Va();
|
|
2640
2640
|
}), Mt(() => {
|
|
2641
2641
|
T && clearTimeout(T), document.removeEventListener("mousemove", xt), document.removeEventListener("mouseup", $t), document.removeEventListener("touchmove", xt), document.removeEventListener("touchend", $t);
|
|
2642
|
-
}), (v,
|
|
2642
|
+
}), (v, n) => (a(), o("div", Co, [
|
|
2643
2643
|
e("div", yo, [
|
|
2644
2644
|
e("div", {
|
|
2645
2645
|
ref_key: "colorAreaRef",
|
|
@@ -2649,8 +2649,8 @@ const co = {
|
|
|
2649
2649
|
onMousedown: la,
|
|
2650
2650
|
onTouchstart: la
|
|
2651
2651
|
}, [
|
|
2652
|
-
|
|
2653
|
-
|
|
2652
|
+
n[16] || (n[16] = e("div", { class: "ui-color-picker-saturation" }, null, -1)),
|
|
2653
|
+
n[17] || (n[17] = e("div", { class: "ui-color-picker-brightness" }, null, -1)),
|
|
2654
2654
|
b.value ? (a(), o("div", {
|
|
2655
2655
|
key: 0,
|
|
2656
2656
|
class: Me(["ui-color-picker-contrast-overlay", { "contrast-overlay-visible": $.value }])
|
|
@@ -2669,7 +2669,7 @@ const co = {
|
|
|
2669
2669
|
height: dt
|
|
2670
2670
|
})
|
|
2671
2671
|
]),
|
|
2672
|
-
|
|
2672
|
+
n[13] || (n[13] = e("pattern", {
|
|
2673
2673
|
id: "orangeDotsPattern",
|
|
2674
2674
|
x: "0",
|
|
2675
2675
|
y: "0",
|
|
@@ -2685,7 +2685,7 @@ const co = {
|
|
|
2685
2685
|
opacity: "0.3"
|
|
2686
2686
|
})
|
|
2687
2687
|
], -1)),
|
|
2688
|
-
|
|
2688
|
+
n[14] || (n[14] = e("pattern", {
|
|
2689
2689
|
id: "redDotsPattern",
|
|
2690
2690
|
x: "0",
|
|
2691
2691
|
y: "0",
|
|
@@ -2771,7 +2771,7 @@ const co = {
|
|
|
2771
2771
|
top: `${(1 - x.value) * 100}%`,
|
|
2772
2772
|
backgroundColor: tt.value
|
|
2773
2773
|
})
|
|
2774
|
-
}, [...
|
|
2774
|
+
}, [...n[15] || (n[15] = [
|
|
2775
2775
|
e("div", { class: "ui-color-picker-cursor-inner" }, null, -1)
|
|
2776
2776
|
])], 4)
|
|
2777
2777
|
], 36),
|
|
@@ -2792,14 +2792,14 @@ const co = {
|
|
|
2792
2792
|
class: "ui-color-picker-preview-color",
|
|
2793
2793
|
style: je({ "--background-color": tt.value })
|
|
2794
2794
|
}, null, 4),
|
|
2795
|
-
l.showContrast && l.compareColor ? (a(), ye(
|
|
2795
|
+
l.showContrast && l.compareColor ? (a(), ye(i(Kt), {
|
|
2796
2796
|
key: 0,
|
|
2797
2797
|
content: $.value ? "Hide contrast analysis" : "Show contrast analysis",
|
|
2798
2798
|
position: "top",
|
|
2799
2799
|
delay: 300
|
|
2800
2800
|
}, {
|
|
2801
2801
|
default: _(() => [
|
|
2802
|
-
d(
|
|
2802
|
+
d(i(ue), {
|
|
2803
2803
|
onClick: Wa,
|
|
2804
2804
|
icon: !0,
|
|
2805
2805
|
squircle: !0,
|
|
@@ -2807,7 +2807,7 @@ const co = {
|
|
|
2807
2807
|
variant: $.value ? "primary" : "ghost"
|
|
2808
2808
|
}, {
|
|
2809
2809
|
icon: _(() => [
|
|
2810
|
-
d(
|
|
2810
|
+
d(i(cs))
|
|
2811
2811
|
]),
|
|
2812
2812
|
_: 1
|
|
2813
2813
|
}, 8, ["variant"])
|
|
@@ -2821,7 +2821,7 @@ const co = {
|
|
|
2821
2821
|
}, [
|
|
2822
2822
|
Je.value ? (a(), o("div", _o, [
|
|
2823
2823
|
e("div", To, [
|
|
2824
|
-
|
|
2824
|
+
n[18] || (n[18] = e("h4", { class: "ui-color-picker-contrast-title" }, "Contrast Check", -1)),
|
|
2825
2825
|
e("div", zo, [
|
|
2826
2826
|
e("div", Vo, [
|
|
2827
2827
|
e("div", {
|
|
@@ -2842,7 +2842,7 @@ const co = {
|
|
|
2842
2842
|
"ui-color-picker-contrast-level--fail": Je.value.normalText === "FAIL"
|
|
2843
2843
|
}])
|
|
2844
2844
|
}, [
|
|
2845
|
-
|
|
2845
|
+
n[19] || (n[19] = e("div", { class: "ui-color-picker-contrast-level-indicator" }, [
|
|
2846
2846
|
e("div", { class: "ui-color-picker-contrast-level-line ui-color-picker-contrast-level-line--solid" }),
|
|
2847
2847
|
e("span", { class: "ui-color-picker-contrast-level-label" }, "Normal Text")
|
|
2848
2848
|
], -1)),
|
|
@@ -2854,7 +2854,7 @@ const co = {
|
|
|
2854
2854
|
"ui-color-picker-contrast-level--fail": Je.value.largeText === "FAIL"
|
|
2855
2855
|
}])
|
|
2856
2856
|
}, [
|
|
2857
|
-
|
|
2857
|
+
n[20] || (n[20] = e("div", { class: "ui-color-picker-contrast-level-indicator" }, [
|
|
2858
2858
|
e("div", { class: "ui-color-picker-contrast-level-line ui-color-picker-contrast-level-line--dashed" }),
|
|
2859
2859
|
e("span", { class: "ui-color-picker-contrast-level-label" }, "Large Text")
|
|
2860
2860
|
], -1)),
|
|
@@ -2863,7 +2863,7 @@ const co = {
|
|
|
2863
2863
|
]),
|
|
2864
2864
|
e("div", Uo, [
|
|
2865
2865
|
(a(), o("svg", Do, [
|
|
2866
|
-
|
|
2866
|
+
n[21] || (n[21] = Qt('<defs data-v-24473a61><linearGradient id="contrastGradientDefault" x1="0%" y1="0%" x2="100%" y2="0%" data-v-24473a61><stop offset="0%" stop-color="#ef4444" data-v-24473a61></stop><stop offset="21.4%" stop-color="#ef4444" data-v-24473a61></stop><stop offset="21.4%" stop-color="#f59e0b" data-v-24473a61></stop><stop offset="64.3%" stop-color="#f59e0b" data-v-24473a61></stop><stop offset="64.3%" stop-color="#22c55e" data-v-24473a61></stop><stop offset="100%" stop-color="#22c55e" data-v-24473a61></stop></linearGradient></defs><rect x="0" y="15" width="280" height="10" fill="url(#contrastGradientDefault)" rx="5" data-v-24473a61></rect><line x1="60" y1="10" x2="60" y2="30" stroke="#666" stroke-width="1" opacity="0.5" data-v-24473a61></line><line x1="180" y1="10" x2="180" y2="30" stroke="#666" stroke-width="1" opacity="0.5" data-v-24473a61></line>', 4)),
|
|
2867
2867
|
e("circle", {
|
|
2868
2868
|
cx: Math.min(270, Math.max(10, Math.min(Je.value.ratio, 14) / 14 * 260 + 10)),
|
|
2869
2869
|
cy: "20",
|
|
@@ -2873,7 +2873,7 @@ const co = {
|
|
|
2873
2873
|
"stroke-width": "2"
|
|
2874
2874
|
}, null, 8, No)
|
|
2875
2875
|
])),
|
|
2876
|
-
|
|
2876
|
+
n[22] || (n[22] = Qt('<div class="ui-color-picker-contrast-labels" data-v-24473a61><span class="ui-color-picker-contrast-label" data-v-24473a61>1:1</span><span class="ui-color-picker-contrast-label" style="left:60px;" data-v-24473a61>3:1</span><span class="ui-color-picker-contrast-label" style="left:180px;" data-v-24473a61>4.5:1</span><span class="ui-color-picker-contrast-label" style="right:0;" data-v-24473a61>14:1+</span></div>', 1))
|
|
2877
2877
|
])
|
|
2878
2878
|
])) : I("", !0)
|
|
2879
2879
|
], 2),
|
|
@@ -2885,7 +2885,7 @@ const co = {
|
|
|
2885
2885
|
onMousedown: ca,
|
|
2886
2886
|
onTouchstart: ca
|
|
2887
2887
|
}, [
|
|
2888
|
-
|
|
2888
|
+
n[23] || (n[23] = e("div", { class: "ui-color-picker-alpha-bg" }, null, -1)),
|
|
2889
2889
|
e("div", {
|
|
2890
2890
|
class: "ui-color-picker-alpha-gradient",
|
|
2891
2891
|
style: je({
|
|
@@ -2898,11 +2898,11 @@ const co = {
|
|
|
2898
2898
|
}, null, 4)
|
|
2899
2899
|
], 544)) : I("", !0),
|
|
2900
2900
|
e("div", Bo, [
|
|
2901
|
-
|
|
2901
|
+
D.value === "hex" ? (a(), o("div", Po, [
|
|
2902
2902
|
e("div", jo, [
|
|
2903
|
-
|
|
2903
|
+
n[24] || (n[24] = e("label", { class: "ui-color-picker-label" }, "Hex", -1)),
|
|
2904
2904
|
Qe(e("input", {
|
|
2905
|
-
"onUpdate:modelValue":
|
|
2905
|
+
"onUpdate:modelValue": n[0] || (n[0] = (f) => u.value = f),
|
|
2906
2906
|
onInput: wt,
|
|
2907
2907
|
onBlur: Bt,
|
|
2908
2908
|
class: "ui-color-picker-input",
|
|
@@ -2914,7 +2914,7 @@ const co = {
|
|
|
2914
2914
|
])
|
|
2915
2915
|
]),
|
|
2916
2916
|
e("div", Oo, [
|
|
2917
|
-
d(
|
|
2917
|
+
d(i(ue), {
|
|
2918
2918
|
color: "secondary",
|
|
2919
2919
|
size: "xs",
|
|
2920
2920
|
icon: "",
|
|
@@ -2923,16 +2923,16 @@ const co = {
|
|
|
2923
2923
|
"aria-label": "Switch color format"
|
|
2924
2924
|
}, {
|
|
2925
2925
|
icon: _(() => [
|
|
2926
|
-
d(
|
|
2926
|
+
d(i(Gt))
|
|
2927
2927
|
]),
|
|
2928
2928
|
_: 1
|
|
2929
2929
|
})
|
|
2930
2930
|
])
|
|
2931
|
-
])) :
|
|
2931
|
+
])) : D.value === "rgb" ? (a(), o("div", Ro, [
|
|
2932
2932
|
e("div", Fo, [
|
|
2933
|
-
|
|
2933
|
+
n[25] || (n[25] = e("label", { class: "ui-color-picker-label" }, "R", -1)),
|
|
2934
2934
|
Qe(e("input", {
|
|
2935
|
-
"onUpdate:modelValue":
|
|
2935
|
+
"onUpdate:modelValue": n[1] || (n[1] = (f) => m.value.r = f),
|
|
2936
2936
|
onInput: et,
|
|
2937
2937
|
class: "ui-color-picker-input",
|
|
2938
2938
|
type: "number",
|
|
@@ -2948,9 +2948,9 @@ const co = {
|
|
|
2948
2948
|
])
|
|
2949
2949
|
]),
|
|
2950
2950
|
e("div", qo, [
|
|
2951
|
-
|
|
2951
|
+
n[26] || (n[26] = e("label", { class: "ui-color-picker-label" }, "G", -1)),
|
|
2952
2952
|
Qe(e("input", {
|
|
2953
|
-
"onUpdate:modelValue":
|
|
2953
|
+
"onUpdate:modelValue": n[2] || (n[2] = (f) => m.value.g = f),
|
|
2954
2954
|
onInput: et,
|
|
2955
2955
|
class: "ui-color-picker-input",
|
|
2956
2956
|
type: "number",
|
|
@@ -2966,9 +2966,9 @@ const co = {
|
|
|
2966
2966
|
])
|
|
2967
2967
|
]),
|
|
2968
2968
|
e("div", Zo, [
|
|
2969
|
-
|
|
2969
|
+
n[27] || (n[27] = e("label", { class: "ui-color-picker-label" }, "B", -1)),
|
|
2970
2970
|
Qe(e("input", {
|
|
2971
|
-
"onUpdate:modelValue":
|
|
2971
|
+
"onUpdate:modelValue": n[3] || (n[3] = (f) => m.value.b = f),
|
|
2972
2972
|
onInput: et,
|
|
2973
2973
|
class: "ui-color-picker-input",
|
|
2974
2974
|
type: "number",
|
|
@@ -2984,9 +2984,9 @@ const co = {
|
|
|
2984
2984
|
])
|
|
2985
2985
|
]),
|
|
2986
2986
|
l.showAlpha ? (a(), o("div", Ko, [
|
|
2987
|
-
|
|
2987
|
+
n[28] || (n[28] = e("label", { class: "ui-color-picker-label" }, "A", -1)),
|
|
2988
2988
|
Qe(e("input", {
|
|
2989
|
-
"onUpdate:modelValue":
|
|
2989
|
+
"onUpdate:modelValue": n[4] || (n[4] = (f) => U.value = f),
|
|
2990
2990
|
onInput: Pt,
|
|
2991
2991
|
class: "ui-color-picker-input",
|
|
2992
2992
|
type: "number",
|
|
@@ -2995,14 +2995,14 @@ const co = {
|
|
|
2995
2995
|
}, null, 544), [
|
|
2996
2996
|
[
|
|
2997
2997
|
Xe,
|
|
2998
|
-
|
|
2998
|
+
U.value,
|
|
2999
2999
|
void 0,
|
|
3000
3000
|
{ number: !0 }
|
|
3001
3001
|
]
|
|
3002
3002
|
])
|
|
3003
3003
|
])) : I("", !0),
|
|
3004
3004
|
e("div", Go, [
|
|
3005
|
-
d(
|
|
3005
|
+
d(i(ue), {
|
|
3006
3006
|
color: "secondary",
|
|
3007
3007
|
size: "xs",
|
|
3008
3008
|
icon: "",
|
|
@@ -3011,16 +3011,16 @@ const co = {
|
|
|
3011
3011
|
"aria-label": "Switch color format"
|
|
3012
3012
|
}, {
|
|
3013
3013
|
icon: _(() => [
|
|
3014
|
-
d(
|
|
3014
|
+
d(i(Gt))
|
|
3015
3015
|
]),
|
|
3016
3016
|
_: 1
|
|
3017
3017
|
})
|
|
3018
3018
|
])
|
|
3019
|
-
])) :
|
|
3019
|
+
])) : D.value === "hsl" ? (a(), o("div", Yo, [
|
|
3020
3020
|
e("div", Wo, [
|
|
3021
|
-
|
|
3021
|
+
n[29] || (n[29] = e("label", { class: "ui-color-picker-label" }, "H", -1)),
|
|
3022
3022
|
Qe(e("input", {
|
|
3023
|
-
"onUpdate:modelValue":
|
|
3023
|
+
"onUpdate:modelValue": n[5] || (n[5] = (f) => g.value.h = f),
|
|
3024
3024
|
onInput: ct,
|
|
3025
3025
|
class: "ui-color-picker-input",
|
|
3026
3026
|
type: "number",
|
|
@@ -3036,9 +3036,9 @@ const co = {
|
|
|
3036
3036
|
])
|
|
3037
3037
|
]),
|
|
3038
3038
|
e("div", Qo, [
|
|
3039
|
-
|
|
3039
|
+
n[30] || (n[30] = e("label", { class: "ui-color-picker-label" }, "S", -1)),
|
|
3040
3040
|
Qe(e("input", {
|
|
3041
|
-
"onUpdate:modelValue":
|
|
3041
|
+
"onUpdate:modelValue": n[6] || (n[6] = (f) => g.value.s = f),
|
|
3042
3042
|
onInput: ct,
|
|
3043
3043
|
class: "ui-color-picker-input",
|
|
3044
3044
|
type: "number",
|
|
@@ -3054,9 +3054,9 @@ const co = {
|
|
|
3054
3054
|
])
|
|
3055
3055
|
]),
|
|
3056
3056
|
e("div", Xo, [
|
|
3057
|
-
|
|
3057
|
+
n[31] || (n[31] = e("label", { class: "ui-color-picker-label" }, "L", -1)),
|
|
3058
3058
|
Qe(e("input", {
|
|
3059
|
-
"onUpdate:modelValue":
|
|
3059
|
+
"onUpdate:modelValue": n[7] || (n[7] = (f) => g.value.l = f),
|
|
3060
3060
|
onInput: ct,
|
|
3061
3061
|
class: "ui-color-picker-input",
|
|
3062
3062
|
type: "number",
|
|
@@ -3072,9 +3072,9 @@ const co = {
|
|
|
3072
3072
|
])
|
|
3073
3073
|
]),
|
|
3074
3074
|
l.showAlpha ? (a(), o("div", Jo, [
|
|
3075
|
-
|
|
3075
|
+
n[32] || (n[32] = e("label", { class: "ui-color-picker-label" }, "A", -1)),
|
|
3076
3076
|
Qe(e("input", {
|
|
3077
|
-
"onUpdate:modelValue":
|
|
3077
|
+
"onUpdate:modelValue": n[8] || (n[8] = (f) => U.value = f),
|
|
3078
3078
|
onInput: Pt,
|
|
3079
3079
|
class: "ui-color-picker-input",
|
|
3080
3080
|
type: "number",
|
|
@@ -3083,14 +3083,14 @@ const co = {
|
|
|
3083
3083
|
}, null, 544), [
|
|
3084
3084
|
[
|
|
3085
3085
|
Xe,
|
|
3086
|
-
|
|
3086
|
+
U.value,
|
|
3087
3087
|
void 0,
|
|
3088
3088
|
{ number: !0 }
|
|
3089
3089
|
]
|
|
3090
3090
|
])
|
|
3091
3091
|
])) : I("", !0),
|
|
3092
3092
|
e("div", e1, [
|
|
3093
|
-
d(
|
|
3093
|
+
d(i(ue), {
|
|
3094
3094
|
color: "secondary",
|
|
3095
3095
|
size: "xs",
|
|
3096
3096
|
icon: "",
|
|
@@ -3099,16 +3099,16 @@ const co = {
|
|
|
3099
3099
|
"aria-label": "Switch color format"
|
|
3100
3100
|
}, {
|
|
3101
3101
|
icon: _(() => [
|
|
3102
|
-
d(
|
|
3102
|
+
d(i(Gt))
|
|
3103
3103
|
]),
|
|
3104
3104
|
_: 1
|
|
3105
3105
|
})
|
|
3106
3106
|
])
|
|
3107
|
-
])) :
|
|
3107
|
+
])) : D.value === "oklch" ? (a(), o("div", t1, [
|
|
3108
3108
|
e("div", a1, [
|
|
3109
|
-
|
|
3109
|
+
n[33] || (n[33] = e("label", { class: "ui-color-picker-label" }, "L", -1)),
|
|
3110
3110
|
Qe(e("input", {
|
|
3111
|
-
"onUpdate:modelValue":
|
|
3111
|
+
"onUpdate:modelValue": n[9] || (n[9] = (f) => N.value.l = f),
|
|
3112
3112
|
onInput: bt,
|
|
3113
3113
|
class: "ui-color-picker-input",
|
|
3114
3114
|
type: "number",
|
|
@@ -3124,9 +3124,9 @@ const co = {
|
|
|
3124
3124
|
])
|
|
3125
3125
|
]),
|
|
3126
3126
|
e("div", s1, [
|
|
3127
|
-
|
|
3127
|
+
n[34] || (n[34] = e("label", { class: "ui-color-picker-label" }, "C", -1)),
|
|
3128
3128
|
Qe(e("input", {
|
|
3129
|
-
"onUpdate:modelValue":
|
|
3129
|
+
"onUpdate:modelValue": n[10] || (n[10] = (f) => N.value.c = f),
|
|
3130
3130
|
onInput: bt,
|
|
3131
3131
|
class: "ui-color-picker-input",
|
|
3132
3132
|
type: "number",
|
|
@@ -3142,9 +3142,9 @@ const co = {
|
|
|
3142
3142
|
])
|
|
3143
3143
|
]),
|
|
3144
3144
|
e("div", o1, [
|
|
3145
|
-
|
|
3145
|
+
n[35] || (n[35] = e("label", { class: "ui-color-picker-label" }, "H", -1)),
|
|
3146
3146
|
Qe(e("input", {
|
|
3147
|
-
"onUpdate:modelValue":
|
|
3147
|
+
"onUpdate:modelValue": n[11] || (n[11] = (f) => N.value.h = f),
|
|
3148
3148
|
onInput: bt,
|
|
3149
3149
|
class: "ui-color-picker-input",
|
|
3150
3150
|
type: "number",
|
|
@@ -3160,9 +3160,9 @@ const co = {
|
|
|
3160
3160
|
])
|
|
3161
3161
|
]),
|
|
3162
3162
|
l.showAlpha ? (a(), o("div", l1, [
|
|
3163
|
-
|
|
3163
|
+
n[36] || (n[36] = e("label", { class: "ui-color-picker-label" }, "A", -1)),
|
|
3164
3164
|
Qe(e("input", {
|
|
3165
|
-
"onUpdate:modelValue":
|
|
3165
|
+
"onUpdate:modelValue": n[12] || (n[12] = (f) => U.value = f),
|
|
3166
3166
|
onInput: Pt,
|
|
3167
3167
|
class: "ui-color-picker-input",
|
|
3168
3168
|
type: "number",
|
|
@@ -3171,14 +3171,14 @@ const co = {
|
|
|
3171
3171
|
}, null, 544), [
|
|
3172
3172
|
[
|
|
3173
3173
|
Xe,
|
|
3174
|
-
|
|
3174
|
+
U.value,
|
|
3175
3175
|
void 0,
|
|
3176
3176
|
{ number: !0 }
|
|
3177
3177
|
]
|
|
3178
3178
|
])
|
|
3179
3179
|
])) : I("", !0),
|
|
3180
3180
|
e("div", n1, [
|
|
3181
|
-
d(
|
|
3181
|
+
d(i(ue), {
|
|
3182
3182
|
color: "secondary",
|
|
3183
3183
|
size: "xs",
|
|
3184
3184
|
icon: "",
|
|
@@ -3187,7 +3187,7 @@ const co = {
|
|
|
3187
3187
|
"aria-label": "Switch color format"
|
|
3188
3188
|
}, {
|
|
3189
3189
|
icon: _(() => [
|
|
3190
|
-
d(
|
|
3190
|
+
d(i(Gt))
|
|
3191
3191
|
]),
|
|
3192
3192
|
_: 1
|
|
3193
3193
|
})
|
|
@@ -3196,14 +3196,14 @@ const co = {
|
|
|
3196
3196
|
]),
|
|
3197
3197
|
l.showSwatches ? (a(), o("div", i1, [
|
|
3198
3198
|
ne.value.length > 0 ? (a(), o(De, { key: 0 }, [
|
|
3199
|
-
d(
|
|
3199
|
+
d(i(ba), {
|
|
3200
3200
|
text: s.additionalSwatchesLabel || "Custom Colors",
|
|
3201
3201
|
"text-position": "left",
|
|
3202
3202
|
color: "#d1d5db",
|
|
3203
3203
|
margin: 12
|
|
3204
3204
|
}, null, 8, ["text"]),
|
|
3205
3205
|
e("div", r1, [
|
|
3206
|
-
(a(!0), o(De, null, Ze(ne.value, (f) => (a(), ye(
|
|
3206
|
+
(a(!0), o(De, null, Ze(ne.value, (f) => (a(), ye(i(Kt), {
|
|
3207
3207
|
key: f,
|
|
3208
3208
|
content: $e(f),
|
|
3209
3209
|
position: "top",
|
|
@@ -3220,12 +3220,12 @@ const co = {
|
|
|
3220
3220
|
}, 1032, ["content"]))), 128))
|
|
3221
3221
|
])
|
|
3222
3222
|
], 64)) : I("", !0),
|
|
3223
|
-
d(
|
|
3223
|
+
d(i(ba), {
|
|
3224
3224
|
color: "#d1d5db",
|
|
3225
3225
|
margin: 8
|
|
3226
3226
|
}),
|
|
3227
3227
|
e("div", u1, [
|
|
3228
|
-
(a(!0), o(De, null, Ze(be.value, (f) => (a(), ye(
|
|
3228
|
+
(a(!0), o(De, null, Ze(be.value, (f) => (a(), ye(i(Kt), {
|
|
3229
3229
|
key: f,
|
|
3230
3230
|
content: $e(f),
|
|
3231
3231
|
position: "top",
|
|
@@ -3245,14 +3245,14 @@ const co = {
|
|
|
3245
3245
|
class: Me(["ui-color-picker-shades-container", { "ui-color-picker-shades-container--expanded": Y.value }])
|
|
3246
3246
|
}, [
|
|
3247
3247
|
e("div", v1, [
|
|
3248
|
-
d(
|
|
3248
|
+
d(i(ba), {
|
|
3249
3249
|
text: `${le.value} Shades`,
|
|
3250
3250
|
"text-position": "left",
|
|
3251
3251
|
color: "#d1d5db",
|
|
3252
3252
|
margin: 8
|
|
3253
3253
|
}, null, 8, ["text"]),
|
|
3254
3254
|
e("div", p1, [
|
|
3255
|
-
(a(!0), o(De, null, Ze(te.value, (f) => (a(), ye(
|
|
3255
|
+
(a(!0), o(De, null, Ze(te.value, (f) => (a(), ye(i(Kt), {
|
|
3256
3256
|
key: f,
|
|
3257
3257
|
content: $e(f),
|
|
3258
3258
|
position: "top",
|
|
@@ -3334,7 +3334,7 @@ const co = {
|
|
|
3334
3334
|
}
|
|
3335
3335
|
), Mt(() => {
|
|
3336
3336
|
S();
|
|
3337
|
-
}), (m,
|
|
3337
|
+
}), (m, U) => (a(), o("div", {
|
|
3338
3338
|
ref_key: "containerRef",
|
|
3339
3339
|
ref: z,
|
|
3340
3340
|
class: "ui-color-picker-button-container"
|
|
@@ -3353,10 +3353,10 @@ const co = {
|
|
|
3353
3353
|
])
|
|
3354
3354
|
]),
|
|
3355
3355
|
"trailing-icon": _(() => [
|
|
3356
|
-
d(
|
|
3356
|
+
d(i(_a))
|
|
3357
3357
|
]),
|
|
3358
3358
|
default: _(() => [
|
|
3359
|
-
|
|
3359
|
+
U[2] || (U[2] = J(" Color ", -1))
|
|
3360
3360
|
]),
|
|
3361
3361
|
_: 1
|
|
3362
3362
|
}, 8, ["disabled"]),
|
|
@@ -3366,13 +3366,13 @@ const co = {
|
|
|
3366
3366
|
ref_key: "popoverRef",
|
|
3367
3367
|
ref: V,
|
|
3368
3368
|
class: "ui-color-picker-popover",
|
|
3369
|
-
style: je(
|
|
3369
|
+
style: je(i(h))
|
|
3370
3370
|
}, [
|
|
3371
3371
|
d(qa, xa({
|
|
3372
3372
|
modelValue: w.value,
|
|
3373
|
-
"onUpdate:modelValue":
|
|
3373
|
+
"onUpdate:modelValue": U[0] || (U[0] = (D) => w.value = D)
|
|
3374
3374
|
}, t, {
|
|
3375
|
-
"onUpdate:modelValue":
|
|
3375
|
+
"onUpdate:modelValue": U[1] || (U[1] = (D) => m.$emit("update:modelValue", D))
|
|
3376
3376
|
}), null, 16, ["modelValue"])
|
|
3377
3377
|
], 4)) : I("", !0)
|
|
3378
3378
|
]))
|
|
@@ -3468,7 +3468,7 @@ const co = {
|
|
|
3468
3468
|
w.value = [...l.data], y.value.clear(), L.value.clear();
|
|
3469
3469
|
}, x = () => {
|
|
3470
3470
|
c.value = [...l.columns];
|
|
3471
|
-
}, S = M(""), u = M("asc"), m = M({}),
|
|
3471
|
+
}, S = M(""), u = M("asc"), m = M({}), U = M({}), D = M(""), g = M(/* @__PURE__ */ new Set()), N = M(/* @__PURE__ */ new Set()), y = M(/* @__PURE__ */ new Set()), L = M(/* @__PURE__ */ new Map()), F = M(null), $ = M(null), k = M(!1), O = M(0), q = M(0), b = H(() => {
|
|
3472
3472
|
const K = {
|
|
3473
3473
|
"--_cols": l.columns.length.toString()
|
|
3474
3474
|
};
|
|
@@ -3500,9 +3500,9 @@ const co = {
|
|
|
3500
3500
|
return pe < He ? u.value === "asc" ? -1 : 1 : pe > He ? u.value === "asc" ? 1 : -1 : 0;
|
|
3501
3501
|
});
|
|
3502
3502
|
}
|
|
3503
|
-
if (
|
|
3504
|
-
const he = l.columns.find((fe) => fe.key ===
|
|
3505
|
-
const He = xe(pe,
|
|
3503
|
+
if (D.value && l.groupable) {
|
|
3504
|
+
const he = l.columns.find((fe) => fe.key === D.value), Q = K.reduce((fe, pe) => {
|
|
3505
|
+
const He = xe(pe, D.value, he), Ne = String(He || "Ungrouped");
|
|
3506
3506
|
return fe[Ne] || (fe[Ne] = []), fe[Ne].push(pe), fe;
|
|
3507
3507
|
}, {});
|
|
3508
3508
|
return Object.entries(Q).flatMap(([fe, pe]) => [
|
|
@@ -3539,9 +3539,9 @@ const co = {
|
|
|
3539
3539
|
fe != null && he.add(String(fe));
|
|
3540
3540
|
}), Array.from(he).sort().map((Q) => ({ label: Q, value: Q }));
|
|
3541
3541
|
}, Z = (K) => {
|
|
3542
|
-
|
|
3542
|
+
U.value[K] = !U.value[K];
|
|
3543
3543
|
}, ie = (K) => {
|
|
3544
|
-
|
|
3544
|
+
D.value = D.value === K ? "" : K;
|
|
3545
3545
|
}, te = (K, he) => {
|
|
3546
3546
|
K._isGroupHeader || (l.expandable && (g.value.has(he) ? g.value.delete(he) : g.value.add(he)), l.selectable && (N.value.has(he) ? N.value.delete(he) : N.value.add(he), z("rowSelect", N.value)), z("rowClick", K, he));
|
|
3547
3547
|
}, Y = (K, he, Q, fe) => {
|
|
@@ -3660,7 +3660,7 @@ const co = {
|
|
|
3660
3660
|
onDragstart: (pe) => le(pe, fe),
|
|
3661
3661
|
onDragend: re
|
|
3662
3662
|
}, [
|
|
3663
|
-
d(
|
|
3663
|
+
d(i(ds), { size: 14 })
|
|
3664
3664
|
], 40, x1)) : I("", !0),
|
|
3665
3665
|
Pe(K.$slots, `col-${Q.key}`, {
|
|
3666
3666
|
column: Q,
|
|
@@ -3669,13 +3669,13 @@ const co = {
|
|
|
3669
3669
|
e("span", null, R(Q.label), 1)
|
|
3670
3670
|
], !0),
|
|
3671
3671
|
Q.sortable ? (a(), o("span", $1, [
|
|
3672
|
-
S.value === Q.key && u.value === "asc" ? (a(), ye(
|
|
3672
|
+
S.value === Q.key && u.value === "asc" ? (a(), ye(i(Fa), {
|
|
3673
3673
|
key: 0,
|
|
3674
3674
|
size: 16
|
|
3675
|
-
})) : S.value === Q.key && u.value === "desc" ? (a(), ye(
|
|
3675
|
+
})) : S.value === Q.key && u.value === "desc" ? (a(), ye(i(_a), {
|
|
3676
3676
|
key: 1,
|
|
3677
3677
|
size: 16
|
|
3678
|
-
})) : (a(), ye(
|
|
3678
|
+
})) : (a(), ye(i(Gt), {
|
|
3679
3679
|
key: 2,
|
|
3680
3680
|
size: 16
|
|
3681
3681
|
}))
|
|
@@ -3687,18 +3687,18 @@ const co = {
|
|
|
3687
3687
|
onClick: (pe) => Z(Q.key),
|
|
3688
3688
|
class: Me(["ui-table-filter-btn", { "ui-table-filter-btn--active": m.value[Q.key] }])
|
|
3689
3689
|
}, [
|
|
3690
|
-
d(
|
|
3690
|
+
d(i(us), { size: 14 })
|
|
3691
3691
|
], 10, A1)) : I("", !0),
|
|
3692
3692
|
s.groupable || Q.groupable ? (a(), o("button", {
|
|
3693
3693
|
key: 1,
|
|
3694
3694
|
onClick: (pe) => ie(Q.key),
|
|
3695
|
-
class: Me(["ui-table-group-btn", { "ui-table-group-btn--active":
|
|
3695
|
+
class: Me(["ui-table-group-btn", { "ui-table-group-btn--active": D.value === Q.key }])
|
|
3696
3696
|
}, [
|
|
3697
|
-
d(
|
|
3697
|
+
d(i(Ha), { size: 14 })
|
|
3698
3698
|
], 10, _1)) : I("", !0)
|
|
3699
3699
|
])
|
|
3700
3700
|
]),
|
|
3701
|
-
|
|
3701
|
+
U.value[Q.key] ? (a(), o("div", T1, [
|
|
3702
3702
|
d(Fe, {
|
|
3703
3703
|
modelValue: m.value[Q.key],
|
|
3704
3704
|
"onUpdate:modelValue": (pe) => m.value[Q.key] = pe,
|
|
@@ -3721,7 +3721,7 @@ const co = {
|
|
|
3721
3721
|
style: je({ "--group-index": Ie(fe) })
|
|
3722
3722
|
}, [
|
|
3723
3723
|
e("div", V1, [
|
|
3724
|
-
d(
|
|
3724
|
+
d(i(Ha), { size: 16 }),
|
|
3725
3725
|
e("span", I1, R(Q._groupName), 1),
|
|
3726
3726
|
e("span", L1, "(" + R(Q._groupCount) + " items)", 1)
|
|
3727
3727
|
])
|
|
@@ -3906,7 +3906,7 @@ const co = {
|
|
|
3906
3906
|
if (!r.gradient || r.variant !== "gradient" && r.variant !== "space") return null;
|
|
3907
3907
|
const { angle: S = "135deg", stops: u = [] } = r.gradient;
|
|
3908
3908
|
if (u.length === 0) return null;
|
|
3909
|
-
const m = u.sort((
|
|
3909
|
+
const m = u.sort((U, D) => U.position - D.position).map((U) => `${U.color} ${U.position}%`).join(", ");
|
|
3910
3910
|
return `linear-gradient(${S}, ${m})`;
|
|
3911
3911
|
}), h = H(() => {
|
|
3912
3912
|
const S = {};
|
|
@@ -4092,15 +4092,15 @@ const sl = {
|
|
|
4092
4092
|
monitor: Ea,
|
|
4093
4093
|
"chevron-up": Fa,
|
|
4094
4094
|
"chevron-down": _a
|
|
4095
|
-
}, S = (g) => x[g] || Ea, u = H(() => l.value === "dark" ? "moon" : l.value === "light" ? "sun" : "monitor"), m = H(() => l.value === "dark" ? "Light" : l.value === "light" ? "System" : "Dark"),
|
|
4095
|
+
}, S = (g) => x[g] || Ea, u = H(() => l.value === "dark" ? "moon" : l.value === "light" ? "sun" : "monitor"), m = H(() => l.value === "dark" ? "Light" : l.value === "light" ? "System" : "Dark"), U = () => {
|
|
4096
4096
|
r.variant === "button" && C();
|
|
4097
|
-
},
|
|
4097
|
+
}, D = (g) => {
|
|
4098
4098
|
g.target.closest(".ui-theme-toggle-dropdown") || (h.value = !1);
|
|
4099
4099
|
};
|
|
4100
4100
|
return Ye(() => {
|
|
4101
|
-
document.addEventListener("click",
|
|
4101
|
+
document.addEventListener("click", D);
|
|
4102
4102
|
}), Mt(() => {
|
|
4103
|
-
document.removeEventListener("click",
|
|
4103
|
+
document.removeEventListener("click", D);
|
|
4104
4104
|
}), (g, N) => (a(), o("div", {
|
|
4105
4105
|
class: Me(["ui-theme-toggle", { "ui-theme-toggle--full-width": s.fullWidth }])
|
|
4106
4106
|
}, [
|
|
@@ -4111,13 +4111,13 @@ const sl = {
|
|
|
4111
4111
|
variant: "ghost",
|
|
4112
4112
|
size: s.size,
|
|
4113
4113
|
disabled: c.value,
|
|
4114
|
-
onClick: N[0] || (N[0] = (y) => c.value ? null :
|
|
4114
|
+
onClick: N[0] || (N[0] = (y) => c.value ? null : U),
|
|
4115
4115
|
title: c.value ? "Theme is locked by app settings" : `Switch to ${m.value.toLowerCase()} theme`,
|
|
4116
4116
|
class: Me(["ui-theme-toggle-button", { "ui-theme-toggle--disabled": c.value }])
|
|
4117
4117
|
}, Ft({
|
|
4118
4118
|
default: _(() => [
|
|
4119
4119
|
s.includeLabel ? (a(), o(De, { key: 0 }, [
|
|
4120
|
-
J(R(
|
|
4120
|
+
J(R(i(z)) + R(c.value ? " (Locked)" : ""), 1)
|
|
4121
4121
|
], 64)) : I("", !0)
|
|
4122
4122
|
]),
|
|
4123
4123
|
_: 2
|
|
@@ -4152,7 +4152,7 @@ const sl = {
|
|
|
4152
4152
|
(a(), ye(ot(S(h.value ? "chevron-up" : "chevron-down"))))
|
|
4153
4153
|
]),
|
|
4154
4154
|
default: _(() => [
|
|
4155
|
-
J(" " + R(
|
|
4155
|
+
J(" " + R(i(z)) + R(c.value ? " (Locked)" : "") + " ", 1)
|
|
4156
4156
|
]),
|
|
4157
4157
|
_: 1
|
|
4158
4158
|
}, 8, ["size", "disabled", "class", "title"]),
|
|
@@ -4161,38 +4161,38 @@ const sl = {
|
|
|
4161
4161
|
class: "ui-theme-toggle-menu",
|
|
4162
4162
|
onClick: N[2] || (N[2] = (y) => h.value = !1)
|
|
4163
4163
|
}, [
|
|
4164
|
-
(a(!0), o(De, null, Ze(
|
|
4164
|
+
(a(!0), o(De, null, Ze(i(w), (y) => (a(), o("button", {
|
|
4165
4165
|
key: y.value,
|
|
4166
4166
|
class: Me([
|
|
4167
4167
|
"ui-theme-toggle-option",
|
|
4168
4168
|
{
|
|
4169
|
-
"ui-theme-toggle-option--active":
|
|
4169
|
+
"ui-theme-toggle-option--active": i(l) === y.value,
|
|
4170
4170
|
"ui-theme-toggle-option--disabled": c.value
|
|
4171
4171
|
}
|
|
4172
4172
|
]),
|
|
4173
4173
|
disabled: c.value,
|
|
4174
|
-
onClick: (L) => c.value ? null :
|
|
4174
|
+
onClick: (L) => c.value ? null : i(V)(y.value)
|
|
4175
4175
|
}, [
|
|
4176
4176
|
(a(), ye(ot(S(y.icon)), { class: "ui-theme-toggle-option-icon" })),
|
|
4177
4177
|
e("span", null, R(y.label), 1),
|
|
4178
|
-
|
|
4178
|
+
i(l) === y.value ? (a(), o("div", ll)) : I("", !0)
|
|
4179
4179
|
], 10, ol))), 128))
|
|
4180
4180
|
])) : I("", !0)
|
|
4181
4181
|
])) : s.variant === "segmented" ? (a(), o("div", nl, [
|
|
4182
|
-
(a(!0), o(De, null, Ze(
|
|
4182
|
+
(a(!0), o(De, null, Ze(i(w), (y) => (a(), ye(lt, {
|
|
4183
4183
|
key: y.value,
|
|
4184
|
-
variant:
|
|
4184
|
+
variant: i(l) === y.value ? "primary" : "ghost",
|
|
4185
4185
|
size: s.size,
|
|
4186
4186
|
squircle: "",
|
|
4187
4187
|
icon: !s.includeLabel,
|
|
4188
4188
|
"full-width": "",
|
|
4189
4189
|
class: Me([
|
|
4190
4190
|
"ui-theme-toggle-segment",
|
|
4191
|
-
{ "ui-theme-toggle-segment--active":
|
|
4191
|
+
{ "ui-theme-toggle-segment--active": i(l) === y.value }
|
|
4192
4192
|
]),
|
|
4193
|
-
"aria-pressed":
|
|
4193
|
+
"aria-pressed": i(l) === y.value,
|
|
4194
4194
|
"aria-label": `${y.label} theme`,
|
|
4195
|
-
onClick: (L) =>
|
|
4195
|
+
onClick: (L) => i(V)(y.value),
|
|
4196
4196
|
title: `Switch to ${y.label.toLowerCase()} theme`
|
|
4197
4197
|
}, Ft({
|
|
4198
4198
|
default: _(() => [
|
|
@@ -4283,7 +4283,7 @@ const sl = {
|
|
|
4283
4283
|
const x = H(() => {
|
|
4284
4284
|
const $ = t.max - t.min, k = (h.value - t.min) / $ * 100;
|
|
4285
4285
|
return Math.max(0, Math.min(100, k));
|
|
4286
|
-
}), S = H(() => h.value?.toFixed(t.step < 1 ? 1 : 0) || "0"), u = H(() => `slider-size-${t.size}`), m = H(() => t.color ? `slider-color-${t.color}` : ""),
|
|
4286
|
+
}), S = H(() => h.value?.toFixed(t.step < 1 ? 1 : 0) || "0"), u = H(() => `slider-size-${t.size}`), m = H(() => t.color ? `slider-color-${t.color}` : ""), U = H(() => {
|
|
4287
4287
|
if (!t.showTicks) return [];
|
|
4288
4288
|
const $ = [], k = t.max - t.min, O = k / (t.tickCount - 1);
|
|
4289
4289
|
for (let q = 0; q < t.tickCount; q++) {
|
|
@@ -4295,7 +4295,7 @@ const sl = {
|
|
|
4295
4295
|
});
|
|
4296
4296
|
}
|
|
4297
4297
|
return $;
|
|
4298
|
-
}),
|
|
4298
|
+
}), D = ($) => {
|
|
4299
4299
|
const k = $.target, O = parseFloat(k.value);
|
|
4300
4300
|
C.value++, C.value > 1 && (V.value = !0, w.value && clearTimeout(w.value), w.value = setTimeout(() => {
|
|
4301
4301
|
V.value = !1, C.value = 0;
|
|
@@ -4350,7 +4350,7 @@ const sl = {
|
|
|
4350
4350
|
disabled: s.disabled,
|
|
4351
4351
|
required: s.required,
|
|
4352
4352
|
class: "slider-input",
|
|
4353
|
-
onInput:
|
|
4353
|
+
onInput: D,
|
|
4354
4354
|
onChange: g,
|
|
4355
4355
|
onFocus: N,
|
|
4356
4356
|
onBlur: y,
|
|
@@ -4373,7 +4373,7 @@ const sl = {
|
|
|
4373
4373
|
s.showMinMax ? (a(), o("div", hl, R(s.max) + R(s.unit), 1)) : I("", !0)
|
|
4374
4374
|
], 2),
|
|
4375
4375
|
s.showTicks ? (a(), o("div", gl, [
|
|
4376
|
-
(a(!0), o(De, null, Ze(
|
|
4376
|
+
(a(!0), o(De, null, Ze(U.value, (O) => (a(), o("div", {
|
|
4377
4377
|
key: O.value,
|
|
4378
4378
|
class: "slider-tick",
|
|
4379
4379
|
style: je({ left: O.position + "%" })
|
|
@@ -4590,9 +4590,9 @@ const sl = {
|
|
|
4590
4590
|
const N = g.map((L) => L.value), y = [.../* @__PURE__ */ new Set([...t.modelValue, ...N])];
|
|
4591
4591
|
l("update:modelValue", y), l("change", y);
|
|
4592
4592
|
}
|
|
4593
|
-
}, D = (g) => {
|
|
4594
|
-
l("focus", g);
|
|
4595
4593
|
}, U = (g) => {
|
|
4594
|
+
l("focus", g);
|
|
4595
|
+
}, D = (g) => {
|
|
4596
4596
|
l("blur", g);
|
|
4597
4597
|
};
|
|
4598
4598
|
return (g, N) => (a(), o("div", {
|
|
@@ -4635,8 +4635,8 @@ const sl = {
|
|
|
4635
4635
|
indeterminate: h(y.value),
|
|
4636
4636
|
class: "checkbox-input",
|
|
4637
4637
|
onChange: (L) => S(y),
|
|
4638
|
-
onFocus:
|
|
4639
|
-
onBlur:
|
|
4638
|
+
onFocus: U,
|
|
4639
|
+
onBlur: D
|
|
4640
4640
|
}, null, 40, Pl),
|
|
4641
4641
|
e("div", jl, [
|
|
4642
4642
|
c(y.value) ? (a(), o("svg", Ol, [...N[0] || (N[0] = [
|
|
@@ -4805,7 +4805,7 @@ const sl = {
|
|
|
4805
4805
|
Pe(C.$slots, "default", {}, void 0, !0),
|
|
4806
4806
|
l.value ? (a(), o("div", fn, [
|
|
4807
4807
|
e("img", {
|
|
4808
|
-
src:
|
|
4808
|
+
src: i(vn),
|
|
4809
4809
|
alt: "Secured by Strands Services",
|
|
4810
4810
|
class: "secured-logo-image",
|
|
4811
4811
|
width: "91.2",
|
|
@@ -4948,7 +4948,7 @@ function Tt() {
|
|
|
4948
4948
|
default:
|
|
4949
4949
|
return "🔒";
|
|
4950
4950
|
}
|
|
4951
|
-
},
|
|
4951
|
+
}, U = (g) => {
|
|
4952
4952
|
switch (g) {
|
|
4953
4953
|
case "totp":
|
|
4954
4954
|
return "Authenticator App";
|
|
@@ -4961,7 +4961,7 @@ function Tt() {
|
|
|
4961
4961
|
default:
|
|
4962
4962
|
return "Unknown";
|
|
4963
4963
|
}
|
|
4964
|
-
},
|
|
4964
|
+
}, D = (g) => {
|
|
4965
4965
|
if (!g) return "Never";
|
|
4966
4966
|
const N = new Date(g), L = (/* @__PURE__ */ new Date()).getTime() - N.getTime(), F = Math.floor(L / (1e3 * 60 * 60 * 24));
|
|
4967
4967
|
return F === 0 ? "Today" : F === 1 ? "Yesterday" : F < 30 ? `${F} days ago` : N.toLocaleDateString();
|
|
@@ -4984,8 +4984,8 @@ function Tt() {
|
|
|
4984
4984
|
regenerateBackupCodes: u,
|
|
4985
4985
|
// Helper methods
|
|
4986
4986
|
getDeviceTypeIcon: m,
|
|
4987
|
-
getDeviceTypeName:
|
|
4988
|
-
formatLastUsed:
|
|
4987
|
+
getDeviceTypeName: U,
|
|
4988
|
+
formatLastUsed: D
|
|
4989
4989
|
};
|
|
4990
4990
|
}
|
|
4991
4991
|
const gn = { class: "accui-component-scope" }, Cn = { class: "mfa-verification-content" }, yn = {
|
|
@@ -5125,8 +5125,8 @@ const gn = { class: "accui-component-scope" }, Cn = { class: "mfa-verification-c
|
|
|
5125
5125
|
} = Tt(), {
|
|
5126
5126
|
verifyMfa: u,
|
|
5127
5127
|
sendMfaEmailCode: m,
|
|
5128
|
-
getMfaWebAuthnChallenge:
|
|
5129
|
-
mfaSessionId:
|
|
5128
|
+
getMfaWebAuthnChallenge: U,
|
|
5129
|
+
mfaSessionId: D,
|
|
5130
5130
|
loading: g,
|
|
5131
5131
|
loadingMessage: N,
|
|
5132
5132
|
isSendingMfaEmail: y,
|
|
@@ -5218,7 +5218,7 @@ const gn = { class: "accui-component-scope" }, Cn = { class: "mfa-verification-c
|
|
|
5218
5218
|
return V;
|
|
5219
5219
|
}
|
|
5220
5220
|
}, Ee = async () => {
|
|
5221
|
-
const $e = c.sessionId ||
|
|
5221
|
+
const $e = c.sessionId || D.value;
|
|
5222
5222
|
if (!k.value || k.value.device_type !== "hardware" && k.value.device_type !== "passkey" || !$e) {
|
|
5223
5223
|
h("error", "Missing requirements for hardware key authentication");
|
|
5224
5224
|
return;
|
|
@@ -5226,7 +5226,7 @@ const gn = { class: "accui-component-scope" }, Cn = { class: "mfa-verification-c
|
|
|
5226
5226
|
try {
|
|
5227
5227
|
if (!window.navigator.credentials || !window.PublicKeyCredential)
|
|
5228
5228
|
throw new Error("Hardware keys are not supported in this browser");
|
|
5229
|
-
const re = await
|
|
5229
|
+
const re = await U(k.value.id), ve = re.challenge.publicKey || re.challenge, Ie = (Ne) => {
|
|
5230
5230
|
if (!Ne || typeof Ne != "string")
|
|
5231
5231
|
return new Uint8Array(0);
|
|
5232
5232
|
const Oe = "=".repeat((4 - Ne.length % 4) % 4), gt = (Ne + Oe).replace(/-/g, "+").replace(/_/g, "/"), Be = window.atob(gt), Ht = new Uint8Array(Be.length);
|
|
@@ -5297,7 +5297,7 @@ const gn = { class: "accui-component-scope" }, Cn = { class: "mfa-verification-c
|
|
|
5297
5297
|
])]),
|
|
5298
5298
|
footer: _(() => [
|
|
5299
5299
|
e("div", Xn, [
|
|
5300
|
-
d(
|
|
5300
|
+
d(i(ue), {
|
|
5301
5301
|
variant: "secondary",
|
|
5302
5302
|
onClick: be,
|
|
5303
5303
|
disabled: F.value
|
|
@@ -5307,7 +5307,7 @@ const gn = { class: "accui-component-scope" }, Cn = { class: "mfa-verification-c
|
|
|
5307
5307
|
])]),
|
|
5308
5308
|
_: 1
|
|
5309
5309
|
}, 8, ["disabled"]),
|
|
5310
|
-
k.value && k.value.device_type !== "hardware" && k.value.device_type !== "passkey" && (k.value.device_type !== "email" || ce.value) || (k.value?.device_type === "hardware" || k.value?.device_type === "passkey") && ae.value ? (a(), ye(
|
|
5310
|
+
k.value && k.value.device_type !== "hardware" && k.value.device_type !== "passkey" && (k.value.device_type !== "email" || ce.value) || (k.value?.device_type === "hardware" || k.value?.device_type === "passkey") && ae.value ? (a(), ye(i(ue), {
|
|
5311
5311
|
key: 0,
|
|
5312
5312
|
variant: "primary",
|
|
5313
5313
|
onClick: re[5] || (re[5] = (ve) => ae.value ? _e() : le()),
|
|
@@ -5324,8 +5324,8 @@ const gn = { class: "accui-component-scope" }, Cn = { class: "mfa-verification-c
|
|
|
5324
5324
|
default: _(() => [
|
|
5325
5325
|
e("div", Cn, [
|
|
5326
5326
|
F.value && !ce.value ? (a(), o("div", yn, [
|
|
5327
|
-
d(
|
|
5328
|
-
e("span", kn, R(
|
|
5327
|
+
d(i(ht), { size: 24 }),
|
|
5328
|
+
e("span", kn, R(i(y) || i(L) ? i(N) : "Loading..."), 1)
|
|
5329
5329
|
])) : (a(), o("div", wn, [
|
|
5330
5330
|
Se.value.length > 1 ? (a(), o("div", bn, [
|
|
5331
5331
|
re[8] || (re[8] = e("p", { class: "mfa-methods-title" }, "Choose verification method:", -1)),
|
|
@@ -5344,7 +5344,7 @@ const gn = { class: "accui-component-scope" }, Cn = { class: "mfa-verification-c
|
|
|
5344
5344
|
})),
|
|
5345
5345
|
e("div", $n, [
|
|
5346
5346
|
e("p", Sn, R(ve.device_name), 1),
|
|
5347
|
-
e("p", An, R(
|
|
5347
|
+
e("p", An, R(i(S)(ve.device_type)), 1)
|
|
5348
5348
|
]),
|
|
5349
5349
|
k.value?.id === ve.id ? (a(), o("div", _n, [
|
|
5350
5350
|
d(C, { size: 20 })
|
|
@@ -5359,13 +5359,13 @@ const gn = { class: "accui-component-scope" }, Cn = { class: "mfa-verification-c
|
|
|
5359
5359
|
})),
|
|
5360
5360
|
e("div", null, [
|
|
5361
5361
|
e("h3", Vn, R(k.value.device_name), 1),
|
|
5362
|
-
e("p", In, R(
|
|
5362
|
+
e("p", In, R(i(S)(k.value.device_type)), 1)
|
|
5363
5363
|
])
|
|
5364
5364
|
])
|
|
5365
5365
|
])) : I("", !0),
|
|
5366
5366
|
k.value?.device_type === "email" && !ce.value ? (a(), o("div", Ln, [
|
|
5367
5367
|
re[10] || (re[10] = e("p", { class: "mfa-email-request-text" }, "Click below to receive your verification code", -1)),
|
|
5368
|
-
d(
|
|
5368
|
+
d(i(ue), {
|
|
5369
5369
|
variant: "primary",
|
|
5370
5370
|
onClick: te,
|
|
5371
5371
|
disabled: F.value,
|
|
@@ -5392,7 +5392,7 @@ const gn = { class: "accui-component-scope" }, Cn = { class: "mfa-verification-c
|
|
|
5392
5392
|
])
|
|
5393
5393
|
])
|
|
5394
5394
|
]),
|
|
5395
|
-
d(
|
|
5395
|
+
d(i(ue), {
|
|
5396
5396
|
variant: "primary",
|
|
5397
5397
|
onClick: Ee,
|
|
5398
5398
|
disabled: F.value,
|
|
@@ -5404,7 +5404,7 @@ const gn = { class: "accui-component-scope" }, Cn = { class: "mfa-verification-c
|
|
|
5404
5404
|
_: 1
|
|
5405
5405
|
}, 8, ["disabled", "loading"]),
|
|
5406
5406
|
e("div", jn, [
|
|
5407
|
-
d(
|
|
5407
|
+
d(i(ue), {
|
|
5408
5408
|
variant: "ghost",
|
|
5409
5409
|
size: "sm",
|
|
5410
5410
|
onClick: re[0] || (re[0] = (ve) => ae.value = !ae.value),
|
|
@@ -5431,7 +5431,7 @@ const gn = { class: "accui-component-scope" }, Cn = { class: "mfa-verification-c
|
|
|
5431
5431
|
e("p", { class: "mfa-backup-warning-description" }, " Enter one of your backup codes. Each code can only be used once. ")
|
|
5432
5432
|
], -1))
|
|
5433
5433
|
]),
|
|
5434
|
-
d(
|
|
5434
|
+
d(i(Fe), {
|
|
5435
5435
|
modelValue: b.value,
|
|
5436
5436
|
"onUpdate:modelValue": re[1] || (re[1] = (ve) => b.value = ve),
|
|
5437
5437
|
label: "Backup Code",
|
|
@@ -5470,7 +5470,7 @@ const gn = { class: "accui-component-scope" }, Cn = { class: "mfa-verification-c
|
|
|
5470
5470
|
], -1))
|
|
5471
5471
|
])
|
|
5472
5472
|
])) : I("", !0),
|
|
5473
|
-
d(
|
|
5473
|
+
d(i(Fe), {
|
|
5474
5474
|
modelValue: O.value,
|
|
5475
5475
|
"onUpdate:modelValue": re[2] || (re[2] = (ve) => O.value = ve),
|
|
5476
5476
|
type: "pincode",
|
|
@@ -5492,7 +5492,7 @@ const gn = { class: "accui-component-scope" }, Cn = { class: "mfa-verification-c
|
|
|
5492
5492
|
e("span", Kn, '"' + R(k.value.device_name) + '"', 1)
|
|
5493
5493
|
])) : I("", !0),
|
|
5494
5494
|
k.value.device_type === "email" ? (a(), o("div", Gn, [
|
|
5495
|
-
d(
|
|
5495
|
+
d(i(ue), {
|
|
5496
5496
|
variant: "ghost",
|
|
5497
5497
|
size: "sm",
|
|
5498
5498
|
onClick: te,
|
|
@@ -5506,7 +5506,7 @@ const gn = { class: "accui-component-scope" }, Cn = { class: "mfa-verification-c
|
|
|
5506
5506
|
}, 8, ["disabled"])
|
|
5507
5507
|
])) : I("", !0),
|
|
5508
5508
|
e("div", Yn, [
|
|
5509
|
-
d(
|
|
5509
|
+
d(i(ue), {
|
|
5510
5510
|
variant: "ghost",
|
|
5511
5511
|
size: "sm",
|
|
5512
5512
|
onClick: re[3] || (re[3] = (ve) => ae.value = !ae.value),
|
|
@@ -5533,7 +5533,7 @@ const gn = { class: "accui-component-scope" }, Cn = { class: "mfa-verification-c
|
|
|
5533
5533
|
e("p", { class: "mfa-backup-warning-description" }, " Enter one of your backup codes. Each code can only be used once. ")
|
|
5534
5534
|
], -1))
|
|
5535
5535
|
]),
|
|
5536
|
-
d(
|
|
5536
|
+
d(i(Fe), {
|
|
5537
5537
|
modelValue: b.value,
|
|
5538
5538
|
"onUpdate:modelValue": re[4] || (re[4] = (ve) => b.value = ve),
|
|
5539
5539
|
label: "Backup Code",
|
|
@@ -5570,14 +5570,14 @@ function za(s = {}) {
|
|
|
5570
5570
|
return l.value = m.data, m.data;
|
|
5571
5571
|
z.value = !0, V.value = null;
|
|
5572
5572
|
try {
|
|
5573
|
-
let
|
|
5574
|
-
const
|
|
5575
|
-
if (
|
|
5573
|
+
let U = r("oauthProviders");
|
|
5574
|
+
const D = s.redirectUrl || t.value?.oauth2RedirectUrl;
|
|
5575
|
+
if (D) {
|
|
5576
5576
|
const y = new URLSearchParams();
|
|
5577
|
-
let L =
|
|
5578
|
-
|
|
5577
|
+
let L = D;
|
|
5578
|
+
D.startsWith("/") && (L = `${window.location.origin}${D}`), y.append("redirect_url", L), U = `${U}?${y.toString()}`;
|
|
5579
5579
|
}
|
|
5580
|
-
const g = await fetch(
|
|
5580
|
+
const g = await fetch(U, {
|
|
5581
5581
|
method: "GET",
|
|
5582
5582
|
headers: {
|
|
5583
5583
|
"Content-Type": "application/json"
|
|
@@ -5592,20 +5592,20 @@ function za(s = {}) {
|
|
|
5592
5592
|
data: l.value,
|
|
5593
5593
|
timestamp: Date.now()
|
|
5594
5594
|
});
|
|
5595
|
-
} catch (
|
|
5596
|
-
const
|
|
5597
|
-
V.value =
|
|
5595
|
+
} catch (U) {
|
|
5596
|
+
const D = U instanceof Error ? U.message : "Failed to fetch OAuth providers";
|
|
5597
|
+
V.value = D;
|
|
5598
5598
|
} finally {
|
|
5599
5599
|
z.value = !1;
|
|
5600
5600
|
}
|
|
5601
5601
|
}, c = async (u, m) => {
|
|
5602
|
-
const
|
|
5603
|
-
if (
|
|
5604
|
-
let L =
|
|
5605
|
-
|
|
5602
|
+
const U = { ...s, ...m }, D = new URLSearchParams();
|
|
5603
|
+
if (U.redirectUrl) {
|
|
5604
|
+
let L = U.redirectUrl;
|
|
5605
|
+
U.redirectUrl.startsWith("/") && (L = `${window.location.origin}${U.redirectUrl}`), D.append("redirect_url", L);
|
|
5606
5606
|
}
|
|
5607
|
-
|
|
5608
|
-
const g =
|
|
5607
|
+
U.scopes && U.scopes.length > 0 && D.append("scopes", U.scopes.join(","));
|
|
5608
|
+
const g = D.toString(), N = r("oauthProvider").replace("{provider_id}", u), y = g ? `${N}?${g}` : N;
|
|
5609
5609
|
try {
|
|
5610
5610
|
const L = await fetch(y, {
|
|
5611
5611
|
method: "GET",
|
|
@@ -5627,14 +5627,14 @@ function za(s = {}) {
|
|
|
5627
5627
|
}
|
|
5628
5628
|
}, h = async (u, m) => {
|
|
5629
5629
|
try {
|
|
5630
|
-
const
|
|
5631
|
-
if (!
|
|
5630
|
+
const U = l.value.find((D) => D.id === u);
|
|
5631
|
+
if (!U)
|
|
5632
5632
|
throw new Error(`OAuth provider '${u}' not found`);
|
|
5633
|
-
if (!
|
|
5633
|
+
if (!U.auth_url)
|
|
5634
5634
|
throw new Error(`No auth URL configured for provider '${u}'`);
|
|
5635
|
-
window.location.href =
|
|
5636
|
-
} catch (
|
|
5637
|
-
throw V.value =
|
|
5635
|
+
window.location.href = U.auth_url;
|
|
5636
|
+
} catch (U) {
|
|
5637
|
+
throw V.value = U instanceof Error ? U.message : "Failed to redirect to OAuth provider", U;
|
|
5638
5638
|
}
|
|
5639
5639
|
}, x = (u) => l.value.find((m) => m.id === u), S = (u) => {
|
|
5640
5640
|
if (u.iconUrl)
|
|
@@ -5822,13 +5822,13 @@ const ti = {
|
|
|
5822
5822
|
} = ft(), {
|
|
5823
5823
|
enabledProviders: u,
|
|
5824
5824
|
loading: m,
|
|
5825
|
-
fetchProviders:
|
|
5826
|
-
redirectToProvider:
|
|
5825
|
+
fetchProviders: U,
|
|
5826
|
+
redirectToProvider: D
|
|
5827
5827
|
} = za({
|
|
5828
5828
|
redirectUrl: t.redirectUrl
|
|
5829
5829
|
});
|
|
5830
5830
|
Ye(() => {
|
|
5831
|
-
|
|
5831
|
+
U().catch((te) => {
|
|
5832
5832
|
});
|
|
5833
5833
|
});
|
|
5834
5834
|
const g = H(() => u.value), N = {
|
|
@@ -5907,7 +5907,7 @@ const ti = {
|
|
|
5907
5907
|
}
|
|
5908
5908
|
}, Ae = async (te) => {
|
|
5909
5909
|
try {
|
|
5910
|
-
await
|
|
5910
|
+
await D(te, {
|
|
5911
5911
|
redirectUrl: t.redirectUrl
|
|
5912
5912
|
});
|
|
5913
5913
|
} catch (Y) {
|
|
@@ -5952,7 +5952,7 @@ const ti = {
|
|
|
5952
5952
|
Y.style.height = "", Y.style.opacity = "", Y.style.margin = "", Y.style.padding = "", Y.style.transition = "", Y.style.overflow = "";
|
|
5953
5953
|
};
|
|
5954
5954
|
return (te, Y) => (a(), o(De, null, [
|
|
5955
|
-
d(
|
|
5955
|
+
d(i(_t), {
|
|
5956
5956
|
variant: t.inModal ? "simple" : "modern",
|
|
5957
5957
|
color: t.inModal ? "default" : "secondary",
|
|
5958
5958
|
padding: "sm",
|
|
@@ -6005,7 +6005,7 @@ const ti = {
|
|
|
6005
6005
|
}, {
|
|
6006
6006
|
default: _(() => [
|
|
6007
6007
|
b.value ? I("", !0) : (a(), o("div", di, [
|
|
6008
|
-
d(
|
|
6008
|
+
d(i(Oa), {
|
|
6009
6009
|
modelValue: y.value,
|
|
6010
6010
|
"onUpdate:modelValue": Y[0] || (Y[0] = (le) => y.value = le),
|
|
6011
6011
|
"underline-width": "50%",
|
|
@@ -6028,11 +6028,11 @@ const ti = {
|
|
|
6028
6028
|
}, {
|
|
6029
6029
|
default: _(() => [
|
|
6030
6030
|
!b.value && g.value?.length ? (a(), o("div", vi, [
|
|
6031
|
-
(a(!0), o(De, null, Ze(g.value, (le) => (a(), ye(
|
|
6031
|
+
(a(!0), o(De, null, Ze(g.value, (le) => (a(), ye(i(ue), {
|
|
6032
6032
|
key: le.id,
|
|
6033
6033
|
variant: "outline",
|
|
6034
6034
|
"full-width": "",
|
|
6035
|
-
disabled:
|
|
6035
|
+
disabled: i(m),
|
|
6036
6036
|
onClick: (_e) => Ae(le.id),
|
|
6037
6037
|
class: "auth-oauth-button"
|
|
6038
6038
|
}, {
|
|
@@ -6100,7 +6100,7 @@ const ti = {
|
|
|
6100
6100
|
e("div", {
|
|
6101
6101
|
class: Me(["email-field-spacing", !b.value && !q.value ? "has-password" : "no-password"])
|
|
6102
6102
|
}, [
|
|
6103
|
-
d(
|
|
6103
|
+
d(i(Fe), {
|
|
6104
6104
|
modelValue: O.email,
|
|
6105
6105
|
"onUpdate:modelValue": Y[1] || (Y[1] = (le) => O.email = le),
|
|
6106
6106
|
type: "email",
|
|
@@ -6121,7 +6121,7 @@ const ti = {
|
|
|
6121
6121
|
}, {
|
|
6122
6122
|
default: _(() => [
|
|
6123
6123
|
!b.value && !q.value ? (a(), o("div", Mi, [
|
|
6124
|
-
d(
|
|
6124
|
+
d(i(Fe), {
|
|
6125
6125
|
modelValue: O.password,
|
|
6126
6126
|
"onUpdate:modelValue": Y[3] || (Y[3] = (le) => O.password = le),
|
|
6127
6127
|
type: "password",
|
|
@@ -6132,7 +6132,7 @@ const ti = {
|
|
|
6132
6132
|
error: F.value && !O.password ? "Password is required" : ""
|
|
6133
6133
|
}, {
|
|
6134
6134
|
hint: _(() => [
|
|
6135
|
-
d(
|
|
6135
|
+
d(i(mt), {
|
|
6136
6136
|
variant: "primary",
|
|
6137
6137
|
size: "sm",
|
|
6138
6138
|
onClick: Y[2] || (Y[2] = (le) => y.value = "reset-password")
|
|
@@ -6150,13 +6150,13 @@ const ti = {
|
|
|
6150
6150
|
_: 1
|
|
6151
6151
|
})
|
|
6152
6152
|
]),
|
|
6153
|
-
d(
|
|
6153
|
+
d(i(ue), {
|
|
6154
6154
|
type: "submit",
|
|
6155
6155
|
variant: "primary",
|
|
6156
6156
|
"full-width": "",
|
|
6157
6157
|
disabled: L.value || !T.value,
|
|
6158
6158
|
loading: L.value,
|
|
6159
|
-
"loading-text":
|
|
6159
|
+
"loading-text": i(S)
|
|
6160
6160
|
}, {
|
|
6161
6161
|
default: _(() => [
|
|
6162
6162
|
J(R(b.value ? $.value ? "Link sent!" : "Send reset link" : q.value ? "Send magic link" : "Sign in"), 1)
|
|
@@ -6169,7 +6169,7 @@ const ti = {
|
|
|
6169
6169
|
mode: "out-in"
|
|
6170
6170
|
}, {
|
|
6171
6171
|
default: _(() => [
|
|
6172
|
-
b.value && $.value ? (a(), ye(
|
|
6172
|
+
b.value && $.value ? (a(), ye(i(Et), {
|
|
6173
6173
|
key: "reset-success",
|
|
6174
6174
|
variant: "success",
|
|
6175
6175
|
message: `Check your email - We've sent a password reset link to ${O.email}`,
|
|
@@ -6188,7 +6188,7 @@ const ti = {
|
|
|
6188
6188
|
}, {
|
|
6189
6189
|
default: _(() => [
|
|
6190
6190
|
b.value ? (a(), o("div", xi, [
|
|
6191
|
-
d(
|
|
6191
|
+
d(i(mt), {
|
|
6192
6192
|
onClick: Y[4] || (Y[4] = (le) => y.value = "signin"),
|
|
6193
6193
|
class: "auth-back-link"
|
|
6194
6194
|
}, {
|
|
@@ -6214,7 +6214,7 @@ const ti = {
|
|
|
6214
6214
|
]),
|
|
6215
6215
|
_: 1
|
|
6216
6216
|
}),
|
|
6217
|
-
F.value ? (a(), ye(
|
|
6217
|
+
F.value ? (a(), ye(i(Et), {
|
|
6218
6218
|
key: 1,
|
|
6219
6219
|
variant: "error",
|
|
6220
6220
|
message: F.value,
|
|
@@ -6226,16 +6226,16 @@ const ti = {
|
|
|
6226
6226
|
config: t.config
|
|
6227
6227
|
}, {
|
|
6228
6228
|
default: _(() => [
|
|
6229
|
-
|
|
6229
|
+
i(V)() ? (a(), ye(rt, {
|
|
6230
6230
|
key: 0,
|
|
6231
6231
|
name: "support-fade"
|
|
6232
6232
|
}, {
|
|
6233
6233
|
default: _(() => [
|
|
6234
6234
|
e("p", $i, [
|
|
6235
6235
|
Y[12] || (Y[12] = J(" Need help? ", -1)),
|
|
6236
|
-
d(
|
|
6236
|
+
d(i(mt), {
|
|
6237
6237
|
variant: "primary",
|
|
6238
|
-
href: `mailto:${
|
|
6238
|
+
href: `mailto:${i(V)()}`
|
|
6239
6239
|
}, {
|
|
6240
6240
|
default: _(() => [...Y[11] || (Y[11] = [
|
|
6241
6241
|
J(" Contact Support ", -1)
|
|
@@ -6255,7 +6255,7 @@ const ti = {
|
|
|
6255
6255
|
}, 8, ["variant", "color", "class"]),
|
|
6256
6256
|
d(Za, {
|
|
6257
6257
|
show: k.value,
|
|
6258
|
-
"available-mfa-methods":
|
|
6258
|
+
"available-mfa-methods": i(h),
|
|
6259
6259
|
onSuccess: ae,
|
|
6260
6260
|
onClose: ce,
|
|
6261
6261
|
onError: Ce
|
|
@@ -6341,7 +6341,7 @@ const ti = {
|
|
|
6341
6341
|
console.warn("Failed to fetch OAuth providers:", O);
|
|
6342
6342
|
});
|
|
6343
6343
|
});
|
|
6344
|
-
const
|
|
6344
|
+
const U = H(() => c.value), D = M(""), g = M(!1);
|
|
6345
6345
|
Le(V, (O) => {
|
|
6346
6346
|
O && (g.value = !0);
|
|
6347
6347
|
});
|
|
@@ -6349,7 +6349,7 @@ const ti = {
|
|
|
6349
6349
|
email: "",
|
|
6350
6350
|
password: ""
|
|
6351
6351
|
}), y = async () => {
|
|
6352
|
-
|
|
6352
|
+
D.value = "";
|
|
6353
6353
|
try {
|
|
6354
6354
|
const O = await z({
|
|
6355
6355
|
email: N.email,
|
|
@@ -6362,7 +6362,7 @@ const ti = {
|
|
|
6362
6362
|
}
|
|
6363
6363
|
} catch (O) {
|
|
6364
6364
|
const q = O instanceof Error ? O.message : "Sign in failed";
|
|
6365
|
-
|
|
6365
|
+
D.value = q, l("error", q);
|
|
6366
6366
|
}
|
|
6367
6367
|
}, L = () => {
|
|
6368
6368
|
g.value = !1, l("success", h.value);
|
|
@@ -6371,7 +6371,7 @@ const ti = {
|
|
|
6371
6371
|
}, F = () => {
|
|
6372
6372
|
g.value = !1;
|
|
6373
6373
|
}, $ = (O) => {
|
|
6374
|
-
|
|
6374
|
+
D.value = O, l("error", O);
|
|
6375
6375
|
}, k = async (O) => {
|
|
6376
6376
|
try {
|
|
6377
6377
|
await m(O, {
|
|
@@ -6380,7 +6380,7 @@ const ti = {
|
|
|
6380
6380
|
});
|
|
6381
6381
|
} catch (q) {
|
|
6382
6382
|
const b = q instanceof Error ? q.message : `Failed to sign in with ${O}`;
|
|
6383
|
-
|
|
6383
|
+
D.value = b, l("error", b);
|
|
6384
6384
|
}
|
|
6385
6385
|
};
|
|
6386
6386
|
return (O, q) => (a(), o("div", Ii, [
|
|
@@ -6399,15 +6399,15 @@ const ti = {
|
|
|
6399
6399
|
J("to continue ")
|
|
6400
6400
|
])
|
|
6401
6401
|
], -1)),
|
|
6402
|
-
|
|
6403
|
-
(a(!0), o(De, null, Ze(
|
|
6404
|
-
const Ce = [b.id, b.name, b.displayName,
|
|
6402
|
+
i(x)?.length ? (a(), o("div", Di, [
|
|
6403
|
+
(a(!0), o(De, null, Ze(i(x), (b, T, ae, ce) => {
|
|
6404
|
+
const Ce = [b.id, b.name, b.displayName, i(S)];
|
|
6405
6405
|
if (ce && ce.key === b.id && as(ce, Ce)) return ce;
|
|
6406
|
-
const xe = (a(), ye(
|
|
6406
|
+
const xe = (a(), ye(i(ue), {
|
|
6407
6407
|
key: b.id,
|
|
6408
6408
|
variant: "outline",
|
|
6409
6409
|
"full-width": "",
|
|
6410
|
-
disabled:
|
|
6410
|
+
disabled: i(S),
|
|
6411
6411
|
onClick: (Ae) => k(b.id),
|
|
6412
6412
|
class: "btn-oauth accui-group"
|
|
6413
6413
|
}, {
|
|
@@ -6421,7 +6421,7 @@ const ti = {
|
|
|
6421
6421
|
width: "20",
|
|
6422
6422
|
height: "20"
|
|
6423
6423
|
}, null, 8, Pi)
|
|
6424
|
-
])) : b.id === "google" ? (a(), ye(
|
|
6424
|
+
])) : b.id === "google" ? (a(), ye(i(Ti), { key: 1 })) : b.id === "github" ? (a(), ye(i(Vi), { key: 2 })) : (a(), o("div", ji, [
|
|
6425
6425
|
e("span", Oi, R((b.displayName || b.name).charAt(0).toUpperCase()), 1)
|
|
6426
6426
|
]))
|
|
6427
6427
|
]),
|
|
@@ -6432,7 +6432,7 @@ const ti = {
|
|
|
6432
6432
|
return xe.memo = Ce, xe;
|
|
6433
6433
|
}, q, 0), 128))
|
|
6434
6434
|
])) : I("", !0),
|
|
6435
|
-
|
|
6435
|
+
i(x)?.length ? (a(), o("div", Fi, [...q[7] || (q[7] = [
|
|
6436
6436
|
e("span", { class: "divider-text" }, "Or sign in with email", -1)
|
|
6437
6437
|
])])) : I("", !0),
|
|
6438
6438
|
e("form", {
|
|
@@ -6490,12 +6490,12 @@ const ti = {
|
|
|
6490
6490
|
])
|
|
6491
6491
|
])
|
|
6492
6492
|
]),
|
|
6493
|
-
d(
|
|
6493
|
+
d(i(ue), {
|
|
6494
6494
|
type: "submit",
|
|
6495
6495
|
variant: "primary",
|
|
6496
6496
|
"full-width": "",
|
|
6497
|
-
disabled:
|
|
6498
|
-
loading:
|
|
6497
|
+
disabled: U.value || !N.email || !N.password,
|
|
6498
|
+
loading: U.value,
|
|
6499
6499
|
"loading-text": "Signing in...",
|
|
6500
6500
|
class: "accui-auth-submit"
|
|
6501
6501
|
}, {
|
|
@@ -6505,18 +6505,18 @@ const ti = {
|
|
|
6505
6505
|
_: 1
|
|
6506
6506
|
}, 8, ["disabled", "loading"])
|
|
6507
6507
|
], 32),
|
|
6508
|
-
|
|
6508
|
+
D.value ? (a(), ye(i(Et), {
|
|
6509
6509
|
key: 2,
|
|
6510
6510
|
variant: "error",
|
|
6511
|
-
message:
|
|
6511
|
+
message: D.value,
|
|
6512
6512
|
class: "accui-mt-4 accui-animate-fade-in",
|
|
6513
6513
|
dismissible: "",
|
|
6514
|
-
onDismiss: q[4] || (q[4] = (b) =>
|
|
6514
|
+
onDismiss: q[4] || (q[4] = (b) => D.value = "")
|
|
6515
6515
|
}, null, 8, ["message"])) : I("", !0),
|
|
6516
6516
|
e("div", Yi, [
|
|
6517
6517
|
e("p", Wi, [
|
|
6518
6518
|
q[14] || (q[14] = J(" Don't have an account? ", -1)),
|
|
6519
|
-
d(
|
|
6519
|
+
d(i(mt), {
|
|
6520
6520
|
onClick: q[5] || (q[5] = (b) => O.$emit("switch-to-signup")),
|
|
6521
6521
|
class: "accui-text-primary"
|
|
6522
6522
|
}, {
|
|
@@ -6526,7 +6526,7 @@ const ti = {
|
|
|
6526
6526
|
_: 1
|
|
6527
6527
|
})
|
|
6528
6528
|
]),
|
|
6529
|
-
d(
|
|
6529
|
+
d(i(mt), {
|
|
6530
6530
|
onClick: q[6] || (q[6] = (b) => O.$emit("forgot-password")),
|
|
6531
6531
|
class: "accui-auth-link-text accui-mt-2 accui-block"
|
|
6532
6532
|
}, {
|
|
@@ -6540,8 +6540,8 @@ const ti = {
|
|
|
6540
6540
|
]),
|
|
6541
6541
|
d(Za, {
|
|
6542
6542
|
show: g.value,
|
|
6543
|
-
"available-mfa-methods":
|
|
6544
|
-
"session-id":
|
|
6543
|
+
"available-mfa-methods": i(w),
|
|
6544
|
+
"session-id": i(C),
|
|
6545
6545
|
onSuccess: L,
|
|
6546
6546
|
onClose: F,
|
|
6547
6547
|
onError: $
|
|
@@ -6604,7 +6604,7 @@ const ti = {
|
|
|
6604
6604
|
console.warn("Failed to fetch OAuth providers:", F);
|
|
6605
6605
|
});
|
|
6606
6606
|
});
|
|
6607
|
-
const x = M(!1), S = M(""), u = M(!1), m = M(""),
|
|
6607
|
+
const x = M(!1), S = M(""), u = M(!1), m = M(""), U = M("Magic Link Sent!"), D = M(""), g = Ge({
|
|
6608
6608
|
email: ""
|
|
6609
6609
|
});
|
|
6610
6610
|
H(() => g.email.trim() && g.email.includes("@"));
|
|
@@ -6631,7 +6631,7 @@ const ti = {
|
|
|
6631
6631
|
throw new Error(O);
|
|
6632
6632
|
}
|
|
6633
6633
|
const k = await $.json();
|
|
6634
|
-
u.value = !0,
|
|
6634
|
+
u.value = !0, D.value = g.email, m.value = k.message || "Magic link sent! Check your email.", k.message && (k.message.includes("already have an account") || k.message.includes("Welcome back") ? U.value = "Welcome Back!" : k.message.includes("Magic link sent") || k.message.includes("Check your email") ? U.value = "Magic Link Sent!" : U.value = "Success!"), l("success", {
|
|
6635
6635
|
email: g.email,
|
|
6636
6636
|
message: k.message || "Magic link sent! Check your email."
|
|
6637
6637
|
});
|
|
@@ -6650,7 +6650,7 @@ const ti = {
|
|
|
6650
6650
|
x.value = !1;
|
|
6651
6651
|
}
|
|
6652
6652
|
}, y = () => {
|
|
6653
|
-
u.value = !1, m.value = "",
|
|
6653
|
+
u.value = !1, m.value = "", U.value = "Magic Link Sent!", D.value = "", g.email = "", S.value = "";
|
|
6654
6654
|
}, L = async (F) => {
|
|
6655
6655
|
try {
|
|
6656
6656
|
await h(F, {
|
|
@@ -6671,13 +6671,13 @@ const ti = {
|
|
|
6671
6671
|
e("div", ar, [
|
|
6672
6672
|
e("div", sr, [
|
|
6673
6673
|
$[4] || ($[4] = e("div", { class: "signup-success-icon" }, "📧", -1)),
|
|
6674
|
-
e("h1", or, R(
|
|
6674
|
+
e("h1", or, R(U.value), 1),
|
|
6675
6675
|
e("p", lr, R(m.value), 1),
|
|
6676
|
-
|
|
6677
|
-
e("strong", null, R(
|
|
6676
|
+
D.value ? (a(), o("div", nr, [
|
|
6677
|
+
e("strong", null, R(D.value), 1)
|
|
6678
6678
|
])) : I("", !0),
|
|
6679
6679
|
$[5] || ($[5] = e("p", { class: "signup-success-instructions" }, " Click the link in your email to complete your account setup. The link will expire in 24 hours. ", -1)),
|
|
6680
|
-
d(
|
|
6680
|
+
d(i(ue), {
|
|
6681
6681
|
variant: "outline",
|
|
6682
6682
|
"full-width": "",
|
|
6683
6683
|
onClick: y,
|
|
@@ -6704,12 +6704,12 @@ const ti = {
|
|
|
6704
6704
|
J("We'll send you a magic link to get started ")
|
|
6705
6705
|
])
|
|
6706
6706
|
], -1)),
|
|
6707
|
-
|
|
6708
|
-
(a(!0), o(De, null, Ze(
|
|
6707
|
+
i(C)?.length ? (a(), o("div", ur, [
|
|
6708
|
+
(a(!0), o(De, null, Ze(i(C), (k) => (a(), ye(i(ue), {
|
|
6709
6709
|
key: k.id,
|
|
6710
6710
|
variant: "outline",
|
|
6711
6711
|
"full-width": "",
|
|
6712
|
-
disabled:
|
|
6712
|
+
disabled: i(w),
|
|
6713
6713
|
onClick: (O) => L(k.id),
|
|
6714
6714
|
class: "btn-oauth group"
|
|
6715
6715
|
}, {
|
|
@@ -6751,7 +6751,7 @@ const ti = {
|
|
|
6751
6751
|
_: 2
|
|
6752
6752
|
}, 1032, ["disabled", "onClick"]))), 128))
|
|
6753
6753
|
])) : I("", !0),
|
|
6754
|
-
|
|
6754
|
+
i(C)?.length ? (a(), o("div", yr, [...$[8] || ($[8] = [
|
|
6755
6755
|
e("span", { class: "divider-text" }, "Or create account with email", -1)
|
|
6756
6756
|
])])) : I("", !0),
|
|
6757
6757
|
e("form", {
|
|
@@ -6782,7 +6782,7 @@ const ti = {
|
|
|
6782
6782
|
])
|
|
6783
6783
|
])
|
|
6784
6784
|
]),
|
|
6785
|
-
d(
|
|
6785
|
+
d(i(ue), {
|
|
6786
6786
|
type: "submit",
|
|
6787
6787
|
variant: "primary",
|
|
6788
6788
|
"full-width": "",
|
|
@@ -6818,7 +6818,7 @@ const ti = {
|
|
|
6818
6818
|
e("div", Sr, [
|
|
6819
6819
|
e("p", Ar, [
|
|
6820
6820
|
$[14] || ($[14] = J(" Already have an account? ", -1)),
|
|
6821
|
-
d(
|
|
6821
|
+
d(i(mt), {
|
|
6822
6822
|
variant: "primary",
|
|
6823
6823
|
onClick: $[1] || ($[1] = (k) => F.$emit("switch-to-signin")),
|
|
6824
6824
|
class: "signup-signin-link"
|
|
@@ -6833,7 +6833,7 @@ const ti = {
|
|
|
6833
6833
|
e("div", _r, [
|
|
6834
6834
|
e("p", Tr, [
|
|
6835
6835
|
$[16] || ($[16] = J(" Already have an account? ", -1)),
|
|
6836
|
-
d(
|
|
6836
|
+
d(i(mt), {
|
|
6837
6837
|
onClick: $[2] || ($[2] = (k) => F.$emit("switch-to-signin")),
|
|
6838
6838
|
class: "accui-text-primary"
|
|
6839
6839
|
}, {
|
|
@@ -6884,7 +6884,7 @@ const ti = {
|
|
|
6884
6884
|
firstName: "",
|
|
6885
6885
|
lastName: "",
|
|
6886
6886
|
password: ""
|
|
6887
|
-
}),
|
|
6887
|
+
}), U = H(() => {
|
|
6888
6888
|
const y = u.password.trim(), L = u.password.length >= 8, F = !!t.token;
|
|
6889
6889
|
return y && L && F;
|
|
6890
6890
|
});
|
|
@@ -6894,7 +6894,7 @@ const ti = {
|
|
|
6894
6894
|
y && y.length < 8 ? m.password = "Password must be at least 8 characters long" : m.password = "";
|
|
6895
6895
|
}
|
|
6896
6896
|
);
|
|
6897
|
-
const
|
|
6897
|
+
const D = H(() => t.redirectUrl || window.location.origin);
|
|
6898
6898
|
Ye(() => {
|
|
6899
6899
|
if (t.token)
|
|
6900
6900
|
try {
|
|
@@ -6908,7 +6908,7 @@ const ti = {
|
|
|
6908
6908
|
}
|
|
6909
6909
|
});
|
|
6910
6910
|
const g = () => {
|
|
6911
|
-
|
|
6911
|
+
D.value && (window.location.href = D.value);
|
|
6912
6912
|
}, N = async () => {
|
|
6913
6913
|
if (!t.token) {
|
|
6914
6914
|
x.value = "Registration token is required";
|
|
@@ -6916,7 +6916,7 @@ const ti = {
|
|
|
6916
6916
|
}
|
|
6917
6917
|
if (x.value = "", Object.keys(m).forEach((y) => {
|
|
6918
6918
|
m[y] = "";
|
|
6919
|
-
}), !
|
|
6919
|
+
}), !U.value) {
|
|
6920
6920
|
x.value = "Please fill in all required fields correctly";
|
|
6921
6921
|
return;
|
|
6922
6922
|
}
|
|
@@ -6952,14 +6952,14 @@ const ti = {
|
|
|
6952
6952
|
};
|
|
6953
6953
|
return (y, L) => (a(), o("div", Vr, [
|
|
6954
6954
|
w.value ? (a(), o("div", Ir, [
|
|
6955
|
-
d(
|
|
6955
|
+
d(i(_t), { variant: "modern" }, {
|
|
6956
6956
|
default: _(() => [
|
|
6957
6957
|
e("div", Lr, [
|
|
6958
6958
|
L[7] || (L[7] = e("div", { class: "complete-signup-success-icon" }, "🎉", -1)),
|
|
6959
6959
|
L[8] || (L[8] = e("h1", { class: "complete-signup-success-title" }, "Welcome to Strands!", -1)),
|
|
6960
6960
|
L[9] || (L[9] = e("p", { class: "complete-signup-success-message" }, " Your account has been created successfully. ", -1)),
|
|
6961
6961
|
L[10] || (L[10] = e("p", { class: "complete-signup-success-instructions" }, " You are now signed in and can access your dashboard. ", -1)),
|
|
6962
|
-
d(
|
|
6962
|
+
d(i(ue), {
|
|
6963
6963
|
variant: "primary",
|
|
6964
6964
|
"full-width": "",
|
|
6965
6965
|
onClick: g
|
|
@@ -6975,14 +6975,14 @@ const ti = {
|
|
|
6975
6975
|
_: 1
|
|
6976
6976
|
})
|
|
6977
6977
|
])) : c.value ? (a(), o("div", Er, [
|
|
6978
|
-
d(
|
|
6978
|
+
d(i(_t), { variant: "modern" }, {
|
|
6979
6979
|
default: _(() => [
|
|
6980
6980
|
e("div", Hr, [
|
|
6981
6981
|
L[12] || (L[12] = e("div", { class: "complete-signup-error-icon" }, "❌", -1)),
|
|
6982
6982
|
L[13] || (L[13] = e("h1", { class: "complete-signup-error-title" }, "Invalid Link", -1)),
|
|
6983
6983
|
L[14] || (L[14] = e("p", { class: "complete-signup-error-message" }, " This registration link is invalid or has expired. ", -1)),
|
|
6984
6984
|
L[15] || (L[15] = e("p", { class: "complete-signup-error-instructions" }, " Please request a new magic link to complete your registration. ", -1)),
|
|
6985
|
-
d(
|
|
6985
|
+
d(i(ue), {
|
|
6986
6986
|
variant: "primary",
|
|
6987
6987
|
"full-width": "",
|
|
6988
6988
|
onClick: L[0] || (L[0] = (F) => y.$emit("request-new-link"))
|
|
@@ -6998,7 +6998,7 @@ const ti = {
|
|
|
6998
6998
|
_: 1
|
|
6999
6999
|
})
|
|
7000
7000
|
])) : s.token ? (a(), o("div", Ur, [
|
|
7001
|
-
d(
|
|
7001
|
+
d(i(_t), { variant: "modern" }, {
|
|
7002
7002
|
default: _(() => [
|
|
7003
7003
|
e("div", Dr, [
|
|
7004
7004
|
L[17] || (L[17] = e("h1", { class: "complete-signup-title" }, "Complete Your Registration", -1)),
|
|
@@ -7015,7 +7015,7 @@ const ti = {
|
|
|
7015
7015
|
class: "complete-signup-form"
|
|
7016
7016
|
}, [
|
|
7017
7017
|
e("div", null, [
|
|
7018
|
-
d(
|
|
7018
|
+
d(i(Fe), {
|
|
7019
7019
|
id: "firstName",
|
|
7020
7020
|
modelValue: u.firstName,
|
|
7021
7021
|
"onUpdate:modelValue": L[1] || (L[1] = (F) => u.firstName = F),
|
|
@@ -7027,7 +7027,7 @@ const ti = {
|
|
|
7027
7027
|
}, null, 8, ["modelValue", "error"])
|
|
7028
7028
|
]),
|
|
7029
7029
|
e("div", null, [
|
|
7030
|
-
d(
|
|
7030
|
+
d(i(Fe), {
|
|
7031
7031
|
id: "lastName",
|
|
7032
7032
|
modelValue: u.lastName,
|
|
7033
7033
|
"onUpdate:modelValue": L[2] || (L[2] = (F) => u.lastName = F),
|
|
@@ -7039,7 +7039,7 @@ const ti = {
|
|
|
7039
7039
|
}, null, 8, ["modelValue", "error"])
|
|
7040
7040
|
]),
|
|
7041
7041
|
e("div", null, [
|
|
7042
|
-
d(
|
|
7042
|
+
d(i(Fe), {
|
|
7043
7043
|
id: "password",
|
|
7044
7044
|
modelValue: u.password,
|
|
7045
7045
|
"onUpdate:modelValue": L[3] || (L[3] = (F) => u.password = F),
|
|
@@ -7053,11 +7053,11 @@ const ti = {
|
|
|
7053
7053
|
}, null, 8, ["modelValue", "error"]),
|
|
7054
7054
|
L[19] || (L[19] = e("div", { class: "complete-signup-password-hint" }, " Password must be at least 8 characters long ", -1))
|
|
7055
7055
|
]),
|
|
7056
|
-
d(
|
|
7056
|
+
d(i(ue), {
|
|
7057
7057
|
type: "submit",
|
|
7058
7058
|
variant: "primary",
|
|
7059
7059
|
"full-width": "",
|
|
7060
|
-
disabled: h.value || !
|
|
7060
|
+
disabled: h.value || !U.value,
|
|
7061
7061
|
loading: h.value,
|
|
7062
7062
|
"loading-text": "Creating account..."
|
|
7063
7063
|
}, {
|
|
@@ -7067,7 +7067,7 @@ const ti = {
|
|
|
7067
7067
|
_: 1
|
|
7068
7068
|
}, 8, ["disabled", "loading"])
|
|
7069
7069
|
], 32),
|
|
7070
|
-
x.value ? (a(), ye(
|
|
7070
|
+
x.value ? (a(), ye(i(Et), {
|
|
7071
7071
|
key: 0,
|
|
7072
7072
|
variant: "error",
|
|
7073
7073
|
message: x.value,
|
|
@@ -7079,12 +7079,12 @@ const ti = {
|
|
|
7079
7079
|
config: t.config
|
|
7080
7080
|
}, {
|
|
7081
7081
|
default: _(() => [
|
|
7082
|
-
|
|
7082
|
+
i(V)() ? (a(), o("div", jr, [
|
|
7083
7083
|
e("p", Or, [
|
|
7084
7084
|
L[22] || (L[22] = J(" Need help? ", -1)),
|
|
7085
|
-
d(
|
|
7085
|
+
d(i(mt), {
|
|
7086
7086
|
variant: "primary",
|
|
7087
|
-
href: `mailto:${
|
|
7087
|
+
href: `mailto:${i(V)()}`
|
|
7088
7088
|
}, {
|
|
7089
7089
|
default: _(() => [...L[21] || (L[21] = [
|
|
7090
7090
|
J(" Contact Support ", -1)
|
|
@@ -7100,14 +7100,14 @@ const ti = {
|
|
|
7100
7100
|
_: 1
|
|
7101
7101
|
})
|
|
7102
7102
|
])) : (a(), o("div", Rr, [
|
|
7103
|
-
d(
|
|
7103
|
+
d(i(_t), { variant: "modern" }, {
|
|
7104
7104
|
default: _(() => [
|
|
7105
7105
|
e("div", Fr, [
|
|
7106
7106
|
L[24] || (L[24] = e("div", { class: "complete-signup-warning-icon" }, "⚠️", -1)),
|
|
7107
7107
|
L[25] || (L[25] = e("h1", { class: "complete-signup-warning-title" }, "Missing Token", -1)),
|
|
7108
7108
|
L[26] || (L[26] = e("p", { class: "complete-signup-warning-message" }, " No registration token was provided. ", -1)),
|
|
7109
7109
|
L[27] || (L[27] = e("p", { class: "complete-signup-warning-instructions" }, " This page requires a valid registration token from the magic link in your email. ", -1)),
|
|
7110
|
-
d(
|
|
7110
|
+
d(i(ue), {
|
|
7111
7111
|
variant: "primary",
|
|
7112
7112
|
"full-width": "",
|
|
7113
7113
|
onClick: L[5] || (L[5] = (F) => y.$emit("start-registration"))
|
|
@@ -7158,19 +7158,19 @@ const ti = {
|
|
|
7158
7158
|
set: ($) => {
|
|
7159
7159
|
$ || l("close");
|
|
7160
7160
|
}
|
|
7161
|
-
}), c = M(1), h = M(""), x = M(""), S = M(""), u = M(""), m = M(null),
|
|
7161
|
+
}), c = M(1), h = M(""), x = M(""), S = M(""), u = M(""), m = M(null), U = M("");
|
|
7162
7162
|
Le(() => t.show, ($) => {
|
|
7163
|
-
$ && (c.value = 1, h.value = "", x.value = "", S.value = "", u.value = "", m.value = null,
|
|
7163
|
+
$ && (c.value = 1, h.value = "", x.value = "", S.value = "", u.value = "", m.value = null, U.value = "");
|
|
7164
7164
|
}), Le(() => m.value, async ($) => {
|
|
7165
7165
|
if ($?.qr_code_url)
|
|
7166
7166
|
try {
|
|
7167
7167
|
const k = `https://api.qrserver.com/v1/create-qr-code/?size=192x192&data=${encodeURIComponent($.qr_code_url)}&bgcolor=ffffff&color=000000`;
|
|
7168
|
-
|
|
7168
|
+
U.value = k;
|
|
7169
7169
|
} catch (k) {
|
|
7170
7170
|
console.error("Failed to generate QR code:", k);
|
|
7171
7171
|
}
|
|
7172
7172
|
});
|
|
7173
|
-
const
|
|
7173
|
+
const D = () => {
|
|
7174
7174
|
l("close");
|
|
7175
7175
|
}, g = async () => {
|
|
7176
7176
|
if (!h.value.trim()) {
|
|
@@ -7219,30 +7219,30 @@ const ti = {
|
|
|
7219
7219
|
e("h3", { class: "step-title" }, "Name Your Device"),
|
|
7220
7220
|
e("p", { class: "step-description" }, ' Give this authenticator a memorable name (e.g., "iPhone", "Work Phone") ')
|
|
7221
7221
|
], -1)),
|
|
7222
|
-
d(
|
|
7222
|
+
d(i(Fe), {
|
|
7223
7223
|
modelValue: h.value,
|
|
7224
7224
|
"onUpdate:modelValue": k[0] || (k[0] = (O) => h.value = O),
|
|
7225
7225
|
label: "Device Name",
|
|
7226
7226
|
placeholder: "My Authenticator",
|
|
7227
7227
|
error: x.value,
|
|
7228
|
-
disabled:
|
|
7228
|
+
disabled: i(C)
|
|
7229
7229
|
}, null, 8, ["modelValue", "error", "disabled"]),
|
|
7230
7230
|
e("div", Kr, [
|
|
7231
|
-
d(
|
|
7231
|
+
d(i(ue), {
|
|
7232
7232
|
variant: "secondary",
|
|
7233
|
-
onClick:
|
|
7234
|
-
disabled:
|
|
7233
|
+
onClick: D,
|
|
7234
|
+
disabled: i(C)
|
|
7235
7235
|
}, {
|
|
7236
7236
|
default: _(() => [...k[6] || (k[6] = [
|
|
7237
7237
|
J(" Cancel ", -1)
|
|
7238
7238
|
])]),
|
|
7239
7239
|
_: 1
|
|
7240
7240
|
}, 8, ["disabled"]),
|
|
7241
|
-
d(
|
|
7241
|
+
d(i(ue), {
|
|
7242
7242
|
variant: "primary",
|
|
7243
7243
|
onClick: g,
|
|
7244
|
-
disabled: !h.value.trim() ||
|
|
7245
|
-
loading:
|
|
7244
|
+
disabled: !h.value.trim() || i(C),
|
|
7245
|
+
loading: i(C)
|
|
7246
7246
|
}, {
|
|
7247
7247
|
default: _(() => [...k[7] || (k[7] = [
|
|
7248
7248
|
J(" Continue ", -1)
|
|
@@ -7257,16 +7257,16 @@ const ti = {
|
|
|
7257
7257
|
e("p", { class: "step-description" }, " Scan this QR code with your authenticator app (Google Authenticator, Authy, etc.) ")
|
|
7258
7258
|
], -1)),
|
|
7259
7259
|
e("div", Yr, [
|
|
7260
|
-
|
|
7260
|
+
U.value ? (a(), o("div", Wr, [
|
|
7261
7261
|
e("img", {
|
|
7262
|
-
src:
|
|
7262
|
+
src: U.value,
|
|
7263
7263
|
alt: "TOTP QR Code",
|
|
7264
7264
|
class: "qr-image",
|
|
7265
7265
|
width: "200",
|
|
7266
7266
|
height: "200"
|
|
7267
7267
|
}, null, 8, Qr)
|
|
7268
7268
|
])) : (a(), o("div", Xr, [
|
|
7269
|
-
d(
|
|
7269
|
+
d(i(ht), { size: 24 })
|
|
7270
7270
|
]))
|
|
7271
7271
|
]),
|
|
7272
7272
|
e("div", Jr, [
|
|
@@ -7293,20 +7293,20 @@ const ti = {
|
|
|
7293
7293
|
], -1)
|
|
7294
7294
|
])])) : I("", !0),
|
|
7295
7295
|
e("div", a2, [
|
|
7296
|
-
d(
|
|
7296
|
+
d(i(ue), {
|
|
7297
7297
|
variant: "secondary",
|
|
7298
7298
|
onClick: k[1] || (k[1] = (O) => c.value = 1),
|
|
7299
|
-
disabled:
|
|
7299
|
+
disabled: i(C)
|
|
7300
7300
|
}, {
|
|
7301
7301
|
default: _(() => [...k[11] || (k[11] = [
|
|
7302
7302
|
J(" Back ", -1)
|
|
7303
7303
|
])]),
|
|
7304
7304
|
_: 1
|
|
7305
7305
|
}, 8, ["disabled"]),
|
|
7306
|
-
d(
|
|
7306
|
+
d(i(ue), {
|
|
7307
7307
|
variant: "primary",
|
|
7308
7308
|
onClick: k[2] || (k[2] = (O) => c.value = 3),
|
|
7309
|
-
disabled:
|
|
7309
|
+
disabled: i(C)
|
|
7310
7310
|
}, {
|
|
7311
7311
|
default: _(() => [...k[12] || (k[12] = [
|
|
7312
7312
|
J(" I've Added It ", -1)
|
|
@@ -7320,7 +7320,7 @@ const ti = {
|
|
|
7320
7320
|
e("h3", { class: "text-lg font-semibold text-gray-900 mb-2" }, "Verify Setup"),
|
|
7321
7321
|
e("p", { class: "text-sm text-gray-600 mb-4" }, " Enter the 6-digit code from your authenticator app to complete setup ")
|
|
7322
7322
|
], -1)),
|
|
7323
|
-
d(
|
|
7323
|
+
d(i(Fe), {
|
|
7324
7324
|
modelValue: S.value,
|
|
7325
7325
|
"onUpdate:modelValue": k[3] || (k[3] = (O) => S.value = O),
|
|
7326
7326
|
type: "pincode",
|
|
@@ -7328,25 +7328,25 @@ const ti = {
|
|
|
7328
7328
|
"max-length": 6,
|
|
7329
7329
|
variant: "numeric",
|
|
7330
7330
|
error: u.value,
|
|
7331
|
-
disabled:
|
|
7331
|
+
disabled: i(C),
|
|
7332
7332
|
onComplete: N
|
|
7333
7333
|
}, null, 8, ["modelValue", "error", "disabled"]),
|
|
7334
7334
|
e("div", o2, [
|
|
7335
|
-
d(
|
|
7335
|
+
d(i(ue), {
|
|
7336
7336
|
variant: "secondary",
|
|
7337
7337
|
onClick: k[4] || (k[4] = (O) => c.value = 2),
|
|
7338
|
-
disabled:
|
|
7338
|
+
disabled: i(C)
|
|
7339
7339
|
}, {
|
|
7340
7340
|
default: _(() => [...k[14] || (k[14] = [
|
|
7341
7341
|
J(" Back ", -1)
|
|
7342
7342
|
])]),
|
|
7343
7343
|
_: 1
|
|
7344
7344
|
}, 8, ["disabled"]),
|
|
7345
|
-
d(
|
|
7345
|
+
d(i(ue), {
|
|
7346
7346
|
variant: "primary",
|
|
7347
7347
|
onClick: y,
|
|
7348
|
-
disabled: S.value.length !== 6 ||
|
|
7349
|
-
loading:
|
|
7348
|
+
disabled: S.value.length !== 6 || i(C),
|
|
7349
|
+
loading: i(C)
|
|
7350
7350
|
}, {
|
|
7351
7351
|
default: _(() => [...k[15] || (k[15] = [
|
|
7352
7352
|
J(" Verify & Enable ", -1)
|
|
@@ -7402,7 +7402,7 @@ const ti = {
|
|
|
7402
7402
|
])
|
|
7403
7403
|
]),
|
|
7404
7404
|
e("div", c2, [
|
|
7405
|
-
d(
|
|
7405
|
+
d(i(ue), {
|
|
7406
7406
|
variant: "secondary",
|
|
7407
7407
|
size: "sm",
|
|
7408
7408
|
onClick: L
|
|
@@ -7415,7 +7415,7 @@ const ti = {
|
|
|
7415
7415
|
])
|
|
7416
7416
|
]),
|
|
7417
7417
|
e("div", u2, [
|
|
7418
|
-
d(
|
|
7418
|
+
d(i(ue), {
|
|
7419
7419
|
variant: "primary",
|
|
7420
7420
|
onClick: F
|
|
7421
7421
|
}, {
|
|
@@ -7451,10 +7451,10 @@ const ti = {
|
|
|
7451
7451
|
set: (b) => {
|
|
7452
7452
|
b || l("close");
|
|
7453
7453
|
}
|
|
7454
|
-
}), h = M(1), x = M(""), S = M(""), u = M(""), m = M(""),
|
|
7454
|
+
}), h = M(1), x = M(""), S = M(""), u = M(""), m = M(""), U = M(null), D = M(!1), g = M(0);
|
|
7455
7455
|
let N = null;
|
|
7456
7456
|
Le(() => t.show, (b) => {
|
|
7457
|
-
b && (h.value = 1, x.value = "", S.value = "", u.value = "", m.value = "",
|
|
7457
|
+
b && (h.value = 1, x.value = "", S.value = "", u.value = "", m.value = "", U.value = null, D.value = !1, g.value = 0, N && (clearInterval(N), N = null));
|
|
7458
7458
|
}), Le(u, () => {
|
|
7459
7459
|
m.value && (m.value = "");
|
|
7460
7460
|
}), Ra(() => {
|
|
@@ -7470,31 +7470,31 @@ const ti = {
|
|
|
7470
7470
|
S.value = "";
|
|
7471
7471
|
try {
|
|
7472
7472
|
const b = await z(x.value.trim());
|
|
7473
|
-
|
|
7473
|
+
U.value = b.device_id, await V(b.device_id), h.value = 2, O();
|
|
7474
7474
|
} catch (b) {
|
|
7475
7475
|
console.error("Failed to setup email MFA:", b), S.value = b instanceof Error ? b.message : "Failed to setup email MFA";
|
|
7476
7476
|
}
|
|
7477
7477
|
}, F = (b) => {
|
|
7478
7478
|
m.value = "", b.length === 6 && $();
|
|
7479
7479
|
}, $ = async () => {
|
|
7480
|
-
if (!(!
|
|
7480
|
+
if (!(!U.value || !u.value)) {
|
|
7481
7481
|
m.value = "";
|
|
7482
7482
|
try {
|
|
7483
|
-
await C(
|
|
7483
|
+
await C(U.value, u.value) ? h.value = 3 : m.value = "Invalid verification code";
|
|
7484
7484
|
} catch (b) {
|
|
7485
7485
|
console.error("Failed to verify email MFA code:", b), m.value = b instanceof Error ? b.message : "Invalid verification code";
|
|
7486
7486
|
}
|
|
7487
7487
|
}
|
|
7488
7488
|
}, k = async () => {
|
|
7489
|
-
if (!(!
|
|
7489
|
+
if (!(!U.value || D.value))
|
|
7490
7490
|
try {
|
|
7491
|
-
await V(
|
|
7491
|
+
await V(U.value), O();
|
|
7492
7492
|
} catch (b) {
|
|
7493
7493
|
console.warn("Failed to resend email MFA verification code:", b);
|
|
7494
7494
|
}
|
|
7495
7495
|
}, O = () => {
|
|
7496
|
-
|
|
7497
|
-
g.value -= 1, g.value <= 0 && (
|
|
7496
|
+
D.value = !0, g.value = 30, N = setInterval(() => {
|
|
7497
|
+
g.value -= 1, g.value <= 0 && (D.value = !1, N && (clearInterval(N), N = null));
|
|
7498
7498
|
}, 1e3);
|
|
7499
7499
|
}, q = () => {
|
|
7500
7500
|
l("success");
|
|
@@ -7511,15 +7511,15 @@ const ti = {
|
|
|
7511
7511
|
e("h3", { class: "email-mfa-setup-step-title" }, "Name Your Email 2FA"),
|
|
7512
7512
|
e("p", { class: "email-mfa-setup-step-description" }, ' Give this email 2FA method a memorable name (e.g., "Personal Email", "Work Email") ')
|
|
7513
7513
|
], -1)),
|
|
7514
|
-
d(
|
|
7514
|
+
d(i(Fe), {
|
|
7515
7515
|
modelValue: x.value,
|
|
7516
7516
|
"onUpdate:modelValue": T[0] || (T[0] = (ae) => x.value = ae),
|
|
7517
7517
|
label: "Device Name",
|
|
7518
7518
|
placeholder: "Personal Email",
|
|
7519
7519
|
error: S.value,
|
|
7520
|
-
disabled:
|
|
7520
|
+
disabled: i(w)
|
|
7521
7521
|
}, null, 8, ["modelValue", "error", "disabled"]),
|
|
7522
|
-
d(
|
|
7522
|
+
d(i(Et), {
|
|
7523
7523
|
variant: "info",
|
|
7524
7524
|
title: "Email 2FA"
|
|
7525
7525
|
}, {
|
|
@@ -7529,20 +7529,20 @@ const ti = {
|
|
|
7529
7529
|
_: 1
|
|
7530
7530
|
}),
|
|
7531
7531
|
e("div", p2, [
|
|
7532
|
-
d(
|
|
7532
|
+
d(i(ue), {
|
|
7533
7533
|
color: "secondary",
|
|
7534
7534
|
onClick: y,
|
|
7535
|
-
disabled:
|
|
7535
|
+
disabled: i(w)
|
|
7536
7536
|
}, {
|
|
7537
7537
|
default: _(() => [...T[5] || (T[5] = [
|
|
7538
7538
|
J(" Cancel ", -1)
|
|
7539
7539
|
])]),
|
|
7540
7540
|
_: 1
|
|
7541
7541
|
}, 8, ["disabled"]),
|
|
7542
|
-
d(
|
|
7542
|
+
d(i(ue), {
|
|
7543
7543
|
onClick: L,
|
|
7544
|
-
disabled: !x.value.trim() ||
|
|
7545
|
-
loading:
|
|
7544
|
+
disabled: !x.value.trim() || i(w),
|
|
7545
|
+
loading: i(w)
|
|
7546
7546
|
}, {
|
|
7547
7547
|
default: _(() => [...T[6] || (T[6] = [
|
|
7548
7548
|
J(" Setup Email 2FA ", -1)
|
|
@@ -7575,7 +7575,7 @@ const ti = {
|
|
|
7575
7575
|
])
|
|
7576
7576
|
])
|
|
7577
7577
|
], -1)),
|
|
7578
|
-
d(
|
|
7578
|
+
d(i(Fe), {
|
|
7579
7579
|
modelValue: u.value,
|
|
7580
7580
|
"onUpdate:modelValue": T[1] || (T[1] = (ae) => u.value = ae),
|
|
7581
7581
|
type: "pincode",
|
|
@@ -7583,37 +7583,37 @@ const ti = {
|
|
|
7583
7583
|
"max-length": 6,
|
|
7584
7584
|
variant: "numeric",
|
|
7585
7585
|
error: m.value,
|
|
7586
|
-
disabled:
|
|
7586
|
+
disabled: i(w),
|
|
7587
7587
|
onComplete: F
|
|
7588
7588
|
}, null, 8, ["modelValue", "error", "disabled"]),
|
|
7589
7589
|
e("div", m2, [
|
|
7590
|
-
d(
|
|
7590
|
+
d(i(ue), {
|
|
7591
7591
|
color: "secondary",
|
|
7592
7592
|
size: "sm",
|
|
7593
7593
|
onClick: k,
|
|
7594
|
-
disabled:
|
|
7594
|
+
disabled: i(w) || D.value
|
|
7595
7595
|
}, {
|
|
7596
7596
|
default: _(() => [
|
|
7597
|
-
J(R(
|
|
7597
|
+
J(R(D.value ? `Resend in ${g.value}s` : "Resend Code"), 1)
|
|
7598
7598
|
]),
|
|
7599
7599
|
_: 1
|
|
7600
7600
|
}, 8, ["disabled"])
|
|
7601
7601
|
]),
|
|
7602
7602
|
e("div", h2, [
|
|
7603
|
-
d(
|
|
7603
|
+
d(i(ue), {
|
|
7604
7604
|
color: "secondary",
|
|
7605
7605
|
onClick: T[2] || (T[2] = (ae) => h.value = 1),
|
|
7606
|
-
disabled:
|
|
7606
|
+
disabled: i(w)
|
|
7607
7607
|
}, {
|
|
7608
7608
|
default: _(() => [...T[8] || (T[8] = [
|
|
7609
7609
|
J(" Back ", -1)
|
|
7610
7610
|
])]),
|
|
7611
7611
|
_: 1
|
|
7612
7612
|
}, 8, ["disabled"]),
|
|
7613
|
-
d(
|
|
7613
|
+
d(i(ue), {
|
|
7614
7614
|
onClick: $,
|
|
7615
|
-
disabled: u.value.length !== 6 ||
|
|
7616
|
-
loading:
|
|
7615
|
+
disabled: u.value.length !== 6 || i(w),
|
|
7616
|
+
loading: i(w)
|
|
7617
7617
|
}, {
|
|
7618
7618
|
default: _(() => [...T[9] || (T[9] = [
|
|
7619
7619
|
J(" Verify & Enable ", -1)
|
|
@@ -7662,7 +7662,7 @@ const ti = {
|
|
|
7662
7662
|
])
|
|
7663
7663
|
], -1)),
|
|
7664
7664
|
e("div", C2, [
|
|
7665
|
-
d(
|
|
7665
|
+
d(i(ue), {
|
|
7666
7666
|
variant: "primary",
|
|
7667
7667
|
onClick: q
|
|
7668
7668
|
}, {
|
|
@@ -7705,9 +7705,9 @@ const ti = {
|
|
|
7705
7705
|
set: (b) => {
|
|
7706
7706
|
b || l("close");
|
|
7707
7707
|
}
|
|
7708
|
-
}), u = M(1), m = M(""),
|
|
7708
|
+
}), u = M(1), m = M(""), U = M(""), D = M("Please touch your hardware key when prompted"), g = M(""), N = M([]);
|
|
7709
7709
|
Le(() => t.show, (b) => {
|
|
7710
|
-
b && (u.value = 1, m.value = "",
|
|
7710
|
+
b && (u.value = 1, m.value = "", U.value = "", D.value = "Please touch your hardware key when prompted", g.value = "", N.value = []);
|
|
7711
7711
|
});
|
|
7712
7712
|
const y = () => {
|
|
7713
7713
|
l("close");
|
|
@@ -7794,12 +7794,12 @@ const ti = {
|
|
|
7794
7794
|
}
|
|
7795
7795
|
}, $ = async () => {
|
|
7796
7796
|
if (!m.value.trim()) {
|
|
7797
|
-
|
|
7797
|
+
U.value = "Device name is required";
|
|
7798
7798
|
return;
|
|
7799
7799
|
}
|
|
7800
|
-
|
|
7800
|
+
U.value = "", u.value = 2;
|
|
7801
7801
|
}, k = async () => {
|
|
7802
|
-
c.value = !0, u.value = 3,
|
|
7802
|
+
c.value = !0, u.value = 3, D.value = `Starting ${t.deviceType === "passkey" ? "passkey" : "hardware key"} registration...`;
|
|
7803
7803
|
try {
|
|
7804
7804
|
if (!window.navigator.credentials || !window.PublicKeyCredential)
|
|
7805
7805
|
throw new Error("WebAuthn is not supported in this browser");
|
|
@@ -7813,13 +7813,13 @@ const ti = {
|
|
|
7813
7813
|
if (!T || typeof T != "object")
|
|
7814
7814
|
throw new Error("Invalid challenge received from server");
|
|
7815
7815
|
const ae = F(T, t.deviceType);
|
|
7816
|
-
|
|
7816
|
+
D.value = "Please touch your hardware key now...";
|
|
7817
7817
|
const ce = await navigator.credentials.create({
|
|
7818
7818
|
publicKey: ae
|
|
7819
7819
|
});
|
|
7820
7820
|
if (!ce)
|
|
7821
7821
|
throw new Error("Hardware key registration was cancelled");
|
|
7822
|
-
|
|
7822
|
+
D.value = "Completing registration...";
|
|
7823
7823
|
const Ce = ce.response;
|
|
7824
7824
|
try {
|
|
7825
7825
|
if (!ce.rawId)
|
|
@@ -7874,16 +7874,16 @@ const ti = {
|
|
|
7874
7874
|
e("h3", { class: "hardware-key-setup-step-title" }, "Name Your Hardware Key"),
|
|
7875
7875
|
e("p", { class: "hardware-key-setup-step-description" }, ' Give your hardware key a memorable name (e.g., "YubiKey 5", "Work Security Key") ')
|
|
7876
7876
|
], -1)),
|
|
7877
|
-
d(
|
|
7877
|
+
d(i(Fe), {
|
|
7878
7878
|
modelValue: m.value,
|
|
7879
7879
|
"onUpdate:modelValue": T[0] || (T[0] = (ae) => m.value = ae),
|
|
7880
7880
|
label: "Device Name",
|
|
7881
7881
|
placeholder: "My Hardware Key",
|
|
7882
|
-
error:
|
|
7882
|
+
error: U.value,
|
|
7883
7883
|
disabled: h.value
|
|
7884
7884
|
}, null, 8, ["modelValue", "error", "disabled"]),
|
|
7885
7885
|
e("div", w2, [
|
|
7886
|
-
d(
|
|
7886
|
+
d(i(ue), {
|
|
7887
7887
|
variant: "secondary",
|
|
7888
7888
|
onClick: y,
|
|
7889
7889
|
disabled: h.value
|
|
@@ -7893,7 +7893,7 @@ const ti = {
|
|
|
7893
7893
|
])]),
|
|
7894
7894
|
_: 1
|
|
7895
7895
|
}, 8, ["disabled"]),
|
|
7896
|
-
d(
|
|
7896
|
+
d(i(ue), {
|
|
7897
7897
|
variant: "primary",
|
|
7898
7898
|
onClick: $,
|
|
7899
7899
|
disabled: !m.value.trim() || h.value,
|
|
@@ -7962,7 +7962,7 @@ const ti = {
|
|
|
7962
7962
|
])
|
|
7963
7963
|
]),
|
|
7964
7964
|
e("div", S2, [
|
|
7965
|
-
d(
|
|
7965
|
+
d(i(ue), {
|
|
7966
7966
|
variant: "secondary",
|
|
7967
7967
|
onClick: T[1] || (T[1] = (ae) => u.value = 1),
|
|
7968
7968
|
disabled: h.value
|
|
@@ -7972,7 +7972,7 @@ const ti = {
|
|
|
7972
7972
|
])]),
|
|
7973
7973
|
_: 1
|
|
7974
7974
|
}, 8, ["disabled"]),
|
|
7975
|
-
d(
|
|
7975
|
+
d(i(ue), {
|
|
7976
7976
|
variant: "primary",
|
|
7977
7977
|
onClick: k,
|
|
7978
7978
|
disabled: h.value,
|
|
@@ -7988,13 +7988,13 @@ const ti = {
|
|
|
7988
7988
|
u.value === 3 ? (a(), o("div", A2, [
|
|
7989
7989
|
e("div", _2, [
|
|
7990
7990
|
e("div", T2, [
|
|
7991
|
-
d(
|
|
7991
|
+
d(i(ht), {
|
|
7992
7992
|
size: 24,
|
|
7993
7993
|
class: "hardware-key-setup-loader"
|
|
7994
7994
|
})
|
|
7995
7995
|
]),
|
|
7996
7996
|
T[19] || (T[19] = e("h3", { class: "hardware-key-setup-step-title" }, "Registering Hardware Key", -1)),
|
|
7997
|
-
e("p", z2, R(
|
|
7997
|
+
e("p", z2, R(D.value), 1)
|
|
7998
7998
|
]),
|
|
7999
7999
|
T[20] || (T[20] = e("div", { class: "hardware-key-setup-progress-indicator" }, [
|
|
8000
8000
|
e("div", { class: "hardware-key-setup-progress-content" }, [
|
|
@@ -8066,7 +8066,7 @@ const ti = {
|
|
|
8066
8066
|
])
|
|
8067
8067
|
]),
|
|
8068
8068
|
e("div", H2, [
|
|
8069
|
-
d(
|
|
8069
|
+
d(i(ue), {
|
|
8070
8070
|
variant: "secondary",
|
|
8071
8071
|
size: "sm",
|
|
8072
8072
|
onClick: O
|
|
@@ -8079,7 +8079,7 @@ const ti = {
|
|
|
8079
8079
|
])
|
|
8080
8080
|
]),
|
|
8081
8081
|
e("div", U2, [
|
|
8082
|
-
d(
|
|
8082
|
+
d(i(ue), {
|
|
8083
8083
|
variant: "primary",
|
|
8084
8084
|
onClick: q
|
|
8085
8085
|
}, {
|
|
@@ -8111,7 +8111,7 @@ const ti = {
|
|
|
8111
8111
|
e("p", B2, R(g.value), 1)
|
|
8112
8112
|
]),
|
|
8113
8113
|
e("div", P2, [
|
|
8114
|
-
d(
|
|
8114
|
+
d(i(ue), {
|
|
8115
8115
|
variant: "secondary",
|
|
8116
8116
|
onClick: T[2] || (T[2] = (ae) => u.value = 1)
|
|
8117
8117
|
}, {
|
|
@@ -8120,7 +8120,7 @@ const ti = {
|
|
|
8120
8120
|
])]),
|
|
8121
8121
|
_: 1
|
|
8122
8122
|
}),
|
|
8123
|
-
d(
|
|
8123
|
+
d(i(ue), {
|
|
8124
8124
|
variant: "primary",
|
|
8125
8125
|
onClick: y
|
|
8126
8126
|
}, {
|
|
@@ -8157,12 +8157,12 @@ const ti = {
|
|
|
8157
8157
|
setup(s, { emit: r }) {
|
|
8158
8158
|
const t = s, l = r, { regenerateBackupCodes: z, loading: V, getDeviceTypeName: C } = Tt(), w = H({
|
|
8159
8159
|
get: () => t.show,
|
|
8160
|
-
set: (
|
|
8161
|
-
|
|
8160
|
+
set: (D) => {
|
|
8161
|
+
D || l("close");
|
|
8162
8162
|
}
|
|
8163
8163
|
}), c = M([]), h = M(!1);
|
|
8164
|
-
Le(() => t.show, async (
|
|
8165
|
-
|
|
8164
|
+
Le(() => t.show, async (D) => {
|
|
8165
|
+
D && t.device && (h.value = !1, c.value = []);
|
|
8166
8166
|
}), Ye(async () => {
|
|
8167
8167
|
t.show && t.device && (c.value = []);
|
|
8168
8168
|
});
|
|
@@ -8173,23 +8173,23 @@ const ti = {
|
|
|
8173
8173
|
}, u = async () => {
|
|
8174
8174
|
if (t.device)
|
|
8175
8175
|
try {
|
|
8176
|
-
const
|
|
8177
|
-
c.value =
|
|
8178
|
-
} catch (
|
|
8179
|
-
console.error("Failed to regenerate backup codes:",
|
|
8176
|
+
const D = await z(t.device.id);
|
|
8177
|
+
c.value = D.backup_codes, h.value = !1;
|
|
8178
|
+
} catch (D) {
|
|
8179
|
+
console.error("Failed to regenerate backup codes:", D);
|
|
8180
8180
|
}
|
|
8181
8181
|
}, m = async () => {
|
|
8182
8182
|
if (c.value.length !== 0)
|
|
8183
8183
|
try {
|
|
8184
|
-
const
|
|
8184
|
+
const D = c.value.join(`
|
|
8185
8185
|
`);
|
|
8186
|
-
await navigator.clipboard.writeText(
|
|
8187
|
-
} catch (
|
|
8188
|
-
console.warn("Failed to copy backup codes to clipboard:",
|
|
8186
|
+
await navigator.clipboard.writeText(D);
|
|
8187
|
+
} catch (D) {
|
|
8188
|
+
console.warn("Failed to copy backup codes to clipboard:", D);
|
|
8189
8189
|
}
|
|
8190
|
-
},
|
|
8190
|
+
}, U = () => {
|
|
8191
8191
|
if (c.value.length === 0) return;
|
|
8192
|
-
const
|
|
8192
|
+
const D = t.device?.device_name || "device", g = (/* @__PURE__ */ new Date()).toISOString().split("T")[0], N = `strands-backup-codes-${D}-${g}.txt`, y = [
|
|
8193
8193
|
"Strands Account Backup Codes",
|
|
8194
8194
|
"============================",
|
|
8195
8195
|
"",
|
|
@@ -8209,7 +8209,7 @@ const ti = {
|
|
|
8209
8209
|
`), L = new Blob([y], { type: "text/plain" }), F = URL.createObjectURL(L), $ = document.createElement("a");
|
|
8210
8210
|
$.href = F, $.download = N, document.body.appendChild($), $.click(), document.body.removeChild($), URL.revokeObjectURL(F);
|
|
8211
8211
|
};
|
|
8212
|
-
return (
|
|
8212
|
+
return (D, g) => (a(), o("div", O2, [
|
|
8213
8213
|
d(pt, {
|
|
8214
8214
|
modelValue: w.value,
|
|
8215
8215
|
"onUpdate:modelValue": g[1] || (g[1] = (N) => w.value = N),
|
|
@@ -8217,8 +8217,8 @@ const ti = {
|
|
|
8217
8217
|
"card-class": "backup-codes-modal"
|
|
8218
8218
|
}, {
|
|
8219
8219
|
default: _(() => [
|
|
8220
|
-
|
|
8221
|
-
d(
|
|
8220
|
+
i(V) ? (a(), o("div", R2, [
|
|
8221
|
+
d(i(ht), { size: 24 }),
|
|
8222
8222
|
g[2] || (g[2] = e("span", { class: "backup-codes-loading-text" }, "Loading backup codes...", -1))
|
|
8223
8223
|
])) : (a(), o("div", F2, [
|
|
8224
8224
|
s.device ? (a(), o("div", q2, [
|
|
@@ -8226,7 +8226,7 @@ const ti = {
|
|
|
8226
8226
|
g[3] || (g[3] = e("span", { class: "backup-codes-device-icon" }, "📱", -1)),
|
|
8227
8227
|
e("div", null, [
|
|
8228
8228
|
e("h3", K2, R(s.device.device_name), 1),
|
|
8229
|
-
e("p", G2, R(
|
|
8229
|
+
e("p", G2, R(i(C)(s.device.device_type)), 1)
|
|
8230
8230
|
])
|
|
8231
8231
|
])
|
|
8232
8232
|
])) : I("", !0),
|
|
@@ -8265,7 +8265,7 @@ const ti = {
|
|
|
8265
8265
|
])
|
|
8266
8266
|
]),
|
|
8267
8267
|
e("div", X2, [
|
|
8268
|
-
d(
|
|
8268
|
+
d(i(ue), {
|
|
8269
8269
|
variant: "secondary",
|
|
8270
8270
|
size: "sm",
|
|
8271
8271
|
onClick: m
|
|
@@ -8275,10 +8275,10 @@ const ti = {
|
|
|
8275
8275
|
])]),
|
|
8276
8276
|
_: 1
|
|
8277
8277
|
}),
|
|
8278
|
-
d(
|
|
8278
|
+
d(i(ue), {
|
|
8279
8279
|
variant: "secondary",
|
|
8280
8280
|
size: "sm",
|
|
8281
|
-
onClick:
|
|
8281
|
+
onClick: U
|
|
8282
8282
|
}, {
|
|
8283
8283
|
default: _(() => [...g[5] || (g[5] = [
|
|
8284
8284
|
J(" 💾 Download ", -1)
|
|
@@ -8289,18 +8289,18 @@ const ti = {
|
|
|
8289
8289
|
])) : I("", !0),
|
|
8290
8290
|
e("div", J2, [
|
|
8291
8291
|
e("div", e3, [
|
|
8292
|
-
d(
|
|
8292
|
+
d(i(ue), {
|
|
8293
8293
|
variant: "secondary",
|
|
8294
8294
|
onClick: S,
|
|
8295
|
-
disabled:
|
|
8296
|
-
loading:
|
|
8295
|
+
disabled: i(V),
|
|
8296
|
+
loading: i(V)
|
|
8297
8297
|
}, {
|
|
8298
8298
|
default: _(() => [...g[7] || (g[7] = [
|
|
8299
8299
|
J(" 🔄 Regenerate Codes ", -1)
|
|
8300
8300
|
])]),
|
|
8301
8301
|
_: 1
|
|
8302
8302
|
}, 8, ["disabled", "loading"]),
|
|
8303
|
-
d(
|
|
8303
|
+
d(i(ue), {
|
|
8304
8304
|
variant: "primary",
|
|
8305
8305
|
onClick: x
|
|
8306
8306
|
}, {
|
|
@@ -8328,19 +8328,19 @@ const ti = {
|
|
|
8328
8328
|
g[11] || (g[11] = e("p", { class: "backup-codes-regenerate-title" }, "Regenerate Backup Codes?", -1)),
|
|
8329
8329
|
g[12] || (g[12] = e("p", { class: "backup-codes-regenerate-description" }, " This will invalidate all current backup codes. Make sure to save the new ones. ", -1)),
|
|
8330
8330
|
e("div", s3, [
|
|
8331
|
-
d(
|
|
8331
|
+
d(i(ue), {
|
|
8332
8332
|
variant: "primary",
|
|
8333
8333
|
size: "sm",
|
|
8334
8334
|
onClick: u,
|
|
8335
|
-
disabled:
|
|
8336
|
-
loading:
|
|
8335
|
+
disabled: i(V),
|
|
8336
|
+
loading: i(V)
|
|
8337
8337
|
}, {
|
|
8338
8338
|
default: _(() => [...g[9] || (g[9] = [
|
|
8339
8339
|
J(" Yes, Regenerate ", -1)
|
|
8340
8340
|
])]),
|
|
8341
8341
|
_: 1
|
|
8342
8342
|
}, 8, ["disabled", "loading"]),
|
|
8343
|
-
d(
|
|
8343
|
+
d(i(ue), {
|
|
8344
8344
|
variant: "secondary",
|
|
8345
8345
|
size: "sm",
|
|
8346
8346
|
onClick: g[0] || (g[0] = (N) => h.value = !1)
|
|
@@ -8394,7 +8394,7 @@ const ti = {
|
|
|
8394
8394
|
default: _(() => [
|
|
8395
8395
|
e("p", r3, R(s.message), 1),
|
|
8396
8396
|
e("div", c3, [
|
|
8397
|
-
d(
|
|
8397
|
+
d(i(ue), {
|
|
8398
8398
|
variant: "secondary",
|
|
8399
8399
|
onClick: w,
|
|
8400
8400
|
disabled: z.value
|
|
@@ -8404,7 +8404,7 @@ const ti = {
|
|
|
8404
8404
|
]),
|
|
8405
8405
|
_: 1
|
|
8406
8406
|
}, 8, ["disabled"]),
|
|
8407
|
-
d(
|
|
8407
|
+
d(i(ue), {
|
|
8408
8408
|
variant: s.variant,
|
|
8409
8409
|
onClick: C,
|
|
8410
8410
|
disabled: z.value,
|
|
@@ -8504,14 +8504,14 @@ const ti = {
|
|
|
8504
8504
|
oe("path", { d: "M9 6.8a6 6 0 0 1 9 5.2c0 .47 0 1.17-.02 2" })
|
|
8505
8505
|
]);
|
|
8506
8506
|
}
|
|
8507
|
-
},
|
|
8507
|
+
}, U = {
|
|
8508
8508
|
props: ["size"],
|
|
8509
8509
|
render() {
|
|
8510
8510
|
return oe("svg", { width: this.size, height: this.size, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24" }, [
|
|
8511
8511
|
oe("path", { d: "M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z" })
|
|
8512
8512
|
]);
|
|
8513
8513
|
}
|
|
8514
|
-
},
|
|
8514
|
+
}, D = {
|
|
8515
8515
|
props: ["size"],
|
|
8516
8516
|
render() {
|
|
8517
8517
|
return oe("svg", { width: this.size, height: this.size, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24" }, [
|
|
@@ -8569,7 +8569,7 @@ const ti = {
|
|
|
8569
8569
|
return ie < 1 ? "Just now" : ie < 60 ? `${ie}m ago` : te < 24 ? `${te}h ago` : Y < 7 ? `${Y}d ago` : Y < 30 ? `${Math.floor(Y / 7)}w ago` : Y < 365 ? `${Math.floor(Y / 30)}mo ago` : `${Math.floor(Y / 365)}y ago`;
|
|
8570
8570
|
};
|
|
8571
8571
|
return (be, ne) => (a(), o(De, null, [
|
|
8572
|
-
d(
|
|
8572
|
+
d(i(pt), {
|
|
8573
8573
|
modelValue: O.value,
|
|
8574
8574
|
"onUpdate:modelValue": ne[6] || (ne[6] = (W) => O.value = W),
|
|
8575
8575
|
title: "Two-Factor Authentication",
|
|
@@ -8577,19 +8577,19 @@ const ti = {
|
|
|
8577
8577
|
}, {
|
|
8578
8578
|
default: _(() => [
|
|
8579
8579
|
e("div", v3, [
|
|
8580
|
-
|
|
8581
|
-
d(
|
|
8580
|
+
i(V) ? (a(), o("div", p3, [
|
|
8581
|
+
d(i(ht), { size: 32 }),
|
|
8582
8582
|
ne[11] || (ne[11] = e("span", { class: "mfa-loading-text" }, "Loading MFA settings...", -1))
|
|
8583
8583
|
])) : (a(), o("div", f3, [
|
|
8584
8584
|
e("div", m3, [
|
|
8585
8585
|
e("div", h3, [
|
|
8586
8586
|
e("div", null, [
|
|
8587
8587
|
ne[12] || (ne[12] = e("h3", { class: "mfa-status-title" }, "Two-Factor Authentication", -1)),
|
|
8588
|
-
e("p", g3, R(
|
|
8588
|
+
e("p", g3, R(i(z) ? "Enabled" : "Add extra security to your account"), 1)
|
|
8589
8589
|
]),
|
|
8590
8590
|
e("div", C3, [
|
|
8591
|
-
|
|
8592
|
-
d(
|
|
8591
|
+
i(z) ? (a(), o("span", y3, [
|
|
8592
|
+
d(U, {
|
|
8593
8593
|
size: 12,
|
|
8594
8594
|
class: "mfa-badge-icon"
|
|
8595
8595
|
}),
|
|
@@ -8598,7 +8598,7 @@ const ti = {
|
|
|
8598
8598
|
])
|
|
8599
8599
|
])
|
|
8600
8600
|
]),
|
|
8601
|
-
d(
|
|
8601
|
+
d(i(Oa), {
|
|
8602
8602
|
modelValue: g.value,
|
|
8603
8603
|
"onUpdate:modelValue": ne[5] || (ne[5] = (W) => g.value = W),
|
|
8604
8604
|
tabs: q.value,
|
|
@@ -8619,7 +8619,7 @@ const ti = {
|
|
|
8619
8619
|
e("p", { class: "mfa-device-option-description" }, "Use apps like Google Authenticator, or Authy")
|
|
8620
8620
|
], -1))
|
|
8621
8621
|
]),
|
|
8622
|
-
d(
|
|
8622
|
+
d(i(ue), {
|
|
8623
8623
|
variant: "outline",
|
|
8624
8624
|
size: "sm",
|
|
8625
8625
|
onClick: ne[0] || (ne[0] = (Z) => L.value = !0)
|
|
@@ -8640,7 +8640,7 @@ const ti = {
|
|
|
8640
8640
|
e("p", { class: "mfa-device-option-description" }, "Receive verification codes via email")
|
|
8641
8641
|
], -1))
|
|
8642
8642
|
]),
|
|
8643
|
-
d(
|
|
8643
|
+
d(i(ue), {
|
|
8644
8644
|
variant: "outline",
|
|
8645
8645
|
size: "sm",
|
|
8646
8646
|
onClick: ne[1] || (ne[1] = (Z) => F.value = !0)
|
|
@@ -8661,7 +8661,7 @@ const ti = {
|
|
|
8661
8661
|
e("p", { class: "mfa-device-option-description" }, "Use a physical security key (YubiKey, etc.)")
|
|
8662
8662
|
], -1))
|
|
8663
8663
|
]),
|
|
8664
|
-
d(
|
|
8664
|
+
d(i(ue), {
|
|
8665
8665
|
variant: "outline",
|
|
8666
8666
|
size: "sm",
|
|
8667
8667
|
onClick: ne[2] || (ne[2] = (Z) => $.value = !0)
|
|
@@ -8682,7 +8682,7 @@ const ti = {
|
|
|
8682
8682
|
e("p", { class: "mfa-device-option-description" }, "Use biometric authentication or device PIN")
|
|
8683
8683
|
], -1))
|
|
8684
8684
|
]),
|
|
8685
|
-
d(
|
|
8685
|
+
d(i(ue), {
|
|
8686
8686
|
variant: "outline",
|
|
8687
8687
|
size: "sm",
|
|
8688
8688
|
onClick: ne[3] || (ne[3] = (Z) => k.value = !0)
|
|
@@ -8696,13 +8696,13 @@ const ti = {
|
|
|
8696
8696
|
])
|
|
8697
8697
|
])
|
|
8698
8698
|
])) : W?.value === "manage" ? (a(), o("div", H3, [
|
|
8699
|
-
|
|
8699
|
+
i(C).length === 0 ? (a(), o("div", U3, [
|
|
8700
8700
|
e("div", D3, [
|
|
8701
|
-
d(
|
|
8701
|
+
d(U, { size: 48 })
|
|
8702
8702
|
]),
|
|
8703
8703
|
ne[24] || (ne[24] = e("h3", { class: "mfa-empty-title" }, "No MFA Devices", -1)),
|
|
8704
8704
|
ne[25] || (ne[25] = e("p", { class: "mfa-empty-description" }, "You haven't set up any multi-factor authentication devices yet.", -1)),
|
|
8705
|
-
d(
|
|
8705
|
+
d(i(ue), {
|
|
8706
8706
|
onClick: ne[4] || (ne[4] = (Z) => g.value = "add"),
|
|
8707
8707
|
variant: "primary"
|
|
8708
8708
|
}, {
|
|
@@ -8712,7 +8712,7 @@ const ti = {
|
|
|
8712
8712
|
_: 1
|
|
8713
8713
|
})
|
|
8714
8714
|
])) : (a(), o("div", N3, [
|
|
8715
|
-
(a(!0), o(De, null, Ze(
|
|
8715
|
+
(a(!0), o(De, null, Ze(i(C), (Z) => (a(), o("div", {
|
|
8716
8716
|
key: Z.id,
|
|
8717
8717
|
class: "mfa-device-card"
|
|
8718
8718
|
}, [
|
|
@@ -8739,7 +8739,7 @@ const ti = {
|
|
|
8739
8739
|
])
|
|
8740
8740
|
]),
|
|
8741
8741
|
e("div", F3, [
|
|
8742
|
-
Z.device_type === "email" && !Z.verified ? (a(), ye(
|
|
8742
|
+
Z.device_type === "email" && !Z.verified ? (a(), ye(i(ue), {
|
|
8743
8743
|
key: 0,
|
|
8744
8744
|
variant: "outline",
|
|
8745
8745
|
size: "xs",
|
|
@@ -8759,7 +8759,7 @@ const ti = {
|
|
|
8759
8759
|
onConfirm: (ie) => T(Z)
|
|
8760
8760
|
}, {
|
|
8761
8761
|
trigger: _(() => [
|
|
8762
|
-
d(
|
|
8762
|
+
d(i(ue), {
|
|
8763
8763
|
variant: "ghost",
|
|
8764
8764
|
size: "xs",
|
|
8765
8765
|
disabled: y[Z.id]
|
|
@@ -8777,7 +8777,7 @@ const ti = {
|
|
|
8777
8777
|
Z.device_type === "email" && !Z.verified ? (a(), o("div", q3, [
|
|
8778
8778
|
e("div", Z3, [
|
|
8779
8779
|
e("div", K3, [
|
|
8780
|
-
d(
|
|
8780
|
+
d(D, { size: 16 })
|
|
8781
8781
|
]),
|
|
8782
8782
|
ne[26] || (ne[26] = e("span", { class: "mfa-warning-text" }, "Email not verified - click Test to verify", -1))
|
|
8783
8783
|
])
|
|
@@ -8785,7 +8785,7 @@ const ti = {
|
|
|
8785
8785
|
Z.backup_codes && Z.backup_codes.length > 0 ? (a(), o("div", G3, [
|
|
8786
8786
|
d(l3, { device: Z }, {
|
|
8787
8787
|
trigger: _(() => [
|
|
8788
|
-
d(
|
|
8788
|
+
d(i(ue), {
|
|
8789
8789
|
variant: "outline",
|
|
8790
8790
|
size: "xs"
|
|
8791
8791
|
}, {
|
|
@@ -8898,11 +8898,11 @@ const ti = {
|
|
|
8898
8898
|
title: "Account Settings",
|
|
8899
8899
|
"card-class": "max-w-lg"
|
|
8900
8900
|
}, Ft({
|
|
8901
|
-
footer: _(({ handleClose:
|
|
8901
|
+
footer: _(({ handleClose: U }) => [
|
|
8902
8902
|
e("div", c4, [
|
|
8903
8903
|
d(lt, {
|
|
8904
8904
|
variant: "secondary",
|
|
8905
|
-
onClick:
|
|
8905
|
+
onClick: U
|
|
8906
8906
|
}, {
|
|
8907
8907
|
default: _(() => [...m[11] || (m[11] = [
|
|
8908
8908
|
J(" Close ", -1)
|
|
@@ -8911,7 +8911,7 @@ const ti = {
|
|
|
8911
8911
|
}, 8, ["onClick"]),
|
|
8912
8912
|
d(lt, {
|
|
8913
8913
|
variant: "primary",
|
|
8914
|
-
onClick: (
|
|
8914
|
+
onClick: (D) => S(U),
|
|
8915
8915
|
loading: V.value
|
|
8916
8916
|
}, {
|
|
8917
8917
|
default: _(() => [
|
|
@@ -8961,8 +8961,8 @@ const ti = {
|
|
|
8961
8961
|
id: "level-up-sounds",
|
|
8962
8962
|
modelValue: w.levelUpSounds,
|
|
8963
8963
|
"onUpdate:modelValue": [
|
|
8964
|
-
m[0] || (m[0] = (
|
|
8965
|
-
m[1] || (m[1] = (
|
|
8964
|
+
m[0] || (m[0] = (U) => w.levelUpSounds = U),
|
|
8965
|
+
m[1] || (m[1] = (U) => c("levelUpSounds", U))
|
|
8966
8966
|
]
|
|
8967
8967
|
}, null, 8, ["modelValue"])
|
|
8968
8968
|
])
|
|
@@ -9004,8 +9004,8 @@ const ti = {
|
|
|
9004
9004
|
id: "milestone-sounds",
|
|
9005
9005
|
modelValue: w.milestoneSounds,
|
|
9006
9006
|
"onUpdate:modelValue": [
|
|
9007
|
-
m[2] || (m[2] = (
|
|
9008
|
-
m[3] || (m[3] = (
|
|
9007
|
+
m[2] || (m[2] = (U) => w.milestoneSounds = U),
|
|
9008
|
+
m[3] || (m[3] = (U) => c("milestoneSounds", U))
|
|
9009
9009
|
]
|
|
9010
9010
|
}, null, 8, ["modelValue"])
|
|
9011
9011
|
])
|
|
@@ -9101,7 +9101,7 @@ const ti = {
|
|
|
9101
9101
|
oe("line", { x1: "3", y1: "10", x2: "21", y2: "10" })
|
|
9102
9102
|
]);
|
|
9103
9103
|
}
|
|
9104
|
-
}, u = M([]), m = M(null),
|
|
9104
|
+
}, u = M([]), m = M(null), U = M(!1), D = M(null), g = Ge({}), N = M(!1), y = H({
|
|
9105
9105
|
get: () => t.modelValue || !1,
|
|
9106
9106
|
set: (T) => l("update:modelValue", T)
|
|
9107
9107
|
});
|
|
@@ -9111,7 +9111,7 @@ const ti = {
|
|
|
9111
9111
|
(typeof t.modelValue > "u" || t.modelValue) && L();
|
|
9112
9112
|
});
|
|
9113
9113
|
const L = async () => {
|
|
9114
|
-
|
|
9114
|
+
U.value = !0, D.value = null;
|
|
9115
9115
|
try {
|
|
9116
9116
|
const T = await z();
|
|
9117
9117
|
if (u.value = T || [], u.value.length > 0) {
|
|
@@ -9124,16 +9124,16 @@ const ti = {
|
|
|
9124
9124
|
} else
|
|
9125
9125
|
m.value = null;
|
|
9126
9126
|
} catch (T) {
|
|
9127
|
-
|
|
9127
|
+
D.value = T instanceof Error ? T.message : "Failed to load sessions", console.error("Failed to load sessions:", T);
|
|
9128
9128
|
} finally {
|
|
9129
|
-
|
|
9129
|
+
U.value = !1;
|
|
9130
9130
|
}
|
|
9131
9131
|
}, F = async (T) => {
|
|
9132
9132
|
g[T] = !0;
|
|
9133
9133
|
try {
|
|
9134
9134
|
await V(T), await L(), l("sessions-updated");
|
|
9135
9135
|
} catch (ae) {
|
|
9136
|
-
console.error("Failed to revoke session:", ae),
|
|
9136
|
+
console.error("Failed to revoke session:", ae), D.value = ae instanceof Error ? ae.message : "Failed to revoke session";
|
|
9137
9137
|
} finally {
|
|
9138
9138
|
g[T] = !1;
|
|
9139
9139
|
}
|
|
@@ -9142,7 +9142,7 @@ const ti = {
|
|
|
9142
9142
|
try {
|
|
9143
9143
|
await C(), await L(), l("sessions-updated");
|
|
9144
9144
|
} catch (T) {
|
|
9145
|
-
console.error("Failed to revoke all other sessions:", T),
|
|
9145
|
+
console.error("Failed to revoke all other sessions:", T), D.value = T instanceof Error ? T.message : "Failed to revoke sessions";
|
|
9146
9146
|
} finally {
|
|
9147
9147
|
N.value = !1;
|
|
9148
9148
|
}
|
|
@@ -9164,7 +9164,7 @@ const ti = {
|
|
|
9164
9164
|
hour: "2-digit",
|
|
9165
9165
|
minute: "2-digit"
|
|
9166
9166
|
}) : "Unknown";
|
|
9167
|
-
return (T, ae) => (a(), ye(
|
|
9167
|
+
return (T, ae) => (a(), ye(i(pt), {
|
|
9168
9168
|
modelValue: y.value,
|
|
9169
9169
|
"onUpdate:modelValue": ae[0] || (ae[0] = (ce) => y.value = ce),
|
|
9170
9170
|
title: "Active Sessions",
|
|
@@ -9172,8 +9172,8 @@ const ti = {
|
|
|
9172
9172
|
}, {
|
|
9173
9173
|
default: _(() => [
|
|
9174
9174
|
e("div", v4, [
|
|
9175
|
-
|
|
9176
|
-
d(
|
|
9175
|
+
U.value ? (a(), o("div", p4, [
|
|
9176
|
+
d(i(ht), { size: 40 }),
|
|
9177
9177
|
ae[1] || (ae[1] = e("p", { class: "loading-text" }, "Loading sessions...", -1))
|
|
9178
9178
|
])) : u.value.length === 0 ? (a(), o("div", f4, [...ae[2] || (ae[2] = [
|
|
9179
9179
|
e("div", { class: "empty-icon" }, [
|
|
@@ -9240,7 +9240,7 @@ const ti = {
|
|
|
9240
9240
|
])
|
|
9241
9241
|
]),
|
|
9242
9242
|
ce.is_current ? I("", !0) : (a(), o("div", T4, [
|
|
9243
|
-
d(
|
|
9243
|
+
d(i(ue), {
|
|
9244
9244
|
variant: "outline",
|
|
9245
9245
|
size: "xs",
|
|
9246
9246
|
onClick: (Ce) => F(ce.id),
|
|
@@ -9282,13 +9282,13 @@ const ti = {
|
|
|
9282
9282
|
], 2))), 128))
|
|
9283
9283
|
]),
|
|
9284
9284
|
u.value.length > 1 ? (a(), o("div", R4, [
|
|
9285
|
-
d(
|
|
9285
|
+
d(i(ue), {
|
|
9286
9286
|
variant: "outline",
|
|
9287
9287
|
onClick: $,
|
|
9288
9288
|
disabled: N.value
|
|
9289
9289
|
}, {
|
|
9290
9290
|
default: _(() => [
|
|
9291
|
-
N.value ? (a(), ye(
|
|
9291
|
+
N.value ? (a(), ye(i(ht), {
|
|
9292
9292
|
key: 0,
|
|
9293
9293
|
size: 16
|
|
9294
9294
|
})) : (a(), o("span", F4, "End All Other Sessions"))
|
|
@@ -9391,7 +9391,7 @@ const ti = {
|
|
|
9391
9391
|
oe("circle", { cx: "16.5", cy: "7.5", r: ".5", fill: "currentColor" })
|
|
9392
9392
|
]);
|
|
9393
9393
|
}
|
|
9394
|
-
}, V = s, C = r, { getSupportEmail: w, getUrl: c } = vt(V.config), { fetchProfile: h, updateProfile: x, changeEmail: S, changeUsername: u, getUsernameCooldown: m, checkUsernameAvailability:
|
|
9394
|
+
}, V = s, C = r, { getSupportEmail: w, getUrl: c } = vt(V.config), { fetchProfile: h, updateProfile: x, changeEmail: S, changeUsername: u, getUsernameCooldown: m, checkUsernameAvailability: U, getUserSessions: D, currentUser: g, currentSession: N, isAuthenticated: y, refreshToken: L, signOut: F } = ft(), { activeMfaDevices: $, fetchMfaDevices: k } = Tt(), O = M(null), q = M(!1), b = H(() => g.value || V.user || O.value), T = M(!1), ae = M(!1), ce = M(!1), Ce = M(!1), xe = M(!1), Ae = M(!1), Se = M(!1), be = M(!1), ne = M(!1), W = M(!1), Z = M(!1), ie = M(null), te = M(""), Y = M(""), le = M([]), _e = M(!1), Te = Ge({
|
|
9395
9395
|
canChange: !0,
|
|
9396
9396
|
cooldownEnd: null,
|
|
9397
9397
|
daysRemaining: 0
|
|
@@ -9520,7 +9520,7 @@ const ti = {
|
|
|
9520
9520
|
if (y.value) {
|
|
9521
9521
|
_e.value = !0;
|
|
9522
9522
|
try {
|
|
9523
|
-
const X = await
|
|
9523
|
+
const X = await D();
|
|
9524
9524
|
le.value = X || [];
|
|
9525
9525
|
} catch (X) {
|
|
9526
9526
|
console.warn("Failed to load sessions (non-critical):", X);
|
|
@@ -9608,7 +9608,7 @@ const ti = {
|
|
|
9608
9608
|
}
|
|
9609
9609
|
Ee.checking = !0, Ee.message = "Checking availability...";
|
|
9610
9610
|
try {
|
|
9611
|
-
const P = await
|
|
9611
|
+
const P = await U(K.username);
|
|
9612
9612
|
if (Ee.available = P.available, Ee.message = P.message, !P.available) {
|
|
9613
9613
|
K.errors.username = "Username is not available";
|
|
9614
9614
|
return;
|
|
@@ -9744,7 +9744,7 @@ const ti = {
|
|
|
9744
9744
|
}
|
|
9745
9745
|
}), (X, P) => (a(), o(De, null, [
|
|
9746
9746
|
e("div", K4, [
|
|
9747
|
-
d(
|
|
9747
|
+
d(i(_t), {
|
|
9748
9748
|
variant: s.inModal ? "simple" : "modern",
|
|
9749
9749
|
color: s.inModal ? "default" : "secondary",
|
|
9750
9750
|
class: Me(s.inModal ? "profile-container-modal profile-container-width" : "profile-container profile-container-width profile-max-width profile-centered profile-animated")
|
|
@@ -9758,7 +9758,7 @@ const ti = {
|
|
|
9758
9758
|
e("div", Y4, [
|
|
9759
9759
|
e("div", W4, [
|
|
9760
9760
|
e("div", Q4, [
|
|
9761
|
-
d(
|
|
9761
|
+
d(i(Sa), {
|
|
9762
9762
|
size: 140,
|
|
9763
9763
|
value: b.value?.xp || 0,
|
|
9764
9764
|
max: b.value?.next_level_xp || 1,
|
|
@@ -9781,7 +9781,7 @@ const ti = {
|
|
|
9781
9781
|
onClick: sa,
|
|
9782
9782
|
disabled: ae.value
|
|
9783
9783
|
}, [
|
|
9784
|
-
ae.value ? (a(), ye(
|
|
9784
|
+
ae.value ? (a(), ye(i(ht), {
|
|
9785
9785
|
key: 0,
|
|
9786
9786
|
size: 24,
|
|
9787
9787
|
variant: "spinner"
|
|
@@ -9818,7 +9818,7 @@ const ti = {
|
|
|
9818
9818
|
e("div", s0, [
|
|
9819
9819
|
e("div", o0, [
|
|
9820
9820
|
P[17] || (P[17] = e("h3", { class: "profile-section-title" }, "Personal Information", -1)),
|
|
9821
|
-
d(
|
|
9821
|
+
d(i(Fe), {
|
|
9822
9822
|
id: "firstName",
|
|
9823
9823
|
modelValue: re.firstName,
|
|
9824
9824
|
"onUpdate:modelValue": P[0] || (P[0] = (we) => re.firstName = we),
|
|
@@ -9829,7 +9829,7 @@ const ti = {
|
|
|
9829
9829
|
disabled: T.value || q.value,
|
|
9830
9830
|
error: he.firstName
|
|
9831
9831
|
}, null, 8, ["modelValue", "disabled", "error"]),
|
|
9832
|
-
d(
|
|
9832
|
+
d(i(Fe), {
|
|
9833
9833
|
id: "lastName",
|
|
9834
9834
|
modelValue: re.lastName,
|
|
9835
9835
|
"onUpdate:modelValue": P[1] || (P[1] = (we) => re.lastName = we),
|
|
@@ -9846,7 +9846,7 @@ const ti = {
|
|
|
9846
9846
|
P[15] || (P[15] = e("h4", { class: "profile-setting-title" }, "Email Address", -1)),
|
|
9847
9847
|
e("p", i0, R(b.value?.email), 1)
|
|
9848
9848
|
]),
|
|
9849
|
-
d(
|
|
9849
|
+
d(i(ue), {
|
|
9850
9850
|
color: "secondary",
|
|
9851
9851
|
size: "sm",
|
|
9852
9852
|
onClick: P[2] || (P[2] = (we) => xe.value = !xe.value)
|
|
@@ -9860,7 +9860,7 @@ const ti = {
|
|
|
9860
9860
|
d(rt, { name: "expand" }, {
|
|
9861
9861
|
default: _(() => [
|
|
9862
9862
|
xe.value ? (a(), o("div", r0, [
|
|
9863
|
-
d(
|
|
9863
|
+
d(i(Fe), {
|
|
9864
9864
|
modelValue: ve.newEmail,
|
|
9865
9865
|
"onUpdate:modelValue": P[3] || (P[3] = (we) => ve.newEmail = we),
|
|
9866
9866
|
type: "email",
|
|
@@ -9868,7 +9868,7 @@ const ti = {
|
|
|
9868
9868
|
autocomplete: "email",
|
|
9869
9869
|
error: ve.errors.newEmail
|
|
9870
9870
|
}, null, 8, ["modelValue", "error"]),
|
|
9871
|
-
d(
|
|
9871
|
+
d(i(Fe), {
|
|
9872
9872
|
modelValue: ve.password,
|
|
9873
9873
|
"onUpdate:modelValue": P[4] || (P[4] = (we) => ve.password = we),
|
|
9874
9874
|
type: "password",
|
|
@@ -9876,7 +9876,7 @@ const ti = {
|
|
|
9876
9876
|
autocomplete: "current-password",
|
|
9877
9877
|
error: ve.errors.password
|
|
9878
9878
|
}, null, 8, ["modelValue", "error"]),
|
|
9879
|
-
d(
|
|
9879
|
+
d(i(ue), {
|
|
9880
9880
|
color: "secondary",
|
|
9881
9881
|
size: "sm",
|
|
9882
9882
|
onClick: It,
|
|
@@ -9898,7 +9898,7 @@ const ti = {
|
|
|
9898
9898
|
P[16] || (P[16] = e("h4", { class: "profile-field-title" }, "Username", -1)),
|
|
9899
9899
|
e("p", d0, R(b.value?.username || "No username set"), 1)
|
|
9900
9900
|
]),
|
|
9901
|
-
d(
|
|
9901
|
+
d(i(ue), {
|
|
9902
9902
|
color: "secondary",
|
|
9903
9903
|
size: "sm",
|
|
9904
9904
|
disabled: !Te.canChange || be.value,
|
|
@@ -9913,7 +9913,7 @@ const ti = {
|
|
|
9913
9913
|
d(rt, { name: "expand" }, {
|
|
9914
9914
|
default: _(() => [
|
|
9915
9915
|
Se.value ? (a(), o("div", v0, [
|
|
9916
|
-
d(
|
|
9916
|
+
d(i(Fe), {
|
|
9917
9917
|
modelValue: K.username,
|
|
9918
9918
|
"onUpdate:modelValue": P[5] || (P[5] = (we) => K.username = we),
|
|
9919
9919
|
type: "text",
|
|
@@ -9925,7 +9925,7 @@ const ti = {
|
|
|
9925
9925
|
key: 0,
|
|
9926
9926
|
class: Me(["profile-availability-message", Ee.available ? "success" : "error"])
|
|
9927
9927
|
}, R(Ee.message), 3)) : I("", !0),
|
|
9928
|
-
d(
|
|
9928
|
+
d(i(ue), {
|
|
9929
9929
|
color: "secondary",
|
|
9930
9930
|
size: "sm",
|
|
9931
9931
|
onClick: ga,
|
|
@@ -9950,7 +9950,7 @@ const ti = {
|
|
|
9950
9950
|
P[18] || (P[18] = e("h4", { class: "profile-field-title" }, "Password", -1)),
|
|
9951
9951
|
e("p", h0, "Last updated " + R(Ne.value), 1)
|
|
9952
9952
|
]),
|
|
9953
|
-
d(
|
|
9953
|
+
d(i(ue), {
|
|
9954
9954
|
color: "secondary",
|
|
9955
9955
|
size: "sm",
|
|
9956
9956
|
onClick: P[6] || (P[6] = (we) => Ce.value = !Ce.value)
|
|
@@ -9964,28 +9964,28 @@ const ti = {
|
|
|
9964
9964
|
d(rt, { name: "expand" }, {
|
|
9965
9965
|
default: _(() => [
|
|
9966
9966
|
Ce.value ? (a(), o("div", g0, [
|
|
9967
|
-
d(
|
|
9967
|
+
d(i(Fe), {
|
|
9968
9968
|
modelValue: Ie.current,
|
|
9969
9969
|
"onUpdate:modelValue": P[7] || (P[7] = (we) => Ie.current = we),
|
|
9970
9970
|
type: "password",
|
|
9971
9971
|
placeholder: "Current password",
|
|
9972
9972
|
autocomplete: "current-password"
|
|
9973
9973
|
}, null, 8, ["modelValue"]),
|
|
9974
|
-
d(
|
|
9974
|
+
d(i(Fe), {
|
|
9975
9975
|
modelValue: Ie.new,
|
|
9976
9976
|
"onUpdate:modelValue": P[8] || (P[8] = (we) => Ie.new = we),
|
|
9977
9977
|
type: "password",
|
|
9978
9978
|
placeholder: "New password",
|
|
9979
9979
|
autocomplete: "new-password"
|
|
9980
9980
|
}, null, 8, ["modelValue"]),
|
|
9981
|
-
d(
|
|
9981
|
+
d(i(Fe), {
|
|
9982
9982
|
modelValue: Ie.confirm,
|
|
9983
9983
|
"onUpdate:modelValue": P[9] || (P[9] = (we) => Ie.confirm = we),
|
|
9984
9984
|
type: "password",
|
|
9985
9985
|
placeholder: "Confirm new password",
|
|
9986
9986
|
autocomplete: "new-password"
|
|
9987
9987
|
}, null, 8, ["modelValue"]),
|
|
9988
|
-
d(
|
|
9988
|
+
d(i(ue), {
|
|
9989
9989
|
color: "secondary",
|
|
9990
9990
|
size: "sm",
|
|
9991
9991
|
onClick: Vt,
|
|
@@ -10022,7 +10022,7 @@ const ti = {
|
|
|
10022
10022
|
], 2))), 128))
|
|
10023
10023
|
])) : I("", !0)
|
|
10024
10024
|
]),
|
|
10025
|
-
d(
|
|
10025
|
+
d(i(ue), {
|
|
10026
10026
|
color: "secondary",
|
|
10027
10027
|
size: "sm",
|
|
10028
10028
|
class: "profile-toggle-container",
|
|
@@ -10044,7 +10044,7 @@ const ti = {
|
|
|
10044
10044
|
])
|
|
10045
10045
|
]),
|
|
10046
10046
|
e("div", _0, [
|
|
10047
|
-
d(
|
|
10047
|
+
d(i(ue), {
|
|
10048
10048
|
color: "secondary",
|
|
10049
10049
|
size: "sm",
|
|
10050
10050
|
disabled: _e.value,
|
|
@@ -10061,7 +10061,7 @@ const ti = {
|
|
|
10061
10061
|
])
|
|
10062
10062
|
]),
|
|
10063
10063
|
Q.value ? (a(), o("div", T0, [
|
|
10064
|
-
d(
|
|
10064
|
+
d(i(ue), {
|
|
10065
10065
|
type: "submit",
|
|
10066
10066
|
disabled: T.value,
|
|
10067
10067
|
loading: T.value
|
|
@@ -10071,7 +10071,7 @@ const ti = {
|
|
|
10071
10071
|
]),
|
|
10072
10072
|
_: 1
|
|
10073
10073
|
}, 8, ["disabled", "loading"]),
|
|
10074
|
-
d(
|
|
10074
|
+
d(i(ue), {
|
|
10075
10075
|
color: "secondary",
|
|
10076
10076
|
onClick: ra,
|
|
10077
10077
|
disabled: T.value
|
|
@@ -10124,7 +10124,7 @@ const ti = {
|
|
|
10124
10124
|
}, {
|
|
10125
10125
|
default: _(() => [
|
|
10126
10126
|
e("div", N0, [
|
|
10127
|
-
d(
|
|
10127
|
+
d(i(ue), {
|
|
10128
10128
|
color: "danger",
|
|
10129
10129
|
onClick: ca,
|
|
10130
10130
|
disabled: ce.value
|
|
@@ -10136,7 +10136,7 @@ const ti = {
|
|
|
10136
10136
|
}, 8, ["disabled"]),
|
|
10137
10137
|
d(d4, { onSettingsUpdated: Dt }, {
|
|
10138
10138
|
trigger: _(() => [
|
|
10139
|
-
d(
|
|
10139
|
+
d(i(ue), {
|
|
10140
10140
|
color: "secondary",
|
|
10141
10141
|
icon: ""
|
|
10142
10142
|
}, {
|
|
@@ -10167,12 +10167,12 @@ const ti = {
|
|
|
10167
10167
|
_: 1
|
|
10168
10168
|
})
|
|
10169
10169
|
]),
|
|
10170
|
-
|
|
10170
|
+
i(w)() ? (a(), o("div", B0, [
|
|
10171
10171
|
e("p", P0, [
|
|
10172
10172
|
P[29] || (P[29] = J(" Need help? ", -1)),
|
|
10173
|
-
d(
|
|
10173
|
+
d(i(mt), {
|
|
10174
10174
|
variant: "primary",
|
|
10175
|
-
href: `mailto:${
|
|
10175
|
+
href: `mailto:${i(w)()}`
|
|
10176
10176
|
}, {
|
|
10177
10177
|
default: _(() => [...P[28] || (P[28] = [
|
|
10178
10178
|
J(" Contact Support ", -1)
|
|
@@ -10209,7 +10209,7 @@ const ti = {
|
|
|
10209
10209
|
], -1)
|
|
10210
10210
|
])])
|
|
10211
10211
|
]),
|
|
10212
|
-
d(
|
|
10212
|
+
d(i(Os), {
|
|
10213
10213
|
uploading: ae.value,
|
|
10214
10214
|
"preselected-file": ie.value,
|
|
10215
10215
|
onUpload: la,
|
|
@@ -10258,7 +10258,7 @@ const ti = {
|
|
|
10258
10258
|
};
|
|
10259
10259
|
return (x, S) => (a(), o("div", Z0, [
|
|
10260
10260
|
e("div", K0, [
|
|
10261
|
-
d(
|
|
10261
|
+
d(i(_t), {
|
|
10262
10262
|
variant: "modern",
|
|
10263
10263
|
color: "secondary"
|
|
10264
10264
|
}, {
|
|
@@ -10271,7 +10271,7 @@ const ti = {
|
|
|
10271
10271
|
onSubmit: qe(h, ["prevent"]),
|
|
10272
10272
|
class: "accui-space-y-6"
|
|
10273
10273
|
}, [
|
|
10274
|
-
d(
|
|
10274
|
+
d(i(Fe), {
|
|
10275
10275
|
id: "email",
|
|
10276
10276
|
modelValue: c.email,
|
|
10277
10277
|
"onUpdate:modelValue": S[0] || (S[0] = (u) => c.email = u),
|
|
@@ -10283,7 +10283,7 @@ const ti = {
|
|
|
10283
10283
|
disabled: V.value || w.value,
|
|
10284
10284
|
error: C.value ? "Email address not found" : void 0
|
|
10285
10285
|
}, null, 8, ["modelValue", "disabled", "error"]),
|
|
10286
|
-
d(
|
|
10286
|
+
d(i(ue), {
|
|
10287
10287
|
type: "submit",
|
|
10288
10288
|
variant: "primary",
|
|
10289
10289
|
"full-width": "",
|
|
@@ -10297,13 +10297,13 @@ const ti = {
|
|
|
10297
10297
|
_: 1
|
|
10298
10298
|
}, 8, ["disabled", "loading"])
|
|
10299
10299
|
], 32),
|
|
10300
|
-
w.value ? (a(), ye(
|
|
10300
|
+
w.value ? (a(), ye(i(Et), {
|
|
10301
10301
|
key: 0,
|
|
10302
10302
|
variant: "success",
|
|
10303
10303
|
message: `Check your email - We've sent a password reset link to ${c.email}`,
|
|
10304
10304
|
class: "accui-mt-6 accui-animate-fade-in"
|
|
10305
10305
|
}, null, 8, ["message"])) : I("", !0),
|
|
10306
|
-
C.value ? (a(), ye(
|
|
10306
|
+
C.value ? (a(), ye(i(Et), {
|
|
10307
10307
|
key: 1,
|
|
10308
10308
|
variant: "error",
|
|
10309
10309
|
message: C.value,
|
|
@@ -10312,7 +10312,7 @@ const ti = {
|
|
|
10312
10312
|
onDismiss: S[1] || (S[1] = (u) => C.value = "")
|
|
10313
10313
|
}, null, 8, ["message"])) : I("", !0),
|
|
10314
10314
|
e("div", G0, [
|
|
10315
|
-
d(
|
|
10315
|
+
d(i(mt), {
|
|
10316
10316
|
onClick: S[2] || (S[2] = (u) => x.$emit("back-to-signin")),
|
|
10317
10317
|
class: "accui-inline-flex accui-items-center accui-gap-2"
|
|
10318
10318
|
}, {
|
|
@@ -10339,12 +10339,12 @@ const ti = {
|
|
|
10339
10339
|
config: t.config
|
|
10340
10340
|
}, {
|
|
10341
10341
|
default: _(() => [
|
|
10342
|
-
|
|
10342
|
+
i(z)() ? (a(), o("div", Y0, [
|
|
10343
10343
|
e("p", W0, [
|
|
10344
10344
|
S[5] || (S[5] = J(" Need help? ", -1)),
|
|
10345
|
-
d(
|
|
10345
|
+
d(i(mt), {
|
|
10346
10346
|
variant: "primary",
|
|
10347
|
-
href: `mailto:${
|
|
10347
|
+
href: `mailto:${i(z)()}`
|
|
10348
10348
|
}, {
|
|
10349
10349
|
default: _(() => [...S[4] || (S[4] = [
|
|
10350
10350
|
J(" Contact Support ", -1)
|
|
@@ -10372,42 +10372,38 @@ const ti = {
|
|
|
10372
10372
|
__name: "SignedIn",
|
|
10373
10373
|
props: {
|
|
10374
10374
|
showFallback: { type: Boolean, default: !0 },
|
|
10375
|
-
invert: { type: Boolean, default: !1 },
|
|
10376
10375
|
inline: { type: Boolean, default: !1 }
|
|
10377
10376
|
},
|
|
10378
10377
|
emits: ["sign-in-required"],
|
|
10379
10378
|
setup(s, { emit: r }) {
|
|
10380
|
-
const t =
|
|
10381
|
-
Ye(() => {
|
|
10382
|
-
|
|
10383
|
-
w.value = !0;
|
|
10384
|
-
}, 100);
|
|
10379
|
+
const t = r, l = M(!1), { isAuthenticated: z, isInitializing: V, user: C, signOut: w, initialize: c } = ft(), h = H(() => V.value || !l.value), x = H(() => !h.value && z.value), S = H(() => !h.value && !z.value);
|
|
10380
|
+
Ye(async () => {
|
|
10381
|
+
await c(), l.value = !0;
|
|
10385
10382
|
});
|
|
10386
|
-
const
|
|
10387
|
-
|
|
10383
|
+
const u = () => {
|
|
10384
|
+
t("sign-in-required");
|
|
10388
10385
|
};
|
|
10389
|
-
return (
|
|
10386
|
+
return (m, U) => x.value ? (a(), o("div", {
|
|
10390
10387
|
key: 0,
|
|
10391
10388
|
class: Me(["animate-fade-in", s.inline ? "is_inline" : ""])
|
|
10392
10389
|
}, [
|
|
10393
|
-
Pe(
|
|
10394
|
-
user:
|
|
10395
|
-
signOut:
|
|
10396
|
-
invert: n(l)
|
|
10390
|
+
Pe(m.$slots, "default", {
|
|
10391
|
+
user: i(C),
|
|
10392
|
+
signOut: i(w)
|
|
10397
10393
|
}, void 0, !0)
|
|
10398
|
-
], 2)) :
|
|
10399
|
-
Pe(
|
|
10394
|
+
], 2)) : S.value && s.showFallback ? (a(), o("div", X0, [
|
|
10395
|
+
Pe(m.$slots, "fallback", { signIn: u }, () => [
|
|
10400
10396
|
e("div", { class: "signed-in-fallback" }, [
|
|
10401
|
-
|
|
10397
|
+
U[0] || (U[0] = Qt('<div class="signed-in-icon-container" data-v-91532ed4><svg class="signed-in-icon" fill="none" stroke="currentColor" viewBox="0 0 24 24" data-v-91532ed4><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z" data-v-91532ed4></path></svg></div><h3 class="signed-in-title" data-v-91532ed4>Sign in required</h3><p class="signed-in-subtitle" data-v-91532ed4>You need to be signed in to access this content.</p>', 3)),
|
|
10402
10398
|
e("button", {
|
|
10403
|
-
onClick:
|
|
10399
|
+
onClick: u,
|
|
10404
10400
|
class: "signed-in-button"
|
|
10405
10401
|
}, " Sign in ")
|
|
10406
10402
|
])
|
|
10407
10403
|
], !0)
|
|
10408
|
-
])) :
|
|
10409
|
-
Pe(
|
|
10410
|
-
d(
|
|
10404
|
+
])) : h.value ? (a(), o("div", J0, [
|
|
10405
|
+
Pe(m.$slots, "loading", {}, () => [
|
|
10406
|
+
d(i(ht), {
|
|
10411
10407
|
size: 30,
|
|
10412
10408
|
variant: "circle",
|
|
10413
10409
|
"show-particles": !0
|
|
@@ -10415,7 +10411,7 @@ const ti = {
|
|
|
10415
10411
|
], !0)
|
|
10416
10412
|
])) : I("", !0);
|
|
10417
10413
|
}
|
|
10418
|
-
}), tc = /* @__PURE__ */ Ue(ec, [["__scopeId", "data-v-
|
|
10414
|
+
}), tc = /* @__PURE__ */ Ue(ec, [["__scopeId", "data-v-91532ed4"]]), Cu = /* @__PURE__ */ Ve({
|
|
10419
10415
|
__name: "StrandsConfigProvider",
|
|
10420
10416
|
props: {
|
|
10421
10417
|
config: {}
|
|
@@ -10584,7 +10580,7 @@ const ti = {
|
|
|
10584
10580
|
},
|
|
10585
10581
|
emits: ["profile-updated", "signed-out", "signed-in"],
|
|
10586
10582
|
setup(s, { emit: r }) {
|
|
10587
|
-
const t = s, l = r, { currentUser: z, signOut: V, isAuthenticated: C } = ft(), w = M(!1), c = M(!1), h = M(!1), x = M(), S = M(), u = M(), m = H(() => S.value), { floatingStyle:
|
|
10583
|
+
const t = s, l = r, { currentUser: z, signOut: V, isAuthenticated: C } = ft(), w = M(!1), c = M(!1), h = M(!1), x = M(), S = M(), u = M(), m = H(() => S.value), { floatingStyle: U, updatePosition: D } = ja({
|
|
10588
10584
|
trigger: m,
|
|
10589
10585
|
floating: u,
|
|
10590
10586
|
placement: "bottom-end",
|
|
@@ -10631,7 +10627,7 @@ const ti = {
|
|
|
10631
10627
|
}
|
|
10632
10628
|
}), y = H(() => t.user ? t.user : C.value ? z.value : null), L = H(() => y.value ? y.value.username ? y.value.username : y.value.firstName && y.value.lastName ? `${y.value.firstName} ${y.value.lastName}` : y.value.firstName ? y.value.firstName : y.value.email || "User" : "User"), F = () => {
|
|
10633
10629
|
w.value = !w.value, w.value && yt(() => {
|
|
10634
|
-
|
|
10630
|
+
D();
|
|
10635
10631
|
});
|
|
10636
10632
|
}, $ = () => {
|
|
10637
10633
|
w.value = !0;
|
|
@@ -10667,7 +10663,7 @@ const ti = {
|
|
|
10667
10663
|
invert: !!t.user
|
|
10668
10664
|
}, {
|
|
10669
10665
|
fallback: _(() => [
|
|
10670
|
-
d(
|
|
10666
|
+
d(i(ue), {
|
|
10671
10667
|
onClick: xe,
|
|
10672
10668
|
"aria-label": "Sign in"
|
|
10673
10669
|
}, {
|
|
@@ -10691,13 +10687,13 @@ const ti = {
|
|
|
10691
10687
|
]),
|
|
10692
10688
|
_: 1
|
|
10693
10689
|
}),
|
|
10694
|
-
d(
|
|
10690
|
+
d(i(pt), {
|
|
10695
10691
|
modelValue: h.value,
|
|
10696
10692
|
"onUpdate:modelValue": W[1] || (W[1] = (Z) => h.value = Z)
|
|
10697
10693
|
}, {
|
|
10698
10694
|
default: _(() => [
|
|
10699
10695
|
e("div", Mc, [
|
|
10700
|
-
d(
|
|
10696
|
+
d(i(Ai), {
|
|
10701
10697
|
onSignedIn: Ae,
|
|
10702
10698
|
onError: Se,
|
|
10703
10699
|
"redirect-url": s.redirectUrl,
|
|
@@ -10734,7 +10730,7 @@ const ti = {
|
|
|
10734
10730
|
"aria-label": "User menu"
|
|
10735
10731
|
}, [
|
|
10736
10732
|
e("div", oc, [
|
|
10737
|
-
d(
|
|
10733
|
+
d(i(Sa), {
|
|
10738
10734
|
size: N.value,
|
|
10739
10735
|
value: y.value?.xp || 0,
|
|
10740
10736
|
max: y.value?.next_level_xp || 100,
|
|
@@ -10788,7 +10784,7 @@ const ti = {
|
|
|
10788
10784
|
ref: S,
|
|
10789
10785
|
class: Me(["user-button-wrapper", { "full-width": s.fullWidth }])
|
|
10790
10786
|
}, [
|
|
10791
|
-
d(
|
|
10787
|
+
d(i(ue), {
|
|
10792
10788
|
color: "secondary",
|
|
10793
10789
|
size: s.size,
|
|
10794
10790
|
active: w.value,
|
|
@@ -10853,7 +10849,7 @@ const ti = {
|
|
|
10853
10849
|
ref_key: "dropdownRef",
|
|
10854
10850
|
ref: u,
|
|
10855
10851
|
class: "strands-user-dropdown",
|
|
10856
|
-
style: je(
|
|
10852
|
+
style: je(i(U)),
|
|
10857
10853
|
role: "menu",
|
|
10858
10854
|
"aria-orientation": "vertical",
|
|
10859
10855
|
onKeydown: [
|
|
@@ -10867,7 +10863,7 @@ const ti = {
|
|
|
10867
10863
|
e("div", fc, [
|
|
10868
10864
|
s.variant !== "mini-profile" ? (a(), o("div", mc, [
|
|
10869
10865
|
y.value ? (a(), o("div", hc, [
|
|
10870
|
-
d(
|
|
10866
|
+
d(i(Sa), {
|
|
10871
10867
|
size: 80,
|
|
10872
10868
|
value: y.value.xp,
|
|
10873
10869
|
max: y.value.next_level_xp,
|
|
@@ -10904,9 +10900,9 @@ const ti = {
|
|
|
10904
10900
|
])) : I("", !0),
|
|
10905
10901
|
Pe(ne.$slots, "default", {}, void 0, !0),
|
|
10906
10902
|
s.variant !== "mini-profile" ? (a(), o("div", bc)) : I("", !0),
|
|
10907
|
-
d(
|
|
10903
|
+
d(i(pa), null, {
|
|
10908
10904
|
default: _(() => [
|
|
10909
|
-
d(
|
|
10905
|
+
d(i(pa).Item, {
|
|
10910
10906
|
color: "secondary",
|
|
10911
10907
|
onClick: ae
|
|
10912
10908
|
}, {
|
|
@@ -10915,7 +10911,7 @@ const ti = {
|
|
|
10915
10911
|
])]),
|
|
10916
10912
|
_: 1
|
|
10917
10913
|
}),
|
|
10918
|
-
d(
|
|
10914
|
+
d(i(pa).Item, {
|
|
10919
10915
|
color: "danger",
|
|
10920
10916
|
onClick: be
|
|
10921
10917
|
}, {
|
|
@@ -10930,12 +10926,12 @@ const ti = {
|
|
|
10930
10926
|
])
|
|
10931
10927
|
], 44, pc)) : I("", !0)
|
|
10932
10928
|
])),
|
|
10933
|
-
d(
|
|
10929
|
+
d(i(pt), {
|
|
10934
10930
|
modelValue: c.value,
|
|
10935
10931
|
"onUpdate:modelValue": W[0] || (W[0] = (Z) => c.value = Z)
|
|
10936
10932
|
}, {
|
|
10937
10933
|
default: _(() => [
|
|
10938
|
-
d(
|
|
10934
|
+
d(i(q0), {
|
|
10939
10935
|
user: y.value,
|
|
10940
10936
|
onProfileUpdated: ce,
|
|
10941
10937
|
onError: Ce,
|
|
@@ -11021,8 +11017,8 @@ const ti = {
|
|
|
11021
11017
|
}), c = () => {
|
|
11022
11018
|
try {
|
|
11023
11019
|
const m = t.default?.();
|
|
11024
|
-
return m ? m.map((
|
|
11025
|
-
(
|
|
11020
|
+
return m ? m.map((U) => typeof U.children == "string" ? U.children : U.children && Array.isArray(U.children) ? U.children.map(
|
|
11021
|
+
(D) => typeof D == "string" ? D : ""
|
|
11026
11022
|
).join("") : "").join("").trim() : "";
|
|
11027
11023
|
} catch {
|
|
11028
11024
|
return "";
|
|
@@ -11034,12 +11030,12 @@ const ti = {
|
|
|
11034
11030
|
], x = () => {
|
|
11035
11031
|
r.disabled;
|
|
11036
11032
|
}, S = (m) => {
|
|
11037
|
-
const
|
|
11033
|
+
const U = {
|
|
11038
11034
|
dashboard: "M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6",
|
|
11039
11035
|
settings: "M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z M15 12a3 3 0 11-6 0 3 3 0 016 0z",
|
|
11040
11036
|
help: "M8.228 9c.549-1.165 2.03-2 3.772-2 2.21 0 4 1.343 4 3 0 1.4-1.278 2.575-3.006 2.907-.542.104-.994.54-.994 1.093m0 3h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"
|
|
11041
11037
|
};
|
|
11042
|
-
return
|
|
11038
|
+
return U[m] || U.dashboard;
|
|
11043
11039
|
}, u = H(() => ({
|
|
11044
11040
|
id: V.value,
|
|
11045
11041
|
label: c(),
|
|
@@ -11055,7 +11051,7 @@ const ti = {
|
|
|
11055
11051
|
z && z(V.value);
|
|
11056
11052
|
}), Le(() => [r.to, r.icon, r.disabled], () => {
|
|
11057
11053
|
l && l(u.value);
|
|
11058
|
-
}, { deep: !0 }), (m,
|
|
11054
|
+
}, { deep: !0 }), (m, U) => (a(), ye(i(ue), {
|
|
11059
11055
|
to: r.to,
|
|
11060
11056
|
onClick: x,
|
|
11061
11057
|
class: Me(h()),
|
|
@@ -11119,14 +11115,14 @@ const Ic = { class: "accui-p-2 accui-border-b" }, Lc = /* @__PURE__ */ Ve({
|
|
|
11119
11115
|
end: Math.min(t.items.length - 1, m + t.overscan)
|
|
11120
11116
|
};
|
|
11121
11117
|
}), C = H(() => {
|
|
11122
|
-
const { start: u, end: m } = V.value,
|
|
11123
|
-
for (let
|
|
11124
|
-
|
|
11125
|
-
index:
|
|
11126
|
-
data: t.items[
|
|
11127
|
-
top:
|
|
11118
|
+
const { start: u, end: m } = V.value, U = [];
|
|
11119
|
+
for (let D = u; D <= m; D++)
|
|
11120
|
+
U.push({
|
|
11121
|
+
index: D,
|
|
11122
|
+
data: t.items[D],
|
|
11123
|
+
top: D * t.itemHeight
|
|
11128
11124
|
});
|
|
11129
|
-
return
|
|
11125
|
+
return U;
|
|
11130
11126
|
}), w = H(() => t.items.length * t.itemHeight), c = (u) => typeof t.itemKey == "function" ? t.itemKey(u) : u[t.itemKey] || u.id || Math.random();
|
|
11131
11127
|
let h = null;
|
|
11132
11128
|
const x = (u) => {
|
|
@@ -11140,8 +11136,8 @@ const Ic = { class: "accui-p-2 accui-border-b" }, Lc = /* @__PURE__ */ Ve({
|
|
|
11140
11136
|
}), r({
|
|
11141
11137
|
scrollToItem: (u, m = "start") => {
|
|
11142
11138
|
if (!l.value) return;
|
|
11143
|
-
let
|
|
11144
|
-
m === "center" ?
|
|
11139
|
+
let U = u * t.itemHeight;
|
|
11140
|
+
m === "center" ? U -= t.containerHeight / 2 - t.itemHeight / 2 : m === "end" && (U -= t.containerHeight - t.itemHeight), l.value.scrollTop = Math.max(0, U);
|
|
11145
11141
|
}
|
|
11146
11142
|
}), (u, m) => (a(), o("div", {
|
|
11147
11143
|
ref_key: "scrollContainer",
|
|
@@ -11153,21 +11149,21 @@ const Ic = { class: "accui-p-2 accui-border-b" }, Lc = /* @__PURE__ */ Ve({
|
|
|
11153
11149
|
e("div", {
|
|
11154
11150
|
style: je({ height: w.value + "px", position: "relative" })
|
|
11155
11151
|
}, [
|
|
11156
|
-
(a(!0), o(De, null, Ze(C.value, (
|
|
11157
|
-
key: c(
|
|
11152
|
+
(a(!0), o(De, null, Ze(C.value, (U) => (a(), o("div", {
|
|
11153
|
+
key: c(U.data),
|
|
11158
11154
|
style: je({
|
|
11159
11155
|
position: "absolute",
|
|
11160
|
-
top:
|
|
11156
|
+
top: U.top + "px",
|
|
11161
11157
|
left: 0,
|
|
11162
11158
|
right: 0,
|
|
11163
11159
|
height: s.itemHeight + "px"
|
|
11164
11160
|
})
|
|
11165
11161
|
}, [
|
|
11166
11162
|
Pe(u.$slots, "default", {
|
|
11167
|
-
item:
|
|
11168
|
-
index:
|
|
11163
|
+
item: U.data,
|
|
11164
|
+
index: U.index
|
|
11169
11165
|
}, () => [
|
|
11170
|
-
e("div", Ic, R(JSON.stringify(
|
|
11166
|
+
e("div", Ic, R(JSON.stringify(U.data)), 1)
|
|
11171
11167
|
], !0)
|
|
11172
11168
|
], 4))), 128))
|
|
11173
11169
|
], 4)
|
|
@@ -11278,7 +11274,7 @@ const Ic = { class: "accui-p-2 accui-border-b" }, Lc = /* @__PURE__ */ Ve({
|
|
|
11278
11274
|
set: (O) => {
|
|
11279
11275
|
O || w("close");
|
|
11280
11276
|
}
|
|
11281
|
-
}), m = M(!1),
|
|
11277
|
+
}), m = M(!1), U = M(!1), D = M(!1), g = M(!1);
|
|
11282
11278
|
Le(() => C.show, async (O) => {
|
|
11283
11279
|
O && await S();
|
|
11284
11280
|
}), Ye(async () => {
|
|
@@ -11289,11 +11285,11 @@ const Ic = { class: "accui-p-2 accui-border-b" }, Lc = /* @__PURE__ */ Ve({
|
|
|
11289
11285
|
}, y = () => {
|
|
11290
11286
|
m.value = !0;
|
|
11291
11287
|
}, L = () => {
|
|
11292
|
-
|
|
11288
|
+
U.value = !0;
|
|
11293
11289
|
}, F = () => {
|
|
11294
11290
|
g.value = !0;
|
|
11295
11291
|
}, $ = async () => {
|
|
11296
|
-
m.value = !1,
|
|
11292
|
+
m.value = !1, U.value = !1, D.value = !1, await S(), w("success");
|
|
11297
11293
|
}, k = async () => {
|
|
11298
11294
|
await S();
|
|
11299
11295
|
};
|
|
@@ -11311,17 +11307,17 @@ const Ic = { class: "accui-p-2 accui-border-b" }, Lc = /* @__PURE__ */ Ve({
|
|
|
11311
11307
|
], -1)),
|
|
11312
11308
|
e("div", Uc, [
|
|
11313
11309
|
e("span", {
|
|
11314
|
-
class: Me(["mfa-setup-status-badge",
|
|
11315
|
-
}, R(
|
|
11310
|
+
class: Me(["mfa-setup-status-badge", i(c) || i(x).length > 0 ? "mfa-setup-status-enabled" : "mfa-setup-status-disabled"])
|
|
11311
|
+
}, R(i(c) || i(x).length > 0 ? "Enabled" : "Not Enabled"), 3)
|
|
11316
11312
|
])
|
|
11317
11313
|
])
|
|
11318
11314
|
]),
|
|
11319
11315
|
footer: _(() => [
|
|
11320
11316
|
e("div", Qc, [
|
|
11321
|
-
d(
|
|
11317
|
+
d(i(ue), {
|
|
11322
11318
|
variant: "secondary",
|
|
11323
11319
|
onClick: N,
|
|
11324
|
-
disabled:
|
|
11320
|
+
disabled: i(h)
|
|
11325
11321
|
}, {
|
|
11326
11322
|
default: _(() => [...q[15] || (q[15] = [
|
|
11327
11323
|
J(" Cancel ", -1)
|
|
@@ -11332,11 +11328,11 @@ const Ic = { class: "accui-p-2 accui-border-b" }, Lc = /* @__PURE__ */ Ve({
|
|
|
11332
11328
|
]),
|
|
11333
11329
|
default: _(() => [
|
|
11334
11330
|
e("div", Dc, [
|
|
11335
|
-
|
|
11336
|
-
d(
|
|
11331
|
+
i(h) ? (a(), o("div", Nc, [
|
|
11332
|
+
d(i(ht), { size: 32 }),
|
|
11337
11333
|
q[6] || (q[6] = e("span", { class: "mfa-setup-loading-text" }, "Loading MFA settings...", -1))
|
|
11338
11334
|
])) : (a(), o("div", Bc, [
|
|
11339
|
-
|
|
11335
|
+
i(c) || i(x).length > 0 ? (a(), o("div", Pc, [
|
|
11340
11336
|
e("div", jc, [
|
|
11341
11337
|
e("div", Oc, [
|
|
11342
11338
|
d(z, {
|
|
@@ -11368,11 +11364,11 @@ const Ic = { class: "accui-p-2 accui-border-b" }, Lc = /* @__PURE__ */ Ve({
|
|
|
11368
11364
|
e("h4", { class: "mfa-setup-method-title" }, "Authenticator App"),
|
|
11369
11365
|
e("p", { class: "mfa-setup-method-description" }, "Use Google Authenticator, Authy, or any TOTP-compatible app to generate secure codes")
|
|
11370
11366
|
], -1)),
|
|
11371
|
-
d(
|
|
11367
|
+
d(i(ue), {
|
|
11372
11368
|
variant: "primary",
|
|
11373
11369
|
size: "md",
|
|
11374
11370
|
onClick: qe(y, ["stop"]),
|
|
11375
|
-
disabled:
|
|
11371
|
+
disabled: i(h),
|
|
11376
11372
|
class: "mfa-setup-method-button"
|
|
11377
11373
|
}, {
|
|
11378
11374
|
default: _(() => [...q[8] || (q[8] = [
|
|
@@ -11397,11 +11393,11 @@ const Ic = { class: "accui-p-2 accui-border-b" }, Lc = /* @__PURE__ */ Ve({
|
|
|
11397
11393
|
e("h4", { class: "mfa-setup-method-title" }, "Email Verification"),
|
|
11398
11394
|
e("p", { class: "mfa-setup-method-description" }, "Receive verification codes directly in your email inbox for easy access")
|
|
11399
11395
|
], -1)),
|
|
11400
|
-
d(
|
|
11396
|
+
d(i(ue), {
|
|
11401
11397
|
variant: "primary",
|
|
11402
11398
|
size: "md",
|
|
11403
11399
|
onClick: qe(L, ["stop"]),
|
|
11404
|
-
disabled:
|
|
11400
|
+
disabled: i(h),
|
|
11405
11401
|
class: "mfa-setup-method-button"
|
|
11406
11402
|
}, {
|
|
11407
11403
|
default: _(() => [...q[10] || (q[10] = [
|
|
@@ -11413,17 +11409,17 @@ const Ic = { class: "accui-p-2 accui-border-b" }, Lc = /* @__PURE__ */ Ve({
|
|
|
11413
11409
|
])
|
|
11414
11410
|
])
|
|
11415
11411
|
]),
|
|
11416
|
-
|
|
11412
|
+
i(x).length > 0 ? (a(), o("div", Gc, [
|
|
11417
11413
|
e("div", Yc, [
|
|
11418
11414
|
e("div", null, [
|
|
11419
11415
|
q[13] || (q[13] = e("h3", { class: "mfa-setup-manage-title" }, "Manage Existing Methods", -1)),
|
|
11420
|
-
e("p", Wc, R(
|
|
11416
|
+
e("p", Wc, R(i(x).length) + " device(s) currently active", 1)
|
|
11421
11417
|
]),
|
|
11422
|
-
d(
|
|
11418
|
+
d(i(ue), {
|
|
11423
11419
|
variant: "secondary",
|
|
11424
11420
|
size: "md",
|
|
11425
11421
|
onClick: F,
|
|
11426
|
-
disabled:
|
|
11422
|
+
disabled: i(h)
|
|
11427
11423
|
}, {
|
|
11428
11424
|
default: _(() => [
|
|
11429
11425
|
d(V, {
|
|
@@ -11447,16 +11443,16 @@ const Ic = { class: "accui-p-2 accui-border-b" }, Lc = /* @__PURE__ */ Ve({
|
|
|
11447
11443
|
onClose: q[1] || (q[1] = (b) => m.value = !1),
|
|
11448
11444
|
onSuccess: $
|
|
11449
11445
|
}, null, 8, ["show"])) : I("", !0),
|
|
11450
|
-
|
|
11446
|
+
U.value ? (a(), ye(Ga, {
|
|
11451
11447
|
key: 1,
|
|
11452
|
-
show:
|
|
11453
|
-
onClose: q[2] || (q[2] = (b) =>
|
|
11448
|
+
show: U.value,
|
|
11449
|
+
onClose: q[2] || (q[2] = (b) => U.value = !1),
|
|
11454
11450
|
onSuccess: $
|
|
11455
11451
|
}, null, 8, ["show"])) : I("", !0),
|
|
11456
|
-
|
|
11452
|
+
D.value ? (a(), ye(Aa, {
|
|
11457
11453
|
key: 2,
|
|
11458
|
-
show:
|
|
11459
|
-
onClose: q[3] || (q[3] = (b) =>
|
|
11454
|
+
show: D.value,
|
|
11455
|
+
onClose: q[3] || (q[3] = (b) => D.value = !1),
|
|
11460
11456
|
onSuccess: $
|
|
11461
11457
|
}, null, 8, ["show"])) : I("", !0),
|
|
11462
11458
|
g.value ? (a(), ye(Ya, {
|
|
@@ -11473,15 +11469,15 @@ function Zt() {
|
|
|
11473
11469
|
const {
|
|
11474
11470
|
autoRefresh: u = !0,
|
|
11475
11471
|
requireAuth: m = !0,
|
|
11476
|
-
baseURL:
|
|
11477
|
-
...
|
|
11472
|
+
baseURL: U,
|
|
11473
|
+
...D
|
|
11478
11474
|
} = S;
|
|
11479
11475
|
if (m && !r.value?.accessToken)
|
|
11480
11476
|
throw new Error("User is not authenticated");
|
|
11481
11477
|
let g = x;
|
|
11482
|
-
const N =
|
|
11478
|
+
const N = U || s.value.baseUrl;
|
|
11483
11479
|
N && typeof x == "string" && !x.startsWith("http") && (g = new URL(x, N).toString());
|
|
11484
|
-
const y = new Headers(
|
|
11480
|
+
const y = new Headers(D.headers);
|
|
11485
11481
|
if (r.value?.accessToken)
|
|
11486
11482
|
try {
|
|
11487
11483
|
const $ = l();
|
|
@@ -11493,7 +11489,7 @@ function Zt() {
|
|
|
11493
11489
|
throw $;
|
|
11494
11490
|
}
|
|
11495
11491
|
const L = {
|
|
11496
|
-
...
|
|
11492
|
+
...D,
|
|
11497
11493
|
headers: y
|
|
11498
11494
|
};
|
|
11499
11495
|
let F = await fetch(g, L);
|