@livelayer/react 0.5.3 → 0.5.4
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/index.d.ts +60 -0
- package/dist/index.js +3 -3
- package/dist/index.mjs +702 -660
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as _, jsx as n, Fragment as
|
|
3
|
-
import { Component as
|
|
4
|
-
import { LiveKitSession as
|
|
5
|
-
import { createLocalAudioTrack as
|
|
6
|
-
class
|
|
2
|
+
import { jsxs as _, jsx as n, Fragment as Ft } from "react/jsx-runtime";
|
|
3
|
+
import { Component as sn, useState as N, useRef as I, useEffect as P, useCallback as S, useMemo as Qe, forwardRef as dt, createElement as dn } from "react";
|
|
4
|
+
import { LiveKitSession as un } from "@livelayer/sdk";
|
|
5
|
+
import { createLocalAudioTrack as fn, Track as Ut, createLocalVideoTrack as pn } from "livekit-client";
|
|
6
|
+
class hn extends sn {
|
|
7
7
|
constructor() {
|
|
8
8
|
super(...arguments), this.state = { hasError: !1, error: null }, this.reset = () => {
|
|
9
9
|
this.setState({ hasError: !1, error: null });
|
|
@@ -33,9 +33,9 @@ class un extends ln {
|
|
|
33
33
|
] }) : this.props.children;
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
|
-
function
|
|
37
|
-
const [t, r] = N("idle"), [o, i] = N("idle"), [l, s] = N([]), [d, u] = N(null), [h, m] = N(null), [a, c] = N(null), [A, C] = N(!1), [R, b] = N(null), L = I(null),
|
|
38
|
-
|
|
36
|
+
function mn(e) {
|
|
37
|
+
const [t, r] = N("idle"), [o, i] = N("idle"), [l, s] = N([]), [d, u] = N(null), [h, m] = N(null), [a, c] = N(null), [A, C] = N(!1), [R, b] = N(null), L = I(null), z = I(e.onDataMessage);
|
|
38
|
+
z.current = e.onDataMessage, P(() => {
|
|
39
39
|
const g = {
|
|
40
40
|
onConnectionStateChange: (x) => {
|
|
41
41
|
r(x), x === "connected" && b(null);
|
|
@@ -49,10 +49,10 @@ function fn(e) {
|
|
|
49
49
|
onError: (x) => b(x),
|
|
50
50
|
onDataMessage: (x) => {
|
|
51
51
|
var q;
|
|
52
|
-
(q =
|
|
52
|
+
(q = z.current) == null || q.call(z, x);
|
|
53
53
|
},
|
|
54
54
|
onResumabilityChange: C
|
|
55
|
-
}, E = new
|
|
55
|
+
}, E = new un(
|
|
56
56
|
{
|
|
57
57
|
agentId: e.agentId,
|
|
58
58
|
baseUrl: e.baseUrl,
|
|
@@ -81,7 +81,7 @@ function fn(e) {
|
|
|
81
81
|
} catch (E) {
|
|
82
82
|
throw b(E instanceof Error ? E.message : String(E)), E;
|
|
83
83
|
}
|
|
84
|
-
}, []),
|
|
84
|
+
}, []), O = S(() => {
|
|
85
85
|
const g = L.current;
|
|
86
86
|
g && g.disconnect();
|
|
87
87
|
}, []), p = S(() => {
|
|
@@ -98,12 +98,12 @@ function fn(e) {
|
|
|
98
98
|
canResume: A,
|
|
99
99
|
error: R,
|
|
100
100
|
connect: M,
|
|
101
|
-
disconnect:
|
|
101
|
+
disconnect: O,
|
|
102
102
|
getRoom: p,
|
|
103
103
|
session: L.current
|
|
104
104
|
};
|
|
105
105
|
}
|
|
106
|
-
function
|
|
106
|
+
function gn() {
|
|
107
107
|
const e = I(null), t = I(null), r = I(null), o = I(null), i = I(/* @__PURE__ */ new Set()), l = I(null), s = S(() => {
|
|
108
108
|
const a = t.current;
|
|
109
109
|
if (!a) {
|
|
@@ -179,7 +179,7 @@ function pn() {
|
|
|
179
179
|
i.current.clear(), l.current = null;
|
|
180
180
|
}, [h]), { attach: u, detach: h, subscribe: m };
|
|
181
181
|
}
|
|
182
|
-
function
|
|
182
|
+
function yn() {
|
|
183
183
|
const [e, t] = N(!1), [r, o] = N(null), i = I(null), l = I(null), s = S(async (m) => {
|
|
184
184
|
if (i.current && l.current) {
|
|
185
185
|
try {
|
|
@@ -190,7 +190,7 @@ function hn() {
|
|
|
190
190
|
}
|
|
191
191
|
l.current = m, o(null);
|
|
192
192
|
try {
|
|
193
|
-
const a = await
|
|
193
|
+
const a = await fn({
|
|
194
194
|
echoCancellation: !0,
|
|
195
195
|
noiseSuppression: !0
|
|
196
196
|
});
|
|
@@ -222,14 +222,14 @@ function hn() {
|
|
|
222
222
|
clearError: h
|
|
223
223
|
};
|
|
224
224
|
}
|
|
225
|
-
const
|
|
226
|
-
function
|
|
225
|
+
const vn = { resolution: { width: 640, height: 480, frameRate: 24 } };
|
|
226
|
+
function bn() {
|
|
227
227
|
const [e, t] = N(!1), [r, o] = N(null), [i, l] = N(null), [s, d] = N(""), u = I(null), h = I(null), m = S((L) => {
|
|
228
228
|
u.current = L;
|
|
229
229
|
}, []), a = S(() => {
|
|
230
|
-
const L = u.current,
|
|
231
|
-
if (
|
|
232
|
-
const M = L.localParticipant.getTrackPublication(
|
|
230
|
+
const L = u.current, z = h.current;
|
|
231
|
+
if (z && L) {
|
|
232
|
+
const M = L.localParticipant.getTrackPublication(Ut.Source.Camera);
|
|
233
233
|
if (M != null && M.track) {
|
|
234
234
|
try {
|
|
235
235
|
L.localParticipant.unpublishTrack(M.track);
|
|
@@ -237,30 +237,30 @@ function gn() {
|
|
|
237
237
|
}
|
|
238
238
|
M.track.stop();
|
|
239
239
|
} else
|
|
240
|
-
|
|
240
|
+
z.stop();
|
|
241
241
|
}
|
|
242
242
|
h.current = null, l(null), t(!1);
|
|
243
243
|
}, []), c = S(async (L) => {
|
|
244
|
-
const
|
|
245
|
-
if (
|
|
244
|
+
const z = u.current;
|
|
245
|
+
if (z) {
|
|
246
246
|
o(null);
|
|
247
247
|
try {
|
|
248
|
-
const M = { ...
|
|
248
|
+
const M = { ...vn };
|
|
249
249
|
L && (M.deviceId = L);
|
|
250
|
-
const
|
|
251
|
-
await
|
|
252
|
-
const p =
|
|
250
|
+
const O = await pn(M);
|
|
251
|
+
await z.localParticipant.publishTrack(O), h.current = O;
|
|
252
|
+
const p = O.attach();
|
|
253
253
|
l(p), t(!0), L && d(L);
|
|
254
254
|
try {
|
|
255
|
-
|
|
255
|
+
z.localParticipant.publishData(
|
|
256
256
|
new TextEncoder().encode(JSON.stringify({ type: "user_camera_on" })),
|
|
257
257
|
{ reliable: !0 }
|
|
258
258
|
);
|
|
259
259
|
} catch {
|
|
260
260
|
}
|
|
261
261
|
} catch (M) {
|
|
262
|
-
const
|
|
263
|
-
o(
|
|
262
|
+
const O = M instanceof Error && M.name === "NotAllowedError" ? "Enable your camera in the browser to share video." : "Camera unavailable. Check permissions and try again.";
|
|
263
|
+
o(O);
|
|
264
264
|
}
|
|
265
265
|
}
|
|
266
266
|
}, []), A = S(async () => {
|
|
@@ -284,7 +284,7 @@ function gn() {
|
|
|
284
284
|
clearError: b
|
|
285
285
|
};
|
|
286
286
|
}
|
|
287
|
-
function
|
|
287
|
+
function wn() {
|
|
288
288
|
const [e, t] = N(!1), [r, o] = N(null), [i, l] = N(null), s = I(null), d = S((c) => {
|
|
289
289
|
s.current = c;
|
|
290
290
|
}, []), u = S(() => l(null), []), h = S(async () => {
|
|
@@ -303,7 +303,7 @@ function yn() {
|
|
|
303
303
|
await c.localParticipant.setScreenShareEnabled(!0);
|
|
304
304
|
let A = 0;
|
|
305
305
|
const C = () => {
|
|
306
|
-
const R = c.localParticipant.getTrackPublication(
|
|
306
|
+
const R = c.localParticipant.getTrackPublication(Ut.Source.ScreenShare);
|
|
307
307
|
if (R != null && R.track) {
|
|
308
308
|
const b = R.track.attach();
|
|
309
309
|
l(b), t(!0);
|
|
@@ -335,7 +335,7 @@ function yn() {
|
|
|
335
335
|
}, [e, u]), a = S(() => o(null), []);
|
|
336
336
|
return { isEnabled: e, error: r, previewEl: i, toggle: h, attachRoom: d, teardown: m, clearError: a };
|
|
337
337
|
}
|
|
338
|
-
function
|
|
338
|
+
function _n() {
|
|
339
339
|
const [e, t] = N([]), [r, o] = N([]), i = S(async () => {
|
|
340
340
|
if (!(typeof navigator > "u" || !navigator.mediaDevices))
|
|
341
341
|
try {
|
|
@@ -350,7 +350,7 @@ function vn() {
|
|
|
350
350
|
return navigator.mediaDevices.addEventListener("devicechange", l), () => navigator.mediaDevices.removeEventListener("devicechange", l);
|
|
351
351
|
}, [i]), { mics: e, cameras: r, refresh: i };
|
|
352
352
|
}
|
|
353
|
-
function
|
|
353
|
+
function xn(e, t, r = !1) {
|
|
354
354
|
const [o, i] = N(null), [l, s] = N(null), [d, u] = N(!r && !!e);
|
|
355
355
|
return P(() => {
|
|
356
356
|
if (r || !e) {
|
|
@@ -373,7 +373,7 @@ function bn(e, t, r = !1) {
|
|
|
373
373
|
}), () => h.abort();
|
|
374
374
|
}, [e, t, r]), { info: o, error: l, loading: d };
|
|
375
375
|
}
|
|
376
|
-
function
|
|
376
|
+
function kn(e) {
|
|
377
377
|
if (typeof window > "u") return null;
|
|
378
378
|
try {
|
|
379
379
|
return window.localStorage.getItem(e);
|
|
@@ -381,14 +381,14 @@ function wn(e) {
|
|
|
381
381
|
return null;
|
|
382
382
|
}
|
|
383
383
|
}
|
|
384
|
-
function
|
|
384
|
+
function Ln(e, t) {
|
|
385
385
|
if (!(typeof window > "u"))
|
|
386
386
|
try {
|
|
387
387
|
window.localStorage.setItem(e, t);
|
|
388
388
|
} catch {
|
|
389
389
|
}
|
|
390
390
|
}
|
|
391
|
-
function
|
|
391
|
+
function Sn({
|
|
392
392
|
value: e,
|
|
393
393
|
defaultValue: t = "expanded",
|
|
394
394
|
onChange: r
|
|
@@ -401,32 +401,32 @@ function xn({
|
|
|
401
401
|
);
|
|
402
402
|
return [s, d];
|
|
403
403
|
}
|
|
404
|
-
const
|
|
405
|
-
function
|
|
406
|
-
return e &&
|
|
404
|
+
const Cn = ["hidden", "minimized", "expanded"];
|
|
405
|
+
function En(e) {
|
|
406
|
+
return e && Cn.includes(e) ? e : null;
|
|
407
407
|
}
|
|
408
|
-
function
|
|
408
|
+
function Nn({
|
|
409
409
|
value: e,
|
|
410
410
|
defaultValue: t = "expanded",
|
|
411
411
|
onChange: r,
|
|
412
412
|
persistKey: o = "ll-widget",
|
|
413
413
|
disablePersistence: i = !1
|
|
414
414
|
} = {}) {
|
|
415
|
-
const l = `${o}:display-mode`, s = I(!1), [d, u] =
|
|
415
|
+
const l = `${o}:display-mode`, s = I(!1), [d, u] = Sn({
|
|
416
416
|
value: e,
|
|
417
417
|
defaultValue: t,
|
|
418
418
|
onChange: (h) => {
|
|
419
|
-
e === void 0 && !i &&
|
|
419
|
+
e === void 0 && !i && Ln(l, h), r == null || r(h);
|
|
420
420
|
}
|
|
421
421
|
});
|
|
422
422
|
return P(() => {
|
|
423
423
|
if (s.current || (s.current = !0, i || e !== void 0)) return;
|
|
424
|
-
const h =
|
|
424
|
+
const h = En(kn(l));
|
|
425
425
|
h && h !== d && u(h);
|
|
426
426
|
}, []), [d, u];
|
|
427
427
|
}
|
|
428
|
-
const
|
|
429
|
-
function
|
|
428
|
+
const An = 640;
|
|
429
|
+
function Rn(e = An) {
|
|
430
430
|
const [t, r] = N(!1);
|
|
431
431
|
return P(() => {
|
|
432
432
|
if (e === !1) {
|
|
@@ -441,67 +441,67 @@ function En(e = Cn) {
|
|
|
441
441
|
});
|
|
442
442
|
}, [e]), t;
|
|
443
443
|
}
|
|
444
|
-
const
|
|
445
|
-
function
|
|
446
|
-
if (typeof window > "u" || window.history[
|
|
444
|
+
const Et = "__llHistoryPatched", Ze = "ll:pathname";
|
|
445
|
+
function In() {
|
|
446
|
+
if (typeof window > "u" || window.history[Et]) return;
|
|
447
447
|
const e = window.history.pushState, t = window.history.replaceState;
|
|
448
448
|
window.history.pushState = function(...r) {
|
|
449
449
|
const o = e.apply(this, r);
|
|
450
|
-
return window.dispatchEvent(new Event(
|
|
450
|
+
return window.dispatchEvent(new Event(Ze)), o;
|
|
451
451
|
}, window.history.replaceState = function(...r) {
|
|
452
452
|
const o = t.apply(this, r);
|
|
453
|
-
return window.dispatchEvent(new Event(
|
|
454
|
-
}, window.history[
|
|
453
|
+
return window.dispatchEvent(new Event(Ze)), o;
|
|
454
|
+
}, window.history[Et] = !0;
|
|
455
455
|
}
|
|
456
|
-
function
|
|
456
|
+
function Nt() {
|
|
457
457
|
return typeof window > "u" ? "/" : window.location.pathname || "/";
|
|
458
458
|
}
|
|
459
|
-
function
|
|
459
|
+
function Mn(e) {
|
|
460
460
|
const [t, r] = N(
|
|
461
|
-
() => e ??
|
|
461
|
+
() => e ?? Nt()
|
|
462
462
|
);
|
|
463
463
|
return P(() => {
|
|
464
464
|
if (e !== void 0) return;
|
|
465
|
-
|
|
466
|
-
const o = () => r(
|
|
467
|
-
return o(), window.addEventListener("popstate", o), window.addEventListener(
|
|
468
|
-
window.removeEventListener("popstate", o), window.removeEventListener(
|
|
465
|
+
In();
|
|
466
|
+
const o = () => r(Nt());
|
|
467
|
+
return o(), window.addEventListener("popstate", o), window.addEventListener(Ze, o), () => {
|
|
468
|
+
window.removeEventListener("popstate", o), window.removeEventListener(Ze, o);
|
|
469
469
|
};
|
|
470
470
|
}, [e]), e ?? t;
|
|
471
471
|
}
|
|
472
|
-
const
|
|
473
|
-
function
|
|
474
|
-
return e.replace(
|
|
472
|
+
const At = /* @__PURE__ */ new Map(), Tn = /[\\^$+?.()|{}[\]]/g;
|
|
473
|
+
function Pn(e) {
|
|
474
|
+
return e.replace(Tn, "\\$&");
|
|
475
475
|
}
|
|
476
|
-
function
|
|
477
|
-
const t =
|
|
476
|
+
function Dn(e) {
|
|
477
|
+
const t = At.get(e);
|
|
478
478
|
if (t) return t;
|
|
479
|
-
const r = e.length > 1 && e.endsWith("/") ? e.slice(0, -1) : e, o = "", i = "", l = r.replace(/\*\*/g, o).replace(/\*/g, i), d =
|
|
480
|
-
return
|
|
479
|
+
const r = e.length > 1 && e.endsWith("/") ? e.slice(0, -1) : e, o = "", i = "", l = r.replace(/\*\*/g, o).replace(/\*/g, i), d = Pn(l).replace(new RegExp(`\\/${o}`, "g"), "(?:\\/.*)?").replace(new RegExp(o, "g"), ".*").replace(new RegExp(i, "g"), "[^/]+"), u = new RegExp(`^${d}\\/?$`);
|
|
480
|
+
return At.set(e, u), u;
|
|
481
481
|
}
|
|
482
|
-
function
|
|
482
|
+
function $n(e, t) {
|
|
483
483
|
const r = t.length > 1 && t.endsWith("/") ? t.slice(0, -1) : t;
|
|
484
|
-
return
|
|
484
|
+
return Dn(e).test(r);
|
|
485
485
|
}
|
|
486
|
-
function
|
|
487
|
-
return typeof e == "function" ? e(t) : e instanceof RegExp ? e.test(t) :
|
|
486
|
+
function zn(e, t) {
|
|
487
|
+
return typeof e == "function" ? e(t) : e instanceof RegExp ? e.test(t) : $n(e, t);
|
|
488
488
|
}
|
|
489
|
-
function
|
|
489
|
+
function Rt(e, t) {
|
|
490
490
|
if (!e || e.length === 0) return !1;
|
|
491
491
|
for (const r of e)
|
|
492
|
-
if (
|
|
492
|
+
if (zn(r, t)) return !0;
|
|
493
493
|
return !1;
|
|
494
494
|
}
|
|
495
|
-
function
|
|
496
|
-
return e === void 0 ? !0 :
|
|
495
|
+
function Hn(e, t, r) {
|
|
496
|
+
return e === void 0 ? !0 : Rt(r, e) ? !1 : t && t.length > 0 ? Rt(t, e) : !0;
|
|
497
497
|
}
|
|
498
|
-
function
|
|
499
|
-
return
|
|
500
|
-
() =>
|
|
498
|
+
function On(e, t, r) {
|
|
499
|
+
return Qe(
|
|
500
|
+
() => Hn(e, t, r),
|
|
501
501
|
[e, t, r]
|
|
502
502
|
);
|
|
503
503
|
}
|
|
504
|
-
const
|
|
504
|
+
const It = ({ muted: e = !1, className: t }) => e ? /* @__PURE__ */ _(
|
|
505
505
|
"svg",
|
|
506
506
|
{
|
|
507
507
|
className: t,
|
|
@@ -547,7 +547,7 @@ const At = ({ muted: e = !1, className: t }) => e ? /* @__PURE__ */ _(
|
|
|
547
547
|
}
|
|
548
548
|
)
|
|
549
549
|
}
|
|
550
|
-
),
|
|
550
|
+
), Mt = ({ className: e }) => /* @__PURE__ */ n(
|
|
551
551
|
"svg",
|
|
552
552
|
{
|
|
553
553
|
className: e,
|
|
@@ -565,7 +565,7 @@ const At = ({ muted: e = !1, className: t }) => e ? /* @__PURE__ */ _(
|
|
|
565
565
|
}
|
|
566
566
|
)
|
|
567
567
|
}
|
|
568
|
-
),
|
|
568
|
+
), qn = ({ className: e }) => /* @__PURE__ */ n(
|
|
569
569
|
"svg",
|
|
570
570
|
{
|
|
571
571
|
className: e,
|
|
@@ -576,12 +576,12 @@ const At = ({ muted: e = !1, className: t }) => e ? /* @__PURE__ */ _(
|
|
|
576
576
|
"aria-hidden": "true",
|
|
577
577
|
children: /* @__PURE__ */ n("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M6 18L18 6M6 6l12 12" })
|
|
578
578
|
}
|
|
579
|
-
),
|
|
579
|
+
), Bn = {
|
|
580
580
|
left: 180,
|
|
581
581
|
right: 0,
|
|
582
582
|
up: -90,
|
|
583
583
|
down: 90
|
|
584
|
-
},
|
|
584
|
+
}, Wn = ({ direction: e = "right", className: t }) => /* @__PURE__ */ n(
|
|
585
585
|
"svg",
|
|
586
586
|
{
|
|
587
587
|
className: t,
|
|
@@ -589,19 +589,19 @@ const At = ({ muted: e = !1, className: t }) => e ? /* @__PURE__ */ _(
|
|
|
589
589
|
viewBox: "0 0 24 24",
|
|
590
590
|
stroke: "currentColor",
|
|
591
591
|
strokeWidth: 2,
|
|
592
|
-
style: { transform: `rotate(${
|
|
592
|
+
style: { transform: `rotate(${Bn[e]}deg)` },
|
|
593
593
|
"aria-hidden": "true",
|
|
594
594
|
children: /* @__PURE__ */ n("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M9 6l6 6-6 6" })
|
|
595
595
|
}
|
|
596
596
|
);
|
|
597
|
-
function
|
|
597
|
+
function Fn(e) {
|
|
598
598
|
return e === "top-left" || e === "bottom-left" ? "left" : "right";
|
|
599
599
|
}
|
|
600
|
-
const
|
|
601
|
-
function
|
|
600
|
+
const jt = "ll-hidden-tab-center-y", Un = 5, Tt = 16;
|
|
601
|
+
function jn() {
|
|
602
602
|
if (typeof window > "u") return null;
|
|
603
603
|
try {
|
|
604
|
-
const e = window.localStorage.getItem(
|
|
604
|
+
const e = window.localStorage.getItem(jt);
|
|
605
605
|
if (!e) return null;
|
|
606
606
|
const t = Number.parseFloat(e);
|
|
607
607
|
return Number.isFinite(t) ? t : null;
|
|
@@ -609,30 +609,30 @@ function Wn() {
|
|
|
609
609
|
return null;
|
|
610
610
|
}
|
|
611
611
|
}
|
|
612
|
-
function
|
|
612
|
+
function Pt(e) {
|
|
613
613
|
if (!(typeof window > "u"))
|
|
614
614
|
try {
|
|
615
|
-
window.localStorage.setItem(
|
|
615
|
+
window.localStorage.setItem(jt, String(e));
|
|
616
616
|
} catch {
|
|
617
617
|
}
|
|
618
618
|
}
|
|
619
|
-
const
|
|
619
|
+
const Vn = ({
|
|
620
620
|
position: e,
|
|
621
621
|
isMobile: t,
|
|
622
622
|
isSpeaking: r,
|
|
623
623
|
onExpand: o,
|
|
624
624
|
label: i = "Open widget"
|
|
625
625
|
}) => {
|
|
626
|
-
const l =
|
|
626
|
+
const l = Fn(e), s = l === "right" ? "left" : "right", d = t ? 80 : 72, [u, h] = N(null), [m, a] = N(!1), c = I(null), A = I(!1), C = S(
|
|
627
627
|
(g) => {
|
|
628
628
|
if (typeof window > "u") return g;
|
|
629
|
-
const E = d / 2, x =
|
|
629
|
+
const E = d / 2, x = Tt + E, q = window.innerHeight - Tt - E;
|
|
630
630
|
return q < x ? Math.max(x, g) : Math.max(x, Math.min(q, g));
|
|
631
631
|
},
|
|
632
632
|
[d]
|
|
633
633
|
);
|
|
634
634
|
P(() => {
|
|
635
|
-
const g =
|
|
635
|
+
const g = jn();
|
|
636
636
|
h(C(g ?? window.innerHeight / 2));
|
|
637
637
|
const E = () => {
|
|
638
638
|
h((x) => x === null ? null : C(x));
|
|
@@ -659,7 +659,7 @@ const Fn = ({
|
|
|
659
659
|
const E = c.current;
|
|
660
660
|
if (!E) return;
|
|
661
661
|
const x = g.clientY - E.startClientY;
|
|
662
|
-
!E.moved && Math.abs(x) >
|
|
662
|
+
!E.moved && Math.abs(x) > Un && (E.moved = !0, a(!0)), E.moved && h(C(E.startCenterY + x));
|
|
663
663
|
},
|
|
664
664
|
[C]
|
|
665
665
|
), L = S(
|
|
@@ -670,11 +670,11 @@ const Fn = ({
|
|
|
670
670
|
g.currentTarget.releasePointerCapture(g.pointerId);
|
|
671
671
|
} catch {
|
|
672
672
|
}
|
|
673
|
-
c.current = null, E.moved && (a(!1), A.current = !0, h((x) => (x !== null &&
|
|
673
|
+
c.current = null, E.moved && (a(!1), A.current = !0, h((x) => (x !== null && Pt(x), x)));
|
|
674
674
|
}
|
|
675
675
|
},
|
|
676
676
|
[]
|
|
677
|
-
),
|
|
677
|
+
), z = S(() => {
|
|
678
678
|
if (A.current) {
|
|
679
679
|
A.current = !1;
|
|
680
680
|
return;
|
|
@@ -688,12 +688,12 @@ const Fn = ({
|
|
|
688
688
|
h((x) => {
|
|
689
689
|
if (x === null) return x;
|
|
690
690
|
const q = C(x + E);
|
|
691
|
-
return
|
|
691
|
+
return Pt(q), q;
|
|
692
692
|
});
|
|
693
693
|
}
|
|
694
694
|
},
|
|
695
695
|
[C]
|
|
696
|
-
),
|
|
696
|
+
), O = [
|
|
697
697
|
"ll-hidden",
|
|
698
698
|
`ll-hidden--${l}`,
|
|
699
699
|
t ? "ll-hidden--mobile" : "ll-hidden--desktop",
|
|
@@ -704,20 +704,20 @@ const Fn = ({
|
|
|
704
704
|
"button",
|
|
705
705
|
{
|
|
706
706
|
type: "button",
|
|
707
|
-
className:
|
|
707
|
+
className: O,
|
|
708
708
|
onPointerDown: R,
|
|
709
709
|
onPointerMove: b,
|
|
710
710
|
onPointerUp: L,
|
|
711
711
|
onPointerCancel: L,
|
|
712
|
-
onClick:
|
|
712
|
+
onClick: z,
|
|
713
713
|
onKeyDown: M,
|
|
714
714
|
"aria-label": i,
|
|
715
715
|
"data-position": e,
|
|
716
716
|
style: p,
|
|
717
|
-
children: /* @__PURE__ */ n(
|
|
717
|
+
children: /* @__PURE__ */ n(Wn, { direction: s, className: "ll-hidden__chevron" })
|
|
718
718
|
}
|
|
719
719
|
);
|
|
720
|
-
},
|
|
720
|
+
}, Yn = ({
|
|
721
721
|
audioLevel: e,
|
|
722
722
|
bars: t = 20,
|
|
723
723
|
maxHeight: r = 20,
|
|
@@ -725,7 +725,7 @@ const Fn = ({
|
|
|
725
725
|
className: i,
|
|
726
726
|
barClassName: l
|
|
727
727
|
}) => {
|
|
728
|
-
const s = I(null), d = I([]), u =
|
|
728
|
+
const s = I(null), d = I([]), u = Qe(() => {
|
|
729
729
|
const m = (Math.sqrt(5) - 1) / 2;
|
|
730
730
|
return Array.from({ length: t }, (a, c) => 0.5 + c * m % 1 * 0.5);
|
|
731
731
|
}, [t]);
|
|
@@ -749,7 +749,7 @@ const Fn = ({
|
|
|
749
749
|
},
|
|
750
750
|
a
|
|
751
751
|
)) });
|
|
752
|
-
},
|
|
752
|
+
}, Gn = ({
|
|
753
753
|
position: e,
|
|
754
754
|
isMobile: t,
|
|
755
755
|
agentName: r,
|
|
@@ -786,7 +786,7 @@ const Fn = ({
|
|
|
786
786
|
)
|
|
787
787
|
) : /* @__PURE__ */ n("div", { className: "ll-minimized__avatar ll-minimized__avatar--placeholder" }),
|
|
788
788
|
/* @__PURE__ */ n(
|
|
789
|
-
|
|
789
|
+
Yn,
|
|
790
790
|
{
|
|
791
791
|
audioLevel: s,
|
|
792
792
|
bars: 16,
|
|
@@ -809,10 +809,10 @@ const Fn = ({
|
|
|
809
809
|
(m.key === "Enter" || m.key === " ") && (m.stopPropagation(), m.preventDefault(), u());
|
|
810
810
|
},
|
|
811
811
|
"aria-label": l ? "Unmute microphone" : "Mute microphone",
|
|
812
|
-
children: /* @__PURE__ */ n(
|
|
812
|
+
children: /* @__PURE__ */ n(It, { muted: l, className: "ll-minimized__icon" })
|
|
813
813
|
}
|
|
814
814
|
),
|
|
815
|
-
/* @__PURE__ */ n(
|
|
815
|
+
/* @__PURE__ */ n(Mt, { className: "ll-minimized__icon ll-minimized__icon--expand" })
|
|
816
816
|
] })
|
|
817
817
|
]
|
|
818
818
|
}
|
|
@@ -849,7 +849,7 @@ const Fn = ({
|
|
|
849
849
|
className: "ll-minimized__btn",
|
|
850
850
|
onClick: u,
|
|
851
851
|
"aria-label": l ? "Unmute microphone" : "Mute microphone",
|
|
852
|
-
children: /* @__PURE__ */ n(
|
|
852
|
+
children: /* @__PURE__ */ n(It, { muted: l, className: "ll-minimized__icon" })
|
|
853
853
|
}
|
|
854
854
|
),
|
|
855
855
|
/* @__PURE__ */ n(
|
|
@@ -859,7 +859,7 @@ const Fn = ({
|
|
|
859
859
|
className: "ll-minimized__btn",
|
|
860
860
|
onClick: d,
|
|
861
861
|
"aria-label": `Expand ${r} widget`,
|
|
862
|
-
children: /* @__PURE__ */ n(
|
|
862
|
+
children: /* @__PURE__ */ n(Mt, { className: "ll-minimized__icon" })
|
|
863
863
|
}
|
|
864
864
|
),
|
|
865
865
|
/* @__PURE__ */ n(
|
|
@@ -869,13 +869,13 @@ const Fn = ({
|
|
|
869
869
|
className: "ll-minimized__btn ll-minimized__btn--close",
|
|
870
870
|
onClick: h,
|
|
871
871
|
"aria-label": "Close widget",
|
|
872
|
-
children: /* @__PURE__ */ n(
|
|
872
|
+
children: /* @__PURE__ */ n(qn, { className: "ll-minimized__icon" })
|
|
873
873
|
}
|
|
874
874
|
)
|
|
875
875
|
] })
|
|
876
876
|
] })
|
|
877
877
|
}
|
|
878
|
-
),
|
|
878
|
+
), Jn = ({
|
|
879
879
|
src: e,
|
|
880
880
|
alt: t,
|
|
881
881
|
preCannedPlaying: r = !1,
|
|
@@ -913,7 +913,7 @@ const Fn = ({
|
|
|
913
913
|
}
|
|
914
914
|
)
|
|
915
915
|
);
|
|
916
|
-
},
|
|
916
|
+
}, Kn = ({
|
|
917
917
|
position: e,
|
|
918
918
|
isMobile: t,
|
|
919
919
|
agentName: r,
|
|
@@ -932,91 +932,91 @@ const Fn = ({
|
|
|
932
932
|
connectionState: R,
|
|
933
933
|
agentState: b,
|
|
934
934
|
transcript: L,
|
|
935
|
-
canResume:
|
|
935
|
+
canResume: z,
|
|
936
936
|
needsUserGesture: M,
|
|
937
|
-
error:
|
|
937
|
+
error: O,
|
|
938
938
|
isMuted: p,
|
|
939
939
|
micError: g,
|
|
940
940
|
micDevices: E,
|
|
941
941
|
isCameraEnabled: x,
|
|
942
942
|
cameraPreviewEl: q,
|
|
943
|
-
cameraDevices:
|
|
943
|
+
cameraDevices: Q,
|
|
944
944
|
activeCameraId: de,
|
|
945
|
-
isScreenShareEnabled:
|
|
946
|
-
screenPreviewEl:
|
|
945
|
+
isScreenShareEnabled: Z,
|
|
946
|
+
screenPreviewEl: ee,
|
|
947
947
|
isSpeakerMuted: ue,
|
|
948
|
-
allowCamera:
|
|
949
|
-
allowScreenShare:
|
|
950
|
-
allowTyping:
|
|
951
|
-
avatarVideoContainerRef:
|
|
952
|
-
onConnect:
|
|
948
|
+
allowCamera: He,
|
|
949
|
+
allowScreenShare: Oe,
|
|
950
|
+
allowTyping: qe,
|
|
951
|
+
avatarVideoContainerRef: Be,
|
|
952
|
+
onConnect: me,
|
|
953
953
|
onDisconnect: ge,
|
|
954
954
|
onRetry: ye,
|
|
955
955
|
onResumeAudio: ve,
|
|
956
956
|
onToggleMute: be,
|
|
957
957
|
onToggleCamera: we,
|
|
958
958
|
onSwitchCameraDevice: _e,
|
|
959
|
-
onToggleScreenShare:
|
|
960
|
-
onToggleSpeaker:
|
|
961
|
-
onSendMessage:
|
|
962
|
-
onMinimize:
|
|
963
|
-
onClose:
|
|
964
|
-
onClearMicError:
|
|
959
|
+
onToggleScreenShare: xe,
|
|
960
|
+
onToggleSpeaker: F,
|
|
961
|
+
onSendMessage: We,
|
|
962
|
+
onMinimize: Fe,
|
|
963
|
+
onClose: Ue,
|
|
964
|
+
onClearMicError: je
|
|
965
965
|
}) => {
|
|
966
|
-
var
|
|
967
|
-
const
|
|
966
|
+
var Se;
|
|
967
|
+
const le = L.length > 0 ? L[L.length - 1] : null, oe = ((d == null ? void 0 : d.length) ?? 0) > 1, ke = R === "connecting" || R === "connected", Le = R === "connected", fe = R === "idle" || R === "disconnected" || R === "error", V = I(null), Re = I(null);
|
|
968
968
|
P(() => {
|
|
969
|
-
const
|
|
970
|
-
|
|
969
|
+
const v = V.current;
|
|
970
|
+
v && (v.innerHTML = "", q && (q.style.width = "100%", q.style.height = "100%", q.style.objectFit = "cover", q.style.transform = "scaleX(-1)", v.appendChild(q)));
|
|
971
971
|
}, [q]), P(() => {
|
|
972
|
-
const
|
|
973
|
-
|
|
974
|
-
}, [
|
|
975
|
-
const [
|
|
972
|
+
const v = Re.current;
|
|
973
|
+
v && (v.innerHTML = "", ee && (ee.style.width = "100%", ee.style.height = "100%", ee.style.objectFit = "contain", v.appendChild(ee)));
|
|
974
|
+
}, [ee]);
|
|
975
|
+
const [te, X] = N(!1), [ie, ae] = N(!1);
|
|
976
976
|
P(() => {
|
|
977
|
-
if (!
|
|
978
|
-
const
|
|
979
|
-
|
|
977
|
+
if (!te && !ie && !A && !m) return;
|
|
978
|
+
const v = () => {
|
|
979
|
+
X(!1), ae(!1), A && C(), m && a();
|
|
980
980
|
};
|
|
981
|
-
return document.addEventListener("click",
|
|
981
|
+
return document.addEventListener("click", v), () => document.removeEventListener("click", v);
|
|
982
982
|
}, [
|
|
983
|
-
|
|
984
|
-
|
|
983
|
+
te,
|
|
984
|
+
ie,
|
|
985
985
|
A,
|
|
986
986
|
m,
|
|
987
987
|
C,
|
|
988
988
|
a
|
|
989
989
|
]);
|
|
990
|
-
const [
|
|
991
|
-
(
|
|
992
|
-
|
|
993
|
-
const
|
|
994
|
-
|
|
990
|
+
const [J, ne] = N(""), pe = S(
|
|
991
|
+
(v) => {
|
|
992
|
+
v.preventDefault();
|
|
993
|
+
const Y = J.trim();
|
|
994
|
+
Y && (We(Y), ne(""));
|
|
995
995
|
},
|
|
996
|
-
[
|
|
997
|
-
),
|
|
996
|
+
[J, We]
|
|
997
|
+
), Ie = s.productName || "Live Layer", Ve = Le && (le != null && le.text) ? le.text : l || "", Me = [
|
|
998
998
|
"ll-expanded",
|
|
999
999
|
t ? "ll-expanded--mobile" : "ll-expanded--desktop"
|
|
1000
1000
|
].join(" ");
|
|
1001
1001
|
return /* @__PURE__ */ _(
|
|
1002
1002
|
"div",
|
|
1003
1003
|
{
|
|
1004
|
-
className:
|
|
1004
|
+
className: Me,
|
|
1005
1005
|
"data-position": e,
|
|
1006
|
-
"data-state":
|
|
1006
|
+
"data-state": Le ? "connected" : ke ? "connecting" : "idle",
|
|
1007
1007
|
role: "dialog",
|
|
1008
1008
|
"aria-label": `${r} widget`,
|
|
1009
1009
|
children: [
|
|
1010
1010
|
/* @__PURE__ */ _("div", { className: "ll-expanded__bg", children: [
|
|
1011
1011
|
o ? /* @__PURE__ */ n(
|
|
1012
|
-
|
|
1012
|
+
Jn,
|
|
1013
1013
|
{
|
|
1014
1014
|
src: o,
|
|
1015
1015
|
alt: r,
|
|
1016
1016
|
className: "ll-expanded__bg-img"
|
|
1017
1017
|
}
|
|
1018
|
-
) : /* @__PURE__ */ n("div", { className: "ll-expanded__bg-fallback", children: /* @__PURE__ */ n("span", { className: "ll-expanded__bg-initial", children: ((
|
|
1019
|
-
i && !
|
|
1018
|
+
) : /* @__PURE__ */ n("div", { className: "ll-expanded__bg-fallback", children: /* @__PURE__ */ n("span", { className: "ll-expanded__bg-initial", children: ((Se = r == null ? void 0 : r.charAt(0)) == null ? void 0 : Se.toUpperCase()) || "A" }) }),
|
|
1019
|
+
i && !Le && /* @__PURE__ */ n(
|
|
1020
1020
|
"video",
|
|
1021
1021
|
{
|
|
1022
1022
|
className: "ll-expanded__bg-idle",
|
|
@@ -1028,12 +1028,12 @@ const Fn = ({
|
|
|
1028
1028
|
}
|
|
1029
1029
|
)
|
|
1030
1030
|
] }),
|
|
1031
|
-
/* @__PURE__ */ n("div", { ref:
|
|
1031
|
+
/* @__PURE__ */ n("div", { ref: Be, className: "ll-expanded__video" }),
|
|
1032
1032
|
R === "connecting" && /* @__PURE__ */ _("div", { className: "ll-expanded__overlay ll-expanded__overlay--connecting", children: [
|
|
1033
1033
|
/* @__PURE__ */ n("div", { className: "ll-expanded__spinner" }),
|
|
1034
1034
|
/* @__PURE__ */ n("p", { className: "ll-expanded__overlay-text", children: h ? "Switching..." : "Connecting..." })
|
|
1035
1035
|
] }),
|
|
1036
|
-
M &&
|
|
1036
|
+
M && Le && /* @__PURE__ */ _(
|
|
1037
1037
|
"button",
|
|
1038
1038
|
{
|
|
1039
1039
|
type: "button",
|
|
@@ -1045,7 +1045,7 @@ const Fn = ({
|
|
|
1045
1045
|
]
|
|
1046
1046
|
}
|
|
1047
1047
|
),
|
|
1048
|
-
|
|
1048
|
+
ke ? /* @__PURE__ */ _("div", { className: "ll-expanded__topbar", children: [
|
|
1049
1049
|
/* @__PURE__ */ _("div", { className: "ll-expanded__topbar-left", children: [
|
|
1050
1050
|
/* @__PURE__ */ _("div", { className: "ll-expanded__pill-wrap", children: [
|
|
1051
1051
|
/* @__PURE__ */ _(
|
|
@@ -1053,45 +1053,45 @@ const Fn = ({
|
|
|
1053
1053
|
{
|
|
1054
1054
|
type: "button",
|
|
1055
1055
|
className: "ll-hpill",
|
|
1056
|
-
onClick: (
|
|
1057
|
-
|
|
1056
|
+
onClick: (v) => {
|
|
1057
|
+
oe && (v.stopPropagation(), a());
|
|
1058
1058
|
},
|
|
1059
|
-
"aria-haspopup":
|
|
1060
|
-
"aria-expanded":
|
|
1059
|
+
"aria-haspopup": oe ? "listbox" : void 0,
|
|
1060
|
+
"aria-expanded": oe ? m : void 0,
|
|
1061
1061
|
children: [
|
|
1062
1062
|
/* @__PURE__ */ n("span", { className: "ll-hpill__label", children: r }),
|
|
1063
|
-
|
|
1063
|
+
oe && /* @__PURE__ */ n(Ke, {})
|
|
1064
1064
|
]
|
|
1065
1065
|
}
|
|
1066
1066
|
),
|
|
1067
|
-
|
|
1067
|
+
oe && m && /* @__PURE__ */ n(
|
|
1068
1068
|
"div",
|
|
1069
1069
|
{
|
|
1070
1070
|
className: "ll-hmenu",
|
|
1071
|
-
onClick: (
|
|
1071
|
+
onClick: (v) => v.stopPropagation(),
|
|
1072
1072
|
role: "listbox",
|
|
1073
|
-
children: d == null ? void 0 : d.map((
|
|
1073
|
+
children: d == null ? void 0 : d.map((v) => /* @__PURE__ */ _(
|
|
1074
1074
|
"button",
|
|
1075
1075
|
{
|
|
1076
1076
|
type: "button",
|
|
1077
|
-
className: `ll-hmenu__item ${
|
|
1078
|
-
onClick: () => c(
|
|
1077
|
+
className: `ll-hmenu__item ${v.id === u ? "is-active" : ""}`,
|
|
1078
|
+
onClick: () => c(v.id),
|
|
1079
1079
|
role: "option",
|
|
1080
|
-
"aria-selected":
|
|
1080
|
+
"aria-selected": v.id === u,
|
|
1081
1081
|
children: [
|
|
1082
|
-
|
|
1082
|
+
v.avatarImageUrl && /* @__PURE__ */ n(
|
|
1083
1083
|
"img",
|
|
1084
1084
|
{
|
|
1085
|
-
src:
|
|
1085
|
+
src: v.avatarImageUrl,
|
|
1086
1086
|
alt: "",
|
|
1087
1087
|
className: "ll-hmenu__avatar"
|
|
1088
1088
|
}
|
|
1089
1089
|
),
|
|
1090
|
-
/* @__PURE__ */ n("span", { className: "ll-hmenu__name", children:
|
|
1091
|
-
|
|
1090
|
+
/* @__PURE__ */ n("span", { className: "ll-hmenu__name", children: v.name }),
|
|
1091
|
+
v.role && /* @__PURE__ */ n("span", { className: "ll-hmenu__role", children: v.role })
|
|
1092
1092
|
]
|
|
1093
1093
|
},
|
|
1094
|
-
|
|
1094
|
+
v.id
|
|
1095
1095
|
))
|
|
1096
1096
|
}
|
|
1097
1097
|
)
|
|
@@ -1102,8 +1102,8 @@ const Fn = ({
|
|
|
1102
1102
|
{
|
|
1103
1103
|
type: "button",
|
|
1104
1104
|
className: "ll-hpill ll-hpill--compact",
|
|
1105
|
-
onClick: (
|
|
1106
|
-
|
|
1105
|
+
onClick: (v) => {
|
|
1106
|
+
v.stopPropagation(), C();
|
|
1107
1107
|
},
|
|
1108
1108
|
"aria-haspopup": "listbox",
|
|
1109
1109
|
"aria-expanded": A,
|
|
@@ -1111,7 +1111,7 @@ const Fn = ({
|
|
|
1111
1111
|
title: "Language: English",
|
|
1112
1112
|
children: [
|
|
1113
1113
|
/* @__PURE__ */ n("span", { className: "ll-hpill__label", children: "EN" }),
|
|
1114
|
-
/* @__PURE__ */ n(
|
|
1114
|
+
/* @__PURE__ */ n(Ke, {})
|
|
1115
1115
|
]
|
|
1116
1116
|
}
|
|
1117
1117
|
),
|
|
@@ -1119,7 +1119,7 @@ const Fn = ({
|
|
|
1119
1119
|
"div",
|
|
1120
1120
|
{
|
|
1121
1121
|
className: "ll-hmenu",
|
|
1122
|
-
onClick: (
|
|
1122
|
+
onClick: (v) => v.stopPropagation(),
|
|
1123
1123
|
role: "listbox",
|
|
1124
1124
|
children: /* @__PURE__ */ n(
|
|
1125
1125
|
"button",
|
|
@@ -1148,10 +1148,10 @@ const Fn = ({
|
|
|
1148
1148
|
{
|
|
1149
1149
|
type: "button",
|
|
1150
1150
|
className: "ll-hbtn",
|
|
1151
|
-
onClick:
|
|
1151
|
+
onClick: Fe,
|
|
1152
1152
|
"aria-label": "Minimize widget",
|
|
1153
1153
|
title: "Minimize",
|
|
1154
|
-
children: /* @__PURE__ */ n(
|
|
1154
|
+
children: /* @__PURE__ */ n($t, {})
|
|
1155
1155
|
}
|
|
1156
1156
|
),
|
|
1157
1157
|
/* @__PURE__ */ n(
|
|
@@ -1159,26 +1159,26 @@ const Fn = ({
|
|
|
1159
1159
|
{
|
|
1160
1160
|
type: "button",
|
|
1161
1161
|
className: "ll-hbtn ll-hbtn--danger",
|
|
1162
|
-
onClick:
|
|
1162
|
+
onClick: Ue,
|
|
1163
1163
|
"aria-label": "End call",
|
|
1164
1164
|
title: "End call",
|
|
1165
|
-
children: /* @__PURE__ */ n(
|
|
1165
|
+
children: /* @__PURE__ */ n(Dt, {})
|
|
1166
1166
|
}
|
|
1167
1167
|
)
|
|
1168
1168
|
] })
|
|
1169
1169
|
] }) : (
|
|
1170
1170
|
// Idle-state header with Live Layer product name + minimize/close
|
|
1171
1171
|
/* @__PURE__ */ _("div", { className: "ll-expanded__header ll-expanded__header--idle", children: [
|
|
1172
|
-
/* @__PURE__ */ n("span", { className: "ll-expanded__brand", children:
|
|
1172
|
+
/* @__PURE__ */ n("span", { className: "ll-expanded__brand", children: Ie }),
|
|
1173
1173
|
/* @__PURE__ */ _("div", { className: "ll-expanded__header-actions", children: [
|
|
1174
1174
|
/* @__PURE__ */ n(
|
|
1175
1175
|
"button",
|
|
1176
1176
|
{
|
|
1177
1177
|
type: "button",
|
|
1178
1178
|
className: "ll-hbtn ll-hbtn--ghost",
|
|
1179
|
-
onClick:
|
|
1179
|
+
onClick: Fe,
|
|
1180
1180
|
"aria-label": "Minimize widget",
|
|
1181
|
-
children: /* @__PURE__ */ n(
|
|
1181
|
+
children: /* @__PURE__ */ n($t, {})
|
|
1182
1182
|
}
|
|
1183
1183
|
),
|
|
1184
1184
|
/* @__PURE__ */ n(
|
|
@@ -1186,41 +1186,41 @@ const Fn = ({
|
|
|
1186
1186
|
{
|
|
1187
1187
|
type: "button",
|
|
1188
1188
|
className: "ll-hbtn ll-hbtn--danger",
|
|
1189
|
-
onClick:
|
|
1189
|
+
onClick: Ue,
|
|
1190
1190
|
"aria-label": "Close widget",
|
|
1191
|
-
children: /* @__PURE__ */ n(
|
|
1191
|
+
children: /* @__PURE__ */ n(Dt, {})
|
|
1192
1192
|
}
|
|
1193
1193
|
)
|
|
1194
1194
|
] })
|
|
1195
1195
|
] })
|
|
1196
1196
|
),
|
|
1197
|
-
|
|
1198
|
-
const
|
|
1199
|
-
return /* @__PURE__ */ _(
|
|
1200
|
-
R === "idle" &&
|
|
1197
|
+
fe && /* @__PURE__ */ (() => {
|
|
1198
|
+
const v = z ? "Restart paused session" : R === "disconnected" ? "Reconnect to agent" : "Start video call", Y = z ? "Pick up where you left off" : null;
|
|
1199
|
+
return /* @__PURE__ */ _(Ft, { children: [
|
|
1200
|
+
R === "idle" && !z && !O && /* @__PURE__ */ _(
|
|
1201
1201
|
"button",
|
|
1202
1202
|
{
|
|
1203
1203
|
type: "button",
|
|
1204
1204
|
className: "ll-expanded__play",
|
|
1205
|
-
onClick:
|
|
1206
|
-
"aria-label":
|
|
1205
|
+
onClick: me,
|
|
1206
|
+
"aria-label": v,
|
|
1207
1207
|
children: [
|
|
1208
1208
|
/* @__PURE__ */ n("div", { className: "ll-expanded__play-circle", children: /* @__PURE__ */ n("svg", { width: "22", height: "22", viewBox: "0 0 24 24", fill: "currentColor", "aria-hidden": !0, children: /* @__PURE__ */ n("polygon", { points: "6 3 20 12 6 21 6 3" }) }) }),
|
|
1209
|
-
/* @__PURE__ */ n("span", { className: "ll-expanded__play-label", children:
|
|
1209
|
+
/* @__PURE__ */ n("span", { className: "ll-expanded__play-label", children: v })
|
|
1210
1210
|
]
|
|
1211
1211
|
}
|
|
1212
1212
|
),
|
|
1213
1213
|
/* @__PURE__ */ _("div", { className: "ll-expanded__bottom ll-expanded__bottom--idle", children: [
|
|
1214
1214
|
l && /* @__PURE__ */ n("div", { className: "ll-expanded__transcript", children: /* @__PURE__ */ n("p", { className: "ll-expanded__transcript-text", children: l }) }),
|
|
1215
|
-
|
|
1215
|
+
Y && /* @__PURE__ */ n("p", { className: "ll-expanded__cta-sublabel", children: Y }),
|
|
1216
1216
|
/* @__PURE__ */ n(
|
|
1217
1217
|
"button",
|
|
1218
1218
|
{
|
|
1219
1219
|
type: "button",
|
|
1220
1220
|
className: "ll-expanded__cta",
|
|
1221
|
-
onClick:
|
|
1222
|
-
"aria-label":
|
|
1223
|
-
children:
|
|
1221
|
+
onClick: me,
|
|
1222
|
+
"aria-label": v,
|
|
1223
|
+
children: v
|
|
1224
1224
|
}
|
|
1225
1225
|
)
|
|
1226
1226
|
] })
|
|
@@ -1229,40 +1229,40 @@ const Fn = ({
|
|
|
1229
1229
|
/* @__PURE__ */ _(
|
|
1230
1230
|
"div",
|
|
1231
1231
|
{
|
|
1232
|
-
className: `ll-expanded__pip ${
|
|
1232
|
+
className: `ll-expanded__pip ${ke && (x || Z) ? "is-visible" : ""}`,
|
|
1233
1233
|
children: [
|
|
1234
1234
|
/* @__PURE__ */ n(
|
|
1235
1235
|
"div",
|
|
1236
1236
|
{
|
|
1237
|
-
ref:
|
|
1238
|
-
className:
|
|
1237
|
+
ref: Re,
|
|
1238
|
+
className: Z ? "ll-expanded__pip-host" : "ll-expanded__pip-host is-hidden"
|
|
1239
1239
|
}
|
|
1240
1240
|
),
|
|
1241
1241
|
/* @__PURE__ */ n(
|
|
1242
1242
|
"div",
|
|
1243
1243
|
{
|
|
1244
|
-
ref:
|
|
1245
|
-
className: !
|
|
1244
|
+
ref: V,
|
|
1245
|
+
className: !Z && x ? "ll-expanded__pip-host" : "ll-expanded__pip-host is-hidden"
|
|
1246
1246
|
}
|
|
1247
1247
|
)
|
|
1248
1248
|
]
|
|
1249
1249
|
}
|
|
1250
1250
|
),
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
/* @__PURE__ */ _("div", { className: "ll-toolbar", onClick: (
|
|
1254
|
-
|
|
1251
|
+
ke ? /* @__PURE__ */ _("div", { className: "ll-expanded__bottom", children: [
|
|
1252
|
+
Ve && /* @__PURE__ */ n("div", { className: "ll-expanded__transcript", children: /* @__PURE__ */ n("p", { className: "ll-expanded__transcript-text", children: Ve }) }),
|
|
1253
|
+
/* @__PURE__ */ _("div", { className: "ll-toolbar", onClick: (v) => v.stopPropagation(), children: [
|
|
1254
|
+
Oe && /* @__PURE__ */ n(
|
|
1255
1255
|
"button",
|
|
1256
1256
|
{
|
|
1257
1257
|
type: "button",
|
|
1258
|
-
className: `ll-tool ${
|
|
1259
|
-
onClick:
|
|
1260
|
-
"aria-label":
|
|
1261
|
-
title:
|
|
1262
|
-
children: /* @__PURE__ */ n(
|
|
1258
|
+
className: `ll-tool ${Z ? "is-on" : ""}`,
|
|
1259
|
+
onClick: xe,
|
|
1260
|
+
"aria-label": Z ? "Stop sharing screen" : "Share screen",
|
|
1261
|
+
title: Z ? "Stop sharing" : "Share screen",
|
|
1262
|
+
children: /* @__PURE__ */ n(Xn, {})
|
|
1263
1263
|
}
|
|
1264
1264
|
),
|
|
1265
|
-
|
|
1265
|
+
He && /* @__PURE__ */ _("div", { className: "ll-tool-split", children: [
|
|
1266
1266
|
/* @__PURE__ */ n(
|
|
1267
1267
|
"button",
|
|
1268
1268
|
{
|
|
@@ -1271,7 +1271,7 @@ const Fn = ({
|
|
|
1271
1271
|
onClick: we,
|
|
1272
1272
|
"aria-label": x ? "Turn off camera" : "Turn on camera",
|
|
1273
1273
|
title: x ? "Stop camera" : "Start camera",
|
|
1274
|
-
children: /* @__PURE__ */ n(
|
|
1274
|
+
children: /* @__PURE__ */ n(Qn, {})
|
|
1275
1275
|
}
|
|
1276
1276
|
),
|
|
1277
1277
|
/* @__PURE__ */ n(
|
|
@@ -1279,23 +1279,23 @@ const Fn = ({
|
|
|
1279
1279
|
{
|
|
1280
1280
|
type: "button",
|
|
1281
1281
|
className: `ll-tool ll-tool--right ${x ? "is-on" : ""}`,
|
|
1282
|
-
onClick: (
|
|
1283
|
-
|
|
1282
|
+
onClick: (v) => {
|
|
1283
|
+
v.stopPropagation(), ae((Y) => !Y), X(!1);
|
|
1284
1284
|
},
|
|
1285
1285
|
"aria-label": "Camera devices",
|
|
1286
1286
|
"aria-haspopup": "listbox",
|
|
1287
|
-
"aria-expanded":
|
|
1288
|
-
children: /* @__PURE__ */ n(
|
|
1287
|
+
"aria-expanded": ie,
|
|
1288
|
+
children: /* @__PURE__ */ n(Ke, {})
|
|
1289
1289
|
}
|
|
1290
1290
|
),
|
|
1291
|
-
|
|
1292
|
-
|
|
1291
|
+
ie && Q.length > 0 && /* @__PURE__ */ n(
|
|
1292
|
+
zt,
|
|
1293
1293
|
{
|
|
1294
1294
|
label: "Camera",
|
|
1295
|
-
devices:
|
|
1295
|
+
devices: Q,
|
|
1296
1296
|
activeId: de,
|
|
1297
|
-
onPick: (
|
|
1298
|
-
|
|
1297
|
+
onPick: (v) => {
|
|
1298
|
+
ae(!1), _e(v);
|
|
1299
1299
|
}
|
|
1300
1300
|
}
|
|
1301
1301
|
)
|
|
@@ -1309,7 +1309,7 @@ const Fn = ({
|
|
|
1309
1309
|
onClick: be,
|
|
1310
1310
|
"aria-label": p ? "Unmute microphone" : "Mute microphone",
|
|
1311
1311
|
title: p ? "Unmute" : "Mute",
|
|
1312
|
-
children: /* @__PURE__ */ n(
|
|
1312
|
+
children: /* @__PURE__ */ n(Zn, { muted: p })
|
|
1313
1313
|
}
|
|
1314
1314
|
),
|
|
1315
1315
|
/* @__PURE__ */ n(
|
|
@@ -1317,22 +1317,22 @@ const Fn = ({
|
|
|
1317
1317
|
{
|
|
1318
1318
|
type: "button",
|
|
1319
1319
|
className: `ll-tool ll-tool--right ${p ? "is-muted" : ""}`,
|
|
1320
|
-
onClick: (
|
|
1321
|
-
|
|
1320
|
+
onClick: (v) => {
|
|
1321
|
+
v.stopPropagation(), X((Y) => !Y), ae(!1);
|
|
1322
1322
|
},
|
|
1323
1323
|
"aria-label": "Microphone devices",
|
|
1324
1324
|
"aria-haspopup": "listbox",
|
|
1325
|
-
"aria-expanded":
|
|
1326
|
-
children: /* @__PURE__ */ n(
|
|
1325
|
+
"aria-expanded": te,
|
|
1326
|
+
children: /* @__PURE__ */ n(Ke, {})
|
|
1327
1327
|
}
|
|
1328
1328
|
),
|
|
1329
|
-
|
|
1330
|
-
|
|
1329
|
+
te && E.length > 0 && /* @__PURE__ */ n(
|
|
1330
|
+
zt,
|
|
1331
1331
|
{
|
|
1332
1332
|
label: "Microphone",
|
|
1333
1333
|
devices: E,
|
|
1334
1334
|
activeId: "",
|
|
1335
|
-
onPick: () =>
|
|
1335
|
+
onPick: () => X(!1)
|
|
1336
1336
|
}
|
|
1337
1337
|
)
|
|
1338
1338
|
] }),
|
|
@@ -1341,32 +1341,32 @@ const Fn = ({
|
|
|
1341
1341
|
{
|
|
1342
1342
|
type: "button",
|
|
1343
1343
|
className: `ll-tool ${ue ? "is-muted" : ""}`,
|
|
1344
|
-
onClick:
|
|
1344
|
+
onClick: F,
|
|
1345
1345
|
"aria-label": ue ? "Unmute speaker" : "Mute speaker",
|
|
1346
1346
|
title: ue ? "Unmute speaker" : "Mute speaker",
|
|
1347
|
-
children: /* @__PURE__ */ n(
|
|
1347
|
+
children: /* @__PURE__ */ n(er, { muted: ue })
|
|
1348
1348
|
}
|
|
1349
1349
|
)
|
|
1350
1350
|
] }),
|
|
1351
|
-
|
|
1351
|
+
qe && /* @__PURE__ */ _("form", { className: "ll-message-input", onSubmit: pe, children: [
|
|
1352
1352
|
/* @__PURE__ */ n(
|
|
1353
1353
|
"input",
|
|
1354
1354
|
{
|
|
1355
1355
|
type: "text",
|
|
1356
1356
|
className: "ll-message-input__field",
|
|
1357
1357
|
placeholder: "Message...",
|
|
1358
|
-
value:
|
|
1359
|
-
onChange: (
|
|
1358
|
+
value: J,
|
|
1359
|
+
onChange: (v) => ne(v.target.value),
|
|
1360
1360
|
"aria-label": "Message the agent"
|
|
1361
1361
|
}
|
|
1362
1362
|
),
|
|
1363
|
-
|
|
1363
|
+
J.trim() && /* @__PURE__ */ n(
|
|
1364
1364
|
"button",
|
|
1365
1365
|
{
|
|
1366
1366
|
type: "submit",
|
|
1367
1367
|
className: "ll-message-input__send",
|
|
1368
1368
|
"aria-label": "Send message",
|
|
1369
|
-
children: /* @__PURE__ */ n(
|
|
1369
|
+
children: /* @__PURE__ */ n(tr, {})
|
|
1370
1370
|
}
|
|
1371
1371
|
)
|
|
1372
1372
|
] }),
|
|
@@ -1389,23 +1389,23 @@ const Fn = ({
|
|
|
1389
1389
|
{
|
|
1390
1390
|
type: "button",
|
|
1391
1391
|
className: "ll-expanded__banner-x",
|
|
1392
|
-
onClick:
|
|
1392
|
+
onClick: je,
|
|
1393
1393
|
"aria-label": "Dismiss",
|
|
1394
1394
|
children: "×"
|
|
1395
1395
|
}
|
|
1396
1396
|
)
|
|
1397
1397
|
] });
|
|
1398
|
-
if (!
|
|
1399
|
-
let
|
|
1400
|
-
return
|
|
1401
|
-
/* @__PURE__ */ n("span", { children:
|
|
1398
|
+
if (!O || R !== "error") return null;
|
|
1399
|
+
let v = "Failed to connect", Y = "Try again";
|
|
1400
|
+
return O === "MIC_PERMISSION_DENIED" ? v = "Microphone blocked. Allow access to talk." : O === "MIC_NOT_FOUND" ? v = "No microphone found. Plug one in + retry." : O === "MIC_UNAVAILABLE" ? v = "Mic unavailable. Check other apps using it." : O === "AGENT_TIMEOUT" ? v = "Agent didn't pick up. Try again." : O === "CONNECT_FAILED" ? v = "Connection failed. Check your network." : O.length < 80 && (v = O), /* @__PURE__ */ _("div", { className: "ll-expanded__banner ll-expanded__banner--error", role: "alert", children: [
|
|
1401
|
+
/* @__PURE__ */ n("span", { children: v }),
|
|
1402
1402
|
/* @__PURE__ */ n(
|
|
1403
1403
|
"button",
|
|
1404
1404
|
{
|
|
1405
1405
|
type: "button",
|
|
1406
1406
|
className: "ll-expanded__banner-retry",
|
|
1407
1407
|
onClick: ye,
|
|
1408
|
-
children:
|
|
1408
|
+
children: Y
|
|
1409
1409
|
}
|
|
1410
1410
|
)
|
|
1411
1411
|
] });
|
|
@@ -1414,32 +1414,32 @@ const Fn = ({
|
|
|
1414
1414
|
}
|
|
1415
1415
|
);
|
|
1416
1416
|
};
|
|
1417
|
-
function
|
|
1417
|
+
function Ke() {
|
|
1418
1418
|
return /* @__PURE__ */ n("svg", { width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", "aria-hidden": !0, children: /* @__PURE__ */ n("polyline", { points: "6 9 12 15 18 9" }) });
|
|
1419
1419
|
}
|
|
1420
|
-
function
|
|
1420
|
+
function Dt() {
|
|
1421
1421
|
return /* @__PURE__ */ _("svg", { width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round", "aria-hidden": !0, children: [
|
|
1422
1422
|
/* @__PURE__ */ n("line", { x1: "18", y1: "6", x2: "6", y2: "18" }),
|
|
1423
1423
|
/* @__PURE__ */ n("line", { x1: "6", y1: "6", x2: "18", y2: "18" })
|
|
1424
1424
|
] });
|
|
1425
1425
|
}
|
|
1426
|
-
function
|
|
1426
|
+
function $t() {
|
|
1427
1427
|
return /* @__PURE__ */ n("svg", { width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round", "aria-hidden": !0, children: /* @__PURE__ */ n("line", { x1: "5", y1: "12", x2: "19", y2: "12" }) });
|
|
1428
1428
|
}
|
|
1429
|
-
function
|
|
1429
|
+
function Xn() {
|
|
1430
1430
|
return /* @__PURE__ */ _("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": !0, children: [
|
|
1431
1431
|
/* @__PURE__ */ n("rect", { x: "2", y: "3", width: "20", height: "14", rx: "2" }),
|
|
1432
1432
|
/* @__PURE__ */ n("line", { x1: "8", y1: "21", x2: "16", y2: "21" }),
|
|
1433
1433
|
/* @__PURE__ */ n("line", { x1: "12", y1: "17", x2: "12", y2: "21" })
|
|
1434
1434
|
] });
|
|
1435
1435
|
}
|
|
1436
|
-
function
|
|
1436
|
+
function Qn() {
|
|
1437
1437
|
return /* @__PURE__ */ _("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": !0, children: [
|
|
1438
1438
|
/* @__PURE__ */ n("path", { d: "M23 7l-7 5 7 5V7z" }),
|
|
1439
1439
|
/* @__PURE__ */ n("rect", { x: "1", y: "5", width: "15", height: "14", rx: "2" })
|
|
1440
1440
|
] });
|
|
1441
1441
|
}
|
|
1442
|
-
function
|
|
1442
|
+
function Zn({ muted: e }) {
|
|
1443
1443
|
return /* @__PURE__ */ _("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": !0, children: [
|
|
1444
1444
|
/* @__PURE__ */ n("path", { d: "M12 1a3 3 0 0 0-3 3v8a3 3 0 0 0 6 0V4a3 3 0 0 0-3-3z" }),
|
|
1445
1445
|
/* @__PURE__ */ n("path", { d: "M19 10v2a7 7 0 0 1-14 0v-2" }),
|
|
@@ -1447,22 +1447,22 @@ function Kn({ muted: e }) {
|
|
|
1447
1447
|
e && /* @__PURE__ */ n("line", { x1: "1", y1: "1", x2: "23", y2: "23" })
|
|
1448
1448
|
] });
|
|
1449
1449
|
}
|
|
1450
|
-
function
|
|
1450
|
+
function er({ muted: e }) {
|
|
1451
1451
|
return /* @__PURE__ */ _("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": !0, children: [
|
|
1452
1452
|
/* @__PURE__ */ n("polygon", { points: "11 5 6 9 2 9 2 15 6 15 11 19 11 5" }),
|
|
1453
|
-
e ? /* @__PURE__ */ n("line", { x1: "23", y1: "9", x2: "17", y2: "15" }) : /* @__PURE__ */ _(
|
|
1453
|
+
e ? /* @__PURE__ */ n("line", { x1: "23", y1: "9", x2: "17", y2: "15" }) : /* @__PURE__ */ _(Ft, { children: [
|
|
1454
1454
|
/* @__PURE__ */ n("path", { d: "M19.07 4.93a10 10 0 0 1 0 14.14" }),
|
|
1455
1455
|
/* @__PURE__ */ n("path", { d: "M15.54 8.46a5 5 0 0 1 0 7.07" })
|
|
1456
1456
|
] })
|
|
1457
1457
|
] });
|
|
1458
1458
|
}
|
|
1459
|
-
function
|
|
1459
|
+
function tr() {
|
|
1460
1460
|
return /* @__PURE__ */ _("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": !0, children: [
|
|
1461
1461
|
/* @__PURE__ */ n("line", { x1: "5", y1: "12", x2: "19", y2: "12" }),
|
|
1462
1462
|
/* @__PURE__ */ n("polyline", { points: "12 5 19 12 12 19" })
|
|
1463
1463
|
] });
|
|
1464
1464
|
}
|
|
1465
|
-
const
|
|
1465
|
+
const zt = ({ label: e, devices: t, activeId: r, onPick: o }) => /* @__PURE__ */ _(
|
|
1466
1466
|
"div",
|
|
1467
1467
|
{
|
|
1468
1468
|
className: "ll-device-menu",
|
|
@@ -1490,21 +1490,21 @@ const Dt = ({ label: e, devices: t, activeId: r, onPick: o }) => /* @__PURE__ */
|
|
|
1490
1490
|
})
|
|
1491
1491
|
]
|
|
1492
1492
|
}
|
|
1493
|
-
),
|
|
1493
|
+
), nr = [
|
|
1494
1494
|
'[data-ll-private="true"]',
|
|
1495
1495
|
".ll-widget"
|
|
1496
1496
|
];
|
|
1497
|
-
function
|
|
1497
|
+
function ut(e) {
|
|
1498
1498
|
let t = e;
|
|
1499
1499
|
for (; t; ) {
|
|
1500
|
-
for (const r of
|
|
1500
|
+
for (const r of nr)
|
|
1501
1501
|
if (t.matches(r)) return !0;
|
|
1502
1502
|
t = t.parentElement;
|
|
1503
1503
|
}
|
|
1504
1504
|
return !1;
|
|
1505
1505
|
}
|
|
1506
|
-
function
|
|
1507
|
-
if (
|
|
1506
|
+
function et(e) {
|
|
1507
|
+
if (ut(e)) return !1;
|
|
1508
1508
|
if (e instanceof HTMLInputElement) {
|
|
1509
1509
|
if (e.type === "password") return !1;
|
|
1510
1510
|
const t = (e.getAttribute("autocomplete") || "").toLowerCase();
|
|
@@ -1512,7 +1512,7 @@ function Xe(e) {
|
|
|
1512
1512
|
}
|
|
1513
1513
|
return !0;
|
|
1514
1514
|
}
|
|
1515
|
-
const
|
|
1515
|
+
const Xe = 4096, rr = 20, or = 20, ir = 10, lr = 10, ar = 30, Ht = 500, cr = [
|
|
1516
1516
|
'[data-ll-private="true"]',
|
|
1517
1517
|
".ll-widget",
|
|
1518
1518
|
"script",
|
|
@@ -1520,24 +1520,24 @@ const Ge = 4096, er = 20, tr = 20, nr = 10, rr = 10, or = 30, $t = 500, ir = [
|
|
|
1520
1520
|
"noscript",
|
|
1521
1521
|
"iframe"
|
|
1522
1522
|
];
|
|
1523
|
-
function
|
|
1523
|
+
function $e(e) {
|
|
1524
1524
|
if (e.getAttribute("aria-hidden") === "true" || e.hasAttribute("hidden")) return !0;
|
|
1525
1525
|
let t = e;
|
|
1526
1526
|
for (; t; ) {
|
|
1527
|
-
for (const r of
|
|
1527
|
+
for (const r of cr)
|
|
1528
1528
|
if (t.matches(r)) return !0;
|
|
1529
1529
|
t = t.parentElement;
|
|
1530
1530
|
}
|
|
1531
1531
|
return !1;
|
|
1532
1532
|
}
|
|
1533
|
-
function
|
|
1533
|
+
function ze(e) {
|
|
1534
1534
|
if (typeof window > "u") return !0;
|
|
1535
1535
|
const t = e.getBoundingClientRect();
|
|
1536
1536
|
if (t.width <= 0 || t.height <= 0) return !1;
|
|
1537
1537
|
const r = window.innerHeight || document.documentElement.clientHeight, o = window.innerWidth || document.documentElement.clientWidth;
|
|
1538
1538
|
return t.bottom > 0 && t.right > 0 && t.top < r && t.left < o;
|
|
1539
1539
|
}
|
|
1540
|
-
function
|
|
1540
|
+
function Ot(e) {
|
|
1541
1541
|
const t = e.getAttribute("id");
|
|
1542
1542
|
if (t) {
|
|
1543
1543
|
const l = document.querySelector(`label[for="${CSS.escape(t)}"]`);
|
|
@@ -1550,13 +1550,13 @@ function zt(e) {
|
|
|
1550
1550
|
const i = e.closest("label");
|
|
1551
1551
|
return i != null && i.textContent ? i.textContent.trim() : "";
|
|
1552
1552
|
}
|
|
1553
|
-
function
|
|
1553
|
+
function he(e, t) {
|
|
1554
1554
|
return e.length <= t ? e : e.slice(0, t - 1) + "…";
|
|
1555
1555
|
}
|
|
1556
|
-
function
|
|
1556
|
+
function Ee(e) {
|
|
1557
1557
|
return e.length;
|
|
1558
1558
|
}
|
|
1559
|
-
function
|
|
1559
|
+
function sr(e, t = {}) {
|
|
1560
1560
|
const r = t.doc ?? (typeof document < "u" ? document : null);
|
|
1561
1561
|
if (!r)
|
|
1562
1562
|
return {
|
|
@@ -1574,11 +1574,11 @@ function lr(e, t = {}) {
|
|
|
1574
1574
|
r.querySelectorAll("[data-ll-region]")
|
|
1575
1575
|
), d = [];
|
|
1576
1576
|
for (const p of s) {
|
|
1577
|
-
if (d.length >=
|
|
1578
|
-
if (
|
|
1579
|
-
const g = p.getAttribute("data-ll-region") ?? "", E = p.getAttribute("data-ll-intent") ?? void 0, x =
|
|
1577
|
+
if (d.length >= ir) break;
|
|
1578
|
+
if ($e(p) || !ze(p)) continue;
|
|
1579
|
+
const g = p.getAttribute("data-ll-region") ?? "", E = p.getAttribute("data-ll-intent") ?? void 0, x = he(
|
|
1580
1580
|
(p.innerText || p.textContent || "").trim(),
|
|
1581
|
-
|
|
1581
|
+
Ht * 2
|
|
1582
1582
|
);
|
|
1583
1583
|
!g || !x || d.push({ id: g, intent: E, text: x });
|
|
1584
1584
|
}
|
|
@@ -1586,23 +1586,23 @@ function lr(e, t = {}) {
|
|
|
1586
1586
|
r.querySelectorAll("h1, h2, h3, h4, h5, h6")
|
|
1587
1587
|
);
|
|
1588
1588
|
for (const p of m) {
|
|
1589
|
-
if (
|
|
1589
|
+
if ($e(p) || !ze(p)) continue;
|
|
1590
1590
|
const g = (p.textContent || "").trim();
|
|
1591
|
-
g && u.push(`${p.tagName}: ${
|
|
1591
|
+
g && u.push(`${p.tagName}: ${he(g, 200)}`);
|
|
1592
1592
|
}
|
|
1593
1593
|
const a = Array.from(r.querySelectorAll("p, li"));
|
|
1594
1594
|
for (const p of a) {
|
|
1595
|
-
if (
|
|
1595
|
+
if ($e(p) || !ze(p) || h.includes(p.tagName)) continue;
|
|
1596
1596
|
const g = (p.textContent || "").trim();
|
|
1597
|
-
g.length > 10 && u.push(
|
|
1597
|
+
g.length > 10 && u.push(he(g, Ht));
|
|
1598
1598
|
}
|
|
1599
1599
|
const c = u.join(`
|
|
1600
1600
|
`), A = [], C = Array.from(r.querySelectorAll("a[href]"));
|
|
1601
1601
|
for (const p of C) {
|
|
1602
|
-
if (A.length >=
|
|
1603
|
-
if (
|
|
1602
|
+
if (A.length >= rr) break;
|
|
1603
|
+
if ($e(p) || !ze(p)) continue;
|
|
1604
1604
|
const g = p.getAttribute("href") || "", E = (p.textContent || "").trim();
|
|
1605
|
-
!g || !E || A.push({ href: g, text:
|
|
1605
|
+
!g || !E || A.push({ href: g, text: he(E, 100) });
|
|
1606
1606
|
}
|
|
1607
1607
|
const R = [], b = Array.from(
|
|
1608
1608
|
r.querySelectorAll(
|
|
@@ -1610,17 +1610,17 @@ function lr(e, t = {}) {
|
|
|
1610
1610
|
)
|
|
1611
1611
|
);
|
|
1612
1612
|
for (const p of b) {
|
|
1613
|
-
if (R.length >=
|
|
1614
|
-
if (
|
|
1615
|
-
const g =
|
|
1616
|
-
g && R.push({ label:
|
|
1613
|
+
if (R.length >= or) break;
|
|
1614
|
+
if ($e(p) || !et(p) || !ze(p)) continue;
|
|
1615
|
+
const g = Ot(p), E = p instanceof HTMLInputElement ? p.type : p.tagName.toLowerCase();
|
|
1616
|
+
g && R.push({ label: he(g, 100), type: E });
|
|
1617
1617
|
}
|
|
1618
1618
|
const L = Array.from(
|
|
1619
1619
|
r.querySelectorAll("[data-ll-form]")
|
|
1620
|
-
),
|
|
1620
|
+
), z = [];
|
|
1621
1621
|
for (const p of L) {
|
|
1622
|
-
if (
|
|
1623
|
-
if (
|
|
1622
|
+
if (z.length >= lr) break;
|
|
1623
|
+
if (ut(p)) continue;
|
|
1624
1624
|
const g = p.getAttribute("data-ll-form") || "";
|
|
1625
1625
|
if (!g) continue;
|
|
1626
1626
|
const E = p.getAttribute("data-ll-intent") || void 0, x = Array.from(
|
|
@@ -1628,15 +1628,15 @@ function lr(e, t = {}) {
|
|
|
1628
1628
|
"[data-ll-field]"
|
|
1629
1629
|
)
|
|
1630
1630
|
), q = [];
|
|
1631
|
-
for (const
|
|
1632
|
-
if (q.length >=
|
|
1633
|
-
if (!
|
|
1634
|
-
const de =
|
|
1631
|
+
for (const Q of x) {
|
|
1632
|
+
if (q.length >= ar) break;
|
|
1633
|
+
if (!et(Q)) continue;
|
|
1634
|
+
const de = Q.getAttribute("data-ll-field") || "";
|
|
1635
1635
|
if (!de) continue;
|
|
1636
|
-
const
|
|
1637
|
-
q.push({ name: de, label:
|
|
1636
|
+
const Z = Ot(Q) || de, ee = Q instanceof HTMLInputElement ? Q.type : Q.tagName.toLowerCase();
|
|
1637
|
+
q.push({ name: de, label: he(Z, 100), type: ee });
|
|
1638
1638
|
}
|
|
1639
|
-
|
|
1639
|
+
z.push({ id: g, intent: E, fields: q });
|
|
1640
1640
|
}
|
|
1641
1641
|
const M = {
|
|
1642
1642
|
url: o,
|
|
@@ -1646,40 +1646,50 @@ function lr(e, t = {}) {
|
|
|
1646
1646
|
visibleText: c,
|
|
1647
1647
|
visibleLinks: A,
|
|
1648
1648
|
visibleFields: R,
|
|
1649
|
-
forms:
|
|
1649
|
+
forms: z,
|
|
1650
1650
|
extras: e
|
|
1651
1651
|
};
|
|
1652
|
-
let
|
|
1653
|
-
for (;
|
|
1654
|
-
M.visibleFields.pop(),
|
|
1655
|
-
for (;
|
|
1656
|
-
M.visibleLinks.pop(),
|
|
1657
|
-
return
|
|
1658
|
-
}
|
|
1659
|
-
let
|
|
1660
|
-
function
|
|
1652
|
+
let O = Ee(JSON.stringify(M.regions)) + Ee(M.visibleText) + Ee(JSON.stringify(M.visibleLinks)) + Ee(JSON.stringify(M.visibleFields));
|
|
1653
|
+
for (; O > Xe && M.visibleFields.length > 0; )
|
|
1654
|
+
M.visibleFields.pop(), O = Ee(JSON.stringify(M.visibleFields));
|
|
1655
|
+
for (; O > Xe && M.visibleLinks.length > 0; )
|
|
1656
|
+
M.visibleLinks.pop(), O -= 80;
|
|
1657
|
+
return Ee(M.visibleText) > Xe && (M.visibleText = he(M.visibleText, Xe - 100)), M;
|
|
1658
|
+
}
|
|
1659
|
+
let Ne = null;
|
|
1660
|
+
function qt(e, t = {}) {
|
|
1661
1661
|
const r = Date.now(), i = `${typeof window < "u" && window.location.pathname || "/"}::${typeof window < "u" ? window.scrollY : 0}`;
|
|
1662
|
-
if (
|
|
1663
|
-
return
|
|
1664
|
-
const l =
|
|
1665
|
-
return
|
|
1662
|
+
if (Ne && Ne.key === i && r - Ne.at < 1e3)
|
|
1663
|
+
return Ne.ctx;
|
|
1664
|
+
const l = sr(e, t);
|
|
1665
|
+
return Ne = { key: i, at: r, ctx: l }, l;
|
|
1666
1666
|
}
|
|
1667
|
-
function
|
|
1668
|
-
|
|
1667
|
+
function dr() {
|
|
1668
|
+
Ne = null;
|
|
1669
1669
|
}
|
|
1670
|
-
const
|
|
1671
|
-
function
|
|
1670
|
+
const ur = 200;
|
|
1671
|
+
function fr(e) {
|
|
1672
|
+
const t = String(e.href || "");
|
|
1673
|
+
return {
|
|
1674
|
+
href: t,
|
|
1675
|
+
text: String(e.text ?? e.title ?? t),
|
|
1676
|
+
internal: e.internal ?? !0,
|
|
1677
|
+
title: e.title,
|
|
1678
|
+
description: e.description
|
|
1679
|
+
};
|
|
1680
|
+
}
|
|
1681
|
+
function pr(e) {
|
|
1672
1682
|
return !(!e || e.startsWith("#") || e.startsWith("javascript:") || e.startsWith("mailto:") || e.startsWith("tel:"));
|
|
1673
1683
|
}
|
|
1674
|
-
function
|
|
1684
|
+
function hr(e) {
|
|
1675
1685
|
const t = e ?? (typeof document < "u" ? document : null);
|
|
1676
1686
|
if (!t) return [];
|
|
1677
1687
|
const r = typeof window < "u" && window.location.origin || "", o = /* @__PURE__ */ new Set(), i = [], l = Array.from(t.querySelectorAll("a[href]"));
|
|
1678
1688
|
for (const s of l) {
|
|
1679
|
-
if (i.length >=
|
|
1680
|
-
if (
|
|
1689
|
+
if (i.length >= ur) break;
|
|
1690
|
+
if (ut(s)) continue;
|
|
1681
1691
|
const d = s.getAttribute("href") || "";
|
|
1682
|
-
if (!
|
|
1692
|
+
if (!pr(d)) continue;
|
|
1683
1693
|
let u = d, h = !0;
|
|
1684
1694
|
try {
|
|
1685
1695
|
if (typeof window < "u") {
|
|
@@ -1696,23 +1706,23 @@ function dr(e) {
|
|
|
1696
1706
|
}
|
|
1697
1707
|
return i;
|
|
1698
1708
|
}
|
|
1699
|
-
let
|
|
1700
|
-
const
|
|
1701
|
-
function
|
|
1709
|
+
let Ae = null;
|
|
1710
|
+
const mr = 5e3;
|
|
1711
|
+
function ct() {
|
|
1702
1712
|
const e = Date.now(), t = typeof window < "u" && window.location.pathname || "/";
|
|
1703
|
-
if (
|
|
1704
|
-
return
|
|
1705
|
-
const r =
|
|
1706
|
-
return
|
|
1713
|
+
if (Ae && Ae.pathname === t && e - Ae.at < mr)
|
|
1714
|
+
return Ae.routes;
|
|
1715
|
+
const r = hr();
|
|
1716
|
+
return Ae = { at: e, pathname: t, routes: r }, r;
|
|
1707
1717
|
}
|
|
1708
|
-
function
|
|
1709
|
-
|
|
1718
|
+
function gr() {
|
|
1719
|
+
Ae = null;
|
|
1710
1720
|
}
|
|
1711
|
-
function
|
|
1721
|
+
function yr(e, t) {
|
|
1712
1722
|
const r = e instanceof HTMLInputElement ? HTMLInputElement.prototype : e instanceof HTMLTextAreaElement ? HTMLTextAreaElement.prototype : HTMLSelectElement.prototype, o = Object.getOwnPropertyDescriptor(r, "value"), i = o == null ? void 0 : o.set;
|
|
1713
1723
|
i ? i.call(e, t) : e.value = t;
|
|
1714
1724
|
}
|
|
1715
|
-
function
|
|
1725
|
+
function vr(e, t, r = {}) {
|
|
1716
1726
|
const o = r.triggerInput ?? !0, i = r.triggerChange ?? !0;
|
|
1717
1727
|
if (e instanceof HTMLInputElement && (e.type === "checkbox" || e.type === "radio")) {
|
|
1718
1728
|
const l = Object.getOwnPropertyDescriptor(
|
|
@@ -1722,9 +1732,9 @@ function mr(e, t, r = {}) {
|
|
|
1722
1732
|
s ? s.call(e, d) : e.checked = d, o && e.dispatchEvent(new Event("input", { bubbles: !0 })), i && e.dispatchEvent(new Event("change", { bubbles: !0 }));
|
|
1723
1733
|
return;
|
|
1724
1734
|
}
|
|
1725
|
-
|
|
1735
|
+
yr(e, t), o && e.dispatchEvent(new Event("input", { bubbles: !0 })), i && e.dispatchEvent(new Event("change", { bubbles: !0 }));
|
|
1726
1736
|
}
|
|
1727
|
-
function
|
|
1737
|
+
function br() {
|
|
1728
1738
|
if (typeof window > "u" || typeof document > "u")
|
|
1729
1739
|
return !1;
|
|
1730
1740
|
const e = document.scrollingElement || document.documentElement;
|
|
@@ -1732,19 +1742,19 @@ function gr() {
|
|
|
1732
1742
|
const t = window.getComputedStyle(e);
|
|
1733
1743
|
return !(t.overflowY === "hidden" || t.overflowY === "clip");
|
|
1734
1744
|
}
|
|
1735
|
-
function
|
|
1745
|
+
function wr(e) {
|
|
1736
1746
|
if (!(e instanceof HTMLElement)) return !1;
|
|
1737
1747
|
const r = window.getComputedStyle(e).overflowY;
|
|
1738
1748
|
return !(r !== "auto" && r !== "scroll" || e.scrollHeight <= e.clientHeight + 2);
|
|
1739
1749
|
}
|
|
1740
|
-
function
|
|
1750
|
+
function _r() {
|
|
1741
1751
|
if (typeof document > "u") return null;
|
|
1742
1752
|
const e = Array.from(
|
|
1743
1753
|
document.querySelectorAll("body, body *")
|
|
1744
1754
|
);
|
|
1745
1755
|
let t = null, r = 0;
|
|
1746
1756
|
for (const o of e) {
|
|
1747
|
-
if (!
|
|
1757
|
+
if (!wr(o)) continue;
|
|
1748
1758
|
const i = o.getBoundingClientRect();
|
|
1749
1759
|
if (i.bottom <= 0 || i.top >= window.innerHeight || i.right <= 0 || i.left >= window.innerWidth || i.width <= 0 || i.height <= 0 || o.closest(".ll-widget")) continue;
|
|
1750
1760
|
const l = i.width * i.height;
|
|
@@ -1752,24 +1762,24 @@ function vr() {
|
|
|
1752
1762
|
}
|
|
1753
1763
|
return t;
|
|
1754
1764
|
}
|
|
1755
|
-
function
|
|
1765
|
+
function xr() {
|
|
1756
1766
|
if (typeof window > "u")
|
|
1757
1767
|
return null;
|
|
1758
|
-
if (
|
|
1759
|
-
const e =
|
|
1768
|
+
if (br()) return window;
|
|
1769
|
+
const e = _r();
|
|
1760
1770
|
return e || window;
|
|
1761
1771
|
}
|
|
1762
|
-
function
|
|
1772
|
+
function Bt(e) {
|
|
1763
1773
|
return e instanceof Window ? e.innerHeight || 0 : e.clientHeight || 0;
|
|
1764
1774
|
}
|
|
1765
|
-
function
|
|
1775
|
+
function kr(e) {
|
|
1766
1776
|
var t, r;
|
|
1767
1777
|
return e instanceof Window ? typeof document > "u" ? 0 : Math.max(
|
|
1768
1778
|
((t = document.body) == null ? void 0 : t.scrollHeight) ?? 0,
|
|
1769
1779
|
((r = document.documentElement) == null ? void 0 : r.scrollHeight) ?? 0
|
|
1770
1780
|
) : e.scrollHeight - e.clientHeight;
|
|
1771
1781
|
}
|
|
1772
|
-
const
|
|
1782
|
+
const Lr = /* @__PURE__ */ new Set([
|
|
1773
1783
|
"agent_state",
|
|
1774
1784
|
"avatar_stream_ready",
|
|
1775
1785
|
"avatar_active",
|
|
@@ -1792,8 +1802,8 @@ const _r = /* @__PURE__ */ new Set([
|
|
|
1792
1802
|
"submit_form",
|
|
1793
1803
|
"request_routes"
|
|
1794
1804
|
]);
|
|
1795
|
-
function
|
|
1796
|
-
var
|
|
1805
|
+
function Sr(e) {
|
|
1806
|
+
var bt, wt, _t, xt, kt, Lt, St;
|
|
1797
1807
|
const {
|
|
1798
1808
|
agentId: t,
|
|
1799
1809
|
apiKey: r,
|
|
@@ -1812,67 +1822,68 @@ function xr(e) {
|
|
|
1812
1822
|
currentTeamMemberId: R,
|
|
1813
1823
|
onTeamMemberChange: b,
|
|
1814
1824
|
idleLoopUrl: L,
|
|
1815
|
-
greeting:
|
|
1825
|
+
greeting: z,
|
|
1816
1826
|
avatarImageUrl: M,
|
|
1817
|
-
agentName:
|
|
1827
|
+
agentName: O,
|
|
1818
1828
|
branding: p = {},
|
|
1819
1829
|
allowCamera: g = !0,
|
|
1820
1830
|
allowScreenShare: E = !0,
|
|
1821
1831
|
allowTyping: x = !0,
|
|
1822
1832
|
showOn: q,
|
|
1823
|
-
hideOn:
|
|
1833
|
+
hideOn: Q,
|
|
1824
1834
|
pathname: de,
|
|
1825
|
-
onNavigate:
|
|
1826
|
-
onScrollToSelector:
|
|
1835
|
+
onNavigate: Z,
|
|
1836
|
+
onScrollToSelector: ee,
|
|
1827
1837
|
getPageContext: ue,
|
|
1828
|
-
pageContextExtras:
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
1838
|
+
pageContextExtras: He,
|
|
1839
|
+
getRoutes: Oe,
|
|
1840
|
+
onScrollPage: qe,
|
|
1841
|
+
onClick: Be,
|
|
1842
|
+
capabilities: me,
|
|
1843
|
+
onConnect: ge,
|
|
1844
|
+
onDisconnect: ye,
|
|
1845
|
+
onTranscript: ve,
|
|
1846
|
+
onAgentState: be,
|
|
1847
|
+
onConnectionStateChange: we,
|
|
1848
|
+
onAgentEvent: _e,
|
|
1849
|
+
onAgentCommand: xe,
|
|
1850
|
+
controlledSession: F,
|
|
1851
|
+
className: We,
|
|
1841
1852
|
style: Fe,
|
|
1842
1853
|
zIndex: Ue = 2147483647
|
|
1843
|
-
} = e,
|
|
1854
|
+
} = e, je = Mn(de), le = On(je, q, Q);
|
|
1844
1855
|
P(() => {
|
|
1845
|
-
|
|
1846
|
-
}, [
|
|
1847
|
-
const oe = R !== void 0, [
|
|
1848
|
-
var
|
|
1849
|
-
return R ?? ((
|
|
1850
|
-
}),
|
|
1851
|
-
() => (C == null ? void 0 : C.find((
|
|
1852
|
-
[C,
|
|
1853
|
-
),
|
|
1856
|
+
dr(), gr();
|
|
1857
|
+
}, [je]);
|
|
1858
|
+
const oe = R !== void 0, [ke, Le] = N(() => {
|
|
1859
|
+
var y;
|
|
1860
|
+
return R ?? ((y = C == null ? void 0 : C[0]) == null ? void 0 : y.id);
|
|
1861
|
+
}), fe = oe ? R : ke, V = Qe(
|
|
1862
|
+
() => (C == null ? void 0 : C.find((y) => y.id === fe)) ?? null,
|
|
1863
|
+
[C, fe]
|
|
1864
|
+
), Re = (V == null ? void 0 : V.agentId) ?? t, [te, X] = Nn({
|
|
1854
1865
|
value: d,
|
|
1855
1866
|
defaultValue: u,
|
|
1856
1867
|
onChange: h,
|
|
1857
1868
|
persistKey: c,
|
|
1858
1869
|
disablePersistence: A
|
|
1859
|
-
}),
|
|
1860
|
-
|
|
1861
|
-
function ce(
|
|
1862
|
-
const f =
|
|
1863
|
-
return f ? f.includes(
|
|
1870
|
+
}), ie = Rn(a), ae = gn(), J = yn(), ne = bn(), pe = wn(), Ie = _n(), [Ve, Me] = N(!1), [Se, v] = N(!1), [Y, Ye] = N(!1), [Vt, Yt] = N(!1), [tt, Gt] = N(!1), nt = I(Z), rt = I(ee), ot = I(qe), it = I(Be), ft = I(ue), pt = I(He), ht = I(Oe), lt = I(me), re = I(null);
|
|
1871
|
+
nt.current = Z, rt.current = ee, ot.current = qe, it.current = Be, ft.current = ue, pt.current = He, ht.current = Oe, lt.current = me;
|
|
1872
|
+
function ce(y) {
|
|
1873
|
+
const f = lt.current;
|
|
1874
|
+
return f ? f.includes(y) : !0;
|
|
1864
1875
|
}
|
|
1865
|
-
function se(
|
|
1876
|
+
function se(y, f) {
|
|
1866
1877
|
console.warn(
|
|
1867
|
-
`[LiveLayer] Agent command "${
|
|
1878
|
+
`[LiveLayer] Agent command "${y}" blocked — capability "${f}" not in allowlist. See https://livelayer.studio/docs/react/capabilities`
|
|
1868
1879
|
);
|
|
1869
1880
|
}
|
|
1870
|
-
const
|
|
1871
|
-
(
|
|
1872
|
-
var
|
|
1873
|
-
const f =
|
|
1881
|
+
const Te = S(
|
|
1882
|
+
(y) => {
|
|
1883
|
+
var K, Ge, Je, Ct;
|
|
1884
|
+
const f = y;
|
|
1874
1885
|
if (!(!f.type || typeof f.type != "string")) {
|
|
1875
|
-
if (
|
|
1886
|
+
if (_e == null || _e({ eventName: f.type, data: y }), f.type === "navigate") {
|
|
1876
1887
|
if (!ce("navigate")) {
|
|
1877
1888
|
se("navigate", "navigate");
|
|
1878
1889
|
return;
|
|
@@ -1884,9 +1895,9 @@ function xr(e) {
|
|
|
1884
1895
|
);
|
|
1885
1896
|
return;
|
|
1886
1897
|
}
|
|
1887
|
-
if (
|
|
1898
|
+
if (nt.current) {
|
|
1888
1899
|
try {
|
|
1889
|
-
|
|
1900
|
+
nt.current(k);
|
|
1890
1901
|
} catch (T) {
|
|
1891
1902
|
console.warn(
|
|
1892
1903
|
`[LiveLayer] onNavigate threw for "${k}". Falling back. Error:`,
|
|
@@ -1923,34 +1934,34 @@ function xr(e) {
|
|
|
1923
1934
|
const k = typeof f.selector == "string" ? f.selector : null;
|
|
1924
1935
|
if (!k) return;
|
|
1925
1936
|
const T = f.behavior === "instant" ? "instant" : "smooth";
|
|
1926
|
-
if (
|
|
1937
|
+
if (rt.current) {
|
|
1927
1938
|
try {
|
|
1928
|
-
|
|
1939
|
+
rt.current(
|
|
1929
1940
|
k,
|
|
1930
1941
|
T
|
|
1931
1942
|
);
|
|
1932
|
-
} catch (
|
|
1933
|
-
console.warn("[LiveLayer] onScrollToSelector threw.",
|
|
1943
|
+
} catch (H) {
|
|
1944
|
+
console.warn("[LiveLayer] onScrollToSelector threw.", H);
|
|
1934
1945
|
}
|
|
1935
1946
|
return;
|
|
1936
1947
|
}
|
|
1937
1948
|
if (typeof document < "u") {
|
|
1938
|
-
let
|
|
1949
|
+
let H = null;
|
|
1939
1950
|
try {
|
|
1940
|
-
|
|
1951
|
+
H = document.querySelector(k);
|
|
1941
1952
|
} catch {
|
|
1942
1953
|
console.warn(
|
|
1943
1954
|
`[LiveLayer] scroll_to: invalid selector "${k}".`
|
|
1944
1955
|
);
|
|
1945
1956
|
return;
|
|
1946
1957
|
}
|
|
1947
|
-
if (!
|
|
1958
|
+
if (!H) {
|
|
1948
1959
|
console.warn(
|
|
1949
1960
|
`[LiveLayer] scroll_to: no element matched "${k}". The user may be on a different page. See https://livelayer.studio/docs/errors/scroll-no-match`
|
|
1950
1961
|
);
|
|
1951
1962
|
return;
|
|
1952
1963
|
}
|
|
1953
|
-
|
|
1964
|
+
H.scrollIntoView({
|
|
1954
1965
|
behavior: T,
|
|
1955
1966
|
block: "start"
|
|
1956
1967
|
});
|
|
@@ -1962,45 +1973,45 @@ function xr(e) {
|
|
|
1962
1973
|
se("request_page_context", "read_page");
|
|
1963
1974
|
return;
|
|
1964
1975
|
}
|
|
1965
|
-
const k = typeof f.requestId == "string" ? f.requestId : void 0, T = (
|
|
1966
|
-
const
|
|
1967
|
-
if (
|
|
1976
|
+
const k = typeof f.requestId == "string" ? f.requestId : void 0, T = (K = re.current) == null ? void 0 : K.call(re), H = (W) => {
|
|
1977
|
+
const D = T, j = D == null ? void 0 : D.localParticipant;
|
|
1978
|
+
if (j != null && j.publishData)
|
|
1968
1979
|
try {
|
|
1969
|
-
const
|
|
1970
|
-
|
|
1971
|
-
} catch (
|
|
1972
|
-
console.warn("[LiveLayer] publishData failed.",
|
|
1980
|
+
const G = k ? { ...W, requestId: k } : W, Ce = new TextEncoder().encode(JSON.stringify(G));
|
|
1981
|
+
j.publishData(Ce, { reliable: !0 });
|
|
1982
|
+
} catch (G) {
|
|
1983
|
+
console.warn("[LiveLayer] publishData failed.", G);
|
|
1973
1984
|
}
|
|
1974
|
-
},
|
|
1985
|
+
}, $ = pt.current, B = ft.current;
|
|
1975
1986
|
try {
|
|
1976
1987
|
if (B) {
|
|
1977
|
-
const
|
|
1978
|
-
if (
|
|
1979
|
-
|
|
1988
|
+
const W = B($);
|
|
1989
|
+
if (W instanceof Promise) {
|
|
1990
|
+
H({ type: "page_context_pending" }), W.then((D) => H({ type: "page_context", context: D })).catch((D) => {
|
|
1980
1991
|
console.warn(
|
|
1981
1992
|
"[LiveLayer] getPageContext rejected; falling back to default walker.",
|
|
1982
|
-
|
|
1983
|
-
),
|
|
1993
|
+
D
|
|
1994
|
+
), H({
|
|
1984
1995
|
type: "page_context",
|
|
1985
|
-
context:
|
|
1996
|
+
context: qt($)
|
|
1986
1997
|
});
|
|
1987
1998
|
});
|
|
1988
1999
|
return;
|
|
1989
2000
|
}
|
|
1990
|
-
|
|
2001
|
+
H({ type: "page_context", context: W });
|
|
1991
2002
|
return;
|
|
1992
2003
|
}
|
|
1993
|
-
|
|
2004
|
+
H({
|
|
1994
2005
|
type: "page_context",
|
|
1995
|
-
context:
|
|
2006
|
+
context: qt($)
|
|
1996
2007
|
});
|
|
1997
|
-
} catch (
|
|
2008
|
+
} catch (W) {
|
|
1998
2009
|
console.warn(
|
|
1999
2010
|
"[LiveLayer] page-context extraction threw. Sending empty context.",
|
|
2000
|
-
|
|
2001
|
-
),
|
|
2011
|
+
W
|
|
2012
|
+
), H({
|
|
2002
2013
|
type: "page_context",
|
|
2003
|
-
context: { url: "", title: "", pathname: "/", regions: [], visibleText: "", visibleLinks: [], visibleFields: [], forms: [], extras:
|
|
2014
|
+
context: { url: "", title: "", pathname: "/", regions: [], visibleText: "", visibleLinks: [], visibleFields: [], forms: [], extras: $ }
|
|
2004
2015
|
});
|
|
2005
2016
|
}
|
|
2006
2017
|
return;
|
|
@@ -2018,24 +2029,24 @@ function xr(e) {
|
|
|
2018
2029
|
return;
|
|
2019
2030
|
}
|
|
2020
2031
|
const T = f.behavior === "instant" ? "instant" : "smooth";
|
|
2021
|
-
if (
|
|
2032
|
+
if (ot.current) {
|
|
2022
2033
|
try {
|
|
2023
|
-
|
|
2034
|
+
ot.current(
|
|
2024
2035
|
k,
|
|
2025
2036
|
T
|
|
2026
2037
|
);
|
|
2027
|
-
} catch (
|
|
2028
|
-
console.warn("[LiveLayer] onScrollPage threw.",
|
|
2038
|
+
} catch (D) {
|
|
2039
|
+
console.warn("[LiveLayer] onScrollPage threw.", D);
|
|
2029
2040
|
}
|
|
2030
2041
|
return;
|
|
2031
2042
|
}
|
|
2032
2043
|
if (typeof window > "u") return;
|
|
2033
|
-
const
|
|
2034
|
-
|
|
2035
|
-
},
|
|
2036
|
-
|
|
2044
|
+
const H = { behavior: T }, $ = xr(), B = (D) => {
|
|
2045
|
+
$ instanceof Window ? $.scrollBy({ top: D, ...H }) : $.scrollBy({ top: D, ...H });
|
|
2046
|
+
}, W = (D) => {
|
|
2047
|
+
$ instanceof Window ? $.scrollTo({ top: D, ...H }) : $.scrollTo({ top: D, ...H });
|
|
2037
2048
|
};
|
|
2038
|
-
k === "up" ? B(-
|
|
2049
|
+
k === "up" ? B(-Bt($)) : k === "down" ? B(Bt($)) : W(k === "top" ? 0 : kr($));
|
|
2039
2050
|
return;
|
|
2040
2051
|
}
|
|
2041
2052
|
if (f.type === "click") {
|
|
@@ -2048,11 +2059,11 @@ function xr(e) {
|
|
|
2048
2059
|
console.warn("[LiveLayer] click: missing selector.");
|
|
2049
2060
|
return;
|
|
2050
2061
|
}
|
|
2051
|
-
if (
|
|
2062
|
+
if (it.current) {
|
|
2052
2063
|
try {
|
|
2053
|
-
|
|
2054
|
-
} catch (
|
|
2055
|
-
console.warn("[LiveLayer] onClick threw.",
|
|
2064
|
+
it.current(k);
|
|
2065
|
+
} catch (H) {
|
|
2066
|
+
console.warn("[LiveLayer] onClick threw.", H);
|
|
2056
2067
|
}
|
|
2057
2068
|
return;
|
|
2058
2069
|
}
|
|
@@ -2078,7 +2089,7 @@ function xr(e) {
|
|
|
2078
2089
|
);
|
|
2079
2090
|
return;
|
|
2080
2091
|
}
|
|
2081
|
-
(
|
|
2092
|
+
(Ge = T.click) == null || Ge.call(T);
|
|
2082
2093
|
return;
|
|
2083
2094
|
}
|
|
2084
2095
|
if (f.type === "fill_form" || f.type === "focus_field") {
|
|
@@ -2108,53 +2119,53 @@ function xr(e) {
|
|
|
2108
2119
|
return;
|
|
2109
2120
|
}
|
|
2110
2121
|
if (f.type === "focus_field") {
|
|
2111
|
-
const
|
|
2112
|
-
if (
|
|
2122
|
+
const $ = typeof f.fieldName == "string" ? f.fieldName : null;
|
|
2123
|
+
if (!$) {
|
|
2113
2124
|
console.warn("[LiveLayer] focus_field: missing fieldName.");
|
|
2114
2125
|
return;
|
|
2115
2126
|
}
|
|
2116
|
-
const B = T.querySelector(`[data-ll-field="${
|
|
2127
|
+
const B = T.querySelector(`[data-ll-field="${$.replace(/"/g, '\\"')}"]`);
|
|
2117
2128
|
if (!B) {
|
|
2118
2129
|
console.warn(
|
|
2119
|
-
`[LiveLayer] focus_field: no field "${
|
|
2130
|
+
`[LiveLayer] focus_field: no field "${$}" in form "${k}".`
|
|
2120
2131
|
);
|
|
2121
2132
|
return;
|
|
2122
2133
|
}
|
|
2123
|
-
if (!
|
|
2134
|
+
if (!et(B)) {
|
|
2124
2135
|
console.warn(
|
|
2125
|
-
`[LiveLayer] focus_field: field "${
|
|
2136
|
+
`[LiveLayer] focus_field: field "${$}" is privacy-protected and not focusable.`
|
|
2126
2137
|
);
|
|
2127
2138
|
return;
|
|
2128
2139
|
}
|
|
2129
2140
|
B.focus();
|
|
2130
2141
|
return;
|
|
2131
2142
|
}
|
|
2132
|
-
const
|
|
2133
|
-
if (!
|
|
2143
|
+
const H = f.values && typeof f.values == "object" ? f.values : null;
|
|
2144
|
+
if (!H) {
|
|
2134
2145
|
console.warn("[LiveLayer] fill_form: missing or invalid values.");
|
|
2135
2146
|
return;
|
|
2136
2147
|
}
|
|
2137
|
-
for (const [
|
|
2148
|
+
for (const [$, B] of Object.entries(H)) {
|
|
2138
2149
|
if (typeof B != "string") continue;
|
|
2139
|
-
const
|
|
2140
|
-
if (!
|
|
2150
|
+
const W = T.querySelector(`[data-ll-field="${$.replace(/"/g, '\\"')}"]`);
|
|
2151
|
+
if (!W) {
|
|
2141
2152
|
console.warn(
|
|
2142
|
-
`[LiveLayer] fill_form: no field "${
|
|
2153
|
+
`[LiveLayer] fill_form: no field "${$}" in form "${k}". Skipping.`
|
|
2143
2154
|
);
|
|
2144
2155
|
continue;
|
|
2145
2156
|
}
|
|
2146
|
-
if (!
|
|
2157
|
+
if (!et(W)) {
|
|
2147
2158
|
console.warn(
|
|
2148
|
-
`[LiveLayer] fill_form: field "${
|
|
2159
|
+
`[LiveLayer] fill_form: field "${$}" is privacy-protected (password / cc-* / private). Skipping.`
|
|
2149
2160
|
);
|
|
2150
2161
|
continue;
|
|
2151
2162
|
}
|
|
2152
2163
|
try {
|
|
2153
|
-
|
|
2154
|
-
} catch (
|
|
2164
|
+
vr(W, B);
|
|
2165
|
+
} catch (D) {
|
|
2155
2166
|
console.warn(
|
|
2156
|
-
`[LiveLayer] fill_form: failed to set "${
|
|
2157
|
-
|
|
2167
|
+
`[LiveLayer] fill_form: failed to set "${$}".`,
|
|
2168
|
+
D
|
|
2158
2169
|
);
|
|
2159
2170
|
}
|
|
2160
2171
|
}
|
|
@@ -2186,24 +2197,24 @@ function xr(e) {
|
|
|
2186
2197
|
);
|
|
2187
2198
|
return;
|
|
2188
2199
|
}
|
|
2189
|
-
const
|
|
2190
|
-
const
|
|
2191
|
-
if (
|
|
2200
|
+
const H = typeof f.requestId == "string" ? f.requestId : void 0, $ = (Je = re.current) == null ? void 0 : Je.call(re), B = (j) => {
|
|
2201
|
+
const G = $, Ce = G == null ? void 0 : G.localParticipant;
|
|
2202
|
+
if (Ce != null && Ce.publishData)
|
|
2192
2203
|
try {
|
|
2193
|
-
const
|
|
2194
|
-
|
|
2204
|
+
const an = H ? { ...j, requestId: H } : j, cn = new TextEncoder().encode(JSON.stringify(an));
|
|
2205
|
+
Ce.publishData(cn, { reliable: !0 });
|
|
2195
2206
|
} catch {
|
|
2196
2207
|
}
|
|
2197
2208
|
};
|
|
2198
|
-
let
|
|
2199
|
-
const
|
|
2200
|
-
|
|
2209
|
+
let W = !1;
|
|
2210
|
+
const D = () => {
|
|
2211
|
+
W = !0, B({ type: "form_submitted", formId: k });
|
|
2201
2212
|
};
|
|
2202
|
-
T.addEventListener("submit",
|
|
2213
|
+
T.addEventListener("submit", D, { once: !0 });
|
|
2203
2214
|
try {
|
|
2204
2215
|
typeof T.requestSubmit == "function" ? T.requestSubmit() : T.submit();
|
|
2205
|
-
} catch (
|
|
2206
|
-
console.warn("[LiveLayer] submit_form: requestSubmit threw.",
|
|
2216
|
+
} catch (j) {
|
|
2217
|
+
console.warn("[LiveLayer] submit_form: requestSubmit threw.", j), T.removeEventListener("submit", D), B({
|
|
2207
2218
|
type: "form_submit_blocked",
|
|
2208
2219
|
formId: k,
|
|
2209
2220
|
reason: "exception"
|
|
@@ -2211,7 +2222,7 @@ function xr(e) {
|
|
|
2211
2222
|
return;
|
|
2212
2223
|
}
|
|
2213
2224
|
setTimeout(() => {
|
|
2214
|
-
|
|
2225
|
+
W || (T.removeEventListener("submit", D), B({
|
|
2215
2226
|
type: "form_submit_blocked",
|
|
2216
2227
|
formId: k,
|
|
2217
2228
|
reason: "validation"
|
|
@@ -2224,62 +2235,92 @@ function xr(e) {
|
|
|
2224
2235
|
se("request_routes", "read_page");
|
|
2225
2236
|
return;
|
|
2226
2237
|
}
|
|
2227
|
-
const k = typeof f.requestId == "string" ? f.requestId : void 0,
|
|
2228
|
-
if (!(
|
|
2238
|
+
const k = typeof f.requestId == "string" ? f.requestId : void 0, H = (Ct = re.current) == null ? void 0 : Ct.call(re), $ = H == null ? void 0 : H.localParticipant;
|
|
2239
|
+
if (!($ != null && $.publishData)) return;
|
|
2240
|
+
const B = (D) => {
|
|
2241
|
+
try {
|
|
2242
|
+
const j = k ? { type: "routes", routes: D, requestId: k } : { type: "routes", routes: D }, G = new TextEncoder().encode(JSON.stringify(j));
|
|
2243
|
+
$.publishData(G, { reliable: !0 });
|
|
2244
|
+
} catch (j) {
|
|
2245
|
+
console.warn("[LiveLayer] request_routes: publishData failed.", j);
|
|
2246
|
+
}
|
|
2247
|
+
}, W = ht.current;
|
|
2248
|
+
if (W) {
|
|
2249
|
+
try {
|
|
2250
|
+
const D = W(), j = (G) => {
|
|
2251
|
+
if (!Array.isArray(G)) {
|
|
2252
|
+
B([]);
|
|
2253
|
+
return;
|
|
2254
|
+
}
|
|
2255
|
+
B(G.map(fr).slice(0, 200));
|
|
2256
|
+
};
|
|
2257
|
+
D instanceof Promise ? D.then(j).catch((G) => {
|
|
2258
|
+
console.warn(
|
|
2259
|
+
"[LiveLayer] getRoutes rejected; falling back to DOM walker.",
|
|
2260
|
+
G
|
|
2261
|
+
), B(ct());
|
|
2262
|
+
}) : j(D);
|
|
2263
|
+
} catch (D) {
|
|
2264
|
+
console.warn(
|
|
2265
|
+
"[LiveLayer] getRoutes threw; falling back to DOM walker.",
|
|
2266
|
+
D
|
|
2267
|
+
), B(ct());
|
|
2268
|
+
}
|
|
2269
|
+
return;
|
|
2270
|
+
}
|
|
2229
2271
|
try {
|
|
2230
|
-
|
|
2231
|
-
|
|
2232
|
-
|
|
2233
|
-
console.warn("[LiveLayer] request_routes: extractRoutes threw.", B);
|
|
2272
|
+
B(ct());
|
|
2273
|
+
} catch (D) {
|
|
2274
|
+
console.warn("[LiveLayer] request_routes: extractRoutes threw.", D);
|
|
2234
2275
|
}
|
|
2235
2276
|
return;
|
|
2236
2277
|
}
|
|
2237
|
-
|
|
2278
|
+
Lr.has(f.type) || xe == null || xe(f);
|
|
2238
2279
|
}
|
|
2239
2280
|
},
|
|
2240
|
-
[
|
|
2241
|
-
), U =
|
|
2242
|
-
agentId:
|
|
2281
|
+
[xe, _e]
|
|
2282
|
+
), U = mn({
|
|
2283
|
+
agentId: F ? "__controlled__" : Re,
|
|
2243
2284
|
baseUrl: o,
|
|
2244
2285
|
apiKey: r,
|
|
2245
2286
|
sessionEndpoint: i,
|
|
2246
2287
|
sessionBody: l,
|
|
2247
|
-
onDataMessage:
|
|
2288
|
+
onDataMessage: F ? void 0 : Te
|
|
2248
2289
|
});
|
|
2249
2290
|
P(() => {
|
|
2250
|
-
if (
|
|
2251
|
-
return
|
|
2252
|
-
}, [
|
|
2253
|
-
var
|
|
2254
|
-
return (
|
|
2291
|
+
if (F != null && F.subscribeToDataMessages)
|
|
2292
|
+
return F.subscribeToDataMessages(Te);
|
|
2293
|
+
}, [F, Te]), re.current = () => {
|
|
2294
|
+
var y;
|
|
2295
|
+
return (y = U.getRoom) == null ? void 0 : y.call(U);
|
|
2255
2296
|
}, P(() => {
|
|
2256
|
-
var
|
|
2297
|
+
var K;
|
|
2257
2298
|
if (typeof window > "u") return;
|
|
2258
|
-
const
|
|
2259
|
-
if (
|
|
2260
|
-
return window.__livelayerSimulateCommand = (
|
|
2299
|
+
const y = ((K = window.location) == null ? void 0 : K.hostname) || "";
|
|
2300
|
+
if (y === "localhost" || y === "127.0.0.1" || y === "0.0.0.0" || y.endsWith(".local") || y.endsWith(".test"))
|
|
2301
|
+
return window.__livelayerSimulateCommand = (Ge) => {
|
|
2261
2302
|
try {
|
|
2262
|
-
|
|
2263
|
-
} catch (
|
|
2264
|
-
console.warn("[LiveLayer] simulate-command threw:",
|
|
2303
|
+
Te(Ge);
|
|
2304
|
+
} catch (Je) {
|
|
2305
|
+
console.warn("[LiveLayer] simulate-command threw:", Je);
|
|
2265
2306
|
}
|
|
2266
2307
|
}, () => {
|
|
2267
2308
|
delete window.__livelayerSimulateCommand;
|
|
2268
2309
|
};
|
|
2269
|
-
}, [
|
|
2270
|
-
const w =
|
|
2271
|
-
connectionState:
|
|
2272
|
-
agentState:
|
|
2273
|
-
transcript:
|
|
2274
|
-
videoElement:
|
|
2275
|
-
audioElement:
|
|
2276
|
-
canResume:
|
|
2277
|
-
error:
|
|
2310
|
+
}, [Te]);
|
|
2311
|
+
const w = Qe(() => F ? {
|
|
2312
|
+
connectionState: F.connectionState,
|
|
2313
|
+
agentState: F.agentState,
|
|
2314
|
+
transcript: F.transcript,
|
|
2315
|
+
videoElement: F.videoElement,
|
|
2316
|
+
audioElement: F.audioElement,
|
|
2317
|
+
canResume: F.canResume,
|
|
2318
|
+
error: F.error,
|
|
2278
2319
|
agentConfig: null,
|
|
2279
2320
|
connect: async () => {
|
|
2280
|
-
await
|
|
2321
|
+
await F.onConnect();
|
|
2281
2322
|
},
|
|
2282
|
-
disconnect: () =>
|
|
2323
|
+
disconnect: () => F.onDisconnect(),
|
|
2283
2324
|
// Dummy getRoom for shape compatibility — controlled consumers own the Room.
|
|
2284
2325
|
// Internal session's getRoom returns null when no real connect has happened,
|
|
2285
2326
|
// so we reuse its reference for type consistency.
|
|
@@ -2298,199 +2339,199 @@ function xr(e) {
|
|
|
2298
2339
|
disconnect: U.disconnect,
|
|
2299
2340
|
getRoom: U.getRoom,
|
|
2300
2341
|
isControlled: !1
|
|
2301
|
-
}, [
|
|
2342
|
+
}, [F, U]), mt = I(null);
|
|
2302
2343
|
P(() => {
|
|
2303
|
-
const
|
|
2304
|
-
if (!(!
|
|
2305
|
-
return f.appendChild(
|
|
2306
|
-
|
|
2344
|
+
const y = w.videoElement, f = mt.current;
|
|
2345
|
+
if (!(!y || !f))
|
|
2346
|
+
return f.appendChild(y), () => {
|
|
2347
|
+
y.parentNode === f && f.removeChild(y);
|
|
2307
2348
|
};
|
|
2308
2349
|
}, [w.videoElement]), P(() => {
|
|
2309
|
-
const
|
|
2310
|
-
if (!
|
|
2311
|
-
|
|
2312
|
-
const f =
|
|
2313
|
-
return f && typeof f.catch == "function" && f.catch((
|
|
2314
|
-
(
|
|
2350
|
+
const y = w.audioElement;
|
|
2351
|
+
if (!y) return;
|
|
2352
|
+
ae.attach(y);
|
|
2353
|
+
const f = y.play();
|
|
2354
|
+
return f && typeof f.catch == "function" && f.catch((K) => {
|
|
2355
|
+
(K == null ? void 0 : K.name) === "NotAllowedError" && Me(!0);
|
|
2315
2356
|
}), () => {
|
|
2316
|
-
|
|
2357
|
+
ae.detach();
|
|
2317
2358
|
};
|
|
2318
2359
|
}, [w.audioElement]), P(() => {
|
|
2319
2360
|
if (w.isControlled || w.connectionState !== "connected") return;
|
|
2320
|
-
const
|
|
2321
|
-
if (
|
|
2322
|
-
return
|
|
2323
|
-
}),
|
|
2324
|
-
|
|
2361
|
+
const y = w.getRoom();
|
|
2362
|
+
if (y)
|
|
2363
|
+
return J.setupMic(y).catch(() => {
|
|
2364
|
+
}), ne.attachRoom(y), pe.attachRoom(y), Ie.refresh(), () => {
|
|
2365
|
+
J.teardownMic(), ne.teardown(), pe.teardown();
|
|
2325
2366
|
};
|
|
2326
2367
|
}, [w.isControlled, w.connectionState]), P(() => {
|
|
2327
|
-
const
|
|
2328
|
-
|
|
2329
|
-
}, [w.audioElement,
|
|
2330
|
-
const
|
|
2368
|
+
const y = w.audioElement;
|
|
2369
|
+
y && (y.muted = tt);
|
|
2370
|
+
}, [w.audioElement, tt]);
|
|
2371
|
+
const Jt = S((y) => {
|
|
2331
2372
|
const f = w.getRoom();
|
|
2332
2373
|
if (f)
|
|
2333
2374
|
try {
|
|
2334
|
-
const
|
|
2335
|
-
JSON.stringify({ type: "user_message", text:
|
|
2375
|
+
const K = new TextEncoder().encode(
|
|
2376
|
+
JSON.stringify({ type: "user_message", text: y })
|
|
2336
2377
|
);
|
|
2337
|
-
f.localParticipant.publishData(
|
|
2378
|
+
f.localParticipant.publishData(K, { reliable: !0 });
|
|
2338
2379
|
} catch {
|
|
2339
2380
|
}
|
|
2340
|
-
}, [w]),
|
|
2341
|
-
|
|
2381
|
+
}, [w]), Kt = S(() => {
|
|
2382
|
+
Gt((y) => !y);
|
|
2342
2383
|
}, []);
|
|
2343
2384
|
P(() => {
|
|
2344
|
-
|
|
2345
|
-
}, [w.connectionState,
|
|
2346
|
-
|
|
2347
|
-
}, [w.transcript,
|
|
2348
|
-
|
|
2349
|
-
}, [w.agentState,
|
|
2350
|
-
const
|
|
2385
|
+
we == null || we(w.connectionState), w.connectionState === "connected" ? ge == null || ge() : w.connectionState === "disconnected" && (ye == null || ye());
|
|
2386
|
+
}, [w.connectionState, ge, ye, we]), P(() => {
|
|
2387
|
+
ve == null || ve(w.transcript);
|
|
2388
|
+
}, [w.transcript, ve]), P(() => {
|
|
2389
|
+
be == null || be(w.agentState);
|
|
2390
|
+
}, [w.agentState, be]);
|
|
2391
|
+
const gt = I(!1);
|
|
2351
2392
|
P(() => {
|
|
2352
|
-
w.isControlled || !s ||
|
|
2353
|
-
}, [s, w.connectionState, w,
|
|
2354
|
-
const
|
|
2355
|
-
(
|
|
2356
|
-
const f = C == null ? void 0 : C.find((
|
|
2357
|
-
f && (
|
|
2393
|
+
w.isControlled || !s || gt.current || le && w.connectionState === "idle" && (gt.current = !0, w.connect());
|
|
2394
|
+
}, [s, w.connectionState, w, le]);
|
|
2395
|
+
const Xt = S(
|
|
2396
|
+
(y) => {
|
|
2397
|
+
const f = C == null ? void 0 : C.find((K) => K.id === y);
|
|
2398
|
+
f && (Ye(!1), y !== fe && (v(!0), w.disconnect(), oe || Le(y), b == null || b(f)));
|
|
2358
2399
|
},
|
|
2359
2400
|
[
|
|
2360
2401
|
C,
|
|
2361
|
-
|
|
2402
|
+
fe,
|
|
2362
2403
|
w,
|
|
2363
2404
|
oe,
|
|
2364
2405
|
b
|
|
2365
2406
|
]
|
|
2366
2407
|
);
|
|
2367
2408
|
P(() => {
|
|
2368
|
-
|
|
2369
|
-
}, [w.connectionState,
|
|
2370
|
-
if (!
|
|
2371
|
-
const
|
|
2372
|
-
f.key === "Escape" &&
|
|
2409
|
+
Se && w.connectionState === "connected" && v(!1);
|
|
2410
|
+
}, [w.connectionState, Se]), P(() => {
|
|
2411
|
+
if (!Y) return;
|
|
2412
|
+
const y = (f) => {
|
|
2413
|
+
f.key === "Escape" && Ye(!1);
|
|
2373
2414
|
};
|
|
2374
|
-
return window.addEventListener("keydown",
|
|
2375
|
-
}, [
|
|
2376
|
-
const
|
|
2377
|
-
|
|
2378
|
-
const
|
|
2379
|
-
() =>
|
|
2380
|
-
[
|
|
2381
|
-
),
|
|
2382
|
-
w.disconnect(),
|
|
2383
|
-
}, [w,
|
|
2384
|
-
const
|
|
2385
|
-
|
|
2415
|
+
return window.addEventListener("keydown", y), () => window.removeEventListener("keydown", y);
|
|
2416
|
+
}, [Y]);
|
|
2417
|
+
const Qt = !!M || !!(V != null && V.avatarImageUrl) || w.isControlled, Pe = xn(Re, o, Qt);
|
|
2418
|
+
me === void 0 && ((bt = Pe.info) != null && bt.capabilities) && (lt.current = Pe.info.capabilities);
|
|
2419
|
+
const at = (V == null ? void 0 : V.name) ?? O ?? ((wt = w.agentConfig) == null ? void 0 : wt.name) ?? ((_t = Pe.info) == null ? void 0 : _t.name) ?? "Live Layer", yt = (V == null ? void 0 : V.avatarImageUrl) ?? M ?? ((xt = w.agentConfig) == null ? void 0 : xt.avatarImageUrl) ?? ((kt = Pe.info) == null ? void 0 : kt.avatarImageUrl) ?? null, Zt = L ?? ((Lt = w.agentConfig) == null ? void 0 : Lt.idleLoopUrl) ?? ((St = Pe.info) == null ? void 0 : St.idleLoopUrl) ?? null, en = z ?? null, tn = S(() => X("expanded"), [X]), nn = S(
|
|
2420
|
+
() => X("minimized"),
|
|
2421
|
+
[X]
|
|
2422
|
+
), vt = S(() => {
|
|
2423
|
+
w.disconnect(), X("hidden");
|
|
2424
|
+
}, [w, X]), rn = S(() => {
|
|
2425
|
+
const y = w.audioElement;
|
|
2426
|
+
y && y.play().then(() => Me(!1)).catch(() => {
|
|
2386
2427
|
});
|
|
2387
|
-
}, [w.audioElement]),
|
|
2388
|
-
|
|
2389
|
-
}, [w]),
|
|
2428
|
+
}, [w.audioElement]), on = S(() => {
|
|
2429
|
+
Me(!1), w.connect();
|
|
2430
|
+
}, [w]), De = {
|
|
2390
2431
|
...Fe,
|
|
2391
2432
|
zIndex: Ue
|
|
2392
2433
|
};
|
|
2393
|
-
p.primaryColor && (
|
|
2394
|
-
const
|
|
2434
|
+
p.primaryColor && (De["--ll-color-primary"] = p.primaryColor), p.accentColor && (De["--ll-color-accent"] = p.accentColor), p.backgroundColor && (De["--ll-color-bg"] = p.backgroundColor), p.textColor && (De["--ll-color-fg"] = p.textColor);
|
|
2435
|
+
const ln = [
|
|
2395
2436
|
"ll-widget",
|
|
2396
|
-
`ll-widget--${
|
|
2397
|
-
`ll-widget--${
|
|
2398
|
-
|
|
2437
|
+
`ll-widget--${te}`,
|
|
2438
|
+
`ll-widget--${ie ? "mobile" : "desktop"}`,
|
|
2439
|
+
We
|
|
2399
2440
|
].filter(Boolean).join(" ");
|
|
2400
|
-
return
|
|
2441
|
+
return le ? /* @__PURE__ */ _(
|
|
2401
2442
|
"div",
|
|
2402
2443
|
{
|
|
2403
|
-
className:
|
|
2404
|
-
style:
|
|
2405
|
-
"data-display-mode":
|
|
2444
|
+
className: ln,
|
|
2445
|
+
style: De,
|
|
2446
|
+
"data-display-mode": te,
|
|
2406
2447
|
"data-position": m,
|
|
2407
2448
|
children: [
|
|
2408
|
-
|
|
2409
|
-
|
|
2449
|
+
te === "hidden" && /* @__PURE__ */ n(
|
|
2450
|
+
Vn,
|
|
2410
2451
|
{
|
|
2411
2452
|
position: m,
|
|
2412
|
-
isMobile:
|
|
2453
|
+
isMobile: ie,
|
|
2413
2454
|
isSpeaking: w.agentState === "speaking",
|
|
2414
|
-
onExpand: () =>
|
|
2415
|
-
label: `Open ${
|
|
2455
|
+
onExpand: () => X("expanded"),
|
|
2456
|
+
label: `Open ${at} widget`
|
|
2416
2457
|
}
|
|
2417
2458
|
),
|
|
2418
|
-
|
|
2419
|
-
|
|
2459
|
+
te === "minimized" && /* @__PURE__ */ n(
|
|
2460
|
+
Gn,
|
|
2420
2461
|
{
|
|
2421
2462
|
position: m,
|
|
2422
|
-
isMobile:
|
|
2423
|
-
agentName:
|
|
2424
|
-
avatarImageUrl:
|
|
2463
|
+
isMobile: ie,
|
|
2464
|
+
agentName: at,
|
|
2465
|
+
avatarImageUrl: yt,
|
|
2425
2466
|
agentState: w.agentState,
|
|
2426
|
-
isMuted:
|
|
2427
|
-
audioLevel:
|
|
2428
|
-
onExpand:
|
|
2429
|
-
onToggleMute:
|
|
2430
|
-
onClose:
|
|
2467
|
+
isMuted: J.isMuted,
|
|
2468
|
+
audioLevel: ae,
|
|
2469
|
+
onExpand: tn,
|
|
2470
|
+
onToggleMute: J.toggleMute,
|
|
2471
|
+
onClose: vt
|
|
2431
2472
|
}
|
|
2432
2473
|
),
|
|
2433
|
-
|
|
2434
|
-
|
|
2474
|
+
te === "expanded" && /* @__PURE__ */ n(
|
|
2475
|
+
Kn,
|
|
2435
2476
|
{
|
|
2436
2477
|
position: m,
|
|
2437
|
-
isMobile:
|
|
2438
|
-
agentName:
|
|
2439
|
-
avatarImageUrl:
|
|
2440
|
-
idleLoopUrl:
|
|
2441
|
-
greeting:
|
|
2478
|
+
isMobile: ie,
|
|
2479
|
+
agentName: at,
|
|
2480
|
+
avatarImageUrl: yt,
|
|
2481
|
+
idleLoopUrl: Zt,
|
|
2482
|
+
greeting: en,
|
|
2442
2483
|
branding: p,
|
|
2443
2484
|
teamMembers: C,
|
|
2444
|
-
currentTeamMemberId:
|
|
2445
|
-
isSwitchingTeamMember:
|
|
2446
|
-
teamSwitcherOpen:
|
|
2447
|
-
onToggleTeamSwitcher: () =>
|
|
2448
|
-
onSelectTeamMember:
|
|
2485
|
+
currentTeamMemberId: fe,
|
|
2486
|
+
isSwitchingTeamMember: Se,
|
|
2487
|
+
teamSwitcherOpen: Y,
|
|
2488
|
+
onToggleTeamSwitcher: () => Ye((y) => !y),
|
|
2489
|
+
onSelectTeamMember: Xt,
|
|
2449
2490
|
connectionState: w.connectionState,
|
|
2450
2491
|
agentState: w.agentState,
|
|
2451
2492
|
transcript: w.transcript,
|
|
2452
|
-
isMuted:
|
|
2453
|
-
micDevices:
|
|
2454
|
-
isCameraEnabled:
|
|
2455
|
-
cameraPreviewEl:
|
|
2456
|
-
cameraDevices:
|
|
2457
|
-
activeCameraId:
|
|
2458
|
-
isScreenShareEnabled:
|
|
2459
|
-
screenPreviewEl:
|
|
2460
|
-
isSpeakerMuted:
|
|
2493
|
+
isMuted: J.isMuted,
|
|
2494
|
+
micDevices: Ie.mics,
|
|
2495
|
+
isCameraEnabled: ne.isEnabled,
|
|
2496
|
+
cameraPreviewEl: ne.previewEl,
|
|
2497
|
+
cameraDevices: Ie.cameras,
|
|
2498
|
+
activeCameraId: ne.activeDeviceId,
|
|
2499
|
+
isScreenShareEnabled: pe.isEnabled,
|
|
2500
|
+
screenPreviewEl: pe.previewEl,
|
|
2501
|
+
isSpeakerMuted: tt,
|
|
2461
2502
|
allowCamera: g,
|
|
2462
2503
|
allowScreenShare: E,
|
|
2463
2504
|
allowTyping: x,
|
|
2464
|
-
languageMenuOpen:
|
|
2465
|
-
onToggleLanguageMenu: () =>
|
|
2466
|
-
needsUserGesture:
|
|
2505
|
+
languageMenuOpen: Vt,
|
|
2506
|
+
onToggleLanguageMenu: () => Yt((y) => !y),
|
|
2507
|
+
needsUserGesture: Ve,
|
|
2467
2508
|
canResume: w.canResume,
|
|
2468
|
-
micError:
|
|
2509
|
+
micError: J.micError,
|
|
2469
2510
|
error: w.error,
|
|
2470
|
-
avatarVideoContainerRef:
|
|
2511
|
+
avatarVideoContainerRef: mt,
|
|
2471
2512
|
onConnect: () => void w.connect(),
|
|
2472
2513
|
onDisconnect: () => w.disconnect(),
|
|
2473
|
-
onRetry:
|
|
2474
|
-
onResumeAudio:
|
|
2475
|
-
onToggleMute:
|
|
2476
|
-
onToggleCamera: () => void
|
|
2477
|
-
onSwitchCameraDevice: (
|
|
2478
|
-
onToggleScreenShare: () => void
|
|
2479
|
-
onToggleSpeaker:
|
|
2480
|
-
onSendMessage:
|
|
2481
|
-
onMinimize:
|
|
2482
|
-
onClose:
|
|
2483
|
-
onClearMicError:
|
|
2514
|
+
onRetry: on,
|
|
2515
|
+
onResumeAudio: rn,
|
|
2516
|
+
onToggleMute: J.toggleMute,
|
|
2517
|
+
onToggleCamera: () => void ne.toggle(),
|
|
2518
|
+
onSwitchCameraDevice: (y) => void ne.switchDevice(y),
|
|
2519
|
+
onToggleScreenShare: () => void pe.toggle(),
|
|
2520
|
+
onToggleSpeaker: Kt,
|
|
2521
|
+
onSendMessage: Jt,
|
|
2522
|
+
onMinimize: nn,
|
|
2523
|
+
onClose: vt,
|
|
2524
|
+
onClearMicError: J.clearError
|
|
2484
2525
|
}
|
|
2485
2526
|
)
|
|
2486
2527
|
]
|
|
2487
2528
|
}
|
|
2488
2529
|
) : null;
|
|
2489
2530
|
}
|
|
2490
|
-
function
|
|
2491
|
-
return /* @__PURE__ */ n(
|
|
2531
|
+
function Tr(e) {
|
|
2532
|
+
return /* @__PURE__ */ n(hn, { children: /* @__PURE__ */ n(Sr, { ...e }) });
|
|
2492
2533
|
}
|
|
2493
|
-
const
|
|
2534
|
+
const Pr = ({
|
|
2494
2535
|
agentId: e,
|
|
2495
2536
|
baseUrl: t,
|
|
2496
2537
|
apiKey: r,
|
|
@@ -2516,9 +2557,9 @@ const Ir = ({
|
|
|
2516
2557
|
}, [e]), P(() => {
|
|
2517
2558
|
u.current && (o ? u.current.setAttribute("mode", o) : u.current.removeAttribute("mode"));
|
|
2518
2559
|
}, [o]), /* @__PURE__ */ n("div", { ref: d, className: l, style: s });
|
|
2519
|
-
},
|
|
2560
|
+
}, Dr = dt(
|
|
2520
2561
|
function({ id: t, intent: r, as: o = "div", className: i, style: l, children: s }, d) {
|
|
2521
|
-
return
|
|
2562
|
+
return dn(
|
|
2522
2563
|
o,
|
|
2523
2564
|
{
|
|
2524
2565
|
ref: d,
|
|
@@ -2530,7 +2571,7 @@ const Ir = ({
|
|
|
2530
2571
|
s
|
|
2531
2572
|
);
|
|
2532
2573
|
}
|
|
2533
|
-
),
|
|
2574
|
+
), $r = dt(
|
|
2534
2575
|
function({ id: t, intent: r, children: o, ...i }, l) {
|
|
2535
2576
|
return /* @__PURE__ */ n(
|
|
2536
2577
|
"form",
|
|
@@ -2543,7 +2584,7 @@ const Ir = ({
|
|
|
2543
2584
|
}
|
|
2544
2585
|
);
|
|
2545
2586
|
}
|
|
2546
|
-
),
|
|
2587
|
+
), zr = dt(
|
|
2547
2588
|
function(t, r) {
|
|
2548
2589
|
const { name: o, label: i, labelClassName: l } = t, s = { name: o, "data-ll-field": o };
|
|
2549
2590
|
let d;
|
|
@@ -2585,8 +2626,8 @@ const Ir = ({
|
|
|
2585
2626
|
] });
|
|
2586
2627
|
}
|
|
2587
2628
|
);
|
|
2588
|
-
let
|
|
2589
|
-
function
|
|
2629
|
+
let Wt = 1;
|
|
2630
|
+
function Hr({
|
|
2590
2631
|
onMount: e,
|
|
2591
2632
|
defaultOpen: t = !1,
|
|
2592
2633
|
storageKey: r = "ll-debug-open"
|
|
@@ -2605,7 +2646,7 @@ function Dr({
|
|
|
2605
2646
|
}
|
|
2606
2647
|
}, [o, r]), P(() => {
|
|
2607
2648
|
const b = (L) => {
|
|
2608
|
-
(L.metaKey || L.ctrlKey) && L.shiftKey && L.key.toLowerCase() === "l" && (L.preventDefault(), i((
|
|
2649
|
+
(L.metaKey || L.ctrlKey) && L.shiftKey && L.key.toLowerCase() === "l" && (L.preventDefault(), i((z) => !z));
|
|
2609
2650
|
};
|
|
2610
2651
|
return window.addEventListener("keydown", b), () => window.removeEventListener("keydown", b);
|
|
2611
2652
|
}, []), P(() => {
|
|
@@ -2613,7 +2654,7 @@ function Dr({
|
|
|
2613
2654
|
if (c.current.length === 0 || A.current) return;
|
|
2614
2655
|
const L = c.current.splice(0, c.current.length);
|
|
2615
2656
|
s(
|
|
2616
|
-
(
|
|
2657
|
+
(z) => [...L.reverse(), ...z].slice(0, 200)
|
|
2617
2658
|
);
|
|
2618
2659
|
}, 100);
|
|
2619
2660
|
return () => clearInterval(b);
|
|
@@ -2622,7 +2663,7 @@ function Dr({
|
|
|
2622
2663
|
if (P(() => {
|
|
2623
2664
|
!e || C.current || (C.current = !0, e((b) => {
|
|
2624
2665
|
c.current.push({
|
|
2625
|
-
id:
|
|
2666
|
+
id: Wt++,
|
|
2626
2667
|
ts: Date.now(),
|
|
2627
2668
|
kind: "event",
|
|
2628
2669
|
type: b.eventName,
|
|
@@ -2630,21 +2671,21 @@ function Dr({
|
|
|
2630
2671
|
});
|
|
2631
2672
|
}));
|
|
2632
2673
|
}, [e]), P(() => {
|
|
2633
|
-
const b = console.warn, L = console.log,
|
|
2674
|
+
const b = console.warn, L = console.log, z = (M, O) => function(...p) {
|
|
2634
2675
|
try {
|
|
2635
2676
|
const g = typeof p[0] == "string" ? p[0] : "";
|
|
2636
2677
|
g.startsWith("[LiveLayer]") && c.current.push({
|
|
2637
|
-
id:
|
|
2678
|
+
id: Wt++,
|
|
2638
2679
|
ts: Date.now(),
|
|
2639
2680
|
kind: M,
|
|
2640
2681
|
type: g.slice(0, 120),
|
|
2641
|
-
data: { args: p.slice(1).map((E) =>
|
|
2682
|
+
data: { args: p.slice(1).map((E) => Er(E)) }
|
|
2642
2683
|
});
|
|
2643
2684
|
} catch {
|
|
2644
2685
|
}
|
|
2645
|
-
return
|
|
2686
|
+
return O.apply(this, p);
|
|
2646
2687
|
};
|
|
2647
|
-
return console.warn =
|
|
2688
|
+
return console.warn = z("warn", b), console.log = z("log", L), () => {
|
|
2648
2689
|
console.warn = b, console.log = L;
|
|
2649
2690
|
};
|
|
2650
2691
|
}, []), !o)
|
|
@@ -2725,7 +2766,7 @@ function Dr({
|
|
|
2725
2766
|
{
|
|
2726
2767
|
type: "button",
|
|
2727
2768
|
onClick: () => m((b) => !b),
|
|
2728
|
-
style:
|
|
2769
|
+
style: st(h ? "#f59e0b" : "transparent"),
|
|
2729
2770
|
title: "Pause / resume capture",
|
|
2730
2771
|
children: h ? "▶ resume" : "⏸ pause"
|
|
2731
2772
|
}
|
|
@@ -2737,7 +2778,7 @@ function Dr({
|
|
|
2737
2778
|
onClick: () => {
|
|
2738
2779
|
s([]), c.current = [];
|
|
2739
2780
|
},
|
|
2740
|
-
style:
|
|
2781
|
+
style: st("transparent"),
|
|
2741
2782
|
title: "Clear buffer",
|
|
2742
2783
|
children: "clear"
|
|
2743
2784
|
}
|
|
@@ -2747,7 +2788,7 @@ function Dr({
|
|
|
2747
2788
|
{
|
|
2748
2789
|
type: "button",
|
|
2749
2790
|
onClick: () => i(!1),
|
|
2750
|
-
style:
|
|
2791
|
+
style: st("transparent"),
|
|
2751
2792
|
"aria-label": "Close",
|
|
2752
2793
|
title: "Close (Cmd/Ctrl + Shift + L)",
|
|
2753
2794
|
children: "✕"
|
|
@@ -2814,7 +2855,7 @@ function Dr({
|
|
|
2814
2855
|
]
|
|
2815
2856
|
}
|
|
2816
2857
|
) : R.map((b) => /* @__PURE__ */ n(
|
|
2817
|
-
|
|
2858
|
+
Cr,
|
|
2818
2859
|
{
|
|
2819
2860
|
entry: b,
|
|
2820
2861
|
expanded: a.current.has(b.id),
|
|
@@ -2830,7 +2871,7 @@ function Dr({
|
|
|
2830
2871
|
}
|
|
2831
2872
|
);
|
|
2832
2873
|
}
|
|
2833
|
-
function
|
|
2874
|
+
function Cr({
|
|
2834
2875
|
entry: e,
|
|
2835
2876
|
expanded: t,
|
|
2836
2877
|
onToggle: r
|
|
@@ -2900,7 +2941,7 @@ function kr({
|
|
|
2900
2941
|
}
|
|
2901
2942
|
);
|
|
2902
2943
|
}
|
|
2903
|
-
function
|
|
2944
|
+
function st(e) {
|
|
2904
2945
|
return {
|
|
2905
2946
|
background: e,
|
|
2906
2947
|
color: "#fff",
|
|
@@ -2911,14 +2952,14 @@ function at(e) {
|
|
|
2911
2952
|
cursor: "pointer"
|
|
2912
2953
|
};
|
|
2913
2954
|
}
|
|
2914
|
-
function
|
|
2955
|
+
function Er(e) {
|
|
2915
2956
|
try {
|
|
2916
2957
|
return e instanceof Error ? { message: e.message, stack: e.stack } : (JSON.stringify(e), e);
|
|
2917
2958
|
} catch {
|
|
2918
2959
|
return String(e);
|
|
2919
2960
|
}
|
|
2920
2961
|
}
|
|
2921
|
-
function
|
|
2962
|
+
function Or() {
|
|
2922
2963
|
const [e, t] = N([]), r = S((i) => {
|
|
2923
2964
|
t((l) => {
|
|
2924
2965
|
const s = l.findIndex((d) => d.id === i.id);
|
|
@@ -2937,32 +2978,33 @@ function $r() {
|
|
|
2937
2978
|
};
|
|
2938
2979
|
}
|
|
2939
2980
|
export {
|
|
2940
|
-
|
|
2941
|
-
|
|
2942
|
-
|
|
2943
|
-
|
|
2944
|
-
|
|
2945
|
-
|
|
2946
|
-
|
|
2947
|
-
|
|
2948
|
-
|
|
2949
|
-
|
|
2950
|
-
|
|
2951
|
-
|
|
2952
|
-
|
|
2953
|
-
|
|
2954
|
-
|
|
2955
|
-
|
|
2956
|
-
|
|
2957
|
-
gn as
|
|
2958
|
-
|
|
2959
|
-
Sn as
|
|
2960
|
-
|
|
2961
|
-
|
|
2962
|
-
|
|
2963
|
-
|
|
2964
|
-
|
|
2965
|
-
|
|
2966
|
-
|
|
2967
|
-
|
|
2981
|
+
Tr as AvatarWidget,
|
|
2982
|
+
hn as ErrorBoundary,
|
|
2983
|
+
Hr as LiveLayerDebugPanel,
|
|
2984
|
+
zr as LiveLayerField,
|
|
2985
|
+
$r as LiveLayerForm,
|
|
2986
|
+
Dr as LiveLayerRegion,
|
|
2987
|
+
Pr as LiveLayerWidget,
|
|
2988
|
+
dr as clearPageContextCache,
|
|
2989
|
+
gr as clearRoutesCache,
|
|
2990
|
+
sr as extractPageContext,
|
|
2991
|
+
hr as extractRoutes,
|
|
2992
|
+
qt as getCachedPageContext,
|
|
2993
|
+
ct as getCachedRoutes,
|
|
2994
|
+
zn as matchesPattern,
|
|
2995
|
+
fr as normalizeRouteInput,
|
|
2996
|
+
Hn as shouldRenderAtPath,
|
|
2997
|
+
xn as useAgentInfo,
|
|
2998
|
+
gn as useAudioLevel,
|
|
2999
|
+
bn as useCameraState,
|
|
3000
|
+
Sn as useDisplayMode,
|
|
3001
|
+
Nn as useDisplayModePersistence,
|
|
3002
|
+
Rn as useIsMobile,
|
|
3003
|
+
mn as useLiveKitSession,
|
|
3004
|
+
_n as useMediaDevices,
|
|
3005
|
+
yn as useMicrophoneState,
|
|
3006
|
+
Mn as usePathname,
|
|
3007
|
+
On as useRouteMatch,
|
|
3008
|
+
wn as useScreenShareState,
|
|
3009
|
+
Or as useTranscript
|
|
2968
3010
|
};
|