@instockng/storefront-ui 1.0.104 → 1.0.106

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.
Files changed (175) hide show
  1. package/dist/components/Checkout.d.ts.map +1 -1
  2. package/dist/hooks/usePaystackPayment.d.ts +1 -0
  3. package/dist/hooks/usePaystackPayment.d.ts.map +1 -1
  4. package/dist/index108.mjs +1 -1
  5. package/dist/index112.mjs +1 -1
  6. package/dist/index113.mjs +1 -1
  7. package/dist/index114.mjs +6 -6
  8. package/dist/index115.mjs +4 -4
  9. package/dist/index116.mjs +3 -3
  10. package/dist/index117.mjs +1 -1
  11. package/dist/index118.mjs +1 -1
  12. package/dist/index119.mjs +1 -1
  13. package/dist/index120.mjs +2 -2
  14. package/dist/index121.mjs +2 -2
  15. package/dist/index122.mjs +3 -3
  16. package/dist/index123.mjs +1 -1
  17. package/dist/index124.mjs +3 -3
  18. package/dist/index125.mjs +2 -2
  19. package/dist/index126.mjs +2 -2
  20. package/dist/index127.mjs +1 -1
  21. package/dist/index128.mjs +3 -3
  22. package/dist/index129.mjs +1 -1
  23. package/dist/index130.mjs +1 -1
  24. package/dist/index131.mjs +3 -3
  25. package/dist/index132.mjs +2 -2
  26. package/dist/index133.mjs +4 -4
  27. package/dist/index134.mjs +1 -1
  28. package/dist/index135.mjs +3 -3
  29. package/dist/index136.mjs +4 -4
  30. package/dist/index137.mjs +1 -1
  31. package/dist/index138.mjs +1 -1
  32. package/dist/index139.mjs +1 -1
  33. package/dist/index140.mjs +1 -1
  34. package/dist/index141.mjs +1 -1
  35. package/dist/index142.mjs +1 -1
  36. package/dist/index143.mjs +1 -1
  37. package/dist/index144.mjs +2 -2
  38. package/dist/index145.mjs +3 -3
  39. package/dist/index148.mjs +1 -1
  40. package/dist/index150.mjs +1 -1
  41. package/dist/index152.mjs +1 -1
  42. package/dist/index153.mjs +2 -2
  43. package/dist/index157.mjs +2 -2
  44. package/dist/index162.mjs +2 -2
  45. package/dist/index164.mjs +2 -2
  46. package/dist/index165.mjs +2 -18
  47. package/dist/index166.mjs +11 -25
  48. package/dist/index167.mjs +26 -32
  49. package/dist/index168.mjs +32 -12
  50. package/dist/index169.mjs +9 -9
  51. package/dist/index170.mjs +18 -2
  52. package/dist/index171.mjs +2 -20
  53. package/dist/index172.mjs +13 -39
  54. package/dist/index173.mjs +46 -2
  55. package/dist/index174.mjs +2 -30
  56. package/dist/index175.mjs +24 -12
  57. package/dist/index176.mjs +18 -2
  58. package/dist/index177.mjs +2 -2
  59. package/dist/index178.mjs +2 -2
  60. package/dist/index179.mjs +2 -2
  61. package/dist/index180.mjs +2 -72
  62. package/dist/index181.mjs +72 -2
  63. package/dist/index182.mjs +2 -53
  64. package/dist/index183.mjs +53 -2
  65. package/dist/index184.mjs +2 -36
  66. package/dist/index185.mjs +30 -146
  67. package/dist/index186.mjs +152 -2
  68. package/dist/index187.mjs +2 -2
  69. package/dist/index188.mjs +2 -19
  70. package/dist/index189.mjs +19 -2
  71. package/dist/index190.mjs +2 -2
  72. package/dist/index191.mjs +2 -26
  73. package/dist/index192.mjs +26 -2
  74. package/dist/index193.mjs +2 -2
  75. package/dist/index194.mjs +2 -24
  76. package/dist/index195.mjs +17 -16
  77. package/dist/index196.mjs +23 -2
  78. package/dist/index198.mjs +2 -2
  79. package/dist/index199.mjs +2 -23
  80. package/dist/index20.mjs +80 -79
  81. package/dist/index200.mjs +23 -2
  82. package/dist/index201.mjs +2 -23
  83. package/dist/index202.mjs +23 -2
  84. package/dist/index203.mjs +2 -2
  85. package/dist/index205.mjs +2 -23
  86. package/dist/index206.mjs +23 -2
  87. package/dist/index207.mjs +2 -23
  88. package/dist/index208.mjs +23 -2
  89. package/dist/index209.mjs +2 -2
  90. package/dist/index210.mjs +2 -2
  91. package/dist/index212.mjs +2 -2
  92. package/dist/index213.mjs +2 -2
  93. package/dist/index214.mjs +2 -2
  94. package/dist/index215.mjs +2 -2
  95. package/dist/index216.mjs +2 -127
  96. package/dist/index217.mjs +127 -2
  97. package/dist/index218.mjs +2 -74
  98. package/dist/index219.mjs +60 -60
  99. package/dist/index220.mjs +74 -2
  100. package/dist/index221.mjs +12 -30
  101. package/dist/index222.mjs +7 -11
  102. package/dist/index223.mjs +30 -3
  103. package/dist/index224.mjs +10 -3
  104. package/dist/index225.mjs +4 -13
  105. package/dist/index226.mjs +4 -7
  106. package/dist/index233.mjs +2 -2
  107. package/dist/index234.mjs +2 -2
  108. package/dist/index236.mjs +2 -2
  109. package/dist/index237.mjs +2 -108
  110. package/dist/index238.mjs +2 -2
  111. package/dist/index239.mjs +2 -2
  112. package/dist/index240.mjs +2 -2
  113. package/dist/index241.mjs +108 -2
  114. package/dist/index242.mjs +2 -2
  115. package/dist/index243.mjs +2 -2
  116. package/dist/index244.mjs +36 -243
  117. package/dist/index245.mjs +2 -2
  118. package/dist/index246.mjs +243 -32
  119. package/dist/index247.mjs +2 -65
  120. package/dist/index248.mjs +24 -16
  121. package/dist/index249.mjs +65 -2
  122. package/dist/index250.mjs +25 -2
  123. package/dist/index251.mjs +2 -37
  124. package/dist/index253.mjs +2 -2
  125. package/dist/index254.mjs +2 -2
  126. package/dist/index255.mjs +2 -2
  127. package/dist/index258.mjs +2 -2
  128. package/dist/index259.mjs +2 -2
  129. package/dist/index261.mjs +1 -1
  130. package/dist/index264.mjs +1 -1
  131. package/dist/index271.mjs +2 -2
  132. package/dist/index272.mjs +2 -2
  133. package/dist/index273.mjs +18 -2
  134. package/dist/index274.mjs +47 -2
  135. package/dist/index275.mjs +2 -91
  136. package/dist/index276.mjs +2 -2
  137. package/dist/index277.mjs +2 -18
  138. package/dist/index278.mjs +2 -47
  139. package/dist/index279.mjs +91 -2
  140. package/dist/index281.mjs +2 -2
  141. package/dist/index283.mjs +2 -2
  142. package/dist/index40.mjs +1 -1
  143. package/dist/index41.mjs +1 -1
  144. package/dist/index42.mjs +1 -1
  145. package/dist/index43.mjs +1 -1
  146. package/dist/index44.mjs +1 -1
  147. package/dist/index45.mjs +2 -2
  148. package/dist/index47.mjs +2 -2
  149. package/dist/index55.mjs +1 -1
  150. package/dist/index62.mjs +1 -1
  151. package/dist/index63.mjs +1 -1
  152. package/dist/index64.mjs +1 -1
  153. package/dist/index65.mjs +1 -1
  154. package/dist/index66.mjs +1 -1
  155. package/dist/index67.mjs +1 -1
  156. package/dist/index68.mjs +1 -1
  157. package/dist/index69.mjs +1 -1
  158. package/dist/index70.mjs +1 -1
  159. package/dist/index71.mjs +1 -1
  160. package/dist/index72.mjs +1 -1
  161. package/dist/index73.mjs +1 -1
  162. package/dist/index74.mjs +1 -1
  163. package/dist/index75.mjs +1 -1
  164. package/dist/index76.mjs +23 -4
  165. package/dist/index77.mjs +2 -24
  166. package/dist/index78.mjs +23 -2
  167. package/dist/index79.mjs +149 -19
  168. package/dist/index80.mjs +4 -152
  169. package/dist/index83.mjs +1 -1
  170. package/package.json +2 -1
  171. package/src/components/Checkout.stories.tsx +0 -1
  172. package/src/components/Checkout.tsx +2 -1
  173. package/src/components/ShoppingCart.stories.tsx +0 -1
  174. package/src/hooks/usePaystackPayment.ts +1 -0
  175. package/src/test-utils/MockCartProvider.tsx +0 -1
package/dist/index199.mjs CHANGED
@@ -1,26 +1,5 @@
1
1
  'use client';
2
- import { __exports as r } from "./index256.mjs";
3
- import { __require as o } from "./index127.mjs";
4
- var i;
5
- function _() {
6
- return i ? r : (i = 1, function(t) {
7
- Object.defineProperty(t, "__esModule", {
8
- value: !0
9
- }), Object.defineProperty(t, "addPathPrefix", {
10
- enumerable: !0,
11
- get: function() {
12
- return n;
13
- }
14
- });
15
- const u = o();
16
- function n(e, a) {
17
- if (!e.startsWith("/") || !a)
18
- return e;
19
- const { pathname: P, query: d, hash: f } = (0, u.parsePath)(e);
20
- return "" + a + P + d + f;
21
- }
22
- }(r), r);
23
- }
2
+ var a = { exports: {} };
24
3
  export {
25
- _ as __require
4
+ a as __module
26
5
  };
package/dist/index20.mjs CHANGED
@@ -51,16 +51,16 @@ function mt({
51
51
  publicKey: te || "",
52
52
  onSuccess: async (n) => {
53
53
  try {
54
- const { fbc: s, fbp: l } = Y(), { ttp: o, ttclid: g } = J(), { firstName: p, lastName: L } = U(r.fullName), N = await j.mutateAsync({
54
+ const { fbc: r, fbp: l } = Y(), { ttp: o, ttclid: g } = J(), { firstName: p, lastName: L } = U(s.fullName), N = await j.mutateAsync({
55
55
  firstName: p,
56
56
  lastName: L,
57
- phone: r.phone,
58
- address: r.address,
59
- city: r.city,
60
- deliveryZoneId: y || r.deliveryZoneId,
61
- paymentMethod: r.paymentMethod,
57
+ phone: s.phone,
58
+ address: s.address,
59
+ city: s.city,
60
+ deliveryZoneId: y || s.deliveryZoneId,
61
+ paymentMethod: s.paymentMethod,
62
62
  paystackReference: n.reference,
63
- fbc: s,
63
+ fbc: r,
64
64
  fbp: l,
65
65
  ttp: o,
66
66
  ttclid: g
@@ -71,8 +71,8 @@ function mt({
71
71
  return;
72
72
  }
73
73
  H(N), ee(), b == null || b(N);
74
- } catch (s) {
75
- c == null || c(s);
74
+ } catch (r) {
75
+ c == null || c(r);
76
76
  }
77
77
  },
78
78
  onClose: () => {
@@ -88,7 +88,7 @@ function mt({
88
88
  Z(() => {
89
89
  d || (H(null), w("customer"), j.reset());
90
90
  }, [d]);
91
- const [r, K] = C({
91
+ const [s, K] = C({
92
92
  fullName: (i == null ? void 0 : i.fullName) || "",
93
93
  phone: (i == null ? void 0 : i.phone) || "",
94
94
  address: (i == null ? void 0 : i.address) || "",
@@ -104,59 +104,59 @@ function mt({
104
104
  Z(() => {
105
105
  if (d && t && !i && !se) {
106
106
  const n = [t.customerFirstName, t.customerLastName].filter(Boolean).join(" ");
107
- K((s) => {
107
+ K((r) => {
108
108
  var l;
109
109
  return {
110
- ...s,
111
- fullName: n || s.fullName,
112
- phone: t.customerPhone || s.phone,
113
- deliveryZoneId: ((l = t.deliveryZone) == null ? void 0 : l.id) || s.deliveryZoneId
110
+ ...r,
111
+ fullName: n || r.fullName,
112
+ phone: t.customerPhone || r.phone,
113
+ deliveryZoneId: ((l = t.deliveryZone) == null ? void 0 : l.id) || r.deliveryZoneId
114
114
  };
115
115
  }), re(!0);
116
116
  }
117
117
  d || re(!1);
118
118
  }, [d, t, i, se]), Z(() => {
119
119
  if (y) {
120
- const n = u == null ? void 0 : u.zones.find((s) => s.id === y);
121
- n && K((s) => ({
122
- ...s,
120
+ const n = u == null ? void 0 : u.zones.find((r) => r.id === y);
121
+ n && K((r) => ({
122
+ ...r,
123
123
  paymentMethod: n.allowOnline ? "online" : "cod"
124
124
  }));
125
125
  }
126
126
  }, [y, u]);
127
127
  const [v, T] = C({}), [G, Ce] = C(!1), q = (n) => {
128
- const { name: s, value: l } = n.target;
129
- K((o) => ({ ...o, [s]: l })), v[s] && T((o) => ({ ...o, [s]: void 0 }));
128
+ const { name: r, value: l } = n.target;
129
+ K((o) => ({ ...o, [r]: l })), v[r] && T((o) => ({ ...o, [r]: void 0 }));
130
130
  }, ne = qe(
131
131
  (n) => {
132
- const s = r[n];
133
- if (s)
132
+ const r = s[n];
133
+ if (r)
134
134
  if (n === "fullName") {
135
- const { firstName: l, lastName: o } = U(s);
135
+ const { firstName: l, lastName: o } = U(r);
136
136
  P.mutate({ customerFirstName: l, customerLastName: o });
137
- } else n === "phone" && P.mutate({ customerPhone: s });
137
+ } else n === "phone" && P.mutate({ customerPhone: r });
138
138
  },
139
- [r, P]
139
+ [s, P]
140
140
  ), A = (n) => {
141
- const s = {};
141
+ const r = {};
142
142
  try {
143
143
  if (n === "customer")
144
- Ge.validateSync(r, { abortEarly: !1 });
144
+ Ge.validateSync(s, { abortEarly: !1 });
145
145
  else if (n === "delivery") {
146
146
  const l = {
147
- address: r.address,
148
- city: r.city,
149
- state: F || r.state || "",
150
- deliveryZoneId: y || r.deliveryZoneId || ""
147
+ address: s.address,
148
+ city: s.city,
149
+ state: F || s.state || "",
150
+ deliveryZoneId: y || s.deliveryZoneId || ""
151
151
  };
152
152
  Oe.validateSync(l, { abortEarly: !1 });
153
- } else n === "payment" && Ve.validateSync(r, { abortEarly: !1 });
153
+ } else n === "payment" && Ve.validateSync(s, { abortEarly: !1 });
154
154
  } catch (l) {
155
155
  l instanceof _e && l.inner.forEach((o) => {
156
- o.path && (s[o.path] = o.message);
156
+ o.path && (r[o.path] = o.message);
157
157
  });
158
158
  }
159
- return T(s), Object.keys(s).length === 0;
159
+ return T(r), Object.keys(r).length === 0;
160
160
  }, Pe = () => {
161
161
  A(m) && (m === "customer" ? w("delivery") : m === "delivery" && w("payment"));
162
162
  }, ke = () => {
@@ -172,7 +172,7 @@ function mt({
172
172
  return;
173
173
  }
174
174
  if (A("payment")) {
175
- if (r.paymentMethod === "online") {
175
+ if (s.paymentMethod === "online") {
176
176
  if (!te) {
177
177
  c == null || c(new Error("Paystack is not configured. Please contact support."));
178
178
  return;
@@ -181,20 +181,21 @@ function mt({
181
181
  c == null || c(new Error("Payment system is loading. Please try again."));
182
182
  return;
183
183
  }
184
- const s = Math.round(t.pricing.total * 100), { fbc: l, fbp: o } = Y(), { ttp: g, ttclid: p } = J(), { firstName: L, lastName: N } = U(r.fullName);
184
+ const r = Math.round(t.pricing.total * 100), { fbc: l, fbp: o } = Y(), { ttp: g, ttclid: p } = J(), { firstName: L, lastName: N } = U(s.fullName);
185
185
  ae.initializePayment({
186
- email: (t == null ? void 0 : t.customerEmail) || `${r.phone.replace(/\D/g, "")}@customer.placeholder.com`,
187
- amount: s,
186
+ email: (t == null ? void 0 : t.customerEmail) || `${s.phone.replace(/\D/g, "")}@customer.instock.ng`,
187
+ phone: s.phone,
188
+ amount: r,
188
189
  currency: "NGN",
189
190
  metadata: {
190
191
  cartId: t == null ? void 0 : t.id,
191
192
  brandSlug: (n = t == null ? void 0 : t.brand) == null ? void 0 : n.slug,
192
- address: r.address,
193
- city: r.city,
194
- delivery_zone_id: y || r.deliveryZoneId,
193
+ address: s.address,
194
+ city: s.city,
195
+ delivery_zone_id: y || s.deliveryZoneId,
195
196
  firstName: L,
196
197
  lastName: N,
197
- phone: r.phone,
198
+ phone: s.phone,
198
199
  fbc: l,
199
200
  fbp: o,
200
201
  ttp: g,
@@ -203,27 +204,27 @@ function mt({
203
204
  {
204
205
  display_name: "Customer Name",
205
206
  variable_name: "customer_name",
206
- value: r.fullName
207
+ value: s.fullName
207
208
  },
208
209
  {
209
210
  display_name: "Phone Number",
210
211
  variable_name: "phone_number",
211
- value: r.phone
212
+ value: s.phone
212
213
  },
213
214
  {
214
215
  display_name: "Address",
215
216
  variable_name: "address",
216
- value: r.address
217
+ value: s.address
217
218
  },
218
219
  {
219
220
  display_name: "City",
220
221
  variable_name: "city",
221
- value: r.city
222
+ value: s.city
222
223
  },
223
224
  {
224
225
  display_name: "Delivery Zone ID",
225
226
  variable_name: "delivery_zone_id",
226
- value: y || r.deliveryZoneId
227
+ value: y || s.deliveryZoneId
227
228
  }
228
229
  ]
229
230
  }
@@ -231,15 +232,15 @@ function mt({
231
232
  return;
232
233
  }
233
234
  try {
234
- const { fbc: s, fbp: l } = Y(), { ttp: o, ttclid: g } = J(), { firstName: p, lastName: L } = U(r.fullName), N = await j.mutateAsync({
235
+ const { fbc: r, fbp: l } = Y(), { ttp: o, ttclid: g } = J(), { firstName: p, lastName: L } = U(s.fullName), N = await j.mutateAsync({
235
236
  firstName: p,
236
237
  lastName: L,
237
- phone: r.phone,
238
- address: r.address,
239
- city: r.city,
240
- deliveryZoneId: y || r.deliveryZoneId,
241
- paymentMethod: r.paymentMethod,
242
- fbc: s,
238
+ phone: s.phone,
239
+ address: s.address,
240
+ city: s.city,
241
+ deliveryZoneId: y || s.deliveryZoneId,
242
+ paymentMethod: s.paymentMethod,
243
+ fbc: r,
243
244
  fbp: l,
244
245
  ttp: o,
245
246
  ttclid: g
@@ -250,8 +251,8 @@ function mt({
250
251
  return;
251
252
  }
252
253
  H(N), ee(), b == null || b(N);
253
- } catch (s) {
254
- c == null || c(s);
254
+ } catch (r) {
255
+ c == null || c(r);
255
256
  }
256
257
  }
257
258
  }, Me = {
@@ -278,8 +279,8 @@ function mt({
278
279
  var o, g, p;
279
280
  if (!y)
280
281
  return /* @__PURE__ */ e("span", { className: "text-gray-400 text-xs", children: "Select zone first" });
281
- const n = (o = t == null ? void 0 : t.brand) == null ? void 0 : o.freeShippingThreshold, s = ((g = t == null ? void 0 : t.pricing) == null ? void 0 : g.subtotal) ?? 0;
282
- if (n && s >= n)
282
+ const n = (o = t == null ? void 0 : t.brand) == null ? void 0 : o.freeShippingThreshold, r = ((g = t == null ? void 0 : t.pricing) == null ? void 0 : g.subtotal) ?? 0;
283
+ if (n && r >= n)
283
284
  return /* @__PURE__ */ e("span", { className: "text-green-600", children: "Free" });
284
285
  const l = P.isPending ? (h == null ? void 0 : h.deliveryCost) ?? 0 : ((p = t == null ? void 0 : t.pricing) == null ? void 0 : p.deliveryCharge) ?? 0;
285
286
  return l === 0 ? /* @__PURE__ */ e("span", { className: "text-green-600", children: "Free" }) : _(l);
@@ -476,7 +477,7 @@ function mt({
476
477
  label: "Full Name",
477
478
  type: "text",
478
479
  name: "fullName",
479
- value: r.fullName,
480
+ value: s.fullName,
480
481
  onChange: q,
481
482
  onBlur: () => ne("fullName"),
482
483
  error: v.fullName,
@@ -490,7 +491,7 @@ function mt({
490
491
  label: "Phone Number",
491
492
  type: "tel",
492
493
  name: "phone",
493
- value: r.phone,
494
+ value: s.phone,
494
495
  onChange: q,
495
496
  onBlur: () => ne("phone"),
496
497
  placeholder: "e.g. 08012345678",
@@ -510,7 +511,7 @@ function mt({
510
511
  label: "Street Address",
511
512
  type: "text",
512
513
  name: "address",
513
- value: r.address,
514
+ value: s.address,
514
515
  onChange: q,
515
516
  error: v.address,
516
517
  autoCorrect: "off",
@@ -524,7 +525,7 @@ function mt({
524
525
  label: "Area",
525
526
  type: "text",
526
527
  name: "city",
527
- value: r.city,
528
+ value: s.city,
528
529
  onChange: q,
529
530
  error: v.city,
530
531
  autoCorrect: "off",
@@ -539,15 +540,15 @@ function mt({
539
540
  value: F || "",
540
541
  onChange: (n) => {
541
542
  X("");
542
- const s = n.target.value;
543
- xe(s || void 0), v.state && T((l) => ({ ...l, state: void 0 }));
543
+ const r = n.target.value;
544
+ xe(r || void 0), v.state && T((l) => ({ ...l, state: void 0 }));
544
545
  },
545
546
  error: v.state,
546
547
  required: !0,
547
548
  children: [
548
549
  /* @__PURE__ */ e("option", { disabled: !0, value: "", children: "Select State" }),
549
- k == null ? void 0 : k.slice().sort((n, s) => {
550
- const l = n.name.toLowerCase() === "lagos" ? 0 : 1, o = s.name.toLowerCase() === "lagos" ? 0 : 1;
550
+ k == null ? void 0 : k.slice().sort((n, r) => {
551
+ const l = n.name.toLowerCase() === "lagos" ? 0 : 1, o = r.name.toLowerCase() === "lagos" ? 0 : 1;
551
552
  return l - o;
552
553
  }).map((n) => /* @__PURE__ */ e("option", { value: n.id, children: n.name }, n.id))
553
554
  ]
@@ -559,8 +560,8 @@ function mt({
559
560
  label: "Delivery Zone",
560
561
  value: y || "",
561
562
  onChange: (n) => {
562
- const s = n.target.value;
563
- X(s || void 0), v.deliveryZoneId && T((l) => ({ ...l, deliveryZoneId: void 0 })), s && P.mutate({ deliveryZoneId: s });
563
+ const r = n.target.value;
564
+ X(r || void 0), v.deliveryZoneId && T((l) => ({ ...l, deliveryZoneId: void 0 })), r && P.mutate({ deliveryZoneId: r });
564
565
  },
565
566
  disabled: !u,
566
567
  error: v.deliveryZoneId,
@@ -569,7 +570,7 @@ function mt({
569
570
  /* @__PURE__ */ e("option", { disabled: !0, value: "", children: u ? "Select Delivery Zone" : "Select State First" }),
570
571
  (() => {
571
572
  var o, g;
572
- const n = ((o = t == null ? void 0 : t.pricing) == null ? void 0 : o.subtotal) ?? 0, s = (g = t == null ? void 0 : t.brand) == null ? void 0 : g.freeShippingThreshold, l = s && n >= s;
573
+ const n = ((o = t == null ? void 0 : t.pricing) == null ? void 0 : o.subtotal) ?? 0, r = (g = t == null ? void 0 : t.brand) == null ? void 0 : g.freeShippingThreshold, l = r && n >= r;
573
574
  return u == null ? void 0 : u.zones.map((p) => /* @__PURE__ */ a("option", { value: p.id, children: [
574
575
  p.name,
575
576
  l ? "" : ` (${_(p.deliveryCost)})`
@@ -612,10 +613,10 @@ function mt({
612
613
  ),
613
614
  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: z.policies && /* @__PURE__ */ a("div", { children: [
614
615
  /* @__PURE__ */ e("h4", { className: "font-bold text-gray-800 mb-2", children: "Our Refund Policy" }),
615
- /* @__PURE__ */ e("ul", { className: "space-y-1", children: z.policies.map((n, s) => /* @__PURE__ */ a("li", { className: "flex items-start", children: [
616
+ /* @__PURE__ */ e("ul", { className: "space-y-1", children: z.policies.map((n, r) => /* @__PURE__ */ a("li", { className: "flex items-start", children: [
616
617
  /* @__PURE__ */ e("span", { className: "text-green-600 mr-2", children: "✓" }),
617
618
  /* @__PURE__ */ e("span", { children: n })
618
- ] }, s)) })
619
+ ] }, r)) })
619
620
  ] }) }) })
620
621
  }
621
622
  )
@@ -626,7 +627,7 @@ function mt({
626
627
  {
627
628
  className: M(
628
629
  "flex items-center justify-center relative p-4 border-2 rounded-xl cursor-pointer transition-all duration-200",
629
- r.paymentMethod === "online" ? "border-accent-500 bg-accent-50" : "border-gray-200 hover:border-gray-300",
630
+ s.paymentMethod === "online" ? "border-accent-500 bg-accent-50" : "border-gray-200 hover:border-gray-300",
630
631
  B("online") && "opacity-50 cursor-not-allowed"
631
632
  ),
632
633
  children: [
@@ -637,7 +638,7 @@ function mt({
637
638
  name: "paymentMethod",
638
639
  value: "online",
639
640
  disabled: B("online"),
640
- checked: r.paymentMethod === "online",
641
+ checked: s.paymentMethod === "online",
641
642
  onChange: q,
642
643
  className: "sr-only"
643
644
  }
@@ -648,7 +649,7 @@ function mt({
648
649
  {
649
650
  className: M(
650
651
  "p-3 rounded-full",
651
- r.paymentMethod === "online" ? "bg-accent-100 text-accent-600" : "bg-gray-100 text-gray-600"
652
+ s.paymentMethod === "online" ? "bg-accent-100 text-accent-600" : "bg-gray-100 text-gray-600"
652
653
  ),
653
654
  children: /* @__PURE__ */ e(Be, { size: 24 })
654
655
  }
@@ -666,7 +667,7 @@ function mt({
666
667
  )
667
668
  ] })
668
669
  ] }),
669
- r.paymentMethod === "online" && /* @__PURE__ */ e("div", { className: "absolute top-2 right-2", children: /* @__PURE__ */ e("div", { className: "w-5 h-5 bg-accent-600 rounded-full flex items-center justify-center", children: /* @__PURE__ */ e("div", { className: "w-2 h-2 bg-white rounded-full" }) }) })
670
+ s.paymentMethod === "online" && /* @__PURE__ */ e("div", { className: "absolute top-2 right-2", children: /* @__PURE__ */ e("div", { className: "w-5 h-5 bg-accent-600 rounded-full flex items-center justify-center", children: /* @__PURE__ */ e("div", { className: "w-2 h-2 bg-white rounded-full" }) }) })
670
671
  ]
671
672
  }
672
673
  ) }),
@@ -675,7 +676,7 @@ function mt({
675
676
  {
676
677
  className: M(
677
678
  "flex items-center justify-center relative p-4 border-2 rounded-xl cursor-pointer transition-all duration-200",
678
- r.paymentMethod === "cod" ? "border-accent-500 bg-accent-50" : "border-gray-200 hover:border-gray-300",
679
+ s.paymentMethod === "cod" ? "border-accent-500 bg-accent-50" : "border-gray-200 hover:border-gray-300",
679
680
  B("cod") && "opacity-50 cursor-not-allowed"
680
681
  ),
681
682
  children: [
@@ -686,7 +687,7 @@ function mt({
686
687
  name: "paymentMethod",
687
688
  value: "cod",
688
689
  disabled: B("cod"),
689
- checked: r.paymentMethod === "cod",
690
+ checked: s.paymentMethod === "cod",
690
691
  onChange: q,
691
692
  className: "sr-only"
692
693
  }
@@ -697,7 +698,7 @@ function mt({
697
698
  {
698
699
  className: M(
699
700
  "p-3 rounded-full",
700
- r.paymentMethod === "cod" ? "bg-accent-100 text-accent-600" : "bg-gray-100 text-gray-600"
701
+ s.paymentMethod === "cod" ? "bg-accent-100 text-accent-600" : "bg-gray-100 text-gray-600"
701
702
  ),
702
703
  children: /* @__PURE__ */ e(Ne, { size: 24 })
703
704
  }
@@ -707,7 +708,7 @@ function mt({
707
708
  /* @__PURE__ */ e("div", { className: "text-sm text-gray-500 mt-1", children: "Pay when item arrives" })
708
709
  ] })
709
710
  ] }),
710
- r.paymentMethod === "cod" && /* @__PURE__ */ e("div", { className: "absolute top-2 right-2", children: /* @__PURE__ */ e("div", { className: "w-5 h-5 bg-accent-600 rounded-full flex items-center justify-center", children: /* @__PURE__ */ e("div", { className: "w-2 h-2 bg-white rounded-full" }) }) })
711
+ s.paymentMethod === "cod" && /* @__PURE__ */ e("div", { className: "absolute top-2 right-2", children: /* @__PURE__ */ e("div", { className: "w-5 h-5 bg-accent-600 rounded-full flex items-center justify-center", children: /* @__PURE__ */ e("div", { className: "w-2 h-2 bg-white rounded-full" }) }) })
711
712
  ]
712
713
  }
713
714
  )
package/dist/index200.mjs CHANGED
@@ -1,5 +1,26 @@
1
1
  'use client';
2
- var a = { exports: {} };
2
+ import { __exports as r } from "./index257.mjs";
3
+ import { __require as o } from "./index127.mjs";
4
+ var i;
5
+ function _() {
6
+ return i ? r : (i = 1, function(t) {
7
+ Object.defineProperty(t, "__esModule", {
8
+ value: !0
9
+ }), Object.defineProperty(t, "addPathPrefix", {
10
+ enumerable: !0,
11
+ get: function() {
12
+ return n;
13
+ }
14
+ });
15
+ const u = o();
16
+ function n(e, a) {
17
+ if (!e.startsWith("/") || !a)
18
+ return e;
19
+ const { pathname: P, query: d, hash: f } = (0, u.parsePath)(e);
20
+ return "" + a + P + d + f;
21
+ }
22
+ }(r), r);
23
+ }
3
24
  export {
4
- a as __module
25
+ _ as __require
5
26
  };
package/dist/index201.mjs CHANGED
@@ -1,26 +1,5 @@
1
1
  'use client';
2
- import { __exports as e } from "./index257.mjs";
3
- import { __require as f } from "./index127.mjs";
4
- var n;
5
- function p() {
6
- return n ? e : (n = 1, function(r) {
7
- Object.defineProperty(r, "__esModule", {
8
- value: !0
9
- }), Object.defineProperty(r, "pathHasPrefix", {
10
- enumerable: !0,
11
- get: function() {
12
- return u;
13
- }
14
- });
15
- const s = f();
16
- function u(t, a) {
17
- if (typeof t != "string")
18
- return !1;
19
- const { pathname: i } = (0, s.parsePath)(t);
20
- return i === a || i.startsWith(a + "/");
21
- }
22
- }(e), e);
23
- }
2
+ var a = { exports: {} };
24
3
  export {
25
- p as __require
4
+ a as __module
26
5
  };
package/dist/index202.mjs CHANGED
@@ -1,5 +1,26 @@
1
1
  'use client';
2
- var e = { exports: {} };
2
+ import { __exports as e } from "./index256.mjs";
3
+ import { __require as f } from "./index127.mjs";
4
+ var n;
5
+ function p() {
6
+ return n ? e : (n = 1, function(r) {
7
+ Object.defineProperty(r, "__esModule", {
8
+ value: !0
9
+ }), Object.defineProperty(r, "pathHasPrefix", {
10
+ enumerable: !0,
11
+ get: function() {
12
+ return u;
13
+ }
14
+ });
15
+ const s = f();
16
+ function u(t, a) {
17
+ if (typeof t != "string")
18
+ return !1;
19
+ const { pathname: i } = (0, s.parsePath)(t);
20
+ return i === a || i.startsWith(a + "/");
21
+ }
22
+ }(e), e);
23
+ }
3
24
  export {
4
- e as __module
25
+ p as __require
5
26
  };
package/dist/index203.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  'use client';
2
- var e = {};
2
+ var e = { exports: {} };
3
3
  export {
4
- e as __exports
4
+ e as __module
5
5
  };
package/dist/index205.mjs CHANGED
@@ -1,26 +1,5 @@
1
1
  'use client';
2
- import { __exports as t } from "./index258.mjs";
3
- import { __require as a } from "./index201.mjs";
4
- var n;
5
- function h() {
6
- return n ? t : (n = 1, function(i) {
7
- Object.defineProperty(i, "__esModule", {
8
- value: !0
9
- }), Object.defineProperty(i, "removePathPrefix", {
10
- enumerable: !0,
11
- get: function() {
12
- return f;
13
- }
14
- });
15
- const o = a();
16
- function f(e, u) {
17
- if (!(0, o.pathHasPrefix)(e, u))
18
- return e;
19
- const r = e.slice(u.length);
20
- return r.startsWith("/") ? r : "/" + r;
21
- }
22
- }(t), t);
23
- }
2
+ var e = {};
24
3
  export {
25
- h as __require
4
+ e as __exports
26
5
  };
package/dist/index206.mjs CHANGED
@@ -1,5 +1,26 @@
1
1
  'use client';
2
- var a = {};
2
+ import { __exports as t } from "./index259.mjs";
3
+ import { __require as a } from "./index202.mjs";
4
+ var n;
5
+ function h() {
6
+ return n ? t : (n = 1, function(i) {
7
+ Object.defineProperty(i, "__esModule", {
8
+ value: !0
9
+ }), Object.defineProperty(i, "removePathPrefix", {
10
+ enumerable: !0,
11
+ get: function() {
12
+ return f;
13
+ }
14
+ });
15
+ const o = a();
16
+ function f(e, u) {
17
+ if (!(0, o.pathHasPrefix)(e, u))
18
+ return e;
19
+ const r = e.slice(u.length);
20
+ return r.startsWith("/") ? r : "/" + r;
21
+ }
22
+ }(t), t);
23
+ }
3
24
  export {
4
- a as __exports
25
+ h as __require
5
26
  };
package/dist/index207.mjs CHANGED
@@ -1,26 +1,5 @@
1
1
  'use client';
2
- import { __exports as r } from "./index259.mjs";
3
- import { __require as s } from "./index127.mjs";
4
- var a;
5
- function _() {
6
- return a ? r : (a = 1, function(t) {
7
- Object.defineProperty(t, "__esModule", {
8
- value: !0
9
- }), Object.defineProperty(t, "addPathSuffix", {
10
- enumerable: !0,
11
- get: function() {
12
- return n;
13
- }
14
- });
15
- const i = s();
16
- function n(e, u) {
17
- if (!e.startsWith("/") || !u)
18
- return e;
19
- const { pathname: f, query: d, hash: o } = (0, i.parsePath)(e);
20
- return "" + f + u + d + o;
21
- }
22
- }(r), r);
23
- }
2
+ var a = {};
24
3
  export {
25
- _ as __require
4
+ a as __exports
26
5
  };
package/dist/index208.mjs CHANGED
@@ -1,5 +1,26 @@
1
1
  'use client';
2
- var a = {};
2
+ import { __exports as r } from "./index258.mjs";
3
+ import { __require as s } from "./index127.mjs";
4
+ var a;
5
+ function _() {
6
+ return a ? r : (a = 1, function(t) {
7
+ Object.defineProperty(t, "__esModule", {
8
+ value: !0
9
+ }), Object.defineProperty(t, "addPathSuffix", {
10
+ enumerable: !0,
11
+ get: function() {
12
+ return n;
13
+ }
14
+ });
15
+ const i = s();
16
+ function n(e, u) {
17
+ if (!e.startsWith("/") || !u)
18
+ return e;
19
+ const { pathname: f, query: d, hash: o } = (0, i.parsePath)(e);
20
+ return "" + f + u + d + o;
21
+ }
22
+ }(r), r);
23
+ }
3
24
  export {
4
- a as __exports
25
+ _ as __require
5
26
  };
package/dist/index209.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  'use client';
2
- var r = {};
2
+ var a = {};
3
3
  export {
4
- r as __exports
4
+ a as __exports
5
5
  };
package/dist/index210.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  'use client';
2
- var o = {};
2
+ var r = {};
3
3
  export {
4
- o as __exports
4
+ r as __exports
5
5
  };