@getauthui/core 0.1.5 → 0.1.7

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,7 +1,7 @@
1
- import { state as h, property as g, customElement as O, query as bt } from "lit/decorators.js";
2
- import { css as F, LitElement as st, nothing as o, html as r, svg as d } from "lit";
3
- import { Client as nt, Account as ot, Teams as $t, ID as j, Avatars as xt } from "appwrite";
4
- const kt = {
1
+ import { state as d, property as g, customElement as R, query as st } from "lit/decorators.js";
2
+ import { css as O, LitElement as rt, nothing as o, html as r, svg as h } from "lit";
3
+ import { Client as lt, Account as ct, Teams as xt, ID as H, Avatars as kt } from "appwrite";
4
+ const Ct = {
5
5
  signIn: "Sign in",
6
6
  dialogSignIn: "Sign in",
7
7
  signUp: "Sign up",
@@ -43,6 +43,7 @@ const kt = {
43
43
  resetPassword: "Reset password",
44
44
  resetLinkSent: "If an account exists for {email}, a reset link is on its way.",
45
45
  passwordUpdated: "Your password was updated. You can sign in now.",
46
+ passwordChanged: "Your password was updated.",
46
47
  sendResetLink: "Send reset link",
47
48
  requestNewLink: "Request a new link",
48
49
  agreeTo: "By continuing you agree to our",
@@ -169,13 +170,13 @@ const kt = {
169
170
  guestAccountDescription: "Add an email and password to keep your data.",
170
171
  preview: "Preview"
171
172
  };
172
- function Ct(e, t = {}) {
173
+ function St(e, t = {}) {
173
174
  return e.replace(
174
175
  /\{(\w+)\}/g,
175
176
  (i, s) => s in t ? String(t[s]) : `{${s}}`
176
177
  );
177
178
  }
178
- const St = {
179
+ const At = {
179
180
  amazon: "Amazon",
180
181
  apple: "Apple",
181
182
  appwrite: "Appwrite",
@@ -227,9 +228,9 @@ const St = {
227
228
  zoom: "Zoom"
228
229
  };
229
230
  function q(e) {
230
- return St[e] ?? e.charAt(0).toUpperCase() + e.slice(1);
231
+ return At[e] ?? e.charAt(0).toUpperCase() + e.slice(1);
231
232
  }
232
- const H = (e, t, i = 401) => Object.assign(new Error(t), { type: e, code: i }), A = () => (/* @__PURE__ */ new Date()).toISOString(), I = (e) => new Date(Date.now() - e * 6e4).toISOString(), W = [
233
+ const j = (e, t, i = 401) => Object.assign(new Error(t), { type: e, code: i }), A = () => (/* @__PURE__ */ new Date()).toISOString(), U = (e) => new Date(Date.now() - e * 6e4).toISOString(), W = [
233
234
  "amber",
234
235
  "brave",
235
236
  "calm",
@@ -242,13 +243,13 @@ const H = (e, t, i = 401) => Object.assign(new Error(t), { type: e, code: i }),
242
243
  "juniper",
243
244
  "kite",
244
245
  "lumen"
245
- ], ct = () => `${W[Math.floor(Math.random() * W.length)]}-${W[Math.floor(Math.random() * W.length)]}`, T = () => Math.random().toString(36).slice(2, 12), lt = () => Array.from({ length: 2 }, () => Math.random().toString(36).slice(2, 7)).join("-"), At = {
246
+ ], dt = () => `${W[Math.floor(Math.random() * W.length)]}-${W[Math.floor(Math.random() * W.length)]}`, _ = () => Math.random().toString(36).slice(2, 12), ht = () => Array.from({ length: 2 }, () => Math.random().toString(36).slice(2, 7)).join("-"), Pt = {
246
247
  name: "Ada Lovelace",
247
248
  email: "ada@example.com",
248
249
  phone: "+15550100"
249
250
  };
250
- class Pt {
251
- constructor(t = At) {
251
+ class It {
252
+ constructor(t = Pt) {
252
253
  this.seed = t, this.user = null, this.mfaPending = !1, this.mfaEnabled = !1, this.totpEnrolled = !1, this.recoveryCodes = [], this.lastChallenge = 0, this.sessions = [], this.identities = [], this.logs = [], this.tokens = /* @__PURE__ */ new Map(), this.pendingAuthenticator = null;
253
254
  }
254
255
  // ───────────────────────── helpers ─────────────────────────
@@ -256,13 +257,13 @@ class Pt {
256
257
  const i = t.anonymous ?? !1;
257
258
  return this.user = {
258
259
  $id: "preview-user",
259
- $createdAt: I(1440 * 30),
260
+ $createdAt: U(1440 * 30),
260
261
  $updatedAt: A(),
261
262
  name: i ? "" : t.name ?? this.seed.name,
262
- registration: I(1440 * 30),
263
+ registration: U(1440 * 30),
263
264
  status: !0,
264
265
  labels: [],
265
- passwordUpdate: i ? "" : I(1440 * 7),
266
+ passwordUpdate: i ? "" : U(1440 * 7),
266
267
  email: i ? "" : t.email ?? this.seed.email,
267
268
  phone: i ? "" : t.phone ?? this.seed.phone,
268
269
  emailVerification: !i,
@@ -312,8 +313,8 @@ class Pt {
312
313
  },
313
314
  {
314
315
  ...i,
315
- $id: T(),
316
- $createdAt: I(300),
316
+ $id: _(),
317
+ $createdAt: U(300),
317
318
  provider: t,
318
319
  ip: "198.51.100.7",
319
320
  osCode: "IOS",
@@ -329,8 +330,8 @@ class Pt {
329
330
  },
330
331
  {
331
332
  ...i,
332
- $id: T(),
333
- $createdAt: I(1440 * 3),
333
+ $id: _(),
334
+ $createdAt: U(1440 * 3),
334
335
  provider: "oauth2",
335
336
  ip: "192.0.2.90",
336
337
  osCode: "WIN",
@@ -345,8 +346,8 @@ class Pt {
345
346
  ], this.identities = [
346
347
  {
347
348
  $id: "identity-github",
348
- $createdAt: I(1440 * 20),
349
- $updatedAt: I(1440 * 20),
349
+ $createdAt: U(1440 * 20),
350
+ $updatedAt: U(1440 * 20),
350
351
  userId: "preview-user",
351
352
  provider: "github",
352
353
  providerUid: "8675309",
@@ -366,7 +367,7 @@ class Pt {
366
367
  },
367
368
  {
368
369
  event: "user.update.name",
369
- time: I(1440 * 2),
370
+ time: U(1440 * 2),
370
371
  clientName: "Safari",
371
372
  osName: "iOS",
372
373
  countryName: "Germany",
@@ -374,7 +375,7 @@ class Pt {
374
375
  },
375
376
  {
376
377
  event: "session.create",
377
- time: I(1440 * 3),
378
+ time: U(1440 * 3),
378
379
  clientName: "Firefox",
379
380
  osName: "Windows",
380
381
  countryName: "United States",
@@ -384,9 +385,9 @@ class Pt {
384
385
  }
385
386
  requireUser() {
386
387
  if (!this.user)
387
- throw H("general_unauthorized_scope", "User (role: guests) missing scope (account)");
388
+ throw j("general_unauthorized_scope", "User (role: guests) missing scope (account)");
388
389
  if (this.mfaPending)
389
- throw H(
390
+ throw j(
390
391
  "user_more_factors_required",
391
392
  "More factors are required to complete the sign in process."
392
393
  );
@@ -394,7 +395,7 @@ class Pt {
394
395
  }
395
396
  requireRecentChallenge() {
396
397
  if (Date.now() - this.lastChallenge > 30 * 6e4)
397
- throw H(
398
+ throw j(
398
399
  "user_challenge_required",
399
400
  "A recently successful challenge is required to complete this action."
400
401
  );
@@ -430,26 +431,26 @@ class Pt {
430
431
  }
431
432
  async createMagicURLToken(t, i) {
432
433
  return this.tokens.set(t, { email: i }), this.delay({
433
- $id: T(),
434
+ $id: _(),
434
435
  $createdAt: A(),
435
436
  userId: t,
436
437
  secret: "",
437
438
  expire: "",
438
- phrase: ct()
439
+ phrase: dt()
439
440
  });
440
441
  }
441
442
  async createEmailToken(t, i) {
442
443
  return this.tokens.set(t, { email: i }), this.delay({
443
- $id: T(),
444
+ $id: _(),
444
445
  $createdAt: A(),
445
446
  userId: t,
446
447
  secret: "",
447
448
  expire: "",
448
- phrase: ct()
449
+ phrase: dt()
449
450
  });
450
451
  }
451
452
  async createPhoneToken(t, i) {
452
- return this.tokens.set(t, { phone: i }), this.delay({ $id: T(), $createdAt: A(), userId: t, secret: "", expire: "", phrase: "" });
453
+ return this.tokens.set(t, { phone: i }), this.delay({ $id: _(), $createdAt: A(), userId: t, secret: "", expire: "", phrase: "" });
453
454
  }
454
455
  async createSession(t) {
455
456
  return this.delay(() => {
@@ -541,7 +542,7 @@ class Pt {
541
542
  });
542
543
  }
543
544
  async createMFAChallenge() {
544
- return this.delay({ $id: T(), $createdAt: A(), userId: "preview-user", expire: "" });
545
+ return this.delay({ $id: _(), $createdAt: A(), userId: "preview-user", expire: "" });
545
546
  }
546
547
  async updateMFAChallenge() {
547
548
  return this.delay(() => (this.mfaPending = !1, this.lastChallenge = Date.now(), this.sessions[0]));
@@ -570,32 +571,32 @@ class Pt {
570
571
  async createMFARecoveryCodes() {
571
572
  return this.delay(() => {
572
573
  if (this.recoveryCodes.length > 0)
573
- throw H("user_recovery_codes_already_exists", "Recovery codes already generated.", 409);
574
- return this.recoveryCodes = Array.from({ length: 6 }, lt), { recoveryCodes: this.recoveryCodes };
574
+ throw j("user_recovery_codes_already_exists", "Recovery codes already generated.", 409);
575
+ return this.recoveryCodes = Array.from({ length: 6 }, ht), { recoveryCodes: this.recoveryCodes };
575
576
  });
576
577
  }
577
578
  async getMFARecoveryCodes() {
578
579
  return this.delay(() => (this.requireRecentChallenge(), { recoveryCodes: this.recoveryCodes }));
579
580
  }
580
581
  async updateMFARecoveryCodes() {
581
- return this.delay(() => (this.requireRecentChallenge(), this.recoveryCodes = Array.from({ length: 6 }, lt), { recoveryCodes: this.recoveryCodes }));
582
+ return this.delay(() => (this.requireRecentChallenge(), this.recoveryCodes = Array.from({ length: 6 }, ht), { recoveryCodes: this.recoveryCodes }));
582
583
  }
583
584
  /** Forget everything, as a sign out would. */
584
585
  reset() {
585
586
  this.user = null, this.mfaPending = !1, this.sessions = [], this.identities = [], this.logs = [], this.tokens.clear();
586
587
  }
587
588
  }
588
- function It(e) {
589
+ function Et(e) {
589
590
  let t = 2166136261;
590
591
  const i = () => (t ^= t << 13, t ^= t >>> 17, t ^= t << 5, (t >>> 0) / 4294967296);
591
- for (const x of e) t = (t ^ x.charCodeAt(0)) * 16777619;
592
+ for (const $ of e) t = (t ^ $.charCodeAt(0)) * 16777619;
592
593
  const s = 25;
593
594
  let a = "";
594
- const l = (x, C) => `<rect x="${x}" y="${C}" width="7" height="7"/><rect x="${x + 1}" y="${C + 1}" width="5" height="5" fill="#fff"/><rect x="${x + 2}" y="${C + 2}" width="3" height="3"/>`;
595
- for (let x = 0; x < s; x++)
596
- for (let C = 0; C < s; C++)
597
- !(C < 8 && x < 8 || C >= s - 8 && x < 8 || C < 8 && x >= s - 8) && i() < 0.45 && (a += `<rect x="${C}" y="${x}" width="1" height="1"/>`);
598
- const u = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 ${s} ${s}" shape-rendering="crispEdges"><rect width="${s}" height="${s}" fill="#fff"/><g fill="#000">${l(0, 0)}${l(s - 7, 0)}${l(0, s - 7)}${a}</g></svg>`;
595
+ const c = ($, x) => `<rect x="${$}" y="${x}" width="7" height="7"/><rect x="${$ + 1}" y="${x + 1}" width="5" height="5" fill="#fff"/><rect x="${$ + 2}" y="${x + 2}" width="3" height="3"/>`;
596
+ for (let $ = 0; $ < s; $++)
597
+ for (let x = 0; x < s; x++)
598
+ !(x < 8 && $ < 8 || x >= s - 8 && $ < 8 || x < 8 && $ >= s - 8) && i() < 0.45 && (a += `<rect x="${x}" y="${$}" width="1" height="1"/>`);
599
+ const u = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 ${s} ${s}" shape-rendering="crispEdges"><rect width="${s}" height="${s}" fill="#fff"/><g fill="#000">${c(0, 0)}${c(s - 7, 0)}${c(0, s - 7)}${a}</g></svg>`;
599
600
  return `data:image/svg+xml;utf8,${encodeURIComponent(u)}`;
600
601
  }
601
602
  const f = {
@@ -633,7 +634,7 @@ const f = {
633
634
  targetAlreadyExists: "user_target_already_exists",
634
635
  argumentInvalid: "general_argument_invalid"
635
636
  };
636
- function R(e) {
637
+ function z(e) {
637
638
  if (e && typeof e == "object") {
638
639
  const t = e;
639
640
  let i = typeof t.message == "string" ? t.message : "Unknown error";
@@ -646,10 +647,10 @@ function R(e) {
646
647
  return { message: String(e), type: "", code: 0 };
647
648
  }
648
649
  function N(e, t) {
649
- return R(e).type === t;
650
+ return z(e).type === t;
650
651
  }
651
652
  function K(e, t, i = "link") {
652
- const s = R(e);
653
+ const s = z(e);
653
654
  switch (s.type) {
654
655
  case f.invalidCredentials:
655
656
  return i === "password" ? t.errorCurrentPassword : t.errorInvalidCredentials;
@@ -692,11 +693,11 @@ function K(e, t, i = "link") {
692
693
  return s.type === f.projectNotFound || s.type === f.unknownOrigin ? t.errorConfig : s.type === f.routeNotFound ? t.errorConfigEndpoint : s.code === 0 && /fetch|network/i.test(s.message) ? t.errorNetwork : /Invalid `\w+` param/i.test(s.message) ? t.errorGeneric : s.message ? s.message || t.errorGeneric : s.code === 404 || s.type === f.routeNotFound ? t.errorConfigEndpoint : t.errorGeneric;
693
694
  }
694
695
  function Ut(e) {
695
- const t = R(e);
696
+ const t = z(e);
696
697
  return !!(t.type === f.projectNotFound || t.type === f.unknownOrigin || t.type === f.routeNotFound || !t.message && t.code === 404 || t.code === 0 && /fetch|network|load failed|failed to fetch/i.test(t.message));
697
698
  }
698
699
  const J = (e) => `authui:active-team:${e}`;
699
- function dt(e) {
700
+ function ut(e) {
700
701
  if (typeof localStorage > "u" || !e) return null;
701
702
  try {
702
703
  return localStorage.getItem(J(e));
@@ -704,21 +705,21 @@ function dt(e) {
704
705
  return null;
705
706
  }
706
707
  }
707
- function Et(e, t) {
708
+ function Mt(e, t) {
708
709
  if (!(typeof localStorage > "u" || !e))
709
710
  try {
710
711
  t ? localStorage.setItem(J(e), t) : localStorage.removeItem(J(e));
711
712
  } catch {
712
713
  }
713
714
  }
714
- const rt = "authui:last-method";
715
+ const at = "authui:last-method";
715
716
  function V(e) {
716
717
  if (!(typeof localStorage > "u")) {
717
718
  if (!e || e === "mfa" || e === "sign-up")
718
719
  if (e === "sign-up") e = "email-password";
719
720
  else return;
720
721
  try {
721
- localStorage.setItem(rt, e);
722
+ localStorage.setItem(at, e);
722
723
  } catch {
723
724
  }
724
725
  }
@@ -726,7 +727,7 @@ function V(e) {
726
727
  function D() {
727
728
  if (typeof localStorage > "u") return null;
728
729
  try {
729
- return localStorage.getItem(rt);
730
+ return localStorage.getItem(at);
730
731
  } catch {
731
732
  return null;
732
733
  }
@@ -734,19 +735,19 @@ function D() {
734
735
  function ne() {
735
736
  if (!(typeof localStorage > "u"))
736
737
  try {
737
- localStorage.removeItem(rt);
738
+ localStorage.removeItem(at);
738
739
  } catch {
739
740
  }
740
741
  }
741
742
  const G = "authui:pending-oauth";
742
- function Mt(e) {
743
+ function Ot(e) {
743
744
  if (!(typeof sessionStorage > "u"))
744
745
  try {
745
746
  sessionStorage.setItem(G, e);
746
747
  } catch {
747
748
  }
748
749
  }
749
- function yt() {
750
+ function wt() {
750
751
  if (!(typeof sessionStorage > "u"))
751
752
  try {
752
753
  const e = sessionStorage.getItem(G);
@@ -754,7 +755,7 @@ function yt() {
754
755
  } catch {
755
756
  }
756
757
  }
757
- function ht() {
758
+ function pt() {
758
759
  if (!(typeof sessionStorage > "u"))
759
760
  try {
760
761
  sessionStorage.removeItem(G);
@@ -771,7 +772,7 @@ function S(e, t, i) {
771
772
  new Error(`Appwrite SDK is missing ${t[0]}(). Update the appwrite package.`)
772
773
  );
773
774
  }
774
- const tt = "authui", ut = ["userId", "secret", "expire", "project", "error", tt], pt = () => ({
775
+ const tt = "authui", mt = ["userId", "secret", "expire", "project", "error", tt], ft = () => ({
775
776
  status: "loading",
776
777
  user: null,
777
778
  mfaFactors: null,
@@ -781,7 +782,7 @@ const tt = "authui", ut = ["userId", "secret", "expire", "project", "error", tt]
781
782
  });
782
783
  class Ft {
783
784
  constructor() {
784
- this.client = null, this.account = null, this.config = null, this.state = pt(), this.listeners = /* @__PURE__ */ new Map(), this.refreshPromise = null, this.preview = null, this.teams = null, this.activeTeamId = null;
785
+ this.client = null, this.account = null, this.config = null, this.state = ft(), this.listeners = /* @__PURE__ */ new Map(), this.refreshPromise = null, this.preview = null, this.teams = null, this.activeTeamId = null;
785
786
  }
786
787
  // ───────────────────────────── configuration ─────────────────────────────
787
788
  /** Configure the Appwrite client. Safe to call more than once; the last call wins. */
@@ -789,7 +790,7 @@ class Ft {
789
790
  const i = t.endpoint.trim().replace(/\/+$/, "");
790
791
  i && !i.endsWith("/v1") && console.warn(
791
792
  `[authui] endpoint should end with /v1 (got "${t.endpoint}"). Without it Appwrite returns HTML 404 pages.`
792
- ), this.config = t, this.client = new nt().setEndpoint(t.endpoint).setProject(t.project), this.preview = t.preview ? new Pt() : null, this.account = this.preview ? this.preview : new ot(this.client), this.teams = null, this.activeTeamId = dt(t.project), this.setState({ configured: !0, status: "loading", configError: null }), this.preview ? this.refresh() : typeof window < "u" && this.handleRedirect().then(() => this.refresh());
793
+ ), this.config = t, this.client = new lt().setEndpoint(t.endpoint).setProject(t.project), this.preview = t.preview ? new It() : null, this.account = this.preview ? this.preview : new ct(this.client), this.teams = null, this.activeTeamId = ut(t.project), this.setState({ configured: !0, status: "loading", configError: null }), this.preview ? this.refresh() : typeof window < "u" && this.handleRedirect().then(() => this.refresh());
793
794
  }
794
795
  /**
795
796
  * Called by <authui-config> when it is on the page but missing endpoint or project.
@@ -835,7 +836,7 @@ class Ft {
835
836
  /** List teams the signed-in user belongs to. Empty in preview or when signed out. */
836
837
  async listTeams() {
837
838
  if (this.preview || !this.client || this.state.status !== "signed-in") return [];
838
- this.teams ??= new $t(this.client);
839
+ this.teams ??= new xt(this.client);
839
840
  try {
840
841
  return (await this.teams.list()).teams ?? [];
841
842
  } catch (t) {
@@ -845,7 +846,7 @@ class Ft {
845
846
  getActiveTeamId() {
846
847
  if (this.activeTeamId) return this.activeTeamId;
847
848
  const t = this.config?.project;
848
- return t ? (this.activeTeamId = dt(t), this.activeTeamId) : null;
849
+ return t ? (this.activeTeamId = ut(t), this.activeTeamId) : null;
849
850
  }
850
851
  /**
851
852
  * Remember the active team locally and emit `active-team`.
@@ -853,10 +854,10 @@ class Ft {
853
854
  */
854
855
  setActiveTeam(t) {
855
856
  const i = this.config?.project;
856
- i && Et(i, t?.$id ?? null), this.activeTeamId = t?.$id ?? null, this.emit("active-team", { teamId: this.activeTeamId, team: t });
857
+ i && Mt(i, t?.$id ?? null), this.activeTeamId = t?.$id ?? null, this.emit("active-team", { teamId: this.activeTeamId, team: t });
857
858
  }
858
859
  getStrings() {
859
- return { ...kt, ...this.config?.strings ?? {} };
860
+ return { ...Ct, ...this.config?.strings ?? {} };
860
861
  }
861
862
  getState() {
862
863
  return { ...this.state };
@@ -882,7 +883,7 @@ class Ft {
882
883
  this.state = { ...this.state, ...t }, this.emit("change", this.getState());
883
884
  }
884
885
  fail(t) {
885
- const i = R(t);
886
+ const i = z(t);
886
887
  throw this.emit("error", i), t;
887
888
  }
888
889
  acct() {
@@ -929,8 +930,8 @@ class Ft {
929
930
  console.warn(
930
931
  `[authui] ${a} (endpoint=${this.config?.endpoint ?? "?"}, project=${this.config?.project ?? "?"})`
931
932
  );
932
- const l = R(i);
933
- this.emit("error", { message: a, type: l.type, code: l.code }), this.setState({
933
+ const c = z(i);
934
+ this.emit("error", { message: a, type: c.type, code: c.code }), this.setState({
934
935
  status: "signed-out",
935
936
  user: null,
936
937
  mfaFactors: null,
@@ -974,7 +975,7 @@ class Ft {
974
975
  localStorage.removeItem("cookieFallback");
975
976
  } catch {
976
977
  }
977
- this.config && !this.preview && (this.client = new nt().setEndpoint(this.config.endpoint).setProject(this.config.project), this.account = new ot(this.client));
978
+ this.config && !this.preview && (this.client = new lt().setEndpoint(this.config.endpoint).setProject(this.config.project), this.account = new ct(this.client));
978
979
  }
979
980
  // ─────────────────────────────── sign in ───────────────────────────────
980
981
  async signInWithEmailPassword(t, i) {
@@ -987,7 +988,7 @@ class Ft {
987
988
  }
988
989
  async signUp(t, i, s) {
989
990
  try {
990
- await this.acct().create(j.unique(), t.trim(), i, s?.trim() || void 0), await this.acct().createEmailPasswordSession(t.trim(), i);
991
+ await this.acct().create(H.unique(), t.trim(), i, s?.trim() || void 0), await this.acct().createEmailPasswordSession(t.trim(), i);
991
992
  } catch (a) {
992
993
  this.fail(a);
993
994
  }
@@ -1030,7 +1031,7 @@ class Ft {
1030
1031
  async sendMagicUrl(t) {
1031
1032
  try {
1032
1033
  return await this.acct().createMagicURLToken(
1033
- j.unique(),
1034
+ H.unique(),
1034
1035
  t.trim(),
1035
1036
  this.redirectUrl("magic-url"),
1036
1037
  this.config?.securityPhrase ?? !0
@@ -1042,7 +1043,7 @@ class Ft {
1042
1043
  async sendEmailOtp(t) {
1043
1044
  try {
1044
1045
  return await this.acct().createEmailToken(
1045
- j.unique(),
1046
+ H.unique(),
1046
1047
  t.trim(),
1047
1048
  this.config?.securityPhrase ?? !0
1048
1049
  );
@@ -1052,7 +1053,7 @@ class Ft {
1052
1053
  }
1053
1054
  async sendPhoneOtp(t) {
1054
1055
  try {
1055
- return await this.acct().createPhoneToken(j.unique(), t.replace(/[\s()-]/g, ""));
1056
+ return await this.acct().createPhoneToken(H.unique(), t.replace(/[\s()-]/g, ""));
1056
1057
  } catch (i) {
1057
1058
  return this.fail(i);
1058
1059
  }
@@ -1326,7 +1327,7 @@ class Ft {
1326
1327
  /** Build the URL Appwrite should send the user back to for a given flow. */
1327
1328
  redirectUrl(t) {
1328
1329
  const i = this.config?.redirectUrl ?? (typeof window < "u" ? window.location.origin + window.location.pathname : ""), s = new URL(i, typeof window < "u" ? window.location.href : void 0);
1329
- for (const a of ut) s.searchParams.delete(a);
1330
+ for (const a of mt) s.searchParams.delete(a);
1330
1331
  return s.searchParams.set(tt, t), s.toString();
1331
1332
  }
1332
1333
  setPending(t) {
@@ -1342,7 +1343,7 @@ class Ft {
1342
1343
  if (!i) return !1;
1343
1344
  const s = t.get("userId") ?? "", a = t.get("secret") ?? "";
1344
1345
  this.cleanUrl();
1345
- const l = () => {
1346
+ const c = () => {
1346
1347
  this.setState({
1347
1348
  pending: {
1348
1349
  type: "notice",
@@ -1355,10 +1356,10 @@ class Ft {
1355
1356
  switch (i) {
1356
1357
  case "oauth":
1357
1358
  case "magic-url":
1358
- s && a ? (await this.acct().createSession(s, a), i === "oauth" && yt()) : (i === "oauth" && ht(), l());
1359
+ s && a ? (await this.acct().createSession(s, a), i === "oauth" && wt()) : (i === "oauth" && pt(), c());
1359
1360
  break;
1360
1361
  case "oauth-failed":
1361
- ht(), this.setState({
1362
+ pt(), this.setState({
1362
1363
  pending: {
1363
1364
  type: "notice",
1364
1365
  tone: "error",
@@ -1367,7 +1368,7 @@ class Ft {
1367
1368
  });
1368
1369
  break;
1369
1370
  case "recovery":
1370
- s && a ? this.setState({ pending: { type: "reset-password", userId: s, secret: a } }) : l();
1371
+ s && a ? this.setState({ pending: { type: "reset-password", userId: s, secret: a } }) : c();
1371
1372
  break;
1372
1373
  case "verify-email":
1373
1374
  s && a ? (await S(
@@ -1380,27 +1381,27 @@ class Ft {
1380
1381
  message: this.getStrings().emailVerified,
1381
1382
  tone: "success"
1382
1383
  }
1383
- })) : l();
1384
+ })) : c();
1384
1385
  break;
1385
1386
  }
1386
1387
  } catch (u) {
1387
- const x = R(u), C = K(u, this.getStrings(), "link");
1388
- this.emit("error", x), this.setState({ pending: { type: "notice", message: C, tone: "error" } });
1388
+ const $ = z(u), x = K(u, this.getStrings(), "link");
1389
+ this.emit("error", $), this.setState({ pending: { type: "notice", message: x, tone: "error" } });
1389
1390
  }
1390
1391
  return !0;
1391
1392
  }
1392
1393
  cleanUrl() {
1393
1394
  const t = new URL(window.location.href);
1394
- for (const i of ut) t.searchParams.delete(i);
1395
+ for (const i of mt) t.searchParams.delete(i);
1395
1396
  window.history.replaceState(window.history.state, "", t.toString());
1396
1397
  }
1397
1398
  /** Test helper. */
1398
1399
  reset() {
1399
- this.client = null, this.account = null, this.teams = null, this.activeTeamId = null, this.preview = null, this.config = null, this.state = pt(), this.listeners.clear();
1400
+ this.client = null, this.account = null, this.teams = null, this.activeTeamId = null, this.preview = null, this.config = null, this.state = ft(), this.listeners.clear();
1400
1401
  }
1401
1402
  }
1402
1403
  const n = new Ft();
1403
- class Ot {
1404
+ class Tt {
1404
1405
  constructor() {
1405
1406
  this.listeners = /* @__PURE__ */ new Set(), this.observer = null, this.media = null, this.notify = () => {
1406
1407
  const t = this.isDark("auto");
@@ -1428,14 +1429,14 @@ class Ot {
1428
1429
  this.observer?.disconnect(), this.observer = null, this.media?.removeEventListener?.("change", this.notify), this.media = null;
1429
1430
  }
1430
1431
  }
1431
- const mt = new Ot(), ft = {
1432
+ const gt = new Tt(), vt = {
1432
1433
  none: "0px",
1433
1434
  sm: "0.25rem",
1434
1435
  md: "0.625rem",
1435
1436
  lg: "0.875rem",
1436
1437
  xl: "1.125rem",
1437
1438
  full: "1.5rem"
1438
- }, _t = F`
1439
+ }, Rt = O`
1439
1440
  :host {
1440
1441
  /* Light theme (matches :root in the console) */
1441
1442
  --authui-background: oklch(1 0 0);
@@ -1464,7 +1465,7 @@ const mt = new Ot(), ft = {
1464
1465
  --authui-success-bg: rgba(16, 185, 129, 0.1);
1465
1466
  --authui-warning-foreground: #b45309;
1466
1467
  --authui-warning-bg: rgba(245, 158, 11, 0.1);
1467
- --authui-error-foreground: #dc2626;
1468
+ --authui-error-foreground: #b91c1c;
1468
1469
  --authui-error-bg: rgba(239, 68, 68, 0.1);
1469
1470
  --authui-info-foreground: #475569;
1470
1471
  --authui-info-bg: rgba(100, 116, 139, 0.1);
@@ -1513,7 +1514,7 @@ const mt = new Ot(), ft = {
1513
1514
  --authui-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -4px rgba(0, 0, 0, 0.5);
1514
1515
  color-scheme: dark;
1515
1516
  }
1516
- `, Tt = F`
1517
+ `, _t = O`
1517
1518
  *,
1518
1519
  *::before,
1519
1520
  *::after {
@@ -1707,11 +1708,13 @@ const mt = new Ot(), ft = {
1707
1708
  flex-direction: column;
1708
1709
  gap: 6px;
1709
1710
  }
1710
- .label {
1711
+ .field-header {
1711
1712
  display: flex;
1712
1713
  align-items: center;
1713
1714
  justify-content: space-between;
1714
1715
  gap: 8px;
1716
+ }
1717
+ .label {
1715
1718
  font-size: 14px;
1716
1719
  line-height: 1;
1717
1720
  font-weight: 500;
@@ -1875,7 +1878,7 @@ const mt = new Ot(), ft = {
1875
1878
  background: var(--authui-error-bg);
1876
1879
  }
1877
1880
  .alert-error .alert-body {
1878
- color: color-mix(in oklab, var(--authui-error-foreground) 90%, transparent);
1881
+ color: var(--authui-error-foreground);
1879
1882
  }
1880
1883
  .alert-success {
1881
1884
  color: var(--authui-success-foreground);
@@ -2318,25 +2321,25 @@ const mt = new Ot(), ft = {
2318
2321
  }
2319
2322
  }
2320
2323
  `;
2321
- var Dt = Object.defineProperty, Rt = (e, t, i, s) => {
2322
- for (var a = void 0, l = e.length - 1, u; l >= 0; l--)
2323
- (u = e[l]) && (a = u(t, i, a) || a);
2324
+ var Dt = Object.defineProperty, zt = (e, t, i, s) => {
2325
+ for (var a = void 0, c = e.length - 1, u; c >= 0; c--)
2326
+ (u = e[c]) && (a = u(t, i, a) || a);
2324
2327
  return a && Dt(t, i, a), a;
2325
- }, U;
2326
- const wt = (U = class extends st {
2328
+ }, M;
2329
+ const $t = (M = class extends rt {
2327
2330
  constructor() {
2328
2331
  super(...arguments), this.auth = n.getState(), this.unsubscribeStore = null, this.unsubscribeTheme = null, this.stopKeys = (t) => t.stopPropagation();
2329
2332
  }
2330
2333
  connectedCallback() {
2331
2334
  super.connectedCallback();
2332
- for (const t of U.KEY_EVENTS) this.addEventListener(t, this.stopKeys);
2335
+ for (const t of M.KEY_EVENTS) this.addEventListener(t, this.stopKeys);
2333
2336
  this.auth = n.getState(), this.unsubscribeStore = n.on("change", (t) => {
2334
2337
  this.auth = t, this.applyBranding();
2335
- }), this.unsubscribeTheme = mt.subscribe(() => this.applyBranding()), this.applyBranding();
2338
+ }), this.unsubscribeTheme = gt.subscribe(() => this.applyBranding()), this.applyBranding();
2336
2339
  }
2337
2340
  disconnectedCallback() {
2338
2341
  super.disconnectedCallback();
2339
- for (const t of U.KEY_EVENTS) this.removeEventListener(t, this.stopKeys);
2342
+ for (const t of M.KEY_EVENTS) this.removeEventListener(t, this.stopKeys);
2340
2343
  this.unsubscribeStore?.(), this.unsubscribeTheme?.(), this.unsubscribeStore = null, this.unsubscribeTheme = null;
2341
2344
  }
2342
2345
  get strings() {
@@ -2344,7 +2347,7 @@ const wt = (U = class extends st {
2344
2347
  }
2345
2348
  /** Translate a string key with optional `{placeholders}`. */
2346
2349
  t(t, i) {
2347
- return Ct(this.strings[t], i);
2350
+ return St(this.strings[t], i);
2348
2351
  }
2349
2352
  get config() {
2350
2353
  return n.getConfig();
@@ -2354,27 +2357,27 @@ const wt = (U = class extends st {
2354
2357
  }
2355
2358
  /** Push theme and branding from config onto the host element. */
2356
2359
  applyBranding() {
2357
- const t = this.config?.branding, i = mt.isDark(t?.theme ?? "auto");
2360
+ const t = this.config?.branding, i = gt.isDark(t?.theme ?? "auto");
2358
2361
  this.setAttribute("data-theme", i ? "dark" : "light"), t?.primary && (this.style.setProperty("--authui-primary", t.primary), this.style.setProperty(
2359
2362
  "--authui-primary-foreground",
2360
2363
  t.primaryForeground ?? "#ffffff"
2361
- )), t?.radius && ft[t.radius] && this.style.setProperty("--authui-radius", ft[t.radius]);
2364
+ )), t?.radius && vt[t.radius] && this.style.setProperty("--authui-radius", vt[t.radius]);
2362
2365
  }
2363
2366
  /** Emit a composed custom event from this element. */
2364
2367
  fire(t, i) {
2365
2368
  this.dispatchEvent(new CustomEvent(t, { detail: i, bubbles: !0, composed: !0 }));
2366
2369
  }
2367
- }, U.styles = [_t, Tt], U.KEY_EVENTS = ["keydown", "keyup", "keypress"], U);
2368
- Rt([
2369
- h()
2370
- ], wt.prototype, "auth");
2371
- let P = wt;
2372
- var zt = Object.defineProperty, Lt = Object.getOwnPropertyDescriptor, y = (e, t, i, s) => {
2373
- for (var a = s > 1 ? void 0 : s ? Lt(t, i) : t, l = e.length - 1, u; l >= 0; l--)
2374
- (u = e[l]) && (a = (s ? u(t, i, a) : u(a)) || a);
2375
- return s && a && zt(t, i, a), a;
2370
+ }, M.styles = [Rt, _t], M.KEY_EVENTS = ["keydown", "keyup", "keypress"], M);
2371
+ zt([
2372
+ d()
2373
+ ], $t.prototype, "auth");
2374
+ let E = $t;
2375
+ var Lt = Object.defineProperty, Vt = Object.getOwnPropertyDescriptor, y = (e, t, i, s) => {
2376
+ for (var a = s > 1 ? void 0 : s ? Vt(t, i) : t, c = e.length - 1, u; c >= 0; c--)
2377
+ (u = e[c]) && (a = (s ? u(t, i, a) : u(a)) || a);
2378
+ return s && a && Lt(t, i, a), a;
2376
2379
  };
2377
- let b = class extends st {
2380
+ let b = class extends rt {
2378
2381
  constructor() {
2379
2382
  super(...arguments), this.endpoint = "", this.project = "", this.redirectUrl = "", this.successUrl = "", this.methods = "email-password", this.signUp = "true", this.requireName = "true", this.mfa = "true", this.securityPhrase = "true", this.name = "", this.logo = "", this.theme = "auto", this.radius = "", this.primary = "", this.primaryForeground = "", this.termsUrl = "", this.privacyUrl = "", this.preview = "";
2380
2383
  }
@@ -2424,7 +2427,7 @@ let b = class extends st {
2424
2427
  };
2425
2428
  }
2426
2429
  };
2427
- b.styles = F`
2430
+ b.styles = O`
2428
2431
  :host {
2429
2432
  display: none;
2430
2433
  }
@@ -2484,38 +2487,38 @@ y([
2484
2487
  g({ type: String })
2485
2488
  ], b.prototype, "preview", 2);
2486
2489
  b = y([
2487
- O("authui-config")
2490
+ R("authui-config")
2488
2491
  ], b);
2489
- var Vt = Object.defineProperty, qt = Object.getOwnPropertyDescriptor, Z = (e, t, i, s) => {
2490
- for (var a = s > 1 ? void 0 : s ? qt(t, i) : t, l = e.length - 1, u; l >= 0; l--)
2491
- (u = e[l]) && (a = (s ? u(t, i, a) : u(a)) || a);
2492
- return s && a && Vt(t, i, a), a;
2492
+ var qt = Object.defineProperty, Nt = Object.getOwnPropertyDescriptor, Z = (e, t, i, s) => {
2493
+ for (var a = s > 1 ? void 0 : s ? Nt(t, i) : t, c = e.length - 1, u; c >= 0; c--)
2494
+ (u = e[c]) && (a = (s ? u(t, i, a) : u(a)) || a);
2495
+ return s && a && qt(t, i, a), a;
2493
2496
  };
2494
- const gt = "authui-show:not([ready]){display:none}", oe = "authui-show:not([ready]){display:none}authui-button:not(:defined),authui-user-button:not(:defined){visibility:hidden}";
2495
- let vt = !1;
2496
- function Nt() {
2497
- if (!(typeof document > "u" || vt)) {
2498
- vt = !0;
2497
+ const bt = "authui-show:not([ready]){display:none}", oe = "authui-show:not([ready]){display:none}authui-button:not(:defined),authui-user-button:not(:defined){visibility:hidden}";
2498
+ let yt = !1;
2499
+ function Bt() {
2500
+ if (!(typeof document > "u" || yt)) {
2501
+ yt = !0;
2499
2502
  try {
2500
2503
  if (typeof CSSStyleSheet < "u" && "adoptedStyleSheets" in Document.prototype) {
2501
2504
  const e = new CSSStyleSheet();
2502
- e.replaceSync(gt), document.adoptedStyleSheets = [...document.adoptedStyleSheets, e];
2505
+ e.replaceSync(bt), document.adoptedStyleSheets = [...document.adoptedStyleSheets, e];
2503
2506
  return;
2504
2507
  }
2505
2508
  } catch {
2506
2509
  }
2507
2510
  if (!document.getElementById("authui-fouc")) {
2508
2511
  const e = document.createElement("style");
2509
- e.id = "authui-fouc", e.textContent = gt, document.head.appendChild(e);
2512
+ e.id = "authui-fouc", e.textContent = bt, document.head.appendChild(e);
2510
2513
  }
2511
2514
  }
2512
2515
  }
2513
- Nt();
2514
- const Bt = ["loading", "signed-out", "signed-in", "mfa-required"];
2516
+ Bt();
2517
+ const Ht = ["loading", "signed-out", "signed-in", "mfa-required"];
2515
2518
  function Q(e) {
2516
- return e ? e.split(/[\s,]+/).map((t) => t.trim()).filter((t) => Bt.includes(t)) : [];
2519
+ return e ? e.split(/[\s,]+/).map((t) => t.trim()).filter((t) => Ht.includes(t)) : [];
2517
2520
  }
2518
- let B = class extends st {
2521
+ let B = class extends rt {
2519
2522
  constructor() {
2520
2523
  super(...arguments), this.when = "", this.unless = "", this.status = n.getState().status, this.unsubscribe = null;
2521
2524
  }
@@ -2544,12 +2547,12 @@ Z([
2544
2547
  g({ type: String })
2545
2548
  ], B.prototype, "unless", 2);
2546
2549
  Z([
2547
- h()
2550
+ d()
2548
2551
  ], B.prototype, "status", 2);
2549
2552
  B = Z([
2550
- O("authui-show")
2553
+ R("authui-show")
2551
2554
  ], B);
2552
- const jt = F`
2555
+ const jt = O`
2553
2556
  :host {
2554
2557
  display: block;
2555
2558
  width: 100%;
@@ -2614,157 +2617,157 @@ const jt = F`
2614
2617
  aria-hidden="true"
2615
2618
  >
2616
2619
  ${e}
2617
- </svg>`, c = {
2620
+ </svg>`, l = {
2618
2621
  mail: v(
2619
- d`<rect width="20" height="16" x="2" y="4" rx="2"/><path d="m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7"/>`
2622
+ h`<rect width="20" height="16" x="2" y="4" rx="2"/><path d="m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7"/>`
2620
2623
  ),
2621
2624
  phone: v(
2622
- d`<path d="M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"/>`
2625
+ h`<path d="M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"/>`
2623
2626
  ),
2624
2627
  user: v(
2625
- d`<path d="M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2"/><circle cx="12" cy="7" r="4"/>`
2628
+ h`<path d="M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2"/><circle cx="12" cy="7" r="4"/>`
2626
2629
  ),
2627
2630
  userX: v(
2628
- d`<path d="M2 21a8 8 0 0 1 11.873-7"/><circle cx="10" cy="8" r="5"/><path d="m17 17 5 5"/><path d="m22 17-5 5"/>`
2631
+ h`<path d="M2 21a8 8 0 0 1 11.873-7"/><circle cx="10" cy="8" r="5"/><path d="m17 17 5 5"/><path d="m22 17-5 5"/>`
2629
2632
  ),
2630
2633
  lock: v(
2631
- d`<rect width="18" height="11" x="3" y="11" rx="2" ry="2"/><path d="M7 11V7a5 5 0 0 1 10 0v4"/>`
2634
+ h`<rect width="18" height="11" x="3" y="11" rx="2" ry="2"/><path d="M7 11V7a5 5 0 0 1 10 0v4"/>`
2632
2635
  ),
2633
2636
  key: v(
2634
- d`<path d="m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4"/><path d="m21 2-9.6 9.6"/><circle cx="7.5" cy="15.5" r="5.5"/>`
2637
+ h`<path d="m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4"/><path d="m21 2-9.6 9.6"/><circle cx="7.5" cy="15.5" r="5.5"/>`
2635
2638
  ),
2636
2639
  shield: v(
2637
- d`<path d="M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z"/>`
2640
+ h`<path d="M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z"/>`
2638
2641
  ),
2639
2642
  shieldCheck: v(
2640
- d`<path d="M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z"/><path d="m9 12 2 2 4-4"/>`
2643
+ h`<path d="M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z"/><path d="m9 12 2 2 4-4"/>`
2641
2644
  ),
2642
2645
  smartphone: v(
2643
- d`<rect width="14" height="20" x="5" y="2" rx="2" ry="2"/><path d="M12 18h.01"/>`
2646
+ h`<rect width="14" height="20" x="5" y="2" rx="2" ry="2"/><path d="M12 18h.01"/>`
2644
2647
  ),
2645
2648
  monitor: v(
2646
- d`<rect width="20" height="14" x="2" y="3" rx="2"/><line x1="8" x2="16" y1="21" y2="21"/><line x1="12" x2="12" y1="17" y2="21"/>`
2649
+ h`<rect width="20" height="14" x="2" y="3" rx="2"/><line x1="8" x2="16" y1="21" y2="21"/><line x1="12" x2="12" y1="17" y2="21"/>`
2647
2650
  ),
2648
2651
  globe: v(
2649
- d`<circle cx="12" cy="12" r="10"/><path d="M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20"/><path d="M2 12h20"/>`
2652
+ h`<circle cx="12" cy="12" r="10"/><path d="M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20"/><path d="M2 12h20"/>`
2650
2653
  ),
2651
2654
  logOut: v(
2652
- d`<path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"/><polyline points="16 17 21 12 16 7"/><line x1="21" x2="9" y1="12" y2="12"/>`
2655
+ h`<path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"/><polyline points="16 17 21 12 16 7"/><line x1="21" x2="9" y1="12" y2="12"/>`
2653
2656
  ),
2654
2657
  settings: v(
2655
- d`<path d="M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z"/><circle cx="12" cy="12" r="3"/>`
2658
+ h`<path d="M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z"/><circle cx="12" cy="12" r="3"/>`
2656
2659
  ),
2657
- x: v(d`<path d="M18 6 6 18"/><path d="m6 6 12 12"/>`),
2658
- check: v(d`<path d="M20 6 9 17l-5-5"/>`),
2660
+ x: v(h`<path d="M18 6 6 18"/><path d="m6 6 12 12"/>`),
2661
+ check: v(h`<path d="M20 6 9 17l-5-5"/>`),
2659
2662
  users: v(
2660
- d`<path d="M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2"/><circle cx="9" cy="7" r="4"/><path d="M22 21v-2a4 4 0 0 0-3-3.87"/><path d="M16 3.13a4 4 0 0 1 0 7.75"/>`
2663
+ h`<path d="M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2"/><circle cx="9" cy="7" r="4"/><path d="M22 21v-2a4 4 0 0 0-3-3.87"/><path d="M16 3.13a4 4 0 0 1 0 7.75"/>`
2661
2664
  ),
2662
2665
  copy: v(
2663
- d`<rect width="14" height="14" x="8" y="8" rx="2" ry="2"/><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"/>`
2666
+ h`<rect width="14" height="14" x="8" y="8" rx="2" ry="2"/><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"/>`
2664
2667
  ),
2665
2668
  eye: v(
2666
- d`<path d="M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0"/><circle cx="12" cy="12" r="3"/>`
2669
+ h`<path d="M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0"/><circle cx="12" cy="12" r="3"/>`
2667
2670
  ),
2668
2671
  eyeOff: v(
2669
- d`<path d="M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49"/><path d="M14.084 14.158a3 3 0 0 1-4.242-4.242"/><path d="M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143"/><path d="m2 2 20 20"/>`
2672
+ h`<path d="M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49"/><path d="M14.084 14.158a3 3 0 0 1-4.242-4.242"/><path d="M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143"/><path d="m2 2 20 20"/>`
2670
2673
  ),
2671
- arrowLeft: v(d`<path d="m12 19-7-7 7-7"/><path d="M19 12H5"/>`),
2674
+ arrowLeft: v(h`<path d="m12 19-7-7 7-7"/><path d="M19 12H5"/>`),
2672
2675
  alert: v(
2673
- d`<circle cx="12" cy="12" r="10"/><line x1="12" x2="12" y1="8" y2="12"/><line x1="12" x2="12.01" y1="16" y2="16"/>`
2676
+ h`<circle cx="12" cy="12" r="10"/><line x1="12" x2="12" y1="8" y2="12"/><line x1="12" x2="12.01" y1="16" y2="16"/>`
2674
2677
  ),
2675
- info: v(d`<circle cx="12" cy="12" r="10"/><path d="M12 16v-4"/><path d="M12 8h.01"/>`),
2676
- checkCircle: v(d`<circle cx="12" cy="12" r="10"/><path d="m9 12 2 2 4-4"/>`),
2678
+ info: v(h`<circle cx="12" cy="12" r="10"/><path d="M12 16v-4"/><path d="M12 8h.01"/>`),
2679
+ checkCircle: v(h`<circle cx="12" cy="12" r="10"/><path d="m9 12 2 2 4-4"/>`),
2677
2680
  link: v(
2678
- d`<path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"/><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"/>`
2681
+ h`<path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"/><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"/>`
2679
2682
  ),
2680
2683
  activity: v(
2681
- d`<path d="M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2"/>`
2684
+ h`<path d="M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2"/>`
2682
2685
  ),
2683
2686
  trash: v(
2684
- d`<path d="M3 6h18"/><path d="M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6"/><path d="M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2"/>`
2687
+ h`<path d="M3 6h18"/><path d="M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6"/><path d="M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2"/>`
2685
2688
  ),
2686
2689
  sparkles: v(
2687
- d`<path d="M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z"/>`
2690
+ h`<path d="M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z"/>`
2688
2691
  ),
2689
2692
  refresh: v(
2690
- d`<path d="M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8"/><path d="M21 3v5h-5"/><path d="M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16"/><path d="M8 16H3v5"/>`
2693
+ h`<path d="M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8"/><path d="M21 3v5h-5"/><path d="M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16"/><path d="M8 16H3v5"/>`
2691
2694
  ),
2692
- chevronDown: v(d`<path d="m6 9 6 6 6-6"/>`),
2695
+ chevronDown: v(h`<path d="m6 9 6 6 6-6"/>`),
2693
2696
  ghost: v(
2694
- d`<path d="M9 10h.01"/><path d="M15 10h.01"/><path d="M12 2a8 8 0 0 0-8 8v12l3-3 2.5 2.5L12 19l2.5 2.5L17 19l3 3V10a8 8 0 0 0-8-8z"/>`
2697
+ h`<path d="M9 10h.01"/><path d="M15 10h.01"/><path d="M12 2a8 8 0 0 0-8 8v12l3-3 2.5 2.5L12 19l2.5 2.5L17 19l3 3V10a8 8 0 0 0-8-8z"/>`
2695
2698
  ),
2696
2699
  qr: v(
2697
- d`<rect width="5" height="5" x="3" y="3" rx="1"/><rect width="5" height="5" x="16" y="3" rx="1"/><rect width="5" height="5" x="3" y="16" rx="1"/><path d="M21 16h-3a2 2 0 0 0-2 2v3"/><path d="M21 21v.01"/><path d="M12 7v3a2 2 0 0 1-2 2H7"/><path d="M3 12h.01"/><path d="M12 3h.01"/><path d="M12 16v.01"/><path d="M16 12h1"/><path d="M21 12v.01"/><path d="M12 21v-1"/>`
2700
+ h`<rect width="5" height="5" x="3" y="3" rx="1"/><rect width="5" height="5" x="16" y="3" rx="1"/><rect width="5" height="5" x="3" y="16" rx="1"/><path d="M21 16h-3a2 2 0 0 0-2 2v3"/><path d="M21 21v.01"/><path d="M12 7v3a2 2 0 0 1-2 2H7"/><path d="M3 12h.01"/><path d="M12 3h.01"/><path d="M12 16v.01"/><path d="M16 12h1"/><path d="M21 12v.01"/><path d="M12 21v-1"/>`
2698
2701
  )
2699
- }, w = (e, t = "0 0 24 24") => r`<svg xmlns="http://www.w3.org/2000/svg" viewBox=${t} aria-hidden="true">${e}</svg>`, Ht = {
2702
+ }, w = (e, t = "0 0 24 24") => r`<svg xmlns="http://www.w3.org/2000/svg" viewBox=${t} aria-hidden="true">${e}</svg>`, Wt = {
2700
2703
  google: w(
2701
- d`<path fill="#4285F4" d="M23.49 12.27c0-.79-.07-1.54-.19-2.27H12v4.51h6.47a5.57 5.57 0 0 1-2.4 3.58v3h3.86c2.26-2.09 3.56-5.17 3.56-8.82z"/><path fill="#34A853" d="M12 24c3.24 0 5.95-1.08 7.93-2.91l-3.86-3c-1.08.72-2.45 1.16-4.07 1.16-3.13 0-5.78-2.11-6.73-4.96H1.29v3.09A11.99 11.99 0 0 0 12 24z"/><path fill="#FBBC05" d="M5.27 14.29A7.2 7.2 0 0 1 4.89 12c0-.8.14-1.57.38-2.29V6.62H1.29A11.97 11.97 0 0 0 0 12c0 1.94.46 3.77 1.29 5.38l3.98-3.09z"/><path fill="#EA4335" d="M12 4.75c1.77 0 3.35.61 4.6 1.8l3.42-3.42C17.95 1.19 15.24 0 12 0 7.31 0 3.26 2.69 1.29 6.62l3.98 3.09C6.22 6.86 8.87 4.75 12 4.75z"/>`
2704
+ h`<path fill="#4285F4" d="M23.49 12.27c0-.79-.07-1.54-.19-2.27H12v4.51h6.47a5.57 5.57 0 0 1-2.4 3.58v3h3.86c2.26-2.09 3.56-5.17 3.56-8.82z"/><path fill="#34A853" d="M12 24c3.24 0 5.95-1.08 7.93-2.91l-3.86-3c-1.08.72-2.45 1.16-4.07 1.16-3.13 0-5.78-2.11-6.73-4.96H1.29v3.09A11.99 11.99 0 0 0 12 24z"/><path fill="#FBBC05" d="M5.27 14.29A7.2 7.2 0 0 1 4.89 12c0-.8.14-1.57.38-2.29V6.62H1.29A11.97 11.97 0 0 0 0 12c0 1.94.46 3.77 1.29 5.38l3.98-3.09z"/><path fill="#EA4335" d="M12 4.75c1.77 0 3.35.61 4.6 1.8l3.42-3.42C17.95 1.19 15.24 0 12 0 7.31 0 3.26 2.69 1.29 6.62l3.98 3.09C6.22 6.86 8.87 4.75 12 4.75z"/>`
2702
2705
  ),
2703
2706
  github: w(
2704
- d`<path fill="currentColor" d="M12 0C5.37 0 0 5.37 0 12c0 5.31 3.435 9.795 8.205 11.385.6.105.825-.255.825-.57 0-.285-.015-1.23-.015-2.235-3.015.555-3.795-.735-4.035-1.41-.135-.345-.72-1.41-1.23-1.695-.42-.225-1.02-.78-.015-.795.945-.015 1.62.87 1.845 1.23 1.08 1.815 2.805 1.305 3.495.99.105-.78.42-1.305.765-1.605-2.67-.3-5.46-1.335-5.46-5.925 0-1.305.465-2.385 1.23-3.225-.12-.3-.54-1.53.12-3.18 0 0 1.005-.315 3.3 1.23.96-.27 1.98-.405 3-.405s2.04.135 3 .405c2.295-1.56 3.3-1.23 3.3-1.23.66 1.65.24 2.88.12 3.18.765.84 1.23 1.905 1.23 3.225 0 4.605-2.805 5.625-5.475 5.925.435.375.81 1.095.81 2.22 0 1.605-.015 2.895-.015 3.3 0 .315.225.69.825.57A12.02 12.02 0 0 0 24 12c0-6.63-5.37-12-12-12z"/>`
2707
+ h`<path fill="currentColor" d="M12 0C5.37 0 0 5.37 0 12c0 5.31 3.435 9.795 8.205 11.385.6.105.825-.255.825-.57 0-.285-.015-1.23-.015-2.235-3.015.555-3.795-.735-4.035-1.41-.135-.345-.72-1.41-1.23-1.695-.42-.225-1.02-.78-.015-.795.945-.015 1.62.87 1.845 1.23 1.08 1.815 2.805 1.305 3.495.99.105-.78.42-1.305.765-1.605-2.67-.3-5.46-1.335-5.46-5.925 0-1.305.465-2.385 1.23-3.225-.12-.3-.54-1.53.12-3.18 0 0 1.005-.315 3.3 1.23.96-.27 1.98-.405 3-.405s2.04.135 3 .405c2.295-1.56 3.3-1.23 3.3-1.23.66 1.65.24 2.88.12 3.18.765.84 1.23 1.905 1.23 3.225 0 4.605-2.805 5.625-5.475 5.925.435.375.81 1.095.81 2.22 0 1.605-.015 2.895-.015 3.3 0 .315.225.69.825.57A12.02 12.02 0 0 0 24 12c0-6.63-5.37-12-12-12z"/>`
2705
2708
  ),
2706
2709
  apple: w(
2707
- d`<path fill="currentColor" d="M17.05 20.28c-.98.95-2.05.8-3.08.35-1.09-.46-2.09-.48-3.24 0-1.44.62-2.2.44-3.06-.35C2.79 15.25 3.51 7.59 9.05 7.31c1.35.07 2.29.74 3.08.8 1.18-.24 2.31-.93 3.57-.84 1.51.12 2.65.72 3.4 1.8-3.12 1.87-2.38 5.98.48 7.13-.57 1.5-1.31 2.99-2.54 4.09zM12.03 7.25c-.15-2.23 1.66-4.07 3.74-4.25.29 2.58-2.34 4.5-3.74 4.25z"/>`
2710
+ h`<path fill="currentColor" d="M17.05 20.28c-.98.95-2.05.8-3.08.35-1.09-.46-2.09-.48-3.24 0-1.44.62-2.2.44-3.06-.35C2.79 15.25 3.51 7.59 9.05 7.31c1.35.07 2.29.74 3.08.8 1.18-.24 2.31-.93 3.57-.84 1.51.12 2.65.72 3.4 1.8-3.12 1.87-2.38 5.98.48 7.13-.57 1.5-1.31 2.99-2.54 4.09zM12.03 7.25c-.15-2.23 1.66-4.07 3.74-4.25.29 2.58-2.34 4.5-3.74 4.25z"/>`
2708
2711
  ),
2709
2712
  facebook: w(
2710
- d`<path fill="#1877F2" d="M24 12.073c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.99 4.388 10.954 10.125 11.854v-8.385H7.078v-3.47h3.047V9.43c0-3.007 1.792-4.669 4.533-4.669 1.312 0 2.686.235 2.686.235v2.953H15.83c-1.491 0-1.956.925-1.956 1.874v2.25h3.328l-.532 3.47h-2.796v8.385C19.612 23.027 24 18.062 24 12.073z"/>`
2713
+ h`<path fill="#1877F2" d="M24 12.073c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.99 4.388 10.954 10.125 11.854v-8.385H7.078v-3.47h3.047V9.43c0-3.007 1.792-4.669 4.533-4.669 1.312 0 2.686.235 2.686.235v2.953H15.83c-1.491 0-1.956.925-1.956 1.874v2.25h3.328l-.532 3.47h-2.796v8.385C19.612 23.027 24 18.062 24 12.073z"/>`
2711
2714
  ),
2712
2715
  x: w(
2713
- d`<path fill="currentColor" d="M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z"/>`
2716
+ h`<path fill="currentColor" d="M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z"/>`
2714
2717
  ),
2715
2718
  microsoft: w(
2716
- d`<path fill="#F25022" d="M1 1h10v10H1z"/><path fill="#7FBA00" d="M13 1h10v10H13z"/><path fill="#00A4EF" d="M1 13h10v10H1z"/><path fill="#FFB900" d="M13 13h10v10H13z"/>`
2719
+ h`<path fill="#F25022" d="M1 1h10v10H1z"/><path fill="#7FBA00" d="M13 1h10v10H13z"/><path fill="#00A4EF" d="M1 13h10v10H1z"/><path fill="#FFB900" d="M13 13h10v10H13z"/>`
2717
2720
  ),
2718
2721
  discord: w(
2719
- d`<path fill="#5865F2" d="M20.317 4.37a19.791 19.791 0 0 0-4.885-1.515.074.074 0 0 0-.079.037c-.21.375-.444.864-.608 1.25a18.27 18.27 0 0 0-5.487 0 12.64 12.64 0 0 0-.617-1.25.077.077 0 0 0-.079-.037A19.736 19.736 0 0 0 3.677 4.37a.07.07 0 0 0-.032.027C.533 9.046-.32 13.58.099 18.057a.082.082 0 0 0 .031.057 19.9 19.9 0 0 0 5.993 3.03.078.078 0 0 0 .084-.028c.462-.63.874-1.295 1.226-1.994a.076.076 0 0 0-.041-.106 13.107 13.107 0 0 1-1.872-.892.077.077 0 0 1-.008-.128 10.2 10.2 0 0 0 .372-.292.074.074 0 0 1 .077-.01c3.928 1.793 8.18 1.793 12.062 0a.074.074 0 0 1 .078.01c.12.098.246.198.373.292a.077.077 0 0 1-.006.127 12.299 12.299 0 0 1-1.873.892.077.077 0 0 0-.041.107c.36.698.772 1.362 1.225 1.993a.076.076 0 0 0 .084.028 19.839 19.839 0 0 0 6.002-3.03.077.077 0 0 0 .032-.054c.5-5.177-.838-9.674-3.549-13.66a.061.061 0 0 0-.031-.03zM8.02 15.33c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.956-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.956 2.418-2.157 2.418zm7.975 0c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.955-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.946 2.418-2.157 2.418z"/>`
2722
+ h`<path fill="#5865F2" d="M20.317 4.37a19.791 19.791 0 0 0-4.885-1.515.074.074 0 0 0-.079.037c-.21.375-.444.864-.608 1.25a18.27 18.27 0 0 0-5.487 0 12.64 12.64 0 0 0-.617-1.25.077.077 0 0 0-.079-.037A19.736 19.736 0 0 0 3.677 4.37a.07.07 0 0 0-.032.027C.533 9.046-.32 13.58.099 18.057a.082.082 0 0 0 .031.057 19.9 19.9 0 0 0 5.993 3.03.078.078 0 0 0 .084-.028c.462-.63.874-1.295 1.226-1.994a.076.076 0 0 0-.041-.106 13.107 13.107 0 0 1-1.872-.892.077.077 0 0 1-.008-.128 10.2 10.2 0 0 0 .372-.292.074.074 0 0 1 .077-.01c3.928 1.793 8.18 1.793 12.062 0a.074.074 0 0 1 .078.01c.12.098.246.198.373.292a.077.077 0 0 1-.006.127 12.299 12.299 0 0 1-1.873.892.077.077 0 0 0-.041.107c.36.698.772 1.362 1.225 1.993a.076.076 0 0 0 .084.028 19.839 19.839 0 0 0 6.002-3.03.077.077 0 0 0 .032-.054c.5-5.177-.838-9.674-3.549-13.66a.061.061 0 0 0-.031-.03zM8.02 15.33c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.956-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.956 2.418-2.157 2.418zm7.975 0c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.955-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.946 2.418-2.157 2.418z"/>`
2720
2723
  ),
2721
2724
  gitlab: w(
2722
- d`<path fill="#FC6D26" d="m23.6 9.593-.033-.086L20.3.98a.851.851 0 0 0-.336-.405.876.876 0 0 0-1.001.054.874.874 0 0 0-.29.44l-2.205 6.748H7.535L5.33 1.069a.857.857 0 0 0-.29-.441.876.876 0 0 0-1.001-.054.86.86 0 0 0-.336.405L.436 9.502l-.032.086a6.066 6.066 0 0 0 2.012 7.01l.011.009.03.021 4.976 3.727 2.462 1.863 1.5 1.132a1.009 1.009 0 0 0 1.22 0l1.5-1.132 2.461-1.863 5.006-3.75.013-.01a6.068 6.068 0 0 0 2.006-7.002z"/>`
2725
+ h`<path fill="#FC6D26" d="m23.6 9.593-.033-.086L20.3.98a.851.851 0 0 0-.336-.405.876.876 0 0 0-1.001.054.874.874 0 0 0-.29.44l-2.205 6.748H7.535L5.33 1.069a.857.857 0 0 0-.29-.441.876.876 0 0 0-1.001-.054.86.86 0 0 0-.336.405L.436 9.502l-.032.086a6.066 6.066 0 0 0 2.012 7.01l.011.009.03.021 4.976 3.727 2.462 1.863 1.5 1.132a1.009 1.009 0 0 0 1.22 0l1.5-1.132 2.461-1.863 5.006-3.75.013-.01a6.068 6.068 0 0 0 2.006-7.002z"/>`
2723
2726
  ),
2724
2727
  linkedin: w(
2725
- d`<path fill="#0A66C2" d="M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433a2.062 2.062 0 0 1-2.063-2.065 2.064 2.064 0 1 1 2.063 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z"/>`
2728
+ h`<path fill="#0A66C2" d="M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433a2.062 2.062 0 0 1-2.063-2.065 2.064 2.064 0 1 1 2.063 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z"/>`
2726
2729
  ),
2727
2730
  slack: w(
2728
- d`<path fill="#E01E5A" d="M5.042 15.165a2.528 2.528 0 0 1-2.52 2.523A2.528 2.528 0 0 1 0 15.165a2.527 2.527 0 0 1 2.522-2.52h2.52v2.52zm1.271 0a2.527 2.527 0 0 1 2.521-2.52 2.527 2.527 0 0 1 2.521 2.52v6.313A2.528 2.528 0 0 1 8.834 24a2.528 2.528 0 0 1-2.521-2.522v-6.313z"/><path fill="#36C5F0" d="M8.834 5.042a2.528 2.528 0 0 1-2.521-2.52A2.528 2.528 0 0 1 8.834 0a2.528 2.528 0 0 1 2.521 2.522v2.52H8.834zm0 1.271a2.528 2.528 0 0 1 2.521 2.521 2.528 2.528 0 0 1-2.521 2.521H2.522A2.528 2.528 0 0 1 0 8.834a2.528 2.528 0 0 1 2.522-2.521h6.312z"/><path fill="#2EB67D" d="M18.956 8.834a2.528 2.528 0 0 1 2.522-2.521A2.528 2.528 0 0 1 24 8.834a2.528 2.528 0 0 1-2.522 2.521h-2.522V8.834zm-1.27 0a2.528 2.528 0 0 1-2.523 2.521 2.527 2.527 0 0 1-2.52-2.521V2.522A2.527 2.527 0 0 1 15.163 0a2.528 2.528 0 0 1 2.523 2.522v6.312z"/><path fill="#ECB22E" d="M15.163 18.956a2.528 2.528 0 0 1 2.523 2.522A2.528 2.528 0 0 1 15.163 24a2.527 2.527 0 0 1-2.52-2.522v-2.522h2.52zm0-1.27a2.527 2.527 0 0 1-2.52-2.523 2.526 2.526 0 0 1 2.52-2.52h6.315A2.527 2.527 0 0 1 24 15.163a2.528 2.528 0 0 1-2.522 2.523h-6.315z"/>`
2731
+ h`<path fill="#E01E5A" d="M5.042 15.165a2.528 2.528 0 0 1-2.52 2.523A2.528 2.528 0 0 1 0 15.165a2.527 2.527 0 0 1 2.522-2.52h2.52v2.52zm1.271 0a2.527 2.527 0 0 1 2.521-2.52 2.527 2.527 0 0 1 2.521 2.52v6.313A2.528 2.528 0 0 1 8.834 24a2.528 2.528 0 0 1-2.521-2.522v-6.313z"/><path fill="#36C5F0" d="M8.834 5.042a2.528 2.528 0 0 1-2.521-2.52A2.528 2.528 0 0 1 8.834 0a2.528 2.528 0 0 1 2.521 2.522v2.52H8.834zm0 1.271a2.528 2.528 0 0 1 2.521 2.521 2.528 2.528 0 0 1-2.521 2.521H2.522A2.528 2.528 0 0 1 0 8.834a2.528 2.528 0 0 1 2.522-2.521h6.312z"/><path fill="#2EB67D" d="M18.956 8.834a2.528 2.528 0 0 1 2.522-2.521A2.528 2.528 0 0 1 24 8.834a2.528 2.528 0 0 1-2.522 2.521h-2.522V8.834zm-1.27 0a2.528 2.528 0 0 1-2.523 2.521 2.527 2.527 0 0 1-2.52-2.521V2.522A2.527 2.527 0 0 1 15.163 0a2.528 2.528 0 0 1 2.523 2.522v6.312z"/><path fill="#ECB22E" d="M15.163 18.956a2.528 2.528 0 0 1 2.523 2.522A2.528 2.528 0 0 1 15.163 24a2.527 2.527 0 0 1-2.52-2.522v-2.522h2.52zm0-1.27a2.527 2.527 0 0 1-2.52-2.523 2.526 2.526 0 0 1 2.52-2.52h6.315A2.527 2.527 0 0 1 24 15.163a2.528 2.528 0 0 1-2.522 2.523h-6.315z"/>`
2729
2732
  ),
2730
2733
  twitch: w(
2731
- d`<path fill="#9146FF" d="M11.571 4.714h1.715v5.143H11.57zm4.715 0H18v5.143h-1.714zM6 0 1.714 4.286v15.428h5.143V24l4.286-4.286h3.428L22.286 12V0zm14.571 11.143-3.428 3.428h-3.429l-3 3v-3H6.857V1.714h13.714Z"/>`
2734
+ h`<path fill="#9146FF" d="M11.571 4.714h1.715v5.143H11.57zm4.715 0H18v5.143h-1.714zM6 0 1.714 4.286v15.428h5.143V24l4.286-4.286h3.428L22.286 12V0zm14.571 11.143-3.428 3.428h-3.429l-3 3v-3H6.857V1.714h13.714Z"/>`
2732
2735
  ),
2733
2736
  spotify: w(
2734
- d`<path fill="#1DB954" d="M12 0C5.4 0 0 5.4 0 12s5.4 12 12 12 12-5.4 12-12S18.66 0 12 0zm5.521 17.34c-.24.359-.66.48-1.021.24-2.82-1.74-6.36-2.101-10.561-1.141-.418.122-.779-.179-.899-.539-.12-.421.18-.78.54-.9 4.56-1.021 8.52-.6 11.64 1.32.42.18.479.659.301 1.02zm1.44-3.3c-.301.42-.841.6-1.262.3-3.239-1.98-8.159-2.58-11.939-1.38-.479.12-1.02-.12-1.14-.6-.12-.48.12-1.021.6-1.141C9.6 9.9 15 10.561 18.72 12.84c.361.181.54.78.241 1.2zm.12-3.36C15.24 8.4 8.82 8.16 5.16 9.301c-.6.179-1.2-.181-1.38-.721-.18-.601.18-1.2.72-1.381 4.26-1.26 11.28-1.02 15.721 1.621.539.3.719 1.02.419 1.56-.299.421-1.02.599-1.559.3z"/>`
2737
+ h`<path fill="#1DB954" d="M12 0C5.4 0 0 5.4 0 12s5.4 12 12 12 12-5.4 12-12S18.66 0 12 0zm5.521 17.34c-.24.359-.66.48-1.021.24-2.82-1.74-6.36-2.101-10.561-1.141-.418.122-.779-.179-.899-.539-.12-.421.18-.78.54-.9 4.56-1.021 8.52-.6 11.64 1.32.42.18.479.659.301 1.02zm1.44-3.3c-.301.42-.841.6-1.262.3-3.239-1.98-8.159-2.58-11.939-1.38-.479.12-1.02-.12-1.14-.6-.12-.48.12-1.021.6-1.141C9.6 9.9 15 10.561 18.72 12.84c.361.181.54.78.241 1.2zm.12-3.36C15.24 8.4 8.82 8.16 5.16 9.301c-.6.179-1.2-.181-1.38-.721-.18-.601.18-1.2.72-1.381 4.26-1.26 11.28-1.02 15.721 1.621.539.3.719 1.02.419 1.56-.299.421-1.02.599-1.559.3z"/>`
2735
2738
  ),
2736
2739
  notion: w(
2737
- d`<path fill="currentColor" d="M4.459 4.208c.746.606 1.026.56 2.428.466l13.215-.793c.28 0 .047-.28-.046-.326L17.86 1.968c-.42-.326-.981-.7-2.055-.607L3.01 2.295c-.466.046-.56.28-.374.466zm.793 3.08v13.904c0 .747.373 1.027 1.214.98l14.523-.84c.841-.046.935-.56.935-1.167V6.354c0-.606-.233-.933-.748-.887l-15.177.887c-.56.047-.747.327-.747.933zm14.337.745c.093.42 0 .84-.42.888l-.7.14v10.264c-.608.327-1.168.514-1.635.514-.748 0-.935-.234-1.495-.933l-4.577-7.186v6.952L12.21 19s0 .84-1.168.84l-3.222.186c-.093-.186 0-.653.327-.746l.84-.233V9.854L7.822 9.76c-.094-.42.14-1.026.793-1.073l3.456-.233 4.764 7.279v-6.44l-1.215-.139c-.093-.514.28-.887.747-.933zM1.936 1.035l13.31-.98c1.634-.14 2.055-.047 3.082.7l4.249 2.986c.7.513.934.653.934 1.213v16.378c0 1.026-.373 1.634-1.68 1.726l-15.458.934c-.98.047-1.448-.093-1.962-.747l-3.129-4.06c-.56-.747-.793-1.306-.793-1.96V2.667c0-.839.374-1.54 1.447-1.632z"/>`
2740
+ h`<path fill="currentColor" d="M4.459 4.208c.746.606 1.026.56 2.428.466l13.215-.793c.28 0 .047-.28-.046-.326L17.86 1.968c-.42-.326-.981-.7-2.055-.607L3.01 2.295c-.466.046-.56.28-.374.466zm.793 3.08v13.904c0 .747.373 1.027 1.214.98l14.523-.84c.841-.046.935-.56.935-1.167V6.354c0-.606-.233-.933-.748-.887l-15.177.887c-.56.047-.747.327-.747.933zm14.337.745c.093.42 0 .84-.42.888l-.7.14v10.264c-.608.327-1.168.514-1.635.514-.748 0-.935-.234-1.495-.933l-4.577-7.186v6.952L12.21 19s0 .84-1.168.84l-3.222.186c-.093-.186 0-.653.327-.746l.84-.233V9.854L7.822 9.76c-.094-.42.14-1.026.793-1.073l3.456-.233 4.764 7.279v-6.44l-1.215-.139c-.093-.514.28-.887.747-.933zM1.936 1.035l13.31-.98c1.634-.14 2.055-.047 3.082.7l4.249 2.986c.7.513.934.653.934 1.213v16.378c0 1.026-.373 1.634-1.68 1.726l-15.458.934c-.98.047-1.448-.093-1.962-.747l-3.129-4.06c-.56-.747-.793-1.306-.793-1.96V2.667c0-.839.374-1.54 1.447-1.632z"/>`
2738
2741
  ),
2739
2742
  dropbox: w(
2740
- d`<path fill="#0061FF" d="M6 1.807 0 5.629l6 3.822 6.001-3.822L6 1.807zm12 0-6 3.822 6 3.822 6-3.822-6-3.822zM0 13.274l6 3.822 6.001-3.822L6 9.452l-6 3.822zm18-3.822-6 3.822 6 3.822 6-3.822-6-3.822zM6 18.371l6.001 3.822 6-3.822-6-3.822L6 18.371z"/>`
2743
+ h`<path fill="#0061FF" d="M6 1.807 0 5.629l6 3.822 6.001-3.822L6 1.807zm12 0-6 3.822 6 3.822 6-3.822-6-3.822zM0 13.274l6 3.822 6.001-3.822L6 9.452l-6 3.822zm18-3.822-6 3.822 6 3.822 6-3.822-6-3.822zM6 18.371l6.001 3.822 6-3.822-6-3.822L6 18.371z"/>`
2741
2744
  ),
2742
2745
  figma: w(
2743
- d`<path fill="#F24E1E" d="M8 24a4 4 0 0 0 4-4v-4H8a4 4 0 0 0 0 8z"/><path fill="#A259FF" d="M4 12a4 4 0 0 1 4-4h4v8H8a4 4 0 0 1-4-4z"/><path fill="#FF7262" d="M4 4a4 4 0 0 1 4-4h4v8H8a4 4 0 0 1-4-4z"/><path fill="#1ABCFE" d="M12 0h4a4 4 0 0 1 0 8h-4V0z"/><path fill="#0ACF83" d="M20 12a4 4 0 1 1-8 0 4 4 0 0 1 8 0z"/>`
2746
+ h`<path fill="#F24E1E" d="M8 24a4 4 0 0 0 4-4v-4H8a4 4 0 0 0 0 8z"/><path fill="#A259FF" d="M4 12a4 4 0 0 1 4-4h4v8H8a4 4 0 0 1-4-4z"/><path fill="#FF7262" d="M4 4a4 4 0 0 1 4-4h4v8H8a4 4 0 0 1-4-4z"/><path fill="#1ABCFE" d="M12 0h4a4 4 0 0 1 0 8h-4V0z"/><path fill="#0ACF83" d="M20 12a4 4 0 1 1-8 0 4 4 0 0 1 8 0z"/>`
2744
2747
  ),
2745
2748
  bitbucket: w(
2746
- d`<path fill="#2684FF" d="M.778 1.213a.768.768 0 0 0-.768.892l3.263 19.81c.084.5.515.868 1.022.873H19.95a.772.772 0 0 0 .77-.646l3.27-20.03a.768.768 0 0 0-.768-.891zM14.52 15.53H9.522L8.17 8.466h7.561z"/>`
2749
+ h`<path fill="#2684FF" d="M.778 1.213a.768.768 0 0 0-.768.892l3.263 19.81c.084.5.515.868 1.022.873H19.95a.772.772 0 0 0 .77-.646l3.27-20.03a.768.768 0 0 0-.768-.891zM14.52 15.53H9.522L8.17 8.466h7.561z"/>`
2747
2750
  ),
2748
2751
  amazon: w(
2749
- d`<path fill="currentColor" d="M.045 18.02c.072-.116.187-.124.348-.022 3.636 2.11 7.594 3.166 11.87 3.166 2.852 0 5.668-.533 8.447-1.595l.315-.14c.138-.06.234-.1.293-.13.226-.088.39-.046.525.13.12.174.09.336-.12.48-.256.19-.6.41-1.006.654-1.244.743-2.64 1.316-4.185 1.726a17.617 17.617 0 0 1-10.951-.577 17.88 17.88 0 0 1-5.43-3.35c-.1-.074-.151-.15-.151-.22 0-.047.021-.09.051-.13zm6.565-6.218c0-1.005.247-1.863.743-2.577.495-.71 1.17-1.25 2.04-1.615.796-.335 1.756-.575 2.912-.72.39-.046 1.033-.103 1.92-.174v-.37c0-.93-.105-1.558-.3-1.875-.302-.43-.78-.65-1.44-.65h-.182c-.48.046-.896.196-1.246.46-.35.27-.575.63-.675 1.096-.06.3-.206.465-.435.51l-2.52-.315c-.248-.06-.372-.18-.372-.39 0-.046.007-.09.022-.15.247-1.29.855-2.25 1.82-2.88.976-.616 2.1-.975 3.39-1.05h.54c1.65 0 2.957.434 3.888 1.29.135.15.27.3.405.48.12.165.224.314.283.45.075.134.15.33.195.57.06.254.105.42.135.51.03.104.062.3.076.615.01.313.02.493.02.553v5.28c0 .376.06.72.165 1.036.105.313.21.54.315.674l.51.674c.09.136.136.256.136.36 0 .12-.06.226-.18.314-1.2 1.05-1.86 1.62-1.963 1.71-.165.135-.373.15-.61.045a6.62 6.62 0 0 1-.526-.496l-.31-.347a9.858 9.858 0 0 1-.317-.42l-.3-.435c-.81.886-1.603 1.44-2.4 1.665-.494.15-1.093.227-1.83.227-1.11 0-2.04-.343-2.76-1.034-.72-.69-1.08-1.665-1.08-2.94l-.05-.076zm3.753-.438c0 .566.14 1.02.425 1.364.285.34.675.512 1.155.512.045 0 .106-.007.195-.02.09-.016.134-.023.166-.023.614-.16 1.08-.553 1.424-1.178.165-.28.285-.58.36-.91.09-.32.12-.59.135-.8.015-.195.015-.54.015-1.005v-.54c-.84 0-1.484.06-1.92.18-1.275.36-1.92 1.17-1.92 2.43l-.035-.01zm9.162 7.027c.03-.06.075-.11.132-.17.362-.243.714-.41 1.05-.5a8.094 8.094 0 0 1 1.612-.24c.14-.012.28 0 .41.03.65.06 1.05.168 1.172.33.063.09.099.228.099.39v.15c0 .51-.149 1.11-.424 1.8-.278.69-.664 1.248-1.156 1.68-.073.06-.14.09-.197.09-.03 0-.06 0-.09-.012-.09-.044-.107-.12-.064-.24.54-1.26.806-2.143.806-2.64 0-.15-.03-.27-.087-.344-.145-.166-.55-.257-1.224-.257-.243 0-.533.016-.87.045-.363.045-.7.09-1 .135-.09 0-.148-.014-.18-.044-.03-.03-.036-.06-.02-.106 0-.014.007-.03.02-.06z"/>`
2752
+ h`<path fill="currentColor" d="M.045 18.02c.072-.116.187-.124.348-.022 3.636 2.11 7.594 3.166 11.87 3.166 2.852 0 5.668-.533 8.447-1.595l.315-.14c.138-.06.234-.1.293-.13.226-.088.39-.046.525.13.12.174.09.336-.12.48-.256.19-.6.41-1.006.654-1.244.743-2.64 1.316-4.185 1.726a17.617 17.617 0 0 1-10.951-.577 17.88 17.88 0 0 1-5.43-3.35c-.1-.074-.151-.15-.151-.22 0-.047.021-.09.051-.13zm6.565-6.218c0-1.005.247-1.863.743-2.577.495-.71 1.17-1.25 2.04-1.615.796-.335 1.756-.575 2.912-.72.39-.046 1.033-.103 1.92-.174v-.37c0-.93-.105-1.558-.3-1.875-.302-.43-.78-.65-1.44-.65h-.182c-.48.046-.896.196-1.246.46-.35.27-.575.63-.675 1.096-.06.3-.206.465-.435.51l-2.52-.315c-.248-.06-.372-.18-.372-.39 0-.046.007-.09.022-.15.247-1.29.855-2.25 1.82-2.88.976-.616 2.1-.975 3.39-1.05h.54c1.65 0 2.957.434 3.888 1.29.135.15.27.3.405.48.12.165.224.314.283.45.075.134.15.33.195.57.06.254.105.42.135.51.03.104.062.3.076.615.01.313.02.493.02.553v5.28c0 .376.06.72.165 1.036.105.313.21.54.315.674l.51.674c.09.136.136.256.136.36 0 .12-.06.226-.18.314-1.2 1.05-1.86 1.62-1.963 1.71-.165.135-.373.15-.61.045a6.62 6.62 0 0 1-.526-.496l-.31-.347a9.858 9.858 0 0 1-.317-.42l-.3-.435c-.81.886-1.603 1.44-2.4 1.665-.494.15-1.093.227-1.83.227-1.11 0-2.04-.343-2.76-1.034-.72-.69-1.08-1.665-1.08-2.94l-.05-.076zm3.753-.438c0 .566.14 1.02.425 1.364.285.34.675.512 1.155.512.045 0 .106-.007.195-.02.09-.016.134-.023.166-.023.614-.16 1.08-.553 1.424-1.178.165-.28.285-.58.36-.91.09-.32.12-.59.135-.8.015-.195.015-.54.015-1.005v-.54c-.84 0-1.484.06-1.92.18-1.275.36-1.92 1.17-1.92 2.43l-.035-.01zm9.162 7.027c.03-.06.075-.11.132-.17.362-.243.714-.41 1.05-.5a8.094 8.094 0 0 1 1.612-.24c.14-.012.28 0 .41.03.65.06 1.05.168 1.172.33.063.09.099.228.099.39v.15c0 .51-.149 1.11-.424 1.8-.278.69-.664 1.248-1.156 1.68-.073.06-.14.09-.197.09-.03 0-.06 0-.09-.012-.09-.044-.107-.12-.064-.24.54-1.26.806-2.143.806-2.64 0-.15-.03-.27-.087-.344-.145-.166-.55-.257-1.224-.257-.243 0-.533.016-.87.045-.363.045-.7.09-1 .135-.09 0-.148-.014-.18-.044-.03-.03-.036-.06-.02-.106 0-.014.007-.03.02-.06z"/>`
2750
2753
  ),
2751
2754
  paypal: w(
2752
- d`<path fill="#003087" d="M7.076 21.337H2.47a.641.641 0 0 1-.633-.74L4.944.901C5.026.382 5.474 0 5.998 0h7.46c2.57 0 4.578.543 5.69 1.81 1.01 1.15 1.304 2.42 1.012 4.287-.023.143-.047.288-.077.437-.983 5.05-4.349 6.797-8.647 6.797h-2.19c-.524 0-.968.382-1.05.9l-1.12 7.106zm14.146-14.42a3.35 3.35 0 0 0-.607-.541c-.013.076-.026.175-.041.254-.93 4.778-4.005 7.201-9.138 7.201h-2.19a.563.563 0 0 0-.556.479l-1.187 7.527h-.506l-.24 1.516a.56.56 0 0 0 .554.647h3.882c.46 0 .85-.334.922-.788.06-.26.76-4.852.816-5.09a.932.932 0 0 1 .923-.788h.58c3.76 0 6.705-1.528 7.565-5.946.36-1.847.174-3.388-.777-4.471z"/>`
2755
+ h`<path fill="#003087" d="M7.076 21.337H2.47a.641.641 0 0 1-.633-.74L4.944.901C5.026.382 5.474 0 5.998 0h7.46c2.57 0 4.578.543 5.69 1.81 1.01 1.15 1.304 2.42 1.012 4.287-.023.143-.047.288-.077.437-.983 5.05-4.349 6.797-8.647 6.797h-2.19c-.524 0-.968.382-1.05.9l-1.12 7.106zm14.146-14.42a3.35 3.35 0 0 0-.607-.541c-.013.076-.026.175-.041.254-.93 4.778-4.005 7.201-9.138 7.201h-2.19a.563.563 0 0 0-.556.479l-1.187 7.527h-.506l-.24 1.516a.56.56 0 0 0 .554.647h3.882c.46 0 .85-.334.922-.788.06-.26.76-4.852.816-5.09a.932.932 0 0 1 .923-.788h.58c3.76 0 6.705-1.528 7.565-5.946.36-1.847.174-3.388-.777-4.471z"/>`
2753
2756
  )
2754
2757
  };
2755
2758
  function et(e) {
2756
- return Ht[e] ?? c.globe;
2759
+ return Wt[e] ?? l.globe;
2757
2760
  }
2758
- function at(e) {
2761
+ function nt(e) {
2759
2762
  const t = (e.trim()[0] ?? "?").toUpperCase();
2760
- return /[A-Z0-9]/i.test(t) ? t : c.user;
2763
+ return /[A-Z0-9]/i.test(t) ? t : l.user;
2761
2764
  }
2762
2765
  function Y(e) {
2763
2766
  typeof document > "u" || (document.querySelector("authui-modal") || document.body.appendChild(document.createElement("authui-modal")), queueMicrotask(() => {
2764
2767
  window.dispatchEvent(new CustomEvent("authui:open", { detail: { view: e } }));
2765
2768
  }));
2766
2769
  }
2767
- function ce() {
2770
+ function le() {
2768
2771
  typeof window > "u" || window.dispatchEvent(new CustomEvent("authui:close"));
2769
2772
  }
2770
2773
  function it(e) {
@@ -2783,12 +2786,12 @@ function it(e) {
2783
2786
  let s, a;
2784
2787
  return !t.length || i <= 1 ? (s = 1, a = "passwordStrengthTooWeak") : i === 2 ? (s = 2, a = "passwordStrengthWeak") : i === 3 ? (s = 3, a = "passwordStrengthFair") : i >= 5 && t.long && t.lower && t.upper && t.number && t.symbol ? (s = 4, a = "passwordStrengthVeryStrong") : (s = 4, a = "passwordStrengthStrong"), { level: s, percent: s * 25, labelKey: a, checks: t };
2785
2788
  }
2786
- var Wt = Object.defineProperty, Kt = Object.getOwnPropertyDescriptor, k = (e, t, i, s) => {
2787
- for (var a = s > 1 ? void 0 : s ? Kt(t, i) : t, l = e.length - 1, u; l >= 0; l--)
2788
- (u = e[l]) && (a = (s ? u(t, i, a) : u(a)) || a);
2789
- return s && a && Wt(t, i, a), a;
2789
+ var Kt = Object.defineProperty, Gt = Object.getOwnPropertyDescriptor, C = (e, t, i, s) => {
2790
+ for (var a = s > 1 ? void 0 : s ? Gt(t, i) : t, c = e.length - 1, u; c >= 0; c--)
2791
+ (u = e[c]) && (a = (s ? u(t, i, a) : u(a)) || a);
2792
+ return s && a && Kt(t, i, a), a;
2790
2793
  };
2791
- let $ = class extends P {
2794
+ let k = class extends E {
2792
2795
  constructor() {
2793
2796
  super(...arguments), this.view = "sign-in", this.embedded = !1, this.step = "sign-in", this.busy = !1, this.error = "", this.notice = null, this.showPassword = !1, this.token = null, this.focusOnStep = !1, this.resendCooldownUntil = 0, this.challenge = null, this.recovery = null, this.email = "", this.password = "", this.passwordConfirm = "", this.name = "", this.phone = "", this.code = "", this.onSignIn = (e) => {
2794
2797
  e.preventDefault(), this.requireValid(e) && this.run(async () => {
@@ -2804,8 +2807,8 @@ let $ = class extends P {
2804
2807
  });
2805
2808
  }, this.onOAuth = (e) => {
2806
2809
  this.run(async () => {
2807
- if (Mt(e), await n.signInWithOAuth(e), n.isPreview) {
2808
- yt(), this.fire("authui-success", { method: "oauth" });
2810
+ if (Ot(e), await n.signInWithOAuth(e), n.isPreview) {
2811
+ wt(), this.fire("authui-success", { method: "oauth" });
2809
2812
  return;
2810
2813
  }
2811
2814
  await new Promise((t) => setTimeout(t, 4e3));
@@ -2935,14 +2938,14 @@ let $ = class extends P {
2935
2938
  <div class="panel ${this.embedded ? "embedded" : ""}" part="panel">
2936
2939
  ${this.renderHeader()}
2937
2940
  ${this.notice ? r`<div class="alert alert-${this.notice.tone}" role="status">
2938
- ${this.notice.tone === "success" ? c.checkCircle : this.notice.tone === "error" ? c.alert : c.info}
2941
+ ${this.notice.tone === "success" ? l.checkCircle : this.notice.tone === "error" ? l.alert : l.info}
2939
2942
  <div class="alert-body">${this.notice.message}</div>
2940
2943
  <button
2941
2944
  class="btn btn-ghost btn-icon dismiss"
2942
2945
  @click=${() => this.dismissNotice()}
2943
2946
  aria-label=${this.t("close")}
2944
2947
  >
2945
- ${c.x}
2948
+ ${l.x}
2946
2949
  </button>
2947
2950
  </div>` : o}
2948
2951
  ${e}
@@ -2995,7 +2998,7 @@ let $ = class extends P {
2995
2998
  }
2996
2999
  renderError() {
2997
3000
  return this.error ? r`<div class="alert alert-error" role="alert">
2998
- ${c.alert}
3001
+ ${l.alert}
2999
3002
  <div class="alert-body">${this.error}</div>
3000
3003
  </div>` : o;
3001
3004
  }
@@ -3008,8 +3011,8 @@ let $ = class extends P {
3008
3011
  const t = this[e.field], i = e.meter ? it(t) : null;
3009
3012
  return r`
3010
3013
  <div class="field">
3011
- <label class="label" for=${e.id}>
3012
- ${e.label}
3014
+ <div class="field-header">
3015
+ <label class="label" for=${e.id}>${e.label}</label>
3013
3016
  ${e.forgot ? r`<button
3014
3017
  type="button"
3015
3018
  class="btn btn-link small"
@@ -3017,7 +3020,7 @@ let $ = class extends P {
3017
3020
  >
3018
3021
  ${this.t("forgotPassword")}
3019
3022
  </button>` : o}
3020
- </label>
3023
+ </div>
3021
3024
  <div class="input-wrap">
3022
3025
  <input
3023
3026
  class="input"
@@ -3034,9 +3037,8 @@ let $ = class extends P {
3034
3037
  class="btn btn-ghost btn-icon"
3035
3038
  @click=${() => this.showPassword = !this.showPassword}
3036
3039
  aria-label=${this.showPassword ? this.t("hidePassword") : this.t("showPassword")}
3037
- tabindex="-1"
3038
3040
  >
3039
- ${this.showPassword ? c.eyeOff : c.eye}
3041
+ ${this.showPassword ? l.eyeOff : l.eye}
3040
3042
  </button>
3041
3043
  </div>
3042
3044
  ${i && t ? r`<div class="strength" aria-live="polite">
@@ -3105,19 +3107,19 @@ let $ = class extends P {
3105
3107
  backLink(e = "sign-in") {
3106
3108
  return r`<div class="links">
3107
3109
  <button type="button" class="btn btn-link" @click=${() => this.go(e)}>
3108
- ${c.arrowLeft} ${this.t("back")}
3110
+ ${l.arrowLeft} ${this.t("back")}
3109
3111
  </button>
3110
3112
  </div>`;
3111
3113
  }
3112
3114
  renderStep() {
3113
3115
  if (this.auth.configError)
3114
3116
  return r`<div class="alert alert-error" role="alert">
3115
- ${c.alert}
3117
+ ${l.alert}
3116
3118
  <div class="alert-body">${this.auth.configError}</div>
3117
3119
  </div>`;
3118
3120
  if (!this.auth.configured)
3119
3121
  return r`<div class="alert alert-error" role="alert">
3120
- ${c.alert}
3122
+ ${l.alert}
3121
3123
  <div class="alert-body">${this.t("errorNotConfigured")}</div>
3122
3124
  </div>`;
3123
3125
  if (this.auth.status === "loading")
@@ -3148,7 +3150,7 @@ let $ = class extends P {
3148
3150
  <div class="stack">
3149
3151
  <div class="row">
3150
3152
  <div class="inline">
3151
- <span class="avatar">${at(t)}</span>
3153
+ <span class="avatar">${nt(t)}</span>
3152
3154
  <div class="row-main">
3153
3155
  <span class="row-title" title=${t}>${t}</span>
3154
3156
  ${e.email && e.name ? r`<span class="row-sub" title=${e.email}>${e.email}</span>` : o}
@@ -3166,10 +3168,10 @@ let $ = class extends P {
3166
3168
  this.embedded ? this.fire("authui-open", { view: "account" }) : Y("account");
3167
3169
  }}
3168
3170
  >
3169
- ${c.settings} ${this.t("manageAccount")}
3171
+ ${l.settings} ${this.t("manageAccount")}
3170
3172
  </button>
3171
3173
  <button class="btn btn-ghost btn-block" @click=${this.onSignOut} ?disabled=${this.busy}>
3172
- ${c.logOut} ${this.t("signOut")}
3174
+ ${l.logOut} ${this.t("signOut")}
3173
3175
  </button>
3174
3176
  </div>
3175
3177
  </div>
@@ -3180,8 +3182,8 @@ let $ = class extends P {
3180
3182
  if (e.length === 0) return o;
3181
3183
  const t = D();
3182
3184
  e.sort((s, a) => {
3183
- const l = t === `oauth:${s}` ? 0 : 1, u = t === `oauth:${a}` ? 0 : 1;
3184
- return l - u;
3185
+ const c = t === `oauth:${s}` ? 0 : 1, u = t === `oauth:${a}` ? 0 : 1;
3186
+ return c - u;
3185
3187
  });
3186
3188
  const i = e.length > 2;
3187
3189
  return r`
@@ -3207,9 +3209,9 @@ let $ = class extends P {
3207
3209
  }
3208
3210
  renderSignIn() {
3209
3211
  const e = this.config?.methods ?? {}, t = e.emailPassword !== !1, i = (e.oauth?.length ?? 0) > 0, s = [
3210
- e.magicUrl ? { step: "magic-url", icon: c.link, label: this.t("sendMagicLink") } : null,
3211
- e.emailOtp ? { step: "email-otp", icon: c.mail, label: this.t("continueWithEmail") } : null,
3212
- e.phone ? { step: "phone", icon: c.smartphone, label: this.t("continueWithPhone") } : null
3212
+ e.magicUrl ? { step: "magic-url", icon: l.link, label: this.t("sendMagicLink") } : null,
3213
+ e.emailOtp ? { step: "email-otp", icon: l.mail, label: this.t("continueWithEmail") } : null,
3214
+ e.phone ? { step: "phone", icon: l.smartphone, label: this.t("continueWithPhone") } : null
3213
3215
  ].filter(Boolean);
3214
3216
  return r`
3215
3217
  <div class="stack">
@@ -3229,14 +3231,14 @@ let $ = class extends P {
3229
3231
  </form>` : this.renderError()}
3230
3232
  ${s.length > 0 ? r`<div class="stack-sm">
3231
3233
  ${s.map((a) => {
3232
- const l = D() === a.step;
3234
+ const c = D() === a.step;
3233
3235
  return r`<button
3234
3236
  type="button"
3235
- class="btn btn-secondary btn-block ${l ? "last-used" : ""}"
3237
+ class="btn btn-secondary btn-block ${c ? "last-used" : ""}"
3236
3238
  @click=${() => this.go(a.step)}
3237
3239
  >
3238
3240
  ${a.icon} ${a.label}
3239
- ${l ? r`<span class="last-used-badge">${this.t("lastUsed")}</span>` : o}
3241
+ ${c ? r`<span class="last-used-badge">${this.t("lastUsed")}</span>` : o}
3240
3242
  </button>`;
3241
3243
  })}
3242
3244
  </div>` : o}
@@ -3246,7 +3248,7 @@ let $ = class extends P {
3246
3248
  @click=${this.onGuest}
3247
3249
  ?disabled=${this.busy}
3248
3250
  >
3249
- ${c.ghost} ${this.t("continueAsGuest")}
3251
+ ${l.ghost} ${this.t("continueAsGuest")}
3250
3252
  ${D() === "anonymous" ? r`<span class="last-used-badge">${this.t("lastUsed")}</span>` : o}
3251
3253
  </button>` : o}
3252
3254
  ${t && this.config?.signUp !== !1 ? r`<div class="links">
@@ -3317,13 +3319,13 @@ let $ = class extends P {
3317
3319
  this.step = "sign-in", this.error = "", this.notice = null, this.focusOnStep = !0, this.fire("authui-view", { view: "sign-in" });
3318
3320
  }}
3319
3321
  >
3320
- ${c.arrowLeft} ${this.t("back")}
3322
+ ${l.arrowLeft} ${this.t("back")}
3321
3323
  </button>
3322
3324
  </div>
3323
3325
  </div>
3324
3326
  ` : r`<div class="stack">
3325
3327
  <div class="alert alert-error" role="alert">
3326
- ${c.alert}
3328
+ ${l.alert}
3327
3329
  <div class="alert-body">${this.t("errorInvalidToken")}</div>
3328
3330
  </div>
3329
3331
  <div class="links">
@@ -3341,7 +3343,7 @@ let $ = class extends P {
3341
3343
  }
3342
3344
  phraseBox(e) {
3343
3345
  return e ? r`<div class="alert alert-info">
3344
- ${c.shield}
3346
+ ${l.shield}
3345
3347
  <div class="alert-title">
3346
3348
  ${this.t("securityPhrase")}: <span class="code">${e}</span>
3347
3349
  </div>
@@ -3351,7 +3353,7 @@ let $ = class extends P {
3351
3353
  renderMagicUrl() {
3352
3354
  return this.token ? r`<div class="stack">
3353
3355
  <div class="alert alert-success" role="status">
3354
- ${c.mail}
3356
+ ${l.mail}
3355
3357
  <div class="alert-body">${this.t("magicLinkSent", { email: this.token.target })}</div>
3356
3358
  </div>
3357
3359
  ${this.phraseBox(this.token.phrase)} ${this.backLink()}
@@ -3386,7 +3388,7 @@ let $ = class extends P {
3386
3388
  const e = this.token?.kind === "phone", t = Date.now() < this.resendCooldownUntil;
3387
3389
  return r`
3388
3390
  <div class="alert alert-info" role="status">
3389
- ${e ? c.smartphone : c.mail}
3391
+ ${e ? l.smartphone : l.mail}
3390
3392
  <div class="alert-body">${this.t("codeSent", { target: this.token.target })}</div>
3391
3393
  </div>
3392
3394
  ${this.phraseBox(this.token.phrase)}
@@ -3456,25 +3458,25 @@ let $ = class extends P {
3456
3458
  const i = [
3457
3459
  {
3458
3460
  factor: "totp",
3459
- icon: c.smartphone,
3461
+ icon: l.smartphone,
3460
3462
  label: this.t("mfaUseAuthenticator"),
3461
3463
  available: e?.totp ?? !0
3462
3464
  },
3463
3465
  {
3464
3466
  factor: "email",
3465
- icon: c.mail,
3467
+ icon: l.mail,
3466
3468
  label: this.t("mfaUseEmail"),
3467
3469
  available: e?.email ?? !0
3468
3470
  },
3469
3471
  {
3470
3472
  factor: "phone",
3471
- icon: c.phone,
3473
+ icon: l.phone,
3472
3474
  label: this.t("mfaUsePhone"),
3473
3475
  available: e?.phone ?? !0
3474
3476
  },
3475
3477
  {
3476
3478
  factor: "recoverycode",
3477
- icon: c.key,
3479
+ icon: l.key,
3478
3480
  label: this.t("mfaUseRecoveryCode"),
3479
3481
  available: e?.recoveryCode ?? !0
3480
3482
  }
@@ -3522,7 +3524,7 @@ let $ = class extends P {
3522
3524
  </form>
3523
3525
  <div class="links">
3524
3526
  <button type="button" class="btn btn-link" @click=${() => this.challenge = null}>
3525
- ${c.arrowLeft} ${this.t("back")}
3527
+ ${l.arrowLeft} ${this.t("back")}
3526
3528
  </button>
3527
3529
  <span aria-hidden="true">·</span>
3528
3530
  <button type="button" class="btn btn-link" @click=${this.onCancelMfa}>
@@ -3533,57 +3535,57 @@ let $ = class extends P {
3533
3535
  `;
3534
3536
  }
3535
3537
  };
3536
- $.styles = [...P.styles, jt];
3537
- k([
3538
+ k.styles = [...E.styles, jt];
3539
+ C([
3538
3540
  g({ type: String })
3539
- ], $.prototype, "view", 2);
3540
- k([
3541
+ ], k.prototype, "view", 2);
3542
+ C([
3541
3543
  g({ type: Boolean })
3542
- ], $.prototype, "embedded", 2);
3543
- k([
3544
- h()
3545
- ], $.prototype, "step", 2);
3546
- k([
3547
- h()
3548
- ], $.prototype, "busy", 2);
3549
- k([
3550
- h()
3551
- ], $.prototype, "error", 2);
3552
- k([
3553
- h()
3554
- ], $.prototype, "notice", 2);
3555
- k([
3556
- h()
3557
- ], $.prototype, "showPassword", 2);
3558
- k([
3559
- h()
3560
- ], $.prototype, "token", 2);
3561
- k([
3562
- h()
3563
- ], $.prototype, "resendCooldownUntil", 2);
3564
- k([
3565
- h()
3566
- ], $.prototype, "challenge", 2);
3567
- k([
3568
- h()
3569
- ], $.prototype, "recovery", 2);
3570
- k([
3571
- bt("form input:not([type=hidden])")
3572
- ], $.prototype, "firstInput", 2);
3573
- $ = k([
3574
- O("authui-sign-in")
3575
- ], $);
3576
- var Gt = Object.defineProperty, Yt = Object.getOwnPropertyDescriptor, m = (e, t, i, s) => {
3577
- for (var a = s > 1 ? void 0 : s ? Yt(t, i) : t, l = e.length - 1, u; l >= 0; l--)
3578
- (u = e[l]) && (a = (s ? u(t, i, a) : u(a)) || a);
3579
- return s && a && Gt(t, i, a), a;
3544
+ ], k.prototype, "embedded", 2);
3545
+ C([
3546
+ d()
3547
+ ], k.prototype, "step", 2);
3548
+ C([
3549
+ d()
3550
+ ], k.prototype, "busy", 2);
3551
+ C([
3552
+ d()
3553
+ ], k.prototype, "error", 2);
3554
+ C([
3555
+ d()
3556
+ ], k.prototype, "notice", 2);
3557
+ C([
3558
+ d()
3559
+ ], k.prototype, "showPassword", 2);
3560
+ C([
3561
+ d()
3562
+ ], k.prototype, "token", 2);
3563
+ C([
3564
+ d()
3565
+ ], k.prototype, "resendCooldownUntil", 2);
3566
+ C([
3567
+ d()
3568
+ ], k.prototype, "challenge", 2);
3569
+ C([
3570
+ d()
3571
+ ], k.prototype, "recovery", 2);
3572
+ C([
3573
+ st("form input:not([type=hidden])")
3574
+ ], k.prototype, "firstInput", 2);
3575
+ k = C([
3576
+ R("authui-sign-in")
3577
+ ], k);
3578
+ var Yt = Object.defineProperty, Zt = Object.getOwnPropertyDescriptor, m = (e, t, i, s) => {
3579
+ for (var a = s > 1 ? void 0 : s ? Zt(t, i) : t, c = e.length - 1, u; c >= 0; c--)
3580
+ (u = e[c]) && (a = (s ? u(t, i, a) : u(a)) || a);
3581
+ return s && a && Yt(t, i, a), a;
3580
3582
  };
3581
- let p = class extends P {
3583
+ let p = class extends E {
3582
3584
  constructor() {
3583
- super(...arguments), this.embedded = !1, this.tab = "profile", this.active = "profile", this.busy = "", this.notice = null, this.errors = {}, this.nameInput = "", this.emailInput = "", this.emailPassword = "", this.phoneInput = "", this.phonePassword = "", this.phoneCode = "", this.phoneCodeSent = !1, this.guestName = "", this.oldPassword = "", this.newPassword = "", this.newPasswordConfirm = "", this.authenticator = null, this.authenticatorCode = "", this.factors = null, this.recoveryCodes = null, this.stepUp = null, this.stepUpCode = "", this.copied = !1, this.sessions = null, this.identities = null, this.logs = null, this.logsSupported = null, this.logsProbeStarted = !1, this.confirmDelete = !1, this.confirmRegenerate = !1, this.confirmRemoveAuthenticator = !1, this.confirmSignOutAll = !1, this.confirmDisconnectId = null, this.verifyEmailCooldownUntil = 0, this.onTabsKeydown = (e) => {
3585
+ super(...arguments), this.embedded = !1, this.tab = "profile", this.active = "profile", this.busy = "", this.notice = null, this.errors = {}, this.nameInput = "", this.emailInput = "", this.emailPassword = "", this.phoneInput = "", this.phonePassword = "", this.phoneCode = "", this.phoneCodeSent = !1, this.guestName = "", this.oldPassword = "", this.newPassword = "", this.newPasswordConfirm = "", this.authenticator = null, this.authenticatorCode = "", this.factors = null, this.recoveryCodes = null, this.stepUp = null, this.stepUpCode = "", this.copied = !1, this.sessions = null, this.identities = null, this.logs = null, this.logsSupported = null, this.logsProbeStarted = !1, this.confirmDelete = !1, this.confirmRegenerate = !1, this.confirmRemoveAuthenticator = !1, this.confirmSignOutAll = !1, this.confirmDisconnectId = null, this.verifyEmailCooldownUntil = 0, this.verifyEmailCooldownTimer = null, this.onTabsKeydown = (e) => {
3584
3586
  const t = [...this.renderRoot?.querySelectorAll('[role="tab"]') ?? []];
3585
3587
  if (!t.length) return;
3586
- const i = t.findIndex((l) => l.getAttribute("aria-selected") === "true");
3588
+ const i = t.findIndex((c) => c.getAttribute("aria-selected") === "true");
3587
3589
  let s = i;
3588
3590
  if (e.key === "ArrowRight" || e.key === "ArrowDown") s = (i + 1) % t.length;
3589
3591
  else if (e.key === "ArrowLeft" || e.key === "ArrowUp")
@@ -3624,7 +3626,7 @@ let p = class extends P {
3624
3626
  Date.now() < this.verifyEmailCooldownUntil || this.run(
3625
3627
  "verify",
3626
3628
  async () => {
3627
- await n.sendEmailVerification(), this.verifyEmailCooldownUntil = Date.now() + 45e3, window.setTimeout(() => this.requestUpdate(), 45e3);
3629
+ await n.sendEmailVerification(), this.startVerifyEmailCooldown();
3628
3630
  },
3629
3631
  this.t("verificationSent")
3630
3632
  );
@@ -3651,7 +3653,7 @@ let p = class extends P {
3651
3653
  async () => {
3652
3654
  await n.updatePassword(this.newPassword, this.oldPassword), this.oldPassword = this.newPassword = this.newPasswordConfirm = "";
3653
3655
  },
3654
- this.t("passwordUpdated")
3656
+ this.t("passwordChanged")
3655
3657
  );
3656
3658
  }
3657
3659
  }, this.onToggleMfa = () => {
@@ -3721,9 +3723,12 @@ let p = class extends P {
3721
3723
  }, this.onStepUpVerify = (e) => {
3722
3724
  if (e.preventDefault(), !this.requireValid(e)) return;
3723
3725
  const t = this.stepUp;
3724
- t?.challenge && this.run("stepup-code", async () => {
3725
- await n.completeMfaChallenge(t.challenge.id, this.stepUpCode, { signIn: !1 }), this.stepUp = null, this.stepUpCode = "", await t.retry();
3726
- });
3726
+ t?.challenge && (async () => {
3727
+ let i = !1;
3728
+ await this.run("stepup-code", async () => {
3729
+ await n.completeMfaChallenge(t.challenge.id, this.stepUpCode, { signIn: !1 }), this.stepUp = null, this.stepUpCode = "", i = !0;
3730
+ }), i && await t.retry();
3731
+ })();
3727
3732
  }, this.onDeleteSession = (e) => {
3728
3733
  this.run(`session-${e}`, async () => {
3729
3734
  if ((this.sessions ?? []).some((i) => i.$id === e && i.current)) {
@@ -3753,6 +3758,9 @@ let p = class extends P {
3753
3758
  connectedCallback() {
3754
3759
  super.connectedCallback(), this.active = this.tab, this.hydrate();
3755
3760
  }
3761
+ disconnectedCallback() {
3762
+ super.disconnectedCallback(), this.clearVerifyEmailCooldownTimer(), this.noticeTimer && (clearTimeout(this.noticeTimer), this.noticeTimer = null);
3763
+ }
3756
3764
  willUpdate(e) {
3757
3765
  e.has("tab") && e.get("tab") !== void 0 && (this.active = this.tab), e.has("auth") && this.hydrate(), this.ensureLoaded();
3758
3766
  }
@@ -3864,6 +3872,14 @@ let p = class extends P {
3864
3872
  }
3865
3873
  }
3866
3874
  }
3875
+ startVerifyEmailCooldown() {
3876
+ this.verifyEmailCooldownUntil = Date.now() + 45e3, this.clearVerifyEmailCooldownTimer(), this.verifyEmailCooldownTimer = setInterval(() => {
3877
+ this.requestUpdate(), Date.now() >= this.verifyEmailCooldownUntil && this.clearVerifyEmailCooldownTimer();
3878
+ }, 1e3);
3879
+ }
3880
+ clearVerifyEmailCooldownTimer() {
3881
+ this.verifyEmailCooldownTimer && (clearInterval(this.verifyEmailCooldownTimer), this.verifyEmailCooldownTimer = null);
3882
+ }
3867
3883
  bind(e) {
3868
3884
  return (t) => {
3869
3885
  this[e] = t.target.value;
@@ -3873,7 +3889,7 @@ let p = class extends P {
3873
3889
  render() {
3874
3890
  if (!this.auth.configured)
3875
3891
  return r`<div class="alert alert-error" role="alert">
3876
- ${c.alert}
3892
+ ${l.alert}
3877
3893
  <div class="alert-body">${this.t("errorNotConfigured")}</div>
3878
3894
  </div>`;
3879
3895
  if (this.auth.status === "loading")
@@ -3910,7 +3926,7 @@ let p = class extends P {
3910
3926
  )}
3911
3927
  </div>
3912
3928
  ${this.notice ? r`<div class="alert alert-${this.notice.tone}" role="status">
3913
- ${this.notice.tone === "success" ? c.checkCircle : c.info}
3929
+ ${this.notice.tone === "success" ? l.checkCircle : l.info}
3914
3930
  <div class="alert-body">${this.notice.message}</div>
3915
3931
  <button
3916
3932
  class="btn btn-ghost btn-icon dismiss"
@@ -3919,7 +3935,7 @@ let p = class extends P {
3919
3935
  }}
3920
3936
  aria-label=${this.t("close")}
3921
3937
  >
3922
- ${c.x}
3938
+ ${l.x}
3923
3939
  </button>
3924
3940
  </div>` : o}
3925
3941
  ${this.stepUp ? this.renderStepUp() : r`<div
@@ -3938,18 +3954,18 @@ let p = class extends P {
3938
3954
  return r`
3939
3955
  <div class="between">
3940
3956
  <div class="identity">
3941
- <span class="avatar">${at(t)}</span>
3957
+ <span class="avatar">${nt(t)}</span>
3942
3958
  <div class="row-main">
3943
3959
  <span class="row-title" title=${t}>
3944
3960
  ${t}
3945
- ${e.mfa ? r`<span class="badge badge-success">${c.shieldCheck} ${this.t("mfaBadge")}</span>` : o}
3961
+ ${e.mfa ? r`<span class="badge badge-success">${l.shieldCheck} ${this.t("mfaBadge")}</span>` : o}
3946
3962
  ${n.isPreview ? r`<span class="badge badge-info">${this.t("preview")}</span>` : o}
3947
3963
  </span>
3948
3964
  ${e.email && e.name ? r`<span class="row-sub" title=${e.email}>${e.email}</span>` : o}
3949
3965
  </div>
3950
3966
  </div>
3951
3967
  <button class="btn btn-outline btn-sm" @click=${() => n.signOut()}>
3952
- ${c.logOut} ${this.t("signOut")}
3968
+ ${l.logOut} ${this.t("signOut")}
3953
3969
  </button>
3954
3970
  </div>
3955
3971
  `;
@@ -3971,7 +3987,7 @@ let p = class extends P {
3971
3987
  error(e) {
3972
3988
  const t = this.errors[e];
3973
3989
  return t ? r`<div class="alert alert-error" role="alert">
3974
- ${c.alert}
3990
+ ${l.alert}
3975
3991
  <div class="alert-body">${t}</div>
3976
3992
  </div>` : o;
3977
3993
  }
@@ -3989,7 +4005,7 @@ let p = class extends P {
3989
4005
  </section>`;
3990
4006
  }
3991
4007
  verifiedBadge(e) {
3992
- return e ? r`<span class="badge badge-success">${c.check} ${this.t("verified")}</span>` : r`<span class="badge badge-warning">${this.t("unverified")}</span>`;
4008
+ return e ? r`<span class="badge badge-success">${l.check} ${this.t("verified")}</span>` : r`<span class="badge badge-warning">${this.t("unverified")}</span>`;
3993
4009
  }
3994
4010
  // ── Profile ──
3995
4011
  renderProfile() {
@@ -4254,7 +4270,7 @@ let p = class extends P {
4254
4270
  class="btn btn-outline btn-sm warn"
4255
4271
  @click=${() => this.confirmDelete = !0}
4256
4272
  >
4257
- ${c.userX} ${this.t("deleteAccount")}
4273
+ ${l.userX} ${this.t("deleteAccount")}
4258
4274
  </button>`}`,
4259
4275
  void 0,
4260
4276
  !0
@@ -4349,7 +4365,7 @@ let p = class extends P {
4349
4365
  </div>`;
4350
4366
  }
4351
4367
  renderMfaCard() {
4352
- const e = this.user, t = this.factors?.totp ?? !1, i = this.authenticator ? n.isPreview ? It(this.authenticator.uri) : new xt(n.getClient()).getQR(this.authenticator.uri, 400, 1).toString() : "";
4368
+ const e = this.user, t = this.factors?.totp ?? !1, i = this.authenticator ? n.isPreview ? Et(this.authenticator.uri) : new kt(n.getClient()).getQR(this.authenticator.uri, 400, 1).toString() : "";
4353
4369
  return this.card(
4354
4370
  this.t("twoFactor"),
4355
4371
  this.t("twoFactorDescription"),
@@ -4369,7 +4385,7 @@ let p = class extends P {
4369
4385
  ></button>
4370
4386
  </div>
4371
4387
  ${e.mfa && !(this.factors?.totp || e.emailVerification || e.phoneVerification) ? r`<div class="alert alert-warning" role="status">
4372
- ${c.alert}
4388
+ ${l.alert}
4373
4389
  <div class="alert-body">
4374
4390
  ${this.t("mfaNoFactorWarning")}
4375
4391
  ${this.factors?.totp ? o : r`<div class="links">
@@ -4389,7 +4405,7 @@ let p = class extends P {
4389
4405
  <div class="toggle-row">
4390
4406
  <div class="row-main">
4391
4407
  <span class="row-title"
4392
- >${c.smartphone} ${this.t("authenticatorApp")}
4408
+ >${l.smartphone} ${this.t("authenticatorApp")}
4393
4409
  ${t ? this.verifiedBadge(!0) : o}</span
4394
4410
  >
4395
4411
  </div>
@@ -4437,7 +4453,7 @@ let p = class extends P {
4437
4453
  this.onCopySecret();
4438
4454
  }}
4439
4455
  >
4440
- ${this.copied ? c.check : c.copy}
4456
+ ${this.copied ? l.check : l.copy}
4441
4457
  ${this.copied ? this.t("copied") : this.t("authenticatorCopyKey")}
4442
4458
  </button>
4443
4459
  </div>
@@ -4479,7 +4495,7 @@ let p = class extends P {
4479
4495
  this.t("recoveryCodesDescription") + " " + this.t("recoveryCodesOnceHint"),
4480
4496
  r`<div class="kv">
4481
4497
  ${this.recoveryCodes ? r`<div class="alert alert-warning">
4482
- ${c.alert}
4498
+ ${l.alert}
4483
4499
  <div class="alert-body">${this.t("recoveryCodesWarning")}</div>
4484
4500
  </div>
4485
4501
  <div class="codes">
@@ -4487,7 +4503,7 @@ let p = class extends P {
4487
4503
  </div>
4488
4504
  <div class="inline">
4489
4505
  <button class="btn btn-outline btn-sm" @click=${this.onCopyCodes}>
4490
- ${this.copied ? c.check : c.copy}
4506
+ ${this.copied ? l.check : l.copy}
4491
4507
  ${this.copied ? this.t("copied") : this.t("copy")}
4492
4508
  </button>
4493
4509
  <button class="btn btn-ghost btn-sm" @click=${() => this.recoveryCodes = null}>
@@ -4499,7 +4515,7 @@ let p = class extends P {
4499
4515
  @click=${this.onRecoveryCodes}
4500
4516
  ?disabled=${!!this.busy}
4501
4517
  >
4502
- ${this.spinner("recovery")} ${c.key}
4518
+ ${this.spinner("recovery")} ${l.key}
4503
4519
  ${e ? this.t("viewRecoveryCodes") : this.t("generateRecoveryCodes")}
4504
4520
  </button>
4505
4521
  ${e ? this.confirmRegenerate ? r`<div class="inline">
@@ -4508,7 +4524,7 @@ let p = class extends P {
4508
4524
  @click=${this.onRegenerateRecoveryCodes}
4509
4525
  ?disabled=${!!this.busy}
4510
4526
  >
4511
- ${c.refresh} ${this.t("regenerateRecoveryCodes")}
4527
+ ${l.refresh} ${this.t("regenerateRecoveryCodes")}
4512
4528
  </button>
4513
4529
  <button
4514
4530
  class="btn btn-ghost btn-sm"
@@ -4521,7 +4537,7 @@ let p = class extends P {
4521
4537
  @click=${this.onRegenerateRecoveryCodes}
4522
4538
  ?disabled=${!!this.busy}
4523
4539
  >
4524
- ${c.refresh} ${this.t("regenerateRecoveryCodes")}
4540
+ ${l.refresh} ${this.t("regenerateRecoveryCodes")}
4525
4541
  </button>` : o}
4526
4542
  </div>`}
4527
4543
  ${this.error("recovery")}
@@ -4533,25 +4549,25 @@ let p = class extends P {
4533
4549
  const e = this.stepUp, t = this.factors, i = [
4534
4550
  {
4535
4551
  factor: "totp",
4536
- icon: c.smartphone,
4552
+ icon: l.smartphone,
4537
4553
  label: this.t("mfaUseAuthenticator"),
4538
4554
  available: t?.totp ?? !0
4539
4555
  },
4540
4556
  {
4541
4557
  factor: "email",
4542
- icon: c.mail,
4558
+ icon: l.mail,
4543
4559
  label: this.t("mfaUseEmail"),
4544
4560
  available: t?.email ?? !0
4545
4561
  },
4546
4562
  {
4547
4563
  factor: "phone",
4548
- icon: c.phone,
4564
+ icon: l.phone,
4549
4565
  label: this.t("mfaUsePhone"),
4550
4566
  available: t?.phone ?? !0
4551
4567
  },
4552
4568
  {
4553
4569
  factor: "recoverycode",
4554
- icon: c.key,
4570
+ icon: l.key,
4555
4571
  label: this.t("mfaUseRecoveryCode"),
4556
4572
  available: t?.recoveryCode ?? !0
4557
4573
  }
@@ -4602,7 +4618,7 @@ let p = class extends P {
4602
4618
  // ── Sessions ──
4603
4619
  deviceIcon(e) {
4604
4620
  const t = (e.deviceName || "").toLowerCase(), i = (e.osName || e.osCode || "").toLowerCase();
4605
- return /phone|tablet|mobile/.test(t) || /ios|android|ipados/.test(i) ? c.smartphone : /desktop|browser/.test(t) || /mac|windows|linux|chrome os/.test(i) ? c.monitor : c.globe;
4621
+ return /phone|tablet|mobile/.test(t) || /ios|android|ipados/.test(i) ? l.smartphone : /desktop|browser/.test(t) || /mac|windows|linux|chrome os/.test(i) ? l.monitor : l.globe;
4606
4622
  }
4607
4623
  renderSessions() {
4608
4624
  const e = this.sessions;
@@ -4634,7 +4650,7 @@ let p = class extends P {
4634
4650
  ?disabled=${!!this.busy}
4635
4651
  aria-label=${this.t("signOutSession")}
4636
4652
  >
4637
- ${c.logOut}
4653
+ ${l.logOut}
4638
4654
  </button>
4639
4655
  </div>
4640
4656
  </div>`
@@ -4650,7 +4666,7 @@ let p = class extends P {
4650
4666
  @click=${this.onSignOutAll}
4651
4667
  ?disabled=${!!this.busy}
4652
4668
  >
4653
- ${this.spinner("sessions-all")} ${c.logOut} ${this.t("signOutAllSessions")}
4669
+ ${this.spinner("sessions-all")} ${l.logOut} ${this.t("signOutAllSessions")}
4654
4670
  </button>
4655
4671
  <button
4656
4672
  class="btn btn-ghost btn-sm"
@@ -4663,7 +4679,7 @@ let p = class extends P {
4663
4679
  @click=${this.onSignOutAll}
4664
4680
  ?disabled=${!!this.busy}
4665
4681
  >
4666
- ${this.spinner("sessions-all")} ${c.logOut} ${this.t("signOutAllSessions")}
4682
+ ${this.spinner("sessions-all")} ${l.logOut} ${this.t("signOutAllSessions")}
4667
4683
  </button>`}`,
4668
4684
  void 0,
4669
4685
  !0
@@ -4752,8 +4768,8 @@ let p = class extends P {
4752
4768
  }
4753
4769
  };
4754
4770
  p.styles = [
4755
- ...P.styles,
4756
- F`
4771
+ ...E.styles,
4772
+ O`
4757
4773
  :host {
4758
4774
  display: block;
4759
4775
  width: 100%;
@@ -4856,115 +4872,123 @@ m([
4856
4872
  g({ type: String })
4857
4873
  ], p.prototype, "tab", 2);
4858
4874
  m([
4859
- h()
4875
+ d()
4860
4876
  ], p.prototype, "active", 2);
4861
4877
  m([
4862
- h()
4878
+ d()
4863
4879
  ], p.prototype, "busy", 2);
4864
4880
  m([
4865
- h()
4881
+ d()
4866
4882
  ], p.prototype, "notice", 2);
4867
4883
  m([
4868
- h()
4884
+ d()
4869
4885
  ], p.prototype, "errors", 2);
4870
4886
  m([
4871
- h()
4887
+ d()
4872
4888
  ], p.prototype, "nameInput", 2);
4873
4889
  m([
4874
- h()
4890
+ d()
4875
4891
  ], p.prototype, "emailInput", 2);
4876
4892
  m([
4877
- h()
4893
+ d()
4878
4894
  ], p.prototype, "emailPassword", 2);
4879
4895
  m([
4880
- h()
4896
+ d()
4881
4897
  ], p.prototype, "phoneInput", 2);
4882
4898
  m([
4883
- h()
4899
+ d()
4884
4900
  ], p.prototype, "phonePassword", 2);
4885
4901
  m([
4886
- h()
4902
+ d()
4887
4903
  ], p.prototype, "phoneCode", 2);
4888
4904
  m([
4889
- h()
4905
+ d()
4890
4906
  ], p.prototype, "phoneCodeSent", 2);
4891
4907
  m([
4892
- h()
4908
+ d()
4893
4909
  ], p.prototype, "guestName", 2);
4894
4910
  m([
4895
- h()
4911
+ d()
4896
4912
  ], p.prototype, "oldPassword", 2);
4897
4913
  m([
4898
- h()
4914
+ d()
4899
4915
  ], p.prototype, "newPassword", 2);
4900
4916
  m([
4901
- h()
4917
+ d()
4902
4918
  ], p.prototype, "newPasswordConfirm", 2);
4903
4919
  m([
4904
- h()
4920
+ d()
4905
4921
  ], p.prototype, "authenticator", 2);
4906
4922
  m([
4907
- h()
4923
+ d()
4908
4924
  ], p.prototype, "authenticatorCode", 2);
4909
4925
  m([
4910
- h()
4926
+ d()
4911
4927
  ], p.prototype, "factors", 2);
4912
4928
  m([
4913
- h()
4929
+ d()
4914
4930
  ], p.prototype, "recoveryCodes", 2);
4915
4931
  m([
4916
- h()
4932
+ d()
4917
4933
  ], p.prototype, "stepUp", 2);
4918
4934
  m([
4919
- h()
4935
+ d()
4920
4936
  ], p.prototype, "stepUpCode", 2);
4921
4937
  m([
4922
- h()
4938
+ d()
4923
4939
  ], p.prototype, "copied", 2);
4924
4940
  m([
4925
- h()
4941
+ d()
4926
4942
  ], p.prototype, "sessions", 2);
4927
4943
  m([
4928
- h()
4944
+ d()
4929
4945
  ], p.prototype, "identities", 2);
4930
4946
  m([
4931
- h()
4947
+ d()
4932
4948
  ], p.prototype, "logs", 2);
4933
4949
  m([
4934
- h()
4950
+ d()
4935
4951
  ], p.prototype, "logsSupported", 2);
4936
4952
  m([
4937
- h()
4953
+ d()
4938
4954
  ], p.prototype, "confirmDelete", 2);
4939
4955
  m([
4940
- h()
4956
+ d()
4941
4957
  ], p.prototype, "confirmRegenerate", 2);
4942
4958
  m([
4943
- h()
4959
+ d()
4944
4960
  ], p.prototype, "confirmRemoveAuthenticator", 2);
4945
4961
  m([
4946
- h()
4962
+ d()
4947
4963
  ], p.prototype, "confirmSignOutAll", 2);
4948
4964
  m([
4949
- h()
4965
+ d()
4950
4966
  ], p.prototype, "confirmDisconnectId", 2);
4951
4967
  m([
4952
- h()
4968
+ d()
4953
4969
  ], p.prototype, "verifyEmailCooldownUntil", 2);
4954
4970
  p = m([
4955
- O("authui-account")
4971
+ R("authui-account")
4956
4972
  ], p);
4957
- var Zt = Object.defineProperty, Xt = Object.getOwnPropertyDescriptor, L = (e, t, i, s) => {
4958
- for (var a = s > 1 ? void 0 : s ? Xt(t, i) : t, l = e.length - 1, u; l >= 0; l--)
4959
- (u = e[l]) && (a = (s ? u(t, i, a) : u(a)) || a);
4960
- return s && a && Zt(t, i, a), a;
4973
+ var Xt = Object.defineProperty, Qt = Object.getOwnPropertyDescriptor, F = (e, t, i, s) => {
4974
+ for (var a = s > 1 ? void 0 : s ? Qt(t, i) : t, c = e.length - 1, u; c >= 0; c--)
4975
+ (u = e[c]) && (a = (s ? u(t, i, a) : u(a)) || a);
4976
+ return s && a && Xt(t, i, a), a;
4961
4977
  };
4962
- let M = class extends P {
4978
+ let P = class extends E {
4963
4979
  constructor() {
4964
- super(...arguments), this.open = !1, this.view = "sign-in", this.closeOnSuccess = !0, this.handledPending = null, this.onOpenEvent = (e) => {
4980
+ super(...arguments), this.open = !1, this.view = "sign-in", this.closeOnSuccess = !0, this.handledPending = null, this.scrollCue = !1, this.bodyResizeObserver = null, this.onOpenEvent = (e) => {
4965
4981
  const t = e.detail ?? {};
4966
4982
  this.show(t.view);
4967
- }, this.onCloseEvent = () => this.hide(), this.onSuccess = () => {
4983
+ }, this.onCloseEvent = () => this.hide(), this.syncScrollCue = () => {
4984
+ const e = this.bodyEl;
4985
+ if (!e) {
4986
+ this.scrollCue = !1;
4987
+ return;
4988
+ }
4989
+ const t = e.scrollHeight > e.clientHeight + 1, i = e.scrollTop + e.clientHeight >= e.scrollHeight - 4, s = t && !i;
4990
+ s !== this.scrollCue && (this.scrollCue = s);
4991
+ }, this.onSuccess = () => {
4968
4992
  this.fire("authui-signed-in", this.auth.user), this.closeOnSuccess && !this.config?.successUrl && this.hide();
4969
4993
  }, this.onInnerOpen = (e) => {
4970
4994
  const t = e.detail?.view;
@@ -4977,7 +5001,7 @@ let M = class extends P {
4977
5001
  super.connectedCallback(), window.addEventListener("authui:open", this.onOpenEvent), window.addEventListener("authui:close", this.onCloseEvent);
4978
5002
  }
4979
5003
  disconnectedCallback() {
4980
- super.disconnectedCallback(), window.removeEventListener("authui:open", this.onOpenEvent), window.removeEventListener("authui:close", this.onCloseEvent);
5004
+ super.disconnectedCallback(), window.removeEventListener("authui:open", this.onOpenEvent), window.removeEventListener("authui:close", this.onCloseEvent), this.bodyResizeObserver?.disconnect(), this.bodyResizeObserver = null;
4981
5005
  }
4982
5006
  show(e) {
4983
5007
  e === "account" && this.auth.status !== "signed-in" ? this.view = "sign-in" : e ? this.view = e : this.auth.status === "signed-in" ? this.view = "account" : this.view = "sign-in", this.open = !0;
@@ -4985,11 +5009,23 @@ let M = class extends P {
4985
5009
  hide() {
4986
5010
  this.open = !1;
4987
5011
  }
5012
+ observeBody() {
5013
+ this.bodyResizeObserver?.disconnect(), this.bodyResizeObserver = null;
5014
+ const e = this.bodyEl;
5015
+ if (!e || typeof ResizeObserver > "u") {
5016
+ this.syncScrollCue();
5017
+ return;
5018
+ }
5019
+ this.bodyResizeObserver = new ResizeObserver(() => this.syncScrollCue()), this.bodyResizeObserver.observe(e), e.firstElementChild && this.bodyResizeObserver.observe(e.firstElementChild), this.syncScrollCue();
5020
+ }
4988
5021
  updated(e) {
4989
- if (e.has("open") && this.dialog && (this.open && !this.dialog.open && (this.dialog.showModal(), requestAnimationFrame(() => this.focusPrimary())), !this.open && this.dialog.open && this.dialog.close()), e.has("auth")) {
5022
+ if (e.has("open") && this.dialog && (this.open && !this.dialog.open && (this.dialog.showModal(), requestAnimationFrame(() => {
5023
+ this.focusPrimary(), this.observeBody();
5024
+ })), !this.open && this.dialog.open && this.dialog.close(), this.open || (this.scrollCue = !1, this.bodyResizeObserver?.disconnect(), this.bodyResizeObserver = null)), e.has("auth")) {
4990
5025
  const t = this.auth.pending;
4991
5026
  t && t !== this.handledPending && t.type !== "notice" && (this.handledPending = t, this.view = "sign-in", this.open = !0), t?.type === "notice" && t !== this.handledPending && (this.handledPending = t, this.open = !0), this.open && this.view === "account" && this.auth.status !== "signed-in" && (this.view = "sign-in"), this.open && this.auth.status === "signed-out" && this.view === "account" && (this.view = "sign-in");
4992
5027
  }
5028
+ this.open && (e.has("view") || e.has("auth") || e.has("open")) && requestAnimationFrame(() => this.observeBody());
4993
5029
  }
4994
5030
  focusPrimary() {
4995
5031
  const e = this.dialog;
@@ -5013,26 +5049,31 @@ let M = class extends P {
5013
5049
  @authui-open=${this.onInnerOpen}
5014
5050
  @authui-success=${this.onSuccess}
5015
5051
  >
5016
- <div class="body">
5017
- <button
5018
- class="btn btn-ghost btn-icon close"
5019
- @click=${this.hide}
5020
- aria-label=${this.t("close")}
5021
- >
5022
- ${c.x}
5023
- </button>
5024
- ${this.open ? t ? r`<authui-account embedded></authui-account>` : r`<authui-sign-in
5025
- embedded
5026
- .view=${this.view === "account" ? "sign-in" : this.view}
5027
- ></authui-sign-in>` : o}
5052
+ <div class="frame">
5053
+ <div class="chrome">
5054
+ <button
5055
+ class="btn btn-ghost btn-icon close"
5056
+ @click=${this.hide}
5057
+ aria-label=${this.t("close")}
5058
+ >
5059
+ ${l.x}
5060
+ </button>
5061
+ </div>
5062
+ <div class="body" @scroll=${this.syncScrollCue}>
5063
+ ${this.open ? t ? r`<authui-account embedded></authui-account>` : r`<authui-sign-in
5064
+ embedded
5065
+ .view=${this.view === "account" ? "sign-in" : this.view}
5066
+ ></authui-sign-in>` : o}
5067
+ </div>
5068
+ <div class="scroll-fade ${this.scrollCue ? "show" : ""}" aria-hidden="true"></div>
5028
5069
  </div>
5029
5070
  </dialog>
5030
5071
  `;
5031
5072
  }
5032
5073
  };
5033
- M.styles = [
5034
- ...P.styles,
5035
- F`
5074
+ P.styles = [
5075
+ ...E.styles,
5076
+ O`
5036
5077
  :host {
5037
5078
  display: contents;
5038
5079
  }
@@ -5069,15 +5110,29 @@ M.styles = [
5069
5110
  transform: none;
5070
5111
  }
5071
5112
  }
5072
- .body {
5073
- padding: 24px;
5113
+ .frame {
5114
+ display: flex;
5115
+ flex-direction: column;
5074
5116
  max-height: calc(100dvh - 2rem);
5117
+ min-height: 0;
5118
+ position: relative;
5119
+ }
5120
+ .chrome {
5121
+ flex-shrink: 0;
5122
+ display: flex;
5123
+ justify-content: flex-end;
5124
+ align-items: center;
5125
+ padding: 8px 8px 0;
5126
+ background: var(--authui-background);
5127
+ }
5128
+ .body {
5129
+ padding: 4px 24px 28px;
5075
5130
  overflow-y: auto;
5131
+ flex: 1 1 auto;
5132
+ min-height: 0;
5133
+ -webkit-overflow-scrolling: touch;
5076
5134
  }
5077
5135
  .close {
5078
- position: absolute;
5079
- top: 12px;
5080
- inset-inline-end: 12px;
5081
5136
  width: 32px;
5082
5137
  height: 32px;
5083
5138
  border-radius: var(--authui-radius-sm);
@@ -5086,36 +5141,56 @@ M.styles = [
5086
5141
  .close:hover {
5087
5142
  opacity: 1;
5088
5143
  }
5144
+ .scroll-fade {
5145
+ pointer-events: none;
5146
+ position: absolute;
5147
+ inset-inline: 0;
5148
+ bottom: 0;
5149
+ height: 40px;
5150
+ border-radius: 0 0 var(--authui-radius-lg) var(--authui-radius-lg);
5151
+ background: linear-gradient(to top, var(--authui-background), transparent);
5152
+ opacity: 0;
5153
+ transition: opacity 150ms;
5154
+ }
5155
+ .scroll-fade.show {
5156
+ opacity: 1;
5157
+ }
5089
5158
  authui-sign-in,
5090
5159
  authui-account {
5091
5160
  max-width: none;
5092
5161
  }
5093
5162
  `
5094
5163
  ];
5095
- L([
5164
+ F([
5096
5165
  g({ type: Boolean, reflect: !0 })
5097
- ], M.prototype, "open", 2);
5098
- L([
5166
+ ], P.prototype, "open", 2);
5167
+ F([
5099
5168
  g({ type: String })
5100
- ], M.prototype, "view", 2);
5101
- L([
5169
+ ], P.prototype, "view", 2);
5170
+ F([
5102
5171
  g({ type: Boolean, attribute: "close-on-success" })
5103
- ], M.prototype, "closeOnSuccess", 2);
5104
- L([
5105
- h()
5106
- ], M.prototype, "handledPending", 2);
5107
- L([
5108
- bt("dialog")
5109
- ], M.prototype, "dialog", 2);
5110
- M = L([
5111
- O("authui-modal")
5112
- ], M);
5113
- var Qt = Object.defineProperty, Jt = Object.getOwnPropertyDescriptor, X = (e, t, i, s) => {
5114
- for (var a = s > 1 ? void 0 : s ? Jt(t, i) : t, l = e.length - 1, u; l >= 0; l--)
5115
- (u = e[l]) && (a = (s ? u(t, i, a) : u(a)) || a);
5116
- return s && a && Qt(t, i, a), a;
5172
+ ], P.prototype, "closeOnSuccess", 2);
5173
+ F([
5174
+ d()
5175
+ ], P.prototype, "handledPending", 2);
5176
+ F([
5177
+ d()
5178
+ ], P.prototype, "scrollCue", 2);
5179
+ F([
5180
+ st("dialog")
5181
+ ], P.prototype, "dialog", 2);
5182
+ F([
5183
+ st(".body")
5184
+ ], P.prototype, "bodyEl", 2);
5185
+ P = F([
5186
+ R("authui-modal")
5187
+ ], P);
5188
+ var Jt = Object.defineProperty, te = Object.getOwnPropertyDescriptor, X = (e, t, i, s) => {
5189
+ for (var a = s > 1 ? void 0 : s ? te(t, i) : t, c = e.length - 1, u; c >= 0; c--)
5190
+ (u = e[c]) && (a = (s ? u(t, i, a) : u(a)) || a);
5191
+ return s && a && Jt(t, i, a), a;
5117
5192
  };
5118
- let z = class extends P {
5193
+ let L = class extends E {
5119
5194
  constructor() {
5120
5195
  super(...arguments), this.view = "sign-in", this.variant = "primary", this.size = "md";
5121
5196
  }
@@ -5132,9 +5207,9 @@ let z = class extends P {
5132
5207
  </button>`;
5133
5208
  }
5134
5209
  };
5135
- z.styles = [
5136
- ...P.styles,
5137
- F`
5210
+ L.styles = [
5211
+ ...E.styles,
5212
+ O`
5138
5213
  :host {
5139
5214
  display: inline-block;
5140
5215
  }
@@ -5145,24 +5220,26 @@ z.styles = [
5145
5220
  ];
5146
5221
  X([
5147
5222
  g({ type: String })
5148
- ], z.prototype, "view", 2);
5223
+ ], L.prototype, "view", 2);
5149
5224
  X([
5150
5225
  g({ type: String })
5151
- ], z.prototype, "variant", 2);
5226
+ ], L.prototype, "variant", 2);
5152
5227
  X([
5153
5228
  g({ type: String })
5154
- ], z.prototype, "size", 2);
5155
- z = X([
5156
- O("authui-button")
5157
- ], z);
5158
- var te = Object.defineProperty, ee = Object.getOwnPropertyDescriptor, _ = (e, t, i, s) => {
5159
- for (var a = s > 1 ? void 0 : s ? ee(t, i) : t, l = e.length - 1, u; l >= 0; l--)
5160
- (u = e[l]) && (a = (s ? u(t, i, a) : u(a)) || a);
5161
- return s && a && te(t, i, a), a;
5229
+ ], L.prototype, "size", 2);
5230
+ L = X([
5231
+ R("authui-button")
5232
+ ], L);
5233
+ var ee = Object.defineProperty, ie = Object.getOwnPropertyDescriptor, T = (e, t, i, s) => {
5234
+ for (var a = s > 1 ? void 0 : s ? ie(t, i) : t, c = e.length - 1, u; c >= 0; c--)
5235
+ (u = e[c]) && (a = (s ? u(t, i, a) : u(a)) || a);
5236
+ return s && a && ee(t, i, a), a;
5162
5237
  };
5163
- let E = class extends P {
5238
+ let I = class extends E {
5164
5239
  constructor() {
5165
- super(...arguments), this.showTeams = !1, this.src = "", this.menuOpen = !1, this.teams = [], this.teamsLoading = !1, this.activeTeamId = null, this.onDocumentClick = (e) => {
5240
+ super(...arguments), this.showTeams = !1, this.src = "", this.menuOpen = !1, this.menuAbove = !1, this.teams = [], this.teamsLoading = !1, this.activeTeamId = null, this.onReposition = () => {
5241
+ this.menuOpen && this.placeMenu();
5242
+ }, this.onDocumentClick = (e) => {
5166
5243
  e.composedPath().includes(this) || (this.menuOpen = !1);
5167
5244
  }, this.onKeydown = (e) => {
5168
5245
  if (!this.menuOpen) {
@@ -5192,10 +5269,21 @@ let E = class extends P {
5192
5269
  };
5193
5270
  }
5194
5271
  connectedCallback() {
5195
- super.connectedCallback(), document.addEventListener("click", this.onDocumentClick, !0), document.addEventListener("keydown", this.onKeydown), this.addEventListener("keydown", this.onKeydown);
5272
+ super.connectedCallback(), document.addEventListener("click", this.onDocumentClick, !0), document.addEventListener("keydown", this.onKeydown), this.addEventListener("keydown", this.onKeydown), window.addEventListener("resize", this.onReposition), window.addEventListener("scroll", this.onReposition, !0);
5196
5273
  }
5197
5274
  disconnectedCallback() {
5198
- super.disconnectedCallback(), document.removeEventListener("click", this.onDocumentClick, !0), document.removeEventListener("keydown", this.onKeydown), this.removeEventListener("keydown", this.onKeydown);
5275
+ super.disconnectedCallback(), document.removeEventListener("click", this.onDocumentClick, !0), document.removeEventListener("keydown", this.onKeydown), this.removeEventListener("keydown", this.onKeydown), window.removeEventListener("resize", this.onReposition), window.removeEventListener("scroll", this.onReposition, !0);
5276
+ }
5277
+ /** Flip the menu above the trigger when there is not enough space below. */
5278
+ placeMenu() {
5279
+ const e = this.renderRoot?.querySelector(".trigger"), t = this.renderRoot?.querySelector(".menu");
5280
+ if (!e || !t) return;
5281
+ const i = e.getBoundingClientRect(), s = 6, a = 8;
5282
+ t.style.maxHeight = "";
5283
+ const c = t.offsetHeight + s, u = window.innerHeight - i.bottom, $ = i.top, x = u < c && $ > u;
5284
+ x !== this.menuAbove && (this.menuAbove = x);
5285
+ const ot = Math.max(80, (x ? $ : u) - s - a);
5286
+ t.style.maxHeight = `${ot}px`;
5199
5287
  }
5200
5288
  focusMenuItem(e) {
5201
5289
  [
@@ -5203,7 +5291,9 @@ let E = class extends P {
5203
5291
  ][e]?.focus();
5204
5292
  }
5205
5293
  updated(e) {
5206
- e.has("menuOpen") && this.menuOpen && (this.showTeams && this.loadTeams(), requestAnimationFrame(() => this.focusMenuItem(0)));
5294
+ e.has("menuOpen") && (this.menuOpen ? (this.showTeams && this.loadTeams(), requestAnimationFrame(() => {
5295
+ this.placeMenu(), this.focusMenuItem(0);
5296
+ })) : this.menuAbove = !1), this.menuOpen && (e.has("teams") || e.has("teamsLoading")) && requestAnimationFrame(() => this.placeMenu());
5207
5297
  }
5208
5298
  async loadTeams() {
5209
5299
  this.teamsLoading = !0, this.activeTeamId = n.getActiveTeamId();
@@ -5233,10 +5323,10 @@ let E = class extends P {
5233
5323
  aria-label=${s}
5234
5324
  >
5235
5325
  <span class="avatar"
5236
- >${this.src ? r`<img src=${this.src} alt="" />` : at(s)}</span
5326
+ >${this.src ? r`<img src=${this.src} alt="" />` : nt(s)}</span
5237
5327
  >
5238
5328
  </button>
5239
- ${this.menuOpen ? r`<div class="menu" role="menu">
5329
+ ${this.menuOpen ? r`<div class="menu ${this.menuAbove ? "above" : ""}" role="menu">
5240
5330
  <div class="menu-header">
5241
5331
  <span class="row-title" title=${s}>${s}</span>
5242
5332
  ${t.email && t.name ? r`<span class="row-sub" title=${t.email}>${t.email}</span>` : o}
@@ -5252,9 +5342,9 @@ let E = class extends P {
5252
5342
  aria-checked=${a.$id === this.activeTeamId ? "true" : "false"}
5253
5343
  @click=${() => this.selectTeam(a)}
5254
5344
  >
5255
- ${c.users}
5345
+ ${l.users}
5256
5346
  <span title=${a.name}>${a.name}</span>
5257
- ${a.$id === this.activeTeamId ? r`<span class="check">${c.check}</span>` : o}
5347
+ ${a.$id === this.activeTeamId ? r`<span class="check">${l.check}</span>` : o}
5258
5348
  </button>`
5259
5349
  )}
5260
5350
  </div>` : o}
@@ -5265,7 +5355,7 @@ let E = class extends P {
5265
5355
  this.menuOpen = !1, Y("account");
5266
5356
  }}
5267
5357
  >
5268
- ${c.settings} ${this.t("manageAccount")}
5358
+ ${l.settings} ${this.t("manageAccount")}
5269
5359
  </button>
5270
5360
  <button
5271
5361
  class="menu-item"
@@ -5274,15 +5364,15 @@ let E = class extends P {
5274
5364
  this.menuOpen = !1, n.signOut();
5275
5365
  }}
5276
5366
  >
5277
- ${c.logOut} ${this.t("signOut")}
5367
+ ${l.logOut} ${this.t("signOut")}
5278
5368
  </button>
5279
5369
  </div>` : o}
5280
5370
  `;
5281
5371
  }
5282
5372
  };
5283
- E.styles = [
5284
- ...P.styles,
5285
- F`
5373
+ I.styles = [
5374
+ ...E.styles,
5375
+ O`
5286
5376
  :host {
5287
5377
  display: inline-block;
5288
5378
  position: relative;
@@ -5307,9 +5397,12 @@ E.styles = [
5307
5397
  .menu {
5308
5398
  position: absolute;
5309
5399
  top: calc(100% + 6px);
5400
+ bottom: auto;
5310
5401
  inset-inline-end: 0;
5311
5402
  min-width: 220px;
5312
5403
  max-width: min(320px, 90vw);
5404
+ max-height: min(360px, calc(100dvh - 16px));
5405
+ overflow-y: auto;
5313
5406
  background: var(--authui-popover);
5314
5407
  color: var(--authui-popover-foreground);
5315
5408
  border: 1px solid var(--authui-border);
@@ -5321,6 +5414,10 @@ E.styles = [
5321
5414
  flex-direction: column;
5322
5415
  gap: 2px;
5323
5416
  }
5417
+ .menu.above {
5418
+ top: auto;
5419
+ bottom: calc(100% + 6px);
5420
+ }
5324
5421
  .menu-header {
5325
5422
  min-width: 0;
5326
5423
  overflow: hidden;
@@ -5391,56 +5488,59 @@ E.styles = [
5391
5488
  }
5392
5489
  `
5393
5490
  ];
5394
- _([
5491
+ T([
5395
5492
  g({ type: Boolean, attribute: "show-teams" })
5396
- ], E.prototype, "showTeams", 2);
5397
- _([
5493
+ ], I.prototype, "showTeams", 2);
5494
+ T([
5398
5495
  g({ type: String })
5399
- ], E.prototype, "src", 2);
5400
- _([
5401
- h()
5402
- ], E.prototype, "menuOpen", 2);
5403
- _([
5404
- h()
5405
- ], E.prototype, "teams", 2);
5406
- _([
5407
- h()
5408
- ], E.prototype, "teamsLoading", 2);
5409
- _([
5410
- h()
5411
- ], E.prototype, "activeTeamId", 2);
5412
- E = _([
5413
- O("authui-user-button")
5414
- ], E);
5496
+ ], I.prototype, "src", 2);
5497
+ T([
5498
+ d()
5499
+ ], I.prototype, "menuOpen", 2);
5500
+ T([
5501
+ d()
5502
+ ], I.prototype, "menuAbove", 2);
5503
+ T([
5504
+ d()
5505
+ ], I.prototype, "teams", 2);
5506
+ T([
5507
+ d()
5508
+ ], I.prototype, "teamsLoading", 2);
5509
+ T([
5510
+ d()
5511
+ ], I.prototype, "activeTeamId", 2);
5512
+ I = T([
5513
+ R("authui-user-button")
5514
+ ], I);
5415
5515
  export {
5416
5516
  Ft as A,
5417
5517
  oe as C,
5418
5518
  f as E,
5419
- gt as F,
5420
- Pt as P,
5519
+ bt as F,
5520
+ It as P,
5421
5521
  n as a,
5422
5522
  p as b,
5423
- ce as c,
5424
- z as d,
5523
+ le as c,
5524
+ L as d,
5425
5525
  b as e,
5426
- P as f,
5427
- M as g,
5526
+ E as f,
5527
+ P as g,
5428
5528
  B as h,
5429
- $ as i,
5430
- E as j,
5529
+ k as i,
5530
+ I as j,
5431
5531
  ne as k,
5432
- ht as l,
5433
- kt as m,
5532
+ pt as l,
5533
+ Ct as m,
5434
5534
  K as n,
5435
5535
  Y as o,
5436
5536
  D as p,
5437
- dt as q,
5537
+ ut as q,
5438
5538
  Ut as r,
5439
5539
  q as s,
5440
5540
  V as t,
5441
- yt as u,
5541
+ wt as u,
5442
5542
  it as v,
5443
- Et as w,
5444
- Mt as x,
5445
- R as y
5543
+ Mt as w,
5544
+ Ot as x,
5545
+ z as y
5446
5546
  };