@huyooo/ui 0.5.10 → 0.5.12
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/{AuthkitAuthModal-DEVS8XfG.js → AuthkitAuthModal-C2KKx46o.js} +324 -300
- package/dist/{AuthkitAuthorize-cnC-Hl0X.js → AuthkitAuthorize-CrmwggKL.js} +1 -1
- package/dist/{ReferrerReferees-D3qUZ62t.js → ReferrerReferees-Bn3bKc0N.js} +1 -1
- package/dist/{UserAccountMenu-50CxuyL3.js → UserAccountMenu-CjajHECj.js} +1 -1
- package/dist/{UserPanel-DHXkFUTF.js → UserPanel-DzSB8_xh.js} +3 -3
- package/dist/{WidthContainer-D_dX_G8P.js → WidthContainer-2eHirXXk.js} +3 -3
- package/dist/api/Authkit/auth.d.ts +1 -0
- package/dist/authkit.js +3 -3
- package/dist/common.js +1 -1
- package/dist/composables.js +2 -2
- package/dist/index.js +689 -765
- package/dist/main.d.ts +2 -1
- package/dist/referrer.js +1 -1
- package/dist/{useAuthkitUsersProfile-Bi_zM2qG.js → useAuthkitUsersProfile-C0ZRUQ3T.js} +54 -44
- package/dist/{useSEO-CREH71xC.js → useSEO-ByLbRe2G.js} +76 -102
- package/dist/user.js +2 -2
- package/dist/utils/authkit.d.ts +7 -0
- package/dist/utils/request.d.ts +2 -0
- package/package.json +1 -1
package/dist/main.d.ts
CHANGED
|
@@ -10,4 +10,5 @@ export * from './upload';
|
|
|
10
10
|
export * from './user';
|
|
11
11
|
export * from './download';
|
|
12
12
|
export * from './privateCom';
|
|
13
|
-
export {
|
|
13
|
+
export { createUnhead } from '@unhead/vue';
|
|
14
|
+
export { default as request } from './utils/request';
|
package/dist/referrer.js
CHANGED
|
@@ -1,35 +1,44 @@
|
|
|
1
|
-
import { ref as
|
|
2
|
-
import { api as
|
|
1
|
+
import { ref as l, readonly as S, computed as A } from "vue";
|
|
2
|
+
import { api as o } from "@huyooo/api";
|
|
3
3
|
import { g as n } from "./globalConfig-C1YOJcxa.js";
|
|
4
|
-
function
|
|
5
|
-
return
|
|
4
|
+
function T(e) {
|
|
5
|
+
return o({
|
|
6
6
|
url: `${n.authPrefixUrl}/restfulApi/auth/signIn`,
|
|
7
7
|
method: "post",
|
|
8
8
|
data: e
|
|
9
9
|
});
|
|
10
10
|
}
|
|
11
|
-
function
|
|
12
|
-
return
|
|
11
|
+
function b(e) {
|
|
12
|
+
return o({
|
|
13
13
|
url: `${n.authPrefixUrl}/restfulApi/auth/resetPassword`,
|
|
14
14
|
method: "post",
|
|
15
15
|
data: e
|
|
16
16
|
});
|
|
17
17
|
}
|
|
18
18
|
function x(e) {
|
|
19
|
-
return
|
|
19
|
+
return o({
|
|
20
20
|
url: `${n.authPrefixUrl}/restfulApi/auth/signUp`,
|
|
21
21
|
method: "post",
|
|
22
22
|
data: e
|
|
23
23
|
});
|
|
24
24
|
}
|
|
25
25
|
function G(e) {
|
|
26
|
-
return
|
|
26
|
+
return o({
|
|
27
27
|
url: `${n.authPrefixUrl}/restfulApi/oauth2/authorize`,
|
|
28
28
|
method: "post",
|
|
29
29
|
data: e
|
|
30
30
|
});
|
|
31
31
|
}
|
|
32
|
-
|
|
32
|
+
function H(e) {
|
|
33
|
+
return o({
|
|
34
|
+
url: "/restfulApi/auth/refresh",
|
|
35
|
+
method: "post",
|
|
36
|
+
data: {
|
|
37
|
+
refreshToken: e
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
const c = l("signIn"), g = [], m = [], w = [], i = l(null);
|
|
33
42
|
function y() {
|
|
34
43
|
try {
|
|
35
44
|
const e = localStorage.getItem("jwtToken");
|
|
@@ -54,8 +63,8 @@ function p(e) {
|
|
|
54
63
|
i.value = e;
|
|
55
64
|
try {
|
|
56
65
|
localStorage.setItem("jwtToken", e);
|
|
57
|
-
} catch (
|
|
58
|
-
console.warn("Failed to save token to localStorage:",
|
|
66
|
+
} catch (s) {
|
|
67
|
+
console.warn("Failed to save token to localStorage:", s);
|
|
59
68
|
}
|
|
60
69
|
}
|
|
61
70
|
function C() {
|
|
@@ -76,9 +85,9 @@ function V(e) {
|
|
|
76
85
|
w.push(e);
|
|
77
86
|
}
|
|
78
87
|
function F() {
|
|
79
|
-
const e =
|
|
88
|
+
const e = l(!1), s = l(!1), f = l(!1);
|
|
80
89
|
function h(r) {
|
|
81
|
-
e.value = !0,
|
|
90
|
+
e.value = !0, T({
|
|
82
91
|
email: r.email,
|
|
83
92
|
password: r.password
|
|
84
93
|
}).then(({
|
|
@@ -89,21 +98,21 @@ function F() {
|
|
|
89
98
|
e.value = !1, console.error("登录失败:", t);
|
|
90
99
|
});
|
|
91
100
|
}
|
|
92
|
-
function
|
|
93
|
-
|
|
101
|
+
function a(r) {
|
|
102
|
+
s.value = !0, x({
|
|
94
103
|
email: r.email,
|
|
95
104
|
userToken: r.userToken,
|
|
96
105
|
emailVerifyId: r.emailVerifyId,
|
|
97
106
|
password: r.password,
|
|
98
107
|
referrerId: r.referrerId
|
|
99
108
|
}).then(() => {
|
|
100
|
-
|
|
109
|
+
s.value = !1, c.value = "signIn", m.forEach((t) => t());
|
|
101
110
|
}).catch((t) => {
|
|
102
|
-
|
|
111
|
+
s.value = !1, console.error("注册失败:", t);
|
|
103
112
|
});
|
|
104
113
|
}
|
|
105
114
|
function v(r) {
|
|
106
|
-
f.value = !0,
|
|
115
|
+
f.value = !0, b({
|
|
107
116
|
email: r.email,
|
|
108
117
|
userToken: r.userToken,
|
|
109
118
|
emailVerifyId: r.emailVerifyId,
|
|
@@ -125,11 +134,11 @@ function F() {
|
|
|
125
134
|
}
|
|
126
135
|
return {
|
|
127
136
|
signInSubmit: h,
|
|
128
|
-
signUpSubmit:
|
|
137
|
+
signUpSubmit: a,
|
|
129
138
|
resetPasswordSubmit: v,
|
|
130
139
|
currentView: c,
|
|
131
140
|
authSignInLoading: e,
|
|
132
|
-
authSignUpLoading:
|
|
141
|
+
authSignUpLoading: s,
|
|
133
142
|
resetPasswordLoading: f,
|
|
134
143
|
switchSignUp: k,
|
|
135
144
|
switchResetPassword: U,
|
|
@@ -146,68 +155,68 @@ function F() {
|
|
|
146
155
|
};
|
|
147
156
|
}
|
|
148
157
|
function L(e) {
|
|
149
|
-
return console.log(n.authPrefixUrl, "globalConfig.authPrefixUrl"),
|
|
158
|
+
return console.log(n.authPrefixUrl, "globalConfig.authPrefixUrl"), o({
|
|
150
159
|
url: `${n.authPrefixUrl}/restfulApi/users/profile`,
|
|
151
160
|
method: "post",
|
|
152
161
|
data: e
|
|
153
162
|
});
|
|
154
163
|
}
|
|
155
|
-
function
|
|
156
|
-
return
|
|
164
|
+
function J(e) {
|
|
165
|
+
return o({
|
|
157
166
|
url: `${n.authPrefixUrl}/restfulApi/users/update/baseInfo`,
|
|
158
167
|
method: "post",
|
|
159
168
|
data: e
|
|
160
169
|
});
|
|
161
170
|
}
|
|
162
|
-
function
|
|
163
|
-
return
|
|
171
|
+
function K(e) {
|
|
172
|
+
return o({
|
|
164
173
|
url: `${n.authPrefixUrl}/restfulApi/users/update/email`,
|
|
165
174
|
method: "post",
|
|
166
175
|
data: e
|
|
167
176
|
});
|
|
168
177
|
}
|
|
169
|
-
function
|
|
170
|
-
return
|
|
178
|
+
function M(e) {
|
|
179
|
+
return o({
|
|
171
180
|
url: `${n.authPrefixUrl}/restfulApi/users/update/password`,
|
|
172
181
|
method: "post",
|
|
173
182
|
data: e
|
|
174
183
|
});
|
|
175
184
|
}
|
|
176
|
-
function
|
|
177
|
-
return
|
|
185
|
+
function O() {
|
|
186
|
+
return o({
|
|
178
187
|
url: `${n.authPrefixUrl}/restfulApi/users//unbind/email`,
|
|
179
188
|
method: "post"
|
|
180
189
|
});
|
|
181
190
|
}
|
|
182
|
-
const
|
|
191
|
+
const u = l(null), d = l(!1), z = A(() => !!u.value);
|
|
183
192
|
async function R() {
|
|
184
193
|
var h;
|
|
185
194
|
const {
|
|
186
195
|
getToken: e,
|
|
187
|
-
clearAuth:
|
|
196
|
+
clearAuth: s
|
|
188
197
|
} = F();
|
|
189
198
|
if (!e()) {
|
|
190
|
-
console.warn("No authentication token found"),
|
|
199
|
+
console.warn("No authentication token found"), u.value = null;
|
|
191
200
|
return;
|
|
192
201
|
}
|
|
193
202
|
d.value = !0;
|
|
194
203
|
try {
|
|
195
204
|
const {
|
|
196
|
-
data:
|
|
205
|
+
data: a
|
|
197
206
|
} = await L();
|
|
198
|
-
|
|
199
|
-
} catch (
|
|
200
|
-
console.error("获取用户资料失败:",
|
|
207
|
+
a ? u.value = a : (console.warn("获取用户资料返回空数据"), u.value = null);
|
|
208
|
+
} catch (a) {
|
|
209
|
+
console.error("获取用户资料失败:", a), ((h = a == null ? void 0 : a.response) == null ? void 0 : h.status) === 401 && (console.warn("认证已过期,清除认证状态"), s()), u.value = null;
|
|
201
210
|
} finally {
|
|
202
211
|
d.value = !1;
|
|
203
212
|
}
|
|
204
213
|
}
|
|
205
214
|
function B() {
|
|
206
|
-
|
|
215
|
+
u.value = null;
|
|
207
216
|
}
|
|
208
|
-
function
|
|
217
|
+
function Q() {
|
|
209
218
|
return {
|
|
210
|
-
userProfile:
|
|
219
|
+
userProfile: u,
|
|
211
220
|
loading: d,
|
|
212
221
|
isLoggedIn: z,
|
|
213
222
|
// 新增:基于userProfile的登录状态
|
|
@@ -217,12 +226,13 @@ function O() {
|
|
|
217
226
|
};
|
|
218
227
|
}
|
|
219
228
|
export {
|
|
220
|
-
|
|
229
|
+
Q as a,
|
|
221
230
|
L as b,
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
231
|
+
J as c,
|
|
232
|
+
M as d,
|
|
233
|
+
K as e,
|
|
234
|
+
O as f,
|
|
226
235
|
G as o,
|
|
236
|
+
H as r,
|
|
227
237
|
F as u
|
|
228
238
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ref as
|
|
1
|
+
import { ref as T, computed as f, watch as U, toValue as D, isRef as K, hasInjectionContext as H, inject as R, watchEffect as k, getCurrentInstance as L, onBeforeUnmount as q, onDeactivated as z, onActivated as N } from "vue";
|
|
2
2
|
import { useRouter as j, useRoute as M } from "vue-router";
|
|
3
3
|
/* empty css */
|
|
4
4
|
/* empty css */
|
|
@@ -9,7 +9,7 @@ import "@arco-design/web-vue";
|
|
|
9
9
|
import "./useUploadCos-D5k1YLb7.js";
|
|
10
10
|
import "@huyooo/api";
|
|
11
11
|
import "./AuthkitAuthModal.vue_vue_type_style_index_1_lang-BpOmabWi.js";
|
|
12
|
-
import { a as E } from "./useAuthkitUsersProfile-
|
|
12
|
+
import { a as E } from "./useAuthkitUsersProfile-C0ZRUQ3T.js";
|
|
13
13
|
import "@iconify/vue";
|
|
14
14
|
/* empty css */
|
|
15
15
|
import { u as O } from "./useAuthkitAppsAuthPageInfo-Dfj4byB5.js";
|
|
@@ -17,7 +17,7 @@ import { u as O } from "./useAuthkitAppsAuthPageInfo-Dfj4byB5.js";
|
|
|
17
17
|
/* empty css */
|
|
18
18
|
/* empty css */
|
|
19
19
|
/* empty css */
|
|
20
|
-
const b =
|
|
20
|
+
const b = T({
|
|
21
21
|
key: "",
|
|
22
22
|
name: ""
|
|
23
23
|
});
|
|
@@ -52,7 +52,7 @@ function Oe(e, t, r) {
|
|
|
52
52
|
});
|
|
53
53
|
return (n == null ? void 0 : n.path) || r;
|
|
54
54
|
}
|
|
55
|
-
function
|
|
55
|
+
function Ie(e) {
|
|
56
56
|
const t = j(), {
|
|
57
57
|
appsData: r
|
|
58
58
|
} = O(), {
|
|
@@ -89,20 +89,20 @@ function ve(e) {
|
|
|
89
89
|
isLoggedIn: n
|
|
90
90
|
};
|
|
91
91
|
}
|
|
92
|
-
function
|
|
92
|
+
function ve() {
|
|
93
93
|
const e = j(), t = M(), {
|
|
94
94
|
appsAuthPageInfoApi: r,
|
|
95
95
|
appsData: n
|
|
96
96
|
} = O(), {
|
|
97
97
|
isLoggedIn: o,
|
|
98
98
|
userProfile: i
|
|
99
|
-
} = E(), s =
|
|
99
|
+
} = E(), s = T(!1);
|
|
100
100
|
function a(l) {
|
|
101
101
|
return (n.value.publicRoutes || []).some((d) => d.permissionKey === l);
|
|
102
102
|
}
|
|
103
103
|
function u(l) {
|
|
104
104
|
var d;
|
|
105
|
-
return !o.value || !i.value ? !1 : (((d = i.value.permissions) == null ? void 0 : d.map((
|
|
105
|
+
return !o.value || !i.value ? !1 : (((d = i.value.permissions) == null ? void 0 : d.map((x) => x.permissionKey)) || []).includes(l);
|
|
106
106
|
}
|
|
107
107
|
function c(l) {
|
|
108
108
|
if (s.value = !0, a(l)) {
|
|
@@ -116,7 +116,7 @@ function Ie() {
|
|
|
116
116
|
u(l) || e.replace("/"), s.value = !1;
|
|
117
117
|
}
|
|
118
118
|
return r(() => {
|
|
119
|
-
c(t.path),
|
|
119
|
+
c(t.path), U(() => t.path, (l) => {
|
|
120
120
|
c(l);
|
|
121
121
|
});
|
|
122
122
|
}), {
|
|
@@ -125,14 +125,7 @@ function Ie() {
|
|
|
125
125
|
hasPermission: u
|
|
126
126
|
};
|
|
127
127
|
}
|
|
128
|
-
const
|
|
129
|
-
"base",
|
|
130
|
-
"meta",
|
|
131
|
-
"link",
|
|
132
|
-
"style",
|
|
133
|
-
"script",
|
|
134
|
-
"noscript"
|
|
135
|
-
]), Ce = /* @__PURE__ */ new Set([
|
|
128
|
+
const G = /* @__PURE__ */ new Set(["link", "style", "script", "noscript"]), W = /* @__PURE__ */ new Set(["title", "titleTemplate", "script", "style", "noscript"]), Ve = /* @__PURE__ */ new Set([
|
|
136
129
|
"title",
|
|
137
130
|
"base",
|
|
138
131
|
"htmlAttrs",
|
|
@@ -142,7 +135,7 @@ const W = /* @__PURE__ */ new Set(["link", "style", "script", "noscript"]), B =
|
|
|
142
135
|
"style",
|
|
143
136
|
"script",
|
|
144
137
|
"noscript"
|
|
145
|
-
]),
|
|
138
|
+
]), B = /* @__PURE__ */ new Set(["base", "title", "titleTemplate", "bodyAttrs", "htmlAttrs", "templateParams"]), F = /* @__PURE__ */ new Set(["key", "tagPosition", "tagPriority", "tagDuplicateStrategy", "innerHTML", "textContent", "processTemplateParams"]), Ce = /* @__PURE__ */ new Set(["templateParams", "htmlAttrs", "bodyAttrs"]), A = /* @__PURE__ */ new Set([
|
|
146
139
|
"theme-color",
|
|
147
140
|
"google-site-verification",
|
|
148
141
|
"og",
|
|
@@ -156,7 +149,7 @@ const W = /* @__PURE__ */ new Set(["link", "style", "script", "noscript"]), B =
|
|
|
156
149
|
OG: /* @__PURE__ */ new Set(["og", "book", "article", "profile", "fb"]),
|
|
157
150
|
MEDIA: /* @__PURE__ */ new Set(["ogImage", "ogVideo", "ogAudio", "twitterImage"]),
|
|
158
151
|
HTTP_EQUIV: /* @__PURE__ */ new Set(["contentType", "defaultStyle", "xUaCompatible"])
|
|
159
|
-
},
|
|
152
|
+
}, J = {
|
|
160
153
|
articleExpirationTime: "article:expiration_time",
|
|
161
154
|
articleModifiedTime: "article:modified_time",
|
|
162
155
|
articlePublishedTime: "article:published_time",
|
|
@@ -175,7 +168,7 @@ const W = /* @__PURE__ */ new Set(["link", "style", "script", "noscript"]), B =
|
|
|
175
168
|
msapplicationConfig: "msapplication-Config",
|
|
176
169
|
msapplicationTileColor: "msapplication-TileColor",
|
|
177
170
|
msapplicationTileImage: "msapplication-TileImage"
|
|
178
|
-
},
|
|
171
|
+
}, I = {
|
|
179
172
|
appleItunesApp: {
|
|
180
173
|
unpack: {
|
|
181
174
|
entrySeparator: ", ",
|
|
@@ -212,7 +205,7 @@ function m(e) {
|
|
|
212
205
|
const t = e.replace(/([A-Z])/g, "-$1").toLowerCase(), r = t.indexOf("-");
|
|
213
206
|
return r === -1 ? t : h.META.has(t.slice(0, r)) || h.OG.has(t.slice(0, r)) ? e.replace(/([A-Z])/g, ":$1").toLowerCase() : t;
|
|
214
207
|
}
|
|
215
|
-
function
|
|
208
|
+
function v(e) {
|
|
216
209
|
return Object.fromEntries(Object.entries(e).filter(([t, r]) => String(r) !== "false" && t));
|
|
217
210
|
}
|
|
218
211
|
function w(e) {
|
|
@@ -231,38 +224,38 @@ function V(e, t = {}) {
|
|
|
231
224
|
}).join(r);
|
|
232
225
|
}
|
|
233
226
|
function P(e, t) {
|
|
234
|
-
const r =
|
|
235
|
-
if (!
|
|
227
|
+
const r = v(t), n = m(e), o = C(n);
|
|
228
|
+
if (!A.has(n))
|
|
236
229
|
return [{ [o]: n, ...r }];
|
|
237
230
|
const i = Object.fromEntries(
|
|
238
231
|
Object.entries(r).map(([s, a]) => [`${e}${s === "url" ? "" : `${s[0].toUpperCase()}${s.slice(1)}`}`, a])
|
|
239
232
|
);
|
|
240
|
-
return
|
|
233
|
+
return y(i || {}).sort((s, a) => {
|
|
241
234
|
var u, c;
|
|
242
235
|
return (((u = s[o]) == null ? void 0 : u.length) || 0) - (((c = a[o]) == null ? void 0 : c.length) || 0);
|
|
243
236
|
});
|
|
244
237
|
}
|
|
245
238
|
function C(e) {
|
|
246
239
|
var n;
|
|
247
|
-
if (((n =
|
|
240
|
+
if (((n = I[e]) == null ? void 0 : n.metaKey) === "http-equiv" || h.HTTP_EQUIV.has(e))
|
|
248
241
|
return "http-equiv";
|
|
249
242
|
const t = m(e), r = t.indexOf(":");
|
|
250
243
|
return r === -1 ? "name" : h.OG.has(t.slice(0, r)) ? "property" : "name";
|
|
251
244
|
}
|
|
252
|
-
function
|
|
253
|
-
return
|
|
245
|
+
function Q(e) {
|
|
246
|
+
return J[e] || m(e);
|
|
254
247
|
}
|
|
255
|
-
function
|
|
248
|
+
function Z(e, t) {
|
|
256
249
|
var r;
|
|
257
250
|
return t === "refresh" ? `${e.seconds};url=${e.url}` : V(w(e), {
|
|
258
251
|
keyValueSeparator: "=",
|
|
259
252
|
entrySeparator: ", ",
|
|
260
253
|
resolve: ({ value: n, key: o }) => n === null ? "" : typeof n == "boolean" ? o : void 0,
|
|
261
254
|
// @ts-expect-error untyped
|
|
262
|
-
...(r =
|
|
255
|
+
...(r = I[t]) == null ? void 0 : r.unpack
|
|
263
256
|
});
|
|
264
257
|
}
|
|
265
|
-
function
|
|
258
|
+
function y(e) {
|
|
266
259
|
const t = [], r = {};
|
|
267
260
|
for (const [o, i] of Object.entries(e)) {
|
|
268
261
|
if (Array.isArray(i)) {
|
|
@@ -276,12 +269,12 @@ function g(e) {
|
|
|
276
269
|
if (typeof s == "object" && s !== null) {
|
|
277
270
|
const a = [], u = [];
|
|
278
271
|
for (const [c, l] of Object.entries(s)) {
|
|
279
|
-
const p = `${o}${c === "url" ? "" : `:${c}`}`, d =
|
|
272
|
+
const p = `${o}${c === "url" ? "" : `:${c}`}`, d = y({ [p]: l });
|
|
280
273
|
(c === "url" ? a : u).push(...d);
|
|
281
274
|
}
|
|
282
275
|
t.push(...a, ...u);
|
|
283
276
|
} else
|
|
284
|
-
t.push(...typeof s == "string" ?
|
|
277
|
+
t.push(...typeof s == "string" ? y({ [o]: s }) : P(o, s));
|
|
285
278
|
continue;
|
|
286
279
|
}
|
|
287
280
|
if (typeof i == "object" && i)
|
|
@@ -300,54 +293,54 @@ function g(e) {
|
|
|
300
293
|
// @ts-expect-error untyped
|
|
301
294
|
content: l
|
|
302
295
|
});
|
|
303
|
-
} else
|
|
296
|
+
} else A.has(m(o)) ? t.push(...P(o, i)) : r[o] = v(i);
|
|
304
297
|
else
|
|
305
298
|
r[o] = i;
|
|
306
299
|
}
|
|
307
300
|
const n = Object.entries(r).map(([o, i]) => {
|
|
308
301
|
if (o === "charset")
|
|
309
302
|
return { charset: i === null ? "_null" : i };
|
|
310
|
-
const s = C(o), a =
|
|
303
|
+
const s = C(o), a = Q(o), u = i === null ? "_null" : typeof i == "object" ? Z(i, o) : typeof i == "number" ? i.toString() : i;
|
|
311
304
|
return s === "http-equiv" ? { "http-equiv": a, content: u } : { [s]: a, content: u };
|
|
312
305
|
});
|
|
313
306
|
return [...t, ...n].map(
|
|
314
307
|
(o) => "content" in o && o.content === "_null" ? { ...o, content: null } : o
|
|
315
308
|
);
|
|
316
309
|
}
|
|
317
|
-
const
|
|
310
|
+
const X = {
|
|
318
311
|
key: "flatMeta",
|
|
319
312
|
hooks: {
|
|
320
313
|
"entries:normalize": (e) => {
|
|
321
314
|
const t = [];
|
|
322
|
-
e.tags = e.tags.map((r) => r.tag !== "_flatMeta" ? r : (t.push(
|
|
315
|
+
e.tags = e.tags.map((r) => r.tag !== "_flatMeta" ? r : (t.push(y(r.props).map((n) => ({
|
|
323
316
|
...r,
|
|
324
317
|
tag: "meta",
|
|
325
318
|
props: n
|
|
326
319
|
}))), !1)).filter(Boolean).concat(...t);
|
|
327
320
|
}
|
|
328
321
|
}
|
|
329
|
-
},
|
|
322
|
+
}, Y = ["name", "property", "http-equiv"], ee = /* @__PURE__ */ new Set([
|
|
330
323
|
"viewport",
|
|
331
324
|
"description",
|
|
332
325
|
"keywords",
|
|
333
326
|
"robots"
|
|
334
327
|
]);
|
|
335
|
-
function
|
|
328
|
+
function _e(e) {
|
|
336
329
|
const t = e.split(":");
|
|
337
|
-
return t.length ?
|
|
330
|
+
return t.length ? A.has(t[1]) : !1;
|
|
338
331
|
}
|
|
339
|
-
function
|
|
332
|
+
function xe(e) {
|
|
340
333
|
const { props: t, tag: r } = e;
|
|
341
|
-
if (
|
|
334
|
+
if (B.has(r))
|
|
342
335
|
return r;
|
|
343
336
|
if (r === "link" && t.rel === "canonical")
|
|
344
337
|
return "canonical";
|
|
345
338
|
if (t.charset)
|
|
346
339
|
return "charset";
|
|
347
340
|
if (e.tag === "meta") {
|
|
348
|
-
for (const n of
|
|
341
|
+
for (const n of Y)
|
|
349
342
|
if (t[n] !== void 0) {
|
|
350
|
-
const o = t[n], i = o.includes(":"), s =
|
|
343
|
+
const o = t[n], i = o.includes(":"), s = ee.has(o), u = !(i || s) && e.key ? `:key:${e.key}` : "";
|
|
351
344
|
return `${r}:${o}${u}`;
|
|
352
345
|
}
|
|
353
346
|
}
|
|
@@ -355,33 +348,26 @@ function Ue(e) {
|
|
|
355
348
|
return `${r}:key:${e.key}`;
|
|
356
349
|
if (t.id)
|
|
357
350
|
return `${r}:id:${t.id}`;
|
|
358
|
-
if (
|
|
351
|
+
if (W.has(r)) {
|
|
359
352
|
const n = e.textContent || e.innerHTML;
|
|
360
353
|
if (n)
|
|
361
354
|
return `${r}:content:${n}`;
|
|
362
355
|
}
|
|
363
356
|
}
|
|
364
|
-
function
|
|
365
|
-
const t = e._h || e._d;
|
|
366
|
-
if (t)
|
|
367
|
-
return t;
|
|
368
|
-
const r = e.textContent || e.innerHTML;
|
|
369
|
-
return r || `${e.tag}:${Object.entries(e.props).map(([n, o]) => `${n}:${String(o)}`).join(",")}`;
|
|
370
|
-
}
|
|
371
|
-
function y(e, t, r) {
|
|
357
|
+
function g(e, t, r) {
|
|
372
358
|
typeof e === "function" && (!r || r !== "titleTemplate" && !(r[0] === "o" && r[1] === "n")) && (e = e());
|
|
373
359
|
let o;
|
|
374
360
|
if (t && (o = t(r, e)), Array.isArray(o))
|
|
375
|
-
return o.map((i) =>
|
|
361
|
+
return o.map((i) => g(i, t));
|
|
376
362
|
if ((o == null ? void 0 : o.constructor) === Object) {
|
|
377
363
|
const i = {};
|
|
378
364
|
for (const s of Object.keys(o))
|
|
379
|
-
i[s] =
|
|
365
|
+
i[s] = g(o[s], t, s);
|
|
380
366
|
return i;
|
|
381
367
|
}
|
|
382
368
|
return o;
|
|
383
369
|
}
|
|
384
|
-
function
|
|
370
|
+
function te(e, t) {
|
|
385
371
|
const r = e === "style" ? /* @__PURE__ */ new Map() : /* @__PURE__ */ new Set();
|
|
386
372
|
function n(o) {
|
|
387
373
|
const i = o.trim();
|
|
@@ -396,17 +382,17 @@ function re(e, t) {
|
|
|
396
382
|
i && i !== "false" && (e === "style" ? r.set(o.trim(), i) : n(o));
|
|
397
383
|
}), r;
|
|
398
384
|
}
|
|
399
|
-
function
|
|
385
|
+
function re(e, t) {
|
|
400
386
|
return e.props = e.props || {}, t ? e.tag === "templateParams" ? (e.props = t, e) : (Object.entries(t).forEach(([r, n]) => {
|
|
401
387
|
if (n === null) {
|
|
402
388
|
e.props[r] = null;
|
|
403
389
|
return;
|
|
404
390
|
}
|
|
405
391
|
if (r === "class" || r === "style") {
|
|
406
|
-
e.props[r] =
|
|
392
|
+
e.props[r] = te(r, n);
|
|
407
393
|
return;
|
|
408
394
|
}
|
|
409
|
-
if (
|
|
395
|
+
if (F.has(r)) {
|
|
410
396
|
if (["textContent", "innerHTML"].includes(r) && typeof n == "object") {
|
|
411
397
|
let s = t.type;
|
|
412
398
|
if (t.type || (s = "application/json"), !(s != null && s.endsWith("json")) && s !== "speculationrules")
|
|
@@ -420,11 +406,11 @@ function ne(e, t) {
|
|
|
420
406
|
o === "true" || o === "" ? e.props[r] = i ? o : !0 : !n && i && o === "false" ? e.props[r] = "false" : n !== void 0 && (e.props[r] = n);
|
|
421
407
|
}), e) : e;
|
|
422
408
|
}
|
|
423
|
-
function
|
|
424
|
-
const r = typeof t == "object" && typeof t != "function" ? t : { [e === "script" || e === "noscript" || e === "style" ? "innerHTML" : "textContent"]: t }, n =
|
|
425
|
-
return n.key &&
|
|
409
|
+
function ne(e, t) {
|
|
410
|
+
const r = typeof t == "object" && typeof t != "function" ? t : { [e === "script" || e === "noscript" || e === "style" ? "innerHTML" : "textContent"]: t }, n = re({ tag: e, props: {} }, r);
|
|
411
|
+
return n.key && G.has(n.tag) && (n.props["data-hid"] = n._h = n.key), n.tag === "script" && typeof n.innerHTML == "object" && (n.innerHTML = JSON.stringify(n.innerHTML), n.props.type = n.props.type || "application/json"), Array.isArray(n.props.content) ? n.props.content.map((o) => ({ ...n, props: { ...n.props, content: o } })) : n;
|
|
426
412
|
}
|
|
427
|
-
function
|
|
413
|
+
function Ue(e, t) {
|
|
428
414
|
if (!e)
|
|
429
415
|
return [];
|
|
430
416
|
typeof e == "function" && (e = e());
|
|
@@ -435,59 +421,51 @@ function De(e, t) {
|
|
|
435
421
|
};
|
|
436
422
|
e = r(void 0, e);
|
|
437
423
|
const n = [];
|
|
438
|
-
return e =
|
|
424
|
+
return e = g(e, r), Object.entries(e || {}).forEach(([o, i]) => {
|
|
439
425
|
if (i !== void 0)
|
|
440
426
|
for (const s of Array.isArray(i) ? i : [i])
|
|
441
|
-
n.push(
|
|
427
|
+
n.push(ne(o, s));
|
|
442
428
|
}), n.flat();
|
|
443
429
|
}
|
|
444
|
-
const
|
|
430
|
+
const oe = (e, t) => K(t) ? D(t) : t, se = "usehead";
|
|
445
431
|
// @__NO_SIDE_EFFECTS__
|
|
446
|
-
function
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
r.config.globalProperties.$unhead = e, r.config.globalProperties.$head = e, r.provide(_, e);
|
|
450
|
-
}
|
|
451
|
-
}.install;
|
|
452
|
-
}
|
|
453
|
-
// @__NO_SIDE_EFFECTS__
|
|
454
|
-
function x() {
|
|
455
|
-
if (k()) {
|
|
456
|
-
const e = L(_);
|
|
432
|
+
function _() {
|
|
433
|
+
if (H()) {
|
|
434
|
+
const e = R(se);
|
|
457
435
|
if (!e)
|
|
458
436
|
throw new Error("useHead() was called without provide context, ensure you call it through the setup() function.");
|
|
459
437
|
return e;
|
|
460
438
|
}
|
|
461
439
|
throw new Error("useHead() was called without provide context, ensure you call it through the setup() function.");
|
|
462
440
|
}
|
|
463
|
-
function
|
|
464
|
-
const r = t.head || /* @__PURE__ */
|
|
441
|
+
function $(e, t = {}) {
|
|
442
|
+
const r = t.head || /* @__PURE__ */ _();
|
|
465
443
|
return r.ssr ? r.push(e || {}, t) : ie(r, e, t);
|
|
466
444
|
}
|
|
467
445
|
function ie(e, t, r = {}) {
|
|
468
|
-
const n =
|
|
446
|
+
const n = T(!1);
|
|
469
447
|
let o;
|
|
470
|
-
return
|
|
471
|
-
const s = n.value ? {} :
|
|
448
|
+
return k(() => {
|
|
449
|
+
const s = n.value ? {} : g(t, oe);
|
|
472
450
|
o ? o.patch(s) : o = e.push(s, r);
|
|
473
|
-
}),
|
|
451
|
+
}), L() && (q(() => {
|
|
474
452
|
o.dispose();
|
|
475
|
-
}),
|
|
453
|
+
}), z(() => {
|
|
476
454
|
n.value = !0;
|
|
477
|
-
}),
|
|
455
|
+
}), N(() => {
|
|
478
456
|
n.value = !1;
|
|
479
457
|
})), o;
|
|
480
458
|
}
|
|
481
459
|
function S(e = {}, t = {}) {
|
|
482
|
-
(t.head || /* @__PURE__ */
|
|
460
|
+
(t.head || /* @__PURE__ */ _()).use(X);
|
|
483
461
|
const { title: n, titleTemplate: o, ...i } = e;
|
|
484
|
-
return
|
|
462
|
+
return $({
|
|
485
463
|
title: n,
|
|
486
464
|
titleTemplate: o,
|
|
487
465
|
_flatMeta: i
|
|
488
466
|
}, t);
|
|
489
467
|
}
|
|
490
|
-
function
|
|
468
|
+
function De() {
|
|
491
469
|
function e(r) {
|
|
492
470
|
S({
|
|
493
471
|
ogSiteName: r.siteName,
|
|
@@ -503,7 +481,7 @@ function ke() {
|
|
|
503
481
|
url: a,
|
|
504
482
|
type: u = "website"
|
|
505
483
|
} = r, c = o && o.length > 155 ? `${o.substring(0, 152)}...` : o;
|
|
506
|
-
|
|
484
|
+
$({
|
|
507
485
|
title: n,
|
|
508
486
|
link: a ? [{
|
|
509
487
|
rel: "canonical",
|
|
@@ -529,9 +507,9 @@ function ke() {
|
|
|
529
507
|
setPageSEO: t
|
|
530
508
|
};
|
|
531
509
|
}
|
|
532
|
-
function
|
|
510
|
+
function Ke() {
|
|
533
511
|
const e = M(), t = () => e.meta;
|
|
534
|
-
|
|
512
|
+
$({
|
|
535
513
|
title: f(() => t().title || ""),
|
|
536
514
|
link: f(() => {
|
|
537
515
|
const r = t();
|
|
@@ -570,20 +548,16 @@ function Le() {
|
|
|
570
548
|
});
|
|
571
549
|
}
|
|
572
550
|
export {
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
ve as
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
Ue as e,
|
|
551
|
+
Ce as U,
|
|
552
|
+
Ve as V,
|
|
553
|
+
Ie as a,
|
|
554
|
+
ve as b,
|
|
555
|
+
De as c,
|
|
556
|
+
Ke as d,
|
|
557
|
+
xe as e,
|
|
581
558
|
Oe as f,
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
xe as i,
|
|
585
|
-
De as n,
|
|
559
|
+
_e as i,
|
|
560
|
+
Ue as n,
|
|
586
561
|
Me as u,
|
|
587
|
-
Ke as v,
|
|
588
562
|
Ee as w
|
|
589
563
|
};
|