@burdenoff/fe-libs 2026.1118.6 → 2026.1118.8

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.
Files changed (27) hide show
  1. package/dist/shared/assistant/avatar/live/createLiveAvatarSeam.js +8 -6
  2. package/dist/shared/assistant/speech/hostedTtsSpeechEngine.js +37 -27
  3. package/dist/shared/assistant/speech/index.d.ts +1 -1
  4. package/dist/shared/assistant/speech/notifyCancellationSpeechEngine.d.ts +14 -1
  5. package/dist/shared/assistant/speech/notifyCancellationSpeechEngine.js +3 -0
  6. package/dist/shared/assistant/speech/routingSpeechEngine.js +4 -4
  7. package/dist/shared/assistant/speech/speechFeed.d.ts +20 -3
  8. package/dist/shared/assistant/speech/speechFeed.js +25 -17
  9. package/dist/shared/assistant/speech/types.d.ts +68 -1
  10. package/dist/shared/assistant/speech/types.js +7 -2
  11. package/dist/shared/assistant/turnTimeline.d.ts +32 -0
  12. package/dist/shared/assistant/turnTimeline.js +3 -3
  13. package/dist/shared/assistant/ui/AssistantChatArea.js +1228 -1227
  14. package/dist/shared/assistant/ui/AssistantSpeechProvider.d.ts +5 -3
  15. package/dist/shared/assistant/ui/AssistantSpeechProvider.js +393 -346
  16. package/dist/shared/assistant/voice/firstClipPrefetchConfig.d.ts +19 -0
  17. package/dist/shared/assistant/voice/firstClipPrefetchConfig.js +8 -1
  18. package/dist/shared/assistant/voice/livePhraseSpeech.d.ts +23 -0
  19. package/dist/shared/assistant/voice/livePhraseSpeech.js +30 -30
  20. package/dist/shared/assistant/voice/phraseGate.d.ts +13 -0
  21. package/dist/shared/assistant/voice/phraseGate.js +6 -2
  22. package/dist/shared/assistant/voice/phrasePlayback.d.ts +59 -0
  23. package/dist/shared/assistant/voice/phrasePlayback.js +56 -34
  24. package/dist/shared/backgrounds/useBackgroundPreference.d.ts +10 -4
  25. package/dist/shared/backgrounds/useBackgroundPreference.js +69 -47
  26. package/dist/shared-assistant.js +418 -418
  27. package/package.json +1 -1
@@ -4,28 +4,28 @@ import { voicePreviewText as n } from "../voice/voicePreview.js";
4
4
  import { getSpeechEngine as r, subscribeSpeechEngine as i } from "../speech/createSpeechEngine.js";
5
5
  import { HOSTED_VOICES as a } from "../speech/hostedVoiceCatalogue.js";
6
6
  import { speechFeed as o } from "../speech/speechFeed.js";
7
- import { hasPendingReplyRequests as s, releaseReplyRequestsOutside as c, replyWantsAvatar as ee, settleReplyRequest as l, subscribeReplyRequests as u } from "../speech/replySpeechRequests.js";
8
- import { chunkForSpeech as te, settledFirstChunk as ne, toSpeakableText as d } from "../voice/speakableText.js";
9
- import { createPhrasePlayback as re } from "../voice/phrasePlayback.js";
10
- import { phraseSpeechEnabled as f } from "../voice/phraseSpeechConfig.js";
11
- import { firstClipPrefetchEnabled as ie } from "../voice/firstClipPrefetchConfig.js";
12
- import { speechLabelsFor as p } from "../voice/speechLabels.js";
13
- import { VOICE_LIST_TIMEOUT_MS as ae, languageDisplayName as oe, selectVoiceForLocale as se, speechGate as ce, speechLangForLocale as m, voiceAvailability as le, voicesForLocale as h } from "../voice/speechVoices.js";
14
- import { resolveSpeechLocale as g } from "../voice/replyLanguage.js";
15
- import { findAssistantLanguage as _ } from "../voice/languages.js";
16
- import { resolveLanguagePair as v } from "../voice/languagePair.js";
17
- import { IDLE_PLAYBACK as ue, isSpeakingMessage as y, publishedChunks as de, speechPlaybackReducer as fe } from "../voice/speechPlayback.js";
18
- import { isVoiceTurn as pe } from "../voice/turnVisibility.js";
19
- import { isTurnSuperseded as me } from "../voice/supersededTurns.js";
20
- import { isTurnInFlight as he } from "../turnState.js";
21
- import { beginListenTurn as ge, describeTurn as _e, finishListenTurn as b, markTurn as ve } from "../turnTimeline.js";
22
- import { registerTurnTimingPageExit as ye } from "../turnTimingReporter.js";
23
- import { parseToolActivity as be } from "./AssistantToolActivity.js";
24
- import { useAssistantTr as xe } from "../i18n.js";
25
- import { createContext as Se, useCallback as x, useContext as Ce, useEffect as S, useMemo as C, useReducer as we, useRef as w, useState as T, useSyncExternalStore as Te } from "react";
26
- import { jsx as Ee } from "react/jsx-runtime";
7
+ import { hasPendingReplyRequests as s, releaseReplyRequestsOutside as c, replyWantsAvatar as l, settleReplyRequest as u, subscribeReplyRequests as d } from "../speech/replySpeechRequests.js";
8
+ import { chunkForSpeech as ee, settledFirstChunk as te, toSpeakableText as f } from "../voice/speakableText.js";
9
+ import { createPhrasePlayback as ne, phraseRouteFirstPiece as p } from "../voice/phrasePlayback.js";
10
+ import { phraseSpeechEnabled as re, phraseSpeechEnvironment as ie } from "../voice/phraseSpeechConfig.js";
11
+ import { firstClipPrefetchEnabled as ae, voiceFirstPieceOptions as oe } from "../voice/firstClipPrefetchConfig.js";
12
+ import { speechLabelsFor as m } from "../voice/speechLabels.js";
13
+ import { VOICE_LIST_TIMEOUT_MS as se, languageDisplayName as ce, selectVoiceForLocale as le, speechGate as ue, speechLangForLocale as h, voiceAvailability as de, voicesForLocale as g } from "../voice/speechVoices.js";
14
+ import { resolveSpeechLocale as _ } from "../voice/replyLanguage.js";
15
+ import { findAssistantLanguage as fe } from "../voice/languages.js";
16
+ import { resolveLanguagePair as pe } from "../voice/languagePair.js";
17
+ import { IDLE_PLAYBACK as me, isSpeakingMessage as he, publishedChunks as ge, speechPlaybackReducer as _e } from "../voice/speechPlayback.js";
18
+ import { isVoiceTurn as ve } from "../voice/turnVisibility.js";
19
+ import { isTurnSuperseded as ye } from "../voice/supersededTurns.js";
20
+ import { isTurnInFlight as be } from "../turnState.js";
21
+ import { beginListenTurn as xe, describeTurn as Se, finishListenTurn as v, markTurn as Ce } from "../turnTimeline.js";
22
+ import { registerTurnTimingPageExit as we } from "../turnTimingReporter.js";
23
+ import { parseToolActivity as Te } from "./AssistantToolActivity.js";
24
+ import { useAssistantTr as Ee } from "../i18n.js";
25
+ import { createContext as De, useCallback as y, useContext as b, useEffect as x, useMemo as S, useReducer as Oe, useRef as C, useState as w, useSyncExternalStore as ke } from "react";
26
+ import { jsx as Ae } from "react/jsx-runtime";
27
27
  // src/shared/assistant/ui/AssistantSpeechProvider.tsx
28
- var De = {
28
+ var T = {
29
29
  codeBlock: "",
30
30
  codeBlockAgain: "",
31
31
  image: "",
@@ -36,30 +36,41 @@ var De = {
36
36
  emailAt: "at",
37
37
  emailDot: "dot",
38
38
  nestedItem: ""
39
- }, Oe = 4e3, E = () => {}, ke = {
39
+ };
40
+ function je(e, t, n) {
41
+ let r = _(f(e, { labels: T }), t);
42
+ return {
43
+ locale: r,
44
+ text: f(e, {
45
+ labels: m(r, n),
46
+ locale: r
47
+ })
48
+ };
49
+ }
50
+ var Me = 4e3, E = () => {}, Ne = {
40
51
  subscribe: () => E,
41
52
  getSnapshot: () => !1
42
- }, Ae = {
43
- subscribe: u,
53
+ }, Pe = {
54
+ subscribe: d,
44
55
  getSnapshot: s
45
56
  };
46
- function je(e, t) {
47
- return ee(t) ? {
57
+ function Fe(e, t) {
58
+ return l(t) ? {
48
59
  ...e,
49
60
  autoSpeakEnabled: !0
50
61
  } : e;
51
62
  }
52
- function Me(e, t) {
63
+ function Ie(e, t) {
53
64
  let n = e.activeConversationId;
54
65
  if (!n || n !== t.activeConversationId) return null;
55
66
  let r = e.processingByConversationId[n], i = t.processingByConversationId[n];
56
- if (r?.status !== "complete" || !he(i?.status)) return null;
67
+ if (r?.status !== "complete" || !be(i?.status)) return null;
57
68
  let a = r.messageId ?? i?.messageId ?? null;
58
69
  if (!a) return null;
59
70
  let o = e.conversations.find((e) => e.id === n)?.messages.find((e) => e.id === a);
60
71
  return o && o.role === "assistant" ? o : null;
61
72
  }
62
- var Ne = Se({
73
+ var Le = De({
63
74
  isSupported: !1,
64
75
  availability: "unsupported",
65
76
  isBlocked: !0,
@@ -85,47 +96,47 @@ var Ne = Se({
85
96
  previewVoice: () => {}
86
97
  });
87
98
  function D() {
88
- return Ce(Ne);
99
+ return b(Le);
89
100
  }
90
- var O = ({ children: s, visible: u = !0, engine: Se }) => {
91
- let Ce = Te(i, r, r), E = Se ?? Ce, D = xe(), { locale: O } = e(), [k, A] = we(fe, ue), [j, Pe] = T(() => E.listVoices()), [M, Fe] = T(!1), [Ie, N] = T(() => /* @__PURE__ */ new Map()), [Le, Re] = T(() => /* @__PURE__ */ new Set()), [ze, Be] = T(null), P = w(0), Ve = w(null), He = w(null), F = w(void 0), I = w(null), L = w(null), Ue = w(/* @__PURE__ */ new Set()), R = w(null);
92
- S(() => () => {
93
- R.current !== null && clearTimeout(R.current);
101
+ var O = ({ children: s, visible: d = !0, engine: _ }) => {
102
+ let De = ke(i, r, r), b = _ ?? De, T = Ee(), { locale: E } = e(), [D, O] = Oe(_e, me), [k, Re] = w(() => b.listVoices()), [A, ze] = w(!1), [Be, j] = w(() => /* @__PURE__ */ new Map()), [Ve, He] = w(() => /* @__PURE__ */ new Set()), [Ue, We] = w(null), M = C(0), Ge = C(null), N = C(null), P = C(void 0), F = C(null), I = C(null), L = C(/* @__PURE__ */ new Set()), R = C(null), z = C(null);
103
+ x(() => () => {
104
+ z.current !== null && clearTimeout(z.current);
94
105
  }, []);
95
- let [We, Ge] = T(null), z = w(null), Ke = w(() => {}), B = x(() => {
96
- z.current?.(), z.current = null;
97
- }, []), V = t((e) => e.autoSpeakEnabled), qe = t((e) => e.setAutoSpeak), [H, Je] = T(!1), Ye = w(!1), Xe = x((e) => {
98
- Ye.current = e;
99
- }, []), Ze = t((e) => e.activeConversationId), U = C(() => E.isSupported(), [E]), Qe = E.wouldSpeakOnAvatar === void 0 ? ke : Ae, $e = Te(Qe.subscribe, Qe.getSnapshot, Qe.getSnapshot);
100
- S(() => {
101
- if (!U) return;
106
+ let [Ke, qe] = w(null), B = C(null), Je = C(() => {}), V = y(() => {
107
+ B.current?.(), B.current = null;
108
+ }, []), H = t((e) => e.autoSpeakEnabled), Ye = t((e) => e.setAutoSpeak), [U, Xe] = w(!1), Ze = C(!1), Qe = y((e) => {
109
+ Ze.current = e;
110
+ }, []), $e = t((e) => e.activeConversationId), W = S(() => b.isSupported(), [b]), et = b.wouldSpeakOnAvatar === void 0 ? Ne : Pe, tt = ke(et.subscribe, et.getSnapshot, et.getSnapshot);
111
+ x(() => {
112
+ if (!W) return;
102
113
  let e = () => {
103
- Pe(E.listVoices()), N((e) => e.size === 0 ? e : /* @__PURE__ */ new Map());
114
+ Re(b.listVoices()), j((e) => e.size === 0 ? e : /* @__PURE__ */ new Map());
104
115
  };
105
- return e(), E.subscribeVoices(e);
106
- }, [E, U]);
107
- let et = t((e) => e.assistantLanguage), tt = t((e) => e.replyLanguage), W = t((e) => e.preferredVoices), nt = t((e) => e.setPreferredVoice), G = C(() => v(et, tt, O).reply, [
108
- et,
109
- tt,
110
- O
111
- ]), K = G.code, q = x((e) => _(e)?.tag ?? m(e), []), rt = x((e) => _(e)?.rate ?? .9, []), it = C(() => le(U, j, G.tag, M), [
112
- U,
113
- j,
114
- G,
115
- M
116
- ]), J = C(() => ({
117
- codeBlock: D("speech.codeBlock", "There’s a code example on screen"),
118
- codeBlockAgain: D("speech.codeBlockAgain", "There’s another code example on screen"),
119
- image: D("speech.image", "an image"),
120
- link: D("speech.link", "a link"),
121
- linkTo: D("speech.linkTo", "a link to {{site}}"),
122
- largeTable: D("speech.largeTable", "There’s a table on screen with {{rows}} rows: {{headers}}"),
123
- truncated: D("speech.truncated", "The rest of this message is not read aloud"),
124
- nestedItem: D("speech.nestedItem", "Sub-item {{ordinal}}"),
125
- emailAt: D("speech.emailAt", "at"),
126
- emailDot: D("speech.emailDot", "dot")
127
- }), [D]), Y = x((e = "ended") => {
128
- let t = L.current;
116
+ return e(), b.subscribeVoices(e);
117
+ }, [b, W]);
118
+ let nt = t((e) => e.assistantLanguage), rt = t((e) => e.replyLanguage), G = t((e) => e.preferredVoices), it = t((e) => e.setPreferredVoice), K = S(() => pe(nt, rt, E).reply, [
119
+ nt,
120
+ rt,
121
+ E
122
+ ]), q = K.code, J = y((e) => fe(e)?.tag ?? h(e), []), at = y((e) => fe(e)?.rate ?? .9, []), ot = S(() => de(W, k, K.tag, A), [
123
+ W,
124
+ k,
125
+ K,
126
+ A
127
+ ]), Y = S(() => ({
128
+ codeBlock: T("speech.codeBlock", "There’s a code example on screen"),
129
+ codeBlockAgain: T("speech.codeBlockAgain", "There’s another code example on screen"),
130
+ image: T("speech.image", "an image"),
131
+ link: T("speech.link", "a link"),
132
+ linkTo: T("speech.linkTo", "a link to {{site}}"),
133
+ largeTable: T("speech.largeTable", "There’s a table on screen with {{rows}} rows: {{headers}}"),
134
+ truncated: T("speech.truncated", "The rest of this message is not read aloud"),
135
+ nestedItem: T("speech.nestedItem", "Sub-item {{ordinal}}"),
136
+ emailAt: T("speech.emailAt", "at"),
137
+ emailDot: T("speech.emailDot", "dot")
138
+ }), [T]), X = y((e = "ended") => {
139
+ let t = I.current;
129
140
  if (t) {
130
141
  e === "retrying" && t.notifyEnded(e);
131
142
  try {
@@ -134,446 +145,482 @@ var O = ({ children: s, visible: u = !0, engine: Se }) => {
134
145
  t.notifyEnded();
135
146
  }
136
147
  }
137
- }, []), at = x((e) => {
138
- B(), He.current = null, b(F.current, "stopped"), F.current = void 0, Y(e), E.cancel(), l(Ve.current, "stopped"), A({ type: "stop" });
148
+ }, []), st = y((e) => {
149
+ V(), N.current = null, v(P.current, "stopped"), P.current = void 0, X(e), b.cancel(), u(Ge.current, "stopped"), O({ type: "stop" });
139
150
  }, [
140
- B,
141
- Y,
142
- E
143
- ]), X = x(() => at("ended"), [at]), ot = x((e) => {
144
- let t = E.listVoices().find((t) => t.name === e) ?? null;
151
+ V,
152
+ X,
153
+ b
154
+ ]), Z = y(() => st("ended"), [st]), ct = y((e) => {
155
+ let t = b.listVoices().find((t) => t.name === e) ?? null;
145
156
  if (t) {
146
- X();
157
+ Z();
147
158
  try {
148
- E.speak([n(K)], {
159
+ b.speak([n(q)], {
149
160
  voice: t,
150
- lang: q(K),
161
+ lang: J(q),
151
162
  fallback: !1
152
163
  });
153
164
  } catch {}
154
165
  }
155
166
  }, [
156
- E,
157
- K,
158
- X,
159
- q
160
- ]), st = x((e) => Ie.get(e) ?? null, [Ie]), ct = x((e) => Le.has(e) ? D("speech.deviceFallback", "Device voice used: the selected voice was unavailable.") : null, [Le, D]), lt = x((e, t, n, r, i) => {
161
- B();
167
+ b,
168
+ q,
169
+ Z,
170
+ J
171
+ ]), lt = y((e) => Be.get(e) ?? null, [Be]), ut = y((e) => Ve.has(e) ? T("speech.deviceFallback", "Device voice used: the selected voice was unavailable.") : null, [Ve, T]), dt = y((e, t, n, r, i) => {
172
+ V();
162
173
  let a = !1, o = () => {}, s = (s) => {
163
- a || (a = !0, z.current = null, clearTimeout(c), o(), s.length === 0 ? (Fe(!0), l(e, "declined")) : (Pe(s), Ke.current(e, t, s, n, r, i)));
164
- }, c = setTimeout(() => s(E.listVoices()), ae);
165
- o = E.subscribeVoices(() => s(E.listVoices())), z.current = () => {
166
- a || (a = !0, clearTimeout(c), o(), z.current = null, l(e, "stopped"));
174
+ a || (a = !0, B.current = null, clearTimeout(c), o(), s.length === 0 ? (ze(!0), u(e, "declined")) : (Re(s), Je.current(e, t, s, n, r, i)));
175
+ }, c = setTimeout(() => s(b.listVoices()), se);
176
+ o = b.subscribeVoices(() => s(b.listVoices())), B.current = () => {
177
+ a || (a = !0, clearTimeout(c), o(), B.current = null, u(e, "stopped"));
167
178
  };
168
- }, [B, E]), ut = x((e, t) => {
169
- let n = q(t);
179
+ }, [V, b]), ft = y((e, t) => {
180
+ let n = J(t);
170
181
  return {
171
- voice: se(e, n, W[t]),
182
+ voice: le(e, n, G[t]),
172
183
  lang: n,
173
- rate: rt(t)
184
+ rate: at(t)
174
185
  };
175
186
  }, [
176
- W,
177
- rt,
178
- q
179
- ]), dt = x((e, t, n, r, i = !1, s, c = !1) => {
180
- let u = n;
181
- if (u.length === 0) {
182
- let e = E.listVoices();
183
- e.length > 0 && (u = e, Pe(e));
187
+ G,
188
+ at,
189
+ J
190
+ ]), pt = y((e, t, n, r, i = !1, s = !1, c = !1) => {
191
+ let d = n;
192
+ if (d.length === 0) {
193
+ let e = b.listVoices();
194
+ e.length > 0 && (d = e, Re(e));
184
195
  }
185
- let ne = q(r), d = ce(le(!0, u, r, M));
186
- if (d === "block") {
187
- let t = D("speech.noVoiceForReply", "This reply is in {{language}}, and no {{language}} voice is installed on this device.", { language: oe(ne, O) });
188
- N((n) => new Map(n).set(e, t)), l(e, "declined");
196
+ let te = J(r), f = ue(de(!0, d, r, A));
197
+ if (f === "block") {
198
+ let t = T("speech.noVoiceForReply", "This reply is in {{language}}, and no {{language}} voice is installed on this device.", { language: ce(te, E) });
199
+ j((n) => new Map(n).set(e, t)), u(e, "declined");
189
200
  return;
190
201
  }
191
- if (c && (d !== "speak" || !E.open)) return;
192
- if (d === "wait-for-voices") {
193
- lt(e, t, r, i, s);
202
+ if (c && (f !== "speak" || !b.open)) return;
203
+ if (f === "wait-for-voices") {
204
+ dt(e, t, r, i, s);
194
205
  return;
195
206
  }
196
- let f = ut(u, r), p = Q.current;
197
- if (i && !p.autoSpeakEnabled && !p.sessionSpeaking && ee(e)) {
198
- if (E.wouldSpeakOnAvatar?.(f) !== !0) {
199
- l(e, "declined");
207
+ let p = ft(d, r), re = gt.current;
208
+ if (i && !re.autoSpeakEnabled && !re.sessionSpeaking && l(e)) {
209
+ if (b.wouldSpeakOnAvatar?.(p) !== !0) {
210
+ u(e, "declined");
200
211
  return;
201
212
  }
202
- f.avatarOnly = !0;
213
+ p.avatarOnly = !0;
203
214
  }
204
- N((t) => {
215
+ j((t) => {
205
216
  if (!t.has(e)) return t;
206
217
  let n = new Map(t);
207
218
  return n.delete(e), n;
208
219
  });
209
- let ae = W[r], se = typeof ae == "string" && a.some((e) => e.name === ae) && !u.some((e) => e.name === ae);
210
- Re((t) => {
211
- if (t.has(e) === se) return t;
220
+ let ie = G[r], ae = typeof ie == "string" && a.some((e) => e.name === ie) && !d.some((e) => e.name === ie);
221
+ He((t) => {
222
+ if (t.has(e) === ae) return t;
212
223
  let n = new Set(t);
213
- return se ? n.add(e) : n.delete(e), n;
214
- }), B(), Y();
215
- let m = P.current + 1;
216
- P.current = m, Ve.current !== e && l(Ve.current, "stopped"), Ve.current = e, l(e, "speaking"), A({
224
+ return ae ? n.add(e) : n.delete(e), n;
225
+ }), V(), X();
226
+ let m = M.current + 1;
227
+ M.current = m, Ge.current !== e && u(Ge.current, "stopped"), Ge.current = e, u(e, "speaking"), c && Ce(e, "speechQueued"), O({
217
228
  type: "start",
218
229
  messageId: e,
219
230
  requestId: m
220
- }), He.current = i ? m : null, i && ve(e, "ttsStarted"), b(F.current, "stopped");
221
- let h = i ? void 0 : ge(e);
222
- F.current = h;
223
- let g = s === void 0 ? te(t) : te(t, void 0, void 0, {
224
- firstChunkMaxChars: s,
225
- ...ie() ? { leadSentenceMinChars: 40 } : {}
226
- });
227
- Ge({
231
+ }), N.current = i ? m : null, i && Ce(e, "ttsStarted");
232
+ let se = !(i && re.sessionSpeaking), le = R.current?.messageId === e && R.current.fetched, h = (t) => {
233
+ se || M.current === m && N.current === m && (se = !0, Se(e, { firstClip: t === "mismatched" && !le ? "none" : t }));
234
+ };
235
+ se || (p.onFirstClip = h), v(P.current, "stopped");
236
+ let g = i ? void 0 : xe(e);
237
+ P.current = g;
238
+ let _ = s ? ee(t, void 0, void 0, oe()) : ee(t);
239
+ qe({
228
240
  requestId: m,
229
- chunks: g,
241
+ chunks: _,
230
242
  index: -1
231
- }), R.current !== null && clearTimeout(R.current), R.current = setTimeout(() => {
232
- c || Ge((e) => e?.requestId === m && e.index < 0 ? null : e);
233
- }, Oe);
234
- let _ = !1, v = (t = "ended") => {
235
- _ || (_ = !0, c && P.current === m && (L.current = null, o.audio(e, t)));
236
- }, ue = () => {
237
- b(h, "failed"), v(), P.current === m && R.current !== null && (clearTimeout(R.current), R.current = null), l(e, "failed"), A({
243
+ }), z.current !== null && clearTimeout(z.current), z.current = setTimeout(() => {
244
+ c || qe((e) => e?.requestId === m && e.index < 0 ? null : e);
245
+ }, Me);
246
+ let fe = !1, pe = (t = "ended") => {
247
+ fe || (fe = !0, c && M.current === m && (I.current = null, o.audio(e, t)));
248
+ }, me = () => {
249
+ v(g, "failed"), pe(), M.current === m && z.current !== null && (clearTimeout(z.current), z.current = null), u(e, "failed"), O({
238
250
  type: "failed",
239
251
  requestId: m
240
252
  });
241
- }, y = !1;
253
+ }, he = !1;
242
254
  try {
243
255
  let n = {
244
256
  onStart: () => {
245
- P.current === m && b(h, "answered"), P.current === m && He.current === m && ve(e, "firstAudio");
257
+ h("none"), M.current === m && v(g, "answered"), M.current === m && N.current === m && Ce(e, "firstAudio");
246
258
  },
247
259
  onChunkStart: (t) => {
248
- y = !0, c && P.current === m && (o.peek(e)?.final === !1 && _e(e, { spokeNarration: !0 }), o.audio(e, "started")), P.current === m && R.current !== null && (clearTimeout(R.current), R.current = null), Ge((e) => e?.requestId === m ? {
260
+ he = !0, c && M.current === m && (o.peek(e)?.final === !1 && Se(e, { spokeNarration: !0 }), o.audio(e, "started")), M.current === m && z.current !== null && (clearTimeout(z.current), z.current = null), qe((e) => e?.requestId === m ? {
249
261
  ...e,
250
262
  index: t
251
- } : P.current === m ? {
263
+ } : M.current === m ? {
252
264
  requestId: m,
253
- chunks: g,
265
+ chunks: _,
254
266
  index: t
255
267
  } : e);
256
268
  },
257
269
  onPause: () => {
258
- c && P.current === m && o.audio(e, "paused");
270
+ c && M.current === m && o.audio(e, "paused");
259
271
  },
260
272
  onDeviceFallback: () => {
261
- P.current === m && Re((t) => t.has(e) ? t : new Set(t).add(e));
273
+ M.current === m && He((t) => t.has(e) ? t : new Set(t).add(e));
262
274
  },
263
275
  onEnd: () => {
264
- b(h, "stopped"), v(), P.current === m && He.current === m && ve(e, "audioEnded"), l(e, "spoken"), A({
276
+ h("none"), v(g, "stopped"), pe(), M.current === m && N.current === m && Ce(e, "audioEnded"), u(e, "spoken"), O({
265
277
  type: "finished",
266
278
  requestId: m
267
279
  });
268
280
  },
269
281
  onError: (t) => {
270
- b(h, t === "cancelled" ? "stopped" : "failed"), v(), !y && P.current === m && Re((t) => {
282
+ h("none"), v(g, t === "cancelled" ? "stopped" : "failed"), pe(), !he && M.current === m && He((t) => {
271
283
  if (!t.has(e)) return t;
272
284
  let n = new Set(t);
273
285
  return n.delete(e), n;
274
- }), t === "output-not-cleared" && P.current === m && Be({ messageId: e }), l(e, t === "output-not-cleared" ? "not-cleared" : t === "output-left" ? y ? "cut" : "declined" : t === "cancelled" ? "stopped" : "failed"), A({
286
+ }), t === "output-not-cleared" && M.current === m && We({ messageId: e }), u(e, t === "output-not-cleared" ? "not-cleared" : t === "output-left" ? he ? "cut" : "declined" : t === "cancelled" ? "stopped" : "failed"), O({
275
287
  type: "failed",
276
288
  requestId: m
277
289
  });
278
290
  }
279
291
  };
280
- if (c && E.open) {
281
- let i = E.open.bind(E);
292
+ if (c && b.open) {
293
+ let i = b.open.bind(b);
282
294
  o.audio(e, "queued");
283
- let a = re((e) => i(f, e), n, (e) => {
284
- g = [...e], Ge((e) => e?.requestId === m ? {
295
+ let a = ne((e) => i(p, e), n, (e) => {
296
+ _ = [...e], qe((e) => e?.requestId === m ? {
285
297
  ...e,
286
- chunks: g
298
+ chunks: _
287
299
  } : e);
288
- }, () => _e(e, { speechDivergence: !0 }));
289
- _ ? a.cancel() : (L.current = {
300
+ }, () => Se(e, { speechDivergence: !0 }));
301
+ fe ? a.cancel() : (I.current = {
290
302
  messageId: e,
291
303
  requestId: m,
292
304
  locale: r,
293
305
  playback: a,
294
- notifyEnded: v
306
+ notifyEnded: pe
295
307
  }, a.append(t));
296
- } else E.speak(g, f, n);
308
+ } else b.speak(_, p, n);
297
309
  } catch {
298
- ue();
310
+ me();
299
311
  }
300
312
  }, [
301
- B,
302
- Y,
313
+ V,
314
+ X,
315
+ b,
303
316
  E,
304
- O,
305
- W,
306
- ut,
307
- q,
308
- D,
309
- M,
310
- lt
317
+ G,
318
+ ft,
319
+ J,
320
+ T,
321
+ A,
322
+ dt
311
323
  ]);
312
- S(() => {
313
- Ke.current = dt;
314
- }, [dt]);
315
- let Z = x((e, t, n, r) => {
316
- if (!U) return;
317
- let i = g(d(t, { labels: De }), n ?? K), a = d(t, {
318
- labels: p(i, J),
319
- locale: i
320
- });
321
- a && dt(e, a, j, i, r?.auto === !0, r?.firstChunkMaxChars, r?.phraseStream);
324
+ x(() => {
325
+ Je.current = pt;
326
+ }, [pt]);
327
+ let mt = y((e, t, n, r) => {
328
+ if (!W) return;
329
+ let { locale: i, text: a } = je(t, n ?? q, Y);
330
+ a && pt(e, a, k, i, r?.auto === !0, r?.voiceFirstPiece === !0, r?.phraseStream);
322
331
  }, [
323
- U,
324
- J,
325
- K,
326
- dt,
327
- j
328
- ]), ft = x((e, t, n) => {
329
- y(k, e) ? X() : Z(e, t, n);
332
+ W,
333
+ Y,
334
+ q,
335
+ pt,
336
+ k
337
+ ]), ht = y((e, t, n) => {
338
+ he(D, e) ? Z() : mt(e, t, n);
330
339
  }, [
331
- k,
332
- Z,
333
- X
340
+ D,
341
+ mt,
342
+ Z
334
343
  ]);
335
- S(() => {
336
- u || X();
337
- }, [u, X]);
338
- let Q = w({
339
- autoSpeakEnabled: V,
340
- sessionSpeaking: H,
341
- visible: u,
342
- isSupported: U
344
+ x(() => {
345
+ d || Z();
346
+ }, [d, Z]);
347
+ let gt = C({
348
+ autoSpeakEnabled: H,
349
+ sessionSpeaking: U,
350
+ visible: d,
351
+ isSupported: W
343
352
  });
344
- S(() => {
345
- Q.current = {
346
- autoSpeakEnabled: V,
347
- sessionSpeaking: H,
348
- visible: u,
349
- isSupported: U
353
+ x(() => {
354
+ gt.current = {
355
+ autoSpeakEnabled: H,
356
+ sessionSpeaking: U,
357
+ visible: d,
358
+ isSupported: W
350
359
  };
351
360
  }, [
352
- V,
353
361
  H,
354
- u,
355
- U
362
+ U,
363
+ d,
364
+ W
356
365
  ]);
357
- let pt = w(null), mt = w(null), ht = w(() => {});
358
- S(() => {
359
- X(), Ue.current.clear(), N(/* @__PURE__ */ new Map()), Re(/* @__PURE__ */ new Set()), c(t.getState().activeConversationId), pt.current = Ze;
360
- let e = mt.current;
361
- mt.current = null, e && e.conversationId === Ze && ht.current(e.conversationId, e.messageId);
362
- }, [Ze, X]), S(() => {
363
- N((e) => e.size === 0 ? e : /* @__PURE__ */ new Map()), X();
364
- }, [K, X]), S(() => () => {
365
- z.current?.(), z.current = null, b(F.current, "stopped"), F.current = void 0, Y(), E.cancel();
366
- }, [Y, E]), S(() => {
366
+ let _t = C(null), vt = C(null), yt = C(() => {});
367
+ x(() => {
368
+ Z(), L.current.clear(), j(/* @__PURE__ */ new Map()), He(/* @__PURE__ */ new Set()), c(t.getState().activeConversationId), _t.current = $e;
369
+ let e = vt.current;
370
+ vt.current = null, e && e.conversationId === $e && yt.current(e.conversationId, e.messageId);
371
+ }, [$e, Z]), x(() => {
372
+ j((e) => e.size === 0 ? e : /* @__PURE__ */ new Map()), Z();
373
+ }, [q, Z]), x(() => () => {
374
+ B.current?.(), B.current = null, v(P.current, "stopped"), P.current = void 0, X(), b.cancel();
375
+ }, [X, b]), x(() => {
367
376
  if (typeof window > "u") return;
368
- let { settle: e, unregister: t } = ye(() => (b(F.current, "stopped"), F.current)), n = () => {
369
- e(), F.current = void 0, Y(), E.cancel();
377
+ let { settle: e, unregister: t } = we(() => (v(P.current, "stopped"), P.current)), n = () => {
378
+ e(), P.current = void 0, X(), b.cancel();
370
379
  };
371
380
  return window.addEventListener("pagehide", n), () => {
372
381
  t(), window.removeEventListener("pagehide", n);
373
382
  };
374
- }, [Y, E]), S(() => {
375
- if (typeof document > "u" || !U) return;
383
+ }, [X, b]), x(() => {
384
+ if (typeof document > "u" || !W) return;
376
385
  let e = () => {
377
386
  if (document.visibilityState !== "visible") return;
378
- let e = E.listVoices();
379
- e.length > 0 && B(), Pe(e), Fe(!1), N((e) => e.size === 0 ? e : /* @__PURE__ */ new Map());
387
+ let e = b.listVoices();
388
+ e.length > 0 && V(), Re(e), ze(!1), j((e) => e.size === 0 ? e : /* @__PURE__ */ new Map());
380
389
  };
381
390
  return document.addEventListener("visibilitychange", e), window.addEventListener("focus", e), () => {
382
391
  document.removeEventListener("visibilitychange", e), window.removeEventListener("focus", e);
383
392
  };
384
393
  }, [
385
- B,
386
- E,
387
- U
394
+ V,
395
+ b,
396
+ W
388
397
  ]);
389
- let gt = w(Z);
390
- S(() => {
391
- gt.current = Z;
392
- }, [Z]);
393
- let $ = x((e, t) => {
394
- if (pe(e) !== t || me(e.id) || I.current?.messageId === e.id || Ye.current) return;
395
- let { text: n } = be(e.content);
396
- if (n.trim()) try {
397
- gt.current(e.id, n, e.metadata?.lang, { auto: !0 });
398
+ let bt = C(mt);
399
+ x(() => {
400
+ bt.current = mt;
401
+ }, [mt]);
402
+ let Q = y((e, t) => {
403
+ if (ve(e) !== t || ye(e.id) || F.current?.messageId === e.id || Ze.current) return;
404
+ let { text: n } = Te(e.content);
405
+ if (!n.trim()) return;
406
+ let r = t && ae();
407
+ try {
408
+ bt.current(e.id, n, e.metadata?.lang, {
409
+ auto: !0,
410
+ voiceFirstPiece: r
411
+ });
398
412
  } catch {}
399
- }, []), _t = x((e, n) => {
400
- if (e !== pt.current) {
401
- t.getState().activeConversationId === e && (mt.current = {
413
+ }, []), xt = y((e, n) => {
414
+ if (e !== _t.current) {
415
+ t.getState().activeConversationId === e && (vt.current = {
402
416
  conversationId: e,
403
417
  messageId: n
404
418
  });
405
419
  return;
406
420
  }
407
- let r = je(Q.current, n);
421
+ let r = Fe(gt.current, n);
408
422
  if (!r.autoSpeakEnabled && !r.sessionSpeaking || !r.visible || !r.isSupported) return;
409
423
  let i = t.getState();
410
424
  if (i.activeConversationId !== e) return;
411
425
  let a = i.conversations.find((t) => t.id === e)?.messages.find((e) => e.id === n);
412
- a && a.role === "assistant" && $(a, r.sessionSpeaking);
413
- }, [$]);
414
- S(() => {
415
- ht.current = _t;
416
- }, [_t]), S(() => {
417
- if ((V || H) && u && U) return t.subscribe((e, t) => {
426
+ a && a.role === "assistant" && Q(a, r.sessionSpeaking);
427
+ }, [Q]);
428
+ x(() => {
429
+ yt.current = xt;
430
+ }, [xt]), x(() => {
431
+ if ((H || U) && d && W) return t.subscribe((e, t) => {
418
432
  let n = e.activeConversationId;
419
433
  if (!n || n !== t.activeConversationId) return;
420
434
  let r = e.processingByConversationId[n], i = t.processingByConversationId[n];
421
- if (r?.status !== "complete" || !he(i?.status)) return;
435
+ if (r?.status !== "complete" || !be(i?.status)) return;
422
436
  let a = r.messageId ?? i?.messageId ?? null;
423
437
  if (!a) return;
424
438
  let o = e.conversations.find((e) => e.id === n)?.messages.find((e) => e.id === a);
425
- o && o.role === "assistant" && $(o, H);
439
+ o && o.role === "assistant" && Q(o, U);
426
440
  });
427
441
  }, [
428
- V,
429
442
  H,
430
443
  U,
431
- u,
432
- $
433
- ]), S(() => {
434
- if (!V && !H && $e && u && U) return t.subscribe((e, t) => {
435
- let n = Me(e, t);
436
- n && ee(n.id) && $(n, !1);
444
+ W,
445
+ d,
446
+ Q
447
+ ]), x(() => {
448
+ if (!H && !U && tt && d && W) return t.subscribe((e, t) => {
449
+ let n = Ie(e, t);
450
+ n && l(n.id) && Q(n, !1);
437
451
  });
438
452
  }, [
439
- V,
440
453
  H,
441
- $e,
442
454
  U,
443
- u,
444
- $
455
+ tt,
456
+ W,
457
+ d,
458
+ Q
445
459
  ]);
446
- let vt = w(null), yt = x((e, n) => {
447
- if (!ie() || !E.prefetch || !U || vt.current === e || n.channel !== "voice") return;
448
- let r = je(Q.current, e);
449
- if (!r.sessionSpeaking || !r.visible || !r.isSupported || me(e) || t.getState().activeConversationId !== n.conversationId) return;
450
- let i = be(n.text).text, a = g(d(i, { labels: De }), n.lang ?? K), o = d(i, {
451
- labels: p(a, J),
452
- locale: a
453
- }), s = ne(o, {
454
- firstChunkMaxChars: 110,
455
- leadSentenceMinChars: 40
460
+ let St = y((e, n) => {
461
+ if (!ae() || !b.prefetch || !W || R.current?.messageId === e || n.channel !== "voice") return;
462
+ let r = () => ({
463
+ messageId: e,
464
+ fetched: !1,
465
+ holdsClip: R.current?.holdsClip ?? !1
466
+ });
467
+ if (I.current?.messageId === e || F.current?.messageId === e) {
468
+ R.current = r();
469
+ return;
470
+ }
471
+ let i = Fe(gt.current, e);
472
+ if (!i.sessionSpeaking || !i.visible || !i.isSupported || ye(e) || t.getState().activeConversationId !== n.conversationId) return;
473
+ let a = Te(n.text).text, o = n.lang ?? q, s = je(a, o, Y), c = te(s.text, oe());
474
+ if (c === null || ue(de(!0, k, s.locale, A)) !== "speak") return;
475
+ if (n.phraseRoute !== !1 && re() && b.open && !L.current.has(e)) {
476
+ let e = p(a, n.text, ie() === "production", (e) => je(Te(e).text, o, Y));
477
+ if (e === null) return;
478
+ if (e.route === "phrase") {
479
+ if (e.piece !== c) {
480
+ R.current = r();
481
+ return;
482
+ }
483
+ if (e.locale !== s.locale) return;
484
+ }
485
+ }
486
+ let l = r();
487
+ R.current = l, b.prefetch(c, {
488
+ ...ft(k, s.locale),
489
+ onEarlyFetch: () => {
490
+ l.fetched = !0, l.holdsClip = !0, Se(e, { firstClipFetched: !0 });
491
+ }
456
492
  });
457
- s !== null && ce(le(!0, j, a, M)) === "speak" && (vt.current = e, E.prefetch(s, ut(j, a)));
458
493
  }, [
459
- E,
460
- U,
461
- J,
462
- ut,
463
- K,
464
- M,
465
- j
466
- ]), bt = x((e) => {
494
+ b,
495
+ W,
496
+ Y,
497
+ ft,
498
+ q,
499
+ A,
500
+ k
501
+ ]), $ = y((e, t) => {
502
+ let n = R.current;
503
+ !n || t !== void 0 && n.messageId !== t || (R.current = null, n.holdsClip && e.cancelPrefetch?.());
504
+ }, []);
505
+ x(() => {
506
+ U || $(b);
507
+ }, [
508
+ $,
509
+ b,
510
+ U
511
+ ]), x(() => () => $(b), [$, b]);
512
+ let Ct = y((e) => {
467
513
  if (e.type === "audio") return;
468
514
  if (e.type === "prefetch") {
469
- yt(e.messageId, e.item);
515
+ St(e.messageId, e.item);
470
516
  return;
471
517
  }
472
518
  if (e.type === "retract") {
473
- L.current?.messageId === e.messageId && L.current.playback.retract();
519
+ I.current?.messageId === e.messageId && I.current.playback.retract();
474
520
  return;
475
521
  }
476
522
  if (e.type === "abort") {
477
- Ue.current.delete(e.messageId), vt.current === e.messageId && (vt.current = null, E.cancelPrefetch?.());
478
- let t = I.current;
523
+ L.current.delete(e.messageId), $(b, e.messageId);
524
+ let t = F.current;
479
525
  if (!t || t.messageId !== e.messageId) return;
480
- I.current = null, (t.requestId === null ? t.waiting && z.current !== null : P.current === t.requestId) && at(e.retrying ? "retrying" : "ended");
526
+ F.current = null, (t.requestId === null ? t.waiting && B.current !== null : M.current === t.requestId) && st(e.retrying ? "retrying" : "ended");
481
527
  return;
482
528
  }
483
529
  let { messageId: n, item: r } = e;
484
- if (e.type === "append" && L.current?.messageId !== n) {
485
- if (Ue.current.has(n)) return;
486
- Ue.current.add(n);
530
+ if (e.type === "append" && I.current?.messageId !== n) {
531
+ if (L.current.has(n)) return;
532
+ L.current.add(n);
487
533
  }
488
- let i = je(Q.current, n);
489
- if (!i.autoSpeakEnabled && !i.sessionSpeaking || !i.visible || !i.isSupported || r.channel === "voice" !== i.sessionSpeaking || me(n) || Ye.current || t.getState().activeConversationId !== r.conversationId || pt.current !== r.conversationId) return;
490
- let a = L.current;
491
- if (a?.messageId === n && a.requestId === P.current) {
492
- let t = d(e.type === "append" ? e.phrases.join(" ") : be(r.text).text, {
493
- labels: p(a.locale, J),
534
+ let i = Fe(gt.current, n);
535
+ if (!i.autoSpeakEnabled && !i.sessionSpeaking || !i.visible || !i.isSupported || r.channel === "voice" !== i.sessionSpeaking || ye(n) || Ze.current || t.getState().activeConversationId !== r.conversationId || _t.current !== r.conversationId) return;
536
+ let a = I.current;
537
+ if (a?.messageId === n && a.requestId === M.current) {
538
+ let t = f(e.type === "append" ? e.phrases.join(" ") : Te(r.text).text, {
539
+ labels: m(a.locale, Y),
494
540
  locale: a.locale
495
541
  });
496
542
  e.type === "append" ? a.playback.append(t) : a.playback.finish(t);
497
543
  return;
498
544
  }
499
- if (I.current?.messageId === n || e.type === "append" && (!f() || !E.open || r.channel !== "voice")) return;
500
- let { text: o } = be(e.type === "append" ? e.phrases.join(" ") : r.text);
545
+ if (F.current?.messageId === n || e.type === "append" && (!re() || !b.open || r.channel !== "voice")) return;
546
+ let { text: o } = Te(e.type === "append" ? e.phrases.join(" ") : r.text);
501
547
  if (!o.trim()) return;
502
- let s = P.current;
548
+ let s = M.current;
503
549
  try {
504
- gt.current(n, o, r.lang, {
550
+ bt.current(n, o, r.lang, {
505
551
  auto: !0,
506
- firstChunkMaxChars: 110,
552
+ voiceFirstPiece: !0,
507
553
  phraseStream: e.type === "append"
508
554
  });
509
555
  } catch {}
510
- let c = P.current !== s;
511
- (e.type !== "append" || c) && (Ue.current.delete(n), I.current = {
556
+ let c = M.current !== s;
557
+ (e.type !== "append" || c) && (L.current.delete(n), F.current = {
512
558
  messageId: n,
513
- requestId: c ? P.current : null,
514
- waiting: !c && z.current !== null
559
+ requestId: c ? M.current : null,
560
+ waiting: !c && B.current !== null
515
561
  });
516
562
  }, [
517
- at,
518
- E,
519
- J,
520
- yt
563
+ st,
564
+ $,
565
+ b,
566
+ Y,
567
+ St
521
568
  ]);
522
- S(() => o.subscribe(bt), [bt]);
523
- let xt = C(() => h(j, G.tag), [j, G]), St = C(() => se(j, G.tag, W[K]), [
524
- j,
569
+ x(() => o.subscribe(Ct), [Ct]);
570
+ let wt = S(() => g(k, K.tag), [k, K]), Tt = S(() => le(k, K.tag, G[q]), [
571
+ k,
572
+ K,
525
573
  G,
526
- W,
527
- K
528
- ]), Ct = C(() => ({
529
- isSupported: U,
530
- availability: it,
531
- isBlocked: it === "no-voices",
532
- disabledReason: it === "no-voices" ? D("speech.noVoicesOnDevice", "This device has no speech voices installed. Add one in your device speech or accessibility settings.") : null,
533
- blockedFor: st,
534
- deviceFallbackFor: ct,
535
- voiceChoices: xt,
536
- spokenChunks: de(k, We),
537
- activeVoiceName: St?.name ?? null,
538
- preferredVoiceName: W[K] ?? null,
539
- setVoice: (e) => nt(K, e),
540
- speakingMessageId: k.status === "speaking" ? k.messageId : null,
541
- outputNotCleared: ze,
542
- isSpeaking: (e) => y(k, e),
543
- toggle: ft,
544
- stop: X,
545
- autoSpeakEnabled: V,
546
- setAutoSpeak: qe,
547
- sessionSpeaking: H,
548
- setSessionSpeaking: Je,
549
- setSessionMicOpen: Xe,
550
- speakFinishedReply: _t,
551
- previewVoice: ot
574
+ q
575
+ ]), Et = S(() => ({
576
+ isSupported: W,
577
+ availability: ot,
578
+ isBlocked: ot === "no-voices",
579
+ disabledReason: ot === "no-voices" ? T("speech.noVoicesOnDevice", "This device has no speech voices installed. Add one in your device speech or accessibility settings.") : null,
580
+ blockedFor: lt,
581
+ deviceFallbackFor: ut,
582
+ voiceChoices: wt,
583
+ spokenChunks: ge(D, Ke),
584
+ activeVoiceName: Tt?.name ?? null,
585
+ preferredVoiceName: G[q] ?? null,
586
+ setVoice: (e) => it(q, e),
587
+ speakingMessageId: D.status === "speaking" ? D.messageId : null,
588
+ outputNotCleared: Ue,
589
+ isSpeaking: (e) => he(D, e),
590
+ toggle: ht,
591
+ stop: Z,
592
+ autoSpeakEnabled: H,
593
+ setAutoSpeak: Ye,
594
+ sessionSpeaking: U,
595
+ setSessionSpeaking: Xe,
596
+ setSessionMicOpen: Qe,
597
+ speakFinishedReply: xt,
598
+ previewVoice: ct
552
599
  }), [
553
- U,
554
- it,
555
- st,
556
- ct,
557
- xt,
558
- St,
559
600
  W,
560
- nt,
561
- K,
562
- k,
563
- ze,
564
- ft,
565
- X,
566
- V,
567
- qe,
568
- H,
569
- Xe,
570
- _t,
571
601
  ot,
602
+ lt,
603
+ ut,
604
+ wt,
605
+ Tt,
606
+ G,
607
+ it,
608
+ q,
572
609
  D,
573
- We
610
+ Ue,
611
+ ht,
612
+ Z,
613
+ H,
614
+ Ye,
615
+ U,
616
+ Qe,
617
+ xt,
618
+ ct,
619
+ T,
620
+ Ke
574
621
  ]);
575
- return /* @__PURE__ */ Ee(Ne.Provider, {
576
- value: Ct,
622
+ return /* @__PURE__ */ Ae(Le.Provider, {
623
+ value: Et,
577
624
  children: s
578
625
  });
579
626
  };