@vuetify/one 2.6.5 → 2.6.6

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,12 +1,12 @@
1
- import { defineStore as $ } from "pinia";
2
- import { ref as E, reactive as z, watch as A, toRefs as V, computed as f, shallowRef as U, nextTick as M } from "vue";
3
- import { merge as F } from "lodash-es";
4
- import { useRoute as X, useRouter as H } from "vue-router";
5
- const _ = $("queue", () => {
6
- const e = E([]);
1
+ import { merge as O } from "lodash-es";
2
+ import { defineStore as L } from "pinia";
3
+ import { ref as T, reactive as z, watch as I, toRefs as M, computed as m, shallowRef as U, nextTick as X } from "vue";
4
+ import { useRoute as Y, useRouter as J } from "vue-router";
5
+ const _ = L("queue", () => {
6
+ const e = T([]);
7
7
  function s(o) {
8
- const u = typeof o == "string" ? { text: o } : o;
9
- e.value.push(u);
8
+ const c = typeof o == "string" ? { text: o } : o;
9
+ e.value.push(c);
10
10
  }
11
11
  function t(o) {
12
12
  s({
@@ -21,55 +21,14 @@ const _ = $("queue", () => {
21
21
  show: s,
22
22
  showError: t
23
23
  };
24
- }), C = $("http", {
25
- state: () => ({
26
- url: ""
27
- }),
28
- actions: {
29
- async fetch(e, s = {}) {
30
- const t = await fetch(`${this.url}${e}`, {
31
- credentials: "include",
32
- ...s
33
- });
34
- if (!t.ok)
35
- throw new Error(await t.text());
36
- return t.status === 204 ? {} : t.json();
37
- },
38
- async post(e, s, t = {}) {
39
- return this.fetch(e, {
40
- method: "POST",
41
- headers: {
42
- "Content-Type": "application/json"
43
- },
44
- body: JSON.stringify(s),
45
- ...t
46
- });
47
- },
48
- async form(e, s, t = {}) {
49
- return this.fetch(e, {
50
- method: "POST",
51
- body: s,
52
- ...t
53
- });
54
- },
55
- async get(e, s = {}) {
56
- return this.fetch(e, s);
57
- },
58
- async delete(e, s = {}) {
59
- return this.fetch(e, {
60
- method: "DELETE",
61
- ...s
62
- });
63
- }
64
- }
65
- }), Y = [
24
+ }), G = [
66
25
  (e) => (e.v || (e.pwaRefresh = !0, typeof e.api == "boolean" && (e.api = e.api ? "inline" : "link-only"), typeof e.rtl == "boolean" && (e.direction = e.rtl ? "rtl" : "ltr", delete e.rtl), typeof e.theme == "object" && (e.mixedTheme = e.theme.mixed, e.theme = e.theme.system ? "system" : e.theme.dark ? "dark" : "light"), Array.isArray(e.notifications) && (e.notifications = { read: e.notifications }), typeof e.last == "object" && (e.notifications = e.notifications || {}, e.notifications.last = e.last, delete e.last), e.v = 1), e),
67
26
  (e) => (e.v === 1 && (Array.isArray(e.composition) && (e.composition = "composition"), Array.isArray(e.notifications?.last?.banner) || (e.notifications = e.notifications || {}, e.notifications.last = e.notifications.last || {}, e.notifications.last.banner = []), e.v = 2), e),
68
27
  (e) => (e.v === 2 && (e.syncSettings = !0, e.disableAds = !1, e.v = 3), e),
69
28
  (e) => (e.v === 3 && (e.quickbar = !1, e.v = 4), e),
70
29
  (e) => (e.v === 4 && (e.suits = { show: !1, elements: ["app-bar"], suit: "" }, e.notifications = e.notifications || {}, e.notifications.banners = !0, e.v = 5), e)
71
30
  ];
72
- function G(e) {
31
+ function K(e) {
73
32
  return {
74
33
  version: 6,
75
34
  ecosystem: {
@@ -128,12 +87,24 @@ function G(e) {
128
87
  }
129
88
  };
130
89
  }
131
- function K(e) {
132
- const s = Y.reduce((t, o) => o(t), e);
133
- return G(s);
90
+ function F(e) {
91
+ return {
92
+ ...e,
93
+ version: 7,
94
+ ecosystem: {
95
+ ...e.ecosystem,
96
+ mcp: {
97
+ seen: !1
98
+ }
99
+ }
100
+ };
101
+ }
102
+ function Z(e) {
103
+ const s = G.reduce((o, c) => c(o), e), t = K(s);
104
+ return F(t);
134
105
  }
135
- const W = typeof window < "u", P = {
136
- version: 6,
106
+ const W = typeof window < "u", E = {
107
+ version: 7,
137
108
  ecosystem: {
138
109
  bin: {
139
110
  wordWrap: !1
@@ -155,6 +126,9 @@ const W = typeof window < "u", P = {
155
126
  favorites: [],
156
127
  slashSearch: !1,
157
128
  railDrawer: !1
129
+ },
130
+ mcp: {
131
+ seen: !1
158
132
  }
159
133
  },
160
134
  one: {
@@ -188,26 +162,33 @@ const W = typeof window < "u", P = {
188
162
  sync: !0,
189
163
  devmode: !1
190
164
  }
191
- }, Z = $("user", () => {
192
- const e = z(structuredClone(P));
193
- A(e, t, { deep: !0 });
165
+ }, D = L("user", () => {
166
+ const e = z(structuredClone(E));
167
+ I(e, t, { deep: !0 });
194
168
  function s() {
195
169
  if (!W)
196
170
  return;
197
- const u = localStorage.getItem("vuetify@user");
198
- if (u)
171
+ const c = localStorage.getItem("vuetify@user");
172
+ if (c)
199
173
  try {
200
- const n = JSON.parse(u);
201
- if (n.version >= 6) {
202
- const c = {
203
- version: 6,
204
- ecosystem: F(P.ecosystem, n.ecosystem || {}),
205
- one: F(P.one, n.one || {})
174
+ const n = JSON.parse(c);
175
+ if (n.version >= 7) {
176
+ const a = {
177
+ version: 7,
178
+ ecosystem: O(structuredClone(E.ecosystem), n.ecosystem || {}),
179
+ one: O(structuredClone(E.one), n.one || {})
180
+ };
181
+ Object.assign(e, a);
182
+ } else if (n.version === 6) {
183
+ const a = F(n), d = {
184
+ version: 7,
185
+ ecosystem: O(structuredClone(E.ecosystem), a.ecosystem || {}),
186
+ one: O(structuredClone(E.one), a.one || {})
206
187
  };
207
- Object.assign(e, c);
188
+ Object.assign(e, d);
208
189
  } else {
209
- const c = K(n);
210
- Object.assign(e, c);
190
+ const a = Z(n);
191
+ Object.assign(e, a);
211
192
  }
212
193
  t();
213
194
  } catch (n) {
@@ -218,45 +199,86 @@ const W = typeof window < "u", P = {
218
199
  W && localStorage.setItem("vuetify@user", JSON.stringify(e, null, 2));
219
200
  }
220
201
  function o() {
221
- W && (Object.assign(e, structuredClone(P)), t());
202
+ W && (Object.assign(e, structuredClone(E)), t());
222
203
  }
223
204
  return s(), {
224
- ...V(e),
205
+ ...M(e),
225
206
  load: s,
226
207
  save: t,
227
208
  reset: o
228
209
  };
210
+ }), H = L("http", {
211
+ state: () => ({
212
+ url: ""
213
+ }),
214
+ actions: {
215
+ async fetch(e, s = {}) {
216
+ const t = await fetch(`${this.url}${e}`, {
217
+ credentials: "include",
218
+ ...s
219
+ });
220
+ if (!t.ok)
221
+ throw new Error(await t.text());
222
+ return t.status === 204 ? {} : t.json();
223
+ },
224
+ async post(e, s, t = {}) {
225
+ return this.fetch(e, {
226
+ method: "POST",
227
+ headers: {
228
+ "Content-Type": "application/json"
229
+ },
230
+ body: JSON.stringify(s),
231
+ ...t
232
+ });
233
+ },
234
+ async form(e, s, t = {}) {
235
+ return this.fetch(e, {
236
+ method: "POST",
237
+ body: s,
238
+ ...t
239
+ });
240
+ },
241
+ async get(e, s = {}) {
242
+ return this.fetch(e, s);
243
+ },
244
+ async delete(e, s = {}) {
245
+ return this.fetch(e, {
246
+ method: "DELETE",
247
+ ...s
248
+ });
249
+ }
250
+ }
229
251
  });
230
- function J() {
231
- const e = X();
232
- return f(
252
+ function Q() {
253
+ const e = Y();
254
+ return m(
233
255
  () => e.query
234
256
  );
235
257
  }
236
- const Q = $("one", () => {
237
- const e = J(), s = H(), t = B(), o = C(), u = _(), n = U(!1), c = U(!1), d = E(null), y = E([]), g = f(() => e.value.session_id), T = f(() => d.value?.items[0].plan.interval), p = f(() => d.value?.items[0].plan.type), I = E([]), h = f(() => t.user?.sponsorships.find((r) => r.platform === "stripe" && r.tierName.startsWith("sub_"))), q = f(() => !!h.value?.tierName), a = f(() => t.user?.sponsorships.reduce((r, m) => {
238
- if (!m.isActive || m.interval === "once")
258
+ const V = L("one", () => {
259
+ const e = Q(), s = J(), t = B(), o = H(), c = _(), n = U(!1), a = U(!1), d = T(null), v = T([]), g = m(() => e.value.session_id), A = m(() => d.value?.items[0].plan.interval), h = m(() => d.value?.items[0].plan.type), k = T([]), y = m(() => t.user?.sponsorships.find((r) => r.platform === "stripe" && r.tierName.startsWith("sub_"))), R = m(() => !!y.value?.tierName), u = m(() => t.user?.sponsorships.reduce((r, p) => {
260
+ if (!p.isActive || p.interval === "once")
239
261
  return r;
240
- const b = m.interval === "month" ? m.amount : m.amount / 12;
262
+ const b = p.interval === "month" ? p.amount : p.amount / 12;
241
263
  return r + b / 100;
242
- }, 0) ?? 0), i = f(() => t.user?.sponsorships.find((r) => r.tierName.startsWith("sub_") && r.isActive)), l = f(() => t.user?.sponsorships.find((r) => r.platform === "github" && r.isActive)), v = f(() => t.user?.sponsorships.find((r) => r.platform === "discord" && r.isActive)), L = f(() => t.user?.identities.find((r) => r.provider === "shopify")), N = f(() => !o.url || t.user?.isAdmin || h.value?.isActive || I.value.some((r) => ["one", "one/team"].includes(r)));
243
- A(c, w), A(g, async (r) => {
244
- r && await O();
245
- }, { immediate: !0 }), A(e, (r) => {
264
+ }, 0) ?? 0), i = m(() => t.user?.sponsorships.find((r) => r.tierName.startsWith("sub_") && r.isActive)), f = m(() => t.user?.sponsorships.find((r) => r.platform === "github" && r.isActive)), l = m(() => t.user?.sponsorships.find((r) => r.platform === "discord" && r.isActive)), $ = m(() => t.user?.identities.find((r) => r.provider === "shopify")), N = m(() => !o.url || t.user?.isAdmin || y.value?.isActive || k.value.some((r) => ["one", "one/team"].includes(r)));
265
+ I(a, w), I(g, async (r) => {
266
+ r && await j();
267
+ }, { immediate: !0 }), I(e, (r) => {
246
268
  if (r.one !== "subscribe" || t.user)
247
269
  return;
248
270
  t.dialog = !0;
249
- const m = A(() => t.user, (b) => {
250
- b && (t.dialog = !1, m());
271
+ const p = I(() => t.user, (b) => {
272
+ b && (t.dialog = !1, p());
251
273
  });
252
274
  }, { immediate: !0 });
253
- async function O() {
275
+ async function j() {
254
276
  try {
255
- n.value = !0, await o.post("/one/activate", { sessionId: g.value }), await t.verify(!0), await k();
256
- const r = new URL(window.location.href), m = r.searchParams;
257
- m.delete("session_id"), m.delete("team"), history.pushState(null, "", r.toString());
277
+ n.value = !0, await o.post("/one/activate", { sessionId: g.value }), await t.verify(!0), await q();
278
+ const r = new URL(window.location.href), p = r.searchParams;
279
+ p.delete("session_id"), p.delete("team"), history.pushState(null, "", r.toString());
258
280
  } catch (r) {
259
- u.showError(r?.message ?? "Error activating subscription, Please contact support");
281
+ c.showError(r?.message ?? "Error activating subscription, Please contact support");
260
282
  } finally {
261
283
  n.value = !1;
262
284
  }
@@ -264,44 +286,44 @@ const Q = $("one", () => {
264
286
  async function S() {
265
287
  window.open(`${o.url}/one/manage`, "_blank");
266
288
  }
267
- async function R(r, m) {
289
+ async function C(r, p) {
268
290
  n.value = !0;
269
291
  const b = new URL("/one/subscribe", o.url);
270
- b.searchParams.set("interval", r), b.searchParams.set("type", m), window.location.href = b.toString();
292
+ b.searchParams.set("interval", r), b.searchParams.set("type", p), window.location.href = b.toString();
271
293
  }
272
- async function j() {
273
- if (h.value)
294
+ async function x() {
295
+ if (y.value)
274
296
  try {
275
297
  n.value = !0, await o.post(
276
- `/one/cancel?subscriptionId=${h.value?.tierName}`
298
+ `/one/cancel?subscriptionId=${y.value?.tierName}`
277
299
  ), await t.verify(!0);
278
300
  } catch (r) {
279
- u.showError(r?.message ?? "Error cancelling subscription, Please contact support");
301
+ c.showError(r?.message ?? "Error cancelling subscription, Please contact support");
280
302
  } finally {
281
303
  n.value = !1;
282
304
  }
283
305
  }
284
- async function x(r, m) {
285
- if (h.value)
306
+ async function P(r, p) {
307
+ if (y.value)
286
308
  try {
287
309
  n.value = !0, await o.post("/one/modify", {
288
- subscriptionId: h.value.tierName,
310
+ subscriptionId: y.value.tierName,
289
311
  interval: r,
290
- type: m
312
+ type: p
291
313
  }), await t.verify(!0);
292
314
  } catch (b) {
293
- u.showError(b?.message ?? "Error modifying subscription");
315
+ c.showError(b?.message ?? "Error modifying subscription");
294
316
  } finally {
295
317
  n.value = !1;
296
318
  }
297
319
  }
298
- async function k() {
320
+ async function q() {
299
321
  try {
300
322
  n.value = !0;
301
323
  const r = await o.get("/one/info");
302
- return d.value = r.subscription, y.value = r.invoices, r;
324
+ return d.value = r.subscription, v.value = r.invoices, r;
303
325
  } catch (r) {
304
- u.showError(r?.message ?? "Error fetching subscription info");
326
+ c.showError(r?.message ?? "Error fetching subscription info");
305
327
  } finally {
306
328
  n.value = !1;
307
329
  }
@@ -316,207 +338,217 @@ const Q = $("one", () => {
316
338
  }
317
339
  return {
318
340
  info: d,
319
- interval: T,
320
- subscriptionType: p,
321
- access: I,
322
- invoices: y,
341
+ interval: A,
342
+ subscriptionType: h,
343
+ access: k,
344
+ invoices: v,
323
345
  sessionId: g,
324
- subscription: h,
325
- monthlyTotal: a,
326
- hasBilling: q,
346
+ subscription: y,
347
+ monthlyTotal: u,
348
+ hasBilling: R,
327
349
  isLoading: n,
328
- isOpen: c,
350
+ isOpen: a,
329
351
  isSubscriber: N,
330
- github: l,
331
- discord: v,
332
- shopify: L,
352
+ github: f,
353
+ discord: l,
354
+ shopify: $,
333
355
  one: i,
334
- activate: O,
335
- cancel: j,
356
+ activate: j,
357
+ cancel: x,
336
358
  manage: S,
337
- modify: x,
359
+ modify: P,
338
360
  resetQuery: w,
339
- subscribe: R,
340
- subscriptionInfo: k
361
+ subscribe: C,
362
+ subscriptionInfo: q
341
363
  };
342
- }), D = $("team", () => {
343
- const e = J(), s = B(), t = Q(), o = C(), u = _(), n = U(!1), c = E(null), d = E(!1), y = f(() => e.value.invite), g = f(
344
- () => c.value ? t.access?.some((a) => ["one/team", "snips/team"].includes(a)) : !1
364
+ }), ee = L("team", () => {
365
+ const e = Q(), s = B(), t = V(), o = H(), c = _(), n = U(!1), a = T(null), d = T(!1), v = m(() => e.value.invite), g = m(
366
+ () => a.value ? t.access?.some((u) => ["one/team", "snips/team"].includes(u)) : !1
345
367
  );
346
- A(y, async () => {
347
- if (y.value) {
368
+ I(v, async () => {
369
+ if (v.value) {
348
370
  s.user || (s.dialog = !0);
349
371
  try {
350
372
  n.value = !0;
351
- const a = await o.get(`/one/team/${y.value}`);
352
- c.value = a.team, d.value = !0;
353
- } catch (a) {
354
- h(), u.showError(a.message);
373
+ const u = await o.get(`/one/team/${v.value}`);
374
+ a.value = u.team, d.value = !0;
375
+ } catch (u) {
376
+ y(), c.showError(u.message);
355
377
  } finally {
356
378
  n.value = !1;
357
379
  }
358
380
  }
359
381
  }, { immediate: !0 });
360
- async function T(a) {
382
+ async function A(u) {
361
383
  try {
362
- if (n.value = !0, !c.value)
384
+ if (n.value = !0, !a.value)
363
385
  return;
364
- await o.post("/one/team/remove", { userId: a }), c.value.members = c.value.members.filter((i) => i.id !== a);
386
+ await o.post("/one/team/remove", { userId: u }), a.value.members = a.value.members.filter((i) => i.id !== u);
365
387
  } catch (i) {
366
- u.showError(i?.message ?? "Error removing user from team");
388
+ c.showError(i?.message ?? "Error removing user from team");
367
389
  } finally {
368
390
  n.value = !1;
369
391
  }
370
392
  }
371
- async function p() {
393
+ async function h() {
372
394
  try {
373
- n.value = !0, await o.post("/one/team/leave", { teamId: c.value?.id }), await s.verify(!0);
374
- } catch (a) {
375
- u.showError(a?.message ?? "Error leaving team");
395
+ n.value = !0, await o.post("/one/team/leave", { teamId: a.value?.id }), await s.verify(!0);
396
+ } catch (u) {
397
+ c.showError(u?.message ?? "Error leaving team");
376
398
  } finally {
377
399
  n.value = !1;
378
400
  }
379
401
  }
380
- async function I() {
402
+ async function k() {
381
403
  try {
382
- n.value = !0, await o.post("/one/team/join", { inviteCode: y.value }), await s.verify(!0), h();
383
- } catch (a) {
384
- u.showError(a?.message ?? "Error joining team");
404
+ n.value = !0, await o.post("/one/team/join", { inviteCode: v.value }), await s.verify(!0), y();
405
+ } catch (u) {
406
+ c.showError(u?.message ?? "Error joining team");
385
407
  } finally {
386
408
  n.value = !1;
387
409
  }
388
410
  }
389
- function h() {
411
+ function y() {
390
412
  d.value = !1;
391
- const a = new URL(window.location.href);
392
- a.searchParams.delete("invite"), window.history.replaceState({}, "", a.toString());
413
+ const u = new URL(window.location.href);
414
+ u.searchParams.delete("invite"), window.history.replaceState({}, "", u.toString());
393
415
  }
394
- const q = f(() => s.user?.id === s.user?.team?.owner.id);
416
+ const R = m(() => s.user?.id === s.user?.team?.owner.id);
395
417
  return {
396
- team: c,
418
+ team: a,
397
419
  teamInviteDialog: d,
398
- teamInviteCode: y,
420
+ teamInviteCode: v,
399
421
  hasTeamAccess: g,
400
- isTeamOwner: q,
422
+ isTeamOwner: R,
401
423
  isLoading: n,
402
- removeFromTeam: T,
403
- leaveTeam: p,
404
- joinTeam: I,
405
- clearTeamQuery: h
424
+ removeFromTeam: A,
425
+ leaveTeam: h,
426
+ joinTeam: k,
427
+ clearTeamQuery: y
406
428
  };
407
- }), B = $("auth", () => {
408
- const e = E(!1), s = E(null), t = C(), o = Z(), u = H(), n = U(!1), c = Q(), d = D(), y = _();
409
- let g = !!a();
410
- A(s, (i) => {
429
+ }), B = L("auth", () => {
430
+ const e = T(!1), s = T(null), t = H(), o = D(), c = J(), n = U(!1), a = V(), d = ee(), v = _();
431
+ let g = !!u();
432
+ I(s, (i) => {
411
433
  if (!i?.settings)
412
434
  return;
413
- const l = localStorage.getItem("vuetify@user") || "{}";
414
- JSON.stringify(i.settings, null, 2) !== l && (g = !0, Object.assign(o, i.settings));
435
+ const f = localStorage.getItem("vuetify@user") || "{}";
436
+ if (JSON.stringify(i.settings, null, 2) === f)
437
+ return;
438
+ g = !0;
439
+ let l = i.settings;
440
+ l.version === 6 && (l = F(l));
441
+ const $ = {
442
+ version: 7,
443
+ ecosystem: O(structuredClone(E.ecosystem), l.ecosystem || {}),
444
+ one: O(structuredClone(E.one), l.one || {})
445
+ };
446
+ Object.assign(o, $);
415
447
  }), o.$subscribe(() => {
416
- g || T(), g = !1;
448
+ g || A(), g = !1;
417
449
  });
418
- async function T() {
419
- if (await M(), !(!s.value || !o.one.sync))
450
+ async function A() {
451
+ if (await X(), !(!s.value || !o.one.sync))
420
452
  try {
421
- await t.post("/user/settings", { settings: o.$state }), await p(!0);
453
+ await t.post("/user/settings", { settings: o.$state }), await h(!0);
422
454
  } catch (i) {
423
- y.showError(i?.message ?? "Error syncing settings");
455
+ v.showError(i?.message ?? "Error syncing settings");
424
456
  }
425
457
  }
426
- async function p(i = !1) {
427
- if (p.promise)
428
- return p.promise;
458
+ async function h(i = !1) {
459
+ if (h.promise)
460
+ return h.promise;
429
461
  if (!i && !document.cookie.includes("sx=1") && location.hostname.match(/([^.]+\.[^.]+)$/)?.[1] === new URL(t.url).hostname.match(/([^.]+\.[^.]+)$/)?.[1]) {
430
462
  s.value = null;
431
463
  return;
432
464
  }
433
- n.value = !0, p.promise = fetch(`${t.url}/auth/verify`, {
465
+ n.value = !0, h.promise = fetch(`${t.url}/auth/verify`, {
434
466
  credentials: "include",
435
467
  cache: i ? "reload" : void 0
436
468
  }).then(
437
- async (l) => {
438
- if (l.ok || l.status === 401) {
439
- const v = await l.json();
440
- s.value = v.user, c.access = v.access, d.team = v.user?.team;
469
+ async (f) => {
470
+ if (f.ok || f.status === 401) {
471
+ const l = await f.json();
472
+ s.value = l.user, a.access = l.access, d.team = l.user?.team;
441
473
  } else
442
- console.error(l.statusText);
474
+ console.error(f.statusText);
443
475
  },
444
476
  () => {
445
477
  }
446
478
  ).finally(() => {
447
- n.value = !1, p.promise = null;
479
+ n.value = !1, h.promise = null;
448
480
  });
449
481
  }
450
- p.promise = null;
451
- async function I(i = "github") {
482
+ h.promise = null;
483
+ async function k(i = "github") {
452
484
  n.value = !0;
453
- const l = `${t.url}/auth/${i}/redirect`;
485
+ const f = `${t.url}/auth/${i}/redirect`;
454
486
  if (i === "shopify") {
455
- window.location.assign(l + "?next=" + encodeURIComponent(window.location.href));
487
+ window.location.assign(f + "?next=" + encodeURIComponent(window.location.href));
456
488
  return;
457
489
  }
458
- const v = 400, L = 600, N = window.screenX + (window.innerWidth - v) / 2, O = window.screenY + (window.innerHeight - L) / 2, S = window.open(
490
+ const l = 400, $ = 600, N = window.screenX + (window.innerWidth - l) / 2, j = window.screenY + (window.innerHeight - $) / 2, S = window.open(
459
491
  "",
460
492
  "vuetify:authorize:popup",
461
- `popup,left=${N},top=${O},width=${v},height=${L},resizable`
493
+ `popup,left=${N},top=${j},width=${l},height=${$},resizable`
462
494
  );
463
495
  if (!S) {
464
496
  console.error("Failed to open popup");
465
497
  return;
466
498
  }
467
- S.location.href = l;
468
- let R = -1, j = -1;
469
- function x(w) {
470
- w.origin === t.url && w.data?.type === "auth-response" && (w.data.status === "success" ? (s.value || localStorage.setItem("vuetify@lastLoginProvider", i), s.value = w.data.body.user, c.access = w.data.body.access, d.team = w.data.body.user?.team, T()) : console.error(w.data.message), k());
499
+ S.location.href = f;
500
+ let C = -1, x = -1;
501
+ function P(w) {
502
+ w.origin === t.url && w.data?.type === "auth-response" && (w.data.status === "success" ? (s.value || localStorage.setItem("vuetify@lastLoginProvider", i), s.value = w.data.body.user, a.access = w.data.body.access, d.team = w.data.body.user?.team, A()) : console.error(w.data.message), q());
471
503
  }
472
- function k() {
473
- window.removeEventListener("message", x), window.clearInterval(R), window.clearTimeout(j), S?.close(), n.value = !1;
504
+ function q() {
505
+ window.removeEventListener("message", P), window.clearInterval(C), window.clearTimeout(x), S?.close(), n.value = !1;
474
506
  }
475
- window.addEventListener("message", x), R = window.setInterval(() => {
476
- !S || S.closed ? (console.error("Auth popup closed"), k()) : S.postMessage({ type: "auth-request" }, "*");
477
- }, 1e3), j = window.setTimeout(() => {
478
- k(), console.error("Auth timed out");
507
+ window.addEventListener("message", P), C = window.setInterval(() => {
508
+ !S || S.closed ? (console.error("Auth popup closed"), q()) : S.postMessage({ type: "auth-request" }, "*");
509
+ }, 1e3), x = window.setTimeout(() => {
510
+ q(), console.error("Auth timed out");
479
511
  }, 120 * 1e3);
480
512
  }
481
- async function h(i) {
513
+ async function y(i) {
482
514
  n.value = !0;
483
- const l = i ? `/auth/${i}/logout` : "/auth/logout";
515
+ const f = i ? `/auth/${i}/logout` : "/auth/logout";
484
516
  try {
485
- await t.post(l), await p(!0), s.value = null;
486
- } catch (v) {
487
- y.showError(v?.message ?? "Error logging out");
517
+ await t.post(f), await h(!0), s.value = null;
518
+ } catch (l) {
519
+ v.showError(l?.message ?? "Error logging out");
488
520
  } finally {
489
- u.push({
521
+ c.push({
490
522
  path: "/",
491
- query: u.currentRoute.value.query
523
+ query: c.currentRoute.value.query
492
524
  }), n.value = !1;
493
525
  }
494
526
  }
495
- function q(i) {
496
- return s.value?.identities.find((l) => l.provider === i);
527
+ function R(i) {
528
+ return s.value?.identities.find((f) => f.provider === i);
497
529
  }
498
- function a() {
530
+ function u() {
499
531
  return localStorage.getItem("vuetify@lastLoginProvider");
500
532
  }
501
- return p(), {
533
+ return h(), {
502
534
  user: s,
503
535
  url: t.url,
504
536
  dialog: e,
505
537
  isLoading: n,
506
- verify: p,
507
- findIdentity: q,
508
- login: I,
509
- logout: h,
510
- lastLoginProvider: a,
511
- sync: T
538
+ verify: h,
539
+ findIdentity: R,
540
+ login: k,
541
+ logout: y,
542
+ lastLoginProvider: u,
543
+ sync: A
512
544
  };
513
545
  });
514
546
  export {
515
547
  B as a,
516
- C as b,
517
- Z as c,
518
- Q as d,
519
- J as e,
520
- D as f,
548
+ H as b,
549
+ D as c,
550
+ V as d,
551
+ Q as e,
552
+ ee as f,
521
553
  _ as u
522
554
  };