@huyooo/ui 1.0.7 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (74) hide show
  1. package/dist/AuthkitAppSetting-rtYZcSAR.js +2677 -0
  2. package/dist/{Contact-BWuVR9ho.js → Contact-CcWf3UEZ.js} +9 -9
  3. package/dist/{CustomTable-BzGfaAVH.js → CustomTable-HDwqEcmB.js} +1 -1
  4. package/dist/FeedbackModal.vue_vue_type_script_setup_true_lang-DpOmbAg-.js +1491 -0
  5. package/dist/{LegalDocViewer-DM8FYBpf.js → LegalDocViewer-C0tsIbz9.js} +747 -748
  6. package/dist/MessageHandle-BUufez4S.js +1233 -0
  7. package/dist/{MessageList-Ce-_LNTk.js → MessageList-rttvPmxV.js} +4 -4
  8. package/dist/PaySubscriptions-p75aBnHm.js +1331 -0
  9. package/dist/{PricingPlans-CV97ck9p.js → PricingPlans-CQ0qk9Hb.js} +99 -105
  10. package/dist/{ReferrerReferees-DgygiIiE.js → ReferrerReferees-BU9IEQgz.js} +47 -46
  11. package/dist/Upload.vue_vue_type_script_setup_true_lang-bh0NFq9E.js +78 -0
  12. package/dist/{UserMenuInvitationsItem.vue_vue_type_script_setup_true_lang-0Td42Nb3.js → UserMenuInvitationsItem.vue_vue_type_script_setup_true_lang-DG4AuHiO.js} +64 -65
  13. package/dist/WidthContainer-DSE4QbW0.js +717 -0
  14. package/dist/api/billingSubscriptionApi.d.ts +4 -1
  15. package/dist/apiClients-Ctcq8NZs.js +245 -0
  16. package/dist/authkit.js +10 -10
  17. package/dist/common/globalConfig.d.ts +36 -18
  18. package/dist/common.js +2 -2
  19. package/dist/components/Authkit/Auth/AuthkitOauthCallback.vue.d.ts +2 -2
  20. package/dist/components/Authkit/AuthkitProvider.vue.d.ts +0 -5
  21. package/dist/components/Upload/Upload.vue.d.ts +6 -6
  22. package/dist/composables/Authkit/useAuthkitAuth.d.ts +3 -0
  23. package/dist/composables/Billing/usePaymentReturn.d.ts +1 -0
  24. package/dist/composables/uploadFeedbackAttachment.d.ts +2 -1
  25. package/dist/composables/useMessageList.d.ts +2 -1
  26. package/dist/composables.d.ts +2 -2
  27. package/dist/composables.js +46 -46
  28. package/dist/feedback.js +2 -2
  29. package/dist/{fetchAuthPageAboutUs-dzTSwRsB.js → fetchAuthPageAboutUs-DiCqMUX3.js} +4 -4
  30. package/dist/{index-BkLvw1PU.js → index-Cn6LcfZO.js} +1 -1
  31. package/dist/legalDocs/resolveAppId.d.ts +1 -1
  32. package/dist/main.d.ts +4 -3
  33. package/dist/main.js +464 -469
  34. package/dist/message.js +53 -52
  35. package/dist/pay.js +4 -4
  36. package/dist/privateCom.js +1 -1
  37. package/dist/referrer.js +1 -1
  38. package/dist/{useUploadCos-C8BqFPkx.js → runtime-BzCSCUNv.js} +2712 -2609
  39. package/dist/runtime.d.ts +18 -0
  40. package/dist/style.css +1 -1
  41. package/dist/types/api/auth.generated.d.ts +0 -10
  42. package/dist/upload/browserCosTransport.d.ts +25 -0
  43. package/dist/upload/browserUploadService.d.ts +20 -0
  44. package/dist/upload.d.ts +2 -1
  45. package/dist/upload.js +5 -4
  46. package/dist/{useAuthkitAppsAuthPageInfo-CNudJd04.js → useAuthkitAppsAuthPageInfo-DZ1p-P3Q.js} +18 -21
  47. package/dist/useAuthkitAuth-BPTZUSkM.js +272 -0
  48. package/dist/{useAuthkitCreateAndUpdate-BsINsI-E.js → useAuthkitCreateAndUpdate-Bbv7vZZn.js} +1 -1
  49. package/dist/useAuthkitUsersProfile-CW_exa7E.js +39 -0
  50. package/dist/useBillingStatusOptions-Br-iL77Z.js +61 -0
  51. package/dist/{useEnsureAuthenticated-DNkCCy_Y.js → useEnsureAuthenticated-CncOvj2H.js} +2 -2
  52. package/dist/{useLegalDocs-DQP_Yq6B.js → useLegalDocs-D44qU_q0.js} +25 -25
  53. package/dist/useMessageNotifications-D9uikt21.js +80 -0
  54. package/dist/{useRoutePermission-CEiya9AM.js → useRoutePermission-BrQX7NTq.js} +2 -2
  55. package/dist/{useSEO-CDWxbk8B.js → useSEO-_TNouXE_.js} +89 -86
  56. package/dist/useSubscriptionCheckout-BDDCRxSs.js +353 -0
  57. package/dist/user.js +1 -1
  58. package/dist/utils/apiClients.d.ts +20 -12
  59. package/dist/utils/apiMiddlewares.d.ts +9 -23
  60. package/package.json +1 -1
  61. package/dist/AuthkitAppSetting-BN8-xgNq.js +0 -2674
  62. package/dist/FeedbackModal.vue_vue_type_script_setup_true_lang-DrL_XBqf.js +0 -1481
  63. package/dist/MessageHandle-mEkCsv9e.js +0 -1173
  64. package/dist/PaySubscriptions-CXkEjqr2.js +0 -1326
  65. package/dist/Upload.vue_vue_type_script_setup_true_lang-VGh2V4o0.js +0 -76
  66. package/dist/WidthContainer-CFMQRsCy.js +0 -721
  67. package/dist/apiClients-BcXOLuYu.js +0 -272
  68. package/dist/composables/Upload/useUploadCos.d.ts +0 -12
  69. package/dist/useAuthkitAuth-3m0yW6uP.js +0 -267
  70. package/dist/useAuthkitUsersProfile-DJlMsftY.js +0 -40
  71. package/dist/useBillingStatusOptions-CfHQOFNw.js +0 -71
  72. package/dist/useMessageNotifications-CAphguOm.js +0 -75
  73. package/dist/useSubscriptionCheckout-d_M_rKRa.js +0 -368
  74. package/dist/utils/billingFetch.d.ts +0 -1
@@ -1334,12 +1334,6 @@ export type Api = {
1334
1334
  return: any;
1335
1335
  };
1336
1336
  };
1337
- logout: {
1338
- /** 登出指定设备的会话 */
1339
- post: {
1340
- return: any;
1341
- };
1342
- };
1343
1337
  logoutAll: {
1344
1338
  /** 登出所有设备的会话 */
1345
1339
  post: {
@@ -3344,10 +3338,6 @@ export interface ApiClient {
3344
3338
  /** 用户主动登出当前会话 */
3345
3339
  post: (config?: RequestConfig) => RequestBuilder<any>;
3346
3340
  };
3347
- logout: {
3348
- /** 登出指定设备的会话 */
3349
- post: (config?: RequestConfig) => RequestBuilder<any>;
3350
- };
3351
3341
  logoutAll: {
3352
3342
  /** 登出所有设备的会话 */
3353
3343
  post: (config?: RequestConfig) => RequestBuilder<any>;
@@ -0,0 +1,25 @@
1
+ import { default as COS } from 'cos-js-sdk-v5';
2
+ export interface BrowserCosCredentials {
3
+ tmpSecretId: string;
4
+ tmpSecretKey: string;
5
+ sessionToken: string;
6
+ startTime: number;
7
+ expiredTime: number;
8
+ }
9
+ export interface BrowserCosTransferInput {
10
+ file: File;
11
+ bucket: string;
12
+ region: string;
13
+ key: string;
14
+ credentials: BrowserCosCredentials;
15
+ onProgress?: (progress: COS.ProgressInfo) => void;
16
+ }
17
+ export interface BrowserCosTransferTask {
18
+ result: Promise<COS.UploadFileResult>;
19
+ abort: () => void;
20
+ }
21
+ /** 只负责浏览器文件到 COS 的传输,不参与业务文件登记。 */
22
+ export declare function createBrowserCosTransport(): {
23
+ upload: (input: BrowserCosTransferInput) => BrowserCosTransferTask;
24
+ };
25
+ export type BrowserCosTransport = ReturnType<typeof createBrowserCosTransport>;
@@ -0,0 +1,20 @@
1
+ import { ApiClients } from '../utils/apiClients';
2
+ import { BrowserCosTransport } from './browserCosTransport';
3
+ export interface BrowserUploadInput {
4
+ file: File;
5
+ bucketId: string;
6
+ onProgress?: (percent: number) => void;
7
+ }
8
+ export interface BrowserUploadResult {
9
+ file: unknown;
10
+ key: string;
11
+ }
12
+ export interface BrowserUploadTask {
13
+ result: Promise<BrowserUploadResult>;
14
+ abort: () => Promise<void>;
15
+ }
16
+ /** 复用现有无状态接口:获取凭证 → 浏览器直传 COS → 登记文件。 */
17
+ export declare function createBrowserUploadService(api: ApiClients, transport?: BrowserCosTransport): {
18
+ upload: (input: BrowserUploadInput) => BrowserUploadTask;
19
+ };
20
+ export type BrowserUploadService = ReturnType<typeof createBrowserUploadService>;
package/dist/upload.d.ts CHANGED
@@ -1,2 +1,3 @@
1
1
  export { default as Upload } from './components/Upload/Upload.vue';
2
- export { useUploadCos } from './composables/Upload/useUploadCos';
2
+ export { createBrowserCosTransport, type BrowserCosCredentials, type BrowserCosTransferInput, type BrowserCosTransferTask, type BrowserCosTransport, } from './upload/browserCosTransport';
3
+ export { createBrowserUploadService, type BrowserUploadInput, type BrowserUploadResult, type BrowserUploadService, type BrowserUploadTask, } from './upload/browserUploadService';
package/dist/upload.js CHANGED
@@ -1,6 +1,7 @@
1
- import { _ as p } from "./Upload.vue_vue_type_script_setup_true_lang-VGh2V4o0.js";
2
- import { u as s } from "./useUploadCos-C8BqFPkx.js";
1
+ import { _ as o } from "./Upload.vue_vue_type_script_setup_true_lang-bh0NFq9E.js";
2
+ import { e as s, f as p } from "./runtime-BzCSCUNv.js";
3
3
  export {
4
- p as Upload,
5
- s as useUploadCos
4
+ o as Upload,
5
+ s as createBrowserCosTransport,
6
+ p as createBrowserUploadService
6
7
  };
@@ -1,5 +1,5 @@
1
1
  import { ref as r } from "vue";
2
- import { e as l } from "./apiClients-BcXOLuYu.js";
2
+ import { g as s } from "./apiClients-Ctcq8NZs.js";
3
3
  function i() {
4
4
  return {
5
5
  type: "doc",
@@ -8,13 +8,13 @@ function i() {
8
8
  }]
9
9
  };
10
10
  }
11
- function s(e) {
11
+ function u(e) {
12
12
  return e.type === "doc" && Array.isArray(e.content) && e.content.length > 0;
13
13
  }
14
14
  function a(e) {
15
- return typeof e == "string" || e == null ? i() : s(e) ? e : i();
15
+ return typeof e == "string" || e == null ? i() : u(e) ? e : i();
16
16
  }
17
- function u(e) {
17
+ function p(e) {
18
18
  return {
19
19
  personalInformationCollectionList: a(e.personalInformationCollectionList),
20
20
  thirdPartyInformationSharingList: a(e.thirdPartyInformationSharingList),
@@ -23,7 +23,7 @@ function u(e) {
23
23
  licenseInformation: a(e.licenseInformation)
24
24
  };
25
25
  }
26
- function p() {
26
+ function c() {
27
27
  const e = i();
28
28
  return {
29
29
  personalInformationCollectionList: e,
@@ -81,7 +81,7 @@ const o = r({
81
81
  }
82
82
  },
83
83
  authorizationCallback: "",
84
- aboutUs: p(),
84
+ aboutUs: c(),
85
85
  brand: {
86
86
  theme: "dark",
87
87
  logo: "",
@@ -92,23 +92,20 @@ const o = r({
92
92
  backgroundImage: "/66a0d5b35203890887f0e1a4/6714e2458fe86895bf3da8ae/1ef8ed72-1731-6e00-93d1-fa24165f1a3e.webp"
93
93
  }
94
94
  }), n = r(!1), t = r(!1);
95
- function c(e) {
96
- o.value.id = e.id, o.value.name = e.name, o.value.description = e.description, o.value.homePageUrl = e.homePageUrl, o.value.applicationLogo = e.applicationLogo, o.value.applicationLogoUrl = e.applicationLogoUrl, o.value.publicRoutes = e.publicRoutes || [], o.value.oauth = e.oauth, o.value.authMethods = e.authMethods || o.value.authMethods, o.value.signUpAuth = e.signUpAuth, o.value.registrationTerms = e.registrationTerms, o.value.authorizationCallback = e.authorizationCallback, o.value.aboutUs = u(e.aboutUs), o.value.brand = e.brand;
95
+ function f(e) {
96
+ o.value.id = e.id, o.value.name = e.name, o.value.description = e.description, o.value.homePageUrl = e.homePageUrl, o.value.applicationLogo = e.applicationLogo, o.value.applicationLogoUrl = e.applicationLogoUrl, o.value.publicRoutes = e.publicRoutes || [], o.value.oauth = e.oauth, o.value.authMethods = e.authMethods || o.value.authMethods, o.value.signUpAuth = e.signUpAuth, o.value.registrationTerms = e.registrationTerms, o.value.authorizationCallback = e.authorizationCallback, o.value.aboutUs = p(e.aboutUs), o.value.brand = e.brand;
97
97
  }
98
- async function f() {
98
+ async function g() {
99
99
  n.value = !0, t.value = !1;
100
- try {
101
- const {
102
- data: e
103
- } = await l.apps.authPageInfo.post({});
104
- e && (c(e), t.value = !0);
105
- } finally {
106
- n.value = !1;
107
- }
100
+ const {
101
+ data: e,
102
+ error: l
103
+ } = await s().auth.apps.authPageInfo.post({});
104
+ n.value = !1, !(l || !e) && (f(e), t.value = !0);
108
105
  }
109
- function m() {
106
+ function d() {
110
107
  async function e() {
111
- t.value || n.value || await f();
108
+ t.value || n.value || await g();
112
109
  }
113
110
  return {
114
111
  appsData: o,
@@ -118,6 +115,6 @@ function m() {
118
115
  };
119
116
  }
120
117
  export {
121
- u as n,
122
- m as u
118
+ p as n,
119
+ d as u
123
120
  };
@@ -0,0 +1,272 @@
1
+ import { ref as u, computed as p, nextTick as _, readonly as x } from "vue";
2
+ import { o as M, g as m, r as $, s as E } from "./apiClients-Ctcq8NZs.js";
3
+ import { u as D } from "./useAuthkitAppsAuthPageInfo-DZ1p-P3Q.js";
4
+ const g = u(!1), w = u(!1);
5
+ let I;
6
+ const G = "请先阅读并同意用户协议与隐私政策", K = {
7
+ required: !1,
8
+ userServiceAgreement: !1,
9
+ privacyPolicy: !1
10
+ };
11
+ function A() {
12
+ I && clearTimeout(I), w.value = !1, _(() => {
13
+ w.value = !0, I = setTimeout(() => {
14
+ w.value = !1;
15
+ }, 450);
16
+ });
17
+ }
18
+ function N(e) {
19
+ return [{
20
+ validator: (r, t) => {
21
+ if (!e()) {
22
+ t();
23
+ return;
24
+ }
25
+ if (r === !0) {
26
+ t();
27
+ return;
28
+ }
29
+ A(), t(G);
30
+ }
31
+ }];
32
+ }
33
+ function Y() {
34
+ const {
35
+ appsData: e
36
+ } = D(), r = p(() => e.value.registrationTerms ?? K), t = p(() => {
37
+ var n;
38
+ return ((n = e.value.signUpAuth) == null ? void 0 : n.enabled) !== !1;
39
+ }), l = p(() => t.value && !r.value.required);
40
+ function o() {
41
+ return t.value && r.value.required;
42
+ }
43
+ function i() {
44
+ return o();
45
+ }
46
+ function f() {
47
+ g.value = !1;
48
+ }
49
+ function d() {
50
+ return !i() || g.value ? !0 : (A(), !1);
51
+ }
52
+ function v(n) {
53
+ g.value = n;
54
+ }
55
+ function S(n) {
56
+ const s = p(() => n === "signUp" ? o() : i()), h = p(() => N(() => s.value));
57
+ return {
58
+ showTermsField: s,
59
+ termsRules: h
60
+ };
61
+ }
62
+ return {
63
+ acceptedTerms: g,
64
+ termsShaking: w,
65
+ registrationTerms: r,
66
+ signUpAuthEnabled: t,
67
+ registrationBlocked: l,
68
+ requiresAcceptanceForSignUp: o,
69
+ requiresAcceptanceForOAuth: i,
70
+ resetAcceptedTerms: f,
71
+ shakeTerms: A,
72
+ syncAcceptedTerms: v,
73
+ ensureTermsAcceptedForSignIn: d,
74
+ useTermsFormField: S
75
+ };
76
+ }
77
+ const c = u("signIn"), F = /* @__PURE__ */ new Set(), O = /* @__PURE__ */ new Set(), L = /* @__PURE__ */ new Set(), j = /* @__PURE__ */ new Set(), a = u(null), V = "jwtToken";
78
+ function b() {
79
+ try {
80
+ const e = localStorage.getItem(V);
81
+ if (e)
82
+ return a.value = e, !0;
83
+ } catch (e) {
84
+ console.warn("Failed to access localStorage:", e);
85
+ }
86
+ return !1;
87
+ }
88
+ function z() {
89
+ try {
90
+ const e = new URL(window.location.href), r = e.searchParams.get("token");
91
+ if (!r) return !1;
92
+ const t = e.searchParams.get("refreshToken"), l = e.searchParams.get("userId"), o = e.searchParams.get("appId"), i = e.searchParams.get("needBindIdentity") === "true";
93
+ t ? E({
94
+ jwtToken: r,
95
+ refreshToken: t
96
+ }) : U(r), ["token", "refreshToken", "userId", "appId", "needBindIdentity", "expiresIn"].forEach((d) => e.searchParams.delete(d));
97
+ const f = `${e.pathname}${e.search}${e.hash}`;
98
+ return window.history.replaceState({}, "", f), C({
99
+ jwtToken: r,
100
+ userId: l,
101
+ appId: o,
102
+ needBindIdentity: i
103
+ }), !0;
104
+ } catch (e) {
105
+ return console.warn("Failed to handle OAuth callback:", e), !1;
106
+ }
107
+ }
108
+ function H() {
109
+ return z() ? !0 : b();
110
+ }
111
+ function q() {
112
+ return a.value || b() ? a.value : null;
113
+ }
114
+ function U(e) {
115
+ a.value = e;
116
+ try {
117
+ localStorage.setItem(V, e);
118
+ } catch (r) {
119
+ console.warn("Failed to save token to localStorage:", r);
120
+ }
121
+ }
122
+ function k(e) {
123
+ e.refreshToken ? E({
124
+ jwtToken: e.jwtToken,
125
+ refreshToken: e.refreshToken
126
+ }) : U(e.jwtToken), C(e);
127
+ }
128
+ function J() {
129
+ a.value = null, Z();
130
+ }
131
+ M(J);
132
+ function y() {
133
+ $();
134
+ }
135
+ async function Q() {
136
+ if (!q())
137
+ return y(), !0;
138
+ const {
139
+ error: e
140
+ } = await m().auth.auth.signOut.post();
141
+ return y(), !e;
142
+ }
143
+ function T(e, r) {
144
+ return e.add(r), () => {
145
+ e.delete(r);
146
+ };
147
+ }
148
+ function C(e) {
149
+ F.forEach((r) => {
150
+ r(e);
151
+ });
152
+ }
153
+ function W() {
154
+ O.forEach((e) => void e());
155
+ }
156
+ function X() {
157
+ L.forEach((e) => void e());
158
+ }
159
+ function Z() {
160
+ j.forEach((e) => void e());
161
+ }
162
+ function ee(e) {
163
+ return T(F, e);
164
+ }
165
+ function ne(e) {
166
+ return T(O, e);
167
+ }
168
+ function re(e) {
169
+ return T(L, e);
170
+ }
171
+ function te(e) {
172
+ return T(j, e);
173
+ }
174
+ function ue() {
175
+ const e = u(!1), r = u(!1), t = u(!1);
176
+ async function l(n) {
177
+ e.value = !0;
178
+ const {
179
+ data: s,
180
+ error: h
181
+ } = await m().auth.auth.signIn.unified.post({
182
+ identifier: n.identifier || n.email || "",
183
+ password: n.password,
184
+ code: n.code,
185
+ emailVerifyId: n.emailVerifyId,
186
+ method: n.method || "password"
187
+ });
188
+ if (e.value = !1, h || !s)
189
+ return;
190
+ k(s);
191
+ }
192
+ function o(n) {
193
+ k(n);
194
+ }
195
+ async function i(n) {
196
+ const {
197
+ resetAcceptedTerms: s,
198
+ acceptedTerms: h,
199
+ requiresAcceptanceForSignUp: P
200
+ } = Y();
201
+ r.value = !0;
202
+ const R = P() ? h.value : void 0, {
203
+ error: B
204
+ } = n.type === "phone" ? await m().auth.auth.signUp.phone.post({
205
+ phone: n.phone || "",
206
+ code: n.code || "",
207
+ password: n.password,
208
+ inviteCode: n.inviteCode,
209
+ acceptedTerms: R === !0
210
+ }) : await m().auth.auth.signUp.post({
211
+ email: n.email || "",
212
+ userToken: n.userToken || "",
213
+ emailVerifyId: n.emailVerifyId || "",
214
+ password: n.password || "",
215
+ inviteCode: n.inviteCode,
216
+ acceptedTerms: R === !0
217
+ });
218
+ r.value = !1, !B && (s(), c.value = "signIn", W());
219
+ }
220
+ async function f(n) {
221
+ t.value = !0;
222
+ const {
223
+ error: s
224
+ } = await m().auth.auth.resetPassword.post({
225
+ method: n.method || "email",
226
+ email: n.email,
227
+ phone: n.phone,
228
+ userToken: n.userToken,
229
+ code: n.code,
230
+ emailVerifyId: n.emailVerifyId,
231
+ password: n.password
232
+ });
233
+ t.value = !1, !s && (c.value = "signIn", X());
234
+ }
235
+ function d() {
236
+ c.value = "signUp";
237
+ }
238
+ function v() {
239
+ c.value = "resetPassword";
240
+ }
241
+ function S() {
242
+ c.value = "signIn";
243
+ }
244
+ return {
245
+ signInSubmit: l,
246
+ passkeySignInSubmit: o,
247
+ signUpSubmit: i,
248
+ resetPasswordSubmit: f,
249
+ currentView: c,
250
+ authSignInLoading: e,
251
+ authSignUpLoading: r,
252
+ resetPasswordLoading: t,
253
+ switchSignUp: d,
254
+ switchResetPassword: v,
255
+ switchSignIn: S,
256
+ onSignIn: ee,
257
+ onSignUp: ne,
258
+ onResetPassword: re,
259
+ onSignOut: te,
260
+ jwtToken: x(a),
261
+ getToken: q,
262
+ setToken: U,
263
+ completeSignIn: k,
264
+ restoreSession: H,
265
+ clearAuth: y,
266
+ signOut: Q
267
+ };
268
+ }
269
+ export {
270
+ Y as a,
271
+ ue as u
272
+ };
@@ -1,5 +1,5 @@
1
1
  /* empty css */
2
- import "./apiClients-BcXOLuYu.js";
2
+ import "./apiClients-Ctcq8NZs.js";
3
3
  import { Message as u } from "@arco-design/web-vue";
4
4
  import { ref as e } from "vue";
5
5
  function h(o) {
@@ -0,0 +1,39 @@
1
+ import { ref as l, computed as r } from "vue";
2
+ import { g as f } from "./apiClients-Ctcq8NZs.js";
3
+ import { u as c } from "./useAuthkitAuth-BPTZUSkM.js";
4
+ const t = l(null), u = l(!1), o = l(!1), v = r(() => !!t.value);
5
+ async function p() {
6
+ const {
7
+ getToken: s,
8
+ clearAuth: a
9
+ } = c();
10
+ if (!s()) {
11
+ console.warn("No authentication token found"), t.value = null, o.value = !0;
12
+ return;
13
+ }
14
+ u.value = !0, o.value = !1;
15
+ const {
16
+ data: n,
17
+ error: e
18
+ } = await f().auth.users.profile.post({});
19
+ if (u.value = !1, o.value = !0, n) {
20
+ const i = n;
21
+ t.value = i;
22
+ } else ((e == null ? void 0 : e.code) === 401 || (e == null ? void 0 : e.code) === 40101) && (t.value = null, console.warn("认证已过期,清除认证状态"), a());
23
+ }
24
+ function d() {
25
+ t.value = null, o.value = !0;
26
+ }
27
+ function A() {
28
+ return {
29
+ userProfile: t,
30
+ loading: u,
31
+ usersProfileReady: o,
32
+ isLoggedIn: v,
33
+ fetchUserProfile: p,
34
+ clearUserProfile: d
35
+ };
36
+ }
37
+ export {
38
+ A as u
39
+ };
@@ -0,0 +1,61 @@
1
+ import { g as s } from "./apiClients-Ctcq8NZs.js";
2
+ import { ref as c } from "vue";
3
+ const v = {
4
+ async productOptions() {
5
+ const {
6
+ data: i,
7
+ error: n
8
+ } = await s().billing.products.options.post();
9
+ return {
10
+ data: i,
11
+ error: n
12
+ };
13
+ }
14
+ };
15
+ function p(i, n, t, a) {
16
+ var e;
17
+ const u = ((e = n == null ? void 0 : n.toLowerCase) == null ? void 0 : e.call(n)) ?? n, o = i.find((r) => r.key === n || r.key === u);
18
+ return o != null && o[t] ? o[t] : a;
19
+ }
20
+ function l(i) {
21
+ const n = c(!1), t = c([]);
22
+ async function a() {
23
+ if (t.value.length > 0)
24
+ return t.value;
25
+ n.value = !0;
26
+ const {
27
+ data: e,
28
+ error: r
29
+ } = await i();
30
+ return n.value = !1, r ? (t.value = [], t.value) : e != null && e.length ? (t.value = e, t.value) : (t.value = [], t.value);
31
+ }
32
+ function u(e) {
33
+ return p(t.value, e, "label", e);
34
+ }
35
+ function o(e) {
36
+ return p(t.value, e, "color", "gray");
37
+ }
38
+ return {
39
+ statusOptionsLoading: n,
40
+ statusOptionsList: t,
41
+ statusOptionsApi: a,
42
+ getStatusLabel: u,
43
+ getStatusColor: o
44
+ };
45
+ }
46
+ function O() {
47
+ return l(async () => s().billing.pointsRecharge.statusOptions.post({}));
48
+ }
49
+ function y() {
50
+ return l(async () => s().billing.refund.statusOptions.post({}));
51
+ }
52
+ function b() {
53
+ return l(async () => s().billing.invoices.statusOptions.post({}));
54
+ }
55
+ export {
56
+ O as a,
57
+ y as b,
58
+ l as c,
59
+ v as d,
60
+ b as u
61
+ };
@@ -1,6 +1,6 @@
1
1
  import { computed as f } from "vue";
2
- import { u as r } from "./useAuthkitAuth-3m0yW6uP.js";
3
- import { u as d } from "./apiClients-BcXOLuYu.js";
2
+ import { u as r } from "./useAuthkitAuth-BPTZUSkM.js";
3
+ import { u as d } from "./apiClients-Ctcq8NZs.js";
4
4
  const A = "jwtToken";
5
5
  let e = null, i = !1;
6
6
  async function h(n) {
@@ -1,6 +1,6 @@
1
1
  import { computed as f } from "vue";
2
- import { u as m } from "./useAuthkitAppsAuthPageInfo-CNudJd04.js";
3
- import { g as L } from "./apiClients-BcXOLuYu.js";
2
+ import { u as d } from "./useAuthkitAppsAuthPageInfo-DZ1p-P3Q.js";
3
+ import { g as L } from "./runtime-BzCSCUNv.js";
4
4
  const c = {
5
5
  userServiceAgreement: "用户服务协议",
6
6
  privacyPolicy: "隐私协议",
@@ -18,26 +18,26 @@ function D(e) {
18
18
  var u, a, o;
19
19
  if ((u = e == null ? void 0 : e.appId) != null && u.trim())
20
20
  return e.appId.trim();
21
- const r = (o = (a = e == null ? void 0 : e.route) == null ? void 0 : a.query) == null ? void 0 : o.appId;
22
- return typeof r == "string" && r.trim() ? r.trim() : L.appId;
21
+ const n = (o = (a = e == null ? void 0 : e.route) == null ? void 0 : a.query) == null ? void 0 : o.appId;
22
+ return typeof n == "string" && n.trim() ? n.trim() : L().config.appId;
23
23
  }
24
- function I(e, r) {
24
+ function I(e, n) {
25
25
  const u = typeof window < "u" ? `${window.location.origin}/AboutUsDetails` : "/AboutUsDetails", a = new URLSearchParams({
26
26
  type: e,
27
- appId: r
27
+ appId: n
28
28
  });
29
29
  return `${u}?${a.toString()}`;
30
30
  }
31
- function v(e) {
31
+ function y(e) {
32
32
  if (!(e != null && e.content) || !Array.isArray(e.content) || e.content.length === 0)
33
33
  return !1;
34
- const r = e.content[0];
35
- return !(e.content.length === 1 && typeof r == "object" && r !== null && "type" in r && r.type === "paragraph" && !("content" in r && Array.isArray(r.content) && r.content.length));
34
+ const n = e.content[0];
35
+ return !(e.content.length === 1 && typeof n == "object" && n !== null && "type" in n && n.type === "paragraph" && !("content" in n && Array.isArray(n.content) && n.content.length));
36
36
  }
37
- function y(e, r, u) {
37
+ function v(e, n, u) {
38
38
  var o;
39
- const a = (o = r.aboutUs) == null ? void 0 : o[e];
40
- if (v(a))
39
+ const a = (o = n.aboutUs) == null ? void 0 : o[e];
40
+ if (y(a))
41
41
  return {
42
42
  key: e,
43
43
  label: c[e],
@@ -53,8 +53,8 @@ function w(e) {
53
53
  }
54
54
  function C(e) {
55
55
  const {
56
- appsData: r
57
- } = m();
56
+ appsData: n
57
+ } = d();
58
58
  function u() {
59
59
  return D({
60
60
  route: e == null ? void 0 : e.route,
@@ -62,14 +62,14 @@ function C(e) {
62
62
  });
63
63
  }
64
64
  function a(t) {
65
- var n;
66
- return y(t, {
67
- aboutUs: (n = r.value) == null ? void 0 : n.aboutUs
65
+ var r;
66
+ return v(t, {
67
+ aboutUs: (r = n.value) == null ? void 0 : r.aboutUs
68
68
  }, u());
69
69
  }
70
70
  function o(t) {
71
- const n = a(t);
72
- return n ? w(n) : {
71
+ const r = a(t);
72
+ return r ? w(r) : {
73
73
  key: t,
74
74
  label: c[t],
75
75
  url: "",
@@ -80,12 +80,12 @@ function C(e) {
80
80
  }
81
81
  const i = f(() => b.map(o)), s = f(() => i.value.filter((t) => t.configured));
82
82
  function g(t) {
83
- const n = i.value.find((d) => d.key === t);
84
- return n != null && n.configured ? n : void 0;
83
+ const r = i.value.find((m) => m.key === t);
84
+ return r != null && r.configured ? r : void 0;
85
85
  }
86
86
  function p(t) {
87
- const n = a(t);
88
- n && l(n);
87
+ const r = a(t);
88
+ r && l(r);
89
89
  }
90
90
  return {
91
91
  all: i,
@@ -98,8 +98,8 @@ export {
98
98
  c as L,
99
99
  b as a,
100
100
  I as b,
101
- y as c,
102
- v as i,
101
+ v as c,
102
+ y as i,
103
103
  l as o,
104
104
  D as r,
105
105
  C as u