mantur-components 0.1.2 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,44 +1,53 @@
1
1
  import { useCallback as e, useEffect as t, useMemo as n, useRef as r, useState as i } from "react";
2
2
  import { Avatar as a, Button as o, Card as s, DatePicker as c, Divider as l, Dropdown as u, Form as d, Grid as f, Input as p, Menu as m, Message as h, Modal as g, Pagination as _, Select as v, Table as y, Tabs as b, Tag as x, Typography as S, Upload as C } from "@arco-design/web-react";
3
- import { IconCheckCircleFill as w, IconDown as T, IconEdit as E, IconFile as D, IconLanguage as O, IconMoonFill as ee, IconPlus as k, IconPoweroff as A, IconSunFill as j, IconUpload as M } from "@arco-design/web-react/icon";
4
- import { useTranslation as N } from "react-i18next";
5
- import { jsx as P, jsxs as F } from "react/jsx-runtime";
6
- import { useTheme as I } from "next-themes";
7
- //#region src/api.ts
8
- var L = "/api", te = "/users/me/points", R = "mantur-points-refresh", z = "mantur-tenant-context-change";
9
- function ne() {
10
- return typeof window < "u" && window.__MANTUR_COMPONENTS_API_BASE__ ? window.__MANTUR_COMPONENTS_API_BASE__ : L;
3
+ import { IconCheckCircleFill as w, IconDown as T, IconEdit as E, IconFile as D, IconLanguage as O, IconMoonFill as k, IconPlus as A, IconPoweroff as j, IconSunFill as M, IconUpload as N } from "@arco-design/web-react/icon";
4
+ import { useTranslation as P } from "react-i18next";
5
+ import { jsx as F, jsxs as I } from "react/jsx-runtime";
6
+ import { useTheme as L } from "next-themes";
7
+ //#region \0rolldown/runtime.js
8
+ var R = Object.create, z = Object.defineProperty, B = Object.getOwnPropertyDescriptor, ee = Object.getOwnPropertyNames, te = Object.getPrototypeOf, V = Object.prototype.hasOwnProperty, ne = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t.exports), re = (e, t, n, r) => {
9
+ if (t && typeof t == "object" || typeof t == "function") for (var i = ee(t), a = 0, o = i.length, s; a < o; a++) s = i[a], !V.call(e, s) && s !== n && z(e, s, {
10
+ get: ((e) => t[e]).bind(null, s),
11
+ enumerable: !(r = B(t, s)) || r.enumerable
12
+ });
13
+ return e;
14
+ }, ie = (e, t, n) => (n = e == null ? {} : R(te(e)), re(t || !e || !e.__esModule ? z(n, "default", {
15
+ value: e,
16
+ enumerable: !0
17
+ }) : n, e)), ae = "/api", oe = "/users/me/points", H = "mantur-points-refresh", se = "mantur-tenant-context-change";
18
+ function ce() {
19
+ return typeof window < "u" && window.__MANTUR_COMPONENTS_API_BASE__ ? window.__MANTUR_COMPONENTS_API_BASE__ : ae;
11
20
  }
12
- function re() {
13
- return typeof window < "u" && window.__MANTUR_COMPONENTS_POINTS_ENDPOINT__ ? window.__MANTUR_COMPONENTS_POINTS_ENDPOINT__ : te;
21
+ function le() {
22
+ return typeof window < "u" && window.__MANTUR_COMPONENTS_POINTS_ENDPOINT__ ? window.__MANTUR_COMPONENTS_POINTS_ENDPOINT__ : oe;
14
23
  }
15
- function B(e) {
24
+ function ue(e) {
16
25
  if (typeof document > "u") return;
17
26
  let t = `${encodeURIComponent(e)}=`;
18
27
  return document.cookie.split("; ").find((e) => e.startsWith(t))?.slice(t.length);
19
28
  }
20
- function V(e) {
29
+ function de(e) {
21
30
  if (typeof document > "u") return;
22
31
  let t = encodeURIComponent(e), n = window.location.hostname, r = [void 0, n], i = n.split(".");
23
32
  i.length >= 2 && r.push(`.${i.slice(-2).join(".")}`), r.forEach((e) => {
24
33
  document.cookie = `${t}=; path=/; max-age=0${e ? `; domain=${e}` : ""}`;
25
34
  });
26
35
  }
27
- function H(e) {
36
+ function fe(e) {
28
37
  let t = JSON.parse(e || "null");
29
38
  if (!t) throw Error("Request failed");
30
39
  if (t.code !== 0) throw Error(t.message || "Request failed");
31
40
  return t;
32
41
  }
33
42
  async function U(e, t = {}) {
34
- let n = B("front-token"), r = B("Accept-Language"), i = t.headers || {};
43
+ let n = ue("front-token"), r = ue("Accept-Language"), i = t.headers || {};
35
44
  return n && (i.Authorization = decodeURIComponent(n)), r && (i["Accept-Language"] = decodeURIComponent(r)), new Promise((n, r) => {
36
45
  let a = new XMLHttpRequest();
37
- a.open(t.method || "GET", `${ne()}${e}`, !0), a.timeout = t.timeout || 1e4, Object.entries(i).forEach(([e, t]) => {
46
+ a.open(t.method || "GET", `${ce()}${e}`, !0), a.timeout = t.timeout || 1e4, Object.entries(i).forEach(([e, t]) => {
38
47
  a.setRequestHeader(e, t);
39
48
  }), a.onload = () => {
40
49
  try {
41
- let e = H(a.responseText);
50
+ let e = fe(a.responseText);
42
51
  if (a.status < 200 || a.status >= 300) {
43
52
  r(Error(e.message || a.statusText));
44
53
  return;
@@ -50,16 +59,16 @@ async function U(e, t = {}) {
50
59
  }, a.onerror = () => r(/* @__PURE__ */ Error("Network request failed")), a.ontimeout = () => r(/* @__PURE__ */ Error("Network request timed out")), a.send(t.body ?? null);
51
60
  });
52
61
  }
53
- async function ie() {
62
+ async function pe() {
54
63
  try {
55
64
  await U("/auth/front-logout", { method: "DELETE" });
56
65
  } catch (e) {
57
66
  console.warn("Logout request failed, continuing local logout.", e);
58
67
  } finally {
59
- V("front-token"), V("refreshToken"), typeof window < "u" && window.location.reload();
68
+ de("front-token"), de("refreshToken"), typeof window < "u" && window.location.reload();
60
69
  }
61
70
  }
62
- async function ae(e) {
71
+ async function me(e) {
63
72
  let t;
64
73
  if (e.avatarFile) {
65
74
  let n = new FormData();
@@ -74,7 +83,7 @@ async function ae(e) {
74
83
  body: JSON.stringify({ nickname: e.nickname })
75
84
  })).data || t;
76
85
  }
77
- function oe(e) {
86
+ function he(e) {
78
87
  let t = (...t) => {
79
88
  let n = t.map((t) => e?.[t]).find((e) => e !== void 0);
80
89
  return typeof n == "number" ? n : Number(n || 0);
@@ -86,13 +95,13 @@ function oe(e) {
86
95
  };
87
96
  }
88
97
  async function W() {
89
- return oe((await U(re())).data);
98
+ return he((await U(le())).data);
90
99
  }
91
100
  async function G() {
92
101
  let e = await W();
93
- return typeof window < "u" && window.dispatchEvent(new CustomEvent(R, { detail: e })), e;
102
+ return typeof window < "u" && window.dispatchEvent(new CustomEvent(H, { detail: e })), e;
94
103
  }
95
- function se(e, t) {
104
+ function ge(e, t) {
96
105
  return t?.tenantId ? e.find((e) => e.tenantId === t.tenantId) || {
97
106
  tenantId: t.tenantId,
98
107
  tenantName: t.tenantName || t.tenantId,
@@ -102,42 +111,40 @@ function se(e, t) {
102
111
  }))
103
112
  } : e.find((e) => e.isOwner) || e[0];
104
113
  }
105
- function ce(e) {
106
- typeof window < "u" && (window.__MANTUR_COMPONENTS_TENANT_CONTEXT__ = e, window.dispatchEvent(new CustomEvent(z, { detail: e })));
114
+ function _e(e) {
115
+ typeof window < "u" && (window.__MANTUR_COMPONENTS_TENANT_CONTEXT__ = e, window.dispatchEvent(new CustomEvent(se, { detail: e })));
107
116
  }
108
- function le() {
117
+ function ve() {
109
118
  if (!(typeof window > "u")) return window.__MANTUR_COMPONENTS_TENANT_CONTEXT__;
110
119
  }
111
120
  async function K() {
112
121
  return (await U("/users/me/tenants")).data || [];
113
122
  }
114
- async function q() {
123
+ async function ye() {
115
124
  return (await U("/auth/current-tenant")).data;
116
125
  }
117
- async function ue(e) {
126
+ async function be(e) {
118
127
  return (await U(`/auth/current-tenant/${e}`, { method: "PUT" })).data;
119
128
  }
120
- async function de(e = "refresh") {
121
- let [t, n] = await Promise.all([K(), q()]), r = {
129
+ async function xe(e = "refresh") {
130
+ let [t, n] = await Promise.all([K(), ye()]), r = {
122
131
  tenants: t,
123
- currentTenant: se(t, n),
132
+ currentTenant: ge(t, n),
124
133
  auth: n,
125
134
  reason: e
126
135
  };
127
- return ce(r), r;
136
+ return _e(r), r;
128
137
  }
129
- async function fe(e) {
130
- let t = await ue(e), n = await K(), r = {
138
+ async function Se(e) {
139
+ let t = await be(e), n = await K(), r = {
131
140
  tenants: n,
132
- currentTenant: se(n, t),
141
+ currentTenant: ge(n, t),
133
142
  auth: t,
134
143
  reason: "switch"
135
144
  };
136
- return ce(r), r;
145
+ return _e(r), r;
137
146
  }
138
- //#endregion
139
- //#region src/labels.ts
140
- var pe = {
147
+ var Ce = {
141
148
  title: "Mantur",
142
149
  switchTeam: "Switch Team",
143
150
  personalSettings: "Personal Settings",
@@ -190,121 +197,118 @@ var pe = {
190
197
  pointsDeductionTip: "Points expiring soon are deducted first.",
191
198
  pointsNoteTitle: "Note",
192
199
  pointsAccountNote: "Points are attached to your personal account. You recharge, consume, and manage them yourself. Others cannot recharge or use them for you. Recharge points are valid for 2 years; gifted points follow the validity set by operations."
193
- };
194
- function me(e) {
195
- return {
196
- ...pe,
197
- ...e
198
- };
199
- }
200
- //#endregion
201
- //#region src/i18n.ts
202
- var he = "i18nextLng", ge = "manturLanguageSource", J = "mantur-language-change", _e = {
200
+ }, we = {
201
+ languageZh: "中文",
202
+ languageEn: "English"
203
+ }, Te = {
204
+ title: "漫途",
205
+ switchTeam: "切换团队",
206
+ personalSettings: "个人设置",
207
+ logout: "退出登录",
208
+ loading: "加载中...",
209
+ owner: "管理员",
210
+ member: "成员",
211
+ createTeam: "创建团队",
212
+ createTeamComingSoon: "创建团队功能即将上线",
213
+ switchedToTeam: "已切换团队",
214
+ error: "请求失败",
215
+ profileTitle: "个人资料",
216
+ profileNickname: "昵称",
217
+ profileNicknamePlaceholder: "请输入昵称",
218
+ profileAvatar: "头像",
219
+ profileUploadAvatar: "上传头像",
220
+ profileAvatarHint: "支持 JPG/PNG/WebP,最大 2MB,尺寸不超过 2048px。",
221
+ profileAvatarTooLarge: "头像不能超过 2MB",
222
+ profileAvatarDimensionExceeded: "头像尺寸不能超过 2048px",
223
+ profileAvatarInvalidImage: "图片无效",
224
+ profileUpdateSuccess: "个人资料已更新",
225
+ profileSave: "保存",
226
+ profileCancel: "取消",
227
+ myPoints: "我的积分",
228
+ totalBalance: "总余额",
229
+ rechargePoints: "充值积分",
230
+ giftedPoints: "赠送积分",
231
+ recharge: "去充值",
232
+ rechargeTitle: "充值积分",
233
+ pointsDetail: "积分明细",
234
+ close: "关闭",
235
+ currentBalance: "当前余额",
236
+ pointsUnit: "积分",
237
+ rechargeHint: "充值积分有效期 2 年(自到账日起算),支付后不可退换。",
238
+ payNow: "立即支付",
239
+ rechargeSuccess: "充值成功",
240
+ all: "全部",
241
+ income: "获得",
242
+ expense: "消耗",
243
+ source: "来源",
244
+ sourceAll: "全部来源",
245
+ sourceRecharge: "充值",
246
+ sourceGifted: "赠送",
247
+ dateRange: "日期查询",
248
+ startDate: "开始日期",
249
+ endDate: "结束日期",
250
+ dateTo: "至",
251
+ query: "查询",
252
+ refreshed: "已刷新",
253
+ pointsDeductionTip: "优先扣减即将到期的积分",
254
+ pointsNoteTitle: "说明",
255
+ pointsAccountNote: "积分账户挂在你的个人账号上,自己充值、自己消耗、自己负责;他人不能代充、不能代用。充值积分有效期固定 2 年;赠送积分有效期由后台运营发放时设置。"
256
+ }, Ee = {
257
+ languageZh: "中文",
258
+ languageEn: "English"
259
+ }, De = "i18nextLng", Oe = "manturLanguageSource", q = "mantur-language-change", ke = {
203
260
  "zh-CN": {
204
- title: "漫途",
205
- switchTeam: "切换团队",
206
- personalSettings: "个人设置",
207
- logout: "退出登录",
208
- loading: "加载中...",
209
- owner: "管理员",
210
- member: "成员",
211
- createTeam: "创建团队",
212
- createTeamComingSoon: "创建团队功能即将上线",
213
- switchedToTeam: "已切换团队",
214
- error: "请求失败",
215
- profileTitle: "个人资料",
216
- profileNickname: "昵称",
217
- profileNicknamePlaceholder: "请输入昵称",
218
- profileAvatar: "头像",
219
- profileUploadAvatar: "上传头像",
220
- profileAvatarHint: "支持 JPG/PNG/WebP,最大 2MB,尺寸不超过 2048px。",
221
- profileAvatarTooLarge: "头像不能超过 2MB",
222
- profileAvatarDimensionExceeded: "头像尺寸不能超过 2048px",
223
- profileAvatarInvalidImage: "图片无效",
224
- profileUpdateSuccess: "个人资料已更新",
225
- profileSave: "保存",
226
- profileCancel: "取消",
227
- myPoints: "我的积分",
228
- totalBalance: "总余额",
229
- rechargePoints: "充值积分",
230
- giftedPoints: "赠送积分",
231
- recharge: "去充值",
232
- rechargeTitle: "充值积分",
233
- pointsDetail: "积分明细",
234
- close: "关闭",
235
- currentBalance: "当前余额",
236
- pointsUnit: "积分",
237
- rechargeHint: "充值积分有效期 2 年(自到账日起算),支付后不可退换。",
238
- payNow: "立即支付",
239
- rechargeSuccess: "充值成功",
240
- all: "全部",
241
- income: "获得",
242
- expense: "消耗",
243
- source: "来源",
244
- sourceAll: "全部来源",
245
- sourceRecharge: "充值",
246
- sourceGifted: "赠送",
247
- dateRange: "日期查询",
248
- startDate: "开始日期",
249
- endDate: "结束日期",
250
- dateTo: "至",
251
- query: "查询",
252
- refreshed: "已刷新",
253
- pointsDeductionTip: "优先扣减即将到期的积分",
254
- pointsNoteTitle: "说明",
255
- pointsAccountNote: "积分账户挂在你的个人账号上,自己充值、自己消耗、自己负责;他人不能代充、不能代用。充值积分有效期固定 2 年;赠送积分有效期由后台运营发放时设置。",
256
- languageZh: "中文",
257
- languageEn: "English"
261
+ ...Te,
262
+ ...Ee
258
263
  },
259
264
  "en-US": {
260
- ...pe,
261
- languageZh: "中文",
262
- languageEn: "English"
265
+ ...Ce,
266
+ ...we
263
267
  }
264
268
  };
265
- function Y(e) {
269
+ function J(e) {
266
270
  return e?.toLowerCase().startsWith("en") ? "en-US" : "zh-CN";
267
271
  }
268
- function X() {
269
- return typeof window > "u" ? "zh-CN" : Y(window.localStorage.getItem("i18nextLng") || document.documentElement.lang || navigator.language);
272
+ function Y() {
273
+ return typeof window > "u" ? "zh-CN" : J(window.localStorage.getItem("i18nextLng") || document.documentElement.lang || navigator.language);
270
274
  }
271
- function Z(e) {
272
- return _e[Y(e)];
275
+ function X(e) {
276
+ return ke[J(e)];
273
277
  }
274
278
  //#endregion
275
279
  //#region src/lang-switch/LangSwitch.tsx
276
- var ve = he, ye = ge;
277
- function be(e, t) {
280
+ var Ae = De, je = Oe;
281
+ function Me(e, t) {
278
282
  document.cookie = `${encodeURIComponent(e)}=${encodeURIComponent(t)}; path=/`;
279
283
  }
280
- function xe() {
281
- let { i18n: e } = N(), [n, r] = i(() => X()), a = Z(n);
284
+ function Ne() {
285
+ let { i18n: e } = P(), [n, r] = i(() => Y()), a = X(n);
282
286
  return t(() => {
283
- r(Y(e.language));
284
- }, [e.language]), /* @__PURE__ */ P(u, {
285
- droplist: /* @__PURE__ */ F(m, {
287
+ r(J(e.language));
288
+ }, [e.language]), /* @__PURE__ */ F(u, {
289
+ droplist: /* @__PURE__ */ I(m, {
286
290
  selectedKeys: [n],
287
291
  onClickMenuItem: (t) => {
288
- let n = Y(t);
289
- localStorage.setItem(ve, t), localStorage.setItem(ye, "manual"), r(n), e.changeLanguage(t), be("Accept-Language", t), window.dispatchEvent(new CustomEvent(J, { detail: n })), window.location.reload();
292
+ let n = J(t);
293
+ localStorage.setItem(Ae, t), localStorage.setItem(je, "manual"), r(n), e.changeLanguage(t), Me("Accept-Language", t), window.dispatchEvent(new CustomEvent(q, { detail: n })), window.location.reload();
290
294
  },
291
- children: [/* @__PURE__ */ P(m.Item, { children: a.languageZh }, "zh-CN"), /* @__PURE__ */ P(m.Item, { children: a.languageEn }, "en-US")]
295
+ children: [/* @__PURE__ */ F(m.Item, { children: a.languageZh }, "zh-CN"), /* @__PURE__ */ F(m.Item, { children: a.languageEn }, "en-US")]
292
296
  }),
293
297
  trigger: "click",
294
298
  position: "br",
295
- children: /* @__PURE__ */ P(o, {
299
+ children: /* @__PURE__ */ F(o, {
296
300
  shape: "circle",
297
- icon: /* @__PURE__ */ P(O, {})
301
+ icon: /* @__PURE__ */ F(O, {})
298
302
  })
299
303
  });
300
304
  }
301
305
  //#endregion
302
306
  //#region src/theme-switch/ThemeSwitch.tsx
303
- function Se() {
304
- let { resolvedTheme: e, setTheme: t } = I();
305
- return /* @__PURE__ */ P(o, {
307
+ function Pe() {
308
+ let { resolvedTheme: e, setTheme: t } = L();
309
+ return /* @__PURE__ */ F(o, {
306
310
  shape: "circle",
307
- icon: P(e === "light" ? ee : j, {}),
311
+ icon: F(e === "light" ? k : M, {}),
308
312
  onClick: () => {
309
313
  t(e === "light" ? "dark" : "light");
310
314
  }
@@ -312,7 +316,7 @@ function Se() {
312
316
  }
313
317
  //#endregion
314
318
  //#region src/header/mock.ts
315
- var Q = [
319
+ var Z = [
316
320
  {
317
321
  id: "points-500",
318
322
  points: 500,
@@ -334,7 +338,7 @@ var Q = [
334
338
  points: 24e3,
335
339
  price: 200
336
340
  }
337
- ], Ce = [
341
+ ], Fe = [
338
342
  {
339
343
  id: "recharge-1",
340
344
  type: "income",
@@ -407,14 +411,14 @@ var Q = [
407
411
  badgeKind: "deducted",
408
412
  badgeText: "已扣除"
409
413
  }
410
- ], { RangePicker: we } = c, Te = 21, Ee = 7;
411
- function De(e) {
414
+ ], { RangePicker: Ie } = c, Le = 21, Re = 7;
415
+ function ze(e) {
412
416
  return e === "recharge" ? "arcoblue" : e === "gift" ? "cyan" : e === "expired" ? "gray" : "orange";
413
417
  }
414
- function Oe({ visible: e, points: t, text: r, onCancel: a, onRecharge: c }) {
418
+ function Be({ visible: e, points: t, text: r, onCancel: a, onRecharge: c }) {
415
419
  let [l, u] = i("all"), [d, p] = i("all"), [m, C] = i(["2026-04-15", "2026-05-15"]), [w, T] = i(1), E = (e) => new Intl.NumberFormat().format(e), D = n(() => {
416
420
  let [e, t] = m;
417
- return Ce.filter((n) => {
421
+ return Fe.filter((n) => {
418
422
  let r = l === "all" || n.type === l, i = d === "all" || n.source === d, a = !e || n.date >= e, o = !t || n.date <= t;
419
423
  return r && i && a && o;
420
424
  });
@@ -426,12 +430,12 @@ function Oe({ visible: e, points: t, text: r, onCancel: a, onRecharge: c }) {
426
430
  {
427
431
  title: r.pointsDetail,
428
432
  dataIndex: "name",
429
- render: (e, t) => /* @__PURE__ */ F("div", {
433
+ render: (e, t) => /* @__PURE__ */ I("div", {
430
434
  className: "min-w-0",
431
- children: [/* @__PURE__ */ P(S.Text, {
435
+ children: [/* @__PURE__ */ F(S.Text, {
432
436
  className: "font-medium!",
433
437
  children: t.name
434
- }), /* @__PURE__ */ P(S.Text, {
438
+ }), /* @__PURE__ */ F(S.Text, {
435
439
  type: "secondary",
436
440
  className: "mt-1 block! text-xs!",
437
441
  children: t.meta
@@ -443,7 +447,7 @@ function Oe({ visible: e, points: t, text: r, onCancel: a, onRecharge: c }) {
443
447
  dataIndex: "amount",
444
448
  width: 120,
445
449
  align: "right",
446
- render: (e, t) => /* @__PURE__ */ F(S.Text, {
450
+ render: (e, t) => /* @__PURE__ */ I(S.Text, {
447
451
  className: `font-semibold! ${t.amount > 0 ? "text-arco-success-6!" : "text-arco-danger-6!"}`,
448
452
  children: [t.amount > 0 ? "+" : "", E(t.amount)]
449
453
  })
@@ -453,23 +457,23 @@ function Oe({ visible: e, points: t, text: r, onCancel: a, onRecharge: c }) {
453
457
  dataIndex: "badgeText",
454
458
  width: 110,
455
459
  align: "right",
456
- render: (e, t) => /* @__PURE__ */ P(x, {
457
- color: De(t.badgeKind),
460
+ render: (e, t) => /* @__PURE__ */ F(x, {
461
+ color: ze(t.badgeKind),
458
462
  children: t.badgeText
459
463
  })
460
464
  }
461
465
  ];
462
- return /* @__PURE__ */ P(g, {
466
+ return /* @__PURE__ */ F(g, {
463
467
  title: r.pointsDetail,
464
468
  visible: e,
465
- footer: /* @__PURE__ */ F("div", {
469
+ footer: /* @__PURE__ */ I("div", {
466
470
  className: "flex justify-end gap-2",
467
- children: [/* @__PURE__ */ P(o, {
471
+ children: [/* @__PURE__ */ F(o, {
468
472
  onClick: a,
469
473
  children: r.close
470
- }), /* @__PURE__ */ P(o, {
474
+ }), /* @__PURE__ */ F(o, {
471
475
  type: "primary",
472
- icon: /* @__PURE__ */ P(k, {}),
476
+ icon: /* @__PURE__ */ F(A, {}),
473
477
  onClick: () => {
474
478
  a(), c();
475
479
  },
@@ -481,146 +485,146 @@ function Oe({ visible: e, points: t, text: r, onCancel: a, onRecharge: c }) {
481
485
  width: 780,
482
486
  maxWidth: "calc(100vw - 48px)"
483
487
  },
484
- children: /* @__PURE__ */ F("div", {
488
+ children: /* @__PURE__ */ I("div", {
485
489
  className: "max-h-[70vh] overflow-y-auto",
486
490
  children: [
487
- /* @__PURE__ */ F(s, {
491
+ /* @__PURE__ */ I(s, {
488
492
  bordered: !1,
489
493
  className: "from-arco-primary-light-1/40 to-cyan-400/5 rounded-none! bg-linear-to-br!",
490
494
  children: [
491
- /* @__PURE__ */ P(S.Text, {
495
+ /* @__PURE__ */ F(S.Text, {
492
496
  type: "secondary",
493
497
  className: "text-xs!",
494
498
  children: r.totalBalance
495
499
  }),
496
- /* @__PURE__ */ F("div", {
500
+ /* @__PURE__ */ I("div", {
497
501
  className: "mt-1.5 mb-3.5 ",
498
- children: [/* @__PURE__ */ P(S.Text, {
502
+ children: [/* @__PURE__ */ F(S.Text, {
499
503
  className: "text-3xl! font-bold!",
500
504
  children: E(t.total)
501
- }), /* @__PURE__ */ F(S.Text, {
505
+ }), /* @__PURE__ */ I(S.Text, {
502
506
  type: "secondary",
503
507
  className: "ml-2 text-sm! ",
504
508
  children: ["🪙 ", r.pointsUnit]
505
509
  })]
506
510
  }),
507
- /* @__PURE__ */ F(f.Row, {
511
+ /* @__PURE__ */ I(f.Row, {
508
512
  gutter: 12,
509
- children: [/* @__PURE__ */ P(f.Col, {
513
+ children: [/* @__PURE__ */ F(f.Col, {
510
514
  span: 12,
511
- children: /* @__PURE__ */ F(s, {
515
+ children: /* @__PURE__ */ I(s, {
512
516
  size: "small",
513
- children: [/* @__PURE__ */ F("div", {
517
+ children: [/* @__PURE__ */ I("div", {
514
518
  className: "mb-1 flex items-center justify-between",
515
- children: [/* @__PURE__ */ P(S.Text, {
519
+ children: [/* @__PURE__ */ F(S.Text, {
516
520
  type: "secondary",
517
521
  className: "text-xs!",
518
522
  children: r.rechargePoints
519
- }), /* @__PURE__ */ P(x, {
523
+ }), /* @__PURE__ */ F(x, {
520
524
  color: "arcoblue",
521
525
  children: r.sourceRecharge
522
526
  })]
523
- }), /* @__PURE__ */ P(S.Text, {
527
+ }), /* @__PURE__ */ F(S.Text, {
524
528
  className: "text-lg! font-semibold!",
525
529
  children: E(t.recharge)
526
530
  })]
527
531
  })
528
- }), /* @__PURE__ */ P(f.Col, {
532
+ }), /* @__PURE__ */ F(f.Col, {
529
533
  span: 12,
530
- children: /* @__PURE__ */ F(s, {
534
+ children: /* @__PURE__ */ I(s, {
531
535
  size: "small",
532
- children: [/* @__PURE__ */ F("div", {
536
+ children: [/* @__PURE__ */ I("div", {
533
537
  className: "mb-1 flex items-center justify-between",
534
- children: [/* @__PURE__ */ P(S.Text, {
538
+ children: [/* @__PURE__ */ F(S.Text, {
535
539
  type: "secondary",
536
540
  className: "text-xs!",
537
541
  children: r.giftedPoints
538
- }), /* @__PURE__ */ P(x, {
542
+ }), /* @__PURE__ */ F(x, {
539
543
  color: "success",
540
544
  children: r.sourceGifted
541
545
  })]
542
- }), /* @__PURE__ */ P(S.Text, {
546
+ }), /* @__PURE__ */ F(S.Text, {
543
547
  className: "text-lg! font-semibold!",
544
548
  children: E(t.gifted)
545
549
  })]
546
550
  })
547
551
  })]
548
552
  }),
549
- /* @__PURE__ */ P(S.Text, {
553
+ /* @__PURE__ */ F(S.Text, {
550
554
  type: "secondary",
551
555
  className: "mt-2.5 block! text-xs!",
552
556
  children: r.pointsDeductionTip
553
557
  })
554
558
  ]
555
559
  }),
556
- /* @__PURE__ */ F("div", {
560
+ /* @__PURE__ */ I("div", {
557
561
  className: "px-6 py-4",
558
562
  children: [
559
- /* @__PURE__ */ F(b, {
563
+ /* @__PURE__ */ I(b, {
560
564
  activeTab: l,
561
565
  onChange: (e) => u(e),
562
566
  children: [
563
- /* @__PURE__ */ P(b.TabPane, { title: r.all }, "all"),
564
- /* @__PURE__ */ P(b.TabPane, { title: r.income }, "income"),
565
- /* @__PURE__ */ P(b.TabPane, { title: r.expense }, "expense")
567
+ /* @__PURE__ */ F(b.TabPane, { title: r.all }, "all"),
568
+ /* @__PURE__ */ F(b.TabPane, { title: r.income }, "income"),
569
+ /* @__PURE__ */ F(b.TabPane, { title: r.expense }, "expense")
566
570
  ]
567
571
  }),
568
- /* @__PURE__ */ F("div", {
572
+ /* @__PURE__ */ I("div", {
569
573
  className: "mt-2 mb-3.5 flex flex-wrap items-center gap-2.5",
570
574
  children: [
571
- /* @__PURE__ */ F(v, {
575
+ /* @__PURE__ */ I(v, {
572
576
  value: d,
573
577
  style: { width: 140 },
574
578
  onChange: (e) => p(e),
575
579
  children: [
576
- /* @__PURE__ */ P(v.Option, {
580
+ /* @__PURE__ */ F(v.Option, {
577
581
  value: "all",
578
582
  children: r.sourceAll
579
583
  }),
580
- /* @__PURE__ */ P(v.Option, {
584
+ /* @__PURE__ */ F(v.Option, {
581
585
  value: "recharge",
582
586
  children: r.sourceRecharge
583
587
  }),
584
- /* @__PURE__ */ P(v.Option, {
588
+ /* @__PURE__ */ F(v.Option, {
585
589
  value: "gift",
586
590
  children: r.sourceGifted
587
591
  })
588
592
  ]
589
593
  }),
590
- /* @__PURE__ */ P(we, {
594
+ /* @__PURE__ */ F(Ie, {
591
595
  value: m,
592
596
  onChange: (e) => C(e),
593
597
  style: { width: 260 }
594
598
  }),
595
- /* @__PURE__ */ P(o, {
599
+ /* @__PURE__ */ F(o, {
596
600
  onClick: () => h.success(r.refreshed),
597
601
  children: r.query
598
602
  })
599
603
  ]
600
604
  }),
601
- /* @__PURE__ */ P(y, {
605
+ /* @__PURE__ */ F(y, {
602
606
  rowKey: "id",
603
607
  columns: O,
604
608
  data: D,
605
609
  pagination: !1,
606
610
  border: !1
607
611
  }),
608
- /* @__PURE__ */ P(_, {
612
+ /* @__PURE__ */ F(_, {
609
613
  className: "mt-3 flex justify-center!",
610
614
  current: w,
611
- pageSize: Ee,
612
- total: Te,
615
+ pageSize: Re,
616
+ total: Le,
613
617
  onChange: T
614
618
  })
615
619
  ]
616
620
  }),
617
- /* @__PURE__ */ P(s, {
621
+ /* @__PURE__ */ F(s, {
618
622
  bordered: !1,
619
623
  className: "bg-arco-primary-light-1/30 rounded-none!",
620
- children: /* @__PURE__ */ F(S.Text, {
624
+ children: /* @__PURE__ */ I(S.Text, {
621
625
  type: "secondary",
622
626
  className: "text-xs! leading-6!",
623
- children: [/* @__PURE__ */ F("strong", { children: [r.pointsNoteTitle, ":"] }), r.pointsAccountNote]
627
+ children: [/* @__PURE__ */ I("strong", { children: [r.pointsNoteTitle, ":"] }), r.pointsAccountNote]
624
628
  })
625
629
  })
626
630
  ]
@@ -628,9 +632,18 @@ function Oe({ visible: e, points: t, text: r, onCancel: a, onRecharge: c }) {
628
632
  });
629
633
  }
630
634
  //#endregion
635
+ //#region src/labels.ts
636
+ var Ve = Ce;
637
+ function He(e) {
638
+ return {
639
+ ...Ve,
640
+ ...e
641
+ };
642
+ }
643
+ //#endregion
631
644
  //#region src/header/components/ProfileModal.tsx
632
- var ke = 2048, Ae = 2 * 1024 * 1024;
633
- function je(e) {
645
+ var Q = 2048, Ue = 2 * 1024 * 1024;
646
+ function We(e) {
634
647
  return new Promise((t, n) => {
635
648
  let r = URL.createObjectURL(e), i = new Image();
636
649
  i.onload = () => {
@@ -643,8 +656,8 @@ function je(e) {
643
656
  }, i.src = r;
644
657
  });
645
658
  }
646
- function Me({ visible: e, user: n, labels: s, onCancel: c, onSubmit: l }) {
647
- let u = me(s), [f] = d.useForm(), [m, _] = i(!1), [v, y] = i(null), [b, x] = i(null), S = r(null);
659
+ function Ge({ visible: e, user: n, labels: s, onCancel: c, onSubmit: l }) {
660
+ let u = He(s), [f] = d.useForm(), [m, _] = i(!1), [v, y] = i(null), [b, x] = i(null), S = r(null);
648
661
  t(() => () => {
649
662
  S.current &&= (URL.revokeObjectURL(S.current), null);
650
663
  }, []), t(() => {
@@ -659,7 +672,7 @@ function Me({ visible: e, user: n, labels: s, onCancel: c, onSubmit: l }) {
659
672
  }, T = (e) => {
660
673
  h.success(e);
661
674
  };
662
- return /* @__PURE__ */ P(g, {
675
+ return /* @__PURE__ */ F(g, {
663
676
  title: u.profileTitle,
664
677
  visible: e,
665
678
  onOk: async () => {
@@ -679,42 +692,42 @@ function Me({ visible: e, user: n, labels: s, onCancel: c, onSubmit: l }) {
679
692
  confirmLoading: m,
680
693
  okText: u.profileSave,
681
694
  cancelText: u.profileCancel,
682
- children: /* @__PURE__ */ F(d, {
695
+ children: /* @__PURE__ */ I(d, {
683
696
  form: f,
684
697
  layout: "vertical",
685
- children: [/* @__PURE__ */ P(d.Item, {
698
+ children: [/* @__PURE__ */ F(d.Item, {
686
699
  label: u.profileNickname,
687
700
  field: "nickname",
688
701
  rules: [{
689
702
  required: !0,
690
703
  message: u.profileNicknamePlaceholder
691
704
  }],
692
- children: /* @__PURE__ */ P(p, {
705
+ children: /* @__PURE__ */ F(p, {
693
706
  placeholder: u.profileNicknamePlaceholder,
694
707
  allowClear: !0
695
708
  })
696
- }), /* @__PURE__ */ P(d.Item, {
709
+ }), /* @__PURE__ */ F(d.Item, {
697
710
  label: u.profileAvatar,
698
- children: /* @__PURE__ */ F("div", {
711
+ children: /* @__PURE__ */ I("div", {
699
712
  className: "flex flex-col gap-2",
700
- children: [/* @__PURE__ */ F("div", {
713
+ children: [/* @__PURE__ */ I("div", {
701
714
  className: "flex items-center gap-3",
702
- children: [/* @__PURE__ */ P(a, {
715
+ children: [/* @__PURE__ */ F(a, {
703
716
  size: 64,
704
717
  className: "shrink-0 bg-arco-primary-light-1!",
705
- children: b || n?.avatar ? /* @__PURE__ */ P("img", {
718
+ children: b || n?.avatar ? /* @__PURE__ */ F("img", {
706
719
  src: b || n?.avatar,
707
720
  alt: "",
708
721
  className: "block h-full w-full object-cover"
709
722
  }) : n?.nickname?.[0] || n?.username?.[0] || "U"
710
- }), /* @__PURE__ */ P(C, {
723
+ }), /* @__PURE__ */ F(C, {
711
724
  accept: "image/*",
712
725
  showUploadList: !1,
713
726
  beforeUpload: async (e) => {
714
- if (e.size > Ae) return w(u.profileAvatarTooLarge), !1;
727
+ if (e.size > Ue) return w(u.profileAvatarTooLarge), !1;
715
728
  try {
716
- let { width: t, height: n } = await je(e);
717
- if (t > ke || n > ke) return w(u.profileAvatarDimensionExceeded), !1;
729
+ let { width: t, height: n } = await We(e);
730
+ if (t > Q || n > Q) return w(u.profileAvatarDimensionExceeded), !1;
718
731
  } catch (e) {
719
732
  return w(u.profileAvatarInvalidImage, e), !1;
720
733
  }
@@ -724,14 +737,14 @@ function Me({ visible: e, user: n, labels: s, onCancel: c, onSubmit: l }) {
724
737
  return S.current = n, n;
725
738
  }), y(e), !1;
726
739
  },
727
- children: /* @__PURE__ */ P(o, {
740
+ children: /* @__PURE__ */ F(o, {
728
741
  type: "outline",
729
742
  size: "small",
730
- icon: /* @__PURE__ */ P(M, {}),
743
+ icon: /* @__PURE__ */ F(N, {}),
731
744
  children: u.profileUploadAvatar
732
745
  })
733
746
  })]
734
- }), /* @__PURE__ */ P("span", {
747
+ }), /* @__PURE__ */ F("span", {
735
748
  className: "text-xs text-arco-text-3",
736
749
  children: u.profileAvatarHint
737
750
  })]
@@ -742,33 +755,33 @@ function Me({ visible: e, user: n, labels: s, onCancel: c, onSubmit: l }) {
742
755
  }
743
756
  //#endregion
744
757
  //#region src/header/components/UserAvatar.tsx
745
- function Ne(e) {
758
+ function Ke(e) {
746
759
  return e?.nickname?.[0] || e?.username?.[0] || "U";
747
760
  }
748
761
  function $({ user: e, size: t, className: n = "" }) {
749
- return /* @__PURE__ */ P(a, {
762
+ return /* @__PURE__ */ F(a, {
750
763
  size: t,
751
764
  className: `bg-arco-primary/20! text-arco-primary-6 border-2 font-bold ${n}`,
752
- children: e?.avatar ? /* @__PURE__ */ P("img", {
765
+ children: e?.avatar ? /* @__PURE__ */ F("img", {
753
766
  src: e.avatar,
754
767
  alt: "avatar",
755
768
  className: "h-full w-full object-cover"
756
- }) : Ne(e)
769
+ }) : Ke(e)
757
770
  });
758
771
  }
759
772
  //#endregion
760
773
  //#region src/header/components/RechargeModal.tsx
761
- function Pe({ visible: e, user: t, points: n, text: r, onCancel: a, onPay: c }) {
762
- let [l, u] = i(Q[2].id), d = (e) => new Intl.NumberFormat().format(e), p = Q.find((e) => e.id === l) || Q[0];
763
- return /* @__PURE__ */ P(g, {
774
+ function qe({ visible: e, user: t, points: n, text: r, onCancel: a, onPay: c }) {
775
+ let [l, u] = i(Z[2].id), d = (e) => new Intl.NumberFormat().format(e), p = Z.find((e) => e.id === l) || Z[0];
776
+ return /* @__PURE__ */ F(g, {
764
777
  title: r.rechargeTitle,
765
778
  visible: e,
766
- footer: /* @__PURE__ */ F("div", {
779
+ footer: /* @__PURE__ */ I("div", {
767
780
  className: "mx-auto flex max-w-7xl items-center justify-between gap-5",
768
- children: [/* @__PURE__ */ P("span", {
781
+ children: [/* @__PURE__ */ F("span", {
769
782
  className: "text-arco-text-2 text-sm leading-6",
770
783
  children: r.rechargeHint
771
- }), /* @__PURE__ */ F(o, {
784
+ }), /* @__PURE__ */ I(o, {
772
785
  type: "primary",
773
786
  size: "large",
774
787
  className: "min-w-48! font-bold!",
@@ -790,35 +803,35 @@ function Pe({ visible: e, user: t, points: n, text: r, onCancel: a, onPay: c })
790
803
  paddingBottom: 0
791
804
  },
792
805
  className: "top-0! m-0! flex! h-screen! w-screen! max-w-none! flex-col! [&_.arco-modal-body]:min-h-0! [&_.arco-modal-body]:flex-1! [&_.arco-modal-body]:overflow-hidden! [&_.arco-modal-body]:p-0! [&_.arco-modal-close-icon]:top-1.5! [&_.arco-modal-close-icon]:right-4! [&_.arco-modal-close-icon]:inline-flex! [&_.arco-modal-close-icon]:h-9! [&_.arco-modal-close-icon]:w-9! [&_.arco-modal-close-icon]:items-center! [&_.arco-modal-close-icon]:justify-center! [&_.arco-modal-close-icon]:rounded-lg! [&_.arco-modal-close-icon]:text-lg! [&_.arco-modal-close-icon]:leading-9! [&_.arco-modal-close-icon]:transition-colors [&_.arco-modal-close-icon:hover]:bg-arco-fill-2 [&_.arco-modal-close-icon:hover]:text-arco-primary-6 [&_.arco-modal-close-icon_svg]:h-[18px]! [&_.arco-modal-close-icon_svg]:w-[18px]! [&_.arco-modal-content]:flex! [&_.arco-modal-content]:h-auto! [&_.arco-modal-content]:min-h-0! [&_.arco-modal-content]:flex-1! [&_.arco-modal-content]:flex-col! [&_.arco-modal-content]:overflow-hidden! [&_.arco-modal-content]:rounded-none! [&_.arco-modal-footer]:shrink-0! [&_.arco-modal-header]:shrink-0!",
793
- children: /* @__PURE__ */ F("div", {
806
+ children: /* @__PURE__ */ I("div", {
794
807
  className: "mx-auto flex h-full w-full max-w-7xl flex-col items-center ",
795
- children: [/* @__PURE__ */ F("div", {
808
+ children: [/* @__PURE__ */ I("div", {
796
809
  className: "w-full border-arco-border-1 bg-arco-fill-1 text-arco-text-2 flex items-center gap-2.5 rounded-lg border px-3.5 py-3 text-sm",
797
- children: [/* @__PURE__ */ P($, {
810
+ children: [/* @__PURE__ */ F($, {
798
811
  user: t,
799
812
  size: 32,
800
813
  className: "shrink-0"
801
- }), /* @__PURE__ */ F("span", { children: [
814
+ }), /* @__PURE__ */ I("span", { children: [
802
815
  t?.nickname || t?.username,
803
816
  " · ",
804
817
  r.currentBalance,
805
818
  " ",
806
- /* @__PURE__ */ P("strong", {
819
+ /* @__PURE__ */ F("strong", {
807
820
  className: "text-arco-text-1",
808
821
  children: d(n.total)
809
822
  }),
810
823
  " ",
811
824
  r.pointsUnit
812
825
  ] })]
813
- }), /* @__PURE__ */ P("div", {
826
+ }), /* @__PURE__ */ F("div", {
814
827
  className: "mt-6 w-full",
815
- children: /* @__PURE__ */ P(f.Row, {
828
+ children: /* @__PURE__ */ F(f.Row, {
816
829
  gutter: [16, 16],
817
- children: Q.map((e) => /* @__PURE__ */ P(f.Col, {
830
+ children: Z.map((e) => /* @__PURE__ */ F(f.Col, {
818
831
  xs: 24,
819
832
  sm: 12,
820
833
  lg: 6,
821
- children: /* @__PURE__ */ F(s, {
834
+ children: /* @__PURE__ */ I(s, {
822
835
  hoverable: !0,
823
836
  role: "button",
824
837
  tabIndex: 0,
@@ -834,29 +847,29 @@ function Pe({ visible: e, user: t, points: n, text: r, onCancel: a, onPay: c })
834
847
  },
835
848
  className: `border-arco-border-2! bg-arco-bg-2! relative cursor-pointer overflow-hidden rounded-lg! shadow-sm! transition-all duration-200 before:absolute before:inset-x-0 before:top-0 before:h-1 before:bg-linear-to-r before:from-arco-primary before:to-transparent hover:shadow-md! ${l === e.id ? "border-arco-primary-6! bg-arco-primary-light-1/40! ring-arco-primary-6/20 ring-2! shadow-[0_18px_38px_rgb(var(--primary-6)/22%)]!" : "hover:border-arco-primary-6!"}`,
836
849
  children: [
837
- l === e.id ? /* @__PURE__ */ P(w, { className: "text-arco-primary-6! absolute bottom-4 left-4 text-xl" }) : null,
838
- "recommended" in e && e.recommended ? /* @__PURE__ */ P(x, {
850
+ l === e.id ? /* @__PURE__ */ F(w, { className: "text-arco-primary-6! absolute bottom-4 left-4 text-xl" }) : null,
851
+ "recommended" in e && e.recommended ? /* @__PURE__ */ F(x, {
839
852
  color: "arcoblue",
840
853
  className: "absolute top-4 right-4 text-xs! font-bold!",
841
854
  children: "HOT"
842
855
  }) : null,
843
- /* @__PURE__ */ F("div", {
856
+ /* @__PURE__ */ I("div", {
844
857
  className: "min-w-0 pr-16",
845
- children: [/* @__PURE__ */ F(S.Text, {
858
+ children: [/* @__PURE__ */ I(S.Text, {
846
859
  className: "flex items-center text-3xl! leading-tight! font-bold!",
847
- children: [d(e.points), /* @__PURE__ */ P("span", {
860
+ children: [d(e.points), /* @__PURE__ */ F("span", {
848
861
  className: "ml-1 text-2xl",
849
862
  children: "🪙"
850
863
  })]
851
- }), /* @__PURE__ */ P(S.Text, {
864
+ }), /* @__PURE__ */ F(S.Text, {
852
865
  type: "secondary",
853
866
  className: "mt-1 block! text-sm!",
854
867
  children: r.pointsUnit
855
868
  })]
856
869
  }),
857
- /* @__PURE__ */ P("div", {
870
+ /* @__PURE__ */ F("div", {
858
871
  className: "mt-7 flex w-full justify-end",
859
- children: /* @__PURE__ */ F(S.Text, {
872
+ children: /* @__PURE__ */ I(S.Text, {
860
873
  className: "text-arco-primary-6! text-right text-2xl! leading-tight! font-bold!",
861
874
  children: ["$", e.price]
862
875
  })
@@ -871,87 +884,87 @@ function Pe({ visible: e, user: t, points: n, text: r, onCancel: a, onPay: c })
871
884
  }
872
885
  //#endregion
873
886
  //#region src/header/components/UserMenu.tsx
874
- function Fe({ user: e, points: t, text: n, onEditProfile: r, onRecharge: i, onPointsDetail: a, onLogout: s }) {
887
+ function Je({ user: e, points: t, text: n, onEditProfile: r, onRecharge: i, onPointsDetail: a, onLogout: s }) {
875
888
  let c = (e) => new Intl.NumberFormat().format(e);
876
- return /* @__PURE__ */ F("div", {
889
+ return /* @__PURE__ */ I("div", {
877
890
  className: "w-80 overflow-hidden rounded-xl border border-arco-border-2 bg-arco-bg-popup shadow-[0_10px_28px_rgb(0_0_0/12%)]",
878
891
  children: [
879
- /* @__PURE__ */ F("div", {
892
+ /* @__PURE__ */ I("div", {
880
893
  className: "flex items-center gap-3 px-6 pt-5 pb-4",
881
- children: [/* @__PURE__ */ P($, {
894
+ children: [/* @__PURE__ */ F($, {
882
895
  user: e,
883
896
  size: 48,
884
897
  className: "shrink-0"
885
- }), /* @__PURE__ */ F("div", {
898
+ }), /* @__PURE__ */ I("div", {
886
899
  className: "flex min-w-0 flex-1 flex-col gap-1",
887
- children: [/* @__PURE__ */ F("div", {
900
+ children: [/* @__PURE__ */ I("div", {
888
901
  className: "flex min-w-0 items-center gap-1.5",
889
- children: [/* @__PURE__ */ P("span", {
902
+ children: [/* @__PURE__ */ F("span", {
890
903
  className: "text-arco-text-1 truncate text-base leading-6 font-bold",
891
904
  children: e?.nickname || e?.username
892
- }), /* @__PURE__ */ P(o, {
905
+ }), /* @__PURE__ */ F(o, {
893
906
  type: "text",
894
907
  size: "mini",
895
- icon: /* @__PURE__ */ P(E, {}),
908
+ icon: /* @__PURE__ */ F(E, {}),
896
909
  className: "text-arco-text-3 h-6! min-w-6! px-0!",
897
910
  onClick: r
898
911
  })]
899
- }), e?.email ? /* @__PURE__ */ P("span", {
912
+ }), e?.email ? /* @__PURE__ */ F("span", {
900
913
  className: "text-arco-text-3 truncate text-xs leading-5",
901
914
  children: e.email
902
915
  }) : null]
903
916
  })]
904
917
  }),
905
- /* @__PURE__ */ P(l, { className: "m-0!" }),
906
- /* @__PURE__ */ F("ul", {
918
+ /* @__PURE__ */ F(l, { className: "m-0!" }),
919
+ /* @__PURE__ */ I("ul", {
907
920
  className: "flex flex-col gap-3.5 px-6 py-4",
908
921
  children: [
909
- /* @__PURE__ */ F("li", {
922
+ /* @__PURE__ */ I("li", {
910
923
  className: "text-arco-text-2 flex items-center justify-between gap-4 text-sm",
911
- children: [/* @__PURE__ */ P("span", { children: n.myPoints }), /* @__PURE__ */ P("strong", {
924
+ children: [/* @__PURE__ */ F("span", { children: n.myPoints }), /* @__PURE__ */ F("strong", {
912
925
  className: "text-arco-primary-6 text-base font-bold",
913
926
  children: c(t.total)
914
927
  })]
915
928
  }),
916
- /* @__PURE__ */ F("li", {
929
+ /* @__PURE__ */ I("li", {
917
930
  className: "text-arco-text-2 flex items-center justify-between gap-4 text-sm",
918
- children: [/* @__PURE__ */ P("span", { children: n.rechargePoints }), /* @__PURE__ */ P("strong", {
931
+ children: [/* @__PURE__ */ F("span", { children: n.rechargePoints }), /* @__PURE__ */ F("strong", {
919
932
  className: "text-arco-text-1 text-base font-bold",
920
933
  children: c(t.recharge)
921
934
  })]
922
935
  }),
923
- /* @__PURE__ */ F("li", {
936
+ /* @__PURE__ */ I("li", {
924
937
  className: "text-arco-text-2 flex items-center justify-between gap-4 text-sm",
925
- children: [/* @__PURE__ */ P("span", { children: n.giftedPoints }), /* @__PURE__ */ P("strong", {
938
+ children: [/* @__PURE__ */ F("span", { children: n.giftedPoints }), /* @__PURE__ */ F("strong", {
926
939
  className: "text-arco-text-1 text-base font-bold",
927
940
  children: c(t.gifted)
928
941
  })]
929
942
  })
930
943
  ]
931
944
  }),
932
- /* @__PURE__ */ P(l, { className: "m-0!" }),
933
- /* @__PURE__ */ F("div", {
945
+ /* @__PURE__ */ F(l, { className: "m-0!" }),
946
+ /* @__PURE__ */ I("div", {
934
947
  className: "flex flex-col gap-2 px-6 py-4",
935
- children: [/* @__PURE__ */ P(o, {
948
+ children: [/* @__PURE__ */ F(o, {
936
949
  type: "primary",
937
950
  long: !0,
938
- icon: /* @__PURE__ */ P(k, {}),
951
+ icon: /* @__PURE__ */ F(A, {}),
939
952
  className: "h-10! rounded-md! font-semibold!",
940
953
  onClick: i,
941
954
  children: n.recharge
942
- }), /* @__PURE__ */ P(o, {
955
+ }), /* @__PURE__ */ F(o, {
943
956
  long: !0,
944
- icon: /* @__PURE__ */ P(D, {}),
957
+ icon: /* @__PURE__ */ F(D, {}),
945
958
  className: "border-arco-border-2! bg-arco-fill-1! text-arco-text-1! h-10! rounded-md! font-semibold!",
946
959
  onClick: a,
947
960
  children: n.pointsDetail
948
961
  })]
949
962
  }),
950
- /* @__PURE__ */ P(l, { className: "m-0!" }),
951
- /* @__PURE__ */ P("div", {
963
+ /* @__PURE__ */ F(l, { className: "m-0!" }),
964
+ /* @__PURE__ */ F("div", {
952
965
  className: "px-6 py-4",
953
- children: /* @__PURE__ */ P(o, {
954
- icon: /* @__PURE__ */ P(A, {}),
966
+ children: /* @__PURE__ */ F(o, {
967
+ icon: /* @__PURE__ */ F(j, {}),
955
968
  type: "text",
956
969
  status: "danger",
957
970
  long: !0,
@@ -965,189 +978,189 @@ function Fe({ user: e, points: t, text: n, onEditProfile: r, onRecharge: i, onPo
965
978
  }
966
979
  //#endregion
967
980
  //#region src/header/ManturHeader.tsx
968
- var Ie = "https://mantur.ai/images/logo.png", Le = [
981
+ var Ye = "https://mantur.ai/images/logo.png", Xe = [
969
982
  "from-arco-primary-light-1 to-arco-primary-light-2 text-arco-primary-6",
970
983
  "from-arco-success-light-1 to-arco-success-light-2 text-arco-success-6",
971
984
  "from-arco-warning-light-1 to-arco-warning-light-2 text-arco-warning-6",
972
985
  "from-arco-danger-light-1 to-arco-danger-light-2 text-arco-danger-6"
973
986
  ];
974
- function Re(e, t = !1) {
975
- return `flex h-8 min-h-8 w-8 min-w-8 flex-none items-center justify-center rounded-lg bg-linear-to-br font-bold leading-none ${Le[e % Le.length]} ${t ? "shadow-[inset_0_1px_3px_rgb(0_0_0/8%)]" : ""}`;
987
+ function Ze(e, t = !1) {
988
+ return `flex h-8 min-h-8 w-8 min-w-8 flex-none items-center justify-center rounded-lg bg-linear-to-br font-bold leading-none ${Xe[e % Xe.length]} ${t ? "shadow-[inset_0_1px_3px_rgb(0_0_0/8%)]" : ""}`;
976
989
  }
977
- function ze(e) {
990
+ function Qe(e) {
978
991
  return e?.tenantName?.[0]?.toUpperCase() || "T";
979
992
  }
980
- function Be(e, t, n) {
993
+ function $e(e, t, n) {
981
994
  let r = e?.roles?.map((e) => e.roleName).filter(Boolean);
982
995
  return r?.length ? r.join(", ") : e?.isOwner ? t : n;
983
996
  }
984
- function Ve({ user: a, disabled: o = !1, brandSlot: s, children: c, onTenantContextChange: l }) {
985
- let [d, f] = i(() => X()), p = Z(d), [g, _] = i(!1), [v, y] = i(!1), [b, x] = i(!1), [S, C] = i(a), [w, E] = i([]), [D, O] = i(), [ee, k] = i(!1), A = r(l), [j, M] = i({
997
+ function et({ user: a, disabled: o = !1, brandSlot: s, children: c, onTenantContextChange: l }) {
998
+ let [d, f] = i(() => Y()), p = X(d), [g, _] = i(!1), [v, y] = i(!1), [b, x] = i(!1), [S, C] = i(a), [w, E] = i([]), [D, O] = i(), [k, A] = i(!1), j = r(l), [M, N] = i({
986
999
  total: 0,
987
1000
  recharge: 0,
988
1001
  gifted: 0
989
- }), N = D?.tenantId || "", I = o, L = {
990
- total: j.total ?? 0,
991
- recharge: j.recharge ?? 0,
992
- gifted: j.gifted ?? 0
993
- }, te = async (e) => {
994
- let t = await ae(e);
1002
+ }), P = D?.tenantId || "", L = o, R = {
1003
+ total: M.total ?? 0,
1004
+ recharge: M.recharge ?? 0,
1005
+ gifted: M.gifted ?? 0
1006
+ }, z = async (e) => {
1007
+ let t = await me(e);
995
1008
  return t && C(t), t;
996
1009
  };
997
1010
  t(() => {
998
1011
  C(a);
999
1012
  }, [a]), t(() => {
1000
- A.current = l;
1013
+ j.current = l;
1001
1014
  }, [l]);
1002
- let z = e((e) => {
1003
- E(e.tenants), O(e.currentTenant), A.current?.(e);
1015
+ let B = e((e) => {
1016
+ E(e.tenants), O(e.currentTenant), j.current?.(e);
1004
1017
  }, []);
1005
1018
  t(() => {
1006
- k(!0), de().then(z).catch((e) => {
1019
+ A(!0), xe().then(B).catch((e) => {
1007
1020
  console.warn("Failed to refresh Mantur tenant context.", e), h.error(p.error);
1008
- }).finally(() => k(!1));
1009
- }, [z, p.error]), t(() => {
1021
+ }).finally(() => A(!1));
1022
+ }, [B, p.error]), t(() => {
1010
1023
  let e = (e) => {
1011
- e instanceof CustomEvent && M(e.detail);
1024
+ e instanceof CustomEvent && N(e.detail);
1012
1025
  };
1013
- return window.addEventListener(R, e), G().catch((e) => {
1026
+ return window.addEventListener(H, e), G().catch((e) => {
1014
1027
  console.warn("Failed to refresh Mantur user points.", e);
1015
1028
  }), () => {
1016
- window.removeEventListener(R, e);
1029
+ window.removeEventListener(H, e);
1017
1030
  };
1018
1031
  }, []), t(() => {
1019
1032
  let e = (e) => {
1020
- f(e instanceof CustomEvent ? Y(e.detail) : X());
1033
+ f(e instanceof CustomEvent ? J(e.detail) : Y());
1021
1034
  };
1022
- return window.addEventListener(J, e), window.addEventListener("storage", e), () => {
1023
- window.removeEventListener(J, e), window.removeEventListener("storage", e);
1035
+ return window.addEventListener(q, e), window.addEventListener("storage", e), () => {
1036
+ window.removeEventListener(q, e), window.removeEventListener("storage", e);
1024
1037
  };
1025
1038
  }, []);
1026
- let ne = (e) => {
1039
+ let ee = (e) => {
1027
1040
  h.success(e);
1028
- }, re = (e, t) => {
1041
+ }, te = (e, t) => {
1029
1042
  console.error(t), h.error(e);
1030
- }, B = e(async (e) => {
1031
- if (!I && e !== N) try {
1032
- k(!0), z(await fe(e)), ne(p.switchedToTeam);
1043
+ }, V = e(async (e) => {
1044
+ if (!L && e !== P) try {
1045
+ A(!0), B(await Se(e)), ee(p.switchedToTeam);
1033
1046
  } catch (e) {
1034
- re(p.error, e);
1047
+ te(p.error, e);
1035
1048
  } finally {
1036
- k(!1);
1049
+ A(!1);
1037
1050
  }
1038
1051
  }, [
1039
- z,
1040
- N,
1041
- I,
1052
+ B,
1053
+ P,
1054
+ L,
1042
1055
  p.error,
1043
1056
  p.switchedToTeam
1044
- ]), V = (e) => {
1057
+ ]), ne = (e) => {
1045
1058
  let t = {
1046
- total: L.total + e.points,
1047
- recharge: L.recharge + e.points,
1048
- gifted: L.gifted
1059
+ total: R.total + e.points,
1060
+ recharge: R.recharge + e.points,
1061
+ gifted: R.gifted
1049
1062
  };
1050
- M(t), window.dispatchEvent(new CustomEvent(R, { detail: t })), h.success(p.rechargeSuccess), y(!1);
1051
- }, H = n(() => /* @__PURE__ */ F(m, {
1063
+ N(t), window.dispatchEvent(new CustomEvent(H, { detail: t })), h.success(p.rechargeSuccess), y(!1);
1064
+ }, re = n(() => /* @__PURE__ */ I(m, {
1052
1065
  className: "w-56 rounded-xl bg-arco-bg-popup shadow-[0_10px_28px_rgb(0_0_0/12%)] [&_.arco-menu-inner]:px-2 [&_.arco-menu-inner]:py-1",
1053
- selectedKeys: N ? [N] : [],
1054
- onClickMenuItem: B,
1055
- children: [/* @__PURE__ */ P("div", {
1066
+ selectedKeys: P ? [P] : [],
1067
+ onClickMenuItem: V,
1068
+ children: [/* @__PURE__ */ F("div", {
1056
1069
  className: "px-3 py-2 text-xs font-semibold tracking-[0.04em] text-arco-text-4 uppercase",
1057
1070
  children: p.switchTeam
1058
- }), w.map((e, t) => /* @__PURE__ */ P(m.Item, {
1071
+ }), w.map((e, t) => /* @__PURE__ */ F(m.Item, {
1059
1072
  className: "mb-1 h-auto! min-h-10! overflow-visible! rounded-lg! px-2! py-1! leading-normal!",
1060
- children: /* @__PURE__ */ F("div", {
1073
+ children: /* @__PURE__ */ I("div", {
1061
1074
  className: "flex w-full items-center gap-3 leading-normal",
1062
- children: [/* @__PURE__ */ P("div", {
1063
- className: Re(t),
1064
- children: ze(e)
1065
- }), /* @__PURE__ */ F("div", {
1075
+ children: [/* @__PURE__ */ F("div", {
1076
+ className: Ze(t),
1077
+ children: Qe(e)
1078
+ }), /* @__PURE__ */ I("div", {
1066
1079
  className: "flex min-w-0 flex-col justify-center gap-0.75",
1067
- children: [/* @__PURE__ */ P("span", {
1080
+ children: [/* @__PURE__ */ F("span", {
1068
1081
  className: "text-sm leading-5 font-medium text-arco-text-1",
1069
1082
  children: e.tenantName
1070
- }), /* @__PURE__ */ P("span", {
1083
+ }), /* @__PURE__ */ F("span", {
1071
1084
  className: "text-xs leading-4 text-arco-text-3",
1072
- children: Be(e, p.owner, p.member)
1085
+ children: $e(e, p.owner, p.member)
1073
1086
  })]
1074
1087
  })]
1075
1088
  })
1076
1089
  }, e.tenantId))]
1077
1090
  }), [
1078
- B,
1079
- N,
1091
+ V,
1092
+ P,
1080
1093
  w,
1081
1094
  p
1082
- ]), U = /* @__PURE__ */ P(Fe, {
1095
+ ]), ie = /* @__PURE__ */ F(Je, {
1083
1096
  user: S,
1084
- points: L,
1097
+ points: R,
1085
1098
  text: p,
1086
1099
  onEditProfile: () => _(!0),
1087
1100
  onRecharge: () => y(!0),
1088
1101
  onPointsDetail: () => x(!0),
1089
- onLogout: ie
1090
- }), oe = Math.max(0, w.findIndex((e) => e.tenantId === D?.tenantId));
1091
- return /* @__PURE__ */ F("div", {
1102
+ onLogout: pe
1103
+ }), ae = Math.max(0, w.findIndex((e) => e.tenantId === D?.tenantId));
1104
+ return /* @__PURE__ */ I("div", {
1092
1105
  className: "flex h-20 items-center justify-between bg-transparent pr-8 shadow-[0_2px_10px_rgb(0_0_0/2%)] backdrop-blur-md max-md:pr-4",
1093
1106
  children: [
1094
- /* @__PURE__ */ F("div", {
1107
+ /* @__PURE__ */ I("div", {
1095
1108
  className: "flex items-center gap-6",
1096
- children: [/* @__PURE__ */ F("div", {
1109
+ children: [/* @__PURE__ */ I("div", {
1097
1110
  className: "flex w-65 items-center gap-3 px-8 max-md:w-auto max-md:px-4",
1098
- children: [/* @__PURE__ */ P("div", {
1111
+ children: [/* @__PURE__ */ F("div", {
1099
1112
  className: "relative flex w-12 items-center justify-center overflow-hidden ",
1100
- children: /* @__PURE__ */ P("img", {
1101
- src: Ie,
1113
+ children: /* @__PURE__ */ F("img", {
1114
+ src: Ye,
1102
1115
  alt: "logo",
1103
1116
  className: "w-full object-contain",
1104
1117
  onError: (e) => {
1105
1118
  e.currentTarget.style.display = "none";
1106
1119
  }
1107
1120
  })
1108
- }), s ?? /* @__PURE__ */ P("span", {
1121
+ }), s ?? /* @__PURE__ */ F("span", {
1109
1122
  className: "text-lg font-bold tracking-normal text-arco-text-1",
1110
1123
  children: p.title
1111
1124
  })]
1112
- }), /* @__PURE__ */ P(u, {
1113
- droplist: H,
1125
+ }), /* @__PURE__ */ F(u, {
1126
+ droplist: re,
1114
1127
  trigger: "click",
1115
1128
  position: "bl",
1116
- disabled: I,
1117
- children: /* @__PURE__ */ F("div", {
1118
- "aria-disabled": I,
1119
- className: `flex items-center gap-3 rounded-full border border-arco-border-1 bg-arco-bg-1 px-2 py-1.5 transition-all ${I ? "cursor-not-allowed opacity-60" : "cursor-pointer hover:bg-arco-fill-2 hover:shadow-[0_4px_12px_rgb(0_0_0/8%)]"}`,
1129
+ disabled: L,
1130
+ children: /* @__PURE__ */ I("div", {
1131
+ "aria-disabled": L,
1132
+ className: `flex items-center gap-3 rounded-full border border-arco-border-1 bg-arco-bg-1 px-2 py-1.5 transition-all ${L ? "cursor-not-allowed opacity-60" : "cursor-pointer hover:bg-arco-fill-2 hover:shadow-[0_4px_12px_rgb(0_0_0/8%)]"}`,
1120
1133
  children: [
1121
- /* @__PURE__ */ P("div", {
1122
- className: Re(oe, !0),
1123
- children: ze(D)
1124
- }),
1125
1134
  /* @__PURE__ */ F("div", {
1135
+ className: Ze(ae, !0),
1136
+ children: Qe(D)
1137
+ }),
1138
+ /* @__PURE__ */ I("div", {
1126
1139
  className: "flex min-w-0 flex-col",
1127
- children: [/* @__PURE__ */ P("span", {
1140
+ children: [/* @__PURE__ */ F("span", {
1128
1141
  className: "text-xs leading-none font-bold text-arco-text-1",
1129
- children: ee ? p.loading : D?.tenantName || p.loading
1130
- }), /* @__PURE__ */ P("span", {
1142
+ children: k ? p.loading : D?.tenantName || p.loading
1143
+ }), /* @__PURE__ */ F("span", {
1131
1144
  className: "mt-1 text-[10px] leading-none text-arco-text-3",
1132
- children: Be(D, p.owner, p.member)
1145
+ children: $e(D, p.owner, p.member)
1133
1146
  })]
1134
1147
  }),
1135
- /* @__PURE__ */ P(T, { className: "ml-1 text-arco-text-3" })
1148
+ /* @__PURE__ */ F(T, { className: "ml-1 text-arco-text-3" })
1136
1149
  ]
1137
1150
  })
1138
1151
  })]
1139
1152
  }),
1140
- /* @__PURE__ */ P("div", {
1153
+ /* @__PURE__ */ F("div", {
1141
1154
  className: "flex-1",
1142
1155
  children: c
1143
1156
  }),
1144
- /* @__PURE__ */ F("div", {
1157
+ /* @__PURE__ */ I("div", {
1145
1158
  className: "flex items-center gap-4",
1146
- children: [/* @__PURE__ */ F("div", {
1159
+ children: [/* @__PURE__ */ I("div", {
1147
1160
  className: "flex items-center gap-4",
1148
- children: [/* @__PURE__ */ P(Se, {}), /* @__PURE__ */ P(xe, {})]
1149
- }), /* @__PURE__ */ P(u, {
1150
- droplist: U,
1161
+ children: [/* @__PURE__ */ F(Pe, {}), /* @__PURE__ */ F(Ne, {})]
1162
+ }), /* @__PURE__ */ F(u, {
1163
+ droplist: ie,
1151
1164
  trigger: "click",
1152
1165
  position: "br",
1153
1166
  onVisibleChange: (e) => {
@@ -1155,46 +1168,46 @@ function Ve({ user: a, disabled: o = !1, brandSlot: s, children: c, onTenantCont
1155
1168
  console.warn("Failed to refresh Mantur user points.", e);
1156
1169
  });
1157
1170
  },
1158
- children: /* @__PURE__ */ F("div", {
1171
+ children: /* @__PURE__ */ I("div", {
1159
1172
  className: "hover:bg-arco-fill-2 flex cursor-pointer items-center gap-2.5 rounded-full border border-transparent p-1 pr-2 transition-all",
1160
1173
  children: [
1161
- /* @__PURE__ */ F("div", {
1174
+ /* @__PURE__ */ I("div", {
1162
1175
  className: "from-arco-primary to-transparent relative rounded-full bg-linear-to-br p-0.5 shadow-sm",
1163
- children: [/* @__PURE__ */ P($, {
1176
+ children: [/* @__PURE__ */ F($, {
1164
1177
  user: S,
1165
1178
  size: 36
1166
- }), /* @__PURE__ */ P("div", { className: "bg-arco-success border-arco-bg-white absolute right-0 bottom-0 h-3 w-3 rounded-full border-2 shadow-sm" })]
1179
+ }), /* @__PURE__ */ F("div", { className: "bg-arco-success border-arco-bg-white absolute right-0 bottom-0 h-3 w-3 rounded-full border-2 shadow-sm" })]
1167
1180
  }),
1168
- /* @__PURE__ */ P("div", {
1181
+ /* @__PURE__ */ F("div", {
1169
1182
  className: "hidden flex-col md:flex",
1170
- children: /* @__PURE__ */ P("span", {
1183
+ children: /* @__PURE__ */ F("span", {
1171
1184
  className: "text-arco-text-1 text-sm font-medium",
1172
1185
  children: S?.nickname || S?.username
1173
1186
  })
1174
1187
  }),
1175
- /* @__PURE__ */ P(T, { className: "text-arco-text-3 ml-1" })
1188
+ /* @__PURE__ */ F(T, { className: "text-arco-text-3 ml-1" })
1176
1189
  ]
1177
1190
  })
1178
1191
  })]
1179
1192
  }),
1180
- /* @__PURE__ */ P(Me, {
1193
+ /* @__PURE__ */ F(Ge, {
1181
1194
  visible: g,
1182
1195
  user: S,
1183
1196
  labels: p,
1184
1197
  onCancel: () => _(!1),
1185
- onSubmit: te
1198
+ onSubmit: z
1186
1199
  }),
1187
- /* @__PURE__ */ P(Pe, {
1200
+ /* @__PURE__ */ F(qe, {
1188
1201
  visible: v,
1189
1202
  user: S,
1190
- points: L,
1203
+ points: R,
1191
1204
  text: p,
1192
1205
  onCancel: () => y(!1),
1193
- onPay: V
1206
+ onPay: ne
1194
1207
  }),
1195
- /* @__PURE__ */ P(Oe, {
1208
+ /* @__PURE__ */ F(Be, {
1196
1209
  visible: b,
1197
- points: L,
1210
+ points: R,
1198
1211
  text: p,
1199
1212
  onCancel: () => x(!1),
1200
1213
  onRecharge: () => y(!0)
@@ -1203,4 +1216,306 @@ function Ve({ user: a, disabled: o = !1, brandSlot: s, children: c, onTenantCont
1203
1216
  });
1204
1217
  }
1205
1218
  //#endregion
1206
- export { ye as LANGUAGE_SOURCE_STORAGE_KEY, ve as LANGUAGE_STORAGE_KEY, xe as LangSwitch, J as MANTUR_LANGUAGE_CHANGE_EVENT, ge as MANTUR_LANGUAGE_SOURCE_STORAGE_KEY, he as MANTUR_LANGUAGE_STORAGE_KEY, _e as MANTUR_MESSAGES, R as MANTUR_POINTS_REFRESH_EVENT, z as MANTUR_TENANT_CONTEXT_CHANGE_EVENT, Ve as ManturHeader, Se as ThemeSwitch, q as getManturCurrentTenant, Z as getManturMessages, le as getManturTenantContextSnapshot, K as getManturTenants, W as getManturUserPoints, X as getStoredManturLocale, Y as normalizeManturLocale, de as refreshManturTenantContext, G as refreshManturUserPoints, fe as switchAndRefreshManturTenant, ue as switchManturTenant };
1219
+ //#region src/utils/date.ts
1220
+ var tt = /* @__PURE__ */ ie((/* @__PURE__ */ ne(((e, t) => {
1221
+ (function(n, r) {
1222
+ typeof e == "object" && t !== void 0 ? t.exports = r() : typeof define == "function" && define.amd ? define(r) : (n = typeof globalThis < "u" ? globalThis : n || self).dayjs = r();
1223
+ })(e, (function() {
1224
+ var e = 1e3, t = 6e4, n = 36e5, r = "millisecond", i = "second", a = "minute", o = "hour", s = "day", c = "week", l = "month", u = "quarter", d = "year", f = "date", p = "Invalid Date", m = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, h = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, g = {
1225
+ name: "en",
1226
+ weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),
1227
+ months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"),
1228
+ ordinal: function(e) {
1229
+ var t = [
1230
+ "th",
1231
+ "st",
1232
+ "nd",
1233
+ "rd"
1234
+ ], n = e % 100;
1235
+ return "[" + e + (t[(n - 20) % 10] || t[n] || t[0]) + "]";
1236
+ }
1237
+ }, _ = function(e, t, n) {
1238
+ var r = String(e);
1239
+ return !r || r.length >= t ? e : "" + Array(t + 1 - r.length).join(n) + e;
1240
+ }, v = {
1241
+ s: _,
1242
+ z: function(e) {
1243
+ var t = -e.utcOffset(), n = Math.abs(t), r = Math.floor(n / 60), i = n % 60;
1244
+ return (t <= 0 ? "+" : "-") + _(r, 2, "0") + ":" + _(i, 2, "0");
1245
+ },
1246
+ m: function e(t, n) {
1247
+ if (t.date() < n.date()) return -e(n, t);
1248
+ var r = 12 * (n.year() - t.year()) + (n.month() - t.month()), i = t.clone().add(r, l), a = n - i < 0, o = t.clone().add(r + (a ? -1 : 1), l);
1249
+ return +(-(r + (n - i) / (a ? i - o : o - i)) || 0);
1250
+ },
1251
+ a: function(e) {
1252
+ return e < 0 ? Math.ceil(e) || 0 : Math.floor(e);
1253
+ },
1254
+ p: function(e) {
1255
+ return {
1256
+ M: l,
1257
+ y: d,
1258
+ w: c,
1259
+ d: s,
1260
+ D: f,
1261
+ h: o,
1262
+ m: a,
1263
+ s: i,
1264
+ ms: r,
1265
+ Q: u
1266
+ }[e] || String(e || "").toLowerCase().replace(/s$/, "");
1267
+ },
1268
+ u: function(e) {
1269
+ return e === void 0;
1270
+ }
1271
+ }, y = "en", b = {};
1272
+ b[y] = g;
1273
+ var x = "$isDayjsObject", S = function(e) {
1274
+ return e instanceof E || !(!e || !e[x]);
1275
+ }, C = function e(t, n, r) {
1276
+ var i;
1277
+ if (!t) return y;
1278
+ if (typeof t == "string") {
1279
+ var a = t.toLowerCase();
1280
+ b[a] && (i = a), n && (b[a] = n, i = a);
1281
+ var o = t.split("-");
1282
+ if (!i && o.length > 1) return e(o[0]);
1283
+ } else {
1284
+ var s = t.name;
1285
+ b[s] = t, i = s;
1286
+ }
1287
+ return !r && i && (y = i), i || !r && y;
1288
+ }, w = function(e, t) {
1289
+ if (S(e)) return e.clone();
1290
+ var n = typeof t == "object" ? t : {};
1291
+ return n.date = e, n.args = arguments, new E(n);
1292
+ }, T = v;
1293
+ T.l = C, T.i = S, T.w = function(e, t) {
1294
+ return w(e, {
1295
+ locale: t.$L,
1296
+ utc: t.$u,
1297
+ x: t.$x,
1298
+ $offset: t.$offset
1299
+ });
1300
+ };
1301
+ var E = function() {
1302
+ function g(e) {
1303
+ this.$L = C(e.locale, null, !0), this.parse(e), this.$x = this.$x || e.x || {}, this[x] = !0;
1304
+ }
1305
+ var _ = g.prototype;
1306
+ return _.parse = function(e) {
1307
+ this.$d = function(e) {
1308
+ var t = e.date, n = e.utc;
1309
+ if (t === null) return /* @__PURE__ */ new Date(NaN);
1310
+ if (T.u(t)) return /* @__PURE__ */ new Date();
1311
+ if (t instanceof Date) return new Date(t);
1312
+ if (typeof t == "string" && !/Z$/i.test(t)) {
1313
+ var r = t.match(m);
1314
+ if (r) {
1315
+ var i = r[2] - 1 || 0, a = (r[7] || "0").substring(0, 3);
1316
+ return n ? new Date(Date.UTC(r[1], i, r[3] || 1, r[4] || 0, r[5] || 0, r[6] || 0, a)) : new Date(r[1], i, r[3] || 1, r[4] || 0, r[5] || 0, r[6] || 0, a);
1317
+ }
1318
+ }
1319
+ return new Date(t);
1320
+ }(e), this.init();
1321
+ }, _.init = function() {
1322
+ var e = this.$d;
1323
+ this.$y = e.getFullYear(), this.$M = e.getMonth(), this.$D = e.getDate(), this.$W = e.getDay(), this.$H = e.getHours(), this.$m = e.getMinutes(), this.$s = e.getSeconds(), this.$ms = e.getMilliseconds();
1324
+ }, _.$utils = function() {
1325
+ return T;
1326
+ }, _.isValid = function() {
1327
+ return this.$d.toString() !== p;
1328
+ }, _.isSame = function(e, t) {
1329
+ var n = w(e);
1330
+ return this.startOf(t) <= n && n <= this.endOf(t);
1331
+ }, _.isAfter = function(e, t) {
1332
+ return w(e) < this.startOf(t);
1333
+ }, _.isBefore = function(e, t) {
1334
+ return this.endOf(t) < w(e);
1335
+ }, _.$g = function(e, t, n) {
1336
+ return T.u(e) ? this[t] : this.set(n, e);
1337
+ }, _.unix = function() {
1338
+ return Math.floor(this.valueOf() / 1e3);
1339
+ }, _.valueOf = function() {
1340
+ return this.$d.getTime();
1341
+ }, _.startOf = function(e, t) {
1342
+ var n = this, r = !!T.u(t) || t, u = T.p(e), p = function(e, t) {
1343
+ var i = T.w(n.$u ? Date.UTC(n.$y, t, e) : new Date(n.$y, t, e), n);
1344
+ return r ? i : i.endOf(s);
1345
+ }, m = function(e, t) {
1346
+ return T.w(n.toDate()[e].apply(n.toDate("s"), (r ? [
1347
+ 0,
1348
+ 0,
1349
+ 0,
1350
+ 0
1351
+ ] : [
1352
+ 23,
1353
+ 59,
1354
+ 59,
1355
+ 999
1356
+ ]).slice(t)), n);
1357
+ }, h = this.$W, g = this.$M, _ = this.$D, v = "set" + (this.$u ? "UTC" : "");
1358
+ switch (u) {
1359
+ case d: return r ? p(1, 0) : p(31, 11);
1360
+ case l: return r ? p(1, g) : p(0, g + 1);
1361
+ case c:
1362
+ var y = this.$locale().weekStart || 0, b = (h < y ? h + 7 : h) - y;
1363
+ return p(r ? _ - b : _ + (6 - b), g);
1364
+ case s:
1365
+ case f: return m(v + "Hours", 0);
1366
+ case o: return m(v + "Minutes", 1);
1367
+ case a: return m(v + "Seconds", 2);
1368
+ case i: return m(v + "Milliseconds", 3);
1369
+ default: return this.clone();
1370
+ }
1371
+ }, _.endOf = function(e) {
1372
+ return this.startOf(e, !1);
1373
+ }, _.$set = function(e, t) {
1374
+ var n, c = T.p(e), u = "set" + (this.$u ? "UTC" : ""), p = (n = {}, n[s] = u + "Date", n[f] = u + "Date", n[l] = u + "Month", n[d] = u + "FullYear", n[o] = u + "Hours", n[a] = u + "Minutes", n[i] = u + "Seconds", n[r] = u + "Milliseconds", n)[c], m = c === s ? this.$D + (t - this.$W) : t;
1375
+ if (c === l || c === d) {
1376
+ var h = this.clone().set(f, 1);
1377
+ h.$d[p](m), h.init(), this.$d = h.set(f, Math.min(this.$D, h.daysInMonth())).$d;
1378
+ } else p && this.$d[p](m);
1379
+ return this.init(), this;
1380
+ }, _.set = function(e, t) {
1381
+ return this.clone().$set(e, t);
1382
+ }, _.get = function(e) {
1383
+ return this[T.p(e)]();
1384
+ }, _.add = function(r, u) {
1385
+ var f, p = this;
1386
+ r = Number(r);
1387
+ var m = T.p(u), h = function(e) {
1388
+ var t = w(p);
1389
+ return T.w(t.date(t.date() + Math.round(e * r)), p);
1390
+ };
1391
+ if (m === l) return this.set(l, this.$M + r);
1392
+ if (m === d) return this.set(d, this.$y + r);
1393
+ if (m === s) return h(1);
1394
+ if (m === c) return h(7);
1395
+ var g = (f = {}, f[a] = t, f[o] = n, f[i] = e, f)[m] || 1, _ = this.$d.getTime() + r * g;
1396
+ return T.w(_, this);
1397
+ }, _.subtract = function(e, t) {
1398
+ return this.add(-1 * e, t);
1399
+ }, _.format = function(e) {
1400
+ var t = this, n = this.$locale();
1401
+ if (!this.isValid()) return n.invalidDate || p;
1402
+ var r = e || "YYYY-MM-DDTHH:mm:ssZ", i = T.z(this), a = this.$H, o = this.$m, s = this.$M, c = n.weekdays, l = n.months, u = n.meridiem, d = function(e, n, i, a) {
1403
+ return e && (e[n] || e(t, r)) || i[n].slice(0, a);
1404
+ }, f = function(e) {
1405
+ return T.s(a % 12 || 12, e, "0");
1406
+ }, m = u || function(e, t, n) {
1407
+ var r = e < 12 ? "AM" : "PM";
1408
+ return n ? r.toLowerCase() : r;
1409
+ };
1410
+ return r.replace(h, (function(e, r) {
1411
+ return r || function(e) {
1412
+ switch (e) {
1413
+ case "YY": return String(t.$y).slice(-2);
1414
+ case "YYYY": return T.s(t.$y, 4, "0");
1415
+ case "M": return s + 1;
1416
+ case "MM": return T.s(s + 1, 2, "0");
1417
+ case "MMM": return d(n.monthsShort, s, l, 3);
1418
+ case "MMMM": return d(l, s);
1419
+ case "D": return t.$D;
1420
+ case "DD": return T.s(t.$D, 2, "0");
1421
+ case "d": return String(t.$W);
1422
+ case "dd": return d(n.weekdaysMin, t.$W, c, 2);
1423
+ case "ddd": return d(n.weekdaysShort, t.$W, c, 3);
1424
+ case "dddd": return c[t.$W];
1425
+ case "H": return String(a);
1426
+ case "HH": return T.s(a, 2, "0");
1427
+ case "h": return f(1);
1428
+ case "hh": return f(2);
1429
+ case "a": return m(a, o, !0);
1430
+ case "A": return m(a, o, !1);
1431
+ case "m": return String(o);
1432
+ case "mm": return T.s(o, 2, "0");
1433
+ case "s": return String(t.$s);
1434
+ case "ss": return T.s(t.$s, 2, "0");
1435
+ case "SSS": return T.s(t.$ms, 3, "0");
1436
+ case "Z": return i;
1437
+ }
1438
+ return null;
1439
+ }(e) || i.replace(":", "");
1440
+ }));
1441
+ }, _.utcOffset = function() {
1442
+ return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
1443
+ }, _.diff = function(r, f, p) {
1444
+ var m, h = this, g = T.p(f), _ = w(r), v = (_.utcOffset() - this.utcOffset()) * t, y = this - _, b = function() {
1445
+ return T.m(h, _);
1446
+ };
1447
+ switch (g) {
1448
+ case d:
1449
+ m = b() / 12;
1450
+ break;
1451
+ case l:
1452
+ m = b();
1453
+ break;
1454
+ case u:
1455
+ m = b() / 3;
1456
+ break;
1457
+ case c:
1458
+ m = (y - v) / 6048e5;
1459
+ break;
1460
+ case s:
1461
+ m = (y - v) / 864e5;
1462
+ break;
1463
+ case o:
1464
+ m = y / n;
1465
+ break;
1466
+ case a:
1467
+ m = y / t;
1468
+ break;
1469
+ case i:
1470
+ m = y / e;
1471
+ break;
1472
+ default: m = y;
1473
+ }
1474
+ return p ? m : T.a(m);
1475
+ }, _.daysInMonth = function() {
1476
+ return this.endOf(l).$D;
1477
+ }, _.$locale = function() {
1478
+ return b[this.$L];
1479
+ }, _.locale = function(e, t) {
1480
+ if (!e) return this.$L;
1481
+ var n = this.clone(), r = C(e, t, !0);
1482
+ return r && (n.$L = r), n;
1483
+ }, _.clone = function() {
1484
+ return T.w(this.$d, this);
1485
+ }, _.toDate = function() {
1486
+ return new Date(this.valueOf());
1487
+ }, _.toJSON = function() {
1488
+ return this.isValid() ? this.toISOString() : null;
1489
+ }, _.toISOString = function() {
1490
+ return this.$d.toISOString();
1491
+ }, _.toString = function() {
1492
+ return this.$d.toUTCString();
1493
+ }, g;
1494
+ }(), D = E.prototype;
1495
+ return w.prototype = D, [
1496
+ ["$ms", r],
1497
+ ["$s", i],
1498
+ ["$m", a],
1499
+ ["$H", o],
1500
+ ["$W", s],
1501
+ ["$M", l],
1502
+ ["$y", d],
1503
+ ["$D", f]
1504
+ ].forEach((function(e) {
1505
+ D[e[1]] = function(t) {
1506
+ return this.$g(t, e[0], e[1]);
1507
+ };
1508
+ })), w.extend = function(e, t) {
1509
+ return e.$i ||= (e(t, E, w), !0), w;
1510
+ }, w.locale = C, w.isDayjs = S, w.unix = function(e) {
1511
+ return w(1e3 * e);
1512
+ }, w.en = b[y], w.Ls = b, w.p = {}, w;
1513
+ }));
1514
+ })))(), 1);
1515
+ function nt(e, t = "datetime", n) {
1516
+ if (!e) return "-";
1517
+ let r = (n ? J(n) : Y()).startsWith("en"), i = t === "date" ? r ? "MM/DD/YYYY" : "YYYY-MM-DD" : r ? "MM/DD/YYYY HH:mm:ss" : "YYYY-MM-DD HH:mm:ss";
1518
+ return (0, tt.default)(e).format(i);
1519
+ }
1520
+ //#endregion
1521
+ export { je as LANGUAGE_SOURCE_STORAGE_KEY, Ae as LANGUAGE_STORAGE_KEY, Ne as LangSwitch, q as MANTUR_LANGUAGE_CHANGE_EVENT, Oe as MANTUR_LANGUAGE_SOURCE_STORAGE_KEY, De as MANTUR_LANGUAGE_STORAGE_KEY, ke as MANTUR_MESSAGES, H as MANTUR_POINTS_REFRESH_EVENT, se as MANTUR_TENANT_CONTEXT_CHANGE_EVENT, et as ManturHeader, Pe as ThemeSwitch, nt as formatDateByLang, ye as getManturCurrentTenant, X as getManturMessages, ve as getManturTenantContextSnapshot, K as getManturTenants, W as getManturUserPoints, Y as getStoredManturLocale, J as normalizeManturLocale, xe as refreshManturTenantContext, G as refreshManturUserPoints, Se as switchAndRefreshManturTenant, be as switchManturTenant };