@huyooo/ui 0.13.8 → 0.13.9

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 (37) hide show
  1. package/dist/{AuthkitAppSetting-u2kUUH6q.js → AuthkitAppSetting-Xe-QQSQ4.js} +403 -406
  2. package/dist/{AuthkitGithubBinding-B-YSWc50.js → AuthkitGithubBinding-CK6ijijV.js} +329 -330
  3. package/dist/{Contact-CIMfdt_b.js → Contact-mb7deQOs.js} +1 -1
  4. package/dist/CustomTable-BT-cnhLR.js +280 -0
  5. package/dist/{MessageHandle-D2dcvWVr.js → MessageHandle-CVueKPFG.js} +1 -1
  6. package/dist/{MessageNoticeNotificationsDetails.vue_vue_type_script_setup_true_lang-CSAIRPOj.js → MessageNoticeNotificationsDetails.vue_vue_type_script_setup_true_lang-DL4qP8DA.js} +1 -1
  7. package/dist/{PaySubscriptions-BaUlQE-p.js → PaySubscriptions-BkZaeTgv.js} +2 -2
  8. package/dist/{PricingPlans-B0nt843Q.js → PricingPlans-B-GWpft_.js} +1 -1
  9. package/dist/{ReferrerReferees-B50_V69q.js → ReferrerReferees-DFCwvXJ6.js} +2 -2
  10. package/dist/{UserMenuInvitationsItem.vue_vue_type_script_setup_true_lang-BHXLN2Tu.js → UserMenuInvitationsItem.vue_vue_type_script_setup_true_lang-Iwq1MOFa.js} +5 -5
  11. package/dist/WidthContainer-jOX17pDu.js +691 -0
  12. package/dist/authkit.js +6 -6
  13. package/dist/common.js +2 -2
  14. package/dist/composables/Authkit/resolveRoutePermission.d.ts +4 -0
  15. package/dist/composables/Authkit/useAuthkitAppsAuthPageInfo.d.ts +1 -1
  16. package/dist/composables/Authkit/useAuthkitUsersProfile.d.ts +1 -1
  17. package/dist/composables.js +6 -6
  18. package/dist/main.js +19 -19
  19. package/dist/message.js +2 -2
  20. package/dist/pay.js +2 -2
  21. package/dist/privateCom.js +1 -1
  22. package/dist/referrer.js +1 -1
  23. package/dist/style.css +1 -1
  24. package/dist/types/api/ai.generated.d.ts +378 -247
  25. package/dist/types/api/billing.generated.d.ts +1105 -374
  26. package/dist/{useAuthkitAppsAuthPageInfo-CjPdpZ64.js → useAuthkitAppsAuthPageInfo-nCjfAjiw.js} +17 -7
  27. package/dist/useAuthkitCreateAndUpdate-u-ceTc-m.js +25 -0
  28. package/dist/useAuthkitUsersProfile-BC5EsA2f.js +40 -0
  29. package/dist/{useDownloads-CxoyuqyY.js → useDownloads-BC0QyEFr.js} +9 -9
  30. package/dist/{useLegalLinks-DHqsVvIK.js → useLegalLinks-DeXLE-yv.js} +1 -1
  31. package/dist/{useSEO-DypqLVfr.js → useSEO-BWAREYk4.js} +238 -227
  32. package/dist/user.js +1 -1
  33. package/package.json +2 -1
  34. package/dist/CustomTable-BBcd4nNL.js +0 -278
  35. package/dist/WidthContainer-BQIboxrg.js +0 -695
  36. package/dist/useAuthkitCreateAndUpdate-CsYn-oYu.js +0 -25
  37. package/dist/useAuthkitUsersProfile-CIFqG3gd.js +0 -36
@@ -1,21 +1,21 @@
1
- import { ref as I, computed as d, watch as _, isRef as G, toValue as B, hasInjectionContext as F, inject as J, watchEffect as Q, getCurrentInstance as Z, onBeforeUnmount as X, onDeactivated as Y, onActivated as ee } from "vue";
2
- import { useRouter as V, useRoute as K } from "vue-router";
3
- import { u as R } from "./useAuthkitAppsAuthPageInfo-CjPdpZ64.js";
4
- import { u as U } from "./useAuthkitUsersProfile-CIFqG3gd.js";
5
- const v = I({
1
+ import { ref as O, computed as m, watch as B, isRef as G, toValue as F, hasInjectionContext as J, inject as Q, watchEffect as Z, getCurrentInstance as X, onBeforeUnmount as Y, onDeactivated as ee, onActivated as te } from "vue";
2
+ import { useRouter as _, useRoute as x } from "vue-router";
3
+ import { u as V } from "./useAuthkitAppsAuthPageInfo-nCjfAjiw.js";
4
+ import { u as U } from "./useAuthkitUsersProfile-BC5EsA2f.js";
5
+ const M = O({
6
6
  key: "",
7
7
  name: ""
8
8
  });
9
- function we() {
9
+ function $e() {
10
10
  function e(t, n) {
11
- v.value.key = t, v.value.name = n;
11
+ M.value.key = t, M.value.name = n;
12
12
  }
13
13
  return {
14
- activeDoc: v,
14
+ activeDoc: M,
15
15
  setActiveDoc: e
16
16
  };
17
17
  }
18
- function Ae(e, t = "default") {
18
+ function Pe(e, t = "default") {
19
19
  const n = document;
20
20
  if (n && typeof n.startViewTransition == "function") {
21
21
  const r = document.body;
@@ -30,13 +30,25 @@ function Ae(e, t = "default") {
30
30
  } else
31
31
  e();
32
32
  }
33
+ function ne(e) {
34
+ const t = /* @__PURE__ */ new Set();
35
+ t.add(e);
36
+ const n = e.split("/").filter(Boolean);
37
+ for (let r = n.length - 1; r > 0; r--)
38
+ t.add(`/${n.slice(0, r).join("/")}`);
39
+ return [...t];
40
+ }
33
41
  function D(e, t) {
42
+ const n = new Set(t);
43
+ return ne(e).some((r) => n.has(r));
44
+ }
45
+ function K(e, t) {
34
46
  return Array.isArray(e == null ? void 0 : e.menuTypes) ? e.menuTypes.includes(t) : !1;
35
47
  }
36
- function Pe(e, t, n) {
48
+ function Te(e, t, n) {
37
49
  for (let r = e.length - 1; r >= 0; r--) {
38
50
  const o = e[r];
39
- if (D(o.meta, t))
51
+ if (K(o.meta, t))
40
52
  return o.path;
41
53
  }
42
54
  return n;
@@ -44,16 +56,16 @@ function Pe(e, t, n) {
44
56
  function A(e) {
45
57
  return e.split("?")[0].split("#")[0];
46
58
  }
47
- function $e(e, t, n) {
59
+ function Me(e, t, n) {
48
60
  const r = A(t), o = (n == null ? void 0 : n.returnParentOnChildMatch) ?? !1;
49
- function s(c, a) {
50
- for (const l of c) {
51
- if (A(l.path) === a)
52
- return l.path;
53
- if (l.children && l.children.length > 0) {
54
- const p = s(l.children, a);
55
- if (p)
56
- return o ? l.path : p;
61
+ function s(a, c) {
62
+ for (const u of a) {
63
+ if (A(u.path) === c)
64
+ return u.path;
65
+ if (u.children && u.children.length > 0) {
66
+ const l = s(u.children, c);
67
+ if (l)
68
+ return o ? u.path : l;
57
69
  }
58
70
  }
59
71
  return null;
@@ -61,143 +73,142 @@ function $e(e, t, n) {
61
73
  const i = s(e, r);
62
74
  if (i)
63
75
  return i;
64
- for (const c of e) {
65
- const a = A(c.path);
66
- if (r.startsWith(a + "/") || r === a) {
67
- if (c.children && c.children.length > 0)
68
- for (const l of c.children) {
69
- const y = A(l.path);
76
+ for (const a of e) {
77
+ const c = A(a.path);
78
+ if (r.startsWith(c + "/") || r === c) {
79
+ if (a.children && a.children.length > 0)
80
+ for (const u of a.children) {
81
+ const y = A(u.path);
70
82
  if (r.startsWith(y + "/") || r === y)
71
- return o ? c.path : l.path;
83
+ return o ? a.path : u.path;
72
84
  }
73
- return c.path;
85
+ return a.path;
74
86
  }
75
87
  }
76
88
  return n != null && n.fallback ? n.fallback(r) : r;
77
89
  }
78
- function Te(e) {
79
- const t = V(), {
90
+ function ve(e) {
91
+ const t = _(), {
80
92
  appsData: n
81
- } = R(), {
93
+ } = V(), {
82
94
  isLoggedIn: r,
83
95
  userProfile: o
84
- } = U(), s = d(() => {
85
- var p;
86
- return !r.value || !o.value ? [] : ((p = o.value.permissions) == null ? void 0 : p.map((u) => u.permissionKey)) || [];
96
+ } = U(), s = m(() => {
97
+ var l;
98
+ return !r.value || !o.value ? [] : ((l = o.value.permissions) == null ? void 0 : l.map((f) => f.permissionKey)) || [];
87
99
  });
88
- function i(p) {
89
- return (n.value.publicRoutes || []).some((m) => m.permissionKey === p);
100
+ function i(l) {
101
+ return (n.value.publicRoutes || []).some((d) => d.permissionKey === l);
90
102
  }
91
- function c(p) {
92
- return r.value ? s.value.includes(p) : !1;
103
+ function a(l) {
104
+ return r.value ? D(l, s.value) : !1;
93
105
  }
94
- function a(p) {
95
- var u;
106
+ function c(l) {
107
+ var f;
96
108
  return {
97
- path: p.path,
98
- name: p.name,
99
- meta: p.meta,
100
- children: (u = p.children) == null ? void 0 : u.map((m) => a(m))
109
+ path: l.path,
110
+ name: l.name,
111
+ meta: l.meta,
112
+ children: (f = l.children) == null ? void 0 : f.map((d) => c(d))
101
113
  };
102
114
  }
103
- function l(p, u) {
104
- const m = [];
105
- for (const h of p) {
115
+ function u(l, f) {
116
+ const d = [];
117
+ for (const h of l) {
106
118
  if (h.path === "/" || h.path === "/:catchAll(.*)")
107
119
  continue;
108
- const f = h.meta;
109
- if (D(f, u)) {
120
+ const p = h.meta;
121
+ if (K(p, f)) {
110
122
  const S = h.path;
111
- if (i(S) || c(S)) {
123
+ if (i(S) || a(S)) {
112
124
  const g = {
113
- name: (f == null ? void 0 : f.menuName) || (f == null ? void 0 : f.title) || (typeof h.name == "string" ? h.name : h.path),
125
+ name: (p == null ? void 0 : p.menuName) || (p == null ? void 0 : p.title) || (typeof h.name == "string" ? h.name : h.path),
114
126
  path: h.path,
115
- icon: (f == null ? void 0 : f.menuIcon) || (f == null ? void 0 : f.icon),
116
- description: (f == null ? void 0 : f.menuDescription) || (f == null ? void 0 : f.description),
117
- hidden: f == null ? void 0 : f.hidden
127
+ icon: (p == null ? void 0 : p.menuIcon) || (p == null ? void 0 : p.icon),
128
+ description: (p == null ? void 0 : p.menuDescription) || (p == null ? void 0 : p.description),
129
+ hidden: p == null ? void 0 : p.hidden
118
130
  };
119
131
  if (h.children && h.children.length > 0) {
120
- const M = l(h.children, u);
121
- M.length > 0 && (g.children = M);
132
+ const T = u(h.children, f);
133
+ T.length > 0 && (g.children = T);
122
134
  }
123
- m.push(g);
135
+ d.push(g);
124
136
  }
125
137
  } else if (h.children && h.children.length > 0) {
126
- const S = l(h.children, u);
127
- m.push(...S);
138
+ const S = u(h.children, f);
139
+ d.push(...S);
128
140
  }
129
141
  }
130
- return m;
142
+ return d;
131
143
  }
132
144
  return {
133
- menus: d(() => {
145
+ menus: m(() => {
134
146
  if (!e)
135
147
  return [];
136
- const p = t.getRoutes(), u = p.find((g) => g.path === "/"), m = u != null && u.children ? u.children.map((g) => a(g)) : [], h = new Set(m.map((g) => g.path)), S = p.filter((g) => g.path === "/" || g.path === "/:catchAll(.*)" || h.has(g.path) ? !1 : g.path.split("/").filter((W) => W).length === 1).map(a), T = [...m, ...S];
137
- return console.log(l(T, e), "过滤菜单"), l(T, e);
148
+ const l = t.getRoutes(), f = l.find((g) => g.path === "/"), d = f != null && f.children ? f.children.map((g) => c(g)) : [], h = new Set(d.map((g) => g.path)), S = l.filter((g) => g.path === "/" || g.path === "/:catchAll(.*)" || h.has(g.path) ? !1 : g.path.split("/").filter((W) => W).length === 1).map(c), C = [...d, ...S];
149
+ return u(C, e);
138
150
  }),
139
151
  isRoutePublic: i,
140
- hasPermission: (p) => i(p) ? !0 : c(p),
152
+ hasPermission: (l) => i(l) ? !0 : a(l),
141
153
  isLoggedIn: r
142
154
  };
143
155
  }
144
- function Me() {
145
- const e = V(), t = K(), {
146
- appsAuthPageInfoApi: n,
147
- appsData: r,
148
- appsAuthPageInfoSuccess: o
149
- } = R(), {
150
- userProfile: s,
151
- isLoggedIn: i,
152
- usersProfileSuccess: c
153
- } = U(), a = I(!1);
154
- function l(u) {
155
- return (r.value.publicRoutes || []).some((h) => h.permissionKey === u);
156
+ function je() {
157
+ const e = _(), t = x(), {
158
+ appsData: n,
159
+ appsAuthPageInfoSuccess: r
160
+ } = V(), {
161
+ userProfile: o,
162
+ isLoggedIn: s,
163
+ usersProfileReady: i
164
+ } = U(), a = O(!1);
165
+ function c(l) {
166
+ return (n.value.publicRoutes || []).some((d) => d.permissionKey === l);
156
167
  }
157
- function y(u) {
158
- var h;
159
- return !i.value || !s.value ? !1 : (((h = s.value.permissions) == null ? void 0 : h.map((f) => f.permissionKey)) || []).includes(u);
168
+ function u(l) {
169
+ var d;
170
+ if (!s.value || !o.value)
171
+ return !1;
172
+ const f = ((d = o.value.permissions) == null ? void 0 : d.map((h) => h.permissionKey)) || [];
173
+ return D(l, f);
160
174
  }
161
- function p(u) {
162
- var m, h;
163
- if (!o.value) {
164
- console.log("权限检查跳过:appsAuthPageInfoSuccess 未加载完成", u);
175
+ function y(l) {
176
+ if (!r.value) {
177
+ a.value = !0;
165
178
  return;
166
179
  }
167
- if (a.value = !0, l(u)) {
168
- console.log("权限检查通过:公开路由", u), a.value = !1;
180
+ if (a.value = !0, c(l)) {
181
+ a.value = !1;
169
182
  return;
170
183
  }
171
- if (!c.value) {
172
- console.log("权限检查跳过:usersProfileSuccess 未加载完成,等待...", u), a.value = !1;
184
+ if (!i.value) {
185
+ a.value = !0;
173
186
  return;
174
187
  }
175
- if (!i.value) {
176
- console.log("权限检查失败:未登录,重定向到首页", u), e.replace("/"), a.value = !1;
188
+ if (!s.value) {
189
+ e.replace("/"), a.value = !1;
177
190
  return;
178
191
  }
179
- y(u) ? console.log("权限检查通过:有权限", u) : (console.log("权限检查失败:无权限,重定向到首页", u, {
180
- permissions: (h = (m = s.value) == null ? void 0 : m.permissions) == null ? void 0 : h.map((f) => f.permissionKey)
181
- }), e.replace("/")), a.value = !1;
192
+ u(l) || e.replace("/"), a.value = !1;
182
193
  }
183
- return n(), _(() => t.path, (u) => {
184
- p(u);
185
- }), _([o, c], ([u]) => {
186
- u && p(t.path);
194
+ return B([() => t.path, r, i, s], () => {
195
+ y(t.path);
196
+ }, {
197
+ immediate: !0
187
198
  }), {
188
199
  isChecking: a,
189
- isRoutePublic: l,
190
- hasPermission: y
200
+ isRoutePublic: c,
201
+ hasPermission: u
191
202
  };
192
203
  }
193
- const te = /* @__PURE__ */ new Set(["link", "style", "script", "noscript"]), ne = /* @__PURE__ */ new Set(["title", "titleTemplate", "script", "style", "noscript"]), ve = /* @__PURE__ */ new Set([
204
+ const re = /* @__PURE__ */ new Set(["link", "style", "script", "noscript"]), oe = /* @__PURE__ */ new Set(["title", "titleTemplate", "script", "style", "noscript"]), Oe = /* @__PURE__ */ new Set([
194
205
  "base",
195
206
  "meta",
196
207
  "link",
197
208
  "style",
198
209
  "script",
199
210
  "noscript"
200
- ]), je = /* @__PURE__ */ new Set([
211
+ ]), Ee = /* @__PURE__ */ new Set([
201
212
  "title",
202
213
  "base",
203
214
  "htmlAttrs",
@@ -207,7 +218,7 @@ const te = /* @__PURE__ */ new Set(["link", "style", "script", "noscript"]), ne
207
218
  "style",
208
219
  "script",
209
220
  "noscript"
210
- ]), re = /* @__PURE__ */ new Set(["base", "title", "titleTemplate", "bodyAttrs", "htmlAttrs", "templateParams"]), oe = /* @__PURE__ */ new Set(["key", "tagPosition", "tagPriority", "tagDuplicateStrategy", "innerHTML", "textContent", "processTemplateParams"]), Oe = /* @__PURE__ */ new Set(["templateParams", "htmlAttrs", "bodyAttrs"]), E = /* @__PURE__ */ new Set([
221
+ ]), se = /* @__PURE__ */ new Set(["base", "title", "titleTemplate", "bodyAttrs", "htmlAttrs", "templateParams"]), ie = /* @__PURE__ */ new Set(["key", "tagPosition", "tagPriority", "tagDuplicateStrategy", "innerHTML", "textContent", "processTemplateParams"]), Ie = /* @__PURE__ */ new Set(["templateParams", "htmlAttrs", "bodyAttrs"]), E = /* @__PURE__ */ new Set([
211
222
  "theme-color",
212
223
  "google-site-verification",
213
224
  "og",
@@ -221,7 +232,7 @@ const te = /* @__PURE__ */ new Set(["link", "style", "script", "noscript"]), ne
221
232
  OG: /* @__PURE__ */ new Set(["og", "book", "article", "profile", "fb"]),
222
233
  MEDIA: /* @__PURE__ */ new Set(["ogImage", "ogVideo", "ogAudio", "twitterImage"]),
223
234
  HTTP_EQUIV: /* @__PURE__ */ new Set(["contentType", "defaultStyle", "xUaCompatible"])
224
- }, se = {
235
+ }, ae = {
225
236
  articleExpirationTime: "article:expiration_time",
226
237
  articleModifiedTime: "article:modified_time",
227
238
  articlePublishedTime: "article:published_time",
@@ -280,31 +291,31 @@ function b(e) {
280
291
  function k(e) {
281
292
  return Object.fromEntries(Object.entries(e).filter(([t, n]) => String(n) !== "false" && t));
282
293
  }
283
- function j(e) {
284
- return Array.isArray(e) ? e.map(j) : !e || typeof e != "object" ? e : Object.fromEntries(Object.entries(e).map(([t, n]) => [b(t), j(n)]));
294
+ function v(e) {
295
+ return Array.isArray(e) ? e.map(v) : !e || typeof e != "object" ? e : Object.fromEntries(Object.entries(e).map(([t, n]) => [b(t), v(n)]));
285
296
  }
286
297
  function H(e, t = {}) {
287
298
  const { entrySeparator: n = "", keyValueSeparator: r = "", wrapValue: o, resolve: s } = t;
288
- return Object.entries(e).map(([i, c]) => {
299
+ return Object.entries(e).map(([i, a]) => {
289
300
  if (s) {
290
- const l = s({ key: i, value: c });
291
- if (l !== void 0)
292
- return l;
301
+ const u = s({ key: i, value: a });
302
+ if (u !== void 0)
303
+ return u;
293
304
  }
294
- const a = typeof c == "object" ? H(c, t) : typeof c == "number" ? c.toString() : typeof c == "string" && o ? `${o}${c.replace(new RegExp(o, "g"), `\\${o}`)}${o}` : c;
295
- return `${i}${r}${a}`;
305
+ const c = typeof a == "object" ? H(a, t) : typeof a == "number" ? a.toString() : typeof a == "string" && o ? `${o}${a.replace(new RegExp(o, "g"), `\\${o}`)}${o}` : a;
306
+ return `${i}${r}${c}`;
296
307
  }).join(n);
297
308
  }
298
- function x(e, t) {
309
+ function R(e, t) {
299
310
  const n = k(t), r = b(e), o = q(r);
300
311
  if (!E.has(r))
301
312
  return [{ [o]: r, ...n }];
302
313
  const s = Object.fromEntries(
303
- Object.entries(n).map(([i, c]) => [`${e}${i === "url" ? "" : `${i[0].toUpperCase()}${i.slice(1)}`}`, c])
314
+ Object.entries(n).map(([i, a]) => [`${e}${i === "url" ? "" : `${i[0].toUpperCase()}${i.slice(1)}`}`, a])
304
315
  );
305
- return P(s || {}).sort((i, c) => {
306
- var a, l;
307
- return (((a = i[o]) == null ? void 0 : a.length) || 0) - (((l = c[o]) == null ? void 0 : l.length) || 0);
316
+ return $(s || {}).sort((i, a) => {
317
+ var c, u;
318
+ return (((c = i[o]) == null ? void 0 : c.length) || 0) - (((u = a[o]) == null ? void 0 : u.length) || 0);
308
319
  });
309
320
  }
310
321
  function q(e) {
@@ -314,12 +325,12 @@ function q(e) {
314
325
  const t = b(e), n = t.indexOf(":");
315
326
  return n === -1 ? "name" : w.OG.has(t.slice(0, n)) ? "property" : "name";
316
327
  }
317
- function ie(e) {
318
- return se[e] || b(e);
328
+ function ce(e) {
329
+ return ae[e] || b(e);
319
330
  }
320
- function ce(e, t) {
331
+ function ue(e, t) {
321
332
  var n;
322
- return t === "refresh" ? `${e.seconds};url=${e.url}` : H(j(e), {
333
+ return t === "refresh" ? `${e.seconds};url=${e.url}` : H(v(e), {
323
334
  keyValueSeparator: "=",
324
335
  entrySeparator: ", ",
325
336
  resolve: ({ value: r, key: o }) => r === null ? "" : typeof r == "boolean" ? o : void 0,
@@ -327,7 +338,7 @@ function ce(e, t) {
327
338
  ...(n = L[t]) == null ? void 0 : n.unpack
328
339
  });
329
340
  }
330
- function P(e) {
341
+ function $(e) {
331
342
  const t = [], n = {};
332
343
  for (const [o, s] of Object.entries(e)) {
333
344
  if (Array.isArray(s)) {
@@ -339,114 +350,114 @@ function P(e) {
339
350
  }
340
351
  for (const i of s)
341
352
  if (typeof i == "object" && i !== null) {
342
- const c = [], a = [];
343
- for (const [l, y] of Object.entries(i)) {
344
- const p = `${o}${l === "url" ? "" : `:${l}`}`, u = P({ [p]: y });
345
- (l === "url" ? c : a).push(...u);
353
+ const a = [], c = [];
354
+ for (const [u, y] of Object.entries(i)) {
355
+ const l = `${o}${u === "url" ? "" : `:${u}`}`, f = $({ [l]: y });
356
+ (u === "url" ? a : c).push(...f);
346
357
  }
347
- t.push(...c, ...a);
358
+ t.push(...a, ...c);
348
359
  } else
349
- t.push(...typeof i == "string" ? P({ [o]: i }) : x(o, i));
360
+ t.push(...typeof i == "string" ? $({ [o]: i }) : R(o, i));
350
361
  continue;
351
362
  }
352
363
  if (typeof s == "object" && s)
353
364
  if (w.MEDIA.has(o)) {
354
- const i = o.startsWith("twitter") ? "twitter" : "og", c = o.replace(/^(og|twitter)/, "").toLowerCase(), a = i === "twitter" ? "name" : "property";
365
+ const i = o.startsWith("twitter") ? "twitter" : "og", a = o.replace(/^(og|twitter)/, "").toLowerCase(), c = i === "twitter" ? "name" : "property";
355
366
  s.url && t.push({
356
- [a]: `${i}:${c}`,
367
+ [c]: `${i}:${a}`,
357
368
  content: s.url
358
369
  }), s.secureUrl && t.push({
359
- [a]: `${i}:${c}:secure_url`,
370
+ [c]: `${i}:${a}:secure_url`,
360
371
  content: s.secureUrl
361
372
  });
362
- for (const [l, y] of Object.entries(s))
363
- l !== "url" && l !== "secureUrl" && t.push({
364
- [a]: `${i}:${c}:${l}`,
373
+ for (const [u, y] of Object.entries(s))
374
+ u !== "url" && u !== "secureUrl" && t.push({
375
+ [c]: `${i}:${a}:${u}`,
365
376
  // @ts-expect-error untyped
366
377
  content: y
367
378
  });
368
- } else E.has(b(o)) ? t.push(...x(o, s)) : n[o] = k(s);
379
+ } else E.has(b(o)) ? t.push(...R(o, s)) : n[o] = k(s);
369
380
  else
370
381
  n[o] = s;
371
382
  }
372
383
  const r = Object.entries(n).map(([o, s]) => {
373
384
  if (o === "charset")
374
385
  return { charset: s === null ? "_null" : s };
375
- const i = q(o), c = ie(o), a = s === null ? "_null" : typeof s == "object" ? ce(s, o) : typeof s == "number" ? s.toString() : s;
376
- return i === "http-equiv" ? { "http-equiv": c, content: a } : { [i]: c, content: a };
386
+ const i = q(o), a = ce(o), c = s === null ? "_null" : typeof s == "object" ? ue(s, o) : typeof s == "number" ? s.toString() : s;
387
+ return i === "http-equiv" ? { "http-equiv": a, content: c } : { [i]: a, content: c };
377
388
  });
378
389
  return [...t, ...r].map(
379
390
  (o) => "content" in o && o.content === "_null" ? { ...o, content: null } : o
380
391
  );
381
392
  }
382
- const ae = {
393
+ const le = {
383
394
  key: "flatMeta",
384
395
  hooks: {
385
396
  "entries:normalize": (e) => {
386
397
  const t = [];
387
- e.tags = e.tags.map((n) => n.tag !== "_flatMeta" ? n : (t.push(P(n.props).map((r) => ({
398
+ e.tags = e.tags.map((n) => n.tag !== "_flatMeta" ? n : (t.push($(n.props).map((r) => ({
388
399
  ...n,
389
400
  tag: "meta",
390
401
  props: r
391
402
  }))), !1)).filter(Boolean).concat(...t);
392
403
  }
393
404
  }
394
- }, le = ["name", "property", "http-equiv"], ue = /* @__PURE__ */ new Set([
405
+ }, pe = ["name", "property", "http-equiv"], fe = /* @__PURE__ */ new Set([
395
406
  "viewport",
396
407
  "description",
397
408
  "keywords",
398
409
  "robots"
399
410
  ]);
400
- function Ie(e) {
411
+ function Ce(e) {
401
412
  const t = e.split(":");
402
413
  return t.length ? E.has(t[1]) : !1;
403
414
  }
404
- function Ee(e) {
415
+ function Re(e) {
405
416
  const { props: t, tag: n } = e;
406
- if (re.has(n))
417
+ if (se.has(n))
407
418
  return n;
408
419
  if (n === "link" && t.rel === "canonical")
409
420
  return "canonical";
410
421
  if (t.charset)
411
422
  return "charset";
412
423
  if (e.tag === "meta") {
413
- for (const r of le)
424
+ for (const r of pe)
414
425
  if (t[r] !== void 0) {
415
- const o = t[r], s = o && typeof o == "string" && o.includes(":"), i = o && ue.has(o), a = !(s || i) && e.key ? `:key:${e.key}` : "";
416
- return `${n}:${o}${a}`;
426
+ const o = t[r], s = o && typeof o == "string" && o.includes(":"), i = o && fe.has(o), c = !(s || i) && e.key ? `:key:${e.key}` : "";
427
+ return `${n}:${o}${c}`;
417
428
  }
418
429
  }
419
430
  if (e.key)
420
431
  return `${n}:key:${e.key}`;
421
432
  if (t.id)
422
433
  return `${n}:id:${t.id}`;
423
- if (ne.has(n)) {
434
+ if (oe.has(n)) {
424
435
  const r = e.textContent || e.innerHTML;
425
436
  if (r)
426
437
  return `${n}:content:${r}`;
427
438
  }
428
439
  }
429
- function Ce(e) {
440
+ function _e(e) {
430
441
  const t = e._h || e._d;
431
442
  if (t)
432
443
  return t;
433
444
  const n = e.textContent || e.innerHTML;
434
445
  return n || `${e.tag}:${Object.entries(e.props).map(([r, o]) => `${r}:${String(o)}`).join(",")}`;
435
446
  }
436
- function $(e, t, n) {
447
+ function P(e, t, n) {
437
448
  typeof e === "function" && (!n || n !== "titleTemplate" && !(n[0] === "o" && n[1] === "n")) && (e = e());
438
449
  const o = t ? t(n, e) : e;
439
450
  if (Array.isArray(o))
440
- return o.map((s) => $(s, t));
451
+ return o.map((s) => P(s, t));
441
452
  if ((o == null ? void 0 : o.constructor) === Object) {
442
453
  const s = {};
443
454
  for (const i of Object.keys(o))
444
- s[i] = $(o[i], t, i);
455
+ s[i] = P(o[i], t, i);
445
456
  return s;
446
457
  }
447
458
  return o;
448
459
  }
449
- function pe(e, t) {
460
+ function he(e, t) {
450
461
  const n = e === "style" ? /* @__PURE__ */ new Map() : /* @__PURE__ */ new Set();
451
462
  function r(o) {
452
463
  if (o == null || o === void 0)
@@ -454,8 +465,8 @@ function pe(e, t) {
454
465
  const s = String(o).trim();
455
466
  if (s)
456
467
  if (e === "style") {
457
- const [i, ...c] = s.split(":").map((a) => a ? a.trim() : "");
458
- i && c.length && n.set(i, c.join(":"));
468
+ const [i, ...a] = s.split(":").map((c) => c ? c.trim() : "");
469
+ i && a.length && n.set(i, a.join(":"));
459
470
  } else
460
471
  s.split(" ").filter(Boolean).forEach((i) => n.add(i));
461
472
  }
@@ -463,22 +474,22 @@ function pe(e, t) {
463
474
  s && s !== "false" && (e === "style" ? n.set(String(o).trim(), String(s)) : r(o));
464
475
  }), n;
465
476
  }
466
- function fe(e, t) {
477
+ function de(e, t) {
467
478
  return e.props = e.props || {}, t ? e.tag === "templateParams" ? (e.props = t, e) : (Object.entries(t).forEach(([n, r]) => {
468
479
  if (r === null) {
469
480
  e.props[n] = null;
470
481
  return;
471
482
  }
472
483
  if (n === "class" || n === "style") {
473
- e.props[n] = pe(n, r);
484
+ e.props[n] = he(n, r);
474
485
  return;
475
486
  }
476
- if (oe.has(n)) {
487
+ if (ie.has(n)) {
477
488
  if (["textContent", "innerHTML"].includes(n) && typeof r == "object") {
478
- let c = t.type;
479
- if (t.type || (c = "application/json"), !(c != null && c.endsWith("json")) && c !== "speculationrules")
489
+ let a = t.type;
490
+ if (t.type || (a = "application/json"), !(a != null && a.endsWith("json")) && a !== "speculationrules")
480
491
  return;
481
- t.type = c, e.props.type = c, e[n] = JSON.stringify(r);
492
+ t.type = a, e.props.type = a, e[n] = JSON.stringify(r);
482
493
  } else
483
494
  e[n] = r;
484
495
  return;
@@ -487,11 +498,11 @@ function fe(e, t) {
487
498
  o === "true" || o === "" ? e.props[n] = s || i ? o : !0 : !r && s && o === "false" ? e.props[n] = "false" : r !== void 0 && (e.props[n] = r);
488
499
  }), e) : e;
489
500
  }
490
- function he(e, t) {
491
- const n = typeof t == "object" && typeof t != "function" ? t : { [e === "script" || e === "noscript" || e === "style" ? "innerHTML" : "textContent"]: t }, r = fe({ tag: e, props: {} }, n);
492
- return r.key && te.has(r.tag) && (r.props["data-hid"] = r._h = r.key), r.tag === "script" && typeof r.innerHTML == "object" && (r.innerHTML = JSON.stringify(r.innerHTML), r.props.type = r.props.type || "application/json"), Array.isArray(r.props.content) ? r.props.content.map((o) => ({ ...r, props: { ...r.props, content: o } })) : r;
501
+ function me(e, t) {
502
+ const n = typeof t == "object" && typeof t != "function" ? t : { [e === "script" || e === "noscript" || e === "style" ? "innerHTML" : "textContent"]: t }, r = de({ tag: e, props: {} }, n);
503
+ return r.key && re.has(r.tag) && (r.props["data-hid"] = r._h = r.key), r.tag === "script" && typeof r.innerHTML == "object" && (r.innerHTML = JSON.stringify(r.innerHTML), r.props.type = r.props.type || "application/json"), Array.isArray(r.props.content) ? r.props.content.map((o) => ({ ...r, props: { ...r.props, content: o } })) : r;
493
504
  }
494
- function _e(e, t) {
505
+ function xe(e, t) {
495
506
  if (!e)
496
507
  return [];
497
508
  typeof e == "function" && (e = e());
@@ -502,15 +513,15 @@ function _e(e, t) {
502
513
  };
503
514
  e = n(void 0, e);
504
515
  const r = [];
505
- return e = $(e, n), Object.entries(e || {}).forEach(([o, s]) => {
516
+ return e = P(e, n), Object.entries(e || {}).forEach(([o, s]) => {
506
517
  if (s !== void 0)
507
518
  for (const i of Array.isArray(s) ? s : [s])
508
- r.push(he(o, i));
519
+ r.push(me(o, i));
509
520
  }), r.flat();
510
521
  }
511
- const me = (e, t) => G(t) ? B(t) : t, z = "usehead";
522
+ const ge = (e, t) => G(t) ? F(t) : t, z = "usehead";
512
523
  // @__NO_SIDE_EFFECTS__
513
- function xe(e) {
524
+ function Ve(e) {
514
525
  return {
515
526
  install(n) {
516
527
  n.config.globalProperties.$unhead = e, n.config.globalProperties.$head = e, n.provide(z, e);
@@ -519,44 +530,44 @@ function xe(e) {
519
530
  }
520
531
  // @__NO_SIDE_EFFECTS__
521
532
  function N() {
522
- if (F()) {
523
- const e = J(z);
533
+ if (J()) {
534
+ const e = Q(z);
524
535
  if (!e)
525
536
  throw new Error("useHead() was called without provide context, ensure you call it through the setup() function.");
526
537
  return e;
527
538
  }
528
539
  throw new Error("useHead() was called without provide context, ensure you call it through the setup() function.");
529
540
  }
530
- function C(e, t = {}) {
541
+ function I(e, t = {}) {
531
542
  const n = t.head || /* @__PURE__ */ N();
532
- return n.ssr ? n.push(e || {}, t) : de(n, e, t);
543
+ return n.ssr ? n.push(e || {}, t) : ye(n, e, t);
533
544
  }
534
- function de(e, t, n = {}) {
535
- const r = I(!1);
545
+ function ye(e, t, n = {}) {
546
+ const r = O(!1);
536
547
  let o;
537
- return Q(() => {
538
- const i = r.value ? {} : $(t, me);
548
+ return Z(() => {
549
+ const i = r.value ? {} : P(t, ge);
539
550
  o ? o.patch(i) : o = e.push(i, n);
540
- }), Z() && (X(() => {
551
+ }), X() && (Y(() => {
541
552
  o.dispose();
542
- }), Y(() => {
543
- r.value = !0;
544
553
  }), ee(() => {
554
+ r.value = !0;
555
+ }), te(() => {
545
556
  r.value = !1;
546
557
  })), o;
547
558
  }
548
- function O(e = {}, t = {}) {
549
- (t.head || /* @__PURE__ */ N()).use(ae);
559
+ function j(e = {}, t = {}) {
560
+ (t.head || /* @__PURE__ */ N()).use(le);
550
561
  const { title: r, titleTemplate: o, ...s } = e;
551
- return C({
562
+ return I({
552
563
  title: r,
553
564
  titleTemplate: o,
554
565
  _flatMeta: s
555
566
  }, t);
556
567
  }
557
- function Ve() {
568
+ function Ue() {
558
569
  function e(n) {
559
- O({
570
+ j({
560
571
  ogSiteName: n.siteName,
561
572
  ogLocale: n.locale
562
573
  });
@@ -567,27 +578,27 @@ function Ve() {
567
578
  description: o,
568
579
  keywords: s,
569
580
  image: i,
570
- url: c,
571
- type: a = "website"
572
- } = n, l = o && o.length > 155 ? `${o.substring(0, 152)}...` : o;
573
- C({
581
+ url: a,
582
+ type: c = "website"
583
+ } = n, u = o && o.length > 155 ? `${o.substring(0, 152)}...` : o;
584
+ I({
574
585
  title: r,
575
- link: c ? [{
586
+ link: a ? [{
576
587
  rel: "canonical",
577
- href: c
588
+ href: a
578
589
  }] : []
579
- }), O({
580
- description: l || o,
590
+ }), j({
591
+ description: u || o,
581
592
  keywords: s,
582
593
  ogTitle: r,
583
- ogDescription: l || o,
584
- ogType: a === "product" ? void 0 : a,
594
+ ogDescription: u || o,
595
+ ogType: c === "product" ? void 0 : c,
585
596
  // product 类型不被支持,跳过
586
- ogUrl: c,
597
+ ogUrl: a,
587
598
  ogImage: i,
588
599
  twitterCard: "summary_large_image",
589
600
  twitterTitle: r,
590
- twitterDescription: l || o,
601
+ twitterDescription: u || o,
591
602
  twitterImage: i
592
603
  });
593
604
  }
@@ -596,63 +607,63 @@ function Ve() {
596
607
  setPageSEO: t
597
608
  };
598
609
  }
599
- function Ke() {
600
- const e = K(), t = () => e.meta;
601
- C({
602
- title: d(() => t().title || ""),
603
- link: d(() => {
610
+ function De() {
611
+ const e = x(), t = () => e.meta;
612
+ I({
613
+ title: m(() => t().title || ""),
614
+ link: m(() => {
604
615
  const n = t();
605
616
  return n.url ? [{
606
617
  rel: "canonical",
607
618
  href: n.url
608
619
  }] : [];
609
620
  })
610
- }), O({
611
- description: d(() => {
621
+ }), j({
622
+ description: m(() => {
612
623
  const r = t().description;
613
624
  if (r)
614
625
  return r.length > 155 ? `${r.substring(0, 152)}...` : r;
615
626
  }),
616
- keywords: d(() => t().keywords),
617
- ogTitle: d(() => t().title),
618
- ogDescription: d(() => {
627
+ keywords: m(() => t().keywords),
628
+ ogTitle: m(() => t().title),
629
+ ogDescription: m(() => {
619
630
  const r = t().description;
620
631
  if (r)
621
632
  return r.length > 155 ? `${r.substring(0, 152)}...` : r;
622
633
  }),
623
- ogType: d(() => {
634
+ ogType: m(() => {
624
635
  const r = t().type || "website";
625
636
  return r === "product" ? void 0 : r;
626
637
  }),
627
- ogUrl: d(() => t().url),
628
- ogImage: d(() => t().image),
638
+ ogUrl: m(() => t().url),
639
+ ogImage: m(() => t().image),
629
640
  twitterCard: "summary_large_image",
630
- twitterTitle: d(() => t().title),
631
- twitterDescription: d(() => {
641
+ twitterTitle: m(() => t().title),
642
+ twitterDescription: m(() => {
632
643
  const r = t().description;
633
644
  if (r)
634
645
  return r.length > 155 ? `${r.substring(0, 152)}...` : r;
635
646
  }),
636
- twitterImage: d(() => t().image)
647
+ twitterImage: m(() => t().image)
637
648
  });
638
649
  }
639
650
  export {
640
- ve as H,
641
- Oe as U,
642
- je as V,
643
- Pe as a,
644
- Te as b,
645
- Me as c,
646
- Ke as d,
647
- Ve as e,
648
- $e as f,
651
+ Oe as H,
652
+ Ie as U,
653
+ Ee as V,
654
+ Te as a,
655
+ ve as b,
656
+ je as c,
657
+ De as d,
658
+ Ue as e,
659
+ Me as f,
649
660
  A as g,
650
- Ee as h,
651
- Ie as i,
652
- Ce as j,
653
- fe as k,
654
- _e as n,
655
- we as u,
656
- xe as v,
657
- Ae as w
661
+ Re as h,
662
+ Ce as i,
663
+ _e as j,
664
+ de as k,
665
+ xe as n,
666
+ $e as u,
667
+ Ve as v,
668
+ Pe as w
658
669
  };