@strands.gg/accui 2.17.25 → 2.17.27
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 +4 -4
- package/dist/index.es.js +499 -502
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { _ as De, S as lt, U as Xa, a as Ja, b as es, c as ts, d as kt, M as as, e as _t, f as Yt, g as xa, u as Oa, C as _a, h as Ze, i as
|
|
1
|
+
import { _ as De, S as lt, U as Xa, a as Ja, b as es, c as ts, d as kt, M as as, e as _t, f as Yt, g as xa, u as Oa, C as _a, h as Ze, i as gt, j as Ra, k as mt, l as Ht } from "./StrandsUIPlugin-RTFzvRED.es.js";
|
|
2
2
|
import { m as td } from "./StrandsUIPlugin-RTFzvRED.es.js";
|
|
3
|
-
import { defineComponent as Ve, computed as U, provide as Xt, onMounted as We, onUnmounted as xt, createElementBlock as o, openBlock as a, normalizeClass as be, createElementVNode as e, createBlock as Ce, renderSlot as je, Teleport as qt, createCommentVNode as I, toDisplayString as R, ref as
|
|
3
|
+
import { defineComponent as Ve, computed as U, provide as Xt, onMounted as We, onUnmounted as xt, createElementBlock as o, openBlock as a, normalizeClass as be, createElementVNode as e, createBlock as Ce, renderSlot as je, Teleport as qt, createCommentVNode as I, toDisplayString as R, ref as M, watch as Le, createTextVNode as Q, reactive as Ye, withModifiers as Be, createStaticVNode as Jt, createVNode as d, withDirectives as Xe, withCtx as x, unref as n, vModelText as Je, nextTick as ht, Fragment as Ue, Transition as rt, createSlots as Zt, normalizeStyle as Oe, renderList as Ke, mergeProps as $a, useSlots as ga, inject as ma, resolveDynamicComponent as ot, onBeforeUnmount as Fa, withKeys as Re, h as oe, isMemoSame as ss, getCurrentInstance as os } from "vue";
|
|
4
4
|
import { u as pt, p as La } from "./useStrandsConfig-CMKVW1p3.es.js";
|
|
5
5
|
import { s as sd } from "./useStrandsConfig-CMKVW1p3.es.js";
|
|
6
6
|
import { u as ft } from "./useStrandsAuth-mv5zJr7L.es.js";
|
|
@@ -136,9 +136,9 @@ const Ha = kt("users", [
|
|
|
136
136
|
},
|
|
137
137
|
emits: ["update:modelValue", "change"],
|
|
138
138
|
setup(s, { emit: r }) {
|
|
139
|
-
const t = s, l = r, z =
|
|
140
|
-
Le(() => t.checked, (
|
|
141
|
-
|
|
139
|
+
const t = s, l = r, z = M(!1), V = U(() => t.modelValue !== void 0 ? !!t.modelValue : t.checked !== void 0 ? typeof t.checked == "string" ? t.checked === "" || t.checked === "true" : !!t.checked : z.value);
|
|
140
|
+
Le(() => t.checked, ($) => {
|
|
141
|
+
$ !== void 0 && (typeof $ == "string" ? z.value = $ === "" || $ === "true" : z.value = !!$);
|
|
142
142
|
}, { immediate: !0 });
|
|
143
143
|
const y = U(() => t.id || `ui-toggle-${Math.random().toString(36).substr(2, 9)}`), k = U(() => [
|
|
144
144
|
"ui-toggle",
|
|
@@ -152,12 +152,12 @@ const Ha = kt("users", [
|
|
|
152
152
|
"ui-toggle-thumb--on": V.value,
|
|
153
153
|
"ui-toggle-thumb--off": !V.value
|
|
154
154
|
}
|
|
155
|
-
]),
|
|
155
|
+
]), h = () => {
|
|
156
156
|
if (t.disabled) return;
|
|
157
|
-
const
|
|
158
|
-
z.value =
|
|
157
|
+
const $ = !V.value;
|
|
158
|
+
z.value = $, l("update:modelValue", $), l("change", $);
|
|
159
159
|
};
|
|
160
|
-
return (
|
|
160
|
+
return ($, A) => (a(), o("div", hs, [
|
|
161
161
|
s.label ? (a(), o("label", {
|
|
162
162
|
key: 0,
|
|
163
163
|
for: y.value,
|
|
@@ -172,7 +172,7 @@ const Ha = kt("users", [
|
|
|
172
172
|
class: be(k.value),
|
|
173
173
|
"aria-pressed": V.value,
|
|
174
174
|
"aria-labelledby": s.label ? `${y.value}-label` : void 0,
|
|
175
|
-
onClick:
|
|
175
|
+
onClick: h
|
|
176
176
|
}, [
|
|
177
177
|
e("span", {
|
|
178
178
|
class: be(["ui-toggle-thumb", u.value])
|
|
@@ -194,11 +194,11 @@ const Ha = kt("users", [
|
|
|
194
194
|
},
|
|
195
195
|
emits: ["upload", "error"],
|
|
196
196
|
setup(s, { emit: r }) {
|
|
197
|
-
const t = s, l = r, z =
|
|
197
|
+
const t = s, l = r, z = M(), V = M(), y = M(), k = M(""), u = M(), h = M(t.size), $ = M(t.previewSize), A = M(t.size / 2.5), c = Ye({ x: 0, y: 0 }), g = M(1), E = M(0.1), D = M(3), C = M(!1), N = M(!1), p = M(!1), L = Ye({ x: 0, y: 0, imageX: 0, imageY: 0 });
|
|
198
198
|
We(() => {
|
|
199
199
|
if (V.value) {
|
|
200
200
|
const j = V.value.getContext("2d");
|
|
201
|
-
j && (j.fillStyle = "#f9fafb", j.fillRect(0, 0,
|
|
201
|
+
j && (j.fillStyle = "#f9fafb", j.fillRect(0, 0, h.value, h.value));
|
|
202
202
|
}
|
|
203
203
|
});
|
|
204
204
|
const O = () => {
|
|
@@ -235,9 +235,9 @@ const Ha = kt("users", [
|
|
|
235
235
|
), ae = ie;
|
|
236
236
|
E.value = ie, D.value = Math.max(1, ie);
|
|
237
237
|
const W = K.width * ae, le = K.height * ae;
|
|
238
|
-
c.x = (
|
|
238
|
+
c.x = (h.value - W) / 2, c.y = (h.value - le) / 2, g.value = ae, ue(), ht(() => {
|
|
239
239
|
N.value = !1;
|
|
240
|
-
}),
|
|
240
|
+
}), ht(() => {
|
|
241
241
|
b();
|
|
242
242
|
});
|
|
243
243
|
}, K.src = j;
|
|
@@ -245,15 +245,15 @@ const Ha = kt("users", [
|
|
|
245
245
|
if (!u.value || !V.value) return;
|
|
246
246
|
const j = V.value.getContext("2d");
|
|
247
247
|
if (!j) return;
|
|
248
|
-
j.fillStyle = "#f9fafb", j.fillRect(0, 0,
|
|
249
|
-
const K = u.value, ie = K.width *
|
|
248
|
+
j.fillStyle = "#f9fafb", j.fillRect(0, 0, h.value, h.value);
|
|
249
|
+
const K = u.value, ie = K.width * g.value, ae = K.height * g.value;
|
|
250
250
|
j.drawImage(K, c.x, c.y, ie, ae), T();
|
|
251
251
|
}, T = () => {
|
|
252
252
|
if (!u.value || !y.value || !V.value) return;
|
|
253
253
|
const j = y.value.getContext("2d");
|
|
254
254
|
if (!j) return;
|
|
255
|
-
j.fillStyle = "#ffffff", j.fillRect(0, 0,
|
|
256
|
-
const K =
|
|
255
|
+
j.fillStyle = "#ffffff", j.fillRect(0, 0, $.value, $.value), j.save(), j.beginPath(), j.arc($.value / 2, $.value / 2, $.value / 2, 0, Math.PI * 2), j.clip();
|
|
256
|
+
const K = h.value / 2 - A.value, ie = h.value / 2 - A.value, ae = A.value * 2;
|
|
257
257
|
j.drawImage(
|
|
258
258
|
V.value,
|
|
259
259
|
K,
|
|
@@ -262,14 +262,14 @@ const Ha = kt("users", [
|
|
|
262
262
|
ae,
|
|
263
263
|
0,
|
|
264
264
|
0,
|
|
265
|
-
|
|
266
|
-
|
|
265
|
+
$.value,
|
|
266
|
+
$.value
|
|
267
267
|
), j.restore();
|
|
268
268
|
}, te = (j) => {
|
|
269
269
|
u.value && (C.value = !0, L.x = j.clientX, L.y = j.clientY, L.imageX = c.x, L.imageY = c.y, document.addEventListener("mousemove", ye), document.addEventListener("mouseup", Me));
|
|
270
270
|
}, ue = () => {
|
|
271
271
|
if (!u.value) return;
|
|
272
|
-
const j = u.value, K = j.width *
|
|
272
|
+
const j = u.value, K = j.width * g.value, ie = j.height * g.value, ae = h.value / 2 - A.value, W = h.value / 2 - A.value, le = h.value / 2 + A.value, _e = h.value / 2 + A.value, Te = le - K, Ee = ae, $e = _e - ie, re = W;
|
|
273
273
|
c.x = Math.min(Ee, Math.max(Te, c.x)), c.y = Math.min(re, Math.max($e, c.y));
|
|
274
274
|
}, ye = (j) => {
|
|
275
275
|
if (!C.value) return;
|
|
@@ -279,11 +279,11 @@ const Ha = kt("users", [
|
|
|
279
279
|
C.value = !1, document.removeEventListener("mousemove", ye), document.removeEventListener("mouseup", Me);
|
|
280
280
|
}, Ae = (j) => {
|
|
281
281
|
j.preventDefault();
|
|
282
|
-
const K = j.deltaY > 0 ? -0.05 : 0.05, ie = Math.max(E.value, Math.min(D.value,
|
|
283
|
-
if (ie !==
|
|
282
|
+
const K = j.deltaY > 0 ? -0.05 : 0.05, ie = Math.max(E.value, Math.min(D.value, g.value + K));
|
|
283
|
+
if (ie !== g.value && u.value) {
|
|
284
284
|
p.value = !0;
|
|
285
|
-
const ae = u.value, W =
|
|
286
|
-
c.x = W + Ie - Te / 2, c.y = W + G - Ee / 2,
|
|
285
|
+
const ae = u.value, W = h.value / 2, le = ae.width * g.value, _e = ae.height * g.value, Te = ae.width * ie, Ee = ae.height * ie, $e = c.x + le / 2 - W, re = c.y + _e / 2 - W, ve = ie / g.value, Ie = $e * ve, G = re * ve;
|
|
286
|
+
c.x = W + Ie - Te / 2, c.y = W + G - Ee / 2, g.value = ie, ue(), b(), setTimeout(() => {
|
|
287
287
|
p.value = !1;
|
|
288
288
|
}, 16);
|
|
289
289
|
}
|
|
@@ -297,7 +297,7 @@ const Ha = kt("users", [
|
|
|
297
297
|
), ie = K;
|
|
298
298
|
E.value = K, D.value = Math.max(1, K);
|
|
299
299
|
const ae = j.width * ie, W = j.height * ie;
|
|
300
|
-
c.x = (
|
|
300
|
+
c.x = (h.value - ae) / 2, c.y = (h.value - W) / 2, g.value = ie, ue(), ht(() => {
|
|
301
301
|
N.value = !1;
|
|
302
302
|
}), b();
|
|
303
303
|
}, xe = async () => {
|
|
@@ -307,7 +307,7 @@ const Ha = kt("users", [
|
|
|
307
307
|
const K = j.getContext("2d");
|
|
308
308
|
if (!K) return;
|
|
309
309
|
K.fillStyle = "#ffffff", K.fillRect(0, 0, 256, 256), K.save(), K.beginPath(), K.arc(128, 128, 128, 0, Math.PI * 2), K.clip();
|
|
310
|
-
const ie =
|
|
310
|
+
const ie = h.value / 2 - A.value, ae = h.value / 2 - A.value, W = A.value * 2;
|
|
311
311
|
K.drawImage(
|
|
312
312
|
V.value,
|
|
313
313
|
ie,
|
|
@@ -327,10 +327,10 @@ const Ha = kt("users", [
|
|
|
327
327
|
}, ne = () => {
|
|
328
328
|
O();
|
|
329
329
|
};
|
|
330
|
-
return Le(
|
|
330
|
+
return Le(g, (j, K) => {
|
|
331
331
|
if (!(N.value || p.value)) {
|
|
332
332
|
if (j !== K && u.value && K > 0 && K !== 1) {
|
|
333
|
-
const ie = u.value, ae =
|
|
333
|
+
const ie = u.value, ae = h.value / 2, W = ie.width * K, le = ie.height * K, _e = ie.width * j, Te = ie.height * j, Ee = c.x + W / 2 - ae, $e = c.y + le / 2 - ae, re = j / K, ve = Ee * re, Ie = $e * re;
|
|
334
334
|
c.x = ae + ve - _e / 2, c.y = ae + Ie - Te / 2;
|
|
335
335
|
}
|
|
336
336
|
b();
|
|
@@ -353,8 +353,8 @@ const Ha = kt("users", [
|
|
|
353
353
|
e("canvas", {
|
|
354
354
|
ref_key: "canvas",
|
|
355
355
|
ref: V,
|
|
356
|
-
width:
|
|
357
|
-
height:
|
|
356
|
+
width: h.value,
|
|
357
|
+
height: h.value,
|
|
358
358
|
class: "canvas",
|
|
359
359
|
onMousedown: te,
|
|
360
360
|
onWheel: Ae
|
|
@@ -367,13 +367,13 @@ const Ha = kt("users", [
|
|
|
367
367
|
e("rect", {
|
|
368
368
|
x: "0",
|
|
369
369
|
y: "0",
|
|
370
|
-
width:
|
|
371
|
-
height:
|
|
370
|
+
width: h.value,
|
|
371
|
+
height: h.value,
|
|
372
372
|
fill: "white"
|
|
373
373
|
}, null, 8, Vs),
|
|
374
374
|
e("circle", {
|
|
375
|
-
cx:
|
|
376
|
-
cy:
|
|
375
|
+
cx: h.value / 2,
|
|
376
|
+
cy: h.value / 2,
|
|
377
377
|
r: A.value,
|
|
378
378
|
fill: "black"
|
|
379
379
|
}, null, 8, Is)
|
|
@@ -382,8 +382,8 @@ const Ha = kt("users", [
|
|
|
382
382
|
e("rect", {
|
|
383
383
|
x: "0",
|
|
384
384
|
y: "0",
|
|
385
|
-
width:
|
|
386
|
-
height:
|
|
385
|
+
width: h.value,
|
|
386
|
+
height: h.value,
|
|
387
387
|
fill: "black",
|
|
388
388
|
opacity: "0.5",
|
|
389
389
|
mask: "url(#backdrop-mask)"
|
|
@@ -392,8 +392,8 @@ const Ha = kt("users", [
|
|
|
392
392
|
]),
|
|
393
393
|
(a(), o("svg", Es, [
|
|
394
394
|
e("circle", {
|
|
395
|
-
cx:
|
|
396
|
-
cy:
|
|
395
|
+
cx: h.value / 2,
|
|
396
|
+
cy: h.value / 2,
|
|
397
397
|
r: A.value,
|
|
398
398
|
fill: "none",
|
|
399
399
|
stroke: "white",
|
|
@@ -407,7 +407,7 @@ const Ha = kt("users", [
|
|
|
407
407
|
e("div", Ds, [
|
|
408
408
|
d(lt, {
|
|
409
409
|
onClick: K[2] || (K[2] = (ie) => {
|
|
410
|
-
|
|
410
|
+
g.value = Math.max(E.value, g.value - 0.1), ue(), b();
|
|
411
411
|
}),
|
|
412
412
|
icon: !0,
|
|
413
413
|
squircle: !0,
|
|
@@ -422,7 +422,7 @@ const Ha = kt("users", [
|
|
|
422
422
|
}),
|
|
423
423
|
Xe(e("input", {
|
|
424
424
|
type: "range",
|
|
425
|
-
"onUpdate:modelValue": K[3] || (K[3] = (ie) =>
|
|
425
|
+
"onUpdate:modelValue": K[3] || (K[3] = (ie) => g.value = ie),
|
|
426
426
|
min: E.value,
|
|
427
427
|
max: D.value,
|
|
428
428
|
step: 0.01,
|
|
@@ -433,14 +433,14 @@ const Ha = kt("users", [
|
|
|
433
433
|
}, null, 40, Ns), [
|
|
434
434
|
[
|
|
435
435
|
Je,
|
|
436
|
-
|
|
436
|
+
g.value,
|
|
437
437
|
void 0,
|
|
438
438
|
{ number: !0 }
|
|
439
439
|
]
|
|
440
440
|
]),
|
|
441
441
|
d(lt, {
|
|
442
442
|
onClick: K[5] || (K[5] = (ie) => {
|
|
443
|
-
|
|
443
|
+
g.value = Math.min(D.value, g.value + 0.1), ue(), b();
|
|
444
444
|
}),
|
|
445
445
|
icon: !0,
|
|
446
446
|
squircle: !0,
|
|
@@ -496,8 +496,8 @@ const Ha = kt("users", [
|
|
|
496
496
|
e("canvas", {
|
|
497
497
|
ref_key: "previewCanvas",
|
|
498
498
|
ref: y,
|
|
499
|
-
width:
|
|
500
|
-
height:
|
|
499
|
+
width: $.value,
|
|
500
|
+
height: $.value,
|
|
501
501
|
class: "preview-canvas"
|
|
502
502
|
}, null, 8, Os)
|
|
503
503
|
]),
|
|
@@ -559,8 +559,8 @@ class Sa {
|
|
|
559
559
|
{ freq: 783.99, time: 0.3 }
|
|
560
560
|
// G5
|
|
561
561
|
].forEach((u) => {
|
|
562
|
-
const
|
|
563
|
-
|
|
562
|
+
const h = r.createOscillator(), $ = r.createGain();
|
|
563
|
+
h.connect($), $.connect(r.destination), h.type = "sine", h.frequency.setValueAtTime(u.freq, t + u.time), h.frequency.exponentialRampToValueAtTime(u.freq * 1.02, t + u.time + 0.1), h.frequency.exponentialRampToValueAtTime(u.freq, t + u.time + 0.4), $.gain.setValueAtTime(0, t + u.time), $.gain.linearRampToValueAtTime(0.08, t + u.time + 0.03), $.gain.linearRampToValueAtTime(0.06, t + u.time + 0.2), $.gain.exponentialRampToValueAtTime(0.01, t + u.time + 0.5), h.start(t + u.time), h.stop(t + u.time + 0.5);
|
|
564
564
|
});
|
|
565
565
|
const z = r.createOscillator(), V = r.createGain();
|
|
566
566
|
z.connect(V), V.connect(r.destination), z.type = "triangle", z.frequency.setValueAtTime(261.63, t), V.gain.setValueAtTime(0, t), V.gain.linearRampToValueAtTime(0.04, t + 0.1), V.gain.linearRampToValueAtTime(0.03, t + 0.4), V.gain.exponentialRampToValueAtTime(0.01, t + 0.8), z.start(t), z.stop(t + 0.8);
|
|
@@ -587,16 +587,16 @@ class Sa {
|
|
|
587
587
|
{ freq: 659.25, time: 0.8 }
|
|
588
588
|
// E5
|
|
589
589
|
].forEach((u) => {
|
|
590
|
-
const
|
|
591
|
-
|
|
590
|
+
const h = r.createOscillator(), $ = r.createGain();
|
|
591
|
+
h.connect($), $.connect(r.destination), h.type = "sine", h.frequency.setValueAtTime(u.freq, t + u.time), $.gain.setValueAtTime(0, t + u.time), $.gain.linearRampToValueAtTime(0.15, t + u.time + 0.05), $.gain.exponentialRampToValueAtTime(0.01, t + u.time + 0.8), h.start(t + u.time), h.stop(t + u.time + 0.8);
|
|
592
592
|
}), [
|
|
593
593
|
{ freq: 130.81, time: 0, duration: 1.5 },
|
|
594
594
|
// C3
|
|
595
595
|
{ freq: 196, time: 0.8, duration: 1.7 }
|
|
596
596
|
// G3
|
|
597
597
|
].forEach((u) => {
|
|
598
|
-
const
|
|
599
|
-
|
|
598
|
+
const h = r.createOscillator(), $ = r.createGain();
|
|
599
|
+
h.connect($), $.connect(r.destination), h.type = "triangle", h.frequency.setValueAtTime(u.freq, t + u.time), $.gain.setValueAtTime(0, t + u.time), $.gain.linearRampToValueAtTime(0.08, t + u.time + 0.3), $.gain.exponentialRampToValueAtTime(0.01, t + u.time + u.duration), h.start(t + u.time), h.stop(t + u.time + u.duration);
|
|
600
600
|
}), [
|
|
601
601
|
{ freq: 1046.5, time: 1 },
|
|
602
602
|
// C6
|
|
@@ -605,11 +605,11 @@ class Sa {
|
|
|
605
605
|
{ freq: 1567.98, time: 1.6 }
|
|
606
606
|
// G6
|
|
607
607
|
].forEach((u) => {
|
|
608
|
-
const
|
|
609
|
-
|
|
608
|
+
const h = r.createOscillator(), $ = r.createGain();
|
|
609
|
+
h.connect($), $.connect(r.destination), h.type = "sine", h.frequency.setValueAtTime(u.freq, t + u.time), $.gain.setValueAtTime(0, t + u.time), $.gain.linearRampToValueAtTime(0.1, t + u.time + 0.02), $.gain.exponentialRampToValueAtTime(0.01, t + u.time + 0.4), h.start(t + u.time), h.stop(t + u.time + 0.4);
|
|
610
610
|
}), [261.63, 329.63, 392, 523.25].forEach((u) => {
|
|
611
|
-
const
|
|
612
|
-
|
|
611
|
+
const h = r.createOscillator(), $ = r.createGain();
|
|
612
|
+
h.connect($), $.connect(r.destination), h.type = "sine", h.frequency.setValueAtTime(u, t + 1.8), $.gain.setValueAtTime(0, t + 1.8), $.gain.linearRampToValueAtTime(0.12, t + 1.9), $.gain.exponentialRampToValueAtTime(0.01, t + l), h.start(t + 1.8), h.stop(t + l);
|
|
613
613
|
});
|
|
614
614
|
}
|
|
615
615
|
/**
|
|
@@ -623,8 +623,8 @@ class Sa {
|
|
|
623
623
|
[659.25, 830.61].forEach((z, V) => {
|
|
624
624
|
const y = r.createOscillator(), k = r.createGain();
|
|
625
625
|
y.connect(k), k.connect(r.destination), y.type = "sine", y.frequency.setValueAtTime(z, t);
|
|
626
|
-
const u = V * 0.1,
|
|
627
|
-
k.gain.setValueAtTime(0, t), k.gain.linearRampToValueAtTime(0.2, t + u + 0.01), k.gain.exponentialRampToValueAtTime(0.01, t + u +
|
|
626
|
+
const u = V * 0.1, h = 0.15;
|
|
627
|
+
k.gain.setValueAtTime(0, t), k.gain.linearRampToValueAtTime(0.2, t + u + 0.01), k.gain.exponentialRampToValueAtTime(0.01, t + u + h), y.start(t + u), y.stop(t + u + h);
|
|
628
628
|
});
|
|
629
629
|
}
|
|
630
630
|
/**
|
|
@@ -701,9 +701,9 @@ const Fs = (s, r) => Sa.playLevelUp(s, r), qs = { class: "level-progress-contain
|
|
|
701
701
|
},
|
|
702
702
|
emits: ["levelup"],
|
|
703
703
|
setup(s, { emit: r }) {
|
|
704
|
-
const t = s, l = r, z =
|
|
705
|
-
let k = null, u = t.value,
|
|
706
|
-
const
|
|
704
|
+
const t = s, l = r, z = M(!1), V = M(t.value), y = M("forward");
|
|
705
|
+
let k = null, u = t.value, h = t.level;
|
|
706
|
+
const $ = Kt, A = t.size ?? Kt, c = Kt / 2, g = U(() => t.thickness ?? 24), E = U(() => t.labelThickness ?? 46), D = U(() => t.gapAngle ?? 16), C = U(() => (Kt - g.value) / 2 - Da), N = U(() => (Kt - E.value) / 1.9 - Da), p = U(() => N.value + 10), L = U(() => C.value - g.value / 2 - so), O = U(() => t.levelLabel?.length ?? 0), S = U(() => O.value * no + lo), w = U(() => -S.value / 2), q = U(() => S.value / 2), Z = U(
|
|
707
707
|
() => xe(c, c, N.value, w.value, q.value)
|
|
708
708
|
), b = U(
|
|
709
709
|
() => (
|
|
@@ -773,12 +773,12 @@ const Fs = (s, r) => Sa.playLevelUp(s, r), qs = { class: "level-progress-contain
|
|
|
773
773
|
return Le(() => t.value, (ie) => {
|
|
774
774
|
y.value = ie >= u ? "forward" : "backward", j(ie, u), u = ie;
|
|
775
775
|
}), Le(() => t.level, (ie) => {
|
|
776
|
-
ie !==
|
|
776
|
+
ie !== h && ie > h && K(), h = ie;
|
|
777
777
|
}), (ie, ae) => (a(), o("div", qs, [
|
|
778
778
|
(a(), o("svg", {
|
|
779
779
|
width: n(A),
|
|
780
780
|
height: n(A),
|
|
781
|
-
viewBox: `0 0 ${n(
|
|
781
|
+
viewBox: `0 0 ${n($)} ${n($)}`,
|
|
782
782
|
style: { position: "relative" }
|
|
783
783
|
}, [
|
|
784
784
|
z.value ? (a(), o("g", Ks, [
|
|
@@ -803,7 +803,7 @@ const Fs = (s, r) => Sa.playLevelUp(s, r), qs = { class: "level-progress-contain
|
|
|
803
803
|
key: 1,
|
|
804
804
|
d: te.value,
|
|
805
805
|
stroke: "#ddd",
|
|
806
|
-
"stroke-width":
|
|
806
|
+
"stroke-width": g.value,
|
|
807
807
|
fill: "none",
|
|
808
808
|
"stroke-linecap": "round"
|
|
809
809
|
}, null, 8, Ws)) : I("", !0),
|
|
@@ -825,7 +825,7 @@ const Fs = (s, r) => Sa.playLevelUp(s, r), qs = { class: "level-progress-contain
|
|
|
825
825
|
key: 2,
|
|
826
826
|
d: T.value,
|
|
827
827
|
stroke: ye.value,
|
|
828
|
-
"stroke-width":
|
|
828
|
+
"stroke-width": g.value,
|
|
829
829
|
fill: "none",
|
|
830
830
|
"stroke-linecap": "round"
|
|
831
831
|
}, null, 8, Js)) : I("", !0),
|
|
@@ -953,21 +953,21 @@ function uo(s = {}) {
|
|
|
953
953
|
closeOnEscape: r = !0,
|
|
954
954
|
priority: t = "normal",
|
|
955
955
|
component: l
|
|
956
|
-
} = s, z =
|
|
956
|
+
} = s, z = M(null), V = M(!1), y = M(null), k = async (A) => {
|
|
957
957
|
if (V.value) return;
|
|
958
958
|
const c = /* @__PURE__ */ Symbol("modal");
|
|
959
959
|
z.value = c;
|
|
960
|
-
const
|
|
960
|
+
const g = Ft.add({
|
|
961
961
|
id: c,
|
|
962
962
|
closeModal: A || u,
|
|
963
963
|
closeOnEscape: r,
|
|
964
964
|
priority: t,
|
|
965
965
|
component: l
|
|
966
966
|
});
|
|
967
|
-
return y.value =
|
|
967
|
+
return y.value = g, V.value = !0, await ht(), g;
|
|
968
968
|
}, u = () => {
|
|
969
969
|
!z.value || !V.value || (Ft.remove(z.value), z.value = null, y.value = null, V.value = !1);
|
|
970
|
-
},
|
|
970
|
+
}, h = () => z.value ? document.querySelector(`[data-modal-id="${z.value.toString()}"]`) : null, $ = () => y.value ? document.querySelector(`.ui-app-modal-backdrop[style*="z-index: ${y.value.zIndex - 1}"]`) : null;
|
|
971
971
|
try {
|
|
972
972
|
xt(() => {
|
|
973
973
|
V.value && u();
|
|
@@ -983,8 +983,8 @@ function uo(s = {}) {
|
|
|
983
983
|
openModal: k,
|
|
984
984
|
closeModal: u,
|
|
985
985
|
// Utilities
|
|
986
|
-
getModalContainer:
|
|
987
|
-
getModalBackdrop:
|
|
986
|
+
getModalContainer: h,
|
|
987
|
+
getModalBackdrop: $,
|
|
988
988
|
// Computed values
|
|
989
989
|
zIndex: () => y.value?.zIndex || 0,
|
|
990
990
|
isTopModal: () => {
|
|
@@ -1001,7 +1001,7 @@ function Mc(s) {
|
|
|
1001
1001
|
};
|
|
1002
1002
|
}
|
|
1003
1003
|
function $c() {
|
|
1004
|
-
const s =
|
|
1004
|
+
const s = M(Ft.state), r = Ft.subscribe((t) => {
|
|
1005
1005
|
s.value = t;
|
|
1006
1006
|
});
|
|
1007
1007
|
try {
|
|
@@ -1046,13 +1046,13 @@ const co = {
|
|
|
1046
1046
|
},
|
|
1047
1047
|
emits: ["update:modelValue", "open", "close"],
|
|
1048
1048
|
setup(s, { emit: r }) {
|
|
1049
|
-
const t = s, l = r, z =
|
|
1049
|
+
const t = s, l = r, z = M(!1), V = M(null), y = M(null), k = M(null), u = uo({
|
|
1050
1050
|
closeOnEscape: t.closeOnEscape,
|
|
1051
1051
|
priority: "normal",
|
|
1052
1052
|
component: "UiModal"
|
|
1053
1053
|
});
|
|
1054
|
-
|
|
1055
|
-
const
|
|
1054
|
+
M(!0);
|
|
1055
|
+
const h = U(() => t.modelValue !== void 0 ? t.modelValue : z.value), $ = U(() => ({
|
|
1056
1056
|
sm: "ui-modal-size-sm",
|
|
1057
1057
|
md: "ui-modal-size-md",
|
|
1058
1058
|
lg: "ui-modal-size-lg",
|
|
@@ -1065,19 +1065,19 @@ const co = {
|
|
|
1065
1065
|
full: "ui-modal-size-full",
|
|
1066
1066
|
auto: "ui-modal-size-auto"
|
|
1067
1067
|
})[t.size]), A = async () => {
|
|
1068
|
-
k.value = document.activeElement, await u.openModal(
|
|
1068
|
+
k.value = document.activeElement, await u.openModal(g), t.modelValue !== void 0 ? l("update:modelValue", !0) : z.value = !0, l("open");
|
|
1069
1069
|
}, c = () => {
|
|
1070
1070
|
V.value && (k.value = V.value.querySelector('button, [tabindex]:not([tabindex="-1"]), a[href], input, select, textarea'), k.value || (k.value = V.value)), A();
|
|
1071
|
-
},
|
|
1072
|
-
t.modelValue !== void 0 ? l("update:modelValue", !1) : z.value = !1, l("close"), u.closeModal(),
|
|
1071
|
+
}, g = () => {
|
|
1072
|
+
t.modelValue !== void 0 ? l("update:modelValue", !1) : z.value = !1, l("close"), u.closeModal(), ht(() => {
|
|
1073
1073
|
k.value && document.contains(k.value) && k.value.focus(), k.value = null;
|
|
1074
1074
|
});
|
|
1075
1075
|
};
|
|
1076
|
-
Le(
|
|
1077
|
-
D ? (u.isOpen.value || await u.openModal(
|
|
1076
|
+
Le(h, async (D) => {
|
|
1077
|
+
D ? (u.isOpen.value || await u.openModal(g), await ht(), y.value && y.value.focus()) : u.isOpen.value && u.closeModal();
|
|
1078
1078
|
});
|
|
1079
1079
|
const E = (D) => {
|
|
1080
|
-
if (!
|
|
1080
|
+
if (!h.value || D.key !== "Tab" || !y.value) return;
|
|
1081
1081
|
const C = y.value.querySelectorAll(
|
|
1082
1082
|
'button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'
|
|
1083
1083
|
), N = Array.from(C);
|
|
@@ -1098,17 +1098,17 @@ const co = {
|
|
|
1098
1098
|
}, [
|
|
1099
1099
|
je(D.$slots, "trigger", {
|
|
1100
1100
|
open: c,
|
|
1101
|
-
close:
|
|
1102
|
-
isOpen:
|
|
1101
|
+
close: g,
|
|
1102
|
+
isOpen: h.value
|
|
1103
1103
|
}, void 0, !0)
|
|
1104
1104
|
], 512)) : I("", !0),
|
|
1105
|
-
|
|
1105
|
+
h.value ? (a(), Ce(qt, {
|
|
1106
1106
|
key: 1,
|
|
1107
1107
|
to: "body"
|
|
1108
1108
|
}, [
|
|
1109
1109
|
d(rt, { name: "modal" }, {
|
|
1110
1110
|
default: x(() => [
|
|
1111
|
-
|
|
1111
|
+
h.value ? (a(), o("div", co, [
|
|
1112
1112
|
e("div", {
|
|
1113
1113
|
class: "ui-modal-container",
|
|
1114
1114
|
ref_key: "modalContainer",
|
|
@@ -1119,15 +1119,15 @@ const co = {
|
|
|
1119
1119
|
padding: s.cardPadding,
|
|
1120
1120
|
shadow: s.cardShadow,
|
|
1121
1121
|
color: s.cardColor,
|
|
1122
|
-
class: be([s.cardClass,
|
|
1122
|
+
class: be([s.cardClass, $.value]),
|
|
1123
1123
|
tabindex: "-1"
|
|
1124
1124
|
}, Zt({
|
|
1125
1125
|
header: x(() => [
|
|
1126
1126
|
e("div", vo, [
|
|
1127
1127
|
e("div", po, [
|
|
1128
1128
|
je(D.$slots, "header", {
|
|
1129
|
-
handleClose:
|
|
1130
|
-
isOpen:
|
|
1129
|
+
handleClose: g,
|
|
1130
|
+
isOpen: h.value,
|
|
1131
1131
|
openModal: A
|
|
1132
1132
|
}, () => [
|
|
1133
1133
|
D.$props.title ? (a(), o("h2", fo, R(D.$props.title), 1)) : I("", !0),
|
|
@@ -1138,7 +1138,7 @@ const co = {
|
|
|
1138
1138
|
key: 0,
|
|
1139
1139
|
type: "button",
|
|
1140
1140
|
class: "ui-modal-close-button",
|
|
1141
|
-
onClick:
|
|
1141
|
+
onClick: g,
|
|
1142
1142
|
"aria-label": "Close modal"
|
|
1143
1143
|
}, [...C[0] || (C[0] = [
|
|
1144
1144
|
e("svg", {
|
|
@@ -1165,8 +1165,8 @@ const co = {
|
|
|
1165
1165
|
name: "footer",
|
|
1166
1166
|
fn: x(() => [
|
|
1167
1167
|
je(D.$slots, "footer", {
|
|
1168
|
-
handleClose:
|
|
1169
|
-
isOpen:
|
|
1168
|
+
handleClose: g,
|
|
1169
|
+
isOpen: h.value,
|
|
1170
1170
|
openModal: A
|
|
1171
1171
|
}, void 0, !0)
|
|
1172
1172
|
]),
|
|
@@ -1837,12 +1837,12 @@ const co = {
|
|
|
1837
1837
|
}
|
|
1838
1838
|
return "#EA00A8";
|
|
1839
1839
|
}
|
|
1840
|
-
const l = s, z = r, V =
|
|
1840
|
+
const l = s, z = r, V = M(), y = M(), k = M(), u = M(0), h = M(1), $ = M(1), A = M(1), c = M(l.modelValue || t()), g = M({ r: 234, g: 0, b: 168 }), E = M(100), D = M(l.defaultColorFormat || "hex"), C = M({ h: 0, s: 0, l: 0 }), N = M({ l: 0, c: 0, h: 0 }), p = M(!1), L = M(!1), O = M(!1), S = M(!1), w = M(!1), q = U(() => p.value), Z = M(null), b = M(l.compareColor);
|
|
1841
1841
|
let T = null, te = null;
|
|
1842
|
-
const ue =
|
|
1842
|
+
const ue = M(!1);
|
|
1843
1843
|
let ye = "";
|
|
1844
1844
|
Le(() => [l.showContrast, l.compareColor], ([v, i], m) => {
|
|
1845
|
-
v && i && !S.value && (S.value = !0), typeof i == "string" && (b.value = i), m && i !== m[1] && (
|
|
1845
|
+
v && i && !S.value && (S.value = !0), typeof i == "string" && (b.value = i), m && i !== m[1] && (yt.value = [], nt.value = [], it.value = "", zt.value = "", Vt.value = "", It.value = "");
|
|
1846
1846
|
}, { immediate: !0 }), Le(S, (v) => {
|
|
1847
1847
|
v && l.showContrast && l.compareColor && ea();
|
|
1848
1848
|
});
|
|
@@ -1874,7 +1874,7 @@ const co = {
|
|
|
1874
1874
|
if (ee.toLowerCase() === m && _.shades || _.shades?.some((Y) => Y.toLowerCase() === m))
|
|
1875
1875
|
return ee;
|
|
1876
1876
|
return null;
|
|
1877
|
-
}), K =
|
|
1877
|
+
}), K = M([]), ie = M(""), ae = U(() => {
|
|
1878
1878
|
if (!j.value)
|
|
1879
1879
|
return K.value;
|
|
1880
1880
|
const v = Ae.value[j.value], i = Se.value[j.value], m = v?.shades || i?.shades || [];
|
|
@@ -2050,7 +2050,7 @@ const co = {
|
|
|
2050
2050
|
if (!m || !ee) return 1;
|
|
2051
2051
|
const _ = Ne(m.r, m.g, m.b), Y = Ne(ee.r, ee.g, ee.b), F = Math.max(_, Y), H = Math.min(_, Y);
|
|
2052
2052
|
return (F + 0.05) / (H + 0.05);
|
|
2053
|
-
},
|
|
2053
|
+
}, Ct = (v, i = "normal") => {
|
|
2054
2054
|
if (i === "large") {
|
|
2055
2055
|
if (v >= 4.5) return "AAA";
|
|
2056
2056
|
if (v >= 3) return "AA";
|
|
@@ -2059,7 +2059,7 @@ const co = {
|
|
|
2059
2059
|
if (v >= 4.5) return "AA";
|
|
2060
2060
|
}
|
|
2061
2061
|
return "FAIL";
|
|
2062
|
-
}, Pe = U(() => re(u.value,
|
|
2062
|
+
}, Pe = U(() => re(u.value, h.value, $.value)), Ut = U(() => `rgb(${Pe.value.r}, ${Pe.value.g}, ${Pe.value.b})`), at = U(() => {
|
|
2063
2063
|
const { r: v, g: i, b: m } = Pe.value;
|
|
2064
2064
|
return l.showAlpha && A.value < 0.99 ? `rgba(${v}, ${i}, ${m}, ${A.value})` : G(v, i, m);
|
|
2065
2065
|
}), ea = () => {
|
|
@@ -2070,8 +2070,8 @@ const co = {
|
|
|
2070
2070
|
const v = G(Pe.value.r, Pe.value.g, Pe.value.b), i = Fe(v, l.compareColor);
|
|
2071
2071
|
Z.value = {
|
|
2072
2072
|
ratio: i,
|
|
2073
|
-
normalText:
|
|
2074
|
-
largeText:
|
|
2073
|
+
normalText: Ct(i, "normal"),
|
|
2074
|
+
largeText: Ct(i, "large"),
|
|
2075
2075
|
currentColor: v,
|
|
2076
2076
|
compareColor: l.compareColor
|
|
2077
2077
|
};
|
|
@@ -2350,11 +2350,11 @@ const co = {
|
|
|
2350
2350
|
}
|
|
2351
2351
|
return ee;
|
|
2352
2352
|
});
|
|
2353
|
-
const
|
|
2353
|
+
const yt = M([]), nt = M([]), it = M(""), zt = M(""), Vt = M(""), It = M(""), oa = U(() => S.value && b.value && (!yt.value.length || !nt.value.length)), Ca = U(() => S.value && b.value);
|
|
2354
2354
|
U(() => Ca.value), U(() => {
|
|
2355
2355
|
if (!S.value || !b.value) return [];
|
|
2356
|
-
if (q.value &&
|
|
2357
|
-
return
|
|
2356
|
+
if (q.value && yt.value.length > 0 || !oa.value && yt.value.length > 0)
|
|
2357
|
+
return yt.value;
|
|
2358
2358
|
const v = [], i = dt, m = vt, ee = 6, _ = (H, f) => {
|
|
2359
2359
|
const B = Math.max(0, Math.min(i, H)), se = Math.max(0, Math.min(m, f)), de = Math.max(0, Math.min(1, B / i)), ke = Math.max(0, Math.min(1, 1 - se / m)), ge = re(u.value, de, ke), me = G(ge.r, ge.g, ge.b);
|
|
2360
2360
|
return Fe(me, b.value);
|
|
@@ -2402,7 +2402,7 @@ const co = {
|
|
|
2402
2402
|
});
|
|
2403
2403
|
}
|
|
2404
2404
|
}
|
|
2405
|
-
return
|
|
2405
|
+
return yt.value = v, v;
|
|
2406
2406
|
}), U(() => {
|
|
2407
2407
|
if (!S.value || !b.value) return [];
|
|
2408
2408
|
if (q.value && nt.value.length > 0 || !oa.value && nt.value.length > 0)
|
|
@@ -2521,7 +2521,7 @@ const co = {
|
|
|
2521
2521
|
}, ra = (v) => {
|
|
2522
2522
|
if (!V.value) return;
|
|
2523
2523
|
const i = V.value.getBoundingClientRect(), m = "touches" in v ? v.touches[0].clientX : v.clientX, ee = "touches" in v ? v.touches[0].clientY : v.clientY, _ = Math.max(0, Math.min(i.width, m - i.left)), Y = Math.max(0, Math.min(i.height, ee - i.top));
|
|
2524
|
-
|
|
2524
|
+
h.value = _ / i.width, $.value = 1 - Y / i.height;
|
|
2525
2525
|
}, ua = (v) => {
|
|
2526
2526
|
l.disabled || (L.value = !0, ca(v), document.addEventListener("mousemove", Nt), document.addEventListener("mouseup", Bt), document.addEventListener("touchmove", Nt), document.addEventListener("touchend", Bt));
|
|
2527
2527
|
}, Nt = (v) => {
|
|
@@ -2548,29 +2548,29 @@ const co = {
|
|
|
2548
2548
|
const i = Ie(v);
|
|
2549
2549
|
if (i) {
|
|
2550
2550
|
const m = ve(i.r, i.g, i.b);
|
|
2551
|
-
u.value = m.h,
|
|
2551
|
+
u.value = m.h, h.value = m.s, $.value = m.v, Rt();
|
|
2552
2552
|
}
|
|
2553
2553
|
}
|
|
2554
2554
|
}, Pt = () => {
|
|
2555
2555
|
const { r: v, g: i, b: m } = Pe.value;
|
|
2556
2556
|
c.value = G(v, i, m);
|
|
2557
2557
|
}, tt = () => {
|
|
2558
|
-
const { r: v, g: i, b: m } =
|
|
2558
|
+
const { r: v, g: i, b: m } = g.value;
|
|
2559
2559
|
if (v >= 0 && v <= 255 && i >= 0 && i <= 255 && m >= 0 && m <= 255) {
|
|
2560
2560
|
const ee = ve(v, i, m);
|
|
2561
|
-
u.value = ee.h,
|
|
2561
|
+
u.value = ee.h, h.value = ee.s, $.value = ee.v, Ot(), ya(), ka();
|
|
2562
2562
|
}
|
|
2563
2563
|
}, ct = () => {
|
|
2564
2564
|
const { h: v, s: i, l: m } = C.value;
|
|
2565
2565
|
if (v >= 0 && v <= 360 && i >= 0 && i <= 100 && m >= 0 && m <= 100) {
|
|
2566
2566
|
const ee = X(v, i, m), _ = ve(ee.r, ee.g, ee.b);
|
|
2567
|
-
u.value = _.h,
|
|
2567
|
+
u.value = _.h, h.value = _.s, $.value = _.v, Ot(), Rt(), ka();
|
|
2568
2568
|
}
|
|
2569
2569
|
}, bt = () => {
|
|
2570
2570
|
const { l: v, c: i, h: m } = N.value;
|
|
2571
2571
|
if (v >= 0 && v <= 100 && i >= 0 && i <= 100 && m >= 0 && m <= 360) {
|
|
2572
2572
|
const ee = pe(v, i, m), _ = ve(ee.r, ee.g, ee.b);
|
|
2573
|
-
u.value = _.h,
|
|
2573
|
+
u.value = _.h, h.value = _.s, $.value = _.v, Ot(), Rt(), ya();
|
|
2574
2574
|
}
|
|
2575
2575
|
}, jt = () => {
|
|
2576
2576
|
const v = Math.max(0, Math.min(100, E.value));
|
|
@@ -2583,7 +2583,7 @@ const co = {
|
|
|
2583
2583
|
c.value = G(v, i, m);
|
|
2584
2584
|
}, Rt = () => {
|
|
2585
2585
|
const { r: v, g: i, b: m } = Pe.value;
|
|
2586
|
-
|
|
2586
|
+
g.value = { r: v, g: i, b: m };
|
|
2587
2587
|
}, ya = () => {
|
|
2588
2588
|
const { r: v, g: i, b: m } = Pe.value, ee = he(v, i, m);
|
|
2589
2589
|
C.value = ee;
|
|
@@ -2595,7 +2595,7 @@ const co = {
|
|
|
2595
2595
|
const i = Ie(v);
|
|
2596
2596
|
if (i) {
|
|
2597
2597
|
const m = ve(i.r, i.g, i.b);
|
|
2598
|
-
u.value = m.h,
|
|
2598
|
+
u.value = m.h, h.value = m.s, $.value = m.v, Ot(), Rt();
|
|
2599
2599
|
}
|
|
2600
2600
|
}, Qa = () => {
|
|
2601
2601
|
S.value = !S.value;
|
|
@@ -2614,10 +2614,10 @@ const co = {
|
|
|
2614
2614
|
}
|
|
2615
2615
|
if (v) {
|
|
2616
2616
|
const i = ve(v.r, v.g, v.b);
|
|
2617
|
-
u.value = i.h,
|
|
2617
|
+
u.value = i.h, h.value = i.s, $.value = i.v, Ot(), Rt();
|
|
2618
2618
|
}
|
|
2619
2619
|
};
|
|
2620
|
-
return Le([u,
|
|
2620
|
+
return Le([u, h, $, A], () => {
|
|
2621
2621
|
Ot(), Rt(), ya(), ka();
|
|
2622
2622
|
const v = He(at.value);
|
|
2623
2623
|
v !== ye && (w.value ? (te && clearTimeout(te), te = setTimeout(() => {
|
|
@@ -2629,7 +2629,7 @@ const co = {
|
|
|
2629
2629
|
ue.value = !1;
|
|
2630
2630
|
}, 5)));
|
|
2631
2631
|
}, { deep: !0 }), Le(u, () => {
|
|
2632
|
-
S.value && l.compareColor && (
|
|
2632
|
+
S.value && l.compareColor && (yt.value = [], nt.value = [], it.value = "", zt.value = "", Vt.value = "", It.value = "");
|
|
2633
2633
|
}), Le(() => l.modelValue, (v) => {
|
|
2634
2634
|
if (v && !ue.value) {
|
|
2635
2635
|
const i = He(v), m = He(at.value);
|
|
@@ -2767,8 +2767,8 @@ const co = {
|
|
|
2767
2767
|
e("div", {
|
|
2768
2768
|
class: "ui-color-picker-cursor",
|
|
2769
2769
|
style: Oe({
|
|
2770
|
-
left: `${
|
|
2771
|
-
top: `${(1 -
|
|
2770
|
+
left: `${h.value * 100}%`,
|
|
2771
|
+
top: `${(1 - $.value) * 100}%`,
|
|
2772
2772
|
backgroundColor: at.value
|
|
2773
2773
|
})
|
|
2774
2774
|
}, [...i[15] || (i[15] = [
|
|
@@ -2932,7 +2932,7 @@ const co = {
|
|
|
2932
2932
|
e("div", qo, [
|
|
2933
2933
|
i[25] || (i[25] = e("label", { class: "ui-color-picker-label" }, "R", -1)),
|
|
2934
2934
|
Xe(e("input", {
|
|
2935
|
-
"onUpdate:modelValue": i[1] || (i[1] = (m) =>
|
|
2935
|
+
"onUpdate:modelValue": i[1] || (i[1] = (m) => g.value.r = m),
|
|
2936
2936
|
onInput: tt,
|
|
2937
2937
|
class: "ui-color-picker-input",
|
|
2938
2938
|
type: "number",
|
|
@@ -2941,7 +2941,7 @@ const co = {
|
|
|
2941
2941
|
}, null, 544), [
|
|
2942
2942
|
[
|
|
2943
2943
|
Je,
|
|
2944
|
-
|
|
2944
|
+
g.value.r,
|
|
2945
2945
|
void 0,
|
|
2946
2946
|
{ number: !0 }
|
|
2947
2947
|
]
|
|
@@ -2950,7 +2950,7 @@ const co = {
|
|
|
2950
2950
|
e("div", Zo, [
|
|
2951
2951
|
i[26] || (i[26] = e("label", { class: "ui-color-picker-label" }, "G", -1)),
|
|
2952
2952
|
Xe(e("input", {
|
|
2953
|
-
"onUpdate:modelValue": i[2] || (i[2] = (m) =>
|
|
2953
|
+
"onUpdate:modelValue": i[2] || (i[2] = (m) => g.value.g = m),
|
|
2954
2954
|
onInput: tt,
|
|
2955
2955
|
class: "ui-color-picker-input",
|
|
2956
2956
|
type: "number",
|
|
@@ -2959,7 +2959,7 @@ const co = {
|
|
|
2959
2959
|
}, null, 544), [
|
|
2960
2960
|
[
|
|
2961
2961
|
Je,
|
|
2962
|
-
|
|
2962
|
+
g.value.g,
|
|
2963
2963
|
void 0,
|
|
2964
2964
|
{ number: !0 }
|
|
2965
2965
|
]
|
|
@@ -2968,7 +2968,7 @@ const co = {
|
|
|
2968
2968
|
e("div", Ko, [
|
|
2969
2969
|
i[27] || (i[27] = e("label", { class: "ui-color-picker-label" }, "B", -1)),
|
|
2970
2970
|
Xe(e("input", {
|
|
2971
|
-
"onUpdate:modelValue": i[3] || (i[3] = (m) =>
|
|
2971
|
+
"onUpdate:modelValue": i[3] || (i[3] = (m) => g.value.b = m),
|
|
2972
2972
|
onInput: tt,
|
|
2973
2973
|
class: "ui-color-picker-input",
|
|
2974
2974
|
type: "number",
|
|
@@ -2977,7 +2977,7 @@ const co = {
|
|
|
2977
2977
|
}, null, 544), [
|
|
2978
2978
|
[
|
|
2979
2979
|
Je,
|
|
2980
|
-
|
|
2980
|
+
g.value.b,
|
|
2981
2981
|
void 0,
|
|
2982
2982
|
{ number: !0 }
|
|
2983
2983
|
]
|
|
@@ -3289,12 +3289,12 @@ const co = {
|
|
|
3289
3289
|
},
|
|
3290
3290
|
emits: ["update:modelValue"],
|
|
3291
3291
|
setup(s, { emit: r }) {
|
|
3292
|
-
const t = s, l = r, z =
|
|
3292
|
+
const t = s, l = r, z = M(), V = M(), y = M(!1), k = U({
|
|
3293
3293
|
get: () => t.modelValue,
|
|
3294
|
-
set: (
|
|
3294
|
+
set: (g) => l("update:modelValue", g)
|
|
3295
3295
|
}), u = U(() => t.modelValue || "#000000"), {
|
|
3296
|
-
floatingStyle:
|
|
3297
|
-
updatePosition:
|
|
3296
|
+
floatingStyle: h,
|
|
3297
|
+
updatePosition: $,
|
|
3298
3298
|
cleanup: A
|
|
3299
3299
|
} = Oa({
|
|
3300
3300
|
trigger: z,
|
|
@@ -3311,14 +3311,14 @@ const co = {
|
|
|
3311
3311
|
}
|
|
3312
3312
|
}
|
|
3313
3313
|
}), c = async () => {
|
|
3314
|
-
t.disabled || (y.value = !y.value, y.value && (await
|
|
3314
|
+
t.disabled || (y.value = !y.value, y.value && (await ht(), $()));
|
|
3315
3315
|
};
|
|
3316
3316
|
return Le(
|
|
3317
3317
|
[() => t.showContrast, () => t.compareColor],
|
|
3318
3318
|
() => {
|
|
3319
|
-
y.value &&
|
|
3319
|
+
y.value && ht(() => {
|
|
3320
3320
|
setTimeout(() => {
|
|
3321
|
-
|
|
3321
|
+
$();
|
|
3322
3322
|
}, 50);
|
|
3323
3323
|
});
|
|
3324
3324
|
},
|
|
@@ -3326,15 +3326,15 @@ const co = {
|
|
|
3326
3326
|
), Le(
|
|
3327
3327
|
() => t.modelValue,
|
|
3328
3328
|
() => {
|
|
3329
|
-
y.value && t.showContrast && t.compareColor &&
|
|
3329
|
+
y.value && t.showContrast && t.compareColor && ht(() => {
|
|
3330
3330
|
setTimeout(() => {
|
|
3331
|
-
|
|
3331
|
+
$();
|
|
3332
3332
|
}, 100);
|
|
3333
3333
|
});
|
|
3334
3334
|
}
|
|
3335
3335
|
), xt(() => {
|
|
3336
3336
|
A();
|
|
3337
|
-
}), (
|
|
3337
|
+
}), (g, E) => (a(), o("div", {
|
|
3338
3338
|
ref_key: "containerRef",
|
|
3339
3339
|
ref: z,
|
|
3340
3340
|
class: "ui-color-picker-button-container"
|
|
@@ -3366,13 +3366,13 @@ const co = {
|
|
|
3366
3366
|
ref_key: "popoverRef",
|
|
3367
3367
|
ref: V,
|
|
3368
3368
|
class: "ui-color-picker-popover",
|
|
3369
|
-
style: Oe(n(
|
|
3369
|
+
style: Oe(n(h))
|
|
3370
3370
|
}, [
|
|
3371
3371
|
d(Za, $a({
|
|
3372
3372
|
modelValue: k.value,
|
|
3373
3373
|
"onUpdate:modelValue": E[0] || (E[0] = (D) => k.value = D)
|
|
3374
3374
|
}, t, {
|
|
3375
|
-
"onUpdate:modelValue": E[1] || (E[1] = (D) =>
|
|
3375
|
+
"onUpdate:modelValue": E[1] || (E[1] = (D) => g.$emit("update:modelValue", D))
|
|
3376
3376
|
}), null, 16, ["modelValue"])
|
|
3377
3377
|
], 4)) : I("", !0)
|
|
3378
3378
|
]))
|
|
@@ -3458,17 +3458,17 @@ const co = {
|
|
|
3458
3458
|
},
|
|
3459
3459
|
emits: ["rowClick", "rowSelect", "sort", "columnReorder", "cellUpdate"],
|
|
3460
3460
|
setup(s, { expose: r, emit: t }) {
|
|
3461
|
-
const l = s, z = t, V = ga(), y =
|
|
3461
|
+
const l = s, z = t, V = ga(), y = M(null), k = M([...l.data]), u = M([...l.columns]);
|
|
3462
3462
|
Le(() => l.data, (G) => {
|
|
3463
3463
|
k.value = [...G];
|
|
3464
3464
|
}, { deep: !0 }), Le(() => l.columns, (G) => {
|
|
3465
3465
|
u.value = [...G];
|
|
3466
3466
|
}, { deep: !0 });
|
|
3467
|
-
const
|
|
3467
|
+
const h = () => {
|
|
3468
3468
|
k.value = [...l.data], p.value.clear(), L.value.clear();
|
|
3469
|
-
},
|
|
3469
|
+
}, $ = () => {
|
|
3470
3470
|
u.value = [...l.columns];
|
|
3471
|
-
}, A =
|
|
3471
|
+
}, A = M(""), c = M("asc"), g = M({}), E = M({}), D = M(""), C = M(/* @__PURE__ */ new Set()), N = M(/* @__PURE__ */ new Set()), p = M(/* @__PURE__ */ new Set()), L = M(/* @__PURE__ */ new Map()), O = M(null), S = M(null), w = M(!1), q = M(0), Z = M(0), b = U(() => {
|
|
3472
3472
|
const G = {
|
|
3473
3473
|
"--_cols": l.columns.length.toString()
|
|
3474
3474
|
};
|
|
@@ -3489,7 +3489,7 @@ const co = {
|
|
|
3489
3489
|
zIndex: 10
|
|
3490
3490
|
}, ye = U(() => {
|
|
3491
3491
|
let G = [...k.value];
|
|
3492
|
-
if (l.filterable && Object.keys(
|
|
3492
|
+
if (l.filterable && Object.keys(g.value).length > 0 && (G = G.filter((he) => Object.entries(g.value).every(([X, fe]) => {
|
|
3493
3493
|
if (!fe || fe === "") return !0;
|
|
3494
3494
|
const pe = u.value.find((Fe) => Fe.key === X), He = Me(he, X, pe), Ne = String(He || "").toLowerCase();
|
|
3495
3495
|
return Array.isArray(fe) ? fe.some((Fe) => Ne.includes(String(Fe).toLowerCase())) : Ne.includes(String(fe).toLowerCase());
|
|
@@ -3557,8 +3557,8 @@ const co = {
|
|
|
3557
3557
|
for (let Pe = 0; Pe < Ne.length - 1; Pe++)
|
|
3558
3558
|
Fe = Fe[Ne[Pe]];
|
|
3559
3559
|
Fe[Ne[Ne.length - 1]] = X;
|
|
3560
|
-
const
|
|
3561
|
-
X !==
|
|
3560
|
+
const Ct = L.value.get(He);
|
|
3561
|
+
X !== Ct ? p.value.add(He) : p.value.delete(He), z("cellUpdate", G, he, X, pe);
|
|
3562
3562
|
}, le = (G, he) => {
|
|
3563
3563
|
if (l.reorderable) {
|
|
3564
3564
|
if (O.value = he, w.value = !0, q.value = G.clientX, Z.value = G.clientX, G.dataTransfer) {
|
|
@@ -3596,8 +3596,8 @@ const co = {
|
|
|
3596
3596
|
r({
|
|
3597
3597
|
internalData: k,
|
|
3598
3598
|
internalColumns: u,
|
|
3599
|
-
restoreData:
|
|
3600
|
-
restoreColumns:
|
|
3599
|
+
restoreData: h,
|
|
3600
|
+
restoreColumns: $,
|
|
3601
3601
|
modifiedCells: p,
|
|
3602
3602
|
cellValues: L
|
|
3603
3603
|
});
|
|
@@ -3685,7 +3685,7 @@ const co = {
|
|
|
3685
3685
|
s.filterable || X.filterable ? (a(), o("button", {
|
|
3686
3686
|
key: 0,
|
|
3687
3687
|
onClick: (pe) => K(X.key),
|
|
3688
|
-
class: be(["ui-table-filter-btn", { "ui-table-filter-btn--active":
|
|
3688
|
+
class: be(["ui-table-filter-btn", { "ui-table-filter-btn--active": g.value[X.key] }])
|
|
3689
3689
|
}, [
|
|
3690
3690
|
d(n(ds), { size: 14 })
|
|
3691
3691
|
], 10, _1)) : I("", !0),
|
|
@@ -3700,8 +3700,8 @@ const co = {
|
|
|
3700
3700
|
]),
|
|
3701
3701
|
E.value[X.key] ? (a(), o("div", z1, [
|
|
3702
3702
|
d(Ze, {
|
|
3703
|
-
modelValue:
|
|
3704
|
-
"onUpdate:modelValue": (pe) =>
|
|
3703
|
+
modelValue: g.value[X.key],
|
|
3704
|
+
"onUpdate:modelValue": (pe) => g.value[X.key] = pe,
|
|
3705
3705
|
type: X.filterType,
|
|
3706
3706
|
options: X.filterType === "select" ? j(X) : void 0,
|
|
3707
3707
|
placeholder: `Filter ${X.label}...`,
|
|
@@ -3906,12 +3906,12 @@ const co = {
|
|
|
3906
3906
|
if (!r.gradient || r.variant !== "gradient" && r.variant !== "space") return null;
|
|
3907
3907
|
const { angle: A = "135deg", stops: c = [] } = r.gradient;
|
|
3908
3908
|
if (c.length === 0) return null;
|
|
3909
|
-
const
|
|
3910
|
-
return `linear-gradient(${A}, ${
|
|
3911
|
-
}),
|
|
3909
|
+
const g = c.sort((E, D) => E.position - D.position).map((E) => `${E.color} ${E.position}%`).join(", ");
|
|
3910
|
+
return `linear-gradient(${A}, ${g})`;
|
|
3911
|
+
}), h = U(() => {
|
|
3912
3912
|
const A = {};
|
|
3913
3913
|
return u.value && (A["--hero-custom-background"] = u.value), A;
|
|
3914
|
-
}),
|
|
3914
|
+
}), $ = U(() => {
|
|
3915
3915
|
const A = { ...k.value };
|
|
3916
3916
|
return u.value && (A["--shadow-gradient"] = u.value), A["--border-color"] = r.borderColor, A;
|
|
3917
3917
|
});
|
|
@@ -3920,7 +3920,7 @@ const co = {
|
|
|
3920
3920
|
`ui-hero-wrapper--${s.variant}`,
|
|
3921
3921
|
`ui-hero-wrapper--shadow-${s.shadow}`
|
|
3922
3922
|
]]),
|
|
3923
|
-
style: Oe(
|
|
3923
|
+
style: Oe($.value)
|
|
3924
3924
|
}, [
|
|
3925
3925
|
e("div", {
|
|
3926
3926
|
class: be(["ui-hero", [
|
|
@@ -3930,7 +3930,7 @@ const co = {
|
|
|
3930
3930
|
"ui-hero--sticky": !!s.sticky
|
|
3931
3931
|
}
|
|
3932
3932
|
]]),
|
|
3933
|
-
style: Oe(
|
|
3933
|
+
style: Oe(h.value)
|
|
3934
3934
|
}, [
|
|
3935
3935
|
e("div", R1, [
|
|
3936
3936
|
z.value || s.title || s.description ? (a(), o("div", F1, [
|
|
@@ -3954,7 +3954,7 @@ const co = {
|
|
|
3954
3954
|
], 6)
|
|
3955
3955
|
], 6));
|
|
3956
3956
|
}
|
|
3957
|
-
}), _c = /* @__PURE__ */ De(Q1, [["__scopeId", "data-v-00e0d581"]]), At =
|
|
3957
|
+
}), _c = /* @__PURE__ */ De(Q1, [["__scopeId", "data-v-00e0d581"]]), At = M("system"), Ma = M(!1), Ta = "strands-ui-theme";
|
|
3958
3958
|
function X1() {
|
|
3959
3959
|
return typeof window > "u" ? !1 : window.matchMedia("(prefers-color-scheme: dark)").matches;
|
|
3960
3960
|
}
|
|
@@ -4019,13 +4019,13 @@ function tl() {
|
|
|
4019
4019
|
function V() {
|
|
4020
4020
|
if (typeof window > "u") return;
|
|
4021
4021
|
Ma.value = X1();
|
|
4022
|
-
const y = window.matchMedia("(prefers-color-scheme: dark)"), k = (
|
|
4023
|
-
Ma.value =
|
|
4022
|
+
const y = window.matchMedia("(prefers-color-scheme: dark)"), k = (h) => {
|
|
4023
|
+
Ma.value = h.matches;
|
|
4024
4024
|
};
|
|
4025
4025
|
y.addEventListener ? y.addEventListener("change", k) : y.addListener(k);
|
|
4026
4026
|
const u = J1();
|
|
4027
|
-
At.value = u, Na(s.value), Le(s, (
|
|
4028
|
-
Na(
|
|
4027
|
+
At.value = u, Na(s.value), Le(s, (h) => {
|
|
4028
|
+
Na(h);
|
|
4029
4029
|
}, { immediate: !1 });
|
|
4030
4030
|
}
|
|
4031
4031
|
return We(() => {
|
|
@@ -4086,16 +4086,16 @@ const ol = {
|
|
|
4086
4086
|
includeLabel: { type: Boolean, default: !1 }
|
|
4087
4087
|
},
|
|
4088
4088
|
setup(s) {
|
|
4089
|
-
const r = s, { isForced: t } = sl(), { currentTheme: l, themeLabel: z, setTheme: V, cycleTheme: y, themeOptions: k } = al(), u = U(() => t.value),
|
|
4089
|
+
const r = s, { isForced: t } = sl(), { currentTheme: l, themeLabel: z, setTheme: V, cycleTheme: y, themeOptions: k } = al(), u = U(() => t.value), h = M(!1), $ = {
|
|
4090
4090
|
sun: ms,
|
|
4091
4091
|
moon: ps,
|
|
4092
4092
|
monitor: Ea,
|
|
4093
4093
|
"chevron-up": qa,
|
|
4094
4094
|
"chevron-down": _a
|
|
4095
|
-
}, A = (C) =>
|
|
4095
|
+
}, A = (C) => $[C] || Ea, c = U(() => l.value === "dark" ? "moon" : l.value === "light" ? "sun" : "monitor"), g = U(() => l.value === "dark" ? "Light" : l.value === "light" ? "System" : "Dark"), E = () => {
|
|
4096
4096
|
r.variant === "button" && y();
|
|
4097
4097
|
}, D = (C) => {
|
|
4098
|
-
C.target.closest(".ui-theme-toggle-dropdown") || (
|
|
4098
|
+
C.target.closest(".ui-theme-toggle-dropdown") || (h.value = !1);
|
|
4099
4099
|
};
|
|
4100
4100
|
return We(() => {
|
|
4101
4101
|
document.addEventListener("click", D);
|
|
@@ -4112,7 +4112,7 @@ const ol = {
|
|
|
4112
4112
|
size: s.size,
|
|
4113
4113
|
disabled: u.value,
|
|
4114
4114
|
onClick: N[0] || (N[0] = (p) => u.value ? null : E),
|
|
4115
|
-
title: u.value ? "Theme is locked by app settings" : `Switch to ${
|
|
4115
|
+
title: u.value ? "Theme is locked by app settings" : `Switch to ${g.value.toLowerCase()} theme`,
|
|
4116
4116
|
class: be(["ui-theme-toggle-button", { "ui-theme-toggle--disabled": u.value }])
|
|
4117
4117
|
}, Zt({
|
|
4118
4118
|
default: x(() => [
|
|
@@ -4141,7 +4141,7 @@ const ol = {
|
|
|
4141
4141
|
variant: "ghost",
|
|
4142
4142
|
size: s.size,
|
|
4143
4143
|
disabled: u.value,
|
|
4144
|
-
onClick: N[1] || (N[1] = (p) => u.value ? null :
|
|
4144
|
+
onClick: N[1] || (N[1] = (p) => u.value ? null : h.value = !h.value),
|
|
4145
4145
|
class: be(["ui-theme-toggle-trigger", { "ui-theme-toggle--disabled": u.value }]),
|
|
4146
4146
|
title: u.value ? "Theme is locked by app settings" : void 0
|
|
4147
4147
|
}, {
|
|
@@ -4149,17 +4149,17 @@ const ol = {
|
|
|
4149
4149
|
(a(), Ce(ot(A(c.value))))
|
|
4150
4150
|
]),
|
|
4151
4151
|
"trailing-icon": x(() => [
|
|
4152
|
-
(a(), Ce(ot(A(
|
|
4152
|
+
(a(), Ce(ot(A(h.value ? "chevron-up" : "chevron-down"))))
|
|
4153
4153
|
]),
|
|
4154
4154
|
default: x(() => [
|
|
4155
4155
|
Q(" " + R(n(z)) + R(u.value ? " (Locked)" : "") + " ", 1)
|
|
4156
4156
|
]),
|
|
4157
4157
|
_: 1
|
|
4158
4158
|
}, 8, ["size", "disabled", "class", "title"]),
|
|
4159
|
-
|
|
4159
|
+
h.value ? (a(), o("div", {
|
|
4160
4160
|
key: 0,
|
|
4161
4161
|
class: "ui-theme-toggle-menu",
|
|
4162
|
-
onClick: N[2] || (N[2] = (p) =>
|
|
4162
|
+
onClick: N[2] || (N[2] = (p) => h.value = !1)
|
|
4163
4163
|
}, [
|
|
4164
4164
|
(a(!0), o(Ue, null, Ke(n(k), (p) => (a(), o("button", {
|
|
4165
4165
|
key: p.value,
|
|
@@ -4274,16 +4274,16 @@ const ol = {
|
|
|
4274
4274
|
},
|
|
4275
4275
|
emits: ["update:modelValue", "change", "input", "focus", "blur"],
|
|
4276
4276
|
setup(s, { emit: r }) {
|
|
4277
|
-
const t = s, l = r, z =
|
|
4277
|
+
const t = s, l = r, z = M(), V = M(!1), y = M(0), k = M(null), u = M(0), h = U(() => t.modelValue !== void 0 ? Number(t.modelValue) : t.value !== void 0 ? Number(t.value) : u.value);
|
|
4278
4278
|
Le(() => t.value, (S) => {
|
|
4279
4279
|
S !== void 0 && (u.value = Number(S));
|
|
4280
4280
|
}, { immediate: !0 }), Le(() => t.modelValue, (S) => {
|
|
4281
4281
|
S !== void 0 && (u.value = Number(S));
|
|
4282
4282
|
}, { immediate: !0 });
|
|
4283
|
-
const
|
|
4284
|
-
const S = t.max - t.min, w = (
|
|
4283
|
+
const $ = U(() => {
|
|
4284
|
+
const S = t.max - t.min, w = (h.value - t.min) / S * 100;
|
|
4285
4285
|
return Math.max(0, Math.min(100, w));
|
|
4286
|
-
}), A = U(() =>
|
|
4286
|
+
}), A = U(() => h.value?.toFixed(t.step < 1 ? 1 : 0) || "0"), c = U(() => `slider-size-${t.size}`), g = U(() => t.color ? `slider-color-${t.color}` : ""), E = U(() => {
|
|
4287
4287
|
if (!t.showTicks) return [];
|
|
4288
4288
|
const S = [], w = t.max - t.min, q = w / (t.tickCount - 1);
|
|
4289
4289
|
for (let Z = 0; Z < t.tickCount; Z++) {
|
|
@@ -4315,7 +4315,7 @@ const ol = {
|
|
|
4315
4315
|
return (S, w) => (a(), o("div", {
|
|
4316
4316
|
class: be(["slider-wrapper", [
|
|
4317
4317
|
c.value,
|
|
4318
|
-
|
|
4318
|
+
g.value,
|
|
4319
4319
|
{
|
|
4320
4320
|
"slider-disabled": s.disabled,
|
|
4321
4321
|
"slider-dragging": V.value
|
|
@@ -4343,7 +4343,7 @@ const ol = {
|
|
|
4343
4343
|
ref_key: "sliderRef",
|
|
4344
4344
|
ref: z,
|
|
4345
4345
|
type: "range",
|
|
4346
|
-
value:
|
|
4346
|
+
value: h.value,
|
|
4347
4347
|
min: s.min,
|
|
4348
4348
|
max: s.max,
|
|
4349
4349
|
step: s.step,
|
|
@@ -4362,12 +4362,12 @@ const ol = {
|
|
|
4362
4362
|
e("div", hl, [
|
|
4363
4363
|
e("div", {
|
|
4364
4364
|
class: "slider-progress",
|
|
4365
|
-
style: Oe({ width:
|
|
4365
|
+
style: Oe({ width: $.value + "%" })
|
|
4366
4366
|
}, null, 4)
|
|
4367
4367
|
]),
|
|
4368
4368
|
e("div", {
|
|
4369
4369
|
class: "slider-thumb",
|
|
4370
|
-
style: Oe({ left:
|
|
4370
|
+
style: Oe({ left: $.value + "%" })
|
|
4371
4371
|
}, null, 4)
|
|
4372
4372
|
]),
|
|
4373
4373
|
s.showMinMax ? (a(), o("div", gl, R(s.max) + R(s.unit), 1)) : I("", !0)
|
|
@@ -4429,17 +4429,17 @@ const ol = {
|
|
|
4429
4429
|
},
|
|
4430
4430
|
emits: ["update:modelValue", "change", "focus", "blur"],
|
|
4431
4431
|
setup(s, { emit: r }) {
|
|
4432
|
-
const t = s, l = r, z = U(() => `radio-group-size-${t.size}`), V = U(() => t.orientation === "horizontal" ? "radio-options-horizontal" : "radio-options-vertical"), y = (
|
|
4433
|
-
t.disabled ||
|
|
4434
|
-
}, k = (
|
|
4435
|
-
const c =
|
|
4432
|
+
const t = s, l = r, z = U(() => `radio-group-size-${t.size}`), V = U(() => t.orientation === "horizontal" ? "radio-options-horizontal" : "radio-options-vertical"), y = ($) => {
|
|
4433
|
+
t.disabled || $.disabled || t.modelValue !== $.value && (l("update:modelValue", $.value), l("change", $.value));
|
|
4434
|
+
}, k = ($) => {
|
|
4435
|
+
const c = $.target.value;
|
|
4436
4436
|
l("update:modelValue", c), l("change", c);
|
|
4437
|
-
}, u = (
|
|
4438
|
-
l("focus",
|
|
4439
|
-
},
|
|
4440
|
-
l("blur",
|
|
4437
|
+
}, u = ($) => {
|
|
4438
|
+
l("focus", $);
|
|
4439
|
+
}, h = ($) => {
|
|
4440
|
+
l("blur", $);
|
|
4441
4441
|
};
|
|
4442
|
-
return (
|
|
4442
|
+
return ($, A) => (a(), o("div", {
|
|
4443
4443
|
class: be(["radio-group", [
|
|
4444
4444
|
z.value,
|
|
4445
4445
|
{ "radio-group-disabled": s.disabled }
|
|
@@ -4465,7 +4465,7 @@ const ol = {
|
|
|
4465
4465
|
"radio-option-card": s.variant === "card"
|
|
4466
4466
|
}
|
|
4467
4467
|
]]),
|
|
4468
|
-
onClick: (
|
|
4468
|
+
onClick: (g) => y(c)
|
|
4469
4469
|
}, [
|
|
4470
4470
|
e("input", {
|
|
4471
4471
|
id: `${s.fieldId}-${c.value}`,
|
|
@@ -4478,7 +4478,7 @@ const ol = {
|
|
|
4478
4478
|
class: "radio-input",
|
|
4479
4479
|
onChange: k,
|
|
4480
4480
|
onFocus: u,
|
|
4481
|
-
onBlur:
|
|
4481
|
+
onBlur: h
|
|
4482
4482
|
}, null, 40, _l),
|
|
4483
4483
|
A[0] || (A[0] = e("div", { class: "radio-button" }, [
|
|
4484
4484
|
e("div", { class: "radio-button-inner" })
|
|
@@ -4572,14 +4572,14 @@ const ol = {
|
|
|
4572
4572
|
return C.length > 0 && C.every(
|
|
4573
4573
|
(N) => t.modelValue.includes(N.value)
|
|
4574
4574
|
);
|
|
4575
|
-
}), k = U(() => t.options.filter((N) => !N.disabled).some((N) => t.modelValue.includes(N.value))), u = (C) => t.modelValue.includes(C),
|
|
4575
|
+
}), k = U(() => t.options.filter((N) => !N.disabled).some((N) => t.modelValue.includes(N.value))), u = (C) => t.modelValue.includes(C), h = (C) => t.options.find((p) => p.value === C)?.indeterminate || !1, $ = (C) => {
|
|
4576
4576
|
t.disabled || C.disabled || A(C);
|
|
4577
4577
|
}, A = (C, N) => {
|
|
4578
4578
|
const p = [...t.modelValue], L = p.indexOf(C.value);
|
|
4579
4579
|
L > -1 ? p.splice(L, 1) : p.push(C.value), l("update:modelValue", p), l("change", p);
|
|
4580
4580
|
}, c = () => {
|
|
4581
|
-
t.disabled ||
|
|
4582
|
-
},
|
|
4581
|
+
t.disabled || g();
|
|
4582
|
+
}, g = () => {
|
|
4583
4583
|
const C = t.options.filter((N) => !N.disabled);
|
|
4584
4584
|
if (y.value) {
|
|
4585
4585
|
const N = t.modelValue.filter(
|
|
@@ -4619,10 +4619,10 @@ const ol = {
|
|
|
4619
4619
|
"checkbox-option-selected": u(p.value),
|
|
4620
4620
|
"checkbox-option-disabled": s.disabled || p.disabled,
|
|
4621
4621
|
"checkbox-option-card": s.variant === "card",
|
|
4622
|
-
"checkbox-option-indeterminate":
|
|
4622
|
+
"checkbox-option-indeterminate": h(p.value)
|
|
4623
4623
|
}
|
|
4624
4624
|
]]),
|
|
4625
|
-
onClick: (L) =>
|
|
4625
|
+
onClick: (L) => $(p)
|
|
4626
4626
|
}, [
|
|
4627
4627
|
e("input", {
|
|
4628
4628
|
id: `${s.fieldId}-${p.value}`,
|
|
@@ -4632,7 +4632,7 @@ const ol = {
|
|
|
4632
4632
|
checked: u(p.value),
|
|
4633
4633
|
disabled: s.disabled || p.disabled,
|
|
4634
4634
|
required: s.required && s.modelValue.length === 0,
|
|
4635
|
-
indeterminate:
|
|
4635
|
+
indeterminate: h(p.value),
|
|
4636
4636
|
class: "checkbox-input",
|
|
4637
4637
|
onChange: (L) => A(p),
|
|
4638
4638
|
onFocus: E,
|
|
@@ -4645,7 +4645,7 @@ const ol = {
|
|
|
4645
4645
|
d: "M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",
|
|
4646
4646
|
"clip-rule": "evenodd"
|
|
4647
4647
|
}, null, -1)
|
|
4648
|
-
])])) :
|
|
4648
|
+
])])) : h(p.value) ? (a(), o("svg", Fl, [...N[1] || (N[1] = [
|
|
4649
4649
|
e("path", {
|
|
4650
4650
|
"fill-rule": "evenodd",
|
|
4651
4651
|
d: "M4 10a1 1 0 011-1h10a1 1 0 110 2H5a1 1 0 01-1-1z",
|
|
@@ -4679,7 +4679,7 @@ const ol = {
|
|
|
4679
4679
|
checked: y.value,
|
|
4680
4680
|
indeterminate: k.value && !y.value,
|
|
4681
4681
|
class: "checkbox-input select-all-input",
|
|
4682
|
-
onChange:
|
|
4682
|
+
onChange: g
|
|
4683
4683
|
}, null, 40, Wl),
|
|
4684
4684
|
e("div", Ql, [
|
|
4685
4685
|
y.value ? (a(), o("svg", Xl, [...N[2] || (N[2] = [
|
|
@@ -4815,7 +4815,7 @@ const ol = {
|
|
|
4815
4815
|
], 2)) : I("", !0)
|
|
4816
4816
|
]));
|
|
4817
4817
|
}
|
|
4818
|
-
}), Et = /* @__PURE__ */ De(gn, [["__scopeId", "data-v-fe426315"]]), fa =
|
|
4818
|
+
}), Et = /* @__PURE__ */ De(gn, [["__scopeId", "data-v-fe426315"]]), fa = M([]), Ba = M(!1), Qe = M(!1);
|
|
4819
4819
|
function Tt() {
|
|
4820
4820
|
const { getUrl: s } = pt(), { currentSession: r } = ft(), t = U(() => fa.value.length > 0), l = U(
|
|
4821
4821
|
() => fa.value.filter(
|
|
@@ -4888,7 +4888,7 @@ function Tt() {
|
|
|
4888
4888
|
} finally {
|
|
4889
4889
|
Qe.value = !1;
|
|
4890
4890
|
}
|
|
4891
|
-
},
|
|
4891
|
+
}, h = async (C) => {
|
|
4892
4892
|
Qe.value = !0;
|
|
4893
4893
|
try {
|
|
4894
4894
|
await z(s("mfaEmailSend"), {
|
|
@@ -4898,7 +4898,7 @@ function Tt() {
|
|
|
4898
4898
|
} finally {
|
|
4899
4899
|
Qe.value = !1;
|
|
4900
4900
|
}
|
|
4901
|
-
},
|
|
4901
|
+
}, $ = async (C, N) => {
|
|
4902
4902
|
Qe.value = !0;
|
|
4903
4903
|
try {
|
|
4904
4904
|
return (await z(s("mfaEmailVerify"), {
|
|
@@ -4931,7 +4931,7 @@ function Tt() {
|
|
|
4931
4931
|
} finally {
|
|
4932
4932
|
Qe.value = !1;
|
|
4933
4933
|
}
|
|
4934
|
-
},
|
|
4934
|
+
}, g = (C) => {
|
|
4935
4935
|
switch (C) {
|
|
4936
4936
|
case "totp":
|
|
4937
4937
|
return "📱";
|
|
@@ -4978,12 +4978,12 @@ function Tt() {
|
|
|
4978
4978
|
setupTotp: y,
|
|
4979
4979
|
verifyTotpSetup: k,
|
|
4980
4980
|
setupEmailMfa: u,
|
|
4981
|
-
sendEmailMfaCode:
|
|
4982
|
-
verifyEmailMfaCode:
|
|
4981
|
+
sendEmailMfaCode: h,
|
|
4982
|
+
verifyEmailMfaCode: $,
|
|
4983
4983
|
disableMfaDevice: A,
|
|
4984
4984
|
regenerateBackupCodes: c,
|
|
4985
4985
|
// Helper methods
|
|
4986
|
-
getDeviceTypeIcon:
|
|
4986
|
+
getDeviceTypeIcon: g,
|
|
4987
4987
|
getDeviceTypeName: E,
|
|
4988
4988
|
formatLastUsed: D
|
|
4989
4989
|
};
|
|
@@ -5119,24 +5119,24 @@ const Cn = { class: "accui-component-scope" }, yn = { class: "mfa-verification-c
|
|
|
5119
5119
|
oe("path", { d: "m12 17 .01 0" })
|
|
5120
5120
|
]);
|
|
5121
5121
|
}
|
|
5122
|
-
}, u = s,
|
|
5123
|
-
loading:
|
|
5122
|
+
}, u = s, h = r, {
|
|
5123
|
+
loading: $,
|
|
5124
5124
|
getDeviceTypeName: A
|
|
5125
5125
|
} = Tt(), {
|
|
5126
5126
|
verifyMfa: c,
|
|
5127
|
-
sendMfaEmailCode:
|
|
5127
|
+
sendMfaEmailCode: g,
|
|
5128
5128
|
getMfaWebAuthnChallenge: E,
|
|
5129
5129
|
mfaSessionId: D,
|
|
5130
5130
|
loading: C,
|
|
5131
5131
|
loadingMessage: N,
|
|
5132
5132
|
isSendingMfaEmail: p,
|
|
5133
5133
|
isVerifyingMfa: L
|
|
5134
|
-
} = ft(), O = U(() =>
|
|
5134
|
+
} = ft(), O = U(() => $.value || C.value), S = U({
|
|
5135
5135
|
get: () => u.show,
|
|
5136
5136
|
set: ($e) => {
|
|
5137
|
-
$e ||
|
|
5137
|
+
$e || h("close");
|
|
5138
5138
|
}
|
|
5139
|
-
}), w =
|
|
5139
|
+
}), w = M(null), q = M(""), Z = M(""), b = M(""), T = M(""), te = M(!1), ue = M(!1), ye = M(!1), Me = M(0);
|
|
5140
5140
|
let Ae = null;
|
|
5141
5141
|
const Se = U(() => (u.availableMfaMethods || []).filter(
|
|
5142
5142
|
(re) => re.device_type !== "hardware" && re.device_type !== "passkey"
|
|
@@ -5146,16 +5146,16 @@ const Cn = { class: "accui-component-scope" }, yn = { class: "mfa-verification-c
|
|
|
5146
5146
|
}, { immediate: !0 }), Le(() => u.show, async ($e) => {
|
|
5147
5147
|
$e ? (q.value = "", Z.value = "", b.value = "", T.value = "", te.value = !1, ue.value = !1, ye.value = !1, Me.value = 0, Ae && (clearInterval(Ae), Ae = null), Se.value.length === 1 && (w.value = Se.value[0], w.value.device_type === "email" && setTimeout(async () => {
|
|
5148
5148
|
try {
|
|
5149
|
-
await
|
|
5149
|
+
await g(w.value.id), ue.value = !0, W();
|
|
5150
5150
|
} catch (re) {
|
|
5151
|
-
|
|
5151
|
+
h("error", re instanceof Error ? re.message : "Failed to send email code");
|
|
5152
5152
|
}
|
|
5153
5153
|
}, 100))) : w.value = null;
|
|
5154
5154
|
}), Fa(() => {
|
|
5155
5155
|
Ae && clearInterval(Ae);
|
|
5156
5156
|
});
|
|
5157
5157
|
const xe = () => {
|
|
5158
|
-
|
|
5158
|
+
h("close");
|
|
5159
5159
|
}, ne = ($e) => {
|
|
5160
5160
|
w.value = $e, q.value = "", Z.value = "", ue.value = !1, te.value = !1;
|
|
5161
5161
|
}, j = ($e) => {
|
|
@@ -5178,9 +5178,9 @@ const Cn = { class: "accui-component-scope" }, yn = { class: "mfa-verification-c
|
|
|
5178
5178
|
}, ae = async () => {
|
|
5179
5179
|
if (!(!w.value || w.value.device_type !== "email"))
|
|
5180
5180
|
try {
|
|
5181
|
-
await
|
|
5181
|
+
await g(w.value.id), ue.value = !0, W();
|
|
5182
5182
|
} catch ($e) {
|
|
5183
|
-
|
|
5183
|
+
h("error", $e instanceof Error ? $e.message : "Failed to send email code");
|
|
5184
5184
|
}
|
|
5185
5185
|
}, W = () => {
|
|
5186
5186
|
ye.value = !0, Me.value = 30, Ae = setInterval(() => {
|
|
@@ -5190,7 +5190,7 @@ const Cn = { class: "accui-component-scope" }, yn = { class: "mfa-verification-c
|
|
|
5190
5190
|
if (!(!w.value || !q.value)) {
|
|
5191
5191
|
Z.value = "";
|
|
5192
5192
|
try {
|
|
5193
|
-
await c(w.value.id, q.value),
|
|
5193
|
+
await c(w.value.id, q.value), h("success");
|
|
5194
5194
|
} catch ($e) {
|
|
5195
5195
|
Z.value = $e instanceof Error ? $e.message : "Invalid verification code";
|
|
5196
5196
|
}
|
|
@@ -5199,7 +5199,7 @@ const Cn = { class: "accui-component-scope" }, yn = { class: "mfa-verification-c
|
|
|
5199
5199
|
if (b.value) {
|
|
5200
5200
|
T.value = "";
|
|
5201
5201
|
try {
|
|
5202
|
-
await c("", b.value, !0),
|
|
5202
|
+
await c("", b.value, !0), h("success");
|
|
5203
5203
|
} catch ($e) {
|
|
5204
5204
|
T.value = $e instanceof Error ? $e.message : "Invalid backup code";
|
|
5205
5205
|
}
|
|
@@ -5220,7 +5220,7 @@ const Cn = { class: "accui-component-scope" }, yn = { class: "mfa-verification-c
|
|
|
5220
5220
|
}, Ee = async () => {
|
|
5221
5221
|
const $e = u.sessionId || D.value;
|
|
5222
5222
|
if (!w.value || w.value.device_type !== "hardware" && w.value.device_type !== "passkey" || !$e) {
|
|
5223
|
-
|
|
5223
|
+
h("error", "Missing requirements for hardware key authentication");
|
|
5224
5224
|
return;
|
|
5225
5225
|
}
|
|
5226
5226
|
try {
|
|
@@ -5229,7 +5229,7 @@ const Cn = { class: "accui-component-scope" }, yn = { class: "mfa-verification-c
|
|
|
5229
5229
|
const re = await E(w.value.id), ve = re.challenge.publicKey || re.challenge, Ie = (Ne) => {
|
|
5230
5230
|
if (!Ne || typeof Ne != "string")
|
|
5231
5231
|
return new Uint8Array(0);
|
|
5232
|
-
const Fe = "=".repeat((4 - Ne.length % 4) % 4),
|
|
5232
|
+
const Fe = "=".repeat((4 - Ne.length % 4) % 4), Ct = (Ne + Fe).replace(/-/g, "+").replace(/_/g, "/"), Pe = window.atob(Ct), Ut = new Uint8Array(Pe.length);
|
|
5233
5233
|
for (let at = 0; at < Pe.length; ++at)
|
|
5234
5234
|
Ut[at] = Pe.charCodeAt(at);
|
|
5235
5235
|
return Ut;
|
|
@@ -5277,9 +5277,9 @@ const Cn = { class: "accui-component-scope" }, yn = { class: "mfa-verification-c
|
|
|
5277
5277
|
deviceInfo: pe
|
|
5278
5278
|
// Include detected device info
|
|
5279
5279
|
};
|
|
5280
|
-
await c(w.value.id, JSON.stringify(He)),
|
|
5280
|
+
await c(w.value.id, JSON.stringify(He)), h("success");
|
|
5281
5281
|
} catch (re) {
|
|
5282
|
-
|
|
5282
|
+
h("error", re instanceof Error ? re.message : "Hardware key authentication failed");
|
|
5283
5283
|
}
|
|
5284
5284
|
};
|
|
5285
5285
|
return ($e, re) => (a(), o("div", Cn, [
|
|
@@ -5324,7 +5324,7 @@ const Cn = { class: "accui-component-scope" }, yn = { class: "mfa-verification-c
|
|
|
5324
5324
|
default: x(() => [
|
|
5325
5325
|
e("div", yn, [
|
|
5326
5326
|
O.value && !ue.value ? (a(), o("div", kn, [
|
|
5327
|
-
d(n(
|
|
5327
|
+
d(n(gt), { size: 24 }),
|
|
5328
5328
|
e("span", wn, R(n(p) || n(L) ? n(N) : "Loading..."), 1)
|
|
5329
5329
|
])) : (a(), o("div", bn, [
|
|
5330
5330
|
Se.value.length > 1 ? (a(), o("div", xn, [
|
|
@@ -5562,12 +5562,12 @@ const Cn = { class: "accui-component-scope" }, yn = { class: "mfa-verification-c
|
|
|
5562
5562
|
}
|
|
5563
5563
|
}), Ka = /* @__PURE__ */ De(ei, [["__scopeId", "data-v-f0750b5a"]]), Pa = /* @__PURE__ */ new Map(), ti = 300 * 1e3;
|
|
5564
5564
|
function za(s = {}) {
|
|
5565
|
-
const { getUrl: r, config: t } = pt(), l =
|
|
5565
|
+
const { getUrl: r, config: t } = pt(), l = M([]), z = M(!1), V = M(null), y = U(
|
|
5566
5566
|
() => l.value.filter((c) => c.enabled)
|
|
5567
5567
|
), k = async () => {
|
|
5568
|
-
const c = JSON.stringify(s),
|
|
5569
|
-
if (
|
|
5570
|
-
return l.value =
|
|
5568
|
+
const c = JSON.stringify(s), g = Pa.get(c);
|
|
5569
|
+
if (g && Date.now() - g.timestamp < ti)
|
|
5570
|
+
return l.value = g.data, g.data;
|
|
5571
5571
|
z.value = !0, V.value = null;
|
|
5572
5572
|
try {
|
|
5573
5573
|
let E = r("oauthProviders");
|
|
@@ -5598,8 +5598,8 @@ function za(s = {}) {
|
|
|
5598
5598
|
} finally {
|
|
5599
5599
|
z.value = !1;
|
|
5600
5600
|
}
|
|
5601
|
-
}, u = async (c,
|
|
5602
|
-
const E = { ...s, ...
|
|
5601
|
+
}, u = async (c, g) => {
|
|
5602
|
+
const E = { ...s, ...g }, D = new URLSearchParams();
|
|
5603
5603
|
if (E.redirectUrl) {
|
|
5604
5604
|
let L = E.redirectUrl;
|
|
5605
5605
|
E.redirectUrl.startsWith("/") && (L = `${window.location.origin}${E.redirectUrl}`), D.append("redirect_url", L);
|
|
@@ -5625,7 +5625,7 @@ function za(s = {}) {
|
|
|
5625
5625
|
const O = L instanceof Error ? L.message : "Failed to get OAuth auth URL";
|
|
5626
5626
|
throw new Error(O);
|
|
5627
5627
|
}
|
|
5628
|
-
},
|
|
5628
|
+
}, h = async (c, g) => {
|
|
5629
5629
|
try {
|
|
5630
5630
|
const E = l.value.find((D) => D.id === c);
|
|
5631
5631
|
if (!E)
|
|
@@ -5636,7 +5636,7 @@ function za(s = {}) {
|
|
|
5636
5636
|
} catch (E) {
|
|
5637
5637
|
throw V.value = E instanceof Error ? E.message : "Failed to redirect to OAuth provider", E;
|
|
5638
5638
|
}
|
|
5639
|
-
},
|
|
5639
|
+
}, $ = (c) => l.value.find((g) => g.id === c), A = (c) => {
|
|
5640
5640
|
if (c.iconUrl)
|
|
5641
5641
|
return c.iconUrl;
|
|
5642
5642
|
switch (c.id.toLowerCase()) {
|
|
@@ -5660,8 +5660,8 @@ function za(s = {}) {
|
|
|
5660
5660
|
error: U(() => V.value),
|
|
5661
5661
|
fetchProviders: k,
|
|
5662
5662
|
getProviderAuthUrl: u,
|
|
5663
|
-
redirectToProvider:
|
|
5664
|
-
getProviderById:
|
|
5663
|
+
redirectToProvider: h,
|
|
5664
|
+
getProviderById: $,
|
|
5665
5665
|
getProviderIcon: A
|
|
5666
5666
|
};
|
|
5667
5667
|
}
|
|
@@ -5816,12 +5816,12 @@ const ai = {
|
|
|
5816
5816
|
const t = s, l = r, { getUrl: z, getSupportEmail: V, config: y } = pt(t.config), {
|
|
5817
5817
|
signIn: k,
|
|
5818
5818
|
mfaRequired: u,
|
|
5819
|
-
availableMfaMethods:
|
|
5820
|
-
currentUser:
|
|
5819
|
+
availableMfaMethods: h,
|
|
5820
|
+
currentUser: $,
|
|
5821
5821
|
loadingMessage: A
|
|
5822
5822
|
} = ft(), {
|
|
5823
5823
|
enabledProviders: c,
|
|
5824
|
-
loading:
|
|
5824
|
+
loading: g,
|
|
5825
5825
|
fetchProviders: E,
|
|
5826
5826
|
redirectToProvider: D
|
|
5827
5827
|
} = za({
|
|
@@ -5861,7 +5861,7 @@ const ai = {
|
|
|
5861
5861
|
async requestPasswordReset(ae) {
|
|
5862
5862
|
throw new Error("Password reset functionality is not yet implemented in the API. Please contact support.");
|
|
5863
5863
|
}
|
|
5864
|
-
}, p =
|
|
5864
|
+
}, p = M(t.mode), L = M(!1), O = M(""), S = M(!1), w = M(!1), q = Ye({
|
|
5865
5865
|
firstName: "",
|
|
5866
5866
|
lastName: "",
|
|
5867
5867
|
email: "",
|
|
@@ -5874,7 +5874,7 @@ const ai = {
|
|
|
5874
5874
|
ae && (w.value = !0);
|
|
5875
5875
|
}, { immediate: !0 });
|
|
5876
5876
|
const te = () => {
|
|
5877
|
-
w.value = !1, l("success",
|
|
5877
|
+
w.value = !1, l("success", $.value), y.value.onSignInUrl && typeof window < "u" && (window.location.href = y.value.onSignInUrl);
|
|
5878
5878
|
}, ue = () => {
|
|
5879
5879
|
w.value = !1;
|
|
5880
5880
|
}, ye = (ae) => {
|
|
@@ -6032,7 +6032,7 @@ const ai = {
|
|
|
6032
6032
|
key: le.id,
|
|
6033
6033
|
variant: "outline",
|
|
6034
6034
|
"full-width": "",
|
|
6035
|
-
disabled: n(
|
|
6035
|
+
disabled: n(g),
|
|
6036
6036
|
onClick: (_e) => Ae(le.id),
|
|
6037
6037
|
class: "auth-oauth-button"
|
|
6038
6038
|
}, {
|
|
@@ -6255,7 +6255,7 @@ const ai = {
|
|
|
6255
6255
|
}, 8, ["variant", "color", "class"]),
|
|
6256
6256
|
d(Ka, {
|
|
6257
6257
|
show: w.value,
|
|
6258
|
-
"available-mfa-methods": n(
|
|
6258
|
+
"available-mfa-methods": n(h),
|
|
6259
6259
|
onSuccess: te,
|
|
6260
6260
|
onClose: ue,
|
|
6261
6261
|
onError: ye
|
|
@@ -6326,12 +6326,12 @@ const ai = {
|
|
|
6326
6326
|
mfaSessionId: y,
|
|
6327
6327
|
availableMfaMethods: k,
|
|
6328
6328
|
loading: u,
|
|
6329
|
-
currentUser:
|
|
6329
|
+
currentUser: h
|
|
6330
6330
|
} = ft(), {
|
|
6331
|
-
enabledProviders:
|
|
6331
|
+
enabledProviders: $,
|
|
6332
6332
|
loading: A,
|
|
6333
6333
|
fetchProviders: c,
|
|
6334
|
-
redirectToProvider:
|
|
6334
|
+
redirectToProvider: g
|
|
6335
6335
|
} = za({
|
|
6336
6336
|
redirectUrl: t.redirectUrl,
|
|
6337
6337
|
scopes: t.oauthScopes
|
|
@@ -6341,7 +6341,7 @@ const ai = {
|
|
|
6341
6341
|
console.warn("Failed to fetch OAuth providers:", q);
|
|
6342
6342
|
});
|
|
6343
6343
|
});
|
|
6344
|
-
const E = U(() => u.value), D =
|
|
6344
|
+
const E = U(() => u.value), D = M(""), C = M(!1);
|
|
6345
6345
|
Le(V, (q) => {
|
|
6346
6346
|
q && (C.value = !0);
|
|
6347
6347
|
});
|
|
@@ -6365,7 +6365,7 @@ const ai = {
|
|
|
6365
6365
|
D.value = Z, l("error", Z);
|
|
6366
6366
|
}
|
|
6367
6367
|
}, L = () => {
|
|
6368
|
-
C.value = !1, l("success",
|
|
6368
|
+
C.value = !1, l("success", h.value);
|
|
6369
6369
|
const { config: q } = pt(t.config);
|
|
6370
6370
|
q.value.onSignInUrl && typeof window < "u" && (window.location.href = q.value.onSignInUrl);
|
|
6371
6371
|
}, O = () => {
|
|
@@ -6374,7 +6374,7 @@ const ai = {
|
|
|
6374
6374
|
D.value = q, l("error", q);
|
|
6375
6375
|
}, w = async (q) => {
|
|
6376
6376
|
try {
|
|
6377
|
-
await
|
|
6377
|
+
await g(q, {
|
|
6378
6378
|
redirectUrl: t.redirectUrl,
|
|
6379
6379
|
scopes: t.oauthScopes
|
|
6380
6380
|
});
|
|
@@ -6399,8 +6399,8 @@ const ai = {
|
|
|
6399
6399
|
Q("to continue ")
|
|
6400
6400
|
])
|
|
6401
6401
|
], -1)),
|
|
6402
|
-
n(
|
|
6403
|
-
(a(!0), o(Ue, null, Ke(n(
|
|
6402
|
+
n($)?.length ? (a(), o("div", Ni, [
|
|
6403
|
+
(a(!0), o(Ue, null, Ke(n($), (b, T, te, ue) => {
|
|
6404
6404
|
const ye = [b.id, b.name, b.displayName, n(A)];
|
|
6405
6405
|
if (ue && ue.key === b.id && ss(ue, ye)) return ue;
|
|
6406
6406
|
const Me = (a(), Ce(n(ce), {
|
|
@@ -6432,7 +6432,7 @@ const ai = {
|
|
|
6432
6432
|
return Me.memo = ye, Me;
|
|
6433
6433
|
}, Z, 0), 128))
|
|
6434
6434
|
])) : I("", !0),
|
|
6435
|
-
n(
|
|
6435
|
+
n($)?.length ? (a(), o("div", qi, [...Z[7] || (Z[7] = [
|
|
6436
6436
|
e("span", { class: "divider-text" }, "Or sign in with email", -1)
|
|
6437
6437
|
])])) : I("", !0),
|
|
6438
6438
|
e("form", {
|
|
@@ -6594,7 +6594,7 @@ const ai = {
|
|
|
6594
6594
|
enabledProviders: y,
|
|
6595
6595
|
loading: k,
|
|
6596
6596
|
fetchProviders: u,
|
|
6597
|
-
redirectToProvider:
|
|
6597
|
+
redirectToProvider: h
|
|
6598
6598
|
} = za({
|
|
6599
6599
|
redirectUrl: t.redirectUrl,
|
|
6600
6600
|
scopes: t.oauthScopes
|
|
@@ -6604,12 +6604,12 @@ const ai = {
|
|
|
6604
6604
|
console.warn("Failed to fetch OAuth providers:", O);
|
|
6605
6605
|
});
|
|
6606
6606
|
});
|
|
6607
|
-
const
|
|
6607
|
+
const $ = M(!1), A = M(""), c = M(!1), g = M(""), E = M("Magic Link Sent!"), D = M(""), C = Ye({
|
|
6608
6608
|
email: ""
|
|
6609
6609
|
});
|
|
6610
6610
|
U(() => C.email.trim() && C.email.includes("@"));
|
|
6611
6611
|
const N = async () => {
|
|
6612
|
-
|
|
6612
|
+
$.value = !0, A.value = "";
|
|
6613
6613
|
try {
|
|
6614
6614
|
const O = z("signUp"), S = await fetch(O, {
|
|
6615
6615
|
method: "POST",
|
|
@@ -6631,7 +6631,7 @@ const ai = {
|
|
|
6631
6631
|
throw new Error(q);
|
|
6632
6632
|
}
|
|
6633
6633
|
const w = await S.json();
|
|
6634
|
-
c.value = !0, D.value = C.email,
|
|
6634
|
+
c.value = !0, D.value = C.email, g.value = w.message || "Magic link sent! Check your email.", w.message && (w.message.includes("already have an account") || w.message.includes("Welcome back") ? E.value = "Welcome Back!" : w.message.includes("Magic link sent") || w.message.includes("Check your email") ? E.value = "Magic Link Sent!" : E.value = "Success!"), l("success", {
|
|
6635
6635
|
email: C.email,
|
|
6636
6636
|
message: w.message || "Magic link sent! Check your email."
|
|
6637
6637
|
});
|
|
@@ -6647,13 +6647,13 @@ const ai = {
|
|
|
6647
6647
|
S = O.message;
|
|
6648
6648
|
A.value = S, l("error", S);
|
|
6649
6649
|
} finally {
|
|
6650
|
-
|
|
6650
|
+
$.value = !1;
|
|
6651
6651
|
}
|
|
6652
6652
|
}, p = () => {
|
|
6653
|
-
c.value = !1,
|
|
6653
|
+
c.value = !1, g.value = "", E.value = "Magic Link Sent!", D.value = "", C.email = "", A.value = "";
|
|
6654
6654
|
}, L = async (O) => {
|
|
6655
6655
|
try {
|
|
6656
|
-
await
|
|
6656
|
+
await h(O, {
|
|
6657
6657
|
redirectUrl: t.redirectUrl,
|
|
6658
6658
|
scopes: t.oauthScopes
|
|
6659
6659
|
});
|
|
@@ -6672,7 +6672,7 @@ const ai = {
|
|
|
6672
6672
|
e("div", or, [
|
|
6673
6673
|
S[4] || (S[4] = e("div", { class: "signup-success-icon" }, "📧", -1)),
|
|
6674
6674
|
e("h1", lr, R(E.value), 1),
|
|
6675
|
-
e("p", nr, R(
|
|
6675
|
+
e("p", nr, R(g.value), 1),
|
|
6676
6676
|
D.value ? (a(), o("div", ir, [
|
|
6677
6677
|
e("strong", null, R(D.value), 1)
|
|
6678
6678
|
])) : I("", !0),
|
|
@@ -6786,8 +6786,8 @@ const ai = {
|
|
|
6786
6786
|
type: "submit",
|
|
6787
6787
|
variant: "primary",
|
|
6788
6788
|
"full-width": "",
|
|
6789
|
-
disabled:
|
|
6790
|
-
loading:
|
|
6789
|
+
disabled: $.value || !C.email,
|
|
6790
|
+
loading: $.value,
|
|
6791
6791
|
"loading-text": "Sending magic link...",
|
|
6792
6792
|
class: "accui-auth-submit"
|
|
6793
6793
|
}, {
|
|
@@ -6876,11 +6876,11 @@ const ai = {
|
|
|
6876
6876
|
},
|
|
6877
6877
|
emits: ["success", "error", "invalid-token", "request-new-link", "start-registration"],
|
|
6878
6878
|
setup(s, { emit: r }) {
|
|
6879
|
-
const t = s, l = r, { getUrl: z, getSupportEmail: V } = pt(t.config), { setAuthData: y } = ft(), k =
|
|
6879
|
+
const t = s, l = r, { getUrl: z, getSupportEmail: V } = pt(t.config), { setAuthData: y } = ft(), k = M(!1), u = M(!1), h = M(!1), $ = M(""), A = M(""), c = Ye({
|
|
6880
6880
|
firstName: "",
|
|
6881
6881
|
lastName: "",
|
|
6882
6882
|
password: ""
|
|
6883
|
-
}),
|
|
6883
|
+
}), g = Ye({
|
|
6884
6884
|
firstName: "",
|
|
6885
6885
|
lastName: "",
|
|
6886
6886
|
password: ""
|
|
@@ -6891,7 +6891,7 @@ const ai = {
|
|
|
6891
6891
|
Le(
|
|
6892
6892
|
() => c.password,
|
|
6893
6893
|
(p) => {
|
|
6894
|
-
p && p.length < 8 ?
|
|
6894
|
+
p && p.length < 8 ? g.password = "Password must be at least 8 characters long" : g.password = "";
|
|
6895
6895
|
}
|
|
6896
6896
|
);
|
|
6897
6897
|
const D = U(() => t.redirectUrl || window.location.origin);
|
|
@@ -6911,16 +6911,16 @@ const ai = {
|
|
|
6911
6911
|
D.value && (window.location.href = D.value);
|
|
6912
6912
|
}, N = async () => {
|
|
6913
6913
|
if (!t.token) {
|
|
6914
|
-
|
|
6914
|
+
$.value = "Registration token is required";
|
|
6915
6915
|
return;
|
|
6916
6916
|
}
|
|
6917
|
-
if (
|
|
6918
|
-
|
|
6917
|
+
if ($.value = "", Object.keys(g).forEach((p) => {
|
|
6918
|
+
g[p] = "";
|
|
6919
6919
|
}), !E.value) {
|
|
6920
|
-
|
|
6920
|
+
$.value = "Please fill in all required fields correctly";
|
|
6921
6921
|
return;
|
|
6922
6922
|
}
|
|
6923
|
-
|
|
6923
|
+
h.value = !0;
|
|
6924
6924
|
try {
|
|
6925
6925
|
const p = {
|
|
6926
6926
|
"Content-Type": "application/json"
|
|
@@ -6945,9 +6945,9 @@ const ai = {
|
|
|
6945
6945
|
C();
|
|
6946
6946
|
}, 2e3);
|
|
6947
6947
|
} catch (p) {
|
|
6948
|
-
p instanceof Error ? p.message.includes("CONFLICT") || p.message.includes("409") ?
|
|
6948
|
+
p instanceof Error ? p.message.includes("CONFLICT") || p.message.includes("409") ? $.value = "This account already exists. Please try signing in instead." : p.message.includes("BAD_REQUEST") || p.message.includes("400") ? ($.value = "Invalid or expired registration link. Please request a new one.", u.value = !0, l("invalid-token")) : $.value = p.message : $.value = "Failed to complete registration. Please try again.", l("error", $.value);
|
|
6949
6949
|
} finally {
|
|
6950
|
-
|
|
6950
|
+
h.value = !1;
|
|
6951
6951
|
}
|
|
6952
6952
|
};
|
|
6953
6953
|
return (p, L) => (a(), o("div", Ir, [
|
|
@@ -7023,7 +7023,7 @@ const ai = {
|
|
|
7023
7023
|
label: "First Name (Optional)",
|
|
7024
7024
|
placeholder: "Enter your first name",
|
|
7025
7025
|
autocomplete: "given-name",
|
|
7026
|
-
error:
|
|
7026
|
+
error: g.firstName
|
|
7027
7027
|
}, null, 8, ["modelValue", "error"])
|
|
7028
7028
|
]),
|
|
7029
7029
|
e("div", null, [
|
|
@@ -7035,7 +7035,7 @@ const ai = {
|
|
|
7035
7035
|
label: "Last Name (Optional)",
|
|
7036
7036
|
placeholder: "Enter your last name",
|
|
7037
7037
|
autocomplete: "family-name",
|
|
7038
|
-
error:
|
|
7038
|
+
error: g.lastName
|
|
7039
7039
|
}, null, 8, ["modelValue", "error"])
|
|
7040
7040
|
]),
|
|
7041
7041
|
e("div", null, [
|
|
@@ -7049,7 +7049,7 @@ const ai = {
|
|
|
7049
7049
|
autocomplete: "new-password",
|
|
7050
7050
|
required: "",
|
|
7051
7051
|
minlength: "8",
|
|
7052
|
-
error:
|
|
7052
|
+
error: g.password
|
|
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
|
]),
|
|
@@ -7057,8 +7057,8 @@ const ai = {
|
|
|
7057
7057
|
type: "submit",
|
|
7058
7058
|
variant: "primary",
|
|
7059
7059
|
"full-width": "",
|
|
7060
|
-
disabled:
|
|
7061
|
-
loading:
|
|
7060
|
+
disabled: h.value || !E.value,
|
|
7061
|
+
loading: h.value,
|
|
7062
7062
|
"loading-text": "Creating account..."
|
|
7063
7063
|
}, {
|
|
7064
7064
|
default: x(() => [...L[20] || (L[20] = [
|
|
@@ -7067,13 +7067,13 @@ const ai = {
|
|
|
7067
7067
|
_: 1
|
|
7068
7068
|
}, 8, ["disabled", "loading"])
|
|
7069
7069
|
], 32),
|
|
7070
|
-
|
|
7070
|
+
$.value ? (a(), Ce(n(Ht), {
|
|
7071
7071
|
key: 0,
|
|
7072
7072
|
variant: "error",
|
|
7073
|
-
message:
|
|
7073
|
+
message: $.value,
|
|
7074
7074
|
class: "complete-signup-error-alert",
|
|
7075
7075
|
dismissible: "",
|
|
7076
|
-
onDismiss: L[4] || (L[4] = (O) =>
|
|
7076
|
+
onDismiss: L[4] || (L[4] = (O) => $.value = "")
|
|
7077
7077
|
}, null, 8, ["message"])) : I("", !0),
|
|
7078
7078
|
d(Et, {
|
|
7079
7079
|
config: t.config
|
|
@@ -7158,10 +7158,10 @@ const ai = {
|
|
|
7158
7158
|
set: (S) => {
|
|
7159
7159
|
S || l("close");
|
|
7160
7160
|
}
|
|
7161
|
-
}), u =
|
|
7161
|
+
}), u = M(1), h = M(""), $ = M(""), A = M(""), c = M(""), g = M(null), E = M("");
|
|
7162
7162
|
Le(() => t.show, (S) => {
|
|
7163
|
-
S && (u.value = 1,
|
|
7164
|
-
}), Le(() =>
|
|
7163
|
+
S && (u.value = 1, h.value = "", $.value = "", A.value = "", c.value = "", g.value = null, E.value = "");
|
|
7164
|
+
}), Le(() => g.value, async (S) => {
|
|
7165
7165
|
if (S?.qr_code_url)
|
|
7166
7166
|
try {
|
|
7167
7167
|
const w = `https://api.qrserver.com/v1/create-qr-code/?size=192x192&data=${encodeURIComponent(S.qr_code_url)}&bgcolor=ffffff&color=000000`;
|
|
@@ -7173,32 +7173,32 @@ const ai = {
|
|
|
7173
7173
|
const D = () => {
|
|
7174
7174
|
l("close");
|
|
7175
7175
|
}, C = async () => {
|
|
7176
|
-
if (!
|
|
7177
|
-
|
|
7176
|
+
if (!h.value.trim()) {
|
|
7177
|
+
$.value = "Device name is required";
|
|
7178
7178
|
return;
|
|
7179
7179
|
}
|
|
7180
|
-
|
|
7180
|
+
$.value = "";
|
|
7181
7181
|
try {
|
|
7182
|
-
const S = await z(
|
|
7183
|
-
|
|
7182
|
+
const S = await z(h.value.trim());
|
|
7183
|
+
g.value = S, u.value = 2;
|
|
7184
7184
|
} catch (S) {
|
|
7185
|
-
console.error("Failed to setup TOTP:", S),
|
|
7185
|
+
console.error("Failed to setup TOTP:", S), $.value = S instanceof Error ? S.message : "Failed to setup TOTP";
|
|
7186
7186
|
}
|
|
7187
7187
|
}, N = (S) => {
|
|
7188
7188
|
c.value = "", S.length === 6 && p();
|
|
7189
7189
|
}, p = async () => {
|
|
7190
|
-
if (!(!
|
|
7190
|
+
if (!(!g.value || !A.value)) {
|
|
7191
7191
|
c.value = "";
|
|
7192
7192
|
try {
|
|
7193
|
-
await V(
|
|
7193
|
+
await V(g.value.device_id, A.value), u.value = 4;
|
|
7194
7194
|
} catch (S) {
|
|
7195
7195
|
console.error("Failed to verify TOTP code:", S), c.value = S instanceof Error ? S.message : "Invalid verification code";
|
|
7196
7196
|
}
|
|
7197
7197
|
}
|
|
7198
7198
|
}, L = async () => {
|
|
7199
|
-
if (
|
|
7199
|
+
if (g.value?.backup_codes)
|
|
7200
7200
|
try {
|
|
7201
|
-
const S =
|
|
7201
|
+
const S = g.value.backup_codes.join(`
|
|
7202
7202
|
`);
|
|
7203
7203
|
await navigator.clipboard.writeText(S);
|
|
7204
7204
|
} catch (S) {
|
|
@@ -7220,11 +7220,11 @@ const ai = {
|
|
|
7220
7220
|
e("p", { class: "step-description" }, ' Give this authenticator a memorable name (e.g., "iPhone", "Work Phone") ')
|
|
7221
7221
|
], -1)),
|
|
7222
7222
|
d(n(Ze), {
|
|
7223
|
-
modelValue:
|
|
7224
|
-
"onUpdate:modelValue": w[0] || (w[0] = (q) =>
|
|
7223
|
+
modelValue: h.value,
|
|
7224
|
+
"onUpdate:modelValue": w[0] || (w[0] = (q) => h.value = q),
|
|
7225
7225
|
label: "Device Name",
|
|
7226
7226
|
placeholder: "My Authenticator",
|
|
7227
|
-
error:
|
|
7227
|
+
error: $.value,
|
|
7228
7228
|
disabled: n(y)
|
|
7229
7229
|
}, null, 8, ["modelValue", "error", "disabled"]),
|
|
7230
7230
|
e("div", Gr, [
|
|
@@ -7241,7 +7241,7 @@ const ai = {
|
|
|
7241
7241
|
d(n(ce), {
|
|
7242
7242
|
variant: "primary",
|
|
7243
7243
|
onClick: C,
|
|
7244
|
-
disabled: !
|
|
7244
|
+
disabled: !h.value.trim() || n(y),
|
|
7245
7245
|
loading: n(y)
|
|
7246
7246
|
}, {
|
|
7247
7247
|
default: x(() => [...w[7] || (w[7] = [
|
|
@@ -7266,14 +7266,14 @@ const ai = {
|
|
|
7266
7266
|
height: "200"
|
|
7267
7267
|
}, null, 8, Xr)
|
|
7268
7268
|
])) : (a(), o("div", Jr, [
|
|
7269
|
-
d(n(
|
|
7269
|
+
d(n(gt), { size: 24 })
|
|
7270
7270
|
]))
|
|
7271
7271
|
]),
|
|
7272
7272
|
e("div", e2, [
|
|
7273
7273
|
w[9] || (w[9] = e("p", { class: "manual-label" }, " Can't scan? Enter this code manually: ", -1)),
|
|
7274
|
-
e("code", t2, R(
|
|
7274
|
+
e("code", t2, R(g.value?.secret || "..."), 1)
|
|
7275
7275
|
]),
|
|
7276
|
-
|
|
7276
|
+
g.value?.backup_codes ? (a(), o("div", a2, [...w[10] || (w[10] = [
|
|
7277
7277
|
e("div", { class: "flex items-start space-x-2" }, [
|
|
7278
7278
|
e("svg", {
|
|
7279
7279
|
class: "w-5 h-5 text-yellow-600 mt-0.5 flex-shrink-0",
|
|
@@ -7395,7 +7395,7 @@ const ai = {
|
|
|
7395
7395
|
], -1)),
|
|
7396
7396
|
e("div", r2, [
|
|
7397
7397
|
e("div", u2, [
|
|
7398
|
-
(a(!0), o(Ue, null, Ke(
|
|
7398
|
+
(a(!0), o(Ue, null, Ke(g.value?.backup_codes, (q, Z) => (a(), o("div", {
|
|
7399
7399
|
key: Z,
|
|
7400
7400
|
class: "totp-setup-backup-code"
|
|
7401
7401
|
}, R(q), 1))), 128))
|
|
@@ -7451,38 +7451,38 @@ const ai = {
|
|
|
7451
7451
|
set: (b) => {
|
|
7452
7452
|
b || l("close");
|
|
7453
7453
|
}
|
|
7454
|
-
}),
|
|
7454
|
+
}), h = M(1), $ = M(""), A = M(""), c = M(""), g = M(""), E = M(null), D = M(!1), C = M(0);
|
|
7455
7455
|
let N = null;
|
|
7456
7456
|
Le(() => t.show, (b) => {
|
|
7457
|
-
b && (
|
|
7457
|
+
b && (h.value = 1, $.value = "", A.value = "", c.value = "", g.value = "", E.value = null, D.value = !1, C.value = 0, N && (clearInterval(N), N = null));
|
|
7458
7458
|
}), Le(c, () => {
|
|
7459
|
-
|
|
7459
|
+
g.value && (g.value = "");
|
|
7460
7460
|
}), Fa(() => {
|
|
7461
7461
|
N && clearInterval(N);
|
|
7462
7462
|
});
|
|
7463
7463
|
const p = () => {
|
|
7464
7464
|
l("close");
|
|
7465
7465
|
}, L = async () => {
|
|
7466
|
-
if (
|
|
7466
|
+
if (!$.value.trim()) {
|
|
7467
7467
|
A.value = "Device name is required";
|
|
7468
7468
|
return;
|
|
7469
7469
|
}
|
|
7470
7470
|
A.value = "";
|
|
7471
7471
|
try {
|
|
7472
|
-
const b = await z(
|
|
7473
|
-
E.value = b.device_id, await V(b.device_id),
|
|
7472
|
+
const b = await z($.value.trim());
|
|
7473
|
+
E.value = b.device_id, await V(b.device_id), h.value = 2, q();
|
|
7474
7474
|
} catch (b) {
|
|
7475
7475
|
console.error("Failed to setup email MFA:", b), A.value = b instanceof Error ? b.message : "Failed to setup email MFA";
|
|
7476
7476
|
}
|
|
7477
7477
|
}, O = (b) => {
|
|
7478
|
-
|
|
7478
|
+
g.value = "", b.length === 6 && S();
|
|
7479
7479
|
}, S = async () => {
|
|
7480
7480
|
if (!(!E.value || !c.value)) {
|
|
7481
|
-
|
|
7481
|
+
g.value = "";
|
|
7482
7482
|
try {
|
|
7483
|
-
await y(E.value, c.value) ?
|
|
7483
|
+
await y(E.value, c.value) ? h.value = 3 : g.value = "Invalid verification code";
|
|
7484
7484
|
} catch (b) {
|
|
7485
|
-
console.error("Failed to verify email MFA code:", b),
|
|
7485
|
+
console.error("Failed to verify email MFA code:", b), g.value = b instanceof Error ? b.message : "Invalid verification code";
|
|
7486
7486
|
}
|
|
7487
7487
|
}
|
|
7488
7488
|
}, w = async () => {
|
|
@@ -7506,14 +7506,14 @@ const ai = {
|
|
|
7506
7506
|
"card-class": "email-mfa-setup-modal"
|
|
7507
7507
|
}, {
|
|
7508
7508
|
default: x(() => [
|
|
7509
|
-
|
|
7509
|
+
h.value === 1 ? (a(), o("div", p2, [
|
|
7510
7510
|
T[7] || (T[7] = e("div", null, [
|
|
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
7514
|
d(n(Ze), {
|
|
7515
|
-
modelValue:
|
|
7516
|
-
"onUpdate:modelValue": T[0] || (T[0] = (te) =>
|
|
7515
|
+
modelValue: $.value,
|
|
7516
|
+
"onUpdate:modelValue": T[0] || (T[0] = (te) => $.value = te),
|
|
7517
7517
|
label: "Device Name",
|
|
7518
7518
|
placeholder: "Personal Email",
|
|
7519
7519
|
error: A.value,
|
|
@@ -7541,7 +7541,7 @@ const ai = {
|
|
|
7541
7541
|
}, 8, ["disabled"]),
|
|
7542
7542
|
d(n(ce), {
|
|
7543
7543
|
onClick: L,
|
|
7544
|
-
disabled:
|
|
7544
|
+
disabled: !$.value.trim() || n(k),
|
|
7545
7545
|
loading: n(k)
|
|
7546
7546
|
}, {
|
|
7547
7547
|
default: x(() => [...T[6] || (T[6] = [
|
|
@@ -7551,7 +7551,7 @@ const ai = {
|
|
|
7551
7551
|
}, 8, ["disabled", "loading"])
|
|
7552
7552
|
])
|
|
7553
7553
|
])) : I("", !0),
|
|
7554
|
-
|
|
7554
|
+
h.value === 2 ? (a(), o("div", m2, [
|
|
7555
7555
|
T[10] || (T[10] = e("div", null, [
|
|
7556
7556
|
e("h3", { class: "email-mfa-setup-step-title" }, "Test Email 2FA"),
|
|
7557
7557
|
e("p", { class: "email-mfa-setup-step-description" }, " We've sent a test verification code to your email. Enter it below to complete setup. ")
|
|
@@ -7582,7 +7582,7 @@ const ai = {
|
|
|
7582
7582
|
label: "Verification Code",
|
|
7583
7583
|
"max-length": 6,
|
|
7584
7584
|
variant: "numeric",
|
|
7585
|
-
error:
|
|
7585
|
+
error: g.value,
|
|
7586
7586
|
disabled: n(k),
|
|
7587
7587
|
onComplete: O
|
|
7588
7588
|
}, null, 8, ["modelValue", "error", "disabled"]),
|
|
@@ -7602,7 +7602,7 @@ const ai = {
|
|
|
7602
7602
|
e("div", g2, [
|
|
7603
7603
|
d(n(ce), {
|
|
7604
7604
|
color: "secondary",
|
|
7605
|
-
onClick: T[2] || (T[2] = (te) =>
|
|
7605
|
+
onClick: T[2] || (T[2] = (te) => h.value = 1),
|
|
7606
7606
|
disabled: n(k)
|
|
7607
7607
|
}, {
|
|
7608
7608
|
default: x(() => [...T[8] || (T[8] = [
|
|
@@ -7622,7 +7622,7 @@ const ai = {
|
|
|
7622
7622
|
}, 8, ["disabled", "loading"])
|
|
7623
7623
|
])
|
|
7624
7624
|
])) : I("", !0),
|
|
7625
|
-
|
|
7625
|
+
h.value === 3 ? (a(), o("div", C2, [
|
|
7626
7626
|
T[13] || (T[13] = e("div", { class: "email-mfa-setup-completion" }, [
|
|
7627
7627
|
e("div", { class: "email-mfa-setup-completion-icon" }, [
|
|
7628
7628
|
e("svg", {
|
|
@@ -7700,14 +7700,14 @@ const ai = {
|
|
|
7700
7700
|
},
|
|
7701
7701
|
emits: ["close", "success"],
|
|
7702
7702
|
setup(s, { emit: r }) {
|
|
7703
|
-
const t = s, l = r, { loading: z } = Tt(), { registerHardwareKey: V, completeHardwareKeyRegistration: y, currentSession: k } = ft(), u =
|
|
7703
|
+
const t = s, l = r, { loading: z } = Tt(), { registerHardwareKey: V, completeHardwareKeyRegistration: y, currentSession: k } = ft(), u = M(!1), h = U(() => z.value || u.value), $ = U(() => t.deviceType === "passkey" ? "Setup Passkey" : "Setup Hardware Key"), A = U({
|
|
7704
7704
|
get: () => t.show,
|
|
7705
7705
|
set: (b) => {
|
|
7706
7706
|
b || l("close");
|
|
7707
7707
|
}
|
|
7708
|
-
}), c =
|
|
7708
|
+
}), c = M(1), g = M(""), E = M(""), D = M("Please touch your hardware key when prompted"), C = M(""), N = M([]);
|
|
7709
7709
|
Le(() => t.show, (b) => {
|
|
7710
|
-
b && (c.value = 1,
|
|
7710
|
+
b && (c.value = 1, g.value = "", E.value = "", D.value = "Please touch your hardware key when prompted", C.value = "", N.value = []);
|
|
7711
7711
|
});
|
|
7712
7712
|
const p = () => {
|
|
7713
7713
|
l("close");
|
|
@@ -7793,7 +7793,7 @@ const ai = {
|
|
|
7793
7793
|
throw new Error("Unable to process WebAuthn challenge data");
|
|
7794
7794
|
}
|
|
7795
7795
|
}, S = async () => {
|
|
7796
|
-
if (!
|
|
7796
|
+
if (!g.value.trim()) {
|
|
7797
7797
|
E.value = "Device name is required";
|
|
7798
7798
|
return;
|
|
7799
7799
|
}
|
|
@@ -7809,7 +7809,7 @@ const ai = {
|
|
|
7809
7809
|
}
|
|
7810
7810
|
if (!k.value?.accessToken)
|
|
7811
7811
|
throw new Error("Not authenticated. Please sign in again.");
|
|
7812
|
-
const { device_id: b, challenge: T } = await V(
|
|
7812
|
+
const { device_id: b, challenge: T } = await V(g.value.trim(), k.value.accessToken);
|
|
7813
7813
|
if (!T || typeof T != "object")
|
|
7814
7814
|
throw new Error("Invalid challenge received from server");
|
|
7815
7815
|
const te = O(T, t.deviceType);
|
|
@@ -7865,7 +7865,7 @@ const ai = {
|
|
|
7865
7865
|
return (b, T) => (a(), Ce(ut, {
|
|
7866
7866
|
modelValue: A.value,
|
|
7867
7867
|
"onUpdate:modelValue": T[3] || (T[3] = (te) => A.value = te),
|
|
7868
|
-
title:
|
|
7868
|
+
title: $.value,
|
|
7869
7869
|
"card-class": "hardware-key-setup-modal"
|
|
7870
7870
|
}, {
|
|
7871
7871
|
default: x(() => [
|
|
@@ -7875,18 +7875,18 @@ const ai = {
|
|
|
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
7877
|
d(n(Ze), {
|
|
7878
|
-
modelValue:
|
|
7879
|
-
"onUpdate:modelValue": T[0] || (T[0] = (te) =>
|
|
7878
|
+
modelValue: g.value,
|
|
7879
|
+
"onUpdate:modelValue": T[0] || (T[0] = (te) => g.value = te),
|
|
7880
7880
|
label: "Device Name",
|
|
7881
7881
|
placeholder: "My Hardware Key",
|
|
7882
7882
|
error: E.value,
|
|
7883
|
-
disabled:
|
|
7883
|
+
disabled: h.value
|
|
7884
7884
|
}, null, 8, ["modelValue", "error", "disabled"]),
|
|
7885
7885
|
e("div", b2, [
|
|
7886
7886
|
d(n(ce), {
|
|
7887
7887
|
variant: "secondary",
|
|
7888
7888
|
onClick: p,
|
|
7889
|
-
disabled:
|
|
7889
|
+
disabled: h.value
|
|
7890
7890
|
}, {
|
|
7891
7891
|
default: x(() => [...T[4] || (T[4] = [
|
|
7892
7892
|
Q(" Cancel ", -1)
|
|
@@ -7896,8 +7896,8 @@ const ai = {
|
|
|
7896
7896
|
d(n(ce), {
|
|
7897
7897
|
variant: "primary",
|
|
7898
7898
|
onClick: S,
|
|
7899
|
-
disabled: !
|
|
7900
|
-
loading:
|
|
7899
|
+
disabled: !g.value.trim() || h.value,
|
|
7900
|
+
loading: h.value
|
|
7901
7901
|
}, {
|
|
7902
7902
|
default: x(() => [...T[5] || (T[5] = [
|
|
7903
7903
|
Q(" Continue ", -1)
|
|
@@ -7965,7 +7965,7 @@ const ai = {
|
|
|
7965
7965
|
d(n(ce), {
|
|
7966
7966
|
variant: "secondary",
|
|
7967
7967
|
onClick: T[1] || (T[1] = (te) => c.value = 1),
|
|
7968
|
-
disabled:
|
|
7968
|
+
disabled: h.value
|
|
7969
7969
|
}, {
|
|
7970
7970
|
default: x(() => [...T[15] || (T[15] = [
|
|
7971
7971
|
Q(" Back ", -1)
|
|
@@ -7975,8 +7975,8 @@ const ai = {
|
|
|
7975
7975
|
d(n(ce), {
|
|
7976
7976
|
variant: "primary",
|
|
7977
7977
|
onClick: w,
|
|
7978
|
-
disabled:
|
|
7979
|
-
loading:
|
|
7978
|
+
disabled: h.value,
|
|
7979
|
+
loading: h.value
|
|
7980
7980
|
}, {
|
|
7981
7981
|
default: x(() => [...T[16] || (T[16] = [
|
|
7982
7982
|
Q(" Register Key ", -1)
|
|
@@ -7988,7 +7988,7 @@ const ai = {
|
|
|
7988
7988
|
c.value === 3 ? (a(), o("div", _2, [
|
|
7989
7989
|
e("div", T2, [
|
|
7990
7990
|
e("div", z2, [
|
|
7991
|
-
d(n(
|
|
7991
|
+
d(n(gt), {
|
|
7992
7992
|
size: 24,
|
|
7993
7993
|
class: "hardware-key-setup-loader"
|
|
7994
7994
|
})
|
|
@@ -8160,25 +8160,25 @@ const ai = {
|
|
|
8160
8160
|
set: (D) => {
|
|
8161
8161
|
D || l("close");
|
|
8162
8162
|
}
|
|
8163
|
-
}), u =
|
|
8163
|
+
}), u = M([]), h = M(!1);
|
|
8164
8164
|
Le(() => t.show, async (D) => {
|
|
8165
|
-
D && t.device && (
|
|
8165
|
+
D && t.device && (h.value = !1, u.value = []);
|
|
8166
8166
|
}), We(async () => {
|
|
8167
8167
|
t.show && t.device && (u.value = []);
|
|
8168
8168
|
});
|
|
8169
|
-
const
|
|
8169
|
+
const $ = () => {
|
|
8170
8170
|
l("close");
|
|
8171
8171
|
}, A = () => {
|
|
8172
|
-
|
|
8172
|
+
h.value = !0;
|
|
8173
8173
|
}, c = async () => {
|
|
8174
8174
|
if (t.device)
|
|
8175
8175
|
try {
|
|
8176
8176
|
const D = await z(t.device.id);
|
|
8177
|
-
u.value = D.backup_codes,
|
|
8177
|
+
u.value = D.backup_codes, h.value = !1;
|
|
8178
8178
|
} catch (D) {
|
|
8179
8179
|
console.error("Failed to regenerate backup codes:", D);
|
|
8180
8180
|
}
|
|
8181
|
-
},
|
|
8181
|
+
}, g = async () => {
|
|
8182
8182
|
if (u.value.length !== 0)
|
|
8183
8183
|
try {
|
|
8184
8184
|
const D = u.value.join(`
|
|
@@ -8218,7 +8218,7 @@ const ai = {
|
|
|
8218
8218
|
}, {
|
|
8219
8219
|
default: x(() => [
|
|
8220
8220
|
n(V) ? (a(), o("div", F2, [
|
|
8221
|
-
d(n(
|
|
8221
|
+
d(n(gt), { size: 24 }),
|
|
8222
8222
|
C[2] || (C[2] = e("span", { class: "backup-codes-loading-text" }, "Loading backup codes...", -1))
|
|
8223
8223
|
])) : (a(), o("div", q2, [
|
|
8224
8224
|
s.device ? (a(), o("div", Z2, [
|
|
@@ -8268,7 +8268,7 @@ const ai = {
|
|
|
8268
8268
|
d(n(ce), {
|
|
8269
8269
|
variant: "secondary",
|
|
8270
8270
|
size: "sm",
|
|
8271
|
-
onClick:
|
|
8271
|
+
onClick: g
|
|
8272
8272
|
}, {
|
|
8273
8273
|
default: x(() => [...C[4] || (C[4] = [
|
|
8274
8274
|
Q(" 📋 Copy All Codes ", -1)
|
|
@@ -8302,7 +8302,7 @@ const ai = {
|
|
|
8302
8302
|
}, 8, ["disabled", "loading"]),
|
|
8303
8303
|
d(n(ce), {
|
|
8304
8304
|
variant: "primary",
|
|
8305
|
-
onClick:
|
|
8305
|
+
onClick: $
|
|
8306
8306
|
}, {
|
|
8307
8307
|
default: x(() => [...C[8] || (C[8] = [
|
|
8308
8308
|
Q(" Done ", -1)
|
|
@@ -8311,7 +8311,7 @@ const ai = {
|
|
|
8311
8311
|
})
|
|
8312
8312
|
])
|
|
8313
8313
|
]),
|
|
8314
|
-
|
|
8314
|
+
h.value ? (a(), o("div", a3, [
|
|
8315
8315
|
e("div", s3, [
|
|
8316
8316
|
C[13] || (C[13] = e("svg", {
|
|
8317
8317
|
class: "backup-codes-regenerate-icon",
|
|
@@ -8343,7 +8343,7 @@ const ai = {
|
|
|
8343
8343
|
d(n(ce), {
|
|
8344
8344
|
variant: "secondary",
|
|
8345
8345
|
size: "sm",
|
|
8346
|
-
onClick: C[0] || (C[0] = (N) =>
|
|
8346
|
+
onClick: C[0] || (C[0] = (N) => h.value = !1)
|
|
8347
8347
|
}, {
|
|
8348
8348
|
default: x(() => [...C[10] || (C[10] = [
|
|
8349
8349
|
Q(" Cancel ", -1)
|
|
@@ -8372,7 +8372,7 @@ const ai = {
|
|
|
8372
8372
|
},
|
|
8373
8373
|
emits: ["confirm", "cancel"],
|
|
8374
8374
|
setup(s, { emit: r }) {
|
|
8375
|
-
const t = s, l = r, z =
|
|
8375
|
+
const t = s, l = r, z = M(!1), V = U({
|
|
8376
8376
|
get: () => t.show,
|
|
8377
8377
|
set: (u) => {
|
|
8378
8378
|
u || l("cancel");
|
|
@@ -8382,10 +8382,10 @@ const ai = {
|
|
|
8382
8382
|
}, k = () => {
|
|
8383
8383
|
l("cancel");
|
|
8384
8384
|
};
|
|
8385
|
-
return (u,
|
|
8385
|
+
return (u, h) => (a(), o("div", i3, [
|
|
8386
8386
|
d(ut, {
|
|
8387
8387
|
modelValue: V.value,
|
|
8388
|
-
"onUpdate:modelValue":
|
|
8388
|
+
"onUpdate:modelValue": h[0] || (h[0] = ($) => V.value = $),
|
|
8389
8389
|
"card-class": "confirm-modal"
|
|
8390
8390
|
}, {
|
|
8391
8391
|
header: x(() => [
|
|
@@ -8464,8 +8464,8 @@ const ai = {
|
|
|
8464
8464
|
activeMfaDevices: y,
|
|
8465
8465
|
fetchMfaDevices: k,
|
|
8466
8466
|
disableMfaDevice: u,
|
|
8467
|
-
sendEmailMfaCode:
|
|
8468
|
-
} = Tt(),
|
|
8467
|
+
sendEmailMfaCode: h
|
|
8468
|
+
} = Tt(), $ = {
|
|
8469
8469
|
props: ["size"],
|
|
8470
8470
|
render() {
|
|
8471
8471
|
return oe("svg", { width: this.size, height: this.size, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24" }, [
|
|
@@ -8489,7 +8489,7 @@ const ai = {
|
|
|
8489
8489
|
oe("circle", { cx: "16.5", cy: "7.5", r: ".5", fill: "currentColor" })
|
|
8490
8490
|
]);
|
|
8491
8491
|
}
|
|
8492
|
-
},
|
|
8492
|
+
}, g = {
|
|
8493
8493
|
props: ["size"],
|
|
8494
8494
|
render() {
|
|
8495
8495
|
return oe("svg", { width: this.size, height: this.size, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24" }, [
|
|
@@ -8520,7 +8520,7 @@ const ai = {
|
|
|
8520
8520
|
oe("path", { d: "m12 17 .01 0" })
|
|
8521
8521
|
]);
|
|
8522
8522
|
}
|
|
8523
|
-
}, C =
|
|
8523
|
+
}, C = M("add"), N = Ye({}), p = Ye({}), L = M(!1), O = M(!1), S = M(!1), w = M(!1), q = U({
|
|
8524
8524
|
get: () => t.modelValue || !1,
|
|
8525
8525
|
set: (xe) => l("update:modelValue", xe)
|
|
8526
8526
|
}), Z = U(() => {
|
|
@@ -8536,7 +8536,7 @@ const ai = {
|
|
|
8536
8536
|
});
|
|
8537
8537
|
const b = async (xe) => {
|
|
8538
8538
|
try {
|
|
8539
|
-
N[xe.id] = !0, await
|
|
8539
|
+
N[xe.id] = !0, await h(xe.id);
|
|
8540
8540
|
} catch (ne) {
|
|
8541
8541
|
console.error("Failed to send email MFA code:", ne);
|
|
8542
8542
|
} finally {
|
|
@@ -8578,7 +8578,7 @@ const ai = {
|
|
|
8578
8578
|
default: x(() => [
|
|
8579
8579
|
e("div", p3, [
|
|
8580
8580
|
n(V) ? (a(), o("div", f3, [
|
|
8581
|
-
d(n(
|
|
8581
|
+
d(n(gt), { size: 32 }),
|
|
8582
8582
|
ne[11] || (ne[11] = e("span", { class: "mfa-loading-text" }, "Loading MFA settings...", -1))
|
|
8583
8583
|
])) : (a(), o("div", m3, [
|
|
8584
8584
|
e("div", h3, [
|
|
@@ -8612,7 +8612,7 @@ const ai = {
|
|
|
8612
8612
|
e("div", M3, [
|
|
8613
8613
|
e("div", $3, [
|
|
8614
8614
|
e("div", S3, [
|
|
8615
|
-
d(
|
|
8615
|
+
d($, { size: 24 })
|
|
8616
8616
|
]),
|
|
8617
8617
|
ne[14] || (ne[14] = e("div", { class: "mfa-device-option-info" }, [
|
|
8618
8618
|
e("h4", { class: "mfa-device-option-title" }, "Authenticator App"),
|
|
@@ -8675,7 +8675,7 @@ const ai = {
|
|
|
8675
8675
|
e("div", L3, [
|
|
8676
8676
|
e("div", E3, [
|
|
8677
8677
|
e("div", H3, [
|
|
8678
|
-
d(
|
|
8678
|
+
d(g, { size: 24 })
|
|
8679
8679
|
]),
|
|
8680
8680
|
ne[20] || (ne[20] = e("div", { class: "mfa-device-option-info" }, [
|
|
8681
8681
|
e("h4", { class: "mfa-device-option-title" }, "Passkey"),
|
|
@@ -8719,7 +8719,7 @@ const ai = {
|
|
|
8719
8719
|
e("div", P3, [
|
|
8720
8720
|
e("div", j3, [
|
|
8721
8721
|
e("div", O3, [
|
|
8722
|
-
K.device_type === "totp" ? (a(), Ce(
|
|
8722
|
+
K.device_type === "totp" ? (a(), Ce($, {
|
|
8723
8723
|
key: 0,
|
|
8724
8724
|
size: 20
|
|
8725
8725
|
})) : K.device_type === "email" ? (a(), Ce(A, {
|
|
@@ -8728,7 +8728,7 @@ const ai = {
|
|
|
8728
8728
|
})) : K.device_type === "hardware" ? (a(), Ce(c, {
|
|
8729
8729
|
key: 2,
|
|
8730
8730
|
size: 20
|
|
8731
|
-
})) : K.device_type === "passkey" ? (a(), Ce(
|
|
8731
|
+
})) : K.device_type === "passkey" ? (a(), Ce(g, {
|
|
8732
8732
|
key: 3,
|
|
8733
8733
|
size: 20
|
|
8734
8734
|
})) : I("", !0)
|
|
@@ -8860,20 +8860,20 @@ const ai = {
|
|
|
8860
8860
|
},
|
|
8861
8861
|
emits: ["close", "settings-updated"],
|
|
8862
8862
|
setup(s, { emit: r }) {
|
|
8863
|
-
const t = r, { currentUser: l, updateUserSettings: z } = ft(), V =
|
|
8863
|
+
const t = r, { currentUser: l, updateUserSettings: z } = ft(), V = M(!1), y = M(null), k = Ye({
|
|
8864
8864
|
levelUpSounds: l.value?.settings?.levelUpSounds ?? !0,
|
|
8865
8865
|
milestoneSounds: l.value?.settings?.milestoneSounds ?? !0
|
|
8866
8866
|
});
|
|
8867
8867
|
Le(() => l.value?.settings, (c) => {
|
|
8868
8868
|
c && (k.levelUpSounds = c.levelUpSounds ?? !0, k.milestoneSounds = c.milestoneSounds ?? !0);
|
|
8869
8869
|
}, { deep: !0 });
|
|
8870
|
-
const u = (c,
|
|
8871
|
-
k[c] =
|
|
8872
|
-
},
|
|
8870
|
+
const u = (c, g) => {
|
|
8871
|
+
k[c] = g;
|
|
8872
|
+
}, h = () => {
|
|
8873
8873
|
y.value || (y.value = "regular", Sa.playLevelUp(5), setTimeout(() => {
|
|
8874
8874
|
y.value === "regular" && (y.value = null);
|
|
8875
8875
|
}, 800));
|
|
8876
|
-
},
|
|
8876
|
+
}, $ = () => {
|
|
8877
8877
|
y.value || (y.value = "milestone", Sa.playLevelUp(50), setTimeout(() => {
|
|
8878
8878
|
y.value === "milestone" && (y.value = null);
|
|
8879
8879
|
}, 2500));
|
|
@@ -8885,14 +8885,14 @@ const ai = {
|
|
|
8885
8885
|
...l.value?.settings,
|
|
8886
8886
|
...k
|
|
8887
8887
|
}), t("settings-updated", { ...k });
|
|
8888
|
-
} catch (
|
|
8889
|
-
console.warn("Failed to save settings:",
|
|
8888
|
+
} catch (g) {
|
|
8889
|
+
console.warn("Failed to save settings:", g);
|
|
8890
8890
|
} finally {
|
|
8891
8891
|
V.value = !1, c();
|
|
8892
8892
|
}
|
|
8893
8893
|
}
|
|
8894
8894
|
};
|
|
8895
|
-
return (c,
|
|
8895
|
+
return (c, g) => (a(), o("div", Q3, [
|
|
8896
8896
|
d(ut, {
|
|
8897
8897
|
onClose: c.onClose,
|
|
8898
8898
|
title: "Account Settings",
|
|
@@ -8904,7 +8904,7 @@ const ai = {
|
|
|
8904
8904
|
variant: "secondary",
|
|
8905
8905
|
onClick: E
|
|
8906
8906
|
}, {
|
|
8907
|
-
default: x(() => [...
|
|
8907
|
+
default: x(() => [...g[11] || (g[11] = [
|
|
8908
8908
|
Q(" Close ", -1)
|
|
8909
8909
|
])]),
|
|
8910
8910
|
_: 1
|
|
@@ -8924,10 +8924,10 @@ const ai = {
|
|
|
8924
8924
|
default: x(() => [
|
|
8925
8925
|
e("div", X3, [
|
|
8926
8926
|
e("div", J3, [
|
|
8927
|
-
|
|
8927
|
+
g[10] || (g[10] = e("h3", { class: "settings-section-title" }, "Audio Preferences", -1)),
|
|
8928
8928
|
e("div", e4, [
|
|
8929
8929
|
e("div", t4, [
|
|
8930
|
-
|
|
8930
|
+
g[6] || (g[6] = e("div", { class: "settings-option-info" }, [
|
|
8931
8931
|
e("label", {
|
|
8932
8932
|
for: "level-up-sounds",
|
|
8933
8933
|
class: "settings-option-label"
|
|
@@ -8938,15 +8938,15 @@ const ai = {
|
|
|
8938
8938
|
d(lt, {
|
|
8939
8939
|
variant: "outline",
|
|
8940
8940
|
size: "sm",
|
|
8941
|
-
onClick:
|
|
8941
|
+
onClick: h,
|
|
8942
8942
|
disabled: y.value === "regular",
|
|
8943
8943
|
"aria-label": y.value === "regular" ? "Stop preview" : "Play preview",
|
|
8944
8944
|
class: "preview-icon-button"
|
|
8945
8945
|
}, {
|
|
8946
8946
|
default: x(() => [
|
|
8947
|
-
y.value !== "regular" ? (a(), o("svg", s4, [...
|
|
8947
|
+
y.value !== "regular" ? (a(), o("svg", s4, [...g[4] || (g[4] = [
|
|
8948
8948
|
e("path", { d: "M8 5v14l11-7z" }, null, -1)
|
|
8949
|
-
])])) : (a(), o("svg", o4, [...
|
|
8949
|
+
])])) : (a(), o("svg", o4, [...g[5] || (g[5] = [
|
|
8950
8950
|
e("rect", {
|
|
8951
8951
|
x: "6",
|
|
8952
8952
|
y: "6",
|
|
@@ -8961,8 +8961,8 @@ const ai = {
|
|
|
8961
8961
|
id: "level-up-sounds",
|
|
8962
8962
|
modelValue: k.levelUpSounds,
|
|
8963
8963
|
"onUpdate:modelValue": [
|
|
8964
|
-
|
|
8965
|
-
|
|
8964
|
+
g[0] || (g[0] = (E) => k.levelUpSounds = E),
|
|
8965
|
+
g[1] || (g[1] = (E) => u("levelUpSounds", E))
|
|
8966
8966
|
]
|
|
8967
8967
|
}, null, 8, ["modelValue"])
|
|
8968
8968
|
])
|
|
@@ -8970,7 +8970,7 @@ const ai = {
|
|
|
8970
8970
|
]),
|
|
8971
8971
|
e("div", l4, [
|
|
8972
8972
|
e("div", n4, [
|
|
8973
|
-
|
|
8973
|
+
g[9] || (g[9] = e("div", { class: "settings-option-info" }, [
|
|
8974
8974
|
e("label", {
|
|
8975
8975
|
for: "milestone-sounds",
|
|
8976
8976
|
class: "settings-option-label"
|
|
@@ -8981,15 +8981,15 @@ const ai = {
|
|
|
8981
8981
|
d(lt, {
|
|
8982
8982
|
variant: "outline",
|
|
8983
8983
|
size: "sm",
|
|
8984
|
-
onClick:
|
|
8984
|
+
onClick: $,
|
|
8985
8985
|
disabled: y.value === "milestone",
|
|
8986
8986
|
"aria-label": y.value === "milestone" ? "Stop preview" : "Play preview",
|
|
8987
8987
|
class: "preview-icon-button"
|
|
8988
8988
|
}, {
|
|
8989
8989
|
default: x(() => [
|
|
8990
|
-
y.value !== "milestone" ? (a(), o("svg", r4, [...
|
|
8990
|
+
y.value !== "milestone" ? (a(), o("svg", r4, [...g[7] || (g[7] = [
|
|
8991
8991
|
e("path", { d: "M8 5v14l11-7z" }, null, -1)
|
|
8992
|
-
])])) : (a(), o("svg", u4, [...
|
|
8992
|
+
])])) : (a(), o("svg", u4, [...g[8] || (g[8] = [
|
|
8993
8993
|
e("rect", {
|
|
8994
8994
|
x: "6",
|
|
8995
8995
|
y: "6",
|
|
@@ -9004,8 +9004,8 @@ const ai = {
|
|
|
9004
9004
|
id: "milestone-sounds",
|
|
9005
9005
|
modelValue: k.milestoneSounds,
|
|
9006
9006
|
"onUpdate:modelValue": [
|
|
9007
|
-
|
|
9008
|
-
|
|
9007
|
+
g[2] || (g[2] = (E) => k.milestoneSounds = E),
|
|
9008
|
+
g[3] || (g[3] = (E) => u("milestoneSounds", E))
|
|
9009
9009
|
]
|
|
9010
9010
|
}, null, 8, ["modelValue"])
|
|
9011
9011
|
])
|
|
@@ -9074,7 +9074,7 @@ const ai = {
|
|
|
9074
9074
|
oe("line", { x1: "12", y1: "17", x2: "12", y2: "21" })
|
|
9075
9075
|
]);
|
|
9076
9076
|
}
|
|
9077
|
-
},
|
|
9077
|
+
}, h = {
|
|
9078
9078
|
props: ["size"],
|
|
9079
9079
|
render() {
|
|
9080
9080
|
return oe("svg", { width: this.size, height: this.size, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24" }, [
|
|
@@ -9083,7 +9083,7 @@ const ai = {
|
|
|
9083
9083
|
oe("path", { d: "M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z" })
|
|
9084
9084
|
]);
|
|
9085
9085
|
}
|
|
9086
|
-
},
|
|
9086
|
+
}, $ = {
|
|
9087
9087
|
props: ["size"],
|
|
9088
9088
|
render() {
|
|
9089
9089
|
return oe("svg", { width: this.size, height: this.size, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24" }, [
|
|
@@ -9101,7 +9101,7 @@ const ai = {
|
|
|
9101
9101
|
oe("line", { x1: "3", y1: "10", x2: "21", y2: "10" })
|
|
9102
9102
|
]);
|
|
9103
9103
|
}
|
|
9104
|
-
}, c =
|
|
9104
|
+
}, c = M([]), g = M(null), E = M(!1), D = M(null), C = Ye({}), N = M(!1), p = U({
|
|
9105
9105
|
get: () => t.modelValue || !1,
|
|
9106
9106
|
set: (T) => l("update:modelValue", T)
|
|
9107
9107
|
});
|
|
@@ -9116,13 +9116,13 @@ const ai = {
|
|
|
9116
9116
|
const T = await z();
|
|
9117
9117
|
if (c.value = T || [], c.value.length > 0) {
|
|
9118
9118
|
const te = c.value.filter((ye) => ye.is_current || ye.last_activity_at), ue = [...new Set(c.value.map((ye) => q(ye)).filter(Boolean))];
|
|
9119
|
-
|
|
9119
|
+
g.value = {
|
|
9120
9120
|
total_sessions: c.value.length,
|
|
9121
9121
|
active_sessions: te.length,
|
|
9122
9122
|
unique_locations: ue
|
|
9123
9123
|
};
|
|
9124
9124
|
} else
|
|
9125
|
-
|
|
9125
|
+
g.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 {
|
|
@@ -9173,7 +9173,7 @@ const ai = {
|
|
|
9173
9173
|
default: x(() => [
|
|
9174
9174
|
e("div", p4, [
|
|
9175
9175
|
E.value ? (a(), o("div", f4, [
|
|
9176
|
-
d(n(
|
|
9176
|
+
d(n(gt), { size: 40 }),
|
|
9177
9177
|
te[1] || (te[1] = e("p", { class: "loading-text" }, "Loading sessions...", -1))
|
|
9178
9178
|
])) : c.value.length === 0 ? (a(), o("div", m4, [...te[2] || (te[2] = [
|
|
9179
9179
|
e("div", { class: "empty-icon" }, [
|
|
@@ -9209,18 +9209,18 @@ const ai = {
|
|
|
9209
9209
|
e("h3", { class: "empty-title" }, "No Active Sessions", -1),
|
|
9210
9210
|
e("p", { class: "empty-description" }, "You don't have any active sessions at the moment.", -1)
|
|
9211
9211
|
])])) : (a(), o("div", h4, [
|
|
9212
|
-
|
|
9212
|
+
g.value ? (a(), o("div", g4, [
|
|
9213
9213
|
e("div", C4, [
|
|
9214
9214
|
te[3] || (te[3] = e("span", { class: "stat-label" }, "Total Sessions", -1)),
|
|
9215
|
-
e("span", y4, R(
|
|
9215
|
+
e("span", y4, R(g.value.total_sessions), 1)
|
|
9216
9216
|
]),
|
|
9217
9217
|
e("div", k4, [
|
|
9218
9218
|
te[4] || (te[4] = e("span", { class: "stat-label" }, "Active Devices", -1)),
|
|
9219
|
-
e("span", w4, R(
|
|
9219
|
+
e("span", w4, R(g.value.active_sessions), 1)
|
|
9220
9220
|
]),
|
|
9221
|
-
|
|
9221
|
+
g.value.unique_locations && g.value.unique_locations.length > 0 ? (a(), o("div", b4, [
|
|
9222
9222
|
te[5] || (te[5] = e("span", { class: "stat-label" }, "Locations", -1)),
|
|
9223
|
-
e("span", x4, R(
|
|
9223
|
+
e("span", x4, R(g.value.unique_locations.length), 1)
|
|
9224
9224
|
])) : I("", !0)
|
|
9225
9225
|
])) : I("", !0),
|
|
9226
9226
|
e("div", M4, [
|
|
@@ -9262,13 +9262,13 @@ const ai = {
|
|
|
9262
9262
|
]),
|
|
9263
9263
|
e("div", H4, [
|
|
9264
9264
|
e("span", U4, [
|
|
9265
|
-
d(
|
|
9265
|
+
d(h, { size: 14 })
|
|
9266
9266
|
]),
|
|
9267
9267
|
e("span", D4, R(ue.ip_address), 1)
|
|
9268
9268
|
]),
|
|
9269
9269
|
e("div", N4, [
|
|
9270
9270
|
e("span", B4, [
|
|
9271
|
-
d(
|
|
9271
|
+
d($, { size: 14 })
|
|
9272
9272
|
]),
|
|
9273
9273
|
e("span", P4, " Last active " + R(Z(ue.last_activity_at || ue.created_at)), 1)
|
|
9274
9274
|
]),
|
|
@@ -9288,7 +9288,7 @@ const ai = {
|
|
|
9288
9288
|
disabled: N.value
|
|
9289
9289
|
}, {
|
|
9290
9290
|
default: x(() => [
|
|
9291
|
-
N.value ? (a(), Ce(n(
|
|
9291
|
+
N.value ? (a(), Ce(n(gt), {
|
|
9292
9292
|
key: 0,
|
|
9293
9293
|
size: 16
|
|
9294
9294
|
})) : (a(), o("span", q4, "End All Other Sessions"))
|
|
@@ -9391,7 +9391,7 @@ const ai = {
|
|
|
9391
9391
|
oe("circle", { cx: "16.5", cy: "7.5", r: ".5", fill: "currentColor" })
|
|
9392
9392
|
]);
|
|
9393
9393
|
}
|
|
9394
|
-
}, V = s, y = r, { getSupportEmail: k, getUrl: u } = pt(V.config), { fetchProfile:
|
|
9394
|
+
}, V = s, y = r, { getSupportEmail: k, getUrl: u } = pt(V.config), { fetchProfile: h, updateProfile: $, changeEmail: A, changeUsername: c, getUsernameCooldown: g, checkUsernameAvailability: E, getUserSessions: D, currentUser: C, currentSession: N, isAuthenticated: p, refreshToken: L, signOut: O } = ft(), { activeMfaDevices: S, fetchMfaDevices: w } = Tt(), q = M(null), Z = M(!1), b = U(() => C.value || V.user || q.value), T = M(!1), te = M(!1), ue = M(!1), ye = M(!1), Me = M(!1), Ae = M(!1), Se = M(!1), xe = M(!1), ne = M(!1), j = M(!1), K = M(!1), ie = M(null), ae = M(""), W = M(""), le = M([]), _e = M(!1), Te = Ye({
|
|
9395
9395
|
canChange: !0,
|
|
9396
9396
|
cooldownEnd: null,
|
|
9397
9397
|
daysRemaining: 0
|
|
@@ -9399,7 +9399,7 @@ const ai = {
|
|
|
9399
9399
|
available: !1,
|
|
9400
9400
|
message: "",
|
|
9401
9401
|
checking: !1
|
|
9402
|
-
}), $e =
|
|
9402
|
+
}), $e = M(), re = Ye({
|
|
9403
9403
|
firstName: "",
|
|
9404
9404
|
lastName: "",
|
|
9405
9405
|
email: ""
|
|
@@ -9454,7 +9454,7 @@ const ai = {
|
|
|
9454
9454
|
return J.forEach((we) => {
|
|
9455
9455
|
we.device_type in P && P[we.device_type]++;
|
|
9456
9456
|
}), P;
|
|
9457
|
-
}),
|
|
9457
|
+
}), Ct = U(() => {
|
|
9458
9458
|
const J = [], P = Fe.value;
|
|
9459
9459
|
if (P.totp > 0 && J.push({
|
|
9460
9460
|
type: "totp",
|
|
@@ -9503,11 +9503,11 @@ const ai = {
|
|
|
9503
9503
|
const J = Dt.value * 5 / 360;
|
|
9504
9504
|
return Dt.value - aa.value - J;
|
|
9505
9505
|
});
|
|
9506
|
-
const sa = (J, P) => !J && !P ? "U" : `${J?.[0] || ""}${P?.[0] || ""}`.toUpperCase(),
|
|
9506
|
+
const sa = (J, P) => !J && !P ? "U" : `${J?.[0] || ""}${P?.[0] || ""}`.toUpperCase(), yt = async () => {
|
|
9507
9507
|
if (!(!V.autoFetch || V.user || !p.value)) {
|
|
9508
9508
|
Z.value = !0;
|
|
9509
9509
|
try {
|
|
9510
|
-
await
|
|
9510
|
+
await h(), p.value && await w();
|
|
9511
9511
|
} catch (J) {
|
|
9512
9512
|
console.error("Failed to load profile:", J);
|
|
9513
9513
|
const P = J instanceof Error ? J.message : "Failed to load profile";
|
|
@@ -9540,7 +9540,7 @@ const ai = {
|
|
|
9540
9540
|
nt();
|
|
9541
9541
|
}, 100);
|
|
9542
9542
|
}), We(() => {
|
|
9543
|
-
|
|
9543
|
+
yt(), nt();
|
|
9544
9544
|
});
|
|
9545
9545
|
const it = () => {
|
|
9546
9546
|
ae.value = "", W.value = "", Object.keys(he).forEach((J) => {
|
|
@@ -9549,7 +9549,7 @@ const ai = {
|
|
|
9549
9549
|
}, zt = async () => {
|
|
9550
9550
|
it(), T.value = !0;
|
|
9551
9551
|
try {
|
|
9552
|
-
const J = await
|
|
9552
|
+
const J = await $({
|
|
9553
9553
|
firstName: re.firstName,
|
|
9554
9554
|
lastName: re.lastName
|
|
9555
9555
|
});
|
|
@@ -9592,7 +9592,7 @@ const ai = {
|
|
|
9592
9592
|
else {
|
|
9593
9593
|
xe.value = !0;
|
|
9594
9594
|
try {
|
|
9595
|
-
const J = await
|
|
9595
|
+
const J = await g();
|
|
9596
9596
|
Te.canChange = J.can_change, Te.cooldownEnd = J.cooldown_end ? new Date(J.cooldown_end) : null, Te.daysRemaining = J.days_remaining || 0, Te.canChange ? (Se.value = !0, G.username = b.value?.username || "") : W.value = `You can change your username again in ${Te.daysRemaining} days`;
|
|
9597
9597
|
} catch (J) {
|
|
9598
9598
|
console.error("Failed to check username cooldown:", J), W.value = "Failed to check username cooldown", Se.value = !0;
|
|
@@ -9683,7 +9683,7 @@ const ai = {
|
|
|
9683
9683
|
const bt = await ct.json();
|
|
9684
9684
|
C.value && (C.value.avatar = bt.avatar_url, typeof window < "u" && localStorage.setItem("strands_auth_user", JSON.stringify(C.value))), q.value && (q.value.avatar = bt.avatar_url);
|
|
9685
9685
|
try {
|
|
9686
|
-
await
|
|
9686
|
+
await h();
|
|
9687
9687
|
} catch {
|
|
9688
9688
|
}
|
|
9689
9689
|
ae.value = "Avatar updated successfully", b.value && y("profile-updated", b.value);
|
|
@@ -9700,7 +9700,7 @@ const ai = {
|
|
|
9700
9700
|
const Pt = await wt.json();
|
|
9701
9701
|
C.value && (C.value.avatar = Pt.avatar_url, typeof window < "u" && localStorage.setItem("strands_auth_user", JSON.stringify(C.value))), q.value && (q.value.avatar = Pt.avatar_url);
|
|
9702
9702
|
try {
|
|
9703
|
-
await
|
|
9703
|
+
await h();
|
|
9704
9704
|
} catch {
|
|
9705
9705
|
}
|
|
9706
9706
|
ae.value = "Avatar updated successfully", b.value && y("profile-updated", b.value);
|
|
@@ -9713,7 +9713,7 @@ const ai = {
|
|
|
9713
9713
|
}
|
|
9714
9714
|
}, ua = async () => {
|
|
9715
9715
|
try {
|
|
9716
|
-
await
|
|
9716
|
+
await h(), await w(), ae.value = "MFA settings updated successfully", y("mfa-toggle", b.value?.mfaEnabled || !1);
|
|
9717
9717
|
} catch (J) {
|
|
9718
9718
|
console.warn("Failed to refresh profile after MFA update:", J);
|
|
9719
9719
|
}
|
|
@@ -9737,7 +9737,7 @@ const ai = {
|
|
|
9737
9737
|
return We(async () => {
|
|
9738
9738
|
if (b.value && p.value)
|
|
9739
9739
|
try {
|
|
9740
|
-
const J = await
|
|
9740
|
+
const J = await g();
|
|
9741
9741
|
Te.canChange = J.can_change, Te.cooldownEnd = J.cooldown_end ? new Date(J.cooldown_end) : null, Te.daysRemaining = J.days_remaining || 0;
|
|
9742
9742
|
} catch (J) {
|
|
9743
9743
|
console.warn("Failed to fetch username cooldown:", J);
|
|
@@ -9781,7 +9781,7 @@ const ai = {
|
|
|
9781
9781
|
onClick: la,
|
|
9782
9782
|
disabled: te.value
|
|
9783
9783
|
}, [
|
|
9784
|
-
te.value ? (a(), Ce(n(
|
|
9784
|
+
te.value ? (a(), Ce(n(gt), {
|
|
9785
9785
|
key: 0,
|
|
9786
9786
|
size: 24,
|
|
9787
9787
|
variant: "spinner"
|
|
@@ -10008,8 +10008,8 @@ const ai = {
|
|
|
10008
10008
|
P[20] || (P[20] = e("h4", { class: "profile-field-title" }, "Two-Factor Authentication", -1)),
|
|
10009
10009
|
e("p", b0, R(b.value?.mfaEnabled ? "Enabled" : "Add extra security to your account"), 1)
|
|
10010
10010
|
]),
|
|
10011
|
-
|
|
10012
|
-
(a(!0), o(Ue, null, Ke(
|
|
10011
|
+
Ct.value.length > 0 ? (a(), o("div", x0, [
|
|
10012
|
+
(a(!0), o(Ue, null, Ke(Ct.value, (we) => (a(), o("div", {
|
|
10013
10013
|
key: we.type,
|
|
10014
10014
|
class: be([
|
|
10015
10015
|
"mfa-device-chip",
|
|
@@ -10244,19 +10244,19 @@ const ai = {
|
|
|
10244
10244
|
},
|
|
10245
10245
|
emits: ["success", "error", "back-to-signin"],
|
|
10246
10246
|
setup(s, { emit: r }) {
|
|
10247
|
-
const t = s, l = r, { getSupportEmail: z } = pt(t.config), V =
|
|
10247
|
+
const t = s, l = r, { getSupportEmail: z } = pt(t.config), V = M(!1), y = M(""), k = M(!1), u = Ye({
|
|
10248
10248
|
email: ""
|
|
10249
|
-
}),
|
|
10249
|
+
}), h = async () => {
|
|
10250
10250
|
V.value = !0, y.value = "";
|
|
10251
10251
|
try {
|
|
10252
|
-
await new Promise((
|
|
10252
|
+
await new Promise(($) => setTimeout($, 1e3)), k.value = !0, l("success", u.email);
|
|
10253
10253
|
} catch {
|
|
10254
10254
|
y.value = "Failed to send password reset email. Please try again.", l("error", y.value);
|
|
10255
10255
|
} finally {
|
|
10256
10256
|
V.value = !1;
|
|
10257
10257
|
}
|
|
10258
10258
|
};
|
|
10259
|
-
return (
|
|
10259
|
+
return ($, A) => (a(), o("div", Z0, [
|
|
10260
10260
|
e("div", K0, [
|
|
10261
10261
|
d(n(_t), {
|
|
10262
10262
|
variant: "modern",
|
|
@@ -10268,7 +10268,7 @@ const ai = {
|
|
|
10268
10268
|
e("p", { class: "accui-text-neutral-600" }, "Enter your email address and we'll send you a link to reset your password")
|
|
10269
10269
|
], -1)),
|
|
10270
10270
|
e("form", {
|
|
10271
|
-
onSubmit: Be(
|
|
10271
|
+
onSubmit: Be(h, ["prevent"]),
|
|
10272
10272
|
class: "accui-space-y-6"
|
|
10273
10273
|
}, [
|
|
10274
10274
|
d(n(Ze), {
|
|
@@ -10313,7 +10313,7 @@ const ai = {
|
|
|
10313
10313
|
}, null, 8, ["message"])) : I("", !0),
|
|
10314
10314
|
e("div", G0, [
|
|
10315
10315
|
d(n(mt), {
|
|
10316
|
-
onClick: A[2] || (A[2] = (c) =>
|
|
10316
|
+
onClick: A[2] || (A[2] = (c) => $.$emit("back-to-signin")),
|
|
10317
10317
|
class: "accui-inline-flex accui-items-center accui-gap-2"
|
|
10318
10318
|
}, {
|
|
10319
10319
|
default: x(() => [...A[3] || (A[3] = [
|
|
@@ -10376,17 +10376,14 @@ const ai = {
|
|
|
10376
10376
|
},
|
|
10377
10377
|
emits: ["sign-in-required"],
|
|
10378
10378
|
setup(s, { emit: r }) {
|
|
10379
|
-
const t = r, { isAuthenticated: l, isInitializing: z, user: V, signOut: y, initialize: k, isInitialized: u } = ft(),
|
|
10379
|
+
const t = r, { isAuthenticated: l, isInitializing: z, user: V, signOut: y, initialize: k, isInitialized: u } = ft(), h = M(!1);
|
|
10380
10380
|
We(async () => {
|
|
10381
|
-
console.log("[SignedIn] onMounted
|
|
10381
|
+
console.log("[SignedIn] onMounted called"), h.value = !0, await k(), await ht(), console.log("[SignedIn] onMounted complete - hasMounted:", h.value, "isInitialized:", u.value, "isInitializing:", z.value, "isAuthenticated:", l.value);
|
|
10382
10382
|
});
|
|
10383
|
-
const
|
|
10384
|
-
const E = !
|
|
10385
|
-
return console.log("[SignedIn]
|
|
10386
|
-
}), c = U(() => {
|
|
10387
|
-
const E = !M.value && !l.value;
|
|
10388
|
-
return console.log("[SignedIn] isSignedOut computed:", E), E;
|
|
10389
|
-
}), h = () => {
|
|
10383
|
+
const $ = U(() => {
|
|
10384
|
+
const E = !h.value || z.value || !u.value;
|
|
10385
|
+
return console.log("[SignedIn] isLoading:", E, "(hasMounted:", h.value, "isInitializing:", z.value, "isInitialized:", u.value, ")"), E;
|
|
10386
|
+
}), A = U(() => !$.value && l.value), c = U(() => !$.value && !l.value), g = () => {
|
|
10390
10387
|
t("sign-in-required");
|
|
10391
10388
|
};
|
|
10392
10389
|
return (E, D) => A.value ? (a(), o("div", {
|
|
@@ -10398,18 +10395,18 @@ const ai = {
|
|
|
10398
10395
|
signOut: n(y)
|
|
10399
10396
|
}, void 0, !0)
|
|
10400
10397
|
], 2)) : c.value && s.showFallback ? (a(), o("div", X0, [
|
|
10401
|
-
je(E.$slots, "fallback", { signIn:
|
|
10398
|
+
je(E.$slots, "fallback", { signIn: g }, () => [
|
|
10402
10399
|
e("div", { class: "signed-in-fallback" }, [
|
|
10403
|
-
D[0] || (D[0] = Jt('<div class="signed-in-icon-container" data-v-
|
|
10400
|
+
D[0] || (D[0] = Jt('<div class="signed-in-icon-container" data-v-12faa289><svg class="signed-in-icon" fill="none" stroke="currentColor" viewBox="0 0 24 24" data-v-12faa289><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-12faa289></path></svg></div><h3 class="signed-in-title" data-v-12faa289>Sign in required</h3><p class="signed-in-subtitle" data-v-12faa289>You need to be signed in to access this content.</p>', 3)),
|
|
10404
10401
|
e("button", {
|
|
10405
|
-
onClick:
|
|
10402
|
+
onClick: g,
|
|
10406
10403
|
class: "signed-in-button"
|
|
10407
10404
|
}, " Sign in ")
|
|
10408
10405
|
])
|
|
10409
10406
|
], !0)
|
|
10410
|
-
])) :
|
|
10407
|
+
])) : $.value ? (a(), o("div", J0, [
|
|
10411
10408
|
je(E.$slots, "loading", {}, () => [
|
|
10412
|
-
d(n(
|
|
10409
|
+
d(n(gt), {
|
|
10413
10410
|
size: 30,
|
|
10414
10411
|
variant: "circle",
|
|
10415
10412
|
"show-particles": !0
|
|
@@ -10417,7 +10414,7 @@ const ai = {
|
|
|
10417
10414
|
], !0)
|
|
10418
10415
|
])) : I("", !0);
|
|
10419
10416
|
}
|
|
10420
|
-
}), tu = /* @__PURE__ */ De(eu, [["__scopeId", "data-v-
|
|
10417
|
+
}), tu = /* @__PURE__ */ De(eu, [["__scopeId", "data-v-12faa289"]]), Nc = /* @__PURE__ */ Ve({
|
|
10421
10418
|
__name: "StrandsConfigProvider",
|
|
10422
10419
|
props: {
|
|
10423
10420
|
config: {}
|
|
@@ -10604,8 +10601,8 @@ const ai = {
|
|
|
10604
10601
|
},
|
|
10605
10602
|
emits: ["profile-updated", "signed-out", "signed-in"],
|
|
10606
10603
|
setup(s, { emit: r }) {
|
|
10607
|
-
const t = s, l = r, { currentUser: z, signOut: V, isAuthenticated: y } = ft(), k =
|
|
10608
|
-
trigger:
|
|
10604
|
+
const t = s, l = r, { currentUser: z, signOut: V, isAuthenticated: y } = ft(), k = M(!1), u = M(!1), h = M(!1), $ = M(), A = M(), c = M(), g = U(() => A.value), { floatingStyle: E, updatePosition: D } = Oa({
|
|
10605
|
+
trigger: g,
|
|
10609
10606
|
floating: c,
|
|
10610
10607
|
placement: "bottom-end",
|
|
10611
10608
|
offset: 8,
|
|
@@ -10650,7 +10647,7 @@ const ai = {
|
|
|
10650
10647
|
return 64;
|
|
10651
10648
|
}
|
|
10652
10649
|
}), p = U(() => t.user ? t.user : y.value ? z.value : null), L = U(() => p.value ? p.value.username ? p.value.username : p.value.firstName && p.value.lastName ? `${p.value.firstName} ${p.value.lastName}` : p.value.firstName ? p.value.firstName : p.value.email || "User" : "User"), O = () => {
|
|
10653
|
-
k.value = !k.value, k.value &&
|
|
10650
|
+
k.value = !k.value, k.value && ht(() => {
|
|
10654
10651
|
D();
|
|
10655
10652
|
});
|
|
10656
10653
|
}, S = () => {
|
|
@@ -10668,9 +10665,9 @@ const ai = {
|
|
|
10668
10665
|
l("profile-updated");
|
|
10669
10666
|
}, ye = () => {
|
|
10670
10667
|
}, Me = () => {
|
|
10671
|
-
|
|
10668
|
+
h.value = !0;
|
|
10672
10669
|
}, Ae = () => {
|
|
10673
|
-
|
|
10670
|
+
h.value = !1, l("signed-in");
|
|
10674
10671
|
}, Se = () => {
|
|
10675
10672
|
}, xe = async () => {
|
|
10676
10673
|
try {
|
|
@@ -10681,7 +10678,7 @@ const ai = {
|
|
|
10681
10678
|
return (ne, j) => (a(), o("div", {
|
|
10682
10679
|
class: "accui-component-scope",
|
|
10683
10680
|
ref_key: "containerRef",
|
|
10684
|
-
ref:
|
|
10681
|
+
ref: $
|
|
10685
10682
|
}, [
|
|
10686
10683
|
t.user ? (a(), o(Ue, { key: 0 }, [
|
|
10687
10684
|
s.variant === "mini-profile" ? (a(), o("div", {
|
|
@@ -10940,8 +10937,8 @@ const ai = {
|
|
|
10940
10937
|
_: 1
|
|
10941
10938
|
}),
|
|
10942
10939
|
d(n(ut), {
|
|
10943
|
-
modelValue:
|
|
10944
|
-
"onUpdate:modelValue": j[2] || (j[2] = (K) =>
|
|
10940
|
+
modelValue: h.value,
|
|
10941
|
+
"onUpdate:modelValue": j[2] || (j[2] = (K) => h.value = K)
|
|
10945
10942
|
}, {
|
|
10946
10943
|
default: x(() => [
|
|
10947
10944
|
e("div", Ru, [
|
|
@@ -10957,7 +10954,7 @@ const ai = {
|
|
|
10957
10954
|
}, 8, ["modelValue"])
|
|
10958
10955
|
]),
|
|
10959
10956
|
loading: x(() => [
|
|
10960
|
-
d(
|
|
10957
|
+
d(gt, {
|
|
10961
10958
|
variant: "circle",
|
|
10962
10959
|
size: 30
|
|
10963
10960
|
})
|
|
@@ -11211,10 +11208,10 @@ const ai = {
|
|
|
11211
11208
|
});
|
|
11212
11209
|
Xt("userNavState", z);
|
|
11213
11210
|
const V = (k) => {
|
|
11214
|
-
const u = z.items.findIndex((
|
|
11211
|
+
const u = z.items.findIndex((h) => h.id === k.id);
|
|
11215
11212
|
u >= 0 ? z.items[u] = k : z.items.push(k);
|
|
11216
11213
|
}, y = (k) => {
|
|
11217
|
-
const u = z.items.findIndex((
|
|
11214
|
+
const u = z.items.findIndex((h) => h.id === k);
|
|
11218
11215
|
u >= 0 && z.items.splice(u, 1);
|
|
11219
11216
|
};
|
|
11220
11217
|
return Xt("registerNavItem", V), Xt("unregisterNavItem", y), r({
|
|
@@ -11259,35 +11256,35 @@ const ai = {
|
|
|
11259
11256
|
align: {}
|
|
11260
11257
|
},
|
|
11261
11258
|
setup(s) {
|
|
11262
|
-
const r = s, t = ga(), l = ma("registerNavItem"), z = ma("unregisterNavItem"), V =
|
|
11259
|
+
const r = s, t = ga(), l = ma("registerNavItem"), z = ma("unregisterNavItem"), V = M(`nav-item-${Math.random().toString(36).substring(2, 11)}`), y = os(), k = U(() => {
|
|
11263
11260
|
if (typeof window < "u" && y) {
|
|
11264
|
-
const
|
|
11265
|
-
if (
|
|
11266
|
-
return
|
|
11261
|
+
const g = y.vnode.el?.parentElement;
|
|
11262
|
+
if (g)
|
|
11263
|
+
return g.closest('[role="menu"]') !== null;
|
|
11267
11264
|
}
|
|
11268
11265
|
return !1;
|
|
11269
11266
|
}), u = () => {
|
|
11270
11267
|
try {
|
|
11271
|
-
const
|
|
11272
|
-
return
|
|
11268
|
+
const g = t.default?.();
|
|
11269
|
+
return g ? g.map((E) => typeof E.children == "string" ? E.children : E.children && Array.isArray(E.children) ? E.children.map(
|
|
11273
11270
|
(D) => typeof D == "string" ? D : ""
|
|
11274
11271
|
).join("") : "").join("").trim() : "";
|
|
11275
11272
|
} catch {
|
|
11276
11273
|
return "";
|
|
11277
11274
|
}
|
|
11278
|
-
},
|
|
11275
|
+
}, h = () => r.type === "button" ? "" : [
|
|
11279
11276
|
"strands-nav-item",
|
|
11280
11277
|
`strands-nav-item--color-${r.color}`,
|
|
11281
11278
|
{ "strands-nav-item--disabled": r.disabled }
|
|
11282
|
-
],
|
|
11279
|
+
], $ = () => {
|
|
11283
11280
|
r.disabled;
|
|
11284
|
-
}, A = (
|
|
11281
|
+
}, A = (g) => {
|
|
11285
11282
|
const E = {
|
|
11286
11283
|
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",
|
|
11287
11284
|
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",
|
|
11288
11285
|
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"
|
|
11289
11286
|
};
|
|
11290
|
-
return E[
|
|
11287
|
+
return E[g] || E.dashboard;
|
|
11291
11288
|
}, c = U(() => ({
|
|
11292
11289
|
id: V.value,
|
|
11293
11290
|
label: u(),
|
|
@@ -11303,10 +11300,10 @@ const ai = {
|
|
|
11303
11300
|
z && z(V.value);
|
|
11304
11301
|
}), Le(() => [r.to, r.icon, r.disabled], () => {
|
|
11305
11302
|
l && l(c.value);
|
|
11306
|
-
}, { deep: !0 }), (
|
|
11303
|
+
}, { deep: !0 }), (g, E) => (a(), Ce(n(ce), {
|
|
11307
11304
|
to: r.to,
|
|
11308
|
-
onClick:
|
|
11309
|
-
class: be(
|
|
11305
|
+
onClick: $,
|
|
11306
|
+
class: be(h()),
|
|
11310
11307
|
variant: r.variant,
|
|
11311
11308
|
color: r.color,
|
|
11312
11309
|
size: r.size,
|
|
@@ -11325,7 +11322,7 @@ const ai = {
|
|
|
11325
11322
|
d: A(r.icon)
|
|
11326
11323
|
}, null, 8, Wu)
|
|
11327
11324
|
])) : I("", !0),
|
|
11328
|
-
je(
|
|
11325
|
+
je(g.$slots, "default")
|
|
11329
11326
|
]),
|
|
11330
11327
|
_: 2
|
|
11331
11328
|
}, [
|
|
@@ -11357,18 +11354,18 @@ const Xu = { class: "accui-p-2 accui-border-b" }, Ju = /* @__PURE__ */ Ve({
|
|
|
11357
11354
|
overscan: { default: 5 }
|
|
11358
11355
|
},
|
|
11359
11356
|
setup(s, { expose: r }) {
|
|
11360
|
-
const t = s, l =
|
|
11361
|
-
const c = Math.floor(z.value / t.itemHeight),
|
|
11357
|
+
const t = s, l = M(), z = M(0), V = U(() => {
|
|
11358
|
+
const c = Math.floor(z.value / t.itemHeight), g = Math.min(
|
|
11362
11359
|
c + Math.ceil(t.containerHeight / t.itemHeight),
|
|
11363
11360
|
t.items.length - 1
|
|
11364
11361
|
);
|
|
11365
11362
|
return {
|
|
11366
11363
|
start: Math.max(0, c - t.overscan),
|
|
11367
|
-
end: Math.min(t.items.length - 1,
|
|
11364
|
+
end: Math.min(t.items.length - 1, g + t.overscan)
|
|
11368
11365
|
};
|
|
11369
11366
|
}), y = U(() => {
|
|
11370
|
-
const { start: c, end:
|
|
11371
|
-
for (let D = c; D <=
|
|
11367
|
+
const { start: c, end: g } = V.value, E = [];
|
|
11368
|
+
for (let D = c; D <= g; D++)
|
|
11372
11369
|
E.push({
|
|
11373
11370
|
index: D,
|
|
11374
11371
|
data: t.items[D],
|
|
@@ -11376,26 +11373,26 @@ const Xu = { class: "accui-p-2 accui-border-b" }, Ju = /* @__PURE__ */ Ve({
|
|
|
11376
11373
|
});
|
|
11377
11374
|
return E;
|
|
11378
11375
|
}), k = U(() => t.items.length * t.itemHeight), u = (c) => typeof t.itemKey == "function" ? t.itemKey(c) : c[t.itemKey] || c.id || Math.random();
|
|
11379
|
-
let
|
|
11380
|
-
const
|
|
11381
|
-
|
|
11382
|
-
const
|
|
11383
|
-
z.value =
|
|
11376
|
+
let h = null;
|
|
11377
|
+
const $ = (c) => {
|
|
11378
|
+
h && clearTimeout(h), h = setTimeout(() => {
|
|
11379
|
+
const g = c.target;
|
|
11380
|
+
z.value = g.scrollTop;
|
|
11384
11381
|
}, 16);
|
|
11385
11382
|
};
|
|
11386
11383
|
return xt(() => {
|
|
11387
|
-
|
|
11384
|
+
h && clearTimeout(h);
|
|
11388
11385
|
}), r({
|
|
11389
|
-
scrollToItem: (c,
|
|
11386
|
+
scrollToItem: (c, g = "start") => {
|
|
11390
11387
|
if (!l.value) return;
|
|
11391
11388
|
let E = c * t.itemHeight;
|
|
11392
|
-
|
|
11389
|
+
g === "center" ? E -= t.containerHeight / 2 - t.itemHeight / 2 : g === "end" && (E -= t.containerHeight - t.itemHeight), l.value.scrollTop = Math.max(0, E);
|
|
11393
11390
|
}
|
|
11394
|
-
}), (c,
|
|
11391
|
+
}), (c, g) => (a(), o("div", {
|
|
11395
11392
|
ref_key: "scrollContainer",
|
|
11396
11393
|
ref: l,
|
|
11397
11394
|
style: Oe({ height: s.containerHeight + "px", overflowY: "auto" }),
|
|
11398
|
-
onScroll:
|
|
11395
|
+
onScroll: $,
|
|
11399
11396
|
class: "accui-virtual-list"
|
|
11400
11397
|
}, [
|
|
11401
11398
|
e("div", {
|
|
@@ -11518,15 +11515,15 @@ const Xu = { class: "accui-p-2 accui-border-b" }, Ju = /* @__PURE__ */ Ve({
|
|
|
11518
11515
|
}
|
|
11519
11516
|
}, y = s, k = r, {
|
|
11520
11517
|
mfaEnabled: u,
|
|
11521
|
-
loading:
|
|
11522
|
-
activeMfaDevices:
|
|
11518
|
+
loading: h,
|
|
11519
|
+
activeMfaDevices: $,
|
|
11523
11520
|
fetchMfaDevices: A
|
|
11524
11521
|
} = Tt(), c = U({
|
|
11525
11522
|
get: () => y.show,
|
|
11526
11523
|
set: (q) => {
|
|
11527
11524
|
q || k("close");
|
|
11528
11525
|
}
|
|
11529
|
-
}),
|
|
11526
|
+
}), g = M(!1), E = M(!1), D = M(!1), C = M(!1);
|
|
11530
11527
|
Le(() => y.show, async (q) => {
|
|
11531
11528
|
q && await A();
|
|
11532
11529
|
}), We(async () => {
|
|
@@ -11535,13 +11532,13 @@ const Xu = { class: "accui-p-2 accui-border-b" }, Ju = /* @__PURE__ */ Ve({
|
|
|
11535
11532
|
const N = () => {
|
|
11536
11533
|
k("close");
|
|
11537
11534
|
}, p = () => {
|
|
11538
|
-
|
|
11535
|
+
g.value = !0;
|
|
11539
11536
|
}, L = () => {
|
|
11540
11537
|
E.value = !0;
|
|
11541
11538
|
}, O = () => {
|
|
11542
11539
|
C.value = !0;
|
|
11543
11540
|
}, S = async () => {
|
|
11544
|
-
|
|
11541
|
+
g.value = !1, E.value = !1, D.value = !1, await A(), k("success");
|
|
11545
11542
|
}, w = async () => {
|
|
11546
11543
|
await A();
|
|
11547
11544
|
};
|
|
@@ -11559,8 +11556,8 @@ const Xu = { class: "accui-p-2 accui-border-b" }, Ju = /* @__PURE__ */ Ve({
|
|
|
11559
11556
|
], -1)),
|
|
11560
11557
|
e("div", ac, [
|
|
11561
11558
|
e("span", {
|
|
11562
|
-
class: be(["mfa-setup-status-badge", n(u) || n(
|
|
11563
|
-
}, R(n(u) || n(
|
|
11559
|
+
class: be(["mfa-setup-status-badge", n(u) || n($).length > 0 ? "mfa-setup-status-enabled" : "mfa-setup-status-disabled"])
|
|
11560
|
+
}, R(n(u) || n($).length > 0 ? "Enabled" : "Not Enabled"), 3)
|
|
11564
11561
|
])
|
|
11565
11562
|
])
|
|
11566
11563
|
]),
|
|
@@ -11569,7 +11566,7 @@ const Xu = { class: "accui-p-2 accui-border-b" }, Ju = /* @__PURE__ */ Ve({
|
|
|
11569
11566
|
d(n(ce), {
|
|
11570
11567
|
variant: "secondary",
|
|
11571
11568
|
onClick: N,
|
|
11572
|
-
disabled: n(
|
|
11569
|
+
disabled: n(h)
|
|
11573
11570
|
}, {
|
|
11574
11571
|
default: x(() => [...Z[15] || (Z[15] = [
|
|
11575
11572
|
Q(" Cancel ", -1)
|
|
@@ -11580,11 +11577,11 @@ const Xu = { class: "accui-p-2 accui-border-b" }, Ju = /* @__PURE__ */ Ve({
|
|
|
11580
11577
|
]),
|
|
11581
11578
|
default: x(() => [
|
|
11582
11579
|
e("div", sc, [
|
|
11583
|
-
n(
|
|
11584
|
-
d(n(
|
|
11580
|
+
n(h) ? (a(), o("div", oc, [
|
|
11581
|
+
d(n(gt), { size: 32 }),
|
|
11585
11582
|
Z[6] || (Z[6] = e("span", { class: "mfa-setup-loading-text" }, "Loading MFA settings...", -1))
|
|
11586
11583
|
])) : (a(), o("div", lc, [
|
|
11587
|
-
n(u) || n(
|
|
11584
|
+
n(u) || n($).length > 0 ? (a(), o("div", nc, [
|
|
11588
11585
|
e("div", ic, [
|
|
11589
11586
|
e("div", rc, [
|
|
11590
11587
|
d(z, {
|
|
@@ -11620,7 +11617,7 @@ const Xu = { class: "accui-p-2 accui-border-b" }, Ju = /* @__PURE__ */ Ve({
|
|
|
11620
11617
|
variant: "primary",
|
|
11621
11618
|
size: "md",
|
|
11622
11619
|
onClick: Be(p, ["stop"]),
|
|
11623
|
-
disabled: n(
|
|
11620
|
+
disabled: n(h),
|
|
11624
11621
|
class: "mfa-setup-method-button"
|
|
11625
11622
|
}, {
|
|
11626
11623
|
default: x(() => [...Z[8] || (Z[8] = [
|
|
@@ -11649,7 +11646,7 @@ const Xu = { class: "accui-p-2 accui-border-b" }, Ju = /* @__PURE__ */ Ve({
|
|
|
11649
11646
|
variant: "primary",
|
|
11650
11647
|
size: "md",
|
|
11651
11648
|
onClick: Be(L, ["stop"]),
|
|
11652
|
-
disabled: n(
|
|
11649
|
+
disabled: n(h),
|
|
11653
11650
|
class: "mfa-setup-method-button"
|
|
11654
11651
|
}, {
|
|
11655
11652
|
default: x(() => [...Z[10] || (Z[10] = [
|
|
@@ -11661,17 +11658,17 @@ const Xu = { class: "accui-p-2 accui-border-b" }, Ju = /* @__PURE__ */ Ve({
|
|
|
11661
11658
|
])
|
|
11662
11659
|
])
|
|
11663
11660
|
]),
|
|
11664
|
-
n(
|
|
11661
|
+
n($).length > 0 ? (a(), o("div", fc, [
|
|
11665
11662
|
e("div", mc, [
|
|
11666
11663
|
e("div", null, [
|
|
11667
11664
|
Z[13] || (Z[13] = e("h3", { class: "mfa-setup-manage-title" }, "Manage Existing Methods", -1)),
|
|
11668
|
-
e("p", hc, R(n(
|
|
11665
|
+
e("p", hc, R(n($).length) + " device(s) currently active", 1)
|
|
11669
11666
|
]),
|
|
11670
11667
|
d(n(ce), {
|
|
11671
11668
|
variant: "secondary",
|
|
11672
11669
|
size: "md",
|
|
11673
11670
|
onClick: O,
|
|
11674
|
-
disabled: n(
|
|
11671
|
+
disabled: n(h)
|
|
11675
11672
|
}, {
|
|
11676
11673
|
default: x(() => [
|
|
11677
11674
|
d(V, {
|
|
@@ -11689,10 +11686,10 @@ const Xu = { class: "accui-p-2 accui-border-b" }, Ju = /* @__PURE__ */ Ve({
|
|
|
11689
11686
|
]),
|
|
11690
11687
|
_: 1
|
|
11691
11688
|
}, 8, ["modelValue"]),
|
|
11692
|
-
|
|
11689
|
+
g.value ? (a(), Ce(Ga, {
|
|
11693
11690
|
key: 0,
|
|
11694
|
-
show:
|
|
11695
|
-
onClose: Z[1] || (Z[1] = (b) =>
|
|
11691
|
+
show: g.value,
|
|
11692
|
+
onClose: Z[1] || (Z[1] = (b) => g.value = !1),
|
|
11696
11693
|
onSuccess: S
|
|
11697
11694
|
}, null, 8, ["show"])) : I("", !0),
|
|
11698
11695
|
E.value ? (a(), Ce(Ya, {
|
|
@@ -11717,18 +11714,18 @@ const Xu = { class: "accui-p-2 accui-border-b" }, Ju = /* @__PURE__ */ Ve({
|
|
|
11717
11714
|
}
|
|
11718
11715
|
}), Rc = /* @__PURE__ */ De(Cc, [["__scopeId", "data-v-5e4af8e5"]]);
|
|
11719
11716
|
function Gt() {
|
|
11720
|
-
const { config: s } = pt(), { currentSession: r, refreshToken: t, getAuthHeaders: l } = ft(), z = async (
|
|
11717
|
+
const { config: s } = pt(), { currentSession: r, refreshToken: t, getAuthHeaders: l } = ft(), z = async ($, A = {}) => {
|
|
11721
11718
|
const {
|
|
11722
11719
|
autoRefresh: c = !0,
|
|
11723
|
-
requireAuth:
|
|
11720
|
+
requireAuth: g = !0,
|
|
11724
11721
|
baseURL: E,
|
|
11725
11722
|
...D
|
|
11726
11723
|
} = A;
|
|
11727
|
-
if (
|
|
11724
|
+
if (g && !r.value?.accessToken)
|
|
11728
11725
|
throw new Error("User is not authenticated");
|
|
11729
|
-
let C =
|
|
11726
|
+
let C = $;
|
|
11730
11727
|
const N = E || s.value.baseUrl;
|
|
11731
|
-
N && typeof
|
|
11728
|
+
N && typeof $ == "string" && !$.startsWith("http") && (C = new URL($, N).toString());
|
|
11732
11729
|
const p = new Headers(D.headers);
|
|
11733
11730
|
if (r.value?.accessToken)
|
|
11734
11731
|
try {
|
|
@@ -11737,7 +11734,7 @@ function Gt() {
|
|
|
11737
11734
|
p.set(w, q);
|
|
11738
11735
|
});
|
|
11739
11736
|
} catch (S) {
|
|
11740
|
-
if (console.warn("[Strands Auth] Failed to get auth headers:", S),
|
|
11737
|
+
if (console.warn("[Strands Auth] Failed to get auth headers:", S), g)
|
|
11741
11738
|
throw S;
|
|
11742
11739
|
}
|
|
11743
11740
|
const L = {
|
|
@@ -11760,32 +11757,32 @@ function Gt() {
|
|
|
11760
11757
|
};
|
|
11761
11758
|
return {
|
|
11762
11759
|
authenticatedFetch: z,
|
|
11763
|
-
get: (
|
|
11764
|
-
post: (
|
|
11765
|
-
const
|
|
11766
|
-
return A && typeof A == "object" && !
|
|
11760
|
+
get: ($, A) => z($, { ...A, method: "GET" }),
|
|
11761
|
+
post: ($, A, c) => {
|
|
11762
|
+
const g = new Headers(c?.headers);
|
|
11763
|
+
return A && typeof A == "object" && !g.has("Content-Type") && g.set("Content-Type", "application/json"), z($, {
|
|
11767
11764
|
...c,
|
|
11768
11765
|
method: "POST",
|
|
11769
|
-
headers:
|
|
11766
|
+
headers: g,
|
|
11770
11767
|
body: typeof A == "object" ? JSON.stringify(A) : A
|
|
11771
11768
|
});
|
|
11772
11769
|
},
|
|
11773
|
-
put: (
|
|
11774
|
-
const
|
|
11775
|
-
return A && typeof A == "object" && !
|
|
11770
|
+
put: ($, A, c) => {
|
|
11771
|
+
const g = new Headers(c?.headers);
|
|
11772
|
+
return A && typeof A == "object" && !g.has("Content-Type") && g.set("Content-Type", "application/json"), z($, {
|
|
11776
11773
|
...c,
|
|
11777
11774
|
method: "PUT",
|
|
11778
|
-
headers:
|
|
11775
|
+
headers: g,
|
|
11779
11776
|
body: typeof A == "object" ? JSON.stringify(A) : A
|
|
11780
11777
|
});
|
|
11781
11778
|
},
|
|
11782
|
-
delete: (
|
|
11783
|
-
patch: (
|
|
11784
|
-
const
|
|
11785
|
-
return A && typeof A == "object" && !
|
|
11779
|
+
delete: ($, A) => z($, { ...A, method: "DELETE" }),
|
|
11780
|
+
patch: ($, A, c) => {
|
|
11781
|
+
const g = new Headers(c?.headers);
|
|
11782
|
+
return A && typeof A == "object" && !g.has("Content-Type") && g.set("Content-Type", "application/json"), z($, {
|
|
11786
11783
|
...c,
|
|
11787
11784
|
method: "PATCH",
|
|
11788
|
-
headers:
|
|
11785
|
+
headers: g,
|
|
11789
11786
|
body: typeof A == "object" ? JSON.stringify(A) : A
|
|
11790
11787
|
});
|
|
11791
11788
|
}
|
|
@@ -11870,7 +11867,7 @@ export {
|
|
|
11870
11867
|
Ze as StrandsUiInput,
|
|
11871
11868
|
Qt as StrandsUiLevelProgress,
|
|
11872
11869
|
mt as StrandsUiLink,
|
|
11873
|
-
|
|
11870
|
+
gt as StrandsUiLoader,
|
|
11874
11871
|
ut as StrandsUiModal,
|
|
11875
11872
|
Lc as StrandsUiPill,
|
|
11876
11873
|
Vc as StrandsUiRadioGroup,
|
|
@@ -11896,7 +11893,7 @@ export {
|
|
|
11896
11893
|
Ze as UiInput,
|
|
11897
11894
|
Qt as UiLevelProgress,
|
|
11898
11895
|
mt as UiLink,
|
|
11899
|
-
|
|
11896
|
+
gt as UiLoader,
|
|
11900
11897
|
ut as UiModal,
|
|
11901
11898
|
Lc as UiPill,
|
|
11902
11899
|
Vc as UiRadioGroup,
|