@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.
- package/dist/dist-cli-preview/.vite/manifest.json +34 -34
- package/dist/dist-cli-preview/account-screens.js +1 -1
- package/dist/dist-cli-preview/chunks/{MediaScreen-DIN5HQWI.js → MediaScreen-B_xm3Zg8.js} +1 -1
- package/dist/dist-cli-preview/chunks/{MemberManagementProviders-C6Wup6Cl.js → MemberManagementProviders-cPKgxLcu.js} +9 -0
- package/dist/dist-cli-preview/chunks/{MemberShareablesScreen-CohW1VIw.js → MemberShareablesScreen-feuIMxq7.js} +1 -1
- package/dist/dist-cli-preview/chunks/{OrdersScreen-clLNt--d.js → OrdersScreen-uxcbBBMR.js} +229 -213
- package/dist/dist-cli-preview/chunks/{OrdersScreen-oY9GJKLN.js → OrdersScreen-ykMJMKr0.js} +2 -2
- package/dist/dist-cli-preview/chunks/{PlaylistsScreen-plD_ZJDC.js → PlaylistsScreen-BXO-rRPZ.js} +1 -1
- package/dist/dist-cli-preview/chunks/{ProfileScreen-B9kaD-QH.js → ProfileScreen-egFiYwEa.js} +315 -301
- package/dist/dist-cli-preview/chunks/{SubscriptionsScreen-IwMZ7pA6.js → SubscriptionsScreen-BOIQBkEN.js} +2 -2
- package/dist/dist-cli-preview/chunks/{cli-preview-DDs1RxpC.js → cli-preview-Dzj_TXqm.js} +6 -6
- package/dist/dist-cli-preview/chunks/{create-card-entry-container-DEvxwcvy.js → create-card-entry-container-BYz9zvFS.js} +1 -1
- package/dist/dist-cli-preview/chunks/{mount-account-screen-oNhkwrvG.js → mount-account-screen-DpML94er.js} +2 -2
- package/dist/dist-cli-preview/chunks/{navigate-account-screen-DBt55lsT.js → navigate-account-screen-Qzg2EWLi.js} +1 -1
- package/package.json +2 -2
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { Y as
|
|
2
|
-
import { c as
|
|
3
|
-
import { f as
|
|
4
|
-
import { u as
|
|
5
|
-
import { B as
|
|
1
|
+
import { Y as ue, l as u, aj as me, j as t, X as I, a1 as W, ay as pe, B as $, ak as xe, E as fe } from "./account-screen-runtime-CCY1xG25.js";
|
|
2
|
+
import { c as ge, a as he, b as _e, u as be } from "./translation-api-context-factory-BvgIQ7Kx.js";
|
|
3
|
+
import { f as q, h as je, I as ye, R as Ne, m as ve, r as z, n as G, i as A, e as we, p as ke } from "./MemberManagementProviders-cPKgxLcu.js";
|
|
4
|
+
import { u as Se } from "./useInfiniteQuery-BNm7VYEX.js";
|
|
5
|
+
import { B as X, a as V, b as T, c as H, I as Oe, S as g, d as De, e as Ce } from "./sheet-haptics-context-Ne6R0IeV.js";
|
|
6
6
|
import "./store-api-context-C1xY0aMw.js";
|
|
7
|
-
import { S as
|
|
8
|
-
import { u as
|
|
9
|
-
const
|
|
7
|
+
import { S as Q } from "./search-QWTY3jlc.js";
|
|
8
|
+
import { u as Le } from "./use-optional-store-DAJqLcKr.js";
|
|
9
|
+
const Te = {
|
|
10
10
|
all: ["orders"]
|
|
11
|
-
},
|
|
11
|
+
}, P = {
|
|
12
12
|
all: ["portalTenantOrders"],
|
|
13
|
-
list: (e) => [...
|
|
14
|
-
detail: (e) => [...
|
|
13
|
+
list: (e) => [...P.all, "list", e],
|
|
14
|
+
detail: (e) => [...P.all, "detail", e]
|
|
15
15
|
};
|
|
16
|
-
function
|
|
17
|
-
const s =
|
|
18
|
-
return
|
|
19
|
-
queryKey: [...
|
|
16
|
+
function Pe(e, r) {
|
|
17
|
+
const s = q();
|
|
18
|
+
return Se({
|
|
19
|
+
queryKey: [...Te.all, "infinite-list", e],
|
|
20
20
|
queryFn: ({ pageParam: a }) => {
|
|
21
21
|
if (!s.fetchCustomerOrders)
|
|
22
22
|
throw new Error(
|
|
@@ -29,10 +29,10 @@ function Le(e, r) {
|
|
|
29
29
|
enabled: r?.enabled ?? !0
|
|
30
30
|
});
|
|
31
31
|
}
|
|
32
|
-
function
|
|
33
|
-
const s =
|
|
34
|
-
return
|
|
35
|
-
queryKey:
|
|
32
|
+
function J(e, r) {
|
|
33
|
+
const s = q();
|
|
34
|
+
return ue({
|
|
35
|
+
queryKey: P.detail(e),
|
|
36
36
|
queryFn: () => {
|
|
37
37
|
if (!s.fetchOrderById)
|
|
38
38
|
throw new Error("fetchOrderById not implemented on this OrdersApi");
|
|
@@ -41,26 +41,33 @@ function H(e, r) {
|
|
|
41
41
|
enabled: !!e
|
|
42
42
|
});
|
|
43
43
|
}
|
|
44
|
-
function
|
|
44
|
+
function $e(e) {
|
|
45
45
|
return e.order_total_after_points_redemption != null ? `${e.currency_symbol || "$"}${Number(
|
|
46
46
|
e.order_total_after_points_redemption
|
|
47
47
|
).toFixed(2)}` : e.total_display_amount || `${e.currency_symbol || "$"}${Number(e.amount).toFixed(2)}`;
|
|
48
48
|
}
|
|
49
|
-
|
|
49
|
+
const Fe = /^-?\d+(\.\d{1,4})?$/;
|
|
50
|
+
function O(e, r) {
|
|
51
|
+
return e != null && Fe.test(e) ? Number(e) : r ?? void 0;
|
|
52
|
+
}
|
|
53
|
+
function D(e, r) {
|
|
54
|
+
return e.toLocaleString(r, { maximumFractionDigits: 4 });
|
|
55
|
+
}
|
|
56
|
+
function Ee(e, r, s) {
|
|
50
57
|
if (!r.address1 || !r.city || !r.state || !r.postal_code)
|
|
51
58
|
return null;
|
|
52
59
|
const a = `${r.address1}, ${r.city}, ${r.state} ${r.postal_code.slice(0, 5)}`, n = encodeURIComponent(a), l = s?.width ?? 600, i = s?.height ?? 300, o = s?.zoom ?? 15, d = encodeURIComponent(s?.markerColor ?? "red");
|
|
53
60
|
return `https://maps.googleapis.com/maps/api/staticmap?center=${n}&zoom=${o}&size=${l}x${i}&maptype=roadmap&markers=color:${d}%7C${n}&key=${e}`;
|
|
54
61
|
}
|
|
55
|
-
const
|
|
62
|
+
const B = {
|
|
56
63
|
singular: "point",
|
|
57
64
|
plural: "points"
|
|
58
65
|
};
|
|
59
|
-
function
|
|
60
|
-
const { data: e } =
|
|
66
|
+
function Ie() {
|
|
67
|
+
const { data: e } = Le(), r = e?.reward_points_label_singular?.trim() || B.singular, s = e?.reward_points_label_plural?.trim() || B.plural;
|
|
61
68
|
return u.useMemo(() => ({ singular: r, plural: s }), [r, s]);
|
|
62
69
|
}
|
|
63
|
-
const
|
|
70
|
+
const ze = {
|
|
64
71
|
breadcrumb: "Orders",
|
|
65
72
|
breadcrumb_detail: "Order #{{id}}",
|
|
66
73
|
search_orders: "Search orders...",
|
|
@@ -155,8 +162,8 @@ const Fe = {
|
|
|
155
162
|
track_package: "Track package",
|
|
156
163
|
track_package_aria: "Track package {{number}}",
|
|
157
164
|
track_package_aria_with_carrier: "Track {{carrier}} package {{number}}"
|
|
158
|
-
},
|
|
159
|
-
fallback:
|
|
165
|
+
}, Ae = ge({
|
|
166
|
+
fallback: ze,
|
|
160
167
|
loaders: {
|
|
161
168
|
ar: () => import("./ar-8iaFSgop.js").then(
|
|
162
169
|
(e) => e.default
|
|
@@ -262,39 +269,39 @@ const Fe = {
|
|
|
262
269
|
)
|
|
263
270
|
}
|
|
264
271
|
});
|
|
265
|
-
function
|
|
266
|
-
return
|
|
272
|
+
function Be(e, r) {
|
|
273
|
+
return he(e, r);
|
|
267
274
|
}
|
|
268
|
-
const { Provider:
|
|
269
|
-
function
|
|
275
|
+
const { Provider: Ue, useTranslation: Me } = _e("Orders"), Re = Ue, m = Me;
|
|
276
|
+
function U({
|
|
270
277
|
children: e
|
|
271
278
|
}) {
|
|
272
|
-
const { locale: r } =
|
|
273
|
-
() =>
|
|
279
|
+
const { locale: r } = me(), s = be(Ae, r), a = u.useMemo(
|
|
280
|
+
() => Be(r, s),
|
|
274
281
|
[r, s]
|
|
275
282
|
);
|
|
276
|
-
return /* @__PURE__ */ t.jsx(
|
|
283
|
+
return /* @__PURE__ */ t.jsx(Re, { value: a, children: e });
|
|
277
284
|
}
|
|
278
|
-
const
|
|
285
|
+
const Ke = {
|
|
279
286
|
green: "bg-green-500/15 text-foreground",
|
|
280
287
|
yellow: "bg-yellow-500/15 text-foreground",
|
|
281
288
|
red: "bg-red-500/15 text-foreground",
|
|
282
289
|
blue: "bg-blue-500/15 text-foreground",
|
|
283
290
|
orange: "bg-orange-500/15 text-foreground",
|
|
284
291
|
gray: "bg-foreground/10 text-foreground"
|
|
285
|
-
},
|
|
292
|
+
}, Ye = {
|
|
286
293
|
green: "bg-green-500",
|
|
287
294
|
yellow: "bg-yellow-500",
|
|
288
295
|
red: "bg-red-500",
|
|
289
296
|
blue: "bg-blue-500",
|
|
290
297
|
orange: "bg-orange-500",
|
|
291
298
|
gray: "bg-gray-500"
|
|
292
|
-
},
|
|
299
|
+
}, We = {
|
|
293
300
|
xs: "px-1.5 py-0.5 text-[10px]",
|
|
294
301
|
sm: "px-2 py-0.5 text-xs",
|
|
295
302
|
md: "px-2.5 py-1 text-sm"
|
|
296
303
|
};
|
|
297
|
-
function
|
|
304
|
+
function qe({
|
|
298
305
|
color: e,
|
|
299
306
|
dot: r,
|
|
300
307
|
size: s = "md",
|
|
@@ -304,17 +311,17 @@ function Ke({
|
|
|
304
311
|
return /* @__PURE__ */ t.jsxs(
|
|
305
312
|
"span",
|
|
306
313
|
{
|
|
307
|
-
className:
|
|
314
|
+
className: I(
|
|
308
315
|
"inline-flex items-center gap-1 rounded-full font-medium whitespace-nowrap capitalize",
|
|
309
|
-
|
|
310
|
-
|
|
316
|
+
Ke[e],
|
|
317
|
+
We[s],
|
|
311
318
|
a
|
|
312
319
|
),
|
|
313
320
|
children: [
|
|
314
321
|
r && /* @__PURE__ */ t.jsx(
|
|
315
322
|
"span",
|
|
316
323
|
{
|
|
317
|
-
className:
|
|
324
|
+
className: I("h-1.5 w-1.5 rounded-full", Ye[e])
|
|
318
325
|
}
|
|
319
326
|
),
|
|
320
327
|
n
|
|
@@ -322,13 +329,13 @@ function Ke({
|
|
|
322
329
|
}
|
|
323
330
|
);
|
|
324
331
|
}
|
|
325
|
-
function
|
|
332
|
+
function Ge(e) {
|
|
326
333
|
return e ? e.replace(/_/g, " ").replace(/\b\w/g, (r) => r.toUpperCase()) : "";
|
|
327
334
|
}
|
|
328
|
-
function
|
|
335
|
+
function M(e) {
|
|
329
336
|
return e.charAt(0).toUpperCase() + e.slice(1);
|
|
330
337
|
}
|
|
331
|
-
const
|
|
338
|
+
const Xe = /* @__PURE__ */ new Set([
|
|
332
339
|
"cancelled",
|
|
333
340
|
"completed",
|
|
334
341
|
"fulfilled",
|
|
@@ -339,14 +346,14 @@ const We = /* @__PURE__ */ new Set([
|
|
|
339
346
|
"returned",
|
|
340
347
|
"shipped"
|
|
341
348
|
]);
|
|
342
|
-
function
|
|
349
|
+
function Ve(e, r) {
|
|
343
350
|
const s = r.toLowerCase();
|
|
344
|
-
return
|
|
351
|
+
return Xe.has(s) ? e(`status_${s}`) : Ge(r);
|
|
345
352
|
}
|
|
346
|
-
function
|
|
353
|
+
function He(e) {
|
|
347
354
|
return e.sale_date ?? e.created_at;
|
|
348
355
|
}
|
|
349
|
-
const
|
|
356
|
+
const Qe = {
|
|
350
357
|
fulfilled: "gray",
|
|
351
358
|
unfulfilled: "yellow",
|
|
352
359
|
in_progress: "yellow",
|
|
@@ -356,47 +363,47 @@ const Xe = {
|
|
|
356
363
|
// `processing` is not a fulfillment_status enum value but the BFF /
|
|
357
364
|
// legacy responses can surface it; admin colors it yellow, so we match.
|
|
358
365
|
processing: "yellow"
|
|
359
|
-
},
|
|
366
|
+
}, Z = {
|
|
360
367
|
cancelled: "red",
|
|
361
368
|
returned: "red",
|
|
362
369
|
refunded: "red"
|
|
363
370
|
};
|
|
364
|
-
function
|
|
371
|
+
function Je(e) {
|
|
365
372
|
return e.includes("fulfilled") || e.includes("complete") ? "gray" : e.includes("hold") ? "orange" : "yellow";
|
|
366
373
|
}
|
|
367
|
-
const
|
|
368
|
-
function
|
|
369
|
-
return e &&
|
|
374
|
+
const Ze = new Set(Object.keys(Z)), R = "refunded";
|
|
375
|
+
function ee(e, r, s) {
|
|
376
|
+
return e && Ze.has(e.toLowerCase()) ? e : s?.toLowerCase() === R ? R : r ?? e ?? "";
|
|
370
377
|
}
|
|
371
|
-
function
|
|
378
|
+
function et(e) {
|
|
372
379
|
if (!e) return "gray";
|
|
373
380
|
const r = e.toLowerCase();
|
|
374
|
-
return
|
|
381
|
+
return Qe[r] ?? Z[r] ?? Je(r);
|
|
375
382
|
}
|
|
376
|
-
function
|
|
383
|
+
function te({
|
|
377
384
|
status: e,
|
|
378
385
|
className: r
|
|
379
386
|
}) {
|
|
380
387
|
const { t: s } = m();
|
|
381
388
|
return /* @__PURE__ */ t.jsx(
|
|
382
|
-
|
|
389
|
+
qe,
|
|
383
390
|
{
|
|
384
|
-
color:
|
|
391
|
+
color: et(e),
|
|
385
392
|
dot: !0,
|
|
386
393
|
size: "sm",
|
|
387
394
|
className: r,
|
|
388
|
-
children:
|
|
395
|
+
children: Ve(s, e)
|
|
389
396
|
}
|
|
390
397
|
);
|
|
391
398
|
}
|
|
392
|
-
function
|
|
399
|
+
function tt({
|
|
393
400
|
apiKey: e,
|
|
394
401
|
address: r,
|
|
395
402
|
options: s,
|
|
396
403
|
alt: a,
|
|
397
404
|
className: n
|
|
398
405
|
}) {
|
|
399
|
-
const { t: l } = m(), [i, o] = u.useState(!1), d =
|
|
406
|
+
const { t: l } = m(), [i, o] = u.useState(!1), d = Ee(e, r, s);
|
|
400
407
|
return !d || i ? null : /* @__PURE__ */ t.jsx(
|
|
401
408
|
"img",
|
|
402
409
|
{
|
|
@@ -409,7 +416,7 @@ function Je({
|
|
|
409
416
|
}
|
|
410
417
|
);
|
|
411
418
|
}
|
|
412
|
-
const
|
|
419
|
+
const rt = {
|
|
413
420
|
fulfilled: "fulfilled",
|
|
414
421
|
// `completed` is an order_status lifecycle value kept as a defensive
|
|
415
422
|
// alias so an order whose BFF response is missing `fulfillment_status`
|
|
@@ -428,11 +435,11 @@ const Ze = {
|
|
|
428
435
|
unfulfilled: "pending",
|
|
429
436
|
processing: "pending"
|
|
430
437
|
};
|
|
431
|
-
function
|
|
432
|
-
return
|
|
438
|
+
function st(e) {
|
|
439
|
+
return rt[(e || "").toLowerCase()] ?? "pending";
|
|
433
440
|
}
|
|
434
|
-
function
|
|
435
|
-
return
|
|
441
|
+
function re(e) {
|
|
442
|
+
return ee(
|
|
436
443
|
e.order_status,
|
|
437
444
|
e.fulfillment_status,
|
|
438
445
|
e.financial_status
|
|
@@ -441,10 +448,10 @@ function ee(e) {
|
|
|
441
448
|
function y(e, r) {
|
|
442
449
|
if (e === "all") return !0;
|
|
443
450
|
if (e === "subscription") return r.subscription != null;
|
|
444
|
-
const s =
|
|
451
|
+
const s = st(re(r));
|
|
445
452
|
return e === "fulfilled" ? s === "fulfilled" || s === "shipped" : e === "preparing" ? s === "preparing" || s === "pending" : !0;
|
|
446
453
|
}
|
|
447
|
-
function
|
|
454
|
+
function nt(e) {
|
|
448
455
|
return {
|
|
449
456
|
all: e.length,
|
|
450
457
|
fulfilled: e.filter((r) => y("fulfilled", r)).length,
|
|
@@ -452,10 +459,10 @@ function tt(e) {
|
|
|
452
459
|
subscription: e.filter((r) => y("subscription", r)).length
|
|
453
460
|
};
|
|
454
461
|
}
|
|
455
|
-
function
|
|
462
|
+
function se(e) {
|
|
456
463
|
return e.sale_date ?? e.created_at;
|
|
457
464
|
}
|
|
458
|
-
function
|
|
465
|
+
function at(e, r, s = /* @__PURE__ */ new Date()) {
|
|
459
466
|
if (e.length === 0) return [];
|
|
460
467
|
const a = new Date(
|
|
461
468
|
s.getFullYear(),
|
|
@@ -465,7 +472,7 @@ function rt(e, r, s = /* @__PURE__ */ new Date()) {
|
|
|
465
472
|
n.setDate(n.getDate() - 7);
|
|
466
473
|
const l = new Date(s.getFullYear(), s.getMonth(), 1), i = new Date(s.getFullYear(), 0, 1), o = /* @__PURE__ */ new Map(), d = [];
|
|
467
474
|
for (const c of e) {
|
|
468
|
-
const h = new Date(
|
|
475
|
+
const h = new Date(se(c));
|
|
469
476
|
let p;
|
|
470
477
|
h >= n ? p = r("group_this_week") : h >= l ? p = r("group_this_month") : h >= i ? p = h.toLocaleDateString(void 0, {
|
|
471
478
|
month: "long"
|
|
@@ -481,7 +488,7 @@ function rt(e, r, s = /* @__PURE__ */ new Date()) {
|
|
|
481
488
|
orders: o.get(c) ?? []
|
|
482
489
|
}));
|
|
483
490
|
}
|
|
484
|
-
function
|
|
491
|
+
function it(e, r, s = /* @__PURE__ */ new Date()) {
|
|
485
492
|
try {
|
|
486
493
|
const a = new Date(e), n = new Date(
|
|
487
494
|
s.getFullYear(),
|
|
@@ -502,7 +509,7 @@ function st(e, r, s = /* @__PURE__ */ new Date()) {
|
|
|
502
509
|
return "";
|
|
503
510
|
}
|
|
504
511
|
}
|
|
505
|
-
function
|
|
512
|
+
function lt(e, r) {
|
|
506
513
|
return e === 0 ? {
|
|
507
514
|
left: "50%",
|
|
508
515
|
transform: "translateX(-50%)",
|
|
@@ -517,25 +524,25 @@ function nt(e, r) {
|
|
|
517
524
|
zIndex: 10
|
|
518
525
|
};
|
|
519
526
|
}
|
|
520
|
-
const
|
|
521
|
-
function
|
|
527
|
+
const ot = 10;
|
|
528
|
+
function dt({
|
|
522
529
|
customerId: e,
|
|
523
530
|
onOrderClick: r,
|
|
524
531
|
t: s
|
|
525
532
|
}) {
|
|
526
533
|
const { t: a } = m(), n = s ?? a, [l, i] = u.useState(""), [o, d] = u.useState("all"), [c, h] = u.useState(), [p, _] = u.useState(!1), N = c && !p && o !== "all" ? o : void 0, {
|
|
527
534
|
data: v,
|
|
528
|
-
isLoading:
|
|
529
|
-
isError:
|
|
530
|
-
error:
|
|
531
|
-
refetch:
|
|
532
|
-
fetchNextPage:
|
|
533
|
-
hasNextPage:
|
|
534
|
-
isFetchingNextPage:
|
|
535
|
-
} =
|
|
535
|
+
isLoading: ne,
|
|
536
|
+
isError: ae,
|
|
537
|
+
error: ie,
|
|
538
|
+
refetch: le,
|
|
539
|
+
fetchNextPage: oe,
|
|
540
|
+
hasNextPage: de,
|
|
541
|
+
isFetchingNextPage: F
|
|
542
|
+
} = Pe(
|
|
536
543
|
{
|
|
537
544
|
customerId: e,
|
|
538
|
-
limit:
|
|
545
|
+
limit: ot,
|
|
539
546
|
search: l || void 0,
|
|
540
547
|
sort: "-created_at",
|
|
541
548
|
status: N
|
|
@@ -545,26 +552,26 @@ function it({
|
|
|
545
552
|
() => v?.pages.flatMap((f) => f.orders) ?? [],
|
|
546
553
|
[v]
|
|
547
554
|
), w = v?.pages[0]?.counts;
|
|
548
|
-
w && w !== c && h(w),
|
|
549
|
-
const
|
|
555
|
+
w && w !== c && h(w), je(ie) && !p && _(!0);
|
|
556
|
+
const E = c ?? nt(b), k = u.useMemo(
|
|
550
557
|
() => N ? b : b.filter((f) => y(o, f)),
|
|
551
558
|
[N, b, o]
|
|
552
|
-
),
|
|
559
|
+
), ce = u.useMemo(() => at(k, n), [k, n]);
|
|
553
560
|
return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
554
|
-
/* @__PURE__ */ t.jsx(
|
|
561
|
+
/* @__PURE__ */ t.jsx(W, { children: /* @__PURE__ */ t.jsx(X, { children: /* @__PURE__ */ t.jsx(V, { className: "text-lg", children: /* @__PURE__ */ t.jsx(T, { children: /* @__PURE__ */ t.jsx(H, { className: "font-semibold", children: n("order_history") }) }) }) }) }),
|
|
555
562
|
/* @__PURE__ */ t.jsx("div", { className: "relative", children: /* @__PURE__ */ t.jsxs("div", { className: "relative mx-auto max-w-4xl px-5 pt-8 pb-20 md:px-8", children: [
|
|
556
563
|
/* @__PURE__ */ t.jsxs("div", { className: "flex items-center gap-3", children: [
|
|
557
564
|
/* @__PURE__ */ t.jsx("h1", { className: "text-foreground flex-1 truncate text-xl font-bold tracking-tight md:text-2xl", children: n("order_history") }),
|
|
558
565
|
/* @__PURE__ */ t.jsxs("div", { className: "relative hidden sm:block", children: [
|
|
559
566
|
/* @__PURE__ */ t.jsx(
|
|
560
|
-
|
|
567
|
+
Q,
|
|
561
568
|
{
|
|
562
569
|
className: "text-muted-foreground pointer-events-none absolute top-1/2 left-3 size-4 -translate-y-1/2",
|
|
563
570
|
strokeWidth: 2
|
|
564
571
|
}
|
|
565
572
|
),
|
|
566
573
|
/* @__PURE__ */ t.jsx(
|
|
567
|
-
|
|
574
|
+
Oe,
|
|
568
575
|
{
|
|
569
576
|
value: l,
|
|
570
577
|
onChange: (f) => i(f.target.value),
|
|
@@ -574,19 +581,19 @@ function it({
|
|
|
574
581
|
)
|
|
575
582
|
] })
|
|
576
583
|
] }),
|
|
577
|
-
(
|
|
578
|
-
|
|
584
|
+
(E.all > 0 || o !== "all") && /* @__PURE__ */ t.jsx(
|
|
585
|
+
ut,
|
|
579
586
|
{
|
|
580
587
|
active: o,
|
|
581
|
-
counts:
|
|
588
|
+
counts: E,
|
|
582
589
|
onChange: d,
|
|
583
590
|
t: n
|
|
584
591
|
}
|
|
585
592
|
),
|
|
586
|
-
|
|
593
|
+
ne ? /* @__PURE__ */ t.jsx("div", { className: "ring-border mt-4 overflow-hidden rounded-2xl bg-transparent ring-1", children: /* @__PURE__ */ t.jsx(xt, {}) }) : ae ? /* @__PURE__ */ t.jsx("div", { className: "ring-border mt-4 overflow-hidden rounded-2xl bg-transparent ring-1", children: /* @__PURE__ */ t.jsx(gt, { onRetry: () => le(), t: n }) }) : k.length === 0 ? /* @__PURE__ */ t.jsx("div", { className: "ring-border mt-4 overflow-hidden rounded-2xl bg-transparent ring-1", children: /* @__PURE__ */ t.jsx(ft, { searching: !!l || o !== "all", t: n }) }) : /* @__PURE__ */ t.jsx("div", { className: "mt-4 space-y-6", children: ce.map((f) => /* @__PURE__ */ t.jsxs("div", { children: [
|
|
587
594
|
/* @__PURE__ */ t.jsx("div", { className: "text-muted-foreground mb-2 px-1 text-xs font-semibold", children: f.label }),
|
|
588
595
|
/* @__PURE__ */ t.jsx("div", { className: "space-y-3", children: f.orders.map((S) => /* @__PURE__ */ t.jsx(
|
|
589
|
-
|
|
596
|
+
mt,
|
|
590
597
|
{
|
|
591
598
|
order: S,
|
|
592
599
|
onClick: () => r(S),
|
|
@@ -595,32 +602,32 @@ function it({
|
|
|
595
602
|
S.id
|
|
596
603
|
)) })
|
|
597
604
|
] }, f.label)) }),
|
|
598
|
-
|
|
605
|
+
de && /* @__PURE__ */ t.jsx("div", { className: "mt-3 flex justify-center", children: /* @__PURE__ */ t.jsx(
|
|
599
606
|
"button",
|
|
600
607
|
{
|
|
601
608
|
type: "button",
|
|
602
|
-
onClick: () =>
|
|
603
|
-
disabled:
|
|
609
|
+
onClick: () => oe(),
|
|
610
|
+
disabled: F,
|
|
604
611
|
className: "ring-border text-foreground hover:bg-muted inline-flex items-center gap-1 rounded-md bg-transparent px-3 py-1.5 text-xs font-bold ring-1 transition-all disabled:cursor-not-allowed disabled:opacity-40",
|
|
605
|
-
children: n(
|
|
612
|
+
children: n(F ? "loading" : "load_more")
|
|
606
613
|
}
|
|
607
614
|
) })
|
|
608
615
|
] }) })
|
|
609
616
|
] });
|
|
610
617
|
}
|
|
611
|
-
const
|
|
618
|
+
const ct = [
|
|
612
619
|
{ key: "all", labelKey: "filter_all" },
|
|
613
620
|
{ key: "fulfilled", labelKey: "filter_fulfilled" },
|
|
614
621
|
{ key: "preparing", labelKey: "filter_preparing" },
|
|
615
622
|
{ key: "subscription", labelKey: "filter_subscription" }
|
|
616
623
|
];
|
|
617
|
-
function
|
|
624
|
+
function ut({
|
|
618
625
|
active: e,
|
|
619
626
|
counts: r,
|
|
620
627
|
onChange: s,
|
|
621
628
|
t: a
|
|
622
629
|
}) {
|
|
623
|
-
return /* @__PURE__ */ t.jsx("div", { className: "-mx-1 mt-5 flex flex-wrap gap-1.5 px-1", children:
|
|
630
|
+
return /* @__PURE__ */ t.jsx("div", { className: "-mx-1 mt-5 flex flex-wrap gap-1.5 px-1", children: ct.map((n) => {
|
|
624
631
|
const l = n.key === e, i = r[n.key];
|
|
625
632
|
return /* @__PURE__ */ t.jsxs(
|
|
626
633
|
"button",
|
|
@@ -643,12 +650,12 @@ function ot({
|
|
|
643
650
|
);
|
|
644
651
|
}) });
|
|
645
652
|
}
|
|
646
|
-
function
|
|
653
|
+
function mt({
|
|
647
654
|
order: e,
|
|
648
655
|
onClick: r,
|
|
649
656
|
t: s
|
|
650
657
|
}) {
|
|
651
|
-
const a =
|
|
658
|
+
const a = it(se(e), s), n = $e(e), l = e.first_item?.title || `${s("order_number")}${e.order_number}`, i = e.items_count > 1 ? s("more_items", { n: e.items_count - 1 }) : "";
|
|
652
659
|
return /* @__PURE__ */ t.jsxs(
|
|
653
660
|
"button",
|
|
654
661
|
{
|
|
@@ -666,7 +673,7 @@ function dt({
|
|
|
666
673
|
l,
|
|
667
674
|
i && /* @__PURE__ */ t.jsx("span", { className: "text-muted-foreground font-medium", children: i })
|
|
668
675
|
] }),
|
|
669
|
-
/* @__PURE__ */ t.jsx(
|
|
676
|
+
/* @__PURE__ */ t.jsx(te, { status: re(e) })
|
|
670
677
|
] }),
|
|
671
678
|
/* @__PURE__ */ t.jsxs("div", { className: "text-muted-foreground mt-1 truncate text-xs", children: [
|
|
672
679
|
a,
|
|
@@ -675,7 +682,7 @@ function dt({
|
|
|
675
682
|
] })
|
|
676
683
|
] }),
|
|
677
684
|
/* @__PURE__ */ t.jsx(
|
|
678
|
-
|
|
685
|
+
pt,
|
|
679
686
|
{
|
|
680
687
|
fallback: e.first_item,
|
|
681
688
|
urls: e.thumbnail_image_urls,
|
|
@@ -687,7 +694,7 @@ function dt({
|
|
|
687
694
|
}
|
|
688
695
|
);
|
|
689
696
|
}
|
|
690
|
-
function
|
|
697
|
+
function pt({
|
|
691
698
|
urls: e,
|
|
692
699
|
fallback: r,
|
|
693
700
|
isSubscription: s,
|
|
@@ -696,8 +703,8 @@ function ct({
|
|
|
696
703
|
const n = (e && e.length > 0 ? e : r?.image_url ? [r.image_url] : []).slice(0, 3);
|
|
697
704
|
if (n.length === 0)
|
|
698
705
|
return /* @__PURE__ */ t.jsxs("div", { className: "ring-border bg-muted text-muted-foreground relative flex size-12 shrink-0 items-center justify-center rounded-xl ring-1", children: [
|
|
699
|
-
/* @__PURE__ */ t.jsx(
|
|
700
|
-
s && /* @__PURE__ */ t.jsx(
|
|
706
|
+
/* @__PURE__ */ t.jsx(ye, { className: "size-5", strokeWidth: 1.75 }),
|
|
707
|
+
s && /* @__PURE__ */ t.jsx(C, { t: a })
|
|
701
708
|
] });
|
|
702
709
|
if (n.length === 1)
|
|
703
710
|
return /* @__PURE__ */ t.jsxs("div", { className: "relative size-12 shrink-0", children: [
|
|
@@ -709,7 +716,7 @@ function ct({
|
|
|
709
716
|
className: "ring-background size-12 rounded-xl bg-transparent object-cover ring-[3px]"
|
|
710
717
|
}
|
|
711
718
|
),
|
|
712
|
-
s && /* @__PURE__ */ t.jsx(
|
|
719
|
+
s && /* @__PURE__ */ t.jsx(C, { t: a })
|
|
713
720
|
] });
|
|
714
721
|
const l = n.length === 3 ? "w-[80px]" : "w-[60px]";
|
|
715
722
|
return /* @__PURE__ */ t.jsxs("div", { className: `relative h-12 ${l} shrink-0`, children: [
|
|
@@ -719,24 +726,24 @@ function ct({
|
|
|
719
726
|
src: i,
|
|
720
727
|
alt: "",
|
|
721
728
|
className: "ring-background absolute top-0 size-12 rounded-xl bg-transparent object-cover ring-[3px]",
|
|
722
|
-
style:
|
|
729
|
+
style: lt(o, n.length)
|
|
723
730
|
},
|
|
724
731
|
`${i}-${o}`
|
|
725
732
|
)),
|
|
726
|
-
s && /* @__PURE__ */ t.jsx(
|
|
733
|
+
s && /* @__PURE__ */ t.jsx(C, { t: a })
|
|
727
734
|
] });
|
|
728
735
|
}
|
|
729
|
-
function
|
|
736
|
+
function C({ t: e }) {
|
|
730
737
|
return /* @__PURE__ */ t.jsx(
|
|
731
738
|
"div",
|
|
732
739
|
{
|
|
733
740
|
className: "bg-primary text-primary-foreground ring-background absolute -top-1 -right-1 z-40 flex size-5 items-center justify-center rounded-full ring-2",
|
|
734
741
|
title: e("from_subscription"),
|
|
735
|
-
children: /* @__PURE__ */ t.jsx(
|
|
742
|
+
children: /* @__PURE__ */ t.jsx(Ne, { className: "size-2.5", strokeWidth: 2.75 })
|
|
736
743
|
}
|
|
737
744
|
);
|
|
738
745
|
}
|
|
739
|
-
function
|
|
746
|
+
function xt() {
|
|
740
747
|
return /* @__PURE__ */ t.jsx(t.Fragment, { children: Array(4).fill(0).map((e, r) => /* @__PURE__ */ t.jsxs(
|
|
741
748
|
"div",
|
|
742
749
|
{
|
|
@@ -752,22 +759,22 @@ function ut() {
|
|
|
752
759
|
r
|
|
753
760
|
)) });
|
|
754
761
|
}
|
|
755
|
-
function
|
|
762
|
+
function ft({
|
|
756
763
|
searching: e,
|
|
757
764
|
t: r
|
|
758
765
|
}) {
|
|
759
766
|
return /* @__PURE__ */ t.jsxs("div", { className: "flex flex-col items-center gap-2 px-4 py-12 text-center", children: [
|
|
760
|
-
/* @__PURE__ */ t.jsx("div", { className: "bg-muted flex size-12 items-center justify-center rounded-full", children: /* @__PURE__ */ t.jsx(
|
|
767
|
+
/* @__PURE__ */ t.jsx("div", { className: "bg-muted flex size-12 items-center justify-center rounded-full", children: /* @__PURE__ */ t.jsx(Q, { className: "text-muted-foreground size-5", strokeWidth: 2 }) }),
|
|
761
768
|
/* @__PURE__ */ t.jsx("div", { className: "text-foreground text-sm font-bold", children: r(e ? "no_matching_orders" : "no_orders_yet") }),
|
|
762
769
|
/* @__PURE__ */ t.jsx("div", { className: "text-muted-foreground max-w-sm text-xs", children: r(e ? "search_hint" : "empty_hint") })
|
|
763
770
|
] });
|
|
764
771
|
}
|
|
765
|
-
function
|
|
772
|
+
function gt({
|
|
766
773
|
onRetry: e,
|
|
767
774
|
t: r
|
|
768
775
|
}) {
|
|
769
776
|
return /* @__PURE__ */ t.jsxs("div", { className: "flex flex-col items-center gap-2 px-4 py-12 text-center", children: [
|
|
770
|
-
/* @__PURE__ */ t.jsx("div", { className: "bg-muted flex size-12 items-center justify-center rounded-full", children: /* @__PURE__ */ t.jsx(
|
|
777
|
+
/* @__PURE__ */ t.jsx("div", { className: "bg-muted flex size-12 items-center justify-center rounded-full", children: /* @__PURE__ */ t.jsx(pe, { className: "text-muted-foreground size-5", strokeWidth: 2 }) }),
|
|
771
778
|
/* @__PURE__ */ t.jsx("div", { className: "text-foreground text-sm font-bold", children: r("load_failed_title") }),
|
|
772
779
|
/* @__PURE__ */ t.jsx("div", { className: "text-muted-foreground max-w-sm text-xs", children: r("load_failed_hint") }),
|
|
773
780
|
/* @__PURE__ */ t.jsx(
|
|
@@ -781,21 +788,21 @@ function pt({
|
|
|
781
788
|
)
|
|
782
789
|
] });
|
|
783
790
|
}
|
|
784
|
-
const
|
|
785
|
-
function
|
|
786
|
-
const { navigate: e } =
|
|
791
|
+
const ht = 1;
|
|
792
|
+
function _t() {
|
|
793
|
+
const { navigate: e } = $(), { t: r } = m(), s = (a) => {
|
|
787
794
|
e(`orders/${a.token}`);
|
|
788
795
|
};
|
|
789
796
|
return /* @__PURE__ */ t.jsx(
|
|
790
|
-
|
|
797
|
+
dt,
|
|
791
798
|
{
|
|
792
|
-
customerId:
|
|
799
|
+
customerId: ht,
|
|
793
800
|
onOrderClick: s,
|
|
794
801
|
t: r
|
|
795
802
|
}
|
|
796
803
|
);
|
|
797
804
|
}
|
|
798
|
-
const
|
|
805
|
+
const K = {
|
|
799
806
|
display: "inline-flex",
|
|
800
807
|
minHeight: "1.5rem",
|
|
801
808
|
alignItems: "center",
|
|
@@ -805,48 +812,48 @@ const R = {
|
|
|
805
812
|
// spaces) wrap instead of overflowing a narrow column. Inert for the
|
|
806
813
|
// masked-segments path, whose children are spans rather than text.
|
|
807
814
|
overflowWrap: "anywhere"
|
|
808
|
-
},
|
|
815
|
+
}, bt = {
|
|
809
816
|
display: "inline-flex",
|
|
810
817
|
alignItems: "center",
|
|
811
818
|
// Wrap onto a new line in narrow containers (e.g. the checkout
|
|
812
819
|
// order-confirmation grid) instead of overflowing the box.
|
|
813
820
|
flexWrap: "wrap",
|
|
814
821
|
rowGap: "0.25rem"
|
|
815
|
-
},
|
|
822
|
+
}, jt = {
|
|
816
823
|
display: "inline-flex",
|
|
817
824
|
alignItems: "center",
|
|
818
825
|
gap: "0.375rem",
|
|
819
826
|
// Let a single group's dots wrap too, so one atomic group can never
|
|
820
827
|
// overflow an extremely narrow container.
|
|
821
828
|
flexWrap: "wrap"
|
|
822
|
-
},
|
|
829
|
+
}, yt = {
|
|
823
830
|
display: "block",
|
|
824
831
|
width: "0.375rem",
|
|
825
832
|
height: "0.375rem",
|
|
826
833
|
borderRadius: "9999px",
|
|
827
834
|
backgroundColor: "currentColor"
|
|
828
|
-
},
|
|
835
|
+
}, Nt = {
|
|
829
836
|
marginLeft: "0.125rem"
|
|
830
|
-
},
|
|
831
|
-
function
|
|
837
|
+
}, vt = "0.75rem";
|
|
838
|
+
function wt({
|
|
832
839
|
label: e,
|
|
833
840
|
className: r
|
|
834
841
|
}) {
|
|
835
|
-
const s =
|
|
836
|
-
return s ? /* @__PURE__ */ t.jsx("p", { className: r, style:
|
|
842
|
+
const s = ve(e);
|
|
843
|
+
return s ? /* @__PURE__ */ t.jsx("p", { className: r, style: K, "aria-label": e, children: /* @__PURE__ */ t.jsx("span", { "aria-hidden": "true", style: bt, children: s.map((a, n) => {
|
|
837
844
|
if (a.kind === "gap") return null;
|
|
838
|
-
const l = s[n + 1]?.kind === "gap" ? { marginInlineEnd:
|
|
845
|
+
const l = s[n + 1]?.kind === "gap" ? { marginInlineEnd: vt } : null;
|
|
839
846
|
if (a.kind === "dots")
|
|
840
847
|
return /* @__PURE__ */ t.jsx(
|
|
841
848
|
"span",
|
|
842
849
|
{
|
|
843
|
-
style: { ...
|
|
844
|
-
children: Array.from({ length: a.count }, (o, d) => /* @__PURE__ */ t.jsx("span", { style:
|
|
850
|
+
style: { ...jt, ...l },
|
|
851
|
+
children: Array.from({ length: a.count }, (o, d) => /* @__PURE__ */ t.jsx("span", { style: yt }, d))
|
|
845
852
|
},
|
|
846
853
|
`${a.kind}-${n}`
|
|
847
854
|
);
|
|
848
855
|
const i = {
|
|
849
|
-
...s[n - 1]?.kind === "dots" ?
|
|
856
|
+
...s[n - 1]?.kind === "dots" ? Nt : null,
|
|
850
857
|
...l
|
|
851
858
|
};
|
|
852
859
|
return /* @__PURE__ */ t.jsx(
|
|
@@ -857,35 +864,35 @@ function yt({
|
|
|
857
864
|
},
|
|
858
865
|
`${a.kind}-${n}`
|
|
859
866
|
);
|
|
860
|
-
}) }) }) : /* @__PURE__ */ t.jsx("p", { className: r, style:
|
|
867
|
+
}) }) }) : /* @__PURE__ */ t.jsx("p", { className: r, style: K, children: e });
|
|
861
868
|
}
|
|
862
|
-
function
|
|
863
|
-
return e.last4 != null ||
|
|
869
|
+
function kt(e) {
|
|
870
|
+
return e.last4 != null || we(e.card_network) != null || G(e.card_network) != null || A(e.source) || A(e.payment_type);
|
|
864
871
|
}
|
|
865
|
-
function
|
|
866
|
-
return
|
|
872
|
+
function St(e) {
|
|
873
|
+
return ke(
|
|
867
874
|
e.payment_title,
|
|
868
875
|
e.payment_type,
|
|
869
876
|
e.source
|
|
870
877
|
) ?? "Payment method";
|
|
871
878
|
}
|
|
872
|
-
function
|
|
873
|
-
if (
|
|
874
|
-
return
|
|
879
|
+
function Ot(e) {
|
|
880
|
+
if (kt(e))
|
|
881
|
+
return z({
|
|
875
882
|
kind: "card",
|
|
876
|
-
brand:
|
|
883
|
+
brand: G(e.card_network),
|
|
877
884
|
last4: e.last4,
|
|
878
885
|
logoUrl: e.logo_url
|
|
879
886
|
});
|
|
880
|
-
const r =
|
|
881
|
-
return
|
|
887
|
+
const r = St(e);
|
|
888
|
+
return z({
|
|
882
889
|
kind: "non_card",
|
|
883
890
|
brand: r,
|
|
884
891
|
fallbackLabel: r,
|
|
885
892
|
logoUrl: e.logo_url
|
|
886
893
|
});
|
|
887
894
|
}
|
|
888
|
-
function
|
|
895
|
+
function Dt() {
|
|
889
896
|
return /* @__PURE__ */ t.jsxs("div", { className: "flex flex-col lg:grid lg:grid-cols-8", children: [
|
|
890
897
|
/* @__PURE__ */ t.jsx("div", { className: "bg-muted flex flex-col items-center px-8 lg:col-span-4", children: /* @__PURE__ */ t.jsxs("div", { className: "w-full max-w-lg py-6", children: [
|
|
891
898
|
/* @__PURE__ */ t.jsx(g, { className: "mb-4 h-6 w-48" }),
|
|
@@ -916,29 +923,29 @@ function j({ label: e, value: r }) {
|
|
|
916
923
|
/* @__PURE__ */ t.jsx("p", { className: "text-foreground", children: r })
|
|
917
924
|
] });
|
|
918
925
|
}
|
|
919
|
-
function
|
|
926
|
+
function Y(e) {
|
|
920
927
|
return e.startsWith("-") ? e : `-${e}`;
|
|
921
928
|
}
|
|
922
929
|
function x(e, r) {
|
|
923
930
|
return e ?? r;
|
|
924
931
|
}
|
|
925
|
-
function
|
|
932
|
+
function Ct(e) {
|
|
926
933
|
const r = [];
|
|
927
934
|
e.name && r.push(e.name), e.address1 && r.push(e.address1), e.address2 && r.push(e.address2);
|
|
928
935
|
const s = [e.city, e.state, e.postal_code].filter(Boolean).join(", ");
|
|
929
936
|
return s && r.push(s), e.country_code && r.push(e.country_code), e.phone && r.push(e.phone), r;
|
|
930
937
|
}
|
|
931
|
-
function
|
|
938
|
+
function L({
|
|
932
939
|
address: e,
|
|
933
940
|
title: r
|
|
934
941
|
}) {
|
|
935
|
-
const s =
|
|
942
|
+
const s = Ct(e);
|
|
936
943
|
return s.length === 0 ? null : /* @__PURE__ */ t.jsxs("div", { children: [
|
|
937
944
|
/* @__PURE__ */ t.jsx("h3", { className: "text-foreground mb-3 text-sm/6 font-semibold", children: r }),
|
|
938
945
|
/* @__PURE__ */ t.jsx("div", { className: "text-foreground space-y-0.5 text-sm", children: s.map((a, n) => /* @__PURE__ */ t.jsx("p", { children: a }, n)) })
|
|
939
946
|
] });
|
|
940
947
|
}
|
|
941
|
-
function
|
|
948
|
+
function Lt({
|
|
942
949
|
shippingMethod: e
|
|
943
950
|
}) {
|
|
944
951
|
const { t: r } = m();
|
|
@@ -947,7 +954,7 @@ function Ot({
|
|
|
947
954
|
/* @__PURE__ */ t.jsx("p", { className: "text-foreground text-sm", children: e.title })
|
|
948
955
|
] }) : null;
|
|
949
956
|
}
|
|
950
|
-
function
|
|
957
|
+
function Tt({
|
|
951
958
|
trackings: e
|
|
952
959
|
}) {
|
|
953
960
|
const { t: r } = m();
|
|
@@ -984,10 +991,10 @@ function Dt({
|
|
|
984
991
|
)) })
|
|
985
992
|
] });
|
|
986
993
|
}
|
|
987
|
-
function
|
|
994
|
+
function Pt({
|
|
988
995
|
paymentMethod: e
|
|
989
996
|
}) {
|
|
990
|
-
const { t: r } = m(), [s, a] = u.useState(null), n =
|
|
997
|
+
const { t: r } = m(), [s, a] = u.useState(null), n = Ot(e), l = s === n.logo.primaryUrl ? n.logo.fallbackUrl : n.logo.primaryUrl;
|
|
991
998
|
return /* @__PURE__ */ t.jsxs("div", { children: [
|
|
992
999
|
/* @__PURE__ */ t.jsx("h3", { className: "text-foreground mb-3 text-sm/6 font-semibold", children: r("payment_method") }),
|
|
993
1000
|
/* @__PURE__ */ t.jsxs("div", { className: "flex min-h-6 items-center gap-2", children: [
|
|
@@ -1000,11 +1007,11 @@ function Ct({
|
|
|
1000
1007
|
onError: () => a(n.logo.primaryUrl)
|
|
1001
1008
|
}
|
|
1002
1009
|
) }),
|
|
1003
|
-
/* @__PURE__ */ t.jsx(
|
|
1010
|
+
/* @__PURE__ */ t.jsx(wt, { label: n.label, className: "text-foreground" })
|
|
1004
1011
|
] })
|
|
1005
1012
|
] });
|
|
1006
1013
|
}
|
|
1007
|
-
function
|
|
1014
|
+
function $t({ src: e, alt: r }) {
|
|
1008
1015
|
const { t: s } = m(), [a, n] = u.useState(!1);
|
|
1009
1016
|
return a ? /* @__PURE__ */ t.jsx("span", { className: "text-xs", children: s("no_image") }) : /* @__PURE__ */ t.jsx(
|
|
1010
1017
|
"img",
|
|
@@ -1016,14 +1023,14 @@ function Lt({ src: e, alt: r }) {
|
|
|
1016
1023
|
}
|
|
1017
1024
|
);
|
|
1018
1025
|
}
|
|
1019
|
-
function
|
|
1026
|
+
function Ft({
|
|
1020
1027
|
item: e,
|
|
1021
1028
|
onSubscriptionClick: r
|
|
1022
1029
|
}) {
|
|
1023
1030
|
const { t: s } = m(), a = e.source_subscription?.subscription_token;
|
|
1024
1031
|
return /* @__PURE__ */ t.jsxs("div", { className: "flex items-center gap-x-4 py-4", children: [
|
|
1025
1032
|
/* @__PURE__ */ t.jsxs("div", { className: "relative shrink-0", children: [
|
|
1026
|
-
/* @__PURE__ */ t.jsx("div", { className: "bg-muted text-muted-foreground flex h-24 w-24 items-center justify-center overflow-hidden rounded", children: e.image_url ? /* @__PURE__ */ t.jsx(
|
|
1033
|
+
/* @__PURE__ */ t.jsx("div", { className: "bg-muted text-muted-foreground flex h-24 w-24 items-center justify-center overflow-hidden rounded", children: e.image_url ? /* @__PURE__ */ t.jsx($t, { src: e.image_url, alt: e.product_name }) : /* @__PURE__ */ t.jsx("span", { className: "text-xs", children: s("no_image") }) }),
|
|
1027
1034
|
e.quantity > 1 && /* @__PURE__ */ t.jsx("span", { className: "bg-foreground text-background absolute -top-2 -right-2 z-10 flex h-6 w-6 items-center justify-center rounded-full text-xs font-medium", children: e.quantity })
|
|
1028
1035
|
] }),
|
|
1029
1036
|
/* @__PURE__ */ t.jsxs("div", { className: "flex min-w-0 flex-1 flex-col gap-y-0.5", children: [
|
|
@@ -1062,11 +1069,20 @@ function Tt({
|
|
|
1062
1069
|
] })
|
|
1063
1070
|
] });
|
|
1064
1071
|
}
|
|
1065
|
-
function
|
|
1072
|
+
function Et({
|
|
1066
1073
|
order: e,
|
|
1067
1074
|
onSubscriptionClick: r
|
|
1068
1075
|
}) {
|
|
1069
|
-
const { t: s } = m(), { singular: a, plural: n } =
|
|
1076
|
+
const { t: s } = m(), { singular: a, plural: n } = Ie(), l = O(
|
|
1077
|
+
e.points_applied_decimal,
|
|
1078
|
+
e.points_applied
|
|
1079
|
+
), i = O(
|
|
1080
|
+
e.total_points_credited_decimal,
|
|
1081
|
+
e.total_points_credited
|
|
1082
|
+
), o = O(
|
|
1083
|
+
e.customer_points_balance_decimal,
|
|
1084
|
+
e.customer_points_balance
|
|
1085
|
+
), d = l != null && l > 0 ? x(
|
|
1070
1086
|
e.order_total_after_points_redemption_in_currency ?? null,
|
|
1071
1087
|
e.order_total_after_points_redemption != null ? String(e.order_total_after_points_redemption) : x(e.total_in_currency, e.total)
|
|
1072
1088
|
) : x(e.total_in_currency, e.total);
|
|
@@ -1075,13 +1091,13 @@ function Pt({
|
|
|
1075
1091
|
/* @__PURE__ */ t.jsx("h2", { className: "text-foreground mb-2 text-lg font-medium", children: s("items_count", { count: String(e.line_items.length) }) }),
|
|
1076
1092
|
/* @__PURE__ */ t.jsx("hr", { className: "border-border" })
|
|
1077
1093
|
] }),
|
|
1078
|
-
/* @__PURE__ */ t.jsx("div", { className: "divide-border divide-y", children: e.line_items.map((
|
|
1079
|
-
|
|
1094
|
+
/* @__PURE__ */ t.jsx("div", { className: "divide-border divide-y", children: e.line_items.map((c) => /* @__PURE__ */ t.jsx(
|
|
1095
|
+
Ft,
|
|
1080
1096
|
{
|
|
1081
|
-
item:
|
|
1097
|
+
item: c,
|
|
1082
1098
|
onSubscriptionClick: r
|
|
1083
1099
|
},
|
|
1084
|
-
|
|
1100
|
+
c.id
|
|
1085
1101
|
)) }),
|
|
1086
1102
|
/* @__PURE__ */ t.jsxs("div", { className: "border-border mb-4 space-y-1 border-t pt-4", children: [
|
|
1087
1103
|
/* @__PURE__ */ t.jsx(
|
|
@@ -1098,7 +1114,7 @@ function Pt({
|
|
|
1098
1114
|
j,
|
|
1099
1115
|
{
|
|
1100
1116
|
label: s("discount"),
|
|
1101
|
-
value:
|
|
1117
|
+
value: Y(
|
|
1102
1118
|
x(e.discount_in_currency, e.discount)
|
|
1103
1119
|
)
|
|
1104
1120
|
}
|
|
@@ -1124,18 +1140,18 @@ function Pt({
|
|
|
1124
1140
|
value: x(e.tax_in_currency, e.tax)
|
|
1125
1141
|
}
|
|
1126
1142
|
),
|
|
1127
|
-
|
|
1143
|
+
l != null && l > 0 && /* @__PURE__ */ t.jsxs("div", { className: "flex items-center justify-between text-sm", children: [
|
|
1128
1144
|
/* @__PURE__ */ t.jsxs("p", { className: "text-muted-foreground", children: [
|
|
1129
|
-
s("points_applied", { label:
|
|
1145
|
+
s("points_applied", { label: M(n) }),
|
|
1130
1146
|
/* @__PURE__ */ t.jsxs("span", { className: "ml-1 text-xs", children: [
|
|
1131
1147
|
"(",
|
|
1132
|
-
|
|
1148
|
+
D(l),
|
|
1133
1149
|
" ",
|
|
1134
|
-
|
|
1150
|
+
l === 1 ? a : n,
|
|
1135
1151
|
")"
|
|
1136
1152
|
] })
|
|
1137
1153
|
] }),
|
|
1138
|
-
/* @__PURE__ */ t.jsx("p", { className: "text-foreground", children:
|
|
1154
|
+
/* @__PURE__ */ t.jsx("p", { className: "text-foreground", children: Y(
|
|
1139
1155
|
x(
|
|
1140
1156
|
e.points_applied_amount_in_currency ?? null,
|
|
1141
1157
|
String(e.points_applied_amount ?? 0)
|
|
@@ -1144,28 +1160,28 @@ function Pt({
|
|
|
1144
1160
|
] }),
|
|
1145
1161
|
/* @__PURE__ */ t.jsxs("div", { className: "mt-2 flex items-center justify-between text-base font-medium", children: [
|
|
1146
1162
|
/* @__PURE__ */ t.jsx("p", { className: "text-muted-foreground text-sm font-medium", children: s("total") }),
|
|
1147
|
-
/* @__PURE__ */ t.jsx("p", { className: "text-foreground text-base font-bold", children:
|
|
1163
|
+
/* @__PURE__ */ t.jsx("p", { className: "text-foreground text-base font-bold", children: d })
|
|
1148
1164
|
] })
|
|
1149
1165
|
] }),
|
|
1150
|
-
|
|
1166
|
+
i != null && i > 0 && /* @__PURE__ */ t.jsx("div", { className: "border-border mb-4 border-t pt-4", children: /* @__PURE__ */ t.jsxs("div", { className: "flex items-baseline justify-between", children: [
|
|
1151
1167
|
/* @__PURE__ */ t.jsxs("div", { children: [
|
|
1152
|
-
/* @__PURE__ */ t.jsx("p", { className: "text-foreground text-sm font-semibold", children: s("points_earned", { label:
|
|
1153
|
-
|
|
1154
|
-
count:
|
|
1168
|
+
/* @__PURE__ */ t.jsx("p", { className: "text-foreground text-sm font-semibold", children: s("points_earned", { label: M(n) }) }),
|
|
1169
|
+
o != null && /* @__PURE__ */ t.jsx("p", { className: "text-muted-foreground text-xs", children: s("points_total", {
|
|
1170
|
+
count: D(o),
|
|
1155
1171
|
label: n
|
|
1156
1172
|
}) })
|
|
1157
1173
|
] }),
|
|
1158
1174
|
/* @__PURE__ */ t.jsxs("div", { className: "text-right", children: [
|
|
1159
1175
|
/* @__PURE__ */ t.jsxs("p", { className: "text-foreground text-sm font-semibold", children: [
|
|
1160
1176
|
"+",
|
|
1161
|
-
|
|
1177
|
+
D(i)
|
|
1162
1178
|
] }),
|
|
1163
1179
|
/* @__PURE__ */ t.jsx("p", { className: "text-muted-foreground text-xs", children: s("points", { label: n }) })
|
|
1164
1180
|
] })
|
|
1165
1181
|
] }) })
|
|
1166
1182
|
] }) });
|
|
1167
1183
|
}
|
|
1168
|
-
function
|
|
1184
|
+
function It({
|
|
1169
1185
|
order: e,
|
|
1170
1186
|
googleMapsApiKey: r
|
|
1171
1187
|
}) {
|
|
@@ -1174,9 +1190,9 @@ function $t({
|
|
|
1174
1190
|
/* @__PURE__ */ t.jsx("div", { className: "border-border mb-6 border-b pb-6", children: /* @__PURE__ */ t.jsx("div", { className: "flex flex-wrap items-center gap-3", children: /* @__PURE__ */ t.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
1175
1191
|
/* @__PURE__ */ t.jsx("span", { className: "text-muted-foreground text-sm", children: s("status_label") }),
|
|
1176
1192
|
/* @__PURE__ */ t.jsx(
|
|
1177
|
-
|
|
1193
|
+
te,
|
|
1178
1194
|
{
|
|
1179
|
-
status:
|
|
1195
|
+
status: ee(
|
|
1180
1196
|
e.status,
|
|
1181
1197
|
e.fulfillment_status,
|
|
1182
1198
|
e.financial_status
|
|
@@ -1185,13 +1201,13 @@ function $t({
|
|
|
1185
1201
|
)
|
|
1186
1202
|
] }) }) }),
|
|
1187
1203
|
r && e.shipping_address && /* @__PURE__ */ t.jsx("div", { className: "mb-6", children: /* @__PURE__ */ t.jsx(
|
|
1188
|
-
|
|
1204
|
+
tt,
|
|
1189
1205
|
{
|
|
1190
1206
|
apiKey: r,
|
|
1191
1207
|
address: e.shipping_address
|
|
1192
1208
|
}
|
|
1193
1209
|
) }),
|
|
1194
|
-
/* @__PURE__ */ t.jsx(
|
|
1210
|
+
/* @__PURE__ */ t.jsx(Tt, { trackings: e.tracking_informations }),
|
|
1195
1211
|
/* @__PURE__ */ t.jsxs("div", { className: "border-border mb-6 border-b pb-6", children: [
|
|
1196
1212
|
/* @__PURE__ */ t.jsx("h3", { className: "text-foreground mb-3 text-sm/6 font-semibold", children: s("order_info") }),
|
|
1197
1213
|
/* @__PURE__ */ t.jsxs("div", { className: "divide-border flex divide-x", children: [
|
|
@@ -1204,7 +1220,7 @@ function $t({
|
|
|
1204
1220
|
] }),
|
|
1205
1221
|
/* @__PURE__ */ t.jsxs("div", { className: "flex-1 pl-4 text-right", children: [
|
|
1206
1222
|
/* @__PURE__ */ t.jsx("div", { className: "text-muted-foreground text-sm", children: s("date") }),
|
|
1207
|
-
/* @__PURE__ */ t.jsx("div", { className: "text-foreground font-medium", children: new Date(
|
|
1223
|
+
/* @__PURE__ */ t.jsx("div", { className: "text-foreground font-medium", children: new Date(He(e)).toLocaleDateString(
|
|
1208
1224
|
a,
|
|
1209
1225
|
{
|
|
1210
1226
|
year: "numeric",
|
|
@@ -1225,50 +1241,50 @@ function $t({
|
|
|
1225
1241
|
] }),
|
|
1226
1242
|
e.shipping_address && e.billing_address ? /* @__PURE__ */ t.jsxs("div", { className: "border-border mb-6 grid grid-cols-2 gap-x-4 border-b pb-6", children: [
|
|
1227
1243
|
/* @__PURE__ */ t.jsx(
|
|
1228
|
-
|
|
1244
|
+
L,
|
|
1229
1245
|
{
|
|
1230
1246
|
address: e.shipping_address,
|
|
1231
1247
|
title: s("shipping_address")
|
|
1232
1248
|
}
|
|
1233
1249
|
),
|
|
1234
1250
|
/* @__PURE__ */ t.jsx(
|
|
1235
|
-
|
|
1251
|
+
L,
|
|
1236
1252
|
{
|
|
1237
1253
|
address: e.billing_address,
|
|
1238
1254
|
title: s("billing_address")
|
|
1239
1255
|
}
|
|
1240
1256
|
)
|
|
1241
1257
|
] }) : e.shipping_address && /* @__PURE__ */ t.jsx("div", { className: "border-border mb-6 border-b pb-6", children: /* @__PURE__ */ t.jsx(
|
|
1242
|
-
|
|
1258
|
+
L,
|
|
1243
1259
|
{
|
|
1244
1260
|
address: e.shipping_address,
|
|
1245
1261
|
title: s("shipping_address")
|
|
1246
1262
|
}
|
|
1247
1263
|
) }),
|
|
1248
1264
|
(e.shipping_method || e.payment_method) && /* @__PURE__ */ t.jsxs("div", { className: "border-border mb-6 grid grid-cols-1 gap-x-4 gap-y-4 border-b pb-6 sm:grid-cols-2", children: [
|
|
1249
|
-
e.shipping_method && /* @__PURE__ */ t.jsx(
|
|
1250
|
-
e.payment_method && /* @__PURE__ */ t.jsx(
|
|
1265
|
+
e.shipping_method && /* @__PURE__ */ t.jsx(Lt, { shippingMethod: e.shipping_method }),
|
|
1266
|
+
e.payment_method && /* @__PURE__ */ t.jsx(Pt, { paymentMethod: e.payment_method })
|
|
1251
1267
|
] })
|
|
1252
1268
|
] }) });
|
|
1253
1269
|
}
|
|
1254
|
-
function
|
|
1270
|
+
function zt({
|
|
1255
1271
|
id: e,
|
|
1256
1272
|
googleMapsApiKey: r,
|
|
1257
1273
|
onNotFound: s,
|
|
1258
1274
|
onError: a,
|
|
1259
1275
|
onSubscriptionClick: n
|
|
1260
1276
|
}) {
|
|
1261
|
-
const { data: l, isLoading: i, error: o } =
|
|
1277
|
+
const { data: l, isLoading: i, error: o } = J(e), d = l?.order;
|
|
1262
1278
|
return u.useEffect(() => {
|
|
1263
1279
|
!i && o && a?.(o);
|
|
1264
1280
|
}, [i, o, a]), u.useEffect(() => {
|
|
1265
1281
|
!i && !o && !d && s?.();
|
|
1266
|
-
}, [i, o, d, s]), i ? /* @__PURE__ */ t.jsx(
|
|
1267
|
-
/* @__PURE__ */ t.jsx(
|
|
1268
|
-
/* @__PURE__ */ t.jsx(
|
|
1282
|
+
}, [i, o, d, s]), i ? /* @__PURE__ */ t.jsx(Dt, {}) : d ? /* @__PURE__ */ t.jsxs("div", { className: "flex flex-col lg:grid lg:grid-cols-8", children: [
|
|
1283
|
+
/* @__PURE__ */ t.jsx(Et, { order: d, onSubscriptionClick: n }),
|
|
1284
|
+
/* @__PURE__ */ t.jsx(It, { order: d, googleMapsApiKey: r })
|
|
1269
1285
|
] }) : null;
|
|
1270
1286
|
}
|
|
1271
|
-
function
|
|
1287
|
+
function At({
|
|
1272
1288
|
id: e,
|
|
1273
1289
|
googleMapsApiKey: r,
|
|
1274
1290
|
onNavigateToList: s,
|
|
@@ -1276,11 +1292,11 @@ function Et({
|
|
|
1276
1292
|
onError: n,
|
|
1277
1293
|
onSubscriptionClick: l
|
|
1278
1294
|
}) {
|
|
1279
|
-
const { t: i } = m(), { data: o } =
|
|
1295
|
+
const { t: i } = m(), { data: o } = J(e), d = o?.order.order_number ?? o?.order.id.toString() ?? String(e);
|
|
1280
1296
|
return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
1281
|
-
/* @__PURE__ */ t.jsx(
|
|
1282
|
-
/* @__PURE__ */ t.jsx(
|
|
1283
|
-
|
|
1297
|
+
/* @__PURE__ */ t.jsx(W, { children: /* @__PURE__ */ t.jsx(X, { children: /* @__PURE__ */ t.jsxs(V, { className: "text-lg", children: [
|
|
1298
|
+
/* @__PURE__ */ t.jsx(T, { children: /* @__PURE__ */ t.jsx(
|
|
1299
|
+
De,
|
|
1284
1300
|
{
|
|
1285
1301
|
href: "#",
|
|
1286
1302
|
onClick: (c) => {
|
|
@@ -1289,11 +1305,11 @@ function Et({
|
|
|
1289
1305
|
children: i("breadcrumb")
|
|
1290
1306
|
}
|
|
1291
1307
|
) }),
|
|
1292
|
-
/* @__PURE__ */ t.jsx(
|
|
1293
|
-
/* @__PURE__ */ t.jsx(
|
|
1308
|
+
/* @__PURE__ */ t.jsx(Ce, {}),
|
|
1309
|
+
/* @__PURE__ */ t.jsx(T, { children: /* @__PURE__ */ t.jsx(H, { className: "font-semibold", children: i("breadcrumb_detail", { id: d }) }) })
|
|
1294
1310
|
] }) }) }),
|
|
1295
1311
|
/* @__PURE__ */ t.jsx("div", { className: "mx-auto max-w-7xl px-4 py-4 sm:px-6 sm:py-6 lg:px-10 lg:py-8", children: /* @__PURE__ */ t.jsx(
|
|
1296
|
-
|
|
1312
|
+
zt,
|
|
1297
1313
|
{
|
|
1298
1314
|
id: e,
|
|
1299
1315
|
googleMapsApiKey: r,
|
|
@@ -1304,13 +1320,13 @@ function Et({
|
|
|
1304
1320
|
) })
|
|
1305
1321
|
] });
|
|
1306
1322
|
}
|
|
1307
|
-
function
|
|
1323
|
+
function Bt({
|
|
1308
1324
|
token: e,
|
|
1309
1325
|
onToast: r
|
|
1310
1326
|
}) {
|
|
1311
|
-
const { navigate: s } =
|
|
1327
|
+
const { navigate: s } = $(), { config: a } = xe(), { t: n } = m();
|
|
1312
1328
|
return /* @__PURE__ */ t.jsx(
|
|
1313
|
-
|
|
1329
|
+
At,
|
|
1314
1330
|
{
|
|
1315
1331
|
id: e,
|
|
1316
1332
|
googleMapsApiKey: a.googleMapsApiKey,
|
|
@@ -1326,10 +1342,10 @@ function zt({
|
|
|
1326
1342
|
}
|
|
1327
1343
|
);
|
|
1328
1344
|
}
|
|
1329
|
-
function
|
|
1330
|
-
|
|
1345
|
+
function Ut(e, r) {
|
|
1346
|
+
fe({ title: e, type: r });
|
|
1331
1347
|
}
|
|
1332
|
-
function
|
|
1348
|
+
function Vt({
|
|
1333
1349
|
onToast: e,
|
|
1334
1350
|
/* eslint-disable @typescript-eslint/no-unused-vars -- destructured to exclude from divProps spread */
|
|
1335
1351
|
background: r,
|
|
@@ -1340,9 +1356,9 @@ function qt({
|
|
|
1340
1356
|
/* eslint-enable @typescript-eslint/no-unused-vars */
|
|
1341
1357
|
...i
|
|
1342
1358
|
}) {
|
|
1343
|
-
const { currentSlug: o } =
|
|
1344
|
-
return c !== void 0 ? /* @__PURE__ */ t.jsx(
|
|
1359
|
+
const { currentSlug: o } = $(), d = e ?? Ut, c = o.split("/")[1];
|
|
1360
|
+
return c !== void 0 ? /* @__PURE__ */ t.jsx(U, { children: /* @__PURE__ */ t.jsx("div", { ...i, children: /* @__PURE__ */ t.jsx(Bt, { token: c, onToast: d }) }) }) : /* @__PURE__ */ t.jsx(U, { children: /* @__PURE__ */ t.jsx("div", { ...i, children: /* @__PURE__ */ t.jsx(_t, {}) }) });
|
|
1345
1361
|
}
|
|
1346
1362
|
export {
|
|
1347
|
-
|
|
1363
|
+
Vt as O
|
|
1348
1364
|
};
|