@maebgch/rcs-emulator 0.1.11 → 0.1.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,109 +1,109 @@
1
- import { jsx as e, jsxs as l } from "react/jsx-runtime";
2
- import { createContext as te, useContext as ne, useReducer as re, useRef as W, useEffect as S, useCallback as M, useState as z, memo as g, useMemo as V } from "react";
3
- function q(r) {
4
- return "reply" in r;
1
+ import { jsx as e, jsxs as n } from "react/jsx-runtime";
2
+ import { createContext as re, useContext as te, useReducer as se, useRef as W, useEffect as j, useCallback as $, useState as A, memo as p, useMemo as V } from "react";
3
+ function Y(s) {
4
+ return "reply" in s;
5
5
  }
6
- function $(r) {
7
- return "action" in r;
6
+ function I(s) {
7
+ return "action" in s;
8
8
  }
9
- function Je(r) {
10
- if (!$(r)) return !1;
11
- const { urlAction: t } = r.action;
12
- return t?.openUrl?.application === "WEBVIEW";
9
+ function qe(s) {
10
+ if (!I(s)) return !1;
11
+ const { urlAction: r } = s.action;
12
+ return r?.openUrl?.application === "WEBVIEW";
13
13
  }
14
- function oe(r) {
15
- const { urlAction: t } = r.action;
16
- return t?.openUrl?.application === "WEBVIEW" ? t.openUrl : null;
14
+ function oe(s) {
15
+ const { urlAction: r } = s.action;
16
+ return r?.openUrl?.application === "WEBVIEW" ? r.openUrl : null;
17
17
  }
18
- const se = {
18
+ const ae = {
19
19
  name: "Business",
20
20
  verified: !1
21
- }, ie = {
21
+ }, le = {
22
22
  currentMessageId: null,
23
23
  chatHistory: [],
24
24
  isTyping: !1,
25
25
  error: null
26
- }, Q = te(null);
27
- function X({
28
- children: r,
29
- theme: t,
30
- device: n,
26
+ }, Q = re(null);
27
+ function Z({
28
+ children: s,
29
+ theme: r,
30
+ device: t,
31
31
  businessInfo: o,
32
- state: s,
33
- showSuggestions: a,
34
- isProfileOpen: i,
32
+ state: a,
33
+ showSuggestions: c,
34
+ isProfileOpen: l,
35
35
  toggleProfile: u,
36
- onReply: c,
37
- onAction: d,
38
- webView: m,
36
+ onReply: m,
37
+ onAction: i,
38
+ webView: h,
39
39
  openWebView: f,
40
40
  closeWebView: v
41
41
  }) {
42
- const x = {
43
- theme: t,
44
- device: n,
45
- businessInfo: { ...se, ...o },
46
- state: { ...ie, ...s },
47
- showSuggestions: a,
48
- isProfileOpen: i,
42
+ const b = {
43
+ theme: r,
44
+ device: t,
45
+ businessInfo: { ...ae, ...o },
46
+ state: { ...le, ...a },
47
+ showSuggestions: c,
48
+ isProfileOpen: l,
49
49
  toggleProfile: u,
50
- handleReply: c,
51
- handleAction: d,
52
- webView: m,
50
+ handleReply: m,
51
+ handleAction: i,
52
+ webView: h,
53
53
  openWebView: f,
54
54
  closeWebView: v
55
55
  };
56
- return /* @__PURE__ */ e(Q.Provider, { value: x, children: r });
56
+ return /* @__PURE__ */ e(Q.Provider, { value: b, children: s });
57
57
  }
58
- function N() {
59
- const r = ne(Q);
60
- if (!r)
58
+ function k() {
59
+ const s = te(Q);
60
+ if (!s)
61
61
  throw new Error("useEmulator must be used within an EmulatorProvider");
62
- return r;
62
+ return s;
63
63
  }
64
- function Z(r) {
65
- const t = Object.values(r.messages);
66
- return t.find((n) => n.is_first) || t[0] || null;
64
+ function K(s) {
65
+ const r = Object.values(s.messages);
66
+ return r.find((t) => t.is_first) || r[0] || null;
67
67
  }
68
- function R(r, t) {
69
- return r.messages[t] || null;
68
+ function R(s, r) {
69
+ return s.messages[r] || null;
70
70
  }
71
- function O(r, t) {
72
- const n = r.responses?.keyword?.keyword_response?.choices;
73
- return n && n[t]?.next_message || null;
71
+ function O(s, r) {
72
+ const t = s.responses?.keyword?.keyword_response?.choices;
73
+ return t && t[r]?.next_message || null;
74
74
  }
75
- function H(r, t) {
76
- const n = r.parts, o = ae(n), s = ce(n);
75
+ function H(s, r) {
76
+ const t = s.parts, o = ce(t), a = ie(t);
77
77
  return {
78
- id: `${r.id}-${t}-${Date.now()}`,
78
+ id: `${s.id}-${r}-${Date.now()}`,
79
79
  sender: "business",
80
80
  content: o,
81
81
  timestamp: Date.now(),
82
- suggestions: s
82
+ suggestions: a
83
83
  };
84
84
  }
85
- function ae(r) {
86
- for (const t of r) {
87
- const n = t.RCSMessage;
88
- if (n.textMessage)
85
+ function ce(s) {
86
+ for (const r of s) {
87
+ const t = r.RCSMessage;
88
+ if (t.textMessage)
89
89
  return {
90
90
  type: "text",
91
- text: n.textMessage
91
+ text: t.textMessage
92
92
  };
93
- const o = n.richcardMessage?.message?.generalPurposeCard;
93
+ const o = t.richcardMessage?.message?.generalPurposeCard;
94
94
  if (o)
95
95
  return {
96
96
  type: "richcard",
97
97
  card: P(o.content, o.layout)
98
98
  };
99
- const s = n.richcardMessage?.message?.generalPurposeCardCarousel;
100
- if (s)
99
+ const a = t.richcardMessage?.message?.generalPurposeCardCarousel;
100
+ if (a)
101
101
  return {
102
102
  type: "carousel",
103
- cards: s.content.map(
104
- (a) => P(a, {
103
+ cards: a.content.map(
104
+ (c) => P(c, {
105
105
  cardOrientation: "VERTICAL",
106
- cardWidth: s.layout.cardWidth
106
+ cardWidth: a.layout.cardWidth
107
107
  })
108
108
  )
109
109
  };
@@ -113,36 +113,36 @@ function ae(r) {
113
113
  text: "[Unsupported message type]"
114
114
  };
115
115
  }
116
- function P(r, t) {
117
- const n = () => {
118
- if (r.media) {
119
- if (r.media.mediaUrl) return r.media.mediaUrl;
120
- if (r.media.contentInfo?.fileUrl) return r.media.contentInfo.fileUrl;
116
+ function P(s, r) {
117
+ const t = () => {
118
+ if (s.media) {
119
+ if (s.media.mediaUrl) return s.media.mediaUrl;
120
+ if (s.media.contentInfo?.fileUrl) return s.media.contentInfo.fileUrl;
121
121
  }
122
122
  }, o = () => {
123
- if (r.media) {
124
- if (r.media.thumbnailUri) return r.media.thumbnailUri;
125
- if (r.media.contentInfo?.thumbnailUrl) return r.media.contentInfo.thumbnailUrl;
123
+ if (s.media) {
124
+ if (s.media.thumbnailUri) return s.media.thumbnailUri;
125
+ if (s.media.contentInfo?.thumbnailUrl) return s.media.contentInfo.thumbnailUrl;
126
126
  }
127
- }, s = n();
127
+ }, a = t();
128
128
  return {
129
- title: r.title,
130
- description: r.description,
131
- media: s ? {
132
- url: s,
133
- height: le(r.media?.height || "MEDIUM_HEIGHT"),
129
+ title: s.title,
130
+ description: s.description,
131
+ media: a ? {
132
+ url: a,
133
+ height: ne(s.media?.height || "MEDIUM_HEIGHT"),
134
134
  thumbnailUrl: o()
135
135
  } : void 0,
136
- suggestions: r.suggestions,
136
+ suggestions: s.suggestions,
137
137
  layout: {
138
- orientation: t.cardOrientation === "HORIZONTAL" ? "horizontal" : "vertical",
139
- width: t.cardWidth === "SMALL_WIDTH" ? "small" : "medium",
140
- imageAlignment: t.imageAlignment === "RIGHT" ? "right" : "left"
138
+ orientation: r.cardOrientation === "HORIZONTAL" ? "horizontal" : "vertical",
139
+ width: r.cardWidth === "SMALL_WIDTH" ? "small" : "medium",
140
+ imageAlignment: r.imageAlignment === "RIGHT" ? "right" : "left"
141
141
  }
142
142
  };
143
143
  }
144
- function le(r) {
145
- switch (r) {
144
+ function ne(s) {
145
+ switch (s) {
146
146
  case "SHORT_HEIGHT":
147
147
  return "short";
148
148
  case "TALL_HEIGHT":
@@ -151,488 +151,494 @@ function le(r) {
151
151
  return "medium";
152
152
  }
153
153
  }
154
- function ce(r) {
155
- const t = [];
156
- for (const n of r) {
157
- const o = n.RCSMessage;
158
- o.suggestedChipList?.suggestions && t.push(...o.suggestedChipList.suggestions);
154
+ function ie(s) {
155
+ const r = [];
156
+ for (const t of s) {
157
+ const o = t.RCSMessage;
158
+ o.suggestedChipList?.suggestions && r.push(...o.suggestedChipList.suggestions);
159
159
  }
160
- return t;
160
+ return r;
161
161
  }
162
- function de(r) {
162
+ function ue(s) {
163
163
  return {
164
164
  id: `user-${Date.now()}`,
165
165
  sender: "user",
166
166
  content: {
167
167
  type: "userReply",
168
- text: r
168
+ text: s
169
169
  },
170
170
  timestamp: Date.now()
171
171
  };
172
172
  }
173
- function ue(r) {
174
- if (!r || typeof r != "object") return !1;
175
- const t = r;
176
- if (typeof t.name != "string" || !t.messages || typeof t.messages != "object") return !1;
177
- const n = Object.values(t.messages);
178
- if (n.length === 0) return !1;
179
- for (const o of n) {
173
+ function me(s) {
174
+ if (!s || typeof s != "object") return !1;
175
+ const r = s;
176
+ if (typeof r.name != "string" || !r.messages || typeof r.messages != "object") return !1;
177
+ const t = Object.values(r.messages);
178
+ if (t.length === 0) return !1;
179
+ for (const o of t) {
180
180
  if (!o || typeof o != "object") return !1;
181
- const s = o;
182
- if (typeof s.id != "string" || !Array.isArray(s.parts)) return !1;
181
+ const a = o;
182
+ if (typeof a.id != "string" || !Array.isArray(a.parts)) return !1;
183
183
  }
184
184
  return !0;
185
185
  }
186
- function he(r) {
187
- const t = Z(r);
188
- if (!t || !t.parts.length) return "New message";
189
- const o = t.parts[0].RCSMessage;
186
+ function de(s) {
187
+ const r = K(s);
188
+ if (!r || !r.parts.length) return "New message";
189
+ const o = r.parts[0].RCSMessage;
190
190
  if (o.textMessage)
191
191
  return o.textMessage.slice(0, 50) + (o.textMessage.length > 50 ? "..." : "");
192
- const s = o.richcardMessage?.message?.generalPurposeCard;
193
- if (s?.content.title)
194
- return s.content.title;
195
- const a = o.richcardMessage?.message?.generalPurposeCardCarousel;
196
- return a?.content[0]?.title ? a.content[0].title : "New message";
192
+ const a = o.richcardMessage?.message?.generalPurposeCard;
193
+ if (a?.content.title)
194
+ return a.content.title;
195
+ const c = o.richcardMessage?.message?.generalPurposeCardCarousel;
196
+ return c?.content[0]?.title ? c.content[0].title : "New message";
197
197
  }
198
- const K = {
198
+ const X = {
199
199
  currentMessageId: null,
200
200
  chatHistory: [],
201
201
  isTyping: !1,
202
202
  error: null
203
203
  };
204
- function me(r, t) {
205
- switch (t.type) {
204
+ function he(s, r) {
205
+ switch (r.type) {
206
206
  case "INIT":
207
207
  return {
208
- ...r,
209
- currentMessageId: t.messageId,
208
+ ...s,
209
+ currentMessageId: r.messageId,
210
210
  error: null
211
211
  };
212
212
  case "ADD_BUSINESS_MESSAGE":
213
213
  return {
214
- ...r,
215
- chatHistory: [...r.chatHistory, t.message],
214
+ ...s,
215
+ chatHistory: [...s.chatHistory, r.message],
216
216
  isTyping: !1
217
217
  };
218
218
  case "ADD_USER_REPLY": {
219
- const n = de(t.text), o = r.chatHistory.map(
220
- (s, a) => a === r.chatHistory.length - 1 ? { ...s, suggestions: void 0 } : s
219
+ const t = ue(r.text), o = s.chatHistory.map(
220
+ (a, c) => c === s.chatHistory.length - 1 ? { ...a, suggestions: void 0 } : a
221
221
  );
222
222
  return {
223
- ...r,
224
- chatHistory: [...o, n]
223
+ ...s,
224
+ chatHistory: [...o, t]
225
225
  };
226
226
  }
227
227
  case "SET_TYPING":
228
228
  return {
229
- ...r,
230
- isTyping: t.isTyping
229
+ ...s,
230
+ isTyping: r.isTyping
231
231
  };
232
232
  case "NAVIGATE_TO":
233
233
  return {
234
- ...r,
235
- currentMessageId: t.messageId
234
+ ...s,
235
+ currentMessageId: r.messageId
236
236
  };
237
237
  case "SET_ERROR":
238
238
  return {
239
- ...r,
240
- error: t.error,
239
+ ...s,
240
+ error: r.error,
241
241
  isTyping: !1
242
242
  };
243
243
  case "RESET":
244
- return K;
244
+ return X;
245
245
  default:
246
- return r;
246
+ return s;
247
247
  }
248
248
  }
249
249
  function fe({
250
- flow: r,
251
- onUserReply: t,
252
- typingDelay: n = 800
250
+ flow: s,
251
+ onUserReply: r,
252
+ typingDelay: t = 800
253
253
  }) {
254
- const [o, s] = re(me, K), a = W(0), i = W(!1);
255
- S(() => {
256
- if (i.current) return;
257
- i.current = !0;
258
- const m = Z(r);
259
- if (!m) {
260
- s({
254
+ const [o, a] = se(he, X), c = W(0), l = W(!1);
255
+ j(() => {
256
+ if (l.current) return;
257
+ l.current = !0;
258
+ const h = K(s);
259
+ if (!h) {
260
+ a({
261
261
  type: "SET_ERROR",
262
262
  error: "No first message found in conversation flow"
263
263
  });
264
264
  return;
265
265
  }
266
- s({ type: "INIT", messageId: m.id });
266
+ a({ type: "INIT", messageId: h.id });
267
267
  const f = H(
268
- m,
269
- a.current++
268
+ h,
269
+ c.current++
270
270
  );
271
- s({ type: "ADD_BUSINESS_MESSAGE", message: f });
272
- }, [r]);
273
- const u = M(
274
- (m) => {
275
- if (!q(m)) return;
276
- const { displayText: f, postback: v } = m.reply, x = v.data;
277
- s({ type: "ADD_USER_REPLY", text: f, postbackData: x });
278
- const L = {
271
+ a({ type: "ADD_BUSINESS_MESSAGE", message: f });
272
+ }, [s]);
273
+ const u = $(
274
+ (h) => {
275
+ if (!Y(h)) return;
276
+ const { displayText: f, postback: v } = h.reply, b = v.data;
277
+ a({ type: "ADD_USER_REPLY", text: f, postbackData: b });
278
+ const N = {
279
279
  type: "reply",
280
- postbackData: x,
280
+ postbackData: b,
281
281
  displayText: f,
282
282
  timestamp: Date.now()
283
283
  };
284
- t(L);
285
- const b = o.currentMessageId ? R(r, o.currentMessageId) : null;
286
- if (!b) {
287
- s({ type: "SET_ERROR", error: "Current message not found" });
284
+ r(N);
285
+ const y = o.currentMessageId ? R(s, o.currentMessageId) : null;
286
+ if (!y) {
287
+ a({ type: "SET_ERROR", error: "Current message not found" });
288
288
  return;
289
289
  }
290
- const p = O(b, x);
291
- if (!p)
290
+ const w = O(y, b);
291
+ if (!w)
292
292
  return;
293
- const y = R(r, p);
294
- if (!y) {
295
- s({
293
+ const g = R(s, w);
294
+ if (!g) {
295
+ a({
296
296
  type: "SET_ERROR",
297
- error: `Next message "${p}" not found`
297
+ error: `Next message "${w}" not found`
298
298
  });
299
299
  return;
300
300
  }
301
- s({ type: "SET_TYPING", isTyping: !0 }), s({ type: "NAVIGATE_TO", messageId: p }), setTimeout(() => {
302
- const h = H(
303
- y,
304
- a.current++
301
+ a({ type: "SET_TYPING", isTyping: !0 }), a({ type: "NAVIGATE_TO", messageId: w }), setTimeout(() => {
302
+ const d = H(
303
+ g,
304
+ c.current++
305
305
  );
306
- s({ type: "ADD_BUSINESS_MESSAGE", message: h });
307
- }, n);
306
+ a({ type: "ADD_BUSINESS_MESSAGE", message: d });
307
+ }, t);
308
308
  },
309
- [r, o.currentMessageId, t, n]
310
- ), c = M(
311
- (m) => {
312
- if (!$(m)) return;
309
+ [s, o.currentMessageId, r, t]
310
+ ), m = $(
311
+ (h) => {
312
+ if (!I(h)) return;
313
313
  const {
314
314
  displayText: f,
315
315
  postback: v,
316
- openUrlAction: x,
317
- dialAction: L,
318
- dialerAction: b,
319
- mapAction: p,
320
- viewLocationAction: y
321
- } = m.action, h = v.data, w = L?.phoneNumber || b?.dialPhoneNumber?.phoneNumber, C = p?.showLocation?.location || y?.latLong;
322
- let I;
323
- x ? I = { type: "openUrl", url: x.url } : w ? I = { type: "dial", phoneNumber: w } : C && (I = {
316
+ openUrlAction: b,
317
+ dialAction: N,
318
+ dialerAction: y,
319
+ mapAction: w,
320
+ viewLocationAction: g
321
+ } = h.action, d = v.data, x = N?.phoneNumber || y?.dialPhoneNumber?.phoneNumber, L = w?.showLocation?.location || g?.latLong;
322
+ let z;
323
+ b ? z = { type: "openUrl", url: b.url } : x ? z = { type: "dial", phoneNumber: x } : L && (z = {
324
324
  type: "viewLocation",
325
- latitude: C.latitude,
326
- longitude: C.longitude,
327
- query: y?.query
325
+ latitude: L.latitude,
326
+ longitude: L.longitude,
327
+ query: g?.query
328
328
  });
329
- const k = {
329
+ const C = {
330
330
  type: "action",
331
- postbackData: h,
331
+ postbackData: d,
332
332
  displayText: f,
333
333
  timestamp: Date.now(),
334
- actionData: I
334
+ actionData: z
335
335
  };
336
- if (t(k), x)
337
- window.open(x.url, "_blank", "noopener,noreferrer");
338
- else if (w)
339
- window.location.href = `tel:${w}`;
340
- else if (C) {
341
- const T = p?.showLocation?.location?.label || y?.label || "", B = `https://www.google.com/maps/search/?api=1&query=${C.latitude},${C.longitude}${T ? `&query_place_id=${encodeURIComponent(T)}` : ""}`;
342
- window.open(B, "_blank", "noopener,noreferrer");
336
+ if (r(C), b)
337
+ window.open(b.url, "_blank", "noopener,noreferrer");
338
+ else if (x)
339
+ window.location.href = `tel:${x}`;
340
+ else if (L) {
341
+ const M = w?.showLocation?.location?.label || g?.label || "", S = `https://www.google.com/maps/search/?api=1&query=${L.latitude},${L.longitude}${M ? `&query_place_id=${encodeURIComponent(M)}` : ""}`;
342
+ window.open(S, "_blank", "noopener,noreferrer");
343
343
  }
344
- const A = o.currentMessageId ? R(r, o.currentMessageId) : null;
345
- if (A) {
346
- const T = O(A, h);
347
- if (T) {
348
- const B = R(r, T);
349
- B && (s({
344
+ const T = o.currentMessageId ? R(s, o.currentMessageId) : null;
345
+ if (T) {
346
+ const M = O(T, d);
347
+ if (M) {
348
+ const S = R(s, M);
349
+ S && (a({
350
350
  type: "ADD_USER_REPLY",
351
351
  text: f,
352
- postbackData: h
353
- }), s({ type: "SET_TYPING", isTyping: !0 }), s({ type: "NAVIGATE_TO", messageId: T }), setTimeout(() => {
352
+ postbackData: d
353
+ }), a({ type: "SET_TYPING", isTyping: !0 }), a({ type: "NAVIGATE_TO", messageId: M }), setTimeout(() => {
354
354
  const ee = H(
355
- B,
356
- a.current++
355
+ S,
356
+ c.current++
357
357
  );
358
- s({ type: "ADD_BUSINESS_MESSAGE", message: ee });
359
- }, n));
358
+ a({ type: "ADD_BUSINESS_MESSAGE", message: ee });
359
+ }, t));
360
360
  }
361
361
  }
362
362
  },
363
- [r, o.currentMessageId, t, n]
364
- ), d = M(() => {
365
- i.current = !1, a.current = 0, s({ type: "RESET" });
363
+ [s, o.currentMessageId, r, t]
364
+ ), i = $(() => {
365
+ l.current = !1, c.current = 0, a({ type: "RESET" });
366
366
  }, []);
367
367
  return {
368
368
  state: o,
369
369
  handleReply: u,
370
- handleAction: c,
371
- reset: d
370
+ handleAction: m,
371
+ reset: i
372
372
  };
373
373
  }
374
- function ge(r) {
375
- const [t, n] = z(null), [o, s] = z(!1), [a, i] = z(null), u = M(async () => {
376
- if (!r) {
377
- n(null), i(null);
374
+ function pe(s) {
375
+ const [r, t] = A(null), [o, a] = A(!1), [c, l] = A(null), u = $(async () => {
376
+ if (!s) {
377
+ t(null), l(null);
378
378
  return;
379
379
  }
380
- s(!0), i(null);
380
+ a(!0), l(null);
381
381
  try {
382
- const c = await fetch(r, {
382
+ const m = await fetch(s, {
383
383
  method: "GET",
384
384
  headers: {
385
385
  Accept: "application/json"
386
386
  }
387
387
  });
388
- if (!c.ok)
389
- throw new Error(`HTTP ${c.status}: ${c.statusText}`);
390
- const d = await c.json();
391
- if (!d || typeof d != "object")
388
+ if (!m.ok)
389
+ throw new Error(`HTTP ${m.status}: ${m.statusText}`);
390
+ const i = await m.json();
391
+ if (!i || typeof i != "object")
392
392
  throw new Error("Invalid JSON: Expected an object");
393
- if (!d.messages || typeof d.messages != "object")
393
+ if (!i.messages || typeof i.messages != "object")
394
394
  throw new Error("Invalid RBM JSON: Missing 'messages' object");
395
- n(d);
396
- } catch (c) {
397
- const d = c instanceof Error ? c.message : "Failed to fetch JSON";
398
- i(d), n(null);
395
+ t(i);
396
+ } catch (m) {
397
+ const i = m instanceof Error ? m.message : "Failed to fetch JSON";
398
+ l(i), t(null);
399
399
  } finally {
400
- s(!1);
400
+ a(!1);
401
401
  }
402
- }, [r]);
403
- return S(() => {
402
+ }, [s]);
403
+ return j(() => {
404
404
  u();
405
405
  }, [u]), {
406
- data: t,
406
+ data: r,
407
407
  isLoading: o,
408
- error: a,
408
+ error: c,
409
409
  refetch: u
410
410
  };
411
411
  }
412
- function pe(r) {
413
- const t = W(null);
414
- return S(() => {
415
- t.current && t.current.scrollTo({
416
- top: t.current.scrollHeight,
412
+ function ge(s) {
413
+ const r = W(null);
414
+ return j(() => {
415
+ r.current && r.current.scrollTo({
416
+ top: r.current.scrollHeight,
417
417
  behavior: "smooth"
418
418
  });
419
- }, [r]), t;
419
+ }, [s]), r;
420
420
  }
421
- const xe = g(function() {
422
- const { theme: t, businessInfo: n, toggleProfile: o } = N(), s = t === "dark", a = n.brandColor || "#0084ff";
423
- return /* @__PURE__ */ l(
421
+ const xe = p(function() {
422
+ const { theme: r, businessInfo: t, toggleProfile: o } = k(), a = r === "dark", c = a ? "rcs-emulator-dark" : "rcs-emulator-light", l = t.brandColor || "#1A73E8";
423
+ return /* @__PURE__ */ n(
424
424
  "header",
425
425
  {
426
- className: `
427
- flex items-center gap-3 px-3 py-2.5 border-b
428
- ${s ? "bg-zinc-900 border-zinc-800" : "bg-white border-gray-100"}
429
- `,
426
+ className: `rcs-emulator-header ${c}`,
430
427
  role: "banner",
431
- "aria-label": `Chat with ${n.name}`,
428
+ "aria-label": `Chat with ${t.name}`,
432
429
  children: [
433
430
  /* @__PURE__ */ e(
434
431
  "button",
435
432
  {
436
433
  type: "button",
437
- className: `
438
- p-1.5 -ml-1 rounded-full transition-colors
439
- ${s ? "hover:bg-zinc-800 text-white" : "hover:bg-gray-100 text-gray-700"}
440
- `,
434
+ className: `rcs-emulator-icon-btn rcs-emulator-p-1-5 rcs-emulator--ml-1 ${c} ${a ? "rcs-emulator-text-white" : "rcs-emulator-text-gray-700"}`,
441
435
  "aria-label": "Go back",
442
- children: /* @__PURE__ */ e("svg", { className: "w-5 h-5", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ e("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M15 19l-7-7 7-7" }) })
436
+ children: /* @__PURE__ */ e(
437
+ "svg",
438
+ {
439
+ className: "rcs-emulator-w-5 rcs-emulator-h-5",
440
+ fill: "none",
441
+ viewBox: "0 0 24 24",
442
+ stroke: "currentColor",
443
+ children: /* @__PURE__ */ e(
444
+ "path",
445
+ {
446
+ strokeLinecap: "round",
447
+ strokeLinejoin: "round",
448
+ strokeWidth: 2,
449
+ d: "M15 19l-7-7 7-7"
450
+ }
451
+ )
452
+ }
453
+ )
443
454
  }
444
455
  ),
445
- /* @__PURE__ */ l(
456
+ /* @__PURE__ */ n(
446
457
  "button",
447
458
  {
448
459
  onClick: o,
449
- className: "flex items-center gap-2.5 flex-1 min-w-0 text-left",
460
+ className: "rcs-emulator-flex rcs-emulator-items-center rcs-emulator-gap-2-5 rcs-emulator-flex-1 rcs-emulator-min-w-0 rcs-emulator-text-left rcs-emulator-bg-transparent",
461
+ style: { background: "transparent" },
450
462
  "aria-label": "View business info",
451
463
  children: [
452
464
  /* @__PURE__ */ e(
453
465
  "div",
454
466
  {
455
- className: `
456
- relative w-9 h-9 rounded-full overflow-hidden flex-shrink-0
457
- ${s ? "bg-zinc-800" : "bg-gray-100"}
458
- `,
467
+ className: `rcs-emulator-logo-avatar rcs-emulator-w-9 rcs-emulator-h-9 ${c}`,
459
468
  style: {
460
- backgroundColor: n.logo ? void 0 : a
469
+ backgroundColor: t.logo ? void 0 : l
461
470
  },
462
- children: n.logo ? /* @__PURE__ */ e(
471
+ children: t.logo ? /* @__PURE__ */ e(
463
472
  "img",
464
473
  {
465
- src: n.logo,
466
- alt: `${n.name} logo`,
467
- className: "w-full h-full object-cover"
474
+ src: t.logo,
475
+ alt: `${t.name} logo`,
476
+ className: "rcs-emulator-w-full rcs-emulator-h-full rcs-emulator-object-cover"
468
477
  }
469
- ) : /* @__PURE__ */ e("div", { className: "w-full h-full flex items-center justify-center text-sm font-bold text-white", children: n.name.charAt(0).toUpperCase() })
478
+ ) : /* @__PURE__ */ e("div", { className: "rcs-emulator-w-full rcs-emulator-h-full rcs-emulator-flex rcs-emulator-items-center rcs-emulator-justify-center rcs-emulator-text-sm rcs-emulator-font-bold rcs-emulator-text-white", children: t.name.charAt(0).toUpperCase() })
470
479
  }
471
480
  ),
472
481
  /* @__PURE__ */ e(
473
482
  "h1",
474
483
  {
475
- className: `
476
- text-base font-medium truncate
477
- ${s ? "text-white" : "text-gray-900"}
478
- `,
479
- children: n.name
484
+ className: `rcs-emulator-text-base rcs-emulator-font-medium rcs-emulator-truncate ${a ? "rcs-emulator-text-white" : "rcs-emulator-text-gray-900"}`,
485
+ children: t.name
480
486
  }
481
487
  )
482
488
  ]
483
489
  }
484
490
  ),
485
- /* @__PURE__ */ l("div", { className: "flex items-center gap-0.5", children: [
486
- n.verified && /* @__PURE__ */ e(
491
+ /* @__PURE__ */ n("div", { className: "rcs-emulator-flex rcs-emulator-items-center rcs-emulator-gap-0-5", children: [
492
+ t.verified && /* @__PURE__ */ e(
487
493
  "button",
488
494
  {
489
495
  type: "button",
490
- className: `
491
- p-2 rounded-full transition-colors
492
- ${s ? "hover:bg-zinc-800" : "hover:bg-gray-100"}
493
- `,
496
+ className: `rcs-emulator-icon-btn rcs-emulator-p-2 ${c}`,
494
497
  "aria-label": "Verified business",
495
- children: /* @__PURE__ */ l("svg", { className: "w-5 h-5", viewBox: "0 0 24 24", fill: "none", children: [
496
- /* @__PURE__ */ e(
497
- "path",
498
- {
499
- d: "M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z",
500
- stroke: s ? "#9ca3af" : "#6b7280",
501
- strokeWidth: 2,
502
- strokeLinecap: "round",
503
- strokeLinejoin: "round"
504
- }
505
- ),
506
- /* @__PURE__ */ e(
507
- "path",
508
- {
509
- d: "M9 12l2 2 4-4",
510
- stroke: "#3b82f6",
511
- strokeWidth: 2,
512
- strokeLinecap: "round",
513
- strokeLinejoin: "round"
514
- }
515
- )
516
- ] })
498
+ children: /* @__PURE__ */ n(
499
+ "svg",
500
+ {
501
+ className: "rcs-emulator-w-5 rcs-emulator-h-5",
502
+ viewBox: "0 0 24 24",
503
+ fill: "none",
504
+ children: [
505
+ /* @__PURE__ */ e(
506
+ "path",
507
+ {
508
+ d: "M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z",
509
+ stroke: a ? "#9ca3af" : "#6b7280",
510
+ strokeWidth: 2,
511
+ strokeLinecap: "round",
512
+ strokeLinejoin: "round"
513
+ }
514
+ ),
515
+ /* @__PURE__ */ e(
516
+ "path",
517
+ {
518
+ d: "M9 12l2 2 4-4",
519
+ stroke: "#3b82f6",
520
+ strokeWidth: 2,
521
+ strokeLinecap: "round",
522
+ strokeLinejoin: "round"
523
+ }
524
+ )
525
+ ]
526
+ }
527
+ )
517
528
  }
518
529
  ),
519
530
  /* @__PURE__ */ e(
520
531
  "button",
521
532
  {
522
533
  type: "button",
523
- className: `
524
- p-2 rounded-full transition-colors
525
- ${s ? "hover:bg-zinc-800 text-zinc-400" : "hover:bg-gray-100 text-gray-500"}
526
- `,
534
+ className: `rcs-emulator-icon-btn rcs-emulator-p-2 ${c} ${a ? "rcs-emulator-text-zinc-400" : "rcs-emulator-text-gray-500"}`,
527
535
  "aria-label": "More options",
528
- children: /* @__PURE__ */ e("svg", { className: "w-5 h-5", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ e("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M12 5v.01M12 12v.01M12 19v.01M12 6a1 1 0 110-2 1 1 0 010 2zm0 7a1 1 0 110-2 1 1 0 010 2zm0 7a1 1 0 110-2 1 1 0 010 2z" }) })
536
+ children: /* @__PURE__ */ e(
537
+ "svg",
538
+ {
539
+ className: "rcs-emulator-w-5 rcs-emulator-h-5",
540
+ fill: "none",
541
+ viewBox: "0 0 24 24",
542
+ stroke: "currentColor",
543
+ children: /* @__PURE__ */ e(
544
+ "path",
545
+ {
546
+ strokeLinecap: "round",
547
+ strokeLinejoin: "round",
548
+ strokeWidth: 2,
549
+ d: "M12 5v.01M12 12v.01M12 19v.01M12 6a1 1 0 110-2 1 1 0 010 2zm0 7a1 1 0 110-2 1 1 0 010 2zm0 7a1 1 0 110-2 1 1 0 010 2z"
550
+ }
551
+ )
552
+ }
553
+ )
529
554
  }
530
555
  )
531
556
  ] })
532
557
  ]
533
558
  }
534
559
  );
535
- }), be = g(function() {
536
- const { theme: t, businessInfo: n } = N(), o = t === "dark", s = n.brandColor || "#0084ff";
537
- return /* @__PURE__ */ l("div", { className: "flex flex-col items-center py-4 px-4", children: [
538
- /* @__PURE__ */ l("div", { className: "relative mb-3", children: [
560
+ }), be = p(function() {
561
+ const { theme: r, businessInfo: t } = k(), o = r === "dark", a = o ? "rcs-emulator-dark" : "rcs-emulator-light", c = t.brandColor || "#0084ff";
562
+ return /* @__PURE__ */ n("div", { className: "rcs-emulator-flex rcs-emulator-flex-col rcs-emulator-items-center rcs-emulator-py-4 rcs-emulator-px-4", children: [
563
+ /* @__PURE__ */ n("div", { className: "rcs-emulator-relative rcs-emulator-mb-3", children: [
539
564
  /* @__PURE__ */ e(
540
565
  "div",
541
566
  {
542
- className: `
543
- w-16 h-16 rounded-full overflow-hidden
544
- ${o ? "bg-zinc-800" : "bg-gray-100"}
545
- shadow-lg
546
- `,
567
+ className: `rcs-emulator-logo-avatar rcs-emulator-w-16 rcs-emulator-h-16 rcs-emulator-shadow-lg ${a}`,
547
568
  style: {
548
- backgroundColor: n.logo ? void 0 : s
569
+ backgroundColor: t.logo ? void 0 : c
549
570
  },
550
- children: n.logo ? /* @__PURE__ */ e(
571
+ children: t.logo ? /* @__PURE__ */ e(
551
572
  "img",
552
573
  {
553
- src: n.logo,
554
- alt: `${n.name} logo`,
555
- className: "w-full h-full object-cover"
574
+ src: t.logo,
575
+ alt: `${t.name} logo`,
576
+ className: "rcs-emulator-w-full rcs-emulator-h-full rcs-emulator-object-cover"
556
577
  }
557
- ) : /* @__PURE__ */ e("div", { className: "w-full h-full flex items-center justify-center text-2xl font-bold text-white", children: n.name.charAt(0).toUpperCase() })
578
+ ) : /* @__PURE__ */ e("div", { className: "rcs-emulator-w-full rcs-emulator-h-full rcs-emulator-flex rcs-emulator-items-center rcs-emulator-justify-center rcs-emulator-text-2xl rcs-emulator-font-bold rcs-emulator-text-white", children: t.name.charAt(0).toUpperCase() })
558
579
  }
559
580
  ),
560
- n.verified && /* @__PURE__ */ e(
561
- "div",
581
+ t.verified && /* @__PURE__ */ e("div", { className: "rcs-emulator-verified-badge", children: /* @__PURE__ */ e(
582
+ "svg",
562
583
  {
563
- className: "absolute -bottom-0.5 -right-0.5 w-5 h-5 rounded-full bg-blue-500 flex items-center justify-center border-2 border-white shadow-sm",
564
- children: /* @__PURE__ */ e(
565
- "svg",
566
- {
567
- className: "w-3 h-3 text-white",
568
- viewBox: "0 0 24 24",
569
- fill: "currentColor",
570
- children: /* @__PURE__ */ e("path", { d: "M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41L9 16.17z" })
571
- }
572
- )
584
+ className: "rcs-emulator-w-3 rcs-emulator-h-3 rcs-emulator-text-white",
585
+ viewBox: "0 0 24 24",
586
+ fill: "currentColor",
587
+ children: /* @__PURE__ */ e("path", { d: "M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41L9 16.17z" })
573
588
  }
574
- )
589
+ ) })
575
590
  ] }),
576
591
  /* @__PURE__ */ e(
577
592
  "h1",
578
593
  {
579
- className: `
580
- text-lg font-semibold text-center
581
- ${o ? "text-white" : "text-gray-900"}
582
- `,
583
- children: n.name
594
+ className: `rcs-emulator-text-lg rcs-emulator-font-semibold rcs-emulator-text-center ${o ? "rcs-emulator-text-white" : "rcs-emulator-text-gray-900"}`,
595
+ children: t.name
584
596
  }
585
597
  ),
586
- n.description && /* @__PURE__ */ e(
598
+ t.description && /* @__PURE__ */ e(
587
599
  "p",
588
600
  {
589
- className: `
590
- text-sm text-center mt-0.5
591
- ${o ? "text-zinc-400" : "text-gray-500"}
592
- `,
593
- children: n.description
601
+ className: `rcs-emulator-text-sm rcs-emulator-text-center rcs-emulator-mt-0-5 ${o ? "rcs-emulator-text-zinc-400" : "rcs-emulator-text-gray-500"}`,
602
+ children: t.description
594
603
  }
595
604
  )
596
605
  ] });
597
- }), ye = g(function({
598
- text: t,
599
- sender: n,
606
+ }), ve = p(function({
607
+ text: r,
608
+ sender: t,
600
609
  timestamp: o
601
610
  }) {
602
- const { theme: s, businessInfo: a } = N(), i = s === "dark", u = n === "business", c = a.brandColor || "#0084ff", d = new Date(o).toLocaleTimeString([], {
611
+ const { theme: a, businessInfo: c } = k(), u = a === "dark" ? "rcs-emulator-dark" : "rcs-emulator-light", m = t === "business", i = c.brandColor || "#1A73E8", h = new Date(o).toLocaleTimeString([], {
603
612
  hour: "2-digit",
604
613
  minute: "2-digit"
605
614
  });
606
- return u ? /* @__PURE__ */ l("div", { className: "max-w-[90%]", children: [
615
+ return m ? /* @__PURE__ */ n("div", { className: "rcs-emulator-max-w-90 rcs-emulator-flex rcs-emulator-flex-col", children: [
607
616
  /* @__PURE__ */ e(
608
617
  "div",
609
618
  {
610
- className: `
611
- px-4 py-3 rounded-2xl text-sm leading-relaxed
612
- ${i ? "bg-zinc-800 text-white" : "bg-gray-100 text-gray-900"}
613
- `,
614
- children: t
619
+ className: `rcs-emulator-message-bubble rcs-emulator-business ${u}`,
620
+ children: r
615
621
  }
616
622
  ),
617
- /* @__PURE__ */ e("span", { className: "sr-only", children: d })
618
- ] }) : /* @__PURE__ */ l("div", { className: "flex items-end gap-1.5 max-w-[85%] ml-auto", children: [
623
+ /* @__PURE__ */ e("span", { className: "rcs-emulator-sr-only", children: h })
624
+ ] }) : /* @__PURE__ */ n("div", { className: "rcs-emulator-flex rcs-emulator-items-end rcs-emulator-gap-1-5 rcs-emulator-max-w-85 rcs-emulator-ml-auto", children: [
619
625
  /* @__PURE__ */ e(
620
626
  "div",
621
627
  {
622
- className: "px-4 py-2.5 rounded-full text-white text-sm leading-relaxed",
623
- style: { backgroundColor: c },
624
- children: t
628
+ className: "rcs-emulator-message-bubble rcs-emulator-user",
629
+ style: { backgroundColor: i },
630
+ children: r
625
631
  }
626
632
  ),
627
633
  /* @__PURE__ */ e(
628
634
  "div",
629
635
  {
630
- className: "w-5 h-5 rounded-full flex items-center justify-center flex-shrink-0",
631
- style: { backgroundColor: c },
636
+ className: "rcs-emulator-delivery-status",
637
+ style: { backgroundColor: i },
632
638
  children: /* @__PURE__ */ e(
633
639
  "svg",
634
640
  {
635
- className: "w-3 h-3 text-white",
641
+ className: "rcs-emulator-w-3 rcs-emulator-h-3 rcs-emulator-text-white",
636
642
  viewBox: "0 0 24 24",
637
643
  fill: "none",
638
644
  stroke: "currentColor",
@@ -642,34 +648,34 @@ const xe = g(function() {
642
648
  )
643
649
  }
644
650
  ),
645
- /* @__PURE__ */ e("span", { className: "sr-only", children: d })
651
+ /* @__PURE__ */ e("span", { className: "rcs-emulator-sr-only", children: h })
646
652
  ] });
647
- }), we = g(function({
648
- text: t,
649
- timestamp: n
653
+ }), ye = p(function({
654
+ text: r,
655
+ timestamp: t
650
656
  }) {
651
- const { businessInfo: o } = N(), s = o.brandColor || "#0084ff", a = new Date(n).toLocaleTimeString([], {
657
+ const { businessInfo: o } = k(), a = o.brandColor || "#1A73E8", c = new Date(t).toLocaleTimeString([], {
652
658
  hour: "2-digit",
653
659
  minute: "2-digit"
654
660
  });
655
- return /* @__PURE__ */ l("div", { className: "flex items-end gap-1.5 max-w-[85%] ml-auto", children: [
661
+ return /* @__PURE__ */ n("div", { className: "rcs-emulator-flex rcs-emulator-items-end rcs-emulator-gap-1-5 rcs-emulator-max-w-85 rcs-emulator-ml-auto", children: [
656
662
  /* @__PURE__ */ e(
657
663
  "div",
658
664
  {
659
- className: "px-4 py-2.5 rounded-full text-white text-sm leading-relaxed shadow-sm",
660
- style: { backgroundColor: s },
661
- children: t
665
+ className: "rcs-emulator-message-bubble rcs-emulator-user rcs-emulator-shadow-sm",
666
+ style: { backgroundColor: a, color: "white" },
667
+ children: r
662
668
  }
663
669
  ),
664
670
  /* @__PURE__ */ e(
665
671
  "div",
666
672
  {
667
- className: "w-5 h-5 rounded-full flex items-center justify-center flex-shrink-0",
668
- style: { backgroundColor: s },
673
+ className: "rcs-emulator-delivery-status",
674
+ style: { backgroundColor: a },
669
675
  children: /* @__PURE__ */ e(
670
676
  "svg",
671
677
  {
672
- className: "w-3 h-3 text-white",
678
+ className: "rcs-emulator-w-3 rcs-emulator-h-3 rcs-emulator-text-white",
673
679
  viewBox: "0 0 24 24",
674
680
  fill: "none",
675
681
  stroke: "currentColor",
@@ -686,83 +692,73 @@ const xe = g(function() {
686
692
  )
687
693
  }
688
694
  ),
689
- /* @__PURE__ */ e("span", { className: "sr-only", children: a })
695
+ /* @__PURE__ */ e("span", { className: "rcs-emulator-sr-only", children: c })
690
696
  ] });
691
- }), ve = g(function({
692
- card: t,
693
- timestamp: n
697
+ }), we = p(function({
698
+ card: r,
699
+ timestamp: t
694
700
  }) {
695
- const { theme: o, handleReply: s, handleAction: a } = N(), i = o === "dark", u = new Date(n).toLocaleTimeString([], {
701
+ const { theme: o, handleReply: a, handleAction: c } = k(), l = o === "dark", u = l ? "rcs-emulator-dark" : "rcs-emulator-light", m = new Date(t).toLocaleTimeString([], {
696
702
  hour: "2-digit",
697
703
  minute: "2-digit"
698
- }), c = (f) => {
699
- "reply" in f ? s(f) : a(f);
700
- }, d = {
701
- short: "h-36",
702
- medium: "h-44",
703
- tall: "h-56"
704
+ }), i = (f) => {
705
+ "reply" in f ? a(f) : c(f);
706
+ }, h = {
707
+ short: "rcs-emulator-h-36",
708
+ medium: "rcs-emulator-h-44",
709
+ tall: "rcs-emulator-h-56"
704
710
  };
705
- return /* @__PURE__ */ l("div", { className: "w-full", children: [
706
- /* @__PURE__ */ l(
711
+ return /* @__PURE__ */ n("div", { className: "rcs-emulator-w-full", children: [
712
+ /* @__PURE__ */ n(
707
713
  "div",
708
714
  {
709
- className: `
710
- overflow-hidden rounded-2xl w-full shadow-sm
711
- ${i ? "bg-zinc-800" : "bg-[#e8f5e9]"}
712
- `,
715
+ className: `rcs-emulator-rich-card ${u}`,
713
716
  children: [
714
- t.media && /* @__PURE__ */ e(
717
+ r.media && /* @__PURE__ */ e(
715
718
  "div",
716
719
  {
717
- className: `
718
- w-full overflow-hidden
719
- ${d[t.media.height]}
720
- `,
720
+ className: `rcs-emulator-w-full rcs-emulator-overflow-hidden rcs-emulator-media-placeholder ${h[r.media.height]} ${l ? "rcs-emulator-dark" : "rcs-emulator-light"}`,
721
+ style: { borderRadius: "12px 12px 0 0" },
721
722
  children: /* @__PURE__ */ e(
722
723
  "img",
723
724
  {
724
- src: t.media.url,
725
- alt: t.title || "Rich card media",
726
- className: "w-full h-full object-cover",
727
- loading: "lazy"
725
+ src: r.media.url,
726
+ alt: r.title || "Rich card media",
727
+ className: "rcs-emulator-w-full rcs-emulator-h-full rcs-emulator-object-cover",
728
+ loading: "lazy",
729
+ onError: (f) => {
730
+ const v = f.target;
731
+ v.style.display = "none";
732
+ }
728
733
  }
729
734
  )
730
735
  }
731
736
  ),
732
- /* @__PURE__ */ l("div", { className: "p-4", children: [
733
- t.title && /* @__PURE__ */ e(
737
+ /* @__PURE__ */ n("div", { className: "rcs-emulator-p-4", children: [
738
+ r.title && /* @__PURE__ */ e(
734
739
  "h3",
735
740
  {
736
- className: `
737
- text-base font-semibold leading-snug
738
- ${i ? "text-white" : "text-gray-900"}
739
- `,
740
- children: t.title
741
+ className: `rcs-emulator-text-base rcs-emulator-font-semibold rcs-emulator-leading-snug rcs-emulator-card-title ${l ? "rcs-emulator-dark" : "rcs-emulator-light"}`,
742
+ children: r.title
741
743
  }
742
744
  ),
743
- t.description && /* @__PURE__ */ e(
745
+ r.description && /* @__PURE__ */ e(
744
746
  "p",
745
747
  {
746
- className: `
747
- text-sm leading-relaxed mt-1.5
748
- ${i ? "text-zinc-300" : "text-gray-700"}
749
- `,
750
- children: t.description
748
+ className: `rcs-emulator-text-sm rcs-emulator-leading-relaxed rcs-emulator-mt-1-5 rcs-emulator-card-subtitle ${l ? "rcs-emulator-dark" : "rcs-emulator-light"}`,
749
+ children: r.description
751
750
  }
752
751
  ),
753
- t.suggestions && t.suggestions.length > 0 && /* @__PURE__ */ e(
752
+ r.suggestions && r.suggestions.length > 0 && /* @__PURE__ */ e(
754
753
  "div",
755
754
  {
756
- className: `
757
- mt-4 rounded-xl overflow-hidden divide-y
758
- ${i ? "divide-zinc-700 bg-zinc-800" : "divide-gray-100 bg-white"}
759
- `,
760
- children: t.suggestions.map((f, v) => /* @__PURE__ */ e(
755
+ className: `rcs-emulator-card-actions rcs-emulator-mt-4 rcs-emulator-divide-y ${l ? "rcs-emulator-divide-zinc-700" : "rcs-emulator-divide-gray-100"} ${u}`,
756
+ children: r.suggestions.map((f, v) => /* @__PURE__ */ e(
761
757
  Me,
762
758
  {
763
759
  suggestion: f,
764
- onClick: () => c(f),
765
- isDark: i
760
+ onClick: () => i(f),
761
+ isDark: l
766
762
  },
767
763
  v
768
764
  ))
@@ -772,248 +768,346 @@ const xe = g(function() {
772
768
  ]
773
769
  }
774
770
  ),
775
- /* @__PURE__ */ e("span", { className: "sr-only", children: u })
771
+ /* @__PURE__ */ e("span", { className: "rcs-emulator-sr-only", children: m })
776
772
  ] });
777
- }), E = "w-5 h-5 text-gray-400", ke = () => /* @__PURE__ */ e("svg", { className: E, fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 1.5, children: /* @__PURE__ */ e("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M21 12a9 9 0 01-9 9m9-9a9 9 0 00-9-9m9 9H3m9 9a9 9 0 01-9-9m9 9c1.657 0 3-4.03 3-9s-1.343-9-3-9m0 18c-1.657 0-3-4.03-3-9s1.343-9 3-9m-9 9a9 9 0 019-9" }) }), Ne = () => /* @__PURE__ */ e("svg", { className: E, fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 1.5, children: /* @__PURE__ */ e("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M3 5a2 2 0 012-2h3.28a1 1 0 01.948.684l1.498 4.493a1 1 0 01-.502 1.21l-2.257 1.13a11.042 11.042 0 005.516 5.516l1.13-2.257a1 1 0 011.21-.502l4.493 1.498a1 1 0 01.684.949V19a2 2 0 01-2 2h-1C9.716 21 3 14.284 3 6V5z" }) }), Le = () => /* @__PURE__ */ l("svg", { className: E, fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 1.5, children: [
773
+ }), B = "rcs-emulator-w-5 rcs-emulator-h-5 rcs-emulator-text-gray-400", ke = () => /* @__PURE__ */ e("svg", { className: B, fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 1.5, children: /* @__PURE__ */ e("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M21 12a9 9 0 01-9 9m9-9a9 9 0 00-9-9m9 9H3m9 9a9 9 0 01-9-9m9 9c1.657 0 3-4.03 3-9s-1.343-9-3-9m0 18c-1.657 0-3-4.03-3-9s1.343-9 3-9m-9 9a9 9 0 019-9" }) }), Ne = () => /* @__PURE__ */ e("svg", { className: B, fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 1.5, children: /* @__PURE__ */ e("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M3 5a2 2 0 012-2h3.28a1 1 0 01.948.684l1.498 4.493a1 1 0 01-.502 1.21l-2.257 1.13a11.042 11.042 0 005.516 5.516l1.13-2.257a1 1 0 011.21-.502l4.493 1.498a1 1 0 01.684.949V19a2 2 0 01-2 2h-1C9.716 21 3 14.284 3 6V5z" }) }), Ce = () => /* @__PURE__ */ n("svg", { className: B, fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 1.5, children: [
778
774
  /* @__PURE__ */ e("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M17.657 16.657L13.414 20.9a1.998 1.998 0 01-2.827 0l-4.244-4.243a8 8 0 1111.314 0z" }),
779
775
  /* @__PURE__ */ e("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M15 11a3 3 0 11-6 0 3 3 0 016 0z" })
780
- ] }), Ce = () => /* @__PURE__ */ e("svg", { className: E, fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 1.5, children: /* @__PURE__ */ e("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z" }) }), G = () => /* @__PURE__ */ e("svg", { className: E, fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 1.5, children: /* @__PURE__ */ e("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M8 12h.01M12 12h.01M16 12h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z" }) }), Me = g(function({
781
- suggestion: t,
782
- onClick: n,
776
+ ] }), Le = () => /* @__PURE__ */ e("svg", { className: B, fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 1.5, children: /* @__PURE__ */ e("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z" }) }), G = () => /* @__PURE__ */ e("svg", { className: B, fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 1.5, children: /* @__PURE__ */ e("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M8 12h.01M12 12h.01M16 12h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z" }) }), Me = p(function({
777
+ suggestion: r,
778
+ onClick: t,
783
779
  isDark: o
784
780
  }) {
785
- const s = $(t), a = s ? t.action.displayText : t.reply.displayText;
786
- return /* @__PURE__ */ l(
781
+ const a = I(r), c = a ? r.action.displayText : r.reply.displayText;
782
+ return /* @__PURE__ */ n(
787
783
  "button",
788
784
  {
789
- onClick: n,
790
- className: `
791
- w-full flex items-center gap-3 px-4 py-3 text-left transition-colors
792
- ${o ? "hover:bg-zinc-700" : "hover:bg-gray-50"}
793
- `,
785
+ onClick: t,
786
+ className: `rcs-emulator-list-item ${o ? "rcs-emulator-dark" : "rcs-emulator-light"}`,
787
+ style: { gap: "0.75rem", padding: "0.75rem 1rem" },
794
788
  children: [
795
- /* @__PURE__ */ e("span", { className: "flex-shrink-0", children: (() => {
796
- if (!s) return /* @__PURE__ */ e(G, {});
797
- const { action: u } = t;
798
- return u.urlAction || u.openUrlAction ? /* @__PURE__ */ e(ke, {}) : u.dialerAction || u.dialAction ? /* @__PURE__ */ e(Ne, {}) : u.mapAction || u.viewLocationAction ? /* @__PURE__ */ e(Le, {}) : u.calendarAction || u.createCalendarEventAction ? /* @__PURE__ */ e(Ce, {}) : /* @__PURE__ */ e(G, {});
789
+ /* @__PURE__ */ e("span", { className: "rcs-emulator-flex-shrink-0", children: (() => {
790
+ if (!a) return /* @__PURE__ */ e(G, {});
791
+ const { action: u } = r;
792
+ return u.urlAction || u.openUrlAction ? /* @__PURE__ */ e(ke, {}) : u.dialerAction || u.dialAction ? /* @__PURE__ */ e(Ne, {}) : u.mapAction || u.viewLocationAction ? /* @__PURE__ */ e(Ce, {}) : u.calendarAction || u.createCalendarEventAction ? /* @__PURE__ */ e(Le, {}) : /* @__PURE__ */ e(G, {});
799
793
  })() }),
800
- /* @__PURE__ */ e("span", { className: `text-sm ${o ? "text-white" : "text-gray-900"}`, children: a })
794
+ /* @__PURE__ */ e("span", { className: `rcs-emulator-text-sm ${o ? "rcs-emulator-text-white" : "rcs-emulator-text-gray-900"}`, children: c })
801
795
  ]
802
796
  }
803
797
  );
804
- }), ze = g(function({ cards: t, timestamp: n }) {
805
- const { theme: o, handleReply: s, handleAction: a } = N(), i = W(null), [u, c] = z(!1), [d, m] = z(t.length > 1), f = o === "dark", v = new Date(n).toLocaleTimeString([], {
798
+ }), $e = p(function({
799
+ cards: r,
800
+ timestamp: t
801
+ }) {
802
+ const { theme: o, handleReply: a, handleAction: c } = k(), l = W(null), [u, m] = A(!1), [i, h] = A(r.length > 1), f = o === "dark", v = f ? "rcs-emulator-dark" : "rcs-emulator-light", b = new Date(t).toLocaleTimeString([], {
806
803
  hour: "2-digit",
807
804
  minute: "2-digit"
808
- }), x = (p) => {
809
- "reply" in p ? s(p) : a(p);
810
- }, L = M(() => {
811
- if (i.current) {
812
- const { scrollLeft: p, scrollWidth: y, clientWidth: h } = i.current;
813
- c(p > 0), m(p < y - h - 10);
805
+ }), N = (g) => {
806
+ "reply" in g ? a(g) : c(g);
807
+ }, y = $(() => {
808
+ if (l.current) {
809
+ const { scrollLeft: g, scrollWidth: d, clientWidth: x } = l.current;
810
+ m(g > 0), h(g < d - x - 10);
814
811
  }
815
- }, []), b = (p) => {
816
- i.current && i.current.scrollBy({
817
- left: p === "left" ? -200 : 200,
812
+ }, []), w = (g) => {
813
+ l.current && l.current.scrollBy({
814
+ left: g === "left" ? -200 : 200,
818
815
  behavior: "smooth"
819
816
  });
820
817
  };
821
- return /* @__PURE__ */ l("div", { className: "w-full -mx-3", children: [
822
- /* @__PURE__ */ l("div", { className: "relative", children: [
818
+ return /* @__PURE__ */ n("div", { className: "rcs-emulator-w-full rcs-emulator--mx-3", children: [
819
+ /* @__PURE__ */ n("div", { className: "rcs-emulator-relative", children: [
823
820
  u && /* @__PURE__ */ e(
824
821
  "button",
825
822
  {
826
- onClick: () => b("left"),
827
- className: `
828
- absolute left-2 top-1/2 -translate-y-1/2 z-10
829
- w-8 h-8 rounded-full flex items-center justify-center
830
- shadow-lg transition-opacity
831
- ${f ? "bg-zinc-700 text-white" : "bg-white text-gray-700"}
832
- `,
823
+ onClick: () => w("left"),
824
+ className: `rcs-emulator-carousel-arrow rcs-emulator-left ${v}`,
833
825
  "aria-label": "Scroll left",
834
- children: /* @__PURE__ */ e("svg", { className: "w-4 h-4", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ e("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M15 19l-7-7 7-7" }) })
826
+ children: /* @__PURE__ */ e(
827
+ "svg",
828
+ {
829
+ className: "rcs-emulator-w-4 rcs-emulator-h-4",
830
+ fill: "none",
831
+ viewBox: "0 0 24 24",
832
+ stroke: "currentColor",
833
+ children: /* @__PURE__ */ e(
834
+ "path",
835
+ {
836
+ strokeLinecap: "round",
837
+ strokeLinejoin: "round",
838
+ strokeWidth: 2,
839
+ d: "M15 19l-7-7 7-7"
840
+ }
841
+ )
842
+ }
843
+ )
835
844
  }
836
845
  ),
837
846
  /* @__PURE__ */ e(
838
847
  "div",
839
848
  {
840
- ref: i,
841
- onScroll: L,
842
- className: "flex gap-2.5 overflow-x-auto py-1 px-3 snap-x snap-mandatory",
843
- style: { scrollbarWidth: "none", msOverflowStyle: "none" },
844
- children: t.map((p, y) => /* @__PURE__ */ e(
845
- Ae,
849
+ ref: l,
850
+ onScroll: y,
851
+ className: "rcs-emulator-flex rcs-emulator-gap-2-5 rcs-emulator-overflow-x-auto rcs-emulator-py-1 rcs-emulator-px-3 rcs-emulator-snap-x rcs-emulator-scrollbar-hide",
852
+ children: r.map((g, d) => /* @__PURE__ */ e(
853
+ Ie,
846
854
  {
847
- card: p,
855
+ card: g,
848
856
  isDark: f,
849
- onSuggestionClick: x
857
+ onSuggestionClick: N
850
858
  },
851
- y
859
+ d
852
860
  ))
853
861
  }
854
862
  ),
855
- d && /* @__PURE__ */ e(
863
+ i && /* @__PURE__ */ e(
856
864
  "button",
857
865
  {
858
- onClick: () => b("right"),
859
- className: `
860
- absolute right-2 top-1/2 -translate-y-1/2 z-10
861
- w-8 h-8 rounded-full flex items-center justify-center
862
- shadow-lg transition-opacity
863
- ${f ? "bg-zinc-700 text-white" : "bg-white text-gray-700"}
864
- `,
866
+ onClick: () => w("right"),
867
+ className: `rcs-emulator-carousel-arrow rcs-emulator-right ${v}`,
865
868
  "aria-label": "Scroll right",
866
- children: /* @__PURE__ */ e("svg", { className: "w-4 h-4", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ e("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M9 5l7 7-7 7" }) })
869
+ children: /* @__PURE__ */ e(
870
+ "svg",
871
+ {
872
+ className: "rcs-emulator-w-4 rcs-emulator-h-4",
873
+ fill: "none",
874
+ viewBox: "0 0 24 24",
875
+ stroke: "currentColor",
876
+ children: /* @__PURE__ */ e(
877
+ "path",
878
+ {
879
+ strokeLinecap: "round",
880
+ strokeLinejoin: "round",
881
+ strokeWidth: 2,
882
+ d: "M9 5l7 7-7 7"
883
+ }
884
+ )
885
+ }
886
+ )
867
887
  }
868
888
  )
869
889
  ] }),
870
- /* @__PURE__ */ e("span", { className: "sr-only", children: v })
890
+ /* @__PURE__ */ e("span", { className: "rcs-emulator-sr-only", children: b })
871
891
  ] });
872
- }), j = "w-4 h-4 text-gray-400", $e = (r) => {
873
- if (!$(r))
874
- return /* @__PURE__ */ e("svg", { className: j, fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 1.5, children: /* @__PURE__ */ e("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M8 12h.01M12 12h.01M16 12h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z" }) });
875
- const { action: t } = r;
876
- return t.urlAction || t.openUrlAction ? /* @__PURE__ */ e("svg", { className: j, fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 1.5, children: /* @__PURE__ */ e("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M21 12a9 9 0 01-9 9m9-9a9 9 0 00-9-9m9 9H3m9 9a9 9 0 01-9-9m9 9c1.657 0 3-4.03 3-9s-1.343-9-3-9m0 18c-1.657 0-3-4.03-3-9s1.343-9 3-9m-9 9a9 9 0 019-9" }) }) : t.dialerAction || t.dialAction ? /* @__PURE__ */ e("svg", { className: j, fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 1.5, children: /* @__PURE__ */ e("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M3 5a2 2 0 012-2h3.28a1 1 0 01.948.684l1.498 4.493a1 1 0 01-.502 1.21l-2.257 1.13a11.042 11.042 0 005.516 5.516l1.13-2.257a1 1 0 011.21-.502l4.493 1.498a1 1 0 01.684.949V19a2 2 0 01-2 2h-1C9.716 21 3 14.284 3 6V5z" }) }) : t.mapAction || t.viewLocationAction ? /* @__PURE__ */ l("svg", { className: j, fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 1.5, children: [
877
- /* @__PURE__ */ e("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M17.657 16.657L13.414 20.9a1.998 1.998 0 01-2.827 0l-4.244-4.243a8 8 0 1111.314 0z" }),
878
- /* @__PURE__ */ e("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M15 11a3 3 0 11-6 0 3 3 0 016 0z" })
879
- ] }) : t.calendarAction || t.createCalendarEventAction ? /* @__PURE__ */ e("svg", { className: j, fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 1.5, children: /* @__PURE__ */ e("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z" }) }) : /* @__PURE__ */ e("svg", { className: j, fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 1.5, children: /* @__PURE__ */ e("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M8 12h.01M12 12h.01M16 12h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z" }) });
880
- }, Ae = g(function({
881
- card: t,
882
- isDark: n,
883
- onSuggestionClick: o
884
- }) {
885
- const s = t.layout.width === "small" ? "w-44" : "w-52";
886
- return /* @__PURE__ */ l(
887
- "div",
892
+ }), E = "rcs-emulator-w-4 rcs-emulator-h-4 rcs-emulator-text-gray-400", Ae = (s) => {
893
+ if (!I(s))
894
+ return /* @__PURE__ */ e(
895
+ "svg",
896
+ {
897
+ className: E,
898
+ fill: "none",
899
+ viewBox: "0 0 24 24",
900
+ stroke: "currentColor",
901
+ strokeWidth: 1.5,
902
+ children: /* @__PURE__ */ e(
903
+ "path",
904
+ {
905
+ strokeLinecap: "round",
906
+ strokeLinejoin: "round",
907
+ d: "M8 12h.01M12 12h.01M16 12h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z"
908
+ }
909
+ )
910
+ }
911
+ );
912
+ const { action: r } = s;
913
+ return r.urlAction || r.openUrlAction ? /* @__PURE__ */ e(
914
+ "svg",
915
+ {
916
+ className: E,
917
+ fill: "none",
918
+ viewBox: "0 0 24 24",
919
+ stroke: "currentColor",
920
+ strokeWidth: 1.5,
921
+ children: /* @__PURE__ */ e(
922
+ "path",
923
+ {
924
+ strokeLinecap: "round",
925
+ strokeLinejoin: "round",
926
+ d: "M21 12a9 9 0 01-9 9m9-9a9 9 0 00-9-9m9 9H3m9 9a9 9 0 01-9-9m9 9c1.657 0 3-4.03 3-9s-1.343-9-3-9m0 18c-1.657 0-3-4.03-3-9s1.343-9 3-9m-9 9a9 9 0 019-9"
927
+ }
928
+ )
929
+ }
930
+ ) : r.dialerAction || r.dialAction ? /* @__PURE__ */ e(
931
+ "svg",
932
+ {
933
+ className: E,
934
+ fill: "none",
935
+ viewBox: "0 0 24 24",
936
+ stroke: "currentColor",
937
+ strokeWidth: 1.5,
938
+ children: /* @__PURE__ */ e(
939
+ "path",
940
+ {
941
+ strokeLinecap: "round",
942
+ strokeLinejoin: "round",
943
+ d: "M3 5a2 2 0 012-2h3.28a1 1 0 01.948.684l1.498 4.493a1 1 0 01-.502 1.21l-2.257 1.13a11.042 11.042 0 005.516 5.516l1.13-2.257a1 1 0 011.21-.502l4.493 1.498a1 1 0 01.684.949V19a2 2 0 01-2 2h-1C9.716 21 3 14.284 3 6V5z"
944
+ }
945
+ )
946
+ }
947
+ ) : r.mapAction || r.viewLocationAction ? /* @__PURE__ */ n(
948
+ "svg",
888
949
  {
889
- className: `
890
- flex-shrink-0 snap-start rounded-2xl overflow-hidden shadow-sm
891
- ${s}
892
- ${n ? "bg-zinc-800" : "bg-[#e8f5e9]"}
893
- `,
950
+ className: E,
951
+ fill: "none",
952
+ viewBox: "0 0 24 24",
953
+ stroke: "currentColor",
954
+ strokeWidth: 1.5,
894
955
  children: [
895
- t.media && /* @__PURE__ */ e("div", { className: "w-full h-32 bg-gray-200 overflow-hidden", children: /* @__PURE__ */ e(
896
- "img",
956
+ /* @__PURE__ */ e(
957
+ "path",
897
958
  {
898
- src: t.media.url,
899
- alt: t.title || "Carousel card media",
900
- className: "w-full h-full object-cover",
901
- loading: "lazy"
959
+ strokeLinecap: "round",
960
+ strokeLinejoin: "round",
961
+ d: "M17.657 16.657L13.414 20.9a1.998 1.998 0 01-2.827 0l-4.244-4.243a8 8 0 1111.314 0z"
902
962
  }
903
- ) }),
904
- /* @__PURE__ */ l("div", { className: "p-3", children: [
905
- t.title && /* @__PURE__ */ e(
906
- "h4",
907
- {
908
- className: `
909
- text-sm font-semibold leading-tight mb-1 line-clamp-2
910
- ${n ? "text-white" : "text-gray-900"}
911
- `,
912
- children: t.title
913
- }
914
- ),
915
- t.description && /* @__PURE__ */ e(
916
- "p",
917
- {
918
- className: `
919
- text-xs leading-relaxed line-clamp-3
920
- ${n ? "text-zinc-400" : "text-gray-700"}
921
- `,
922
- children: t.description
923
- }
924
- ),
925
- t.suggestions && t.suggestions.length > 0 && /* @__PURE__ */ e(
926
- "div",
927
- {
928
- className: `
929
- mt-3 rounded-lg overflow-hidden divide-y
930
- ${n ? "divide-zinc-600 bg-zinc-700" : "divide-gray-100 bg-white"}
931
- `,
932
- children: t.suggestions.map((a, i) => {
933
- const c = $(a) ? a.action.displayText : a.reply.displayText;
934
- return /* @__PURE__ */ l(
935
- "button",
936
- {
937
- onClick: () => o(a),
938
- className: `
939
- w-full flex items-center gap-2 px-3 py-2.5
940
- text-xs transition-colors text-left
941
- ${n ? "hover:bg-zinc-600 text-white" : "hover:bg-gray-50 text-gray-900"}
942
- `,
943
- children: [
944
- /* @__PURE__ */ e("span", { className: "flex-shrink-0", children: $e(a) }),
945
- /* @__PURE__ */ e("span", { className: "truncate", children: c })
946
- ]
947
- },
948
- i
949
- );
950
- })
951
- }
952
- )
953
- ] })
963
+ ),
964
+ /* @__PURE__ */ e(
965
+ "path",
966
+ {
967
+ strokeLinecap: "round",
968
+ strokeLinejoin: "round",
969
+ d: "M15 11a3 3 0 11-6 0 3 3 0 016 0z"
970
+ }
971
+ )
954
972
  ]
955
973
  }
974
+ ) : r.calendarAction || r.createCalendarEventAction ? /* @__PURE__ */ e(
975
+ "svg",
976
+ {
977
+ className: E,
978
+ fill: "none",
979
+ viewBox: "0 0 24 24",
980
+ stroke: "currentColor",
981
+ strokeWidth: 1.5,
982
+ children: /* @__PURE__ */ e(
983
+ "path",
984
+ {
985
+ strokeLinecap: "round",
986
+ strokeLinejoin: "round",
987
+ d: "M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"
988
+ }
989
+ )
990
+ }
991
+ ) : /* @__PURE__ */ e(
992
+ "svg",
993
+ {
994
+ className: E,
995
+ fill: "none",
996
+ viewBox: "0 0 24 24",
997
+ stroke: "currentColor",
998
+ strokeWidth: 1.5,
999
+ children: /* @__PURE__ */ e(
1000
+ "path",
1001
+ {
1002
+ strokeLinecap: "round",
1003
+ strokeLinejoin: "round",
1004
+ d: "M8 12h.01M12 12h.01M16 12h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z"
1005
+ }
1006
+ )
1007
+ }
956
1008
  );
957
- }), Ie = {
958
- text: ({ content: r, sender: t, timestamp: n }) => r.type !== "text" ? null : /* @__PURE__ */ e(ye, { text: r.text, sender: t, timestamp: n }),
959
- userReply: ({ content: r, timestamp: t }) => r.type !== "userReply" ? null : /* @__PURE__ */ e(we, { text: r.text, timestamp: t }),
960
- richcard: ({ content: r, timestamp: t }) => r.type !== "richcard" ? null : /* @__PURE__ */ e(ve, { card: r.card, timestamp: t }),
961
- carousel: ({ content: r, timestamp: t }) => r.type !== "carousel" ? null : /* @__PURE__ */ e(ze, { cards: r.cards, timestamp: t })
962
- }, Te = g(function({
963
- message: t,
964
- isLast: n
1009
+ }, Ie = p(function({
1010
+ card: r,
1011
+ isDark: t,
1012
+ onSuggestionClick: o
965
1013
  }) {
966
- const { content: o, sender: s, timestamp: a } = t, i = Ie[o.type];
967
- return i ? /* @__PURE__ */ e(
968
- i,
1014
+ const a = r.layout.width === "small" ? "rcs-emulator-w-44" : "rcs-emulator-w-52", c = t ? "rcs-emulator-dark" : "rcs-emulator-light";
1015
+ return /* @__PURE__ */ n("div", { className: `rcs-emulator-carousel-card ${a} ${c}`, children: [
1016
+ r.media && /* @__PURE__ */ e("div", { className: "rcs-emulator-w-full rcs-emulator-h-32 rcs-emulator-bg-gray-200 rcs-emulator-overflow-hidden", children: /* @__PURE__ */ e(
1017
+ "img",
1018
+ {
1019
+ src: r.media.url,
1020
+ alt: r.title || "Carousel card media",
1021
+ className: "rcs-emulator-w-full rcs-emulator-h-full rcs-emulator-object-cover",
1022
+ loading: "lazy"
1023
+ }
1024
+ ) }),
1025
+ /* @__PURE__ */ n("div", { className: "rcs-emulator-p-3", children: [
1026
+ r.title && /* @__PURE__ */ e(
1027
+ "h4",
1028
+ {
1029
+ className: `rcs-emulator-text-sm rcs-emulator-font-semibold rcs-emulator-leading-tight rcs-emulator-mb-1 rcs-emulator-line-clamp-2 ${t ? "rcs-emulator-text-white" : "rcs-emulator-text-gray-900"}`,
1030
+ children: r.title
1031
+ }
1032
+ ),
1033
+ r.description && /* @__PURE__ */ e(
1034
+ "p",
1035
+ {
1036
+ className: `rcs-emulator-text-xs rcs-emulator-leading-relaxed rcs-emulator-line-clamp-3 ${t ? "rcs-emulator-text-zinc-400" : "rcs-emulator-text-gray-700"}`,
1037
+ children: r.description
1038
+ }
1039
+ ),
1040
+ r.suggestions && r.suggestions.length > 0 && /* @__PURE__ */ e(
1041
+ "div",
1042
+ {
1043
+ className: `rcs-emulator-carousel-actions rcs-emulator-mt-3 rcs-emulator-divide-y ${t ? "rcs-emulator-divide-zinc-600" : "rcs-emulator-divide-gray-100"} ${c}`,
1044
+ children: r.suggestions.map((l, u) => {
1045
+ const i = I(l) ? l.action.displayText : l.reply.displayText;
1046
+ return /* @__PURE__ */ n(
1047
+ "button",
1048
+ {
1049
+ onClick: () => o(l),
1050
+ className: `rcs-emulator-w-full rcs-emulator-flex rcs-emulator-items-center rcs-emulator-gap-2 rcs-emulator-px-3 rcs-emulator-py-2-5 rcs-emulator-text-xs rcs-emulator-transition-colors rcs-emulator-text-left rcs-emulator-border-none ${t ? "rcs-emulator-hover-bg-zinc-700 rcs-emulator-text-white" : "rcs-emulator-hover-bg-gray-50 rcs-emulator-text-gray-900"}`,
1051
+ children: [
1052
+ /* @__PURE__ */ e("span", { className: "rcs-emulator-flex-shrink-0", children: Ae(l) }),
1053
+ /* @__PURE__ */ e("span", { className: "rcs-emulator-truncate", children: i })
1054
+ ]
1055
+ },
1056
+ u
1057
+ );
1058
+ })
1059
+ }
1060
+ )
1061
+ ] })
1062
+ ] });
1063
+ }), ze = {
1064
+ text: ({ content: s, sender: r, timestamp: t }) => s.type !== "text" ? null : /* @__PURE__ */ e(ve, { text: s.text, sender: r, timestamp: t }),
1065
+ userReply: ({ content: s, timestamp: r }) => s.type !== "userReply" ? null : /* @__PURE__ */ e(ye, { text: s.text, timestamp: r }),
1066
+ richcard: ({ content: s, timestamp: r }) => s.type !== "richcard" ? null : /* @__PURE__ */ e(we, { card: s.card, timestamp: r }),
1067
+ carousel: ({ content: s, timestamp: r }) => s.type !== "carousel" ? null : /* @__PURE__ */ e($e, { cards: s.cards, timestamp: r })
1068
+ }, Te = p(function({
1069
+ message: r,
1070
+ isLast: t
1071
+ }) {
1072
+ const { content: o, sender: a, timestamp: c } = r, l = ze[o.type];
1073
+ return l ? /* @__PURE__ */ e(
1074
+ l,
969
1075
  {
970
1076
  content: o,
971
- sender: s,
972
- timestamp: a,
973
- showSuggestions: n && s === "business"
1077
+ sender: a,
1078
+ timestamp: c,
1079
+ showSuggestions: t && a === "business"
974
1080
  }
975
- ) : (console.warn(`Unknown message type: ${o.type}`), /* @__PURE__ */ e("div", { className: "px-4 py-2 text-gray-500 text-sm italic", children: "[Unsupported message type]" }));
976
- }), je = g(function() {
977
- const { theme: t } = N(), n = t === "dark";
1081
+ ) : (console.warn(`Unknown message type: ${o.type}`), /* @__PURE__ */ e("div", { className: "rcs-emulator-px-4 rcs-emulator-py-2 rcs-emulator-text-gray-500 rcs-emulator-text-sm rcs-emulator-italic", children: "[Unsupported message type]" }));
1082
+ }), Se = p(function() {
1083
+ const { theme: r } = k(), t = r === "dark";
978
1084
  return /* @__PURE__ */ e(
979
1085
  "div",
980
1086
  {
981
- className: "flex items-start gap-2 px-4 py-2",
1087
+ className: "rcs-emulator-flex rcs-emulator-items-start rcs-emulator-gap-2 rcs-emulator-px-4 rcs-emulator-py-2",
982
1088
  role: "status",
983
1089
  "aria-label": "Business is typing",
984
- children: /* @__PURE__ */ l(
1090
+ children: /* @__PURE__ */ n(
985
1091
  "div",
986
1092
  {
987
- className: `
988
- inline-flex items-center gap-1 px-4 py-3 rounded-2xl rounded-bl-sm
989
- ${n ? "bg-zinc-800" : "bg-gray-100"}
990
- `,
1093
+ className: `rcs-emulator-inline-flex rcs-emulator-items-center rcs-emulator-gap-1 rcs-emulator-px-4 rcs-emulator-py-3 rcs-emulator-rounded-2xl rcs-emulator-rounded-bl-sm rcs-emulator-typing-bubble ${t ? "rcs-emulator-dark" : "rcs-emulator-light"}`,
991
1094
  children: [
992
1095
  /* @__PURE__ */ e(
993
1096
  "span",
994
1097
  {
995
- className: `
996
- rcs-typing-dot w-2 h-2 rounded-full
997
- ${n ? "bg-zinc-500" : "bg-gray-400"}
998
- `
1098
+ className: `rcs-emulator-typing-dot rcs-emulator-w-2 rcs-emulator-h-2 rcs-emulator-rounded-full ${t ? "rcs-emulator-bg-zinc-500" : "rcs-emulator-bg-gray-400"}`
999
1099
  }
1000
1100
  ),
1001
1101
  /* @__PURE__ */ e(
1002
1102
  "span",
1003
1103
  {
1004
- className: `
1005
- rcs-typing-dot w-2 h-2 rounded-full
1006
- ${n ? "bg-zinc-500" : "bg-gray-400"}
1007
- `
1104
+ className: `rcs-emulator-typing-dot rcs-emulator-w-2 rcs-emulator-h-2 rcs-emulator-rounded-full ${t ? "rcs-emulator-bg-zinc-500" : "rcs-emulator-bg-gray-400"}`
1008
1105
  }
1009
1106
  ),
1010
1107
  /* @__PURE__ */ e(
1011
1108
  "span",
1012
1109
  {
1013
- className: `
1014
- rcs-typing-dot w-2 h-2 rounded-full
1015
- ${n ? "bg-zinc-500" : "bg-gray-400"}
1016
- `
1110
+ className: `rcs-emulator-typing-dot rcs-emulator-w-2 rcs-emulator-h-2 rcs-emulator-rounded-full ${t ? "rcs-emulator-bg-zinc-500" : "rcs-emulator-bg-gray-400"}`
1017
1111
  }
1018
1112
  )
1019
1113
  ]
@@ -1021,53 +1115,45 @@ const xe = g(function() {
1021
1115
  )
1022
1116
  }
1023
1117
  );
1024
- }), Se = g(function() {
1025
- const { theme: t, state: n } = N(), { chatHistory: o, isTyping: s } = n, a = t === "dark";
1026
- return /* @__PURE__ */ l(
1118
+ }), Ee = p(function() {
1119
+ const { theme: r, state: t } = k(), { chatHistory: o, isTyping: a } = t, c = r === "dark", l = c ? "rcs-emulator-dark" : "rcs-emulator-light";
1120
+ return /* @__PURE__ */ n(
1027
1121
  "div",
1028
1122
  {
1029
- className: "px-3 pb-3 space-y-3",
1123
+ className: "rcs-emulator-px-3 rcs-emulator-pb-3 rcs-emulator-space-y-3",
1030
1124
  role: "log",
1031
1125
  "aria-label": "Chat messages",
1032
1126
  "aria-live": "polite",
1033
1127
  children: [
1034
- o.length > 0 && /* @__PURE__ */ e("div", { className: "flex justify-center py-2", children: /* @__PURE__ */ e(
1128
+ o.length > 0 && /* @__PURE__ */ e("div", { className: "rcs-emulator-flex rcs-emulator-justify-center rcs-emulator-py-2", children: /* @__PURE__ */ e(
1035
1129
  "span",
1036
1130
  {
1037
- className: `
1038
- text-xs font-medium px-3 py-1
1039
- ${a ? "text-zinc-500" : "text-gray-500"}
1040
- `,
1131
+ className: `rcs-emulator-text-xs rcs-emulator-font-medium rcs-emulator-px-3 rcs-emulator-py-1 ${c ? "rcs-emulator-text-zinc-500" : "rcs-emulator-text-gray-500"}`,
1041
1132
  children: "Today"
1042
1133
  }
1043
1134
  ) }),
1044
- /* @__PURE__ */ l(
1135
+ /* @__PURE__ */ n(
1045
1136
  "div",
1046
1137
  {
1047
- className: `
1048
- rounded-3xl overflow-hidden
1049
- ${a ? "bg-zinc-900" : "bg-gray-50"}
1050
- `,
1138
+ className: `rcs-emulator-messages-container ${l}`,
1051
1139
  children: [
1052
- o.length === 0 && !s && /* @__PURE__ */ e("div", { className: "flex items-center justify-center py-12", children: /* @__PURE__ */ e("p", { className: `text-sm ${a ? "text-zinc-500" : "text-gray-400"}`, children: "No messages yet" }) }),
1053
- /* @__PURE__ */ l("div", { className: "p-3 space-y-3", children: [
1054
- o.map((i, u) => /* @__PURE__ */ e(
1140
+ o.length === 0 && !a && /* @__PURE__ */ e("div", { className: "rcs-emulator-flex rcs-emulator-items-center rcs-emulator-justify-center rcs-emulator-py-12", children: /* @__PURE__ */ e("p", { className: `rcs-emulator-text-sm ${c ? "rcs-emulator-text-zinc-500" : "rcs-emulator-text-gray-400"}`, children: "No messages yet" }) }),
1141
+ /* @__PURE__ */ n("div", { className: "rcs-emulator-p-3 rcs-emulator-space-y-3", children: [
1142
+ o.map((u, m) => /* @__PURE__ */ e(
1055
1143
  "div",
1056
1144
  {
1057
- className: `
1058
- ${i.sender === "user" ? "flex justify-end" : "flex justify-start"}
1059
- `,
1145
+ className: `rcs-emulator-flex ${u.sender === "user" ? "rcs-emulator-justify-end" : "rcs-emulator-justify-start"}`,
1060
1146
  children: /* @__PURE__ */ e(
1061
1147
  Te,
1062
1148
  {
1063
- message: i,
1064
- isLast: u === o.length - 1 && !s
1149
+ message: u,
1150
+ isLast: m === o.length - 1 && !a
1065
1151
  }
1066
1152
  )
1067
1153
  },
1068
- i.id
1154
+ u.id
1069
1155
  )),
1070
- s && /* @__PURE__ */ e(je, {})
1156
+ a && /* @__PURE__ */ e(Se, {})
1071
1157
  ] })
1072
1158
  ]
1073
1159
  }
@@ -1075,52 +1161,50 @@ const xe = g(function() {
1075
1161
  ]
1076
1162
  }
1077
1163
  );
1078
- }), Ee = g(function({
1079
- suggestion: t,
1080
- onClick: n,
1164
+ }), je = p(function({
1165
+ suggestion: r,
1166
+ onClick: t,
1081
1167
  variant: o = "bar"
1082
1168
  }) {
1083
- const { theme: s, businessInfo: a } = N(), i = s === "dark", u = $(t), c = u ? t.action.displayText : t.reply.displayText, d = u ? Be(t) : null, m = a.brandColor || "#0084ff";
1084
- return o === "bar" ? /* @__PURE__ */ l(
1169
+ const { theme: a, businessInfo: c } = k(), l = a === "dark", u = I(r), m = u ? r.action.displayText : r.reply.displayText, i = u ? Be(r) : null, h = c.brandColor || "#1A73E8", f = l ? "rcs-emulator-dark" : "rcs-emulator-light";
1170
+ return o === "bar" ? /* @__PURE__ */ n(
1085
1171
  "button",
1086
1172
  {
1087
1173
  type: "button",
1088
- onClick: n,
1089
- className: `
1090
- inline-flex items-center gap-2 px-4 py-2 rounded-full text-sm font-medium
1091
- whitespace-nowrap transition-colors flex-shrink-0
1092
- border
1093
- ${i ? "bg-zinc-800 border-zinc-700 hover:bg-zinc-700 text-white" : "bg-white border-gray-300 hover:bg-gray-50 text-gray-900"}
1094
- `,
1095
- "aria-label": u ? `${Re(t)}: ${c}` : c,
1174
+ onClick: t,
1175
+ className: `rcs-emulator-suggestion-chip rcs-emulator-inline-flex rcs-emulator-items-center rcs-emulator-gap-2 rcs-emulator-px-4 rcs-emulator-py-2 rcs-emulator-rounded-full rcs-emulator-text-sm rcs-emulator-font-medium rcs-emulator-whitespace-nowrap rcs-emulator-transition-colors rcs-emulator-flex-shrink-0 rcs-emulator-border ${f}`,
1176
+ "aria-label": u ? `${Re(r)}: ${m}` : m,
1096
1177
  children: [
1097
- d && /* @__PURE__ */ e("span", { style: { color: m }, children: /* @__PURE__ */ e(d, { className: "w-4 h-4" }) }),
1098
- /* @__PURE__ */ e("span", { children: c })
1178
+ i && /* @__PURE__ */ e("span", { style: { color: h }, children: /* @__PURE__ */ e(i, { className: "rcs-emulator-w-4 rcs-emulator-h-4" }) }),
1179
+ /* @__PURE__ */ e("span", { className: "rcs-emulator-text-sm rcs-emulator-font-medium", children: m })
1099
1180
  ]
1100
1181
  }
1101
- ) : o === "card" ? /* @__PURE__ */ l(
1182
+ ) : o === "card" ? /* @__PURE__ */ n(
1102
1183
  "button",
1103
1184
  {
1104
1185
  type: "button",
1105
- onClick: n,
1106
- className: `
1107
- w-full flex items-center gap-3 px-3 py-2.5 text-left transition-colors rounded-lg
1108
- ${i ? "hover:bg-zinc-700" : "hover:bg-gray-100"}
1109
- `,
1186
+ onClick: t,
1187
+ className: `rcs-emulator-w-full rcs-emulator-flex rcs-emulator-items-center rcs-emulator-gap-3 rcs-emulator-px-3 rcs-emulator-py-2-5 rcs-emulator-text-left rcs-emulator-transition-colors rcs-emulator-rounded-lg rcs-emulator-list-item rcs-emulator-border-none ${f}`,
1110
1188
  children: [
1111
- d && /* @__PURE__ */ e(
1189
+ i && /* @__PURE__ */ e(
1112
1190
  "div",
1113
1191
  {
1114
- className: "w-8 h-8 rounded-full flex items-center justify-center flex-shrink-0",
1115
- style: { backgroundColor: `${m}15` },
1116
- children: /* @__PURE__ */ e(d, { className: "w-4 h-4", style: { color: m } })
1192
+ className: "rcs-emulator-w-8 rcs-emulator-h-8 rcs-emulator-rounded-full rcs-emulator-flex rcs-emulator-items-center rcs-emulator-justify-center rcs-emulator-flex-shrink-0",
1193
+ style: { backgroundColor: `${h}15` },
1194
+ children: /* @__PURE__ */ e(
1195
+ i,
1196
+ {
1197
+ className: "rcs-emulator-w-4 rcs-emulator-h-4",
1198
+ style: { color: h }
1199
+ }
1200
+ )
1117
1201
  }
1118
1202
  ),
1119
1203
  /* @__PURE__ */ e(
1120
1204
  "span",
1121
1205
  {
1122
- className: `text-sm font-medium ${i ? "text-white" : "text-gray-900"}`,
1123
- children: c
1206
+ className: `rcs-emulator-text-sm rcs-emulator-font-medium ${l ? "rcs-emulator-text-white" : "rcs-emulator-text-gray-900"}`,
1207
+ children: m
1124
1208
  }
1125
1209
  )
1126
1210
  ]
@@ -1129,117 +1213,203 @@ const xe = g(function() {
1129
1213
  "button",
1130
1214
  {
1131
1215
  type: "button",
1132
- onClick: n,
1133
- className: `
1134
- w-full px-3 py-2 rounded-lg text-xs font-medium text-center
1135
- border transition-colors
1136
- ${i ? "border-zinc-600 hover:bg-zinc-700 text-white" : "border-gray-300 hover:bg-gray-50 text-gray-900"}
1137
- `,
1138
- children: c
1216
+ onClick: t,
1217
+ className: `rcs-emulator-w-full rcs-emulator-px-3 rcs-emulator-py-2 rcs-emulator-rounded-lg rcs-emulator-text-xs rcs-emulator-font-medium rcs-emulator-text-center rcs-emulator-border rcs-emulator-transition-colors ${l ? "rcs-emulator-border-zinc-600 rcs-emulator-hover-bg-zinc-700 rcs-emulator-text-white" : "rcs-emulator-border-gray-300 rcs-emulator-hover-bg-gray-50 rcs-emulator-text-gray-900"}`,
1218
+ children: m
1139
1219
  }
1140
1220
  );
1141
1221
  });
1142
- function Be(r) {
1143
- if (!$(r)) return null;
1144
- const { action: t } = r;
1145
- return t.openUrlAction ? ({ className: n, style: o }) => /* @__PURE__ */ e("svg", { className: n, style: o, fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: /* @__PURE__ */ e("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M21 12a9 9 0 01-9 9m9-9a9 9 0 00-9-9m9 9H3m9 9a9 9 0 01-9-9m9 9c1.657 0 3-4.03 3-9s-1.343-9-3-9m0 18c-1.657 0-3-4.03-3-9s1.343-9 3-9m-9 9a9 9 0 019-9" }) }) : t.dialAction ? ({ className: n, style: o }) => /* @__PURE__ */ e("svg", { className: n, style: o, fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: /* @__PURE__ */ e("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M3 5a2 2 0 012-2h3.28a1 1 0 01.948.684l1.498 4.493a1 1 0 01-.502 1.21l-2.257 1.13a11.042 11.042 0 005.516 5.516l1.13-2.257a1 1 0 011.21-.502l4.493 1.498a1 1 0 01.684.949V19a2 2 0 01-2 2h-1C9.716 21 3 14.284 3 6V5z" }) }) : t.shareLocationAction ? ({ className: n, style: o }) => /* @__PURE__ */ l("svg", { className: n, style: o, fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: [
1146
- /* @__PURE__ */ e("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M17.657 16.657L13.414 20.9a1.998 1.998 0 01-2.827 0l-4.244-4.243a8 8 0 1111.314 0z" }),
1147
- /* @__PURE__ */ e("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M15 11a3 3 0 11-6 0 3 3 0 016 0z" })
1148
- ] }) : t.viewLocationAction ? ({ className: n, style: o }) => /* @__PURE__ */ l("svg", { className: n, style: o, fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: [
1149
- /* @__PURE__ */ e("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M17.657 16.657L13.414 20.9a1.998 1.998 0 01-2.827 0l-4.244-4.243a8 8 0 1111.314 0z" }),
1150
- /* @__PURE__ */ e("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M15 11a3 3 0 11-6 0 3 3 0 016 0z" })
1151
- ] }) : t.createCalendarEventAction ? ({ className: n, style: o }) => /* @__PURE__ */ e("svg", { className: n, style: o, fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: /* @__PURE__ */ e("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z" }) }) : null;
1222
+ function Be(s) {
1223
+ if (!I(s)) return null;
1224
+ const { action: r } = s;
1225
+ return r.openUrlAction ? ({ className: t, style: o }) => /* @__PURE__ */ e(
1226
+ "svg",
1227
+ {
1228
+ className: t,
1229
+ style: o,
1230
+ fill: "none",
1231
+ viewBox: "0 0 24 24",
1232
+ stroke: "currentColor",
1233
+ strokeWidth: 2,
1234
+ children: /* @__PURE__ */ e(
1235
+ "path",
1236
+ {
1237
+ strokeLinecap: "round",
1238
+ strokeLinejoin: "round",
1239
+ d: "M21 12a9 9 0 01-9 9m9-9a9 9 0 00-9-9m9 9H3m9 9a9 9 0 01-9-9m9 9c1.657 0 3-4.03 3-9s-1.343-9-3-9m0 18c-1.657 0-3-4.03-3-9s1.343-9 3-9m-9 9a9 9 0 019-9"
1240
+ }
1241
+ )
1242
+ }
1243
+ ) : r.dialAction ? ({ className: t, style: o }) => /* @__PURE__ */ e(
1244
+ "svg",
1245
+ {
1246
+ className: t,
1247
+ style: o,
1248
+ fill: "none",
1249
+ viewBox: "0 0 24 24",
1250
+ stroke: "currentColor",
1251
+ strokeWidth: 2,
1252
+ children: /* @__PURE__ */ e(
1253
+ "path",
1254
+ {
1255
+ strokeLinecap: "round",
1256
+ strokeLinejoin: "round",
1257
+ d: "M3 5a2 2 0 012-2h3.28a1 1 0 01.948.684l1.498 4.493a1 1 0 01-.502 1.21l-2.257 1.13a11.042 11.042 0 005.516 5.516l1.13-2.257a1 1 0 011.21-.502l4.493 1.498a1 1 0 01.684.949V19a2 2 0 01-2 2h-1C9.716 21 3 14.284 3 6V5z"
1258
+ }
1259
+ )
1260
+ }
1261
+ ) : r.shareLocationAction ? ({ className: t, style: o }) => /* @__PURE__ */ n(
1262
+ "svg",
1263
+ {
1264
+ className: t,
1265
+ style: o,
1266
+ fill: "none",
1267
+ viewBox: "0 0 24 24",
1268
+ stroke: "currentColor",
1269
+ strokeWidth: 2,
1270
+ children: [
1271
+ /* @__PURE__ */ e(
1272
+ "path",
1273
+ {
1274
+ strokeLinecap: "round",
1275
+ strokeLinejoin: "round",
1276
+ d: "M17.657 16.657L13.414 20.9a1.998 1.998 0 01-2.827 0l-4.244-4.243a8 8 0 1111.314 0z"
1277
+ }
1278
+ ),
1279
+ /* @__PURE__ */ e(
1280
+ "path",
1281
+ {
1282
+ strokeLinecap: "round",
1283
+ strokeLinejoin: "round",
1284
+ d: "M15 11a3 3 0 11-6 0 3 3 0 016 0z"
1285
+ }
1286
+ )
1287
+ ]
1288
+ }
1289
+ ) : r.viewLocationAction ? ({ className: t, style: o }) => /* @__PURE__ */ n(
1290
+ "svg",
1291
+ {
1292
+ className: t,
1293
+ style: o,
1294
+ fill: "none",
1295
+ viewBox: "0 0 24 24",
1296
+ stroke: "currentColor",
1297
+ strokeWidth: 2,
1298
+ children: [
1299
+ /* @__PURE__ */ e(
1300
+ "path",
1301
+ {
1302
+ strokeLinecap: "round",
1303
+ strokeLinejoin: "round",
1304
+ d: "M17.657 16.657L13.414 20.9a1.998 1.998 0 01-2.827 0l-4.244-4.243a8 8 0 1111.314 0z"
1305
+ }
1306
+ ),
1307
+ /* @__PURE__ */ e(
1308
+ "path",
1309
+ {
1310
+ strokeLinecap: "round",
1311
+ strokeLinejoin: "round",
1312
+ d: "M15 11a3 3 0 11-6 0 3 3 0 016 0z"
1313
+ }
1314
+ )
1315
+ ]
1316
+ }
1317
+ ) : r.createCalendarEventAction ? ({ className: t, style: o }) => /* @__PURE__ */ e(
1318
+ "svg",
1319
+ {
1320
+ className: t,
1321
+ style: o,
1322
+ fill: "none",
1323
+ viewBox: "0 0 24 24",
1324
+ stroke: "currentColor",
1325
+ strokeWidth: 2,
1326
+ children: /* @__PURE__ */ e(
1327
+ "path",
1328
+ {
1329
+ strokeLinecap: "round",
1330
+ strokeLinejoin: "round",
1331
+ d: "M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"
1332
+ }
1333
+ )
1334
+ }
1335
+ ) : null;
1152
1336
  }
1153
- function Re(r) {
1154
- if (!$(r)) return "Reply";
1155
- const { action: t } = r;
1156
- return t.openUrlAction ? "Open link" : t.dialAction ? "Call" : t.shareLocationAction ? "Share location" : t.viewLocationAction ? "View location" : t.createCalendarEventAction ? "Add to calendar" : "Action";
1337
+ function Re(s) {
1338
+ if (!I(s)) return "Reply";
1339
+ const { action: r } = s;
1340
+ return r.openUrlAction ? "Open link" : r.dialAction ? "Call" : r.shareLocationAction ? "Share location" : r.viewLocationAction ? "View location" : r.createCalendarEventAction ? "Add to calendar" : "Action";
1157
1341
  }
1158
- const We = g(function({
1159
- suggestions: t
1342
+ const We = p(function({
1343
+ suggestions: r
1160
1344
  }) {
1161
- const { theme: n, handleReply: o, handleAction: s } = N(), a = n === "dark";
1162
- if (!t || t.length === 0)
1345
+ const { theme: t, handleReply: o, handleAction: a } = k(), c = t === "dark";
1346
+ if (!r || r.length === 0)
1163
1347
  return null;
1164
- const i = (u) => {
1165
- q(u) ? o(u) : $(u) && s(u);
1348
+ const l = (u) => {
1349
+ Y(u) ? o(u) : I(u) && a(u);
1166
1350
  };
1167
1351
  return /* @__PURE__ */ e(
1168
1352
  "div",
1169
1353
  {
1170
- className: `
1171
- px-3 py-2
1172
- ${a ? "bg-zinc-900" : "bg-white"}
1173
- `,
1354
+ className: `rcs-emulator-suggestions-bar rcs-emulator-px-3 rcs-emulator-py-2 ${c ? "rcs-emulator-dark" : "rcs-emulator-light"}`,
1174
1355
  role: "group",
1175
1356
  "aria-label": "Quick replies",
1176
1357
  children: /* @__PURE__ */ e(
1177
1358
  "div",
1178
1359
  {
1179
- className: "flex gap-2 overflow-x-auto pb-1 -mx-1 px-1",
1180
- style: { scrollbarWidth: "none", msOverflowStyle: "none" },
1181
- children: t.map((u, c) => /* @__PURE__ */ e(
1182
- Ee,
1360
+ className: "rcs-emulator-flex rcs-emulator-gap-2 rcs-emulator-overflow-x-auto rcs-emulator-pb-1 rcs-emulator--mx-1 rcs-emulator-px-1 rcs-emulator-scrollbar-hide",
1361
+ children: r.map((u, m) => /* @__PURE__ */ e(
1362
+ je,
1183
1363
  {
1184
1364
  suggestion: u,
1185
- onClick: () => i(u),
1365
+ onClick: () => l(u),
1186
1366
  variant: "bar"
1187
1367
  },
1188
- c
1368
+ m
1189
1369
  ))
1190
1370
  }
1191
1371
  )
1192
1372
  }
1193
1373
  );
1194
- }), Ve = g(function() {
1195
- const { theme: t, state: n, showSuggestions: o } = N(), { chatHistory: s, isTyping: a, error: i } = n, u = pe([
1196
- s.length,
1197
- a
1198
- ]), c = t === "dark", d = s[s.length - 1], m = o && d?.sender === "business" && !a ? d.suggestions : void 0;
1199
- return /* @__PURE__ */ l(
1374
+ }), Ve = p(function() {
1375
+ const { theme: r, state: t, showSuggestions: o } = k(), { chatHistory: a, isTyping: c, error: l } = t, u = ge([
1376
+ a.length,
1377
+ c
1378
+ ]), m = r === "dark", i = m ? "rcs-emulator-dark" : "rcs-emulator-light", h = a[a.length - 1], f = o && h?.sender === "business" && !c ? h.suggestions : void 0;
1379
+ return /* @__PURE__ */ n(
1200
1380
  "div",
1201
1381
  {
1202
- className: `
1203
- flex flex-col h-full w-full overflow-hidden
1204
- ${c ? "bg-zinc-950" : "bg-white"}
1205
- `,
1382
+ className: `rcs-emulator-flex rcs-emulator-flex-col rcs-emulator-h-full rcs-emulator-w-full rcs-emulator-overflow-hidden ${m ? "rcs-emulator-dark" : "rcs-emulator-light"}`,
1206
1383
  children: [
1207
1384
  /* @__PURE__ */ e(xe, {}),
1208
- i && /* @__PURE__ */ e(
1385
+ l && /* @__PURE__ */ e(
1209
1386
  "div",
1210
1387
  {
1211
- className: "px-4 py-2 bg-red-500/10 border-b border-red-500/20",
1388
+ className: "rcs-emulator-error-alert",
1212
1389
  role: "alert",
1213
- children: /* @__PURE__ */ e("p", { className: "text-sm text-red-500", children: i })
1390
+ children: /* @__PURE__ */ e("p", { className: "rcs-emulator-text-sm rcs-emulator-text-red-500", children: l })
1214
1391
  }
1215
1392
  ),
1216
- /* @__PURE__ */ l("div", { ref: u, className: "flex-1 overflow-y-auto rcs-scrollbar", children: [
1393
+ /* @__PURE__ */ n("div", { ref: u, className: "rcs-emulator-flex-1 rcs-emulator-overflow-y-auto rcs-emulator-scrollbar", children: [
1217
1394
  /* @__PURE__ */ e(be, {}),
1218
- /* @__PURE__ */ e(Se, {})
1395
+ /* @__PURE__ */ e(Ee, {})
1219
1396
  ] }),
1220
- m && m.length > 0 && /* @__PURE__ */ e(We, { suggestions: m }),
1221
- /* @__PURE__ */ l(
1397
+ f && f.length > 0 && /* @__PURE__ */ e(We, { suggestions: f }),
1398
+ /* @__PURE__ */ n(
1222
1399
  "div",
1223
1400
  {
1224
- className: `
1225
- px-3 py-2 flex items-center gap-2
1226
- ${c ? "bg-zinc-900" : "bg-white"}
1227
- `,
1401
+ className: `rcs-emulator-input-area ${i}`,
1228
1402
  children: [
1229
1403
  /* @__PURE__ */ e(
1230
1404
  "button",
1231
1405
  {
1232
1406
  type: "button",
1233
- className: `
1234
- w-9 h-9 flex items-center justify-center rounded-full flex-shrink-0
1235
- border transition-colors
1236
- ${c ? "border-zinc-700 text-zinc-400 hover:bg-zinc-800" : "border-gray-300 text-gray-500 hover:bg-gray-100"}
1237
- `,
1407
+ className: `rcs-emulator-add-btn ${i}`,
1238
1408
  "aria-label": "Add attachment",
1239
1409
  children: /* @__PURE__ */ e(
1240
1410
  "svg",
1241
1411
  {
1242
- className: "w-5 h-5",
1412
+ className: "rcs-emulator-w-5 rcs-emulator-h-5",
1243
1413
  fill: "none",
1244
1414
  viewBox: "0 0 24 24",
1245
1415
  stroke: "currentColor",
@@ -1256,18 +1426,15 @@ const We = g(function({
1256
1426
  )
1257
1427
  }
1258
1428
  ),
1259
- /* @__PURE__ */ l(
1429
+ /* @__PURE__ */ n(
1260
1430
  "div",
1261
1431
  {
1262
- className: `
1263
- flex-1 flex items-center gap-2 px-4 py-2 rounded-full
1264
- ${c ? "bg-zinc-800" : "bg-gray-100"}
1265
- `,
1432
+ className: `rcs-emulator-input-container ${i}`,
1266
1433
  children: [
1267
1434
  /* @__PURE__ */ e(
1268
1435
  "span",
1269
1436
  {
1270
- className: `flex-1 text-sm ${c ? "text-zinc-500" : "text-gray-400"}`,
1437
+ className: `rcs-emulator-flex-1 rcs-emulator-text-sm ${m ? "rcs-emulator-text-zinc-500" : "rcs-emulator-text-gray-400"}`,
1271
1438
  children: "RCS message"
1272
1439
  }
1273
1440
  ),
@@ -1275,12 +1442,12 @@ const We = g(function({
1275
1442
  "button",
1276
1443
  {
1277
1444
  type: "button",
1278
- className: `p-1 ${c ? "text-zinc-500" : "text-gray-400"}`,
1445
+ className: `rcs-emulator-p-1 ${m ? "rcs-emulator-text-zinc-500" : "rcs-emulator-text-gray-400"}`,
1279
1446
  "aria-label": "Emoji",
1280
1447
  children: /* @__PURE__ */ e(
1281
1448
  "svg",
1282
1449
  {
1283
- className: "w-5 h-5",
1450
+ className: "rcs-emulator-w-5 rcs-emulator-h-5",
1284
1451
  fill: "none",
1285
1452
  viewBox: "0 0 24 24",
1286
1453
  stroke: "currentColor",
@@ -1301,12 +1468,12 @@ const We = g(function({
1301
1468
  "button",
1302
1469
  {
1303
1470
  type: "button",
1304
- className: `p-1 ${c ? "text-zinc-500" : "text-gray-400"}`,
1471
+ className: `rcs-emulator-p-1 ${m ? "rcs-emulator-text-zinc-500" : "rcs-emulator-text-gray-400"}`,
1305
1472
  "aria-label": "Attach image",
1306
1473
  children: /* @__PURE__ */ e(
1307
1474
  "svg",
1308
1475
  {
1309
- className: "w-5 h-5",
1476
+ className: "rcs-emulator-w-5 rcs-emulator-h-5",
1310
1477
  fill: "none",
1311
1478
  viewBox: "0 0 24 24",
1312
1479
  stroke: "currentColor",
@@ -1330,9 +1497,9 @@ const We = g(function({
1330
1497
  "button",
1331
1498
  {
1332
1499
  type: "button",
1333
- className: "w-10 h-10 flex items-center justify-center rounded-full bg-green-100 text-green-600 flex-shrink-0",
1500
+ className: "rcs-emulator-voice-btn",
1334
1501
  "aria-label": "Voice message",
1335
- children: /* @__PURE__ */ e("svg", { className: "w-5 h-5", fill: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ e("path", { d: "M12 14c1.66 0 3-1.34 3-3V5c0-1.66-1.34-3-3-3S9 3.34 9 5v6c0 1.66 1.34 3 3 3zm-1 1.93c-3.94-.49-7-3.85-7-7.93h2c0 3.31 2.69 6 6 6s6-2.69 6-6h2c0 4.08-3.06 7.44-7 7.93V20h4v2H8v-2h4v-4.07z" }) })
1502
+ children: /* @__PURE__ */ e("svg", { className: "rcs-emulator-w-5 rcs-emulator-h-5", fill: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ e("path", { d: "M12 14c1.66 0 3-1.34 3-3V5c0-1.66-1.34-3-3-3S9 3.34 9 5v6c0 1.66 1.34 3 3 3zm-1 1.93c-3.94-.49-7-3.85-7-7.93h2c0 3.31 2.69 6 6 6s6-2.69 6-6h2c0 4.08-3.06 7.44-7 7.93V20h4v2H8v-2h4v-4.07z" }) })
1336
1503
  }
1337
1504
  )
1338
1505
  ]
@@ -1341,37 +1508,28 @@ const We = g(function({
1341
1508
  ]
1342
1509
  }
1343
1510
  );
1344
- }), He = g(function() {
1345
- const { theme: t, businessInfo: n, toggleProfile: o } = N(), [s, a] = z("info"), i = t === "dark", u = n.bannerImage || "https://images.unsplash.com/photo-1436491865332-7a61a109cc05?w=800&q=80", c = n.brandColor || "#0084ff";
1346
- return /* @__PURE__ */ l(
1511
+ }), He = p(function() {
1512
+ const { theme: r, businessInfo: t, toggleProfile: o } = k(), [a, c] = A("info"), l = r === "dark", u = t.bannerImage || "https://images.unsplash.com/photo-1436491865332-7a61a109cc05?w=800&q=80", m = t.brandColor || "#0084ff";
1513
+ return /* @__PURE__ */ n(
1347
1514
  "div",
1348
1515
  {
1349
- className: `
1350
- absolute inset-0 z-50 flex flex-col
1351
- ${i ? "bg-zinc-950" : "bg-white"}
1352
- `,
1516
+ className: `rcs-emulator-absolute rcs-emulator-inset-0 rcs-emulator-z-50 rcs-emulator-flex rcs-emulator-flex-col ${l ? "rcs-emulator-bg-zinc-950" : "rcs-emulator-bg-white"}`,
1353
1517
  children: [
1354
- /* @__PURE__ */ l(
1518
+ /* @__PURE__ */ n(
1355
1519
  "header",
1356
1520
  {
1357
- className: `
1358
- flex items-center gap-3 px-4 py-3 border-b
1359
- ${i ? "bg-zinc-900 border-zinc-800" : "bg-white border-gray-200"}
1360
- `,
1521
+ className: `rcs-emulator-flex rcs-emulator-items-center rcs-emulator-gap-3 rcs-emulator-px-4 rcs-emulator-py-3 rcs-emulator-border-b ${l ? "rcs-emulator-bg-zinc-900 rcs-emulator-border-zinc-800" : "rcs-emulator-bg-white rcs-emulator-border-gray-200"}`,
1361
1522
  children: [
1362
1523
  /* @__PURE__ */ e(
1363
1524
  "button",
1364
1525
  {
1365
1526
  onClick: o,
1366
- className: `
1367
- p-1.5 -ml-1.5 rounded-full transition-colors
1368
- ${i ? "hover:bg-zinc-800 text-white" : "hover:bg-gray-100 text-gray-900"}
1369
- `,
1527
+ className: `rcs-emulator-p-1-5 rcs-emulator--ml-1-5 rcs-emulator-rounded-full rcs-emulator-transition-colors ${l ? "rcs-emulator-hover-bg-zinc-800 rcs-emulator-text-white" : "rcs-emulator-hover-bg-gray-100 rcs-emulator-text-gray-900"}`,
1370
1528
  "aria-label": "Go back",
1371
1529
  children: /* @__PURE__ */ e(
1372
1530
  "svg",
1373
1531
  {
1374
- className: "w-5 h-5",
1532
+ className: "rcs-emulator-w-5 rcs-emulator-h-5",
1375
1533
  fill: "none",
1376
1534
  viewBox: "0 0 24 24",
1377
1535
  stroke: "currentColor",
@@ -1391,158 +1549,147 @@ const We = g(function({
1391
1549
  /* @__PURE__ */ e(
1392
1550
  "span",
1393
1551
  {
1394
- className: `text-base font-medium ${i ? "text-white" : "text-gray-900"}`,
1552
+ className: `rcs-emulator-text-base rcs-emulator-font-medium ${l ? "rcs-emulator-text-white" : "rcs-emulator-text-gray-900"}`,
1395
1553
  children: "Info & options"
1396
1554
  }
1397
1555
  )
1398
1556
  ]
1399
1557
  }
1400
1558
  ),
1401
- /* @__PURE__ */ l("div", { className: "flex-1 overflow-y-auto", children: [
1402
- /* @__PURE__ */ e("div", { className: "relative h-40 bg-gray-200", children: /* @__PURE__ */ e(
1559
+ /* @__PURE__ */ n("div", { className: "rcs-emulator-flex-1 rcs-emulator-overflow-y-auto", children: [
1560
+ /* @__PURE__ */ e("div", { className: "rcs-emulator-relative rcs-emulator-h-40 rcs-emulator-bg-gray-200", children: /* @__PURE__ */ e(
1403
1561
  "img",
1404
1562
  {
1405
1563
  src: u,
1406
1564
  alt: "Business banner",
1407
- className: "w-full h-full object-cover"
1565
+ className: "rcs-emulator-w-full rcs-emulator-h-full rcs-emulator-object-cover"
1408
1566
  }
1409
1567
  ) }),
1410
- /* @__PURE__ */ e("div", { className: "relative px-4", children: /* @__PURE__ */ e(
1568
+ /* @__PURE__ */ e("div", { className: "rcs-emulator-relative rcs-emulator-px-4", children: /* @__PURE__ */ e(
1411
1569
  "div",
1412
1570
  {
1413
- className: `
1414
- absolute -top-10 left-1/2 -translate-x-1/2
1415
- w-20 h-20 rounded-full overflow-hidden border-4
1416
- ${i ? "border-zinc-950 bg-zinc-800" : "border-white bg-gray-100"}
1417
- shadow-lg
1418
- `,
1419
- children: n.logo ? /* @__PURE__ */ e(
1571
+ className: `rcs-emulator-absolute rcs-emulator--top-10 rcs-emulator-left-1-2 rcs-emulator--translate-x-1-2 rcs-emulator-w-20 rcs-emulator-h-20 rcs-emulator-rounded-full rcs-emulator-overflow-hidden rcs-emulator-border-4 ${l ? "rcs-emulator-border-zinc-950 rcs-emulator-bg-zinc-800" : "rcs-emulator-border-white rcs-emulator-bg-gray-100"} rcs-emulator-shadow-lg`,
1572
+ children: t.logo ? /* @__PURE__ */ e(
1420
1573
  "img",
1421
1574
  {
1422
- src: n.logo,
1423
- alt: `${n.name} logo`,
1424
- className: "w-full h-full object-cover"
1575
+ src: t.logo,
1576
+ alt: `${t.name} logo`,
1577
+ className: "rcs-emulator-w-full rcs-emulator-h-full rcs-emulator-object-cover"
1425
1578
  }
1426
1579
  ) : /* @__PURE__ */ e(
1427
1580
  "div",
1428
1581
  {
1429
- className: "w-full h-full flex items-center justify-center text-2xl font-bold text-white",
1430
- style: { backgroundColor: c },
1431
- children: n.name.charAt(0).toUpperCase()
1582
+ className: "rcs-emulator-w-full rcs-emulator-h-full rcs-emulator-flex rcs-emulator-items-center rcs-emulator-justify-center rcs-emulator-text-2xl rcs-emulator-font-bold rcs-emulator-text-white",
1583
+ style: { backgroundColor: m },
1584
+ children: t.name.charAt(0).toUpperCase()
1432
1585
  }
1433
1586
  )
1434
1587
  }
1435
1588
  ) }),
1436
- /* @__PURE__ */ l("div", { className: "pt-12 pb-4 px-4 text-center", children: [
1589
+ /* @__PURE__ */ n("div", { className: "rcs-emulator-pt-12 rcs-emulator-pb-4 rcs-emulator-px-4 rcs-emulator-text-center", children: [
1437
1590
  /* @__PURE__ */ e(
1438
1591
  "h1",
1439
1592
  {
1440
- className: `text-xl font-semibold ${i ? "text-white" : "text-gray-900"}`,
1441
- children: n.name
1593
+ className: `rcs-emulator-text-xl rcs-emulator-font-semibold ${l ? "rcs-emulator-text-white" : "rcs-emulator-text-gray-900"}`,
1594
+ children: t.name
1442
1595
  }
1443
1596
  ),
1444
- n.description && /* @__PURE__ */ e("p", { className: `text-sm mt-1 ${i ? "text-zinc-400" : "text-gray-500"}`, children: n.description })
1597
+ t.description && /* @__PURE__ */ e("p", { className: `rcs-emulator-text-sm rcs-emulator-mt-1 ${l ? "rcs-emulator-text-zinc-400" : "rcs-emulator-text-gray-500"}`, children: t.description })
1445
1598
  ] }),
1446
- /* @__PURE__ */ l("div", { className: "flex justify-center gap-4 px-4 pb-4", children: [
1447
- n.phoneNumbers && n.phoneNumbers.length > 0 && /* @__PURE__ */ e(
1599
+ /* @__PURE__ */ n("div", { className: "rcs-emulator-flex rcs-emulator-justify-center rcs-emulator-gap-4 rcs-emulator-px-4 rcs-emulator-pb-4", children: [
1600
+ t.phoneNumbers && t.phoneNumbers.length > 0 && /* @__PURE__ */ e(
1448
1601
  _,
1449
1602
  {
1450
1603
  icon: "phone",
1451
1604
  label: "Call",
1452
- isDark: i,
1453
- brandColor: c,
1605
+ isDark: l,
1606
+ brandColor: m,
1454
1607
  onClick: () => {
1455
- const d = n.phoneNumbers?.[0]?.number;
1456
- d && (window.location.href = `tel:${d}`);
1608
+ const i = t.phoneNumbers?.[0]?.number;
1609
+ i && (window.location.href = `tel:${i}`);
1457
1610
  }
1458
1611
  }
1459
1612
  ),
1460
- n.websites && n.websites.length > 0 && /* @__PURE__ */ e(
1613
+ t.websites && t.websites.length > 0 && /* @__PURE__ */ e(
1461
1614
  _,
1462
1615
  {
1463
1616
  icon: "globe",
1464
1617
  label: "Website",
1465
- isDark: i,
1466
- brandColor: c,
1618
+ isDark: l,
1619
+ brandColor: m,
1467
1620
  onClick: () => {
1468
- const d = n.websites?.[0]?.url;
1469
- d && window.open(d, "_blank", "noopener,noreferrer");
1621
+ const i = t.websites?.[0]?.url;
1622
+ i && window.open(i, "_blank", "noopener,noreferrer");
1470
1623
  }
1471
1624
  }
1472
1625
  ),
1473
- n.emails && n.emails.length > 0 && /* @__PURE__ */ e(
1626
+ t.emails && t.emails.length > 0 && /* @__PURE__ */ e(
1474
1627
  _,
1475
1628
  {
1476
1629
  icon: "mail",
1477
1630
  label: "Contact",
1478
- isDark: i,
1479
- brandColor: c,
1631
+ isDark: l,
1632
+ brandColor: m,
1480
1633
  onClick: () => {
1481
- const d = n.emails?.[0]?.email;
1482
- d && (window.location.href = `mailto:${d}`);
1634
+ const i = t.emails?.[0]?.email;
1635
+ i && (window.location.href = `mailto:${i}`);
1483
1636
  }
1484
1637
  }
1485
1638
  )
1486
1639
  ] }),
1487
- /* @__PURE__ */ l(
1640
+ /* @__PURE__ */ n(
1488
1641
  "div",
1489
1642
  {
1490
- className: `
1491
- flex mx-4 rounded-lg overflow-hidden border
1492
- ${i ? "border-zinc-700 bg-zinc-800" : "border-gray-200 bg-gray-100"}
1493
- `,
1643
+ className: `rcs-emulator-tabs-container rcs-emulator-flex rcs-emulator-mx-4 rcs-emulator-rounded-lg rcs-emulator-overflow-hidden rcs-emulator-border ${l ? "rcs-emulator-border-zinc-700 rcs-emulator-bg-zinc-800" : "rcs-emulator-border-gray-200 rcs-emulator-bg-gray-100"}`,
1494
1644
  children: [
1495
1645
  /* @__PURE__ */ e(
1496
1646
  F,
1497
1647
  {
1498
- active: s === "info",
1499
- onClick: () => a("info"),
1500
- isDark: i,
1501
- brandColor: c,
1648
+ active: a === "info",
1649
+ onClick: () => c("info"),
1650
+ isDark: l,
1651
+ brandColor: m,
1502
1652
  children: "Info"
1503
1653
  }
1504
1654
  ),
1505
1655
  /* @__PURE__ */ e(
1506
1656
  F,
1507
1657
  {
1508
- active: s === "options",
1509
- onClick: () => a("options"),
1510
- isDark: i,
1511
- brandColor: c,
1658
+ active: a === "options",
1659
+ onClick: () => c("options"),
1660
+ isDark: l,
1661
+ brandColor: m,
1512
1662
  children: "Options"
1513
1663
  }
1514
1664
  )
1515
1665
  ]
1516
1666
  }
1517
1667
  ),
1518
- /* @__PURE__ */ e("div", { className: "p-4", children: s === "info" ? /* @__PURE__ */ e(_e, { isDark: i, brandColor: c }) : /* @__PURE__ */ e(Ue, { isDark: i }) })
1668
+ /* @__PURE__ */ e("div", { className: "rcs-emulator-p-4", children: a === "info" ? /* @__PURE__ */ e(_e, { isDark: l, brandColor: m }) : /* @__PURE__ */ e(Ue, { isDark: l }) })
1519
1669
  ] })
1520
1670
  ]
1521
1671
  }
1522
1672
  );
1523
- }), _ = g(function({
1524
- icon: t,
1525
- label: n,
1673
+ }), _ = p(function({
1674
+ icon: r,
1675
+ label: t,
1526
1676
  isDark: o,
1527
- brandColor: s,
1528
- onClick: a
1677
+ brandColor: a,
1678
+ onClick: c
1529
1679
  }) {
1530
- return /* @__PURE__ */ l(
1680
+ return /* @__PURE__ */ n(
1531
1681
  "button",
1532
1682
  {
1533
- onClick: a,
1534
- className: `
1535
- flex flex-col items-center gap-2 px-6 py-3 rounded-xl border transition-colors
1536
- ${o ? "bg-zinc-800 border-zinc-700 hover:bg-zinc-700" : "bg-white border-gray-200 hover:bg-gray-50"}
1537
- `,
1683
+ onClick: c,
1684
+ className: `rcs-emulator-quick-action-btn rcs-emulator-flex rcs-emulator-flex-col rcs-emulator-items-center rcs-emulator-gap-2 rcs-emulator-px-6 rcs-emulator-py-3 rcs-emulator-rounded-xl rcs-emulator-border rcs-emulator-transition-colors ${o ? "rcs-emulator-dark" : "rcs-emulator-light"}`,
1538
1685
  children: [
1539
1686
  /* @__PURE__ */ e(
1540
1687
  "svg",
1541
1688
  {
1542
- className: "w-6 h-6",
1689
+ className: "rcs-emulator-w-6 rcs-emulator-h-6",
1543
1690
  fill: "none",
1544
1691
  viewBox: "0 0 24 24",
1545
- stroke: s,
1692
+ stroke: a,
1546
1693
  children: {
1547
1694
  phone: /* @__PURE__ */ e(
1548
1695
  "path",
@@ -1571,113 +1718,104 @@ const We = g(function({
1571
1718
  d: "M3 8l7.89 5.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z"
1572
1719
  }
1573
1720
  )
1574
- }[t]
1721
+ }[r]
1575
1722
  }
1576
1723
  ),
1577
1724
  /* @__PURE__ */ e(
1578
1725
  "span",
1579
1726
  {
1580
- className: `text-xs font-medium ${o ? "text-zinc-300" : "text-gray-600"}`,
1581
- children: n
1727
+ className: `rcs-emulator-text-xs rcs-emulator-font-medium ${o ? "rcs-emulator-text-zinc-300" : "rcs-emulator-text-gray-600"}`,
1728
+ children: t
1582
1729
  }
1583
1730
  )
1584
1731
  ]
1585
1732
  }
1586
1733
  );
1587
- }), F = g(function({
1588
- active: t,
1589
- onClick: n,
1734
+ }), F = p(function({
1735
+ active: r,
1736
+ onClick: t,
1590
1737
  isDark: o,
1591
- brandColor: s,
1592
- children: a
1738
+ brandColor: a,
1739
+ children: c
1593
1740
  }) {
1594
1741
  return /* @__PURE__ */ e(
1595
1742
  "button",
1596
1743
  {
1597
- onClick: n,
1598
- className: `
1599
- flex-1 py-2.5 text-sm font-medium transition-colors rounded-lg
1600
- ${t ? "text-white" : o ? "text-zinc-400 hover:text-zinc-200" : "text-gray-500 hover:text-gray-700"}
1601
- `,
1602
- style: t ? { backgroundColor: s } : void 0,
1603
- children: a
1744
+ onClick: t,
1745
+ className: `rcs-emulator-tab-btn rcs-emulator-flex-1 rcs-emulator-py-2-5 rcs-emulator-text-sm rcs-emulator-font-medium rcs-emulator-transition-colors rcs-emulator-rounded-lg ${r ? "rcs-emulator-active" : `rcs-emulator-inactive ${o ? "rcs-emulator-dark" : "rcs-emulator-light"}`}`,
1746
+ style: r ? { backgroundColor: a } : void 0,
1747
+ children: c
1604
1748
  }
1605
1749
  );
1606
- }), _e = g(function({ isDark: t, brandColor: n }) {
1607
- const { businessInfo: o } = N();
1608
- return o.phoneNumbers && o.phoneNumbers.length > 0 || o.websites && o.websites.length > 0 || o.emails && o.emails.length > 0 ? /* @__PURE__ */ l(
1750
+ }), _e = p(function({ isDark: r, brandColor: t }) {
1751
+ const { businessInfo: o } = k();
1752
+ return o.phoneNumbers && o.phoneNumbers.length > 0 || o.websites && o.websites.length > 0 || o.emails && o.emails.length > 0 ? /* @__PURE__ */ n(
1609
1753
  "div",
1610
1754
  {
1611
- className: `
1612
- rounded-xl overflow-hidden border divide-y
1613
- ${t ? "bg-zinc-900 border-zinc-800 divide-zinc-800" : "bg-gray-50 border-gray-200 divide-gray-200"}
1614
- `,
1755
+ className: `rcs-emulator-profile-section rcs-emulator-rounded-xl rcs-emulator-overflow-hidden rcs-emulator-border rcs-emulator-divide-y ${r ? "rcs-emulator-dark rcs-emulator-divide-zinc-800" : "rcs-emulator-light rcs-emulator-divide-gray-200"}`,
1615
1756
  children: [
1616
- o.phoneNumbers?.map((a, i) => /* @__PURE__ */ e(
1757
+ o.phoneNumbers?.map((c, l) => /* @__PURE__ */ e(
1617
1758
  U,
1618
1759
  {
1619
1760
  icon: "phone",
1620
- primary: a.number,
1621
- secondary: a.label,
1622
- isDark: t,
1623
- brandColor: n,
1624
- onClick: () => window.location.href = `tel:${a.number}`
1761
+ primary: c.number,
1762
+ secondary: c.label,
1763
+ isDark: r,
1764
+ brandColor: t,
1765
+ onClick: () => window.location.href = `tel:${c.number}`
1625
1766
  },
1626
- `phone-${i}`
1767
+ `phone-${l}`
1627
1768
  )),
1628
- o.websites?.map((a, i) => /* @__PURE__ */ e(
1769
+ o.websites?.map((c, l) => /* @__PURE__ */ e(
1629
1770
  U,
1630
1771
  {
1631
1772
  icon: "globe",
1632
- primary: a.url.replace(/^https?:\/\//, ""),
1633
- secondary: a.label || "Website",
1634
- isDark: t,
1635
- brandColor: n,
1636
- onClick: () => window.open(a.url, "_blank", "noopener,noreferrer")
1773
+ primary: c.url.replace(/^https?:\/\//, ""),
1774
+ secondary: c.label || "Website",
1775
+ isDark: r,
1776
+ brandColor: t,
1777
+ onClick: () => window.open(c.url, "_blank", "noopener,noreferrer")
1637
1778
  },
1638
- `web-${i}`
1779
+ `web-${l}`
1639
1780
  )),
1640
- o.emails?.map((a, i) => /* @__PURE__ */ e(
1781
+ o.emails?.map((c, l) => /* @__PURE__ */ e(
1641
1782
  U,
1642
1783
  {
1643
1784
  icon: "mail",
1644
- primary: a.email,
1645
- secondary: a.label || "Email",
1646
- isDark: t,
1647
- brandColor: n,
1648
- onClick: () => window.location.href = `mailto:${a.email}`
1785
+ primary: c.email,
1786
+ secondary: c.label || "Email",
1787
+ isDark: r,
1788
+ brandColor: t,
1789
+ onClick: () => window.location.href = `mailto:${c.email}`
1649
1790
  },
1650
- `email-${i}`
1791
+ `email-${l}`
1651
1792
  ))
1652
1793
  ]
1653
1794
  }
1654
1795
  ) : /* @__PURE__ */ e(
1655
1796
  "div",
1656
1797
  {
1657
- className: `text-center py-8 ${t ? "text-zinc-500" : "text-gray-400"}`,
1798
+ className: `rcs-emulator-text-center rcs-emulator-py-8 ${r ? "rcs-emulator-text-zinc-500" : "rcs-emulator-text-gray-400"}`,
1658
1799
  children: "No contact information available"
1659
1800
  }
1660
1801
  );
1661
- }), U = g(function({
1662
- icon: t,
1663
- primary: n,
1802
+ }), U = p(function({
1803
+ icon: r,
1804
+ primary: t,
1664
1805
  secondary: o,
1665
- isDark: s,
1666
- onClick: a
1806
+ isDark: a,
1807
+ onClick: c
1667
1808
  }) {
1668
- return /* @__PURE__ */ l(
1809
+ return /* @__PURE__ */ n(
1669
1810
  "button",
1670
1811
  {
1671
- onClick: a,
1672
- className: `
1673
- w-full flex items-center gap-4 px-4 py-3.5 text-left transition-colors
1674
- ${s ? "hover:bg-zinc-800" : "hover:bg-gray-100"}
1675
- `,
1812
+ onClick: c,
1813
+ className: `rcs-emulator-list-item rcs-emulator-w-full rcs-emulator-flex rcs-emulator-items-center rcs-emulator-gap-4 rcs-emulator-px-4 rcs-emulator-py-3-5 rcs-emulator-text-left rcs-emulator-transition-colors ${a ? "rcs-emulator-dark" : "rcs-emulator-light"}`,
1676
1814
  children: [
1677
1815
  /* @__PURE__ */ e(
1678
1816
  "svg",
1679
1817
  {
1680
- className: `w-5 h-5 flex-shrink-0 ${s ? "text-zinc-500" : "text-gray-400"}`,
1818
+ className: `rcs-emulator-w-5 rcs-emulator-h-5 rcs-emulator-flex-shrink-0 ${a ? "rcs-emulator-text-zinc-500" : "rcs-emulator-text-gray-400"}`,
1681
1819
  fill: "none",
1682
1820
  viewBox: "0 0 24 24",
1683
1821
  stroke: "currentColor",
@@ -1691,23 +1829,23 @@ const We = g(function({
1691
1829
  phone: "M3 5a2 2 0 012-2h3.28a1 1 0 01.948.684l1.498 4.493a1 1 0 01-.502 1.21l-2.257 1.13a11.042 11.042 0 005.516 5.516l1.13-2.257a1 1 0 011.21-.502l4.493 1.498a1 1 0 01.684.949V19a2 2 0 01-2 2h-1C9.716 21 3 14.284 3 6V5z",
1692
1830
  globe: "M21 12a9 9 0 01-9 9m9-9a9 9 0 00-9-9m9 9H3m9 9a9 9 0 01-9-9m9 9c1.657 0 3-4.03 3-9s-1.343-9-3-9m0 18c-1.657 0-3-4.03-3-9s1.343-9 3-9m-9 9a9 9 0 019-9",
1693
1831
  mail: "M3 8l7.89 5.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z"
1694
- }[t]
1832
+ }[r]
1695
1833
  }
1696
1834
  )
1697
1835
  }
1698
1836
  ),
1699
- /* @__PURE__ */ l("div", { className: "flex-1 min-w-0", children: [
1837
+ /* @__PURE__ */ n("div", { className: "rcs-emulator-flex-1 rcs-emulator-min-w-0", children: [
1700
1838
  /* @__PURE__ */ e(
1701
1839
  "p",
1702
1840
  {
1703
- className: `text-sm font-medium truncate ${s ? "text-white" : "text-gray-900"}`,
1704
- children: n
1841
+ className: `rcs-emulator-text-sm rcs-emulator-font-medium rcs-emulator-truncate ${a ? "rcs-emulator-text-white" : "rcs-emulator-text-gray-900"}`,
1842
+ children: t
1705
1843
  }
1706
1844
  ),
1707
1845
  o && /* @__PURE__ */ e(
1708
1846
  "p",
1709
1847
  {
1710
- className: `text-xs truncate ${s ? "text-zinc-500" : "text-gray-500"}`,
1848
+ className: `rcs-emulator-text-xs rcs-emulator-truncate ${a ? "rcs-emulator-text-zinc-500" : "rcs-emulator-text-gray-500"}`,
1711
1849
  children: o
1712
1850
  }
1713
1851
  )
@@ -1715,21 +1853,18 @@ const We = g(function({
1715
1853
  ]
1716
1854
  }
1717
1855
  );
1718
- }), Ue = g(function({ isDark: t }) {
1719
- return /* @__PURE__ */ l(
1856
+ }), Ue = p(function({ isDark: r }) {
1857
+ return /* @__PURE__ */ n(
1720
1858
  "div",
1721
1859
  {
1722
- className: `
1723
- rounded-xl overflow-hidden border divide-y
1724
- ${t ? "bg-zinc-900 border-zinc-800 divide-zinc-800" : "bg-gray-50 border-gray-200 divide-gray-200"}
1725
- `,
1860
+ className: `rcs-emulator-profile-section rcs-emulator-rounded-xl rcs-emulator-overflow-hidden rcs-emulator-border rcs-emulator-divide-y ${r ? "rcs-emulator-dark rcs-emulator-divide-zinc-800" : "rcs-emulator-light rcs-emulator-divide-gray-200"}`,
1726
1861
  children: [
1727
1862
  /* @__PURE__ */ e(
1728
1863
  D,
1729
1864
  {
1730
1865
  icon: "bell",
1731
1866
  label: "Notifications",
1732
- isDark: t
1867
+ isDark: r
1733
1868
  }
1734
1869
  ),
1735
1870
  /* @__PURE__ */ e(
@@ -1737,7 +1872,7 @@ const We = g(function({
1737
1872
  {
1738
1873
  icon: "block",
1739
1874
  label: "Block & report spam",
1740
- isDark: t
1875
+ isDark: r
1741
1876
  }
1742
1877
  ),
1743
1878
  /* @__PURE__ */ e(
@@ -1745,29 +1880,26 @@ const We = g(function({
1745
1880
  {
1746
1881
  icon: "info",
1747
1882
  label: "About RCS",
1748
- isDark: t
1883
+ isDark: r
1749
1884
  }
1750
1885
  )
1751
1886
  ]
1752
1887
  }
1753
1888
  );
1754
- }), D = g(function({
1755
- icon: t,
1756
- label: n,
1889
+ }), D = p(function({
1890
+ icon: r,
1891
+ label: t,
1757
1892
  isDark: o
1758
1893
  }) {
1759
- return /* @__PURE__ */ l(
1894
+ return /* @__PURE__ */ n(
1760
1895
  "button",
1761
1896
  {
1762
- className: `
1763
- w-full flex items-center gap-4 px-4 py-3.5 text-left transition-colors
1764
- ${o ? "hover:bg-zinc-800" : "hover:bg-gray-100"}
1765
- `,
1897
+ className: `rcs-emulator-list-item rcs-emulator-w-full rcs-emulator-flex rcs-emulator-items-center rcs-emulator-gap-4 rcs-emulator-px-4 rcs-emulator-py-3-5 rcs-emulator-text-left rcs-emulator-transition-colors ${o ? "rcs-emulator-dark" : "rcs-emulator-light"}`,
1766
1898
  children: [
1767
1899
  /* @__PURE__ */ e(
1768
1900
  "svg",
1769
1901
  {
1770
- className: `w-5 h-5 flex-shrink-0 ${o ? "text-zinc-500" : "text-gray-400"}`,
1902
+ className: `rcs-emulator-w-5 rcs-emulator-h-5 rcs-emulator-flex-shrink-0 ${o ? "rcs-emulator-text-zinc-500" : "rcs-emulator-text-gray-400"}`,
1771
1903
  fill: "none",
1772
1904
  viewBox: "0 0 24 24",
1773
1905
  stroke: "currentColor",
@@ -1781,7 +1913,7 @@ const We = g(function({
1781
1913
  bell: "M15 17h5l-1.405-1.405A2.032 2.032 0 0118 14.158V11a6.002 6.002 0 00-4-5.659V5a2 2 0 10-4 0v.341C7.67 6.165 6 8.388 6 11v3.159c0 .538-.214 1.055-.595 1.436L4 17h5m6 0v1a3 3 0 11-6 0v-1m6 0H9",
1782
1914
  block: "M18.364 18.364A9 9 0 005.636 5.636m12.728 12.728A9 9 0 015.636 5.636m12.728 12.728L5.636 5.636",
1783
1915
  info: "M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"
1784
- }[t]
1916
+ }[r]
1785
1917
  }
1786
1918
  )
1787
1919
  }
@@ -1789,97 +1921,80 @@ const We = g(function({
1789
1921
  /* @__PURE__ */ e(
1790
1922
  "span",
1791
1923
  {
1792
- className: `text-sm font-medium ${o ? "text-white" : "text-gray-900"}`,
1793
- children: n
1924
+ className: `rcs-emulator-text-sm rcs-emulator-font-medium ${o ? "rcs-emulator-text-white" : "rcs-emulator-text-gray-900"}`,
1925
+ children: t
1794
1926
  }
1795
1927
  )
1796
1928
  ]
1797
1929
  }
1798
1930
  );
1799
- }), J = {
1800
- FULL: "h-full",
1801
- TALL: "h-[80%]",
1802
- HALF: "h-[50%]"
1803
- }, De = g(function() {
1804
- const { theme: t, businessInfo: n, webView: o, closeWebView: s } = N(), [a, i] = z(!0), [u, c] = z(!1), d = t === "dark", m = n.brandColor || "#0084ff";
1805
- S(() => {
1806
- o?.url && (i(!0), c(!1));
1931
+ }), q = {
1932
+ FULL: "rcs-emulator-webview-full",
1933
+ TALL: "rcs-emulator-webview-tall",
1934
+ HALF: "rcs-emulator-webview-half"
1935
+ }, De = p(function() {
1936
+ const { theme: r, businessInfo: t, webView: o, closeWebView: a } = k(), [c, l] = A(!0), [u, m] = A(!1), i = r === "dark", h = t.brandColor || "#0084ff";
1937
+ j(() => {
1938
+ o?.url && (l(!0), m(!1));
1807
1939
  }, [o?.url]);
1808
- const f = M(() => {
1809
- i(!1);
1810
- }, []), v = M(() => {
1811
- i(!1), c(!0);
1812
- }, []), x = (k) => {
1940
+ const f = $(() => {
1941
+ l(!1);
1942
+ }, []), v = $(() => {
1943
+ l(!1), m(!0);
1944
+ }, []), b = (C) => {
1813
1945
  try {
1814
- return new URL(k).hostname;
1946
+ return new URL(C).hostname;
1815
1947
  } catch {
1816
1948
  return "Web Page";
1817
1949
  }
1818
1950
  };
1819
1951
  if (!o || !o.isOpen) return null;
1820
- const { url: L, viewMode: b, title: p, postbackData: y } = o, h = p || x(L), w = b === "FULL", C = b === "TALL" || b === "HALF", I = J[b] || J.TALL;
1821
- return /* @__PURE__ */ l(
1952
+ const { url: N, viewMode: y, title: w, postbackData: g } = o, d = w || b(N), x = y === "FULL", L = y === "TALL" || y === "HALF", z = q[y] || q.TALL;
1953
+ return /* @__PURE__ */ n(
1822
1954
  "div",
1823
1955
  {
1824
- className: `
1825
- rcs-webview-overlay absolute inset-0 z-50 flex flex-col
1826
- ${w ? "" : "justify-end"}
1827
- ${d ? "bg-black/60" : "bg-black/40"}
1828
- `,
1956
+ className: `rcs-emulator-webview-overlay ${x ? "rcs-emulator-webview-full" : "rcs-emulator-webview-bottom-sheet"} rcs-emulator-absolute rcs-emulator-inset-0 rcs-emulator-z-50 rcs-emulator-flex rcs-emulator-flex-col ${x ? "" : "rcs-emulator-justify-end"} ${i ? "rcs-emulator-bg-black-60" : "rcs-emulator-bg-black-40"}`,
1829
1957
  role: "dialog",
1830
1958
  "aria-modal": "true",
1831
- "aria-label": `WebView: ${h}`,
1832
- "data-postback": y,
1833
- "data-view-mode": b,
1959
+ "aria-label": `WebView: ${d}`,
1960
+ "data-postback": g,
1961
+ "data-view-mode": y,
1834
1962
  children: [
1835
- C && /* @__PURE__ */ e(
1963
+ L && /* @__PURE__ */ e(
1836
1964
  "button",
1837
1965
  {
1838
1966
  type: "button",
1839
- className: "absolute inset-0 w-full h-full cursor-default",
1840
- onClick: s,
1967
+ className: "rcs-emulator-absolute rcs-emulator-inset-0 rcs-emulator-w-full rcs-emulator-h-full rcs-emulator-cursor-default",
1968
+ onClick: a,
1841
1969
  "aria-label": "Close WebView"
1842
1970
  }
1843
1971
  ),
1844
- /* @__PURE__ */ l(
1972
+ /* @__PURE__ */ n(
1845
1973
  "div",
1846
1974
  {
1847
- className: `
1848
- rcs-webview-container relative flex flex-col overflow-hidden
1849
- ${d ? "bg-zinc-900" : "bg-white"}
1850
- ${I} w-full
1851
- ${C ? "rounded-t-2xl shadow-2xl" : ""}
1852
- `,
1975
+ className: `rcs-emulator-relative rcs-emulator-flex rcs-emulator-flex-col rcs-emulator-overflow-hidden ${i ? "rcs-emulator-bg-zinc-900" : "rcs-emulator-bg-white"} ${z} rcs-emulator-w-full ${L ? "rcs-emulator-rounded-t-2xl rcs-emulator-shadow-2xl" : ""}`,
1853
1976
  style: {
1854
1977
  // Ensure container is above backdrop
1855
1978
  position: "relative",
1856
1979
  zIndex: 1
1857
1980
  },
1858
1981
  children: [
1859
- /* @__PURE__ */ l(
1982
+ /* @__PURE__ */ n(
1860
1983
  "header",
1861
1984
  {
1862
- className: `
1863
- rcs-webview-header flex items-center gap-3 px-2 py-2 flex-shrink-0
1864
- border-b
1865
- ${d ? "bg-zinc-900 border-zinc-800" : "bg-white border-gray-200"}
1866
- `,
1985
+ className: `rcs-emulator-flex rcs-emulator-items-center rcs-emulator-gap-3 rcs-emulator-px-2 rcs-emulator-py-2 rcs-emulator-flex-shrink-0 rcs-emulator-border-b ${i ? "rcs-emulator-bg-zinc-900 rcs-emulator-border-zinc-800" : "rcs-emulator-bg-white rcs-emulator-border-gray-200"}`,
1867
1986
  children: [
1868
1987
  /* @__PURE__ */ e(
1869
1988
  "button",
1870
1989
  {
1871
1990
  type: "button",
1872
- onClick: s,
1873
- className: `
1874
- rcs-webview-close w-10 h-10 rounded-full flex items-center justify-center
1875
- transition-colors
1876
- ${d ? "text-white hover:bg-zinc-800" : "text-gray-700 hover:bg-gray-100"}
1877
- `,
1991
+ onClick: a,
1992
+ className: `rcs-emulator-w-10 rcs-emulator-h-10 rcs-emulator-rounded-full rcs-emulator-flex rcs-emulator-items-center rcs-emulator-justify-center rcs-emulator-transition-colors ${i ? "rcs-emulator-text-white rcs-emulator-hover-bg-zinc-800" : "rcs-emulator-text-gray-700 rcs-emulator-hover-bg-gray-100"}`,
1878
1993
  "aria-label": "Close WebView",
1879
1994
  children: /* @__PURE__ */ e(
1880
1995
  "svg",
1881
1996
  {
1882
- className: "w-6 h-6",
1997
+ className: "rcs-emulator-w-6 rcs-emulator-h-6",
1883
1998
  fill: "none",
1884
1999
  viewBox: "0 0 24 24",
1885
2000
  stroke: "currentColor",
@@ -1896,25 +2011,19 @@ const We = g(function({
1896
2011
  )
1897
2012
  }
1898
2013
  ),
1899
- /* @__PURE__ */ l("div", { className: "flex-1 min-w-0", children: [
2014
+ /* @__PURE__ */ n("div", { className: "rcs-emulator-flex-1 rcs-emulator-min-w-0", children: [
1900
2015
  /* @__PURE__ */ e(
1901
2016
  "h2",
1902
2017
  {
1903
- className: `
1904
- rcs-webview-title text-base font-medium truncate
1905
- ${d ? "text-white" : "text-gray-900"}
1906
- `,
1907
- children: h
2018
+ className: `rcs-emulator-text-base rcs-emulator-font-medium rcs-emulator-truncate ${i ? "rcs-emulator-text-white" : "rcs-emulator-text-gray-900"}`,
2019
+ children: d
1908
2020
  }
1909
2021
  ),
1910
2022
  /* @__PURE__ */ e(
1911
2023
  "p",
1912
2024
  {
1913
- className: `
1914
- rcs-webview-url text-xs truncate
1915
- ${d ? "text-zinc-400" : "text-gray-500"}
1916
- `,
1917
- children: x(L)
2025
+ className: `rcs-emulator-text-xs rcs-emulator-truncate ${i ? "rcs-emulator-text-zinc-400" : "rcs-emulator-text-gray-500"}`,
2026
+ children: b(N)
1918
2027
  }
1919
2028
  )
1920
2029
  ] }),
@@ -1922,15 +2031,12 @@ const We = g(function({
1922
2031
  "button",
1923
2032
  {
1924
2033
  type: "button",
1925
- className: `
1926
- w-10 h-10 rounded-full flex items-center justify-center
1927
- ${d ? "text-zinc-400 hover:bg-zinc-800" : "text-gray-500 hover:bg-gray-100"}
1928
- `,
2034
+ className: `rcs-emulator-w-10 rcs-emulator-h-10 rcs-emulator-rounded-full rcs-emulator-flex rcs-emulator-items-center rcs-emulator-justify-center ${i ? "rcs-emulator-text-zinc-400 rcs-emulator-hover-bg-zinc-800" : "rcs-emulator-text-gray-500 rcs-emulator-hover-bg-gray-100"}`,
1929
2035
  "aria-label": "More options",
1930
- children: /* @__PURE__ */ l(
2036
+ children: /* @__PURE__ */ n(
1931
2037
  "svg",
1932
2038
  {
1933
- className: "w-5 h-5",
2039
+ className: "rcs-emulator-w-5 rcs-emulator-h-5",
1934
2040
  fill: "currentColor",
1935
2041
  viewBox: "0 0 24 24",
1936
2042
  children: [
@@ -1945,36 +2051,32 @@ const We = g(function({
1945
2051
  ]
1946
2052
  }
1947
2053
  ),
1948
- a && /* @__PURE__ */ e(
2054
+ c && /* @__PURE__ */ e(
1949
2055
  "div",
1950
2056
  {
1951
- className: "rcs-webview-loading absolute top-14 left-0 right-0 h-1 overflow-hidden",
1952
- style: { backgroundColor: `${m}20` },
2057
+ className: "rcs-emulator-absolute rcs-emulator-top-14 rcs-emulator-left-0 rcs-emulator-right-0 rcs-emulator-h-1 rcs-emulator-overflow-hidden",
2058
+ style: { backgroundColor: `${h}20` },
1953
2059
  children: /* @__PURE__ */ e(
1954
2060
  "div",
1955
2061
  {
1956
- className: "h-full animate-pulse",
2062
+ className: "rcs-emulator-h-full rcs-emulator-animate-pulse rcs-emulator-webview-loading-bar",
1957
2063
  style: {
1958
- backgroundColor: m,
1959
- animation: "webview-loading 1.5s ease-in-out infinite",
2064
+ backgroundColor: h,
1960
2065
  width: "30%"
1961
2066
  }
1962
2067
  }
1963
2068
  )
1964
2069
  }
1965
2070
  ),
1966
- u && /* @__PURE__ */ l(
2071
+ u && /* @__PURE__ */ n(
1967
2072
  "div",
1968
2073
  {
1969
- className: `
1970
- rcs-webview-error flex-1 flex flex-col items-center justify-center p-6 text-center
1971
- ${d ? "text-zinc-400" : "text-gray-500"}
1972
- `,
2074
+ className: `rcs-emulator-flex-1 rcs-emulator-flex rcs-emulator-flex-col rcs-emulator-items-center rcs-emulator-justify-center rcs-emulator-p-6 rcs-emulator-text-center ${i ? "rcs-emulator-text-zinc-400" : "rcs-emulator-text-gray-500"}`,
1973
2075
  children: [
1974
2076
  /* @__PURE__ */ e(
1975
2077
  "svg",
1976
2078
  {
1977
- className: "w-16 h-16 mb-4 opacity-50",
2079
+ className: "rcs-emulator-w-16 rcs-emulator-h-16 rcs-emulator-mb-4 rcs-emulator-opacity-50",
1978
2080
  fill: "none",
1979
2081
  viewBox: "0 0 24 24",
1980
2082
  stroke: "currentColor",
@@ -1989,29 +2091,26 @@ const We = g(function({
1989
2091
  )
1990
2092
  }
1991
2093
  ),
1992
- /* @__PURE__ */ e("p", { className: "text-sm font-medium mb-2", children: "Unable to load page" }),
1993
- /* @__PURE__ */ e("p", { className: "text-xs opacity-75 mb-4", children: "This content cannot be displayed in the emulator" }),
2094
+ /* @__PURE__ */ e("p", { className: "rcs-emulator-text-sm rcs-emulator-font-medium rcs-emulator-mb-2", children: "Unable to load page" }),
2095
+ /* @__PURE__ */ e("p", { className: "rcs-emulator-text-xs rcs-emulator-opacity-75 rcs-emulator-mb-4", children: "This content cannot be displayed in the emulator" }),
1994
2096
  /* @__PURE__ */ e(
1995
2097
  "button",
1996
2098
  {
1997
2099
  type: "button",
1998
- onClick: s,
1999
- className: `
2000
- px-4 py-2 rounded-full text-sm font-medium
2001
- ${d ? "bg-zinc-800 text-white hover:bg-zinc-700" : "bg-gray-100 text-gray-700 hover:bg-gray-200"}
2002
- `,
2100
+ onClick: a,
2101
+ className: `rcs-emulator-px-4 rcs-emulator-py-2 rcs-emulator-rounded-full rcs-emulator-text-sm rcs-emulator-font-medium ${i ? "rcs-emulator-bg-zinc-800 rcs-emulator-text-white rcs-emulator-hover-bg-zinc-700" : "rcs-emulator-bg-gray-100 rcs-emulator-text-gray-700 rcs-emulator-hover-bg-gray-200"}`,
2003
2102
  children: "Go Back"
2004
2103
  }
2005
2104
  )
2006
2105
  ]
2007
2106
  }
2008
2107
  ),
2009
- !u && /* @__PURE__ */ e("div", { className: "rcs-webview-iframe-container flex-1 overflow-hidden", children: /* @__PURE__ */ e(
2108
+ !u && /* @__PURE__ */ e("div", { className: "rcs-emulator-flex-1 rcs-emulator-overflow-hidden", children: /* @__PURE__ */ e(
2010
2109
  "iframe",
2011
2110
  {
2012
- src: L,
2013
- title: h,
2014
- className: "w-full h-full border-0",
2111
+ src: N,
2112
+ title: d,
2113
+ className: "rcs-emulator-w-full rcs-emulator-h-full rcs-emulator-border-0",
2015
2114
  onLoad: f,
2016
2115
  onError: v,
2017
2116
  sandbox: "allow-scripts allow-same-origin allow-forms allow-popups",
@@ -2019,61 +2118,48 @@ const We = g(function({
2019
2118
  loading: "lazy"
2020
2119
  }
2021
2120
  ) }),
2022
- C && /* @__PURE__ */ e(
2121
+ L && /* @__PURE__ */ e(
2023
2122
  "div",
2024
2123
  {
2025
- className: `
2026
- rcs-webview-safe-area h-2 flex-shrink-0
2027
- ${d ? "bg-zinc-900" : "bg-white"}
2028
- `
2124
+ className: `rcs-emulator-h-2 rcs-emulator-flex-shrink-0 ${i ? "rcs-emulator-bg-zinc-900" : "rcs-emulator-bg-white"}`
2029
2125
  }
2030
2126
  )
2031
2127
  ]
2032
2128
  }
2033
- ),
2034
- /* @__PURE__ */ e("style", { children: `
2035
- @keyframes webview-loading {
2036
- 0% { transform: translateX(-100%); }
2037
- 50% { transform: translateX(200%); }
2038
- 100% { transform: translateX(-100%); }
2039
- }
2040
- ` })
2129
+ )
2041
2130
  ]
2042
2131
  }
2043
2132
  );
2044
- }), Oe = g(function({
2045
- onUnlock: t,
2046
- messagePreview: n = "New message"
2133
+ }), Oe = p(function({
2134
+ onUnlock: r,
2135
+ messagePreview: t = "New message"
2047
2136
  }) {
2048
- const { theme: o, businessInfo: s } = N(), [a, i] = z(/* @__PURE__ */ new Date()), u = o === "dark";
2049
- S(() => {
2050
- const f = setInterval(() => {
2051
- i(/* @__PURE__ */ new Date());
2137
+ const { theme: o, businessInfo: a } = k(), [c, l] = A(/* @__PURE__ */ new Date()), u = o === "dark";
2138
+ j(() => {
2139
+ const h = setInterval(() => {
2140
+ l(/* @__PURE__ */ new Date());
2052
2141
  }, 1e3);
2053
- return () => clearInterval(f);
2142
+ return () => clearInterval(h);
2054
2143
  }, []);
2055
- const c = a.toLocaleTimeString([], {
2144
+ const m = c.toLocaleTimeString([], {
2056
2145
  hour: "numeric",
2057
2146
  minute: "2-digit",
2058
2147
  hour12: !0
2059
- }), d = a.toLocaleDateString([], {
2148
+ }), i = c.toLocaleDateString([], {
2060
2149
  weekday: "short",
2061
2150
  month: "long",
2062
2151
  day: "numeric"
2063
2152
  });
2064
- return /* @__PURE__ */ l(
2153
+ return /* @__PURE__ */ n(
2065
2154
  "div",
2066
2155
  {
2067
- className: `
2068
- lock-screen flex flex-col h-full w-full select-none
2069
- ${u ? "bg-zinc-900" : "bg-zinc-800"}
2070
- `,
2156
+ className: `rcs-emulator-flex rcs-emulator-flex-col rcs-emulator-h-full rcs-emulator-w-full rcs-emulator-select-none ${u ? "rcs-emulator-bg-zinc-900" : "rcs-emulator-bg-zinc-800"}`,
2071
2157
  children: [
2072
- /* @__PURE__ */ e("div", { className: "h-6" }),
2073
- /* @__PURE__ */ e("div", { className: "flex justify-center mt-4", children: /* @__PURE__ */ e("div", { className: "w-8 h-8 rounded-full bg-zinc-700 flex items-center justify-center", children: /* @__PURE__ */ e(
2158
+ /* @__PURE__ */ e("div", { className: "rcs-emulator-h-6" }),
2159
+ /* @__PURE__ */ e("div", { className: "rcs-emulator-flex rcs-emulator-justify-center rcs-emulator-mt-4", children: /* @__PURE__ */ e("div", { className: "rcs-emulator-w-8 rcs-emulator-h-8 rcs-emulator-rounded-full rcs-emulator-bg-zinc-700 rcs-emulator-flex rcs-emulator-items-center rcs-emulator-justify-center", children: /* @__PURE__ */ e(
2074
2160
  "svg",
2075
2161
  {
2076
- className: "w-4 h-4 text-zinc-400",
2162
+ className: "rcs-emulator-w-4 rcs-emulator-h-4 rcs-emulator-text-zinc-400",
2077
2163
  fill: "currentColor",
2078
2164
  viewBox: "0 0 20 20",
2079
2165
  children: /* @__PURE__ */ e(
@@ -2086,33 +2172,26 @@ const We = g(function({
2086
2172
  )
2087
2173
  }
2088
2174
  ) }) }),
2089
- /* @__PURE__ */ e("div", { className: "mt-6 text-center", children: /* @__PURE__ */ e("h1", { className: "text-5xl font-light text-white tracking-tight", children: c }) }),
2090
- /* @__PURE__ */ l("div", { className: "mt-2 text-center", children: [
2091
- /* @__PURE__ */ e("p", { className: "text-zinc-400 text-sm", children: d }),
2092
- /* @__PURE__ */ l("div", { className: "flex items-center justify-center gap-1 mt-1 text-zinc-500 text-xs", children: [
2093
- /* @__PURE__ */ e("svg", { className: "w-3.5 h-3.5", fill: "currentColor", viewBox: "0 0 20 20", children: /* @__PURE__ */ e("path", { d: "M5.5 16a3.5 3.5 0 01-.369-6.98 4 4 0 117.753-1.977A4.5 4.5 0 1113.5 16h-8z" }) }),
2094
- /* @__PURE__ */ e("span", { children: "19°C" })
2095
- ] })
2096
- ] }),
2097
- /* @__PURE__ */ e("div", { className: "h-24" }),
2098
- /* @__PURE__ */ e("div", { className: "px-4 pb-8", children: /* @__PURE__ */ l(
2175
+ /* @__PURE__ */ e("div", { className: "rcs-emulator-mt-6 rcs-emulator-text-center", children: /* @__PURE__ */ e("h1", { className: "rcs-emulator-text-5xl rcs-emulator-font-light rcs-emulator-text-white rcs-emulator-tracking-tight", children: m }) }),
2176
+ /* @__PURE__ */ e("div", { className: "rcs-emulator-mt-2 rcs-emulator-text-center", children: /* @__PURE__ */ e("p", { className: "rcs-emulator-text-zinc-400 rcs-emulator-text-sm", children: i }) }),
2177
+ /* @__PURE__ */ e("div", { className: "rcs-emulator-h-24" }),
2178
+ /* @__PURE__ */ e("div", { className: "rcs-emulator-px-4 rcs-emulator-pb-8", children: /* @__PURE__ */ n(
2099
2179
  "button",
2100
2180
  {
2101
- onClick: t,
2102
- className: `w-full bg-white rounded-2xl p-3 flex items-center gap-3 shadow-lg
2103
- transition-transform active:scale-[0.98] hover:shadow-xl`,
2181
+ onClick: r,
2182
+ className: "rcs-emulator-notification-card rcs-emulator-w-full rcs-emulator-bg-white rcs-emulator-rounded-2xl rcs-emulator-p-3 rcs-emulator-flex rcs-emulator-items-center rcs-emulator-gap-3 rcs-emulator-shadow-lg rcs-emulator-transition-transform rcs-emulator-active-scale-98 rcs-emulator-hover-shadow-xl",
2104
2183
  children: [
2105
- /* @__PURE__ */ e("div", { className: "w-12 h-12 rounded-xl bg-zinc-900 flex items-center justify-center flex-shrink-0 overflow-hidden", children: s.logo ? /* @__PURE__ */ e(
2184
+ /* @__PURE__ */ e("div", { className: "rcs-emulator-w-12 rcs-emulator-h-12 rcs-emulator-rounded-xl rcs-emulator-bg-zinc-900 rcs-emulator-flex rcs-emulator-items-center rcs-emulator-justify-center rcs-emulator-flex-shrink-0 rcs-emulator-overflow-hidden", children: a.logo ? /* @__PURE__ */ e(
2106
2185
  "img",
2107
2186
  {
2108
- src: s.logo,
2109
- alt: s.name,
2110
- className: "w-full h-full object-cover"
2187
+ src: a.logo,
2188
+ alt: a.name,
2189
+ className: "rcs-emulator-w-full rcs-emulator-h-full rcs-emulator-object-cover"
2111
2190
  }
2112
- ) : /* @__PURE__ */ e("div", { className: "text-white", children: /* @__PURE__ */ l(
2191
+ ) : /* @__PURE__ */ e("div", { className: "rcs-emulator-text-white", children: /* @__PURE__ */ n(
2113
2192
  "svg",
2114
2193
  {
2115
- className: "w-7 h-7",
2194
+ className: "rcs-emulator-w-7 rcs-emulator-h-7",
2116
2195
  viewBox: "0 0 24 24",
2117
2196
  fill: "currentColor",
2118
2197
  children: [
@@ -2132,170 +2211,161 @@ const We = g(function({
2132
2211
  ]
2133
2212
  }
2134
2213
  ) }) }),
2135
- /* @__PURE__ */ l("div", { className: "flex-1 text-left min-w-0", children: [
2136
- /* @__PURE__ */ e("p", { className: "text-sm font-semibold text-gray-900 truncate", children: s.name }),
2137
- /* @__PURE__ */ e("p", { className: "text-sm text-gray-500 truncate", children: n })
2214
+ /* @__PURE__ */ n("div", { className: "rcs-emulator-flex-1 rcs-emulator-text-left rcs-emulator-min-w-0", children: [
2215
+ /* @__PURE__ */ e("p", { className: "rcs-emulator-text-sm rcs-emulator-font-semibold rcs-emulator-text-gray-900 rcs-emulator-truncate rcs-emulator-mb-1", children: a.name }),
2216
+ /* @__PURE__ */ e("p", { className: "rcs-emulator-text-sm rcs-emulator-text-gray-500 rcs-emulator-truncate rcs-emulator-line-clamp-2 rcs-emulator-mb-1", children: t })
2138
2217
  ] }),
2139
- /* @__PURE__ */ e("span", { className: "text-xs text-gray-400 flex-shrink-0", children: "now" })
2218
+ /* @__PURE__ */ e("span", { className: "rcs-emulator-text-xs rcs-emulator-text-gray-400 rcs-emulator-flex-shrink-0", children: "now" })
2140
2219
  ]
2141
2220
  }
2142
2221
  ) }),
2143
- /* @__PURE__ */ e("div", { className: "flex-1" }),
2144
- /* @__PURE__ */ e("div", { className: "flex justify-center pb-2", children: /* @__PURE__ */ e("div", { className: "w-32 h-1 rounded-full bg-zinc-600" }) })
2222
+ /* @__PURE__ */ e("div", { className: "rcs-emulator-flex-1" }),
2223
+ /* @__PURE__ */ e("div", { className: "rcs-emulator-flex rcs-emulator-justify-center rcs-emulator-pb-2", children: /* @__PURE__ */ e("div", { className: "rcs-emulator-home-indicator rcs-emulator-w-32 rcs-emulator-h-1 rcs-emulator-rounded-full rcs-emulator-bg-zinc-600" }) })
2145
2224
  ]
2146
2225
  }
2147
2226
  );
2148
- }), Y = {
2227
+ }), J = {
2149
2228
  name: "Business",
2150
2229
  verified: !1
2151
- }, Pe = g(function({
2152
- flow: t,
2153
- onUserReply: n,
2230
+ }, Pe = p(function({
2231
+ flow: r,
2232
+ onUserReply: t,
2154
2233
  theme: o,
2155
- device: s,
2156
- businessInfo: a,
2157
- showSuggestions: i
2234
+ device: a,
2235
+ businessInfo: c,
2236
+ showSuggestions: l
2158
2237
  }) {
2159
2238
  const {
2160
2239
  state: u,
2161
- handleReply: c,
2162
- handleAction: d
2240
+ handleReply: m,
2241
+ handleAction: i
2163
2242
  } = fe({
2164
- flow: t,
2165
- onUserReply: n,
2243
+ flow: r,
2244
+ onUserReply: t,
2166
2245
  typingDelay: 800
2167
- }), [m, f] = z(!1), v = M(() => {
2168
- f((h) => !h);
2169
- }, []), [x, L] = z(null), b = M((h) => {
2170
- L({
2171
- ...h,
2246
+ }), [h, f] = A(!1), v = $(() => {
2247
+ f((d) => !d);
2248
+ }, []), [b, N] = A(null), y = $((d) => {
2249
+ N({
2250
+ ...d,
2172
2251
  isOpen: !0
2173
2252
  });
2174
- }, []), p = M(() => {
2175
- L(null);
2176
- }, []), y = M(
2177
- (h) => {
2178
- if (!$(h)) return;
2179
- const w = oe(h);
2180
- if (w) {
2181
- b({
2182
- url: w.url,
2183
- viewMode: w.webviewViewMode || "TALL",
2184
- title: w.description || "",
2185
- postbackData: h.action.postback.data
2186
- }), n({
2253
+ }, []), w = $(() => {
2254
+ N(null);
2255
+ }, []), g = $(
2256
+ (d) => {
2257
+ if (!I(d)) return;
2258
+ const x = oe(d);
2259
+ if (x) {
2260
+ y({
2261
+ url: x.url,
2262
+ viewMode: x.webviewViewMode || "TALL",
2263
+ title: x.description || "",
2264
+ postbackData: d.action.postback.data
2265
+ }), t({
2187
2266
  type: "action",
2188
- postbackData: h.action.postback.data,
2189
- displayText: h.action.displayText,
2267
+ postbackData: d.action.postback.data,
2268
+ displayText: d.action.displayText,
2190
2269
  timestamp: Date.now(),
2191
2270
  actionData: {
2192
2271
  type: "webview",
2193
- url: w.url,
2194
- viewMode: w.webviewViewMode || "TALL",
2195
- description: w.description
2272
+ url: x.url,
2273
+ viewMode: x.webviewViewMode || "TALL",
2274
+ description: x.description
2196
2275
  }
2197
2276
  });
2198
2277
  return;
2199
2278
  }
2200
- d(h);
2279
+ i(d);
2201
2280
  },
2202
- [d, b, n]
2281
+ [i, y, t]
2203
2282
  );
2204
- return /* @__PURE__ */ l(
2205
- X,
2283
+ return /* @__PURE__ */ n(
2284
+ Z,
2206
2285
  {
2207
2286
  theme: o,
2208
- device: s,
2209
- businessInfo: a,
2287
+ device: a,
2288
+ businessInfo: c,
2210
2289
  state: u,
2211
- showSuggestions: i,
2212
- isProfileOpen: m,
2290
+ showSuggestions: l,
2291
+ isProfileOpen: h,
2213
2292
  toggleProfile: v,
2214
- onReply: c,
2215
- onAction: y,
2216
- webView: x,
2217
- openWebView: b,
2218
- closeWebView: p,
2293
+ onReply: m,
2294
+ onAction: g,
2295
+ webView: b,
2296
+ openWebView: y,
2297
+ closeWebView: w,
2219
2298
  children: [
2220
2299
  /* @__PURE__ */ e(Ve, {}),
2221
- m && /* @__PURE__ */ e(He, {}),
2300
+ h && /* @__PURE__ */ e(He, {}),
2222
2301
  /* @__PURE__ */ e(De, {})
2223
2302
  ]
2224
2303
  }
2225
2304
  );
2226
- }), Ye = g(function({
2227
- messages: t,
2228
- jsonUrl: n,
2305
+ }), Je = p(function({
2306
+ messages: r,
2307
+ jsonUrl: t,
2229
2308
  onUserReply: o,
2230
- theme: s = "light",
2231
- device: a = "android",
2232
- businessInfo: i,
2309
+ theme: a = "light",
2310
+ device: c = "android",
2311
+ businessInfo: l,
2233
2312
  className: u = "",
2234
- width: c = 375,
2235
- height: d = 667,
2236
- showSuggestions: m = !0,
2313
+ width: m = 375,
2314
+ height: i = 667,
2315
+ showSuggestions: h = !0,
2237
2316
  showLockScreen: f = !1
2238
2317
  }) {
2239
- const [v, x] = z(f), L = M(() => {
2240
- x(!1);
2318
+ const [v, b] = A(f), N = $(() => {
2319
+ b(!1);
2241
2320
  }, []), {
2242
- data: b,
2243
- isLoading: p,
2244
- error: y
2245
- } = ge(n), h = n ? b : t, w = V(
2246
- () => h ? ue(h) : !1,
2247
- [h]
2248
- ), C = V(
2321
+ data: y,
2322
+ isLoading: w,
2323
+ error: g
2324
+ } = pe(t), d = t ? y : r, x = V(
2325
+ () => d ? me(d) : !1,
2326
+ [d]
2327
+ ), L = V(
2249
2328
  () => ({
2250
- ...Y,
2251
- ...i,
2329
+ ...J,
2330
+ ...l,
2252
2331
  // Extract name from flow if not provided
2253
- name: i?.name || h?.name || Y.name
2332
+ name: l?.name || d?.name || J.name
2254
2333
  }),
2255
- [i, h?.name]
2256
- ), I = V(
2257
- () => h && w ? he(h) : "New message",
2258
- [h, w]
2259
- ), k = s === "dark", A = ({ children: T }) => /* @__PURE__ */ e(
2334
+ [l, d?.name]
2335
+ ), z = V(
2336
+ () => d && x ? de(d) : "New message",
2337
+ [d, x]
2338
+ ), C = a === "dark", T = C ? "rcs-emulator-dark" : "rcs-emulator-light", M = ({ children: S }) => /* @__PURE__ */ e(
2260
2339
  "div",
2261
2340
  {
2262
- className: `
2263
- rcs-emulator relative overflow-hidden
2264
- rounded-2xl shadow-2xl
2265
- ${k ? "bg-zinc-950" : "bg-white"}
2266
- ${u}
2267
- `,
2268
- style: { width: c, height: d },
2341
+ className: `rcs-emulator rcs-emulator-container ${T} ${u}`,
2342
+ style: { width: m, height: i },
2269
2343
  role: "application",
2270
2344
  "aria-label": "RCS Message Emulator",
2271
- "data-theme": s,
2272
- "data-device": a,
2273
- children: T
2345
+ "data-theme": a,
2346
+ "data-device": c,
2347
+ children: S
2274
2348
  }
2275
2349
  );
2276
- return n && p ? /* @__PURE__ */ e(A, { children: /* @__PURE__ */ l("div", { className: "flex flex-col items-center justify-center h-full p-6", children: [
2350
+ return t && w ? /* @__PURE__ */ e(M, { children: /* @__PURE__ */ n("div", { className: "rcs-emulator-flex rcs-emulator-flex-col rcs-emulator-items-center rcs-emulator-justify-center rcs-emulator-h-full rcs-emulator-p-6", children: [
2277
2351
  /* @__PURE__ */ e(
2278
2352
  "div",
2279
2353
  {
2280
- className: `
2281
- w-10 h-10 border-3 border-t-transparent rounded-full animate-spin mb-4
2282
- ${k ? "border-zinc-600" : "border-gray-300"}
2283
- `,
2284
- style: { borderTopColor: "transparent" }
2354
+ className: `rcs-emulator-w-10 rcs-emulator-h-10 rcs-emulator-spinner rcs-emulator-mb-4 ${T}`
2285
2355
  }
2286
2356
  ),
2287
2357
  /* @__PURE__ */ e(
2288
2358
  "p",
2289
2359
  {
2290
- className: `text-sm ${k ? "text-zinc-400" : "text-gray-500"}`,
2360
+ className: `rcs-emulator-text-sm ${C ? "rcs-emulator-text-zinc-400" : "rcs-emulator-text-gray-500"}`,
2291
2361
  children: "Loading conversation..."
2292
2362
  }
2293
2363
  )
2294
- ] }) }) : n && y ? /* @__PURE__ */ e(A, { children: /* @__PURE__ */ l("div", { className: "flex flex-col items-center justify-center h-full p-6 text-center", children: [
2364
+ ] }) }) : t && g ? /* @__PURE__ */ e(M, { children: /* @__PURE__ */ n("div", { className: "rcs-emulator-flex rcs-emulator-flex-col rcs-emulator-items-center rcs-emulator-justify-center rcs-emulator-h-full rcs-emulator-p-6 rcs-emulator-text-center", children: [
2295
2365
  /* @__PURE__ */ e(
2296
2366
  "svg",
2297
2367
  {
2298
- className: "w-12 h-12 mx-auto mb-4 text-red-500",
2368
+ className: "rcs-emulator-w-12 rcs-emulator-h-12 rcs-emulator-mb-4 rcs-emulator-text-red-500",
2299
2369
  fill: "none",
2300
2370
  viewBox: "0 0 24 24",
2301
2371
  stroke: "currentColor",
@@ -2313,30 +2383,31 @@ const We = g(function({
2313
2383
  /* @__PURE__ */ e(
2314
2384
  "h3",
2315
2385
  {
2316
- className: `text-lg font-medium mb-2 ${k ? "text-white" : "text-gray-900"}`,
2386
+ className: `rcs-emulator-text-lg rcs-emulator-font-medium rcs-emulator-mb-2 ${C ? "rcs-emulator-text-white" : "rcs-emulator-text-gray-900"}`,
2317
2387
  children: "Failed to Load"
2318
2388
  }
2319
2389
  ),
2320
2390
  /* @__PURE__ */ e(
2321
2391
  "p",
2322
2392
  {
2323
- className: `text-sm ${k ? "text-zinc-400" : "text-gray-500"}`,
2324
- children: y
2393
+ className: `rcs-emulator-text-sm ${C ? "rcs-emulator-text-zinc-400" : "rcs-emulator-text-gray-500"}`,
2394
+ children: g
2325
2395
  }
2326
2396
  ),
2327
2397
  /* @__PURE__ */ e(
2328
2398
  "p",
2329
2399
  {
2330
- className: `text-xs mt-2 break-all max-w-full ${k ? "text-zinc-500" : "text-gray-400"}`,
2331
- children: n
2400
+ className: `rcs-emulator-text-xs rcs-emulator-mt-2 rcs-emulator-max-w-full ${C ? "rcs-emulator-text-zinc-500" : "rcs-emulator-text-gray-400"}`,
2401
+ style: { wordBreak: "break-all" },
2402
+ children: t
2332
2403
  }
2333
2404
  )
2334
- ] }) }) : h ? w ? /* @__PURE__ */ e(A, { children: v ? /* @__PURE__ */ e(
2335
- X,
2405
+ ] }) }) : d ? x ? /* @__PURE__ */ e(M, { children: v ? /* @__PURE__ */ e(
2406
+ Z,
2336
2407
  {
2337
- theme: s,
2338
- device: a,
2339
- businessInfo: C,
2408
+ theme: a,
2409
+ device: c,
2410
+ businessInfo: L,
2340
2411
  state: {
2341
2412
  currentMessageId: null,
2342
2413
  chatHistory: [],
@@ -2356,23 +2427,24 @@ const We = g(function({
2356
2427
  },
2357
2428
  closeWebView: () => {
2358
2429
  },
2359
- children: /* @__PURE__ */ e(Oe, { onUnlock: L, messagePreview: I })
2430
+ children: /* @__PURE__ */ e(Oe, { onUnlock: N, messagePreview: z })
2360
2431
  }
2361
2432
  ) : /* @__PURE__ */ e(
2362
2433
  Pe,
2363
2434
  {
2364
- flow: h,
2435
+ flow: d,
2365
2436
  onUserReply: o,
2366
- theme: s,
2367
- device: a,
2368
- businessInfo: C,
2369
- showSuggestions: m
2437
+ theme: a,
2438
+ device: c,
2439
+ businessInfo: L,
2440
+ showSuggestions: h
2370
2441
  }
2371
- ) }) : /* @__PURE__ */ e(A, { children: /* @__PURE__ */ l("div", { className: "flex flex-col items-center justify-center h-full p-6 text-center", children: [
2442
+ ) }) : /* @__PURE__ */ e(M, { children: /* @__PURE__ */ n("div", { className: "rcs-emulator-flex rcs-emulator-flex-col rcs-emulator-items-center rcs-emulator-justify-center rcs-emulator-h-full rcs-emulator-p-6 rcs-emulator-text-center", children: [
2372
2443
  /* @__PURE__ */ e(
2373
2444
  "svg",
2374
2445
  {
2375
- className: "w-12 h-12 mx-auto mb-4 text-amber-500",
2446
+ className: "rcs-emulator-w-12 rcs-emulator-h-12 rcs-emulator-mb-4",
2447
+ style: { color: "#f59e0b" },
2376
2448
  fill: "none",
2377
2449
  viewBox: "0 0 24 24",
2378
2450
  stroke: "currentColor",
@@ -2390,22 +2462,22 @@ const We = g(function({
2390
2462
  /* @__PURE__ */ e(
2391
2463
  "h3",
2392
2464
  {
2393
- className: `text-lg font-medium mb-2 ${k ? "text-white" : "text-gray-900"}`,
2465
+ className: `rcs-emulator-text-lg rcs-emulator-font-medium rcs-emulator-mb-2 ${C ? "rcs-emulator-text-white" : "rcs-emulator-text-gray-900"}`,
2394
2466
  children: "Invalid RBM JSON"
2395
2467
  }
2396
2468
  ),
2397
2469
  /* @__PURE__ */ e(
2398
2470
  "p",
2399
2471
  {
2400
- className: `text-sm ${k ? "text-zinc-400" : "text-gray-500"}`,
2472
+ className: `rcs-emulator-text-sm ${C ? "rcs-emulator-text-zinc-400" : "rcs-emulator-text-gray-500"}`,
2401
2473
  children: "The conversation flow structure is not valid"
2402
2474
  }
2403
2475
  )
2404
- ] }) }) : /* @__PURE__ */ e(A, { children: /* @__PURE__ */ l("div", { className: "flex flex-col items-center justify-center h-full p-6 text-center", children: [
2476
+ ] }) }) : /* @__PURE__ */ e(M, { children: /* @__PURE__ */ n("div", { className: "rcs-emulator-flex rcs-emulator-flex-col rcs-emulator-items-center rcs-emulator-justify-center rcs-emulator-h-full rcs-emulator-p-6 rcs-emulator-text-center", children: [
2405
2477
  /* @__PURE__ */ e(
2406
2478
  "svg",
2407
2479
  {
2408
- className: `w-12 h-12 mx-auto mb-4 ${k ? "text-zinc-600" : "text-gray-300"}`,
2480
+ className: `rcs-emulator-w-12 rcs-emulator-h-12 rcs-emulator-mb-4 ${C ? "rcs-emulator-text-zinc-600" : "rcs-emulator-text-gray-300"}`,
2409
2481
  fill: "none",
2410
2482
  viewBox: "0 0 24 24",
2411
2483
  stroke: "currentColor",
@@ -2423,22 +2495,22 @@ const We = g(function({
2423
2495
  /* @__PURE__ */ e(
2424
2496
  "h3",
2425
2497
  {
2426
- className: `text-lg font-medium mb-2 ${k ? "text-white" : "text-gray-900"}`,
2498
+ className: `rcs-emulator-text-lg rcs-emulator-font-medium rcs-emulator-mb-2 ${C ? "rcs-emulator-text-white" : "rcs-emulator-text-gray-900"}`,
2427
2499
  children: "No Conversation Data"
2428
2500
  }
2429
2501
  ),
2430
- /* @__PURE__ */ l(
2502
+ /* @__PURE__ */ n(
2431
2503
  "p",
2432
2504
  {
2433
- className: `text-sm ${k ? "text-zinc-400" : "text-gray-500"}`,
2505
+ className: `rcs-emulator-text-sm ${C ? "rcs-emulator-text-zinc-400" : "rcs-emulator-text-gray-500"}`,
2434
2506
  children: [
2435
2507
  "Provide either",
2436
2508
  " ",
2437
- /* @__PURE__ */ e("code", { className: "px-1 py-0.5 rounded bg-gray-100 dark:bg-zinc-800", children: "messages" }),
2509
+ /* @__PURE__ */ e("code", { className: `rcs-emulator-code-inline ${T}`, children: "messages" }),
2438
2510
  " ",
2439
2511
  "or",
2440
2512
  " ",
2441
- /* @__PURE__ */ e("code", { className: "px-1 py-0.5 rounded bg-gray-100 dark:bg-zinc-800", children: "jsonUrl" }),
2513
+ /* @__PURE__ */ e("code", { className: `rcs-emulator-code-inline ${T}`, children: "jsonUrl" }),
2442
2514
  " ",
2443
2515
  "prop"
2444
2516
  ]
@@ -2447,15 +2519,15 @@ const We = g(function({
2447
2519
  ] }) });
2448
2520
  });
2449
2521
  export {
2450
- Ye as RcsEmulator,
2522
+ Je as RcsEmulator,
2451
2523
  De as WebViewRenderer,
2452
- Ye as default,
2453
- he as getFirstMessagePreview,
2524
+ Je as default,
2525
+ de as getFirstMessagePreview,
2454
2526
  oe as getWebViewConfig,
2455
- $ as isSuggestedAction,
2456
- q as isSuggestedReply,
2457
- Je as isWebViewAction,
2458
- ge as useJsonFetch,
2459
- ue as validateConversationFlow
2527
+ I as isSuggestedAction,
2528
+ Y as isSuggestedReply,
2529
+ qe as isWebViewAction,
2530
+ pe as useJsonFetch,
2531
+ me as validateConversationFlow
2460
2532
  };
2461
2533
  //# sourceMappingURL=rcs-emulator.es.js.map