@fluid-app/fluid-cli-theme-dev 0.1.718 → 0.1.719

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,62 +1,62 @@
1
- import { c as Y, i as mt, l as v, j as n, G as ht, J as le, al as pt, am as ne, X as ce, an as gt, $ as E, I as je, Z as A, B as de, D as Ae, E as ue, x as xt, Y as $, ao as _t, _ as H, aj as T, ap as bt, aq as vt, ai as yt, P as jt, ar as J, z as fe, a3 as Me, q as Ct, a7 as wt, a1 as Nt } from "./account-screen-runtime-CCY1xG25.js";
2
- import { u as R, a as St, b as B, c as Et, M as Pt } from "./MemberManagementProviders-C6Wup6Cl.js";
3
- import { O as At } from "./OrdersScreen-clLNt--d.js";
4
- import { F as ee, e as Mt, f as Rt, S as Ft, P as It, a as Lt, b as kt, d as Dt, A as Ot, C as Re, c as zt, g as Tt, u as Bt, i as Ut, h as $t, T as qt, j as Qt, k as Vt, m as Ht, E as Kt, p as Gt, l as Fe } from "./create-card-entry-container-DEvxwcvy.js";
5
- import { c as Yt } from "./member-permissions-ndhNmlOk.js";
6
- import { u as me } from "./use-store-BfHGqPT0.js";
7
- import { u as K, f as Xt, o as se, s as L } from "./schemas-Cg7EObbC.js";
8
- import { R as Ie, e as Wt } from "./ResponsiveDialog-hhAZBsRG.js";
9
- import { I as Zt } from "./sheet-haptics-context-Ne6R0IeV.js";
1
+ import { c as Y, i as ht, l as v, j as n, G as pt, J as ce, al as gt, am as ne, X as de, an as xt, $ as E, I as Ce, Z as A, B as ue, D as Me, E as fe, x as _t, Y as $, ao as bt, _ as H, aj as T, ap as vt, aq as yt, ai as jt, P as Ct, ar as J, z as me, a3 as Re, q as wt, a7 as Nt, a1 as St } from "./account-screen-runtime-CCY1xG25.js";
2
+ import { u as R, a as Et, b as B, c as Pt, M as At } from "./MemberManagementProviders-cPKgxLcu.js";
3
+ import { O as Mt } from "./OrdersScreen-uxcbBBMR.js";
4
+ import { F as ee, e as Rt, f as Ft, S as It, P as Lt, a as kt, b as Dt, d as Ot, A as zt, C as Fe, c as Tt, g as Bt, u as Ut, i as $t, h as qt, T as Qt, j as Vt, k as Ht, m as Kt, E as Gt, p as Yt, l as Ie } from "./create-card-entry-container-BYz9zvFS.js";
5
+ import { c as Xt } from "./member-permissions-ndhNmlOk.js";
6
+ import { u as he } from "./use-store-BfHGqPT0.js";
7
+ import { u as K, f as Wt, o as se, s as L } from "./schemas-Cg7EObbC.js";
8
+ import { R as Le, e as Zt } from "./ResponsiveDialog-hhAZBsRG.js";
9
+ import { I as Jt } from "./sheet-haptics-context-Ne6R0IeV.js";
10
10
  import { u as X } from "./sidebar-l4Cov_Nb.js";
11
- import { B as Le, a as ke } from "./Textarea-DiiN2VUa.js";
12
- import { u as Jt } from "./countries-api-adapter-lxM2cPcp.js";
13
- import { u as er } from "./PortalTenantClientProvider-BEuv6kSA.js";
14
- import { M as tr } from "./map-pin-CmkGf2EW.js";
15
- import { A as Ce } from "./arrow-left-B8Vg8Lwo.js";
11
+ import { B as ke, a as De } from "./Textarea-DiiN2VUa.js";
12
+ import { u as er } from "./countries-api-adapter-lxM2cPcp.js";
13
+ import { u as tr } from "./PortalTenantClientProvider-BEuv6kSA.js";
14
+ import { M as rr } from "./map-pin-CmkGf2EW.js";
15
+ import { A as we } from "./arrow-left-B8Vg8Lwo.js";
16
16
  /**
17
17
  * @license lucide-react v0.575.0 - ISC
18
18
  *
19
19
  * This source code is licensed under the ISC license.
20
20
  * See the LICENSE file in the root directory of this source tree.
21
21
  */
22
- const rr = [
22
+ const nr = [
23
23
  ["path", { d: "m5 8 6 6", key: "1wu5hv" }],
24
24
  ["path", { d: "m4 14 6-6 2-3", key: "1k1g8d" }],
25
25
  ["path", { d: "M2 5h12", key: "or177f" }],
26
26
  ["path", { d: "M7 2h1", key: "1t2jsx" }],
27
27
  ["path", { d: "m22 22-5-10-5 10", key: "don7ne" }],
28
28
  ["path", { d: "M14 18h6", key: "1m8k6r" }]
29
- ], nr = Y("languages", rr);
29
+ ], sr = Y("languages", nr);
30
30
  /**
31
31
  * @license lucide-react v0.575.0 - ISC
32
32
  *
33
33
  * This source code is licensed under the ISC license.
34
34
  * See the LICENSE file in the root directory of this source tree.
35
35
  */
36
- const sr = [
36
+ const ar = [
37
37
  ["path", { d: "m16 17 5-5-5-5", key: "1bji2h" }],
38
38
  ["path", { d: "M21 12H9", key: "dn1m92" }],
39
39
  ["path", { d: "M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4", key: "1uf3rs" }]
40
- ], ar = Y("log-out", sr);
40
+ ], ir = Y("log-out", ar);
41
41
  /**
42
42
  * @license lucide-react v0.575.0 - ISC
43
43
  *
44
44
  * This source code is licensed under the ISC license.
45
45
  * See the LICENSE file in the root directory of this source tree.
46
46
  */
47
- const ir = [
47
+ const or = [
48
48
  ["path", { d: "m2 9 3-3 3 3", key: "1ltn5i" }],
49
49
  ["path", { d: "M13 18H7a2 2 0 0 1-2-2V6", key: "1r6tfw" }],
50
50
  ["path", { d: "m22 15-3 3-3-3", key: "4rnwn2" }],
51
51
  ["path", { d: "M11 6h6a2 2 0 0 1 2 2v10", key: "2f72bc" }]
52
- ], De = Y("repeat-2", ir);
52
+ ], Oe = Y("repeat-2", or);
53
53
  /**
54
54
  * @license lucide-react v0.575.0 - ISC
55
55
  *
56
56
  * This source code is licensed under the ISC license.
57
57
  * See the LICENSE file in the root directory of this source tree.
58
58
  */
59
- const or = [
59
+ const lr = [
60
60
  [
61
61
  "path",
62
62
  {
@@ -64,17 +64,17 @@ const or = [
64
64
  key: "r04s7s"
65
65
  }
66
66
  ]
67
- ], lr = Y("star", or);
67
+ ], cr = Y("star", lr);
68
68
  /**
69
69
  * @license lucide-react v0.575.0 - ISC
70
70
  *
71
71
  * This source code is licensed under the ISC license.
72
72
  * See the LICENSE file in the root directory of this source tree.
73
73
  */
74
- const cr = [
74
+ const dr = [
75
75
  ["circle", { cx: "12", cy: "8", r: "5", key: "1hypcn" }],
76
76
  ["path", { d: "M20 21a8 8 0 0 0-16 0", key: "rfgkzh" }]
77
- ], dr = Y("user-round", cr);
77
+ ], ur = Y("user-round", dr);
78
78
  var te = { exports: {} }, re = {};
79
79
  /**
80
80
  * @license React
@@ -85,11 +85,11 @@ var te = { exports: {} }, re = {};
85
85
  * This source code is licensed under the MIT license found in the
86
86
  * LICENSE file in the root directory of this source tree.
87
87
  */
88
- var we;
89
- function ur() {
90
- if (we) return re;
91
- we = 1;
92
- var e = mt();
88
+ var Ne;
89
+ function fr() {
90
+ if (Ne) return re;
91
+ Ne = 1;
92
+ var e = ht();
93
93
  function i(o, c) {
94
94
  return o === c && (o !== 0 || 1 / o === 1 / c) || o !== o && c !== c;
95
95
  }
@@ -126,70 +126,70 @@ function ur() {
126
126
  var s = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? t : g;
127
127
  return re.useSyncExternalStore = e.useSyncExternalStore !== void 0 ? e.useSyncExternalStore : s, re;
128
128
  }
129
- var Ne;
130
- function fr() {
131
- return Ne || (Ne = 1, te.exports = ur()), te.exports;
129
+ var Se;
130
+ function mr() {
131
+ return Se || (Se = 1, te.exports = fr()), te.exports;
132
132
  }
133
- var mr = fr();
134
- function hr() {
135
- return mr.useSyncExternalStore(
136
- pr,
133
+ var hr = mr();
134
+ function pr() {
135
+ return hr.useSyncExternalStore(
136
+ gr,
137
137
  () => !0,
138
138
  () => !1
139
139
  );
140
140
  }
141
- function pr() {
141
+ function gr() {
142
142
  return () => {
143
143
  };
144
144
  }
145
- var he = "Avatar", [gr] = ht(he), [xr, Oe] = gr(he), ze = v.forwardRef(
145
+ var pe = "Avatar", [xr] = pt(pe), [_r, ze] = xr(pe), Te = v.forwardRef(
146
146
  (e, i) => {
147
147
  const { __scopeAvatar: r, ...l } = e, [d, u] = v.useState("idle");
148
148
  return /* @__PURE__ */ n.jsx(
149
- xr,
149
+ _r,
150
150
  {
151
151
  scope: r,
152
152
  imageLoadingStatus: d,
153
153
  onImageLoadingStatusChange: u,
154
- children: /* @__PURE__ */ n.jsx(le.span, { ...l, ref: i })
154
+ children: /* @__PURE__ */ n.jsx(ce.span, { ...l, ref: i })
155
155
  }
156
156
  );
157
157
  }
158
158
  );
159
- ze.displayName = he;
160
- var Te = "AvatarImage", Be = v.forwardRef(
159
+ Te.displayName = pe;
160
+ var Be = "AvatarImage", Ue = v.forwardRef(
161
161
  (e, i) => {
162
162
  const { __scopeAvatar: r, src: l, onLoadingStatusChange: d = () => {
163
- }, ...u } = e, h = Oe(Te, r), g = _r(l, u), a = pt((t) => {
163
+ }, ...u } = e, h = ze(Be, r), g = br(l, u), a = gt((t) => {
164
164
  d(t), h.onImageLoadingStatusChange(t);
165
165
  });
166
166
  return ne(() => {
167
167
  g !== "idle" && a(g);
168
- }, [g, a]), g === "loaded" ? /* @__PURE__ */ n.jsx(le.img, { ...u, ref: i, src: l }) : null;
168
+ }, [g, a]), g === "loaded" ? /* @__PURE__ */ n.jsx(ce.img, { ...u, ref: i, src: l }) : null;
169
169
  }
170
170
  );
171
- Be.displayName = Te;
172
- var Ue = "AvatarFallback", $e = v.forwardRef(
171
+ Ue.displayName = Be;
172
+ var $e = "AvatarFallback", qe = v.forwardRef(
173
173
  (e, i) => {
174
- const { __scopeAvatar: r, delayMs: l, ...d } = e, u = Oe(Ue, r), [h, g] = v.useState(l === void 0);
174
+ const { __scopeAvatar: r, delayMs: l, ...d } = e, u = ze($e, r), [h, g] = v.useState(l === void 0);
175
175
  return v.useEffect(() => {
176
176
  if (l !== void 0) {
177
177
  const a = window.setTimeout(() => g(!0), l);
178
178
  return () => window.clearTimeout(a);
179
179
  }
180
- }, [l]), h && u.imageLoadingStatus !== "loaded" ? /* @__PURE__ */ n.jsx(le.span, { ...d, ref: i }) : null;
180
+ }, [l]), h && u.imageLoadingStatus !== "loaded" ? /* @__PURE__ */ n.jsx(ce.span, { ...d, ref: i }) : null;
181
181
  }
182
182
  );
183
- $e.displayName = Ue;
184
- function Se(e, i) {
183
+ qe.displayName = $e;
184
+ function Ee(e, i) {
185
185
  return e ? i ? (e.src !== i && (e.src = i), e.complete && e.naturalWidth > 0 ? "loaded" : "loading") : "error" : "idle";
186
186
  }
187
- function _r(e, { referrerPolicy: i, crossOrigin: r }) {
188
- const l = hr(), d = v.useRef(null), u = l ? (d.current || (d.current = new window.Image()), d.current) : null, [h, g] = v.useState(
189
- () => Se(u, e)
187
+ function br(e, { referrerPolicy: i, crossOrigin: r }) {
188
+ const l = pr(), d = v.useRef(null), u = l ? (d.current || (d.current = new window.Image()), d.current) : null, [h, g] = v.useState(
189
+ () => Ee(u, e)
190
190
  );
191
191
  return ne(() => {
192
- g(Se(u, e));
192
+ g(Ee(u, e));
193
193
  }, [u, e]), ne(() => {
194
194
  const a = (o) => () => {
195
195
  g(o);
@@ -201,18 +201,18 @@ function _r(e, { referrerPolicy: i, crossOrigin: r }) {
201
201
  };
202
202
  }, [u, r, i]), h;
203
203
  }
204
- var br = ze, vr = Be, yr = $e;
205
- function jr({
204
+ var vr = Te, yr = Ue, jr = qe;
205
+ function Cr({
206
206
  className: e,
207
207
  size: i = "default",
208
208
  ...r
209
209
  }) {
210
210
  return /* @__PURE__ */ n.jsx(
211
- br,
211
+ vr,
212
212
  {
213
213
  "data-slot": "avatar",
214
214
  "data-size": i,
215
- className: ce(
215
+ className: de(
216
216
  "group/avatar relative flex size-8 shrink-0 overflow-hidden rounded-full select-none data-[size=lg]:size-10 data-[size=sm]:size-6",
217
217
  e
218
218
  ),
@@ -220,28 +220,28 @@ function jr({
220
220
  }
221
221
  );
222
222
  }
223
- function Cr({
223
+ function wr({
224
224
  className: e,
225
225
  ...i
226
226
  }) {
227
227
  return /* @__PURE__ */ n.jsx(
228
- vr,
228
+ yr,
229
229
  {
230
230
  "data-slot": "avatar-image",
231
- className: ce("aspect-square size-full", e),
231
+ className: de("aspect-square size-full", e),
232
232
  ...i
233
233
  }
234
234
  );
235
235
  }
236
- function wr({
236
+ function Nr({
237
237
  className: e,
238
238
  ...i
239
239
  }) {
240
240
  return /* @__PURE__ */ n.jsx(
241
- yr,
241
+ jr,
242
242
  {
243
243
  "data-slot": "avatar-fallback",
244
- className: ce(
244
+ className: de(
245
245
  "bg-muted text-muted-foreground flex size-full items-center justify-center rounded-full text-sm group-data-[size=sm]/avatar:text-xs",
246
246
  e
247
247
  ),
@@ -249,7 +249,11 @@ function wr({
249
249
  }
250
250
  );
251
251
  }
252
- function Nr({
252
+ const Sr = /^-?\d+(\.\d{1,4})?$/;
253
+ function ae(e, i) {
254
+ return e != null && Sr.test(e) ? Number(e) : i ?? void 0;
255
+ }
256
+ function Er({
253
257
  control: e,
254
258
  isOpen: i,
255
259
  onSubmit: r,
@@ -266,7 +270,7 @@ function Nr({
266
270
  fullName: m,
267
271
  onUploadAvatar: p
268
272
  }) {
269
- const { t: f } = R(), { field: x } = gt({ control: e, name: "avatar_url" }), [N, w] = v.useState(!1), _ = v.useRef(null), C = v.useRef(0);
273
+ const { t: f } = R(), { field: x } = xt({ control: e, name: "avatar_url" }), [N, w] = v.useState(!1), _ = v.useRef(null), C = v.useRef(0);
270
274
  v.useEffect(() => {
271
275
  C.current += 1, w(!1);
272
276
  }, [i]);
@@ -309,7 +313,7 @@ function Nr({
309
313
  q(), l();
310
314
  };
311
315
  return /* @__PURE__ */ n.jsxs(
312
- Ie,
316
+ Le,
313
317
  {
314
318
  open: i,
315
319
  onOpenChange: (j) => !j && O(),
@@ -420,7 +424,7 @@ function Nr({
420
424
  }
421
425
  ),
422
426
  /* @__PURE__ */ n.jsx(
423
- Mt,
427
+ Rt,
424
428
  {
425
429
  control: e,
426
430
  name: "bio",
@@ -430,7 +434,7 @@ function Nr({
430
434
  }
431
435
  ),
432
436
  /* @__PURE__ */ n.jsx(
433
- Rt,
437
+ Ft,
434
438
  {
435
439
  control: e,
436
440
  name: "language",
@@ -444,7 +448,7 @@ function Nr({
444
448
  /* @__PURE__ */ n.jsx("label", { className: "text-foreground text-sm font-medium", children: f("email") }),
445
449
  k ? /* @__PURE__ */ n.jsxs("div", { className: "space-y-2", children: [
446
450
  /* @__PURE__ */ n.jsx(
447
- Zt,
451
+ Jt,
448
452
  {
449
453
  type: "email",
450
454
  placeholder: f("enter_new_email_placeholder"),
@@ -461,7 +465,7 @@ function Nr({
461
465
  ),
462
466
  D && /* @__PURE__ */ n.jsx("p", { className: "text-destructive text-xs", children: D }),
463
467
  /* @__PURE__ */ n.jsxs("div", { className: "bg-muted flex items-start gap-2.5 rounded-md px-3 py-2.5", children: [
464
- /* @__PURE__ */ n.jsx(je, { className: "text-primary mt-0.5 size-4 shrink-0" }),
468
+ /* @__PURE__ */ n.jsx(Ce, { className: "text-primary mt-0.5 size-4 shrink-0" }),
465
469
  /* @__PURE__ */ n.jsx("p", { className: "text-muted-foreground text-xs", children: f("email_verification_hint") })
466
470
  ] }),
467
471
  /* @__PURE__ */ n.jsxs("div", { className: "flex gap-2", children: [
@@ -492,7 +496,7 @@ function Nr({
492
496
  ] }) : s ? /* @__PURE__ */ n.jsxs("div", { className: "space-y-2", children: [
493
497
  /* @__PURE__ */ n.jsx("div", { className: "bg-muted text-muted-foreground min-w-0 rounded-md px-3 py-2 text-sm", children: g }),
494
498
  /* @__PURE__ */ n.jsxs("div", { className: "bg-muted flex items-start gap-2.5 rounded-md px-3 py-2.5", children: [
495
- /* @__PURE__ */ n.jsx(je, { className: "text-primary mt-0.5 size-4 shrink-0" }),
499
+ /* @__PURE__ */ n.jsx(Ce, { className: "text-primary mt-0.5 size-4 shrink-0" }),
496
500
  /* @__PURE__ */ n.jsxs("p", { className: "text-muted-foreground text-xs", children: [
497
501
  f("changing_email_to"),
498
502
  " ",
@@ -517,7 +521,7 @@ function Nr({
517
521
  ] })
518
522
  ] }),
519
523
  u && /* @__PURE__ */ n.jsx("p", { className: "text-destructive text-sm", children: u }),
520
- /* @__PURE__ */ n.jsx(Wt, { className: "flex flex-row items-center justify-end", children: /* @__PURE__ */ n.jsx("div", { className: "flex-1 text-right", children: /* @__PURE__ */ n.jsxs(
524
+ /* @__PURE__ */ n.jsx(Zt, { className: "flex flex-row items-center justify-end", children: /* @__PURE__ */ n.jsx("div", { className: "flex-1 text-right", children: /* @__PURE__ */ n.jsxs(
521
525
  E,
522
526
  {
523
527
  type: "button",
@@ -533,20 +537,20 @@ function Nr({
533
537
  }
534
538
  );
535
539
  }
536
- var Sr = Object.defineProperty, Z = Object.getOwnPropertySymbols, qe = Object.prototype.hasOwnProperty, Qe = Object.prototype.propertyIsEnumerable, Ee = (e, i, r) => i in e ? Sr(e, i, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[i] = r, ae = (e, i) => {
540
+ var Pr = Object.defineProperty, Z = Object.getOwnPropertySymbols, Qe = Object.prototype.hasOwnProperty, Ve = Object.prototype.propertyIsEnumerable, Pe = (e, i, r) => i in e ? Pr(e, i, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[i] = r, ie = (e, i) => {
537
541
  for (var r in i || (i = {}))
538
- qe.call(i, r) && Ee(e, r, i[r]);
542
+ Qe.call(i, r) && Pe(e, r, i[r]);
539
543
  if (Z)
540
544
  for (var r of Z(i))
541
- Qe.call(i, r) && Ee(e, r, i[r]);
545
+ Ve.call(i, r) && Pe(e, r, i[r]);
542
546
  return e;
543
- }, ie = (e, i) => {
547
+ }, oe = (e, i) => {
544
548
  var r = {};
545
549
  for (var l in e)
546
- qe.call(e, l) && i.indexOf(l) < 0 && (r[l] = e[l]);
550
+ Qe.call(e, l) && i.indexOf(l) < 0 && (r[l] = e[l]);
547
551
  if (e != null && Z)
548
552
  for (var l of Z(e))
549
- i.indexOf(l) < 0 && Qe.call(e, l) && (r[l] = e[l]);
553
+ i.indexOf(l) < 0 && Ve.call(e, l) && (r[l] = e[l]);
550
554
  return r;
551
555
  };
552
556
  /**
@@ -1095,13 +1099,13 @@ var V = U;
1095
1099
  * Copyright (c) Paul O'Shannessy
1096
1100
  * SPDX-License-Identifier: ISC
1097
1101
  */
1098
- var Er = {
1102
+ var Ar = {
1099
1103
  L: V.QrCode.Ecc.LOW,
1100
1104
  M: V.QrCode.Ecc.MEDIUM,
1101
1105
  Q: V.QrCode.Ecc.QUARTILE,
1102
1106
  H: V.QrCode.Ecc.HIGH
1103
- }, Ve = 128, He = "L", Ke = "#FFFFFF", Ge = "#000000", Ye = !1, Xe = 1, Pr = 4, Ar = 0, Mr = 0.1;
1104
- function We(e, i = 0) {
1107
+ }, He = 128, Ke = "L", Ge = "#FFFFFF", Ye = "#000000", Xe = !1, We = 1, Mr = 4, Rr = 0, Fr = 0.1;
1108
+ function Ze(e, i = 0) {
1105
1109
  const r = [];
1106
1110
  return e.forEach(function(l, d) {
1107
1111
  let u = null;
@@ -1124,13 +1128,13 @@ function We(e, i = 0) {
1124
1128
  });
1125
1129
  }), r.join("");
1126
1130
  }
1127
- function Ze(e, i) {
1131
+ function Je(e, i) {
1128
1132
  return e.slice().map((r, l) => l < i.y || l >= i.y + i.h ? r : r.map((d, u) => u < i.x || u >= i.x + i.w ? d : !1));
1129
1133
  }
1130
- function Rr(e, i, r, l) {
1134
+ function Ir(e, i, r, l) {
1131
1135
  if (l == null)
1132
1136
  return null;
1133
- const d = e.length + r * 2, u = Math.floor(i * Mr), h = d / i, g = (l.width || u) * h, a = (l.height || u) * h, t = l.x == null ? e.length / 2 - g / 2 : l.x * h, s = l.y == null ? e.length / 2 - a / 2 : l.y * h, o = l.opacity == null ? 1 : l.opacity;
1137
+ const d = e.length + r * 2, u = Math.floor(i * Fr), h = d / i, g = (l.width || u) * h, a = (l.height || u) * h, t = l.x == null ? e.length / 2 - g / 2 : l.x * h, s = l.y == null ? e.length / 2 - a / 2 : l.y * h, o = l.opacity == null ? 1 : l.opacity;
1134
1138
  let c = null;
1135
1139
  if (l.excavate) {
1136
1140
  let p = Math.floor(t), f = Math.floor(s), x = Math.ceil(g + t - p), N = Math.ceil(a + s - f);
@@ -1139,10 +1143,10 @@ function Rr(e, i, r, l) {
1139
1143
  const m = l.crossOrigin;
1140
1144
  return { x: t, y: s, h: a, w: g, excavation: c, opacity: o, crossOrigin: m };
1141
1145
  }
1142
- function Fr(e, i) {
1143
- return i != null ? Math.max(Math.floor(i), 0) : e ? Pr : Ar;
1146
+ function Lr(e, i) {
1147
+ return i != null ? Math.max(Math.floor(i), 0) : e ? Mr : Rr;
1144
1148
  }
1145
- function Je({
1149
+ function et({
1146
1150
  value: e,
1147
1151
  level: i,
1148
1152
  minVersion: r,
@@ -1156,7 +1160,7 @@ function Je({
1156
1160
  const p = (Array.isArray(e) ? e : [e]).reduce((f, x) => (f.push(...V.QrSegment.makeSegments(x)), f), []);
1157
1161
  return V.QrCode.encodeSegments(
1158
1162
  p,
1159
- Er[i],
1163
+ Ar[i],
1160
1164
  r,
1161
1165
  void 0,
1162
1166
  void 0,
@@ -1165,7 +1169,7 @@ function Je({
1165
1169
  }, [e, i, r, g]);
1166
1170
  const { cells: t, margin: s, numCells: o, calculatedImageSettings: c } = A.useMemo(() => {
1167
1171
  let m = a.getModules();
1168
- const p = Fr(l, d), f = m.length + p * 2, x = Rr(
1172
+ const p = Lr(l, d), f = m.length + p * 2, x = Ir(
1169
1173
  m,
1170
1174
  h,
1171
1175
  p,
@@ -1186,27 +1190,27 @@ function Je({
1186
1190
  calculatedImageSettings: c
1187
1191
  };
1188
1192
  }
1189
- var Ir = (function() {
1193
+ var kr = (function() {
1190
1194
  try {
1191
1195
  new Path2D().addPath(new Path2D());
1192
1196
  } catch {
1193
1197
  return !1;
1194
1198
  }
1195
1199
  return !0;
1196
- })(), Lr = A.forwardRef(
1200
+ })(), Dr = A.forwardRef(
1197
1201
  function(i, r) {
1198
1202
  const l = i, {
1199
1203
  value: d,
1200
- size: u = Ve,
1201
- level: h = He,
1202
- bgColor: g = Ke,
1203
- fgColor: a = Ge,
1204
- includeMargin: t = Ye,
1205
- minVersion: s = Xe,
1204
+ size: u = He,
1205
+ level: h = Ke,
1206
+ bgColor: g = Ge,
1207
+ fgColor: a = Ye,
1208
+ includeMargin: t = Xe,
1209
+ minVersion: s = We,
1206
1210
  boostLevel: o,
1207
1211
  marginSize: c,
1208
1212
  imageSettings: m
1209
- } = l, f = ie(l, [
1213
+ } = l, f = oe(l, [
1210
1214
  "value",
1211
1215
  "size",
1212
1216
  "level",
@@ -1217,12 +1221,12 @@ var Ir = (function() {
1217
1221
  "boostLevel",
1218
1222
  "marginSize",
1219
1223
  "imageSettings"
1220
- ]), { style: x } = f, N = ie(f, ["style"]), w = m?.src, _ = A.useRef(null), C = A.useRef(null), M = A.useCallback(
1224
+ ]), { style: x } = f, N = oe(f, ["style"]), w = m?.src, _ = A.useRef(null), C = A.useRef(null), M = A.useCallback(
1221
1225
  (O) => {
1222
1226
  _.current = O, typeof r == "function" ? r(O) : r && (r.current = O);
1223
1227
  },
1224
1228
  [r]
1225
- ), [k, z] = A.useState(!1), { margin: F, cells: y, numCells: D, calculatedImageSettings: P } = Je({
1229
+ ), [k, z] = A.useState(!1), { margin: F, cells: y, numCells: D, calculatedImageSettings: P } = et({
1226
1230
  value: d,
1227
1231
  level: h,
1228
1232
  minVersion: s,
@@ -1239,16 +1243,16 @@ var Ir = (function() {
1239
1243
  return;
1240
1244
  let Q = y;
1241
1245
  const I = C.current, G = P != null && I !== null && I.complete && I.naturalHeight !== 0 && I.naturalWidth !== 0;
1242
- G && P.excavation != null && (Q = Ze(
1246
+ G && P.excavation != null && (Q = Je(
1243
1247
  y,
1244
1248
  P.excavation
1245
1249
  ));
1246
- const ve = window.devicePixelRatio || 1;
1247
- O.height = O.width = u * ve;
1248
- const ye = u / D * ve;
1249
- j.scale(ye, ye), j.fillStyle = g, j.fillRect(0, 0, D, D), j.fillStyle = a, Ir ? j.fill(new Path2D(We(Q, F))) : y.forEach(function(ct, dt) {
1250
- ct.forEach(function(ut, ft) {
1251
- ut && j.fillRect(ft + F, dt + F, 1, 1);
1250
+ const ye = window.devicePixelRatio || 1;
1251
+ O.height = O.width = u * ye;
1252
+ const je = u / D * ye;
1253
+ j.scale(je, je), j.fillStyle = g, j.fillRect(0, 0, D, D), j.fillStyle = a, kr ? j.fill(new Path2D(Ze(Q, F))) : y.forEach(function(dt, ut) {
1254
+ dt.forEach(function(ft, mt) {
1255
+ ft && j.fillRect(mt + F, ut + F, 1, 1);
1252
1256
  });
1253
1257
  }), P && (j.globalAlpha = P.opacity), G && j.drawImage(
1254
1258
  I,
@@ -1261,7 +1265,7 @@ var Ir = (function() {
1261
1265
  }), A.useEffect(() => {
1262
1266
  z(!1);
1263
1267
  }, [w]);
1264
- const W = ae({ height: u, width: u }, x);
1268
+ const W = ie({ height: u, width: u }, x);
1265
1269
  let q = null;
1266
1270
  return w != null && (q = /* @__PURE__ */ A.createElement(
1267
1271
  "img",
@@ -1277,7 +1281,7 @@ var Ir = (function() {
1277
1281
  }
1278
1282
  )), /* @__PURE__ */ A.createElement(A.Fragment, null, /* @__PURE__ */ A.createElement(
1279
1283
  "canvas",
1280
- ae({
1284
+ ie({
1281
1285
  style: W,
1282
1286
  height: u,
1283
1287
  width: u,
@@ -1287,22 +1291,22 @@ var Ir = (function() {
1287
1291
  ), q);
1288
1292
  }
1289
1293
  );
1290
- Lr.displayName = "QRCodeCanvas";
1291
- var et = A.forwardRef(
1294
+ Dr.displayName = "QRCodeCanvas";
1295
+ var tt = A.forwardRef(
1292
1296
  function(i, r) {
1293
1297
  const l = i, {
1294
1298
  value: d,
1295
- size: u = Ve,
1296
- level: h = He,
1297
- bgColor: g = Ke,
1298
- fgColor: a = Ge,
1299
- includeMargin: t = Ye,
1300
- minVersion: s = Xe,
1299
+ size: u = He,
1300
+ level: h = Ke,
1301
+ bgColor: g = Ge,
1302
+ fgColor: a = Ye,
1303
+ includeMargin: t = Xe,
1304
+ minVersion: s = We,
1301
1305
  boostLevel: o,
1302
1306
  title: c,
1303
1307
  marginSize: m,
1304
1308
  imageSettings: p
1305
- } = l, f = ie(l, [
1309
+ } = l, f = oe(l, [
1306
1310
  "value",
1307
1311
  "size",
1308
1312
  "level",
@@ -1314,7 +1318,7 @@ var et = A.forwardRef(
1314
1318
  "title",
1315
1319
  "marginSize",
1316
1320
  "imageSettings"
1317
- ]), { margin: x, cells: N, numCells: w, calculatedImageSettings: _ } = Je({
1321
+ ]), { margin: x, cells: N, numCells: w, calculatedImageSettings: _ } = et({
1318
1322
  value: d,
1319
1323
  level: h,
1320
1324
  minVersion: s,
@@ -1325,7 +1329,7 @@ var et = A.forwardRef(
1325
1329
  size: u
1326
1330
  });
1327
1331
  let C = N, M = null;
1328
- p != null && _ != null && (_.excavation != null && (C = Ze(
1332
+ p != null && _ != null && (_.excavation != null && (C = Je(
1329
1333
  N,
1330
1334
  _.excavation
1331
1335
  )), M = /* @__PURE__ */ A.createElement(
@@ -1341,10 +1345,10 @@ var et = A.forwardRef(
1341
1345
  crossOrigin: _.crossOrigin
1342
1346
  }
1343
1347
  ));
1344
- const k = We(C, x);
1348
+ const k = Ze(C, x);
1345
1349
  return /* @__PURE__ */ A.createElement(
1346
1350
  "svg",
1347
- ae({
1351
+ ie({
1348
1352
  height: u,
1349
1353
  width: u,
1350
1354
  viewBox: `0 0 ${w} ${w}`,
@@ -1365,11 +1369,11 @@ var et = A.forwardRef(
1365
1369
  );
1366
1370
  }
1367
1371
  );
1368
- et.displayName = "QRCodeSVG";
1369
- function kr(e, i) {
1370
- ue({ title: e, type: i });
1372
+ tt.displayName = "QRCodeSVG";
1373
+ function Or(e, i) {
1374
+ fe({ title: e, type: i });
1371
1375
  }
1372
- function Dr({
1376
+ function zr({
1373
1377
  onToast: e,
1374
1378
  /* eslint-disable @typescript-eslint/no-unused-vars -- destructured to exclude from divProps spread */
1375
1379
  background: i,
@@ -1380,15 +1384,15 @@ function Dr({
1380
1384
  /* eslint-enable @typescript-eslint/no-unused-vars */
1381
1385
  ...h
1382
1386
  }) {
1383
- const { currentSlug: g } = de(), a = e ?? kr, t = g.split("/")[1], s = t !== void 0, { data: o } = Ae(), c = o?.id, m = o === void 0;
1384
- return /* @__PURE__ */ n.jsx("div", { ...h, children: /* @__PURE__ */ n.jsx(Ft, { children: /* @__PURE__ */ n.jsx(It, { children: /* @__PURE__ */ n.jsx(Lt, { children: s ? /* @__PURE__ */ n.jsx(
1385
- kt,
1387
+ const { currentSlug: g } = ue(), a = e ?? Or, t = g.split("/")[1], s = t !== void 0, { data: o } = Me(), c = o?.id, m = o === void 0;
1388
+ return /* @__PURE__ */ n.jsx("div", { ...h, children: /* @__PURE__ */ n.jsx(It, { children: /* @__PURE__ */ n.jsx(Lt, { children: /* @__PURE__ */ n.jsx(kt, { children: s ? /* @__PURE__ */ n.jsx(
1389
+ Dt,
1386
1390
  {
1387
1391
  token: t,
1388
1392
  onToast: a
1389
1393
  }
1390
1394
  ) : /* @__PURE__ */ n.jsx(
1391
- Dt,
1395
+ Ot,
1392
1396
  {
1393
1397
  customerId: c,
1394
1398
  isLoadingCustomer: m,
@@ -1396,23 +1400,23 @@ function Dr({
1396
1400
  }
1397
1401
  ) }) }) }) });
1398
1402
  }
1399
- const oe = "profile/", Or = /* @__PURE__ */ new Set(["orders", "subscriptions"]);
1400
- function Pe(e) {
1401
- return e.startsWith(oe) ? e.slice(oe.length) : e;
1403
+ const le = "profile/", Tr = /* @__PURE__ */ new Set(["orders", "subscriptions"]);
1404
+ function Ae(e) {
1405
+ return e.startsWith(le) ? e.slice(le.length) : e;
1402
1406
  }
1403
- function zr({
1407
+ function Br({
1404
1408
  children: e
1405
1409
  }) {
1406
- const { currentSlug: i, previousSlug: r, navigate: l } = de();
1410
+ const { currentSlug: i, previousSlug: r, navigate: l } = ue();
1407
1411
  function d(u) {
1408
1412
  const h = u.split("/")[0] ?? "";
1409
- l(Or.has(h) ? `${oe}${u}` : u);
1413
+ l(Tr.has(h) ? `${le}${u}` : u);
1410
1414
  }
1411
1415
  return /* @__PURE__ */ n.jsx(
1412
- xt,
1416
+ _t,
1413
1417
  {
1414
- currentSlug: Pe(i),
1415
- previousSlug: r === null ? null : Pe(r),
1418
+ currentSlug: Ae(i),
1419
+ previousSlug: r === null ? null : Ae(r),
1416
1420
  navItems: [],
1417
1421
  basePath: "/profile",
1418
1422
  navigate: d,
@@ -1420,10 +1424,10 @@ function zr({
1420
1424
  }
1421
1425
  );
1422
1426
  }
1423
- function tt() {
1424
- const e = St();
1427
+ function rt() {
1428
+ const e = Et();
1425
1429
  return $({
1426
- queryKey: bt.languages(),
1430
+ queryKey: vt.languages(),
1427
1431
  queryFn: async () => {
1428
1432
  const i = [];
1429
1433
  let r;
@@ -1441,20 +1445,20 @@ function tt() {
1441
1445
  }
1442
1446
  });
1443
1447
  }
1444
- function rt() {
1445
- const e = _t(), i = H(), { setLocale: r } = T();
1448
+ function nt() {
1449
+ const e = bt(), i = H(), { setLocale: r } = T();
1446
1450
  return K({
1447
1451
  mutationFn: (l) => e.updateAccount({ account: l }),
1448
1452
  onSuccess: (l, d) => {
1449
- i.setQueryData(vt.detail(), l.account), d.language_iso && l.account.language_iso && r(l.account.language_iso);
1453
+ i.setQueryData(yt.detail(), l.account), d.language_iso && l.account.language_iso && r(l.account.language_iso);
1450
1454
  }
1451
1455
  });
1452
1456
  }
1453
- function Tr({
1457
+ function Ur({
1454
1458
  account: e,
1455
1459
  onClose: i
1456
1460
  }) {
1457
- const { t: r } = R(), { isMobile: l } = X(), d = me(), u = tt(), h = rt(), g = d.data?.allow_name_edit === !1, a = Xt(
1461
+ const { t: r } = R(), { isMobile: l } = X(), d = he(), u = rt(), h = nt(), g = d.data?.allow_name_edit === !1, a = Wt(
1458
1462
  se({
1459
1463
  first_name: g ? L() : L().min(1, r("first_name_is_required")),
1460
1464
  last_name: g ? L() : L().min(1, r("last_name_is_required")),
@@ -1480,13 +1484,13 @@ function Tr({
1480
1484
  phone: s.phone_number ?? "",
1481
1485
  bio: s.bio ?? "",
1482
1486
  ...s.language ? { language_iso: s.language } : {}
1483
- }), ue({ title: r("profile_updated"), type: "success" }), i();
1487
+ }), fe({ title: r("profile_updated"), type: "success" }), i();
1484
1488
  } catch {
1485
1489
  a.setError("root", { message: r("failed_to_update_profile") });
1486
1490
  }
1487
1491
  });
1488
1492
  return /* @__PURE__ */ n.jsx(
1489
- Nr,
1493
+ Er,
1490
1494
  {
1491
1495
  control: a.control,
1492
1496
  isOpen: !0,
@@ -1508,23 +1512,23 @@ function Tr({
1508
1512
  }
1509
1513
  );
1510
1514
  }
1511
- const pe = ["memberStorefront", "profile", "addresses"];
1512
- function ge() {
1515
+ const ge = ["memberStorefront", "profile", "addresses"];
1516
+ function xe() {
1513
1517
  const e = B();
1514
1518
  return $({
1515
- queryKey: pe,
1519
+ queryKey: ge,
1516
1520
  queryFn: () => e.fetchAddresses()
1517
1521
  });
1518
1522
  }
1519
- function nt(e) {
1520
- const i = Jt(), { locale: r } = T();
1523
+ function st(e) {
1524
+ const i = er(), { locale: r } = T();
1521
1525
  return $({
1522
1526
  queryKey: ["memberStorefront", "profile", "countries", r],
1523
1527
  queryFn: () => i.listCountries({ languageIso: r }),
1524
1528
  enabled: e
1525
1529
  });
1526
1530
  }
1527
- function Br() {
1531
+ function $r() {
1528
1532
  const e = B(), i = H();
1529
1533
  return K({
1530
1534
  mutationFn: async ({
@@ -1534,17 +1538,17 @@ function Br() {
1534
1538
  if (r === void 0) return e.createAddress(l);
1535
1539
  await e.updateAddress(r, l);
1536
1540
  },
1537
- onSuccess: () => i.invalidateQueries({ queryKey: pe })
1541
+ onSuccess: () => i.invalidateQueries({ queryKey: ge })
1538
1542
  });
1539
1543
  }
1540
- function Ur() {
1544
+ function qr() {
1541
1545
  const e = B(), i = H();
1542
1546
  return K({
1543
1547
  mutationFn: (r) => e.deleteAddress(r),
1544
- onSuccess: () => i.invalidateQueries({ queryKey: pe })
1548
+ onSuccess: () => i.invalidateQueries({ queryKey: ge })
1545
1549
  });
1546
1550
  }
1547
- function xe(e) {
1551
+ function _e(e) {
1548
1552
  return {
1549
1553
  id: e.id,
1550
1554
  address1: e.street1,
@@ -1559,13 +1563,13 @@ function xe(e) {
1559
1563
  subdivision_code: null
1560
1564
  };
1561
1565
  }
1562
- function st({
1566
+ function at({
1563
1567
  isOpen: e,
1564
1568
  onClose: i,
1565
1569
  selectedAddress: r,
1566
1570
  onAddressCreated: l
1567
1571
  }) {
1568
- const { t: d } = R(), { isMobile: u } = X(), { locale: h } = T(), g = nt(e), a = ge(), t = Br(), s = v.useCallback(
1572
+ const { t: d } = R(), { isMobile: u } = X(), { locale: h } = T(), g = st(e), a = xe(), t = $r(), s = v.useCallback(
1569
1573
  (o) => Promise.resolve(
1570
1574
  g.data?.countries.find((c) => c.code === o)?.states.map((c) => ({
1571
1575
  name: c.name,
@@ -1576,7 +1580,7 @@ function st({
1576
1580
  );
1577
1581
  if (e && g.error) throw g.error;
1578
1582
  return e && g.isPending ? /* @__PURE__ */ n.jsx("p", { role: "status", children: d("profile_loading") }) : /* @__PURE__ */ n.jsx(
1579
- Ot,
1583
+ zt,
1580
1584
  {
1581
1585
  isOpen: e,
1582
1586
  onClose: () => {
@@ -1618,7 +1622,7 @@ function st({
1618
1622
  },
1619
1623
  {
1620
1624
  onSuccess: (m) => {
1621
- m && l?.(xe(m)), t.reset(), i();
1625
+ m && l?.(_e(m)), t.reset(), i();
1622
1626
  }
1623
1627
  }
1624
1628
  );
@@ -1626,8 +1630,8 @@ function st({
1626
1630
  }
1627
1631
  );
1628
1632
  }
1629
- function $r() {
1630
- const { t: e } = R(), i = ge(), r = Ur(), l = v.useRef(null), [d, u] = v.useState(), [h, g] = v.useState(null);
1633
+ function Qr() {
1634
+ const { t: e } = R(), i = xe(), r = qr(), l = v.useRef(null), [d, u] = v.useState(), [h, g] = v.useState(null);
1631
1635
  if (i.error) throw i.error;
1632
1636
  function a() {
1633
1637
  requestAnimationFrame(() => l.current?.focus());
@@ -1652,7 +1656,7 @@ function $r() {
1652
1656
  /* @__PURE__ */ n.jsxs("div", { className: "space-y-1 text-sm", children: [
1653
1657
  /* @__PURE__ */ n.jsxs("div", { className: "flex items-center justify-between gap-3", children: [
1654
1658
  /* @__PURE__ */ n.jsx("p", { className: "font-medium", children: t.name }),
1655
- t.default && /* @__PURE__ */ n.jsx(Le, { variant: "secondary", children: e("default") })
1659
+ t.default && /* @__PURE__ */ n.jsx(ke, { variant: "secondary", children: e("default") })
1656
1660
  ] }),
1657
1661
  /* @__PURE__ */ n.jsx("p", { children: t.street1 }),
1658
1662
  t.street2 && /* @__PURE__ */ n.jsx("p", { children: t.street2 }),
@@ -1687,17 +1691,17 @@ function $r() {
1687
1691
  )),
1688
1692
  /* @__PURE__ */ n.jsx(E, { onClick: () => u(null), children: e("add_address") }),
1689
1693
  d !== void 0 && /* @__PURE__ */ n.jsx(
1690
- st,
1694
+ at,
1691
1695
  {
1692
1696
  isOpen: !0,
1693
- selectedAddress: d ? xe(d) : null,
1697
+ selectedAddress: d ? _e(d) : null,
1694
1698
  onClose: () => {
1695
1699
  u(void 0), a();
1696
1700
  }
1697
1701
  }
1698
1702
  ),
1699
1703
  /* @__PURE__ */ n.jsx(
1700
- Re,
1704
+ Fe,
1701
1705
  {
1702
1706
  title: e("delete_address"),
1703
1707
  description: e("delete_address_message"),
@@ -1721,7 +1725,7 @@ function $r() {
1721
1725
  }
1722
1726
  );
1723
1727
  }
1724
- function at() {
1728
+ function it() {
1725
1729
  const e = B();
1726
1730
  return $({
1727
1731
  queryKey: ["memberStorefront", "profile", "points"],
@@ -1736,14 +1740,17 @@ function at() {
1736
1740
  }
1737
1741
  });
1738
1742
  }
1739
- function qr() {
1740
- const { t: e } = R(), { locale: i } = T(), r = at(), l = me();
1743
+ function Vr() {
1744
+ const { t: e } = R(), { locale: i } = T(), r = it(), l = he();
1741
1745
  if (r.error) throw r.error;
1742
1746
  if (r.isPending || !l.data)
1743
1747
  return /* @__PURE__ */ n.jsx("p", { role: "status", children: e("profile_loading") });
1744
1748
  if (!r.data)
1745
1749
  return /* @__PURE__ */ n.jsx("p", { role: "status", children: e("profile_points_unavailable") });
1746
- const d = r.data.points_ledgers, u = d[0]?.total_balance ?? 0, h = u === 1 ? l.data.reward_points_label_singular : l.data.reward_points_label_plural, g = l.data.reward_points_label_plural, a = h.charAt(0).toLocaleUpperCase(i) + h.slice(1), t = g.charAt(0).toLocaleUpperCase(i) + g.slice(1), s = new Intl.NumberFormat(i), o = new Intl.DateTimeFormat(i, { dateStyle: "medium" });
1750
+ const d = r.data.points_ledgers, u = ae(
1751
+ d[0]?.total_balance_decimal,
1752
+ d[0]?.total_balance
1753
+ ) ?? 0, h = u === 1 ? l.data.reward_points_label_singular : l.data.reward_points_label_plural, g = l.data.reward_points_label_plural, a = h.charAt(0).toLocaleUpperCase(i) + h.slice(1), t = g.charAt(0).toLocaleUpperCase(i) + g.slice(1), s = new Intl.NumberFormat(i, { maximumFractionDigits: 4 }), o = new Intl.DateTimeFormat(i, { dateStyle: "medium" });
1747
1754
  return /* @__PURE__ */ n.jsxs("div", { className: "space-y-6", children: [
1748
1755
  /* @__PURE__ */ n.jsxs("section", { className: "bg-card text-card-foreground border-border space-y-2 rounded-xl border p-6", children: [
1749
1756
  /* @__PURE__ */ n.jsx("h2", { className: "text-muted-foreground text-sm", children: e("points_available", { label: a }) }),
@@ -1751,64 +1758,66 @@ function qr() {
1751
1758
  ] }),
1752
1759
  /* @__PURE__ */ n.jsxs("section", { className: "space-y-3", children: [
1753
1760
  /* @__PURE__ */ n.jsx("h2", { className: "font-semibold", children: e("points_history", { label: t }) }),
1754
- d.length ? /* @__PURE__ */ n.jsx("ol", { className: "border-border divide-border divide-y rounded-xl border", children: d.map((c) => /* @__PURE__ */ n.jsxs(
1755
- "li",
1756
- {
1757
- className: "flex items-center justify-between gap-4 p-4",
1758
- children: [
1759
- /* @__PURE__ */ n.jsxs("div", { className: "space-y-1", children: [
1760
- /* @__PURE__ */ n.jsx("p", { className: "text-sm font-medium", children: c.metadata?.transaction_type === "order_refund" ? e("profile_points_refunded", { label: t }) : e(
1761
- c.amount > 0 ? "points_awarded" : "points_redeemed",
1762
- { label: t }
1763
- ) }),
1764
- /* @__PURE__ */ n.jsx(
1765
- "time",
1766
- {
1767
- className: "text-muted-foreground text-xs",
1768
- dateTime: c.created_at,
1769
- children: o.format(new Date(c.created_at))
1770
- }
1771
- )
1772
- ] }),
1773
- /* @__PURE__ */ n.jsxs("span", { className: "font-medium tabular-nums", children: [
1774
- c.amount > 0 ? "+" : "",
1775
- s.format(c.amount)
1776
- ] })
1777
- ]
1778
- },
1779
- c.id
1780
- )) }) : /* @__PURE__ */ n.jsx("p", { className: "text-muted-foreground text-sm", children: e("no_points_history_found", { label: t }) })
1761
+ d.length ? /* @__PURE__ */ n.jsx("ol", { className: "border-border divide-border divide-y rounded-xl border", children: d.map((c) => {
1762
+ const m = ae(c.amount_decimal, c.amount) ?? 0;
1763
+ return /* @__PURE__ */ n.jsxs(
1764
+ "li",
1765
+ {
1766
+ className: "flex items-center justify-between gap-4 p-4",
1767
+ children: [
1768
+ /* @__PURE__ */ n.jsxs("div", { className: "space-y-1", children: [
1769
+ /* @__PURE__ */ n.jsx("p", { className: "text-sm font-medium", children: c.metadata?.transaction_type === "order_refund" ? e("profile_points_refunded", { label: t }) : e(m > 0 ? "points_awarded" : "points_redeemed", {
1770
+ label: t
1771
+ }) }),
1772
+ /* @__PURE__ */ n.jsx(
1773
+ "time",
1774
+ {
1775
+ className: "text-muted-foreground text-xs",
1776
+ dateTime: c.created_at,
1777
+ children: o.format(new Date(c.created_at))
1778
+ }
1779
+ )
1780
+ ] }),
1781
+ /* @__PURE__ */ n.jsxs("span", { className: "font-medium tabular-nums", children: [
1782
+ m > 0 ? "+" : "",
1783
+ s.format(m)
1784
+ ] })
1785
+ ]
1786
+ },
1787
+ c.id
1788
+ );
1789
+ }) }) : /* @__PURE__ */ n.jsx("p", { className: "text-muted-foreground text-sm", children: e("no_points_history_found", { label: t }) })
1781
1790
  ] })
1782
1791
  ] });
1783
1792
  }
1784
- function Qr({
1793
+ function Hr({
1785
1794
  children: e
1786
1795
  }) {
1787
1796
  const i = v.useRef(null), [r, l] = v.useState(null);
1788
1797
  return v.useEffect(() => {
1789
1798
  if (!i.current) return;
1790
- const d = zt(i.current);
1799
+ const d = Tt(i.current);
1791
1800
  return l(d), () => d.remove();
1792
1801
  }, []), /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
1793
1802
  /* @__PURE__ */ n.jsx("span", { ref: i, hidden: !0 }),
1794
- r && yt.createPortal(
1795
- /* @__PURE__ */ n.jsx(jt, { container: r, children: e }),
1803
+ r && jt.createPortal(
1804
+ /* @__PURE__ */ n.jsx(Ct, { container: r, children: e }),
1796
1805
  r
1797
1806
  )
1798
1807
  ] });
1799
1808
  }
1800
- function Vr({
1809
+ function Kr({
1801
1810
  onClose: e
1802
1811
  }) {
1803
- const i = ge(), { t: r } = R(), { isMobile: l } = X();
1804
- return /* @__PURE__ */ n.jsx(Qr, { children: i.data ? /* @__PURE__ */ n.jsx(
1805
- Hr,
1812
+ const i = xe(), { t: r } = R(), { isMobile: l } = X();
1813
+ return /* @__PURE__ */ n.jsx(Hr, { children: i.data ? /* @__PURE__ */ n.jsx(
1814
+ Gr,
1806
1815
  {
1807
1816
  initialAddresses: i.data.addresses,
1808
1817
  onClose: e
1809
1818
  }
1810
1819
  ) : /* @__PURE__ */ n.jsxs(
1811
- Ie,
1820
+ Le,
1812
1821
  {
1813
1822
  open: !0,
1814
1823
  onOpenChange: (d) => {
@@ -1832,17 +1841,17 @@ function Vr({
1832
1841
  }
1833
1842
  ) });
1834
1843
  }
1835
- function Hr({
1844
+ function Gr({
1836
1845
  initialAddresses: e,
1837
1846
  onClose: i
1838
1847
  }) {
1839
- const { t: r } = R(), { isMobile: l } = X(), d = B(), u = H(), [h, g] = v.useState(), a = v.useMemo(() => Tt(d), [d]), [t] = v.useState(
1840
- () => e.map(xe)
1848
+ const { t: r } = R(), { isMobile: l } = X(), d = B(), u = H(), [h, g] = v.useState(), a = v.useMemo(() => Bt(d), [d]), [t] = v.useState(
1849
+ () => e.map(_e)
1841
1850
  );
1842
1851
  async function s() {
1843
1852
  await u.invalidateQueries({ queryKey: J.paymentMethods.all }), i();
1844
1853
  }
1845
- const o = Bt({
1854
+ const o = Ut({
1846
1855
  payApi: d,
1847
1856
  t: (m) => r(m),
1848
1857
  onApproved: s,
@@ -1854,20 +1863,20 @@ function Hr({
1854
1863
  payment_method: {
1855
1864
  ...m.payment_method,
1856
1865
  type: "card",
1857
- token_provider: qt,
1866
+ token_provider: Qt,
1858
1867
  default: m.set_as_default
1859
1868
  },
1860
1869
  billing_address_id: m.billing_address_id,
1861
- browser_info: $t()
1870
+ browser_info: qt()
1862
1871
  }),
1863
1872
  onSuccess: async (m) => {
1864
- Ut(m) ? await o.begin(m) : await s();
1873
+ $t(m) ? await o.begin(m) : await s();
1865
1874
  },
1866
1875
  onError: () => g(r("failed_to_add_payment_method"))
1867
1876
  });
1868
- return /* @__PURE__ */ n.jsxs(Qt, { api: a, children: [
1877
+ return /* @__PURE__ */ n.jsxs(Vt, { api: a, children: [
1869
1878
  /* @__PURE__ */ n.jsx(
1870
- Vt,
1879
+ Ht,
1871
1880
  {
1872
1881
  isOpen: !0,
1873
1882
  jwt: "",
@@ -1889,7 +1898,7 @@ function Hr({
1889
1898
  onClose: p,
1890
1899
  onAddressCreated: f
1891
1900
  }) => m ? /* @__PURE__ */ n.jsx(
1892
- st,
1901
+ at,
1893
1902
  {
1894
1903
  isOpen: !0,
1895
1904
  onClose: p,
@@ -1902,32 +1911,32 @@ function Hr({
1902
1911
  o.modal
1903
1912
  ] });
1904
1913
  }
1905
- function it() {
1914
+ function ot() {
1906
1915
  const e = B();
1907
1916
  return $({
1908
1917
  queryKey: J.paymentMethods.list(),
1909
1918
  queryFn: () => e.fetchPaymentMethods()
1910
1919
  });
1911
1920
  }
1912
- function ot() {
1921
+ function lt() {
1913
1922
  const e = B(), i = H();
1914
1923
  return K({
1915
1924
  mutationFn: ({ id: r, body: l }) => e.updatePaymentMethod(r, l),
1916
1925
  onSuccess: () => i.invalidateQueries({ queryKey: J.paymentMethods.all })
1917
1926
  });
1918
1927
  }
1919
- function Kr() {
1928
+ function Yr() {
1920
1929
  const e = B(), i = H();
1921
1930
  return K({
1922
1931
  mutationFn: (r) => e.deletePaymentMethod(r),
1923
1932
  onSuccess: () => i.invalidateQueries({ queryKey: J.paymentMethods.all })
1924
1933
  });
1925
1934
  }
1926
- function Gr({
1935
+ function Xr({
1927
1936
  card: e,
1928
1937
  onClose: i
1929
1938
  }) {
1930
- const { t: r } = R(), { locale: l } = T(), { isMobile: d } = X(), u = nt(!0), h = ot(), g = v.useMemo(() => Ht(e), [e]), a = v.useCallback(
1939
+ const { t: r } = R(), { locale: l } = T(), { isMobile: d } = X(), u = st(!0), h = lt(), g = v.useMemo(() => Kt(e), [e]), a = v.useCallback(
1931
1940
  (t) => Promise.resolve(
1932
1941
  u.data?.countries.find((s) => s.code === t)?.states.map((s) => ({
1933
1942
  name: s.name,
@@ -1938,7 +1947,7 @@ function Gr({
1938
1947
  );
1939
1948
  if (u.error) throw u.error;
1940
1949
  return u.isPending ? /* @__PURE__ */ n.jsx("p", { role: "status", children: r("profile_loading") }) : /* @__PURE__ */ n.jsx(
1941
- Kt,
1950
+ Gt,
1942
1951
  {
1943
1952
  isOpen: !0,
1944
1953
  paymentMethod: g,
@@ -1982,8 +1991,8 @@ function Gr({
1982
1991
  }
1983
1992
  );
1984
1993
  }
1985
- function Yr() {
1986
- const { t: e } = R(), { preview: i } = fe(), r = it(), l = ot(), d = Kr(), u = (f) => Gt(f, e) ?? e("unable_to_delete_payment_method"), h = v.useRef(null), g = v.useRef(null), [a, t] = v.useState(!1), [s, o] = v.useState(null), [c, m] = v.useState(null);
1994
+ function Wr() {
1995
+ const { t: e } = R(), { preview: i } = me(), r = ot(), l = lt(), d = Yr(), u = (f) => Yt(f, e) ?? e("unable_to_delete_payment_method"), h = v.useRef(null), g = v.useRef(null), [a, t] = v.useState(!1), [s, o] = v.useState(null), [c, m] = v.useState(null);
1987
1996
  function p() {
1988
1997
  requestAnimationFrame(() => {
1989
1998
  (h.current?.isConnected ? h.current : g.current?.querySelector("button") ?? g.current)?.focus();
@@ -2024,7 +2033,7 @@ function Yr() {
2024
2033
  brand: f.brand || e("card_fallback"),
2025
2034
  lastFour: f.last_four
2026
2035
  }) }),
2027
- f.default && /* @__PURE__ */ n.jsx(Le, { variant: "secondary", children: e("default") })
2036
+ f.default && /* @__PURE__ */ n.jsx(ke, { variant: "secondary", children: e("default") })
2028
2037
  ] }),
2029
2038
  f.exp_month !== null && f.exp_year !== null && /* @__PURE__ */ n.jsxs("p", { className: "text-muted-foreground text-sm", children: [
2030
2039
  e("card_expires"),
@@ -2090,7 +2099,7 @@ function Yr() {
2090
2099
  }
2091
2100
  ),
2092
2101
  a && /* @__PURE__ */ n.jsx(
2093
- Vr,
2102
+ Kr,
2094
2103
  {
2095
2104
  onClose: () => {
2096
2105
  t(!1), p();
@@ -2098,7 +2107,7 @@ function Yr() {
2098
2107
  }
2099
2108
  ),
2100
2109
  s && /* @__PURE__ */ n.jsx(
2101
- Gr,
2110
+ Xr,
2102
2111
  {
2103
2112
  card: s,
2104
2113
  onClose: () => {
@@ -2107,7 +2116,7 @@ function Yr() {
2107
2116
  }
2108
2117
  ),
2109
2118
  /* @__PURE__ */ n.jsx(
2110
- Re,
2119
+ Fe,
2111
2120
  {
2112
2121
  title: e("delete_credit_card"),
2113
2122
  description: e("delete_credit_card_message"),
@@ -2131,7 +2140,7 @@ function Yr() {
2131
2140
  }
2132
2141
  );
2133
2142
  }
2134
- function _e({
2143
+ function be({
2135
2144
  icon: e,
2136
2145
  label: i,
2137
2146
  detail: r,
@@ -2160,7 +2169,7 @@ function _e({
2160
2169
  )
2161
2170
  ] }),
2162
2171
  /* @__PURE__ */ n.jsx(
2163
- Me,
2172
+ Re,
2164
2173
  {
2165
2174
  "aria-hidden": "true",
2166
2175
  className: "text-muted-foreground size-4"
@@ -2170,7 +2179,7 @@ function _e({
2170
2179
  }
2171
2180
  );
2172
2181
  }
2173
- function be({
2182
+ function ve({
2174
2183
  message: e,
2175
2184
  retryLabel: i,
2176
2185
  isRetrying: r,
@@ -2190,13 +2199,13 @@ function be({
2190
2199
  )
2191
2200
  ] });
2192
2201
  }
2193
- function Xr({
2202
+ function Zr({
2194
2203
  onOpen: e,
2195
2204
  triggerRef: i
2196
2205
  }) {
2197
- const { t: r } = R(), l = it(), d = l.data?.payment_methods.find((u) => u.default);
2206
+ const { t: r } = R(), l = ot(), d = l.data?.payment_methods.find((u) => u.default);
2198
2207
  return l.error ? /* @__PURE__ */ n.jsx(
2199
- be,
2208
+ ve,
2200
2209
  {
2201
2210
  message: r("profile_payments_load_failed"),
2202
2211
  retryLabel: r("profile_payments_retry"),
@@ -2204,9 +2213,9 @@ function Xr({
2204
2213
  onRetry: () => void l.refetch()
2205
2214
  }
2206
2215
  ) : /* @__PURE__ */ n.jsx(
2207
- _e,
2216
+ be,
2208
2217
  {
2209
- icon: Fe,
2218
+ icon: Ie,
2210
2219
  label: r("profile_default_payment"),
2211
2220
  detail: l.isPending ? r("profile_loading") : d ? r("profile_card_ending", {
2212
2221
  brand: d.brand || r("card_fallback"),
@@ -2218,7 +2227,7 @@ function Xr({
2218
2227
  }
2219
2228
  );
2220
2229
  }
2221
- function lt(e, i, r) {
2230
+ function ct(e, i, r) {
2222
2231
  const l = {
2223
2232
  dateStyle: "medium",
2224
2233
  ...r ? { timeZone: r } : {}
@@ -2229,24 +2238,24 @@ function lt(e, i, r) {
2229
2238
  return new Intl.DateTimeFormat("en-US", l).format(e);
2230
2239
  }
2231
2240
  }
2232
- function Wr(e, i) {
2241
+ function Jr(e, i) {
2233
2242
  if (!e) return null;
2234
2243
  const r = new Date(e);
2235
- return Number.isNaN(r.getTime()) ? null : lt(r, i);
2244
+ return Number.isNaN(r.getTime()) ? null : ct(r, i);
2236
2245
  }
2237
- function Zr(e, i) {
2246
+ function en(e, i) {
2238
2247
  if (!e) return null;
2239
2248
  const r = /* @__PURE__ */ new Date(`${e.slice(0, 10)}T00:00:00Z`);
2240
- return Number.isNaN(r.getTime()) ? null : lt(r, i, "UTC");
2249
+ return Number.isNaN(r.getTime()) ? null : ct(r, i, "UTC");
2241
2250
  }
2242
- const Jr = se({
2251
+ const tn = se({
2243
2252
  subscription: se({
2244
2253
  token: L(),
2245
2254
  plan_name: L().nullish(),
2246
2255
  next_billing_date: L().nullish()
2247
2256
  }).nullish()
2248
2257
  });
2249
- async function en(e = Ct) {
2258
+ async function rn(e = wt) {
2250
2259
  const i = await e(
2251
2260
  "/api/member-storefront/subscriptions/next",
2252
2261
  {
@@ -2256,35 +2265,35 @@ async function en(e = Ct) {
2256
2265
  );
2257
2266
  if (!i.ok)
2258
2267
  throw new Error(`Next subscription request failed (${i.status})`);
2259
- const { subscription: r } = Jr.parse(await i.json());
2268
+ const { subscription: r } = tn.parse(await i.json());
2260
2269
  return r ? {
2261
2270
  token: r.token,
2262
2271
  planName: r.plan_name ?? null,
2263
2272
  nextBillingDate: r.next_billing_date ?? null
2264
2273
  } : null;
2265
2274
  }
2266
- function tn() {
2267
- const e = er(), i = v.useMemo(() => Et(e), [e]);
2275
+ function nn() {
2276
+ const e = tr(), i = v.useMemo(() => Pt(e), [e]);
2268
2277
  return $({
2269
2278
  queryKey: ["memberStorefront", "profile", "latest-order"],
2270
2279
  queryFn: async () => (await i.fetchCustomerOrders({ limit: 1 })).orders[0] ?? null
2271
2280
  });
2272
2281
  }
2273
- function rn() {
2274
- const { fetch: e } = fe();
2282
+ function sn() {
2283
+ const { fetch: e } = me();
2275
2284
  return $({
2276
2285
  queryKey: ["memberStorefront", "profile", "next-subscription"],
2277
- queryFn: () => en(e)
2286
+ queryFn: () => rn(e)
2278
2287
  });
2279
2288
  }
2280
- function nn({
2289
+ function an({
2281
2290
  onOpen: e,
2282
2291
  triggerRef: i
2283
2292
  }) {
2284
- const { t: r } = R(), { locale: l } = T(), d = tn();
2293
+ const { t: r } = R(), { locale: l } = T(), d = nn();
2285
2294
  if (d.error)
2286
2295
  return /* @__PURE__ */ n.jsx(
2287
- be,
2296
+ ve,
2288
2297
  {
2289
2298
  message: r("profile_orders_load_failed"),
2290
2299
  retryLabel: r("profile_orders_retry"),
@@ -2294,12 +2303,12 @@ function nn({
2294
2303
  );
2295
2304
  const u = d.data, h = d.isPending ? r("profile_loading") : u ? [
2296
2305
  u.order_number ? `#${u.order_number}` : null,
2297
- Wr(u.created_at, l)
2306
+ Jr(u.created_at, l)
2298
2307
  ].filter(Boolean).join(" · ") || r("profile_view_orders") : r("profile_no_orders");
2299
2308
  return /* @__PURE__ */ n.jsx(
2300
- _e,
2309
+ be,
2301
2310
  {
2302
- icon: ke,
2311
+ icon: De,
2303
2312
  label: r("profile_latest_order"),
2304
2313
  detail: h,
2305
2314
  busy: d.isPending,
@@ -2308,14 +2317,14 @@ function nn({
2308
2317
  }
2309
2318
  );
2310
2319
  }
2311
- function sn({
2320
+ function on({
2312
2321
  onOpen: e,
2313
2322
  triggerRef: i
2314
2323
  }) {
2315
- const { t: r } = R(), { locale: l } = T(), d = rn();
2324
+ const { t: r } = R(), { locale: l } = T(), d = sn();
2316
2325
  if (d.error)
2317
2326
  return /* @__PURE__ */ n.jsx(
2318
- be,
2327
+ ve,
2319
2328
  {
2320
2329
  message: r("profile_subscription_load_failed"),
2321
2330
  retryLabel: r("profile_subscription_retry"),
@@ -2323,14 +2332,14 @@ function sn({
2323
2332
  onRetry: () => void d.refetch()
2324
2333
  }
2325
2334
  );
2326
- const u = d.data, h = Zr(u?.nextBillingDate, l), g = d.isPending ? r("profile_loading") : u ? [
2335
+ const u = d.data, h = en(u?.nextBillingDate, l), g = d.isPending ? r("profile_loading") : u ? [
2327
2336
  u.planName,
2328
2337
  h ? r("profile_next_bill_on", { date: h }) : null
2329
2338
  ].filter(Boolean).join(" · ") || r("profile_view_subscriptions") : r("profile_no_next_subscription");
2330
2339
  return /* @__PURE__ */ n.jsx(
2331
- _e,
2340
+ be,
2332
2341
  {
2333
- icon: De,
2342
+ icon: Oe,
2334
2343
  label: r("profile_next_subscription"),
2335
2344
  detail: g,
2336
2345
  busy: d.isPending,
@@ -2339,7 +2348,7 @@ function sn({
2339
2348
  }
2340
2349
  );
2341
2350
  }
2342
- function an({
2351
+ function ln({
2343
2352
  onOpenPayment: e,
2344
2353
  paymentTriggerRef: i,
2345
2354
  onOpenOrder: r,
@@ -2352,15 +2361,15 @@ function an({
2352
2361
  /* @__PURE__ */ n.jsx("h2", { className: "text-muted-foreground text-sm font-medium", children: h("profile_at_a_glance") }),
2353
2362
  /* @__PURE__ */ n.jsxs("div", { className: "space-y-3", children: [
2354
2363
  /* @__PURE__ */ n.jsx(
2355
- Xr,
2364
+ Zr,
2356
2365
  {
2357
2366
  onOpen: e,
2358
2367
  triggerRef: i
2359
2368
  }
2360
2369
  ),
2361
- /* @__PURE__ */ n.jsx(nn, { onOpen: r, triggerRef: l }),
2370
+ /* @__PURE__ */ n.jsx(an, { onOpen: r, triggerRef: l }),
2362
2371
  /* @__PURE__ */ n.jsx(
2363
- sn,
2372
+ on,
2364
2373
  {
2365
2374
  onOpen: d,
2366
2375
  triggerRef: u
@@ -2369,10 +2378,10 @@ function an({
2369
2378
  ] })
2370
2379
  ] });
2371
2380
  }
2372
- function on({
2381
+ function cn({
2373
2382
  initialLanguage: e
2374
2383
  }) {
2375
- const { t: i } = R(), r = tt(), l = rt(), [d, u] = v.useState(e);
2384
+ const { t: i } = R(), r = rt(), l = nt(), [d, u] = v.useState(e);
2376
2385
  if (r.error) throw r.error;
2377
2386
  return /* @__PURE__ */ n.jsxs(
2378
2387
  "form",
@@ -2382,13 +2391,13 @@ function on({
2382
2391
  h.preventDefault(), !(!d || l.isPending) && l.mutate(
2383
2392
  { language_iso: d },
2384
2393
  {
2385
- onSuccess: () => ue({ title: i("profile_updated"), type: "success" })
2394
+ onSuccess: () => fe({ title: i("profile_updated"), type: "success" })
2386
2395
  }
2387
2396
  );
2388
2397
  },
2389
2398
  children: [
2390
2399
  /* @__PURE__ */ n.jsxs("div", { className: "space-y-2", children: [
2391
- /* @__PURE__ */ n.jsx(wt, { htmlFor: "profile-language", children: i("language") }),
2400
+ /* @__PURE__ */ n.jsx(Nt, { htmlFor: "profile-language", children: i("language") }),
2392
2401
  /* @__PURE__ */ n.jsx("p", { className: "text-muted-foreground text-sm", children: i("profile_language_hint") }),
2393
2402
  /* @__PURE__ */ n.jsxs(
2394
2403
  "select",
@@ -2419,48 +2428,53 @@ function on({
2419
2428
  }
2420
2429
  );
2421
2430
  }
2422
- function ln() {
2423
- const { t: e } = R(), i = Ae(), r = me(), { currentSlug: l, navigate: d } = de(), { preview: u } = fe(), h = at(), { locale: g } = T(), a = v.useRef(""), t = v.useRef({});
2431
+ function dn() {
2432
+ const { t: e } = R(), i = Me(), r = he(), { currentSlug: l, navigate: d } = ue(), { preview: u } = me(), h = it(), { locale: g } = T(), a = v.useRef(""), t = v.useRef({});
2424
2433
  if (i.error) throw i.error;
2425
2434
  if (r.error) throw r.error;
2426
2435
  if (!i.data || !r.data)
2427
2436
  return /* @__PURE__ */ n.jsx("p", { role: "status", className: "text-muted-foreground p-6", children: e("profile_loading") });
2428
- const s = i.data, o = `${s.first_name} ${s.last_name}`.trim() || e("account_fallback"), c = Yt(s), m = l === "profile/language", p = l === "profile/addresses", f = l === "profile/payment-methods", x = l === "profile/points", N = l === "profile/orders" || l.startsWith("profile/orders/"), w = l === "profile/subscriptions" || l.startsWith("profile/subscriptions/"), _ = N || w, C = l === "profile/orders" || l === "profile/subscriptions", M = r.data.reward_points_label_plural, k = M.charAt(0).toLocaleUpperCase(g) + M.slice(1), z = [
2437
+ const s = i.data, o = `${s.first_name} ${s.last_name}`.trim() || e("account_fallback"), c = Xt(s), m = l === "profile/language", p = l === "profile/addresses", f = l === "profile/payment-methods", x = l === "profile/points", N = l === "profile/orders" || l.startsWith("profile/orders/"), w = l === "profile/subscriptions" || l.startsWith("profile/subscriptions/"), _ = N || w, C = l === "profile/orders" || l === "profile/subscriptions", M = r.data.reward_points_label_plural, k = M.charAt(0).toLocaleUpperCase(g) + M.slice(1), z = [
2429
2438
  {
2430
2439
  slug: "profile/information",
2431
2440
  label: e("personal_information"),
2432
- icon: dr,
2441
+ icon: ur,
2433
2442
  dialog: !0
2434
2443
  },
2435
2444
  {
2436
2445
  slug: "profile/payment-methods",
2437
2446
  label: e("payment_methods"),
2438
- icon: Fe
2447
+ icon: Ie
2439
2448
  },
2440
- { slug: "profile/addresses", label: e("shipping_addresses"), icon: tr },
2449
+ { slug: "profile/addresses", label: e("shipping_addresses"), icon: rr },
2441
2450
  {
2442
2451
  slug: "orders",
2443
2452
  label: e("orders"),
2444
- icon: ke
2453
+ icon: De
2445
2454
  },
2446
2455
  {
2447
2456
  slug: "subscriptions",
2448
2457
  label: e("subscriptions"),
2449
- icon: De
2458
+ icon: Oe
2450
2459
  },
2451
2460
  {
2452
2461
  slug: "profile/language",
2453
2462
  label: e("language"),
2454
- icon: nr,
2463
+ icon: sr,
2455
2464
  value: s.language_iso?.toUpperCase()
2456
2465
  },
2457
2466
  ...h.data ? [
2458
2467
  {
2459
2468
  slug: "profile/points",
2460
2469
  label: k,
2461
- icon: lr,
2462
- value: new Intl.NumberFormat(g).format(
2463
- h.data.points_ledgers[0]?.total_balance ?? 0
2470
+ icon: cr,
2471
+ value: new Intl.NumberFormat(g, {
2472
+ maximumFractionDigits: 4
2473
+ }).format(
2474
+ ae(
2475
+ h.data.points_ledgers[0]?.total_balance_decimal,
2476
+ h.data.points_ledgers[0]?.total_balance
2477
+ ) ?? 0
2464
2478
  )
2465
2479
  }
2466
2480
  ] : []
@@ -2472,23 +2486,23 @@ function ln() {
2472
2486
  );
2473
2487
  }
2474
2488
  return /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
2475
- /* @__PURE__ */ n.jsx(Nt, { children: /* @__PURE__ */ n.jsx("span", { className: "text-lg font-semibold", children: e("breadcrumb") }) }),
2489
+ /* @__PURE__ */ n.jsx(St, { children: /* @__PURE__ */ n.jsx("span", { className: "text-lg font-semibold", children: e("breadcrumb") }) }),
2476
2490
  _ ? /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
2477
2491
  C && /* @__PURE__ */ n.jsx("div", { className: "px-5 pt-6 md:px-8", children: /* @__PURE__ */ n.jsxs(E, { variant: "ghost", onClick: F, children: [
2478
- /* @__PURE__ */ n.jsx(Ce, { "aria-hidden": "true", className: "size-4" }),
2492
+ /* @__PURE__ */ n.jsx(we, { "aria-hidden": "true", className: "size-4" }),
2479
2493
  e("profile_back")
2480
2494
  ] }) }),
2481
- /* @__PURE__ */ n.jsx(zr, { children: N ? /* @__PURE__ */ n.jsx(At, {}) : /* @__PURE__ */ n.jsx(Dr, {}) })
2495
+ /* @__PURE__ */ n.jsx(Br, { children: N ? /* @__PURE__ */ n.jsx(Mt, {}) : /* @__PURE__ */ n.jsx(zr, {}) })
2482
2496
  ] }) : /* @__PURE__ */ n.jsxs("main", { className: "mx-auto w-full max-w-3xl space-y-8 p-4 sm:p-8", children: [
2483
2497
  m || p || x || f ? /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
2484
2498
  /* @__PURE__ */ n.jsxs(E, { variant: "ghost", onClick: F, children: [
2485
- /* @__PURE__ */ n.jsx(Ce, { "aria-hidden": "true", className: "size-4" }),
2499
+ /* @__PURE__ */ n.jsx(we, { "aria-hidden": "true", className: "size-4" }),
2486
2500
  e("profile_back")
2487
2501
  ] }),
2488
2502
  /* @__PURE__ */ n.jsx("h1", { className: "text-2xl font-semibold", children: x ? k : e(
2489
2503
  f ? "payment_methods" : p ? "shipping_addresses" : "language"
2490
2504
  ) }),
2491
- f ? /* @__PURE__ */ n.jsx(Yr, {}) : p ? /* @__PURE__ */ n.jsx($r, {}) : x ? /* @__PURE__ */ n.jsx(qr, {}) : /* @__PURE__ */ n.jsx(on, { initialLanguage: s.language_iso ?? "" })
2505
+ f ? /* @__PURE__ */ n.jsx(Wr, {}) : p ? /* @__PURE__ */ n.jsx(Qr, {}) : x ? /* @__PURE__ */ n.jsx(Vr, {}) : /* @__PURE__ */ n.jsx(cn, { initialLanguage: s.language_iso ?? "" })
2492
2506
  ] }) : /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
2493
2507
  /* @__PURE__ */ n.jsxs(
2494
2508
  "section",
@@ -2498,15 +2512,15 @@ function ln() {
2498
2512
  children: [
2499
2513
  /* @__PURE__ */ n.jsxs("div", { className: "flex flex-wrap items-center justify-between gap-4 sm:gap-6", children: [
2500
2514
  /* @__PURE__ */ n.jsxs("div", { className: "flex min-w-0 flex-1 items-center gap-3 sm:gap-4", children: [
2501
- /* @__PURE__ */ n.jsxs(jr, { className: "size-12 shrink-0 sm:size-16", children: [
2515
+ /* @__PURE__ */ n.jsxs(Cr, { className: "size-12 shrink-0 sm:size-16", children: [
2502
2516
  /* @__PURE__ */ n.jsx(
2503
- Cr,
2517
+ wr,
2504
2518
  {
2505
2519
  src: s.avatar_url ?? void 0,
2506
2520
  alt: ""
2507
2521
  }
2508
2522
  ),
2509
- /* @__PURE__ */ n.jsx(wr, { children: `${s.first_name[0] ?? ""}${s.last_name[0] ?? ""}` })
2523
+ /* @__PURE__ */ n.jsx(Nr, { children: `${s.first_name[0] ?? ""}${s.last_name[0] ?? ""}` })
2510
2524
  ] }),
2511
2525
  /* @__PURE__ */ n.jsxs("div", { className: "min-w-0 space-y-1", children: [
2512
2526
  c && /* @__PURE__ */ n.jsx("p", { className: "text-muted-foreground text-xs font-medium", children: e("member_of", { company: r.data.name }) }),
@@ -2523,7 +2537,7 @@ function ln() {
2523
2537
  "aria-label": e("profile_qr_code"),
2524
2538
  className: "bg-background text-foreground border-border focus-visible:ring-ring rounded-lg border p-2 focus-visible:ring-2",
2525
2539
  children: /* @__PURE__ */ n.jsx(
2526
- et,
2540
+ tt,
2527
2541
  {
2528
2542
  value: s.mysite_url,
2529
2543
  size: 80,
@@ -2570,7 +2584,7 @@ function ln() {
2570
2584
  /* @__PURE__ */ n.jsx("span", { className: "flex-1 font-medium", children: y.label }),
2571
2585
  y.value && /* @__PURE__ */ n.jsx("span", { className: "text-muted-foreground text-sm tabular-nums", children: y.value }),
2572
2586
  /* @__PURE__ */ n.jsx(
2573
- Me,
2587
+ Re,
2574
2588
  {
2575
2589
  "aria-hidden": "true",
2576
2590
  className: "text-muted-foreground size-4"
@@ -2584,7 +2598,7 @@ function ln() {
2584
2598
  }
2585
2599
  ),
2586
2600
  /* @__PURE__ */ n.jsx(
2587
- an,
2601
+ ln,
2588
2602
  {
2589
2603
  paymentTriggerRef: (y) => {
2590
2604
  t.current["profile/default-payment"] = y;
@@ -2640,19 +2654,19 @@ function ln() {
2640
2654
  tabIndex: u ? -1 : void 0,
2641
2655
  className: "text-muted-foreground hover:text-foreground focus-visible:ring-ring flex min-h-11 items-center gap-3 rounded-md px-1 text-sm focus-visible:ring-2",
2642
2656
  children: [
2643
- /* @__PURE__ */ n.jsx(ar, { "aria-hidden": "true", className: "size-4" }),
2657
+ /* @__PURE__ */ n.jsx(ir, { "aria-hidden": "true", className: "size-4" }),
2644
2658
  e("sign_out")
2645
2659
  ]
2646
2660
  }
2647
2661
  )
2648
2662
  ] }),
2649
- l === "profile/information" && /* @__PURE__ */ n.jsx(Tr, { account: s, onClose: F })
2663
+ l === "profile/information" && /* @__PURE__ */ n.jsx(Ur, { account: s, onClose: F })
2650
2664
  ] })
2651
2665
  ] });
2652
2666
  }
2653
- function Sn() {
2654
- return /* @__PURE__ */ n.jsx(Pt, { children: /* @__PURE__ */ n.jsx(ln, {}) });
2667
+ function Pn() {
2668
+ return /* @__PURE__ */ n.jsx(At, { children: /* @__PURE__ */ n.jsx(dn, {}) });
2655
2669
  }
2656
2670
  export {
2657
- Sn as default
2671
+ Pn as default
2658
2672
  };