@huyooo/ui 0.13.6 → 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.
- package/dist/{AuthkitAppSetting-EL2ZvAVT.js → AuthkitAppSetting-Xe-QQSQ4.js} +405 -408
- package/dist/{AuthkitGithubBinding-Ba9sbNEh.js → AuthkitGithubBinding-CK6ijijV.js} +330 -331
- package/dist/{Clipboard-CdJtMvg6.js → Clipboard-C8ncjaAJ.js} +1 -1
- package/dist/{Contact-Z2VFVeKK.js → Contact-mb7deQOs.js} +2 -2
- package/dist/CustomTable-BT-cnhLR.js +280 -0
- package/dist/{FeedbackItem-B_MDdk4s.js → FeedbackItem-C9FQThXG.js} +3 -3
- package/dist/{FeedbackModal-qrcBDDQM.js → FeedbackModal-R3NKRxr7.js} +3 -3
- package/dist/{MessageHandle-Y96z-IXv.js → MessageHandle-CVueKPFG.js} +2 -2
- package/dist/{MessageNoticeNotificationsDetails.vue_vue_type_script_setup_true_lang-CfmjFcay.js → MessageNoticeNotificationsDetails.vue_vue_type_script_setup_true_lang-DL4qP8DA.js} +2 -2
- package/dist/{PaySubscriptions-C75OtmYw.js → PaySubscriptions-BkZaeTgv.js} +5 -5
- package/dist/{PricingPlans-DCYIVuuT.js → PricingPlans-B-GWpft_.js} +4 -4
- package/dist/{ReferrerReferees-8eSsuPfa.js → ReferrerReferees-DFCwvXJ6.js} +5 -5
- package/dist/{Upload.vue_vue_type_script_setup_true_lang-BAibfVEN.js → Upload.vue_vue_type_script_setup_true_lang-dLSky4Yx.js} +1 -1
- package/dist/{UserMenuInvitationsItem.vue_vue_type_script_setup_true_lang-BEVmBNlU.js → UserMenuInvitationsItem.vue_vue_type_script_setup_true_lang-Iwq1MOFa.js} +33 -34
- package/dist/WidthContainer-jOX17pDu.js +691 -0
- package/dist/api/billingSubscriptionApi.d.ts +3 -0
- package/dist/{apiClients-D56ALwwO.js → apiClients-CkI47p36.js} +11 -7
- package/dist/authkit.js +9 -9
- package/dist/common.js +2 -2
- package/dist/composables/Authkit/resolveRoutePermission.d.ts +4 -0
- package/dist/composables/Authkit/useAuthkitAppsAuthPageInfo.d.ts +1 -1
- package/dist/composables/Authkit/useAuthkitUsersProfile.d.ts +1 -1
- package/dist/composables/useMessageList.d.ts +2 -2
- package/dist/composables.js +13 -13
- package/dist/feedback.js +3 -3
- package/dist/main.js +32 -32
- package/dist/message.js +3 -3
- package/dist/pay.js +4 -4
- package/dist/privateCom.js +1 -1
- package/dist/referrer.js +1 -1
- package/dist/style.css +1 -1
- package/dist/types/api/ai.generated.d.ts +3248 -335
- package/dist/types/api/billing.generated.d.ts +2162 -500
- package/dist/upload.js +2 -2
- package/dist/{useAuthkitAppsAuthPageInfo-RMs8sOwk.js → useAuthkitAppsAuthPageInfo-nCjfAjiw.js} +17 -7
- package/dist/{useAuthkitAuth-B8aO6aMa.js → useAuthkitAuth-C--qS6UE.js} +1 -1
- package/dist/useAuthkitCreateAndUpdate-u-ceTc-m.js +25 -0
- package/dist/useAuthkitUsersProfile-BC5EsA2f.js +40 -0
- package/dist/useBillingStatusOptions-D5Ehwtbj.js +145 -0
- package/dist/{useDownloads-DqF1USJ7.js → useDownloads-BC0QyEFr.js} +10 -10
- package/dist/{useEnsureAuthenticated-D99GiwEk.js → useEnsureAuthenticated-C4tsSfv6.js} +2 -2
- package/dist/{useLegalLinks-DRTOYp3n.js → useLegalLinks-DeXLE-yv.js} +2 -2
- package/dist/{useMessageNotifications-CUpk6zCE.js → useMessageNotifications-BMUx5xfX.js} +1 -1
- package/dist/{useSEO-CUKPmGRx.js → useSEO-BWAREYk4.js} +238 -227
- package/dist/{useSubscriptionCheckout-CAgy1CFj.js → useSubscriptionCheckout-CHAF20s-.js} +102 -108
- package/dist/{useTableHandle-CCKjahT0.js → useTableHandle-9alnSWt0.js} +1 -1
- package/dist/{useUploadCos-Bxctd4E6.js → useUploadCos-DGPnLOC9.js} +1 -1
- package/dist/user.js +1 -1
- package/package.json +3 -2
- package/dist/CustomTable-BBcd4nNL.js +0 -278
- package/dist/WidthContainer-Dqf_-qGk.js +0 -694
- package/dist/useAuthkitCreateAndUpdate-DkiLs143.js +0 -25
- package/dist/useAuthkitUsersProfile-CWAr0CNv.js +0 -36
- package/dist/useBillingStatusOptions-CottFcAr.js +0 -127
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { ref as
|
|
2
|
-
import { useRouter as
|
|
3
|
-
import { u as
|
|
4
|
-
import { u as U } from "./useAuthkitUsersProfile-
|
|
5
|
-
const
|
|
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
|
|
9
|
+
function $e() {
|
|
10
10
|
function e(t, n) {
|
|
11
|
-
|
|
11
|
+
M.value.key = t, M.value.name = n;
|
|
12
12
|
}
|
|
13
13
|
return {
|
|
14
|
-
activeDoc:
|
|
14
|
+
activeDoc: M,
|
|
15
15
|
setActiveDoc: e
|
|
16
16
|
};
|
|
17
17
|
}
|
|
18
|
-
function
|
|
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
|
|
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 (
|
|
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
|
|
59
|
+
function Me(e, t, n) {
|
|
48
60
|
const r = A(t), o = (n == null ? void 0 : n.returnParentOnChildMatch) ?? !1;
|
|
49
|
-
function s(
|
|
50
|
-
for (const
|
|
51
|
-
if (A(
|
|
52
|
-
return
|
|
53
|
-
if (
|
|
54
|
-
const
|
|
55
|
-
if (
|
|
56
|
-
return o ?
|
|
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
|
|
65
|
-
const
|
|
66
|
-
if (r.startsWith(
|
|
67
|
-
if (
|
|
68
|
-
for (const
|
|
69
|
-
const y = A(
|
|
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 ?
|
|
83
|
+
return o ? a.path : u.path;
|
|
72
84
|
}
|
|
73
|
-
return
|
|
85
|
+
return a.path;
|
|
74
86
|
}
|
|
75
87
|
}
|
|
76
88
|
return n != null && n.fallback ? n.fallback(r) : r;
|
|
77
89
|
}
|
|
78
|
-
function
|
|
79
|
-
const t =
|
|
90
|
+
function ve(e) {
|
|
91
|
+
const t = _(), {
|
|
80
92
|
appsData: n
|
|
81
|
-
} =
|
|
93
|
+
} = V(), {
|
|
82
94
|
isLoggedIn: r,
|
|
83
95
|
userProfile: o
|
|
84
|
-
} = U(), s =
|
|
85
|
-
var
|
|
86
|
-
return !r.value || !o.value ? [] : ((
|
|
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(
|
|
89
|
-
return (n.value.publicRoutes || []).some((
|
|
100
|
+
function i(l) {
|
|
101
|
+
return (n.value.publicRoutes || []).some((d) => d.permissionKey === l);
|
|
90
102
|
}
|
|
91
|
-
function
|
|
92
|
-
return r.value ? s.value
|
|
103
|
+
function a(l) {
|
|
104
|
+
return r.value ? D(l, s.value) : !1;
|
|
93
105
|
}
|
|
94
|
-
function
|
|
95
|
-
var
|
|
106
|
+
function c(l) {
|
|
107
|
+
var f;
|
|
96
108
|
return {
|
|
97
|
-
path:
|
|
98
|
-
name:
|
|
99
|
-
meta:
|
|
100
|
-
children: (
|
|
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
|
|
104
|
-
const
|
|
105
|
-
for (const h of
|
|
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
|
|
109
|
-
if (
|
|
120
|
+
const p = h.meta;
|
|
121
|
+
if (K(p, f)) {
|
|
110
122
|
const S = h.path;
|
|
111
|
-
if (i(S) ||
|
|
123
|
+
if (i(S) || a(S)) {
|
|
112
124
|
const g = {
|
|
113
|
-
name: (
|
|
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: (
|
|
116
|
-
description: (
|
|
117
|
-
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
|
|
121
|
-
|
|
132
|
+
const T = u(h.children, f);
|
|
133
|
+
T.length > 0 && (g.children = T);
|
|
122
134
|
}
|
|
123
|
-
|
|
135
|
+
d.push(g);
|
|
124
136
|
}
|
|
125
137
|
} else if (h.children && h.children.length > 0) {
|
|
126
|
-
const S =
|
|
127
|
-
|
|
138
|
+
const S = u(h.children, f);
|
|
139
|
+
d.push(...S);
|
|
128
140
|
}
|
|
129
141
|
}
|
|
130
|
-
return
|
|
142
|
+
return d;
|
|
131
143
|
}
|
|
132
144
|
return {
|
|
133
|
-
menus:
|
|
145
|
+
menus: m(() => {
|
|
134
146
|
if (!e)
|
|
135
147
|
return [];
|
|
136
|
-
const
|
|
137
|
-
return
|
|
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: (
|
|
152
|
+
hasPermission: (l) => i(l) ? !0 : a(l),
|
|
141
153
|
isLoggedIn: r
|
|
142
154
|
};
|
|
143
155
|
}
|
|
144
|
-
function
|
|
145
|
-
const e =
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
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
|
|
158
|
-
var
|
|
159
|
-
|
|
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
|
|
162
|
-
|
|
163
|
-
|
|
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
|
|
168
|
-
|
|
180
|
+
if (a.value = !0, c(l)) {
|
|
181
|
+
a.value = !1;
|
|
169
182
|
return;
|
|
170
183
|
}
|
|
171
|
-
if (!
|
|
172
|
-
|
|
184
|
+
if (!i.value) {
|
|
185
|
+
a.value = !0;
|
|
173
186
|
return;
|
|
174
187
|
}
|
|
175
|
-
if (!
|
|
176
|
-
|
|
188
|
+
if (!s.value) {
|
|
189
|
+
e.replace("/"), a.value = !1;
|
|
177
190
|
return;
|
|
178
191
|
}
|
|
179
|
-
|
|
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
|
|
184
|
-
|
|
185
|
-
}
|
|
186
|
-
|
|
194
|
+
return B([() => t.path, r, i, s], () => {
|
|
195
|
+
y(t.path);
|
|
196
|
+
}, {
|
|
197
|
+
immediate: !0
|
|
187
198
|
}), {
|
|
188
199
|
isChecking: a,
|
|
189
|
-
isRoutePublic:
|
|
190
|
-
hasPermission:
|
|
200
|
+
isRoutePublic: c,
|
|
201
|
+
hasPermission: u
|
|
191
202
|
};
|
|
192
203
|
}
|
|
193
|
-
const
|
|
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
|
-
]),
|
|
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
|
-
]),
|
|
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
|
-
},
|
|
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
|
|
284
|
-
return Array.isArray(e) ? e.map(
|
|
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,
|
|
299
|
+
return Object.entries(e).map(([i, a]) => {
|
|
289
300
|
if (s) {
|
|
290
|
-
const
|
|
291
|
-
if (
|
|
292
|
-
return
|
|
301
|
+
const u = s({ key: i, value: a });
|
|
302
|
+
if (u !== void 0)
|
|
303
|
+
return u;
|
|
293
304
|
}
|
|
294
|
-
const
|
|
295
|
-
return `${i}${r}${
|
|
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
|
|
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,
|
|
314
|
+
Object.entries(n).map(([i, a]) => [`${e}${i === "url" ? "" : `${i[0].toUpperCase()}${i.slice(1)}`}`, a])
|
|
304
315
|
);
|
|
305
|
-
return
|
|
306
|
-
var
|
|
307
|
-
return (((
|
|
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
|
|
318
|
-
return
|
|
328
|
+
function ce(e) {
|
|
329
|
+
return ae[e] || b(e);
|
|
319
330
|
}
|
|
320
|
-
function
|
|
331
|
+
function ue(e, t) {
|
|
321
332
|
var n;
|
|
322
|
-
return t === "refresh" ? `${e.seconds};url=${e.url}` : H(
|
|
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
|
|
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
|
|
343
|
-
for (const [
|
|
344
|
-
const
|
|
345
|
-
(
|
|
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(...
|
|
358
|
+
t.push(...a, ...c);
|
|
348
359
|
} else
|
|
349
|
-
t.push(...typeof i == "string" ?
|
|
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",
|
|
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
|
-
[
|
|
367
|
+
[c]: `${i}:${a}`,
|
|
357
368
|
content: s.url
|
|
358
369
|
}), s.secureUrl && t.push({
|
|
359
|
-
[
|
|
370
|
+
[c]: `${i}:${a}:secure_url`,
|
|
360
371
|
content: s.secureUrl
|
|
361
372
|
});
|
|
362
|
-
for (const [
|
|
363
|
-
|
|
364
|
-
[
|
|
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(...
|
|
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),
|
|
376
|
-
return i === "http-equiv" ? { "http-equiv":
|
|
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
|
|
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(
|
|
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
|
-
},
|
|
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
|
|
411
|
+
function Ce(e) {
|
|
401
412
|
const t = e.split(":");
|
|
402
413
|
return t.length ? E.has(t[1]) : !1;
|
|
403
414
|
}
|
|
404
|
-
function
|
|
415
|
+
function Re(e) {
|
|
405
416
|
const { props: t, tag: n } = e;
|
|
406
|
-
if (
|
|
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
|
|
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 &&
|
|
416
|
-
return `${n}:${o}${
|
|
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 (
|
|
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
|
|
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
|
|
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) =>
|
|
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] =
|
|
455
|
+
s[i] = P(o[i], t, i);
|
|
445
456
|
return s;
|
|
446
457
|
}
|
|
447
458
|
return o;
|
|
448
459
|
}
|
|
449
|
-
function
|
|
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, ...
|
|
458
|
-
i &&
|
|
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
|
|
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] =
|
|
484
|
+
e.props[n] = he(n, r);
|
|
474
485
|
return;
|
|
475
486
|
}
|
|
476
|
-
if (
|
|
487
|
+
if (ie.has(n)) {
|
|
477
488
|
if (["textContent", "innerHTML"].includes(n) && typeof r == "object") {
|
|
478
|
-
let
|
|
479
|
-
if (t.type || (
|
|
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 =
|
|
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
|
|
491
|
-
const n = typeof t == "object" && typeof t != "function" ? t : { [e === "script" || e === "noscript" || e === "style" ? "innerHTML" : "textContent"]: t }, r =
|
|
492
|
-
return r.key &&
|
|
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
|
|
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 =
|
|
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(
|
|
519
|
+
r.push(me(o, i));
|
|
509
520
|
}), r.flat();
|
|
510
521
|
}
|
|
511
|
-
const
|
|
522
|
+
const ge = (e, t) => G(t) ? F(t) : t, z = "usehead";
|
|
512
523
|
// @__NO_SIDE_EFFECTS__
|
|
513
|
-
function
|
|
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 (
|
|
523
|
-
const e =
|
|
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
|
|
541
|
+
function I(e, t = {}) {
|
|
531
542
|
const n = t.head || /* @__PURE__ */ N();
|
|
532
|
-
return n.ssr ? n.push(e || {}, t) :
|
|
543
|
+
return n.ssr ? n.push(e || {}, t) : ye(n, e, t);
|
|
533
544
|
}
|
|
534
|
-
function
|
|
535
|
-
const r =
|
|
545
|
+
function ye(e, t, n = {}) {
|
|
546
|
+
const r = O(!1);
|
|
536
547
|
let o;
|
|
537
|
-
return
|
|
538
|
-
const i = r.value ? {} :
|
|
548
|
+
return Z(() => {
|
|
549
|
+
const i = r.value ? {} : P(t, ge);
|
|
539
550
|
o ? o.patch(i) : o = e.push(i, n);
|
|
540
|
-
}),
|
|
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
|
|
549
|
-
(t.head || /* @__PURE__ */ N()).use(
|
|
559
|
+
function j(e = {}, t = {}) {
|
|
560
|
+
(t.head || /* @__PURE__ */ N()).use(le);
|
|
550
561
|
const { title: r, titleTemplate: o, ...s } = e;
|
|
551
|
-
return
|
|
562
|
+
return I({
|
|
552
563
|
title: r,
|
|
553
564
|
titleTemplate: o,
|
|
554
565
|
_flatMeta: s
|
|
555
566
|
}, t);
|
|
556
567
|
}
|
|
557
|
-
function
|
|
568
|
+
function Ue() {
|
|
558
569
|
function e(n) {
|
|
559
|
-
|
|
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:
|
|
571
|
-
type:
|
|
572
|
-
} = n,
|
|
573
|
-
|
|
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:
|
|
586
|
+
link: a ? [{
|
|
576
587
|
rel: "canonical",
|
|
577
|
-
href:
|
|
588
|
+
href: a
|
|
578
589
|
}] : []
|
|
579
|
-
}),
|
|
580
|
-
description:
|
|
590
|
+
}), j({
|
|
591
|
+
description: u || o,
|
|
581
592
|
keywords: s,
|
|
582
593
|
ogTitle: r,
|
|
583
|
-
ogDescription:
|
|
584
|
-
ogType:
|
|
594
|
+
ogDescription: u || o,
|
|
595
|
+
ogType: c === "product" ? void 0 : c,
|
|
585
596
|
// product 类型不被支持,跳过
|
|
586
|
-
ogUrl:
|
|
597
|
+
ogUrl: a,
|
|
587
598
|
ogImage: i,
|
|
588
599
|
twitterCard: "summary_large_image",
|
|
589
600
|
twitterTitle: r,
|
|
590
|
-
twitterDescription:
|
|
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
|
|
600
|
-
const e =
|
|
601
|
-
|
|
602
|
-
title:
|
|
603
|
-
link:
|
|
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
|
-
}),
|
|
611
|
-
description:
|
|
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:
|
|
617
|
-
ogTitle:
|
|
618
|
-
ogDescription:
|
|
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:
|
|
634
|
+
ogType: m(() => {
|
|
624
635
|
const r = t().type || "website";
|
|
625
636
|
return r === "product" ? void 0 : r;
|
|
626
637
|
}),
|
|
627
|
-
ogUrl:
|
|
628
|
-
ogImage:
|
|
638
|
+
ogUrl: m(() => t().url),
|
|
639
|
+
ogImage: m(() => t().image),
|
|
629
640
|
twitterCard: "summary_large_image",
|
|
630
|
-
twitterTitle:
|
|
631
|
-
twitterDescription:
|
|
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:
|
|
647
|
+
twitterImage: m(() => t().image)
|
|
637
648
|
});
|
|
638
649
|
}
|
|
639
650
|
export {
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
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
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
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
|
};
|