@livelayer/react 0.14.1 → 0.15.0

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.mjs CHANGED
@@ -1,11 +1,11 @@
1
1
  "use client";
2
- import { jsxs as w, jsx as n, Fragment as $e } from "react/jsx-runtime";
3
- import { Component as Vn, useState as S, useRef as A, useEffect as T, useCallback as C, useMemo as Xe, useLayoutEffect as xn, forwardRef as Dt, useImperativeHandle as Yn, createElement as Gn } from "react";
4
- import { createPortal as Pt } from "react-dom";
2
+ import { jsxs as b, jsx as n, Fragment as $e } from "react/jsx-runtime";
3
+ import { Component as Vn, useState as S, useRef as A, useEffect as M, useCallback as E, useMemo as Ze, useLayoutEffect as Ln, forwardRef as Pt, useImperativeHandle as Yn, createElement as Gn } from "react";
4
+ import { createPortal as $t } from "react-dom";
5
5
  import { LiveKitSession as Kn, registerFields as Jn } from "@livelayer/sdk";
6
- import { clearFieldRegistry as zi, getRegisteredFields as Hi, registerFields as Oi, setFieldValue as Bi } from "@livelayer/sdk";
7
- import { createLocalAudioTrack as Xn, Track as kn, createLocalVideoTrack as Qn } from "livekit-client";
8
- class Zn extends Vn {
6
+ import { clearFieldRegistry as Oi, getRegisteredFields as Bi, registerFields as Wi, setFieldValue as Fi } from "@livelayer/sdk";
7
+ import { createLocalAudioTrack as Xn, Track as kn, createLocalVideoTrack as Zn } from "livekit-client";
8
+ class Qn extends Vn {
9
9
  constructor() {
10
10
  super(...arguments), this.state = { hasError: !1, error: null }, this.reset = () => {
11
11
  this.setState({ hasError: !1, error: null });
@@ -20,7 +20,7 @@ class Zn extends Vn {
20
20
  }
21
21
  render() {
22
22
  var t;
23
- return this.state.hasError ? this.props.fallback ? this.props.fallback : /* @__PURE__ */ w("div", { className: "ll-error-boundary", role: "alert", children: [
23
+ return this.state.hasError ? this.props.fallback ? this.props.fallback : /* @__PURE__ */ b("div", { className: "ll-error-boundary", role: "alert", children: [
24
24
  /* @__PURE__ */ n("p", { className: "ll-error-boundary__title", children: "Widget crashed" }),
25
25
  /* @__PURE__ */ n("p", { className: "ll-error-boundary__message", children: ((t = this.state.error) == null ? void 0 : t.message) || "Something went wrong." }),
26
26
  /* @__PURE__ */ n(
@@ -36,24 +36,24 @@ class Zn extends Vn {
36
36
  }
37
37
  }
38
38
  function er(e) {
39
- const [t, r] = S("idle"), [i, a] = S("idle"), [o, s] = S([]), [l, c] = S(null), [p, v] = S(null), [f, d] = S(null), [R, L] = S(!1), [_, h] = S(null), b = A(null), N = A(e.onDataMessage);
40
- N.current = e.onDataMessage, T(() => {
39
+ const [t, r] = S("idle"), [i, a] = S("idle"), [o, s] = S([]), [l, c] = S(null), [p, v] = S(null), [f, u] = S(null), [R, k] = S(!1), [_, m] = S(null), w = A(null), N = A(e.onDataMessage);
40
+ N.current = e.onDataMessage, M(() => {
41
41
  const g = {
42
42
  onConnectionStateChange: (O) => {
43
- r(O), O === "connected" && h(null);
43
+ r(O), O === "connected" && m(null);
44
44
  },
45
45
  onAgentStateChange: a,
46
46
  onTranscript: (O) => s([...O]),
47
47
  onAgentConfig: c,
48
- onAudioTrack: (O) => d(O),
48
+ onAudioTrack: (O) => u(O),
49
49
  onVideoTrack: (O) => v(O),
50
50
  onVideoTrackRemoved: () => v(null),
51
- onError: (O) => h(O),
51
+ onError: (O) => m(O),
52
52
  onDataMessage: (O) => {
53
53
  var q;
54
54
  (q = N.current) == null || q.call(N, O);
55
55
  },
56
- onResumabilityChange: L
56
+ onResumabilityChange: k
57
57
  }, P = new Kn(
58
58
  {
59
59
  agentId: e.agentId,
@@ -64,9 +64,9 @@ function er(e) {
64
64
  },
65
65
  g
66
66
  );
67
- return b.current = P, r("idle"), a("idle"), s([]), c(null), v(null), d(null), L(!1), h(null), () => {
67
+ return w.current = P, r("idle"), a("idle"), s([]), c(null), v(null), u(null), k(!1), m(null), () => {
68
68
  var O;
69
- (O = P.destroy) == null || O.call(P), b.current = null;
69
+ (O = P.destroy) == null || O.call(P), w.current = null;
70
70
  };
71
71
  }, [
72
72
  e.agentId,
@@ -75,20 +75,20 @@ function er(e) {
75
75
  e.sessionEndpoint,
76
76
  JSON.stringify(e.sessionBody ?? {})
77
77
  ]);
78
- const M = C(async () => {
79
- const g = b.current;
78
+ const T = E(async () => {
79
+ const g = w.current;
80
80
  if (g)
81
81
  try {
82
82
  await g.connect();
83
83
  } catch (P) {
84
- throw h(P instanceof Error ? P.message : String(P)), P;
84
+ throw m(P instanceof Error ? P.message : String(P)), P;
85
85
  }
86
- }, []), I = C(() => {
87
- const g = b.current;
86
+ }, []), I = E(() => {
87
+ const g = w.current;
88
88
  g && g.disconnect();
89
- }, []), U = C(() => {
89
+ }, []), U = E(() => {
90
90
  var g;
91
- return ((g = b.current) == null ? void 0 : g.getRoom()) ?? null;
91
+ return ((g = w.current) == null ? void 0 : g.getRoom()) ?? null;
92
92
  }, []);
93
93
  return {
94
94
  connectionState: t,
@@ -99,14 +99,14 @@ function er(e) {
99
99
  audioElement: f,
100
100
  canResume: R,
101
101
  error: _,
102
- connect: M,
102
+ connect: T,
103
103
  disconnect: I,
104
104
  getRoom: U,
105
- session: b.current
105
+ session: w.current
106
106
  };
107
107
  }
108
108
  function tr() {
109
- const e = A(null), t = A(null), r = A(null), i = A(null), a = A(/* @__PURE__ */ new Set()), o = A(null), s = C(() => {
109
+ const e = A(null), t = A(null), r = A(null), i = A(null), a = A(/* @__PURE__ */ new Set()), o = A(null), s = E(() => {
110
110
  const f = t.current;
111
111
  if (!f) {
112
112
  i.current = null;
@@ -115,23 +115,23 @@ function tr() {
115
115
  (!o.current || o.current.length !== f.frequencyBinCount) && (o.current = new Uint8Array(
116
116
  new ArrayBuffer(f.frequencyBinCount)
117
117
  ));
118
- const d = o.current;
119
- f.getByteFrequencyData(d);
118
+ const u = o.current;
119
+ f.getByteFrequencyData(u);
120
120
  let R = 0;
121
- for (let _ = 0; _ < d.length; _++) R += d[_];
122
- const L = R / d.length / 255;
121
+ for (let _ = 0; _ < u.length; _++) R += u[_];
122
+ const k = R / u.length / 255;
123
123
  for (const _ of a.current)
124
124
  try {
125
- _(L);
126
- } catch (h) {
127
- console.error("[useAudioLevel] subscriber threw:", h);
125
+ _(k);
126
+ } catch (m) {
127
+ console.error("[useAudioLevel] subscriber threw:", m);
128
128
  }
129
129
  i.current = requestAnimationFrame(s);
130
- }, []), l = C(() => {
130
+ }, []), l = E(() => {
131
131
  if (e.current || typeof window > "u" || typeof AudioContext > "u") return;
132
- const f = new AudioContext(), d = f.createAnalyser();
133
- d.fftSize = 64, d.connect(f.destination), e.current = f, t.current = d;
134
- }, []), c = C(
132
+ const f = new AudioContext(), u = f.createAnalyser();
133
+ u.fftSize = 64, u.connect(f.destination), e.current = f, t.current = u;
134
+ }, []), c = E(
135
135
  (f) => {
136
136
  if (l(), !(!e.current || !t.current)) {
137
137
  if (r.current) {
@@ -142,17 +142,17 @@ function tr() {
142
142
  r.current = null;
143
143
  }
144
144
  try {
145
- const d = e.current.createMediaElementSource(f);
146
- d.connect(t.current), r.current = d;
147
- } catch (d) {
148
- console.warn("[useAudioLevel] createMediaElementSource failed:", d);
145
+ const u = e.current.createMediaElementSource(f);
146
+ u.connect(t.current), r.current = u;
147
+ } catch (u) {
148
+ console.warn("[useAudioLevel] createMediaElementSource failed:", u);
149
149
  return;
150
150
  }
151
151
  i.current === null && (i.current = requestAnimationFrame(s));
152
152
  }
153
153
  },
154
154
  [l, s]
155
- ), p = C(() => {
155
+ ), p = E(() => {
156
156
  if (i.current !== null && (cancelAnimationFrame(i.current), i.current = null), r.current) {
157
157
  try {
158
158
  r.current.disconnect();
@@ -160,10 +160,10 @@ function tr() {
160
160
  }
161
161
  r.current = null;
162
162
  }
163
- }, []), v = C((f) => (a.current.add(f), () => {
163
+ }, []), v = E((f) => (a.current.add(f), () => {
164
164
  a.current.delete(f);
165
165
  }), []);
166
- return T(() => () => {
166
+ return M(() => () => {
167
167
  if (p(), t.current) {
168
168
  try {
169
169
  t.current.disconnect();
@@ -182,8 +182,8 @@ function tr() {
182
182
  }, [p]), { attach: c, detach: p, subscribe: v };
183
183
  }
184
184
  function nr() {
185
- const [e, t] = S(!1), [r, i] = S(""), [a, o] = S(null), s = A(null), l = A(null), c = C(async (L) => {
186
- var _, h;
185
+ const [e, t] = S(!1), [r, i] = S(""), [a, o] = S(null), s = A(null), l = A(null), c = E(async (k) => {
186
+ var _, m;
187
187
  if (s.current && l.current) {
188
188
  try {
189
189
  await l.current.localParticipant.unpublishTrack(s.current);
@@ -191,48 +191,48 @@ function nr() {
191
191
  }
192
192
  s.current.stop(), s.current = null;
193
193
  }
194
- l.current = L, o(null);
194
+ l.current = k, o(null);
195
195
  try {
196
- const b = await Xn({
196
+ const w = await Xn({
197
197
  echoCancellation: !0,
198
198
  noiseSuppression: !0
199
199
  });
200
- await L.localParticipant.publishTrack(b), s.current = b, t(b.isMuted);
201
- const N = (h = (_ = b.mediaStreamTrack) == null ? void 0 : _.getSettings) == null ? void 0 : h.call(_);
200
+ await k.localParticipant.publishTrack(w), s.current = w, t(w.isMuted);
201
+ const N = (m = (_ = w.mediaStreamTrack) == null ? void 0 : _.getSettings) == null ? void 0 : m.call(_);
202
202
  N != null && N.deviceId && i(N.deviceId);
203
- } catch (b) {
204
- const N = b instanceof Error && b.name === "NotAllowedError" ? "Enable your microphone to talk with the agent." : "Microphone unavailable. Check browser permissions and try again.";
205
- throw o(N), b;
203
+ } catch (w) {
204
+ const N = w instanceof Error && w.name === "NotAllowedError" ? "Enable your microphone to talk with the agent." : "Microphone unavailable. Check browser permissions and try again.";
205
+ throw o(N), w;
206
206
  }
207
- }, []), p = C((L) => {
208
- l.current = L;
209
- }, []), v = C(async (L) => {
207
+ }, []), p = E((k) => {
208
+ l.current = k;
209
+ }, []), v = E(async (k) => {
210
210
  const _ = l.current;
211
211
  if (_)
212
212
  try {
213
- await _.switchActiveDevice("audioinput", L), i(L);
214
- } catch (h) {
215
- console.warn("[useMicrophoneState] switchDevice failed:", h);
213
+ await _.switchActiveDevice("audioinput", k), i(k);
214
+ } catch (m) {
215
+ console.warn("[useMicrophoneState] switchDevice failed:", m);
216
216
  }
217
- }, []), f = C(async () => {
218
- const L = l.current, _ = !e;
219
- if (t(_), !!L)
217
+ }, []), f = E(async () => {
218
+ const k = l.current, _ = !e;
219
+ if (t(_), !!k)
220
220
  try {
221
- await L.localParticipant.setMicrophoneEnabled(!_);
222
- } catch (h) {
223
- console.warn("[useMicrophoneState] setMicrophoneEnabled failed:", h), t(!_);
221
+ await k.localParticipant.setMicrophoneEnabled(!_);
222
+ } catch (m) {
223
+ console.warn("[useMicrophoneState] setMicrophoneEnabled failed:", m), t(!_);
224
224
  }
225
- }, [e]), d = C(() => {
226
- const L = s.current, _ = l.current;
227
- if (L && _) {
225
+ }, [e]), u = E(() => {
226
+ const k = s.current, _ = l.current;
227
+ if (k && _) {
228
228
  try {
229
- _.localParticipant.unpublishTrack(L);
229
+ _.localParticipant.unpublishTrack(k);
230
230
  } catch {
231
231
  }
232
- L.stop();
232
+ k.stop();
233
233
  }
234
234
  s.current = null, l.current = null, t(!1), i("");
235
- }, []), R = C(() => o(null), []);
235
+ }, []), R = E(() => o(null), []);
236
236
  return {
237
237
  isMuted: e,
238
238
  activeDeviceId: r,
@@ -241,40 +241,40 @@ function nr() {
241
241
  setupMic: c,
242
242
  attachRoom: p,
243
243
  switchDevice: v,
244
- teardownMic: d,
244
+ teardownMic: u,
245
245
  clearError: R
246
246
  };
247
247
  }
248
248
  const rr = { resolution: { width: 640, height: 480, frameRate: 24 } };
249
249
  function ir() {
250
- const [e, t] = S(!1), [r, i] = S(null), [a, o] = S(null), [s, l] = S(""), c = A(null), p = A(null), v = C((b) => {
251
- c.current = b;
252
- }, []), f = C(() => {
253
- var M;
254
- const b = c.current, N = p.current;
255
- if (N && b) {
256
- const I = b.localParticipant.getTrackPublication(kn.Source.Camera), g = (I == null ? void 0 : I.track) ?? N;
250
+ const [e, t] = S(!1), [r, i] = S(null), [a, o] = S(null), [s, l] = S(""), c = A(null), p = A(null), v = E((w) => {
251
+ c.current = w;
252
+ }, []), f = E(() => {
253
+ var T;
254
+ const w = c.current, N = p.current;
255
+ if (N && w) {
256
+ const I = w.localParticipant.getTrackPublication(kn.Source.Camera), g = (I == null ? void 0 : I.track) ?? N;
257
257
  try {
258
- b.localParticipant.unpublishTrack(g);
258
+ w.localParticipant.unpublishTrack(g);
259
259
  } catch {
260
260
  }
261
261
  try {
262
- (M = g.stop) == null || M.call(g);
262
+ (T = g.stop) == null || T.call(g);
263
263
  } catch {
264
264
  }
265
265
  }
266
266
  p.current = null, o(null), t(!1);
267
- }, []), d = C(async (b) => {
267
+ }, []), u = E(async (w) => {
268
268
  const N = c.current;
269
269
  if (N) {
270
270
  i(null);
271
271
  try {
272
- const M = { ...rr };
273
- b && (M.deviceId = b);
274
- const I = await Qn(M);
272
+ const T = { ...rr };
273
+ w && (T.deviceId = w);
274
+ const I = await Zn(T);
275
275
  await N.localParticipant.publishTrack(I), p.current = I;
276
276
  const U = I.attach();
277
- o(U), t(!0), b && l(b);
277
+ o(U), t(!0), w && l(w);
278
278
  try {
279
279
  N.localParticipant.publishData(
280
280
  new TextEncoder().encode(JSON.stringify({ type: "user_camera_on" })),
@@ -282,19 +282,19 @@ function ir() {
282
282
  );
283
283
  } catch {
284
284
  }
285
- } catch (M) {
286
- const I = M instanceof Error && M.name === "NotAllowedError" ? "Enable your camera in the browser to share video." : "Camera unavailable. Check permissions and try again.";
285
+ } catch (T) {
286
+ const I = T instanceof Error && T.name === "NotAllowedError" ? "Enable your camera in the browser to share video." : "Camera unavailable. Check permissions and try again.";
287
287
  i(I);
288
288
  }
289
289
  }
290
- }, []), R = C(async () => {
291
- e ? f() : await d(s || void 0);
292
- }, [e, s, f, d]), L = C(async (b) => {
293
- f(), await d(b);
294
- }, [f, d]), _ = C(() => {
290
+ }, []), R = E(async () => {
291
+ e ? f() : await u(s || void 0);
292
+ }, [e, s, f, u]), k = E(async (w) => {
293
+ f(), await u(w);
294
+ }, [f, u]), _ = E(() => {
295
295
  f(), c.current = null, i(null), l("");
296
- }, [f]), h = C(() => i(null), []);
297
- return T(() => () => {
296
+ }, [f]), m = E(() => i(null), []);
297
+ return M(() => () => {
298
298
  p.current && p.current.stop();
299
299
  }, []), {
300
300
  isEnabled: e,
@@ -302,21 +302,21 @@ function ir() {
302
302
  previewEl: a,
303
303
  activeDeviceId: s,
304
304
  toggle: R,
305
- switchDevice: L,
305
+ switchDevice: k,
306
306
  attachRoom: v,
307
307
  teardown: _,
308
- clearError: h
308
+ clearError: m
309
309
  };
310
310
  }
311
311
  function or() {
312
- const [e, t] = S(!1), [r, i] = S(null), [a, o] = S(null), s = A(null), l = C((d) => {
313
- s.current = d;
314
- }, []), c = C(() => o(null), []), p = C(async () => {
315
- const d = s.current;
316
- if (d) {
312
+ const [e, t] = S(!1), [r, i] = S(null), [a, o] = S(null), s = A(null), l = E((u) => {
313
+ s.current = u;
314
+ }, []), c = E(() => o(null), []), p = E(async () => {
315
+ const u = s.current;
316
+ if (u) {
317
317
  if (e) {
318
318
  try {
319
- await d.localParticipant.setScreenShareEnabled(!1);
319
+ await u.localParticipant.setScreenShareEnabled(!1);
320
320
  } catch {
321
321
  }
322
322
  c(), t(!1);
@@ -324,15 +324,15 @@ function or() {
324
324
  }
325
325
  i(null);
326
326
  try {
327
- await d.localParticipant.setScreenShareEnabled(!0);
327
+ await u.localParticipant.setScreenShareEnabled(!0);
328
328
  let R = 0;
329
- const L = () => {
330
- const _ = d.localParticipant.getTrackPublication(kn.Source.ScreenShare);
329
+ const k = () => {
330
+ const _ = u.localParticipant.getTrackPublication(kn.Source.ScreenShare);
331
331
  if (_ != null && _.track) {
332
- const h = _.track.attach();
333
- o(h), t(!0);
332
+ const m = _.track.attach();
333
+ o(m), t(!0);
334
334
  try {
335
- d.localParticipant.publishData(
335
+ u.localParticipant.publishData(
336
336
  new TextEncoder().encode(JSON.stringify({ type: "user_screen_share_on" })),
337
337
  { reliable: !0 }
338
338
  );
@@ -340,27 +340,27 @@ function or() {
340
340
  }
341
341
  return;
342
342
  }
343
- R++ < 10 ? setTimeout(L, 100) : t(!0);
343
+ R++ < 10 ? setTimeout(k, 100) : t(!0);
344
344
  };
345
- L();
345
+ k();
346
346
  } catch (R) {
347
- const L = R instanceof Error ? R.name : "";
348
- L !== "NotAllowedError" && L !== "AbortError" && i("Screen share unavailable. Try again."), t(!1);
347
+ const k = R instanceof Error ? R.name : "";
348
+ k !== "NotAllowedError" && k !== "AbortError" && i("Screen share unavailable. Try again."), t(!1);
349
349
  }
350
350
  }
351
- }, [e, c]), v = C(() => {
352
- const d = s.current;
353
- if (d && e)
351
+ }, [e, c]), v = E(() => {
352
+ const u = s.current;
353
+ if (u && e)
354
354
  try {
355
- d.localParticipant.setScreenShareEnabled(!1);
355
+ u.localParticipant.setScreenShareEnabled(!1);
356
356
  } catch {
357
357
  }
358
358
  c(), t(!1), i(null), s.current = null;
359
- }, [e, c]), f = C(() => i(null), []);
359
+ }, [e, c]), f = E(() => i(null), []);
360
360
  return { isEnabled: e, error: r, previewEl: a, toggle: p, attachRoom: l, teardown: v, clearError: f };
361
361
  }
362
362
  function lr() {
363
- const [e, t] = S([]), [r, i] = S([]), a = C(async () => {
363
+ const [e, t] = S([]), [r, i] = S([]), a = E(async () => {
364
364
  if (!(typeof navigator > "u" || !navigator.mediaDevices))
365
365
  try {
366
366
  const o = await navigator.mediaDevices.enumerateDevices();
@@ -368,7 +368,7 @@ function lr() {
368
368
  } catch {
369
369
  }
370
370
  }, []);
371
- return T(() => {
371
+ return M(() => {
372
372
  if (a(), typeof navigator > "u" || !navigator.mediaDevices) return;
373
373
  const o = () => void a();
374
374
  return navigator.mediaDevices.addEventListener("devicechange", o), () => navigator.mediaDevices.removeEventListener("devicechange", o);
@@ -376,7 +376,7 @@ function lr() {
376
376
  }
377
377
  function ar(e, t, r = !1) {
378
378
  const [i, a] = S(null), [o, s] = S(null), [l, c] = S(!r && !!e);
379
- return T(() => {
379
+ return M(() => {
380
380
  if (r || !e) {
381
381
  c(!1);
382
382
  return;
@@ -386,8 +386,8 @@ function ar(e, t, r = !1) {
386
386
  signal: p.signal
387
387
  }).then(async (f) => {
388
388
  if (!f.ok) {
389
- const d = await f.json().catch(() => ({}));
390
- throw new Error(d.error || `HTTP ${f.status}`);
389
+ const u = await f.json().catch(() => ({}));
390
+ throw new Error(u.error || `HTTP ${f.status}`);
391
391
  }
392
392
  return f.json();
393
393
  }).then((f) => {
@@ -412,12 +412,12 @@ function cr(e, t) {
412
412
  } catch {
413
413
  }
414
414
  }
415
- function ur({
415
+ function dr({
416
416
  value: e,
417
417
  defaultValue: t = "expanded",
418
418
  onChange: r
419
419
  } = {}) {
420
- const i = e !== void 0, [a, o] = S(t), s = i ? e : a, l = C(
420
+ const i = e !== void 0, [a, o] = S(t), s = i ? e : a, l = E(
421
421
  (c) => {
422
422
  c !== s && (i || o(c), r == null || r(c));
423
423
  },
@@ -425,9 +425,9 @@ function ur({
425
425
  );
426
426
  return [s, l];
427
427
  }
428
- const dr = ["hidden", "minimized", "expanded"];
428
+ const ur = ["hidden", "minimized", "expanded"];
429
429
  function fr(e) {
430
- return e && dr.includes(e) ? e : null;
430
+ return e && ur.includes(e) ? e : null;
431
431
  }
432
432
  function pr({
433
433
  value: e,
@@ -436,14 +436,14 @@ function pr({
436
436
  persistKey: i = "ll-widget",
437
437
  disablePersistence: a = !1
438
438
  } = {}) {
439
- const o = `${i}:display-mode`, s = A(!1), [l, c] = ur({
439
+ const o = `${i}:display-mode`, s = A(!1), [l, c] = dr({
440
440
  value: e,
441
441
  defaultValue: t,
442
442
  onChange: (p) => {
443
443
  e === void 0 && !a && cr(o, p), r == null || r(p);
444
444
  }
445
445
  });
446
- return T(() => {
446
+ return M(() => {
447
447
  if (s.current || (s.current = !0, a || e !== void 0)) return;
448
448
  const p = fr(sr(o));
449
449
  p && p !== l && c(p);
@@ -452,7 +452,7 @@ function pr({
452
452
  const hr = 640;
453
453
  function mr(e = hr) {
454
454
  const [t, r] = S(!1);
455
- return T(() => {
455
+ return M(() => {
456
456
  if (e === !1) {
457
457
  r(!1);
458
458
  return;
@@ -465,43 +465,43 @@ function mr(e = hr) {
465
465
  });
466
466
  }, [e]), t;
467
467
  }
468
- const en = "__llHistoryPatched", _t = "ll:pathname";
468
+ const tn = "__llHistoryPatched", xt = "ll:pathname";
469
469
  function gr() {
470
- if (typeof window > "u" || window.history[en]) return;
470
+ if (typeof window > "u" || window.history[tn]) return;
471
471
  const e = window.history.pushState, t = window.history.replaceState;
472
472
  window.history.pushState = function(...r) {
473
473
  const i = e.apply(this, r);
474
- return window.dispatchEvent(new Event(_t)), i;
474
+ return window.dispatchEvent(new Event(xt)), i;
475
475
  }, window.history.replaceState = function(...r) {
476
476
  const i = t.apply(this, r);
477
- return window.dispatchEvent(new Event(_t)), i;
478
- }, window.history[en] = !0;
477
+ return window.dispatchEvent(new Event(xt)), i;
478
+ }, window.history[tn] = !0;
479
479
  }
480
- function tn() {
480
+ function nn() {
481
481
  return typeof window > "u" ? "/" : window.location.pathname || "/";
482
482
  }
483
483
  function yr(e) {
484
484
  const [t, r] = S(
485
- () => e ?? tn()
485
+ () => e ?? nn()
486
486
  );
487
- return T(() => {
487
+ return M(() => {
488
488
  if (e !== void 0) return;
489
489
  gr();
490
- const i = () => r(tn());
491
- return i(), window.addEventListener("popstate", i), window.addEventListener(_t, i), () => {
492
- window.removeEventListener("popstate", i), window.removeEventListener(_t, i);
490
+ const i = () => r(nn());
491
+ return i(), window.addEventListener("popstate", i), window.addEventListener(xt, i), () => {
492
+ window.removeEventListener("popstate", i), window.removeEventListener(xt, i);
493
493
  };
494
494
  }, [e]), e ?? t;
495
495
  }
496
- const nn = /* @__PURE__ */ new Map(), vr = /[\\^$+?.()|{}[\]]/g;
496
+ const rn = /* @__PURE__ */ new Map(), vr = /[\\^$+?.()|{}[\]]/g;
497
497
  function br(e) {
498
498
  return e.replace(vr, "\\$&");
499
499
  }
500
500
  function wr(e) {
501
- const t = nn.get(e);
501
+ const t = rn.get(e);
502
502
  if (t) return t;
503
503
  const r = e.length > 1 && e.endsWith("/") ? e.slice(0, -1) : e, i = "", a = "", o = r.replace(/\*\*/g, i).replace(/\*/g, a), l = br(o).replace(new RegExp(`\\/${i}`, "g"), "(?:\\/.*)?").replace(new RegExp(i, "g"), ".*").replace(new RegExp(a, "g"), "[^/]+"), c = new RegExp(`^${l}\\/?$`);
504
- return nn.set(e, c), c;
504
+ return rn.set(e, c), c;
505
505
  }
506
506
  function _r(e, t) {
507
507
  const r = t.length > 1 && t.endsWith("/") ? t.slice(0, -1) : t;
@@ -510,30 +510,30 @@ function _r(e, t) {
510
510
  function xr(e, t) {
511
511
  return typeof e == "function" ? e(t) : e instanceof RegExp ? e.test(t) : _r(e, t);
512
512
  }
513
- function rn(e, t) {
513
+ function on(e, t) {
514
514
  if (!e || e.length === 0) return !1;
515
515
  for (const r of e)
516
516
  if (xr(r, t)) return !0;
517
517
  return !1;
518
518
  }
519
- function kr(e, t, r) {
520
- return e === void 0 ? !0 : rn(r, e) ? !1 : t && t.length > 0 ? rn(t, e) : !0;
521
- }
522
519
  function Lr(e, t, r) {
523
- return Xe(
524
- () => kr(e, t, r),
520
+ return e === void 0 ? !0 : on(r, e) ? !1 : t && t.length > 0 ? on(t, e) : !0;
521
+ }
522
+ function kr(e, t, r) {
523
+ return Ze(
524
+ () => Lr(e, t, r),
525
525
  [e, t, r]
526
526
  );
527
527
  }
528
- function Er(e) {
528
+ function Cr(e) {
529
529
  return e === !1 ? { navigate: !1, thinking: !1, action: !1 } : e === void 0 || e === !0 ? { navigate: !0, thinking: !0, action: !0 } : {
530
530
  navigate: e.navigate !== !1,
531
531
  thinking: e.thinking !== !1,
532
532
  action: e.action !== !1
533
533
  };
534
534
  }
535
- function Cr(e) {
536
- const t = Xe(() => Er(e.config), [e.config]), r = e.baseUrl.replace(/\/+$/, ""), i = A(null), a = C(
535
+ function Er(e) {
536
+ const t = Ze(() => Cr(e.config), [e.config]), r = e.baseUrl.replace(/\/+$/, ""), i = A(null), a = E(
537
537
  (c) => {
538
538
  try {
539
539
  new Audio(`${r}${c}`).play().catch(() => {
@@ -542,11 +542,11 @@ function Cr(e) {
542
542
  }
543
543
  },
544
544
  [r]
545
- ), o = C(() => {
545
+ ), o = E(() => {
546
546
  t.navigate && a("/audio/page-change-sound.mp3");
547
- }, [t.navigate, a]), s = C(() => {
547
+ }, [t.navigate, a]), s = E(() => {
548
548
  t.action && a("/audio/confirmation-sound.mp3");
549
- }, [t.action, a]), l = C(
549
+ }, [t.action, a]), l = E(
550
550
  (c) => {
551
551
  if (!t.thinking) {
552
552
  if (i.current) {
@@ -577,7 +577,7 @@ function Cr(e) {
577
577
  },
578
578
  [r, t.thinking]
579
579
  );
580
- return T(() => () => {
580
+ return M(() => () => {
581
581
  if (i.current) {
582
582
  try {
583
583
  i.current.pause();
@@ -585,12 +585,12 @@ function Cr(e) {
585
585
  }
586
586
  i.current = null;
587
587
  }
588
- }, []), Xe(
588
+ }, []), Ze(
589
589
  () => ({ playPageChange: o, playConfirmation: s, setThinking: l }),
590
590
  [o, s, l]
591
591
  );
592
592
  }
593
- const on = ({ muted: e = !1, className: t }) => e ? /* @__PURE__ */ w(
593
+ const ln = ({ muted: e = !1, className: t }) => e ? /* @__PURE__ */ b(
594
594
  "svg",
595
595
  {
596
596
  className: t,
@@ -636,7 +636,7 @@ const on = ({ muted: e = !1, className: t }) => e ? /* @__PURE__ */ w(
636
636
  }
637
637
  )
638
638
  }
639
- ), ln = ({ className: e }) => /* @__PURE__ */ n(
639
+ ), an = ({ className: e }) => /* @__PURE__ */ n(
640
640
  "svg",
641
641
  {
642
642
  className: e,
@@ -670,7 +670,7 @@ const on = ({ muted: e = !1, className: t }) => e ? /* @__PURE__ */ w(
670
670
  right: 0,
671
671
  up: -90,
672
672
  down: 90
673
- }, an = ({ direction: e = "right", className: t }) => /* @__PURE__ */ n(
673
+ }, sn = ({ direction: e = "right", className: t }) => /* @__PURE__ */ n(
674
674
  "svg",
675
675
  {
676
676
  className: t,
@@ -686,11 +686,11 @@ const on = ({ muted: e = !1, className: t }) => e ? /* @__PURE__ */ w(
686
686
  function Ar(e) {
687
687
  return e === "top-left" || e === "bottom-left" ? "left" : "right";
688
688
  }
689
- const Ln = "ll-hidden-tab-center-y", Ir = 5, sn = 16;
689
+ const Cn = "ll-hidden-tab-center-y", Ir = 5, cn = 16;
690
690
  function Rr() {
691
691
  if (typeof window > "u") return null;
692
692
  try {
693
- const e = window.localStorage.getItem(Ln);
693
+ const e = window.localStorage.getItem(Cn);
694
694
  if (!e) return null;
695
695
  const t = Number.parseFloat(e);
696
696
  return Number.isFinite(t) ? t : null;
@@ -698,14 +698,14 @@ function Rr() {
698
698
  return null;
699
699
  }
700
700
  }
701
- function cn(e) {
701
+ function dn(e) {
702
702
  if (!(typeof window > "u"))
703
703
  try {
704
- window.localStorage.setItem(Ln, String(e));
704
+ window.localStorage.setItem(Cn, String(e));
705
705
  } catch {
706
706
  }
707
707
  }
708
- const Tr = ({
708
+ const Mr = ({
709
709
  position: e,
710
710
  isMobile: t,
711
711
  isSpeaking: r,
@@ -715,80 +715,80 @@ const Tr = ({
715
715
  agentName: s,
716
716
  containerEl: l
717
717
  }) => {
718
- const c = Ar(e), p = c === "right" ? "left" : "right", v = t ? 80 : 72, f = !!o, d = !!l, [R, L] = S(null), [_, h] = S(!1), b = A(null), N = A(!1), M = C(
718
+ const c = Ar(e), p = c === "right" ? "left" : "right", v = t ? 80 : 72, f = !!o, u = !!l, [R, k] = S(null), [_, m] = S(!1), w = A(null), N = A(!1), T = E(
719
719
  (B) => {
720
720
  if (typeof window > "u") return B;
721
- const j = v / 2, E = sn + j, Z = window.innerHeight - sn - j;
722
- return Z < E ? Math.max(E, B) : Math.max(E, Math.min(Z, B));
721
+ const j = v / 2, C = cn + j, Z = window.innerHeight - cn - j;
722
+ return Z < C ? Math.max(C, B) : Math.max(C, Math.min(Z, B));
723
723
  },
724
724
  [v]
725
725
  );
726
- T(() => {
727
- if (d) {
728
- L(null);
726
+ M(() => {
727
+ if (u) {
728
+ k(null);
729
729
  return;
730
730
  }
731
731
  const B = Rr();
732
- L(M(B ?? window.innerHeight / 2));
732
+ k(T(B ?? window.innerHeight / 2));
733
733
  const j = () => {
734
- L((E) => E === null ? null : M(E));
734
+ k((C) => C === null ? null : T(C));
735
735
  };
736
736
  return window.addEventListener("resize", j), () => window.removeEventListener("resize", j);
737
- }, [M, d]);
738
- const I = C(
737
+ }, [T, u]);
738
+ const I = E(
739
739
  (B) => {
740
- if (!d && !(B.pointerType === "mouse" && B.button !== 0) && R !== null) {
740
+ if (!u && !(B.pointerType === "mouse" && B.button !== 0) && R !== null) {
741
741
  try {
742
742
  B.currentTarget.setPointerCapture(B.pointerId);
743
743
  } catch {
744
744
  }
745
- b.current = {
745
+ w.current = {
746
746
  startClientY: B.clientY,
747
747
  startCenterY: R,
748
748
  moved: !1
749
749
  };
750
750
  }
751
751
  },
752
- [R, d]
753
- ), U = C(
752
+ [R, u]
753
+ ), U = E(
754
754
  (B) => {
755
- const j = b.current;
755
+ const j = w.current;
756
756
  if (!j) return;
757
- const E = B.clientY - j.startClientY;
758
- !j.moved && Math.abs(E) > Ir && (j.moved = !0, h(!0)), j.moved && L(M(j.startCenterY + E));
757
+ const C = B.clientY - j.startClientY;
758
+ !j.moved && Math.abs(C) > Ir && (j.moved = !0, m(!0)), j.moved && k(T(j.startCenterY + C));
759
759
  },
760
- [M]
761
- ), g = C(
760
+ [T]
761
+ ), g = E(
762
762
  (B) => {
763
- const j = b.current;
763
+ const j = w.current;
764
764
  if (j) {
765
765
  try {
766
766
  B.currentTarget.releasePointerCapture(B.pointerId);
767
767
  } catch {
768
768
  }
769
- b.current = null, j.moved && (h(!1), N.current = !0, L((E) => (E !== null && cn(E), E)));
769
+ w.current = null, j.moved && (m(!1), N.current = !0, k((C) => (C !== null && dn(C), C)));
770
770
  }
771
771
  },
772
772
  []
773
- ), P = C(() => {
773
+ ), P = E(() => {
774
774
  if (N.current) {
775
775
  N.current = !1;
776
776
  return;
777
777
  }
778
778
  i();
779
- }, [i]), O = C(
779
+ }, [i]), O = E(
780
780
  (B) => {
781
781
  if (B.key === "ArrowUp" || B.key === "ArrowDown") {
782
782
  B.preventDefault();
783
783
  const j = B.key === "ArrowUp" ? -8 : 8;
784
- L((E) => {
785
- if (E === null) return E;
786
- const Z = M(E + j);
787
- return cn(Z), Z;
784
+ k((C) => {
785
+ if (C === null) return C;
786
+ const Z = T(C + j);
787
+ return dn(Z), Z;
788
788
  });
789
789
  }
790
790
  },
791
- [M]
791
+ [T]
792
792
  ), q = [
793
793
  "ll-hidden",
794
794
  `ll-hidden--${c}`,
@@ -796,7 +796,7 @@ const Tr = ({
796
796
  r ? "ll-hidden--speaking" : null,
797
797
  _ ? "is-dragging" : null,
798
798
  f ? "ll-hidden--with-avatar" : null,
799
- d ? "ll-hidden--scoped" : null
799
+ u ? "ll-hidden--scoped" : null
800
800
  ].filter(Boolean).join(" "), ne = R === null ? void 0 : { top: `${R - v / 2}px`, transform: "none" };
801
801
  return /* @__PURE__ */ n(
802
802
  "button",
@@ -817,9 +817,9 @@ const Tr = ({
817
817
  // as the click affordance), then the circular avatar photo
818
818
  // taking the rest of the tab. Reinforces "this is an
819
819
  // avatar-based experience" even when collapsed.
820
- /* @__PURE__ */ w($e, { children: [
820
+ /* @__PURE__ */ b($e, { children: [
821
821
  /* @__PURE__ */ n(
822
- an,
822
+ sn,
823
823
  {
824
824
  direction: p,
825
825
  className: "ll-hidden__chevron ll-hidden__chevron--mini"
@@ -836,7 +836,7 @@ const Tr = ({
836
836
  )
837
837
  ] })
838
838
  ) : /* @__PURE__ */ n(
839
- an,
839
+ sn,
840
840
  {
841
841
  direction: p,
842
842
  className: "ll-hidden__chevron"
@@ -844,7 +844,7 @@ const Tr = ({
844
844
  )
845
845
  }
846
846
  );
847
- }, Mr = ({
847
+ }, Tr = ({
848
848
  audioLevel: e,
849
849
  bars: t = 20,
850
850
  maxHeight: r = 20,
@@ -852,24 +852,24 @@ const Tr = ({
852
852
  className: a,
853
853
  barClassName: o
854
854
  }) => {
855
- const s = A(null), l = A([]), c = Xe(() => {
855
+ const s = A(null), l = A([]), c = Ze(() => {
856
856
  const v = (Math.sqrt(5) - 1) / 2;
857
- return Array.from({ length: t }, (f, d) => 0.5 + d * v % 1 * 0.5);
857
+ return Array.from({ length: t }, (f, u) => 0.5 + u * v % 1 * 0.5);
858
858
  }, [t]);
859
- T(() => e.subscribe((f) => {
860
- for (let d = 0; d < t; d++) {
861
- const R = l.current[d];
859
+ M(() => e.subscribe((f) => {
860
+ for (let u = 0; u < t; u++) {
861
+ const R = l.current[u];
862
862
  if (!R) continue;
863
- const L = Math.max(i, f * r * c[d]);
864
- R.style.height = `${L}px`;
863
+ const k = Math.max(i, f * r * c[u]);
864
+ R.style.height = `${k}px`;
865
865
  }
866
866
  }), [e, t, r, i, c]);
867
867
  const p = ["ll-waveform", a].filter(Boolean).join(" ");
868
868
  return /* @__PURE__ */ n("div", { ref: s, className: p, "aria-hidden": "true", children: Array.from({ length: t }, (v, f) => /* @__PURE__ */ n(
869
869
  "div",
870
870
  {
871
- ref: (d) => {
872
- l.current[f] = d;
871
+ ref: (u) => {
872
+ l.current[f] = u;
873
873
  },
874
874
  className: ["ll-waveform__bar", o].filter(Boolean).join(" "),
875
875
  style: { height: `${i}px` }
@@ -893,7 +893,7 @@ const Tr = ({
893
893
  className: "ll-minimized ll-minimized--mobile",
894
894
  role: "region",
895
895
  "aria-label": `${r} widget`,
896
- children: /* @__PURE__ */ w(
896
+ children: /* @__PURE__ */ b(
897
897
  "button",
898
898
  {
899
899
  type: "button",
@@ -913,7 +913,7 @@ const Tr = ({
913
913
  )
914
914
  ) : /* @__PURE__ */ n("div", { className: "ll-minimized__avatar ll-minimized__avatar--placeholder" }),
915
915
  /* @__PURE__ */ n(
916
- Mr,
916
+ Tr,
917
917
  {
918
918
  audioLevel: s,
919
919
  bars: 16,
@@ -922,7 +922,7 @@ const Tr = ({
922
922
  }
923
923
  ),
924
924
  /* @__PURE__ */ n("span", { className: "ll-minimized__name", children: r }),
925
- /* @__PURE__ */ w("div", { className: "ll-minimized__controls", children: [
925
+ /* @__PURE__ */ b("div", { className: "ll-minimized__controls", children: [
926
926
  /* @__PURE__ */ n(
927
927
  "span",
928
928
  {
@@ -936,10 +936,10 @@ const Tr = ({
936
936
  (v.key === "Enter" || v.key === " ") && (v.stopPropagation(), v.preventDefault(), c());
937
937
  },
938
938
  "aria-label": o ? "Unmute microphone" : "Mute microphone",
939
- children: /* @__PURE__ */ n(on, { muted: o, className: "ll-minimized__icon" })
939
+ children: /* @__PURE__ */ n(ln, { muted: o, className: "ll-minimized__icon" })
940
940
  }
941
941
  ),
942
- /* @__PURE__ */ n(ln, { className: "ll-minimized__icon ll-minimized__icon--expand" })
942
+ /* @__PURE__ */ n(an, { className: "ll-minimized__icon ll-minimized__icon--expand" })
943
943
  ] })
944
944
  ]
945
945
  }
@@ -952,7 +952,7 @@ const Tr = ({
952
952
  "data-position": e,
953
953
  role: "region",
954
954
  "aria-label": `${r} widget`,
955
- children: /* @__PURE__ */ w("div", { className: "ll-minimized__surface", children: [
955
+ children: /* @__PURE__ */ b("div", { className: "ll-minimized__surface", children: [
956
956
  i ? (
957
957
  // eslint-disable-next-line @next/next/no-img-element
958
958
  /* @__PURE__ */ n(
@@ -964,11 +964,11 @@ const Tr = ({
964
964
  }
965
965
  )
966
966
  ) : /* @__PURE__ */ n("div", { className: "ll-minimized__avatar ll-minimized__avatar--placeholder" }),
967
- /* @__PURE__ */ w("div", { className: "ll-minimized__meta", children: [
967
+ /* @__PURE__ */ b("div", { className: "ll-minimized__meta", children: [
968
968
  /* @__PURE__ */ n("span", { className: "ll-minimized__name", children: r }),
969
969
  /* @__PURE__ */ n("span", { className: "ll-minimized__state", children: a === "speaking" ? "Speaking" : a === "thinking" ? "Thinking" : "Listening" })
970
970
  ] }),
971
- /* @__PURE__ */ w("div", { className: "ll-minimized__controls", children: [
971
+ /* @__PURE__ */ b("div", { className: "ll-minimized__controls", children: [
972
972
  /* @__PURE__ */ n(
973
973
  "button",
974
974
  {
@@ -976,7 +976,7 @@ const Tr = ({
976
976
  className: "ll-minimized__btn",
977
977
  onClick: c,
978
978
  "aria-label": o ? "Unmute microphone" : "Mute microphone",
979
- children: /* @__PURE__ */ n(on, { muted: o, className: "ll-minimized__icon" })
979
+ children: /* @__PURE__ */ n(ln, { muted: o, className: "ll-minimized__icon" })
980
980
  }
981
981
  ),
982
982
  /* @__PURE__ */ n(
@@ -986,7 +986,7 @@ const Tr = ({
986
986
  className: "ll-minimized__btn",
987
987
  onClick: l,
988
988
  "aria-label": `Expand ${r} widget`,
989
- children: /* @__PURE__ */ n(ln, { className: "ll-minimized__icon" })
989
+ children: /* @__PURE__ */ n(an, { className: "ll-minimized__icon" })
990
990
  }
991
991
  ),
992
992
  /* @__PURE__ */ n(
@@ -1010,7 +1010,7 @@ const Tr = ({
1010
1010
  style: a
1011
1011
  }) => {
1012
1012
  const [o, s] = S(!1), l = A(e);
1013
- if (T(() => {
1013
+ if (M(() => {
1014
1014
  l.current !== e && (l.current = e, s(!1));
1015
1015
  }, [e]), !e) return null;
1016
1016
  const c = {
@@ -1040,14 +1040,56 @@ const Tr = ({
1040
1040
  }
1041
1041
  )
1042
1042
  );
1043
- }, $r = 8, un = 8, zr = ({
1043
+ }, $r = "#E06540";
1044
+ function zr({
1045
+ size: e = 14,
1046
+ className: t,
1047
+ fill: r = $r
1048
+ }) {
1049
+ return /* @__PURE__ */ b(
1050
+ "svg",
1051
+ {
1052
+ xmlns: "http://www.w3.org/2000/svg",
1053
+ width: e,
1054
+ height: e,
1055
+ viewBox: "0 0 52 52",
1056
+ fill: "none",
1057
+ className: t,
1058
+ "aria-hidden": !0,
1059
+ children: [
1060
+ /* @__PURE__ */ n(
1061
+ "path",
1062
+ {
1063
+ d: "M44.5714 26C44.5714 23.5612 44.0908 21.146 43.1575 18.8928C42.2242 16.6397 40.8565 14.5924 39.132 12.868C37.4076 11.1435 35.3603 9.77577 33.1072 8.84247C30.854 7.90917 28.4388 7.42857 26 7.42857C23.5612 7.42857 21.146 7.90916 18.8928 8.84247C16.6397 9.77577 14.5924 11.1435 12.868 12.868C11.1435 14.5924 9.77577 16.6397 8.84247 18.8928C7.90917 21.146 7.42857 23.5612 7.42857 26C7.42857 28.4388 7.90916 30.854 8.84247 33.1072C9.77577 35.3603 11.1435 37.4076 12.868 39.132C14.5924 40.8565 16.6397 42.2242 18.8928 43.1575C21.146 44.0908 23.5612 44.5714 26 44.5714H48.2857C50.3371 44.5714 52 46.2344 52 48.2857C52 50.3371 50.3371 52 48.2857 52H26C22.5857 52 19.2049 51.3275 16.0505 50.021C12.896 48.7144 10.0293 46.7993 7.61501 44.385C5.20069 41.9707 3.28564 39.104 1.97902 35.9495C0.67247 32.7951 -3.54212e-07 29.4143 0 26C-1.68163e-07 22.5857 0.672469 19.2049 1.97902 16.0505C3.28564 12.896 5.20069 10.0293 7.61501 7.61501C10.0293 5.20069 12.896 3.28564 16.0505 1.97902C19.2049 0.67247 22.5857 0 26 0C29.4143 1.86048e-07 32.7951 0.67247 35.9495 1.97902C39.104 3.28564 41.9707 5.20069 44.385 7.61501C46.7993 10.0293 48.7144 12.896 50.021 16.0505C51.3275 19.2049 52 22.5857 52 26C52 28.0513 50.3371 29.7143 48.2857 29.7143C46.2344 29.7143 44.5714 28.0513 44.5714 26Z",
1064
+ fill: r
1065
+ }
1066
+ ),
1067
+ /* @__PURE__ */ n(
1068
+ "path",
1069
+ {
1070
+ d: "M28.9717 23.7714C28.9717 21.3098 30.9672 19.3143 33.4288 19.3143C35.8904 19.3143 37.886 21.3098 37.886 23.7714C37.886 26.233 35.8904 28.2286 33.4288 28.2286C30.9672 28.2286 28.9717 26.233 28.9717 23.7714Z",
1071
+ fill: r
1072
+ }
1073
+ ),
1074
+ /* @__PURE__ */ n(
1075
+ "path",
1076
+ {
1077
+ d: "M18.5714 19.3143C16.1098 19.3143 14.1143 21.3098 14.1143 23.7714C14.1143 26.233 16.1098 28.2286 18.5714 28.2286C21.033 28.2286 23.0285 26.233 23.0285 23.7714C23.0285 21.3098 21.033 19.3143 18.5714 19.3143Z",
1078
+ fill: r
1079
+ }
1080
+ )
1081
+ ]
1082
+ }
1083
+ );
1084
+ }
1085
+ const Hr = 8, un = 8, Or = ({
1044
1086
  open: e,
1045
1087
  onClose: t,
1046
1088
  anchorRef: r,
1047
1089
  children: i
1048
1090
  }) => {
1049
1091
  const a = A(null), [o, s] = S(null);
1050
- return xn(() => {
1092
+ return Ln(() => {
1051
1093
  if (!e) {
1052
1094
  s(null);
1053
1095
  return;
@@ -1056,26 +1098,26 @@ const Tr = ({
1056
1098
  if (!l) return;
1057
1099
  const c = () => {
1058
1100
  const p = l.getBoundingClientRect(), v = {
1059
- top: p.top - $r,
1101
+ top: p.top - Hr,
1060
1102
  left: p.left + p.width / 2
1061
- }, f = un + 90, d = window.innerWidth - un - 90;
1062
- v.left < f && (v.left = f), v.left > d && (v.left = d), s(v);
1103
+ }, f = un + 90, u = window.innerWidth - un - 90;
1104
+ v.left < f && (v.left = f), v.left > u && (v.left = u), s(v);
1063
1105
  };
1064
1106
  return c(), window.addEventListener("scroll", c, !0), window.addEventListener("resize", c), () => {
1065
1107
  window.removeEventListener("scroll", c, !0), window.removeEventListener("resize", c);
1066
1108
  };
1067
- }, [e, r]), T(() => {
1109
+ }, [e, r]), M(() => {
1068
1110
  if (!e) return;
1069
1111
  const l = (p) => {
1070
- const v = p.target, f = a.current, d = r.current;
1071
- f && f.contains(v) || d && d.contains(v) || t();
1112
+ const v = p.target, f = a.current, u = r.current;
1113
+ f && f.contains(v) || u && u.contains(v) || t();
1072
1114
  }, c = (p) => {
1073
1115
  p.key === "Escape" && (p.stopPropagation(), t());
1074
1116
  };
1075
1117
  return document.addEventListener("mousedown", l), document.addEventListener("keydown", c), () => {
1076
1118
  document.removeEventListener("mousedown", l), document.removeEventListener("keydown", c);
1077
1119
  };
1078
- }, [e, t, r]), !e || o === null || typeof document > "u" ? null : Pt(
1120
+ }, [e, t, r]), !e || o === null || typeof document > "u" ? null : $t(
1079
1121
  /* @__PURE__ */ n(
1080
1122
  "div",
1081
1123
  {
@@ -1095,7 +1137,7 @@ const Tr = ({
1095
1137
  ),
1096
1138
  document.body
1097
1139
  );
1098
- }, Hr = ({
1140
+ }, Br = ({
1099
1141
  isMuted: e,
1100
1142
  onToggleMute: t,
1101
1143
  isCameraEnabled: r,
@@ -1108,17 +1150,17 @@ const Tr = ({
1108
1150
  onToggleSpeaker: p,
1109
1151
  allowTyping: v,
1110
1152
  isTypingOpen: f,
1111
- onToggleTyping: d,
1153
+ onToggleTyping: u,
1112
1154
  onDisconnect: R
1113
1155
  }) => {
1114
- const [L, _] = S(!1), h = A(null);
1115
- return /* @__PURE__ */ w($e, { children: [
1116
- /* @__PURE__ */ w(
1156
+ const [k, _] = S(!1), m = A(null);
1157
+ return /* @__PURE__ */ b($e, { children: [
1158
+ /* @__PURE__ */ b(
1117
1159
  "div",
1118
1160
  {
1119
1161
  className: "ll-toolbar ll-toolbar--compact",
1120
1162
  "data-testid": "compact-toolbar",
1121
- onClick: (b) => b.stopPropagation(),
1163
+ onClick: (w) => w.stopPropagation(),
1122
1164
  children: [
1123
1165
  /* @__PURE__ */ n(
1124
1166
  "button",
@@ -1127,20 +1169,20 @@ const Tr = ({
1127
1169
  className: `ll-tool ${e ? "is-muted" : ""}`,
1128
1170
  onClick: t,
1129
1171
  "aria-label": e ? "Unmute microphone" : "Mute microphone",
1130
- children: /* @__PURE__ */ n(Sn, { muted: e })
1172
+ children: /* @__PURE__ */ n(Nn, { muted: e })
1131
1173
  }
1132
1174
  ),
1133
1175
  /* @__PURE__ */ n(
1134
1176
  "button",
1135
1177
  {
1136
- ref: h,
1178
+ ref: m,
1137
1179
  type: "button",
1138
- className: `ll-tool ${L ? "is-on" : ""}`,
1139
- onClick: () => _((b) => !b),
1180
+ className: `ll-tool ${k ? "is-on" : ""}`,
1181
+ onClick: () => _((w) => !w),
1140
1182
  "aria-label": "More controls",
1141
1183
  "aria-haspopup": "menu",
1142
- "aria-expanded": L,
1143
- children: /* @__PURE__ */ n(Or, {})
1184
+ "aria-expanded": k,
1185
+ children: /* @__PURE__ */ n(Wr, {})
1144
1186
  }
1145
1187
  ),
1146
1188
  /* @__PURE__ */ n(
@@ -1150,20 +1192,20 @@ const Tr = ({
1150
1192
  className: "ll-tool ll-tool--danger",
1151
1193
  onClick: R,
1152
1194
  "aria-label": "End conversation",
1153
- children: /* @__PURE__ */ n(An, {})
1195
+ children: /* @__PURE__ */ n(In, {})
1154
1196
  }
1155
1197
  )
1156
1198
  ]
1157
1199
  }
1158
1200
  ),
1159
- /* @__PURE__ */ w(
1160
- zr,
1201
+ /* @__PURE__ */ b(
1202
+ Or,
1161
1203
  {
1162
- open: L,
1204
+ open: k,
1163
1205
  onClose: () => _(!1),
1164
- anchorRef: h,
1206
+ anchorRef: m,
1165
1207
  children: [
1166
- a && /* @__PURE__ */ w(
1208
+ a && /* @__PURE__ */ b(
1167
1209
  "button",
1168
1210
  {
1169
1211
  type: "button",
@@ -1172,12 +1214,12 @@ const Tr = ({
1172
1214
  i(), _(!1);
1173
1215
  },
1174
1216
  children: [
1175
- /* @__PURE__ */ n(Cn, {}),
1217
+ /* @__PURE__ */ n(Sn, {}),
1176
1218
  /* @__PURE__ */ n("span", { children: r ? "Stop camera" : "Start camera" })
1177
1219
  ]
1178
1220
  }
1179
1221
  ),
1180
- l && /* @__PURE__ */ w(
1222
+ l && /* @__PURE__ */ b(
1181
1223
  "button",
1182
1224
  {
1183
1225
  type: "button",
@@ -1191,7 +1233,7 @@ const Tr = ({
1191
1233
  ]
1192
1234
  }
1193
1235
  ),
1194
- /* @__PURE__ */ w(
1236
+ /* @__PURE__ */ b(
1195
1237
  "button",
1196
1238
  {
1197
1239
  type: "button",
@@ -1200,26 +1242,26 @@ const Tr = ({
1200
1242
  p(), _(!1);
1201
1243
  },
1202
1244
  children: [
1203
- /* @__PURE__ */ n(Nn, { muted: c }),
1245
+ /* @__PURE__ */ n(An, { muted: c }),
1204
1246
  /* @__PURE__ */ n("span", { children: c ? "Unmute speaker" : "Mute speaker" })
1205
1247
  ]
1206
1248
  }
1207
1249
  ),
1208
- v && /* @__PURE__ */ w(
1250
+ v && /* @__PURE__ */ b(
1209
1251
  "button",
1210
1252
  {
1211
1253
  type: "button",
1212
1254
  className: `ll-overflow-popover__item ${f ? "is-on" : ""}`,
1213
1255
  onClick: () => {
1214
- d(), _(!1);
1256
+ u(), _(!1);
1215
1257
  },
1216
1258
  children: [
1217
- /* @__PURE__ */ n(Br, {}),
1259
+ /* @__PURE__ */ n(Fr, {}),
1218
1260
  /* @__PURE__ */ n("span", { children: f ? "Hide typing" : "Type a message" })
1219
1261
  ]
1220
1262
  }
1221
1263
  ),
1222
- /* @__PURE__ */ w(
1264
+ /* @__PURE__ */ b(
1223
1265
  "button",
1224
1266
  {
1225
1267
  type: "button",
@@ -1237,8 +1279,8 @@ const Tr = ({
1237
1279
  )
1238
1280
  ] });
1239
1281
  };
1240
- function Or() {
1241
- return /* @__PURE__ */ w(
1282
+ function Wr() {
1283
+ return /* @__PURE__ */ b(
1242
1284
  "svg",
1243
1285
  {
1244
1286
  width: "16",
@@ -1254,7 +1296,7 @@ function Or() {
1254
1296
  }
1255
1297
  );
1256
1298
  }
1257
- function Br() {
1299
+ function Fr() {
1258
1300
  return /* @__PURE__ */ n(
1259
1301
  "svg",
1260
1302
  {
@@ -1271,7 +1313,7 @@ function Br() {
1271
1313
  }
1272
1314
  );
1273
1315
  }
1274
- const Wr = ({
1316
+ const qr = ({
1275
1317
  position: e,
1276
1318
  isMobile: t,
1277
1319
  agentName: r,
@@ -1284,14 +1326,14 @@ const Wr = ({
1284
1326
  isSwitchingTeamMember: p,
1285
1327
  teamSwitcherOpen: v,
1286
1328
  onToggleTeamSwitcher: f,
1287
- onSelectTeamMember: d,
1329
+ onSelectTeamMember: u,
1288
1330
  languageMenuOpen: R,
1289
- onToggleLanguageMenu: L,
1331
+ onToggleLanguageMenu: k,
1290
1332
  connectionState: _,
1291
- agentState: h,
1292
- transcript: b,
1333
+ agentState: m,
1334
+ transcript: w,
1293
1335
  canResume: N,
1294
- needsUserGesture: M,
1336
+ needsUserGesture: T,
1295
1337
  error: I,
1296
1338
  isMuted: U,
1297
1339
  micError: g,
@@ -1301,38 +1343,38 @@ const Wr = ({
1301
1343
  cameraPreviewEl: ne,
1302
1344
  cameraDevices: B,
1303
1345
  activeCameraId: j,
1304
- isScreenShareEnabled: E,
1346
+ isScreenShareEnabled: C,
1305
1347
  screenPreviewEl: Z,
1306
- isSpeakerMuted: _e,
1348
+ isSpeakerMuted: we,
1307
1349
  allowCamera: ce,
1308
1350
  allowScreenShare: ze,
1309
1351
  allowTyping: He,
1310
- showMinimize: Q = !0,
1352
+ showMinimize: X = !0,
1311
1353
  showClose: Se = !0,
1312
- chromeless: xe = !1,
1354
+ chromeless: _e = !1,
1313
1355
  compactControls: W = !1,
1314
1356
  transforming: ie,
1315
1357
  transformingLabel: Y,
1316
1358
  avatarVideoContainerRef: fe,
1317
1359
  agentVideoEl: K,
1318
1360
  onConnect: Qe,
1319
- onDisconnect: Ze,
1361
+ onDisconnect: et,
1320
1362
  onRetry: ft,
1321
- onResumeAudio: et,
1363
+ onResumeAudio: tt,
1322
1364
  onToggleMute: Ne,
1323
1365
  onSwitchMicDevice: Oe,
1324
1366
  onToggleCamera: Ae,
1325
1367
  onSwitchCameraDevice: Be,
1326
1368
  onToggleScreenShare: Ie,
1327
1369
  onToggleSpeaker: Re,
1328
- onSendMessage: Te,
1329
- onMinimize: Me,
1370
+ onSendMessage: Me,
1371
+ onMinimize: Te,
1330
1372
  onClose: $,
1331
- onClearMicError: xt
1373
+ onClearMicError: Lt
1332
1374
  }) => {
1333
- var mt;
1334
- const De = ((l == null ? void 0 : l.length) ?? 0) > 1, We = _ === "connecting" || _ === "connected", pe = _ === "connected", tt = _ === "idle" || _ === "disconnected" || _ === "error", [Pe, Fe] = S(!1);
1335
- T(() => {
1375
+ var gt;
1376
+ const De = ((l == null ? void 0 : l.length) ?? 0) > 1, We = _ === "connecting" || _ === "connected", pe = _ === "connected", nt = _ === "idle" || _ === "disconnected" || _ === "error", [Pe, Fe] = S(!1);
1377
+ M(() => {
1336
1378
  if (!K) {
1337
1379
  Fe(!1);
1338
1380
  return;
@@ -1342,71 +1384,71 @@ const Wr = ({
1342
1384
  return;
1343
1385
  }
1344
1386
  Fe(!1);
1345
- const m = () => Fe(!0);
1346
- return K.addEventListener("playing", m), K.addEventListener("loadeddata", m), () => {
1347
- K.removeEventListener("playing", m), K.removeEventListener("loadeddata", m);
1387
+ const h = () => Fe(!0);
1388
+ return K.addEventListener("playing", h), K.addEventListener("loadeddata", h), () => {
1389
+ K.removeEventListener("playing", h), K.removeEventListener("loadeddata", h);
1348
1390
  };
1349
1391
  }, [K]);
1350
- const [kt, Le] = S(!1);
1351
- T(() => {
1392
+ const [kt, ke] = S(!1);
1393
+ M(() => {
1352
1394
  if (!pe) {
1353
- Le(!1);
1395
+ ke(!1);
1354
1396
  return;
1355
1397
  }
1356
1398
  if (Pe) return;
1357
- const m = setTimeout(() => Le(!0), 8e3);
1358
- return () => clearTimeout(m);
1399
+ const h = setTimeout(() => ke(!0), 8e3);
1400
+ return () => clearTimeout(h);
1359
1401
  }, [pe, Pe]);
1360
- const oe = _ === "connecting" || pe && !!i && !Pe && !kt, nt = A(null), me = A(null);
1361
- T(() => {
1362
- const m = nt.current;
1363
- m && (m.innerHTML = "", ne && (ne.style.width = "100%", ne.style.height = "100%", ne.style.objectFit = "cover", ne.style.transform = "scaleX(-1)", m.appendChild(ne)));
1364
- }, [ne]), T(() => {
1365
- const m = me.current;
1366
- m && (m.innerHTML = "", Z && (Z.style.width = "100%", Z.style.height = "100%", Z.style.objectFit = "contain", m.appendChild(Z)));
1402
+ const oe = _ === "connecting" || pe && !!i && !Pe && !kt, rt = A(null), me = A(null);
1403
+ M(() => {
1404
+ const h = rt.current;
1405
+ h && (h.innerHTML = "", ne && (ne.style.width = "100%", ne.style.height = "100%", ne.style.objectFit = "cover", ne.style.transform = "scaleX(-1)", h.appendChild(ne)));
1406
+ }, [ne]), M(() => {
1407
+ const h = me.current;
1408
+ h && (h.innerHTML = "", Z && (Z.style.width = "100%", Z.style.height = "100%", Z.style.objectFit = "contain", h.appendChild(Z)));
1367
1409
  }, [Z]);
1368
- const [qe, Ue] = S(!1), [le, ue] = S(!1), pt = A(null), ht = A(null);
1369
- T(() => {
1410
+ const [qe, Ue] = S(!1), [le, de] = S(!1), pt = A(null), ht = A(null);
1411
+ M(() => {
1370
1412
  if (!qe && !le && !R && !v) return;
1371
- const m = () => {
1372
- Ue(!1), ue(!1), R && L(), v && f();
1413
+ const h = () => {
1414
+ Ue(!1), de(!1), R && k(), v && f();
1373
1415
  };
1374
- return document.addEventListener("click", m), () => document.removeEventListener("click", m);
1416
+ return document.addEventListener("click", h), () => document.removeEventListener("click", h);
1375
1417
  }, [
1376
1418
  qe,
1377
1419
  le,
1378
1420
  R,
1379
1421
  v,
1380
- L,
1422
+ k,
1381
1423
  f
1382
1424
  ]);
1383
- const [Ee, rt] = S(!1), se = C(() => rt((m) => !m), []), [de, Ce] = S(""), it = C(
1384
- (m) => {
1385
- m.preventDefault();
1386
- const J = de.trim();
1387
- J && (Te(J), Ce(""));
1425
+ const [Ce, it] = S(!1), se = E(() => it((h) => !h), []), [ue, Ee] = S(""), ot = E(
1426
+ (h) => {
1427
+ h.preventDefault();
1428
+ const Q = ue.trim();
1429
+ Q && (Me(Q), Ee(""));
1388
1430
  },
1389
- [de, Te]
1390
- ), Lt = s.productName || "Live Layer";
1391
- let ge = null, ye = null;
1392
- for (let m = b.length - 1; m >= 0; m--) {
1393
- const J = b[m];
1394
- if (!ge && J.role === "agent" ? ge = J : !ye && J.role === "user" && (ye = J), ge && ye) break;
1431
+ [ue, Me]
1432
+ ), mt = s.productName || "Live Layer", lt = !s.productName;
1433
+ let ge = null, xe = null;
1434
+ for (let h = w.length - 1; h >= 0; h--) {
1435
+ const Q = w[h];
1436
+ if (!ge && Q.role === "agent" ? ge = Q : !xe && Q.role === "user" && (xe = Q), ge && xe) break;
1395
1437
  }
1396
- const ot = pe ? (ge == null ? void 0 : ge.text) || null : o || null, je = pe && (ye == null ? void 0 : ye.text) || null, lt = [
1438
+ const je = pe ? (ge == null ? void 0 : ge.text) || null : o || null, Ve = pe && (xe == null ? void 0 : xe.text) || null, Ct = [
1397
1439
  "ll-expanded",
1398
1440
  t ? "ll-expanded--mobile" : "ll-expanded--desktop"
1399
1441
  ].join(" ");
1400
- return /* @__PURE__ */ w(
1442
+ return /* @__PURE__ */ b(
1401
1443
  "div",
1402
1444
  {
1403
- className: lt,
1445
+ className: Ct,
1404
1446
  "data-position": e,
1405
1447
  "data-state": pe ? "connected" : We ? "connecting" : "idle",
1406
1448
  role: "dialog",
1407
1449
  "aria-label": `${r} widget`,
1408
1450
  children: [
1409
- /* @__PURE__ */ w("div", { className: "ll-expanded__bg", children: [
1451
+ /* @__PURE__ */ b("div", { className: "ll-expanded__bg", children: [
1410
1452
  i ? /* @__PURE__ */ n(
1411
1453
  Pr,
1412
1454
  {
@@ -1414,7 +1456,7 @@ const Wr = ({
1414
1456
  alt: r,
1415
1457
  className: "ll-expanded__bg-img"
1416
1458
  }
1417
- ) : /* @__PURE__ */ n("div", { className: "ll-expanded__bg-fallback", children: /* @__PURE__ */ n("span", { className: "ll-expanded__bg-initial", children: ((mt = r == null ? void 0 : r.charAt(0)) == null ? void 0 : mt.toUpperCase()) || "A" }) }),
1459
+ ) : /* @__PURE__ */ n("div", { className: "ll-expanded__bg-fallback", children: /* @__PURE__ */ n("span", { className: "ll-expanded__bg-initial", children: ((gt = r == null ? void 0 : r.charAt(0)) == null ? void 0 : gt.toUpperCase()) || "A" }) }),
1418
1460
  a && !pe && /* @__PURE__ */ n(
1419
1461
  "video",
1420
1462
  {
@@ -1428,23 +1470,23 @@ const Wr = ({
1428
1470
  )
1429
1471
  ] }),
1430
1472
  /* @__PURE__ */ n("div", { ref: fe, className: "ll-expanded__video" }),
1431
- oe && /* @__PURE__ */ w("div", { className: "ll-expanded__overlay ll-expanded__overlay--connecting", children: [
1473
+ oe && /* @__PURE__ */ b("div", { className: "ll-expanded__overlay ll-expanded__overlay--connecting", children: [
1432
1474
  /* @__PURE__ */ n("div", { className: "ll-expanded__spinner" }),
1433
1475
  /* @__PURE__ */ n("p", { className: "ll-expanded__overlay-text", children: p ? "Switching..." : "Connecting..." })
1434
1476
  ] }),
1435
- M && pe && /* @__PURE__ */ w(
1477
+ T && pe && /* @__PURE__ */ b(
1436
1478
  "button",
1437
1479
  {
1438
1480
  type: "button",
1439
1481
  className: "ll-expanded__overlay ll-expanded__overlay--gesture",
1440
- onClick: et,
1482
+ onClick: tt,
1441
1483
  children: [
1442
1484
  /* @__PURE__ */ n("svg", { width: "32", height: "32", viewBox: "0 0 24 24", fill: "currentColor", "aria-hidden": !0, children: /* @__PURE__ */ n("path", { d: "M3 9v6h4l5 5V4L7 9H3zm13.54.12a5 5 0 0 1 0 5.76l-1.41-1.41a3 3 0 0 0 0-2.94L16.54 9.12z" }) }),
1443
1485
  /* @__PURE__ */ n("p", { className: "ll-expanded__overlay-text", children: "Tap to enable audio" })
1444
1486
  ]
1445
1487
  }
1446
1488
  ),
1447
- ie && /* @__PURE__ */ w(
1489
+ ie && /* @__PURE__ */ b(
1448
1490
  "div",
1449
1491
  {
1450
1492
  className: "ll-expanded__overlay ll-expanded__overlay--transforming",
@@ -1457,23 +1499,23 @@ const Wr = ({
1457
1499
  ]
1458
1500
  }
1459
1501
  ),
1460
- We ? /* @__PURE__ */ w($e, { children: [
1461
- !W && /* @__PURE__ */ w("div", { className: "ll-expanded__topbar", children: [
1462
- !xe && /* @__PURE__ */ w("div", { className: "ll-expanded__topbar-left", children: [
1463
- /* @__PURE__ */ w("div", { className: "ll-expanded__pill-wrap", children: [
1464
- /* @__PURE__ */ w(
1502
+ We ? /* @__PURE__ */ b($e, { children: [
1503
+ !W && /* @__PURE__ */ b("div", { className: "ll-expanded__topbar", children: [
1504
+ !_e && /* @__PURE__ */ b("div", { className: "ll-expanded__topbar-left", children: [
1505
+ /* @__PURE__ */ b("div", { className: "ll-expanded__pill-wrap", children: [
1506
+ /* @__PURE__ */ b(
1465
1507
  "button",
1466
1508
  {
1467
1509
  type: "button",
1468
1510
  className: "ll-hpill",
1469
- onClick: (m) => {
1470
- De && (m.stopPropagation(), f());
1511
+ onClick: (h) => {
1512
+ De && (h.stopPropagation(), f());
1471
1513
  },
1472
1514
  "aria-haspopup": De ? "listbox" : void 0,
1473
1515
  "aria-expanded": De ? v : void 0,
1474
1516
  children: [
1475
1517
  /* @__PURE__ */ n("span", { className: "ll-hpill__label", children: r }),
1476
- De && /* @__PURE__ */ n(bt, {})
1518
+ De && /* @__PURE__ */ n(wt, {})
1477
1519
  ]
1478
1520
  }
1479
1521
  ),
@@ -1481,42 +1523,42 @@ const Wr = ({
1481
1523
  "div",
1482
1524
  {
1483
1525
  className: "ll-hmenu",
1484
- onClick: (m) => m.stopPropagation(),
1526
+ onClick: (h) => h.stopPropagation(),
1485
1527
  role: "listbox",
1486
- children: l == null ? void 0 : l.map((m) => /* @__PURE__ */ w(
1528
+ children: l == null ? void 0 : l.map((h) => /* @__PURE__ */ b(
1487
1529
  "button",
1488
1530
  {
1489
1531
  type: "button",
1490
- className: `ll-hmenu__item ${m.id === c ? "is-active" : ""}`,
1491
- onClick: () => d(m.id),
1532
+ className: `ll-hmenu__item ${h.id === c ? "is-active" : ""}`,
1533
+ onClick: () => u(h.id),
1492
1534
  role: "option",
1493
- "aria-selected": m.id === c,
1535
+ "aria-selected": h.id === c,
1494
1536
  children: [
1495
- m.avatarImageUrl && /* @__PURE__ */ n(
1537
+ h.avatarImageUrl && /* @__PURE__ */ n(
1496
1538
  "img",
1497
1539
  {
1498
- src: m.avatarImageUrl,
1540
+ src: h.avatarImageUrl,
1499
1541
  alt: "",
1500
1542
  className: "ll-hmenu__avatar"
1501
1543
  }
1502
1544
  ),
1503
- /* @__PURE__ */ n("span", { className: "ll-hmenu__name", children: m.name }),
1504
- m.role && /* @__PURE__ */ n("span", { className: "ll-hmenu__role", children: m.role })
1545
+ /* @__PURE__ */ n("span", { className: "ll-hmenu__name", children: h.name }),
1546
+ h.role && /* @__PURE__ */ n("span", { className: "ll-hmenu__role", children: h.role })
1505
1547
  ]
1506
1548
  },
1507
- m.id
1549
+ h.id
1508
1550
  ))
1509
1551
  }
1510
1552
  )
1511
1553
  ] }),
1512
- /* @__PURE__ */ w("div", { className: "ll-expanded__pill-wrap", children: [
1513
- /* @__PURE__ */ w(
1554
+ /* @__PURE__ */ b("div", { className: "ll-expanded__pill-wrap", children: [
1555
+ /* @__PURE__ */ b(
1514
1556
  "button",
1515
1557
  {
1516
1558
  type: "button",
1517
1559
  className: "ll-hpill ll-hpill--compact",
1518
- onClick: (m) => {
1519
- m.stopPropagation(), L();
1560
+ onClick: (h) => {
1561
+ h.stopPropagation(), k();
1520
1562
  },
1521
1563
  "aria-haspopup": "listbox",
1522
1564
  "aria-expanded": R,
@@ -1524,7 +1566,7 @@ const Wr = ({
1524
1566
  title: "Language: English",
1525
1567
  children: [
1526
1568
  /* @__PURE__ */ n("span", { className: "ll-hpill__label", children: "EN" }),
1527
- /* @__PURE__ */ n(bt, {})
1569
+ /* @__PURE__ */ n(wt, {})
1528
1570
  ]
1529
1571
  }
1530
1572
  ),
@@ -1532,7 +1574,7 @@ const Wr = ({
1532
1574
  "div",
1533
1575
  {
1534
1576
  className: "ll-hmenu",
1535
- onClick: (m) => m.stopPropagation(),
1577
+ onClick: (h) => h.stopPropagation(),
1536
1578
  role: "listbox",
1537
1579
  children: /* @__PURE__ */ n(
1538
1580
  "button",
@@ -1550,21 +1592,21 @@ const Wr = ({
1550
1592
  /* @__PURE__ */ n(
1551
1593
  "span",
1552
1594
  {
1553
- className: `ll-expanded__state ll-expanded__state--${h}`,
1554
- children: h
1595
+ className: `ll-expanded__state ll-expanded__state--${m}`,
1596
+ children: m
1555
1597
  }
1556
1598
  )
1557
1599
  ] }),
1558
- /* @__PURE__ */ w("div", { className: "ll-expanded__header-actions", children: [
1559
- Q !== !1 && /* @__PURE__ */ n(
1600
+ /* @__PURE__ */ b("div", { className: "ll-expanded__header-actions", children: [
1601
+ X !== !1 && /* @__PURE__ */ n(
1560
1602
  "button",
1561
1603
  {
1562
1604
  type: "button",
1563
1605
  className: "ll-hbtn",
1564
- onClick: Me,
1606
+ onClick: Te,
1565
1607
  "aria-label": "Minimize widget",
1566
1608
  title: "Minimize",
1567
- children: /* @__PURE__ */ n(fn, {})
1609
+ children: /* @__PURE__ */ n(pn, {})
1568
1610
  }
1569
1611
  ),
1570
1612
  Se !== !1 && /* @__PURE__ */ n(
@@ -1575,31 +1617,45 @@ const Wr = ({
1575
1617
  onClick: $,
1576
1618
  "aria-label": "End call",
1577
1619
  title: "End call",
1578
- children: /* @__PURE__ */ n(dn, {})
1620
+ children: /* @__PURE__ */ n(fn, {})
1579
1621
  }
1580
1622
  )
1581
1623
  ] })
1582
1624
  ] }),
1583
- W && /* @__PURE__ */ w("div", { className: "ll-compact-status", "data-state": h, children: [
1625
+ W && /* @__PURE__ */ b("div", { className: "ll-compact-status", "data-state": m, children: [
1584
1626
  /* @__PURE__ */ n("span", { className: "ll-compact-status__dot", "aria-hidden": !0 }),
1585
- /* @__PURE__ */ n("span", { className: "ll-compact-status__label", children: h })
1627
+ /* @__PURE__ */ n("span", { className: "ll-compact-status__label", children: m })
1586
1628
  ] })
1587
1629
  ] }) : (
1588
1630
  // Idle-state header with Live Layer product name + minimize/close.
1589
1631
  // Hidden in compact mode — on a 140×210 docked slot the brand pill
1590
1632
  // and 40px buttons crowded out the central "Start video call"
1591
1633
  // affordance. The user can dismiss by scrolling past the slot.
1592
- !W && /* @__PURE__ */ w("div", { className: "ll-expanded__header ll-expanded__header--idle", children: [
1593
- /* @__PURE__ */ n("span", { className: "ll-expanded__brand", children: Lt }),
1594
- /* @__PURE__ */ w("div", { className: "ll-expanded__header-actions", children: [
1595
- Q !== !1 && /* @__PURE__ */ n(
1634
+ !W && /* @__PURE__ */ b("div", { className: "ll-expanded__header ll-expanded__header--idle", children: [
1635
+ lt ? /* @__PURE__ */ b(
1636
+ "a",
1637
+ {
1638
+ className: "ll-expanded__brand ll-expanded__brand--link",
1639
+ href: "https://livelayer.studio?utm_source=widget&utm_medium=brand-badge",
1640
+ target: "_blank",
1641
+ rel: "noopener noreferrer",
1642
+ "aria-label": "Powered by LiveLayer — opens livelayer.studio in a new tab",
1643
+ title: "Powered by LiveLayer — visit livelayer.studio",
1644
+ children: [
1645
+ /* @__PURE__ */ n(zr, { size: 14, className: "ll-expanded__brand-mark" }),
1646
+ /* @__PURE__ */ n("span", { children: mt })
1647
+ ]
1648
+ }
1649
+ ) : /* @__PURE__ */ n("span", { className: "ll-expanded__brand", children: mt }),
1650
+ /* @__PURE__ */ b("div", { className: "ll-expanded__header-actions", children: [
1651
+ X !== !1 && /* @__PURE__ */ n(
1596
1652
  "button",
1597
1653
  {
1598
1654
  type: "button",
1599
1655
  className: "ll-hbtn ll-hbtn--ghost",
1600
- onClick: Me,
1656
+ onClick: Te,
1601
1657
  "aria-label": "Minimize widget",
1602
- children: /* @__PURE__ */ n(fn, {})
1658
+ children: /* @__PURE__ */ n(pn, {})
1603
1659
  }
1604
1660
  ),
1605
1661
  Se !== !1 && /* @__PURE__ */ n(
@@ -1609,29 +1665,29 @@ const Wr = ({
1609
1665
  className: "ll-hbtn ll-hbtn--danger",
1610
1666
  onClick: $,
1611
1667
  "aria-label": "Close widget",
1612
- children: /* @__PURE__ */ n(dn, {})
1668
+ children: /* @__PURE__ */ n(fn, {})
1613
1669
  }
1614
1670
  )
1615
1671
  ] })
1616
1672
  ] })
1617
1673
  ),
1618
- tt && /* @__PURE__ */ (() => {
1619
- const m = N ? "Resume session" : _ === "disconnected" ? "Reconnect to agent" : "Start video call";
1620
- return /* @__PURE__ */ w($e, { children: [
1621
- !I && /* @__PURE__ */ w(
1674
+ nt && /* @__PURE__ */ (() => {
1675
+ const h = N ? "Resume session" : _ === "disconnected" ? "Reconnect to agent" : "Start video call";
1676
+ return /* @__PURE__ */ b($e, { children: [
1677
+ !I && /* @__PURE__ */ b(
1622
1678
  "button",
1623
1679
  {
1624
1680
  type: "button",
1625
1681
  className: "ll-expanded__play",
1626
1682
  onClick: Qe,
1627
- "aria-label": m,
1683
+ "aria-label": h,
1628
1684
  children: [
1629
1685
  /* @__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" }) }) }),
1630
- W && /* @__PURE__ */ n("span", { className: "ll-expanded__play-label", children: m })
1686
+ W && /* @__PURE__ */ n("span", { className: "ll-expanded__play-label", children: h })
1631
1687
  ]
1632
1688
  }
1633
1689
  ),
1634
- !W && /* @__PURE__ */ w("div", { className: "ll-expanded__bottom ll-expanded__bottom--idle", children: [
1690
+ !W && /* @__PURE__ */ b("div", { className: "ll-expanded__bottom ll-expanded__bottom--idle", children: [
1635
1691
  o && /* @__PURE__ */ n("div", { className: "ll-expanded__transcript", children: /* @__PURE__ */ n("p", { className: "ll-expanded__transcript-text", children: o }) }),
1636
1692
  /* @__PURE__ */ n(
1637
1693
  "button",
@@ -1639,65 +1695,65 @@ const Wr = ({
1639
1695
  type: "button",
1640
1696
  className: "ll-expanded__cta",
1641
1697
  onClick: Qe,
1642
- "aria-label": m,
1643
- children: m
1698
+ "aria-label": h,
1699
+ children: h
1644
1700
  }
1645
1701
  )
1646
1702
  ] })
1647
1703
  ] });
1648
1704
  })(),
1649
- /* @__PURE__ */ w(
1705
+ /* @__PURE__ */ b(
1650
1706
  "div",
1651
1707
  {
1652
- className: `ll-expanded__pip ${We && (q || E) ? "is-visible" : ""}`,
1708
+ className: `ll-expanded__pip ${We && (q || C) ? "is-visible" : ""}`,
1653
1709
  children: [
1654
1710
  /* @__PURE__ */ n(
1655
1711
  "div",
1656
1712
  {
1657
1713
  ref: me,
1658
- className: E ? "ll-expanded__pip-host" : "ll-expanded__pip-host is-hidden"
1714
+ className: C ? "ll-expanded__pip-host" : "ll-expanded__pip-host is-hidden"
1659
1715
  }
1660
1716
  ),
1661
1717
  /* @__PURE__ */ n(
1662
1718
  "div",
1663
1719
  {
1664
- ref: nt,
1665
- className: !E && q ? "ll-expanded__pip-host" : "ll-expanded__pip-host is-hidden"
1720
+ ref: rt,
1721
+ className: !C && q ? "ll-expanded__pip-host" : "ll-expanded__pip-host is-hidden"
1666
1722
  }
1667
1723
  )
1668
1724
  ]
1669
1725
  }
1670
1726
  ),
1671
- We ? /* @__PURE__ */ w("div", { className: "ll-expanded__bottom", children: [
1672
- !W && ot && /* @__PURE__ */ n(
1727
+ We ? /* @__PURE__ */ b("div", { className: "ll-expanded__bottom", children: [
1728
+ !W && je && /* @__PURE__ */ n(
1673
1729
  "div",
1674
1730
  {
1675
1731
  className: "ll-expanded__transcript ll-expanded__transcript--agent",
1676
1732
  "data-role": "agent",
1677
- children: /* @__PURE__ */ n("p", { className: "ll-expanded__transcript-text", children: ot })
1733
+ children: /* @__PURE__ */ n("p", { className: "ll-expanded__transcript-text", children: je })
1678
1734
  }
1679
1735
  ),
1680
- !W && je && /* @__PURE__ */ n(
1736
+ !W && Ve && /* @__PURE__ */ n(
1681
1737
  "div",
1682
1738
  {
1683
1739
  className: "ll-expanded__transcript ll-expanded__transcript--user",
1684
1740
  "data-role": "user",
1685
- children: /* @__PURE__ */ n("p", { className: "ll-expanded__transcript-text", children: je })
1741
+ children: /* @__PURE__ */ n("p", { className: "ll-expanded__transcript-text", children: Ve })
1686
1742
  }
1687
1743
  ),
1688
- !xe && !W && /* @__PURE__ */ w("div", { className: "ll-toolbar", onClick: (m) => m.stopPropagation(), children: [
1744
+ !_e && !W && /* @__PURE__ */ b("div", { className: "ll-toolbar", onClick: (h) => h.stopPropagation(), children: [
1689
1745
  ze && /* @__PURE__ */ n(
1690
1746
  "button",
1691
1747
  {
1692
1748
  type: "button",
1693
- className: `ll-tool ${E ? "is-on" : ""}`,
1749
+ className: `ll-tool ${C ? "is-on" : ""}`,
1694
1750
  onClick: Ie,
1695
- "aria-label": E ? "Stop sharing screen" : "Share screen",
1696
- title: E ? "Stop sharing" : "Share screen",
1751
+ "aria-label": C ? "Stop sharing screen" : "Share screen",
1752
+ title: C ? "Stop sharing" : "Share screen",
1697
1753
  children: /* @__PURE__ */ n(En, {})
1698
1754
  }
1699
1755
  ),
1700
- ce && /* @__PURE__ */ w("div", { className: "ll-tool-split", children: [
1756
+ ce && /* @__PURE__ */ b("div", { className: "ll-tool-split", children: [
1701
1757
  /* @__PURE__ */ n(
1702
1758
  "button",
1703
1759
  {
@@ -1706,7 +1762,7 @@ const Wr = ({
1706
1762
  onClick: Ae,
1707
1763
  "aria-label": q ? "Turn off camera" : "Turn on camera",
1708
1764
  title: q ? "Stop camera" : "Start camera",
1709
- children: /* @__PURE__ */ n(Cn, {})
1765
+ children: /* @__PURE__ */ n(Sn, {})
1710
1766
  }
1711
1767
  ),
1712
1768
  /* @__PURE__ */ n(
@@ -1715,29 +1771,29 @@ const Wr = ({
1715
1771
  ref: ht,
1716
1772
  type: "button",
1717
1773
  className: `ll-tool ll-tool--right ${q ? "is-on" : ""}`,
1718
- onClick: (m) => {
1719
- m.stopPropagation(), ue((J) => !J), Ue(!1);
1774
+ onClick: (h) => {
1775
+ h.stopPropagation(), de((Q) => !Q), Ue(!1);
1720
1776
  },
1721
1777
  "aria-label": "Camera devices",
1722
1778
  "aria-haspopup": "listbox",
1723
1779
  "aria-expanded": le,
1724
- children: /* @__PURE__ */ n(bt, {})
1780
+ children: /* @__PURE__ */ n(wt, {})
1725
1781
  }
1726
1782
  ),
1727
1783
  le && B.length > 0 && /* @__PURE__ */ n(
1728
- pn,
1784
+ hn,
1729
1785
  {
1730
1786
  label: "Camera",
1731
1787
  devices: B,
1732
1788
  activeId: j,
1733
1789
  anchorRef: ht,
1734
- onPick: (m) => {
1735
- ue(!1), Be(m);
1790
+ onPick: (h) => {
1791
+ de(!1), Be(h);
1736
1792
  }
1737
1793
  }
1738
1794
  )
1739
1795
  ] }),
1740
- /* @__PURE__ */ w("div", { className: "ll-tool-split", children: [
1796
+ /* @__PURE__ */ b("div", { className: "ll-tool-split", children: [
1741
1797
  /* @__PURE__ */ n(
1742
1798
  "button",
1743
1799
  {
@@ -1746,7 +1802,7 @@ const Wr = ({
1746
1802
  onClick: Ne,
1747
1803
  "aria-label": U ? "Unmute microphone" : "Mute microphone",
1748
1804
  title: U ? "Unmute" : "Mute",
1749
- children: /* @__PURE__ */ n(Sn, { muted: U })
1805
+ children: /* @__PURE__ */ n(Nn, { muted: U })
1750
1806
  }
1751
1807
  ),
1752
1808
  /* @__PURE__ */ n(
@@ -1755,24 +1811,24 @@ const Wr = ({
1755
1811
  ref: pt,
1756
1812
  type: "button",
1757
1813
  className: `ll-tool ll-tool--right ${U ? "is-muted" : ""}`,
1758
- onClick: (m) => {
1759
- m.stopPropagation(), Ue((J) => !J), ue(!1);
1814
+ onClick: (h) => {
1815
+ h.stopPropagation(), Ue((Q) => !Q), de(!1);
1760
1816
  },
1761
1817
  "aria-label": "Microphone devices",
1762
1818
  "aria-haspopup": "listbox",
1763
1819
  "aria-expanded": qe,
1764
- children: /* @__PURE__ */ n(bt, {})
1820
+ children: /* @__PURE__ */ n(wt, {})
1765
1821
  }
1766
1822
  ),
1767
1823
  qe && P.length > 0 && /* @__PURE__ */ n(
1768
- pn,
1824
+ hn,
1769
1825
  {
1770
1826
  label: "Microphone",
1771
1827
  devices: P,
1772
1828
  activeId: O,
1773
1829
  anchorRef: pt,
1774
- onPick: (m) => {
1775
- Ue(!1), Oe(m);
1830
+ onPick: (h) => {
1831
+ Ue(!1), Oe(h);
1776
1832
  }
1777
1833
  }
1778
1834
  )
@@ -1781,11 +1837,11 @@ const Wr = ({
1781
1837
  "button",
1782
1838
  {
1783
1839
  type: "button",
1784
- className: `ll-tool ${_e ? "is-muted" : ""}`,
1840
+ className: `ll-tool ${we ? "is-muted" : ""}`,
1785
1841
  onClick: Re,
1786
- "aria-label": _e ? "Unmute speaker" : "Mute speaker",
1787
- title: _e ? "Unmute speaker" : "Mute speaker",
1788
- children: /* @__PURE__ */ n(Nn, { muted: _e })
1842
+ "aria-label": we ? "Unmute speaker" : "Mute speaker",
1843
+ title: we ? "Unmute speaker" : "Mute speaker",
1844
+ children: /* @__PURE__ */ n(An, { muted: we })
1789
1845
  }
1790
1846
  ),
1791
1847
  /* @__PURE__ */ n(
@@ -1793,81 +1849,81 @@ const Wr = ({
1793
1849
  {
1794
1850
  type: "button",
1795
1851
  className: "ll-tool ll-tool--danger",
1796
- onClick: Ze,
1852
+ onClick: et,
1797
1853
  "aria-label": "End conversation",
1798
1854
  title: "End conversation",
1799
- children: /* @__PURE__ */ n(An, {})
1855
+ children: /* @__PURE__ */ n(In, {})
1800
1856
  }
1801
1857
  )
1802
1858
  ] }),
1803
- !xe && W && /* @__PURE__ */ n(
1804
- Hr,
1859
+ !_e && W && /* @__PURE__ */ n(
1860
+ Br,
1805
1861
  {
1806
1862
  isMuted: U,
1807
1863
  onToggleMute: Ne,
1808
1864
  isCameraEnabled: q,
1809
1865
  onToggleCamera: Ae,
1810
1866
  allowCamera: ce,
1811
- isScreenShareEnabled: E,
1867
+ isScreenShareEnabled: C,
1812
1868
  onToggleScreenShare: Ie,
1813
1869
  allowScreenShare: ze,
1814
- isSpeakerMuted: _e,
1870
+ isSpeakerMuted: we,
1815
1871
  onToggleSpeaker: Re,
1816
1872
  allowTyping: He,
1817
- isTypingOpen: Ee,
1873
+ isTypingOpen: Ce,
1818
1874
  onToggleTyping: se,
1819
- onDisconnect: Ze
1875
+ onDisconnect: et
1820
1876
  }
1821
1877
  ),
1822
- !xe && He && (W ? Ee : !0) && /* @__PURE__ */ w("form", { className: "ll-message-input", onSubmit: it, children: [
1878
+ !_e && He && (W ? Ce : !0) && /* @__PURE__ */ b("form", { className: "ll-message-input", onSubmit: ot, children: [
1823
1879
  /* @__PURE__ */ n(
1824
1880
  "input",
1825
1881
  {
1826
1882
  type: "text",
1827
1883
  className: "ll-message-input__field",
1828
1884
  placeholder: "Message...",
1829
- value: de,
1830
- onChange: (m) => Ce(m.target.value),
1885
+ value: ue,
1886
+ onChange: (h) => Ee(h.target.value),
1831
1887
  "aria-label": "Message the agent"
1832
1888
  }
1833
1889
  ),
1834
- de.trim() && /* @__PURE__ */ n(
1890
+ ue.trim() && /* @__PURE__ */ n(
1835
1891
  "button",
1836
1892
  {
1837
1893
  type: "submit",
1838
1894
  className: "ll-message-input__send",
1839
1895
  "aria-label": "Send message",
1840
- children: /* @__PURE__ */ n(Fr, {})
1896
+ children: /* @__PURE__ */ n(Ur, {})
1841
1897
  }
1842
1898
  )
1843
1899
  ] })
1844
1900
  ] }) : null,
1845
1901
  (() => {
1846
1902
  if (g && _ !== "error")
1847
- return /* @__PURE__ */ w("div", { className: "ll-expanded__banner", role: "alert", children: [
1903
+ return /* @__PURE__ */ b("div", { className: "ll-expanded__banner", role: "alert", children: [
1848
1904
  /* @__PURE__ */ n("span", { children: g }),
1849
1905
  /* @__PURE__ */ n(
1850
1906
  "button",
1851
1907
  {
1852
1908
  type: "button",
1853
1909
  className: "ll-expanded__banner-x",
1854
- onClick: xt,
1910
+ onClick: Lt,
1855
1911
  "aria-label": "Dismiss",
1856
1912
  children: "×"
1857
1913
  }
1858
1914
  )
1859
1915
  ] });
1860
1916
  if (!I || _ !== "error") return null;
1861
- let m = "Failed to connect", J = "Try again";
1862
- return I === "MIC_PERMISSION_DENIED" ? m = "Microphone blocked. Allow access to talk." : I === "MIC_NOT_FOUND" ? m = "No microphone found. Plug one in + retry." : I === "MIC_UNAVAILABLE" ? m = "Mic unavailable. Check other apps using it." : I === "AGENT_TIMEOUT" ? m = "Agent didn't pick up. Try again." : I === "CONNECT_FAILED" ? m = "Connection failed. Check your network." : I.length < 80 && (m = I), /* @__PURE__ */ w("div", { className: "ll-expanded__banner ll-expanded__banner--error", role: "alert", children: [
1863
- /* @__PURE__ */ n("span", { children: m }),
1917
+ let h = "Failed to connect", Q = "Try again";
1918
+ return I === "MIC_PERMISSION_DENIED" ? h = "Microphone blocked. Allow access to talk." : I === "MIC_NOT_FOUND" ? h = "No microphone found. Plug one in + retry." : I === "MIC_UNAVAILABLE" ? h = "Mic unavailable. Check other apps using it." : I === "AGENT_TIMEOUT" ? h = "Agent didn't pick up. Try again." : I === "CONNECT_FAILED" ? h = "Connection failed. Check your network." : I.length < 80 && (h = I), /* @__PURE__ */ b("div", { className: "ll-expanded__banner ll-expanded__banner--error", role: "alert", children: [
1919
+ /* @__PURE__ */ n("span", { children: h }),
1864
1920
  /* @__PURE__ */ n(
1865
1921
  "button",
1866
1922
  {
1867
1923
  type: "button",
1868
1924
  className: "ll-expanded__banner-retry",
1869
1925
  onClick: ft,
1870
- children: J
1926
+ children: Q
1871
1927
  }
1872
1928
  )
1873
1929
  ] });
@@ -1876,55 +1932,55 @@ const Wr = ({
1876
1932
  }
1877
1933
  );
1878
1934
  };
1879
- function bt() {
1935
+ function wt() {
1880
1936
  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" }) });
1881
1937
  }
1882
- function dn() {
1883
- return /* @__PURE__ */ w("svg", { width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round", "aria-hidden": !0, children: [
1938
+ function fn() {
1939
+ return /* @__PURE__ */ b("svg", { width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round", "aria-hidden": !0, children: [
1884
1940
  /* @__PURE__ */ n("line", { x1: "18", y1: "6", x2: "6", y2: "18" }),
1885
1941
  /* @__PURE__ */ n("line", { x1: "6", y1: "6", x2: "18", y2: "18" })
1886
1942
  ] });
1887
1943
  }
1888
- function fn() {
1944
+ function pn() {
1889
1945
  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" }) });
1890
1946
  }
1891
1947
  function En() {
1892
- return /* @__PURE__ */ w("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: [
1948
+ return /* @__PURE__ */ b("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: [
1893
1949
  /* @__PURE__ */ n("rect", { x: "2", y: "3", width: "20", height: "14", rx: "2" }),
1894
1950
  /* @__PURE__ */ n("line", { x1: "8", y1: "21", x2: "16", y2: "21" }),
1895
1951
  /* @__PURE__ */ n("line", { x1: "12", y1: "17", x2: "12", y2: "21" })
1896
1952
  ] });
1897
1953
  }
1898
- function Cn() {
1899
- return /* @__PURE__ */ w("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: [
1954
+ function Sn() {
1955
+ return /* @__PURE__ */ b("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: [
1900
1956
  /* @__PURE__ */ n("path", { d: "M23 7l-7 5 7 5V7z" }),
1901
1957
  /* @__PURE__ */ n("rect", { x: "1", y: "5", width: "15", height: "14", rx: "2" })
1902
1958
  ] });
1903
1959
  }
1904
- function Sn({ muted: e }) {
1905
- return /* @__PURE__ */ w("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: [
1960
+ function Nn({ muted: e }) {
1961
+ return /* @__PURE__ */ b("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: [
1906
1962
  /* @__PURE__ */ n("path", { d: "M12 1a3 3 0 0 0-3 3v8a3 3 0 0 0 6 0V4a3 3 0 0 0-3-3z" }),
1907
1963
  /* @__PURE__ */ n("path", { d: "M19 10v2a7 7 0 0 1-14 0v-2" }),
1908
1964
  /* @__PURE__ */ n("line", { x1: "12", y1: "19", x2: "12", y2: "23" }),
1909
1965
  e && /* @__PURE__ */ n("line", { x1: "1", y1: "1", x2: "23", y2: "23" })
1910
1966
  ] });
1911
1967
  }
1912
- function Nn({ muted: e }) {
1913
- return /* @__PURE__ */ w("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: [
1968
+ function An({ muted: e }) {
1969
+ return /* @__PURE__ */ b("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: [
1914
1970
  /* @__PURE__ */ n("polygon", { points: "11 5 6 9 2 9 2 15 6 15 11 19 11 5" }),
1915
- e ? /* @__PURE__ */ n("line", { x1: "23", y1: "9", x2: "17", y2: "15" }) : /* @__PURE__ */ w($e, { children: [
1971
+ e ? /* @__PURE__ */ n("line", { x1: "23", y1: "9", x2: "17", y2: "15" }) : /* @__PURE__ */ b($e, { children: [
1916
1972
  /* @__PURE__ */ n("path", { d: "M19.07 4.93a10 10 0 0 1 0 14.14" }),
1917
1973
  /* @__PURE__ */ n("path", { d: "M15.54 8.46a5 5 0 0 1 0 7.07" })
1918
1974
  ] })
1919
1975
  ] });
1920
1976
  }
1921
- function Fr() {
1922
- return /* @__PURE__ */ w("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": !0, children: [
1977
+ function Ur() {
1978
+ return /* @__PURE__ */ b("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": !0, children: [
1923
1979
  /* @__PURE__ */ n("line", { x1: "5", y1: "12", x2: "19", y2: "12" }),
1924
1980
  /* @__PURE__ */ n("polyline", { points: "12 5 19 12 12 19" })
1925
1981
  ] });
1926
1982
  }
1927
- function An() {
1983
+ function In() {
1928
1984
  return /* @__PURE__ */ n("svg", { width: "16", height: "16", viewBox: "-4 -4 32 32", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": !0, children: /* @__PURE__ */ n(
1929
1985
  "path",
1930
1986
  {
@@ -1933,7 +1989,7 @@ function An() {
1933
1989
  }
1934
1990
  ) });
1935
1991
  }
1936
- const pn = ({
1992
+ const hn = ({
1937
1993
  label: e,
1938
1994
  devices: t,
1939
1995
  activeId: r,
@@ -1941,21 +1997,21 @@ const pn = ({
1941
1997
  anchorRef: a
1942
1998
  }) => {
1943
1999
  const [o, s] = S(null);
1944
- return xn(() => {
2000
+ return Ln(() => {
1945
2001
  const l = () => {
1946
2002
  const c = a.current;
1947
2003
  if (!c) return;
1948
- const p = c.getBoundingClientRect(), v = 126, f = window.innerWidth - 16 - 110, d = p.left + p.width / 2;
2004
+ const p = c.getBoundingClientRect(), v = 126, f = window.innerWidth - 16 - 110, u = p.left + p.width / 2;
1949
2005
  s({
1950
2006
  top: p.top - 8,
1951
- left: Math.max(v, Math.min(f, d))
2007
+ left: Math.max(v, Math.min(f, u))
1952
2008
  });
1953
2009
  };
1954
2010
  return l(), window.addEventListener("scroll", l, !0), window.addEventListener("resize", l), () => {
1955
2011
  window.removeEventListener("scroll", l, !0), window.removeEventListener("resize", l);
1956
2012
  };
1957
- }, [a]), o === null || typeof document > "u" ? null : Pt(
1958
- /* @__PURE__ */ w(
2013
+ }, [a]), o === null || typeof document > "u" ? null : $t(
2014
+ /* @__PURE__ */ b(
1959
2015
  "div",
1960
2016
  {
1961
2017
  className: "ll-device-menu ll-device-menu--floating",
@@ -1972,7 +2028,7 @@ const pn = ({
1972
2028
  /* @__PURE__ */ n("p", { className: "ll-device-menu__label", children: e }),
1973
2029
  t.map((l, c) => {
1974
2030
  const p = r === l.deviceId;
1975
- return /* @__PURE__ */ w(
2031
+ return /* @__PURE__ */ b(
1976
2032
  "button",
1977
2033
  {
1978
2034
  type: "button",
@@ -1993,7 +2049,7 @@ const pn = ({
1993
2049
  ),
1994
2050
  document.body
1995
2051
  );
1996
- }, qr = [
2052
+ }, jr = [
1997
2053
  // Accept any value (or empty) — `<input data-ll-private />` and
1998
2054
  // `<input data-ll-private="true" />` both opt out. The bare attribute
1999
2055
  // is the recommended spelling; "true" is preserved for back-compat.
@@ -2001,17 +2057,17 @@ const pn = ({
2001
2057
  "[data-ll-skip]",
2002
2058
  ".ll-widget"
2003
2059
  ];
2004
- function $t(e) {
2060
+ function zt(e) {
2005
2061
  let t = e;
2006
2062
  for (; t; ) {
2007
- for (const r of qr)
2063
+ for (const r of jr)
2008
2064
  if (t.matches(r)) return !0;
2009
2065
  t = t.parentElement;
2010
2066
  }
2011
2067
  return !1;
2012
2068
  }
2013
- function Mt(e) {
2014
- if ($t(e)) return !1;
2069
+ function Dt(e) {
2070
+ if (zt(e)) return !1;
2015
2071
  if (e instanceof HTMLInputElement) {
2016
2072
  if (e.type === "password") return !1;
2017
2073
  const t = (e.getAttribute("autocomplete") || "").toLowerCase();
@@ -2019,7 +2075,7 @@ function Mt(e) {
2019
2075
  }
2020
2076
  return !0;
2021
2077
  }
2022
- const wt = 4096, Ur = 20, jr = 20, Vr = 10, Yr = 10, Gr = 30, Kr = 20, hn = 500, Jr = [
2078
+ const _t = 4096, Vr = 20, Yr = 20, Gr = 10, Kr = 10, Jr = 30, Xr = 20, mn = 500, Zr = [
2023
2079
  '[data-ll-private="true"]',
2024
2080
  ".ll-widget",
2025
2081
  "script",
@@ -2027,24 +2083,24 @@ const wt = 4096, Ur = 20, jr = 20, Vr = 10, Yr = 10, Gr = 30, Kr = 20, hn = 500,
2027
2083
  "noscript",
2028
2084
  "iframe"
2029
2085
  ];
2030
- function ut(e) {
2086
+ function dt(e) {
2031
2087
  if (e.getAttribute("aria-hidden") === "true" || e.hasAttribute("hidden")) return !0;
2032
2088
  let t = e;
2033
2089
  for (; t; ) {
2034
- for (const r of Jr)
2090
+ for (const r of Zr)
2035
2091
  if (t.matches(r)) return !0;
2036
2092
  t = t.parentElement;
2037
2093
  }
2038
2094
  return !1;
2039
2095
  }
2040
- function dt(e) {
2096
+ function ut(e) {
2041
2097
  if (typeof window > "u") return !0;
2042
2098
  const t = e.getBoundingClientRect();
2043
2099
  if (t.width <= 0 || t.height <= 0) return !1;
2044
2100
  const r = window.innerHeight || document.documentElement.clientHeight, i = window.innerWidth || document.documentElement.clientWidth;
2045
2101
  return t.bottom > 0 && t.right > 0 && t.top < r && t.left < i;
2046
2102
  }
2047
- function mn(e) {
2103
+ function gn(e) {
2048
2104
  const t = e.getAttribute("id");
2049
2105
  if (t) {
2050
2106
  const o = typeof CSS < "u" && typeof CSS.escape == "function" ? CSS.escape(t) : t.replace(/"/g, '\\"'), s = document.querySelector(`label[for="${o}"]`);
@@ -2074,10 +2130,10 @@ function mn(e) {
2074
2130
  function re(e, t) {
2075
2131
  return e.length <= t ? e : e.slice(0, t - 1) + "…";
2076
2132
  }
2077
- function Xr(e) {
2133
+ function Qr(e) {
2078
2134
  return e && e.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "").slice(0, 60) || null;
2079
2135
  }
2080
- function Qr(e) {
2136
+ function ei(e) {
2081
2137
  const t = e.getAttribute("aria-label");
2082
2138
  if (t) return t.trim().slice(0, 80);
2083
2139
  const r = e.getAttribute("aria-labelledby");
@@ -2103,10 +2159,10 @@ function Qr(e) {
2103
2159
  }
2104
2160
  return null;
2105
2161
  }
2106
- function Ge(e) {
2162
+ function Ke(e) {
2107
2163
  return e.length;
2108
2164
  }
2109
- function Zr(e, t = {}) {
2165
+ function ti(e, t = {}) {
2110
2166
  const r = t.doc ?? (typeof document < "u" ? document : null);
2111
2167
  if (!r)
2112
2168
  return {
@@ -2124,11 +2180,11 @@ function Zr(e, t = {}) {
2124
2180
  r.querySelectorAll("[data-ll-region]")
2125
2181
  ), l = [];
2126
2182
  for (const g of s) {
2127
- if (l.length >= Vr) break;
2128
- if (ut(g) || !dt(g)) continue;
2183
+ if (l.length >= Gr) break;
2184
+ if (dt(g) || !ut(g)) continue;
2129
2185
  const P = g.getAttribute("data-ll-region") ?? "", O = g.getAttribute("data-ll-intent") ?? void 0, q = re(
2130
2186
  (g.innerText || g.textContent || "").trim(),
2131
- hn * 2
2187
+ mn * 2
2132
2188
  );
2133
2189
  !P || !q || l.push({ id: P, intent: O, text: q });
2134
2190
  }
@@ -2136,100 +2192,100 @@ function Zr(e, t = {}) {
2136
2192
  r.querySelectorAll("h1, h2, h3, h4, h5, h6")
2137
2193
  );
2138
2194
  for (const g of v) {
2139
- if (ut(g) || !dt(g)) continue;
2195
+ if (dt(g) || !ut(g)) continue;
2140
2196
  const P = (g.textContent || "").trim();
2141
2197
  P && c.push(`${g.tagName}: ${re(P, 200)}`);
2142
2198
  }
2143
2199
  const f = Array.from(r.querySelectorAll("p, li"));
2144
2200
  for (const g of f) {
2145
- if (ut(g) || !dt(g) || p.includes(g.tagName)) continue;
2201
+ if (dt(g) || !ut(g) || p.includes(g.tagName)) continue;
2146
2202
  const P = (g.textContent || "").trim();
2147
- P.length > 10 && c.push(re(P, hn));
2203
+ P.length > 10 && c.push(re(P, mn));
2148
2204
  }
2149
- const d = c.join(`
2150
- `), R = [], L = Array.from(r.querySelectorAll("a[href]"));
2151
- for (const g of L) {
2152
- if (R.length >= Ur) break;
2153
- if (ut(g) || !dt(g)) continue;
2205
+ const u = c.join(`
2206
+ `), R = [], k = Array.from(r.querySelectorAll("a[href]"));
2207
+ for (const g of k) {
2208
+ if (R.length >= Vr) break;
2209
+ if (dt(g) || !ut(g)) continue;
2154
2210
  const P = g.getAttribute("href") || "", O = (g.textContent || "").trim();
2155
2211
  !P || !O || R.push({ href: P, text: re(O, 100) });
2156
2212
  }
2157
- const _ = [], h = Array.from(
2213
+ const _ = [], m = Array.from(
2158
2214
  r.querySelectorAll(
2159
2215
  "input, textarea, select"
2160
2216
  )
2161
2217
  );
2162
- for (const g of h) {
2163
- if (_.length >= jr) break;
2164
- if (ut(g) || !Mt(g) || !dt(g)) continue;
2165
- const P = mn(g), O = g instanceof HTMLInputElement ? g.type : g.tagName.toLowerCase();
2218
+ for (const g of m) {
2219
+ if (_.length >= Yr) break;
2220
+ if (dt(g) || !Dt(g) || !ut(g)) continue;
2221
+ const P = gn(g), O = g instanceof HTMLInputElement ? g.type : g.tagName.toLowerCase();
2166
2222
  P && _.push({ label: re(P, 100), type: O });
2167
2223
  }
2168
- const b = Array.from(r.querySelectorAll("form")), N = [];
2169
- let M = 0;
2170
- for (const g of b) {
2171
- if (N.length >= Yr) break;
2172
- if ($t(g) || g.matches(".ll-widget *, .ll-widget")) continue;
2173
- const P = g.getAttribute("id") || g.getAttribute("name") || Xr(g.getAttribute("data-ll-intent")) || `form_${M++}`, O = g.getAttribute("data-ll-intent") || Qr(g) || void 0, q = Array.from(
2224
+ const w = Array.from(r.querySelectorAll("form")), N = [];
2225
+ let T = 0;
2226
+ for (const g of w) {
2227
+ if (N.length >= Kr) break;
2228
+ if (zt(g) || g.matches(".ll-widget *, .ll-widget")) continue;
2229
+ const P = g.getAttribute("id") || g.getAttribute("name") || Qr(g.getAttribute("data-ll-intent")) || `form_${T++}`, O = g.getAttribute("data-ll-intent") || ei(g) || void 0, q = Array.from(
2174
2230
  g.querySelectorAll(
2175
2231
  "input, textarea, select"
2176
2232
  )
2177
2233
  ), ne = [];
2178
2234
  let B = 0;
2179
2235
  const j = /* @__PURE__ */ new Set();
2180
- for (const E of q) {
2181
- if (ne.length >= Gr) break;
2182
- if (!Mt(E)) continue;
2183
- if (E instanceof HTMLInputElement) {
2184
- const W = E.type;
2236
+ for (const C of q) {
2237
+ if (ne.length >= Jr) break;
2238
+ if (!Dt(C)) continue;
2239
+ if (C instanceof HTMLInputElement) {
2240
+ const W = C.type;
2185
2241
  if (W === "submit" || W === "button" || W === "reset" || W === "hidden" || W === "image" || W === "file") continue;
2186
2242
  }
2187
- const Z = E.getAttribute("name") || "", _e = E.getAttribute("id") || "";
2188
- let ce = Z || _e || `field_${B}`;
2243
+ const Z = C.getAttribute("name") || "", we = C.getAttribute("id") || "";
2244
+ let ce = Z || we || `field_${B}`;
2189
2245
  j.has(ce) && (ce = `${ce}__${B}`), j.add(ce), B++;
2190
- const ze = mn(E) || ce, He = E instanceof HTMLInputElement ? E.type : E.tagName.toLowerCase(), Q = {
2246
+ const ze = gn(C) || ce, He = C instanceof HTMLInputElement ? C.type : C.tagName.toLowerCase(), X = {
2191
2247
  name: ce,
2192
2248
  label: re(ze, 100),
2193
2249
  type: He
2194
2250
  };
2195
- E.required === !0 && (Q.required = !0);
2196
- const Se = E.getAttribute("placeholder");
2197
- if (Se && (Q.placeholder = re(Se.trim(), 100)), E instanceof HTMLInputElement || E instanceof HTMLTextAreaElement) {
2198
- const W = E.getAttribute("minlength");
2251
+ C.required === !0 && (X.required = !0);
2252
+ const Se = C.getAttribute("placeholder");
2253
+ if (Se && (X.placeholder = re(Se.trim(), 100)), C instanceof HTMLInputElement || C instanceof HTMLTextAreaElement) {
2254
+ const W = C.getAttribute("minlength");
2199
2255
  if (W !== null) {
2200
2256
  const Y = parseInt(W, 10);
2201
- !Number.isNaN(Y) && Y >= 0 && (Q.minLength = Y);
2257
+ !Number.isNaN(Y) && Y >= 0 && (X.minLength = Y);
2202
2258
  }
2203
- const ie = E.getAttribute("maxlength");
2259
+ const ie = C.getAttribute("maxlength");
2204
2260
  if (ie !== null) {
2205
2261
  const Y = parseInt(ie, 10);
2206
- !Number.isNaN(Y) && Y >= 0 && (Q.maxLength = Y);
2262
+ !Number.isNaN(Y) && Y >= 0 && (X.maxLength = Y);
2207
2263
  }
2208
2264
  }
2209
- if (E instanceof HTMLInputElement) {
2210
- const W = E.getAttribute("min");
2211
- W !== null && (Q.min = re(W, 50));
2212
- const ie = E.getAttribute("max");
2213
- ie !== null && (Q.max = re(ie, 50));
2214
- const Y = E.getAttribute("step");
2215
- Y !== null && (Q.step = re(Y, 20));
2216
- const fe = E.getAttribute("pattern");
2217
- fe !== null && (Q.pattern = re(fe, 200));
2218
- const K = (E.getAttribute("autocomplete") || "").toLowerCase();
2219
- K && K !== "off" && !K.startsWith("cc-") && (Q.autocomplete = re(K, 50));
2265
+ if (C instanceof HTMLInputElement) {
2266
+ const W = C.getAttribute("min");
2267
+ W !== null && (X.min = re(W, 50));
2268
+ const ie = C.getAttribute("max");
2269
+ ie !== null && (X.max = re(ie, 50));
2270
+ const Y = C.getAttribute("step");
2271
+ Y !== null && (X.step = re(Y, 20));
2272
+ const fe = C.getAttribute("pattern");
2273
+ fe !== null && (X.pattern = re(fe, 200));
2274
+ const K = (C.getAttribute("autocomplete") || "").toLowerCase();
2275
+ K && K !== "off" && !K.startsWith("cc-") && (X.autocomplete = re(K, 50));
2220
2276
  }
2221
- if (E instanceof HTMLSelectElement) {
2277
+ if (C instanceof HTMLSelectElement) {
2222
2278
  const W = [];
2223
- for (let ie = 0; ie < E.options.length && !(W.length >= Kr); ie++) {
2224
- const Y = E.options[ie];
2279
+ for (let ie = 0; ie < C.options.length && !(W.length >= Xr); ie++) {
2280
+ const Y = C.options[ie];
2225
2281
  if (!Y || Y.disabled) continue;
2226
2282
  const fe = Y.value || "", K = (Y.textContent || "").trim() || fe;
2227
2283
  !fe && !K || W.push({ value: fe, label: re(K, 60) });
2228
2284
  }
2229
- W.length > 0 && (Q.options = W);
2285
+ W.length > 0 && (X.options = W);
2230
2286
  }
2231
- const xe = typeof E.validationMessage == "string" ? E.validationMessage : "";
2232
- xe && (Q.validationMessage = re(xe, 200)), ne.push(Q);
2287
+ const _e = typeof C.validationMessage == "string" ? C.validationMessage : "";
2288
+ _e && (X.validationMessage = re(_e, 200)), ne.push(X);
2233
2289
  }
2234
2290
  N.push({ id: P, intent: O, fields: ne });
2235
2291
  }
@@ -2238,32 +2294,32 @@ function Zr(e, t = {}) {
2238
2294
  title: o,
2239
2295
  pathname: a,
2240
2296
  regions: l,
2241
- visibleText: d,
2297
+ visibleText: u,
2242
2298
  visibleLinks: R,
2243
2299
  visibleFields: _,
2244
2300
  forms: N,
2245
2301
  extras: e
2246
2302
  };
2247
- let U = Ge(JSON.stringify(I.regions)) + Ge(I.visibleText) + Ge(JSON.stringify(I.visibleLinks)) + Ge(JSON.stringify(I.visibleFields));
2248
- for (; U > wt && I.visibleFields.length > 0; )
2249
- I.visibleFields.pop(), U = Ge(JSON.stringify(I.visibleFields));
2250
- for (; U > wt && I.visibleLinks.length > 0; )
2303
+ let U = Ke(JSON.stringify(I.regions)) + Ke(I.visibleText) + Ke(JSON.stringify(I.visibleLinks)) + Ke(JSON.stringify(I.visibleFields));
2304
+ for (; U > _t && I.visibleFields.length > 0; )
2305
+ I.visibleFields.pop(), U = Ke(JSON.stringify(I.visibleFields));
2306
+ for (; U > _t && I.visibleLinks.length > 0; )
2251
2307
  I.visibleLinks.pop(), U -= 80;
2252
- return Ge(I.visibleText) > wt && (I.visibleText = re(I.visibleText, wt - 100)), I;
2308
+ return Ke(I.visibleText) > _t && (I.visibleText = re(I.visibleText, _t - 100)), I;
2253
2309
  }
2254
- let Ke = null;
2255
- function gn(e, t = {}) {
2310
+ let Je = null;
2311
+ function yn(e, t = {}) {
2256
2312
  const r = Date.now(), a = `${typeof window < "u" && window.location.pathname || "/"}::${typeof window < "u" ? window.scrollY : 0}`;
2257
- if (Ke && Ke.key === a && r - Ke.at < 1e3)
2258
- return Ke.ctx;
2259
- const o = Zr(e, t);
2260
- return Ke = { key: a, at: r, ctx: o }, o;
2313
+ if (Je && Je.key === a && r - Je.at < 1e3)
2314
+ return Je.ctx;
2315
+ const o = ti(e, t);
2316
+ return Je = { key: a, at: r, ctx: o }, o;
2261
2317
  }
2262
- function ei() {
2263
- Ke = null;
2318
+ function ni() {
2319
+ Je = null;
2264
2320
  }
2265
- const ti = 200;
2266
- function ni(e) {
2321
+ const ri = 200;
2322
+ function ii(e) {
2267
2323
  const t = String(e.href || "");
2268
2324
  return {
2269
2325
  href: t,
@@ -2273,18 +2329,18 @@ function ni(e) {
2273
2329
  description: e.description
2274
2330
  };
2275
2331
  }
2276
- function ri(e) {
2332
+ function oi(e) {
2277
2333
  return !(!e || e.startsWith("#") || e.startsWith("javascript:") || e.startsWith("mailto:") || e.startsWith("tel:"));
2278
2334
  }
2279
- function ii(e) {
2335
+ function li(e) {
2280
2336
  const t = e ?? (typeof document < "u" ? document : null);
2281
2337
  if (!t) return [];
2282
2338
  const r = typeof window < "u" && window.location.origin || "", i = /* @__PURE__ */ new Set(), a = [], o = Array.from(t.querySelectorAll("a[href]"));
2283
2339
  for (const s of o) {
2284
- if (a.length >= ti) break;
2285
- if ($t(s)) continue;
2340
+ if (a.length >= ri) break;
2341
+ if (zt(s)) continue;
2286
2342
  const l = s.getAttribute("href") || "";
2287
- if (!ri(l)) continue;
2343
+ if (!oi(l)) continue;
2288
2344
  let c = l, p = !0;
2289
2345
  try {
2290
2346
  if (typeof window < "u") {
@@ -2301,19 +2357,19 @@ function ii(e) {
2301
2357
  }
2302
2358
  return a;
2303
2359
  }
2304
- let Je = null;
2305
- const oi = 5e3;
2306
- function Rt() {
2360
+ let Xe = null;
2361
+ const ai = 5e3;
2362
+ function Mt() {
2307
2363
  const e = Date.now(), t = typeof window < "u" && window.location.pathname || "/";
2308
- if (Je && Je.pathname === t && e - Je.at < oi)
2309
- return Je.routes;
2310
- const r = ii();
2311
- return Je = { at: e, pathname: t, routes: r }, r;
2364
+ if (Xe && Xe.pathname === t && e - Xe.at < ai)
2365
+ return Xe.routes;
2366
+ const r = li();
2367
+ return Xe = { at: e, pathname: t, routes: r }, r;
2312
2368
  }
2313
- function li() {
2314
- Je = null;
2369
+ function si() {
2370
+ Xe = null;
2315
2371
  }
2316
- function yn(e) {
2372
+ function vn(e) {
2317
2373
  if (e instanceof HTMLInputElement) {
2318
2374
  const t = e.type;
2319
2375
  if (t === "submit" || t === "button" || t === "reset" || t === "hidden" || t === "image" || t === "file")
@@ -2321,16 +2377,16 @@ function yn(e) {
2321
2377
  }
2322
2378
  return !0;
2323
2379
  }
2324
- function ai(e, t) {
2380
+ function ci(e, t) {
2325
2381
  return e.getAttribute("name") || e.getAttribute("id") || `field_${t}`;
2326
2382
  }
2327
- function si(e, t) {
2383
+ function di(e, t) {
2328
2384
  if (!t) return null;
2329
2385
  try {
2330
2386
  const o = e.querySelector(
2331
2387
  `[name="${t.replace(/"/g, '\\"')}"]`
2332
2388
  );
2333
- if (o && yn(o)) return o;
2389
+ if (o && vn(o)) return o;
2334
2390
  } catch {
2335
2391
  }
2336
2392
  const r = Array.from(
@@ -2339,23 +2395,23 @@ function si(e, t) {
2339
2395
  let i = 0;
2340
2396
  const a = /* @__PURE__ */ new Map();
2341
2397
  for (const o of r) {
2342
- if (!yn(o)) continue;
2343
- const s = ai(o, i);
2398
+ if (!vn(o)) continue;
2399
+ const s = ci(o, i);
2344
2400
  let l = s;
2345
2401
  if (a.has(s) && (l = `${s}__${i}`), l === t) return o;
2346
2402
  a.set(s, o), i++;
2347
2403
  }
2348
2404
  return null;
2349
2405
  }
2350
- function vn(e, t) {
2351
- const r = si(e, t);
2352
- return r ? Mt(r) ? { el: r } : { el: null, reason: "private" } : { el: null, reason: "not_found" };
2406
+ function bn(e, t) {
2407
+ const r = di(e, t);
2408
+ return r ? Dt(r) ? { el: r } : { el: null, reason: "private" } : { el: null, reason: "not_found" };
2353
2409
  }
2354
- function ci(e, t) {
2410
+ function ui(e, t) {
2355
2411
  const r = e instanceof HTMLInputElement ? HTMLInputElement.prototype : e instanceof HTMLTextAreaElement ? HTMLTextAreaElement.prototype : HTMLSelectElement.prototype, i = Object.getOwnPropertyDescriptor(r, "value"), a = i == null ? void 0 : i.set;
2356
2412
  a ? a.call(e, t) : e.value = t;
2357
2413
  }
2358
- function ui(e, t, r = {}) {
2414
+ function fi(e, t, r = {}) {
2359
2415
  const i = r.triggerInput ?? !0, a = r.triggerChange ?? !0;
2360
2416
  if (e instanceof HTMLInputElement && (e.type === "checkbox" || e.type === "radio")) {
2361
2417
  const o = Object.getOwnPropertyDescriptor(
@@ -2365,9 +2421,9 @@ function ui(e, t, r = {}) {
2365
2421
  s ? s.call(e, l) : e.checked = l, i && e.dispatchEvent(new Event("input", { bubbles: !0 })), a && e.dispatchEvent(new Event("change", { bubbles: !0 }));
2366
2422
  return;
2367
2423
  }
2368
- ci(e, t), i && e.dispatchEvent(new Event("input", { bubbles: !0 })), a && e.dispatchEvent(new Event("change", { bubbles: !0 }));
2424
+ ui(e, t), i && e.dispatchEvent(new Event("input", { bubbles: !0 })), a && e.dispatchEvent(new Event("change", { bubbles: !0 }));
2369
2425
  }
2370
- function bn(e, t) {
2426
+ function wn(e, t) {
2371
2427
  if (!t) return null;
2372
2428
  const r = t.replace(/"/g, '\\"');
2373
2429
  try {
@@ -2388,7 +2444,7 @@ function bn(e, t) {
2388
2444
  const o = Array.from(e.querySelectorAll("form"));
2389
2445
  for (const s of o) {
2390
2446
  const l = s.getAttribute("data-ll-intent");
2391
- if (l && di(l) === t) return s;
2447
+ if (l && pi(l) === t) return s;
2392
2448
  }
2393
2449
  if (/^form_\d+$/.test(t)) {
2394
2450
  const s = parseInt(t.slice(5), 10);
@@ -2401,10 +2457,10 @@ function bn(e, t) {
2401
2457
  }
2402
2458
  return null;
2403
2459
  }
2404
- function di(e) {
2460
+ function pi(e) {
2405
2461
  return e.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "").slice(0, 60) || null;
2406
2462
  }
2407
- function fi() {
2463
+ function hi() {
2408
2464
  if (typeof window > "u" || typeof document > "u")
2409
2465
  return !1;
2410
2466
  const e = document.scrollingElement || document.documentElement;
@@ -2412,19 +2468,19 @@ function fi() {
2412
2468
  const t = window.getComputedStyle(e);
2413
2469
  return !(t.overflowY === "hidden" || t.overflowY === "clip");
2414
2470
  }
2415
- function pi(e) {
2471
+ function mi(e) {
2416
2472
  if (!(e instanceof HTMLElement)) return !1;
2417
2473
  const r = window.getComputedStyle(e).overflowY;
2418
2474
  return !(r !== "auto" && r !== "scroll" || e.scrollHeight <= e.clientHeight + 2);
2419
2475
  }
2420
- function hi() {
2476
+ function gi() {
2421
2477
  if (typeof document > "u") return null;
2422
2478
  const e = Array.from(
2423
2479
  document.querySelectorAll("body, body *")
2424
2480
  );
2425
2481
  let t = null, r = 0;
2426
2482
  for (const i of e) {
2427
- if (!pi(i)) continue;
2483
+ if (!mi(i)) continue;
2428
2484
  const a = i.getBoundingClientRect();
2429
2485
  if (a.bottom <= 0 || a.top >= window.innerHeight || a.right <= 0 || a.left >= window.innerWidth || a.width <= 0 || a.height <= 0 || i.closest(".ll-widget")) continue;
2430
2486
  const o = a.width * a.height;
@@ -2432,24 +2488,24 @@ function hi() {
2432
2488
  }
2433
2489
  return t;
2434
2490
  }
2435
- function mi() {
2491
+ function yi() {
2436
2492
  if (typeof window > "u")
2437
2493
  return null;
2438
- if (fi()) return window;
2439
- const e = hi();
2494
+ if (hi()) return window;
2495
+ const e = gi();
2440
2496
  return e || window;
2441
2497
  }
2442
- function wn(e) {
2498
+ function _n(e) {
2443
2499
  return e instanceof Window ? e.innerHeight || 0 : e.clientHeight || 0;
2444
2500
  }
2445
- function gi(e) {
2501
+ function vi(e) {
2446
2502
  var t, r;
2447
2503
  return e instanceof Window ? typeof document > "u" ? 0 : Math.max(
2448
2504
  ((t = document.body) == null ? void 0 : t.scrollHeight) ?? 0,
2449
2505
  ((r = document.documentElement) == null ? void 0 : r.scrollHeight) ?? 0
2450
2506
  ) : e.scrollHeight - e.clientHeight;
2451
2507
  }
2452
- const yi = /* @__PURE__ */ new Set([
2508
+ const bi = /* @__PURE__ */ new Set([
2453
2509
  "agent_state",
2454
2510
  "avatar_stream_ready",
2455
2511
  "avatar_active",
@@ -2479,9 +2535,9 @@ const yi = /* @__PURE__ */ new Set([
2479
2535
  // to onAgentCommand.
2480
2536
  "task_field_updated",
2481
2537
  "task_completed"
2482
- ]), In = Dt(
2538
+ ]), Rn = Pt(
2483
2539
  function(t, r) {
2484
- var Yt, Gt, Kt, Jt, Xt, Qt, Zt;
2540
+ var Gt, Kt, Jt, Xt, Zt, Qt, en;
2485
2541
  const {
2486
2542
  agentId: i,
2487
2543
  apiKey: a,
@@ -2492,14 +2548,14 @@ const yi = /* @__PURE__ */ new Set([
2492
2548
  experienceMode: p = "WIDGET",
2493
2549
  autoConnect: v = !1,
2494
2550
  displayMode: f,
2495
- defaultDisplayMode: d = "expanded",
2551
+ defaultDisplayMode: u = "expanded",
2496
2552
  onDisplayModeChange: R,
2497
- position: L = "bottom-right",
2553
+ position: k = "bottom-right",
2498
2554
  mobileBreakpoint: _ = 640,
2499
- persistKey: h = "ll-widget",
2500
- disablePersistence: b = !1,
2555
+ persistKey: m = "ll-widget",
2556
+ disablePersistence: w = !1,
2501
2557
  teamMembers: N,
2502
- currentTeamMemberId: M,
2558
+ currentTeamMemberId: T,
2503
2559
  onTeamMemberChange: I,
2504
2560
  idleLoopUrl: U,
2505
2561
  greeting: g,
@@ -2509,84 +2565,84 @@ const yi = /* @__PURE__ */ new Set([
2509
2565
  allowCamera: ne = !0,
2510
2566
  allowScreenShare: B = !0,
2511
2567
  allowTyping: j = !0,
2512
- showMinimize: E,
2568
+ showMinimize: C,
2513
2569
  showClose: Z,
2514
- chromeless: _e = !1,
2570
+ chromeless: we = !1,
2515
2571
  floatingChromeContainer: ce = null,
2516
2572
  compactControls: ze = !1,
2517
2573
  transforming: He = !1,
2518
- transformingLabel: Q = "Transforming…",
2574
+ transformingLabel: X = "Transforming…",
2519
2575
  showOn: Se,
2520
- hideOn: xe,
2576
+ hideOn: _e,
2521
2577
  pathname: W,
2522
2578
  onNavigate: ie,
2523
2579
  onScrollToSelector: Y,
2524
2580
  getPageContext: fe,
2525
2581
  pageContextExtras: K,
2526
2582
  getRoutes: Qe,
2527
- onScrollPage: Ze,
2583
+ onScrollPage: et,
2528
2584
  onClick: ft,
2529
- capabilities: et,
2585
+ capabilities: tt,
2530
2586
  onConnect: Ne,
2531
2587
  onDisconnect: Oe,
2532
2588
  onTranscript: Ae,
2533
2589
  onAgentState: Be,
2534
2590
  onConnectionStateChange: Ie,
2535
2591
  onAgentEvent: Re,
2536
- onAgentCommand: Te,
2537
- onCollect: Me,
2592
+ onAgentCommand: Me,
2593
+ onCollect: Te,
2538
2594
  controlledSession: $,
2539
- className: xt,
2595
+ className: Lt,
2540
2596
  style: De,
2541
2597
  zIndex: We = 2147483647
2542
- } = t, pe = yr(W), tt = Lr(pe, Se, xe);
2543
- T(() => {
2544
- ei(), li();
2598
+ } = t, pe = yr(W), nt = kr(pe, Se, _e);
2599
+ M(() => {
2600
+ ni(), si();
2545
2601
  }, [pe]);
2546
- const Pe = M !== void 0, [Fe, kt] = S(() => {
2602
+ const Pe = T !== void 0, [Fe, kt] = S(() => {
2547
2603
  var y;
2548
- return M ?? ((y = N == null ? void 0 : N[0]) == null ? void 0 : y.id);
2549
- }), Le = Pe ? M : Fe, oe = Xe(
2550
- () => (N == null ? void 0 : N.find((y) => y.id === Le)) ?? null,
2551
- [N, Le]
2552
- ), nt = (oe == null ? void 0 : oe.agentId) ?? i, me = p === "EMBEDDED", [qe, Ue] = pr({
2604
+ return T ?? ((y = N == null ? void 0 : N[0]) == null ? void 0 : y.id);
2605
+ }), ke = Pe ? T : Fe, oe = Ze(
2606
+ () => (N == null ? void 0 : N.find((y) => y.id === ke)) ?? null,
2607
+ [N, ke]
2608
+ ), rt = (oe == null ? void 0 : oe.agentId) ?? i, me = p === "EMBEDDED", [qe, Ue] = pr({
2553
2609
  value: f,
2554
- defaultValue: d,
2610
+ defaultValue: u,
2555
2611
  onChange: R,
2556
- persistKey: h,
2557
- disablePersistence: me || b
2558
- }), le = me ? "expanded" : qe, ue = me ? () => {
2559
- } : Ue, pt = E ?? !me, ht = Z ?? !me, Ee = mr(_), rt = tr(), se = nr(), de = ir(), Ce = or(), it = lr(), [Lt, ge] = S(!1), [ye, ot] = S(!1), [je, lt] = S(!1), [mt, m] = S(!1), [J, Rn] = S(!1), gt = Cr({ baseUrl: o, config: c }), yt = A(gt);
2560
- yt.current = gt;
2561
- const Et = A(ie), Ct = A(Y), St = A(Ze), Nt = A(ft), zt = A(fe), Ht = A(K), Ot = A(Qe), At = A(et), ve = A(null);
2562
- Et.current = ie, Ct.current = Y, St.current = Ze, Nt.current = ft, zt.current = fe, Ht.current = K, Ot.current = Qe, At.current = et;
2563
- function be(y) {
2564
- const u = At.current;
2565
- return u ? u.includes(y) : !0;
2612
+ persistKey: m,
2613
+ disablePersistence: me || w
2614
+ }), le = me ? "expanded" : qe, de = me ? () => {
2615
+ } : Ue, pt = C ?? !me, ht = Z ?? !me, Ce = mr(_), it = tr(), se = nr(), ue = ir(), Ee = or(), ot = lr(), [mt, lt] = S(!1), [ge, xe] = S(!1), [je, Ve] = S(!1), [Ct, gt] = S(!1), [h, Q] = S(!1), yt = Er({ baseUrl: o, config: c }), vt = A(yt);
2616
+ vt.current = yt;
2617
+ const Et = A(ie), St = A(Y), Nt = A(et), At = A(ft), Ht = A(fe), Ot = A(K), Bt = A(Qe), It = A(tt), ye = A(null);
2618
+ Et.current = ie, St.current = Y, Nt.current = et, At.current = ft, Ht.current = fe, Ot.current = K, Bt.current = Qe, It.current = tt;
2619
+ function ve(y) {
2620
+ const d = It.current;
2621
+ return d ? d.includes(y) : !0;
2566
2622
  }
2567
- function we(y, u) {
2623
+ function be(y, d) {
2568
2624
  console.warn(
2569
- `[LiveLayer] Agent command "${y}" blocked — capability "${u}" not in allowlist. See https://livelayer.studio/docs/react/capabilities`
2625
+ `[LiveLayer] Agent command "${y}" blocked — capability "${d}" not in allowlist. See https://livelayer.studio/docs/react/capabilities`
2570
2626
  );
2571
2627
  }
2572
- const at = C(
2628
+ const at = E(
2573
2629
  (y) => {
2574
- var X, he, ke, ct;
2575
- const u = y;
2576
- if (!(!u.type || typeof u.type != "string")) {
2577
- if (Re == null || Re({ eventName: u.type, data: y }), u.type === "navigate") {
2578
- if (!be("navigate")) {
2579
- we("navigate", "navigate");
2630
+ var J, he, Le, ct;
2631
+ const d = y;
2632
+ if (!(!d.type || typeof d.type != "string")) {
2633
+ if (Re == null || Re({ eventName: d.type, data: y }), d.type === "navigate") {
2634
+ if (!ve("navigate")) {
2635
+ be("navigate", "navigate");
2580
2636
  return;
2581
2637
  }
2582
- const x = typeof u.href == "string" ? u.href : null;
2638
+ const x = typeof d.href == "string" ? d.href : null;
2583
2639
  if (!x) {
2584
2640
  console.warn(
2585
2641
  `[LiveLayer] Agent emitted "navigate" without href. Skipping. Check your agent's tool schema. See https://livelayer.studio/docs/errors/navigate-missing-href`
2586
2642
  );
2587
2643
  return;
2588
2644
  }
2589
- if (yt.current.playPageChange(), Et.current) {
2645
+ if (vt.current.playPageChange(), Et.current) {
2590
2646
  try {
2591
2647
  Et.current(x);
2592
2648
  } catch (D) {
@@ -2617,17 +2673,17 @@ const yi = /* @__PURE__ */ new Set([
2617
2673
  }
2618
2674
  return;
2619
2675
  }
2620
- if (u.type === "scroll_to") {
2621
- if (!be("scroll")) {
2622
- we("scroll_to", "scroll");
2676
+ if (d.type === "scroll_to") {
2677
+ if (!ve("scroll")) {
2678
+ be("scroll_to", "scroll");
2623
2679
  return;
2624
2680
  }
2625
- const x = typeof u.selector == "string" ? u.selector : null;
2681
+ const x = typeof d.selector == "string" ? d.selector : null;
2626
2682
  if (!x) return;
2627
- const D = u.behavior === "instant" ? "instant" : "smooth";
2628
- if (Ct.current) {
2683
+ const D = d.behavior === "instant" ? "instant" : "smooth";
2684
+ if (St.current) {
2629
2685
  try {
2630
- Ct.current(
2686
+ St.current(
2631
2687
  x,
2632
2688
  D
2633
2689
  );
@@ -2659,21 +2715,21 @@ const yi = /* @__PURE__ */ new Set([
2659
2715
  }
2660
2716
  return;
2661
2717
  }
2662
- if (u.type === "request_page_context") {
2663
- if (!be("read_page")) {
2664
- we("request_page_context", "read_page");
2718
+ if (d.type === "request_page_context") {
2719
+ if (!ve("read_page")) {
2720
+ be("request_page_context", "read_page");
2665
2721
  return;
2666
2722
  }
2667
- const x = typeof u.requestId == "string" ? u.requestId : void 0, D = (X = ve.current) == null ? void 0 : X.call(ve), F = (G) => {
2723
+ const x = typeof d.requestId == "string" ? d.requestId : void 0, D = (J = ye.current) == null ? void 0 : J.call(ye), F = (G) => {
2668
2724
  const z = D, te = z == null ? void 0 : z.localParticipant;
2669
2725
  if (te != null && te.publishData)
2670
2726
  try {
2671
- const ae = x ? { ...G, requestId: x } : G, Ye = new TextEncoder().encode(JSON.stringify(ae));
2672
- te.publishData(Ye, { reliable: !0 });
2727
+ const ae = x ? { ...G, requestId: x } : G, Ge = new TextEncoder().encode(JSON.stringify(ae));
2728
+ te.publishData(Ge, { reliable: !0 });
2673
2729
  } catch (ae) {
2674
2730
  console.warn("[LiveLayer] publishData failed.", ae);
2675
2731
  }
2676
- }, H = Ht.current, V = zt.current;
2732
+ }, H = Ot.current, V = Ht.current;
2677
2733
  try {
2678
2734
  if (V) {
2679
2735
  const G = V(H);
@@ -2684,7 +2740,7 @@ const yi = /* @__PURE__ */ new Set([
2684
2740
  z
2685
2741
  ), F({
2686
2742
  type: "page_context",
2687
- context: gn(H)
2743
+ context: yn(H)
2688
2744
  });
2689
2745
  });
2690
2746
  return;
@@ -2694,7 +2750,7 @@ const yi = /* @__PURE__ */ new Set([
2694
2750
  }
2695
2751
  F({
2696
2752
  type: "page_context",
2697
- context: gn(H)
2753
+ context: yn(H)
2698
2754
  });
2699
2755
  } catch (G) {
2700
2756
  console.warn(
@@ -2707,22 +2763,22 @@ const yi = /* @__PURE__ */ new Set([
2707
2763
  }
2708
2764
  return;
2709
2765
  }
2710
- if (u.type === "scroll_page") {
2711
- if (!be("scroll")) {
2712
- we("scroll_page", "scroll");
2766
+ if (d.type === "scroll_page") {
2767
+ if (!ve("scroll")) {
2768
+ be("scroll_page", "scroll");
2713
2769
  return;
2714
2770
  }
2715
- const x = u.direction;
2771
+ const x = d.direction;
2716
2772
  if (x !== "up" && x !== "down" && x !== "top" && x !== "bottom") {
2717
2773
  console.warn(
2718
2774
  `[LiveLayer] scroll_page: invalid direction "${String(x)}". Expected up | down | top | bottom.`
2719
2775
  );
2720
2776
  return;
2721
2777
  }
2722
- const D = u.behavior === "instant" ? "instant" : "smooth";
2723
- if (St.current) {
2778
+ const D = d.behavior === "instant" ? "instant" : "smooth";
2779
+ if (Nt.current) {
2724
2780
  try {
2725
- St.current(
2781
+ Nt.current(
2726
2782
  x,
2727
2783
  D
2728
2784
  );
@@ -2732,27 +2788,27 @@ const yi = /* @__PURE__ */ new Set([
2732
2788
  return;
2733
2789
  }
2734
2790
  if (typeof window > "u") return;
2735
- const F = { behavior: D }, H = mi(), V = (z) => {
2791
+ const F = { behavior: D }, H = yi(), V = (z) => {
2736
2792
  H instanceof Window ? H.scrollBy({ top: z, ...F }) : H.scrollBy({ top: z, ...F });
2737
2793
  }, G = (z) => {
2738
2794
  H instanceof Window ? H.scrollTo({ top: z, ...F }) : H.scrollTo({ top: z, ...F });
2739
2795
  };
2740
- x === "up" ? V(-wn(H)) : x === "down" ? V(wn(H)) : G(x === "top" ? 0 : gi(H));
2796
+ x === "up" ? V(-_n(H)) : x === "down" ? V(_n(H)) : G(x === "top" ? 0 : vi(H));
2741
2797
  return;
2742
2798
  }
2743
- if (u.type === "click") {
2744
- if (!be("click")) {
2745
- we("click", "click");
2799
+ if (d.type === "click") {
2800
+ if (!ve("click")) {
2801
+ be("click", "click");
2746
2802
  return;
2747
2803
  }
2748
- const x = typeof u.selector == "string" ? u.selector : null;
2804
+ const x = typeof d.selector == "string" ? d.selector : null;
2749
2805
  if (!x) {
2750
2806
  console.warn("[LiveLayer] click: missing selector.");
2751
2807
  return;
2752
2808
  }
2753
- if (Nt.current) {
2809
+ if (At.current) {
2754
2810
  try {
2755
- Nt.current(x);
2811
+ At.current(x);
2756
2812
  } catch (F) {
2757
2813
  console.warn("[LiveLayer] onClick threw.", F);
2758
2814
  }
@@ -2783,38 +2839,38 @@ const yi = /* @__PURE__ */ new Set([
2783
2839
  (he = D.click) == null || he.call(D);
2784
2840
  return;
2785
2841
  }
2786
- if (u.type === "fill_form" || u.type === "focus_field") {
2787
- if (!be("fill_forms")) {
2788
- we(u.type, "fill_forms");
2842
+ if (d.type === "fill_form" || d.type === "focus_field") {
2843
+ if (!ve("fill_forms")) {
2844
+ be(d.type, "fill_forms");
2789
2845
  return;
2790
2846
  }
2791
2847
  if (typeof document > "u") return;
2792
- u.type === "fill_form" && yt.current.playConfirmation();
2793
- const x = typeof u.formId == "string" ? u.formId : null;
2848
+ d.type === "fill_form" && vt.current.playConfirmation();
2849
+ const x = typeof d.formId == "string" ? d.formId : null;
2794
2850
  if (!x) {
2795
- console.warn(`[LiveLayer] ${u.type}: missing formId.`);
2851
+ console.warn(`[LiveLayer] ${d.type}: missing formId.`);
2796
2852
  return;
2797
2853
  }
2798
- const D = bn(document, x);
2854
+ const D = wn(document, x);
2799
2855
  if (!D) {
2800
2856
  console.warn(
2801
- `[LiveLayer] ${u.type}: no <form> matched id="${x}" (or matching name / data-ll-intent slug). Forms are auto-discovered — make sure the form has an \`id\`, \`name\`, or \`data-ll-intent\` attribute the agent observed in PageContext.forms.`
2857
+ `[LiveLayer] ${d.type}: no <form> matched id="${x}" (or matching name / data-ll-intent slug). Forms are auto-discovered — make sure the form has an \`id\`, \`name\`, or \`data-ll-intent\` attribute the agent observed in PageContext.forms.`
2802
2858
  );
2803
2859
  return;
2804
2860
  }
2805
2861
  if (D.closest('[data-ll-private="true"], [data-ll-skip], .ll-widget')) {
2806
2862
  console.warn(
2807
- `[LiveLayer] ${u.type}: refusing to touch a form in a private / opted-out subtree.`
2863
+ `[LiveLayer] ${d.type}: refusing to touch a form in a private / opted-out subtree.`
2808
2864
  );
2809
2865
  return;
2810
2866
  }
2811
- if (u.type === "focus_field") {
2812
- const H = typeof u.fieldName == "string" ? u.fieldName : null;
2867
+ if (d.type === "focus_field") {
2868
+ const H = typeof d.fieldName == "string" ? d.fieldName : null;
2813
2869
  if (!H) {
2814
2870
  console.warn("[LiveLayer] focus_field: missing fieldName.");
2815
2871
  return;
2816
2872
  }
2817
- const V = vn(D, H);
2873
+ const V = bn(D, H);
2818
2874
  if (V.el === null) {
2819
2875
  V.reason === "private" ? console.warn(
2820
2876
  `[LiveLayer] focus_field: field "${H}" is privacy-protected and not focusable.`
@@ -2826,14 +2882,14 @@ const yi = /* @__PURE__ */ new Set([
2826
2882
  V.el.focus();
2827
2883
  return;
2828
2884
  }
2829
- const F = u.values && typeof u.values == "object" ? u.values : null;
2885
+ const F = d.values && typeof d.values == "object" ? d.values : null;
2830
2886
  if (!F) {
2831
2887
  console.warn("[LiveLayer] fill_form: missing or invalid values.");
2832
2888
  return;
2833
2889
  }
2834
2890
  for (const [H, V] of Object.entries(F)) {
2835
2891
  if (typeof V != "string") continue;
2836
- const G = vn(D, H);
2892
+ const G = bn(D, H);
2837
2893
  if (G.el === null) {
2838
2894
  G.reason === "private" ? console.warn(
2839
2895
  `[LiveLayer] fill_form: field "${H}" is privacy-protected (password / cc-* / data-ll-private). Skipping.`
@@ -2843,7 +2899,7 @@ const yi = /* @__PURE__ */ new Set([
2843
2899
  continue;
2844
2900
  }
2845
2901
  try {
2846
- ui(G.el, V);
2902
+ fi(G.el, V);
2847
2903
  } catch (z) {
2848
2904
  console.warn(
2849
2905
  `[LiveLayer] fill_form: failed to set "${H}".`,
@@ -2853,19 +2909,19 @@ const yi = /* @__PURE__ */ new Set([
2853
2909
  }
2854
2910
  return;
2855
2911
  }
2856
- if (u.type === "submit_form") {
2857
- if (!be("submit_forms")) {
2858
- we("submit_form", "submit_forms");
2912
+ if (d.type === "submit_form") {
2913
+ if (!ve("submit_forms")) {
2914
+ be("submit_form", "submit_forms");
2859
2915
  return;
2860
2916
  }
2861
2917
  if (typeof document > "u") return;
2862
- const x = typeof u.formId == "string" ? u.formId : null;
2918
+ const x = typeof d.formId == "string" ? d.formId : null;
2863
2919
  if (!x) {
2864
2920
  console.warn("[LiveLayer] submit_form: missing formId.");
2865
2921
  return;
2866
2922
  }
2867
- yt.current.playConfirmation();
2868
- const D = bn(document, x);
2923
+ vt.current.playConfirmation();
2924
+ const D = wn(document, x);
2869
2925
  if (!D) {
2870
2926
  console.warn(
2871
2927
  `[LiveLayer] submit_form: no <form> matched id="${x}" (or matching name / data-ll-intent slug).`
@@ -2878,12 +2934,12 @@ const yi = /* @__PURE__ */ new Set([
2878
2934
  );
2879
2935
  return;
2880
2936
  }
2881
- const F = typeof u.requestId == "string" ? u.requestId : void 0, H = (ke = ve.current) == null ? void 0 : ke.call(ve), V = (te) => {
2882
- const ae = H, Ye = ae == null ? void 0 : ae.localParticipant;
2883
- if (Ye != null && Ye.publishData)
2937
+ const F = typeof d.requestId == "string" ? d.requestId : void 0, H = (Le = ye.current) == null ? void 0 : Le.call(ye), V = (te) => {
2938
+ const ae = H, Ge = ae == null ? void 0 : ae.localParticipant;
2939
+ if (Ge != null && Ge.publishData)
2884
2940
  try {
2885
2941
  const Un = F ? { ...te, requestId: F } : te, jn = new TextEncoder().encode(JSON.stringify(Un));
2886
- Ye.publishData(jn, { reliable: !0 });
2942
+ Ge.publishData(jn, { reliable: !0 });
2887
2943
  } catch {
2888
2944
  }
2889
2945
  };
@@ -2911,12 +2967,12 @@ const yi = /* @__PURE__ */ new Set([
2911
2967
  }, 500);
2912
2968
  return;
2913
2969
  }
2914
- if (u.type === "request_routes") {
2915
- if (!be("read_page")) {
2916
- we("request_routes", "read_page");
2970
+ if (d.type === "request_routes") {
2971
+ if (!ve("read_page")) {
2972
+ be("request_routes", "read_page");
2917
2973
  return;
2918
2974
  }
2919
- const x = typeof u.requestId == "string" ? u.requestId : void 0, F = (ct = ve.current) == null ? void 0 : ct.call(ve), H = F == null ? void 0 : F.localParticipant;
2975
+ const x = typeof d.requestId == "string" ? d.requestId : void 0, F = (ct = ye.current) == null ? void 0 : ct.call(ye), H = F == null ? void 0 : F.localParticipant;
2920
2976
  if (!(H != null && H.publishData)) return;
2921
2977
  const V = (z) => {
2922
2978
  try {
@@ -2925,7 +2981,7 @@ const yi = /* @__PURE__ */ new Set([
2925
2981
  } catch (te) {
2926
2982
  console.warn("[LiveLayer] request_routes: publishData failed.", te);
2927
2983
  }
2928
- }, G = Ot.current;
2984
+ }, G = Bt.current;
2929
2985
  if (G) {
2930
2986
  try {
2931
2987
  const z = G(), te = (ae) => {
@@ -2933,43 +2989,43 @@ const yi = /* @__PURE__ */ new Set([
2933
2989
  V([]);
2934
2990
  return;
2935
2991
  }
2936
- V(ae.map(ni).slice(0, 200));
2992
+ V(ae.map(ii).slice(0, 200));
2937
2993
  };
2938
2994
  z instanceof Promise ? z.then(te).catch((ae) => {
2939
2995
  console.warn(
2940
2996
  "[LiveLayer] getRoutes rejected; falling back to DOM walker.",
2941
2997
  ae
2942
- ), V(Rt());
2998
+ ), V(Mt());
2943
2999
  }) : te(z);
2944
3000
  } catch (z) {
2945
3001
  console.warn(
2946
3002
  "[LiveLayer] getRoutes threw; falling back to DOM walker.",
2947
3003
  z
2948
- ), V(Rt());
3004
+ ), V(Mt());
2949
3005
  }
2950
3006
  return;
2951
3007
  }
2952
3008
  try {
2953
- V(Rt());
3009
+ V(Mt());
2954
3010
  } catch (z) {
2955
3011
  console.warn("[LiveLayer] request_routes: extractRoutes threw.", z);
2956
3012
  }
2957
3013
  return;
2958
3014
  }
2959
- if (u.type === "task_field_updated") {
2960
- if (!be("collect_data")) {
2961
- we("task_field_updated", "collect_data");
3015
+ if (d.type === "task_field_updated") {
3016
+ if (!ve("collect_data")) {
3017
+ be("task_field_updated", "collect_data");
2962
3018
  return;
2963
3019
  }
2964
3020
  const x = {
2965
3021
  phase: "field",
2966
- fieldId: typeof u.fieldId == "string" ? u.fieldId : "",
2967
- fieldName: typeof u.fieldName == "string" ? u.fieldName : typeof u.fieldId == "string" ? u.fieldId : "",
2968
- value: typeof u.value == "string" ? u.value : "",
2969
- kind: typeof u.kind == "string" ? u.kind : "text",
2970
- source: u.source === "slide" ? "slide" : u.source === "page" ? "page" : "agent",
2971
- ...typeof u.slideId == "string" ? { slideId: u.slideId } : {},
2972
- ...typeof u.formId == "string" ? { formId: u.formId } : {}
3022
+ fieldId: typeof d.fieldId == "string" ? d.fieldId : "",
3023
+ fieldName: typeof d.fieldName == "string" ? d.fieldName : typeof d.fieldId == "string" ? d.fieldId : "",
3024
+ value: typeof d.value == "string" ? d.value : "",
3025
+ kind: typeof d.kind == "string" ? d.kind : "text",
3026
+ source: d.source === "slide" ? "slide" : d.source === "page" ? "page" : "agent",
3027
+ ...typeof d.slideId == "string" ? { slideId: d.slideId } : {},
3028
+ ...typeof d.formId == "string" ? { formId: d.formId } : {}
2973
3029
  };
2974
3030
  if (typeof document < "u")
2975
3031
  try {
@@ -2980,12 +3036,12 @@ const yi = /* @__PURE__ */ new Set([
2980
3036
  }
2981
3037
  return;
2982
3038
  }
2983
- if (u.type === "task_completed") {
2984
- if (!be("collect_data")) {
2985
- we("task_completed", "collect_data");
3039
+ if (d.type === "task_completed") {
3040
+ if (!ve("collect_data")) {
3041
+ be("task_completed", "collect_data");
2986
3042
  return;
2987
3043
  }
2988
- const x = u.result;
3044
+ const x = d.result;
2989
3045
  if (!x || typeof x != "object") {
2990
3046
  console.warn(
2991
3047
  "[LiveLayer] task_completed missing `result` payload."
@@ -3002,7 +3058,7 @@ const yi = /* @__PURE__ */ new Set([
3002
3058
  } catch {
3003
3059
  }
3004
3060
  try {
3005
- Me == null || Me(
3061
+ Te == null || Te(
3006
3062
  x
3007
3063
  );
3008
3064
  } catch (D) {
@@ -3010,40 +3066,40 @@ const yi = /* @__PURE__ */ new Set([
3010
3066
  }
3011
3067
  return;
3012
3068
  }
3013
- yi.has(u.type) || Te == null || Te(u);
3069
+ bi.has(d.type) || Me == null || Me(d);
3014
3070
  }
3015
3071
  },
3016
- [Te, Re, Me]
3072
+ [Me, Re, Te]
3017
3073
  ), ee = er({
3018
- agentId: $ ? "__controlled__" : nt,
3074
+ agentId: $ ? "__controlled__" : rt,
3019
3075
  baseUrl: o,
3020
3076
  apiKey: a,
3021
3077
  sessionEndpoint: s,
3022
3078
  sessionBody: l,
3023
3079
  onDataMessage: $ ? void 0 : at
3024
3080
  });
3025
- T(() => {
3081
+ M(() => {
3026
3082
  if ($ != null && $.subscribeToDataMessages)
3027
3083
  return $.subscribeToDataMessages(at);
3028
- }, [$, at]), ve.current = () => {
3084
+ }, [$, at]), ye.current = () => {
3029
3085
  var y;
3030
3086
  return (y = ee.getRoom) == null ? void 0 : y.call(ee);
3031
- }, T(() => {
3032
- var X;
3087
+ }, M(() => {
3088
+ var J;
3033
3089
  if (typeof window > "u") return;
3034
- const y = ((X = window.location) == null ? void 0 : X.hostname) || "";
3090
+ const y = ((J = window.location) == null ? void 0 : J.hostname) || "";
3035
3091
  if (y === "localhost" || y === "127.0.0.1" || y === "0.0.0.0" || y.endsWith(".local") || y.endsWith(".test"))
3036
3092
  return window.__livelayerSimulateCommand = (he) => {
3037
3093
  try {
3038
3094
  at(he);
3039
- } catch (ke) {
3040
- console.warn("[LiveLayer] simulate-command threw:", ke);
3095
+ } catch (Le) {
3096
+ console.warn("[LiveLayer] simulate-command threw:", Le);
3041
3097
  }
3042
3098
  }, () => {
3043
3099
  delete window.__livelayerSimulateCommand;
3044
3100
  };
3045
3101
  }, [at]);
3046
- const k = Xe(() => $ ? {
3102
+ const L = Ze(() => $ ? {
3047
3103
  connectionState: $.connectionState,
3048
3104
  agentState: $.agentState,
3049
3105
  transcript: $.transcript,
@@ -3074,24 +3130,24 @@ const yi = /* @__PURE__ */ new Set([
3074
3130
  disconnect: ee.disconnect,
3075
3131
  getRoom: ee.getRoom,
3076
3132
  isControlled: !1
3077
- }, [$, ee]), Bt = A(k);
3078
- Bt.current = k;
3079
- const Wt = A($);
3080
- Wt.current = $, Yn(
3133
+ }, [$, ee]), Wt = A(L);
3134
+ Wt.current = L;
3135
+ const Ft = A($);
3136
+ Ft.current = $, Yn(
3081
3137
  r,
3082
3138
  () => ({
3083
3139
  sendData: async (y) => {
3084
- var ke, ct;
3085
- const u = Wt.current;
3086
- if (u != null && u.publishData) {
3140
+ var Le, ct;
3141
+ const d = Ft.current;
3142
+ if (d != null && d.publishData) {
3087
3143
  try {
3088
- await u.publishData(y);
3144
+ await d.publishData(y);
3089
3145
  } catch (x) {
3090
3146
  console.warn("[AvatarWidget] sendData (controlled) failed:", x);
3091
3147
  }
3092
3148
  return;
3093
3149
  }
3094
- const X = (ct = (ke = Bt.current) == null ? void 0 : ke.getRoom) == null ? void 0 : ct.call(ke), he = X == null ? void 0 : X.localParticipant;
3150
+ const J = (ct = (Le = Wt.current) == null ? void 0 : Le.getRoom) == null ? void 0 : ct.call(Le), he = J == null ? void 0 : J.localParticipant;
3095
3151
  if (he != null && he.publishData)
3096
3152
  try {
3097
3153
  const x = new TextEncoder().encode(JSON.stringify(y));
@@ -3103,251 +3159,251 @@ const yi = /* @__PURE__ */ new Set([
3103
3159
  }),
3104
3160
  []
3105
3161
  );
3106
- const Ft = A(null);
3107
- T(() => {
3108
- const y = k.videoElement, u = Ft.current;
3109
- if (!(!y || !u))
3110
- return u.appendChild(y), () => {
3111
- y.parentNode === u && u.removeChild(y);
3162
+ const qt = A(null);
3163
+ M(() => {
3164
+ const y = L.videoElement, d = qt.current;
3165
+ if (!(!y || !d))
3166
+ return d.appendChild(y), () => {
3167
+ y.parentNode === d && d.removeChild(y);
3112
3168
  };
3113
- }, [k.videoElement]), T(() => {
3114
- const y = k.audioElement;
3169
+ }, [L.videoElement]), M(() => {
3170
+ const y = L.audioElement;
3115
3171
  if (!y) return;
3116
- rt.attach(y);
3117
- const u = y.play();
3118
- return u && typeof u.catch == "function" && u.catch((X) => {
3119
- (X == null ? void 0 : X.name) === "NotAllowedError" && ge(!0);
3172
+ it.attach(y);
3173
+ const d = y.play();
3174
+ return d && typeof d.catch == "function" && d.catch((J) => {
3175
+ (J == null ? void 0 : J.name) === "NotAllowedError" && lt(!0);
3120
3176
  }), () => {
3121
- rt.detach();
3177
+ it.detach();
3122
3178
  };
3123
- }, [k.audioElement]), T(() => {
3124
- if (k.isControlled || k.connectionState !== "connected") return;
3125
- const y = k.getRoom();
3179
+ }, [L.audioElement]), M(() => {
3180
+ if (L.isControlled || L.connectionState !== "connected") return;
3181
+ const y = L.getRoom();
3126
3182
  if (y)
3127
3183
  return se.setupMic(y).catch(() => {
3128
3184
  }), () => {
3129
3185
  se.teardownMic();
3130
3186
  };
3131
- }, [k.isControlled, k.connectionState]), T(() => {
3132
- var u;
3133
- if (k.connectionState !== "connected") return;
3134
- const y = k.isControlled ? (u = $ == null ? void 0 : $.getRoom) == null ? void 0 : u.call($) : k.getRoom();
3187
+ }, [L.isControlled, L.connectionState]), M(() => {
3188
+ var d;
3189
+ if (L.connectionState !== "connected") return;
3190
+ const y = L.isControlled ? (d = $ == null ? void 0 : $.getRoom) == null ? void 0 : d.call($) : L.getRoom();
3135
3191
  if (y)
3136
- return de.attachRoom(y), Ce.attachRoom(y), k.isControlled && se.attachRoom(y), it.refresh(), () => {
3137
- de.teardown(), Ce.teardown();
3192
+ return ue.attachRoom(y), Ee.attachRoom(y), L.isControlled && se.attachRoom(y), ot.refresh(), () => {
3193
+ ue.teardown(), Ee.teardown();
3138
3194
  };
3139
- }, [k.isControlled, k.connectionState, $]), T(() => {
3140
- const y = k.audioElement;
3141
- y && (y.muted = J);
3142
- }, [k.audioElement, J]);
3143
- const Tn = C((y) => {
3144
- const u = { type: "user_message", text: y };
3195
+ }, [L.isControlled, L.connectionState, $]), M(() => {
3196
+ const y = L.audioElement;
3197
+ y && (y.muted = h);
3198
+ }, [L.audioElement, h]);
3199
+ const Mn = E((y) => {
3200
+ const d = { type: "user_message", text: y };
3145
3201
  if ($ != null && $.publishData) {
3146
3202
  try {
3147
- $.publishData(u);
3203
+ $.publishData(d);
3148
3204
  } catch {
3149
3205
  }
3150
3206
  return;
3151
3207
  }
3152
- const X = k.getRoom();
3153
- if (X)
3208
+ const J = L.getRoom();
3209
+ if (J)
3154
3210
  try {
3155
- const he = new TextEncoder().encode(JSON.stringify(u));
3156
- X.localParticipant.publishData(he, { reliable: !0 });
3211
+ const he = new TextEncoder().encode(JSON.stringify(d));
3212
+ J.localParticipant.publishData(he, { reliable: !0 });
3157
3213
  } catch {
3158
3214
  }
3159
- }, [k, $]), Mn = C(() => {
3160
- Rn((y) => !y);
3215
+ }, [L, $]), Tn = E(() => {
3216
+ Q((y) => !y);
3161
3217
  }, []);
3162
- T(() => {
3163
- Ie == null || Ie(k.connectionState), k.connectionState === "connected" ? Ne == null || Ne() : k.connectionState === "disconnected" && (Oe == null || Oe());
3164
- }, [k.connectionState, Ne, Oe, Ie]), T(() => {
3165
- Ae == null || Ae(k.transcript);
3166
- }, [k.transcript, Ae]), T(() => {
3167
- Be == null || Be(k.agentState);
3168
- }, [k.agentState, Be]), T(() => {
3169
- gt.setThinking(k.agentState === "thinking");
3170
- }, [k.agentState, gt]);
3171
- const qt = A(!1);
3172
- T(() => {
3173
- !v || qt.current || tt && k.connectionState === "idle" && (qt.current = !0, k.connect());
3174
- }, [v, k.connectionState, k, tt]);
3175
- const Dn = C(
3218
+ M(() => {
3219
+ Ie == null || Ie(L.connectionState), L.connectionState === "connected" ? Ne == null || Ne() : L.connectionState === "disconnected" && (Oe == null || Oe());
3220
+ }, [L.connectionState, Ne, Oe, Ie]), M(() => {
3221
+ Ae == null || Ae(L.transcript);
3222
+ }, [L.transcript, Ae]), M(() => {
3223
+ Be == null || Be(L.agentState);
3224
+ }, [L.agentState, Be]), M(() => {
3225
+ yt.setThinking(L.agentState === "thinking");
3226
+ }, [L.agentState, yt]);
3227
+ const Ut = A(!1);
3228
+ M(() => {
3229
+ !v || Ut.current || nt && L.connectionState === "idle" && (Ut.current = !0, L.connect());
3230
+ }, [v, L.connectionState, L, nt]);
3231
+ const Dn = E(
3176
3232
  (y) => {
3177
- const u = N == null ? void 0 : N.find((X) => X.id === y);
3178
- u && (lt(!1), y !== Le && (ot(!0), k.disconnect(), Pe || kt(y), I == null || I(u)));
3233
+ const d = N == null ? void 0 : N.find((J) => J.id === y);
3234
+ d && (Ve(!1), y !== ke && (xe(!0), L.disconnect(), Pe || kt(y), I == null || I(d)));
3179
3235
  },
3180
3236
  [
3181
3237
  N,
3182
- Le,
3183
- k,
3238
+ ke,
3239
+ L,
3184
3240
  Pe,
3185
3241
  I
3186
3242
  ]
3187
3243
  );
3188
- T(() => {
3189
- ye && k.connectionState === "connected" && ot(!1);
3190
- }, [k.connectionState, ye]), T(() => {
3244
+ M(() => {
3245
+ ge && L.connectionState === "connected" && xe(!1);
3246
+ }, [L.connectionState, ge]), M(() => {
3191
3247
  if (!je) return;
3192
- const y = (u) => {
3193
- u.key === "Escape" && lt(!1);
3248
+ const y = (d) => {
3249
+ d.key === "Escape" && Ve(!1);
3194
3250
  };
3195
3251
  return window.addEventListener("keydown", y), () => window.removeEventListener("keydown", y);
3196
3252
  }, [je]);
3197
- const Pn = !!P || !!(oe != null && oe.avatarImageUrl) || k.isControlled, st = ar(nt, o, Pn);
3198
- et === void 0 && ((Yt = st.info) != null && Yt.capabilities) && (At.current = st.info.capabilities);
3199
- const vt = (oe == null ? void 0 : oe.name) ?? O ?? ((Gt = k.agentConfig) == null ? void 0 : Gt.name) ?? ((Kt = st.info) == null ? void 0 : Kt.name) ?? "Live Layer", It = (oe == null ? void 0 : oe.avatarImageUrl) ?? P ?? ((Jt = k.agentConfig) == null ? void 0 : Jt.avatarImageUrl) ?? ((Xt = st.info) == null ? void 0 : Xt.avatarImageUrl) ?? null, $n = U ?? ((Qt = k.agentConfig) == null ? void 0 : Qt.idleLoopUrl) ?? ((Zt = st.info) == null ? void 0 : Zt.idleLoopUrl) ?? null, zn = g ?? null, Hn = C(() => ue("expanded"), [ue]), On = C(
3200
- () => ue("minimized"),
3201
- [ue]
3202
- ), Ut = C(() => {
3203
- k.disconnect(), ue("hidden");
3204
- }, [k, ue]), Bn = C(() => {
3205
- const y = k.audioElement;
3206
- y && y.play().then(() => ge(!1)).catch(() => {
3253
+ const Pn = !!P || !!(oe != null && oe.avatarImageUrl) || L.isControlled, st = ar(rt, o, Pn);
3254
+ tt === void 0 && ((Gt = st.info) != null && Gt.capabilities) && (It.current = st.info.capabilities);
3255
+ const bt = (oe == null ? void 0 : oe.name) ?? O ?? ((Kt = L.agentConfig) == null ? void 0 : Kt.name) ?? ((Jt = st.info) == null ? void 0 : Jt.name) ?? "Live Layer", Rt = (oe == null ? void 0 : oe.avatarImageUrl) ?? P ?? ((Xt = L.agentConfig) == null ? void 0 : Xt.avatarImageUrl) ?? ((Zt = st.info) == null ? void 0 : Zt.avatarImageUrl) ?? null, $n = U ?? ((Qt = L.agentConfig) == null ? void 0 : Qt.idleLoopUrl) ?? ((en = st.info) == null ? void 0 : en.idleLoopUrl) ?? null, zn = g ?? null, Hn = E(() => de("expanded"), [de]), On = E(
3256
+ () => de("minimized"),
3257
+ [de]
3258
+ ), jt = E(() => {
3259
+ L.disconnect(), de("hidden");
3260
+ }, [L, de]), Bn = E(() => {
3261
+ const y = L.audioElement;
3262
+ y && y.play().then(() => lt(!1)).catch(() => {
3207
3263
  });
3208
- }, [k.audioElement]), Wn = C(() => {
3209
- ge(!1), k.connect();
3210
- }, [k]), Ve = {
3264
+ }, [L.audioElement]), Wn = E(() => {
3265
+ lt(!1), L.connect();
3266
+ }, [L]), Ye = {
3211
3267
  ...De,
3212
3268
  ...me ? {} : { zIndex: We }
3213
3269
  };
3214
- q.primaryColor && (Ve["--ll-color-primary"] = q.primaryColor), q.accentColor && (Ve["--ll-color-accent"] = q.accentColor), q.backgroundColor && (Ve["--ll-color-bg"] = q.backgroundColor), q.textColor && (Ve["--ll-color-fg"] = q.textColor);
3270
+ q.primaryColor && (Ye["--ll-color-primary"] = q.primaryColor), q.accentColor && (Ye["--ll-color-accent"] = q.accentColor), q.backgroundColor && (Ye["--ll-color-bg"] = q.backgroundColor), q.textColor && (Ye["--ll-color-fg"] = q.textColor);
3215
3271
  const Fn = [
3216
3272
  "ll-widget",
3217
3273
  `ll-widget--${le}`,
3218
- `ll-widget--${Ee ? "mobile" : "desktop"}`,
3219
- xt
3274
+ `ll-widget--${Ce ? "mobile" : "desktop"}`,
3275
+ Lt
3220
3276
  ].filter(Boolean).join(" ");
3221
- if (!tt) return null;
3277
+ if (!nt) return null;
3222
3278
  const qn = /* @__PURE__ */ n(
3223
3279
  "div",
3224
3280
  {
3225
3281
  className: Fn,
3226
- style: Ve,
3282
+ style: Ye,
3227
3283
  "data-display-mode": le,
3228
- "data-position": L,
3284
+ "data-position": k,
3229
3285
  "data-experience-mode": p === "EMBEDDED" ? "embedded" : "widget",
3230
3286
  children: le === "expanded" && /* @__PURE__ */ n(
3231
- Wr,
3287
+ qr,
3232
3288
  {
3233
- position: L,
3234
- isMobile: Ee,
3235
- agentName: vt,
3236
- avatarImageUrl: It,
3289
+ position: k,
3290
+ isMobile: Ce,
3291
+ agentName: bt,
3292
+ avatarImageUrl: Rt,
3237
3293
  idleLoopUrl: $n,
3238
3294
  greeting: zn,
3239
3295
  branding: q,
3240
3296
  teamMembers: N,
3241
- currentTeamMemberId: Le,
3242
- isSwitchingTeamMember: ye,
3297
+ currentTeamMemberId: ke,
3298
+ isSwitchingTeamMember: ge,
3243
3299
  teamSwitcherOpen: je,
3244
- onToggleTeamSwitcher: () => lt((y) => !y),
3300
+ onToggleTeamSwitcher: () => Ve((y) => !y),
3245
3301
  onSelectTeamMember: Dn,
3246
- connectionState: k.connectionState,
3247
- agentState: k.agentState,
3248
- transcript: k.transcript,
3302
+ connectionState: L.connectionState,
3303
+ agentState: L.agentState,
3304
+ transcript: L.transcript,
3249
3305
  isMuted: se.isMuted,
3250
- micDevices: it.mics,
3306
+ micDevices: ot.mics,
3251
3307
  activeMicId: se.activeDeviceId,
3252
- isCameraEnabled: de.isEnabled,
3253
- cameraPreviewEl: de.previewEl,
3254
- cameraDevices: it.cameras,
3255
- activeCameraId: de.activeDeviceId,
3256
- isScreenShareEnabled: Ce.isEnabled,
3257
- screenPreviewEl: Ce.previewEl,
3258
- isSpeakerMuted: J,
3308
+ isCameraEnabled: ue.isEnabled,
3309
+ cameraPreviewEl: ue.previewEl,
3310
+ cameraDevices: ot.cameras,
3311
+ activeCameraId: ue.activeDeviceId,
3312
+ isScreenShareEnabled: Ee.isEnabled,
3313
+ screenPreviewEl: Ee.previewEl,
3314
+ isSpeakerMuted: h,
3259
3315
  allowCamera: ne,
3260
3316
  allowScreenShare: B,
3261
3317
  allowTyping: j,
3262
3318
  showMinimize: pt,
3263
3319
  showClose: ht,
3264
- chromeless: _e,
3320
+ chromeless: we,
3265
3321
  compactControls: ze,
3266
3322
  transforming: He,
3267
- transformingLabel: Q,
3268
- languageMenuOpen: mt,
3269
- onToggleLanguageMenu: () => m((y) => !y),
3270
- needsUserGesture: Lt,
3271
- canResume: k.canResume,
3323
+ transformingLabel: X,
3324
+ languageMenuOpen: Ct,
3325
+ onToggleLanguageMenu: () => gt((y) => !y),
3326
+ needsUserGesture: mt,
3327
+ canResume: L.canResume,
3272
3328
  micError: se.micError,
3273
- error: k.error,
3274
- avatarVideoContainerRef: Ft,
3275
- agentVideoEl: k.videoElement,
3276
- onConnect: () => void k.connect(),
3277
- onDisconnect: () => k.disconnect(),
3329
+ error: L.error,
3330
+ avatarVideoContainerRef: qt,
3331
+ agentVideoEl: L.videoElement,
3332
+ onConnect: () => void L.connect(),
3333
+ onDisconnect: () => L.disconnect(),
3278
3334
  onRetry: Wn,
3279
3335
  onResumeAudio: Bn,
3280
3336
  onToggleMute: se.toggleMute,
3281
3337
  onSwitchMicDevice: (y) => void se.switchDevice(y),
3282
- onToggleCamera: () => void de.toggle(),
3283
- onSwitchCameraDevice: (y) => void de.switchDevice(y),
3284
- onToggleScreenShare: () => void Ce.toggle(),
3285
- onToggleSpeaker: Mn,
3286
- onSendMessage: Tn,
3338
+ onToggleCamera: () => void ue.toggle(),
3339
+ onSwitchCameraDevice: (y) => void ue.switchDevice(y),
3340
+ onToggleScreenShare: () => void Ee.toggle(),
3341
+ onToggleSpeaker: Tn,
3342
+ onSendMessage: Mn,
3287
3343
  onMinimize: On,
3288
- onClose: Ut,
3344
+ onClose: jt,
3289
3345
  onClearMicError: se.clearError
3290
3346
  }
3291
3347
  )
3292
3348
  }
3293
- ), jt = !me && (le === "hidden" || le === "minimized") ? /* @__PURE__ */ w(
3349
+ ), Vt = !me && (le === "hidden" || le === "minimized") ? /* @__PURE__ */ b(
3294
3350
  "div",
3295
3351
  {
3296
3352
  className: [
3297
3353
  "ll-widget",
3298
3354
  "ll-widget--floating",
3299
3355
  `ll-widget--${le}`,
3300
- `ll-widget--${Ee ? "mobile" : "desktop"}`
3356
+ `ll-widget--${Ce ? "mobile" : "desktop"}`
3301
3357
  ].join(" "),
3302
- style: Ve,
3358
+ style: Ye,
3303
3359
  "data-display-mode": le,
3304
- "data-position": L,
3360
+ "data-position": k,
3305
3361
  children: [
3306
3362
  le === "hidden" && /* @__PURE__ */ n(
3307
- Tr,
3363
+ Mr,
3308
3364
  {
3309
- position: L,
3310
- isMobile: Ee,
3311
- isSpeaking: k.agentState === "speaking",
3312
- onExpand: () => ue("expanded"),
3313
- label: `Open ${vt} widget`,
3314
- avatarImageUrl: It,
3315
- agentName: vt,
3365
+ position: k,
3366
+ isMobile: Ce,
3367
+ isSpeaking: L.agentState === "speaking",
3368
+ onExpand: () => de("expanded"),
3369
+ label: `Open ${bt} widget`,
3370
+ avatarImageUrl: Rt,
3371
+ agentName: bt,
3316
3372
  containerEl: ce
3317
3373
  }
3318
3374
  ),
3319
3375
  le === "minimized" && /* @__PURE__ */ n(
3320
3376
  Dr,
3321
3377
  {
3322
- position: L,
3323
- isMobile: Ee,
3324
- agentName: vt,
3325
- avatarImageUrl: It,
3326
- agentState: k.agentState,
3378
+ position: k,
3379
+ isMobile: Ce,
3380
+ agentName: bt,
3381
+ avatarImageUrl: Rt,
3382
+ agentState: L.agentState,
3327
3383
  isMuted: se.isMuted,
3328
- audioLevel: rt,
3384
+ audioLevel: it,
3329
3385
  onExpand: Hn,
3330
3386
  onToggleMute: se.toggleMute,
3331
- onClose: Ut
3387
+ onClose: jt
3332
3388
  }
3333
3389
  )
3334
3390
  ]
3335
3391
  }
3336
- ) : null, Vt = ce ?? (typeof document < "u" ? document.body : null);
3337
- return /* @__PURE__ */ w($e, { children: [
3392
+ ) : null, Yt = ce ?? (typeof document < "u" ? document.body : null);
3393
+ return /* @__PURE__ */ b($e, { children: [
3338
3394
  qn,
3339
- jt && Vt && Pt(jt, Vt)
3395
+ Vt && Yt && $t(Vt, Yt)
3340
3396
  ] });
3341
3397
  }
3342
3398
  );
3343
- In.displayName = "AvatarWidgetInner";
3344
- const vi = Dt(
3399
+ Rn.displayName = "AvatarWidgetInner";
3400
+ const wi = Pt(
3345
3401
  function(t, r) {
3346
- return /* @__PURE__ */ n(Zn, { children: /* @__PURE__ */ n(In, { ...t, ref: r }) });
3402
+ return /* @__PURE__ */ n(Qn, { children: /* @__PURE__ */ n(Rn, { ...t, ref: r }) });
3347
3403
  }
3348
3404
  );
3349
- vi.displayName = "AvatarWidget";
3350
- const Ai = ({
3405
+ wi.displayName = "AvatarWidget";
3406
+ const Ri = ({
3351
3407
  agentId: e,
3352
3408
  baseUrl: t,
3353
3409
  apiKey: r,
@@ -3358,22 +3414,22 @@ const Ai = ({
3358
3414
  }) => {
3359
3415
  const l = A(null), c = A(null), p = A(a);
3360
3416
  p.current = a;
3361
- const v = C((f) => {
3417
+ const v = E((f) => {
3362
3418
  var R;
3363
- const d = f.detail;
3364
- (R = p.current) == null || R.call(p, d);
3419
+ const u = f.detail;
3420
+ (R = p.current) == null || R.call(p, u);
3365
3421
  }, []);
3366
- return T(() => {
3422
+ return M(() => {
3367
3423
  const f = l.current;
3368
3424
  if (!f) return;
3369
- const d = document.createElement("livelayer-widget");
3370
- return d.setAttribute("agent-id", e), t && d.setAttribute("base-url", t), r && d.setAttribute("api-key", r), i && d.setAttribute("mode", i), d.addEventListener("agent-event", v), f.appendChild(d), c.current = d, () => {
3371
- d.removeEventListener("agent-event", v), f.removeChild(d), c.current = null;
3425
+ const u = document.createElement("livelayer-widget");
3426
+ return u.setAttribute("agent-id", e), t && u.setAttribute("base-url", t), r && u.setAttribute("api-key", r), i && u.setAttribute("mode", i), u.addEventListener("agent-event", v), f.appendChild(u), c.current = u, () => {
3427
+ u.removeEventListener("agent-event", v), f.removeChild(u), c.current = null;
3372
3428
  };
3373
- }, [e]), T(() => {
3429
+ }, [e]), M(() => {
3374
3430
  c.current && (i ? c.current.setAttribute("mode", i) : c.current.removeAttribute("mode"));
3375
3431
  }, [i]), /* @__PURE__ */ n("div", { ref: l, className: o, style: s });
3376
- }, Ii = Dt(
3432
+ }, Mi = Pt(
3377
3433
  function({ id: t, intent: r, as: i = "div", className: a, style: o, children: s }, l) {
3378
3434
  return Gn(
3379
3435
  i,
@@ -3388,110 +3444,110 @@ const Ai = ({
3388
3444
  );
3389
3445
  }
3390
3446
  );
3391
- function Ri(e = {}) {
3392
- const { onFieldUpdate: t, onComplete: r, source: i = "all" } = e, [a, o] = S({}), [s, l] = S(!1), [c, p] = S(null), v = A(t), f = A(r), d = A(i);
3393
- T(() => {
3394
- v.current = t, f.current = r, d.current = i;
3447
+ function Ti(e = {}) {
3448
+ const { onFieldUpdate: t, onComplete: r, source: i = "all" } = e, [a, o] = S({}), [s, l] = S(!1), [c, p] = S(null), v = A(t), f = A(r), u = A(i);
3449
+ M(() => {
3450
+ v.current = t, f.current = r, u.current = i;
3395
3451
  }, [t, r, i]);
3396
- const R = C(() => {
3452
+ const R = E(() => {
3397
3453
  o({}), l(!1);
3398
3454
  }, []);
3399
- return T(() => {
3455
+ return M(() => {
3400
3456
  if (typeof window > "u") return;
3401
- const L = (_) => {
3402
- var b, N;
3403
- const h = _.detail;
3404
- if (h) {
3405
- if (h.phase === "field") {
3406
- if (d.current !== "all" && h.source !== d.current)
3457
+ const k = (_) => {
3458
+ var w, N;
3459
+ const m = _.detail;
3460
+ if (m) {
3461
+ if (m.phase === "field") {
3462
+ if (u.current !== "all" && m.source !== u.current)
3407
3463
  return;
3408
3464
  l(!0), o(
3409
- (M) => M[h.fieldName] === h.value ? M : { ...M, [h.fieldName]: h.value }
3465
+ (T) => T[m.fieldName] === m.value ? T : { ...T, [m.fieldName]: m.value }
3410
3466
  );
3411
3467
  try {
3412
- (b = v.current) == null || b.call(v, h);
3413
- } catch (M) {
3414
- console.warn("[LiveLayer] useCollect onFieldUpdate threw.", M);
3468
+ (w = v.current) == null || w.call(v, m);
3469
+ } catch (T) {
3470
+ console.warn("[LiveLayer] useCollect onFieldUpdate threw.", T);
3415
3471
  }
3416
3472
  return;
3417
3473
  }
3418
- if (h.phase === "complete") {
3419
- const M = h.result;
3420
- if (d.current !== "all" && M.source !== d.current)
3474
+ if (m.phase === "complete") {
3475
+ const T = m.result;
3476
+ if (u.current !== "all" && T.source !== u.current)
3421
3477
  return;
3422
- p(M), l(!1);
3478
+ p(T), l(!1);
3423
3479
  try {
3424
- (N = f.current) == null || N.call(f, M);
3480
+ (N = f.current) == null || N.call(f, T);
3425
3481
  } catch (I) {
3426
3482
  console.warn("[LiveLayer] useCollect onComplete threw.", I);
3427
3483
  }
3428
3484
  }
3429
3485
  }
3430
3486
  };
3431
- return document.addEventListener("ll-collected", L), () => document.removeEventListener("ll-collected", L);
3487
+ return document.addEventListener("ll-collected", k), () => document.removeEventListener("ll-collected", k);
3432
3488
  }, []), { fields: a, isCollecting: s, lastResult: c, reset: R };
3433
3489
  }
3434
- let _n = 1;
3435
- function Ti({
3490
+ let xn = 1;
3491
+ function Di({
3436
3492
  onMount: e,
3437
3493
  defaultOpen: t = !1,
3438
3494
  storageKey: r = "ll-debug-open"
3439
3495
  }) {
3440
- const [i, a] = S(t), [o, s] = S([]), [l, c] = S(""), [p, v] = S(!1), f = A(/* @__PURE__ */ new Set()), d = A([]), R = A(p);
3441
- R.current = p, T(() => {
3496
+ const [i, a] = S(t), [o, s] = S([]), [l, c] = S(""), [p, v] = S(!1), f = A(/* @__PURE__ */ new Set()), u = A([]), R = A(p);
3497
+ R.current = p, M(() => {
3442
3498
  try {
3443
- const h = localStorage.getItem(r);
3444
- h === "1" && a(!0), h === "0" && a(!1);
3499
+ const m = localStorage.getItem(r);
3500
+ m === "1" && a(!0), m === "0" && a(!1);
3445
3501
  } catch {
3446
3502
  }
3447
- }, [r]), T(() => {
3503
+ }, [r]), M(() => {
3448
3504
  try {
3449
3505
  localStorage.setItem(r, i ? "1" : "0");
3450
3506
  } catch {
3451
3507
  }
3452
- }, [i, r]), T(() => {
3453
- const h = (b) => {
3454
- (b.metaKey || b.ctrlKey) && b.shiftKey && b.key.toLowerCase() === "l" && (b.preventDefault(), a((N) => !N));
3508
+ }, [i, r]), M(() => {
3509
+ const m = (w) => {
3510
+ (w.metaKey || w.ctrlKey) && w.shiftKey && w.key.toLowerCase() === "l" && (w.preventDefault(), a((N) => !N));
3455
3511
  };
3456
- return window.addEventListener("keydown", h), () => window.removeEventListener("keydown", h);
3457
- }, []), T(() => {
3458
- const h = setInterval(() => {
3459
- if (d.current.length === 0 || R.current) return;
3460
- const b = d.current.splice(0, d.current.length);
3512
+ return window.addEventListener("keydown", m), () => window.removeEventListener("keydown", m);
3513
+ }, []), M(() => {
3514
+ const m = setInterval(() => {
3515
+ if (u.current.length === 0 || R.current) return;
3516
+ const w = u.current.splice(0, u.current.length);
3461
3517
  s(
3462
- (N) => [...b.reverse(), ...N].slice(0, 200)
3518
+ (N) => [...w.reverse(), ...N].slice(0, 200)
3463
3519
  );
3464
3520
  }, 100);
3465
- return () => clearInterval(h);
3521
+ return () => clearInterval(m);
3466
3522
  }, []);
3467
- const L = A(!1);
3468
- if (T(() => {
3469
- !e || L.current || (L.current = !0, e((h) => {
3470
- d.current.push({
3471
- id: _n++,
3523
+ const k = A(!1);
3524
+ if (M(() => {
3525
+ !e || k.current || (k.current = !0, e((m) => {
3526
+ u.current.push({
3527
+ id: xn++,
3472
3528
  ts: Date.now(),
3473
3529
  kind: "event",
3474
- type: h.eventName,
3475
- data: h.data
3530
+ type: m.eventName,
3531
+ data: m.data
3476
3532
  });
3477
3533
  }));
3478
- }, [e]), T(() => {
3479
- const h = console.warn, b = console.log, N = (M, I) => function(...U) {
3534
+ }, [e]), M(() => {
3535
+ const m = console.warn, w = console.log, N = (T, I) => function(...U) {
3480
3536
  try {
3481
3537
  const g = typeof U[0] == "string" ? U[0] : "";
3482
- g.startsWith("[LiveLayer]") && d.current.push({
3483
- id: _n++,
3538
+ g.startsWith("[LiveLayer]") && u.current.push({
3539
+ id: xn++,
3484
3540
  ts: Date.now(),
3485
- kind: M,
3541
+ kind: T,
3486
3542
  type: g.slice(0, 120),
3487
- data: { args: U.slice(1).map((P) => wi(P)) }
3543
+ data: { args: U.slice(1).map((P) => xi(P)) }
3488
3544
  });
3489
3545
  } catch {
3490
3546
  }
3491
3547
  return I.apply(this, U);
3492
3548
  };
3493
- return console.warn = N("warn", h), console.log = N("log", b), () => {
3494
- console.warn = h, console.log = b;
3549
+ return console.warn = N("warn", m), console.log = N("log", w), () => {
3550
+ console.warn = m, console.log = w;
3495
3551
  };
3496
3552
  }, []), !i)
3497
3553
  return /* @__PURE__ */ n(
@@ -3520,12 +3576,12 @@ function Ti({
3520
3576
  children: "🛰 LL debug"
3521
3577
  }
3522
3578
  );
3523
- const _ = o.filter((h) => {
3579
+ const _ = o.filter((m) => {
3524
3580
  if (!l) return !0;
3525
- const b = l.toLowerCase();
3526
- return h.type.toLowerCase().includes(b) || JSON.stringify(h.data || {}).toLowerCase().includes(b);
3581
+ const w = l.toLowerCase();
3582
+ return m.type.toLowerCase().includes(w) || JSON.stringify(m.data || {}).toLowerCase().includes(w);
3527
3583
  });
3528
- return /* @__PURE__ */ w(
3584
+ return /* @__PURE__ */ b(
3529
3585
  "div",
3530
3586
  {
3531
3587
  style: {
@@ -3547,7 +3603,7 @@ function Ti({
3547
3603
  overflow: "hidden"
3548
3604
  },
3549
3605
  children: [
3550
- /* @__PURE__ */ w(
3606
+ /* @__PURE__ */ b(
3551
3607
  "div",
3552
3608
  {
3553
3609
  style: {
@@ -3560,7 +3616,7 @@ function Ti({
3560
3616
  },
3561
3617
  children: [
3562
3618
  /* @__PURE__ */ n("span", { style: { fontWeight: 600, fontSize: 12 }, children: "LiveLayer debug" }),
3563
- /* @__PURE__ */ w("span", { style: { fontSize: 10, color: "rgba(255,255,255,0.4)" }, children: [
3619
+ /* @__PURE__ */ b("span", { style: { fontSize: 10, color: "rgba(255,255,255,0.4)" }, children: [
3564
3620
  o.length,
3565
3621
  " event",
3566
3622
  o.length === 1 ? "" : "s"
@@ -3570,7 +3626,7 @@ function Ti({
3570
3626
  "button",
3571
3627
  {
3572
3628
  type: "button",
3573
- onClick: () => v((h) => !h),
3629
+ onClick: () => v((m) => !m),
3574
3630
  style: Tt(p ? "#f59e0b" : "transparent"),
3575
3631
  title: "Pause / resume capture",
3576
3632
  children: p ? "▶ resume" : "⏸ pause"
@@ -3581,7 +3637,7 @@ function Ti({
3581
3637
  {
3582
3638
  type: "button",
3583
3639
  onClick: () => {
3584
- s([]), d.current = [];
3640
+ s([]), u.current = [];
3585
3641
  },
3586
3642
  style: Tt("transparent"),
3587
3643
  title: "Clear buffer",
@@ -3607,7 +3663,7 @@ function Ti({
3607
3663
  {
3608
3664
  type: "text",
3609
3665
  value: l,
3610
- onChange: (h) => c(h.target.value),
3666
+ onChange: (m) => c(m.target.value),
3611
3667
  placeholder: "filter by type or data…",
3612
3668
  style: {
3613
3669
  margin: 8,
@@ -3629,7 +3685,7 @@ function Ti({
3629
3685
  overflowY: "auto",
3630
3686
  padding: "0 8px 8px"
3631
3687
  },
3632
- children: _.length === 0 ? /* @__PURE__ */ w(
3688
+ children: _.length === 0 ? /* @__PURE__ */ b(
3633
3689
  "div",
3634
3690
  {
3635
3691
  style: {
@@ -3659,16 +3715,16 @@ function Ti({
3659
3715
  )
3660
3716
  ]
3661
3717
  }
3662
- ) : _.map((h) => /* @__PURE__ */ n(
3663
- bi,
3718
+ ) : _.map((m) => /* @__PURE__ */ n(
3719
+ _i,
3664
3720
  {
3665
- entry: h,
3666
- expanded: f.current.has(h.id),
3721
+ entry: m,
3722
+ expanded: f.current.has(m.id),
3667
3723
  onToggle: () => {
3668
- f.current.has(h.id) ? f.current.delete(h.id) : f.current.add(h.id), s((b) => [...b]);
3724
+ f.current.has(m.id) ? f.current.delete(m.id) : f.current.add(m.id), s((w) => [...w]);
3669
3725
  }
3670
3726
  },
3671
- h.id
3727
+ m.id
3672
3728
  ))
3673
3729
  }
3674
3730
  )
@@ -3676,7 +3732,7 @@ function Ti({
3676
3732
  }
3677
3733
  );
3678
3734
  }
3679
- function bi({
3735
+ function _i({
3680
3736
  entry: e,
3681
3737
  expanded: t,
3682
3738
  onToggle: r
@@ -3684,7 +3740,7 @@ function bi({
3684
3740
  const i = e.kind === "warn" ? "#f59e0b" : e.type.startsWith("[LiveLayer]") ? "#94a3b8" : e.type === "navigate" || e.type === "scroll_page" || e.type === "scroll_to" || e.type === "click" ? "#22c55e" : e.type === "fill_form" || e.type === "submit_form" || e.type === "focus_field" ? "#a78bfa" : e.type === "request_page_context" || e.type === "request_routes" ? "#38bdf8" : e.type === "agent_state" ? "#facc15" : "#cbd5e1", a = new Date(e.ts).toLocaleTimeString("en-US", {
3685
3741
  hour12: !1
3686
3742
  });
3687
- return /* @__PURE__ */ w(
3743
+ return /* @__PURE__ */ b(
3688
3744
  "button",
3689
3745
  {
3690
3746
  type: "button",
@@ -3702,7 +3758,7 @@ function bi({
3702
3758
  lineHeight: 1.4
3703
3759
  },
3704
3760
  children: [
3705
- /* @__PURE__ */ w("div", { style: { display: "flex", alignItems: "center", gap: 6 }, children: [
3761
+ /* @__PURE__ */ b("div", { style: { display: "flex", alignItems: "center", gap: 6 }, children: [
3706
3762
  /* @__PURE__ */ n(
3707
3763
  "span",
3708
3764
  {
@@ -3757,22 +3813,22 @@ function Tt(e) {
3757
3813
  cursor: "pointer"
3758
3814
  };
3759
3815
  }
3760
- function wi(e) {
3816
+ function xi(e) {
3761
3817
  try {
3762
3818
  return e instanceof Error ? { message: e.message, stack: e.stack } : (JSON.stringify(e), e);
3763
3819
  } catch {
3764
3820
  return String(e);
3765
3821
  }
3766
3822
  }
3767
- function _i(e) {
3823
+ function Li(e) {
3768
3824
  const t = JSON.stringify(e);
3769
- T(() => Jn(e), [t]);
3825
+ M(() => Jn(e), [t]);
3770
3826
  }
3771
- function Mi({ fields: e, children: t }) {
3772
- return _i(e), /* @__PURE__ */ n($e, { children: t });
3827
+ function Pi({ fields: e, children: t }) {
3828
+ return Li(e), /* @__PURE__ */ n($e, { children: t });
3773
3829
  }
3774
- function Di() {
3775
- const [e, t] = S([]), r = C((a) => {
3830
+ function $i() {
3831
+ const [e, t] = S([]), r = E((a) => {
3776
3832
  t((o) => {
3777
3833
  const s = o.findIndex((l) => l.id === a.id);
3778
3834
  if (s >= 0) {
@@ -3781,7 +3837,7 @@ function Di() {
3781
3837
  }
3782
3838
  return [...o, a];
3783
3839
  });
3784
- }, []), i = C(() => t([]), []);
3840
+ }, []), i = E(() => t([]), []);
3785
3841
  return {
3786
3842
  entries: e,
3787
3843
  pushSegment: r,
@@ -3790,38 +3846,38 @@ function Di() {
3790
3846
  };
3791
3847
  }
3792
3848
  export {
3793
- vi as AvatarWidget,
3794
- Zn as ErrorBoundary,
3795
- Mi as FieldProvider,
3796
- Ti as LiveLayerDebugPanel,
3797
- Ii as LiveLayerRegion,
3798
- Ai as LiveLayerWidget,
3799
- zi as clearFieldRegistry,
3800
- ei as clearPageContextCache,
3801
- li as clearRoutesCache,
3802
- Zr as extractPageContext,
3803
- ii as extractRoutes,
3804
- gn as getCachedPageContext,
3805
- Rt as getCachedRoutes,
3806
- Hi as getRegisteredFields,
3849
+ wi as AvatarWidget,
3850
+ Qn as ErrorBoundary,
3851
+ Pi as FieldProvider,
3852
+ Di as LiveLayerDebugPanel,
3853
+ Mi as LiveLayerRegion,
3854
+ Ri as LiveLayerWidget,
3855
+ Oi as clearFieldRegistry,
3856
+ ni as clearPageContextCache,
3857
+ si as clearRoutesCache,
3858
+ ti as extractPageContext,
3859
+ li as extractRoutes,
3860
+ yn as getCachedPageContext,
3861
+ Mt as getCachedRoutes,
3862
+ Bi as getRegisteredFields,
3807
3863
  xr as matchesPattern,
3808
- ni as normalizeRouteInput,
3809
- Oi as registerFields,
3810
- Bi as setFieldValue,
3811
- kr as shouldRenderAtPath,
3864
+ ii as normalizeRouteInput,
3865
+ Wi as registerFields,
3866
+ Fi as setFieldValue,
3867
+ Lr as shouldRenderAtPath,
3812
3868
  ar as useAgentInfo,
3813
3869
  tr as useAudioLevel,
3814
3870
  ir as useCameraState,
3815
- Ri as useCollect,
3816
- ur as useDisplayMode,
3871
+ Ti as useCollect,
3872
+ dr as useDisplayMode,
3817
3873
  pr as useDisplayModePersistence,
3818
3874
  mr as useIsMobile,
3819
3875
  er as useLiveKitSession,
3820
3876
  lr as useMediaDevices,
3821
3877
  nr as useMicrophoneState,
3822
3878
  yr as usePathname,
3823
- _i as useRegisterFields,
3824
- Lr as useRouteMatch,
3879
+ Li as useRegisterFields,
3880
+ kr as useRouteMatch,
3825
3881
  or as useScreenShareState,
3826
- Di as useTranscript
3882
+ $i as useTranscript
3827
3883
  };