@eka-care/medassist-widget 0.1.83-0 → 0.1.83-2
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/{medassist-widget-CardList-CUT-Skj4.js → medassist-widget-CardList-BR2hjo_A.js} +42 -43
- package/dist/{medassist-widget-DoctorCard-DY6gcZr3.js → medassist-widget-DoctorCard-CpQayTwn.js} +23 -25
- package/dist/{medassist-widget-FocusCarousel-CDY1oNom.js → medassist-widget-FocusCarousel-BsLIZftX.js} +9 -9
- package/dist/{medassist-widget-MediaCard-BpYxPv4q.js → medassist-widget-MediaCard-DRUToQV3.js} +1 -1
- package/dist/{medassist-widget-MultiSelect-2yroeYrx.js → medassist-widget-MultiSelect-BnExX-Ty.js} +29 -29
- package/dist/{medassist-widget-VoiceAgentScreen-lGPPYoRJ.js → medassist-widget-VoiceAgentScreen-BK0p37RC.js} +7 -9
- package/dist/{medassist-widget-check-CiuoYMR2.js → medassist-widget-check-BaHLRs-2.js} +1 -1
- package/dist/{medassist-widget-chevron-right-BMU6ZIMl.js → medassist-widget-chevron-right-CKYbGWbY.js} +1 -1
- package/dist/{medassist-widget-map-pin-DMI_eIkL.js → medassist-widget-map-pin-Bx-5lPdC.js} +1 -1
- package/dist/medassist-widget.js +13029 -2
- package/package.json +1 -1
- package/dist/medassist-widget-ChatComposer-Cscs6lT3.js +0 -1234
- package/dist/medassist-widget-ChatMessages-CqpYk2z4.js +0 -1083
- package/dist/medassist-widget-ConnectionStatus-DjBrbZDa.js +0 -84
- package/dist/medassist-widget-DispToastHost-GH71JbwS.js +0 -69
- package/dist/medassist-widget-FilePreview-CFgLxtqr.js +0 -121
- package/dist/medassist-widget-ProfileHeader-DR9Lr71Q.js +0 -142
- package/dist/medassist-widget-avatar-Dce5W2f_.js +0 -256
- package/dist/medassist-widget-main-BcTqYheJ.js +0 -10070
- package/dist/medassist-widget-message-square-plus-CBtZ680g.js +0 -15
- package/dist/medassist-widget-mic-DWQVxBaT.js +0 -9
- package/dist/medassist-widget-x-DpXIaEQs.js +0 -8
package/dist/{medassist-widget-CardList-CUT-Skj4.js → medassist-widget-CardList-BR2hjo_A.js}
RENAMED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { c, u as e,
|
|
2
|
-
import { C as
|
|
3
|
-
import { M as
|
|
4
|
-
import {
|
|
5
|
-
import { FocusCarousel as A } from "./medassist-widget-FocusCarousel-CDY1oNom.js";
|
|
1
|
+
import { c, u as e, k as M, t as b, p as w, r as C, v as z, B as x, s as S, d as $, A as j } from "./medassist-widget.js";
|
|
2
|
+
import { C as A } from "./medassist-widget-check-BaHLRs-2.js";
|
|
3
|
+
import { M as v } from "./medassist-widget-map-pin-Bx-5lPdC.js";
|
|
4
|
+
import { FocusCarousel as I } from "./medassist-widget-FocusCarousel-BsLIZftX.js";
|
|
6
5
|
const H = [
|
|
7
6
|
["path", { d: "M10 12h4", key: "a56b0p" }],
|
|
8
7
|
["path", { d: "M10 8h4", key: "1sr2af" }],
|
|
@@ -15,7 +14,7 @@ const H = [
|
|
|
15
14
|
}
|
|
16
15
|
],
|
|
17
16
|
["path", { d: "M6 21V5a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v16", key: "16ra0t" }]
|
|
18
|
-
],
|
|
17
|
+
], N = c("building-2", H);
|
|
19
18
|
const B = [
|
|
20
19
|
["path", { d: "M8 2v4", key: "1cmpym" }],
|
|
21
20
|
["path", { d: "M16 2v4", key: "4m81vk" }],
|
|
@@ -43,8 +42,8 @@ const T = [
|
|
|
43
42
|
["path", { d: "m6 13 8.5 8", key: "u1kupk" }],
|
|
44
43
|
["path", { d: "M6 13h3", key: "wdp6ag" }],
|
|
45
44
|
["path", { d: "M9 13c6.667 0 6.667-10 0-10", key: "1nkvk2" }]
|
|
46
|
-
],
|
|
47
|
-
const
|
|
45
|
+
], F = c("indian-rupee", T);
|
|
46
|
+
const P = [
|
|
48
47
|
[
|
|
49
48
|
"path",
|
|
50
49
|
{
|
|
@@ -54,7 +53,7 @@ const F = [
|
|
|
54
53
|
],
|
|
55
54
|
["path", { d: "M15 5.764v15", key: "1pn4in" }],
|
|
56
55
|
["path", { d: "M9 3.236v15", key: "1uimfh" }]
|
|
57
|
-
],
|
|
56
|
+
], E = c("map", P);
|
|
58
57
|
const G = [
|
|
59
58
|
[
|
|
60
59
|
"path",
|
|
@@ -66,37 +65,37 @@ const G = [
|
|
|
66
65
|
["path", { d: "M13 5v2", key: "dyzc3o" }],
|
|
67
66
|
["path", { d: "M13 17v2", key: "1ont0d" }],
|
|
68
67
|
["path", { d: "M13 11v2", key: "1wjjxi" }]
|
|
69
|
-
],
|
|
70
|
-
voucher:
|
|
71
|
-
pharmacy:
|
|
72
|
-
hospital:
|
|
73
|
-
map:
|
|
74
|
-
location_pin:
|
|
75
|
-
"location pin":
|
|
76
|
-
check:
|
|
68
|
+
], O = c("ticket", G), Z = {
|
|
69
|
+
voucher: O,
|
|
70
|
+
pharmacy: N,
|
|
71
|
+
hospital: N,
|
|
72
|
+
map: E,
|
|
73
|
+
location_pin: v,
|
|
74
|
+
"location pin": v,
|
|
75
|
+
check: A,
|
|
77
76
|
calendar: V,
|
|
78
|
-
rupee:
|
|
77
|
+
rupee: F,
|
|
79
78
|
dollar: D,
|
|
80
79
|
euro: R
|
|
81
80
|
};
|
|
82
81
|
function y({
|
|
83
82
|
name: t,
|
|
84
83
|
className: d,
|
|
85
|
-
size:
|
|
84
|
+
size: l = 16
|
|
86
85
|
}) {
|
|
87
|
-
const
|
|
88
|
-
if (!
|
|
89
|
-
const i =
|
|
86
|
+
const r = t?.trim().toLowerCase().replace(/\s+/g, "_");
|
|
87
|
+
if (!r) return null;
|
|
88
|
+
const i = Z[r];
|
|
90
89
|
if (i)
|
|
91
|
-
return /* @__PURE__ */ e(i, { className: d, size:
|
|
90
|
+
return /* @__PURE__ */ e(i, { className: d, size: l, "aria-hidden": !0 });
|
|
92
91
|
}
|
|
93
92
|
function _({
|
|
94
93
|
card: t,
|
|
95
94
|
onSelect: d,
|
|
96
|
-
disabled:
|
|
95
|
+
disabled: l = !1
|
|
97
96
|
}) {
|
|
98
97
|
const {
|
|
99
|
-
title:
|
|
98
|
+
title: r,
|
|
100
99
|
tags: i,
|
|
101
100
|
icon: p,
|
|
102
101
|
img: m,
|
|
@@ -106,28 +105,28 @@ function _({
|
|
|
106
105
|
primary_cta: o,
|
|
107
106
|
secondary_cta: s
|
|
108
107
|
} = t, k = (a) => {
|
|
109
|
-
if (!
|
|
108
|
+
if (!l && (a.link && window.open(a.link, "_blank", "noopener,noreferrer"), a.text || a.title)) {
|
|
110
109
|
let f = !1;
|
|
111
110
|
t?.primary_cta?.tool_result && (f = !0), d?.({ message: a.text || a.title, selectedCard: t?.title, selectedComponent: t, selected_id: t.card_id, ...f ? { tool_result: t.primary_cta?.tool_result } : {} });
|
|
112
111
|
}
|
|
113
112
|
}, g = !!m;
|
|
114
|
-
return /* @__PURE__ */ e(
|
|
113
|
+
return /* @__PURE__ */ e(S, { className: "w-full h-full flex flex-col overflow-hidden rounded-xl border border-black-200 dark:border-white-200 bg-elicitationBg text-card-foreground shadow-none", children: [
|
|
115
114
|
/* @__PURE__ */ e(M, { className: `flex flex-row items-center justify-between gap-3 p-3 ${g ? "bg-primary/[20%]" : ""}`, children: [
|
|
116
115
|
/* @__PURE__ */ e("div", { className: "min-w-0 flex-1 overflow-hidden", children: [
|
|
117
|
-
|
|
116
|
+
r ? /* @__PURE__ */ e(b, { className: "text-base font-bold leading-tight tracking-tight truncate", children: r }) : null,
|
|
118
117
|
i ? /* @__PURE__ */ e("p", { className: "mt-1 text-sm text-muted-foreground truncate", children: i }) : null
|
|
119
118
|
] }),
|
|
120
119
|
g ? /* @__PURE__ */ e("div", { className: "shrink-0", children: /* @__PURE__ */ e(
|
|
121
120
|
"img",
|
|
122
121
|
{
|
|
123
122
|
src: m,
|
|
124
|
-
alt:
|
|
123
|
+
alt: r ?? "profile",
|
|
125
124
|
className: "h-16 w-16 rounded-full object-cover border-2 border-background"
|
|
126
125
|
}
|
|
127
126
|
) }) : p ? /* @__PURE__ */ e("div", { className: "shrink-0 text-muted-foreground", children: /* @__PURE__ */ e(y, { name: p, size: 24, className: "text-primary" }) }) : null
|
|
128
127
|
] }),
|
|
129
|
-
/* @__PURE__ */ e(
|
|
130
|
-
h ? /* @__PURE__ */ e("div", { className: "text-sm text-foreground leading-snug prose prose-sm max-w-none prose-strong:font-semibold prose-p:my-0 break-words", children: /* @__PURE__ */ e(
|
|
128
|
+
/* @__PURE__ */ e(w, { className: "flex-1 space-y-3 pt-3 overflow-hidden", children: [
|
|
129
|
+
h ? /* @__PURE__ */ e("div", { className: "text-sm text-foreground leading-snug prose prose-sm max-w-none prose-strong:font-semibold prose-p:my-0 break-words", children: /* @__PURE__ */ e(C, { children: h }) }) : null,
|
|
131
130
|
u ? /* @__PURE__ */ e("div", { className: "rounded-full px-4 py-2 text-center text-sm font-semibold bg-primary/15 text-primary truncate", children: u }) : null,
|
|
132
131
|
n?.length ? /* @__PURE__ */ e("div", { className: "flex flex-col gap-y-1", children: n.map((a, f) => /* @__PURE__ */ e(
|
|
133
132
|
"div",
|
|
@@ -148,7 +147,7 @@ function _({
|
|
|
148
147
|
f
|
|
149
148
|
)) }) : null
|
|
150
149
|
] }),
|
|
151
|
-
o?.title || s?.title ? /* @__PURE__ */ e(
|
|
150
|
+
o?.title || s?.title ? /* @__PURE__ */ e(z, { className: "flex justify-center flex-wrap gap-2 pt-0", children: [
|
|
152
151
|
o && /* @__PURE__ */ e(
|
|
153
152
|
x,
|
|
154
153
|
{
|
|
@@ -156,7 +155,7 @@ function _({
|
|
|
156
155
|
variant: "default",
|
|
157
156
|
size: "sm",
|
|
158
157
|
className: `gap-1.5 truncate ${s ? "" : "w-full"}`,
|
|
159
|
-
disabled:
|
|
158
|
+
disabled: l,
|
|
160
159
|
onClick: () => k(o),
|
|
161
160
|
children: [
|
|
162
161
|
o.icon ? /* @__PURE__ */ e(y, { name: o.icon, size: 14, className: "shrink-0" }) : null,
|
|
@@ -171,7 +170,7 @@ function _({
|
|
|
171
170
|
variant: "outline",
|
|
172
171
|
size: "sm",
|
|
173
172
|
className: "gap-1.5 truncate",
|
|
174
|
-
disabled:
|
|
173
|
+
disabled: l,
|
|
175
174
|
onClick: () => k(s),
|
|
176
175
|
children: [
|
|
177
176
|
s.icon ? /* @__PURE__ */ e(y, { name: s.icon, size: 14, className: "shrink-0" }) : null,
|
|
@@ -182,29 +181,29 @@ function _({
|
|
|
182
181
|
] }) : null
|
|
183
182
|
] });
|
|
184
183
|
}
|
|
185
|
-
function
|
|
184
|
+
function W({
|
|
186
185
|
cards: t,
|
|
187
186
|
onSelect: d,
|
|
188
|
-
disabled:
|
|
189
|
-
className:
|
|
187
|
+
disabled: l = !1,
|
|
188
|
+
className: r,
|
|
190
189
|
orientation: i = "vertical"
|
|
191
190
|
}) {
|
|
192
|
-
const [p, m] =
|
|
191
|
+
const [p, m] = $(!1), h = j(!1);
|
|
193
192
|
if (!t?.length)
|
|
194
193
|
return /* @__PURE__ */ e("p", { className: "text-sm text-muted-foreground py-2", children: "No options available." });
|
|
195
194
|
const u = async (n) => {
|
|
196
195
|
h.current || (h.current = !0, m(!0), await d?.(n));
|
|
197
196
|
};
|
|
198
|
-
return i !== "horizontal" ? /* @__PURE__ */ e("div", { className:
|
|
197
|
+
return i !== "horizontal" ? /* @__PURE__ */ e("div", { className: r ?? "flex flex-col gap-3 mt-3", children: t.map((n, o) => /* @__PURE__ */ e(
|
|
199
198
|
_,
|
|
200
199
|
{
|
|
201
200
|
card: n,
|
|
202
201
|
onSelect: u,
|
|
203
|
-
disabled:
|
|
202
|
+
disabled: l || p
|
|
204
203
|
},
|
|
205
204
|
n.card_id || o
|
|
206
205
|
)) }) : /* @__PURE__ */ e(
|
|
207
|
-
|
|
206
|
+
I,
|
|
208
207
|
{
|
|
209
208
|
count: t.length,
|
|
210
209
|
renderItem: (n) => /* @__PURE__ */ e(
|
|
@@ -212,12 +211,12 @@ function X({
|
|
|
212
211
|
{
|
|
213
212
|
card: t[n],
|
|
214
213
|
onSelect: u,
|
|
215
|
-
disabled:
|
|
214
|
+
disabled: l || p
|
|
216
215
|
}
|
|
217
216
|
)
|
|
218
217
|
}
|
|
219
218
|
);
|
|
220
219
|
}
|
|
221
220
|
export {
|
|
222
|
-
|
|
221
|
+
W as CardList
|
|
223
222
|
};
|
package/dist/{medassist-widget-DoctorCard-DY6gcZr3.js → medassist-widget-DoctorCard-CpQayTwn.js}
RENAMED
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
import { c as k, d as m, A as B, y as z, u as e,
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { M as F } from "./medassist-widget-map-pin-DMI_eIkL.js";
|
|
6
|
-
import { C as he, a as pe } from "./medassist-widget-chevron-right-BMU6ZIMl.js";
|
|
1
|
+
import { c as k, d as m, A as B, y as z, u as e, i as h, C as V, T as O, q as A, _ as ee, j as te, k as ae, l as re, m as ne, n as ie, o as le, S as se, p as oe, r as ce, B as N, s as de } from "./medassist-widget.js";
|
|
2
|
+
import { C as me } from "./medassist-widget-check-BaHLRs-2.js";
|
|
3
|
+
import { M as F } from "./medassist-widget-map-pin-Bx-5lPdC.js";
|
|
4
|
+
import { C as he, a as pe } from "./medassist-widget-chevron-right-CKYbGWbY.js";
|
|
7
5
|
const ue = [
|
|
8
6
|
["path", { d: "M5 12h14", key: "1ays0h" }],
|
|
9
7
|
["path", { d: "m12 5 7 7-7 7", key: "xquz4c" }]
|
|
@@ -131,7 +129,7 @@ function Me({
|
|
|
131
129
|
},
|
|
132
130
|
children: [
|
|
133
131
|
/* @__PURE__ */ e("span", { className: "flex-1 text-left min-w-0 break-words line-clamp-2", children: s.label }),
|
|
134
|
-
p && /* @__PURE__ */ e("span", { className: "absolute right-3 flex size-4 items-center justify-center shrink-0 pointer-events-none", children: /* @__PURE__ */ e(
|
|
132
|
+
p && /* @__PURE__ */ e("span", { className: "absolute right-3 flex size-4 items-center justify-center shrink-0 pointer-events-none", children: /* @__PURE__ */ e(me, { className: "size-4 text-foreground" }) })
|
|
135
133
|
]
|
|
136
134
|
},
|
|
137
135
|
s.value
|
|
@@ -141,15 +139,15 @@ function Me({
|
|
|
141
139
|
)
|
|
142
140
|
] });
|
|
143
141
|
}
|
|
144
|
-
function
|
|
142
|
+
function ze({ doctor: n, doctorDetails: a, onSelect: c, disabled: u, isActive: S = !0 }) {
|
|
145
143
|
const C = O(() => {
|
|
146
144
|
if (a?.hospitals?.[0]?.hospital_id)
|
|
147
145
|
return a?.hospitals?.[0]?.hospital_id;
|
|
148
|
-
}, [a?.hospitals]), [l, b] = m(C), [L, $] = m(!1), [i, y] = m(null), [g, f] = m(null), [x, v] = m(0), [_, s] = m(!1), [p, w] = m(!1), [M, q] = m(!1), [R, T] = m(!1), [E, P] = m(!1), I = B(!1),
|
|
146
|
+
}, [a?.hospitals]), [l, b] = m(C), [L, $] = m(!1), [i, y] = m(null), [g, f] = m(null), [x, v] = m(0), [_, s] = m(!1), [p, w] = m(!1), [M, q] = m(!1), [R, T] = m(!1), [E, P] = m(!1), I = B(!1), H = B(null);
|
|
149
147
|
z(() => {
|
|
150
148
|
b(C);
|
|
151
149
|
}, [C]);
|
|
152
|
-
const r = n.availability ?? [], G =
|
|
150
|
+
const r = n.availability ?? [], G = A(async () => {
|
|
153
151
|
if (!M && (w(!0), !r.length && c && a)) {
|
|
154
152
|
q(!0);
|
|
155
153
|
try {
|
|
@@ -158,7 +156,7 @@ function Le({ doctor: n, doctorDetails: a, onSelect: c, disabled: u, isActive: S
|
|
|
158
156
|
q(!1);
|
|
159
157
|
}
|
|
160
158
|
}
|
|
161
|
-
}, [p, M, c, a, r.length, l]), K =
|
|
159
|
+
}, [p, M, c, a, r.length, l]), K = A(
|
|
162
160
|
(t) => {
|
|
163
161
|
a && (b(t), y(null), f(null), v(0), I.current = !1, c?.({ ...n, hospital_id: t }));
|
|
164
162
|
},
|
|
@@ -177,14 +175,14 @@ function Le({ doctor: n, doctorDetails: a, onSelect: c, disabled: u, isActive: S
|
|
|
177
175
|
[r, i]
|
|
178
176
|
);
|
|
179
177
|
ee(() => {
|
|
180
|
-
const t =
|
|
178
|
+
const t = H.current;
|
|
181
179
|
t && (t.scrollTop = 0, T(t.scrollHeight > t.clientHeight + 2));
|
|
182
180
|
}, [i, j.length]);
|
|
183
|
-
const J =
|
|
184
|
-
const t =
|
|
181
|
+
const J = A(() => {
|
|
182
|
+
const t = H.current;
|
|
185
183
|
t && T(t.scrollTop + t.clientHeight < t.scrollHeight - 4);
|
|
186
184
|
}, []), Q = () => {
|
|
187
|
-
|
|
185
|
+
H.current?.scrollBy({ top: 120, behavior: "smooth" });
|
|
188
186
|
}, U = O(() => {
|
|
189
187
|
if (!r.length) return [];
|
|
190
188
|
const t = Math.min(x + 3, r.length);
|
|
@@ -192,7 +190,7 @@ function Le({ doctor: n, doctorDetails: a, onSelect: c, disabled: u, isActive: S
|
|
|
192
190
|
if (o.date)
|
|
193
191
|
return { ...o, ...te(o.date) };
|
|
194
192
|
});
|
|
195
|
-
}, [r, x]), W = x > 0, X = x < Math.max(0, (r || []).length - 3), Y =
|
|
193
|
+
}, [r, x]), W = x > 0, X = x < Math.max(0, (r || []).length - 3), Y = A(
|
|
196
194
|
async (t) => {
|
|
197
195
|
y(t), f(null);
|
|
198
196
|
const o = r.find((d) => d.date === t);
|
|
@@ -217,11 +215,11 @@ function Le({ doctor: n, doctorDetails: a, onSelect: c, disabled: u, isActive: S
|
|
|
217
215
|
n.cta?.tool_result
|
|
218
216
|
);
|
|
219
217
|
};
|
|
220
|
-
return a ? /* @__PURE__ */ e(
|
|
218
|
+
return a ? /* @__PURE__ */ e(de, { className: "max-w-md h-full rounded-xl border border-black-200 dark:border-white-200 shadow-none p-0 bg-elicitationBg overflow-hidden", children: [
|
|
221
219
|
/* @__PURE__ */ e(ae, { className: "flex flex-row items-center gap-3 bg-primary/[20%] rounded-t-xl p-2 border-b border-border-subtle overflow-hidden", children: [
|
|
222
|
-
/* @__PURE__ */ e(
|
|
223
|
-
a.profile_pic && /* @__PURE__ */ e(
|
|
224
|
-
/* @__PURE__ */ e(
|
|
220
|
+
/* @__PURE__ */ e(re, { className: "h-12 w-12 ring-2 ring-primary/20 flex-shrink-0", children: [
|
|
221
|
+
a.profile_pic && /* @__PURE__ */ e(ne, { src: a.profile_pic, alt: `${a.name} profile photo`, crossOrigin: "anonymous" }),
|
|
222
|
+
/* @__PURE__ */ e(ie, { className: "bg-secondary text-primary", children: le(a.name) })
|
|
225
223
|
] }),
|
|
226
224
|
/* @__PURE__ */ e("div", { className: "min-w-0", children: [
|
|
227
225
|
/* @__PURE__ */ e("h3", { className: "font-bold text-slate-900 leading-tight", style: { fontSize: "0.95rem" }, children: [
|
|
@@ -245,7 +243,7 @@ function Le({ doctor: n, doctorDetails: a, onSelect: c, disabled: u, isActive: S
|
|
|
245
243
|
title: `${a.specialty}${a.experience ? ` • ${a.experience}` : ""}`,
|
|
246
244
|
children: [
|
|
247
245
|
a.specialty,
|
|
248
|
-
a.experience && /* @__PURE__ */ e(
|
|
246
|
+
a.experience && /* @__PURE__ */ e(se, { children: [
|
|
249
247
|
" • ",
|
|
250
248
|
a.experience
|
|
251
249
|
] })
|
|
@@ -254,7 +252,7 @@ function Le({ doctor: n, doctorDetails: a, onSelect: c, disabled: u, isActive: S
|
|
|
254
252
|
)
|
|
255
253
|
] })
|
|
256
254
|
] }),
|
|
257
|
-
/* @__PURE__ */ e(
|
|
255
|
+
/* @__PURE__ */ e(oe, { className: "px-3 py-2", children: [
|
|
258
256
|
/* @__PURE__ */ e("div", { className: "grid gap-1 pb-2 border-b border-border-subtle", children: [
|
|
259
257
|
a.timings && /* @__PURE__ */ e("div", { className: "flex items-start gap-2 min-w-0", children: [
|
|
260
258
|
/* @__PURE__ */ e(ge, { className: "h-3.5 w-3.5 text-primary mt-0.5 flex-shrink-0", "aria-hidden": !0 }),
|
|
@@ -289,7 +287,7 @@ function Le({ doctor: n, doctorDetails: a, onSelect: c, disabled: u, isActive: S
|
|
|
289
287
|
"text-text-secondary text-xs leading-snug prose prose-sm max-w-none prose-strong:font-semibold prose-p:my-0 break-words overflow-hidden",
|
|
290
288
|
!E && "line-clamp-1"
|
|
291
289
|
),
|
|
292
|
-
children: /* @__PURE__ */ e(
|
|
290
|
+
children: /* @__PURE__ */ e(ce, { children: a.info })
|
|
293
291
|
}
|
|
294
292
|
),
|
|
295
293
|
/* @__PURE__ */ e(
|
|
@@ -368,7 +366,7 @@ function Le({ doctor: n, doctorDetails: a, onSelect: c, disabled: u, isActive: S
|
|
|
368
366
|
/* @__PURE__ */ e(
|
|
369
367
|
"div",
|
|
370
368
|
{
|
|
371
|
-
ref:
|
|
369
|
+
ref: H,
|
|
372
370
|
onScroll: J,
|
|
373
371
|
className: "grid grid-cols-3 gap-2 overflow-y-auto overscroll-contain",
|
|
374
372
|
style: { maxHeight: "108px" },
|
|
@@ -439,5 +437,5 @@ function Le({ doctor: n, doctorDetails: a, onSelect: c, disabled: u, isActive: S
|
|
|
439
437
|
] }) : null;
|
|
440
438
|
}
|
|
441
439
|
export {
|
|
442
|
-
|
|
440
|
+
ze as DoctorCard
|
|
443
441
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { d as l, A as d, y as N, _ as R, u as r,
|
|
2
|
-
import { C as A, a as M } from "./medassist-widget-chevron-right-
|
|
1
|
+
import { d as l, A as d, y as N, _ as R, u as r, i as z } from "./medassist-widget.js";
|
|
2
|
+
import { C as A, a as M } from "./medassist-widget-chevron-right-CKYbGWbY.js";
|
|
3
3
|
const v = 12, T = 0.76, I = 3;
|
|
4
4
|
function k({ count: s, renderItem: h, className: u }) {
|
|
5
|
-
const [n, x] = l(0), [
|
|
5
|
+
const [n, x] = l(0), [i, m] = l(0), [y, g] = l(() => Math.min(I, s)), b = d(null), f = d(0), p = d(0);
|
|
6
6
|
if (N(() => {
|
|
7
7
|
g((t) => Math.max(t, Math.min(n + 2, s)));
|
|
8
8
|
}, [n, s]), R(() => {
|
|
@@ -12,11 +12,11 @@ function k({ count: s, renderItem: h, className: u }) {
|
|
|
12
12
|
const e = new ResizeObserver(([a]) => m(a.contentRect.width));
|
|
13
13
|
return e.observe(t), () => e.disconnect();
|
|
14
14
|
}, []), s === 0) return null;
|
|
15
|
-
const
|
|
15
|
+
const o = (t) => x(Math.max(0, Math.min(s - 1, t)));
|
|
16
16
|
if (s === 1)
|
|
17
17
|
return /* @__PURE__ */ r("div", { className: u ?? "mt-3", children: h(0, !0) });
|
|
18
|
-
const c =
|
|
19
|
-
return /* @__PURE__ */ r("div", { ref: b, className: z("mt-3 w-full", u), children:
|
|
18
|
+
const c = i * T, C = (i - c) / 2, w = i > 0 ? C - n * (c + v) : 0;
|
|
19
|
+
return /* @__PURE__ */ r("div", { ref: b, className: z("mt-3 w-full", u), children: i > 0 && /* Relative wrapper so buttons sit outside overflow but share the same stacking context */
|
|
20
20
|
/* @__PURE__ */ r("div", { className: "relative w-full", children: [
|
|
21
21
|
/* @__PURE__ */ r(
|
|
22
22
|
"div",
|
|
@@ -27,7 +27,7 @@ function k({ count: s, renderItem: h, className: u }) {
|
|
|
27
27
|
},
|
|
28
28
|
onTouchEnd: (t) => {
|
|
29
29
|
const e = t.changedTouches[0].clientX - f.current, a = t.changedTouches[0].clientY - p.current;
|
|
30
|
-
Math.abs(e) > Math.abs(a) && Math.abs(e) > 50 &&
|
|
30
|
+
Math.abs(e) > Math.abs(a) && Math.abs(e) > 50 && o(n + (e < 0 ? 1 : -1));
|
|
31
31
|
},
|
|
32
32
|
children: /* @__PURE__ */ r(
|
|
33
33
|
"div",
|
|
@@ -68,7 +68,7 @@ function k({ count: s, renderItem: h, className: u }) {
|
|
|
68
68
|
{
|
|
69
69
|
type: "button",
|
|
70
70
|
"aria-label": "Previous",
|
|
71
|
-
onClick: () =>
|
|
71
|
+
onClick: () => o(n - 1),
|
|
72
72
|
className: "absolute left-0 top-1/2 -translate-y-1/2 z-10 h-10 w-10 p-2 flex items-center justify-center rounded-full bg-background/90 shadow-md border border-primary text-primary hover:bg-muted transition-colors",
|
|
73
73
|
children: /* @__PURE__ */ r(A, { size: 18 })
|
|
74
74
|
}
|
|
@@ -78,7 +78,7 @@ function k({ count: s, renderItem: h, className: u }) {
|
|
|
78
78
|
{
|
|
79
79
|
type: "button",
|
|
80
80
|
"aria-label": "Next",
|
|
81
|
-
onClick: () =>
|
|
81
|
+
onClick: () => o(n + 1),
|
|
82
82
|
className: "absolute right-0 top-1/2 -translate-y-1/2 z-10 h-10 w-10 p-2 flex items-center justify-center rounded-full bg-background/90 shadow-md border border-primary text-primary hover:bg-muted transition-colors",
|
|
83
83
|
children: /* @__PURE__ */ r(M, { size: 18 })
|
|
84
84
|
}
|
package/dist/{medassist-widget-MultiSelect-2yroeYrx.js → medassist-widget-MultiSelect-BnExX-Ty.js}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { A as x, y as E, q as X, d as _, R as j,
|
|
2
|
-
import { C as Z } from "./medassist-widget-check-
|
|
1
|
+
import { A as x, y as E, q as X, d as _, R as j, b as O, T as Y, D as y, e as J, u as l, P as S, f as Q, S as D, g as T, h as M, i as N } from "./medassist-widget.js";
|
|
2
|
+
import { C as Z } from "./medassist-widget-check-BaHLRs-2.js";
|
|
3
3
|
var V = j[" useInsertionEffect ".trim().toString()] || O;
|
|
4
4
|
function ee({
|
|
5
5
|
prop: e,
|
|
@@ -17,7 +17,7 @@ function ee({
|
|
|
17
17
|
E(() => {
|
|
18
18
|
const h = b.current;
|
|
19
19
|
if (h !== d) {
|
|
20
|
-
const p = h ? "controlled" : "uncontrolled",
|
|
20
|
+
const p = h ? "controlled" : "uncontrolled", g = d ? "controlled" : "uncontrolled";
|
|
21
21
|
}
|
|
22
22
|
b.current = d;
|
|
23
23
|
}, [d, a]);
|
|
@@ -74,7 +74,7 @@ function oe(e) {
|
|
|
74
74
|
c(void 0);
|
|
75
75
|
}, [e]), r;
|
|
76
76
|
}
|
|
77
|
-
var
|
|
77
|
+
var P = "Checkbox", [ce] = J(P), [se, z] = ce(P);
|
|
78
78
|
function ie(e) {
|
|
79
79
|
const {
|
|
80
80
|
__scopeCheckbox: r,
|
|
@@ -89,18 +89,18 @@ function ie(e) {
|
|
|
89
89
|
value: b = "on",
|
|
90
90
|
// @ts-expect-error
|
|
91
91
|
internal_do_not_use_render: h
|
|
92
|
-
} = e, [p,
|
|
92
|
+
} = e, [p, g] = ee({
|
|
93
93
|
prop: c,
|
|
94
94
|
defaultProp: s ?? !1,
|
|
95
95
|
onChange: t,
|
|
96
|
-
caller:
|
|
97
|
-
}), [C, n] = _(null), [m, u] = _(null), f = x(!1),
|
|
96
|
+
caller: P
|
|
97
|
+
}), [C, n] = _(null), [m, u] = _(null), f = x(!1), w = C ? !!i || !!C.closest("form") : (
|
|
98
98
|
// We set this to true by default so that events bubble to forms without JS (SSR)
|
|
99
99
|
!0
|
|
100
|
-
),
|
|
100
|
+
), I = {
|
|
101
101
|
checked: p,
|
|
102
102
|
disabled: o,
|
|
103
|
-
setChecked:
|
|
103
|
+
setChecked: g,
|
|
104
104
|
control: C,
|
|
105
105
|
setControl: n,
|
|
106
106
|
name: d,
|
|
@@ -108,8 +108,8 @@ function ie(e) {
|
|
|
108
108
|
value: b,
|
|
109
109
|
hasConsumerStoppedPropagationRef: f,
|
|
110
110
|
required: v,
|
|
111
|
-
defaultChecked:
|
|
112
|
-
isFormControl:
|
|
111
|
+
defaultChecked: k(s) ? !1 : s,
|
|
112
|
+
isFormControl: w,
|
|
113
113
|
bubbleInput: m,
|
|
114
114
|
setBubbleInput: u
|
|
115
115
|
};
|
|
@@ -117,8 +117,8 @@ function ie(e) {
|
|
|
117
117
|
se,
|
|
118
118
|
{
|
|
119
119
|
scope: r,
|
|
120
|
-
...
|
|
121
|
-
children: ae(h) ? h(
|
|
120
|
+
...I,
|
|
121
|
+
children: ae(h) ? h(I) : a
|
|
122
122
|
}
|
|
123
123
|
);
|
|
124
124
|
}
|
|
@@ -133,7 +133,7 @@ var $ = "CheckboxTrigger", q = y(
|
|
|
133
133
|
setControl: b,
|
|
134
134
|
setChecked: h,
|
|
135
135
|
hasConsumerStoppedPropagationRef: p,
|
|
136
|
-
isFormControl:
|
|
136
|
+
isFormControl: g,
|
|
137
137
|
bubbleInput: C
|
|
138
138
|
} = z($, e), n = T(s, b), m = x(t);
|
|
139
139
|
return E(() => {
|
|
@@ -147,7 +147,7 @@ var $ = "CheckboxTrigger", q = y(
|
|
|
147
147
|
{
|
|
148
148
|
type: "button",
|
|
149
149
|
role: "checkbox",
|
|
150
|
-
"aria-checked":
|
|
150
|
+
"aria-checked": k(t) ? "mixed" : t,
|
|
151
151
|
"aria-required": v,
|
|
152
152
|
"data-state": G(t),
|
|
153
153
|
"data-disabled": d ? "" : void 0,
|
|
@@ -159,7 +159,7 @@ var $ = "CheckboxTrigger", q = y(
|
|
|
159
159
|
u.key === "Enter" && u.preventDefault();
|
|
160
160
|
}),
|
|
161
161
|
onClick: M(c, (u) => {
|
|
162
|
-
h((f) =>
|
|
162
|
+
h((f) => k(f) ? !0 : !f), C && g && (p.current = u.isPropagationStopped(), p.current || u.stopPropagation());
|
|
163
163
|
})
|
|
164
164
|
}
|
|
165
165
|
);
|
|
@@ -212,14 +212,14 @@ var A = y(
|
|
|
212
212
|
);
|
|
213
213
|
}
|
|
214
214
|
);
|
|
215
|
-
A.displayName =
|
|
215
|
+
A.displayName = P;
|
|
216
216
|
var F = "CheckboxIndicator", H = y(
|
|
217
217
|
(e, r) => {
|
|
218
218
|
const { __scopeCheckbox: c, forceMount: a, ...s } = e, o = z(F, c);
|
|
219
219
|
return /* @__PURE__ */ l(
|
|
220
220
|
Q,
|
|
221
221
|
{
|
|
222
|
-
present: a ||
|
|
222
|
+
present: a || k(o.checked) || o.checked === !0,
|
|
223
223
|
children: /* @__PURE__ */ l(
|
|
224
224
|
S.span,
|
|
225
225
|
{
|
|
@@ -248,21 +248,21 @@ var L = "CheckboxBubbleInput", U = y(
|
|
|
248
248
|
value: b,
|
|
249
249
|
form: h,
|
|
250
250
|
bubbleInput: p,
|
|
251
|
-
setBubbleInput:
|
|
252
|
-
} = z(L, e), C = T(c,
|
|
251
|
+
setBubbleInput: g
|
|
252
|
+
} = z(L, e), C = T(c, g), n = ne(o), m = oe(a);
|
|
253
253
|
E(() => {
|
|
254
254
|
const f = p;
|
|
255
255
|
if (!f) return;
|
|
256
|
-
const
|
|
257
|
-
|
|
256
|
+
const w = window.HTMLInputElement.prototype, B = Object.getOwnPropertyDescriptor(
|
|
257
|
+
w,
|
|
258
258
|
"checked"
|
|
259
259
|
).set, K = !s.current;
|
|
260
260
|
if (n !== o && B) {
|
|
261
261
|
const W = new Event("click", { bubbles: K });
|
|
262
|
-
f.indeterminate =
|
|
262
|
+
f.indeterminate = k(o), B.call(f, k(o) ? !1 : o), f.dispatchEvent(W);
|
|
263
263
|
}
|
|
264
264
|
}, [p, n, o, s]);
|
|
265
|
-
const u = x(
|
|
265
|
+
const u = x(k(o) ? !1 : o);
|
|
266
266
|
return /* @__PURE__ */ l(
|
|
267
267
|
S.input,
|
|
268
268
|
{
|
|
@@ -297,11 +297,11 @@ U.displayName = L;
|
|
|
297
297
|
function ae(e) {
|
|
298
298
|
return typeof e == "function";
|
|
299
299
|
}
|
|
300
|
-
function
|
|
300
|
+
function k(e) {
|
|
301
301
|
return e === "indeterminate";
|
|
302
302
|
}
|
|
303
303
|
function G(e) {
|
|
304
|
-
return
|
|
304
|
+
return k(e) ? "indeterminate" : e ? "checked" : "unchecked";
|
|
305
305
|
}
|
|
306
306
|
const R = y(({ className: e, ...r }, c) => /* @__PURE__ */ l(
|
|
307
307
|
A,
|
|
@@ -340,7 +340,7 @@ function ue({
|
|
|
340
340
|
} : null, v = (n) => t ? n.filter((m) => m !== t.value) : n, b = (n) => t ? a === "none_of_the_above" ? n ? [t.value] : [] : a === "all_of_the_above" ? n ? [...e.map((m) => m.value), t.value] : v(r) : n ? [...r, t.value] : v(r) : r, h = (n, m) => {
|
|
341
341
|
const u = t ? v(r) : r;
|
|
342
342
|
return m ? i && u.length >= i ? null : [...u, n] : u.filter((f) => f !== n);
|
|
343
|
-
}, p = (n) => !(o && n.length === 0 && r.length === 1),
|
|
343
|
+
}, p = (n) => !(o && n.length === 0 && r.length === 1), g = (n, m) => {
|
|
344
344
|
const f = t && n === t.value ? b(m) : h(n, m);
|
|
345
345
|
f !== null && p(f) && c(f);
|
|
346
346
|
}, C = t ? r.filter((n) => n !== t.value).length : r.length;
|
|
@@ -362,7 +362,7 @@ function ue({
|
|
|
362
362
|
id: n.id,
|
|
363
363
|
checked: u,
|
|
364
364
|
disabled: !!m,
|
|
365
|
-
onCheckedChange: (f) =>
|
|
365
|
+
onCheckedChange: (f) => g(n.value, !!f),
|
|
366
366
|
className: "mt-0.5 border border-muted-foreground text-primary-foreground"
|
|
367
367
|
}
|
|
368
368
|
),
|
|
@@ -389,7 +389,7 @@ function ue({
|
|
|
389
389
|
{
|
|
390
390
|
id: t.id,
|
|
391
391
|
checked: r.includes(t.value),
|
|
392
|
-
onCheckedChange: (n) =>
|
|
392
|
+
onCheckedChange: (n) => g(t.value, n),
|
|
393
393
|
className: "mt-0.5 border border-muted-foreground"
|
|
394
394
|
}
|
|
395
395
|
),
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import { c, u as e, d as y, a as t, B as l } from "./medassist-widget
|
|
2
|
-
import { M as h } from "./medassist-widget-mic-DWQVxBaT.js";
|
|
3
|
-
import { X as v } from "./medassist-widget-x-DpXIaEQs.js";
|
|
1
|
+
import { c, u as e, d as y, a as t, B as l, M as h, X as v } from "./medassist-widget.js";
|
|
4
2
|
const x = [
|
|
5
3
|
["path", { d: "M12 19v3", key: "npa21l" }],
|
|
6
4
|
["path", { d: "M15 9.34V5a3 3 0 0 0-5.68-1.33", key: "1gzdoj" }],
|
|
@@ -269,16 +267,16 @@ function G() {
|
|
|
269
267
|
/* @__PURE__ */ e("circle", { cx: "120", cy: "120", r: "112", fill: "none", stroke: "currentColor", strokeOpacity: "0.08", strokeWidth: "0.6" })
|
|
270
268
|
] });
|
|
271
269
|
}
|
|
272
|
-
function
|
|
270
|
+
function M({
|
|
273
271
|
state: i,
|
|
274
272
|
isMuted: r,
|
|
275
273
|
onEndCall: s,
|
|
276
274
|
onClose: o,
|
|
277
275
|
onToggleMute: d,
|
|
278
|
-
agentName:
|
|
276
|
+
agentName: f = "Health Assist",
|
|
279
277
|
textColor: u = "white"
|
|
280
278
|
}) {
|
|
281
|
-
const [
|
|
279
|
+
const [m, n] = y(!1);
|
|
282
280
|
if (i === t.VOICE_AGENT_STATE.ERROR)
|
|
283
281
|
return /* @__PURE__ */ e("div", { className: "flex-1 flex flex-col items-center justify-center bg-surface gap-4 p-8", children: [
|
|
284
282
|
/* @__PURE__ */ e("div", { className: "w-16 h-16 rounded-full bg-destructive/10 flex items-center justify-center", children: /* @__PURE__ */ e(N, { className: "w-7 h-7 text-destructive" }) }),
|
|
@@ -296,7 +294,7 @@ function O({
|
|
|
296
294
|
return `Please wait while we are
|
|
297
295
|
connecting to an AI agent...`;
|
|
298
296
|
case t.VOICE_AGENT_STATE.SPEAKING:
|
|
299
|
-
return `${
|
|
297
|
+
return `${f} is speaking...`;
|
|
300
298
|
case t.VOICE_AGENT_STATE.LISTENING:
|
|
301
299
|
return "You are speaking...";
|
|
302
300
|
case t.VOICE_AGENT_STATE.THINKING:
|
|
@@ -348,7 +346,7 @@ connecting to an AI agent...`;
|
|
|
348
346
|
)
|
|
349
347
|
] })
|
|
350
348
|
] }),
|
|
351
|
-
|
|
349
|
+
m && /* @__PURE__ */ e("div", { className: "absolute inset-0 z-50 flex items-center justify-center bg-black/40", children: /* @__PURE__ */ e("div", { className: "bg-background rounded-2xl shadow-xl mx-6 p-6 w-full max-w-[280px] flex flex-col items-center gap-3", children: [
|
|
352
350
|
/* @__PURE__ */ e("p", { className: "text-base font-semibold text-foreground text-center", children: "Exit voice mode?" }),
|
|
353
351
|
/* @__PURE__ */ e("p", { className: "text-sm text-muted-foreground text-center leading-5", children: "This will close your voice session. You can continue your chat." }),
|
|
354
352
|
/* @__PURE__ */ e("div", { className: "flex flex-col w-full gap-2 mt-2", children: [
|
|
@@ -417,5 +415,5 @@ const E = `
|
|
|
417
415
|
.voice-end-btn:disabled { opacity: 0.5; cursor: not-allowed; }
|
|
418
416
|
`;
|
|
419
417
|
export {
|
|
420
|
-
|
|
418
|
+
M as default
|
|
421
419
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as o } from "./medassist-widget
|
|
1
|
+
import { c as o } from "./medassist-widget.js";
|
|
2
2
|
const e = [["path", { d: "m15 18-6-6 6-6", key: "1wnfg3" }]], n = o("chevron-left", e);
|
|
3
3
|
const t = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]], h = o("chevron-right", t);
|
|
4
4
|
export {
|