@huyooo/ui 0.5.33 → 0.5.36

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,17 +1,17 @@
1
- import { ref as M, computed as h, watch as V, toValue as z, isRef as N, hasInjectionContext as G, inject as W, watchEffect as B, getCurrentInstance as F, onBeforeUnmount as J, onDeactivated as Q, onActivated as Z } from "vue";
1
+ import { ref as I, computed as h, watch as C, toValue as N, isRef as G, hasInjectionContext as W, inject as B, watchEffect as F, getCurrentInstance as J, onBeforeUnmount as Q, onDeactivated as Z, onActivated as X } from "vue";
2
2
  import { useRouter as _, useRoute as x } from "vue-router";
3
3
  import { u as R } from "./useAuthkitAppsAuthPageInfo-Ct-ElH04.js";
4
4
  import { a as U } from "./useAuthkitUsersProfile-B1y2nleU.js";
5
- const $ = M({
5
+ const v = I({
6
6
  key: "",
7
7
  name: ""
8
8
  });
9
9
  function be() {
10
10
  function e(t, n) {
11
- $.value.key = t, $.value.name = n;
11
+ v.value.key = t, v.value.name = n;
12
12
  }
13
13
  return {
14
- activeDoc: $,
14
+ activeDoc: v,
15
15
  setActiveDoc: e
16
16
  };
17
17
  }
@@ -30,12 +30,14 @@ function we(e, t = "default") {
30
30
  } else
31
31
  e();
32
32
  }
33
+ function K(e, t) {
34
+ return Array.isArray(e == null ? void 0 : e.menuTypes) ? e.menuTypes.includes(t) : !1;
35
+ }
33
36
  function Se(e, t, n) {
34
- var r;
35
- for (let o = e.length - 1; o >= 0; o--) {
36
- const s = e[o];
37
- if (((r = s.meta) == null ? void 0 : r.menuType) === t)
38
- return s.path;
37
+ for (let r = e.length - 1; r >= 0; r--) {
38
+ const o = e[r];
39
+ if (K(o.meta, t))
40
+ return o.path;
39
41
  }
40
42
  return n;
41
43
  }
@@ -46,47 +48,47 @@ function Ae(e) {
46
48
  isLoggedIn: r,
47
49
  userProfile: o
48
50
  } = U(), s = h(() => {
49
- var m;
50
- return !r.value || !o.value ? [] : ((m = o.value.permissions) == null ? void 0 : m.map((l) => l.permissionKey)) || [];
51
+ var p;
52
+ return !r.value || !o.value ? [] : ((p = o.value.permissions) == null ? void 0 : p.map((a) => a.permissionKey)) || [];
51
53
  });
52
- function i(m) {
53
- return (n.value.publicRoutes || []).some((d) => d.permissionKey === m);
54
+ function i(p) {
55
+ return (n.value.publicRoutes || []).some((d) => d.permissionKey === p);
54
56
  }
55
- function c(m) {
56
- return r.value ? s.value.includes(m) : !1;
57
+ function c(p) {
58
+ return r.value ? s.value.includes(p) : !1;
57
59
  }
58
- function a(m) {
59
- var l;
60
+ function l(p) {
61
+ var a;
60
62
  return {
61
- path: m.path,
62
- name: m.name,
63
- meta: m.meta,
64
- children: (l = m.children) == null ? void 0 : l.map((d) => a(d))
63
+ path: p.path,
64
+ name: p.name,
65
+ meta: p.meta,
66
+ children: (a = p.children) == null ? void 0 : a.map((d) => l(d))
65
67
  };
66
68
  }
67
- function p(m, l) {
69
+ function u(p, a) {
68
70
  const d = [];
69
- for (const u of m) {
70
- if (u.path === "/" || u.path === "/:catchAll(.*)")
71
+ for (const f of p) {
72
+ if (f.path === "/" || f.path === "/:catchAll(.*)")
71
73
  continue;
72
- const f = u.meta;
73
- if ((f == null ? void 0 : f.menuType) === l) {
74
- const w = u.path;
74
+ const m = f.meta;
75
+ if (K(m, a)) {
76
+ const w = f.path;
75
77
  if (i(w) || c(w)) {
76
- const E = {
77
- name: (f == null ? void 0 : f.menuName) || (f == null ? void 0 : f.title) || (typeof u.name == "string" ? u.name : u.path),
78
- path: u.path,
79
- icon: (f == null ? void 0 : f.menuIcon) || (f == null ? void 0 : f.icon),
80
- hidden: f == null ? void 0 : f.hidden
78
+ const P = {
79
+ name: (m == null ? void 0 : m.menuName) || (m == null ? void 0 : m.title) || (typeof f.name == "string" ? f.name : f.path),
80
+ path: f.path,
81
+ icon: (m == null ? void 0 : m.menuIcon) || (m == null ? void 0 : m.icon),
82
+ hidden: m == null ? void 0 : m.hidden
81
83
  };
82
- if (u.children && u.children.length > 0) {
83
- const O = p(u.children, l);
84
- O.length > 0 && (E.children = O);
84
+ if (f.children && f.children.length > 0) {
85
+ const A = u(f.children, a);
86
+ A.length > 0 && (P.children = A);
85
87
  }
86
- d.push(E);
88
+ d.push(P);
87
89
  }
88
- } else if (u.children && u.children.length > 0) {
89
- const w = p(u.children, l);
90
+ } else if (f.children && f.children.length > 0) {
91
+ const w = u(f.children, a);
90
92
  d.push(...w);
91
93
  }
92
94
  }
@@ -96,11 +98,11 @@ function Ae(e) {
96
98
  menus: h(() => {
97
99
  if (!e)
98
100
  return [];
99
- const d = t.getRoutes().filter((u) => u.path === "/" || u.path === "/:catchAll(.*)" ? !1 : u.path.split("/").filter((I) => I).length === 1).map(a);
100
- return console.log(p(d, e), "过滤菜单"), p(d, e);
101
+ const p = t.getRoutes(), a = p.find((y) => y.path === "/"), d = a != null && a.children ? a.children.map((y) => l(y)) : [], m = p.filter((y) => y.path === "/" || y.path === "/:catchAll(.*)" ? !1 : y.path.split("/").filter((A) => A).length === 1).map(l), w = [...d, ...m];
102
+ return console.log(u(w, e), "过滤菜单"), u(w, e);
101
103
  }),
102
104
  isRoutePublic: i,
103
- hasPermission: (m) => i(m) ? !0 : c(m),
105
+ hasPermission: (p) => i(p) ? !0 : c(p),
104
106
  isLoggedIn: r
105
107
  };
106
108
  }
@@ -113,47 +115,47 @@ function $e() {
113
115
  userProfile: s,
114
116
  isLoggedIn: i,
115
117
  usersProfileSuccess: c
116
- } = U(), a = M(!1);
117
- function p(l) {
118
- return (r.value.publicRoutes || []).some((u) => u.permissionKey === l);
118
+ } = U(), l = I(!1);
119
+ function u(a) {
120
+ return (r.value.publicRoutes || []).some((f) => f.permissionKey === a);
119
121
  }
120
- function y(l) {
121
- var u;
122
- return !i.value || !s.value ? !1 : (((u = s.value.permissions) == null ? void 0 : u.map((f) => f.permissionKey)) || []).includes(l);
122
+ function b(a) {
123
+ var f;
124
+ return !i.value || !s.value ? !1 : (((f = s.value.permissions) == null ? void 0 : f.map((m) => m.permissionKey)) || []).includes(a);
123
125
  }
124
- function m(l) {
125
- var d, u;
126
+ function p(a) {
127
+ var d, f;
126
128
  if (!o.value) {
127
- console.log("权限检查跳过:appsAuthPageInfoSuccess 未加载完成", l);
129
+ console.log("权限检查跳过:appsAuthPageInfoSuccess 未加载完成", a);
128
130
  return;
129
131
  }
130
- if (a.value = !0, p(l)) {
131
- console.log("权限检查通过:公开路由", l), a.value = !1;
132
+ if (l.value = !0, u(a)) {
133
+ console.log("权限检查通过:公开路由", a), l.value = !1;
132
134
  return;
133
135
  }
134
136
  if (!c.value) {
135
- console.log("权限检查跳过:usersProfileSuccess 未加载完成,等待...", l), a.value = !1;
137
+ console.log("权限检查跳过:usersProfileSuccess 未加载完成,等待...", a), l.value = !1;
136
138
  return;
137
139
  }
138
140
  if (!i.value) {
139
- console.log("权限检查失败:未登录,重定向到首页", l), e.replace("/"), a.value = !1;
141
+ console.log("权限检查失败:未登录,重定向到首页", a), e.replace("/"), l.value = !1;
140
142
  return;
141
143
  }
142
- y(l) ? console.log("权限检查通过:有权限", l) : (console.log("权限检查失败:无权限,重定向到首页", l, {
143
- permissions: (u = (d = s.value) == null ? void 0 : d.permissions) == null ? void 0 : u.map((f) => f.permissionKey)
144
- }), e.replace("/")), a.value = !1;
144
+ b(a) ? console.log("权限检查通过:有权限", a) : (console.log("权限检查失败:无权限,重定向到首页", a, {
145
+ permissions: (f = (d = s.value) == null ? void 0 : d.permissions) == null ? void 0 : f.map((m) => m.permissionKey)
146
+ }), e.replace("/")), l.value = !1;
145
147
  }
146
- return n(), V(() => t.path, (l) => {
147
- m(l);
148
- }), V([o, c], ([l]) => {
149
- l && m(t.path);
148
+ return n(), C(() => t.path, (a) => {
149
+ p(a);
150
+ }), C([o, c], ([a]) => {
151
+ a && p(t.path);
150
152
  }), {
151
- isChecking: a,
152
- isRoutePublic: p,
153
- hasPermission: y
153
+ isChecking: l,
154
+ isRoutePublic: u,
155
+ hasPermission: b
154
156
  };
155
157
  }
156
- const X = /* @__PURE__ */ new Set(["link", "style", "script", "noscript"]), Y = /* @__PURE__ */ new Set(["title", "titleTemplate", "script", "style", "noscript"]), Te = /* @__PURE__ */ new Set([
158
+ const Y = /* @__PURE__ */ new Set(["link", "style", "script", "noscript"]), ee = /* @__PURE__ */ new Set(["title", "titleTemplate", "script", "style", "noscript"]), Te = /* @__PURE__ */ new Set([
157
159
  "base",
158
160
  "meta",
159
161
  "link",
@@ -170,7 +172,7 @@ const X = /* @__PURE__ */ new Set(["link", "style", "script", "noscript"]), Y =
170
172
  "style",
171
173
  "script",
172
174
  "noscript"
173
- ]), ee = /* @__PURE__ */ new Set(["base", "title", "titleTemplate", "bodyAttrs", "htmlAttrs", "templateParams"]), te = /* @__PURE__ */ new Set(["key", "tagPosition", "tagPriority", "tagDuplicateStrategy", "innerHTML", "textContent", "processTemplateParams"]), Me = /* @__PURE__ */ new Set(["templateParams", "htmlAttrs", "bodyAttrs"]), j = /* @__PURE__ */ new Set([
175
+ ]), te = /* @__PURE__ */ new Set(["base", "title", "titleTemplate", "bodyAttrs", "htmlAttrs", "templateParams"]), ne = /* @__PURE__ */ new Set(["key", "tagPosition", "tagPriority", "tagDuplicateStrategy", "innerHTML", "textContent", "processTemplateParams"]), ve = /* @__PURE__ */ new Set(["templateParams", "htmlAttrs", "bodyAttrs"]), E = /* @__PURE__ */ new Set([
174
176
  "theme-color",
175
177
  "google-site-verification",
176
178
  "og",
@@ -179,12 +181,12 @@ const X = /* @__PURE__ */ new Set(["link", "style", "script", "noscript"]), Y =
179
181
  "profile",
180
182
  "twitter",
181
183
  "author"
182
- ]), b = {
184
+ ]), S = {
183
185
  META: /* @__PURE__ */ new Set(["twitter"]),
184
186
  OG: /* @__PURE__ */ new Set(["og", "book", "article", "profile", "fb"]),
185
187
  MEDIA: /* @__PURE__ */ new Set(["ogImage", "ogVideo", "ogAudio", "twitterImage"]),
186
188
  HTTP_EQUIV: /* @__PURE__ */ new Set(["contentType", "defaultStyle", "xUaCompatible"])
187
- }, ne = {
189
+ }, re = {
188
190
  articleExpirationTime: "article:expiration_time",
189
191
  articleModifiedTime: "article:modified_time",
190
192
  articlePublishedTime: "article:published_time",
@@ -203,7 +205,7 @@ const X = /* @__PURE__ */ new Set(["link", "style", "script", "noscript"]), Y =
203
205
  msapplicationConfig: "msapplication-Config",
204
206
  msapplicationTileColor: "msapplication-TileColor",
205
207
  msapplicationTileImage: "msapplication-TileImage"
206
- }, K = {
208
+ }, L = {
207
209
  appleItunesApp: {
208
210
  unpack: {
209
211
  entrySeparator: ", ",
@@ -238,59 +240,59 @@ const X = /* @__PURE__ */ new Set(["link", "style", "script", "noscript"]), Y =
238
240
  };
239
241
  function g(e) {
240
242
  const t = e.replace(/([A-Z])/g, "-$1").toLowerCase(), n = t.indexOf("-");
241
- return n === -1 ? t : b.META.has(t.slice(0, n)) || b.OG.has(t.slice(0, n)) ? e.replace(/([A-Z])/g, ":$1").toLowerCase() : t;
243
+ return n === -1 ? t : S.META.has(t.slice(0, n)) || S.OG.has(t.slice(0, n)) ? e.replace(/([A-Z])/g, ":$1").toLowerCase() : t;
242
244
  }
243
245
  function D(e) {
244
246
  return Object.fromEntries(Object.entries(e).filter(([t, n]) => String(n) !== "false" && t));
245
247
  }
246
- function T(e) {
247
- return Array.isArray(e) ? e.map(T) : !e || typeof e != "object" ? e : Object.fromEntries(Object.entries(e).map(([t, n]) => [g(t), T(n)]));
248
+ function j(e) {
249
+ return Array.isArray(e) ? e.map(j) : !e || typeof e != "object" ? e : Object.fromEntries(Object.entries(e).map(([t, n]) => [g(t), j(n)]));
248
250
  }
249
- function L(e, t = {}) {
251
+ function H(e, t = {}) {
250
252
  const { entrySeparator: n = "", keyValueSeparator: r = "", wrapValue: o, resolve: s } = t;
251
253
  return Object.entries(e).map(([i, c]) => {
252
254
  if (s) {
253
- const p = s({ key: i, value: c });
254
- if (p !== void 0)
255
- return p;
255
+ const u = s({ key: i, value: c });
256
+ if (u !== void 0)
257
+ return u;
256
258
  }
257
- const a = typeof c == "object" ? L(c, t) : typeof c == "number" ? c.toString() : typeof c == "string" && o ? `${o}${c.replace(new RegExp(o, "g"), `\\${o}`)}${o}` : c;
258
- return `${i}${r}${a}`;
259
+ const l = 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;
260
+ return `${i}${r}${l}`;
259
261
  }).join(n);
260
262
  }
261
- function C(e, t) {
262
- const n = D(t), r = g(e), o = H(r);
263
- if (!j.has(r))
263
+ function V(e, t) {
264
+ const n = D(t), r = g(e), o = k(r);
265
+ if (!E.has(r))
264
266
  return [{ [o]: r, ...n }];
265
267
  const s = Object.fromEntries(
266
268
  Object.entries(n).map(([i, c]) => [`${e}${i === "url" ? "" : `${i[0].toUpperCase()}${i.slice(1)}`}`, c])
267
269
  );
268
- return S(s || {}).sort((i, c) => {
269
- var a, p;
270
- return (((a = i[o]) == null ? void 0 : a.length) || 0) - (((p = c[o]) == null ? void 0 : p.length) || 0);
270
+ return $(s || {}).sort((i, c) => {
271
+ var l, u;
272
+ return (((l = i[o]) == null ? void 0 : l.length) || 0) - (((u = c[o]) == null ? void 0 : u.length) || 0);
271
273
  });
272
274
  }
273
- function H(e) {
275
+ function k(e) {
274
276
  var r;
275
- if (((r = K[e]) == null ? void 0 : r.metaKey) === "http-equiv" || b.HTTP_EQUIV.has(e))
277
+ if (((r = L[e]) == null ? void 0 : r.metaKey) === "http-equiv" || S.HTTP_EQUIV.has(e))
276
278
  return "http-equiv";
277
279
  const t = g(e), n = t.indexOf(":");
278
- return n === -1 ? "name" : b.OG.has(t.slice(0, n)) ? "property" : "name";
280
+ return n === -1 ? "name" : S.OG.has(t.slice(0, n)) ? "property" : "name";
279
281
  }
280
- function re(e) {
281
- return ne[e] || g(e);
282
+ function oe(e) {
283
+ return re[e] || g(e);
282
284
  }
283
- function oe(e, t) {
285
+ function se(e, t) {
284
286
  var n;
285
- return t === "refresh" ? `${e.seconds};url=${e.url}` : L(T(e), {
287
+ return t === "refresh" ? `${e.seconds};url=${e.url}` : H(j(e), {
286
288
  keyValueSeparator: "=",
287
289
  entrySeparator: ", ",
288
290
  resolve: ({ value: r, key: o }) => r === null ? "" : typeof r == "boolean" ? o : void 0,
289
291
  // @ts-expect-error untyped
290
- ...(n = K[t]) == null ? void 0 : n.unpack
292
+ ...(n = L[t]) == null ? void 0 : n.unpack
291
293
  });
292
294
  }
293
- function S(e) {
295
+ function $(e) {
294
296
  const t = [], n = {};
295
297
  for (const [o, s] of Object.entries(e)) {
296
298
  if (Array.isArray(s)) {
@@ -302,59 +304,59 @@ function S(e) {
302
304
  }
303
305
  for (const i of s)
304
306
  if (typeof i == "object" && i !== null) {
305
- const c = [], a = [];
306
- for (const [p, y] of Object.entries(i)) {
307
- const m = `${o}${p === "url" ? "" : `:${p}`}`, l = S({ [m]: y });
308
- (p === "url" ? c : a).push(...l);
307
+ const c = [], l = [];
308
+ for (const [u, b] of Object.entries(i)) {
309
+ const p = `${o}${u === "url" ? "" : `:${u}`}`, a = $({ [p]: b });
310
+ (u === "url" ? c : l).push(...a);
309
311
  }
310
- t.push(...c, ...a);
312
+ t.push(...c, ...l);
311
313
  } else
312
- t.push(...typeof i == "string" ? S({ [o]: i }) : C(o, i));
314
+ t.push(...typeof i == "string" ? $({ [o]: i }) : V(o, i));
313
315
  continue;
314
316
  }
315
317
  if (typeof s == "object" && s)
316
- if (b.MEDIA.has(o)) {
317
- const i = o.startsWith("twitter") ? "twitter" : "og", c = o.replace(/^(og|twitter)/, "").toLowerCase(), a = i === "twitter" ? "name" : "property";
318
+ if (S.MEDIA.has(o)) {
319
+ const i = o.startsWith("twitter") ? "twitter" : "og", c = o.replace(/^(og|twitter)/, "").toLowerCase(), l = i === "twitter" ? "name" : "property";
318
320
  s.url && t.push({
319
- [a]: `${i}:${c}`,
321
+ [l]: `${i}:${c}`,
320
322
  content: s.url
321
323
  }), s.secureUrl && t.push({
322
- [a]: `${i}:${c}:secure_url`,
324
+ [l]: `${i}:${c}:secure_url`,
323
325
  content: s.secureUrl
324
326
  });
325
- for (const [p, y] of Object.entries(s))
326
- p !== "url" && p !== "secureUrl" && t.push({
327
- [a]: `${i}:${c}:${p}`,
327
+ for (const [u, b] of Object.entries(s))
328
+ u !== "url" && u !== "secureUrl" && t.push({
329
+ [l]: `${i}:${c}:${u}`,
328
330
  // @ts-expect-error untyped
329
- content: y
331
+ content: b
330
332
  });
331
- } else j.has(g(o)) ? t.push(...C(o, s)) : n[o] = D(s);
333
+ } else E.has(g(o)) ? t.push(...V(o, s)) : n[o] = D(s);
332
334
  else
333
335
  n[o] = s;
334
336
  }
335
337
  const r = Object.entries(n).map(([o, s]) => {
336
338
  if (o === "charset")
337
339
  return { charset: s === null ? "_null" : s };
338
- const i = H(o), c = re(o), a = s === null ? "_null" : typeof s == "object" ? oe(s, o) : typeof s == "number" ? s.toString() : s;
339
- return i === "http-equiv" ? { "http-equiv": c, content: a } : { [i]: c, content: a };
340
+ const i = k(o), c = oe(o), l = s === null ? "_null" : typeof s == "object" ? se(s, o) : typeof s == "number" ? s.toString() : s;
341
+ return i === "http-equiv" ? { "http-equiv": c, content: l } : { [i]: c, content: l };
340
342
  });
341
343
  return [...t, ...r].map(
342
344
  (o) => "content" in o && o.content === "_null" ? { ...o, content: null } : o
343
345
  );
344
346
  }
345
- const se = {
347
+ const ie = {
346
348
  key: "flatMeta",
347
349
  hooks: {
348
350
  "entries:normalize": (e) => {
349
351
  const t = [];
350
- e.tags = e.tags.map((n) => n.tag !== "_flatMeta" ? n : (t.push(S(n.props).map((r) => ({
352
+ e.tags = e.tags.map((n) => n.tag !== "_flatMeta" ? n : (t.push($(n.props).map((r) => ({
351
353
  ...n,
352
354
  tag: "meta",
353
355
  props: r
354
356
  }))), !1)).filter(Boolean).concat(...t);
355
357
  }
356
358
  }
357
- }, ie = ["name", "property", "http-equiv"], ce = /* @__PURE__ */ new Set([
359
+ }, ce = ["name", "property", "http-equiv"], ae = /* @__PURE__ */ new Set([
358
360
  "viewport",
359
361
  "description",
360
362
  "keywords",
@@ -362,28 +364,28 @@ const se = {
362
364
  ]);
363
365
  function je(e) {
364
366
  const t = e.split(":");
365
- return t.length ? j.has(t[1]) : !1;
367
+ return t.length ? E.has(t[1]) : !1;
366
368
  }
367
- function ve(e) {
369
+ function Me(e) {
368
370
  const { props: t, tag: n } = e;
369
- if (ee.has(n))
371
+ if (te.has(n))
370
372
  return n;
371
373
  if (n === "link" && t.rel === "canonical")
372
374
  return "canonical";
373
375
  if (t.charset)
374
376
  return "charset";
375
377
  if (e.tag === "meta") {
376
- for (const r of ie)
378
+ for (const r of ce)
377
379
  if (t[r] !== void 0) {
378
- const o = t[r], s = o.includes(":"), i = ce.has(o), a = !(s || i) && e.key ? `:key:${e.key}` : "";
379
- return `${n}:${o}${a}`;
380
+ const o = t[r], s = o.includes(":"), i = ae.has(o), l = !(s || i) && e.key ? `:key:${e.key}` : "";
381
+ return `${n}:${o}${l}`;
380
382
  }
381
383
  }
382
384
  if (e.key)
383
385
  return `${n}:key:${e.key}`;
384
386
  if (t.id)
385
387
  return `${n}:id:${t.id}`;
386
- if (Y.has(n)) {
388
+ if (ee.has(n)) {
387
389
  const r = e.textContent || e.innerHTML;
388
390
  if (r)
389
391
  return `${n}:content:${r}`;
@@ -396,26 +398,26 @@ function Ie(e) {
396
398
  const n = e.textContent || e.innerHTML;
397
399
  return n || `${e.tag}:${Object.entries(e.props).map(([r, o]) => `${r}:${String(o)}`).join(",")}`;
398
400
  }
399
- function A(e, t, n) {
401
+ function T(e, t, n) {
400
402
  typeof e === "function" && (!n || n !== "titleTemplate" && !(n[0] === "o" && n[1] === "n")) && (e = e());
401
403
  let o;
402
404
  if (t && (o = t(n, e)), Array.isArray(o))
403
- return o.map((s) => A(s, t));
405
+ return o.map((s) => T(s, t));
404
406
  if ((o == null ? void 0 : o.constructor) === Object) {
405
407
  const s = {};
406
408
  for (const i of Object.keys(o))
407
- s[i] = A(o[i], t, i);
409
+ s[i] = T(o[i], t, i);
408
410
  return s;
409
411
  }
410
412
  return o;
411
413
  }
412
- function ae(e, t) {
414
+ function le(e, t) {
413
415
  const n = e === "style" ? /* @__PURE__ */ new Map() : /* @__PURE__ */ new Set();
414
416
  function r(o) {
415
417
  const s = o.trim();
416
418
  if (s)
417
419
  if (e === "style") {
418
- const [i, ...c] = s.split(":").map((a) => a.trim());
420
+ const [i, ...c] = s.split(":").map((l) => l.trim());
419
421
  i && c.length && n.set(i, c.join(":"));
420
422
  } else
421
423
  s.split(" ").filter(Boolean).forEach((i) => n.add(i));
@@ -424,17 +426,17 @@ function ae(e, t) {
424
426
  s && s !== "false" && (e === "style" ? n.set(o.trim(), s) : r(o));
425
427
  }), n;
426
428
  }
427
- function le(e, t) {
429
+ function ue(e, t) {
428
430
  return e.props = e.props || {}, t ? e.tag === "templateParams" ? (e.props = t, e) : (Object.entries(t).forEach(([n, r]) => {
429
431
  if (r === null) {
430
432
  e.props[n] = null;
431
433
  return;
432
434
  }
433
435
  if (n === "class" || n === "style") {
434
- e.props[n] = ae(n, r);
436
+ e.props[n] = le(n, r);
435
437
  return;
436
438
  }
437
- if (te.has(n)) {
439
+ if (ne.has(n)) {
438
440
  if (["textContent", "innerHTML"].includes(n) && typeof r == "object") {
439
441
  let i = t.type;
440
442
  if (t.type || (i = "application/json"), !(i != null && i.endsWith("json")) && i !== "speculationrules")
@@ -448,9 +450,9 @@ function le(e, t) {
448
450
  o === "true" || o === "" ? e.props[n] = s ? o : !0 : !r && s && o === "false" ? e.props[n] = "false" : r !== void 0 && (e.props[n] = r);
449
451
  }), e) : e;
450
452
  }
451
- function ue(e, t) {
452
- const n = typeof t == "object" && typeof t != "function" ? t : { [e === "script" || e === "noscript" || e === "style" ? "innerHTML" : "textContent"]: t }, r = le({ tag: e, props: {} }, n);
453
- return r.key && X.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;
453
+ function pe(e, t) {
454
+ const n = typeof t == "object" && typeof t != "function" ? t : { [e === "script" || e === "noscript" || e === "style" ? "innerHTML" : "textContent"]: t }, r = ue({ tag: e, props: {} }, n);
455
+ return r.key && Y.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;
454
456
  }
455
457
  function Ee(e, t) {
456
458
  if (!e)
@@ -463,61 +465,61 @@ function Ee(e, t) {
463
465
  };
464
466
  e = n(void 0, e);
465
467
  const r = [];
466
- return e = A(e, n), Object.entries(e || {}).forEach(([o, s]) => {
468
+ return e = T(e, n), Object.entries(e || {}).forEach(([o, s]) => {
467
469
  if (s !== void 0)
468
470
  for (const i of Array.isArray(s) ? s : [s])
469
- r.push(ue(o, i));
471
+ r.push(pe(o, i));
470
472
  }), r.flat();
471
473
  }
472
- const pe = (e, t) => N(t) ? z(t) : t, k = "usehead";
474
+ const fe = (e, t) => G(t) ? N(t) : t, q = "usehead";
473
475
  // @__NO_SIDE_EFFECTS__
474
476
  function Oe(e) {
475
477
  return {
476
478
  install(n) {
477
- n.config.globalProperties.$unhead = e, n.config.globalProperties.$head = e, n.provide(k, e);
479
+ n.config.globalProperties.$unhead = e, n.config.globalProperties.$head = e, n.provide(q, e);
478
480
  }
479
481
  }.install;
480
482
  }
481
483
  // @__NO_SIDE_EFFECTS__
482
- function q() {
483
- if (G()) {
484
- const e = W(k);
484
+ function z() {
485
+ if (W()) {
486
+ const e = B(q);
485
487
  if (!e)
486
488
  throw new Error("useHead() was called without provide context, ensure you call it through the setup() function.");
487
489
  return e;
488
490
  }
489
491
  throw new Error("useHead() was called without provide context, ensure you call it through the setup() function.");
490
492
  }
491
- function v(e, t = {}) {
492
- const n = t.head || /* @__PURE__ */ q();
493
- return n.ssr ? n.push(e || {}, t) : fe(n, e, t);
493
+ function O(e, t = {}) {
494
+ const n = t.head || /* @__PURE__ */ z();
495
+ return n.ssr ? n.push(e || {}, t) : me(n, e, t);
494
496
  }
495
- function fe(e, t, n = {}) {
496
- const r = M(!1);
497
+ function me(e, t, n = {}) {
498
+ const r = I(!1);
497
499
  let o;
498
- return B(() => {
499
- const i = r.value ? {} : A(t, pe);
500
+ return F(() => {
501
+ const i = r.value ? {} : T(t, fe);
500
502
  o ? o.patch(i) : o = e.push(i, n);
501
- }), F() && (J(() => {
503
+ }), J() && (Q(() => {
502
504
  o.dispose();
503
- }), Q(() => {
504
- r.value = !0;
505
505
  }), Z(() => {
506
+ r.value = !0;
507
+ }), X(() => {
506
508
  r.value = !1;
507
509
  })), o;
508
510
  }
509
- function P(e = {}, t = {}) {
510
- (t.head || /* @__PURE__ */ q()).use(se);
511
+ function M(e = {}, t = {}) {
512
+ (t.head || /* @__PURE__ */ z()).use(ie);
511
513
  const { title: r, titleTemplate: o, ...s } = e;
512
- return v({
514
+ return O({
513
515
  title: r,
514
516
  titleTemplate: o,
515
517
  _flatMeta: s
516
518
  }, t);
517
519
  }
518
- function Ve() {
520
+ function Ce() {
519
521
  function e(n) {
520
- P({
522
+ M({
521
523
  ogSiteName: n.siteName,
522
524
  ogLocale: n.locale
523
525
  });
@@ -529,26 +531,26 @@ function Ve() {
529
531
  keywords: s,
530
532
  image: i,
531
533
  url: c,
532
- type: a = "website"
533
- } = n, p = o && o.length > 155 ? `${o.substring(0, 152)}...` : o;
534
- v({
534
+ type: l = "website"
535
+ } = n, u = o && o.length > 155 ? `${o.substring(0, 152)}...` : o;
536
+ O({
535
537
  title: r,
536
538
  link: c ? [{
537
539
  rel: "canonical",
538
540
  href: c
539
541
  }] : []
540
- }), P({
541
- description: p || o,
542
+ }), M({
543
+ description: u || o,
542
544
  keywords: s,
543
545
  ogTitle: r,
544
- ogDescription: p || o,
545
- ogType: a === "product" ? void 0 : a,
546
+ ogDescription: u || o,
547
+ ogType: l === "product" ? void 0 : l,
546
548
  // product 类型不被支持,跳过
547
549
  ogUrl: c,
548
550
  ogImage: i,
549
551
  twitterCard: "summary_large_image",
550
552
  twitterTitle: r,
551
- twitterDescription: p || o,
553
+ twitterDescription: u || o,
552
554
  twitterImage: i
553
555
  });
554
556
  }
@@ -557,9 +559,9 @@ function Ve() {
557
559
  setPageSEO: t
558
560
  };
559
561
  }
560
- function Ce() {
562
+ function Ve() {
561
563
  const e = x(), t = () => e.meta;
562
- v({
564
+ O({
563
565
  title: h(() => t().title || ""),
564
566
  link: h(() => {
565
567
  const n = t();
@@ -568,7 +570,7 @@ function Ce() {
568
570
  href: n.url
569
571
  }] : [];
570
572
  })
571
- }), P({
573
+ }), M({
572
574
  description: h(() => {
573
575
  const r = t().description;
574
576
  if (r)
@@ -599,15 +601,15 @@ function Ce() {
599
601
  }
600
602
  export {
601
603
  Te as H,
602
- Me as U,
604
+ ve as U,
603
605
  Pe as V,
604
606
  Ae as a,
605
607
  $e as b,
606
- Ve as c,
607
- Ce as d,
608
- ve as e,
608
+ Ce as c,
609
+ Ve as d,
610
+ Me as e,
609
611
  Se as f,
610
- le as g,
612
+ ue as g,
611
613
  Ie as h,
612
614
  je as i,
613
615
  Ee as n,