@cal.macconnachie/web-components 0.0.17 → 0.0.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/auth.js +13 -13
- package/dist/index.js +78 -78
- package/package.json +1 -1
package/dist/components/auth.js
CHANGED
|
@@ -35,7 +35,7 @@ const xt = (e) => new wt(typeof e == "string" ? e : e + "", void 0, Q), Et = (e,
|
|
|
35
35
|
for (const i of t.cssRules) s += i.cssText;
|
|
36
36
|
return xt(s);
|
|
37
37
|
})(e) : e;
|
|
38
|
-
const { is: Pt, defineProperty: Ot, getOwnPropertyDescriptor: Dt, getOwnPropertyNames: Ut, getOwnPropertySymbols: Rt, getPrototypeOf: It } = Object, F = globalThis, nt = F.trustedTypes, Nt = nt ? nt.emptyScript : "", Lt = F.reactiveElementPolyfillSupport,
|
|
38
|
+
const { is: Pt, defineProperty: Ot, getOwnPropertyDescriptor: Dt, getOwnPropertyNames: Ut, getOwnPropertySymbols: Rt, getPrototypeOf: It } = Object, F = globalThis, nt = F.trustedTypes, Nt = nt ? nt.emptyScript : "", Lt = F.reactiveElementPolyfillSupport, H = (e, t) => e, Y = { toAttribute(e, t) {
|
|
39
39
|
switch (t) {
|
|
40
40
|
case Boolean:
|
|
41
41
|
e = e ? Nt : null;
|
|
@@ -93,13 +93,13 @@ let U = class extends HTMLElement {
|
|
|
93
93
|
return this.elementProperties.get(t) ?? lt;
|
|
94
94
|
}
|
|
95
95
|
static _$Ei() {
|
|
96
|
-
if (this.hasOwnProperty(
|
|
96
|
+
if (this.hasOwnProperty(H("elementProperties"))) return;
|
|
97
97
|
const t = It(this);
|
|
98
98
|
t.finalize(), t.l !== void 0 && (this.l = [...t.l]), this.elementProperties = new Map(t.elementProperties);
|
|
99
99
|
}
|
|
100
100
|
static finalize() {
|
|
101
|
-
if (this.hasOwnProperty(
|
|
102
|
-
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(
|
|
101
|
+
if (this.hasOwnProperty(H("finalized"))) return;
|
|
102
|
+
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(H("properties"))) {
|
|
103
103
|
const s = this.properties, i = [...Ut(s), ...Rt(s)];
|
|
104
104
|
for (const r of i) this.createProperty(r, s[r]);
|
|
105
105
|
}
|
|
@@ -246,8 +246,8 @@ let U = class extends HTMLElement {
|
|
|
246
246
|
firstUpdated(t) {
|
|
247
247
|
}
|
|
248
248
|
};
|
|
249
|
-
U.elementStyles = [], U.shadowRootOptions = { mode: "open" }, U[
|
|
250
|
-
const tt = globalThis, K = tt.trustedTypes, ht = K ? K.createPolicy("lit-html", { createHTML: (e) => e }) : void 0, bt = "$lit$", C = `lit$${Math.random().toFixed(9).slice(2)}$`, vt = "?" + C,
|
|
249
|
+
U.elementStyles = [], U.shadowRootOptions = { mode: "open" }, U[H("elementProperties")] = /* @__PURE__ */ new Map(), U[H("finalized")] = /* @__PURE__ */ new Map(), Lt?.({ ReactiveElement: U }), (F.reactiveElementVersions ??= []).push("2.1.1");
|
|
250
|
+
const tt = globalThis, K = tt.trustedTypes, ht = K ? K.createPolicy("lit-html", { createHTML: (e) => e }) : void 0, bt = "$lit$", C = `lit$${Math.random().toFixed(9).slice(2)}$`, vt = "?" + C, Ht = `<${vt}>`, D = document, j = () => D.createComment(""), q = (e) => e === null || typeof e != "object" && typeof e != "function", et = Array.isArray, Mt = (e) => et(e) || typeof e?.[Symbol.iterator] == "function", W = `[
|
|
251
251
|
\f\r]`, N = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, ct = /-->/g, dt = />/g, T = RegExp(`>|${W}(?:([^\\s"'>=/]+)(${W}*=${W}*(?:[^
|
|
252
252
|
\f\r"'\`<>=]|("|')|))|$)`, "g"), pt = /'/g, ut = /"/g, At = /^(?:script|style|textarea|title)$/i, jt = (e) => (t, ...s) => ({ _$litType$: e, strings: t, values: s }), f = jt(1), x = Symbol.for("lit-noChange"), g = Symbol.for("lit-nothing"), gt = /* @__PURE__ */ new WeakMap(), O = D.createTreeWalker(D, 129);
|
|
253
253
|
function _t(e, t) {
|
|
@@ -262,7 +262,7 @@ const qt = (e, t) => {
|
|
|
262
262
|
let h, d, l = -1, p = 0;
|
|
263
263
|
for (; p < n.length && (a.lastIndex = p, d = a.exec(n), d !== null); ) p = a.lastIndex, a === N ? d[1] === "!--" ? a = ct : d[1] !== void 0 ? a = dt : d[2] !== void 0 ? (At.test(d[2]) && (r = RegExp("</" + d[2], "g")), a = T) : d[3] !== void 0 && (a = T) : a === T ? d[0] === ">" ? (a = r ?? N, l = -1) : d[1] === void 0 ? l = -2 : (l = a.lastIndex - d[2].length, h = d[1], a = d[3] === void 0 ? T : d[3] === '"' ? ut : pt) : a === ut || a === pt ? a = T : a === ct || a === dt ? a = N : (a = T, r = void 0);
|
|
264
264
|
const u = a === T && e[c + 1].startsWith("/>") ? " " : "";
|
|
265
|
-
o += a === N ? n +
|
|
265
|
+
o += a === N ? n + Ht : l >= 0 ? (i.push(h), n.slice(0, l) + bt + n.slice(l) + C + u) : n + C + (l === -2 ? c : u);
|
|
266
266
|
}
|
|
267
267
|
return [_t(e, o + (e[s] || "<?>") + (t === 2 ? "</svg>" : t === 3 ? "</math>" : "")), i];
|
|
268
268
|
};
|
|
@@ -356,7 +356,7 @@ class I {
|
|
|
356
356
|
return this._$AB;
|
|
357
357
|
}
|
|
358
358
|
_$AI(t, s = this) {
|
|
359
|
-
t = R(this, t, s), q(t) ? t === g || t == null || t === "" ? (this._$AH !== g && this._$AR(), this._$AH = g) : t !== this._$AH && t !== x && this._(t) : t._$litType$ !== void 0 ? this.$(t) : t.nodeType !== void 0 ? this.T(t) :
|
|
359
|
+
t = R(this, t, s), q(t) ? t === g || t == null || t === "" ? (this._$AH !== g && this._$AR(), this._$AH = g) : t !== this._$AH && t !== x && this._(t) : t._$litType$ !== void 0 ? this.$(t) : t.nodeType !== void 0 ? this.T(t) : Mt(t) ? this.k(t) : this._(t);
|
|
360
360
|
}
|
|
361
361
|
O(t) {
|
|
362
362
|
return this._$AA.parentNode.insertBefore(t, this._$AB);
|
|
@@ -473,7 +473,7 @@ const Gt = (e, t, s) => {
|
|
|
473
473
|
return r._$AI(e), r;
|
|
474
474
|
};
|
|
475
475
|
const st = globalThis;
|
|
476
|
-
let
|
|
476
|
+
let M = class extends U {
|
|
477
477
|
constructor() {
|
|
478
478
|
super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
|
|
479
479
|
}
|
|
@@ -495,9 +495,9 @@ let H = class extends U {
|
|
|
495
495
|
return x;
|
|
496
496
|
}
|
|
497
497
|
};
|
|
498
|
-
|
|
498
|
+
M._$litElement$ = !0, M.finalized = !0, st.litElementHydrateSupport?.({ LitElement: M });
|
|
499
499
|
const Jt = st.litElementPolyfillSupport;
|
|
500
|
-
Jt?.({ LitElement:
|
|
500
|
+
Jt?.({ LitElement: M });
|
|
501
501
|
(st.litElementVersions ??= []).push("4.2.1");
|
|
502
502
|
const Zt = (e) => (t, s) => {
|
|
503
503
|
s !== void 0 ? s.addInitializer((() => {
|
|
@@ -1477,7 +1477,7 @@ const ge = [
|
|
|
1477
1477
|
"token_type",
|
|
1478
1478
|
"expires_in"
|
|
1479
1479
|
];
|
|
1480
|
-
let m = class extends
|
|
1480
|
+
let m = class extends M {
|
|
1481
1481
|
constructor() {
|
|
1482
1482
|
super(...arguments), this.open = !1, this.initialMode = "signin", this.logoUrl = "", this.baseUrl = "", this.oauthDomain = "", this.oauthRegion = "", this.oauthUserPoolId = "", this.oauthClientId = "", this.oauthRedirectUri = "", this.oauthSpaDomain = "", this.size = "sm", this.theme = "light", this.disableSignup = !1, this.mode = "signin", this.resetStep = "none", this.signupStep = "form", this.isLoading = !1, this.isClosing = !1, this.isVisible = !1, this.isLoggedIn = !1, this.email = "", this.password = "", this.givenName = "", this.familyName = "", this.newPassword = "", this.confirmPassword = "", this.notice = "", this.error = "", this.errors = {}, this.otpDigits = ["", "", "", "", "", ""], this.signupOtpDigits = ["", "", "", "", "", ""], this.isDragging = !1, this.dragStartY = 0, this.dragCurrentY = 0, this.dragStartTime = 0, this.lastDragEndTime = 0, this.cookies = ne(), this.scrollPosition = 0, this.transitionDuration = 300, this.hasHandledOAuthCallback = !1, this.boundKeyHandler = (e) => {
|
|
1483
1483
|
e.key === "Escape" && this.isVisible && this.handleClose();
|
|
@@ -1790,7 +1790,7 @@ let m = class extends H {
|
|
|
1790
1790
|
}), await this.handleSignIn();
|
|
1791
1791
|
}
|
|
1792
1792
|
isUserLoggedIn() {
|
|
1793
|
-
return this.isLoggedIn;
|
|
1793
|
+
return this.isLoggedIn || !!this.cookies.getAuthToken("ACCESS_TOKEN") && !!this.cookies.getAuthToken("REFRESH_TOKEN") && !!this.cookies.getAuthToken("AUTH_TOKEN");
|
|
1794
1794
|
}
|
|
1795
1795
|
async logout() {
|
|
1796
1796
|
const e = this.cookies.getAuthToken("ACCESS_TOKEN"), t = this.cookies.getAuthToken("AUTH_TOKEN"), s = this.cookies.getAuthToken("REFRESH_TOKEN");
|
package/dist/index.js
CHANGED
|
@@ -247,14 +247,14 @@ let Q = class extends HTMLElement {
|
|
|
247
247
|
}
|
|
248
248
|
};
|
|
249
249
|
Q.elementStyles = [], Q.shadowRootOptions = { mode: "open" }, Q[de("elementProperties")] = /* @__PURE__ */ new Map(), Q[de("finalized")] = /* @__PURE__ */ new Map(), Ns?.({ ReactiveElement: Q }), (xe.reactiveElementVersions ??= []).push("2.1.1");
|
|
250
|
-
const Xe = globalThis, Ce = Xe.trustedTypes, yt = Ce ? Ce.createPolicy("lit-html", { createHTML: (t) => t }) : void 0, Vt = "$lit$",
|
|
251
|
-
\f\r]`, le = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, bt = /-->/g, wt = />/g, K = RegExp(`>|${
|
|
252
|
-
\f\r"'\`<>=]|("|')|))|$)`, "g"), St = /'/g, $t = /"/g, Yt = /^(?:script|style|textarea|title)$/i, Bs = (t) => (e, ...s) => ({ _$litType$: t, strings: e, values: s }), w = Bs(1),
|
|
250
|
+
const Xe = globalThis, Ce = Xe.trustedTypes, yt = Ce ? Ce.createPolicy("lit-html", { createHTML: (t) => t }) : void 0, Vt = "$lit$", j = `lit$${Math.random().toFixed(9).slice(2)}$`, Wt = "?" + j, Ls = `<${Wt}>`, G = document, ue = () => G.createComment(""), pe = (t) => t === null || typeof t != "object" && typeof t != "function", Qe = Array.isArray, Is = (t) => Qe(t) || typeof t?.[Symbol.iterator] == "function", He = `[
|
|
251
|
+
\f\r]`, le = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, bt = /-->/g, wt = />/g, K = RegExp(`>|${He}(?:([^\\s"'>=/]+)(${He}*=${He}*(?:[^
|
|
252
|
+
\f\r"'\`<>=]|("|')|))|$)`, "g"), St = /'/g, $t = /"/g, Yt = /^(?:script|style|textarea|title)$/i, Bs = (t) => (e, ...s) => ({ _$litType$: t, strings: e, values: s }), w = Bs(1), F = Symbol.for("lit-noChange"), S = Symbol.for("lit-nothing"), At = /* @__PURE__ */ new WeakMap(), W = G.createTreeWalker(G, 129);
|
|
253
253
|
function Jt(t, e) {
|
|
254
254
|
if (!Qe(t) || !t.hasOwnProperty("raw")) throw Error("invalid template strings array");
|
|
255
255
|
return yt !== void 0 ? yt.createHTML(e) : e;
|
|
256
256
|
}
|
|
257
|
-
const
|
|
257
|
+
const Hs = (t, e) => {
|
|
258
258
|
const s = t.length - 1, r = [];
|
|
259
259
|
let i, o = e === 2 ? "<svg>" : e === 3 ? "<math>" : "", n = le;
|
|
260
260
|
for (let a = 0; a < s; a++) {
|
|
@@ -262,7 +262,7 @@ const js = (t, e) => {
|
|
|
262
262
|
let h, c, u = -1, f = 0;
|
|
263
263
|
for (; f < l.length && (n.lastIndex = f, c = n.exec(l), c !== null); ) f = n.lastIndex, n === le ? c[1] === "!--" ? n = bt : c[1] !== void 0 ? n = wt : c[2] !== void 0 ? (Yt.test(c[2]) && (i = RegExp("</" + c[2], "g")), n = K) : c[3] !== void 0 && (n = K) : n === K ? c[0] === ">" ? (n = i ?? le, u = -1) : c[1] === void 0 ? u = -2 : (u = n.lastIndex - c[2].length, h = c[1], n = c[3] === void 0 ? K : c[3] === '"' ? $t : St) : n === $t || n === St ? n = K : n === bt || n === wt ? n = le : (n = K, i = void 0);
|
|
264
264
|
const y = n === K && t[a + 1].startsWith("/>") ? " " : "";
|
|
265
|
-
o += n === le ? l + Ls : u >= 0 ? (r.push(h), l.slice(0, u) + Vt + l.slice(u) +
|
|
265
|
+
o += n === le ? l + Ls : u >= 0 ? (r.push(h), l.slice(0, u) + Vt + l.slice(u) + j + y) : l + j + (u === -2 ? a : y);
|
|
266
266
|
}
|
|
267
267
|
return [Jt(t, o + (t[s] || "<?>") + (e === 2 ? "</svg>" : e === 3 ? "</math>" : "")), r];
|
|
268
268
|
};
|
|
@@ -271,7 +271,7 @@ class fe {
|
|
|
271
271
|
let i;
|
|
272
272
|
this.parts = [];
|
|
273
273
|
let o = 0, n = 0;
|
|
274
|
-
const a = e.length - 1, l = this.parts, [h, c] =
|
|
274
|
+
const a = e.length - 1, l = this.parts, [h, c] = Hs(e, s);
|
|
275
275
|
if (this.el = fe.createElement(h, r), W.currentNode = this.el.content, s === 2 || s === 3) {
|
|
276
276
|
const u = this.el.content.firstChild;
|
|
277
277
|
u.replaceWith(...u.childNodes);
|
|
@@ -279,11 +279,11 @@ class fe {
|
|
|
279
279
|
for (; (i = W.nextNode()) !== null && l.length < a; ) {
|
|
280
280
|
if (i.nodeType === 1) {
|
|
281
281
|
if (i.hasAttributes()) for (const u of i.getAttributeNames()) if (u.endsWith(Vt)) {
|
|
282
|
-
const f = c[n++], y = i.getAttribute(u).split(
|
|
283
|
-
l.push({ type: 1, index: o, name: p[2], strings: y, ctor: p[1] === "." ?
|
|
284
|
-
} else u.startsWith(
|
|
282
|
+
const f = c[n++], y = i.getAttribute(u).split(j), p = /([.?@])?(.*)/.exec(f);
|
|
283
|
+
l.push({ type: 1, index: o, name: p[2], strings: y, ctor: p[1] === "." ? Fs : p[1] === "?" ? Ms : p[1] === "@" ? qs : Re }), i.removeAttribute(u);
|
|
284
|
+
} else u.startsWith(j) && (l.push({ type: 6, index: o }), i.removeAttribute(u));
|
|
285
285
|
if (Yt.test(i.tagName)) {
|
|
286
|
-
const u = i.textContent.split(
|
|
286
|
+
const u = i.textContent.split(j), f = u.length - 1;
|
|
287
287
|
if (f > 0) {
|
|
288
288
|
i.textContent = Ce ? Ce.emptyScript : "";
|
|
289
289
|
for (let y = 0; y < f; y++) i.append(u[y], ue()), W.nextNode(), l.push({ type: 2, index: ++o });
|
|
@@ -293,7 +293,7 @@ class fe {
|
|
|
293
293
|
} else if (i.nodeType === 8) if (i.data === Wt) l.push({ type: 2, index: o });
|
|
294
294
|
else {
|
|
295
295
|
let u = -1;
|
|
296
|
-
for (; (u = i.data.indexOf(
|
|
296
|
+
for (; (u = i.data.indexOf(j, u + 1)) !== -1; ) l.push({ type: 7, index: o }), u += j.length - 1;
|
|
297
297
|
}
|
|
298
298
|
o++;
|
|
299
299
|
}
|
|
@@ -304,12 +304,12 @@ class fe {
|
|
|
304
304
|
}
|
|
305
305
|
}
|
|
306
306
|
function te(t, e, s = t, r) {
|
|
307
|
-
if (e ===
|
|
307
|
+
if (e === F) return e;
|
|
308
308
|
let i = r !== void 0 ? s._$Co?.[r] : s._$Cl;
|
|
309
309
|
const o = pe(e) ? void 0 : e._$litDirective$;
|
|
310
310
|
return i?.constructor !== o && (i?._$AO?.(!1), o === void 0 ? i = void 0 : (i = new o(t), i._$AT(t, s, r)), r !== void 0 ? (s._$Co ??= [])[r] = i : s._$Cl = i), i !== void 0 && (e = te(t, i._$AS(t, e.values), i, r)), e;
|
|
311
311
|
}
|
|
312
|
-
let
|
|
312
|
+
let js = class {
|
|
313
313
|
constructor(e, s) {
|
|
314
314
|
this._$AV = [], this._$AN = void 0, this._$AD = e, this._$AM = s;
|
|
315
315
|
}
|
|
@@ -356,7 +356,7 @@ class re {
|
|
|
356
356
|
return this._$AB;
|
|
357
357
|
}
|
|
358
358
|
_$AI(e, s = this) {
|
|
359
|
-
e = te(this, e, s), pe(e) ? e === S || e == null || e === "" ? (this._$AH !== S && this._$AR(), this._$AH = S) : e !== this._$AH && e !==
|
|
359
|
+
e = te(this, e, s), pe(e) ? e === S || e == null || e === "" ? (this._$AH !== S && this._$AR(), this._$AH = S) : e !== this._$AH && e !== F && this._(e) : e._$litType$ !== void 0 ? this.$(e) : e.nodeType !== void 0 ? this.T(e) : Is(e) ? this.k(e) : this._(e);
|
|
360
360
|
}
|
|
361
361
|
O(e) {
|
|
362
362
|
return this._$AA.parentNode.insertBefore(e, this._$AB);
|
|
@@ -371,7 +371,7 @@ class re {
|
|
|
371
371
|
const { values: s, _$litType$: r } = e, i = typeof r == "number" ? this._$AC(e) : (r.el === void 0 && (r.el = fe.createElement(Jt(r.h, r.h[0]), this.options)), r);
|
|
372
372
|
if (this._$AH?._$AD === i) this._$AH.p(s);
|
|
373
373
|
else {
|
|
374
|
-
const o = new
|
|
374
|
+
const o = new js(i, this), n = o.u(this.options);
|
|
375
375
|
o.p(s), this.T(n), this._$AH = o;
|
|
376
376
|
}
|
|
377
377
|
}
|
|
@@ -409,11 +409,11 @@ class Re {
|
|
|
409
409
|
_$AI(e, s = this, r, i) {
|
|
410
410
|
const o = this.strings;
|
|
411
411
|
let n = !1;
|
|
412
|
-
if (o === void 0) e = te(this, e, s, 0), n = !pe(e) || e !== this._$AH && e !==
|
|
412
|
+
if (o === void 0) e = te(this, e, s, 0), n = !pe(e) || e !== this._$AH && e !== F, n && (this._$AH = e);
|
|
413
413
|
else {
|
|
414
414
|
const a = e;
|
|
415
415
|
let l, h;
|
|
416
|
-
for (e = o[0], l = 0; l < o.length - 1; l++) h = te(this, a[r + l], s, l), h ===
|
|
416
|
+
for (e = o[0], l = 0; l < o.length - 1; l++) h = te(this, a[r + l], s, l), h === F && (h = this._$AH[l]), n ||= !pe(h) || h !== this._$AH[l], h === S ? e = S : e !== S && (e += (h ?? "") + o[l + 1]), this._$AH[l] = h;
|
|
417
417
|
}
|
|
418
418
|
n && !i && this.j(e);
|
|
419
419
|
}
|
|
@@ -421,7 +421,7 @@ class Re {
|
|
|
421
421
|
e === S ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, e ?? "");
|
|
422
422
|
}
|
|
423
423
|
}
|
|
424
|
-
class
|
|
424
|
+
class Fs extends Re {
|
|
425
425
|
constructor() {
|
|
426
426
|
super(...arguments), this.type = 3;
|
|
427
427
|
}
|
|
@@ -429,7 +429,7 @@ class Ms extends Re {
|
|
|
429
429
|
this.element[this.name] = e === S ? void 0 : e;
|
|
430
430
|
}
|
|
431
431
|
}
|
|
432
|
-
class
|
|
432
|
+
class Ms extends Re {
|
|
433
433
|
constructor() {
|
|
434
434
|
super(...arguments), this.type = 4;
|
|
435
435
|
}
|
|
@@ -442,7 +442,7 @@ class qs extends Re {
|
|
|
442
442
|
super(e, s, r, i, o), this.type = 5;
|
|
443
443
|
}
|
|
444
444
|
_$AI(e, s = this) {
|
|
445
|
-
if ((e = te(this, e, s, 0) ?? S) ===
|
|
445
|
+
if ((e = te(this, e, s, 0) ?? S) === F) return;
|
|
446
446
|
const r = this._$AH, i = e === S && r !== S || e.capture !== r.capture || e.once !== r.once || e.passive !== r.passive, o = e !== S && (r === S || i);
|
|
447
447
|
i && this.element.removeEventListener(this.name, this, r), o && this.element.addEventListener(this.name, this, e), this._$AH = e;
|
|
448
448
|
}
|
|
@@ -492,7 +492,7 @@ let ee = class extends Q {
|
|
|
492
492
|
super.disconnectedCallback(), this._$Do?.setConnected(!1);
|
|
493
493
|
}
|
|
494
494
|
render() {
|
|
495
|
-
return
|
|
495
|
+
return F;
|
|
496
496
|
}
|
|
497
497
|
};
|
|
498
498
|
ee._$litElement$ = !0, ee.finalized = !0, et.litElementHydrateSupport?.({ LitElement: ee });
|
|
@@ -579,7 +579,7 @@ const vt = Xt(class extends Qt {
|
|
|
579
579
|
const i = !!e[r];
|
|
580
580
|
i === this.st.has(r) || this.nt?.has(r) || (i ? (s.add(r), this.st.add(r)) : (s.remove(r), this.st.delete(r)));
|
|
581
581
|
}
|
|
582
|
-
return
|
|
582
|
+
return F;
|
|
583
583
|
}
|
|
584
584
|
});
|
|
585
585
|
const { I: Xs } = Ks, Et = () => document.createComment(""), ce = (t, e, s) => {
|
|
@@ -602,7 +602,7 @@ const { I: Xs } = Ks, Et = () => document.createComment(""), ce = (t, e, s) => {
|
|
|
602
602
|
}
|
|
603
603
|
}
|
|
604
604
|
return s;
|
|
605
|
-
}, V = (t, e, s = t) => (t._$AI(e, s), t), Qs = {}, er = (t, e = Qs) => t._$AH = e, tr = (t) => t._$AH,
|
|
605
|
+
}, V = (t, e, s = t) => (t._$AI(e, s), t), Qs = {}, er = (t, e = Qs) => t._$AH = e, tr = (t) => t._$AH, je = (t) => {
|
|
606
606
|
t._$AR(), t._$AA.remove();
|
|
607
607
|
};
|
|
608
608
|
const _t = (t, e, s) => {
|
|
@@ -642,17 +642,17 @@ const _t = (t, e, s) => {
|
|
|
642
642
|
V(b, o[y]), l[y] = b;
|
|
643
643
|
} else l[y] = V(m, o[y]), ce(t, i[u], m), i[g] = null;
|
|
644
644
|
y++;
|
|
645
|
-
} else
|
|
646
|
-
else
|
|
645
|
+
} else je(i[f]), f--;
|
|
646
|
+
else je(i[u]), u++;
|
|
647
647
|
for (; y <= p; ) {
|
|
648
648
|
const g = ce(t, l[p + 1]);
|
|
649
649
|
V(g, o[y]), l[y++] = g;
|
|
650
650
|
}
|
|
651
651
|
for (; u <= f; ) {
|
|
652
652
|
const g = i[u++];
|
|
653
|
-
g !== null &&
|
|
653
|
+
g !== null && je(g);
|
|
654
654
|
}
|
|
655
|
-
return this.ut = n, er(t, l),
|
|
655
|
+
return this.ut = n, er(t, l), F;
|
|
656
656
|
}
|
|
657
657
|
}), es = ({
|
|
658
658
|
baseUrl: t
|
|
@@ -814,7 +814,7 @@ const _t = (t, e, s) => {
|
|
|
814
814
|
return f.json();
|
|
815
815
|
}
|
|
816
816
|
};
|
|
817
|
-
},
|
|
817
|
+
}, Fe = {
|
|
818
818
|
AUTH_TOKEN: "authToken",
|
|
819
819
|
ACCESS_TOKEN: "accessToken",
|
|
820
820
|
REFRESH_TOKEN: "refreshToken"
|
|
@@ -851,9 +851,9 @@ const _t = (t, e, s) => {
|
|
|
851
851
|
maxAge: -1
|
|
852
852
|
});
|
|
853
853
|
}, r = (l) => e(l) !== null, i = (l, h) => {
|
|
854
|
-
t(
|
|
855
|
-
}, o = (l) => e(
|
|
856
|
-
s(
|
|
854
|
+
t(Fe[l], h, sr);
|
|
855
|
+
}, o = (l) => e(Fe[l]), n = (l) => {
|
|
856
|
+
s(Fe[l]);
|
|
857
857
|
};
|
|
858
858
|
return {
|
|
859
859
|
setCookie: t,
|
|
@@ -1790,7 +1790,7 @@ let A = class extends ee {
|
|
|
1790
1790
|
}), await this.handleSignIn();
|
|
1791
1791
|
}
|
|
1792
1792
|
isUserLoggedIn() {
|
|
1793
|
-
return this.isLoggedIn;
|
|
1793
|
+
return this.isLoggedIn || !!this.cookies.getAuthToken("ACCESS_TOKEN") && !!this.cookies.getAuthToken("REFRESH_TOKEN") && !!this.cookies.getAuthToken("AUTH_TOKEN");
|
|
1794
1794
|
}
|
|
1795
1795
|
async logout() {
|
|
1796
1796
|
const t = this.cookies.getAuthToken("ACCESS_TOKEN"), e = this.cookies.getAuthToken("AUTH_TOKEN"), s = this.cookies.getAuthToken("REFRESH_TOKEN");
|
|
@@ -2549,7 +2549,7 @@ var hr = Object.defineProperty, dr = Object.getOwnPropertyDescriptor, ie = (t, e
|
|
|
2549
2549
|
(n = t[o]) && (i = (r ? n(e, s, i) : n(i)) || i);
|
|
2550
2550
|
return r && i && hr(e, s, i), i;
|
|
2551
2551
|
};
|
|
2552
|
-
let
|
|
2552
|
+
let M = class extends ee {
|
|
2553
2553
|
constructor() {
|
|
2554
2554
|
super(...arguments), this.theme = "light", this.storageKey = "theme-preference", this.size = "sm", this.variant = "ghost", this.isDark = !1;
|
|
2555
2555
|
}
|
|
@@ -2624,7 +2624,7 @@ let F = class extends ee {
|
|
|
2624
2624
|
`;
|
|
2625
2625
|
}
|
|
2626
2626
|
};
|
|
2627
|
-
|
|
2627
|
+
M.styles = Kt`
|
|
2628
2628
|
:host {
|
|
2629
2629
|
display: inline-block;
|
|
2630
2630
|
}
|
|
@@ -2776,22 +2776,22 @@ F.styles = Kt`
|
|
|
2776
2776
|
`;
|
|
2777
2777
|
ie([
|
|
2778
2778
|
O({ type: String, reflect: !0 })
|
|
2779
|
-
],
|
|
2779
|
+
], M.prototype, "theme", 2);
|
|
2780
2780
|
ie([
|
|
2781
2781
|
O({ type: String, attribute: "storage-key" })
|
|
2782
|
-
],
|
|
2782
|
+
], M.prototype, "storageKey", 2);
|
|
2783
2783
|
ie([
|
|
2784
2784
|
O({ type: String, attribute: "size" })
|
|
2785
|
-
],
|
|
2785
|
+
], M.prototype, "size", 2);
|
|
2786
2786
|
ie([
|
|
2787
2787
|
O({ type: String, attribute: "variant" })
|
|
2788
|
-
],
|
|
2788
|
+
], M.prototype, "variant", 2);
|
|
2789
2789
|
ie([
|
|
2790
2790
|
T()
|
|
2791
|
-
],
|
|
2792
|
-
|
|
2791
|
+
], M.prototype, "isDark", 2);
|
|
2792
|
+
M = ie([
|
|
2793
2793
|
Gt("theme-toggle")
|
|
2794
|
-
],
|
|
2794
|
+
], M);
|
|
2795
2795
|
function ss(t, e) {
|
|
2796
2796
|
return function() {
|
|
2797
2797
|
return t.apply(e, arguments);
|
|
@@ -2906,18 +2906,18 @@ const Or = (t, e, s, { allOwnKeys: r } = {}) => (ye(e, (i, o) => {
|
|
|
2906
2906
|
for (; (s = t.exec(e)) !== null; )
|
|
2907
2907
|
r.push(s);
|
|
2908
2908
|
return r;
|
|
2909
|
-
}, Br = N("HTMLFormElement"),
|
|
2909
|
+
}, Br = N("HTMLFormElement"), Hr = (t) => t.toLowerCase().replace(
|
|
2910
2910
|
/[-_\s]([a-z\d])(\w*)/g,
|
|
2911
2911
|
function(s, r, i) {
|
|
2912
2912
|
return r.toUpperCase() + i;
|
|
2913
2913
|
}
|
|
2914
|
-
), kt = (({ hasOwnProperty: t }) => (e, s) => t.call(e, s))(Object.prototype),
|
|
2914
|
+
), kt = (({ hasOwnProperty: t }) => (e, s) => t.call(e, s))(Object.prototype), jr = N("RegExp"), ls = (t, e) => {
|
|
2915
2915
|
const s = Object.getOwnPropertyDescriptors(t), r = {};
|
|
2916
2916
|
ye(s, (i, o) => {
|
|
2917
2917
|
let n;
|
|
2918
2918
|
(n = e(i, o, t)) !== !1 && (r[o] = n || i);
|
|
2919
2919
|
}), Object.defineProperties(t, r);
|
|
2920
|
-
},
|
|
2920
|
+
}, Fr = (t) => {
|
|
2921
2921
|
ls(t, (e, s) => {
|
|
2922
2922
|
if (P(t) && ["arguments", "caller", "callee"].indexOf(s) !== -1)
|
|
2923
2923
|
return !1;
|
|
@@ -2932,7 +2932,7 @@ const Or = (t, e, s, { allOwnKeys: r } = {}) => (ye(e, (i, o) => {
|
|
|
2932
2932
|
});
|
|
2933
2933
|
}
|
|
2934
2934
|
});
|
|
2935
|
-
},
|
|
2935
|
+
}, Mr = (t, e) => {
|
|
2936
2936
|
const s = {}, r = (i) => {
|
|
2937
2937
|
i.forEach((o) => {
|
|
2938
2938
|
s[o] = !0;
|
|
@@ -2990,7 +2990,7 @@ const Vr = (t) => {
|
|
|
2990
2990
|
isDate: yr,
|
|
2991
2991
|
isFile: br,
|
|
2992
2992
|
isBlob: wr,
|
|
2993
|
-
isRegExp:
|
|
2993
|
+
isRegExp: jr,
|
|
2994
2994
|
isFunction: P,
|
|
2995
2995
|
isStream: $r,
|
|
2996
2996
|
isURLSearchParams: vr,
|
|
@@ -3014,9 +3014,9 @@ const Vr = (t) => {
|
|
|
3014
3014
|
hasOwnProp: kt,
|
|
3015
3015
|
// an alias to avoid ESLint no-prototype-builtins detection
|
|
3016
3016
|
reduceDescriptors: ls,
|
|
3017
|
-
freezeMethods:
|
|
3018
|
-
toObjectSet:
|
|
3019
|
-
toCamelCase:
|
|
3017
|
+
freezeMethods: Fr,
|
|
3018
|
+
toObjectSet: Mr,
|
|
3019
|
+
toCamelCase: Hr,
|
|
3020
3020
|
noop: qr,
|
|
3021
3021
|
toFiniteNumber: zr,
|
|
3022
3022
|
findKey: ns,
|
|
@@ -3442,7 +3442,7 @@ function mi(t) {
|
|
|
3442
3442
|
return e;
|
|
3443
3443
|
}
|
|
3444
3444
|
const gi = (t) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());
|
|
3445
|
-
function
|
|
3445
|
+
function Me(t, e, s, r, i) {
|
|
3446
3446
|
if (d.isFunction(r))
|
|
3447
3447
|
return r.call(this, e, s);
|
|
3448
3448
|
if (i && (e = s), !!d.isString(e)) {
|
|
@@ -3516,7 +3516,7 @@ class D {
|
|
|
3516
3516
|
has(e, s) {
|
|
3517
3517
|
if (e = he(e), e) {
|
|
3518
3518
|
const r = d.findKey(this, e);
|
|
3519
|
-
return !!(r && this[r] !== void 0 && (!s ||
|
|
3519
|
+
return !!(r && this[r] !== void 0 && (!s || Me(this, this[r], r, s)));
|
|
3520
3520
|
}
|
|
3521
3521
|
return !1;
|
|
3522
3522
|
}
|
|
@@ -3526,7 +3526,7 @@ class D {
|
|
|
3526
3526
|
function o(n) {
|
|
3527
3527
|
if (n = he(n), n) {
|
|
3528
3528
|
const a = d.findKey(r, n);
|
|
3529
|
-
a && (!s ||
|
|
3529
|
+
a && (!s || Me(r, r[a], a, s)) && (delete r[a], i = !0);
|
|
3530
3530
|
}
|
|
3531
3531
|
}
|
|
3532
3532
|
return d.isArray(e) ? e.forEach(o) : o(e), i;
|
|
@@ -3536,7 +3536,7 @@ class D {
|
|
|
3536
3536
|
let r = s.length, i = !1;
|
|
3537
3537
|
for (; r--; ) {
|
|
3538
3538
|
const o = s[r];
|
|
3539
|
-
(!e ||
|
|
3539
|
+
(!e || Me(this, this[o], o, e, !0)) && (delete this[o], i = !0);
|
|
3540
3540
|
}
|
|
3541
3541
|
return i;
|
|
3542
3542
|
}
|
|
@@ -3959,7 +3959,7 @@ const Ss = (t) => {
|
|
|
3959
3959
|
}))(d.global), {
|
|
3960
3960
|
ReadableStream: It,
|
|
3961
3961
|
TextEncoder: Bt
|
|
3962
|
-
} = d.global,
|
|
3962
|
+
} = d.global, Ht = (t, ...e) => {
|
|
3963
3963
|
try {
|
|
3964
3964
|
return !!t(...e);
|
|
3965
3965
|
} catch {
|
|
@@ -3972,7 +3972,7 @@ const Ss = (t) => {
|
|
|
3972
3972
|
const { fetch: e, Request: s, Response: r } = t, i = e ? Ae(e) : typeof fetch == "function", o = Ae(s), n = Ae(r);
|
|
3973
3973
|
if (!i)
|
|
3974
3974
|
return !1;
|
|
3975
|
-
const a = i && Ae(It), l = i && (typeof Bt == "function" ? /* @__PURE__ */ ((p) => (g) => p.encode(g))(new Bt()) : async (p) => new Uint8Array(await new s(p).arrayBuffer())), h = o && a &&
|
|
3975
|
+
const a = i && Ae(It), l = i && (typeof Bt == "function" ? /* @__PURE__ */ ((p) => (g) => p.encode(g))(new Bt()) : async (p) => new Uint8Array(await new s(p).arrayBuffer())), h = o && a && Ht(() => {
|
|
3976
3976
|
let p = !1;
|
|
3977
3977
|
const g = new s(x.origin, {
|
|
3978
3978
|
body: new It(),
|
|
@@ -3982,7 +3982,7 @@ const Ss = (t) => {
|
|
|
3982
3982
|
}
|
|
3983
3983
|
}).headers.has("Content-Type");
|
|
3984
3984
|
return p && !g;
|
|
3985
|
-
}), c = n && a &&
|
|
3985
|
+
}), c = n && a && Ht(() => d.isReadableStream(new r("").body)), u = {
|
|
3986
3986
|
stream: c && ((p) => p.body)
|
|
3987
3987
|
};
|
|
3988
3988
|
i && ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((p) => {
|
|
@@ -4034,17 +4034,17 @@ const Ss = (t) => {
|
|
|
4034
4034
|
let ct;
|
|
4035
4035
|
try {
|
|
4036
4036
|
if (q && h && m !== "get" && m !== "head" && (ct = await y(Ie, b)) !== 0) {
|
|
4037
|
-
let
|
|
4037
|
+
let H = new s(g, {
|
|
4038
4038
|
method: "POST",
|
|
4039
4039
|
body: b,
|
|
4040
4040
|
duplex: "half"
|
|
4041
4041
|
}), X;
|
|
4042
|
-
if (d.isFormData(b) && (X =
|
|
4042
|
+
if (d.isFormData(b) && (X = H.headers.get("content-type")) && Ie.setContentType(X), H.body) {
|
|
4043
4043
|
const [Be, $e] = Pt(
|
|
4044
4044
|
ct,
|
|
4045
4045
|
Oe(Dt(q))
|
|
4046
4046
|
);
|
|
4047
|
-
b = Nt(
|
|
4047
|
+
b = Nt(H.body, Lt, Be, $e);
|
|
4048
4048
|
}
|
|
4049
4049
|
}
|
|
4050
4050
|
d.isString(we) || (we = we ? "include" : "omit");
|
|
@@ -4061,9 +4061,9 @@ const Ss = (t) => {
|
|
|
4061
4061
|
let B = await (o ? lt(ae, at) : lt(g, ht));
|
|
4062
4062
|
const dt = c && (U === "stream" || U === "response");
|
|
4063
4063
|
if (c && (R || dt && z)) {
|
|
4064
|
-
const
|
|
4064
|
+
const H = {};
|
|
4065
4065
|
["status", "statusText", "headers"].forEach((ut) => {
|
|
4066
|
-
|
|
4066
|
+
H[ut] = B[ut];
|
|
4067
4067
|
});
|
|
4068
4068
|
const X = d.toFiniteNumber(B.headers.get("content-length")), [Be, $e] = R && Pt(
|
|
4069
4069
|
X,
|
|
@@ -4073,13 +4073,13 @@ const Ss = (t) => {
|
|
|
4073
4073
|
Nt(B.body, Lt, Be, () => {
|
|
4074
4074
|
$e && $e(), z && z();
|
|
4075
4075
|
}),
|
|
4076
|
-
|
|
4076
|
+
H
|
|
4077
4077
|
);
|
|
4078
4078
|
}
|
|
4079
4079
|
U = U || "text";
|
|
4080
4080
|
let _s = await u[d.findKey(u, U) || "text"](B, p);
|
|
4081
|
-
return !dt && z && z(), await new Promise((
|
|
4082
|
-
bs(
|
|
4081
|
+
return !dt && z && z(), await new Promise((H, X) => {
|
|
4082
|
+
bs(H, X, {
|
|
4083
4083
|
data: _s,
|
|
4084
4084
|
headers: D.from(B.headers),
|
|
4085
4085
|
status: B.status,
|
|
@@ -4126,7 +4126,7 @@ d.forEach(ot, (t, e) => {
|
|
|
4126
4126
|
Object.defineProperty(t, "adapterName", { value: e });
|
|
4127
4127
|
}
|
|
4128
4128
|
});
|
|
4129
|
-
const
|
|
4129
|
+
const jt = (t) => `- ${t}`, Ni = (t) => d.isFunction(t) || t === null || t === !1;
|
|
4130
4130
|
function Li(t, e) {
|
|
4131
4131
|
t = d.isArray(t) ? t : [t];
|
|
4132
4132
|
const { length: s } = t;
|
|
@@ -4146,8 +4146,8 @@ function Li(t, e) {
|
|
|
4146
4146
|
([l, h]) => `adapter ${l} ` + (h === !1 ? "is not supported by the environment" : "is not available in the build")
|
|
4147
4147
|
);
|
|
4148
4148
|
let a = s ? n.length > 1 ? `since :
|
|
4149
|
-
` + n.map(
|
|
4150
|
-
`) : " " +
|
|
4149
|
+
` + n.map(jt).join(`
|
|
4150
|
+
`) : " " + jt(n[0]) : "as no adapter specified";
|
|
4151
4151
|
throw new $(
|
|
4152
4152
|
"There is no suitable adapter to dispatch the request " + a,
|
|
4153
4153
|
"ERR_NOT_SUPPORT"
|
|
@@ -4171,7 +4171,7 @@ function ze(t) {
|
|
|
4171
4171
|
if (t.cancelToken && t.cancelToken.throwIfRequested(), t.signal && t.signal.aborted)
|
|
4172
4172
|
throw new ne(null, t);
|
|
4173
4173
|
}
|
|
4174
|
-
function
|
|
4174
|
+
function Ft(t) {
|
|
4175
4175
|
return ze(t), t.headers = D.from(t.headers), t.data = qe.call(
|
|
4176
4176
|
t,
|
|
4177
4177
|
t.transformRequest
|
|
@@ -4195,7 +4195,7 @@ const vs = "1.13.2", Le = {};
|
|
|
4195
4195
|
return typeof r === t || "a" + (e < 1 ? "n " : " ") + t;
|
|
4196
4196
|
};
|
|
4197
4197
|
});
|
|
4198
|
-
const
|
|
4198
|
+
const Mt = {};
|
|
4199
4199
|
Le.transitional = function(e, s, r) {
|
|
4200
4200
|
function i(o, n) {
|
|
4201
4201
|
return "[Axios v" + vs + "] Transitional option '" + o + "'" + n + (r ? ". " + r : "");
|
|
@@ -4206,7 +4206,7 @@ Le.transitional = function(e, s, r) {
|
|
|
4206
4206
|
i(n, " has been removed" + (s ? " in " + s : "")),
|
|
4207
4207
|
$.ERR_DEPRECATED
|
|
4208
4208
|
);
|
|
4209
|
-
return s && !
|
|
4209
|
+
return s && !Mt[n] && (Mt[n] = !0), e ? e(o, n, a) : !0;
|
|
4210
4210
|
};
|
|
4211
4211
|
};
|
|
4212
4212
|
Le.spelling = function(e) {
|
|
@@ -4302,7 +4302,7 @@ class J {
|
|
|
4302
4302
|
});
|
|
4303
4303
|
let c, u = 0, f;
|
|
4304
4304
|
if (!l) {
|
|
4305
|
-
const p = [
|
|
4305
|
+
const p = [Ft.bind(this), void 0];
|
|
4306
4306
|
for (p.unshift(...a), p.push(...h), f = p.length, c = Promise.resolve(s); u < f; )
|
|
4307
4307
|
c = c.then(p[u++], p[u++]);
|
|
4308
4308
|
return c;
|
|
@@ -4319,7 +4319,7 @@ class J {
|
|
|
4319
4319
|
}
|
|
4320
4320
|
}
|
|
4321
4321
|
try {
|
|
4322
|
-
c =
|
|
4322
|
+
c = Ft.call(this, y);
|
|
4323
4323
|
} catch (p) {
|
|
4324
4324
|
return Promise.reject(p);
|
|
4325
4325
|
}
|
|
@@ -4435,7 +4435,7 @@ function Bi(t) {
|
|
|
4435
4435
|
return t.apply(null, s);
|
|
4436
4436
|
};
|
|
4437
4437
|
}
|
|
4438
|
-
function
|
|
4438
|
+
function Hi(t) {
|
|
4439
4439
|
return d.isObject(t) && t.isAxiosError === !0;
|
|
4440
4440
|
}
|
|
4441
4441
|
const Ye = {
|
|
@@ -4531,7 +4531,7 @@ C.all = function(e) {
|
|
|
4531
4531
|
return Promise.all(e);
|
|
4532
4532
|
};
|
|
4533
4533
|
C.spread = Bi;
|
|
4534
|
-
C.isAxiosError =
|
|
4534
|
+
C.isAxiosError = Hi;
|
|
4535
4535
|
C.mergeConfig = Z;
|
|
4536
4536
|
C.AxiosHeaders = D;
|
|
4537
4537
|
C.formToJSON = (t) => gs(d.isHTMLForm(t) ? new FormData(t) : t);
|
|
@@ -4543,7 +4543,7 @@ class qt extends Error {
|
|
|
4543
4543
|
super(e), this.name = "AuthRefreshError";
|
|
4544
4544
|
}
|
|
4545
4545
|
}
|
|
4546
|
-
const
|
|
4546
|
+
const ji = ({ baseUrl: t, apiBaseUrl: e }) => {
|
|
4547
4547
|
const s = ts(), r = e || t, i = C.create({
|
|
4548
4548
|
baseURL: t,
|
|
4549
4549
|
headers: {
|
|
@@ -4596,11 +4596,11 @@ const Hi = ({ baseUrl: t, apiBaseUrl: e }) => {
|
|
|
4596
4596
|
return Promise.reject(a);
|
|
4597
4597
|
}
|
|
4598
4598
|
), i;
|
|
4599
|
-
}, Ki =
|
|
4599
|
+
}, Ki = ji;
|
|
4600
4600
|
export {
|
|
4601
4601
|
A as Auth,
|
|
4602
4602
|
qt as AuthRefreshError,
|
|
4603
|
-
|
|
4603
|
+
M as ThemeToggle,
|
|
4604
4604
|
Ki as apiClient,
|
|
4605
|
-
|
|
4605
|
+
ji as createApiClient
|
|
4606
4606
|
};
|