mantur-components 0.1.10 → 0.1.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -5,21 +5,21 @@ import { useTranslation as ee } from "react-i18next";
5
5
  import { jsx as L, jsxs as R } from "react/jsx-runtime";
6
6
  import { useTheme as te } from "next-themes";
7
7
  //#region \0rolldown/runtime.js
8
- var z = Object.create, B = Object.defineProperty, ne = Object.getOwnPropertyDescriptor, V = Object.getOwnPropertyNames, re = Object.getPrototypeOf, H = Object.prototype.hasOwnProperty, U = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t.exports), W = (e, t, n, r) => {
9
- if (t && typeof t == "object" || typeof t == "function") for (var i = V(t), a = 0, o = i.length, s; a < o; a++) s = i[a], !H.call(e, s) && s !== n && B(e, s, {
8
+ var ne = Object.create, z = Object.defineProperty, re = Object.getOwnPropertyDescriptor, B = Object.getOwnPropertyNames, ie = Object.getPrototypeOf, V = Object.prototype.hasOwnProperty, H = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t.exports), U = (e, t, n, r) => {
9
+ if (t && typeof t == "object" || typeof t == "function") for (var i = B(t), a = 0, o = i.length, s; a < o; a++) s = i[a], !V.call(e, s) && s !== n && z(e, s, {
10
10
  get: ((e) => t[e]).bind(null, s),
11
- enumerable: !(r = ne(t, s)) || r.enumerable
11
+ enumerable: !(r = re(t, s)) || r.enumerable
12
12
  });
13
13
  return e;
14
- }, ie = (e, t, n) => (n = e == null ? {} : z(re(e)), W(t || !e || !e.__esModule ? B(n, "default", {
14
+ }, W = (e, t, n) => (n = e == null ? {} : ne(ie(e)), U(t || !e || !e.__esModule ? z(n, "default", {
15
15
  value: e,
16
16
  enumerable: !0
17
- }) : n, e)), G = "/api", ae = "/billing/accounts/me", oe = "mantur-points-refresh", se = "mantur-recharge-order-created", ce = "mantur-tenant-context-change";
17
+ }) : n, e)), ae = "/api", oe = "/billing/accounts/me", se = "mantur-points-refresh", ce = "mantur-recharge-order-created", G = "mantur-tenant-context-change";
18
18
  function le() {
19
- return typeof window < "u" && window.__MANTUR_COMPONENTS_API_BASE__ ? window.__MANTUR_COMPONENTS_API_BASE__ : G;
19
+ return typeof window < "u" && window.__MANTUR_COMPONENTS_API_BASE__ ? window.__MANTUR_COMPONENTS_API_BASE__ : ae;
20
20
  }
21
21
  function ue() {
22
- return typeof window < "u" && window.__MANTUR_COMPONENTS_POINTS_ENDPOINT__ ? window.__MANTUR_COMPONENTS_POINTS_ENDPOINT__ : ae;
22
+ return typeof window < "u" && window.__MANTUR_COMPONENTS_POINTS_ENDPOINT__ ? window.__MANTUR_COMPONENTS_POINTS_ENDPOINT__ : oe;
23
23
  }
24
24
  function de(e) {
25
25
  let t = new URLSearchParams();
@@ -111,33 +111,33 @@ function _e(e) {
111
111
  async function ve() {
112
112
  return _e((await K(ue())).data);
113
113
  }
114
- async function ye() {
114
+ async function q() {
115
115
  let e = await ve();
116
- return typeof window < "u" && window.dispatchEvent(new CustomEvent(oe, { detail: e })), e;
116
+ return typeof window < "u" && window.dispatchEvent(new CustomEvent(se, { detail: e })), e;
117
117
  }
118
- async function be() {
118
+ async function ye() {
119
119
  return (await K("/billing/packages")).data || [];
120
120
  }
121
- async function xe(e) {
121
+ async function be(e) {
122
122
  return (await K("/billing/recharge/orders", {
123
123
  method: "POST",
124
124
  headers: { "Content-Type": "application/json;charset=utf-8" },
125
125
  body: JSON.stringify(e)
126
126
  })).data;
127
127
  }
128
- async function Se(e) {
128
+ async function xe(e) {
129
129
  return (await K(`/billing/recharge/orders/${encodeURIComponent(e)}`)).data;
130
130
  }
131
- async function Ce() {
131
+ async function Se() {
132
132
  return (await K("/billing/pricing/charge-points")).data || [];
133
133
  }
134
- async function we(e) {
134
+ async function Ce(e) {
135
135
  return (await K(`/billing/pricing/charge-points/${encodeURIComponent(e)}`)).data;
136
136
  }
137
- async function Te() {
137
+ async function we() {
138
138
  return (await K("/billing/accounts/me")).data;
139
139
  }
140
- async function Ee(e) {
140
+ async function Te(e) {
141
141
  return (await K(`/billing/accounts/me/ledger${de({
142
142
  pageNum: e.pageNum,
143
143
  pageSize: e.pageSize,
@@ -147,7 +147,7 @@ async function Ee(e) {
147
147
  toTime: e.toTime
148
148
  })}`)).data || { records: [] };
149
149
  }
150
- function De(e, t) {
150
+ function Ee(e, t) {
151
151
  return t?.tenantId ? e.find((e) => e.tenantId === t.tenantId) || {
152
152
  tenantId: t.tenantId,
153
153
  tenantName: t.tenantName || t.tenantId,
@@ -157,37 +157,37 @@ function De(e, t) {
157
157
  }))
158
158
  } : e.find((e) => e.isOwner) || e[0];
159
159
  }
160
- function Oe(e) {
161
- typeof window < "u" && (window.__MANTUR_COMPONENTS_TENANT_CONTEXT__ = e, window.dispatchEvent(new CustomEvent(ce, { detail: e })));
160
+ function De(e) {
161
+ typeof window < "u" && (window.__MANTUR_COMPONENTS_TENANT_CONTEXT__ = e, window.dispatchEvent(new CustomEvent(G, { detail: e })));
162
162
  }
163
- async function ke() {
163
+ async function Oe() {
164
164
  return (await K("/users/me/tenants")).data || [];
165
165
  }
166
- async function Ae() {
166
+ async function ke() {
167
167
  return (await K("/auth/current-tenant")).data;
168
168
  }
169
- async function je(e) {
169
+ async function Ae(e) {
170
170
  return (await K(`/auth/current-tenant/${e}`, { method: "PUT" })).data;
171
171
  }
172
- async function Me(e = "refresh") {
173
- let [t, n] = await Promise.all([ke(), Ae()]), r = {
172
+ async function je(e = "refresh") {
173
+ let [t, n] = await Promise.all([Oe(), ke()]), r = {
174
174
  tenants: t,
175
- currentTenant: De(t, n),
175
+ currentTenant: Ee(t, n),
176
176
  auth: n,
177
177
  reason: e
178
178
  };
179
- return Oe(r), r;
179
+ return De(r), r;
180
180
  }
181
- async function Ne(e) {
182
- let t = await je(e), n = await ke(), r = {
181
+ async function Me(e) {
182
+ let t = await Ae(e), n = await Oe(), r = {
183
183
  tenants: n,
184
- currentTenant: De(n, t),
184
+ currentTenant: Ee(n, t),
185
185
  auth: t,
186
186
  reason: "switch"
187
187
  };
188
- return Oe(r), r;
188
+ return De(r), r;
189
189
  }
190
- var Pe = {
190
+ var Ne = {
191
191
  title: "Mantur",
192
192
  switchTeam: "Switch Team",
193
193
  personalSettings: "Personal Settings",
@@ -257,10 +257,10 @@ var Pe = {
257
257
  pointsDeductionTip: "Points expiring soon are deducted first.",
258
258
  pointsNoteTitle: "Note",
259
259
  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."
260
- }, Fe = {
260
+ }, Pe = {
261
261
  languageZh: "中文",
262
262
  languageEn: "English"
263
- }, Ie = {
263
+ }, Fe = {
264
264
  title: "漫途",
265
265
  switchTeam: "切换团队",
266
266
  personalSettings: "个人设置",
@@ -330,44 +330,44 @@ var Pe = {
330
330
  pointsDeductionTip: "优先扣减即将到期的积分",
331
331
  pointsNoteTitle: "说明",
332
332
  pointsAccountNote: "积分账户挂在你的个人账号上,自己充值、自己消耗、自己负责;他人不能代充、不能代用。充值积分有效期固定 2 年;赠送积分有效期由后台运营发放时设置。"
333
- }, Le = {
333
+ }, Ie = {
334
334
  languageZh: "中文",
335
335
  languageEn: "English"
336
- }, Re = "i18nextLng", ze = "manturLanguageSource", Be = "mantur-language-change", Ve = {
336
+ }, Le = "i18nextLng", Re = "manturLanguageSource", ze = "mantur-language-change", Be = {
337
337
  "zh-CN": {
338
- ...Ie,
339
- ...Le
338
+ ...Fe,
339
+ ...Ie
340
340
  },
341
341
  "en-US": {
342
- ...Pe,
343
- ...Fe
342
+ ...Ne,
343
+ ...Pe
344
344
  }
345
345
  };
346
- function q(e) {
346
+ function J(e) {
347
347
  return e?.toLowerCase().startsWith("en") ? "en-US" : "zh-CN";
348
348
  }
349
- function He() {
350
- return typeof window > "u" ? "zh-CN" : q(window.localStorage.getItem("i18nextLng") || document.documentElement.lang || navigator.language);
349
+ function Ve() {
350
+ return typeof window > "u" ? "zh-CN" : J(window.localStorage.getItem("i18nextLng") || document.documentElement.lang || navigator.language);
351
351
  }
352
- function Ue(e) {
353
- return Ve[q(e)];
352
+ function He(e) {
353
+ return Be[J(e)];
354
354
  }
355
355
  //#endregion
356
356
  //#region src/lang-switch/LangSwitch.tsx
357
- var We = Re, Ge = ze;
358
- function Ke(e, t) {
357
+ var Ue = Le, We = Re;
358
+ function Ge(e, t) {
359
359
  document.cookie = `${encodeURIComponent(e)}=${encodeURIComponent(t)}; path=/`;
360
360
  }
361
- function qe() {
362
- let { i18n: e } = ee(), [t, r] = a(() => He()), i = Ue(t);
361
+ function Ke() {
362
+ let { i18n: e } = ee(), [t, r] = a(() => Ve()), i = He(t);
363
363
  return n(() => {
364
- r(q(e.language));
364
+ r(J(e.language));
365
365
  }, [e.language]), /* @__PURE__ */ L(f, {
366
366
  droplist: /* @__PURE__ */ R(g, {
367
367
  selectedKeys: [t],
368
368
  onClickMenuItem: (t) => {
369
- let n = q(t);
370
- localStorage.setItem(We, t), localStorage.setItem(Ge, "manual"), r(n), e.changeLanguage(t), Ke("Accept-Language", t), window.dispatchEvent(new CustomEvent(Be, { detail: n })), window.location.reload();
369
+ let n = J(t);
370
+ localStorage.setItem(Ue, t), localStorage.setItem(We, "manual"), r(n), e.changeLanguage(t), Ge("Accept-Language", t), window.dispatchEvent(new CustomEvent(ze, { detail: n })), window.location.reload();
371
371
  },
372
372
  children: [/* @__PURE__ */ L(g.Item, { children: i.languageZh }, "zh-CN"), /* @__PURE__ */ L(g.Item, { children: i.languageEn }, "en-US")]
373
373
  }),
@@ -381,7 +381,7 @@ function qe() {
381
381
  }
382
382
  //#endregion
383
383
  //#region src/theme-switch/ThemeSwitch.tsx
384
- function Je() {
384
+ function qe() {
385
385
  let { resolvedTheme: e, setTheme: t } = te();
386
386
  return /* @__PURE__ */ L(c, {
387
387
  shape: "circle",
@@ -392,8 +392,58 @@ function Je() {
392
392
  });
393
393
  }
394
394
  //#endregion
395
+ //#region src/utils/url.ts
396
+ var Je = () => {
397
+ if (typeof window > "u" || !window.location?.href) throw Error("redirectToManturMain requires currentUrl when window.location is unavailable.");
398
+ return window.location.href;
399
+ }, Ye = (e, t) => {
400
+ let n = e.split(".");
401
+ return n.length <= 1 ? t : [t, ...n.slice(1)].join(".");
402
+ }, Xe = (e) => `${e.pathname}${e.search}${e.hash}`;
403
+ function Ze(e, t, n = {}) {
404
+ let r = new URL(n.currentUrl || Je()), i = new URL(r.toString()), a = e?.trim();
405
+ a && (i.hostname = Ye(r.hostname, a)), i.port = "";
406
+ let o = Xe(r);
407
+ i.pathname = "/login", i.searchParams.set("app", t?.trim()), i.searchParams.set("redirect", o);
408
+ let s = i.toString();
409
+ return n.navigate !== !1 && typeof window < "u" && (window.location.href = s), s;
410
+ }
411
+ //#endregion
412
+ //#region src/utils/stripe-payment-window.ts
413
+ var Qe = "mantur-stripe-payment-window", $e = "/stripe-payment";
414
+ function et(e) {
415
+ if (!e || typeof e != "object") return !1;
416
+ let t = e;
417
+ return t.source === "mantur-components" && t.type === "mantur-stripe-payment-window" && (t.action === "close" || t.action === "success" || t.action === "failed");
418
+ }
419
+ function tt(e = "close", t) {
420
+ if (typeof window > "u") return;
421
+ let n = {
422
+ source: "mantur-components",
423
+ type: Qe,
424
+ action: e,
425
+ orderNo: t
426
+ }, r = window.location.origin;
427
+ window.opener?.postMessage(n, r), window.parent && window.parent !== window && window.parent.postMessage(n, r);
428
+ }
429
+ function nt() {
430
+ return typeof window > "u" ? void 0 : window.__MANTUR_MAIN_PREFIX__ || void 0;
431
+ }
432
+ function rt() {
433
+ return typeof window > "u" ? "mantur" : window.__MANTUR_APP_NAME__ || "mantur";
434
+ }
435
+ function it(e) {
436
+ let t = e.clientSecret || e.stripeClientSecret;
437
+ if (typeof window > "u" || !e.orderNo || !t) return;
438
+ let n = new URL($e, window.location.href);
439
+ return n.searchParams.set("orderNo", e.orderNo), n.searchParams.set("clientSecret", t), e.amount !== void 0 && n.searchParams.set("amount", String(e.amount)), e.points !== void 0 && n.searchParams.set("points", String(e.points)), Ze(nt(), rt(), {
440
+ currentUrl: n,
441
+ navigate: !1
442
+ });
443
+ }
444
+ //#endregion
395
445
  //#region src/header/mock.ts
396
- var Ye = [
446
+ var at = [
397
447
  {
398
448
  id: "points-500",
399
449
  points: 500,
@@ -410,7 +460,7 @@ var Ye = [
410
460
  price: 50,
411
461
  recommended: !0
412
462
  }
413
- ], Xe = [
463
+ ], ot = [
414
464
  {
415
465
  id: "recharge-1",
416
466
  type: "income",
@@ -483,14 +533,14 @@ var Ye = [
483
533
  badgeKind: "deducted",
484
534
  badgeText: "已扣除"
485
535
  }
486
- ], { RangePicker: Ze } = u, Qe = 21, $e = 7;
487
- function et(e) {
536
+ ], { RangePicker: st } = u, ct = 21, lt = 7;
537
+ function ut(e) {
488
538
  return e === "recharge" ? "arcoblue" : e === "gift" ? "cyan" : e === "expired" ? "gray" : "orange";
489
539
  }
490
- function tt({ visible: e, points: t, text: n, onCancel: i, onRecharge: o }) {
540
+ function dt({ visible: e, points: t, text: n, onCancel: i, onRecharge: o }) {
491
541
  let [s, u] = a("all"), [d, f] = a("all"), [p, h] = a(["2026-04-15", "2026-05-15"]), [g, x] = a(1), E = (e) => new Intl.NumberFormat().format(e), D = r(() => {
492
542
  let [e, t] = p;
493
- return Xe.filter((n) => {
543
+ return ot.filter((n) => {
494
544
  let r = s === "all" || n.type === s, i = d === "all" || n.source === d, a = !e || n.date >= e, o = !t || n.date <= t;
495
545
  return r && i && a && o;
496
546
  });
@@ -530,7 +580,7 @@ function tt({ visible: e, points: t, text: n, onCancel: i, onRecharge: o }) {
530
580
  width: 110,
531
581
  align: "right",
532
582
  render: (e, t) => /* @__PURE__ */ L(w, {
533
- color: et(t.badgeKind),
583
+ color: ut(t.badgeKind),
534
584
  children: t.badgeText
535
585
  })
536
586
  }
@@ -663,7 +713,7 @@ function tt({ visible: e, points: t, text: n, onCancel: i, onRecharge: o }) {
663
713
  })
664
714
  ]
665
715
  }),
666
- /* @__PURE__ */ L(Ze, {
716
+ /* @__PURE__ */ L(st, {
667
717
  value: p,
668
718
  onChange: (e) => h(e),
669
719
  style: { width: 260 }
@@ -684,8 +734,8 @@ function tt({ visible: e, points: t, text: n, onCancel: i, onRecharge: o }) {
684
734
  /* @__PURE__ */ L(y, {
685
735
  className: "mt-3 flex justify-center!",
686
736
  current: g,
687
- pageSize: $e,
688
- total: Qe,
737
+ pageSize: lt,
738
+ total: ct,
689
739
  onChange: x
690
740
  })
691
741
  ]
@@ -705,17 +755,17 @@ function tt({ visible: e, points: t, text: n, onCancel: i, onRecharge: o }) {
705
755
  }
706
756
  //#endregion
707
757
  //#region src/labels.ts
708
- var nt = Pe;
709
- function rt(e) {
758
+ var ft = Ne;
759
+ function pt(e) {
710
760
  return {
711
- ...nt,
761
+ ...ft,
712
762
  ...e
713
763
  };
714
764
  }
715
765
  //#endregion
716
766
  //#region src/header/components/ProfileModal.tsx
717
- var it = 2048, at = 2 * 1024 * 1024;
718
- function ot(e) {
767
+ var mt = 2048, ht = 2 * 1024 * 1024;
768
+ function gt(e) {
719
769
  return new Promise((t, n) => {
720
770
  let r = URL.createObjectURL(e), i = new Image();
721
771
  i.onload = () => {
@@ -728,8 +778,8 @@ function ot(e) {
728
778
  }, i.src = r;
729
779
  });
730
780
  }
731
- function st({ visible: e, user: t, labels: r, onCancel: o, onSubmit: l }) {
732
- let u = rt(r), [d] = p.useForm(), [f, m] = a(!1), [g, y] = a(null), [b, x] = a(null), S = i(null);
781
+ function _t({ visible: e, user: t, labels: r, onCancel: o, onSubmit: l }) {
782
+ let u = pt(r), [d] = p.useForm(), [f, m] = a(!1), [g, y] = a(null), [b, x] = a(null), S = i(null);
733
783
  n(() => () => {
734
784
  S.current &&= (URL.revokeObjectURL(S.current), null);
735
785
  }, []), n(() => {
@@ -796,10 +846,10 @@ function st({ visible: e, user: t, labels: r, onCancel: o, onSubmit: l }) {
796
846
  accept: "image/*",
797
847
  showUploadList: !1,
798
848
  beforeUpload: async (e) => {
799
- if (e.size > at) return C(u.profileAvatarTooLarge), !1;
849
+ if (e.size > ht) return C(u.profileAvatarTooLarge), !1;
800
850
  try {
801
- let { width: t, height: n } = await ot(e);
802
- if (t > it || n > it) return C(u.profileAvatarDimensionExceeded), !1;
851
+ let { width: t, height: n } = await gt(e);
852
+ if (t > mt || n > mt) return C(u.profileAvatarDimensionExceeded), !1;
803
853
  } catch (e) {
804
854
  return C(u.profileAvatarInvalidImage, e), !1;
805
855
  }
@@ -827,10 +877,10 @@ function st({ visible: e, user: t, labels: r, onCancel: o, onSubmit: l }) {
827
877
  }
828
878
  //#endregion
829
879
  //#region src/header/components/UserAvatar.tsx
830
- function ct(e) {
880
+ function vt(e) {
831
881
  return e?.nickname?.[0] || e?.username?.[0] || "U";
832
882
  }
833
- function lt({ user: e, size: t, className: n = "" }) {
883
+ function yt({ user: e, size: t, className: n = "" }) {
834
884
  return /* @__PURE__ */ L(s, {
835
885
  size: t,
836
886
  className: `bg-arco-primary/20! text-arco-primary-6 border-2 font-bold ${n}`,
@@ -838,20 +888,20 @@ function lt({ user: e, size: t, className: n = "" }) {
838
888
  src: e.avatar,
839
889
  alt: "avatar",
840
890
  className: "h-full w-full object-cover"
841
- }) : ct(e)
891
+ }) : vt(e)
842
892
  });
843
893
  }
844
894
  //#endregion
845
895
  //#region src/header/components/RechargeModal.tsx
846
- var ut = {
896
+ var bt = {
847
897
  minHeight: 292,
848
898
  height: "100%",
849
899
  display: "flex",
850
900
  flexDirection: "column",
851
901
  justifyContent: "space-between"
852
- }, dt = "relative h-full! min-h-[292px]! w-full! overflow-hidden rounded-lg! border 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! [&_.arco-card-body]:flex! [&_.arco-card-body]:h-full! [&_.arco-card-body]:flex-col! [&_.arco-card-body]:justify-between!";
853
- function ft({ visible: e, user: t, points: r, text: o, packages: s, packageLoading: u = !1, submitting: d = !1, onCancel: f, onPay: p }) {
854
- let [g, _] = a(Ye[2].id), [y, b] = a(""), x = i(null), S = s?.length ? s : Ye, C = (e) => new Intl.NumberFormat().format(e), E = y.trim(), O = Number(E), k = E.length > 0, A = g === "custom", j = k && Number.isFinite(O) && Number.isInteger(O) && O >= 10, M = S.find((e) => e.id === g), N = A && j ? {
902
+ }, xt = "relative h-full! min-h-[292px]! w-full! overflow-hidden rounded-lg! border 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! [&_.arco-card-body]:flex! [&_.arco-card-body]:h-full! [&_.arco-card-body]:flex-col! [&_.arco-card-body]:justify-between!";
903
+ function St({ visible: e, user: t, points: r, text: o, packages: s, packageLoading: u = !1, submitting: d = !1, onCancel: f, onPay: p }) {
904
+ let [g, _] = a(at[2].id), [y, b] = a(""), x = i(null), S = s?.length ? s : at, C = (e) => new Intl.NumberFormat().format(e), E = y.trim(), O = Number(E), k = E.length > 0, A = g === "custom", j = k && Number.isFinite(O) && Number.isInteger(O) && O >= 10, M = S.find((e) => e.id === g), N = A && j ? {
855
905
  id: "custom",
856
906
  price: O,
857
907
  points: O * 100,
@@ -904,7 +954,7 @@ function ft({ visible: e, user: t, points: r, text: o, packages: s, packageLoadi
904
954
  className: "mx-auto flex h-full w-full max-w-7xl flex-col items-center ",
905
955
  children: [/* @__PURE__ */ R("div", {
906
956
  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",
907
- children: [/* @__PURE__ */ L(lt, {
957
+ children: [/* @__PURE__ */ L(yt, {
908
958
  user: t,
909
959
  size: 32,
910
960
  className: "shrink-0"
@@ -939,8 +989,8 @@ function ft({ visible: e, user: t, points: r, text: o, packages: s, packageLoadi
939
989
  onKeyDown: (t) => {
940
990
  (t.key === "Enter" || t.key === " ") && F(e.id);
941
991
  },
942
- bodyStyle: ut,
943
- className: `${dt} border-arco-border-2! bg-arco-bg-2! cursor-pointer ${g === 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!"}`,
992
+ bodyStyle: bt,
993
+ className: `${xt} border-arco-border-2! bg-arco-bg-2! cursor-pointer ${g === 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!"}`,
944
994
  children: [
945
995
  g === e.id ? /* @__PURE__ */ L(D, { className: "text-arco-primary-6! absolute bottom-4 left-4 text-xl" }) : null,
946
996
  "recommended" in e && e.recommended ? /* @__PURE__ */ L(w, {
@@ -983,8 +1033,8 @@ function ft({ visible: e, user: t, points: r, text: o, packages: s, packageLoadi
983
1033
  onKeyDown: (e) => {
984
1034
  (e.key === "Enter" || e.key === " ") && I();
985
1035
  },
986
- bodyStyle: ut,
987
- className: `${dt} cursor-text ${j ? "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%)]!" : k && A ? "border-arco-danger-6! bg-arco-bg-1! hover:border-arco-danger-6!" : "border-arco-primary-6/30! bg-arco-primary-light-1/20! hover:border-arco-primary-6!"}`,
1036
+ bodyStyle: bt,
1037
+ className: `${xt} cursor-text ${j ? "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%)]!" : k && A ? "border-arco-danger-6! bg-arco-bg-1! hover:border-arco-danger-6!" : "border-arco-primary-6/30! bg-arco-primary-light-1/20! hover:border-arco-primary-6!"}`,
988
1038
  children: [
989
1039
  j ? /* @__PURE__ */ L(D, { className: "text-arco-primary-6! absolute top-4 right-4 text-xl" }) : null,
990
1040
  /* @__PURE__ */ R("div", {
@@ -1071,7 +1121,7 @@ function ft({ visible: e, user: t, points: r, text: o, packages: s, packageLoadi
1071
1121
  }
1072
1122
  //#endregion
1073
1123
  //#region node_modules/prop-types/node_modules/react-is/cjs/react-is.production.min.js
1074
- var pt = /* @__PURE__ */ U(((e) => {
1124
+ var Ct = /* @__PURE__ */ H(((e) => {
1075
1125
  var t = typeof Symbol == "function" && Symbol.for, n = t ? Symbol.for("react.element") : 60103, r = t ? Symbol.for("react.portal") : 60106, i = t ? Symbol.for("react.fragment") : 60107, a = t ? Symbol.for("react.strict_mode") : 60108, o = t ? Symbol.for("react.profiler") : 60114, s = t ? Symbol.for("react.provider") : 60109, c = t ? Symbol.for("react.context") : 60110, l = t ? Symbol.for("react.async_mode") : 60111, u = t ? Symbol.for("react.concurrent_mode") : 60111, d = t ? Symbol.for("react.forward_ref") : 60112, f = t ? Symbol.for("react.suspense") : 60113, p = t ? Symbol.for("react.suspense_list") : 60120, m = t ? Symbol.for("react.memo") : 60115, h = t ? Symbol.for("react.lazy") : 60116, g = t ? Symbol.for("react.block") : 60121, _ = t ? Symbol.for("react.fundamental") : 60117, v = t ? Symbol.for("react.responder") : 60118, y = t ? Symbol.for("react.scope") : 60119;
1076
1126
  function b(e) {
1077
1127
  if (typeof e == "object" && e) {
@@ -1127,7 +1177,7 @@ var pt = /* @__PURE__ */ U(((e) => {
1127
1177
  }, e.isValidElementType = function(e) {
1128
1178
  return typeof e == "string" || typeof e == "function" || e === i || e === u || e === o || e === a || e === f || e === p || typeof e == "object" && !!e && (e.$$typeof === h || e.$$typeof === m || e.$$typeof === s || e.$$typeof === c || e.$$typeof === d || e.$$typeof === _ || e.$$typeof === v || e.$$typeof === y || e.$$typeof === g);
1129
1179
  }, e.typeOf = b;
1130
- })), mt = /* @__PURE__ */ U(((e) => {
1180
+ })), wt = /* @__PURE__ */ H(((e) => {
1131
1181
  process.env.NODE_ENV !== "production" && (function() {
1132
1182
  var t = typeof Symbol == "function" && Symbol.for, n = t ? Symbol.for("react.element") : 60103, r = t ? Symbol.for("react.portal") : 60106, i = t ? Symbol.for("react.fragment") : 60107, a = t ? Symbol.for("react.strict_mode") : 60108, o = t ? Symbol.for("react.profiler") : 60114, s = t ? Symbol.for("react.provider") : 60109, c = t ? Symbol.for("react.context") : 60110, l = t ? Symbol.for("react.async_mode") : 60111, u = t ? Symbol.for("react.concurrent_mode") : 60111, d = t ? Symbol.for("react.forward_ref") : 60112, f = t ? Symbol.for("react.suspense") : 60113, p = t ? Symbol.for("react.suspense_list") : 60120, m = t ? Symbol.for("react.memo") : 60115, h = t ? Symbol.for("react.lazy") : 60116, g = t ? Symbol.for("react.block") : 60121, _ = t ? Symbol.for("react.fundamental") : 60117, v = t ? Symbol.for("react.responder") : 60118, y = t ? Symbol.for("react.scope") : 60119;
1133
1183
  function b(e) {
@@ -1177,35 +1227,35 @@ var pt = /* @__PURE__ */ U(((e) => {
1177
1227
  function te(e) {
1178
1228
  return typeof e == "object" && !!e && e.$$typeof === n;
1179
1229
  }
1180
- function z(e) {
1230
+ function ne(e) {
1181
1231
  return x(e) === d;
1182
1232
  }
1183
- function B(e) {
1233
+ function z(e) {
1184
1234
  return x(e) === i;
1185
1235
  }
1186
- function ne(e) {
1236
+ function re(e) {
1187
1237
  return x(e) === h;
1188
1238
  }
1189
- function V(e) {
1239
+ function B(e) {
1190
1240
  return x(e) === m;
1191
1241
  }
1192
- function re(e) {
1242
+ function ie(e) {
1193
1243
  return x(e) === r;
1194
1244
  }
1195
- function H(e) {
1245
+ function V(e) {
1196
1246
  return x(e) === o;
1197
1247
  }
1198
- function U(e) {
1248
+ function H(e) {
1199
1249
  return x(e) === a;
1200
1250
  }
1201
- function W(e) {
1251
+ function U(e) {
1202
1252
  return x(e) === f;
1203
1253
  }
1204
- e.AsyncMode = S, e.ConcurrentMode = C, e.ContextConsumer = w, e.ContextProvider = T, e.Element = E, e.ForwardRef = D, e.Fragment = O, e.Lazy = k, e.Memo = A, e.Portal = j, e.Profiler = M, e.StrictMode = N, e.Suspense = P, e.isAsyncMode = I, e.isConcurrentMode = ee, e.isContextConsumer = L, e.isContextProvider = R, e.isElement = te, e.isForwardRef = z, e.isFragment = B, e.isLazy = ne, e.isMemo = V, e.isPortal = re, e.isProfiler = H, e.isStrictMode = U, e.isSuspense = W, e.isValidElementType = b, e.typeOf = x;
1254
+ e.AsyncMode = S, e.ConcurrentMode = C, e.ContextConsumer = w, e.ContextProvider = T, e.Element = E, e.ForwardRef = D, e.Fragment = O, e.Lazy = k, e.Memo = A, e.Portal = j, e.Profiler = M, e.StrictMode = N, e.Suspense = P, e.isAsyncMode = I, e.isConcurrentMode = ee, e.isContextConsumer = L, e.isContextProvider = R, e.isElement = te, e.isForwardRef = ne, e.isFragment = z, e.isLazy = re, e.isMemo = B, e.isPortal = ie, e.isProfiler = V, e.isStrictMode = H, e.isSuspense = U, e.isValidElementType = b, e.typeOf = x;
1205
1255
  })();
1206
- })), ht = /* @__PURE__ */ U(((e, t) => {
1207
- process.env.NODE_ENV === "production" ? t.exports = pt() : t.exports = mt();
1208
- })), gt = /* @__PURE__ */ U(((e, t) => {
1256
+ })), Tt = /* @__PURE__ */ H(((e, t) => {
1257
+ process.env.NODE_ENV === "production" ? t.exports = Ct() : t.exports = wt();
1258
+ })), Et = /* @__PURE__ */ H(((e, t) => {
1209
1259
  var n = Object.getOwnPropertySymbols, r = Object.prototype.hasOwnProperty, i = Object.prototype.propertyIsEnumerable;
1210
1260
  function a(e) {
1211
1261
  if (e == null) throw TypeError("Object.assign cannot be called with null or undefined");
@@ -1238,14 +1288,14 @@ var pt = /* @__PURE__ */ U(((e) => {
1238
1288
  }
1239
1289
  return s;
1240
1290
  };
1241
- })), _t = /* @__PURE__ */ U(((e, t) => {
1291
+ })), Dt = /* @__PURE__ */ H(((e, t) => {
1242
1292
  t.exports = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";
1243
- })), vt = /* @__PURE__ */ U(((e, t) => {
1293
+ })), Ot = /* @__PURE__ */ H(((e, t) => {
1244
1294
  t.exports = Function.call.bind(Object.prototype.hasOwnProperty);
1245
- })), yt = /* @__PURE__ */ U(((e, t) => {
1295
+ })), kt = /* @__PURE__ */ H(((e, t) => {
1246
1296
  var n = function() {};
1247
1297
  if (process.env.NODE_ENV !== "production") {
1248
- var r = _t(), i = {}, a = vt();
1298
+ var r = Dt(), i = {}, a = Ot();
1249
1299
  n = function(e) {
1250
1300
  var t = "Warning: " + e;
1251
1301
  typeof console < "u" && console.error(t);
@@ -1278,8 +1328,8 @@ var pt = /* @__PURE__ */ U(((e) => {
1278
1328
  o.resetWarningCache = function() {
1279
1329
  process.env.NODE_ENV !== "production" && (i = {});
1280
1330
  }, t.exports = o;
1281
- })), bt = /* @__PURE__ */ U(((e, t) => {
1282
- var n = ht(), r = gt(), i = _t(), a = vt(), o = yt(), s = function() {};
1331
+ })), At = /* @__PURE__ */ H(((e, t) => {
1332
+ var n = Tt(), r = Et(), i = Dt(), a = Ot(), o = kt(), s = function() {};
1283
1333
  process.env.NODE_ENV !== "production" && (s = function(e) {
1284
1334
  var t = "Warning: " + e;
1285
1335
  typeof console < "u" && console.error(t);
@@ -1537,8 +1587,8 @@ var pt = /* @__PURE__ */ U(((e) => {
1537
1587
  }
1538
1588
  return p.checkPropTypes = o, p.resetWarningCache = o.resetWarningCache, p.PropTypes = p, p;
1539
1589
  };
1540
- })), xt = /* @__PURE__ */ U(((e, t) => {
1541
- var n = _t();
1590
+ })), jt = /* @__PURE__ */ H(((e, t) => {
1591
+ var n = Dt();
1542
1592
  function r() {}
1543
1593
  function i() {}
1544
1594
  i.resetWarningCache = r, t.exports = function() {
@@ -1577,13 +1627,13 @@ var pt = /* @__PURE__ */ U(((e) => {
1577
1627
  };
1578
1628
  return a.PropTypes = a, a;
1579
1629
  };
1580
- })), J = /* @__PURE__ */ ie((/* @__PURE__ */ U(((e, t) => {
1630
+ })), Y = /* @__PURE__ */ W((/* @__PURE__ */ H(((e, t) => {
1581
1631
  if (process.env.NODE_ENV !== "production") {
1582
- var n = ht();
1583
- t.exports = bt()(n.isElement, !0);
1584
- } else t.exports = xt()();
1632
+ var n = Tt();
1633
+ t.exports = At()(n.isElement, !0);
1634
+ } else t.exports = jt()();
1585
1635
  })))(), 1);
1586
- function St(e, t) {
1636
+ function Mt(e, t) {
1587
1637
  var n = Object.keys(e);
1588
1638
  if (Object.getOwnPropertySymbols) {
1589
1639
  var r = Object.getOwnPropertySymbols(e);
@@ -1593,26 +1643,26 @@ function St(e, t) {
1593
1643
  }
1594
1644
  return n;
1595
1645
  }
1596
- function Ct(e) {
1646
+ function Nt(e) {
1597
1647
  for (var t = 1; t < arguments.length; t++) {
1598
1648
  var n = arguments[t] == null ? {} : arguments[t];
1599
- t % 2 ? St(Object(n), !0).forEach(function(t) {
1600
- Tt(e, t, n[t]);
1601
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : St(Object(n)).forEach(function(t) {
1649
+ t % 2 ? Mt(Object(n), !0).forEach(function(t) {
1650
+ Ft(e, t, n[t]);
1651
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : Mt(Object(n)).forEach(function(t) {
1602
1652
  Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
1603
1653
  });
1604
1654
  }
1605
1655
  return e;
1606
1656
  }
1607
- function wt(e) {
1657
+ function Pt(e) {
1608
1658
  "@babel/helpers - typeof";
1609
- return wt = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
1659
+ return Pt = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
1610
1660
  return typeof e;
1611
1661
  } : function(e) {
1612
1662
  return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
1613
- }, wt(e);
1663
+ }, Pt(e);
1614
1664
  }
1615
- function Tt(e, t, n) {
1665
+ function Ft(e, t, n) {
1616
1666
  return t in e ? Object.defineProperty(e, t, {
1617
1667
  value: n,
1618
1668
  enumerable: !0,
@@ -1620,28 +1670,28 @@ function Tt(e, t, n) {
1620
1670
  writable: !0
1621
1671
  }) : e[t] = n, e;
1622
1672
  }
1623
- function Et(e, t) {
1673
+ function It(e, t) {
1624
1674
  if (e == null) return {};
1625
1675
  var n = {}, r = Object.keys(e), i, a;
1626
1676
  for (a = 0; a < r.length; a++) i = r[a], !(t.indexOf(i) >= 0) && (n[i] = e[i]);
1627
1677
  return n;
1628
1678
  }
1629
- function Dt(e, t) {
1679
+ function Lt(e, t) {
1630
1680
  if (e == null) return {};
1631
- var n = Et(e, t), r, i;
1681
+ var n = It(e, t), r, i;
1632
1682
  if (Object.getOwnPropertySymbols) {
1633
1683
  var a = Object.getOwnPropertySymbols(e);
1634
1684
  for (i = 0; i < a.length; i++) r = a[i], !(t.indexOf(r) >= 0) && Object.prototype.propertyIsEnumerable.call(e, r) && (n[r] = e[r]);
1635
1685
  }
1636
1686
  return n;
1637
1687
  }
1638
- function Ot(e, t) {
1639
- return kt(e) || At(e, t) || jt(e, t) || Nt();
1688
+ function Rt(e, t) {
1689
+ return zt(e) || Bt(e, t) || Vt(e, t) || Ut();
1640
1690
  }
1641
- function kt(e) {
1691
+ function zt(e) {
1642
1692
  if (Array.isArray(e)) return e;
1643
1693
  }
1644
- function At(e, t) {
1694
+ function Bt(e, t) {
1645
1695
  var n = e && (typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"]);
1646
1696
  if (n != null) {
1647
1697
  var r = [], i = !0, a = !1, o, s;
@@ -1659,23 +1709,23 @@ function At(e, t) {
1659
1709
  return r;
1660
1710
  }
1661
1711
  }
1662
- function jt(e, t) {
1712
+ function Vt(e, t) {
1663
1713
  if (e) {
1664
- if (typeof e == "string") return Mt(e, t);
1714
+ if (typeof e == "string") return Ht(e, t);
1665
1715
  var n = Object.prototype.toString.call(e).slice(8, -1);
1666
1716
  if (n === "Object" && e.constructor && (n = e.constructor.name), n === "Map" || n === "Set") return Array.from(e);
1667
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return Mt(e, t);
1717
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return Ht(e, t);
1668
1718
  }
1669
1719
  }
1670
- function Mt(e, t) {
1720
+ function Ht(e, t) {
1671
1721
  (t == null || t > e.length) && (t = e.length);
1672
1722
  for (var n = 0, r = Array(t); n < t; n++) r[n] = e[n];
1673
1723
  return r;
1674
1724
  }
1675
- function Nt() {
1725
+ function Ut() {
1676
1726
  throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
1677
1727
  }
1678
- var Y = function(t, n, r) {
1728
+ var X = function(t, n, r) {
1679
1729
  var i = !!r, a = e.useRef(r);
1680
1730
  e.useEffect(function() {
1681
1731
  a.current = r;
@@ -1693,23 +1743,23 @@ var Y = function(t, n, r) {
1693
1743
  t,
1694
1744
  a
1695
1745
  ]);
1696
- }, X = function(t) {
1746
+ }, Wt = function(t) {
1697
1747
  var n = e.useRef(t);
1698
1748
  return e.useEffect(function() {
1699
1749
  n.current = t;
1700
1750
  }, [t]), n.current;
1701
1751
  }, Z = function(e) {
1702
- return e !== null && wt(e) === "object";
1703
- }, Pt = function(e) {
1752
+ return e !== null && Pt(e) === "object";
1753
+ }, Gt = function(e) {
1704
1754
  return Z(e) && typeof e.then == "function";
1705
- }, Ft = function(e) {
1755
+ }, Kt = function(e) {
1706
1756
  return Z(e) && typeof e.elements == "function" && typeof e.createToken == "function" && typeof e.createPaymentMethod == "function" && typeof e.confirmCardPayment == "function";
1707
- }, It = "[object Object]", Lt = function e(t, n) {
1757
+ }, qt = "[object Object]", Jt = function e(t, n) {
1708
1758
  if (!Z(t) || !Z(n)) return t === n;
1709
1759
  var r = Array.isArray(t);
1710
1760
  if (r !== Array.isArray(n)) return !1;
1711
- var i = Object.prototype.toString.call(t) === It;
1712
- if (i !== (Object.prototype.toString.call(n) === It)) return !1;
1761
+ var i = Object.prototype.toString.call(t) === qt;
1762
+ if (i !== (Object.prototype.toString.call(n) === qt)) return !1;
1713
1763
  if (!i && !r) return t === n;
1714
1764
  var a = Object.keys(t), o = Object.keys(n);
1715
1765
  if (a.length !== o.length) return !1;
@@ -1721,29 +1771,29 @@ var Y = function(t, n, r) {
1721
1771
  return u.every(function(t) {
1722
1772
  return e(d[t], f[t]);
1723
1773
  });
1724
- }, Rt = function(e, t, n) {
1774
+ }, Yt = function(e, t, n) {
1725
1775
  return Z(e) ? Object.keys(e).reduce(function(r, i) {
1726
- var a = !Z(t) || !Lt(e[i], t[i]);
1727
- return n.includes(i) ? (a && console.warn(`Unsupported prop change: options.${i} is not a mutable property.`), r) : a ? Ct(Ct({}, r || {}), {}, Tt({}, i, e[i])) : r;
1776
+ var a = !Z(t) || !Jt(e[i], t[i]);
1777
+ return n.includes(i) ? (a && console.warn(`Unsupported prop change: options.${i} is not a mutable property.`), r) : a ? Nt(Nt({}, r || {}), {}, Ft({}, i, e[i])) : r;
1728
1778
  }, null) : null;
1729
- }, zt = "Invalid prop `stripe` supplied to `Elements`. We recommend using the `loadStripe` utility from `@stripe/stripe-js`. See https://stripe.com/docs/stripe-js/react#elements-props-stripe for details.", Bt = function(e) {
1730
- var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : zt;
1731
- if (e === null || Ft(e)) return e;
1779
+ }, Xt = "Invalid prop `stripe` supplied to `Elements`. We recommend using the `loadStripe` utility from `@stripe/stripe-js`. See https://stripe.com/docs/stripe-js/react#elements-props-stripe for details.", Zt = function(e) {
1780
+ var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : Xt;
1781
+ if (e === null || Kt(e)) return e;
1732
1782
  throw Error(t);
1733
- }, Vt = function(e) {
1734
- var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : zt;
1735
- if (Pt(e)) return {
1783
+ }, Qt = function(e) {
1784
+ var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : Xt;
1785
+ if (Gt(e)) return {
1736
1786
  tag: "async",
1737
1787
  stripePromise: Promise.resolve(e).then(function(e) {
1738
- return Bt(e, t);
1788
+ return Zt(e, t);
1739
1789
  })
1740
1790
  };
1741
- var n = Bt(e, t);
1791
+ var n = Zt(e, t);
1742
1792
  return n === null ? { tag: "empty" } : {
1743
1793
  tag: "sync",
1744
1794
  stripe: n
1745
1795
  };
1746
- }, Ht = function(e) {
1796
+ }, $t = function(e) {
1747
1797
  !e || !e._registerWrapper || !e.registerAppInfo || (e._registerWrapper({
1748
1798
  name: "react-stripe-js",
1749
1799
  version: "6.4.0"
@@ -1752,15 +1802,15 @@ var Y = function(t, n, r) {
1752
1802
  version: "6.4.0",
1753
1803
  url: "https://stripe.com/docs/stripe-js/react"
1754
1804
  }));
1755
- }, Ut = /* @__PURE__ */ e.createContext(null);
1756
- Ut.displayName = "ElementsContext";
1757
- var Wt = function(e, t) {
1805
+ }, en = /* @__PURE__ */ e.createContext(null);
1806
+ en.displayName = "ElementsContext";
1807
+ var tn = function(e, t) {
1758
1808
  if (!e) throw Error(`Could not find Elements context; You need to wrap the part of your app that ${t} in an <Elements> provider.`);
1759
1809
  return e;
1760
- }, Gt = function(t) {
1810
+ }, nn = function(t) {
1761
1811
  var n = t.stripe, r = t.options, i = t.children, a = e.useMemo(function() {
1762
- return Vt(n);
1763
- }, [n]), o = Ot(e.useState(function() {
1812
+ return Qt(n);
1813
+ }, [n]), o = Rt(e.useState(function() {
1764
1814
  return {
1765
1815
  stripe: a.tag === "sync" ? a.stripe : null,
1766
1816
  elements: a.tag === "sync" ? a.stripe.elements(r) : null
@@ -1785,14 +1835,14 @@ var Wt = function(e, t) {
1785
1835
  s,
1786
1836
  r
1787
1837
  ]);
1788
- var l = X(n);
1838
+ var l = Wt(n);
1789
1839
  e.useEffect(function() {
1790
1840
  l !== null && l !== n && console.warn("Unsupported prop change on Elements: You cannot change the `stripe` prop after setting it.");
1791
1841
  }, [l, n]);
1792
- var u = X(r);
1842
+ var u = Wt(r);
1793
1843
  return e.useEffect(function() {
1794
1844
  if (s.elements) {
1795
- var e = Rt(r, u, ["clientSecret", "fonts"]);
1845
+ var e = Yt(r, u, ["clientSecret", "fonts"]);
1796
1846
  e && s.elements.update(e);
1797
1847
  }
1798
1848
  }, [
@@ -1800,45 +1850,45 @@ var Wt = function(e, t) {
1800
1850
  u,
1801
1851
  s.elements
1802
1852
  ]), e.useEffect(function() {
1803
- Ht(s.stripe);
1804
- }, [s.stripe]), /* @__PURE__ */ e.createElement(Ut.Provider, { value: s }, i);
1853
+ $t(s.stripe);
1854
+ }, [s.stripe]), /* @__PURE__ */ e.createElement(en.Provider, { value: s }, i);
1805
1855
  };
1806
- Gt.propTypes = {
1807
- stripe: J.default.any,
1808
- options: J.default.object
1856
+ nn.propTypes = {
1857
+ stripe: Y.default.any,
1858
+ options: Y.default.object
1809
1859
  };
1810
- var Kt = function(t) {
1811
- return Wt(e.useContext(Ut), t);
1812
- }, qt = function(e) {
1860
+ var rn = function(t) {
1861
+ return tn(e.useContext(en), t);
1862
+ }, an = function(e) {
1813
1863
  var t = e.children;
1814
- return t(Kt("mounts <ElementsConsumer>"));
1864
+ return t(rn("mounts <ElementsConsumer>"));
1815
1865
  };
1816
- qt.propTypes = { children: J.default.func.isRequired };
1817
- var Jt = /* @__PURE__ */ e.createContext(null);
1818
- Jt.displayName = "CheckoutContext";
1819
- var Yt = function(t) {
1820
- var n = e.useContext(Jt), r = e.useContext(Ut);
1866
+ an.propTypes = { children: Y.default.func.isRequired };
1867
+ var on = /* @__PURE__ */ e.createContext(null);
1868
+ on.displayName = "CheckoutContext";
1869
+ var sn = function(t) {
1870
+ var n = e.useContext(on), r = e.useContext(en);
1821
1871
  if (n) {
1822
1872
  if (r) throw Error(`You cannot wrap the part of your app that ${t} in both a checkout provider and <Elements> provider.`);
1823
1873
  return n;
1824
- } else return Wt(r, t);
1825
- }, Xt = ["mode"], Zt = function(e) {
1874
+ } else return tn(r, t);
1875
+ }, cn = ["mode"], ln = function(e) {
1826
1876
  return e.charAt(0).toUpperCase() + e.slice(1);
1827
1877
  }, Q = function(t, n, r) {
1828
- var i = `${Zt(t)}Element`, a = n ? function(t) {
1829
- Yt(`mounts <${i}>`);
1878
+ var i = `${ln(t)}Element`, a = n ? function(t) {
1879
+ sn(`mounts <${i}>`);
1830
1880
  var n = t.id, r = t.className;
1831
1881
  return /* @__PURE__ */ e.createElement("div", {
1832
1882
  id: n,
1833
1883
  className: r
1834
1884
  });
1835
1885
  } : function(n) {
1836
- var r = n.id, a = n.className, o = n.options, s = o === void 0 ? {} : o, c = n.onBlur, l = n.onFocus, u = n.onReady, d = n.onChange, f = n.onEscape, p = n.onClick, m = n.onLoadError, h = n.onLoaderStart, g = n.onNetworksChange, _ = n.onConfirm, v = n.onCancel, y = n.onShippingAddressChange, b = n.onShippingRateChange, x = n.onSavedPaymentMethodRemove, S = n.onSavedPaymentMethodUpdate, C = n.onAvailablePaymentMethodsChange, w = Yt(`mounts <${i}>`), T = "elements" in w ? w.elements : null, E = "checkoutState" in w ? w.checkoutState : null, D = E?.type === "success" || E?.type === "loading" ? E.sdk : null, O = Ot(e.useState(null), 2), k = O[0], A = O[1], j = e.useRef(null), M = e.useRef(null);
1837
- Y(k, "blur", c), Y(k, "focus", l), Y(k, "escape", f), Y(k, "click", p), Y(k, "loaderror", m), Y(k, "loaderstart", h), Y(k, "networkschange", g), Y(k, "confirm", _), Y(k, "cancel", v), Y(k, "shippingaddresschange", y), Y(k, "shippingratechange", b), Y(k, "savedpaymentmethodremove", x), Y(k, "savedpaymentmethodupdate", S), Y(k, "availablepaymentmethodschange", C), Y(k, "change", d);
1886
+ var r = n.id, a = n.className, o = n.options, s = o === void 0 ? {} : o, c = n.onBlur, l = n.onFocus, u = n.onReady, d = n.onChange, f = n.onEscape, p = n.onClick, m = n.onLoadError, h = n.onLoaderStart, g = n.onNetworksChange, _ = n.onConfirm, v = n.onCancel, y = n.onShippingAddressChange, b = n.onShippingRateChange, x = n.onSavedPaymentMethodRemove, S = n.onSavedPaymentMethodUpdate, C = n.onAvailablePaymentMethodsChange, w = sn(`mounts <${i}>`), T = "elements" in w ? w.elements : null, E = "checkoutState" in w ? w.checkoutState : null, D = E?.type === "success" || E?.type === "loading" ? E.sdk : null, O = Rt(e.useState(null), 2), k = O[0], A = O[1], j = e.useRef(null), M = e.useRef(null);
1887
+ X(k, "blur", c), X(k, "focus", l), X(k, "escape", f), X(k, "click", p), X(k, "loaderror", m), X(k, "loaderstart", h), X(k, "networkschange", g), X(k, "confirm", _), X(k, "cancel", v), X(k, "shippingaddresschange", y), X(k, "shippingratechange", b), X(k, "savedpaymentmethodremove", x), X(k, "savedpaymentmethodupdate", S), X(k, "availablepaymentmethodschange", C), X(k, "change", d);
1838
1888
  var N;
1839
1889
  u && (N = t === "expressCheckout" ? u : function() {
1840
1890
  u(k);
1841
- }), Y(k, "ready", N), e.useLayoutEffect(function() {
1891
+ }), X(k, "ready", N), e.useLayoutEffect(function() {
1842
1892
  if (j.current === null && M.current !== null && (T || D)) {
1843
1893
  var e = null;
1844
1894
  if (D) {
@@ -1852,7 +1902,7 @@ var Yt = function(t) {
1852
1902
  break;
1853
1903
  case "address":
1854
1904
  if ("mode" in s) {
1855
- var a = s.mode, o = Dt(s, Xt);
1905
+ var a = s.mode, o = Lt(s, cn);
1856
1906
  if (a === "shipping") e = n.createShippingAddressElement(o);
1857
1907
  else if (a === "billing") e = n.createBillingAddressElement(o);
1858
1908
  else throw Error("Invalid options.mode. mode must be 'billing' or 'shipping'.");
@@ -1880,10 +1930,10 @@ var Yt = function(t) {
1880
1930
  D,
1881
1931
  s
1882
1932
  ]);
1883
- var P = X(s);
1933
+ var P = Wt(s);
1884
1934
  return e.useEffect(function() {
1885
1935
  if (j.current) {
1886
- var e = Rt(s, P, ["paymentRequest"]);
1936
+ var e = Yt(s, P, ["paymentRequest"]);
1887
1937
  e && "update" in j.current && j.current.update(e);
1888
1938
  }
1889
1939
  }, [s, P]), e.useLayoutEffect(function() {
@@ -1899,36 +1949,36 @@ var Yt = function(t) {
1899
1949
  });
1900
1950
  };
1901
1951
  return a.propTypes = {
1902
- id: J.default.string,
1903
- className: J.default.string,
1904
- onChange: J.default.func,
1905
- onBlur: J.default.func,
1906
- onFocus: J.default.func,
1907
- onReady: J.default.func,
1908
- onEscape: J.default.func,
1909
- onClick: J.default.func,
1910
- onLoadError: J.default.func,
1911
- onLoaderStart: J.default.func,
1912
- onNetworksChange: J.default.func,
1913
- onConfirm: J.default.func,
1914
- onCancel: J.default.func,
1915
- onShippingAddressChange: J.default.func,
1916
- onShippingRateChange: J.default.func,
1917
- onSavedPaymentMethodRemove: J.default.func,
1918
- onSavedPaymentMethodUpdate: J.default.func,
1919
- onAvailablePaymentMethodsChange: J.default.func,
1920
- options: J.default.object
1952
+ id: Y.default.string,
1953
+ className: Y.default.string,
1954
+ onChange: Y.default.func,
1955
+ onBlur: Y.default.func,
1956
+ onFocus: Y.default.func,
1957
+ onReady: Y.default.func,
1958
+ onEscape: Y.default.func,
1959
+ onClick: Y.default.func,
1960
+ onLoadError: Y.default.func,
1961
+ onLoaderStart: Y.default.func,
1962
+ onNetworksChange: Y.default.func,
1963
+ onConfirm: Y.default.func,
1964
+ onCancel: Y.default.func,
1965
+ onShippingAddressChange: Y.default.func,
1966
+ onShippingRateChange: Y.default.func,
1967
+ onSavedPaymentMethodRemove: Y.default.func,
1968
+ onSavedPaymentMethodUpdate: Y.default.func,
1969
+ onAvailablePaymentMethodsChange: Y.default.func,
1970
+ options: Y.default.object
1921
1971
  }, a.displayName = i, a.__elementType = t, a;
1922
- }, $ = typeof window > "u", Qt = /* @__PURE__ */ e.createContext(null);
1923
- Qt.displayName = "EmbeddedCheckoutProviderContext";
1924
- var $t = function() {
1925
- var t = e.useContext(Qt);
1972
+ }, $ = typeof window > "u", un = /* @__PURE__ */ e.createContext(null);
1973
+ un.displayName = "EmbeddedCheckoutProviderContext";
1974
+ var dn = function() {
1975
+ var t = e.useContext(un);
1926
1976
  if (!t) throw Error("<EmbeddedCheckout> must be used within <EmbeddedCheckoutProvider>");
1927
1977
  return t;
1928
- }, en = "Invalid prop `stripe` supplied to `EmbeddedCheckoutProvider`. We recommend using the `loadStripe` utility from `@stripe/stripe-js`. See https://stripe.com/docs/stripe-js/react#elements-props-stripe for details.", tn = function(t) {
1978
+ }, fn = "Invalid prop `stripe` supplied to `EmbeddedCheckoutProvider`. We recommend using the `loadStripe` utility from `@stripe/stripe-js`. See https://stripe.com/docs/stripe-js/react#elements-props-stripe for details.", pn = function(t) {
1929
1979
  var n = t.stripe, r = t.options, i = t.children, a = e.useMemo(function() {
1930
- return Vt(n, en);
1931
- }, [n]), o = e.useRef(null), s = e.useRef(null), c = Ot(e.useState({ embeddedCheckout: null }), 2), l = c[0], u = c[1];
1980
+ return Qt(n, fn);
1981
+ }, [n]), o = e.useRef(null), s = e.useRef(null), c = Rt(e.useState({ embeddedCheckout: null }), 2), l = c[0], u = c[1];
1932
1982
  e.useEffect(function() {
1933
1983
  if (!(s.current || o.current)) {
1934
1984
  var e = function(e) {
@@ -1952,13 +2002,13 @@ var $t = function() {
1952
2002
  });
1953
2003
  };
1954
2004
  }, [l.embeddedCheckout]), e.useEffect(function() {
1955
- Ht(s);
2005
+ $t(s);
1956
2006
  }, [s]);
1957
- var d = X(n);
2007
+ var d = Wt(n);
1958
2008
  e.useEffect(function() {
1959
2009
  d !== null && d !== n && console.warn("Unsupported prop change on EmbeddedCheckoutProvider: You cannot change the `stripe` prop after setting it.");
1960
2010
  }, [d, n]);
1961
- var f = X(r);
2011
+ var f = Wt(r);
1962
2012
  return e.useEffect(function() {
1963
2013
  if (f != null) {
1964
2014
  if (r == null) {
@@ -1967,15 +2017,15 @@ var $t = function() {
1967
2017
  }
1968
2018
  r.clientSecret === void 0 && r.fetchClientSecret === void 0 && console.warn("Invalid props passed to EmbeddedCheckoutProvider: You must provide one of either `options.fetchClientSecret` or `options.clientSecret`."), f.clientSecret != null && r.clientSecret !== f.clientSecret && console.warn("Unsupported prop change on EmbeddedCheckoutProvider: You cannot change the client secret after setting it. Unmount and create a new instance of EmbeddedCheckoutProvider instead."), f.fetchClientSecret != null && r.fetchClientSecret !== f.fetchClientSecret && console.warn("Unsupported prop change on EmbeddedCheckoutProvider: You cannot change fetchClientSecret after setting it. Unmount and create a new instance of EmbeddedCheckoutProvider instead."), f.onComplete != null && r.onComplete !== f.onComplete && console.warn("Unsupported prop change on EmbeddedCheckoutProvider: You cannot change the onComplete option after setting it."), f.onShippingDetailsChange != null && r.onShippingDetailsChange !== f.onShippingDetailsChange && console.warn("Unsupported prop change on EmbeddedCheckoutProvider: You cannot change the onShippingDetailsChange option after setting it."), f.onLineItemsChange != null && r.onLineItemsChange !== f.onLineItemsChange && console.warn("Unsupported prop change on EmbeddedCheckoutProvider: You cannot change the onLineItemsChange option after setting it.");
1969
2019
  }
1970
- }, [f, r]), /* @__PURE__ */ e.createElement(Qt.Provider, { value: l }, i);
1971
- }, nn = $ ? function(t) {
2020
+ }, [f, r]), /* @__PURE__ */ e.createElement(un.Provider, { value: l }, i);
2021
+ }, mn = $ ? function(t) {
1972
2022
  var n = t.id, r = t.className;
1973
- return $t(), /* @__PURE__ */ e.createElement("div", {
2023
+ return dn(), /* @__PURE__ */ e.createElement("div", {
1974
2024
  id: n,
1975
2025
  className: r
1976
2026
  });
1977
2027
  } : function(t) {
1978
- var n = t.id, r = t.className, i = $t().embeddedCheckout, a = e.useRef(!1), o = e.useRef(null);
2028
+ var n = t.id, r = t.className, i = dn().embeddedCheckout, a = e.useRef(!1), o = e.useRef(null);
1979
2029
  return e.useLayoutEffect(function() {
1980
2030
  return !a.current && i && o.current !== null && (i.mount(o.current), a.current = !0), function() {
1981
2031
  if (a.current && i) try {
@@ -1991,100 +2041,100 @@ var $t = function() {
1991
2041
  Q("auBankAccount", $), Q("card", $), Q("cardNumber", $), Q("cardExpiry", $), Q("cardCvc", $), Q("iban", $), Q("payment", $), Q("expressCheckout", $), Q("paymentRequestButton", $), Q("linkAuthentication", $), Q("contactDetails", $), Q("address", $), Q("shippingAddress", $), Q("paymentMethodMessaging", $), Q("taxId", $), Q("issuingCardNumberDisplay", $), Q("issuingCardCvcDisplay", $), Q("issuingCardExpiryDisplay", $), Q("issuingCardPinDisplay", $), Q("issuingCardCopyButton", $);
1992
2042
  //#endregion
1993
2043
  //#region node_modules/@stripe/stripe-js/dist/index.mjs
1994
- function rn(e) {
2044
+ function hn(e) {
1995
2045
  "@babel/helpers - typeof";
1996
- return rn = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
2046
+ return hn = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
1997
2047
  return typeof e;
1998
2048
  } : function(e) {
1999
2049
  return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
2000
- }, rn(e);
2050
+ }, hn(e);
2001
2051
  }
2002
- var an = "dahlia", on = function(e) {
2052
+ var gn = "dahlia", _n = function(e) {
2003
2053
  return e === 3 ? "v3" : e;
2004
- }, sn = "https://js.stripe.com", cn = `${sn}/${an}/stripe.js`, ln = /^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/, un = /^https:\/\/js\.stripe\.com\/(v3|[a-z]+)\/stripe\.js(\?.*)?$/, dn = "loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used", fn = function(e) {
2005
- return ln.test(e) || un.test(e);
2006
- }, pn = function() {
2007
- for (var e = document.querySelectorAll(`script[src^="${sn}"]`), t = 0; t < e.length; t++) {
2054
+ }, vn = "https://js.stripe.com", yn = `${vn}/${gn}/stripe.js`, bn = /^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/, xn = /^https:\/\/js\.stripe\.com\/(v3|[a-z]+)\/stripe\.js(\?.*)?$/, Sn = "loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used", Cn = function(e) {
2055
+ return bn.test(e) || xn.test(e);
2056
+ }, wn = function() {
2057
+ for (var e = document.querySelectorAll(`script[src^="${vn}"]`), t = 0; t < e.length; t++) {
2008
2058
  var n = e[t];
2009
- if (fn(n.src)) return n;
2059
+ if (Cn(n.src)) return n;
2010
2060
  }
2011
2061
  return null;
2012
- }, mn = function(e) {
2062
+ }, Tn = function(e) {
2013
2063
  var t = e && !e.advancedFraudSignals ? "?advancedFraudSignals=false" : "", n = document.createElement("script");
2014
- n.src = `${cn}${t}`;
2064
+ n.src = `${yn}${t}`;
2015
2065
  var r = document.head || document.body;
2016
2066
  if (!r) throw Error("Expected document.body not to be null. Stripe.js requires a <body> element.");
2017
2067
  return r.appendChild(n), n;
2018
- }, hn = function(e, t) {
2068
+ }, En = function(e, t) {
2019
2069
  !e || !e._registerWrapper || e._registerWrapper({
2020
2070
  name: "stripe-js",
2021
2071
  version: "9.6.0",
2022
2072
  startTime: t
2023
2073
  });
2024
- }, gn = null, _n = null, vn = null, yn = function(e) {
2074
+ }, Dn = null, On = null, kn = null, An = function(e) {
2025
2075
  return function(t) {
2026
2076
  e(Error("Failed to load Stripe.js", { cause: t }));
2027
2077
  };
2028
- }, bn = function(e, t) {
2078
+ }, jn = function(e, t) {
2029
2079
  return function() {
2030
2080
  window.Stripe ? e(window.Stripe) : t(/* @__PURE__ */ Error("Stripe.js not available"));
2031
2081
  };
2032
- }, xn = function(e) {
2033
- return gn === null ? (gn = new Promise(function(t, n) {
2082
+ }, Mn = function(e) {
2083
+ return Dn === null ? (Dn = new Promise(function(t, n) {
2034
2084
  if (typeof window > "u" || typeof document > "u") {
2035
2085
  t(null);
2036
2086
  return;
2037
2087
  }
2038
- if (window.Stripe && e && console.warn(dn), window.Stripe) {
2088
+ if (window.Stripe && e && console.warn(Sn), window.Stripe) {
2039
2089
  t(window.Stripe);
2040
2090
  return;
2041
2091
  }
2042
2092
  try {
2043
- var r = pn();
2044
- if (r && e) console.warn(dn);
2045
- else if (!r) r = mn(e);
2046
- else if (r && vn !== null && _n !== null) {
2093
+ var r = wn();
2094
+ if (r && e) console.warn(Sn);
2095
+ else if (!r) r = Tn(e);
2096
+ else if (r && kn !== null && On !== null) {
2047
2097
  var i;
2048
- r.removeEventListener("load", vn), r.removeEventListener("error", _n), (i = r.parentNode) == null || i.removeChild(r), r = mn(e);
2098
+ r.removeEventListener("load", kn), r.removeEventListener("error", On), (i = r.parentNode) == null || i.removeChild(r), r = Tn(e);
2049
2099
  }
2050
- vn = bn(t, n), _n = yn(n), r.addEventListener("load", vn), r.addEventListener("error", _n);
2100
+ kn = jn(t, n), On = An(n), r.addEventListener("load", kn), r.addEventListener("error", On);
2051
2101
  } catch (e) {
2052
2102
  n(e);
2053
2103
  return;
2054
2104
  }
2055
- }), gn.catch(function(e) {
2056
- return gn = null, Promise.reject(e);
2057
- })) : gn;
2058
- }, Sn = function(e, t, n) {
2105
+ }), Dn.catch(function(e) {
2106
+ return Dn = null, Promise.reject(e);
2107
+ })) : Dn;
2108
+ }, Nn = function(e, t, n) {
2059
2109
  if (e === null) return null;
2060
2110
  var r = t[0];
2061
- if (typeof r != "string") throw Error(`Expected publishable key to be of type string, got type ${rn(r)} instead.`);
2062
- var i = r.match(/^pk_test/), a = on(e.version), o = an;
2111
+ if (typeof r != "string") throw Error(`Expected publishable key to be of type string, got type ${hn(r)} instead.`);
2112
+ var i = r.match(/^pk_test/), a = _n(e.version), o = gn;
2063
2113
  i && a !== o && console.warn(`Stripe.js@${a} was loaded on the page, but @stripe/stripe-js@9.6.0 expected Stripe.js@${o}. This may result in unexpected behavior. For more information, see https://docs.stripe.com/sdks/stripejs-versioning`);
2064
2114
  var s = e.apply(void 0, t);
2065
- return hn(s, n), s;
2066
- }, Cn, wn = !1, Tn = function() {
2067
- return Cn || (Cn = xn(null).catch(function(e) {
2068
- return Cn = null, Promise.reject(e);
2069
- }), Cn);
2115
+ return En(s, n), s;
2116
+ }, Pn, Fn = !1, In = function() {
2117
+ return Pn || (Pn = Mn(null).catch(function(e) {
2118
+ return Pn = null, Promise.reject(e);
2119
+ }), Pn);
2070
2120
  };
2071
2121
  Promise.resolve().then(function() {
2072
- return Tn();
2122
+ return In();
2073
2123
  }).catch(function(e) {
2074
- wn || console.warn(e);
2124
+ Fn || console.warn(e);
2075
2125
  });
2076
- var En = function() {
2126
+ var Ln = function() {
2077
2127
  var e = [...arguments];
2078
- wn = !0;
2128
+ Fn = !0;
2079
2129
  var t = Date.now();
2080
- return Tn().then(function(n) {
2081
- return Sn(n, e, t);
2130
+ return In().then(function(n) {
2131
+ return Nn(n, e, t);
2082
2132
  });
2083
2133
  };
2084
2134
  //#endregion
2085
2135
  //#region src/header/components/StripePaymentModal.tsx
2086
- function Dn({ visible: e, publishableKey: s, order: c, text: l, onCancel: u, onSuccess: d }) {
2087
- let f = r(() => s ? En(s) : null, [s]), [p, m] = a(""), h = i(d), g = c?.clientSecret || c?.stripeClientSecret, _ = t(() => {
2136
+ function Rn({ visible: e, publishableKey: s, order: c, text: l, onCancel: u, onSuccess: d }) {
2137
+ let f = r(() => s ? Ln(s) : null, [s]), [p, m] = a(""), h = i(d), g = c?.clientSecret || c?.stripeClientSecret, _ = t(() => {
2088
2138
  h.current();
2089
2139
  }, []), y = r(() => g ? {
2090
2140
  clientSecret: g,
@@ -2115,10 +2165,10 @@ function Dn({ visible: e, publishableKey: s, order: c, text: l, onCancel: u, onS
2115
2165
  type: "secondary",
2116
2166
  className: "text-sm! leading-6!",
2117
2167
  children: l.stripePaymentDescription
2118
- }), /* @__PURE__ */ L(tn, {
2168
+ }), /* @__PURE__ */ L(pn, {
2119
2169
  stripe: f,
2120
2170
  options: y,
2121
- children: /* @__PURE__ */ L(nn, { className: "min-h-[620px] w-full flex-1" })
2171
+ children: /* @__PURE__ */ L(mn, { className: "min-h-[620px] w-full flex-1" })
2122
2172
  }, g)]
2123
2173
  }) : /* @__PURE__ */ L(o, {
2124
2174
  type: "error",
@@ -2152,14 +2202,14 @@ function Dn({ visible: e, publishableKey: s, order: c, text: l, onCancel: u, onS
2152
2202
  }
2153
2203
  //#endregion
2154
2204
  //#region src/header/components/UserMenu.tsx
2155
- function On({ user: e, points: t, text: n, onEditProfile: r, onRecharge: i, onPointsDetail: a, onLogout: o }) {
2205
+ function zn({ user: e, points: t, text: n, onEditProfile: r, onRecharge: i, onPointsDetail: a, onLogout: o }) {
2156
2206
  let s = (e) => new Intl.NumberFormat().format(e);
2157
2207
  return /* @__PURE__ */ R("div", {
2158
2208
  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%)]",
2159
2209
  children: [
2160
2210
  /* @__PURE__ */ R("div", {
2161
2211
  className: "flex items-center gap-3 px-6 pt-5 pb-4",
2162
- children: [/* @__PURE__ */ L(lt, {
2212
+ children: [/* @__PURE__ */ L(yt, {
2163
2213
  user: e,
2164
2214
  size: 48,
2165
2215
  className: "shrink-0"
@@ -2248,71 +2298,83 @@ function On({ user: e, points: t, text: n, onEditProfile: r, onRecharge: i, onPo
2248
2298
  }
2249
2299
  //#endregion
2250
2300
  //#region src/header/ManturHeader.tsx
2251
- var kn = "https://mantur.ai/images/logo.png", An = [
2301
+ var Bn = "https://mantur.ai/images/logo.png", Vn = [
2252
2302
  "from-arco-primary-light-1 to-arco-primary-light-2 text-arco-primary-6",
2253
2303
  "from-arco-success-light-1 to-arco-success-light-2 text-arco-success-6",
2254
2304
  "from-arco-warning-light-1 to-arco-warning-light-2 text-arco-warning-6",
2255
2305
  "from-arco-danger-light-1 to-arco-danger-light-2 text-arco-danger-6"
2256
2306
  ];
2257
- function jn(e, t = !1) {
2258
- 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 ${An[e % An.length]} ${t ? "shadow-[inset_0_1px_3px_rgb(0_0_0/8%)]" : ""}`;
2307
+ function Hn(e, t = !1) {
2308
+ 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 ${Vn[e % Vn.length]} ${t ? "shadow-[inset_0_1px_3px_rgb(0_0_0/8%)]" : ""}`;
2259
2309
  }
2260
- function Mn(e) {
2310
+ function Un(e) {
2261
2311
  return e?.tenantName?.[0]?.toUpperCase() || "T";
2262
2312
  }
2263
- function Nn(e, t, n) {
2313
+ function Wn(e, t, n) {
2264
2314
  let r = e?.roles?.map((e) => e.roleName).filter(Boolean);
2265
2315
  return r?.length ? r.join(", ") : e?.isOwner ? t : n;
2266
2316
  }
2267
- function Pn(e) {
2317
+ function Gn(e) {
2268
2318
  return e?.paymentUrl || e?.checkoutUrl || e?.url || e?.returnUrl;
2269
2319
  }
2270
- function Fn(e) {
2320
+ function Kn(e) {
2271
2321
  return e?.clientSecret || e?.stripeClientSecret;
2272
2322
  }
2273
- function In({ user: e, disabled: o = !1, brandSlot: s, children: c, onTenantContextChange: l, stripePublishableKey: u }) {
2274
- let [d, p] = a(() => He()), m = Ue(d), [h, v] = a(!1), [y, b] = a(!1), [x, S] = a(!1), [C, w] = a(e), [T, E] = a([]), [D, k] = a(), [A, j] = a(!1), [M, N] = a(!1), [P, F] = a(!1), [I, ee] = a([]), [te, z] = a(), B = i(l), ne = u || (typeof window < "u" ? window.__MANTUR_COMPONENTS_STRIPE_PUBLISHABLE_KEY__ : void 0) || "pk_test_51TJ8JiERSsQknDG7bJSIX81RFq3LcCfUXCV7mh0cQsZ2dwmYcJ5Ki6bPXynNvdyZEEBE83I6I719NIFyO9Qreey700yPAul8sv", [V, re] = a({
2323
+ function qn(e) {
2324
+ return e || (typeof window > "u" ? "popup=yes,width=1440,height=960,left=0,top=0" : `popup=yes,width=${window.screen?.availWidth || window.innerWidth || 1440},height=${window.screen?.availHeight || window.innerHeight || 960},left=0,top=0`);
2325
+ }
2326
+ function Jn({ user: e, disabled: o = !1, brandSlot: s, children: c, onTenantContextChange: l, stripePublishableKey: u, stripePaymentWindowFeatures: d }) {
2327
+ let [p, m] = a(() => Ve()), h = He(p), [v, y] = a(!1), [b, x] = a(!1), [S, C] = a(!1), [w, T] = a(e), [E, D] = a([]), [k, A] = a(), [j, M] = a(!1), [N, P] = a(!1), [F, I] = a(!1), [ee, te] = a([]), [ne, z] = a(), re = i(l), B = i(null), ie = u || (typeof window < "u" ? window.__MANTUR_COMPONENTS_STRIPE_PUBLISHABLE_KEY__ : void 0) || "pk_test_51TJ8JiERSsQknDG7bJSIX81RFq3LcCfUXCV7mh0cQsZ2dwmYcJ5Ki6bPXynNvdyZEEBE83I6I719NIFyO9Qreey700yPAul8sv", [V, H] = a({
2275
2328
  total: 0,
2276
2329
  recharge: 0,
2277
2330
  gifted: 0
2278
- }), H = D?.tenantId || "", U = o, W = {
2331
+ }), U = k?.tenantId || "", W = o, ae = {
2279
2332
  total: V.total ?? 0,
2280
2333
  recharge: V.recharge ?? 0,
2281
2334
  gifted: V.gifted ?? 0
2282
- }, ie = async (e) => {
2335
+ }, oe = async (e) => {
2283
2336
  let t = await ge(e);
2284
- return t && w(t), t;
2337
+ return t && T(t), t;
2285
2338
  };
2286
2339
  n(() => {
2287
- w(e);
2340
+ T(e);
2288
2341
  }, [e]), n(() => {
2289
- B.current = l;
2342
+ re.current = l;
2290
2343
  }, [l]);
2291
2344
  let G = t((e) => {
2292
- E(e.tenants), k(e.currentTenant), B.current?.(e);
2345
+ D(e.tenants), A(e.currentTenant), re.current?.(e);
2293
2346
  }, []);
2294
2347
  n(() => {
2295
- j(!0), Me().then(G).catch((e) => {
2296
- console.warn("Failed to refresh Mantur tenant context.", e), _.error(m.error);
2297
- }).finally(() => j(!1));
2298
- }, [G, m.error]), n(() => {
2348
+ M(!0), je().then(G).catch((e) => {
2349
+ console.warn("Failed to refresh Mantur tenant context.", e), _.error(h.error);
2350
+ }).finally(() => M(!1));
2351
+ }, [G, h.error]), n(() => {
2299
2352
  let e = (e) => {
2300
- e instanceof CustomEvent && re(e.detail);
2353
+ e instanceof CustomEvent && H(e.detail);
2301
2354
  };
2302
- return window.addEventListener(oe, e), ye().catch((e) => {
2355
+ return window.addEventListener(se, e), q().catch((e) => {
2303
2356
  console.warn("Failed to refresh Mantur user points.", e);
2304
2357
  }), () => {
2305
- window.removeEventListener(oe, e);
2358
+ window.removeEventListener(se, e);
2306
2359
  };
2307
2360
  }, []), n(() => {
2308
2361
  let e = (e) => {
2309
- p(e instanceof CustomEvent ? q(e.detail) : He());
2362
+ m(e instanceof CustomEvent ? J(e.detail) : Ve());
2310
2363
  };
2311
- return window.addEventListener(Be, e), window.addEventListener("storage", e), () => {
2312
- window.removeEventListener(Be, e), window.removeEventListener("storage", e);
2364
+ return window.addEventListener(ze, e), window.addEventListener("storage", e), () => {
2365
+ window.removeEventListener(ze, e), window.removeEventListener("storage", e);
2313
2366
  };
2314
2367
  }, []), n(() => {
2315
- y && (N(!0), be().then((e) => {
2368
+ let e = (e) => {
2369
+ e.origin === window.location.origin && (B.current && e.source !== B.current || et(e.data) && (B.current?.close(), B.current = null, z(void 0), e.data.action === "success" && _.success(h.rechargeSuccess), q().catch((e) => {
2370
+ console.warn("Failed to refresh Mantur user points.", e);
2371
+ })));
2372
+ };
2373
+ return window.addEventListener("message", e), () => {
2374
+ window.removeEventListener("message", e);
2375
+ };
2376
+ }, [h.rechargeSuccess]), n(() => {
2377
+ b && (P(!0), ye().then((e) => {
2316
2378
  let t = e.filter((e) => e.id && e.amount !== void 0 && e.points !== void 0).sort((e, t) => (e.sortOrder ?? 0) - (t.sortOrder ?? 0)).map((e) => ({
2317
2379
  id: e.id,
2318
2380
  packageCode: e.packageCode,
@@ -2323,36 +2385,50 @@ function In({ user: e, disabled: o = !1, brandSlot: s, children: c, onTenantCont
2323
2385
  recommended: e.isRecommended,
2324
2386
  sortOrder: e.sortOrder
2325
2387
  }));
2326
- t.length > 0 && ee(t);
2388
+ t.length > 0 && te(t);
2327
2389
  }).catch((e) => {
2328
2390
  console.warn("Failed to load Mantur recharge packages.", e);
2329
- }).finally(() => N(!1)));
2330
- }, [y]);
2331
- let ae = (e) => {
2391
+ }).finally(() => P(!1)));
2392
+ }, [b]);
2393
+ let le = (e) => {
2332
2394
  _.success(e);
2333
- }, ce = (e, t) => {
2395
+ }, ue = (e, t) => {
2334
2396
  console.error(t), _.error(e);
2335
- }, le = t(async (e) => {
2336
- if (!U && e !== H) try {
2337
- j(!0), G(await Ne(e)), ae(m.switchedToTeam);
2397
+ }, de = t(async (e) => {
2398
+ if (!W && e !== U) try {
2399
+ M(!0), G(await Me(e)), le(h.switchedToTeam);
2338
2400
  } catch (e) {
2339
- ce(m.error, e);
2401
+ ue(h.error, e);
2340
2402
  } finally {
2341
- j(!1);
2403
+ M(!1);
2342
2404
  }
2343
2405
  }, [
2344
2406
  G,
2345
- H,
2346
2407
  U,
2347
- m.error,
2348
- m.switchedToTeam
2349
- ]), ue = async (e) => {
2408
+ W,
2409
+ h.error,
2410
+ h.switchedToTeam
2411
+ ]), fe = async (e) => {
2350
2412
  try {
2351
- F(!0);
2352
- let t = await xe({ ..."custom" in e && e.custom ? { customAmount: e.price } : { packageId: e.id } });
2353
- typeof window < "u" && window.dispatchEvent(new CustomEvent(se, { detail: t })), _.success(m.rechargeOrderCreated), b(!1);
2354
- let n = Pn(t);
2355
- if (Fn(t)) {
2413
+ I(!0);
2414
+ let t = await be({ ..."custom" in e && e.custom ? { customAmount: e.price } : { packageId: e.id } });
2415
+ if (!t) {
2416
+ _.error(h.stripePaymentClientSecretMissing);
2417
+ return;
2418
+ }
2419
+ typeof window < "u" && window.dispatchEvent(new CustomEvent(ce, { detail: t })), _.success(h.rechargeOrderCreated), x(!1);
2420
+ let n = Gn(t);
2421
+ if (Kn(t)) {
2422
+ let e = it(t);
2423
+ if (e) {
2424
+ let t = window.open(e, "mantur-stripe-payment", qn(d));
2425
+ if (t) {
2426
+ B.current = t, t.focus();
2427
+ return;
2428
+ }
2429
+ window.location.href = e;
2430
+ return;
2431
+ }
2356
2432
  z(t);
2357
2433
  return;
2358
2434
  }
@@ -2360,26 +2436,26 @@ function In({ user: e, disabled: o = !1, brandSlot: s, children: c, onTenantCont
2360
2436
  window.location.href = n;
2361
2437
  return;
2362
2438
  }
2363
- _.error(m.stripePaymentClientSecretMissing);
2439
+ _.error(h.stripePaymentClientSecretMissing);
2364
2440
  } catch (e) {
2365
- ce(m.error, e);
2441
+ ue(h.error, e);
2366
2442
  } finally {
2367
- F(!1);
2443
+ I(!1);
2368
2444
  }
2369
- }, de = r(() => /* @__PURE__ */ R(g, {
2445
+ }, pe = r(() => /* @__PURE__ */ R(g, {
2370
2446
  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",
2371
- selectedKeys: H ? [H] : [],
2372
- onClickMenuItem: le,
2447
+ selectedKeys: U ? [U] : [],
2448
+ onClickMenuItem: de,
2373
2449
  children: [/* @__PURE__ */ L("div", {
2374
2450
  className: "px-3 py-2 text-xs font-semibold tracking-[0.04em] text-arco-text-4 uppercase",
2375
- children: m.switchTeam
2376
- }), T.map((e, t) => /* @__PURE__ */ L(g.Item, {
2451
+ children: h.switchTeam
2452
+ }), E.map((e, t) => /* @__PURE__ */ L(g.Item, {
2377
2453
  className: "mb-1 h-auto! min-h-10! overflow-visible! rounded-lg! px-2! py-1! leading-normal!",
2378
2454
  children: /* @__PURE__ */ R("div", {
2379
2455
  className: "flex w-full items-center gap-3 leading-normal",
2380
2456
  children: [/* @__PURE__ */ L("div", {
2381
- className: jn(t),
2382
- children: Mn(e)
2457
+ className: Hn(t),
2458
+ children: Un(e)
2383
2459
  }), /* @__PURE__ */ R("div", {
2384
2460
  className: "flex min-w-0 flex-col justify-center gap-0.75",
2385
2461
  children: [/* @__PURE__ */ L("span", {
@@ -2387,25 +2463,25 @@ function In({ user: e, disabled: o = !1, brandSlot: s, children: c, onTenantCont
2387
2463
  children: e.tenantName
2388
2464
  }), /* @__PURE__ */ L("span", {
2389
2465
  className: "text-xs leading-4 text-arco-text-3",
2390
- children: Nn(e, m.owner, m.member)
2466
+ children: Wn(e, h.owner, h.member)
2391
2467
  })]
2392
2468
  })]
2393
2469
  })
2394
2470
  }, e.tenantId))]
2395
2471
  }), [
2396
- le,
2397
- H,
2398
- T,
2399
- m
2400
- ]), fe = /* @__PURE__ */ L(On, {
2401
- user: C,
2402
- points: W,
2403
- text: m,
2404
- onEditProfile: () => v(!0),
2405
- onRecharge: () => b(!0),
2406
- onPointsDetail: () => S(!0),
2472
+ de,
2473
+ U,
2474
+ E,
2475
+ h
2476
+ ]), me = /* @__PURE__ */ L(zn, {
2477
+ user: w,
2478
+ points: ae,
2479
+ text: h,
2480
+ onEditProfile: () => y(!0),
2481
+ onRecharge: () => x(!0),
2482
+ onPointsDetail: () => C(!0),
2407
2483
  onLogout: he
2408
- }), pe = Math.max(0, T.findIndex((e) => e.tenantId === D?.tenantId));
2484
+ }), K = Math.max(0, E.findIndex((e) => e.tenantId === k?.tenantId));
2409
2485
  return /* @__PURE__ */ R("div", {
2410
2486
  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",
2411
2487
  children: [
@@ -2416,7 +2492,7 @@ function In({ user: e, disabled: o = !1, brandSlot: s, children: c, onTenantCont
2416
2492
  children: [/* @__PURE__ */ L("div", {
2417
2493
  className: "relative flex w-12 items-center justify-center overflow-hidden ",
2418
2494
  children: /* @__PURE__ */ L("img", {
2419
- src: kn,
2495
+ src: Bn,
2420
2496
  alt: "logo",
2421
2497
  className: "w-full object-contain",
2422
2498
  onError: (e) => {
@@ -2425,29 +2501,29 @@ function In({ user: e, disabled: o = !1, brandSlot: s, children: c, onTenantCont
2425
2501
  })
2426
2502
  }), s ?? /* @__PURE__ */ L("span", {
2427
2503
  className: "text-lg font-bold tracking-normal text-arco-text-1",
2428
- children: m.title
2504
+ children: h.title
2429
2505
  })]
2430
2506
  }), /* @__PURE__ */ L(f, {
2431
- droplist: de,
2507
+ droplist: pe,
2432
2508
  trigger: "click",
2433
2509
  position: "bl",
2434
- disabled: U,
2510
+ disabled: W,
2435
2511
  children: /* @__PURE__ */ R("div", {
2436
- "aria-disabled": U,
2437
- className: `flex items-center gap-3 rounded-full border border-arco-border-1 bg-arco-bg-1 px-2 py-1.5 transition-all ${U ? "cursor-not-allowed opacity-60" : "cursor-pointer hover:bg-arco-fill-2 hover:shadow-[0_4px_12px_rgb(0_0_0/8%)]"}`,
2512
+ "aria-disabled": W,
2513
+ className: `flex items-center gap-3 rounded-full border border-arco-border-1 bg-arco-bg-1 px-2 py-1.5 transition-all ${W ? "cursor-not-allowed opacity-60" : "cursor-pointer hover:bg-arco-fill-2 hover:shadow-[0_4px_12px_rgb(0_0_0/8%)]"}`,
2438
2514
  children: [
2439
2515
  /* @__PURE__ */ L("div", {
2440
- className: jn(pe, !0),
2441
- children: Mn(D)
2516
+ className: Hn(K, !0),
2517
+ children: Un(k)
2442
2518
  }),
2443
2519
  /* @__PURE__ */ R("div", {
2444
2520
  className: "flex min-w-0 flex-col",
2445
2521
  children: [/* @__PURE__ */ L("span", {
2446
2522
  className: "text-xs leading-none font-bold text-arco-text-1",
2447
- children: A ? m.loading : D?.tenantName || m.loading
2523
+ children: j ? h.loading : k?.tenantName || h.loading
2448
2524
  }), /* @__PURE__ */ L("span", {
2449
2525
  className: "mt-1 text-[10px] leading-none text-arco-text-3",
2450
- children: Nn(D, m.owner, m.member)
2526
+ children: Wn(k, h.owner, h.member)
2451
2527
  })]
2452
2528
  }),
2453
2529
  /* @__PURE__ */ L(O, { className: "ml-1 text-arco-text-3" })
@@ -2463,13 +2539,13 @@ function In({ user: e, disabled: o = !1, brandSlot: s, children: c, onTenantCont
2463
2539
  className: "flex items-center gap-4",
2464
2540
  children: [/* @__PURE__ */ R("div", {
2465
2541
  className: "flex items-center gap-4",
2466
- children: [/* @__PURE__ */ L(Je, {}), /* @__PURE__ */ L(qe, {})]
2542
+ children: [/* @__PURE__ */ L(qe, {}), /* @__PURE__ */ L(Ke, {})]
2467
2543
  }), /* @__PURE__ */ L(f, {
2468
- droplist: fe,
2544
+ droplist: me,
2469
2545
  trigger: "click",
2470
2546
  position: "br",
2471
2547
  onVisibleChange: (e) => {
2472
- e && ye().catch((e) => {
2548
+ e && q().catch((e) => {
2473
2549
  console.warn("Failed to refresh Mantur user points.", e);
2474
2550
  });
2475
2551
  },
@@ -2478,8 +2554,8 @@ function In({ user: e, disabled: o = !1, brandSlot: s, children: c, onTenantCont
2478
2554
  children: [
2479
2555
  /* @__PURE__ */ R("div", {
2480
2556
  className: "from-arco-primary to-transparent relative rounded-full bg-linear-to-br p-0.5 shadow-sm",
2481
- children: [/* @__PURE__ */ L(lt, {
2482
- user: C,
2557
+ children: [/* @__PURE__ */ L(yt, {
2558
+ user: w,
2483
2559
  size: 36
2484
2560
  }), /* @__PURE__ */ L("div", { className: "bg-arco-success border-arco-bg-white absolute right-0 bottom-0 h-3 w-3 rounded-full border-2 shadow-sm" })]
2485
2561
  }),
@@ -2487,7 +2563,7 @@ function In({ user: e, disabled: o = !1, brandSlot: s, children: c, onTenantCont
2487
2563
  className: "hidden flex-col md:flex",
2488
2564
  children: /* @__PURE__ */ L("span", {
2489
2565
  className: "text-arco-text-1 text-sm font-medium",
2490
- children: C?.nickname || C?.username
2566
+ children: w?.nickname || w?.username
2491
2567
  })
2492
2568
  }),
2493
2569
  /* @__PURE__ */ L(O, { className: "text-arco-text-3 ml-1" })
@@ -2495,39 +2571,39 @@ function In({ user: e, disabled: o = !1, brandSlot: s, children: c, onTenantCont
2495
2571
  })
2496
2572
  })]
2497
2573
  }),
2498
- /* @__PURE__ */ L(st, {
2499
- visible: h,
2500
- user: C,
2501
- labels: m,
2502
- onCancel: () => v(!1),
2503
- onSubmit: ie
2574
+ /* @__PURE__ */ L(_t, {
2575
+ visible: v,
2576
+ user: w,
2577
+ labels: h,
2578
+ onCancel: () => y(!1),
2579
+ onSubmit: oe
2504
2580
  }),
2505
- /* @__PURE__ */ L(ft, {
2506
- visible: y,
2507
- user: C,
2508
- points: W,
2509
- text: m,
2510
- packages: I,
2511
- packageLoading: M,
2512
- submitting: P,
2513
- onCancel: () => b(!1),
2514
- onPay: ue
2581
+ /* @__PURE__ */ L(St, {
2582
+ visible: b,
2583
+ user: w,
2584
+ points: ae,
2585
+ text: h,
2586
+ packages: ee,
2587
+ packageLoading: N,
2588
+ submitting: F,
2589
+ onCancel: () => x(!1),
2590
+ onPay: fe
2515
2591
  }),
2516
- /* @__PURE__ */ L(tt, {
2517
- visible: x,
2518
- points: W,
2519
- text: m,
2520
- onCancel: () => S(!1),
2521
- onRecharge: () => b(!0)
2592
+ /* @__PURE__ */ L(dt, {
2593
+ visible: S,
2594
+ points: ae,
2595
+ text: h,
2596
+ onCancel: () => C(!1),
2597
+ onRecharge: () => x(!0)
2522
2598
  }),
2523
- /* @__PURE__ */ L(Dn, {
2524
- visible: !!te,
2525
- publishableKey: ne,
2526
- order: te,
2527
- text: m,
2599
+ /* @__PURE__ */ L(Rn, {
2600
+ visible: !!ne,
2601
+ publishableKey: ie,
2602
+ order: ne,
2603
+ text: h,
2528
2604
  onCancel: () => z(void 0),
2529
2605
  onSuccess: () => {
2530
- _.success(m.rechargeSuccess), z(void 0), ye().catch((e) => {
2606
+ _.success(h.rechargeSuccess), z(void 0), q().catch((e) => {
2531
2607
  console.warn("Failed to refresh Mantur user points.", e);
2532
2608
  });
2533
2609
  }
@@ -2537,7 +2613,7 @@ function In({ user: e, disabled: o = !1, brandSlot: s, children: c, onTenantCont
2537
2613
  }
2538
2614
  //#endregion
2539
2615
  //#region src/utils/date.ts
2540
- var Ln = /* @__PURE__ */ ie((/* @__PURE__ */ U(((e, t) => {
2616
+ var Yn = /* @__PURE__ */ W((/* @__PURE__ */ H(((e, t) => {
2541
2617
  (function(n, r) {
2542
2618
  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();
2543
2619
  })(e, (function() {
@@ -2832,27 +2908,10 @@ var Ln = /* @__PURE__ */ ie((/* @__PURE__ */ U(((e, t) => {
2832
2908
  }, w.en = b[y], w.Ls = b, w.p = {}, w;
2833
2909
  }));
2834
2910
  })))(), 1);
2835
- function Rn(e, t = "datetime", n) {
2911
+ function Xn(e, t = "datetime", n) {
2836
2912
  if (!e) return "-";
2837
- let r = (n ? q(n) : He()).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";
2838
- return (0, Ln.default)(e).format(i);
2839
- }
2840
- //#endregion
2841
- //#region src/utils/url.ts
2842
- var zn = () => {
2843
- if (typeof window > "u" || !window.location?.href) throw Error("redirectToManturMain requires currentUrl when window.location is unavailable.");
2844
- return window.location.href;
2845
- }, Bn = (e, t) => {
2846
- let n = e.split(".");
2847
- return n.length <= 1 ? t : [t, ...n.slice(1)].join(".");
2848
- }, Vn = (e) => `${e.pathname}${e.search}${e.hash}`;
2849
- function Hn(e, t, n = {}) {
2850
- let r = new URL(n.currentUrl || zn()), i = new URL(r.toString()), a = e?.trim();
2851
- a ? i.hostname = Bn(r.hostname, a) : i.port = "80";
2852
- let o = Vn(r);
2853
- i.pathname = "/login", i.searchParams.set("app", t?.trim()), i.searchParams.set("redirect", o);
2854
- let s = i.toString();
2855
- return n.navigate !== !1 && typeof window < "u" && (window.location.href = s), s;
2913
+ let r = (n ? J(n) : Ve()).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";
2914
+ return (0, Yn.default)(e).format(i);
2856
2915
  }
2857
2916
  //#endregion
2858
- export { oe as MANTUR_POINTS_REFRESH_EVENT, se as MANTUR_RECHARGE_ORDER_CREATED_EVENT, ce as MANTUR_TENANT_CONTEXT_CHANGE_EVENT, In as ManturHeader, xe as createManturRechargeOrder, Rn as formatDateByLang, Te as getManturBillingAccount, Ee as getManturBillingLedger, be as getManturBillingPackages, we as getManturPricingChargePoint, Ce as getManturPricingChargePoints, Se as getManturRechargeOrder, Hn as redirectToManturMain, Me as refreshManturTenantContext, ye as refreshManturUserPoints };
2917
+ export { se as MANTUR_POINTS_REFRESH_EVENT, ce as MANTUR_RECHARGE_ORDER_CREATED_EVENT, $e as MANTUR_STRIPE_PAYMENT_ROUTE, Qe as MANTUR_STRIPE_PAYMENT_WINDOW_MESSAGE_TYPE, G as MANTUR_TENANT_CONTEXT_CHANGE_EVENT, Jn as ManturHeader, be as createManturRechargeOrder, Xn as formatDateByLang, we as getManturBillingAccount, Te as getManturBillingLedger, ye as getManturBillingPackages, Ce as getManturPricingChargePoint, Se as getManturPricingChargePoints, xe as getManturRechargeOrder, et as isManturStripePaymentWindowMessage, tt as postManturStripePaymentWindowMessage, Ze as redirectToManturMain, je as refreshManturTenantContext, q as refreshManturUserPoints, it as resolveManturStripePaymentPageUrl };