@vuetify/one 0.4.0 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/dist/index.js +194 -192
  2. package/package.json +1 -1
  3. package/dist/index.d.ts +0 -735
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
- import { reactive as Y, toRefs as Z, ref as O, shallowRef as T, computed as x, watch as H, defineComponent as V, openBlock as h, createBlock as b, unref as l, withCtx as f, createVNode as d, createTextVNode as S, toDisplayString as B, createCommentVNode as K, mergeProps as Q, createElementVNode as k, createElementBlock as ee, Fragment as te, renderList as oe, pushScopeId as se, popScopeId as ne, onBeforeMount as ie } from "vue";
2
- import { defineStore as $ } from "pinia";
3
- import { merge as D } from "lodash-es";
1
+ import { reactive as Y, toRefs as Z, ref as T, shallowRef as H, computed as b, watch as B, defineComponent as S, openBlock as g, createBlock as _, unref as a, withCtx as p, createVNode as f, createTextVNode as A, toDisplayString as N, createCommentVNode as K, mergeProps as Q, createElementVNode as D, createElementBlock as ee, Fragment as te, renderList as oe, pushScopeId as ne, popScopeId as se, onBeforeMount as ie } from "vue";
2
+ import { defineStore as k } from "pinia";
3
+ import { merge as C } from "lodash-es";
4
4
  import { mdiDiscord as M, mdiGithub as G, mdiViewDashboard as re, mdiLogoutVariant as ae, mdiLogin as le, mdiShieldStarOutline as ce, mdiReddit as ue } from "@mdi/js";
5
5
  import { VListItem as z, VList as J, VListSubheader as de } from "vuetify/lib/components/VList/index.mjs";
6
6
  import { VAvatar as fe } from "vuetify/lib/components/VAvatar/index.mjs";
@@ -13,26 +13,26 @@ import { VDialog as _e } from "vuetify/lib/components/VDialog/index.mjs";
13
13
  import { VImg as we } from "vuetify/lib/components/VImg/index.mjs";
14
14
  import { VFooter as Le } from "vuetify/lib/components/VFooter/index.mjs";
15
15
  import { VIcon as xe } from "vuetify/lib/components/VIcon/index.mjs";
16
- const N = $("http", {
16
+ const U = k("http", {
17
17
  state: () => ({
18
18
  url: ""
19
19
  }),
20
20
  actions: {
21
21
  async fetch(o, t = {}) {
22
- const s = await fetch(`${this.url}${o}`, {
22
+ const n = await fetch(`${this.url}${o}`, {
23
23
  credentials: "include",
24
24
  ...t
25
25
  });
26
- return s.status === 204 ? s : s.json();
26
+ return n.status === 204 ? n : n.json();
27
27
  },
28
- async post(o, t, s = {}) {
28
+ async post(o, t, n = {}) {
29
29
  return this.fetch(o, {
30
30
  method: "POST",
31
31
  headers: {
32
32
  "Content-Type": "application/json"
33
33
  },
34
34
  body: JSON.stringify(t),
35
- ...s
35
+ ...n
36
36
  });
37
37
  },
38
38
  async get(o, t = {}) {
@@ -45,7 +45,7 @@ const N = $("http", {
45
45
  });
46
46
  }
47
47
  }
48
- }), C = typeof window < "u", P = {
48
+ }), O = typeof window < "u", P = {
49
49
  v: 4,
50
50
  api: "link-only",
51
51
  avatar: "",
@@ -73,43 +73,43 @@ const N = $("http", {
73
73
  jobs: null
74
74
  }
75
75
  }
76
- }, q = $("user", () => {
77
- const o = Y(D({}, P));
76
+ }, q = k("user", () => {
77
+ const o = Y(C({}, P));
78
78
  function t() {
79
- if (!C)
79
+ if (!O)
80
80
  return;
81
- const a = localStorage.getItem("vuetify@user"), e = a ? JSON.parse(a) : {}, p = e.v === o.v;
82
- 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.last = e.last, delete e.last)), 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.syncSettings = !0, e.disableAds = !1, e.v = 3), e.v === 3 && (e.quickbar = !1), e.v = o.v, Object.assign(o, D(o, e)), p && s();
83
- }
84
- function s() {
85
- C && localStorage.setItem("vuetify@user", JSON.stringify(o, null, 2));
81
+ const r = localStorage.getItem("vuetify@user"), e = r ? JSON.parse(r) : {}, m = e.v === o.v;
82
+ 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.last = e.last, delete e.last)), 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.syncSettings = !0, e.disableAds = !1, e.v = 3), e.v === 3 && (e.quickbar = !1), e.v = o.v, Object.assign(o, C(o, e)), m && n();
86
83
  }
87
84
  function n() {
88
- C && (Object.assign(o, D({}, P)), s());
85
+ O && localStorage.setItem("vuetify@user", JSON.stringify(o, null, 2));
86
+ }
87
+ function s() {
88
+ O && (Object.assign(o, C({}, P)), n());
89
89
  }
90
90
  return t(), {
91
91
  ...Z(o),
92
92
  load: t,
93
- save: s,
94
- reset: n
93
+ save: n,
94
+ reset: s
95
95
  };
96
- }), w = $("auth", () => {
97
- const o = O(null), t = N(), s = q(), n = T(!1), a = x(() => {
98
- var i, r;
99
- return !t.url || ((i = o.value) == null ? void 0 : i.isAdmin) || ((r = o.value) == null ? void 0 : r.sponsorships.some((c) => c.isActive));
96
+ }), L = k("auth", () => {
97
+ const o = T(null), t = U(), n = q(), s = H(!1), r = b(() => {
98
+ var i, l;
99
+ return !t.url || ((i = o.value) == null ? void 0 : i.isAdmin) || ((l = o.value) == null ? void 0 : l.sponsorships.some((w) => w.isActive));
100
100
  });
101
101
  let e = !1;
102
- H(o, (i) => {
102
+ B(o, (i) => {
103
103
  if (!(i != null && i.settings))
104
104
  return;
105
- const r = localStorage.getItem("vuetify@user") || "{}";
106
- JSON.stringify(i.settings, null, 2) !== r && (e = !0, Object.assign(s, i.settings));
107
- }), s.$subscribe(() => {
108
- e || p(), e = !1;
105
+ const l = localStorage.getItem("vuetify@user") || "{}";
106
+ JSON.stringify(i.settings, null, 2) !== l && (e = !0, Object.assign(n, i.settings));
107
+ }), n.$subscribe(() => {
108
+ e || m(), e = !1;
109
109
  });
110
- async function p() {
110
+ async function m() {
111
111
  try {
112
- await t.post("/user/settings", { settings: s.$state });
112
+ await t.post("/user/settings", { settings: n.$state });
113
113
  } catch (i) {
114
114
  console.error(i);
115
115
  }
@@ -117,108 +117,108 @@ const N = $("http", {
117
117
  async function u(i = !1) {
118
118
  if (u.promise)
119
119
  return u.promise;
120
- n.value = !0, u.promise = fetch(`${t.url}/auth/verify`, {
120
+ s.value = !0, u.promise = fetch(`${t.url}/auth/verify`, {
121
121
  credentials: "include",
122
122
  headers: i ? {
123
123
  "Cache-Control": "no-cache"
124
124
  } : void 0
125
125
  }).then(
126
- async (r) => {
127
- r.ok ? o.value = (await r.json()).user : r.status === 401 ? o.value = null : console.error(r.statusText);
126
+ async (l) => {
127
+ l.ok ? o.value = (await l.json()).user : l.status === 401 ? o.value = null : console.error(l.statusText);
128
128
  },
129
129
  () => {
130
130
  }
131
131
  ).finally(() => {
132
- n.value = !1, u.promise = null;
132
+ s.value = !1, u.promise = null;
133
133
  });
134
134
  }
135
135
  u.promise = null;
136
- async function _(i = "github") {
137
- n.value = !0;
138
- const r = `${t.url}/auth/${i}/redirect`, c = 400, m = 600, I = window.screenX + (window.innerWidth - c) / 2, A = window.screenY + (window.innerHeight - m) / 2, v = window.open(
136
+ async function x(i = "github") {
137
+ s.value = !0;
138
+ const l = `${t.url}/auth/${i}/redirect`, w = 400, c = 600, d = window.screenX + (window.innerWidth - w) / 2, h = window.screenY + (window.innerHeight - c) / 2, v = window.open(
139
139
  "",
140
140
  "vuetify:authorize:popup",
141
- `popup,left=${I},top=${A},width=${c},height=${m},resizable`
141
+ `popup,left=${d},top=${h},width=${w},height=${c},resizable`
142
142
  );
143
143
  if (!v) {
144
144
  console.error("Failed to open popup");
145
145
  return;
146
146
  }
147
- v.location.href = r;
148
- let U = -1, R = -1;
149
- function E(L) {
147
+ v.location.href = l;
148
+ let I = -1, R = -1;
149
+ function E($) {
150
150
  var F;
151
- L.origin === t.url && ((F = L.data) == null ? void 0 : F.type) === "auth-response" && (L.data.status === "success" ? (o.value || localStorage.setItem("vuetify@lastLoginProvider", i), o.value = L.data.body.user) : console.error(L.data.message), j());
151
+ $.origin === t.url && ((F = $.data) == null ? void 0 : F.type) === "auth-response" && ($.data.status === "success" ? (o.value || localStorage.setItem("vuetify@lastLoginProvider", i), o.value = $.data.body.user) : console.error($.data.message), j());
152
152
  }
153
153
  function j() {
154
- window.removeEventListener("message", E), window.clearInterval(U), window.clearTimeout(R), v == null || v.close(), n.value = !1;
154
+ window.removeEventListener("message", E), window.clearInterval(I), window.clearTimeout(R), v == null || v.close(), s.value = !1;
155
155
  }
156
- window.addEventListener("message", E), U = window.setInterval(() => {
156
+ window.addEventListener("message", E), I = window.setInterval(() => {
157
157
  !v || v.closed ? (console.error("Auth popup closed"), j()) : v.postMessage({ type: "auth-request" }, "*");
158
158
  }, 1e3), R = window.setTimeout(() => {
159
159
  j(), console.error("Auth timed out");
160
160
  }, 120 * 1e3);
161
161
  }
162
- async function y() {
163
- n.value = !0;
162
+ async function V() {
163
+ s.value = !0;
164
164
  try {
165
165
  await t.post("/auth/logout"), await u(!0), o.value = null;
166
166
  } catch (i) {
167
167
  console.error(i);
168
168
  } finally {
169
- n.value = !1;
169
+ s.value = !1;
170
170
  }
171
171
  }
172
- function g() {
172
+ function y() {
173
173
  return localStorage.getItem("vuetify@lastLoginProvider");
174
174
  }
175
- return g() && u(), {
175
+ return y() && u(), {
176
176
  user: o,
177
177
  url: t.url,
178
- isLoading: n,
178
+ isLoading: s,
179
179
  verify: u,
180
- login: _,
181
- logout: y,
182
- isSubscriber: a,
183
- lastLoginProvider: g
180
+ login: x,
181
+ logout: V,
182
+ isSubscriber: r,
183
+ lastLoginProvider: y
184
184
  };
185
- }), Ve = /* @__PURE__ */ V({
185
+ }), Ve = /* @__PURE__ */ S({
186
186
  __name: "VoDiscordLogin",
187
187
  setup(o) {
188
- const t = w();
189
- return (s, n) => (h(), b(z, {
190
- "prepend-icon": `svg:${l(M)}`,
191
- title: l(t).user ? "Connect Discord" : "Log in with Discord",
192
- subtitle: !l(t).user && l(t).lastLoginProvider() === "discord" ? "Last Used" : "",
188
+ const t = L();
189
+ return (n, s) => (g(), _(z, {
190
+ "prepend-icon": `svg:${a(M)}`,
191
+ title: a(t).user ? "Connect Discord" : "Log in with Discord",
192
+ subtitle: !a(t).user && a(t).lastLoginProvider() === "discord" ? "Last Used" : "",
193
193
  nav: "",
194
194
  "base-color": "#5865F2",
195
195
  slim: "",
196
196
  variant: "flat",
197
- onClick: n[0] || (n[0] = (a) => l(t).login("discord"))
197
+ onClick: s[0] || (s[0] = (r) => a(t).login("discord"))
198
198
  }, null, 8, ["prepend-icon", "title", "subtitle"]));
199
199
  }
200
- }), $e = /* @__PURE__ */ V({
200
+ }), $e = /* @__PURE__ */ S({
201
201
  __name: "VoGithubLogin",
202
202
  setup(o) {
203
- const t = w();
204
- return (s, n) => (h(), b(z, {
205
- "prepend-icon": `svg:${l(G)}`,
206
- title: l(t).user ? "Connect GitHub" : "Log in with GitHub",
207
- subtitle: !l(t).user && l(t).lastLoginProvider() === "github" ? "Last Used" : "",
203
+ const t = L();
204
+ return (n, s) => (g(), _(z, {
205
+ "prepend-icon": `svg:${a(G)}`,
206
+ title: a(t).user ? "Connect GitHub" : "Log in with GitHub",
207
+ subtitle: !a(t).user && a(t).lastLoginProvider() === "github" ? "Last Used" : "",
208
208
  "base-color": "#2a2a2a",
209
209
  nav: "",
210
210
  slim: "",
211
211
  variant: "flat",
212
- onClick: n[0] || (n[0] = (a) => l(t).login("github"))
212
+ onClick: s[0] || (s[0] = (r) => a(t).login("github"))
213
213
  }, null, 8, ["prepend-icon", "title", "subtitle"]));
214
214
  }
215
- }), Se = /* @__PURE__ */ V({
215
+ }), Se = /* @__PURE__ */ S({
216
216
  __name: "VoUserBtn",
217
217
  props: {
218
218
  external: Boolean
219
219
  },
220
220
  setup(o) {
221
- const t = o, s = w(), n = q(), a = x(() => [
221
+ const t = o, n = L(), s = q(), r = b(() => [
222
222
  { title: "Options", type: "subheader" },
223
223
  {
224
224
  title: "My Dashboard",
@@ -237,36 +237,36 @@ const N = $("http", {
237
237
  title: "Logout",
238
238
  appendIcon: `svg:${ae}`,
239
239
  onClick: () => {
240
- s.logout();
240
+ n.logout();
241
241
  }
242
242
  }
243
243
  ]);
244
- return (e, p) => (h(), b(W, {
244
+ return (e, m) => (g(), _(W, {
245
245
  class: "vo-user-btn",
246
- loading: l(s).isLoading,
246
+ loading: a(n).isLoading,
247
247
  icon: ""
248
248
  }, {
249
- loader: f(() => [
250
- d(me, { type: "avatar" })
249
+ loader: p(() => [
250
+ f(me, { type: "avatar" })
251
251
  ]),
252
- default: f(() => [
253
- d(pe, {
254
- disabled: !l(s).user || l(s).isLoading,
252
+ default: p(() => [
253
+ f(pe, {
254
+ disabled: !a(n).user || a(n).isLoading,
255
255
  activator: "parent",
256
256
  location: "bottom end"
257
257
  }, {
258
- default: f(() => [
259
- d(J, {
260
- items: a.value,
258
+ default: p(() => [
259
+ f(J, {
260
+ items: r.value,
261
261
  lines: !1,
262
262
  density: "compact",
263
263
  "item-props": "",
264
264
  nav: ""
265
265
  }, {
266
- subheader: f(({ props: u }) => [
267
- d(de, { class: "text-high-emphasis text-uppercase font-weight-black" }, {
268
- default: f(() => [
269
- S(B(u.title), 1)
266
+ subheader: p(({ props: u }) => [
267
+ f(de, { class: "text-high-emphasis text-uppercase font-weight-black" }, {
268
+ default: p(() => [
269
+ A(N(u.title), 1)
270
270
  ]),
271
271
  _: 2
272
272
  }, 1024)
@@ -276,9 +276,9 @@ const N = $("http", {
276
276
  ]),
277
277
  _: 1
278
278
  }, 8, ["disabled"]),
279
- l(s).user ? (h(), b(fe, {
279
+ a(n).user ? (g(), _(fe, {
280
280
  key: 0,
281
- image: l(n).avatar || l(s).user.picture || ""
281
+ image: a(s).avatar || a(n).user.picture || ""
282
282
  }, null, 8, ["image"])) : K("", !0)
283
283
  ]),
284
284
  _: 1
@@ -286,60 +286,60 @@ const N = $("http", {
286
286
  }
287
287
  });
288
288
  const X = (o, t) => {
289
- const s = o.__vccOpts || o;
290
- for (const [n, a] of t)
291
- s[n] = a;
292
- return s;
293
- }, ke = /* @__PURE__ */ X(Se, [["__scopeId", "data-v-aeb16535"]]), Ie = { class: "text-center mb-6" }, Ae = /* @__PURE__ */ V({
289
+ const n = o.__vccOpts || o;
290
+ for (const [s, r] of t)
291
+ n[s] = r;
292
+ return n;
293
+ }, ke = /* @__PURE__ */ X(Se, [["__scopeId", "data-v-aeb16535"]]), Ie = { class: "text-center mb-6" }, Ae = /* @__PURE__ */ S({
294
294
  __name: "VoAuthDialog",
295
295
  setup(o) {
296
- const t = w(), { mdAndDown: s, lgAndUp: n } = ve(), a = he();
297
- return (e, p) => !l(t).user && !l(t).isLoading ? (h(), b(_e, {
296
+ const t = L(), { mdAndDown: n, lgAndUp: s } = ve(), r = he();
297
+ return (e, m) => !a(t).user && !a(t).isLoading ? (g(), _(_e, {
298
298
  key: 0,
299
299
  "max-width": "480"
300
300
  }, {
301
- activator: f(({ props: u }) => [
302
- d(W, Q({
301
+ activator: p(({ props: u }) => [
302
+ f(W, Q({
303
303
  ...u,
304
- [`${l(n) ? "append-" : ""}icon`]: `svg:${l(le)}`,
305
- text: l(n) ? "Login" : void 0
304
+ [`${a(s) ? "append-" : ""}icon`]: `svg:${a(le)}`,
305
+ text: a(s) ? "Login" : void 0
306
306
  }, {
307
- rounded: l(s),
307
+ rounded: a(n),
308
308
  class: "text-none",
309
309
  color: "primary",
310
310
  variant: "outlined"
311
311
  }), null, 16, ["rounded"])
312
312
  ]),
313
- default: f(() => [
314
- d(ye, { class: "pt-6 pb-1 pb-sm-4 px-4 px-sm-8" }, {
315
- default: f(() => [
316
- d(we, {
317
- src: `https://cdn.vuetifyjs.com/docs/images/logos/vuetify-logo-v3-slim-text-${l(a).name.value}.svg`,
313
+ default: p(() => [
314
+ f(ye, { class: "pt-6 pb-1 pb-sm-4 px-4 px-sm-8" }, {
315
+ default: p(() => [
316
+ f(we, {
317
+ src: `https://cdn.vuetifyjs.com/docs/images/logos/vuetify-logo-v3-slim-text-${a(r).name.value}.svg`,
318
318
  class: "mb-4",
319
319
  height: "30"
320
320
  }, null, 8, ["src"]),
321
- k("div", Ie, [
322
- d(ge, { class: "text-h5 mb-1 text-md-h4 font-weight-bold" }, {
323
- default: f(() => [
324
- S(B(l(t).lastLoginProvider() ? "Welcome Back" : "Log in to Vuetify"), 1)
321
+ D("div", Ie, [
322
+ f(ge, { class: "text-h5 mb-1 text-md-h4 font-weight-bold" }, {
323
+ default: p(() => [
324
+ A(N(a(t).lastLoginProvider() ? "Welcome Back" : "Log in to Vuetify"), 1)
325
325
  ]),
326
326
  _: 1
327
327
  }),
328
- d(be, { class: "text-wrap" }, {
329
- default: f(() => [
330
- S(" Sign in with GitHub or Discord to save your settings and unlock exclusive subscriber perks. ")
328
+ f(be, { class: "text-wrap" }, {
329
+ default: p(() => [
330
+ A(" Sign in with GitHub or Discord to save your settings and unlock exclusive subscriber perks. ")
331
331
  ]),
332
332
  _: 1
333
333
  })
334
334
  ]),
335
- d(J, {
335
+ f(J, {
336
336
  class: "mx-auto",
337
337
  "max-width": "300",
338
338
  width: "100%"
339
339
  }, {
340
- default: f(() => [
341
- d($e, { class: "mb-3" }),
342
- d(Ve)
340
+ default: p(() => [
341
+ f($e, { class: "mb-3" }),
342
+ f(Ve)
343
343
  ]),
344
344
  _: 1
345
345
  })
@@ -348,12 +348,12 @@ const X = (o, t) => {
348
348
  })
349
349
  ]),
350
350
  _: 1
351
- })) : (h(), b(ke, { key: 1 }));
351
+ })) : (g(), _(ke, { key: 1 }));
352
352
  }
353
- }), je = (o) => (se("data-v-b66944c0"), o = o(), ne(), o), De = ["href", "title"], Ce = {
353
+ }), De = (o) => (ne("data-v-b66944c0"), o = o(), se(), o), je = ["href", "title"], Ce = {
354
354
  class: "text-caption text-disabled",
355
355
  style: { position: "absolute", right: "16px" }
356
- }, Oe = /* @__PURE__ */ je(() => /* @__PURE__ */ k("span", { class: "d-none d-sm-inline-block" }, "Vuetify, LLC", -1)), Te = /* @__PURE__ */ V({
356
+ }, Oe = /* @__PURE__ */ De(() => /* @__PURE__ */ D("span", { class: "d-none d-sm-inline-block" }, "Vuetify, LLC", -1)), Te = /* @__PURE__ */ S({
357
357
  __name: "VoFooter",
358
358
  setup(o) {
359
359
  const t = [
@@ -388,27 +388,27 @@ const X = (o, t) => {
388
388
  href: "https://reddit.com/r/vuetifyjs"
389
389
  }
390
390
  ];
391
- return (s, n) => (h(), b(Le, {
391
+ return (n, s) => (g(), _(Le, {
392
392
  class: "vo-footer",
393
393
  theme: "dark",
394
394
  height: "40"
395
395
  }, {
396
- default: f(() => [
397
- (h(), ee(te, null, oe(t, (a) => k("a", {
398
- key: a.title,
399
- href: a.href,
400
- title: a.title,
396
+ default: p(() => [
397
+ (g(), ee(te, null, oe(t, (r) => D("a", {
398
+ key: r.title,
399
+ href: r.href,
400
+ title: r.title,
401
401
  class: "d-inline-block mx-2 social-link",
402
402
  target: "_blank",
403
403
  rel: "noopener noreferrer"
404
404
  }, [
405
- d(xe, {
406
- icon: a.icon,
407
- size: a.icon === "$vuetify" ? 24 : 16
405
+ f(xe, {
406
+ icon: r.icon,
407
+ size: r.icon === "$vuetify" ? 24 : 16
408
408
  }, null, 8, ["icon", "size"])
409
- ], 8, De)), 64)),
410
- k("div", Ce, [
411
- S(" © 2016-" + B((/* @__PURE__ */ new Date()).getFullYear()) + " ", 1),
409
+ ], 8, je)), 64)),
410
+ D("div", Ce, [
411
+ A(" © 2016-" + N((/* @__PURE__ */ new Date()).getFullYear()) + " ", 1),
412
412
  Oe
413
413
  ])
414
414
  ]),
@@ -416,110 +416,112 @@ const X = (o, t) => {
416
416
  }));
417
417
  }
418
418
  });
419
- const He = /* @__PURE__ */ X(Te, [["__scopeId", "data-v-b66944c0"]]), Ze = $("bins", () => {
420
- const o = w(), t = N(), s = O([]), n = O(), a = T(-1), e = x(() => !o.user || !n.value ? !1 : o.user.id === n.value.owner.id);
421
- H(() => n, () => {
422
- window.clearTimeout(a.value), a.value = window.setTimeout(() => {
423
- !n.value || !e.value || y(n.value, n.value.id);
419
+ const He = /* @__PURE__ */ X(Te, [["__scopeId", "data-v-b66944c0"]]), Ze = k("bins", () => {
420
+ const o = L(), t = U(), n = T([]), s = T(), r = H(-1), e = b(() => !o.user || !s.value ? !1 : o.user.id === s.value.owner.id), m = b(() => n.value.filter((c) => c.favorite)), u = b(() => n.value.filter((c) => c.pinned));
421
+ B(() => s, () => {
422
+ window.clearTimeout(r.value), r.value = window.setTimeout(() => {
423
+ !s.value || !e.value || i(s.value, s.value.id);
424
424
  }, 100);
425
425
  }, { deep: !0 });
426
- async function p() {
427
- const r = await t.get("/one/bins");
428
- return s.value = r.bins, r.bins;
426
+ async function x() {
427
+ const c = await t.get("/one/bins");
428
+ return n.value = c.bins, c.bins;
429
429
  }
430
- async function u(r) {
431
- const c = await t.delete(`/one/bins/${r}`);
432
- return s.value = s.value.filter((m) => m.id !== r), c;
430
+ async function V(c) {
431
+ const d = await t.delete(`/one/bins/${c}`);
432
+ return n.value = n.value.filter((h) => h.id !== c), d;
433
433
  }
434
- async function _(r) {
435
- const c = await t.post("/one/bins", { bin: r });
436
- return s.value.push(c.bin), n.value = c.bin, c;
434
+ async function y(c) {
435
+ const d = await t.post("/one/bins", { bin: c });
436
+ return n.value.push(d.bin), s.value = d.bin, d;
437
437
  }
438
- async function y(r, c) {
439
- const m = await t.post(`/one/bins/${c}`, { bin: r }), I = s.value.findIndex((A) => A.id === c);
440
- return s.value.splice(I, 1, m.bin), m;
438
+ async function i(c, d) {
439
+ const h = await t.post(`/one/bins/${d}`, { bin: c }), v = n.value.findIndex((I) => I.id === d);
440
+ return n.value.splice(v, 1, h.bin), h;
441
441
  }
442
- async function g(r, c) {
443
- const m = c ? await y(r, c) : await _(r);
444
- return n.value = m.bin, m;
442
+ async function l(c, d) {
443
+ const h = d ? await i(c, d) : await y(c);
444
+ return s.value = h.bin, h;
445
445
  }
446
- async function i(r) {
447
- const c = await t.get(`/one/bins/${r}`);
448
- return n.value = c.bin, c;
446
+ async function w(c) {
447
+ const d = await t.get(`/one/bins/${c}`);
448
+ return s.value = d.bin, d;
449
449
  }
450
450
  return {
451
451
  isOwner: e,
452
- all: s,
453
- create: _,
454
- delete: u,
455
- current: n,
456
- find: i,
457
- get: p,
458
- update: y,
459
- updateOrCreate: g
452
+ pinned: u,
453
+ favorites: m,
454
+ all: n,
455
+ create: y,
456
+ delete: V,
457
+ current: s,
458
+ find: w,
459
+ get: x,
460
+ update: i,
461
+ updateOrCreate: l
460
462
  };
461
- }), Ke = $("one", () => {
462
- const t = new URLSearchParams(window.location.search).get("session_id"), s = w(), n = N(), a = T(!1), e = x(() => {
463
+ }), Ke = k("one", () => {
464
+ const t = new URLSearchParams(window.location.search).get("session_id"), n = L(), s = U(), r = H(!1), e = b(() => {
463
465
  var i;
464
- return (i = s.user) == null ? void 0 : i.sponsorships.find((r) => r.platform === "stripe" && r.tierName.startsWith("sub_"));
465
- }), p = x(() => {
466
+ return (i = n.user) == null ? void 0 : i.sponsorships.find((l) => l.platform === "stripe" && l.tierName.startsWith("sub_"));
467
+ }), m = b(() => {
466
468
  var i;
467
469
  return (i = e.value) == null ? void 0 : i.isActive;
468
470
  });
469
471
  ie(async () => {
470
472
  t && await u();
471
- }), H(p, (i) => {
472
- i && g();
473
+ }), B(m, (i) => {
474
+ i && y();
473
475
  });
474
476
  async function u() {
475
477
  try {
476
- a.value = !0;
477
- const i = await n.post("/one/activate", { sessionId: t });
478
- s.user = i.user;
478
+ r.value = !0;
479
+ const i = await s.post("/one/activate", { sessionId: t });
480
+ n.user = i.user;
479
481
  } catch {
480
482
  } finally {
481
- a.value = !1;
483
+ r.value = !1;
482
484
  }
483
485
  }
484
- async function _() {
485
- a.value = !0, window.location.href = `${n.url}/one/subscribe`;
486
+ async function x() {
487
+ r.value = !0, window.location.href = `${s.url}/one/subscribe`;
486
488
  }
487
- async function y() {
489
+ async function V() {
488
490
  var i;
489
491
  if (e.value)
490
492
  try {
491
- a.value = !0;
492
- const r = await n.post(
493
+ r.value = !0;
494
+ const l = await s.post(
493
495
  `/one/cancel?subscriptionId=${(i = e.value) == null ? void 0 : i.tierName}`
494
496
  );
495
- s.user = r.user;
497
+ n.user = l.user;
496
498
  } catch {
497
499
  } finally {
498
- a.value = !1;
500
+ r.value = !1;
499
501
  }
500
502
  }
501
- async function g() {
503
+ async function y() {
502
504
  var i;
503
505
  if (e.value)
504
506
  try {
505
- a.value = !0;
506
- const r = await n.post(
507
+ r.value = !0;
508
+ const l = await s.post(
507
509
  `/one/verify?subscriptionId=${(i = e.value) == null ? void 0 : i.tierName}`
508
510
  );
509
- s.user = r.user;
511
+ n.user = l.user;
510
512
  } catch {
511
513
  } finally {
512
- a.value = !1;
514
+ r.value = !1;
513
515
  }
514
516
  }
515
517
  return {
516
518
  activate: u,
517
- cancel: y,
518
- subscribe: _,
519
- verify: g,
519
+ cancel: V,
520
+ subscribe: x,
521
+ verify: y,
520
522
  subscription: e,
521
- isLoading: a,
522
- isSubscriber: p
523
+ isLoading: r,
524
+ isSubscriber: m
523
525
  };
524
526
  });
525
527
  function Qe() {
@@ -529,14 +531,14 @@ function Qe() {
529
531
  return { install: o };
530
532
  }
531
533
  function et(o) {
532
- o.store.url = "https://api.vuetifyjs.com";
534
+ o.store.url = "http://localhost:8096";
533
535
  }
534
536
  export {
535
537
  Qe as createOne,
536
538
  et as one,
537
- w as useAuthStore,
539
+ L as useAuthStore,
538
540
  Ze as useBinsStore,
539
- N as useHttpStore,
541
+ U as useHttpStore,
540
542
  Ke as useOneStore,
541
543
  q as useUserStore
542
544
  };