@eka-care/medassist-widget 0.1.81 → 0.1.82

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.
@@ -0,0 +1,1234 @@
1
+ import { c as ie, D as le, u as e, b as p, C as ce, B as w, N as pe, A as V, d as J, T as B, y as A, q as k, a as j, S as oe, k as F } from "./medassist-widget-main-CvBx4wsw.js";
2
+ import { F as Q } from "./medassist-widget-FilePreview-Dof_VuUv.js";
3
+ import { M as he } from "./medassist-widget-message-square-plus-D5bJkQm2.js";
4
+ import { M as ee } from "./medassist-widget-mic-uIy1yldF.js";
5
+ const ue = [
6
+ ["path", { d: "M5 12h14", key: "1ays0h" }],
7
+ ["path", { d: "M12 5v14", key: "s699le" }]
8
+ ], te = ie("plus", ue);
9
+ const fe = [
10
+ ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }]
11
+ ], re = ie("square", fe), W = le(({ className: r, ...a }, c) => /* @__PURE__ */ e(
12
+ "textarea",
13
+ {
14
+ className: p(
15
+ "flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-base shadow-sm focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
16
+ r
17
+ ),
18
+ ref: c,
19
+ ...a
20
+ }
21
+ ));
22
+ W.displayName = "Textarea";
23
+ const K = ({ className: r }) => /* @__PURE__ */ e("svg", { width: "17", height: "16", viewBox: "0 0 17 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", className: r, children: /* @__PURE__ */ e("path", { d: "M1.46875 0.09375L16.3125 6.9375C16.75 7.125 17 7.53125 17 8C17 8.46875 16.75 8.875 16.3125 9.0625L1.46875 15.9062C1.3125 15.9688 1.1875 16 1.03125 16C0.46875 16 0 15.5312 0 14.9688C0 14.8125 0.03125 14.6875 0.09375 14.5625L2.34375 9.5C2.5 9.15625 2.8125 8.9375 3.15625 8.90625L8.0625 8.46875C8.3125 8.46875 8.5 8.25 8.5 8C8.5 7.75 8.3125 7.5625 8.0625 7.53125L3.15625 7.09375C2.8125 7.0625 2.5 6.84375 2.34375 6.5L0.09375 1.4375C0.03125 1.3125 0 1.1875 0 1.03125C0 0.46875 0.46875 0 1.03125 0C1.1875 0 1.3125 0.03125 1.46875 0.09375Z", fill: "currentColor" }) }), Y = le(
24
+ ({ className: r, type: a, ...c }, d) => {
25
+ const h = r && typeof r == "string" && r.includes("placeholder:");
26
+ return /* @__PURE__ */ e(
27
+ "input",
28
+ {
29
+ type: a,
30
+ className: p(
31
+ "flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
32
+ // Only apply default placeholder color if not overridden
33
+ !h && "placeholder:text-muted-foreground",
34
+ r
35
+ ),
36
+ ref: d,
37
+ ...c
38
+ }
39
+ );
40
+ }
41
+ );
42
+ Y.displayName = "Input";
43
+ const me = () => /* @__PURE__ */ e(
44
+ "svg",
45
+ {
46
+ width: "16",
47
+ height: "16",
48
+ viewBox: "0 0 16 16",
49
+ fill: "none",
50
+ xmlns: "http://www.w3.org/2000/svg",
51
+ style: { display: "block" },
52
+ "aria-hidden": "true",
53
+ children: [
54
+ /* @__PURE__ */ e("g", { clipPath: "url(#circleClip)", children: /* @__PURE__ */ e("g", { children: [
55
+ /* @__PURE__ */ e(
56
+ "path",
57
+ {
58
+ d: "M15.9766 0.0234375V5.31055H0.0234375V0.0234375H15.9766Z",
59
+ fill: "#FF9933",
60
+ stroke: "#1A1A1A",
61
+ "stroke-width": "0.046875"
62
+ }
63
+ ),
64
+ /* @__PURE__ */ e(
65
+ "path",
66
+ {
67
+ d: "M15.9766 5.35779V10.642H0.0234375V5.35779H15.9766Z",
68
+ fill: "white",
69
+ stroke: "#1A1A1A",
70
+ "stroke-width": "0.046875"
71
+ }
72
+ ),
73
+ /* @__PURE__ */ e("path", { d: "M0 10.6656H16V16H0V10.6656Z", fill: "#128807" }),
74
+ /* @__PURE__ */ e(
75
+ "path",
76
+ {
77
+ d: "M8.00101 10.1334C9.17921 10.1334 10.1343 9.17824 10.1343 8.00003C10.1343 6.82182 9.17921 5.8667 8.00101 5.8667C6.8228 5.8667 5.86768 6.82182 5.86768 8.00003C5.86768 9.17824 6.8228 10.1334 8.00101 10.1334Z",
78
+ fill: "#000088"
79
+ }
80
+ ),
81
+ /* @__PURE__ */ e(
82
+ "path",
83
+ {
84
+ d: "M8.00143 9.86663C9.03236 9.86663 9.8681 9.0309 9.8681 7.99997C9.8681 6.96904 9.03236 6.1333 8.00143 6.1333C6.9705 6.1333 6.13477 6.96904 6.13477 7.99997C6.13477 9.0309 6.9705 9.86663 8.00143 9.86663Z",
85
+ fill: "white"
86
+ }
87
+ ),
88
+ /* @__PURE__ */ e(
89
+ "path",
90
+ {
91
+ d: "M8.00126 8.37325C8.20745 8.37325 8.3746 8.20611 8.3746 7.99992C8.3746 7.79373 8.20745 7.62659 8.00126 7.62659C7.79508 7.62659 7.62793 7.79373 7.62793 7.99992C7.62793 8.20611 7.79508 8.37325 8.00126 8.37325Z",
92
+ fill: "#000088"
93
+ }
94
+ ),
95
+ /* @__PURE__ */ e(
96
+ "path",
97
+ {
98
+ d: "M9.84014 8.33936C9.8927 8.34628 9.94093 8.30928 9.94785 8.25671C9.95477 8.20415 9.91776 8.15593 9.8652 8.14901C9.81263 8.14208 9.76441 8.17909 9.75749 8.23165C9.75057 8.28422 9.78757 8.33244 9.84014 8.33936Z",
99
+ fill: "#000088"
100
+ }
101
+ ),
102
+ /* @__PURE__ */ e(
103
+ "path",
104
+ {
105
+ d: "M8.00199 9.86647L8.06599 8.74647L8.00199 8.21313L7.93799 8.74647L8.00199 9.86647Z",
106
+ fill: "#000088"
107
+ }
108
+ ),
109
+ /* @__PURE__ */ e(
110
+ "path",
111
+ {
112
+ d: "M9.69246 8.8036C9.74145 8.82389 9.7976 8.80063 9.81789 8.75165C9.83818 8.70266 9.81492 8.6465 9.76594 8.62622C9.71696 8.60593 9.6608 8.62919 9.64051 8.67817C9.62022 8.72715 9.64348 8.78331 9.69246 8.8036Z",
113
+ fill: "#000088"
114
+ }
115
+ ),
116
+ /* @__PURE__ */ e(
117
+ "path",
118
+ {
119
+ d: "M7.52209 9.80289L7.87379 8.73762L7.95 8.2059L7.75015 8.70449L7.52209 9.80289Z",
120
+ fill: "#000088"
121
+ }
122
+ ),
123
+ /* @__PURE__ */ e(
124
+ "path",
125
+ {
126
+ d: "M9.4251 9.21296C9.46716 9.24524 9.52743 9.2373 9.5597 9.19524C9.59198 9.15318 9.58405 9.09291 9.54198 9.06064C9.49992 9.02836 9.43966 9.0363 9.40738 9.07836C9.3751 9.12042 9.38304 9.18069 9.4251 9.21296Z",
127
+ fill: "#000088"
128
+ }
129
+ ),
130
+ /* @__PURE__ */ e(
131
+ "path",
132
+ {
133
+ d: "M7.06958 9.61654L7.68501 8.67859L7.89625 8.18471L7.57415 8.61459L7.06958 9.61654Z",
134
+ fill: "#000088"
135
+ }
136
+ ),
137
+ /* @__PURE__ */ e(
138
+ "path",
139
+ {
140
+ d: "M9.06041 9.53972C9.09269 9.58179 9.15295 9.58972 9.19502 9.55744C9.23708 9.52517 9.24501 9.4649 9.21274 9.42284C9.18046 9.38078 9.1202 9.37284 9.07814 9.40512C9.03607 9.4374 9.02814 9.49766 9.06041 9.53972Z",
141
+ fill: "#000088"
142
+ }
143
+ ),
144
+ /* @__PURE__ */ e(
145
+ "path",
146
+ {
147
+ d: "M6.68086 9.31981L7.51807 8.5731L7.84994 8.15072L7.42756 8.48259L6.68086 9.31981Z",
148
+ fill: "#000088"
149
+ }
150
+ ),
151
+ /* @__PURE__ */ e(
152
+ "path",
153
+ {
154
+ d: "M8.6284 9.76153C8.64869 9.81052 8.70484 9.83378 8.75383 9.81349C8.80281 9.7932 8.82607 9.73704 8.80578 9.68806C8.78549 9.63907 8.72933 9.61581 8.68035 9.6361C8.63137 9.65639 8.60811 9.71255 8.6284 9.76153Z",
155
+ fill: "#000088"
156
+ }
157
+ ),
158
+ /* @__PURE__ */ e(
159
+ "path",
160
+ {
161
+ d: "M6.38679 8.93324L7.38874 8.42867L7.81862 8.10657L7.32474 8.31781L6.38679 8.93324Z",
162
+ fill: "#000088"
163
+ }
164
+ ),
165
+ /* @__PURE__ */ e(
166
+ "path",
167
+ {
168
+ d: "M8.14737 9.86316C8.15429 9.91573 8.20251 9.95273 8.25508 9.94581C8.30764 9.93889 8.34465 9.89066 8.33773 9.8381C8.33081 9.78553 8.28258 9.74853 8.23002 9.75545C8.17745 9.76237 8.14045 9.81059 8.14737 9.86316Z",
169
+ fill: "#000088"
170
+ }
171
+ ),
172
+ /* @__PURE__ */ e(
173
+ "path",
174
+ {
175
+ d: "M6.19642 8.4829L7.29482 8.25484L7.79342 8.05498L7.2617 8.1312L6.19642 8.4829Z",
176
+ fill: "#000088"
177
+ }
178
+ ),
179
+ /* @__PURE__ */ e(
180
+ "path",
181
+ {
182
+ d: "M7.66381 9.83806C7.65689 9.89063 7.69389 9.93885 7.74646 9.94577C7.79903 9.95269 7.84725 9.91569 7.85417 9.86312C7.86109 9.81056 7.82409 9.76233 7.77152 9.75541C7.71895 9.74849 7.67073 9.7855 7.66381 9.83806Z",
183
+ fill: "#000088"
184
+ }
185
+ ),
186
+ /* @__PURE__ */ e(
187
+ "path",
188
+ {
189
+ d: "M6.13671 7.99991L7.25671 8.06391L7.79004 7.99991L7.25671 7.93591L6.13671 7.99991Z",
190
+ fill: "#000088"
191
+ }
192
+ ),
193
+ /* @__PURE__ */ e(
194
+ "path",
195
+ {
196
+ d: "M7.20092 9.68758C7.18063 9.73656 7.20389 9.79272 7.25287 9.81301C7.30185 9.8333 7.35801 9.81004 7.3783 9.76106C7.39859 9.71207 7.37533 9.65592 7.32635 9.63563C7.27736 9.61534 7.22121 9.6386 7.20092 9.68758Z",
197
+ fill: "#000088"
198
+ }
199
+ ),
200
+ /* @__PURE__ */ e(
201
+ "path",
202
+ {
203
+ d: "M6.20138 7.51684L7.26665 7.86854L7.79838 7.94475L7.29978 7.7449L6.20138 7.51684Z",
204
+ fill: "#000088"
205
+ }
206
+ ),
207
+ /* @__PURE__ */ e(
208
+ "path",
209
+ {
210
+ d: "M6.79363 9.42217C6.76135 9.46423 6.76929 9.5245 6.81135 9.55677C6.85341 9.58905 6.91368 9.58112 6.94595 9.53905C6.97823 9.49699 6.9703 9.43673 6.92823 9.40445C6.88617 9.37217 6.82591 9.38011 6.79363 9.42217Z",
211
+ fill: "#000088"
212
+ }
213
+ ),
214
+ /* @__PURE__ */ e(
215
+ "path",
216
+ {
217
+ d: "M6.39018 7.06677L7.32812 7.6822L7.822 7.89344L7.39212 7.57135L6.39018 7.06677Z",
218
+ fill: "#000088"
219
+ }
220
+ ),
221
+ /* @__PURE__ */ e(
222
+ "path",
223
+ {
224
+ d: "M6.46467 9.05968C6.42261 9.09196 6.41467 9.15222 6.44695 9.19428C6.47923 9.23635 6.53949 9.24428 6.58155 9.21201C6.62362 9.17973 6.63155 9.11947 6.59927 9.0774C6.567 9.03534 6.50673 9.02741 6.46467 9.05968Z",
225
+ fill: "#000088"
226
+ }
227
+ ),
228
+ /* @__PURE__ */ e(
229
+ "path",
230
+ {
231
+ d: "M6.68459 6.68013L7.43129 7.51734L7.85367 7.84921L7.5218 7.42683L6.68459 6.68013Z",
232
+ fill: "#000088"
233
+ }
234
+ ),
235
+ /* @__PURE__ */ e(
236
+ "path",
237
+ {
238
+ d: "M6.24115 8.6251C6.19217 8.64539 6.16891 8.70155 6.1892 8.75053C6.20949 8.79951 6.26564 8.82277 6.31463 8.80248C6.36361 8.7822 6.38687 8.72604 6.36658 8.67705C6.34629 8.62807 6.29014 8.60481 6.24115 8.6251Z",
239
+ fill: "#000088"
240
+ }
241
+ ),
242
+ /* @__PURE__ */ e(
243
+ "path",
244
+ {
245
+ d: "M7.06908 6.38338L7.57365 7.38532L7.89575 7.8152L7.68451 7.32132L7.06908 6.38338Z",
246
+ fill: "#000088"
247
+ }
248
+ ),
249
+ /* @__PURE__ */ e(
250
+ "path",
251
+ {
252
+ d: "M6.14294 8.14786C6.09038 8.15478 6.05338 8.203 6.0603 8.25557C6.06722 8.30813 6.11544 8.34513 6.168 8.33821C6.22057 8.33129 6.25757 8.28307 6.25065 8.2305C6.24373 8.17794 6.19551 8.14094 6.14294 8.14786Z",
253
+ fill: "#000088"
254
+ }
255
+ ),
256
+ /* @__PURE__ */ e(
257
+ "path",
258
+ {
259
+ d: "M7.52345 6.19703L7.75151 7.29543L7.95136 7.79403L7.87515 7.26231L7.52345 6.19703Z",
260
+ fill: "#000088"
261
+ }
262
+ ),
263
+ /* @__PURE__ */ e(
264
+ "path",
265
+ {
266
+ d: "M6.17061 7.66052C6.11804 7.6536 6.06982 7.6906 6.0629 7.74316C6.05598 7.79573 6.09298 7.84395 6.14554 7.85087C6.19811 7.85779 6.24633 7.82079 6.25325 7.76822C6.26017 7.71566 6.22317 7.66744 6.17061 7.66052Z",
267
+ fill: "#000088"
268
+ }
269
+ ),
270
+ /* @__PURE__ */ e(
271
+ "path",
272
+ {
273
+ d: "M8.00875 6.13341L7.94475 7.25341L8.00875 7.78674L8.07275 7.25341L8.00875 6.13341Z",
274
+ fill: "#000088"
275
+ }
276
+ ),
277
+ /* @__PURE__ */ e(
278
+ "path",
279
+ {
280
+ d: "M6.32316 7.19628C6.27418 7.17599 6.21802 7.19925 6.19773 7.24823C6.17744 7.29722 6.2007 7.35337 6.24969 7.37366C6.29867 7.39395 6.35483 7.37069 6.37512 7.32171C6.39541 7.27272 6.37215 7.21657 6.32316 7.19628Z",
281
+ fill: "#000088"
282
+ }
283
+ ),
284
+ /* @__PURE__ */ e(
285
+ "path",
286
+ {
287
+ d: "M8.49354 6.19699L8.14184 7.26226L8.06562 7.79398L8.26548 7.29539L8.49354 6.19699Z",
288
+ fill: "#000088"
289
+ }
290
+ ),
291
+ /* @__PURE__ */ e(
292
+ "path",
293
+ {
294
+ d: "M6.58174 6.78692C6.53967 6.75464 6.47941 6.76257 6.44713 6.80464C6.41486 6.8467 6.42279 6.90696 6.46485 6.93924C6.50692 6.97152 6.56718 6.96358 6.59946 6.92152C6.63173 6.87946 6.6238 6.81919 6.58174 6.78692Z",
295
+ fill: "#000088"
296
+ }
297
+ ),
298
+ /* @__PURE__ */ e(
299
+ "path",
300
+ {
301
+ d: "M8.93726 6.38334L8.32183 7.32129L8.11059 7.81517L8.43268 7.38529L8.93726 6.38334Z",
302
+ fill: "#000088"
303
+ }
304
+ ),
305
+ /* @__PURE__ */ e(
306
+ "path",
307
+ {
308
+ d: "M6.94642 6.46015C6.91415 6.41809 6.85388 6.41016 6.81182 6.44243C6.76976 6.47471 6.76182 6.53497 6.7941 6.57704C6.82637 6.6191 6.88664 6.62703 6.9287 6.59476C6.97076 6.56248 6.9787 6.50222 6.94642 6.46015Z",
309
+ fill: "#000088"
310
+ }
311
+ ),
312
+ /* @__PURE__ */ e(
313
+ "path",
314
+ {
315
+ d: "M9.32598 6.68007L8.48876 7.42678L8.15689 7.84915L8.57927 7.51729L9.32598 6.68007Z",
316
+ fill: "#000088"
317
+ }
318
+ ),
319
+ /* @__PURE__ */ e(
320
+ "path",
321
+ {
322
+ d: "M7.37649 6.23847C7.3562 6.18948 7.30004 6.16622 7.25106 6.18651C7.20207 6.2068 7.17881 6.26296 7.1991 6.31194C7.21939 6.36093 7.27555 6.38419 7.32453 6.3639C7.37352 6.34361 7.39678 6.28745 7.37649 6.23847Z",
323
+ fill: "#000088"
324
+ }
325
+ ),
326
+ /* @__PURE__ */ e(
327
+ "path",
328
+ {
329
+ d: "M9.61809 7.06676L8.61614 7.57133L8.18626 7.89343L8.68014 7.68219L9.61809 7.06676Z",
330
+ fill: "#000088"
331
+ }
332
+ ),
333
+ /* @__PURE__ */ e(
334
+ "path",
335
+ {
336
+ d: "M7.85751 6.13684C7.85059 6.08427 7.80237 6.04727 7.74981 6.05419C7.69724 6.06111 7.66024 6.10934 7.66716 6.1619C7.67408 6.21447 7.7223 6.25147 7.77487 6.24455C7.82743 6.23763 7.86443 6.18941 7.85751 6.13684Z",
337
+ fill: "#000088"
338
+ }
339
+ ),
340
+ /* @__PURE__ */ e(
341
+ "path",
342
+ {
343
+ d: "M9.80846 7.5171L8.71006 7.74516L8.21146 7.94502L8.74319 7.8688L9.80846 7.5171Z",
344
+ fill: "#000088"
345
+ }
346
+ ),
347
+ /* @__PURE__ */ e(
348
+ "path",
349
+ {
350
+ d: "M8.34302 6.16194C8.34994 6.10937 8.31294 6.06115 8.26038 6.05423C8.20781 6.04731 8.15959 6.08431 8.15267 6.13688C8.14575 6.18944 8.18275 6.23767 8.23532 6.24459C8.28788 6.25151 8.3361 6.2145 8.34302 6.16194Z",
351
+ fill: "#000088"
352
+ }
353
+ ),
354
+ /* @__PURE__ */ e(
355
+ "path",
356
+ {
357
+ d: "M9.87013 8.00009L8.75013 7.93609L8.2168 8.00009L8.75013 8.06409L9.87013 8.00009Z",
358
+ fill: "#000088"
359
+ }
360
+ ),
361
+ /* @__PURE__ */ e(
362
+ "path",
363
+ {
364
+ d: "M8.80592 6.31242C8.82621 6.26344 8.80295 6.20728 8.75396 6.18699C8.70498 6.1667 8.64882 6.18996 8.62853 6.23894C8.60824 6.28793 8.63151 6.34408 8.68049 6.36437C8.72947 6.38466 8.78563 6.3614 8.80592 6.31242Z",
365
+ fill: "#000088"
366
+ }
367
+ ),
368
+ /* @__PURE__ */ e(
369
+ "path",
370
+ {
371
+ d: "M9.80545 8.48316L8.74018 8.13146L8.20846 8.05525L8.70705 8.2551L9.80545 8.48316Z",
372
+ fill: "#000088"
373
+ }
374
+ ),
375
+ /* @__PURE__ */ e(
376
+ "path",
377
+ {
378
+ d: "M9.21614 6.57795C9.24841 6.53589 9.24048 6.47562 9.19842 6.44335C9.15635 6.41107 9.09609 6.41901 9.06381 6.46107C9.03154 6.50313 9.03947 6.5634 9.08153 6.59567C9.1236 6.62795 9.18386 6.62001 9.21614 6.57795Z",
379
+ fill: "#000088"
380
+ }
381
+ ),
382
+ /* @__PURE__ */ e(
383
+ "path",
384
+ {
385
+ d: "M9.61959 8.93335L8.68164 8.31792L8.18776 8.10668L8.61764 8.42878L9.61959 8.93335Z",
386
+ fill: "#000088"
387
+ }
388
+ ),
389
+ /* @__PURE__ */ e(
390
+ "path",
391
+ {
392
+ d: "M9.53875 6.94044C9.58081 6.90816 9.58874 6.8479 9.55647 6.80584C9.52419 6.76377 9.46393 6.75584 9.42186 6.78812C9.3798 6.82039 9.37187 6.88066 9.40414 6.92272C9.43642 6.96478 9.49668 6.97272 9.53875 6.94044Z",
393
+ fill: "#000088"
394
+ }
395
+ ),
396
+ /* @__PURE__ */ e(
397
+ "path",
398
+ {
399
+ d: "M9.31883 9.31999L8.57213 8.48278L8.14975 8.15091L8.48162 8.57329L9.31883 9.31999Z",
400
+ fill: "#000088"
401
+ }
402
+ ),
403
+ /* @__PURE__ */ e(
404
+ "path",
405
+ {
406
+ d: "M9.76715 7.37502C9.81613 7.35473 9.83939 7.29858 9.8191 7.24959C9.79881 7.20061 9.74266 7.17735 9.69367 7.19764C9.64469 7.21793 9.62143 7.27408 9.64172 7.32307C9.66201 7.37205 9.71816 7.39531 9.76715 7.37502Z",
407
+ fill: "#000088"
408
+ }
409
+ ),
410
+ /* @__PURE__ */ e(
411
+ "path",
412
+ {
413
+ d: "M8.93922 9.61662L8.43465 8.61468L8.11255 8.1848L8.3238 8.67868L8.93922 9.61662Z",
414
+ fill: "#000088"
415
+ }
416
+ ),
417
+ /* @__PURE__ */ e(
418
+ "path",
419
+ {
420
+ d: "M9.86682 7.85227C9.91939 7.84534 9.95639 7.79712 9.94947 7.74456C9.94255 7.69199 9.89433 7.65499 9.84176 7.66191C9.78919 7.66883 9.75219 7.71705 9.75911 7.76962C9.76603 7.82218 9.81426 7.85919 9.86682 7.85227Z",
421
+ fill: "#000088"
422
+ }
423
+ ),
424
+ /* @__PURE__ */ e(
425
+ "path",
426
+ {
427
+ d: "M8.48631 9.80309L8.25826 8.70469L8.0584 8.20609L8.13462 8.73782L8.48631 9.80309Z",
428
+ fill: "#000088"
429
+ }
430
+ )
431
+ ] }) }),
432
+ /* @__PURE__ */ e("defs", { children: /* @__PURE__ */ e("clipPath", { id: "circleClip", children: /* @__PURE__ */ e("circle", { cx: "8", cy: "8", r: "8" }) }) })
433
+ ]
434
+ }
435
+ ), ge = "+91";
436
+ function Ce(r) {
437
+ const a = r.replace(/\D/g, ""), c = a.slice(0, 5), d = a.slice(5, 10);
438
+ return d ? `${c} ${d}` : c;
439
+ }
440
+ function be({
441
+ value: r,
442
+ onChange: a,
443
+ onKeyDown: c,
444
+ // placeholder,
445
+ disabled: d,
446
+ theme: h,
447
+ isMobile: g,
448
+ maxLength: o,
449
+ isMobileValid: n,
450
+ onSend: f
451
+ }) {
452
+ return /* @__PURE__ */ e("div", { className: "px-2 pt-3 pb-2 space-y-2 w-full", children: [
453
+ /* @__PURE__ */ e("p", { className: "px-1 text-xs font-semibold tracking-wide text-foreground uppercase", children: "Enter your mobile number" }),
454
+ /* @__PURE__ */ e("div", { className: "flex items-center gap-2 w-full", children: [
455
+ /* @__PURE__ */ e(
456
+ "div",
457
+ {
458
+ className: p(
459
+ "inline-flex items-center gap-2 rounded-full px-3 shrink-0 py-2 min-h-[56px]",
460
+ d && "opacity-60",
461
+ h?.textColor === "white" ? "bg-white-100" : "bg-black-100"
462
+ ),
463
+ style: {
464
+ fontSize: g ? "16px" : "14px"
465
+ },
466
+ children: [
467
+ /* @__PURE__ */ e(me, {}),
468
+ /* @__PURE__ */ e("span", { className: "text-sm font-medium text-foreground", children: ge }),
469
+ /* @__PURE__ */ e(ce, { className: "h-4 w-4 text-muted-foreground", "aria-hidden": !0 })
470
+ ]
471
+ }
472
+ ),
473
+ /* @__PURE__ */ e(
474
+ "div",
475
+ {
476
+ className: p(
477
+ "flex items-center gap-1 rounded-full px-2 py-2 flex-1 min-w-0",
478
+ d && "opacity-60",
479
+ h?.textColor === "white" ? "bg-white-100" : "bg-black-100"
480
+ ),
481
+ children: [
482
+ /* @__PURE__ */ e(
483
+ Y,
484
+ {
485
+ type: "tel",
486
+ autoComplete: "tel-national",
487
+ value: Ce(r),
488
+ onChange: a,
489
+ onKeyDown: c,
490
+ placeholder: "88888 88888",
491
+ className: p(
492
+ "w-full h-full shadow-none border-0 outline-none focus-visible:ring-0 focus-visible:ring-offset-0",
493
+ "text-sm placeholder:text-muted-foreground/40 bg-transparent",
494
+ "disabled:cursor-not-allowed rounded-none break-words overflow-wrap-anywhere whitespace-pre-wrap",
495
+ "text-foreground px-3 py-2 pr-11 min-h-[40px]"
496
+ ),
497
+ style: {
498
+ fontSize: g ? "16px" : "14px"
499
+ },
500
+ maxLength: o ? o + 1 : void 0,
501
+ inputMode: "numeric",
502
+ autoFocus: !d,
503
+ disabled: d
504
+ }
505
+ ),
506
+ /* @__PURE__ */ e(
507
+ w,
508
+ {
509
+ type: "button",
510
+ size: "icon",
511
+ onClick: f,
512
+ disabled: d || !n,
513
+ variant: "ghost",
514
+ className: `h-10 w-10 ${n ? "bg-primary" : "bg-none"} hover:bg-primary/90 rounded-full transition-all duration-200 shadow-lg hover:shadow-xl hover:scale-105 active:scale-95 shrink-0 disabled:opacity-50 disabled:pointer-events-none disabled:hover:scale-100`,
515
+ title: n ? "Submit mobile number" : "Enter a valid mobile number",
516
+ "aria-label": n ? "Submit mobile number" : "Enter a valid mobile number",
517
+ children: /* @__PURE__ */ e(K, { className: `w-4 h-4 ${n ? "text-primary-foreground" : "text-primary"}` })
518
+ }
519
+ )
520
+ ]
521
+ }
522
+ )
523
+ ] })
524
+ ] });
525
+ }
526
+ const xe = 6, we = 30, ye = (r, a) => r.disabled === a.disabled && r.isMobile === a.isMobile && r.validation?.pattern === a.validation?.pattern && r.validation?.minLength === a.validation?.minLength && r.validation?.maxLength === a.validation?.maxLength && r.serverMessage === a.serverMessage && r.theme?.textColor === a.theme?.textColor;
527
+ function ve({
528
+ disabled: r,
529
+ isMobile: a,
530
+ validation: c,
531
+ onSubmit: d,
532
+ onResendOtp: h,
533
+ serverMessage: g
534
+ }) {
535
+ const o = V([]), [n, f] = J(0), [s, N] = J(!1), C = V(!1), E = V(d), Z = V(h), i = c?.maxLength ?? xe, y = B(
536
+ () => new RegExp(c?.pattern ?? `^\\d{${i}}$`),
537
+ [c?.pattern, i]
538
+ );
539
+ A(() => {
540
+ E.current = d;
541
+ }, [d]), A(() => {
542
+ Z.current = h;
543
+ }, [h]), A(() => {
544
+ if (!g) return;
545
+ const t = g.toLowerCase();
546
+ t.includes("otp") && (t.includes("invalid") || t.includes("incorrect") || t.includes("wrong")) && (C.current = !1, N(!1));
547
+ }, [g]);
548
+ const x = k(() => o.current.map(
549
+ (t) => t?.value.replace(/\D/g, "").slice(-1) ?? ""
550
+ ), []), S = k(() => {
551
+ const t = x().join(""), l = t.length === i && y.test(t);
552
+ C.current !== l && (C.current = l, N(l));
553
+ }, [i, y, x]), O = k((t) => {
554
+ t < i - 1 && o.current[t + 1]?.focus();
555
+ }, [i]), P = k((t) => {
556
+ t > 0 && o.current[t - 1]?.focus();
557
+ }, []), T = B(() => Array.from({ length: i }, (t, l) => l), [i]), v = k(
558
+ (t) => {
559
+ for (let b = 0; b < i; b++) {
560
+ const I = o.current[b];
561
+ I && (I.value = t[b] ?? "");
562
+ }
563
+ S();
564
+ const l = Math.min(t.length, i - 1);
565
+ o.current[l]?.focus();
566
+ },
567
+ [S, i]
568
+ ), M = k(
569
+ (t, l) => {
570
+ const b = l.target.value.replace(/\D/g, "");
571
+ if (b.length > 1) {
572
+ v(b.slice(0, i));
573
+ return;
574
+ }
575
+ const I = b.slice(-1);
576
+ l.target.value = I, S(), I && O(t);
577
+ },
578
+ [S, v, O, i]
579
+ ), L = k(
580
+ (t, l) => {
581
+ if (l.key === "Backspace" && !o.current[t]?.value) {
582
+ P(t);
583
+ return;
584
+ }
585
+ if (l.key === "Enter" && !l.shiftKey && !r) {
586
+ l.preventDefault();
587
+ const b = x().join("");
588
+ if (b.length === i && y.test(b))
589
+ E.current(b);
590
+ else {
591
+ const D = x().findIndex((R) => !R);
592
+ o.current[D === -1 ? 0 : D]?.focus();
593
+ }
594
+ }
595
+ },
596
+ [r, P, i, y, x]
597
+ ), _ = k(
598
+ (t) => {
599
+ t.preventDefault();
600
+ const l = t.clipboardData.getData("text").replace(/\D/g, "").slice(0, i);
601
+ l && v(l);
602
+ },
603
+ [v, i]
604
+ ), u = k(() => {
605
+ if (r) return;
606
+ const t = x().join("");
607
+ t.length === i && y.test(t) && E.current(t);
608
+ }, [r, i, y, x]), z = k(() => {
609
+ if (!(n > 0 || r)) {
610
+ for (const t of o.current)
611
+ t && (t.value = "");
612
+ C.current = !1, N(!1), o.current[0]?.focus(), Z.current?.(), f(we);
613
+ }
614
+ }, [r, n]);
615
+ A(() => {
616
+ r || o.current[0]?.focus();
617
+ }, [r]), A(() => {
618
+ if (s) {
619
+ n > 0 && f(0);
620
+ return;
621
+ }
622
+ if (n <= 0) return;
623
+ const t = setTimeout(() => f((l) => l - 1), 1e3);
624
+ return () => clearTimeout(t);
625
+ }, [s, n]);
626
+ const H = B(
627
+ () => T.map((t) => /* @__PURE__ */ e(
628
+ "input",
629
+ {
630
+ ref: (l) => {
631
+ o.current[t] = l;
632
+ },
633
+ type: "text",
634
+ inputMode: "numeric",
635
+ maxLength: a && t === 0 ? i : 1,
636
+ onChange: (l) => M(t, l),
637
+ onKeyDown: (l) => L(t, l),
638
+ onPaste: _,
639
+ disabled: r,
640
+ tabIndex: 0,
641
+ style: { fontSize: a ? "16px" : "14px", backgroundColor: "var(--input-box-bg)" },
642
+ className: p(
643
+ "h-10 w-10 rounded-full border text-center text-lg font-semibold text-foreground",
644
+ "border-border shadow-sm outline-none transition-colors",
645
+ "focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-0 focus-visible:border-transparent",
646
+ "disabled:cursor-not-allowed disabled:opacity-50"
647
+ ),
648
+ autoComplete: t === 0 ? "one-time-code" : "off",
649
+ "aria-label": `Digit ${t + 1}`
650
+ },
651
+ t
652
+ )),
653
+ [r, T, M, L, _, a, i]
654
+ );
655
+ return /* @__PURE__ */ e("div", { className: "px-4 pt-3 pb-2 space-y-3", children: /* @__PURE__ */ e("div", { className: "flex flex-col gap-3", children: [
656
+ /* @__PURE__ */ e("div", { className: "flex items-center justify-between", children: [
657
+ /* @__PURE__ */ e("p", { className: "text-xs font-semibold tracking-wide text-foreground uppercase", children: "Please enter the OTP" }),
658
+ !s && /* @__PURE__ */ e(
659
+ "button",
660
+ {
661
+ type: "button",
662
+ onClick: z,
663
+ disabled: r || n > 0,
664
+ className: p(
665
+ "text-xs font-medium underline underline-offset-2",
666
+ "text-primary hover:opacity-90 disabled:opacity-50 disabled:no-underline disabled:cursor-not-allowed"
667
+ ),
668
+ children: [
669
+ "Resend OTP",
670
+ n > 0 ? ` (00:${String(n).padStart(2, "0")}s)` : ""
671
+ ]
672
+ }
673
+ )
674
+ ] }),
675
+ /* @__PURE__ */ e("div", { className: "flex items-center w-full gap-2 justify-between", children: [
676
+ /* @__PURE__ */ e("div", { className: "flex items-center gap-2", children: H }),
677
+ /* @__PURE__ */ e(
678
+ w,
679
+ {
680
+ type: "button",
681
+ size: "icon",
682
+ onClick: u,
683
+ disabled: r,
684
+ variant: "ghost",
685
+ className: `h-10 w-10 ${s ? "bg-primary" : "bg-none"} hover:bg-primary/90 rounded-full transition-all duration-200 shadow-lg hover:shadow-xl hover:scale-105 active:scale-95 shrink-0 disabled:opacity-50 disabled:pointer-events-none disabled:hover:scale-100`,
686
+ title: s ? "Submit OTP" : "Enter the full OTP to submit",
687
+ "aria-label": s ? "Submit OTP" : "Enter the full OTP to submit",
688
+ children: /* @__PURE__ */ e(K, { className: `w-4 h-4 ${s ? "text-primary-foreground" : "text-primary"}` })
689
+ }
690
+ )
691
+ ] })
692
+ ] }) });
693
+ }
694
+ const Le = pe(ve, ye);
695
+ function Ne({
696
+ value: r,
697
+ onChange: a,
698
+ onKeyDown: c,
699
+ placeholder: d,
700
+ disabled: h,
701
+ theme: g,
702
+ isMobile: o,
703
+ isEmailValid: n,
704
+ onSend: f
705
+ }) {
706
+ return /* @__PURE__ */ e("div", { className: "px-2 pt-3 pb-2 space-y-2 w-full", children: [
707
+ /* @__PURE__ */ e("p", { className: "px-1 text-xs font-semibold tracking-wide text-foreground uppercase", children: "Enter your email address" }),
708
+ /* @__PURE__ */ e(
709
+ "div",
710
+ {
711
+ className: p(
712
+ "flex items-center gap-1 rounded-full px-2 py-2 w-full",
713
+ h && "opacity-60",
714
+ g?.textColor === "white" ? "bg-white-100" : "bg-black-100"
715
+ ),
716
+ children: [
717
+ /* @__PURE__ */ e(
718
+ Y,
719
+ {
720
+ type: "email",
721
+ autoComplete: "email",
722
+ value: r,
723
+ onChange: a,
724
+ onKeyDown: c,
725
+ placeholder: d ?? "username@example.com",
726
+ className: p(
727
+ "w-full h-full shadow-none border-0 outline-none focus-visible:ring-0 focus-visible:ring-offset-0",
728
+ "text-sm placeholder:text-muted-foreground/40 bg-transparent",
729
+ "disabled:cursor-not-allowed rounded-none break-words overflow-wrap-anywhere whitespace-pre-wrap",
730
+ "text-foreground px-3 py-2 pr-11 min-h-[40px]"
731
+ ),
732
+ style: {
733
+ fontSize: o ? "16px" : "14px"
734
+ },
735
+ autoFocus: !h,
736
+ disabled: h
737
+ }
738
+ ),
739
+ /* @__PURE__ */ e(
740
+ w,
741
+ {
742
+ type: "button",
743
+ size: "icon",
744
+ onClick: f,
745
+ disabled: h || !n,
746
+ variant: "ghost",
747
+ className: `h-10 w-10 ${n ? "bg-primary" : "bg-none"} hover:bg-primary/90 rounded-full transition-all duration-200 shadow-lg hover:shadow-xl hover:scale-105 active:scale-95 shrink-0 disabled:opacity-50 disabled:pointer-events-none disabled:hover:scale-100`,
748
+ title: n ? "Submit email address" : "Enter a valid email address",
749
+ "aria-label": n ? "Submit email address" : "Enter a valid email address",
750
+ children: /* @__PURE__ */ e(K, { className: `w-4 h-4 ${n ? "text-primary-foreground" : "text-primary"}` })
751
+ }
752
+ )
753
+ ]
754
+ }
755
+ )
756
+ ] });
757
+ }
758
+ const ne = 10, Me = 10, ke = /^[6-9][0-9]{9}$/, Ee = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
759
+ function Ze({
760
+ elicitationEntry: r,
761
+ value: a,
762
+ onChange: c,
763
+ isDisabled: d,
764
+ theme: h,
765
+ isMobile: g,
766
+ onSend: o
767
+ }) {
768
+ const {
769
+ component: n,
770
+ pattern: f,
771
+ minLength: s,
772
+ maxLength: N,
773
+ description: C,
774
+ disp_toast_msg: E,
775
+ tool_key: Z
776
+ } = r ?? {}, i = B(() => n === j.SYNAPSE_COMPONENTS.MOBILE, [n]), y = B(() => n === j.SYNAPSE_COMPONENTS.OTP, [n]), x = B(() => n === j.SYNAPSE_COMPONENTS.EMAIL, [n]);
777
+ if (!i && !y && !x)
778
+ return null;
779
+ const S = E?.trim() ?? "", O = (u) => {
780
+ const z = u.target.value.replace(/\D/g, ""), H = N ?? ne;
781
+ c(z.slice(0, H));
782
+ }, P = a.length === (s ?? Me) && (f ? new RegExp(f).test(a) : ke.test(a)), T = f ? new RegExp(f).test(a) : Ee.test(a), v = () => {
783
+ !T || d || o({ toolCalled: !0, tool_key: Z });
784
+ }, M = (u) => {
785
+ u.key === "Enter" && (u.preventDefault(), v());
786
+ }, L = () => {
787
+ !P || d || o({ toolCalled: !0, tool_key: Z });
788
+ };
789
+ return /* @__PURE__ */ e(oe, { children: [
790
+ i && /* @__PURE__ */ e(
791
+ be,
792
+ {
793
+ value: a,
794
+ onChange: O,
795
+ onSend: L,
796
+ onKeyDown: (u) => {
797
+ u.key === "Enter" && (u.preventDefault(), L());
798
+ },
799
+ placeholder: C ?? "Enter your mobile number",
800
+ disabled: d,
801
+ isMobileValid: P,
802
+ theme: h,
803
+ isMobile: g,
804
+ maxLength: N ?? ne
805
+ }
806
+ ),
807
+ y && /* @__PURE__ */ e(
808
+ Le,
809
+ {
810
+ disabled: d,
811
+ isMobile: g,
812
+ validation: { pattern: f, minLength: s, maxLength: N },
813
+ onSubmit: (u) => {
814
+ o({ message: u, toolCalled: !0, tool_key: Z });
815
+ },
816
+ onResendOtp: () => {
817
+ o({ toolCalled: !0, resend: !0, tool_key: Z });
818
+ },
819
+ serverMessage: S,
820
+ theme: h
821
+ }
822
+ ),
823
+ x && /* @__PURE__ */ e(
824
+ Ne,
825
+ {
826
+ value: a,
827
+ onChange: (u) => c(u.target.value),
828
+ onKeyDown: M,
829
+ disabled: d,
830
+ isEmailValid: T,
831
+ theme: h,
832
+ isMobile: g,
833
+ placeholder: C,
834
+ onSend: v
835
+ }
836
+ )
837
+ ] });
838
+ }
839
+ const ae = ({ className: r }) => /* @__PURE__ */ e("svg", { width: "17", height: "16", viewBox: "0 0 17 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", className: r, children: /* @__PURE__ */ e("path", { d: "M6.875 0C7.375 0 7.75 0.40625 7.75 0.875V14.875C7.75 15.375 7.375 15.75 6.875 15.75C6.40625 15.75 6 15.375 6 14.875V0.875C6 0.40625 6.40625 0 6.875 0ZM12.875 2C13.375 2 13.75 2.40625 13.75 2.875V12.875C13.75 13.375 13.375 13.75 12.875 13.75C12.4062 13.75 12 13.375 12 12.875V2.875C12 2.40625 12.4062 2 12.875 2ZM3.875 3C4.375 3 4.75 3.40625 4.75 3.875V11.875C4.75 12.375 4.375 12.75 3.875 12.75C3.40625 12.75 3 12.375 3 11.875V3.875C3 3.40625 3.40625 3 3.875 3ZM9.875 4C10.375 4 10.75 4.40625 10.75 4.875V10.875C10.75 11.375 10.375 11.75 9.875 11.75C9.40625 11.75 9 11.375 9 10.875V4.875C9 4.40625 9.40625 4 9.875 4ZM0.875 6C1.375 6 1.75 6.40625 1.75 6.875V8.875C1.75 9.375 1.375 9.75 0.875 9.75C0.40625 9.75 0 9.375 0 8.875V6.875C0 6.40625 0.40625 6 0.875 6ZM15.875 6C16.375 6 16.75 6.40625 16.75 6.875V8.875C16.75 9.375 16.375 9.75 15.875 9.75C15.4062 9.75 15 9.375 15 8.875V6.875C15 6.40625 15.4062 6 15.875 6Z", fill: "currentColor" }) });
840
+ function Te({
841
+ value: r,
842
+ onChange: a,
843
+ onSend: c,
844
+ onFileChange: d,
845
+ onRemoveFile: h,
846
+ onRecording: g,
847
+ isRecording: o,
848
+ hasAttachment: n,
849
+ attachmentFiles: f,
850
+ isDisabled: s,
851
+ placeholder: N,
852
+ isMobile: C,
853
+ recordingStatus: E,
854
+ theme: Z,
855
+ allowed: i,
856
+ showStartNewChatButton: y,
857
+ onStartNewChat: x,
858
+ isVoiceAgentActive: S,
859
+ handleVoiceMode: O,
860
+ isAuthComponent: P,
861
+ activeElicitationState: T,
862
+ isFullScreen: v
863
+ }) {
864
+ const M = V(null), L = V(null), _ = r.trim().length > 0 || n, u = i === void 0 || i.includes(j.SYNAPSE_CONVERSATION.AUDIO), z = i === void 0 || i.includes(j.SYNAPSE_CONVERSATION.VOICE), H = _ || !u, t = _, l = i === void 0 || i.includes(j.SYNAPSE_CONVERSATION.FILE), b = (s || E !== F.IDLE) && !o, I = p(
865
+ "rounded-full transition-all duration-200 ",
866
+ o ? "bg-gradient-to-r from-rose-400 via-primary to-indigo-500 text-white ring-2 ring-white/60 animate-pulse shadow-[0_0_20px_rgba(139,92,246,0.45)]" : b ? "text-primary/50 cursor-not-allowed shadow-none" : "text-foreground hover:bg-primary hover:text-primary-foreground"
867
+ ), D = (m) => {
868
+ const $ = Array.from(m.target.files || []);
869
+ $.length > 0 && d($);
870
+ }, R = () => {
871
+ s || (M.current && (M.current.value = ""), M.current?.click());
872
+ }, q = (m) => {
873
+ m.key === "Enter" && !m.shiftKey && t && !s && (m.preventDefault(), c());
874
+ }, U = (m) => {
875
+ m.style.height = "auto", m.style.overflow = "hidden";
876
+ const $ = m.scrollHeight, se = v ? 20 : 28, X = 120, de = Math.max(se, Math.min($, X));
877
+ m.style.height = de + "px", $ > X ? m.style.overflow = "auto" : m.style.overflow = "hidden";
878
+ }, G = (m) => {
879
+ U(m.currentTarget);
880
+ };
881
+ return A(() => {
882
+ L.current && U(L.current);
883
+ }, [r]), A(() => {
884
+ !s && !C && L.current?.focus();
885
+ }, [s]), y && x ? /* @__PURE__ */ e("div", { className: "px-4 py-2 flex justify-unset", children: /* @__PURE__ */ e(
886
+ "button",
887
+ {
888
+ type: "button",
889
+ onClick: x,
890
+ className: p(
891
+ "px-6 py-3 bg-primary text-primary-foreground text-sm font-semibold rounded-lg transition-colors flex items-center justify-center gap-2 disabled:opacity-60 disabled:pointer-events-none w-full",
892
+ !C && "hover:bg-primary/90"
893
+ ),
894
+ children: [
895
+ /* @__PURE__ */ e("span", { children: "Start new chat" }),
896
+ /* @__PURE__ */ e(he, { className: "w-5 h-5", "aria-hidden": !0 })
897
+ ]
898
+ }
899
+ ) }) : /* @__PURE__ */ e(oe, { children: P ? /* @__PURE__ */ e(
900
+ Ze,
901
+ {
902
+ elicitationEntry: T,
903
+ value: r,
904
+ onChange: a,
905
+ isDisabled: s,
906
+ theme: Z,
907
+ isMobile: C,
908
+ onSend: c
909
+ }
910
+ ) : v ? /* @__PURE__ */ e("div", { className: "mx-3 mb-3", "data-name": "reply-box", children: /* @__PURE__ */ e(
911
+ "div",
912
+ {
913
+ className: "flex flex-col items-stretch w-full bg-elicitationBg",
914
+ style: {
915
+ border: "1px solid hsl(var(--primary) / 0.5)",
916
+ borderRadius: 24,
917
+ padding: 8
918
+ },
919
+ children: [
920
+ n && f.length > 0 && /* @__PURE__ */ e("div", { className: "mb-2 pb-2 border-b border-border-subtle", children: /* @__PURE__ */ e(
921
+ Q,
922
+ {
923
+ files: f,
924
+ onRemoveFile: h,
925
+ isPreview: !0
926
+ }
927
+ ) }),
928
+ /* @__PURE__ */ e(
929
+ "input",
930
+ {
931
+ ref: M,
932
+ type: "file",
933
+ multiple: !0,
934
+ max: 3,
935
+ accept: "image/jpeg, image/png, image/jpg, application/pdf",
936
+ className: "hidden",
937
+ onChange: D,
938
+ disabled: s,
939
+ title: "Attach file",
940
+ "aria-label": "Attach file"
941
+ }
942
+ ),
943
+ /* @__PURE__ */ e(
944
+ "div",
945
+ {
946
+ className: "flex items-center justify-between w-full",
947
+ style: { padding: "12px 8px" },
948
+ "data-name": "text-frame",
949
+ children: /* @__PURE__ */ e(
950
+ W,
951
+ {
952
+ ref: L,
953
+ onInput: G,
954
+ placeholder: N,
955
+ value: r,
956
+ onChange: (m) => a(m.target.value),
957
+ rows: 1,
958
+ maxLength: 1e3,
959
+ autoFocus: !C,
960
+ style: {
961
+ wordBreak: "break-word",
962
+ overflowWrap: "anywhere",
963
+ minHeight: "20px",
964
+ maxHeight: "120px",
965
+ fontFamily: "Inter, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif",
966
+ fontSize: 14,
967
+ lineHeight: "20px",
968
+ fontWeight: 400,
969
+ padding: 0
970
+ },
971
+ onKeyPress: q,
972
+ title: "Enter your message",
973
+ "aria-label": "Enter your message",
974
+ className: p(
975
+ "flex-1 min-w-0 shadow-none border-0 outline-none focus-visible:ring-0 focus-visible:ring-offset-0",
976
+ "bg-transparent disabled:cursor-not-allowed rounded-none break-words whitespace-pre-wrap",
977
+ "text-foreground resize-none placeholder:text-muted-foreground"
978
+ )
979
+ }
980
+ )
981
+ }
982
+ ),
983
+ /* @__PURE__ */ e(
984
+ "div",
985
+ {
986
+ className: "flex items-center justify-between w-full",
987
+ "data-name": "cta-row",
988
+ children: [
989
+ /* @__PURE__ */ e("div", { className: "flex items-start shrink-0", "data-name": "input-left-cta", children: l && E === F.IDLE && /* @__PURE__ */ e(
990
+ w,
991
+ {
992
+ type: "button",
993
+ variant: "ghost",
994
+ size: "icon",
995
+ onClick: R,
996
+ disabled: s,
997
+ className: p(
998
+ "rounded-full transition-all shrink-0 p-2 h-10 w-10",
999
+ n ? "bg-primary text-primary-foreground" : "text-foreground",
1000
+ !C && (n ? "hover:bg-primary/15" : "hover:bg-primary hover:text-primary-foreground")
1001
+ ),
1002
+ title: "Attach file",
1003
+ "aria-label": "Attach file",
1004
+ children: /* @__PURE__ */ e(te, { className: "w-6 h-6", strokeWidth: 1.5 })
1005
+ }
1006
+ ) }),
1007
+ /* @__PURE__ */ e(
1008
+ "div",
1009
+ {
1010
+ className: "flex gap-2 items-center shrink-0",
1011
+ "data-name": "input-right-cta",
1012
+ children: [
1013
+ o ? /* @__PURE__ */ e(
1014
+ w,
1015
+ {
1016
+ type: "button",
1017
+ variant: "ghost",
1018
+ size: "icon",
1019
+ onClick: g,
1020
+ className: p(
1021
+ "h-10 w-10 rounded-full bg-gradient-to-r from-red-400 to-rose-500 text-white shadow-lg transition-all duration-200 active:scale-95 shrink-0",
1022
+ !C && "hover:from-red-500 hover:to-rose-600 hover:scale-105"
1023
+ ),
1024
+ title: "Stop recording",
1025
+ "aria-label": "Stop recording",
1026
+ children: /* @__PURE__ */ e(re, { className: "w-4 h-4" })
1027
+ }
1028
+ ) : u && /* @__PURE__ */ e(
1029
+ w,
1030
+ {
1031
+ type: "button",
1032
+ variant: "ghost",
1033
+ size: "icon",
1034
+ onClick: g,
1035
+ disabled: b,
1036
+ className: p(
1037
+ "h-10 w-10 shrink-0 p-2",
1038
+ I
1039
+ ),
1040
+ title: "Start recording",
1041
+ "aria-label": "Start recording",
1042
+ children: /* @__PURE__ */ e(ee, { className: "w-6 h-6", strokeWidth: 1.5 })
1043
+ }
1044
+ ),
1045
+ H && !o ? /* @__PURE__ */ e(
1046
+ w,
1047
+ {
1048
+ type: "button",
1049
+ size: "icon",
1050
+ onClick: () => c(),
1051
+ disabled: s || !t,
1052
+ variant: "ghost",
1053
+ className: p(
1054
+ "h-10 w-10 rounded-full transition-all duration-200 shadow-lg shrink-0 p-2",
1055
+ t ? "bg-primary hover:bg-primary/90 hover:shadow-xl hover:scale-105 active:scale-95" : "bg-primary/40"
1056
+ ),
1057
+ title: t ? "Send message" : "Type a message to send",
1058
+ "aria-label": t ? "Send message" : "Type a message to send",
1059
+ children: /* @__PURE__ */ e(K, { className: "w-4 h-4 text-primary-foreground" })
1060
+ }
1061
+ ) : u && z && !o && /* @__PURE__ */ e(
1062
+ w,
1063
+ {
1064
+ type: "button",
1065
+ variant: "ghost",
1066
+ size: "icon",
1067
+ onClick: O,
1068
+ disabled: s || S,
1069
+ className: "h-10 w-10 bg-primary text-primary-foreground hover:bg-primary/90 rounded-full transition-all duration-200 shadow-lg hover:shadow-xl hover:scale-105 active:scale-95 shrink-0 disabled:opacity-50 disabled:pointer-events-none disabled:hover:scale-100 p-2",
1070
+ title: "Enter voice mode",
1071
+ "aria-label": "Enter voice mode",
1072
+ children: /* @__PURE__ */ e(ae, { className: "w-4 h-4 text-primary-foreground" })
1073
+ }
1074
+ )
1075
+ ]
1076
+ }
1077
+ )
1078
+ ]
1079
+ }
1080
+ )
1081
+ ]
1082
+ }
1083
+ ) }) : /* @__PURE__ */ e("div", { className: "px-3 pb-2 pt-1", children: [
1084
+ /* @__PURE__ */ e(
1085
+ "input",
1086
+ {
1087
+ ref: M,
1088
+ type: "file",
1089
+ multiple: !0,
1090
+ max: 3,
1091
+ accept: "image/jpeg, image/png, image/jpg, application/pdf",
1092
+ className: "hidden",
1093
+ onChange: D,
1094
+ disabled: s,
1095
+ title: "Attach file",
1096
+ "aria-label": "Attach file"
1097
+ }
1098
+ ),
1099
+ /* @__PURE__ */ e(
1100
+ "div",
1101
+ {
1102
+ className: "flex flex-col w-full bg-elicitationBg",
1103
+ style: {
1104
+ border: "1px solid hsl(var(--primary) / 0.3)",
1105
+ borderRadius: 20,
1106
+ padding: "4px 8px"
1107
+ },
1108
+ children: [
1109
+ n && f.length > 0 && /* @__PURE__ */ e("div", { className: "mb-2 pb-2 border-b border-border-subtle", children: /* @__PURE__ */ e(
1110
+ Q,
1111
+ {
1112
+ files: f,
1113
+ onRemoveFile: h,
1114
+ isPreview: !0
1115
+ }
1116
+ ) }),
1117
+ /* @__PURE__ */ e("div", { className: "px-2 pt-1 pb-0", children: /* @__PURE__ */ e(
1118
+ W,
1119
+ {
1120
+ ref: L,
1121
+ onInput: G,
1122
+ placeholder: N,
1123
+ value: r,
1124
+ onChange: (m) => a(m.target.value),
1125
+ rows: 1,
1126
+ maxLength: 1e3,
1127
+ autoFocus: !C,
1128
+ style: {
1129
+ wordBreak: "break-word",
1130
+ overflowWrap: "anywhere",
1131
+ minHeight: "28px",
1132
+ maxHeight: "120px",
1133
+ fontSize: "16px",
1134
+ lineHeight: "1.4"
1135
+ },
1136
+ onKeyPress: q,
1137
+ title: "Enter your message",
1138
+ "aria-label": "Enter your message",
1139
+ className: p(
1140
+ "w-full shadow-none border-0 outline-none focus-visible:ring-0 focus-visible:ring-offset-0",
1141
+ "text-base placeholder:text-muted-foreground bg-transparent",
1142
+ "disabled:cursor-not-allowed rounded-none break-words whitespace-pre-wrap text-foreground resize-none"
1143
+ )
1144
+ }
1145
+ ) }),
1146
+ /* @__PURE__ */ e("div", { className: "flex items-center justify-between px-1", children: [
1147
+ /* @__PURE__ */ e("div", { className: "flex items-center shrink-0", children: l && E === F.IDLE && /* @__PURE__ */ e(
1148
+ w,
1149
+ {
1150
+ type: "button",
1151
+ variant: "ghost",
1152
+ size: "icon",
1153
+ onClick: R,
1154
+ disabled: s,
1155
+ className: p(
1156
+ "h-10 w-10 rounded-full transition-all shrink-0",
1157
+ n ? "bg-primary text-primary-foreground" : "text-foreground",
1158
+ !C && (n ? "hover:bg-primary/15" : "hover:bg-primary hover:text-primary-foreground")
1159
+ ),
1160
+ title: "Attach file",
1161
+ "aria-label": "Attach file",
1162
+ children: /* @__PURE__ */ e(te, { className: "w-5 h-5", strokeWidth: 1.5 })
1163
+ }
1164
+ ) }),
1165
+ /* @__PURE__ */ e("div", { className: "flex items-center gap-2 shrink-0", children: [
1166
+ o ? /* @__PURE__ */ e(
1167
+ w,
1168
+ {
1169
+ type: "button",
1170
+ variant: "ghost",
1171
+ size: "icon",
1172
+ onClick: g,
1173
+ className: p(
1174
+ "h-10 w-10 rounded-full bg-gradient-to-r from-red-400 to-rose-500 text-white shadow-lg transition-all duration-200 active:scale-95 shrink-0",
1175
+ !C && "hover:from-red-500 hover:to-rose-600 hover:scale-105"
1176
+ ),
1177
+ title: "Stop recording",
1178
+ "aria-label": "Stop recording",
1179
+ children: /* @__PURE__ */ e(re, { className: "w-4 h-4" })
1180
+ }
1181
+ ) : H ? /* @__PURE__ */ e(
1182
+ w,
1183
+ {
1184
+ type: "button",
1185
+ size: "icon",
1186
+ onClick: () => c(),
1187
+ disabled: s || !t,
1188
+ variant: "ghost",
1189
+ className: p(
1190
+ "h-10 w-10 rounded-full transition-all duration-200 shadow-lg shrink-0",
1191
+ t ? "bg-primary hover:bg-primary/90 hover:shadow-xl hover:scale-105 active:scale-95" : "bg-primary/40"
1192
+ ),
1193
+ title: t ? "Send message" : "Type a message to send",
1194
+ "aria-label": t ? "Send message" : "Type a message to send",
1195
+ children: /* @__PURE__ */ e(K, { className: "w-4 h-4 text-primary-foreground" })
1196
+ }
1197
+ ) : u && /* @__PURE__ */ e(
1198
+ w,
1199
+ {
1200
+ type: "button",
1201
+ variant: "ghost",
1202
+ size: "icon",
1203
+ onClick: g,
1204
+ disabled: b,
1205
+ className: p("h-10 w-10 shrink-0", I),
1206
+ title: "Start recording",
1207
+ "aria-label": "Start recording",
1208
+ children: /* @__PURE__ */ e(ee, { className: "w-5 h-5", strokeWidth: 1.5 })
1209
+ }
1210
+ ),
1211
+ u && z && !o && /* @__PURE__ */ e(
1212
+ w,
1213
+ {
1214
+ type: "button",
1215
+ variant: "ghost",
1216
+ size: "icon",
1217
+ onClick: O,
1218
+ disabled: s || S,
1219
+ className: "h-10 w-10 bg-primary text-primary-foreground hover:bg-primary/90 rounded-full transition-all duration-200 shadow-lg hover:shadow-xl hover:scale-105 active:scale-95 shrink-0 disabled:opacity-50 disabled:pointer-events-none disabled:hover:scale-100",
1220
+ title: "Enter voice mode",
1221
+ "aria-label": "Enter voice mode",
1222
+ children: /* @__PURE__ */ e(ae, { className: "w-4 h-4 text-primary-foreground" })
1223
+ }
1224
+ )
1225
+ ] })
1226
+ ] })
1227
+ ]
1228
+ }
1229
+ )
1230
+ ] }) });
1231
+ }
1232
+ export {
1233
+ Te as default
1234
+ };