@burdenoff/fe-libs 2026.1004.5 → 2026.1004.7
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/chrome/ContextSwitcher.d.ts.map +1 -1
- package/dist/chrome/ContextSwitcher.js +73 -50
- package/dist/chrome/GlobalSearch.d.ts.map +1 -1
- package/dist/chrome/GlobalSearch.js +76 -72
- package/dist/chrome/LanguageSwitcher.d.ts.map +1 -1
- package/dist/chrome/LanguageSwitcher.js +61 -40
- package/dist/chrome/NotificationCenter.d.ts.map +1 -1
- package/dist/chrome/NotificationCenter.js +71 -68
- package/dist/chrome/ProfileSwitcher.d.ts.map +1 -1
- package/dist/chrome/ProfileSwitcher.js +87 -81
- package/dist/chrome/SideNavigation.d.ts.map +1 -1
- package/dist/chrome/SideNavigation.js +120 -76
- package/dist/shared/assistant/appControls/copy.d.ts +12 -0
- package/dist/shared/assistant/appControls/copy.d.ts.map +1 -0
- package/dist/shared/assistant/appControls/copy.js +98 -0
- package/dist/shared/assistant/appControls/grammar.d.ts +102 -0
- package/dist/shared/assistant/appControls/grammar.d.ts.map +1 -0
- package/dist/shared/assistant/appControls/grammar.js +236 -0
- package/dist/shared/assistant/appControls/languages.d.ts +6 -0
- package/dist/shared/assistant/appControls/languages.d.ts.map +1 -0
- package/dist/shared/assistant/appControls/languages.js +52 -0
- package/dist/shared/assistant/appControls/names.d.ts +22 -0
- package/dist/shared/assistant/appControls/names.d.ts.map +1 -0
- package/dist/shared/assistant/appControls/names.js +29 -0
- package/dist/shared/assistant/appControls/pageAdapters.d.ts +59 -0
- package/dist/shared/assistant/appControls/pageAdapters.d.ts.map +1 -0
- package/dist/shared/assistant/appControls/pageAdapters.js +87 -0
- package/dist/shared/assistant/appControls/plan.d.ts +148 -0
- package/dist/shared/assistant/appControls/plan.d.ts.map +1 -0
- package/dist/shared/assistant/appControls/plan.js +511 -0
- package/dist/shared/assistant/appControls/registry.d.ts +9 -0
- package/dist/shared/assistant/appControls/registry.d.ts.map +1 -0
- package/dist/shared/assistant/appControls/registry.js +38 -0
- package/dist/shared/assistant/appControls/snapshot.d.ts +42 -0
- package/dist/shared/assistant/appControls/snapshot.d.ts.map +1 -0
- package/dist/shared/assistant/appControls/snapshot.js +40 -0
- package/dist/shared/assistant/appControls/text.d.ts +7 -0
- package/dist/shared/assistant/appControls/text.d.ts.map +1 -0
- package/dist/shared/assistant/appControls/text.js +6 -0
- package/dist/shared/assistant/appControls/types.d.ts +183 -0
- package/dist/shared/assistant/appControls/types.d.ts.map +1 -0
- package/dist/shared/assistant/appControls/types.js +25 -0
- package/dist/shared/assistant/appControls/useAssistantControl.d.ts +24 -0
- package/dist/shared/assistant/appControls/useAssistantControl.d.ts.map +1 -0
- package/dist/shared/assistant/appControls/useAssistantControl.js +13 -0
- package/dist/shared/assistant/conversation.d.ts +12 -1
- package/dist/shared/assistant/conversation.d.ts.map +1 -1
- package/dist/shared/assistant/history/historyMapping.d.ts.map +1 -1
- package/dist/shared/assistant/history/historyMapping.js +130 -114
- package/dist/shared/assistant/i18nManifest.d.ts +64 -0
- package/dist/shared/assistant/i18nManifest.d.ts.map +1 -1
- package/dist/shared/assistant/i18nManifest.js +64 -0
- package/dist/shared/assistant/index.d.ts +13 -0
- package/dist/shared/assistant/index.d.ts.map +1 -1
- package/dist/shared/assistant/localUiCommandCopy.d.ts +7 -0
- package/dist/shared/assistant/localUiCommandCopy.d.ts.map +1 -1
- package/dist/shared/assistant/localUiCommandCopy.js +1 -1
- package/dist/shared/assistant/localUiCommands.d.ts +16 -0
- package/dist/shared/assistant/localUiCommands.d.ts.map +1 -1
- package/dist/shared/assistant/localUiCommands.js +97 -84
- package/dist/shared/assistant/ui/AIAssistantPanel.d.ts.map +1 -1
- package/dist/shared/assistant/ui/AIAssistantPanel.js +57 -49
- package/dist/shared/assistant/ui/AssistantChatArea.d.ts.map +1 -1
- package/dist/shared/assistant/ui/AssistantChatArea.js +1176 -1123
- package/dist/shared/assistant/ui/AssistantControlConfirmDialog.d.ts +38 -0
- package/dist/shared/assistant/ui/AssistantControlConfirmDialog.d.ts.map +1 -0
- package/dist/shared/assistant/ui/AssistantControlConfirmDialog.js +65 -0
- package/dist/shared/assistant/ui/controlConfirmDialog.d.ts +30 -0
- package/dist/shared/assistant/ui/controlConfirmDialog.d.ts.map +1 -0
- package/dist/shared/assistant/ui/controlConfirmDialog.js +46 -0
- package/dist/shared/assistant/ui/voice/AssistantVoiceSession.d.ts.map +1 -1
- package/dist/shared/assistant/ui/voice/AssistantVoiceSession.js +174 -171
- package/dist/shared/assistant/uiActions/recordNames.d.ts +33 -0
- package/dist/shared/assistant/uiActions/recordNames.d.ts.map +1 -1
- package/dist/shared/assistant/uiActions/recordNames.js +51 -1
- package/dist/shared/components/KeyboardHelpDialogWrapper.d.ts.map +1 -1
- package/dist/shared/components/KeyboardHelpDialogWrapper.js +11 -9
- package/dist/shared/providers/shell/GlobalUiProvider.d.ts +2 -0
- package/dist/shared/providers/shell/GlobalUiProvider.d.ts.map +1 -1
- package/dist/shared/providers/shell/GlobalUiProvider.js +4 -1
- package/dist/shared-assistant.js +219 -206
- package/package.json +1 -1
|
@@ -1,253 +1,256 @@
|
|
|
1
1
|
import { useReturnFocus as e } from "../../../hooks/useReturnFocus.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
2
|
+
import { useAssistantControl as t } from "../../appControls/useAssistantControl.js";
|
|
3
|
+
import { useAssistantTr as n } from "../../i18n.js";
|
|
4
|
+
import { micIsInterrupt as r, showsAssistantCaption as ee, voiceStageState as i } from "../../voice/voiceStageState.js";
|
|
5
|
+
import { VOICE_THINKING_LABEL as a, composeVoiceStatus as te, voiceStatusSuffix as ne } from "../../voice/voiceStatus.js";
|
|
6
|
+
import { spokenSoFar as o } from "../../voice/voiceSession.js";
|
|
7
|
+
import { ASSISTANT_PANEL_ATTR as re, ASSISTANT_VOICE_SESSION_ATTR as ie } from "../panelOverlays.js";
|
|
8
|
+
import { AssistantAttachmentButton as ae } from "../composer/AssistantAttachmentButton.js";
|
|
9
|
+
import { AssistantAttachmentChips as oe } from "../composer/AssistantAttachmentChips.js";
|
|
10
|
+
import { AssistantVoiceOrb as se } from "./AssistantVoiceOrb.js";
|
|
11
|
+
import { VoiceMiniController as ce } from "./VoiceMiniController.js";
|
|
12
|
+
import { VoiceStage as le } from "./VoiceStage.js";
|
|
13
|
+
import { VoiceTranscriptDrawer as ue } from "./VoiceTranscriptDrawer.js";
|
|
14
|
+
import { escapeBelongsToLayerAbove as de, voiceSessionEscapeAction as fe } from "./voiceSessionEscape.js";
|
|
15
|
+
import { useCallback as s, useEffect as c, useMemo as pe, useRef as l, useState as u } from "react";
|
|
16
|
+
import { Maximize2 as me, Minimize2 as he, ScrollText as ge, X as d } from "lucide-react";
|
|
17
|
+
import { jsx as f, jsxs as p } from "react/jsx-runtime";
|
|
17
18
|
//#region src/shared/assistant/ui/voice/AssistantVoiceSession.tsx
|
|
18
|
-
var
|
|
19
|
-
let
|
|
20
|
-
|
|
21
|
-
let
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
}, []),
|
|
26
|
-
|
|
19
|
+
var m = ({ session: m, turns: ye = [], onSaveTranscript: be, onContinueInChat: xe, notice: h = null, spoken: g, onInterrupt: Se, onToggleMute: _, attachments: v = [], onAttachFiles: y, onRemoveAttachment: Ce, onRetryAttachment: we, canAttachMore: Te = !0, preparingAttachments: b = 0, spokenChunks: x = null, onEnd: S, capturing: Ee = !0, interrupting: De = !1, awaitingEndpoint: Oe = !1, holding: C = !1, correcting: ke = !1, onLetMeFinish: w, onImDone: T, proposalChip: E = null, proposalTray: D = null }) => {
|
|
20
|
+
let O = n(), { muted: k, error: A } = m, j = l(null), M = l(null), [N, P] = u("mini"), F = N === "full", I = N === "mini", L = N === "mini" ? "panel" : N === "panel" ? "full" : "mini", [R, z] = u(!1);
|
|
21
|
+
t("assistant.transcript", pe(() => ({ run: () => R ? { status: "already" } : (z(!0), { status: "done" }) }), [R]));
|
|
22
|
+
let B = D !== null && !I, V = l(!1), H = l(_);
|
|
23
|
+
H.current = _;
|
|
24
|
+
let U = s(() => {
|
|
25
|
+
m.phase !== "listening" && m.phase !== "thinking" || k || V.current || o(m) || (V.current = !0, H.current());
|
|
26
|
+
}, [k, m]), W = s(() => {
|
|
27
|
+
V.current && (V.current = !1, H.current());
|
|
28
|
+
}, []), Ae = U;
|
|
29
|
+
c(() => {
|
|
27
30
|
let e = () => {
|
|
28
|
-
document.visibilityState === "hidden" ?
|
|
31
|
+
document.visibilityState === "hidden" ? U() : W();
|
|
29
32
|
};
|
|
30
33
|
return document.addEventListener("visibilitychange", e), () => document.removeEventListener("visibilitychange", e);
|
|
31
|
-
}, [
|
|
32
|
-
let e =
|
|
34
|
+
}, [U, W]), c(() => {
|
|
35
|
+
let e = W;
|
|
33
36
|
return window.addEventListener("focus", e), () => {
|
|
34
|
-
window.removeEventListener("focus", e),
|
|
37
|
+
window.removeEventListener("focus", e), V.current = !1;
|
|
35
38
|
};
|
|
36
|
-
}, []),
|
|
37
|
-
|
|
38
|
-
}, []), e(
|
|
39
|
+
}, []), c(() => {
|
|
40
|
+
j.current?.focus();
|
|
41
|
+
}, []), e(M, { fallbackSelector: `[${re}]` }), c(() => {
|
|
39
42
|
let e = (e) => {
|
|
40
43
|
if (e.key === "Escape") {
|
|
41
|
-
let t =
|
|
44
|
+
let t = fe({
|
|
42
45
|
defaultPrevented: e.defaultPrevented,
|
|
43
|
-
layerAbove:
|
|
46
|
+
layerAbove: de({
|
|
44
47
|
target: e.target,
|
|
45
|
-
session:
|
|
48
|
+
session: M.current,
|
|
46
49
|
doc: document
|
|
47
50
|
}),
|
|
48
|
-
transcriptOpen:
|
|
51
|
+
transcriptOpen: R
|
|
49
52
|
});
|
|
50
53
|
if (t === "ignore") return;
|
|
51
|
-
e.preventDefault(), t === "close-transcript" ?
|
|
54
|
+
e.preventDefault(), t === "close-transcript" ? z(!1) : B ? D?.onClose() : S();
|
|
52
55
|
return;
|
|
53
56
|
}
|
|
54
|
-
if (e.key !== "Tab" || !
|
|
55
|
-
let t = (
|
|
57
|
+
if (e.key !== "Tab" || !F) return;
|
|
58
|
+
let t = (R ? M.current?.querySelector("[data-testid=\"assistant-voice-transcript\"]") : M.current)?.querySelectorAll("button:not([disabled])");
|
|
56
59
|
if (!t || t.length === 0) return;
|
|
57
60
|
let n = t[0], r = t[t.length - 1];
|
|
58
61
|
!n || !r || (e.shiftKey && document.activeElement === n ? (e.preventDefault(), r.focus()) : !e.shiftKey && document.activeElement === r && (e.preventDefault(), n.focus()));
|
|
59
62
|
};
|
|
60
63
|
return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
|
|
61
64
|
}, [
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
65
|
+
S,
|
|
66
|
+
F,
|
|
67
|
+
R,
|
|
68
|
+
B,
|
|
69
|
+
D
|
|
67
70
|
]);
|
|
68
|
-
let
|
|
69
|
-
letMeFinish:
|
|
70
|
-
imDone:
|
|
71
|
-
} : null,
|
|
72
|
-
|
|
73
|
-
if (
|
|
71
|
+
let G = h !== null && A === null, K = o(m), q = w && T && m.phase === "listening" && !k && A === null ? {
|
|
72
|
+
letMeFinish: w,
|
|
73
|
+
imDone: T
|
|
74
|
+
} : null, J = q !== null;
|
|
75
|
+
c(() => {
|
|
76
|
+
if (J) return;
|
|
74
77
|
let e = document.activeElement;
|
|
75
|
-
(!e || e === document.body) &&
|
|
76
|
-
}, [
|
|
77
|
-
let
|
|
78
|
-
snapshot:
|
|
79
|
-
capturing:
|
|
80
|
-
interrupting:
|
|
81
|
-
awaitingEndpoint:
|
|
82
|
-
}),
|
|
83
|
-
switch (
|
|
84
|
-
case "connecting": return
|
|
85
|
-
case "endpoint-grace": return
|
|
86
|
-
case "interrupting": return
|
|
87
|
-
case "thinking": return
|
|
88
|
-
case "speaking": return
|
|
78
|
+
(!e || e === document.body) && j.current?.focus();
|
|
79
|
+
}, [J]);
|
|
80
|
+
let Y = i({
|
|
81
|
+
snapshot: m,
|
|
82
|
+
capturing: Ee,
|
|
83
|
+
interrupting: De,
|
|
84
|
+
awaitingEndpoint: Oe
|
|
85
|
+
}), je = (() => {
|
|
86
|
+
switch (Y) {
|
|
87
|
+
case "connecting": return O("voiceSession.connecting", "Starting the microphone…");
|
|
88
|
+
case "endpoint-grace": return O("voiceSession.endpointGrace", "Still listening — take your time");
|
|
89
|
+
case "interrupting": return O("voiceSession.interrupting", "Stopped — go ahead");
|
|
90
|
+
case "thinking": return O(a.key, a.fallback);
|
|
91
|
+
case "speaking": return O("voiceSession.speaking", "Speaking — tap to stop");
|
|
89
92
|
case "mic-error":
|
|
90
93
|
case "ended": return "";
|
|
91
|
-
case "listening": return
|
|
92
|
-
default: return
|
|
94
|
+
case "listening": return k ? O("voiceSession.muted", "Microphone off") : O("voiceSession.listening", "Listening…");
|
|
95
|
+
default: return Y;
|
|
93
96
|
}
|
|
94
|
-
})(),
|
|
95
|
-
tr:
|
|
96
|
-
stage:
|
|
97
|
-
muted:
|
|
98
|
-
label:
|
|
99
|
-
}),
|
|
100
|
-
return /* @__PURE__ */
|
|
101
|
-
ref:
|
|
102
|
-
className: `flex flex-col items-center justify-between bg-bg-sunken ${
|
|
97
|
+
})(), X = !k && (Y === "listening" || Y === "endpoint-grace"), Z = X && C ? O("voiceSession.holding", "Take your time — tap “I’m done” when you finish") : X && ke ? O("voiceSession.correcting", "Stopped that answer — listening to your correction") : je, Q = ne({
|
|
98
|
+
tr: O,
|
|
99
|
+
stage: Y,
|
|
100
|
+
muted: k,
|
|
101
|
+
label: Z
|
|
102
|
+
}), $ = te(Z, Q), Me = Y === "thinking";
|
|
103
|
+
return /* @__PURE__ */ p("div", {
|
|
104
|
+
ref: M,
|
|
105
|
+
className: `flex flex-col items-center justify-between bg-bg-sunken ${N === "full" ? "fixed inset-x-0 bottom-0 top-14 z-[60] px-6 py-8" : N === "panel" ? "absolute inset-0 z-20 px-4 py-6" : "absolute inset-x-0 bottom-0 z-20 h-[11.25rem] border-t border-border-subtle px-3 py-3 shadow-lg"}`,
|
|
103
106
|
role: "dialog",
|
|
104
|
-
"aria-modal":
|
|
105
|
-
"aria-label":
|
|
107
|
+
"aria-modal": F || void 0,
|
|
108
|
+
"aria-label": O("voiceSession.title", "Voice conversation"),
|
|
106
109
|
"data-testid": "assistant-voice-session",
|
|
107
|
-
[
|
|
110
|
+
[ie]: "",
|
|
108
111
|
children: [
|
|
109
|
-
/* @__PURE__ */
|
|
110
|
-
ref:
|
|
112
|
+
/* @__PURE__ */ p("button", {
|
|
113
|
+
ref: j,
|
|
111
114
|
type: "button",
|
|
112
|
-
onClick:
|
|
113
|
-
className: `absolute ${
|
|
114
|
-
title:
|
|
115
|
+
onClick: S,
|
|
116
|
+
className: `absolute ${F ? "right-6 top-6 h-14 gap-2 px-5 text-base" : I ? "right-12 top-2 h-8 gap-1.5 px-2.5 text-xs" : "right-3 top-3 h-11 gap-2 px-4 text-sm"} flex items-center justify-center rounded-full border border-border-default bg-bg-elevated text-text-secondary hover:bg-bg-sunken transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-border-strong`,
|
|
117
|
+
title: O("voiceSession.end", "End the voice conversation"),
|
|
115
118
|
"data-testid": "assistant-voice-end",
|
|
116
|
-
children: [/* @__PURE__ */
|
|
117
|
-
className:
|
|
119
|
+
children: [/* @__PURE__ */ f(d, {
|
|
120
|
+
className: F ? "size-6" : I ? "size-4" : "size-5",
|
|
118
121
|
"aria-hidden": "true"
|
|
119
|
-
}), /* @__PURE__ */
|
|
120
|
-
className: `truncate whitespace-nowrap font-medium ${
|
|
121
|
-
children:
|
|
122
|
+
}), /* @__PURE__ */ f("span", {
|
|
123
|
+
className: `truncate whitespace-nowrap font-medium ${I ? "max-w-[3.5rem] text-xs" : "max-w-[7rem]"}`,
|
|
124
|
+
children: O("voiceSession.endShort", "End")
|
|
122
125
|
})]
|
|
123
126
|
}),
|
|
124
|
-
/* @__PURE__ */
|
|
125
|
-
className: `flex flex-col items-center ${
|
|
126
|
-
children:
|
|
127
|
+
/* @__PURE__ */ f("div", {
|
|
128
|
+
className: `flex flex-col items-center ${I ? "px-3" : `min-h-[1.5rem] ${G ? F ? "pt-14" : "pt-10" : ""}`}`,
|
|
129
|
+
children: G ? /* @__PURE__ */ f("p", {
|
|
127
130
|
className: "max-w-xs text-center text-xs text-status-warning",
|
|
128
131
|
"data-testid": "assistant-voice-notice",
|
|
129
|
-
children:
|
|
132
|
+
children: _e(h, O)
|
|
130
133
|
}) : null
|
|
131
134
|
}),
|
|
132
135
|
(() => {
|
|
133
|
-
let e = /* @__PURE__ */
|
|
134
|
-
session:
|
|
135
|
-
compact:
|
|
136
|
-
connecting:
|
|
137
|
-
onPress:
|
|
138
|
-
label:
|
|
139
|
-
}), t =
|
|
136
|
+
let e = /* @__PURE__ */ f(se, {
|
|
137
|
+
session: m,
|
|
138
|
+
compact: I,
|
|
139
|
+
connecting: Y === "connecting",
|
|
140
|
+
onPress: r(Y) ? Se : _,
|
|
141
|
+
label: r(Y) ? O("voiceSession.interrupt", "Stop the assistant and speak") : k ? O("voiceSession.unmute", "Turn the microphone on") : O("voiceSession.mute", "Turn the microphone off")
|
|
142
|
+
}), t = q ? /* @__PURE__ */ f("button", {
|
|
140
143
|
type: "button",
|
|
141
|
-
onClick:
|
|
142
|
-
className: `flex items-center justify-center rounded-full border font-medium transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-border-strong ${
|
|
143
|
-
title:
|
|
144
|
+
onClick: C ? q.imDone : q.letMeFinish,
|
|
145
|
+
className: `flex items-center justify-center rounded-full border font-medium transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-border-strong ${I ? "h-7 px-3 text-xs" : F ? "h-11 px-6 text-base" : "h-9 px-4 text-sm"} ${C ? "border-transparent bg-action-primary-bg text-action-primary-text hover:opacity-90" : "border-border-default bg-bg-elevated text-text-secondary hover:bg-bg-sunken"}`,
|
|
146
|
+
title: C ? O("voiceSession.imDoneHint", "Send what you said now") : O("voiceSession.letMeFinishHint", "Pause sending until you tap “I’m done”"),
|
|
144
147
|
"data-testid": "assistant-voice-hold",
|
|
145
|
-
"data-holding":
|
|
146
|
-
children:
|
|
147
|
-
}) : null,
|
|
148
|
+
"data-holding": C ? "true" : "false",
|
|
149
|
+
children: C ? O("voiceSession.imDone", "I’m done") : O("voiceSession.letMeFinish", "Let me finish")
|
|
150
|
+
}) : null, n = t ? /* @__PURE__ */ p("div", {
|
|
148
151
|
className: "flex flex-col items-center gap-2",
|
|
149
152
|
children: [e, t]
|
|
150
|
-
}) : e,
|
|
151
|
-
return
|
|
152
|
-
spokenChunks:
|
|
153
|
-
state:
|
|
154
|
-
caption:
|
|
155
|
-
statusText:
|
|
156
|
-
statusSuffix:
|
|
157
|
-
rotateStatus:
|
|
158
|
-
errorText:
|
|
159
|
-
control:
|
|
160
|
-
}) : /* @__PURE__ */
|
|
161
|
-
state:
|
|
162
|
-
userCaption:
|
|
163
|
-
spokenChunks:
|
|
164
|
-
assistantCaption:
|
|
165
|
-
expanded:
|
|
166
|
-
statusText:
|
|
167
|
-
statusSuffix:
|
|
168
|
-
rotateStatus:
|
|
169
|
-
errorText:
|
|
170
|
-
control:
|
|
153
|
+
}) : e, i = ee(Y) ? g : K || null, a = A === null ? null : ve(A, O);
|
|
154
|
+
return I ? /* @__PURE__ */ f(ce, {
|
|
155
|
+
spokenChunks: x,
|
|
156
|
+
state: Y,
|
|
157
|
+
caption: i,
|
|
158
|
+
statusText: $,
|
|
159
|
+
statusSuffix: Q,
|
|
160
|
+
rotateStatus: Me,
|
|
161
|
+
errorText: a,
|
|
162
|
+
control: n
|
|
163
|
+
}) : /* @__PURE__ */ f(le, {
|
|
164
|
+
state: Y,
|
|
165
|
+
userCaption: K || null,
|
|
166
|
+
spokenChunks: x,
|
|
167
|
+
assistantCaption: g,
|
|
168
|
+
expanded: F,
|
|
169
|
+
statusText: $,
|
|
170
|
+
statusSuffix: Q,
|
|
171
|
+
rotateStatus: Me,
|
|
172
|
+
errorText: a,
|
|
173
|
+
control: n
|
|
171
174
|
});
|
|
172
175
|
})(),
|
|
173
|
-
|
|
174
|
-
className:
|
|
175
|
-
children: /* @__PURE__ */
|
|
176
|
+
E && !B ? /* @__PURE__ */ f("div", {
|
|
177
|
+
className: I ? "absolute left-20 right-36 top-2 flex justify-center" : `flex w-full justify-center ${F ? "max-w-[calc(100%-12rem)]" : "max-w-[calc(100%-8rem)]"}`,
|
|
178
|
+
children: /* @__PURE__ */ f("button", {
|
|
176
179
|
type: "button",
|
|
177
180
|
onClick: () => {
|
|
178
|
-
|
|
181
|
+
P("panel"), E.onOpen();
|
|
179
182
|
},
|
|
180
|
-
className: `max-w-full truncate rounded-full border border-border-default bg-bg-elevated font-medium text-text-primary transition-colors hover:bg-bg-raised focus:outline-none focus-visible:ring-2 focus-visible:ring-border-strong ${
|
|
183
|
+
className: `max-w-full truncate rounded-full border border-border-default bg-bg-elevated font-medium text-text-primary transition-colors hover:bg-bg-raised focus:outline-none focus-visible:ring-2 focus-visible:ring-border-strong ${I ? "h-8 px-3 text-xs" : "h-10 px-4 text-sm"}`,
|
|
181
184
|
"data-testid": "assistant-voice-proposal-chip",
|
|
182
|
-
children:
|
|
185
|
+
children: E.label
|
|
183
186
|
})
|
|
184
187
|
}) : null,
|
|
185
|
-
|
|
186
|
-
className: `absolute z-10 flex flex-col gap-2 overflow-y-auto rounded-lg border border-border-subtle bg-bg-elevated shadow-lg ${
|
|
188
|
+
D && B ? /* @__PURE__ */ p("div", {
|
|
189
|
+
className: `absolute z-10 flex flex-col gap-2 overflow-y-auto rounded-lg border border-border-subtle bg-bg-elevated shadow-lg ${F ? "inset-x-6 bottom-24 top-24 mx-auto max-w-xl p-4" : "inset-x-3 bottom-16 top-16 p-3"}`,
|
|
187
190
|
"data-testid": "assistant-voice-proposal-tray",
|
|
188
|
-
children: [/* @__PURE__ */
|
|
191
|
+
children: [/* @__PURE__ */ f("div", {
|
|
189
192
|
className: "flex justify-end",
|
|
190
|
-
children: /* @__PURE__ */
|
|
193
|
+
children: /* @__PURE__ */ f("button", {
|
|
191
194
|
type: "button",
|
|
192
|
-
onClick:
|
|
195
|
+
onClick: D.onClose,
|
|
193
196
|
className: "flex size-8 items-center justify-center rounded-full text-text-secondary transition-colors hover:bg-bg-raised hover:text-text-primary focus:outline-none focus-visible:ring-2 focus-visible:ring-border-strong",
|
|
194
|
-
"aria-label":
|
|
197
|
+
"aria-label": D.closeLabel,
|
|
195
198
|
"data-testid": "assistant-voice-proposal-tray-close",
|
|
196
|
-
children: /* @__PURE__ */
|
|
199
|
+
children: /* @__PURE__ */ f(d, {
|
|
197
200
|
className: "size-4",
|
|
198
201
|
"aria-hidden": "true"
|
|
199
202
|
})
|
|
200
203
|
})
|
|
201
|
-
}),
|
|
204
|
+
}), D.content]
|
|
202
205
|
}) : null,
|
|
203
|
-
|
|
204
|
-
turns:
|
|
205
|
-
onClose: () =>
|
|
206
|
-
onSave:
|
|
207
|
-
onContinueInChat:
|
|
206
|
+
R ? /* @__PURE__ */ f(ue, {
|
|
207
|
+
turns: ye,
|
|
208
|
+
onClose: () => z(!1),
|
|
209
|
+
onSave: be,
|
|
210
|
+
onContinueInChat: xe
|
|
208
211
|
}) : null,
|
|
209
|
-
|
|
210
|
-
className: `absolute ${
|
|
211
|
-
children: /* @__PURE__ */
|
|
212
|
+
y ? /* @__PURE__ */ f("div", {
|
|
213
|
+
className: `absolute ${F ? "left-6 top-6" : I ? "left-11 top-2" : "left-3 top-3"}`,
|
|
214
|
+
children: /* @__PURE__ */ f(ae, {
|
|
212
215
|
onFiles: (e) => {
|
|
213
|
-
|
|
216
|
+
y(e), P((e) => e === "mini" ? "panel" : e);
|
|
214
217
|
},
|
|
215
|
-
onPickerOpen:
|
|
218
|
+
onPickerOpen: Ae,
|
|
216
219
|
direction: "down",
|
|
217
|
-
canAddMore:
|
|
220
|
+
canAddMore: Te
|
|
218
221
|
})
|
|
219
222
|
}) : null,
|
|
220
|
-
(
|
|
221
|
-
className: `absolute ${
|
|
223
|
+
(v.length > 0 || b > 0) && !I ? /* @__PURE__ */ f("div", {
|
|
224
|
+
className: `absolute ${F ? "bottom-24 left-24 right-24" : "bottom-16 left-16 right-16"}`,
|
|
222
225
|
"data-testid": "assistant-voice-attachments",
|
|
223
|
-
children: /* @__PURE__ */
|
|
224
|
-
attachments:
|
|
225
|
-
onRemove:
|
|
226
|
-
onRetry:
|
|
227
|
-
preparingCount:
|
|
226
|
+
children: /* @__PURE__ */ f(oe, {
|
|
227
|
+
attachments: v,
|
|
228
|
+
onRemove: Ce ?? (() => void 0),
|
|
229
|
+
onRetry: we ?? (() => void 0),
|
|
230
|
+
preparingCount: b
|
|
228
231
|
})
|
|
229
232
|
}) : null,
|
|
230
|
-
/* @__PURE__ */
|
|
233
|
+
/* @__PURE__ */ f("button", {
|
|
231
234
|
type: "button",
|
|
232
|
-
onClick: () =>
|
|
233
|
-
className: `absolute ${
|
|
234
|
-
"aria-pressed":
|
|
235
|
-
"aria-label":
|
|
235
|
+
onClick: () => z((e) => !e),
|
|
236
|
+
className: `absolute ${F ? "bottom-6 right-6 size-14" : I ? "right-2 top-2 size-8" : "bottom-3 right-3 size-11"} flex items-center justify-center rounded-full bg-bg-elevated text-text-secondary transition-colors hover:bg-bg-raised hover:text-text-primary focus:outline-none focus-visible:ring-2 focus-visible:ring-border-strong`,
|
|
237
|
+
"aria-pressed": R,
|
|
238
|
+
"aria-label": O("voiceSession.transcriptTitle", "Voice transcript"),
|
|
236
239
|
"data-testid": "assistant-voice-transcript-toggle",
|
|
237
|
-
children: /* @__PURE__ */
|
|
240
|
+
children: /* @__PURE__ */ f(ge, { className: F ? "size-6" : I ? "size-4" : "size-5" })
|
|
238
241
|
}),
|
|
239
|
-
/* @__PURE__ */
|
|
242
|
+
/* @__PURE__ */ f("button", {
|
|
240
243
|
type: "button",
|
|
241
|
-
onClick: () =>
|
|
242
|
-
className: `absolute ${
|
|
243
|
-
"aria-label":
|
|
244
|
+
onClick: () => P(L),
|
|
245
|
+
className: `absolute ${F ? "bottom-6 left-6 size-14" : I ? "left-2 top-2 size-8" : "bottom-3 left-3 size-11"} flex items-center justify-center rounded-full bg-bg-elevated text-text-secondary transition-colors hover:bg-bg-raised hover:text-text-primary focus:outline-none focus-visible:ring-2 focus-visible:ring-border-strong`,
|
|
246
|
+
"aria-label": L === "panel" ? O("voiceSession.expandPanel", "Show the conversation in the panel") : L === "full" ? O("voiceSession.expand", "Expand the conversation to full screen") : O("voiceSession.collapse", "Shrink to the compact controller"),
|
|
244
247
|
"data-testid": "assistant-voice-expand",
|
|
245
|
-
children:
|
|
248
|
+
children: F ? /* @__PURE__ */ f(he, { className: "size-5" }) : /* @__PURE__ */ f(me, { className: I ? "size-4" : "size-5" })
|
|
246
249
|
})
|
|
247
250
|
]
|
|
248
251
|
});
|
|
249
252
|
};
|
|
250
|
-
function
|
|
253
|
+
function _e(e, t) {
|
|
251
254
|
switch (e) {
|
|
252
255
|
case "network": return t("voiceSession.noticeNetwork", "Speech recognition lost its connection. Check your network — it will retry.");
|
|
253
256
|
case "not-capturing": return t("voiceSession.noticeNotCapturing", "The microphone did not start. Check that this site is allowed to use it, then try again.");
|
|
@@ -256,7 +259,7 @@ function me(e, t) {
|
|
|
256
259
|
default: return e;
|
|
257
260
|
}
|
|
258
261
|
}
|
|
259
|
-
function
|
|
262
|
+
function ve(e, t) {
|
|
260
263
|
switch (e) {
|
|
261
264
|
case "mic-denied": return t("voiceSession.micDenied", "Microphone access is blocked. Allow it in your browser settings to talk.");
|
|
262
265
|
case "no-speech-support": return t("voiceSession.noSpeechSupport", "This browser cannot listen. Try a different browser, or type instead.");
|
|
@@ -265,4 +268,4 @@ function he(e, t) {
|
|
|
265
268
|
}
|
|
266
269
|
}
|
|
267
270
|
//#endregion
|
|
268
|
-
export {
|
|
271
|
+
export { m as AssistantVoiceSession };
|
|
@@ -70,4 +70,37 @@ export type RecordPlan = {
|
|
|
70
70
|
};
|
|
71
71
|
export declare const RECORD_CHOICE_MAX = 4;
|
|
72
72
|
export declare function planRecordResolution(name: string, answers: readonly RecordAnswer[]): RecordPlan;
|
|
73
|
+
/** How long the panel waits for the product's APIs before the sentence goes to the model. */
|
|
74
|
+
export declare const RECORD_LOOKUP_TIMEOUT_MS = 2500;
|
|
75
|
+
/** An adapter answering with more than this is treated as answering with its first this many. */
|
|
76
|
+
export declare const RECORD_MATCHES_MAX = 50;
|
|
77
|
+
/**
|
|
78
|
+
* ★ BOFF-8060 (N1b robustness): an adapter is PRODUCT code, so its answer is
|
|
79
|
+
* untrusted data. A match is usable only with a non-empty string name and
|
|
80
|
+
* string-valued params; anything else is dropped here, before it can reach the
|
|
81
|
+
* planner (where `null.normalize()` used to throw inside a promise callback and
|
|
82
|
+
* leave the panel busy).
|
|
83
|
+
*/
|
|
84
|
+
export declare function isRecordMatch(value: unknown): value is AssistantRecordMatch;
|
|
85
|
+
/** An adapter's answer as plain, valid matches; a non-array or garbage is "none". */
|
|
86
|
+
export declare function sanitizeRecordMatches(answer: unknown): AssistantRecordMatch[];
|
|
87
|
+
export interface UsableRecordAdapter {
|
|
88
|
+
adapter: AssistantRecordAdapter;
|
|
89
|
+
route: AssistantEntityRoute;
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Ask every usable adapter, bounded by ONE deadline, and plan the answers.
|
|
93
|
+
*
|
|
94
|
+
* NEVER REJECTS and never throws: a synchronous throw from `find`, a rejection,
|
|
95
|
+
* a non-promise return, a malformed match, a throwing noun lookup and a late
|
|
96
|
+
* answer all mean "that adapter found nothing", and a failure while planning
|
|
97
|
+
* means "none". The caller sends the sentence to the model on `none`, exactly as
|
|
98
|
+
* if the request had never matched.
|
|
99
|
+
*/
|
|
100
|
+
export declare function lookupNamedRecords(input: {
|
|
101
|
+
name: string;
|
|
102
|
+
usable: readonly UsableRecordAdapter[];
|
|
103
|
+
nounOf: (adapter: AssistantRecordAdapter) => string;
|
|
104
|
+
timeoutMs?: number;
|
|
105
|
+
}): Promise<RecordPlan>;
|
|
73
106
|
//# sourceMappingURL=recordNames.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"recordNames.d.ts","sourceRoot":"","sources":["../../../../src/shared/assistant/uiActions/recordNames.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,EAAmB,KAAK,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAG5E;;;;;;;;;;;;;;;GAeG;AACH,MAAM,WAAW,oBAAoB;IACnC,iEAAiE;IACjE,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IACzC,+DAA+D;IAC/D,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,sBAAsB;IACrC,8CAA8C;IAC9C,EAAE,EAAE,MAAM,CAAC;IACX,iGAAiG;IACjG,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;IACzB,wGAAwG;IACxG,IAAI,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAA;KAAE,CAAC;IACxC,0DAA0D;IAC1D,aAAa,EAAE,MAAM,CAAC;IACtB;;;;OAIG;IACH,IAAI,EAAE,CACJ,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,WAAW,KAChB,OAAO,CAAC,SAAS,oBAAoB,EAAE,CAAC,CAAC;CAC/C;AAED,MAAM,WAAW,aAAa;IAC5B,oCAAoC;IACpC,IAAI,EAAE,MAAM,CAAC;IACb,mEAAmE;IACnE,UAAU,EAAE,MAAM,EAAE,CAAC;CACtB;AA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CAAC;IAC/B,8DAA8D;IAC9D,KAAK,EAAE,MAAM,EAAE,CAAC;CACjB,CAAC;AAEN,eAAO,MAAM,iBAAiB,IAAI,CAAC;AAkBnC,wBAAgB,oBAAoB,CAClC,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,SAAS,YAAY,EAAE,GAC/B,UAAU,CA8CZ;AAED,6FAA6F;AAC7F,eAAO,MAAM,wBAAwB,OAAQ,CAAC;AAC9C,iGAAiG;AACjG,eAAO,MAAM,kBAAkB,KAAK,CAAC;AAGrC;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,oBAAoB,CAY3E;AAED,qFAAqF;AACrF,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,OAAO,GAAG,oBAAoB,EAAE,CAQ7E;AAED,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,sBAAsB,CAAC;IAChC,KAAK,EAAE,oBAAoB,CAAC;CAC7B;AAED;;;;;;;;GAQG;AACH,wBAAsB,kBAAkB,CAAC,KAAK,EAAE;IAC9C,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,SAAS,mBAAmB,EAAE,CAAC;IACvC,MAAM,EAAE,CAAC,OAAO,EAAE,sBAAsB,KAAK,MAAM,CAAC;IACpD,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,GAAG,OAAO,CAAC,UAAU,CAAC,CA4CtB"}
|
|
@@ -71,5 +71,55 @@ function f(n, r) {
|
|
|
71
71
|
nouns: [...new Set(l.map((e) => e.noun))]
|
|
72
72
|
};
|
|
73
73
|
}
|
|
74
|
+
var p = 2500, m = 50, h = 200;
|
|
75
|
+
function g(e) {
|
|
76
|
+
if (typeof e != "object" || !e) return !1;
|
|
77
|
+
let { name: t, params: n } = e;
|
|
78
|
+
if (typeof t != "string") return !1;
|
|
79
|
+
let r = t.trim();
|
|
80
|
+
if (r.length === 0 || r.length > h || typeof n != "object" || !n || Array.isArray(n)) return !1;
|
|
81
|
+
let i = Object.values(n);
|
|
82
|
+
return i.length > 0 && i.every((e) => typeof e == "string");
|
|
83
|
+
}
|
|
84
|
+
function _(e) {
|
|
85
|
+
if (!Array.isArray(e)) return [];
|
|
86
|
+
let t = [];
|
|
87
|
+
for (let n of e) if (g(n) && t.push(n), t.length >= 50) break;
|
|
88
|
+
return t;
|
|
89
|
+
}
|
|
90
|
+
async function v(e) {
|
|
91
|
+
let t = new AbortController(), n, r = new Promise((r) => {
|
|
92
|
+
n = setTimeout(() => {
|
|
93
|
+
t.abort(), r(null);
|
|
94
|
+
}, e.timeoutMs ?? 2500);
|
|
95
|
+
});
|
|
96
|
+
try {
|
|
97
|
+
let n = await Promise.all(e.usable.map(async ({ adapter: n, route: i }) => {
|
|
98
|
+
let a = new Promise((r) => {
|
|
99
|
+
try {
|
|
100
|
+
Promise.resolve(n.find(e.name, t.signal)).then(r, () => r(null));
|
|
101
|
+
} catch {
|
|
102
|
+
r(null);
|
|
103
|
+
}
|
|
104
|
+
}), o = await Promise.race([a, r]), s;
|
|
105
|
+
try {
|
|
106
|
+
s = e.nounOf(n);
|
|
107
|
+
} catch {
|
|
108
|
+
s = String(n.noun?.fallback ?? "");
|
|
109
|
+
}
|
|
110
|
+
return {
|
|
111
|
+
adapter: n,
|
|
112
|
+
route: i,
|
|
113
|
+
noun: s,
|
|
114
|
+
matches: _(o)
|
|
115
|
+
};
|
|
116
|
+
}));
|
|
117
|
+
return f(e.name, n);
|
|
118
|
+
} catch {
|
|
119
|
+
return { kind: "none" };
|
|
120
|
+
} finally {
|
|
121
|
+
clearTimeout(n);
|
|
122
|
+
}
|
|
123
|
+
}
|
|
74
124
|
//#endregion
|
|
75
|
-
export { l as RECORD_CHOICE_MAX, c as parseRecordRequest, f as planRecordResolution };
|
|
125
|
+
export { l as RECORD_CHOICE_MAX, p as RECORD_LOOKUP_TIMEOUT_MS, m as RECORD_MATCHES_MAX, g as isRecordMatch, v as lookupNamedRecords, c as parseRecordRequest, f as planRecordResolution, _ as sanitizeRecordMatches };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"KeyboardHelpDialogWrapper.d.ts","sourceRoot":"","sources":["../../../src/shared/components/KeyboardHelpDialogWrapper.tsx"],"names":[],"mappings":"AAAA;;;GAGG;
|
|
1
|
+
{"version":3,"file":"KeyboardHelpDialogWrapper.d.ts","sourceRoot":"","sources":["../../../src/shared/components/KeyboardHelpDialogWrapper.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAOH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAE1D,MAAM,WAAW,8BAA8B;IAC7C,yDAAyD;IACzD,SAAS,EAAE,gBAAgB,EAAE,CAAC;CAC/B;AAED,wBAAgB,yBAAyB,CAAC,EAAE,SAAS,EAAE,EAAE,8BAA8B,kDA0BtF"}
|
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
import { useGlobalUi as e } from "../providers/shell/GlobalUiProvider.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { useAssistantControl as t } from "../assistant/appControls/useAssistantControl.js";
|
|
3
|
+
import { ShortcutHelpDialog as n } from "../../chrome/ShortcutHelpDialog.js";
|
|
4
|
+
import { useMemo as r } from "react";
|
|
5
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
4
6
|
//#region src/shared/components/KeyboardHelpDialogWrapper.tsx
|
|
5
|
-
function
|
|
6
|
-
let { isKeyboardHelpOpen:
|
|
7
|
-
return
|
|
8
|
-
isOpen:
|
|
9
|
-
onClose:
|
|
10
|
-
shortcuts:
|
|
7
|
+
function a({ shortcuts: a }) {
|
|
8
|
+
let { isKeyboardHelpOpen: o, closeKeyboardHelp: s, openKeyboardHelp: c } = e();
|
|
9
|
+
return t("header.help", r(() => ({ run: () => o ? { status: "already" } : (c(), { status: "done" }) }), [o, c])), o ? /* @__PURE__ */ i(n, {
|
|
10
|
+
isOpen: o,
|
|
11
|
+
onClose: s,
|
|
12
|
+
shortcuts: a
|
|
11
13
|
}) : null;
|
|
12
14
|
}
|
|
13
15
|
//#endregion
|
|
14
|
-
export {
|
|
16
|
+
export { a as KeyboardHelpDialogWrapper };
|
|
@@ -42,5 +42,7 @@ export interface GlobalUiProviderProps {
|
|
|
42
42
|
defaultToastDuration?: number;
|
|
43
43
|
}
|
|
44
44
|
export declare function GlobalUiProvider({ children, maxToasts, defaultToastDuration, }: GlobalUiProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
45
|
+
/** The global UI state, or null outside a `GlobalUiProvider` (no throw). */
|
|
46
|
+
export declare function useGlobalUiOrNull(): GlobalUiContextValue | null;
|
|
45
47
|
export declare function useGlobalUi(): GlobalUiContextValue;
|
|
46
48
|
//# sourceMappingURL=GlobalUiProvider.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GlobalUiProvider.d.ts","sourceRoot":"","sources":["../../../../src/shared/providers/shell/GlobalUiProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAsD,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAE3F,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,CAAC;AACjE,MAAM,MAAM,gBAAgB,GAAG,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,CAAC;AAExE,MAAM,WAAW,KAAK;IACpB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,SAAS,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,gBAAgB,CAAC;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,OAAO,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,W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