@instockng/storefront-ui 1.0.117 → 1.0.118

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 (132) hide show
  1. package/dist/components/AssistantDrawer.d.ts.map +1 -1
  2. package/dist/index100.mjs +86 -4
  3. package/dist/index101.mjs +26 -176
  4. package/dist/index102.mjs +8 -52
  5. package/dist/index103.mjs +75 -69
  6. package/dist/index104.mjs +4 -37
  7. package/dist/index105.mjs +2 -43
  8. package/dist/index106.mjs +83 -2
  9. package/dist/index107.mjs +52 -4
  10. package/dist/index108.mjs +5 -1133
  11. package/dist/index109.mjs +4 -19
  12. package/dist/index110.mjs +171 -47
  13. package/dist/index111.mjs +52 -32
  14. package/dist/index112.mjs +69 -2
  15. package/dist/index117.mjs +2 -2
  16. package/dist/index118.mjs +2 -2
  17. package/dist/index153.mjs +1 -1
  18. package/dist/index154.mjs +1 -1
  19. package/dist/index155.mjs +5 -5
  20. package/dist/index157.mjs +2 -2
  21. package/dist/index159.mjs +2 -2
  22. package/dist/index161.mjs +1 -1
  23. package/dist/index163.mjs +4 -4
  24. package/dist/index164.mjs +3 -3
  25. package/dist/index169.mjs +1 -1
  26. package/dist/index170.mjs +1 -1
  27. package/dist/index172.mjs +1 -1
  28. package/dist/index173.mjs +1 -1
  29. package/dist/index175.mjs +3 -3
  30. package/dist/index176.mjs +1 -1
  31. package/dist/index178.mjs +2 -2
  32. package/dist/index179.mjs +1 -1
  33. package/dist/index184.mjs +2 -2
  34. package/dist/index186.mjs +1 -1
  35. package/dist/index192.mjs +1 -1
  36. package/dist/index195.mjs +1 -1
  37. package/dist/index203.mjs +1 -1
  38. package/dist/index205.mjs +1 -1
  39. package/dist/index22.mjs +133 -122
  40. package/dist/index220.mjs +2 -2
  41. package/dist/index222.mjs +1 -1
  42. package/dist/index223.mjs +1 -1
  43. package/dist/index224.mjs +1 -1
  44. package/dist/index225.mjs +3 -3
  45. package/dist/index228.mjs +3 -3
  46. package/dist/index230.mjs +1 -1
  47. package/dist/index232.mjs +3 -3
  48. package/dist/index233.mjs +5 -5
  49. package/dist/index234.mjs +3 -3
  50. package/dist/index236.mjs +2 -2
  51. package/dist/index237.mjs +2 -2
  52. package/dist/index239.mjs +2 -2
  53. package/dist/index240.mjs +2 -2
  54. package/dist/index242.mjs +2 -37
  55. package/dist/index244.mjs +2 -108
  56. package/dist/index245.mjs +108 -2
  57. package/dist/index246.mjs +2 -2
  58. package/dist/index247.mjs +2 -2
  59. package/dist/index248.mjs +37 -2
  60. package/dist/index250.mjs +1 -1
  61. package/dist/index252.mjs +1 -1
  62. package/dist/index253.mjs +1 -1
  63. package/dist/index254.mjs +2 -2
  64. package/dist/index263.mjs +2 -2
  65. package/dist/index264.mjs +4 -2
  66. package/dist/index265.mjs +2 -2
  67. package/dist/index266.mjs +2 -4
  68. package/dist/index267.mjs +2 -3
  69. package/dist/index268.mjs +2 -2
  70. package/dist/index269.mjs +18 -2
  71. package/dist/index270.mjs +46 -16
  72. package/dist/index271.mjs +2 -13
  73. package/dist/index272.mjs +2 -6
  74. package/dist/index273.mjs +2 -30
  75. package/dist/index274.mjs +2 -2
  76. package/dist/index275.mjs +89 -16
  77. package/dist/index276.mjs +3 -47
  78. package/dist/index277.mjs +2 -2
  79. package/dist/index278.mjs +2 -2
  80. package/dist/index279.mjs +17 -2
  81. package/dist/index280.mjs +13 -2
  82. package/dist/index281.mjs +6 -2
  83. package/dist/index282.mjs +30 -91
  84. package/dist/index43.mjs +1 -1
  85. package/dist/index44.mjs +1 -1
  86. package/dist/index45.mjs +1 -1
  87. package/dist/index46.mjs +1 -1
  88. package/dist/index47.mjs +1 -1
  89. package/dist/index48.mjs +2 -2
  90. package/dist/index50.mjs +2 -2
  91. package/dist/index54.mjs +3 -3
  92. package/dist/index58.mjs +1 -1
  93. package/dist/index63.mjs +17 -17
  94. package/dist/index64.mjs +2 -2
  95. package/dist/index65.mjs +1 -1
  96. package/dist/index66.mjs +1 -1
  97. package/dist/index67.mjs +1 -1
  98. package/dist/index68.mjs +1 -1
  99. package/dist/index69.mjs +1 -1
  100. package/dist/index70.mjs +1 -1
  101. package/dist/index71.mjs +1 -1
  102. package/dist/index72.mjs +1 -1
  103. package/dist/index73.mjs +1 -1
  104. package/dist/index74.mjs +1 -1
  105. package/dist/index75.mjs +1 -1
  106. package/dist/index76.mjs +1 -1
  107. package/dist/index77.mjs +1 -1
  108. package/dist/index78.mjs +1 -1
  109. package/dist/index79.mjs +23 -4
  110. package/dist/index80.mjs +2 -23
  111. package/dist/index81.mjs +21 -73
  112. package/dist/index82.mjs +153 -15
  113. package/dist/index83.mjs +4 -62
  114. package/dist/index84.mjs +71 -20
  115. package/dist/index85.mjs +15 -153
  116. package/dist/index86.mjs +63 -2
  117. package/dist/index87.mjs +2 -235
  118. package/dist/index88.mjs +5 -5
  119. package/dist/index89.mjs +1125 -125
  120. package/dist/index90.mjs +19 -67
  121. package/dist/index91.mjs +50 -82
  122. package/dist/index92.mjs +32 -28
  123. package/dist/index93.mjs +2 -9
  124. package/dist/index94.mjs +33 -71
  125. package/dist/index95.mjs +42 -3
  126. package/dist/index96.mjs +235 -2
  127. package/dist/index97.mjs +5 -82
  128. package/dist/index98.mjs +130 -50
  129. package/dist/index99.mjs +66 -4
  130. package/dist/styles.css +1 -1
  131. package/package.json +2 -2
  132. package/src/components/AssistantDrawer.tsx +21 -0
package/dist/index203.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  'use client';
2
- import { __exports as r } from "./index260.mjs";
2
+ import { __exports as r } from "./index259.mjs";
3
3
  import { __require as o } from "./index130.mjs";
4
4
  var i;
5
5
  function _() {
package/dist/index205.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  'use client';
2
- import { __exports as e } from "./index259.mjs";
2
+ import { __exports as e } from "./index260.mjs";
3
3
  import { __require as f } from "./index130.mjs";
4
4
  var n;
5
5
  function p() {
package/dist/index22.mjs CHANGED
@@ -1,169 +1,179 @@
1
1
  'use client';
2
2
  import { jsxs as c, jsx as t } from "react/jsx-runtime";
3
- import { useState as g, useRef as x, useCallback as O, useEffect as S } from "react";
4
- import { createPortal as Z } from "react-dom";
5
- import { Sparkles as Q, X as ee, MessageCircle as te, Loader2 as re, Send as se } from "lucide-react";
6
- import { cn as k, formatCurrency as ne, WHATSAPP_HELP_LINK as ae } from "./index30.mjs";
7
- import { useHideBodyOverflow as oe } from "./index53.mjs";
8
- function le(a) {
3
+ import { useState as d, useRef as y, useCallback as V, useEffect as x } from "react";
4
+ import { createPortal as ee } from "react-dom";
5
+ import { Sparkles as te, X as re, MessageCircle as se, Loader2 as ne, Send as ae } from "lucide-react";
6
+ import { cn as k, formatCurrency as oe, WHATSAPP_HELP_LINK as le } from "./index30.mjs";
7
+ import { useHideBodyOverflow as ie } from "./index53.mjs";
8
+ function ce(a) {
9
9
  return a.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/\*\*(.+?)\*\*/g, "<strong>$1</strong>").replace(/\*(.+?)\*/g, "<em>$1</em>").replace(/\n/g, "<br />");
10
10
  }
11
- function ie(a) {
11
+ function de(a) {
12
12
  return a.replace(/\s*PRO\w*UCTS?:[\w\-,]*\s*/gi, "").replace(/\s*CONTACT_SUPPORT\s*/gi, "").replace(/\s*SUGGESTIONS:[^\n]*\s*/g, "");
13
13
  }
14
- function he({
14
+ function be({
15
15
  isOpen: a,
16
- onClose: y,
17
- apiUrl: R,
18
- brandSlug: j,
19
- productSlug: I,
20
- initialQuestion: w,
21
- assistantName: L = "AI Assistant",
22
- className: z,
23
- disablePortal: B = !1
16
+ onClose: w,
17
+ apiUrl: P,
18
+ brandSlug: R,
19
+ productSlug: j,
20
+ initialQuestion: v,
21
+ assistantName: I = "AI Assistant",
22
+ className: B,
23
+ disablePortal: X = !1
24
24
  }) {
25
- const [d, u] = g([]), [N, A] = g(""), [m, _] = g(!1), [$, h] = g(null), [M, W] = g(!1), [K, H] = g(!1), U = x(null), D = x(null), E = x(!1), J = x([]);
26
- J.current = d, oe(a);
27
- const q = O((e, l) => {
25
+ const [u, m] = d([]), [N, E] = d(""), [f, H] = d(!1), [$, h] = d(null), [_, M] = d(!1), [O, W] = d(!1), [U, z] = d(0), D = y(null), J = y(null), A = y(!1), q = y([]);
26
+ q.current = u, ie(a);
27
+ const F = V((e, n) => {
28
28
  if (e === "token")
29
- u((s) => {
30
- const o = [...s], r = o[o.length - 1];
31
- if ((r == null ? void 0 : r.role) === "assistant") {
32
- const n = r.content + l, i = ie(n);
33
- o[o.length - 1] = { ...r, content: i };
29
+ m((r) => {
30
+ const l = [...r], s = l[l.length - 1];
31
+ if ((s == null ? void 0 : s.role) === "assistant") {
32
+ const o = s.content + n, i = de(o);
33
+ l[l.length - 1] = { ...s, content: i };
34
34
  }
35
- return o;
35
+ return l;
36
36
  });
37
37
  else if (e === "done")
38
38
  try {
39
- const s = JSON.parse(l);
40
- u((o) => {
41
- var i, f;
42
- const r = [...o], n = r[r.length - 1];
43
- return (n == null ? void 0 : n.role) === "assistant" && (r[r.length - 1] = {
44
- ...n,
45
- content: s.answer || n.content,
46
- products: ((i = s.products) == null ? void 0 : i.length) > 0 ? s.products : void 0,
47
- whatsapp: s.whatsapp || !1,
48
- suggestions: ((f = s.suggestions) == null ? void 0 : f.length) > 0 ? s.suggestions : void 0
49
- }), r;
39
+ const r = JSON.parse(n);
40
+ m((l) => {
41
+ var i, g;
42
+ const s = [...l], o = s[s.length - 1];
43
+ return (o == null ? void 0 : o.role) === "assistant" && (s[s.length - 1] = {
44
+ ...o,
45
+ content: r.answer || o.content,
46
+ products: ((i = r.products) == null ? void 0 : i.length) > 0 ? r.products : void 0,
47
+ whatsapp: r.whatsapp || !1,
48
+ suggestions: ((g = r.suggestions) == null ? void 0 : g.length) > 0 ? r.suggestions : void 0
49
+ }), s;
50
50
  });
51
51
  } catch {
52
52
  }
53
53
  else if (e === "error")
54
54
  try {
55
- const s = JSON.parse(l);
56
- h(s.message || "An error occurred");
55
+ const r = JSON.parse(n);
56
+ h(r.message || "An error occurred");
57
57
  } catch {
58
58
  h("An error occurred");
59
59
  }
60
- }, []), v = x(null), T = O(
60
+ }, []), S = y(null), T = V(
61
61
  async (e) => {
62
- var o;
62
+ var l;
63
63
  if (!e.trim()) return;
64
64
  h(null);
65
- const l = { role: "user", content: e }, s = J.current.slice(-20).map((r) => ({
66
- role: r.role,
67
- content: r.content
65
+ const n = { role: "user", content: e }, r = q.current.slice(-20).map((s) => ({
66
+ role: s.role,
67
+ content: s.content
68
68
  }));
69
- u((r) => [...r, l]), A(""), _(!0), u((r) => [...r, { role: "assistant", content: "" }]);
69
+ m((s) => [...s, n]), E(""), H(!0), m((s) => [...s, { role: "assistant", content: "" }]);
70
70
  try {
71
- const r = await fetch(`${R}/v1/assistant/ask`, {
71
+ const s = await fetch(`${P}/v1/assistant/ask`, {
72
72
  method: "POST",
73
73
  headers: { "Content-Type": "application/json" },
74
74
  body: JSON.stringify({
75
75
  question: e,
76
- brandSlug: j,
77
- productSlug: I,
78
- history: s
76
+ brandSlug: R,
77
+ productSlug: j,
78
+ history: r
79
79
  })
80
80
  });
81
- if (!r.ok) {
82
- const p = await r.json().catch(() => ({}));
81
+ if (!s.ok) {
82
+ const p = await s.json().catch(() => ({}));
83
83
  throw new Error(
84
- ((o = p == null ? void 0 : p.error) == null ? void 0 : o.message) || `Request failed (${r.status})`
84
+ ((l = p == null ? void 0 : p.error) == null ? void 0 : l.message) || `Request failed (${s.status})`
85
85
  );
86
86
  }
87
- if (!r.body) throw new Error("No response body");
88
- const n = r.body.getReader(), i = new TextDecoder();
89
- let f = "", C = "";
87
+ if (!s.body) throw new Error("No response body");
88
+ const o = s.body.getReader(), i = new TextDecoder();
89
+ let g = "", C = "";
90
90
  for (; ; ) {
91
- const { done: p, value: X } = await n.read();
91
+ const { done: p, value: Z } = await o.read();
92
92
  if (p) break;
93
- f += i.decode(X, { stream: !0 });
94
- const G = f.split(`
93
+ g += i.decode(Z, { stream: !0 });
94
+ const K = g.split(`
95
95
  `);
96
- f = G.pop() || "";
97
- for (const b of G)
96
+ g = K.pop() || "";
97
+ for (const b of K)
98
98
  if (b.trim() !== "") {
99
99
  if (b.trimStart().startsWith("event:"))
100
100
  C = b.trimStart().slice(6).trim();
101
101
  else if (b.trimStart().startsWith("data:") && C) {
102
- const P = b.trimStart().slice(5), Y = P.startsWith(" ") ? P.slice(1) : P;
103
- q(C, Y);
102
+ const L = b.trimStart().slice(5), Q = L.startsWith(" ") ? L.slice(1) : L;
103
+ F(C, Q);
104
104
  }
105
105
  }
106
106
  }
107
- } catch (r) {
108
- h(r.message || "Something went wrong"), u((n) => {
109
- const i = n[n.length - 1];
110
- return (i == null ? void 0 : i.role) === "assistant" && !i.content ? n.slice(0, -1) : n;
107
+ } catch (s) {
108
+ h(s.message || "Something went wrong"), m((o) => {
109
+ const i = o[o.length - 1];
110
+ return (i == null ? void 0 : i.role) === "assistant" && !i.content ? o.slice(0, -1) : o;
111
111
  });
112
112
  } finally {
113
- _(!1);
113
+ H(!1);
114
114
  }
115
115
  },
116
- [R, j, I, q]
116
+ [P, R, j, F]
117
117
  );
118
- v.current = T, S(() => {
118
+ S.current = T, x(() => {
119
119
  if (a)
120
- H(!0), requestAnimationFrame(() => {
120
+ W(!0), requestAnimationFrame(() => {
121
121
  requestAnimationFrame(() => {
122
- W(!0);
122
+ M(!0);
123
123
  });
124
124
  });
125
125
  else {
126
- W(!1);
126
+ M(!1);
127
127
  const e = setTimeout(() => {
128
- H(!1), u([]), A(""), h(null), E.current = !1;
128
+ W(!1), m([]), E(""), h(null), A.current = !1;
129
129
  }, 300);
130
130
  return () => clearTimeout(e);
131
131
  }
132
- }, [a]), S(() => {
133
- a && w && !E.current && (E.current = !0, w.trim() ? setTimeout(() => {
132
+ }, [a]), x(() => {
133
+ a && v && !A.current && (A.current = !0, v.trim() ? setTimeout(() => {
134
134
  var e;
135
- return (e = v.current) == null ? void 0 : e.call(v, w);
135
+ return (e = S.current) == null ? void 0 : e.call(S, v);
136
136
  }, 100) : setTimeout(() => {
137
137
  var e;
138
- return (e = D.current) == null ? void 0 : e.focus();
138
+ return (e = J.current) == null ? void 0 : e.focus();
139
139
  }, 350));
140
- }, [a, w]), S(() => {
140
+ }, [a, v]), x(() => {
141
141
  var e;
142
- (e = U.current) == null || e.scrollIntoView({ behavior: "smooth" });
143
- }, [d]), S(() => {
144
- const e = (l) => {
145
- l.key === "Escape" && a && y();
142
+ (e = D.current) == null || e.scrollIntoView({ behavior: "smooth" });
143
+ }, [u]), x(() => {
144
+ const e = (n) => {
145
+ n.key === "Escape" && a && w();
146
146
  };
147
147
  if (a)
148
148
  return document.addEventListener("keydown", e), () => document.removeEventListener("keydown", e);
149
- }, [a, y]);
150
- const V = (e) => {
149
+ }, [a, w]), x(() => {
150
+ const e = typeof window < "u" ? window.visualViewport : null;
151
+ if (!e || !a) return;
152
+ const n = () => {
153
+ const r = window.innerHeight - e.height;
154
+ z(r > 50 ? r : 0);
155
+ };
156
+ return e.addEventListener("resize", n), e.addEventListener("scroll", n), () => {
157
+ e.removeEventListener("resize", n), e.removeEventListener("scroll", n), z(0);
158
+ };
159
+ }, [a]);
160
+ const Y = (e) => {
151
161
  e.preventDefault(), N.trim() && T(N.trim());
152
162
  };
153
- if (!K) return null;
154
- const F = /* @__PURE__ */ c(
163
+ if (!O) return null;
164
+ const G = /* @__PURE__ */ c(
155
165
  "div",
156
166
  {
157
167
  className: k(
158
168
  "fixed inset-0 z-50 transition-opacity duration-300",
159
- M ? "opacity-100" : "opacity-0"
169
+ _ ? "opacity-100" : "opacity-0"
160
170
  ),
161
171
  children: [
162
172
  /* @__PURE__ */ t(
163
173
  "div",
164
174
  {
165
175
  className: "absolute inset-0 bg-black/40 backdrop-blur-sm",
166
- onClick: y
176
+ onClick: w
167
177
  }
168
178
  ),
169
179
  /* @__PURE__ */ c(
@@ -176,93 +186,94 @@ function he({
176
186
  // Desktop: left side drawer
177
187
  "sm:inset-y-0 sm:left-0 sm:right-auto sm:w-[420px] sm:max-w-full sm:rounded-t-none sm:rounded-r-2xl",
178
188
  // Animation
179
- M ? "translate-y-0 sm:translate-x-0" : "translate-y-full sm:translate-y-0 sm:-translate-x-full",
180
- z
189
+ _ ? "translate-y-0 sm:translate-x-0" : "translate-y-full sm:translate-y-0 sm:-translate-x-full",
190
+ B
181
191
  ),
192
+ style: U > 0 ? { bottom: `${U}px` } : void 0,
182
193
  children: [
183
194
  /* @__PURE__ */ c("div", { className: "flex items-center justify-between border-b border-gray-200 px-4 py-3 flex-shrink-0", children: [
184
195
  /* @__PURE__ */ c("div", { className: "flex items-center gap-2", children: [
185
- /* @__PURE__ */ t(Q, { className: "h-5 w-5 text-orange-500" }),
186
- /* @__PURE__ */ t("span", { className: "font-semibold text-gray-900", children: L }),
196
+ /* @__PURE__ */ t(te, { className: "h-5 w-5 text-orange-500" }),
197
+ /* @__PURE__ */ t("span", { className: "font-semibold text-gray-900", children: I }),
187
198
  /* @__PURE__ */ t("span", { className: "text-xs text-gray-400 bg-gray-100 rounded px-1.5 py-0.5", children: "beta" })
188
199
  ] }),
189
200
  /* @__PURE__ */ t(
190
201
  "button",
191
202
  {
192
203
  type: "button",
193
- onClick: y,
204
+ onClick: w,
194
205
  className: "p-2 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded-lg transition-colors",
195
206
  "aria-label": "Close",
196
- children: /* @__PURE__ */ t(ee, { className: "h-5 w-5" })
207
+ children: /* @__PURE__ */ t(re, { className: "h-5 w-5" })
197
208
  }
198
209
  )
199
210
  ] }),
200
211
  /* @__PURE__ */ c("div", { className: "flex-1 overflow-y-auto p-4 space-y-4 min-h-0", children: [
201
- d.length === 0 && !m && /* @__PURE__ */ t("div", { className: "text-center text-gray-400 text-sm py-8", children: "Ask me anything about our products!" }),
202
- d.map((e, l) => /* @__PURE__ */ t("div", { children: e.role === "user" ? /* @__PURE__ */ t("div", { className: "flex justify-end", children: /* @__PURE__ */ t("div", { className: "bg-gray-800 text-white rounded-2xl rounded-br-sm px-4 py-2 max-w-[80%] text-sm", children: e.content }) }) : /* @__PURE__ */ c("div", { className: "space-y-3", children: [
212
+ u.length === 0 && !f && /* @__PURE__ */ t("div", { className: "text-center text-gray-400 text-sm py-8", children: "Ask me anything about our products!" }),
213
+ u.map((e, n) => /* @__PURE__ */ t("div", { children: e.role === "user" ? /* @__PURE__ */ t("div", { className: "flex justify-end", children: /* @__PURE__ */ t("div", { className: "bg-gray-800 text-white rounded-2xl rounded-br-sm px-4 py-2 max-w-[80%] text-sm", children: e.content }) }) : /* @__PURE__ */ c("div", { className: "space-y-3", children: [
203
214
  /* @__PURE__ */ c("div", { className: "text-sm text-gray-800 leading-relaxed", children: [
204
- /* @__PURE__ */ t("span", { dangerouslySetInnerHTML: { __html: le(e.content) } }),
205
- m && l === d.length - 1 && /* @__PURE__ */ t("span", { className: "inline-block w-1.5 h-4 bg-gray-400 animate-pulse ml-0.5 align-text-bottom" })
215
+ /* @__PURE__ */ t("span", { dangerouslySetInnerHTML: { __html: ce(e.content) } }),
216
+ f && n === u.length - 1 && /* @__PURE__ */ t("span", { className: "inline-block w-1.5 h-4 bg-gray-400 animate-pulse ml-0.5 align-text-bottom" })
206
217
  ] }),
207
- e.products && e.products.length > 0 && /* @__PURE__ */ t("div", { className: "space-y-2", children: e.products.map((s) => /* @__PURE__ */ c(
218
+ e.products && e.products.length > 0 && /* @__PURE__ */ t("div", { className: "space-y-2", children: e.products.map((r) => /* @__PURE__ */ c(
208
219
  "a",
209
220
  {
210
- href: `/product/${s.slug}`,
221
+ href: `/product/${r.slug}`,
211
222
  className: "flex items-center gap-3 w-full rounded-xl border border-gray-200 p-2 hover:bg-gray-50 transition-colors text-left no-underline",
212
223
  children: [
213
- s.thumbnailUrl ? /* @__PURE__ */ t(
224
+ r.thumbnailUrl ? /* @__PURE__ */ t(
214
225
  "img",
215
226
  {
216
- src: s.thumbnailUrl,
217
- alt: s.name,
227
+ src: r.thumbnailUrl,
228
+ alt: r.name,
218
229
  className: "h-16 w-16 rounded-lg object-cover flex-shrink-0"
219
230
  }
220
231
  ) : /* @__PURE__ */ t("div", { className: "h-16 w-16 rounded-lg bg-gray-100 flex-shrink-0" }),
221
232
  /* @__PURE__ */ c("div", { className: "min-w-0", children: [
222
- /* @__PURE__ */ t("p", { className: "text-sm font-medium text-gray-900 line-clamp-2", children: s.name }),
223
- /* @__PURE__ */ t("p", { className: "text-sm font-semibold text-blue-600", children: ne(s.price) })
233
+ /* @__PURE__ */ t("p", { className: "text-sm font-medium text-gray-900 line-clamp-2", children: r.name }),
234
+ /* @__PURE__ */ t("p", { className: "text-sm font-semibold text-blue-600", children: oe(r.price) })
224
235
  ] })
225
236
  ]
226
237
  },
227
- s.slug
238
+ r.slug
228
239
  )) }),
229
240
  e.whatsapp && /* @__PURE__ */ c(
230
241
  "a",
231
242
  {
232
- href: ae,
243
+ href: le,
233
244
  target: "_blank",
234
245
  rel: "noopener noreferrer",
235
246
  className: "inline-flex items-center gap-2 rounded-full bg-green-500 px-4 py-2 text-sm font-medium text-white hover:bg-green-600 transition-colors no-underline",
236
247
  children: [
237
- /* @__PURE__ */ t(te, { className: "h-4 w-4" }),
248
+ /* @__PURE__ */ t(se, { className: "h-4 w-4" }),
238
249
  "Chat on WhatsApp"
239
250
  ]
240
251
  }
241
252
  ),
242
- e.suggestions && e.suggestions.length > 0 && !m && l === d.length - 1 && /* @__PURE__ */ t("div", { className: "flex flex-wrap gap-2", children: e.suggestions.map((s, o) => /* @__PURE__ */ t(
253
+ e.suggestions && e.suggestions.length > 0 && !f && n === u.length - 1 && /* @__PURE__ */ t("div", { className: "flex flex-wrap gap-2", children: e.suggestions.map((r, l) => /* @__PURE__ */ t(
243
254
  "button",
244
255
  {
245
256
  type: "button",
246
- onClick: () => T(s),
257
+ onClick: () => T(r),
247
258
  className: "rounded-full border border-gray-200 bg-gray-50 px-3 py-1.5 text-xs text-gray-700 hover:bg-gray-100 hover:border-gray-300 transition-colors text-left",
248
- children: s
259
+ children: r
249
260
  },
250
- o
261
+ l
251
262
  )) })
252
- ] }) }, l)),
263
+ ] }) }, n)),
253
264
  $ && /* @__PURE__ */ t("div", { className: "rounded-lg bg-red-50 border border-red-200 p-3 text-sm text-red-700", children: $ }),
254
- /* @__PURE__ */ t("div", { ref: U })
265
+ /* @__PURE__ */ t("div", { ref: D })
255
266
  ] }),
256
- /* @__PURE__ */ t("div", { className: "border-t border-gray-200 p-3 flex-shrink-0", children: /* @__PURE__ */ c("form", { onSubmit: V, className: "flex items-center gap-2", children: [
267
+ /* @__PURE__ */ t("div", { className: "border-t border-gray-200 p-3 flex-shrink-0", children: /* @__PURE__ */ c("form", { onSubmit: Y, className: "flex items-center gap-2", children: [
257
268
  /* @__PURE__ */ t(
258
269
  "input",
259
270
  {
260
- ref: D,
271
+ ref: J,
261
272
  type: "text",
262
273
  value: N,
263
- onChange: (e) => A(e.target.value),
264
- placeholder: `Ask ${L} a question`,
265
- disabled: m,
274
+ onChange: (e) => E(e.target.value),
275
+ placeholder: `Ask ${I} a question`,
276
+ disabled: f,
266
277
  className: k(
267
278
  "flex-1 rounded-full border border-gray-300 px-4 py-2.5 text-base",
268
279
  "focus:border-blue-400 focus:outline-none focus:ring-2 focus:ring-blue-400/30",
@@ -274,14 +285,14 @@ function he({
274
285
  "button",
275
286
  {
276
287
  type: "submit",
277
- disabled: !N.trim() || m,
288
+ disabled: !N.trim() || f,
278
289
  className: k(
279
290
  "flex h-10 w-10 items-center justify-center rounded-full",
280
291
  "bg-gray-800 text-white",
281
292
  "hover:bg-gray-700 transition-colors",
282
293
  "disabled:opacity-40 disabled:cursor-not-allowed"
283
294
  ),
284
- children: m ? /* @__PURE__ */ t(re, { className: "h-4 w-4 animate-spin" }) : /* @__PURE__ */ t(se, { className: "h-4 w-4" })
295
+ children: f ? /* @__PURE__ */ t(ne, { className: "h-4 w-4 animate-spin" }) : /* @__PURE__ */ t(ae, { className: "h-4 w-4" })
285
296
  }
286
297
  )
287
298
  ] }) })
@@ -291,8 +302,8 @@ function he({
291
302
  ]
292
303
  }
293
304
  );
294
- return B ? F : Z(F, document.body);
305
+ return X ? G : ee(G, document.body);
295
306
  }
296
307
  export {
297
- he as AssistantDrawer
308
+ be as AssistantDrawer
298
309
  };
package/dist/index220.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  'use client';
2
- import { __module as b } from "./index265.mjs";
3
- import S from "./index266.mjs";
2
+ import { __module as b } from "./index263.mjs";
3
+ import S from "./index264.mjs";
4
4
  var _;
5
5
  function $() {
6
6
  return _ ? b.exports : (_ = 1, (() => {
package/dist/index222.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  'use client';
2
- import { __exports as e } from "./index263.mjs";
2
+ import { __exports as e } from "./index265.mjs";
3
3
  /**
4
4
  * @license React
5
5
  * react-is.production.js
package/dist/index223.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  'use client';
2
- import { __exports as e } from "./index264.mjs";
2
+ import { __exports as e } from "./index266.mjs";
3
3
  /**
4
4
  * @license React
5
5
  * react-is.development.js
package/dist/index224.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  'use client';
2
- import p from "./index97.mjs";
2
+ import p from "./index106.mjs";
3
3
  function i(n) {
4
4
  const t = {
5
5
  "!": "%21",
package/dist/index225.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  'use client';
2
- import i from "./index87.mjs";
3
- import m from "./index91.mjs";
4
- import s from "./index101.mjs";
2
+ import i from "./index96.mjs";
3
+ import m from "./index100.mjs";
4
+ import s from "./index110.mjs";
5
5
  function h(f, t) {
6
6
  const o = this || m, r = t || o, n = s.from(r.headers);
7
7
  let a = r.data;
package/dist/index228.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  'use client';
2
- import o from "./index267.mjs";
3
- import r from "./index268.mjs";
4
- import t from "./index269.mjs";
2
+ import o from "./index276.mjs";
3
+ import r from "./index277.mjs";
4
+ import t from "./index278.mjs";
5
5
  const l = {
6
6
  isBrowser: !0,
7
7
  classes: {
package/dist/index230.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  'use client';
2
- import a from "./index98.mjs";
2
+ import a from "./index107.mjs";
3
3
  function E(i, f, t) {
4
4
  const u = t.config.validateStatus;
5
5
  !t.status || !u || u(t.status) ? i(t) : f(new a(
package/dist/index232.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  'use client';
2
- import i from "./index270.mjs";
3
- import m from "./index271.mjs";
4
- import f from "./index87.mjs";
2
+ import i from "./index279.mjs";
3
+ import m from "./index280.mjs";
4
+ import f from "./index96.mjs";
5
5
  const h = (t, o, a = 3) => {
6
6
  let r = 0;
7
7
  const c = i(50, 250);
package/dist/index233.mjs CHANGED
@@ -1,11 +1,11 @@
1
1
  'use client';
2
2
  import n from "./index160.mjs";
3
- import m from "./index87.mjs";
4
- import c from "./index272.mjs";
5
- import h from "./index273.mjs";
3
+ import m from "./index96.mjs";
4
+ import c from "./index281.mjs";
5
+ import h from "./index282.mjs";
6
6
  import w from "./index156.mjs";
7
- import b from "./index90.mjs";
8
- import C from "./index101.mjs";
7
+ import b from "./index99.mjs";
8
+ import C from "./index110.mjs";
9
9
  import g from "./index153.mjs";
10
10
  const E = (a) => {
11
11
  const e = b({}, a);
package/dist/index234.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  'use client';
2
- import a from "./index93.mjs";
3
- import s from "./index98.mjs";
4
- import m from "./index87.mjs";
2
+ import a from "./index102.mjs";
3
+ import s from "./index107.mjs";
4
+ import m from "./index96.mjs";
5
5
  const h = (e, t) => {
6
6
  const { length: l } = e = e ? e.filter(Boolean) : [];
7
7
  if (t || l) {
package/dist/index236.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  'use client';
2
- var t = {};
2
+ var e = {};
3
3
  export {
4
- t as __exports
4
+ e as __exports
5
5
  };
package/dist/index237.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  'use client';
2
- var e = { exports: {} };
2
+ var r = { exports: {} };
3
3
  export {
4
- e as __module
4
+ r as __module
5
5
  };
package/dist/index239.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  'use client';
2
- var e = {};
2
+ var t = {};
3
3
  export {
4
- e as __exports
4
+ t as __exports
5
5
  };
package/dist/index240.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/index242.mjs CHANGED
@@ -1,40 +1,5 @@
1
1
  'use client';
2
- import { __exports as n } from "./index274.mjs";
3
- import { __require as l } from "./index275.mjs";
4
- import { __require as d } from "./index276.mjs";
5
- var t;
6
- function R() {
7
- return t ? n : (t = 1, function(i) {
8
- Object.defineProperty(i, "__esModule", {
9
- value: !0
10
- });
11
- function o(u, e) {
12
- for (var r in e) Object.defineProperty(u, r, {
13
- enumerable: !0,
14
- get: e[r]
15
- });
16
- }
17
- o(i, {
18
- normalizeAppPath: function() {
19
- return a;
20
- },
21
- normalizeRscURL: function() {
22
- return p;
23
- }
24
- });
25
- const s = l(), f = d();
26
- function a(u) {
27
- return (0, s.ensureLeadingSlash)(u.split("/").reduce((e, r, c, _) => !r || (0, f.isGroupSegment)(r) || r[0] === "@" || (r === "page" || r === "route") && c === _.length - 1 ? e : e + "/" + r, ""));
28
- }
29
- function p(u) {
30
- return u.replace(
31
- /\.rsc($|\?)/,
32
- // $1 ensures `?` is preserved
33
- "$1"
34
- );
35
- }
36
- }(n), n);
37
- }
2
+ var e = {};
38
3
  export {
39
- R as __require
4
+ e as __exports
40
5
  };