@instockng/storefront-ui 1.0.78 → 1.0.80
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/components/Checkout.d.ts.map +1 -1
- package/dist/index100.mjs +53 -20
- package/dist/index101.mjs +69 -55
- package/dist/index102.mjs +34 -33
- package/dist/index103.mjs +43 -2
- package/dist/index106.mjs +1 -1
- package/dist/index107.mjs +1 -1
- package/dist/index108.mjs +8 -8
- package/dist/index109.mjs +6 -6
- package/dist/index110.mjs +3 -3
- package/dist/index111.mjs +1 -1
- package/dist/index112.mjs +1 -1
- package/dist/index113.mjs +1 -1
- package/dist/index114.mjs +2 -2
- package/dist/index115.mjs +2 -2
- package/dist/index116.mjs +3 -3
- package/dist/index117.mjs +1 -1
- package/dist/index118.mjs +3 -3
- package/dist/index119.mjs +2 -2
- package/dist/index120.mjs +2 -2
- package/dist/index121.mjs +1 -1
- package/dist/index122.mjs +3 -3
- package/dist/index123.mjs +1 -1
- package/dist/index124.mjs +1 -1
- package/dist/index125.mjs +3 -3
- package/dist/index126.mjs +2 -2
- package/dist/index127.mjs +4 -4
- package/dist/index128.mjs +1 -1
- package/dist/index129.mjs +3 -3
- package/dist/index130.mjs +4 -4
- package/dist/index131.mjs +1 -1
- package/dist/index132.mjs +1 -1
- package/dist/index133.mjs +1 -1
- package/dist/index134.mjs +1 -1
- package/dist/index135.mjs +1 -1
- package/dist/index136.mjs +1 -1
- package/dist/index137.mjs +1 -1
- package/dist/index138.mjs +2 -2
- package/dist/index139.mjs +3 -3
- package/dist/index142.mjs +1 -1
- package/dist/index144.mjs +2 -21
- package/dist/index145.mjs +19 -54
- package/dist/index146.mjs +55 -28
- package/dist/index147.mjs +28 -6
- package/dist/index148.mjs +6 -51
- package/dist/index149.mjs +51 -5
- package/dist/index150.mjs +6 -12
- package/dist/index151.mjs +12 -7
- package/dist/index152.mjs +6 -27
- package/dist/index153.mjs +28 -2
- package/dist/index154.mjs +2 -70
- package/dist/index155.mjs +67 -164
- package/dist/index156.mjs +167 -2
- package/dist/index158.mjs +2 -2
- package/dist/index159.mjs +2 -18
- package/dist/index16.mjs +128 -121
- package/dist/index160.mjs +11 -25
- package/dist/index161.mjs +26 -32
- package/dist/index162.mjs +32 -12
- package/dist/index163.mjs +9 -9
- package/dist/index164.mjs +18 -2
- package/dist/index165.mjs +2 -20
- package/dist/index166.mjs +13 -39
- package/dist/index167.mjs +46 -2
- package/dist/index168.mjs +2 -30
- package/dist/index169.mjs +24 -12
- package/dist/index170.mjs +18 -2
- package/dist/index171.mjs +2 -2
- package/dist/index172.mjs +2 -2
- package/dist/index173.mjs +2 -2
- package/dist/index174.mjs +2 -72
- package/dist/index175.mjs +72 -2
- package/dist/index176.mjs +2 -53
- package/dist/index177.mjs +53 -2
- package/dist/index178.mjs +2 -36
- package/dist/index179.mjs +30 -146
- package/dist/index180.mjs +152 -2
- package/dist/index181.mjs +2 -2
- package/dist/index182.mjs +2 -19
- package/dist/index183.mjs +19 -2
- package/dist/index184.mjs +2 -2
- package/dist/index185.mjs +2 -26
- package/dist/index186.mjs +26 -2
- package/dist/index187.mjs +2 -2
- package/dist/index188.mjs +2 -24
- package/dist/index189.mjs +17 -16
- package/dist/index190.mjs +23 -2
- package/dist/index192.mjs +2 -2
- package/dist/index193.mjs +2 -23
- package/dist/index194.mjs +23 -2
- package/dist/index195.mjs +2 -23
- package/dist/index196.mjs +23 -2
- package/dist/index197.mjs +2 -2
- package/dist/index199.mjs +2 -23
- package/dist/index200.mjs +23 -2
- package/dist/index201.mjs +2 -23
- package/dist/index202.mjs +23 -2
- package/dist/index203.mjs +2 -2
- package/dist/index204.mjs +2 -2
- package/dist/index206.mjs +2 -2
- package/dist/index207.mjs +2 -2
- package/dist/index208.mjs +2 -2
- package/dist/index209.mjs +2 -2
- package/dist/index210.mjs +2 -127
- package/dist/index211.mjs +127 -2
- package/dist/index212.mjs +2 -74
- package/dist/index213.mjs +60 -60
- package/dist/index214.mjs +74 -2
- package/dist/index215.mjs +2 -31
- package/dist/index216.mjs +2 -11
- package/dist/index217.mjs +2 -4
- package/dist/index218.mjs +2 -4
- package/dist/index219.mjs +2 -13
- package/dist/index220.mjs +2 -7
- package/dist/index221.mjs +107 -11
- package/dist/index222.mjs +2 -5
- package/dist/index223.mjs +2 -33
- package/dist/index224.mjs +2 -31
- package/dist/index225.mjs +2 -28
- package/dist/index226.mjs +34 -58
- package/dist/index227.mjs +2 -2
- package/dist/index228.mjs +244 -2
- package/dist/index229.mjs +2 -2
- package/dist/index230.mjs +33 -2
- package/dist/index231.mjs +56 -99
- package/dist/index232.mjs +25 -2
- package/dist/index233.mjs +2 -2
- package/dist/index234.mjs +2 -2
- package/dist/index235.mjs +2 -2
- package/dist/index236.mjs +2 -2
- package/dist/index237.mjs +2 -2
- package/dist/index238.mjs +2 -244
- package/dist/index239.mjs +2 -2
- package/dist/index240.mjs +2 -33
- package/dist/index241.mjs +2 -65
- package/dist/index242.mjs +30 -24
- package/dist/index243.mjs +11 -2
- package/dist/index244.mjs +3 -36
- package/dist/index245.mjs +4 -2
- package/dist/index246.mjs +13 -2
- package/dist/index247.mjs +7 -2
- package/dist/index248.mjs +12 -2
- package/dist/index249.mjs +5 -2
- package/dist/index250.mjs +33 -2
- package/dist/index251.mjs +31 -2
- package/dist/index252.mjs +28 -2
- package/dist/index253.mjs +61 -2
- package/dist/index254.mjs +2 -2
- package/dist/index255.mjs +2 -4
- package/dist/index256.mjs +2 -2
- package/dist/index257.mjs +4 -2
- package/dist/index258.mjs +2 -3
- package/dist/index259.mjs +2 -2
- package/dist/index260.mjs +18 -2
- package/dist/index261.mjs +46 -16
- package/dist/index262.mjs +2 -13
- package/dist/index263.mjs +2 -6
- package/dist/index264.mjs +2 -30
- package/dist/index266.mjs +91 -2
- package/dist/index267.mjs +3 -18
- package/dist/index268.mjs +2 -47
- package/dist/index269.mjs +2 -2
- package/dist/index270.mjs +17 -2
- package/dist/index271.mjs +13 -2
- package/dist/index272.mjs +6 -2
- package/dist/index273.mjs +30 -91
- package/dist/index36.mjs +1 -1
- package/dist/index37.mjs +1 -1
- package/dist/index38.mjs +1 -1
- package/dist/index39.mjs +1 -1
- package/dist/index40.mjs +1 -1
- package/dist/index41.mjs +2 -2
- package/dist/index43.mjs +2 -2
- package/dist/index46.mjs +3 -3
- package/dist/index50.mjs +1 -1
- package/dist/index55.mjs +17 -17
- package/dist/index56.mjs +2 -2
- package/dist/index57.mjs +1 -1
- package/dist/index58.mjs +1 -1
- package/dist/index59.mjs +1 -1
- package/dist/index60.mjs +1 -1
- package/dist/index61.mjs +1 -1
- package/dist/index62.mjs +1 -1
- package/dist/index63.mjs +1 -1
- package/dist/index64.mjs +1 -1
- package/dist/index65.mjs +1 -1
- package/dist/index66.mjs +1 -1
- package/dist/index67.mjs +1 -1
- package/dist/index68.mjs +1 -1
- package/dist/index69.mjs +1 -1
- package/dist/index70.mjs +23 -4
- package/dist/index71.mjs +149 -19
- package/dist/index72.mjs +2 -24
- package/dist/index73.mjs +19 -149
- package/dist/index74.mjs +75 -2
- package/dist/index75.mjs +14 -74
- package/dist/index76.mjs +62 -14
- package/dist/index77.mjs +4 -62
- package/dist/index78.mjs +2 -235
- package/dist/index79.mjs +5 -5
- package/dist/index80.mjs +1125 -125
- package/dist/index81.mjs +19 -67
- package/dist/index82.mjs +50 -82
- package/dist/index83.mjs +32 -28
- package/dist/index84.mjs +2 -9
- package/dist/index85.mjs +229 -69
- package/dist/index86.mjs +5 -3
- package/dist/index87.mjs +134 -2
- package/dist/index88.mjs +64 -79
- package/dist/index89.mjs +84 -51
- package/dist/index90.mjs +28 -5
- package/dist/index91.mjs +8 -4
- package/dist/index92.mjs +69 -173
- package/dist/index93.mjs +4 -53
- package/dist/index94.mjs +2 -69
- package/dist/index95.mjs +80 -31
- package/dist/index96.mjs +52 -41
- package/dist/index97.mjs +6 -2
- package/dist/index98.mjs +4 -5
- package/dist/index99.mjs +168 -1123
- package/package.json +1 -1
- package/src/components/Checkout.tsx +9 -5
package/dist/index16.mjs
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsxs as a, jsx as e, Fragment as Ie } from "react/jsx-runtime";
|
|
3
|
-
import { useState as w, useEffect as
|
|
4
|
-
import { object as V, string as N, ValidationError as
|
|
3
|
+
import { useState as w, useEffect as j, useMemo as K, useCallback as qe } from "react";
|
|
4
|
+
import { object as V, string as N, ValidationError as Se } from "./index46.mjs";
|
|
5
5
|
import "./index24.mjs";
|
|
6
6
|
import "@tanstack/react-query";
|
|
7
|
-
import { useGetDeliveryZones as
|
|
8
|
-
import { useCart as
|
|
9
|
-
import { Modal as
|
|
7
|
+
import { useGetDeliveryZones as je } from "./index40.mjs";
|
|
8
|
+
import { useCart as Ze } from "./index3.mjs";
|
|
9
|
+
import { Modal as ue } from "./index20.mjs";
|
|
10
10
|
import { FormInput as I } from "./index21.mjs";
|
|
11
|
-
import { FormSelect as
|
|
11
|
+
import { FormSelect as pe } from "./index22.mjs";
|
|
12
12
|
import { Button as B } from "./index17.mjs";
|
|
13
|
-
import { Loader2 as U, ChevronLeft as
|
|
13
|
+
import { Loader2 as U, ChevronLeft as _e, ChevronRight as Le, Package as ye, Banknote as fe, Mail as Te, Phone as Fe, ChevronDown as ze, Zap as Ae } from "lucide-react";
|
|
14
14
|
import { PostPurchaseUpsell as Be } from "./index47.mjs";
|
|
15
|
-
import { formatCurrency as
|
|
15
|
+
import { formatCurrency as Z, cn as k, getFbCookies as G, getTikTokCookies as O } from "./index23.mjs";
|
|
16
16
|
import We from "./index48.mjs";
|
|
17
|
-
import { usePaystackPayment as
|
|
18
|
-
const
|
|
17
|
+
import { usePaystackPayment as $e } from "./index49.mjs";
|
|
18
|
+
const Re = "2348125648668", He = `https://wa.me/${Re}`, Ke = (d) => d.replace(/\D/g, ""), Ue = V({
|
|
19
19
|
firstName: N().required("First name is required").min(2, "First name must be at least 2 characters").max(50, "First name must be less than 50 characters"),
|
|
20
20
|
lastName: N().required("Last name is required").min(2, "Last name must be at least 2 characters").max(50, "Last name must be less than 50 characters"),
|
|
21
21
|
email: N().required("Email is required").email("Please enter a valid email address"),
|
|
22
|
-
phone: N().required("Phone number is required").test("nigerian-phone", "Please enter a valid Nigerian phone number (e.g. 0812 564 8668)", (
|
|
23
|
-
if (!
|
|
24
|
-
const q = Ke(
|
|
22
|
+
phone: N().required("Phone number is required").test("nigerian-phone", "Please enter a valid Nigerian phone number (e.g. 0812 564 8668)", (d) => {
|
|
23
|
+
if (!d) return !1;
|
|
24
|
+
const q = Ke(d);
|
|
25
25
|
return [
|
|
26
26
|
/^0[789]\d{9}$/
|
|
27
27
|
// 0xxxxxxxxx (11 digits total)
|
|
@@ -30,27 +30,27 @@ const $e = "2348125648668", He = `https://wa.me/${$e}`, Ke = (i) => i.replace(/\
|
|
|
30
30
|
}), Ge = V({
|
|
31
31
|
address: N().required("Street address is required").min(10, "Please provide a complete address"),
|
|
32
32
|
city: N().required("City is required").min(3, "City name must be at least 3 characters"),
|
|
33
|
-
state: N().required("State is required").test("not-empty", "State is required", (
|
|
34
|
-
deliveryZoneId: N().required("Delivery zone is required").test("not-empty", "Delivery zone is required", (
|
|
33
|
+
state: N().required("State is required").test("not-empty", "State is required", (d) => !!d && d.trim() !== ""),
|
|
34
|
+
deliveryZoneId: N().required("Delivery zone is required").test("not-empty", "Delivery zone is required", (d) => !!d && d.trim() !== "")
|
|
35
35
|
}), Oe = V({
|
|
36
36
|
paymentMethod: N().oneOf(["cod", "online"], "Please select a payment method").required("Payment method is required")
|
|
37
37
|
});
|
|
38
38
|
function ct({
|
|
39
|
-
isOpen:
|
|
39
|
+
isOpen: d,
|
|
40
40
|
onClose: q,
|
|
41
41
|
initialData: l,
|
|
42
42
|
onSuccess: g,
|
|
43
43
|
onError: o,
|
|
44
44
|
submitButtonText: ve = "Place Order",
|
|
45
|
-
refundPolicy:
|
|
45
|
+
refundPolicy: _
|
|
46
46
|
}) {
|
|
47
|
-
var re, se, ne, le, ie, de, oe, ce, me,
|
|
48
|
-
const [c, b] = w("customer"), [L, Ne] = w(void 0), [f, Y] = w(void 0), [
|
|
49
|
-
isOpen:
|
|
47
|
+
var re, se, ne, le, ie, de, oe, ce, me, he;
|
|
48
|
+
const [c, b] = w("customer"), [L, Ne] = w(void 0), [f, Y] = w(void 0), [p, W] = w(null), { refetch: J, isLoading: Q, cart: s, updateCartMutation: $, checkoutMutation: ge, clearAndCreateNewCart: X } = Ze(), E = (re = s == null ? void 0 : s.brand) == null ? void 0 : re.paystackPublicKey, D = $e({
|
|
49
|
+
isOpen: d,
|
|
50
50
|
publicKey: E || "",
|
|
51
51
|
onSuccess: async (r) => {
|
|
52
52
|
try {
|
|
53
|
-
const { fbc: n, fbp:
|
|
53
|
+
const { fbc: n, fbp: i } = G(), { ttp: m, ttclid: S } = O(), v = await M.mutateAsync({
|
|
54
54
|
firstName: t.firstName,
|
|
55
55
|
lastName: t.lastName,
|
|
56
56
|
email: t.email,
|
|
@@ -61,9 +61,9 @@ function ct({
|
|
|
61
61
|
paymentMethod: t.paymentMethod,
|
|
62
62
|
paystackReference: r.reference,
|
|
63
63
|
fbc: n,
|
|
64
|
-
fbp:
|
|
65
|
-
ttp:
|
|
66
|
-
ttclid:
|
|
64
|
+
fbp: i,
|
|
65
|
+
ttp: m,
|
|
66
|
+
ttclid: S
|
|
67
67
|
});
|
|
68
68
|
if ("error" in v) {
|
|
69
69
|
const P = v.error;
|
|
@@ -79,16 +79,16 @@ function ct({
|
|
|
79
79
|
console.log("Payment popup closed by user");
|
|
80
80
|
}
|
|
81
81
|
});
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
}, [
|
|
85
|
-
const { data: C } =
|
|
82
|
+
j(() => {
|
|
83
|
+
d && J();
|
|
84
|
+
}, [d, J]);
|
|
85
|
+
const { data: C } = je(((se = s == null ? void 0 : s.brand) == null ? void 0 : se.id) || "", {
|
|
86
86
|
enabled: !!((ne = s == null ? void 0 : s.brand) != null && ne.id)
|
|
87
|
-
}),
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
}, [
|
|
91
|
-
const [t,
|
|
87
|
+
}), h = K(() => C == null ? void 0 : C.find((r) => r.id === L), [C, L]), y = K(() => h == null ? void 0 : h.zones.find((r) => r.id === f), [h, f]), M = ge;
|
|
88
|
+
j(() => {
|
|
89
|
+
d || (W(null), b("customer"), M.reset());
|
|
90
|
+
}, [d]);
|
|
91
|
+
const [t, R] = w({
|
|
92
92
|
firstName: (l == null ? void 0 : l.firstName) || "",
|
|
93
93
|
lastName: (l == null ? void 0 : l.lastName) || "",
|
|
94
94
|
email: (l == null ? void 0 : l.email) || "",
|
|
@@ -99,12 +99,12 @@ function ct({
|
|
|
99
99
|
paymentMethod: (l == null ? void 0 : l.paymentMethod) || "online",
|
|
100
100
|
notes: (l == null ? void 0 : l.notes) || ""
|
|
101
101
|
});
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
}, [
|
|
102
|
+
j(() => {
|
|
103
|
+
d && b("customer");
|
|
104
|
+
}, [d]);
|
|
105
105
|
const [ee, te] = w(!1);
|
|
106
|
-
|
|
107
|
-
|
|
106
|
+
j(() => {
|
|
107
|
+
d && s && !l && !ee && (R((r) => {
|
|
108
108
|
var n;
|
|
109
109
|
return {
|
|
110
110
|
...r,
|
|
@@ -114,62 +114,62 @@ function ct({
|
|
|
114
114
|
phone: s.customerPhone || r.phone,
|
|
115
115
|
deliveryZoneId: ((n = s.deliveryZone) == null ? void 0 : n.id) || r.deliveryZoneId
|
|
116
116
|
};
|
|
117
|
-
}), te(!0)),
|
|
118
|
-
}, [
|
|
117
|
+
}), te(!0)), d || te(!1);
|
|
118
|
+
}, [d, s, l, ee]), j(() => {
|
|
119
119
|
if (f) {
|
|
120
|
-
const r =
|
|
121
|
-
r &&
|
|
120
|
+
const r = h == null ? void 0 : h.zones.find((n) => n.id === f);
|
|
121
|
+
r && R((n) => ({
|
|
122
122
|
...n,
|
|
123
123
|
paymentMethod: r.allowOnline ? "online" : "cod"
|
|
124
124
|
}));
|
|
125
125
|
}
|
|
126
|
-
}, [f,
|
|
127
|
-
const [u,
|
|
128
|
-
const { name: n, value:
|
|
129
|
-
|
|
130
|
-
},
|
|
126
|
+
}, [f, h]);
|
|
127
|
+
const [u, T] = w({}), [H, be] = w(!1), x = (r) => {
|
|
128
|
+
const { name: n, value: i } = r.target;
|
|
129
|
+
R((m) => ({ ...m, [n]: i })), u[n] && T((m) => ({ ...m, [n]: void 0 }));
|
|
130
|
+
}, F = qe(
|
|
131
131
|
(r) => {
|
|
132
132
|
const n = t[r];
|
|
133
133
|
if (!n) return;
|
|
134
|
-
const
|
|
135
|
-
r === "firstName" ?
|
|
134
|
+
const i = {};
|
|
135
|
+
r === "firstName" ? i.customerFirstName = n : r === "lastName" ? i.customerLastName = n : r === "email" ? i.customerEmail = n : r === "phone" && (i.customerPhone = n), $.mutate(i);
|
|
136
136
|
},
|
|
137
|
-
[t,
|
|
138
|
-
),
|
|
137
|
+
[t, $]
|
|
138
|
+
), z = (r) => {
|
|
139
139
|
const n = {};
|
|
140
140
|
try {
|
|
141
141
|
if (r === "customer")
|
|
142
142
|
Ue.validateSync(t, { abortEarly: !1 });
|
|
143
143
|
else if (r === "delivery") {
|
|
144
|
-
const
|
|
144
|
+
const i = {
|
|
145
145
|
address: t.address,
|
|
146
146
|
city: t.city,
|
|
147
147
|
state: L || t.state || "",
|
|
148
148
|
deliveryZoneId: f || t.deliveryZoneId || ""
|
|
149
149
|
};
|
|
150
|
-
Ge.validateSync(
|
|
150
|
+
Ge.validateSync(i, { abortEarly: !1 });
|
|
151
151
|
} else r === "payment" && Oe.validateSync(t, { abortEarly: !1 });
|
|
152
|
-
} catch (
|
|
153
|
-
|
|
154
|
-
|
|
152
|
+
} catch (i) {
|
|
153
|
+
i instanceof Se && i.inner.forEach((m) => {
|
|
154
|
+
m.path && (n[m.path] = m.message);
|
|
155
155
|
});
|
|
156
156
|
}
|
|
157
|
-
return
|
|
157
|
+
return T(n), Object.keys(n).length === 0;
|
|
158
158
|
}, xe = () => {
|
|
159
|
-
|
|
159
|
+
z(c) && (c === "customer" ? b("delivery") : c === "delivery" && b("payment"));
|
|
160
160
|
}, we = () => {
|
|
161
161
|
c === "payment" ? b("delivery") : c === "delivery" && b("customer");
|
|
162
162
|
}, Ce = async () => {
|
|
163
163
|
var r;
|
|
164
|
-
if (!
|
|
164
|
+
if (!z("customer")) {
|
|
165
165
|
b("customer");
|
|
166
166
|
return;
|
|
167
167
|
}
|
|
168
|
-
if (!
|
|
168
|
+
if (!z("delivery")) {
|
|
169
169
|
b("delivery");
|
|
170
170
|
return;
|
|
171
171
|
}
|
|
172
|
-
if (
|
|
172
|
+
if (z("payment")) {
|
|
173
173
|
if (t.paymentMethod === "online") {
|
|
174
174
|
if (!E) {
|
|
175
175
|
o == null || o(new Error("Paystack is not configured. Please contact support."));
|
|
@@ -179,7 +179,7 @@ function ct({
|
|
|
179
179
|
o == null || o(new Error("Payment system is loading. Please try again."));
|
|
180
180
|
return;
|
|
181
181
|
}
|
|
182
|
-
const n = Math.round(s.pricing.total * 100), { fbc:
|
|
182
|
+
const n = Math.round(s.pricing.total * 100), { fbc: i, fbp: m } = G(), { ttp: S, ttclid: v } = O();
|
|
183
183
|
D.initializePayment({
|
|
184
184
|
email: t.email || (s == null ? void 0 : s.customerEmail) || "customer@example.com",
|
|
185
185
|
amount: n,
|
|
@@ -194,9 +194,9 @@ function ct({
|
|
|
194
194
|
lastName: t.lastName,
|
|
195
195
|
email: t.email,
|
|
196
196
|
phone: t.phone,
|
|
197
|
-
fbc:
|
|
198
|
-
fbp:
|
|
199
|
-
ttp:
|
|
197
|
+
fbc: i,
|
|
198
|
+
fbp: m,
|
|
199
|
+
ttp: S,
|
|
200
200
|
ttclid: v,
|
|
201
201
|
custom_fields: [
|
|
202
202
|
{
|
|
@@ -230,7 +230,7 @@ function ct({
|
|
|
230
230
|
return;
|
|
231
231
|
}
|
|
232
232
|
try {
|
|
233
|
-
const { fbc: n, fbp:
|
|
233
|
+
const { fbc: n, fbp: i } = G(), { ttp: m, ttclid: S } = O(), v = await M.mutateAsync({
|
|
234
234
|
firstName: t.firstName,
|
|
235
235
|
lastName: t.lastName,
|
|
236
236
|
email: t.email,
|
|
@@ -240,9 +240,9 @@ function ct({
|
|
|
240
240
|
deliveryZoneId: f || t.deliveryZoneId,
|
|
241
241
|
paymentMethod: t.paymentMethod,
|
|
242
242
|
fbc: n,
|
|
243
|
-
fbp:
|
|
244
|
-
ttp:
|
|
245
|
-
ttclid:
|
|
243
|
+
fbp: i,
|
|
244
|
+
ttp: m,
|
|
245
|
+
ttclid: S
|
|
246
246
|
});
|
|
247
247
|
if ("error" in v) {
|
|
248
248
|
const P = v.error;
|
|
@@ -263,23 +263,23 @@ function ct({
|
|
|
263
263
|
Q && /* @__PURE__ */ e("div", { className: "absolute flex items-center justify-center inset-0 bg-white opacity-50", children: /* @__PURE__ */ e(U, { className: "animate-spin text-accent-500" }) }),
|
|
264
264
|
/* @__PURE__ */ a("div", { className: "flex items-center justify-between font-medium", children: [
|
|
265
265
|
/* @__PURE__ */ e("span", { children: "Subtotal" }),
|
|
266
|
-
/* @__PURE__ */ e("span", { children:
|
|
266
|
+
/* @__PURE__ */ e("span", { children: Z(((ie = s == null ? void 0 : s.pricing) == null ? void 0 : ie.subtotal) ?? 0) })
|
|
267
267
|
] }),
|
|
268
268
|
s.pricing.discount && /* @__PURE__ */ a("div", { className: "flex items-center justify-between font-medium", children: [
|
|
269
269
|
/* @__PURE__ */ e("span", { children: "Discount" }),
|
|
270
270
|
/* @__PURE__ */ a("span", { className: "text-green-600", children: [
|
|
271
271
|
"-",
|
|
272
|
-
|
|
272
|
+
Z(((oe = (de = s == null ? void 0 : s.pricing) == null ? void 0 : de.discount) == null ? void 0 : oe.amount) ?? 0)
|
|
273
273
|
] })
|
|
274
274
|
] }),
|
|
275
275
|
/* @__PURE__ */ a("div", { className: "flex items-center justify-between font-medium", children: [
|
|
276
276
|
/* @__PURE__ */ e("span", { children: "Delivery Fee" }),
|
|
277
|
-
/* @__PURE__ */ e("span", { children:
|
|
277
|
+
/* @__PURE__ */ e("span", { children: Z(((ce = s == null ? void 0 : s.pricing) == null ? void 0 : ce.deliveryCharge) ?? 0) })
|
|
278
278
|
] }),
|
|
279
279
|
/* @__PURE__ */ e("hr", { className: "border-gray-200 my-2" }),
|
|
280
280
|
/* @__PURE__ */ a("div", { className: "flex items-center justify-between font-medium", children: [
|
|
281
281
|
/* @__PURE__ */ e("span", { children: "Total" }),
|
|
282
|
-
/* @__PURE__ */ e("span", { children:
|
|
282
|
+
/* @__PURE__ */ e("span", { children: Z(((me = s == null ? void 0 : s.pricing) == null ? void 0 : me.total) ?? 0) })
|
|
283
283
|
] })
|
|
284
284
|
] }),
|
|
285
285
|
/* @__PURE__ */ a("div", { className: "flex gap-3", children: [
|
|
@@ -292,7 +292,7 @@ function ct({
|
|
|
292
292
|
className: "flex-1 border-gray-400",
|
|
293
293
|
size: "lg",
|
|
294
294
|
children: [
|
|
295
|
-
/* @__PURE__ */ e(
|
|
295
|
+
/* @__PURE__ */ e(_e, { className: "mr-2 h-4 w-4" }),
|
|
296
296
|
"Back"
|
|
297
297
|
]
|
|
298
298
|
}
|
|
@@ -325,12 +325,12 @@ function ct({
|
|
|
325
325
|
)
|
|
326
326
|
] }),
|
|
327
327
|
M.isError && /* @__PURE__ */ e("div", { className: "rounded-lg bg-red-50 p-3 text-sm text-red-600", children: "Failed to place order. Please check your information and try again." })
|
|
328
|
-
] }),
|
|
329
|
-
if (
|
|
328
|
+
] }), A = (r) => !(s != null && s.availablePaymentMethods.includes(r));
|
|
329
|
+
if (p)
|
|
330
330
|
return /* @__PURE__ */ e(
|
|
331
|
-
|
|
331
|
+
ue,
|
|
332
332
|
{
|
|
333
|
-
isOpen:
|
|
333
|
+
isOpen: d,
|
|
334
334
|
onClose: q,
|
|
335
335
|
title: /* @__PURE__ */ a("span", { className: "flex items-center gap-3", children: [
|
|
336
336
|
/* @__PURE__ */ e("span", { className: "w-10 h-10 bg-green-100 rounded-full flex items-center justify-center flex-shrink-0", children: /* @__PURE__ */ e("svg", { className: "h-6 w-6 text-green-600", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ e("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M5 13l4 4L19 7" }) }) }),
|
|
@@ -354,56 +354,56 @@ function ct({
|
|
|
354
354
|
children: /* @__PURE__ */ a("div", { className: "space-y-4", children: [
|
|
355
355
|
/* @__PURE__ */ a("div", { className: "bg-gray-50 rounded-lg p-4 space-y-2", children: [
|
|
356
356
|
/* @__PURE__ */ a("div", { className: "flex items-center justify-center space-x-2 text-gray-700", children: [
|
|
357
|
-
/* @__PURE__ */ e(
|
|
357
|
+
/* @__PURE__ */ e(ye, { className: "h-4 w-4" }),
|
|
358
358
|
/* @__PURE__ */ a("span", { className: "text-sm font-medium", children: [
|
|
359
359
|
"Order #",
|
|
360
|
-
|
|
360
|
+
p.orderNumber
|
|
361
361
|
] })
|
|
362
362
|
] }),
|
|
363
363
|
/* @__PURE__ */ a("div", { className: "border-t border-gray-200 pt-2 space-y-1.5", children: [
|
|
364
364
|
/* @__PURE__ */ a("div", { className: "flex justify-between text-sm", children: [
|
|
365
365
|
/* @__PURE__ */ e("span", { className: "text-gray-600", children: "Customer" }),
|
|
366
366
|
/* @__PURE__ */ a("span", { className: "font-medium text-gray-900", children: [
|
|
367
|
-
|
|
367
|
+
p.firstName,
|
|
368
368
|
" ",
|
|
369
|
-
|
|
369
|
+
p.lastName
|
|
370
370
|
] })
|
|
371
371
|
] }),
|
|
372
372
|
/* @__PURE__ */ a("div", { className: "flex justify-between text-sm", children: [
|
|
373
373
|
/* @__PURE__ */ e("span", { className: "text-gray-600", children: "Phone" }),
|
|
374
|
-
/* @__PURE__ */ e("span", { className: "font-medium text-gray-900", children:
|
|
374
|
+
/* @__PURE__ */ e("span", { className: "font-medium text-gray-900", children: p.phone })
|
|
375
375
|
] }),
|
|
376
|
-
|
|
376
|
+
p.email && /* @__PURE__ */ a("div", { className: "flex justify-between text-sm", children: [
|
|
377
377
|
/* @__PURE__ */ e("span", { className: "text-gray-600", children: "Email" }),
|
|
378
|
-
/* @__PURE__ */ e("span", { className: "font-medium text-gray-900", children:
|
|
378
|
+
/* @__PURE__ */ e("span", { className: "font-medium text-gray-900", children: p.email })
|
|
379
379
|
] }),
|
|
380
380
|
/* @__PURE__ */ a("div", { className: "flex justify-between text-sm", children: [
|
|
381
381
|
/* @__PURE__ */ e("span", { className: "text-gray-600", children: "Payment" }),
|
|
382
|
-
/* @__PURE__ */ e("span", { className: "font-medium text-gray-900", children:
|
|
382
|
+
/* @__PURE__ */ e("span", { className: "font-medium text-gray-900", children: p.paymentMethod === "cod" ? "Cash on Delivery" : "Online" })
|
|
383
383
|
] }),
|
|
384
384
|
/* @__PURE__ */ a("div", { className: "flex justify-between text-sm", children: [
|
|
385
385
|
/* @__PURE__ */ e("span", { className: "text-gray-600", children: "Total" }),
|
|
386
|
-
/* @__PURE__ */ e("span", { className: "font-bold text-gray-900", children:
|
|
386
|
+
/* @__PURE__ */ e("span", { className: "font-bold text-gray-900", children: Z(p.totalPrice) })
|
|
387
387
|
] })
|
|
388
388
|
] })
|
|
389
389
|
] }),
|
|
390
390
|
/* @__PURE__ */ e(
|
|
391
391
|
Be,
|
|
392
392
|
{
|
|
393
|
-
orderId:
|
|
394
|
-
token:
|
|
393
|
+
orderId: p.id,
|
|
394
|
+
token: p.userActionToken,
|
|
395
395
|
limit: 4,
|
|
396
|
-
brandSiteUrl: (
|
|
396
|
+
brandSiteUrl: (he = p.brand) == null ? void 0 : he.siteUrl
|
|
397
397
|
}
|
|
398
398
|
)
|
|
399
399
|
] })
|
|
400
400
|
}
|
|
401
401
|
);
|
|
402
|
-
const ae =
|
|
402
|
+
const ae = y && (c === "delivery" || c === "payment") && (y.waybillOnly || !(y != null && y.allowCOD));
|
|
403
403
|
return /* @__PURE__ */ e(
|
|
404
|
-
|
|
404
|
+
ue,
|
|
405
405
|
{
|
|
406
|
-
isOpen:
|
|
406
|
+
isOpen: d,
|
|
407
407
|
onClose: q,
|
|
408
408
|
title: ke,
|
|
409
409
|
footer: Me,
|
|
@@ -411,14 +411,14 @@ function ct({
|
|
|
411
411
|
contentClassName: "p-0",
|
|
412
412
|
children: Q ? /* @__PURE__ */ e("div", { className: "flex items-center justify-center min-h-[300px]", children: /* @__PURE__ */ e(U, { className: "h-8 w-8 animate-spin text-gray-600" }) }) : /* @__PURE__ */ e("div", { className: "w-full overflow-hidden", children: /* @__PURE__ */ a("div", { className: "relative w-full", children: [
|
|
413
413
|
ae && /* @__PURE__ */ a("div", { className: "space-y-3 p-4 pb-0", children: [
|
|
414
|
-
|
|
415
|
-
/* @__PURE__ */ e(
|
|
414
|
+
y.noteTitle && y.noteContent && /* @__PURE__ */ e("div", { className: "bg-amber-50 border border-amber-200 rounded-lg p-4", children: /* @__PURE__ */ a("div", { className: "flex items-start gap-3", children: [
|
|
415
|
+
/* @__PURE__ */ e(ye, { className: "h-5 w-5 text-amber-600 flex-shrink-0 mt-0.5" }),
|
|
416
416
|
/* @__PURE__ */ a("div", { className: "space-y-1", children: [
|
|
417
|
-
/* @__PURE__ */ e("p", { className: "text-sm font-semibold text-amber-900 whitespace-pre-wrap", children:
|
|
418
|
-
/* @__PURE__ */ e("p", { className: "text-sm text-amber-800 whitespace-pre-wrap", children:
|
|
417
|
+
/* @__PURE__ */ e("p", { className: "text-sm font-semibold text-amber-900 whitespace-pre-wrap", children: y.noteTitle }),
|
|
418
|
+
/* @__PURE__ */ e("p", { className: "text-sm text-amber-800 whitespace-pre-wrap", children: y.noteContent })
|
|
419
419
|
] })
|
|
420
420
|
] }) }),
|
|
421
|
-
!(
|
|
421
|
+
!(y != null && y.allowCOD) && /* @__PURE__ */ e("div", { className: "bg-blue-50 border border-blue-200 rounded-lg p-4", children: /* @__PURE__ */ a("div", { className: "flex items-start gap-3", children: [
|
|
422
422
|
/* @__PURE__ */ e(fe, { className: "h-5 w-5 text-blue-600 flex-shrink-0 mt-0.5" }),
|
|
423
423
|
/* @__PURE__ */ a("div", { className: "space-y-1", children: [
|
|
424
424
|
/* @__PURE__ */ e("p", { className: "text-sm font-semibold text-blue-900", children: "Cash on Delivery Unavailable" }),
|
|
@@ -465,7 +465,7 @@ function ct({
|
|
|
465
465
|
name: "firstName",
|
|
466
466
|
value: t.firstName,
|
|
467
467
|
onChange: x,
|
|
468
|
-
onBlur: () =>
|
|
468
|
+
onBlur: () => F("firstName"),
|
|
469
469
|
error: u.firstName,
|
|
470
470
|
autoCorrect: "off",
|
|
471
471
|
required: !0
|
|
@@ -479,7 +479,7 @@ function ct({
|
|
|
479
479
|
name: "lastName",
|
|
480
480
|
value: t.lastName,
|
|
481
481
|
onChange: x,
|
|
482
|
-
onBlur: () =>
|
|
482
|
+
onBlur: () => F("lastName"),
|
|
483
483
|
error: u.lastName,
|
|
484
484
|
autoCorrect: "off",
|
|
485
485
|
required: !0
|
|
@@ -493,9 +493,9 @@ function ct({
|
|
|
493
493
|
name: "email",
|
|
494
494
|
value: t.email,
|
|
495
495
|
onChange: x,
|
|
496
|
-
onBlur: () =>
|
|
496
|
+
onBlur: () => F("email"),
|
|
497
497
|
error: u.email,
|
|
498
|
-
icon: /* @__PURE__ */ e(
|
|
498
|
+
icon: /* @__PURE__ */ e(Te, { size: 16 }),
|
|
499
499
|
autoCorrect: "off",
|
|
500
500
|
required: !0
|
|
501
501
|
}
|
|
@@ -508,11 +508,11 @@ function ct({
|
|
|
508
508
|
name: "phone",
|
|
509
509
|
value: t.phone,
|
|
510
510
|
onChange: x,
|
|
511
|
-
onBlur: () =>
|
|
511
|
+
onBlur: () => F("phone"),
|
|
512
512
|
placeholder: "e.g. 08012345678",
|
|
513
513
|
maxLength: 18,
|
|
514
514
|
error: u.phone,
|
|
515
|
-
icon: /* @__PURE__ */ e(
|
|
515
|
+
icon: /* @__PURE__ */ e(Fe, { size: 16 }),
|
|
516
516
|
autoCorrect: "off",
|
|
517
517
|
required: !0,
|
|
518
518
|
className: "font-semibold"
|
|
@@ -548,7 +548,7 @@ function ct({
|
|
|
548
548
|
}
|
|
549
549
|
),
|
|
550
550
|
/* @__PURE__ */ a(
|
|
551
|
-
|
|
551
|
+
pe,
|
|
552
552
|
{
|
|
553
553
|
label: "State",
|
|
554
554
|
name: "state",
|
|
@@ -556,7 +556,7 @@ function ct({
|
|
|
556
556
|
onChange: (r) => {
|
|
557
557
|
Y("");
|
|
558
558
|
const n = r.target.value;
|
|
559
|
-
Ne(n || void 0), u.state &&
|
|
559
|
+
Ne(n || void 0), u.state && T((i) => ({ ...i, state: void 0 }));
|
|
560
560
|
},
|
|
561
561
|
error: u.state,
|
|
562
562
|
required: !0,
|
|
@@ -567,27 +567,34 @@ function ct({
|
|
|
567
567
|
}
|
|
568
568
|
),
|
|
569
569
|
/* @__PURE__ */ a(
|
|
570
|
-
|
|
570
|
+
pe,
|
|
571
571
|
{
|
|
572
572
|
label: "Delivery Zone",
|
|
573
573
|
value: f || "",
|
|
574
574
|
onChange: (r) => {
|
|
575
575
|
const n = r.target.value;
|
|
576
|
-
Y(n || void 0), u.deliveryZoneId &&
|
|
576
|
+
Y(n || void 0), u.deliveryZoneId && T((i) => ({ ...i, deliveryZoneId: void 0 })), n && $.mutate({ deliveryZoneId: n });
|
|
577
577
|
},
|
|
578
|
-
disabled: !
|
|
578
|
+
disabled: !h,
|
|
579
579
|
error: u.deliveryZoneId,
|
|
580
580
|
required: !0,
|
|
581
581
|
children: [
|
|
582
|
-
/* @__PURE__ */ e("option", { disabled: !0, value: "", children:
|
|
583
|
-
|
|
582
|
+
/* @__PURE__ */ e("option", { disabled: !0, value: "", children: h ? "Select Delivery Zone" : "Select State First" }),
|
|
583
|
+
h == null ? void 0 : h.zones.map((r) => {
|
|
584
|
+
var m;
|
|
585
|
+
const n = ((m = s == null ? void 0 : s.pricing) == null ? void 0 : m.subtotal) ?? 0, i = r.freeShippingThreshold && n >= r.freeShippingThreshold;
|
|
586
|
+
return /* @__PURE__ */ a("option", { value: r.id, children: [
|
|
587
|
+
r.name,
|
|
588
|
+
i ? "" : ` (₦${r.deliveryCost})`
|
|
589
|
+
] }, r.id);
|
|
590
|
+
})
|
|
584
591
|
]
|
|
585
592
|
}
|
|
586
593
|
)
|
|
587
594
|
] })
|
|
588
595
|
] }) }),
|
|
589
596
|
/* @__PURE__ */ e("div", { className: "w-full min-w-full flex-shrink-0 p-4", children: /* @__PURE__ */ a("div", { className: "space-y-6", children: [
|
|
590
|
-
|
|
597
|
+
_ && /* @__PURE__ */ a("div", { className: `border border-gray-200 rounded-lg ${ae ? "mt-4" : ""}`, children: [
|
|
591
598
|
/* @__PURE__ */ a(
|
|
592
599
|
"button",
|
|
593
600
|
{
|
|
@@ -595,9 +602,9 @@ function ct({
|
|
|
595
602
|
onClick: () => be(!H),
|
|
596
603
|
className: "overflow-hidden w-full flex items-center overflow-hidden rounded-lg rounded-b-none justify-between p-4 text-left hover:bg-gray-50 transition-colors",
|
|
597
604
|
children: [
|
|
598
|
-
/* @__PURE__ */ e("span", { className: "text-sm font-bold text-accent-700", children:
|
|
605
|
+
/* @__PURE__ */ e("span", { className: "text-sm font-bold text-accent-700", children: _.title || "🤔 Curious about Refunds?" }),
|
|
599
606
|
/* @__PURE__ */ e(
|
|
600
|
-
|
|
607
|
+
ze,
|
|
601
608
|
{
|
|
602
609
|
size: 16,
|
|
603
610
|
className: k(
|
|
@@ -616,9 +623,9 @@ function ct({
|
|
|
616
623
|
"overflow-hidden transition-all duration-300 ease-in-out",
|
|
617
624
|
H ? "max-h-96 opacity-100" : "max-h-0 opacity-0"
|
|
618
625
|
),
|
|
619
|
-
children: /* @__PURE__ */ e("div", { className: "px-4 pb-4 border-t border-gray-100", children: /* @__PURE__ */ e("div", { className: "text-sm text-gray-600 space-y-3 pt-4", children:
|
|
626
|
+
children: /* @__PURE__ */ e("div", { className: "px-4 pb-4 border-t border-gray-100", children: /* @__PURE__ */ e("div", { className: "text-sm text-gray-600 space-y-3 pt-4", children: _.policies && /* @__PURE__ */ a("div", { children: [
|
|
620
627
|
/* @__PURE__ */ e("h4", { className: "font-bold text-gray-800 mb-2", children: "Our Refund Policy" }),
|
|
621
|
-
/* @__PURE__ */ e("ul", { className: "space-y-1", children:
|
|
628
|
+
/* @__PURE__ */ e("ul", { className: "space-y-1", children: _.policies.map((r, n) => /* @__PURE__ */ a("li", { className: "flex items-start", children: [
|
|
622
629
|
/* @__PURE__ */ e("span", { className: "text-green-600 mr-2", children: "✓" }),
|
|
623
630
|
/* @__PURE__ */ e("span", { children: r })
|
|
624
631
|
] }, n)) })
|
|
@@ -633,7 +640,7 @@ function ct({
|
|
|
633
640
|
className: k(
|
|
634
641
|
"flex items-center justify-center relative p-4 border-2 rounded-xl cursor-pointer transition-all duration-200",
|
|
635
642
|
t.paymentMethod === "online" ? "border-accent-500 bg-accent-50" : "border-gray-200 hover:border-gray-300",
|
|
636
|
-
|
|
643
|
+
A("online") && "opacity-50 cursor-not-allowed"
|
|
637
644
|
),
|
|
638
645
|
children: [
|
|
639
646
|
/* @__PURE__ */ e(
|
|
@@ -642,7 +649,7 @@ function ct({
|
|
|
642
649
|
type: "radio",
|
|
643
650
|
name: "paymentMethod",
|
|
644
651
|
value: "online",
|
|
645
|
-
disabled:
|
|
652
|
+
disabled: A("online"),
|
|
646
653
|
checked: t.paymentMethod === "online",
|
|
647
654
|
onChange: x,
|
|
648
655
|
className: "sr-only"
|
|
@@ -656,7 +663,7 @@ function ct({
|
|
|
656
663
|
"p-3 rounded-full",
|
|
657
664
|
t.paymentMethod === "online" ? "bg-accent-100 text-accent-600" : "bg-gray-100 text-gray-600"
|
|
658
665
|
),
|
|
659
|
-
children: /* @__PURE__ */ e(
|
|
666
|
+
children: /* @__PURE__ */ e(Ae, { size: 24 })
|
|
660
667
|
}
|
|
661
668
|
),
|
|
662
669
|
/* @__PURE__ */ a("div", { children: [
|
|
@@ -682,7 +689,7 @@ function ct({
|
|
|
682
689
|
className: k(
|
|
683
690
|
"flex items-center justify-center relative p-4 border-2 rounded-xl cursor-pointer transition-all duration-200",
|
|
684
691
|
t.paymentMethod === "cod" ? "border-accent-500 bg-accent-50" : "border-gray-200 hover:border-gray-300",
|
|
685
|
-
|
|
692
|
+
A("cod") && "opacity-50 cursor-not-allowed"
|
|
686
693
|
),
|
|
687
694
|
children: [
|
|
688
695
|
/* @__PURE__ */ e(
|
|
@@ -691,7 +698,7 @@ function ct({
|
|
|
691
698
|
type: "radio",
|
|
692
699
|
name: "paymentMethod",
|
|
693
700
|
value: "cod",
|
|
694
|
-
disabled:
|
|
701
|
+
disabled: A("cod"),
|
|
695
702
|
checked: t.paymentMethod === "cod",
|
|
696
703
|
onChange: x,
|
|
697
704
|
className: "sr-only"
|
package/dist/index160.mjs
CHANGED
|
@@ -1,35 +1,21 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import {
|
|
3
|
-
var
|
|
4
|
-
function
|
|
5
|
-
return
|
|
6
|
-
Object.defineProperty(
|
|
2
|
+
import { __exports as r } from "./index215.mjs";
|
|
3
|
+
var u;
|
|
4
|
+
function a() {
|
|
5
|
+
return u ? r : (u = 1, function(n) {
|
|
6
|
+
Object.defineProperty(n, "__esModule", {
|
|
7
7
|
value: !0
|
|
8
|
-
}), Object.defineProperty(
|
|
8
|
+
}), Object.defineProperty(n, "default", {
|
|
9
9
|
enumerable: !0,
|
|
10
10
|
get: function() {
|
|
11
|
-
return
|
|
11
|
+
return o;
|
|
12
12
|
}
|
|
13
13
|
});
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
if (typeof n > "u" && typeof window < "u") {
|
|
17
|
-
var u;
|
|
18
|
-
n = ((u = window.trustedTypes) == null ? void 0 : u.createPolicy("nextjs", {
|
|
19
|
-
createHTML: (t) => t,
|
|
20
|
-
createScript: (t) => t,
|
|
21
|
-
createScriptURL: (t) => t
|
|
22
|
-
})) || null;
|
|
23
|
-
}
|
|
24
|
-
return n;
|
|
25
|
-
}
|
|
26
|
-
function a(u) {
|
|
27
|
-
var t;
|
|
28
|
-
return ((t = d()) == null ? void 0 : t.createScriptURL(u)) || u;
|
|
14
|
+
function o(e, t) {
|
|
15
|
+
return t === void 0 && (t = ""), (e === "/" ? "/index" : /^\/index(\/|$)/.test(e) ? "/index" + e : e) + t;
|
|
29
16
|
}
|
|
30
|
-
|
|
31
|
-
}(r, r.exports), r.exports);
|
|
17
|
+
}(r), r);
|
|
32
18
|
}
|
|
33
19
|
export {
|
|
34
|
-
|
|
20
|
+
a as __require
|
|
35
21
|
};
|