@masonitestudios/spartanauth-widgets 1.1.1 → 1.2.1
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/README.md +222 -0
- package/dist/sa-widgets.mjs +1092 -988
- package/dist/sa-widgets.umd.js +45 -4
- package/package.json +2 -2
package/dist/sa-widgets.mjs
CHANGED
|
@@ -2,26 +2,26 @@ const Qt = (e, t) => e === t, Ze = {
|
|
|
2
2
|
equals: Qt
|
|
3
3
|
};
|
|
4
4
|
let Tt = zt;
|
|
5
|
-
const
|
|
5
|
+
const ze = 1, Ye = 2, Ot = {
|
|
6
6
|
owned: null,
|
|
7
7
|
cleanups: null,
|
|
8
8
|
context: null,
|
|
9
9
|
owner: null
|
|
10
10
|
};
|
|
11
|
-
var
|
|
12
|
-
let at = null, en = null,
|
|
11
|
+
var ee = null;
|
|
12
|
+
let at = null, en = null, Q = null, he = null, _e = null, nt = 0;
|
|
13
13
|
function tn(e, t) {
|
|
14
|
-
const n =
|
|
14
|
+
const n = Q, r = ee, i = e.length === 0, s = t === void 0 ? r : t, u = i ? Ot : {
|
|
15
15
|
owned: null,
|
|
16
16
|
cleanups: null,
|
|
17
|
-
context:
|
|
18
|
-
owner:
|
|
19
|
-
}, o =
|
|
20
|
-
|
|
17
|
+
context: s ? s.context : null,
|
|
18
|
+
owner: s
|
|
19
|
+
}, o = i ? e : () => e(() => rt(() => Je(u)));
|
|
20
|
+
ee = u, Q = null;
|
|
21
21
|
try {
|
|
22
|
-
return
|
|
22
|
+
return Ge(o, !0);
|
|
23
23
|
} finally {
|
|
24
|
-
|
|
24
|
+
Q = n, ee = r;
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
27
|
function w(e, t) {
|
|
@@ -31,64 +31,64 @@ function w(e, t) {
|
|
|
31
31
|
observers: null,
|
|
32
32
|
observerSlots: null,
|
|
33
33
|
comparator: t.equals || void 0
|
|
34
|
-
}, r = (
|
|
34
|
+
}, r = (i) => (typeof i == "function" && (i = i(n.value)), Pt(n, i));
|
|
35
35
|
return [It.bind(n), r];
|
|
36
36
|
}
|
|
37
37
|
function y(e, t, n) {
|
|
38
|
-
const r = pt(e, t, !1,
|
|
38
|
+
const r = pt(e, t, !1, ze);
|
|
39
39
|
Ve(r);
|
|
40
40
|
}
|
|
41
41
|
function nn(e, t, n) {
|
|
42
42
|
Tt = on;
|
|
43
|
-
const r = pt(e, t, !1,
|
|
44
|
-
r.user = !0,
|
|
43
|
+
const r = pt(e, t, !1, ze);
|
|
44
|
+
r.user = !0, _e ? _e.push(r) : Ve(r);
|
|
45
45
|
}
|
|
46
|
-
function
|
|
46
|
+
function f(e, t, n) {
|
|
47
47
|
n = n ? Object.assign({}, Ze, n) : Ze;
|
|
48
48
|
const r = pt(e, t, !0, 0);
|
|
49
49
|
return r.observers = null, r.observerSlots = null, r.comparator = n.equals || void 0, Ve(r), It.bind(r);
|
|
50
50
|
}
|
|
51
51
|
function rt(e) {
|
|
52
|
-
if (
|
|
53
|
-
const t =
|
|
54
|
-
|
|
52
|
+
if (Q === null) return e();
|
|
53
|
+
const t = Q;
|
|
54
|
+
Q = null;
|
|
55
55
|
try {
|
|
56
56
|
return e();
|
|
57
57
|
} finally {
|
|
58
|
-
|
|
58
|
+
Q = t;
|
|
59
59
|
}
|
|
60
60
|
}
|
|
61
|
-
function
|
|
61
|
+
function ft(e) {
|
|
62
62
|
nn(() => rt(e));
|
|
63
63
|
}
|
|
64
64
|
function rn(e) {
|
|
65
|
-
return
|
|
65
|
+
return ee === null || (ee.cleanups === null ? ee.cleanups = [e] : ee.cleanups.push(e)), e;
|
|
66
66
|
}
|
|
67
67
|
function sn() {
|
|
68
|
-
return
|
|
68
|
+
return ee;
|
|
69
69
|
}
|
|
70
70
|
function It() {
|
|
71
71
|
if (this.sources && this.state)
|
|
72
|
-
if (this.state ===
|
|
72
|
+
if (this.state === ze) Ve(this);
|
|
73
73
|
else {
|
|
74
|
-
const e =
|
|
75
|
-
|
|
74
|
+
const e = he;
|
|
75
|
+
he = null, Ge(() => Qe(this), !1), he = e;
|
|
76
76
|
}
|
|
77
|
-
if (
|
|
77
|
+
if (Q) {
|
|
78
78
|
const e = this.observers ? this.observers.length : 0;
|
|
79
|
-
|
|
79
|
+
Q.sources ? (Q.sources.push(this), Q.sourceSlots.push(e)) : (Q.sources = [this], Q.sourceSlots = [e]), this.observers ? (this.observers.push(Q), this.observerSlots.push(Q.sources.length - 1)) : (this.observers = [Q], this.observerSlots = [Q.sources.length - 1]);
|
|
80
80
|
}
|
|
81
81
|
return this.value;
|
|
82
82
|
}
|
|
83
83
|
function Pt(e, t, n) {
|
|
84
84
|
let r = e.value;
|
|
85
|
-
return (!e.comparator || !e.comparator(r, t)) && (e.value = t, e.observers && e.observers.length &&
|
|
86
|
-
for (let
|
|
87
|
-
const
|
|
88
|
-
u && at.disposed.has(
|
|
85
|
+
return (!e.comparator || !e.comparator(r, t)) && (e.value = t, e.observers && e.observers.length && Ge(() => {
|
|
86
|
+
for (let i = 0; i < e.observers.length; i += 1) {
|
|
87
|
+
const s = e.observers[i], u = at && at.running;
|
|
88
|
+
u && at.disposed.has(s), (u ? !s.tState : !s.state) && (s.pure ? he.push(s) : _e.push(s), s.observers && Mt(s)), u || (s.state = ze);
|
|
89
89
|
}
|
|
90
|
-
if (
|
|
91
|
-
throw
|
|
90
|
+
if (he.length > 1e6)
|
|
91
|
+
throw he = [], new Error();
|
|
92
92
|
}, !1)), t;
|
|
93
93
|
}
|
|
94
94
|
function Ve(e) {
|
|
@@ -103,19 +103,19 @@ function Ve(e) {
|
|
|
103
103
|
}
|
|
104
104
|
function an(e, t, n) {
|
|
105
105
|
let r;
|
|
106
|
-
const
|
|
107
|
-
|
|
106
|
+
const i = ee, s = Q;
|
|
107
|
+
Q = ee = e;
|
|
108
108
|
try {
|
|
109
109
|
r = e.fn(t);
|
|
110
110
|
} catch (u) {
|
|
111
|
-
return e.pure && (e.state =
|
|
111
|
+
return e.pure && (e.state = ze, e.owned && e.owned.forEach(Je), e.owned = null), e.updatedAt = n + 1, Nt(u);
|
|
112
112
|
} finally {
|
|
113
|
-
|
|
113
|
+
Q = s, ee = i;
|
|
114
114
|
}
|
|
115
115
|
(!e.updatedAt || e.updatedAt <= n) && (e.updatedAt != null && "observers" in e ? Pt(e, r) : e.value = r, e.updatedAt = n);
|
|
116
116
|
}
|
|
117
|
-
function pt(e, t, n, r =
|
|
118
|
-
const
|
|
117
|
+
function pt(e, t, n, r = ze, i) {
|
|
118
|
+
const s = {
|
|
119
119
|
fn: e,
|
|
120
120
|
state: r,
|
|
121
121
|
updatedAt: null,
|
|
@@ -124,11 +124,11 @@ function pt(e, t, n, r = Te, s) {
|
|
|
124
124
|
sourceSlots: null,
|
|
125
125
|
cleanups: null,
|
|
126
126
|
value: t,
|
|
127
|
-
owner:
|
|
128
|
-
context:
|
|
127
|
+
owner: ee,
|
|
128
|
+
context: ee ? ee.context : null,
|
|
129
129
|
pure: n
|
|
130
130
|
};
|
|
131
|
-
return
|
|
131
|
+
return ee === null || ee !== Ot && (ee.owned ? ee.owned.push(s) : ee.owned = [s]), s;
|
|
132
132
|
}
|
|
133
133
|
function Xe(e) {
|
|
134
134
|
if (e.state === 0) return;
|
|
@@ -138,28 +138,28 @@ function Xe(e) {
|
|
|
138
138
|
for (; (e = e.owner) && (!e.updatedAt || e.updatedAt < nt); )
|
|
139
139
|
e.state && t.push(e);
|
|
140
140
|
for (let n = t.length - 1; n >= 0; n--)
|
|
141
|
-
if (e = t[n], e.state ===
|
|
141
|
+
if (e = t[n], e.state === ze)
|
|
142
142
|
Ve(e);
|
|
143
143
|
else if (e.state === Ye) {
|
|
144
|
-
const r =
|
|
145
|
-
|
|
144
|
+
const r = he;
|
|
145
|
+
he = null, Ge(() => Qe(e, t[0]), !1), he = r;
|
|
146
146
|
}
|
|
147
147
|
}
|
|
148
|
-
function
|
|
149
|
-
if (
|
|
148
|
+
function Ge(e, t) {
|
|
149
|
+
if (he) return e();
|
|
150
150
|
let n = !1;
|
|
151
|
-
t || (
|
|
151
|
+
t || (he = []), _e ? n = !0 : _e = [], nt++;
|
|
152
152
|
try {
|
|
153
153
|
const r = e();
|
|
154
154
|
return un(n), r;
|
|
155
155
|
} catch (r) {
|
|
156
|
-
n || (
|
|
156
|
+
n || (_e = null), he = null, Nt(r);
|
|
157
157
|
}
|
|
158
158
|
}
|
|
159
159
|
function un(e) {
|
|
160
|
-
if (
|
|
161
|
-
const t =
|
|
162
|
-
|
|
160
|
+
if (he && (zt(he), he = null), e) return;
|
|
161
|
+
const t = _e;
|
|
162
|
+
_e = null, t.length && Ge(() => Tt(t), !1);
|
|
163
163
|
}
|
|
164
164
|
function zt(e) {
|
|
165
165
|
for (let t = 0; t < e.length; t++) Xe(e[t]);
|
|
@@ -177,25 +177,25 @@ function Qe(e, t) {
|
|
|
177
177
|
for (let n = 0; n < e.sources.length; n += 1) {
|
|
178
178
|
const r = e.sources[n];
|
|
179
179
|
if (r.sources) {
|
|
180
|
-
const
|
|
181
|
-
|
|
180
|
+
const i = r.state;
|
|
181
|
+
i === ze ? r !== t && (!r.updatedAt || r.updatedAt < nt) && Xe(r) : i === Ye && Qe(r, t);
|
|
182
182
|
}
|
|
183
183
|
}
|
|
184
184
|
}
|
|
185
|
-
function
|
|
185
|
+
function Mt(e) {
|
|
186
186
|
for (let t = 0; t < e.observers.length; t += 1) {
|
|
187
187
|
const n = e.observers[t];
|
|
188
|
-
n.state || (n.state = Ye, n.pure ?
|
|
188
|
+
n.state || (n.state = Ye, n.pure ? he.push(n) : _e.push(n), n.observers && Mt(n));
|
|
189
189
|
}
|
|
190
190
|
}
|
|
191
191
|
function Je(e) {
|
|
192
192
|
let t;
|
|
193
193
|
if (e.sources)
|
|
194
194
|
for (; e.sources.length; ) {
|
|
195
|
-
const n = e.sources.pop(), r = e.sourceSlots.pop(),
|
|
196
|
-
if (
|
|
197
|
-
const
|
|
198
|
-
r <
|
|
195
|
+
const n = e.sources.pop(), r = e.sourceSlots.pop(), i = n.observers;
|
|
196
|
+
if (i && i.length) {
|
|
197
|
+
const s = i.pop(), u = n.observerSlots.pop();
|
|
198
|
+
r < i.length && (s.sourceSlots[u] = r, i[r] = s, n.observerSlots[r] = u);
|
|
199
199
|
}
|
|
200
200
|
}
|
|
201
201
|
if (e.tOwned) {
|
|
@@ -217,42 +217,42 @@ function ln(e) {
|
|
|
217
217
|
cause: e
|
|
218
218
|
});
|
|
219
219
|
}
|
|
220
|
-
function
|
|
220
|
+
function Nt(e, t = ee) {
|
|
221
221
|
throw ln(e);
|
|
222
222
|
}
|
|
223
223
|
function cn(e, t, n) {
|
|
224
|
-
let r = n.length,
|
|
225
|
-
for (; u <
|
|
224
|
+
let r = n.length, i = t.length, s = r, u = 0, o = 0, A = t[i - 1].nextSibling, k = null;
|
|
225
|
+
for (; u < i || o < s; ) {
|
|
226
226
|
if (t[u] === n[o]) {
|
|
227
227
|
u++, o++;
|
|
228
228
|
continue;
|
|
229
229
|
}
|
|
230
|
-
for (; t[
|
|
231
|
-
|
|
232
|
-
if (
|
|
233
|
-
const
|
|
234
|
-
for (; o <
|
|
235
|
-
} else if (
|
|
236
|
-
for (; u <
|
|
237
|
-
(
|
|
238
|
-
else if (t[u] === n[
|
|
239
|
-
const
|
|
240
|
-
e.insertBefore(n[o++], t[u++].nextSibling), e.insertBefore(n[--
|
|
230
|
+
for (; t[i - 1] === n[s - 1]; )
|
|
231
|
+
i--, s--;
|
|
232
|
+
if (i === u) {
|
|
233
|
+
const g = s < r ? o ? n[o - 1].nextSibling : n[s - o] : A;
|
|
234
|
+
for (; o < s; ) e.insertBefore(n[o++], g);
|
|
235
|
+
} else if (s === o)
|
|
236
|
+
for (; u < i; )
|
|
237
|
+
(!k || !k.has(t[u])) && t[u].remove(), u++;
|
|
238
|
+
else if (t[u] === n[s - 1] && n[o] === t[i - 1]) {
|
|
239
|
+
const g = t[--i].nextSibling;
|
|
240
|
+
e.insertBefore(n[o++], t[u++].nextSibling), e.insertBefore(n[--s], g), t[i] = n[s];
|
|
241
241
|
} else {
|
|
242
|
-
if (
|
|
243
|
-
|
|
244
|
-
let
|
|
245
|
-
for (;
|
|
242
|
+
if (!k) {
|
|
243
|
+
k = /* @__PURE__ */ new Map();
|
|
244
|
+
let q = o;
|
|
245
|
+
for (; q < s; ) k.set(n[q], q++);
|
|
246
246
|
}
|
|
247
|
-
const
|
|
248
|
-
if (
|
|
249
|
-
if (o <
|
|
250
|
-
let
|
|
251
|
-
for (; ++
|
|
252
|
-
|
|
253
|
-
if (
|
|
254
|
-
const
|
|
255
|
-
for (; o <
|
|
247
|
+
const g = k.get(t[u]);
|
|
248
|
+
if (g != null)
|
|
249
|
+
if (o < g && g < s) {
|
|
250
|
+
let q = u, Ae = 1, Ce;
|
|
251
|
+
for (; ++q < i && q < s && !((Ce = k.get(t[q])) == null || Ce !== g + Ae); )
|
|
252
|
+
Ae++;
|
|
253
|
+
if (Ae > g - o) {
|
|
254
|
+
const $e = t[u];
|
|
255
|
+
for (; o < g; ) e.insertBefore(n[o++], $e);
|
|
256
256
|
} else e.replaceChild(n[o++], t[u++]);
|
|
257
257
|
} else u++;
|
|
258
258
|
else t[u++].remove();
|
|
@@ -260,43 +260,43 @@ function cn(e, t, n) {
|
|
|
260
260
|
}
|
|
261
261
|
}
|
|
262
262
|
const vt = "_$DX_DELEGATE";
|
|
263
|
-
function
|
|
264
|
-
let
|
|
265
|
-
const
|
|
263
|
+
function v(e, t, n, r) {
|
|
264
|
+
let i;
|
|
265
|
+
const s = () => {
|
|
266
266
|
const o = document.createElement("template");
|
|
267
267
|
return o.innerHTML = e, o.content.firstChild;
|
|
268
|
-
}, u = () => (
|
|
268
|
+
}, u = () => (i || (i = s())).cloneNode(!0);
|
|
269
269
|
return u.cloneNode = u, u;
|
|
270
270
|
}
|
|
271
|
-
function
|
|
271
|
+
function gt(e, t = window.document) {
|
|
272
272
|
const n = t[vt] || (t[vt] = /* @__PURE__ */ new Set());
|
|
273
|
-
for (let r = 0,
|
|
274
|
-
const
|
|
275
|
-
n.has(
|
|
273
|
+
for (let r = 0, i = e.length; r < i; r++) {
|
|
274
|
+
const s = e[r];
|
|
275
|
+
n.has(s) || (n.add(s), t.addEventListener(s, dn));
|
|
276
276
|
}
|
|
277
277
|
}
|
|
278
|
-
function
|
|
278
|
+
function ge(e, t, n) {
|
|
279
279
|
n == null ? e.removeAttribute(t) : e.setAttribute(t, n);
|
|
280
280
|
}
|
|
281
281
|
function jt(e, t, n) {
|
|
282
282
|
return rt(() => e(t, n));
|
|
283
283
|
}
|
|
284
|
-
function
|
|
284
|
+
function d(e, t, n, r) {
|
|
285
285
|
if (n !== void 0 && !r && (r = []), typeof t != "function") return et(e, t, r, n);
|
|
286
|
-
y((
|
|
286
|
+
y((i) => et(e, t(), i, n), r);
|
|
287
287
|
}
|
|
288
288
|
function dn(e) {
|
|
289
289
|
let t = e.target;
|
|
290
|
-
const n = `$$${e.type}`, r = e.target,
|
|
290
|
+
const n = `$$${e.type}`, r = e.target, i = e.currentTarget, s = (A) => Object.defineProperty(e, "target", {
|
|
291
291
|
configurable: !0,
|
|
292
|
-
value:
|
|
292
|
+
value: A
|
|
293
293
|
}), u = () => {
|
|
294
|
-
const
|
|
295
|
-
if (
|
|
296
|
-
const
|
|
297
|
-
if (
|
|
294
|
+
const A = t[n];
|
|
295
|
+
if (A && !t.disabled) {
|
|
296
|
+
const k = t[`${n}Data`];
|
|
297
|
+
if (k !== void 0 ? A.call(t, k, e) : A.call(t, e), e.cancelBubble) return;
|
|
298
298
|
}
|
|
299
|
-
return t.host && typeof t.host != "string" && !t.host._$host && t.contains(e.target) &&
|
|
299
|
+
return t.host && typeof t.host != "string" && !t.host._$host && t.contains(e.target) && s(t.host), !0;
|
|
300
300
|
}, o = () => {
|
|
301
301
|
for (; u() && (t = t._$host || t.parentNode || t.host); ) ;
|
|
302
302
|
};
|
|
@@ -306,52 +306,52 @@ function dn(e) {
|
|
|
306
306
|
return t || document;
|
|
307
307
|
}
|
|
308
308
|
}), e.composedPath) {
|
|
309
|
-
const
|
|
310
|
-
|
|
311
|
-
for (let
|
|
309
|
+
const A = e.composedPath();
|
|
310
|
+
s(A[0]);
|
|
311
|
+
for (let k = 0; k < A.length - 2 && (t = A[k], !!u()); k++) {
|
|
312
312
|
if (t._$host) {
|
|
313
313
|
t = t._$host, o();
|
|
314
314
|
break;
|
|
315
315
|
}
|
|
316
|
-
if (t.parentNode ===
|
|
316
|
+
if (t.parentNode === i)
|
|
317
317
|
break;
|
|
318
318
|
}
|
|
319
319
|
} else o();
|
|
320
|
-
|
|
320
|
+
s(r);
|
|
321
321
|
}
|
|
322
|
-
function et(e, t, n, r,
|
|
322
|
+
function et(e, t, n, r, i) {
|
|
323
323
|
for (; typeof n == "function"; ) n = n();
|
|
324
324
|
if (t === n) return n;
|
|
325
|
-
const
|
|
326
|
-
if (e = u && n[0] && n[0].parentNode || e,
|
|
327
|
-
if (
|
|
325
|
+
const s = typeof t, u = r !== void 0;
|
|
326
|
+
if (e = u && n[0] && n[0].parentNode || e, s === "string" || s === "number") {
|
|
327
|
+
if (s === "number" && (t = t.toString(), t === n))
|
|
328
328
|
return n;
|
|
329
329
|
if (u) {
|
|
330
330
|
let o = n[0];
|
|
331
|
-
o && o.nodeType === 3 ? o.data !== t && (o.data = t) : o = document.createTextNode(t), n =
|
|
331
|
+
o && o.nodeType === 3 ? o.data !== t && (o.data = t) : o = document.createTextNode(t), n = Le(e, n, r, o);
|
|
332
332
|
} else
|
|
333
333
|
n !== "" && typeof n == "string" ? n = e.firstChild.data = t : n = e.textContent = t;
|
|
334
|
-
} else if (t == null ||
|
|
335
|
-
n =
|
|
334
|
+
} else if (t == null || s === "boolean")
|
|
335
|
+
n = Le(e, n, r);
|
|
336
336
|
else {
|
|
337
|
-
if (
|
|
337
|
+
if (s === "function")
|
|
338
338
|
return y(() => {
|
|
339
339
|
let o = t();
|
|
340
340
|
for (; typeof o == "function"; ) o = o();
|
|
341
341
|
n = et(e, o, n, r);
|
|
342
342
|
}), () => n;
|
|
343
343
|
if (Array.isArray(t)) {
|
|
344
|
-
const o = [],
|
|
345
|
-
if (ct(o, t, n,
|
|
344
|
+
const o = [], A = n && Array.isArray(n);
|
|
345
|
+
if (ct(o, t, n, i))
|
|
346
346
|
return y(() => n = et(e, o, n, r, !0)), () => n;
|
|
347
347
|
if (o.length === 0) {
|
|
348
|
-
if (n =
|
|
349
|
-
} else
|
|
348
|
+
if (n = Le(e, n, r), u) return n;
|
|
349
|
+
} else A ? n.length === 0 ? Ct(e, o, r) : cn(e, n, o) : (n && Le(e), Ct(e, o));
|
|
350
350
|
n = o;
|
|
351
351
|
} else if (t.nodeType) {
|
|
352
352
|
if (Array.isArray(n)) {
|
|
353
|
-
if (u) return n =
|
|
354
|
-
|
|
353
|
+
if (u) return n = Le(e, n, r, t);
|
|
354
|
+
Le(e, n, null, t);
|
|
355
355
|
} else n == null || n === "" || !e.firstChild ? e.appendChild(t) : e.replaceChild(t, e.firstChild);
|
|
356
356
|
n = t;
|
|
357
357
|
}
|
|
@@ -359,78 +359,78 @@ function et(e, t, n, r, s) {
|
|
|
359
359
|
return n;
|
|
360
360
|
}
|
|
361
361
|
function ct(e, t, n, r) {
|
|
362
|
-
let
|
|
363
|
-
for (let
|
|
364
|
-
let o = t[
|
|
365
|
-
if (!(o == null || o === !0 || o === !1)) if ((
|
|
362
|
+
let i = !1;
|
|
363
|
+
for (let s = 0, u = t.length; s < u; s++) {
|
|
364
|
+
let o = t[s], A = n && n[e.length], k;
|
|
365
|
+
if (!(o == null || o === !0 || o === !1)) if ((k = typeof o) == "object" && o.nodeType)
|
|
366
366
|
e.push(o);
|
|
367
367
|
else if (Array.isArray(o))
|
|
368
|
-
|
|
369
|
-
else if (
|
|
368
|
+
i = ct(e, o, A) || i;
|
|
369
|
+
else if (k === "function")
|
|
370
370
|
if (r) {
|
|
371
371
|
for (; typeof o == "function"; ) o = o();
|
|
372
|
-
|
|
372
|
+
i = ct(
|
|
373
373
|
e,
|
|
374
374
|
Array.isArray(o) ? o : [o],
|
|
375
|
-
Array.isArray(
|
|
376
|
-
) ||
|
|
375
|
+
Array.isArray(A) ? A : [A]
|
|
376
|
+
) || i;
|
|
377
377
|
} else
|
|
378
|
-
e.push(o),
|
|
378
|
+
e.push(o), i = !0;
|
|
379
379
|
else {
|
|
380
|
-
const
|
|
381
|
-
|
|
380
|
+
const g = String(o);
|
|
381
|
+
A && A.nodeType === 3 && A.data === g ? e.push(A) : e.push(document.createTextNode(g));
|
|
382
382
|
}
|
|
383
383
|
}
|
|
384
|
-
return
|
|
384
|
+
return i;
|
|
385
385
|
}
|
|
386
386
|
function Ct(e, t, n = null) {
|
|
387
|
-
for (let r = 0,
|
|
387
|
+
for (let r = 0, i = t.length; r < i; r++) e.insertBefore(t[r], n);
|
|
388
388
|
}
|
|
389
|
-
function
|
|
389
|
+
function Le(e, t, n, r) {
|
|
390
390
|
if (n === void 0) return e.textContent = "";
|
|
391
|
-
const
|
|
391
|
+
const i = r || document.createTextNode("");
|
|
392
392
|
if (t.length) {
|
|
393
|
-
let
|
|
393
|
+
let s = !1;
|
|
394
394
|
for (let u = t.length - 1; u >= 0; u--) {
|
|
395
395
|
const o = t[u];
|
|
396
|
-
if (
|
|
397
|
-
const
|
|
398
|
-
!
|
|
399
|
-
} else
|
|
396
|
+
if (i !== o) {
|
|
397
|
+
const A = o.parentNode === e;
|
|
398
|
+
!s && !u ? A ? e.replaceChild(i, o) : e.insertBefore(i, n) : A && o.remove();
|
|
399
|
+
} else s = !0;
|
|
400
400
|
}
|
|
401
|
-
} else e.insertBefore(
|
|
402
|
-
return [
|
|
401
|
+
} else e.insertBefore(i, n);
|
|
402
|
+
return [i];
|
|
403
403
|
}
|
|
404
|
-
function
|
|
404
|
+
function hn(e) {
|
|
405
405
|
return Object.keys(e).reduce((n, r) => {
|
|
406
|
-
const
|
|
407
|
-
return n[r] = Object.assign({},
|
|
406
|
+
const i = e[r];
|
|
407
|
+
return n[r] = Object.assign({}, i), Lt(i.value) && !mn(i.value) && !Array.isArray(i.value) && (n[r].value = Object.assign({}, i.value)), Array.isArray(i.value) && (n[r].value = i.value.slice(0)), n;
|
|
408
408
|
}, {});
|
|
409
409
|
}
|
|
410
|
-
function
|
|
410
|
+
function fn(e) {
|
|
411
411
|
return e ? Object.keys(e).reduce((n, r) => {
|
|
412
|
-
const
|
|
413
|
-
return n[r] = Lt(
|
|
414
|
-
value:
|
|
415
|
-
}, n[r].attribute || (n[r].attribute =
|
|
412
|
+
const i = e[r];
|
|
413
|
+
return n[r] = Lt(i) && "value" in i ? i : {
|
|
414
|
+
value: i
|
|
415
|
+
}, n[r].attribute || (n[r].attribute = Dn(r)), n[r].parse = "parse" in n[r] ? n[r].parse : typeof n[r].value != "string", n;
|
|
416
416
|
}, {}) : {};
|
|
417
417
|
}
|
|
418
418
|
function pn(e) {
|
|
419
419
|
return Object.keys(e).reduce((n, r) => (n[r] = e[r].value, n), {});
|
|
420
420
|
}
|
|
421
|
-
function
|
|
422
|
-
const n =
|
|
423
|
-
return Object.keys(t).forEach((
|
|
424
|
-
const
|
|
425
|
-
u != null && (
|
|
421
|
+
function gn(e, t) {
|
|
422
|
+
const n = hn(t);
|
|
423
|
+
return Object.keys(t).forEach((i) => {
|
|
424
|
+
const s = n[i], u = e.getAttribute(s.attribute), o = e[i];
|
|
425
|
+
u != null && (s.value = s.parse ? Rt(u) : u), o != null && (s.value = Array.isArray(o) ? o.slice(0) : o), s.reflect && wt(e, s.attribute, s.value, !!s.parse), Object.defineProperty(e, i, {
|
|
426
426
|
get() {
|
|
427
|
-
return
|
|
427
|
+
return s.value;
|
|
428
428
|
},
|
|
429
|
-
set(
|
|
430
|
-
const
|
|
431
|
-
|
|
432
|
-
for (let
|
|
433
|
-
this.__propertyChangedCallbacks[
|
|
429
|
+
set(A) {
|
|
430
|
+
const k = s.value;
|
|
431
|
+
s.value = A, s.reflect && wt(this, s.attribute, s.value, !!s.parse);
|
|
432
|
+
for (let g = 0, q = this.__propertyChangedCallbacks.length; g < q; g++)
|
|
433
|
+
this.__propertyChangedCallbacks[g](i, A, k);
|
|
434
434
|
},
|
|
435
435
|
enumerable: !0,
|
|
436
436
|
configurable: !0
|
|
@@ -447,10 +447,10 @@ function Rt(e) {
|
|
|
447
447
|
}
|
|
448
448
|
function wt(e, t, n, r) {
|
|
449
449
|
if (n == null || n === !1) return e.removeAttribute(t);
|
|
450
|
-
let
|
|
451
|
-
e.__updating[t] = !0,
|
|
450
|
+
let i = r ? JSON.stringify(n) : n;
|
|
451
|
+
e.__updating[t] = !0, i === "true" && (i = ""), e.setAttribute(t, i), Promise.resolve().then(() => delete e.__updating[t]);
|
|
452
452
|
}
|
|
453
|
-
function
|
|
453
|
+
function Dn(e) {
|
|
454
454
|
return e.replace(/\.?([A-Z]+)/g, (t, n) => "-" + n.toLowerCase()).replace("_", "-").replace(/^-/, "");
|
|
455
455
|
}
|
|
456
456
|
function Lt(e) {
|
|
@@ -467,19 +467,19 @@ function vn(e, t) {
|
|
|
467
467
|
const n = Object.keys(t);
|
|
468
468
|
return class extends e {
|
|
469
469
|
static get observedAttributes() {
|
|
470
|
-
return n.map((
|
|
470
|
+
return n.map((i) => t[i].attribute);
|
|
471
471
|
}
|
|
472
472
|
constructor() {
|
|
473
473
|
super(), this.__initialized = !1, this.__released = !1, this.__releaseCallbacks = [], this.__propertyChangedCallbacks = [], this.__updating = {}, this.props = {};
|
|
474
474
|
}
|
|
475
475
|
connectedCallback() {
|
|
476
476
|
if (this.__initialized) return;
|
|
477
|
-
this.__releaseCallbacks = [], this.__propertyChangedCallbacks = [], this.__updating = {}, this.props =
|
|
478
|
-
const
|
|
477
|
+
this.__releaseCallbacks = [], this.__propertyChangedCallbacks = [], this.__updating = {}, this.props = gn(this, t);
|
|
478
|
+
const i = pn(this.props), s = this.Component, u = ut;
|
|
479
479
|
try {
|
|
480
|
-
ut = this, this.__initialized = !0, bn(
|
|
480
|
+
ut = this, this.__initialized = !0, bn(s) ? new s(i, {
|
|
481
481
|
element: this
|
|
482
|
-
}) : i
|
|
482
|
+
}) : s(i, {
|
|
483
483
|
element: this
|
|
484
484
|
});
|
|
485
485
|
} finally {
|
|
@@ -489,53 +489,53 @@ function vn(e, t) {
|
|
|
489
489
|
async disconnectedCallback() {
|
|
490
490
|
if (await Promise.resolve(), this.isConnected) return;
|
|
491
491
|
this.__propertyChangedCallbacks.length = 0;
|
|
492
|
-
let
|
|
493
|
-
for (;
|
|
492
|
+
let i = null;
|
|
493
|
+
for (; i = this.__releaseCallbacks.pop(); ) i(this);
|
|
494
494
|
delete this.__initialized, this.__released = !0;
|
|
495
495
|
}
|
|
496
|
-
attributeChangedCallback(
|
|
497
|
-
if (this.__initialized && !this.__updating[
|
|
498
|
-
if (u == null && !this[
|
|
499
|
-
this[
|
|
496
|
+
attributeChangedCallback(i, s, u) {
|
|
497
|
+
if (this.__initialized && !this.__updating[i] && (i = this.lookupProp(i), i in t)) {
|
|
498
|
+
if (u == null && !this[i]) return;
|
|
499
|
+
this[i] = t[i].parse ? Rt(u) : u;
|
|
500
500
|
}
|
|
501
501
|
}
|
|
502
|
-
lookupProp(
|
|
502
|
+
lookupProp(i) {
|
|
503
503
|
if (t)
|
|
504
|
-
return n.find((
|
|
504
|
+
return n.find((s) => i === s || i === t[s].attribute);
|
|
505
505
|
}
|
|
506
506
|
get renderRoot() {
|
|
507
507
|
return this.shadowRoot || this.attachShadow({
|
|
508
508
|
mode: "open"
|
|
509
509
|
});
|
|
510
510
|
}
|
|
511
|
-
addReleaseCallback(
|
|
512
|
-
this.__releaseCallbacks.push(
|
|
511
|
+
addReleaseCallback(i) {
|
|
512
|
+
this.__releaseCallbacks.push(i);
|
|
513
513
|
}
|
|
514
|
-
addPropertyChangedCallback(
|
|
515
|
-
this.__propertyChangedCallbacks.push(
|
|
514
|
+
addPropertyChangedCallback(i) {
|
|
515
|
+
this.__propertyChangedCallbacks.push(i);
|
|
516
516
|
}
|
|
517
517
|
};
|
|
518
518
|
}
|
|
519
519
|
function Cn(e, t = {}, n = {}) {
|
|
520
520
|
const {
|
|
521
521
|
BaseElement: r = HTMLElement,
|
|
522
|
-
extension:
|
|
523
|
-
customElements:
|
|
522
|
+
extension: i,
|
|
523
|
+
customElements: s = window.customElements
|
|
524
524
|
} = n;
|
|
525
525
|
return (u) => {
|
|
526
526
|
if (!e) throw new Error("tag is required to register a Component");
|
|
527
|
-
let o =
|
|
528
|
-
return o ? (o.prototype.Component = u, o) : (o = vn(r,
|
|
527
|
+
let o = s.get(e);
|
|
528
|
+
return o ? (o.prototype.Component = u, o) : (o = vn(r, fn(t)), o.prototype.Component = u, o.prototype.registeredTag = e, s.define(e, o, i), o);
|
|
529
529
|
};
|
|
530
530
|
}
|
|
531
531
|
function wn(e) {
|
|
532
532
|
const t = Object.keys(e), n = {};
|
|
533
533
|
for (let r = 0; r < t.length; r++) {
|
|
534
|
-
const [
|
|
534
|
+
const [i, s] = w(e[t[r]]);
|
|
535
535
|
Object.defineProperty(n, t[r], {
|
|
536
|
-
get:
|
|
536
|
+
get: i,
|
|
537
537
|
set(u) {
|
|
538
|
-
|
|
538
|
+
s(() => u);
|
|
539
539
|
}
|
|
540
540
|
});
|
|
541
541
|
}
|
|
@@ -551,57 +551,57 @@ function An(e) {
|
|
|
551
551
|
function En(e) {
|
|
552
552
|
return (t, n) => {
|
|
553
553
|
const { element: r } = n;
|
|
554
|
-
return tn((
|
|
555
|
-
const
|
|
556
|
-
r.addPropertyChangedCallback((o,
|
|
557
|
-
r.renderRoot.textContent = "",
|
|
554
|
+
return tn((i) => {
|
|
555
|
+
const s = wn(t);
|
|
556
|
+
r.addPropertyChangedCallback((o, A) => s[o] = A), r.addReleaseCallback(() => {
|
|
557
|
+
r.renderRoot.textContent = "", i();
|
|
558
558
|
});
|
|
559
|
-
const u = e(
|
|
560
|
-
return
|
|
559
|
+
const u = e(s, n);
|
|
560
|
+
return d(r.renderRoot, u);
|
|
561
561
|
}, An(r));
|
|
562
562
|
};
|
|
563
563
|
}
|
|
564
|
-
function
|
|
564
|
+
function Dt(e, t, n) {
|
|
565
565
|
return arguments.length === 2 && (n = t, t = {}), Cn(e, t)(En(n));
|
|
566
566
|
}
|
|
567
|
-
var Fn = "٠١٢٣٤٥٦٧٨٩", yn = "۰۱۲۳۴۵۶۷۸۹", $n = "൦൧൨൩൪൫൬൭൮൯", kn = "೦೧೨೩೪೫೬೭೮೯", Bn = "໐໑໒໓໔໕໖໗໘໙", xn = "୦୧୨୩୪୫୬୭୮୯",
|
|
568
|
-
let
|
|
567
|
+
var Fn = "٠١٢٣٤٥٦٧٨٩", yn = "۰۱۲۳۴۵۶۷۸۹", $n = "൦൧൨൩൪൫൬൭൮൯", kn = "೦೧೨೩೪೫೬೭೮೯", Bn = "໐໑໒໓໔໕໖໗໘໙", xn = "୦୧୨୩୪୫୬୭୮୯", _n = "០១២៣៤៥៦៧៨៩", Sn = "߀߁߂߃߄߅߆߇߈߉", Tn = "੦੧੨੩੪੫੬੭੮੯", On = "૦૧૨૩૪૫૬૭૮૯", In = "०१२३४५६७८९", Pn = "၀၁၂၃၄၅၆၇၈၉", zn = "௦௧௨௩௪௫௬௭௮௯", Mn = "౦౧౨౩౪౫౬౭౮౯", Nn = "๐๑๒๓๔๕๖๗๘๙", jn = "༠༡༢༣༤༥༦༧༨༩", At = { ar: Fn, fa: yn, ml: $n, kn, lo: Bn, or: xn, kh: _n, nqo: Sn, pa: Tn, gu: On, hi: In, my: Pn, ta: zn, te: Mn, th: Nn, bo: jn }, Rn = ["ru"], Ln = ["id"], Un = ["id"], qn = ["ady-cyrl"], Jn = ["aeb-arab"], Vn = ["sq"], Gn = ["ru"], Kn = ["zh-hant"], Hn = ["es"], Wn = ["hi"], Zn = ["es"], Yn = ["ar"], Xn = ["ar"], Qn = ["ar"], er = ["es"], tr = ["fr"], nr = ["ru"], rr = ["fr", "es", "ru"], ir = ["hi"], sr = ["es"], ar = ["fa"], ur = ["ru"], or = ["id"], lr = ["de"], cr = ["bbc-latn"], dr = ["fa"], hr = ["fa"], fr = ["bho"], pr = ["en"], gr = ["id"], Dr = ["fr"], mr = ["bn"], br = ["fa"], vr = ["fr"], Cr = ["id"], wr = ["id"], Ar = ["ru"], Er = ["oc"], Fr = ["nan", "zh-hant"], yr = ["ru"], $r = ["it"], kr = ["crh-latn"], Br = ["sk"], xr = ["pl"], _r = ["ru"], Sr = ["hsb", "de"], Tr = ["ms"], Or = ["ne"], Ir = ["it"], Pr = ["it"], zr = ["es"], Mr = ["fr"], Nr = ["fi"], jr = ["fr"], Rr = ["fr"], Lr = ["de"], Ur = ["it"], qr = ["tr"], Jr = ["gan-hant", "zh-hant", "zh-hans"], Vr = ["fr"], Gr = ["pt"], Kr = ["fa"], Hr = ["es"], Wr = ["gom-deva"], Zr = ["id"], Yr = ["de"], Xr = ["es"], Qr = ["zh-hant"], ei = ["hif-latn"], ti = ["de"], ni = ["dsb", "de"], ri = ["fr"], ii = ["hy"], si = ["zh-cn", "zh-hans"], ai = ["ru"], ui = ["eo"], oi = ["ike-cans"], li = ["en"], ci = ["da"], di = ["id"], hi = ["kk-latn", "kk-cyrl"], fi = ["fr"], pi = ["kbd-cyrl"], gi = ["fr"], Di = ["ur"], mi = ["tr"], bi = ["my"], vi = ["kk-cyrl"], Ci = ["da"], wi = ["ru"], Ai = ["ru"], Ei = ["fi"], Fi = ["ks-arab"], yi = ["de"], $i = ["ku-latn"], ki = ["ru"], Bi = ["ru"], xi = ["es"], _i = ["de"], Si = ["ru"], Ti = ["ru", "az"], Oi = ["nl"], Ii = ["it"], Pi = ["et"], zi = ["fa"], Mi = ["it", "rm", "fur"], Ni = ["pms", "eml", "lij", "vec", "it"], ji = ["fr"], Ri = ["fa"], Li = ["lv"], Ui = ["fa"], qi = ["zh-hant"], Ji = ["tr"], Vi = ["id"], Gi = ["hi"], Ki = ["myv", "ru"], Hi = ["fr"], Wi = ["mrj", "ru"], Zi = ["id"], Yi = ["my"], Xi = ["ro"], Qi = ["mhr", "ru"], es = ["pt"], ts = ["mdf", "ru"], ns = ["fa"], rs = ["es"], is = ["cdo", "zh-hant"], ss = ["it"], as = ["nn"], us = ["de"], os = ["id"], ls = ["nb"], cs = ["fr"], ds = ["ca", "fr"], hs = ["fi"], fs = ["ru"], ps = ["fr"], gs = ["de"], Ds = ["de"], ms = ["de"], bs = ["en"], vs = ["it"], Cs = ["el"], ws = ["pt-br"], As = ["qug", "es"], Es = ["qu", "es"], Fs = ["it"], ys = ["ro"], $s = ["uk", "ru"], ks = ["ro"], Bs = ["ruq-latn", "ro"], xs = ["hi"], _s = ["ru"], Ss = ["it"], Ts = ["en"], Os = ["it"], Is = ["cbk", "fa"], Ps = ["fr"], zs = ["fr"], Ms = ["lt"], Ns = ["bs", "sr-el", "hr"], js = ["fr"], Rs = ["shy-latn"], Ls = ["cs"], Us = ["skr-arab"], qs = ["de"], Js = ["fi"], Vs = ["sr-ec"], Gs = ["nl"], Ks = ["de"], Hs = ["ru"], Ws = ["id"], Zs = ["pl"], Ys = ["zh-tw", "zh-hant", "zh-hans"], Xs = ["zh-tw", "zh-hant", "zh-hans"], Qs = ["kn"], ea = ["pt"], ta = ["tg-cyrl"], na = ["zh-tw", "zh-hant", "zh-hans"], ra = ["tt-cyrl", "ru"], ia = ["fr"], sa = ["ru"], aa = ["ru"], ua = ["ug-arab"], oa = ["it"], la = ["et"], ca = ["nl"], da = ["de"], ha = ["fi"], fa = ["et"], pa = ["fr"], ga = ["fr"], Da = ["zh-hans"], ma = ["ru"], ba = ["ka"], va = ["he"], Ca = ["zh-hans"], wa = ["nl"], Aa = ["kab"], Ea = ["zh-hans"], Ut = { ab: Rn, abs: Ln, ace: Un, ady: qn, aeb: Jn, "aeb-arab": ["ar"], aln: Vn, alt: Gn, ami: Kn, an: Hn, anp: Wn, arn: Zn, arq: Yn, ary: Xn, arz: Qn, ast: er, atj: tr, av: nr, avk: rr, awa: ir, ay: sr, azb: ar, ba: ur, ban: or, "ban-bali": ["ban"], bar: lr, bbc: cr, "bbc-latn": ["id"], bcc: dr, "be-tarask": ["be"], bgn: hr, bh: fr, bi: pr, bjn: gr, bm: Dr, bpy: mr, bqi: br, br: vr, btm: Cr, bug: wr, bxr: Ar, ca: Er, "cbk-zam": ["es"], cdo: Fr, ce: yr, co: $r, crh: kr, "crh-cyrl": ["ru"], cs: Br, csb: xr, cv: _r, "de-at": ["de"], "de-ch": ["de"], "de-formal": ["de"], dsb: Sr, dtp: Tr, dty: Or, egl: Ir, eml: Pr, "en-ca": ["en"], "en-gb": ["en"], "es-419": ["es"], "es-formal": ["es"], ext: zr, ff: Mr, fit: Nr, frc: jr, frp: Rr, frr: Lr, fur: Ur, gag: qr, gan: Jr, "gan-hans": ["zh-hans"], "gan-hant": ["zh-hant", "zh-hans"], gcr: Vr, gl: Gr, glk: Kr, gn: Hr, gom: Wr, "gom-deva": ["hi"], gor: Zr, gsw: Yr, guc: Xr, hak: Qr, hif: ei, hrx: ti, hsb: ni, ht: ri, "hu-formal": ["hu"], hyw: ii, ii: si, inh: ai, io: ui, iu: oi, jam: li, jut: ci, jv: di, kaa: hi, kab: fi, kbd: pi, kbp: gi, khw: Di, kiu: mi, kjp: bi, kk: vi, "kk-arab": ["kk-cyrl"], "kk-cn": ["kk-arab", "kk-cyrl"], "kk-kz": ["kk-cyrl"], "kk-latn": ["kk-cyrl"], "kk-tr": ["kk-latn", "kk-cyrl"], kl: Ci, "ko-kp": ["ko"], koi: wi, krc: Ai, krl: Ei, ks: Fi, ksh: yi, ku: $i, "ku-arab": ["ckb"], kum: ki, kv: Bi, lad: xi, lb: _i, lbe: Si, lez: Ti, li: Oi, lij: Ii, liv: Pi, lki: zi, lld: Mi, lmo: Ni, ln: ji, lrc: Ri, ltg: Li, luz: Ui, lzh: qi, lzz: Ji, mad: Vi, mai: Gi, "map-bms": ["jv", "id"], mdf: Ki, mg: Hi, mhr: Wi, min: Zi, mnw: Yi, mo: Xi, mrj: Qi, "ms-arab": ["ms"], mwl: es, myv: ts, mzn: ns, nah: rs, nan: is, nap: ss, nb: as, nds: us, "nds-nl": ["nl"], nia: os, "nl-informal": ["nl"], nn: ls, nrm: cs, oc: ds, olo: hs, os: fs, pcd: ps, pdc: gs, pdt: Ds, pfl: ms, pih: bs, pms: vs, pnt: Cs, pt: ws, "pt-br": ["pt"], qu: As, qug: Es, rgn: Fs, rmy: ys, "roa-tara": ["it"], rue: $s, rup: ks, ruq: Bs, "ruq-cyrl": ["mk"], "ruq-latn": ["ro"], sa: xs, sah: _s, scn: Ss, sco: Ts, sdc: Os, sdh: Is, ses: Ps, sg: zs, sgs: Ms, sh: Ns, shi: js, shy: Rs, "shy-latn": ["fr"], sk: Ls, skr: Us, "skr-arab": ["ur", "pnb"], sli: qs, smn: Js, sr: Vs, srn: Gs, stq: Ks, sty: Hs, su: Ws, szl: Zs, szy: Ys, tay: Xs, tcy: Qs, tet: ea, tg: ta, trv: na, tt: ra, "tt-cyrl": ["ru"], ty: ia, tyv: sa, udm: aa, ug: ua, vec: oa, vep: la, vls: ca, vmf: da, vot: ha, vro: fa, wa: pa, wo: ga, wuu: Da, xal: ma, xmf: ba, yi: va, za: Ca, zea: wa, zgh: Aa, zh: Ea, "zh-cn": ["zh-hans"], "zh-hant": ["zh-hans"], "zh-hk": ["zh-hant", "zh-hans"], "zh-mo": ["zh-hk", "zh-hant", "zh-hans"], "zh-my": ["zh-sg", "zh-hans"], "zh-sg": ["zh-hans"], "zh-tw": ["zh-hant", "zh-hans"] };
|
|
568
|
+
let ve = class {
|
|
569
569
|
constructor(e) {
|
|
570
570
|
this.locale = e;
|
|
571
571
|
}
|
|
572
572
|
convertPlural(e, t) {
|
|
573
573
|
const n = /\d+=/i;
|
|
574
574
|
if (!t || t.length === 0) return "";
|
|
575
|
-
for (let
|
|
576
|
-
const
|
|
577
|
-
if (n.test(
|
|
578
|
-
if (parseInt(
|
|
579
|
-
t[
|
|
575
|
+
for (let i = 0; i < t.length; i++) {
|
|
576
|
+
const s = t[i];
|
|
577
|
+
if (n.test(s)) {
|
|
578
|
+
if (parseInt(s.slice(0, s.indexOf("=")), 10) === e) return s.slice(s.indexOf("=") + 1);
|
|
579
|
+
t[i] = void 0;
|
|
580
580
|
}
|
|
581
581
|
}
|
|
582
|
-
t = t.filter((
|
|
582
|
+
t = t.filter((i) => !!i);
|
|
583
583
|
let r = this.getPluralForm(e, this.locale);
|
|
584
584
|
return r = Math.min(r, t.length - 1), t[r];
|
|
585
585
|
}
|
|
586
586
|
getPluralForm(e, t) {
|
|
587
|
-
const n = ["zero", "one", "two", "few", "many", "other"], r = new Intl.PluralRules(t),
|
|
588
|
-
return n.filter((u) =>
|
|
587
|
+
const n = ["zero", "one", "two", "few", "many", "other"], r = new Intl.PluralRules(t), i = r.resolvedOptions().pluralCategories, s = r.select(e);
|
|
588
|
+
return n.filter((u) => i.includes(u)).indexOf(s);
|
|
589
589
|
}
|
|
590
590
|
convertNumber(e, t = !1) {
|
|
591
591
|
let n = this.digitTransformTable(this.locale), r = "";
|
|
592
592
|
if (t) {
|
|
593
593
|
if (parseFloat(e, 10) === e || !n) return e;
|
|
594
|
-
const
|
|
595
|
-
for (const u in n)
|
|
596
|
-
n =
|
|
597
|
-
const
|
|
598
|
-
for (let u = 0; u <
|
|
594
|
+
const i = [];
|
|
595
|
+
for (const u in n) i[n[u]] = u;
|
|
596
|
+
n = i;
|
|
597
|
+
const s = String(e);
|
|
598
|
+
for (let u = 0; u < s.length; u++) r += n[s[u]] || s[u];
|
|
599
599
|
return parseFloat(r, 10);
|
|
600
600
|
}
|
|
601
601
|
if (Intl.NumberFormat) {
|
|
602
|
-
let
|
|
603
|
-
const
|
|
604
|
-
return Intl.NumberFormat.supportedLocalesOf(this.locale).length ?
|
|
602
|
+
let i;
|
|
603
|
+
const s = [...Ut[this.locale] || [], "en"];
|
|
604
|
+
return Intl.NumberFormat.supportedLocalesOf(this.locale).length ? i = [this.locale] : i = s, r = new Intl.NumberFormat(i).format(e), r === "NaN" && (r = e), r;
|
|
605
605
|
}
|
|
606
606
|
}
|
|
607
607
|
convertGrammar(e) {
|
|
@@ -615,7 +615,7 @@ let De = class {
|
|
|
615
615
|
digitTransformTable(e) {
|
|
616
616
|
return At[e] ? At[e].split("") : !1;
|
|
617
617
|
}
|
|
618
|
-
}, Fa = class extends
|
|
618
|
+
}, Fa = class extends ve {
|
|
619
619
|
convertGrammar(e, t) {
|
|
620
620
|
switch (t) {
|
|
621
621
|
case "prefixed":
|
|
@@ -624,7 +624,7 @@ let De = class {
|
|
|
624
624
|
}
|
|
625
625
|
return e;
|
|
626
626
|
}
|
|
627
|
-
}, ya = class extends
|
|
627
|
+
}, ya = class extends ve {
|
|
628
628
|
convertGrammar(t, n) {
|
|
629
629
|
switch (n) {
|
|
630
630
|
case "instrumental":
|
|
@@ -636,7 +636,7 @@ let De = class {
|
|
|
636
636
|
}
|
|
637
637
|
return t;
|
|
638
638
|
}
|
|
639
|
-
}, $a = class extends
|
|
639
|
+
}, $a = class extends ve {
|
|
640
640
|
convertGrammar(e, t) {
|
|
641
641
|
switch (t) {
|
|
642
642
|
case "instrumental":
|
|
@@ -648,7 +648,7 @@ let De = class {
|
|
|
648
648
|
}
|
|
649
649
|
return e;
|
|
650
650
|
}
|
|
651
|
-
}, ka = class extends
|
|
651
|
+
}, ka = class extends ve {
|
|
652
652
|
convertGrammar(e, t) {
|
|
653
653
|
switch (t) {
|
|
654
654
|
case "instrumental":
|
|
@@ -660,7 +660,7 @@ let De = class {
|
|
|
660
660
|
}
|
|
661
661
|
return e;
|
|
662
662
|
}
|
|
663
|
-
}, Ba = class extends
|
|
663
|
+
}, Ba = class extends ve {
|
|
664
664
|
convertGrammar(e, t) {
|
|
665
665
|
let n = e.match(/[aou][^äöy]*$/i);
|
|
666
666
|
const r = e;
|
|
@@ -686,12 +686,12 @@ let De = class {
|
|
|
686
686
|
}
|
|
687
687
|
return e;
|
|
688
688
|
}
|
|
689
|
-
}, xa = class extends
|
|
689
|
+
}, xa = class extends ve {
|
|
690
690
|
convertGrammar(e, t) {
|
|
691
691
|
return t === "genitive" && (e.slice(-1) === "ь" ? e = e.slice(0, -1) + "я" : e.slice(-2) === "ия" ? e = e.slice(0, -2) + "ии" : e.slice(-2) === "ка" ? e = e.slice(0, -2) + "ки" : e.slice(-2) === "ти" ? e = e.slice(0, -2) + "тей" : e.slice(-2) === "ды" ? e = e.slice(0, -2) + "дов" : e.slice(-3) === "ник" && (e = e.slice(0, -3) + "ника")), e;
|
|
692
692
|
}
|
|
693
693
|
};
|
|
694
|
-
class
|
|
694
|
+
class _a extends ve {
|
|
695
695
|
convertGrammar(t, n) {
|
|
696
696
|
switch (n) {
|
|
697
697
|
case "mestnik":
|
|
@@ -704,7 +704,7 @@ class Sa extends De {
|
|
|
704
704
|
return t;
|
|
705
705
|
}
|
|
706
706
|
}
|
|
707
|
-
let
|
|
707
|
+
let Sa = class extends ve {
|
|
708
708
|
convertGrammar(e, t) {
|
|
709
709
|
switch (t) {
|
|
710
710
|
case "genitive":
|
|
@@ -720,12 +720,12 @@ let _a = class extends De {
|
|
|
720
720
|
return e;
|
|
721
721
|
}
|
|
722
722
|
};
|
|
723
|
-
class Ta extends
|
|
723
|
+
class Ta extends ve {
|
|
724
724
|
convertGrammar(t, n) {
|
|
725
725
|
return n === "genitive" && (t.slice(-1) === "ա" ? t = t.slice(0, -1) + "այի" : t.slice(-1) === "ո" ? t = t.slice(0, -1) + "ոյի" : t.slice(-4) === "գիրք" ? t = t.slice(0, -4) + "գրքի" : t = t + "ի"), t;
|
|
726
726
|
}
|
|
727
727
|
}
|
|
728
|
-
let Oa = class extends
|
|
728
|
+
let Oa = class extends ve {
|
|
729
729
|
convertGrammar(e, t) {
|
|
730
730
|
if (t === "ainmlae") switch (e) {
|
|
731
731
|
case "an Domhnach":
|
|
@@ -752,7 +752,7 @@ let Oa = class extends De {
|
|
|
752
752
|
}
|
|
753
753
|
return e;
|
|
754
754
|
}
|
|
755
|
-
}, Ia = class extends
|
|
755
|
+
}, Ia = class extends ve {
|
|
756
756
|
convertGrammar(e, t) {
|
|
757
757
|
switch (t) {
|
|
758
758
|
case "rol":
|
|
@@ -767,36 +767,36 @@ let Oa = class extends De {
|
|
|
767
767
|
}
|
|
768
768
|
return e;
|
|
769
769
|
}
|
|
770
|
-
}, Pa = class extends
|
|
770
|
+
}, Pa = class extends ve {
|
|
771
771
|
convertGrammar(e, t) {
|
|
772
|
-
let n, r,
|
|
773
|
-
switch (n = "мæ", r = "",
|
|
772
|
+
let n, r, i, s;
|
|
773
|
+
switch (n = "мæ", r = "", i = "", s = "", e.match(/тæ$/i) ? (e = e.slice(0, -1), n = "æм") : e.match(/[аæеёиоыэюя]$/i) ? r = "й" : e.match(/у$/i) ? e.slice(-2, -1).match(/[аæеёиоыэюя]$/i) || (r = "й") : e.match(/[бвгджзйклмнопрстфхцчшщьъ]$/i) || (i = "-"), t) {
|
|
774
774
|
case "genitive":
|
|
775
|
-
|
|
775
|
+
s = i + r + "ы";
|
|
776
776
|
break;
|
|
777
777
|
case "dative":
|
|
778
|
-
|
|
778
|
+
s = i + r + "æн";
|
|
779
779
|
break;
|
|
780
780
|
case "allative":
|
|
781
|
-
|
|
781
|
+
s = i + n;
|
|
782
782
|
break;
|
|
783
783
|
case "ablative":
|
|
784
|
-
r === "й" ?
|
|
784
|
+
r === "й" ? s = i + r + "æ" : s = i + r + "æй";
|
|
785
785
|
break;
|
|
786
786
|
case "superessive":
|
|
787
|
-
|
|
787
|
+
s = i + r + "ыл";
|
|
788
788
|
break;
|
|
789
789
|
case "equative":
|
|
790
|
-
|
|
790
|
+
s = i + r + "ау";
|
|
791
791
|
break;
|
|
792
792
|
case "comitative":
|
|
793
|
-
|
|
793
|
+
s = i + "имæ";
|
|
794
794
|
break;
|
|
795
795
|
}
|
|
796
|
-
return e +
|
|
796
|
+
return e + s;
|
|
797
797
|
}
|
|
798
798
|
};
|
|
799
|
-
class za extends
|
|
799
|
+
class za extends ve {
|
|
800
800
|
convertGrammar(t, n) {
|
|
801
801
|
switch (n) {
|
|
802
802
|
case "genitive":
|
|
@@ -809,22 +809,22 @@ class za extends De {
|
|
|
809
809
|
return t;
|
|
810
810
|
}
|
|
811
811
|
}
|
|
812
|
-
var Et = { bs: ya, default:
|
|
813
|
-
const
|
|
814
|
-
let
|
|
812
|
+
var Et = { bs: ya, default: ve, dsb: $a, fi: Ba, ga: Oa, he: Fa, hsb: ka, hu: Ia, hy: Ta, la: Sa, os: Pa, ru: xa, sl: _a, uk: za };
|
|
813
|
+
const Ma = new RegExp("(?:([A-Za-zªµºÀ-ÖØ-öø-ʸʻ-ˁːˑˠ-ˤˮͰ-ͳͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-҂Ҋ-ԯԱ-Ֆՙ-՟ա-և։ः-हऻऽ-ीॉ-ौॎ-ॐक़-ॡ।-ঀংঃঅ-ঌএঐও-নপ-রলশ-হঽ-ীেৈোৌৎৗড়ঢ়য়-ৡ০-ৱ৴-৺ਃਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਾ-ੀਖ਼-ੜਫ਼੦-੯ੲ-ੴઃઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽ-ીૉોૌૐૠૡ૦-૰ૹଂଃଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽାୀେୈୋୌୗଡ଼ଢ଼ୟ-ୡ୦-୷ஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹாிுூெ-ைொ-ௌௐௗ௦-௲ఁ-ఃఅ-ఌఎ-ఐఒ-నప-హఽు-ౄౘ-ౚౠౡ౦-౯౿ಂಃಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽ-ೄೆ-ೈೊೋೕೖೞೠೡ೦-೯ೱೲംഃഅ-ഌഎ-ഐഒ-ഺഽ-ീെ-ൈൊ-ൌൎൗൟ-ൡ൦-൵൹-ൿංඃඅ-ඖක-නඳ-රලව-ෆා-ෑෘ-ෟ෦-෯ෲ-෴ก-ะาำเ-ๆ๏-๛ກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆ໐-໙ໜ-ໟༀ-༗༚-༴༶༸༾-ཇཉ-ཬཿ྅ྈ-ྌ྾-࿅࿇-࿌࿎-࿚က-ာေးျြဿ-ၗၚ-ၝၡ-ၰၵ-ႁႃႄႇ-ႌႎ-ႜ႞-ჅჇჍა-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚ፠-፼ᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙿᚁ-ᚚᚠ-ᛸᜀ-ᜌᜎ-ᜑᜠ-ᜱ᜵᜶ᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳាើ-ៅះៈ។-៚ៜ០-៩᠐-᠙ᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᤣ-ᤦᤩ-ᤫᤰᤱᤳ-ᤸ᥆-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉ᧐-᧚ᨀ-ᨖᨙᨚ᨞-ᩕᩗᩡᩣᩤᩭ-ᩲ᪀-᪉᪐-᪙᪠-᪭ᬄ-ᬳᬵᬻᬽ-ᭁᭃ-ᭋ᭐-᭪᭴-᭼ᮂ-ᮡᮦᮧ᮪ᮮ-ᯥᯧᯪ-ᯬᯮ᯲᯳᯼-ᰫᰴᰵ᰻-᱉ᱍ-᱿᳀-᳇᳓᳡ᳩ-ᳬᳮ-ᳳᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎ⅏Ⅰ-ↈ⌶-⍺⎕⒜-ⓩ⚬⠀-⣿Ⰰ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯ⵰ⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〮〯〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎ㆐-ㆺㇰ-㈜㈠-㉏㉠-㉻㉿-㊰㋀-㋋㋐-㋾㌀-㍶㍻-㏝㏠-㏾㐀-䶵一-鿕ꀀ-ꒌꓐ-ꘌꘐ-ꘫꙀ-ꙮꚀ-ꚝꚠ-ꛯ꛲-꛷Ꜣ-ꞇ꞉-ꞭꞰ-ꞷꟷ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠤꠧ꠰-꠷ꡀ-ꡳꢀ-ꣃ꣎-꣙ꣲ-ꣽ꤀-ꤥ꤮-ꥆꥒ꥓꥟-ꥼꦃ-ꦲꦴꦵꦺꦻꦽ-꧍ꧏ-꧙꧞-ꧤꧦ-ꧾꨀ-ꨨꨯꨰꨳꨴꩀ-ꩂꩄ-ꩋꩍ꩐-꩙꩜-ꩻꩽ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫫꫮ-ꫵꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭥꭰ-ꯤꯦꯧꯩ-꯬꯰-꯹가-힣ힰ-ퟆퟋ-ퟻ-舘並-龎ff-stﬓ-ﬗA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ]|\uD800[\uDC00-\uDC0B]|\uD800[\uDC0D-\uDC26]|\uD800[\uDC28-\uDC3A]|𐀼|𐀽|\uD800[\uDC3F-\uDC4D]|\uD800[\uDC50-\uDC5D]|\uD800[\uDC80-\uDCFA]|𐄀|𐄂|\uD800[\uDD07-\uDD33]|\uD800[\uDD37-\uDD3F]|\uD800[\uDDD0-\uDDFC]|\uD800[\uDE80-\uDE9C]|\uD800[\uDEA0-\uDED0]|\uD800[\uDF00-\uDF23]|\uD800[\uDF30-\uDF4A]|\uD800[\uDF50-\uDF75]|\uD800[\uDF80-\uDF9D]|\uD800[\uDF9F-\uDFC3]|\uD800[\uDFC8-\uDFD5]|\uD801[\uDC00-\uDC9D]|\uD801[\uDCA0-\uDCA9]|\uD801[\uDD00-\uDD27]|\uD801[\uDD30-\uDD63]|𐕯|\uD801[\uDE00-\uDF36]|\uD801[\uDF40-\uDF55]|\uD801[\uDF60-\uDF67]|𑀀|\uD804[\uDC02-\uDC37]|\uD804[\uDC47-\uDC4D]|\uD804[\uDC66-\uDC6F]|\uD804[\uDC82-\uDCB2]|𑂷|𑂸|\uD804[\uDCBB-\uDCC1]|\uD804[\uDCD0-\uDCE8]|\uD804[\uDCF0-\uDCF9]|\uD804[\uDD03-\uDD26]|𑄬|\uD804[\uDD36-\uDD43]|\uD804[\uDD50-\uDD72]|\uD804[\uDD74-\uDD76]|\uD804[\uDD82-\uDDB5]|\uD804[\uDDBF-\uDDC9]|𑇍|\uD804[\uDDD0-\uDDDF]|\uD804[\uDDE1-\uDDF4]|\uD804[\uDE00-\uDE11]|\uD804[\uDE13-\uDE2E]|𑈲|𑈳|𑈵|\uD804[\uDE38-\uDE3D]|\uD804[\uDE80-\uDE86]|𑊈|\uD804[\uDE8A-\uDE8D]|\uD804[\uDE8F-\uDE9D]|\uD804[\uDE9F-\uDEA9]|\uD804[\uDEB0-\uDEDE]|\uD804[\uDEE0-\uDEE2]|\uD804[\uDEF0-\uDEF9]|𑌂|𑌃|\uD804[\uDF05-\uDF0C]|𑌏|𑌐|\uD804[\uDF13-\uDF28]|\uD804[\uDF2A-\uDF30]|𑌲|𑌳|\uD804[\uDF35-\uDF39]|\uD804[\uDF3D-\uDF3F]|\uD804[\uDF41-\uDF44]|𑍇|𑍈|\uD804[\uDF4B-\uDF4D]|𑍐|𑍗|\uD804[\uDF5D-\uDF63]|\uD805[\uDC80-\uDCB2]|𑒹|\uD805[\uDCBB-\uDCBE]|𑓁|\uD805[\uDCC4-\uDCC7]|\uD805[\uDCD0-\uDCD9]|\uD805[\uDD80-\uDDB1]|\uD805[\uDDB8-\uDDBB]|𑖾|\uD805[\uDDC1-\uDDDB]|\uD805[\uDE00-\uDE32]|𑘻|𑘼|𑘾|\uD805[\uDE41-\uDE44]|\uD805[\uDE50-\uDE59]|\uD805[\uDE80-\uDEAA]|𑚬|𑚮|𑚯|𑚶|\uD805[\uDEC0-\uDEC9]|\uD805[\uDF00-\uDF19]|𑜠|𑜡|𑜦|\uD805[\uDF30-\uDF3F]|\uD806[\uDCA0-\uDCF2]|𑣿|\uD806[\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E]|\uD809[\uDC70-\uDC74]|\uD809[\uDC80-\uDD43]|\uD80C[\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38]|\uD81A[\uDE40-\uDE5E]|\uD81A[\uDE60-\uDE69]|𖩮|𖩯|\uD81A[\uDED0-\uDEED]|𖫵|\uD81A[\uDF00-\uDF2F]|\uD81A[\uDF37-\uDF45]|\uD81A[\uDF50-\uDF59]|\uD81A[\uDF5B-\uDF61]|\uD81A[\uDF63-\uDF77]|\uD81A[\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44]|\uD81B[\uDF50-\uDF7E]|\uD81B[\uDF93-\uDF9F]|𛀀|𛀁|\uD82F[\uDC00-\uDC6A]|\uD82F[\uDC70-\uDC7C]|\uD82F[\uDC80-\uDC88]|\uD82F[\uDC90-\uDC99]|𛲜|𛲟|\uD834[\uDC00-\uDCF5]|\uD834[\uDD00-\uDD26]|\uD834[\uDD29-\uDD66]|\uD834[\uDD6A-\uDD72]|𝆃|𝆄|\uD834[\uDD8C-\uDDA9]|\uD834[\uDDAE-\uDDE8]|\uD834[\uDF60-\uDF71]|\uD835[\uDC00-\uDC54]|\uD835[\uDC56-\uDC9C]|𝒞|𝒟|𝒢|𝒥|𝒦|\uD835[\uDCA9-\uDCAC]|\uD835[\uDCAE-\uDCB9]|𝒻|\uD835[\uDCBD-\uDCC3]|\uD835[\uDCC5-\uDD05]|\uD835[\uDD07-\uDD0A]|\uD835[\uDD0D-\uDD14]|\uD835[\uDD16-\uDD1C]|\uD835[\uDD1E-\uDD39]|\uD835[\uDD3B-\uDD3E]|\uD835[\uDD40-\uDD44]|𝕆|\uD835[\uDD4A-\uDD50]|\uD835[\uDD52-\uDEA5]|\uD835[\uDEA8-\uDEDA]|\uD835[\uDEDC-\uDF14]|\uD835[\uDF16-\uDF4E]|\uD835[\uDF50-\uDF88]|\uD835[\uDF8A-\uDFC2]|\uD835[\uDFC4-\uDFCB]|\uD836[\uDC00-\uDDFF]|\uD836[\uDE37-\uDE3A]|\uD836[\uDE6D-\uDE74]|\uD836[\uDE76-\uDE83]|\uD836[\uDE85-\uDE8B]|\uD83C[\uDD10-\uDD2E]|\uD83C[\uDD30-\uDD69]|\uD83C[\uDD70-\uDD9A]|\uD83C[\uDDE6-\uDE02]|\uD83C[\uDE10-\uDE3A]|\uD83C[\uDE40-\uDE48]|🉐|🉑|[\uD840-\uD868][\uDC00-\uDFFF]|\uD869[\uDC00-\uDED6]|\uD869[\uDF00-\uDFFF]|[\uD86A-\uD86C][\uDC00-\uDFFF]|\uD86D[\uDC00-\uDF34]|\uD86D[\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D]|\uD86E[\uDC20-\uDFFF]|[\uD86F-\uD872][\uDC00-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]|[\uDB80-\uDBBE][\uDC00-\uDFFF]|\uDBBF[\uDC00-\uDFFD]|[\uDBC0-\uDBFE][\uDC00-\uDFFF]|\uDBFF[\uDC00-\uDFFD])|([־׀׃׆-߀-ߪߴߵߺ-ࠕࠚࠤࠨ-ࡘ-࢟יִײַ-ﬨשׁ-ﭏ؈؋؍؛-ي٭-ٯٱ-ەۥۦۮۯۺ-ܐܒ-ܯ-ޥޱ-ࢠ-ﭐ-ﴽ﵀-﷏ﷰ-﷼﷾﷿ﹰ-]|\uD802[\uDC00-\uDD1E]|\uD802[\uDD20-\uDE00]||\uD802[\uDE07-\uDE0B]|\uD802[\uDE10-\uDE37]|\uD802[\uDE3B-\uDE3E]|\uD802[\uDE40-\uDEE4]|\uD802[\uDEE7-\uDF38]|\uD802[\uDF40-\uDFFF]|\uD803[\uDC00-\uDE5F]|\uD803[\uDE7F-\uDFFF]|\uD83A[\uDC00-\uDCCF]|\uD83A[\uDCD7-\uDFFF]|\uD83B[\uDC00-\uDDFF]|\uD83B[\uDF00-\uDFFF]|\uD83B[\uDF00-\uDFFF]|\uD83B[\uDF00-\uDFFF]|\uD83B[\uDF00-\uDFFF]|\uD83B[\uDF00-\uDFFF]|\uD83B[\uDF00-\uDFFF]|\uD83B[\uDF00-\uDFFF]|\uD83B[\uDF00-\uDFFF]|\uD83B[\uDF00-\uDFFF]|\uD83B[\uDF00-\uDFFF]|\uD83B[\uDF00-\uDFFF]|\uD83B[\uDF00-\uDFFF]|\uD83B[\uDF00-\uDFFF]|\uD83B[\uDE00-\uDEEF]|\uD83B[\uDEF2-\uDEFF]))");
|
|
814
|
+
let qt = class {
|
|
815
815
|
constructor(e) {
|
|
816
|
-
this.locale =
|
|
816
|
+
this.locale = Ue(e), this.language = new (Et[this.locale] || Et.default)(this.locale);
|
|
817
817
|
}
|
|
818
818
|
emit(e, t) {
|
|
819
|
-
let n, r,
|
|
819
|
+
let n, r, i;
|
|
820
820
|
switch (typeof e) {
|
|
821
821
|
case "string":
|
|
822
822
|
case "number":
|
|
823
823
|
n = e;
|
|
824
824
|
break;
|
|
825
825
|
case "object":
|
|
826
|
-
if (r = e.slice(1).map((
|
|
827
|
-
else throw new Error('unknown operation "' +
|
|
826
|
+
if (r = e.slice(1).map((s) => this.emit(s, t)), i = e[0].toLowerCase(), typeof this[i] == "function") n = this[i](r, t);
|
|
827
|
+
else throw new Error('unknown operation "' + i + '"');
|
|
828
828
|
break;
|
|
829
829
|
case "undefined":
|
|
830
830
|
n = "";
|
|
@@ -867,7 +867,7 @@ let Ut = class {
|
|
|
867
867
|
return `<a href="${e[0]}">${e[1]}</a>`;
|
|
868
868
|
}
|
|
869
869
|
bidi(e) {
|
|
870
|
-
const t =
|
|
870
|
+
const t = Na(e[0]);
|
|
871
871
|
return t === "ltr" ? "" + e[0] + "" : t === "rtl" ? "" + e[0] + "" : e[0];
|
|
872
872
|
}
|
|
873
873
|
formatnum(e) {
|
|
@@ -881,18 +881,18 @@ let Ut = class {
|
|
|
881
881
|
}
|
|
882
882
|
htmlelement(e) {
|
|
883
883
|
const t = e.shift(), n = e.shift();
|
|
884
|
-
let r = e,
|
|
885
|
-
for (const u in n)
|
|
884
|
+
let r = e, i = "";
|
|
885
|
+
for (const u in n) i += ` ${u}="${n[u]}"`;
|
|
886
886
|
Array.isArray(r) || (r = [r]);
|
|
887
|
-
const
|
|
888
|
-
return `<${t}${
|
|
887
|
+
const s = r.join("");
|
|
888
|
+
return `<${t}${i}>${s}</${t}>`;
|
|
889
889
|
}
|
|
890
890
|
};
|
|
891
|
-
function
|
|
891
|
+
function Ue(e) {
|
|
892
892
|
return typeof e == "string" ? e.toLowerCase() : e;
|
|
893
893
|
}
|
|
894
|
-
function
|
|
895
|
-
const t = e.match(
|
|
894
|
+
function Na(e) {
|
|
895
|
+
const t = e.match(Ma);
|
|
896
896
|
return t ? t[2] === void 0 ? "ltr" : "rtl" : null;
|
|
897
897
|
}
|
|
898
898
|
function ja(e, { wikilinks: t = !1 } = {}) {
|
|
@@ -900,34 +900,34 @@ function ja(e, { wikilinks: t = !1 } = {}) {
|
|
|
900
900
|
function r(c) {
|
|
901
901
|
return () => {
|
|
902
902
|
for (let m = 0; m < c.length; m++) {
|
|
903
|
-
const
|
|
904
|
-
if (
|
|
903
|
+
const I = c[m]();
|
|
904
|
+
if (I !== null) return I;
|
|
905
905
|
}
|
|
906
906
|
return null;
|
|
907
907
|
};
|
|
908
908
|
}
|
|
909
|
-
function
|
|
910
|
-
const m = n,
|
|
911
|
-
for (let
|
|
912
|
-
const
|
|
913
|
-
if (
|
|
914
|
-
|
|
909
|
+
function i(c) {
|
|
910
|
+
const m = n, I = [];
|
|
911
|
+
for (let _ = 0; _ < c.length; _++) {
|
|
912
|
+
const ne = c[_]();
|
|
913
|
+
if (ne === null) return n = m, null;
|
|
914
|
+
I.push(ne);
|
|
915
915
|
}
|
|
916
|
-
return
|
|
916
|
+
return I;
|
|
917
917
|
}
|
|
918
|
-
function
|
|
918
|
+
function s(c, m) {
|
|
919
919
|
return () => {
|
|
920
|
-
const
|
|
921
|
-
let
|
|
922
|
-
for (;
|
|
923
|
-
return
|
|
920
|
+
const I = n, _ = [];
|
|
921
|
+
let ne = m();
|
|
922
|
+
for (; ne !== null; ) _.push(ne), ne = m();
|
|
923
|
+
return _.length < c ? (n = I, null) : _;
|
|
924
924
|
};
|
|
925
925
|
}
|
|
926
926
|
function u(c) {
|
|
927
927
|
const m = c.length;
|
|
928
928
|
return () => {
|
|
929
|
-
let
|
|
930
|
-
return e.slice(n, n + m) === c && (
|
|
929
|
+
let I = null;
|
|
930
|
+
return e.slice(n, n + m) === c && (I = c, n += m), I;
|
|
931
931
|
};
|
|
932
932
|
}
|
|
933
933
|
function o(c) {
|
|
@@ -936,142 +936,142 @@ function ja(e, { wikilinks: t = !1 } = {}) {
|
|
|
936
936
|
return m === null ? null : (n += m[0].length, m[0]);
|
|
937
937
|
};
|
|
938
938
|
}
|
|
939
|
-
const
|
|
940
|
-
function
|
|
939
|
+
const A = o(/^\s+/), k = u("|"), g = u(":"), q = u("\\"), Ae = o(/^./), Ce = u("$"), $e = o(/^\d+/), S = u('"'), re = u("'"), ue = o(t ? /^[^{}[\]$<\\]/ : /^[^{}$<\\]/), ke = o(t ? /^[^{}[\]$\\|]/ : /^[^{}$\\|]/), Fe = o(t ? /^[^{}[\]$\s]/ : /^[^{}$\s]/);
|
|
940
|
+
function Be(c, m) {
|
|
941
941
|
return () => {
|
|
942
|
-
const
|
|
943
|
-
return
|
|
942
|
+
const I = c();
|
|
943
|
+
return I === null ? null : m(I);
|
|
944
944
|
};
|
|
945
945
|
}
|
|
946
|
-
function
|
|
947
|
-
const c =
|
|
946
|
+
function B() {
|
|
947
|
+
const c = s(1, ie)();
|
|
948
948
|
return c === null ? null : c.join("");
|
|
949
949
|
}
|
|
950
|
-
function
|
|
951
|
-
const c =
|
|
950
|
+
function oe() {
|
|
951
|
+
const c = s(1, se)();
|
|
952
952
|
return c === null ? null : c.join("");
|
|
953
953
|
}
|
|
954
|
-
const
|
|
955
|
-
function
|
|
956
|
-
const c =
|
|
954
|
+
const H = r([Y, Fe]);
|
|
955
|
+
function De() {
|
|
956
|
+
const c = s(1, H)();
|
|
957
957
|
return c === null ? null : c.join("");
|
|
958
958
|
}
|
|
959
|
-
function
|
|
960
|
-
const c =
|
|
959
|
+
function Y() {
|
|
960
|
+
const c = i([q, Ae]);
|
|
961
961
|
return c === null ? null : c[1];
|
|
962
962
|
}
|
|
963
|
-
const
|
|
964
|
-
function
|
|
965
|
-
const c =
|
|
963
|
+
const ie = r([Y, ke]), se = r([Y, ue]);
|
|
964
|
+
function le() {
|
|
965
|
+
const c = i([Ce, $e]);
|
|
966
966
|
return c === null ? null : ["REPLACE", parseInt(c[1], 10) - 1];
|
|
967
967
|
}
|
|
968
|
-
const
|
|
968
|
+
const me = Be(o(/^[ !"$&'()*,./0-9;=?@A-Z^_`a-z~\x80-\xFF+-]+/), function(c) {
|
|
969
969
|
return c.toString();
|
|
970
970
|
});
|
|
971
971
|
function b() {
|
|
972
|
-
const c =
|
|
972
|
+
const c = i([k, s(0, W)]);
|
|
973
973
|
if (c === null) return null;
|
|
974
974
|
const m = c[1];
|
|
975
975
|
return m.length > 1 ? ["CONCAT"].concat(m) : m[0];
|
|
976
976
|
}
|
|
977
|
-
function
|
|
978
|
-
const c =
|
|
977
|
+
function $() {
|
|
978
|
+
const c = i([me, g, le]);
|
|
979
979
|
return c === null ? null : [c[0], c[2]];
|
|
980
980
|
}
|
|
981
|
-
function
|
|
982
|
-
const c =
|
|
981
|
+
function O() {
|
|
982
|
+
const c = i([me, g, W]);
|
|
983
983
|
return c === null ? null : [c[0], c[2]];
|
|
984
984
|
}
|
|
985
|
-
function
|
|
986
|
-
const c =
|
|
985
|
+
function z() {
|
|
986
|
+
const c = i([me, g]);
|
|
987
987
|
return c === null ? null : [c[0], ""];
|
|
988
988
|
}
|
|
989
|
-
const
|
|
990
|
-
const c =
|
|
989
|
+
const te = r([function() {
|
|
990
|
+
const c = i([r([$, O, z]), s(0, b)]);
|
|
991
991
|
return c === null ? null : c[0].concat(c[1]);
|
|
992
992
|
}, function() {
|
|
993
|
-
const c =
|
|
993
|
+
const c = i([me, s(0, b)]);
|
|
994
994
|
return c === null ? null : [c[0]].concat(c[1]);
|
|
995
|
-
}]),
|
|
996
|
-
function
|
|
997
|
-
const c =
|
|
995
|
+
}]), Se = u("{{"), Te = u("}}"), Me = u("[["), Ne = u("]]"), je = u("["), Re = u("]");
|
|
996
|
+
function Ee() {
|
|
997
|
+
const c = i([Se, te, Te]);
|
|
998
998
|
return c === null ? null : c[1];
|
|
999
999
|
}
|
|
1000
|
-
function
|
|
1001
|
-
const c =
|
|
1000
|
+
function Oe() {
|
|
1001
|
+
const c = i([s(1, W), k, s(1, G)]);
|
|
1002
1002
|
return c === null ? null : [["CONCAT"].concat(c[0]), ["CONCAT"].concat(c[2])];
|
|
1003
1003
|
}
|
|
1004
|
-
function
|
|
1005
|
-
const c =
|
|
1004
|
+
function Ie() {
|
|
1005
|
+
const c = i([s(1, W)]);
|
|
1006
1006
|
return c === null ? null : [["CONCAT"].concat(c[0])];
|
|
1007
1007
|
}
|
|
1008
|
-
const
|
|
1009
|
-
function
|
|
1008
|
+
const E = r([Oe, Ie]);
|
|
1009
|
+
function C() {
|
|
1010
1010
|
let c = null;
|
|
1011
|
-
const m =
|
|
1011
|
+
const m = i([Me, E, Ne]);
|
|
1012
1012
|
if (m !== null) {
|
|
1013
|
-
const
|
|
1014
|
-
c = ["WIKILINK"].concat(
|
|
1013
|
+
const I = m[1];
|
|
1014
|
+
c = ["WIKILINK"].concat(I);
|
|
1015
1015
|
}
|
|
1016
1016
|
return c;
|
|
1017
1017
|
}
|
|
1018
1018
|
function x() {
|
|
1019
1019
|
let c = null;
|
|
1020
|
-
const m =
|
|
1020
|
+
const m = i([je, s(1, R), A, s(1, G), Re]);
|
|
1021
1021
|
return m !== null && (c = ["EXTLINK", m[1].length === 1 ? m[1][0] : ["CONCAT"].concat(m[1]), ["CONCAT"].concat(m[3])]), c;
|
|
1022
1022
|
}
|
|
1023
|
-
const
|
|
1024
|
-
function
|
|
1025
|
-
if (c = c.toLowerCase(), m = m.toLowerCase(), c !== m ||
|
|
1026
|
-
const
|
|
1027
|
-
for (let
|
|
1028
|
-
const
|
|
1029
|
-
if (
|
|
1023
|
+
const U = o(/^[A-Za-z]+/);
|
|
1024
|
+
function h(c, m, I, _ = { allowedHtmlElements: ["b", "bdi", "del", "i", "ins", "u", "font", "big", "small", "sub", "sup", "h1", "h2", "h3", "h4", "h5", "h6", "cite", "code", "em", "s", "strike", "strong", "tt", "var", "div", "center", "blockquote", "ol", "ul", "dl", "table", "caption", "pre", "ruby", "rb", "rp", "rt", "rtc", "p", "span", "abbr", "dfn", "kbd", "samp", "data", "time", "mark", "li", "dt", "dd"], allowedHtmlCommonAttributes: ["id", "class", "style", "lang", "dir", "title", "aria-describedby", "aria-flowto", "aria-hidden", "aria-label", "aria-labelledby", "aria-owns", "role", "about", "property", "resource", "datatype", "typeof", "itemid", "itemprop", "itemref", "itemscope", "itemtype"], allowedHtmlAttributesByElement: {} }) {
|
|
1025
|
+
if (c = c.toLowerCase(), m = m.toLowerCase(), c !== m || _.allowedHtmlElements.indexOf(c) === -1) return !1;
|
|
1026
|
+
const ne = /[\000-\010\013\016-\037\177]|expression|filter\s*:|accelerator\s*:|-o-link\s*:|-o-link-source\s*:|-o-replace\s*:|url\s*\(|image\s*\(|image-set\s*\(/i;
|
|
1027
|
+
for (let ae = 0, ce = I.length; ae < ce; ae += 2) {
|
|
1028
|
+
const pe = I[ae];
|
|
1029
|
+
if (_.allowedHtmlCommonAttributes.indexOf(pe) === -1 && (_.allowedHtmlAttributesByElement[c] || []).indexOf(pe) === -1 || pe === "style" && I[ae + 1].search(ne) !== -1) return !1;
|
|
1030
1030
|
}
|
|
1031
1031
|
return !0;
|
|
1032
1032
|
}
|
|
1033
|
-
function
|
|
1034
|
-
const c = o(/^[^"]*/), m =
|
|
1033
|
+
function T() {
|
|
1034
|
+
const c = o(/^[^"]*/), m = i([S, c, S]);
|
|
1035
1035
|
return m === null ? null : m[1];
|
|
1036
1036
|
}
|
|
1037
|
-
function
|
|
1038
|
-
const c = o(/^[^']*/), m =
|
|
1037
|
+
function M() {
|
|
1038
|
+
const c = o(/^[^']*/), m = i([re, c, re]);
|
|
1039
1039
|
return m === null ? null : m[1];
|
|
1040
1040
|
}
|
|
1041
|
-
function
|
|
1042
|
-
const c = o(/^\s*=\s*/), m =
|
|
1041
|
+
function j() {
|
|
1042
|
+
const c = o(/^\s*=\s*/), m = i([A, U, c, r([T, M])]);
|
|
1043
1043
|
return m === null ? null : [m[1], m[3]];
|
|
1044
1044
|
}
|
|
1045
|
-
function
|
|
1046
|
-
const c =
|
|
1045
|
+
function J() {
|
|
1046
|
+
const c = s(0, j)();
|
|
1047
1047
|
return Array.prototype.concat.apply(["HTMLATTRIBUTES"], c);
|
|
1048
1048
|
}
|
|
1049
|
-
function
|
|
1049
|
+
function V() {
|
|
1050
1050
|
let c = null;
|
|
1051
|
-
const m = n,
|
|
1052
|
-
if (
|
|
1053
|
-
const
|
|
1054
|
-
if (
|
|
1055
|
-
const l = n,
|
|
1056
|
-
if (
|
|
1051
|
+
const m = n, I = u("<"), _ = o(/^\/?/), ne = o(/^\s*>/), ae = i([I, U, J, _, ne]);
|
|
1052
|
+
if (ae === null) return null;
|
|
1053
|
+
const ce = n, pe = ae[1], xe = s(0, G)(), it = n, st = u("</"), Ke = i([st, U, ne]);
|
|
1054
|
+
if (Ke === null) return ["CONCAT", e.slice(m, ce)].concat(xe);
|
|
1055
|
+
const l = n, D = Ke[1], F = ae[2], de = F.slice(1);
|
|
1056
|
+
if (h(pe, D, de)) c = ["HTMLELEMENT", pe, F].concat(xe);
|
|
1057
1057
|
else {
|
|
1058
|
-
const
|
|
1059
|
-
c = ["CONCAT",
|
|
1058
|
+
const Pe = (be) => be.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
1059
|
+
c = ["CONCAT", Pe(e.slice(m, ce))].concat(xe, Pe(e.slice(it, l)));
|
|
1060
1060
|
}
|
|
1061
1061
|
return c;
|
|
1062
1062
|
}
|
|
1063
|
-
const
|
|
1064
|
-
function
|
|
1065
|
-
const c =
|
|
1063
|
+
const R = r([Ee, le, C, x, De]), G = r([Ee, le, C, x, V, oe]), W = r([Ee, le, B]);
|
|
1064
|
+
function fe() {
|
|
1065
|
+
const c = s(0, G)();
|
|
1066
1066
|
return c === null ? null : ["CONCAT"].concat(c);
|
|
1067
1067
|
}
|
|
1068
|
-
const
|
|
1069
|
-
if (
|
|
1070
|
-
return
|
|
1068
|
+
const K = fe();
|
|
1069
|
+
if (K === null || n !== e.length) throw new Error("Parse error at position " + n.toString() + " in input: " + e);
|
|
1070
|
+
return K;
|
|
1071
1071
|
}
|
|
1072
1072
|
class Ft {
|
|
1073
1073
|
constructor(t, { wikilinks: n = !1 } = {}) {
|
|
1074
|
-
this.locale =
|
|
1074
|
+
this.locale = Ue(t), this.wikilinks = n, this.emitter = new qt(this.locale);
|
|
1075
1075
|
}
|
|
1076
1076
|
parse(t, n) {
|
|
1077
1077
|
if (t.includes("{{") || t.includes("<") || this.wikilinks && t.includes("[")) {
|
|
@@ -1080,9 +1080,9 @@ class Ft {
|
|
|
1080
1080
|
} else return this.simpleParse(t, n);
|
|
1081
1081
|
}
|
|
1082
1082
|
simpleParse(t, n) {
|
|
1083
|
-
return t.replace(/\$(\d+)/g, (r,
|
|
1084
|
-
const
|
|
1085
|
-
return n[
|
|
1083
|
+
return t.replace(/\$(\d+)/g, (r, i) => {
|
|
1084
|
+
const s = parseInt(i, 10) - 1;
|
|
1085
|
+
return n[s] !== void 0 ? n[s] : "$" + i;
|
|
1086
1086
|
});
|
|
1087
1087
|
}
|
|
1088
1088
|
}
|
|
@@ -1092,7 +1092,7 @@ class Ra {
|
|
|
1092
1092
|
}
|
|
1093
1093
|
load(t, n) {
|
|
1094
1094
|
if (typeof t != "object") throw new Error("Invalid message source. Must be an object");
|
|
1095
|
-
if (n =
|
|
1095
|
+
if (n = Ue(n), n) {
|
|
1096
1096
|
if (!/^[a-zA-Z0-9-]+$/.test(n)) throw new Error(`Invalid locale ${n}`);
|
|
1097
1097
|
for (const r in t) if (r.indexOf("@") !== 0) {
|
|
1098
1098
|
if (typeof t[r] == "object") return this.load(t);
|
|
@@ -1103,7 +1103,7 @@ class Ra {
|
|
|
1103
1103
|
} else for (n in t) this.load(t[n], n);
|
|
1104
1104
|
}
|
|
1105
1105
|
getMessage(t, n) {
|
|
1106
|
-
const r = this.sourceMap.get(
|
|
1106
|
+
const r = this.sourceMap.get(Ue(n));
|
|
1107
1107
|
return r ? r[t] : null;
|
|
1108
1108
|
}
|
|
1109
1109
|
hasLocale(t) {
|
|
@@ -1111,8 +1111,8 @@ class Ra {
|
|
|
1111
1111
|
}
|
|
1112
1112
|
}
|
|
1113
1113
|
class La {
|
|
1114
|
-
constructor(t, { finalFallback: n = "en", messages: r = void 0, wikilinks:
|
|
1115
|
-
this.locale =
|
|
1114
|
+
constructor(t, { finalFallback: n = "en", messages: r = void 0, wikilinks: i = !1 } = {}) {
|
|
1115
|
+
this.locale = Ue(t), this.parser = new Ft(this.locale, { wikilinks: i }), this.messageStore = new Ra(), r && this.load(r, this.locale), this.finalFallback = n, this.wikilinks = i;
|
|
1116
1116
|
}
|
|
1117
1117
|
load(t, n) {
|
|
1118
1118
|
return this.messageStore.load(t, n || this.locale);
|
|
@@ -1121,28 +1121,28 @@ class La {
|
|
|
1121
1121
|
return this.parser.parse(this.getMessage(t), n);
|
|
1122
1122
|
}
|
|
1123
1123
|
setLocale(t) {
|
|
1124
|
-
this.locale =
|
|
1124
|
+
this.locale = Ue(t), this.parser = new Ft(this.locale, { wikilinks: this.wikilinks });
|
|
1125
1125
|
}
|
|
1126
1126
|
getFallbackLocales() {
|
|
1127
|
-
return [...
|
|
1127
|
+
return [...Ut[this.locale] || [], this.finalFallback];
|
|
1128
1128
|
}
|
|
1129
1129
|
getMessage(t) {
|
|
1130
1130
|
let n = this.locale, r = 0;
|
|
1131
|
-
const
|
|
1131
|
+
const i = this.getFallbackLocales(this.locale);
|
|
1132
1132
|
for (; n; ) {
|
|
1133
|
-
const
|
|
1134
|
-
let u =
|
|
1133
|
+
const s = n.split("-");
|
|
1134
|
+
let u = s.length;
|
|
1135
1135
|
do {
|
|
1136
|
-
const o =
|
|
1137
|
-
if (typeof
|
|
1136
|
+
const o = s.slice(0, u).join("-"), A = this.messageStore.getMessage(t, o);
|
|
1137
|
+
if (typeof A == "string") return A;
|
|
1138
1138
|
u--;
|
|
1139
1139
|
} while (u);
|
|
1140
|
-
n =
|
|
1140
|
+
n = i[r], r++;
|
|
1141
1141
|
}
|
|
1142
1142
|
return t;
|
|
1143
1143
|
}
|
|
1144
1144
|
registerParserPlugin(t, n) {
|
|
1145
|
-
|
|
1145
|
+
qt.prototype[t] = n;
|
|
1146
1146
|
}
|
|
1147
1147
|
}
|
|
1148
1148
|
const Jt = {
|
|
@@ -1231,7 +1231,7 @@ const Jt = {
|
|
|
1231
1231
|
"sa-signup-webauthn-setup": "Set Up Passkey",
|
|
1232
1232
|
"sa-signup-webauthn-done": "Skip for now",
|
|
1233
1233
|
"sa-signup-webauthn-error": "Error setting up passkey. Please try again from your account settings."
|
|
1234
|
-
},
|
|
1234
|
+
}, Ua = {
|
|
1235
1235
|
"@metadata": { authors: ["Mason Payne"], "last-updated": "2022-05-28", locale: "fr" },
|
|
1236
1236
|
"sa-login": "Connexion",
|
|
1237
1237
|
"sa-username": "Adresse e-mail",
|
|
@@ -1284,7 +1284,7 @@ const Jt = {
|
|
|
1284
1284
|
"sa-signup-webauthn-setup": "Configurer la clé d'accès",
|
|
1285
1285
|
"sa-signup-webauthn-done": "Ignorer pour l'instant",
|
|
1286
1286
|
"sa-signup-webauthn-error": "Erreur lors de la configuration de la clé d'accès. Veuillez réessayer depuis les paramètres de votre compte."
|
|
1287
|
-
},
|
|
1287
|
+
}, qa = {
|
|
1288
1288
|
"@metadata": { authors: ["Mason Payne"], "last-updated": "2022-05-28", locale: "es" },
|
|
1289
1289
|
"sa-login": "Acceso",
|
|
1290
1290
|
"sa-username": "Correo electrónico",
|
|
@@ -1390,8 +1390,8 @@ const Jt = {
|
|
|
1390
1390
|
"sa-signup-webauthn-error": "パスキーの設定中にエラーが発生しました。アカウント設定から再試行してください。"
|
|
1391
1391
|
}, Va = {
|
|
1392
1392
|
en: Jt,
|
|
1393
|
-
fr:
|
|
1394
|
-
es:
|
|
1393
|
+
fr: Ua,
|
|
1394
|
+
es: qa,
|
|
1395
1395
|
ja: Ja
|
|
1396
1396
|
};
|
|
1397
1397
|
function mt(e) {
|
|
@@ -1401,49 +1401,49 @@ function mt(e) {
|
|
|
1401
1401
|
return e !== "en" && (t.load(Va[e], e), t.setLocale(e)), t;
|
|
1402
1402
|
}
|
|
1403
1403
|
function Vt(e) {
|
|
1404
|
-
const t = "==".slice(0, (4 - e.length % 4) % 4), n = e.replace(/-/g, "+").replace(/_/g, "/") + t, r = atob(n),
|
|
1404
|
+
const t = "==".slice(0, (4 - e.length % 4) % 4), n = e.replace(/-/g, "+").replace(/_/g, "/") + t, r = atob(n), i = new ArrayBuffer(r.length), s = new Uint8Array(i);
|
|
1405
1405
|
for (let u = 0; u < r.length; u++)
|
|
1406
|
-
|
|
1407
|
-
return
|
|
1406
|
+
s[u] = r.charCodeAt(u);
|
|
1407
|
+
return i;
|
|
1408
1408
|
}
|
|
1409
|
-
function
|
|
1409
|
+
function Gt(e) {
|
|
1410
1410
|
const t = new Uint8Array(e);
|
|
1411
1411
|
let n = "";
|
|
1412
|
-
for (const
|
|
1413
|
-
n += String.fromCharCode(
|
|
1412
|
+
for (const s of t)
|
|
1413
|
+
n += String.fromCharCode(s);
|
|
1414
1414
|
return btoa(n).replace(/\+/g, "-").replace(
|
|
1415
1415
|
/\//g,
|
|
1416
1416
|
"_"
|
|
1417
1417
|
).replace(/=/g, "");
|
|
1418
1418
|
}
|
|
1419
|
-
var
|
|
1420
|
-
function
|
|
1421
|
-
if (t ===
|
|
1419
|
+
var P = "copy", we = "convert";
|
|
1420
|
+
function qe(e, t, n) {
|
|
1421
|
+
if (t === P)
|
|
1422
1422
|
return n;
|
|
1423
|
-
if (t ===
|
|
1423
|
+
if (t === we)
|
|
1424
1424
|
return e(n);
|
|
1425
1425
|
if (t instanceof Array)
|
|
1426
|
-
return n.map((r) =>
|
|
1426
|
+
return n.map((r) => qe(e, t[0], r));
|
|
1427
1427
|
if (t instanceof Object) {
|
|
1428
1428
|
const r = {};
|
|
1429
|
-
for (const [
|
|
1430
|
-
if (
|
|
1431
|
-
const u =
|
|
1432
|
-
u !== void 0 && (n[
|
|
1429
|
+
for (const [i, s] of Object.entries(t)) {
|
|
1430
|
+
if (s.derive) {
|
|
1431
|
+
const u = s.derive(n);
|
|
1432
|
+
u !== void 0 && (n[i] = u);
|
|
1433
1433
|
}
|
|
1434
|
-
if (!(
|
|
1435
|
-
if (
|
|
1436
|
-
throw new Error(`Missing key: ${
|
|
1434
|
+
if (!(i in n)) {
|
|
1435
|
+
if (s.required)
|
|
1436
|
+
throw new Error(`Missing key: ${i}`);
|
|
1437
1437
|
continue;
|
|
1438
1438
|
}
|
|
1439
|
-
if (n[
|
|
1440
|
-
r[
|
|
1439
|
+
if (n[i] == null) {
|
|
1440
|
+
r[i] = null;
|
|
1441
1441
|
continue;
|
|
1442
1442
|
}
|
|
1443
|
-
r[
|
|
1443
|
+
r[i] = qe(
|
|
1444
1444
|
e,
|
|
1445
|
-
|
|
1446
|
-
n[
|
|
1445
|
+
s.schema,
|
|
1446
|
+
n[i]
|
|
1447
1447
|
);
|
|
1448
1448
|
}
|
|
1449
1449
|
return r;
|
|
@@ -1456,57 +1456,57 @@ function dt(e, t) {
|
|
|
1456
1456
|
derive: t
|
|
1457
1457
|
};
|
|
1458
1458
|
}
|
|
1459
|
-
function
|
|
1459
|
+
function L(e) {
|
|
1460
1460
|
return {
|
|
1461
1461
|
required: !0,
|
|
1462
1462
|
schema: e
|
|
1463
1463
|
};
|
|
1464
1464
|
}
|
|
1465
|
-
function
|
|
1465
|
+
function Z(e) {
|
|
1466
1466
|
return {
|
|
1467
1467
|
required: !1,
|
|
1468
1468
|
schema: e
|
|
1469
1469
|
};
|
|
1470
1470
|
}
|
|
1471
|
-
var
|
|
1472
|
-
type:
|
|
1473
|
-
id:
|
|
1474
|
-
transports:
|
|
1471
|
+
var Kt = {
|
|
1472
|
+
type: L(P),
|
|
1473
|
+
id: L(we),
|
|
1474
|
+
transports: Z(P)
|
|
1475
1475
|
}, Ht = {
|
|
1476
|
-
appid:
|
|
1477
|
-
appidExclude:
|
|
1478
|
-
credProps:
|
|
1476
|
+
appid: Z(P),
|
|
1477
|
+
appidExclude: Z(P),
|
|
1478
|
+
credProps: Z(P)
|
|
1479
1479
|
}, Wt = {
|
|
1480
|
-
appid:
|
|
1481
|
-
appidExclude:
|
|
1482
|
-
credProps:
|
|
1483
|
-
},
|
|
1484
|
-
publicKey:
|
|
1485
|
-
rp:
|
|
1486
|
-
user:
|
|
1487
|
-
id:
|
|
1488
|
-
name:
|
|
1489
|
-
displayName:
|
|
1480
|
+
appid: Z(P),
|
|
1481
|
+
appidExclude: Z(P),
|
|
1482
|
+
credProps: Z(P)
|
|
1483
|
+
}, Ga = {
|
|
1484
|
+
publicKey: L({
|
|
1485
|
+
rp: L(P),
|
|
1486
|
+
user: L({
|
|
1487
|
+
id: L(we),
|
|
1488
|
+
name: L(P),
|
|
1489
|
+
displayName: L(P)
|
|
1490
1490
|
}),
|
|
1491
|
-
challenge:
|
|
1492
|
-
pubKeyCredParams:
|
|
1493
|
-
timeout:
|
|
1494
|
-
excludeCredentials:
|
|
1495
|
-
authenticatorSelection:
|
|
1496
|
-
attestation:
|
|
1497
|
-
extensions:
|
|
1491
|
+
challenge: L(we),
|
|
1492
|
+
pubKeyCredParams: L(P),
|
|
1493
|
+
timeout: Z(P),
|
|
1494
|
+
excludeCredentials: Z([Kt]),
|
|
1495
|
+
authenticatorSelection: Z(P),
|
|
1496
|
+
attestation: Z(P),
|
|
1497
|
+
extensions: Z(Ht)
|
|
1498
1498
|
}),
|
|
1499
|
-
signal:
|
|
1500
|
-
},
|
|
1501
|
-
type:
|
|
1502
|
-
id:
|
|
1503
|
-
rawId:
|
|
1504
|
-
authenticatorAttachment:
|
|
1505
|
-
response:
|
|
1506
|
-
clientDataJSON:
|
|
1507
|
-
attestationObject:
|
|
1499
|
+
signal: Z(P)
|
|
1500
|
+
}, Ka = {
|
|
1501
|
+
type: L(P),
|
|
1502
|
+
id: L(P),
|
|
1503
|
+
rawId: L(we),
|
|
1504
|
+
authenticatorAttachment: Z(P),
|
|
1505
|
+
response: L({
|
|
1506
|
+
clientDataJSON: L(we),
|
|
1507
|
+
attestationObject: L(we),
|
|
1508
1508
|
transports: dt(
|
|
1509
|
-
|
|
1509
|
+
P,
|
|
1510
1510
|
(e) => {
|
|
1511
1511
|
var t;
|
|
1512
1512
|
return ((t = e.getTransports) == null ? void 0 : t.call(e)) || [];
|
|
@@ -1518,26 +1518,26 @@ var Gt = {
|
|
|
1518
1518
|
(e) => e.getClientExtensionResults()
|
|
1519
1519
|
)
|
|
1520
1520
|
}, Ha = {
|
|
1521
|
-
mediation:
|
|
1522
|
-
publicKey:
|
|
1523
|
-
challenge:
|
|
1524
|
-
timeout:
|
|
1525
|
-
rpId:
|
|
1526
|
-
allowCredentials:
|
|
1527
|
-
userVerification:
|
|
1528
|
-
extensions:
|
|
1521
|
+
mediation: Z(P),
|
|
1522
|
+
publicKey: L({
|
|
1523
|
+
challenge: L(we),
|
|
1524
|
+
timeout: Z(P),
|
|
1525
|
+
rpId: Z(P),
|
|
1526
|
+
allowCredentials: Z([Kt]),
|
|
1527
|
+
userVerification: Z(P),
|
|
1528
|
+
extensions: Z(Ht)
|
|
1529
1529
|
}),
|
|
1530
|
-
signal:
|
|
1530
|
+
signal: Z(P)
|
|
1531
1531
|
}, Wa = {
|
|
1532
|
-
type:
|
|
1533
|
-
id:
|
|
1534
|
-
rawId:
|
|
1535
|
-
authenticatorAttachment:
|
|
1536
|
-
response:
|
|
1537
|
-
clientDataJSON:
|
|
1538
|
-
authenticatorData:
|
|
1539
|
-
signature:
|
|
1540
|
-
userHandle:
|
|
1532
|
+
type: L(P),
|
|
1533
|
+
id: L(P),
|
|
1534
|
+
rawId: L(we),
|
|
1535
|
+
authenticatorAttachment: Z(P),
|
|
1536
|
+
response: L({
|
|
1537
|
+
clientDataJSON: L(we),
|
|
1538
|
+
authenticatorData: L(we),
|
|
1539
|
+
signature: L(we),
|
|
1540
|
+
userHandle: L(we)
|
|
1541
1541
|
}),
|
|
1542
1542
|
clientExtensionResults: dt(
|
|
1543
1543
|
Wt,
|
|
@@ -1545,21 +1545,21 @@ var Gt = {
|
|
|
1545
1545
|
)
|
|
1546
1546
|
};
|
|
1547
1547
|
function Zt(e) {
|
|
1548
|
-
return
|
|
1548
|
+
return qe(Vt, Ga, e);
|
|
1549
1549
|
}
|
|
1550
1550
|
function Za(e) {
|
|
1551
|
-
return
|
|
1552
|
-
|
|
1553
|
-
|
|
1551
|
+
return qe(
|
|
1552
|
+
Gt,
|
|
1553
|
+
Ka,
|
|
1554
1554
|
e
|
|
1555
1555
|
);
|
|
1556
1556
|
}
|
|
1557
1557
|
function Ya(e) {
|
|
1558
|
-
return
|
|
1558
|
+
return qe(Vt, Ha, e);
|
|
1559
1559
|
}
|
|
1560
1560
|
function Xa(e) {
|
|
1561
|
-
return
|
|
1562
|
-
|
|
1561
|
+
return qe(
|
|
1562
|
+
Gt,
|
|
1563
1563
|
Wa,
|
|
1564
1564
|
e
|
|
1565
1565
|
);
|
|
@@ -1576,14 +1576,14 @@ async function Qa(e) {
|
|
|
1576
1576
|
);
|
|
1577
1577
|
return t.toJSON = () => Xa(t), t;
|
|
1578
1578
|
}
|
|
1579
|
-
function
|
|
1579
|
+
function ht(e) {
|
|
1580
1580
|
this.message = e;
|
|
1581
1581
|
}
|
|
1582
|
-
|
|
1582
|
+
ht.prototype = new Error(), ht.prototype.name = "InvalidCharacterError";
|
|
1583
1583
|
var yt = typeof window < "u" && window.atob && window.atob.bind(window) || function(e) {
|
|
1584
1584
|
var t = String(e).replace(/=+$/, "");
|
|
1585
|
-
if (t.length % 4 == 1) throw new
|
|
1586
|
-
for (var n, r,
|
|
1585
|
+
if (t.length % 4 == 1) throw new ht("'atob' failed: The string to be decoded is not correctly encoded.");
|
|
1586
|
+
for (var n, r, i = 0, s = 0, u = ""; r = t.charAt(s++); ~r && (n = i % 4 ? 64 * n + r : r, i++ % 4) ? u += String.fromCharCode(255 & n >> (-2 * i & 6)) : 0) r = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(r);
|
|
1587
1587
|
return u;
|
|
1588
1588
|
};
|
|
1589
1589
|
function eu(e) {
|
|
@@ -1602,9 +1602,9 @@ function eu(e) {
|
|
|
1602
1602
|
}
|
|
1603
1603
|
try {
|
|
1604
1604
|
return function(n) {
|
|
1605
|
-
return decodeURIComponent(yt(n).replace(/(.)/g, function(r,
|
|
1606
|
-
var
|
|
1607
|
-
return
|
|
1605
|
+
return decodeURIComponent(yt(n).replace(/(.)/g, function(r, i) {
|
|
1606
|
+
var s = i.charCodeAt(0).toString(16).toUpperCase();
|
|
1607
|
+
return s.length < 2 && (s = "0" + s), "%" + s;
|
|
1608
1608
|
}));
|
|
1609
1609
|
}(t);
|
|
1610
1610
|
} catch {
|
|
@@ -1645,7 +1645,7 @@ function nu() {
|
|
|
1645
1645
|
function ru() {
|
|
1646
1646
|
return Math.round((/* @__PURE__ */ new Date()).getTime() / 1e3);
|
|
1647
1647
|
}
|
|
1648
|
-
var
|
|
1648
|
+
var iu = /* @__PURE__ */ v(`<div class=widget-root><form class=login-frame><style>.widget-root {
|
|
1649
1649
|
display: block;
|
|
1650
1650
|
position: relative;
|
|
1651
1651
|
}
|
|
@@ -1791,7 +1791,7 @@ var su = /* @__PURE__ */ F(`<div class=widget-root><form class=login-frame><styl
|
|
|
1791
1791
|
margin-bottom: 0;
|
|
1792
1792
|
display: block;
|
|
1793
1793
|
}
|
|
1794
|
-
</style><style></style><h1>`),
|
|
1794
|
+
</style><style></style><h1>`), su = /* @__PURE__ */ v("<span class=error-message>"), ot = /* @__PURE__ */ v("<span>"), au = /* @__PURE__ */ v("<input type=text autocomplete=one-time-code required>"), $t = /* @__PURE__ */ v("<span class=hint>"), uu = /* @__PURE__ */ v("<input type=password autocomplete=new-password required>"), kt = /* @__PURE__ */ v("<button type=submit>"), ou = /* @__PURE__ */ v("<span class=info-message>"), lu = /* @__PURE__ */ v("<span class=success-message>"), cu = /* @__PURE__ */ v("<input type=text autocomplete=username>"), du = /* @__PURE__ */ v("<input type=password autocomplete=current-password>"), lt = /* @__PURE__ */ v("<p>"), hu = /* @__PURE__ */ v("<select>"), fu = /* @__PURE__ */ v("<option> (<!>)"), pu = /* @__PURE__ */ v("<input type=text>"), Bt = /* @__PURE__ */ v("<input type=text autocomplete=one-time-code>"), xt = /* @__PURE__ */ v("<input type=password autocomplete=new-password>"), gu = /* @__PURE__ */ v("<span class=checkbox-wrapper><input type=checkbox><span> "), Du = /* @__PURE__ */ v("<button type=button>"), He = /* @__PURE__ */ v("<a class=centered-text href=#>"), mu = /* @__PURE__ */ v("<div class=social-divider><span>"), bu = /* @__PURE__ */ v("<button type=button class=social-btn>"), vu = /* @__PURE__ */ v('<svg width=18 height=18 viewBox="0 0 18 18"xmlns=http://www.w3.org/2000/svg><path d="M17.64 9.2c0-.637-.057-1.251-.164-1.84H9v3.481h4.844c-.209 1.125-.843 2.078-1.796 2.717v2.258h2.908c1.702-1.567 2.684-3.875 2.684-6.615z"fill=#4285F4></path><path d="M9 18c2.43 0 4.467-.806 5.956-2.184l-2.908-2.258c-.806.54-1.837.86-3.048.86-2.344 0-4.328-1.584-5.036-3.711H.957v2.332C2.438 15.983 5.482 18 9 18z"fill=#34A853></path><path d="M3.964 10.707c-.18-.54-.282-1.117-.282-1.707s.102-1.167.282-1.707V4.961H.957C.347 6.175 0 7.548 0 9s.348 2.825.957 4.039l3.007-2.332z"fill=#FBBC05></path><path d="M9 3.58c1.321 0 2.508.454 3.44 1.345l2.582-2.58C13.463.891 11.426 0 9 0 5.482 0 2.438 2.017.957 4.961L3.964 7.293C4.672 5.166 6.656 3.58 9 3.58z"fill=#EA4335>'), Cu = /* @__PURE__ */ v('<svg width=18 height=18 viewBox="0 0 16 16"xmlns=http://www.w3.org/2000/svg><path fill-rule=evenodd d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z"fill=currentColor>'), wu = /* @__PURE__ */ v('<svg width=18 height=18 viewBox="20 16 16 19"xmlns=http://www.w3.org/2000/svg><path d="M28.2226562,20.3846154 C29.0546875,20.3846154 30.0976562,19.8048315 30.71875,19.0317864 C31.28125,18.3312142 31.6914062,17.352829 31.6914062,16.3744437 C31.6914062,16.2415766 31.6796875,16.1087095 31.65625,16 C30.7304687,16.0362365 29.6171875,16.640178 28.9492187,17.4494596 C28.421875,18.06548 27.9414062,19.0317864 27.9414062,20.0222505 C27.9414062,20.1671964 27.9648438,20.3121424 27.9765625,20.3604577 C28.0351562,20.3725366 28.1289062,20.3846154 28.2226562,20.3846154 Z M25.2929688,35 C26.4296875,35 26.9335938,34.214876 28.3515625,34.214876 C29.7929688,34.214876 30.109375,34.9758423 31.375,34.9758423 C32.6171875,34.9758423 33.4492188,33.792117 34.234375,32.6325493 C35.1132812,31.3038779 35.4765625,29.9993643 35.5,29.9389701 C35.4179688,29.9148125 33.0390625,28.9122695 33.0390625,26.0979021 C33.0390625,23.6579784 34.9140625,22.5588048 35.0195312,22.474253 C33.7773438,20.6382708 31.890625,20.5899555 31.375,20.5899555 C29.9804688,20.5899555 28.84375,21.4596313 28.1289062,21.4596313 C27.3554688,21.4596313 26.3359375,20.6382708 25.1289062,20.6382708 C22.8320312,20.6382708 20.5,22.5950413 20.5,26.2911634 C20.5,28.5861411 21.3671875,31.013986 22.4335938,32.5842339 C23.3476562,33.9129053 24.1445312,35 25.2929688,35 Z"fill=currentColor fill-rule=nonzero>'), Au = /* @__PURE__ */ v('<svg width=18 height=18 viewBox="0 0 24 24"xmlns=http://www.w3.org/2000/svg><path d="M12 1L3 5v6c0 5.55 3.84 10.74 9 12 5.16-1.26 9-6.45 9-12V5l-9-4zm0 4a3 3 0 110 6 3 3 0 010-6zm0 14c-2.5 0-4.71-1.28-6-3.22.03-1.99 4-3.08 6-3.08s5.97 1.09 6 3.08c-1.29 1.94-3.5 3.22-6 3.22z"fill=currentColor>'), Eu = /* @__PURE__ */ v("<div class=loading-overlay part=loading-overlay><slot name=loading>");
|
|
1795
1795
|
const Fu = {
|
|
1796
1796
|
domain: "http://127.0.0.1:11000",
|
|
1797
1797
|
sector: "0ad5c3e5-0186-4557-8b32-4b36f247bf09",
|
|
@@ -1802,31 +1802,31 @@ const Fu = {
|
|
|
1802
1802
|
redirect: "",
|
|
1803
1803
|
hideSocial: !1
|
|
1804
1804
|
};
|
|
1805
|
-
|
|
1806
|
-
const [t, n] = w((e.startMode || "password").toLowerCase()), [r,
|
|
1807
|
-
let
|
|
1808
|
-
const
|
|
1805
|
+
Dt("spartan-login", Fu, (e) => {
|
|
1806
|
+
const [t, n] = w((e.startMode || "password").toLowerCase()), [r, i] = w(""), [s, u] = w(""), [o, A] = w(""), [k, g] = w(""), [q] = w(e.redirect), [Ae, Ce] = w(!1), [$e, S] = w(!1), [re, ue] = w(!1), [ke, Fe] = w(""), [Be, B] = w(""), [oe, H] = w([]), [De, Y] = w(""), [ie, se] = w([]), [le, me] = w(""), [b, $] = w(!1), [O, z] = w(!1), [te, Se] = w(""), [Te, Me] = w(""), [Ne, je] = w(""), [Re, Ee] = w(""), [Oe, Ie] = w(""), [E, C] = w(""), [x, U] = w(!1), h = mt(e.locale);
|
|
1807
|
+
let T, M = null, j;
|
|
1808
|
+
const J = () => b() || !!le();
|
|
1809
1809
|
rn(() => {
|
|
1810
|
-
|
|
1810
|
+
M && clearTimeout(M);
|
|
1811
1811
|
});
|
|
1812
1812
|
try {
|
|
1813
|
-
|
|
1813
|
+
j = e.styles;
|
|
1814
1814
|
} catch {
|
|
1815
|
-
|
|
1815
|
+
j = "";
|
|
1816
1816
|
}
|
|
1817
|
-
console.log(
|
|
1817
|
+
console.log(j), ft(async () => {
|
|
1818
1818
|
const l = new URLSearchParams(window.location.search);
|
|
1819
1819
|
if (l.get("error")) {
|
|
1820
1820
|
history.replaceState({}, "", window.location.pathname);
|
|
1821
|
-
const
|
|
1822
|
-
|
|
1821
|
+
const be = l.get("error_description");
|
|
1822
|
+
g(be || h.i18n("sa-social-error")), V(), R();
|
|
1823
1823
|
return;
|
|
1824
1824
|
}
|
|
1825
|
-
const
|
|
1826
|
-
if (
|
|
1827
|
-
history.replaceState({}, "", window.location.pathname),
|
|
1825
|
+
const F = l.get("code");
|
|
1826
|
+
if (F) {
|
|
1827
|
+
history.replaceState({}, "", window.location.pathname), $(!0);
|
|
1828
1828
|
try {
|
|
1829
|
-
const
|
|
1829
|
+
const be = await fetch(`${e.domain}/api/v1/oauth/exchange`, {
|
|
1830
1830
|
method: "POST",
|
|
1831
1831
|
mode: "cors",
|
|
1832
1832
|
cache: "no-cache",
|
|
@@ -1834,49 +1834,49 @@ gt("spartan-login", Fu, (e) => {
|
|
|
1834
1834
|
"Content-Type": "application/json"
|
|
1835
1835
|
},
|
|
1836
1836
|
body: JSON.stringify({
|
|
1837
|
-
code:
|
|
1837
|
+
code: F
|
|
1838
1838
|
})
|
|
1839
1839
|
});
|
|
1840
|
-
if (!
|
|
1841
|
-
const
|
|
1842
|
-
localStorage.setItem("spartan-token",
|
|
1843
|
-
const a =
|
|
1840
|
+
if (!be.ok) throw new Error(h.i18n("sa-social-error"));
|
|
1841
|
+
const X = await be.json();
|
|
1842
|
+
localStorage.setItem("spartan-token", X.token);
|
|
1843
|
+
const a = T.getRootNode().host;
|
|
1844
1844
|
e.redirect !== "" ? (a.dispatchEvent(new CustomEvent("spartan-login", {
|
|
1845
1845
|
bubbles: !0,
|
|
1846
1846
|
cancelable: !0,
|
|
1847
1847
|
detail: {
|
|
1848
|
-
token:
|
|
1848
|
+
token: X.token
|
|
1849
1849
|
}
|
|
1850
|
-
})), window.location.href = e.redirect) : (
|
|
1851
|
-
|
|
1850
|
+
})), window.location.href = e.redirect) : (M = setTimeout(() => {
|
|
1851
|
+
M = null, $(!1), V(), R();
|
|
1852
1852
|
}, 5e3), a.dispatchEvent(new CustomEvent("spartan-login", {
|
|
1853
1853
|
bubbles: !0,
|
|
1854
1854
|
cancelable: !0,
|
|
1855
1855
|
detail: {
|
|
1856
|
-
token:
|
|
1856
|
+
token: X.token
|
|
1857
1857
|
}
|
|
1858
1858
|
})));
|
|
1859
|
-
} catch (
|
|
1860
|
-
|
|
1859
|
+
} catch (be) {
|
|
1860
|
+
g(be.message || h.i18n("sa-social-error")), $(!1), V(), R();
|
|
1861
1861
|
}
|
|
1862
1862
|
return;
|
|
1863
1863
|
}
|
|
1864
|
-
const
|
|
1865
|
-
if (
|
|
1866
|
-
|
|
1867
|
-
const
|
|
1868
|
-
|
|
1864
|
+
const de = l.get("sub");
|
|
1865
|
+
if (de) {
|
|
1866
|
+
je(de);
|
|
1867
|
+
const be = l.get("email");
|
|
1868
|
+
be && Ee(be);
|
|
1869
1869
|
const a = new URLSearchParams(window.location.hash.replace(/^#/, "")).get("otp");
|
|
1870
|
-
a &&
|
|
1870
|
+
a && Ie(a), n("invite");
|
|
1871
1871
|
return;
|
|
1872
1872
|
}
|
|
1873
1873
|
if (Xt() && e.redirect !== "" && window.location.pathname !== e.redirect) {
|
|
1874
1874
|
window.location.href = e.redirect;
|
|
1875
1875
|
return;
|
|
1876
1876
|
}
|
|
1877
|
-
|
|
1877
|
+
V(), R();
|
|
1878
1878
|
});
|
|
1879
|
-
function
|
|
1879
|
+
function V() {
|
|
1880
1880
|
fetch(`${e.domain}/api/v1/sectors/${e.sector}/publicsettings`, {
|
|
1881
1881
|
method: "GET",
|
|
1882
1882
|
mode: "cors",
|
|
@@ -1889,12 +1889,12 @@ gt("spartan-login", Fu, (e) => {
|
|
|
1889
1889
|
return l.json();
|
|
1890
1890
|
throw new Error("Network response was not ok.");
|
|
1891
1891
|
}).then((l) => {
|
|
1892
|
-
console.log(l),
|
|
1892
|
+
console.log(l), Ce(l.SelfSignUpAllowed), z(l.MFARequired || !1);
|
|
1893
1893
|
}).catch((l) => {
|
|
1894
|
-
console.log(l),
|
|
1894
|
+
console.log(l), g(l.message);
|
|
1895
1895
|
});
|
|
1896
1896
|
}
|
|
1897
|
-
function
|
|
1897
|
+
function R() {
|
|
1898
1898
|
e.hideSocial || fetch(`${e.domain}/api/v1/sectors/${e.sector}/oauth/providers`, {
|
|
1899
1899
|
method: "GET",
|
|
1900
1900
|
mode: "cors",
|
|
@@ -1903,15 +1903,15 @@ gt("spartan-login", Fu, (e) => {
|
|
|
1903
1903
|
if (l.ok) return l.json();
|
|
1904
1904
|
throw new Error("Failed to load social providers");
|
|
1905
1905
|
}).then((l) => {
|
|
1906
|
-
const
|
|
1907
|
-
|
|
1906
|
+
const D = (l.providers || []).filter((F) => F.enabled);
|
|
1907
|
+
se(D);
|
|
1908
1908
|
}).catch(() => {
|
|
1909
1909
|
});
|
|
1910
1910
|
}
|
|
1911
|
-
function
|
|
1912
|
-
if (
|
|
1913
|
-
|
|
1914
|
-
const
|
|
1911
|
+
function G(l) {
|
|
1912
|
+
if (le()) return;
|
|
1913
|
+
me(l), g("");
|
|
1914
|
+
const D = window.location.origin + window.location.pathname;
|
|
1915
1915
|
fetch(`${e.domain}/api/v1/oauth/${l}/initiate`, {
|
|
1916
1916
|
method: "POST",
|
|
1917
1917
|
mode: "cors",
|
|
@@ -1921,19 +1921,19 @@ gt("spartan-login", Fu, (e) => {
|
|
|
1921
1921
|
},
|
|
1922
1922
|
body: JSON.stringify({
|
|
1923
1923
|
sectorID: e.sector,
|
|
1924
|
-
redirectURI:
|
|
1924
|
+
redirectURI: D
|
|
1925
1925
|
})
|
|
1926
|
-
}).then((
|
|
1927
|
-
if (
|
|
1928
|
-
throw new Error(
|
|
1929
|
-
}).then((
|
|
1930
|
-
window.location.href =
|
|
1931
|
-
}).catch((
|
|
1932
|
-
|
|
1926
|
+
}).then((F) => {
|
|
1927
|
+
if (F.ok) return F.json();
|
|
1928
|
+
throw new Error(h.i18n("sa-social-error"));
|
|
1929
|
+
}).then((F) => {
|
|
1930
|
+
window.location.href = F.authURL;
|
|
1931
|
+
}).catch((F) => {
|
|
1932
|
+
me(""), g(F.message);
|
|
1933
1933
|
});
|
|
1934
1934
|
}
|
|
1935
|
-
function
|
|
1936
|
-
return
|
|
1935
|
+
function W(l, D) {
|
|
1936
|
+
return g(""), Me(D), fetch(`${e.domain}/api/v1/signup/mfa/begin`, {
|
|
1937
1937
|
method: "POST",
|
|
1938
1938
|
mode: "cors",
|
|
1939
1939
|
cache: "no-cache",
|
|
@@ -1943,19 +1943,19 @@ gt("spartan-login", Fu, (e) => {
|
|
|
1943
1943
|
body: JSON.stringify({
|
|
1944
1944
|
email: l,
|
|
1945
1945
|
sectorID: e.sector,
|
|
1946
|
-
transactionId:
|
|
1946
|
+
transactionId: D
|
|
1947
1947
|
})
|
|
1948
|
-
}).then((
|
|
1949
|
-
if (!
|
|
1950
|
-
throw new Error(
|
|
1948
|
+
}).then((F) => {
|
|
1949
|
+
if (!F.ok)
|
|
1950
|
+
throw new Error(h.i18n("sa-signup-verify-error"));
|
|
1951
1951
|
}).then(() => {
|
|
1952
1952
|
n("signup-verify");
|
|
1953
|
-
}).catch((
|
|
1954
|
-
|
|
1953
|
+
}).catch((F) => {
|
|
1954
|
+
g(F.message);
|
|
1955
1955
|
});
|
|
1956
1956
|
}
|
|
1957
|
-
function
|
|
1958
|
-
return
|
|
1957
|
+
function fe() {
|
|
1958
|
+
return g(""), fetch(`${e.domain}/api/v1/signup/mfa/verify`, {
|
|
1959
1959
|
method: "POST",
|
|
1960
1960
|
mode: "cors",
|
|
1961
1961
|
cache: "no-cache",
|
|
@@ -1966,44 +1966,44 @@ gt("spartan-login", Fu, (e) => {
|
|
|
1966
1966
|
email: r(),
|
|
1967
1967
|
code: o().toUpperCase().trim(),
|
|
1968
1968
|
sectorID: e.sector,
|
|
1969
|
-
transactionId:
|
|
1969
|
+
transactionId: Te()
|
|
1970
1970
|
})
|
|
1971
1971
|
}).then((l) => {
|
|
1972
1972
|
if (l.ok) return l.json();
|
|
1973
|
-
throw l.status === 400 ? new Error(
|
|
1973
|
+
throw l.status === 400 ? new Error(h.i18n("sa-signup-verify-error")) : new Error(h.i18n("sa-signup-verify-error"));
|
|
1974
1974
|
}).then((l) => {
|
|
1975
|
-
|
|
1975
|
+
Se(l.token), localStorage.setItem("spartan-token", l.token), T.getRootNode().host.dispatchEvent(new CustomEvent("spartan-login", {
|
|
1976
1976
|
bubbles: !0,
|
|
1977
1977
|
cancelable: !0,
|
|
1978
1978
|
detail: {
|
|
1979
1979
|
token: l.token
|
|
1980
1980
|
}
|
|
1981
|
-
})),
|
|
1981
|
+
})), A(""), n("signup-webauthn");
|
|
1982
1982
|
}).catch((l) => {
|
|
1983
|
-
|
|
1983
|
+
g(l.message);
|
|
1984
1984
|
});
|
|
1985
1985
|
}
|
|
1986
|
-
function
|
|
1987
|
-
b() || (
|
|
1986
|
+
function K() {
|
|
1987
|
+
b() || ($(!0), g(""), fetch(`${e.domain}/api/v1/webauthn/registration/begin`, {
|
|
1988
1988
|
method: "POST",
|
|
1989
1989
|
mode: "cors",
|
|
1990
1990
|
cache: "no-cache",
|
|
1991
1991
|
headers: {
|
|
1992
1992
|
"Content-Type": "application/json",
|
|
1993
|
-
Authorization: `bearer ${
|
|
1993
|
+
Authorization: `bearer ${te()}`
|
|
1994
1994
|
},
|
|
1995
1995
|
body: JSON.stringify({
|
|
1996
1996
|
keyName: "Default",
|
|
1997
1997
|
sectorID: e.sector
|
|
1998
1998
|
})
|
|
1999
1999
|
}).then((l) => {
|
|
2000
|
-
if (!l.ok) throw new Error(
|
|
2000
|
+
if (!l.ok) throw new Error(h.i18n("sa-signup-webauthn-error"));
|
|
2001
2001
|
return l.json();
|
|
2002
2002
|
}).then((l) => {
|
|
2003
|
-
const
|
|
2004
|
-
return Yt(
|
|
2005
|
-
let
|
|
2006
|
-
return
|
|
2003
|
+
const D = Zt(l.Options);
|
|
2004
|
+
return Yt(D).then((F) => {
|
|
2005
|
+
let de = JSON.parse(JSON.stringify(F));
|
|
2006
|
+
return de.transactionID = l.TransactionID, de;
|
|
2007
2007
|
});
|
|
2008
2008
|
}).then((l) => fetch(`${e.domain}/api/v1/webauthn/registration/finish`, {
|
|
2009
2009
|
method: "POST",
|
|
@@ -2011,47 +2011,47 @@ gt("spartan-login", Fu, (e) => {
|
|
|
2011
2011
|
cache: "no-cache",
|
|
2012
2012
|
headers: {
|
|
2013
2013
|
"Content-Type": "application/json",
|
|
2014
|
-
Authorization: `bearer ${
|
|
2014
|
+
Authorization: `bearer ${te()}`
|
|
2015
2015
|
},
|
|
2016
2016
|
body: JSON.stringify(l)
|
|
2017
2017
|
})).then((l) => {
|
|
2018
|
-
if (!l.ok) throw new Error(
|
|
2018
|
+
if (!l.ok) throw new Error(h.i18n("sa-signup-webauthn-error"));
|
|
2019
2019
|
c();
|
|
2020
2020
|
}).catch((l) => {
|
|
2021
|
-
|
|
2021
|
+
g((l == null ? void 0 : l.message) || String(l));
|
|
2022
2022
|
}).finally(() => {
|
|
2023
|
-
|
|
2023
|
+
$(!1);
|
|
2024
2024
|
}));
|
|
2025
2025
|
}
|
|
2026
2026
|
function c() {
|
|
2027
2027
|
n(e.startMode), e.redirect !== "" && (window.location.href = e.redirect);
|
|
2028
2028
|
}
|
|
2029
2029
|
function m() {
|
|
2030
|
-
return console.log("login"),
|
|
2030
|
+
return console.log("login"), g(""), t() === "password" ? ne() : t() === "webauthn" ? _() : t() === "otp-pick" ? pe(De()) : t() === "otp" ? xe() : t() === "reset-email" ? it() : t() === "reset-code" ? st() : Promise.resolve();
|
|
2031
2031
|
}
|
|
2032
|
-
function
|
|
2033
|
-
return console.log("signup"),
|
|
2032
|
+
function I() {
|
|
2033
|
+
return console.log("signup"), g(""), S(!1), fetch(`${e.domain}/api/v1/users`, {
|
|
2034
2034
|
method: "POST",
|
|
2035
2035
|
mode: "cors",
|
|
2036
2036
|
cache: "no-cache",
|
|
2037
2037
|
body: JSON.stringify({
|
|
2038
2038
|
username: r(),
|
|
2039
|
-
password:
|
|
2039
|
+
password: s(),
|
|
2040
2040
|
sectorID: e.sector
|
|
2041
2041
|
})
|
|
2042
2042
|
}).then((l) => {
|
|
2043
2043
|
if (l.ok)
|
|
2044
2044
|
return l.json();
|
|
2045
|
-
throw new Error(
|
|
2045
|
+
throw new Error(h.i18n("sa-error-creating-user"));
|
|
2046
2046
|
}).then((l) => {
|
|
2047
|
-
if (console.log(l),
|
|
2048
|
-
return
|
|
2049
|
-
|
|
2047
|
+
if (console.log(l), O())
|
|
2048
|
+
return W(r(), l.enrollmentTransactionId || "");
|
|
2049
|
+
S(!0), n(e.startMode);
|
|
2050
2050
|
}).catch((l) => {
|
|
2051
|
-
|
|
2051
|
+
S(!1), g(l.message), console.log(l);
|
|
2052
2052
|
});
|
|
2053
2053
|
}
|
|
2054
|
-
function
|
|
2054
|
+
function _() {
|
|
2055
2055
|
return console.log("webauthnLogin"), fetch(`${e.domain}/api/v1/login/webauthn/begin`, {
|
|
2056
2056
|
method: "POST",
|
|
2057
2057
|
mode: "cors",
|
|
@@ -2063,90 +2063,90 @@ gt("spartan-login", Fu, (e) => {
|
|
|
2063
2063
|
}).then((l) => {
|
|
2064
2064
|
if (l.ok)
|
|
2065
2065
|
return l.json();
|
|
2066
|
-
throw l.status === 401 ? (n("password"),
|
|
2066
|
+
throw l.status === 401 ? (n("password"), g(h.i18n("webauthn-not-enrolled")), new Error(h.i18n("webauthn-not-enrolled"))) : new Error(`${l.status} ${l.statusText}: Network response was not ok.`);
|
|
2067
2067
|
}).then((l) => {
|
|
2068
2068
|
console.log(l);
|
|
2069
|
-
const
|
|
2070
|
-
return console.log("Parsed WebAuthn request options:",
|
|
2071
|
-
const
|
|
2072
|
-
let
|
|
2073
|
-
return
|
|
2069
|
+
const D = Ya(l.CredentialAssertion);
|
|
2070
|
+
return console.log("Parsed WebAuthn request options:", D), Qa(D).then((F) => {
|
|
2071
|
+
const de = JSON.stringify(F);
|
|
2072
|
+
let Pe = JSON.parse(de);
|
|
2073
|
+
return Pe.transactionID = l.TransactionID, Pe;
|
|
2074
2074
|
});
|
|
2075
2075
|
}).then((l) => fetch(`${e.domain}/api/v1/login/webauthn/finish`, {
|
|
2076
2076
|
method: "POST",
|
|
2077
2077
|
mode: "cors",
|
|
2078
2078
|
cache: "no-cache",
|
|
2079
2079
|
body: JSON.stringify(l)
|
|
2080
|
-
})).then(
|
|
2081
|
-
|
|
2080
|
+
})).then(ae).catch((l) => {
|
|
2081
|
+
g(l.message), console.log(l);
|
|
2082
2082
|
});
|
|
2083
2083
|
}
|
|
2084
|
-
function
|
|
2084
|
+
function ne() {
|
|
2085
2085
|
return console.log("password login"), fetch(e.domain + "/api/v1/login/password", {
|
|
2086
2086
|
method: "post",
|
|
2087
2087
|
mode: "cors",
|
|
2088
2088
|
cache: "no-cache",
|
|
2089
2089
|
body: JSON.stringify({
|
|
2090
2090
|
username: r(),
|
|
2091
|
-
password:
|
|
2091
|
+
password: s(),
|
|
2092
2092
|
sectorID: e.sector
|
|
2093
2093
|
})
|
|
2094
|
-
}).then(
|
|
2095
|
-
}
|
|
2096
|
-
function
|
|
2097
|
-
return Promise.resolve(l).then((
|
|
2098
|
-
if (
|
|
2099
|
-
return
|
|
2100
|
-
throw
|
|
2101
|
-
}).then((
|
|
2102
|
-
if (console.log(
|
|
2103
|
-
if (
|
|
2104
|
-
return
|
|
2105
|
-
if (
|
|
2106
|
-
return
|
|
2107
|
-
|
|
2094
|
+
}).then(ae);
|
|
2095
|
+
}
|
|
2096
|
+
function ae(l) {
|
|
2097
|
+
return Promise.resolve(l).then((D) => {
|
|
2098
|
+
if (D.ok)
|
|
2099
|
+
return D.json();
|
|
2100
|
+
throw D;
|
|
2101
|
+
}).then((D) => {
|
|
2102
|
+
if (console.log(D), localStorage.setItem("spartan-txid", D.transactionID), !D.token) {
|
|
2103
|
+
if (D.challengeType === "email_enrollment")
|
|
2104
|
+
return W(r(), D.transactionID || "");
|
|
2105
|
+
if (D.challengeType.indexOf("otp") !== -1)
|
|
2106
|
+
return ce();
|
|
2107
|
+
D.challengeType.indexOf("webauthn") !== -1 ? (n("webauthn"), g(h.i18n("sa-webauthn-required"))) : g(h.i18n("sa-unknown-challenge"));
|
|
2108
2108
|
return;
|
|
2109
2109
|
}
|
|
2110
|
-
localStorage.setItem("spartan-token",
|
|
2111
|
-
const
|
|
2110
|
+
localStorage.setItem("spartan-token", D.token);
|
|
2111
|
+
const F = new CustomEvent("spartan-login", {
|
|
2112
2112
|
bubbles: !0,
|
|
2113
2113
|
cancelable: !0,
|
|
2114
2114
|
detail: {
|
|
2115
|
-
token:
|
|
2116
|
-
transactionID:
|
|
2115
|
+
token: D.token,
|
|
2116
|
+
transactionID: D.transactionID
|
|
2117
2117
|
}
|
|
2118
2118
|
});
|
|
2119
|
-
|
|
2120
|
-
}).catch((
|
|
2121
|
-
console.log(
|
|
2122
|
-
}).catch((
|
|
2123
|
-
console.log(
|
|
2119
|
+
T.getRootNode().host.dispatchEvent(F), q() !== "" && (window.location.href = q());
|
|
2120
|
+
}).catch((D) => D.json().then((F) => {
|
|
2121
|
+
console.log(F.message), g(F.message);
|
|
2122
|
+
}).catch((F) => {
|
|
2123
|
+
console.log(F);
|
|
2124
2124
|
}));
|
|
2125
2125
|
}
|
|
2126
|
-
function
|
|
2126
|
+
function ce() {
|
|
2127
2127
|
const l = localStorage.getItem("spartan-txid") || "";
|
|
2128
2128
|
return fetch(e.domain + `/api/v1/otp/${encodeURIComponent(r())}?transactionID=${encodeURIComponent(l)}§orID=${encodeURIComponent(e.sector)}`, {
|
|
2129
2129
|
method: "get",
|
|
2130
2130
|
mode: "cors",
|
|
2131
2131
|
cache: "no-cache"
|
|
2132
|
-
}).then((
|
|
2133
|
-
if (
|
|
2134
|
-
return
|
|
2135
|
-
throw new Error(
|
|
2136
|
-
}).then((
|
|
2137
|
-
const
|
|
2138
|
-
if (
|
|
2139
|
-
|
|
2132
|
+
}).then((D) => {
|
|
2133
|
+
if (D.ok)
|
|
2134
|
+
return D.json();
|
|
2135
|
+
throw new Error(h.i18n("error-otp-list"));
|
|
2136
|
+
}).then((D) => {
|
|
2137
|
+
const F = D.registrations || [];
|
|
2138
|
+
if (F.length === 0) {
|
|
2139
|
+
g(h.i18n("sa-otp-no-registrations"));
|
|
2140
2140
|
return;
|
|
2141
2141
|
}
|
|
2142
|
-
if (
|
|
2143
|
-
return
|
|
2144
|
-
|
|
2145
|
-
}).catch((
|
|
2146
|
-
D
|
|
2142
|
+
if (F.length === 1)
|
|
2143
|
+
return pe(F[0].ID || "");
|
|
2144
|
+
H(F), Y(F[0].ID || ""), n("otp-pick"), g("");
|
|
2145
|
+
}).catch((D) => {
|
|
2146
|
+
g(D.message), console.log(D);
|
|
2147
2147
|
});
|
|
2148
2148
|
}
|
|
2149
|
-
function
|
|
2149
|
+
function pe(l) {
|
|
2150
2150
|
return console.log("begin OTP, registrationID:", l), fetch(e.domain + "/api/v1/login/otp/begin", {
|
|
2151
2151
|
method: "post",
|
|
2152
2152
|
mode: "cors",
|
|
@@ -2157,17 +2157,17 @@ gt("spartan-login", Fu, (e) => {
|
|
|
2157
2157
|
registrationID: l,
|
|
2158
2158
|
sectorID: e.sector
|
|
2159
2159
|
})
|
|
2160
|
-
}).then((
|
|
2161
|
-
if (
|
|
2162
|
-
return
|
|
2163
|
-
throw new Error(`${
|
|
2164
|
-
}).then((
|
|
2165
|
-
console.log(
|
|
2166
|
-
}).catch((
|
|
2167
|
-
D
|
|
2160
|
+
}).then((D) => {
|
|
2161
|
+
if (D.ok)
|
|
2162
|
+
return D.json();
|
|
2163
|
+
throw new Error(`${D.status} ${D.statusText}`);
|
|
2164
|
+
}).then((D) => {
|
|
2165
|
+
console.log(D), D.transactionID && localStorage.setItem("spartan-txid", D.transactionID), A(""), g(""), n("otp");
|
|
2166
|
+
}).catch((D) => {
|
|
2167
|
+
g(D.message), console.log(D);
|
|
2168
2168
|
});
|
|
2169
2169
|
}
|
|
2170
|
-
function
|
|
2170
|
+
function xe() {
|
|
2171
2171
|
return console.log("OTP login submit"), fetch(e.domain + "/api/v1/login/otp", {
|
|
2172
2172
|
method: "post",
|
|
2173
2173
|
mode: "cors",
|
|
@@ -2178,10 +2178,10 @@ gt("spartan-login", Fu, (e) => {
|
|
|
2178
2178
|
transactionID: localStorage.getItem("spartan-txid"),
|
|
2179
2179
|
sectorID: e.sector
|
|
2180
2180
|
})
|
|
2181
|
-
}).then(
|
|
2181
|
+
}).then(ae);
|
|
2182
2182
|
}
|
|
2183
|
-
function
|
|
2184
|
-
return console.log("begin password reset"),
|
|
2183
|
+
function it() {
|
|
2184
|
+
return console.log("begin password reset"), g(""), ue(!1), fetch(`${e.domain}/api/v1/password/reset/begin`, {
|
|
2185
2185
|
method: "POST",
|
|
2186
2186
|
mode: "cors",
|
|
2187
2187
|
cache: "no-cache",
|
|
@@ -2195,15 +2195,15 @@ gt("spartan-login", Fu, (e) => {
|
|
|
2195
2195
|
}).then((l) => {
|
|
2196
2196
|
if (l.ok)
|
|
2197
2197
|
return l.json();
|
|
2198
|
-
throw new Error(
|
|
2198
|
+
throw new Error(h.i18n("sa-reset-error"));
|
|
2199
2199
|
}).then((l) => {
|
|
2200
|
-
console.log(l),
|
|
2200
|
+
console.log(l), g(h.i18n("sa-reset-email-sent")), Fe(""), B(""), n("reset-code");
|
|
2201
2201
|
}).catch((l) => {
|
|
2202
|
-
|
|
2202
|
+
g(l.message), console.log(l);
|
|
2203
2203
|
});
|
|
2204
2204
|
}
|
|
2205
|
-
function
|
|
2206
|
-
return console.log("complete password reset"),
|
|
2205
|
+
function st() {
|
|
2206
|
+
return console.log("complete password reset"), g(""), fetch(`${e.domain}/api/v1/password/reset/complete`, {
|
|
2207
2207
|
method: "POST",
|
|
2208
2208
|
mode: "cors",
|
|
2209
2209
|
cache: "no-cache",
|
|
@@ -2212,35 +2212,35 @@ gt("spartan-login", Fu, (e) => {
|
|
|
2212
2212
|
},
|
|
2213
2213
|
body: JSON.stringify({
|
|
2214
2214
|
email: r(),
|
|
2215
|
-
code:
|
|
2216
|
-
newPassword:
|
|
2215
|
+
code: ke().toUpperCase().trim(),
|
|
2216
|
+
newPassword: Be(),
|
|
2217
2217
|
sectorID: e.sector
|
|
2218
2218
|
})
|
|
2219
2219
|
}).then((l) => {
|
|
2220
2220
|
if (l.ok)
|
|
2221
2221
|
return l.json();
|
|
2222
|
-
throw l.status === 400 ? new Error(
|
|
2222
|
+
throw l.status === 400 ? new Error(h.i18n("sa-reset-error-code")) : new Error(h.i18n("sa-reset-error"));
|
|
2223
2223
|
}).then((l) => {
|
|
2224
|
-
console.log(l),
|
|
2224
|
+
console.log(l), ue(!0), Fe(""), B(""), u(""), n(e.startMode);
|
|
2225
2225
|
}).catch((l) => {
|
|
2226
|
-
|
|
2226
|
+
g(l.message), console.log(l);
|
|
2227
2227
|
});
|
|
2228
2228
|
}
|
|
2229
|
-
async function
|
|
2230
|
-
if (
|
|
2231
|
-
|
|
2229
|
+
async function Ke() {
|
|
2230
|
+
if (g(""), !Oe() || Oe().trim().length === 0) {
|
|
2231
|
+
g(h.i18n("sa-invite-error-otp"));
|
|
2232
2232
|
return;
|
|
2233
2233
|
}
|
|
2234
|
-
if (!
|
|
2235
|
-
|
|
2234
|
+
if (!E() || E().length < 8) {
|
|
2235
|
+
g("Password must be at least 8 characters");
|
|
2236
2236
|
return;
|
|
2237
2237
|
}
|
|
2238
|
-
const l =
|
|
2238
|
+
const l = Ne();
|
|
2239
2239
|
if (!l) {
|
|
2240
|
-
|
|
2240
|
+
g("Missing invitation information");
|
|
2241
2241
|
return;
|
|
2242
2242
|
}
|
|
2243
|
-
const
|
|
2243
|
+
const D = await fetch(`${e.domain}/api/v1/users/invite/complete`, {
|
|
2244
2244
|
method: "POST",
|
|
2245
2245
|
mode: "cors",
|
|
2246
2246
|
cache: "no-cache",
|
|
@@ -2249,25 +2249,25 @@ gt("spartan-login", Fu, (e) => {
|
|
|
2249
2249
|
},
|
|
2250
2250
|
body: JSON.stringify({
|
|
2251
2251
|
sub: l,
|
|
2252
|
-
otp:
|
|
2253
|
-
password:
|
|
2252
|
+
otp: Oe().toUpperCase().trim(),
|
|
2253
|
+
password: E(),
|
|
2254
2254
|
sectorID: e.sector
|
|
2255
2255
|
})
|
|
2256
2256
|
}).catch(() => null);
|
|
2257
|
-
if (!
|
|
2258
|
-
|
|
2257
|
+
if (!D) {
|
|
2258
|
+
g(h.i18n("sa-invite-error-generic"));
|
|
2259
2259
|
return;
|
|
2260
2260
|
}
|
|
2261
|
-
if (
|
|
2261
|
+
if (D.ok) {
|
|
2262
2262
|
history.replaceState({}, "", window.location.pathname);
|
|
2263
|
-
const
|
|
2264
|
-
|
|
2263
|
+
const F = await D.json().catch(() => ({})), de = T.getRootNode().host;
|
|
2264
|
+
F.token ? (localStorage.setItem("spartan-token", F.token), de.dispatchEvent(new CustomEvent("spartan-login", {
|
|
2265
2265
|
bubbles: !0,
|
|
2266
2266
|
cancelable: !0,
|
|
2267
2267
|
detail: {
|
|
2268
|
-
token:
|
|
2268
|
+
token: F.token
|
|
2269
2269
|
}
|
|
2270
|
-
})),
|
|
2270
|
+
})), q() !== "" ? window.location.href = q() : e.redirect !== "" ? window.location.href = e.redirect : (U(!1), je(""), Ee(""), Ie(""), C(""), n(e.startMode), V(), R())) : (U(!0), de.dispatchEvent(new CustomEvent("spartan-invite-complete", {
|
|
2271
2271
|
bubbles: !0,
|
|
2272
2272
|
cancelable: !0,
|
|
2273
2273
|
detail: {
|
|
@@ -2275,186 +2275,186 @@ gt("spartan-login", Fu, (e) => {
|
|
|
2275
2275
|
success: !0
|
|
2276
2276
|
}
|
|
2277
2277
|
})), setTimeout(() => {
|
|
2278
|
-
|
|
2278
|
+
q() !== "" ? window.location.href = q() : e.redirect !== "" ? window.location.href = e.redirect : (U(!1), je(""), Ee(""), Ie(""), C(""), n(e.startMode), V(), R());
|
|
2279
2279
|
}, 2e3));
|
|
2280
2280
|
} else {
|
|
2281
|
-
const
|
|
2282
|
-
|
|
2281
|
+
const F = await D.json().catch(() => ({}));
|
|
2282
|
+
D.status === 400 || String(F.message).includes("invalid OTP") ? g(h.i18n("sa-invite-error-otp")) : D.status === 504 || String(F.message).includes("expired") ? g(h.i18n("sa-invite-error-expired")) : g(F.message || h.i18n("sa-invite-error-generic"));
|
|
2283
2283
|
}
|
|
2284
2284
|
}
|
|
2285
2285
|
return (() => {
|
|
2286
|
-
var l =
|
|
2287
|
-
return typeof
|
|
2288
|
-
if (
|
|
2289
|
-
|
|
2290
|
-
}),
|
|
2291
|
-
var
|
|
2292
|
-
return () =>
|
|
2293
|
-
})()),
|
|
2294
|
-
var
|
|
2295
|
-
return
|
|
2296
|
-
})(), null),
|
|
2297
|
-
var
|
|
2298
|
-
return () =>
|
|
2286
|
+
var l = iu(), D = l.firstChild, F = D.firstChild, de = F.nextSibling, Pe = de.nextSibling, be = T;
|
|
2287
|
+
return typeof be == "function" ? jt(be, D) : T = D, D.addEventListener("submit", (X) => {
|
|
2288
|
+
if (X.preventDefault(), b()) return;
|
|
2289
|
+
$(!0), (t() === "sign-up" ? I() : t() === "signup-verify" ? fe() : t() === "invite" ? Promise.resolve(Ke()) : m()).finally(() => $(!1));
|
|
2290
|
+
}), d(de, j), d(Pe, (() => {
|
|
2291
|
+
var X = f(() => t() === "reset-email" || t() === "reset-code");
|
|
2292
|
+
return () => X() ? h.i18n("sa-reset-password") : f(() => t() === "signup-verify" || t() === "signup-webauthn")() ? h.i18n("sa-signup-mfa-title") : f(() => t() === "invite")() ? h.i18n("sa-complete-invite") : h.i18n("sa-login");
|
|
2293
|
+
})()), d(D, k && (() => {
|
|
2294
|
+
var X = su();
|
|
2295
|
+
return d(X, k), X;
|
|
2296
|
+
})(), null), d(D, (() => {
|
|
2297
|
+
var X = f(() => !!$e());
|
|
2298
|
+
return () => X() && (() => {
|
|
2299
2299
|
var a = ot();
|
|
2300
|
-
return
|
|
2300
|
+
return d(a, () => h.i18n("sa-signup-complete")), a;
|
|
2301
2301
|
})();
|
|
2302
|
-
})(), null),
|
|
2303
|
-
var
|
|
2304
|
-
return () =>
|
|
2302
|
+
})(), null), d(D, (() => {
|
|
2303
|
+
var X = f(() => !!re());
|
|
2304
|
+
return () => X() && (() => {
|
|
2305
2305
|
var a = ot();
|
|
2306
|
-
return
|
|
2306
|
+
return d(a, () => h.i18n("sa-reset-success")), a;
|
|
2307
2307
|
})();
|
|
2308
|
-
})(), null),
|
|
2309
|
-
var
|
|
2310
|
-
return () =>
|
|
2308
|
+
})(), null), d(D, (() => {
|
|
2309
|
+
var X = f(() => t() === "invite");
|
|
2310
|
+
return () => X() && [f(() => f(() => !!Re())() && (() => {
|
|
2311
2311
|
var a = ou();
|
|
2312
|
-
return
|
|
2313
|
-
})()),
|
|
2312
|
+
return d(a, Re), a;
|
|
2313
|
+
})()), f(() => f(() => !!x())() && (() => {
|
|
2314
2314
|
var a = lu();
|
|
2315
|
-
return
|
|
2315
|
+
return d(a, () => h.i18n("sa-invite-success")), a;
|
|
2316
2316
|
})()), (() => {
|
|
2317
2317
|
var a = au();
|
|
2318
|
-
return a.$$input = (p) =>
|
|
2319
|
-
var
|
|
2320
|
-
return
|
|
2318
|
+
return a.$$input = (p) => Ie(p.currentTarget.value), y((p) => {
|
|
2319
|
+
var N = h.i18n("sa-invite-otp"), ye = b() || x();
|
|
2320
|
+
return N !== p.e && ge(a, "placeholder", p.e = N), ye !== p.t && (a.disabled = p.t = ye), p;
|
|
2321
2321
|
}, {
|
|
2322
2322
|
e: void 0,
|
|
2323
2323
|
t: void 0
|
|
2324
|
-
}), y(() => a.value =
|
|
2324
|
+
}), y(() => a.value = Oe()), a;
|
|
2325
2325
|
})(), (() => {
|
|
2326
2326
|
var a = $t();
|
|
2327
|
-
return
|
|
2327
|
+
return d(a, () => h.i18n("sa-invite-otp-hint")), a;
|
|
2328
2328
|
})(), (() => {
|
|
2329
2329
|
var a = uu();
|
|
2330
|
-
return a.$$input = (p) =>
|
|
2331
|
-
var
|
|
2332
|
-
return
|
|
2330
|
+
return a.$$input = (p) => C(p.currentTarget.value), y((p) => {
|
|
2331
|
+
var N = h.i18n("sa-invite-password"), ye = b() || x();
|
|
2332
|
+
return N !== p.e && ge(a, "placeholder", p.e = N), ye !== p.t && (a.disabled = p.t = ye), p;
|
|
2333
2333
|
}, {
|
|
2334
2334
|
e: void 0,
|
|
2335
2335
|
t: void 0
|
|
2336
|
-
}), y(() => a.value =
|
|
2336
|
+
}), y(() => a.value = E()), a;
|
|
2337
2337
|
})(), (() => {
|
|
2338
2338
|
var a = $t();
|
|
2339
|
-
return
|
|
2339
|
+
return d(a, () => h.i18n("sa-invite-password-hint")), a;
|
|
2340
2340
|
})(), (() => {
|
|
2341
2341
|
var a = kt();
|
|
2342
|
-
return
|
|
2343
|
-
var p =
|
|
2344
|
-
return () => p() ?
|
|
2342
|
+
return d(a, (() => {
|
|
2343
|
+
var p = f(() => !!b());
|
|
2344
|
+
return () => p() ? h.i18n("sa-invite-completing") : h.i18n("sa-invite-submit");
|
|
2345
2345
|
})()), y(() => a.disabled = b() || x()), a;
|
|
2346
2346
|
})()];
|
|
2347
|
-
})(), null),
|
|
2348
|
-
var
|
|
2349
|
-
return () =>
|
|
2347
|
+
})(), null), d(D, (() => {
|
|
2348
|
+
var X = f(() => t() !== "invite");
|
|
2349
|
+
return () => X() && [(() => {
|
|
2350
2350
|
var a = cu();
|
|
2351
|
-
return a.addEventListener("change", (p) =>
|
|
2352
|
-
var
|
|
2353
|
-
return
|
|
2351
|
+
return a.addEventListener("change", (p) => i(p.currentTarget.value)), a.$$input = (p) => i(p.currentTarget.value), y((p) => {
|
|
2352
|
+
var N = h.i18n("sa-username"), ye = t() === "otp" || t() === "otp-pick" || t() === "reset-code" || t() === "signup-verify" || t() === "signup-webauthn";
|
|
2353
|
+
return N !== p.e && ge(a, "placeholder", p.e = N), ye !== p.t && (a.disabled = p.t = ye), p;
|
|
2354
2354
|
}, {
|
|
2355
2355
|
e: void 0,
|
|
2356
2356
|
t: void 0
|
|
2357
2357
|
}), y(() => a.value = r()), a;
|
|
2358
|
-
})(),
|
|
2358
|
+
})(), f(() => f(() => t() !== "sign-up" && t() !== "signup-verify" && t() !== "signup-webauthn")() && [f(() => f(() => t() === "password")() && (() => {
|
|
2359
2359
|
var a = du();
|
|
2360
|
-
return a.addEventListener("change", (p) => u(p.currentTarget.value)), a.$$input = (p) => u(p.currentTarget.value), y(() =>
|
|
2361
|
-
})()),
|
|
2360
|
+
return a.addEventListener("change", (p) => u(p.currentTarget.value)), a.$$input = (p) => u(p.currentTarget.value), y(() => ge(a, "placeholder", h.i18n("sa-password"))), y(() => a.value = s()), a;
|
|
2361
|
+
})()), f(() => f(() => t() === "webauthn")() && ot()), f(() => f(() => t() === "otp-pick")() && [(() => {
|
|
2362
2362
|
var a = lt();
|
|
2363
|
-
return
|
|
2363
|
+
return d(a, () => h.i18n("sa-otp-choose")), a;
|
|
2364
2364
|
})(), (() => {
|
|
2365
|
-
var a =
|
|
2366
|
-
return a.addEventListener("change", (p) =>
|
|
2367
|
-
var
|
|
2368
|
-
return bt.nextSibling,
|
|
2369
|
-
})())), y(() => a.value =
|
|
2370
|
-
})()]),
|
|
2365
|
+
var a = hu();
|
|
2366
|
+
return a.addEventListener("change", (p) => Y(p.currentTarget.value)), d(a, () => oe().map((p) => (() => {
|
|
2367
|
+
var N = fu(), ye = N.firstChild, bt = ye.nextSibling;
|
|
2368
|
+
return bt.nextSibling, d(N, () => p.DisplayName || p.ID, ye), d(N, () => p.Type, bt), y(() => N.value = p.ID), N;
|
|
2369
|
+
})())), y(() => a.value = De()), a;
|
|
2370
|
+
})()]), f(() => f(() => t() === "otp")() && (() => {
|
|
2371
2371
|
var a = pu();
|
|
2372
|
-
return a.$$input = (p) =>
|
|
2373
|
-
})()),
|
|
2372
|
+
return a.$$input = (p) => A(p.currentTarget.value), y(() => ge(a, "placeholder", h.i18n("sa-code"))), y(() => a.value = o()), a;
|
|
2373
|
+
})()), f(() => f(() => t() === "reset-code")() && [(() => {
|
|
2374
2374
|
var a = Bt();
|
|
2375
|
-
return a.$$input = (p) =>
|
|
2375
|
+
return a.$$input = (p) => Fe(p.currentTarget.value), y(() => ge(a, "placeholder", h.i18n("sa-reset-code"))), y(() => a.value = ke()), a;
|
|
2376
2376
|
})(), (() => {
|
|
2377
2377
|
var a = xt();
|
|
2378
|
-
return a.$$input = (p) =>
|
|
2379
|
-
})()]),
|
|
2380
|
-
var a =
|
|
2381
|
-
return
|
|
2382
|
-
})())]),
|
|
2378
|
+
return a.$$input = (p) => B(p.currentTarget.value), y(() => ge(a, "placeholder", h.i18n("sa-new-password"))), y(() => a.value = Be()), a;
|
|
2379
|
+
})()]), f(() => f(() => t() === "password" || t() === "webauthn")() && (() => {
|
|
2380
|
+
var a = gu(), p = a.firstChild, N = p.nextSibling;
|
|
2381
|
+
return N.firstChild, a.$$click = () => n(t() === "password" ? "webauthn" : "password"), d(N, () => h.i18n("sa-use-password"), null), y(() => p.checked = t() === "password"), a;
|
|
2382
|
+
})())]), f(() => f(() => t() === "sign-up")() && (() => {
|
|
2383
2383
|
var a = xt();
|
|
2384
|
-
return a.addEventListener("change", (p) => u(p.currentTarget.value)), a.$$input = (p) => u(p.currentTarget.value), y(() =>
|
|
2385
|
-
})()),
|
|
2384
|
+
return a.addEventListener("change", (p) => u(p.currentTarget.value)), a.$$input = (p) => u(p.currentTarget.value), y(() => ge(a, "placeholder", h.i18n("sa-password"))), y(() => a.value = s()), a;
|
|
2385
|
+
})()), f(() => f(() => t() === "signup-verify")() && [(() => {
|
|
2386
2386
|
var a = lt();
|
|
2387
|
-
return
|
|
2387
|
+
return d(a, () => h.i18n("sa-signup-verify-prompt")), a;
|
|
2388
2388
|
})(), (() => {
|
|
2389
2389
|
var a = Bt();
|
|
2390
|
-
return a.$$input = (p) =>
|
|
2391
|
-
})()]),
|
|
2390
|
+
return a.$$input = (p) => A(p.currentTarget.value), y(() => ge(a, "placeholder", h.i18n("sa-code"))), y(() => a.value = o()), a;
|
|
2391
|
+
})()]), f(() => f(() => t() === "signup-webauthn")() && (() => {
|
|
2392
2392
|
var a = lt();
|
|
2393
|
-
return
|
|
2394
|
-
})()),
|
|
2393
|
+
return d(a, () => h.i18n("sa-signup-webauthn-prompt")), a;
|
|
2394
|
+
})()), f(() => f(() => t() !== "signup-webauthn")() && (() => {
|
|
2395
2395
|
var a = kt();
|
|
2396
|
-
return
|
|
2397
|
-
var p =
|
|
2398
|
-
return () => p() ?
|
|
2396
|
+
return d(a, (() => {
|
|
2397
|
+
var p = f(() => !!b());
|
|
2398
|
+
return () => p() ? h.i18n("sa-loading") : f(() => t() === "sign-up")() ? h.i18n("sa-signup") : f(() => t() === "otp-pick")() ? h.i18n("sa-otp-send-code") : f(() => t() === "otp")() ? h.i18n("sa-otp-verify") : f(() => t() === "reset-email")() ? h.i18n("sa-otp-send-code") : f(() => t() === "reset-code")() ? h.i18n("sa-reset-submit") : f(() => t() === "signup-verify")() ? h.i18n("sa-otp-verify") : h.i18n("sa-login");
|
|
2399
2399
|
})()), y(() => a.disabled = b()), a;
|
|
2400
|
-
})()),
|
|
2401
|
-
var a =
|
|
2402
|
-
return a.$$click = () =>
|
|
2403
|
-
var p =
|
|
2404
|
-
return () => p() ?
|
|
2400
|
+
})()), f(() => f(() => t() === "signup-webauthn")() && [(() => {
|
|
2401
|
+
var a = Du();
|
|
2402
|
+
return a.$$click = () => K(), d(a, (() => {
|
|
2403
|
+
var p = f(() => !!b());
|
|
2404
|
+
return () => p() ? h.i18n("sa-loading") : h.i18n("sa-signup-webauthn-setup");
|
|
2405
2405
|
})()), y(() => a.disabled = b()), a;
|
|
2406
2406
|
})(), (() => {
|
|
2407
2407
|
var a = He();
|
|
2408
|
-
return a.$$click = () => c(),
|
|
2409
|
-
})()]),
|
|
2408
|
+
return a.$$click = () => c(), d(a, () => h.i18n("sa-signup-webauthn-done")), a;
|
|
2409
|
+
})()]), f(() => f(() => t() === "password")() && (() => {
|
|
2410
2410
|
var a = He();
|
|
2411
2411
|
return a.$$click = () => {
|
|
2412
|
-
|
|
2413
|
-
},
|
|
2414
|
-
})()),
|
|
2412
|
+
g(""), ue(!1), n("reset-email");
|
|
2413
|
+
}, d(a, () => h.i18n("sa-forgot-password")), a;
|
|
2414
|
+
})()), f(() => f(() => t() === "reset-email" || t() === "reset-code")() && (() => {
|
|
2415
2415
|
var a = He();
|
|
2416
2416
|
return a.$$click = () => {
|
|
2417
|
-
|
|
2418
|
-
},
|
|
2419
|
-
})()),
|
|
2417
|
+
g(""), Fe(""), B(""), n(e.startMode);
|
|
2418
|
+
}, d(a, () => h.i18n("sa-back")), a;
|
|
2419
|
+
})()), f(() => f(() => !!(Ae() && t() !== "reset-email" && t() !== "reset-code" && t() !== "signup-verify" && t() !== "signup-webauthn"))() && (() => {
|
|
2420
2420
|
var a = He();
|
|
2421
|
-
return a.$$click = () => t() === "sign-up" ? n(e.startMode) : n("sign-up"),
|
|
2422
|
-
var p =
|
|
2423
|
-
return () => p() ?
|
|
2421
|
+
return a.$$click = () => t() === "sign-up" ? n(e.startMode) : n("sign-up"), d(a, (() => {
|
|
2422
|
+
var p = f(() => t() === "sign-up");
|
|
2423
|
+
return () => p() ? h.i18n("sa-back") : h.i18n("sa-signup");
|
|
2424
2424
|
})()), a;
|
|
2425
|
-
})()),
|
|
2425
|
+
})()), f(() => f(() => !e.hideSocial && ie().length > 0 && (t() === "password" || t() === "webauthn" || t() === "sign-up"))() && [(() => {
|
|
2426
2426
|
var a = mu(), p = a.firstChild;
|
|
2427
|
-
return
|
|
2428
|
-
})(),
|
|
2427
|
+
return d(p, () => h.i18n("sa-or")), a;
|
|
2428
|
+
})(), f(() => ie().map((a) => (() => {
|
|
2429
2429
|
var p = bu();
|
|
2430
|
-
return p.$$click = () =>
|
|
2431
|
-
var
|
|
2432
|
-
return () =>
|
|
2433
|
-
})(), null),
|
|
2434
|
-
var
|
|
2435
|
-
return () =>
|
|
2436
|
-
})(), null),
|
|
2437
|
-
var
|
|
2438
|
-
return () =>
|
|
2439
|
-
})(), null),
|
|
2440
|
-
var
|
|
2441
|
-
return () =>
|
|
2442
|
-
})(), null),
|
|
2443
|
-
var
|
|
2444
|
-
return () =>
|
|
2445
|
-
})(), null), y(() => p.disabled = !!
|
|
2430
|
+
return p.$$click = () => G(a.provider), d(p, (() => {
|
|
2431
|
+
var N = f(() => a.provider === "google");
|
|
2432
|
+
return () => N() && vu();
|
|
2433
|
+
})(), null), d(p, (() => {
|
|
2434
|
+
var N = f(() => a.provider === "github");
|
|
2435
|
+
return () => N() && Cu();
|
|
2436
|
+
})(), null), d(p, (() => {
|
|
2437
|
+
var N = f(() => a.provider === "apple");
|
|
2438
|
+
return () => N() && wu();
|
|
2439
|
+
})(), null), d(p, (() => {
|
|
2440
|
+
var N = f(() => a.provider === "oidc");
|
|
2441
|
+
return () => N() && Au();
|
|
2442
|
+
})(), null), d(p, (() => {
|
|
2443
|
+
var N = f(() => a.provider === "google");
|
|
2444
|
+
return () => N() ? h.i18n("sa-social-google") : f(() => a.provider === "github")() ? h.i18n("sa-social-github") : f(() => a.provider === "apple")() ? h.i18n("sa-social-apple") : h.i18n("sa-social-oidc");
|
|
2445
|
+
})(), null), y(() => p.disabled = !!le() || b()), p;
|
|
2446
2446
|
})()))])];
|
|
2447
|
-
})(), null),
|
|
2448
|
-
var
|
|
2449
|
-
return () =>
|
|
2447
|
+
})(), null), d(l, (() => {
|
|
2448
|
+
var X = f(() => !!J());
|
|
2449
|
+
return () => X() && (() => {
|
|
2450
2450
|
var a = Eu(), p = a.firstChild;
|
|
2451
|
-
return p._$owner = sn(),
|
|
2451
|
+
return p._$owner = sn(), d(p, () => h.i18n("sa-loading")), a;
|
|
2452
2452
|
})();
|
|
2453
2453
|
})(), null), l;
|
|
2454
2454
|
})();
|
|
2455
2455
|
});
|
|
2456
|
-
|
|
2457
|
-
var yu = /* @__PURE__ */
|
|
2456
|
+
gt(["input", "click"]);
|
|
2457
|
+
var yu = /* @__PURE__ */ v(`<div class=container><style>.container {
|
|
2458
2458
|
background-color: #ffffff;
|
|
2459
2459
|
border-radius: 10px;
|
|
2460
2460
|
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
|
|
@@ -2632,8 +2632,8 @@ var yu = /* @__PURE__ */ F(`<div class=container><style>.container {
|
|
|
2632
2632
|
.modal-content .btn.verify:hover {
|
|
2633
2633
|
background-color: #0056b3;
|
|
2634
2634
|
}
|
|
2635
|
-
</style><style></style><h1 class=header>`),
|
|
2636
|
-
const
|
|
2635
|
+
</style><style></style><h1 class=header>`), _t = /* @__PURE__ */ v("<span class=error-message>"), $u = /* @__PURE__ */ v("<div class=section><h2></h2><div class=security-keys>"), ku = /* @__PURE__ */ v('<div class=key-item><span></span><button class="btn remove">'), St = /* @__PURE__ */ v("<span>"), Bu = /* @__PURE__ */ v("<div class=section><div class=security-keys>"), xu = /* @__PURE__ */ v('<button class="btn add">+ '), _u = /* @__PURE__ */ v('<div class=add-key-form><div class=add-key-item><label for=keyName style=display:none;></label><input id=keyName type=text><button class="btn remove"></button><button class="btn add">'), Su = /* @__PURE__ */ v("<div class=section><h2></h2><table><thead><tr><th></th><th></th><th></th></tr></thead><tbody>"), Tu = /* @__PURE__ */ v('<tr class=mfa-list-item><td></td><td></td><td><button class="btn remove">'), Ou = /* @__PURE__ */ v('<span> <button class="btn validate">'), Iu = /* @__PURE__ */ v('<div class=section><div class=mfa-manage><button class="btn add">+ '), Pu = /* @__PURE__ */ v('<div class=section><h2></h2><div class=mfa-manage><div class=mfa-item><label for=email></label><input id=email type=text><button class="btn add"></button></div><div class=mfa-item><label for=phone></label><input id=phone type=text><button class="btn add"></button></div><div class=mfa-item><button class="btn remove">'), zu = /* @__PURE__ */ v('<div class=modal id=mfaModal><div class=modal-content><span class=close id=closeModal>×</span><h2>MFA Verification</h2><p>Please enter the verification code sent to your email or phone:</p><input type=text id=mfaCode placeholder="Enter verification code"><button class="btn verify"id=verifyMfa>Verify');
|
|
2636
|
+
const Mu = {
|
|
2637
2637
|
domain: "http://127.0.0.1:11000",
|
|
2638
2638
|
sector: "0ad5c3e5-0186-4557-8b32-4b36f247bf09",
|
|
2639
2639
|
// defaults to the admin sector
|
|
@@ -2643,37 +2643,37 @@ const Nu = {
|
|
|
2643
2643
|
redirect: "/",
|
|
2644
2644
|
redirectOnUnauthenticated: !0
|
|
2645
2645
|
};
|
|
2646
|
-
|
|
2646
|
+
Dt("spartan-account-settings", Mu, (e) => {
|
|
2647
2647
|
w(""), w("");
|
|
2648
|
-
const [t, n] = w(""), [r,
|
|
2649
|
-
let
|
|
2648
|
+
const [t, n] = w(""), [r, i] = w(""), [s, u] = w(""), [o] = w(e.showWebAuthn), [A, k] = w(!1), [g, q] = w(!1), [Ae, Ce] = w(!1), [$e, S] = w(!1), [re, ue] = w(!1), [ke, Fe] = w([]), [Be, B] = w([]), [oe, H] = w(""), [De, Y] = w(""), [ie, se] = w(""), [le, me] = w(""), b = mt(e.locale);
|
|
2649
|
+
let $;
|
|
2650
2650
|
try {
|
|
2651
|
-
|
|
2651
|
+
$ = e.styles;
|
|
2652
2652
|
} catch {
|
|
2653
|
-
|
|
2653
|
+
$ = "";
|
|
2654
2654
|
}
|
|
2655
|
-
|
|
2655
|
+
ft(async () => {
|
|
2656
2656
|
if (Xt())
|
|
2657
|
-
|
|
2657
|
+
q(!0), i("");
|
|
2658
2658
|
else {
|
|
2659
2659
|
if (e.redirectOnUnauthenticated) {
|
|
2660
2660
|
window.location.href = e.redirect;
|
|
2661
2661
|
return;
|
|
2662
2662
|
}
|
|
2663
|
-
|
|
2663
|
+
q(!1), i(b.i18n("not-authenticated"));
|
|
2664
2664
|
}
|
|
2665
|
-
|
|
2666
|
-
console.log(
|
|
2667
|
-
}), await
|
|
2668
|
-
|
|
2665
|
+
O().then((C) => {
|
|
2666
|
+
console.log(C);
|
|
2667
|
+
}), await Me(), Ee().then((C) => {
|
|
2668
|
+
B(C.registrations);
|
|
2669
2669
|
});
|
|
2670
2670
|
});
|
|
2671
|
-
async function
|
|
2672
|
-
return await (await fetch(`${e.domain}/api/v1/users/self`,
|
|
2671
|
+
async function O() {
|
|
2672
|
+
return await (await fetch(`${e.domain}/api/v1/users/self`, z("get"))).json();
|
|
2673
2673
|
}
|
|
2674
|
-
function
|
|
2674
|
+
function z(E = "get") {
|
|
2675
2675
|
return {
|
|
2676
|
-
method:
|
|
2676
|
+
method: E,
|
|
2677
2677
|
mode: "cors",
|
|
2678
2678
|
cache: "no-cache",
|
|
2679
2679
|
headers: {
|
|
@@ -2682,252 +2682,252 @@ gt("spartan-account-settings", Nu, (e) => {
|
|
|
2682
2682
|
}
|
|
2683
2683
|
};
|
|
2684
2684
|
}
|
|
2685
|
-
function
|
|
2686
|
-
if (
|
|
2687
|
-
|
|
2688
|
-
let
|
|
2689
|
-
|
|
2685
|
+
function te() {
|
|
2686
|
+
if (re()) return;
|
|
2687
|
+
ue(!0);
|
|
2688
|
+
let E = z("post");
|
|
2689
|
+
E.body = JSON.stringify({
|
|
2690
2690
|
keyName: t(),
|
|
2691
2691
|
sectorID: e.sector
|
|
2692
|
-
}), fetch(`${e.domain}/api/v1/webauthn/registration/begin`,
|
|
2693
|
-
if (
|
|
2694
|
-
return
|
|
2695
|
-
throw
|
|
2696
|
-
}).then((
|
|
2697
|
-
|
|
2698
|
-
|
|
2699
|
-
}) :
|
|
2692
|
+
}), fetch(`${e.domain}/api/v1/webauthn/registration/begin`, E).then((C) => {
|
|
2693
|
+
if (C.status === 200)
|
|
2694
|
+
return C.json();
|
|
2695
|
+
throw C;
|
|
2696
|
+
}).then((C) => (console.log(C), Se(C))).catch((C) => {
|
|
2697
|
+
C.json ? C.json().then((x) => {
|
|
2698
|
+
i(x.message);
|
|
2699
|
+
}) : i(C);
|
|
2700
2700
|
}).finally(() => {
|
|
2701
|
-
|
|
2701
|
+
ue(!1);
|
|
2702
2702
|
});
|
|
2703
2703
|
}
|
|
2704
|
-
async function
|
|
2704
|
+
async function Se(E) {
|
|
2705
2705
|
try {
|
|
2706
|
-
const
|
|
2707
|
-
console.log("Parsed WebAuthn creation options:",
|
|
2708
|
-
const x = await Yt(
|
|
2709
|
-
let
|
|
2710
|
-
|
|
2711
|
-
let
|
|
2712
|
-
|
|
2713
|
-
const
|
|
2714
|
-
if (
|
|
2715
|
-
const
|
|
2716
|
-
|
|
2706
|
+
const C = Zt(E.Options);
|
|
2707
|
+
console.log("Parsed WebAuthn creation options:", C);
|
|
2708
|
+
const x = await Yt(C), U = JSON.stringify(x);
|
|
2709
|
+
let h = JSON.parse(U);
|
|
2710
|
+
h.transactionID = E.TransactionID;
|
|
2711
|
+
let T = z("post");
|
|
2712
|
+
T.body = JSON.stringify(h);
|
|
2713
|
+
const M = await fetch(`${e.domain}/api/v1/webauthn/registration/finish`, T);
|
|
2714
|
+
if (M.status !== 200) {
|
|
2715
|
+
const j = await M.json();
|
|
2716
|
+
i(j.message);
|
|
2717
2717
|
return;
|
|
2718
2718
|
}
|
|
2719
|
-
|
|
2720
|
-
} catch (
|
|
2721
|
-
console.error("WebAuthn registration error:",
|
|
2719
|
+
k(!1), n(""), Me();
|
|
2720
|
+
} catch (C) {
|
|
2721
|
+
console.error("WebAuthn registration error:", C), i((C == null ? void 0 : C.message) || String(C));
|
|
2722
2722
|
}
|
|
2723
2723
|
}
|
|
2724
|
-
async function
|
|
2725
|
-
let
|
|
2726
|
-
|
|
2727
|
-
ID:
|
|
2724
|
+
async function Te(E) {
|
|
2725
|
+
let C = z("delete");
|
|
2726
|
+
C.body = JSON.stringify({
|
|
2727
|
+
ID: E
|
|
2728
2728
|
});
|
|
2729
2729
|
try {
|
|
2730
|
-
if ((await fetch(`${e.domain}/api/v1/webauthn/${
|
|
2731
|
-
|
|
2730
|
+
if ((await fetch(`${e.domain}/api/v1/webauthn/${E}`, C)).status !== 200) {
|
|
2731
|
+
i(b.i18n("error-webauthn-remove"));
|
|
2732
2732
|
return;
|
|
2733
2733
|
}
|
|
2734
|
-
|
|
2734
|
+
Me();
|
|
2735
2735
|
} catch (x) {
|
|
2736
|
-
console.error(x),
|
|
2736
|
+
console.error(x), i(b.i18n("error-webauthn-remove"));
|
|
2737
2737
|
return;
|
|
2738
2738
|
}
|
|
2739
2739
|
}
|
|
2740
|
-
async function
|
|
2741
|
-
let
|
|
2740
|
+
async function Me() {
|
|
2741
|
+
let E = z("get");
|
|
2742
2742
|
try {
|
|
2743
|
-
const x = await (await fetch(`${e.domain}/api/v1/webauthn/registration/list`,
|
|
2744
|
-
|
|
2745
|
-
} catch (
|
|
2746
|
-
console.error(
|
|
2743
|
+
const x = await (await fetch(`${e.domain}/api/v1/webauthn/registration/list`, E)).json();
|
|
2744
|
+
Fe(x.registrations || []);
|
|
2745
|
+
} catch (C) {
|
|
2746
|
+
console.error(C), Fe([]);
|
|
2747
2747
|
}
|
|
2748
2748
|
}
|
|
2749
|
-
function
|
|
2750
|
-
|
|
2749
|
+
function Ne(E, C) {
|
|
2750
|
+
re() || (ue(!0), je(E, C).then((x) => {
|
|
2751
2751
|
if (x)
|
|
2752
|
-
return
|
|
2753
|
-
|
|
2752
|
+
return Ee().then((U) => {
|
|
2753
|
+
B(U.registrations), H(x.transactionID), S(!0);
|
|
2754
2754
|
});
|
|
2755
2755
|
}).finally(() => {
|
|
2756
|
-
|
|
2756
|
+
ue(!1);
|
|
2757
2757
|
}));
|
|
2758
2758
|
}
|
|
2759
|
-
function
|
|
2760
|
-
let x =
|
|
2759
|
+
function je(E, C) {
|
|
2760
|
+
let x = z("post");
|
|
2761
2761
|
return x.body = JSON.stringify({
|
|
2762
|
-
destination:
|
|
2763
|
-
OTPType:
|
|
2762
|
+
destination: E,
|
|
2763
|
+
OTPType: Ie(C),
|
|
2764
2764
|
sectorID: e.sector
|
|
2765
|
-
}), fetch(`${e.domain}/api/v1/otp/begin`, x).then((
|
|
2766
|
-
if (
|
|
2767
|
-
|
|
2765
|
+
}), fetch(`${e.domain}/api/v1/otp/begin`, x).then((U) => {
|
|
2766
|
+
if (U.status !== 200) {
|
|
2767
|
+
i(b.i18n("error-otp-verification"));
|
|
2768
2768
|
return;
|
|
2769
2769
|
}
|
|
2770
|
-
return
|
|
2771
|
-
}).catch((
|
|
2772
|
-
console.error(
|
|
2770
|
+
return U.json();
|
|
2771
|
+
}).catch((U) => {
|
|
2772
|
+
console.error(U), i(b.i18n("error-otp-registration"));
|
|
2773
2773
|
});
|
|
2774
2774
|
}
|
|
2775
|
-
function
|
|
2776
|
-
if (
|
|
2777
|
-
|
|
2778
|
-
let x =
|
|
2775
|
+
function Re(E, C) {
|
|
2776
|
+
if (re()) return;
|
|
2777
|
+
ue(!0);
|
|
2778
|
+
let x = z("post");
|
|
2779
2779
|
x.body = JSON.stringify({
|
|
2780
|
-
transactionID:
|
|
2781
|
-
password:
|
|
2782
|
-
}), fetch(`${e.domain}/api/v1/otp/finish`, x).then((
|
|
2783
|
-
if (
|
|
2780
|
+
transactionID: E,
|
|
2781
|
+
password: C
|
|
2782
|
+
}), fetch(`${e.domain}/api/v1/otp/finish`, x).then((U) => {
|
|
2783
|
+
if (U.status !== 200) {
|
|
2784
2784
|
u(b.i18n("error-otp-verification"));
|
|
2785
2785
|
return;
|
|
2786
2786
|
}
|
|
2787
|
-
return
|
|
2788
|
-
|
|
2789
|
-
}),
|
|
2790
|
-
}).catch((
|
|
2791
|
-
console.error(
|
|
2787
|
+
return S(!1), Y(""), Ce(!1), me(""), se(""), Ee().then((h) => {
|
|
2788
|
+
B(h.registrations);
|
|
2789
|
+
}), U.json();
|
|
2790
|
+
}).catch((U) => {
|
|
2791
|
+
console.error(U), u(b.i18n("error-otp-registration"));
|
|
2792
2792
|
}).finally(() => {
|
|
2793
|
-
|
|
2793
|
+
ue(!1);
|
|
2794
2794
|
});
|
|
2795
2795
|
}
|
|
2796
|
-
async function
|
|
2797
|
-
let
|
|
2796
|
+
async function Ee() {
|
|
2797
|
+
let E = z("get");
|
|
2798
2798
|
try {
|
|
2799
|
-
return await (await fetch(`${e.domain}/api/v1/otp/list`,
|
|
2800
|
-
} catch (
|
|
2801
|
-
console.error(
|
|
2799
|
+
return await (await fetch(`${e.domain}/api/v1/otp/list`, E)).json();
|
|
2800
|
+
} catch (C) {
|
|
2801
|
+
console.error(C), i(b.i18n("error-otp-list"));
|
|
2802
2802
|
return;
|
|
2803
2803
|
}
|
|
2804
2804
|
}
|
|
2805
|
-
async function
|
|
2806
|
-
let
|
|
2807
|
-
|
|
2808
|
-
ID:
|
|
2805
|
+
async function Oe(E) {
|
|
2806
|
+
let C = z("delete");
|
|
2807
|
+
C.body = JSON.stringify({
|
|
2808
|
+
ID: E
|
|
2809
2809
|
});
|
|
2810
2810
|
try {
|
|
2811
|
-
if ((await fetch(`${e.domain}/api/v1/otp/${
|
|
2812
|
-
|
|
2811
|
+
if ((await fetch(`${e.domain}/api/v1/otp/${E}`, C)).status !== 200) {
|
|
2812
|
+
i(b.i18n("error-otp-remove"));
|
|
2813
2813
|
return;
|
|
2814
2814
|
}
|
|
2815
|
-
|
|
2816
|
-
|
|
2815
|
+
Ee().then((U) => {
|
|
2816
|
+
B(U.registrations);
|
|
2817
2817
|
});
|
|
2818
2818
|
} catch (x) {
|
|
2819
|
-
console.error(x),
|
|
2819
|
+
console.error(x), i(b.i18n("error-otp-remove"));
|
|
2820
2820
|
return;
|
|
2821
2821
|
}
|
|
2822
2822
|
}
|
|
2823
|
-
function
|
|
2824
|
-
return
|
|
2823
|
+
function Ie(E) {
|
|
2824
|
+
return E === "EMAIL" ? 2 : 1;
|
|
2825
2825
|
}
|
|
2826
2826
|
return (() => {
|
|
2827
|
-
var
|
|
2828
|
-
return
|
|
2829
|
-
var
|
|
2830
|
-
return
|
|
2831
|
-
})(), null),
|
|
2832
|
-
var
|
|
2833
|
-
return () =>
|
|
2834
|
-
var
|
|
2835
|
-
return
|
|
2836
|
-
var
|
|
2837
|
-
return
|
|
2838
|
-
confirm(b.i18n("sa-confirm-delete-key")) &&
|
|
2839
|
-
},
|
|
2840
|
-
})()), null),
|
|
2841
|
-
var
|
|
2842
|
-
return () =>
|
|
2843
|
-
var
|
|
2844
|
-
return
|
|
2827
|
+
var E = yu(), C = E.firstChild, x = C.nextSibling, U = x.nextSibling;
|
|
2828
|
+
return d(x, $), d(U, () => b.i18n("sa-account-settings")), d(E, r && (() => {
|
|
2829
|
+
var h = _t();
|
|
2830
|
+
return d(h, r), h;
|
|
2831
|
+
})(), null), d(E, (() => {
|
|
2832
|
+
var h = f(() => !!(o() && ke().length));
|
|
2833
|
+
return () => h() && (() => {
|
|
2834
|
+
var T = $u(), M = T.firstChild, j = M.nextSibling;
|
|
2835
|
+
return d(M, () => b.i18n("sa-webauthn-security-keys")), d(j, () => ke().map((J) => (() => {
|
|
2836
|
+
var V = ku(), R = V.firstChild, G = R.nextSibling;
|
|
2837
|
+
return d(R, () => J.keyName), G.$$click = () => {
|
|
2838
|
+
confirm(b.i18n("sa-confirm-delete-key")) && Te(J.keyName);
|
|
2839
|
+
}, d(G, () => b.i18n("sa-remove")), V;
|
|
2840
|
+
})()), null), d(j, (() => {
|
|
2841
|
+
var J = f(() => ke().length <= 0);
|
|
2842
|
+
return () => J() && (() => {
|
|
2843
|
+
var V = St();
|
|
2844
|
+
return d(V, () => b.i18n("sa-no-security-keys")), V;
|
|
2845
2845
|
})();
|
|
2846
|
-
})(), null),
|
|
2846
|
+
})(), null), T;
|
|
2847
2847
|
})();
|
|
2848
|
-
})(), null),
|
|
2849
|
-
var
|
|
2850
|
-
return () =>
|
|
2851
|
-
var
|
|
2852
|
-
return
|
|
2853
|
-
var
|
|
2854
|
-
return () =>
|
|
2855
|
-
var
|
|
2856
|
-
return
|
|
2848
|
+
})(), null), d(E, (() => {
|
|
2849
|
+
var h = f(() => !!o());
|
|
2850
|
+
return () => h() && (() => {
|
|
2851
|
+
var T = Bu(), M = T.firstChild;
|
|
2852
|
+
return d(M, (() => {
|
|
2853
|
+
var j = f(() => !A());
|
|
2854
|
+
return () => j() && (() => {
|
|
2855
|
+
var J = xu();
|
|
2856
|
+
return J.firstChild, J.$$click = () => k(!0), d(J, () => b.i18n("sa-add-security-key"), null), J;
|
|
2857
2857
|
})();
|
|
2858
|
-
})(), null),
|
|
2859
|
-
var
|
|
2860
|
-
return () =>
|
|
2861
|
-
var
|
|
2862
|
-
return
|
|
2863
|
-
var c = b.i18n("sa-webauthn-key-name"), m = t() === "" ||
|
|
2864
|
-
return c !==
|
|
2858
|
+
})(), null), d(M, (() => {
|
|
2859
|
+
var j = f(() => !!A());
|
|
2860
|
+
return () => j() && (() => {
|
|
2861
|
+
var J = _u(), V = J.firstChild, R = V.firstChild, G = R.nextSibling, W = G.nextSibling, fe = W.nextSibling;
|
|
2862
|
+
return d(R, () => b.i18n("sa-webauthn-key-name")), G.$$input = (K) => n(K.currentTarget.value), W.$$click = () => k(!1), d(W, () => b.i18n("sa-cancel")), fe.$$click = () => t() !== "" && te(), d(fe, () => b.i18n("sa-register")), y((K) => {
|
|
2863
|
+
var c = b.i18n("sa-webauthn-key-name"), m = t() === "" || re();
|
|
2864
|
+
return c !== K.e && ge(G, "placeholder", K.e = c), m !== K.t && (fe.disabled = K.t = m), K;
|
|
2865
2865
|
}, {
|
|
2866
2866
|
e: void 0,
|
|
2867
2867
|
t: void 0
|
|
2868
|
-
}), y(() =>
|
|
2868
|
+
}), y(() => G.value = t()), J;
|
|
2869
2869
|
})();
|
|
2870
|
-
})(), null),
|
|
2870
|
+
})(), null), T;
|
|
2871
2871
|
})();
|
|
2872
|
-
})(), null),
|
|
2873
|
-
var
|
|
2874
|
-
return () =>
|
|
2875
|
-
var
|
|
2876
|
-
return
|
|
2877
|
-
var c = Tu(), m = c.firstChild,
|
|
2878
|
-
return
|
|
2879
|
-
var
|
|
2880
|
-
return () =>
|
|
2881
|
-
var
|
|
2882
|
-
return
|
|
2872
|
+
})(), null), d(E, (() => {
|
|
2873
|
+
var h = f(() => Be().length > 0);
|
|
2874
|
+
return () => h() && (() => {
|
|
2875
|
+
var T = Su(), M = T.firstChild, j = M.nextSibling, J = j.firstChild, V = J.firstChild, R = V.firstChild, G = R.nextSibling, W = G.nextSibling, fe = J.nextSibling;
|
|
2876
|
+
return d(M, () => b.i18n("sa-mfa")), d(R, () => b.i18n("sa-mfa-destination")), d(G, () => b.i18n("sa-mfa-validated")), d(W, () => b.i18n("sa-mfa-action")), d(fe, () => Be().map((K) => (() => {
|
|
2877
|
+
var c = Tu(), m = c.firstChild, I = m.nextSibling, _ = I.nextSibling, ne = _.firstChild;
|
|
2878
|
+
return d(m, () => K.DisplayName), d(I, (() => {
|
|
2879
|
+
var ae = f(() => !!K.Validated);
|
|
2880
|
+
return () => ae() ? (() => {
|
|
2881
|
+
var ce = St();
|
|
2882
|
+
return d(ce, () => b.i18n("sa-yes")), ce;
|
|
2883
2883
|
})() : (() => {
|
|
2884
|
-
var
|
|
2885
|
-
return
|
|
2886
|
-
|
|
2887
|
-
},
|
|
2884
|
+
var ce = Ou(), pe = ce.firstChild, xe = pe.nextSibling;
|
|
2885
|
+
return d(ce, () => b.i18n("sa-no"), pe), xe.$$click = () => {
|
|
2886
|
+
Ne(K.DisplayName, K.Type === "email" ? "EMAIL" : "SMS");
|
|
2887
|
+
}, d(xe, () => b.i18n("sa-validate")), y(() => xe.disabled = re()), ce;
|
|
2888
2888
|
})();
|
|
2889
|
-
})()),
|
|
2890
|
-
confirm(b.i18n("sa-confirm-delete-key")) &&
|
|
2891
|
-
},
|
|
2892
|
-
})())),
|
|
2889
|
+
})()), ne.$$click = () => {
|
|
2890
|
+
confirm(b.i18n("sa-confirm-delete-key")) && Oe(K.ID);
|
|
2891
|
+
}, d(ne, () => b.i18n("sa-remove")), y(() => ge(m, "title", K.DisplayName)), c;
|
|
2892
|
+
})())), T;
|
|
2893
2893
|
})();
|
|
2894
|
-
})(), null),
|
|
2895
|
-
var
|
|
2896
|
-
return () =>
|
|
2897
|
-
var
|
|
2898
|
-
return
|
|
2894
|
+
})(), null), d(E, (() => {
|
|
2895
|
+
var h = f(() => !Ae());
|
|
2896
|
+
return () => h() && (() => {
|
|
2897
|
+
var T = Iu(), M = T.firstChild, j = M.firstChild;
|
|
2898
|
+
return j.firstChild, j.$$click = () => Ce(!0), d(j, () => b.i18n("sa-register-mfa"), null), T;
|
|
2899
2899
|
})();
|
|
2900
|
-
})(), null),
|
|
2901
|
-
var
|
|
2902
|
-
return () =>
|
|
2903
|
-
var
|
|
2904
|
-
return
|
|
2905
|
-
var
|
|
2906
|
-
return
|
|
2900
|
+
})(), null), d(E, (() => {
|
|
2901
|
+
var h = f(() => !!Ae());
|
|
2902
|
+
return () => h() && (() => {
|
|
2903
|
+
var T = Pu(), M = T.firstChild, j = M.nextSibling, J = j.firstChild, V = J.firstChild, R = V.nextSibling, G = R.nextSibling, W = J.nextSibling, fe = W.firstChild, K = fe.nextSibling, c = K.nextSibling, m = W.nextSibling, I = m.firstChild;
|
|
2904
|
+
return d(M, () => b.i18n("sa-add-mfa")), d(V, () => b.i18n("sa-email")), R.$$input = (_) => se(_.currentTarget.value), G.$$click = () => Ne(ie(), "EMAIL"), d(G, () => b.i18n("sa-add-email")), d(fe, () => b.i18n("sa-phone")), K.$$input = (_) => me(_.currentTarget.value), c.$$click = () => Ne(le(), "SMS"), d(c, () => b.i18n("sa-add-sms")), I.$$click = () => Ce(!1), d(I, () => b.i18n("sa-cancel")), y((_) => {
|
|
2905
|
+
var ne = b.i18n("sa-email"), ae = re(), ce = b.i18n("sa-phone"), pe = re();
|
|
2906
|
+
return ne !== _.e && ge(R, "placeholder", _.e = ne), ae !== _.t && (G.disabled = _.t = ae), ce !== _.a && ge(K, "placeholder", _.a = ce), pe !== _.o && (c.disabled = _.o = pe), _;
|
|
2907
2907
|
}, {
|
|
2908
2908
|
e: void 0,
|
|
2909
2909
|
t: void 0,
|
|
2910
2910
|
a: void 0,
|
|
2911
2911
|
o: void 0
|
|
2912
|
-
}), y(() =>
|
|
2912
|
+
}), y(() => R.value = ie()), y(() => K.value = le()), T;
|
|
2913
2913
|
})();
|
|
2914
|
-
})(), null),
|
|
2915
|
-
var
|
|
2916
|
-
return () =>
|
|
2917
|
-
var
|
|
2918
|
-
return
|
|
2919
|
-
var
|
|
2920
|
-
return () =>
|
|
2921
|
-
var
|
|
2922
|
-
return
|
|
2914
|
+
})(), null), d(E, (() => {
|
|
2915
|
+
var h = f(() => !!$e());
|
|
2916
|
+
return () => h() && (() => {
|
|
2917
|
+
var T = zu(), M = T.firstChild, j = M.firstChild, J = j.nextSibling, V = J.nextSibling, R = V.nextSibling, G = R.nextSibling;
|
|
2918
|
+
return T.$$click = () => S(!1), M.$$click = (W) => W.stopPropagation(), j.$$click = () => S(!1), d(M, (() => {
|
|
2919
|
+
var W = f(() => !!s());
|
|
2920
|
+
return () => W() && (() => {
|
|
2921
|
+
var fe = _t();
|
|
2922
|
+
return d(fe, s), fe;
|
|
2923
2923
|
})();
|
|
2924
|
-
})(),
|
|
2924
|
+
})(), V), R.$$input = (W) => Y(W.currentTarget.value), G.$$click = () => Re(oe(), De()), y(() => G.disabled = re()), y(() => R.value = De()), T;
|
|
2925
2925
|
})();
|
|
2926
|
-
})(), null),
|
|
2926
|
+
})(), null), E;
|
|
2927
2927
|
})();
|
|
2928
2928
|
});
|
|
2929
|
-
|
|
2930
|
-
var
|
|
2929
|
+
gt(["click", "input"]);
|
|
2930
|
+
var Nu = /* @__PURE__ */ v(`<form class=invite-frame><style>.invite-frame {
|
|
2931
2931
|
display: flex;
|
|
2932
2932
|
flex-direction: column;
|
|
2933
2933
|
justify-content: center;
|
|
@@ -2987,8 +2987,49 @@ var Mu = /* @__PURE__ */ F(`<form class=invite-frame><style>.invite-frame {
|
|
|
2987
2987
|
margin-bottom: 10px;
|
|
2988
2988
|
display: block;
|
|
2989
2989
|
}
|
|
2990
|
-
|
|
2991
|
-
|
|
2990
|
+
|
|
2991
|
+
.social-divider {
|
|
2992
|
+
display: flex;
|
|
2993
|
+
align-items: center;
|
|
2994
|
+
margin: 20px 0 4px 0;
|
|
2995
|
+
color: #888;
|
|
2996
|
+
font-size: 0.85em;
|
|
2997
|
+
}
|
|
2998
|
+
.social-divider::before, .social-divider::after {
|
|
2999
|
+
content: '';
|
|
3000
|
+
flex: 1;
|
|
3001
|
+
border-bottom: 1px solid #ccc;
|
|
3002
|
+
}
|
|
3003
|
+
.social-divider span {
|
|
3004
|
+
margin: 0 10px;
|
|
3005
|
+
}
|
|
3006
|
+
|
|
3007
|
+
.social-btn {
|
|
3008
|
+
display: flex;
|
|
3009
|
+
align-items: center;
|
|
3010
|
+
justify-content: center;
|
|
3011
|
+
gap: 10px;
|
|
3012
|
+
margin: 8px 0 0 0;
|
|
3013
|
+
padding: 10px;
|
|
3014
|
+
width: 100%;
|
|
3015
|
+
border: 1px solid #ccc;
|
|
3016
|
+
border-radius: 10px;
|
|
3017
|
+
background: #fff;
|
|
3018
|
+
cursor: pointer;
|
|
3019
|
+
font-size: inherit;
|
|
3020
|
+
font-family: inherit;
|
|
3021
|
+
box-sizing: border-box;
|
|
3022
|
+
color: #333;
|
|
3023
|
+
}
|
|
3024
|
+
.social-btn:hover:not(:disabled) {
|
|
3025
|
+
background-color: #f5f5f5;
|
|
3026
|
+
}
|
|
3027
|
+
.social-btn:disabled {
|
|
3028
|
+
opacity: 0.6;
|
|
3029
|
+
cursor: not-allowed;
|
|
3030
|
+
}
|
|
3031
|
+
</style><style></style><h1></h1><input type=text autocomplete=one-time-code required><span class=hint></span><input type=password autocomplete=new-password required minlength=8><span class=hint></span><button type=submit>`), ju = /* @__PURE__ */ v("<span class=info-message>"), Ru = /* @__PURE__ */ v("<span class=error-message>"), Lu = /* @__PURE__ */ v("<span class=success-message>"), Uu = /* @__PURE__ */ v("<div class=social-divider><span>"), qu = /* @__PURE__ */ v("<button type=button class=social-btn>"), Ju = /* @__PURE__ */ v('<svg width=18 height=18 viewBox="0 0 18 18"xmlns=http://www.w3.org/2000/svg><path d="M17.64 9.2c0-.637-.057-1.251-.164-1.84H9v3.481h4.844c-.209 1.125-.843 2.078-1.796 2.717v2.258h2.908c1.702-1.567 2.684-3.875 2.684-6.615z"fill=#4285F4></path><path d="M9 18c2.43 0 4.467-.806 5.956-2.184l-2.908-2.258c-.806.54-1.837.86-3.048.86-2.344 0-4.328-1.584-5.036-3.711H.957v2.332C2.438 15.983 5.482 18 9 18z"fill=#34A853></path><path d="M3.964 10.707c-.18-.54-.282-1.117-.282-1.707s.102-1.167.282-1.707V4.961H.957C.347 6.175 0 7.548 0 9s.348 2.825.957 4.039l3.007-2.332z"fill=#FBBC05></path><path d="M9 3.58c1.321 0 2.508.454 3.44 1.345l2.582-2.58C13.463.891 11.426 0 9 0 5.482 0 2.438 2.017.957 4.961L3.964 7.293C4.672 5.166 6.656 3.58 9 3.58z"fill=#EA4335>'), Vu = /* @__PURE__ */ v('<svg width=18 height=18 viewBox="0 0 16 16"xmlns=http://www.w3.org/2000/svg><path fill-rule=evenodd d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z"fill=currentColor>'), Gu = /* @__PURE__ */ v('<svg width=18 height=18 viewBox="20 16 16 19"xmlns=http://www.w3.org/2000/svg><path d="M28.2226562,20.3846154 C29.0546875,20.3846154 30.0976562,19.8048315 30.71875,19.0317864 C31.28125,18.3312142 31.6914062,17.352829 31.6914062,16.3744437 C31.6914062,16.2415766 31.6796875,16.1087095 31.65625,16 C30.7304687,16.0362365 29.6171875,16.640178 28.9492187,17.4494596 C28.421875,18.06548 27.9414062,19.0317864 27.9414062,20.0222505 C27.9414062,20.1671964 27.9648438,20.3121424 27.9765625,20.3604577 C28.0351562,20.3725366 28.1289062,20.3846154 28.2226562,20.3846154 Z M25.2929688,35 C26.4296875,35 26.9335938,34.214876 28.3515625,34.214876 C29.7929688,34.214876 30.109375,34.9758423 31.375,34.9758423 C32.6171875,34.9758423 33.4492188,33.792117 34.234375,32.6325493 C35.1132812,31.3038779 35.4765625,29.9993643 35.5,29.9389701 C35.4179688,29.9148125 33.0390625,28.9122695 33.0390625,26.0979021 C33.0390625,23.6579784 34.9140625,22.5588048 35.0195312,22.474253 C33.7773438,20.6382708 31.890625,20.5899555 31.375,20.5899555 C29.9804688,20.5899555 28.84375,21.4596313 28.1289062,21.4596313 C27.3554688,21.4596313 26.3359375,20.6382708 25.1289062,20.6382708 C22.8320312,20.6382708 20.5,22.5950413 20.5,26.2911634 C20.5,28.5861411 21.3671875,31.013986 22.4335938,32.5842339 C23.3476562,33.9129053 24.1445312,35 25.2929688,35 Z"fill=currentColor fill-rule=nonzero>'), Ku = /* @__PURE__ */ v('<svg width=18 height=18 viewBox="0 0 24 24"xmlns=http://www.w3.org/2000/svg><path d="M12 1L3 5v6c0 5.55 3.84 10.74 9 12 5.16-1.26 9-6.45 9-12V5l-9-4zm0 4a3 3 0 110 6 3 3 0 010-6zm0 14c-2.5 0-4.71-1.28-6-3.22.03-1.99 4-3.08 6-3.08s5.97 1.09 6 3.08c-1.29 1.94-3.5 3.22-6 3.22z"fill=currentColor>');
|
|
3032
|
+
const Hu = {
|
|
2992
3033
|
domain: "http://127.0.0.1:11000",
|
|
2993
3034
|
sector: "0ad5c3e5-0186-4557-8b32-4b36f247bf09",
|
|
2994
3035
|
// defaults to the admin sector
|
|
@@ -2998,40 +3039,41 @@ const qu = {
|
|
|
2998
3039
|
// email from invite
|
|
2999
3040
|
styles: "",
|
|
3000
3041
|
locale: "en",
|
|
3001
|
-
redirect: ""
|
|
3042
|
+
redirect: "",
|
|
3002
3043
|
// where to redirect after successful completion
|
|
3044
|
+
hideSocial: !1
|
|
3003
3045
|
};
|
|
3004
|
-
|
|
3046
|
+
Dt("spartan-invite", Hu, (e) => {
|
|
3005
3047
|
console.warn("[spartan-invite] <spartan-invite> is deprecated. Use <spartan-login> instead — it now handles invite links by detecting ?sub= URL params automatically.");
|
|
3006
|
-
const [t, n] = w(""), [r,
|
|
3007
|
-
let
|
|
3048
|
+
const [t, n] = w(""), [r, i] = w(""), [s, u] = w(""), [o, A] = w(""), [k, g] = w(!1), [q, Ae] = w([]), [Ce, $e] = w(""), S = mt(e.locale);
|
|
3049
|
+
let re, ue;
|
|
3008
3050
|
try {
|
|
3009
|
-
|
|
3051
|
+
ue = e.styles;
|
|
3010
3052
|
} catch {
|
|
3011
|
-
|
|
3053
|
+
ue = "";
|
|
3012
3054
|
}
|
|
3013
|
-
|
|
3055
|
+
ft(async () => {
|
|
3014
3056
|
e.sub || new URLSearchParams(window.location.search).get("sub") || u("Missing invitation information. Please use the link from your invite email.");
|
|
3015
|
-
const
|
|
3016
|
-
|
|
3057
|
+
const oe = new URLSearchParams(window.location.hash.replace("#", "")).get("otp");
|
|
3058
|
+
oe && n(oe), Fe();
|
|
3017
3059
|
});
|
|
3018
|
-
async function
|
|
3019
|
-
var
|
|
3020
|
-
if (
|
|
3021
|
-
u("Please enter your verification code"),
|
|
3060
|
+
async function ke(B) {
|
|
3061
|
+
var De, Y;
|
|
3062
|
+
if (B.preventDefault(), u(""), A(""), g(!0), !t() || t().trim().length === 0) {
|
|
3063
|
+
u("Please enter your verification code"), g(!1);
|
|
3022
3064
|
return;
|
|
3023
3065
|
}
|
|
3024
3066
|
if (!r() || r().length < 8) {
|
|
3025
|
-
u("Password must be at least 8 characters"),
|
|
3067
|
+
u("Password must be at least 8 characters"), g(!1);
|
|
3026
3068
|
return;
|
|
3027
3069
|
}
|
|
3028
|
-
const
|
|
3029
|
-
if (!
|
|
3030
|
-
u("Missing invitation information"),
|
|
3070
|
+
const oe = new URLSearchParams(window.location.search), H = e.sub || oe.get("sub") || "";
|
|
3071
|
+
if (!H) {
|
|
3072
|
+
u("Missing invitation information"), g(!1);
|
|
3031
3073
|
return;
|
|
3032
3074
|
}
|
|
3033
3075
|
try {
|
|
3034
|
-
const
|
|
3076
|
+
const ie = await fetch(`${e.domain}/api/v1/users/invite/complete`, {
|
|
3035
3077
|
method: "POST",
|
|
3036
3078
|
mode: "cors",
|
|
3037
3079
|
cache: "no-cache",
|
|
@@ -3039,67 +3081,129 @@ gt("spartan-invite", qu, (e) => {
|
|
|
3039
3081
|
"Content-Type": "application/json"
|
|
3040
3082
|
},
|
|
3041
3083
|
body: JSON.stringify({
|
|
3042
|
-
sub:
|
|
3084
|
+
sub: H,
|
|
3043
3085
|
otp: t().toUpperCase().trim(),
|
|
3044
3086
|
password: r(),
|
|
3045
3087
|
sectorID: e.sector
|
|
3046
3088
|
})
|
|
3047
3089
|
});
|
|
3048
|
-
if (
|
|
3049
|
-
const
|
|
3050
|
-
|
|
3051
|
-
const
|
|
3090
|
+
if (ie.ok) {
|
|
3091
|
+
const se = await ie.json();
|
|
3092
|
+
A(S.i18n("sa-invite-success"));
|
|
3093
|
+
const le = new CustomEvent("spartan-invite-complete", {
|
|
3052
3094
|
bubbles: !0,
|
|
3053
3095
|
cancelable: !0,
|
|
3054
3096
|
detail: {
|
|
3055
|
-
sub:
|
|
3097
|
+
sub: H,
|
|
3056
3098
|
success: !0
|
|
3057
3099
|
}
|
|
3058
3100
|
});
|
|
3059
|
-
|
|
3101
|
+
re && re.getRootNode().host.dispatchEvent(le), setTimeout(() => {
|
|
3060
3102
|
e.redirect && e.redirect !== "" && (window.location.href = e.redirect);
|
|
3061
3103
|
}, 2e3);
|
|
3062
3104
|
} else {
|
|
3063
|
-
const
|
|
3064
|
-
|
|
3105
|
+
const se = await ie.json().catch(() => ({}));
|
|
3106
|
+
ie.status === 400 || (De = se.message) != null && De.includes("invalid OTP") ? u(S.i18n("sa-invite-error-otp")) : ie.status === 504 || (Y = se.message) != null && Y.includes("expired") ? u(S.i18n("sa-invite-error-expired")) : u(se.message || S.i18n("sa-invite-error-generic")), g(!1);
|
|
3065
3107
|
}
|
|
3066
|
-
} catch (
|
|
3067
|
-
console.error("Error completing invite:",
|
|
3108
|
+
} catch (ie) {
|
|
3109
|
+
console.error("Error completing invite:", ie), u(S.i18n("sa-invite-error-generic")), g(!1);
|
|
3068
3110
|
}
|
|
3069
3111
|
}
|
|
3112
|
+
function Fe() {
|
|
3113
|
+
e.hideSocial || fetch(`${e.domain}/api/v1/sectors/${e.sector}/oauth/providers`, {
|
|
3114
|
+
method: "GET",
|
|
3115
|
+
mode: "cors",
|
|
3116
|
+
cache: "no-cache"
|
|
3117
|
+
}).then((B) => {
|
|
3118
|
+
if (B.ok) return B.json();
|
|
3119
|
+
throw new Error("Failed to load social providers");
|
|
3120
|
+
}).then((B) => {
|
|
3121
|
+
const oe = (B.providers || []).filter((H) => H.enabled);
|
|
3122
|
+
Ae(oe);
|
|
3123
|
+
}).catch(() => {
|
|
3124
|
+
});
|
|
3125
|
+
}
|
|
3126
|
+
function Be(B) {
|
|
3127
|
+
if (Ce()) return;
|
|
3128
|
+
$e(B), u("");
|
|
3129
|
+
const oe = window.location.origin + window.location.pathname;
|
|
3130
|
+
fetch(`${e.domain}/api/v1/oauth/${B}/initiate`, {
|
|
3131
|
+
method: "POST",
|
|
3132
|
+
mode: "cors",
|
|
3133
|
+
cache: "no-cache",
|
|
3134
|
+
headers: {
|
|
3135
|
+
"Content-Type": "application/json"
|
|
3136
|
+
},
|
|
3137
|
+
body: JSON.stringify({
|
|
3138
|
+
sectorID: e.sector,
|
|
3139
|
+
redirectURI: oe
|
|
3140
|
+
})
|
|
3141
|
+
}).then((H) => {
|
|
3142
|
+
if (H.ok) return H.json();
|
|
3143
|
+
throw new Error(S.i18n("sa-social-error"));
|
|
3144
|
+
}).then((H) => {
|
|
3145
|
+
window.location.href = H.authURL;
|
|
3146
|
+
}).catch((H) => {
|
|
3147
|
+
$e(""), u(H.message);
|
|
3148
|
+
});
|
|
3149
|
+
}
|
|
3070
3150
|
return (() => {
|
|
3071
|
-
var
|
|
3072
|
-
return typeof
|
|
3073
|
-
var
|
|
3074
|
-
return () =>
|
|
3075
|
-
var
|
|
3076
|
-
return
|
|
3151
|
+
var B = Nu(), oe = B.firstChild, H = oe.nextSibling, De = H.nextSibling, Y = De.nextSibling, ie = Y.nextSibling, se = ie.nextSibling, le = se.nextSibling, me = le.nextSibling, b = re;
|
|
3152
|
+
return typeof b == "function" ? jt(b, B) : re = B, B.addEventListener("submit", ke), d(H, ue), d(De, () => S.i18n("sa-complete-invite")), d(B, (() => {
|
|
3153
|
+
var $ = f(() => !!e.email);
|
|
3154
|
+
return () => $() && (() => {
|
|
3155
|
+
var O = ju();
|
|
3156
|
+
return d(O, () => e.email), O;
|
|
3077
3157
|
})();
|
|
3078
|
-
})(),
|
|
3079
|
-
var
|
|
3080
|
-
return () =>
|
|
3081
|
-
var
|
|
3082
|
-
return
|
|
3158
|
+
})(), Y), d(B, (() => {
|
|
3159
|
+
var $ = f(() => !!s());
|
|
3160
|
+
return () => $() && (() => {
|
|
3161
|
+
var O = Ru();
|
|
3162
|
+
return d(O, s), O;
|
|
3083
3163
|
})();
|
|
3084
|
-
})(),
|
|
3085
|
-
var
|
|
3086
|
-
return () =>
|
|
3087
|
-
var
|
|
3088
|
-
return
|
|
3164
|
+
})(), Y), d(B, (() => {
|
|
3165
|
+
var $ = f(() => !!o());
|
|
3166
|
+
return () => $() && (() => {
|
|
3167
|
+
var O = Lu();
|
|
3168
|
+
return d(O, o), O;
|
|
3089
3169
|
})();
|
|
3090
|
-
})(),
|
|
3091
|
-
var
|
|
3092
|
-
return () =>
|
|
3093
|
-
})()),
|
|
3094
|
-
var
|
|
3095
|
-
return
|
|
3170
|
+
})(), Y), Y.$$input = ($) => n($.currentTarget.value), d(ie, () => S.i18n("sa-invite-otp-hint")), se.$$input = ($) => i($.currentTarget.value), d(le, () => S.i18n("sa-invite-password-hint")), d(me, (() => {
|
|
3171
|
+
var $ = f(() => !!k());
|
|
3172
|
+
return () => $() ? S.i18n("sa-invite-completing") : S.i18n("sa-invite-submit");
|
|
3173
|
+
})()), d(B, (() => {
|
|
3174
|
+
var $ = f(() => !e.hideSocial && q().length > 0);
|
|
3175
|
+
return () => $() && [(() => {
|
|
3176
|
+
var O = Uu(), z = O.firstChild;
|
|
3177
|
+
return d(z, () => S.i18n("sa-or")), O;
|
|
3178
|
+
})(), f(() => q().map((O) => (() => {
|
|
3179
|
+
var z = qu();
|
|
3180
|
+
return z.$$click = () => Be(O.provider), d(z, (() => {
|
|
3181
|
+
var te = f(() => O.provider === "google");
|
|
3182
|
+
return () => te() && Ju();
|
|
3183
|
+
})(), null), d(z, (() => {
|
|
3184
|
+
var te = f(() => O.provider === "github");
|
|
3185
|
+
return () => te() && Vu();
|
|
3186
|
+
})(), null), d(z, (() => {
|
|
3187
|
+
var te = f(() => O.provider === "apple");
|
|
3188
|
+
return () => te() && Gu();
|
|
3189
|
+
})(), null), d(z, (() => {
|
|
3190
|
+
var te = f(() => O.provider === "oidc");
|
|
3191
|
+
return () => te() && Ku();
|
|
3192
|
+
})(), null), d(z, (() => {
|
|
3193
|
+
var te = f(() => O.provider === "google");
|
|
3194
|
+
return () => te() ? S.i18n("sa-social-google") : f(() => O.provider === "github")() ? S.i18n("sa-social-github") : f(() => O.provider === "apple")() ? S.i18n("sa-social-apple") : S.i18n("sa-social-oidc");
|
|
3195
|
+
})(), null), y(() => z.disabled = !!Ce() || k()), z;
|
|
3196
|
+
})()))];
|
|
3197
|
+
})(), null), y(($) => {
|
|
3198
|
+
var O = S.i18n("sa-invite-otp"), z = k() || o() !== "", te = S.i18n("sa-invite-password"), Se = k() || o() !== "", Te = k() || o() !== "";
|
|
3199
|
+
return O !== $.e && ge(Y, "placeholder", $.e = O), z !== $.t && (Y.disabled = $.t = z), te !== $.a && ge(se, "placeholder", $.a = te), Se !== $.o && (se.disabled = $.o = Se), Te !== $.i && (me.disabled = $.i = Te), $;
|
|
3096
3200
|
}, {
|
|
3097
3201
|
e: void 0,
|
|
3098
3202
|
t: void 0,
|
|
3099
3203
|
a: void 0,
|
|
3100
3204
|
o: void 0,
|
|
3101
3205
|
i: void 0
|
|
3102
|
-
}), y(() =>
|
|
3206
|
+
}), y(() => Y.value = t()), y(() => se.value = r()), B;
|
|
3103
3207
|
})();
|
|
3104
3208
|
});
|
|
3105
|
-
|
|
3209
|
+
gt(["input", "click"]);
|