@lark-apaas/client-toolkit-lite 0.0.1

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/index.cjs ADDED
@@ -0,0 +1,1456 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
9
+ var __export = (target, all) => {
10
+ for (var name in all)
11
+ __defProp(target, name, { get: all[name], enumerable: true });
12
+ };
13
+ var __copyProps = (to, from, except, desc) => {
14
+ if (from && typeof from === "object" || typeof from === "function") {
15
+ for (let key of __getOwnPropNames(from))
16
+ if (!__hasOwnProp.call(to, key) && key !== except)
17
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
18
+ }
19
+ return to;
20
+ };
21
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
22
+ // If the importer is in node compatibility mode or this is not an ESM
23
+ // file that has been converted to a CommonJS file using a Babel-
24
+ // compatible transform (i.e. "__esModule" has not been set), then set
25
+ // "default" to the CommonJS "module.exports" for node compatibility.
26
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
27
+ mod
28
+ ));
29
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
30
+
31
+ // src/index.ts
32
+ var index_exports = {};
33
+ __export(index_exports, {
34
+ ActiveLink: () => ActiveLink,
35
+ AppContainer: () => AppContainer_default,
36
+ NavLink: () => NavLink2,
37
+ QueryProvider: () => QueryProvider_default,
38
+ UniversalLink: () => UniversalLink,
39
+ avatarImages: () => avatar_exports,
40
+ axiosForBackend: () => axiosForBackend,
41
+ bannerImages: () => banner_exports,
42
+ clsxWithTw: () => clsxWithTw,
43
+ copyToClipboard: () => copyToClipboard,
44
+ coverImages: () => cover_exports,
45
+ getAppId: () => getAppId,
46
+ getAppInfo: () => getAppInfo,
47
+ getAxiosForBackend: () => getAxiosForBackend,
48
+ getCsrfToken: () => getCsrfToken,
49
+ getCurrentUserProfile: () => getCurrentUserProfile,
50
+ getDataloom: () => getDataloom,
51
+ getEnvPath: () => getEnvPath,
52
+ getWsPath: () => getWsPath,
53
+ initAxiosConfig: () => initAxiosConfig,
54
+ isIOS: () => isIOS,
55
+ isIpad: () => isIpad,
56
+ isMobile: () => isMobile,
57
+ isPreview: () => isPreview,
58
+ normalizeBasePath: () => normalizeBasePath,
59
+ resolveAppUrl: () => resolveAppUrl,
60
+ safeStringify: () => safeStringify,
61
+ scopedStorage: () => scopedStorage,
62
+ useAppInfo: () => useAppInfo,
63
+ useCurrentUserProfile: () => useCurrentUserProfile,
64
+ useIsMobile: () => useIsMobile,
65
+ useLogout: () => useLogout
66
+ });
67
+ module.exports = __toCommonJS(index_exports);
68
+
69
+ // src/components/AppContainer/index.tsx
70
+ var import_react7 = __toESM(require("react"), 1);
71
+
72
+ // src/runtime/react-devtools-hook.ts
73
+ if (typeof window !== "undefined" && process.env.NODE_ENV !== "production") {
74
+ if (!window.__REACT_DEVTOOLS_GLOBAL_HOOK__) {
75
+ window.__REACT_DEVTOOLS_GLOBAL_HOOK__ = {
76
+ renderers: /* @__PURE__ */ new Map(),
77
+ supportsFiber: true,
78
+ inject(renderer) {
79
+ const id = this.renderers.size + 1;
80
+ this.renderers.set(id, renderer);
81
+ return id;
82
+ },
83
+ onCommitFiberRoot() {
84
+ },
85
+ onCommitFiberUnmount() {
86
+ }
87
+ };
88
+ } else {
89
+ const hook = window.__REACT_DEVTOOLS_GLOBAL_HOOK__;
90
+ if (!(hook.renderers instanceof Map)) {
91
+ hook.renderers = /* @__PURE__ */ new Map();
92
+ }
93
+ const originalInject = typeof hook.inject === "function" ? hook.inject.bind(hook) : null;
94
+ hook.inject = function(renderer) {
95
+ const id = originalInject ? originalInject(renderer) : hook.renderers.size + 1;
96
+ if (id != null && !hook.renderers.has(id)) {
97
+ hook.renderers.set(id, renderer);
98
+ }
99
+ return id;
100
+ };
101
+ }
102
+ }
103
+
104
+ // src/utils/axiosConfig.ts
105
+ var import_axios = __toESM(require("axios"), 1);
106
+
107
+ // src/utils/getCsrfToken.ts
108
+ function getCsrfToken() {
109
+ const cookieName = "suda-csrf-token";
110
+ const cookies = document.cookie.split("; ");
111
+ for (const cookie of cookies) {
112
+ const [name, value] = cookie.split("=");
113
+ if (name === cookieName) {
114
+ return decodeURIComponent(value);
115
+ }
116
+ }
117
+ return window.csrfToken ?? null;
118
+ }
119
+ __name(getCsrfToken, "getCsrfToken");
120
+
121
+ // src/utils/axiosConfig.ts
122
+ function initAxiosConfig(axiosInstance2) {
123
+ if (!axiosInstance2) {
124
+ axiosInstance2 = import_axios.default;
125
+ }
126
+ axiosInstance2.interceptors.request.use((config) => {
127
+ const csrfToken = getCsrfToken();
128
+ if (csrfToken) {
129
+ config.headers["X-Suda-Csrf-Token"] = csrfToken;
130
+ }
131
+ if (typeof window !== "undefined") {
132
+ config.headers["X-Page-Route"] = window.location.pathname;
133
+ }
134
+ return config;
135
+ }, (error) => Promise.reject(error));
136
+ axiosInstance2.interceptors.response.use((response) => response, (error) => {
137
+ if (process.env.NODE_ENV !== "production") {
138
+ console.warn("[axios]", error.config?.method?.toUpperCase(), error.config?.url, error.message);
139
+ }
140
+ return Promise.reject(error);
141
+ });
142
+ }
143
+ __name(initAxiosConfig, "initAxiosConfig");
144
+
145
+ // src/runtime/index.ts
146
+ if (!window.__FULLSTACK_RUNTIME_INITIALIZED__) {
147
+ window.__FULLSTACK_RUNTIME_INITIALIZED__ = true;
148
+ initAxiosConfig();
149
+ }
150
+
151
+ // src/components/AppContainer/safety.tsx
152
+ var import_react5 = __toESM(require("react"), 1);
153
+
154
+ // src/components/ui/popover.tsx
155
+ var React = __toESM(require("react"), 1);
156
+ var PopoverPrimitive = __toESM(require("@radix-ui/react-popover"), 1);
157
+
158
+ // src/utils/utils.ts
159
+ var import_clsx = require("clsx");
160
+ var import_tailwind_merge = require("tailwind-merge");
161
+ function clsxWithTw(...inputs) {
162
+ return (0, import_tailwind_merge.twMerge)((0, import_clsx.clsx)(inputs));
163
+ }
164
+ __name(clsxWithTw, "clsxWithTw");
165
+ function isPreview() {
166
+ return window.IS_MIAODA_PREVIEW;
167
+ }
168
+ __name(isPreview, "isPreview");
169
+ function normalizeBasePath(basePath) {
170
+ if (!basePath || basePath === "/") {
171
+ return "";
172
+ }
173
+ return basePath.replace(/\/+$/, "");
174
+ }
175
+ __name(normalizeBasePath, "normalizeBasePath");
176
+ function getWsPath() {
177
+ const rawBasePath = process.env.CLIENT_BASE_PATH || "/";
178
+ const normalizedBasePath = rawBasePath.startsWith("/") ? rawBasePath : `/${rawBasePath}`;
179
+ const basePathWithoutTrailingSlash = normalizedBasePath.endsWith("/") ? normalizedBasePath.slice(0, -1) : normalizedBasePath;
180
+ return `${basePathWithoutTrailingSlash}/ws`;
181
+ }
182
+ __name(getWsPath, "getWsPath");
183
+ function isSparkRuntime() {
184
+ return window._IS_Spark_RUNTIME ?? process.env.runtimeMode === "fullstack";
185
+ }
186
+ __name(isSparkRuntime, "isSparkRuntime");
187
+
188
+ // src/components/ui/popover.tsx
189
+ function Popover({ ...props }) {
190
+ return /* @__PURE__ */ React.createElement(PopoverPrimitive.Root, {
191
+ "data-slot": "popover",
192
+ ...props
193
+ });
194
+ }
195
+ __name(Popover, "Popover");
196
+ function PopoverTrigger({ ...props }) {
197
+ return /* @__PURE__ */ React.createElement(PopoverPrimitive.Trigger, {
198
+ "data-slot": "popover-trigger",
199
+ ...props
200
+ });
201
+ }
202
+ __name(PopoverTrigger, "PopoverTrigger");
203
+ function PopoverContent({ className, align = "center", sideOffset = 4, ...props }) {
204
+ return /* @__PURE__ */ React.createElement(PopoverPrimitive.Portal, null, /* @__PURE__ */ React.createElement(PopoverPrimitive.Content, {
205
+ "data-slot": "popover-content",
206
+ align,
207
+ sideOffset,
208
+ className: clsxWithTw("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden", className),
209
+ ...props
210
+ }));
211
+ }
212
+ __name(PopoverContent, "PopoverContent");
213
+
214
+ // src/utils/getAppId.ts
215
+ function getAppId() {
216
+ const windowAppId = window.appId || null;
217
+ return windowAppId;
218
+ }
219
+ __name(getAppId, "getAppId");
220
+
221
+ // src/utils/apiPath.ts
222
+ function isNewPathEnabled() {
223
+ const basePath = process.env.CLIENT_BASE_PATH || "/";
224
+ return /^\/app\/[^/]/.test(basePath);
225
+ }
226
+ __name(isNewPathEnabled, "isNewPathEnabled");
227
+
228
+ // src/hooks/useAppInfo.tsx
229
+ var import_react = require("react");
230
+
231
+ // src/utils/getInitialInfo.ts
232
+ async function getAppPublished() {
233
+ try {
234
+ const headers = {
235
+ "Content-Type": "application/json",
236
+ "X-Kunlun-Token": window.token,
237
+ "x-miaoda-token": window.MIAODA_BUILTIN_TTT,
238
+ "X-Suda-Csrf-Token": getCsrfToken()
239
+ };
240
+ const appId = getAppId();
241
+ const path = isNewPathEnabled() ? `/app/${appId}/__runtime__/api/v1/studio/get_published` : `/spark/b/${appId}/get_published`;
242
+ const url = `${window.location.origin}${path}`;
243
+ const response = await fetch(url, {
244
+ method: "GET",
245
+ headers,
246
+ credentials: "include"
247
+ });
248
+ const res = await response.json();
249
+ if (res.code === 0 || res.status_code === "0") {
250
+ return res.data;
251
+ }
252
+ console.error("Error fetching published app info:", res);
253
+ } catch (error) {
254
+ console.error("Error fetching published app info:", error);
255
+ }
256
+ return void 0;
257
+ }
258
+ __name(getAppPublished, "getAppPublished");
259
+ var initialInfo;
260
+ var pendingPromise = null;
261
+ function getInitialInfo(refresh = false) {
262
+ if (initialInfo && !refresh) {
263
+ return Promise.resolve(initialInfo);
264
+ }
265
+ if (pendingPromise && !refresh) {
266
+ return pendingPromise;
267
+ }
268
+ pendingPromise = getAppPublished().then((info) => {
269
+ initialInfo = info;
270
+ if (initialInfo) {
271
+ window._bucket_id = initialInfo.app_runtime_extra?.bucket?.default_bucket_id;
272
+ }
273
+ return initialInfo;
274
+ }).finally(() => {
275
+ pendingPromise = null;
276
+ });
277
+ return pendingPromise;
278
+ }
279
+ __name(getInitialInfo, "getInitialInfo");
280
+
281
+ // src/integrations/getAppInfo.ts
282
+ async function getAppInfo(refresh = false) {
283
+ let appInfo = typeof window !== "undefined" ? window._appInfo : void 0;
284
+ if ((!appInfo || refresh) && isSparkRuntime()) {
285
+ const info = (await getInitialInfo(refresh))?.app_info;
286
+ appInfo = {
287
+ name: info?.app_name || "",
288
+ avatar: info?.app_avatar || "",
289
+ description: info?.app_description || ""
290
+ };
291
+ if (appInfo.name) {
292
+ appInfo.name = appInfo.name.trim();
293
+ }
294
+ if (typeof window !== "undefined") {
295
+ window._appInfo = appInfo;
296
+ }
297
+ }
298
+ return appInfo ?? {};
299
+ }
300
+ __name(getAppInfo, "getAppInfo");
301
+
302
+ // src/hooks/useAppInfo.tsx
303
+ var useAppInfo = /* @__PURE__ */ __name(() => {
304
+ const [appInfo, setAppInfo] = (0, import_react.useState)({});
305
+ (0, import_react.useEffect)(() => {
306
+ const updateDomInfo = /* @__PURE__ */ __name((info) => {
307
+ if (info.name) {
308
+ document.title = info.name;
309
+ const meta = document.querySelector("meta[property='og:title']");
310
+ if (meta) {
311
+ meta.content = info.name;
312
+ }
313
+ }
314
+ if (info.avatar) {
315
+ let link = document.querySelector("link[rel~='icon']");
316
+ if (!link) {
317
+ link = document.createElement("link");
318
+ link.rel = "icon";
319
+ document.head.appendChild(link);
320
+ }
321
+ link.href = info.avatar;
322
+ const meta = document.querySelector("meta[property='og:image']");
323
+ if (meta) {
324
+ meta.content = info.avatar;
325
+ }
326
+ }
327
+ if (info.description) {
328
+ const meta = document.querySelector("meta[property='og:description']");
329
+ if (meta) {
330
+ meta.content = info.description;
331
+ }
332
+ const metaDom = document.querySelector("meta[name='description']");
333
+ if (metaDom) {
334
+ metaDom.content = info.description;
335
+ }
336
+ }
337
+ }, "updateDomInfo");
338
+ const handleMetaInfoChanged = /* @__PURE__ */ __name(async (info, refresh = true) => {
339
+ if (!info) {
340
+ info = await getAppInfo(refresh);
341
+ }
342
+ updateDomInfo(info);
343
+ setAppInfo((prev) => ({
344
+ ...prev,
345
+ ...info
346
+ }));
347
+ }, "handleMetaInfoChanged");
348
+ handleMetaInfoChanged(void 0, false);
349
+ const onUpdate = /* @__PURE__ */ __name((e) => {
350
+ const info = e.detail;
351
+ handleMetaInfoChanged(info);
352
+ }, "onUpdate");
353
+ window.addEventListener("MiaoDaMetaInfoChanged", onUpdate);
354
+ return () => {
355
+ window.removeEventListener("MiaoDaMetaInfoChanged", onUpdate);
356
+ };
357
+ }, []);
358
+ return {
359
+ ...appInfo,
360
+ appName: appInfo.name,
361
+ appLogo: appInfo.avatar
362
+ };
363
+ }, "useAppInfo");
364
+
365
+ // src/hooks/useCurrentUserProfile.tsx
366
+ var import_react2 = require("react");
367
+
368
+ // src/integrations/getCurrentUserProfile.ts
369
+ function getCurrentUserProfile() {
370
+ return window._userInfo || {};
371
+ }
372
+ __name(getCurrentUserProfile, "getCurrentUserProfile");
373
+
374
+ // src/utils/url.ts
375
+ function splitWorkspaceUrl(fullUrl) {
376
+ try {
377
+ const url = new URL(fullUrl);
378
+ const pathParts = url.pathname.split("/");
379
+ const workspacesIndex = pathParts.findIndex((part) => part === "workspaces");
380
+ if (workspacesIndex === -1) {
381
+ throw new Error("Invalid workspace URL format");
382
+ }
383
+ const basePathParts = pathParts.slice(0, workspacesIndex);
384
+ const workspace = pathParts[workspacesIndex + 1];
385
+ return {
386
+ baseUrl: `${url.origin}${basePathParts.join("/")}`,
387
+ workspace
388
+ };
389
+ } catch (error) {
390
+ console.error("Error splitting workspace URL:", error);
391
+ }
392
+ return {
393
+ baseUrl: fullUrl,
394
+ // 兜底给一个,不要给空字符串,不然 createClient 都直接挂了,页面会白屏,体感不太好
395
+ workspace: "workspace"
396
+ };
397
+ }
398
+ __name(splitWorkspaceUrl, "splitWorkspaceUrl");
399
+
400
+ // src/integrations/dataloom.ts
401
+ var import_js = require("@data-loom/js");
402
+ var createDataLoomClient = /* @__PURE__ */ __name((url, pat) => {
403
+ const { baseUrl, workspace } = url ? splitWorkspaceUrl(url) : {
404
+ baseUrl: "",
405
+ workspace: ""
406
+ };
407
+ const appId = getAppId() ?? "";
408
+ return (0, import_js.createClient)(baseUrl, pat ?? "", workspace, {
409
+ global: {
410
+ enableDataloomLog: process.env.NODE_ENV !== "production",
411
+ requestRateLimit: process.env.NODE_ENV !== "production" ? 100 : void 0,
412
+ brandName: "miaoda",
413
+ appId,
414
+ onError: /* @__PURE__ */ __name((error, dataloomInstance) => {
415
+ if (error?.status === 401) {
416
+ if (error?.code === "k_ident_013001") {
417
+ dataloomInstance.service.session.redirectToLogin();
418
+ }
419
+ }
420
+ }, "onError")
421
+ }
422
+ });
423
+ }, "createDataLoomClient");
424
+ var dataloom = null;
425
+ var pendingPromise2 = null;
426
+ function getDataloom() {
427
+ if (dataloom) {
428
+ return Promise.resolve(dataloom);
429
+ }
430
+ if (pendingPromise2) {
431
+ return pendingPromise2;
432
+ }
433
+ pendingPromise2 = getInitialInfo().then((info) => {
434
+ const DATALOOM_CLIENT_URL = info?.app_runtime_extra?.url;
435
+ const DATALOOM_PAT = info?.app_runtime_extra?.token;
436
+ dataloom = createDataLoomClient(DATALOOM_CLIENT_URL, DATALOOM_PAT);
437
+ return dataloom;
438
+ }).finally(() => {
439
+ pendingPromise2 = null;
440
+ });
441
+ return pendingPromise2;
442
+ }
443
+ __name(getDataloom, "getDataloom");
444
+
445
+ // src/hooks/useCurrentUserProfile.tsx
446
+ function getNameFromArray(nameArray) {
447
+ if (!nameArray || nameArray.length === 0) {
448
+ return void 0;
449
+ }
450
+ const chineseName = nameArray.find((item) => item.language_code === 2052);
451
+ return chineseName?.text ?? nameArray[0]?.text;
452
+ }
453
+ __name(getNameFromArray, "getNameFromArray");
454
+ function getCompatibilityUserProfile() {
455
+ const userInfo = getCurrentUserProfile();
456
+ return {
457
+ ...userInfo,
458
+ // 兼容处理
459
+ userName: userInfo.name,
460
+ userAvatar: userInfo.avatar
461
+ };
462
+ }
463
+ __name(getCompatibilityUserProfile, "getCompatibilityUserProfile");
464
+ var useCurrentUserProfile = /* @__PURE__ */ __name(() => {
465
+ const [userInfo, setUserInfo] = (0, import_react2.useState)(() => getCompatibilityUserProfile());
466
+ (0, import_react2.useEffect)(() => {
467
+ let cancelled = false;
468
+ const fetchAndSetUserInfo = /* @__PURE__ */ __name(async () => {
469
+ const dataloom2 = await getDataloom();
470
+ const result = await dataloom2?.service?.session?.getUserInfo();
471
+ if (cancelled) return;
472
+ const info = result?.data?.user_info;
473
+ const userName = getNameFromArray(info?.name);
474
+ const newUserInfo = {
475
+ user_id: info?.user_id?.toString() ?? "",
476
+ email: info?.email ?? "",
477
+ name: userName ?? "",
478
+ avatar: info?.avatar?.image?.large ?? "",
479
+ userName: userName ?? "",
480
+ userAvatar: info?.avatar?.image?.large ?? ""
481
+ };
482
+ if (process.env.NODE_ENV === "development") {
483
+ console.log("MiaoDaMetaInfoChanged", newUserInfo);
484
+ }
485
+ setUserInfo(newUserInfo);
486
+ }, "fetchAndSetUserInfo");
487
+ let handleMetaInfoChanged;
488
+ if (isSparkRuntime()) {
489
+ fetchAndSetUserInfo();
490
+ handleMetaInfoChanged = /* @__PURE__ */ __name(() => {
491
+ fetchAndSetUserInfo();
492
+ }, "handleMetaInfoChanged");
493
+ } else {
494
+ handleMetaInfoChanged = /* @__PURE__ */ __name(() => {
495
+ if (process.env.NODE_ENV === "development") {
496
+ console.log("MiaoDaMetaInfoChanged", getCompatibilityUserProfile());
497
+ }
498
+ setUserInfo(getCompatibilityUserProfile());
499
+ }, "handleMetaInfoChanged");
500
+ }
501
+ window.addEventListener("MiaoDaMetaInfoChanged", handleMetaInfoChanged);
502
+ return () => {
503
+ cancelled = true;
504
+ window.removeEventListener("MiaoDaMetaInfoChanged", handleMetaInfoChanged);
505
+ };
506
+ }, []);
507
+ return userInfo;
508
+ }, "useCurrentUserProfile");
509
+
510
+ // src/hooks/useIsMobile.ts
511
+ var import_react3 = __toESM(require("react"), 1);
512
+ var import_lodash = require("lodash");
513
+ var MOBILE_BREAKPOINT = 768;
514
+ function useIsMobile() {
515
+ const [isMobile2, setIsMobile] = import_react3.default.useState(window.innerWidth < MOBILE_BREAKPOINT);
516
+ import_react3.default.useEffect(() => {
517
+ const handleResize = /* @__PURE__ */ __name(() => {
518
+ setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
519
+ }, "handleResize");
520
+ const debouncedHandleResize = (0, import_lodash.debounce)(handleResize, 200);
521
+ window.addEventListener("resize", debouncedHandleResize);
522
+ handleResize();
523
+ return () => {
524
+ window.removeEventListener("resize", debouncedHandleResize);
525
+ debouncedHandleResize.cancel();
526
+ };
527
+ }, []);
528
+ return isMobile2;
529
+ }
530
+ __name(useIsMobile, "useIsMobile");
531
+
532
+ // src/hooks/useLogout.ts
533
+ var import_react4 = require("react");
534
+ function useLogout() {
535
+ const [isLoading, setIsLoading] = (0, import_react4.useState)(false);
536
+ async function handlerLogout() {
537
+ if (process.env.NODE_ENV !== "production") {
538
+ console.log("\u53EA\u6709\u751F\u4EA7\u73AF\u5883\u624D\u6267\u884C\u767B\u51FA");
539
+ return;
540
+ }
541
+ setIsLoading(true);
542
+ try {
543
+ const dataloom2 = await getDataloom();
544
+ await dataloom2.service.session.signOut();
545
+ } catch (error) {
546
+ console.error("\u767B\u51FA\u5931\u8D25", error);
547
+ } finally {
548
+ setIsLoading(false);
549
+ }
550
+ }
551
+ __name(handlerLogout, "handlerLogout");
552
+ return {
553
+ handlerLogout,
554
+ isLoading
555
+ };
556
+ }
557
+ __name(useLogout, "useLogout");
558
+
559
+ // src/components/AppContainer/safety.tsx
560
+ var import_lucide_react = require("lucide-react");
561
+
562
+ // src/components/ui/drawer.tsx
563
+ var React3 = __toESM(require("react"), 1);
564
+ var SheetPrimitive = __toESM(require("@radix-ui/react-dialog"), 1);
565
+ function Sheet({ ...props }) {
566
+ return /* @__PURE__ */ React3.createElement(SheetPrimitive.Root, {
567
+ "data-slot": "sheet",
568
+ ...props
569
+ });
570
+ }
571
+ __name(Sheet, "Sheet");
572
+ function SheetTrigger({ ...props }) {
573
+ return /* @__PURE__ */ React3.createElement(SheetPrimitive.Trigger, {
574
+ "data-slot": "sheet-trigger",
575
+ ...props
576
+ });
577
+ }
578
+ __name(SheetTrigger, "SheetTrigger");
579
+ function SheetPortal({ ...props }) {
580
+ return /* @__PURE__ */ React3.createElement(SheetPrimitive.Portal, {
581
+ "data-slot": "sheet-portal",
582
+ ...props
583
+ });
584
+ }
585
+ __name(SheetPortal, "SheetPortal");
586
+ function SheetOverlay({ className, ...props }) {
587
+ return /* @__PURE__ */ React3.createElement(SheetPrimitive.Overlay, {
588
+ "data-slot": "sheet-overlay",
589
+ className: clsxWithTw("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50", className),
590
+ ...props
591
+ });
592
+ }
593
+ __name(SheetOverlay, "SheetOverlay");
594
+ function SheetContent({ className, children, side = "right", ...props }) {
595
+ return /* @__PURE__ */ React3.createElement(SheetPortal, null, /* @__PURE__ */ React3.createElement(SheetOverlay, null), /* @__PURE__ */ React3.createElement(SheetPrimitive.Content, {
596
+ "data-slot": "sheet-content",
597
+ className: clsxWithTw("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500", side === "right" && "data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm", side === "left" && "data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm", side === "top" && "data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b", side === "bottom" && "data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t", className),
598
+ ...props
599
+ }, children));
600
+ }
601
+ __name(SheetContent, "SheetContent");
602
+
603
+ // src/components/AppContainer/safety.tsx
604
+ var Component = /* @__PURE__ */ __name(() => {
605
+ const HasClosedKey = `miaoda-creatByMiaoda-has-closed-${getAppId()}`;
606
+ const [visible, setVisible] = (0, import_react5.useState)(!window.localStorage?.getItem(HasClosedKey));
607
+ const [open, setOpen] = (0, import_react5.useState)(false);
608
+ const isMobile2 = useIsMobile();
609
+ const [userinfo, setUserinfo] = (0, import_react5.useState)(null);
610
+ const [isInternetVisible, setIsInternetVisible] = (0, import_react5.useState)(false);
611
+ const [showBadge, setShowBadge] = (0, import_react5.useState)(true);
612
+ const [badgeLoaded, setBadgeLoaded] = (0, import_react5.useState)(false);
613
+ const timeoutRef = (0, import_react5.useRef)(null);
614
+ (0, import_react5.useEffect)(() => {
615
+ const appId = getAppId();
616
+ const csrfHeaders = {
617
+ "X-Suda-Csrf-Token": getCsrfToken()
618
+ };
619
+ const tenantInfoUrl = isNewPathEnabled() ? `/app/${appId}/__runtime__/api/v1/studio/tenant_info` : `/spark/b/${appId}/tenant_info`;
620
+ fetch(tenantInfoUrl, {
621
+ headers: csrfHeaders
622
+ }).then((res) => res.json()).then((data) => {
623
+ setUserinfo(data?.data?.tenant_info);
624
+ setIsInternetVisible(data?.data?.is_internet_visible);
625
+ }).catch(() => {
626
+ });
627
+ const getPublishedUrl = isNewPathEnabled() ? `/app/${appId}/__runtime__/api/v1/studio/get_published` : `/spark/b/${appId}/get_published`;
628
+ fetch(getPublishedUrl, {
629
+ headers: csrfHeaders
630
+ }).then((res) => res.json()).then((data) => {
631
+ const badge = data?.data?.app_info?.show_badge;
632
+ setShowBadge(badge !== false);
633
+ }).catch(() => {
634
+ setShowBadge(true);
635
+ }).finally(() => {
636
+ setBadgeLoaded(true);
637
+ });
638
+ }, []);
639
+ (0, import_react5.useEffect)(() => {
640
+ if (isMobile2) {
641
+ const link = document.createElement("link");
642
+ link.rel = "preload";
643
+ link.as = "image";
644
+ link.href = "https://lf3-static.bytednsdoc.com/obj/eden-cn/LMfspH/ljhwZthlaukjlkulzlp/logo/miaodacover-mobile.png";
645
+ document.head.appendChild(link);
646
+ }
647
+ }, [
648
+ isMobile2
649
+ ]);
650
+ if (process.env.NODE_ENV !== "production") {
651
+ return null;
652
+ }
653
+ if (!badgeLoaded) {
654
+ return null;
655
+ }
656
+ if (!showBadge) {
657
+ return null;
658
+ }
659
+ if (!visible) {
660
+ return null;
661
+ }
662
+ if (isMobile2) {
663
+ return /* @__PURE__ */ import_react5.default.createElement(Sheet, {
664
+ open,
665
+ onOpenChange: setOpen
666
+ }, /* @__PURE__ */ import_react5.default.createElement(SheetTrigger, {
667
+ asChild: true
668
+ }, /* @__PURE__ */ import_react5.default.createElement("div", {
669
+ className: "fixed right-[12px] bottom-[80px] inline-flex items-center gap-x-1 border-solid border-[#ffffff1a] border px-[10px] py-[6px] bg-[#1f2329e5] backdrop-blur-[5px] shadow-[0px_6px_12px_0px_#41444a0a,0px_8px_24px_8px_#41444a0a] rounded-[6px] text-[#ebebeb)] font-['PingFang_SC'] text-xs leading-[20px] tracking-[0px] z-[10000000]",
670
+ onClick: /* @__PURE__ */ __name(() => {
671
+ setOpen(true);
672
+ }, "onClick")
673
+ }, /* @__PURE__ */ import_react5.default.createElement("img", {
674
+ src: "https://lf3-static.bytednsdoc.com/obj/eden-cn/LMfspH/ljhwZthlaukjlkulzlp/logo/miaodalogo.svg",
675
+ className: "shrink-0 w-[16px] h-[16px]"
676
+ }), /* @__PURE__ */ import_react5.default.createElement("p", {
677
+ className: "shrink-0 min-w-[28px] m-0! text-[#EBEBEB]"
678
+ }, "\u5999\u642D"))), /* @__PURE__ */ import_react5.default.createElement(SheetContent, {
679
+ side: "bottom",
680
+ className: "z-[10000001] border-none bg-transparent outline-0!"
681
+ }, /* @__PURE__ */ import_react5.default.createElement("div", {
682
+ className: "flex flex-col bg-white overflow-hidden rounded-t-[16px] relative"
683
+ }, /* @__PURE__ */ import_react5.default.createElement(import_lucide_react.X, {
684
+ className: "absolute top-[8px] left-[16px] size-[24px] text-[#2B2F36]",
685
+ onClick: /* @__PURE__ */ __name(() => setOpen(false), "onClick")
686
+ }), /* @__PURE__ */ import_react5.default.createElement("img", {
687
+ src: "https://lf3-static.bytednsdoc.com/obj/eden-cn/LMfspH/ljhwZthlaukjlkulzlp/logo/miaodacover-mobile.png",
688
+ alt: "",
689
+ className: "w-full h-full",
690
+ onClick: /* @__PURE__ */ __name(() => {
691
+ window.open("https://miaoda.feishu.cn/landing", "_blank");
692
+ }, "onClick")
693
+ }), /* @__PURE__ */ import_react5.default.createElement("div", {
694
+ className: "flex flex-col w-full justify-center items-end gap-y-[16px] border-solid border-[#ffffff0d] border px-[20px] pt-[16px] pb-[48px] shadow-(--shadow-2xs,0px_2px_8px_2px_var(--shadow-2xs-1-color,#1f232905),0px_2px_8px_2px_var(--shadow-2xs-1-color,#1f232905),0px_2px_4px_0px_var(--shadow-2xs-1-color,#1f232905)) rounded-t-[12px] text-[#a6a6a6] font-['PingFang_SC'] text-[12px] leading-[20px] tracking-[0px]"
695
+ }, /* @__PURE__ */ import_react5.default.createElement("div", {
696
+ className: "self-stretch shrink-0 flex flex-col items-start gap-y-[4px]"
697
+ }, isInternetVisible && /* @__PURE__ */ import_react5.default.createElement("div", {
698
+ className: "self-stretch shrink-0 flex items-center gap-x-[6px]"
699
+ }, /* @__PURE__ */ import_react5.default.createElement("img", {
700
+ src: "https://lf3-static.bytednsdoc.com/obj/eden-cn/LMfspH/ljhwZthlaukjlkulzlp/icon/icon_company_outlined.svg",
701
+ className: "shrink-0 w-[14px] h-[14px]"
702
+ }), /* @__PURE__ */ import_react5.default.createElement("p", {
703
+ className: "shrink-0 min-w-[96px] m-0! text-[#646A73] text-sm"
704
+ }, userinfo?.name, "\u8FD0\u8425")), /* @__PURE__ */ import_react5.default.createElement("div", {
705
+ className: "self-stretch shrink-0 flex items-center gap-x-[6px]"
706
+ }, /* @__PURE__ */ import_react5.default.createElement("img", {
707
+ src: "https://lf3-static.bytednsdoc.com/obj/eden-cn/LMfspH/ljhwZthlaukjlkulzlp/icon/icon_efficiency-ai_outlined.svg",
708
+ className: "shrink-0 w-[14px] h-[14px]"
709
+ }), /* @__PURE__ */ import_react5.default.createElement("p", {
710
+ className: "shrink-0 min-w-[163px] m-0! text-[#646A73] text-sm"
711
+ }, "\u5305\u542B AI \u751F\u6210\u5185\u5BB9\uFF0C\u8BF7\u6CE8\u610F\u7504\u522B"))), /* @__PURE__ */ import_react5.default.createElement("div", {
712
+ className: "self-stretch shrink-0 flex items-start gap-x-[16px]"
713
+ }, /* @__PURE__ */ import_react5.default.createElement("div", {
714
+ className: "flex-1 flex rounded-[99px] items-center justify-center border-[0.5px] border-[#D0D3D6] bg-white text-[#1F2329] cursor-pointer text-lg py-[12px]",
715
+ onClick: /* @__PURE__ */ __name((e) => {
716
+ e.stopPropagation();
717
+ e.preventDefault();
718
+ setOpen(false);
719
+ setTimeout(() => setVisible(false), 200);
720
+ window.localStorage?.setItem(HasClosedKey, "true");
721
+ }, "onClick")
722
+ }, "\u4E0D\u518D\u5C55\u793A"), /* @__PURE__ */ import_react5.default.createElement("div", {
723
+ className: "flex-1 flex rounded-[99px] items-center justify-center border-[0.5px] border-black bg-black text-white cursor-pointer text-lg py-[12px]",
724
+ onClick: /* @__PURE__ */ __name(() => {
725
+ window.open("https://miaoda.feishu.cn/landing", "_blank");
726
+ }, "onClick")
727
+ }, "\u4E86\u89E3\u66F4\u591A"))))));
728
+ }
729
+ return /* @__PURE__ */ import_react5.default.createElement(Popover, {
730
+ open,
731
+ onOpenChange: setOpen
732
+ }, /* @__PURE__ */ import_react5.default.createElement(PopoverTrigger, {
733
+ asChild: true
734
+ }, /* @__PURE__ */ import_react5.default.createElement("div", {
735
+ className: "fixed right-[12px] bottom-[12px] inline-flex items-center gap-x-1 border-solid border-[#ffffff1a] border px-[10px] py-[6px] bg-[#1f2329e5] backdrop-blur-[5px] shadow-[0px_6px_12px_0px_#41444a0a,0px_8px_24px_8px_#41444a0a] rounded-[6px] text-[#ebebeb)] font-['PingFang_SC'] text-xs leading-[20px] tracking-[0px] z-[10000000] cursor-pointer",
736
+ onMouseEnter: /* @__PURE__ */ __name(() => {
737
+ clearTimeout(timeoutRef.current);
738
+ setOpen(true);
739
+ }, "onMouseEnter"),
740
+ onMouseLeave: /* @__PURE__ */ __name(() => {
741
+ timeoutRef.current = setTimeout(() => setOpen(false), 100);
742
+ }, "onMouseLeave")
743
+ }, /* @__PURE__ */ import_react5.default.createElement("img", {
744
+ src: "https://lf3-static.bytednsdoc.com/obj/eden-cn/LMfspH/ljhwZthlaukjlkulzlp/logo/miaodalogo.svg",
745
+ className: "shrink-0 w-[16px] h-[16px]"
746
+ }), /* @__PURE__ */ import_react5.default.createElement("p", {
747
+ className: "shrink-0 min-w-[60px] m-0! text-[#EBEBEB]"
748
+ }, "\u7531\u5999\u642D\u642D\u5EFA"))), /* @__PURE__ */ import_react5.default.createElement(PopoverContent, {
749
+ className: "overflow-hidden p-0 m-0 border-0 rounded-[12px]! w-[286px]",
750
+ style: {
751
+ boxShadow: "0 6px 12px 0 #41444a0a, 0 8px 24px 0 #41444a0a"
752
+ },
753
+ side: "top",
754
+ align: "end",
755
+ sideOffset: 8,
756
+ onMouseEnter: /* @__PURE__ */ __name(() => {
757
+ clearTimeout(timeoutRef.current);
758
+ setOpen(true);
759
+ }, "onMouseEnter"),
760
+ onMouseLeave: /* @__PURE__ */ __name(() => {
761
+ timeoutRef.current = setTimeout(() => setOpen(false), 100);
762
+ }, "onMouseLeave")
763
+ }, /* @__PURE__ */ import_react5.default.createElement("div", {
764
+ className: "flex flex-col bg-[#1A1A1A]"
765
+ }, /* @__PURE__ */ import_react5.default.createElement("img", {
766
+ src: "https://lf3-static.bytednsdoc.com/obj/eden-cn/LMfspH/ljhwZthlaukjlkulzlp/logo/miaodacover.png",
767
+ alt: "",
768
+ className: "w-[286px] h-[128px] cursor-pointer",
769
+ onClick: /* @__PURE__ */ __name(() => {
770
+ window.open("https://miaoda.feishu.cn/landing", "_blank");
771
+ }, "onClick")
772
+ }), /* @__PURE__ */ import_react5.default.createElement("div", {
773
+ className: "flex flex-col justify-center items-end gap-y-[12px] border-solid border-[#ffffff0d] border pl-[14px] pr-[15px] pt-[11px] pb-[15px] w-[286px] shadow-(--shadow-2xs,0px_2px_8px_2px_var(--shadow-2xs-1-color,#1f232905),0px_2px_8px_2px_var(--shadow-2xs-1-color,#1f232905),0px_2px_4px_0px_var(--shadow-2xs-1-color,#1f232905)) rounded-t-[12px] text-[#a6a6a6] font-['PingFang_SC'] text-[12px] leading-[20px] tracking-[0px] bg-[#1f2021]"
774
+ }, /* @__PURE__ */ import_react5.default.createElement("div", {
775
+ className: "self-stretch shrink-0 flex flex-col items-start gap-y-[4px]"
776
+ }, isInternetVisible && /* @__PURE__ */ import_react5.default.createElement("div", {
777
+ className: "self-stretch shrink-0 flex items-center gap-x-[6px]"
778
+ }, /* @__PURE__ */ import_react5.default.createElement("img", {
779
+ src: "https://lf3-static.bytednsdoc.com/obj/eden-cn/LMfspH/ljhwZthlaukjlkulzlp/icon/icon_company_outlined.svg",
780
+ className: "shrink-0 w-[12px] h-[12px]"
781
+ }), /* @__PURE__ */ import_react5.default.createElement("p", {
782
+ className: "shrink-0 min-w-[96px] m-0! text-[#a6a6a6]"
783
+ }, userinfo?.name, "\u8FD0\u8425")), /* @__PURE__ */ import_react5.default.createElement("div", {
784
+ className: "self-stretch shrink-0 flex items-center gap-x-[6px]"
785
+ }, /* @__PURE__ */ import_react5.default.createElement("img", {
786
+ src: "https://lf3-static.bytednsdoc.com/obj/eden-cn/LMfspH/ljhwZthlaukjlkulzlp/icon/icon_efficiency-ai_outlined.svg",
787
+ className: "shrink-0 w-[12px] h-[12px]"
788
+ }), /* @__PURE__ */ import_react5.default.createElement("p", {
789
+ className: "shrink-0 min-w-[163px] m-0! text-[#a6a6a6]"
790
+ }, "\u5305\u542B AI \u751F\u6210\u5185\u5BB9\uFF0C\u8BF7\u6CE8\u610F\u7504\u522B"))), /* @__PURE__ */ import_react5.default.createElement("div", {
791
+ className: "w-full self-stretch shrink-0 flex items-start gap-x-[8px]"
792
+ }, /* @__PURE__ */ import_react5.default.createElement("div", {
793
+ className: "flex-1 flex rounded-[8px] items-center justify-center h-[34px] border-[0.5px] border-solid border-[#ffffff1c] hover:border-[#ffffff33] bg-[#ffffff08] hover:bg-[#ffffff14] cursor-pointer text-[#ebebeb]",
794
+ "data-custom-element": "safety-close",
795
+ onClick: /* @__PURE__ */ __name((e) => {
796
+ e.stopPropagation();
797
+ e.preventDefault();
798
+ setVisible(false);
799
+ window.localStorage?.setItem(HasClosedKey, "true");
800
+ }, "onClick")
801
+ }, "\u4E0D\u518D\u5C55\u793A"), /* @__PURE__ */ import_react5.default.createElement("div", {
802
+ className: "flex-1 flex rounded-[8px] items-center justify-center h-[34px] border-[0.5px] border-solid border-[#ffffff1c] hover:border-[#ffffff33] bg-[#ffffff08] hover:bg-[#ffffff14] cursor-pointer text-[#ebebeb]",
803
+ "data-custom-element": "safety-more",
804
+ onClick: /* @__PURE__ */ __name(() => {
805
+ window.open("https://miaoda.feishu.cn/landing", "_blank");
806
+ }, "onClick")
807
+ }, "\u4E86\u89E3\u66F4\u591A"))))));
808
+ }, "Component");
809
+ var safety_default = Component;
810
+
811
+ // src/components/QueryProvider/index.tsx
812
+ var import_react6 = __toESM(require("react"), 1);
813
+ var import_react_query = require("@tanstack/react-query");
814
+ var defaultQueryClient = null;
815
+ var getDefaultQueryClient = /* @__PURE__ */ __name(() => {
816
+ if (!defaultQueryClient) {
817
+ defaultQueryClient = new import_react_query.QueryClient({
818
+ defaultOptions: {
819
+ queries: {
820
+ retry: 1,
821
+ refetchOnWindowFocus: false
822
+ },
823
+ mutations: {
824
+ retry: 1
825
+ }
826
+ }
827
+ });
828
+ }
829
+ return defaultQueryClient;
830
+ }, "getDefaultQueryClient");
831
+ var QueryProvider = /* @__PURE__ */ __name(({ children, client }) => {
832
+ const qc = client ?? getDefaultQueryClient();
833
+ return /* @__PURE__ */ import_react6.default.createElement(import_react_query.QueryClientProvider, {
834
+ client: qc
835
+ }, children);
836
+ }, "QueryProvider");
837
+ var QueryProvider_default = QueryProvider;
838
+
839
+ // src/components/AppContainer/index.tsx
840
+ var AppContainer = /* @__PURE__ */ __name(({ children }) => {
841
+ useAppInfo();
842
+ return /* @__PURE__ */ import_react7.default.createElement(import_react7.default.Fragment, null, /* @__PURE__ */ import_react7.default.createElement(safety_default, null), /* @__PURE__ */ import_react7.default.createElement(QueryProvider_default, null, children));
843
+ }, "AppContainer");
844
+ var AppContainer_default = AppContainer;
845
+
846
+ // src/route-components/ActiveLink.tsx
847
+ var import_react8 = __toESM(require("react"), 1);
848
+ var import_react_router_dom = require("react-router-dom");
849
+ var ActiveLink = /* @__PURE__ */ (0, import_react8.forwardRef)(({ to, onClick, className, style, children, ...rest }, ref) => {
850
+ const [currentHash, setCurrentHash] = (0, import_react8.useState)(() => typeof window !== "undefined" ? window.location.hash : "");
851
+ const isHashRoute = typeof to === "string" && to.startsWith("#");
852
+ (0, import_react8.useEffect)(() => {
853
+ if (!isHashRoute) return;
854
+ const handleHashChange = /* @__PURE__ */ __name(() => {
855
+ setCurrentHash(window.location.hash);
856
+ }, "handleHashChange");
857
+ window.addEventListener("hashchange", handleHashChange);
858
+ return () => window.removeEventListener("hashchange", handleHashChange);
859
+ }, [
860
+ isHashRoute
861
+ ]);
862
+ const isActive = isHashRoute && currentHash === to;
863
+ if (!isHashRoute) {
864
+ return /* @__PURE__ */ import_react8.default.createElement(import_react_router_dom.NavLink, {
865
+ ref,
866
+ to,
867
+ onClick,
868
+ className,
869
+ style,
870
+ ...rest
871
+ }, children);
872
+ }
873
+ const handleHashClick = /* @__PURE__ */ __name((e) => {
874
+ onClick?.(e);
875
+ if (e.defaultPrevented) {
876
+ return;
877
+ }
878
+ e.preventDefault();
879
+ const targetId = to.slice(1);
880
+ const targetElement = document.getElementById(targetId);
881
+ history.pushState(null, "", to);
882
+ setCurrentHash(to);
883
+ window.dispatchEvent(new Event("hashchange"));
884
+ if (targetElement && typeof targetElement.scrollIntoView === "function") {
885
+ targetElement.scrollIntoView({
886
+ behavior: "smooth"
887
+ });
888
+ }
889
+ }, "handleHashClick");
890
+ const computedClassName = typeof className === "function" ? className({
891
+ isActive,
892
+ isPending: false,
893
+ isTransitioning: false
894
+ }) : className;
895
+ const computedStyle = typeof style === "function" ? style({
896
+ isActive,
897
+ isPending: false,
898
+ isTransitioning: false
899
+ }) : style;
900
+ const computedChildren = typeof children === "function" ? children({
901
+ isActive,
902
+ isPending: false,
903
+ isTransitioning: false
904
+ }) : children;
905
+ return /* @__PURE__ */ import_react8.default.createElement("a", {
906
+ ref,
907
+ href: to,
908
+ onClick: handleHashClick,
909
+ className: computedClassName,
910
+ style: computedStyle,
911
+ ...rest
912
+ }, computedChildren);
913
+ });
914
+ ActiveLink.displayName = "ActiveLink";
915
+
916
+ // src/route-components/NavLink.tsx
917
+ var React8 = __toESM(require("react"), 1);
918
+ var import_react_router_dom2 = require("react-router-dom");
919
+ var NavLink2 = /* @__PURE__ */ React8.forwardRef(({ to, children, className, style, ...props }, ref) => {
920
+ const isHashLink = typeof to === "string" && to.startsWith("#");
921
+ const location = (0, import_react_router_dom2.useLocation)();
922
+ const navigate = (0, import_react_router_dom2.useNavigate)();
923
+ if (isHashLink) {
924
+ const handleClick = /* @__PURE__ */ __name((e) => {
925
+ e.preventDefault();
926
+ const element = document.querySelector(to);
927
+ if (element) {
928
+ element.scrollIntoView({
929
+ behavior: "smooth"
930
+ });
931
+ }
932
+ navigate(to);
933
+ }, "handleClick");
934
+ const isActive = location.hash === to;
935
+ const renderProps = {
936
+ isActive,
937
+ isPending: false,
938
+ isTransitioning: false
939
+ };
940
+ const resolvedClassName = typeof className === "function" ? className(renderProps) : className;
941
+ const resolvedStyle = typeof style === "function" ? style(renderProps) : style;
942
+ const { caseSensitive, end, replace, state, preventScrollReset, relative, viewTransition, ...restProps } = props;
943
+ return /* @__PURE__ */ React8.createElement("a", {
944
+ href: to,
945
+ onClick: handleClick,
946
+ ref,
947
+ className: resolvedClassName,
948
+ style: resolvedStyle,
949
+ ...restProps
950
+ }, typeof children === "function" ? children(renderProps) : children);
951
+ }
952
+ return /* @__PURE__ */ React8.createElement(import_react_router_dom2.NavLink, {
953
+ to,
954
+ ref,
955
+ className,
956
+ style,
957
+ onClick: /* @__PURE__ */ __name(() => (document.getElementById("rootContainer") || window)?.scrollTo({
958
+ top: 0,
959
+ behavior: "smooth"
960
+ }), "onClick"),
961
+ ...props
962
+ }, children);
963
+ });
964
+ NavLink2.displayName = "NavLink";
965
+
966
+ // src/route-components/UniversalLink.tsx
967
+ var import_react9 = __toESM(require("react"), 1);
968
+ var import_react_router_dom3 = require("react-router-dom");
969
+ function isInternalRoute(to) {
970
+ return !to.startsWith("#") && !to.startsWith("http://") && !to.startsWith("https://") && !to.startsWith("//");
971
+ }
972
+ __name(isInternalRoute, "isInternalRoute");
973
+ function isExternalLink(to) {
974
+ return to.startsWith("http://") || to.startsWith("https://") || to.startsWith("//");
975
+ }
976
+ __name(isExternalLink, "isExternalLink");
977
+ var UniversalLink = /* @__PURE__ */ import_react9.default.forwardRef(/* @__PURE__ */ __name(function UniversalLink2({ to, ...props }, ref) {
978
+ if (isInternalRoute(to)) {
979
+ return /* @__PURE__ */ import_react9.default.createElement(import_react_router_dom3.Link, {
980
+ to,
981
+ ref,
982
+ ...props
983
+ });
984
+ }
985
+ return /* @__PURE__ */ import_react9.default.createElement("a", {
986
+ href: to,
987
+ ref,
988
+ ...props,
989
+ ...isExternalLink(to) && {
990
+ target: props.target ?? "_blank",
991
+ rel: props.rel ?? "noopener noreferrer"
992
+ }
993
+ });
994
+ }, "UniversalLink"));
995
+
996
+ // src/utils/scopedStorage.ts
997
+ function getPrefix() {
998
+ const appId = getAppId();
999
+ const namespace = appId || "__global__";
1000
+ return `__miaoda_${namespace}__:`;
1001
+ }
1002
+ __name(getPrefix, "getPrefix");
1003
+ function getScopedKeys() {
1004
+ const prefix = getPrefix();
1005
+ const keys = [];
1006
+ for (let i = 0; i < localStorage.length; i++) {
1007
+ const key = localStorage.key(i);
1008
+ if (key && key.startsWith(prefix)) {
1009
+ keys.push(key.substring(prefix.length));
1010
+ }
1011
+ }
1012
+ return keys;
1013
+ }
1014
+ __name(getScopedKeys, "getScopedKeys");
1015
+ var scopedStorage = {
1016
+ /**
1017
+ * 获取指定 key 的值
1018
+ */
1019
+ getItem(key) {
1020
+ const prefixedKey = getPrefix() + key;
1021
+ return localStorage.getItem(prefixedKey);
1022
+ },
1023
+ /**
1024
+ * 设置指定 key 的值
1025
+ */
1026
+ setItem(key, value) {
1027
+ const prefixedKey = getPrefix() + key;
1028
+ localStorage.setItem(prefixedKey, value);
1029
+ },
1030
+ /**
1031
+ * 删除指定 key
1032
+ */
1033
+ removeItem(key) {
1034
+ const prefixedKey = getPrefix() + key;
1035
+ localStorage.removeItem(prefixedKey);
1036
+ },
1037
+ /**
1038
+ * 清空当前 appId 范围内的所有 key
1039
+ * 不影响其他 app 和无前缀的 key
1040
+ */
1041
+ clear() {
1042
+ const prefix = getPrefix();
1043
+ const keysToRemove = [];
1044
+ for (let i = 0; i < localStorage.length; i++) {
1045
+ const key = localStorage.key(i);
1046
+ if (key && key.startsWith(prefix)) {
1047
+ keysToRemove.push(key);
1048
+ }
1049
+ }
1050
+ keysToRemove.forEach((key) => localStorage.removeItem(key));
1051
+ },
1052
+ /**
1053
+ * 返回当前 appId 范围内第 index 个 key(去前缀后的原始 key)
1054
+ */
1055
+ key(index) {
1056
+ const keys = getScopedKeys();
1057
+ return keys[index] || null;
1058
+ },
1059
+ /**
1060
+ * 返回当前 appId 范围内的 key 数量
1061
+ */
1062
+ get length() {
1063
+ return getScopedKeys().length;
1064
+ }
1065
+ };
1066
+
1067
+ // src/utils/copyToClipboard.ts
1068
+ async function copyToClipboard(text) {
1069
+ try {
1070
+ if (navigator.clipboard && window.isSecureContext) {
1071
+ await navigator.clipboard.writeText(text);
1072
+ return true;
1073
+ }
1074
+ return fallbackCopyToClipboard(text);
1075
+ } catch (error) {
1076
+ return fallbackCopyToClipboard(text);
1077
+ }
1078
+ }
1079
+ __name(copyToClipboard, "copyToClipboard");
1080
+ function fallbackCopyToClipboard(text) {
1081
+ try {
1082
+ const textArea = document.createElement("textarea");
1083
+ textArea.value = text;
1084
+ textArea.style.position = "fixed";
1085
+ textArea.style.left = "-999999px";
1086
+ textArea.style.top = "-999999px";
1087
+ textArea.setAttribute("readonly", "");
1088
+ document.body.appendChild(textArea);
1089
+ textArea.focus();
1090
+ textArea.select();
1091
+ const successful = document.execCommand("copy");
1092
+ document.body.removeChild(textArea);
1093
+ return successful;
1094
+ } catch (error) {
1095
+ console.error("\u964D\u7EA7\u590D\u5236\u65B9\u6848\u5931\u8D25:", error);
1096
+ return false;
1097
+ }
1098
+ }
1099
+ __name(fallbackCopyToClipboard, "fallbackCopyToClipboard");
1100
+
1101
+ // src/utils/deviceType.ts
1102
+ var isIpad = /* @__PURE__ */ __name(() => {
1103
+ const _isIpad = /iPad|Tab|Tablet/i.test(navigator.userAgent) && navigator.maxTouchPoints && navigator.maxTouchPoints > 1;
1104
+ return Boolean(_isIpad);
1105
+ }, "isIpad");
1106
+ var isMobile = /* @__PURE__ */ __name(() => {
1107
+ const isPhone = /(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i.test(navigator.userAgent);
1108
+ return isPhone || isIpad();
1109
+ }, "isMobile");
1110
+ var isIOS = /* @__PURE__ */ __name(() => {
1111
+ if (/(iPhone|iPad|iPod|iOS)/i.test(navigator.userAgent)) {
1112
+ return true;
1113
+ }
1114
+ return false;
1115
+ }, "isIOS");
1116
+
1117
+ // src/utils/resolveAppUrl.ts
1118
+ function ensureBasePath(pathname, basePath) {
1119
+ if (!basePath) return pathname;
1120
+ if (pathname.startsWith(basePath)) return pathname;
1121
+ return `${basePath}${pathname.startsWith("/") ? "" : "/"}${pathname}`;
1122
+ }
1123
+ __name(ensureBasePath, "ensureBasePath");
1124
+ function resolveAppUrl(path) {
1125
+ const basePath = normalizeBasePath(process.env.CLIENT_BASE_PATH);
1126
+ try {
1127
+ const url = new URL(path);
1128
+ if (url.origin !== window.location.origin) {
1129
+ return path;
1130
+ }
1131
+ url.pathname = ensureBasePath(url.pathname, basePath);
1132
+ return url.toString();
1133
+ } catch {
1134
+ }
1135
+ const normalizedPath = path.startsWith("/") ? path : `/${path}`;
1136
+ const resolvedPath = ensureBasePath(normalizedPath, basePath);
1137
+ return `${window.location.origin}${resolvedPath}`;
1138
+ }
1139
+ __name(resolveAppUrl, "resolveAppUrl");
1140
+
1141
+ // src/utils/getEnvPath.ts
1142
+ function getEnvPath() {
1143
+ return window.IS_MIAODA_PREVIEW ? "feida_preview" : "feida_runtime";
1144
+ }
1145
+ __name(getEnvPath, "getEnvPath");
1146
+
1147
+ // src/utils/safeStringify.ts
1148
+ function safeStringify(obj) {
1149
+ const seen = /* @__PURE__ */ new Set();
1150
+ try {
1151
+ return JSON.stringify(obj, (_key, value) => {
1152
+ if (typeof value === "object" && value !== null) {
1153
+ if (seen.has(value)) {
1154
+ return "[Circular]";
1155
+ }
1156
+ seen.add(value);
1157
+ }
1158
+ if (typeof value === "bigint") {
1159
+ return value.toString();
1160
+ }
1161
+ if (value instanceof Date) {
1162
+ return value.toISOString();
1163
+ }
1164
+ if (value instanceof Map) {
1165
+ return Object.fromEntries(value);
1166
+ }
1167
+ if (value instanceof Set) {
1168
+ return Array.from(value);
1169
+ }
1170
+ if (typeof value === "undefined") {
1171
+ return "undefined";
1172
+ }
1173
+ if (typeof value === "symbol") {
1174
+ return value.toString();
1175
+ }
1176
+ return value;
1177
+ });
1178
+ } catch {
1179
+ return "";
1180
+ } finally {
1181
+ seen.clear();
1182
+ }
1183
+ }
1184
+ __name(safeStringify, "safeStringify");
1185
+
1186
+ // src/utils/getAxiosForBackend.ts
1187
+ var import_axios2 = __toESM(require("axios"), 1);
1188
+ var axiosInstance;
1189
+ function showToast(message, duration = 3e3) {
1190
+ return new Promise((resolve) => {
1191
+ const toast = document.createElement("div");
1192
+ const iconSvg = `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
1193
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M8 1.333a6.667 6.667 0 1 1 0 13.334A6.667 6.667 0 0 1 8 1.333ZM8 10a.667.667 0 1 0 0 1.333A.667.667 0 0 0 8 10Zm0-5.333a.667.667 0 0 0-.667.666v3.334a.667.667 0 0 0 1.334 0V5.333A.667.667 0 0 0 8 4.667Z" fill="#ff811a"/>
1194
+ </svg>`;
1195
+ const iconWrapper = document.createElement("span");
1196
+ iconWrapper.innerHTML = iconSvg;
1197
+ Object.assign(iconWrapper.style, {
1198
+ display: "flex",
1199
+ alignItems: "center",
1200
+ marginRight: "8px",
1201
+ flexShrink: "0"
1202
+ });
1203
+ const textWrapper = document.createElement("span");
1204
+ textWrapper.textContent = message;
1205
+ toast.appendChild(iconWrapper);
1206
+ toast.appendChild(textWrapper);
1207
+ Object.assign(toast.style, {
1208
+ position: "fixed",
1209
+ top: "20%",
1210
+ left: "50%",
1211
+ transform: "translate(-50%, -50%)",
1212
+ display: "flex",
1213
+ alignItems: "center",
1214
+ padding: "12px 16px",
1215
+ backgroundColor: "#fff",
1216
+ color: "#1f2329",
1217
+ border: "1px solid #dee0e3",
1218
+ borderRadius: "6px",
1219
+ fontSize: "14px",
1220
+ lineHeight: "1.5",
1221
+ zIndex: "99999",
1222
+ maxWidth: "80vw",
1223
+ wordBreak: "break-word",
1224
+ boxShadow: "0 4px 8px rgba(0, 0, 0, 0.03), 0 3px 6px rgba(0, 0, 0, 0.05), 0 6px 18px rgba(0, 0, 0, 0.03)",
1225
+ opacity: "0",
1226
+ transition: "opacity 0.3s ease"
1227
+ });
1228
+ document.body.appendChild(toast);
1229
+ requestAnimationFrame(() => {
1230
+ toast.style.opacity = "1";
1231
+ });
1232
+ setTimeout(() => {
1233
+ toast.style.opacity = "0";
1234
+ setTimeout(() => {
1235
+ document.body.removeChild(toast);
1236
+ resolve();
1237
+ }, 300);
1238
+ }, duration);
1239
+ });
1240
+ }
1241
+ __name(showToast, "showToast");
1242
+ function getAxiosForBackend() {
1243
+ if (!axiosInstance) {
1244
+ axiosInstance = import_axios2.default.create({
1245
+ baseURL: process.env.CLIENT_BASE_PATH || "/"
1246
+ });
1247
+ axiosInstance.interceptors.response.use(null, (err) => {
1248
+ if (err.config.meta?.autoJumpToLogin !== false) {
1249
+ const loginUrl = err.response?.headers?.["x-login-url"];
1250
+ if (loginUrl) {
1251
+ showToast("\u9700\u8981\u767B\u5F55\u540E\u624D\u80FD\u6267\u884C\u64CD\u4F5C\uFF0C\u5C06\u81EA\u52A8\u8DF3\u8F6C\u767B\u5F55\u9875", 3e3).then(() => {
1252
+ window.location.href = loginUrl;
1253
+ });
1254
+ }
1255
+ }
1256
+ return Promise.reject(err);
1257
+ });
1258
+ initAxiosConfig(axiosInstance);
1259
+ }
1260
+ return axiosInstance;
1261
+ }
1262
+ __name(getAxiosForBackend, "getAxiosForBackend");
1263
+ var axiosForBackend = getAxiosForBackend();
1264
+
1265
+ // src/constants/img-resources/avatar.ts
1266
+ var avatar_exports = {};
1267
+ __export(avatar_exports, {
1268
+ avatarImg1: () => avatarImg1,
1269
+ avatarImg10: () => avatarImg10,
1270
+ avatarImg11: () => avatarImg11,
1271
+ avatarImg2: () => avatarImg2,
1272
+ avatarImg3: () => avatarImg3,
1273
+ avatarImg4: () => avatarImg4,
1274
+ avatarImg5: () => avatarImg5,
1275
+ avatarImg6: () => avatarImg6,
1276
+ avatarImg7: () => avatarImg7,
1277
+ avatarImg8: () => avatarImg8,
1278
+ avatarImg9: () => avatarImg9
1279
+ });
1280
+ var avatarImg1 = "https://lf3-static.bytednsdoc.com/obj/eden-cn/ylcylz_fsph_ryhs/ljhwZthlaukjlkulzlp/feisuda/avatar/base/1.jpg";
1281
+ var avatarImg2 = "https://lf3-static.bytednsdoc.com/obj/eden-cn/ylcylz_fsph_ryhs/ljhwZthlaukjlkulzlp/feisuda/avatar/base/2.jpg";
1282
+ var avatarImg3 = "https://lf3-static.bytednsdoc.com/obj/eden-cn/ylcylz_fsph_ryhs/ljhwZthlaukjlkulzlp/feisuda/avatar/base/3.jpg";
1283
+ var avatarImg4 = "https://lf3-static.bytednsdoc.com/obj/eden-cn/ylcylz_fsph_ryhs/ljhwZthlaukjlkulzlp/feisuda/avatar/base/4.jpg";
1284
+ var avatarImg5 = "https://lf3-static.bytednsdoc.com/obj/eden-cn/ylcylz_fsph_ryhs/ljhwZthlaukjlkulzlp/feisuda/avatar/base/5.jpg";
1285
+ var avatarImg6 = "https://lf3-static.bytednsdoc.com/obj/eden-cn/ylcylz_fsph_ryhs/ljhwZthlaukjlkulzlp/feisuda/avatar/base/6.jpg";
1286
+ var avatarImg7 = "https://lf3-static.bytednsdoc.com/obj/eden-cn/ylcylz_fsph_ryhs/ljhwZthlaukjlkulzlp/feisuda/avatar/base/7.jpg";
1287
+ var avatarImg8 = "https://lf3-static.bytednsdoc.com/obj/eden-cn/ylcylz_fsph_ryhs/ljhwZthlaukjlkulzlp/feisuda/avatar/base/8.jpg";
1288
+ var avatarImg9 = "https://lf3-static.bytednsdoc.com/obj/eden-cn/ylcylz_fsph_ryhs/ljhwZthlaukjlkulzlp/feisuda/avatar/base/9.jpg";
1289
+ var avatarImg10 = "https://lf3-static.bytednsdoc.com/obj/eden-cn/ylcylz_fsph_ryhs/ljhwZthlaukjlkulzlp/feisuda/avatar/base/10.jpg";
1290
+ var avatarImg11 = "https://lf3-static.bytednsdoc.com/obj/eden-cn/ylcylz_fsph_ryhs/ljhwZthlaukjlkulzlp/feisuda/avatar/base/11.jpg";
1291
+
1292
+ // src/constants/img-resources/banner.ts
1293
+ var banner_exports = {};
1294
+ __export(banner_exports, {
1295
+ minimalismBannerImg1: () => minimalismBannerImg1,
1296
+ minimalismBannerImg2: () => minimalismBannerImg2,
1297
+ minimalismBannerImg3: () => minimalismBannerImg3,
1298
+ minimalismBannerImg4: () => minimalismBannerImg4,
1299
+ minimalismBannerImg5: () => minimalismBannerImg5,
1300
+ minimalismBannerImg6: () => minimalismBannerImg6,
1301
+ minimalismBannerImg7: () => minimalismBannerImg7,
1302
+ minimalismBannerImg8: () => minimalismBannerImg8,
1303
+ professionalBannerImg1: () => professionalBannerImg1,
1304
+ professionalBannerImg2: () => professionalBannerImg2,
1305
+ professionalBannerImg3: () => professionalBannerImg3,
1306
+ professionalBannerImg4: () => professionalBannerImg4,
1307
+ professionalBannerImg5: () => professionalBannerImg5,
1308
+ professionalBannerImg6: () => professionalBannerImg6,
1309
+ professionalBannerImg7: () => professionalBannerImg7,
1310
+ professionalBannerImg8: () => professionalBannerImg8,
1311
+ techBannerImg1: () => techBannerImg1,
1312
+ techBannerImg2: () => techBannerImg2,
1313
+ techBannerImg3: () => techBannerImg3,
1314
+ techBannerImg4: () => techBannerImg4,
1315
+ techBannerImg5: () => techBannerImg5,
1316
+ techBannerImg6: () => techBannerImg6,
1317
+ techBannerImg7: () => techBannerImg7,
1318
+ techBannerImg8: () => techBannerImg8
1319
+ });
1320
+ var techBannerImg1 = "https://lf3-static.bytednsdoc.com/obj/eden-cn/ylcylz_fsph_ryhs/ljhwZthlaukjlkulzlp/feisuda/banner/technology/1.jpg";
1321
+ var techBannerImg2 = "https://lf3-static.bytednsdoc.com/obj/eden-cn/ylcylz_fsph_ryhs/ljhwZthlaukjlkulzlp/feisuda/banner/technology/2.jpg";
1322
+ var techBannerImg3 = "https://lf3-static.bytednsdoc.com/obj/eden-cn/ylcylz_fsph_ryhs/ljhwZthlaukjlkulzlp/feisuda/banner/technology/3.jpg";
1323
+ var techBannerImg4 = "https://lf3-static.bytednsdoc.com/obj/eden-cn/ylcylz_fsph_ryhs/ljhwZthlaukjlkulzlp/feisuda/banner/technology/4.jpg";
1324
+ var techBannerImg5 = "https://lf3-static.bytednsdoc.com/obj/eden-cn/ylcylz_fsph_ryhs/ljhwZthlaukjlkulzlp/feisuda/banner/technology/5.jpg";
1325
+ var techBannerImg6 = "https://lf3-static.bytednsdoc.com/obj/eden-cn/ylcylz_fsph_ryhs/ljhwZthlaukjlkulzlp/feisuda/banner/technology/6.jpg";
1326
+ var techBannerImg7 = "https://lf3-static.bytednsdoc.com/obj/eden-cn/ylcylz_fsph_ryhs/ljhwZthlaukjlkulzlp/feisuda/banner/technology/7.jpg";
1327
+ var techBannerImg8 = "https://lf3-static.bytednsdoc.com/obj/eden-cn/ylcylz_fsph_ryhs/ljhwZthlaukjlkulzlp/feisuda/banner/technology/8.jpg";
1328
+ var professionalBannerImg1 = "https://lf3-static.bytednsdoc.com/obj/eden-cn/ylcylz_fsph_ryhs/ljhwZthlaukjlkulzlp/feisuda/banner/professional/1.jpg";
1329
+ var professionalBannerImg2 = "https://lf3-static.bytednsdoc.com/obj/eden-cn/ylcylz_fsph_ryhs/ljhwZthlaukjlkulzlp/feisuda/banner/professional/2.jpg";
1330
+ var professionalBannerImg3 = "https://lf3-static.bytednsdoc.com/obj/eden-cn/ylcylz_fsph_ryhs/ljhwZthlaukjlkulzlp/feisuda/banner/professional/3.jpg";
1331
+ var professionalBannerImg4 = "https://lf3-static.bytednsdoc.com/obj/eden-cn/ylcylz_fsph_ryhs/ljhwZthlaukjlkulzlp/feisuda/banner/professional/4.jpg";
1332
+ var professionalBannerImg5 = "https://lf3-static.bytednsdoc.com/obj/eden-cn/ylcylz_fsph_ryhs/ljhwZthlaukjlkulzlp/feisuda/banner/professional/5.jpg";
1333
+ var professionalBannerImg6 = "https://lf3-static.bytednsdoc.com/obj/eden-cn/ylcylz_fsph_ryhs/ljhwZthlaukjlkulzlp/feisuda/banner/professional/6.jpg";
1334
+ var professionalBannerImg7 = "https://lf3-static.bytednsdoc.com/obj/eden-cn/ylcylz_fsph_ryhs/ljhwZthlaukjlkulzlp/feisuda/banner/professional/7.jpg";
1335
+ var professionalBannerImg8 = "https://lf3-static.bytednsdoc.com/obj/eden-cn/ylcylz_fsph_ryhs/ljhwZthlaukjlkulzlp/feisuda/banner/professional/8.jpg";
1336
+ var minimalismBannerImg1 = "https://lf3-static.bytednsdoc.com/obj/eden-cn/ylcylz_fsph_ryhs/ljhwZthlaukjlkulzlp/feisuda/banner/minimalism/1.jpg";
1337
+ var minimalismBannerImg2 = "https://lf3-static.bytednsdoc.com/obj/eden-cn/ylcylz_fsph_ryhs/ljhwZthlaukjlkulzlp/feisuda/banner/minimalism/2.jpg";
1338
+ var minimalismBannerImg3 = "https://lf3-static.bytednsdoc.com/obj/eden-cn/ylcylz_fsph_ryhs/ljhwZthlaukjlkulzlp/feisuda/banner/minimalism/3.jpg";
1339
+ var minimalismBannerImg4 = "https://lf3-static.bytednsdoc.com/obj/eden-cn/ylcylz_fsph_ryhs/ljhwZthlaukjlkulzlp/feisuda/banner/minimalism/4.jpg";
1340
+ var minimalismBannerImg5 = "https://lf3-static.bytednsdoc.com/obj/eden-cn/ylcylz_fsph_ryhs/ljhwZthlaukjlkulzlp/feisuda/banner/minimalism/5.jpg";
1341
+ var minimalismBannerImg6 = "https://lf3-static.bytednsdoc.com/obj/eden-cn/ylcylz_fsph_ryhs/ljhwZthlaukjlkulzlp/feisuda/banner/minimalism/6.jpg";
1342
+ var minimalismBannerImg7 = "https://lf3-static.bytednsdoc.com/obj/eden-cn/ylcylz_fsph_ryhs/ljhwZthlaukjlkulzlp/feisuda/banner/minimalism/7.jpg";
1343
+ var minimalismBannerImg8 = "https://lf3-static.bytednsdoc.com/obj/eden-cn/ylcylz_fsph_ryhs/ljhwZthlaukjlkulzlp/feisuda/banner/minimalism/8.jpg";
1344
+
1345
+ // src/constants/img-resources/cover.ts
1346
+ var cover_exports = {};
1347
+ __export(cover_exports, {
1348
+ abstractArt3dRenderingCoverImg1: () => abstractArt3dRenderingCoverImg1,
1349
+ abstractArt3dRenderingCoverImg2: () => abstractArt3dRenderingCoverImg2,
1350
+ abstractArt3dRenderingCoverImg3: () => abstractArt3dRenderingCoverImg3,
1351
+ abstractArt3dRenderingCoverImg4: () => abstractArt3dRenderingCoverImg4,
1352
+ abstractArt3dRenderingCoverImg5: () => abstractArt3dRenderingCoverImg5,
1353
+ abstractArt3dRenderingCoverImg6: () => abstractArt3dRenderingCoverImg6,
1354
+ appealClothingCoverImg1: () => appealClothingCoverImg1,
1355
+ appealClothingCoverImg2: () => appealClothingCoverImg2,
1356
+ appealClothingCoverImg3: () => appealClothingCoverImg3,
1357
+ appealClothingCoverImg4: () => appealClothingCoverImg4,
1358
+ appealClothingCoverImg5: () => appealClothingCoverImg5,
1359
+ appealClothingCoverImg6: () => appealClothingCoverImg6,
1360
+ architectureCoverImg1: () => architectureCoverImg1,
1361
+ architectureCoverImg2: () => architectureCoverImg2,
1362
+ architectureCoverImg3: () => architectureCoverImg3,
1363
+ architectureCoverImg4: () => architectureCoverImg4,
1364
+ architectureCoverImg5: () => architectureCoverImg5,
1365
+ architectureCoverImg6: () => architectureCoverImg6,
1366
+ officeCoverImg1: () => officeCoverImg1,
1367
+ officeCoverImg2: () => officeCoverImg2,
1368
+ officeCoverImg3: () => officeCoverImg3,
1369
+ officeCoverImg4: () => officeCoverImg4,
1370
+ officeCoverImg5: () => officeCoverImg5,
1371
+ officeCoverImg6: () => officeCoverImg6,
1372
+ sceneryCoverImg1: () => sceneryCoverImg1,
1373
+ sceneryCoverImg2: () => sceneryCoverImg2,
1374
+ sceneryCoverImg3: () => sceneryCoverImg3,
1375
+ sceneryCoverImg4: () => sceneryCoverImg4,
1376
+ sceneryCoverImg5: () => sceneryCoverImg5,
1377
+ sceneryCoverImg6: () => sceneryCoverImg6,
1378
+ technologyInternetCoverImg1: () => technologyInternetCoverImg1,
1379
+ technologyInternetCoverImg2: () => technologyInternetCoverImg2,
1380
+ technologyInternetCoverImg3: () => technologyInternetCoverImg3,
1381
+ technologyInternetCoverImg4: () => technologyInternetCoverImg4,
1382
+ technologyInternetCoverImg5: () => technologyInternetCoverImg5,
1383
+ technologyInternetCoverImg6: () => technologyInternetCoverImg6
1384
+ });
1385
+ var officeCoverImg1 = "https://lf3-static.bytednsdoc.com/obj/eden-cn/ylcylz_fsph_ryhs/ljhwZthlaukjlkulzlp/feisuda/cover/office/1.jpg";
1386
+ var officeCoverImg2 = "https://lf3-static.bytednsdoc.com/obj/eden-cn/ylcylz_fsph_ryhs/ljhwZthlaukjlkulzlp/feisuda/cover/office/2.jpg";
1387
+ var officeCoverImg3 = "https://lf3-static.bytednsdoc.com/obj/eden-cn/ylcylz_fsph_ryhs/ljhwZthlaukjlkulzlp/feisuda/cover/office/3.jpg";
1388
+ var officeCoverImg4 = "https://lf3-static.bytednsdoc.com/obj/eden-cn/ylcylz_fsph_ryhs/ljhwZthlaukjlkulzlp/feisuda/cover/office/4.jpg";
1389
+ var officeCoverImg5 = "https://lf3-static.bytednsdoc.com/obj/eden-cn/ylcylz_fsph_ryhs/ljhwZthlaukjlkulzlp/feisuda/cover/office/5.jpg";
1390
+ var officeCoverImg6 = "https://lf3-static.bytednsdoc.com/obj/eden-cn/ylcylz_fsph_ryhs/ljhwZthlaukjlkulzlp/feisuda/cover/office/6.jpg";
1391
+ var architectureCoverImg1 = "https://lf3-static.bytednsdoc.com/obj/eden-cn/ylcylz_fsph_ryhs/ljhwZthlaukjlkulzlp/feisuda/cover/architecture/1.jpg";
1392
+ var architectureCoverImg2 = "https://lf3-static.bytednsdoc.com/obj/eden-cn/ylcylz_fsph_ryhs/ljhwZthlaukjlkulzlp/feisuda/cover/architecture/2.jpg";
1393
+ var architectureCoverImg3 = "https://lf3-static.bytednsdoc.com/obj/eden-cn/ylcylz_fsph_ryhs/ljhwZthlaukjlkulzlp/feisuda/cover/architecture/3.jpg";
1394
+ var architectureCoverImg4 = "https://lf3-static.bytednsdoc.com/obj/eden-cn/ylcylz_fsph_ryhs/ljhwZthlaukjlkulzlp/feisuda/cover/architecture/4.jpg";
1395
+ var architectureCoverImg5 = "https://lf3-static.bytednsdoc.com/obj/eden-cn/ylcylz_fsph_ryhs/ljhwZthlaukjlkulzlp/feisuda/cover/architecture/5.jpg";
1396
+ var architectureCoverImg6 = "https://lf3-static.bytednsdoc.com/obj/eden-cn/ylcylz_fsph_ryhs/ljhwZthlaukjlkulzlp/feisuda/cover/architecture/6.jpg";
1397
+ var appealClothingCoverImg1 = "https://lf3-static.bytednsdoc.com/obj/eden-cn/ylcylz_fsph_ryhs/ljhwZthlaukjlkulzlp/feisuda/cover/appeal-clothing/1.jpg";
1398
+ var appealClothingCoverImg2 = "https://lf3-static.bytednsdoc.com/obj/eden-cn/ylcylz_fsph_ryhs/ljhwZthlaukjlkulzlp/feisuda/cover/appeal-clothing/2.jpg";
1399
+ var appealClothingCoverImg3 = "https://lf3-static.bytednsdoc.com/obj/eden-cn/ylcylz_fsph_ryhs/ljhwZthlaukjlkulzlp/feisuda/cover/appeal-clothing/3.jpg";
1400
+ var appealClothingCoverImg4 = "https://lf3-static.bytednsdoc.com/obj/eden-cn/ylcylz_fsph_ryhs/ljhwZthlaukjlkulzlp/feisuda/cover/appeal-clothing/4.jpg";
1401
+ var appealClothingCoverImg5 = "https://lf3-static.bytednsdoc.com/obj/eden-cn/ylcylz_fsph_ryhs/ljhwZthlaukjlkulzlp/feisuda/cover/appeal-clothing/5.jpg";
1402
+ var appealClothingCoverImg6 = "https://lf3-static.bytednsdoc.com/obj/eden-cn/ylcylz_fsph_ryhs/ljhwZthlaukjlkulzlp/feisuda/cover/appeal-clothing/6.jpg";
1403
+ var sceneryCoverImg1 = "https://lf3-static.bytednsdoc.com/obj/eden-cn/ylcylz_fsph_ryhs/ljhwZthlaukjlkulzlp/feisuda/cover/scenery/1.jpg";
1404
+ var sceneryCoverImg2 = "https://lf3-static.bytednsdoc.com/obj/eden-cn/ylcylz_fsph_ryhs/ljhwZthlaukjlkulzlp/feisuda/cover/scenery/2.jpg";
1405
+ var sceneryCoverImg3 = "https://lf3-static.bytednsdoc.com/obj/eden-cn/ylcylz_fsph_ryhs/ljhwZthlaukjlkulzlp/feisuda/cover/scenery/3.jpg";
1406
+ var sceneryCoverImg4 = "https://lf3-static.bytednsdoc.com/obj/eden-cn/ylcylz_fsph_ryhs/ljhwZthlaukjlkulzlp/feisuda/cover/scenery/4.jpg";
1407
+ var sceneryCoverImg5 = "https://lf3-static.bytednsdoc.com/obj/eden-cn/ylcylz_fsph_ryhs/ljhwZthlaukjlkulzlp/feisuda/cover/scenery/5.jpg";
1408
+ var sceneryCoverImg6 = "https://lf3-static.bytednsdoc.com/obj/eden-cn/ylcylz_fsph_ryhs/ljhwZthlaukjlkulzlp/feisuda/cover/scenery/6.jpg";
1409
+ var technologyInternetCoverImg1 = "https://lf3-static.bytednsdoc.com/obj/eden-cn/ylcylz_fsph_ryhs/ljhwZthlaukjlkulzlp/feisuda/cover/technology-internet/1.jpg";
1410
+ var technologyInternetCoverImg2 = "https://lf3-static.bytednsdoc.com/obj/eden-cn/ylcylz_fsph_ryhs/ljhwZthlaukjlkulzlp/feisuda/cover/technology-internet/2.jpg";
1411
+ var technologyInternetCoverImg3 = "https://lf3-static.bytednsdoc.com/obj/eden-cn/ylcylz_fsph_ryhs/ljhwZthlaukjlkulzlp/feisuda/cover/technology-internet/3.jpg";
1412
+ var technologyInternetCoverImg4 = "https://lf3-static.bytednsdoc.com/obj/eden-cn/ylcylz_fsph_ryhs/ljhwZthlaukjlkulzlp/feisuda/cover/technology-internet/4.jpg";
1413
+ var technologyInternetCoverImg5 = "https://lf3-static.bytednsdoc.com/obj/eden-cn/ylcylz_fsph_ryhs/ljhwZthlaukjlkulzlp/feisuda/cover/technology-internet/5.jpg";
1414
+ var technologyInternetCoverImg6 = "https://lf3-static.bytednsdoc.com/obj/eden-cn/ylcylz_fsph_ryhs/ljhwZthlaukjlkulzlp/feisuda/cover/technology-internet/6.jpg";
1415
+ var abstractArt3dRenderingCoverImg1 = "https://lf3-static.bytednsdoc.com/obj/eden-cn/ylcylz_fsph_ryhs/ljhwZthlaukjlkulzlp/feisuda/cover/abstract-art-3d-rendering/1.jpg";
1416
+ var abstractArt3dRenderingCoverImg2 = "https://lf3-static.bytednsdoc.com/obj/eden-cn/ylcylz_fsph_ryhs/ljhwZthlaukjlkulzlp/feisuda/cover/abstract-art-3d-rendering/2.jpg";
1417
+ var abstractArt3dRenderingCoverImg3 = "https://lf3-static.bytednsdoc.com/obj/eden-cn/ylcylz_fsph_ryhs/ljhwZthlaukjlkulzlp/feisuda/cover/abstract-art-3d-rendering/3.jpg";
1418
+ var abstractArt3dRenderingCoverImg4 = "https://lf3-static.bytednsdoc.com/obj/eden-cn/ylcylz_fsph_ryhs/ljhwZthlaukjlkulzlp/feisuda/cover/abstract-art-3d-rendering/4.jpg";
1419
+ var abstractArt3dRenderingCoverImg5 = "https://lf3-static.bytednsdoc.com/obj/eden-cn/ylcylz_fsph_ryhs/ljhwZthlaukjlkulzlp/feisuda/cover/abstract-art-3d-rendering/5.jpg";
1420
+ var abstractArt3dRenderingCoverImg6 = "https://lf3-static.bytednsdoc.com/obj/eden-cn/ylcylz_fsph_ryhs/ljhwZthlaukjlkulzlp/feisuda/cover/abstract-art-3d-rendering/6.jpg";
1421
+ // Annotate the CommonJS export names for ESM import in node:
1422
+ 0 && (module.exports = {
1423
+ ActiveLink,
1424
+ AppContainer,
1425
+ NavLink,
1426
+ QueryProvider,
1427
+ UniversalLink,
1428
+ avatarImages,
1429
+ axiosForBackend,
1430
+ bannerImages,
1431
+ clsxWithTw,
1432
+ copyToClipboard,
1433
+ coverImages,
1434
+ getAppId,
1435
+ getAppInfo,
1436
+ getAxiosForBackend,
1437
+ getCsrfToken,
1438
+ getCurrentUserProfile,
1439
+ getDataloom,
1440
+ getEnvPath,
1441
+ getWsPath,
1442
+ initAxiosConfig,
1443
+ isIOS,
1444
+ isIpad,
1445
+ isMobile,
1446
+ isPreview,
1447
+ normalizeBasePath,
1448
+ resolveAppUrl,
1449
+ safeStringify,
1450
+ scopedStorage,
1451
+ useAppInfo,
1452
+ useCurrentUserProfile,
1453
+ useIsMobile,
1454
+ useLogout
1455
+ });
1456
+ //# sourceMappingURL=index.cjs.map