@maebgch/rcs-emulator 0.1.5 → 0.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/rcs-emulator.cjs.js +44 -48
- package/dist/rcs-emulator.cjs.js.map +1 -1
- package/dist/rcs-emulator.es.js +657 -688
- package/dist/rcs-emulator.es.js.map +1 -1
- package/package.json +4 -2
package/dist/rcs-emulator.es.js
CHANGED
|
@@ -1,74 +1,43 @@
|
|
|
1
1
|
import { jsx as n, jsxs as C } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
function We() {
|
|
6
|
-
if (ve) return he;
|
|
7
|
-
ve = 1;
|
|
8
|
-
var c = Me.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
|
|
9
|
-
return he.c = function(t) {
|
|
10
|
-
return c.H.useMemoCache(t);
|
|
11
|
-
}, he;
|
|
12
|
-
}
|
|
13
|
-
var ge = {};
|
|
14
|
-
var we;
|
|
15
|
-
function Ve() {
|
|
16
|
-
return we || (we = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
17
|
-
var c = Me.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
|
|
18
|
-
ge.c = function(t) {
|
|
19
|
-
var e = c.H;
|
|
20
|
-
return e === null && console.error(
|
|
21
|
-
`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
|
|
22
|
-
1. You might have mismatching versions of React and the renderer (such as React DOM)
|
|
23
|
-
2. You might be breaking the Rules of Hooks
|
|
24
|
-
3. You might have more than one copy of React in the same app
|
|
25
|
-
See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.`
|
|
26
|
-
), e.useMemoCache(t);
|
|
27
|
-
};
|
|
28
|
-
})()), ge;
|
|
29
|
-
}
|
|
30
|
-
var ke;
|
|
31
|
-
function Ue() {
|
|
32
|
-
return ke || (ke = 1, process.env.NODE_ENV === "production" ? fe.exports = We() : fe.exports = Ve()), fe.exports;
|
|
33
|
-
}
|
|
34
|
-
var D = Ue();
|
|
35
|
-
function ze(c) {
|
|
2
|
+
import { c as B } from "react/compiler-runtime";
|
|
3
|
+
import { useContext as Me, createContext as Se, useReducer as ze, useRef as me, useEffect as oe, useState as ne, useCallback as Ie, memo as F } from "react";
|
|
4
|
+
function Ne(c) {
|
|
36
5
|
return "reply" in c;
|
|
37
6
|
}
|
|
38
7
|
function le(c) {
|
|
39
8
|
return "action" in c;
|
|
40
9
|
}
|
|
41
|
-
function
|
|
10
|
+
function St(c) {
|
|
42
11
|
if (!le(c)) return !1;
|
|
43
12
|
const {
|
|
44
13
|
urlAction: t
|
|
45
14
|
} = c.action;
|
|
46
15
|
return t?.openUrl?.application === "WEBVIEW";
|
|
47
16
|
}
|
|
48
|
-
function
|
|
17
|
+
function Ae(c) {
|
|
49
18
|
const {
|
|
50
19
|
urlAction: t
|
|
51
20
|
} = c.action;
|
|
52
21
|
return t?.openUrl?.application === "WEBVIEW" ? t.openUrl : null;
|
|
53
22
|
}
|
|
54
|
-
const
|
|
23
|
+
const Te = {
|
|
55
24
|
name: "Business",
|
|
56
25
|
verified: !1
|
|
57
|
-
},
|
|
26
|
+
}, je = {
|
|
58
27
|
currentMessageId: null,
|
|
59
28
|
chatHistory: [],
|
|
60
29
|
isTyping: !1,
|
|
61
30
|
error: null
|
|
62
|
-
},
|
|
63
|
-
function
|
|
64
|
-
const t =
|
|
31
|
+
}, Ce = Se(null);
|
|
32
|
+
function Le(c) {
|
|
33
|
+
const t = B(20), {
|
|
65
34
|
children: e,
|
|
66
35
|
theme: s,
|
|
67
36
|
device: l,
|
|
68
|
-
businessInfo:
|
|
37
|
+
businessInfo: o,
|
|
69
38
|
state: g,
|
|
70
39
|
showSuggestions: r,
|
|
71
|
-
isProfileOpen:
|
|
40
|
+
isProfileOpen: i,
|
|
72
41
|
toggleProfile: a,
|
|
73
42
|
onReply: f,
|
|
74
43
|
onAction: h,
|
|
@@ -77,53 +46,53 @@ function Ae(c) {
|
|
|
77
46
|
closeWebView: m
|
|
78
47
|
} = c;
|
|
79
48
|
let p;
|
|
80
|
-
t[0] !==
|
|
81
|
-
...
|
|
82
|
-
...
|
|
83
|
-
}, t[0] =
|
|
49
|
+
t[0] !== o ? (p = {
|
|
50
|
+
...Te,
|
|
51
|
+
...o
|
|
52
|
+
}, t[0] = o, t[1] = p) : p = t[1];
|
|
84
53
|
let b;
|
|
85
54
|
t[2] !== g ? (b = {
|
|
86
|
-
...
|
|
55
|
+
...je,
|
|
87
56
|
...g
|
|
88
57
|
}, t[2] = g, t[3] = b) : b = t[3];
|
|
89
58
|
let y;
|
|
90
|
-
t[4] !== m || t[5] !== l || t[6] !==
|
|
59
|
+
t[4] !== m || t[5] !== l || t[6] !== i || t[7] !== h || t[8] !== f || t[9] !== u || t[10] !== r || t[11] !== p || t[12] !== b || t[13] !== s || t[14] !== a || t[15] !== d ? (y = {
|
|
91
60
|
theme: s,
|
|
92
61
|
device: l,
|
|
93
62
|
businessInfo: p,
|
|
94
63
|
state: b,
|
|
95
64
|
showSuggestions: r,
|
|
96
|
-
isProfileOpen:
|
|
65
|
+
isProfileOpen: i,
|
|
97
66
|
toggleProfile: a,
|
|
98
67
|
handleReply: f,
|
|
99
68
|
handleAction: h,
|
|
100
69
|
webView: d,
|
|
101
70
|
openWebView: u,
|
|
102
71
|
closeWebView: m
|
|
103
|
-
}, t[4] = m, t[5] = l, t[6] =
|
|
104
|
-
const
|
|
72
|
+
}, t[4] = m, t[5] = l, t[6] = i, t[7] = h, t[8] = f, t[9] = u, t[10] = r, t[11] = p, t[12] = b, t[13] = s, t[14] = a, t[15] = d, t[16] = y) : y = t[16];
|
|
73
|
+
const w = y;
|
|
105
74
|
let x;
|
|
106
|
-
return t[17] !== e || t[18] !==
|
|
75
|
+
return t[17] !== e || t[18] !== w ? (x = /* @__PURE__ */ n(Ce.Provider, { value: w, children: e }), t[17] = e, t[18] = w, t[19] = x) : x = t[19], x;
|
|
107
76
|
}
|
|
108
77
|
function K() {
|
|
109
|
-
const c =
|
|
78
|
+
const c = Me(Ce);
|
|
110
79
|
if (!c)
|
|
111
80
|
throw new Error("useEmulator must be used within an EmulatorProvider");
|
|
112
81
|
return c;
|
|
113
82
|
}
|
|
114
|
-
function
|
|
83
|
+
function _e(c) {
|
|
115
84
|
const t = Object.values(c.messages);
|
|
116
85
|
return t.find((e) => e.is_first) || t[0] || null;
|
|
117
86
|
}
|
|
118
|
-
function
|
|
87
|
+
function fe(c, t) {
|
|
119
88
|
return c.messages[t] || null;
|
|
120
89
|
}
|
|
121
|
-
function
|
|
90
|
+
function be(c, t) {
|
|
122
91
|
const e = c.responses?.keyword?.keyword_response?.choices;
|
|
123
92
|
return e && e[t]?.next_message || null;
|
|
124
93
|
}
|
|
125
|
-
function
|
|
126
|
-
const e = c.parts, s =
|
|
94
|
+
function ue(c, t) {
|
|
95
|
+
const e = c.parts, s = Re(e), l = Be(e);
|
|
127
96
|
return {
|
|
128
97
|
id: `${c.id}-${t}-${Date.now()}`,
|
|
129
98
|
sender: "business",
|
|
@@ -132,7 +101,7 @@ function pe(c, t) {
|
|
|
132
101
|
suggestions: l
|
|
133
102
|
};
|
|
134
103
|
}
|
|
135
|
-
function
|
|
104
|
+
function Re(c) {
|
|
136
105
|
for (const t of c) {
|
|
137
106
|
const e = t.RCSMessage;
|
|
138
107
|
if (e.textMessage)
|
|
@@ -144,13 +113,13 @@ function Ge(c) {
|
|
|
144
113
|
if (s)
|
|
145
114
|
return {
|
|
146
115
|
type: "richcard",
|
|
147
|
-
card:
|
|
116
|
+
card: xe(s.content, s.layout)
|
|
148
117
|
};
|
|
149
118
|
const l = e.richcardMessage?.message?.generalPurposeCardCarousel;
|
|
150
119
|
if (l)
|
|
151
120
|
return {
|
|
152
121
|
type: "carousel",
|
|
153
|
-
cards: l.content.map((
|
|
122
|
+
cards: l.content.map((o) => xe(o, {
|
|
154
123
|
cardOrientation: "VERTICAL",
|
|
155
124
|
cardWidth: l.layout.cardWidth
|
|
156
125
|
}))
|
|
@@ -161,7 +130,7 @@ function Ge(c) {
|
|
|
161
130
|
text: "[Unsupported message type]"
|
|
162
131
|
};
|
|
163
132
|
}
|
|
164
|
-
function
|
|
133
|
+
function xe(c, t) {
|
|
165
134
|
const e = () => {
|
|
166
135
|
if (c.media) {
|
|
167
136
|
if (c.media.mediaUrl) return c.media.mediaUrl;
|
|
@@ -178,7 +147,7 @@ function Ce(c, t) {
|
|
|
178
147
|
description: c.description,
|
|
179
148
|
media: l ? {
|
|
180
149
|
url: l,
|
|
181
|
-
height:
|
|
150
|
+
height: Ee(c.media?.height || "MEDIUM_HEIGHT"),
|
|
182
151
|
thumbnailUrl: s()
|
|
183
152
|
} : void 0,
|
|
184
153
|
suggestions: c.suggestions,
|
|
@@ -189,7 +158,7 @@ function Ce(c, t) {
|
|
|
189
158
|
}
|
|
190
159
|
};
|
|
191
160
|
}
|
|
192
|
-
function
|
|
161
|
+
function Ee(c) {
|
|
193
162
|
switch (c) {
|
|
194
163
|
case "SHORT_HEIGHT":
|
|
195
164
|
return "short";
|
|
@@ -199,7 +168,7 @@ function Fe(c) {
|
|
|
199
168
|
return "medium";
|
|
200
169
|
}
|
|
201
170
|
}
|
|
202
|
-
function
|
|
171
|
+
function Be(c) {
|
|
203
172
|
const t = [];
|
|
204
173
|
for (const e of c) {
|
|
205
174
|
const s = e.RCSMessage;
|
|
@@ -207,7 +176,7 @@ function qe(c) {
|
|
|
207
176
|
}
|
|
208
177
|
return t;
|
|
209
178
|
}
|
|
210
|
-
function
|
|
179
|
+
function De(c) {
|
|
211
180
|
return {
|
|
212
181
|
id: `user-${Date.now()}`,
|
|
213
182
|
sender: "user",
|
|
@@ -218,7 +187,7 @@ function Ye(c) {
|
|
|
218
187
|
timestamp: Date.now()
|
|
219
188
|
};
|
|
220
189
|
}
|
|
221
|
-
function
|
|
190
|
+
function We(c) {
|
|
222
191
|
if (!c || typeof c != "object") return !1;
|
|
223
192
|
const t = c;
|
|
224
193
|
if (typeof t.name != "string" || !t.messages || typeof t.messages != "object") return !1;
|
|
@@ -231,8 +200,8 @@ function Je(c) {
|
|
|
231
200
|
}
|
|
232
201
|
return !0;
|
|
233
202
|
}
|
|
234
|
-
function
|
|
235
|
-
const t =
|
|
203
|
+
function Ve(c) {
|
|
204
|
+
const t = _e(c);
|
|
236
205
|
if (!t || !t.parts.length) return "New message";
|
|
237
206
|
const s = t.parts[0].RCSMessage;
|
|
238
207
|
if (s.textMessage)
|
|
@@ -240,16 +209,16 @@ function Qe(c) {
|
|
|
240
209
|
const l = s.richcardMessage?.message?.generalPurposeCard;
|
|
241
210
|
if (l?.content.title)
|
|
242
211
|
return l.content.title;
|
|
243
|
-
const
|
|
244
|
-
return
|
|
212
|
+
const o = s.richcardMessage?.message?.generalPurposeCardCarousel;
|
|
213
|
+
return o?.content[0]?.title ? o.content[0].title : "New message";
|
|
245
214
|
}
|
|
246
|
-
const
|
|
215
|
+
const $e = {
|
|
247
216
|
currentMessageId: null,
|
|
248
217
|
chatHistory: [],
|
|
249
218
|
isTyping: !1,
|
|
250
219
|
error: null
|
|
251
220
|
};
|
|
252
|
-
function
|
|
221
|
+
function Ue(c, t) {
|
|
253
222
|
switch (t.type) {
|
|
254
223
|
case "INIT":
|
|
255
224
|
return {
|
|
@@ -264,7 +233,7 @@ function Xe(c, t) {
|
|
|
264
233
|
isTyping: !1
|
|
265
234
|
};
|
|
266
235
|
case "ADD_USER_REPLY": {
|
|
267
|
-
const e =
|
|
236
|
+
const e = De(t.text), s = c.chatHistory.map((l, o) => o === c.chatHistory.length - 1 ? {
|
|
268
237
|
...l,
|
|
269
238
|
suggestions: void 0
|
|
270
239
|
} : l);
|
|
@@ -290,23 +259,23 @@ function Xe(c, t) {
|
|
|
290
259
|
isTyping: !1
|
|
291
260
|
};
|
|
292
261
|
case "RESET":
|
|
293
|
-
return
|
|
262
|
+
return $e;
|
|
294
263
|
default:
|
|
295
264
|
return c;
|
|
296
265
|
}
|
|
297
266
|
}
|
|
298
|
-
function
|
|
299
|
-
const t =
|
|
267
|
+
function He(c) {
|
|
268
|
+
const t = B(18), {
|
|
300
269
|
flow: e,
|
|
301
270
|
onUserReply: s,
|
|
302
271
|
typingDelay: l
|
|
303
|
-
} = c,
|
|
272
|
+
} = c, o = l === void 0 ? 800 : l, [g, r] = ze(Ue, $e), i = me(0), a = me(!1);
|
|
304
273
|
let f, h;
|
|
305
274
|
t[0] !== e ? (f = () => {
|
|
306
275
|
if (a.current)
|
|
307
276
|
return;
|
|
308
277
|
a.current = !0;
|
|
309
|
-
const x =
|
|
278
|
+
const x = _e(e);
|
|
310
279
|
if (!x) {
|
|
311
280
|
r({
|
|
312
281
|
type: "SET_ERROR",
|
|
@@ -317,49 +286,49 @@ function Ze(c) {
|
|
|
317
286
|
r({
|
|
318
287
|
type: "INIT",
|
|
319
288
|
messageId: x.id
|
|
320
|
-
}),
|
|
321
|
-
const k =
|
|
289
|
+
}), i.current = i.current + 1;
|
|
290
|
+
const k = ue(x, i.current);
|
|
322
291
|
r({
|
|
323
292
|
type: "ADD_BUSINESS_MESSAGE",
|
|
324
293
|
message: k
|
|
325
294
|
});
|
|
326
|
-
}, h = [e], t[0] = e, t[1] = f, t[2] = h) : (f = t[1], h = t[2]),
|
|
295
|
+
}, h = [e], t[0] = e, t[1] = f, t[2] = h) : (f = t[1], h = t[2]), oe(f, h);
|
|
327
296
|
let d;
|
|
328
|
-
t[3] !== e || t[4] !== s || t[5] !== g.currentMessageId || t[6] !==
|
|
329
|
-
if (!
|
|
297
|
+
t[3] !== e || t[4] !== s || t[5] !== g.currentMessageId || t[6] !== o ? (d = (x) => {
|
|
298
|
+
if (!Ne(x))
|
|
330
299
|
return;
|
|
331
300
|
const {
|
|
332
301
|
displayText: k,
|
|
333
|
-
postback:
|
|
334
|
-
} = x.reply, N =
|
|
302
|
+
postback: v
|
|
303
|
+
} = x.reply, N = v.data;
|
|
335
304
|
r({
|
|
336
305
|
type: "ADD_USER_REPLY",
|
|
337
306
|
text: k,
|
|
338
307
|
postbackData: N
|
|
339
308
|
});
|
|
340
|
-
const
|
|
309
|
+
const L = {
|
|
341
310
|
type: "reply",
|
|
342
311
|
postbackData: N,
|
|
343
312
|
displayText: k,
|
|
344
313
|
timestamp: Date.now()
|
|
345
314
|
};
|
|
346
|
-
s(
|
|
347
|
-
const
|
|
348
|
-
if (
|
|
315
|
+
s(L);
|
|
316
|
+
const M = g.currentMessageId ? fe(e, g.currentMessageId) : null;
|
|
317
|
+
if (!M) {
|
|
349
318
|
r({
|
|
350
319
|
type: "SET_ERROR",
|
|
351
320
|
error: "Current message not found"
|
|
352
321
|
});
|
|
353
322
|
return;
|
|
354
323
|
}
|
|
355
|
-
const
|
|
356
|
-
if (!
|
|
324
|
+
const _ = be(M, N);
|
|
325
|
+
if (!_)
|
|
357
326
|
return;
|
|
358
|
-
const A =
|
|
327
|
+
const A = fe(e, _);
|
|
359
328
|
if (!A) {
|
|
360
329
|
r({
|
|
361
330
|
type: "SET_ERROR",
|
|
362
|
-
error: `Next message "${
|
|
331
|
+
error: `Next message "${_}" not found`
|
|
363
332
|
});
|
|
364
333
|
return;
|
|
365
334
|
}
|
|
@@ -368,63 +337,63 @@ function Ze(c) {
|
|
|
368
337
|
isTyping: !0
|
|
369
338
|
}), r({
|
|
370
339
|
type: "NAVIGATE_TO",
|
|
371
|
-
messageId:
|
|
340
|
+
messageId: _
|
|
372
341
|
}), setTimeout(() => {
|
|
373
|
-
|
|
374
|
-
const z =
|
|
342
|
+
i.current = i.current + 1;
|
|
343
|
+
const z = ue(A, i.current);
|
|
375
344
|
r({
|
|
376
345
|
type: "ADD_BUSINESS_MESSAGE",
|
|
377
346
|
message: z
|
|
378
347
|
});
|
|
379
|
-
},
|
|
380
|
-
}, t[3] = e, t[4] = s, t[5] = g.currentMessageId, t[6] =
|
|
348
|
+
}, o);
|
|
349
|
+
}, t[3] = e, t[4] = s, t[5] = g.currentMessageId, t[6] = o, t[7] = d) : d = t[7];
|
|
381
350
|
const u = d;
|
|
382
351
|
let m;
|
|
383
|
-
t[8] !== e || t[9] !== s || t[10] !== g.currentMessageId || t[11] !==
|
|
352
|
+
t[8] !== e || t[9] !== s || t[10] !== g.currentMessageId || t[11] !== o ? (m = (x) => {
|
|
384
353
|
if (!le(x))
|
|
385
354
|
return;
|
|
386
355
|
const {
|
|
387
356
|
displayText: k,
|
|
388
|
-
postback:
|
|
357
|
+
postback: v,
|
|
389
358
|
openUrlAction: N,
|
|
390
|
-
dialAction:
|
|
391
|
-
dialerAction:
|
|
392
|
-
mapAction:
|
|
359
|
+
dialAction: L,
|
|
360
|
+
dialerAction: M,
|
|
361
|
+
mapAction: _,
|
|
393
362
|
viewLocationAction: A
|
|
394
|
-
} = x.action, z =
|
|
363
|
+
} = x.action, z = v.data, $ = L?.phoneNumber || M?.dialPhoneNumber?.phoneNumber, S = _?.showLocation?.location || A?.latLong;
|
|
395
364
|
let I;
|
|
396
365
|
N ? I = {
|
|
397
366
|
type: "openUrl",
|
|
398
367
|
url: N.url
|
|
399
|
-
} :
|
|
368
|
+
} : $ ? I = {
|
|
400
369
|
type: "dial",
|
|
401
|
-
phoneNumber:
|
|
402
|
-
} :
|
|
370
|
+
phoneNumber: $
|
|
371
|
+
} : S && (I = {
|
|
403
372
|
type: "viewLocation",
|
|
404
|
-
latitude:
|
|
405
|
-
longitude:
|
|
373
|
+
latitude: S.latitude,
|
|
374
|
+
longitude: S.longitude,
|
|
406
375
|
query: A?.query
|
|
407
376
|
});
|
|
408
|
-
const
|
|
377
|
+
const T = {
|
|
409
378
|
type: "action",
|
|
410
379
|
postbackData: z,
|
|
411
380
|
displayText: k,
|
|
412
381
|
timestamp: Date.now(),
|
|
413
382
|
actionData: I
|
|
414
383
|
};
|
|
415
|
-
if (s(
|
|
384
|
+
if (s(T), N)
|
|
416
385
|
window.open(N.url, "_blank", "noopener,noreferrer");
|
|
417
|
-
else if (
|
|
418
|
-
window.location.href = `tel:${
|
|
419
|
-
else if (
|
|
420
|
-
const
|
|
386
|
+
else if ($)
|
|
387
|
+
window.location.href = `tel:${$}`;
|
|
388
|
+
else if (S) {
|
|
389
|
+
const j = _?.showLocation?.location?.label || A?.label || "", O = `https://www.google.com/maps/search/?api=1&query=${S.latitude},${S.longitude}${j ? `&query_place_id=${encodeURIComponent(j)}` : ""}`;
|
|
421
390
|
window.open(O, "_blank", "noopener,noreferrer");
|
|
422
391
|
}
|
|
423
|
-
const
|
|
424
|
-
if (
|
|
425
|
-
const
|
|
426
|
-
if (
|
|
427
|
-
const O =
|
|
392
|
+
const D = g.currentMessageId ? fe(e, g.currentMessageId) : null;
|
|
393
|
+
if (D) {
|
|
394
|
+
const j = be(D, z);
|
|
395
|
+
if (j) {
|
|
396
|
+
const O = fe(e, j);
|
|
428
397
|
O && (r({
|
|
429
398
|
type: "ADD_USER_REPLY",
|
|
430
399
|
text: k,
|
|
@@ -434,74 +403,74 @@ function Ze(c) {
|
|
|
434
403
|
isTyping: !0
|
|
435
404
|
}), r({
|
|
436
405
|
type: "NAVIGATE_TO",
|
|
437
|
-
messageId:
|
|
406
|
+
messageId: j
|
|
438
407
|
}), setTimeout(() => {
|
|
439
|
-
|
|
440
|
-
const
|
|
408
|
+
i.current = i.current + 1;
|
|
409
|
+
const J = ue(O, i.current);
|
|
441
410
|
r({
|
|
442
411
|
type: "ADD_BUSINESS_MESSAGE",
|
|
443
|
-
message:
|
|
412
|
+
message: J
|
|
444
413
|
});
|
|
445
|
-
},
|
|
414
|
+
}, o));
|
|
446
415
|
}
|
|
447
416
|
}
|
|
448
|
-
}, t[8] = e, t[9] = s, t[10] = g.currentMessageId, t[11] =
|
|
417
|
+
}, t[8] = e, t[9] = s, t[10] = g.currentMessageId, t[11] = o, t[12] = m) : m = t[12];
|
|
449
418
|
const p = m;
|
|
450
419
|
let b;
|
|
451
420
|
t[13] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (b = () => {
|
|
452
|
-
a.current = !1,
|
|
421
|
+
a.current = !1, i.current = 0, r({
|
|
453
422
|
type: "RESET"
|
|
454
423
|
});
|
|
455
424
|
}, t[13] = b) : b = t[13];
|
|
456
425
|
const y = b;
|
|
457
|
-
let
|
|
458
|
-
return t[14] !== p || t[15] !== u || t[16] !== g ? (
|
|
426
|
+
let w;
|
|
427
|
+
return t[14] !== p || t[15] !== u || t[16] !== g ? (w = {
|
|
459
428
|
state: g,
|
|
460
429
|
handleReply: u,
|
|
461
430
|
handleAction: p,
|
|
462
431
|
reset: y
|
|
463
|
-
}, t[14] = p, t[15] = u, t[16] = g, t[17] =
|
|
432
|
+
}, t[14] = p, t[15] = u, t[16] = g, t[17] = w) : w = t[17], w;
|
|
464
433
|
}
|
|
465
|
-
function
|
|
466
|
-
const [t, e] = ne(null), [s, l] = ne(!1), [
|
|
434
|
+
function Oe(c) {
|
|
435
|
+
const [t, e] = ne(null), [s, l] = ne(!1), [o, g] = ne(null), r = Ie(async () => {
|
|
467
436
|
if (!c) {
|
|
468
437
|
e(null), g(null);
|
|
469
438
|
return;
|
|
470
439
|
}
|
|
471
440
|
l(!0), g(null);
|
|
472
441
|
try {
|
|
473
|
-
const
|
|
442
|
+
const i = await fetch(c, {
|
|
474
443
|
method: "GET",
|
|
475
444
|
headers: {
|
|
476
445
|
Accept: "application/json"
|
|
477
446
|
}
|
|
478
447
|
});
|
|
479
|
-
if (!
|
|
480
|
-
throw new Error(`HTTP ${
|
|
481
|
-
const a = await
|
|
448
|
+
if (!i.ok)
|
|
449
|
+
throw new Error(`HTTP ${i.status}: ${i.statusText}`);
|
|
450
|
+
const a = await i.json();
|
|
482
451
|
if (!a || typeof a != "object")
|
|
483
452
|
throw new Error("Invalid JSON: Expected an object");
|
|
484
453
|
if (!a.messages || typeof a.messages != "object")
|
|
485
454
|
throw new Error("Invalid RBM JSON: Missing 'messages' object");
|
|
486
455
|
e(a);
|
|
487
|
-
} catch (
|
|
488
|
-
const a =
|
|
456
|
+
} catch (i) {
|
|
457
|
+
const a = i instanceof Error ? i.message : "Failed to fetch JSON";
|
|
489
458
|
g(a), e(null);
|
|
490
459
|
} finally {
|
|
491
460
|
l(!1);
|
|
492
461
|
}
|
|
493
462
|
}, [c]);
|
|
494
|
-
return
|
|
463
|
+
return oe(() => {
|
|
495
464
|
r();
|
|
496
465
|
}, [r]), {
|
|
497
466
|
data: t,
|
|
498
467
|
isLoading: s,
|
|
499
|
-
error:
|
|
468
|
+
error: o,
|
|
500
469
|
refetch: r
|
|
501
470
|
};
|
|
502
471
|
}
|
|
503
|
-
function
|
|
504
|
-
const t =
|
|
472
|
+
function Pe(c) {
|
|
473
|
+
const t = B(3), e = me(null);
|
|
505
474
|
let s;
|
|
506
475
|
t[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (s = () => {
|
|
507
476
|
e.current && e.current.scrollTo({
|
|
@@ -510,19 +479,19 @@ function et(c) {
|
|
|
510
479
|
});
|
|
511
480
|
}, t[0] = s) : s = t[0];
|
|
512
481
|
let l;
|
|
513
|
-
return t[1] !== c ? (l = [c], t[1] = c, t[2] = l) : l = t[2],
|
|
482
|
+
return t[1] !== c ? (l = [c], t[1] = c, t[2] = l) : l = t[2], oe(s, l), e;
|
|
514
483
|
}
|
|
515
|
-
const
|
|
516
|
-
const t =
|
|
484
|
+
const Ge = F(function() {
|
|
485
|
+
const t = B(34), {
|
|
517
486
|
theme: e,
|
|
518
487
|
businessInfo: s,
|
|
519
488
|
toggleProfile: l
|
|
520
|
-
} = K(),
|
|
489
|
+
} = K(), o = e === "dark", g = s.brandColor || "#0084ff", r = `
|
|
521
490
|
flex items-center gap-3 px-3 py-2.5 border-b
|
|
522
|
-
${
|
|
523
|
-
`,
|
|
491
|
+
${o ? "bg-zinc-900 border-zinc-800" : "bg-white border-gray-100"}
|
|
492
|
+
`, i = `Chat with ${s.name}`, a = `
|
|
524
493
|
p-1.5 -ml-1 rounded-full transition-colors
|
|
525
|
-
${
|
|
494
|
+
${o ? "hover:bg-zinc-800 text-white" : "hover:bg-gray-100 text-gray-700"}
|
|
526
495
|
`;
|
|
527
496
|
let f;
|
|
528
497
|
t[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (f = /* @__PURE__ */ n("svg", { className: "w-5 h-5", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ n("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M15 19l-7-7 7-7" }) }), t[0] = f) : f = t[0];
|
|
@@ -530,7 +499,7 @@ const tt = F(function() {
|
|
|
530
499
|
t[1] !== a ? (h = /* @__PURE__ */ n("button", { type: "button", className: a, "aria-label": "Go back", children: f }), t[1] = a, t[2] = h) : h = t[2];
|
|
531
500
|
const d = `
|
|
532
501
|
relative w-9 h-9 rounded-full overflow-hidden flex-shrink-0
|
|
533
|
-
${
|
|
502
|
+
${o ? "bg-zinc-800" : "bg-gray-100"}
|
|
534
503
|
`, u = s.logo ? void 0 : g;
|
|
535
504
|
let m;
|
|
536
505
|
t[3] !== u ? (m = {
|
|
@@ -542,59 +511,59 @@ const tt = F(function() {
|
|
|
542
511
|
t[8] !== d || t[9] !== m || t[10] !== p ? (b = /* @__PURE__ */ n("div", { className: d, style: m, children: p }), t[8] = d, t[9] = m, t[10] = p, t[11] = b) : b = t[11];
|
|
543
512
|
const y = `
|
|
544
513
|
text-base font-medium truncate
|
|
545
|
-
${
|
|
514
|
+
${o ? "text-white" : "text-gray-900"}
|
|
546
515
|
`;
|
|
547
|
-
let
|
|
548
|
-
t[12] !== s.name || t[13] !== y ? (
|
|
516
|
+
let w;
|
|
517
|
+
t[12] !== s.name || t[13] !== y ? (w = /* @__PURE__ */ n("h1", { className: y, children: s.name }), t[12] = s.name, t[13] = y, t[14] = w) : w = t[14];
|
|
549
518
|
let x;
|
|
550
|
-
t[15] !==
|
|
519
|
+
t[15] !== w || t[16] !== b || t[17] !== l ? (x = /* @__PURE__ */ C("button", { onClick: l, className: "flex items-center gap-2.5 flex-1 min-w-0 text-left", "aria-label": "View business info", children: [
|
|
551
520
|
b,
|
|
552
|
-
|
|
553
|
-
] }), t[15] =
|
|
521
|
+
w
|
|
522
|
+
] }), t[15] = w, t[16] = b, t[17] = l, t[18] = x) : x = t[18];
|
|
554
523
|
let k;
|
|
555
|
-
t[19] !== s.verified || t[20] !==
|
|
524
|
+
t[19] !== s.verified || t[20] !== o ? (k = s.verified && /* @__PURE__ */ n("button", { type: "button", className: `
|
|
556
525
|
p-2 rounded-full transition-colors
|
|
557
|
-
${
|
|
526
|
+
${o ? "hover:bg-zinc-800" : "hover:bg-gray-100"}
|
|
558
527
|
`, "aria-label": "Verified business", children: /* @__PURE__ */ C("svg", { className: "w-5 h-5", viewBox: "0 0 24 24", fill: "none", children: [
|
|
559
|
-
/* @__PURE__ */ n("path", { d: "M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z", stroke:
|
|
528
|
+
/* @__PURE__ */ n("path", { d: "M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z", stroke: o ? "#9ca3af" : "#6b7280", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round" }),
|
|
560
529
|
/* @__PURE__ */ n("path", { d: "M9 12l2 2 4-4", stroke: "#3b82f6", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round" })
|
|
561
|
-
] }) }), t[19] = s.verified, t[20] =
|
|
562
|
-
const
|
|
530
|
+
] }) }), t[19] = s.verified, t[20] = o, t[21] = k) : k = t[21];
|
|
531
|
+
const v = `
|
|
563
532
|
p-2 rounded-full transition-colors
|
|
564
|
-
${
|
|
533
|
+
${o ? "hover:bg-zinc-800 text-zinc-400" : "hover:bg-gray-100 text-gray-500"}
|
|
565
534
|
`;
|
|
566
535
|
let N;
|
|
567
536
|
t[22] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (N = /* @__PURE__ */ n("svg", { className: "w-5 h-5", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ n("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" }) }), t[22] = N) : N = t[22];
|
|
568
|
-
let _;
|
|
569
|
-
t[23] !== w ? (_ = /* @__PURE__ */ n("button", { type: "button", className: w, "aria-label": "More options", children: N }), t[23] = w, t[24] = _) : _ = t[24];
|
|
570
|
-
let $;
|
|
571
|
-
t[25] !== k || t[26] !== _ ? ($ = /* @__PURE__ */ C("div", { className: "flex items-center gap-0.5", children: [
|
|
572
|
-
k,
|
|
573
|
-
_
|
|
574
|
-
] }), t[25] = k, t[26] = _, t[27] = $) : $ = t[27];
|
|
575
537
|
let L;
|
|
576
|
-
|
|
538
|
+
t[23] !== v ? (L = /* @__PURE__ */ n("button", { type: "button", className: v, "aria-label": "More options", children: N }), t[23] = v, t[24] = L) : L = t[24];
|
|
539
|
+
let M;
|
|
540
|
+
t[25] !== k || t[26] !== L ? (M = /* @__PURE__ */ C("div", { className: "flex items-center gap-0.5", children: [
|
|
541
|
+
k,
|
|
542
|
+
L
|
|
543
|
+
] }), t[25] = k, t[26] = L, t[27] = M) : M = t[27];
|
|
544
|
+
let _;
|
|
545
|
+
return t[28] !== r || t[29] !== i || t[30] !== x || t[31] !== M || t[32] !== h ? (_ = /* @__PURE__ */ C("header", { className: r, role: "banner", "aria-label": i, children: [
|
|
577
546
|
h,
|
|
578
547
|
x,
|
|
579
|
-
|
|
580
|
-
] }), t[28] = r, t[29] =
|
|
581
|
-
}),
|
|
582
|
-
const t =
|
|
548
|
+
M
|
|
549
|
+
] }), t[28] = r, t[29] = i, t[30] = x, t[31] = M, t[32] = h, t[33] = _) : _ = t[33], _;
|
|
550
|
+
}), Fe = F(function() {
|
|
551
|
+
const t = B(24), {
|
|
583
552
|
theme: e,
|
|
584
553
|
businessInfo: s
|
|
585
|
-
} = K(), l = e === "dark",
|
|
554
|
+
} = K(), l = e === "dark", o = s.brandColor || "#0084ff", g = `
|
|
586
555
|
w-16 h-16 rounded-full overflow-hidden
|
|
587
556
|
${l ? "bg-zinc-800" : "bg-gray-100"}
|
|
588
557
|
shadow-lg
|
|
589
|
-
`, r = s.logo ? void 0 :
|
|
590
|
-
let
|
|
591
|
-
t[0] !== r ? (
|
|
558
|
+
`, r = s.logo ? void 0 : o;
|
|
559
|
+
let i;
|
|
560
|
+
t[0] !== r ? (i = {
|
|
592
561
|
backgroundColor: r
|
|
593
|
-
}, t[0] = r, t[1] =
|
|
562
|
+
}, t[0] = r, t[1] = i) : i = t[1];
|
|
594
563
|
let a;
|
|
595
564
|
t[2] !== s.logo || t[3] !== s.name ? (a = s.logo ? /* @__PURE__ */ n("img", { src: s.logo, alt: `${s.name} logo`, className: "w-full h-full object-cover" }) : /* @__PURE__ */ n("div", { className: "w-full h-full flex items-center justify-center text-2xl font-bold text-white", children: s.name.charAt(0).toUpperCase() }), t[2] = s.logo, t[3] = s.name, t[4] = a) : a = t[4];
|
|
596
565
|
let f;
|
|
597
|
-
t[5] !== g || t[6] !==
|
|
566
|
+
t[5] !== g || t[6] !== i || t[7] !== a ? (f = /* @__PURE__ */ n("div", { className: g, style: i, children: a }), t[5] = g, t[6] = i, t[7] = a, t[8] = f) : f = t[8];
|
|
598
567
|
let h;
|
|
599
568
|
t[9] !== s.verified ? (h = s.verified && /* @__PURE__ */ n("div", { 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", children: /* @__PURE__ */ n("svg", { className: "w-3 h-3 text-white", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ n("path", { d: "M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41L9 16.17z" }) }) }), t[9] = s.verified, t[10] = h) : h = t[10];
|
|
600
569
|
let d;
|
|
@@ -619,35 +588,35 @@ const tt = F(function() {
|
|
|
619
588
|
m,
|
|
620
589
|
p
|
|
621
590
|
] }), t[20] = d, t[21] = m, t[22] = p, t[23] = b) : b = t[23], b;
|
|
622
|
-
}),
|
|
623
|
-
const e =
|
|
591
|
+
}), Je = F(function(t) {
|
|
592
|
+
const e = B(26), {
|
|
624
593
|
text: s,
|
|
625
594
|
sender: l,
|
|
626
|
-
timestamp:
|
|
595
|
+
timestamp: o
|
|
627
596
|
} = t, {
|
|
628
597
|
theme: g,
|
|
629
598
|
businessInfo: r
|
|
630
|
-
} = K(),
|
|
599
|
+
} = K(), i = g === "dark", a = l === "business", f = r.brandColor || "#0084ff";
|
|
631
600
|
let h;
|
|
632
|
-
e[0] !==
|
|
601
|
+
e[0] !== o ? (h = new Date(o).toLocaleTimeString([], {
|
|
633
602
|
hour: "2-digit",
|
|
634
603
|
minute: "2-digit"
|
|
635
|
-
}), e[0] =
|
|
604
|
+
}), e[0] = o, e[1] = h) : h = e[1];
|
|
636
605
|
const d = h;
|
|
637
606
|
if (a) {
|
|
638
607
|
const k = `
|
|
639
608
|
px-4 py-3 rounded-2xl text-sm leading-relaxed
|
|
640
|
-
${
|
|
609
|
+
${i ? "bg-zinc-800 text-white" : "bg-gray-100 text-gray-900"}
|
|
641
610
|
`;
|
|
642
|
-
let
|
|
643
|
-
e[2] !== k || e[3] !== s ? (
|
|
611
|
+
let v;
|
|
612
|
+
e[2] !== k || e[3] !== s ? (v = /* @__PURE__ */ n("div", { className: k, children: s }), e[2] = k, e[3] = s, e[4] = v) : v = e[4];
|
|
644
613
|
let N;
|
|
645
614
|
e[5] !== d ? (N = /* @__PURE__ */ n("span", { className: "sr-only", children: d }), e[5] = d, e[6] = N) : N = e[6];
|
|
646
|
-
let
|
|
647
|
-
return e[7] !==
|
|
648
|
-
|
|
615
|
+
let L;
|
|
616
|
+
return e[7] !== v || e[8] !== N ? (L = /* @__PURE__ */ C("div", { className: "max-w-[90%]", children: [
|
|
617
|
+
v,
|
|
649
618
|
N
|
|
650
|
-
] }), e[7] =
|
|
619
|
+
] }), e[7] = v, e[8] = N, e[9] = L) : L = e[9], L;
|
|
651
620
|
}
|
|
652
621
|
let u;
|
|
653
622
|
e[10] !== f ? (u = {
|
|
@@ -663,27 +632,27 @@ const tt = F(function() {
|
|
|
663
632
|
e[17] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (b = /* @__PURE__ */ n("svg", { className: "w-3 h-3 text-white", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 3, children: /* @__PURE__ */ n("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M5 13l4 4L19 7" }) }), e[17] = b) : b = e[17];
|
|
664
633
|
let y;
|
|
665
634
|
e[18] !== p ? (y = /* @__PURE__ */ n("div", { className: "w-5 h-5 rounded-full flex items-center justify-center flex-shrink-0", style: p, children: b }), e[18] = p, e[19] = y) : y = e[19];
|
|
666
|
-
let
|
|
667
|
-
e[20] !== d ? (
|
|
635
|
+
let w;
|
|
636
|
+
e[20] !== d ? (w = /* @__PURE__ */ n("span", { className: "sr-only", children: d }), e[20] = d, e[21] = w) : w = e[21];
|
|
668
637
|
let x;
|
|
669
|
-
return e[22] !== m || e[23] !== y || e[24] !==
|
|
638
|
+
return e[22] !== m || e[23] !== y || e[24] !== w ? (x = /* @__PURE__ */ C("div", { className: "flex items-end gap-1.5 max-w-[85%] ml-auto", children: [
|
|
670
639
|
m,
|
|
671
640
|
y,
|
|
672
|
-
|
|
673
|
-
] }), e[22] = m, e[23] = y, e[24] =
|
|
674
|
-
}),
|
|
675
|
-
const e =
|
|
641
|
+
w
|
|
642
|
+
] }), e[22] = m, e[23] = y, e[24] = w, e[25] = x) : x = e[25], x;
|
|
643
|
+
}), Ye = F(function(t) {
|
|
644
|
+
const e = B(18), {
|
|
676
645
|
text: s,
|
|
677
646
|
timestamp: l
|
|
678
647
|
} = t, {
|
|
679
|
-
businessInfo:
|
|
680
|
-
} = K(), g =
|
|
648
|
+
businessInfo: o
|
|
649
|
+
} = K(), g = o.brandColor || "#0084ff";
|
|
681
650
|
let r;
|
|
682
651
|
e[0] !== l ? (r = new Date(l).toLocaleTimeString([], {
|
|
683
652
|
hour: "2-digit",
|
|
684
653
|
minute: "2-digit"
|
|
685
654
|
}), e[0] = l, e[1] = r) : r = e[1];
|
|
686
|
-
const
|
|
655
|
+
const i = r;
|
|
687
656
|
let a;
|
|
688
657
|
e[2] !== g ? (a = {
|
|
689
658
|
backgroundColor: g
|
|
@@ -699,22 +668,22 @@ const tt = F(function() {
|
|
|
699
668
|
let u;
|
|
700
669
|
e[10] !== h ? (u = /* @__PURE__ */ n("div", { className: "w-5 h-5 rounded-full flex items-center justify-center flex-shrink-0", style: h, children: d }), e[10] = h, e[11] = u) : u = e[11];
|
|
701
670
|
let m;
|
|
702
|
-
e[12] !==
|
|
671
|
+
e[12] !== i ? (m = /* @__PURE__ */ n("span", { className: "sr-only", children: i }), e[12] = i, e[13] = m) : m = e[13];
|
|
703
672
|
let p;
|
|
704
673
|
return e[14] !== f || e[15] !== u || e[16] !== m ? (p = /* @__PURE__ */ C("div", { className: "flex items-end gap-1.5 max-w-[85%] ml-auto", children: [
|
|
705
674
|
f,
|
|
706
675
|
u,
|
|
707
676
|
m
|
|
708
677
|
] }), e[14] = f, e[15] = u, e[16] = m, e[17] = p) : p = e[17], p;
|
|
709
|
-
}),
|
|
710
|
-
const e =
|
|
678
|
+
}), qe = F(function(t) {
|
|
679
|
+
const e = B(32), {
|
|
711
680
|
card: s,
|
|
712
681
|
timestamp: l
|
|
713
682
|
} = t, {
|
|
714
|
-
theme:
|
|
683
|
+
theme: o,
|
|
715
684
|
handleReply: g,
|
|
716
685
|
handleAction: r
|
|
717
|
-
} = K(),
|
|
686
|
+
} = K(), i = o === "dark";
|
|
718
687
|
let a;
|
|
719
688
|
e[0] !== l ? (a = new Date(l).toLocaleTimeString([], {
|
|
720
689
|
hour: "2-digit",
|
|
@@ -722,8 +691,8 @@ const tt = F(function() {
|
|
|
722
691
|
}), e[0] = l, e[1] = a) : a = e[1];
|
|
723
692
|
const f = a;
|
|
724
693
|
let h;
|
|
725
|
-
e[2] !== r || e[3] !== g ? (h = (
|
|
726
|
-
"reply" in
|
|
694
|
+
e[2] !== r || e[3] !== g ? (h = (_) => {
|
|
695
|
+
"reply" in _ ? g(_) : r(_);
|
|
727
696
|
}, e[2] = r, e[3] = g, e[4] = h) : h = e[4];
|
|
728
697
|
const d = h;
|
|
729
698
|
let u;
|
|
@@ -734,110 +703,110 @@ const tt = F(function() {
|
|
|
734
703
|
}, e[5] = u) : u = e[5];
|
|
735
704
|
const m = u, b = `
|
|
736
705
|
overflow-hidden rounded-2xl w-full shadow-sm
|
|
737
|
-
${
|
|
706
|
+
${i ? "bg-zinc-800" : "bg-[#e8f5e9]"}
|
|
738
707
|
`;
|
|
739
708
|
let y;
|
|
740
709
|
e[6] !== s.media || e[7] !== s.title ? (y = s.media && /* @__PURE__ */ n("div", { className: `
|
|
741
710
|
w-full overflow-hidden
|
|
742
711
|
${m[s.media.height]}
|
|
743
712
|
`, children: /* @__PURE__ */ n("img", { src: s.media.url, alt: s.title || "Rich card media", className: "w-full h-full object-cover", loading: "lazy" }) }), e[6] = s.media, e[7] = s.title, e[8] = y) : y = e[8];
|
|
744
|
-
let
|
|
745
|
-
e[9] !== s.title || e[10] !==
|
|
713
|
+
let w;
|
|
714
|
+
e[9] !== s.title || e[10] !== i ? (w = s.title && /* @__PURE__ */ n("h3", { className: `
|
|
746
715
|
text-base font-semibold leading-snug
|
|
747
|
-
${
|
|
748
|
-
`, children: s.title }), e[9] = s.title, e[10] =
|
|
716
|
+
${i ? "text-white" : "text-gray-900"}
|
|
717
|
+
`, children: s.title }), e[9] = s.title, e[10] = i, e[11] = w) : w = e[11];
|
|
749
718
|
let x;
|
|
750
|
-
e[12] !== s.description || e[13] !==
|
|
719
|
+
e[12] !== s.description || e[13] !== i ? (x = s.description && /* @__PURE__ */ n("p", { className: `
|
|
751
720
|
text-sm leading-relaxed mt-1.5
|
|
752
|
-
${
|
|
753
|
-
`, children: s.description }), e[12] = s.description, e[13] =
|
|
721
|
+
${i ? "text-zinc-300" : "text-gray-700"}
|
|
722
|
+
`, children: s.description }), e[12] = s.description, e[13] = i, e[14] = x) : x = e[14];
|
|
754
723
|
let k;
|
|
755
|
-
e[15] !== s.suggestions || e[16] !== d || e[17] !==
|
|
724
|
+
e[15] !== s.suggestions || e[16] !== d || e[17] !== i ? (k = s.suggestions && s.suggestions.length > 0 && /* @__PURE__ */ n("div", { className: `
|
|
756
725
|
mt-4 rounded-xl overflow-hidden divide-y
|
|
757
|
-
${
|
|
758
|
-
`, children: s.suggestions.map((
|
|
759
|
-
let
|
|
760
|
-
e[19] !==
|
|
761
|
-
|
|
726
|
+
${i ? "divide-zinc-700 bg-zinc-800" : "divide-gray-100 bg-white"}
|
|
727
|
+
`, children: s.suggestions.map((_, A) => /* @__PURE__ */ n(et, { suggestion: _, onClick: () => d(_), isDark: i }, A)) }), e[15] = s.suggestions, e[16] = d, e[17] = i, e[18] = k) : k = e[18];
|
|
728
|
+
let v;
|
|
729
|
+
e[19] !== w || e[20] !== x || e[21] !== k ? (v = /* @__PURE__ */ C("div", { className: "p-4", children: [
|
|
730
|
+
w,
|
|
762
731
|
x,
|
|
763
732
|
k
|
|
764
|
-
] }), e[19] =
|
|
733
|
+
] }), e[19] = w, e[20] = x, e[21] = k, e[22] = v) : v = e[22];
|
|
765
734
|
let N;
|
|
766
|
-
e[23] !== b || e[24] !== y || e[25] !==
|
|
735
|
+
e[23] !== b || e[24] !== y || e[25] !== v ? (N = /* @__PURE__ */ C("div", { className: b, children: [
|
|
767
736
|
y,
|
|
768
|
-
|
|
769
|
-
] }), e[23] = b, e[24] = y, e[25] =
|
|
770
|
-
let
|
|
771
|
-
e[27] !== f ? (
|
|
772
|
-
let
|
|
773
|
-
return e[29] !== N || e[30] !==
|
|
737
|
+
v
|
|
738
|
+
] }), e[23] = b, e[24] = y, e[25] = v, e[26] = N) : N = e[26];
|
|
739
|
+
let L;
|
|
740
|
+
e[27] !== f ? (L = /* @__PURE__ */ n("span", { className: "sr-only", children: f }), e[27] = f, e[28] = L) : L = e[28];
|
|
741
|
+
let M;
|
|
742
|
+
return e[29] !== N || e[30] !== L ? (M = /* @__PURE__ */ C("div", { className: "w-full", children: [
|
|
774
743
|
N,
|
|
775
|
-
|
|
776
|
-
] }), e[29] = N, e[30] =
|
|
777
|
-
}), ae = "w-5 h-5 text-gray-400",
|
|
778
|
-
const c =
|
|
744
|
+
L
|
|
745
|
+
] }), e[29] = N, e[30] = L, e[31] = M) : M = e[31], M;
|
|
746
|
+
}), ae = "w-5 h-5 text-gray-400", Qe = () => {
|
|
747
|
+
const c = B(1);
|
|
779
748
|
let t;
|
|
780
749
|
return c[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t = /* @__PURE__ */ n("svg", { className: ae, fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 1.5, children: /* @__PURE__ */ n("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" }) }), c[0] = t) : t = c[0], t;
|
|
781
|
-
},
|
|
782
|
-
const c =
|
|
750
|
+
}, Xe = () => {
|
|
751
|
+
const c = B(1);
|
|
783
752
|
let t;
|
|
784
753
|
return c[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t = /* @__PURE__ */ n("svg", { className: ae, fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 1.5, children: /* @__PURE__ */ n("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" }) }), c[0] = t) : t = c[0], t;
|
|
785
|
-
},
|
|
786
|
-
const c =
|
|
754
|
+
}, Ze = () => {
|
|
755
|
+
const c = B(1);
|
|
787
756
|
let t;
|
|
788
757
|
return c[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t = /* @__PURE__ */ C("svg", { className: ae, fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 1.5, children: [
|
|
789
758
|
/* @__PURE__ */ n("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" }),
|
|
790
759
|
/* @__PURE__ */ n("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M15 11a3 3 0 11-6 0 3 3 0 016 0z" })
|
|
791
760
|
] }), c[0] = t) : t = c[0], t;
|
|
792
|
-
},
|
|
793
|
-
const c =
|
|
761
|
+
}, Ke = () => {
|
|
762
|
+
const c = B(1);
|
|
794
763
|
let t;
|
|
795
764
|
return c[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t = /* @__PURE__ */ n("svg", { className: ae, fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 1.5, children: /* @__PURE__ */ n("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" }) }), c[0] = t) : t = c[0], t;
|
|
796
|
-
},
|
|
797
|
-
const c =
|
|
765
|
+
}, ye = () => {
|
|
766
|
+
const c = B(1);
|
|
798
767
|
let t;
|
|
799
768
|
return c[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t = /* @__PURE__ */ n("svg", { className: ae, fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 1.5, children: /* @__PURE__ */ n("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" }) }), c[0] = t) : t = c[0], t;
|
|
800
|
-
},
|
|
801
|
-
const e =
|
|
769
|
+
}, et = F(function(t) {
|
|
770
|
+
const e = B(15), {
|
|
802
771
|
suggestion: s,
|
|
803
772
|
onClick: l,
|
|
804
|
-
isDark:
|
|
773
|
+
isDark: o
|
|
805
774
|
} = t;
|
|
806
775
|
let g;
|
|
807
776
|
e[0] !== s ? (g = le(s), e[0] = s, e[1] = g) : g = e[1];
|
|
808
|
-
const r = g,
|
|
777
|
+
const r = g, i = r ? s.action.displayText : s.reply.displayText;
|
|
809
778
|
let a;
|
|
810
779
|
e[2] !== r || e[3] !== s ? (a = () => {
|
|
811
780
|
if (!r)
|
|
812
|
-
return /* @__PURE__ */ n(
|
|
781
|
+
return /* @__PURE__ */ n(ye, {});
|
|
813
782
|
const {
|
|
814
783
|
action: b
|
|
815
784
|
} = s;
|
|
816
|
-
return b.urlAction || b.openUrlAction ? /* @__PURE__ */ n(
|
|
785
|
+
return b.urlAction || b.openUrlAction ? /* @__PURE__ */ n(Qe, {}) : b.dialerAction || b.dialAction ? /* @__PURE__ */ n(Xe, {}) : b.mapAction || b.viewLocationAction ? /* @__PURE__ */ n(Ze, {}) : b.calendarAction || b.createCalendarEventAction ? /* @__PURE__ */ n(Ke, {}) : /* @__PURE__ */ n(ye, {});
|
|
817
786
|
}, e[2] = r, e[3] = s, e[4] = a) : a = e[4];
|
|
818
787
|
const f = a, h = `
|
|
819
788
|
w-full flex items-center gap-3 px-4 py-3 text-left transition-colors
|
|
820
|
-
${
|
|
789
|
+
${o ? "hover:bg-zinc-700" : "hover:bg-gray-50"}
|
|
821
790
|
`;
|
|
822
791
|
let d;
|
|
823
792
|
e[5] !== f ? (d = /* @__PURE__ */ n("span", { className: "flex-shrink-0", children: f() }), e[5] = f, e[6] = d) : d = e[6];
|
|
824
|
-
const u = `text-sm ${
|
|
793
|
+
const u = `text-sm ${o ? "text-white" : "text-gray-900"}`;
|
|
825
794
|
let m;
|
|
826
|
-
e[7] !==
|
|
795
|
+
e[7] !== i || e[8] !== u ? (m = /* @__PURE__ */ n("span", { className: u, children: i }), e[7] = i, e[8] = u, e[9] = m) : m = e[9];
|
|
827
796
|
let p;
|
|
828
797
|
return e[10] !== l || e[11] !== h || e[12] !== d || e[13] !== m ? (p = /* @__PURE__ */ C("button", { onClick: l, className: h, children: [
|
|
829
798
|
d,
|
|
830
799
|
m
|
|
831
800
|
] }), e[10] = l, e[11] = h, e[12] = d, e[13] = m, e[14] = p) : p = e[14], p;
|
|
832
|
-
}),
|
|
833
|
-
const e =
|
|
801
|
+
}), tt = F(function(t) {
|
|
802
|
+
const e = B(32), {
|
|
834
803
|
cards: s,
|
|
835
804
|
timestamp: l
|
|
836
805
|
} = t, {
|
|
837
|
-
theme:
|
|
806
|
+
theme: o,
|
|
838
807
|
handleReply: g,
|
|
839
808
|
handleAction: r
|
|
840
|
-
} = K(),
|
|
809
|
+
} = K(), i = me(null), [a, f] = ne(!1), [h, d] = ne(s.length > 1), u = o === "dark";
|
|
841
810
|
let m;
|
|
842
811
|
e[0] !== l ? (m = new Date(l).toLocaleTimeString([], {
|
|
843
812
|
hour: "2-digit",
|
|
@@ -849,88 +818,88 @@ const tt = F(function() {
|
|
|
849
818
|
"reply" in I ? g(I) : r(I);
|
|
850
819
|
}, e[2] = r, e[3] = g, e[4] = b) : b = e[4];
|
|
851
820
|
const y = b;
|
|
852
|
-
let
|
|
853
|
-
e[5] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (
|
|
854
|
-
if (
|
|
821
|
+
let w;
|
|
822
|
+
e[5] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (w = () => {
|
|
823
|
+
if (i.current) {
|
|
855
824
|
const {
|
|
856
825
|
scrollLeft: I,
|
|
857
|
-
scrollWidth:
|
|
858
|
-
clientWidth:
|
|
859
|
-
} =
|
|
860
|
-
f(I > 0), d(I <
|
|
826
|
+
scrollWidth: T,
|
|
827
|
+
clientWidth: D
|
|
828
|
+
} = i.current;
|
|
829
|
+
f(I > 0), d(I < T - D - 10);
|
|
861
830
|
}
|
|
862
|
-
}, e[5] =
|
|
863
|
-
const x =
|
|
831
|
+
}, e[5] = w) : w = e[5];
|
|
832
|
+
const x = w;
|
|
864
833
|
let k;
|
|
865
834
|
e[6] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (k = (I) => {
|
|
866
|
-
|
|
835
|
+
i.current && i.current.scrollBy({
|
|
867
836
|
left: I === "left" ? -200 : 200,
|
|
868
837
|
behavior: "smooth"
|
|
869
838
|
});
|
|
870
839
|
}, e[6] = k) : k = e[6];
|
|
871
|
-
const
|
|
840
|
+
const v = k;
|
|
872
841
|
let N;
|
|
873
|
-
e[7] !== a || e[8] !== u ? (N = a && /* @__PURE__ */ n("button", { onClick: () =>
|
|
842
|
+
e[7] !== a || e[8] !== u ? (N = a && /* @__PURE__ */ n("button", { onClick: () => v("left"), className: `
|
|
874
843
|
absolute left-2 top-1/2 -translate-y-1/2 z-10
|
|
875
844
|
w-8 h-8 rounded-full flex items-center justify-center
|
|
876
845
|
shadow-lg transition-opacity
|
|
877
846
|
${u ? "bg-zinc-700 text-white" : "bg-white text-gray-700"}
|
|
878
847
|
`, "aria-label": "Scroll left", children: /* @__PURE__ */ n("svg", { className: "w-4 h-4", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ n("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M15 19l-7-7 7-7" }) }) }), e[7] = a, e[8] = u, e[9] = N) : N = e[9];
|
|
879
|
-
let
|
|
880
|
-
e[10] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (
|
|
848
|
+
let L;
|
|
849
|
+
e[10] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (L = {
|
|
881
850
|
scrollbarWidth: "none",
|
|
882
851
|
msOverflowStyle: "none"
|
|
883
|
-
}, e[10] =
|
|
884
|
-
let
|
|
852
|
+
}, e[10] = L) : L = e[10];
|
|
853
|
+
let M;
|
|
885
854
|
if (e[11] !== s || e[12] !== y || e[13] !== u) {
|
|
886
855
|
let I;
|
|
887
|
-
e[15] !== y || e[16] !== u ? (I = (
|
|
856
|
+
e[15] !== y || e[16] !== u ? (I = (T, D) => /* @__PURE__ */ n(st, { card: T, isDark: u, onSuggestionClick: y }, D), e[15] = y, e[16] = u, e[17] = I) : I = e[17], M = s.map(I), e[11] = s, e[12] = y, e[13] = u, e[14] = M;
|
|
888
857
|
} else
|
|
889
|
-
|
|
890
|
-
let
|
|
891
|
-
e[18] !==
|
|
858
|
+
M = e[14];
|
|
859
|
+
let _;
|
|
860
|
+
e[18] !== M ? (_ = /* @__PURE__ */ n("div", { ref: i, onScroll: x, className: "flex gap-2.5 overflow-x-auto py-1 px-3 snap-x snap-mandatory", style: L, children: M }), e[18] = M, e[19] = _) : _ = e[19];
|
|
892
861
|
let A;
|
|
893
|
-
e[20] !== h || e[21] !== u ? (A = h && /* @__PURE__ */ n("button", { onClick: () =>
|
|
862
|
+
e[20] !== h || e[21] !== u ? (A = h && /* @__PURE__ */ n("button", { onClick: () => v("right"), className: `
|
|
894
863
|
absolute right-2 top-1/2 -translate-y-1/2 z-10
|
|
895
864
|
w-8 h-8 rounded-full flex items-center justify-center
|
|
896
865
|
shadow-lg transition-opacity
|
|
897
866
|
${u ? "bg-zinc-700 text-white" : "bg-white text-gray-700"}
|
|
898
867
|
`, "aria-label": "Scroll right", children: /* @__PURE__ */ n("svg", { className: "w-4 h-4", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ n("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M9 5l7 7-7 7" }) }) }), e[20] = h, e[21] = u, e[22] = A) : A = e[22];
|
|
899
868
|
let z;
|
|
900
|
-
e[23] !== N || e[24] !==
|
|
869
|
+
e[23] !== N || e[24] !== _ || e[25] !== A ? (z = /* @__PURE__ */ C("div", { className: "relative", children: [
|
|
901
870
|
N,
|
|
902
|
-
|
|
871
|
+
_,
|
|
903
872
|
A
|
|
904
|
-
] }), e[23] = N, e[24] =
|
|
873
|
+
] }), e[23] = N, e[24] = _, e[25] = A, e[26] = z) : z = e[26];
|
|
874
|
+
let $;
|
|
875
|
+
e[27] !== p ? ($ = /* @__PURE__ */ n("span", { className: "sr-only", children: p }), e[27] = p, e[28] = $) : $ = e[28];
|
|
905
876
|
let S;
|
|
906
|
-
e[
|
|
907
|
-
let M;
|
|
908
|
-
return e[29] !== z || e[30] !== S ? (M = /* @__PURE__ */ C("div", { className: "w-full -mx-3", children: [
|
|
877
|
+
return e[29] !== z || e[30] !== $ ? (S = /* @__PURE__ */ C("div", { className: "w-full -mx-3", children: [
|
|
909
878
|
z,
|
|
910
|
-
|
|
911
|
-
] }), e[29] = z, e[30] =
|
|
912
|
-
}),
|
|
879
|
+
$
|
|
880
|
+
] }), e[29] = z, e[30] = $, e[31] = S) : S = e[31], S;
|
|
881
|
+
}), ie = "w-4 h-4 text-gray-400", nt = (c) => {
|
|
913
882
|
if (!le(c))
|
|
914
|
-
return /* @__PURE__ */ n("svg", { className:
|
|
883
|
+
return /* @__PURE__ */ n("svg", { className: ie, fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 1.5, children: /* @__PURE__ */ n("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" }) });
|
|
915
884
|
const {
|
|
916
885
|
action: t
|
|
917
886
|
} = c;
|
|
918
|
-
return t.urlAction || t.openUrlAction ? /* @__PURE__ */ n("svg", { className:
|
|
887
|
+
return t.urlAction || t.openUrlAction ? /* @__PURE__ */ n("svg", { className: ie, fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 1.5, children: /* @__PURE__ */ n("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__ */ n("svg", { className: ie, fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 1.5, children: /* @__PURE__ */ n("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__ */ C("svg", { className: ie, fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 1.5, children: [
|
|
919
888
|
/* @__PURE__ */ n("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" }),
|
|
920
889
|
/* @__PURE__ */ n("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M15 11a3 3 0 11-6 0 3 3 0 016 0z" })
|
|
921
|
-
] }) : t.calendarAction || t.createCalendarEventAction ? /* @__PURE__ */ n("svg", { className:
|
|
922
|
-
},
|
|
923
|
-
const e =
|
|
890
|
+
] }) : t.calendarAction || t.createCalendarEventAction ? /* @__PURE__ */ n("svg", { className: ie, fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 1.5, children: /* @__PURE__ */ n("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__ */ n("svg", { className: ie, fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 1.5, children: /* @__PURE__ */ n("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" }) });
|
|
891
|
+
}, st = F(function(t) {
|
|
892
|
+
const e = B(21), {
|
|
924
893
|
card: s,
|
|
925
894
|
isDark: l,
|
|
926
|
-
onSuggestionClick:
|
|
895
|
+
onSuggestionClick: o
|
|
927
896
|
} = t, r = `
|
|
928
897
|
flex-shrink-0 snap-start rounded-2xl overflow-hidden shadow-sm
|
|
929
898
|
${s.layout.width === "small" ? "w-44" : "w-52"}
|
|
930
899
|
${l ? "bg-zinc-800" : "bg-[#e8f5e9]"}
|
|
931
900
|
`;
|
|
932
|
-
let
|
|
933
|
-
e[0] !== s.media || e[1] !== s.title ? (
|
|
901
|
+
let i;
|
|
902
|
+
e[0] !== s.media || e[1] !== s.title ? (i = s.media && /* @__PURE__ */ n("div", { className: "w-full h-32 bg-gray-200 overflow-hidden", children: /* @__PURE__ */ n("img", { src: s.media.url, alt: s.title || "Carousel card media", className: "w-full h-full object-cover", loading: "lazy" }) }), e[0] = s.media, e[1] = s.title, e[2] = i) : i = e[2];
|
|
934
903
|
let a;
|
|
935
904
|
e[3] !== s.title || e[4] !== l ? (a = s.title && /* @__PURE__ */ n("h4", { className: `
|
|
936
905
|
text-sm font-semibold leading-tight mb-1 line-clamp-2
|
|
@@ -942,20 +911,20 @@ const tt = F(function() {
|
|
|
942
911
|
${l ? "text-zinc-400" : "text-gray-700"}
|
|
943
912
|
`, children: s.description }), e[6] = s.description, e[7] = l, e[8] = f) : f = e[8];
|
|
944
913
|
let h;
|
|
945
|
-
e[9] !== s.suggestions || e[10] !== l || e[11] !==
|
|
914
|
+
e[9] !== s.suggestions || e[10] !== l || e[11] !== o ? (h = s.suggestions && s.suggestions.length > 0 && /* @__PURE__ */ n("div", { className: `
|
|
946
915
|
mt-3 rounded-lg overflow-hidden divide-y
|
|
947
916
|
${l ? "divide-zinc-600 bg-zinc-700" : "divide-gray-100 bg-white"}
|
|
948
917
|
`, children: s.suggestions.map((m, p) => {
|
|
949
918
|
const y = le(m) ? m.action.displayText : m.reply.displayText;
|
|
950
|
-
return /* @__PURE__ */ C("button", { onClick: () =>
|
|
919
|
+
return /* @__PURE__ */ C("button", { onClick: () => o(m), className: `
|
|
951
920
|
w-full flex items-center gap-2 px-3 py-2.5
|
|
952
921
|
text-xs transition-colors text-left
|
|
953
922
|
${l ? "hover:bg-zinc-600 text-white" : "hover:bg-gray-50 text-gray-900"}
|
|
954
923
|
`, children: [
|
|
955
|
-
/* @__PURE__ */ n("span", { className: "flex-shrink-0", children:
|
|
924
|
+
/* @__PURE__ */ n("span", { className: "flex-shrink-0", children: nt(m) }),
|
|
956
925
|
/* @__PURE__ */ n("span", { className: "truncate", children: y })
|
|
957
926
|
] }, p);
|
|
958
|
-
}) }), e[9] = s.suggestions, e[10] = l, e[11] =
|
|
927
|
+
}) }), e[9] = s.suggestions, e[10] = l, e[11] = o, e[12] = h) : h = e[12];
|
|
959
928
|
let d;
|
|
960
929
|
e[13] !== a || e[14] !== f || e[15] !== h ? (d = /* @__PURE__ */ C("div", { className: "p-3", children: [
|
|
961
930
|
a,
|
|
@@ -963,63 +932,63 @@ const tt = F(function() {
|
|
|
963
932
|
h
|
|
964
933
|
] }), e[13] = a, e[14] = f, e[15] = h, e[16] = d) : d = e[16];
|
|
965
934
|
let u;
|
|
966
|
-
return e[17] !== r || e[18] !==
|
|
967
|
-
|
|
935
|
+
return e[17] !== r || e[18] !== i || e[19] !== d ? (u = /* @__PURE__ */ C("div", { className: r, children: [
|
|
936
|
+
i,
|
|
968
937
|
d
|
|
969
|
-
] }), e[17] = r, e[18] =
|
|
970
|
-
}),
|
|
938
|
+
] }), e[17] = r, e[18] = i, e[19] = d, e[20] = u) : u = e[20], u;
|
|
939
|
+
}), lt = {
|
|
971
940
|
text: ({
|
|
972
941
|
content: c,
|
|
973
942
|
sender: t,
|
|
974
943
|
timestamp: e
|
|
975
|
-
}) => c.type !== "text" ? null : /* @__PURE__ */ n(
|
|
944
|
+
}) => c.type !== "text" ? null : /* @__PURE__ */ n(Je, { text: c.text, sender: t, timestamp: e }),
|
|
976
945
|
userReply: ({
|
|
977
946
|
content: c,
|
|
978
947
|
timestamp: t
|
|
979
|
-
}) => c.type !== "userReply" ? null : /* @__PURE__ */ n(
|
|
948
|
+
}) => c.type !== "userReply" ? null : /* @__PURE__ */ n(Ye, { text: c.text, timestamp: t }),
|
|
980
949
|
richcard: ({
|
|
981
950
|
content: c,
|
|
982
951
|
timestamp: t
|
|
983
|
-
}) => c.type !== "richcard" ? null : /* @__PURE__ */ n(
|
|
952
|
+
}) => c.type !== "richcard" ? null : /* @__PURE__ */ n(qe, { card: c.card, timestamp: t }),
|
|
984
953
|
carousel: ({
|
|
985
954
|
content: c,
|
|
986
955
|
timestamp: t
|
|
987
|
-
}) => c.type !== "carousel" ? null : /* @__PURE__ */ n(
|
|
988
|
-
},
|
|
989
|
-
const e =
|
|
956
|
+
}) => c.type !== "carousel" ? null : /* @__PURE__ */ n(tt, { cards: c.cards, timestamp: t })
|
|
957
|
+
}, rt = F(function(t) {
|
|
958
|
+
const e = B(7), {
|
|
990
959
|
message: s,
|
|
991
960
|
isLast: l
|
|
992
961
|
} = t, {
|
|
993
|
-
content:
|
|
962
|
+
content: o,
|
|
994
963
|
sender: g,
|
|
995
964
|
timestamp: r
|
|
996
|
-
} = s,
|
|
997
|
-
if (!
|
|
998
|
-
console.warn(`Unknown message type: ${
|
|
965
|
+
} = s, i = lt[o.type];
|
|
966
|
+
if (!i) {
|
|
967
|
+
console.warn(`Unknown message type: ${o.type}`);
|
|
999
968
|
let h;
|
|
1000
969
|
return e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (h = /* @__PURE__ */ n("div", { className: "px-4 py-2 text-gray-500 text-sm italic", children: "[Unsupported message type]" }), e[0] = h) : h = e[0], h;
|
|
1001
970
|
}
|
|
1002
971
|
const a = l && g === "business";
|
|
1003
972
|
let f;
|
|
1004
|
-
return e[1] !==
|
|
1005
|
-
}),
|
|
1006
|
-
const t =
|
|
973
|
+
return e[1] !== i || e[2] !== o || e[3] !== g || e[4] !== a || e[5] !== r ? (f = /* @__PURE__ */ n(i, { content: o, sender: g, timestamp: r, showSuggestions: a }), e[1] = i, e[2] = o, e[3] = g, e[4] = a, e[5] = r, e[6] = f) : f = e[6], f;
|
|
974
|
+
}), it = F(function() {
|
|
975
|
+
const t = B(11), {
|
|
1007
976
|
theme: e
|
|
1008
977
|
} = K(), s = e === "dark", l = `
|
|
1009
978
|
inline-flex items-center gap-1 px-4 py-3 rounded-2xl rounded-bl-sm
|
|
1010
979
|
${s ? "bg-zinc-800" : "bg-gray-100"}
|
|
1011
|
-
`,
|
|
980
|
+
`, o = `
|
|
1012
981
|
rcs-typing-dot w-2 h-2 rounded-full
|
|
1013
982
|
${s ? "bg-zinc-500" : "bg-gray-400"}
|
|
1014
983
|
`;
|
|
1015
984
|
let g;
|
|
1016
|
-
t[0] !==
|
|
985
|
+
t[0] !== o ? (g = /* @__PURE__ */ n("span", { className: o }), t[0] = o, t[1] = g) : g = t[1];
|
|
1017
986
|
const r = `
|
|
1018
987
|
rcs-typing-dot w-2 h-2 rounded-full
|
|
1019
988
|
${s ? "bg-zinc-500" : "bg-gray-400"}
|
|
1020
989
|
`;
|
|
1021
|
-
let
|
|
1022
|
-
t[2] !== r ? (
|
|
990
|
+
let i;
|
|
991
|
+
t[2] !== r ? (i = /* @__PURE__ */ n("span", { className: r }), t[2] = r, t[3] = i) : i = t[3];
|
|
1023
992
|
const a = `
|
|
1024
993
|
rcs-typing-dot w-2 h-2 rounded-full
|
|
1025
994
|
${s ? "bg-zinc-500" : "bg-gray-400"}
|
|
@@ -1027,93 +996,93 @@ const tt = F(function() {
|
|
|
1027
996
|
let f;
|
|
1028
997
|
t[4] !== a ? (f = /* @__PURE__ */ n("span", { className: a }), t[4] = a, t[5] = f) : f = t[5];
|
|
1029
998
|
let h;
|
|
1030
|
-
return t[6] !== l || t[7] !== g || t[8] !==
|
|
999
|
+
return t[6] !== l || t[7] !== g || t[8] !== i || t[9] !== f ? (h = /* @__PURE__ */ n("div", { className: "flex items-start gap-2 px-4 py-2", role: "status", "aria-label": "Business is typing", children: /* @__PURE__ */ C("div", { className: l, children: [
|
|
1031
1000
|
g,
|
|
1032
|
-
|
|
1001
|
+
i,
|
|
1033
1002
|
f
|
|
1034
|
-
] }) }), t[6] = l, t[7] = g, t[8] =
|
|
1035
|
-
}),
|
|
1036
|
-
const t =
|
|
1003
|
+
] }) }), t[6] = l, t[7] = g, t[8] = i, t[9] = f, t[10] = h) : h = t[10], h;
|
|
1004
|
+
}), ot = F(function() {
|
|
1005
|
+
const t = B(25), {
|
|
1037
1006
|
theme: e,
|
|
1038
1007
|
state: s
|
|
1039
1008
|
} = K(), {
|
|
1040
1009
|
chatHistory: l,
|
|
1041
|
-
isTyping:
|
|
1010
|
+
isTyping: o
|
|
1042
1011
|
} = s, g = e === "dark";
|
|
1043
1012
|
let r;
|
|
1044
1013
|
t[0] !== l.length || t[1] !== g ? (r = l.length > 0 && /* @__PURE__ */ n("div", { className: "flex justify-center py-2", children: /* @__PURE__ */ n("span", { className: `
|
|
1045
1014
|
text-xs font-medium px-3 py-1
|
|
1046
1015
|
${g ? "text-zinc-500" : "text-gray-500"}
|
|
1047
1016
|
`, children: "Today" }) }), t[0] = l.length, t[1] = g, t[2] = r) : r = t[2];
|
|
1048
|
-
const
|
|
1017
|
+
const i = `
|
|
1049
1018
|
rounded-3xl overflow-hidden
|
|
1050
1019
|
${g ? "bg-zinc-900" : "bg-gray-50"}
|
|
1051
1020
|
`;
|
|
1052
1021
|
let a;
|
|
1053
|
-
t[3] !== l.length || t[4] !== g || t[5] !==
|
|
1022
|
+
t[3] !== l.length || t[4] !== g || t[5] !== o ? (a = l.length === 0 && !o && /* @__PURE__ */ n("div", { className: "flex items-center justify-center py-12", children: /* @__PURE__ */ n("p", { className: `text-sm ${g ? "text-zinc-500" : "text-gray-400"}`, children: "No messages yet" }) }), t[3] = l.length, t[4] = g, t[5] = o, t[6] = a) : a = t[6];
|
|
1054
1023
|
let f;
|
|
1055
|
-
if (t[7] !== l || t[8] !==
|
|
1024
|
+
if (t[7] !== l || t[8] !== o) {
|
|
1056
1025
|
let p;
|
|
1057
|
-
t[10] !== l.length || t[11] !==
|
|
1026
|
+
t[10] !== l.length || t[11] !== o ? (p = (b, y) => /* @__PURE__ */ n("div", { className: `
|
|
1058
1027
|
${b.sender === "user" ? "flex justify-end" : "flex justify-start"}
|
|
1059
|
-
`, children: /* @__PURE__ */ n(
|
|
1028
|
+
`, children: /* @__PURE__ */ n(rt, { message: b, isLast: y === l.length - 1 && !o }) }, b.id), t[10] = l.length, t[11] = o, t[12] = p) : p = t[12], f = l.map(p), t[7] = l, t[8] = o, t[9] = f;
|
|
1060
1029
|
} else
|
|
1061
1030
|
f = t[9];
|
|
1062
1031
|
let h;
|
|
1063
|
-
t[13] !==
|
|
1032
|
+
t[13] !== o ? (h = o && /* @__PURE__ */ n(it, {}), t[13] = o, t[14] = h) : h = t[14];
|
|
1064
1033
|
let d;
|
|
1065
1034
|
t[15] !== f || t[16] !== h ? (d = /* @__PURE__ */ C("div", { className: "p-3 space-y-3", children: [
|
|
1066
1035
|
f,
|
|
1067
1036
|
h
|
|
1068
1037
|
] }), t[15] = f, t[16] = h, t[17] = d) : d = t[17];
|
|
1069
1038
|
let u;
|
|
1070
|
-
t[18] !==
|
|
1039
|
+
t[18] !== i || t[19] !== a || t[20] !== d ? (u = /* @__PURE__ */ C("div", { className: i, children: [
|
|
1071
1040
|
a,
|
|
1072
1041
|
d
|
|
1073
|
-
] }), t[18] =
|
|
1042
|
+
] }), t[18] = i, t[19] = a, t[20] = d, t[21] = u) : u = t[21];
|
|
1074
1043
|
let m;
|
|
1075
1044
|
return t[22] !== r || t[23] !== u ? (m = /* @__PURE__ */ C("div", { className: "px-3 pb-3 space-y-3", role: "log", "aria-label": "Chat messages", "aria-live": "polite", children: [
|
|
1076
1045
|
r,
|
|
1077
1046
|
u
|
|
1078
1047
|
] }), t[22] = r, t[23] = u, t[24] = m) : m = t[24], m;
|
|
1079
|
-
}),
|
|
1080
|
-
const e =
|
|
1048
|
+
}), at = F(function(t) {
|
|
1049
|
+
const e = B(35), {
|
|
1081
1050
|
suggestion: s,
|
|
1082
1051
|
onClick: l,
|
|
1083
|
-
variant:
|
|
1084
|
-
} = t, g =
|
|
1052
|
+
variant: o
|
|
1053
|
+
} = t, g = o === void 0 ? "bar" : o, {
|
|
1085
1054
|
theme: r,
|
|
1086
|
-
businessInfo:
|
|
1055
|
+
businessInfo: i
|
|
1087
1056
|
} = K(), a = r === "dark";
|
|
1088
1057
|
let f;
|
|
1089
1058
|
e[0] !== s ? (f = le(s), e[0] = s, e[1] = f) : f = e[1];
|
|
1090
1059
|
const h = f, d = h ? s.action.displayText : s.reply.displayText;
|
|
1091
1060
|
let u;
|
|
1092
|
-
e[2] !== h || e[3] !== s ? (u = h ?
|
|
1093
|
-
const m = u, p =
|
|
1061
|
+
e[2] !== h || e[3] !== s ? (u = h ? ct(s) : null, e[2] = h, e[3] = s, e[4] = u) : u = e[4];
|
|
1062
|
+
const m = u, p = i.brandColor || "#0084ff";
|
|
1094
1063
|
if (g === "bar") {
|
|
1095
|
-
const
|
|
1064
|
+
const w = `
|
|
1096
1065
|
inline-flex items-center gap-2 px-4 py-2 rounded-full text-sm font-medium
|
|
1097
1066
|
whitespace-nowrap transition-colors flex-shrink-0
|
|
1098
1067
|
border
|
|
1099
1068
|
${a ? "bg-zinc-800 border-zinc-700 hover:bg-zinc-700 text-white" : "bg-white border-gray-300 hover:bg-gray-50 text-gray-900"}
|
|
1100
1069
|
`;
|
|
1101
1070
|
let x;
|
|
1102
|
-
e[5] !== d || e[6] !== h || e[7] !== s ? (x = h ? `${
|
|
1071
|
+
e[5] !== d || e[6] !== h || e[7] !== s ? (x = h ? `${dt(s)}: ${d}` : d, e[5] = d, e[6] = h, e[7] = s, e[8] = x) : x = e[8];
|
|
1103
1072
|
let k;
|
|
1104
1073
|
e[9] !== m || e[10] !== p ? (k = m && /* @__PURE__ */ n("span", { style: {
|
|
1105
1074
|
color: p
|
|
1106
1075
|
}, children: /* @__PURE__ */ n(m, { className: "w-4 h-4" }) }), e[9] = m, e[10] = p, e[11] = k) : k = e[11];
|
|
1107
|
-
let
|
|
1108
|
-
e[12] !== d ? (
|
|
1076
|
+
let v;
|
|
1077
|
+
e[12] !== d ? (v = /* @__PURE__ */ n("span", { children: d }), e[12] = d, e[13] = v) : v = e[13];
|
|
1109
1078
|
let N;
|
|
1110
|
-
return e[14] !== l || e[15] !==
|
|
1079
|
+
return e[14] !== l || e[15] !== w || e[16] !== x || e[17] !== k || e[18] !== v ? (N = /* @__PURE__ */ C("button", { type: "button", onClick: l, className: w, "aria-label": x, children: [
|
|
1111
1080
|
k,
|
|
1112
|
-
|
|
1113
|
-
] }), e[14] = l, e[15] =
|
|
1081
|
+
v
|
|
1082
|
+
] }), e[14] = l, e[15] = w, e[16] = x, e[17] = k, e[18] = v, e[19] = N) : N = e[19], N;
|
|
1114
1083
|
}
|
|
1115
1084
|
if (g === "card") {
|
|
1116
|
-
const
|
|
1085
|
+
const w = `
|
|
1117
1086
|
w-full flex items-center gap-3 px-3 py-2.5 text-left transition-colors rounded-lg
|
|
1118
1087
|
${a ? "hover:bg-zinc-700" : "hover:bg-gray-100"}
|
|
1119
1088
|
`;
|
|
@@ -1124,13 +1093,13 @@ const tt = F(function() {
|
|
|
1124
1093
|
color: p
|
|
1125
1094
|
} }) }), e[20] = m, e[21] = p, e[22] = x) : x = e[22];
|
|
1126
1095
|
const k = `text-sm font-medium ${a ? "text-white" : "text-gray-900"}`;
|
|
1127
|
-
let
|
|
1128
|
-
e[23] !== d || e[24] !== k ? (
|
|
1096
|
+
let v;
|
|
1097
|
+
e[23] !== d || e[24] !== k ? (v = /* @__PURE__ */ n("span", { className: k, children: d }), e[23] = d, e[24] = k, e[25] = v) : v = e[25];
|
|
1129
1098
|
let N;
|
|
1130
|
-
return e[26] !== l || e[27] !==
|
|
1099
|
+
return e[26] !== l || e[27] !== w || e[28] !== x || e[29] !== v ? (N = /* @__PURE__ */ C("button", { type: "button", onClick: l, className: w, children: [
|
|
1131
1100
|
x,
|
|
1132
|
-
|
|
1133
|
-
] }), e[26] = l, e[27] =
|
|
1101
|
+
v
|
|
1102
|
+
] }), e[26] = l, e[27] = w, e[28] = x, e[29] = v, e[30] = N) : N = e[30], N;
|
|
1134
1103
|
}
|
|
1135
1104
|
const b = `
|
|
1136
1105
|
w-full px-3 py-2 rounded-lg text-xs font-medium text-center
|
|
@@ -1140,7 +1109,7 @@ const tt = F(function() {
|
|
|
1140
1109
|
let y;
|
|
1141
1110
|
return e[31] !== d || e[32] !== l || e[33] !== b ? (y = /* @__PURE__ */ n("button", { type: "button", onClick: l, className: b, children: d }), e[31] = d, e[32] = l, e[33] = b, e[34] = y) : y = e[34], y;
|
|
1142
1111
|
});
|
|
1143
|
-
function
|
|
1112
|
+
function ct(c) {
|
|
1144
1113
|
if (!le(c)) return null;
|
|
1145
1114
|
const {
|
|
1146
1115
|
action: t
|
|
@@ -1168,28 +1137,28 @@ function yt(c) {
|
|
|
1168
1137
|
style: s
|
|
1169
1138
|
}) => /* @__PURE__ */ n("svg", { className: e, style: s, fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: /* @__PURE__ */ n("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;
|
|
1170
1139
|
}
|
|
1171
|
-
function
|
|
1140
|
+
function dt(c) {
|
|
1172
1141
|
if (!le(c)) return "Reply";
|
|
1173
1142
|
const {
|
|
1174
1143
|
action: t
|
|
1175
1144
|
} = c;
|
|
1176
1145
|
return t.openUrlAction ? "Open link" : t.dialAction ? "Call" : t.shareLocationAction ? "Share location" : t.viewLocationAction ? "View location" : t.createCalendarEventAction ? "Add to calendar" : "Action";
|
|
1177
1146
|
}
|
|
1178
|
-
const
|
|
1179
|
-
const e =
|
|
1147
|
+
const ft = F(function(t) {
|
|
1148
|
+
const e = B(14), {
|
|
1180
1149
|
suggestions: s
|
|
1181
1150
|
} = t, {
|
|
1182
1151
|
theme: l,
|
|
1183
|
-
handleReply:
|
|
1152
|
+
handleReply: o,
|
|
1184
1153
|
handleAction: g
|
|
1185
1154
|
} = K(), r = l === "dark";
|
|
1186
1155
|
if (!s || s.length === 0)
|
|
1187
1156
|
return null;
|
|
1188
|
-
let
|
|
1189
|
-
e[0] !== g || e[1] !==
|
|
1190
|
-
|
|
1191
|
-
}, e[0] = g, e[1] =
|
|
1192
|
-
const a =
|
|
1157
|
+
let i;
|
|
1158
|
+
e[0] !== g || e[1] !== o ? (i = (p) => {
|
|
1159
|
+
Ne(p) ? o(p) : le(p) && g(p);
|
|
1160
|
+
}, e[0] = g, e[1] = o, e[2] = i) : i = e[2];
|
|
1161
|
+
const a = i, f = `
|
|
1193
1162
|
px-3 py-2
|
|
1194
1163
|
${r ? "bg-zinc-900" : "bg-white"}
|
|
1195
1164
|
`;
|
|
@@ -1201,98 +1170,98 @@ const wt = F(function(t) {
|
|
|
1201
1170
|
let d;
|
|
1202
1171
|
if (e[4] !== a || e[5] !== s) {
|
|
1203
1172
|
let p;
|
|
1204
|
-
e[7] !== a ? (p = (b, y) => /* @__PURE__ */ n(
|
|
1173
|
+
e[7] !== a ? (p = (b, y) => /* @__PURE__ */ n(at, { suggestion: b, onClick: () => a(b), variant: "bar" }, y), e[7] = a, e[8] = p) : p = e[8], d = s.map(p), e[4] = a, e[5] = s, e[6] = d;
|
|
1205
1174
|
} else
|
|
1206
1175
|
d = e[6];
|
|
1207
1176
|
let u;
|
|
1208
1177
|
e[9] !== d ? (u = /* @__PURE__ */ n("div", { className: "flex gap-2 overflow-x-auto pb-1 -mx-1 px-1", style: h, children: d }), e[9] = d, e[10] = u) : u = e[10];
|
|
1209
1178
|
let m;
|
|
1210
1179
|
return e[11] !== f || e[12] !== u ? (m = /* @__PURE__ */ n("div", { className: f, role: "group", "aria-label": "Quick replies", children: u }), e[11] = f, e[12] = u, e[13] = m) : m = e[13], m;
|
|
1211
|
-
}),
|
|
1212
|
-
const t =
|
|
1180
|
+
}), mt = F(function() {
|
|
1181
|
+
const t = B(39), {
|
|
1213
1182
|
theme: e,
|
|
1214
1183
|
state: s,
|
|
1215
1184
|
showSuggestions: l
|
|
1216
1185
|
} = K(), {
|
|
1217
|
-
chatHistory:
|
|
1186
|
+
chatHistory: o,
|
|
1218
1187
|
isTyping: g,
|
|
1219
1188
|
error: r
|
|
1220
1189
|
} = s;
|
|
1221
|
-
let
|
|
1222
|
-
t[0] !==
|
|
1223
|
-
const a =
|
|
1190
|
+
let i;
|
|
1191
|
+
t[0] !== o.length || t[1] !== g ? (i = [o.length, g], t[0] = o.length, t[1] = g, t[2] = i) : i = t[2];
|
|
1192
|
+
const a = Pe(i), f = e === "dark", h = o[o.length - 1], d = l && h?.sender === "business" && !g ? h.suggestions : void 0, u = `
|
|
1224
1193
|
flex flex-col h-full w-full overflow-hidden
|
|
1225
1194
|
${f ? "bg-zinc-950" : "bg-white"}
|
|
1226
1195
|
`;
|
|
1227
1196
|
let m;
|
|
1228
|
-
t[3] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (m = /* @__PURE__ */ n(
|
|
1197
|
+
t[3] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (m = /* @__PURE__ */ n(Ge, {}), t[3] = m) : m = t[3];
|
|
1229
1198
|
let p;
|
|
1230
1199
|
t[4] !== r ? (p = r && /* @__PURE__ */ n("div", { className: "px-4 py-2 bg-red-500/10 border-b border-red-500/20", role: "alert", children: /* @__PURE__ */ n("p", { className: "text-sm text-red-500", children: r }) }), t[4] = r, t[5] = p) : p = t[5];
|
|
1231
1200
|
let b, y;
|
|
1232
|
-
t[6] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (b = /* @__PURE__ */ n(
|
|
1233
|
-
let
|
|
1234
|
-
t[8] !== a ? (
|
|
1201
|
+
t[6] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (b = /* @__PURE__ */ n(Fe, {}), y = /* @__PURE__ */ n(ot, {}), t[6] = b, t[7] = y) : (b = t[6], y = t[7]);
|
|
1202
|
+
let w;
|
|
1203
|
+
t[8] !== a ? (w = /* @__PURE__ */ C("div", { ref: a, className: "flex-1 overflow-y-auto rcs-scrollbar", children: [
|
|
1235
1204
|
b,
|
|
1236
1205
|
y
|
|
1237
|
-
] }), t[8] = a, t[9] =
|
|
1206
|
+
] }), t[8] = a, t[9] = w) : w = t[9];
|
|
1238
1207
|
let x;
|
|
1239
|
-
t[10] !== d ? (x = d && d.length > 0 && /* @__PURE__ */ n(
|
|
1208
|
+
t[10] !== d ? (x = d && d.length > 0 && /* @__PURE__ */ n(ft, { suggestions: d }), t[10] = d, t[11] = x) : x = t[11];
|
|
1240
1209
|
const k = `
|
|
1241
1210
|
px-3 py-2 flex items-center gap-2
|
|
1242
1211
|
${f ? "bg-zinc-900" : "bg-white"}
|
|
1243
|
-
`,
|
|
1212
|
+
`, v = `
|
|
1244
1213
|
w-9 h-9 flex items-center justify-center rounded-full flex-shrink-0
|
|
1245
1214
|
border transition-colors
|
|
1246
1215
|
${f ? "border-zinc-700 text-zinc-400 hover:bg-zinc-800" : "border-gray-300 text-gray-500 hover:bg-gray-100"}
|
|
1247
1216
|
`;
|
|
1248
1217
|
let N;
|
|
1249
1218
|
t[12] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (N = /* @__PURE__ */ n("svg", { className: "w-5 h-5", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ n("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M12 4v16m8-8H4" }) }), t[12] = N) : N = t[12];
|
|
1250
|
-
let
|
|
1251
|
-
t[13] !==
|
|
1252
|
-
const
|
|
1219
|
+
let L;
|
|
1220
|
+
t[13] !== v ? (L = /* @__PURE__ */ n("button", { type: "button", className: v, "aria-label": "Add attachment", children: N }), t[13] = v, t[14] = L) : L = t[14];
|
|
1221
|
+
const M = `
|
|
1253
1222
|
flex-1 flex items-center gap-2 px-4 py-2 rounded-full
|
|
1254
1223
|
${f ? "bg-zinc-800" : "bg-gray-100"}
|
|
1255
|
-
`,
|
|
1224
|
+
`, _ = `flex-1 text-sm ${f ? "text-zinc-500" : "text-gray-400"}`;
|
|
1256
1225
|
let A;
|
|
1257
|
-
t[15] !==
|
|
1226
|
+
t[15] !== _ ? (A = /* @__PURE__ */ n("span", { className: _, children: "RCS message" }), t[15] = _, t[16] = A) : A = t[16];
|
|
1258
1227
|
const z = `p-1 ${f ? "text-zinc-500" : "text-gray-400"}`;
|
|
1228
|
+
let $;
|
|
1229
|
+
t[17] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? ($ = /* @__PURE__ */ n("svg", { className: "w-5 h-5", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ n("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M14.828 14.828a4 4 0 01-5.656 0M9 10h.01M15 10h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" }) }), t[17] = $) : $ = t[17];
|
|
1259
1230
|
let S;
|
|
1260
|
-
t[
|
|
1261
|
-
let M;
|
|
1262
|
-
t[18] !== z ? (M = /* @__PURE__ */ n("button", { type: "button", className: z, "aria-label": "Emoji", children: S }), t[18] = z, t[19] = M) : M = t[19];
|
|
1231
|
+
t[18] !== z ? (S = /* @__PURE__ */ n("button", { type: "button", className: z, "aria-label": "Emoji", children: $ }), t[18] = z, t[19] = S) : S = t[19];
|
|
1263
1232
|
const I = `p-1 ${f ? "text-zinc-500" : "text-gray-400"}`;
|
|
1264
|
-
let R;
|
|
1265
|
-
t[20] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (R = /* @__PURE__ */ n("svg", { className: "w-5 h-5", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ n("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z" }) }), t[20] = R) : R = t[20];
|
|
1266
|
-
let B;
|
|
1267
|
-
t[21] !== I ? (B = /* @__PURE__ */ n("button", { type: "button", className: I, "aria-label": "Attach image", children: R }), t[21] = I, t[22] = B) : B = t[22];
|
|
1268
1233
|
let T;
|
|
1269
|
-
t[
|
|
1234
|
+
t[20] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (T = /* @__PURE__ */ n("svg", { className: "w-5 h-5", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ n("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z" }) }), t[20] = T) : T = t[20];
|
|
1235
|
+
let D;
|
|
1236
|
+
t[21] !== I ? (D = /* @__PURE__ */ n("button", { type: "button", className: I, "aria-label": "Attach image", children: T }), t[21] = I, t[22] = D) : D = t[22];
|
|
1237
|
+
let j;
|
|
1238
|
+
t[23] !== M || t[24] !== A || t[25] !== S || t[26] !== D ? (j = /* @__PURE__ */ C("div", { className: M, children: [
|
|
1270
1239
|
A,
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
] }), t[23] =
|
|
1240
|
+
S,
|
|
1241
|
+
D
|
|
1242
|
+
] }), t[23] = M, t[24] = A, t[25] = S, t[26] = D, t[27] = j) : j = t[27];
|
|
1274
1243
|
let O;
|
|
1275
1244
|
t[28] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (O = /* @__PURE__ */ n("button", { type: "button", className: "w-10 h-10 flex items-center justify-center rounded-full bg-green-100 text-green-600 flex-shrink-0", "aria-label": "Voice message", children: /* @__PURE__ */ n("svg", { className: "w-5 h-5", fill: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ n("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" }) }) }), t[28] = O) : O = t[28];
|
|
1276
|
-
let
|
|
1277
|
-
t[29] !==
|
|
1278
|
-
|
|
1279
|
-
|
|
1245
|
+
let J;
|
|
1246
|
+
t[29] !== L || t[30] !== j || t[31] !== k ? (J = /* @__PURE__ */ C("div", { className: k, children: [
|
|
1247
|
+
L,
|
|
1248
|
+
j,
|
|
1280
1249
|
O
|
|
1281
|
-
] }), t[29] =
|
|
1250
|
+
] }), t[29] = L, t[30] = j, t[31] = k, t[32] = J) : J = t[32];
|
|
1282
1251
|
let V;
|
|
1283
|
-
return t[33] !== u || t[34] !==
|
|
1252
|
+
return t[33] !== u || t[34] !== J || t[35] !== p || t[36] !== w || t[37] !== x ? (V = /* @__PURE__ */ C("div", { className: u, children: [
|
|
1284
1253
|
m,
|
|
1285
1254
|
p,
|
|
1286
|
-
|
|
1255
|
+
w,
|
|
1287
1256
|
x,
|
|
1288
|
-
|
|
1289
|
-
] }), t[33] = u, t[34] =
|
|
1290
|
-
}),
|
|
1291
|
-
const t =
|
|
1257
|
+
J
|
|
1258
|
+
] }), t[33] = u, t[34] = J, t[35] = p, t[36] = w, t[37] = x, t[38] = V) : V = t[38], V;
|
|
1259
|
+
}), ut = F(function() {
|
|
1260
|
+
const t = B(73), {
|
|
1292
1261
|
theme: e,
|
|
1293
1262
|
businessInfo: s,
|
|
1294
1263
|
toggleProfile: l
|
|
1295
|
-
} = K(), [
|
|
1264
|
+
} = K(), [o, g] = ne("info"), r = e === "dark", i = s.bannerImage || "https://images.unsplash.com/photo-1436491865332-7a61a109cc05?w=800&q=80", a = s.brandColor || "#0084ff", f = `
|
|
1296
1265
|
absolute inset-0 z-50 flex flex-col
|
|
1297
1266
|
${r ? "bg-zinc-950" : "bg-white"}
|
|
1298
1267
|
`, h = `
|
|
@@ -1314,8 +1283,8 @@ const wt = F(function(t) {
|
|
|
1314
1283
|
m,
|
|
1315
1284
|
b
|
|
1316
1285
|
] }), t[6] = h, t[7] = m, t[8] = b, t[9] = y) : y = t[9];
|
|
1317
|
-
let
|
|
1318
|
-
t[10] !==
|
|
1286
|
+
let w;
|
|
1287
|
+
t[10] !== i ? (w = /* @__PURE__ */ n("div", { className: "relative h-40 bg-gray-200", children: /* @__PURE__ */ n("img", { src: i, alt: "Business banner", className: "w-full h-full object-cover" }) }), t[10] = i, t[11] = w) : w = t[11];
|
|
1319
1288
|
const x = `
|
|
1320
1289
|
absolute -top-10 left-1/2 -translate-x-1/2
|
|
1321
1290
|
w-20 h-20 rounded-full overflow-hidden border-4
|
|
@@ -1326,94 +1295,94 @@ const wt = F(function(t) {
|
|
|
1326
1295
|
t[12] !== a || t[13] !== s.logo || t[14] !== s.name ? (k = s.logo ? /* @__PURE__ */ n("img", { src: s.logo, alt: `${s.name} logo`, className: "w-full h-full object-cover" }) : /* @__PURE__ */ n("div", { className: "w-full h-full flex items-center justify-center text-2xl font-bold text-white", style: {
|
|
1327
1296
|
backgroundColor: a
|
|
1328
1297
|
}, children: s.name.charAt(0).toUpperCase() }), t[12] = a, t[13] = s.logo, t[14] = s.name, t[15] = k) : k = t[15];
|
|
1329
|
-
let
|
|
1330
|
-
t[16] !== k || t[17] !== x ? (
|
|
1298
|
+
let v;
|
|
1299
|
+
t[16] !== k || t[17] !== x ? (v = /* @__PURE__ */ n("div", { className: "relative px-4", children: /* @__PURE__ */ n("div", { className: x, children: k }) }), t[16] = k, t[17] = x, t[18] = v) : v = t[18];
|
|
1331
1300
|
const N = `text-xl font-semibold ${r ? "text-white" : "text-gray-900"}`;
|
|
1332
|
-
let _;
|
|
1333
|
-
t[19] !== s.name || t[20] !== N ? (_ = /* @__PURE__ */ n("h1", { className: N, children: s.name }), t[19] = s.name, t[20] = N, t[21] = _) : _ = t[21];
|
|
1334
|
-
let $;
|
|
1335
|
-
t[22] !== s.description || t[23] !== r ? ($ = s.description && /* @__PURE__ */ n("p", { className: `text-sm mt-1 ${r ? "text-zinc-400" : "text-gray-500"}`, children: s.description }), t[22] = s.description, t[23] = r, t[24] = $) : $ = t[24];
|
|
1336
1301
|
let L;
|
|
1337
|
-
t[
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1302
|
+
t[19] !== s.name || t[20] !== N ? (L = /* @__PURE__ */ n("h1", { className: N, children: s.name }), t[19] = s.name, t[20] = N, t[21] = L) : L = t[21];
|
|
1303
|
+
let M;
|
|
1304
|
+
t[22] !== s.description || t[23] !== r ? (M = s.description && /* @__PURE__ */ n("p", { className: `text-sm mt-1 ${r ? "text-zinc-400" : "text-gray-500"}`, children: s.description }), t[22] = s.description, t[23] = r, t[24] = M) : M = t[24];
|
|
1305
|
+
let _;
|
|
1306
|
+
t[25] !== L || t[26] !== M ? (_ = /* @__PURE__ */ C("div", { className: "pt-12 pb-4 px-4 text-center", children: [
|
|
1307
|
+
L,
|
|
1308
|
+
M
|
|
1309
|
+
] }), t[25] = L, t[26] = M, t[27] = _) : _ = t[27];
|
|
1341
1310
|
let A;
|
|
1342
|
-
t[28] !== a || t[29] !== s.phoneNumbers || t[30] !== r ? (A = s.phoneNumbers && s.phoneNumbers.length > 0 && /* @__PURE__ */ n(
|
|
1343
|
-
const
|
|
1344
|
-
|
|
1311
|
+
t[28] !== a || t[29] !== s.phoneNumbers || t[30] !== r ? (A = s.phoneNumbers && s.phoneNumbers.length > 0 && /* @__PURE__ */ n(he, { icon: "phone", label: "Call", isDark: r, brandColor: a, onClick: () => {
|
|
1312
|
+
const R = s.phoneNumbers?.[0]?.number;
|
|
1313
|
+
R && (window.location.href = `tel:${R}`);
|
|
1345
1314
|
} }), t[28] = a, t[29] = s.phoneNumbers, t[30] = r, t[31] = A) : A = t[31];
|
|
1346
1315
|
let z;
|
|
1347
|
-
t[32] !== a || t[33] !== s.websites || t[34] !== r ? (z = s.websites && s.websites.length > 0 && /* @__PURE__ */ n(
|
|
1348
|
-
const
|
|
1349
|
-
|
|
1316
|
+
t[32] !== a || t[33] !== s.websites || t[34] !== r ? (z = s.websites && s.websites.length > 0 && /* @__PURE__ */ n(he, { icon: "globe", label: "Website", isDark: r, brandColor: a, onClick: () => {
|
|
1317
|
+
const R = s.websites?.[0]?.url;
|
|
1318
|
+
R && window.open(R, "_blank", "noopener,noreferrer");
|
|
1350
1319
|
} }), t[32] = a, t[33] = s.websites, t[34] = r, t[35] = z) : z = t[35];
|
|
1320
|
+
let $;
|
|
1321
|
+
t[36] !== a || t[37] !== s.emails || t[38] !== r ? ($ = s.emails && s.emails.length > 0 && /* @__PURE__ */ n(he, { icon: "mail", label: "Contact", isDark: r, brandColor: a, onClick: () => {
|
|
1322
|
+
const R = s.emails?.[0]?.email;
|
|
1323
|
+
R && (window.location.href = `mailto:${R}`);
|
|
1324
|
+
} }), t[36] = a, t[37] = s.emails, t[38] = r, t[39] = $) : $ = t[39];
|
|
1351
1325
|
let S;
|
|
1352
|
-
t[
|
|
1353
|
-
const j = s.emails?.[0]?.email;
|
|
1354
|
-
j && (window.location.href = `mailto:${j}`);
|
|
1355
|
-
} }), t[36] = a, t[37] = s.emails, t[38] = r, t[39] = S) : S = t[39];
|
|
1356
|
-
let M;
|
|
1357
|
-
t[40] !== A || t[41] !== z || t[42] !== S ? (M = /* @__PURE__ */ C("div", { className: "flex justify-center gap-4 px-4 pb-4", children: [
|
|
1326
|
+
t[40] !== A || t[41] !== z || t[42] !== $ ? (S = /* @__PURE__ */ C("div", { className: "flex justify-center gap-4 px-4 pb-4", children: [
|
|
1358
1327
|
A,
|
|
1359
1328
|
z,
|
|
1360
|
-
|
|
1361
|
-
] }), t[40] = A, t[41] = z, t[42] =
|
|
1329
|
+
$
|
|
1330
|
+
] }), t[40] = A, t[41] = z, t[42] = $, t[43] = S) : S = t[43];
|
|
1362
1331
|
const I = `
|
|
1363
1332
|
flex mx-4 rounded-lg overflow-hidden border
|
|
1364
1333
|
${r ? "border-zinc-700 bg-zinc-800" : "border-gray-200 bg-gray-100"}
|
|
1365
|
-
`,
|
|
1366
|
-
let
|
|
1367
|
-
t[44] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (
|
|
1368
|
-
let
|
|
1369
|
-
t[45] !== a || t[46] !== r || t[47] !==
|
|
1370
|
-
const O =
|
|
1371
|
-
let
|
|
1372
|
-
t[49] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (
|
|
1334
|
+
`, T = o === "info";
|
|
1335
|
+
let D;
|
|
1336
|
+
t[44] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (D = () => g("info"), t[44] = D) : D = t[44];
|
|
1337
|
+
let j;
|
|
1338
|
+
t[45] !== a || t[46] !== r || t[47] !== T ? (j = /* @__PURE__ */ n(we, { active: T, onClick: D, isDark: r, brandColor: a, children: "Info" }), t[45] = a, t[46] = r, t[47] = T, t[48] = j) : j = t[48];
|
|
1339
|
+
const O = o === "options";
|
|
1340
|
+
let J;
|
|
1341
|
+
t[49] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (J = () => g("options"), t[49] = J) : J = t[49];
|
|
1373
1342
|
let V;
|
|
1374
|
-
t[50] !== a || t[51] !== r || t[52] !== O ? (V = /* @__PURE__ */ n(
|
|
1343
|
+
t[50] !== a || t[51] !== r || t[52] !== O ? (V = /* @__PURE__ */ n(we, { active: O, onClick: J, isDark: r, brandColor: a, children: "Options" }), t[50] = a, t[51] = r, t[52] = O, t[53] = V) : V = t[53];
|
|
1375
1344
|
let Q;
|
|
1376
|
-
t[54] !== I || t[55] !==
|
|
1377
|
-
|
|
1345
|
+
t[54] !== I || t[55] !== j || t[56] !== V ? (Q = /* @__PURE__ */ C("div", { className: I, children: [
|
|
1346
|
+
j,
|
|
1378
1347
|
V
|
|
1379
|
-
] }), t[54] = I, t[55] =
|
|
1348
|
+
] }), t[54] = I, t[55] = j, t[56] = V, t[57] = Q) : Q = t[57];
|
|
1380
1349
|
let P;
|
|
1381
|
-
t[58] !==
|
|
1350
|
+
t[58] !== o || t[59] !== a || t[60] !== r ? (P = /* @__PURE__ */ n("div", { className: "p-4", children: o === "info" ? /* @__PURE__ */ n(ht, { isDark: r, brandColor: a }) : /* @__PURE__ */ n(gt, { isDark: r }) }), t[58] = o, t[59] = a, t[60] = r, t[61] = P) : P = t[61];
|
|
1382
1351
|
let Y;
|
|
1383
|
-
t[62] !==
|
|
1384
|
-
v,
|
|
1352
|
+
t[62] !== v || t[63] !== _ || t[64] !== S || t[65] !== Q || t[66] !== P || t[67] !== w ? (Y = /* @__PURE__ */ C("div", { className: "flex-1 overflow-y-auto", children: [
|
|
1385
1353
|
w,
|
|
1386
|
-
|
|
1387
|
-
|
|
1354
|
+
v,
|
|
1355
|
+
_,
|
|
1356
|
+
S,
|
|
1388
1357
|
Q,
|
|
1389
1358
|
P
|
|
1390
|
-
] }), t[62] =
|
|
1359
|
+
] }), t[62] = v, t[63] = _, t[64] = S, t[65] = Q, t[66] = P, t[67] = w, t[68] = Y) : Y = t[68];
|
|
1391
1360
|
let ee;
|
|
1392
1361
|
return t[69] !== f || t[70] !== Y || t[71] !== y ? (ee = /* @__PURE__ */ C("div", { className: f, children: [
|
|
1393
1362
|
y,
|
|
1394
1363
|
Y
|
|
1395
1364
|
] }), t[69] = f, t[70] = Y, t[71] = y, t[72] = ee) : ee = t[72], ee;
|
|
1396
|
-
}),
|
|
1397
|
-
const e =
|
|
1365
|
+
}), he = F(function(t) {
|
|
1366
|
+
const e = B(12), {
|
|
1398
1367
|
icon: s,
|
|
1399
1368
|
label: l,
|
|
1400
|
-
isDark:
|
|
1369
|
+
isDark: o,
|
|
1401
1370
|
brandColor: g,
|
|
1402
1371
|
onClick: r
|
|
1403
1372
|
} = t;
|
|
1404
|
-
let
|
|
1405
|
-
e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (
|
|
1373
|
+
let i;
|
|
1374
|
+
e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (i = {
|
|
1406
1375
|
phone: /* @__PURE__ */ n("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, 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" }),
|
|
1407
1376
|
globe: /* @__PURE__ */ n("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, 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" }),
|
|
1408
1377
|
mail: /* @__PURE__ */ n("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, 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" })
|
|
1409
|
-
}, e[0] =
|
|
1410
|
-
const a =
|
|
1378
|
+
}, e[0] = i) : i = e[0];
|
|
1379
|
+
const a = i, f = `
|
|
1411
1380
|
flex flex-col items-center gap-2 px-6 py-3 rounded-xl border transition-colors
|
|
1412
|
-
${
|
|
1381
|
+
${o ? "bg-zinc-800 border-zinc-700 hover:bg-zinc-700" : "bg-white border-gray-200 hover:bg-gray-50"}
|
|
1413
1382
|
`, h = a[s];
|
|
1414
1383
|
let d;
|
|
1415
1384
|
e[1] !== g || e[2] !== h ? (d = /* @__PURE__ */ n("svg", { className: "w-6 h-6", fill: "none", viewBox: "0 0 24 24", stroke: g, children: h }), e[1] = g, e[2] = h, e[3] = d) : d = e[3];
|
|
1416
|
-
const u = `text-xs font-medium ${
|
|
1385
|
+
const u = `text-xs font-medium ${o ? "text-zinc-300" : "text-gray-600"}`;
|
|
1417
1386
|
let m;
|
|
1418
1387
|
e[4] !== l || e[5] !== u ? (m = /* @__PURE__ */ n("span", { className: u, children: l }), e[4] = l, e[5] = u, e[6] = m) : m = e[6];
|
|
1419
1388
|
let p;
|
|
@@ -1421,31 +1390,31 @@ const wt = F(function(t) {
|
|
|
1421
1390
|
d,
|
|
1422
1391
|
m
|
|
1423
1392
|
] }), e[7] = r, e[8] = f, e[9] = d, e[10] = m, e[11] = p) : p = e[11], p;
|
|
1424
|
-
}),
|
|
1425
|
-
const e =
|
|
1393
|
+
}), we = F(function(t) {
|
|
1394
|
+
const e = B(8), {
|
|
1426
1395
|
active: s,
|
|
1427
1396
|
onClick: l,
|
|
1428
|
-
isDark:
|
|
1397
|
+
isDark: o,
|
|
1429
1398
|
brandColor: g,
|
|
1430
1399
|
children: r
|
|
1431
|
-
} = t,
|
|
1400
|
+
} = t, i = `
|
|
1432
1401
|
flex-1 py-2.5 text-sm font-medium transition-colors rounded-lg
|
|
1433
|
-
${s ? "text-white" :
|
|
1402
|
+
${s ? "text-white" : o ? "text-zinc-400 hover:text-zinc-200" : "text-gray-500 hover:text-gray-700"}
|
|
1434
1403
|
`;
|
|
1435
1404
|
let a;
|
|
1436
1405
|
e[0] !== s || e[1] !== g ? (a = s ? {
|
|
1437
1406
|
backgroundColor: g
|
|
1438
1407
|
} : void 0, e[0] = s, e[1] = g, e[2] = a) : a = e[2];
|
|
1439
1408
|
let f;
|
|
1440
|
-
return e[3] !== r || e[4] !== l || e[5] !==
|
|
1441
|
-
}),
|
|
1442
|
-
const e =
|
|
1409
|
+
return e[3] !== r || e[4] !== l || e[5] !== i || e[6] !== a ? (f = /* @__PURE__ */ n("button", { onClick: l, className: i, style: a, children: r }), e[3] = r, e[4] = l, e[5] = i, e[6] = a, e[7] = f) : f = e[7], f;
|
|
1410
|
+
}), ht = F(function(t) {
|
|
1411
|
+
const e = B(19), {
|
|
1443
1412
|
isDark: s,
|
|
1444
1413
|
brandColor: l
|
|
1445
1414
|
} = t, {
|
|
1446
|
-
businessInfo:
|
|
1415
|
+
businessInfo: o
|
|
1447
1416
|
} = K();
|
|
1448
|
-
if (!(
|
|
1417
|
+
if (!(o.phoneNumbers && o.phoneNumbers.length > 0 || o.websites && o.websites.length > 0 || o.emails && o.emails.length > 0)) {
|
|
1449
1418
|
const d = `text-center py-8 ${s ? "text-zinc-500" : "text-gray-400"}`;
|
|
1450
1419
|
let u;
|
|
1451
1420
|
return e[0] !== d ? (u = /* @__PURE__ */ n("div", { className: d, children: "No contact information available" }), e[0] = d, e[1] = u) : u = e[1], u;
|
|
@@ -1454,33 +1423,33 @@ const wt = F(function(t) {
|
|
|
1454
1423
|
rounded-xl overflow-hidden border divide-y
|
|
1455
1424
|
${s ? "bg-zinc-900 border-zinc-800 divide-zinc-800" : "bg-gray-50 border-gray-200 divide-gray-200"}
|
|
1456
1425
|
`;
|
|
1457
|
-
let
|
|
1458
|
-
e[2] !== l || e[3] !==
|
|
1426
|
+
let i;
|
|
1427
|
+
e[2] !== l || e[3] !== o.phoneNumbers || e[4] !== s ? (i = o.phoneNumbers?.map((d, u) => /* @__PURE__ */ n(ge, { icon: "phone", primary: d.number, secondary: d.label, isDark: s, brandColor: l, onClick: () => window.location.href = `tel:${d.number}` }, `phone-${u}`)), e[2] = l, e[3] = o.phoneNumbers, e[4] = s, e[5] = i) : i = e[5];
|
|
1459
1428
|
let a;
|
|
1460
|
-
e[6] !== l || e[7] !==
|
|
1429
|
+
e[6] !== l || e[7] !== o.websites || e[8] !== s ? (a = o.websites?.map((d, u) => /* @__PURE__ */ n(ge, { icon: "globe", primary: d.url.replace(/^https?:\/\//, ""), secondary: d.label || "Website", isDark: s, brandColor: l, onClick: () => window.open(d.url, "_blank", "noopener,noreferrer") }, `web-${u}`)), e[6] = l, e[7] = o.websites, e[8] = s, e[9] = a) : a = e[9];
|
|
1461
1430
|
let f;
|
|
1462
|
-
e[10] !== l || e[11] !==
|
|
1431
|
+
e[10] !== l || e[11] !== o.emails || e[12] !== s ? (f = o.emails?.map((d, u) => /* @__PURE__ */ n(ge, { icon: "mail", primary: d.email, secondary: d.label || "Email", isDark: s, brandColor: l, onClick: () => window.location.href = `mailto:${d.email}` }, `email-${u}`)), e[10] = l, e[11] = o.emails, e[12] = s, e[13] = f) : f = e[13];
|
|
1463
1432
|
let h;
|
|
1464
|
-
return e[14] !== r || e[15] !==
|
|
1465
|
-
|
|
1433
|
+
return e[14] !== r || e[15] !== i || e[16] !== a || e[17] !== f ? (h = /* @__PURE__ */ C("div", { className: r, children: [
|
|
1434
|
+
i,
|
|
1466
1435
|
a,
|
|
1467
1436
|
f
|
|
1468
|
-
] }), e[14] = r, e[15] =
|
|
1469
|
-
}),
|
|
1470
|
-
const e =
|
|
1437
|
+
] }), e[14] = r, e[15] = i, e[16] = a, e[17] = f, e[18] = h) : h = e[18], h;
|
|
1438
|
+
}), ge = F(function(t) {
|
|
1439
|
+
const e = B(20), {
|
|
1471
1440
|
icon: s,
|
|
1472
1441
|
primary: l,
|
|
1473
|
-
secondary:
|
|
1442
|
+
secondary: o,
|
|
1474
1443
|
isDark: g,
|
|
1475
1444
|
onClick: r
|
|
1476
1445
|
} = t;
|
|
1477
|
-
let
|
|
1478
|
-
e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (
|
|
1446
|
+
let i;
|
|
1447
|
+
e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (i = {
|
|
1479
1448
|
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",
|
|
1480
1449
|
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",
|
|
1481
1450
|
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"
|
|
1482
|
-
}, e[0] =
|
|
1483
|
-
const a =
|
|
1451
|
+
}, e[0] = i) : i = e[0];
|
|
1452
|
+
const a = i, f = `
|
|
1484
1453
|
w-full flex items-center gap-4 px-4 py-3.5 text-left transition-colors
|
|
1485
1454
|
${g ? "hover:bg-zinc-800" : "hover:bg-gray-100"}
|
|
1486
1455
|
`, h = `w-5 h-5 flex-shrink-0 ${g ? "text-zinc-500" : "text-gray-400"}`, d = a[s];
|
|
@@ -1492,37 +1461,37 @@ const wt = F(function(t) {
|
|
|
1492
1461
|
let b;
|
|
1493
1462
|
e[6] !== l || e[7] !== p ? (b = /* @__PURE__ */ n("p", { className: p, children: l }), e[6] = l, e[7] = p, e[8] = b) : b = e[8];
|
|
1494
1463
|
let y;
|
|
1495
|
-
e[9] !== g || e[10] !==
|
|
1496
|
-
let
|
|
1497
|
-
e[12] !== b || e[13] !== y ? (
|
|
1464
|
+
e[9] !== g || e[10] !== o ? (y = o && /* @__PURE__ */ n("p", { className: `text-xs truncate ${g ? "text-zinc-500" : "text-gray-500"}`, children: o }), e[9] = g, e[10] = o, e[11] = y) : y = e[11];
|
|
1465
|
+
let w;
|
|
1466
|
+
e[12] !== b || e[13] !== y ? (w = /* @__PURE__ */ C("div", { className: "flex-1 min-w-0", children: [
|
|
1498
1467
|
b,
|
|
1499
1468
|
y
|
|
1500
|
-
] }), e[12] = b, e[13] = y, e[14] =
|
|
1469
|
+
] }), e[12] = b, e[13] = y, e[14] = w) : w = e[14];
|
|
1501
1470
|
let x;
|
|
1502
|
-
return e[15] !== r || e[16] !==
|
|
1471
|
+
return e[15] !== r || e[16] !== w || e[17] !== f || e[18] !== m ? (x = /* @__PURE__ */ C("button", { onClick: r, className: f, children: [
|
|
1503
1472
|
m,
|
|
1504
|
-
|
|
1505
|
-
] }), e[15] = r, e[16] =
|
|
1506
|
-
}),
|
|
1507
|
-
const e =
|
|
1473
|
+
w
|
|
1474
|
+
] }), e[15] = r, e[16] = w, e[17] = f, e[18] = m, e[19] = x) : x = e[19], x;
|
|
1475
|
+
}), gt = F(function(t) {
|
|
1476
|
+
const e = B(9), {
|
|
1508
1477
|
isDark: s
|
|
1509
1478
|
} = t, l = `
|
|
1510
1479
|
rounded-xl overflow-hidden border divide-y
|
|
1511
1480
|
${s ? "bg-zinc-900 border-zinc-800 divide-zinc-800" : "bg-gray-50 border-gray-200 divide-gray-200"}
|
|
1512
1481
|
`;
|
|
1513
|
-
let
|
|
1514
|
-
e[0] !== s ? (
|
|
1515
|
-
let
|
|
1516
|
-
return e[4] !== l || e[5] !==
|
|
1517
|
-
|
|
1482
|
+
let o, g, r;
|
|
1483
|
+
e[0] !== s ? (o = /* @__PURE__ */ n(pe, { icon: "bell", label: "Notifications", isDark: s }), g = /* @__PURE__ */ n(pe, { icon: "block", label: "Block & report spam", isDark: s }), r = /* @__PURE__ */ n(pe, { icon: "info", label: "About RCS", isDark: s }), e[0] = s, e[1] = o, e[2] = g, e[3] = r) : (o = e[1], g = e[2], r = e[3]);
|
|
1484
|
+
let i;
|
|
1485
|
+
return e[4] !== l || e[5] !== o || e[6] !== g || e[7] !== r ? (i = /* @__PURE__ */ C("div", { className: l, children: [
|
|
1486
|
+
o,
|
|
1518
1487
|
g,
|
|
1519
1488
|
r
|
|
1520
|
-
] }), e[4] = l, e[5] =
|
|
1521
|
-
}),
|
|
1522
|
-
const e =
|
|
1489
|
+
] }), e[4] = l, e[5] = o, e[6] = g, e[7] = r, e[8] = i) : i = e[8], i;
|
|
1490
|
+
}), pe = F(function(t) {
|
|
1491
|
+
const e = B(13), {
|
|
1523
1492
|
icon: s,
|
|
1524
1493
|
label: l,
|
|
1525
|
-
isDark:
|
|
1494
|
+
isDark: o
|
|
1526
1495
|
} = t;
|
|
1527
1496
|
let g;
|
|
1528
1497
|
e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (g = {
|
|
@@ -1530,40 +1499,40 @@ const wt = F(function(t) {
|
|
|
1530
1499
|
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",
|
|
1531
1500
|
info: "M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"
|
|
1532
1501
|
}, e[0] = g) : g = e[0];
|
|
1533
|
-
const r = g,
|
|
1502
|
+
const r = g, i = `
|
|
1534
1503
|
w-full flex items-center gap-4 px-4 py-3.5 text-left transition-colors
|
|
1535
|
-
${
|
|
1536
|
-
`, a = `w-5 h-5 flex-shrink-0 ${
|
|
1504
|
+
${o ? "hover:bg-zinc-800" : "hover:bg-gray-100"}
|
|
1505
|
+
`, a = `w-5 h-5 flex-shrink-0 ${o ? "text-zinc-500" : "text-gray-400"}`, f = r[s];
|
|
1537
1506
|
let h;
|
|
1538
1507
|
e[1] !== f ? (h = /* @__PURE__ */ n("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: f }), e[1] = f, e[2] = h) : h = e[2];
|
|
1539
1508
|
let d;
|
|
1540
1509
|
e[3] !== a || e[4] !== h ? (d = /* @__PURE__ */ n("svg", { className: a, fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: h }), e[3] = a, e[4] = h, e[5] = d) : d = e[5];
|
|
1541
|
-
const u = `text-sm font-medium ${
|
|
1510
|
+
const u = `text-sm font-medium ${o ? "text-white" : "text-gray-900"}`;
|
|
1542
1511
|
let m;
|
|
1543
1512
|
e[6] !== l || e[7] !== u ? (m = /* @__PURE__ */ n("span", { className: u, children: l }), e[6] = l, e[7] = u, e[8] = m) : m = e[8];
|
|
1544
1513
|
let p;
|
|
1545
|
-
return e[9] !==
|
|
1514
|
+
return e[9] !== i || e[10] !== d || e[11] !== m ? (p = /* @__PURE__ */ C("button", { className: i, children: [
|
|
1546
1515
|
d,
|
|
1547
1516
|
m
|
|
1548
|
-
] }), e[9] =
|
|
1549
|
-
}),
|
|
1517
|
+
] }), e[9] = i, e[10] = d, e[11] = m, e[12] = p) : p = e[12], p;
|
|
1518
|
+
}), ve = {
|
|
1550
1519
|
FULL: "h-full",
|
|
1551
1520
|
TALL: "h-[80%]",
|
|
1552
1521
|
HALF: "h-[50%]"
|
|
1553
|
-
},
|
|
1554
|
-
const t =
|
|
1522
|
+
}, pt = F(function() {
|
|
1523
|
+
const t = B(65), {
|
|
1555
1524
|
theme: e,
|
|
1556
1525
|
businessInfo: s,
|
|
1557
1526
|
webView: l,
|
|
1558
|
-
closeWebView:
|
|
1559
|
-
} = K(), [g, r] = ne(!0), [
|
|
1527
|
+
closeWebView: o
|
|
1528
|
+
} = K(), [g, r] = ne(!0), [i, a] = ne(!1), f = e === "dark", h = s.brandColor || "#0084ff";
|
|
1560
1529
|
let d;
|
|
1561
1530
|
t[0] !== l?.url ? (d = () => {
|
|
1562
1531
|
l?.url && (r(!0), a(!1));
|
|
1563
1532
|
}, t[0] = l?.url, t[1] = d) : d = t[1];
|
|
1564
1533
|
const u = l?.url;
|
|
1565
1534
|
let m;
|
|
1566
|
-
t[2] !== u ? (m = [u], t[2] = u, t[3] = m) : m = t[3],
|
|
1535
|
+
t[2] !== u ? (m = [u], t[2] = u, t[3] = m) : m = t[3], oe(d, m);
|
|
1567
1536
|
let p;
|
|
1568
1537
|
t[4] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (p = () => {
|
|
1569
1538
|
r(!1);
|
|
@@ -1573,40 +1542,40 @@ const wt = F(function(t) {
|
|
|
1573
1542
|
t[5] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (y = () => {
|
|
1574
1543
|
r(!1), a(!0);
|
|
1575
1544
|
}, t[5] = y) : y = t[5];
|
|
1576
|
-
const
|
|
1545
|
+
const w = y, x = bt;
|
|
1577
1546
|
if (!l || !l.isOpen)
|
|
1578
1547
|
return null;
|
|
1579
1548
|
const {
|
|
1580
1549
|
url: k,
|
|
1581
|
-
viewMode:
|
|
1550
|
+
viewMode: v,
|
|
1582
1551
|
title: N,
|
|
1583
|
-
postbackData:
|
|
1552
|
+
postbackData: L
|
|
1584
1553
|
} = l;
|
|
1585
|
-
let
|
|
1586
|
-
t[6] !== N || t[7] !== k ? (
|
|
1587
|
-
const
|
|
1554
|
+
let M;
|
|
1555
|
+
t[6] !== N || t[7] !== k ? (M = N || x(k), t[6] = N, t[7] = k, t[8] = M) : M = t[8];
|
|
1556
|
+
const _ = M, A = v === "FULL", z = v === "TALL" || v === "HALF", $ = ve[v] || ve.TALL, S = `
|
|
1588
1557
|
rcs-webview-overlay absolute inset-0 z-50 flex flex-col
|
|
1589
1558
|
${A ? "" : "justify-end"}
|
|
1590
1559
|
${f ? "bg-black/60" : "bg-black/40"}
|
|
1591
|
-
`, I = `WebView: ${
|
|
1592
|
-
let
|
|
1593
|
-
t[9] !==
|
|
1594
|
-
const
|
|
1560
|
+
`, I = `WebView: ${_}`;
|
|
1561
|
+
let T;
|
|
1562
|
+
t[9] !== o || t[10] !== z ? (T = z && /* @__PURE__ */ n("button", { type: "button", className: "absolute inset-0 w-full h-full cursor-default", onClick: o, "aria-label": "Close WebView" }), t[9] = o, t[10] = z, t[11] = T) : T = t[11];
|
|
1563
|
+
const D = `
|
|
1595
1564
|
rcs-webview-container relative flex flex-col overflow-hidden
|
|
1596
1565
|
${f ? "bg-zinc-900" : "bg-white"}
|
|
1597
|
-
${
|
|
1566
|
+
${$} w-full
|
|
1598
1567
|
${z ? "rounded-t-2xl shadow-2xl" : ""}
|
|
1599
1568
|
`;
|
|
1600
|
-
let
|
|
1601
|
-
t[12] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (
|
|
1569
|
+
let j;
|
|
1570
|
+
t[12] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (j = {
|
|
1602
1571
|
position: "relative",
|
|
1603
1572
|
zIndex: 1
|
|
1604
|
-
}, t[12] =
|
|
1573
|
+
}, t[12] = j) : j = t[12];
|
|
1605
1574
|
const O = `
|
|
1606
1575
|
rcs-webview-header flex items-center gap-3 px-2 py-2 flex-shrink-0
|
|
1607
1576
|
border-b
|
|
1608
1577
|
${f ? "bg-zinc-900 border-zinc-800" : "bg-white border-gray-200"}
|
|
1609
|
-
`,
|
|
1578
|
+
`, J = `
|
|
1610
1579
|
rcs-webview-close w-10 h-10 rounded-full flex items-center justify-center
|
|
1611
1580
|
transition-colors
|
|
1612
1581
|
${f ? "text-white hover:bg-zinc-800" : "text-gray-700 hover:bg-gray-100"}
|
|
@@ -1614,27 +1583,27 @@ const wt = F(function(t) {
|
|
|
1614
1583
|
let V;
|
|
1615
1584
|
t[13] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (V = /* @__PURE__ */ n("svg", { className: "w-6 h-6", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: /* @__PURE__ */ n("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M15 19l-7-7 7-7" }) }), t[13] = V) : V = t[13];
|
|
1616
1585
|
let Q;
|
|
1617
|
-
t[14] !==
|
|
1586
|
+
t[14] !== o || t[15] !== J ? (Q = /* @__PURE__ */ n("button", { type: "button", onClick: o, className: J, "aria-label": "Close WebView", children: V }), t[14] = o, t[15] = J, t[16] = Q) : Q = t[16];
|
|
1618
1587
|
const P = `
|
|
1619
1588
|
rcs-webview-title text-base font-medium truncate
|
|
1620
1589
|
${f ? "text-white" : "text-gray-900"}
|
|
1621
1590
|
`;
|
|
1622
1591
|
let Y;
|
|
1623
|
-
t[17] !==
|
|
1592
|
+
t[17] !== _ || t[18] !== P ? (Y = /* @__PURE__ */ n("h2", { className: P, children: _ }), t[17] = _, t[18] = P, t[19] = Y) : Y = t[19];
|
|
1624
1593
|
const ee = `
|
|
1625
1594
|
rcs-webview-url text-xs truncate
|
|
1626
1595
|
${f ? "text-zinc-400" : "text-gray-500"}
|
|
1627
1596
|
`;
|
|
1628
|
-
let
|
|
1629
|
-
t[20] !== k ? (
|
|
1597
|
+
let R;
|
|
1598
|
+
t[20] !== k ? (R = x(k), t[20] = k, t[21] = R) : R = t[21];
|
|
1630
1599
|
let G;
|
|
1631
|
-
t[22] !== ee || t[23] !==
|
|
1600
|
+
t[22] !== ee || t[23] !== R ? (G = /* @__PURE__ */ n("p", { className: ee, children: R }), t[22] = ee, t[23] = R, t[24] = G) : G = t[24];
|
|
1632
1601
|
let E;
|
|
1633
1602
|
t[25] !== Y || t[26] !== G ? (E = /* @__PURE__ */ C("div", { className: "flex-1 min-w-0", children: [
|
|
1634
1603
|
Y,
|
|
1635
1604
|
G
|
|
1636
1605
|
] }), t[25] = Y, t[26] = G, t[27] = E) : E = t[27];
|
|
1637
|
-
const
|
|
1606
|
+
const q = `
|
|
1638
1607
|
w-10 h-10 rounded-full flex items-center justify-center
|
|
1639
1608
|
${f ? "text-zinc-400 hover:bg-zinc-800" : "text-gray-500 hover:bg-gray-100"}
|
|
1640
1609
|
`;
|
|
@@ -1645,7 +1614,7 @@ const wt = F(function(t) {
|
|
|
1645
1614
|
/* @__PURE__ */ n("circle", { cx: "12", cy: "19", r: "2" })
|
|
1646
1615
|
] }), t[28] = W) : W = t[28];
|
|
1647
1616
|
let U;
|
|
1648
|
-
t[29] !==
|
|
1617
|
+
t[29] !== q ? (U = /* @__PURE__ */ n("button", { type: "button", className: q, "aria-label": "More options", children: W }), t[29] = q, t[30] = U) : U = t[30];
|
|
1649
1618
|
let H;
|
|
1650
1619
|
t[31] !== O || t[32] !== Q || t[33] !== E || t[34] !== U ? (H = /* @__PURE__ */ C("header", { className: O, children: [
|
|
1651
1620
|
Q,
|
|
@@ -1661,33 +1630,33 @@ const wt = F(function(t) {
|
|
|
1661
1630
|
width: "30%"
|
|
1662
1631
|
} }) }), t[36] = h, t[37] = g, t[38] = X) : X = t[38];
|
|
1663
1632
|
let Z;
|
|
1664
|
-
t[39] !==
|
|
1633
|
+
t[39] !== o || t[40] !== f || t[41] !== i ? (Z = i && /* @__PURE__ */ C("div", { className: `
|
|
1665
1634
|
rcs-webview-error flex-1 flex flex-col items-center justify-center p-6 text-center
|
|
1666
1635
|
${f ? "text-zinc-400" : "text-gray-500"}
|
|
1667
1636
|
`, children: [
|
|
1668
1637
|
/* @__PURE__ */ n("svg", { className: "w-16 h-16 mb-4 opacity-50", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ n("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 1.5, d: "M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z" }) }),
|
|
1669
1638
|
/* @__PURE__ */ n("p", { className: "text-sm font-medium mb-2", children: "Unable to load page" }),
|
|
1670
1639
|
/* @__PURE__ */ n("p", { className: "text-xs opacity-75 mb-4", children: "This content cannot be displayed in the emulator" }),
|
|
1671
|
-
/* @__PURE__ */ n("button", { type: "button", onClick:
|
|
1640
|
+
/* @__PURE__ */ n("button", { type: "button", onClick: o, className: `
|
|
1672
1641
|
px-4 py-2 rounded-full text-sm font-medium
|
|
1673
1642
|
${f ? "bg-zinc-800 text-white hover:bg-zinc-700" : "bg-gray-100 text-gray-700 hover:bg-gray-200"}
|
|
1674
1643
|
`, children: "Go Back" })
|
|
1675
|
-
] }), t[39] =
|
|
1644
|
+
] }), t[39] = o, t[40] = f, t[41] = i, t[42] = Z) : Z = t[42];
|
|
1676
1645
|
let te;
|
|
1677
|
-
t[43] !==
|
|
1646
|
+
t[43] !== _ || t[44] !== i || t[45] !== k ? (te = !i && /* @__PURE__ */ n("div", { className: "rcs-webview-iframe-container flex-1 overflow-hidden", children: /* @__PURE__ */ n("iframe", { src: k, title: _, className: "w-full h-full border-0", onLoad: b, onError: w, sandbox: "allow-scripts allow-same-origin allow-forms allow-popups", referrerPolicy: "no-referrer-when-downgrade", loading: "lazy" }) }), t[43] = _, t[44] = i, t[45] = k, t[46] = te) : te = t[46];
|
|
1678
1647
|
let se;
|
|
1679
1648
|
t[47] !== z || t[48] !== f ? (se = z && /* @__PURE__ */ n("div", { className: `
|
|
1680
1649
|
rcs-webview-safe-area h-2 flex-shrink-0
|
|
1681
1650
|
${f ? "bg-zinc-900" : "bg-white"}
|
|
1682
1651
|
` }), t[47] = z, t[48] = f, t[49] = se) : se = t[49];
|
|
1683
1652
|
let re;
|
|
1684
|
-
t[50] !== H || t[51] !== X || t[52] !== Z || t[53] !== te || t[54] !== se || t[55] !==
|
|
1653
|
+
t[50] !== H || t[51] !== X || t[52] !== Z || t[53] !== te || t[54] !== se || t[55] !== D ? (re = /* @__PURE__ */ C("div", { className: D, style: j, children: [
|
|
1685
1654
|
H,
|
|
1686
1655
|
X,
|
|
1687
1656
|
Z,
|
|
1688
1657
|
te,
|
|
1689
1658
|
se
|
|
1690
|
-
] }), t[50] = H, t[51] = X, t[52] = Z, t[53] = te, t[54] = se, t[55] =
|
|
1659
|
+
] }), t[50] = H, t[51] = X, t[52] = Z, t[53] = te, t[54] = se, t[55] = D, t[56] = re) : re = t[56];
|
|
1691
1660
|
let ce;
|
|
1692
1661
|
t[57] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (ce = /* @__PURE__ */ n("style", { children: `
|
|
1693
1662
|
@keyframes webview-loading {
|
|
@@ -1697,37 +1666,37 @@ const wt = F(function(t) {
|
|
|
1697
1666
|
}
|
|
1698
1667
|
` }), t[57] = ce) : ce = t[57];
|
|
1699
1668
|
let de;
|
|
1700
|
-
return t[58] !==
|
|
1701
|
-
|
|
1669
|
+
return t[58] !== L || t[59] !== re || t[60] !== S || t[61] !== I || t[62] !== T || t[63] !== v ? (de = /* @__PURE__ */ C("div", { className: S, role: "dialog", "aria-modal": "true", "aria-label": I, "data-postback": L, "data-view-mode": v, children: [
|
|
1670
|
+
T,
|
|
1702
1671
|
re,
|
|
1703
1672
|
ce
|
|
1704
|
-
] }), t[58] =
|
|
1673
|
+
] }), t[58] = L, t[59] = re, t[60] = S, t[61] = I, t[62] = T, t[63] = v, t[64] = de) : de = t[64], de;
|
|
1705
1674
|
});
|
|
1706
|
-
function
|
|
1675
|
+
function bt(c) {
|
|
1707
1676
|
try {
|
|
1708
1677
|
return new URL(c).hostname;
|
|
1709
1678
|
} catch {
|
|
1710
1679
|
return "Web Page";
|
|
1711
1680
|
}
|
|
1712
1681
|
}
|
|
1713
|
-
const
|
|
1714
|
-
const e =
|
|
1682
|
+
const xt = F(function(t) {
|
|
1683
|
+
const e = B(39), {
|
|
1715
1684
|
onUnlock: s,
|
|
1716
1685
|
messagePreview: l
|
|
1717
|
-
} = t,
|
|
1686
|
+
} = t, o = l === void 0 ? "New message" : l, {
|
|
1718
1687
|
theme: g,
|
|
1719
1688
|
businessInfo: r
|
|
1720
1689
|
} = K();
|
|
1721
|
-
let
|
|
1722
|
-
e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (
|
|
1723
|
-
const [a, f] = ne(
|
|
1690
|
+
let i;
|
|
1691
|
+
e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (i = /* @__PURE__ */ new Date(), e[0] = i) : i = e[0];
|
|
1692
|
+
const [a, f] = ne(i), h = g === "dark";
|
|
1724
1693
|
let d, u;
|
|
1725
1694
|
e[1] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (d = () => {
|
|
1726
|
-
const
|
|
1695
|
+
const J = setInterval(() => {
|
|
1727
1696
|
f(/* @__PURE__ */ new Date());
|
|
1728
1697
|
}, 1e3);
|
|
1729
|
-
return () => clearInterval(
|
|
1730
|
-
}, u = [], e[1] = d, e[2] = u) : (d = e[1], u = e[2]),
|
|
1698
|
+
return () => clearInterval(J);
|
|
1699
|
+
}, u = [], e[1] = d, e[2] = u) : (d = e[1], u = e[2]), oe(d, u);
|
|
1731
1700
|
let m;
|
|
1732
1701
|
e[3] !== a ? (m = a.toLocaleTimeString([], {
|
|
1733
1702
|
hour: "numeric",
|
|
@@ -1741,7 +1710,7 @@ const $t = F(function(t) {
|
|
|
1741
1710
|
month: "long",
|
|
1742
1711
|
day: "numeric"
|
|
1743
1712
|
}), e[5] = a, e[6] = b) : b = e[6];
|
|
1744
|
-
const y = b,
|
|
1713
|
+
const y = b, w = `
|
|
1745
1714
|
lock-screen flex flex-col h-full w-full select-none
|
|
1746
1715
|
${h ? "bg-zinc-900" : "bg-zinc-800"}
|
|
1747
1716
|
`;
|
|
@@ -1749,22 +1718,22 @@ const $t = F(function(t) {
|
|
|
1749
1718
|
e[7] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (x = /* @__PURE__ */ n("div", { className: "h-6" }), e[7] = x) : x = e[7];
|
|
1750
1719
|
let k;
|
|
1751
1720
|
e[8] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (k = /* @__PURE__ */ n("div", { className: "flex justify-center mt-4", children: /* @__PURE__ */ n("div", { className: "w-8 h-8 rounded-full bg-zinc-700 flex items-center justify-center", children: /* @__PURE__ */ n("svg", { className: "w-4 h-4 text-zinc-400", fill: "currentColor", viewBox: "0 0 20 20", children: /* @__PURE__ */ n("path", { fillRule: "evenodd", d: "M5 9V7a5 5 0 0110 0v2a2 2 0 012 2v5a2 2 0 01-2 2H5a2 2 0 01-2-2v-5a2 2 0 012-2zm8-2v2H7V7a3 3 0 016 0z", clipRule: "evenodd" }) }) }) }), e[8] = k) : k = e[8];
|
|
1752
|
-
let
|
|
1753
|
-
e[9] !== p ? (
|
|
1721
|
+
let v;
|
|
1722
|
+
e[9] !== p ? (v = /* @__PURE__ */ n("div", { className: "mt-6 text-center", children: /* @__PURE__ */ n("h1", { className: "text-5xl font-light text-white tracking-tight", children: p }) }), e[9] = p, e[10] = v) : v = e[10];
|
|
1754
1723
|
let N;
|
|
1755
1724
|
e[11] !== y ? (N = /* @__PURE__ */ n("p", { className: "text-zinc-400 text-sm", children: y }), e[11] = y, e[12] = N) : N = e[12];
|
|
1756
|
-
let
|
|
1757
|
-
e[13] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (
|
|
1725
|
+
let L;
|
|
1726
|
+
e[13] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (L = /* @__PURE__ */ C("div", { className: "flex items-center justify-center gap-1 mt-1 text-zinc-500 text-xs", children: [
|
|
1758
1727
|
/* @__PURE__ */ n("svg", { className: "w-3.5 h-3.5", fill: "currentColor", viewBox: "0 0 20 20", children: /* @__PURE__ */ n("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" }) }),
|
|
1759
1728
|
/* @__PURE__ */ n("span", { children: "19°C" })
|
|
1760
|
-
] }), e[13] =
|
|
1761
|
-
let
|
|
1762
|
-
e[14] !== N ? (
|
|
1729
|
+
] }), e[13] = L) : L = e[13];
|
|
1730
|
+
let M;
|
|
1731
|
+
e[14] !== N ? (M = /* @__PURE__ */ C("div", { className: "mt-2 text-center", children: [
|
|
1763
1732
|
N,
|
|
1764
|
-
|
|
1765
|
-
] }), e[14] = N, e[15] =
|
|
1766
|
-
let
|
|
1767
|
-
e[16] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (
|
|
1733
|
+
L
|
|
1734
|
+
] }), e[14] = N, e[15] = M) : M = e[15];
|
|
1735
|
+
let _;
|
|
1736
|
+
e[16] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (_ = /* @__PURE__ */ n("div", { className: "h-24" }), e[16] = _) : _ = e[16];
|
|
1768
1737
|
let A;
|
|
1769
1738
|
e[17] !== r.logo || e[18] !== r.name ? (A = /* @__PURE__ */ n("div", { className: "w-12 h-12 rounded-xl bg-zinc-900 flex items-center justify-center flex-shrink-0 overflow-hidden", children: r.logo ? /* @__PURE__ */ n("img", { src: r.logo, alt: r.name, className: "w-full h-full object-cover" }) : /* @__PURE__ */ n("div", { className: "text-white", children: /* @__PURE__ */ C("svg", { className: "w-7 h-7", viewBox: "0 0 24 24", fill: "currentColor", children: [
|
|
1770
1739
|
/* @__PURE__ */ n("circle", { cx: "12", cy: "12", r: "1.5" }),
|
|
@@ -1783,48 +1752,48 @@ const $t = F(function(t) {
|
|
|
1783
1752
|
] }) }) }), e[17] = r.logo, e[18] = r.name, e[19] = A) : A = e[19];
|
|
1784
1753
|
let z;
|
|
1785
1754
|
e[20] !== r.name ? (z = /* @__PURE__ */ n("p", { className: "text-sm font-semibold text-gray-900 truncate", children: r.name }), e[20] = r.name, e[21] = z) : z = e[21];
|
|
1755
|
+
let $;
|
|
1756
|
+
e[22] !== o ? ($ = /* @__PURE__ */ n("p", { className: "text-sm text-gray-500 truncate", children: o }), e[22] = o, e[23] = $) : $ = e[23];
|
|
1786
1757
|
let S;
|
|
1787
|
-
e[
|
|
1788
|
-
let M;
|
|
1789
|
-
e[24] !== z || e[25] !== S ? (M = /* @__PURE__ */ C("div", { className: "flex-1 text-left min-w-0", children: [
|
|
1758
|
+
e[24] !== z || e[25] !== $ ? (S = /* @__PURE__ */ C("div", { className: "flex-1 text-left min-w-0", children: [
|
|
1790
1759
|
z,
|
|
1791
|
-
|
|
1792
|
-
] }), e[24] = z, e[25] =
|
|
1760
|
+
$
|
|
1761
|
+
] }), e[24] = z, e[25] = $, e[26] = S) : S = e[26];
|
|
1793
1762
|
let I;
|
|
1794
1763
|
e[27] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (I = /* @__PURE__ */ n("span", { className: "text-xs text-gray-400 flex-shrink-0", children: "now" }), e[27] = I) : I = e[27];
|
|
1795
|
-
let
|
|
1796
|
-
e[28] !== s || e[29] !== A || e[30] !==
|
|
1764
|
+
let T;
|
|
1765
|
+
e[28] !== s || e[29] !== A || e[30] !== S ? (T = /* @__PURE__ */ n("div", { className: "px-4 pb-8", children: /* @__PURE__ */ C("button", { onClick: s, className: `w-full bg-white rounded-2xl p-3 flex items-center gap-3 shadow-lg
|
|
1797
1766
|
transition-transform active:scale-[0.98] hover:shadow-xl`, children: [
|
|
1798
1767
|
A,
|
|
1799
|
-
|
|
1768
|
+
S,
|
|
1800
1769
|
I
|
|
1801
|
-
] }) }), e[28] = s, e[29] = A, e[30] =
|
|
1802
|
-
let
|
|
1803
|
-
e[32] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (
|
|
1804
|
-
let
|
|
1805
|
-
e[33] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (
|
|
1770
|
+
] }) }), e[28] = s, e[29] = A, e[30] = S, e[31] = T) : T = e[31];
|
|
1771
|
+
let D;
|
|
1772
|
+
e[32] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (D = /* @__PURE__ */ n("div", { className: "flex-1" }), e[32] = D) : D = e[32];
|
|
1773
|
+
let j;
|
|
1774
|
+
e[33] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (j = /* @__PURE__ */ n("div", { className: "flex justify-center pb-2", children: /* @__PURE__ */ n("div", { className: "w-32 h-1 rounded-full bg-zinc-600" }) }), e[33] = j) : j = e[33];
|
|
1806
1775
|
let O;
|
|
1807
|
-
return e[34] !==
|
|
1776
|
+
return e[34] !== v || e[35] !== M || e[36] !== T || e[37] !== w ? (O = /* @__PURE__ */ C("div", { className: w, children: [
|
|
1808
1777
|
x,
|
|
1809
1778
|
k,
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
] }), e[34] =
|
|
1817
|
-
}),
|
|
1779
|
+
v,
|
|
1780
|
+
M,
|
|
1781
|
+
_,
|
|
1782
|
+
T,
|
|
1783
|
+
D,
|
|
1784
|
+
j
|
|
1785
|
+
] }), e[34] = v, e[35] = M, e[36] = T, e[37] = w, e[38] = O) : O = e[38], O;
|
|
1786
|
+
}), ke = {
|
|
1818
1787
|
name: "Business",
|
|
1819
1788
|
verified: !1
|
|
1820
|
-
},
|
|
1821
|
-
const e =
|
|
1789
|
+
}, yt = F(function(t) {
|
|
1790
|
+
const e = B(24), {
|
|
1822
1791
|
flow: s,
|
|
1823
1792
|
onUserReply: l,
|
|
1824
|
-
theme:
|
|
1793
|
+
theme: o,
|
|
1825
1794
|
device: g,
|
|
1826
1795
|
businessInfo: r,
|
|
1827
|
-
showSuggestions:
|
|
1796
|
+
showSuggestions: i
|
|
1828
1797
|
} = t;
|
|
1829
1798
|
let a;
|
|
1830
1799
|
e[0] !== s || e[1] !== l ? (a = {
|
|
@@ -1836,40 +1805,40 @@ const $t = F(function(t) {
|
|
|
1836
1805
|
state: f,
|
|
1837
1806
|
handleReply: h,
|
|
1838
1807
|
handleAction: d
|
|
1839
|
-
} =
|
|
1808
|
+
} = He(a), [u, m] = ne(!1);
|
|
1840
1809
|
let p;
|
|
1841
1810
|
e[3] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (p = () => {
|
|
1842
|
-
m(
|
|
1811
|
+
m(wt);
|
|
1843
1812
|
}, e[3] = p) : p = e[3];
|
|
1844
|
-
const b = p, [y,
|
|
1813
|
+
const b = p, [y, w] = ne(null);
|
|
1845
1814
|
let x;
|
|
1846
|
-
e[4] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (x = (
|
|
1847
|
-
|
|
1848
|
-
...
|
|
1815
|
+
e[4] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (x = (S) => {
|
|
1816
|
+
w({
|
|
1817
|
+
...S,
|
|
1849
1818
|
isOpen: !0
|
|
1850
1819
|
});
|
|
1851
1820
|
}, e[4] = x) : x = e[4];
|
|
1852
1821
|
const k = x;
|
|
1853
|
-
let
|
|
1854
|
-
e[5] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (
|
|
1855
|
-
|
|
1856
|
-
}, e[5] =
|
|
1857
|
-
const N =
|
|
1858
|
-
let
|
|
1859
|
-
e[6] !== d || e[7] !== l ? (
|
|
1860
|
-
if (!le(
|
|
1822
|
+
let v;
|
|
1823
|
+
e[5] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (v = () => {
|
|
1824
|
+
w(null);
|
|
1825
|
+
}, e[5] = v) : v = e[5];
|
|
1826
|
+
const N = v;
|
|
1827
|
+
let L;
|
|
1828
|
+
e[6] !== d || e[7] !== l ? (L = (S) => {
|
|
1829
|
+
if (!le(S))
|
|
1861
1830
|
return;
|
|
1862
|
-
const I =
|
|
1831
|
+
const I = Ae(S);
|
|
1863
1832
|
if (I) {
|
|
1864
1833
|
k({
|
|
1865
1834
|
url: I.url,
|
|
1866
1835
|
viewMode: I.webviewViewMode || "TALL",
|
|
1867
1836
|
title: I.description || "",
|
|
1868
|
-
postbackData:
|
|
1837
|
+
postbackData: S.action.postback.data
|
|
1869
1838
|
}), l({
|
|
1870
1839
|
type: "action",
|
|
1871
|
-
postbackData:
|
|
1872
|
-
displayText:
|
|
1840
|
+
postbackData: S.action.postback.data,
|
|
1841
|
+
displayText: S.action.displayText,
|
|
1873
1842
|
timestamp: Date.now(),
|
|
1874
1843
|
actionData: {
|
|
1875
1844
|
type: "webview",
|
|
@@ -1880,64 +1849,64 @@ const $t = F(function(t) {
|
|
|
1880
1849
|
});
|
|
1881
1850
|
return;
|
|
1882
1851
|
}
|
|
1883
|
-
d(
|
|
1884
|
-
}, e[6] = d, e[7] = l, e[8] =
|
|
1885
|
-
const
|
|
1886
|
-
let
|
|
1887
|
-
e[9] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (
|
|
1852
|
+
d(S);
|
|
1853
|
+
}, e[6] = d, e[7] = l, e[8] = L) : L = e[8];
|
|
1854
|
+
const M = L;
|
|
1855
|
+
let _;
|
|
1856
|
+
e[9] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (_ = /* @__PURE__ */ n(mt, {}), e[9] = _) : _ = e[9];
|
|
1888
1857
|
let A;
|
|
1889
|
-
e[10] !== u ? (A = u && /* @__PURE__ */ n(
|
|
1858
|
+
e[10] !== u ? (A = u && /* @__PURE__ */ n(ut, {}), e[10] = u, e[11] = A) : A = e[11];
|
|
1890
1859
|
let z;
|
|
1891
|
-
e[12] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (z = /* @__PURE__ */ n(
|
|
1892
|
-
let
|
|
1893
|
-
return e[13] !== r || e[14] !== g || e[15] !==
|
|
1894
|
-
|
|
1860
|
+
e[12] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (z = /* @__PURE__ */ n(pt, {}), e[12] = z) : z = e[12];
|
|
1861
|
+
let $;
|
|
1862
|
+
return e[13] !== r || e[14] !== g || e[15] !== M || e[16] !== h || e[17] !== u || e[18] !== i || e[19] !== f || e[20] !== A || e[21] !== o || e[22] !== y ? ($ = /* @__PURE__ */ C(Le, { theme: o, device: g, businessInfo: r, state: f, showSuggestions: i, isProfileOpen: u, toggleProfile: b, onReply: h, onAction: M, webView: y, openWebView: k, closeWebView: N, children: [
|
|
1863
|
+
_,
|
|
1895
1864
|
A,
|
|
1896
1865
|
z
|
|
1897
|
-
] }), e[13] = r, e[14] = g, e[15] =
|
|
1898
|
-
}),
|
|
1899
|
-
const e =
|
|
1866
|
+
] }), e[13] = r, e[14] = g, e[15] = M, e[16] = h, e[17] = u, e[18] = i, e[19] = f, e[20] = A, e[21] = o, e[22] = y, e[23] = $) : $ = e[23], $;
|
|
1867
|
+
}), zt = F(function(t) {
|
|
1868
|
+
const e = B(84), {
|
|
1900
1869
|
messages: s,
|
|
1901
1870
|
jsonUrl: l,
|
|
1902
|
-
onUserReply:
|
|
1871
|
+
onUserReply: o,
|
|
1903
1872
|
theme: g,
|
|
1904
1873
|
device: r,
|
|
1905
|
-
businessInfo:
|
|
1874
|
+
businessInfo: i,
|
|
1906
1875
|
className: a,
|
|
1907
1876
|
width: f,
|
|
1908
1877
|
height: h,
|
|
1909
1878
|
showSuggestions: d,
|
|
1910
1879
|
showLockScreen: u
|
|
1911
|
-
} = t, m = g === void 0 ? "light" : g, p = r === void 0 ? "android" : r, b = a === void 0 ? "" : a, y = f === void 0 ? 375 : f,
|
|
1912
|
-
let
|
|
1913
|
-
e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (
|
|
1880
|
+
} = t, m = g === void 0 ? "light" : g, p = r === void 0 ? "android" : r, b = a === void 0 ? "" : a, y = f === void 0 ? 375 : f, w = h === void 0 ? 667 : h, x = d === void 0 ? !0 : d, k = u === void 0 ? !1 : u, [v, N] = ne(k);
|
|
1881
|
+
let L;
|
|
1882
|
+
e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (L = () => {
|
|
1914
1883
|
N(!1);
|
|
1915
|
-
}, e[0] =
|
|
1916
|
-
const
|
|
1917
|
-
data:
|
|
1884
|
+
}, e[0] = L) : L = e[0];
|
|
1885
|
+
const M = L, {
|
|
1886
|
+
data: _,
|
|
1918
1887
|
isLoading: A,
|
|
1919
1888
|
error: z
|
|
1920
|
-
} =
|
|
1921
|
-
let
|
|
1922
|
-
e[1] !==
|
|
1923
|
-
const I =
|
|
1924
|
-
let
|
|
1925
|
-
e[3] !==
|
|
1926
|
-
|
|
1927
|
-
...
|
|
1928
|
-
name:
|
|
1929
|
-
}), e[3] =
|
|
1930
|
-
let
|
|
1931
|
-
e[6] !==
|
|
1932
|
-
const
|
|
1889
|
+
} = Oe(l), $ = l ? _ : s;
|
|
1890
|
+
let S;
|
|
1891
|
+
e[1] !== $ ? (S = $ ? We($) : !1, e[1] = $, e[2] = S) : S = e[2];
|
|
1892
|
+
const I = S;
|
|
1893
|
+
let T;
|
|
1894
|
+
e[3] !== i || e[4] !== $?.name ? (T = () => ({
|
|
1895
|
+
...ke,
|
|
1896
|
+
...i,
|
|
1897
|
+
name: i?.name || $?.name || ke.name
|
|
1898
|
+
}), e[3] = i, e[4] = $?.name, e[5] = T) : T = e[5], $?.name;
|
|
1899
|
+
let D;
|
|
1900
|
+
e[6] !== T ? (D = T(), e[6] = T, e[7] = D) : D = e[7];
|
|
1901
|
+
const j = D;
|
|
1933
1902
|
let O;
|
|
1934
|
-
e[8] !==
|
|
1935
|
-
const
|
|
1903
|
+
e[8] !== $ || e[9] !== I ? (O = $ && I ? Ve($) : "New message", e[8] = $, e[9] = I, e[10] = O) : O = e[10];
|
|
1904
|
+
const J = O, V = m === "dark";
|
|
1936
1905
|
let Q;
|
|
1937
|
-
e[11] !== b || e[12] !== p || e[13] !==
|
|
1906
|
+
e[11] !== b || e[12] !== p || e[13] !== w || e[14] !== V || e[15] !== m || e[16] !== y ? (Q = (R) => {
|
|
1938
1907
|
const {
|
|
1939
1908
|
children: G
|
|
1940
|
-
} =
|
|
1909
|
+
} = R;
|
|
1941
1910
|
return /* @__PURE__ */ n("div", { className: `
|
|
1942
1911
|
rcs-emulator relative overflow-hidden
|
|
1943
1912
|
rounded-2xl shadow-2xl
|
|
@@ -1945,12 +1914,12 @@ const $t = F(function(t) {
|
|
|
1945
1914
|
${b}
|
|
1946
1915
|
`, style: {
|
|
1947
1916
|
width: y,
|
|
1948
|
-
height:
|
|
1917
|
+
height: w
|
|
1949
1918
|
}, role: "application", "aria-label": "RCS Message Emulator", "data-theme": m, "data-device": p, children: G });
|
|
1950
|
-
}, e[11] = b, e[12] = p, e[13] =
|
|
1919
|
+
}, e[11] = b, e[12] = p, e[13] = w, e[14] = V, e[15] = m, e[16] = y, e[17] = Q) : Q = e[17];
|
|
1951
1920
|
const P = Q;
|
|
1952
1921
|
if (l && A) {
|
|
1953
|
-
const
|
|
1922
|
+
const R = `
|
|
1954
1923
|
w-10 h-10 border-3 border-t-transparent rounded-full animate-spin mb-4
|
|
1955
1924
|
${V ? "border-zinc-600" : "border-gray-300"}
|
|
1956
1925
|
`;
|
|
@@ -1959,10 +1928,10 @@ const $t = F(function(t) {
|
|
|
1959
1928
|
borderTopColor: "transparent"
|
|
1960
1929
|
}, e[18] = G) : G = e[18];
|
|
1961
1930
|
let E;
|
|
1962
|
-
e[19] !==
|
|
1963
|
-
const
|
|
1931
|
+
e[19] !== R ? (E = /* @__PURE__ */ n("div", { className: R, style: G }), e[19] = R, e[20] = E) : E = e[20];
|
|
1932
|
+
const q = `text-sm ${V ? "text-zinc-400" : "text-gray-500"}`;
|
|
1964
1933
|
let W;
|
|
1965
|
-
e[21] !==
|
|
1934
|
+
e[21] !== q ? (W = /* @__PURE__ */ n("p", { className: q, children: "Loading conversation..." }), e[21] = q, e[22] = W) : W = e[22];
|
|
1966
1935
|
let U;
|
|
1967
1936
|
e[23] !== E || e[24] !== W ? (U = /* @__PURE__ */ C("div", { className: "flex flex-col items-center justify-center h-full p-6", children: [
|
|
1968
1937
|
E,
|
|
@@ -1972,20 +1941,20 @@ const $t = F(function(t) {
|
|
|
1972
1941
|
return e[26] !== P || e[27] !== U ? (H = /* @__PURE__ */ n(P, { children: U }), e[26] = P, e[27] = U, e[28] = H) : H = e[28], H;
|
|
1973
1942
|
}
|
|
1974
1943
|
if (l && z) {
|
|
1975
|
-
let
|
|
1976
|
-
e[29] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (
|
|
1944
|
+
let R;
|
|
1945
|
+
e[29] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (R = /* @__PURE__ */ n("svg", { className: "w-12 h-12 mx-auto mb-4 text-red-500", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ n("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" }) }), e[29] = R) : R = e[29];
|
|
1977
1946
|
const G = `text-lg font-medium mb-2 ${V ? "text-white" : "text-gray-900"}`;
|
|
1978
1947
|
let E;
|
|
1979
1948
|
e[30] !== G ? (E = /* @__PURE__ */ n("h3", { className: G, children: "Failed to Load" }), e[30] = G, e[31] = E) : E = e[31];
|
|
1980
|
-
const
|
|
1949
|
+
const q = `text-sm ${V ? "text-zinc-400" : "text-gray-500"}`;
|
|
1981
1950
|
let W;
|
|
1982
|
-
e[32] !== z || e[33] !==
|
|
1951
|
+
e[32] !== z || e[33] !== q ? (W = /* @__PURE__ */ n("p", { className: q, children: z }), e[32] = z, e[33] = q, e[34] = W) : W = e[34];
|
|
1983
1952
|
const U = `text-xs mt-2 break-all max-w-full ${V ? "text-zinc-500" : "text-gray-400"}`;
|
|
1984
1953
|
let H;
|
|
1985
1954
|
e[35] !== l || e[36] !== U ? (H = /* @__PURE__ */ n("p", { className: U, children: l }), e[35] = l, e[36] = U, e[37] = H) : H = e[37];
|
|
1986
1955
|
let X;
|
|
1987
1956
|
e[38] !== E || e[39] !== W || e[40] !== H ? (X = /* @__PURE__ */ C("div", { className: "flex flex-col items-center justify-center h-full p-6 text-center", children: [
|
|
1988
|
-
|
|
1957
|
+
R,
|
|
1989
1958
|
E,
|
|
1990
1959
|
W,
|
|
1991
1960
|
H
|
|
@@ -1993,15 +1962,15 @@ const $t = F(function(t) {
|
|
|
1993
1962
|
let Z;
|
|
1994
1963
|
return e[42] !== P || e[43] !== X ? (Z = /* @__PURE__ */ n(P, { children: X }), e[42] = P, e[43] = X, e[44] = Z) : Z = e[44], Z;
|
|
1995
1964
|
}
|
|
1996
|
-
if (
|
|
1997
|
-
const
|
|
1965
|
+
if (!$) {
|
|
1966
|
+
const R = `w-12 h-12 mx-auto mb-4 ${V ? "text-zinc-600" : "text-gray-300"}`;
|
|
1998
1967
|
let G;
|
|
1999
1968
|
e[45] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (G = /* @__PURE__ */ n("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, 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" }), e[45] = G) : G = e[45];
|
|
2000
1969
|
let E;
|
|
2001
|
-
e[46] !==
|
|
2002
|
-
const
|
|
1970
|
+
e[46] !== R ? (E = /* @__PURE__ */ n("svg", { className: R, fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: G }), e[46] = R, e[47] = E) : E = e[47];
|
|
1971
|
+
const q = `text-lg font-medium mb-2 ${V ? "text-white" : "text-gray-900"}`;
|
|
2003
1972
|
let W;
|
|
2004
|
-
e[48] !==
|
|
1973
|
+
e[48] !== q ? (W = /* @__PURE__ */ n("h3", { className: q, children: "No Conversation Data" }), e[48] = q, e[49] = W) : W = e[49];
|
|
2005
1974
|
const U = `text-sm ${V ? "text-zinc-400" : "text-gray-500"}`;
|
|
2006
1975
|
let H;
|
|
2007
1976
|
e[50] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (H = /* @__PURE__ */ n("code", { className: "px-1 py-0.5 rounded bg-gray-100 dark:bg-zinc-800", children: "messages" }), e[50] = H) : H = e[50];
|
|
@@ -2029,17 +1998,17 @@ const $t = F(function(t) {
|
|
|
2029
1998
|
return e[58] !== P || e[59] !== te ? (se = /* @__PURE__ */ n(P, { children: te }), e[58] = P, e[59] = te, e[60] = se) : se = e[60], se;
|
|
2030
1999
|
}
|
|
2031
2000
|
if (!I) {
|
|
2032
|
-
let
|
|
2033
|
-
e[61] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (
|
|
2001
|
+
let R;
|
|
2002
|
+
e[61] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (R = /* @__PURE__ */ n("svg", { className: "w-12 h-12 mx-auto mb-4 text-amber-500", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ n("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z" }) }), e[61] = R) : R = e[61];
|
|
2034
2003
|
const G = `text-lg font-medium mb-2 ${V ? "text-white" : "text-gray-900"}`;
|
|
2035
2004
|
let E;
|
|
2036
2005
|
e[62] !== G ? (E = /* @__PURE__ */ n("h3", { className: G, children: "Invalid RBM JSON" }), e[62] = G, e[63] = E) : E = e[63];
|
|
2037
|
-
const
|
|
2006
|
+
const q = `text-sm ${V ? "text-zinc-400" : "text-gray-500"}`;
|
|
2038
2007
|
let W;
|
|
2039
|
-
e[64] !==
|
|
2008
|
+
e[64] !== q ? (W = /* @__PURE__ */ n("p", { className: q, children: "The conversation flow structure is not valid" }), e[64] = q, e[65] = W) : W = e[65];
|
|
2040
2009
|
let U;
|
|
2041
2010
|
e[66] !== E || e[67] !== W ? (U = /* @__PURE__ */ C("div", { className: "flex flex-col items-center justify-center h-full p-6 text-center", children: [
|
|
2042
|
-
|
|
2011
|
+
R,
|
|
2043
2012
|
E,
|
|
2044
2013
|
W
|
|
2045
2014
|
] }), e[66] = E, e[67] = W, e[68] = U) : U = e[68];
|
|
@@ -2047,38 +2016,38 @@ const $t = F(function(t) {
|
|
|
2047
2016
|
return e[69] !== P || e[70] !== U ? (H = /* @__PURE__ */ n(P, { children: U }), e[69] = P, e[70] = U, e[71] = H) : H = e[71], H;
|
|
2048
2017
|
}
|
|
2049
2018
|
let Y;
|
|
2050
|
-
e[72] !== p || e[73] !==
|
|
2019
|
+
e[72] !== p || e[73] !== $ || e[74] !== v || e[75] !== j || e[76] !== J || e[77] !== o || e[78] !== x || e[79] !== m ? (Y = v ? /* @__PURE__ */ n(Le, { theme: m, device: p, businessInfo: j, state: {
|
|
2051
2020
|
currentMessageId: null,
|
|
2052
2021
|
chatHistory: [],
|
|
2053
2022
|
isTyping: !1,
|
|
2054
2023
|
error: null
|
|
2055
|
-
}, showSuggestions: !1, isProfileOpen: !1, toggleProfile:
|
|
2024
|
+
}, showSuggestions: !1, isProfileOpen: !1, toggleProfile: vt, onReply: kt, onAction: Nt, webView: null, openWebView: Ct, closeWebView: Lt, children: /* @__PURE__ */ n(xt, { onUnlock: M, messagePreview: J }) }) : /* @__PURE__ */ n(yt, { flow: $, onUserReply: o, theme: m, device: p, businessInfo: j, showSuggestions: x }), e[72] = p, e[73] = $, e[74] = v, e[75] = j, e[76] = J, e[77] = o, e[78] = x, e[79] = m, e[80] = Y) : Y = e[80];
|
|
2056
2025
|
let ee;
|
|
2057
2026
|
return e[81] !== P || e[82] !== Y ? (ee = /* @__PURE__ */ n(P, { children: Y }), e[81] = P, e[82] = Y, e[83] = ee) : ee = e[83], ee;
|
|
2058
2027
|
});
|
|
2059
|
-
function
|
|
2028
|
+
function wt(c) {
|
|
2060
2029
|
return !c;
|
|
2061
2030
|
}
|
|
2062
|
-
function
|
|
2031
|
+
function vt() {
|
|
2063
2032
|
}
|
|
2064
|
-
function
|
|
2033
|
+
function kt() {
|
|
2065
2034
|
}
|
|
2066
|
-
function
|
|
2035
|
+
function Nt() {
|
|
2067
2036
|
}
|
|
2068
|
-
function
|
|
2037
|
+
function Ct() {
|
|
2069
2038
|
}
|
|
2070
|
-
function
|
|
2039
|
+
function Lt() {
|
|
2071
2040
|
}
|
|
2072
2041
|
export {
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
|
|
2077
|
-
|
|
2042
|
+
zt as RcsEmulator,
|
|
2043
|
+
pt as WebViewRenderer,
|
|
2044
|
+
zt as default,
|
|
2045
|
+
Ve as getFirstMessagePreview,
|
|
2046
|
+
Ae as getWebViewConfig,
|
|
2078
2047
|
le as isSuggestedAction,
|
|
2079
|
-
|
|
2080
|
-
|
|
2081
|
-
|
|
2082
|
-
|
|
2048
|
+
Ne as isSuggestedReply,
|
|
2049
|
+
St as isWebViewAction,
|
|
2050
|
+
Oe as useJsonFetch,
|
|
2051
|
+
We as validateConversationFlow
|
|
2083
2052
|
};
|
|
2084
2053
|
//# sourceMappingURL=rcs-emulator.es.js.map
|