@masonitestudios/spartanauth-widgets 0.1.0 → 0.2.0

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.
@@ -1,61 +1,61 @@
1
- const qt = (e, t) => e === t, Ne = {
2
- equals: qt
1
+ const Lt = (e, t) => e === t, ze = {
2
+ equals: Lt
3
3
  };
4
4
  let gt = At;
5
- const Ae = 1, ze = 2, mt = {
5
+ const be = 1, Ne = 2, mt = {
6
6
  owned: null,
7
7
  cleanups: null,
8
8
  context: null,
9
9
  owner: null
10
10
  };
11
- var ne = null;
12
- let Ke = null, Lt = null, q = null, X = null, me = null, Le = 0;
11
+ var ee = null;
12
+ let Ke = null, qt = null, U = null, Y = null, pe = null, qe = 0;
13
13
  function Ut(e, t) {
14
- const n = q, r = ne, u = e.length === 0, s = t === void 0 ? r : t, a = u ? mt : {
14
+ const r = U, n = ee, s = e.length === 0, u = t === void 0 ? n : t, i = s ? mt : {
15
15
  owned: null,
16
16
  cleanups: null,
17
- context: s ? s.context : null,
18
- owner: s
19
- }, i = u ? e : () => e(() => Ue(() => Te(a)));
20
- ne = a, q = null;
17
+ context: u ? u.context : null,
18
+ owner: u
19
+ }, a = s ? e : () => e(() => Ue(() => Oe(i)));
20
+ ee = i, U = null;
21
21
  try {
22
- return Ie(i, !0);
22
+ return Pe(a, !0);
23
23
  } finally {
24
- q = n, ne = r;
24
+ U = r, ee = n;
25
25
  }
26
26
  }
27
- function w(e, t) {
28
- t = t ? Object.assign({}, Ne, t) : Ne;
29
- const n = {
27
+ function $(e, t) {
28
+ t = t ? Object.assign({}, ze, t) : ze;
29
+ const r = {
30
30
  value: e,
31
31
  observers: null,
32
32
  observerSlots: null,
33
33
  comparator: t.equals || void 0
34
- }, r = (u) => (typeof u == "function" && (u = u(n.value)), Ct(n, u));
35
- return [bt.bind(n), r];
34
+ }, n = (s) => (typeof s == "function" && (s = s(r.value)), Ct(r, s));
35
+ return [bt.bind(r), n];
36
36
  }
37
- function T(e, t, n) {
38
- const r = Qe(e, t, !1, Ae);
39
- Oe(r);
37
+ function O(e, t, r) {
38
+ const n = Qe(e, t, !1, be);
39
+ Te(n);
40
40
  }
41
- function Jt(e, t, n) {
42
- gt = Gt;
43
- const r = Qe(e, t, !1, Ae);
44
- r.user = !0, me ? me.push(r) : Oe(r);
41
+ function Jt(e, t, r) {
42
+ gt = Vt;
43
+ const n = Qe(e, t, !1, be);
44
+ n.user = !0, pe ? pe.push(n) : Te(n);
45
45
  }
46
- function F(e, t, n) {
47
- n = n ? Object.assign({}, Ne, n) : Ne;
48
- const r = Qe(e, t, !0, 0);
49
- return r.observers = null, r.observerSlots = null, r.comparator = n.equals || void 0, Oe(r), bt.bind(r);
46
+ function C(e, t, r) {
47
+ r = r ? Object.assign({}, ze, r) : ze;
48
+ const n = Qe(e, t, !0, 0);
49
+ return n.observers = null, n.observerSlots = null, n.comparator = r.equals || void 0, Te(n), bt.bind(n);
50
50
  }
51
51
  function Ue(e) {
52
- if (q === null) return e();
53
- const t = q;
54
- q = null;
52
+ if (U === null) return e();
53
+ const t = U;
54
+ U = null;
55
55
  try {
56
56
  return e();
57
57
  } finally {
58
- q = t;
58
+ U = t;
59
59
  }
60
60
  }
61
61
  function Xe(e) {
@@ -63,141 +63,141 @@ function Xe(e) {
63
63
  }
64
64
  function bt() {
65
65
  if (this.sources && this.state)
66
- if (this.state === Ae) Oe(this);
66
+ if (this.state === be) Te(this);
67
67
  else {
68
- const e = X;
69
- X = null, Ie(() => Re(this), !1), X = e;
68
+ const e = Y;
69
+ Y = null, Pe(() => je(this), !1), Y = e;
70
70
  }
71
- if (q) {
71
+ if (U) {
72
72
  const e = this.observers ? this.observers.length : 0;
73
- 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]);
73
+ U.sources ? (U.sources.push(this), U.sourceSlots.push(e)) : (U.sources = [this], U.sourceSlots = [e]), this.observers ? (this.observers.push(U), this.observerSlots.push(U.sources.length - 1)) : (this.observers = [U], this.observerSlots = [U.sources.length - 1]);
74
74
  }
75
75
  return this.value;
76
76
  }
77
- function Ct(e, t, n) {
78
- let r = e.value;
79
- return (!e.comparator || !e.comparator(r, t)) && (e.value = t, e.observers && e.observers.length && Ie(() => {
80
- for (let u = 0; u < e.observers.length; u += 1) {
81
- const s = e.observers[u], a = Ke && Ke.running;
82
- a && Ke.disposed.has(s), (a ? !s.tState : !s.state) && (s.pure ? X.push(s) : me.push(s), s.observers && Ft(s)), a || (s.state = Ae);
77
+ function Ct(e, t, r) {
78
+ let n = e.value;
79
+ return (!e.comparator || !e.comparator(n, t)) && (e.value = t, e.observers && e.observers.length && Pe(() => {
80
+ for (let s = 0; s < e.observers.length; s += 1) {
81
+ const u = e.observers[s], i = Ke && Ke.running;
82
+ i && Ke.disposed.has(u), (i ? !u.tState : !u.state) && (u.pure ? Y.push(u) : pe.push(u), u.observers && vt(u)), i || (u.state = be);
83
83
  }
84
- if (X.length > 1e6)
85
- throw X = [], new Error();
84
+ if (Y.length > 1e6)
85
+ throw Y = [], new Error();
86
86
  }, !1)), t;
87
87
  }
88
- function Oe(e) {
88
+ function Te(e) {
89
89
  if (!e.fn) return;
90
- Te(e);
91
- const t = Le;
90
+ Oe(e);
91
+ const t = qe;
92
92
  Kt(
93
93
  e,
94
94
  e.value,
95
95
  t
96
96
  );
97
97
  }
98
- function Kt(e, t, n) {
99
- let r;
100
- const u = ne, s = q;
101
- q = ne = e;
98
+ function Kt(e, t, r) {
99
+ let n;
100
+ const s = ee, u = U;
101
+ U = ee = e;
102
102
  try {
103
- r = e.fn(t);
104
- } catch (a) {
105
- return e.pure && (e.state = Ae, e.owned && e.owned.forEach(Te), e.owned = null), e.updatedAt = n + 1, Et(a);
103
+ n = e.fn(t);
104
+ } catch (i) {
105
+ return e.pure && (e.state = be, e.owned && e.owned.forEach(Oe), e.owned = null), e.updatedAt = r + 1, Ft(i);
106
106
  } finally {
107
- q = s, ne = u;
107
+ U = u, ee = s;
108
108
  }
109
- (!e.updatedAt || e.updatedAt <= n) && (e.updatedAt != null && "observers" in e ? Ct(e, r) : e.value = r, e.updatedAt = n);
109
+ (!e.updatedAt || e.updatedAt <= r) && (e.updatedAt != null && "observers" in e ? Ct(e, n) : e.value = n, e.updatedAt = r);
110
110
  }
111
- function Qe(e, t, n, r = Ae, u) {
112
- const s = {
111
+ function Qe(e, t, r, n = be, s) {
112
+ const u = {
113
113
  fn: e,
114
- state: r,
114
+ state: n,
115
115
  updatedAt: null,
116
116
  owned: null,
117
117
  sources: null,
118
118
  sourceSlots: null,
119
119
  cleanups: null,
120
120
  value: t,
121
- owner: ne,
122
- context: ne ? ne.context : null,
123
- pure: n
121
+ owner: ee,
122
+ context: ee ? ee.context : null,
123
+ pure: r
124
124
  };
125
- return ne === null || ne !== mt && (ne.owned ? ne.owned.push(s) : ne.owned = [s]), s;
125
+ return ee === null || ee !== mt && (ee.owned ? ee.owned.push(u) : ee.owned = [u]), u;
126
126
  }
127
127
  function Me(e) {
128
128
  if (e.state === 0) return;
129
- if (e.state === ze) return Re(e);
129
+ if (e.state === Ne) return je(e);
130
130
  if (e.suspense && Ue(e.suspense.inFallback)) return e.suspense.effects.push(e);
131
131
  const t = [e];
132
- for (; (e = e.owner) && (!e.updatedAt || e.updatedAt < Le); )
132
+ for (; (e = e.owner) && (!e.updatedAt || e.updatedAt < qe); )
133
133
  e.state && t.push(e);
134
- for (let n = t.length - 1; n >= 0; n--)
135
- if (e = t[n], e.state === Ae)
136
- Oe(e);
137
- else if (e.state === ze) {
138
- const r = X;
139
- X = null, Ie(() => Re(e, t[0]), !1), X = r;
134
+ for (let r = t.length - 1; r >= 0; r--)
135
+ if (e = t[r], e.state === be)
136
+ Te(e);
137
+ else if (e.state === Ne) {
138
+ const n = Y;
139
+ Y = null, Pe(() => je(e, t[0]), !1), Y = n;
140
140
  }
141
141
  }
142
- function Ie(e, t) {
143
- if (X) return e();
144
- let n = !1;
145
- t || (X = []), me ? n = !0 : me = [], Le++;
142
+ function Pe(e, t) {
143
+ if (Y) return e();
144
+ let r = !1;
145
+ t || (Y = []), pe ? r = !0 : pe = [], qe++;
146
146
  try {
147
- const r = e();
148
- return Vt(n), r;
149
- } catch (r) {
150
- n || (me = null), X = null, Et(r);
147
+ const n = e();
148
+ return Gt(r), n;
149
+ } catch (n) {
150
+ r || (pe = null), Y = null, Ft(n);
151
151
  }
152
152
  }
153
- function Vt(e) {
154
- if (X && (At(X), X = null), e) return;
155
- const t = me;
156
- me = null, t.length && Ie(() => gt(t), !1);
153
+ function Gt(e) {
154
+ if (Y && (At(Y), Y = null), e) return;
155
+ const t = pe;
156
+ pe = null, t.length && Pe(() => gt(t), !1);
157
157
  }
158
158
  function At(e) {
159
159
  for (let t = 0; t < e.length; t++) Me(e[t]);
160
160
  }
161
- function Gt(e) {
162
- let t, n = 0;
161
+ function Vt(e) {
162
+ let t, r = 0;
163
163
  for (t = 0; t < e.length; t++) {
164
- const r = e[t];
165
- r.user ? e[n++] = r : Me(r);
164
+ const n = e[t];
165
+ n.user ? e[r++] = n : Me(n);
166
166
  }
167
- for (t = 0; t < n; t++) Me(e[t]);
167
+ for (t = 0; t < r; t++) Me(e[t]);
168
168
  }
169
- function Re(e, t) {
169
+ function je(e, t) {
170
170
  e.state = 0;
171
- for (let n = 0; n < e.sources.length; n += 1) {
172
- const r = e.sources[n];
173
- if (r.sources) {
174
- const u = r.state;
175
- u === Ae ? r !== t && (!r.updatedAt || r.updatedAt < Le) && Me(r) : u === ze && Re(r, t);
171
+ for (let r = 0; r < e.sources.length; r += 1) {
172
+ const n = e.sources[r];
173
+ if (n.sources) {
174
+ const s = n.state;
175
+ s === be ? n !== t && (!n.updatedAt || n.updatedAt < qe) && Me(n) : s === Ne && je(n, t);
176
176
  }
177
177
  }
178
178
  }
179
- function Ft(e) {
179
+ function vt(e) {
180
180
  for (let t = 0; t < e.observers.length; t += 1) {
181
- const n = e.observers[t];
182
- n.state || (n.state = ze, n.pure ? X.push(n) : me.push(n), n.observers && Ft(n));
181
+ const r = e.observers[t];
182
+ r.state || (r.state = Ne, r.pure ? Y.push(r) : pe.push(r), r.observers && vt(r));
183
183
  }
184
184
  }
185
- function Te(e) {
185
+ function Oe(e) {
186
186
  let t;
187
187
  if (e.sources)
188
188
  for (; e.sources.length; ) {
189
- const n = e.sources.pop(), r = e.sourceSlots.pop(), u = n.observers;
190
- if (u && u.length) {
191
- const s = u.pop(), a = n.observerSlots.pop();
192
- r < u.length && (s.sourceSlots[a] = r, u[r] = s, n.observerSlots[r] = a);
189
+ const r = e.sources.pop(), n = e.sourceSlots.pop(), s = r.observers;
190
+ if (s && s.length) {
191
+ const u = s.pop(), i = r.observerSlots.pop();
192
+ n < s.length && (u.sourceSlots[i] = n, s[n] = u, r.observerSlots[n] = i);
193
193
  }
194
194
  }
195
195
  if (e.tOwned) {
196
- for (t = e.tOwned.length - 1; t >= 0; t--) Te(e.tOwned[t]);
196
+ for (t = e.tOwned.length - 1; t >= 0; t--) Oe(e.tOwned[t]);
197
197
  delete e.tOwned;
198
198
  }
199
199
  if (e.owned) {
200
- for (t = e.owned.length - 1; t >= 0; t--) Te(e.owned[t]);
200
+ for (t = e.owned.length - 1; t >= 0; t--) Oe(e.owned[t]);
201
201
  e.owned = null;
202
202
  }
203
203
  if (e.cleanups) {
@@ -206,93 +206,93 @@ function Te(e) {
206
206
  }
207
207
  e.state = 0;
208
208
  }
209
- function Wt(e) {
209
+ function Ht(e) {
210
210
  return e instanceof Error ? e : new Error(typeof e == "string" ? e : "Unknown error", {
211
211
  cause: e
212
212
  });
213
213
  }
214
- function Et(e, t = ne) {
215
- throw Wt(e);
214
+ function Ft(e, t = ee) {
215
+ throw Ht(e);
216
216
  }
217
- function Ht(e, t, n) {
218
- let r = n.length, u = t.length, s = r, a = 0, i = 0, C = t[u - 1].nextSibling, y = null;
219
- for (; a < u || i < s; ) {
220
- if (t[a] === n[i]) {
221
- a++, i++;
217
+ function Wt(e, t, r) {
218
+ let n = r.length, s = t.length, u = n, i = 0, a = 0, F = t[s - 1].nextSibling, k = null;
219
+ for (; i < s || a < u; ) {
220
+ if (t[i] === r[a]) {
221
+ i++, a++;
222
222
  continue;
223
223
  }
224
- for (; t[u - 1] === n[s - 1]; )
225
- u--, s--;
226
- if (u === a) {
227
- const p = s < r ? i ? n[i - 1].nextSibling : n[s - i] : C;
228
- for (; i < s; ) e.insertBefore(n[i++], p);
229
- } else if (s === i)
230
- for (; a < u; )
231
- (!y || !y.has(t[a])) && t[a].remove(), a++;
232
- else if (t[a] === n[s - 1] && n[i] === t[u - 1]) {
233
- const p = t[--u].nextSibling;
234
- e.insertBefore(n[i++], t[a++].nextSibling), e.insertBefore(n[--s], p), t[u] = n[s];
224
+ for (; t[s - 1] === r[u - 1]; )
225
+ s--, u--;
226
+ if (s === i) {
227
+ const p = u < n ? a ? r[a - 1].nextSibling : r[u - a] : F;
228
+ for (; a < u; ) e.insertBefore(r[a++], p);
229
+ } else if (u === a)
230
+ for (; i < s; )
231
+ (!k || !k.has(t[i])) && t[i].remove(), i++;
232
+ else if (t[i] === r[u - 1] && r[a] === t[s - 1]) {
233
+ const p = t[--s].nextSibling;
234
+ e.insertBefore(r[a++], t[i++].nextSibling), e.insertBefore(r[--u], p), t[s] = r[u];
235
235
  } else {
236
- if (!y) {
237
- y = /* @__PURE__ */ new Map();
238
- let S = i;
239
- for (; S < s; ) y.set(n[S], S++);
236
+ if (!k) {
237
+ k = /* @__PURE__ */ new Map();
238
+ let S = a;
239
+ for (; S < u; ) k.set(r[S], S++);
240
240
  }
241
- const p = y.get(t[a]);
241
+ const p = k.get(t[i]);
242
242
  if (p != null)
243
- if (i < p && p < s) {
244
- let S = a, re = 1, ae;
245
- for (; ++S < u && S < s && !((ae = y.get(t[S])) == null || ae !== p + re); )
246
- re++;
247
- if (re > p - i) {
248
- const de = t[a];
249
- for (; i < p; ) e.insertBefore(n[i++], de);
250
- } else e.replaceChild(n[i++], t[a++]);
251
- } else a++;
252
- else t[a++].remove();
243
+ if (a < p && p < u) {
244
+ let S = i, X = 1, te;
245
+ for (; ++S < s && S < u && !((te = k.get(t[S])) == null || te !== p + X); )
246
+ X++;
247
+ if (X > p - a) {
248
+ const he = t[i];
249
+ for (; a < p; ) e.insertBefore(r[a++], he);
250
+ } else e.replaceChild(r[a++], t[i++]);
251
+ } else i++;
252
+ else t[i++].remove();
253
253
  }
254
254
  }
255
255
  }
256
- const at = "_$DX_DELEGATE";
257
- function x(e, t, n, r) {
258
- let u;
259
- const s = () => {
260
- const i = document.createElement("template");
261
- return i.innerHTML = e, i.content.firstChild;
262
- }, a = () => (u || (u = s())).cloneNode(!0);
263
- return a.cloneNode = a, a;
256
+ const it = "_$DX_DELEGATE";
257
+ function B(e, t, r, n) {
258
+ let s;
259
+ const u = () => {
260
+ const a = document.createElement("template");
261
+ return a.innerHTML = e, a.content.firstChild;
262
+ }, i = () => (s || (s = u())).cloneNode(!0);
263
+ return i.cloneNode = i, i;
264
264
  }
265
265
  function et(e, t = window.document) {
266
- const n = t[at] || (t[at] = /* @__PURE__ */ new Set());
267
- for (let r = 0, u = e.length; r < u; r++) {
268
- const s = e[r];
269
- n.has(s) || (n.add(s), t.addEventListener(s, Zt));
266
+ const r = t[it] || (t[it] = /* @__PURE__ */ new Set());
267
+ for (let n = 0, s = e.length; n < s; n++) {
268
+ const u = e[n];
269
+ r.has(u) || (r.add(u), t.addEventListener(u, Zt));
270
270
  }
271
271
  }
272
- function ce(e, t, n) {
273
- n == null ? e.removeAttribute(t) : e.setAttribute(t, n);
272
+ function oe(e, t, r) {
273
+ r == null ? e.removeAttribute(t) : e.setAttribute(t, r);
274
274
  }
275
- function vt(e, t, n) {
276
- return Ue(() => e(t, n));
275
+ function Et(e, t, r) {
276
+ return Ue(() => e(t, r));
277
277
  }
278
- function c(e, t, n, r) {
279
- if (n !== void 0 && !r && (r = []), typeof t != "function") return je(e, t, r, n);
280
- T((u) => je(e, t(), u, n), r);
278
+ function d(e, t, r, n) {
279
+ if (r !== void 0 && !n && (n = []), typeof t != "function") return Re(e, t, n, r);
280
+ O((s) => Re(e, t(), s, r), n);
281
281
  }
282
282
  function Zt(e) {
283
283
  let t = e.target;
284
- const n = `$$${e.type}`, r = e.target, u = e.currentTarget, s = (C) => Object.defineProperty(e, "target", {
284
+ const r = `$$${e.type}`, n = e.target, s = e.currentTarget, u = (F) => Object.defineProperty(e, "target", {
285
285
  configurable: !0,
286
- value: C
287
- }), a = () => {
288
- const C = t[n];
289
- if (C && !t.disabled) {
290
- const y = t[`${n}Data`];
291
- if (y !== void 0 ? C.call(t, y, e) : C.call(t, e), e.cancelBubble) return;
286
+ value: F
287
+ }), i = () => {
288
+ const F = t[r];
289
+ if (F && !t.disabled) {
290
+ const k = t[`${r}Data`];
291
+ if (k !== void 0 ? F.call(t, k, e) : F.call(t, e), e.cancelBubble) return;
292
292
  }
293
- return t.host && typeof t.host != "string" && !t.host._$host && t.contains(e.target) && s(t.host), !0;
294
- }, i = () => {
295
- for (; a() && (t = t._$host || t.parentNode || t.host); ) ;
293
+ return t.host && typeof t.host != "string" && !t.host._$host && t.contains(e.target) && u(t.host), !0;
294
+ }, a = () => {
295
+ for (; i() && (t = t._$host || t.parentNode || t.host); ) ;
296
296
  };
297
297
  if (Object.defineProperty(e, "currentTarget", {
298
298
  configurable: !0,
@@ -300,136 +300,136 @@ function Zt(e) {
300
300
  return t || document;
301
301
  }
302
302
  }), e.composedPath) {
303
- const C = e.composedPath();
304
- s(C[0]);
305
- for (let y = 0; y < C.length - 2 && (t = C[y], !!a()); y++) {
303
+ const F = e.composedPath();
304
+ u(F[0]);
305
+ for (let k = 0; k < F.length - 2 && (t = F[k], !!i()); k++) {
306
306
  if (t._$host) {
307
- t = t._$host, i();
307
+ t = t._$host, a();
308
308
  break;
309
309
  }
310
- if (t.parentNode === u)
310
+ if (t.parentNode === s)
311
311
  break;
312
312
  }
313
- } else i();
314
- s(r);
315
- }
316
- function je(e, t, n, r, u) {
317
- for (; typeof n == "function"; ) n = n();
318
- if (t === n) return n;
319
- const s = typeof t, a = r !== void 0;
320
- if (e = a && n[0] && n[0].parentNode || e, s === "string" || s === "number") {
321
- if (s === "number" && (t = t.toString(), t === n))
322
- return n;
323
- if (a) {
324
- let i = n[0];
325
- i && i.nodeType === 3 ? i.data !== t && (i.data = t) : i = document.createTextNode(t), n = we(e, n, r, i);
313
+ } else a();
314
+ u(n);
315
+ }
316
+ function Re(e, t, r, n, s) {
317
+ for (; typeof r == "function"; ) r = r();
318
+ if (t === r) return r;
319
+ const u = typeof t, i = n !== void 0;
320
+ if (e = i && r[0] && r[0].parentNode || e, u === "string" || u === "number") {
321
+ if (u === "number" && (t = t.toString(), t === r))
322
+ return r;
323
+ if (i) {
324
+ let a = r[0];
325
+ a && a.nodeType === 3 ? a.data !== t && (a.data = t) : a = document.createTextNode(t), r = Be(e, r, n, a);
326
326
  } else
327
- n !== "" && typeof n == "string" ? n = e.firstChild.data = t : n = e.textContent = t;
328
- } else if (t == null || s === "boolean")
329
- n = we(e, n, r);
327
+ r !== "" && typeof r == "string" ? r = e.firstChild.data = t : r = e.textContent = t;
328
+ } else if (t == null || u === "boolean")
329
+ r = Be(e, r, n);
330
330
  else {
331
- if (s === "function")
332
- return T(() => {
333
- let i = t();
334
- for (; typeof i == "function"; ) i = i();
335
- n = je(e, i, n, r);
336
- }), () => n;
331
+ if (u === "function")
332
+ return O(() => {
333
+ let a = t();
334
+ for (; typeof a == "function"; ) a = a();
335
+ r = Re(e, a, r, n);
336
+ }), () => r;
337
337
  if (Array.isArray(t)) {
338
- const i = [], C = n && Array.isArray(n);
339
- if (He(i, t, n, u))
340
- return T(() => n = je(e, i, n, r, !0)), () => n;
341
- if (i.length === 0) {
342
- if (n = we(e, n, r), a) return n;
343
- } else C ? n.length === 0 ? it(e, i, r) : Ht(e, n, i) : (n && we(e), it(e, i));
344
- n = i;
338
+ const a = [], F = r && Array.isArray(r);
339
+ if (We(a, t, r, s))
340
+ return O(() => r = Re(e, a, r, n, !0)), () => r;
341
+ if (a.length === 0) {
342
+ if (r = Be(e, r, n), i) return r;
343
+ } else F ? r.length === 0 ? at(e, a, n) : Wt(e, r, a) : (r && Be(e), at(e, a));
344
+ r = a;
345
345
  } else if (t.nodeType) {
346
- if (Array.isArray(n)) {
347
- if (a) return n = we(e, n, r, t);
348
- we(e, n, null, t);
349
- } else n == null || n === "" || !e.firstChild ? e.appendChild(t) : e.replaceChild(t, e.firstChild);
350
- n = t;
346
+ if (Array.isArray(r)) {
347
+ if (i) return r = Be(e, r, n, t);
348
+ Be(e, r, null, t);
349
+ } else r == null || r === "" || !e.firstChild ? e.appendChild(t) : e.replaceChild(t, e.firstChild);
350
+ r = t;
351
351
  }
352
352
  }
353
- return n;
354
- }
355
- function He(e, t, n, r) {
356
- let u = !1;
357
- for (let s = 0, a = t.length; s < a; s++) {
358
- let i = t[s], C = n && n[e.length], y;
359
- if (!(i == null || i === !0 || i === !1)) if ((y = typeof i) == "object" && i.nodeType)
360
- e.push(i);
361
- else if (Array.isArray(i))
362
- u = He(e, i, C) || u;
363
- else if (y === "function")
364
- if (r) {
365
- for (; typeof i == "function"; ) i = i();
366
- u = He(
353
+ return r;
354
+ }
355
+ function We(e, t, r, n) {
356
+ let s = !1;
357
+ for (let u = 0, i = t.length; u < i; u++) {
358
+ let a = t[u], F = r && r[e.length], k;
359
+ if (!(a == null || a === !0 || a === !1)) if ((k = typeof a) == "object" && a.nodeType)
360
+ e.push(a);
361
+ else if (Array.isArray(a))
362
+ s = We(e, a, F) || s;
363
+ else if (k === "function")
364
+ if (n) {
365
+ for (; typeof a == "function"; ) a = a();
366
+ s = We(
367
367
  e,
368
- Array.isArray(i) ? i : [i],
369
- Array.isArray(C) ? C : [C]
370
- ) || u;
368
+ Array.isArray(a) ? a : [a],
369
+ Array.isArray(F) ? F : [F]
370
+ ) || s;
371
371
  } else
372
- e.push(i), u = !0;
372
+ e.push(a), s = !0;
373
373
  else {
374
- const p = String(i);
375
- C && C.nodeType === 3 && C.data === p ? e.push(C) : e.push(document.createTextNode(p));
374
+ const p = String(a);
375
+ F && F.nodeType === 3 && F.data === p ? e.push(F) : e.push(document.createTextNode(p));
376
376
  }
377
377
  }
378
- return u;
378
+ return s;
379
379
  }
380
- function it(e, t, n = null) {
381
- for (let r = 0, u = t.length; r < u; r++) e.insertBefore(t[r], n);
380
+ function at(e, t, r = null) {
381
+ for (let n = 0, s = t.length; n < s; n++) e.insertBefore(t[n], r);
382
382
  }
383
- function we(e, t, n, r) {
384
- if (n === void 0) return e.textContent = "";
385
- const u = r || document.createTextNode("");
383
+ function Be(e, t, r, n) {
384
+ if (r === void 0) return e.textContent = "";
385
+ const s = n || document.createTextNode("");
386
386
  if (t.length) {
387
- let s = !1;
388
- for (let a = t.length - 1; a >= 0; a--) {
389
- const i = t[a];
390
- if (u !== i) {
391
- const C = i.parentNode === e;
392
- !s && !a ? C ? e.replaceChild(u, i) : e.insertBefore(u, n) : C && i.remove();
393
- } else s = !0;
387
+ let u = !1;
388
+ for (let i = t.length - 1; i >= 0; i--) {
389
+ const a = t[i];
390
+ if (s !== a) {
391
+ const F = a.parentNode === e;
392
+ !u && !i ? F ? e.replaceChild(s, a) : e.insertBefore(s, r) : F && a.remove();
393
+ } else u = !0;
394
394
  }
395
- } else e.insertBefore(u, n);
396
- return [u];
395
+ } else e.insertBefore(s, r);
396
+ return [s];
397
397
  }
398
398
  function Yt(e) {
399
- return Object.keys(e).reduce((n, r) => {
400
- const u = e[r];
401
- return n[r] = Object.assign({}, u), yt(u.value) && !nn(u.value) && !Array.isArray(u.value) && (n[r].value = Object.assign({}, u.value)), Array.isArray(u.value) && (n[r].value = u.value.slice(0)), n;
399
+ return Object.keys(e).reduce((r, n) => {
400
+ const s = e[n];
401
+ return r[n] = Object.assign({}, s), yt(s.value) && !rr(s.value) && !Array.isArray(s.value) && (r[n].value = Object.assign({}, s.value)), Array.isArray(s.value) && (r[n].value = s.value.slice(0)), r;
402
402
  }, {});
403
403
  }
404
404
  function Xt(e) {
405
- return e ? Object.keys(e).reduce((n, r) => {
406
- const u = e[r];
407
- return n[r] = yt(u) && "value" in u ? u : {
408
- value: u
409
- }, n[r].attribute || (n[r].attribute = tn(r)), n[r].parse = "parse" in n[r] ? n[r].parse : typeof n[r].value != "string", n;
405
+ return e ? Object.keys(e).reduce((r, n) => {
406
+ const s = e[n];
407
+ return r[n] = yt(s) && "value" in s ? s : {
408
+ value: s
409
+ }, r[n].attribute || (r[n].attribute = tr(n)), r[n].parse = "parse" in r[n] ? r[n].parse : typeof r[n].value != "string", r;
410
410
  }, {}) : {};
411
411
  }
412
412
  function Qt(e) {
413
- return Object.keys(e).reduce((n, r) => (n[r] = e[r].value, n), {});
413
+ return Object.keys(e).reduce((r, n) => (r[n] = e[n].value, r), {});
414
414
  }
415
- function en(e, t) {
416
- const n = Yt(t);
417
- return Object.keys(t).forEach((u) => {
418
- const s = n[u], a = e.getAttribute(s.attribute), i = e[u];
419
- a != null && (s.value = s.parse ? wt(a) : a), i != null && (s.value = Array.isArray(i) ? i.slice(0) : i), s.reflect && ot(e, s.attribute, s.value, !!s.parse), Object.defineProperty(e, u, {
415
+ function er(e, t) {
416
+ const r = Yt(t);
417
+ return Object.keys(t).forEach((s) => {
418
+ const u = r[s], i = e.getAttribute(u.attribute), a = e[s];
419
+ i != null && (u.value = u.parse ? wt(i) : i), a != null && (u.value = Array.isArray(a) ? a.slice(0) : a), u.reflect && ot(e, u.attribute, u.value, !!u.parse), Object.defineProperty(e, s, {
420
420
  get() {
421
- return s.value;
421
+ return u.value;
422
422
  },
423
- set(C) {
424
- const y = s.value;
425
- s.value = C, s.reflect && ot(this, s.attribute, s.value, !!s.parse);
423
+ set(F) {
424
+ const k = u.value;
425
+ u.value = F, u.reflect && ot(this, u.attribute, u.value, !!u.parse);
426
426
  for (let p = 0, S = this.__propertyChangedCallbacks.length; p < S; p++)
427
- this.__propertyChangedCallbacks[p](u, C, y);
427
+ this.__propertyChangedCallbacks[p](s, F, k);
428
428
  },
429
429
  enumerable: !0,
430
430
  configurable: !0
431
431
  });
432
- }), n;
432
+ }), r;
433
433
  }
434
434
  function wt(e) {
435
435
  if (e)
@@ -439,163 +439,163 @@ function wt(e) {
439
439
  return e;
440
440
  }
441
441
  }
442
- function ot(e, t, n, r) {
443
- if (n == null || n === !1) return e.removeAttribute(t);
444
- let u = r ? JSON.stringify(n) : n;
445
- e.__updating[t] = !0, u === "true" && (u = ""), e.setAttribute(t, u), Promise.resolve().then(() => delete e.__updating[t]);
442
+ function ot(e, t, r, n) {
443
+ if (r == null || r === !1) return e.removeAttribute(t);
444
+ let s = n ? JSON.stringify(r) : r;
445
+ e.__updating[t] = !0, s === "true" && (s = ""), e.setAttribute(t, s), Promise.resolve().then(() => delete e.__updating[t]);
446
446
  }
447
- function tn(e) {
448
- return e.replace(/\.?([A-Z]+)/g, (t, n) => "-" + n.toLowerCase()).replace("_", "-").replace(/^-/, "");
447
+ function tr(e) {
448
+ return e.replace(/\.?([A-Z]+)/g, (t, r) => "-" + r.toLowerCase()).replace("_", "-").replace(/^-/, "");
449
449
  }
450
450
  function yt(e) {
451
451
  return e != null && (typeof e == "object" || typeof e == "function");
452
452
  }
453
- function nn(e) {
453
+ function rr(e) {
454
454
  return Object.prototype.toString.call(e) === "[object Function]";
455
455
  }
456
- function rn(e) {
456
+ function nr(e) {
457
457
  return typeof e == "function" && e.toString().indexOf("class") === 0;
458
458
  }
459
- let Ve;
460
- function un(e, t) {
461
- const n = Object.keys(t);
459
+ let Ge;
460
+ function sr(e, t) {
461
+ const r = Object.keys(t);
462
462
  return class extends e {
463
463
  static get observedAttributes() {
464
- return n.map((u) => t[u].attribute);
464
+ return r.map((s) => t[s].attribute);
465
465
  }
466
466
  constructor() {
467
467
  super(), this.__initialized = !1, this.__released = !1, this.__releaseCallbacks = [], this.__propertyChangedCallbacks = [], this.__updating = {}, this.props = {};
468
468
  }
469
469
  connectedCallback() {
470
470
  if (this.__initialized) return;
471
- this.__releaseCallbacks = [], this.__propertyChangedCallbacks = [], this.__updating = {}, this.props = en(this, t);
472
- const u = Qt(this.props), s = this.Component, a = Ve;
471
+ this.__releaseCallbacks = [], this.__propertyChangedCallbacks = [], this.__updating = {}, this.props = er(this, t);
472
+ const s = Qt(this.props), u = this.Component, i = Ge;
473
473
  try {
474
- Ve = this, this.__initialized = !0, rn(s) ? new s(u, {
474
+ Ge = this, this.__initialized = !0, nr(u) ? new u(s, {
475
475
  element: this
476
- }) : s(u, {
476
+ }) : u(s, {
477
477
  element: this
478
478
  });
479
479
  } finally {
480
- Ve = a;
480
+ Ge = i;
481
481
  }
482
482
  }
483
483
  async disconnectedCallback() {
484
484
  if (await Promise.resolve(), this.isConnected) return;
485
485
  this.__propertyChangedCallbacks.length = 0;
486
- let u = null;
487
- for (; u = this.__releaseCallbacks.pop(); ) u(this);
486
+ let s = null;
487
+ for (; s = this.__releaseCallbacks.pop(); ) s(this);
488
488
  delete this.__initialized, this.__released = !0;
489
489
  }
490
- attributeChangedCallback(u, s, a) {
491
- if (this.__initialized && !this.__updating[u] && (u = this.lookupProp(u), u in t)) {
492
- if (a == null && !this[u]) return;
493
- this[u] = t[u].parse ? wt(a) : a;
490
+ attributeChangedCallback(s, u, i) {
491
+ if (this.__initialized && !this.__updating[s] && (s = this.lookupProp(s), s in t)) {
492
+ if (i == null && !this[s]) return;
493
+ this[s] = t[s].parse ? wt(i) : i;
494
494
  }
495
495
  }
496
- lookupProp(u) {
496
+ lookupProp(s) {
497
497
  if (t)
498
- return n.find((s) => u === s || u === t[s].attribute);
498
+ return r.find((u) => s === u || s === t[u].attribute);
499
499
  }
500
500
  get renderRoot() {
501
501
  return this.shadowRoot || this.attachShadow({
502
502
  mode: "open"
503
503
  });
504
504
  }
505
- addReleaseCallback(u) {
506
- this.__releaseCallbacks.push(u);
505
+ addReleaseCallback(s) {
506
+ this.__releaseCallbacks.push(s);
507
507
  }
508
- addPropertyChangedCallback(u) {
509
- this.__propertyChangedCallbacks.push(u);
508
+ addPropertyChangedCallback(s) {
509
+ this.__propertyChangedCallbacks.push(s);
510
510
  }
511
511
  };
512
512
  }
513
- function sn(e, t = {}, n = {}) {
513
+ function ur(e, t = {}, r = {}) {
514
514
  const {
515
- BaseElement: r = HTMLElement,
516
- extension: u,
517
- customElements: s = window.customElements
518
- } = n;
519
- return (a) => {
515
+ BaseElement: n = HTMLElement,
516
+ extension: s,
517
+ customElements: u = window.customElements
518
+ } = r;
519
+ return (i) => {
520
520
  if (!e) throw new Error("tag is required to register a Component");
521
- let i = s.get(e);
522
- return i ? (i.prototype.Component = a, i) : (i = un(r, Xt(t)), i.prototype.Component = a, i.prototype.registeredTag = e, s.define(e, i, u), i);
521
+ let a = u.get(e);
522
+ return a ? (a.prototype.Component = i, a) : (a = sr(n, Xt(t)), a.prototype.Component = i, a.prototype.registeredTag = e, u.define(e, a, s), a);
523
523
  };
524
524
  }
525
- function an(e) {
526
- const t = Object.keys(e), n = {};
527
- for (let r = 0; r < t.length; r++) {
528
- const [u, s] = w(e[t[r]]);
529
- Object.defineProperty(n, t[r], {
530
- get: u,
531
- set(a) {
532
- s(() => a);
525
+ function ir(e) {
526
+ const t = Object.keys(e), r = {};
527
+ for (let n = 0; n < t.length; n++) {
528
+ const [s, u] = $(e[t[n]]);
529
+ Object.defineProperty(r, t[n], {
530
+ get: s,
531
+ set(i) {
532
+ u(() => i);
533
533
  }
534
534
  });
535
535
  }
536
- return n;
536
+ return r;
537
537
  }
538
- function on(e) {
538
+ function ar(e) {
539
539
  if (e.assignedSlot && e.assignedSlot._$owner) return e.assignedSlot._$owner;
540
540
  let t = e.parentNode;
541
541
  for (; t && !t._$owner && !(t.assignedSlot && t.assignedSlot._$owner); )
542
542
  t = t.parentNode;
543
543
  return t && t.assignedSlot ? t.assignedSlot._$owner : e._$owner;
544
544
  }
545
- function ln(e) {
546
- return (t, n) => {
547
- const { element: r } = n;
548
- return Ut((u) => {
549
- const s = an(t);
550
- r.addPropertyChangedCallback((i, C) => s[i] = C), r.addReleaseCallback(() => {
551
- r.renderRoot.textContent = "", u();
545
+ function or(e) {
546
+ return (t, r) => {
547
+ const { element: n } = r;
548
+ return Ut((s) => {
549
+ const u = ir(t);
550
+ n.addPropertyChangedCallback((a, F) => u[a] = F), n.addReleaseCallback(() => {
551
+ n.renderRoot.textContent = "", s();
552
552
  });
553
- const a = e(s, n);
554
- return c(r.renderRoot, a);
555
- }, on(r));
553
+ const i = e(u, r);
554
+ return d(n.renderRoot, i);
555
+ }, ar(n));
556
556
  };
557
557
  }
558
- function tt(e, t, n) {
559
- return arguments.length === 2 && (n = t, t = {}), sn(e, t)(ln(n));
558
+ function tt(e, t, r) {
559
+ return arguments.length === 2 && (r = t, t = {}), ur(e, t)(or(r));
560
560
  }
561
- var cn = "٠١٢٣٤٥٦٧٨٩", dn = "۰۱۲۳۴۵۶۷۸۹", Dn = "൦൧൨൩൪൫൬൭൮൯", fn = "೦೧೨೩೪೫೬೭೮೯", hn = "໐໑໒໓໔໕໖໗໘໙", pn = "୦୧୨୩୪୫୬୭୮୯", gn = "០១២៣៤៥៦៧៨៩", mn = "߀߁߂߃߄߅߆߇߈߉", bn = "੦੧੨੩੪੫੬੭੮੯", Cn = "૦૧૨૩૪૫૬૭૮૯", An = "०१२३४५६७८९", Fn = "၀၁၂၃၄၅၆၇၈၉", En = "௦௧௨௩௪௫௬௭௮௯", vn = "౦౧౨౩౪౫౬౭౮౯", wn = "๐๑๒๓๔๕๖๗๘๙", yn = "༠༡༢༣༤༥༦༧༨༩", lt = { ar: cn, fa: dn, ml: Dn, kn: fn, lo: hn, or: pn, kh: gn, nqo: mn, pa: bn, gu: Cn, hi: An, my: Fn, ta: En, te: vn, th: wn, bo: yn }, Bn = ["ru"], $n = ["id"], kn = ["id"], xn = ["ady-cyrl"], _n = ["aeb-arab"], Sn = ["sq"], Tn = ["ru"], On = ["zh-hant"], In = ["es"], Pn = ["hi"], Nn = ["es"], zn = ["ar"], Mn = ["ar"], Rn = ["ar"], jn = ["es"], qn = ["fr"], Ln = ["ru"], Un = ["fr", "es", "ru"], Jn = ["hi"], Kn = ["es"], Vn = ["fa"], Gn = ["ru"], Wn = ["id"], Hn = ["de"], Zn = ["bbc-latn"], Yn = ["fa"], Xn = ["fa"], Qn = ["bho"], er = ["en"], tr = ["id"], nr = ["fr"], rr = ["bn"], ur = ["fa"], sr = ["fr"], ar = ["id"], ir = ["id"], or = ["ru"], lr = ["oc"], cr = ["nan", "zh-hant"], dr = ["ru"], Dr = ["it"], fr = ["crh-latn"], hr = ["sk"], pr = ["pl"], gr = ["ru"], mr = ["hsb", "de"], br = ["ms"], Cr = ["ne"], Ar = ["it"], Fr = ["it"], Er = ["es"], vr = ["fr"], wr = ["fi"], yr = ["fr"], Br = ["fr"], $r = ["de"], kr = ["it"], xr = ["tr"], _r = ["gan-hant", "zh-hant", "zh-hans"], Sr = ["fr"], Tr = ["pt"], Or = ["fa"], Ir = ["es"], Pr = ["gom-deva"], Nr = ["id"], zr = ["de"], Mr = ["es"], Rr = ["zh-hant"], jr = ["hif-latn"], qr = ["de"], Lr = ["dsb", "de"], Ur = ["fr"], Jr = ["hy"], Kr = ["zh-cn", "zh-hans"], Vr = ["ru"], Gr = ["eo"], Wr = ["ike-cans"], Hr = ["en"], Zr = ["da"], Yr = ["id"], Xr = ["kk-latn", "kk-cyrl"], Qr = ["fr"], eu = ["kbd-cyrl"], tu = ["fr"], nu = ["ur"], ru = ["tr"], uu = ["my"], su = ["kk-cyrl"], au = ["da"], iu = ["ru"], ou = ["ru"], lu = ["fi"], cu = ["ks-arab"], du = ["de"], Du = ["ku-latn"], fu = ["ru"], hu = ["ru"], pu = ["es"], gu = ["de"], mu = ["ru"], bu = ["ru", "az"], Cu = ["nl"], Au = ["it"], Fu = ["et"], Eu = ["fa"], vu = ["it", "rm", "fur"], wu = ["pms", "eml", "lij", "vec", "it"], yu = ["fr"], Bu = ["fa"], $u = ["lv"], ku = ["fa"], xu = ["zh-hant"], _u = ["tr"], Su = ["id"], Tu = ["hi"], Ou = ["myv", "ru"], Iu = ["fr"], Pu = ["mrj", "ru"], Nu = ["id"], zu = ["my"], Mu = ["ro"], Ru = ["mhr", "ru"], ju = ["pt"], qu = ["mdf", "ru"], Lu = ["fa"], Uu = ["es"], Ju = ["cdo", "zh-hant"], Ku = ["it"], Vu = ["nn"], Gu = ["de"], Wu = ["id"], Hu = ["nb"], Zu = ["fr"], Yu = ["ca", "fr"], Xu = ["fi"], Qu = ["ru"], es = ["fr"], ts = ["de"], ns = ["de"], rs = ["de"], us = ["en"], ss = ["it"], as = ["el"], is = ["pt-br"], os = ["qug", "es"], ls = ["qu", "es"], cs = ["it"], ds = ["ro"], Ds = ["uk", "ru"], fs = ["ro"], hs = ["ruq-latn", "ro"], ps = ["hi"], gs = ["ru"], ms = ["it"], bs = ["en"], Cs = ["it"], As = ["cbk", "fa"], Fs = ["fr"], Es = ["fr"], vs = ["lt"], ws = ["bs", "sr-el", "hr"], ys = ["fr"], Bs = ["shy-latn"], $s = ["cs"], ks = ["skr-arab"], xs = ["de"], _s = ["fi"], Ss = ["sr-ec"], Ts = ["nl"], Os = ["de"], Is = ["ru"], Ps = ["id"], Ns = ["pl"], zs = ["zh-tw", "zh-hant", "zh-hans"], Ms = ["zh-tw", "zh-hant", "zh-hans"], Rs = ["kn"], js = ["pt"], qs = ["tg-cyrl"], Ls = ["zh-tw", "zh-hant", "zh-hans"], Us = ["tt-cyrl", "ru"], Js = ["fr"], Ks = ["ru"], Vs = ["ru"], Gs = ["ug-arab"], Ws = ["it"], Hs = ["et"], Zs = ["nl"], Ys = ["de"], Xs = ["fi"], Qs = ["et"], ea = ["fr"], ta = ["fr"], na = ["zh-hans"], ra = ["ru"], ua = ["ka"], sa = ["he"], aa = ["zh-hans"], ia = ["nl"], oa = ["kab"], la = ["zh-hans"], Bt = { ab: Bn, abs: $n, ace: kn, ady: xn, aeb: _n, "aeb-arab": ["ar"], aln: Sn, alt: Tn, ami: On, an: In, anp: Pn, arn: Nn, arq: zn, ary: Mn, arz: Rn, ast: jn, atj: qn, av: Ln, avk: Un, awa: Jn, ay: Kn, azb: Vn, ba: Gn, ban: Wn, "ban-bali": ["ban"], bar: Hn, bbc: Zn, "bbc-latn": ["id"], bcc: Yn, "be-tarask": ["be"], bgn: Xn, bh: Qn, bi: er, bjn: tr, bm: nr, bpy: rr, bqi: ur, br: sr, btm: ar, bug: ir, bxr: or, ca: lr, "cbk-zam": ["es"], cdo: cr, ce: dr, co: Dr, crh: fr, "crh-cyrl": ["ru"], cs: hr, csb: pr, cv: gr, "de-at": ["de"], "de-ch": ["de"], "de-formal": ["de"], dsb: mr, dtp: br, dty: Cr, egl: Ar, eml: Fr, "en-ca": ["en"], "en-gb": ["en"], "es-419": ["es"], "es-formal": ["es"], ext: Er, ff: vr, fit: wr, frc: yr, frp: Br, frr: $r, fur: kr, gag: xr, gan: _r, "gan-hans": ["zh-hans"], "gan-hant": ["zh-hant", "zh-hans"], gcr: Sr, gl: Tr, glk: Or, gn: Ir, gom: Pr, "gom-deva": ["hi"], gor: Nr, gsw: zr, guc: Mr, hak: Rr, hif: jr, hrx: qr, hsb: Lr, ht: Ur, "hu-formal": ["hu"], hyw: Jr, ii: Kr, inh: Vr, io: Gr, iu: Wr, jam: Hr, jut: Zr, jv: Yr, kaa: Xr, kab: Qr, kbd: eu, kbp: tu, khw: nu, kiu: ru, kjp: uu, kk: su, "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: au, "ko-kp": ["ko"], koi: iu, krc: ou, krl: lu, ks: cu, ksh: du, ku: Du, "ku-arab": ["ckb"], kum: fu, kv: hu, lad: pu, lb: gu, lbe: mu, lez: bu, li: Cu, lij: Au, liv: Fu, lki: Eu, lld: vu, lmo: wu, ln: yu, lrc: Bu, ltg: $u, luz: ku, lzh: xu, lzz: _u, mad: Su, mai: Tu, "map-bms": ["jv", "id"], mdf: Ou, mg: Iu, mhr: Pu, min: Nu, mnw: zu, mo: Mu, mrj: Ru, "ms-arab": ["ms"], mwl: ju, myv: qu, mzn: Lu, nah: Uu, nan: Ju, nap: Ku, nb: Vu, nds: Gu, "nds-nl": ["nl"], nia: Wu, "nl-informal": ["nl"], nn: Hu, nrm: Zu, oc: Yu, olo: Xu, os: Qu, pcd: es, pdc: ts, pdt: ns, pfl: rs, pih: us, pms: ss, pnt: as, pt: is, "pt-br": ["pt"], qu: os, qug: ls, rgn: cs, rmy: ds, "roa-tara": ["it"], rue: Ds, rup: fs, ruq: hs, "ruq-cyrl": ["mk"], "ruq-latn": ["ro"], sa: ps, sah: gs, scn: ms, sco: bs, sdc: Cs, sdh: As, ses: Fs, sg: Es, sgs: vs, sh: ws, shi: ys, shy: Bs, "shy-latn": ["fr"], sk: $s, skr: ks, "skr-arab": ["ur", "pnb"], sli: xs, smn: _s, sr: Ss, srn: Ts, stq: Os, sty: Is, su: Ps, szl: Ns, szy: zs, tay: Ms, tcy: Rs, tet: js, tg: qs, trv: Ls, tt: Us, "tt-cyrl": ["ru"], ty: Js, tyv: Ks, udm: Vs, ug: Gs, vec: Ws, vep: Hs, vls: Zs, vmf: Ys, vot: Xs, vro: Qs, wa: ea, wo: ta, wuu: na, xal: ra, xmf: ua, yi: sa, za: aa, zea: ia, zgh: oa, zh: la, "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"] };
562
- let se = class {
561
+ var lr = "٠١٢٣٤٥٦٧٨٩", cr = "۰۱۲۳۴۵۶۷۸۹", dr = "൦൧൨൩൪൫൬൭൮൯", Dr = "೦೧೨೩೪೫೬೭೮೯", hr = "໐໑໒໓໔໕໖໗໘໙", fr = "୦୧୨୩୪୫୬୭୮୯", pr = "០១២៣៤៥៦៧៨៩", gr = "߀߁߂߃߄߅߆߇߈߉", mr = "੦੧੨੩੪੫੬੭੮੯", br = "૦૧૨૩૪૫૬૭૮૯", Cr = "०१२३४५६७८९", Ar = "၀၁၂၃၄၅၆၇၈၉", vr = "௦௧௨௩௪௫௬௭௮௯", Fr = "౦౧౨౩౪౫౬౭౮౯", Er = "๐๑๒๓๔๕๖๗๘๙", wr = "༠༡༢༣༤༥༦༧༨༩", lt = { ar: lr, fa: cr, ml: dr, kn: Dr, lo: hr, or: fr, kh: pr, nqo: gr, pa: mr, gu: br, hi: Cr, my: Ar, ta: vr, te: Fr, th: Er, bo: wr }, yr = ["ru"], $r = ["id"], Br = ["id"], kr = ["ady-cyrl"], xr = ["aeb-arab"], _r = ["sq"], Sr = ["ru"], Or = ["zh-hant"], Tr = ["es"], Pr = ["hi"], Ir = ["es"], zr = ["ar"], Nr = ["ar"], Mr = ["ar"], jr = ["es"], Rr = ["fr"], Lr = ["ru"], qr = ["fr", "es", "ru"], Ur = ["hi"], Jr = ["es"], Kr = ["fa"], Gr = ["ru"], Vr = ["id"], Hr = ["de"], Wr = ["bbc-latn"], Zr = ["fa"], Yr = ["fa"], Xr = ["bho"], Qr = ["en"], en = ["id"], tn = ["fr"], rn = ["bn"], nn = ["fa"], sn = ["fr"], un = ["id"], an = ["id"], on = ["ru"], ln = ["oc"], cn = ["nan", "zh-hant"], dn = ["ru"], Dn = ["it"], hn = ["crh-latn"], fn = ["sk"], pn = ["pl"], gn = ["ru"], mn = ["hsb", "de"], bn = ["ms"], Cn = ["ne"], An = ["it"], vn = ["it"], Fn = ["es"], En = ["fr"], wn = ["fi"], yn = ["fr"], $n = ["fr"], Bn = ["de"], kn = ["it"], xn = ["tr"], _n = ["gan-hant", "zh-hant", "zh-hans"], Sn = ["fr"], On = ["pt"], Tn = ["fa"], Pn = ["es"], In = ["gom-deva"], zn = ["id"], Nn = ["de"], Mn = ["es"], jn = ["zh-hant"], Rn = ["hif-latn"], Ln = ["de"], qn = ["dsb", "de"], Un = ["fr"], Jn = ["hy"], Kn = ["zh-cn", "zh-hans"], Gn = ["ru"], Vn = ["eo"], Hn = ["ike-cans"], Wn = ["en"], Zn = ["da"], Yn = ["id"], Xn = ["kk-latn", "kk-cyrl"], Qn = ["fr"], es = ["kbd-cyrl"], ts = ["fr"], rs = ["ur"], ns = ["tr"], ss = ["my"], us = ["kk-cyrl"], is = ["da"], as = ["ru"], os = ["ru"], ls = ["fi"], cs = ["ks-arab"], ds = ["de"], Ds = ["ku-latn"], hs = ["ru"], fs = ["ru"], ps = ["es"], gs = ["de"], ms = ["ru"], bs = ["ru", "az"], Cs = ["nl"], As = ["it"], vs = ["et"], Fs = ["fa"], Es = ["it", "rm", "fur"], ws = ["pms", "eml", "lij", "vec", "it"], ys = ["fr"], $s = ["fa"], Bs = ["lv"], ks = ["fa"], xs = ["zh-hant"], _s = ["tr"], Ss = ["id"], Os = ["hi"], Ts = ["myv", "ru"], Ps = ["fr"], Is = ["mrj", "ru"], zs = ["id"], Ns = ["my"], Ms = ["ro"], js = ["mhr", "ru"], Rs = ["pt"], Ls = ["mdf", "ru"], qs = ["fa"], Us = ["es"], Js = ["cdo", "zh-hant"], Ks = ["it"], Gs = ["nn"], Vs = ["de"], Hs = ["id"], Ws = ["nb"], Zs = ["fr"], Ys = ["ca", "fr"], Xs = ["fi"], Qs = ["ru"], eu = ["fr"], tu = ["de"], ru = ["de"], nu = ["de"], su = ["en"], uu = ["it"], iu = ["el"], au = ["pt-br"], ou = ["qug", "es"], lu = ["qu", "es"], cu = ["it"], du = ["ro"], Du = ["uk", "ru"], hu = ["ro"], fu = ["ruq-latn", "ro"], pu = ["hi"], gu = ["ru"], mu = ["it"], bu = ["en"], Cu = ["it"], Au = ["cbk", "fa"], vu = ["fr"], Fu = ["fr"], Eu = ["lt"], wu = ["bs", "sr-el", "hr"], yu = ["fr"], $u = ["shy-latn"], Bu = ["cs"], ku = ["skr-arab"], xu = ["de"], _u = ["fi"], Su = ["sr-ec"], Ou = ["nl"], Tu = ["de"], Pu = ["ru"], Iu = ["id"], zu = ["pl"], Nu = ["zh-tw", "zh-hant", "zh-hans"], Mu = ["zh-tw", "zh-hant", "zh-hans"], ju = ["kn"], Ru = ["pt"], Lu = ["tg-cyrl"], qu = ["zh-tw", "zh-hant", "zh-hans"], Uu = ["tt-cyrl", "ru"], Ju = ["fr"], Ku = ["ru"], Gu = ["ru"], Vu = ["ug-arab"], Hu = ["it"], Wu = ["et"], Zu = ["nl"], Yu = ["de"], Xu = ["fi"], Qu = ["et"], ei = ["fr"], ti = ["fr"], ri = ["zh-hans"], ni = ["ru"], si = ["ka"], ui = ["he"], ii = ["zh-hans"], ai = ["nl"], oi = ["kab"], li = ["zh-hans"], $t = { ab: yr, abs: $r, ace: Br, ady: kr, aeb: xr, "aeb-arab": ["ar"], aln: _r, alt: Sr, ami: Or, an: Tr, anp: Pr, arn: Ir, arq: zr, ary: Nr, arz: Mr, ast: jr, atj: Rr, av: Lr, avk: qr, awa: Ur, ay: Jr, azb: Kr, ba: Gr, ban: Vr, "ban-bali": ["ban"], bar: Hr, bbc: Wr, "bbc-latn": ["id"], bcc: Zr, "be-tarask": ["be"], bgn: Yr, bh: Xr, bi: Qr, bjn: en, bm: tn, bpy: rn, bqi: nn, br: sn, btm: un, bug: an, bxr: on, ca: ln, "cbk-zam": ["es"], cdo: cn, ce: dn, co: Dn, crh: hn, "crh-cyrl": ["ru"], cs: fn, csb: pn, cv: gn, "de-at": ["de"], "de-ch": ["de"], "de-formal": ["de"], dsb: mn, dtp: bn, dty: Cn, egl: An, eml: vn, "en-ca": ["en"], "en-gb": ["en"], "es-419": ["es"], "es-formal": ["es"], ext: Fn, ff: En, fit: wn, frc: yn, frp: $n, frr: Bn, fur: kn, gag: xn, gan: _n, "gan-hans": ["zh-hans"], "gan-hant": ["zh-hant", "zh-hans"], gcr: Sn, gl: On, glk: Tn, gn: Pn, gom: In, "gom-deva": ["hi"], gor: zn, gsw: Nn, guc: Mn, hak: jn, hif: Rn, hrx: Ln, hsb: qn, ht: Un, "hu-formal": ["hu"], hyw: Jn, ii: Kn, inh: Gn, io: Vn, iu: Hn, jam: Wn, jut: Zn, jv: Yn, kaa: Xn, kab: Qn, kbd: es, kbp: ts, khw: rs, kiu: ns, kjp: ss, kk: us, "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: is, "ko-kp": ["ko"], koi: as, krc: os, krl: ls, ks: cs, ksh: ds, ku: Ds, "ku-arab": ["ckb"], kum: hs, kv: fs, lad: ps, lb: gs, lbe: ms, lez: bs, li: Cs, lij: As, liv: vs, lki: Fs, lld: Es, lmo: ws, ln: ys, lrc: $s, ltg: Bs, luz: ks, lzh: xs, lzz: _s, mad: Ss, mai: Os, "map-bms": ["jv", "id"], mdf: Ts, mg: Ps, mhr: Is, min: zs, mnw: Ns, mo: Ms, mrj: js, "ms-arab": ["ms"], mwl: Rs, myv: Ls, mzn: qs, nah: Us, nan: Js, nap: Ks, nb: Gs, nds: Vs, "nds-nl": ["nl"], nia: Hs, "nl-informal": ["nl"], nn: Ws, nrm: Zs, oc: Ys, olo: Xs, os: Qs, pcd: eu, pdc: tu, pdt: ru, pfl: nu, pih: su, pms: uu, pnt: iu, pt: au, "pt-br": ["pt"], qu: ou, qug: lu, rgn: cu, rmy: du, "roa-tara": ["it"], rue: Du, rup: hu, ruq: fu, "ruq-cyrl": ["mk"], "ruq-latn": ["ro"], sa: pu, sah: gu, scn: mu, sco: bu, sdc: Cu, sdh: Au, ses: vu, sg: Fu, sgs: Eu, sh: wu, shi: yu, shy: $u, "shy-latn": ["fr"], sk: Bu, skr: ku, "skr-arab": ["ur", "pnb"], sli: xu, smn: _u, sr: Su, srn: Ou, stq: Tu, sty: Pu, su: Iu, szl: zu, szy: Nu, tay: Mu, tcy: ju, tet: Ru, tg: Lu, trv: qu, tt: Uu, "tt-cyrl": ["ru"], ty: Ju, tyv: Ku, udm: Gu, ug: Vu, vec: Hu, vep: Wu, vls: Zu, vmf: Yu, vot: Xu, vro: Qu, wa: ei, wo: ti, wuu: ri, xal: ni, xmf: si, yi: ui, za: ii, zea: ai, zgh: oi, zh: li, "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"] };
562
+ let ue = class {
563
563
  constructor(e) {
564
564
  this.locale = e;
565
565
  }
566
566
  convertPlural(e, t) {
567
- const n = /\d+=/i;
567
+ const r = /\d+=/i;
568
568
  if (!t || t.length === 0) return "";
569
- for (let u = 0; u < t.length; u++) {
570
- const s = t[u];
571
- if (n.test(s)) {
572
- if (parseInt(s.slice(0, s.indexOf("=")), 10) === e) return s.slice(s.indexOf("=") + 1);
573
- t[u] = void 0;
569
+ for (let s = 0; s < t.length; s++) {
570
+ const u = t[s];
571
+ if (r.test(u)) {
572
+ if (parseInt(u.slice(0, u.indexOf("=")), 10) === e) return u.slice(u.indexOf("=") + 1);
573
+ t[s] = void 0;
574
574
  }
575
575
  }
576
- t = t.filter((u) => !!u);
577
- let r = this.getPluralForm(e, this.locale);
578
- return r = Math.min(r, t.length - 1), t[r];
576
+ t = t.filter((s) => !!s);
577
+ let n = this.getPluralForm(e, this.locale);
578
+ return n = Math.min(n, t.length - 1), t[n];
579
579
  }
580
580
  getPluralForm(e, t) {
581
- const n = ["zero", "one", "two", "few", "many", "other"], r = new Intl.PluralRules(t), u = r.resolvedOptions().pluralCategories, s = r.select(e);
582
- return n.filter((a) => u.includes(a)).indexOf(s);
581
+ const r = ["zero", "one", "two", "few", "many", "other"], n = new Intl.PluralRules(t), s = n.resolvedOptions().pluralCategories, u = n.select(e);
582
+ return r.filter((i) => s.includes(i)).indexOf(u);
583
583
  }
584
584
  convertNumber(e, t = !1) {
585
- let n = this.digitTransformTable(this.locale), r = "";
585
+ let r = this.digitTransformTable(this.locale), n = "";
586
586
  if (t) {
587
- if (parseFloat(e, 10) === e || !n) return e;
588
- const u = [];
589
- for (const a in n) u[n[a]] = a;
590
- n = u;
591
- const s = String(e);
592
- for (let a = 0; a < s.length; a++) r += n[s[a]] || s[a];
593
- return parseFloat(r, 10);
587
+ if (parseFloat(e, 10) === e || !r) return e;
588
+ const s = [];
589
+ for (const i in r) s[r[i]] = i;
590
+ r = s;
591
+ const u = String(e);
592
+ for (let i = 0; i < u.length; i++) n += r[u[i]] || u[i];
593
+ return parseFloat(n, 10);
594
594
  }
595
595
  if (Intl.NumberFormat) {
596
- let u;
597
- const s = [...Bt[this.locale] || [], "en"];
598
- return Intl.NumberFormat.supportedLocalesOf(this.locale).length ? u = [this.locale] : u = s, r = new Intl.NumberFormat(u).format(e), r === "NaN" && (r = e), r;
596
+ let s;
597
+ const u = [...$t[this.locale] || [], "en"];
598
+ return Intl.NumberFormat.supportedLocalesOf(this.locale).length ? s = [this.locale] : s = u, n = new Intl.NumberFormat(s).format(e), n === "NaN" && (n = e), n;
599
599
  }
600
600
  }
601
601
  convertGrammar(e) {
@@ -609,7 +609,7 @@ let se = class {
609
609
  digitTransformTable(e) {
610
610
  return lt[e] ? lt[e].split("") : !1;
611
611
  }
612
- }, ca = class extends se {
612
+ }, ci = class extends ue {
613
613
  convertGrammar(e, t) {
614
614
  switch (t) {
615
615
  case "prefixed":
@@ -618,9 +618,9 @@ let se = class {
618
618
  }
619
619
  return e;
620
620
  }
621
- }, da = class extends se {
622
- convertGrammar(t, n) {
623
- switch (n) {
621
+ }, di = class extends ue {
622
+ convertGrammar(t, r) {
623
+ switch (r) {
624
624
  case "instrumental":
625
625
  t = "s " + t;
626
626
  break;
@@ -630,7 +630,7 @@ let se = class {
630
630
  }
631
631
  return t;
632
632
  }
633
- }, Da = class extends se {
633
+ }, Di = class extends ue {
634
634
  convertGrammar(e, t) {
635
635
  switch (t) {
636
636
  case "instrumental":
@@ -642,7 +642,7 @@ let se = class {
642
642
  }
643
643
  return e;
644
644
  }
645
- }, fa = class extends se {
645
+ }, hi = class extends ue {
646
646
  convertGrammar(e, t) {
647
647
  switch (t) {
648
648
  case "instrumental":
@@ -654,40 +654,40 @@ let se = class {
654
654
  }
655
655
  return e;
656
656
  }
657
- }, ha = class extends se {
657
+ }, fi = class extends ue {
658
658
  convertGrammar(e, t) {
659
- let n = e.match(/[aou][^äöy]*$/i);
660
- const r = e;
661
- switch (e.match(/wiki$/i) && (n = !1), e.match(/[bcdfghjklmnpqrstvwxz]$/i) && (e += "i"), t) {
659
+ let r = e.match(/[aou][^äöy]*$/i);
660
+ const n = e;
661
+ switch (e.match(/wiki$/i) && (r = !1), e.match(/[bcdfghjklmnpqrstvwxz]$/i) && (e += "i"), t) {
662
662
  case "genitive":
663
663
  e += "n";
664
664
  break;
665
665
  case "elative":
666
- e += n ? "sta" : "stä";
666
+ e += r ? "sta" : "stä";
667
667
  break;
668
668
  case "partitive":
669
- e += n ? "a" : "ä";
669
+ e += r ? "a" : "ä";
670
670
  break;
671
671
  case "illative":
672
672
  e += e.slice(-1) + "n";
673
673
  break;
674
674
  case "inessive":
675
- e += n ? "ssa" : "ssä";
675
+ e += r ? "ssa" : "ssä";
676
676
  break;
677
677
  default:
678
- e = r;
678
+ e = n;
679
679
  break;
680
680
  }
681
681
  return e;
682
682
  }
683
- }, pa = class extends se {
683
+ }, pi = class extends ue {
684
684
  convertGrammar(e, t) {
685
685
  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;
686
686
  }
687
687
  };
688
- class ga extends se {
689
- convertGrammar(t, n) {
690
- switch (n) {
688
+ class gi extends ue {
689
+ convertGrammar(t, r) {
690
+ switch (r) {
691
691
  case "mestnik":
692
692
  t = "o " + t;
693
693
  break;
@@ -698,7 +698,7 @@ class ga extends se {
698
698
  return t;
699
699
  }
700
700
  }
701
- let ma = class extends se {
701
+ let mi = class extends ue {
702
702
  convertGrammar(e, t) {
703
703
  switch (t) {
704
704
  case "genitive":
@@ -714,12 +714,12 @@ let ma = class extends se {
714
714
  return e;
715
715
  }
716
716
  };
717
- class ba extends se {
718
- convertGrammar(t, n) {
719
- 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;
717
+ class bi extends ue {
718
+ convertGrammar(t, r) {
719
+ return r === "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;
720
720
  }
721
721
  }
722
- let Ca = class extends se {
722
+ let Ci = class extends ue {
723
723
  convertGrammar(e, t) {
724
724
  if (t === "ainmlae") switch (e) {
725
725
  case "an Domhnach":
@@ -746,7 +746,7 @@ let Ca = class extends se {
746
746
  }
747
747
  return e;
748
748
  }
749
- }, Aa = class extends se {
749
+ }, Ai = class extends ue {
750
750
  convertGrammar(e, t) {
751
751
  switch (t) {
752
752
  case "rol":
@@ -761,38 +761,38 @@ let Ca = class extends se {
761
761
  }
762
762
  return e;
763
763
  }
764
- }, Fa = class extends se {
764
+ }, vi = class extends ue {
765
765
  convertGrammar(e, t) {
766
- let n, r, u, s;
767
- switch (n = "мæ", r = "", u = "", 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) || (u = "-"), t) {
766
+ let r, n, s, u;
767
+ switch (r = "мæ", n = "", s = "", u = "", e.match(/тæ$/i) ? (e = e.slice(0, -1), r = "æм") : e.match(/[аæеёиоыэюя]$/i) ? n = "й" : e.match(/у$/i) ? e.slice(-2, -1).match(/[аæеёиоыэюя]$/i) || (n = "й") : e.match(/[бвгджзйклмнопрстфхцчшщьъ]$/i) || (s = "-"), t) {
768
768
  case "genitive":
769
- s = u + r + "ы";
769
+ u = s + n + "ы";
770
770
  break;
771
771
  case "dative":
772
- s = u + r + "æн";
772
+ u = s + n + "æн";
773
773
  break;
774
774
  case "allative":
775
- s = u + n;
775
+ u = s + r;
776
776
  break;
777
777
  case "ablative":
778
- r === "й" ? s = u + r + "æ" : s = u + r + "æй";
778
+ n === "й" ? u = s + n + "æ" : u = s + n + "æй";
779
779
  break;
780
780
  case "superessive":
781
- s = u + r + "ыл";
781
+ u = s + n + "ыл";
782
782
  break;
783
783
  case "equative":
784
- s = u + r + "ау";
784
+ u = s + n + "ау";
785
785
  break;
786
786
  case "comitative":
787
- s = u + "имæ";
787
+ u = s + "имæ";
788
788
  break;
789
789
  }
790
- return e + s;
790
+ return e + u;
791
791
  }
792
792
  };
793
- class Ea extends se {
794
- convertGrammar(t, n) {
795
- switch (n) {
793
+ class Fi extends ue {
794
+ convertGrammar(t, r) {
795
+ switch (r) {
796
796
  case "genitive":
797
797
  t.slice(-1) === "ь" ? t = t.slice(0, -1) + "я" : t.slice(-2) === "ія" ? t = t.slice(0, -2) + "ії" : t.slice(-2) === "ка" ? t = t.slice(0, -2) + "ки" : t.slice(-2) === "ти" ? t = t.slice(0, -2) + "тей" : t.slice(-2) === "ды" ? t = t.slice(0, -2) + "дов" : t.slice(-3) === "ник" && (t = t.slice(0, -3) + "ника");
798
798
  break;
@@ -803,340 +803,340 @@ class Ea extends se {
803
803
  return t;
804
804
  }
805
805
  }
806
- var ct = { bs: da, default: se, dsb: Da, fi: ha, ga: Ca, he: ca, hsb: fa, hu: Aa, hy: ba, la: ma, os: Fa, ru: pa, sl: ga, uk: Ea };
807
- const va = 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]))");
808
- let $t = class {
806
+ var ct = { bs: di, default: ue, dsb: Di, fi, ga: Ci, he: ci, hsb: hi, hu: Ai, hy: bi, la: mi, os: vi, ru: pi, sl: gi, uk: Fi };
807
+ const Ei = 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]))");
808
+ let Bt = class {
809
809
  constructor(e) {
810
- this.locale = ye(e), this.language = new (ct[this.locale] || ct.default)(this.locale);
810
+ this.locale = ke(e), this.language = new (ct[this.locale] || ct.default)(this.locale);
811
811
  }
812
812
  emit(e, t) {
813
- let n, r, u;
813
+ let r, n, s;
814
814
  switch (typeof e) {
815
815
  case "string":
816
816
  case "number":
817
- n = e;
817
+ r = e;
818
818
  break;
819
819
  case "object":
820
- if (r = e.slice(1).map((s) => this.emit(s, t)), u = e[0].toLowerCase(), typeof this[u] == "function") n = this[u](r, t);
821
- else throw new Error('unknown operation "' + u + '"');
820
+ if (n = e.slice(1).map((u) => this.emit(u, t)), s = e[0].toLowerCase(), typeof this[s] == "function") r = this[s](n, t);
821
+ else throw new Error('unknown operation "' + s + '"');
822
822
  break;
823
823
  case "undefined":
824
- n = "";
824
+ r = "";
825
825
  break;
826
826
  default:
827
827
  throw new Error("unexpected type in AST: " + typeof e);
828
828
  }
829
- return n;
829
+ return r;
830
830
  }
831
831
  concat(e) {
832
832
  let t = "";
833
- return e.forEach((n) => {
834
- t += n;
833
+ return e.forEach((r) => {
834
+ t += r;
835
835
  }), t;
836
836
  }
837
837
  replace(e, t) {
838
- const n = parseInt(e[0], 10);
839
- return n < t.length ? t[n] : "$" + (n + 1);
838
+ const r = parseInt(e[0], 10);
839
+ return r < t.length ? t[r] : "$" + (r + 1);
840
840
  }
841
841
  plural(e) {
842
- const t = parseFloat(this.language.convertNumber(e[0], 10)), n = e.slice(1);
843
- return n.length ? this.language.convertPlural(t, n) : "";
842
+ const t = parseFloat(this.language.convertNumber(e[0], 10)), r = e.slice(1);
843
+ return r.length ? this.language.convertPlural(t, r) : "";
844
844
  }
845
845
  gender(e) {
846
- const t = e[0], n = e.slice(1);
847
- return this.language.gender(t, n);
846
+ const t = e[0], r = e.slice(1);
847
+ return this.language.gender(t, r);
848
848
  }
849
849
  grammar(e) {
850
- const t = e[0], n = e[1];
851
- return n && t && this.language.convertGrammar(n, t);
850
+ const t = e[0], r = e[1];
851
+ return r && t && this.language.convertGrammar(r, t);
852
852
  }
853
853
  wikilink(e) {
854
- let t, n = e[0];
855
- n.charAt(0) === ":" && (n = n.slice(1));
856
- const r = `./${n}`;
857
- return e.length === 1 ? t = n : t = e[1], `<a href="${r}" title="${n}">${t}</a>`;
854
+ let t, r = e[0];
855
+ r.charAt(0) === ":" && (r = r.slice(1));
856
+ const n = `./${r}`;
857
+ return e.length === 1 ? t = r : t = e[1], `<a href="${n}" title="${r}">${t}</a>`;
858
858
  }
859
859
  extlink(e) {
860
860
  if (e.length !== 2) throw new Error("Expected two items in the node");
861
861
  return `<a href="${e[0]}">${e[1]}</a>`;
862
862
  }
863
863
  bidi(e) {
864
- const t = wa(e[0]);
864
+ const t = wi(e[0]);
865
865
  return t === "ltr" ? "‪" + e[0] + "‬" : t === "rtl" ? "‫" + e[0] + "‬" : e[0];
866
866
  }
867
867
  formatnum(e) {
868
- const t = !!e[1] && e[1] === "R", n = e[0];
869
- return typeof n == "string" || typeof n == "number" ? this.language.convertNumber(n, t) : n;
868
+ const t = !!e[1] && e[1] === "R", r = e[0];
869
+ return typeof r == "string" || typeof r == "number" ? this.language.convertNumber(r, t) : r;
870
870
  }
871
871
  htmlattributes(e) {
872
872
  const t = {};
873
- for (let n = 0, r = e.length; n < r; n += 2) t[e[n]] = e[n + 1];
873
+ for (let r = 0, n = e.length; r < n; r += 2) t[e[r]] = e[r + 1];
874
874
  return t;
875
875
  }
876
876
  htmlelement(e) {
877
- const t = e.shift(), n = e.shift();
878
- let r = e, u = "";
879
- for (const a in n) u += ` ${a}="${n[a]}"`;
880
- Array.isArray(r) || (r = [r]);
881
- const s = r.join("");
882
- return `<${t}${u}>${s}</${t}>`;
877
+ const t = e.shift(), r = e.shift();
878
+ let n = e, s = "";
879
+ for (const i in r) s += ` ${i}="${r[i]}"`;
880
+ Array.isArray(n) || (n = [n]);
881
+ const u = n.join("");
882
+ return `<${t}${s}>${u}</${t}>`;
883
883
  }
884
884
  };
885
- function ye(e) {
885
+ function ke(e) {
886
886
  return typeof e == "string" ? e.toLowerCase() : e;
887
887
  }
888
- function wa(e) {
889
- const t = e.match(va);
888
+ function wi(e) {
889
+ const t = e.match(Ei);
890
890
  return t ? t[2] === void 0 ? "ltr" : "rtl" : null;
891
891
  }
892
- function ya(e, { wikilinks: t = !1 } = {}) {
893
- let n = 0;
894
- function r(o) {
892
+ function yi(e, { wikilinks: t = !1 } = {}) {
893
+ let r = 0;
894
+ function n(l) {
895
895
  return () => {
896
- for (let g = 0; g < o.length; g++) {
897
- const $ = o[g]();
898
- if ($ !== null) return $;
896
+ for (let h = 0; h < l.length; h++) {
897
+ const I = l[h]();
898
+ if (I !== null) return I;
899
899
  }
900
900
  return null;
901
901
  };
902
902
  }
903
- function u(o) {
904
- const g = n, $ = [];
905
- for (let V = 0; V < o.length; V++) {
906
- const Y = o[V]();
907
- if (Y === null) return n = g, null;
908
- $.push(Y);
903
+ function s(l) {
904
+ const h = r, I = [];
905
+ for (let G = 0; G < l.length; G++) {
906
+ const V = l[G]();
907
+ if (V === null) return r = h, null;
908
+ I.push(V);
909
909
  }
910
- return $;
910
+ return I;
911
911
  }
912
- function s(o, g) {
912
+ function u(l, h) {
913
913
  return () => {
914
- const $ = n, V = [];
915
- let Y = g();
916
- for (; Y !== null; ) V.push(Y), Y = g();
917
- return V.length < o ? (n = $, null) : V;
914
+ const I = r, G = [];
915
+ let V = h();
916
+ for (; V !== null; ) G.push(V), V = h();
917
+ return G.length < l ? (r = I, null) : G;
918
918
  };
919
919
  }
920
- function a(o) {
921
- const g = o.length;
920
+ function i(l) {
921
+ const h = l.length;
922
922
  return () => {
923
- let $ = null;
924
- return e.slice(n, n + g) === o && ($ = o, n += g), $;
923
+ let I = null;
924
+ return e.slice(r, r + h) === l && (I = l, r += h), I;
925
925
  };
926
926
  }
927
- function i(o) {
927
+ function a(l) {
928
928
  return () => {
929
- const g = e.slice(n).match(o);
930
- return g === null ? null : (n += g[0].length, g[0]);
929
+ const h = e.slice(r).match(l);
930
+ return h === null ? null : (r += h[0].length, h[0]);
931
931
  };
932
932
  }
933
- const C = i(/^\s+/), y = a("|"), p = a(":"), S = a("\\"), re = i(/^./), ae = a("$"), de = i(/^\d+/), L = a('"'), G = a("'"), Q = i(t ? /^[^{}[\]$<\\]/ : /^[^{}$<\\]/), ee = i(t ? /^[^{}[\]$\\|]/ : /^[^{}$\\|]/), U = i(t ? /^[^{}[\]$\s]/ : /^[^{}$\s]/);
934
- function N(o, g) {
933
+ const F = a(/^\s+/), k = i("|"), p = i(":"), S = i("\\"), X = a(/^./), te = i("$"), he = a(/^\d+/), N = i('"'), Q = i("'"), W = a(t ? /^[^{}[\]$<\\]/ : /^[^{}$<\\]/), re = a(t ? /^[^{}[\]$\\|]/ : /^[^{}$\\|]/), j = a(t ? /^[^{}[\]$\s]/ : /^[^{}$\s]/);
934
+ function H(l, h) {
935
935
  return () => {
936
- const $ = o();
937
- return $ === null ? null : g($);
936
+ const I = l();
937
+ return I === null ? null : h(I);
938
938
  };
939
939
  }
940
- function W() {
941
- const o = s(1, J)();
942
- return o === null ? null : o.join("");
940
+ function J() {
941
+ const l = u(1, K)();
942
+ return l === null ? null : l.join("");
943
943
  }
944
- function ie() {
945
- const o = s(1, A)();
946
- return o === null ? null : o.join("");
944
+ function le() {
945
+ const l = u(1, fe)();
946
+ return l === null ? null : l.join("");
947
947
  }
948
- const he = r([B, U]);
949
- function pe() {
950
- const o = s(1, he)();
951
- return o === null ? null : o.join("");
948
+ const de = n([_, j]);
949
+ function De() {
950
+ const l = u(1, de)();
951
+ return l === null ? null : l.join("");
952
952
  }
953
- function B() {
954
- const o = u([S, re]);
955
- return o === null ? null : o[1];
953
+ function _() {
954
+ const l = s([S, X]);
955
+ return l === null ? null : l[1];
956
956
  }
957
- const J = r([B, ee]), A = r([B, Q]);
958
- function ue() {
959
- const o = u([ae, de]);
960
- return o === null ? null : ["REPLACE", parseInt(o[1], 10) - 1];
957
+ const K = n([_, re]), fe = n([_, W]);
958
+ function A() {
959
+ const l = s([te, he]);
960
+ return l === null ? null : ["REPLACE", parseInt(l[1], 10) - 1];
961
961
  }
962
- const m = N(i(/^[ !"$&'()*,./0-9;=?@A-Z^_`a-z~\x80-\xFF+-]+/), function(o) {
963
- return o.toString();
962
+ const ne = H(a(/^[ !"$&'()*,./0-9;=?@A-Z^_`a-z~\x80-\xFF+-]+/), function(l) {
963
+ return l.toString();
964
964
  });
965
- function De() {
966
- const o = u([y, s(0, Z)]);
967
- if (o === null) return null;
968
- const g = o[1];
969
- return g.length > 1 ? ["CONCAT"].concat(g) : g[0];
970
- }
971
- function $e() {
972
- const o = u([m, p, ue]);
973
- return o === null ? null : [o[0], o[2]];
974
- }
975
- function oe() {
976
- const o = u([m, p, Z]);
977
- return o === null ? null : [o[0], o[2]];
978
- }
979
- function ke() {
980
- const o = u([m, p]);
981
- return o === null ? null : [o[0], ""];
982
- }
983
- const xe = r([function() {
984
- const o = u([r([$e, oe, ke]), s(0, De)]);
985
- return o === null ? null : o[0].concat(o[1]);
965
+ function b() {
966
+ const l = s([k, u(0, w)]);
967
+ if (l === null) return null;
968
+ const h = l[1];
969
+ return h.length > 1 ? ["CONCAT"].concat(h) : h[0];
970
+ }
971
+ function Z() {
972
+ const l = s([ne, p, A]);
973
+ return l === null ? null : [l[0], l[2]];
974
+ }
975
+ function ge() {
976
+ const l = s([ne, p, w]);
977
+ return l === null ? null : [l[0], l[2]];
978
+ }
979
+ function we() {
980
+ const l = s([ne, p]);
981
+ return l === null ? null : [l[0], ""];
982
+ }
983
+ const ye = n([function() {
984
+ const l = s([n([Z, ge, we]), u(0, b)]);
985
+ return l === null ? null : l[0].concat(l[1]);
986
986
  }, function() {
987
- const o = u([m, s(0, De)]);
988
- return o === null ? null : [o[0]].concat(o[1]);
989
- }]), Fe = a("{{"), Ee = a("}}"), be = a("[["), _e = a("]]"), Se = a("["), Ce = a("]");
990
- function d() {
991
- const o = u([Fe, xe, Ee]);
992
- return o === null ? null : o[1];
987
+ const l = s([ne, u(0, b)]);
988
+ return l === null ? null : [l[0]].concat(l[1]);
989
+ }]), Ce = i("{{"), Ae = i("}}"), _e = i("[["), Se = i("]]"), me = i("["), ve = i("]");
990
+ function Fe() {
991
+ const l = s([Ce, ye, Ae]);
992
+ return l === null ? null : l[1];
993
993
  }
994
994
  function E() {
995
- const o = u([s(1, Z), y, s(1, K)]);
996
- return o === null ? null : [["CONCAT"].concat(o[0]), ["CONCAT"].concat(o[2])];
995
+ const l = s([u(1, w), k, u(1, g)]);
996
+ return l === null ? null : [["CONCAT"].concat(l[0]), ["CONCAT"].concat(l[2])];
997
997
  }
998
- function D() {
999
- const o = u([s(1, Z)]);
1000
- return o === null ? null : [["CONCAT"].concat(o[0])];
1001
- }
1002
- const f = r([E, D]);
1003
998
  function v() {
1004
- let o = null;
1005
- const g = u([be, f, _e]);
1006
- if (g !== null) {
1007
- const $ = g[1];
1008
- o = ["WIKILINK"].concat($);
999
+ const l = s([u(1, w)]);
1000
+ return l === null ? null : [["CONCAT"].concat(l[0])];
1001
+ }
1002
+ const P = n([E, v]);
1003
+ function L() {
1004
+ let l = null;
1005
+ const h = s([_e, P, Se]);
1006
+ if (h !== null) {
1007
+ const I = h[1];
1008
+ l = ["WIKILINK"].concat(I);
1009
1009
  }
1010
- return o;
1011
- }
1012
- function P() {
1013
- let o = null;
1014
- const g = u([Se, s(1, H), C, s(1, K), Ce]);
1015
- return g !== null && (o = ["EXTLINK", g[1].length === 1 ? g[1][0] : ["CONCAT"].concat(g[1]), ["CONCAT"].concat(g[3])]), o;
1016
- }
1017
- const O = i(/^[A-Za-z]+/);
1018
- function h(o, g, $, V = { 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: {} }) {
1019
- if (o = o.toLowerCase(), g = g.toLowerCase(), o !== g || V.allowedHtmlElements.indexOf(o) === -1) return !1;
1020
- const Y = /[\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;
1021
- for (let te = 0, ve = $.length; te < ve; te += 2) {
1022
- const ge = $[te];
1023
- if (V.allowedHtmlCommonAttributes.indexOf(ge) === -1 && (V.allowedHtmlAttributesByElement[o] || []).indexOf(ge) === -1 || ge === "style" && $[te + 1].search(Y) !== -1) return !1;
1010
+ return l;
1011
+ }
1012
+ function o() {
1013
+ let l = null;
1014
+ const h = s([me, u(1, c), F, u(1, g), ve]);
1015
+ return h !== null && (l = ["EXTLINK", h[1].length === 1 ? h[1][0] : ["CONCAT"].concat(h[1]), ["CONCAT"].concat(h[3])]), l;
1016
+ }
1017
+ const D = a(/^[A-Za-z]+/);
1018
+ function f(l, h, I, G = { 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: {} }) {
1019
+ if (l = l.toLowerCase(), h = h.toLowerCase(), l !== h || G.allowedHtmlElements.indexOf(l) === -1) return !1;
1020
+ const V = /[\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;
1021
+ for (let ce = 0, Ee = I.length; ce < Ee; ce += 2) {
1022
+ const $e = I[ce];
1023
+ if (G.allowedHtmlCommonAttributes.indexOf($e) === -1 && (G.allowedHtmlAttributesByElement[l] || []).indexOf($e) === -1 || $e === "style" && I[ce + 1].search(V) !== -1) return !1;
1024
1024
  }
1025
1025
  return !0;
1026
1026
  }
1027
- function l() {
1028
- const o = i(/^[^"]*/), g = u([L, o, L]);
1029
- return g === null ? null : g[1];
1027
+ function x() {
1028
+ const l = a(/^[^"]*/), h = s([N, l, N]);
1029
+ return h === null ? null : h[1];
1030
1030
  }
1031
- function b() {
1032
- const o = i(/^[^']*/), g = u([G, o, G]);
1033
- return g === null ? null : g[1];
1034
- }
1035
- function k() {
1036
- const o = i(/^\s*=\s*/), g = u([C, O, o, r([l, b])]);
1037
- return g === null ? null : [g[1], g[3]];
1038
- }
1039
- function j() {
1040
- const o = s(0, k)();
1041
- return Array.prototype.concat.apply(["HTMLATTRIBUTES"], o);
1042
- }
1043
- function z() {
1044
- let o = null;
1045
- const g = n, $ = a("<"), V = i(/^\/?/), Y = i(/^\s*>/), te = u([$, O, j, V, Y]);
1046
- if (te === null) return null;
1047
- const ve = n, ge = te[1], Je = s(0, K)(), Pt = n, Nt = a("</"), rt = u([Nt, O, Y]);
1048
- if (rt === null) return ["CONCAT", e.slice(g, ve)].concat(Je);
1049
- const zt = n, Mt = rt[1], ut = te[2], Rt = ut.slice(1);
1050
- if (h(ge, Mt, Rt)) o = ["HTMLELEMENT", ge, ut].concat(Je);
1031
+ function y() {
1032
+ const l = a(/^[^']*/), h = s([Q, l, Q]);
1033
+ return h === null ? null : h[1];
1034
+ }
1035
+ function M() {
1036
+ const l = a(/^\s*=\s*/), h = s([F, D, l, n([x, y])]);
1037
+ return h === null ? null : [h[1], h[3]];
1038
+ }
1039
+ function R() {
1040
+ const l = u(0, M)();
1041
+ return Array.prototype.concat.apply(["HTMLATTRIBUTES"], l);
1042
+ }
1043
+ function m() {
1044
+ let l = null;
1045
+ const h = r, I = i("<"), G = a(/^\/?/), V = a(/^\s*>/), ce = s([I, D, R, G, V]);
1046
+ if (ce === null) return null;
1047
+ const Ee = r, $e = ce[1], Je = u(0, g)(), It = r, zt = i("</"), nt = s([zt, D, V]);
1048
+ if (nt === null) return ["CONCAT", e.slice(h, Ee)].concat(Je);
1049
+ const Nt = r, Mt = nt[1], st = ce[2], jt = st.slice(1);
1050
+ if (f($e, Mt, jt)) l = ["HTMLELEMENT", $e, st].concat(Je);
1051
1051
  else {
1052
- const st = (jt) => jt.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#039;");
1053
- o = ["CONCAT", st(e.slice(g, ve))].concat(Je, st(e.slice(Pt, zt)));
1052
+ const ut = (Rt) => Rt.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#039;");
1053
+ l = ["CONCAT", ut(e.slice(h, Ee))].concat(Je, ut(e.slice(It, Nt)));
1054
1054
  }
1055
- return o;
1055
+ return l;
1056
1056
  }
1057
- const H = r([d, ue, v, P, pe]), K = r([d, ue, v, P, z, ie]), Z = r([d, ue, W]);
1058
- function R() {
1059
- const o = s(0, K)();
1060
- return o === null ? null : ["CONCAT"].concat(o);
1057
+ const c = n([Fe, A, L, o, De]), g = n([Fe, A, L, o, m, le]), w = n([Fe, A, J]);
1058
+ function ie() {
1059
+ const l = u(0, g)();
1060
+ return l === null ? null : ["CONCAT"].concat(l);
1061
1061
  }
1062
- const fe = R();
1063
- if (fe === null || n !== e.length) throw new Error("Parse error at position " + n.toString() + " in input: " + e);
1064
- return fe;
1062
+ const se = ie();
1063
+ if (se === null || r !== e.length) throw new Error("Parse error at position " + r.toString() + " in input: " + e);
1064
+ return se;
1065
1065
  }
1066
1066
  class dt {
1067
- constructor(t, { wikilinks: n = !1 } = {}) {
1068
- this.locale = ye(t), this.wikilinks = n, this.emitter = new $t(this.locale);
1067
+ constructor(t, { wikilinks: r = !1 } = {}) {
1068
+ this.locale = ke(t), this.wikilinks = r, this.emitter = new Bt(this.locale);
1069
1069
  }
1070
- parse(t, n) {
1070
+ parse(t, r) {
1071
1071
  if (t.includes("{{") || t.includes("<") || this.wikilinks && t.includes("[")) {
1072
- const r = ya(t, { wikilinks: this.wikilinks });
1073
- return this.emitter.emit(r, n);
1074
- } else return this.simpleParse(t, n);
1075
- }
1076
- simpleParse(t, n) {
1077
- return t.replace(/\$(\d+)/g, (r, u) => {
1078
- const s = parseInt(u, 10) - 1;
1079
- return n[s] !== void 0 ? n[s] : "$" + u;
1072
+ const n = yi(t, { wikilinks: this.wikilinks });
1073
+ return this.emitter.emit(n, r);
1074
+ } else return this.simpleParse(t, r);
1075
+ }
1076
+ simpleParse(t, r) {
1077
+ return t.replace(/\$(\d+)/g, (n, s) => {
1078
+ const u = parseInt(s, 10) - 1;
1079
+ return r[u] !== void 0 ? r[u] : "$" + s;
1080
1080
  });
1081
1081
  }
1082
1082
  }
1083
- class Ba {
1083
+ class $i {
1084
1084
  constructor() {
1085
1085
  this.sourceMap = /* @__PURE__ */ new Map();
1086
1086
  }
1087
- load(t, n) {
1087
+ load(t, r) {
1088
1088
  if (typeof t != "object") throw new Error("Invalid message source. Must be an object");
1089
- if (n = ye(n), n) {
1090
- if (!/^[a-zA-Z0-9-]+$/.test(n)) throw new Error(`Invalid locale ${n}`);
1091
- for (const r in t) if (r.indexOf("@") !== 0) {
1092
- if (typeof t[r] == "object") return this.load(t);
1093
- if (typeof t[r] != "string") throw new Error(`Invalid message for message ${r} in ${n} locale.`);
1089
+ if (r = ke(r), r) {
1090
+ if (!/^[a-zA-Z0-9-]+$/.test(r)) throw new Error(`Invalid locale ${r}`);
1091
+ for (const n in t) if (n.indexOf("@") !== 0) {
1092
+ if (typeof t[n] == "object") return this.load(t);
1093
+ if (typeof t[n] != "string") throw new Error(`Invalid message for message ${n} in ${r} locale.`);
1094
1094
  break;
1095
1095
  }
1096
- this.sourceMap.has(n) ? this.sourceMap.set(n, Object.assign(this.sourceMap.get(n), t)) : this.sourceMap.set(n, t);
1097
- } else for (n in t) this.load(t[n], n);
1096
+ this.sourceMap.has(r) ? this.sourceMap.set(r, Object.assign(this.sourceMap.get(r), t)) : this.sourceMap.set(r, t);
1097
+ } else for (r in t) this.load(t[r], r);
1098
1098
  }
1099
- getMessage(t, n) {
1100
- const r = this.sourceMap.get(ye(n));
1101
- return r ? r[t] : null;
1099
+ getMessage(t, r) {
1100
+ const n = this.sourceMap.get(ke(r));
1101
+ return n ? n[t] : null;
1102
1102
  }
1103
1103
  hasLocale(t) {
1104
1104
  return this.sourceMap.has(t);
1105
1105
  }
1106
1106
  }
1107
- class $a {
1108
- constructor(t, { finalFallback: n = "en", messages: r = void 0, wikilinks: u = !1 } = {}) {
1109
- this.locale = ye(t), this.parser = new dt(this.locale, { wikilinks: u }), this.messageStore = new Ba(), r && this.load(r, this.locale), this.finalFallback = n, this.wikilinks = u;
1107
+ class Bi {
1108
+ constructor(t, { finalFallback: r = "en", messages: n = void 0, wikilinks: s = !1 } = {}) {
1109
+ this.locale = ke(t), this.parser = new dt(this.locale, { wikilinks: s }), this.messageStore = new $i(), n && this.load(n, this.locale), this.finalFallback = r, this.wikilinks = s;
1110
1110
  }
1111
- load(t, n) {
1112
- return this.messageStore.load(t, n || this.locale);
1111
+ load(t, r) {
1112
+ return this.messageStore.load(t, r || this.locale);
1113
1113
  }
1114
- i18n(t, ...n) {
1115
- return this.parser.parse(this.getMessage(t), n);
1114
+ i18n(t, ...r) {
1115
+ return this.parser.parse(this.getMessage(t), r);
1116
1116
  }
1117
1117
  setLocale(t) {
1118
- this.locale = ye(t), this.parser = new dt(this.locale, { wikilinks: this.wikilinks });
1118
+ this.locale = ke(t), this.parser = new dt(this.locale, { wikilinks: this.wikilinks });
1119
1119
  }
1120
1120
  getFallbackLocales() {
1121
- return [...Bt[this.locale] || [], this.finalFallback];
1121
+ return [...$t[this.locale] || [], this.finalFallback];
1122
1122
  }
1123
1123
  getMessage(t) {
1124
- let n = this.locale, r = 0;
1125
- const u = this.getFallbackLocales(this.locale);
1126
- for (; n; ) {
1127
- const s = n.split("-");
1128
- let a = s.length;
1124
+ let r = this.locale, n = 0;
1125
+ const s = this.getFallbackLocales(this.locale);
1126
+ for (; r; ) {
1127
+ const u = r.split("-");
1128
+ let i = u.length;
1129
1129
  do {
1130
- const i = s.slice(0, a).join("-"), C = this.messageStore.getMessage(t, i);
1131
- if (typeof C == "string") return C;
1132
- a--;
1133
- } while (a);
1134
- n = u[r], r++;
1130
+ const a = u.slice(0, i).join("-"), F = this.messageStore.getMessage(t, a);
1131
+ if (typeof F == "string") return F;
1132
+ i--;
1133
+ } while (i);
1134
+ r = s[n], n++;
1135
1135
  }
1136
1136
  return t;
1137
1137
  }
1138
- registerParserPlugin(t, n) {
1139
- $t.prototype[t] = n;
1138
+ registerParserPlugin(t, r) {
1139
+ Bt.prototype[t] = r;
1140
1140
  }
1141
1141
  }
1142
1142
  const kt = {
@@ -1209,8 +1209,14 @@ const kt = {
1209
1209
  "sa-reset-submit": "Reset Password",
1210
1210
  "sa-reset-success": "Password reset successfully! You can now log in.",
1211
1211
  "sa-reset-error": "Unable to reset password. Please try again.",
1212
- "sa-reset-error-code": "Invalid or expired reset code"
1213
- }, ka = {
1212
+ "sa-reset-error-code": "Invalid or expired reset code",
1213
+ "sa-or": "Or",
1214
+ "sa-social-google": "Continue with Google",
1215
+ "sa-social-github": "Continue with GitHub",
1216
+ "sa-social-apple": "Continue with Apple",
1217
+ "sa-social-oidc": "Continue with SSO",
1218
+ "sa-social-error": "Error starting social login"
1219
+ }, ki = {
1214
1220
  "@metadata": { authors: ["Mason Payne"], "last-updated": "2022-05-28", locale: "fr" },
1215
1221
  "sa-login": "Connexion",
1216
1222
  "sa-username": "Nom d'utilisateur",
@@ -1248,8 +1254,14 @@ const kt = {
1248
1254
  "sa-reset-submit": "Réinitialiser le mot de passe",
1249
1255
  "sa-reset-success": "Mot de passe réinitialisé avec succès ! Vous pouvez maintenant vous connecter.",
1250
1256
  "sa-reset-error": "Impossible de réinitialiser le mot de passe. Veuillez réessayer.",
1251
- "sa-reset-error-code": "Code de réinitialisation invalide ou expiré"
1252
- }, xa = {
1257
+ "sa-reset-error-code": "Code de réinitialisation invalide ou expiré",
1258
+ "sa-or": "Ou",
1259
+ "sa-social-google": "Continuer avec Google",
1260
+ "sa-social-github": "Continuer avec GitHub",
1261
+ "sa-social-apple": "Continuer avec Apple",
1262
+ "sa-social-oidc": "Continuer avec SSO",
1263
+ "sa-social-error": "Erreur lors de la connexion sociale"
1264
+ }, xi = {
1253
1265
  "@metadata": { authors: ["Mason Payne"], "last-updated": "2022-05-28", locale: "es" },
1254
1266
  "sa-login": "Acceso",
1255
1267
  "sa-username": "Nombre de usuario",
@@ -1285,8 +1297,14 @@ const kt = {
1285
1297
  "sa-reset-submit": "Restablecer contraseña",
1286
1298
  "sa-reset-success": "¡Contraseña restablecida con éxito! Ya puedes iniciar sesión.",
1287
1299
  "sa-reset-error": "No se pudo restablecer la contraseña. Por favor intenta de nuevo.",
1288
- "sa-reset-error-code": "Código de restablecimiento inválido o expirado"
1289
- }, _a = {
1300
+ "sa-reset-error-code": "Código de restablecimiento inválido o expirado",
1301
+ "sa-or": "O",
1302
+ "sa-social-google": "Continuar con Google",
1303
+ "sa-social-github": "Continuar con GitHub",
1304
+ "sa-social-apple": "Continuar con Apple",
1305
+ "sa-social-oidc": "Continuar con SSO",
1306
+ "sa-social-error": "Error al iniciar sesión social"
1307
+ }, _i = {
1290
1308
  "@metadata": { authors: ["Mason Payne"], "last-updated": "2022-05-28", locale: "ja" },
1291
1309
  "sa-login": "ログイン",
1292
1310
  "sa-username": "ユーザー名",
@@ -1324,66 +1342,72 @@ const kt = {
1324
1342
  "sa-reset-submit": "パスワードをリセット",
1325
1343
  "sa-reset-success": "パスワードが正常にリセットされました!ログインできます。",
1326
1344
  "sa-reset-error": "パスワードをリセットできませんでした。もう一度お試しください。",
1327
- "sa-reset-error-code": "無効または期限切れのリセットコード"
1328
- }, Sa = {
1345
+ "sa-reset-error-code": "無効または期限切れのリセットコード",
1346
+ "sa-or": "または",
1347
+ "sa-social-google": "Googleで続ける",
1348
+ "sa-social-github": "GitHubで続ける",
1349
+ "sa-social-apple": "Appleで続ける",
1350
+ "sa-social-oidc": "SSOで続ける",
1351
+ "sa-social-error": "ソーシャルログイン開始エラー"
1352
+ }, Si = {
1329
1353
  en: kt,
1330
- fr: ka,
1331
- es: xa,
1332
- ja: _a
1354
+ fr: ki,
1355
+ es: xi,
1356
+ ja: _i
1333
1357
  };
1334
- function nt(e) {
1335
- const t = new $a("en", {
1358
+ function rt(e) {
1359
+ const t = new Bi("en", {
1336
1360
  messages: kt
1337
1361
  });
1338
- return e !== "en" && (t.load(Sa[e], e), t.setLocale(e)), t;
1362
+ return e !== "en" && (t.load(Si[e], e), t.setLocale(e)), t;
1339
1363
  }
1340
1364
  function xt(e) {
1341
- const t = "==".slice(0, (4 - e.length % 4) % 4), n = e.replace(/-/g, "+").replace(/_/g, "/") + t, r = atob(n), u = new ArrayBuffer(r.length), s = new Uint8Array(u);
1342
- for (let a = 0; a < r.length; a++)
1343
- s[a] = r.charCodeAt(a);
1344
- return u;
1365
+ const t = "==".slice(0, (4 - e.length % 4) % 4), r = e.replace(/-/g, "+").replace(/_/g, "/") + t, n = atob(r), s = new ArrayBuffer(n.length), u = new Uint8Array(s);
1366
+ for (let i = 0; i < n.length; i++)
1367
+ u[i] = n.charCodeAt(i);
1368
+ return s;
1345
1369
  }
1346
1370
  function _t(e) {
1347
1371
  const t = new Uint8Array(e);
1348
- let n = "";
1349
- for (const s of t)
1350
- n += String.fromCharCode(s);
1351
- return btoa(n).replace(/\+/g, "-").replace(
1372
+ let r = "";
1373
+ for (const u of t)
1374
+ r += String.fromCharCode(u);
1375
+ return btoa(r).replace(/\+/g, "-").replace(
1352
1376
  /\//g,
1353
1377
  "_"
1354
1378
  ).replace(/=/g, "");
1355
1379
  }
1356
- var _ = "copy", le = "convert";
1357
- function Be(e, t, n) {
1358
- if (t === _)
1359
- return n;
1360
- if (t === le)
1361
- return e(n);
1380
+ var T = "copy", ae = "convert";
1381
+ function xe(e, t, r) {
1382
+ if (t === T)
1383
+ return r;
1384
+ if (t === ae)
1385
+ return e(r);
1362
1386
  if (t instanceof Array)
1363
- return n.map((r) => Be(e, t[0], r));
1387
+ return r.map((n) => xe(e, t[0], n));
1364
1388
  if (t instanceof Object) {
1365
- const r = {};
1366
- for (const [u, s] of Object.entries(t)) {
1367
- if (s.derive) {
1368
- const a = s.derive(n);
1369
- a !== void 0 && (n[u] = a);
1389
+ const n = {};
1390
+ for (const [s, u] of Object.entries(t)) {
1391
+ if (u.derive) {
1392
+ const i = u.derive(r);
1393
+ i !== void 0 && (r[s] = i);
1370
1394
  }
1371
- if (!(u in n)) {
1372
- if (s.required)
1373
- throw new Error(`Missing key: ${u}`);
1395
+ if (!(s in r)) {
1396
+ if (u.required)
1397
+ throw new Error(`Missing key: ${s}`);
1374
1398
  continue;
1375
1399
  }
1376
- if (n[u] == null) {
1377
- r[u] = null;
1400
+ if (r[s] == null) {
1401
+ n[s] = null;
1378
1402
  continue;
1379
1403
  }
1380
- r[u] = Be(
1404
+ n[s] = xe(
1381
1405
  e,
1382
- s.schema,
1383
- n[u]
1406
+ u.schema,
1407
+ r[s]
1384
1408
  );
1385
1409
  }
1386
- return r;
1410
+ return n;
1387
1411
  }
1388
1412
  }
1389
1413
  function Ze(e, t) {
@@ -1393,57 +1417,57 @@ function Ze(e, t) {
1393
1417
  derive: t
1394
1418
  };
1395
1419
  }
1396
- function I(e) {
1420
+ function z(e) {
1397
1421
  return {
1398
1422
  required: !0,
1399
1423
  schema: e
1400
1424
  };
1401
1425
  }
1402
- function M(e) {
1426
+ function q(e) {
1403
1427
  return {
1404
1428
  required: !1,
1405
1429
  schema: e
1406
1430
  };
1407
1431
  }
1408
1432
  var St = {
1409
- type: I(_),
1410
- id: I(le),
1411
- transports: M(_)
1412
- }, Tt = {
1413
- appid: M(_),
1414
- appidExclude: M(_),
1415
- credProps: M(_)
1433
+ type: z(T),
1434
+ id: z(ae),
1435
+ transports: q(T)
1416
1436
  }, Ot = {
1417
- appid: M(_),
1418
- appidExclude: M(_),
1419
- credProps: M(_)
1420
- }, Ta = {
1421
- publicKey: I({
1422
- rp: I(_),
1423
- user: I({
1424
- id: I(le),
1425
- name: I(_),
1426
- displayName: I(_)
1437
+ appid: q(T),
1438
+ appidExclude: q(T),
1439
+ credProps: q(T)
1440
+ }, Tt = {
1441
+ appid: q(T),
1442
+ appidExclude: q(T),
1443
+ credProps: q(T)
1444
+ }, Oi = {
1445
+ publicKey: z({
1446
+ rp: z(T),
1447
+ user: z({
1448
+ id: z(ae),
1449
+ name: z(T),
1450
+ displayName: z(T)
1427
1451
  }),
1428
- challenge: I(le),
1429
- pubKeyCredParams: I(_),
1430
- timeout: M(_),
1431
- excludeCredentials: M([St]),
1432
- authenticatorSelection: M(_),
1433
- attestation: M(_),
1434
- extensions: M(Tt)
1452
+ challenge: z(ae),
1453
+ pubKeyCredParams: z(T),
1454
+ timeout: q(T),
1455
+ excludeCredentials: q([St]),
1456
+ authenticatorSelection: q(T),
1457
+ attestation: q(T),
1458
+ extensions: q(Ot)
1435
1459
  }),
1436
- signal: M(_)
1437
- }, Oa = {
1438
- type: I(_),
1439
- id: I(_),
1440
- rawId: I(le),
1441
- authenticatorAttachment: M(_),
1442
- response: I({
1443
- clientDataJSON: I(le),
1444
- attestationObject: I(le),
1460
+ signal: q(T)
1461
+ }, Ti = {
1462
+ type: z(T),
1463
+ id: z(T),
1464
+ rawId: z(ae),
1465
+ authenticatorAttachment: q(T),
1466
+ response: z({
1467
+ clientDataJSON: z(ae),
1468
+ attestationObject: z(ae),
1445
1469
  transports: Ze(
1446
- _,
1470
+ T,
1447
1471
  (e) => {
1448
1472
  var t;
1449
1473
  return ((t = e.getTransports) == null ? void 0 : t.call(e)) || [];
@@ -1451,67 +1475,67 @@ var St = {
1451
1475
  )
1452
1476
  }),
1453
1477
  clientExtensionResults: Ze(
1454
- Ot,
1478
+ Tt,
1455
1479
  (e) => e.getClientExtensionResults()
1456
1480
  )
1457
- }, Ia = {
1458
- mediation: M(_),
1459
- publicKey: I({
1460
- challenge: I(le),
1461
- timeout: M(_),
1462
- rpId: M(_),
1463
- allowCredentials: M([St]),
1464
- userVerification: M(_),
1465
- extensions: M(Tt)
1481
+ }, Pi = {
1482
+ mediation: q(T),
1483
+ publicKey: z({
1484
+ challenge: z(ae),
1485
+ timeout: q(T),
1486
+ rpId: q(T),
1487
+ allowCredentials: q([St]),
1488
+ userVerification: q(T),
1489
+ extensions: q(Ot)
1466
1490
  }),
1467
- signal: M(_)
1468
- }, Pa = {
1469
- type: I(_),
1470
- id: I(_),
1471
- rawId: I(le),
1472
- authenticatorAttachment: M(_),
1473
- response: I({
1474
- clientDataJSON: I(le),
1475
- authenticatorData: I(le),
1476
- signature: I(le),
1477
- userHandle: I(le)
1491
+ signal: q(T)
1492
+ }, Ii = {
1493
+ type: z(T),
1494
+ id: z(T),
1495
+ rawId: z(ae),
1496
+ authenticatorAttachment: q(T),
1497
+ response: z({
1498
+ clientDataJSON: z(ae),
1499
+ authenticatorData: z(ae),
1500
+ signature: z(ae),
1501
+ userHandle: z(ae)
1478
1502
  }),
1479
1503
  clientExtensionResults: Ze(
1480
- Ot,
1504
+ Tt,
1481
1505
  (e) => e.getClientExtensionResults()
1482
1506
  )
1483
1507
  };
1484
- function Na(e) {
1485
- return Be(xt, Ta, e);
1508
+ function zi(e) {
1509
+ return xe(xt, Oi, e);
1486
1510
  }
1487
- function za(e) {
1488
- return Be(
1511
+ function Ni(e) {
1512
+ return xe(
1489
1513
  _t,
1490
- Oa,
1514
+ Ti,
1491
1515
  e
1492
1516
  );
1493
1517
  }
1494
- function Ma(e) {
1495
- return Be(xt, Ia, e);
1518
+ function Mi(e) {
1519
+ return xe(xt, Pi, e);
1496
1520
  }
1497
- function Ra(e) {
1498
- return Be(
1521
+ function ji(e) {
1522
+ return xe(
1499
1523
  _t,
1500
- Pa,
1524
+ Ii,
1501
1525
  e
1502
1526
  );
1503
1527
  }
1504
- async function ja(e) {
1528
+ async function Ri(e) {
1505
1529
  const t = await navigator.credentials.create(
1506
1530
  e
1507
1531
  );
1508
- return t.toJSON = () => za(t), t;
1532
+ return t.toJSON = () => Ni(t), t;
1509
1533
  }
1510
- async function qa(e) {
1534
+ async function Li(e) {
1511
1535
  const t = await navigator.credentials.get(
1512
1536
  e
1513
1537
  );
1514
- return t.toJSON = () => Ra(t), t;
1538
+ return t.toJSON = () => ji(t), t;
1515
1539
  }
1516
1540
  function Ye(e) {
1517
1541
  this.message = e;
@@ -1520,10 +1544,10 @@ Ye.prototype = new Error(), Ye.prototype.name = "InvalidCharacterError";
1520
1544
  var Dt = typeof window < "u" && window.atob && window.atob.bind(window) || function(e) {
1521
1545
  var t = String(e).replace(/=+$/, "");
1522
1546
  if (t.length % 4 == 1) throw new Ye("'atob' failed: The string to be decoded is not correctly encoded.");
1523
- for (var n, r, u = 0, s = 0, a = ""; r = t.charAt(s++); ~r && (n = u % 4 ? 64 * n + r : r, u++ % 4) ? a += String.fromCharCode(255 & n >> (-2 * u & 6)) : 0) r = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(r);
1524
- return a;
1547
+ for (var r, n, s = 0, u = 0, i = ""; n = t.charAt(u++); ~n && (r = s % 4 ? 64 * r + n : n, s++ % 4) ? i += String.fromCharCode(255 & r >> (-2 * s & 6)) : 0) n = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(n);
1548
+ return i;
1525
1549
  };
1526
- function La(e) {
1550
+ function qi(e) {
1527
1551
  var t = e.replace(/-/g, "+").replace(/_/g, "/");
1528
1552
  switch (t.length % 4) {
1529
1553
  case 0:
@@ -1538,51 +1562,51 @@ function La(e) {
1538
1562
  throw "Illegal base64url string!";
1539
1563
  }
1540
1564
  try {
1541
- return function(n) {
1542
- return decodeURIComponent(Dt(n).replace(/(.)/g, function(r, u) {
1543
- var s = u.charCodeAt(0).toString(16).toUpperCase();
1544
- return s.length < 2 && (s = "0" + s), "%" + s;
1565
+ return function(r) {
1566
+ return decodeURIComponent(Dt(r).replace(/(.)/g, function(n, s) {
1567
+ var u = s.charCodeAt(0).toString(16).toUpperCase();
1568
+ return u.length < 2 && (u = "0" + u), "%" + u;
1545
1569
  }));
1546
1570
  }(t);
1547
1571
  } catch {
1548
1572
  return Dt(t);
1549
1573
  }
1550
1574
  }
1551
- function qe(e) {
1575
+ function Le(e) {
1552
1576
  this.message = e;
1553
1577
  }
1554
- function Ua(e, t) {
1555
- if (typeof e != "string") throw new qe("Invalid token specified");
1556
- var n = (t = t || {}).header === !0 ? 0 : 1;
1578
+ function Ui(e, t) {
1579
+ if (typeof e != "string") throw new Le("Invalid token specified");
1580
+ var r = (t = t || {}).header === !0 ? 0 : 1;
1557
1581
  try {
1558
- return JSON.parse(La(e.split(".")[n]));
1559
- } catch (r) {
1560
- throw new qe("Invalid token specified: " + r.message);
1582
+ return JSON.parse(qi(e.split(".")[r]));
1583
+ } catch (n) {
1584
+ throw new Le("Invalid token specified: " + n.message);
1561
1585
  }
1562
1586
  }
1563
- qe.prototype = new Error(), qe.prototype.name = "InvalidTokenError";
1564
- const Pe = "spartan-token";
1565
- function It() {
1566
- const e = localStorage.getItem(Pe);
1587
+ Le.prototype = new Error(), Le.prototype.name = "InvalidTokenError";
1588
+ const Ie = "spartan-token";
1589
+ function Pt() {
1590
+ const e = localStorage.getItem(Ie);
1567
1591
  let t = null;
1568
1592
  if (e)
1569
1593
  try {
1570
- if (t = Ua(e), t.exp > Ka())
1594
+ if (t = Ui(e), t.exp > Ki())
1571
1595
  return t;
1572
- localStorage.removeItem(Pe);
1573
- } catch (n) {
1574
- console.error("Error decoding token", n), localStorage.removeItem(Pe);
1596
+ localStorage.removeItem(Ie);
1597
+ } catch (r) {
1598
+ console.error("Error decoding token", r), localStorage.removeItem(Ie);
1575
1599
  }
1576
1600
  return null;
1577
1601
  }
1578
- function Ja() {
1579
- const e = localStorage.getItem(Pe);
1602
+ function Ji() {
1603
+ const e = localStorage.getItem(Ie);
1580
1604
  return e || null;
1581
1605
  }
1582
- function Ka() {
1606
+ function Ki() {
1583
1607
  return Math.round((/* @__PURE__ */ new Date()).getTime() / 1e3);
1584
1608
  }
1585
- var Va = /* @__PURE__ */ x(`<form class=login-frame><style>.login-frame {
1609
+ var Gi = /* @__PURE__ */ B(`<form class=login-frame><style>.login-frame {
1586
1610
  display: flex;
1587
1611
  flex-direction: column;
1588
1612
  justify-content: center;
@@ -1647,8 +1671,49 @@ var Va = /* @__PURE__ */ x(`<form class=login-frame><style>.login-frame {
1647
1671
  .centered-text {
1648
1672
  text-align: center;
1649
1673
  }
1650
- </style><style></style><h1></h1><input type=text><button type=submit>`), Ga = /* @__PURE__ */ x("<span class=error-message>"), Ge = /* @__PURE__ */ x("<span>"), ft = /* @__PURE__ */ x("<input type=password>"), Wa = /* @__PURE__ */ x("<p>"), Ha = /* @__PURE__ */ x("<select>"), Za = /* @__PURE__ */ x("<option> (<!>)"), Ya = /* @__PURE__ */ x("<input type=text>"), Xa = /* @__PURE__ */ x("<input type=text autocomplete=one-time-code>"), Qa = /* @__PURE__ */ x("<input type=password autocomplete=new-password>"), ei = /* @__PURE__ */ x("<span class=checkbox-wrapper><input type=checkbox><span>&nbsp;"), We = /* @__PURE__ */ x("<a class=centered-text href=#>");
1651
- const ti = {
1674
+
1675
+ .social-divider {
1676
+ display: flex;
1677
+ align-items: center;
1678
+ margin: 20px 0 4px 0;
1679
+ color: #888;
1680
+ font-size: 0.85em;
1681
+ }
1682
+ .social-divider::before, .social-divider::after {
1683
+ content: '';
1684
+ flex: 1;
1685
+ border-bottom: 1px solid #ccc;
1686
+ }
1687
+ .social-divider span {
1688
+ margin: 0 10px;
1689
+ }
1690
+
1691
+ .social-btn {
1692
+ display: flex;
1693
+ align-items: center;
1694
+ justify-content: center;
1695
+ gap: 10px;
1696
+ margin: 8px 0 0 0;
1697
+ padding: 10px;
1698
+ width: 100%;
1699
+ border: 1px solid #ccc;
1700
+ border-radius: 10px;
1701
+ background: #fff;
1702
+ cursor: pointer;
1703
+ font-size: inherit;
1704
+ font-family: inherit;
1705
+ box-sizing: border-box;
1706
+ color: #333;
1707
+ }
1708
+ .social-btn:hover:not(:disabled) {
1709
+ background-color: #f5f5f5;
1710
+ }
1711
+ .social-btn:disabled {
1712
+ opacity: 0.6;
1713
+ cursor: not-allowed;
1714
+ }
1715
+ </style><style></style><h1></h1><input type=text><button type=submit>`), Vi = /* @__PURE__ */ B("<span class=error-message>"), Ve = /* @__PURE__ */ B("<span>"), ht = /* @__PURE__ */ B("<input type=password>"), Hi = /* @__PURE__ */ B("<p>"), Wi = /* @__PURE__ */ B("<select>"), Zi = /* @__PURE__ */ B("<option> (<!>)"), Yi = /* @__PURE__ */ B("<input type=text>"), Xi = /* @__PURE__ */ B("<input type=text autocomplete=one-time-code>"), Qi = /* @__PURE__ */ B("<input type=password autocomplete=new-password>"), ea = /* @__PURE__ */ B("<span class=checkbox-wrapper><input type=checkbox><span>&nbsp;"), He = /* @__PURE__ */ B("<a class=centered-text href=#>"), ta = /* @__PURE__ */ B("<div class=social-divider><span>"), ra = /* @__PURE__ */ B("<button type=button class=social-btn>"), na = /* @__PURE__ */ B('<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>'), sa = /* @__PURE__ */ B('<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>'), ua = /* @__PURE__ */ B('<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>'), ia = /* @__PURE__ */ B('<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>');
1716
+ const aa = {
1652
1717
  domain: "http://127.0.0.1:11000",
1653
1718
  sector: "0ad5c3e5-0186-4557-8b32-4b36f247bf09",
1654
1719
  // defaults to the admin sector
@@ -1657,22 +1722,58 @@ const ti = {
1657
1722
  locale: "en",
1658
1723
  redirect: ""
1659
1724
  };
1660
- tt("spartan-login", ti, (e) => {
1661
- const [t, n] = w(e.startMode), [r, u] = w(""), [s, a] = w(""), [i, C] = w(""), [y, p] = w(""), [S, re] = w(e.redirect), [ae, de] = w(!1), [L, G] = w(!1), [Q, ee] = w(!1), [U, N] = w(""), [W, ie] = w(""), [he, pe] = w([]), [B, J] = w(""), A = nt(e.locale);
1662
- let ue, m;
1725
+ tt("spartan-login", aa, (e) => {
1726
+ const [t, r] = $((e.startMode || "password").toLowerCase()), [n, s] = $(""), [u, i] = $(""), [a, F] = $(""), [k, p] = $(""), [S] = $(e.redirect), [X, te] = $(!1), [he, N] = $(!1), [Q, W] = $(!1), [re, j] = $(""), [H, J] = $(""), [le, de] = $([]), [De, _] = $(""), [K, fe] = $([]), [A, ne] = $(""), b = rt(e.locale);
1727
+ let Z, ge;
1663
1728
  try {
1664
- m = e.styles;
1729
+ ge = e.styles;
1665
1730
  } catch {
1666
- m = "";
1667
- }
1668
- console.log(m), Xe(async () => {
1669
- if (It() && e.redirect !== "" && window.location.pathname !== e.redirect) {
1731
+ ge = "";
1732
+ }
1733
+ console.log(ge), Xe(async () => {
1734
+ const o = new URLSearchParams(window.location.search);
1735
+ if (o.get("error")) {
1736
+ history.replaceState({}, "", window.location.pathname);
1737
+ const y = o.get("error_description");
1738
+ p(y || b.i18n("sa-social-error")), we(), ye();
1739
+ return;
1740
+ }
1741
+ const f = o.get("code");
1742
+ if (f) {
1743
+ history.replaceState({}, "", window.location.pathname);
1744
+ try {
1745
+ const y = await fetch(`${e.domain}/api/v1/oauth/exchange`, {
1746
+ method: "POST",
1747
+ mode: "cors",
1748
+ cache: "no-cache",
1749
+ headers: {
1750
+ "Content-Type": "application/json"
1751
+ },
1752
+ body: JSON.stringify({
1753
+ code: f
1754
+ })
1755
+ });
1756
+ if (!y.ok) throw new Error(b.i18n("sa-social-error"));
1757
+ const M = await y.json();
1758
+ localStorage.setItem("spartan-token", M.token), Z.getRootNode().host.dispatchEvent(new CustomEvent("spartan-login", {
1759
+ bubbles: !0,
1760
+ cancelable: !0,
1761
+ detail: {
1762
+ token: M.token
1763
+ }
1764
+ })), e.redirect !== "" && (window.location.href = e.redirect);
1765
+ } catch (y) {
1766
+ p(y.message || b.i18n("sa-social-error"));
1767
+ }
1768
+ return;
1769
+ }
1770
+ if (Pt() && e.redirect !== "" && window.location.pathname !== e.redirect) {
1670
1771
  window.location.href = e.redirect;
1671
1772
  return;
1672
1773
  }
1673
- De();
1774
+ we(), ye();
1674
1775
  });
1675
- function De() {
1776
+ function we() {
1676
1777
  fetch(`${e.domain}/api/v1/sectors/${e.sector}/publicsettings`, {
1677
1778
  method: "GET",
1678
1779
  mode: "cors",
@@ -1680,167 +1781,205 @@ tt("spartan-login", ti, (e) => {
1680
1781
  headers: {
1681
1782
  "Content-Type": "application/json"
1682
1783
  }
1683
- }).then((d) => {
1684
- if (d.ok)
1685
- return d.json();
1784
+ }).then((o) => {
1785
+ if (o.ok)
1786
+ return o.json();
1686
1787
  throw new Error("Network response was not ok.");
1687
- }).then((d) => {
1688
- console.log(d), de(d.SelfSignUpAllowed);
1689
- }).catch((d) => {
1690
- console.log(d), p(d.message);
1788
+ }).then((o) => {
1789
+ console.log(o), te(o.SelfSignUpAllowed);
1790
+ }).catch((o) => {
1791
+ console.log(o), p(o.message);
1792
+ });
1793
+ }
1794
+ function ye() {
1795
+ fetch(`${e.domain}/api/v1/sectors/${e.sector}/oauth/providers`, {
1796
+ method: "GET",
1797
+ mode: "cors",
1798
+ cache: "no-cache"
1799
+ }).then((o) => {
1800
+ if (o.ok) return o.json();
1801
+ throw new Error("Failed to load social providers");
1802
+ }).then((o) => {
1803
+ const D = (o.providers || []).filter((f) => f.enabled);
1804
+ fe(D);
1805
+ }).catch(() => {
1806
+ });
1807
+ }
1808
+ function Ce(o) {
1809
+ if (A()) return;
1810
+ ne(o), p("");
1811
+ const D = window.location.origin + window.location.pathname;
1812
+ fetch(`${e.domain}/api/v1/oauth/${o}/initiate`, {
1813
+ method: "POST",
1814
+ mode: "cors",
1815
+ cache: "no-cache",
1816
+ headers: {
1817
+ "Content-Type": "application/json"
1818
+ },
1819
+ body: JSON.stringify({
1820
+ sectorID: e.sector,
1821
+ redirectURI: D
1822
+ })
1823
+ }).then((f) => {
1824
+ if (f.ok) return f.json();
1825
+ throw new Error(b.i18n("sa-social-error"));
1826
+ }).then((f) => {
1827
+ window.location.href = f.authURL;
1828
+ }).catch((f) => {
1829
+ ne(""), p(f.message);
1691
1830
  });
1692
1831
  }
1693
- function $e(d) {
1694
- d.preventDefault(), console.log("login"), p(""), t() === "password" ? xe() : t() === "webauthn" ? ke() : t() === "otp-pick" ? be(B()) : t() === "otp" ? _e() : t() === "reset-email" ? Se() : t() === "reset-code" && Ce();
1832
+ function Ae(o) {
1833
+ o.preventDefault(), console.log("login"), p(""), t() === "password" ? me() : t() === "webauthn" ? Se() : t() === "otp-pick" ? E(De()) : t() === "otp" ? v() : t() === "reset-email" ? P() : t() === "reset-code" && L();
1695
1834
  }
1696
- function oe(d) {
1697
- d.preventDefault(), console.log("signup"), p(""), G(!1), fetch(`${e.domain}/api/v1/users`, {
1835
+ function _e(o) {
1836
+ o.preventDefault(), console.log("signup"), p(""), N(!1), fetch(`${e.domain}/api/v1/users`, {
1698
1837
  method: "POST",
1699
1838
  mode: "cors",
1700
1839
  cache: "no-cache",
1701
1840
  body: JSON.stringify({
1702
- username: r(),
1703
- password: s(),
1841
+ username: n(),
1842
+ password: u(),
1704
1843
  sectorID: e.sector
1705
1844
  })
1706
- }).then((E) => {
1707
- if (E.ok)
1708
- return E.json();
1709
- throw new Error(A.i18n("sa-error-creating-user"));
1710
- }).then((E) => {
1711
- console.log(E), G(!0), n(e.startMode);
1712
- }).catch((E) => {
1713
- G(!1), p(E.message), console.log(E);
1845
+ }).then((D) => {
1846
+ if (D.ok)
1847
+ return D.json();
1848
+ throw new Error(b.i18n("sa-error-creating-user"));
1849
+ }).then((D) => {
1850
+ console.log(D), N(!0), r(e.startMode);
1851
+ }).catch((D) => {
1852
+ N(!1), p(D.message), console.log(D);
1714
1853
  });
1715
1854
  }
1716
- function ke() {
1855
+ function Se() {
1717
1856
  console.log("webauthnLogin"), fetch(`${e.domain}/api/v1/login/webauthn/begin`, {
1718
1857
  method: "POST",
1719
1858
  mode: "cors",
1720
1859
  cache: "no-cache",
1721
1860
  body: JSON.stringify({
1722
- username: r(),
1861
+ username: n(),
1723
1862
  sectorID: e.sector
1724
1863
  })
1725
- }).then((d) => {
1726
- if (d.ok)
1727
- return d.json();
1728
- throw d.status === 401 ? (n("password"), p(A.i18n("webauthn-not-enrolled")), new Error(A.i18n("webauthn-not-enrolled"))) : new Error(`${d.status} ${d.statusText}: Network response was not ok.`);
1729
- }).then((d) => {
1730
- console.log(d);
1731
- const E = Ma(d.CredentialAssertion);
1732
- return console.log("Parsed WebAuthn request options:", E), qa(E).then((D) => {
1733
- const f = JSON.stringify(D);
1734
- let v = JSON.parse(f);
1735
- return v.transactionID = d.TransactionID, v;
1864
+ }).then((o) => {
1865
+ if (o.ok)
1866
+ return o.json();
1867
+ throw o.status === 401 ? (r("password"), p(b.i18n("webauthn-not-enrolled")), new Error(b.i18n("webauthn-not-enrolled"))) : new Error(`${o.status} ${o.statusText}: Network response was not ok.`);
1868
+ }).then((o) => {
1869
+ console.log(o);
1870
+ const D = Mi(o.CredentialAssertion);
1871
+ return console.log("Parsed WebAuthn request options:", D), Li(D).then((f) => {
1872
+ const x = JSON.stringify(f);
1873
+ let y = JSON.parse(x);
1874
+ return y.transactionID = o.TransactionID, y;
1736
1875
  });
1737
- }).then((d) => fetch(`${e.domain}/api/v1/login/webauthn/finish`, {
1876
+ }).then((o) => fetch(`${e.domain}/api/v1/login/webauthn/finish`, {
1738
1877
  method: "POST",
1739
1878
  mode: "cors",
1740
1879
  cache: "no-cache",
1741
- body: JSON.stringify(d)
1742
- })).then(Fe).catch((d) => {
1743
- p(d.message), console.log(d);
1880
+ body: JSON.stringify(o)
1881
+ })).then(ve).catch((o) => {
1882
+ p(o.message), console.log(o);
1744
1883
  });
1745
1884
  }
1746
- function xe() {
1885
+ function me() {
1747
1886
  console.log("password login"), fetch(e.domain + "/api/v1/login/password", {
1748
1887
  method: "post",
1749
1888
  mode: "cors",
1750
1889
  cache: "no-cache",
1751
1890
  body: JSON.stringify({
1752
- username: r(),
1753
- password: s(),
1891
+ username: n(),
1892
+ password: u(),
1754
1893
  sectorID: e.sector
1755
1894
  })
1756
- }).then(Fe);
1895
+ }).then(ve);
1757
1896
  }
1758
- async function Fe(d) {
1759
- let E = Promise.resolve(d);
1760
- return E.then((D) => {
1761
- if (d.ok)
1762
- return d.json();
1897
+ async function ve(o) {
1898
+ let D = Promise.resolve(o);
1899
+ return D.then((f) => {
1900
+ if (o.ok)
1901
+ return o.json();
1763
1902
  throw new Error("Network response was not ok.");
1764
- }).then((D) => {
1765
- if (console.log(D), localStorage.setItem("spartan-txid", D.transactionID), !D.token) {
1766
- D.challengeType.indexOf("otp") !== -1 ? Ee() : D.challengeType.indexOf("webauthn") !== -1 ? (n("webauthn"), p(A.i18n("sa-webauthn-required"))) : p(A.i18n("sa-unknown-challenge"));
1903
+ }).then((f) => {
1904
+ if (console.log(f), localStorage.setItem("spartan-txid", f.transactionID), !f.token) {
1905
+ f.challengeType.indexOf("otp") !== -1 ? Fe() : f.challengeType.indexOf("webauthn") !== -1 ? (r("webauthn"), p(b.i18n("sa-webauthn-required"))) : p(b.i18n("sa-unknown-challenge"));
1767
1906
  return;
1768
1907
  }
1769
- localStorage.setItem("spartan-token", D.token);
1770
- const f = new CustomEvent("spartan-login", {
1908
+ localStorage.setItem("spartan-token", f.token);
1909
+ const x = new CustomEvent("spartan-login", {
1771
1910
  bubbles: !0,
1772
1911
  cancelable: !0,
1773
1912
  detail: {
1774
- token: D.token,
1775
- transactionID: D.transactionID
1913
+ token: f.token,
1914
+ transactionID: f.transactionID
1776
1915
  }
1777
1916
  });
1778
- ue.getRootNode().host.dispatchEvent(f), S() !== "" && (window.location.href = S());
1779
- }).catch((D) => {
1780
- D.json().then((f) => {
1781
- console.log(f.message), p(f.message);
1782
- }).catch((f) => {
1783
- console.log(f);
1784
- }), console.log(D);
1785
- }), E;
1786
- }
1787
- function Ee() {
1788
- const d = localStorage.getItem("spartan-txid") || "";
1789
- fetch(e.domain + `/api/v1/otp/${encodeURIComponent(r())}?transactionID=${encodeURIComponent(d)}&sectorID=${encodeURIComponent(e.sector)}`, {
1917
+ Z.getRootNode().host.dispatchEvent(x), S() !== "" && (window.location.href = S());
1918
+ }).catch((f) => {
1919
+ f.json().then((x) => {
1920
+ console.log(x.message), p(x.message);
1921
+ }).catch((x) => {
1922
+ console.log(x);
1923
+ }), console.log(f);
1924
+ }), D;
1925
+ }
1926
+ function Fe() {
1927
+ const o = localStorage.getItem("spartan-txid") || "";
1928
+ fetch(e.domain + `/api/v1/otp/${encodeURIComponent(n())}?transactionID=${encodeURIComponent(o)}&sectorID=${encodeURIComponent(e.sector)}`, {
1790
1929
  method: "get",
1791
1930
  mode: "cors",
1792
1931
  cache: "no-cache"
1793
- }).then((E) => {
1794
- if (E.ok)
1795
- return E.json();
1796
- throw new Error(A.i18n("error-otp-list"));
1797
- }).then((E) => {
1798
- const D = E.registrations || [];
1799
- if (D.length === 0) {
1800
- p(A.i18n("sa-otp-no-registrations"));
1932
+ }).then((D) => {
1933
+ if (D.ok)
1934
+ return D.json();
1935
+ throw new Error(b.i18n("error-otp-list"));
1936
+ }).then((D) => {
1937
+ const f = D.registrations || [];
1938
+ if (f.length === 0) {
1939
+ p(b.i18n("sa-otp-no-registrations"));
1801
1940
  return;
1802
1941
  }
1803
- D.length === 1 ? be(D[0].ID || "") : (pe(D), J(D[0].ID || ""), n("otp-pick"), p(""));
1804
- }).catch((E) => {
1805
- p(E.message), console.log(E);
1942
+ f.length === 1 ? E(f[0].ID || "") : (de(f), _(f[0].ID || ""), r("otp-pick"), p(""));
1943
+ }).catch((D) => {
1944
+ p(D.message), console.log(D);
1806
1945
  });
1807
1946
  }
1808
- function be(d) {
1809
- console.log("begin OTP, registrationID:", d), fetch(e.domain + "/api/v1/login/otp/begin", {
1947
+ function E(o) {
1948
+ console.log("begin OTP, registrationID:", o), fetch(e.domain + "/api/v1/login/otp/begin", {
1810
1949
  method: "post",
1811
1950
  mode: "cors",
1812
1951
  cache: "no-cache",
1813
1952
  body: JSON.stringify({
1814
- username: r(),
1953
+ username: n(),
1815
1954
  transactionID: localStorage.getItem("spartan-txid"),
1816
- registrationID: d,
1955
+ registrationID: o,
1817
1956
  sectorID: e.sector
1818
1957
  })
1819
- }).then((E) => {
1820
- if (E.ok)
1821
- return E.json();
1822
- throw new Error(`${E.status} ${E.statusText}`);
1823
- }).then((E) => {
1824
- console.log(E), E.transactionID && localStorage.setItem("spartan-txid", E.transactionID), C(""), p(""), n("otp");
1825
- }).catch((E) => {
1826
- p(E.message), console.log(E);
1958
+ }).then((D) => {
1959
+ if (D.ok)
1960
+ return D.json();
1961
+ throw new Error(`${D.status} ${D.statusText}`);
1962
+ }).then((D) => {
1963
+ console.log(D), D.transactionID && localStorage.setItem("spartan-txid", D.transactionID), F(""), p(""), r("otp");
1964
+ }).catch((D) => {
1965
+ p(D.message), console.log(D);
1827
1966
  });
1828
1967
  }
1829
- function _e() {
1968
+ function v() {
1830
1969
  console.log("OTP login submit"), fetch(e.domain + "/api/v1/login/otp", {
1831
1970
  method: "post",
1832
1971
  mode: "cors",
1833
1972
  cache: "no-cache",
1834
1973
  body: JSON.stringify({
1835
- username: r(),
1836
- password: i(),
1974
+ username: n(),
1975
+ password: a(),
1837
1976
  transactionID: localStorage.getItem("spartan-txid"),
1838
1977
  sectorID: e.sector
1839
1978
  })
1840
- }).then(Fe);
1979
+ }).then(ve);
1841
1980
  }
1842
- function Se() {
1843
- console.log("begin password reset"), p(""), ee(!1), fetch(`${e.domain}/api/v1/password/reset/begin`, {
1981
+ function P() {
1982
+ console.log("begin password reset"), p(""), W(!1), fetch(`${e.domain}/api/v1/password/reset/begin`, {
1844
1983
  method: "POST",
1845
1984
  mode: "cors",
1846
1985
  cache: "no-cache",
@@ -1848,20 +1987,20 @@ tt("spartan-login", ti, (e) => {
1848
1987
  "Content-Type": "application/json"
1849
1988
  },
1850
1989
  body: JSON.stringify({
1851
- email: r(),
1990
+ email: n(),
1852
1991
  sectorID: e.sector
1853
1992
  })
1854
- }).then((d) => {
1855
- if (d.ok)
1856
- return d.json();
1857
- throw new Error(A.i18n("sa-reset-error"));
1858
- }).then((d) => {
1859
- console.log(d), p(A.i18n("sa-reset-email-sent")), N(""), ie(""), n("reset-code");
1860
- }).catch((d) => {
1861
- p(d.message), console.log(d);
1993
+ }).then((o) => {
1994
+ if (o.ok)
1995
+ return o.json();
1996
+ throw new Error(b.i18n("sa-reset-error"));
1997
+ }).then((o) => {
1998
+ console.log(o), p(b.i18n("sa-reset-email-sent")), j(""), J(""), r("reset-code");
1999
+ }).catch((o) => {
2000
+ p(o.message), console.log(o);
1862
2001
  });
1863
2002
  }
1864
- function Ce() {
2003
+ function L() {
1865
2004
  console.log("complete password reset"), p(""), fetch(`${e.domain}/api/v1/password/reset/complete`, {
1866
2005
  method: "POST",
1867
2006
  mode: "cors",
@@ -1870,115 +2009,142 @@ tt("spartan-login", ti, (e) => {
1870
2009
  "Content-Type": "application/json"
1871
2010
  },
1872
2011
  body: JSON.stringify({
1873
- email: r(),
1874
- code: U().toUpperCase().trim(),
1875
- newPassword: W(),
2012
+ email: n(),
2013
+ code: re().toUpperCase().trim(),
2014
+ newPassword: H(),
1876
2015
  sectorID: e.sector
1877
2016
  })
1878
- }).then((d) => {
1879
- if (d.ok)
1880
- return d.json();
1881
- throw d.status === 400 ? new Error(A.i18n("sa-reset-error-code")) : new Error(A.i18n("sa-reset-error"));
1882
- }).then((d) => {
1883
- console.log(d), ee(!0), N(""), ie(""), a(""), n(e.startMode);
1884
- }).catch((d) => {
1885
- p(d.message), console.log(d);
2017
+ }).then((o) => {
2018
+ if (o.ok)
2019
+ return o.json();
2020
+ throw o.status === 400 ? new Error(b.i18n("sa-reset-error-code")) : new Error(b.i18n("sa-reset-error"));
2021
+ }).then((o) => {
2022
+ console.log(o), W(!0), j(""), J(""), i(""), r(e.startMode);
2023
+ }).catch((o) => {
2024
+ p(o.message), console.log(o);
1886
2025
  });
1887
2026
  }
1888
2027
  return (() => {
1889
- var d = Va(), E = d.firstChild, D = E.nextSibling, f = D.nextSibling, v = f.nextSibling, P = v.nextSibling, O = ue;
1890
- return typeof O == "function" ? vt(O, d) : ue = d, d.addEventListener("submit", (h) => {
1891
- t() === "sign-up" ? oe(h) : $e(h);
1892
- }), c(D, m), c(f, (() => {
1893
- var h = F(() => t() === "reset-email" || t() === "reset-code");
1894
- return () => h() ? A.i18n("sa-reset-password") : A.i18n("sa-login");
1895
- })()), c(d, y && (() => {
1896
- var h = Ga();
1897
- return c(h, y), h;
1898
- })(), v), c(d, (() => {
1899
- var h = F(() => !!L());
1900
- return () => h() && (() => {
1901
- var l = Ge();
1902
- return c(l, () => A.i18n("sa-signup-complete")), l;
2028
+ var o = Gi(), D = o.firstChild, f = D.nextSibling, x = f.nextSibling, y = x.nextSibling, M = y.nextSibling, R = Z;
2029
+ return typeof R == "function" ? Et(R, o) : Z = o, o.addEventListener("submit", (m) => {
2030
+ t() === "sign-up" ? _e(m) : Ae(m);
2031
+ }), d(f, ge), d(x, (() => {
2032
+ var m = C(() => t() === "reset-email" || t() === "reset-code");
2033
+ return () => m() ? b.i18n("sa-reset-password") : b.i18n("sa-login");
2034
+ })()), d(o, k && (() => {
2035
+ var m = Vi();
2036
+ return d(m, k), m;
2037
+ })(), y), d(o, (() => {
2038
+ var m = C(() => !!he());
2039
+ return () => m() && (() => {
2040
+ var c = Ve();
2041
+ return d(c, () => b.i18n("sa-signup-complete")), c;
1903
2042
  })();
1904
- })(), v), c(d, (() => {
1905
- var h = F(() => !!Q());
1906
- return () => h() && (() => {
1907
- var l = Ge();
1908
- return c(l, () => A.i18n("sa-reset-success")), l;
2043
+ })(), y), d(o, (() => {
2044
+ var m = C(() => !!Q());
2045
+ return () => m() && (() => {
2046
+ var c = Ve();
2047
+ return d(c, () => b.i18n("sa-reset-success")), c;
1909
2048
  })();
1910
- })(), v), v.$$input = (h) => u(h.currentTarget.value), c(d, (() => {
1911
- var h = F(() => t() !== "sign-up");
1912
- return () => h() && [F(() => F(() => t() === "password")() && (() => {
1913
- var l = ft();
1914
- return l.$$input = (b) => a(b.currentTarget.value), T(() => ce(l, "placeholder", A.i18n("sa-password"))), T(() => l.value = s()), l;
1915
- })()), F(() => F(() => t() === "webauthn")() && Ge()), F(() => F(() => t() === "otp-pick")() && [(() => {
1916
- var l = Wa();
1917
- return c(l, () => A.i18n("sa-otp-choose")), l;
2049
+ })(), y), y.$$input = (m) => s(m.currentTarget.value), d(o, (() => {
2050
+ var m = C(() => t() !== "sign-up");
2051
+ return () => m() && [C(() => C(() => t() === "password")() && (() => {
2052
+ var c = ht();
2053
+ return c.$$input = (g) => i(g.currentTarget.value), O(() => oe(c, "placeholder", b.i18n("sa-password"))), O(() => c.value = u()), c;
2054
+ })()), C(() => C(() => t() === "webauthn")() && Ve()), C(() => C(() => t() === "otp-pick")() && [(() => {
2055
+ var c = Hi();
2056
+ return d(c, () => b.i18n("sa-otp-choose")), c;
1918
2057
  })(), (() => {
1919
- var l = Ha();
1920
- return l.addEventListener("change", (b) => J(b.currentTarget.value)), c(l, () => he().map((b) => (() => {
1921
- var k = Za(), j = k.firstChild, z = j.nextSibling;
1922
- return z.nextSibling, c(k, () => b.DisplayName || b.ID, j), c(k, () => b.Type, z), T(() => k.value = b.ID), k;
1923
- })())), T(() => l.value = B()), l;
1924
- })()]), F(() => F(() => t() === "otp")() && (() => {
1925
- var l = Ya();
1926
- return l.$$input = (b) => C(b.currentTarget.value), T(() => ce(l, "placeholder", A.i18n("sa-code"))), T(() => l.value = i()), l;
1927
- })()), F(() => F(() => t() === "reset-code")() && [(() => {
1928
- var l = Xa();
1929
- return l.$$input = (b) => N(b.currentTarget.value), T(() => ce(l, "placeholder", A.i18n("sa-reset-code"))), T(() => l.value = U()), l;
2058
+ var c = Wi();
2059
+ return c.addEventListener("change", (g) => _(g.currentTarget.value)), d(c, () => le().map((g) => (() => {
2060
+ var w = Zi(), ie = w.firstChild, se = ie.nextSibling;
2061
+ return se.nextSibling, d(w, () => g.DisplayName || g.ID, ie), d(w, () => g.Type, se), O(() => w.value = g.ID), w;
2062
+ })())), O(() => c.value = De()), c;
2063
+ })()]), C(() => C(() => t() === "otp")() && (() => {
2064
+ var c = Yi();
2065
+ return c.$$input = (g) => F(g.currentTarget.value), O(() => oe(c, "placeholder", b.i18n("sa-code"))), O(() => c.value = a()), c;
2066
+ })()), C(() => C(() => t() === "reset-code")() && [(() => {
2067
+ var c = Xi();
2068
+ return c.$$input = (g) => j(g.currentTarget.value), O(() => oe(c, "placeholder", b.i18n("sa-reset-code"))), O(() => c.value = re()), c;
1930
2069
  })(), (() => {
1931
- var l = Qa();
1932
- return l.$$input = (b) => ie(b.currentTarget.value), T(() => ce(l, "placeholder", A.i18n("sa-new-password"))), T(() => l.value = W()), l;
1933
- })()]), F(() => F(() => t() === "password" || t() === "webauthn")() && (() => {
1934
- var l = ei(), b = l.firstChild, k = b.nextSibling;
1935
- return k.firstChild, l.$$click = () => n(t() === "password" ? "webauthn" : "password"), c(k, () => A.i18n("sa-use-password"), null), T(() => b.checked = t() === "password"), l;
2070
+ var c = Qi();
2071
+ return c.$$input = (g) => J(g.currentTarget.value), O(() => oe(c, "placeholder", b.i18n("sa-new-password"))), O(() => c.value = H()), c;
2072
+ })()]), C(() => C(() => t() === "password" || t() === "webauthn")() && (() => {
2073
+ var c = ea(), g = c.firstChild, w = g.nextSibling;
2074
+ return w.firstChild, c.$$click = () => r(t() === "password" ? "webauthn" : "password"), d(w, () => b.i18n("sa-use-password"), null), O(() => g.checked = t() === "password"), c;
1936
2075
  })())];
1937
- })(), P), c(d, (() => {
1938
- var h = F(() => t() === "sign-up");
1939
- return () => h() && (() => {
1940
- var l = ft();
1941
- return l.$$input = (b) => a(b.currentTarget.value), T(() => ce(l, "placeholder", A.i18n("sa-password"))), T(() => l.value = s()), l;
2076
+ })(), M), d(o, (() => {
2077
+ var m = C(() => t() === "sign-up");
2078
+ return () => m() && (() => {
2079
+ var c = ht();
2080
+ return c.$$input = (g) => i(g.currentTarget.value), O(() => oe(c, "placeholder", b.i18n("sa-password"))), O(() => c.value = u()), c;
1942
2081
  })();
1943
- })(), P), c(P, (() => {
1944
- var h = F(() => t() === "sign-up");
1945
- return () => h() ? A.i18n("sa-signup") : F(() => t() === "otp-pick")() ? A.i18n("sa-otp-send-code") : F(() => t() === "otp")() ? A.i18n("sa-otp-verify") : F(() => t() === "reset-email")() ? A.i18n("sa-otp-send-code") : F(() => t() === "reset-code")() ? A.i18n("sa-reset-submit") : A.i18n("sa-login");
1946
- })()), c(d, (() => {
1947
- var h = F(() => t() === "password");
1948
- return () => h() && (() => {
1949
- var l = We();
1950
- return l.$$click = () => {
1951
- p(""), ee(!1), n("reset-email");
1952
- }, c(l, () => A.i18n("sa-forgot-password")), l;
2082
+ })(), M), d(M, (() => {
2083
+ var m = C(() => t() === "sign-up");
2084
+ return () => m() ? b.i18n("sa-signup") : C(() => t() === "otp-pick")() ? b.i18n("sa-otp-send-code") : C(() => t() === "otp")() ? b.i18n("sa-otp-verify") : C(() => t() === "reset-email")() ? b.i18n("sa-otp-send-code") : C(() => t() === "reset-code")() ? b.i18n("sa-reset-submit") : b.i18n("sa-login");
2085
+ })()), d(o, (() => {
2086
+ var m = C(() => t() === "password");
2087
+ return () => m() && (() => {
2088
+ var c = He();
2089
+ return c.$$click = () => {
2090
+ p(""), W(!1), r("reset-email");
2091
+ }, d(c, () => b.i18n("sa-forgot-password")), c;
1953
2092
  })();
1954
- })(), null), c(d, (() => {
1955
- var h = F(() => t() === "reset-email" || t() === "reset-code");
1956
- return () => h() && (() => {
1957
- var l = We();
1958
- return l.$$click = () => {
1959
- p(""), N(""), ie(""), n(e.startMode);
1960
- }, c(l, () => A.i18n("sa-back")), l;
2093
+ })(), null), d(o, (() => {
2094
+ var m = C(() => t() === "reset-email" || t() === "reset-code");
2095
+ return () => m() && (() => {
2096
+ var c = He();
2097
+ return c.$$click = () => {
2098
+ p(""), j(""), J(""), r(e.startMode);
2099
+ }, d(c, () => b.i18n("sa-back")), c;
1961
2100
  })();
1962
- })(), null), c(d, (() => {
1963
- var h = F(() => !!(ae() && t() !== "reset-email" && t() !== "reset-code"));
1964
- return () => h() && (() => {
1965
- var l = We();
1966
- return l.$$click = () => t() === "sign-up" ? n(e.startMode) : n("sign-up"), c(l, (() => {
1967
- var b = F(() => t() === "sign-up");
1968
- return () => b() ? A.i18n("sa-back") : A.i18n("sa-signup");
1969
- })()), l;
2101
+ })(), null), d(o, (() => {
2102
+ var m = C(() => !!(X() && t() !== "reset-email" && t() !== "reset-code"));
2103
+ return () => m() && (() => {
2104
+ var c = He();
2105
+ return c.$$click = () => t() === "sign-up" ? r(e.startMode) : r("sign-up"), d(c, (() => {
2106
+ var g = C(() => t() === "sign-up");
2107
+ return () => g() ? b.i18n("sa-back") : b.i18n("sa-signup");
2108
+ })()), c;
1970
2109
  })();
1971
- })(), null), T((h) => {
1972
- var l = A.i18n("sa-username"), b = t() === "otp" || t() === "otp-pick" || t() === "reset-code";
1973
- return l !== h.e && ce(v, "placeholder", h.e = l), b !== h.t && (v.disabled = h.t = b), h;
2110
+ })(), null), d(o, (() => {
2111
+ var m = C(() => K().length > 0 && (t() === "password" || t() === "webauthn" || t() === "sign-up"));
2112
+ return () => m() && [(() => {
2113
+ var c = ta(), g = c.firstChild;
2114
+ return d(g, () => b.i18n("sa-or")), c;
2115
+ })(), C(() => K().map((c) => (() => {
2116
+ var g = ra();
2117
+ return g.$$click = () => Ce(c.provider), d(g, (() => {
2118
+ var w = C(() => c.provider === "google");
2119
+ return () => w() && na();
2120
+ })(), null), d(g, (() => {
2121
+ var w = C(() => c.provider === "github");
2122
+ return () => w() && sa();
2123
+ })(), null), d(g, (() => {
2124
+ var w = C(() => c.provider === "apple");
2125
+ return () => w() && // <svg width="18" height="18" viewBox="0 0 814 1000" xmlns="http://www.w3.org/2000/svg">
2126
+ // <path d="M788.1 340.9c-5.8 4.5-108.2 62.2-108.2 190.5 0 148.4 130.3 200.9 134.2 202.2-.6 3.2-20.7 71.9-68.7 141.9-42.8 61.6-87.5 123.1-155.5 123.1s-85.5-39.5-164-39.5c-76 0-103.7 40.8-165.9 40.8s-105-57.8-155.5-127.4C46 790.7 0 663 0 541.8c0-207.8 134.4-317.3 266.5-317.3 100.3 0 183.4 67.7 244.6 67.7 57.3 0 147.4-71.6 260.1-71.6zm-174.5-92.5c-50.9 67-123.1 110.6-195.7 110.6-8.3 0-16.6-.8-24.8-2.5 1.7-63.2 43.3-131.2 94.1-179.3 52.7-49.9 132.7-85.3 207.3-87.5 1.6 8.8 2.4 17.7 2.4 26.7 0 61.6-28.4 127-83.3 131.9z" fill="currentColor"/>
2127
+ // </svg>
2128
+ ua();
2129
+ })(), null), d(g, (() => {
2130
+ var w = C(() => c.provider === "oidc");
2131
+ return () => w() && ia();
2132
+ })(), null), d(g, (() => {
2133
+ var w = C(() => c.provider === "google");
2134
+ return () => w() ? b.i18n("sa-social-google") : C(() => c.provider === "github")() ? b.i18n("sa-social-github") : C(() => c.provider === "apple")() ? b.i18n("sa-social-apple") : b.i18n("sa-social-oidc");
2135
+ })(), null), O(() => g.disabled = !!A()), g;
2136
+ })()))];
2137
+ })(), null), O((m) => {
2138
+ var c = b.i18n("sa-username"), g = t() === "otp" || t() === "otp-pick" || t() === "reset-code";
2139
+ return c !== m.e && oe(y, "placeholder", m.e = c), g !== m.t && (y.disabled = m.t = g), m;
1974
2140
  }, {
1975
2141
  e: void 0,
1976
2142
  t: void 0
1977
- }), T(() => v.value = r()), d;
2143
+ }), O(() => y.value = n()), o;
1978
2144
  })();
1979
2145
  });
1980
2146
  et(["input", "click"]);
1981
- var ni = /* @__PURE__ */ x(`<div class=container><style>.container {
2147
+ var oa = /* @__PURE__ */ B(`<div class=container><style>.container {
1982
2148
  background-color: #ffffff;
1983
2149
  border-radius: 10px;
1984
2150
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
@@ -2151,8 +2317,8 @@ var ni = /* @__PURE__ */ x(`<div class=container><style>.container {
2151
2317
  .modal-content .btn.verify:hover {
2152
2318
  background-color: #0056b3;
2153
2319
  }
2154
- </style><style></style><h1 class=header>`), ht = /* @__PURE__ */ x("<span class=error-message>"), ri = /* @__PURE__ */ x("<div class=section><h2></h2><div class=security-keys>"), ui = /* @__PURE__ */ x('<div class=key-item><span></span><button class="btn remove">'), pt = /* @__PURE__ */ x("<span>"), si = /* @__PURE__ */ x("<div class=section><div class=security-keys>"), ai = /* @__PURE__ */ x('<button class="btn add">+ '), ii = /* @__PURE__ */ x('<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">'), oi = /* @__PURE__ */ x("<div class=section><h2></h2><table><thead><tr><th></th><th></th><th></th></tr></thead><tbody>"), li = /* @__PURE__ */ x('<tr class=mfa-list-item><td></td><td></td><td><button class="btn remove">'), ci = /* @__PURE__ */ x('<span>&nbsp; <button class="btn validate">'), di = /* @__PURE__ */ x('<div class=section><div class=mfa-manage><button class="btn add">+ '), Di = /* @__PURE__ */ x('<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">'), fi = /* @__PURE__ */ x('<div class=modal id=mfaModal><div class=modal-content><span class=close id=closeModal>&times;</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');
2155
- const hi = {
2320
+ </style><style></style><h1 class=header>`), ft = /* @__PURE__ */ B("<span class=error-message>"), la = /* @__PURE__ */ B("<div class=section><h2></h2><div class=security-keys>"), ca = /* @__PURE__ */ B('<div class=key-item><span></span><button class="btn remove">'), pt = /* @__PURE__ */ B("<span>"), da = /* @__PURE__ */ B("<div class=section><div class=security-keys>"), Da = /* @__PURE__ */ B('<button class="btn add">+ '), ha = /* @__PURE__ */ B('<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">'), fa = /* @__PURE__ */ B("<div class=section><h2></h2><table><thead><tr><th></th><th></th><th></th></tr></thead><tbody>"), pa = /* @__PURE__ */ B('<tr class=mfa-list-item><td></td><td></td><td><button class="btn remove">'), ga = /* @__PURE__ */ B('<span>&nbsp; <button class="btn validate">'), ma = /* @__PURE__ */ B('<div class=section><div class=mfa-manage><button class="btn add">+ '), ba = /* @__PURE__ */ B('<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">'), Ca = /* @__PURE__ */ B('<div class=modal id=mfaModal><div class=modal-content><span class=close id=closeModal>&times;</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');
2321
+ const Aa = {
2156
2322
  domain: "http://127.0.0.1:11000",
2157
2323
  sector: "0ad5c3e5-0186-4557-8b32-4b36f247bf09",
2158
2324
  // defaults to the admin sector
@@ -2162,283 +2328,283 @@ const hi = {
2162
2328
  redirect: "/",
2163
2329
  redirectOnUnauthenticated: !0
2164
2330
  };
2165
- tt("spartan-account-settings", hi, (e) => {
2166
- w(""), w("");
2167
- const [t, n] = w(""), [r, u] = w(""), [s, a] = w(""), [i, C] = w(e.showWebAuthn), [y, p] = w(!1), [S, re] = w(!1), [ae, de] = w(!1), [L, G] = w(!1), [Q, ee] = w([]), [U, N] = w([]), [W, ie] = w(""), [he, pe] = w(""), [B, J] = w(""), [A, ue] = w(""), m = nt(e.locale);
2168
- let De;
2331
+ tt("spartan-account-settings", Aa, (e) => {
2332
+ $(""), $("");
2333
+ const [t, r] = $(""), [n, s] = $(""), [u, i] = $(""), [a] = $(e.showWebAuthn), [F, k] = $(!1), [p, S] = $(!1), [X, te] = $(!1), [he, N] = $(!1), [Q, W] = $([]), [re, j] = $([]), [H, J] = $(""), [le, de] = $(""), [De, _] = $(""), [K, fe] = $(""), A = rt(e.locale);
2334
+ let ne;
2169
2335
  try {
2170
- De = e.styles;
2336
+ ne = e.styles;
2171
2337
  } catch {
2172
- De = "";
2338
+ ne = "";
2173
2339
  }
2174
2340
  Xe(async () => {
2175
- if (It())
2176
- re(!0), u("");
2341
+ if (Pt())
2342
+ S(!0), s("");
2177
2343
  else {
2178
2344
  if (e.redirectOnUnauthenticated) {
2179
2345
  window.location.href = e.redirect;
2180
2346
  return;
2181
2347
  }
2182
- re(!1), u(m.i18n("not-authenticated"));
2348
+ S(!1), s(A.i18n("not-authenticated"));
2183
2349
  }
2184
- $e().then((f) => {
2185
- console.log(f);
2186
- }), await Ee(), Ce().then((f) => {
2187
- N(f.registrations);
2350
+ b().then((v) => {
2351
+ console.log(v);
2352
+ }), await Ce(), me().then((v) => {
2353
+ j(v.registrations);
2188
2354
  });
2189
2355
  });
2190
- async function $e() {
2191
- return await (await fetch(`${e.domain}/api/v1/users/self`, oe("get"))).json();
2356
+ async function b() {
2357
+ return await (await fetch(`${e.domain}/api/v1/users/self`, Z("get"))).json();
2192
2358
  }
2193
- function oe(D = "get") {
2359
+ function Z(E = "get") {
2194
2360
  return {
2195
- method: D,
2361
+ method: E,
2196
2362
  mode: "cors",
2197
2363
  cache: "no-cache",
2198
2364
  headers: {
2199
2365
  "Content-Type": "application",
2200
- Authorization: `bearer ${Ja()}`
2366
+ Authorization: `bearer ${Ji()}`
2201
2367
  }
2202
2368
  };
2203
2369
  }
2204
- function ke() {
2205
- let D = oe("post");
2206
- D.body = JSON.stringify({
2370
+ function ge() {
2371
+ let E = Z("post");
2372
+ E.body = JSON.stringify({
2207
2373
  keyName: t(),
2208
2374
  sectorID: e.sector
2209
- }), fetch(`${e.domain}/api/v1/webauthn/registration/begin`, D).then((f) => {
2210
- if (f.status === 200)
2211
- return f.json();
2212
- throw f;
2213
- }).then((f) => (console.log(f), xe(f))).catch((f) => {
2214
- f.json ? f.json().then((v) => {
2215
- u(v.message);
2216
- }) : u(f);
2375
+ }), fetch(`${e.domain}/api/v1/webauthn/registration/begin`, E).then((v) => {
2376
+ if (v.status === 200)
2377
+ return v.json();
2378
+ throw v;
2379
+ }).then((v) => (console.log(v), we(v))).catch((v) => {
2380
+ v.json ? v.json().then((P) => {
2381
+ s(P.message);
2382
+ }) : s(v);
2217
2383
  });
2218
2384
  }
2219
- async function xe(D) {
2385
+ async function we(E) {
2220
2386
  try {
2221
- const f = Na(D.Options);
2222
- console.log("Parsed WebAuthn creation options:", f);
2223
- const v = await ja(f), P = JSON.stringify(v);
2224
- let O = JSON.parse(P);
2225
- O.transactionID = D.TransactionID;
2226
- let h = oe("post");
2227
- h.body = JSON.stringify(O);
2228
- const l = await fetch(`${e.domain}/api/v1/webauthn/registration/finish`, h);
2229
- if (l.status !== 200) {
2230
- const b = await l.json();
2231
- u(b.message);
2387
+ const v = zi(E.Options);
2388
+ console.log("Parsed WebAuthn creation options:", v);
2389
+ const P = await Ri(v), L = JSON.stringify(P);
2390
+ let o = JSON.parse(L);
2391
+ o.transactionID = E.TransactionID;
2392
+ let D = Z("post");
2393
+ D.body = JSON.stringify(o);
2394
+ const f = await fetch(`${e.domain}/api/v1/webauthn/registration/finish`, D);
2395
+ if (f.status !== 200) {
2396
+ const x = await f.json();
2397
+ s(x.message);
2232
2398
  return;
2233
2399
  }
2234
- p(!1), n(""), Ee();
2235
- } catch (f) {
2236
- console.error("WebAuthn registration error:", f), u((f == null ? void 0 : f.message) || String(f));
2400
+ k(!1), r(""), Ce();
2401
+ } catch (v) {
2402
+ console.error("WebAuthn registration error:", v), s((v == null ? void 0 : v.message) || String(v));
2237
2403
  }
2238
2404
  }
2239
- async function Fe(D) {
2240
- let f = oe("delete");
2241
- f.body = JSON.stringify({
2242
- ID: D
2405
+ async function ye(E) {
2406
+ let v = Z("delete");
2407
+ v.body = JSON.stringify({
2408
+ ID: E
2243
2409
  });
2244
2410
  try {
2245
- if ((await fetch(`${e.domain}/api/v1/webauthn/${D}`, f)).status !== 200) {
2246
- u(m.i18n("error-webauthn-remove"));
2411
+ if ((await fetch(`${e.domain}/api/v1/webauthn/${E}`, v)).status !== 200) {
2412
+ s(A.i18n("error-webauthn-remove"));
2247
2413
  return;
2248
2414
  }
2249
- Ee();
2250
- } catch (v) {
2251
- console.error(v), u(m.i18n("error-webauthn-remove"));
2415
+ Ce();
2416
+ } catch (P) {
2417
+ console.error(P), s(A.i18n("error-webauthn-remove"));
2252
2418
  return;
2253
2419
  }
2254
2420
  }
2255
- async function Ee() {
2256
- let D = oe("get");
2421
+ async function Ce() {
2422
+ let E = Z("get");
2257
2423
  try {
2258
- const v = await (await fetch(`${e.domain}/api/v1/webauthn/registration/list`, D)).json();
2259
- ee(v.registrations || []);
2260
- } catch (f) {
2261
- console.error(f), ee([]);
2424
+ const P = await (await fetch(`${e.domain}/api/v1/webauthn/registration/list`, E)).json();
2425
+ W(P.registrations || []);
2426
+ } catch (v) {
2427
+ console.error(v), W([]);
2262
2428
  }
2263
2429
  }
2264
- async function be(D, f) {
2265
- const v = await _e(D, f);
2266
- v && (Ce().then((P) => {
2267
- N(P.registrations);
2268
- }), ie(v.transactionID), G(!0));
2269
- }
2270
- async function _e(D, f) {
2271
- let v = oe("post");
2272
- v.body = JSON.stringify({
2273
- destination: D,
2274
- OTPType: E(f),
2430
+ async function Ae(E, v) {
2431
+ const P = await _e(E, v);
2432
+ P && (me().then((L) => {
2433
+ j(L.registrations);
2434
+ }), J(P.transactionID), N(!0));
2435
+ }
2436
+ async function _e(E, v) {
2437
+ let P = Z("post");
2438
+ P.body = JSON.stringify({
2439
+ destination: E,
2440
+ OTPType: Fe(v),
2275
2441
  sectorID: e.sector
2276
2442
  });
2277
2443
  try {
2278
- const P = await fetch(`${e.domain}/api/v1/otp/begin`, v);
2279
- if (P.status !== 200) {
2280
- u(m.i18n("error-otp-verification"));
2444
+ const L = await fetch(`${e.domain}/api/v1/otp/begin`, P);
2445
+ if (L.status !== 200) {
2446
+ s(A.i18n("error-otp-verification"));
2281
2447
  return;
2282
2448
  }
2283
- return await P.json();
2284
- } catch (P) {
2285
- console.error(P), u(m.i18n("error-otp-registration"));
2449
+ return await L.json();
2450
+ } catch (L) {
2451
+ console.error(L), s(A.i18n("error-otp-registration"));
2286
2452
  return;
2287
2453
  }
2288
2454
  }
2289
- async function Se(D, f) {
2290
- let v = oe("post");
2291
- v.body = JSON.stringify({
2292
- transactionID: D,
2293
- password: f
2455
+ async function Se(E, v) {
2456
+ let P = Z("post");
2457
+ P.body = JSON.stringify({
2458
+ transactionID: E,
2459
+ password: v
2294
2460
  });
2295
2461
  try {
2296
- const P = await fetch(`${e.domain}/api/v1/otp/finish`, v);
2297
- if (P.status !== 200) {
2298
- a(m.i18n("error-otp-verification"));
2462
+ const L = await fetch(`${e.domain}/api/v1/otp/finish`, P);
2463
+ if (L.status !== 200) {
2464
+ i(A.i18n("error-otp-verification"));
2299
2465
  return;
2300
2466
  }
2301
- return G(!1), pe(""), de(!1), ue(""), J(""), Ce().then((O) => {
2302
- N(O.registrations);
2303
- }), await P.json();
2304
- } catch (P) {
2305
- console.error(P), a(m.i18n("error-otp-registration"));
2467
+ return N(!1), de(""), te(!1), fe(""), _(""), me().then((o) => {
2468
+ j(o.registrations);
2469
+ }), await L.json();
2470
+ } catch (L) {
2471
+ console.error(L), i(A.i18n("error-otp-registration"));
2306
2472
  return;
2307
2473
  }
2308
2474
  }
2309
- async function Ce() {
2310
- let D = oe("get");
2475
+ async function me() {
2476
+ let E = Z("get");
2311
2477
  try {
2312
- return await (await fetch(`${e.domain}/api/v1/otp/list`, D)).json();
2313
- } catch (f) {
2314
- console.error(f), u(m.i18n("error-otp-list"));
2478
+ return await (await fetch(`${e.domain}/api/v1/otp/list`, E)).json();
2479
+ } catch (v) {
2480
+ console.error(v), s(A.i18n("error-otp-list"));
2315
2481
  return;
2316
2482
  }
2317
2483
  }
2318
- async function d(D) {
2319
- let f = oe("delete");
2320
- f.body = JSON.stringify({
2321
- ID: D
2484
+ async function ve(E) {
2485
+ let v = Z("delete");
2486
+ v.body = JSON.stringify({
2487
+ ID: E
2322
2488
  });
2323
2489
  try {
2324
- if ((await fetch(`${e.domain}/api/v1/otp/${D}`, f)).status !== 200) {
2325
- u(m.i18n("error-otp-remove"));
2490
+ if ((await fetch(`${e.domain}/api/v1/otp/${E}`, v)).status !== 200) {
2491
+ s(A.i18n("error-otp-remove"));
2326
2492
  return;
2327
2493
  }
2328
- Ce().then((P) => {
2329
- N(P.registrations);
2494
+ me().then((L) => {
2495
+ j(L.registrations);
2330
2496
  });
2331
- } catch (v) {
2332
- console.error(v), u(m.i18n("error-otp-remove"));
2497
+ } catch (P) {
2498
+ console.error(P), s(A.i18n("error-otp-remove"));
2333
2499
  return;
2334
2500
  }
2335
2501
  }
2336
- function E(D) {
2337
- return D === "EMAIL" ? 2 : 1;
2502
+ function Fe(E) {
2503
+ return E === "EMAIL" ? 2 : 1;
2338
2504
  }
2339
2505
  return (() => {
2340
- var D = ni(), f = D.firstChild, v = f.nextSibling, P = v.nextSibling;
2341
- return c(v, De), c(P, () => m.i18n("sa-account-settings")), c(D, r && (() => {
2342
- var O = ht();
2343
- return c(O, r), O;
2344
- })(), null), c(D, (() => {
2345
- var O = F(() => !!(i() && Q().length));
2346
- return () => O() && (() => {
2347
- var h = ri(), l = h.firstChild, b = l.nextSibling;
2348
- return c(l, () => m.i18n("sa-webauthn-security-keys")), c(b, () => Q().map((k) => (() => {
2349
- var j = ui(), z = j.firstChild, H = z.nextSibling;
2350
- return c(z, () => k.keyName), H.$$click = () => {
2351
- confirm(m.i18n("sa-confirm-delete-key")) && Fe(k.keyName);
2352
- }, c(H, () => m.i18n("sa-remove")), j;
2353
- })()), null), c(b, (() => {
2354
- var k = F(() => Q().length <= 0);
2355
- return () => k() && (() => {
2356
- var j = pt();
2357
- return c(j, () => m.i18n("sa-no-security-keys")), j;
2506
+ var E = oa(), v = E.firstChild, P = v.nextSibling, L = P.nextSibling;
2507
+ return d(P, ne), d(L, () => A.i18n("sa-account-settings")), d(E, n && (() => {
2508
+ var o = ft();
2509
+ return d(o, n), o;
2510
+ })(), null), d(E, (() => {
2511
+ var o = C(() => !!(a() && Q().length));
2512
+ return () => o() && (() => {
2513
+ var D = la(), f = D.firstChild, x = f.nextSibling;
2514
+ return d(f, () => A.i18n("sa-webauthn-security-keys")), d(x, () => Q().map((y) => (() => {
2515
+ var M = ca(), R = M.firstChild, m = R.nextSibling;
2516
+ return d(R, () => y.keyName), m.$$click = () => {
2517
+ confirm(A.i18n("sa-confirm-delete-key")) && ye(y.keyName);
2518
+ }, d(m, () => A.i18n("sa-remove")), M;
2519
+ })()), null), d(x, (() => {
2520
+ var y = C(() => Q().length <= 0);
2521
+ return () => y() && (() => {
2522
+ var M = pt();
2523
+ return d(M, () => A.i18n("sa-no-security-keys")), M;
2358
2524
  })();
2359
- })(), null), h;
2525
+ })(), null), D;
2360
2526
  })();
2361
- })(), null), c(D, (() => {
2362
- var O = F(() => !!i());
2363
- return () => O() && (() => {
2364
- var h = si(), l = h.firstChild;
2365
- return c(l, (() => {
2366
- var b = F(() => !y());
2367
- return () => b() && (() => {
2368
- var k = ai();
2369
- return k.firstChild, k.$$click = () => p(!0), c(k, () => m.i18n("sa-add-security-key"), null), k;
2527
+ })(), null), d(E, (() => {
2528
+ var o = C(() => !!a());
2529
+ return () => o() && (() => {
2530
+ var D = da(), f = D.firstChild;
2531
+ return d(f, (() => {
2532
+ var x = C(() => !F());
2533
+ return () => x() && (() => {
2534
+ var y = Da();
2535
+ return y.firstChild, y.$$click = () => k(!0), d(y, () => A.i18n("sa-add-security-key"), null), y;
2370
2536
  })();
2371
- })(), null), c(l, (() => {
2372
- var b = F(() => !!y());
2373
- return () => b() && (() => {
2374
- var k = ii(), j = k.firstChild, z = j.firstChild, H = z.nextSibling, K = H.nextSibling, Z = K.nextSibling;
2375
- return c(z, () => m.i18n("sa-webauthn-key-name")), H.$$input = (R) => n(R.currentTarget.value), K.$$click = () => p(!1), c(K, () => m.i18n("sa-cancel")), Z.$$click = () => t() !== "" && ke(), c(Z, () => m.i18n("sa-register")), T((R) => {
2376
- var fe = m.i18n("sa-webauthn-key-name"), o = t() === "";
2377
- return fe !== R.e && ce(H, "placeholder", R.e = fe), o !== R.t && (Z.disabled = R.t = o), R;
2537
+ })(), null), d(f, (() => {
2538
+ var x = C(() => !!F());
2539
+ return () => x() && (() => {
2540
+ var y = ha(), M = y.firstChild, R = M.firstChild, m = R.nextSibling, c = m.nextSibling, g = c.nextSibling;
2541
+ return d(R, () => A.i18n("sa-webauthn-key-name")), m.$$input = (w) => r(w.currentTarget.value), c.$$click = () => k(!1), d(c, () => A.i18n("sa-cancel")), g.$$click = () => t() !== "" && ge(), d(g, () => A.i18n("sa-register")), O((w) => {
2542
+ var ie = A.i18n("sa-webauthn-key-name"), se = t() === "";
2543
+ return ie !== w.e && oe(m, "placeholder", w.e = ie), se !== w.t && (g.disabled = w.t = se), w;
2378
2544
  }, {
2379
2545
  e: void 0,
2380
2546
  t: void 0
2381
- }), T(() => H.value = t()), k;
2547
+ }), O(() => m.value = t()), y;
2382
2548
  })();
2383
- })(), null), h;
2549
+ })(), null), D;
2384
2550
  })();
2385
- })(), null), c(D, (() => {
2386
- var O = F(() => U().length > 0);
2387
- return () => O() && (() => {
2388
- var h = oi(), l = h.firstChild, b = l.nextSibling, k = b.firstChild, j = k.firstChild, z = j.firstChild, H = z.nextSibling, K = H.nextSibling, Z = k.nextSibling;
2389
- return c(l, () => m.i18n("sa-mfa")), c(z, () => m.i18n("sa-mfa-destination")), c(H, () => m.i18n("sa-mfa-validated")), c(K, () => m.i18n("sa-mfa-action")), c(Z, () => U().map((R) => (() => {
2390
- var fe = li(), o = fe.firstChild, g = o.nextSibling, $ = g.nextSibling, V = $.firstChild;
2391
- return c(o, () => R.DisplayName), c(g, (() => {
2392
- var Y = F(() => !!R.Validated);
2393
- return () => Y() ? (() => {
2394
- var te = pt();
2395
- return c(te, () => m.i18n("sa-yes")), te;
2551
+ })(), null), d(E, (() => {
2552
+ var o = C(() => re().length > 0);
2553
+ return () => o() && (() => {
2554
+ var D = fa(), f = D.firstChild, x = f.nextSibling, y = x.firstChild, M = y.firstChild, R = M.firstChild, m = R.nextSibling, c = m.nextSibling, g = y.nextSibling;
2555
+ return d(f, () => A.i18n("sa-mfa")), d(R, () => A.i18n("sa-mfa-destination")), d(m, () => A.i18n("sa-mfa-validated")), d(c, () => A.i18n("sa-mfa-action")), d(g, () => re().map((w) => (() => {
2556
+ var ie = pa(), se = ie.firstChild, l = se.nextSibling, h = l.nextSibling, I = h.firstChild;
2557
+ return d(se, () => w.DisplayName), d(l, (() => {
2558
+ var G = C(() => !!w.Validated);
2559
+ return () => G() ? (() => {
2560
+ var V = pt();
2561
+ return d(V, () => A.i18n("sa-yes")), V;
2396
2562
  })() : (() => {
2397
- var te = ci(), ve = te.firstChild, ge = ve.nextSibling;
2398
- return c(te, () => m.i18n("sa-no"), ve), ge.$$click = () => {
2399
- be(R.DisplayName, R.Type === "email" ? "EMAIL" : "SMS");
2400
- }, c(ge, () => m.i18n("sa-validate")), te;
2563
+ var V = ga(), ce = V.firstChild, Ee = ce.nextSibling;
2564
+ return d(V, () => A.i18n("sa-no"), ce), Ee.$$click = () => {
2565
+ Ae(w.DisplayName, w.Type === "email" ? "EMAIL" : "SMS");
2566
+ }, d(Ee, () => A.i18n("sa-validate")), V;
2401
2567
  })();
2402
- })()), V.$$click = () => {
2403
- confirm(m.i18n("sa-confirm-delete-key")) && d(R.ID);
2404
- }, c(V, () => m.i18n("sa-remove")), T(() => ce(o, "title", R.DisplayName)), fe;
2405
- })())), h;
2568
+ })()), I.$$click = () => {
2569
+ confirm(A.i18n("sa-confirm-delete-key")) && ve(w.ID);
2570
+ }, d(I, () => A.i18n("sa-remove")), O(() => oe(se, "title", w.DisplayName)), ie;
2571
+ })())), D;
2406
2572
  })();
2407
- })(), null), c(D, (() => {
2408
- var O = F(() => !ae());
2409
- return () => O() && (() => {
2410
- var h = di(), l = h.firstChild, b = l.firstChild;
2411
- return b.firstChild, b.$$click = () => de(!0), c(b, () => m.i18n("sa-register-mfa"), null), h;
2573
+ })(), null), d(E, (() => {
2574
+ var o = C(() => !X());
2575
+ return () => o() && (() => {
2576
+ var D = ma(), f = D.firstChild, x = f.firstChild;
2577
+ return x.firstChild, x.$$click = () => te(!0), d(x, () => A.i18n("sa-register-mfa"), null), D;
2412
2578
  })();
2413
- })(), null), c(D, (() => {
2414
- var O = F(() => !!ae());
2415
- return () => O() && (() => {
2416
- var h = Di(), l = h.firstChild, b = l.nextSibling, k = b.firstChild, j = k.firstChild, z = j.nextSibling, H = z.nextSibling, K = k.nextSibling, Z = K.firstChild, R = Z.nextSibling, fe = R.nextSibling, o = K.nextSibling, g = o.firstChild;
2417
- return c(l, () => m.i18n("sa-add-mfa")), c(j, () => m.i18n("sa-email")), z.$$input = ($) => J($.currentTarget.value), H.$$click = () => be(B(), "EMAIL"), c(H, () => m.i18n("sa-add-email")), c(Z, () => m.i18n("sa-phone")), R.$$input = ($) => ue($.currentTarget.value), fe.$$click = () => be(A(), "SMS"), c(fe, () => m.i18n("sa-add-sms")), g.$$click = () => de(!1), c(g, () => m.i18n("sa-cancel")), T(($) => {
2418
- var V = m.i18n("sa-email"), Y = m.i18n("sa-phone");
2419
- return V !== $.e && ce(z, "placeholder", $.e = V), Y !== $.t && ce(R, "placeholder", $.t = Y), $;
2579
+ })(), null), d(E, (() => {
2580
+ var o = C(() => !!X());
2581
+ return () => o() && (() => {
2582
+ var D = ba(), f = D.firstChild, x = f.nextSibling, y = x.firstChild, M = y.firstChild, R = M.nextSibling, m = R.nextSibling, c = y.nextSibling, g = c.firstChild, w = g.nextSibling, ie = w.nextSibling, se = c.nextSibling, l = se.firstChild;
2583
+ return d(f, () => A.i18n("sa-add-mfa")), d(M, () => A.i18n("sa-email")), R.$$input = (h) => _(h.currentTarget.value), m.$$click = () => Ae(De(), "EMAIL"), d(m, () => A.i18n("sa-add-email")), d(g, () => A.i18n("sa-phone")), w.$$input = (h) => fe(h.currentTarget.value), ie.$$click = () => Ae(K(), "SMS"), d(ie, () => A.i18n("sa-add-sms")), l.$$click = () => te(!1), d(l, () => A.i18n("sa-cancel")), O((h) => {
2584
+ var I = A.i18n("sa-email"), G = A.i18n("sa-phone");
2585
+ return I !== h.e && oe(R, "placeholder", h.e = I), G !== h.t && oe(w, "placeholder", h.t = G), h;
2420
2586
  }, {
2421
2587
  e: void 0,
2422
2588
  t: void 0
2423
- }), T(() => z.value = B()), T(() => R.value = A()), h;
2589
+ }), O(() => R.value = De()), O(() => w.value = K()), D;
2424
2590
  })();
2425
- })(), null), c(D, (() => {
2426
- var O = F(() => !!L());
2427
- return () => O() && (() => {
2428
- var h = fi(), l = h.firstChild, b = l.firstChild, k = b.nextSibling, j = k.nextSibling, z = j.nextSibling, H = z.nextSibling;
2429
- return h.$$click = () => G(!1), l.$$click = (K) => K.stopPropagation(), b.$$click = () => G(!1), c(l, (() => {
2430
- var K = F(() => !!s());
2431
- return () => K() && (() => {
2432
- var Z = ht();
2433
- return c(Z, s), Z;
2591
+ })(), null), d(E, (() => {
2592
+ var o = C(() => !!he());
2593
+ return () => o() && (() => {
2594
+ var D = Ca(), f = D.firstChild, x = f.firstChild, y = x.nextSibling, M = y.nextSibling, R = M.nextSibling, m = R.nextSibling;
2595
+ return D.$$click = () => N(!1), f.$$click = (c) => c.stopPropagation(), x.$$click = () => N(!1), d(f, (() => {
2596
+ var c = C(() => !!u());
2597
+ return () => c() && (() => {
2598
+ var g = ft();
2599
+ return d(g, u), g;
2434
2600
  })();
2435
- })(), j), z.$$input = (K) => pe(K.currentTarget.value), H.$$click = () => Se(W(), he()), T(() => z.value = he()), h;
2601
+ })(), M), R.$$input = (c) => de(c.currentTarget.value), m.$$click = () => Se(H(), le()), O(() => R.value = le()), D;
2436
2602
  })();
2437
- })(), null), D;
2603
+ })(), null), E;
2438
2604
  })();
2439
2605
  });
2440
2606
  et(["click", "input"]);
2441
- var pi = /* @__PURE__ */ x(`<form class=invite-frame><style>.invite-frame {
2607
+ var va = /* @__PURE__ */ B(`<form class=invite-frame><style>.invite-frame {
2442
2608
  display: flex;
2443
2609
  flex-direction: column;
2444
2610
  justify-content: center;
@@ -2498,8 +2664,8 @@ var pi = /* @__PURE__ */ x(`<form class=invite-frame><style>.invite-frame {
2498
2664
  margin-bottom: 10px;
2499
2665
  display: block;
2500
2666
  }
2501
- </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>`), gi = /* @__PURE__ */ x("<span class=info-message>"), mi = /* @__PURE__ */ x("<span class=error-message>"), bi = /* @__PURE__ */ x("<span class=success-message>");
2502
- const Ci = {
2667
+ </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>`), Fa = /* @__PURE__ */ B("<span class=info-message>"), Ea = /* @__PURE__ */ B("<span class=error-message>"), wa = /* @__PURE__ */ B("<span class=success-message>");
2668
+ const ya = {
2503
2669
  domain: "http://127.0.0.1:11000",
2504
2670
  sector: "0ad5c3e5-0186-4557-8b32-4b36f247bf09",
2505
2671
  // defaults to the admin sector
@@ -2512,36 +2678,36 @@ const Ci = {
2512
2678
  redirect: ""
2513
2679
  // where to redirect after successful completion
2514
2680
  };
2515
- tt("spartan-invite", Ci, (e) => {
2516
- const [t, n] = w(""), [r, u] = w(""), [s, a] = w(""), [i, C] = w(""), [y, p] = w(!1), S = nt(e.locale);
2517
- let re, ae;
2681
+ tt("spartan-invite", ya, (e) => {
2682
+ const [t, r] = $(""), [n, s] = $(""), [u, i] = $(""), [a, F] = $(""), [k, p] = $(!1), S = rt(e.locale);
2683
+ let X, te;
2518
2684
  try {
2519
- ae = e.styles;
2685
+ te = e.styles;
2520
2686
  } catch {
2521
- ae = "";
2687
+ te = "";
2522
2688
  }
2523
2689
  Xe(async () => {
2524
- e.sub || new URLSearchParams(window.location.search).get("sub") || a("Missing invitation information. Please use the link from your invite email.");
2525
- const G = new URLSearchParams(window.location.hash.replace("#", "")).get("otp");
2526
- G && n(G);
2690
+ e.sub || new URLSearchParams(window.location.search).get("sub") || i("Missing invitation information. Please use the link from your invite email.");
2691
+ const Q = new URLSearchParams(window.location.hash.replace("#", "")).get("otp");
2692
+ Q && r(Q);
2527
2693
  });
2528
- async function de(L) {
2529
- var ee, U;
2530
- if (L.preventDefault(), a(""), C(""), p(!0), !t() || t().trim().length === 0) {
2531
- a("Please enter your verification code"), p(!1);
2694
+ async function he(N) {
2695
+ var re, j;
2696
+ if (N.preventDefault(), i(""), F(""), p(!0), !t() || t().trim().length === 0) {
2697
+ i("Please enter your verification code"), p(!1);
2532
2698
  return;
2533
2699
  }
2534
- if (!r() || r().length < 8) {
2535
- a("Password must be at least 8 characters"), p(!1);
2700
+ if (!n() || n().length < 8) {
2701
+ i("Password must be at least 8 characters"), p(!1);
2536
2702
  return;
2537
2703
  }
2538
- const G = new URLSearchParams(window.location.search), Q = e.sub || G.get("sub") || "";
2539
- if (!Q) {
2540
- a("Missing invitation information"), p(!1);
2704
+ const Q = new URLSearchParams(window.location.search), W = e.sub || Q.get("sub") || "";
2705
+ if (!W) {
2706
+ i("Missing invitation information"), p(!1);
2541
2707
  return;
2542
2708
  }
2543
2709
  try {
2544
- const N = await fetch(`${e.domain}/api/v1/users/invite/complete`, {
2710
+ const H = await fetch(`${e.domain}/api/v1/users/invite/complete`, {
2545
2711
  method: "POST",
2546
2712
  mode: "cors",
2547
2713
  cache: "no-cache",
@@ -2549,67 +2715,67 @@ tt("spartan-invite", Ci, (e) => {
2549
2715
  "Content-Type": "application/json"
2550
2716
  },
2551
2717
  body: JSON.stringify({
2552
- sub: Q,
2718
+ sub: W,
2553
2719
  otp: t().toUpperCase().trim(),
2554
- password: r(),
2720
+ password: n(),
2555
2721
  sectorID: e.sector
2556
2722
  })
2557
2723
  });
2558
- if (N.ok) {
2559
- const W = await N.json();
2560
- C(S.i18n("sa-invite-success"));
2561
- const ie = new CustomEvent("spartan-invite-complete", {
2724
+ if (H.ok) {
2725
+ const J = await H.json();
2726
+ F(S.i18n("sa-invite-success"));
2727
+ const le = new CustomEvent("spartan-invite-complete", {
2562
2728
  bubbles: !0,
2563
2729
  cancelable: !0,
2564
2730
  detail: {
2565
- sub: Q,
2731
+ sub: W,
2566
2732
  success: !0
2567
2733
  }
2568
2734
  });
2569
- re && re.getRootNode().host.dispatchEvent(ie), setTimeout(() => {
2735
+ X && X.getRootNode().host.dispatchEvent(le), setTimeout(() => {
2570
2736
  e.redirect && e.redirect !== "" && (window.location.href = e.redirect);
2571
2737
  }, 2e3);
2572
2738
  } else {
2573
- const W = await N.json().catch(() => ({}));
2574
- N.status === 400 || (ee = W.message) != null && ee.includes("invalid OTP") ? a(S.i18n("sa-invite-error-otp")) : N.status === 504 || (U = W.message) != null && U.includes("expired") ? a(S.i18n("sa-invite-error-expired")) : a(W.message || S.i18n("sa-invite-error-generic")), p(!1);
2739
+ const J = await H.json().catch(() => ({}));
2740
+ H.status === 400 || (re = J.message) != null && re.includes("invalid OTP") ? i(S.i18n("sa-invite-error-otp")) : H.status === 504 || (j = J.message) != null && j.includes("expired") ? i(S.i18n("sa-invite-error-expired")) : i(J.message || S.i18n("sa-invite-error-generic")), p(!1);
2575
2741
  }
2576
- } catch (N) {
2577
- console.error("Error completing invite:", N), a(S.i18n("sa-invite-error-generic")), p(!1);
2742
+ } catch (H) {
2743
+ console.error("Error completing invite:", H), i(S.i18n("sa-invite-error-generic")), p(!1);
2578
2744
  }
2579
2745
  }
2580
2746
  return (() => {
2581
- var L = pi(), G = L.firstChild, Q = G.nextSibling, ee = Q.nextSibling, U = ee.nextSibling, N = U.nextSibling, W = N.nextSibling, ie = W.nextSibling, he = ie.nextSibling, pe = re;
2582
- return typeof pe == "function" ? vt(pe, L) : re = L, L.addEventListener("submit", de), c(Q, ae), c(ee, () => S.i18n("sa-complete-invite")), c(L, (() => {
2583
- var B = F(() => !!e.email);
2584
- return () => B() && (() => {
2585
- var J = gi();
2586
- return c(J, () => e.email), J;
2747
+ var N = va(), Q = N.firstChild, W = Q.nextSibling, re = W.nextSibling, j = re.nextSibling, H = j.nextSibling, J = H.nextSibling, le = J.nextSibling, de = le.nextSibling, De = X;
2748
+ return typeof De == "function" ? Et(De, N) : X = N, N.addEventListener("submit", he), d(W, te), d(re, () => S.i18n("sa-complete-invite")), d(N, (() => {
2749
+ var _ = C(() => !!e.email);
2750
+ return () => _() && (() => {
2751
+ var K = Fa();
2752
+ return d(K, () => e.email), K;
2587
2753
  })();
2588
- })(), U), c(L, (() => {
2589
- var B = F(() => !!s());
2590
- return () => B() && (() => {
2591
- var J = mi();
2592
- return c(J, s), J;
2754
+ })(), j), d(N, (() => {
2755
+ var _ = C(() => !!u());
2756
+ return () => _() && (() => {
2757
+ var K = Ea();
2758
+ return d(K, u), K;
2593
2759
  })();
2594
- })(), U), c(L, (() => {
2595
- var B = F(() => !!i());
2596
- return () => B() && (() => {
2597
- var J = bi();
2598
- return c(J, i), J;
2760
+ })(), j), d(N, (() => {
2761
+ var _ = C(() => !!a());
2762
+ return () => _() && (() => {
2763
+ var K = wa();
2764
+ return d(K, a), K;
2599
2765
  })();
2600
- })(), U), U.$$input = (B) => n(B.currentTarget.value), c(N, () => S.i18n("sa-invite-otp-hint")), W.$$input = (B) => u(B.currentTarget.value), c(ie, () => S.i18n("sa-invite-password-hint")), c(he, (() => {
2601
- var B = F(() => !!y());
2602
- return () => B() ? S.i18n("sa-invite-completing") : S.i18n("sa-invite-submit");
2603
- })()), T((B) => {
2604
- var J = S.i18n("sa-invite-otp"), A = y() || i() !== "", ue = S.i18n("sa-invite-password"), m = y() || i() !== "", De = y() || i() !== "";
2605
- return J !== B.e && ce(U, "placeholder", B.e = J), A !== B.t && (U.disabled = B.t = A), ue !== B.a && ce(W, "placeholder", B.a = ue), m !== B.o && (W.disabled = B.o = m), De !== B.i && (he.disabled = B.i = De), B;
2766
+ })(), j), j.$$input = (_) => r(_.currentTarget.value), d(H, () => S.i18n("sa-invite-otp-hint")), J.$$input = (_) => s(_.currentTarget.value), d(le, () => S.i18n("sa-invite-password-hint")), d(de, (() => {
2767
+ var _ = C(() => !!k());
2768
+ return () => _() ? S.i18n("sa-invite-completing") : S.i18n("sa-invite-submit");
2769
+ })()), O((_) => {
2770
+ var K = S.i18n("sa-invite-otp"), fe = k() || a() !== "", A = S.i18n("sa-invite-password"), ne = k() || a() !== "", b = k() || a() !== "";
2771
+ return K !== _.e && oe(j, "placeholder", _.e = K), fe !== _.t && (j.disabled = _.t = fe), A !== _.a && oe(J, "placeholder", _.a = A), ne !== _.o && (J.disabled = _.o = ne), b !== _.i && (de.disabled = _.i = b), _;
2606
2772
  }, {
2607
2773
  e: void 0,
2608
2774
  t: void 0,
2609
2775
  a: void 0,
2610
2776
  o: void 0,
2611
2777
  i: void 0
2612
- }), T(() => U.value = t()), T(() => W.value = r()), L;
2778
+ }), O(() => j.value = t()), O(() => J.value = n()), N;
2613
2779
  })();
2614
2780
  });
2615
2781
  et(["input"]);